template <typename T> class Obj { public: Obj<T>* doThis(); const Obj<T>* doThis() const {// return normal version of doThis()} }; In the example, I want the const version of doThis() to return normal version of doThis(). I don't think it's ok to just put return doThis() in definition of const version of doThis() because C++ may think this is recursion of const version of doThis().
Is there any way to explicitly tell C++ which function to call?
constmeans something here. It's a promise that the object will not be modified during the invocation of the function. If you call the non-const version you'll potentially break this promise. That can only cause problems.