Ticket #2791: tuple_comparison.hpp.diff

File tuple_comparison.hpp.diff, 1.1 KB (added by daigo@…, 14 years ago)

The diff in the body text was not displayed correctly. This is the diff file.

  • boost/tuple/tuple_comparison.hpp

     
    6969template<class T1, class T2>
    7070inline bool lt(const T1& lhs, const T2& rhs) {
    7171  return lhs.get_head() < rhs.get_head()  ||
    72             !(rhs.get_head() < lhs.get_head()) &&
    73             lt(lhs.get_tail(), rhs.get_tail());
     72          ( !(rhs.get_head() < lhs.get_head()) &&
     73            lt(lhs.get_tail(), rhs.get_tail()));
    7474}
    7575template<>
    7676inline bool lt<null_type,null_type>(const null_type&, const null_type&) { return false; }
     
    7878template<class T1, class T2>
    7979inline bool gt(const T1& lhs, const T2& rhs) {
    8080  return lhs.get_head() > rhs.get_head()  ||
    81            !(rhs.get_head() > lhs.get_head()) &&
    82             gt(lhs.get_tail(), rhs.get_tail());
     81         ( !(rhs.get_head() > lhs.get_head()) &&
     82            gt(lhs.get_tail(), rhs.get_tail()));
    8383}
    8484template<>
    8585inline bool gt<null_type,null_type>(const null_type&, const null_type&) { return false; }