From: <ric...@us...> - 2011-09-17 02:19:07
|
Revision: 1101 http://loki-lib.svn.sourceforge.net/loki-lib/?rev=1101&view=rev Author: rich_sposato Date: 2011-09-17 02:19:01 +0000 (Sat, 17 Sep 2011) Log Message: ----------- Fixed bug 2080889 by adding overload of const Clone function. Modified Paths: -------------- trunk/include/loki/SmartPtr.h Modified: trunk/include/loki/SmartPtr.h =================================================================== --- trunk/include/loki/SmartPtr.h 2011-09-13 00:50:05 UTC (rev 1100) +++ trunk/include/loki/SmartPtr.h 2011-09-17 02:19:01 UTC (rev 1101) @@ -729,6 +729,14 @@ {} template <class P1> + static P Clone( const P1 & val ) + { + P result(val); + const_cast< P1 & >( val ) = P1(); + return result; + } + + template <class P1> static P Clone(P1& val) { P result(val); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |