I would like to enforce the type of variadic template to be identical to an earlier set template type. In the below example, I\'d like T and U to be the same type.
c
Without implementing of all_same you could also change the constructor code as follows:
all_same
template::value>::type, class... U> Foo(F first, U... vals): Foo(vals...) { std::cout << "Called multiple argument ctor" << std::endl; // [...] }
is_same is the function in an STL
is_same