EnTT  3.10.0
Classes | Typedefs | Enumerations | Functions | Variables
entt Namespace Reference

EnTT default namespace. More...

Classes

class  dense_map
 Associative container for key-value pairs with unique keys. More...
 
class  dense_set
 Associative container for unique objects of a given type. More...
 
struct  std_sort
 Function object to wrap std::sort in a class type. More...
 
struct  insertion_sort
 Function object for performing insertion sort. More...
 
struct  radix_sort
 Function object for performing LSD radix sort. More...
 
class  basic_any
 A SBO friendly, type-safe container for single values of any type. More...
 
class  compressed_pair
 A compressed pair. More...
 
struct  enum_as_bitmask
 Enable bitmask support for enum classes. More...
 
struct  enum_as_bitmask< Type, std::void_t< decltype(Type::_entt_enum_as_bitmask)> >
 Enable bitmask support for enum classes. More...
 
class  family
 Dynamic identifier generator. More...
 
class  basic_hashed_string
 Zero overhead unique identifier. More...
 
class  identifier
 Types identifiers. More...
 
struct  input_iterator_pointer
 Helper type to use as pointer with input iterators. More...
 
struct  iterable_adaptor
 Utility class to create an iterable object from a pair of iterators. More...
 
struct  allocation_deleter
 Deleter for allocator-aware unique pointers (waiting for C++20). More...
 
struct  monostate
 Minimal implementation of the monostate pattern. More...
 
struct  type_index
 Type sequential identifier. More...
 
struct  type_hash
 Type hash. More...
 
struct  type_name
 Type name. More...
 
struct  type_info
 Implementation specific information about a type. More...
 
struct  choice_t
 Utility class to disambiguate overloaded functions. More...
 
struct  choice_t< 0 >
 Utility class to disambiguate overloaded functions. More...
 
struct  type_identity
 Identity type trait. More...
 
struct  size_of
 A type-only sizeof wrapper that returns 0 where sizeof complains. More...
 
struct  size_of< Type, std::void_t< decltype(sizeof(Type))> >
 A type-only sizeof wrapper that returns 0 where sizeof complains. More...
 
struct  type_list
 A class to use to push around lists of types, nothing more. More...
 
struct  type_list_element
 Primary template isn't defined on purpose. More...
 
struct  type_list_element< Index, type_list< Type, Other... > >
 Provides compile-time indexed access to the types of a type list. More...
 
struct  type_list_element< 0u, type_list< Type, Other... > >
 Provides compile-time indexed access to the types of a type list. More...
 
struct  type_list_cat
 Primary template isn't defined on purpose. More...
 
struct  type_list_cat<>
 Concatenates multiple type lists. More...
 
struct  type_list_cat< type_list< Type... >, type_list< Other... >, List... >
 Concatenates multiple type lists. More...
 
struct  type_list_cat< type_list< Type... > >
 Concatenates multiple type lists. More...
 
struct  type_list_unique
 Primary template isn't defined on purpose. More...
 
struct  type_list_unique< type_list< Type, Other... > >
 Removes duplicates types from a type list. More...
 
struct  type_list_unique< type_list<> >
 Removes duplicates types from a type list. More...
 
struct  type_list_contains
 Provides the member constant value to true if a type list contains a given type, false otherwise. More...
 
struct  type_list_contains< type_list< Type... >, Other >
 Provides the member constant value to true if a type list contains a given type, false otherwise. More...
 
struct  type_list_diff
 Primary template isn't defined on purpose. More...
 
struct  type_list_diff< type_list< Type... >, type_list< Other... > >
 Computes the difference between two type lists. More...
 
struct  value_list
 A class to use to push around lists of constant values, nothing more. More...
 
struct  value_list_element
 Primary template isn't defined on purpose. More...
 
struct  value_list_element< Index, value_list< Value, Other... > >
 Provides compile-time indexed access to the values of a value list. More...
 
struct  value_list_element< 0u, value_list< Value, Other... > >
 Provides compile-time indexed access to the types of a type list. More...
 
struct  value_list_cat
 Primary template isn't defined on purpose. More...
 
struct  value_list_cat<>
 Concatenates multiple value lists. More...
 
struct  value_list_cat< value_list< Value... >, value_list< Other... >, List... >
 Concatenates multiple value lists. More...
 
struct  value_list_cat< value_list< Value... > >
 Concatenates multiple value lists. More...
 
struct  is_applicable
 Same as std::is_invocable, but with tuples. More...
 
struct  is_applicable< Func, Tuple< Args... > >
 Same as std::is_invocable, but with tuples. More...
 
struct  is_applicable< Func, const Tuple< Args... > >
 Same as std::is_invocable, but with tuples. More...
 
struct  is_applicable_r
 Same as std::is_invocable_r, but with tuples for arguments. More...
 
struct  is_applicable_r< Ret, Func, std::tuple< Args... > >
 Same as std::is_invocable_r, but with tuples for arguments. More...
 
struct  is_complete
 Provides the member constant value to true if a given type is complete, false otherwise. More...
 
struct  is_complete< Type, std::void_t< decltype(sizeof(Type))> >
 Provides the member constant value to true if a given type is complete, false otherwise. More...
 
struct  is_iterator
 Provides the member constant value to true if a given type is an iterator, false otherwise. More...
 
struct  is_iterator< Type, std::enable_if_t<!std::is_same_v< std::remove_const_t< std::remove_pointer_t< Type > >, void > > >
 Provides the member constant value to true if a given type is an iterator, false otherwise. More...
 
struct  is_ebco_eligible
 Provides the member constant value to true if a given type is both an empty and non-final class, false otherwise. More...
 
struct  is_transparent
 Provides the member constant value to true if Type::is_transparent is valid and denotes a type, false otherwise. More...
 
struct  is_transparent< Type, std::void_t< typename Type::is_transparent > >
 Provides the member constant value to true if Type::is_transparent is valid and denotes a type, false otherwise. More...
 
struct  is_equality_comparable
 Provides the member constant value to true if a given type is equality comparable, false otherwise. More...
 
struct  is_equality_comparable< Type, std::void_t< decltype(std::declval< Type >()==std::declval< Type >())> >
 Provides the member constant value to true if a given type is equality comparable, false otherwise. More...
 
struct  constness_as
 Transcribes the constness of a type to another type. More...
 
struct  constness_as< To, const From >
 Transcribes the constness of a type to another type. More...
 
class  member_class
 Extracts the class of a non-static member object or function. More...
 
struct  identity
 Identity function object (waiting for C++20). More...
 
struct  overloaded
 Helper type for visitors. More...
 
struct  y_combinator
 Basic implementation of a y-combinator. More...
 
struct  component_traits
 Common way to access various properties of components. More...
 
class  entt_traits
 Entity traits. More...
 
struct  null_t
 Null object for all identifiers.
More...
 
struct  tombstone_t
 Tombstone object for all identifiers.
More...
 
class  basic_sparse_set
 Basic sparse set implementation. More...
 
class  basic_storage
 Basic storage implementation. More...
 
class  basic_registry
 Fast and reliable entity-component system. More...
 
class  basic_view
 View implementation. More...
 
struct  basic_runtime_view
 Runtime view implementation. More...
 
class  basic_group
 Group. More...
 
class  basic_observer
 Observer. More...
 
class  basic_organizer
 Utility class for creating a static task graph. More...
 
struct  basic_handle
 Non-owning handle to an entity. More...
 
class  basic_snapshot
 Utility class to create snapshots from a registry. More...
 
class  basic_snapshot_loader
 Utility class to restore a snapshot as a whole. More...
 
class  basic_continuous_loader
 Utility class for continuous loading. More...
 
class  basic_group< Entity, owned_t<>, get_t< Get... >, exclude_t< Exclude... > >
 Non-owning group. More...
 
class  basic_group< Entity, owned_t< Owned... >, get_t< Get... >, exclude_t< Exclude... > >
 Owning group. More...
 
struct  as_view
 Converts a registry to a view. More...
 
struct  as_group
 Converts a registry to a group. More...
 
struct  matcher
 Grouping matcher. More...
 
struct  basic_collector
 Collector. More...
 
struct  basic_collector<>
 Collector. More...
 
struct  basic_collector< matcher< type_list< Reject... >, type_list< Require... >, Rule... >, Other... >
 Collector. More...
 
struct  basic_runtime_view< basic_sparse_set< Entity, Allocator > >
 Generic runtime view. More...
 
class  sigh_storage_mixin
 Mixin type used to add signal support to storage types. More...
 
class  basic_storage< Entity, Type, Allocator, std::enable_if_t< ignore_as_empty_v< Type > > >
 Default constructor. More...
 
struct  storage_traits
 Provides a common way to access certain properties of storage types. More...
 
struct  exclude_t
 Alias for exclusion lists. More...
 
struct  get_t
 Alias for lists of observed components. More...
 
struct  owned_t
 Alias for lists of owned components. More...
 
class  basic_view< Entity, get_t< Component... >, exclude_t< Exclude... > >
 Multi component view. More...
 
class  basic_view< Entity, get_t< Component >, exclude_t<>, std::void_t< std::enable_if_t<!component_traits< std::remove_const_t< Component > >::in_place_delete > > >
 Single component view specialization. More...
 
struct  locator
 Service locator, nothing more. More...
 
struct  adl_meta_pointer_like
 Fake ADL based lookup function for meta pointer-like types. More...
 
struct  meta_sequence_container_traits< std::vector< Type, Args... > >
 Meta sequence container traits for std::vectors of any type. More...
 
struct  meta_sequence_container_traits< std::array< Type, N > >
 Meta sequence container traits for std::arrays of any type. More...
 
struct  meta_associative_container_traits< std::map< Key, Value, Args... > >
 Meta associative container traits for std::maps of any type. More...
 
struct  meta_associative_container_traits< std::unordered_map< Key, Value, Args... > >
 Meta associative container traits for std::unordered_maps of any type. More...
 
struct  meta_associative_container_traits< std::set< Key, Args... > >
 Meta associative container traits for std::sets of any type. More...
 
struct  meta_associative_container_traits< std::unordered_set< Key, Args... > >
 Meta associative container traits for std::unordered_sets of any type. More...
 
struct  meta_associative_container_traits< dense_map< Key, Type, Args... > >
 Meta associative container traits for dense_maps of any type. More...
 
struct  meta_associative_container_traits< dense_set< Type, Args... > >
 Meta associative container traits for dense_sets of any type. More...
 
