Struct cpp_type< T, if_t< is_pair< T >::value > >

Synopsis

#include <include/flecs/addons/cpp/component.hpp>

template <typename T>
struct cpp_type<T, if_t< is_pair<T>::value >>

Description

No description yet.

Methods

id

Source

Lines 316-325 in include/flecs/addons/cpp/component.hpp.

template <typename T>
struct cpp_type<T, if_t< is_pair<T>::value >>
{
    // Override id method to return id of pair
    static id_t id(world_t *world = nullptr) {
        return ecs_pair(
            cpp_type< pair_first_t<T> >::id(world),
            cpp_type< pair_second_t<T> >::id(world));
    }
};