Struct type_list_unique< type_list< Type, Other... > >

Synopsis

#include <src/entt/core/type_traits.hpp>

template<typename Type, typename... Other>
struct type_list_unique<type_list<Type, Other...>>

Description

Removes duplicates types from a type list.

Template Parameters

Type - One of the types provided by the given type list.

Other - The other types provided by the given type list.

Source

Lines 177-185 in src/entt/core/type_traits.hpp.

template<typename Type, typename... Other>
struct type_list_unique<type_list<Type, Other...>> {
    /*! @brief A type list without duplicate types. */
    using type = std::conditional_t<
        std::disjunction_v<std::is_same<Type, Other>...>,
        typename type_list_unique<type_list<Other...>>::type,
        type_list_cat_t<type_list<Type>, typename type_list_unique<type_list<Other...>>::type>
    >;
};





Add Discussion

Log in to comment