C++类型萃取编写技巧(5)

template<typename Classtype,typename R,typename Arg7,typename Arg6,typename Arg5,typename Arg4,typename Arg3,typename Arg2,typename Arg1>
struct mfunction_traits_helper<R(Classtype::*)(Arg7,Arg6,Arg5,Arg4,Arg3,Arg2,Arg1)>
{
    typedef Arg7 arg7;
    typedef Arg6 arg6;
    typedef Arg5 arg5;
    typedef Arg4 arg4;
    typedef Arg3 arg3;
    typedef Arg2 arg2;
    typedef Arg1 arg1;

enum{arity = 7};
    typedef R result_type;
    typedef Classtype class_type;
};

template<typename Classtype,typename R,typename Arg8,typename Arg7,typename Arg6,typename Arg5,typename Arg4,typename Arg3,typename Arg2,typename Arg1>
struct mfunction_traits_helper<R(Classtype::*)(Arg8,Arg7,Arg6,Arg5,Arg4,Arg3,Arg2,Arg1)>
{
    typedef Arg8 arg8;
    typedef Arg7 arg7;
    typedef Arg6 arg6;
    typedef Arg5 arg5;
    typedef Arg4 arg4;
    typedef Arg3 arg3;
    typedef Arg2 arg2;
    typedef Arg1 arg1;

enum{arity = 8};
    typedef R result_type;
    typedef Classtype class_type;
};

template<typename Classtype,typename R,
    typename Arg9,
    typename Arg8,typename Arg7,typename Arg6,typename Arg5,typename Arg4,typename Arg3,typename Arg2,typename Arg1>
struct mfunction_traits_helper<R(Classtype::*)(Arg9,Arg8,Arg7,Arg6,Arg5,Arg4,Arg3,Arg2,Arg1)>
{
    typedef Arg9 arg9;
    typedef Arg8 arg8;
    typedef Arg7 arg7;
    typedef Arg6 arg6;
    typedef Arg5 arg5;
    typedef Arg4 arg4;
    typedef Arg3 arg3;
    typedef Arg2 arg2;
    typedef Arg1 arg1;

enum{arity = 9};
    typedef R result_type;
    typedef Classtype class_type;
};

template<typename Classtype,typename R,
    typename Arg10,
    typename Arg9,
    typename Arg8,typename Arg7,typename Arg6,typename Arg5,typename Arg4,typename Arg3,typename Arg2,typename Arg1>
struct mfunction_traits_helper<R(Classtype::*)(Arg10,Arg9,Arg8,Arg7,Arg6,Arg5,Arg4,Arg3,Arg2,Arg1)>
{
    typedef Arg10 arg10;
    typedef Arg9 arg9;
    typedef Arg8 arg8;
    typedef Arg7 arg7;
    typedef Arg6 arg6;
    typedef Arg5 arg5;
    typedef Arg4 arg4;
    typedef Arg3 arg3;
    typedef Arg2 arg2;
    typedef Arg1 arg1;

enum{arity = 10};
    typedef R result_type;
    typedef Classtype class_type;
};

template<typename Classtype,typename R,
    typename Arg11,
    typename Arg10,
    typename Arg9,
    typename Arg8,typename Arg7,typename Arg6,typename Arg5,typename Arg4,typename Arg3,typename Arg2,typename Arg1>
struct mfunction_traits_helper<R(Classtype::*)(Arg11,Arg10,Arg9,Arg8,Arg7,Arg6,Arg5,Arg4,Arg3,Arg2,Arg1)>
{
    typedef Arg11 arg11;
    typedef Arg10 arg10;
    typedef Arg9 arg9;
    typedef Arg8 arg8;
    typedef Arg7 arg7;
    typedef Arg6 arg6;
    typedef Arg5 arg5;
    typedef Arg4 arg4;
    typedef Arg3 arg3;
    typedef Arg2 arg2;
    typedef Arg1 arg1;

enum{arity = 11};
    typedef R result_type;
    typedef Classtype class_type;
};

template<typename Classtype,typename R,
    typename Arg12,
    typename Arg11,
    typename Arg10,
    typename Arg9,
    typename Arg8,typename Arg7,typename Arg6,typename Arg5,typename Arg4,typename Arg3,typename Arg2,typename Arg1>
struct mfunction_traits_helper<R(Classtype::*)(Arg12,Arg11,Arg10,Arg9,Arg8,Arg7,Arg6,Arg5,Arg4,Arg3,Arg2,Arg1)>
{
    typedef Arg11 arg11;
    typedef Arg10 arg10;
    typedef Arg9 arg9;
    typedef Arg8 arg8;
    typedef Arg7 arg7;
    typedef Arg6 arg6;
    typedef Arg5 arg5;
    typedef Arg4 arg4;
    typedef Arg3 arg3;
    typedef Arg2 arg2;
    typedef Arg1 arg1;

enum{arity = 12};
    typedef R result_type;
    typedef Classtype class_type;
};

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/4b11dba9eca97ff5bf235e221cf6c9e1.html