operator==,!=(std::allocator)
| (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) |
Сравнивает два аллокатора по умолчанию. Поскольку аллокаторы по умолчанию являются бессостоятельными, два аллокатора по умолчанию всегда равны.
1) Возвращает
true.
2) Возвращает
false.
|
Оператор |
(с C++20) |
Параметры
| lhs, rhs | - | аллокаторы по умолчанию для сравнения |
Значение результата
1)
true
2)
false
© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
https://en.cppreference.com/w/cpp/memory/allocator/operator_cmp