Added extra constructor to SwigValueWrapper to fix default argument problem.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@4652 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Dave Beazley 2003-04-02 01:40:21 +00:00
commit 3523a80886

View file

@ -307,6 +307,7 @@ template<class T> 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; }