forked from bblanchon/ArduinoJson
Fixed invalid application of 'sizeof' to incomplete type (closes #783)
This commit is contained in:
@ -111,17 +111,17 @@ inline typename enable_if<IsString<TString>::value,
|
||||
|
||||
template <typename TImpl>
|
||||
template <typename TString>
|
||||
inline typename enable_if<IsString<const TString *>::value,
|
||||
JsonObjectSubscript<const TString *> >::type
|
||||
JsonVariantSubscripts<TImpl>::operator[](const TString *key) {
|
||||
inline typename enable_if<IsString<TString *>::value,
|
||||
JsonObjectSubscript<TString *> >::type
|
||||
JsonVariantSubscripts<TImpl>::operator[](TString *key) {
|
||||
return impl()->template as<JsonObject>()[key];
|
||||
}
|
||||
|
||||
template <typename TImpl>
|
||||
template <typename TString>
|
||||
inline typename enable_if<IsString<TString *>::value,
|
||||
const JsonObjectSubscript<const TString *> >::type
|
||||
JsonVariantSubscripts<TImpl>::operator[](const TString *key) const {
|
||||
const JsonObjectSubscript<TString *> >::type
|
||||
JsonVariantSubscripts<TImpl>::operator[](TString *key) const {
|
||||
return impl()->template as<JsonObject>()[key];
|
||||
}
|
||||
|
||||
|
@ -57,17 +57,16 @@ class JsonVariantSubscripts {
|
||||
// JsonObjectSubscript operator[](TKey);
|
||||
// TKey = const char*, const char[N], const FlashStringHelper*
|
||||
template <typename TString>
|
||||
FORCE_INLINE typename enable_if<IsString<const TString *>::value,
|
||||
JsonObjectSubscript<const TString *> >::type
|
||||
operator[](const TString *key);
|
||||
FORCE_INLINE typename enable_if<IsString<TString *>::value,
|
||||
JsonObjectSubscript<TString *> >::type
|
||||
operator[](TString *key);
|
||||
//
|
||||
// JsonObjectSubscript operator[](TKey);
|
||||
// TKey = const char*, const char[N], const FlashStringHelper*
|
||||
template <typename TString>
|
||||
FORCE_INLINE
|
||||
typename enable_if<IsString<TString *>::value,
|
||||
const JsonObjectSubscript<const TString *> >::type
|
||||
operator[](const TString *key) const;
|
||||
FORCE_INLINE typename enable_if<IsString<TString *>::value,
|
||||
const JsonObjectSubscript<TString *> >::type
|
||||
operator[](TString *key) const;
|
||||
|
||||
private:
|
||||
const TImpl *impl() const {
|
||||
|
Reference in New Issue
Block a user