Boost logo

Boost Users :

Subject: Re: [Boost-users] shared_ptr: struct of 3 shared_ptrs: is operator= for struct required?
From: Roman Perepelitsa (roman.perepelitsa_at_[hidden])
Date: 2009-07-10 05:04:17


2009/7/10 Hicham Mouline <hicham_at_[hidden]>

> 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?
>

Yes.

Roman Perepelitsa.



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