Internal compiler error -- egcs 1.1b -- transforming with a function template
Alexandre Oliva
oliva@dcc.unicamp.br
Tue Sep 22 16:04:00 GMT 1998
Maciej Radziejewski <maciejr@iws.uni-stuttgart.de> writes:
> I've stumbled upon one more internal compiler error in egcs release 1.1b.
> This one has probably already been detected, since it bears a date.
Yep, and there's a known workaround: just cast the template-id to the
appropriate function type and uncomment the inclusion of algo.h and it
should work.
> #include <vector>
> //#include <algo.h>
> template<class T> T simple_function (T arg) { return arg; }
> int main() { vector<int> V(4);
> transform (V.begin(), V.end(), V.begin(), simple_function<int>); }
--
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