LiteFX::SharedObject::weak_from_this¶
Returns a weak pointer to the current object instance.
Synopses¶
Declared in <litefx/containers.hpp>
[[nodiscard]] weak_ptr<SharedObject> weak_from_this() noexcept;
[[nodiscard]] weak_ptr<SharedObject const> weak_from_this() const noexcept;
Returns a weak pointer to the current object instance.
template<typename TSelf>
[[nodiscard]] WeakPtr<std::remove_reference_t<TSelf>> weak_from_this(this TSelf&& self) noexcept;
Return Value¶
Note
The return value should not be discarded.