Parses the range [begin, end) as an unsigned integer.]
Declared in <mp-units/utility/format.h>
template<std::forward_iterator It>
[[nodiscard]]
constexpr
int
parse_nonnegative_int(
It& begin,
It end,
int error_value);
The range must be non-empty and start with a digit.
the parsed integer, or error_value on overflow
The return value should not be discarded.
| Name | Description |
|---|---|
| begin | the beginning of the range to parse; advanced past the parsed digits |
| end | the end of the range to parse |
| error_value | the value to return if the parsed integer overflows int |