Хай!
На MSVC2005 не компилится код:
template<const long PropertyID, class Type, class BaseType, class OwnerType>
class TProperty : public TBaseProperty
{
//...
private:
static defString name;
//...
};
template<const long PropertyID, class Type, class BaseType, class OwnerType>
defString TProperty<PropertyID, Type, BaseType, OwnerType>::name=_T(""); //OK!
template<class Type, class BaseType, class OwnerType>
defString TProperty<1, Type, BaseType, OwnerType>::name=_T("1"); //не компилится частичная специализация шаблона
template<class Type, class BaseType, class OwnerType>
defString TProperty<2, Type, BaseType, OwnerType>::name=_T("2"); //не компилится частичная специализация шаблона
Ошибки:
error C3860: template argument list following class template name must list parameters in the order used in template parameter list
error C2086: 'std::string TProperty<PropertyID,Type,BaseType,OwnerType>::name' : redefinition
Как правильно чтобы компилялось?