Answers for "variadic template constructor matches better than copy constructor"

C++
0

variadic template constructor matches better than copy constructor

// C++11 way
template <typename... > struct typelist;

template <typename... Args,
		  	typename = typename std::enable_if<
          		!std::is_same<typelist<Bar>,
                			  typelist<typename std::decay<Args>::type...>
                >::value
            >::type
         >
Bar(Args&&... args)
{
}
Posted by: Guest on September-06-2021

Browse Popular Code Answers by Language