Bitcoin Core 29.99.0
P2P Digital Currency
Public Types | Static Public Member Functions | List of all members
mp::FunctionTraits< _Result(_Class::*const)(_Params...)> Struct Template Reference

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

#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 = std::conditional_t< std::is_same_v< void, Result >, Params, TypeList< _Params..., _Result > >
 

Static Public Member Functions

template<size_t N>
static decltype(auto) Fwd (Param< N > &arg)
 Enable perfect forwarding for clientInvoke calls. More...
 

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 195 of file proxy.h.

Member Typedef Documentation

◆ Fields

template<class _Class , class _Result , class... _Params>
using mp::FunctionTraits< _Result(_Class::*const)(_Params...)>::Fields = std::conditional_t<std::is_same_v<void, Result>, Params, TypeList<_Params..., _Result> >

Definition at line 201 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 200 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 197 of file proxy.h.

◆ Result

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

Definition at line 198 of file proxy.h.

Member Function Documentation

◆ Fwd()

template<class _Class , class _Result , class... _Params>
template<size_t N>
static 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 212 of file proxy.h.


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