11namespace hi::inline v1 {
19template<std::
integral T>
27 hilet[new_last, ec] = std::to_chars(first, last, value);
41template<std::
floating_po
int T>
49 hilet[new_last, ec] = std::to_chars(first, last, value, std::chars_format::general);
65template<std::
integral T>
66[[nodiscard]] T from_string(std::string_view str,
int base = 10)
70 hilet first = str.data();
71 hilet last = first + ssize(str);
73 hilet[new_last, ec] = std::from_chars(first, last, value, base);
74 if (ec !=
std::errc{} or new_last != last) {
75 throw parse_error(
"Can not convert string to integer");
88template<std::
floating_po
int T>
89[[nodiscard]] T from_string(std::string_view str)
93 hilet first = str.data();
94 hilet last = first + ssize(str);
96 hilet[new_last, ec] = std::from_chars(first, last, value);
97 if (ec !=
std::errc{} or new_last != last) {
98 throw parse_error(
"Can not convert string to floating point");
This file includes required definitions.
#define hilet
Invariant should be the default for variables.
Definition required.hpp:23
T back_inserter(T... args)