Files
MapLibreParticleLab/include/mbgl/util/range.hpp
Tim Sylvester 705bdfb3de add noexcepts (#2119)
Co-authored-by: Bart Louwers <bart@emeel.net>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Bart Louwers <bart.louwers@gmail.com>
2024-04-08 15:39:18 +00:00

29 lines
485 B
C++

#include <utility>
#pragma once
namespace mbgl {
template <class T>
class Range {
public:
constexpr Range(T min_, T max_)
: min(std::move(min_)),
max(std::move(max_)) {}
T min;
T max;
};
template <class T>
constexpr bool operator==(const Range<T>& a, const Range<T>& b) {
return a.min == b.min && a.max == b.max;
}
template <class T>
constexpr bool operator!=(const Range<T>& a, const Range<T>& b) {
return !(a == b);
}
} // namespace mbgl