// Copyright Benoit Blanchon 2014-2017 // MIT License // // Arduino JSON library // https://bblanchon.github.io/ArduinoJson/ // If you like this project, please add a star! #pragma once #include "Data/JsonVariantComparer.hpp" namespace ArduinoJson { template inline bool operator==(const JsonVariantBase &variant, TComparand comparand) { return Internals::JsonVariantComparer::equals(variant, comparand); } template inline typename TypeTraits::EnableIf::value, bool>::type operator==(TComparand comparand, const JsonVariantBase &variant) { return Internals::JsonVariantComparer::equals(variant, comparand); } template inline bool operator!=(const JsonVariantBase &variant, TComparand comparand) { return !Internals::JsonVariantComparer::equals(variant, comparand); } template inline typename TypeTraits::EnableIf::value, bool>::type operator!=(TComparand comparand, const JsonVariantBase &variant) { return !Internals::JsonVariantComparer::equals(variant, comparand); } template inline bool operator<=(const JsonVariantBase &left, TComparand right) { return left.template as() <= right; } template inline bool operator<=(TComparand comparand, const JsonVariantBase &variant) { return comparand <= variant.template as(); } template inline bool operator>=(const JsonVariantBase &variant, TComparand comparand) { return variant.template as() >= comparand; } template inline bool operator>=(TComparand comparand, const JsonVariantBase &variant) { return comparand >= variant.template as(); } template inline bool operator<(const JsonVariantBase &varian, TComparand comparand) { return varian.template as() < comparand; } template inline bool operator<(TComparand comparand, const JsonVariantBase &variant) { return comparand < variant.template as(); } template inline bool operator>(const JsonVariantBase &variant, TComparand comparand) { return variant.template as() > comparand; } template inline bool operator>(TComparand comparand, const JsonVariantBase &variant) { return comparand > variant.template as(); } }