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

#include <Enumerate.h>

Public Types

using difference_type = ssize_t
 
using value_type = typename std::iterator_traits< Iterator >::value_type
 
using reference = typename std::iterator_traits< Iterator >::reference
 
using pointer = typename std::iterator_traits< Iterator >::pointer
 
using iterator_category = std::input_iterator_tag
 

Public Member Functions

FOLLY_ALWAYS_INLINE Proxy (const Enumerator &e)
 
FOLLY_ALWAYS_INLINE reference operator* ()
 
FOLLY_ALWAYS_INLINE pointer operator-> ()
 
FOLLY_ALWAYS_INLINE MakeConst< reference >::type operator* () const
 
FOLLY_ALWAYS_INLINE MakeConst< pointer >::type operator-> () const
 

Public Attributes

const size_t index
 

Private Attributes

const Iterator & it_
 

Detailed Description

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

Definition at line 83 of file Enumerate.h.

Member Typedef Documentation

template<class Iterator>
using folly::detail::Enumerator< Iterator >::Proxy::difference_type = ssize_t

Definition at line 85 of file Enumerate.h.

template<class Iterator>
using folly::detail::Enumerator< Iterator >::Proxy::iterator_category = std::input_iterator_tag

Definition at line 89 of file Enumerate.h.

template<class Iterator>
using folly::detail::Enumerator< Iterator >::Proxy::pointer = typename std::iterator_traits<Iterator>::pointer

Definition at line 88 of file Enumerate.h.

template<class Iterator>
using folly::detail::Enumerator< Iterator >::Proxy::reference = typename std::iterator_traits<Iterator>::reference

Definition at line 87 of file Enumerate.h.

template<class Iterator>
using folly::detail::Enumerator< Iterator >::Proxy::value_type = typename std::iterator_traits<Iterator>::value_type

Definition at line 86 of file Enumerate.h.

Constructor & Destructor Documentation

template<class Iterator>
FOLLY_ALWAYS_INLINE folly::detail::Enumerator< Iterator >::Proxy::Proxy ( const Enumerator e)
inlineexplicit

Definition at line 91 of file Enumerate.h.

92  : it_(e.it_), index(e.idx_) {}

Member Function Documentation

template<class Iterator>
FOLLY_ALWAYS_INLINE reference folly::detail::Enumerator< Iterator >::Proxy::operator* ( )
inline

Definition at line 95 of file Enumerate.h.

95  {
96  return *it_;
97  }
template<class Iterator>
FOLLY_ALWAYS_INLINE MakeConst<reference>::type folly::detail::Enumerator< Iterator >::Proxy::operator* ( ) const
inline

Definition at line 103 of file Enumerate.h.

103  {
104  return *it_;
105  }
template<class Iterator>
FOLLY_ALWAYS_INLINE pointer folly::detail::Enumerator< Iterator >::Proxy::operator-> ( )
inline

Definition at line 98 of file Enumerate.h.

References folly::detail::getPointer().

98  {
99  return getPointer(it_, 0);
100  }
FOLLY_ALWAYS_INLINE auto getPointer(const Iterator &it, long) -> decltype(std::addressof(*it))
Definition: Enumerate.h:68
template<class Iterator>
FOLLY_ALWAYS_INLINE MakeConst<pointer>::type folly::detail::Enumerator< Iterator >::Proxy::operator-> ( ) const
inline

Definition at line 106 of file Enumerate.h.

References folly::detail::getPointer().

106  {
107  return getPointer(it_, 0);
108  }
FOLLY_ALWAYS_INLINE auto getPointer(const Iterator &it, long) -> decltype(std::addressof(*it))
Definition: Enumerate.h:68

Member Data Documentation

template<class Iterator>
const size_t folly::detail::Enumerator< Iterator >::Proxy::index

Definition at line 114 of file Enumerate.h.

template<class Iterator>
const Iterator& folly::detail::Enumerator< Iterator >::Proxy::it_
private

Definition at line 111 of file Enumerate.h.


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