22 Jan
2007
22 Jan
'07
4:59 p.m.
Server Levent Yilmaz wrote:
On 1/22/07, Paul Giaccone
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.