compiler error 980715

Alexandre Oliva oliva@dcc.unicamp.br
Wed Sep 23 23:51:00 GMT 1998


Thomas Matelich <tmatelich@zetec.com> writes:

> template < class T, class U > T implicit_cast(const U& u) { return u; }

>         transform(source.begin(), source.end(), dest.begin(),
>                   implicit_cast<short, double>);

> GNU C++ version egcs-2.91.57 19980901 (egcs-1.1 release)
> implicit_cast.cc: In function `int main()':
> implicit_cast.cc:15: Internal compiler error 980715.
> implicit_cast.cc:15: Please submit a full bug report to
> `egcs-bugs@cygnus.com'.

Yep, known problem.  Unfortunately, I don't know how hard it is to
fix it :-(

You can work around it by explicitly casting the template-id to the
appropriate pointer-to-function type.

-- 
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