FreeBSD Manual Pages
std::experi...al::emplace(3) C++ Standard Libary std::experi...al::emplace(3) NAME std::experimental::optional::emplace - std::experimental::optional::em- place Synopsis template< class... Args > (library fundamentals TS) void emplace( Args&&... args ); template< class U, class... Args > void emplace( std::initializer_list<U> ilist, Args&&... (library fundamentals TS) args ); Constructs the contained value in-place. If *this already contains a value before the call, the contained value is destroyed by calling its destruc- tor. 1) Initializes the contained value by direct-initializing (but not direct-list-initializing) with std::forward<Args>(args)... as para- meters. 2) Initializes the contained value by calling its constructor with ilist, std::forward<Args>(args)... as parameters. This overload partici- pates in overload resolution only if std::is_constructible<T, std::initial- izer_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 excep- tion is thrown, *this does not contain a value after this call (the previously con- tained value, if any, had been destroyed). See also operator= assigns contents (public member function) http://cppreference.com 2022.07.31 std::experi...al::emplace(3)
NAME | Synopsis | Parameters | Type requirements | Return value | Exceptions | See also
Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=std::experimental::optional::emplace&sektion=3&manpath=FreeBSD+Ports+15.0>
