The result type returned by a constraints() post-parse hook.
More...
#include <constraint.hh>
The result type returned by a constraints() post-parse hook.
Supports short-circuit composition with && (fail-fast AND) and || (first-success OR):
}
auto at_most_one_of(const Args &... args) -> ConstraintResult
At most one of the listed options may be provided.
auto requires_if(const Cond &condition, const Req &required) -> ConstraintResult
If condition is provided, required must also be provided.
The result type returned by a constraints() post-parse hook.
Factory methods:
Definition at line 29 of file constraint.hh.
◆ fail()
◆ ok()
| auto cli::ConstraintResult::ok |
( |
| ) |
const -> bool |
|
inlinenodiscardnoexcept |
◆ operator bool()
| cli::ConstraintResult::operator bool |
( |
| ) |
const |
|
inlineexplicitnodiscardnoexcept |
◆ pass()
◆ operator&&
◆ operator||
◆ error
| std::optional<ParseError> cli::ConstraintResult::error |
The documentation for this struct was generated from the following file: