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

◆ as_int() [2/4]

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

Definition at line 1024 of file types.h.

1024 {
1025 // Check if we have a valid value first
1026 if (data.empty()) {
1027 return fl::nullopt;
1028 }
1029
1030 int_conversion_visitor<IntType> visitor;
1031 data.visit(visitor);
1032 return visitor.result;
1033 }
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.