Added operators == and != for two JsonVariants (issue #436)

This commit is contained in:
Benoit Blanchon
2017-02-11 15:06:17 +01:00
parent 7bcdf3e722
commit 31827d03f9
9 changed files with 249 additions and 59 deletions

View File

@@ -40,3 +40,18 @@ struct StringTraits<TString&, void> : StringTraits<TString> {};
#if ARDUINOJSON_ENABLE_PROGMEM
#include "FlashString.hpp"
#endif
namespace ArduinoJson {
namespace TypeTraits {
template <typename T, typename Enable = void>
struct IsString {
static const bool value = false;
};
template <typename T>
struct IsString<T, typename TypeTraits::EnableIf<
Internals::StringTraits<T>::has_equals>::type> {
static const bool value = Internals::StringTraits<T>::has_equals;
};
}
}