To complement type_list_cat it might be useful to generate type lists by removing types. This was discussed on discord https://discord.com/channels/707607951396962417/707624203456872480/799280425380872223.
Suggested snipped by @skypjack
template<typename, typename>
struct type_list_diff;
template<typename... Type, typename... Other>
struct type_list_diff<type_list<Type...>, type_list<Other...>> {
using type = type_list_cat_t<std::conditional_t<type_list_contains_v<type_list<Other...>, Type>, type_list<>, type_list<Type>>...>;
};
template<typename... List>
using type_list_diff_t = typename type_list_diff<List...>::type;
Available on experimental. 馃憤
Upstream on master.
Most helpful comment
Available on
experimental. 馃憤