Subclause: [dcl.type.decltype]
P2996R13 specifies decltype(E) for an unparenthesized splice expression as the type of the entity, object, or value designated by the splice-specifier of E.
For a template splice-specialization-specifier, however, the contained splice-specifier designates the template, while [expr.prim.splice] forms the selected variable-template specialization S from that template and the template arguments.
For example:
template<class T> T value;
using R = decltype(template [:^^value:]<int>);
I would expect R to be int, the declared type of value<int>, but the current decltype bullet appears to ask for the type of the variable template value, which does not have a type. Is there another rule that makes this case well-defined?
If not, should [dcl.type.decltype] distinguish this form and use the type of the selected specialization S, following the construction already used in [expr.prim.splice] and [dcl.type.splice]?
The function-template forms are a separate question because they denote overload sets. They do not need to be resolved in order to clarify the variable-template case above.
Subclause: [dcl.type.decltype]
P2996R13 specifies
decltype(E)for an unparenthesized splice expression as the type of the entity, object, or value designated by thesplice-specifierofE.For a
template splice-specialization-specifier, however, the containedsplice-specifierdesignates the template, while [expr.prim.splice] forms the selected variable-template specializationSfrom that template and the template arguments.For example:
I would expect
Rto beint, the declared type ofvalue<int>, but the currentdecltypebullet appears to ask for the type of the variable templatevalue, which does not have a type. Is there another rule that makes this case well-defined?If not, should [dcl.type.decltype] distinguish this form and use the type of the selected specialization
S, following the construction already used in [expr.prim.splice] and [dcl.type.splice]?The function-template forms are a separate question because they denote overload sets. They do not need to be resolved in order to clarify the variable-template case above.