cplusplus / cplusplus/draft

[temp.deduct.general] The rules regarding "deduction fails" need to be rearranged

Open
#5,150 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TeX
Stars
221
Forks
813
Avg merge
16h 4m
Merged PRs (30d)
36

Description

The following sentence frequently appears in several paragraphs in subclause [temp.deduct.general]

If the substitution results in an invalid type, as described above, type deduction fails.

However, we do not see the relevant contents referred to by "as described above". AFAIK, the invalid type or expression in the immediate context of the function type or something else stated in [temp.deduct.general] p8 can result in "deduction fails" rather than a program ill-formed. Does "as described above" intend to refer to [temp.deduct.general] p8? Should we rearrange the position of [temp.deduct.general] p8 to make "as described above" have a corresponding expound.


Since [temp.deduct.general] p7 says

The substitution occurs in all types and expressions that are used in the function type function type outside of the exception specification and in template parameter declarations.

[temp.deduct.general] p8 says

Only invalid types and expressions in the immediate context of the function type outside of the exception specification, its template parameters, and its explicit-specifier can result in a deduction failure.

template parameter seems to refer to T rather than typename T = type-idopt(if it is the template parameter declaration), deduction failure can also occur in type-id.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with [temp.deduct.general] paragraphs 7 and 8 and the repeated “as described above” sentence in the draft sources. Compare the stated substitution contexts and deduction-failure rules, then determine whether the paragraph order or cross-reference needs clarification. Done means the wording and reference unambiguously describe the intended cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, tex
Domain
documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.