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
A template-declaration is a declaration. A declaration introduced by a template declaration of a variable is a variable template. A variable template at class scope is a static data member template.
we have never defined the term template declaration, and the wording template declaration is used more than one time in clause [temp]. As well, the template also depends on the definition of template declaration.
An entity is templated if it is
a template
As far as now, we only define the variable template. Thus, we may augment the definition for template, as well as, clarify the definition of template declaration.
Change [temp.pre] p3 to that
A template-declaration is a declaration, as known as a template declaration. A template-declaration introduces a template of the entity E(if any) introduced by the declaration in it. A variable template at class scope is shall be a static data member template.
The proposal is fine to clarify a simple explicit specialization is not a template, conversely, a partial specialization is a template declaration, and any restriction applying to a templated entity can also apply to the entity defined in it:
template<classT>
structA;
template<>
structA<int>{}; // it is not a template declarationtemplate<classT>
structB{};
template<classT>
structB<T*>{
voidfun() requires (sizeof(T)> 1); // [dcl.dcl.dcl.decl.general] p4 allows it.
};
Compare to defining a template-declaration is a declaration, I prefer to augment [syntax] to be that
X-declaration is a declaration.
That would cover: parameter-declaration, exception-declaration, and so on.
The text was updated successfully, but these errors were encountered:
xmh0511
changed the title
Term "template declaration" is undefined
Terms "template declaration" and "template entity" are undefined
Jan 29, 2022
The term "templated entity" is recursively defined. The crux is possibly that we haven't properly defined the term template, although it's implied that "a template is an entity declared by template-declaration". However, this isn't the proper definition, since a function template can be abbreviated or introduced within a generic lambda.
Once "template" gets properly defined, I don't think we need to define "X declaration", because it can be parsed as "declaration of X" in plain English.
Uh oh!
There was an error while loading. Please reload this page.
[temp.pre] p3 states
we have never defined the term template declaration, and the wording template declaration is used more than one time in clause [temp]. As well, the template also depends on the definition of template declaration.
As far as now, we only define the variable template. Thus, we may augment the definition for template, as well as, clarify the definition of template declaration.
Change [temp.pre] p3 to that
The proposal is fine to clarify a simple explicit specialization is not a template, conversely, a partial specialization is a template declaration, and any restriction applying to a templated entity can also apply to the entity defined in it:
Compare to defining a template-declaration is a declaration, I prefer to augment [syntax] to be that
That would cover: parameter-declaration, exception-declaration, and so on.
The text was updated successfully, but these errors were encountered: