tags:

views:

29

answers:

1

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 ?

+3  A: 

You need ; after each class definition, but aside of that your syntax is correct and works.

sth