Skip to content

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

Closed
@timsong-cpp

Description

@timsong-cpp
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.

Activity

zygoloid

zygoloid commented on Nov 28, 2016

@zygoloid
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.

AlisdairM

AlisdairM commented on Mar 7, 2017

@AlisdairM
Contributor

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

jwakely

jwakely commented on Mar 7, 2017

@jwakely
Member

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

zygoloid

zygoloid commented on Jul 15, 2017

@zygoloid
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

Metadata

Metadata

Assignees

No one assigned

    Labels

    lwgIssue must be reviewed by LWG.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @zygoloid@AlisdairM@jwakely@timsong-cpp@jensmaurer

        Issue actions

          Missing definition of "direct-non-list-initialization" · Issue #1130 · cplusplus/draft