How about "inline" for manifest constants?

Craig Black craigblack2 at cox.net
Sun Dec 9 22:29:15 PST 2007


"Russell Lewis" <webmaster at villagersonline.com> wrote in message 
news:fjill0$2jnc$1 at digitalmars.com...
> inline int x = 3;
>
> Where the "inline" keyword means "the compiler is free to not allocate any 
> storage for this constant."  In particular, this means that it would be a 
> syntax error to either:
> 1) Take the address of an inline constant
> 2) Change its value
>
> Whether or not the compiler actually inlines all instances or not is 
> implementation-specific.

I like it. 




More information about the Digitalmars-d mailing list