struct  meta_ctx
 Opaque container for a meta context. More...
 
class  meta_factory
 Meta factory to be used for reflection purposes. More...
 
class  meta_factory< Type, Spec... >
 Extended meta factory to be used for reflection purposes. More...
 
class  meta_factory< Type >
 Basic meta factory to be used for reflection purposes. More...
 
class  meta_sequence_container
 Proxy object for sequence containers. More...
 
class  meta_associative_container
 Proxy object for associative containers. More...
 
class  meta_any
 Opaque wrapper for values of any type. More...
 
struct  meta_handle
 Opaque pointers to instances of any type. More...
 
struct  meta_prop
 Opaque wrapper for properties of any type. More...
 
struct  meta_data
 Opaque wrapper for data members. More...
 
struct  meta_func
 Opaque wrapper for member functions. More...
 
class  meta_type
 Opaque wrapper for types. More...
 
struct  is_meta_pointer_like< Type * >
 Makes plain pointers pointer-like types for the meta system. More...
 
struct  is_meta_pointer_like< Type(*)[N]>
 Partial specialization used to reject pointers to arrays. More...
 
struct  is_meta_pointer_like< std::shared_ptr< Type > >
 Makes std::shared_ptrs of any type pointer-like types for the meta system. More...
 
struct  is_meta_pointer_like< std::unique_ptr< Type, Args... > >
 Makes std::unique_ptrs of any type pointer-like types for the meta system. More...
 
struct  as_ref_t
 Empty class type used to request the as ref policy. More...
 
struct  as_cref_t
 Empty class type used to request the as cref policy. More...
 
struct  as_is_t
 Empty class type used to request the as-is policy. More...
 
struct  as_void_t
 Empty class type used to request the as void policy. More...
 
struct  meta_range
 Iterable range to use to iterate all types of meta objects. More...
 
struct  meta_class_template_tag
 Utility class to disambiguate class templates. More...
 
struct  meta_template_traits< Clazz< Args... > >
 General purpose traits class for generating meta template information. More...
 
struct  meta_template_traits
 Traits class template to be specialized to enable support for meta template information. More...
 
struct  meta_sequence_container_traits
 Traits class template to be specialized to enable support for meta sequence containers. More...
 
struct  meta_associative_container_traits
 Traits class template to be specialized to enable support for meta associative containers. More...
 
struct  is_meta_pointer_like
 Provides the member constant value to true if a given type is a pointer-like type from the point of view of the meta system, false otherwise. More...
 
struct  is_meta_pointer_like< const Type >
 Partial specialization to ensure that const pointer-like types are also accepted. More...
 
struct  meta_function_descriptor
 Primary template isn't defined on purpose. More...
 
struct  meta_function_descriptor< Type, Ret(Class::*)(Args...) const >
 Meta function descriptor. More...
 
struct  meta_function_descriptor< Type, Ret(Class::*)(Args...)>
 Meta function descriptor. More...
 
struct  meta_function_descriptor< Type, Ret Class::* >
 Meta function descriptor. More...
 
struct  meta_function_descriptor< Type, Ret(*)(MaybeType, Args...)>
 Meta function descriptor. More...
 
struct  meta_function_descriptor< Type, Ret(*)()>
 Meta function descriptor. More...
 
class  meta_function_helper
 Meta function helper. More...
 
class  basic_poly
 Static polymorphism made simple and within everyone's reach. More...
 
struct  poly_inspector
 Inspector class used to infer the type of the virtual table. More...
 
class  poly_vtable
 Static virtual table factory. More...
 
struct  poly_base
 Poly base class used to inject functionalities into concepts. More...
 
class  process
 Base class for processes. More...
 
struct  process_adaptor
 Adaptor for lambdas and functors to turn them into processes. More...
 
class  scheduler
 Cooperative scheduler for processes. More...
 
class  resource_cache
 Basic cache for resources of any type. More...
 
struct  resource_loader
 Transparent loader for shared resources. More...
 
class  resource
 Basic resource handle. More...
 
struct  connect_arg_t
 Used to wrap a function or a member of a specified type. More...
 
class  delegate
 Basic delegate implementation. More...
 
class  delegate< Ret(Args...)>
 Utility class to use to send around functions and members. More...
 
class  basic_dispatcher
 Basic dispatcher implementation. More...
 
class  emitter
 General purpose event emitter. More...
 
class  sink
 Sink class. More...
 
class  sigh
 Unmanaged signal handler. More...
 
class  sigh< Ret(Args...), Allocator >
 Unmanaged signal handler. More...
 
class  connection
 Connection class. More...
 
struct  scoped_connection
 Scoped connection class. More...
 
class  sink< sigh< Ret(Args...), Allocator > >
 Sink class. More...
 

Typedefs

using id_type = std::uint32_t
 Alias declaration for type identifiers.
 
using any = basic_any<>
 Alias declaration for the most common use case.
 
using hashed_string = basic_hashed_string< char >
 Aliases for common character types.
 
using hashed_wstring = basic_hashed_string< wchar_t >
 Aliases for common character types.
 
template<typename Type >
using type_identity_t = typename type_identity< Type >::type
 Helper type. More...
 
template<typename Type , typename >
using unpack_as_type = Type
 Using declaration to be used to repeat the same type a number of times equal to the size of a given parameter pack. More...
 
template<auto Value>
using integral_constant = std::integral_constant< decltype(Value), Value >
 Wraps a static constant. More...
 
template<id_type Value>
using tag = integral_constant< Value >
 Alias template to facilitate the creation of named values. More...
 
template<std::size_t Index, typename List >
using type_list_element_t = typename type_list_element< Index, List >::type
 Helper type. More...
 
template<typename... List>
using type_list_cat_t = typename type_list_cat< List... >::type
 Helper type. More...
 
template<typename Type >
using type_list_unique_t = typename type_list_unique< Type >::type
 Helper type. More...
 
template<typename... List>
using type_list_diff_t = typename type_list_diff< List... >::type
 Helper type. More...
 
template<typename... List>
using value_list_cat_t = typename value_list_cat< List... >::type
 Helper type. More...
 
template<typename To , typename From >
using constness_as_t = typename constness_as< To, From >::type
 Alias template to facilitate the transcription of the constness. More...
 
template<typename Member >
using member_class_t = typename member_class< Member >::type
 Helper type. More...
 
using sparse_set = basic_sparse_set< entity >
 Alias declaration for the most common use case.
 
template<typename... Args>
using storage = basic_storage< entity, Args... >
 Alias declaration for the most common use case. More...
 
using registry = basic_registry< entity >
 Alias declaration for the most common use case.
 
using observer = basic_observer< entity >
 Alias declaration for the most common use case.
 
using organizer = basic_organizer< entity >
 Alias declaration for the most common use case.
 
using handle = basic_handle< entity >
 Alias declaration for the most common use case.
 
using const_handle = basic_handle< const entity >
 Alias declaration for the most common use case.
 
template<typename... Args>
using handle_view = basic_handle< entity, Args... >
 Alias declaration for the most common use case. More...
 
template<typename... Args>
using const_handle_view = basic_handle< const entity, Args... >
 Alias declaration for the most common use case. More...
 
using snapshot = basic_snapshot< entity >
 Alias declaration for the most common use case.
 
using snapshot_loader = basic_snapshot_loader< entity >
 Alias declaration for the most common use case.
 
using continuous_loader = basic_continuous_loader< entity >
 Alias declaration for the most common use case.
 
template<typename Get , typename Exclude = exclude_t<>>
using view = basic_view< entity, Get, Exclude >
 Alias declaration for the most common use case. More...
 
using runtime_view = basic_runtime_view< sparse_set >
 Alias declaration for the most common use case.
 
template<typename... Args>
using group = basic_group< entity, Args... >
 Alias declaration for the most common use case. More...
 
template<typename Type , typename Candidate >
using meta_function_helper_t = typename meta_function_helper< Type, Candidate >::type
 Helper type. More...
 
template<typename Concept >
using poly = basic_poly< Concept >
 Alias declaration for the most common use case. More...
 
using dispatcher = basic_dispatcher<>
 Alias declaration for the most common use case.
 

Enumerations

enum class  entity : id_type
 Default entity identifier.
 
enum class  deletion_policy : std::uint8_t { swap_and_pop = 0u , in_place = 1u }
 Sparse set deletion policy. More...
 

Functions

template<std::size_t Len, std::size_t Align>
bool operator!= (const basic_any< Len, Align > &lhs, const basic_any< Len, Align > &rhs)
 Checks if two wrappers differ in their content. More...
 
template<typename Type , std::size_t Len, std::size_t Align>
Type any_cast (const basic_any< Len, Align > &data)
 Performs type-safe access to the contained object. More...
 
template<typename Type , std::size_t Len, std::size_t Align>
Type any_cast (basic_any< Len, Align > &data)
 Performs type-safe access to the contained object. More...
 
template<typename Type , std::size_t Len, std::size_t Align>
Type any_cast (basic_any< Len, Align > &&data)
 Performs type-safe access to the contained object. More...
 
template<typename Type , std::size_t Len, std::size_t Align>
const Type * any_cast (const basic_any< Len, Align > *data)
 Performs type-safe access to the contained object. More...
 
template<typename Type , std::size_t Len, std::size_t Align>
Type * any_cast (basic_any< Len, Align > *data)
 Performs type-safe access to the contained object. More...
 
template<typename Type , std::size_t Len = basic_any<>::length, std::size_t Align = basic_any<Len>::alignment, typename... Args>
basic_any< Len, Align > make_any (Args &&...args)
 Constructs a wrapper from a given type, passing it all arguments. More...
 
template<std::size_t Len = basic_any<>::length, std::size_t Align = basic_any<Len>::alignment, typename Type >
basic_any< Len, Align > forward_as_any (Type &&value)
 Forwards its argument and avoids copies for lvalue references. More...
 
template<typename Type , typename Other >
 compressed_pair (Type &&, Other &&) -> compressed_pair< std::decay_t< Type >, std::decay_t< Other >>
 Deduction guide. More...
 
template<typename First , typename Second >
void swap (compressed_pair< First, Second > &lhs, compressed_pair< First, Second > &rhs)
 Swaps two compressed pair objects. More...
 
template<typename Char >
 basic_hashed_string (const Char *str, const std::size_t len) -> basic_hashed_string< Char >
 Deduction guide. More...
 
template<typename Char , std::size_t N>
 basic_hashed_string (const Char(&str)[N]) -> basic_hashed_string< Char >
 Deduction guide. More...
 
