Skip to content

EnTT v4.0.0

Latest

Choose a tag to compare

@skypjack skypjack released this 23 Jul 12:22

Changelog

  • config:

    • ENTT_CONSTEXPR is no longer available
    • ENTT_NOEXCEPTION renamed into ENTT_NO_EXCEPTION
    • Add ENTT_USE_STL (mainly for testing purposes)
    • Support injecting configuration via optional <entt/ext/config.h> header 👈✍️
  • core:

    • entt::identity is no longer available
    • entt::popcount is no longer available
    • entt::has_single_bit is no longer available
    • entt::next_power_of_two is no longer available
    • entt::type_identity is no longer available
    • entt::to_address is no longer available
    • Added concept enum_bitmask
    • Added concept cvref_unqualified
    • Refine type_info definition to favor concepts over sfinae
    • Invoking as_ref on an empty any returns and empty any
    • Update type_id definitions for the best
    • member_class is conditional_t friendly
  • entity

    • View-to-view conversion support for all view types
    • Added concept entt_like
    • Refine component_traits definition to favor concepts over sfinae
    • Perf improvements on storage destruction for trivially destructible types
    • Perf improvements on component destruction for trivially destructible types
    • Perf improvements when shrinking storage types
    • Reintroduce storage support to arguments for empty types
  • meta:

    • name returns an std::string_view for all meta objects
    • Added the new meta_base object
    • base() returns meta_base objects in all cases
    • Added concept meta_policy
    • Support name clashing between meta data/functions and types
    • Refine is_meta_pointer_like definition to favor concepts over sfinae
    • Copying a meta_any that wraps a non-copyable type returns an invalid meta_any
    • Added a non-const overload of meta_any::operator*
    • Pointers are no longer pointer-like types
    • meta_any supports all dereferenceable types, i.e. optionals (constness is also guaranteed)
    • Meta containers are automatically detected, meta container traits are used to opt-out
    • Multi meta type support for the same C++ type 👈😲
    • meta_types can be injected into meta_anys to rebind overloaded types as needed
    • meta_data::arity replaced with meta_data::set_arity and meta_data::get_arity
    • meta_data::arg replaced with meta_data::set_arg and meta_data::get_arg
    • meta_ctx_arg_t and meta_ctx_arg are exported via fwd.hpp too
    • meta_type::id renamed to meta_type::alias
    • meta_data::set supports additional arguments upon invocation (useful for custom setters)
    • meta_data::get supports additional arguments upon invocation (useful for custom getters)
  • signal:

    • Support enqueueing the same event type in a dispatcher from listeners
    • Update dispatcher trigger function to only accept already constructed events
  • stl:

    • A brand new submodule, mainly designed for internal purposes
    • Custom STL injection support 👈🥳
  • tools:

    • Make davey visit meta base types
    • Conditionally include <imgui> in davey.hpp
    • Improve a little the testbed for davey, but it's still a work in progress

Build system

  • C++20 is now required to use EnTT
  • Minimum cmake version updated to 3.28
  • Minimum doxygen version updated to 1.14

Natvis support

All natvis files have been updated where necessary.

Breaking changes

  • config:

    • ENTT_CONSTEXPR is no longer available, use constexpr instead
    • ENTT_NOEXCEPTION renamed into ENTT_NO_EXCEPTION
  • core:

    • entt::identity is no longer available, use std::identity instead
    • entt::popcount is no longer available, use std::popcount instead
    • entt::has_single_bit is no longer available, use std::has_single_bit instead
    • entt::next_power_of_two is no longer available, use std::bit_ceil instead
    • entt::type_identity is no longer available, use std::type_identity instead
    • entt::to_address is no longer available, use std::to_address instead
    • type_info no longer matches sfinae-based specialization, use concepts instead
  • entity:

    • component_traits no longer matches sfinae-based specializations, use concepts instead
  • meta:

    • base() returns meta_base objects instead of meta_types
    • is_meta_pointer_like no longer matches sfinae-based specialization, use concepts instead
    • Pointers are no longer pointer-.like types, check the right trait as needed
    • Meta containers are automatically detected, meta container traits are used to opt-out
    • meta_data::arity was removed, use meta_data::set_arity and meta_data::get_arity instead
    • meta_data::arg was removed, use meta_data::set_arg and meta_data::get_arg instead
    • meta_type::id no longer exists, use meta_type::alias instead
    • meta_type::invoke overload for meta_any * is not supported anymore
    • meta_func::invoke overload for meta_any * is not supported anymore
    • meta_type::construct overload for meta_any * is not supported anymore
  • signal:

    • The trigger function of a dispatcher only accepts already constructed events now

Any other business

The library requires C++20-ish and works fine on all major platforms, consoles, whatever.
All previously deprecated functions and classes have been removed.
The clang-format configuration has been updated to match with the coding style.
The documentation is up-to-date and the library is battle-tested with 100% coverage as usual.