Fixed variant.is<nullptr_t>()

This commit is contained in:
Benoit Blanchon committed 2020-01-13 20:47:43 +01:00
1 parent 27ec1afb7a
commit 25879466da
3 files changed
+19

No files matched your search

+10
View File
@@ -91,6 +91,16 @@ class VariantRefBase {
is() const {
return variantIsObject(_data);
}
#if ARDUINOJSON_HAS_NULLPTR
//
// bool is<nullptr_t> const;
template <typename T>
FORCE_INLINE
typename enable_if<is_same<T, decltype(nullptr)>::value, bool>::type
is() const {
return variantIsNull(_data);
}
#endif
FORCE_INLINE bool isNull() const {
return variantIsNull(_data);