template<typename Char >
constexpr bool operator== (const basic_hashed_string< Char > &lhs, const basic_hashed_string< Char > &rhs)
 Compares two hashed strings. More...
 
template<typename Char >
constexpr bool operator!= (const basic_hashed_string< Char > &lhs, const basic_hashed_string< Char > &rhs)
 Compares two hashed strings. More...
 
template<typename Char >
constexpr bool operator< (const basic_hashed_string< Char > &lhs, const basic_hashed_string< Char > &rhs)
 Compares two hashed strings. More...
 
template<typename Char >
constexpr bool operator<= (const basic_hashed_string< Char > &lhs, const basic_hashed_string< Char > &rhs)
 Compares two hashed strings. More...
 
template<typename Char >
constexpr bool operator> (const basic_hashed_string< Char > &lhs, const basic_hashed_string< Char > &rhs)
 Compares two hashed strings. More...
 
template<typename Char >
constexpr bool operator>= (const basic_hashed_string< Char > &lhs, const basic_hashed_string< Char > &rhs)
 Compares two hashed strings. More...
 
constexpr hashed_string operator""_hs (const char *str, std::size_t)
 User defined literal for hashed strings. More...
 
constexpr hashed_wstring operator""_hws (const wchar_t *str, std::size_t)
 User defined literal for hashed wstrings. More...
 
template<typename Type >
constexpr auto to_address (Type &&ptr)
 Unwraps fancy pointers, does nothing otherwise (waiting for C++20). More...
 
template<typename Allocator >
constexpr void propagate_on_container_copy_assignment ([[maybe_unused]] Allocator &lhs, [[maybe_unused]] Allocator &rhs)
 Utility function to design allocation-aware containers. More...
 
template<typename Allocator >
constexpr void propagate_on_container_move_assignment ([[maybe_unused]] Allocator &lhs, [[maybe_unused]] Allocator &rhs)
 Utility function to design allocation-aware containers. More...
 
template<typename Allocator >
constexpr void propagate_on_container_swap ([[maybe_unused]] Allocator &lhs, [[maybe_unused]] Allocator &rhs)
 Utility function to design allocation-aware containers. More...
 
constexpr bool is_power_of_two (const std::size_t value)
 Checks whether a value is a power of two or not. More...
 
constexpr std::size_t next_power_of_two (const std::size_t value)
 Computes the smallest power of two greater than or equal to a value. More...
 
constexpr std::size_t fast_mod (const std::size_t value, const std::size_t mod)
 Fast module utility function (powers of two only). More...
 
template<typename Type , typename Allocator , typename... Args>
auto allocate_unique (Allocator &allocator, Args &&...args)
 Allows std::unique_ptr to use allocators (waiting for C++20). More...
 
template<typename Type , typename Allocator , typename... Args>
constexpr auto uses_allocator_construction_args (const Allocator &allocator, Args &&...args)
 Uses-allocator construction utility (waiting for C++20). More...
 
template<typename Type , typename Allocator , typename... Args>
constexpr Type make_obj_using_allocator (const Allocator &allocator, Args &&...args)
 Uses-allocator construction utility (waiting for C++20). More...
 
template<typename Type , typename Allocator , typename... Args>
constexpr Type * uninitialized_construct_using_allocator (Type *value, const Allocator &allocator, Args &&...args)
 Uses-allocator construction utility (waiting for C++20). More...
 
template<typename Type >
constexpr decltype(auto) unwrap_tuple (Type &&value)
 Utility function to unwrap tuples of a single element. More...
 
constexpr bool operator== (const type_info &lhs, const type_info &rhs)
 Compares the contents of two type info objects. More...
 
constexpr bool operator!= (const type_info &lhs, const type_info &rhs)
 Compares the contents of two type info objects. More...
 
constexpr bool operator< (const type_info &lhs, const type_info &rhs)
 Compares two type info objects. More...
 
constexpr bool operator<= (const type_info &lhs, const type_info &rhs)
 Compares two type info objects. More...
 
constexpr bool operator> (const type_info &lhs, const type_info &rhs)
 Compares two type info objects. More...
 
constexpr bool operator>= (const type_info &lhs, const type_info &rhs)
 Compares two type info objects. More...
 
template<typename Type >
const type_infotype_id ()
 Returns the type info object associated to a given type. More...
 
template<typename Type >
const type_infotype_id (Type &&)
 Returns the type info object associated to a given type. More...
 
template<typename... Type, typename... Other>
constexpr type_list< Type..., Other... > operator+ (type_list< Type... >, type_list< Other... >)
 Concatenates multiple type lists. More...
 
template<auto... Value, auto... Other>
constexpr value_list< Value..., Other... > operator+ (value_list< Value... >, value_list< Other... >)
 Concatenates multiple value lists. More...
 
template<typename Type , typename Class >
constexpr auto overload (Type Class::*member)
 Constant utility to disambiguate overloaded members of a class. More...
 
template<typename Func >
constexpr auto overload (Func *func)
 Constant utility to disambiguate overloaded functions. More...
 
template<class... Func>
 overloaded (Func...) -> overloaded< Func... >
 Deduction guide. More...
 
template<typename Entity >
constexpr entt_traits< Entity >::entity_type to_integral (const Entity value)
 Converts an entity to its underlying type. More...
 
template<typename Entity >
constexpr entt_traits< Entity >::entity_type to_entity (const Entity value)
 Returns the entity part once converted to the underlying type. More...
 
template<typename Entity >
constexpr entt_traits< Entity >::version_type to_version (const Entity value)
 Returns the version part once converted to the underlying type. More...
 
template<typename Entity >
constexpr bool operator== (const Entity entity, const null_t other)
 Compares a null object and an identifier of any type. More...
 
template<typename Entity >
constexpr bool operator!= (const Entity entity, const null_t other)
 Compares a null object and an identifier of any type. More...
 
template<typename Entity >
constexpr bool operator== (const Entity entity, const tombstone_t other)
 Compares a tombstone object and an identifier of any type. More...
 
template<typename Entity >
constexpr bool operator!= (const Entity entity, const tombstone_t other)
 Compares a tombstone object and an identifier of any type. More...
 
template<typename... Args, typename... Other>
bool operator== (const basic_handle< Args... > &lhs, const basic_handle< Other... > &rhs)
 Compares two handles. More...
 
template<typename... Args, typename... Other>
bool operator!= (const basic_handle< Args... > &lhs, const basic_handle< Other... > &rhs)
 Compares two handles. More...
 
template<typename Entity >
 basic_handle (basic_registry< Entity > &, Entity) -> basic_handle< Entity >
 Deduction guide. More...
 
template<typename Entity >
 basic_handle (const basic_registry< Entity > &, Entity) -> basic_handle< const Entity >
 Deduction guide. More...
 
template<typename Entity >
 as_view (basic_registry< Entity > &) -> as_view< Entity >
 Deduction guide. More...
 
template<typename Entity >
 as_view (const basic_registry< Entity > &) -> as_view< const Entity >
 Deduction guide. More...
 
template<typename Entity >
 as_group (basic_registry< Entity > &) -> as_group< Entity >
 Deduction guide. More...
 
template<typename Entity >
 as_group (const basic_registry< Entity > &) -> as_group< const Entity >
 Deduction guide. More...
 
template<auto Member, typename Entity = entity>
void invoke (basic_registry< Entity > &reg, const Entity entt)
 Helper to create a listener that directly invokes a member function. More...
 
template<typename Entity , typename Component >
Entity to_entity (const basic_registry< Entity > &reg, const Component &instance)
 Returns the entity associated with a given component. More...
 
template<typename... Storage>
 basic_view (Storage &...storage) -> basic_view< std::common_type_t< typename Storage::entity_type... >, get_t< constness_as_t< typename Storage::value_type, Storage >... >, exclude_t<>>
 Deduction guide. More...
 
template<typename Type >
decltype(auto) dereference_meta_pointer_like (const Type &value)
 ADL based lookup function for dereferencing meta pointer-like types. More...
 
template<typename Type >
auto meta ()
 Utility function to use for reflection. More...
 
void meta_reset (const id_type id)
 Resets a type and all its parts. More...
 
template<typename Type >
void meta_reset ()
 Resets a type and all its parts. More...
 
bool operator!= (const meta_any &lhs, const meta_any &rhs)
 Checks if two wrappers differ in their content. More...
 
template<typename Type , typename... Args>
meta_any make_meta (Args &&...args)
 Constructs a wrapper from a given type, passing it all arguments. More...
 
template<typename Type >
meta_any forward_as_meta (Type &&value)
 Forwards its argument and avoids copies for lvalue references. More...
 
bool operator!= (const meta_type &lhs, const meta_type &rhs)
 Checks if two objects refer to the same type. More...
 
template<typename Type >
meta_type resolve ()
 Returns the meta type associated with a given type. More...
 
meta_type resolve (const id_type id)
 Returns the meta type associated with a given identifier, if any. More...
 
meta_type resolve (const type_info &info)
 Returns the meta type associated with a given type info object. More...
 
template<typename Policy = as_is_t, typename Type >
meta_any meta_dispatch ([[maybe_unused]] Type &&value)
 Wraps a value depending on the given policy. More...
 
template<typename Type , auto Data>
bool meta_setter ([[maybe_unused]] meta_handle instance, [[maybe_unused]] meta_any value)
 Sets the value of a given variable. More...
 
template<typename Type , auto Data, typename Policy = as_is_t>
meta_any meta_getter ([[maybe_unused]] meta_handle instance)
 Gets the value of a given variable. More...
 
template<typename Type , typename Policy = as_is_t, typename Candidate >
meta_any meta_invoke ([[maybe_unused]] meta_handle instance, Candidate &&candidate, [[maybe_unused]] meta_any *const args)
 Tries to invoke an object given a list of erased parameters. More...
 
template<typename Type , auto Candidate, typename Policy = as_is_t>
meta_any meta_invoke (meta_handle instance, meta_any *const args)
 Tries to invoke a function given a list of erased parameters. More...
 
template<typename Type , typename... Args>
meta_any meta_construct (meta_any *const args)
 Tries to construct an instance given a list of erased parameters. More...
 
template<typename Type , typename Policy = as_is_t, typename Candidate >
meta_any meta_construct (Candidate &&candidate, meta_any *const args)
 Tries to construct an instance given a list of erased parameters. More...
 
