Boost logo

Boost Users :

From: Paul Giaccone (paulg_at_[hidden])
Date: 2007-01-22 11:59:50


Server Levent Yilmaz wrote:
> On 1/22/07, Paul Giaccone <paulg_at_[hidden]> wrote:
>> So what am I missing here?
>>
>
> You are missing a copy constructor. Even though my_test() takes
> arguments by reference, Boost.Bind binds them by value and since you
> have scoped_array you need to provide a copy constructor (in addition
> to operator=) yourself.
>
Thanks, that worked.
> Or, you can bind by reference:
>
> boost::bind( ... , ref(obj3), ... )
>
This didn't: the shared_arrays my object contained 10 objects when they
were created but only 3 after being passed to the function. Not to worry
anyhow, as the "proper" method of supplying and copy constructor and an
assignment operator worked fine.


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