Compartilhar via


CSimpleMapEqualHelper Class

 

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 CSimpleMapEqualHelper Class.

This class is a helper for the CSimpleMap class.

Syntax

template <class TKey, class TVal>  
class CSimpleMapEqualHelper

Parameters

TKey
The key element.

TVal
The value element.

Members

Public Methods

Name Description
CSimpleMapEqualHelper::IsEqualKey (Static) Tests two keys for equality.
CSimpleMapEqualHelper::IsEqualValue (Static) Tests two values for equality.

Remarks

This traits class is a supplement to the CSimpleMap class. It provides methods for comparing two CSimpleMap object elements (specifically, the key and value components) for equality. By default, the keys and values are compared using operator==(), but if the map contains complex data types that lack their own equality operator, this class can be overridden to provide the extra required functionality.

Requirements

Header: atlsimpcoll.h

CSimpleMapEqualHelper::IsEqualKey

Tests two keys for equality.

static bool IsEqualKey(const TKey& k1, const TKey& k2);

Parameters

k1
The first key.

k2
The second key.

Return Value

Returns true if the keys are equal, false otherwise.

CSimpleMapEqualHelper::IsEqualValue

Tests two values for equality.

static bool IsEqualValue(const TVal& v1, const TVal& v2);

Parameters

v1
The first value.

v2
The second value.

Return Value

Returns true if the values are equal, false otherwise.

See Also

CSimpleMapEqualHelperFalse Class
Class Overview