are mixin string templates with functions removed?

JS js.mdnq at gmail.com
Thu Aug 1 15:42:05 PDT 2013


On Thursday, 1 August 2013 at 22:26:06 UTC, Dicebot wrote:
> On Thursday, 1 August 2013 at 22:04:57 UTC, JS wrote:
>> IS A GOING TO BE IN THE BINARY?!?!?! Yes, I'm yelling... just 
>> to get the point across about the question I'm trying to get 
>> answered.
>
> HOW MANY TIMES I NEED TO ANSWER YOUR QUESTION FOR YOU TO NOTICE?
>
> Yes.


UM, NO, BECAUSE YOU ARE NOT ANSWERING MY QUESTION!

I don't know why it is so damn confusing...

I didn't say templates, I SAID string mixins of templates.

I did a test

http://dpaste.dzfl.pl/d8e6ca2a

http://dpaste.dzfl.pl/a43b923c

What is weird, on my comp, the file sizes are exactly the same, 
searching for the string only shows up in the one with the 
template call.

So It seems the dmd does not add code for string mixins(even 
though the function is called, it is smart enough not to add it 
to the binary)... unless it is somehow encrypting the 
template(again, I would expect the file size to be smaller... 
unless it does some type of alignment/padding).



More information about the Digitalmars-d-learn mailing list