Skip to content

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;

» more...

[[nodiscard]] weak_ptr<SharedObject const> weak_from_this() const noexcept;

» more...

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;

» more...

Return Value

Note

The return value should not be discarded.