lundi 23 janvier 2017

Is it possible to use "using" to specialize a class template?

For example

template<int N> class A;

and I want to specialize it with N = 2 as std::array<int, 2> (only for 2)

template<> using A<2> = std::array<int, 2>; //??? grammar wrong

How to do it? Or any alternative ways?

Aucun commentaire:

Enregistrer un commentaire