Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions stl/inc/xmemory
Original file line number Diff line number Diff line change
Expand Up @@ -798,11 +798,10 @@ public:
using size_type = size_t;
using difference_type = ptrdiff_t;

using propagate_on_container_move_assignment = true_type;
using propagate_on_container_move_assignment = true_type;
using is_always_equal _CXX20_DEPRECATE_IS_ALWAYS_EQUAL = true_type;

#if _HAS_DEPRECATED_ALLOCATOR_MEMBERS
using is_always_equal _CXX17_DEPRECATE_OLD_ALLOCATOR_MEMBERS = true_type;

template <class _Other>
struct _CXX17_DEPRECATE_OLD_ALLOCATOR_MEMBERS rebind {
using other = allocator<_Other>;
Expand Down Expand Up @@ -876,11 +875,10 @@ public:
using size_type = size_t;
using difference_type = ptrdiff_t;

using propagate_on_container_move_assignment = true_type;
using propagate_on_container_move_assignment = true_type;
using is_always_equal _CXX20_DEPRECATE_IS_ALWAYS_EQUAL = true_type;

#if _HAS_DEPRECATED_ALLOCATOR_MEMBERS
using is_always_equal _CXX17_DEPRECATE_OLD_ALLOCATOR_MEMBERS = true_type;

template <class _Other>
struct _CXX17_DEPRECATE_OLD_ALLOCATOR_MEMBERS rebind {
using other = allocator<_Other>;
Expand Down
14 changes: 13 additions & 1 deletion stl/inc/yvals_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -1081,7 +1081,19 @@
#define _CXX17_DEPRECATE_POLYMORPHIC_ALLOCATOR_DESTROY
#endif // ^^^ warning disabled ^^^

// next warning number: STL4033
#if _HAS_CXX20 && !defined(_SILENCE_CXX20_IS_ALWAYS_EQUAL_DEPRECATION_WARNING) \
&& !defined(_SILENCE_ALL_CXX20_DEPRECATION_WARNINGS)
#define _CXX20_DEPRECATE_IS_ALWAYS_EQUAL \
[[deprecated("warning STL4033: " \
"std::allocator::is_always_equal is deprecated in C++20 by LWG-3170. " \
"Prefer std::allocator_traits<allocator<T>>::is_always_equal. " \
"You can define _SILENCE_CXX20_IS_ALWAYS_EQUAL_DEPRECATION_WARNING " \
"or _SILENCE_ALL_CXX20_DEPRECATION_WARNINGS to acknowledge that you have received this warning.")]]
#else // ^^^ warning enabled / warning disabled vvv
#define _CXX20_DEPRECATE_IS_ALWAYS_EQUAL
#endif // ^^^ warning disabled ^^^

// next warning number: STL4034

// P0619R4 Removing C++17-Deprecated Features
#ifndef _HAS_FEATURES_REMOVED_IN_CXX20
Expand Down