Template bug in gcc-2.95-2 on i386-redhat-linux
Oskar Enoksson
osken393@student.liu.se
Mon Sep 11 11:48:00 GMT 2000
Hi. The following code is mysteriously rejected on my gcc-2.95-2
i386-redhat-linux.
I would be grateful for any hints to get around it, I have tried using
parentheses around
the foo.Bar<float>(3) function call but without success. The ultimate
help would be
a bug fix of course ...
Regards
/Oskar Enoksson
//////// foo.cpp ///////////
class Foo {
public:
template<class T> void Bar(int i);
};
template<class T>
void test(Foo &foo) {
foo.Bar<float>(3);
}
int main() {
Foo foo;
test<float>(foo);
}
/////////////////
> c++ -c --ansi --pedantic -Wall foo.cpp
foo.cpp: In function `void test(Foo &)':
foo.cpp:8: parse error before `>'
>
More information about the Gcc-bugs
mailing list