tmp/tmpapgauft6/{from.md → to.md}
RENAMED
|
@@ -27,10 +27,12 @@ label:
|
|
| 27 |
```
|
| 28 |
|
| 29 |
The variable created in a condition is destroyed and created with each
|
| 30 |
iteration of the loop.
|
| 31 |
|
|
|
|
|
|
|
| 32 |
``` cpp
|
| 33 |
struct A {
|
| 34 |
int val;
|
| 35 |
A(int i) : val(i) { }
|
| 36 |
~A() { }
|
|
@@ -45,5 +47,7 @@ while (A a = i) {
|
|
| 45 |
|
| 46 |
In the while-loop, the constructor and destructor are each called twice,
|
| 47 |
once for the condition that succeeds and once for the condition that
|
| 48 |
fails.
|
| 49 |
|
|
|
|
|
|
|
|
|
| 27 |
```
|
| 28 |
|
| 29 |
The variable created in a condition is destroyed and created with each
|
| 30 |
iteration of the loop.
|
| 31 |
|
| 32 |
+
[*Example 1*:
|
| 33 |
+
|
| 34 |
``` cpp
|
| 35 |
struct A {
|
| 36 |
int val;
|
| 37 |
A(int i) : val(i) { }
|
| 38 |
~A() { }
|
|
|
|
| 47 |
|
| 48 |
In the while-loop, the constructor and destructor are each called twice,
|
| 49 |
once for the condition that succeeds and once for the condition that
|
| 50 |
fails.
|
| 51 |
|
| 52 |
+
— *end example*]
|
| 53 |
+
|