Undoc'd Feature?
|
07-10-2022, 05:57 PM
Post: #28
|
|||
|
|||
RE: Undoc'd Feature?
(07-10-2022 05:22 AM)Wes Loewer Wrote: But what jte was saying is that this used to be undefined, but starting with C++17 it is now defined. Defined to what? (a=a++) ⇒ NOP? (07-10-2022 05:36 PM)toml_12953 Wrote: Is the combination of definition and assignment in one step new to C? It was always allowed, ever since K&R days. The C Programming Language, 2nd Edition, page 86 Wrote:In effect, initializations of automatic variables are just shorthand for assignment statements. Which form to prefer is largely a matter of taste. We have generally used explicit assignments, because initializers in declarations are harder to see and further away from the point of use. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 3 Guest(s)