[libcxx-commits] [libcxx] [libc++] Implement std::gcd using the binary version (PR #77747)
via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Jan 11 06:56:09 PST 2024
================
@@ -143,5 +162,10 @@ int main(int argc, char**)
assert(res == 2);
}
- return 0;
+ do_fuzzy_tests<std::uint8_t>();
+ do_fuzzy_tests<std::uint16_t>();
+ do_fuzzy_tests<std::uint32_t>();
+ do_fuzzy_tests<std::uint64_t>();
----------------
AdvenamTacet wrote:
Because [`std::gcd` works for negative numbers](https://godbolt.org/z/dfEbdEWzW), we should test also signed types.
https://github.com/llvm/llvm-project/pull/77747
More information about the libcxx-commits
mailing list