cli20 0.1.2
A C++20 typed-schema command-line parser
Loading...
Searching...
No Matches
cli::action::PrintHelp Struct Reference

Wraps the current value in a HelpRequested<T> sentinel type. More...

#include <action.hh>

Public Types

template<class Prev>
using after_type = detail::HelpRequested<Prev>
template<class Prev>
using storage_type = void

Public Member Functions

template<class Arg, class T>
auto operator() (ActionCtx< Arg >, ActionResult< T > input) const -> ActionResult< after_type< T > >

Static Public Attributes

template<class Prev>
static constexpr bool accepts_input = true

Detailed Description

Wraps the current value in a HelpRequested<T> sentinel type.

When ExitSuccess follows this action, it detects the HelpRequested wrapper and emits ErrorCode::help_requested (which instructs the parser to print help and exit 0).

Definition at line 1946 of file action.hh.

Member Typedef Documentation

◆ after_type

template<class Prev>
using cli::action::PrintHelp::after_type = detail::HelpRequested<Prev>

Definition at line 1951 of file action.hh.

◆ storage_type

template<class Prev>
using cli::action::PrintHelp::storage_type = void

Definition at line 1954 of file action.hh.

Member Function Documentation

◆ operator()()

template<class Arg, class T>
auto cli::action::PrintHelp::operator() ( ActionCtx< Arg > ,
ActionResult< T > input ) const -> ActionResult< after_type< T > >
inline

Definition at line 1957 of file action.hh.

Member Data Documentation

◆ accepts_input

template<class Prev>
bool cli::action::PrintHelp::accepts_input = true
staticconstexpr

Definition at line 1948 of file action.hh.


The documentation for this struct was generated from the following file: