<charconv> (C++17)
cppreference.com
(C++17) |
std::to_chars std::from_chars () |
(C++17) |
std::from_chars () |
(C++17) |
std::to_chars () |
(C++17) |
() |
(C++17) |
() |
namespace std {
//
enum class chars_format {
scientific = /* */,
fixed = /* */,
hex = /* */,
general = fixed | scientific
};
//
struct to_chars_result { //
char* ptr;
errc ec;
friend bool operator==(const to_chars_result&, const to_chars_result&) = default;
constexpr explicit operator bool() const noexcept { return ec == errc{}; }
};
constexpr
//
to_chars_result to_chars(char* first, char* last,
/* */ value, int base = 10);
//
to_chars_result to_chars(char* first, char* last, bool value, int base = 10) = delete;
//
to_chars_result to_chars(char* first, char* last, /* */ value);
//
to_chars_result to_chars(char* first, char* last, /* */ value,
chars_format fmt);
//
to_chars_result to_chars(char* first, char* last, /* */ value,
chars_format fmt, int precision);
//
struct from_chars_result { //
const char* ptr;
errc ec;
friend bool operator==(const from_chars_result&, const from_chars_result&) = default;
constexpr explicit operator bool() const noexcept { return ec == errc{}; }
};
constexpr
//
from_chars_result from_chars(const char* first, const char* last,
/* */& value, int base = 10);
//
from_chars_result from_chars(const char* first, const char* last,
/* */& value,
chars_format fmt = chars_format::general);
}