Boost C++ Libraries: Ticket #2791: Please remove a warning in tuple_comparison.hpp https://svn.boost.org/trac10/ticket/2791 <p> Compiling tuple_comparison.hpp with g++ 4.3.3 causes a warning. You should add parentheses. </p> <p> /usr/local/src/boost/boost/tuple/tuple_comparison.hpp: In function 'bool boost::tuples::detail::gt(const T1 &amp;, const T2&amp;) [with T1 = boost::tuples::cons&lt;int, boost::tuples::cons&lt;int, boost::tuples::cons&lt;int, boost:: tuples::cons&lt;int, boost::tuples::null_type&gt; &gt; &gt; &gt;, T2 = boost::tuples::cons&lt;int, boost::tuples::cons&lt;int, b oost::tuples::cons&lt;int, boost::tuples::cons&lt;int, boost::tuples::null_type&gt; &gt; &gt; &gt;]': /usr/local/src/boost/boost/tuple/tuple_comparison.hpp:148: instantiated from 'bool boost::tuples::operato r&gt;(const boost::tuples::cons&lt;T1, T2&gt;&amp;, const boost::tuples::cons&lt;S1, S2&gt;&amp;) [with T1 = int, T2 = boost::tupl es::cons&lt;int, boost::tuples::cons&lt;int, boost::tuples::cons&lt;int, boost::tuples::null_type&gt; &gt; &gt;, S1 = int, S2 </p> <h1 class="section" id="boost::tuples::consintboost::tuples::consintboost::tuples::consintboost::tuples::null_type">boost::tuples::cons&lt;int, boost::tuples::cons&lt;int, boost::tuples::cons&lt;int, boost::tuples::null_type&gt; &gt; &gt;</h1> <p> ]' </p> <p> $ 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=<a class="ext-link" href="file:///usr/share/doc/gcc-4.3/README.Bugs"><span class="icon">​</span>file:///usr/share/doc/gcc-4.3/README.Bugs</a> --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) </p> <p> Index: boost/tuple/tuple_comparison.hpp =================================================================== --- boost/tuple/tuple_comparison.hpp (リビジョン 51377) +++ boost/tuple/tuple_comparison.hpp (作業コピー) @@ -69,8 +69,8 @@ </p> <blockquote> <p> template&lt;class T1, class T2&gt; inline bool lt(const T1&amp; lhs, const T2&amp; rhs) { </p> <blockquote> <table class="wiki"> <tr>return lhs.get_head() &lt; rhs.get_head() </tr></table> </blockquote> </blockquote> <ul><li> !(rhs.get_head() &lt; lhs.get_head()) &amp;&amp; </li><li> lt(lhs.get_tail(), rhs.get_tail()); </li></ul><p> + ( !(rhs.get_head() &lt; lhs.get_head()) &amp;&amp; + lt(lhs.get_tail(), rhs.get_tail())); </p> <blockquote> <p> } template&lt;&gt; inline bool lt&lt;null_type,null_type&gt;(const null_type&amp;, const null_type&amp;) { return false; } </p> </blockquote> <p> @@ -78,8 +78,8 @@ </p> <blockquote> <p> template&lt;class T1, class T2&gt; inline bool gt(const T1&amp; lhs, const T2&amp; rhs) { </p> <blockquote> <table class="wiki"> <tr>return lhs.get_head() &gt; rhs.get_head() </tr></table> </blockquote> </blockquote> <ul><li> !(rhs.get_head() &gt; lhs.get_head()) &amp;&amp; </li><li> gt(lhs.get_tail(), rhs.get_tail()); </li></ul><p> + ( !(rhs.get_head() &gt; lhs.get_head()) &amp;&amp; + gt(lhs.get_tail(), rhs.get_tail())); </p> <blockquote> <p> } template&lt;&gt; inline bool gt&lt;null_type,null_type&gt;(const null_type&amp;, const null_type&amp;) { return false; } </p> </blockquote> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/2791 Trac 1.4.3 daigo@… Sun, 22 Feb 2009 07:36:10 GMT attachment set https://svn.boost.org/trac10/ticket/2791 https://svn.boost.org/trac10/ticket/2791 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">tuple_comparison.hpp.diff</span> </li> </ul> <p> The diff in the body text was not displayed correctly. This is the diff file. </p> Ticket Steven Watanabe Sun, 22 Feb 2009 19:04:33 GMT component changed; owner set https://svn.boost.org/trac10/ticket/2791#comment:1 https://svn.boost.org/trac10/ticket/2791#comment:1 <ul> <li><strong>owner</strong> set to <span class="trac-author">Joel de Guzman</span> </li> <li><strong>component</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">tuple</span> </li> </ul> Ticket Steven Watanabe Tue, 24 Feb 2009 22:10:54 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/2791#comment:2 https://svn.boost.org/trac10/ticket/2791#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">duplicate</span> </li> </ul> <p> Duplicates <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/2388" title="#2388: Patches: [patch] fix gcc-4.3 warning in tuple_comparison.hpp (closed: fixed)">#2388</a>. </p> Ticket