summaryrefslogtreecommitdiff
path: root/boost/boost_1_44_0-gcc4.7.patch
blob: 842a92a681d666d4edc70a8d54cebe8b6499c6bd (plain)
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
--- misc/boost_1_44_0/boost/smart_ptr/shared_ptr.hpp	2009-12-14 18:44:19.000000000 +0100
+++ misc/build/boost_1_44_0/boost/smart_ptr/shared_ptr.hpp	2012-03-28 08:32:46.772493003 +0200
@@ -207,7 +207,17 @@
         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
--- misc/boost_1_44_0/boost/smart_ptr/weak_ptr.hpp	2009-12-14 18:44:19.000000000 +0100
+++ misc/build/boost_1_44_0/boost/smart_ptr/weak_ptr.hpp	2012-03-28 10:31:57.607462325 +0200
@@ -40,8 +40,24 @@
     {
     }
 
-//  generated copy constructor, assignment, destructor are fine
+//  generated copy constructor, assignment, destructor are fine...
 
+#if defined( BOOST_HAS_RVALUE_REFS )
+
+// ... except in C++0x, move disables the implicit copy
+
+    weak_ptr( weak_ptr const & r ): px( r.px ), pn( r.pn ) // never throws
+    {
+    }
+
+    weak_ptr & operator=( weak_ptr const & r ) // never throws
+    {
+        px = r.px;
+        pn = r.pn;
+        return *this;
+    }
+
+#endif
 
 //
 //  The "obvious" converting constructor implementation: