2942. LWG 2873's resolution missed weak_ptr::owner_before

Section: 23.11.4.5 [util.smartptr.weak.obs] Status: WP Submitter: Tim Song Opened: 2017-03-09 Last modified: 2017-07-30

Priority: Not Prioritized

View all other issues in [util.smartptr.weak.obs].

View all issues with WP status.

Discussion:

The NB comment asked for noexcept on shared_ptr::owner_before, weak_ptr::owner_before, and owner_less::operator(), but the PR of LWG 2873 only added it to the first and the third one.

[2017-06-03, Moved to Tentatively Ready after 6 positive votes on c++std-lib]

Proposed resolution:

This wording is relative to N4659.

  1. Edit 23.11.4 [util.smartptr.weak], class template weak_ptr synopsis, as indicated:

    […]
    // 23.11.4.5 [util.smartptr.weak.obs], observers
    […]
    template<class U> bool owner_before(const shared_ptr<U>& b) const noexcept;
    template<class U> bool owner_before(const weak_ptr<U>& b) const noexcept;
    
  2. Edit 23.11.4.5 [util.smartptr.weak.obs] immediately before p4 as indicated:

    template<class U> bool owner_before(const shared_ptr<U>& b) const noexcept;
    template<class U> bool owner_before(const weak_ptr<U>& b) const noexcept;
    

    -4- Returns: An unspecified value such that […]