
4 Jul
2003
4 Jul
'03
5:23 p.m.
G'day Jaakko, That was quick. Thanks.
Here, gen_long() is invoked and the resulting value is stored in the lambda functor, which is passed to for_each. You need to delay the call of gen_long with bind:
for_each(v.begin(), v.end(), _1 = bind(gen_long));
Jaakko
Yep, that's how I originally had it. Generates lots of compile errors with GCC 3.2 (mingw). Tried the gen_long() version with VC7 and Intel 7.1 and that will not work. Nor will the bind version. Any clues? Regards, Matt.