This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Probably a bug


template<class _T> class Template {
public:
 virtual void foo();
};

template<class _T> void Template<_T>::foo() {
}

template<> class Template<const char*> {
public:
 virtual void foo();
};

template<> void Template<const char*>::foo() {
}

---------------------------------------------
bash-2.02$ c++.exe test_cpp.cpp -o test_cpp.exe
test_cpp.cpp:27: template-id `foo<>' for `Template<const char *>::foo()'
does not match any template declaration
test_cpp.cpp:27: syntax error before `{'

---------------------------------------------
bash-2.02$ c++ -v
Reading specs from
/dev/drv_e/cygnus/CYGWIN~1/H-I586~1/bin/../lib/gcc-lib/i586-c
ygwin32/2.95.2/specs
gcc version 2.95.2 19991024 (release)



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]