Bitcoin Core 31.0.0
P2P Digital Currency
Loading...
Searching...
No Matches
mp::FunctionTraits< _Result(_Class::*const)(_Params...)> Struct Template Reference

#include <proxy.h>

Public Types

using Params = TypeList<_Params...>
using Result = _Result
template<size_t N>
using Param = typename std::tuple_element<N, std::tuple<_Params...>>::type
using Fields

Static Public Member Functions

template<size_t N>
static decltype(auto) Fwd (Param< N > &arg)

Detailed Description

template<class _Class, class _Result, class... _Params>
struct mp::FunctionTraits< _Result(_Class::*const)(_Params...)>

Specialization of above extracting result and params types assuming the template argument is a pointer-to-method type, decltype(&ClassName::methodName)

Definition at line 223 of file proxy.h.

Member Typedef Documentation

◆ Fields

template<class _Class, class _Result, class... _Params>
using mp::FunctionTraits< _Result(_Class::*const)(_Params...)>::Fields
Initial value:
std::conditional_t<std::is_same_v<void, Result>, Params, TypeList<_Params..., _Result>>
Generic utility functions used by capnp code.
Definition util.h:33

Definition at line 229 of file proxy.h.

◆ Param

template<class _Class, class _Result, class... _Params>
template<size_t N>
using mp::FunctionTraits< _Result(_Class::*const)(_Params...)>::Param = typename std::tuple_element<N, std::tuple<_Params...>>::type

Definition at line 228 of file proxy.h.

◆ Params

template<class _Class, class _Result, class... _Params>
using mp::FunctionTraits< _Result(_Class::*const)(_Params...)>::Params = TypeList<_Params...>

Definition at line 225 of file proxy.h.

◆ Result

template<class _Class, class _Result, class... _Params>
using mp::FunctionTraits< _Result(_Class::*const)(_Params...)>::Result = _Result

Definition at line 226 of file proxy.h.

Member Function Documentation

◆ Fwd()

template<class _Class, class _Result, class... _Params>
template<size_t N>
decltype(auto) mp::FunctionTraits< _Result(_Class::*const)(_Params...)>::Fwd ( Param< N > & arg)
inlinestatic

Enable perfect forwarding for clientInvoke calls. If parameter is a value type or rvalue reference type, pass it as an rvalue-reference to MakeClientParam and BuildField calls so it can be moved from, and if it is an lvalue reference, pass it an lvalue reference so it won't be moved from. This method does the same thing as std::forward except it takes a parameter number instead of a type as a template argument, so generated code calling this can be less repetitive and verbose.

Definition at line 240 of file proxy.h.


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