![]() |
CPP-ARGON 4.0.1
Command-Line Argument Parser for C++20
|
Argument's number of values managing class. More...
#include <range.hpp>
Public Member Functions | |
| constexpr | range ()=default |
| Default constructor: creates an unbound range. | |
| constexpr | range (const count_type n) |
| Exact count constructor: creates range [n, n]. | |
| constexpr | range (const count_type lower, const count_type upper) |
| Concrete range constructor: creates range [lower, upper]. | |
| constexpr bool | has_explicit_lower_bound () const noexcept |
| constexpr bool | has_explicit_upper_bound () const noexcept |
| constexpr bool | is_explicitly_bound () const noexcept |
| constexpr bool | is_exactly_bound () const noexcept |
| constexpr bool | operator== (const range &other) const =default |
Private Attributes | |
| count_type | _lower_bound = min_bound |
| count_type | _upper_bound = max_bound |
Friends | |
| constexpr std::weak_ordering | operator<=> (const count_type n, const range &r) noexcept |
| Determines the ordering of the count against a range instance. | |
| std::ostream & | operator<< (std::ostream &os, const range &r) noexcept |
| constexpr range | at_least (const count_type) noexcept |
range class builder function. Creates a range [n, inf). | |
| constexpr range | more_than (const count_type) noexcept |
range class builder function. Creates a range [n + 1, inf). | |
| constexpr range | less_than (const count_type) noexcept |
range class builder function. Creates a range [0, n - 1]. | |
| constexpr range | up_to (const count_type) noexcept |
range class builder function. Creates a range [0, n]. | |
| constexpr range | any () noexcept |
range class builder function. Creates a range [0, inf]. | |
|
constexprdefault |
Default constructor: creates an unbound range.
|
inlineexplicitconstexpr |
|
inlineconstexpr |
|
friend |
|
friend |
|
friend |
Determines the ordering of the count against a range instance.
For a [lower, upper] range and the count n the returned value is:
less if n < lower,equivalent if n >= lower and n <= upper,greater if n > upper.| n | The value count to order. |
|
friend |
|
private |
|
private |