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

Synopsis

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

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

Description

Computes the difference between two type lists.

Template Parameters

Type - Types provided by the first type list.

Other - Types provided by the second type list.

Source

Lines 304-308 in src/entt/core/type_traits.hpp.

template<typename... Type, typename... Other>
struct type_list_diff<type_list<Type...>, type_list<Other...>> {
    /*! @brief A type list that is the difference between the two type lists. */
    using type = type_list_cat_t<std::conditional_t<type_list_contains_v<type_list<Other...>, Type>, type_list<>, type_list<Type>>...>;
};





Add Discussion

Log in to comment