Skip to content

Commit

Permalink
Fix no instance of overloaded function... on IAR (fixes #2001)
Browse files Browse the repository at this point in the history
  • Loading branch information
bblanchon committed Dec 6, 2023
1 parent 7517ecb commit 6ed8702
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -6,6 +6,7 @@ HEAD

* Fix error `'std::string' has not been declared` (issue #1967)
* Fix error `'std::string_view' has not been declared` (issue #1967)
* Fix error `no instance of overloaded function...` on recent IAR compilers (issue #2001)

v6.21.3 (2023-07-23)
-------
Expand Down
3 changes: 2 additions & 1 deletion src/ArduinoJson/Variant/VariantRefBase.hpp
Expand Up @@ -61,7 +61,8 @@ class VariantRefBase : public VariantTag {
return Converter<T>::fromJson(getVariant());
}

template <typename T>
template <typename T,
typename = typename enable_if<!is_same<T, TDerived>::value>::type>
FORCE_INLINE operator T() const {
return as<T>();
}
Expand Down

0 comments on commit 6ed8702

Please sign in to comment.