18template<std::
integral T>
23 ttlet first = buffer.
data();
24 ttlet last = first + std::size(buffer);
26 ttlet[new_last, ec] = std::to_chars(first, last, value);
40template<std::
floating_po
int T>
45 ttlet first = buffer.
data();
46 ttlet last = first + std::size(buffer);
48 ttlet[new_last, ec] = std::to_chars(first, last, value, std::chars_format::general);
64template<std::
integral T>
65[[nodiscard]] T from_string(std::string_view str,
int base = 10)
69 ttlet first = str.data();
70 ttlet last = first + std::ssize(str);
72 ttlet[new_last, ec] = std::from_chars(first, last, value, base);
73 if (ec !=
std::errc{} or new_last != last) {
74 throw parse_error(
"Can not convert string to integer");
87template<std::
floating_po
int T>
88[[nodiscard]] T from_string(std::string_view str)
92 ttlet first = str.data();
93 ttlet last = first + std::ssize(str);
95 ttlet[new_last, ec] = std::from_chars(first, last, value);
96 if (ec !=
std::errc{} or new_last != last) {
97 throw parse_error(
"Can not convert string to floating point");
T back_inserter(T... args)