208 Commits

Author SHA1 Message Date
Galo Rojo
0b8a259300 Release candidate for 3.27.00 (#579) 2025-08-03 11:16:24 -07:00
Galo Rojo
7fadbf0da0 EASTL version 3.21.23 (#536)
* 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.
2024-08-17 23:10:53 -07:00
Galo Rojo
c530255b69 Remove submodules, use CMake's FetchContent instead. (#534)
* 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.
2024-07-29 10:12:48 -07:00
Galo Rojo
089eb20cab Merge pull request #514 from ChaiByte/fix/ring-buffer
Fix ring_buffer comparation logic
2023-07-07 16:30:50 -07:00
ChaiEnjoy
1d504290f0 Fix ring_buffer comparation logic (#511) 2023-07-08 06:57:53 +08:00
Galo Rojo
f9615aecaf Merge pull request #504 from mtnpke/update-eabase
Update EABase submodule
2023-07-07 14:49:24 -07:00
Jonathan Hopkins
c6141b94d7 version 3.21.12 2023-06-09 16:53:52 +10:00
Philipp Kerling
7cea9ce050 Update EABase submodule 2023-01-30 09:20:13 +01:00
Rojo
7970509c19 Add a const to an equality operator to make P2468R2 happy. 2023-01-27 16:34:20 -08:00
Rojo
1aa7846430 EASTL version 3.20.02. 2023-01-27 11:24:38 -08:00
Rojo
c5e80d5c06 Test adding std_iter_compatibility to the ci workflow. 2022-11-14 16:22:43 -08:00
Rojo
2a482309a3 Update to 13.19.05 2022-11-03 08:58:44 -08:00
Eugene Kozlov
00216ebd16 Use invoke_result instead of result_of in reference_wrapper. Relax is_invocable_r check. 2022-07-26 21:05:16 +03:00
grojo-ea
713beb7264 Merge pull request #453 from GrooveStomp/441-typo-in-tests
Fix typo in unit test
2022-07-22 13:18:22 -07:00
Rojo
ab9db85e4b Fixes for gcc. 2022-07-22 10:37:26 -08:00
Rojo
a0b8a6902c Release candidate 3.19.03 2022-07-19 10:14:24 -08:00
Romain Milbert
cd6abfc1f6 Replaced some generic calls to operator< by eastl::less
- 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
2022-02-10 09:10:18 +01:00
James Moran
ca6b8716f3 Merge pull request #411 from Razakhel/array_structured_binding
Added structured binding support for eastl::array
2022-02-09 12:22:54 -08:00
Aaron Oman
4ba652deea Fix typo in unit test
Use string compare on the object created for the test; not the previously created object.
2021-12-09 11:44:57 -08:00
Liam Mitchell
20ca24356a Open-source CI fixes 2021-10-20 15:46:27 -07:00
Liam Mitchell
4e3064a3a8 Release candidate for EASTL version 3.18.00.
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().
2021-10-13 16:05:11 -07:00
Romain Milbert
8d5eb9e3d3 Added structured binding support for eastl::array 2021-09-14 22:47:18 +02:00
Kevin Cadieux
feb6282be9 Fixing stack-use-after-scope ASan error detected in the [Allocator] test. 2021-05-28 02:34:44 -07:00
Max Winkler
fad54717f8 [EASTL 3.17.06] (#412)
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
2021-01-18 10:36:17 -08:00
Loïc HAMOT
07aecdeb93 Fix get<T>(variant) when variant is a rvalue (#406) 2020-12-04 09:52:35 -08:00
Max Winkler
41bd2e4466 [EASTL 3.17.03] (#397)
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>
2020-11-05 21:08:31 -08:00
Max Winkler
50fdd465e9 [EASTL 3.17.02] (#395)
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
2020-11-05 10:23:08 -08:00
Michael Khlopin
dcff00dc75 rbtree::emplace_hint() compilation fix for variadic arg use (#392)
* Fix hint-versions of rbtree class variadic insertion methods: parameter pack and move semantics support.

* Fix hashtable::insert() to satisfy new map tests.
2020-10-15 11:44:22 -07:00
Max Winkler
423527757d Oss/next release (#391)
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
2020-10-09 17:55:50 -07:00
Loïc HAMOT
04a7c307a5 Fix reverse adaptor when using on a rvalue range (#382) 2020-08-06 14:45:58 -07:00
Wawha
fc6af1374a shared_ptr<>::reset(): fix implementation which is not thread safe (#378) 2020-07-07 16:42:03 -07:00
Thierry Laviron
13d949c764 Fix tuple vector assign (#374)
* 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>
2020-06-18 10:14:32 -07:00
Wawha
1cf6182218 fixed unique_ptr<[]>::reset() instructions order. Internal pointer must be updated before deleting object (#375) 2020-06-10 12:47:55 -07:00
Winkler, Max
b2d923a7af [EASTL 3.16.07]
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
2020-06-09 13:15:25 -07:00
Wawha
d84b9c6337 fixed unique_ptr::reset() instructions order. Internal pointer must be updated before deleting object (#373) 2020-06-09 09:21:31 -07:00
AntonYudintsev
d996510148 fix bitvector iterators (#358)
* 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
2020-04-22 19:40:13 -07:00
Daniel Yates
73e1685423 Fix circular dependency in fixed_function.h (#350)
* 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.
2020-04-13 07:41:12 -07:00
Rob Parolin
05127aebc2 3.16.05 2020-02-24 12:38:54 -08:00
Daniel Yates
c1844c6ade C++20 char8_t string/string_view support improvements (#345)
* 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.
2020-02-13 11:03:46 -08:00
Wawha
2ed19d4994 add enable_shared_from_this::weak_from_this() present since C++17 (#348) 2020-02-12 10:24:05 -08:00
Daniel Yates
ec21d9d12d Fix missing explicit constructors in span::rbegin/rend() (#341)
Additionally, adds tests for rbegin/rend as these were missing
unlike their crbegin/crend counterparts.
2020-01-25 11:45:55 -08:00
Daniel Yates
45eb0fa0d7 Add array deduction guides (#343)
* 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.
2020-01-25 11:42:29 -08:00
Daniel Yates
56cdc8e33f Fix overriding of -std=c++17 flags (#342)
* 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>.
2020-01-25 11:41:16 -08:00
Daniel Yates
8876669681 Added span::front(), back(), and subspan() (#338)
* 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
2020-01-25 11:35:49 -08:00
virtul
1774cb4839 Fix back_insert_iterator move flavour (#332)
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)
2020-01-22 11:23:39 -08:00
virtul
69a1ec3010 Fix move flavour of vector::DoAssign[FromIterator] (#330)
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
2020-01-16 18:42:39 -08:00
Artur K
42e4d97cd2 Fix string_view::find_first_of buffer overflow bug (#335)
* Add a test for string_view::find_first_of buffer overflow bug

* Fix for string_view find_first_of buffer overflow
2020-01-16 18:33:37 -08:00
Wawha
2f9b228062 fixed atomic_exchange_explicit() return with shared_ptr<> (#336) 2020-01-16 18:31:41 -08:00
Rob Parolin
6ad83588ca moving shell script to scripts folder and updating submodules 2019-12-16 09:38:26 -08:00
Rob Parolin
c386b06b12 3.16.01 2019-12-14 10:43:14 -08:00