20 Apr
2005
20 Apr
'05
3:33 p.m.
Hi, I have some code that runs fine: for (Partition::iterator pi = renderRegions.begin(); pi != renderRegions.end(); ++pi); (*pi)->render(<t, foo, si); I try to replace it by for_each & boost::bind, std::for_each(renderRegions.begin(), renderRegions.end(), boost::bind(&Region::render, _1, <t, foo, si)); but si doesn't get modified, while it should be passed as reference. Some more relevant code: class Region { ... void render(const LightTransportType* ltt, WorkAppraiser& wa, image::SampleImage& result); ... }; typedef std::vector< Region* > Partition; Partition renderRegions; Is this normal behaviour? -- With kind regards, Mathieu