www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Debugging templates!

reply "JS" <js.mdnq gmail.com> writes:
There has to be a better way?!?!?!?!
Aug 03 2013
parent reply "JS" <js.mdnq gmail.com> writes:
On Saturday, 3 August 2013 at 14:04:10 UTC, JS wrote:
 There has to be a better way?!?!?!?!
Of course, I mean string mixin's using template.. and the statement was to ask people how they went about it...
Aug 03 2013
parent "Bosak" <bosak gmail.com> writes:
On Saturday, 3 August 2013 at 14:35:52 UTC, JS wrote:
 On Saturday, 3 August 2013 at 14:04:10 UTC, JS wrote:
 There has to be a better way?!?!?!?!
Of course, I mean string mixin's using template.. and the statement was to ask people how they went about it...
I usually write unittests that print the result of the template to the console to see if everything generates properly. So instead of: mixin(Templ!(someArgs)); I write unittest: unittest { import std.stdio; writeln(Templ!(sampleArgs)); }
Aug 03 2013