If all you need is the function name
, the C++ standard defines
] as part of the preprocessor. (Sorry,
is preceded and followed by two underscores, but they get interpreted as Markdown when I post this, and I don't know how to display them because the escape character doesn't work. Grrr!) Anyway,
gets replaced by a C-string for the current function's name, which you can use to construct a
, which you can then parse.
C++ does not support introspection, so if you actually want to parse a function signature
, which includes its return type and arguments, you would have to parse the source code.