diff --git a/libcxx/include/__availability b/libcxx/include/__availability --- a/libcxx/include/__availability +++ b/libcxx/include/__availability @@ -138,6 +138,12 @@ // # define _LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_latch // # define _LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_semaphore + // This controls the availability of the C++20 format library. + // The library is in development and not ABI stable yet. Currently + // P2216 is aiming to be retroactively accepted in C++20. This paper + // contains ABI breaking changes. +# define _LIBCPP_AVAILABILITY_FORMAT + #elif defined(__APPLE__) # define _LIBCPP_AVAILABILITY_SHARED_MUTEX \ @@ -223,6 +229,12 @@ # define _LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_latch # define _LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_semaphore + // This controls the availability of the C++20 format library. + // The library is in development and not ABI stable yet. Currently + // P2216 is aiming to be retroactively accepted in C++20. This paper + // contains ABI breaking changes. +# define _LIBCPP_AVAILABILITY_FORMAT \ + __attribute__((unavailable)) #else // ...New vendors can add availability markup here... diff --git a/libcxx/include/__format/format_parse_context.h b/libcxx/include/__format/format_parse_context.h --- a/libcxx/include/__format/format_parse_context.h +++ b/libcxx/include/__format/format_parse_context.h @@ -33,7 +33,7 @@ !defined(_LIBCPP_HAS_NO_BUILTIN_IS_CONSTANT_EVALUATED) template -class _LIBCPP_TEMPLATE_VIS basic_format_parse_context { +class _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT basic_format_parse_context { public: using char_type = _CharT; using const_iterator = typename basic_string_view<_CharT>::const_iterator;