auto storage class - infer or RAII?

Walter Bright newshound at digitalmars.com
Mon Nov 13 21:20:24 PST 2006


Tomas Lindquist Olsen wrote:
> Can you post an example of why we need 'static const' ?

int foo(int x)
{
     static const i = x;	// error, x is not const
     const j = x;	// ok, j is const for duration of foo() call
}



More information about the Digitalmars-d mailing list