proxygen
folly::detail::Enumerator< Iterator > Class Template Reference

#include <Enumerate.h>

Classes

class  Proxy
 

Public Member Functions

 Enumerator (Iterator it)
 
FOLLY_ALWAYS_INLINE Proxy operator* () const
 
FOLLY_ALWAYS_INLINE Enumeratoroperator++ ()
 
template<typename OtherIterator >
FOLLY_ALWAYS_INLINE bool operator== (const Enumerator< OtherIterator > &rhs) const
 
template<typename OtherIterator >
FOLLY_ALWAYS_INLINE bool operator!= (const Enumerator< OtherIterator > &rhs) const
 

Private Attributes

Iterator it_
 
size_t idx_ = 0
 

Friends

template<typename OtherIterator >
class Enumerator
 

Detailed Description

template<class Iterator>
class folly::detail::Enumerator< Iterator >

Definition at line 79 of file Enumerate.h.

Constructor & Destructor Documentation

template<class Iterator>
folly::detail::Enumerator< Iterator >::Enumerator ( Iterator  it)
inlineexplicit

Definition at line 81 of file Enumerate.h.

81 : it_(std::move(it)) {}
constexpr detail::Map< Move > move
Definition: Base-inl.h:2567

Member Function Documentation

template<class Iterator>
template<typename OtherIterator >
FOLLY_ALWAYS_INLINE bool folly::detail::Enumerator< Iterator >::operator!= ( const Enumerator< OtherIterator > &  rhs) const
inline

Definition at line 134 of file Enumerate.h.

References folly::detail::Enumerator< Iterator >::it_.

135  {
136  return !(it_ == rhs.it_);
137  }
FOLLY_PUSH_WARNING RHS rhs
Definition: Traits.h:649
template<class Iterator>
FOLLY_ALWAYS_INLINE Proxy folly::detail::Enumerator< Iterator >::operator* ( ) const
inline

Definition at line 117 of file Enumerate.h.

117  {
118  return Proxy(*this);
119  }
template<class Iterator>
FOLLY_ALWAYS_INLINE Enumerator& folly::detail::Enumerator< Iterator >::operator++ ( )
inline

Definition at line 121 of file Enumerate.h.

121  {
122  ++it_;
123  ++idx_;
124  return *this;
125  }
template<class Iterator>
template<typename OtherIterator >
FOLLY_ALWAYS_INLINE bool folly::detail::Enumerator< Iterator >::operator== ( const Enumerator< OtherIterator > &  rhs) const
inline

Definition at line 128 of file Enumerate.h.

References folly::detail::Enumerator< Iterator >::it_.

129  {
130  return it_ == rhs.it_;
131  }
FOLLY_PUSH_WARNING RHS rhs
Definition: Traits.h:649

Friends And Related Function Documentation

template<class Iterator>
template<typename OtherIterator >
friend class Enumerator
friend

Definition at line 141 of file Enumerate.h.

Member Data Documentation

template<class Iterator>
size_t folly::detail::Enumerator< Iterator >::idx_ = 0
private

Definition at line 144 of file Enumerate.h.

template<class Iterator>
Iterator folly::detail::Enumerator< Iterator >::it_
private

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