MapLibre Native Core
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
range.hpp
Go to the documentation of this file.
1 #include <utility>
2 
3 #pragma once
4 
5 namespace mbgl {
6 
7 template <class T>
8 class Range {
9 public:
10  constexpr Range(T min_, T max_)
11  : min(std::move(min_)), max(std::move(max_)) {}
12 
13  T min;
14  T max;
15 };
16 
17 template <class T>
18 bool operator==(const Range<T>& a, const Range<T>& b) {
19  return a.min == b.min && a.max == b.max;
20 }
21 
22 template <class T>
23 bool operator!=(const Range<T>& a, const Range<T>& b) {
24  return !(a == b);
25 }
26 
27 } // namespace mbgl
constexpr Range(T min_, T max_)
Definition: range.hpp:10
Definition: actor.hpp:15
constexpr bool operator==(const CameraOptions &a, const CameraOptions &b)
Definition: camera.hpp:50
constexpr bool operator!=(const CameraOptions &a, const CameraOptions &b)
Definition: camera.hpp:59
Definition: tile_id.hpp:256