CT usage only in executable

strtr strtr at sp.am
Wed Jul 14 19:28:22 PDT 2010


== Quote from bearophile (bearophileHUGS at lycos.com)'s article
> strtr:
> > Not that the memory is really significant compared to the rest of my program,
> > but I have a few fairly large arrays I use only in compile time and I was
> > wondering why dmd still includes those in the executable (simple text search
> > dug them up).
> Are you able to create a smallish test case?
> Bye,
> bearophile

----
module main;

const char[] CT_STRING = "int i=0;";

void main(){
	mixin( CT_STRING );
}
----
The string can be found in the executable.



More information about the Digitalmars-d-learn mailing list