Fixed JsonVariant::operator[const FlashStringHelper*] (issue #441)

This commit is contained in:
Benoit Blanchon
2017-02-11 15:09:08 +01:00
parent 31827d03f9
commit c30241775a
2 changed files with 4 additions and 3 deletions

View File

@@ -97,7 +97,7 @@ class JsonVariantBase : public Internals::JsonPrintable<TImpl> {
}
//
// const JsonObjectSubscript operator[](TKey) const;
// TKey = const char*, const char[N], const FlashStringHelper*
// TKey = const std::string&, const String&
template <typename TString>
FORCE_INLINE typename TypeTraits::EnableIf<
Internals::StringTraits<TString>::has_equals,
@@ -107,10 +107,10 @@ class JsonVariantBase : public Internals::JsonPrintable<TImpl> {
}
//
// JsonObjectSubscript operator[](TKey);
// TKey = const std::string&, const String&
// TKey = const char*, const char[N], const FlashStringHelper*
template <typename TString>
FORCE_INLINE typename TypeTraits::EnableIf<
Internals::StringTraits<TString *>::has_equals,
Internals::StringTraits<const TString *>::has_equals,
JsonObjectSubscript<const TString *> >::type
operator[](const TString *key) {
return as<JsonObject>()[key];