Is it possible to get class name , and the parameter of that function , whiling using assert ?
For now i only tried __FUNCTION__ which display only the name of function.
Is it possible to display Dummy::Func ( int param1 ) rather than Func ?
I’m expecting a solution of g++ compiler , thanks !
On GCC at least, there is
__PRETTY_FUNCTION__, which does about what you ask.But it’s not a preprocessor macro, and so likely won’t be expanded as you might want inside an assert(). Of course, neither will
__FUNCTION__unless you’re using a fairly old version of G++.