[meta.reflection.queries] [dcl.fct] Disagreement about whether `int()const` is const qualified
Nobody has claimed this yet.
- Dominant language
- TeX
- Stars
- 221
- Forks
- 813
- Avg merge
- 16h 4m
- Merged PRs (30d)
- 36
Description
In [dcl.fct] there exists the following note:
A function type that has a cv-qualifier-seq is not a cv-qualified type; there are no cv-qualified function types.
However, [meta.reflection.queries] has the following wording for std::meta::is_const and std::meta::is_volatile:
Returns: true if T represents a const or volatile type, respectively, or a const- or volatile-qualified function type, respectively. Otherwise, false.
The former states that there are no cv-qualified function types, while the latter is directly implying the possibility of cv-qualified function types (otherwise the second half of the first sentence would be redundant). It is quite clear what the latter is trying to state, that is_const(^^int()const) should be true. But if int()const really is a const qualified type, then std::is_const_v<int()const> should be true too which is obviously not intended.
Also, the subsequent definition of std::meta::is_lvalue_reference_qualified and std::meta::is_rvalue_reference_qualified contains:
Returns: true if T represents an lvalue- or rvalue-qualified function type, respectively. Otherwise, false.
The intent here is clear too but "lvalue-qualified" and "rvalue-qualified" do not get used anywhere else.
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 by comparing the quoted wording in [dcl.fct] and [meta.reflection.queries], then search the draft for uses of “cv-qualified,” “lvalue-qualified,” and “rvalue-qualified.” Check how the wording relates to std::is_const_v<int()const>; done means the terminology and reflection-query intent are stated consistently without implying ordinary cv-qualified function types.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100