Skip to content

EnTT v3.11.0

Compare
Choose a tag to compare
@skypjack skypjack released this 09 Nov 11:24
· 2251 commits to master since this release

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)
  • container:

    • Dense map max_size, count and equal_range functions
    • Dense set max_size, count and equal_range functions
  • core:

    • A new forward_apply utility
    • type_list_index[_v] utility for type lists
    • type_list_transform[_t] utility for type lists
    • nth_argument utility to easily extract the n-th argument of a function
    • iota_iterator (waiting for C++20)
    • Added operator* to input_iterator_poointer
    • Turn operator!= for any into an in-class function
    • Avoid using std::aligned_storage_t with any (deprecated since C++23)
    • Utility is_tuple[_v]
  • entity

    • Correctly handle overflow of version and max number of entities
    • Turned get_t and exclude_t into plain aliases for type_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 and storage_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 and as_view are transparent to the registry type (allocator oriented design)
    • Handles support all types of registries now (allocator oriented design)
    • invoke and to_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 new flow 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, deprecated at
    • Added registry context emplace_as function, deprecated emplace_hint
    • Added registry context insert_or_assign function
    • Merged virtual functions swap_and_pop and in_place_pop, storage classes only have to implement pop 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 and get_allocator functions
    • Guaranteed order of destruction of the parts of a registry (context variables, components, ...)
    • Allocator support for storage_type[_t] and storage_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 and reset)
  • 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 and meta_type::is_signed
    • meta_associative_container::erase returns the number of elements removed
    • meta_range is now an alias template of iterable_adaptor
    • void *-to-meta_any utility function for meta_types
    • Improve automatic detection of meta sequence containers
    • std::list and std::deque are also supported as meta sequence containers
    • Turn operator!= for meta_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 with poly (deprecated since C++23)
  • process:

    • Added an fwd.hpp file for the submodule
  • resource:

    • Added more comparison operators for resource handles
    • Added type members handle_type and element_type
    • Added member function handle to access the underlying handle
  • signal:

    • Full review of the emitter class
    • dispatcher uses now an std::allocator<void> by default
    • sigh uses now an std::allocator<void> by default
    • Added allocator support to basic_emitter

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 to ident
    • ident::identifer_type was renamed to ident::value_type
    • family::family_type was renamed to family::value_type
  • entity:

    • Drop the entity/utility.hpp file, use fwd.hpp instead
    • Updated API for basic_registry<...>::group/group_if_exists
    • basic_registry<...>::storage<T> doesn't accept const types anymore
    • storage_traits was renamed to storage_type
    • storage_type::storage_type was renamed to storage_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
  • 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), use meta_any constructors directly instead
  • resource:

    • Removed resource::use_count, use handle().use_count() instead
  • signal:

    • Full review of the emitter class

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.