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”.
[Example 2: using handler_t =void(*)(int);
extern handler_t ignore;
externvoid(*ignore)(int); // redeclare ignoretemplate<class T>struct P {};
using cell = P<cell*>; // error: cell not found ([basic.scope.pdecl]) — end example]
A typedef declaration involving a lambda-expression
does not itself define the associated closure type,
and so the closure type is not given a typedef name for linkage purposes.
— end note]
[Example 4: typedefstruct{}*ps, S; // S is the typedef name for linkage purposestypedefdecltype([]{}) C; // the closure type has no typedef name for linkage purposes — end example]