diff options
author | Christopher Di Bella <cjdb@google.com> | 2022-02-25 18:59:32 +0000 |
---|---|---|
committer | Christopher Di Bella <cjdb@google.com> | 2022-02-26 09:00:25 +0000 |
commit | 5aaefa510ef055e8f044ca89e352d4313f3aba49 (patch) | |
tree | 802d47ed42f359ebc4ff566f7d4859de94bd3651 /libcxx/include/__algorithm/equal.h | |
parent | 274ec425dcc3e3f637dd006c5e9ae33bd0e2e917 (diff) | |
download | llvm-5aaefa510ef055e8f044ca89e352d4313f3aba49.zip llvm-5aaefa510ef055e8f044ca89e352d4313f3aba49.tar.gz llvm-5aaefa510ef055e8f044ca89e352d4313f3aba49.tar.bz2 |
[libcxx][modules] protects users from relying on detail headers
libc++ has started splicing standard library headers into much more
fine-grained content for maintainability. It's very likely that outdated
and naive tooling (some of which is outside of LLVM's scope) will
suggest users include things such as <__ranges/access.h> instead of
<ranges>, and Hyrum's law suggests that users will eventually begin to
rely on this without the help of tooling. As such, this commit
intends to protect users from themselves, by making it a hard error for
anyone outside of the standard library to include libc++ detail headers.
Differential Revision: https://reviews.llvm.org/D106124
Diffstat (limited to 'libcxx/include/__algorithm/equal.h')
-rw-r--r-- | libcxx/include/__algorithm/equal.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libcxx/include/__algorithm/equal.h b/libcxx/include/__algorithm/equal.h index ca1bc6b..bfd3bf1 100644 --- a/libcxx/include/__algorithm/equal.h +++ b/libcxx/include/__algorithm/equal.h @@ -17,6 +17,7 @@ #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header +# pragma clang include_instead(<algorithm>) #endif _LIBCPP_BEGIN_NAMESPACE_STD |