]> git.ipfire.org Git - thirdparty/gcc.git/commit
backport: re PR libstdc++/51083 (TR1 [tr.c99.cmath.over] and C++11 [cmplx.over] overl...
authorJonathan Wakely <jwakely.gcc@gmail.com>
Mon, 19 Dec 2011 01:49:08 +0000 (01:49 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Mon, 19 Dec 2011 01:49:08 +0000 (01:49 +0000)
commitd3bf07607ed49ecf059321c8b73e1a48902c0ab9
treebe36d0ffc6f139acb4196de8f682fc8940f15373
parentd10d3240d7d6998b22bd7b62cd48eabacef85773
backport: re PR libstdc++/51083 (TR1 [tr.c99.cmath.over] and C++11 [cmplx.over] overloads not constrained)

Backport from mainline
2011-11-13  Paolo Carlini  <paolo.carlini@oracle.com>

* include/c_global/cmath (atan2, pow): Simplify constraining on the
return type.

Backport from mainline
2011-11-12  Jonathan Wakely  <jwakely.gcc@gmail.com>

PR libstdc++/51083
* include/ext/type_traits.h (__promote): Only define __type member
for integral and floating point types, to prevent math functions
participating in overload resolution for other types.
(__promote_2, __promote_3, __promote_4): Use __promote in default
template argument values, so deduction only succeeds for integral and
floating point types.
* testsuite/26_numerics/cmath/51083.cc: New.
* testsuite/26_numerics/complex/51083.cc: New.
* testsuite/tr1/8_c_compatibility/cmath/51083.cc: New.
* testsuite/tr1/8_c_compatibility/complex/51083.cc: New.

From-SVN: r182468
libstdc++-v3/ChangeLog
libstdc++-v3/include/c_global/cmath
libstdc++-v3/include/ext/type_traits.h
libstdc++-v3/testsuite/26_numerics/cmath/51083.cc [new file with mode: 0644]
libstdc++-v3/testsuite/26_numerics/complex/51083.cc [new file with mode: 0644]
libstdc++-v3/testsuite/tr1/8_c_compatibility/cmath/51083.cc [new file with mode: 0644]
libstdc++-v3/testsuite/tr1/8_c_compatibility/complex/51083.cc [new file with mode: 0644]