How about "inline" for manifest constants?
Robert Fraser
fraserofthenight at gmail.com
Sun Dec 9 23:18:55 PST 2007
Russell Lewis wrote:
> 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.
You mean semantic error? But now we're just talking semantics...
Anyways, it's a good idea.
More information about the Digitalmars-d
mailing list