[libc++] Include <__iterator/distance.h> instead of <iterator> in a few algorithm headers

A few headers in algorithm include `<iterator>` when
`<__iterator/distance.h>` would suffice. Change them
to just include `<__iterator.distance.h>`.

Differential Revision: https://reviews.llvm.org/D108393
This commit is contained in:
Joe Loser 2021-08-20 15:02:03 -04:00 committed by Louis Dionne
parent 9116211d18
commit 9807626bc7
2 changed files with 4 additions and 2 deletions

View File

@ -12,8 +12,9 @@
#include <__config> #include <__config>
#include <__algorithm/comp.h> #include <__algorithm/comp.h>
#include <__iterator/distance.h>
#include <__iterator/iterator_traits.h> #include <__iterator/iterator_traits.h>
#include <iterator> // FIXME: replace with <__iterator/distance.h> when it lands #include <type_traits>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header #pragma GCC system_header

View File

@ -12,9 +12,10 @@
#include <__algorithm/comp.h> #include <__algorithm/comp.h>
#include <__config> #include <__config>
#include <__iterator/distance.h>
#include <__iterator/iterator_traits.h> #include <__iterator/iterator_traits.h>
#include <__iterator/next.h> #include <__iterator/next.h>
#include <iterator> // FIXME: replace with <__iterator/distance.h> when it lands #include <type_traits>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header #pragma GCC system_header