◐ Shell
clean mode source ↗

operator==,!=(std::allocator) - cppreference.com

De cppreference.com

</tbody> <tbody class="t-dcl-rev t-dcl-rev-num "> </tbody><tbody> </tbody> <tbody class="t-dcl-rev t-dcl-rev-num "> </tbody><tbody>

(1)

template< class T1, class T2 > bool operator==( const allocator<T1>& lhs, const allocator<T2>& rhs ) throw();

(hasta C++11)

template< class T1, class T2 > bool operator==( const allocator<T1>& lhs, const allocator<T2>& rhs ) noexcept;

(desde C++11)
(hasta C++20)

template< class T1, class T2 > constexpr bool operator==( const allocator<T1>& lhs, const allocator<T2>& rhs ) noexcept;

(desde C++20)
(2)

template< class T1, class T2 > bool operator!=( const allocator<T1>& lhs, const allocator<T2>& rhs ) throw();

(hasta C++11)

template< class T1, class T2 > bool operator!=( const allocator<T1>& lhs, const allocator<T2>& rhs ) noexcept;

(desde C++11)
(hasta C++20)

Compara dos asignadores construidos por defecto. Como los asignadores construidos por defecto no tienen estado, dos asignadores por defecto siempre son iguales.

1) Devuelve true.

2) Devuelve false.

El operador != se sintetiza a partir de operator==.

(desde C++20)

Parámetros

lhs, rhs - Los asignadores construidos por defecto.

Valor de retorno

1) true.

2) false.