scope as storage class

Namespace rswhite4 at googlemail.com
Thu Sep 27 04:51:54 PDT 2012


My handy has send to soon....

This code:

int counter;

void foo(scope int a) {
     counter = a;
}

void main() {
     int num = 42;
     foo(num);
}

works fine but I think it should not. So can you explain me the 
use of scope as a storage class?


More information about the Digitalmars-d-learn mailing list