[dcl.type.decltype] What type does decltype of a splice specialization denote?
Nobody has claimed this yet.
- Dominant language
- TeX
- Stars
- 221
- Forks
- 813
- Avg merge
- 16h 4m
- Merged PRs (30d)
- 36
Description
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read [dcl.type.decltype] alongside [expr.prim.splice] and [dcl.type.splice], and review P2996R13. Trace how a template splice-specialization-specifier selects the variable-template specialization S, then determine what type decltype should denote. Done means the wording clearly defines the variable-template case without needing to resolve the separate function-template overload-set question.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100