Victor Bazarov wrote in message
<27******************************@comcast.com>.. .
>Pe*******@gmail.com wrote:
>I want to print out error message from all the three macros __FILE__,
__LINE__, __PRETTY_FUNCTION__. I'm wondering if there is one macro
which serves equivalently as the combinations of the three.
Since __PRETTY_FUNCTION__ is non-standard the question has no
affirmative answer in Standard C++.
My GCC docs stated that there is a '__func__' var. in standard, but, I've not
confirmed it.
// "By this definition, __func__ is a variable, not a string literal.
// In particular, __func__ does not catenate with other string literals".
std::cout<<" __func__ ="<<__func__<<std::endl;
std::string FuncName( __func__ );
std::cout<<" string FuncName ="<<FuncName<<std::endl;
--
Bob R
POVrookie