operator==,!=(std::experimental::pmr::polymorphic_allocator)
來自 cppreference.com
< cpp | experimental | polymorphic allocator
template< class T1, class T2 > bool operator==( const polymorphic_allocator<T1>& lhs, const polymorphic_allocator<T2>& rhs ) noexcept; |
||
template< class T1, class T2 > bool operator!=( const polymorphic_allocator<T1>& lhs, const polymorphic_allocator<T2>& rhs ) noexcept; |
||
比較兩個多型分配器。如果它們的底層記憶體資源比較相等,則兩個多型分配器比較相等。
1) 返回 *lhs.resource() == *rhs.resource()。
2) 返回 !(lhs == rhs)。
[編輯部分:引數] 引數
lhs, rhs | - | 要比較的多型分配器 |
[編輯部分:返回值] 返回值
1) *lhs.resource() == *rhs.resource()
2) !(lhs == rhs)