Skip to content

Conversation

@hubert-reinterpretcast
Copy link
Contributor

  • 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,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not obvious that the new restriction that $V$ is constant-initialized is editorial. What does this do? Also, doesn't this conclude from the first bullet that $V$ is constexpr or something else?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not obvious that the new restriction that V is constant-initialized is editorial.

That $V$ is constant-initialized is, in the strict reading of the old wording, a prerequisite for the definition to apply.

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.

@eisenwave eisenwave added the P2-Bug Presentational errors and omissions label Dec 19, 2025
@eisenwave
Copy link
Member

P2 because we have two identical \defn entries, and that's probably not how those macros should be used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2-Bug Presentational errors and omissions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants