Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r72004 - sandbox/block_ptr/boost
From: phil_at_[hidden]
Date: 2011-05-16 18:06:48


Author: pbouchard
Date: 2011-05-16 18:06:47 EDT (Mon, 16 May 2011)
New Revision: 72004
URL: http://svn.boost.org/trac/boost/changeset/72004

Log:
* Added reset with parameter
Text files modified:
   sandbox/block_ptr/boost/block_ptr.hpp | 20 ++++++++++++++++----
   1 files changed, 16 insertions(+), 4 deletions(-)

Modified: sandbox/block_ptr/boost/block_ptr.hpp
==============================================================================
--- sandbox/block_ptr/boost/block_ptr.hpp (original)
+++ sandbox/block_ptr/boost/block_ptr.hpp 2011-05-16 18:06:47 EDT (Mon, 16 May 2011)
@@ -379,10 +379,10 @@
                         @param p New pointer to manage.
                 */
 
- block_ptr & operator = (block_ptr<T> const & p)
- {
- return operator = <T>(p);
- }
+ block_ptr & operator = (block_ptr<T> const & p)
+ {
+ return operator = <T>(p);
+ }
 
         void reset()
         {
@@ -393,6 +393,18 @@
             release(false);
         }
         
+ template <typename V>
+ void reset(block_ptr<V> const & p)
+ {
+ operator = <T>(p);
+ }
+
+ template <typename V>
+ void reset(block<V> * p)
+ {
+ operator = <T>(p);
+ }
+
         bool cyclic() const
         {
                 return ps_->redir()->destroy_;


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk