summaryrefslogtreecommitdiff
path: root/include/mbgl/style/property_value.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/mbgl/style/property_value.hpp')
-rw-r--r--include/mbgl/style/property_value.hpp24
1 files changed, 10 insertions, 14 deletions
diff --git a/include/mbgl/style/property_value.hpp b/include/mbgl/style/property_value.hpp
index d7e160fdca..83c4b4cf1b 100644
--- a/include/mbgl/style/property_value.hpp
+++ b/include/mbgl/style/property_value.hpp
@@ -17,7 +17,13 @@ private:
using Value = variant<Undefined, T, Function<T>>;
Value value;
- template <class S> friend bool operator==(const PropertyValue<S>&, const PropertyValue<S>&);
+ friend bool operator==(const PropertyValue& lhs, const PropertyValue& rhs) {
+ return lhs.value == rhs.value;
+ }
+
+ friend bool operator!=(const PropertyValue& lhs, const PropertyValue& rhs) {
+ return !(lhs == rhs);
+ }
public:
PropertyValue() : value() {}
@@ -33,21 +39,11 @@ public:
explicit operator bool() const { return !isUndefined(); };
- template <typename Visitor>
- static auto visit(const PropertyValue<T>& value, Visitor&& visitor) {
- return Value::visit(value.value, visitor);
+ template <typename Evaluator>
+ auto evaluate(const Evaluator& evaluator) const {
+ return Value::visit(value, evaluator);
}
};
-template <class T>
-bool operator==(const PropertyValue<T>& lhs, const PropertyValue<T>& rhs) {
- return lhs.value == rhs.value;
-}
-
-template <class T>
-bool operator!=(const PropertyValue<T>& lhs, const PropertyValue<T>& rhs) {
- return !(lhs == rhs);
-}
-
} // namespace style
} // namespace mbgl