This is an archive of the discontinued LLVM Phabricator instance.

Prototype patch to support <math.h> as a conforming C++ header in addition to <cmath>.
Needs ReviewPublic

Authored by chandlerc on Mar 13 2015, 11:06 AM.

Details

Summary

This extracts the conformance fixing aspects of <cmath> (replacing macros with
inline functions) into a <math.h> which wraps the system <math.h>.

This should have no functionality change for <cmath> but will cause
includes of <math.h> to be modular and place nicely in C++ code using
libc++.

Clearly this isn't ready to commit -- it doesn't have a synopsis and I would
rather fix all of the related <cfoo> headers in a single patch, but it should
at least clarify the nature of the approach.

Diff Detail

Event Timeline

chandlerc updated this revision to Diff 21939.Mar 13 2015, 11:06 AM
chandlerc retitled this revision from to Prototype patch to support <math.h> as a conforming C++ header in addition to <cmath>..
chandlerc updated this object.
chandlerc edited the test plan for this revision. (Show Details)
chandlerc added reviewers: mclow.lists, rsmith.
chandlerc added a subscriber: Unknown Object (MLST).
rsmith edited edge metadata.Mar 13 2015, 11:22 AM

This looks like a good approach to me.

mclow.lists edited edge metadata.Jun 23 2015, 8:42 AM

I am OK with this approach as well.