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

template<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 function_traits_helper<R(*)(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;
};

template<typename R,
    typename Arg13,
    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 function_traits_helper<R(*)(Arg13,Arg12,Arg11,Arg10,Arg9,Arg8,Arg7,Arg6,Arg5,Arg4,Arg3,Arg2,Arg1)>
{
    typedef Arg13 arg13;
    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 = 13};
    typedef R result_type;
};

template<typename R,
    typename Arg14,
    typename Arg13,
    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 function_traits_helper<R(*)(Arg14,Arg13,Arg12,Arg11,Arg10,Arg9,Arg8,Arg7,Arg6,Arg5,Arg4,Arg3,Arg2,Arg1)>
{
    typedef Arg14 arg14;
    typedef Arg13 arg13;
    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 = 14};
    typedef R result_type;
};

template<typename R,
    typename Arg15,
    typename Arg14,
    typename Arg13,
    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 function_traits_helper<R(*)(Arg15,Arg14,Arg13,Arg12,Arg11,Arg10,Arg9,Arg8,Arg7,Arg6,Arg5,Arg4,Arg3,Arg2,Arg1)>
{
    typedef Arg15 arg15;
    typedef Arg14 arg14;
    typedef Arg13 arg13;
    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 = 15};
    typedef R result_type;
};

template<typename R,
    typename Arg16,
    typename Arg15,
    typename Arg14,
    typename Arg13,
    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 function_traits_helper<R(*)(Arg16,Arg15,Arg14,Arg13,Arg12,Arg11,Arg10,Arg9,Arg8,Arg7,Arg6,Arg5,Arg4,Arg3,Arg2,Arg1)>
{
    typedef Arg16 arg16;
    typedef Arg15 arg15;
    typedef Arg14 arg14;
    typedef Arg13 arg13;
    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 = 16};
    typedef R result_type;
};

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

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