Created on 2026-03-25.00:00:00 last changed 5 days ago
Proposed resolution:
This wording is relative to N5032.
Modify [util.smartptr.shared.general], class template `shared_ptr` synopsis, as indicated:
namespace std {
template<class T> class shared_ptr {
public:
[…]
template<class U>
constexpr bool owner_before(const shared_ptr<U>& b) const noexcept;
template<class U>
constexpr bool owner_before(const weak_ptr<U>& b) const noexcept;
size_t owner_hash() const noexcept;
template<class U>
constexpr bool owner_equal(const shared_ptr<U>& b) const noexcept;
template<class U>
constexpr bool owner_equal(const weak_ptr<U>& b) const noexcept;
};
[…]
}
Modify [util.smartptr.shared.obs] as indicated:
template<class U>constexprbool owner_before(const shared_ptr<U>& b) const noexcept; template<class U>constexprbool owner_before(const weak_ptr<U>& b) const noexcept;-19- […]
Modify [util.smartptr.weak.general], class template `weak_ptr` synopsis, as indicated:
namespace std {
template<class T> class weak_ptr {
public:
[…]
template<class U>
constexpr bool owner_before(const shared_ptr<U>& b) const noexcept;
template<class U>
constexpr bool owner_before(const weak_ptr<U>& b) const noexcept;
size_t owner_hash() const noexcept;
template<class U>
constexpr bool owner_equal(const shared_ptr<U>& b) const noexcept;
template<class U>
constexpr bool owner_equal(const weak_ptr<U>& b) const noexcept;
};
[…]
}
Modify [util.smartptr.weak.obs] as indicated:
template<class U>constexprbool owner_before(const shared_ptr<U>& b) const noexcept; template<class U>constexprbool owner_before(const weak_ptr<U>& b) const noexcept;-4- […]
Modify [util.smartptr.ownerless], class template `owner_less` synopsis, as indicated:
namespace std {
template<class T = void> struct owner_less;
template<class T> struct owner_less<shared_ptr<T>> {
constexpr bool operator()(const shared_ptr<T>&, const shared_ptr<T>&) const noexcept;
constexpr bool operator()(const shared_ptr<T>&, const weak_ptr<T>&) const noexcept;
constexpr bool operator()(const weak_ptr<T>&, const shared_ptr<T>&) const noexcept;
};
template<class T> struct owner_less<weak_ptr<T>> {
constexpr bool operator()(const weak_ptr<T>&, const weak_ptr<T>&) const noexcept;
constexpr bool operator()(const shared_ptr<T>&, const weak_ptr<T>&) const noexcept;
constexpr bool operator()(const weak_ptr<T>&, const shared_ptr<T>&) const noexcept;
};
template<> struct owner_less<void> {
template<class T, class U>
constexpr bool operator()(const shared_ptr<T>&, const shared_ptr<U>&) const noexcept;
template<class T, class U>
constexpr bool operator()(const shared_ptr<T>&, const weak_ptr<U>&) const noexcept;
template<class T, class U>
constexpr bool operator()(const weak_ptr<T>&, const shared_ptr<U>&) const noexcept;
template<class T, class U>
constexpr bool operator()(const weak_ptr<T>&, const weak_ptr<U>&) const noexcept;
using is_transparent = unspecified;
};
}
[ Croydon 2026-03-25; move to Immediate. ]
Addresses US 75-138
LEWG decided to remove `constexpr` from `owner_before` and `owner_less`.
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2026-03-25 13:29:12 | admin | set | messages: + msg16080 |
| 2026-03-25 13:29:12 | admin | set | status: new -> immediate |
| 2026-03-25 11:41:44 | admin | set | messages: + msg16075 |
| 2026-03-25 00:00:00 | admin | create | |