5 #ifndef __pinocchio_math_comparison_operators_hpp__
6 #define __pinocchio_math_comparison_operators_hpp__
11 #define PINOCCHIO_DEFINE_COMPARISON_OP(name, OP) \
14 template<typename T1, typename T2> \
15 static bool call(const T1 & a, const T2 & b) \
21 PINOCCHIO_DEFINE_COMPARISON_OP(equal_to_op, ==);
22 PINOCCHIO_DEFINE_COMPARISON_OP(not_equal_to_op, !=);
23 PINOCCHIO_DEFINE_COMPARISON_OP(less_than_op, <);
24 PINOCCHIO_DEFINE_COMPARISON_OP(greater_than_op, >);
25 PINOCCHIO_DEFINE_COMPARISON_OP(less_than_or_equal_to_op, <=);
26 PINOCCHIO_DEFINE_COMPARISON_OP(greater_than_or_equal_to_op, >=);
28 template<
class OP,
bool condition,
bool default_return_value>
31 template<
typename T1,
typename T2>
32 static bool op(
const T1 & ,
const T2 & )
34 return default_return_value;
38 template<
class OP,
bool default_return_value>
41 template<
typename T1,
typename T2>
42 static bool op(
const T1 & a,
const T2 & b)
44 return OP::call(a, b);
Main pinocchio namespace.