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] the term "constant-initialized" is confusing #4955

Closed
timsong-cpp opened this issue Oct 1, 2021 · 1 comment
Closed

[expr.const] the term "constant-initialized" is confusing #4955

timsong-cpp opened this issue Oct 1, 2021 · 1 comment

Comments

@timsong-cpp
Copy link
Contributor

It's confusing that "is constant-initialized" ([expr.const]/2) and "has constant initialization" (([basic.start.static]/2) mean different things.

Moreover, in pretty much every other case of a variable being "meow-initialized" (default/value/copy/direct/list/etc.), the term describes the actual initialization of the variable performed. But in an example like

void f() {
    bool b = std::is_constant_evaluated();
}

b is constant-initialized, but the trial evaluation performed for that determination has nothing to do with how b is actually initialized.

There are only so many ways the words "constant" and "initialize" can be combined, so I don't have a great suggestion. One option might be to limit "constant-initialized" to things where the trial evaluation is consistent with the initialization to be performed - i.e., things that are potentially constant or have static or thread storage duration.

@jensmaurer jensmaurer added the decision-required A decision of the editorial group (or the Project Editor) is required. label Dec 17, 2021
@jensmaurer jensmaurer removed the decision-required A decision of the editorial group (or the Project Editor) is required. label Jun 12, 2023
@tkoeppe
Copy link
Contributor

tkoeppe commented Jun 12, 2023

Editorial meeting feedback: we appreciate the concern. This is not editorial, but also not important enough for Core to explore. Please reopen with a concrete wording suggestion, which we will then run by Core.

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

No branches or pull requests

3 participants