c++ template bug
Alexandre Oliva
oliva@dcc.unicamp.br
Wed Jul 29 03:29:00 GMT 1998
Mark Mitchell <mark@markmitchell.com> writes:
>>>>>> "root" == root <root@ptpp09.phy.tu-dresden.de> writes:
root> template<class T> class A { public: void f(); };
root> class B : public A<int> { public: void f(); };
root> int main() { B b; B& b1 = b; b1.A<int>::f(); }
> I would have figured I had broken this with the changes I made last
> night, were it not for the fact that this appears to happen on the 1.1
> branch as well as the mainline.
What do you mean? With the latest snapshot, on sparc-sun-solaris2.5,
I only get:
/tmp/ccFz204I.o: In function `main':
/tmp/ccFz204I.o(.text+0x10): undefined reference to `A<int>::f(void)'
which is quite reasonable, given that A<int>::f() is not defined...
--
Alexandre Oliva
mailto:oliva@dcc.unicamp.br mailto:aoliva@acm.org
http://www.dcc.unicamp.br/~oliva
Universidade Estadual de Campinas, SP, Brasil
More information about the Gcc-bugs
mailing list