Boost logo

Boost Users :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2006-05-06 13:32:07


Hossein Haeri wrote:
> Hi Peter,
>
>> for_each(c.begin(), c.end(), bind(newPrint, _1,
>> ref(out)));
>
> Doesn't work either! The error file GCC (3.3.1) gives
> me is in the P.S. Is GGC right?
>
> And, BTW, thanks for letting me know about ref()! :)

[...]

> E:/Program Files/Dev-Cpp/include/boost/bind.hpp:62:
> error: no type named `
> result_type' in `struct PrintAux<std::vector<int,
> std::allocator<int> >, 1>'

You either need a result_type typedef in PrintAux, or

for_each(c.begin(), c.end(), bind<void>(newPrint, _1,
    ref(out)));


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