Repository navigation
Commit ee2c076
committed
Default-initialized local static constexpr in constant evaluation [GH #399]
The interpretation of the initialization statement of a local variable with
static or thread storage duration (which, in a constant evaluation, must be
usable in constant expressions) no longer allocates and initializes
interpreter storage for it: its value is obtained when it is referenced.
Previously, a default-initialized local "static constexpr" variable of class
type caused the constant evaluation to fail.1 parent f51894d commit ee2c076
4 files changed
Lines changed: 44 additions & 0 deletions
File tree
- src
- pending_changes
- tests/tests/changes
- .gh-399.rto
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9500 | 9500 | | |
9501 | 9501 | | |
9502 | 9502 | | |
| 9503 | + | |
| 9504 | + | |
| 9505 | + | |
| 9506 | + | |
| 9507 | + | |
| 9508 | + | |
| 9509 | + | |
9503 | 9510 | | |
9504 | 9511 | | |
9505 | 9512 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
0 commit comments