Is there a way to "see" source code generated by templates after a compile?

WhatMeWorry via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Jul 17 06:58:39 PDT 2016


On Sunday, 17 July 2016 at 11:14:39 UTC, Stefan Koch wrote:
> On Sunday, 17 July 2016 at 05:57:52 UTC, WhatMeWorry wrote:
>>
>>
>> I don't suppose there's a way to "see" source code generated 
>> by templates after a compile but before execution?  Or does 
>> the compiler generate it to a lower level on the fly; thus 
>> losing the source code?
>>
>> I'm assuming no because if there were a way, I'd of come 
>> across it by now :)
>>
>>
>> Now that I think about, was there even a way to look at c/c++ 
>> code after the pre-processor step?
>
> If you do use mixins I can craft you a patch.
> If you want to see template expansions you have to wait a 
> little longer.

Wonderful! Nope, I can wait. I don't want to do anything that 
would slow you down. This will make learning and debugging code 
generation so much easier.


More information about the Digitalmars-d-learn mailing list