This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: ICE for 19980425: problem with template function as arg to for_each


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]