Warning, /include/c++/v1/__cxx03/charconv is written in an unsupported language. File is not indexed.
0001 // -*- C++ -*-
0002 //===----------------------------------------------------------------------===//
0003 //
0004 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0005 // See https://llvm.org/LICENSE.txt for license information.
0006 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0007 //
0008 //===----------------------------------------------------------------------===//
0009
0010 #ifndef _LIBCPP___CXX03_CHARCONV
0011 #define _LIBCPP___CXX03_CHARCONV
0012
0013 /*
0014 charconv synopsis
0015
0016 namespace std {
0017
0018 // floating-point format for primitive numerical conversion
0019 enum class chars_format {
0020 scientific = unspecified,
0021 fixed = unspecified,
0022 hex = unspecified,
0023 general = fixed | scientific
0024 };
0025
0026 // 23.20.2, primitive numerical output conversion
0027 struct to_chars_result {
0028 char* ptr;
0029 errc ec;
0030 friend bool operator==(const to_chars_result&, const to_chars_result&) = default; // since C++20
0031 constexpr explicit operator bool() const noexcept { return ec == errc{}; } // since C++26
0032 };
0033
0034 constexpr to_chars_result to_chars(char* first, char* last, see below value,
0035 int base = 10); // constexpr since C++23
0036 to_chars_result to_chars(char* first, char* last, bool value,
0037 int base = 10) = delete;
0038
0039 to_chars_result to_chars(char* first, char* last, float value);
0040 to_chars_result to_chars(char* first, char* last, double value);
0041 to_chars_result to_chars(char* first, char* last, long double value);
0042
0043 to_chars_result to_chars(char* first, char* last, float value,
0044 chars_format fmt);
0045 to_chars_result to_chars(char* first, char* last, double value,
0046 chars_format fmt);
0047 to_chars_result to_chars(char* first, char* last, long double value,
0048 chars_format fmt);
0049
0050 to_chars_result to_chars(char* first, char* last, float value,
0051 chars_format fmt, int precision);
0052 to_chars_result to_chars(char* first, char* last, double value,
0053 chars_format fmt, int precision);
0054 to_chars_result to_chars(char* first, char* last, long double value,
0055 chars_format fmt, int precision);
0056
0057 // 23.20.3, primitive numerical input conversion
0058 struct from_chars_result {
0059 const char* ptr;
0060 errc ec;
0061 friend bool operator==(const from_chars_result&, const from_chars_result&) = default; // since C++20
0062 constexpr explicit operator bool() const noexcept { return ec == errc{}; } // since C++26
0063 };
0064
0065 constexpr from_chars_result from_chars(const char* first, const char* last,
0066 see below& value, int base = 10); // constexpr since C++23
0067
0068 } // namespace std
0069
0070 */
0071
0072 #include <__cxx03/__config>
0073
0074 #if _LIBCPP_STD_VER >= 17
0075 # include <__cxx03/__charconv/chars_format.h>
0076 # include <__cxx03/__charconv/from_chars_integral.h>
0077 # include <__cxx03/__charconv/from_chars_result.h>
0078 # include <__cxx03/__charconv/tables.h>
0079 # include <__cxx03/__charconv/to_chars.h>
0080 # include <__cxx03/__charconv/to_chars_base_10.h>
0081 # include <__cxx03/__charconv/to_chars_floating_point.h>
0082 # include <__cxx03/__charconv/to_chars_integral.h>
0083 # include <__cxx03/__charconv/to_chars_result.h>
0084 # include <__cxx03/__charconv/traits.h>
0085 #endif // _LIBCPP_STD_VER >= 17
0086
0087 #include <__cxx03/version>
0088
0089 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
0090 # pragma GCC system_header
0091 #endif
0092
0093 _LIBCPP_BEGIN_NAMESPACE_STD
0094
0095 _LIBCPP_END_NAMESPACE_STD
0096
0097 #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 14
0098 # include <__cxx03/cerrno>
0099 # include <__cxx03/cstddef>
0100 # include <__cxx03/initializer_list>
0101 # include <__cxx03/new>
0102 #endif
0103
0104 #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
0105 # include <__cxx03/cmath>
0106 # include <__cxx03/concepts>
0107 # include <__cxx03/cstdint>
0108 # include <__cxx03/cstdlib>
0109 # include <__cxx03/cstring>
0110 # include <__cxx03/iosfwd>
0111 # include <__cxx03/limits>
0112 # include <__cxx03/type_traits>
0113 #endif
0114
0115 #endif // _LIBCPP___CXX03_CHARCONV