Changelog
-
config
:- Added the
macro.h
file with a couple of utilities - Export the
ENTT_VERSION
string - 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_map
iterators are in the input iterator category but model either a forward (local) or a random (default) iteratordense_map::value_type
is 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
emplace
andinsert
functions of thedense_map
class - Strong exception guarantee for
emplace
andinsert
functions of thedense_set
class
- 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_deleter
andallocate_unique
(with uses-allocator construction guaranteed) compressed_pair
correctly manages references with piecewise constructionENTT_NOEXCEPT_IF
(for future uses)- Added an overload of
type_id
to get atype_info
from a variable - Allow to construct
type_info
objects directly (no static storage duration in this case)
-
entity
:- Optimized runtime view iterators
- Weak
basic_registry<...>::storage
for opaque operations across (eventually different) registries basic_runtime_view<...>::iterate/exclude
member functions to attach pools at runtimebasic_sparse_set<...>::emplace
returns an iterator to the inserted element (or the end iterator in case of errors)basic_sparse_set<...>::insert
returns an iterator to the inserted elements (or the end iterator in case of errors)sigh_storage_mixin
always 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'
::index
returns the right index (that is,offset - 1
) - Internal hook
basic_sparse_set<...>::try_emplace
was changed to return an iterator to the inserted element (orend()
) - Internal hook
basic_sparse_set<...>::try_emplace
was changed to accept an additional booleanforce_back
parameter basic_sparse_set<...>::insert
always appends elements rather than trying to fill tombstones if anybasic_storage<...>::insert
always appends elements rather than trying to fill tombstones if any- Internal hook
basic_sparse_set<...>::swap_and_pop
was changed to accept a couple of iterators - Internal hook
basic_sparse_set<...>::in_place_pop
was canged to accept a couple of iterators basic_sparse_set<...>::clear
no 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<...>::bump
to force-refresh an entity version- Drop
component_traits::::ignore_if_empty
, use::page_size
0 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_locator
tolocator
- Allocator support when creating new services (see
allocate_emplace
)
- Renamed
-
meta
:meta_type::invoke
also 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
scheduler
from 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_cache
API and functionalities - Full review of the
resource_handle
(nowresource
) class - Added a transparent
resource_loader
for basic cases
-
signal
:- Renamed
delegate::instance
todelegate::data
- Added support for named queues to the
basic_dispatcher
class - Enable fetching the number of pending events from a
basic_dispatcher
- Allocator support for the
basic_dispatcher
class
- 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<...>::erase
when usingbasic_sparse_set<...>::[const_]iterator
s
- 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_map
was renamed todense_map
dense_hash_set
was renamed todense_set
-
core
:- Removed
is_iterator_type[_v]
, no alternative provided - Removed
ENTT_LAUNDER
- Removed
-
entity
:basic_runtime_view
s do not have a vector-based constructor anymore, use::iterate
and::exclude
insteadbasic_registry<...>::runtime_view
no longer exists, use the default constructor, then::iterate
and::exclude
- Registry context functionalities have been moved to the standalone registry context class and are now part of its API
basic_sparse_set<...>::slot
is no longer available, no alternative providedbasic_sparse_set<...>
hooks were slightly changed for performance reasonsbasic_component_traits
doesn't exist anymore, all values should be specified explicitly- Renamed
basic_registry<...>::sortable
tobasic_registry<...>::owned
component_traits::::ignore_if_empty
isn't available anymore, set thepage_size
to 0 to avoid creating empty types
-
locator
:- Renamed
service_locator
tolocator
- 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_cache
API and functionalities - Full review of the
resource_handle
(nowresource
) class
- Removed class
-
signal
:delegate::instance
doesn't exist anymore, usedelegate::data
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 many changes and great improvements in this regard. Still a work in progress though.