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

◆ as_bool() [1/2]

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

Definition at line 1030 of file types.h.

1030 {
1031 // Check if we have a valid value first
1032 if (data.empty()) {
1033 return fl::nullopt;
1034 }
1035
1036 BoolConversionVisitor visitor;
1037 data.visit(visitor);
1038 return visitor.result;
1039 }
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.