operator==,!=(std::allocator)
Материал из cppreference.com
<tbody>
</tbody>
<tbody class="t-dcl-rev t-dcl-rev-num ">
</tbody><tbody>
</tbody>
<tbody class="t-dcl-rev t-dcl-rev-num ">
</tbody><tbody>
</tbody>
| (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) Возвращает
true2) Возвращает
false|
Оператор |
(начиная с C++20) |
Параметры
| lhs, rhs | — | аллокаторы по умолчанию для сравнения |
Возвращаемое значение
1)
true2)
false