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

Variables

constexpr Nargs none {.min = 0, .max = 0}
 Accepts no values; used for boolean flags.
constexpr Nargs one {.min = 1, .max = 1}
 Accepts exactly one value.
constexpr Nargs zero_or_one {.min = 0, .max = 1}
 Accepts zero or one value.
constexpr Nargs zero_or_more {.min = 0, .max = -1}
 Accepts zero or more values.
constexpr Nargs one_or_more {.min = 1, .max = -1}
 Accepts one or more values.
template<int N>
constexpr Nargs exactly {.min = N, .max = N}
template<int Min, int Max>
constexpr Nargs between {.min = Min, .max = Max}

Variable Documentation

◆ between

template<int Min, int Max>
Nargs cli::nargs::between {.min = Min, .max = Max}
inlineconstexpr

Definition at line 65 of file argument_base.hh.

◆ exactly

template<int N>
Nargs cli::nargs::exactly {.min = N, .max = N}
inlineconstexpr

Definition at line 62 of file argument_base.hh.

◆ none

Nargs cli::nargs::none {.min = 0, .max = 0}
inlineconstexpr

Accepts no values; used for boolean flags.

{0, 0}

Definition at line 47 of file argument_base.hh.

◆ one

Nargs cli::nargs::one {.min = 1, .max = 1}
inlineconstexpr

Accepts exactly one value.

{1, 1}

Definition at line 50 of file argument_base.hh.

◆ one_or_more

Nargs cli::nargs::one_or_more {.min = 1, .max = -1}
inlineconstexpr

Accepts one or more values.

{1, -1}

Definition at line 59 of file argument_base.hh.

◆ zero_or_more

Nargs cli::nargs::zero_or_more {.min = 0, .max = -1}
inlineconstexpr

Accepts zero or more values.

{0, -1}

Definition at line 56 of file argument_base.hh.

◆ zero_or_one

Nargs cli::nargs::zero_or_one {.min = 0, .max = 1}
inlineconstexpr

Accepts zero or one value.

{0, 1}

Definition at line 53 of file argument_base.hh.