[libc++] Add std::fpclassify overloads for floating-point. - #67913
Conversation
There was a problem hiding this comment.
The implementation looks good, but this needs tests. Specifically,
- there should be a regression test to make sure an implicit conversion works now
- please make sure that we have test coverage for the
_LIBCPP_NODISCARD_EXTs - please make sure that we have test for the
noexceptness of the overloads.
You should be able to find tests for this under libcxx/test/libcxx/{diagnostics,numerics/c.math} if they exist.
|
Sorry, I pulled commits from main :( |
|
✅ With the latest revision this PR passed the C/C++ code formatter. |
|
Now code diff's showing correct changes. But I'll probably need to create new PR to merge changes without extra commits... Added tests for implicit conversions and |
|
You can just rebase to fix your issues. |
|
Maybe I've done something wrong, but I've rebased and those all commits from main were added ahead of mine and appeared here... |
|
You probably did something wrong while rebasing. In a rebase workflow you want a single commit that you're force-pushing to your branch generally. It looks like you had a merge commit or something like that and the new commits got rebased onto that, resulting in different hashes; i.e. different commits. When running |
|
|
|
You should be able to |
443ff6f to
18bc8ee
Compare
|
Many thanks, that worked! I should definitely read more documentation on how git rebase works and be more careful next time : ) |
a9a5c2a to
3bf5f2d
Compare
Standard says that implementation of math functions that have floating-point-type parameter should provide an "overload for each cv-unqualified floating-point type".
3bf5f2d to
a9955dc
Compare
So we should provide weaker floating-point overloads.
philnik777
left a comment
There was a problem hiding this comment.
LGTM with a comment added.
…y are templates to be weaker than overloads provided by MSVC runtime.
Local branch amd-gfx bedba19 Merged main:ea2036e1e56b into amd-gfx:e1b9ddbd68c9 Remote branch main dc129d6 [libc++] Add std::fpclassify overloads for floating-point. (llvm#67913)
Standard says that implementation of math functions that have floating-point-type parameter should provide an "overload for each cv-unqualified floating-point type".