Boost logo

Boost Users :

Subject: [Boost-users] shared_ptr: struct of 3 shared_ptrs: is operator= for struct required?
From: Hicham Mouline (hicham_at_[hidden])
Date: 2009-07-10 04:52:55


Hello

Copying structs by default means memberwise copy. If I have a
struct S {
 shared_ptr<T1> ptr1;
 shared_ptr<T2> ptr2;
 shared_ptr<T3> ptr3;
};

and i have 2 instances s1 and s2

s1=s2 will call shared_ptr<T.> 's operator=(), right?

Regards,


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