class
scan_errorError class. Used as a return value for functions without a success value. Doesn't have a success state, and isn't default constructible: use expected<void, scan_
to achieve that.
Public types
Constructors, destructors, conversion operators
-
scan_error(code_
t c, const char* m) constexpr noexcept - Constructs an error with
c
andm
Public functions
Enum documentation
enum scn:: scan_error:: code
Error code.
Enumerators | |
---|---|
end_of_input |
Input ended unexpectedly. |
invalid_format_string |
Format string was invalid. Often a compile-time error, if supported or enabled. |
invalid_scanned_value |
Scanned value was invalid for given type, or a value of the given couldn't be scanned. |
invalid_literal |
Literal character specified in format string not found in source. |
invalid_fill |
Too many fill characters scanned, field precision (max width) exceeded. |
length_too_short |
Scanned field width was shorter than what was specified as the minimum field width. |
invalid_source_state |
Source range is in an invalid state, failed to continue reading. |
value_positive_overflow |
Value out of range, too large (higher than the maximum value) i.e. >2^32 for int32 |
value_negative_overflow |
Value out of range, too small (lower than the minimum value) i.e. <2^32 for int32 |
value_positive_underflow |
Value out of range, magnitude too small, sign + (between 0 and the smallest subnormal float) |
value_negative_underflow |
Value out of range, magnitude too small, sign - (between 0 and the smallest subnormal float) |
max_error |