Gentoo Archives: gentoo-commits

From: "Markos Chandras (hwoarang)" <hwoarang@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-libs/boost/files: boost-1.48.0-BOOST_FOREACH.patch
Date: Sat, 04 Feb 2012 19:31:56
Message-Id: 20120204193146.BD3992004B@flycatcher.gentoo.org
1 hwoarang 12/02/04 19:31:46
2
3 Added: boost-1.48.0-BOOST_FOREACH.patch
4 Log:
5 Backport fix for BOOST_FOREACH from upstream.
6
7 (Portage version: 2.2.0_alpha84/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.1 dev-libs/boost/files/boost-1.48.0-BOOST_FOREACH.patch
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/boost/files/boost-1.48.0-BOOST_FOREACH.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/boost/files/boost-1.48.0-BOOST_FOREACH.patch?rev=1.1&content-type=text/plain
14
15 Index: boost-1.48.0-BOOST_FOREACH.patch
16 ===================================================================
17 https://svn.boost.org/trac/boost/ticket/6131
18 https://svn.boost.org/trac/boost/changeset/75540
19
20 --- boost/foreach_fwd.hpp
21 +++ boost/foreach_fwd.hpp
22 @@ -14,6 +14,8 @@
23 #ifndef BOOST_FOREACH_FWD_HPP
24 #define BOOST_FOREACH_FWD_HPP
25
26 +#include <utility> // for std::pair
27 +
28 // This must be at global scope, hence the uglified name
29 enum boost_foreach_argument_dependent_lookup_hack
30 {
31 @@ -25,6 +27,9 @@
32
33 namespace foreach
34 {
35 + template<typename T>
36 + std::pair<T, T> in_range(T begin, T end);
37 +
38 ///////////////////////////////////////////////////////////////////////////////
39 // boost::foreach::tag
40 //
41 @@ -46,6 +51,24 @@
42
43 } // namespace foreach
44
45 +// Workaround for unfortunate https://svn.boost.org/trac/boost/ticket/6131
46 +namespace BOOST_FOREACH
47 +{
48 + using foreach::in_range;
49 + using foreach::tag;
50 +
51 + template<typename T>
52 + struct is_lightweight_proxy
53 + : foreach::is_lightweight_proxy<T>
54 + {};
55 +
56 + template<typename T>
57 + struct is_noncopyable
58 + : foreach::is_noncopyable<T>
59 + {};
60 +
61 +} // namespace BOOST_FOREACH
62 +
63 } // namespace boost
64
65 #endif
66 --- boost/foreach.hpp
67 +++ boost/foreach.hpp
68 @@ -165,7 +165,7 @@
69 // this one works on legacy compilers. Overload boost_foreach_is_lightweight_proxy
70 // at the global namespace for your type.
71 template<typename T>
72 -inline boost::foreach::is_lightweight_proxy<T> *
73 +inline boost::BOOST_FOREACH::is_lightweight_proxy<T> *
74 boost_foreach_is_lightweight_proxy(T *&, BOOST_FOREACH_TAG_DEFAULT) { return 0; }
75
76 template<typename T>
77 @@ -190,7 +190,7 @@
78 // this one works on legacy compilers. Overload boost_foreach_is_noncopyable
79 // at the global namespace for your type.
80 template<typename T>
81 -inline boost::foreach::is_noncopyable<T> *
82 +inline boost::BOOST_FOREACH::is_noncopyable<T> *
83 boost_foreach_is_noncopyable(T *&, BOOST_FOREACH_TAG_DEFAULT) { return 0; }
84
85 namespace boost