list::emplace
Belirtilen konumdaki bir liste halinde yerinde oluşturulmuş bir öğe ekler.
void emplace_back(
iterator _Where,
Type&& _Val
);
Parametreler
Parametre |
Description |
_Where |
Hedef konumda list Class burada ilk öğesine eklenir. |
_Val |
Sonuna eklenen öðe list. |
Notlar
Bir özel durum oluşursa, list sol değiştirmeden ve özel durum rethrown.
Örnek
// list_emplace.cpp
// compile with: /EHsc
#include <list>
#include <iostream>
#include <string>
int main( )
{
using namespace std;
list <string> c2;
string str("a");
c2.emplace(c2.begin(), move( str ) );
cout << "Moved first element: " << c2.back( ) << endl;
}
Gereksinimler
Başlık: <list>
Namespace: std