While playing around with Visual C++ from Visual Studio 2017 (15.5.6 to be exact) I noticed that __PRETTY_FUNCTION__
from GCC seems to work! - to some degree at least…
It did show up along suggestions while typing:
Also it had its value shown in tooltip as expected:
And yet compiling the code using __PRETTY_FUNCTION__
results in an error:
error C2065: '__PRETTY_FUNCTION__': undeclared identifier
So, is there any way to make it work in Visual C++? Some include perhaps? Or some special compilation settings? (I think I'm using default ones.) Why would it work in shown examples, but not in actual use?!
Note, that I'm not looking for Visual C++ alternatives for __PRETTY_FUNCTION__
. I know them already. I'm just surprised and curious about the behavior here.
__PRETTY_FUNCTION__
, even though their compiler doesn't support it? – Karyn__FUNCSIG__
. – Draggletailed