std::unexpe...td::unexpect(3)
π NAME π
okay so this page is about std::unexpect_t and std::unexpect, from the C++ Standard Libary (yes, the original header spells it βLibaryβ β we are keeping the typo energy π
). Itβs the tag-type-and-constant situation for making an std::expected hold an unexpected value, iykyk. π¦
β¨ Synopsis β¨
bestie, hereβs the exact declaration vibe check:
Defined in header <expected>
struct unexpect_t {
explicit unexpect_t() = default; (1) (since C++23)
};
inline constexpr unexpect_t unexpect{}; (2) (since C++23)
- A tag type for in-place construction of an unexpected value in an
std::expectedobject. π·οΈ - A constant of type
const std::unexpect_twhich is usually directly passed to a constructor ofstd::expectedto construct an unexpected value. π
π Notes π
Like other construction tag types, unexpect_t is a trivial, empty class with an explicit default constructor. No cap, thatβs literally the note. β¨
π¦ See also π¦
constructorβ constructs the expected object (public member function)in_place,in_place_type,in_place_indexβ in-place construction tagin_place_t,in_place_type_t,in_place_index_tβ (tag) (C++17)
and thatβs the whole page, bestie π«Ά. cute little sign-off: itβs sourced from http://cppreference.com, dated 2024.06.10, and the footer title is std::unexpe...td::unexpect(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