tnintemann / rpms / boost

Forked from rpms/boost 3 years ago
Clone

Blame SOURCES/boost-1.50.0-foreach.patch

5dffee
Index: /trunk/boost/foreach_fwd.hpp
5dffee
===================================================================
5dffee
--- /trunk/boost/foreach_fwd.hpp	(revision 62661)
5dffee
+++ /trunk/boost/foreach_fwd.hpp	(revision 75540)
5dffee
@@ -15,4 +15,6 @@
5dffee
 #define BOOST_FOREACH_FWD_HPP
5dffee
 
5dffee
+#include <utility> // for std::pair
5dffee
+
5dffee
 // This must be at global scope, hence the uglified name
5dffee
 enum boost_foreach_argument_dependent_lookup_hack
5dffee
@@ -26,4 +28,7 @@
5dffee
 namespace foreach
5dffee
 {
5dffee
+    template<typename T>
5dffee
+    std::pair<T, T> in_range(T begin, T end);
5dffee
+
5dffee
     ///////////////////////////////////////////////////////////////////////////////
5dffee
     // boost::foreach::tag
5dffee
@@ -47,4 +52,22 @@
5dffee
 } // namespace foreach
5dffee
 
5dffee
+// Workaround for unfortunate https://svn.boost.org/trac/boost/ticket/6131
5dffee
+namespace BOOST_FOREACH
5dffee
+{
5dffee
+    using foreach::in_range;
5dffee
+    using foreach::tag;
5dffee
+
5dffee
+    template<typename T>
5dffee
+    struct is_lightweight_proxy
5dffee
+      : foreach::is_lightweight_proxy<T>
5dffee
+    {};
5dffee
+
5dffee
+    template<typename T>
5dffee
+    struct is_noncopyable
5dffee
+      : foreach::is_noncopyable<T>
5dffee
+    {};
5dffee
+
5dffee
+} // namespace BOOST_FOREACH
5dffee
+
5dffee
 } // namespace boost
5dffee
 
5dffee
Index: /trunk/boost/foreach.hpp
5dffee
===================================================================
5dffee
--- /trunk/boost/foreach.hpp	(revision 75077)
5dffee
+++ /trunk/boost/foreach.hpp	(revision 75540)
5dffee
@@ -166,5 +166,5 @@
5dffee
 //   at the global namespace for your type.
5dffee
 template<typename T>
5dffee
-inline boost::foreach::is_lightweight_proxy<T> *
5dffee
+inline boost::BOOST_FOREACH::is_lightweight_proxy<T> *
5dffee
 boost_foreach_is_lightweight_proxy(T *&, BOOST_FOREACH_TAG_DEFAULT) { return 0; }
5dffee
 
5dffee
@@ -191,5 +191,5 @@
5dffee
 //   at the global namespace for your type.
5dffee
 template<typename T>
5dffee
-inline boost::foreach::is_noncopyable<T> *
5dffee
+inline boost::BOOST_FOREACH::is_noncopyable<T> *
5dffee
 boost_foreach_is_noncopyable(T *&, BOOST_FOREACH_TAG_DEFAULT) { return 0; }
5dffee