EnTT v3.11.0
Changelog
-
config
:- Decouple
ENTT_NOEXCEPT
and 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
,count
andequal_range
functions - Dense set
max_size
,count
andequal_range
functions
- Dense map
-
core
:- A new
forward_apply
utility type_list_index[_v]
utility for type liststype_list_transform[_t]
utility for type listsnth_argument
utility to easily extract the n-th argument of a functioniota_iterator
(waiting for C++20)- Added
operator*
toinput_iterator_poointer
- Turn
operator!=
forany
into an in-class function - Avoid using
std::aligned_storage_t
withany
(deprecated since C++23) - Utility
is_tuple[_v]
- A new
-
entity
- Correctly handle overflow of version and max number of entities
- Turned
get_t
andexclude_t
into plain aliases fortype_list
- Updated API for
basic_registry<...>::group/group_if_exists
basic_sparse_set<...>::get
is 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_t
andstorage_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_group
andas_view
are transparent to the registry type (allocator oriented design)- Handles support all types of registries now (allocator oriented design)
invoke
andto_entity
helpers 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<...>::visit
with::storage
to return an iterable object rather than accepting lambdas - The
organizer
class uses the newflow
builder 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
get
function, deprecatedat
- Added registry context
emplace_as
function, deprecatedemplace_hint
- Added registry context
insert_or_assign
function - Merged virtual functions
swap_and_pop
andin_place_pop
, storage classes only have to implementpop
now - 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
swap
andget_allocator
functions - 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<...>::refresh
to reinitialize the leading pool of a view
-
graph
(👈 new module):adjacency_matrix
class with support for directed and undirected graphs- Runtime organizer class (
flow
) to create execution graphs from tasks and resource requirements - Basic
dot
functions 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
handle
andreset
)
- 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
/erase
of meta sequence containers - Re-added
meta_type::remove_pointer
- Added
meta_type::is_integral
andmeta_type::is_signed
meta_associative_container::erase
returns the number of elements removedmeta_range
is now an alias template ofiterable_adaptor
void *
-to-meta_any
utility function formeta_type
s- Improve automatic detection of meta sequence containers
std::list
andstd::deque
are also supported as meta sequence containers- Turn
operator!=
formeta_any
into an in-class function - All meta node (i.e.
meta_data_node
,meta_func_node
and so on) are no longer static - It's now possible to attach multiple properties to a meta object at different times
meta_construct
also 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_t
withpoly
(deprecated since C++23)
- Avoid using
-
process
:- Added an
fwd.hpp
file for the submodule
- Added an
-
resource
:- Added more comparison operators for resource handles
- Added type members
handle_type
andelement_type
- Added member function
handle
to access the underlying handle
-
signal
:- Full review of the
emitter
class dispatcher
uses now anstd::allocator<void>
by defaultsigh
uses 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)
noexcept
no matter what - Added some utilities test to make all them work also in release mode (see
ENTT_DEBUG_TEST
and 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
:identifier
was renamed toident
ident::identifer_type
was renamed toident::value_type
family::family_type
was renamed tofamily::value_type
-
entity
:- Drop the
entity/utility.hpp
file, usefwd.hpp
instead - Updated API for
basic_registry<...>::group/group_if_exists
basic_registry<...>::storage<T>
doesn't accept const types anymorestorage_traits
was renamed tostorage_type
storage_type::storage_type
was renamed tostorage_type::type
- Entity and component type were flipped in the definition of the
basic_storage
class template - Entity and component type were flipped in the definition of the
storage_type
utility basic_handle<...>::visit
was removed, use::storage
instead (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_meta
is no longer available (it doesn't fit with context support), usemeta_any
constructors directly instead
-
resource
:- Removed
resource::use_count
, usehandle().use_count()
instead
- Removed
-
signal
:- Full review of the
emitter
class
- 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.