CPP-AP 2.2.6
Command-line argument parser for C++20
Loading...
Searching...
No Matches
range.hpp File Reference

Defines the nargs::range class and it's builder functions. More...

#include <optional>
#include <ostream>

Go to the source code of this file.

Classes

class  ap::nargs::range
 Argument's number of values managing class. More...
 

Functions

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

Detailed Description

Defines the nargs::range class and it's builder functions.

Definition in file range.hpp.

Function Documentation

◆ any()

range ap::nargs::any ( )
inlinenoexcept

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

Returns
Built range class instance.

Definition at line 170 of file range.hpp.

◆ at_least()

range ap::nargs::at_least ( const range::count_type  n)
inlinenoexcept

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

Parameters
nThe lower bound.
Returns
Built range class instance.

Definition at line 135 of file range.hpp.

◆ less_than()

range ap::nargs::less_than ( const range::count_type  n)
inlinenoexcept

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

Parameters
nThe upper bound
Returns
Built range class instance.

Definition at line 153 of file range.hpp.

◆ more_than()

range ap::nargs::more_than ( const range::count_type  n)
inlinenoexcept

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

Parameters
nThe lower bound.
Returns
Built range class instance.

Definition at line 144 of file range.hpp.

◆ up_to()

range ap::nargs::up_to ( const range::count_type  n)
inlinenoexcept

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

Parameters
nThe upper bound
Returns
Built range class instance.

Definition at line 162 of file range.hpp.