I want to check that a type T
is also part of a parameter pack Ts
. There are solutions that do that in C++14, but I'm wandering if this can be simplified in C++17. If T
is not found in Ts
the compiler should stop (static_assertion should fail).
template<typename... Ts>
class A
{
template<typename T>
void action() {
// check that T is also in Ts (static_assertion)
}
}