|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r80702 - trunk/boost
From: eric_at_[hidden]
Date: 2012-09-25 14:20:36
Author: eric_niebler
Date: 2012-09-25 14:20:35 EDT (Tue, 25 Sep 2012)
New Revision: 80702
URL: http://svn.boost.org/trac/boost/changeset/80702
Log:
only use derefof as a Borland workaround. Eliminates warning on gcc
Text files modified:
trunk/boost/foreach.hpp | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
Modified: trunk/boost/foreach.hpp
==============================================================================
--- trunk/boost/foreach.hpp (original)
+++ trunk/boost/foreach.hpp 2012-09-25 14:20:35 EDT (Tue, 25 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