Share via


CDefaultCompareTraits::CompareElementsOrdered

Call this function to determine the greater and lesser element.

static int CompareElementsOrdered( 
   const T& element1, 
   const T& element2  
);

Parameters

  • element1
    The first element.

  • element2
    The second element.

Return Value

Returns an integer based on the following table:

Condition

Return value

element1 < element2

<0

element1 == element2

0

element1 > element2

>0

Remarks

The default implementation of this function uses the ==, <, and > operators. For objects other than simple data types, this function may need to be overridden.

Requirements

Header: atlcoll.h

See Also

Reference

CDefaultCompareTraits Class

CDefaultCompareTraits::CompareElementsOrdered