Michele Caini/entt: Release v3.5.0
Name: entt
Owner: Michele Caini
Release: EnTT v3.5.0
Released: 2020-08-31
License: MIT
Release Assets:
Changelog
core
:- Added
type_info::name
member function. - Added
unpack_as_t
andunpack_as_v
utilities as type traits. - Added
is_eto_eligible[_v]
utility for internal purposes.
- Added
entity
:entt_traits
: updated types fordifference_type
.registry::remove_if_exists
returns the number of elements actually removed.- Added an overload of
registry::sortable
for groups. - Relaxed requirements on types from at least copyable to at least movable for the
snapshot
class. entt_traits
as sfinae-friendly class template to allow user defined custom identifiers other than enum classes.to_integral
no longer depends on identifiers, it works instead for all types for which a specialization ofentt_traits
exists.- Added the non-owning
entt::handle
class to wrap a couple entity/registry and pass it as argument to functions. - Made
entt::null_t
publicly available. - Added
view::proxy
member function that returns an iterable object to visit entities and components at once. - Added
group::proxy
member function that returns an iterable object to visit entities and components at once. entt::to_entity
function that returns the entity associated with a given component.- Runtime views also support excluded components.
- Added a sfinae-friendly utility for component-to-pool conversions.
- Chunked iteration for multi-component views.
- Added reverse iterators,
rbegin
andrend
tosparse_set
s. - Added reverse iterators,
rbegin
andrend
tostorage
s. - Added reverse iterators,
rbegin
andrend
togroup
s. - Added reverse iterators,
rbegin
andrend
toview
s. view
s use only stable candidates and refresh them less frequently.
meta
- Allowed null setters on meta data members (explicit read-only mode).
.data<&clazz::member>
is now an alias of.data<&clazz::member, &clazz::member>
and therefore supports non-const to const conversion for data members (literally.data<nullptr, &clazz::member>
).- Defined a
meta_range<T>
iterable type to visit all meta objects of a given type. - Added an overload of
meta_ctor::prop
that returns an iterable object to visit all properties. - Added an overload of
meta_data::prop
that returns an iterable object to visit all properties. - Added an overload of
meta_func::prop
that returns an iterable object to visit all properties. - Added an overload of
meta_type::base
that returns an iterable object to visit all bases. - Added an overload of
meta_type::conv
that returns an iterable object to visit all conversion functions. - Added an overload of
meta_type::ctor
that returns an iterable object to visit all constructors. - Added an overload of
meta_type::data
that returns an iterable object to visit all data members. - Added an overload of
meta_type::func
that returns an iterable object to visit all member functions. - Added an overload of
meta_type::prop
that returns an iterable object to visit all properties. resolve
offers an overload that returns an iterable object to visit all meta types.meta_type::rank
returns the rank of an array when the meta type wraps a C-style array, 0 otherwise.meta_type::extent
accepts also the dimension (default to 0).meta_handle
is now copyable.- Built-in support for containers.
- Built-in support for pointer-like types.
meta_any::operator*
dereferences the wrapped element in case of pointer-like types and returns a wrapper for the pointed object.- Meta constructors and meta functions also accept a
meta_any *
+ size pair. - Added
meta_type::reset
member function to reset meta types and remove them from the list of searchable types.
platform
:- Added a support file to use
EnTT
on Android with the NDK r17.
- Added a support file to use
signal
:delegate
supports runtime parameters with optional payload.delegate
accepts non-capturing lambda functions as runtime parameters.dispatcher::enqueue
supports also aggregates.- Added opaque
disconnect
function todispatcher
. - The event passed to the listeners of a
dispatcher
isn't const by default anymore. - The event passed to the listeners of an
emitter
isn't const by default anymore.
type_index
based lookup is now an opt-in alternative for standalone applications and no longer the default.Added a new section in the wiki about the available definitions to be used to tune the library.
Added meaningful messages to static asserts.
[[nodiscard]]
everywhere.Performance improvements here and there (sparse set expansion, ...).
Breaking changes
core
:ENTT_OPAQUE_TYPE
is no longer available, define your own enum class or custom type instead.
entity
:group::sortable
is no longer available, useregistry::sortable
.
meta
:meta_type::set
andmeta_type::get
overloads to work with the i-th element of a C-style array are no longer available.meta_any::operator*
is not longer an alias forref
and dereferences pointer-like elements instead.meta_ctor::prop
with callback is no longer available, use the overload ofmeta_ctor::prop
that returns an iterable object.meta_data::prop
with callback is no longer available, use the overload ofmeta_data::prop
that returns an iterable object.meta_func::prop
with callback is no longer available, use the overload ofmeta_func::prop
that returns an iterable object.meta_type::base
with callback is no longer available, use the overload ofmeta_type::base
that returns an iterable object.meta_type::conv
with callback is no longer available, use the overload ofmeta_type::conv
that returns an iterable object.meta_type::ctor
with callback is no longer available, use the overload ofmeta_type::ctor
that returns an iterable object.meta_type::data
with callback is no longer available, use the overload ofmeta_type::data
that returns an iterable object.meta_type::func
with callback is no longer available, use the overload ofmeta_type::func
that returns an iterable object.meta_type::prop
with callback is no longer available, use the overload ofmeta_type::prop
that returns an iterable object.resolve
with callback is no longer available, use the overload ofresolve
that returns an iterable object.resolve_if
is no longer available, use the overload ofresolve
that returns an iterable object.meta_factory<...>::reset
has been replaced bymeta_type::reset
.
resource
:cache
has been renamed toresource_cache
.handle
has been renamed toresource_handle
.loader
has been renamed toresource_loader
.
signal
:- Renaming of exported functions:
delegate::function_type
becomesdelegate::type
.
- Renaming of exported functions:
Deprecated features
All previously deprecated functions and classes have been removed. This is the list of features deprecated with this release:
entity
:- The
actor
class will be removed in a future release.
- The
Examples
- Added an example of custom identifier that isn't an enum class and is initialized with
entt::null
by default.
Any other business
The documentation is up-to-date and the library is battle-tested with 100% coverage as usual.
I've also updated the FAQs and the section EnTT
in Action with more and more examples.
I started a long term process to reduce the number of instantiations and therefore speed up the compilation. This release contains some more changes in this regard. Still a work in progress though.