Fundamental typedef operand syntax

Viewed 3783

Given:

typedef type-declaration synonym;

I can see how:

typedef long unsigned int size_t;

declares size_t as a synonym for long unsigned int, however I (know it does but) can't see exactly how:

typedef int (*F)(size_t, size_t);

declares F as a synonym for pointer to function (size_t, size_t) returning int

typedef's two operands (type-declaration, synonym) in the first example are long unsigned int and size_t.

What are the two arguments to typedef in the declaration of F or are there perhaps overloaded versions of typedef?

If there is a relevant distinction between C and C++ please elaborate otherwise I'm primarily interested in C++ if that helps.

5 Answers
Related