std::expected<T,E>::error
来自cppreference.com
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 起) |
unexstd::move(unex )| 本节未完成 原因:暂无示例 |
| 如果有非预期值则返回它,否则返回另一个值 (公开成员函数) [编辑] | |
| 访问预期值 (公开成员函数) [编辑] | |
| 返回预期值 (公开成员函数) [编辑] | |
| 检查对象是否含有预期值 (公开成员函数) [编辑] |