DIP60: @nogc attribute

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Fri Apr 18 00:38:23 PDT 2014


On 4/17/2014 11:50 PM, Brad Anderson wrote:
> But surely something like:
>
> struct S
> {
>       this(int d) { data = d; }
>       S opBinary(string op)(S rhs) @nogc
>       {
>         return S(mixin("data "~op~" rhs.data"));
>       }
>
>       private int data;
> }
>
> Would still work, right? There is no GC activity there.

Right, because there is no gc activity!


More information about the Digitalmars-d mailing list