Similar to what __FUNCTION__ does for the current function, Is there a preprocessor macro to get the name of the current class?
No, there is no such macro - sorry.
But nevertheless: __FUNCTION__ (or __PRETTY_FUNCTION__ with gcc) should give you the name of the enclosing class - you just have to extract it.
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