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

"single-element of an array" model #4797

Closed
xmh0511 opened this issue Aug 6, 2021 · 2 comments
Closed

"single-element of an array" model #4797

xmh0511 opened this issue Aug 6, 2021 · 2 comments

Comments

@xmh0511
Copy link
Contributor

xmh0511 commented Aug 6, 2021

[basic.compound] p3

an object of type T that is not an array element is considered to belong to an array with one element of type T.

Does it mean this rule also applies to any subobject that is not an array element? It does not make sense, I also think it's not the intent of the rule. The free room to construe this rule could result in #3614.

Could we rephrase it to that?

a complete object of type T is considered to be the initial element of an array with one element of type T.

@JohelEGP
Copy link
Contributor

JohelEGP commented Aug 6, 2021

If the intent isn't to make std::views::single(suboject) a valid range, where is the wording that would make it such?

@xmh0511
Copy link
Contributor Author

xmh0511 commented Aug 7, 2021

Yes, you're right. That's the exact intent.

@xmh0511 xmh0511 closed this as completed Aug 7, 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

2 participants