1#ifndef FASTFLOAT_PARSE_NUMBER_H
2#define FASTFLOAT_PARSE_NUMBER_H
11#include <system_error>
26 answer.
ec = std::errc();
27 bool minusSign =
false;
32 if (
last - first >= 3) {
34 answer.
ptr = (first += 3);
35 value = minusSign ? -std::numeric_limits<T>::quiet_NaN() : std::numeric_limits<T>::quiet_NaN();
37 if(first !=
last && *first ==
'(') {
38 for(
const char* ptr = first + 1; ptr !=
last; ++ptr) {
43 else if(!((
'a' <= *ptr && *ptr <=
'z') || (
'A' <= *ptr && *ptr <=
'Z') || (
'0' <= *ptr && *ptr <=
'9') || *ptr ==
'_'))
51 answer.
ptr = first + 8;
53 answer.
ptr = first + 3;
55 value = minusSign ? -std::numeric_limits<T>::infinity() : std::numeric_limits<T>::infinity();
59 answer.
ec = std::errc::invalid_argument;
75 static_assert (std::is_same<T, double>::value || std::is_same<T, float>::value,
"only float and double are supported");
80 answer.
ec = std::errc::invalid_argument;
88 answer.
ec = std::errc();
95 if (pns.
negative) { value = -value; }
106 if(am.
power2 < 0) { am = digit_comp<T>(pns, am); }
CONSTDATA date::last_spec last
from_chars_result parse_infnan(const char *first, const char *last, T &value) noexcept
from_chars_result from_chars(const char *first, const char *last, T &value, chars_format fmt=chars_format::general) noexcept
fastfloat_really_inline void to_float(bool negative, adjusted_mantissa am, T &value)
fastfloat_really_inline parsed_number_string parse_number_string(const char *p, const char *pend, parse_options options) noexcept
from_chars_result from_chars_advanced(const char *first, const char *last, T &value, parse_options options) noexcept
fastfloat_really_inline adjusted_mantissa compute_float(int64_t q, uint64_t w) noexcept
bool fastfloat_strncasecmp(const char *input1, const char *input2, size_t length)