Standard library header <charconv> (C++17)
From cppreference.net
C++
Standard library headers
Dieser Header ist Teil der Textverarbeitungsbibliothek .
Klassen |
|
|
(C++17)
|
spezifiziert die Formatierung für
std::to_chars
und
std::from_chars
(Enumeration) |
|
(C++17)
|
der Rückgabetyp von
std::from_chars
(Klasse) |
|
(C++17)
|
der Rückgabetyp von
std::to_chars
(Klasse) |
Funktionen |
|
|
(C++17)
|
konvertiert eine Zeichenfolge in einen Integer- oder Gleitkommawert
(Funktion) |
|
(C++17)
|
konvertiert einen Integer- oder Gleitkommawert in eine Zeichenfolge
(Funktion) |
Übersicht
namespace std { // Gleitkommaformat für primitive numerische Konvertierung enum class chars_format { scientific = /* unspecified */, fixed = /* unspecified */, hex = /* unspecified */, general = fixed | scientific }; // Primitive numerische Ausgabekonvertierung struct to_chars_result { // freestanding 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, // freestanding /* integer-type */ value, int base = 10); to_chars_result to_chars(char* first, char* last, // freestanding bool value, int base = 10) = delete; to_chars_result to_chars(char* first, char* last, // freestanding-deleted /* floating-point-type */ value); to_chars_result to_chars(char* first, char* last, // freestanding-deleted /* floating-point-type */ value, chars_format fmt); to_chars_result to_chars(char* first, char* last, // freestanding-deleted /* floating-point-type */ value, chars_format fmt, int precision); // Primitive numerische Eingabekonvertierung struct from_chars_result { // freestanding 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, // freestanding const char* last, /* integer-type */& value, int base = 10); from_chars_result from_chars(const char* first, // freestanding-deleted const char* last, /* floating-point-type */& value, chars_format fmt = chars_format::general); }