Fix no instance of overloaded function... on IAR (fixes #2001)

This commit is contained in:
Benoit Blanchon
2023-12-06 17:34:42 +01:00
parent 7517ecb91b
commit 6ed87029e2
2 changed files with 3 additions and 1 deletions

View File

@ -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)
-------

View File

@ -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>();
}