C/C++ API Reference
Loading...
Searching...
No Matches
pw::async2::ReadyConstantValueResolution< T, ConstantType, CastType > Struct Template Reference

Overview

template<typename T, typename ConstantType, typename CastType = T>
struct pw::async2::ReadyConstantValueResolution< T, ConstantType, CastType >

When used as the TimeoutResolution type parameter, causes the FutureWithTimeout wrapper to return Ready(constant) when there is a timeout.

The constant value is stored when in this type when constructed, and adds to the total size of the FutureWithTimeout, so prefer to use this when the type is reasonably small. If it is larger, or you want on-demand construction, consider using ReadyFunctionResultResolution instead.

Public Types

using value_type = T
 

Public Member Functions

constexpr ReadyConstantValueResolution (const cpp20::remove_cvref_t< ConstantType > &value)
 
constexpr ReadyConstantValueResolution (cpp20::remove_cvref_t< ConstantType > &&value)
 
constexpr Poll< T > operator() () const
 

The documentation for this struct was generated from the following file: