You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
o3de/Code/Framework/AzCore/Tests
lumberyard-employee-dm d7ee248df5
Range adaptor support (#7388)
* Updated the SFINAE checks in concepts.h and range.h

To use conjunction and disjunction for short-circuiting behavior.

Replaced AZStd::optional implementation with std::optional alias

Added range adaptor support and the following views: ref_view,
owning_view

Added bitwise or(|) overload for chaining range adaptor closures together

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Adding indirectly invocable concepts.

These concepts are used to determine whether a callable can be invoked
with a dereferenced iterator instance.

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Add implementation of range relational function objects

Add implementation of range min max functions which uses the range
relation function objects(ranges::less, ranges::equal_to, etc...)

This is needed to implement ranges::zip_view

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Adding interface for zip_view which compiles successfully

The implementation for the zip view functions still need to be filled.

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Adding function definitions for zip_view classes.

Adding empty header of subrange.h for the ranges::subrange class

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Adding additional view implementations.

The following range and view classes have been added: empty_view,
single_view and subrange.

Moved the AZ_NO_UNIQUE_ADDRESS macro to PlatformDef.h to allow other
code to specify the [[no_unique_address]] attribute.

Added additional test for view structures.

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Adding missing includes for non-unity builds

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Workaround for NDK21 clang 9.0.9 compile issue.

The AZStd::ranges::zip_view::iterator::iter_swap friend function is in the
AZStd::ranges namespace, while the customization point object of
`AZStd::ranges::customization_point_object::iter_swap` is in the regular
namespace of `AZStd::ranges` and the inline namespace of
`customization_point`.

This issue is fixed in NDK23, but as Jenkins uses NDK21 at the time, the
entire zip_view implementation has moved to inline namespace of
`zip_view_internal`

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Added iterator algorithm requiremetn concepts

Fixed the ambiguity in the ranges::iter_swap exchange overload to
exclude itself as a candidate if the iterator reference types are
swappable with each other.

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Adding type alias for borrowed_subrange_t

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Fixed convertible to ref_view check in the ranges::all
customization_point

Updated SFINAE detection of whether AZStd::to_address is invocable

Moved the

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Fixed private variable access in ranges::subrange get specialization.

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Removing ranges::view constraint from the ranges::views::single
customization_point.

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Adding C++23 range overload for string_view.

It is detailed in the [C++draft strings](https://eel.is/c++draft/strings#lib:basic_string_view,constructor____) section

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Adding implementations of ranges, find, search, mismatch and equal
functions.

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Adding implementation of ranges split_view along with test.

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Adding const overloads to SceneAPI ProxyPointer container

The Proxy Pointer class operator* and operator-> was unable to be
invoked with a const instance before. Now it returns a const view of the
pointer it contains.
This allows it to be invoked in `AZStd::to_address` as part of an SINAE
context for the contiguous_iterator concept

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Refactored the to_address implementation to better work with SFINAE.

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Adding general non-unity build fixes

This is unrelated to the RangeAdaptor changes.

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Allow range algorithms to be used with rvalue ranges

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Workaround MSVC Internal Compiler erroy by removing enable_if
condition in the operator bool of the view_interface class.

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Corrected the non_propagating_cache helper class to have public
functions

Fixed the order of creating the perfect forwarding call wrapper for an
outer closure around another closure.

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Specialized the borrowed_range and view concepts

For the AZ PathView class, since it is a immutable view around a path.

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Removed inline namespace around the zip_view class.

It was needed to workaround a clang 10 or below issue where a friend
function in a namespace and a variable within underneath an inline
namespace within the function namespace would cause an improper symbol
redefinition.

The workaround is to create a placeholder namespace containing the
inline namespace and then bring that placeholder namespace into the
parent scope.

https://bugs.llvm.org/show_bug.cgi?id=37556

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Adding implementation of the elemetns_view and join_view classes

It is up to date with the standard as of the current draft:
https://eel.is/c++draft/ranges.

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Separated definitions of concepts out of concepts.h

This allows the ranges::iter_swap and ranges::swap customization point to be moved
outside of the concepts folder and into the ranges folder.

The concepts.h header previously had to define those objects to avoid
circular dependencies.

Added the work around for ranges::iter_swap and ranges::iter_move
customization_point causing an improper symbol redefinition in clang 10
or below: https://bugs.llvm.org/show_bug.cgi?id=37556

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Alias more std:: names into the AZStd namespace.

Removed our custom implementation of toaddress.

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Adding more range view test.

The join_view and elements_view classes now have UnitTest.

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Adding deduction guides for AZStd associative containers

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Moved zip_view::sentinel iterator accessor function to zip_view.inl

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Fixed variable shadowing issues with clang 12+

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
4 years ago
..
AZStd Range adaptor support (#7388) 4 years ago
AZTestShared Code/Framework fixes 4 years ago
Asset This reduces non-unity build time by ~2% and build size by ~0.5%. 4 years ago
Console Fixes debug console autocomplete issues (#4223) 4 years ago
DOM Fix benchmark non-unity build 4 years ago
Debug Removes AssetMemoryAnalyzer that relies on the MemoryDrillerBus 4 years ago
EBus Removal and Replacement of the CryTimer (gEnv->pTimer) (#5409) 4 years ago
IO Update the FileIO Aliases (#4186) 4 years ago
Math AzCore Math tests produce errors that need to be disabled in debug (#6678) 4 years ago
Memory Fixes Linux builds 4 years ago
Name Clang 13: Fix build errors ... 4 years ago
Platform Clang/GCC compiler settings update [SECURITY] (#7358) 4 years ago
RTTI Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
Serialization/Json [Serialization] Add support for updating the values of existing keys in associative containers (#6832) 4 years ago
Settings Added the --regset-file option for setreg file loading (#5768) 4 years ago
Streamer This reduces non-unity build time by ~2% and build size by ~0.5%. 4 years ago
Time Remove time tests that relied on main-thread sleeps 4 years ago
AssetJsonSerializerTests.cpp {lyn7283} added test for assetHint Json Serialzier callback logic (#4586) 4 years ago
AssetManager.cpp Cleanup SerializeContext.h pt.1 (#4264) 4 years ago
AssetSerializerTests.cpp Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
AzEnumTest.cpp Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
BehaviorContext.cpp Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
BehaviorContextFixture.h [LYN-8041] Enable relocation of the Project Game Release Layout (#5380) 4 years ago
Components.cpp Removes m_enableDrilling 4 years ago
DLL.cpp Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
DLLMainTest.cpp Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
Debug.cpp Replaces handlers of TraceMessageDrillerBus with handlers of TraceMessageBus 4 years ago
EBus.cpp GCC Support for Linux 4 years ago
EntityIdTests.cpp Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
EntityTests.cpp Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
EnumTests.cpp more fixes for Code 4 years ago
EventTests.cpp Modernization + AZStd::function compare fix. (#3680) 4 years ago
FileIOBaseTestTypes.h Update the FileIO Aliases (#4186) 4 years ago
FixedWidthIntegers.cpp Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
GenericStreamMock.h Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
GenericStreamTests.cpp more fixes for Code 4 years ago
Geometry2DUtils.cpp Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
IPC.cpp Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
Interface.cpp Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
IntersectPoint.cpp Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
JSON.cpp Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
Jobs.cpp Cleanup before merge 4 years ago
Main.cpp Range adaptor support (#7388) 4 years ago
Memory.cpp Removal of OverrideShim, AP seems to be crashing 4 years ago
Module.cpp Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
ModuleTestBus.h Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
OrderedEventBenchmarks.cpp Modernization + AZStd::function compare fix. (#3680) 4 years ago
OrderedEventTests.cpp Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
Outcome.cpp remove unnecessary ALIGN macros 4 years ago
Patching.cpp More fixes 4 years ago
RemappableId.cpp Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
Rtti.cpp Removes Driller from AzCore 4 years ago
Script.cpp Modernization + AZStd::function compare fix. (#3680) 4 years ago
ScriptMath.cpp AzCore Math tests produce errors that need to be disabled in debug (#6678) 4 years ago
ScriptProperty.cpp Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
Serialization.cpp [LYN-9039] Object stream write response change (#7085) 4 years ago
SerializeContextFixture.h Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
Slice.cpp Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
State.cpp Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
StatisticalProfiler.cpp Replaces handlers of TraceMessageDrillerBus with handlers of TraceMessageBus 4 years ago
Statistics.cpp Modernization + AZStd::function compare fix. (#3680) 4 years ago
StreamerTests.cpp This reduces non-unity build time by ~2% and build size by ~0.5%. 4 years ago
StringFunc.cpp Remove old "Integ" functionality from tests (#4688) 4 years ago
SystemFile.cpp Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
TaskTests.cpp Remove -Wno-comment warning suppression 4 years ago
TestCatalog.cpp Update AssetManager unit tests to not interact with the disk (#5815) 4 years ago
TestCatalog.h Fix non-unity windows build 4 years ago
TickBusTest.cpp Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
UUIDTests.cpp Squashed commit of Procedural Prefab work (#4481) 4 years ago
XML.cpp Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
azcoretestdll_files.cmake Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
azcoretests_files.cmake Range adaptor support (#7388) 4 years ago
aztestshared_files.cmake Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago