<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Sep 1, 2016 at 6:29 PM, Stefan Koch via Digitalmars-d-announce <span dir="ltr"><<a href="mailto:digitalmars-d-announce@puremagic.com" target="_blank">digitalmars-d-announce@puremagic.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Thursday, 1 September 2016 at 13:18:18 UTC, Rory McGuire wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
the _checkCTFE() function is just a function that does something we're not<br>
allowed to do at CTFE, but current implementation does not respect<br>
__traits(compiles, ....);<br>
<br>
<br>
<br>
As far as I can tell that is a bug. Thoughts?<br>
</blockquote>
<br></span>
It is not a bug, because there is no way to mark something as CTFE-only.<br>
static ifs are not visible at the time where ctfe sees the function, they have already been resolved.<br>
<br>
getting a static if (__ctfe) to work would require significant changes to the semantic-analysis path for functions.<br>
</blockquote></div><br></div><div class="gmail_extra"><br></div><div class="gmail_extra">Ah, right, understood.</div><div class="gmail_extra"><br></div><div class="gmail_extra"><br></div><div class="gmail_extra">is that in one of the "semantic" passes the compiler has?</div><div class="gmail_extra"><br></div><div class="gmail_extra"><br></div></div>