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

Nit: "standard layout" vs. "standard-layout" #506

Closed
mclow opened this issue May 18, 2015 · 4 comments
Closed

Nit: "standard layout" vs. "standard-layout" #506

mclow opened this issue May 18, 2015 · 4 comments
Assignees

Comments

@mclow
Copy link
Contributor

mclow commented May 18, 2015

There are three instances of the first term (all in 29.5), and 50 of the second.

Suggest settling on one or the other - to make my searching easier :-)

@duckie
Copy link

duckie commented May 19, 2015

Even though there is less occurences of it, "standard layout" without the dash makes more sense to me. But maybe there is a reason for the other one to be widely spread in the draft.

@cpplearner
Copy link
Contributor

AFAIK, ISO C++ only defines "standard-layout type", "standard-layout class", "standard-layout struct" and "standard-layout union". It doesn't define the meaning of the phrase "have standard layout", but this phrase is used in N4527 §29.5[atomics.types.generic]p5&6 and §29.7[atomics.flag]p3.

I think it's safe to replace "have standard layout" with "be standard-layout structs". According to N2427, this matches the original intent.

Incidentally, the sentense "They shall each support aggregate initialization syntax." in §29.5 is also problematic: std::atomic<T> doesn't seem to be a aggregate, as it has a user-provided constructor constexpr atomic(T) noexcept. This might need to be a non-editorial issue....

@jensmaurer
Copy link
Member

jensmaurer commented Nov 13, 2016

@"Incidentally, the sentense "They shall each support aggregate initialization syntax." in §29.5 is also problematic: std::atomic doesn't seem to be a aggregate, as it has a user-provided constructor constexpr atomic(T) noexcept."

With list-initialization, we already support "aggregate initialization syntax" here, even when the class has a constructor. That said, the requirement seems to be totally vacuous given the synopsis.

This is LWG issue 2715: http://cplusplus.github.io/LWG/lwg-active.html#2715

@tkoeppe
Copy link
Contributor

tkoeppe commented Nov 13, 2016

See also LWG 2715 for discussion on the (meaningless) phrase "aggregate initialization syntax".

@mclow: If the LWG issue was resolved as editorial, can you please either update and reopen this issue or create a new issue on GitHub? I will merge PR #1021 for now.

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

5 participants