diff --git a/libcxx/include/__availability b/libcxx/include/__availability --- a/libcxx/include/__availability +++ b/libcxx/include/__availability @@ -135,9 +135,6 @@ # define _LIBCPP_AVAILABILITY_FILESYSTEM_POP // # define _LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_filesystem - // This controls the availability of std::to_chars for integral arguments. -# define _LIBCPP_AVAILABILITY_TO_CHARS - // This controls the availability of floating-point std::to_chars functions. // These overloads were added later than the integer overloads. # define _LIBCPP_AVAILABILITY_TO_CHARS_FLOATING_POINT @@ -253,9 +250,6 @@ # define _LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_filesystem # endif -# define _LIBCPP_AVAILABILITY_TO_CHARS \ - _LIBCPP_AVAILABILITY_FILESYSTEM - # define _LIBCPP_AVAILABILITY_TO_CHARS_FLOATING_POINT \ __attribute__((unavailable)) diff --git a/libcxx/include/charconv b/libcxx/include/charconv --- a/libcxx/include/charconv +++ b/libcxx/include/charconv @@ -154,7 +154,6 @@ return __t - (__v < __pow10_64[__t]) + 1; } - _LIBCPP_AVAILABILITY_TO_CHARS static _LIBCPP_HIDE_FROM_ABI char* __convert(_Tp __v, char* __p) { return __base_10_u64(__v, __p); @@ -175,7 +174,6 @@ return __t - (__v < __pow10_32[__t]) + 1; } - _LIBCPP_AVAILABILITY_TO_CHARS static _LIBCPP_HIDE_FROM_ABI char* __convert(_Tp __v, char* __p) { return __base_10_u32(__v, __p); @@ -272,7 +270,6 @@ } template -_LIBCPP_AVAILABILITY_TO_CHARS inline _LIBCPP_HIDE_FROM_ABI to_chars_result __to_chars_itoa(char* __first, char* __last, _Tp __value, true_type) { @@ -287,7 +284,6 @@ } template -_LIBCPP_AVAILABILITY_TO_CHARS inline _LIBCPP_HIDE_FROM_ABI to_chars_result __to_chars_itoa(char* __first, char* __last, _Tp __value, false_type) { @@ -301,7 +297,6 @@ } template -_LIBCPP_AVAILABILITY_TO_CHARS inline _LIBCPP_HIDE_FROM_ABI to_chars_result __to_chars_integral(char* __first, char* __last, _Tp __value, int __base, true_type) @@ -508,7 +503,7 @@ } template -_LIBCPP_AVAILABILITY_TO_CHARS _LIBCPP_HIDE_FROM_ABI int +_LIBCPP_HIDE_FROM_ABI int __to_chars_integral_width(_Tp __value, unsigned __base) { _LIBCPP_ASSERT(__value >= 0, "The function requires a non-negative value."); @@ -535,7 +530,6 @@ } template -_LIBCPP_AVAILABILITY_TO_CHARS inline _LIBCPP_HIDE_FROM_ABI to_chars_result __to_chars_integral(char* __first, char* __last, _Tp __value, int __base, false_type) @@ -568,7 +562,6 @@ } template ::value, int>::type = 0> -_LIBCPP_AVAILABILITY_TO_CHARS inline _LIBCPP_HIDE_FROM_ABI to_chars_result to_chars(char* __first, char* __last, _Tp __value) { @@ -576,7 +569,6 @@ } template ::value, int>::type = 0> -_LIBCPP_AVAILABILITY_TO_CHARS inline _LIBCPP_HIDE_FROM_ABI to_chars_result to_chars(char* __first, char* __last, _Tp __value, int __base) { diff --git a/libcxx/test/libcxx/utilities/charconv/charconv.to.chars/availability.fail.cpp b/libcxx/test/libcxx/utilities/charconv/charconv.to.chars/availability.fail.cpp deleted file mode 100644 --- a/libcxx/test/libcxx/utilities/charconv/charconv.to.chars/availability.fail.cpp +++ /dev/null @@ -1,27 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -// UNSUPPORTED: c++03 -// REQUIRES: use_system_cxx_lib && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}} - -// Test the availability markup on std::to_chars. - -#include - -int main(int, char**) -{ - char buf[100]; - int int_value = 33; - long long_value = 33; - int base = 2; - std::to_chars(buf, buf + 100, int_value); // expected-error{{is unavailable: introduced in}} - std::to_chars(buf, buf + 100, int_value, base); // expected-error{{is unavailable: introduced in}} - - std::to_chars(buf, buf + 100, long_value); // expected-error{{is unavailable: introduced in}} - std::to_chars(buf, buf + 100, long_value, base); // expected-error{{is unavailable: introduced 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 @@ -10,10 +10,6 @@ // UNSUPPORTED: !stdlib=libc++ && c++11 // UNSUPPORTED: !stdlib=libc++ && c++14 -// to_chars requires functions in the dylib that were introduced in Mac OS 10.15. -// -// XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}} - // // to_chars_result to_chars(char* first, char* last, Integral value,