Replies: 1 comment 1 reply
-
typos:
-> a first class citizen
-> default missing code formatting for |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Changelog
container
:dense_hash_map
class that is mostly a drop-in replacement forstd::unordered_map
.dense_hash_set
class that is mostly a drop-in replacement forstd::unordered_set
.core
:type_info
constructor with in-place type (as instd::in_place_type_t<T>
).compressed_pair
for internal uses but also available to the final user (with support to structured binding).is_ebco_eligible[_v]
utility.any_cast
no longer forces by-copy construction for rvalues.memory.hpp
header to support/offer general purpose functions generally missed in the standard library.to_address
to unwrap fancy pointers, waiting for C++20.propagate_on_container_copy_assignment
,propagate_on_container_move_assignment
andpropagate_on_container_swap
.is_power_of_two
, it's mainly meant for internal uses but also generally available.fast_mod
, it's mainly meant for internal uses but also generally available.tuple.hpp
header to support/offer general purpose functions generally missed in the standard library.unwrap_tuple
, it's mainly meant for internal uses but also generally available.constexpr
support fortype_info
.basic_any<...>::type
returns the object type if any,type_id<void>()
(and not an emptytype_info
) otherwise.const type_info &
parameter (requested type) tobasic_any<...>::data
.operator<
,operator<=
,operator>
andoperator>=
forbasic_hashed_string
.operator<
,operator<=
,operator>
andoperator>=
fortype_info
.type_id
returnstype_info
objects with static storage duration.basic_any<...>::assign
to copy or move assign the wrapped value without replacing it.to_entity
andto_version
asideto_integral
, they forward the request to the rightentt_traits<...>
class.input_iterator_pointer
utility class.next_power_of_two
, it's mainly meant for internal uses but also generally available.is_transparent[_v]
utility class.is_transparent
type member is now part of theidentity
class.iterable_adaptor
utility to create a temporary iterable object from two iterators.entity
:in_place_delete[_v]
andignore_as_empty[_v]
utilities.basic_sparse_set<...>
is a non-copyable allocator-aware container (::get_allocator()
, pocma/pocca/pocs support, and so on).basic_storage<...>
is a non-copyable allocator-aware container (::get_allocator()
, pocma/pocca/pocs support, and so on).get_as_tuple
function.owned_t
besidesget_t
andexclude_t
.entt_traits
is now a first class citizen of the library and all entity related requests rely on it (see::combine
and so on).basic_registry<...>::current
returns a tombstone version for invalid entities and doesn't assert anymore.basic_sparse_set<...>::current
to return known version of identifiers in set.::get
method to storage for empty types.::insert
.::insert
for all mixins.basic_view<...>::operator[]
overload to access (eventually unwrapped) components by entity.operator->
for iterable objects iterators (iterable view, iterable group).basic_view<...>::handle
to return a const reference to the leading storage.fwd.hpp
fromentity.hpp
to makeentity
available in all cases.basic_registry<...>::all_of
,basic_registry<...>::any_of
and a few other functions remove const qualifiers.is_iterator[_v]
also supportvoid *
andconst void *
.is_equality_comparable[_v]
.view<E, T, T, T>
).basic_view<...>::use<integral value>()
to set leading pool by index.basic_view<...>::get<integral value>(e)
to get components by index.basic_registry
class work smoothly across boundaries.void *
custom argument frombasic_sparse_set::remove
,::erase
,::emplace
,::insert
,::clear
.bind
function to thebasic_sparse_set
to pass the outer context to mixins.basic_registry
fully thread-safe (with placeholder pools).swap
is not longer virtual in thebasic_sparse_set
.void *
) from abasic_sparse_set
.basic_sparse_set
with::type
, if any.void *
) with::get
, if any.basic_registry::prepare
.basic_registry::storage<T>
to get or create pools at runtime and bind them to a custom name if needed.to_entity
also work with stable types.basic_component_traits::in_place_delete
into a boolean value.basic_component_traits::ignore_if_empty
into a boolean value.basic_component_traits::page_size
to allow customizing the packed page size on a per-type basis.in_place_delete_v
.basic_view::storage<T>
to get pools at runtime if needed.basic_group::storage<T>
to get pools at runtime if needed.entt_traits::page_size
to allow customizing the sparse page size on a per-type basis.basic_group<...>::handle
to return a const reference to the leading storage..each()
) do not offer reverse iterators anymore (cannot implement them correctly)..each()
) do not offer reverse iterators anymore (cannot implement them correctly).basic_sparse_set<...>::cbegin
/::cend
/crbegin
/crend
and theconst_iterator
andconst_reverse_iterator
type members.basic_storage<...>::each
function to iterate a storage as a set of entity/component tuples.end
.basic_registry<...>::storage()
to return pools and their names as an iterable object.meta
:meta_type::construct
doesn't look for base constructors anymore.::insert
returns now an iterator that is contextually convertible to bool (for validity checks).::erase
returns now an iterator that is contextually convertible to bool (for validity checks).meta_arg
utility doesn't require anstd::index_sequence
anymore.meta_arg
is now a type list template parameter instead of a function parameter.meta_construct
utility doesn't require anstd::index_sequence
anymore.meta_invoke
utility doesn't require anstd::index_sequence
anymore.meta_dispatch
utility is now available.meta_type::is_void
.fwd.hpp
file for many types in meta.meta_any::allow_cast
that works with meta types.parent
link from meta objects.meta_invoke
andmeta_construct
utilities.meta_type::reset
with themeta_reset
free functions.cbegin
andcend
tometa_range
.meta_type::is_arithmetic
to replaceis_integral
andis_floating_point
.meta_data
(meta data members).meta_any::assign
to copy or move assign the wrapped value without replacing it.operator->
for meta containers iterators.operator->
formeta_range
iterators.meta_range
iterators.meta_associative_container_traits
fordense_hash_map
.meta_associative_container_traits
fordense_hash_set
.meta_any::owner
to know if ameta_any
also owns the underlying object.poly
:resource
:resource_handle::use_count
to know how many handles are there for a single resource.resource_handle::resource_type
type member.signal
:scoped_connection
is now move assignable and move constructible.dispatcher
class work smoothly across boundaries.emitter
class work smoothly across boundaries.sigh
class.Performance improvements here and there (ie storage classes,
any
andany_cast
, ...).clang-format
support. 🥳Build system
EnTT
works as expected with all major compilers when using C++20.ENTT_USE_LIBCPP
default isOFF
.ENTT_INCLUDE_HEADERS
option to add headers to the EnTT target (default:OFF
).ENTT_INCLUDE_NATVIS
option to add natvis files to the EnTT target (default:OFF
).EnTT across boundaries
This is all you need to do right now for EnTT to work across boundaries:
That is, absolutely nothing. Things like the registry class don't make use of static variables anymore and therefore they don't risk to break when used across boundaries. They should just work out of the box. Finally. 🙂
Natvis files
List of classes already covered by natvis files upstream (work in progress):
entt::basic_sparse_set
(with tombstones detection)entt::basic_storage
(with tombstones detection)entt::type_info
entt::basic_any
entt::compressed_pair
entt::dense_hash_map
entt::dense_hash_set
entt::meta_any
entt::meta_associative_container
entt::internal::meta_base_node
entt::internal::meta_conv_node
entt::internal::meta_ctor_node
entt::internal::meta_data_node
entt::meta_data
entt::internal::meta_func_node
entt::meta_func
entt::meta_handle
entt::internal::meta_prop_node
entt::meta_prop
entt::meta_sequence_container
entt::internal::meta_template_node
entt::internal::meta_type_node
entt::meta_type
entt::basic_hashed_string
entt::delegate
entt::sigh
entt::sink
entt::connection
entt::scoped_connection
entt::basic_view
entt::tombstone
entt::null
entt::basic_registry
entt::poly
entt::dispatcher
entt::basic_view
Breaking changes
core
:type_seq
totype_index
.type_info::seq
totype_info::index
.type_info
is no longer default nor user constructible, usetype_id
instead.unpack_as_t
tounpack_as_type
andunpack_as_v
tounpack_as_value
.entity
:basic_storage<...>::sort
, capture pool and use::get
if needed.basic_storage<...>::sort_n
, capture pool and use::get
if needed.get_as_tuple
, use the functions offered by storage classes instead.basic_view<T, get_t<C...>, exclude_t<E...>>
and thereforeview<get_t<C...>, exclude_t<E...>>
(second parameter is optional).basic_group<T, owned_t<O...>, get_t<G...>, exclude_t<E...>>
.basic_view<...>::use<T>
doesn't modify the view in-place anymore, instead it returns a new view.null_t::operator|
, useentt_traits<...>::combine
instead.tombstone_t::operator|
, useentt_traits<...>::combine
instead.basic_registry<...>::version
, useentt_traits
instead.basic_registry<...>::entity
, useentt_traits
instead.basic_sparse_set<...>::clear
honors the set modality.basic_sparse_set<...>::swap
for entities toswap_elements
to avoid conflicts.basic_sparse_set<...>::emplace_back
, no alternative provided.basic_sparse_set<...>::emplace
doesn't return the position anymore.entt_traits<...>
doesn't offer anymore adifference_type
alias.view.each<T>(F)
, useview.use<T>().each(F)
instead.view.each<T>()
, useview.use<T>().each()
instead.basic_registry::prepare<T>
, usestorage<T>
instead.in_place_delete_v<T>
, usecomponent_traits<T>::in_place_delete
instead.basic_registry<...>::reserve<T>
, usebasic_registry<...>::storage<T>().reserve(N)
instead.basic_registry<...>::capacity<T>
, usebasic_registry<...>::storage<T>().capacity()
instead.basic_registry<...>::shrink_to_fit<T>
, usebasic_registry<...>::storage<T>().shrink_to_fit()
instead.basic_registry<...>::size<T>
, usebasic_registry<...>::storage<T>().size()
or a single type view instead.basic_registry<...>::empty<T>
, usebasic_registry<...>::storage<T>().empty()
or a single type view instead.basic_view<...>::raw
for single type views, usebasic_view<...>::storage().raw()
instead.basic_view<...>::data
for single type views, usebasic_view<...>::storage().data()
instead.basic_group<...>::raw<T>
, usebasic_group<...>::storage<T>().raw()
instead.basic_group<...>::data<T>
, usebasic_group<...>::handle().data()
instead.basic_registry<...>::orphans
, combineeach
andorphan
instead.basic_registry<...>::visit(e, F)
, use the new iterable object to iterate pools instead.basic_registry<...>::visit
, usebasic_registry<...>::storage()
instead.meta
:::insert
no longer returns also a bool value but the iterator is contextually convertible to bool now.::erase
no longer returns also a bool value but the iterator is contextually convertible to bool now.meta_arg
requires to pass the list of arguments as a type list template parameter instead of as a function argument.meta_type::is_void
, usetype == resolve<void>()
instead.parent
link from meta objects, no alternative provided.meta_type::reset
, use themeta_reset
functions instead.meta_type::rank
, no alternative provided.meta_type::extent
, no alternative provided.meta_type::remove_extent
, no alternative provided.meta_type::remove_pointer
, use((*any).type())
instead.meta_type::is_function_pointer
, no alternative provided.meta_type::is_union
, no alternative provided.meta_type::is_integral
, usemeta_type::is_arithmetic
instead.meta_type::is_floating_point
, usemeta_type::is_arithmetic
instead.meta_type::is_member_object_pointer
, no alternative provided.meta_type::is_member_function_pointer
, no alternative provided.meta_factory<...>::prop
multiple times, use::props
instead.meta_ctor
and allmeta_type::ctor
overloads, no alternatives provided.Any other business
The documentation is up-to-date and the library is battle-tested with 100% coverage as usual.
I started a long term process to reduce the number of instantiations and also speed up the compilation.
This release contains many changes and great improvements in this regard. Still a work in progress though.
Beta Was this translation helpful? Give feedback.
All reactions