1#ifndef ENTT_ENTITY_COMPONENT_HPP
2#define ENTT_ENTITY_COMPONENT_HPP
4#include "../config/config.h"
5#include "../core/concepts.hpp"
6#include "../stl/concepts.hpp"
7#include "../stl/cstddef.hpp"
8#include "../stl/type_traits.hpp"
16template<
typename Type>
17struct in_place_delete: stl::bool_constant<!(stl::is_move_constructible_v<Type> && stl::is_move_assignable_v<Type>)> {};
20struct in_place_delete<void>: stl::false_type {};
22template<
typename Type>
23requires Type::in_place_delete
24struct in_place_delete<Type>: stl::true_type {};
26template<
typename Type>
27struct page_size: stl::integral_constant<stl::size_t, !stl::is_empty_v<ENTT_ETO_TYPE(Type)> * ENTT_PACKED_PAGE> {};
30struct page_size<void>: stl::integral_constant<stl::size_t, 0u> {};
32template<
typename Type>
33requires stl::is_convertible_v<
decltype(Type::page_size), stl::size_t>
44template<cvref_unqualified Type,
typename Entity>
54 static constexpr stl::size_t
page_size = internal::page_size<Type>::value;
stl::integral_constant< decltype(Value), Value > integral_constant
Wraps a static constant.
Common way to access various properties of components.
Entity entity_type
Underlying entity identifier.
static constexpr stl::size_t page_size
Page size, default is ENTT_PACKED_PAGE for non-empty types.
static constexpr bool in_place_delete
Pointer stability, default is false.
Type element_type
Element type.