TraceMaker
C++ API of the engine
Loading...
Searching...
No Matches
parse_double.hpp File Reference
#include <cerrno>
#include <cmath>
#include <cstdlib>
#include <optional>
#include <string>
#include <string_view>
#include <charconv>
#include <locale.h>

Go to the source code of this file.

Namespaces

namespace  tmk
namespace  tmk::detail

Functions

std::optional< double > tmk::detail::parse_double_strtod (std::string_view s)
 strtod_l with the "C" locale, restricted to the grammar of std::from_chars(chars_format::general): strtod also takes leading whitespace, '+' and hex, which from_chars does not.
std::optional< double > tmk::detail::parse_double_from_chars (std::string_view s)
std::optional< double > tmk::parse_double (std::string_view s)
 Parses all of s as a decimal floating-point number, independent of the C locale; nullopt if it is not one or a character is left over.