14namespace ActsExamples {
26template <
typename Iterator>
29 Range(Iterator b, Iterator e) : m_begin(b), m_end(e) {}
36 Iterator begin()
const {
return m_begin; }
37 Iterator end()
const {
return m_end; }
38 bool empty()
const {
return m_begin == m_end; }
39 std::size_t size()
const {
return std::distance(m_begin, m_end); }
46template <
typename Iterator>
51template <
typename Iterator>
52Range<Iterator> makeRange(std::pair<Iterator, Iterator> range) {
53 return Range<Iterator>(range.first, range.second);
A wrapper around a pair of iterators to simplify range-based loops.