]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
complex (__complex_exp, pow): Specify the template parameter in calls to std::polar...
authorMarc Glisse <marc.glisse@inria.fr>
Fri, 11 Apr 2014 18:57:59 +0000 (20:57 +0200)
committerMarc Glisse <glisse@gcc.gnu.org>
Fri, 11 Apr 2014 18:57:59 +0000 (18:57 +0000)
2014-04-11  Marc Glisse  <marc.glisse@inria.fr>

* include/std/complex (__complex_exp, pow): Specify the template
parameter in calls to std::polar, for expression templates.

From-SVN: r209321

libstdc++-v3/ChangeLog
libstdc++-v3/include/std/complex

index 0aa6dc040aa77d8a028663b05f0802a3f24778ca..1af136e639badc097fb9adff1a0ece742d37e5c3 100644 (file)
@@ -1,3 +1,8 @@
+2014-04-11  Marc Glisse  <marc.glisse@inria.fr>
+
+       * include/std/complex (__complex_exp, pow): Specify the template
+       parameter in calls to std::polar, for expression templates.
+
 2014-04-10  Andreas Schwab  <schwab@suse.de>
 
        * config/abi/post/alpha-linux-gnu/baseline_symbols.txt: Remove TLS
index 34fa1ddbcea5abf4ad04f890103069baf95924ce..5849cd5e80615b77e7f3bc64fbd514c3c3b14812 100644 (file)
@@ -735,7 +735,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
   template<typename _Tp>
     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<typename _Tp>
@@ -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);
     }