std::make_obj_using_allocator
From cppreference.com
| ヘッダ <memory> で定義 |
||
| 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を含む)を投げる可能性があります。
[編集] 例
| このセクションは未完成です 理由: 例がありません |
[編集] 関連項目
| 与えられた型が必要とする uses-allocator 構築の種類に一致する引数リストを準備します (関数テンプレート) | |
| uses-allocator 構築によって、指定されたメモリ位置に与えられた型のオブジェクトを作成します (関数テンプレート) |