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; }