Boost C++ Libraries: Ticket #9984: range iterator failing to model forward_iterator https://svn.boost.org/trac10/ticket/9984 <p> The following code snippet passes successfully with GCC 4.9, but Clang 3.5 (installed from <a class="missing wiki">MacPorts</a>) fails to accept std::next. </p> <p> The symptoms are somewhat alike <a class="new ticket" href="https://svn.boost.org/trac10/ticket/9431" title="#9431: Bugs: Problem compiling zip_iterator with clang and C++11 (new)">#9431</a>, but I have no idea if it's the same issue. According to the code of irange, I guess the problem is rather with Boost.Iterator. </p> <pre class="wiki">$ cat bar.cc #include &lt;boost/range/irange.hpp&gt; int main() { auto range = boost::irange&lt;int&gt;(0, 10); auto i = std::begin(range); auto j = std::next(i); std::cerr &lt;&lt; *j &lt;&lt; std::endl; } $ clang++-mp-3.5 -std=c++11 -I /opt/local/include bar.cc bar.cc:7:12: error: no matching function for call to 'next' auto j = std::next(i); ^~~~~~~~~ /opt/local/libexec/llvm-3.5/bin/../include/c++/v1/iterator:514:25: note: candidate template ignored: disabled by 'enable_if' [with _ForwardIter = boost::range_detail::integer_iterator&lt;int&gt;] typename enable_if&lt;__is_forward_iterator&lt;_ForwardIter&gt;::value&gt;::type* = 0) ^ 1 error generated. $ g++-mp-4.9 -std=c++11 -I /opt/local/include bar.cc </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/9984 Trac 1.4.3 Kohei Takahashi <flast@…> Fri, 19 Sep 2014 04:11:26 GMT cc set https://svn.boost.org/trac10/ticket/9984#comment:1 https://svn.boost.org/trac10/ticket/9984#comment:1 <ul> <li><strong>cc</strong> <span class="trac-author">flast@…</span> added </li> </ul> <p> It seems that is already fixed in 1.56. </p> <p> Here are results with online compiler. <br /> 1.55: ttp://melpon.org/wandbox/permlink/5XdQJxBGeriugOHI <br /> 1.56: ttp://melpon.org/wandbox/permlink/M7c7ohFJXA69MAFw <br /> (trac rejects <code>http://</code> as a spam ...) </p> Ticket