<allocators> operators

Visual Studio 2015
 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at <allocators> operators.

operator!=](#operator_neq)|operator==|

Tests for inequality between allocator objects of a specified class.

template <class Type, class Sync>  
bool operator!=(
    const allocator_base<Type, Sync>& left,
    const allocator_base<Type, Sync>& right);

Parameters

ParameterDescription
leftOne of the allocator objects to be tested for inequality.
rightOne of the allocator objects to be tested for inequality.

Return Value

true if the allocator objects are not equal; false if allocator objects are equal.

Remarks

The template operator returns !(left == right).

Tests for equality between allocator objects of a specified class.

template <class Type, class Sync>  
bool operator==(
    const allocator_base<Type, Sync>& left,
    const allocator_base<Type, Sync>& right);

Parameters

ParameterDescription
leftOne of the allocator objects to be tested for equality.
rightOne of the allocator objects to be tested for equality.

Return Value

true if the allocator objects are equal; false if allocator objects are not equal.

Remarks

This template operator returns left.equals(right).

<allocators>

Show: