Files
cpp-thirdparty/winx64/bin/swig-3.0.12/Examples/python/smartptr/smartptr.h
Bassem Girgis 81b4b9e273 Initial commit
2018-12-20 17:34:07 -06:00

14 lines
231 B
C++

template<class T> class SmartPtr {
public:
SmartPtr(T *realPtr = 0) { pointee = realPtr; }
T *operator->() const {
return pointee;
}
T &operator*() const {
return *pointee;
}
private:
T *pointee;
};