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.