Ticket #2388: tuple_comparison_warning_bcs.patch

File tuple_comparison_warning_bcs.patch, 1.1 KB (added by Bryan Silverthorn <bcs26@…>, 14 years ago)

patch against r49167

  • 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; }