Title
The form of initialization for the emplace-constructors is not specified
Status
c++17
Section
[variant.ctor]
Submitter
United States

Created on 2017-02-03.00:00:00 last changed 90 months ago

Messages

Date: 2017-03-03.22:08:49

Proposed resolution:

This wording is relative to N4640.

  1. Modify [variant.ctor] paragraph 19 as indicated:

    Effects: Initializes the contained value as if direct-non-list-initializing an object of type T with the arguments std::forward<Args>(args)....
  2. Modify [variant.ctor] paragraph 23 as indicated:

    Effects: Initializes the contained value as if direct-non-list-initializingconstructing an object of type T with the arguments il, std::forward<Args>(args)....
  3. Modify [variant.ctor] paragraph 27 as indicated:

    Effects: Initializes the contained value as if direct-non-list-initializingconstructing an object of type TI with the arguments std::forward<Args>(args)....
  4. Modify [variant.ctor] paragraph 31 as indicated:

    Effects: Initializes the contained value as if direct-non-list-initializingconstructing an object of type TI with the arguments il, std::forward(args)....
  5. Modify [variant.mod] paragraph 6 as indicated:

    Effects: Destroys the currently contained value if valueless_by_exception() is false. Then direct-initializes the contained value as if direct-non-list-initializingconstructing a value of type TI with the arguments std::forward<Args>(args)....
  6. Modify [variant.mod] paragraph 11 as indicated:

    Effects: Destroys the currently contained value if valueless_by_exception() is false. Then direct-initializes the contained value as if direct-non-list-initializingconstructing a value of type TI with the arguments il, std::forward<Args>(args)....
Date: 2017-03-03.22:08:49

[ Kona 2017-02-28 ]

Accepted as Immediate to resolve NB comment.

Date: 2017-02-15.00:00:00

[ 2017-02-27, Marshall adds wording to cover two more cases ]

Previous resolution [SUPERSEDED]:

This wording is relative to N4640.

  1. Modify [variant.ctor] paragraph 19 as indicated:

    Effects: Initializes the contained value as if direct-non-list-initializing an object of type T with the arguments std::forward<Args>(args)....
  2. Modify [variant.ctor] paragraph 23 as indicated:

    Effects: Initializes the contained value as if direct-non-list-initializingconstructing an object of type T with the arguments il, std::forward<Args>(args)....
  3. Modify [variant.ctor] paragraph 27 as indicated:

    Effects: Initializes the contained value as if direct-non-list-initializingconstructing an object of type TI with the arguments std::forward<Args>(args)....
  4. Modify [variant.ctor] paragraph 31 as indicated:

    Effects: Initializes the contained value as if direct-non-list-initializingconstructing an object of type TI with the arguments il, std::forward(args)....
Date: 2017-02-15.00:00:00

[ 2017-02-20, Marshall adds wording ]

Date: 2017-02-03.00:00:00
Addresses US 118

The form of initialization for the emplace-constructors is not specified. We are very clear to mandate "as if by direct non-list initialization" for each constructor in optional, so there is no ambiguity regarding parens vs. braces. That wording idiom should be followed by variant.

Proposed change: Insert the phrase "as if direct-non-list-initializing" at appropriate locations in paragraphs 19, 23, 27, and 31

History
Date User Action Args
2017-07-30 20:15:43adminsetstatus: wp -> c++17
2017-03-05 23:46:08adminsetstatus: immediate -> wp
2017-03-03 22:08:49adminsetmessages: + msg9060
2017-03-03 22:08:49adminsetstatus: new -> immediate
2017-02-28 08:32:19adminsetmessages: + msg9014
2017-02-20 19:47:08adminsetmessages: + msg8958
2017-02-20 18:11:16adminsetmessages: + msg8957
2017-02-03 00:00:00admincreate