Passing Variable Number of Arguments with different type - C++

后端 未结 6 807
闹比i
闹比i 2020-11-30 09:33

I am coding in C++ and have a few questions regarding the ellipsis:

  1. Is it possible to pass in class or class pointer into the ellipsis?

  2. Basi

6条回答
  •  有刺的猬
    2020-11-30 10:00

    Using C++0x variadic templates, you can pack all your arguments into a tuple and use the code I posted in the thread below to unpack them into a function call (static function or object function).

    How do I expand a tuple into variadic template function's arguments?

提交回复
热议问题