EnTT v3.12.0
Changelog
-
config
:ENTT_FAIL(msg)
as an alias ofENTT_ASSERT(false, msg)
-
core
:is_equality_comparable
also detects C-style arrays- Added
value_list_index[_v]
,value_list_unique[_t]
,value_list_contains[_v]
andvalue_list_diff[_t]
std::tuple
traits specialization forentt::type_list
andentt::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_helper
utility to simplify connecting multiple listeners to a registry- Public
basic_sparse_set<...>::traits_type
type member - Public
basic_storage<...>::traits_type
type member - Public
basic_registry<...>::traits_type
type member component_traits
treatvoid
properly as any other component type- Split
entt_traits
andbasic_entt_traits
to simplify specializing the former - Make
entity_mask
andversion_mask
available throughentt_traits
- Add
entt_traits::base_type
for the final user (not used internally) - Make
basic_registry
work properly withvoid
component type - Handles discard their entities on destruction
- Improved removing/erasing elements when a
sigh_mixin
is attached to a storage - Added internal, opaque
data
function to sparse set iterators - Additional internal virtual
clear_all
function available in thebasic_sparse_set<...>
class - Improved performance of sparse set
remove
,erase
andclear
functions - Improved performance of registry
remove
,erase
,clear
anddestroy
functions deletion_policy
is now publicly available viaentity/fwd.hpp
- Added
basic_sparse_set<...>::contiguous
function extended_storage_iterator::base
makes the underlying iterator availableextended_view_iterator::base
makes the underlying iterator availableextended_group_iterator::base
makes the underlying iterator available- Added a specialization of
basic_storage
when 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::next
returns 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<...>::bump
returns the version in usebasic_storage<...>::insert
returns 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<...>::group
is no longer[[nodiscard]]
- Configurable mask type for
basic_observer
- Allocator support for
basic_observer
get_t
,owned_t
andexclude_t
are (constexpr constructible) types now rather than aliases oftype_list
basic_storage
usesallocator_traits::destroy
now rather thanstd::destroy_at
(to allow specializations if needed)- Make
basic_registry<...>::storage_for_type<...>
available to the final user basic_view<..>::operator bool
returns 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_destroy
ofbasic_registry<...>
also support named pools- Added a reverse each function (
reach
, worst name ever) to all storage classes basic_registry<...>::erase_if
to 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_any
ref) - 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_scheduler
with default delta type for common cases - Turn
scheduler
into an alias forbasic_scheduler<std::uint32_t>
- Introduced
-
signal
:- Added
delegate::target
to get a pointer to the stored callable function - Refined transparent aggregate support for the dispatcher class
delegate
also supports functions that skip first elements (on second attempt only)- Allow disconnecting listeners during iterations over the
sigh
class
- 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
/W1
on 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_cast
ormeta_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_v
doesn't exist anymore, usecomponent_traits<...>::page_size
insteadentt_traits::reserved
is no longer available, combineentity_mask
andversion_mask
insteadbasic_sparse_set<...>::swap_at
is now a protected function, overrideswap_or_move
as needed insteadbasic_sparse_set<...>::move_element
doesn't exist anymore, useswap_or_move
instead (with checks onto
if needed)sigh_storage_mixin
was renamed intosigh_mixin
basic_sparse_set<...>::emplace
was renamed topush
basic_sparse_set<...>::insert
was renamed topush
basic_sparse_set<...>::get
was renamed tovalue
basic_sparse_set<...>::sort
was renamed tosort_as
basic_group<...>::sort
(no callback overload) was renamed tosort_as
basic_registry<...>::base_type
was renamed tocommon_type
basic_group<...>::base_type
was renamed tocommon_type
runtime_view<...>::base_type
was renamed tocommon_type
basic_view<...>::base_type
was 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
:scheduler
no longer requires a template parameter, usebasic_scheduler
ifstd::uint32_t
isn't a good enough delta type
-
signal
:disconnect
by reference is no longer available on thesink
class, use the overload that accepts a pointer insteadsink<...>::before
is 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.