Remove use of std::abs in experimental::{gcd,lcm}
authorJonathan Wakely <jwakely@redhat.com>
Fri, 30 Sep 2016 13:43:37 +0000 (14:43 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Fri, 30 Sep 2016 13:43:37 +0000 (14:43 +0100)
commit9e28a77462f81a9a2ab9064d768bd7c9484047e1
tree77e5c5ef50d1cdbc1f0e24f43440f0714a6d9611
parente70bbc6f1f55a9532219812309ec22b04b539367
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.

From-SVN: r240656
libstdc++-v3/ChangeLog
libstdc++-v3/include/experimental/numeric
libstdc++-v3/testsuite/experimental/numeric/77801.cc [new file with mode: 0644]
libstdc++-v3/testsuite/experimental/numeric/gcd.cc
libstdc++-v3/testsuite/experimental/numeric/lcm.cc