|
SensESP 3.4.1-alpha
Universal Signal K sensor toolkit ESP32
|
Validity-flag specialization of Nullable for bool. More...
#include <sensesp/types/nullable.h>
Public Member Functions | |
| Nullable () | |
| Nullable (bool value) | |
| Nullable (const Nullable< bool > &other)=default | |
| Nullable< bool > & | operator= (bool value) |
| Nullable< bool > & | operator= (const Nullable< bool > &other)=default |
| operator bool () const | |
| bool | is_valid () const |
| bool * | ptr () |
| bool | value () const |
Static Public Member Functions | |
| static Nullable< bool > | invalid () |
Validity-flag specialization of Nullable for bool.
bool has no spare value to reserve as an invalid sentinel, so unlike the primary template this specialization tracks validity with an explicit flag: true, false, and invalid are all distinct. A default-constructed Nullable<bool> is invalid (no value yet); construct from a bool for a valid value, or use invalid() for the missing state.
This mirrors the primary template's public interface by hand – keep the two in sync when that interface changes.
Two intentional asymmetries with the primary template:
Definition at line 80 of file nullable.h.
|
inline |
Definition at line 82 of file nullable.h.
|
inline |
Definition at line 83 of file nullable.h.
|
default |
|
inlinestatic |
Definition at line 106 of file nullable.h.
|
inline |
Definition at line 95 of file nullable.h.
|
inline |
Definition at line 91 of file nullable.h.
|
inline |
|
default |
|
inline |
Definition at line 101 of file nullable.h.
|
inline |
Definition at line 110 of file nullable.h.