std::expected<T,E>:: error
From cppreference.net
C++
Utilities library
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
std::expected
|
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() が true の場合、動作は未定義です。 |
(C++26まで) |
|
has_value() が true の場合: |
(C++26以降) |
戻り値
1,2)
unex
3,4)
std
::
move
(
unex
)
例
|
このセクションは不完全です
理由: 例がありません |
関連項目
|
予期しない値が存在する場合はそれを返し、それ以外の場合は別の値を返す
(public member function) |
|
|
期待される値にアクセスする
(public member function) |
|
|
期待される値を返す
(public member function) |
|
|
オブジェクトが期待される値を含むかどうかをチェックする
(public member function) |