Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[expr.const] "as described above"... where? #4077

Closed
brevzin opened this issue Jul 9, 2020 · 3 comments · Fixed by #4078
Closed

[expr.const] "as described above"... where? #4077

brevzin opened this issue Jul 9, 2020 · 3 comments · Fixed by #4078
Assignees

Comments

@brevzin
Copy link
Contributor

brevzin commented Jul 9, 2020

In [expr.const], we have footnote 80 which reads:

Testing this condition may involve a trial evaluation of its initializer as described above.

This footnote is supposed to help us understand what the "or has constant initialization" part means.

Firstly, should "or has constant initialization" read "or is constant-initialized" since that's the term that's defined in [expr.const]/2?

Second, described above where? Can the footnote actually point to the section that it's referring to? I don't actually know what it's referring to at the moment.

@jensmaurer
Copy link
Member

"constant initialization" is defined in [basic.start.static] p2. Note the limitation to variables with static or thread storage duration.

"as described above" refers to the trial evaluation described in [expr.const] p2.2: "when interpreted as a constant-expression". We don't cross-references individual paragraphs of a section, so it's hard to make the pointer more precise.

@jensmaurer
Copy link
Member

jensmaurer commented Jul 9, 2020

Would it help to add a cross-reference to [basic.start.static] after "constant initialization"?

@brevzin
Copy link
Contributor Author

brevzin commented Jul 9, 2020

Oh yeah, that would help tremendously.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants