diff --git a/Code/Framework/AzCore/AzCore/IO/Path/Path.h b/Code/Framework/AzCore/AzCore/IO/Path/Path.h index 235310a5da..3c2c4f0a8c 100644 --- a/Code/Framework/AzCore/AzCore/IO/Path/Path.h +++ b/Code/Framework/AzCore/AzCore/IO/Path/Path.h @@ -709,7 +709,10 @@ namespace AZ::IO constexpr reference operator*() const; - constexpr pointer operator->() const; + constexpr pointer operator->() const + { + return &m_stashed_elem; + } constexpr PathIterator& operator++(); diff --git a/Code/Framework/AzCore/AzCore/IO/Path/Path.inl b/Code/Framework/AzCore/AzCore/IO/Path/Path.inl index bde2353112..5046b43127 100644 --- a/Code/Framework/AzCore/AzCore/IO/Path/Path.inl +++ b/Code/Framework/AzCore/AzCore/IO/Path/Path.inl @@ -1397,12 +1397,6 @@ namespace AZ::IO return m_stashed_elem; } - template - constexpr auto PathIterator::operator->() const -> pointer - { - return &m_stashed_elem; - } - template constexpr auto PathIterator::operator++() -> PathIterator& { @@ -1542,3 +1536,13 @@ namespace AZ::IO extern template bool operator!=(const PathIterator& lhs, const PathIterator& rhs); } + +namespace AZStd::ranges +{ + // A PathView is a borrowed range, it does not own the content of the Path it is viewing + template<> + inline constexpr bool enable_borrowed_range = true; + + template<> + inline constexpr bool enable_view = true; +} diff --git a/Code/Framework/AzCore/AzCore/PlatformDef.h b/Code/Framework/AzCore/AzCore/PlatformDef.h index 8416099f15..d10b155127 100644 --- a/Code/Framework/AzCore/AzCore/PlatformDef.h +++ b/Code/Framework/AzCore/AzCore/PlatformDef.h @@ -83,7 +83,7 @@ #define AZ_PUSH_DISABLE_WARNING_GCC(_gccOption) /// Compiler specific AZ_POP_DISABLE_WARNING. This needs to be matched with the compiler specific AZ_PUSH_DISABLE_WARNINGs -#define AZ_POP_DISABLE_WARNING_CLANG +#define AZ_POP_DISABLE_WARNING_CLANG #define AZ_POP_DISABLE_WARNING_MSVC \ __pragma(warning(pop)) #define AZ_POP_DISABLE_WARNING_GCC @@ -176,7 +176,7 @@ #define AZ_PUSH_DISABLE_WARNING_3(_1, _2, _gccOption) AZ_PUSH_DISABLE_WARNING_GCC(_gccOption) /// Pops the warning stack. For use matched with an AZ_PUSH_DISABLE_WARNING -#define AZ_POP_DISABLE_WARNING +#define AZ_POP_DISABLE_WARNING _Pragma("GCC diagnostic pop") #endif // defined(AZ_COMPILER_CLANG) @@ -303,3 +303,10 @@ #if !defined(az_has_builtin_wmemmove) #define az_has_builtin_wmemmove false #endif + +// no unique address attribute support in C++17 +#if __has_cpp_attribute(no_unique_address) + #define AZ_NO_UNIQUE_ADDRESS [[no_unique_address]] +#else + #define AZ_NO_UNIQUE_ADDRESS +#endif diff --git a/Code/Framework/AzCore/AzCore/RTTI/AzStdOnDemandReflection.inl b/Code/Framework/AzCore/AzCore/RTTI/AzStdOnDemandReflection.inl index bba79e36f7..af814fbd32 100644 --- a/Code/Framework/AzCore/AzCore/RTTI/AzStdOnDemandReflection.inl +++ b/Code/Framework/AzCore/AzCore/RTTI/AzStdOnDemandReflection.inl @@ -13,6 +13,7 @@ #include #include #include +#include #ifndef AZ_USE_CUSTOM_SCRIPT_BIND struct lua_State; @@ -47,10 +48,6 @@ namespace AZStd class intrusive_ptr; template class shared_ptr; - - // Wrapper types - template - class optional; } namespace AZ diff --git a/Code/Framework/AzCore/AzCore/RTTI/TypeInfo.h b/Code/Framework/AzCore/AzCore/RTTI/TypeInfo.h index 2cff17a638..0f292140dc 100644 --- a/Code/Framework/AzCore/AzCore/RTTI/TypeInfo.h +++ b/Code/Framework/AzCore/AzCore/RTTI/TypeInfo.h @@ -18,6 +18,7 @@ #include #include #include +#include #include #include @@ -89,9 +90,6 @@ namespace AZStd template class function; - template - class optional; - struct monostate; template @@ -150,7 +148,7 @@ namespace AZ template