I have the following struct:
template<typename T>
struct S {
std::unique_ptr<T> ptr;
};
S<std::string>* s = new S<std::string>();
s->any_method();
How to override operator->
to any_method
was called on ptr
. To be more precise, I would like to:
The expression s->any_method()
"would be translated to" s->ptr->any_method()
.