Status type used by pw::Optional<T> (pw::Result<T, pw::HasValue>) to indicate whether a value is present (ok() == true).
|
| constexpr | HasValue () noexcept=default |
| |
| constexpr | HasValue (Code code) noexcept |
| |
|
constexpr bool | ok () const noexcept |
| | Returns true if the status is the OK code.
|
| |
|
constexpr Code | code () const noexcept |
| | Returns the underlying status code.
|
| |
| constexpr bool | has_message () const noexcept |
| |
| constexpr Message | message () const noexcept |
| |
| constexpr void | Update (HasValue other) noexcept |
| |
|
constexpr void | IgnoreError () const noexcept |
| | Ignores any errors, suppressing unused-result warnings.
|
| |
| constexpr const char * | str () const |
| |
|
|
static constexpr Code | kEmpty = Code::kEmpty |
| |
|
static constexpr Code | kHasValue = Code::kHasValue |
| |
|
|
using | Code = decltype(kOkCode) |
| | The underlying status code type.
|
| |
|
constexpr | StatusBase () noexcept=default |
| | Defaults to kOkCode (ok() == true).
|
| |
|
constexpr | StatusBase (Code code) noexcept |
| | Explicitly construct from the underlying code.
|
| |
| constexpr | StatusBase (Code code, Message message) noexcept |
| |
|
constexpr | StatusBase (const StatusBase &)=default |
| |
|
constexpr | StatusBase (StatusBase &&)=default |
| |
|
constexpr StatusBase & | operator= (const StatusBase &)=default |
| |
|
constexpr StatusBase & | operator= (StatusBase &&)=default |
| |
◆ HasValue() [1/2]
| constexpr pw::HasValue::HasValue |
( |
| ) |
|
|
constexprdefaultnoexcept |
Constructs a HasValue status indicating that a value is present (ok() == true).
◆ HasValue() [2/2]
| constexpr pw::HasValue::HasValue |
( |
Code |
code | ) |
|
|
inlineexplicitconstexprnoexcept |
Explicitly constructs a HasValue status from HasValue::kEmpty or HasValue::kHasValue.
The documentation for this class was generated from the following file:
- pw_result/public/pw_result/result.h