https://stackoverflow.com/questions/48857887/pretty-function-in-visual-c
The Visual Studio uses the Edison Design Group C++ Front End for the InteliSense, as explained in the Visual C++ Team Blog's Rebuilding Intellisense and here, and not the Microsoft C++ compiler. This means that some of the features available to the Intellisense are not available in compile time.
EDG's C++ Front End documentation mentions that its supports some of the GCC pre-defines like __PRETTY_FUNCTION__
on page 71 - "1.13 Predefined Macros" together with Microsoft's __FUNCSIG__
.
You can even see the version of the EDG by typing __EDG_VERSION__
and hovering over it.
You can emulate it pretty well by putting this in some common header (for example, your precompiled header, if you're using that):
#if !defined(__PRETTY_FUNCTION__) && !defined(__GNUC__)
#define __PRETTY_FUNCTION__ __FUNCSIG__
#endif