std::pmr::operator==, std::pmr::operator!=
Min standard notice:
Header: <memory_resource>
Compares two polymorphic allocators. Two polymorphic allocators compare equal if their underlying memory resource compares equal.
# Declarations
template< class T1, class T2 >
bool operator==( const std::pmr::polymorphic_allocator<T1>& lhs,
const std::pmr::polymorphic_allocator<T2>& rhs ) noexcept;
(since C++17)
friend bool operator==( const polymorphic_allocator& lhs,
const polymorphic_allocator& rhs ) noexcept;
(since C++17)
template< class T1, class T2 >
bool operator!=( const std::pmr::polymorphic_allocator<T1>& lhs,
const std::pmr::polymorphic_allocator<T2>& rhs ) noexcept;
(since C++17) (until C++20)
friend bool operator!=( const polymorphic_allocator& lhs,
const polymorphic_allocator& rhs ) noexcept;
(since C++17) (until C++20)
# Parameters
lhs, rhs: polymorphic allocators to compare
# Defect reports
| DR | Applied to | Behavior as published | Correct behavior |
|---|---|---|---|
| LWG 3683 | C++17 | polymorphic_allocator could not be compared with types convertible to it | overload added |