[Cfp-interest] C1x's _Generic and totalorder()

Fred J. Tydeman tydeman at tybor.com
Thu Jul 14 15:06:57 PDT 2011


On Thu, 14 Jul 2011 17:08:48 -0400 Stephen Canon wrote:
>
>but it still fails for exactly the reason that Joel highlighted; _Generics expand to expressions, which _Static_assert is not.  I don't see any straightforward way around this, unfortunately.  One could replace the _Static_assert with a function that causes a runtime failure, but that's not at all satisfactory.


How about:  _Pragma( "type mismatch" )



---
Fred J. Tydeman        Tydeman Consulting
tydeman at tybor.com      Testing, numerics, programming
+1 (775) 358-9748      Vice-chair of PL22.11 (ANSI "C")
Sample C99+FPCE tests: http://www.tybor.com
Savers sleep well, investors eat well, spenders work forever.



More information about the Cfp-interest mailing list