operator==,!=(std::experimental::pmr::polymorphic_allocator) - cppreference.com

##### cppreference.com

##### Search

Create account

##### Namespaces

- Page
- Discussion

##### Variants

##### Views

- View
- Edit
- History

##### Actions

# operator==,!=(std::experimental::pmr::polymorphic_allocator)

From cppreference.com
< cpp‎ | experimental‎ | polymorphic allocator

template< class T1, class T2 > bool operator==( const polymorphic_allocator<T1>& lhs, const polymorphic_allocator<T2>& rhs ); |  |
template< class T1, class T2 > bool operator!=( const polymorphic_allocator<T1>& lhs, const polymorphic_allocator<T2>& rhs ); |  |

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)

### [edit] Parameters

lhs, rhs | - | polymorphic allocators to compare

### [edit] Return value

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

### [edit] Exceptions

`noexcept` specification:
noexcept
Retrieved from "http://en.cppreference.com/mwiki/index.php?title=cpp/experimental/polymorphic_allocator/operator_eq&oldid=91373"
Category:

- unconditionally noexcept

Hidden categories:

- Pages with unreviewed unconditional noexcept template
- Pages with unreviewed noexcept template