github skypjack/entt v3.10.0
EnTT v3.10.0

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

Changelog

  • config:

    • Added the macro.h file with a couple of utilities
    • Export the ENTT_VERSION string
    • Detect version and configuration mismatches automatically on Windows
  • container:

    • Uses-allocator construction guaranteed for dense_set
    • Uses-allocator construction guaranteed for dense_map
    • dense_map iterators are in the input iterator category but model either a forward (local) or a random (default) iterator
    • dense_map::value_type is either pair<const T &, U &> or pair<const T &, const U &> (zip iterator type)
    • No more risky UBs due to type punning or destroy/construct within a vector for a dense_map
    • Strong exception guarantee for emplace and insert functions of the dense_map class
    • Strong exception guarantee for emplace and insert functions of the dense_set class
  • core:

    • Store size with hashed strings
    • Decouple begin/end iterator types of iterable_adaptor
    • Utility uses_allocator_construction_args (waiting for C++20)
    • Utility make_obj_using_allocator (waiting for C++20)
    • Utility uninitialized_construct_using_allocator (waiting for C++20)
    • Added utilities allocation_deleter and allocate_unique (with uses-allocator construction guaranteed)
    • compressed_pair correctly manages references with piecewise construction
    • ENTT_NOEXCEPT_IF (for future uses)
    • Added an overload of type_id to get a type_info from a variable
    • Allow to construct type_info objects directly (no static storage duration in this case)
  • entity:

    • Optimized runtime view iterators
    • Weak basic_registry<...>::storage for opaque operations across (eventually different) registries
    • basic_runtime_view<...>::iterate/exclude member functions to attach pools at runtime
    • basic_sparse_set<...>::emplace returns an iterator to the inserted element (or the end iterator in case of errors)
    • basic_sparse_set<...>::insert returns an iterator to the inserted elements (or the end iterator in case of errors)
    • sigh_storage_mixin always triggers an emplace request notification (in sync with unbalanced destroy)
    • Chained constructors support (ie parent-to-child propagation) for default storage classes
    • Arguments provided to storage classes are always discarded for empty types
    • Standalone registry context type returned by the .ctx() method, all context functionalities are part of its API now
    • Support to named context variables (through emplace_hint)
    • basic_registry<...>::storage<T> is no longer [[nodiscard]]
    • basic_registry<...>::storage<T> also supports const qualified types
    • Sparse set's iterators' ::index returns the right index (that is, offset - 1)
    • Internal hook basic_sparse_set<...>::try_emplace was changed to return an iterator to the inserted element (or end())
    • Internal hook basic_sparse_set<...>::try_emplace was changed to accept an additional boolean force_back parameter
    • basic_sparse_set<...>::insert always appends elements rather than trying to fill tombstones if any
    • basic_storage<...>::insert always appends elements rather than trying to fill tombstones if any
    • Internal hook basic_sparse_set<...>::swap_and_pop was changed to accept a couple of iterators
    • Internal hook basic_sparse_set<...>::in_place_pop was canged to accept a couple of iterators
    • basic_sparse_set<...>::clear no longer creates tombstones (it actually removes all of them)
    • Automatic traits deduction for the component class, drop basic_component_traits
    • Uses-allocator construction guaranteed for storage classes
    • All storage classes support entity and component types with custom swap functions
    • basic_sparse_set<...>::bump to force-refresh an entity version
    • Drop component_traits::::ignore_if_empty, use ::page_size 0 for empty types
    • Allow creating pool during a call to basic_registry<...>::destroy (ie from a listener)
    • Added a constructor to reserve enough memory for N pools on creation
  • locator:

    • Renamed service_locator to locator
    • Allocator support when creating new services (see allocate_emplace)
  • meta:

    • meta_type::invoke also searches into the base types for a candidate function
    • Added a compile-time check to prevent attaching a type as a meta base of itself
    • Meta sequence containers iterators belong to the input iterator category but model a forward iterator
    • Relaxed meta sequence containers requirements
    • Dereferencing a pointer-like object that converts to bool works in all cases (false implies empty meta_any)
  • process:

    • Allow attaching tasks to a scheduler from already running processes
  • resource:

    • Make resource handles equality comparable
    • Removed class resource_loader, made the loader a template parameter of the resource_cache
    • Full review of the resource_cache API and functionalities
    • Full review of the resource_handle (now resource) class
    • Added a transparent resource_loader for basic cases
  • signal:

    • Renamed delegate::instance to delegate::data
    • Added support for named queues to the basic_dispatcher class
    • Enable fetching the number of pending events from a basic_dispatcher
    • Allocator support for the basic_dispatcher class
  • Performance improvements:

    • Improved performance for basic_registry<...>::remove
    • Improved performance for basic_registry<...>::erase
    • Blazing fast basic_sparse_set<...>::clear
    • Blazing fast basic_sparse_set<...>::erase when using basic_sparse_set<...>::[const_]iterators
  • Build system:

    • Removed the in-source build check

Natvis support

  • Added info about the sparse array of a sparse set (non-null elements only)
  • Updated representation for hashed strings (also include size)
  • Updated representation for the registry context
  • Updated representation for dense map and dense set
  • Updated representation for all classes in the resource module

Breaking changes

  • container:

    • dense_hash_map was renamed to dense_map
    • dense_hash_set was renamed to dense_set
  • core:

    • Removed is_iterator_type[_v], no alternative provided
    • Removed ENTT_LAUNDER
  • entity:

    • basic_runtime_views do not have a vector-based constructor anymore, use ::iterate and ::exclude instead
    • basic_registry<...>::runtime_view no longer exists, use the default constructor, then ::iterate and ::exclude
    • Registry context functionalities have been moved to the standalone registry context class and are now part of its API
    • basic_sparse_set<...>::slot is no longer available, no alternative provided
    • basic_sparse_set<...> hooks were slightly changed for performance reasons
    • basic_component_traits doesn't exist anymore, all values should be specified explicitly
    • Renamed basic_registry<...>::sortable to basic_registry<...>::owned
    • component_traits::::ignore_if_empty isn't available anymore, set the page_size to 0 to avoid creating empty types
  • locator:

    • Renamed service_locator to locator
    • Full review of the locator's API (all functions are still there but they've likely a different name)
  • resource:

    • Removed class resource_loader, made the loader a template parameter of the resource_cache
    • Full review of the resource_cache API and functionalities
    • Full review of the resource_handle (now resource) class
  • signal:

    • delegate::instance doesn't exist anymore, use delegate::data instead

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.