DIP 36: Rvalue References

Dicebot m.strashun at gmail.com
Tue Apr 23 01:16:26 PDT 2013


On Wednesday, 10 April 2013 at 07:39:25 UTC, Zach the Mystic 
wrote:
> ...

Kind of. I am thinking that scope is best when transitive for 
aggregation but not for indirection:

struct S { int a; int *b; }

void foo(scope S s)
{
     static int *x1 = &(s.a); // error
     static int *x2 = s.b; // fine
}


More information about the Digitalmars-d mailing list