-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Correctly namespace more math functions. #39666
Conversation
0ccd019
to
d9b0677
Compare
Weird roadbump, GCC standard library does not export sqrtf() into the std namespace. |
Yeah, I remember running into this issue when I looked into some related warnings. I didn't come up with a good answer. |
AFAICT the answer is either just don't use it or export it into std ourselves. |
6209268
to
30960c2
Compare
Agreed. I think just don't use it. It will lead to more |
Turns out same story with powf() >_< |
This pull request fixes 80 alerts when merging 30960c2 into a664636 - view on LGTM.com fixed alerts:
|
This pull request fixes 79 alerts when merging 7b588d3 into 388be3b - view on LGTM.com fixed alerts:
|
This pull request fixes 79 alerts when merging fa2cd6b into 72a6afa - view on LGTM.com fixed alerts:
|
Summary
SUMMARY: None
Purpose of change
As outlined in #39388 these non-standard invocations of math functions are problematic.
Describe the solution
Stick em in the std namespace.
Testing
Needs to build, and I expect lgtm to agree it cleared up a bunch of alerts.
Additional context
I realized something else, implementations are allowed to put e.g. pow() in the global namespace in , but they are also allowed not to, which would fail our build on such a system.