Fabcoin Core  0.16.2
P2P Digital Currency
Public Member Functions | Private Attributes | List of all members
reverse_range< T > Class Template Reference

Template used for reverse iteration in C++11 range-based for loops. More...

#include <reverse_iterator.h>

Public Member Functions

 reverse_range (T &x)
 
auto begin () const -> decltype(this->m_x.rbegin())
 
auto end () const -> decltype(this->m_x.rend())
 

Private Attributes

Tm_x
 

Detailed Description

template<typename T>
class reverse_range< T >

Template used for reverse iteration in C++11 range-based for loops.

std::vector<int> v = {1, 2, 3, 4, 5}; for (auto x : reverse_iterate(v)) std::cout << x << " ";

Definition at line 15 of file reverse_iterator.h.

Constructor & Destructor Documentation

template<typename T >
reverse_range< T >::reverse_range ( T x)
inline

Definition at line 20 of file reverse_iterator.h.

Member Function Documentation

template<typename T >
auto reverse_range< T >::begin ( void  ) const -> decltype(this->m_x.rbegin())
inline

Definition at line 22 of file reverse_iterator.h.

template<typename T >
auto reverse_range< T >::end ( void  ) const -> decltype(this->m_x.rend())
inline

Definition at line 27 of file reverse_iterator.h.

Member Data Documentation

template<typename T >
T& reverse_range< T >::m_x
private

Definition at line 17 of file reverse_iterator.h.


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