cli20 0.1.2
A C++20 typed-schema command-line parser
Loading...
Searching...
No Matches
cli::validation::Range< MinValue, MaxValue > Struct Template Reference

Validates that the input value is within the closed interval [MinValue, MaxValue]. 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

Detailed Description

template<auto MinValue, auto MaxValue>
requires std::is_same_v<decltype(MinValue), decltype(MaxValue)>
struct cli::validation::Range< MinValue, MaxValue >

Validates that the input value is within the closed interval [MinValue, MaxValue].

Template Parameters
MinValueInclusive lower bound.
MaxValueInclusive upper bound. Must be the same type as MinValue.

Definition at line 1117 of file action.hh.

Member Typedef Documentation

◆ after_type

template<auto MinValue, auto MaxValue>
template<class Prev>
using cli::validation::Range< MinValue, MaxValue >::after_type = Prev

Definition at line 1123 of file action.hh.

◆ storage_type

template<auto MinValue, auto MaxValue>
template<class Prev>
using cli::validation::Range< MinValue, MaxValue >::storage_type = void

Definition at line 1126 of file action.hh.

Member Function Documentation

◆ operator()()

template<auto MinValue, auto MaxValue>
template<class U>
auto cli::validation::Range< MinValue, MaxValue >::operator() ( ActionCtx< void > ctx,
ActionResult< U > input ) const -> ActionResult< U >
inline

Definition at line 1129 of file action.hh.

Member Data Documentation

◆ accepts_input

template<auto MinValue, auto MaxValue>
template<class Prev>
bool cli::validation::Range< MinValue, MaxValue >::accepts_input
staticconstexpr
Initial value:
=
std::totally_ordered<std::remove_cvref_t<Prev>>

Definition at line 1119 of file action.hh.


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