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

Method value_or

src/fl/stl/optional.h:117–119  ·  view source on GitHub ↗

value_or() method for std::optional compatibility Returns the contained value if present, otherwise returns the provided default

Source from the content-addressed store, hash-verified

115 // value_or() method for std::optional compatibility
116 // Returns the contained value if present, otherwise returns the provided default
117 T value_or(const T& default_value) const FL_NOEXCEPT {
118 return has_value() ? *ptr() : default_value;
119 }
120
121 // value_or() overload for rvalue default values
122 T value_or(T&& default_value) const FL_NOEXCEPT {

Callers 9

processRpcMethod · 0.80
scheduleFunctionMethod · 0.80
methodsMethod · 0.80
pullMethod · 0.80
showPixelsMethod · 0.80
writeUCS7604Function · 0.80
FL_TEST_FILEFunction · 0.80
rpc.hppFile · 0.80
FL_TEST_FILEFunction · 0.80

Calls 1

ptrFunction · 0.85

Tested by

no test coverage detected