I have a member function which needs to call operator() on the class instance (this), and I could not guess at the right syntax. I tried
this();
*this();
this->();
this->operator();
and a few other things, but the error messages are not very informative, so I dont know what am I doing wrong.
The closest I found on SE: How do I call a templatized operator()()?
(*this)(/*parameters*/)
is probably the clearest way.
Answer: use
this->operator()();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With