[libcxx-commits] [PATCH] D107134: [libc++] Improve LIBCXX_ENABLE_INCOMPLETE_FEATURES.
Louis Dionne via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Jul 30 11:36:22 PDT 2021
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGd618a1cc5c39: [libc++] Improve LIBCXX_ENABLE_INCOMPLETE_FEATURES. (authored by Mordante, committed by ldionne).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D107134/new/
https://reviews.llvm.org/D107134
Files:
libcxx/include/format
libcxx/include/ranges
Index: libcxx/include/ranges
===================================================================
--- libcxx/include/ranges
+++ libcxx/include/ranges
@@ -170,6 +170,11 @@
*/
+// Make sure all feature tests macros are always available.
+#include <version>
+// Only enable the contents of the header when libc++ was build with LIBCXX_ENABLE_INCOMPLETE_FEATURES enabled
+#if !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+
#include <__config>
#include <__ranges/access.h>
#include <__ranges/all.h>
@@ -193,11 +198,6 @@
#include <initializer_list> // Required by the standard.
#include <iterator> // Required by the standard.
#include <type_traits>
-#include <version>
-
-#if defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
-# error "The Ranges library is not supported since libc++ has been configured with LIBCXX_ENABLE_INCOMPLETE_FEATURES disabled"
-#endif
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
@@ -216,4 +216,6 @@
_LIBCPP_POP_MACROS
+#endif // !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+
#endif // _LIBCPP_RANGES
Index: libcxx/include/format
===================================================================
--- libcxx/include/format
+++ libcxx/include/format
@@ -55,14 +55,14 @@
*/
+// Make sure all feature tests macros are always available.
+#include <version>
+// Only enable the contents of the header when libc++ was build with LIBCXX_ENABLE_INCOMPLETE_FEATURES enabled
+#if !defined(_LIBCPP_HAS_NO_INCOMPLETE_FORMAT)
+
#include <__config>
#include <__format/format_error.h>
#include <__format/format_parse_context.h>
-#include <version>
-
-#if defined(_LIBCPP_HAS_NO_INCOMPLETE_FORMAT)
-# error "The Format library is not supported since libc++ has been configured with LIBCXX_ENABLE_INCOMPLETE_FEATURES disabled"
-#endif
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
@@ -81,4 +81,6 @@
_LIBCPP_POP_MACROS
+#endif // !defined(_LIBCPP_HAS_NO_INCOMPLETE_FORMAT)
+
#endif // _LIBCPP_FORMAT
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D107134.363164.patch
Type: text/x-patch
Size: 2003 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210730/e6efe521/attachment.bin>
More information about the libcxx-commits
mailing list