|
26 | 26 | #include "llvm/Config/abi-breaking.h" |
27 | 27 | #include "llvm/Support/ErrorHandling.h" |
28 | 28 | #include <algorithm> |
29 | | -#include <array> |
30 | 29 | #include <cassert> |
31 | 30 | #include <cstddef> |
32 | 31 | #include <cstdint> |
@@ -787,9 +786,8 @@ struct zip_common : public zip_traits<ZipType, Iters...> { |
787 | 786 | template <size_t... Ns> |
788 | 787 | bool test_all_equals(const zip_common &other, |
789 | 788 | std::index_sequence<Ns...>) const { |
790 | | - return all_of(std::initializer_list<bool>{std::get<Ns>(this->iterators) == |
791 | | - std::get<Ns>(other.iterators)...}, |
792 | | - identity<bool>{}); |
| 789 | + return ((std::get<Ns>(this->iterators) == std::get<Ns>(other.iterators)) && |
| 790 | + ...); |
793 | 791 | } |
794 | 792 |
|
795 | 793 | public: |
@@ -833,10 +831,8 @@ class zip_shortest : public zip_common<zip_shortest<Iters...>, Iters...> { |
833 | 831 | template <size_t... Ns> |
834 | 832 | bool test(const zip_shortest<Iters...> &other, |
835 | 833 | std::index_sequence<Ns...>) const { |
836 | | - return all_of( |
837 | | - std::array<bool, sizeof...(Ns)>({std::get<Ns>(this->iterators) != |
838 | | - std::get<Ns>(other.iterators)...}), |
839 | | - identity<bool>{}); |
| 834 | + return ((std::get<Ns>(this->iterators) != std::get<Ns>(other.iterators)) && |
| 835 | + ...); |
840 | 836 | } |
841 | 837 |
|
842 | 838 | public: |
@@ -966,10 +962,8 @@ class zip_longest_iterator |
966 | 962 | template <size_t... Ns> |
967 | 963 | bool test(const zip_longest_iterator<Iters...> &other, |
968 | 964 | std::index_sequence<Ns...>) const { |
969 | | - return llvm::any_of( |
970 | | - std::initializer_list<bool>{std::get<Ns>(this->iterators) != |
971 | | - std::get<Ns>(other.iterators)...}, |
972 | | - identity<bool>{}); |
| 965 | + return ((std::get<Ns>(this->iterators) != std::get<Ns>(other.iterators)) || |
| 966 | + ...); |
973 | 967 | } |
974 | 968 |
|
975 | 969 | template <size_t... Ns> value_type deref(std::index_sequence<Ns...>) const { |
|
0 commit comments