mardi 28 juin 2016

How to explicitly instantiate class with default template arguments in C++?

I have a class with type and non-type(default) template parameters. The non-type parameters could be combined, and can be instantiated in the following ways:

TNT<int> v;
TNT<double, X, Y> v2;
TNT<float, X | X1, Y1> v3;
TNT<int, X | X1, Y | Y1, Z | Z1 | Z2, W> v4;

The class TNT has a type parameter, and rest are default. What is the correct way to explicitly instantiate such a class in the cpp file? Since the non-type parameters could be combined, a lot of combinations are possible.

Aucun commentaire:

Enregistrer un commentaire