template< class... Args >
T& emplace( Args&&... args );
template< class U, class... Args >
T& emplace( std::initializer_list<U> ilist, Args&&... args );
Constructs the contained value in-place. If *this already contains a value before the call, the contained value is destroyed by calling its destructor.
|args...||-||the arguments to pass to the constructor|
|ilist||-||the initializer list to pass to the constructor|
A reference to the new contained value.
Any exception thrown by the selected constructor of
T. If an exception is thrown, *this does not contain a value after this call (the previously contained value, if any, had been destroyed).
| assigns contents |
(public member function)