[libcxx-commits] [PATCH] D102705: [libc++][format] Adds availability macros for std::format.
Mark de Wever via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed May 26 08:54:49 PDT 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rG963495f0d4b5: [libc++][format] Adds availability macros for std::format. (authored by Mordante).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102705/new/
https://reviews.llvm.org/D102705
Files:
libcxx/include/__availability
libcxx/include/__format/format_parse_context.h
libcxx/include/version
libcxx/utils/generate_feature_test_macro_components.py
Index: libcxx/utils/generate_feature_test_macro_components.py
===================================================================
--- libcxx/utils/generate_feature_test_macro_components.py
+++ libcxx/utils/generate_feature_test_macro_components.py
@@ -300,6 +300,8 @@
"name": "__cpp_lib_format",
"values": { "c++20": 201907 },
"headers": ["format"],
+ "test_suite_guard": "!defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_format)",
+ "libcxx_guard": "!defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_format)",
"unimplemented": True,
}, {
"name": "__cpp_lib_gcd_lcm",
Index: libcxx/include/version
===================================================================
--- libcxx/include/version
+++ libcxx/include/version
@@ -319,7 +319,9 @@
# define __cpp_lib_erase_if 202002L
# undef __cpp_lib_execution
// # define __cpp_lib_execution 201902L
-// # define __cpp_lib_format 201907L
+# if !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_format)
+// # define __cpp_lib_format 201907L
+# endif
# define __cpp_lib_generic_unordered_lookup 201811L
# define __cpp_lib_int_pow2 202002L
# if !defined(_LIBCPP_HAS_NO_CONCEPTS)
Index: libcxx/include/__format/format_parse_context.h
===================================================================
--- libcxx/include/__format/format_parse_context.h
+++ libcxx/include/__format/format_parse_context.h
@@ -33,7 +33,7 @@
!defined(_LIBCPP_HAS_NO_BUILTIN_IS_CONSTANT_EVALUATED)
template <class _CharT>
-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;
Index: libcxx/include/__availability
===================================================================
--- libcxx/include/__availability
+++ libcxx/include/__availability
@@ -138,6 +138,13 @@
// # 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
+// # define _LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_format
+
#elif defined(__APPLE__)
# define _LIBCPP_AVAILABILITY_SHARED_MUTEX \
@@ -223,6 +230,13 @@
# 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))
+# define _LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_format
#else
// ...New vendors can add availability markup here...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102705.347986.patch
Type: text/x-patch
Size: 3358 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210526/df33f0bc/attachment-0001.bin>
More information about the libcxx-commits
mailing list