<div dir="ltr">If a function is only used for CTFE, compiler can elide its codegen. It's in the scope of optimization.<div><br></div><div>Kenji Hara<br><div class="gmail_extra"><br><br><div class="gmail_quote">2014-02-17 22:48 GMT+09:00 Dicebot <span dir="ltr"><<a href="mailto:public@dicebot.lv" target="_blank">public@dicebot.lv</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="">On Monday, 17 February 2014 at 09:33:01 UTC, Max Samukha wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
But that's an awful dangerous hack. A better solution is needed.<br>
</blockquote>
<br></div>
I have been thinking about addition of something like `pragma(nocodegen)` to the language. Should be simple to implement and can fix some of most crazy bloat issues in libraries until something like whole-program optimization can become practical reality.<br>

<br>
It will help not only CTFE - for example, all template constraints and all template argument list metaprogramming facilities can be annotated with it in Phobos.<br>
<br>
Walter, would you approve something like this?<br>
</blockquote></div><br></div></div></div>