Pigweed
C/C++ API Reference
|
Functions | |
template<auto MemberFunc, typename Traits = internal::PendableTraits<decltype(MemberFunc)>, typename = std::enable_if_t< Traits::kIsPendable && std::is_member_function_pointer_v<decltype(MemberFunc)>>, typename... Args> | |
constexpr MemberPendableWrapper< MemberFunc > | pw::async2::PendableFor (typename Traits::Class &obj, Args &&... args) |
template<auto FreeFunc, typename Traits = internal::PendableTraits<decltype(FreeFunc)>, typename = std::enable_if_t< Traits::kIsPendable && !std::is_member_function_pointer_v<decltype(FreeFunc)>>, typename... Args> | |
constexpr FreePendableWrapper< FreeFunc > | pw::async2::PendableFor (Args &&... args) |
|
inlineconstexpr |
Wraps a pendable free function in an object which has a single Pend
method, allowing it to be used more broadly.
The wrapper stores the arguments used to invoke the target function. As a result, the argument types must be copyable.
The wrapping pendable object can only be used a single time. After its Pend
method returns Ready
, it will crash if called again.
|
inlineconstexpr |
Wraps a pendable member function in an object which has a single Pend
method, allowing it to be used more broadly.
The wrapper stores the arguments used to invoke the target function. As a result, the argument types must be copyable.
The wrapping pendable object can only be used a single time. After its Pend
method returns Ready
, it will crash if called again.