Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r85691 - trunk/boost/range/detail
From: neil_at_[hidden]
Date: 2013-09-15 18:15:12


Author: neilgroves
Date: 2013-09-15 18:15:12 EDT (Sun, 15 Sep 2013)
New Revision: 85691
URL: http://svn.boost.org/trac/boost/changeset/85691

Log:
[boost][range] - changed join_iterator reference type handling to address several user observations and failing clang builds.

Text files modified:
   trunk/boost/range/detail/join_iterator.hpp | 16 +++++++++-------
   1 files changed, 9 insertions(+), 7 deletions(-)

Modified: trunk/boost/range/detail/join_iterator.hpp
==============================================================================
--- trunk/boost/range/detail/join_iterator.hpp Sun Sep 15 17:54:32 2013 (r85690)
+++ trunk/boost/range/detail/join_iterator.hpp 2013-09-15 18:15:12 EDT (Sun, 15 Sep 2013) (r85691)
@@ -23,6 +23,10 @@
 #include <boost/range/empty.hpp>
 #include <boost/range/detail/demote_iterator_traversal_tag.hpp>
 #include <boost/range/value_type.hpp>
+#include <boost/type_traits/add_const.hpp>
+#include <boost/type_traits/add_reference.hpp>
+#include <boost/type_traits/remove_const.hpp>
+#include <boost/type_traits/remove_reference.hpp>
 #include <boost/next_prior.hpp>
 
 namespace boost
@@ -71,7 +75,9 @@
 
     Reference dereference(unsigned int selected) const
     {
- return selected ? *m_it2 : *m_it1;
+ if (selected)
+ return *m_it2;
+ return *m_it1;
     }
 
     bool equal(const join_iterator_union& other, unsigned int selected) const
@@ -143,12 +149,8 @@
                                     typename iterator_reference<Iterator2>::type
>::type
>::value,
- typename add_reference<
- typename add_const<
- typename remove_reference<
- typename iterator_reference<Iterator2>::type
- >::type
- >::type
+ typename add_const<
+ typename iterator_reference<Iterator1>::type
>::type,
                             typename iterator_reference<Iterator1>::type
>::type


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