CSimpleMapEqualHelperFalse 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 CSimpleMapEqualHelperFalse Class.
This class is a helper for the CSimpleMap class.
Syntax
template <class TKey, class TVal>
class CSimpleMapEqualHelperFalse
Members
Public Methods
Name | Description |
---|---|
CSimpleMapEqualHelperFalse::IsEqualKey | (Static) Tests two keys for equality. |
CSimpleMapEqualHelperFalse::IsEqualValue | (Static) Returns false. |
Remarks
This traits class is a supplement to the CSimpleMap
class. It provides a method for comparing two elements contained in the CSimpleMap
object, specifically two value elements or two key elements.
The value comparison will always return false, and in addition, will call ATLASSERT
with an argument of false if it is ever referenced. In situations where the equality test is not sufficiently defined, this class allows a map containing key/value pairs to operate correctly for most methods but fail in a well-defined manner for methods that depend on comparisons such as CSimpleMap::FindVal.
Requirements
Header: atlsimpcoll.h
CSimpleMapEqualHelperFalse::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.
Remarks
This method calls CSimpleArrayEqualHelper.
CSimpleMapEqualHelperFalse::IsEqualValue
Returns false.
static bool IsEqualValue(const TVal&, const TVal&);
Return Value
Returns false.
Remarks
This method always returns false, and will call ATLASSERT
with an argument of false if it is ever referenced. The purpose of CSimpleMapEqualHelperFalse::IsEqualValue
is to force methods using comparisons to fail in a well-defined manner when equality tests have not been adequately defined.