Suppose I want to create a compile-time heterogenous container of unique types from some sequence of non-unique types. In order to do this I need to iterate over th
#include
#include
template
struct has_type;
template
struct has_type> : std::false_type {};
template
struct has_type> : has_type> {};
template
struct has_type> : std::true_type {};
DEMO
And an additional alias, if the trait itself should be std::true_type or std::false_type :
template
using tuple_contains_type = typename has_type::type;