[Boost-bugs] [Boost C++ Libraries] #2791: Please remove a warning in tuple_comparison.hpp

Subject: [Boost-bugs] [Boost C++ Libraries] #2791: Please remove a warning in tuple_comparison.hpp
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-02-22 07:31:41


#2791: Please remove a warning in tuple_comparison.hpp
------------------------------+---------------------------------------------
 Reporter: daigo_at_[hidden] | Owner:
     Type: Bugs | Status: new
Milestone: Boost 1.39.0 | Component: None
  Version: Boost 1.38.0 | Severity: Problem
 Keywords: |
------------------------------+---------------------------------------------
 Compiling tuple_comparison.hpp with g++ 4.3.3 causes a warning. You should
 add parentheses.

 /usr/local/src/boost/boost/tuple/tuple_comparison.hpp: In function 'bool
 boost::tuples::detail::gt(const T1
 &, const T2&) [with T1 = boost::tuples::cons<int, boost::tuples::cons<int,
 boost::tuples::cons<int, boost::
 tuples::cons<int, boost::tuples::null_type> > > >, T2 =
 boost::tuples::cons<int, boost::tuples::cons<int, b
 oost::tuples::cons<int, boost::tuples::cons<int, boost::tuples::null_type>
> > >]':
 /usr/local/src/boost/boost/tuple/tuple_comparison.hpp:148: instantiated
 from 'bool boost::tuples::operato
 r>(const boost::tuples::cons<T1, T2>&, const boost::tuples::cons<S1, S2>&)
 [with T1 = int, T2 = boost::tupl
 es::cons<int, boost::tuples::cons<int, boost::tuples::cons<int,
 boost::tuples::null_type> > >, S1 = int, S2
  = boost::tuples::cons<int, boost::tuples::cons<int,
 boost::tuples::cons<int, boost::tuples::null_type> > >
 ]'

 $ g++ -v
 Using built-in specs.
 Target: x86_64-linux-gnu
 Configured with: ../src/configure -v --with-pkgversion='Debian 4.3.3-3'
 --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs --enable-
 languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --with-
 system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-
 threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3
 --program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug
 --enable-objc-gc --enable-mpfr --enable-cld --with-tune=generic --enable-
 checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu
 --target=x86_64-linux-gnu
 Thread model: posix
 gcc version 4.3.3 (Debian 4.3.3-3)


 Index: boost/tuple/tuple_comparison.hpp
 ===================================================================
 --- boost/tuple/tuple_comparison.hpp (リビジョン 51377)
 +++ boost/tuple/tuple_comparison.hpp (作業コピー)
 @@ -69,8 +69,8 @@
  template<class T1, class T2>
  inline bool lt(const T1& lhs, const T2& rhs) {
    return lhs.get_head() < rhs.get_head() ||
 - !(rhs.get_head() < lhs.get_head()) &&
 - lt(lhs.get_tail(), rhs.get_tail());
 + ( !(rhs.get_head() < lhs.get_head()) &&
 + lt(lhs.get_tail(), rhs.get_tail()));
  }
  template<>
  inline bool lt<null_type,null_type>(const null_type&, const null_type&) {
 return false; }
 @@ -78,8 +78,8 @@
  template<class T1, class T2>
  inline bool gt(const T1& lhs, const T2& rhs) {
    return lhs.get_head() > rhs.get_head() ||
 - !(rhs.get_head() > lhs.get_head()) &&
 - gt(lhs.get_tail(), rhs.get_tail());
 + ( !(rhs.get_head() > lhs.get_head()) &&
 + gt(lhs.get_tail(), rhs.get_tail()));
  }
  template<>
  inline bool gt<null_type,null_type>(const null_type&, const null_type&) {
 return false; }

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/2791>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:49:59 UTC