|
|
От: | andrey.desman | |
| Дата: | 15.06.23 12:23 | ||
| Оценка: |
8 (1)
|
||
3.9.1 Fundamental types
The void type has an empty set of values. The void type is an incomplete type that cannot be completed. It is used as
the return type for functions that do not return a value. Any expression can be explicitly converted to type cv void (5.4).
An expression of type void shall be used only as an expression statement (6.2), as an operand of a comma expression
(5.18), as a second or third operand of ?: (5.16), as the operand of typeid, or as the expression in a return statement
(6.6.3) for a function with the return type void.
6.6.3 The return statement [stmt.return]
3 A return statement with an expression of type “cv void” can be used only in functions with a return type of cv void; the
expression is evaluated just before the function returns to its caller.