GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
std::pmr::operator==,std::pmr::operator!=(3) C++ Standard Libary std::pmr::operator==,std::pmr::operator!=(3)

std::pmr::operator==,std::pmr::operator!= - std::pmr::operator==,std::pmr::operator!=


Defined in header <memory_resource>
template< class T1, class T2 >


bool operator==( const std::pmr::polymorphic_allocator<T1>& lhs, (1) (since C++17)


const std::pmr::polymorphic_allocator<T2>& rhs ) noexcept;
friend bool operator==( const polymorphic_allocator& lhs, (2) (since C++17)
const polymorphic_allocator& rhs ) noexcept;
template< class T1, class T2 >
(since C++17)
bool operator!=( const std::pmr::polymorphic_allocator<T1>& lhs, (3) (until C++20)


const std::pmr::polymorphic_allocator<T2>& rhs ) noexcept;
friend bool operator!=( const polymorphic_allocator& lhs, (4) (since C++17)
const polymorphic_allocator& rhs ) noexcept; (until C++20)


Compares two polymorphic allocators. Two polymorphic allocators compare equal if
their underlying memory resource compares equal.


1) Returns *lhs.resource() == *rhs.resource()
2) Same as (1), allowing conversion to polymorphic_allocator.
This function is not visible to ordinary unqualified or qualified lookup, and can
only be found by argument-dependent lookup when std::pmr::polymorphic_allocator is
an associated class of the arguments.
3) Returns !(lhs == rhs)
4) Same as (3), allowing conversion to polymorphic_allocator.
This function is not visible to ordinary unqualified or qualified lookup, and can
only be found by argument-dependent lookup when std::pmr::polymorphic_allocator is
an associated class of the arguments.


The != operator is synthesized from operator==. (since C++20)


lhs, rhs - polymorphic allocators to compare


1-2) *lhs.resource() == *rhs.resource()
3-4) !(lhs == rhs)


Defect reports


The following behavior-changing defect reports were applied retroactively to
previously published C++ standards.


DR Applied to Behavior as published Correct behavior
LWG 3683 C++17 polymorphic_allocator could not be compared overload added
with types convertible to it

2022.07.31 http://cppreference.com

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.