struct destructors
Janice Caron
caron800 at googlemail.com
Fri Mar 7 02:08:20 PST 2008
On 07/03/2008, John C <johnch_atms at hotmail.com> wrote:
> > Oh - one more. What's a postblit?
>
> http://www.digitalmars.com/d/2.0/struct.html
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?
More information about the Digitalmars-d
mailing list