ATLAS Offline Software
Loading...
Searching...
No Matches
iterator_range.h
Go to the documentation of this file.
1// This file's extension implies that it's C, but it's really -*- C++ -*-.
2/*
3 * Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration.
4 */
11
12
13#ifndef CXXUTILS_ITERATOR_RANGE_H
14#define CXXUTILS_ITERATOR_RANGE_H
15
16
17#include <utility>
18
19
20namespace CxxUtils {
21
22
35template <class ITER>
36class iterator_range : public std::pair<ITER, ITER>
37{
38public:
39 using std::pair<ITER, ITER>::pair;
40 ITER begin() const { return this->first; }
41 ITER end() const { return this->second; }
42};
43
44
45} // namespace CxxUtils
46
47
48#endif // not CXXUTILS_ITERATOR_RANGE_H
Simple range from a pair of iterators.
STL class.