digitalmars.D.learn - View Expanded Templates?
- Taylor Hillegeist (6/6) Dec 18 2015 Is it possible to view the expanded form of templates or perhaps
- Adam D. Ruppe (6/12) Dec 18 2015 Check out my tip of the week from last month:
- Taylor Hillegeist (4/16) Dec 18 2015 pragma(msg, code_generation_function())
- =?UTF-8?Q?Ali_=c3=87ehreli?= (8/10) Dec 18 2015 Yes, and perhaps unittest blocks:
- Stefan Koch (3/9) Dec 18 2015 I am builing a tool based on SDC that will allow just that :)
Is it possible to view the expanded form of templates or perhaps view the post-ctfe pre-compiled d code? I couldn't find any information on this topic but I think it would be useful. sometimes I use templates/mixins to write code for me but, sometimes i would rather have the expanded functions in the final versions.
Dec 18 2015
On Friday, 18 December 2015 at 18:25:03 UTC, Taylor Hillegeist wrote:Is it possible to view the expanded form of templates or perhaps view the post-ctfe pre-compiled d code? I couldn't find any information on this topic but I think it would be useful. sometimes I use templates/mixins to write code for me but, sometimes i would rather have the expanded functions in the final versions.Check out my tip of the week from last month: http://arsdnet.net/this-week-in-d/nov-22.html If you just write out the string yourself instead of mixing it in, you can get a lot of progress on it.
Dec 18 2015
On Friday, 18 December 2015 at 18:35:40 UTC, Adam D. Ruppe wrote:On Friday, 18 December 2015 at 18:25:03 UTC, Taylor Hillegeist wrote:pragma(msg, code_generation_function()) simple + awesome. :)Is it possible to view the expanded form of templates or perhaps view the post-ctfe pre-compiled d code? I couldn't find any information on this topic but I think it would be useful. sometimes I use templates/mixins to write code for me but, sometimes i would rather have the expanded functions in the final versions.Check out my tip of the week from last month: http://arsdnet.net/this-week-in-d/nov-22.html If you just write out the string yourself instead of mixing it in, you can get a lot of progress on it.
Dec 18 2015
On 12/18/2015 10:54 AM, Taylor Hillegeist wrote:pragma(msg, code_generation_function()) simple + awesome.Yes, and perhaps unittest blocks: unittest { assert(makeCode("foo") == "int foo = 42;"); } Unfortunately, neither works with template mixins or regular templates. Ali
Dec 18 2015
On Friday, 18 December 2015 at 18:25:03 UTC, Taylor Hillegeist wrote:Is it possible to view the expanded form of templates or perhaps view the post-ctfe pre-compiled d code? I couldn't find any information on this topic but I think it would be useful. sometimes I use templates/mixins to write code for me but, sometimes i would rather have the expanded functions in the final versions.I am builing a tool based on SDC that will allow just that :)
Dec 18 2015