<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On Jul 14, 2011, at 6:06 PM, Fred J. Tydeman wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>On Thu, 14 Jul 2011 17:08:48 -0400 Stephen Canon wrote:<br><blockquote type="cite"><br></blockquote><blockquote type="cite">but it still fails for exactly the reason that Joel highlighted; _Generics expand to expressions, which _Static_assert is not. &nbsp;I don't see any straightforward way around this, unfortunately. &nbsp;One could replace the _Static_assert with a function that causes a runtime failure, but that's not at all satisfactory.<br></blockquote><br>How about: &nbsp;_Pragma( "type mismatch" )</div></blockquote><br></div><div>1) The behavior of this is implementation defined; it may cause translation to fail or it may be silently ignored, or anything else may happen.</div><div>2) Whatever happens would happen unconditionally in phase 4, regardless of the types involved, so if this does cause an error, it will cause the error even when the types match.</div><div>3) Unless I'm missing something, it's still&nbsp;not an&nbsp;<i>assignment-expression,</i>&nbsp;which is what the grammar requires.</div><div><br></div><div>- Steve</div></body></html>