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

Modified Files:
        offset_ptr.hpp 
Log Message:
Correction of bugs when converting pointers to derived classes to base classes, 
offset correction was not performed.

Index: offset_ptr.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/interprocess/offset_ptr.hpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- offset_ptr.hpp      2 Feb 2007 21:04:45 -0000       1.3
+++ offset_ptr.hpp      25 Apr 2007 15:32:29 -0000      1.4
@@ -110,7 +110,7 @@
       convertible, offset_ptrs will be convertibles. Never throws.*/
    template<class T2>
    offset_ptr(const offset_ptr<T2> &ptr) 
-   {  pointer p(ptr.get());  (void)p; this->set_offset(ptr.get());   }
+   {  pointer p(ptr.get());  (void)p; this->set_offset(p);   }
 
    /*!Emulates static_cast operator. Never throws.  */
    template<class Y>
@@ -155,13 +155,13 @@
 
    /*!Assignment from other offset_ptr. Never throws.*/
    offset_ptr& operator= (const offset_ptr & pt)
-   {  pointer p(pt.get());  (void)p; this->set_offset(pt.get());  return 
*this;  }
+   {  pointer p(pt.get());  (void)p; this->set_offset(p);  return *this;  }
 
    /*!Assignment from related offset_ptr. If pointers of pointee types 
          are assignable, offset_ptrs will be assignable. Never throws.*/
    template <class T2>
    offset_ptr& operator= (const offset_ptr<T2> & pt)
-   {  this->set_offset(pt.get());  return *this;  }
+   {  pointer p(pt.get());  this->set_offset(p);  return *this;  }
  
    /*!offset_ptr + std::ptrdiff_t. Never throws.*/
    offset_ptr operator+ (std::ptrdiff_t offset) const   


-------------------------------------------------------------------------
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