Releases: skypjack/entt
EnTT v3.15.0
Changelog
-
core- Skip most of vtable calls in
anyfor references and dynamically allocated objects - Review
any_policyvalues to better capture the nature of the elements stored withany - Added
any::owner()becauseany_policy::owneris no longer available - Embedded-as-dynamic support for
any(useful to transfer ownership of externally allocated objects) is_iteratorandis_equality_comparablereview to refine them further- Self-moving an
anyputs it in a safe but unspecified state now - Introduce
ENTT_CONSTEVALconfig parameter - Apply
constevalon appropriate hashed string related functions
- Skip most of vtable calls in
-
entity:deletion_policy::unspecifiedis now available and equal toswap_and_pop- Skip tombstone checks in more cases and improve performance of view iterators
- Auto-disconnection support for
reactive_mixin - Refined storage fallback mechanism for views to make it work across boundaries
- Support joining views with storage objects directly
- Introduce
generatefunctions in the storage entity to replaceemplace - Add
generatefunctions to the sigh mixin to fully support storage entity as_viewandas_groupare now copyable- Improved
shrink_to_fitto also cleanup the sparse array of a sparse set - Extended
basic_registry<...>::storage<T>const-correctness - Allow customizing
component_traitsbased on the entity type - Default group template parameters for
GetandExcludelists - Make
basic_organizersupport groups too - Fix a bug on view packs when combining views with uninitialized filters
- Make built-in storage mixins support custom private/protected registries
- Support to reserved entities (see
start_fromon the entity storage) - Make
to_entitywork properly with stable types
-
meta:meta_sequence_container::rebindis no longer availablemeta_associative_container::rebindis no longer availablemeta_any::base()to return a const reference to the underlyingany- Deprecated
meta_any_policy,meta_any::policy()andmeta_any::data() - Self-contained
meta_factory<T>to avoid having to go throughmeta<T> - Support taking ownership of passed in pointers on construction for
meta_any meta_type::from_voidallows transferring ownership of elements too- Standalone
meta_dataandmeta_funcimplementations - Make empty
meta_data,meta_funcandmeta_typesafe to use no matter what - Self-moving a
meta_anyputs it in a safe bug unspecified state now - Allow attaching const values of non-
Typetype to meta types - Make
as_refreturn valid objects when the underlying type isvoid meta_any::context()returns the underling meta context- Deprecated multi-setters meta data support
- Deprecated context-aware
meta_getterutilities - Get the context from the instance in the remaining
meta_getterutilities - Deprecated context-aware
meta_invokeutilities - Get the context from the instance in the remaining
meta_invokeutilities - Support deducing meta pointers like types directly
- Early exit for typed
allow_cast
-
signal:- Make it possible to create uninitialized
sinkobjects - Updated definition for
emitter::publish(no forwarding references) - Slightly review
sinkAPI (these changes should be backward compatible)
- Make it possible to create uninitialized
Build system
- Updated
IWYUversion - Updated lcov configuration to make gtest work with lcov2
ENTT_INSTALLto enable/disable installation steps as needed
Any other business
- Removed all previously deprecated methods
Natvis support
All natvis files have been updated where necessary.
Breaking changes
-
core:- Reviewed
any_policyvalues with breaking changes in names to avoid subtle errors on user side
- Reviewed
-
entity:- Deprecated
emplacein the storage entity, usegenerateinstead component_traitsaccepts entity types (possibly breaking if specialized when using a custom entity type), refine specializations
- Deprecated
-
meta:meta_sequence_container::rebindwas removed, use the constructor insteadmeta_associative_container::rebindwas removed, use the constructor instead- Deprecated
meta_any_policy, useany_policyinstead - Deprecated
meta_any::policy(), use.base().policy()instead - Deprecated
meta_any::data(), use.base().data() - Deprecated
meta<T>, usemeta_factory<T>directly instead - Deprecated multi-setters meta data support, use variant or convertible types instead
- Deprecated context-aware
meta_getterutilities, rebind the handle as needed instead - Deprecated context-aware
meta_invokeutilities, rebind the handle as needed instead
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 some changes in this regard. Still a work in progress though.
EnTT v3.14.0
Changelog
-
config:ENTT_NO_MIXINto disable the sigh mixin by default- Print assertion messages upon failure
-
core:- Avoid uninitialized
lengthin all (corner) cases - Export more types as forward declarations (see
fwd.hpp) - Lambda support for
nth_argument - Class level new/delete support for
any - Class level new/delete support for
uninitialized_construct_using_allocator - Make the
monostatereturn*thisfromoperator= - Enable
enable_borrowed_range/enable_viewfor a few types - Make
popcountpublic (waiting for C++20) - Rename
is_power_of_twotohas_single_bit(waiting for C++20) - Introduce
bit.hppand move a few functions there (iehas_single_bit) - Self assignment support for
basic_any<...>
- Avoid uninitialized
-
entity:- Avoid unchecked refresh loops on single type views
- Refine empty registry check in the snapshot loader constructor
- Stop groups from swapping observed types in their pools
- Make sparse set
sort_asfunction return an iterator past the last shared element - Update registry
destroyfunction to use sparse setsort_asinternally - Add
operator boolto runtime views - Assert when emplacing invalid entities through a registry
- Improved registry
validfunction - Decouple
sizeand next identifier in the storage entity - Faster and memory-friendly storage entity
create-with-hint function - Update the tombstone class to support zero-sized versions
- Update entity traits the fully support zero-sized versions
- Return the correct value from sparse set
pushfunctions - Drop sparse set scoped iterators (ie
begin(N)/end(N)) - Add
element_typeto the storage class as opposed tovalue_type - Make registry
traits_typetype member private - Make sparse set
traits_typetype member private - Make storage
traits_typetype member private - Avoid using weak ranges twice in the
sigh_mixinclass - Support comparisons between
basic_handle<...>andnull_t - Reliable
validfunction for emptybasic_handle<...>s - Add pointer stable types support to the snapshot loader class
- Branch-less sparse set
sortandsort_asfunctions - Branch-less centralized swap-only mode check for views
- Refine storage log messages to avoid ambiguity
- Introduce the new
basic_tableandtableclasses - In/Out edges support for
basic_organizer - Single type view
::operator->to get access to the underlying storage - All registry now assert on custom user defined entity storage
- Add
storage_policyconstexpr member to all storage classes - Enable
enable_borrowed_range/enable_viewfor a few types - Decouple all types except
basic_storagefromcomponent_traits - Drop the
Maskparameter of thebasic_observerclass - View specialization and improvements for swap-only storage
- View specialization and improvements for swap-and-pop storage
- View specialization and improvements for in-place storage
- Avoid checking for filter validity when iterating views
- Allow resetting a storage in the registry via the
resetfunction sigh_mixinautomatic signal registration support for components- Generic
bindfunction in thebasic_sparse_setclass - Reactive mixin and storage (designed to replace the
observerclass) operator boolandregistryfunctions forsigh_mixinsigh_mixintransparent support to derived registries
-
graph:- Add an
emptymethod to theflowclass - Add an
emptymethod to theadjacency_matrixclass
- Add an
-
meta:- Add
is_pointermeta traits - Updated meta type
is_pointerfunction to make it faster and more reliable - User defined traits for meta objects
- Self assignment support for
meta_any - User defined arbitrary data support for meta types, meta data and meta functions
- Guaranteed execution/iteration order on overlaoded meta functions
- Support for creating different meta types from different factories concurrently
- Support
noexceptfunctions whenever a free or member function is allowed - Improve lookup time of member objects and reduce their compile-time cost
- Add
-
poly:- Improve support for inherited concepts
-
resource:- Add
resetfunctions to resource class - Support
swap-ping resources
- Add
-
signal:- Support for free and member
noexceptfunctions to thedelegateclass
- Support for free and member
Build system
- Avoid installing
include/BUILD.bazel - Updated IWYU version
Any other business
- Removed all previously deprecated methods
- Shared types in the test suite to avoid duplication
- Full review to reduce
NOLINTdirectives as much as possible - Refine linter configuration and address as many warnings as possible
- Updated IWYU
entt.impas needed - Drop support to Android NDK r17
- Drop support to MSVC toolset v141
Natvis support
All natvis files have been updated where necessary. New entries:
- Natvis view for
basic_handleclass - Natvis view for
meta_ctxclass - Natvis view for
meta_type_descriptorclass - Natvis view for
meta_custom_nodeclass
Breaking changes
- Sparse set scoped iterators are no longer a thing, check the deletion policy and use the free list value as needed instead
- Registry
traits_typeis private, useentt_traitsclass andentity_typetype member instead - Sparse set
traits_typeis private, useentt_traitsclass andentity_typetype member instead - Storage
traits_typeis private, usecomponent_traitsclass andvalue_typetype member instead - The
basic_observerclass doesn't accept anymore aMasktemplate parameter - Renamed
is_power_of_twotohas_single_bitand moved it tobit.hpp - Removed support to empty
eachcallbacks for single non-empty type views - Deprecate meta properties, use the new
customdata support for meta types, data and functions instead basic_sparse_setdoesn't require anymore to wrap objects withanys when passing them tobind- The
observerclass is now deprecated, use the reactive mixin and storage instead
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 some changes in this regard. Still a work in progress though.
EnTT v3.13.2
Changelog
- Fix an issue on the range-
insertin thesigh_mixinclass - Add full support to empty types in the snapshot classes
- Suppress an annoying warning by clang in the snapshot classes
Any other business
The documentation is up-to-date and the library is battle-tested with 100% coverage as usual.
EnTT v3.13.1
Changelog
- Refine the check in the constructor of the snapshot loader class
- Avoid swapping observed types from groups
- Don't install
include/BUILD.bazelanymore
Any other business
The documentation is up-to-date and the library is battle-tested with 100% coverage as usual.
EnTT v3.13.0
Changelog
-
config:- Provide coverage for user defined
ENTT_ID_TYPEin the std namespace
- Provide coverage for user defined
-
container:- Added reverse iterators to
dense_set - Added
iterator_conceptto dense map iterators
- Added reverse iterators to
-
core:- Introduce
any_policy - Add
basic_any<...>::policy()member function - Improved
is_equality_comparable[_v]to fully support optional types - Type-based
nth_argument - Reduce compilation cost of
type_list_unique
- Introduce
-
entity:- Reintroduced support for storage listeners in snapshot
- Make
basic_registry<...>::validfully backward compatible - Specialization for single type views with exclusion lists
- Introduced
deletion_policy::swap_onlymode directly managed at sparse set level - Added
basic_sparse_set<...>::free_listto set/get the head of the free list if allowed - Introduced
basic_sparse_set<...>::swap_onlypop protected function - Updated entity storage to make it use swap-only deletion policy directly
- Drop view specialization for single type with exclusion list
- Returns scoped iterators from
basic_sparse_set<...>(only useful with swap-only deletion policy) - Entity storage use scoped iterators with its iterable objects
- View
eachfunction use scoped iterators from sparse sets - View iterators (
begin/end) are scoped if needed (ie entity storage view or the like) basic_storage<void>::get_allocator()works fine too- Storage based
to_entityfunction to get entities from components - Iterator-based
sort_asfor sparse sets - Iterator-based
sort_asfor groups basic_registry<...>::try_getdoesn't create storage anymorevalue_typefor storage entity isvoidsigh_mixinsupport to custom registry types- Added
iterator_conceptto view iterators - Added
iterator_conceptto groups iterators - Added
iterator_conceptto registry iterators - Added
iterator_conceptto handle iterators - Added
iterator_conceptto storage iterators - Full support to reserved bits on entity identifiers (ie for disabling components)
- Shared implementation for all types of views
- Explicit
iterableandconst_iterabletypes exposed by the registry class - Index based view iterators (internal change)
- Removed
basic_view::operator[]for size types to avoid forcing non-integral entity types
-
graph:- Added
iterator_conceptto adjacency matrix iterators
- Added
-
meta:- Introduce
meta_any_policy - Add
meta_any::policy()member function - Meta container support to
::reserve - Make basic meta container traits publicly available (with revised aPI)
- Add
meta_type::can_castmember function - Add
meta_type::can_convertmember function - Meta container
::rebindaccepts a value rather than ananyobject - Meta container iterator support to
::rebind meta_sequence_container::resizesupport to non default constructible typesbasic_meta_sequence_container_traits::fixed_sizeavailable to final users- Correctly initialize all members of meta container wrappers
- Added
iterator_conceptto meta iterators - Improved meta containers performance
- Introduce
-
process:basic_scheduler<...>was fully redesigned for the better- In-line
.thensupport forbasic_scheduler<...> - Allocator-aware
basic_scheduler<...>
-
resource:- Added
iterator_conceptto cache iterators
- Added
Build system
- Make the debug build suitable for
SizeBench - Enable more warnings on the CI
bzlmodsupport with tests
Any other business
- Removed all previously deprecated methods
- Updated IWYU
entt.impfile - Make the library more C++20-friendly
- Added a test/example on how to use reserved bits on entity identifiers
- Clang tidy config (and cleanup, still a work-in-progress though)
Natvis support
All natvis files have been updated where necessary.
Breaking changes
-
core:nth_argumentaccepts a type rather than a function, usedecltypeas needed
-
entity:basic_sparse_set<...>::swap_atis now privatebasic_storage<...>::in_useis deprecated, usebasic_sparse_set<...>::free_listinstead- Entity storage no longer has a
type_traitstype member - Sorting functions of
basic_sparse_set<...>don't invokecompactautomatically anymore - Registry based
to_entityfunction is deprecated, use the storage based version instead basic_sparse_set<...>::sort_asis deprecated, use iterator-based overload of the same function insteadbasic_group<...>::sort_asis deprecated, use iterator-based overload of the same function instead- Storage entity
::packfunction is deprecated, use iterator-basedsort_asinstead basic_view::operator[]no longer available for size types to avoid forcing non-integral entity typesbasic_sparse_set<...>::atis deprecated as ambiguous, useoperator[]instead
-
meta:- Meta container
::rebindaccepts a value rather than ananyobject - Meta container iterators no longer accept underlying iterators on construction, use
rebindinstead basic_meta_sequence_container_traits::fixed_sizerequired for explicit specializations
- Meta container
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.
EnTT v3.12.2
Changelog
- Avoid warnings due to deprecated functions in the snapshot classes
- Make
basic_registry<...>::validfully backward compatible
Any other business
The documentation is up-to-date and the library is battle-tested with 100% coverage as usual.
EnTT v3.12.1
Changelog
- Reintroduce support to storage listeners for snapshot classes
- Add some tests to avoid future regressions on the snapshot classes
- Update the single include file to the last version as it ought to be
Any other business
The documentation is up-to-date and the library is battle-tested with 100% coverage as usual.
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.
EnTT v3.11.1
Changelog
- Suppress a bunch of warnings due to unused variables or the like in corner cases
- Avoid requiring to include
storage.hppwhen forward declaring a view
Any other business
The documentation is up-to-date and the library is battle-tested with 100% coverage as usual.
EnTT v3.11.0
Changelog
-
config:- Decouple
ENTT_NOEXCEPTand exceptions handling - Added
ENTT_CONSTEXPR(to get around some nasty issues with major compilers) - Added
ENTT_ASSERT_CONSTEXPR(to help further with extreme customizations)
- Decouple
-
container:- Dense map
max_size,countandequal_rangefunctions - Dense set
max_size,countandequal_rangefunctions
- Dense map
-
core:- A new
forward_applyutility type_list_index[_v]utility for type liststype_list_transform[_t]utility for type listsnth_argumentutility to easily extract the n-th argument of a functioniota_iterator(waiting for C++20)- Added
operator*toinput_iterator_poointer - Turn
operator!=foranyinto an in-class function - Avoid using
std::aligned_storage_twithany(deprecated since C++23) - Utility
is_tuple[_v]
- A new
-
entity- Correctly handle overflow of version and max number of entities
- Turned
get_tandexclude_tinto plain aliases fortype_list - Updated API for
basic_registry<...>::group/group_if_exists basic_sparse_set<...>::getis now[[nodiscard]]ignore_as_empty_v<void>is always true- Support
storage<void>as a typeless storage only - Added allocator support to
sigh_storage_mixin - Views support now both const and non-const excluded types
- Groups support now both const and non-const excluded types
- Tuple-based constructor for views
- Added utilities
storage_type_tandstorage_for[_t] - Runtime views support all types of sparse sets now (allocator oriented design)
- Observers support all types of registries now (allocator oriented design)
- Snapshots and loaders support all types of registries now (allocator oriented design)
as_groupandas_vieware transparent to the registry type (allocator oriented design)- Handles support all types of registries now (allocator oriented design)
invokeandto_entityhelpers support all types of registries now (allocator oriented design)- Organizers support all types of registries now (allocator oriented design)
- Storage-based model for groups and views (👈 this is huge 🥳 )
- Replaced
basic_handle<...>::visitwith::storageto return an iterable object rather than accepting lambdas - The
organizerclass uses the newflowbuilder under the hood - Added const/non-const registry support to runtime views
- Runtime views are now allocator aware containers
- Observers derive directly from storage classes rather than using them internally
- Relaxed most of the entity validity checks in a registry
- Added registry context
getfunction, deprecatedat - Added registry context
emplace_asfunction, deprecatedemplace_hint - Added registry context
insert_or_assignfunction - Merged virtual functions
swap_and_popandin_place_pop, storage classes only have to implementpopnow - Full support to non-movable types, component types have no more constraints (👈 this is huge 🥳)
- Partial allocator support for the
basic_registry<...>class (registry allocators also propagate to their pools) - Registry
swapandget_allocatorfunctions - Guaranteed order of destruction of the parts of a registry (context variables, components, ...)
- Allocator support for
storage_type[_t]andstorage_for[_t] - Added
basic_view<...>::refreshto reinitialize the leading pool of a view
-
graph(👈 new module):adjacency_matrixclass with support for directed and undirected graphs- Runtime organizer class (
flow) to create execution graphs from tasks and resource requirements - Basic
dotfunctions to convert an execution graph (and a graph in general) to the dot format
-
locator:- Support exporting and setting services across boundaries using opaque handles (see functions
handleandreset)
- Support exporting and setting services across boundaries using opaque handles (see functions
-
meta:- Container traits don't really support plain arrays anymore (if they ever did)
- Fixed an issue with
insert/eraseof meta sequence containers - Re-added
meta_type::remove_pointer - Added
meta_type::is_integralandmeta_type::is_signed meta_associative_container::erasereturns the number of elements removedmeta_rangeis now an alias template ofiterable_adaptorvoid *-to-meta_anyutility function formeta_types- Improve automatic detection of meta sequence containers
std::listandstd::dequeare also supported as meta sequence containers- Turn
operator!=formeta_anyinto an in-class function - All meta node (i.e.
meta_data_node,meta_func_nodeand so on) are no longer static - It's now possible to attach multiple properties to a meta object at different times
meta_constructalso accepts lambdas- Support to const/non-const overloads for the same meta function
- Context support (👈 this is huge 🥳), see the official documentation for further details
- Favor top-level conversion functions over bases lookup
-
poly:- Avoid using
std::aligned_storage_twithpoly(deprecated since C++23)
- Avoid using
-
process:- Added an
fwd.hppfile for the submodule
- Added an
-
resource:- Added more comparison operators for resource handles
- Added type members
handle_typeandelement_type - Added member function
handleto access the underlying handle
-
signal:- Full review of the
emitterclass dispatcheruses now anstd::allocator<void>by defaultsighuses now anstd::allocator<void>by default- Added allocator support to
basic_emitter
- Full review of the
Any other business:
- A good amount of functions and types were reviewed to make them
constexpr - A good amount of functions and types are now (conditionally)
noexceptno matter what - Added some utilities test to make all them work also in release mode (see
ENTT_DEBUG_TESTand the others) - Workflow
iwyu(I'll keep an eye on it and refine things a bit at a time) - Removed the aob target from cmake
Natvis support
All natvis files have been updated where necessary.
There exists a new natvis file named graph.natvis for the newly added submodule.
Breaking changes
-
config:ENTT_NOEXCEPT[_IF]no longer exists
-
core:identifierwas renamed toidentident::identifer_typewas renamed toident::value_typefamily::family_typewas renamed tofamily::value_type
-
entity:- Drop the
entity/utility.hppfile, usefwd.hppinstead - Updated API for
basic_registry<...>::group/group_if_exists basic_registry<...>::storage<T>doesn't accept const types anymorestorage_traitswas renamed tostorage_typestorage_type::storage_typewas renamed tostorage_type::type- Entity and component type were flipped in the definition of the
basic_storageclass template - Entity and component type were flipped in the definition of the
storage_typeutility basic_handle<...>::visitwas removed, use::storageinstead (iterable model)basic_registry<...>::storage(id)returns a (possibly null) pointer rather than an utterly annoying iterator
- Drop the
-
meta:- Container traits don't really support plain arrays anymore (if they ever did)
- Removed
meta_type::base(id)because pointless - Meta data and meta functions no longer return the associated id from the API
- Meta range iterators return now an id and meta object pair (i.e. for meta data or functions from a meta type)
- Only the single property API is now available for attaching properties to meta objects (no more
meta_factory<...>::props) make_metais no longer available (it doesn't fit with context support), usemeta_anyconstructors directly instead
-
resource:- Removed
resource::use_count, usehandle().use_count()instead
- Removed
-
signal:- Full review of the
emitterclass
- Full review of the
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.