std::unexpect_t, std::unexpect
From cppreference.com
| ヘッダ <expected> で定義 |
||
| struct unexpect_t { explicit unexpect_t() = default; }; |
(1) | (C++23から) |
| inline constexpr std::unexpect_t unexpect{}; |
(2) | (C++23から) |
1)
std::expected オブジェクトにおける予期しない値のインプレース構築のためのタグ型。2) 型 const std::unexpect_t の定数。通常、予期しない値を構築するために
std::expected のコンストラクタに直接渡されます。[編集] 注釈
他の構築タグ型と同様に、unexpect_t は明示的なデフォルトコンストラクタを持つ、トリビアルで空のクラスです。
[編集] 関連項目
expected オブジェクトを構築する(public member function) | |
| インプレース構築タグ (タグ) |