template<typename Type , auto Candidate, typename Policy = as_is_t>
meta_any meta_construct (meta_any *const args)
 Tries to construct an instance given a list of erased parameters. More...
 
template<std::size_t Member, typename Poly , typename... Args>
decltype(auto) poly_call (Poly &&self, Args &&...args)
 Shortcut for calling poly_base<Type>invoke. More...
 
template<typename Res , typename Other >
bool operator== (const resource< Res > &lhs, const resource< Other > &rhs)
 Compares two handles. More...
 
template<typename ILhs , typename IRhs >
bool operator!= (const resource< ILhs > &lhs, const resource< IRhs > &rhs)
 Compares two handles. More...
 
template<typename Ret , typename... Args>
bool operator!= (const delegate< Ret(Args...)> &lhs, const delegate< Ret(Args...)> &rhs)
 Compares the contents of two delegates. More...
 
template<auto Candidate>
 delegate (connect_arg_t< Candidate >) -> delegate< std::remove_pointer_t< internal::function_pointer_t< decltype(Candidate)>>>
 Deduction guide. More...
 
template<auto Candidate, typename Type >
 delegate (connect_arg_t< Candidate >, Type &&) -> delegate< std::remove_pointer_t< internal::function_pointer_t< decltype(Candidate), Type >>>
 Deduction guide. More...
 
template<typename Ret , typename... Args>
 delegate (Ret(*)(const void *, Args...), const void *=nullptr) -> delegate< Ret(Args...)>
 Deduction guide. More...
 
template<typename Ret , typename... Args, typename Allocator >
 sink (sigh< Ret(Args...), Allocator > &) -> sink< sigh< Ret(Args...), Allocator >>
 Deduction guide. More...
 

Variables

template<typename Type >
constexpr bool enum_as_bitmask_v = enum_as_bitmask<Type>::value
 Helper variable template. More...
 
template<id_type Value>
monostate< Value > monostate_v = {}
 Helper variable template. More...
 
template<std::size_t N>
constexpr choice_t< N > choice {}
 Variable template for the choice trick. More...
 
template<typename Type >
constexpr std::size_t size_of_v = size_of<Type>::value
 Helper variable template. More...
 
template<auto Value, typename >
constexpr auto unpack_as_value = Value
 Helper variable template to be used to repeat the same value a number of times equal to the size of a given parameter pack. More...
 
template<typename List , typename Type >
constexpr bool type_list_contains_v = type_list_contains<List, Type>::value
 Helper variable template. More...
 
template<std::size_t Index, typename List >
constexpr auto value_list_element_v = value_list_element<Index, List>::value
 Helper type. More...
 
template<typename Func , typename Args >
constexpr bool is_applicable_v = is_applicable<Func, Args>::value
 Helper variable template. More...
 
template<typename Ret , typename Func , typename Args >
constexpr bool is_applicable_r_v = is_applicable_r<Ret, Func, Args>::value
 Helper variable template. More...
 
template<typename Type >
constexpr bool is_complete_v = is_complete<Type>::value
 Helper variable template. More...
 
template<typename Type >
constexpr bool is_iterator_v = is_iterator<Type>::value
 Helper variable template. More...
 
template<typename Type >
constexpr bool is_ebco_eligible_v = is_ebco_eligible<Type>::value
 Helper variable template. More...
 
template<typename Type >
constexpr bool is_transparent_v = is_transparent<Type>::value
 Helper variable template. More...
 
template<typename Type >
constexpr bool is_equality_comparable_v = is_equality_comparable<Type>::value
 Helper variable template. More...
 
template<class Type >
constexpr bool ignore_as_empty_v = (component_traits<Type>::page_size == 0u)
 Helper variable template. More...
 
constexpr null_t null {}
 Compile-time constant for null entities. More...
 
constexpr tombstone_t tombstone {}
 Compile-time constant for tombstone entities. More...
 
constexpr basic_collector collector {}
 Variable template used to ease the definition of collectors.
 
template<typename... Type>
constexpr exclude_t< Type... > exclude {}
 Variable template for exclusion lists. More...
 
template<typename... Type>
constexpr get_t< Type... > get {}
 Variable template for lists of observed components. More...
 
template<typename... Type>
constexpr owned_t< Type... > owned {}
 Variable template for lists of owned components. More...
 
template<typename Type >
constexpr auto is_meta_pointer_like_v = is_meta_pointer_like<Type>::value
 Helper variable template. More...
 
template<auto Func>
constexpr connect_arg_t< Func > connect_arg {}
 Constant of type connect_arg_t used to disambiguate calls.
 

Detailed Description

EnTT default namespace.

Typedef Documentation

◆ const_handle_view

template<typename... Args>
using entt::const_handle_view = typedef basic_handle<const entity, Args...>

Alias declaration for the most common use case.

Template Parameters
ArgsOther template parameters.

Definition at line 86 of file fwd.hpp.

◆ constness_as_t

template<typename To , typename From >
using entt::constness_as_t = typedef typename constness_as<To, From>::type

Alias template to facilitate the transcription of the constness.

Template Parameters
ToThe type to which to transcribe the constness.
FromThe type from which to transcribe the constness.

Definition at line 618 of file type_traits.hpp.

◆ group

template<typename... Args>
using entt::group = typedef basic_group<entity, Args...>

Alias declaration for the most common use case.

Template Parameters
ArgsOther template parameters.

Definition at line 113 of file fwd.hpp.

◆ handle_view

template<typename... Args>
using entt::handle_view = typedef basic_handle<entity, Args...>

Alias declaration for the most common use case.

Template Parameters
ArgsOther template parameters.

Definition at line 79 of file fwd.hpp.

◆ integral_constant

template<auto Value>
using entt::integral_constant = typedef std::integral_constant<decltype(Value), Value>

Wraps a static constant.

Template Parameters
ValueA static constant.

Definition at line 96 of file type_traits.hpp.

◆ member_class_t

template<typename Member >
using entt::member_class_t = typedef typename member_class<Member>::type

Helper type.

Template Parameters
MemberA pointer to a non-static member object or function.

Definition at line 647 of file type_traits.hpp.

◆ meta_function_helper_t

template<typename Type , typename Candidate >
using entt::meta_function_helper_t = typedef typename meta_function_helper<Type, Candidate>::type

Helper type.

Template Parameters
TypeReflected type to which the meta function is associated.
CandidateThe actual function to associate with the reflected type.

Definition at line 154 of file utility.hpp.

◆ poly

template<typename Concept >
using entt::poly = typedef basic_poly<Concept>

Alias declaration for the most common use case.

Template Parameters
ConceptConcept descriptor.

Definition at line 17 of file fwd.hpp.

◆ storage

template<typename... Args>
using entt::storage = typedef basic_storage<entity, Args...>

Alias declaration for the most common use case.

Template Parameters
ArgsOther template parameters.

Definition at line 57 of file fwd.hpp.

◆ tag

template<id_type Value>
using entt::tag = typedef integral_constant<Value>

Alias template to facilitate the creation of named values.

Template Parameters
ValueA constant value at least convertible to id_type.

Definition at line 103 of file type_traits.hpp.

◆ type_identity_t

template<typename Type >
using entt::type_identity_t = typedef typename type_identity<Type>::type

Helper type.

Template Parameters
TypeA type.

Definition at line 53 of file type_traits.hpp.

◆ type_list_cat_t

template<typename... List>
using entt::type_list_cat_t = typedef typename type_list_cat<List...>::type

Helper type.

Template Parameters
ListType lists to concatenate.

Definition at line 199 of file type_traits.hpp.

◆ type_list_diff_t

template<typename... List>
using entt::type_list_diff_t = typedef typename type_list_diff<List...>::type

Helper type.

Template Parameters
ListType lists between which to compute the difference.

Definition at line 278 of file type_traits.hpp.

◆ type_list_element_t

template<std::size_t Index, typename List >
using entt::type_list_element_t = typedef typename type_list_element<Index, List>::type

Helper type.

Template Parameters
IndexIndex of the type to return.
ListType list to search into.

Definition at line 148 of file type_traits.hpp.

◆ type_list_unique_t

template<typename Type >
using entt::type_list_unique_t = typedef typename type_list_unique<Type>::type

Helper type.

Template Parameters
TypeA type list.

Definition at line 231 of file type_traits.hpp.

◆ unpack_as_type

template<typename Type , typename >
using entt::unpack_as_type = typedef Type

Using declaration to be used to repeat the same type a number of times equal to the size of a given parameter pack.

Template Parameters
TypeA type to repeat.

Definition at line 81 of file type_traits.hpp.

◆ value_list_cat_t

template<typename... List>
using entt::value_list_cat_t = typedef typename value_list_cat<List...>::type

Helper type.

Template Parameters
ListValue lists to concatenate.

Definition at line 374 of file type_traits.hpp.

◆ view

template<typename Get , typename Exclude = exclude_t<>>
using entt::view = typedef basic_view<entity, Get, Exclude>

Alias declaration for the most common use case.

Template Parameters
GetTypes of components iterated by the view.
ExcludeTypes of components used to filter the view.

Definition at line 103 of file fwd.hpp.

Enumeration Type Documentation

◆ deletion_policy

enum entt::deletion_policy : std::uint8_t
strong

Sparse set deletion policy.

Enumerator
swap_and_pop 

Swap-and-pop deletion policy.

in_place 

In-place deletion policy.

Definition at line 143 of file sparse_set.hpp.

Function Documentation

◆ allocate_unique()

template<typename Type , typename Allocator , typename... Args>
auto entt::allocate_unique ( Allocator &  allocator,
Args &&...  args 
)

Allows std::unique_ptr to use allocators (waiting for C++20).

Template Parameters
TypeType of object to allocate for and to construct.
AllocatorType of allocator used to manage memory and elements.
ArgsTypes of arguments to use to construct the object.
Parameters
allocatorThe allocator to use.
argsParameters to use to construct the object.
Returns
A properly initialized unique pointer with a custom deleter.

Definition at line 146 of file memory.hpp.

◆ any_cast() [1/5]

template<typename Type , std::size_t Len, std::size_t Align>
Type entt::any_cast ( basic_any< Len, Align > &&  data)

Performs type-safe access to the contained object.

Template Parameters
TypeType to which conversion is required.
LenSize of the storage reserved for the small buffer optimization.
AlignAlignment requirement.
Parameters
dataTarget any object.
Returns
The element converted to the requested type.

Definition at line 432 of file any.hpp.

◆ any_cast() [2/5]

