STL algorithms and GiNaC::lst

Sheplyakov Alexei varg at thsun1.jinr.ru
Tue Jan 27 23:07:03 CET 2004


Hi!

> > 	lst_prod test;
> > 	for_each(l.begin(), l.end(), test);
> 
> The functor used by for_each() is a copy of "test".

Yes... Looks like I need [more] RTFM...

> Try this instead:
> 
>     lst_prod test = for_each(l.begin(), l.end(), lst_prod());

Thanks, it works as expected. Sorry for a silly question...




More information about the GiNaC-list mailing list