Skip to content

EnTT v3.5.0

Compare
Choose a tag to compare
@skypjack skypjack released this 31 Aug 20:50
· 3733 commits to master since this release

Changelog

  • core:

    • Added type_info::name member function.
    • Added unpack_as_t and unpack_as_v utilities as type traits.
    • Added is_eto_eligible[_v] utility for internal purposes.
  • entity:

    • entt_traits: updated types for difference_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 of entt_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 and rend to sparse_sets.
    • Added reverse iterators, rbegin and rend to storages.
    • Added reverse iterators, rbegin and rend to groups.
    • Added reverse iterators, rbegin and rend to views.
    • views 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.
  • 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 to dispatcher.
    • 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, use registry::sortable.
  • meta:

    • meta_type::set and meta_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 for ref and dereferences pointer-like elements instead.
    • meta_ctor::prop with callback is no longer available, use the overload of meta_ctor::prop that returns an iterable object.
    • meta_data::prop with callback is no longer available, use the overload of meta_data::prop that returns an iterable object.
    • meta_func::prop with callback is no longer available, use the overload of meta_func::prop that returns an iterable object.
    • meta_type::base with callback is no longer available, use the overload of meta_type::base that returns an iterable object.
    • meta_type::conv with callback is no longer available, use the overload of meta_type::conv that returns an iterable object.
    • meta_type::ctor with callback is no longer available, use the overload of meta_type::ctor that returns an iterable object.
    • meta_type::data with callback is no longer available, use the overload of meta_type::data that returns an iterable object.
    • meta_type::func with callback is no longer available, use the overload of meta_type::func that returns an iterable object.
    • meta_type::prop with callback is no longer available, use the overload of meta_type::prop that returns an iterable object.
    • resolve with callback is no longer available, use the overload of resolve that returns an iterable object.
    • resolve_if is no longer available, use the overload of resolve that returns an iterable object.
    • meta_factory<...>::reset has been replaced by meta_type::reset.
  • resource:

    • cache has been renamed to resource_cache.
    • handle has been renamed to resource_handle.
    • loader has been renamed to resource_loader.
  • signal:

    • Renaming of exported functions: delegate::function_type becomes delegate::type.

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.

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.