Fixed error Pe070 "incomplete type is not allowed" on IAR (fixes #1560)

This commit is contained in:
Benoit Blanchon
2021-05-19 15:07:59 +02:00
parent 622e7dd287
commit af3bb131c8
3 changed files with 8 additions and 4 deletions

View File

@ -5,6 +5,7 @@ HEAD
----
* Fixed support for `volatile float` and `volatile double` (issue #1557)
* Fixed error `[Pe070]: incomplete type is not allowed` on IAR (issue #1560)
v6.18.0 (2021-05-05)
-------

View File

@ -140,4 +140,9 @@ inline VariantConstRef operator|(VariantConstRef preferedValue,
VariantConstRef defaultValue) {
return preferedValue ? preferedValue : defaultValue;
}
// Out of class definition to avoid #1560
inline bool VariantRef::set(char value) const {
return set<signed char>(value);
}
} // namespace ARDUINOJSON_NAMESPACE

View File

@ -88,11 +88,9 @@ class VariantRef : public VariantRefBase<VariantData>,
return Converter<T>::toJson(value, *this);
}
FORCE_INLINE bool ARDUINOJSON_DEPRECATED(
bool ARDUINOJSON_DEPRECATED(
"Support for char is deprecated, use int8_t or uint8_t instead")
set(char value) const {
return set<signed char>(value);
}
set(char value) const;
template <typename T>
FORCE_INLINE bool set(T *value) const {