Namespaces
Variants
Views
Actions

Difference between revisions of "cpp/memory/polymorphic allocator/operator eq"

From cppreference.com
m (merge noexcept)
m (link to ja)
Line 28: Line 28:
 
@2@ {{c|1=!(lhs == rhs)}}
 
@2@ {{c|1=!(lhs == rhs)}}
  
{{langlinks|zh}}
+
{{langlinks|ja|zh}}

Revision as of 05:14, 6 July 2018

 
 
Dynamic memory management
Uninitialized memory algorithms
Constrained uninitialized memory algorithms
Allocators
Garbage collection support
(C++11)(until C++23)
(C++11)(until C++23)
(C++11)(until C++23)
(C++11)(until C++23)
(C++11)(until C++23)
(C++11)(until C++23)



 
 
template< class T1, class T2 >

bool operator==( const std::pmr::polymorphic_allocator<T1>& lhs,

                 const std::pmr::polymorphic_allocator<T2>& rhs ) noexcept;
template< class T1, class T2 >

bool operator!=( const std::pmr::polymorphic_allocator<T1>& lhs,

                 const std::pmr::polymorphic_allocator<T2>& rhs ) noexcept;

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

1) Returns *lhs.resource() == *rhs.resource()
2) Returns !(lhs == rhs)

Parameters

lhs, rhs - polymorphic allocators to compare

Return value

1) *lhs.resource() == *rhs.resource()
2) !(lhs == rhs)