A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://en.cppreference.com/w/cpp/algorithm/../ranges/../utility/optional/make_optional.html below:

std::make_optional - cppreference.com

(1) (since C++17) template< class T, class... Args >
constexpr std::optional<T> make_optional( Args&&... args );
(2) (since C++17) (3) (since C++17) [edit] Parameters value - the value to construct optional object with il, args - arguments to be passed to the constructor of T [edit] Return value

The constructed optional object.

[edit] Exceptions

Throws any exception thrown by the constructor of T.

[edit] Notes

T need not be movable for overloads (2,3) due to guaranteed copy elision.

[edit] Example

Possible output:

op1: a,b,c,
op2: 2,2,2,2,2,
op3: "hello world"
str: ""
[edit] See also

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4