several fixes, see CHANGES.current 10/04/2004

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6317 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2004-10-05 00:19:26 +00:00
commit 776f15623e
17 changed files with 216 additions and 97 deletions

View file

@ -349,7 +349,22 @@ public:
T *operator&() { return tt; }
private:
SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
};
template<class T> class SwigValueWrapper<const T> {
T *tt;
public:
SwigValueWrapper() : tt(0) { }
SwigValueWrapper(const SwigValueWrapper<T>& rhs) : tt(new T(*rhs.tt)) { }
SwigValueWrapper(const T& t) : tt(new T(t)) { }
~SwigValueWrapper() { delete tt; }
SwigValueWrapper& operator=(const T& t) { delete tt; tt = new T(t); return *this; }
operator T&() const { return *tt; }
T *operator&() { return tt; }
private:
SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
};
#endif
%}
#endif