Skip to content

Commit af3bb13

Browse files
committed
Fixed error Pe070 "incomplete type is not allowed" on IAR (fixes #1560)
1 parent 622e7dd commit af3bb13

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ HEAD
55
----
66

77
* Fixed support for `volatile float` and `volatile double` (issue #1557)
8+
* Fixed error `[Pe070]: incomplete type is not allowed` on IAR (issue #1560)
89

910
v6.18.0 (2021-05-05)
1011
-------

src/ArduinoJson/Variant/VariantImpl.hpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,4 +140,9 @@ inline VariantConstRef operator|(VariantConstRef preferedValue,
140140
VariantConstRef defaultValue) {
141141
return preferedValue ? preferedValue : defaultValue;
142142
}
143+
144+
// Out of class definition to avoid #1560
145+
inline bool VariantRef::set(char value) const {
146+
return set<signed char>(value);
147+
}
143148
} // namespace ARDUINOJSON_NAMESPACE

src/ArduinoJson/Variant/VariantRef.hpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,9 @@ class VariantRef : public VariantRefBase<VariantData>,
8888
return Converter<T>::toJson(value, *this);
8989
}
9090

91-
FORCE_INLINE bool ARDUINOJSON_DEPRECATED(
91+
bool ARDUINOJSON_DEPRECATED(
9292
"Support for char is deprecated, use int8_t or uint8_t instead")
93-
set(char value) const {
94-
return set<signed char>(value);
95-
}
93+
set(char value) const;
9694

9795
template <typename T>
9896
FORCE_INLINE bool set(T *value) const {

0 commit comments

Comments
 (0)