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

另见