operator==,!=(std::allocator)
Материал из cppreference.com
(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