struct destructors
John C
johnch_atms at hotmail.com
Fri Mar 7 02:35:00 PST 2008
Janice Caron wrote:
> Gosh. But isn't the opAssign example wrong? It says:
>
> S* opAssign(ref const S s)
> {
> a = s.a;
> return this;
> }
>
> but I rather think it should be
>
> S* opAssign(ref const S s)
> {
> a[] = s.a[];
> return this;
> }
>
> since you don't /want/ this to share the same workspace as s. Am I
> missing something, or is this a documentation bug?
In the example, 'a' refers to an int. So no.
More information about the Digitalmars-d
mailing list