|
cli20 0.1.2
A C++20 typed-schema command-line parser
|
Validates a value using a user-supplied compile-time predicate. More...
#include <action.hh>
Public Types | |
| template<class Prev> | |
| using | after_type = Prev |
| template<class Prev> | |
| using | storage_type = void |
Public Member Functions | |
| template<class U> | |
| auto | operator() (ActionCtx< void > ctx, ActionResult< U > input) const -> ActionResult< U > |
Static Public Attributes | |
| template<class Prev> | |
| static constexpr bool | accepts_input |
Validates a value using a user-supplied compile-time predicate.
Pred must be a constexpr callable of the form (const T&) -> bool. Returns ErrorCode::validation_failed when Pred returns false.
| Pred | A constexpr callable acting as the validation predicate. |
| using cli::validation::Predicate< Pred >::after_type = Prev |
| using cli::validation::Predicate< Pred >::storage_type = void |
|
inline |
|
staticconstexpr |