This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/51083] TR1 [tr.c99.cmath.over] and C++11 [cmplx.over] overloads not constrained
- 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: Mon, 19 Dec 2011 01:49:14 +0000
- Subject: [Bug libstdc++/51083] TR1 [tr.c99.cmath.over] and C++11 [cmplx.over] overloads not constrained
- Auto-submitted: auto-generated
- References: <bug-51083-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51083
--- Comment #19 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-12-19 01:49:14 UTC ---
Author: redi
Date: Mon Dec 19 01:49:08 2011
New Revision: 182468
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=182468
Log:
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.
Added:
branches/gcc-4_6-branch/libstdc++-v3/testsuite/26_numerics/cmath/
branches/gcc-4_6-branch/libstdc++-v3/testsuite/26_numerics/cmath/51083.cc
branches/gcc-4_6-branch/libstdc++-v3/testsuite/26_numerics/complex/51083.cc
branches/gcc-4_6-branch/libstdc++-v3/testsuite/tr1/8_c_compatibility/cmath/51083.cc
branches/gcc-4_6-branch/libstdc++-v3/testsuite/tr1/8_c_compatibility/complex/51083.cc
Modified:
branches/gcc-4_6-branch/libstdc++-v3/ChangeLog
branches/gcc-4_6-branch/libstdc++-v3/include/c_global/cmath
branches/gcc-4_6-branch/libstdc++-v3/include/ext/type_traits.h