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

◆ as_int() [2/4]

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

Definition at line 1053 of file types.h.

1053 {
1054 // Check if we have a valid value first
1055 if (data.empty()) {
1056 return fl::nullopt;
1057 }
1058
1059 int_conversion_visitor<IntType> visitor;
1060 data.visit(visitor);
1061 return visitor.result;
1062 }
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.