Function make_obj_using_allocator
Synopsis
#include <src/entt/core/memory.hpp>
template <typename Type, typename Allocator, typename... Args>
constexpr Type make_obj_using_allocator(const Allocator &allocator, Args &&...args)
Description
Uses-allocator construction utility (waiting for C++20).
Primarily intended for internal use. Creates an object of a given type by means of uses-allocator construction.
- Template Parameters
Type
- Type of object to create.Allocator
- Type of allocator used to manage memory and elements.Args
- Types of arguments to use to construct the object.- Parameters
allocator
- The allocator to use.args
- Parameters to use to construct the object.- Returns
- A newly created object of the given type.
Source
Lines 263-266 in src/entt/core/memory.hpp.
template<typename Type, typename Allocator, typename... Args>
constexpr Type make_obj_using_allocator(const Allocator &allocator, Args &&...args) {
return std::make_from_tuple<Type>(internal::uses_allocator_construction<Type>::args(allocator, std::forward<Args>(args)...));
}