Namespaces
Variants

std::pmr:: operator==, std::pmr:: operator!=

From cppreference.net
Memory management library
( exposition only* )
Allocators
Uninitialized memory algorithms
Constrained uninitialized memory algorithms
Memory resources
Uninitialized storage (until C++20)
( until C++20* )
( until C++20* )
( until C++20* )

Garbage collector support (until C++23)
(C++11) (until C++23)
(C++11) (until C++23)
(C++11) (until C++23)
(C++11) (until C++23)
(C++11) (until C++23)
(C++11) (until C++23)
定义于头文件 <memory_resource>
bool operator == ( const std:: pmr :: memory_resource & a,
const std:: pmr :: memory_resource & b ) noexcept ;
(1) (C++17 起)
bool operator ! = ( const std:: pmr :: memory_resource & a,
const std:: pmr :: memory_resource & b ) noexcept ;
(2) (C++17 起)
(C++20 前)

比较 memory_resource 对象 a b 是否相等。两个 memory_resource 当且仅当从一个 memory_resource 分配的内存可以通过另一个进行释放,反之亦然时,它们才被视为相等。

!= 运算符由 operator== 合成生成

(since C++20)

返回值

1) & a == & b || a. is_equal ( b )
2) ! ( a == b )

参见

与另一个 memory_resource 进行相等性比较
(公开成员函数)