Struct dtor on ref variable

Steven Schveighoffer via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Aug 1 09:05:51 PDT 2016


On 8/1/16 12:01 PM, Patric wrote:

> I expected nothing to happen because "ref" its a simple pointer, right?
> Or I am missing something here?
>

You want opAssign, not opOpAssign. opOpAssign is for things like +=.

Your code had me worried for a while :)

-Steve


More information about the Digitalmars-d-learn mailing list