Boost C++ Libraries: Ticket #11785: specializing boost::range_const_iterator has no effect on boost::has_range_iterator https://svn.boost.org/trac10/ticket/11785 <p> see the following code: </p> <div class="wiki-code"><div class="code"><pre><span class="cp">#include</span> <span class="cpf">&lt;boost/range/has_range_iterator.hpp&gt;</span><span class="cp"></span> <span class="cp">#include</span> <span class="cpf">&lt;boost/filesystem.hpp&gt;</span><span class="cp"></span> <span class="cp">#include</span> <span class="cpf">&lt;boost/filesystem/operations.hpp&gt; // specializes range_const_iterator</span><span class="cp"></span> <span class="k">using</span> <span class="n">ConstDirIter</span> <span class="o">=</span> <span class="n">boost</span><span class="o">::</span><span class="n">range_const_iterator</span><span class="o">&lt;</span><span class="n">boost</span><span class="o">::</span><span class="n">filesystem</span><span class="o">::</span><span class="n">directory_iterator</span><span class="o">&gt;::</span><span class="n">type</span><span class="p">;</span> <span class="c1">// this compiles</span> <span class="k">static_assert</span><span class="p">(</span> <span class="n">boost</span><span class="o">::</span><span class="n">has_range_const_iterator</span><span class="o">&lt;</span> <span class="n">boost</span><span class="o">::</span><span class="n">filesystem</span><span class="o">::</span><span class="n">directory_iterator</span> <span class="o">&gt;::</span><span class="n">value</span><span class="p">,</span> <span class="s">&quot;This does not compile!!!&quot;</span> <span class="p">);</span> </pre></div></div><p> See <a class="ext-link" href="https://github.com/boostorg/range/pull/40"><span class="icon">​</span>https://github.com/boostorg/range/pull/40</a> for a fix. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/11785 Trac 1.4.3