I'm struggling with C++ templates. This is simplified version of my code. In real, I have it separated into .cpp and .h files, but I just made it short to show the problem.
#include <iostream>
template<typename T>
class GenericColor
{
};
template<typename T>
class RGB : public GenericColor<T>
{
public:
HSV toHSV();
};
class HSV : public GenericColor<double>
{
};
The compilation result is:
prog.cpp:12:2: error: ‘HSV’ does not name a type
HSV toHSV();
^