EnTT v3.12.0
Changelog
-
config:ENTT_FAIL(msg)as an alias ofENTT_ASSERT(false, msg)
-
core:is_equality_comparablealso detects C-style arrays- Added
value_list_index[_v],value_list_unique[_t],value_list_contains[_v]andvalue_list_diff[_t] std::tupletraits specialization forentt::type_listandentt::value_list
-
entity:- All group types are copyable and movable
- View filter storage classes are now available (see
::storage) - Group filter storage classes are now available (see
::storage) - Propagate the allocator to the registry context
sigh_helperutility to simplify connecting multiple listeners to a registry- Public
basic_sparse_set<...>::traits_typetype member - Public
basic_storage<...>::traits_typetype member - Public
basic_registry<...>::traits_typetype member component_traitstreatvoidproperly as any other component type- Split
entt_traitsandbasic_entt_traitsto simplify specializing the former - Make
entity_maskandversion_maskavailable throughentt_traits - Add
entt_traits::base_typefor the final user (not used internally) - Make
basic_registrywork properly withvoidcomponent type - Handles discard their entities on destruction
- Improved removing/erasing elements when a
sigh_mixinis attached to a storage - Added internal, opaque
datafunction to sparse set iterators - Additional internal virtual
clear_allfunction available in thebasic_sparse_set<...>class - Improved performance of sparse set
remove,eraseandclearfunctions - Improved performance of registry
remove,erase,clearanddestroyfunctions deletion_policyis now publicly available viaentity/fwd.hpp- Added
basic_sparse_set<...>::contiguousfunction extended_storage_iterator::basemakes the underlying iterator availableextended_view_iterator::basemakes the underlying iterator availableextended_group_iterator::basemakes the underlying iterator available- Added a specialization of
basic_storagewhen the value type is also the entity type (entity storage) - Entities have their own storage in a registry and it's accessible as
storage<entity_type>() - Sigh mixin also supports entity storage types (to send signals on entity creation/destruction/update)
- Exclude-only like views are also supported because of the entity storage
added basic_entt_traits::nextreturns the next valid version of an identifier- Refined transparent aggregate support for storage types
- Deprecated the following functions in the registry class:
basic_registry<...>::size()(use.storage<E>().size()instead)basic_registry<...>::alive()(use.storage<E>().in_use()instead)basic_registry<...>::reserve(cap)(use.storage<E>().reserve(cap)instead)basic_registry<...>::capacity()(use.storage<E>().capacity()instead)basic_registry<...>::empty()(use.storage<E>().in_use()instead)basic_registry<...>::data()(use.storage<E>().data()instead)basic_registry<...>::released()(use.storage<E>().in_use()and.storage<E>().size()instead)basic_registry<...>::release(args...)(use.storage<E>().erase(args)and.storage<E>().bump(entt)instead)basic_registry<...>::assign(args...)(use.storage<Entity>().push(first, last)and.storage<Entity>().in_use(len)instead)basic_registry<...>::each(args...)(use.storage<Entity>().each()instead)
basic_sparse_set<...>::bumpreturns the version in usebasic_storage<...>::insertreturns an iterator to the range of inserted elements- Storage based groups fully support multiple storage of the same type now
- Huge internal rework to reduce the dependencies between the registry and the group classes/handlers
- All group types have a
.handle()function to return a reference to the leading storage basic_registry<...>::groupis no longer[[nodiscard]]- Configurable mask type for
basic_observer - Allocator support for
basic_observer get_t,owned_tandexclude_tare (constexpr constructible) types now rather than aliases oftype_listbasic_storageusesallocator_traits::destroynow rather thanstd::destroy_at(to allow specializations if needed)- Make
basic_registry<...>::storage_for_type<...>available to the final user basic_view<..>::operator boolreturns true only for fully initialized views- Uninitialized views behave correctly in all circumstances, returning the expected result on each call
- Views support swapping their storage or setting them lazily
- View packs fully support empty views finally
basic_registry<...>doesn't instantiate temporary static storage on const function anymoreon_construct/on_update/on_destroyofbasic_registry<...>also support named pools- Added a reverse each function (
reach, worst name ever) to all storage classes basic_registry<...>::erase_ifto conditionally erase elements from their storage- Deprecated the following functions in the snapshot classes:
entities()(useget<Entity>()instead)component<...>(...)(useget<T>(...)instead)shrink, no longer required
- General purpose
::get<T>(...)function for snapshot classes that works with storage types - Runtime pools support for snapshot classes (see
::get<T>(...)for further details) - Drop multi-type archive function requirement for snapshot classes
-
graph:- Allocator type propagates to the graph type returned by
flow::graph()calls
- Allocator type propagates to the graph type returned by
-
locator:- Support for opaque structures
-
meta:- It's now possible to update the value of a meta property at any time (non-const
meta_anyref) - Full support to meta member functions for primitive types
operator==/!=for meta_handleoperator==/!=for meta_dataoperator==/!=for meta_propoperator==/!=for meta_func
- It's now possible to update the value of a meta property at any time (non-const
-
process:- Introduced
basic_schedulerwith default delta type for common cases - Turn
schedulerinto an alias forbasic_scheduler<std::uint32_t>
- Introduced
-
signal:- Added
delegate::targetto get a pointer to the stored callable function - Refined transparent aggregate support for the dispatcher class
delegatealso supports functions that skip first elements (on second attempt only)- Allow disconnecting listeners during iterations over the
sighclass
- Added
Build system
- Bump IWYU version to 0.19
- Bump CMake version to 3.15.7
- Enable documentation diagnostic for Clang
- Increase CI warning level to
/W1on Windows - Add GCC11 to the list of compilers directly checked by the CI
Any other business
- Suppress a few warnings due to unused variables in corner cases
- More
[[nodiscard]]where it makes sense (i.e.any_castormeta_type::from_void) - Better allocator support with additional runtime checks for corner cases
Natvis support
All natvis files have been updated where necessary.
Breaking changes
-
entity:ignore_as_empty_vdoesn't exist anymore, usecomponent_traits<...>::page_sizeinsteadentt_traits::reservedis no longer available, combineentity_maskandversion_maskinsteadbasic_sparse_set<...>::swap_atis now a protected function, overrideswap_or_moveas needed insteadbasic_sparse_set<...>::move_elementdoesn't exist anymore, useswap_or_moveinstead (with checks ontoif needed)sigh_storage_mixinwas renamed intosigh_mixinbasic_sparse_set<...>::emplacewas renamed topushbasic_sparse_set<...>::insertwas renamed topushbasic_sparse_set<...>::getwas renamed tovaluebasic_sparse_set<...>::sortwas renamed tosort_asbasic_group<...>::sort(no callback overload) was renamed tosort_asbasic_registry<...>::base_typewas renamed tocommon_typebasic_group<...>::base_typewas renamed tocommon_typeruntime_view<...>::base_typewas renamed tocommon_typebasic_view<...>::base_typewas renamed tocommon_type- Nested groups are no longer supported (the pain is not worth the gain)
basic_view<...>::storage<...>()returns a (possibly null) pointer rather than a referencebasic_view<...>::handle()returns a (possibly null) pointer rather than a referencebasic_group<...>::storage<...>()returns a (possibly null) pointer rather than a referencebasic_view<...>::refresh()is a self-contained, non-const function that changes the view in-placebasic_view<...>::use<T>()is a self-contained, non-const function that changes the view in-place
-
process:schedulerno longer requires a template parameter, usebasic_schedulerifstd::uint32_tisn't a good enough delta type
-
signal:disconnectby reference is no longer available on thesinkclass, use the overload that accepts a pointer insteadsink<...>::beforeis no longer supported, no alternative 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.