2374. [fund.ts] Remarks for optional::to_value are too restrictive

Section: 5.3.5 [fund.ts::optional.object.observe] Status: TS Submitter: Jonathan Wakely Opened: 2014-03-25 Last modified: 2017-07-30 20:10:41 UTC

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.

  1. Change [optional.object.observe] p23 of the Library Fundamentals specification as indicated:

    template <class U> constexpr T value_or(U&& v) const &;
    

    […]

    -23- Remarks: If both constructors of T which could be selected are constexpr constructorsthe selected constructor of T is a constexpr constructor, this function shall be a constexpr function.