template<typename Type , std::size_t Len, std::size_t Align>
Type entt::any_cast ( basic_any< Len, Align > &  data)

Performs type-safe access to the contained object.

Template Parameters
TypeType to which conversion is required.
LenSize of the storage reserved for the small buffer optimization.
AlignAlignment requirement.
Parameters
dataTarget any object.
Returns
The element converted to the requested type.

Definition at line 423 of file any.hpp.

◆ any_cast() [3/5]

template<typename Type , std::size_t Len, std::size_t Align>
Type* entt::any_cast ( basic_any< Len, Align > *  data)

Performs type-safe access to the contained object.

Template Parameters
TypeType to which conversion is required.
LenSize of the storage reserved for the small buffer optimization.
AlignAlignment requirement.
Parameters
dataTarget any object.
Returns
The element converted to the requested type.

Definition at line 455 of file any.hpp.

◆ any_cast() [4/5]

template<typename Type , std::size_t Len, std::size_t Align>
Type entt::any_cast ( const basic_any< Len, Align > &  data)

Performs type-safe access to the contained object.

Template Parameters
TypeType to which conversion is required.
LenSize of the storage reserved for the small buffer optimization.
AlignAlignment requirement.
Parameters
dataTarget any object.
Returns
The element converted to the requested type.

Definition at line 415 of file any.hpp.

◆ any_cast() [5/5]

template<typename Type , std::size_t Len, std::size_t Align>
const Type* entt::any_cast ( const basic_any< Len, Align > *  data)

Performs type-safe access to the contained object.

Template Parameters
TypeType to which conversion is required.
LenSize of the storage reserved for the small buffer optimization.
AlignAlignment requirement.
Parameters
dataTarget any object.
Returns
The element converted to the requested type.

Definition at line 448 of file any.hpp.

◆ as_group() [1/2]

template<typename Entity >
entt::as_group ( basic_registry< Entity > &  ) -> as_group< Entity >

Deduction guide.

Template Parameters
EntityA valid entity type (see entt_traits for more details).

◆ as_group() [2/2]

template<typename Entity >
entt::as_group ( const basic_registry< Entity > &  ) -> as_group< const Entity >

Deduction guide.

Template Parameters
EntityA valid entity type (see entt_traits for more details).

◆ as_view() [1/2]

template<typename Entity >
entt::as_view ( basic_registry< Entity > &  ) -> as_view< Entity >

Deduction guide.

Template Parameters
EntityA valid entity type (see entt_traits for more details).

◆ as_view() [2/2]

template<typename Entity >
entt::as_view ( const basic_registry< Entity > &  ) -> as_view< const Entity >

Deduction guide.

Template Parameters
EntityA valid entity type (see entt_traits for more details).

◆ basic_handle() [1/2]

template<typename Entity >
entt::basic_handle ( basic_registry< Entity > &  ,
Entity   
) -> basic_handle< Entity >

Deduction guide.

Template Parameters
EntityA valid entity type (see entt_traits for more details).

◆ basic_handle() [2/2]

template<typename Entity >
entt::basic_handle ( const basic_registry< Entity > &  ,
Entity   
) -> basic_handle< const Entity >

Deduction guide.

Template Parameters
EntityA valid entity type (see entt_traits for more details).

◆ basic_hashed_string() [1/2]

template<typename Char >
entt::basic_hashed_string ( const Char *  str,
const std::size_t  len 
) -> basic_hashed_string< Char >

Deduction guide.

Template Parameters
CharCharacter type.
Parameters
strHuman-readable identifier.
lenLength of the string to hash.

◆ basic_hashed_string() [2/2]

template<typename Char , std::size_t N>
entt::basic_hashed_string ( const Char(&)  str[N]) -> basic_hashed_string< Char >

Deduction guide.

Template Parameters
CharCharacter type.
NNumber of characters of the identifier.
Parameters
strHuman-readable identifier.

◆ basic_view()

template<typename... Storage>
entt::basic_view ( Storage &...  storage) -> basic_view< std::common_type_t< typename Storage::entity_type... >, get_t< constness_as_t< typename Storage::value_type, Storage >... >, exclude_t<>>

Deduction guide.

Template Parameters
StorageType of storage classes used to create the view.
Parameters
storageThe storage for the types to iterate.

◆ compressed_pair()

template<typename Type , typename Other >
entt::compressed_pair ( Type &&  ,
Other &&   
) -> compressed_pair< std::decay_t< Type >, std::decay_t< Other >>

Deduction guide.

Template Parameters
TypeType of value to use to initialize the first element.
OtherType of value to use to initialize the second element.

◆ delegate() [1/3]

template<auto Candidate>
entt::delegate ( connect_arg_t< Candidate >  ) -> delegate< std::remove_pointer_t< internal::function_pointer_t< decltype(Candidate)>>>

Deduction guide.

Template Parameters
CandidateFunction or member to connect to the delegate.

◆ delegate() [2/3]

template<auto Candidate, typename Type >
entt::delegate ( connect_arg_t< Candidate >  ,
Type &&   
) -> delegate< std::remove_pointer_t< internal::function_pointer_t< decltype(Candidate), Type >>>

Deduction guide.

Template Parameters
CandidateFunction or member to connect to the delegate.
TypeType of class or type of payload.

◆ delegate() [3/3]

template<typename Ret , typename... Args>
entt::delegate ( Ret(*)(const void *, Args...)  ,
const void *  = nullptr 
) -> delegate< Ret(Args...)>

Deduction guide.

Template Parameters
RetReturn type of a function type.
ArgsTypes of arguments of a function type.

◆ dereference_meta_pointer_like()

template<typename Type >
decltype(auto) entt::dereference_meta_pointer_like ( const Type &  value)

ADL based lookup function for dereferencing meta pointer-like types.

Template Parameters
TypeElement type.
Parameters
valueA pointer-like object.
Returns
The value returned from the dereferenced pointer.

Definition at line 13 of file adl_pointer.hpp.

◆ fast_mod()

constexpr std::size_t entt::fast_mod ( const std::size_t  value,
const std::size_t  mod 
)
inlineconstexpr

Fast module utility function (powers of two only).

Parameters
valueA value for which to calculate the modulus.
modModulus, it must be a power of two.
Returns
The common remainder.

Definition at line 102 of file memory.hpp.

◆ forward_as_any()

template<std::size_t Len = basic_any<>::length, std::size_t Align = basic_any<Len>::alignment, typename Type >
basic_any<Len, Align> entt::forward_as_any ( Type &&  value)

Forwards its argument and avoids copies for lvalue references.

Template Parameters
LenSize of the storage reserved for the small buffer optimization.
AlignOptional alignment requirement.
TypeType of argument to use to construct the new instance.
Parameters
valueParameter to use to construct the instance.
Returns
A properly initialized and not necessarily owning wrapper.

Definition at line 484 of file any.hpp.

◆ forward_as_meta()

template<typename Type >
meta_any entt::forward_as_meta ( Type &&  value)

Forwards its argument and avoids copies for lvalue references.

Template Parameters
TypeType of argument to use to construct the new instance.
Parameters
valueParameter to use to construct the instance.
Returns
A properly initialized and not necessarily owning wrapper.

Definition at line 600 of file meta.hpp.

◆ invoke()

template<auto Member, typename Entity = entity>
void entt::invoke ( basic_registry< Entity > &  reg,
const Entity  entt 
)

Helper to create a listener that directly invokes a member function.

Template Parameters
MemberMember function to invoke on a component of the given type.
EntityA valid entity type (see entt_traits for more details).
Parameters
regA registry that contains the given entity and its components.
enttEntity from which to get the component.

Definition at line 119 of file helper.hpp.

◆ is_power_of_two()

constexpr bool entt::is_power_of_two ( const std::size_t  value)
inlineconstexpr

Checks whether a value is a power of two or not.

Parameters
valueA value that may or may not be a power of two.
Returns
True if the value is a power of two, false otherwise.

Definition at line 76 of file memory.hpp.

◆ make_any()

template<typename Type , std::size_t Len = basic_any<>::length, std::size_t Align = basic_any<Len>::alignment, typename... Args>
basic_any<Len, Align> entt::make_any ( Args &&...  args)

Constructs a wrapper from a given type, passing it all arguments.

Template Parameters
TypeType of object to use to initialize the wrapper.
LenSize of the storage reserved for the small buffer optimization.
AlignOptional alignment requirement.
ArgsTypes of arguments to use to construct the new instance.
Parameters
argsParameters to use to construct the instance.
Returns
A properly initialized wrapper for an object of the given type.

Definition at line 471 of file any.hpp.

◆ make_meta()

template<typename Type , typename... Args>
meta_any entt::make_meta ( Args &&...  args)

Constructs a wrapper from a given type, passing it all arguments.

Template Parameters
TypeType of object to use to initialize the wrapper.
ArgsTypes of arguments to use to construct the new instance.
Parameters
argsParameters to use to construct the instance.
Returns
A properly initialized wrapper for an object of the given type.

Definition at line 589 of file meta.hpp.

◆ make_obj_using_allocator()

template<typename Type , typename Allocator , typename... Args>
constexpr Type entt::make_obj_using_allocator ( const Allocator &  allocator,
Args &&...  args 
)
constexpr

Uses-allocator construction utility (waiting for C++20).

Primarily intended for internal use. Creates an object of a given type by means of uses-allocator construction.

Template Parameters
TypeType of object to create.
AllocatorType of allocator used to manage memory and elements.
ArgsTypes of arguments to use to construct the object.
Parameters
allocatorThe allocator to use.
argsParameters to use to construct the object.
Returns
A newly created object of the given type.

Definition at line 264 of file memory.hpp.

◆ meta()

template<typename Type >
auto entt::meta ( )

Utility function to use for reflection.

This is the point from which everything starts.
By invoking this function with a type that is not yet reflected, a meta type is created to which it will be possible to attach meta objects through a dedicated factory.

Template Parameters
TypeType to reflect.
Returns
A meta factory for the given type.

Definition at line 580 of file factory.hpp.

◆ meta_construct() [1/3]

template<typename Type , typename Policy = as_is_t, typename Candidate >
meta_any entt::meta_construct ( Candidate &&  candidate,
meta_any *const  args 
)

Tries to construct an instance given a list of erased parameters.

Template Parameters
TypeReflected type to which the object to invoke is associated.
PolicyOptional policy (no policy set by default).
CandidateThe type of the actual object to invoke.
Parameters
argsParameters to use to invoke the object.
candidateThe actual object to invoke.
Returns
A meta any containing the returned value, if any.

