Boost C++ Libraries: Ticket #8702: Error in size_type detection in has_size_type https://svn.boost.org/trac10/ticket/8702 <p> File <code>boost/range/size_type.hpp</code> contains an error. <code>has_size_type</code> does not work well, because <code>sizeof(test&lt;T&gt;(0))</code> requires implicit conversion of <code>0</code> to <code>size_type</code>. In case when <code>size_type</code> is not an <code>int</code>, function <code>no_type </code>has_size_type<code>::test(Arg x)</code> will be chosen. </p> <p> To fix that issue replace </p> <pre class="wiki">template&lt;typename C, typename Arg&gt; static no_type test(Arg x); </pre><p> with </p> <pre class="wiki">template&lt;typename C&gt; static no_type test(...); </pre><p> In that case attempt to do implicit conversion will be done before converting choosing <code>no_type test(...)</code> version. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/8702 Trac 1.4.3 Neil Groves Sat, 22 Feb 2014 16:23:34 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/8702#comment:1 https://svn.boost.org/trac10/ticket/8702#comment:1 <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">fixed</span> </li> </ul> Ticket