function-definition: attribute-specifier-seq decl-specifier-seq declarator virt-specifier-seq function-body
function-body: ctor-initializer compound-statement function-try-block = default ; = delete ;
int max(int a, int b, int c) {
int m = (a > b) ? a : b;
return (m > c) ? m : c;
}
static const char __func__[] = "function-name";
had been provided, where function-name is an implementation-defined string.
struct S {
S() : s(__func__) { } // OK
const char* s;
};
void f(const char* s = __func__); // error: __func__ is undeclared
— end example