Daniel Lemire's blog

, 1 min read

Comparing strtod with from_chars (GCC 12)

2 thoughts on “Comparing strtod with from_chars (GCC 12)”

  1. Anupam Kapoor says:

    have a trivial question: if the entire range needs to be parsed, shouldn’t the check be ‘p != st.data() + st.size()’ for an error condition ? thereby ensuring that all characters in the range were used ?

    1. If the entire string is matched, it does not mean that there was an error.