This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of New status.
Section: 126.96.36.199 [optional.ctor], 188.8.131.52 [optional.assign], 184.108.40.206 [variant.ctor], 220.127.116.11 [any.cons], 18.104.22.168 [any.modifiers] Status: New Submitter: Tim Song Opened: 2016-10-29 Last modified: 2017-02-03
View all other issues in [optional.ctor].
View all issues with New status.
Throughout optional/variant/any's specification references are made to "the selected constructor of T". For example, 22.214.171.124 [optional.ctor]/16 says of the constructor from const T&:
-16- Remarks: If T's selected constructor is a constexpr constructor, this constructor shall be a constexpr constructor.
Similarly, the in-place constructor has this wording (126.96.36.199 [optional.ctor]/25-26):
-25- Throws: Any exception thrown by the selected constructor of T.-26- Remarks: If T's constructor selected for the initialization is a constexpr constructor, this constructor shall be a constexpr constructor.
If T is a scalar type, it has no constructor at all. Moreover, even for class types, the in-place constructor wording ignores any implicit conversion done on the argument before the selected constructor is called, which 1) may not be valid in constant expressions and 2) may throw an exception; such exceptions aren't thrown "by the selected constructor of T" but outside it.The wording should probably be recast to refer to the entire initialization.
[Issues Telecon 16-Dec-2016]
Priority 3; Jonathan to provide wording.