5 ms·
C11 added the _Generic keyword, so someone must have complained. A common complaint is the desire to have, say, cos(x) work on floats, doubles, and long doubles
by dalke 12y ago
C11 added the _Generic keyword, so someone must have complained. A common complaint is the desire to have, say, cos(x) work on floats, doubles, and long doubles rather than calling respectively cosf(), cos(), cosl().
- stephencanon 12y agoHuh? C has had the <tgmath.h> header for 15 years, which lets cos(x) do exactly that, and work on complex types besides.
- dalke 12y ago_Generic makes it easy to implement things like tgmath yourself.