std::experi...ke_optional(3)
π std::experi...ke_optional(3) π
okay bestie, welcome to the std::experi...ke_optional(3) page from the C++ Standard Libary manual. yes, that manual name is staying exactly like that, and yes, this helper is lowkey iconic. π¦
π NAME π
std::experimental::make_optional β std::experimental::make_optional. yep, same name on both sides, she's consistent like that π
β¨ Synopsis β¨
Defined in header <experimental/optional>
template< class T >
constexpr optional<typename std::decay<T>::type> (library
fundamentals TS)
make_optional( T&& value );
Creates an optional object from value. Effectively calls optional<typename std::decay<T>::type>(std::forward<T>(value)). no cap, that's the whole move πΈ
π«Ά Parameters π«Ά
valueβ the value to construct optional object with π
π Return value π
An optional object with value as the contained value. slay. β¨
π Exceptions π
Throws any exception thrown by the constructor of T. so if T's constructor gets dramatic, this function gets dramatic right back π
π See also π
- constructor β constructs the optional object (public member function) π
π Category π
- Noindexed pages π¦
source/version/date vibe check, bestie: http://cppreference.com β’ 2024.06.10 β’ std::experi...ke_optional(3) π«Άπ
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms