std::allocator::construct
提供:cppreference.com
|
|
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
| Defined in header <memory>
|
||
| void construct( pointer p, const_reference val ); |
(C + + 11時まで) | |
| template< class U, class... Args > void construct( U* p, Args&&... args ); |
(C + + 11以来) | |
配置-newを使って、
1) Tが指す割り当てられ、初期化されていないストレージのタイプpのオブジェクトを構築しますOriginal:
Constructs an object of type
T in allocated uninitialized storage pointed to by p, using placement-newThe text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
new((void *)p) T(val)呼び出します
2) Original:
Calls new((void *)p) T(val)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
::new((void *)p) U(std::forward<Args>(args)...)呼び出します
Original:
Calls ::new((void *)p) U(std::forward<Args>(args)...)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[編集] パラメータ
| p | - | 割り当てられた初期化されていないストレージへのポインタ
Original: pointer to allocated uninitialized storage The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
| val | - | コピーコンストラクタの引数として使用する値
Original: the value to use as the copy constructor argument The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
| args... | - | コンストラクタの引数に使用する
Original: the constructor arguments to use The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
[編集] 値を返します
(なし)
Original:
(none)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[編集] も参照してください
| [静的] |
割り振られたストレージ内のオブジェクトを構築します Original: constructs an object in the allocated storage The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (関数テンプレート) |
| 割り当て関数 Original: allocation functions The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (機能) | |