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

Missing definition of "direct-non-list-initialization" #1130

Closed
timsong-cpp opened this issue Nov 26, 2016 · 4 comments
Closed

Missing definition of "direct-non-list-initialization" #1130

timsong-cpp opened this issue Nov 26, 2016 · 4 comments
Labels
lwg Issue must be reviewed by LWG.

Comments

@timsong-cpp
Copy link
Contributor

The specification of optional uses various forms of "direct-non-list-initialization", which is defined in [general.defns.direct-non-list-init] in the Fundamentals TS, but that definition wasn't added to the IS working paper for the merge.

@zygoloid
Copy link
Member

Looks like we could instead just remove the (unnecessary) new term. Example:

If rhs contains a value, initializes the contained value as if direct-non-list-initializing an object
of type T with the expression *rhs.

could be rewritten as

If rhs contains a value, initializes the contained value with the initializer (*rhs).

This is shorter, simpler, and doesn't require inventing a new term for something that the core language can already express. We should first run this past LWG to make sure (a) they're OK with this, and (b) they change their habits (and the fundamentals TS) to apply the same pattern going forward.

@jensmaurer jensmaurer added the lwg Issue must be reviewed by LWG. label Dec 13, 2016
@AlisdairM
Copy link
Contributor

This is https://cplusplus.github.io/LWG/lwg-defects.html#2872 and should be applied to the DIS at Kona.

@jwakely
Copy link
Member

jwakely commented Mar 7, 2017

It's a shame we'll continue our bad habits now.

@zygoloid
Copy link
Member

Term has been added to library definitions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lwg Issue must be reviewed by LWG.
Projects
None yet
Development

No branches or pull requests

5 participants