FastLED 3.9.15
Loading...
Searching...
No Matches

◆ as_bool() [1/2]

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

Definition at line 1001 of file types.h.

1001 {
1002 // Check if we have a valid value first
1003 if (data.empty()) {
1004 return fl::nullopt;
1005 }
1006
1007 BoolConversionVisitor visitor;
1008 data.visit(visitor);
1009 return visitor.result;
1010 }
constexpr nullopt_t nullopt
Definition optional.h:13
variant_t data
Definition types.h:700

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