Definition at line 373 of file utility.hpp.

◆ meta_construct() [2/3]

template<typename Type , typename... Args>
meta_any entt::meta_construct ( meta_any *const  args)

Tries to construct an instance given a list of erased parameters.

Template Parameters
TypeActual type of the instance to construct.
ArgsTypes of arguments expected.
Parameters
argsParameters to use to construct the instance.
Returns
A meta any containing the new instance, if any.

Definition at line 359 of file utility.hpp.

◆ meta_construct() [3/3]

template<typename Type , auto Candidate, typename Policy = as_is_t>
meta_any entt::meta_construct ( meta_any *const  args)

Tries to construct an instance given a list of erased parameters.

Template Parameters
TypeReflected type to which the function is associated.
CandidateThe actual function to invoke.
PolicyOptional policy (no policy set by default).
Parameters
argsParameters to use to invoke the function.
Returns
A meta any containing the returned value, if any.

Definition at line 390 of file utility.hpp.

◆ meta_dispatch()

template<typename Policy = as_is_t, typename Type >
meta_any entt::meta_dispatch ( [[maybe_unused] ] Type &&  value)

Wraps a value depending on the given policy.

Template Parameters
PolicyOptional policy (no policy set by default).
TypeType of value to wrap.
Parameters
valueValue to wrap.
Returns
A meta any containing the returned value, if any.

Definition at line 164 of file utility.hpp.

◆ meta_getter()

template<typename Type , auto Data, typename Policy = as_is_t>
meta_any entt::meta_getter ( [[maybe_unused] ] meta_handle  instance)

Gets the value of a given variable.

Template Parameters
TypeReflected type to which the variable is associated.
DataThe actual variable to get.
PolicyOptional policy (no policy set by default).
Parameters
instanceAn opaque instance of the underlying type, if required.
Returns
A meta any containing the value of the underlying variable.

Definition at line 240 of file utility.hpp.

◆ meta_invoke() [1/2]

template<typename Type , typename Policy = as_is_t, typename Candidate >
meta_any entt::meta_invoke ( [[maybe_unused] ] meta_handle  instance,
Candidate &&  candidate,
[[maybe_unused] ] meta_any *const  args 
)

Tries to invoke an object given a list of erased parameters.

Template Parameters
TypeReflected type to which the object to invoke is associated.
PolicyOptional policy (no policy set by default).
CandidateThe type of the actual object to invoke.
Parameters
instanceAn opaque instance of the underlying type, if required.
candidateThe actual object to invoke.
argsParameters to use to invoke the object.
Returns
A meta any containing the returned value, if any.

Definition at line 333 of file utility.hpp.

◆ meta_invoke() [2/2]

template<typename Type , auto Candidate, typename Policy = as_is_t>
meta_any entt::meta_invoke ( meta_handle  instance,
meta_any *const  args 
)

Tries to invoke a function given a list of erased parameters.

Template Parameters
TypeReflected type to which the function is associated.
CandidateThe actual function to invoke.
PolicyOptional policy (no policy set by default).
Parameters
instanceAn opaque instance of the underlying type, if required.
argsParameters to use to invoke the function.
Returns
A meta any containing the returned value, if any.

Definition at line 347 of file utility.hpp.

◆ meta_reset() [1/2]

template<typename Type >
void entt::meta_reset ( )
inline

Resets a type and all its parts.

Resets all searchable types.

See also
meta_reset
Template Parameters
TypeType to reset.
See also
meta_reset

Definition at line 633 of file factory.hpp.

◆ meta_reset() [2/2]

void entt::meta_reset ( const id_type  id)
inline

Resets a type and all its parts.

Resets a type and all its data members, member functions and properties, as well as its constructors, destructors and conversion functions if any.
Base classes aren't reset but the link between the two types is removed.

The type is also removed from the list of searchable types.

Parameters
idUnique identifier.

Definition at line 597 of file factory.hpp.

◆ meta_setter()

template<typename Type , auto Data>
bool entt::meta_setter ( [[maybe_unused] ] meta_handle  instance,
[[maybe_unused] ] meta_any  value 
)

Sets the value of a given variable.

Template Parameters
TypeReflected type to which the variable is associated.
DataThe actual variable to set.
Parameters
instanceAn opaque instance of the underlying type, if required.
valueParameter to use to set the variable.
Returns
True in case of success, false otherwise.

Definition at line 197 of file utility.hpp.

◆ next_power_of_two()

constexpr std::size_t entt::next_power_of_two ( const std::size_t  value)
inlineconstexpr

Computes the smallest power of two greater than or equal to a value.

Parameters
valueThe value to use.
Returns
The smallest power of two greater than or equal to the given value.

Definition at line 85 of file memory.hpp.

◆ operator!=() [1/10]

template<std::size_t Len, std::size_t Align>
bool entt::operator!= ( const basic_any< Len, Align > &  lhs,
const basic_any< Len, Align > &  rhs 
)
inline

Checks if two wrappers differ in their content.

Template Parameters
LenSize of the storage reserved for the small buffer optimization.
AlignAlignment requirement.
Parameters
lhsA wrapper, either empty or not.
rhsA wrapper, either empty or not.
Returns
True if the two wrappers differ in their content, false otherwise.

Definition at line 402 of file any.hpp.

◆ operator!=() [2/10]

template<typename... Args, typename... Other>
bool entt::operator!= ( const basic_handle< Args... > &  lhs,
const basic_handle< Other... > &  rhs 
)

Compares two handles.

Template Parameters
ArgsScope of the first handle.
OtherScope of the second handle.
Parameters
lhsA valid handle.
rhsA valid handle.
Returns
False if both handles refer to the same registry and the same entity, true otherwise.

Definition at line 320 of file handle.hpp.

◆ operator!=() [3/10]

template<typename Char >
constexpr bool entt::operator!= ( const basic_hashed_string< Char > &  lhs,
const basic_hashed_string< Char > &  rhs 
)
constexpr

Compares two hashed strings.

Template Parameters
CharCharacter type.
Parameters
lhsA valid hashed string.
rhsA valid hashed string.
Returns
True if the two hashed strings differ, false otherwise.

Definition at line 248 of file hashed_string.hpp.

◆ operator!=() [4/10]

template<typename Ret , typename... Args>
bool entt::operator!= ( const delegate< Ret(Args...)> &  lhs,
const delegate< Ret(Args...)> &  rhs 
)

Compares the contents of two delegates.

Template Parameters
RetReturn type of a function type.
ArgsTypes of arguments of a function type.
Parameters
lhsA valid delegate object.
rhsA valid delegate object.
Returns
True if the two contents differ, false otherwise.

Definition at line 311 of file delegate.hpp.

◆ operator!=() [5/10]

template<typename Entity >
constexpr bool entt::operator!= ( const Entity  entity,
const null_t  other 
)
constexpr

Compares a null object and an identifier of any type.

Template Parameters
EntityType of identifier.
Parameters
entityIdentifier with which to compare.
otherA null object yet to be converted.
Returns
True if the two elements differ, false otherwise.

Definition at line 236 of file entity.hpp.

◆ operator!=() [6/10]

template<typename Entity >
constexpr bool entt::operator!= ( const Entity  entity,
const tombstone_t  other 
)
constexpr

Compares a tombstone object and an identifier of any type.

Template Parameters
EntityType of identifier.
Parameters
entityIdentifier with which to compare.
otherA tombstone object yet to be converted.
Returns
True if the two elements differ, false otherwise.

Definition at line 315 of file entity.hpp.

◆ operator!=() [7/10]

bool entt::operator!= ( const meta_any lhs,
const meta_any rhs 
)
inline

Checks if two wrappers differ in their content.

Parameters
lhsA wrapper, either empty or not.
rhsA wrapper, either empty or not.
Returns
True if the two wrappers differ in their content, false otherwise.

Definition at line 577 of file meta.hpp.

◆ operator!=() [8/10]

bool entt::operator!= ( const meta_type lhs,
const meta_type rhs 
)
inline

Checks if two objects refer to the same type.

Parameters
lhsAn object, either valid or not.
rhsAn object, either valid or not.
Returns
False if the objects refer to the same node, true otherwise.

Definition at line 1349 of file meta.hpp.

◆ operator!=() [9/10]

template<typename ILhs , typename IRhs >
bool entt::operator!= ( const resource< ILhs > &  lhs,
const resource< IRhs > &  rhs 
)

Compares two handles.

Template Parameters
ResType of resource managed by the first handle.
OtherType of resource managed by the second handle.
Parameters
lhsA valid handle.
rhsA valid handle.
Returns
False if both handles refer to the same registry, true otherwise.

Definition at line 182 of file resource.hpp.

◆ operator!=() [10/10]

constexpr bool entt::operator!= ( const type_info lhs,
const type_info rhs 
)
inlineconstexpr

Compares the contents of two type info objects.

Parameters
lhsA type info object.
rhsA type info object.
Returns
True if the two type info objects differ, false otherwise.

Definition at line 198 of file type_info.hpp.

◆ operator""_hs()

constexpr hashed_string entt::literals::operator""_hs ( const char *  str,
std::size_t   
)
constexpr

User defined literal for hashed strings.

Parameters
strThe literal without its suffix.
Returns
A properly initialized hashed string.

Definition at line 316 of file hashed_string.hpp.

◆ operator""_hws()

constexpr hashed_wstring entt::literals::operator""_hws ( const wchar_t *  str,
std::size_t   
)
constexpr

User defined literal for hashed wstrings.

Parameters
strThe literal without its suffix.
Returns
A properly initialized hashed wstring.

Definition at line 325 of file hashed_string.hpp.

◆ operator+() [1/2]

template<typename... Type, typename... Other>
constexpr type_list<Type..., Other...> entt::operator+ ( type_list< Type... >  ,
type_list< Other... >   
)
constexpr

Concatenates multiple type lists.

Template Parameters
TypeTypes provided by the first type list.
OtherTypes provided by the second type list.
Returns
A type list composed by the types of both the type lists.

Definition at line 157 of file type_traits.hpp.

◆ operator+() [2/2]

template<auto... Value, auto... Other>
constexpr value_list<Value..., Other...> entt::operator+ ( value_list< Value... >  ,
value_list< Other... >   
)
constexpr

Concatenates multiple value lists.

Template Parameters
ValueValues provided by the first value list.
OtherValues provided by the second value list.
Returns
A value list composed by the values of both the value lists.

