A compile-time pipeline of action functions applied sequentially to a parsed token.
More...
template<auto... Fns>
requires (requires { { std::remove_cvref_t<decltype(Fns)>::template accepts_input<void> } -> std::convertible_to<bool>; typename std::remove_cvref_t<decltype(Fns)>::template storage_type<void>; } && ...)
struct cli::Action< Fns >
A compile-time pipeline of action functions applied sequentially to a parsed token.
Each element of Fns must be a constexpr-constructible callable that:
- Exposes template<class I> static constexpr bool accepts_input — whether it can handle input of type I.
- Exposes template<class I> using after_type — the output type when given input I.
- Exposes template<class I> using storage_type — the argument storage type (non-void only for the last/terminal action in the pipeline).
Pipelines are composed with operator|:
At pipeline invocation, ignore short-circuits the remaining steps while error is passed through so downstream steps can preserve or react to it.
- Template Parameters
-
| Fns | Pack of constexpr action objects forming the pipeline. |
Definition at line 450 of file action.hh.