Within a member function of a class in C++, does it make a difference, if I use this->dataMember
or just dataMember
? What is considered better style? Is there any performance difference?
(I am not talking about the case where a local variable has the same name as the data member, in which case you must, to my knowledge, use this->
to distinguish between them.)
If a template function makes a call to a member function such that the call does not depend on any template parameters,
this->
can be used to help the compiler as an alternative toMyUtopicClass<int, double, double>::vin()
.