Commit 45c839d
authored
Two syntaxes for initialising auto-typed variables
The initialisation expression can be an assignment but that means `a = b = 0`.
The initialisation expression can involve `operator new` but it is not a separate case. Compare `auto a = new int;` and `auto a (new int);`. There is no initialisation statement inherently involving `operator new` (unlike in Visual Basic).
The fact that a `for` loop involves an initialisation statement is a side note at best. This trivia fact is not specific to `auto`.
The parenthesised "explanations" explained one unknown with another unknown. I replaced them with short examples.1 parent b66ea6b commit 45c839d
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
0 commit comments