operator==,!=(std::scoped_allocator_adaptor)
|
成员函数 | ||||
非成员函数 | ||||
operator==operator!=
(C++20
前)
|
||||
推导指引(C++17) |
在标头
<scoped_allocator>
定义
|
||
template<
class
OuterAlloc1, class
OuterAlloc2, class...
InnerAllocs
>
bool
operator==(
const
scoped_allocator_adaptor<OuterAlloc1,
InnerAllocs...>&
lhs, |
(C++11 起) | |
template<
class
OuterAlloc1, class
OuterAlloc2, class...
InnerAllocs
>
bool
operator!=(
const
scoped_allocator_adaptor<OuterAlloc1,
InnerAllocs...>&
lhs, |
(C++11
起) (C++20 前) |
|
比较二个有作用域分配器适配器。若满足下列条件则二个这种分配器相等:
- lhs.outer_allocator() == rhs.outer_allocator() ,且
- 若 sizeof...(InnerAllocs) > 0 ,则 lhs.inner_allocator() == rhs.inner_allocator() 。
|
(C++20 起) |
参数
lhs, rhs | - | 要比较的有作用域分配器适配器 |
返回值
lhs
与
rhs
相等,则返回 true ,否则返回
false 。lhs
与
rhs
不相等,则返回 true ,否则返回
false 。