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:
parent
1adb9d5084
commit
3523a80886
1 changed files with 1 additions and 0 deletions
|
|
@ -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; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue