tag:blogger.com,1999:blog-2543858175797658864.post5342912099046952358..comments2023-06-03T09:48:30.964-04:00Comments on Trash Can of Code: c++ functions returning voidcottonvibeshttp://www.blogger.com/profile/15542648017139504620noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-2543858175797658864.post-24915596383423017582012-06-20T14:46:04.874-04:002012-06-20T14:46:04.874-04:00Hi Jimmy,
In the n3242 draft of the standard, its ...Hi Jimmy,<br />In the n3242 draft of the standard, its in section 3.9.1, paragraph 9.<br /><br />"The void type has an empty set of values. The void type is an incomplete type that cannot be completed. It<br />is used as the return type for functions that do not return a value. Any expression can be explicitly converted<br />to type cv void (5.4). An expression of type void shall be used only as an expression statement (6.2), as an<br />operand of a comma expression (5.18), as a second or third operand of ?: (5.16), as the operand of typeid,<br />or as the expression in a return statement (6.6.3) for a function with the return type void."cottonvibeshttps://www.blogger.com/profile/15542648017139504620noreply@blogger.comtag:blogger.com,1999:blog-2543858175797658864.post-5495692211891894992012-06-20T10:03:03.525-04:002012-06-20T10:03:03.525-04:00Do you happen to know the chapter and verse of the...Do you happen to know the chapter and verse of the standard that says this behavior is allowed? Thanks!jimmy_hchttps://www.blogger.com/profile/08702729632525419265noreply@blogger.com