프로그래밍/C++
template compile error
반응형
I'm guessing, as you haven't given enough information. It is usually a good idea to give a small but complete example that illustrates your problem. The code you've give will not trigger such an error (at least, not by itself).
Assuming you have defined a template class something like;
Assuming you have defined a template class something like;
template<class T> Image
{
// whatever
};
{
// whatever
};
then your reference to a Image<bool> is a specialisation of this template. What the compiler is attempting to tell you is that your definition needs to be in the form;
template<> class Image<bool>
{
// whatever you need for Image<bool>
};
{
// whatever you need for Image<bool>
};
gcc 컴파일러의 버전이 3.X.X로 올라가면서 2.9.6의 코드가 컴파일이 되지 않는다.
컴파일러님께서 하시라는 대로 하면 된다...
반응형
댓글