EnTT 3.14.0
Loading...
Searching...
No Matches
loader.hpp
1#ifndef ENTT_RESOURCE_LOADER_HPP
2#define ENTT_RESOURCE_LOADER_HPP
3
4#include <memory>
5#include <utility>
6#include "fwd.hpp"
7
8namespace entt {
9
14template<typename Type>
17 using result_type = std::shared_ptr<Type>;
18
25 template<typename... Args>
27 return std::make_shared<Type>(std::forward<Args>(args)...);
28 }
29};
30
31} // namespace entt
32
33#endif
EnTT default namespace.
Definition dense_map.hpp:22
constexpr Type make_obj_using_allocator(const Allocator &allocator, Args &&...args)
Uses-allocator construction utility (waiting for C++20).
Definition memory.hpp:219
Transparent loader for shared resources.
Definition loader.hpp:15
result_type operator()(Args &&...args) const
Constructs a shared pointer to a resource from its arguments.
Definition loader.hpp:26
std::shared_ptr< Type > result_type
Result type.
Definition loader.hpp:17