|
|
Defined in header <memory> | ||
template<class T,class Alloc,class...Args> constexpr T make_obj_using_allocator(const Alloc& alloc, Args&&...args); | (since C++20) | |
Creates an object of the given typeT
by means ofuses-allocator construction.
Equivalent to
returnstd::make_from_tuple<T>(std::uses_allocator_construction_args<T>(alloc,std::forward<Args>(args)...));
Contents |
alloc | - | the allocator to use |
args | - | the arguments to pass to T's constructor |
The newly-created object of typeT
.
May throw any exception thrown by the constructor ofT
, typically includingstd::bad_alloc.
This section is incomplete Reason: no example |
prepares the argument list matching the flavor of uses-allocator construction required by the given type (function template)[edit] | |
creates an object of the given type at specified memory location by means of uses-allocator construction (function template)[edit] |