CT usage only in executable

strtr strtr at sp.am
Thu Jul 15 22:16:57 PDT 2010


== Quote from strtr (strtr at sp.am)'s article
> == 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.
Too busy reading TDPL? ;)
btw. how long until runtime mixins? :D


More information about the Digitalmars-d-learn mailing list