Skip to content

LiteFX::makeShared

Creates a new shared pointer.

Synopses

Declared in <litefx/containers.hpp>

Creates a new shared pointer.

template<class T>
[[nodiscard]] constexpr SharedPtr<T> makeShared();

» more...

Creates a new shared pointer.

template<
    class T,
    class... TArgs>
[[nodiscard]] constexpr SharedPtr<T> makeShared(TArgs&&... _args);

» more...

Return Value

A new shared pointer.

Note

The return value should not be discarded.

Template Parameters

NameDescription
TThe type of the object, the pointer points to.