Created on 2016-07-10.00:00:00 last changed 89 months ago
Proposed resolution:
This wording is relative to N4600.
Wording relative to N4600 + LWG 2451, although it should be noted that this resolution should be applied wherever LWG 2451 is applied, be that to the fundamentals TS or the specification of optional in the C++ Working Paper.
Edit [optional.optional] as indicated:
template <class T> class optional { public: typedef T value_type; // 5.3.1, Constructors […] template <class U> constexpr optional(U&&); template <class U>constexproptional(const optional<U>&); template <class U>constexproptional(optional<U<&&); […] };
In [optional.object.ctor], modify the new signature specifications added by LWG 2451
template <class U>constexproptional(const optional<U>& rhs);[…]
-48- Remarks:If T's selected constructor is a constexpr constructor, this constructor shall be a constexpr constructor.This constructor shall not participate in overload resolution unless […]template <class U>constexproptional(optional<U>&& rhs);[…]
-53- Remarks:If T's selected constructor is a constexpr constructor, this constructor shall be a constexpr constructor.This constructor shall not participate in overload resolution unless […]
[ 2016-07 Chicago ]
Monday: P0 - tentatively ready
This needs to be considered for C++17 as well
Addresses: fund.ts.v2
LWG 2451 adds conditionally explicit converting constructors to optional<T> that accept:
All three of these constructors are required to be constexpr "If T's selected constructor is a constexpr constructor". While this is not problematic for #1, it is not possible in the current language to implement signatures #2 and #3 as constexpr functions for the same reasons that optional's non-converting constructors from optional<T>&& and const optional<T>& cannot be constexpr.
We should remove the "constexpr" specifier from the declarations of the conditionally explicit converting constructors that accept optional<U>&& and const optional<U>&, and strike the remarks requiring these constructors to be constexpr.History | |||
---|---|---|---|
Date | User | Action | Args |
2017-07-30 20:10:41 | admin | set | status: wp -> open |
2016-11-14 03:59:28 | admin | set | status: pending -> wp |
2016-11-14 03:55:22 | admin | set | status: ready -> pending |
2016-08-01 18:34:48 | admin | set | messages: + msg8283 |
2016-08-01 18:34:48 | admin | set | status: new -> ready |
2016-07-24 19:26:01 | admin | set | messages: + msg8248 |
2016-07-10 00:00:00 | admin | create |