Definition at line 332 of file type_traits.hpp.

◆ operator<() [1/2]

template<typename Char >
constexpr bool entt::operator< ( const basic_hashed_string< Char > &  lhs,
const basic_hashed_string< Char > &  rhs 
)
constexpr

Compares two hashed strings.

Template Parameters
CharCharacter type.
Parameters
lhsA valid hashed string.
rhsA valid hashed string.
Returns
True if the first element is less than the second, false otherwise.

Definition at line 260 of file hashed_string.hpp.

◆ operator<() [2/2]

constexpr bool entt::operator< ( const type_info lhs,
const type_info rhs 
)
constexpr

Compares two type info objects.

Parameters
lhsA valid type info object.
rhsA valid type info object.
Returns
True if the first element is less than the second, false otherwise.

Definition at line 208 of file type_info.hpp.

◆ operator<=() [1/2]

template<typename Char >
constexpr bool entt::operator<= ( const basic_hashed_string< Char > &  lhs,
const basic_hashed_string< Char > &  rhs 
)
constexpr

Compares two hashed strings.

Template Parameters
CharCharacter type.
Parameters
lhsA valid hashed string.
rhsA valid hashed string.
Returns
True if the first element is less than or equal to the second, false otherwise.

Definition at line 273 of file hashed_string.hpp.

◆ operator<=() [2/2]

constexpr bool entt::operator<= ( const type_info lhs,
const type_info rhs 
)
constexpr

Compares two type info objects.

Parameters
lhsA valid type info object.
rhsA valid type info object.
Returns
True if the first element is less than or equal to the second, false otherwise.

Definition at line 219 of file type_info.hpp.

◆ operator==() [1/6]

template<typename... Args, typename... Other>
bool entt::operator== ( const basic_handle< Args... > &  lhs,
const basic_handle< Other... > &  rhs 
)

Compares two handles.

Template Parameters
ArgsScope of the first handle.
OtherScope of the second handle.
Parameters
lhsA valid handle.
rhsA valid handle.
Returns
True if both handles refer to the same registry and the same entity, false otherwise.

Definition at line 306 of file handle.hpp.

◆ operator==() [2/6]

template<typename Char >
constexpr bool entt::operator== ( const basic_hashed_string< Char > &  lhs,
const basic_hashed_string< Char > &  rhs 
)
constexpr

Compares two hashed strings.

Template Parameters
CharCharacter type.
Parameters
lhsA valid hashed string.
rhsA valid hashed string.
Returns
True if the two hashed strings are identical, false otherwise.

Definition at line 236 of file hashed_string.hpp.

◆ operator==() [3/6]

template<typename Entity >
constexpr bool entt::operator== ( const Entity  entity,
const null_t  other 
)
constexpr

Compares a null object and an identifier of any type.

Template Parameters
EntityType of identifier.
Parameters
entityIdentifier with which to compare.
otherA null object yet to be converted.
Returns
False if the two elements differ, true otherwise.

Definition at line 224 of file entity.hpp.

◆ operator==() [4/6]

template<typename Entity >
constexpr bool entt::operator== ( const Entity  entity,
const tombstone_t  other 
)
constexpr

Compares a tombstone object and an identifier of any type.

Template Parameters
EntityType of identifier.
Parameters
entityIdentifier with which to compare.
otherA tombstone object yet to be converted.
Returns
False if the two elements differ, true otherwise.

Definition at line 303 of file entity.hpp.

◆ operator==() [5/6]

template<typename Res , typename Other >
bool entt::operator== ( const resource< Res > &  lhs,
const resource< Other > &  rhs 
)

Compares two handles.

Template Parameters
ResType of resource managed by the first handle.
OtherType of resource managed by the second handle.
Parameters
lhsA valid handle.
rhsA valid handle.
Returns
True if both handles refer to the same resource, false otherwise.

Definition at line 169 of file resource.hpp.

◆ operator==() [6/6]

constexpr bool entt::operator== ( const type_info lhs,
const type_info rhs 
)
inlineconstexpr

Compares the contents of two type info objects.

Parameters
lhsA type info object.
rhsA type info object.
Returns
True if the two type info objects are identical, false otherwise.

Definition at line 188 of file type_info.hpp.

◆ operator>() [1/2]

template<typename Char >
constexpr bool entt::operator> ( const basic_hashed_string< Char > &  lhs,
const basic_hashed_string< Char > &  rhs 
)
constexpr

Compares two hashed strings.

Template Parameters
CharCharacter type.
Parameters
lhsA valid hashed string.
rhsA valid hashed string.
Returns
True if the first element is greater than the second, false otherwise.

Definition at line 286 of file hashed_string.hpp.

◆ operator>() [2/2]

constexpr bool entt::operator> ( const type_info lhs,
const type_info rhs 
)
constexpr

Compares two type info objects.

Parameters
lhsA valid type info object.
rhsA valid type info object.
Returns
True if the first element is greater than the second, false otherwise.

Definition at line 230 of file type_info.hpp.

◆ operator>=() [1/2]

template<typename Char >
constexpr bool entt::operator>= ( const basic_hashed_string< Char > &  lhs,
const basic_hashed_string< Char > &  rhs 
)
constexpr

Compares two hashed strings.

Template Parameters
CharCharacter type.
Parameters
lhsA valid hashed string.
rhsA valid hashed string.
Returns
True if the first element is greater than or equal to the second, false otherwise.

Definition at line 299 of file hashed_string.hpp.

◆ operator>=() [2/2]

constexpr bool entt::operator>= ( const type_info lhs,
const type_info rhs 
)
constexpr

Compares two type info objects.

Parameters
lhsA valid type info object.
rhsA valid type info object.
Returns
True if the first element is greater than or equal to the second, false otherwise.

Definition at line 241 of file type_info.hpp.

◆ overload() [1/2]

template<typename Func >
constexpr auto entt::overload ( Func *  func)
constexpr

Constant utility to disambiguate overloaded functions.

Template Parameters
FuncFunction type of the desired overload.
Parameters
funcA valid pointer to a function.
Returns
Pointer to the function.

Definition at line 45 of file utility.hpp.

◆ overload() [2/2]

template<typename Type , typename Class >
constexpr auto entt::overload ( Type Class::*  member)
constexpr

Constant utility to disambiguate overloaded members of a class.

Template Parameters
TypeType of the desired overload.
ClassType of class to which the member belongs.
Parameters
memberA valid pointer to a member.
Returns
Pointer to the member.

Definition at line 34 of file utility.hpp.

◆ overloaded()

template<class... Func>
entt::overloaded ( Func...  ) -> overloaded< Func... >

Deduction guide.

Template Parameters
FuncTypes of function objects.

◆ poly_call()

template<std::size_t Member, typename Poly , typename... Args>
decltype(auto) entt::poly_call ( Poly &&  self,
Args &&...  args 
)

Shortcut for calling poly_base<Type>invoke.

Template Parameters
MemberIndex of the function to invoke.
PolyA fully defined poly object.
ArgsTypes of arguments to pass to the function.
Parameters
selfA reference to the poly object that made the call.
argsThe arguments to pass to the function.
Returns
The return value of the invoked function, if any.

Definition at line 173 of file poly.hpp.

◆ propagate_on_container_copy_assignment()

template<typename Allocator >
constexpr void entt::propagate_on_container_copy_assignment ( [[maybe_unused] ] Allocator &  lhs,
[[maybe_unused] ] Allocator &  rhs 
)
constexpr

Utility function to design allocation-aware containers.

Template Parameters
AllocatorType of allocator.
Parameters
lhsA valid allocator.
rhsAnother valid allocator.

Definition at line 36 of file memory.hpp.

◆ propagate_on_container_move_assignment()

template<typename Allocator >
constexpr void entt::propagate_on_container_move_assignment ( [[maybe_unused] ] Allocator &  lhs,
[[maybe_unused] ] Allocator &  rhs 
)
constexpr

Utility function to design allocation-aware containers.

Template Parameters
AllocatorType of allocator.
Parameters
lhsA valid allocator.
rhsAnother valid allocator.

Definition at line 49 of file memory.hpp.

◆ propagate_on_container_swap()

template<typename Allocator >
constexpr void entt::propagate_on_container_swap ( [[maybe_unused] ] Allocator &  lhs,
[[maybe_unused] ] Allocator &  rhs 
)
constexpr

Utility function to design allocation-aware containers.

Template Parameters
AllocatorType of allocator.
Parameters
lhsA valid allocator.
rhsAnother valid allocator.

Definition at line 62 of file memory.hpp.

◆ resolve() [1/3]

template<typename Type >
meta_range< meta_type > entt::resolve ( )
inline

Returns the meta type associated with a given type.

Returns a range to use to visit all meta types.

Template Parameters
TypeType to use to search for a meta type.
Returns
The meta type associated with the given type, if any.
An iterable range to use to visit all meta types.

Definition at line 19 of file resolve.hpp.

◆ resolve() [2/3]

meta_type entt::resolve ( const id_type  id)
inline

Returns the meta type associated with a given identifier, if any.

Parameters
idUnique identifier.
Returns
The meta type associated with the given identifier, if any.

Definition at line 36 of file resolve.hpp.

◆ resolve() [3/3]

meta_type entt::resolve ( const type_info info)
inline

Returns the meta type associated with a given type info object.

Parameters
infoThe type info object of the requested type.
Returns
The meta type associated with the given type info object, if any.

Definition at line 51 of file resolve.hpp.

◆ sink()

template<typename Ret , typename... Args, typename Allocator >
entt::sink ( sigh< Ret(Args...), Allocator > &  ) -> sink< sigh< Ret(Args...), Allocator >>

Deduction guide.

It allows to deduce the signal handler type of a sink directly from the signal it refers to.

Template Parameters
RetReturn type of a function type.
ArgsTypes of arguments of a function type.
AllocatorType of allocator used to manage memory and elements.

◆ swap()

template<typename First , typename Second >
void entt::swap ( compressed_pair< First, Second > &  lhs,
compressed_pair< First, Second > &  rhs 
)
inline

Swaps two compressed pair objects.

Template Parameters
FirstThe type of the first element that the pairs store.
SecondThe type of the second element that the pairs store.
Parameters
lhsA valid compressed pair object.
rhsA valid compressed pair object.

Definition at line 248 of file compressed_pair.hpp.

◆ to_address()

template<typename Type >
constexpr auto entt::to_address ( Type &&  ptr)
constexpr

