# std::pmr::operator==, std::pmr::operator!=

< cpp‎ | memory‎ | polymorphic allocator

定义于头文件 `<memory_resource>` |  |
template< class T1, class T2 > bool operator==( const std::pmr::polymorphic_allocator<T1>& lhs, const std::pmr::polymorphic_allocator<T2>& rhs ) noexcept; | (1) | (C++17 起)
template< class T1, class T2 > bool operator!=( const std::pmr::polymorphic_allocator<T1>& lhs, const std::pmr::polymorphic_allocator<T2>& rhs ) noexcept; | (2) | (C++17 起) (C++20 前)

比较二个 polymorphic_allocator 。若二个 polymorphic_allocator 的底层 memory_resource 比较相等，则它们比较相等。

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

### 参数

lhs, rhs | - | 要比较的 polymorphic_allocator

### 返回值

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