[dcl.decl.general] (original) (raw)

Each init-declarator or member-declaratorin a declaration is analyzed separately as if it were in a declaration by itself.

[Note 2:

A declaration with several declarators is usually equivalent to the corresponding sequence of declarations each with a single declarator.

That is,T D1, D2, ... Dn;is usually equivalent toT D1; T D2; ... T Dn;where T is a decl-specifier-seqand each Di is an init-declarator or member-declarator.

One exception is when a name introduced by one of thedeclarators hides a type name used by thedecl-specifiers, so that when the samedecl-specifiers are used in a subsequent declaration, they do not have the same meaning, as instruct S { }; S S, T; which is not equivalent tostruct S { }; S S; S T;

Another exception is when T is auto ([dcl.spec.auto]), for example:auto i = 1, j = 2.0; as opposed toauto i = 1; auto j = 2.0;

— _end note_]