| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 成员函数 | ||||
(C++20 前) | ||||
(C++23) | ||||
(C++20 前) | ||||
(C++20 前) | ||||
(C++20 前) | ||||
| 非成员函数 | ||||
(C++20 前) |
| (1) | ||
template< class T1, class T2 >
bool operator==( const allocator<T1>& lhs, const allocator<T2>& rhs ) throw();
|
(C++11 前) | |
template< class T1, class T2 >
bool operator==( const allocator<T1>& lhs, const allocator<T2>& rhs ) noexcept;
|
(C++11 起) (C++20 前) |
|
template< class T1, class T2 >
constexpr bool
operator==( const allocator<T1>& lhs, const allocator<T2>& rhs ) noexcept;
|
(C++20 起) | |
| (2) | ||
template< class T1, class T2 >
bool operator!=( const allocator<T1>& lhs, const allocator<T2>& rhs ) throw();
|
(C++11 前) | |
template< class T1, class T2 >
bool operator!=( const allocator<T1>& lhs, const allocator<T2>& rhs ) noexcept;
|
(C++11 起) (C++20 前) |
|
比较两个默认分配器。因为默认分配器无状态,故两个默认分配器始终相等。
true。false。|
|
(C++20 起) |
| lhs, rhs | - | 要比较的默认分配器 |
truefalse