* 3.21.23
* Add Cmake options to disable deprecations.
* Bump EABase git-tag which includes necessary changes for EASTL.
* Remove a bunch of unused parameters.
* Disable deprecations when specializing templates and template variables using deprecated templates to fix gcc deprecation warnings.
* Remove some tests which do not pass on GCC versions prior to 14.
* Remove submodules, use CMake's FetchContent instead.
* Update docs and CI file.
* I think we don't actually need this at all...
* Restore some missing `target_link_libraries` in test dependencies.
- eastl::less is used for genericity, when types can be sorted but when a public less-than operator is unwanted
- It tries to use the underlying operator< by default, if not specialized
Feature additions and standard updates:
- Implemented eastl::bit_cast.
- Implemented eastl::is_nothrow_invocable.
- Implemented eastl::to_underlying.
- Implemented LWG defect 2106: move_iterator doesn't work with iterators which don't return a reference
Bugfixes:
- eastl::invoke fixes:
- invoke now correctly deduces the function signature when invoking a member function or member data pointer on a reference_wrapper.
Previously, this would fail if using arguments which were convertible to the correct type, but did not exactly match.
- invoke now correctly forwards arguments when invoking a member data pointer.
- invoke now correctly uses decay_t instead of remove_reference_t in a number of places.
- invoke_result_t no longer uses decay_t on the type being invoked.
- invoke is now constexpr.
- eastl::variant fixes:
- Fixed incorrect results from some relational operators when valueless_by_exception() is true.
- Fixed incorrect index when an exception is thrown during emplace().
- Removed assertions from some eastl::array functions in order to ensure usability in constexpr contexts.
- eastl::make_signed and eastl::make_unsigned now work correctly for enum types and volatile-qualified types.
- Containers which support find_as now support using it with keys of the same type as the container's key.
- Disallowed use of smart pointer default deleter on incomplete types.
- Fixed an issue where nodes for some data structures could be under-aligned.
- Properly supported arrays in eastl::cbegin() and eastl::cend().
- Fixed creation of zero-length spans and subspans.
- eastl::is_reference now returns true for rvalue references.
Optimizations:
- eastl::variant optimizations:
- Avoided unnecessary double index checks in variant relational operators.
- Avoided unnecessary work in valueless_by_exception() when exceptions are disabled.
- Optimized visit() for the common case of visiting a single variant.
- Removed unnecessary copies during visit().
Added more information for read_depends in the atomic.h doc
Added comment about 128 bit atomic intrinsics on msvc
Added some extra 128 bit atomic load tests
set_decomposition/set_difference_2 implementation
Allow eastl::atomic_load_cond to use non default constructible types
Adding static_assert tests for eastl::size and eastl::ssize
eastl::atomic<T> added support for constant initialization
fixed msvc warning in variant
fixed clang warning for single-line if statements indentation
Adding Paul Pedriana's documentation for the motivation of EASTL submitted to the ISO committee.
Fix off-by-one error in Timsort. If the final run is of exactly length 2, under some conditions, we end up trying to sort off the end of the input array.
Added missing header to bonus/adaptors.h
Fixed usage of wrong template parameter for alignment of atomic type pun cast
EASTL: lru_cache iteration tests and added support for initializer_lists
eastl::atomic<T> : fixed msvc compiler warning 4459
Co-authored-by: Rob Parolin <rparolin@ea.com>
eastl::atomic<T>
- fix all the spelling mistakes in the doc
- Added support for non-trivially default constructible types
- Cleaned up comments and impl
- improved 128-bit load code gen
- fixed type pun to support non-trivially default constructible types
- ensure msvc instrinics do not emit prefetch instructions
EASTL: to_array implementation
EASTL: fix for rbtree input iterator ctor moving elements from the source container
* Fix hint-versions of rbtree class variadic insertion methods: parameter pack and move semantics support.
* Fix hashtable::insert() to satisfy new map tests.
Ensure the alignment of a node<value_type> is the alignment of the whole node allocation, not just the user type
Removing old compiler special case code for EA_CPP14_CONSTEXPR
Adding eastl::string hash tests and removing an addition overload in the helper template that contrains usage to enum types.
Fixing user reported regression when attempting to use fancy pointers in a tuple
Resolving uint128_t hashing compiler errors from properly limiting the generic template for enums
eastl::pair adding C++17 structured bindings unpacking support
eastl::atomic<T> implementation - See EASTL/atomic.h for documentation
eastl::function - Optimized function call operator
Consolidate Warnings by using EA_DISABLE_WARNING macros
Reverting the UDL warning suppression because of push/pop mismatch issues with the EABase warning suppression macros
eastl::variant - Fixed variant warnings due to not sfinae overloads that are not the same type but still comparable
- improved code gen on msvc
-added tests
Removed unndeded allocator_traits headers
Added comments on reverse_wrapper
Removed sparse_matrix.h as it was removed internally quite a while ago
Updated files that had slight differences to internal eastl
Update travis CI to use g++-9 && clang++-11
Updated README and CONTRIBUTING to allow contributors to submit their info under the contributors section
* Improve tuple_vector assign test
There is a bug when using the assign overload with two pointers to
tuples. When the target tuple_vector has enough capacity but a lower
size than the input range, the elements at the begining of the input
range are repeated in the target tuple_vector.
The existing test did not cover this case as all the elements in the
input range were identical. This change now uses distinct elements for
all the input std::initializer_list s provided to the assign function,
highlighting the bug.
* Fix tuple_vector assign with a range of values
The unitialized part of the target tuple_vector is now initialized with
the corresponding range in the input range, instead of always using the
start of the range.
Co-authored-by: Thierry Laviron <thierry.laviron@grenoble-inp.org>
EASTL: fixing spelling mistake in eastl::basic_string
Fix for insertion_sort() doing a --(BiDirectionalIterator) which is an illegal operation and causes crashes on containers such as eastl::deque.
eastl::optional_storage - remove unneeded union and trivial type initialization since we use eastl::aligned_storage_t, remove unreferenced internal member function
EASTL: resolving 32-bit eastl_size_t compiler error
EASTL: EASTL_ALIGN_OF porting to C++11 alignof keyword.
EASTL_EMPTY_REFERENCE_ASSERT_ENABLED when enabled would not assert when taking a reference to an empty container.
Example, eastl::vector[0] would not assert that a null reference was being taken if the vector was empty.
EASTL: fixing shared_ptr compiler error when passing nullptr with a custom deleter lambda
* fix bitvector iterators
use mContainer.begin() instead of &mContainer[0],
since it causes out of bounds exception in non release build
* test for empty bit vector comparison and iterator
* Include fixed_function at top of test file
This will trigger compilation errors under the current setup due
to the recursive dependency; moving it here should allow us to
detect if this issue rears its head again in the future.
* Limit inclusion of functional.h by utility.h
A circular dependency was forming when function_detail.h was
included ahead of function.h, which could occur if a user included
fixed_function.h prior to functional.h.
As utility.h only requires the type traits for
eastl::reference_wrapper, this limits the inclusion to only
attempting to pull them in instead of the entirety of functional.h.
This may break users who depend upon utility.h pulling in functional.h.
* Reorder test includes per review comments
Added a link to the issue to document the ordering as well, so
it's a bit clearer for anyone 3 years down the line.
* Add char8_t support for string_view's ""sv operators
Enables the ""sv and ""_sv operators if the compiler implements
support for the distinct char8_t type in present in C++20.
Tests are included which *should* trigger under the MSVC part of
the CI setup; I've verified locally that it all works with Clang 9
and GCC 9.2.0 with a local hack to compile only the string_view
tests in C++20 mode.
Includes a specialization of hash<u8string_view> to enable the
tests to actually compile successfully.
* Improve char8_t support for strings
When char8_t support is enabled within a compiler, include a
literal ""s operator for converting a u8"" string literal to
an instance of u8string.
Enabled tests for u8string if char8_t is a distinct type, which
as with the string_view support required another hash specialization
to be defined, as well as a few extra overloads of DecodePart to
prevent compilation errors in tests that append strings of mixed
encodings. Each added overload simply casts the char8_t* data to
char* and defers to another overload to handle the operation.
* Enable commented-out wchar_t string tests
These can be supported with an additional DecodePart overload
as per the previous char8_t changeset to support writing data
from and to a buffer of the same type. This is implemented just
as a straight cast to the char* overload which does a memmove,
so should be safe.
* Add EASTL_BUILD_CHAR8T_TESTS option to test build
This enables building a subset of the tests (currently string
and string_view) with char8_t support if the compiler being
used supports either the `-fchar8_t` or `/Zc:char8_t` flag.
If this option is enabled a diagostic will be printed if the
flag is successfully found or not.
* Add Linux Clang build to matrix for char8_t support
The Clang compiler used in the environment (Clang 7) supposedly
supports the `-fchar8_t` flag so this should be a good way to
prove that things work.
The MSVC compiler under the Travis environment *doesn't* support
/Zc:char8_t at this time; rather than remove that from the matrix
it's been left there since removing it is a bit out-of-scope of
this changeset.
* Fail test compilation if char8_t support is missing
If the tests were compiled with char8_t support requested, and the
appropriate compiler flag was found, we set a define which can be
tested for to trigger a compile error if EA_CHAR8_UNIQUE still
evaluates to false.
This should work to prove that the tests are correctly compiling
with char8_t support enabled under the CI setup when the CMake
configure process says it's doing so.
* Remove clang char8_t build from matrix
* Unconditionally enable char8_t tests if supported
The string/string_view tests will be built with char8_t support
if the compiler flag enabling it is present. The test for the flag
was moved to CommonCppFlags since we'll need it in the benchmarks
file to fix a compilation failure there under recent MSVC versions.
* Build benchmarks without char8_t support
Under recent versions of MSVC, the use of the `/permissive-` flag
in CommonCppFlags enables char8_t support which caused compilation
failures with the tests and benchmarks.
As this isn't supported yet, if the compiler supports a flag that
explicitly disables char8_t support (`-fno-char8_t` or `/Zc:char8_t-`)
then we compile both the tests and benchmarks with that flag by
default, overriding only for specific files that do support it.
Use of add_compile_options instead of `set(CMAKE_CXX_FLAGS ...)` is
to ensure the flag propagates down to the submodules, since for some
reason this wasn't happening reliably.
* Add array deduction guides
Allows inference of an array's type and length from the types and
number of elements in its constructor. The guides are defined as
part of the C++17 standard, and are gated behind a check for
the __cpp_deduction_guides define as per the span implementation.
* Change value_type test to static_assert
Wasn't initially sure if static_asserts were okay in tests or if
they should all go through the VERIFY() macro at runtime, however
upon looking around this seems to be fine.
* Fix overriding of -std=c++17 flags
From local testing with other changes I'd noticed that C++17 features
like deduction guides weren't being properly enabled in tests. The
logic of the CommonCppFlags script causes the flags set for C++17
support to be overridden by C++14 flags instead due to the if()
check immediately after in each branch being a GREATER_OR_EQUALS
check.
* Remove disabled random_shuffle benchmarks
random_shuffle was deprecated and later removed as of C++17. The
benchmark was commented out, but the implementation remained and
triggers compilation errors under Clang 9.
* Fix inclusion of <variant> on OSX Clang
The CI setup seems to build with Xcode 9.4 which has a C++17
compatible Clang compiler but a libc++ that lacks <variant>.
* Add span::front() and span::back()
Provides parity for element access methods in-line with std::span.
As with the implementations for the subscript operators these will
trigger assertions if the underlying container is empty.
* Add span::subspan()
Implements both the templated and function-parameterized variants,
as per the std::span type.
Bounds checking is performed via assertions as with the rest of the
implementation, and will verify that users don't create subspans
outside of the range [0, size).
* Improve assertion messages on span::subspan()
Exceeding the size of the original span will trigger a different
assertion message to make it clearer that the count is too large.
* Improve tests for span::subspan()
Merged the fixed/dynamic span tests into single blocks for clarity,
and added a test against the default count parameter for subspan().
* Add span::const_pointer/reference typedefs
Add push_back move (rvalue) flavour in order to code like
eastl::move(container.begin(), container.end(), eastl::back_inserter(container))
to work as intended (which is to use move-version of push_back, obviously)
Expression
>bMove ? should_move_tag() : should_copy_tag()
wasn't working as expected, basically always coalescing as
should_copy_tag type which probably (?) works, but follows slighly odd code
path when uninitialized_copy_ptr() actually moves elements, because
of generic_iterator<move_iterator<>> type.
Add tests for fixed_vector's move assignments realloc capacity code path
to ensure that no copying on movement happening
Fix fixed_vector's ctor code path with custom allocator