35template <
typename First,
typename Second>
37 using type = conditional_t<!is_empty<First>::value || is_empty<Second>::value, First, Second>;
60 operator const type&()
const {
89template <typename First, typename Second, if_t<is_empty<First>::value> = 0>
94using raw_type_t = remove_pointer_t<remove_reference_t<T>>;
99 static constexpr bool value = is_base_of_v<_::pair_base, raw_type_t<T>>;
119template <
typename T,
typename U =
int>
139 using type = decay_t< actual_type_t<T> >;
150 using type = remove_pointer_t< remove_reference_t< actual_type_t<T> > >;
161 static constexpr bool value = is_same_v<T, actual_type_t<T>>;
172 static constexpr bool value = !is_pointer<T>::value &&
181 flecs::on_instantiate::inherit;
184template <
typename ... Components>
186 static constexpr bool value =
sizeof...(Components) != 0 &&
194 static constexpr bool value =
204 flecs::on_instantiate::inherit;
222 if constexpr (is_get_sparse_component<T>::value) {
ecs_entity_t entity_t
Entity type.
ecs_world_t world_t
World type.
constexpr bool is_pair_v
Convenience variable template to check if a type is a pair.
transcribe_cvp_t< remove_reference_t< P >, typename raw_type_t< P >::type > pair_type_t
Get the pair::type type from a pair while preserving cv qualifiers and pointer type.
constexpr bool is_actual_v
Convenience variable template to check if a type is its own actual type.
transcribe_cv_t< remove_reference_t< P >, typename raw_type_t< P >::second > pair_second_t
Get pair::second from a pair while preserving cv qualifiers.
remove_pointer_t< remove_reference_t< T > > raw_type_t
Get the raw type by removing pointer and reference qualifiers.
typename base_type< T >::type base_type_t
Convenience alias for base_type.
typename base_arg_type< T >::type base_arg_type_t
Convenience alias for base_arg_type.
transcribe_cv_t< remove_reference_t< P >, typename raw_type_t< P >::first > pair_first_t
Get pair::first from a pair while preserving cv qualifiers.
const void * ecs_get_id(const ecs_world_t *world, ecs_entity_t entity, ecs_id_t component)
Get an immutable pointer to a component.
void * ecs_get_mut_id(const ecs_world_t *world, ecs_entity_t entity, ecs_id_t component)
Get a mutable pointer to a component.
void * ecs_get_sparse_id(const ecs_world_t *world, ecs_entity_t entity, ecs_id_t component, size_t size)
Get a pointer to a sparse component.
Test if get/get_mut for a component can use ecs_get_sparse_id().
Test if a component is sparse at compile time.
Get the actual type from a regular type or pair.
Get the type without * and & (retains const, which is useful for function args).
Get the type without const, *, and &.
Trait that marks a component as DontFragment at compile time.
Test if a type is the same as its actual type.
Test if a type is a pair.
Trait that assigns an OnInstantiate policy to a component at compile time.
Type that represents a pair.
Second second
The second element type of the pair.
type & operator*()
Dereference operator for mutable access.
pair(const type &v)
Construct pair from a const reference to the storage type.
pair(type &v)
Construct pair from a mutable reference to the storage type.
type * operator->()
Arrow operator for mutable access.
conditional_t<!is_empty< First >::value||is_empty< Second >::value, First, Second > type
The storage type of the pair.
const type & operator*() const
Dereference operator for const access.
First first
The first element type of the pair.
const type * operator->() const
Arrow operator for const access.
Trait that marks a component as Sparse at compile time.
enable_if_t< false==V, int > if_not_t
Convenience enable_if alias for negated conditions.
enable_if_t< V, int > if_t
Convenience enable_if alias using int as default type.
transcribe_cv_t< Src, transcribe_pointer_t< Src, Dst > > transcribe_cvp_t
Apply const, volatile, and pointer from source type to destination type.
transcribe_const_t< Src, transcribe_volatile_t< Src, Dst > > transcribe_cv_t
Apply const and volatile from source type to destination type.