FastLED 3.10.8
Loading...
Searching...
No Matches

◆ as_bool() [2/2]

fl::optional< bool > fl::json_value::as_bool ( )
inline

Definition at line 953 of file types.h.

953 {
954 // Check if we have a valid value first
955 if (data.empty()) {
956 return fl::nullopt;
957 }
958
959 BoolConversionVisitor visitor;
960 data.visit(visitor);
961 return visitor.result;
962 }
constexpr nullopt_t nullopt
Definition optional.h:13
variant_t data
Definition types.h:760

References data, fl::FL_NO_EXCEPT, fl::nullopt, and fl::BoolConversionVisitor::result.