LLVM 20.0.0git
Public Member Functions | List of all members
llvm::detail::zip_enumerator< Iters > Struct Template Reference

Zippy iterator that uses the second iterator for comparisons. More...

#include "llvm/ADT/STLExtras.h"

Inheritance diagram for llvm::detail::zip_enumerator< Iters >:
Inheritance graph
[legend]

Public Member Functions

bool operator== (const zip_enumerator &Other) const
 
- Public Member Functions inherited from llvm::detail::zip_common< zip_enumerator< Iters... >, EnumeratorTupleType< Iters... >, Iters... >
 zip_common (Iters &&... ts)
 
value_type operator* () const
 
zip_enumerator< Iters... > & operator++ ()
 
zip_enumerator< Iters... > & operator-- ()
 
bool all_equals (zip_common &other)
 Return true if all the iterator are matching other's iterators.
 
- Public Member Functions inherited from llvm::iterator_facade_base< DerivedT, IteratorCategoryT, T, DifferenceTypeT, PointerT, ReferenceT >
DerivedT operator+ (DifferenceTypeT n) const
 
DerivedT operator- (DifferenceTypeT n) const
 
DerivedT & operator++ ()
 
DerivedT operator++ (int)
 
DerivedT & operator-- ()
 
DerivedT operator-- (int)
 
bool operator!= (const DerivedT &RHS) const
 
bool operator> (const DerivedT &RHS) const
 
bool operator<= (const DerivedT &RHS) const
 
bool operator>= (const DerivedT &RHS) const
 
PointerProxy operator-> () const
 
ReferenceProxy operator[] (DifferenceTypeT n) const
 

Additional Inherited Members

- Public Types inherited from llvm::detail::zip_common< zip_enumerator< Iters... >, EnumeratorTupleType< Iters... >, Iters... >
using Base = zip_traits< zip_enumerator< Iters... >, EnumeratorTupleType< Iters... >, Iters... >
 
using IndexSequence = std::index_sequence_for< Iters... >
 
using value_type = typename Base::value_type
 
- Public Types inherited from llvm::iterator_facade_base< DerivedT, IteratorCategoryT, T, DifferenceTypeT, PointerT, ReferenceT >
using iterator_category = IteratorCategoryT
 
using value_type = T
 
using difference_type = DifferenceTypeT
 
using pointer = PointerT
 
using reference = ReferenceT
 
- Public Attributes inherited from llvm::detail::zip_common< zip_enumerator< Iters... >, EnumeratorTupleType< Iters... >, Iters... >
std::tuple< Iters... > iterators
 
- Protected Types inherited from llvm::iterator_facade_base< DerivedT, IteratorCategoryT, T, DifferenceTypeT, PointerT, ReferenceT >
enum  { IsRandomAccess , IsBidirectional }
 
- Protected Member Functions inherited from llvm::detail::zip_common< zip_enumerator< Iters... >, EnumeratorTupleType< Iters... >, Iters... >
value_type deref (std::index_sequence< Ns... >) const
 
void tup_inc (std::index_sequence< Ns... >)
 
void tup_dec (std::index_sequence< Ns... >)
 
bool test_all_equals (const zip_common &other, std::index_sequence< Ns... >) const
 

Detailed Description

template<typename... Iters>
struct llvm::detail::zip_enumerator< Iters >

Zippy iterator that uses the second iterator for comparisons.

For the increment to be safe, the second range has to be the shortest. Returns enumerator_result on dereference to provide .index() and .value() member functions. Note: Because the dereference operator returns enumerator_result as a value instead of a reference and does not strictly conform to the C++17's definition of forward iterator. However, it satisfies all the forward_iterator requirements that the zip_common and zippy depend on and fully conforms to the C++20 definition of forward iterator. This is similar to std::vector<bool>::iterator that returns bit reference wrappers on dereference.

Definition at line 2269 of file STLExtras.h.

Member Function Documentation

◆ operator==()

template<typename... Iters>
bool llvm::detail::zip_enumerator< Iters >::operator== ( const zip_enumerator< Iters > &  Other) const
inline

The documentation for this struct was generated from the following file: