std:: unexpect_t, std:: unexpect
From cppreference.net
C++
Utilities library
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
std::expected
| Member functions | ||||
| Observers | ||||
| Monadic operations | ||||
| Modifiers | ||||
| Non-member functions | ||||
| Helper classes | ||||
|
unexpect_t
unexpect
|
|
定義先ヘッダ
<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オブジェクトを構築する
(公開メンバ関数) |
|
|
インプレース構築タグ
(タグ) |