[libcxx-commits] [PATCH] D108393: [libc++] Include <__iterator/distance.h> instead of <iterator> in a few algorithm headers
Joe Loser via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Aug 19 10:48:03 PDT 2021
jloser created this revision.
jloser requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.
A few headers in algorithm include <iterator> when
<__iterator/distance.h> would suffice. Change them to just include
<__iterator.distance.h>.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D108393
Files:
libcxx/include/__algorithm/equal.h
libcxx/include/__algorithm/is_permutation.h
Index: libcxx/include/__algorithm/is_permutation.h
===================================================================
--- libcxx/include/__algorithm/is_permutation.h
+++ libcxx/include/__algorithm/is_permutation.h
@@ -14,7 +14,7 @@
#include <__config>
#include <__iterator/iterator_traits.h>
#include <__iterator/next.h>
-#include <iterator> // FIXME: replace with <__iterator/distance.h> when it lands
+#include <__iterator/distance.h>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
Index: libcxx/include/__algorithm/equal.h
===================================================================
--- libcxx/include/__algorithm/equal.h
+++ libcxx/include/__algorithm/equal.h
@@ -13,7 +13,7 @@
#include <__config>
#include <__algorithm/comp.h>
#include <__iterator/iterator_traits.h>
-#include <iterator> // FIXME: replace with <__iterator/distance.h> when it lands
+#include <__iterator/distance.h>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D108393.367548.patch
Type: text/x-patch
Size: 1016 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210819/ee5f37a1/attachment.bin>
More information about the libcxx-commits
mailing list