1#ifndef SENSESP_SRC_SENSESP_TYPES_NULLABLE_H_
2#define SENSESP_SRC_SENSESP_TYPES_NULLABLE_H_
4#include "ArduinoJson.h"
30 value_ = other.value_;
38 return value_ != invalid_value_;
46 return invalid_value_;
55 static T invalid_value_;
91 operator bool()
const {
136 dst.set(src.
value());
Nullable< bool > & operator=(const Nullable< bool > &other)=default
Nullable(const Nullable< bool > &other)=default
Nullable< bool > & operator=(bool value)
static Nullable< bool > invalid()
Template class that supports a special invalid magic value for a type.
Nullable< T > & operator=(T &value)
Nullable< T > & operator=(const Nullable< T > &other)
Nullable< bool > NullableBool
Nullable< int > NullableInt
void convertToJson(const Nullable< T > &src, JsonVariant dst)
Nullable< double > NullableDouble
void convertFromJson(JsonVariantConst src, Nullable< T > &dst)
Nullable< float > NullableFloat