Specialization of template class for a given templated class

Posted by Maxime on Stack Overflow See other posts from Stack Overflow or by Maxime
Published on 2010-05-12T18:10:51Z Indexed on 2010/05/12 18:14 UTC
Read the original article Hit count: 269

Filed under:
|

I have a templated class Matrix. I want to write a specialization for complex numbers. How can I do that ?

I suspect this won't work :

template <typename T>
class Matrix { ... }

template <typename T2>
class Matrix<std::complex<T2> > { ... }

But what will ?

© Stack Overflow or respective owner

Related posts about c++

Related posts about templates