[libcxx-commits] [PATCH] D99089: [libc++] Include <__config> first in all standard headers.

Arthur O'Dwyer via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Mar 22 10:14:57 PDT 2021


Quuxplusone created this revision.
Quuxplusone added reviewers: libc++, EricWF.
Quuxplusone added a project: libc++.
Quuxplusone requested review of this revision.
Herald added a subscriber: libcxx-commits.
Herald added 1 blocking reviewer(s): libc++.

Mostly, *don't* include <experimental/__config> from C++17 <any>,
because that doesn't make any sense. I think it was just a cut-and-paste
typo when this header moved from experimental/.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D99089

Files:
  libcxx/include/any
  libcxx/include/system_error


Index: libcxx/include/system_error
===================================================================
--- libcxx/include/system_error
+++ libcxx/include/system_error
@@ -142,11 +142,12 @@
 
 */
 
+#include <__config>
 #include <__errc>
-#include <type_traits>
+#include <__functional_base> // unary_function
 #include <stdexcept>
-#include <__functional_base>
 #include <string>
+#include <type_traits>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
Index: libcxx/include/any
===================================================================
--- libcxx/include/any
+++ libcxx/include/any
@@ -80,7 +80,7 @@
 
 */
 
-#include <experimental/__config>
+#include <__config>
 #include <__availability>
 #include <memory>
 #include <typeinfo>


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D99089.332347.patch
Type: text/x-patch
Size: 772 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210322/a2019fdd/attachment.bin>


More information about the libcxx-commits mailing list