У меня проблемы со специализацией класса шаблона, пожалуйста, смотрите код ниже.
template <typename T>
class Point
{
private
T x, y;
typedef T Type;
public:
Point ( const T & x_, const T & y_) : x ( x_ ), y ( y_ ) {}
};
template <typename Item>
struct TItems
{
typedef std::vector <Item> Type;
};
template <typename Item>
class Container
{
protected:
typename TItems <Item>::Type items;
public:
typedef Item type;
};
Можно ли специализировать класс Container для Point?
Обновленный вопрос:
Я попробовал следующий код, он действителен?
template <typename T>
class Container < Point <T> >
{
};
int _tmain(int argc, _TCHAR* argv[])
{
return 0;
Container <Point <double> > points;
}