Boost C++ Libraries: Ticket #11887: BOOST_TEST(3u == (std::max)(0u, 3u)) fails https://svn.boost.org/trac10/ticket/11887 <p> Given the following program: </p> <pre class="wiki">#include &lt;algorithm&gt; #define BOOST_TEST_MODULE sandbox #include &lt;boost/test/included/unit_test.hpp&gt; BOOST_AUTO_TEST_CASE(sandbox) { BOOST_TEST(3u == ((std::max)(0u, 3u))); } </pre><p> The check fails with: </p> <pre class="wiki">check 3u == ((std::max)(0u, 3u)) has failed [3 != 7095312] </pre><p> (The large number on the right hand side is not specific, depends on the program) </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/11887 Trac 1.4.3 Raffi Enficiaud Wed, 06 Jan 2016 22:27:53 GMT <link>https://svn.boost.org/trac10/ticket/11887#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/11887#comment:1</guid> <description> <p> Would you please provide the compilation line? especially, I would like to know it you are using C++11. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Raffi Enficiaud</dc:creator> <pubDate>Wed, 06 Jan 2016 22:53:58 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/11887#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/11887#comment:2</guid> <description> <p> From your post on the ML and the trace, I see that the right operand is bound to <code>unsigned int &amp;</code> while it should be <code>unsigned int</code>. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Raffi Enficiaud</dc:creator> <pubDate>Tue, 12 Jan 2016 08:38:46 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/11887#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/11887#comment:3</guid> <description> <p> Would you please try running your example against branch <code>fix/handling-rvalue-erasure</code>? </p> <p> Thanks </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Raffi Enficiaud</dc:creator> <pubDate>Tue, 12 Jan 2016 08:39:05 GMT</pubDate> <title>owner, status changed https://svn.boost.org/trac10/ticket/11887#comment:4 https://svn.boost.org/trac10/ticket/11887#comment:4 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Gennadiy Rozental</span> to <span class="trac-author">Raffi Enficiaud</span> </li> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> </ul> Ticket Benedek Thaler Wed, 13 Jan 2016 17:52:29 GMT <link>https://svn.boost.org/trac10/ticket/11887#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/11887#comment:5</guid> <description> <p> Works for me after applying fix/handling-rvalue-erasure </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Raffi Enficiaud</dc:creator> <pubDate>Wed, 13 Jan 2016 19:24:18 GMT</pubDate> <title>milestone changed https://svn.boost.org/trac10/ticket/11887#comment:6 https://svn.boost.org/trac10/ticket/11887#comment:6 <ul> <li><strong>milestone</strong> <span class="trac-field-old">To Be Determined</span> → <span class="trac-field-new">Boost 1.61.0</span> </li> </ul> <p> Very good, thank you for the feedback! </p> Ticket Raffi Enficiaud Tue, 02 Feb 2016 08:24:54 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/11887#comment:7 https://svn.boost.org/trac10/ticket/11887#comment:7 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> Commits </p> <ul><li>fd11b12dd6675a8d86ba54a21bce3f5f16f8c77e </li><li>20e50a6d9444e5bb9bccdf51705b4e463c024853 </li></ul><p> Merged in master: </p> <ul><li>2b918d0bd56cd2add28a1e35c6a2d0fd8c60cf90 </li></ul> Ticket