MSVCRT std::vector 新しいページはコチラ

提供: yonewiki
移動: 案内, 検索
(メンバ関数 emplace_back)
(メンバ関数 emplace_back)
78行: 78行:
 
=== '''メンバ関数 emplace_back''' ===
 
=== '''メンバ関数 emplace_back''' ===
 
*<span style = "background:linear-gradient(transparent 75%, #cab8d9 75%); font-weight:bold; "><span style="color:deeppink;">void</span> <span style="color:blue;">obj.emplace_back</span>(<span style="color:deeppink;">TypeTemplate(vector<TypeTemplate>&&...)</span>);</span>
 
*<span style = "background:linear-gradient(transparent 75%, #cab8d9 75%); font-weight:bold; "><span style="color:deeppink;">void</span> <span style="color:blue;">obj.emplace_back</span>(<span style="color:deeppink;">TypeTemplate(vector<TypeTemplate>&&...)</span>);</span>
*<span style = "background:linear-gradient(transparent 75%, #cab8d9 75%); font-weight:bold; "><span style="color:deeppink;">void</span> <span style="color:blue;">obj.emplace_back</span>(<span style="color:deeppink;">InputIterator</span> first, <span style="color:deeppink;">InputIterator</span> last);</span>
+
*<span style = "background:linear-gradient(transparent 75%, #cab8d9 75%); font-weight:bold; "><span style="color:deeppink;">TypeTemplate&(refference_InsertValue)</span> <span style="color:blue;">obj.emplace_back</span>(<span style="color:deeppink;">TypeTemplate(vector<TypeTemplate>&&...)</span>);</span>
*<span style = "background:linear-gradient(transparent 75%, #cab8d9 75%); font-weight:bold; "><span style="color:deeppink;">void</span> <span style="color:blue;">obj.emplace_back</span>(<span style="color:deeppink;">Initializer_list<TypeTemplate></span>);</span>
+
  
 
 TypeTemplate(vector<TypeTemplate>)はvectorの型テンプレートで型を生成するコンストラクタによって初期化形式である必要があります。?何を言っているの?
 
 TypeTemplate(vector<TypeTemplate>)はvectorの型テンプレートで型を生成するコンストラクタによって初期化形式である必要があります。?何を言っているの?
97行: 96行:
 
}
 
}
 
</syntaxhighlight2>
 
</syntaxhighlight2>
 +
 +
※C++17以降は2つ目に書いたように TypeTemplate& のような挿入したデータへの参照を返却され、受け取ることができます。
 +
 +
 
  
 
[[[Windows#MSVC Runtimeリファレンス|MSVC Runtimeリファレンス]]に戻る
 
[[[Windows#MSVC Runtimeリファレンス|MSVC Runtimeリファレンス]]に戻る

2021年2月9日 (火) 00:00時点における版



個人用ツール
名前空間

変種
操作
案内
ツールボックス