This is an archive of the discontinued LLVM Phabricator instance.

[libc++] Move functions in math.h into the versioned namespace
AbandonedPublic

Authored by philnik on Oct 12 2022, 7:11 AM.

Details

Reviewers
ldionne
Group Reviewers
Restricted Project

Diff Detail

Event Timeline

philnik created this revision.Oct 12 2022, 7:11 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 12 2022, 7:11 AM
philnik requested review of this revision.Oct 12 2022, 7:11 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 12 2022, 7:11 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript
ldionne requested changes to this revision.Oct 13 2022, 10:13 AM

Including <math.h> should not define functions in namespace std. Users should be required to use <cmath> in order to get that behavior. Otherwise, this is a portability trap (https://godbolt.org/z/434zs4zz3).

If you think that's necessary for constexpr cmath, I'd like to understand why.

Also, let's coordinate with D134938 to find a single way forward and avoid duplicate work.

This revision now requires changes to proceed.Oct 13 2022, 10:13 AM
philnik abandoned this revision.Nov 29 2022, 6:31 AM