template 으로 다음과 같은 클래스를 만드는데.. vc 6.0 에서
다음과 같은 에러가 나오는데 어떻게 해결해야지 모르겠습니다. 조언좀 부탁바랍니다.
:\vss_project\quark\dimension\tunit.h(53) : fatal error C1001: INTERNAL COMPILER ERROR
(compiler file 'msc1.cpp', line 1794)
Please choose the Technical Support command on the Visual C++
Help menu, or open the Technical Support help file for more information
D:\VSS_Project\Quark\Dimension\Dimension.cpp(1240902) : see reference to class template instantiation '<Unknown>' being compiled
소스는 다음과 같습니다.
Code: Select all
template<class _TX, class _Dim, double _Unit>
struct TUNIT : public TQuantity<_TX,_Dim>
{
typedef TQuantity<_TX,_Dim> value_type;
public:
TUNIT(_TX _value=0.) : m_unit(_Unit), value_type(_value)
{
}
template<double _otherUnit>
TUNIT(TUNIT<_TX,_Dim, _otherUnit> const& _nUnit)
{
}
private:
double m_unit;
};
생성자에서 _Unit값이다른 type을 받고 싶은건데요.. 혹시 아는시분 알려주시면 감사하겠습니다.
Code: Select all
template<double _otherUnit>
TUNIT(TUNIT<_TX,_Dim, _otherUnit> const& _nUnit)
{
}