Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r70040 - trunk/boost/range/detail
From: neil_at_[hidden]
Date: 2011-03-16 19:47:04


Author: neilgroves
Date: 2011-03-16 19:47:02 EDT (Wed, 16 Mar 2011)
New Revision: 70040
URL: http://svn.boost.org/trac/boost/changeset/70040

Log:
[range] - Fix for the demotion of traversal tags supplied by aschoedl. This is mentioned in Trac issue 5061, but has also been reported independently by a few users.
Text files modified:
   trunk/boost/range/detail/demote_iterator_traversal_tag.hpp | 16 ++++++++++++++--
   1 files changed, 14 insertions(+), 2 deletions(-)

Modified: trunk/boost/range/detail/demote_iterator_traversal_tag.hpp
==============================================================================
--- trunk/boost/range/detail/demote_iterator_traversal_tag.hpp (original)
+++ trunk/boost/range/detail/demote_iterator_traversal_tag.hpp 2011-03-16 19:47:02 EDT (Wed, 16 Mar 2011)
@@ -5,6 +5,9 @@
 // 1.0. (See accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
 //
+// Acknowledgements:
+// aschoedl supplied a fix to supply the level of interoperability I had
+// originally intended, but failed to implement.
 //
 // For more information, see http://www.boost.org/libs/range/
 //
@@ -19,12 +22,12 @@
     {
 
 template<class IteratorTraversalTag1, class IteratorTraversalTag2>
-struct demote_iterator_traversal_tag
+struct inner_demote_iterator_traversal_tag
 {
 };
 
 #define BOOST_DEMOTE_TRAVERSAL_TAG( Tag1, Tag2, ResultTag ) \
-template<> struct demote_iterator_traversal_tag< Tag1 , Tag2 > \
+template<> struct inner_demote_iterator_traversal_tag< Tag1 , Tag2 > \
 { \
     typedef ResultTag type; \
 };
@@ -73,6 +76,15 @@
 
 #undef BOOST_DEMOTE_TRAVERSAL_TAG
 
+template<class IteratorTraversalTag1, class IteratorTraversalTag2>
+struct demote_iterator_traversal_tag
+ : inner_demote_iterator_traversal_tag<
+ typename boost::detail::pure_traversal_tag< IteratorTraversalTag1 >::type,
+ typename boost::detail::pure_traversal_tag< IteratorTraversalTag2 >::type
+ >
+{
+};
+
     } // namespace range_detail
 } // namespace boost
 


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk