Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
Adds an element constructed in place to the beginning of a list.
void emplace_front(
Type&& _Val
);
Parameters
Parameter |
Description |
_Val |
The element added to the beginning of the list Class. |
Remarks
If an exception is thrown, the list is left unaltered and the exception is rethrown.
Example
// list_emplace_front.cpp
// compile with: /EHsc
#include <list>
#include <iostream>
#include <string>
int main( )
{
using namespace std;
list <string> c2;
string str("a");
c2.emplace_front( move( str ) );
cout << "Moved first element: " << c2.front( ) << endl;
}
Moved first element: a
Requirements
Header: <list>
Namespace: std