proxygen
folly::detail::fixedstring::ReverseIterator< T > Struct Template Reference

#include <FixedString.h>

Classes

struct  dummy_
 

Public Types

using value_type = typename std::remove_const< T >::type
 
using reference = T &
 
using pointer = T *
 
using difference_type = std::ptrdiff_t
 
using iterator_category = std::random_access_iterator_tag
 

Public Member Functions

constexpr ReverseIterator ()=default
 
constexpr ReverseIterator (const ReverseIterator &)=default
 
FOLLY_CPP14_CONSTEXPR ReverseIteratoroperator= (const ReverseIterator &)=default
 
constexpr ReverseIterator (T *p) noexcept
 
constexpr ReverseIterator (const other &that) noexcept
 
constexpr reference operator* () const
 
FOLLY_CPP14_CONSTEXPR ReverseIteratoroperator++ () noexcept
 
FOLLY_CPP14_CONSTEXPR ReverseIterator operator++ (int) noexcept
 
FOLLY_CPP14_CONSTEXPR ReverseIteratoroperator-- () noexcept
 
FOLLY_CPP14_CONSTEXPR ReverseIterator operator-- (int) noexcept
 
FOLLY_CPP14_CONSTEXPR ReverseIteratoroperator+= (std::ptrdiff_t i) noexcept
 
FOLLY_CPP14_CONSTEXPR ReverseIteratoroperator-= (std::ptrdiff_t i) noexcept
 
constexpr reference operator[] (std::ptrdiff_t i) const noexcept
 

Private Types

using other = typename std::conditional< std::is_const< T >::value, ReverseIterator< typename std::remove_const< T >::type >, dummy_ >::type
 

Private Attributes

Tp_ = nullptr
 

Friends

constexpr bool operator== (ReverseIterator a, ReverseIterator b) noexcept
 
constexpr bool operator!= (ReverseIterator a, ReverseIterator b) noexcept
 
constexpr ReverseIterator operator+ (std::ptrdiff_t i, ReverseIterator that) noexcept
 
constexpr ReverseIterator operator+ (ReverseIterator that, std::ptrdiff_t i) noexcept
 
constexpr ReverseIterator operator- (ReverseIterator that, std::ptrdiff_t i) noexcept
 
constexpr std::ptrdiff_t operator- (ReverseIterator a, ReverseIterator b) noexcept
 

Detailed Description

template<class T>
struct folly::detail::fixedstring::ReverseIterator< T >

Definition at line 319 of file FixedString.h.

Member Typedef Documentation

template<class T >
using folly::detail::fixedstring::ReverseIterator< T >::difference_type = std::ptrdiff_t

Definition at line 334 of file FixedString.h.

template<class T >
using folly::detail::fixedstring::ReverseIterator< T >::iterator_category = std::random_access_iterator_tag

Definition at line 335 of file FixedString.h.

template<class T >
using folly::detail::fixedstring::ReverseIterator< T >::other = typename std::conditional< std::is_const<T>::value, ReverseIterator<typename std::remove_const<T>::type>, dummy_>::type
private

Definition at line 328 of file FixedString.h.

template<class T >
using folly::detail::fixedstring::ReverseIterator< T >::pointer = T*

Definition at line 333 of file FixedString.h.

template<class T >
using folly::detail::fixedstring::ReverseIterator< T >::reference = T&

Definition at line 332 of file FixedString.h.

template<class T >
using folly::detail::fixedstring::ReverseIterator< T >::value_type = typename std::remove_const<T>::type

Definition at line 331 of file FixedString.h.

Constructor & Destructor Documentation

template<class T >
constexpr folly::detail::fixedstring::ReverseIterator< T >::ReverseIterator ( )
default
template<class T >
constexpr folly::detail::fixedstring::ReverseIterator< T >::ReverseIterator ( const ReverseIterator< T > &  )
default
template<class T >
constexpr folly::detail::fixedstring::ReverseIterator< T >::ReverseIterator ( T p)
inlineexplicitnoexcept

Definition at line 341 of file FixedString.h.

template<class T >
constexpr folly::detail::fixedstring::ReverseIterator< T >::ReverseIterator ( const other that)
inlinenoexcept

Definition at line 342 of file FixedString.h.

Member Function Documentation

