Ticket #2791: tuple_comparison.hpp.diff
File tuple_comparison.hpp.diff, 1.1 KB (added by , 14 years ago) |
---|
-
boost/tuple/tuple_comparison.hpp
69 69 template<class T1, class T2> 70 70 inline bool lt(const T1& lhs, const T2& rhs) { 71 71 return lhs.get_head() < rhs.get_head() || 72 73 lt(lhs.get_tail(), rhs.get_tail()) ;72 ( !(rhs.get_head() < lhs.get_head()) && 73 lt(lhs.get_tail(), rhs.get_tail())); 74 74 } 75 75 template<> 76 76 inline bool lt<null_type,null_type>(const null_type&, const null_type&) { return false; } … … 78 78 template<class T1, class T2> 79 79 inline bool gt(const T1& lhs, const T2& rhs) { 80 80 return lhs.get_head() > rhs.get_head() || 81 82 gt(lhs.get_tail(), rhs.get_tail()) ;81 ( !(rhs.get_head() > lhs.get_head()) && 82 gt(lhs.get_tail(), rhs.get_tail())); 83 83 } 84 84 template<> 85 85 inline bool gt<null_type,null_type>(const null_type&, const null_type&) { return false; }