[dcl.type.auto.deduct]/2.3 superfluous?
Nobody has claimed this yet.
- Dominant language
- TeX
- Stars
- 221
- Forks
- 813
- Avg merge
- 16h 4m
- Merged PRs (30d)
- 36
Description
[dcl.type.auto.deduct]/2(.3) directly provides placeholder type deduction for a non-type template parameter.
A type
Tcontaining a placeholder type, and a corresponding initializere, are determined as follows:
- …
- for a non-type template parameter declared with a type that contains a placeholder type,
Tis the declared type of the non-type template parameter andeis the corresponding template argument.
[temp.arg.nontype]/1 provides the same thing
If the type
Tof a template-parameter contains a placeholder type or a placeholder for a deduced class type, the type of the parameter is the type deduced for the variable x in the invented declarationT x =template-argument;
but by using [dcl.type.auto.deduct]/2.2
- for a variable declared with a type that contains a placeholder type,
Tis the declared type of the variable andeis the initializer. …
With that, it doesn't seem like [dcl.type.auto.deduct]/2.3 is necessary. Besides, [dcl.type.class.deduct] does not directly provide for replacement of deduced class type placeholders in non-type template parameters, only in an initializing variable declaration.
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
Compare [dcl.type.auto.deduct]/2.3 with [temp.arg.nontype]/1 and [dcl.type.class.deduct], focusing on whether the cited rules already cover non-type template parameter deduction. Done means resolving whether the wording is redundant and documenting the needed standard-text change or rationale.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- compilers
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100