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

◆ as_int() [4/4]

template<typename IntType>
fl::optional< IntType > fl::json_value::as_int ( )
inline

Definition at line 976 of file types.h.

976 {
977 // Check if we have a valid value first
978 if (data.empty()) {
979 return fl::nullopt;
980 }
981
982 int_conversion_visitor<IntType> visitor;
983 data.visit(visitor);
984 return visitor.result;
985 }
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::int_conversion_visitor< IntType >::result.