Adapter to use IComparer within STL environment. Uses IComparer if set; otherwise, uses operator < (if available) or returns false (if not). More...
#include "icomparer.h"
Public Member Functions | |
ComparerAdapter () | |
Constructs adapter without any comparator available. | |
ComparerAdapter (const SharedPtr< System::Collections::Generic::IComparer< T > > &comparator) | |
Constructs adapter. | |
void | set_Comparator (const SharedPtr< IComparer< T > > &comparator) |
Sets comparator object. | |
template<typename Q = T> | |
std::enable_if< detail::has_operator_less< Q >::value, bool >::type | operator() (const Q &x, const Q &y) const |
Comparison function for types with operator < available. | |
template<typename Q = T> | |
std::enable_if<!detail::has_operator_less< Q >::value, bool >::type | operator() (const Q &x, const Q &y) const |
Comparison function for types with operator < not available. | |
Adapter to use IComparer within STL environment. Uses IComparer if set; otherwise, uses operator < (if available) or returns false (if not).
T | Type being compared. |
|
inline |
Constructs adapter without any comparator available.
|
inline |
Constructs adapter.
comparator | Comparator object to use. |
|
inline |
Comparison function for types with operator < available.
Q | Type being compared; template for type conversion availability. |
x | First value to compare. |
y | Second value to compare. |
x
is considered less than y
, false otherwise.
|
inline |
Comparison function for types with operator < not available.
Q | Type being compared; template for type conversion availability. |
x | First value to compare. |
y | Second value to compare. |
x
is considered less than y
, false otherwise.
|
inline |
Sets comparator object.
comparator | Comparator to use. |