ranges.hpp 352 Bytes
Newer Older
Paul's avatar
Paul committed
1
2
#ifndef MIGRAPH_GUARD_MIGRAPHLIB_RANGES_HPP
#define MIGRAPH_GUARD_MIGRAPHLIB_RANGES_HPP
Paul's avatar
Paul committed
3

Paul's avatar
Paul committed
4
namespace migraph {
Paul's avatar
Paul committed
5
6
7
8
9
10
11
12
13
14
15
16
17

template <class C, class T>
bool contains(C&& c, T&& x)
{
    return c.find(x) != c.end();
}

template <class Range, class Iterator>
void copy(Range&& r, Iterator it)
{
    std::copy(r.begin(), r.end(), it);
}

Paul's avatar
Paul committed
18
} // namespace migraph
Paul's avatar
Paul committed
19
20

#endif