From: Marc Glisse Date: Fri, 11 Apr 2014 18:57:59 +0000 (+0200) Subject: complex (__complex_exp, pow): Specify the template parameter in calls to std::polar... X-Git-Tag: releases/gcc-5.1.0~8170 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=742f66e7367369abaefd2a5f8d1f7de448f1b997;p=thirdparty%2Fgcc.git complex (__complex_exp, pow): Specify the template parameter in calls to std::polar, for expression templates. 2014-04-11 Marc Glisse * include/std/complex (__complex_exp, pow): Specify the template parameter in calls to std::polar, for expression templates. From-SVN: r209321 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 0aa6dc040aa7..1af136e639ba 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +2014-04-11 Marc Glisse + + * include/std/complex (__complex_exp, pow): Specify the template + parameter in calls to std::polar, for expression templates. + 2014-04-10 Andreas Schwab * config/abi/post/alpha-linux-gnu/baseline_symbols.txt: Remove TLS diff --git a/libstdc++-v3/include/std/complex b/libstdc++-v3/include/std/complex index 34fa1ddbcea5..5849cd5e8061 100644 --- a/libstdc++-v3/include/std/complex +++ b/libstdc++-v3/include/std/complex @@ -735,7 +735,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template inline complex<_Tp> __complex_exp(const complex<_Tp>& __z) - { return std::polar(exp(__z.real()), __z.imag()); } + { return std::polar<_Tp>(exp(__z.real()), __z.imag()); } #if _GLIBCXX_USE_C99_COMPLEX inline __complex__ float @@ -995,7 +995,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return pow(__x.real(), __y); complex<_Tp> __t = std::log(__x); - return std::polar(exp(__y * __t.real()), __y * __t.imag()); + return std::polar<_Tp>(exp(__y * __t.real()), __y * __t.imag()); } template @@ -1032,8 +1032,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION inline complex<_Tp> pow(const _Tp& __x, const complex<_Tp>& __y) { - return __x > _Tp() ? std::polar(pow(__x, __y.real()), - __y.imag() * log(__x)) + return __x > _Tp() ? std::polar<_Tp>(pow(__x, __y.real()), + __y.imag() * log(__x)) : std::pow(complex<_Tp>(__x), __y); }