[dcl.type.general] p3 The grammar type-specifier-seq does not comprise defining-type-specifier
Nobody has claimed this yet.
- Dominant language
- TeX
- Stars
- 221
- Forks
- 813
- Avg merge
- 16h 4m
- Merged PRs (30d)
- 36
Description
[dcl.type.general] p3 says
Except in a declaration of a constructor, destructor, or conversion function, at least one defining-type-specifier that is not a cv-qualifier shall appear in a complete type-specifier-seq or a complete decl-specifier-seq.
The grammar type-specifier-seq is the sequence of type-specifier, which can never include a defining-type-specifier. A defining-type-specifier can be a type-specifer but not the way around; that is, defining-type-specifier is a wider component than type-specifer. As specified in https://stackoverflow.com/questions/62506440/why-a-conversion-function-declaration-does-not-require-at-least-one-defining-typ
The suggested resolution might be
Except the decl-specifier-seq in a declaration of a constructor, destructor, or conversion function, a complete decl-specifier-seq shall contain at least one defining-type-specifier that is not a cv-qualifier, and a complete type-specifier-seq shall contain at least one type-specifier that is not a cv-qualifier.
As a drive-by, the exception should only apply to the decl-specifier-seq of the conversion function, since the type-specifier-seq in its conversion-type-id should obey the rule; comprise at least a type-specifier that is not a cv-qualifier.
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
Start with [dcl.type.general] paragraph 3 and the grammar definitions for type-specifier-seq, decl-specifier-seq, defining-type-specifier, and conversion-type-id. Compare the current rule with the suggested resolution and verify that the constructor, destructor, and conversion-function exceptions apply to the intended sequences. Done means the wording is grammatically consistent and reflects the intended constraint.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- tex
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100