Boost logo

Boost Users :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2006-06-26 09:40:34


Jiri Palecek wrote:
> On Mon, 26 Jun 2006 13:52:24 +0200, Lars Monecke <lars_at_[hidden]>
> wrote:

[...]

>> for_each(cInts.begin(),
>> cInts.end(),
>> boost::bind(&tSignal::operator(),
>> boost::ref(stSignal),
>> _1));
>>
>> return 0;
>> }
>> ---code ends here
>
>> Any hints?
> Doesn't something like
> for_each(...,...,bind(stSignal,_1));
>
> work?

Signals are noncopyable, but

for_each( cInts.begin(), cInts.end(), boost::bind( boost::ref( stSignal ),
_1 ) );

should work.


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