std::experimental::optional<T>::emplace (3) - Linux Manuals
std::experimental::optional<T>::emplace: std::experimental::optional<T>::emplace
Command to display std::experimental::optional<T>::emplace
manual in Linux: $ man 3 std::experimental::optional<T>::emplace
NAME
std::experimental::optional<T>::emplace - std::experimental::optional<T>::emplace
Synopsis
template< class... Args > (library fundamentals TS)
void emplace( Args&&... args );
template< class U, class... Args > (library fundamentals TS)
void 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.
1) Initializes the contained value by direct-initializing (but not direct-list-initializing) with std::forward<Args>(args)... as parameters.
2) Initializes the contained value by calling its constructor with ilist, std::forward<Args>(args)... as parameters. This overload only participates in overload resolution if std::is_constructible<T, std::initializer_list<U>&, Args&&...>::value is true.
Parameters
args... - the arguments to pass to the constructor
ilist - the initializer list to pass to the constructor
Type requirements
-
T must be constructible from Args...
-
T must be constructible from std::initializer_list and Args...
Return value
(none)
Exceptions
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).
See also
assigns contents
operator= (public member function)
Pages related to std::experimental::optional<T>::emplace
- std::experimental::optional<T>::operator->,std::experimental::optional<T>::operator* (3) - std::experimental::optional<T>::operator->,std::experimental::optional<T>::operator*
- std::experimental::optional<T>::operator= (3) - std::experimental::optional<T>::operator=
- std::experimental::optional<T>::operatorbool (3) - std::experimental::optional<T>::operatorbool
- std::experimental::optional<T>::optional (3) - std::experimental::optional<T>::optional
- std::experimental::optional<T>::swap (3) - std::experimental::optional<T>::swap
- std::experimental::optional<T>::value (3) - std::experimental::optional<T>::value
- std::experimental::optional<T>::value_or (3) - std::experimental::optional<T>::value_or
- std::experimental::optional<T>::~optional (3) - std::experimental::optional<T>::~optional
- std::experimental::optional (3) - std::experimental::optional
- std::experimental::observer_ptr (3) - std::experimental::observer_ptr
- std::experimental::observer_ptr<W>::get (3) - std::experimental::observer_ptr<W>::get
- std::experimental::observer_ptr<W>::observer_ptr (3) - std::experimental::observer_ptr<W>::observer_ptr
- std::experimental::observer_ptr<W>::operator*, (3) - std::experimental::observer_ptr<W>::operator*,
- std::experimental::observer_ptr<W>::operator*,std::experimental::observer_ptr<W>::operator-> (3) - std::experimental::observer_ptr<W>::operator*,std::experimental::observer_ptr<W>::operator->
- std::experimental::observer_ptr<W>::operatorbool (3) - std::experimental::observer_ptr<W>::operatorbool
- std::experimental::observer_ptr<W>::operatorelement_type* (3) - std::experimental::observer_ptr<W>::operatorelement_type*
- std::experimental::observer_ptr<W>::release (3) - std::experimental::observer_ptr<W>::release
- std::experimental::observer_ptr<W>::reset (3) - std::experimental::observer_ptr<W>::reset
- std::experimental::observer_ptr<W>::swap (3) - std::experimental::observer_ptr<W>::swap
- std::experimental::ostream_joiner (3) - std::experimental::ostream_joiner
- std::experimental::ostream_joiner<DelimT,CharT,Traits>::operator++ (3) - std::experimental::ostream_joiner<DelimT,CharT,Traits>::operator++
- std::experimental::ostream_joiner<DelimT,CharT,Traits>::operator= (3) - std::experimental::ostream_joiner<DelimT,CharT,Traits>::operator=
- std::experimental::ostream_joiner<DelimT,CharT,Traits>::ostream_joiner (3) - std::experimental::ostream_joiner<DelimT,CharT,Traits>::ostream_joiner
- std::experimental::overaligned_tag,std::experimental::overaligned (3) - std::experimental::overaligned_tag,std::experimental::overaligned