diff --git a/libcxx/include/__charconv/chars_format.h b/libcxx/include/__charconv/chars_format.h --- a/libcxx/include/__charconv/chars_format.h +++ b/libcxx/include/__charconv/chars_format.h @@ -19,7 +19,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#ifndef _LIBCPP_CXX03_LANG +#if _LIBCPP_STD_VER > 14 enum class _LIBCPP_ENUM_VIS chars_format { @@ -70,7 +70,7 @@ return __x; } -#endif // _LIBCPP_CXX03_LANG +#endif // _LIBCPP_STD_VER > 14 _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__charconv/from_chars_result.h b/libcxx/include/__charconv/from_chars_result.h --- a/libcxx/include/__charconv/from_chars_result.h +++ b/libcxx/include/__charconv/from_chars_result.h @@ -19,7 +19,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#ifndef _LIBCPP_CXX03_LANG +#if _LIBCPP_STD_VER > 14 struct _LIBCPP_TYPE_VIS from_chars_result { @@ -30,7 +30,7 @@ # endif }; -#endif // _LIBCPP_CXX03_LANG +#endif // _LIBCPP_STD_VER > 14 _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__charconv/tables.h b/libcxx/include/__charconv/tables.h --- a/libcxx/include/__charconv/tables.h +++ b/libcxx/include/__charconv/tables.h @@ -19,7 +19,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#ifndef _LIBCPP_CXX03_LANG +#if _LIBCPP_STD_VER > 14 namespace __itoa { @@ -173,7 +173,7 @@ } // namespace __itoa -#endif // _LIBCPP_CXX03_LANG +#endif // _LIBCPP_STD_VER > 14 _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__charconv/to_chars_base_10.h b/libcxx/include/__charconv/to_chars_base_10.h --- a/libcxx/include/__charconv/to_chars_base_10.h +++ b/libcxx/include/__charconv/to_chars_base_10.h @@ -25,7 +25,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#ifndef _LIBCPP_CXX03_LANG +#if _LIBCPP_STD_VER > 14 namespace __itoa { @@ -176,7 +176,7 @@ # endif } // namespace __itoa -#endif // _LIBCPP_CXX03_LANG +#endif // _LIBCPP_STD_VER > 14 _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__charconv/to_chars_result.h b/libcxx/include/__charconv/to_chars_result.h --- a/libcxx/include/__charconv/to_chars_result.h +++ b/libcxx/include/__charconv/to_chars_result.h @@ -19,7 +19,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#ifndef _LIBCPP_CXX03_LANG +#if _LIBCPP_STD_VER > 14 struct _LIBCPP_TYPE_VIS to_chars_result { @@ -30,7 +30,7 @@ # endif }; -#endif // _LIBCPP_CXX03_LANG +#endif // _LIBCPP_STD_VER > 14 _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/charconv b/libcxx/include/charconv --- a/libcxx/include/charconv +++ b/libcxx/include/charconv @@ -110,7 +110,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#ifndef _LIBCPP_CXX03_LANG +#if _LIBCPP_STD_VER > 14 to_chars_result to_chars(char*, char*, bool, int = 10) = delete; from_chars_result from_chars(const char*, const char*, bool, int = 10) = delete; @@ -786,10 +786,6 @@ return __from_chars_integral(__first, __last, __value, __base); } -// Floating-point implementation starts here. -// Unlike the other parts of charconv this is only available in C++17 and newer. -#if _LIBCPP_STD_VER > 14 - _LIBCPP_AVAILABILITY_TO_CHARS_FLOATING_POINT _LIBCPP_FUNC_VIS to_chars_result to_chars(char* __first, char* __last, float __value); @@ -817,8 +813,7 @@ _LIBCPP_AVAILABILITY_TO_CHARS_FLOATING_POINT _LIBCPP_FUNC_VIS to_chars_result to_chars(char* __first, char* __last, long double __value, chars_format __fmt, int __precision); -# endif // _LIBCPP_STD_VER > 14 -#endif // _LIBCPP_CXX03_LANG +#endif // _LIBCPP_STD_VER > 14 _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/test/std/utilities/charconv/charconv.from.chars/integral.bool.fail.cpp b/libcxx/test/std/utilities/charconv/charconv.from.chars/integral.bool.fail.cpp --- a/libcxx/test/std/utilities/charconv/charconv.from.chars/integral.bool.fail.cpp +++ b/libcxx/test/std/utilities/charconv/charconv.from.chars/integral.bool.fail.cpp @@ -7,8 +7,9 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 -// UNSUPPORTED: !stdlib=libc++ && c++11 -// UNSUPPORTED: !stdlib=libc++ && c++14 +// TODO SHOULD BE UNSUPPORTED +// XFAIL: c++11, c++14 + // // In diff --git a/libcxx/test/std/utilities/charconv/charconv.from.chars/integral.pass.cpp b/libcxx/test/std/utilities/charconv/charconv.from.chars/integral.pass.cpp --- a/libcxx/test/std/utilities/charconv/charconv.from.chars/integral.pass.cpp +++ b/libcxx/test/std/utilities/charconv/charconv.from.chars/integral.pass.cpp @@ -7,8 +7,8 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 -// UNSUPPORTED: !stdlib=libc++ && c++11 -// UNSUPPORTED: !stdlib=libc++ && c++14 +// TODO SHOULD BE UNSUPPORTED +// XFAIL: c++11, c++14 // diff --git a/libcxx/test/std/utilities/charconv/charconv.from.chars/integral.roundtrip.pass.cpp b/libcxx/test/std/utilities/charconv/charconv.from.chars/integral.roundtrip.pass.cpp --- a/libcxx/test/std/utilities/charconv/charconv.from.chars/integral.roundtrip.pass.cpp +++ b/libcxx/test/std/utilities/charconv/charconv.from.chars/integral.roundtrip.pass.cpp @@ -7,8 +7,8 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 -// UNSUPPORTED: !stdlib=libc++ && c++11 -// UNSUPPORTED: !stdlib=libc++ && c++14 +// TODO SHOULD BE UNSUPPORTED +// XFAIL: c++11, c++14 // diff --git a/libcxx/test/std/utilities/charconv/charconv.syn/chars_format.pass.cpp b/libcxx/test/std/utilities/charconv/charconv.syn/chars_format.pass.cpp --- a/libcxx/test/std/utilities/charconv/charconv.syn/chars_format.pass.cpp +++ b/libcxx/test/std/utilities/charconv/charconv.syn/chars_format.pass.cpp @@ -10,6 +10,8 @@ // allowed in a constexpr function in C++11. To keep the code readable, C++11 // support is untested. // UNSUPPORTED: c++03, c++11 +// TODO SHOULD BE UNSUPPORTED +// XFAIL: c++14 // diff --git a/libcxx/test/std/utilities/charconv/charconv.to.chars/integral.bool.fail.cpp b/libcxx/test/std/utilities/charconv/charconv.to.chars/integral.bool.fail.cpp --- a/libcxx/test/std/utilities/charconv/charconv.to.chars/integral.bool.fail.cpp +++ b/libcxx/test/std/utilities/charconv/charconv.to.chars/integral.bool.fail.cpp @@ -7,8 +7,9 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 -// UNSUPPORTED: !stdlib=libc++ && c++11 -// UNSUPPORTED: !stdlib=libc++ && c++14 +// TODO SHOULD BE UNSUPPORTED +// XFAIL: c++11, c++14 + // // In diff --git a/libcxx/test/std/utilities/charconv/charconv.to.chars/integral.pass.cpp b/libcxx/test/std/utilities/charconv/charconv.to.chars/integral.pass.cpp --- a/libcxx/test/std/utilities/charconv/charconv.to.chars/integral.pass.cpp +++ b/libcxx/test/std/utilities/charconv/charconv.to.chars/integral.pass.cpp @@ -7,8 +7,8 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03 -// UNSUPPORTED: !stdlib=libc++ && c++11 -// UNSUPPORTED: !stdlib=libc++ && c++14 +// TODO SHOULD BE UNSUPPORTED +// XFAIL: c++11, c++14 // ADDITIONAL_COMPILE_FLAGS(has-fconstexpr-steps): -fconstexpr-steps=12712420 // ADDITIONAL_COMPILE_FLAGS(has-fconstexpr-ops-limit): -fconstexpr-ops-limit=12712420