Boost C++ Libraries: Ticket #4355: without namespace 'range_detail' https://svn.boost.org/trac10/ticket/4355 <p> Hi, I found some bugs in &lt;boost/range/concepts.hpp&gt;. </p> <p> --- concepts.hpp.orig 2010-06-14 16:33:32.700239204 +0800 +++ concepts.hpp 2010-06-17 07:05:44.209528094 +0800 @@ -295,8 +295,8 @@ </p> <blockquote> <p> struct <a class="missing wiki">BidirectionalRangeConcept</a> : <a class="missing wiki">ForwardRangeConcept</a>&lt;T&gt; { </p> </blockquote> <blockquote> <p> #if BOOST_RANGE_ENABLE_CONCEPT_ASSERT </p> </blockquote> <ul><li> BOOST_RANGE_CONCEPT_ASSERT((<a class="missing wiki">BidirectionalIteratorConcept</a>&lt;BOOST_DEDUCED_TYPENAME BidirectionalRangeConcept::iterator&gt;)); </li><li> BOOST_RANGE_CONCEPT_ASSERT((<a class="missing wiki">BidirectionalIteratorConcept</a>&lt;BOOST_DEDUCED_TYPENAME BidirectionalRangeConcept::const_iterator&gt;)); </li></ul><p> + BOOST_RANGE_CONCEPT_ASSERT((range_detail::<a class="missing wiki">BidirectionalIteratorConcept</a>&lt;BOOST_DEDUCED_TYPENAME BidirectionalRangeConcept::iterator&gt;)); + BOOST_RANGE_CONCEPT_ASSERT((range_detail::<a class="missing wiki">BidirectionalIteratorConcept</a>&lt;BOOST_DEDUCED_TYPENAME BidirectionalRangeConcept::const_iterator&gt;)); </p> <blockquote> <p> #endif </p> <blockquote> <p> }; </p> </blockquote> </blockquote> <p> @@ -313,8 +313,8 @@ </p> <blockquote> <p> struct <a class="missing wiki">RandomAccessRangeConcept</a> : <a class="missing wiki">BidirectionalRangeConcept</a>&lt;T&gt; { </p> </blockquote> <blockquote> <p> #if BOOST_RANGE_ENABLE_CONCEPT_ASSERT </p> </blockquote> <ul><li> BOOST_RANGE_CONCEPT_ASSERT((<a class="missing wiki">RandomAccessIteratorConcept</a>&lt;BOOST_DEDUCED_TYPENAME RandomAccessRangeConcept::iterator&gt;)); </li><li> BOOST_RANGE_CONCEPT_ASSERT((<a class="missing wiki">RandomAccessIteratorConcept</a>&lt;BOOST_DEDUCED_TYPENAME RandomAccessRangeConcept::const_iterator&gt;)); </li></ul><p> + BOOST_RANGE_CONCEPT_ASSERT((range_detail::<a class="missing wiki">RandomAccessIteratorConcept</a>&lt;BOOST_DEDUCED_TYPENAME RandomAccessRangeConcept::iterator&gt;)); + BOOST_RANGE_CONCEPT_ASSERT((range_detail::<a class="missing wiki">RandomAccessIteratorConcept</a>&lt;BOOST_DEDUCED_TYPENAME RandomAccessRangeConcept::const_iterator&gt;)); </p> <blockquote> <p> #endif </p> <blockquote> <p> }; </p> </blockquote> </blockquote> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/4355 Trac 1.4.3 rick68@… Wed, 16 Jun 2010 23:17:48 GMT attachment set https://svn.boost.org/trac10/ticket/4355 https://svn.boost.org/trac10/ticket/4355 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">concepts.hpp.diff</span> </li> </ul> <p> without namespace 'range_detail' </p> Ticket Steven Watanabe Thu, 24 Jun 2010 20:09:08 GMT severity changed https://svn.boost.org/trac10/ticket/4355#comment:1 https://svn.boost.org/trac10/ticket/4355#comment:1 <ul> <li><strong>severity</strong> <span class="trac-field-old">Problem</span> → <span class="trac-field-new">Cosmetic</span> </li> </ul> <p> The code works correctly without this patch, because Boost.ConceptCheck includes these concepts in the boost namespace. What I'd like to know is why range defines its own versions of the iterator concepts, instead of using the ones from Boost.ConceptCheck? </p> Ticket rick68@… Sun, 27 Jun 2010 16:35:52 GMT <link>https://svn.boost.org/trac10/ticket/4355#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4355#comment:2</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/4355#comment:1" title="Comment 1">steven_watanabe</a>: </p> <blockquote class="citation"> <p> The code works correctly without this patch, because Boost.ConceptCheck includes these concepts in the boost namespace. What I'd like to know is why range defines its own versions of the iterator concepts, instead of using the ones from Boost.ConceptCheck? </p> </blockquote> <p> In Boost.ConceptCheck are '<a class="missing wiki">BidirectionalIterator</a>' and '<a class="missing wiki">RandomAccessIterator</a>', I can't find '<a class="missing wiki">BidirectionalIteratorConcept</a>' and '<a class="missing wiki">RandomAccessIteratorConcept</a>'. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Steven Watanabe</dc:creator> <pubDate>Sun, 27 Jun 2010 18:37:44 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/4355#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4355#comment:3</guid> <description> <p> If you trace through the macros, you'll find that they define versions both with and without the Concept suffix. </p> </description> <category>Ticket</category> </item> <item> <author>rick68@…</author> <pubDate>Sun, 27 Jun 2010 19:33:46 GMT</pubDate> <title>attachment set https://svn.boost.org/trac10/ticket/4355 https://svn.boost.org/trac10/ticket/4355 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">test.cpp</span> </li> </ul> <p> test <a class="missing wiki">BidirectionalRangeConcept</a> </p> Ticket rick68@… Sun, 27 Jun 2010 19:45:21 GMT <link>https://svn.boost.org/trac10/ticket/4355#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4355#comment:4</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/4355#comment:3" title="Comment 3">steven_watanabe</a>: </p> <blockquote class="citation"> <p> If you trace through the macros, you'll find that they define versions both with and without the Concept suffix. </p> </blockquote> <p> I attach 'test.cpp', maybe you can test it :) </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Steven Watanabe</dc:creator> <pubDate>Mon, 28 Jun 2010 02:06:28 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/4355#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4355#comment:5</guid> <description> <p> with the trunk I get </p> <pre class="wiki">C:\boost\trunk\boost/concept_check.hpp(516) : error C2100: illegal indirection C:\boost\trunk\boost/concept_check.hpp(510) : while compiling class template member function 'boost::ForwardIterator&lt;TT&gt;::~ForwardIterator(void)' with [ TT=Iterator&lt;ValueType&gt; ] </pre><p> which is the expected result, as there's no operator*. </p> </description> <category>Ticket</category> </item> <item> <author>rick68@…</author> <pubDate>Mon, 28 Jun 2010 03:23:27 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/4355#comment:6 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4355#comment:6</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/4355#comment:5" title="Comment 5">steven_watanabe</a>: </p> <blockquote class="citation"> <p> with the trunk I get </p> <pre class="wiki">C:\boost\trunk\boost/concept_check.hpp(516) : error C2100: illegal indirection C:\boost\trunk\boost/concept_check.hpp(510) : while compiling class template member function 'boost::ForwardIterator&lt;TT&gt;::~ForwardIterator(void)' with [ TT=Iterator&lt;ValueType&gt; ] </pre><p> which is the expected result, as there's no operator*. </p> </blockquote> <p> <a class="missing wiki">BidirectionalIteratorConcept</a> check concept with <a class="missing wiki">ForwardIteratorConcept</a>, <a class="missing wiki">DefaultConstructiable</a>, <a class="missing wiki">SignlePassIterator</a>, <a class="missing wiki">IncrementableIteratorConcept</a>, <a class="missing wiki">EqualityComparable</a> and <a class="missing wiki">CopyConstructiable</a>, they are not to check operator*. But if I add 'detail_range::' in concepts.hpp at line 298, 299, the compiler can complete this code. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Steven Watanabe</dc:creator> <pubDate>Mon, 28 Jun 2010 04:30:16 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/4355#comment:7 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4355#comment:7</guid> <description> <p> Oh. I see that range_detail::ForwardIteratorConcept doesn't check for operator*. This is a bug. operator* is required for ForwardIterators. test.cpp should not compile. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Neil Groves</dc:creator> <pubDate>Sun, 14 Nov 2010 17:46:51 GMT</pubDate> <title>status changed https://svn.boost.org/trac10/ticket/4355#comment:8 https://svn.boost.org/trac10/ticket/4355#comment:8 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> </ul> Ticket Neil Groves Thu, 23 Dec 2010 12:15:12 GMT status, milestone changed; resolution set https://svn.boost.org/trac10/ticket/4355#comment:9 https://svn.boost.org/trac10/ticket/4355#comment:9 <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> <li><strong>milestone</strong> <span class="trac-field-old">Boost 1.43.0</span> → <span class="trac-field-new">Boost 1.46.0</span> </li> </ul> <p> Resolved on the trunk. </p> Ticket