CPP-AP 3.0.1
Command-line argument parser for C++20
Loading...
Searching...
No Matches
ap::nargs Namespace Reference

Classes

class  range
 Argument's number of values managing class. More...
 

Typedefs

using count_type = std::size_t
 

Functions

constexpr range at_least (const count_type n) noexcept
 range class builder function. Creates a range [n, inf).
 
constexpr range more_than (const count_type n) noexcept
 range class builder function. Creates a range [n + 1, inf).
 
constexpr range less_than (const count_type n) noexcept
 range class builder function. Creates a range [0, n - 1].
 
constexpr range up_to (const count_type n) noexcept
 range class builder function. Creates a range [0, n].
 
constexpr range any () noexcept
 range class builder function. Creates a range [0, inf].
 

Variables

constexpr count_type min_bound = std::numeric_limits<count_type>::min()
 The minimum bound for the nargs::range class.
 
constexpr count_type max_bound = std::numeric_limits<count_type>::max()
 The maximum bound for the nargs::range class.
 

Typedef Documentation

◆ count_type

using ap::nargs::count_type = typedef std::size_t

Definition at line 18 of file range.hpp.

Function Documentation

◆ any()

constexpr range ap::nargs::any ( )
constexprnoexcept

range class builder function. Creates a range [0, inf].

Returns
Built range class instance.

Definition at line 163 of file range.hpp.

◆ at_least()

constexpr range ap::nargs::at_least ( const count_type  n)
constexprnoexcept

range class builder function. Creates a range [n, inf).

Parameters
nThe lower bound.
Returns
Built range class instance.
Examples
/home/runner/work/cpp-ap/cpp-ap/include/ap/argument_parser.hpp.

Definition at line 128 of file range.hpp.

◆ less_than()

constexpr range ap::nargs::less_than ( const count_type  n)
constexprnoexcept

range class builder function. Creates a range [0, n - 1].

Parameters
nThe upper bound
Returns
Built range class instance.

Definition at line 146 of file range.hpp.

◆ more_than()

constexpr range ap::nargs::more_than ( const count_type  n)
constexprnoexcept

range class builder function. Creates a range [n + 1, inf).

Parameters
nThe lower bound.
Returns
Built range class instance.

Definition at line 137 of file range.hpp.

◆ up_to()

constexpr range ap::nargs::up_to ( const count_type  n)
constexprnoexcept

range class builder function. Creates a range [0, n].

Parameters
nThe upper bound
Returns
Built range class instance.

Definition at line 155 of file range.hpp.

Variable Documentation

◆ max_bound

constexpr count_type ap::nargs::max_bound = std::numeric_limits<count_type>::max()
constexpr

The maximum bound for the nargs::range class.

Definition at line 24 of file range.hpp.

◆ min_bound

constexpr count_type ap::nargs::min_bound = std::numeric_limits<count_type>::min()
constexpr

The minimum bound for the nargs::range class.

Definition at line 21 of file range.hpp.