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

[class.base.init] "Unfortunately" in standardese text #4497

Closed
dangelog opened this issue Feb 16, 2021 · 2 comments
Closed

[class.base.init] "Unfortunately" in standardese text #4497

dangelog opened this issue Feb 16, 2021 · 2 comments

Comments

@dangelog
Copy link
Contributor

Hi,

In [class.base.init] https://eel.is/c++draft/class.base.init#11 there's this example with comments:

struct A {
  A() = default;        // OK
  A(int v) : v(v) { }   // OK
  const int& v = 42;    // OK
};
A a1;                   // error: ill-formed binding of temporary to reference
A a2(1);                // OK, unfortunately

I understand why it's unfortunate (code compiles although it immediately produces a dangling reference), but I'm wondering, do words like "unfortunately" belong to the Standard? Is there a reference somewhere about what kind of "lexicon" / "register" (as in social linguistics) is one expected to use in the Standard itself?

@jwakely
Copy link
Member

jwakely commented Feb 16, 2021

The ISO drafting directives define the language to be used, but this is just a comment in a non-normative example. It's not specifying anything, it's just commentary on what is defined elsewhere.

@jensmaurer
Copy link
Member

This is a comment in a non-normative example, the phrasing is not actively insulting or disrespectful to anyone, and does offer probably helpful interpretation.

@tkoeppe, please re-open if you want a change here.

@jensmaurer jensmaurer changed the title "Unfortunately" in standardese text ([class.base.init]) [class.base.init] "Unfortunately" in standardese text Feb 16, 2021
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