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

◆ value()

template<typename T>
const T & fl::promise< T >::value ( ) const
inline

Get the result value (only valid if is_resolved() returns true)

Definition at line 172 of file promise.h.

172 {
173 if (!valid()) {
174 static const T default_value{};
175 return default_value;
176 }
177 return mImpl->value();
178 }
bool valid() const
Check if promise is valid.
Definition promise.h:122
fl::shared_ptr< detail::PromiseImpl< T > > mImpl
Shared pointer to implementation - this allows copying and sharing promise state.
Definition promise.h:223
Promise class that provides fluent .then() and .catch_() semantics This is a lightweight wrapper arou...
Definition promise.h:72

References mImpl, and valid().

Referenced by fl::await_top_level(), complete_with_value(), complete_with_value(), resolve(), and resolve().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: