dconv 2.0
C++14 library for printing and parsing floating point numbers
Loading...
Searching...
No Matches
atod.hpp File Reference
#include <dconv/eisellemire.hpp>
#include <dconv/error.hpp>
#include <dconv/probe.hpp>
#include <type_traits>
#include <string_view>
#include <charconv>
#include <string>
#include <limits>
#include <cstring>
#include <cstdint>
#include <cstdlib>
#include <cerrno>
Include dependency graph for atod.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  dconv
 
namespace  dconv::details
 

Enumerations

enum class  dconv::AtodMode : uint32_t { dconv::Json = 0 , dconv::ParseNanAndInf = 1L << 0 , dconv::ParseRelaxedNumber = 1L << 1 , dconv::General = ParseNanAndInf | ParseRelaxedNumber }
 string to double conversion mode. More...
 

Functions

constexpr AtodMode dconv::operator& (AtodMode a, AtodMode b) noexcept
 perform binary AND on AtodMode.
 
constexpr AtodMode dconv::operator| (AtodMode a, AtodMode b) noexcept
 perform binary OR on AtodMode.
 
constexpr AtodMode dconv::operator^ (AtodMode a, AtodMode b) noexcept
 perform binary XOR on AtodMode.
 
constexpr AtodMode dconv::operator~ (AtodMode a) noexcept
 perform binary NOT on AtodMode.
 
constexpr const AtodMode & dconv::operator&= (AtodMode &a, AtodMode b) noexcept
 perform binary AND assignment on AtodMode.
 
constexpr const AtodMode & dconv::operator|= (AtodMode &a, AtodMode b) noexcept
 perform binary OR assignment on AtodMode.
 
constexpr const AtodMode & dconv::operator^= (AtodMode &a, AtodMode b) noexcept
 perform binary XOR assignment on AtodMode.
 
constexpr bool dconv::details::isDigit (char c) noexcept
 
constexpr bool dconv::details::isSign (char c) noexcept
 
template<typename Probe >
bool dconv::details::readExponent (Probe &probe, int64_t &exponent)
 read an optional exponent.
 
template<typename Probe , bool Relaxed>
DCONV_COLD bool dconv::details::atodLong (Probe &probe, bool negative, uint64_t significand, int64_t &scale, bool fraction, double &value, int pending=-1)
 continue a conversion whose significand has more than 19 digits.
 
template<typename Probe , AtodMode Mode>
Errc dconv::details::atodRelaxed (Probe &probe, double &value, uint64_t &significand, int64_t &exponent, bool &negative)
 string to double conversion in general format that stops on integers.
 
template<typename Probe , AtodMode Mode>
DCONV_COLD Errc dconv::details::atodRewind (Probe &probe, double &value, uint64_t &significand, int64_t &exponent, bool &negative)
 parse again a number the fast path does not handle.
 
template<typename Probe , AtodMode Mode = AtodMode::General, bool Rewind = std::is_same_v<Probe, StringProbe>>
Errc dconv::details::atod (Probe &probe, double &value, uint64_t &significand, int64_t &exponent, bool &negative)
 string to double conversion that stops on integers.
 
template<typename Probe , AtodMode Mode = AtodMode::General>
bool dconv::details::atod (Probe &probe, double &value)
 string to double conversion.
 
template<AtodMode Mode = AtodMode::General>
int dconv::atod (StreamProbe &probe, double &value, uint64_t &significand, int64_t &exponent, bool &negative, std::error_code &ec)
 stream to double conversion that stops on integers.
 
template<AtodMode Mode = AtodMode::General>
bool dconv::atod (StreamProbe &probe, double &value)
 stream to double conversion.
 
template<AtodMode Mode = AtodMode::General>
bool dconv::atod (std::istream &in, double &value)
 stream to double conversion.
 
template<AtodMode Mode = AtodMode::General>
int dconv::atod (StringProbe &probe, double &value, uint64_t &significand, int64_t &exponent, bool &negative, std::error_code &ec)
 string to double conversion that stops on integers.
 
template<AtodMode Mode = AtodMode::General>
bool dconv::atod (StringProbe &probe, double &value)
 string to double conversion.
 
template<AtodMode Mode = AtodMode::General>
const char * dconv::atod (const char *str, double &value)
 string to double conversion.
 
template<AtodMode Mode = AtodMode::General>
const char * dconv::atod (const char *str, size_t length, double &value)
 string to double conversion.
 
template<AtodMode Mode = AtodMode::General>
const char * dconv::atod (const char *first, const char *last, double &value)
 string to double conversion.
 
template<AtodMode Mode = AtodMode::General>
const char * dconv::atod (std::string_view str, double &value)
 string to double conversion.
 
template<AtodMode Mode = AtodMode::General>
const char * dconv::atod (std::string &&str, double &value)=delete
 string to double conversion from a temporary string.