template<class T >
constexpr reference folly::detail::fixedstring::ReverseIterator< T >::operator* ( ) const
inline

Definition at line 354 of file FixedString.h.

354  {
355  return *(p_ - 1);
356  }
template<class T >
FOLLY_CPP14_CONSTEXPR ReverseIterator& folly::detail::fixedstring::ReverseIterator< T >::operator++ ( )
inlinenoexcept

Definition at line 357 of file FixedString.h.

357  {
358  --p_;
359  return *this;
360  }
template<class T >
FOLLY_CPP14_CONSTEXPR ReverseIterator folly::detail::fixedstring::ReverseIterator< T >::operator++ ( int  )
inlinenoexcept

Definition at line 361 of file FixedString.h.

361  {
362  auto tmp(*this);
363  --p_;
364  return tmp;
365  }
template<class T >
FOLLY_CPP14_CONSTEXPR ReverseIterator& folly::detail::fixedstring::ReverseIterator< T >::operator+= ( std::ptrdiff_t  i)
inlinenoexcept

Definition at line 375 of file FixedString.h.

References i.

375  {
376  p_ -= i;
377  return *this;
378  }
template<class T >
FOLLY_CPP14_CONSTEXPR ReverseIterator& folly::detail::fixedstring::ReverseIterator< T >::operator-- ( )
inlinenoexcept

Definition at line 366 of file FixedString.h.

366  {
367  ++p_;
368  return *this;
369  }
template<class T >
FOLLY_CPP14_CONSTEXPR ReverseIterator folly::detail::fixedstring::ReverseIterator< T >::operator-- ( int  )
inlinenoexcept

Definition at line 370 of file FixedString.h.

370  {
371  auto tmp(*this);
372  ++p_;
373  return tmp;
374  }
template<class T >
FOLLY_CPP14_CONSTEXPR ReverseIterator& folly::detail::fixedstring::ReverseIterator< T >::operator-= ( std::ptrdiff_t  i)
inlinenoexcept

Definition at line 389 of file FixedString.h.

References i.

389  {
390  p_ += i;
391  return *this;
392  }
template<class T >
FOLLY_CPP14_CONSTEXPR ReverseIterator& folly::detail::fixedstring::ReverseIterator< T >::operator= ( const ReverseIterator< T > &  )
default
template<class T >
constexpr reference folly::detail::fixedstring::ReverseIterator< T >::operator[] ( std::ptrdiff_t  i) const
inlinenoexcept

Definition at line 403 of file FixedString.h.

References folly::hsieh_hash32_buf(), i, and uint32_t.

403  {
404  return *(*this + i);
405  }

Friends And Related Function Documentation

template<class T >
constexpr bool operator!= ( ReverseIterator< T a,
ReverseIterator< T b 
)
friend

Definition at line 349 of file FixedString.h.

351  {
352  return !(a == b);
353  }
char b
char a
template<class T >
constexpr ReverseIterator operator+ ( std::ptrdiff_t  i,
ReverseIterator< T that 
)
friend

Definition at line 379 of file FixedString.h.

381  {
382  return ReverseIterator{that.p_ - i};
383  }
template<class T >
constexpr ReverseIterator operator+ ( ReverseIterator< T that,
std::ptrdiff_t  i 
)
friend

Definition at line 384 of file FixedString.h.

386  {
387  return ReverseIterator{that.p_ - i};
388  }
template<class T >
constexpr ReverseIterator operator- ( ReverseIterator< T that,
std::ptrdiff_t  i 
)
friend

Definition at line 393 of file FixedString.h.

395  {
396  return ReverseIterator{that.p_ + i};
397  }
template<class T >
constexpr std::ptrdiff_t operator- ( ReverseIterator< T a,
ReverseIterator< T b 
)
friend

Definition at line 398 of file FixedString.h.

400  {
401  return b.p_ - a.p_;
402  }
char b
char a
template<class T >
constexpr bool operator== ( ReverseIterator< T a,
ReverseIterator< T b 
)
friend

Definition at line 344 of file FixedString.h.

346  {
347  return a.p_ == b.p_;
348  }
char b
char a

Member Data Documentation

template<class T >
T* folly::detail::fixedstring::ReverseIterator< T >::p_ = nullptr
private

Definition at line 321 of file FixedString.h.


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