New
3.21.23
Changes
- Removed use of sumbodules to break circular dependencies, use CMake's FetchContent instead.
- Removed generic definition of
numeric_limits<> - Removed EASTL_CUSTOM_FLOAT_CONSTANTS_REQUIRED & associated functionality
- Removed
Internal::numeric_limits_base - Added
isnanto EASTL when compiled with C++20 - Added
is_constant_evaluated - Fixed
midpointto behave correctly when passed NaNs - Add bounds checking assert for
array<T, N>::operator[]. - Fixed
fixed_vectormove constructor with an explicit allocator parameter. It now works with move-only types. - Add
bit_and,bit_or,bit_xor,bit_notandowner_less<void>function objects. - Use string builtins to improve codegen for string literals operations on
string_viewandstring. spanis now specialized for static extents so that it doesn't need to store the size at runtime.- Fixed a bug where calling
emplace,emplace_hint, ortry_emplaceon astring_hash_mapwould call the underlyinghash_mapimplementation, which caused a crash whenstring_hash_mapwould try to free memory it didn't own. - Consolidate implementations of
CharTypeStringSearch/Findfunctions inchar_traits.h. - Minor optimization to
CharTypeStringRSearchto reduce iteration loop count. - Fix
dequemove assignment operator for move only and non-default constructible types. - Added monadic operations
and_then,transformandor_elseforoptional. - Fixed
value_orfor r-value refs tooptional. - Various
bitsetfixes and improvements:- Replace
bitset(uint32_t)withbitset(unsigned long long)which matches the standard and means that 64 bit integers can be correctly converted to a bitset. As a resultfrom_uint32()andfrom_uint64()are now unnecessary (not deprecated). - Add
to_ulong_checked()with the same behaviour as the standard, ie. throws or asserts if the target type cannot represent all the set bits. - Add an extension to the standard,
as_uint<T>()/as_ulong(), cast to a unsigned integral that can represent the entire bitset. If the target type cannot represent the entire bitset, then issue a compile error (overload does not exist). - Fix implementation for word types smaller than 32 bit. Fixed logic in find_prev(), other iteration functions and conversion to/from bitset functions that did not work for such types.
- No longer assume
sizeof(word_type) == EA_PLATFORM_WORD_SIZE. eg.from_uint64()previously would not copy the entire value into abitset<N, uint32_t>forN > 32. - Now compiles for a word type of
unsigned longorunsigned long longwhere the type is notuint64_t. - Add an assert that the word type is an unsigned integral, as these are the only types that are supported and tested.
- Replace
- Add
get<T>(pair<T1, T2>). Makeget<I>(pair<T1, T2>)constexpr. - Fix variant non-member functions
get_if(),get(),holds_alternative()and converting constructor and assignment so that they only conditionally compile when the index or type unambiguously refers to a variant alternative. any::emplace()now returns a reference.lru_cache::emplace()now compiles correctly, forwarding its arguments and returns an pair of iterator and bool indiciating emplace success.- Made changes to avoid
-Wdeprecated-copy-with-user-provided-copy, which manifests for the following reasons:- definition of implicit copy assignment operator for
classis deprecated because it has a user-provided copy constructor - definition of implicit copy constructor for
classis deprecated because it has a user-provided copy assignment operator
- definition of implicit copy assignment operator for
- Fix various issues with
segmented_vector:- Fix copy/move construction/assignment so it doesn't do a shallow copy.
clear()now behaves like othereastlcontainers in that it does not free memory when called, the container maintains it's capacity.segmented_vectornow supports types which are not default constructible.- Added some missing API functions:
reserve,resize,shrink_to_fit,emplace_back. - Added comparison operations.
- Add constructor overloads to
map,set,hash_set,hash_mapthat take aninitializer_listand Allocator. - Enable some container asserts (when EASTL_ASSERT_ENABLED is enabled), removing the requirement for EASTL_EMPTY_REFERENCE_ASSERT_ENABLED. When called with invalid arguments these functions will result in undefined behaviour.
- Add some additional asserts to container adaptors.
- Fix undefined behaviour in
shell_sort()algorithm. - Add return values for
deque,list,slists's member functionsemplace_front(),emplace_back()andunique(). - Add
slist::unique()function. - Fix references to std library that should be eastl.
- Fix compilation issues when C4626 is enabled as error on MSVC.
- Optimize bitset's
find_first(),find_next(),find_last(),find_prev()(which are extensions to the standard). - Fix
bitset<N, eastl_uint128_t>::find_last().gg - Added
erase_unorderedanderase_unordered_ifforvectoranddeque(fixed_vectorworks implicitly with thevectorversion since it is avectorwith a special allocator and these functions don't affect capacity). These work similar to free functionerase/erase_ifbut are more efficient if those would result in moving a lot of elements. They achieve this by not respecting the order of the remaining element and just moving the elements from the end into the now empty spots. optional::emplacenow correctly returnsT&instead ofvoidas specified in the standard.- Explicitly define special member functions for some types. This fixes new compile errors from Visual Studio 17.7.0 Preview.
- Fix
function::targetnot compiling due to missing template parameter when we called into the base class' member function.
Deprecations:
- Use
EA_DEPRECATEDdate based macros if available to guide deprecations. - Deprecate
vector_map<Key, T>::at(index). this function was accidentally inherited fromvectorwith incorrect semantics. - Deprecate
make_pair_ref(), usemake_pair()instead. deprecate amake_pair()overload which was only enabled on MSVC. - Deprecate a
make_pair()overload which was only enabled on MSVC. - Deprecate
stack::emplace_back(),use stack::emplace()instead. - Deprecate uninitialized_copy_ptr et al - uninitialized_copy is already perfectly suitable for pointers.
- Deprecate unwrap_iterator, is_reverse_iterator, is_move_iterator, is_insert_iterator, generic_iterator (the last is internal and should already be unused).
PRs
- Declare C++14 as required for building by @uilianries in https://github.com/electronicarts/EASTL/pull/509
- Update EABase submodule by @mtnpke in https://github.com/electronicarts/EASTL/pull/504
- Fix ring_buffer comparation logic by @ChaiByte in https://github.com/electronicarts/EASTL/pull/514
- Add MSVC support to initializer_list by @mtnpke in https://github.com/electronicarts/EASTL/pull/503
New Contributors
- @ChaiByte made their first contribution in https://github.com/electronicarts/EASTL/pull/514