ATLAS Offline Software
Public Member Functions | List of all members
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
 

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; }

◆ 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; }

The documentation for this class was generated from the following file:
python.SystemOfUnits.second
float second
Definition: SystemOfUnits.py:135
DeMoScan.first
bool first
Definition: DeMoScan.py:534