std::expected<T,E>::error
ja.cppreference.net より
constexpr const E& error() const& noexcept;
|
(1) | (C++23 から) |
constexpr E& error() & noexcept;
|
(2) | (C++23 から) |
constexpr const E&& error() const&& noexcept;
|
(3) | (C++23 から) |
constexpr E&& error() && noexcept;
|
(4) | (C++23 から) |
格納されている予期しない値にアクセスします。*this
|
もし has_value() が |
(C++26 まで) |
|
もし has_value() が |
(C++26 から) |
戻り値
1,2)
unex
3,4)
std
::
move
(
unex
)
例
|
このセクションは不完全です
理由: 例がありません |
関連項目
|
予期しない値が存在する場合はそれを返し、それ以外の場合は別の値を返す
(public member function) |
|
|
期待される値にアクセスする
(public member function) |
|
|
期待される値を返す
(public member function) |
|
|
オブジェクトが期待される値を含むかどうかをチェックする
(public member function) |