github skypjack/entt v3.8.0
EnTT v3.8.0

latest releases: v3.15.0, v3.14.0, v3.13.2...
4 years ago

Changelog

  • config:

    • Added error messages to ENTT_ASSERT.
    • Added ENTT_LAUNDER to support older compilers that don't offer std::launder.
    • Replaced ENTT_PAGE_SIZE with ENTT_SPARSE_PAGE and ENTT_PACKED_PAGE.
    • Added ENTT_NOEXCEPTION to fully suppress support for exceptions.
    • ENTT_NO_EXCEPT is automatically defined.
    • Added ENTT_THROW, ENTT_TRY and ENTT_CATCH.
  • core:

    • Refined aggregate support in any to make it closer to its standard counterpart.
    • Added make_any and forward_as_any functions.
    • Drastically reduced the number of instantiations/size of vtables due to any.
    • Added basic_any<...>::owner to know if the wrapper also owns the contained object.
    • Added traits is_iterator[_v] and is_iterator_type[_v].
  • entity:

    • Storage is always in a valid state upon component removal (component destructors can RW access their own pools).
    • Updated ::raw member function for views and groups to make it opaque (support for fancy pointers from storage).
    • Updated basic_sparse_set<E>::remove to make it work also with entities that aren't part of the set.
    • Added basic_sparse_set<E>::erase that works only with entities that are already in the set.
    • basic_registry<E>::remove<T...> also accepts entities that don't have the given components (replaces ::remove_if_exists).
    • Added basic_registry<E>::erase<T...> that triggers an error if the entities don't have the given components (it was ::remove).
    • basic_handle<E>::remove<T...> also accepts types that aren't assigned to the entity (replaces ::remove_if_exists).
    • Added basic_handle<E>::erase<T...> that triggers an error if the entity doesn't have the given components (it was ::remove).
    • Allocator support for sparse sets and storage classes.
    • to_entity returns entt::null for invalid components.
    • Much faster registry::create for multiple entities (about twice the performance).
    • basic_registry<E>::insert and basic_storage<E, T>::insert with component array no longer require the end iterator.
    • Review of entt_traits design (added built-in functions ::to_entity, ::to_integral, ::to_version, and so on).
    • Entity type for class type identifiers is borrowed from entity_type member type (specializing entt_traits is no longer required).
    • Exception safety for all storage functions is either strong or basic.
    • Added the tombstone_t type and the entt::tombstone constexpr variable for tombstone versions.
    • Updated the registry to skip the tombstone version and overflow to 0 on entity deletion.
    • Added null_t::operator| to combine the null entity with any identifier (similar to tombstone_t::operator|).
    • Added component_traits (see component.hpp) to set the ETO policy (ignore_if_empty) and the deletion policy (in_place_delete).
    • Prevented groups from being mixed with tombstone.
    • Added support to compact one, more or all pools from the registry API.
    • Split views and view_iterators, drastically reduced the number of instantiations due to views.
    • Added stable/packed storage policy support to views (automatic detection of the deletion policy).
    • Added basic_sparse_set<E>::policy method for opaque runtime detection of the deletion policy.
    • Added support for storage policy (tombstones) to runtime views (automatic detection of the deletion policy).
    • Support for in-place deletion and pointer stability upon deletion on a per-type basis with automatic detection during iterations.
    • Support for pointer (and therefore reference) stability when assigning components to entities.
    • Registry const ::view/::group function also support non-const types.
    • Added ::release (aka force-destroy) overloads to the registry class.
    • Added ::released function to the registry class to replace ::destroyed.
    • Fast path on non-view iterators for range basic_registry<E>::destroy.
    • Improved performance on component destruction (it affects multiple functionalities like destroying entities and components).
    • Allow storage classes to inhibit component destruction for any reason.
    • Added the basic_sparse_set<E>::slot function to return the next slot available for insertion.
    • basic_sparse_set<E>::emplace returns now the slot used for insertion.
    • Added basic_sparse_set<E>::emplace_back function to force back insertion (and skip the tombstone chain check).
    • Allow non-const types in const overloads of registry context variable getters.
  • meta:

    • C-style arrays (eg T[N] or T[N][M]) aren't treated as pointer-like types.
    • Added make_meta and forward_as_meta functions.
    • Drastically reduced the number of instantiations/size of vtables due to meta_any.
  • resource:

    • Added a bunch of conversion functions to resource_handle.
  • Performance improvements here and there (ie registry ::create and ::destroy, component destruction/emplace/insert, ...).

Bug fixes

  • core:
    • basic_any<...>::operator=(const basic_any<...> &other) can result in an invalid state when other isn't copyable.

Deprecated feature

  • core:

    • Deprecated std::reference_wrapper support: use std::in_place_type<T &>, use make_any or ::emplace<T &> instead.
  • entity:

    • basic_registry<E>::remove_if_exists: use ::remove instead (it also supports iterators).
    • basic_handle<E>::remove_if_exists: use ::remove instead (it also supports iterators).
    • basic_registry<E>::remove_all: use ::destroy(e); ::create(e) instead.
    • basic_handle<E>::remove_all: no longer supported.
    • basic_registry<E>::reserve_pools: no longer supported.
    • basic_registry<E>::destroyed: use ::released instead.
  • meta:

    • Deprecated std::reference_wrapper support: use std::in_place_type<T &>, use make_meta or ::emplace<T &> instead.

Breaking changes

  • config:

    • ENTT_ASSERT now receives two arguments (condition and error message).
    • Removed ENTT_PAGE_SIZE, use ENTT_SPARSE_PAGE and ENTT_PACKED_PAGE instead.
    • Defining ENTT_NO_EXCEPT triggers an error, use ENTT_NO_EXCEPTION to fully disable exceptions instead.
  • core:

    • Removed entt::is_empty[_v] and ENTT_IS_EMPTY, no longer required/supported.
  • entity

    • view::raw and group::raw return now a paged array of components (for pointer stability).
    • basic_registry<E>::insert and basic_storage<E, T>::insert no longer require the end iterator.
    • No longer required to specialize entt_traits. Otherwise, provide member function ::to_entity, ::to_version, and so on.
    • Removed about_to_pop virtual function from the sparse set class.
  • poly:

    • Removed std::reference_wrapper support (reference in-place construction still available).
  • process:

    • process::dead has been renamed to process::finished.

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.

Don't miss a new entt release

NewReleases is sending notifications on new releases.