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

Appends the value to a std::vector<T>, rejecting duplicate values. More...

#include <action.hh>

Public Types

template<class Prev>
using after_type = void
template<class Prev>
using storage_type = std::vector<detail::decay_t<Prev>>

Public Member Functions

template<class T>
auto operator() (ActionCtx< std::vector< detail::decay_t< T > > > ctx, ActionResult< T > input) const -> ActionResult< void >

Static Public Attributes

template<class Prev>
static constexpr bool accepts_input

Detailed Description

Appends the value to a std::vector<T>, rejecting duplicate values.

Storage type: std::vector<T>. Returns ErrorCode::duplicate_argument if the same value is pushed more than once.

Definition at line 1630 of file action.hh.

Member Typedef Documentation

◆ after_type

template<class Prev>
using cli::pack::PushUnique::after_type = void

Definition at line 1636 of file action.hh.

◆ storage_type

template<class Prev>
using cli::pack::PushUnique::storage_type = std::vector<detail::decay_t<Prev>>

Definition at line 1639 of file action.hh.

Member Function Documentation

◆ operator()()

template<class T>
auto cli::pack::PushUnique::operator() ( ActionCtx< std::vector< detail::decay_t< T > > > ctx,
ActionResult< T > input ) const -> ActionResult< void >
inline

Definition at line 1642 of file action.hh.

Member Data Documentation

◆ accepts_input

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

Definition at line 1632 of file action.hh.


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