forked from cms-sw/cmsdist
-
Notifications
You must be signed in to change notification settings - Fork 1
/
boost-1.47.0-fix-gcc47.patch
35 lines (32 loc) · 1.46 KB
/
boost-1.47.0-fix-gcc47.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
diff -arupN boost_1_47_0.orig/boost/config/stdlib/libstdcpp3.hpp boost_1_47_0/boost/config/stdlib/libstdcpp3.hpp
--- boost_1_47_0.orig/boost/config/stdlib/libstdcpp3.hpp 2012-03-06 11:17:27.000000000 +0100
+++ boost_1_47_0/boost/config/stdlib/libstdcpp3.hpp 2012-03-06 11:18:36.000000000 +0100
@@ -33,7 +33,8 @@
#ifdef __GLIBCXX__ // gcc 3.4 and greater:
# if defined(_GLIBCXX_HAVE_GTHR_DEFAULT) \
- || defined(_GLIBCXX__PTHREADS)
+ || defined(_GLIBCXX__PTHREADS) \
+ || defined(_GLIBCXX_HAS_GTHREADS)
//
// If the std lib has thread support turned on, then turn it on in Boost
// as well. We do this because some gcc-3.4 std lib headers define _REENTANT
diff -arupN boost_1_47_0.orig/boost/smart_ptr/shared_ptr.hpp boost_1_47_0/boost/smart_ptr/shared_ptr.hpp
--- boost_1_47_0.orig/boost/smart_ptr/shared_ptr.hpp 2012-03-06 11:17:28.000000000 +0100
+++ boost_1_47_0/boost/smart_ptr/shared_ptr.hpp 2012-03-07 14:00:04.000000000 +0100
@@ -203,8 +203,17 @@ public:
boost::detail::sp_enable_shared_from_this( this, p, p );
}
-// generated copy constructor, destructor are fine
+// generated copy constructor, destructor are fine...
+#if defined( BOOST_HAS_RVALUE_REFS )
+
+// ... except in C++0x, move disables the implicit copy
+
+ shared_ptr( shared_ptr const & r ): px( r.px ), pn( r.pn ) // never throws
+ {
+ }
+
+#endif
template<class Y>
explicit shared_ptr(weak_ptr<Y> const & r): pn(r.pn) // may throw
{