operator==,!=(std::scoped_allocator_adaptor)
自 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 ) noexcept;
自 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 ) noexcept;
比较两个作用域分配器适配器。如果两个分配器满足以下条件,则它们相等:
lhs.outer_allocator() == rhs.outer_allocator()
,并且如果 sizeof...(InnerAllocs) > 0
,则 lhs.inner_allocator() == rhs.inner_allocator()
。
参数
lhs
, rhs
- 要比较的作用域分配器适配器
返回值
- 如果
lhs
和rhs
相等,则返回true
,否则返回false
。 - 如果
lhs
和rhs
不相等,则返回true
,否则返回false
。