Bitcoin ABC 0.30.7
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 &xin)
 
auto begin () const -> decltype(this->x.rbegin())
 
auto end () const -> decltype(this->x.rend())
 

Private Attributes

T & 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 14 of file reverse_iterator.h.

Constructor & Destructor Documentation

◆ reverse_range()

template<typename T >
reverse_range< T >::reverse_range ( T &  xin)
inlineexplicit

Definition at line 18 of file reverse_iterator.h.

Member Function Documentation

◆ begin()

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

Definition at line 20 of file reverse_iterator.h.

◆ end()

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

Definition at line 22 of file reverse_iterator.h.

Member Data Documentation

◆ x

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

Definition at line 15 of file reverse_iterator.h.


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