You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is unclear whether the following construct is permitted (rejected by all compilers):
template <int>
structS {} v;
This could be
a class template with a declarator, which is forbidden by [temp.pre] p5, or
a variable template which defines a class, which is not forbidden by any wording explicitly,
both, simultaneously, in which case it is forbidden.
Suggestion resolution
If this construct is intended to be ill-formed, modify [temp.pre] p3 as follows:
A template-declaration is a declaration.
A declaration introduced by a template declaration of a variable is a variable template
-.+, unless the decl-specifier-seq of the declaration contains a class-specifier.
A variable template at class scope is a static data member template.
If this construct is intended to be well-formed, modify [temp.pre] p5 as follows:
In a template-declaration, explicit specialization, or explicit instantiation
the init-declarator-list in the declaration shall contain at most one declarator.
-When such a declaration is used to declare a class template, no declarator is permitted.