EnTT  3.9.0
component.hpp
1 #ifndef ENTT_ENTITY_COMPONENT_HPP
2 #define ENTT_ENTITY_COMPONENT_HPP
3 
4 #include <type_traits>
5 #include "../config/config.h"
6 
7 namespace entt {
8 
12  static constexpr auto in_place_delete = false;
14  static constexpr auto ignore_if_empty = ENTT_IGNORE_IF_EMPTY;
16  static constexpr auto page_size = ENTT_PACKED_PAGE;
17 };
18 
23 template<typename Type, typename = void>
25  static_assert(std::is_same_v<std::decay_t<Type>, Type>, "Unsupported type");
26 };
27 
32 template<class Type>
33 inline constexpr bool ignore_as_empty_v = component_traits<Type>::ignore_if_empty &&std::is_empty_v<Type>;
34 
35 } // namespace entt
36 
37 #endif
EnTT default namespace.
constexpr bool ignore_as_empty_v
Helper variable template.
Definition: component.hpp:33
Commonly used default traits for all types.
Definition: component.hpp:10
static constexpr auto ignore_if_empty
Empty type optimization, default is ENTT_IGNORE_IF_EMPTY.
Definition: component.hpp:14
static constexpr auto page_size
Page size, default is ENTT_PACKED_PAGE.
Definition: component.hpp:16
static constexpr auto in_place_delete
Pointer stability, default is false.
Definition: component.hpp:12
Common way to access various properties of components.
Definition: component.hpp:24