I wonder if I can do some conditional typing based on if a template parameter is a pointer or not?
So for instance I want the get method below to return T
itself if it is a pointer(i.e. T*). Or T*
if is not a pointer (i.e. T).
template<typename T>
class MyContainer {
T get(); // If T is a pointer
T* get(); // If T is not a pointer
}