[cfe-dev] Proposed change to __builtin_overload

Douglas Gregor dgregor at apple.com
Mon Feb 9 07:21:07 PST 2009


On Feb 9, 2009, at 6:56 AM, Howard Hinnant wrote:
> The C++ <cmath> has to implement this same logic, but gets to use C++
> to do it. :-)  I'm not suggesting that clang's <tgmath.h> be
> implemented in C++.  Only that seeing a C++ implementation may spark
> an idea for a more flexible __builtin_overload.

This is a valid question, though, and one I would have asked if I  
thought the answer might be "yes" :)

Should we use C++ function overloading for <tgmath.h>? We could expose  
the ability to declare overloaded functions in C (say, through some  
function attribute __overloaded__) and relax a few of our if  
(getLangOptions().CPlusPlus) conditions to let C take the function- 
overloading path.

	- Doug



More information about the cfe-dev mailing list