c++ 类名后<>里面的内容代表什么?
黄舟
黄舟 2017-04-17 14:42:37
0
2
451

下面一个模板,TArgs前面那...有什么意义?
类名linq_lambda_retriver后<>里面的内容的应该如何理解?

template<typename TClass, typename TResult, typename ...TArgs>
    struct linq_lambda_retriver<TResult(__thiscall TClass::*)(TArgs...)const>
    {
        typedef TResult ResultType;
    };
黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

reply all(2)
刘奇

Template parameters
here are templatelinq_lambda_retriverspecialized parameters, and they are template parameters with variable length
, which means that the return value type is probably TResult and the parameter is TArgs... (this is Parameter pack expansion) The calling convention is a __thiscall of TClass of a const member function pointer type

伊谢尔伦

Template parameter link description

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template