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

Passes the value through unchanged, but returns ErrorCode::duplicate_argument if the option has been seen more than once. 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 T>
auto operator() (ActionCtx< void > ctx, ActionResult< T > input) const -> ActionResult< T >

Static Public Attributes

template<class Prev>
static constexpr bool accepts_input

Detailed Description

Passes the value through unchanged, but returns ErrorCode::duplicate_argument if the option has been seen more than once.

This is a filter action (non-terminal); it must be followed by a terminal pack action.

Definition at line 1570 of file action.hh.

Member Typedef Documentation

◆ after_type

template<class Prev>
using cli::pack::RejectDuplicate::after_type = Prev

Definition at line 1576 of file action.hh.

◆ storage_type

template<class Prev>
using cli::pack::RejectDuplicate::storage_type = void

Definition at line 1579 of file action.hh.

Member Function Documentation

◆ operator()()

template<class T>
auto cli::pack::RejectDuplicate::operator() ( ActionCtx< void > ctx,
ActionResult< T > input ) const -> ActionResult< T >
inline

Definition at line 1582 of file action.hh.

Member Data Documentation

◆ accepts_input

template<class Prev>
bool cli::pack::RejectDuplicate::accepts_input
staticconstexpr
Initial value:
=
!std::same_as<detail::decay_t<Prev>, void>

Definition at line 1572 of file action.hh.


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