search

Home  >  Q&A  >  body text

c++ 类名后<>里面的内容代表什么?

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

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

reply all(2)I'll reply

  • 怪我咯

    怪我咯2017-04-17 14:44:37

    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

    reply
    0
  • 伊谢尔伦

    伊谢尔伦2017-04-17 14:44:37

    Template parameter link description

    reply
    0
  • Cancelreply