[expr.const] Definition domain fixes for "usable in constant expressions"#8670
Conversation
hubert-reinterpretcast
commented
Dec 18, 2025
- Fix index entries to identify the domains of the definitions
- Fix wording error that restricted the domain of the definition for variables
| $V$'s initializing declaration $D$ is reachable from $P$ and | ||
| A variable $V$ is | ||
| \defnx{usable in constant expressions}{usable in constant expressions!variable} at a point $P$ if | ||
| $V$ is constant-initialized and potentially-constant, |
There was a problem hiding this comment.
It's not obvious that the new restriction that
There was a problem hiding this comment.
It's not obvious that the new restriction that V is constant-initialized is editorial.
That
Also, doesn't this conclude from the first bullet that V is constexpr or something else?
It does not, because in
extern int &r0;
int &r = r0;
constexpr int &r2 = r;r is potentially-constant and has an initializing declaration reachable from, and in the same translation unit as, the definition of r2.
|
P2 because we have two identical |
Co-authored-by: Jan Schultke <me@eisenwave.net>