forked from bblanchon/ArduinoJson
Added JsonVariant::is<JsonVariant/JsonVariantConst>() (issue #1412)
This commit is contained in:
@ -121,6 +121,16 @@ class VariantRefBase : public VariantTag {
|
||||
is() const {
|
||||
return !!_data;
|
||||
}
|
||||
//
|
||||
// bool is<VariantConstRef> const;
|
||||
// bool is<const VariantConstRef> const;
|
||||
template <typename T>
|
||||
FORCE_INLINE typename enable_if<
|
||||
is_same<typename remove_const<T>::type, VariantConstRef>::value,
|
||||
bool>::type
|
||||
is() const {
|
||||
return !!_data;
|
||||
}
|
||||
#if ARDUINOJSON_HAS_NULLPTR
|
||||
//
|
||||
// bool is<nullptr_t> const;
|
||||
|
Reference in New Issue
Block a user