From db151ad7b9e5e62870348a31e0c3aa1c4cad957a Mon Sep 17 00:00:00 2001 From: rich_sposato Date: Sat, 17 Sep 2011 02:19:01 +0000 Subject: [PATCH] Fixed bug 2080889 by adding overload of const Clone function. git-svn-id: svn://svn.code.sf.net/p/loki-lib/code/trunk@1101 7ec92016-0320-0410-acc4-a06ded1c099a --- include/loki/SmartPtr.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/loki/SmartPtr.h b/include/loki/SmartPtr.h index 6b3325a..80d230f 100644 --- a/include/loki/SmartPtr.h +++ b/include/loki/SmartPtr.h @@ -728,6 +728,14 @@ namespace Loki DestructiveCopy(const DestructiveCopy&) {} + template + static P Clone( const P1 & val ) + { + P result(val); + const_cast< P1 & >( val ) = P1(); + return result; + } + template static P Clone(P1& val) {