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

◆ as_int() [4/4]

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

Definition at line 947 of file types.h.

947 {
948 // Check if we have a valid value first
949 if (data.empty()) {
950 return fl::nullopt;
951 }
952
953 int_conversion_visitor<IntType> visitor;
954 data.visit(visitor);
955 return visitor.result;
956 }
constexpr nullopt_t nullopt
Definition optional.h:13
variant_t data
Definition types.h:700

References data, FL_NOEXCEPT, fl::nullopt, and fl::int_conversion_visitor< IntType >::result.