optional::to_value
are too restrictiveSection: 5.3.5 [fund.ts::optional.object.observe] Status: TS Submitter: Jonathan Wakely Opened: 2014-03-25 Last modified: 2017-07-30
Priority: 0
View all issues with TS status.
Discussion:
Addresses: fund.ts
In Bristol I think I claimed that the remarks for optional::to_value()
were unimplementable and the function could only be constexpr
if both
constructors that could be called were constexpr
, but I was wrong.
The remarks should be reverted to the original pre-n3793 form.
[2013-06-21 Rapperswil]
Accept for Library Fundamentals TS Working Paper
Proposed resolution:
This wording is relative to N3908.
Change [optional.object.observe] p23 of the Library Fundamentals specification as indicated:
template <class U> constexpr T value_or(U&& v) const &;[…]
-23- Remarks: Ifboth constructors ofthe selected constructor ofT
which could be selected areconstexpr
constructorsT
is aconstexpr
constructor, this function shall be aconstexpr
function.