Update of /cvsroot/boost/boost/boost
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv1628
Modified Files:
shared_ptr.hpp
Log Message:
Aliasing constructor added
Index: shared_ptr.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/shared_ptr.hpp,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -d -r1.67 -r1.68
--- shared_ptr.hpp 6 Apr 2007 00:21:41 -0000 1.67
+++ shared_ptr.hpp 9 Apr 2007 16:32:45 -0000 1.68
@@ -5,7 +5,7 @@
// shared_ptr.hpp
//
// (C) Copyright Greg Colvin and Beman Dawes 1998, 1999.
-// Copyright (c) 2001-2006 Peter Dimov
+// Copyright (c) 2001-2007 Peter Dimov
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
@@ -195,6 +195,12 @@
{
}
+ // aliasing
+ template< class Y >
+ shared_ptr( shared_ptr<Y> const & r, T * p ): px( p ), pn( r.pn ) // never
throws
+ {
+ }
+
template<class Y>
shared_ptr(shared_ptr<Y> const & r, boost::detail::static_cast_tag):
px(static_cast<element_type *>(r.px)), pn(r.pn)
{
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs