[temp.decls.general] (original) (raw)

13 Templates [temp]

13.7 Template declarations [temp.decls]

13.7.1 General [temp.decls.general]

The template parameters of a template are specified in the angle bracket enclosed list that immediately follows the keyword template.

A primary template declaration is one in which the name of the template is not followed by a template-argument-list.

The template argument list of a primary template is the template argument list of its template-head ([temp.arg]).

A template declaration in which the name of the template is followed by a template-argument-list is a partial specialization ([temp.spec.partial]) of the template named in the declaration, which shall be a class or variable template.

For purposes of name lookup and instantiation, default arguments,type-constraints,requires-clauses ([temp.pre]), andnoexcept-specifier_s_of function templates and of member functions of class templates are considered definitions; each default argument,type-constraint,requires-clause, ornoexcept-specifieris a separate definition which is unrelated to the templated function definition or to any other default arguments,type-constraints,requires-clauses, ornoexcept-specifiers.

For the purpose of instantiation, the substatements of aconstexpr if statement are considered definitions.