On 1/22/07, Paul Giaccone
I wondered if it was necessary to overload operator= for Obj3Type as, presumably, the compiler cannot generate it for the scoped arrays in that struct but can for everything in Obj4Type, including Vector, for which I have defined operator=. I wrote an operator= for Obj3Type, but it made no difference to the compiler error. This was to be expected really, as obj3 is passed by reference rather than by value.
Does it have anything to do with using structs instead of classes? I can't see how that could be the case.
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. Or, you can bind by reference: boost::bind( ... , ref(obj3), ... ) hth -- Server Levent Yilmaz Mechanical Engineering @ PITT