命名空间
变体
操作

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

来自 cppreference.cn
 
 
 
 
 
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)