How is <tgmath.h> implemented?

爷,独闯天下 提交于 2019-12-09 05:59:40

问题


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 macros, wouldn't it?


回答1:


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.



来源:https://stackoverflow.com/questions/2726712/how-is-tgmath-h-implemented

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!