Argument's number of values managing class.
More...
#include <range.hpp>
|
| 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].
|
| |
Argument's number of values managing class.
Definition at line 27 of file range.hpp.
◆ range() [1/3]
| constexpr ap::nargs::range::range |
( |
| ) |
|
|
constexprdefault |
Default constructor: creates an unbound range.
◆ range() [2/3]
| constexpr ap::nargs::range::range |
( |
const count_type |
n | ) |
|
|
inlineexplicitconstexpr |
Exact count constructor: creates range [n, n].
- Parameters
-
Definition at line 36 of file range.hpp.
◆ range() [3/3]
Concrete range constructor: creates range [lower, upper].
- Parameters
-
| lower | The lower bound. |
| upper | The upper bound. |
Definition at line 43 of file range.hpp.
◆ has_explicit_lower_bound()
| constexpr bool ap::nargs::range::has_explicit_lower_bound |
( |
| ) |
const |
|
inlineconstexprnoexcept |
◆ has_explicit_upper_bound()
| constexpr bool ap::nargs::range::has_explicit_upper_bound |
( |
| ) |
const |
|
inlineconstexprnoexcept |
◆ is_exactly_bound()
| constexpr bool ap::nargs::range::is_exactly_bound |
( |
| ) |
const |
|
inlineconstexprnoexcept |
◆ is_explicitly_bound()
| constexpr bool ap::nargs::range::is_explicitly_bound |
( |
| ) |
const |
|
inlineconstexprnoexcept |
◆ operator==()
| constexpr bool ap::nargs::range::operator== |
( |
const range & |
other | ) |
const |
|
constexprdefault |
◆ any
range class builder function. Creates a range [0, inf].
- Returns
- Built
range class instance.
Definition at line 163 of file range.hpp.
◆ at_least
range class builder function. Creates a range [n, inf).
- Parameters
-
- Returns
- Built
range class instance.
Definition at line 128 of file range.hpp.
◆ less_than
range class builder function. Creates a range [0, n - 1].
- Parameters
-
- Returns
- Built
range class instance.
Definition at line 146 of file range.hpp.
◆ more_than
range class builder function. Creates a range [n + 1, inf).
- Parameters
-
- Returns
- Built
range class instance.
Definition at line 137 of file range.hpp.
◆ operator<<
| std::ostream & operator<< |
( |
std::ostream & |
os, |
|
|
const range & |
r |
|
) |
| |
|
friend |
◆ operator<=>
| constexpr std::weak_ordering operator<=> |
( |
const count_type |
n, |
|
|
const range & |
r |
|
) |
| |
|
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.
- Parameters
-
| n | The value count to order. |
- Returns
- Ordering relationship between the count and the range.
Definition at line 80 of file range.hpp.
◆ up_to
range class builder function. Creates a range [0, n].
- Parameters
-
- Returns
- Built
range class instance.
Definition at line 155 of file range.hpp.
◆ _lower_bound
◆ _upper_bound
The documentation for this class was generated from the following file: