Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r80737 - in branches/release: . boost
From: eric_at_[hidden]
Date: 2012-09-28 12:31:27


Author: eric_niebler
Date: 2012-09-28 12:31:27 EDT (Fri, 28 Sep 2012)
New Revision: 80737
URL: http://svn.boost.org/trac/boost/changeset/80737

Log:
foreach: merge [80702] from trunk
Properties modified:
   branches/release/ (props changed)
   branches/release/boost/ (props changed)
Text files modified:
   branches/release/boost/foreach.hpp | 14 +++++++++-----
   1 files changed, 9 insertions(+), 5 deletions(-)

Modified: branches/release/boost/foreach.hpp
==============================================================================
--- branches/release/boost/foreach.hpp (original)
+++ branches/release/boost/foreach.hpp 2012-09-28 12:31:27 EDT (Fri, 28 Sep 2012)
@@ -437,7 +437,6 @@
     static T (*t)[N] = 0;
     return t;
 }
-#endif
 
 ///////////////////////////////////////////////////////////////////////////////
 // derefof
@@ -454,6 +453,11 @@
     );
 }
 
+# define BOOST_FOREACH_DEREFOF(T) boost::foreach_detail_::derefof(*T)
+#else
+# define BOOST_FOREACH_DEREFOF(T) (*T)
+#endif
+
 #if defined(BOOST_FOREACH_COMPILE_TIME_CONST_RVALUE_DETECTION) \
  && !defined(BOOST_NO_RVALUE_REFERENCES)
 ///////////////////////////////////////////////////////////////////////////////
@@ -667,7 +671,7 @@
     typedef BOOST_DEDUCED_TYPENAME type2type<T, C>::type type;
     typedef BOOST_DEDUCED_TYPENAME foreach_iterator<T, C>::type iterator;
     return auto_any<BOOST_DEDUCED_TYPENAME foreach_iterator<T, C>::type>(
- iterator(boost::begin(derefof(auto_any_cast<type *, boost::mpl::false_>(col)))));
+ iterator(boost::begin(BOOST_FOREACH_DEREFOF((auto_any_cast<type *, boost::mpl::false_>(col))))));
 }
 
 #ifdef BOOST_FOREACH_RUN_TIME_CONST_RVALUE_DETECTION
@@ -707,7 +711,7 @@
     typedef BOOST_DEDUCED_TYPENAME type2type<T, C>::type type;
     typedef BOOST_DEDUCED_TYPENAME foreach_iterator<T, C>::type iterator;
     return auto_any<BOOST_DEDUCED_TYPENAME foreach_iterator<T, C>::type>(
- iterator(boost::end(derefof(auto_any_cast<type *, boost::mpl::false_>(col)))));
+ iterator(boost::end(BOOST_FOREACH_DEREFOF((auto_any_cast<type *, boost::mpl::false_>(col))))));
 }
 
 #ifdef BOOST_FOREACH_RUN_TIME_CONST_RVALUE_DETECTION
@@ -786,7 +790,7 @@
     typedef BOOST_DEDUCED_TYPENAME type2type<T, C>::type type;
     typedef BOOST_DEDUCED_TYPENAME foreach_reverse_iterator<T, C>::type iterator;
     return auto_any<BOOST_DEDUCED_TYPENAME foreach_reverse_iterator<T, C>::type>(
- iterator(boost::rbegin(derefof(auto_any_cast<type *, boost::mpl::false_>(col)))));
+ iterator(boost::rbegin(BOOST_FOREACH_DEREFOF((auto_any_cast<type *, boost::mpl::false_>(col))))));
 }
 
 #ifdef BOOST_FOREACH_RUN_TIME_CONST_RVALUE_DETECTION
@@ -829,7 +833,7 @@
     typedef BOOST_DEDUCED_TYPENAME type2type<T, C>::type type;
     typedef BOOST_DEDUCED_TYPENAME foreach_reverse_iterator<T, C>::type iterator;
     return auto_any<BOOST_DEDUCED_TYPENAME foreach_reverse_iterator<T, C>::type>(
- iterator(boost::rend(derefof(auto_any_cast<type *, boost::mpl::false_>(col)))));
+ iterator(boost::rend(BOOST_FOREACH_DEREFOF((auto_any_cast<type *, boost::mpl::false_>(col))))));
 }
 
 #ifdef BOOST_FOREACH_RUN_TIME_CONST_RVALUE_DETECTION


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