You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
basic_sparse_set<...>::bump returns the version in use
basic_storage<...>::insert returns an iterator to the range of inserted elements
Storage based groups fully support multiple storage of the same type now
Huge internal rework to reduce the dependencies between the registry and the group classes/handlers
All group types have a .handle() function to return a reference to the leading storage
basic_registry<...>::group is no longer [[nodiscard]]
Configurable mask type for basic_observer
Allocator support for basic_observer
get_t, owned_t and exclude_t are (constexpr constructible) types now rather than aliases of type_list
basic_storage uses allocator_traits::destroy now rather than std::destroy_at (to allow specializations if needed)
Make basic_registry<...>::storage_for_type<...> available to the final user
basic_view<..>::operator bool returns true only for fully initialized views
Uninitialized views behave correctly in all circumstances, returning the expected result on each call
Views support swapping their storage or setting them lazily
View packs fully support empty views finally
basic_registry<...> doesn't instantiate temporary static storage on const function anymore
on_construct/on_update/on_destroy of basic_registry<...> also support named pools
Added a reverse each function (reach, worst name ever) to all storage classes
basic_registry<...>::erase_if to conditionally erase elements from their storage
Deprecated the following functions in the snapshot classes:
entities() (use get<Entity>() instead)
component<...>(...) (use get<T>(...) instead)
shrink, no longer required
General purpose ::get<T>(...) function for snapshot classes that works with storage types
Runtime pools support for snapshot classes (see ::get<T>(...) for further details)
Drop multi-type archive function requirement for snapshot classes
graph:
Allocator type propagates to the graph type returned by flow::graph() calls
locator:
Support for opaque structures
meta:
It's now possible to update the value of a meta property at any time (non-const meta_any ref)
Full support to meta member functions for primitive types
operator==/!= for meta_handle
operator==/!= for meta_data
operator==/!= for meta_prop
operator==/!= for meta_func
process:
Introduced basic_scheduler with default delta type for common cases
Turn scheduler into an alias for basic_scheduler<std::uint32_t>
signal:
Added delegate::target to get a pointer to the stored callable function
Refined transparent aggregate support for the dispatcher class
delegate also supports functions that skip first elements (on second attempt only)
Allow disconnecting listeners during iterations over the sigh class
Build system
Bump IWYU version to 0.19
Bump CMake version to 3.15.7
Enable documentation diagnostic for Clang
Increase CI warning level to /W1 on Windows
Add GCC11 to the list of compilers directly checked by the CI
Any other business
Suppress a few warnings due to unused variables in corner cases
More [[nodiscard]] where it makes sense (i.e. any_cast or meta_type::from_void)
Better allocator support with additional runtime checks for corner cases
Natvis support
All natvis files have been updated where necessary.
Breaking changes
entity:
ignore_as_empty_v doesn't exist anymore, use component_traits<...>::page_size instead
entt_traits::reserved is no longer available, combine entity_mask and version_mask instead
basic_sparse_set<...>::swap_at is now a protected function, override swap_or_move as needed instead
basic_sparse_set<...>::move_element doesn't exist anymore, use swap_or_move instead (with checks on to if needed)
sigh_storage_mixin was renamed into sigh_mixin
basic_sparse_set<...>::emplace was renamed to push
basic_sparse_set<...>::insert was renamed to push
basic_sparse_set<...>::get was renamed to value
basic_sparse_set<...>::sort was renamed to sort_as
basic_group<...>::sort (no callback overload) was renamed to sort_as
basic_registry<...>::base_type was renamed to common_type
basic_group<...>::base_type was renamed to common_type
runtime_view<...>::base_type was renamed to common_type
basic_view<...>::base_type was renamed to common_type
Nested groups are no longer supported (the pain is not worth the gain)
basic_view<...>::storage<...>() returns a (possibly null) pointer rather than a reference
basic_view<...>::handle() returns a (possibly null) pointer rather than a reference
basic_group<...>::storage<...>() returns a (possibly null) pointer rather than a reference
basic_view<...>::refresh() is a self-contained, non-const function that changes the view in-place
basic_view<...>::use<T>() is a self-contained, non-const function that changes the view in-place
process:
scheduler no longer requires a template parameter, use basic_scheduler if std::uint32_t isn't a good enough delta type
signal:
disconnect by reference is no longer available on the sink class, use the overload that accepts a pointer instead
sink<...>::before is no longer supported, no alternative provided
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.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Changelog
config:ENTT_FAIL(msg)as an alias ofENTT_ASSERT(false, msg)core:is_equality_comparablealso detects C-style arraysvalue_list_index[_v],value_list_unique[_t],value_list_contains[_v]andvalue_list_diff[_t]std::tupletraits specialization forentt::type_listandentt::value_listentity:::storage)::storage)sigh_helperutility to simplify connecting multiple listeners to a registrybasic_sparse_set<...>::traits_typetype memberbasic_storage<...>::traits_typetype memberbasic_registry<...>::traits_typetype membercomponent_traitstreatvoidproperly as any other component typeentt_traitsandbasic_entt_traitsto simplify specializing the formerentity_maskandversion_maskavailable throughentt_traitsentt_traits::base_typefor the final user (not used internally)basic_registrywork properly withvoidcomponent typesigh_mixinis attached to a storagedatafunction to sparse set iteratorsclear_allfunction available in thebasic_sparse_set<...>classremove,eraseandclearfunctionsremove,erase,clearanddestroyfunctionsdeletion_policyis now publicly available viaentity/fwd.hppbasic_sparse_set<...>::contiguousfunctionextended_storage_iterator::basemakes the underlying iterator availableextended_view_iterator::basemakes the underlying iterator availableextended_group_iterator::basemakes the underlying iterator availablebasic_storagewhen the value type is also the entity type (entity storage)storage<entity_type>()added basic_entt_traits::nextreturns the next valid version of an identifierbasic_registry<...>::size()(use.storage<E>().size()instead)basic_registry<...>::alive()(use.storage<E>().in_use()instead)basic_registry<...>::reserve(cap)(use.storage<E>().reserve(cap)instead)basic_registry<...>::capacity()(use.storage<E>().capacity()instead)basic_registry<...>::empty()(use.storage<E>().in_use()instead)basic_registry<...>::data()(use.storage<E>().data()instead)basic_registry<...>::released()(use.storage<E>().in_use()and.storage<E>().size()instead)basic_registry<...>::release(args...)(use.storage<E>().erase(args)and.storage<E>().bump(entt)instead)basic_registry<...>::assign(args...)(use.storage<Entity>().push(first, last)and.storage<Entity>().in_use(len)instead)basic_registry<...>::each(args...)(use.storage<Entity>().each()instead)basic_sparse_set<...>::bumpreturns the version in usebasic_storage<...>::insertreturns an iterator to the range of inserted elements.handle()function to return a reference to the leading storagebasic_registry<...>::groupis no longer[[nodiscard]]basic_observerbasic_observerget_t,owned_tandexclude_tare (constexpr constructible) types now rather than aliases oftype_listbasic_storageusesallocator_traits::destroynow rather thanstd::destroy_at(to allow specializations if needed)basic_registry<...>::storage_for_type<...>available to the final userbasic_view<..>::operator boolreturns true only for fully initialized viewsbasic_registry<...>doesn't instantiate temporary static storage on const function anymoreon_construct/on_update/on_destroyofbasic_registry<...>also support named poolsreach, worst name ever) to all storage classesbasic_registry<...>::erase_ifto conditionally erase elements from their storageentities()(useget<Entity>()instead)component<...>(...)(useget<T>(...)instead)shrink, no longer required::get<T>(...)function for snapshot classes that works with storage types::get<T>(...)for further details)graph:flow::graph()callslocator:meta:meta_anyref)operator==/!=for meta_handleoperator==/!=for meta_dataoperator==/!=for meta_propoperator==/!=for meta_funcprocess:basic_schedulerwith default delta type for common casesschedulerinto an alias forbasic_scheduler<std::uint32_t>signal:delegate::targetto get a pointer to the stored callable functiondelegatealso supports functions that skip first elements (on second attempt only)sighclassBuild system
/W1on WindowsAny other business
[[nodiscard]]where it makes sense (i.e.any_castormeta_type::from_void)Natvis support
All natvis files have been updated where necessary.
Breaking changes
entity:ignore_as_empty_vdoesn't exist anymore, usecomponent_traits<...>::page_sizeinsteadentt_traits::reservedis no longer available, combineentity_maskandversion_maskinsteadbasic_sparse_set<...>::swap_atis now a protected function, overrideswap_or_moveas needed insteadbasic_sparse_set<...>::move_elementdoesn't exist anymore, useswap_or_moveinstead (with checks ontoif needed)sigh_storage_mixinwas renamed intosigh_mixinbasic_sparse_set<...>::emplacewas renamed topushbasic_sparse_set<...>::insertwas renamed topushbasic_sparse_set<...>::getwas renamed tovaluebasic_sparse_set<...>::sortwas renamed tosort_asbasic_group<...>::sort(no callback overload) was renamed tosort_asbasic_registry<...>::base_typewas renamed tocommon_typebasic_group<...>::base_typewas renamed tocommon_typeruntime_view<...>::base_typewas renamed tocommon_typebasic_view<...>::base_typewas renamed tocommon_typebasic_view<...>::storage<...>()returns a (possibly null) pointer rather than a referencebasic_view<...>::handle()returns a (possibly null) pointer rather than a referencebasic_group<...>::storage<...>()returns a (possibly null) pointer rather than a referencebasic_view<...>::refresh()is a self-contained, non-const function that changes the view in-placebasic_view<...>::use<T>()is a self-contained, non-const function that changes the view in-placeprocess:schedulerno longer requires a template parameter, usebasic_schedulerifstd::uint32_tisn't a good enough delta typesignal:disconnectby reference is no longer available on thesinkclass, use the overload that accepts a pointer insteadsink<...>::beforeis no longer supported, no alternative providedAny 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.
Beta Was this translation helpful? Give feedback.
All reactions