After
typedefint MILES, *KLICKSP;
the constructions
MILES distance;
extern KLICKSP metricp;
are all correct declarations; the type of distance is
int and that of metricp is “pointer to int”.
If the typedef declaration defines an unnamed class or enumeration, the first
typedef-name declared by the declaration to be that type
is used to denote the type for linkage purposes only ([basic.link]).
A typedef declaration involving a lambda-expression
does not itself define the associated closure type,
and so the closure type is not given a name for linkage purposes.
— end note]
[Example 4: typedefstruct{}*ps, S; // S is the class name for linkage purposestypedefdecltype([]{}) C; // the closure type has no name for linkage purposes — end example]