Я хочу перегрузить копию указателя, как показано ниже.
Я много чего пробовал, но не нашел пути ...
template <typename T>
Class Test {
private:
T* obj;
public:
inline Test<T>& operator= (const Test<T>& other) {
}
inline Test<T>* operator= (const Test<T>* other) {
}
inline Test<T> operator= (const Test<T> other) {
}
...
}
int main() {
Test *a, *b;
a = new Test;
// *b = *a; // I know how to overload this copy
b = a; // But, I want to overload this pointer copy operator!
}