Boost C++ Libraries: Ticket #4301: and_<true_>::type is false_ https://svn.boost.org/trac10/ticket/4301 <p> It is probably a good idea to make and_&lt;true_&gt;::type be true_, or throw a compiler error, or at least fix the documentation at <a href="http://www.boost.org/doc/libs/1_43_0/libs/mpl/doc/refmanual/and.html">http://www.boost.org/doc/libs/1_43_0/libs/mpl/doc/refmanual/and.html</a> such that this unusual behavior is documented. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/4301 Trac 1.4.3 Steven Watanabe Wed, 16 Jun 2010 03:37:17 GMT <link>https://svn.boost.org/trac10/ticket/4301#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4301#comment:1</guid> <description> <p> Hmmm. The fact that this even compiles is an artifact of the way mpl::na is implemented. and_ is only intended to take two or more arguments. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Bryce Adelstein Lelbach</dc:creator> <pubDate>Thu, 30 Dec 2010 14:39:41 GMT</pubDate> <title>owner, version, severity, milestone changed; cc set https://svn.boost.org/trac10/ticket/4301#comment:2 https://svn.boost.org/trac10/ticket/4301#comment:2 <ul> <li><strong>cc</strong> <span class="trac-author">admin@…</span> added </li> <li><strong>owner</strong> changed from <span class="trac-author">Aleksey Gurtovoy</span> to <span class="trac-author">Joel Falcou</span> </li> <li><strong>version</strong> <span class="trac-field-old">Boost 1.44.0</span> → <span class="trac-field-new">Boost Development Trunk</span> </li> <li><strong>severity</strong> <span class="trac-field-old">Cosmetic</span> → <span class="trac-field-new">Problem</span> </li> <li><strong>milestone</strong> <span class="trac-field-old">Boost 1.43.0</span> → <span class="trac-field-new">Boost 1.46.0</span> </li> </ul> <p> Confirmed, this is still a problem, possibly a problem with other binary logical operations too. I think we need to prohibit an unary and_ entirely. This reproduces the problem: </p> <pre class="wiki"> #include &lt;boost/mpl/assert.hpp&gt; #include &lt;boost/mpl/bool.hpp&gt; #include &lt;boost/mpl/and.hpp&gt; int main (void) { using boost::mpl::and_; using boost::mpl::true_; BOOST_MPL_ASSERT((and_&lt;true_&gt;)); } </pre> Ticket