Top "Variadic-templates" questions

Variadic templates are templates that take a variable number of parameters.

"unpacking" a tuple to call a matching function pointer

I'm trying to store in a std::tuple a varying number of values, which will later be used as arguments …

c++ function-pointers c++11 variadic-templates iterable-unpacking
make_unique and perfect forwarding

Why is there no std::make_unique function template in the standard C++11 library? I find std::unique_ptr<…

c++ c++11 variadic-templates unique-ptr perfect-forwarding
How can I iterate over a packed variadic template argument list?

I'm trying to find a method to iterate over an a pack variadic template argument list. Now as with all …

c++ c++11 variadic-templates
Variadic template pack expansion

I am trying to learn variadic templates and functions. I can't understand why this code doesn't compile: template<typename …

c++ templates c++11 variadic-templates
How would one call std::forward on all arguments in a variadic function?

I was just writing a generic object factory and using the boost preprocessor meta-library to make a variadic template (using 2010 …

c++ c++11 variadic-templates rvalue-reference perfect-forwarding
Variadic template templates and perfect forwarding

This question on the object generator pattern got me thinking about ways to automate it. Essentially, I want to automate …

c++ c++11 variadic-templates template-templates
C++11: Number of Variadic Template Function Parameters?

How can I get a count of the number of arguments to a variadic template function? ie: template<typename... …

c++ c++11 variadic-templates variadic-functions
Calling a function for each variadic template argument and an array

So I have some type X: typedef ... X; and a template function f: class <typename T> void f(…

c++ templates c++11 variadic-templates
How to store variadic template arguments?

Is it possible to store a parameter pack somehow for a later use? template <typename... T> class Action { …

c++ c++11 variadic-templates
How can I have multiple parameter packs in a variadic template?

Function one() accepts one parameter pack. Function two() accepts two. Each pack is constrained to be wrapped in types A …

c++ c++11 variadic-templates