Jlm
jlm
util
iterator_range.hpp
Go to the documentation of this file.
1
/*
2
* Copyright 2021 Nico Reißmann <nico.reissmann@gmail.com>
3
* See COPYING for terms of redistribution.
4
*/
5
6
#ifndef JLM_UTIL_ITERATOR_RANGE_HPP
7
#define JLM_UTIL_ITERATOR_RANGE_HPP
8
9
#include <utility>
10
11
namespace
jlm::util
12
{
13
18
template
<
typename
T>
19
class
IteratorRange
20
{
21
public
:
22
IteratorRange
(T
begin
, T
end
)
23
:
begin_
(std::move(
begin
)),
24
end_
(std::move(
end
))
25
{}
26
27
template
<
typename
container_t>
28
explicit
IteratorRange
(container_t && c)
29
:
begin_
(c.
begin
()),
30
end_
(c.
end
())
31
{}
32
33
T
34
begin
()
const
35
{
36
return
begin_
;
37
}
38
39
T
40
end
()
const
41
{
42
return
end_
;
43
}
44
45
private
:
46
T
begin_
,
end_
;
47
};
48
49
}
50
51
#endif
jlm::util::IteratorRange
Iterator Range.
Definition:
iterator_range.hpp:20
jlm::util::IteratorRange::IteratorRange
IteratorRange(T begin, T end)
Definition:
iterator_range.hpp:22
jlm::util::IteratorRange::begin
T begin() const
Definition:
iterator_range.hpp:34
jlm::util::IteratorRange::begin_
T begin_
Definition:
iterator_range.hpp:46
jlm::util::IteratorRange::end
T end() const
Definition:
iterator_range.hpp:40
jlm::util::IteratorRange::IteratorRange
IteratorRange(container_t &&c)
Definition:
iterator_range.hpp:28
jlm::util::IteratorRange::end_
T end_
Definition:
iterator_range.hpp:46
jlm::util
Definition:
RvsdgToIpGraphConverter.hpp:14
Generated by
1.9.1