4#ifndef TETL_CHARCONV_FROM_CHARS_HPP
5#define TETL_CHARCONV_FROM_CHARS_HPP
7#include <etl/_concepts/integral.hpp>
8#include <etl/_concepts/same_as.hpp>
9#include <etl/_cstddef/size_t.hpp>
10#include <etl/_strings/to_integer.hpp>
11#include <etl/_system_error/errc.hpp>
17 char const*
ptr{
nullptr};
34template <integral Int>
35 requires(
not same_as<Int,
bool>)
36[[nodiscard]]
constexpr auto from_chars(
char const* first,
char const* last, Int& value,
int base = 10)
40 auto const [end, err, val] =
strings::to_integer<Int, options>({first, last},
static_cast<Int>(base));
to_integer_error
Definition to_integer.hpp:84
Definition adjacent_find.hpp:9
constexpr auto from_chars(char const *first, char const *last, Int &value, int base=10) -> from_chars_result
Analyzes the character sequence [first,last) for a pattern described below. If no characters match th...
Definition from_chars.hpp:36
errc
The scoped enumeration etl::errc defines the values of portable error conditions.
Definition errc.hpp:14
Primitive numerical input conversion.
Definition from_chars.hpp:16
friend auto operator==(from_chars_result const &, from_chars_result const &) -> bool=default
etl::errc ec
Definition from_chars.hpp:18
char const * ptr
Definition from_chars.hpp:17
constexpr operator bool() const noexcept
Definition from_chars.hpp:20
Definition to_integer.hpp:79
bool check_overflow
Definition to_integer.hpp:81
bool skip_whitespace
Definition to_integer.hpp:80