This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: ICE for 19980425: problem with template function as arg to for_each
- To: andrew james robbie <ajrobb at ee dot mu dot OZ dot AU>
- Subject: Re: ICE for 19980425: problem with template function as arg to for_each
- From: Alexandre Oliva <oliva at dcc dot unicamp dot br>
- Date: 29 Apr 1998 03:55:50 -0300
- Cc: egcs-bugs at cygnus dot com
- References: <199804290529.PAA12853@munagin.ee.mu.OZ.AU>
andrew james robbie <ajrobb@ee.mu.OZ.AU> writes:
> template <class X> void show(X);
> set<int> s1;
> for_each(s1.begin(), s1.end(), show);
In this particular case, you must specify the template argument, i.e.,
`show<int>'. Unfortunately, this won't work with the latest snapshot
either; but `&show<int>' does (not the leading address-of operator).
--
Alexandre Oliva
mailto:oliva@dcc.unicamp.br mailto:aoliva@acm.org
http://www.dcc.unicamp.br/~oliva
Universidade Estadual de Campinas, SP, Brasil