Namespaces
Variants
Actions

std::unexpect_t, std::unexpect

From cppreference.com
< cpp‎ | utility‎ | expected
 
C++
 
Utilities library
General utilities
Relational operators (deprecated in C++20)
 
std::expected
Defined in header <expected>
struct unexpect_t { explicit unexpect_t() = default; };
(1) (since C++23)
inline constexpr std::unexpect_t unexpect{};
(2) (since C++23)
1) A tag type for in-place construction of an unexpected value in an std::expected object.
2) A constant of type const std::unexpect_t which is usually directly passed to a constructor of std::expected to construct an unexpected value.

[edit] Notes

Like other construction tag types, unexpect_t is a trivial, empty class with an explicit default constructor.

[edit] See also

constructs the expected object
(public member function) [edit]
in-place construction tag
(tag)[edit]

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant