Reputation: 81
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 ?
Upvotes: 2
Views: 81
Reputation: 229874
You need ;
after each class definition, but aside of that your syntax is correct and works.
Upvotes: 3