LiteFX::SharedObject::create¶
Generic factory method used to create instances of the shared object.
Synopsis¶
Declared in <litefx/containers.hpp>
template<
typename T,
typename... TArgs>
requires std::derived_from<T, SharedObject>
[[nodiscard]] static SharedPtr<T> create(TArgs&&... args);
Return Value¶
A shared pointer of the shared object.
Note
The return value should not be discarded.
Template Parameters¶
| Name | Description |
|---|---|
| T | The type of the class that inherits from SharedObject. |
| TArgs | The types of the arguments passed to the shared object's constructor. |
Parameters¶
| Name | Description |
|---|---|
| args | The arguments that are forwarded to the shared object's constructor. |
See Also¶
Allocator