std::forward_list::emplace_front - cppreference.com

##### cppreference.com

##### Search

Create account

##### Namespaces

- Page
- Discussion

##### Variants

##### Views

- View
- Edit
- History

##### Actions

# std::forward_list::emplace_front

From cppreference.com
< cpp‎ | container‎ | forward list

[edit template]

template< class... Args > void emplace_front( Args&&... args ); |  | (since C++11)

Inserts a new element to the beginning of the container. The element is constructed in-place, i.e. no copy or move operations are performed. The constructor of the element is called with exactly the same arguments, as supplied to the function.

No iterators or references are invalidated.

### [edit] Parameters

args | - | arguments to forward to the constructor of the element

### [edit] Return value

(none)

### [edit] Complexity

Constant.

### [edit] Exceptions

If an exception is thrown, this function has no effect (strong exception guarantee).

### [edit] See also

push_front | inserts elements to the beginning (public member function) [edit]

Retrieved from "http://en.cppreference.com/mwiki/index.php?title=cpp/container/forward_list/emplace_front&oldid=50496"