MCPcopy Create free account
hub / github.com/FastLED/FastLED / as_or

Method as_or

src/fl/stl/json.h:650–653  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

648 // This method uses try_as<T>() for proper string-to-number conversion
649 template<typename T>
650 T as_or(const T& fallback) const FL_NOEXCEPT {
651 auto result = try_as<T>();
652 return result.has_value() ? *result : fallback;
653 }
654
655 // has_value method for compatibility
656 bool has_value() const FL_NOEXCEPT {

Callers 3

FL_TEST_FILEFunction · 0.45
FL_TEST_FILEFunction · 0.45
FL_TEST_FILEFunction · 0.45

Calls 1

has_valueMethod · 0.45

Tested by

no test coverage detected