@@ -1297,25 +1297,19 @@ inline float fast_length(const float *a, int len);
1297
1297
template <typename ValueT >
1298
1298
inline ValueT length(const ValueT * a, const int len);
1299
1299
1300
+ // The following definition is enabled when BinaryOperation(ValueT, ValueT) returns bool
1301
+ // std::enable_if_t<std::is_same_v<std::invoke_result_t<BinaryOperation, ValueT, ValueT>, bool>, bool>
1300
1302
template <typename ValueT, class BinaryOperation>
1301
- inline std::enable_if_t<
1302
- std::is_same_v<std::invoke_result_t<BinaryOperation, ValueT, ValueT>, bool>,
1303
- bool>
1303
+ inline bool
1304
1304
compare(const ValueT a, const ValueT b, const BinaryOperation binary_op);
1305
- template <typename ValueT >
1306
- inline std::enable_if_t<
1307
- std::is_same_v< std::invoke_result_t<std::not_equal_to< > , ValueT, ValueT>,
1308
- bool>,
1309
- bool>
1310
- compare(const ValueT a, const ValueT b, const std::not_equal_to<> binary_op);
1311
1305
template <typename ValueT, class BinaryOperation>
1312
1306
inline std::enable_if_t<ValueT::size() == 2, ValueT>
1313
1307
compare(const ValueT a, const ValueT b, const BinaryOperation binary_op);
1314
- template <typename ValueT, class BinaryOperation>
1315
- inline std::enable_if_t<
1316
- std::is_same_v<std::invoke_result_t<BinaryOperation, ValueT, ValueT>, bool>,
1317
- bool>
1318
1308
1309
+ // The following definition is enabled when BinaryOperation(ValueT, ValueT) returns bool
1310
+ // std::enable_if_t<std::is_same_v<std::invoke_result_t<BinaryOperation, ValueT, ValueT>, bool>, bool>
1311
+ template <typename ValueT, class BinaryOperation>
1312
+ inline bool
1319
1313
unordered_compare(const ValueT a, const ValueT b,
1320
1314
const BinaryOperation binary_op);
1321
1315
template <typename ValueT, class BinaryOperation>
0 commit comments