- Exercises

Let's solve a couple of exercises to test your understanding of variadic templates.

We'll cover the following

Try It Out!

The function createT in the Example 2 is the perfect factory function because it can invoke each constructor. Try to find a constructor call, which cannot be used in the function template createT.

Get hands-on with 1200+ tech skills courses.