LeechCraft  0.6.70-18450-gabe19ee3b0
Modular cross-platform feature rich live environment.
LC::Util::detail::MethodAwaiter< Ctx, F, Args > Struct Template Reference

#include "metamethod.h"

Public Types

using R = std::invoke_result_t< std::decay_t< F >, Ctx &, std::decay_t< Args >... >
 

Public Member Functions

bool await_ready () const noexcept
 
void await_suspend (std::coroutine_handle<> handle) noexcept
 
R await_resume () const
 

Public Attributes

Ctx & Ctx_
 
std::decay_t< F > Method_
 
std::tuple< Ctx &, std::decay_t< Args >... > Args_
 
std::conditional_t< IsVoid, Void, std::optional< R > > Result_ {}
 
std::exception_ptr Exception_ {}
 
std::atomic_bool Ready_ { false }
 

Static Public Attributes

static constexpr bool IsVoid = std::is_same_v<R, void>
 

Detailed Description

template<typename Ctx, typename F, typename... Args>
struct LC::Util::detail::MethodAwaiter< Ctx, F, Args >

Definition at line 18 of file metamethod.h.

Member Typedef Documentation

◆ R

template<typename Ctx , typename F , typename... Args>
using LC::Util::detail::MethodAwaiter< Ctx, F, Args >::R = std::invoke_result_t<std::decay_t<F>, Ctx&, std::decay_t<Args>...>

Definition at line 24 of file metamethod.h.

Member Function Documentation

◆ await_ready()

template<typename Ctx , typename F , typename... Args>
bool LC::Util::detail::MethodAwaiter< Ctx, F, Args >::await_ready ( ) const
inlinenoexcept

Definition at line 33 of file metamethod.h.

◆ await_resume()

◆ await_suspend()

Member Data Documentation

◆ Args_

template<typename Ctx , typename F , typename... Args>
std::tuple<Ctx&, std::decay_t<Args>...> LC::Util::detail::MethodAwaiter< Ctx, F, Args >::Args_

◆ Ctx_

template<typename Ctx , typename F , typename... Args>
Ctx& LC::Util::detail::MethodAwaiter< Ctx, F, Args >::Ctx_

◆ Exception_

template<typename Ctx , typename F , typename... Args>
std::exception_ptr LC::Util::detail::MethodAwaiter< Ctx, F, Args >::Exception_ {}

◆ IsVoid

template<typename Ctx , typename F , typename... Args>
constexpr bool LC::Util::detail::MethodAwaiter< Ctx, F, Args >::IsVoid = std::is_same_v<R, void>
static

◆ Method_

template<typename Ctx , typename F , typename... Args>
std::decay_t<F> LC::Util::detail::MethodAwaiter< Ctx, F, Args >::Method_

◆ Ready_

template<typename Ctx , typename F , typename... Args>
std::atomic_bool LC::Util::detail::MethodAwaiter< Ctx, F, Args >::Ready_ { false }

◆ Result_

template<typename Ctx , typename F , typename... Args>
std::conditional_t<IsVoid, Void, std::optional<R> > LC::Util::detail::MethodAwaiter< Ctx, F, Args >::Result_ {}

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