Unwraps fancy pointers, does nothing otherwise (waiting for C++20).

Template Parameters
TypePointer type.
Parameters
ptrFancy or raw pointer.
Returns
A raw pointer that represents the address of the original pointer.

Definition at line 21 of file memory.hpp.

◆ to_entity() [1/2]

template<typename Entity , typename Component >
Entity entt::to_entity ( const basic_registry< Entity > &  reg,
const Component &  instance 
)

Returns the entity associated with a given component.

Warning
Currently, this function only works correctly with the default pool as it makes assumptions about how the components are laid out.
Template Parameters
EntityA valid entity type (see entt_traits for more details).
ComponentType of component.
Parameters
regA registry that contains the given entity and its components.
instanceA valid component instance.
Returns
The entity associated with the given component.

Definition at line 140 of file helper.hpp.

◆ to_entity() [2/2]

template<typename Entity >
constexpr entt_traits<Entity>::entity_type entt::to_entity ( const Entity  value)
constexpr

Returns the entity part once converted to the underlying type.

Parameters
valueThe value to convert.
Returns
The integral representation of the entity part.
Template Parameters
EntityThe value type.

Definition at line 148 of file entity.hpp.

◆ to_integral()

template<typename Entity >
constexpr entt_traits<Entity>::entity_type entt::to_integral ( const Entity  value)
constexpr

Converts an entity to its underlying type.

Parameters
valueThe value to convert.
Returns
The integral representation of the given value.
Template Parameters
EntityThe value type.

Definition at line 139 of file entity.hpp.

◆ to_version()

template<typename Entity >
constexpr entt_traits<Entity>::version_type entt::to_version ( const Entity  value)
constexpr

Returns the version part once converted to the underlying type.

Parameters
valueThe value to convert.
Returns
The integral representation of the version part.
Template Parameters
EntityThe value type.

Definition at line 157 of file entity.hpp.

◆ type_id() [1/2]

template<typename Type >
const type_info& entt::type_id ( )

Returns the type info object associated to a given type.

The returned element refers to an object with static storage duration.
The type doesn't need to be a complete type. If the type is a reference, the result refers to the referenced type. In all cases, top-level cv-qualifiers are ignored.

Template Parameters
TypeType for which to generate a type info object.
Returns
A reference to a properly initialized type info object.

Definition at line 257 of file type_info.hpp.

◆ type_id() [2/2]

template<typename Type >
const type_info& entt::type_id ( Type &&  )

Returns the type info object associated to a given type.

The returned element refers to an object with static storage duration.
The type doesn't need to be a complete type. If the type is a reference, the result refers to the referenced type. In all cases, top-level cv-qualifiers are ignored.

Template Parameters
TypeType for which to generate a type info object.
Returns
A reference to a properly initialized type info object.

Definition at line 268 of file type_info.hpp.

◆ uninitialized_construct_using_allocator()

template<typename Type , typename Allocator , typename... Args>
constexpr Type* entt::uninitialized_construct_using_allocator ( Type *  value,
const Allocator &  allocator,
Args &&...  args 
)
constexpr

Uses-allocator construction utility (waiting for C++20).

Primarily intended for internal use. Creates an object of a given type by means of uses-allocator construction at an uninitialized memory location.

Template Parameters
TypeType of object to create.
AllocatorType of allocator used to manage memory and elements.
ArgsTypes of arguments to use to construct the object.
Parameters
valueMemory location in which to place the object.
allocatorThe allocator to use.
argsParameters to use to construct the object.
Returns
A pointer to the newly created object of the given type.

Definition at line 283 of file memory.hpp.

◆ unwrap_tuple()

template<typename Type >
constexpr decltype(auto) entt::unwrap_tuple ( Type &&  value)
constexpr

Utility function to unwrap tuples of a single element.

Template Parameters
TypeTuple type of any sizes.
Parameters
valueA tuple object of the given type.
Returns
The tuple itself if it contains more than one element, the first element otherwise.

Definition at line 19 of file tuple.hpp.

◆ uses_allocator_construction_args()

template<typename Type , typename Allocator , typename... Args>
constexpr auto entt::uses_allocator_construction_args ( const Allocator &  allocator,
Args &&...  args 
)
constexpr

Uses-allocator construction utility (waiting for C++20).

Primarily intended for internal use. Prepares the argument list needed to create an object of a given type by means of uses-allocator construction.

Template Parameters
TypeType to return arguments for.
AllocatorType of allocator used to manage memory and elements.
ArgsTypes of arguments to use to construct the object.
Parameters
allocatorThe allocator to use.
argsParameters to use to construct the object.
Returns
The arguments needed to create an object of the given type.

Definition at line 246 of file memory.hpp.

Variable Documentation

◆ choice

template<std::size_t N>
constexpr choice_t<N> entt::choice {}
inlineconstexpr

Variable template for the choice trick.

Template Parameters
NNumber of choices available.

Definition at line 32 of file type_traits.hpp.

◆ enum_as_bitmask_v

template<typename Type >
constexpr bool entt::enum_as_bitmask_v = enum_as_bitmask<Type>::value
inlineconstexpr

Helper variable template.

Template Parameters
TypeThe enum class type for which to enable bitmask support.

Definition at line 25 of file enum.hpp.

◆ exclude

template<typename... Type>
constexpr exclude_t<Type...> entt::exclude {}
inlineconstexpr

Variable template for exclusion lists.

Template Parameters
TypeList of types.

Definition at line 20 of file utility.hpp.

◆ get

template<typename... Type>
constexpr get_t<Type...> entt::get {}
inlineconstexpr

Variable template for lists of observed components.

Template Parameters
TypeList of types.

Definition at line 34 of file utility.hpp.

◆ ignore_as_empty_v

template<class Type >
constexpr bool entt::ignore_as_empty_v = (component_traits<Type>::page_size == 0u)
inlineconstexpr

Helper variable template.

Template Parameters
TypeType of component.

Definition at line 57 of file component.hpp.

◆ is_applicable_r_v

template<typename Ret , typename Func , typename Args >
constexpr bool entt::is_applicable_r_v = is_applicable_r<Ret, Func, Args>::value
inlineconstexpr

Helper variable template.

Template Parameters
RetThe type to which the return type of the function should be convertible.
FuncA valid function type.
ArgsThe list of arguments to use to probe the function type.

Definition at line 428 of file type_traits.hpp.

◆ is_applicable_v

template<typename Func , typename Args >
constexpr bool entt::is_applicable_v = is_applicable<Func, Args>::value
inlineconstexpr

Helper variable template.

Template Parameters
FuncA valid function type.
ArgsThe list of arguments to use to probe the function type.

Definition at line 404 of file type_traits.hpp.

◆ is_complete_v

template<typename Type >
constexpr bool entt::is_complete_v = is_complete<Type>::value
inlineconstexpr

Helper variable template.

Template Parameters
TypeThe type to test.

Definition at line 447 of file type_traits.hpp.

◆ is_ebco_eligible_v

template<typename Type >
constexpr bool entt::is_ebco_eligible_v = is_ebco_eligible<Type>::value
inlineconstexpr

Helper variable template.

Template Parameters
TypeThe type to test.

Definition at line 503 of file type_traits.hpp.

◆ is_equality_comparable_v

template<typename Type >
constexpr bool entt::is_equality_comparable_v = is_equality_comparable<Type>::value
inlineconstexpr

Helper variable template.

Template Parameters
TypeThe type to test.

Definition at line 592 of file type_traits.hpp.

◆ is_iterator_v

template<typename Type >
constexpr bool entt::is_iterator_v = is_iterator<Type>::value
inlineconstexpr

Helper variable template.

Template Parameters
TypeThe type to test.

Definition at line 487 of file type_traits.hpp.

◆ is_meta_pointer_like_v

template<typename Type >
constexpr auto entt::is_meta_pointer_like_v = is_meta_pointer_like<Type>::value
inlineconstexpr

Helper variable template.

Template Parameters
TypePotentially pointer-like type.

Definition at line 51 of file type_traits.hpp.

◆ is_transparent_v

template<typename Type >
constexpr bool entt::is_transparent_v = is_transparent<Type>::value
inlineconstexpr

Helper variable template.

Template Parameters
TypeThe type to test.

Definition at line 522 of file type_traits.hpp.

◆ monostate_v

template<id_type Value>
monostate<Value> entt::monostate_v = {}
inline

Helper variable template.

Template Parameters
ValueValue used to differentiate between different variables.

Definition at line 52 of file monostate.hpp.

◆ null

constexpr null_t entt::null {}
inlineconstexpr

Compile-time constant for null entities.

There exist implicit conversions from this variable to identifiers of any allowed type. Similarly, there exist comparison operators between the null entity and any other identifier.

Definition at line 326 of file entity.hpp.

◆ owned

template<typename... Type>
constexpr owned_t<Type...> entt::owned {}
inlineconstexpr

Variable template for lists of owned components.

Template Parameters
TypeList of types.

Definition at line 48 of file utility.hpp.

◆ size_of_v

template<typename Type >
constexpr std::size_t entt::size_of_v = size_of<Type>::value
inlineconstexpr

Helper variable template.

Template Parameters
TypeThe type of which to return the size.

Definition at line 73 of file type_traits.hpp.

◆ tombstone

constexpr tombstone_t entt::tombstone {}
inlineconstexpr

Compile-time constant for tombstone entities.

There exist implicit conversions from this variable to identifiers of any allowed type. Similarly, there exist comparison operators between the tombstone entity and any other identifier.

Definition at line 335 of file entity.hpp.

◆ type_list_contains_v

template<typename List , typename Type >
constexpr bool entt::type_list_contains_v = type_list_contains<List, Type>::value
inlineconstexpr

Helper variable template.

Template Parameters
ListType list.
TypeType to look for.

Definition at line 256 of file type_traits.hpp.

◆ unpack_as_value

template<auto Value, typename >
constexpr auto entt::unpack_as_value = Value
inlineconstexpr

Helper variable template to be used to repeat the same value a number of times equal to the size of a given parameter pack.

Template Parameters
ValueA value to repeat.

Definition at line 89 of file type_traits.hpp.

◆ value_list_element_v

template<std::size_t Index, typename List >
constexpr auto entt::value_list_element_v = value_list_element<Index, List>::value
inlineconstexpr

Helper type.

Template Parameters
IndexIndex of the value to return.
ListValue list to search into.

Definition at line 323 of file type_traits.hpp.