valid uses of shared

mta`chrono chrono at mta-international.net
Fri Jun 8 19:01:41 PDT 2012


Would this be legal?

class A
{
     private static shared int counter; // shared across all instances

     this()
     {
          auto i = ++counter;
          pragma(msg, typeof(i)); // prints int
     }
}



More information about the Digitalmars-d mailing list