Sorry; stupid mistake.
The operator should have taken a shared_ptr; I have corrected my example again.
If you are intirested, the shared_ptr class is documented at http://www.boost.org/libs/smart_ptr/shared_ptr.htm
And my example does now compile.
I do still have a case that doesn't, but it's quite a large block of code and I think I've got a workaround anyway. If I can reduce it to a manageable test case when I have more time then I'll re-post.
Sorry for wasting your time, and thanks for your help,