C++ 参考手册
- C++11
- C++14
- C++17
- C++20
- C++ 编译器支持情况表
- 独立与宿主实现
- C++ 语言
- C++ 关键词
- 预处理器
- C++ 标准库头文件
- 具名要求
- 功能特性测试 (C++20)
- 工具库
- 类型支持(基本类型、RTTI、类型特性)
- 概念库 (C++20)
- 错误处理
- 动态内存管理
- std::unique_ptr
- std::scoped_allocator_adaptor
- operator==,!=(std::scoped_allocator_adaptor)
- std::scoped_allocator_adaptor 的推导指引
- std::scoped_allocator_adaptor<OuterAlloc,InnerAlloc...>::destroy
- std::scoped_allocator_adaptor<OuterAlloc,InnerAlloc...>:: select_on_container_copy_construction
- std::scoped_allocator_adaptor<OuterAlloc,InnerAlloc...>::allocate
- std::scoped_allocator_adaptor<OuterAlloc,InnerAlloc...>::inner_allocator
- std::scoped_allocator_adaptor<OuterAlloc,InnerAlloc...>::outer_allocator
- std::scoped_allocator_adaptor<OuterAlloc,InnerAlloc...>:: scoped_allocator_adaptor
- std::scoped_allocator_adaptor<OuterAlloc,InnerAlloc...>:: ~scoped_allocator_adaptor
- std::scoped_allocator_adaptor<OuterAlloc,InnerAlloc...>::operator=
- std::scoped_allocator_adaptor<OuterAlloc,InnerAlloc...>::deallocate
- std::scoped_allocator_adaptor<OuterAlloc,InnerAlloc...>::max_size
- std::scoped_allocator_adaptor<OuterAlloc,InnerAlloc...>::construct
- std::addressof
- std::allocator_traits
- std::default_delete
- std::allocator_arg_t
- std::allocator_arg
- std::weak_ptr
- std::enable_shared_from_this
- std::bad_weak_ptr
- std::auto_ptr
- std::destroy_at
- std::destroy
- std::destroy_n
- std::uninitialized_move
- std::uninitialized_value_construct
- std::owner_less
- std::shared_ptr
- std::to_address
- std::assume_aligned
- std::make_obj_using_allocator
- C 内存管理库
- 低层内存管理
- std::pmr::memory_resource
- std::allocator
- std::pointer_traits
- std::uses_allocator
- std::uses_allocator_construction_args
- std::uninitialized_construct_using_allocator
- std::pmr::polymorphic_allocator
- std::pmr::get_default_resource
- std::pmr::set_default_resource
- std::pmr::new_delete_resource
- std::pmr::null_memory_resource
- std::pmr::synchronized_pool_resource
- std::pmr::unsynchronized_pool_resource
- std::pmr::monotonic_buffer_resource
- std::pmr::pool_options
- std::raw_storage_iterator
- std::get_temporary_buffer
- std::return_temporary_buffer
- std::uninitialized_copy
- std::uninitialized_fill
- std::uninitialized_default_construct
- std::uninitialized_copy_n
- std::uninitialized_fill_n
- std::uninitialized_move_n
- std::uninitialized_default_construct_n
- std::uninitialized_value_construct_n
- std::construct_at
- std::align
- 注释
- 日期和时间工具
- 字符串库
- 容器库
- 迭代器库
- 范围库 (C++20)
- 算法库
- 数值库
- 输入/输出库
- 文件系统库
- 本地化库
- 正则表达式库
- 原子操作库
- 线程支持库
- 实验性 C++ 特性
- 有用的资源
- 索引
- std 符号索引
- 协程支持 (C++20)
- C++ 关键词
位置:首页 > C++ 参考手册 >动态内存管理 >std::scoped_allocator_adaptor > operator==,!=(std::scoped_allocator_adaptor)
operator==,!=(std::scoped_allocator_adaptor)
定义于头文件 <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 前) |
|
比较二个 scoped_allocator_adaptors 。若满足下列条件则二个这种分配器相等:
- lhs.outer_allocator() == rhs.outer_allocator() ,且
- 若 sizeof...(InnerAllocs) > 0 ,则 lhs.inner_allocator() == rhs.inner_allocator() 。
参数
lhs, rhs | - | 要比较的 scoped_allocator_adaptors |
返回值
1) 若
lhs
与 rhs
相等,则返回 true ,否则返回 false 。2) 若
lhs
与 rhs
不相等,则返回 true ,否则返回 false 。