diff options
author | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-07-25 21:24:07 +0000 |
---|---|---|
committer | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-07-25 21:24:07 +0000 |
commit | cd13c6c87f2311822be0c34692e5c56a4ea98912 (patch) | |
tree | a039de12bfd4eeff34cc614e672b47db2b9744e7 /libstdc++-v3/include/std/complex | |
parent | 542c9babc5b563b0b7d49083a3b0401995389617 (diff) | |
download | ppe42-gcc-cd13c6c87f2311822be0c34692e5c56a4ea98912.tar.gz ppe42-gcc-cd13c6c87f2311822be0c34692e5c56a4ea98912.zip |
2013-07-25 Paolo Carlini <paolo.carlini@oracle.com>
* include/std/complex (pow(const complex<>&, int)): Enable in
C++11 mode too.
* testsuite/26_numerics/complex/dr844.cc: Adjust.
* doc/xml/manual/intro.xml: Update.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201253 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include/std/complex')
-rw-r--r-- | libstdc++-v3/include/std/complex | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/libstdc++-v3/include/std/complex b/libstdc++-v3/include/std/complex index 7f100a0420d..58edb4f54dd 100644 --- a/libstdc++-v3/include/std/complex +++ b/libstdc++-v3/include/std/complex @@ -88,11 +88,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template<typename _Tp> complex<_Tp> log(const complex<_Tp>&); /// Return complex base 10 logarithm of @a z. template<typename _Tp> complex<_Tp> log10(const complex<_Tp>&); -#if __cplusplus < 201103L - // DR 844. /// Return @a x to the @a y'th power. template<typename _Tp> complex<_Tp> pow(const complex<_Tp>&, int); -#endif /// Return @a x to the @a y'th power. template<typename _Tp> complex<_Tp> pow(const complex<_Tp>&, const _Tp&); /// Return @a x to the @a y'th power. @@ -955,7 +952,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // 26.2.8/9 pow(__x, __y): Returns the complex power base of __x // raised to the __y-th power. The branch // cut is on the negative axis. -#if __cplusplus < 201103L template<typename _Tp> complex<_Tp> __complex_pow_unsigned(complex<_Tp> __x, unsigned __n) @@ -972,8 +968,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return __y; } - // _GLIBCXX_RESOLVE_LIB_DEFECTS + // In C++11 mode we used to implement the resolution of // DR 844. complex pow return type is ambiguous. + // thus the following overload was disabled in that mode. However, doing + // that causes all sorts of issues, see, for example: + // http://gcc.gnu.org/ml/libstdc++/2013-01/msg00058.html + // and also PR57974. template<typename _Tp> inline complex<_Tp> pow(const complex<_Tp>& __z, int __n) @@ -982,7 +982,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ? complex<_Tp>(1) / std::__complex_pow_unsigned(__z, -(unsigned)__n) : std::__complex_pow_unsigned(__z, __n); } -#endif template<typename _Tp> complex<_Tp> |