Boost logo

Boost Users :

Subject: Re: [Boost-users] [move] move emulation with bind?
From: Tim Blechmann (tim_at_[hidden])
Date: 2010-07-25 15:19:25


>> i'm trying to make one of my classes movable. however i have some issues
>> when using it with boost::bind:
>>
>> class my_movable_class;
>> void my_function(my_movable_class const&);
>>
>> this doesn't compile:
>> boost::bind(my_function, boost::move(my_movable_class))
>>
>> the reason is, that the members of boost::rv are private ...
>>
>> is this my fault or an issue with the move emulation?
>>
>> thanks, tim
>
> If you catch by const reference, then why do you call move()?

broken out of a more complex use case (i am using boost.bind to create
callback objects, that are passed between threads ... the payload should be
moved along ...

> Bind
> copies arguments so I think it won't work with boost::rv unless bind
> recognizes it as an special class and forwards it accordingly.

i see ... i'll test it, when it is ready!

thanks, tim

-- 
tim_at_[hidden]
http://tim.klingt.org
Most of the trouble in this world has been caused by folks who can't
mind their own business, because they have no business of their own to
mind, any more than a smallpox virus has.
  William S. Burroughs

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