EnTT v3.10.0
Changelog
-
config:- Added the
macro.hfile with a couple of utilities - Export the
ENTT_VERSIONstring - Detect version and configuration mismatches automatically on Windows
- Added the
-
container:- Uses-allocator construction guaranteed for
dense_set - Uses-allocator construction guaranteed for
dense_map dense_mapiterators are in the input iterator category but model either a forward (local) or a random (default) iteratordense_map::value_typeis eitherpair<const T &, U &>orpair<const T &, const U &>(zip iterator type)- No more risky UBs due to type punning or destroy/construct within a vector for a
dense_map - Strong exception guarantee for
emplaceandinsertfunctions of thedense_mapclass - Strong exception guarantee for
emplaceandinsertfunctions of thedense_setclass
- Uses-allocator construction guaranteed for
-
core:- Store size with hashed strings
- Decouple begin/end iterator types of
iterable_adaptor - Utility
uses_allocator_construction_args(waiting for C++20) - Utility
make_obj_using_allocator(waiting for C++20) - Utility
uninitialized_construct_using_allocator(waiting for C++20) - Added utilities
allocation_deleterandallocate_unique(with uses-allocator construction guaranteed) compressed_paircorrectly manages references with piecewise constructionENTT_NOEXCEPT_IF(for future uses)- Added an overload of
type_idto get atype_infofrom a variable - Allow to construct
type_infoobjects directly (no static storage duration in this case)
-
entity:- Optimized runtime view iterators
- Weak
basic_registry<...>::storagefor opaque operations across (eventually different) registries basic_runtime_view<...>::iterate/excludemember functions to attach pools at runtimebasic_sparse_set<...>::emplacereturns an iterator to the inserted element (or the end iterator in case of errors)basic_sparse_set<...>::insertreturns an iterator to the inserted elements (or the end iterator in case of errors)sigh_storage_mixinalways triggers an emplace request notification (in sync with unbalanced destroy)- Chained constructors support (ie parent-to-child propagation) for default storage classes
- Arguments provided to storage classes are always discarded for empty types
- Standalone registry context type returned by the
.ctx()method, all context functionalities are part of its API now - Support to named context variables (through
emplace_hint) basic_registry<...>::storage<T>is no longer[[nodiscard]]basic_registry<...>::storage<T>also supports const qualified types- Sparse set's iterators'
::indexreturns the right index (that is,offset - 1) - Internal hook
basic_sparse_set<...>::try_emplacewas changed to return an iterator to the inserted element (orend()) - Internal hook
basic_sparse_set<...>::try_emplacewas changed to accept an additional booleanforce_backparameter basic_sparse_set<...>::insertalways appends elements rather than trying to fill tombstones if anybasic_storage<...>::insertalways appends elements rather than trying to fill tombstones if any- Internal hook
basic_sparse_set<...>::swap_and_popwas changed to accept a couple of iterators - Internal hook
basic_sparse_set<...>::in_place_popwas canged to accept a couple of iterators basic_sparse_set<...>::clearno longer creates tombstones (it actually removes all of them)- Automatic traits deduction for the component class, drop
basic_component_traits - Uses-allocator construction guaranteed for storage classes
- All storage classes support entity and component types with custom swap functions
basic_sparse_set<...>::bumpto force-refresh an entity version- Drop
component_traits::::ignore_if_empty, use::page_size0 for empty types - Allow creating pool during a call to
basic_registry<...>::destroy(ie from a listener) - Added a constructor to reserve enough memory for N pools on creation
-
locator:- Renamed
service_locatortolocator - Allocator support when creating new services (see
allocate_emplace)
- Renamed
-
meta:meta_type::invokealso searches into the base types for a candidate function- Added a compile-time check to prevent attaching a type as a meta base of itself
- Meta sequence containers iterators belong to the input iterator category but model a forward iterator
- Relaxed meta sequence containers requirements
- Dereferencing a pointer-like object that converts to bool works in all cases (false implies empty
meta_any)
-
process:- Allow attaching tasks to a
schedulerfrom already running processes
- Allow attaching tasks to a
-
resource:- Make resource handles equality comparable
- Removed class
resource_loader, made the loader a template parameter of theresource_cache - Full review of the
resource_cacheAPI and functionalities - Full review of the
resource_handle(nowresource) class - Added a transparent
resource_loaderfor basic cases
-
signal:- Renamed
delegate::instancetodelegate::data - Added support for named queues to the
basic_dispatcherclass - Enable fetching the number of pending events from a
basic_dispatcher - Allocator support for the
basic_dispatcherclass
- Renamed
-
Performance improvements:
- Improved performance for
basic_registry<...>::remove - Improved performance for
basic_registry<...>::erase - Blazing fast
basic_sparse_set<...>::clear - Blazing fast
basic_sparse_set<...>::erasewhen usingbasic_sparse_set<...>::[const_]iterators
- Improved performance for
-
Build system:
- Removed the in-source build check
Natvis support
- Added info about the sparse array of a sparse set (non-null elements only)
- Updated representation for hashed strings (also include size)
- Updated representation for the registry context
- Updated representation for dense map and dense set
- Updated representation for all classes in the resource module
Breaking changes
-
container:dense_hash_mapwas renamed todense_mapdense_hash_setwas renamed todense_set
-
core:- Removed
is_iterator_type[_v], no alternative provided - Removed
ENTT_LAUNDER
- Removed
-
entity:basic_runtime_views do not have a vector-based constructor anymore, use::iterateand::excludeinsteadbasic_registry<...>::runtime_viewno longer exists, use the default constructor, then::iterateand::exclude- Registry context functionalities have been moved to the standalone registry context class and are now part of its API
basic_sparse_set<...>::slotis no longer available, no alternative providedbasic_sparse_set<...>hooks were slightly changed for performance reasonsbasic_component_traitsdoesn't exist anymore, all values should be specified explicitly- Renamed
basic_registry<...>::sortabletobasic_registry<...>::owned component_traits::::ignore_if_emptyisn't available anymore, set thepage_sizeto 0 to avoid creating empty types
-
locator:- Renamed
service_locatortolocator - Full review of the
locator's API (all functions are still there but they've likely a different name)
- Renamed
-
resource:- Removed class
resource_loader, made the loader a template parameter of theresource_cache - Full review of the
resource_cacheAPI and functionalities - Full review of the
resource_handle(nowresource) class
- Removed class
-
signal:delegate::instancedoesn't exist anymore, usedelegate::datainstead
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.