Code: Select all
typedef int P();
typedef int Q();
class X {
static P(Q); // define Q to be a P.
// equivalent to `static int Q()`
// the parentheses around Q are redundant
// Q is no longer a type in this scope
static Q(P); // define Q to be a function
// taking an argument of type P
// and returning an int.
// equivalent to `static int Q(int())`
}
Dieses Codebeispiel scheint nicht gültig zu sein (betroffen von der Grammatik).