|
Boost Users : |
From: Hossein Haeri (powerprogman_at_[hidden])
Date: 2006-05-06 06:40:12
Hi Jeff.
> bind( newPrint // instance of function
> object
> , _1 // placeholder to recieve
> *value_type::const_iterator
Oops! Not AFAICS. Consider its equivalent for:
for(typename Container::const_iterator j = c.begin();
j != c.end(); ++j)
newPrint(*j, out);
This means that _1 is meant to recieve
*Container::const_iterator which is exactly what I
pass to for_each:
for_each(c.begin(), c.end(), bind(newPrint, _2, out));
> I think your problems lie elsewhere. Try this out
> with simpler non-templated, non-recursive functions
> first.
Hmmm... I guess I know enough about those trivial
situations. And, I need it as it is. Furthermore, the
for loop works, which means that there shouldn't be
ant problem any way else... :(
Cheers,
--Hossein
___________________________________________________________
NEW Yahoo! Cars - sell your car and browse thousands of new and used cars online! http://uk.cars.yahoo.com/
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net