Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[basic.fundamental] Turn normative wording for void return types into a note #6466

Open
Eisenwave opened this issue Aug 19, 2023 · 0 comments

Comments

@Eisenwave
Copy link
Contributor

Eisenwave commented Aug 19, 2023

After submitting #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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant