[basic.fundamental] Turn normative wording for `void` return types into a note
Nobody has claimed this yet.
- Dominant language
- TeX
- Stars
- 221
- Forks
- 813
- Avg merge
- 16h 4m
- Merged PRs (30d)
- 36
Description
After submitting https://github.com/cplusplus/draft/pull/6465, I feel like the wording for saying what a return type of void means is out-of-place. [basic.fundamental] p15 says:
It is used as the return type for functions that do not return a value.
This wording is redundant, as the meaning of return type void and calls to functions with return type void emerges from other parts of the standard. It even emerges from the paragraph itself because if "such a type has an empty set of values", it is obvious that a function with return type void cannot return a value.
Furthermore, this is too specific for [basic.fundamental]. If we're already explaining what a return type of void does here, why not also explain what a parameter-list containing just void means?
Suggested Change
A type cv void is an incomplete type that cannot be completed; such a type has an empty set of values.
-It is used as the return type for functions that do not return a value.
[...]
+[ Note: A function with a cv void return type does not return a value. -- end note ]
Alternatively, remove this sentence completely and leave no note.
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 [basic.fundamental] paragraph 15 and the surrounding wording, using pull request 6465 as context. Apply the proposed note or remove the sentence, then verify that the draft no longer presents the redundant normative wording.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 50/100