Boost C++ Libraries: Ticket #6977: bug in conversion of mpl iterator category tags https://svn.boost.org/trac10/ticket/6977 <p> MPL documentation indicates that bidirectional_iterator_tag is convertible to random_access_iterator_tag. The following code shows that this is not true. </p> <pre class="wiki">#include &lt;boost/mpl/iterator_category.hpp&gt; #include &lt;boost/mpl/iterator_tags.hpp&gt; #include &lt;boost/mpl/print.hpp&gt; #include &lt;boost/mpl/assert.hpp&gt; #include &lt;boost/type_traits/is_convertible.hpp&gt; using namespace boost::mpl; print&lt; boost::is_convertible&lt; bidirectional_iterator_tag, random_access_iterator_tag &gt;::type &gt; x5; BOOST_MPL_ASSERT(( boost::is_convertible&lt; bidirectional_iterator_tag, random_access_iterator_tag &gt; )); </pre><p> The compile time output from this progam is: </p> <pre class="wiki">1&gt;------ Build started: Project: test_interval, Configuration: Debug Win32 ------ 1&gt;Compiling... 1&gt;test_multi_precision.cpp 1&gt;c:\boostrelease\boost\mpl\print.hpp(51) : warning C4308: negative integral constant converted to unsigned type 1&gt; c:\projects\boost projects\mpl\tests\test_multi_precision.cpp(15) : see reference to class template instantiation 'boost::mpl::print&lt;T&gt;' being compiled 1&gt; with 1&gt; [ 1&gt; T=boost::integral_constant&lt;bool,false&gt;::type 1&gt; ] 1&gt;c:\projects\boost projects\mpl\tests\test_multi_precision.cpp(22) : error C2664: 'boost::mpl::assertion_failed' : cannot convert parameter 1 from 'boost::mpl::failed ************boost::is_convertible&lt;From,To&gt;::* ***********' to 'boost::mpl::assert&lt;false&gt;::type' 1&gt; with 1&gt; [ 1&gt; From=boost::mpl::bidirectional_iterator_tag, 1&gt; To=boost::mpl::random_access_iterator_tag 1&gt; ] 1&gt; No constructor could take the source type, or constructor overload resolution was ambiguous 1&gt;Build log was saved at "file://c:\Projects\Boost Projects\mpl\tests\vcide\Debug\BuildLog.htm" 1&gt;test_interval - 1 error(s), 1 warning(s) ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== </pre><p> Robert Ramey </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/6977 Trac 1.4.3