Update of /cvsroot/boost/boost/boost
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv22713

Modified Files:
        shared_ptr.hpp 
Log Message:
Changed move constructors/assignments to leave the source empty

Index: shared_ptr.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/shared_ptr.hpp,v
retrieving revision 1.71
retrieving revision 1.72
diff -u -d -r1.71 -r1.72
--- shared_ptr.hpp      13 Apr 2007 22:04:22 -0000      1.71
+++ shared_ptr.hpp      15 Apr 2007 02:47:45 -0000      1.72
@@ -313,26 +313,26 @@
     shared_ptr( shared_ptr && r ): px( r.px ), pn() // never throws
     {
         pn.swap( r.pn );
+        r.px = 0;
     }
 
     template<class Y>
     shared_ptr( shared_ptr<Y> && r ): px( r.px ), pn() // never throws
     {
         pn.swap( r.pn );
+        r.px = 0;
     }
 
     shared_ptr & operator=( shared_ptr && r ) // never throws
     {
-        px = r.px;
-        pn.swap( r.pn );
+        this_type( static_cast< shared_ptr && >( r ) ).swap( *this );
         return *this;
     }
 
     template<class Y>
     shared_ptr & operator=( shared_ptr<Y> && r ) // never throws
     {
-        px = r.px;
-        pn.swap( r.pn );
+        this_type( static_cast< shared_ptr<Y> && >( r ) ).swap( *this );
         return *this;
     }
 


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Boost-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/boost-cvs

Reply via email to