ATLAS Offline Software
Loading...
Searching...
No Matches
CxxUtils::iterator_range< ITER > Class Template Reference

Simple range from a pair of iterators. More...

#include <iterator_range.h>

Inheritance diagram for CxxUtils::iterator_range< ITER >:
Collaboration diagram for CxxUtils::iterator_range< ITER >:

Public Member Functions

ITER begin () const
ITER end () const

Public Attributes

T1 first_type
 STL member.
T2 second_type
 STL member.

Detailed Description

template<class ITER>
class CxxUtils::iterator_range< ITER >

Simple range from a pair of iterators.

This adapts a pair of iterators to work as a range.

std::ranges::subrange can't always be used, because it requires that the sentinel type be assignable and default-constructible, which is not the case for the concurrent map iterators. In that case, this class can be used instead. (boost::iterator_range could also work, but it brings in the boost type traits implementation as header dependencies.)

Definition at line 36 of file iterator_range.h.

Member Function Documentation

◆ begin()

template<class ITER>
ITER CxxUtils::iterator_range< ITER >::begin ( ) const
inline

Definition at line 40 of file iterator_range.h.

40{ return this->first; }
Simple range from a pair of iterators.

◆ end()

template<class ITER>
ITER CxxUtils::iterator_range< ITER >::end ( ) const
inline

Definition at line 41 of file iterator_range.h.

41{ return this->second; }

Member Data Documentation

◆ first_type

T1 std::pair< T1, T2 >::first_type
inherited

STL member.

◆ second_type

T2 std::pair< T1, T2 >::second_type
inherited

STL member.


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