◐ Shell
clean mode source ↗

std::make_obj_using_allocator - cppreference.com

提供: cppreference.com

<tbody> </tbody>

template< class T, class Alloc, class... Args > constexpr T make_obj_using_allocator( const Alloc& alloc, Args&&... args );

(C++20以上)

アロケータ使用構築の手法によって指定された型 T のオブジェクトを作成します。

以下と同等です。

return std::make_from_tuple<T>(
    std::uses_allocator_construction_args<T>(alloc, std::forward<Args>(args)...)
);

引数

alloc - 使用するアロケータ
args - T のコンストラクタに渡す引数

戻り値

T 型の新たに作成されたオブジェクト。

例外

T のコンストラクタによって投げられるあらゆる例外 (一般的には std::bad_alloc を含みます) を投げる可能性があります。

関連項目