0

[dcl.typedef]/9:

If the typedef declaration defines an unnamed class (or enum), the first typedef-name declared by the declaration to be that class type (or enum type) is used to denote the class type (or enum type) for linkage purposes only ([basic.link]). [ Note: 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:

typedef struct { } *ps, S;      // S is the class name for linkage purposes
typedef decltype([]{}) C;       // the closure type has no name for linkage purposes

— end example ]

WaldB
  • 1,231
  • 7
  • 14

1 Answers1

0

I don't think you parsed that correctly. What this is saying that in this kind of declaration the "name for linkage purposes" will be determined this way. You need to have a name for the type if it ever comes up in function arguments somewhere (see What is name mangling, and how does it work? )