OSDN Git Service

PR libstdc++/51083
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 12 Nov 2011 15:57:03 +0000 (15:57 +0000)
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 12 Nov 2011 15:57:03 +0000 (15:57 +0000)
commit75a53be81691172b3386fa8e2757fcb1c624a8d2
treeb28a063e9a478a87290e6b1ddea155409d4e9cb1
parentd094e1b2d8d815a0d591f2f840b3e6994cb64dea
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@181321 138bc75d-0d04-0410-961f-82ee72b054a4
libstdc++-v3/ChangeLog
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]