summaryrefslogtreecommitdiff
path: root/include/mbgl/util/range.hpp
blob: d04164afb7922837625a109ee216c0a44eb2c7e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#pragma once

namespace mbgl {

template <class T>
class Range {
public:
    Range(const T& min_, const T& max_)
        : min(min_), max(max_) {}

    T min;
    T max;
};

template <class T>
inline bool operator==(const Range<T>& a, const Range<T>& b) {
    return a.min == b.min && a.max == b.max;
}

template <class T>
inline bool operator!=(const Range<T>& a, const Range<T>& b) {
    return !(a == b);
}

} // namespace mbgl