System::Collections::Generic::Details::ComparerType< T > Struct Template Reference

Public Member Functions

template<typename Q >
std::enable_if< std::is_base_of< System::IComparable< Q >, Q >::value||has_method_compareto< Q >::value, bool >::type operator() (const Q &a, const Q &b) const
 
template<typename Q >
std::enable_if<!(std::is_base_of< IComparable< Q >, Q >::value||has_method_compareto< Q >::value) &&!std::is_floating_point< Q >::value, bool >::type operator() (const Q &a, const Q &b) const
 
template<typename Q >
std::enable_if< std::is_floating_point< Q >::value, bool >::type operator() (const Q &a, const Q &b) const
 

Detailed Description

template<typename T>
struct System::Collections::Generic::Details::ComparerType< T >

Compares elements using 'less' semantics.

Template Parameters
TCompared elements type.

Member Function Documentation

◆ operator()() [1/3]

template<typename T >
template<typename Q >
std::enable_if<std::is_base_of<System::IComparable<Q>, Q>::value || has_method_compareto<Q>::value, bool>::type System::Collections::Generic::Details::ComparerType< T >::operator() ( const Q &  a,
const Q &  b 
) const
inline

Compares value types implementing IComparable interface.

Template Parameters
QType to compare.
Parameters
aLHS value.
bRHS value.
Returns
True if a is considered less than b, false otherwise.

◆ operator()() [2/3]

template<typename T >
template<typename Q >
std::enable_if<!(std::is_base_of<IComparable<Q>, Q>::value || has_method_compareto<Q>::value) && !std::is_floating_point<Q>::value, bool>::type System::Collections::Generic::Details::ComparerType< T >::operator() ( const Q &  a,
const Q &  b 
) const
inline

Compares primitive value types and objects not implementing IComparable interface.

Template Parameters
QType to compare.
Parameters
aLHS value.
bRHS value.
Returns
True if a is considered less than b, false otherwise.

◆ operator()() [3/3]

template<typename T >
template<typename Q >
std::enable_if<std::is_floating_point<Q>::value, bool>::type System::Collections::Generic::Details::ComparerType< T >::operator() ( const Q &  a,
const Q &  b 
) const
inline

Compares floating point types.

Template Parameters
QType to compare.
Parameters
aLHS value.
bRHS value.
Returns
True if a is considered less than b, false otherwise.