How can one check if one parameter pack (interpreted as a set) is a subset of another one?
So far I only have the frame (using std::tuple), but no functionality.
Here's a C++17 answer that I believe is quite simpler than Piotr's answer:
template
struct contains : std::disjunction...>{};
template
struct is_subset_of : std::false_type{};
template
struct is_subset_of, std::tuple> : std::conjunction...> {};
disjunction and conjunction are new type traits introduced in C++17. We can take advantage of these to check if at least one type in the second tuple matches "the next type" in the first tuple, which we use parameter pack expansion extensively for.