Date
2016-11-26.14:34:13
Message id
8283

Content

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.

  1. 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> constexpr optional(const optional<U>&);
      template <class U> constexpr optional(optional<U<&&);
      […]
    };
    
  2. In [optional.object.ctor], modify the new signature specifications added by LWG 2451

    template <class U>
      constexpr optional(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>
      constexpr optional(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 […]