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

◆ as_int() [1/4]

fl::optional< i64 > fl::json_value::as_int ( ) const
inline

Definition at line 1041 of file types.h.

1041 {
1042 // Check if we have a valid value first
1043 if (data.empty()) {
1044 return fl::nullopt;
1045 }
1046
1047 int_conversion_visitor<i64> visitor;
1048 data.visit(visitor);
1049 return visitor.result;
1050 }
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.