Reputation: 843
Here is my operator definition in my class :
T& operator*(){
return this->element_;
}
When I use it like that, it is called :
std::cout << n->operator*() << std::endl;
It doesn't, if I try :
std::cout << *n << std::endl;
Any Idea ?
Thanks in advance,
Jérémy
Upvotes: 2
Views: 2081