From 932ed2c3635c9b8b65fa07e3ec6d0dbcd1a55346 Mon Sep 17 00:00:00 2001 From: Dave Beazley Date: Wed, 2 Apr 2003 01:40:21 +0000 Subject: [PATCH] Added extra constructor to SwigValueWrapper to fix default argument problem. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4652 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Lib/swig.swg | 1 + 1 file changed, 1 insertion(+) diff --git a/Lib/swig.swg b/Lib/swig.swg index 044929d32..c94d6d346 100644 --- a/Lib/swig.swg +++ b/Lib/swig.swg @@ -307,6 +307,7 @@ template class SwigValueWrapper { T *tt; public: inline SwigValueWrapper() : tt(0) { } + inline SwigValueWrapper(const T& t) : tt(new T(t)) { } inline ~SwigValueWrapper() { if (tt) delete tt; } inline SwigValueWrapper& operator=(const T& t) { tt = new T(t); return *this; } inline operator T&() const { return *tt; }