|
cli20 0.1.2
A C++20 typed-schema command-line parser
|
Specialisation of ActionResult for terminal (pack) actions that produce no value. More...
#include <action.hh>
Public Types | |
| enum class | State : std::uint8_t { ok , error , ignore } |
| using | value_type = void |
Public Member Functions | |
| constexpr | operator bool () const noexcept |
| Returns true when the result represents success. | |
| constexpr auto | have_value () const noexcept -> bool |
| Returns true when the result represents success. | |
| constexpr auto | has_value () const noexcept -> bool |
| Returns true when the result represents success. | |
| constexpr auto | has_error () const noexcept -> bool |
| Returns true when the result represents failure. | |
| constexpr auto | is_ignored () const noexcept -> bool |
| Returns true when the result represents an ignored step. | |
Static Public Member Functions | |
| static constexpr auto | ok () -> ActionResult< void > |
| Creates a success result. | |
| static constexpr auto | fail (ParseError e) -> ActionResult< void > |
| Creates a failure result carrying error. | |
| static constexpr auto | ignore () -> ActionResult< void > |
| Creates an ignore result. | |
Public Attributes | |
| State | state {State::ok} |
| ParseError | error {} |
| void | value |
Specialisation of ActionResult for terminal (pack) actions that produce no value.
Pack actions such as SetTrue or Push write their result directly into the argument storage referenced by ActionCtx::arg; they do not pass a value downstream, so ActionResult<void> carries only an error, success, or ignore state.
| using cli::ActionResult< void >::value_type = void |
|
strong |
|
inlinestaticnodiscardconstexpr |
Creates a failure result carrying error.
| e | The error to store. |
|
inlinenodiscardconstexprnoexcept |
|
inlinenodiscardconstexprnoexcept |
|
inlinenodiscardconstexprnoexcept |
|
inlinestaticnodiscardconstexpr |
Creates an ignore result.
|
inlinenodiscardconstexprnoexcept |
|
inlinestaticnodiscardconstexpr |
Creates a success result.
|
inlineexplicitnodiscardconstexprnoexcept |
| ParseError cli::ActionResult< void >::error {} |
| State cli::ActionResult< void >::state {State::ok} |
| void cli::ActionResult< void >::value |