auto storage class - infer or RAII?

Bill Baxter wbaxter at gmail.com
Mon Nov 13 13:36:50 PST 2006


Tomas Lindquist Olsen wrote:
> Sean Kelly wrote:
> 
> It is definitely a bit weird. I would like to see all combinations of 
> these fail. they dont make any sense together. all provide ATI if 
> present. the only problem I can see is if you want to put a constant 
> inside a static block. but maybe that is handled differently?
> 
> IMHO this would make sense:
> 
> Invalid:
> ---------
> static const x = 5;

What's wrong with static and const together?
One says this is actually store with globals not on the stack, the other 
says the value isn't going to change.  Nothing inconsistent about having 
those two together.



More information about the Digitalmars-d mailing list