operator==,!=(std::experimental::pmr::polymorphic_allocator)
来自 cppreference.cn
< 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)。
[edit] 参数
lhs, rhs | - | 要比较的多态分配器 |
[edit] 返回值
1) *lhs.resource() == *rhs.resource()
2) !(lhs == rhs)