Boost C++ Libraries: Ticket #6944: Some Range concepts use the incorrect Iterator concept https://svn.boost.org/trac10/ticket/6944 <p> Due to an omitted namespace specification, the <a class="missing wiki">BidirectionalRangeConcept</a> and <a class="missing wiki">RandomAccessRangeConcept</a> inside &lt;boost\range\concepts.hpp&gt; use the STL iterator concept checking classes in &lt;boost\concept_check.hpp&gt; instead of the appropriate concepts inside the same file. </p> <p> This issue was actually noticed in ticket <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/4355" title="#4355: Patches: without namespace 'range_detail' (closed: fixed)">#4355</a>, but a different fix was applied. </p> <p> The reason that the Range concepts should not use the STL iterator concepts is because the Range concepts only require the relevant traversal concept. (<a href="http://www.boost.org/doc/libs/1_49_0/libs/range/doc/html/range/concepts/overview.html">Source</a>) </p> <p> This example fails on Cygwin g++4.7 and VC2010 </p> <pre class="wiki">#include &lt;boost/concept_check.hpp&gt; #include &lt;boost/iterator/iterator_adaptor.hpp&gt; #include &lt;boost/range/concepts.hpp&gt; #include &lt;boost/range/iterator_range.hpp&gt; #include &lt;vector&gt; typedef std::vector&lt;int&gt;::iterator iter_base; struct iter : boost::iterator_adaptor&lt;iter, iter_base, int, boost::use_default, int&gt; {}; // will be deduced as random-access traversal but input category typedef boost::iterator_range&lt;iter&gt; iter_range; BOOST_CONCEPT_ASSERT(( boost::RandomAccessRangeConcept&lt;iter_range&gt; )); </pre><p> I've attached a patch for this issue. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/6944 Trac 1.4.3 Andrew Morris <andy@…> Fri, 25 May 2012 09:42:31 GMT attachment set https://svn.boost.org/trac10/ticket/6944 https://svn.boost.org/trac10/ticket/6944 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">range_iter_bug.patch</span> </li> </ul> <p> Fix </p> Ticket Andrew Morris <andy@…> Fri, 25 May 2012 09:44:16 GMT keywords set https://svn.boost.org/trac10/ticket/6944#comment:1 https://svn.boost.org/trac10/ticket/6944#comment:1 <ul> <li><strong>keywords</strong> range concept iterator added </li> </ul> Ticket Nathan Ridge Thu, 30 May 2013 23:16:56 GMT <link>https://svn.boost.org/trac10/ticket/6944#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6944#comment:2</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/84566" title="[range] Use correct iterator concepts when checking Boost.Range ...">[84566]</a>) [range] Use correct iterator concepts when checking Boost.Range concepts (refs <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/6944" title="#6944: Bugs: Some Range concepts use the incorrect Iterator concept (closed: fixed)">#6944</a>). </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Nathan Ridge</dc:creator> <pubDate>Thu, 30 May 2013 23:18:26 GMT</pubDate> <title>owner, status changed https://svn.boost.org/trac10/ticket/6944#comment:3 https://svn.boost.org/trac10/ticket/6944#comment:3 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Neil Groves</span> to <span class="trac-author">Nathan Ridge</span> </li> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> </ul> <p> Thanks for the report and the patch! Fixed in trunk. </p> Ticket Nathan Ridge Wed, 05 Jun 2013 00:42:44 GMT <link>https://svn.boost.org/trac10/ticket/6944#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6944#comment:4</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/84643" title="[range] Fixed a failing test on gcc 4.2 (refs #6944).">[84643]</a>) [range] Fixed a failing test on gcc 4.2 (refs <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/6944" title="#6944: Bugs: Some Range concepts use the incorrect Iterator concept (closed: fixed)">#6944</a>). </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Nathan Ridge</dc:creator> <pubDate>Tue, 18 Jun 2013 02:22:09 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/6944#comment:5 https://svn.boost.org/trac10/ticket/6944#comment:5 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/84823" title="[range] Merge Boost.Range bug fixes to release branch (fixes #6944; ...">[84823]</a>) [range] Merge Boost.Range bug fixes to release branch (fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/6944" title="#6944: Bugs: Some Range concepts use the incorrect Iterator concept (closed: fixed)">#6944</a>; fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/7407" title="#7407: Bugs: istream_range does not compile with wcin (closed: fixed)">#7407</a>; fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/7408" title="#7408: Bugs: istream_range should not pull istream (closed: fixed)">#7408</a>; fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/7731" title="#7731: Bugs: irange doesn't end iteration properly when step_size is 3 or more (closed: fixed)">#7731</a>; fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/7827" title="#7827: Bugs: [range] cant compile r | indexed to range algorithm (closed: fixed)">#7827</a>; fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/8338" title="#8338: Bugs: Iterator range does not work with pointer to array as iterator (closed: fixed)">#8338</a>; fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/8453" title="#8453: Bugs: Incorrect configuration macro BOOST_NO_PARTIAL_TEMPLATE_SPECIALIZATION (closed: fixed)">#8453</a>). </p> Ticket Nathan Ridge Tue, 18 Jun 2013 02:22:43 GMT <link>https://svn.boost.org/trac10/ticket/6944#comment:6 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6944#comment:6</guid> <description> <p> Fixed for 1.54. </p> </description> <category>Ticket</category> </item> </channel> </rss>