在线文档教程
C++
动态内存管理 | Dynamic memory management

operators (std::scoped_allocator_adaptor)

运算符=,%21=%28std::作用域[医]分配器[医]适配器%29

template< class OuterAlloc1, class OuterAlloc2, class... InnerAllocs > bool operator==( const scoped_allocator_adaptor& lhs, const scoped_allocator_adaptor& rhs (since C++11)
template< class OuterAlloc1, class OuterAlloc2, class... InnerAllocs > bool operator!=( const scoped_allocator_adaptor<OuterAlloc1, InnerAllocs...>& lhs, const scoped_allocator_adaptor<OuterAlloc2, InnerAllocs...>& rhs (since C++11)

比较两个作用域分配器适配器。如果下列情况下,两个这样的分配器是相等的:

  • lhs.outer_allocator() == rhs.outer_allocator(),和

  • 如果sizeof...(InnerAllocs) > 0,,,lhs.inner_allocator() == rhs.inner_allocator()...

参数

lhs, rhs-scoped allocator adaptors to compare

返回值

1%29true如果lhsrhs是平等的,false否则。

2%29true如果lhsrhs是不平等的,false否则。

例外

noexcept规格:

noexcept

© cppreference.com

在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。

http://en.cppreference.com/w/cpp/Memory/作用域[医]分配器[医]适配器/操作员[医]CMP