42 requires(std::is_convertible_v<std::remove_cvref_t<Y> *, value_type *>)
48 requires(std::is_convertible_v<std::remove_cvref_t<Y> *, value_type *>)
52 _weak_ptr = other._weak_ptr;
57 requires(std::is_convertible_v<std::remove_cvref_t<Y> *, value_type *>)
63 requires(std::is_convertible_v<std::remove_cvref_t<Y> *, value_type *>)
66 _shared_ptr = other._shared_ptr;
67 _weak_ptr = other._weak_ptr;
72 requires(std::is_convertible_v<std::remove_cvref_t<Y> *, value_type *>)
78 requires(std::is_convertible_v<std::remove_cvref_t<Y> *, value_type *>)
82 _weak_ptr = _shared_ptr;
87 requires(std::is_convertible_v<std::remove_cvref_t<Y> *, value_type *>)
89 _shared_ptr(), _weak_ptr(other)
94 requires(std::is_convertible_v<std::remove_cvref_t<Y> *, value_type *>)
97 _shared_ptr =
nullptr;
103 requires(std::is_convertible_v<std::remove_cvref_t<Y> *, value_type *>)
109 requires(std::is_convertible_v<std::remove_cvref_t<Y> *, value_type *>)
115 requires(std::is_convertible_v<std::remove_cvref_t<Y> *, value_type *>)
118 _shared_ptr =
nullptr;
124 requires(std::is_convertible_v<std::remove_cvref_t<Y> *, value_type *>)
127 _shared_ptr =
nullptr;
132 void reset()
noexcept
134 _shared_ptr =
nullptr;
138 [[nodiscard]]
bool expired()
const noexcept
140 return _weak_ptr.expired();
145 return _weak_ptr.lock();