This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/77801] std::experimental::gcd std::experimental::lcd use non-constexpr std::abs
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 30 Sep 2016 18:29:48 +0000
- Subject: [Bug libstdc++/77801] std::experimental::gcd std::experimental::lcd use non-constexpr std::abs
- Auto-submitted: auto-generated
- References: <bug-77801-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77801
--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Author: redi
Date: Fri Sep 30 18:29:16 2016
New Revision: 240673
URL: https://gcc.gnu.org/viewcvs?rev=240673&root=gcc&view=rev
Log:
Remove use of std::abs in experimental::{gcd,lcm}
PR libstdc++/77801
* include/experimental/numeric: Include <numeric>.
(__abs): Define.
(gcd, lcm): Use __abs instead of std::abs.
* testsuite/experimental/numeric/77801.cc: New test.
* testsuite/experimental/numeric/gcd.cc: Test unsigned inputs.
* testsuite/experimental/numeric/lcm.cc: Likewise.
Added:
branches/gcc-6-branch/libstdc++-v3/testsuite/experimental/numeric/77801.cc
- copied, changed from r240642,
branches/gcc-6-branch/libstdc++-v3/testsuite/experimental/numeric/gcd.cc
Modified:
branches/gcc-6-branch/libstdc++-v3/ChangeLog
branches/gcc-6-branch/libstdc++-v3/include/experimental/numeric
branches/gcc-6-branch/libstdc++-v3/testsuite/experimental/numeric/gcd.cc
branches/gcc-6-branch/libstdc++-v3/testsuite/experimental/numeric/lcm.cc