How can I make a class template that returns whether any of its variadic types are equal to the first type. I want to be able to do this:
is_same
Nice and concise with C++17:
template
struct is_any : std::disjunction...> {};
And the dual:
template
struct are_same : std::conjunction...> {};
A variation that uses fold expressions:
template
struct is_any : std::bool_constant<(std::is_same_v || ...)> {};
template
struct are_same : std::bool_constant<(std::is_same_v && ...)> {};