35 : m_ptr(
std::move(
p.m_ptr))
42 throw std::invalid_argument(
"invalid shared_reference");
50 throw std::invalid_argument(
"invalid shared_reference");
57 m_ptr = std::move(
p.m_ptr);
69 operator std::shared_ptr<T>()
78 template <
typename XT,
typename...XTypes>
84 template <
typename T,
typename...Types>
shared_reference & operator=(const shared_reference< Y > &p)
const T & operator*() const
shared_reference(const shared_reference< Y > &p)
friend shared_reference< XT > make_shared_reference(XTypes &&...args)
std::shared_ptr< T > m_ptr
shared_reference(std::shared_ptr< Y > &&p)
const T * operator->() const
~shared_reference()=default
shared_reference & operator=(shared_reference< Y > &&p)
shared_reference(const std::shared_ptr< Y > &p)
shared_reference(shared_reference< Y > &&p)