Date
2017-03-03.22:08:49
Message id
9056

Content

Proposed resolution:

This wording is relative to N4640.

  1. Modify [util.smartptr.shared.const] as indicated:

    [Drafting note: This also adds a hyphen to "well defined"]

    template<class Y> explicit shared_ptr(Y* p);
    

    -4- Requires: Y shall be a complete type. The expression delete[] p, when T is an array type, or delete p, when T is not an array type, shall be well formed, shall have well -defined behavior, and shall not throw exceptions. When T is U[N], Y(*)[N] shall be convertible to T*; when T is U[], Y(*)[] shall be convertible to T*; otherwise, Y* shall be convertible to T*.

    -5- Effects: […]

    -6- Postconditions: […]

    -7- Throws: […]

    -?- Remarks: When T is an array type, this constructor shall not participate in overload resolution unless the expression delete[] p is well-formed and either T is U[N] and Y(*)[N] is convertible to T*, or T is U[] and Y(*)[] is convertible to T*. When T is not an array type, this constructor shall not participate in overload resolution unless the expression delete p is well-formed and Y* is convertible to T*.