43 template <
typename... Args>
45 : m_WidgetPtr{std::make_shared<WidgetType>(std::forward<Args>(args)...)}
50 : m_WidgetPtr{std::make_shared<WidgetType>(*other.m_WidgetPtr)}
55 : m_WidgetPtr{std::move(other.m_WidgetPtr)}
62 m_WidgetPtr = std::make_shared<WidgetType>(*other.m_WidgetPtr);
70 m_WidgetPtr = std::move(other.m_WidgetPtr);
75 operator bool()
const noexcept
77 return (m_WidgetPtr !=
nullptr);
80 WidgetType& operator*()
const noexcept
85 WidgetType* operator->()
const noexcept
87 return m_WidgetPtr.get();
90 WidgetType* get()
const noexcept
92 return m_WidgetPtr.get();
98 std::shared_ptr<WidgetType> m_WidgetPtr;