开发者

How is <tgmath.h> implemented?

C doesn't have (to the best of my knowledge) overloading or templates, right? So how can a set of type-agnostic functions with the same name exist in plain ol' C? The usual compile-time trickery would involve a whole bunch of开发者_如何学Go macros, wouldn't it?


There's a great explanation of how it works in GCC here.

Also, if anyone can solve the medium-difficulty exercise, I'd love to know the answer.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