Метод System::Compare

System::Compare(const TA&, const TB&) method

Сравнивает два значения.

template<typename TA,typename TB> std::enable_if_t<!std::is_floating_point<TA>::value &&!std::is_floating_point<TB>::value, int> System::Compare(const TA &a, const TB &b)
ПараметрОписание
TAТип первого сравниваемого значения
TBТип второго сравниваемого значения
ПараметрТипОписание
aconst TA&Первый операнд
bconst TB&Второй операнд

ReturnValue

-1 if a compares less than b; 0 if the values are equal; 1 if a compares greater than b

См. также

System::Compare(const TA&, const TB&) method

Сравнивает два значения с плавающей точкой.

template<typename TA,typename TB> std::enable_if_t<std::is_floating_point<TA>::value &&std::is_floating_point<TB>::value, int> System::Compare(const TA &a, const TB &b)
ПараметрОписание
TAТип первого сравниваемого значения
TBТип второго сравниваемого значения
ПараметрТипОписание
aconst TA&Первый операнд
bconst TB&Второй операнд

ReturnValue

-1 if a compares less than b; 0 if the values are equal; 1 if a compares greater than b

См. также