Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

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)
{
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #variadic #template #constructor #matches #copy #constructor
ADD COMMENT
Topic
Name
3+5 =