diff options
author | Howard Hinnant <hhinnant@apple.com> | 2010-11-18 20:34:48 +0300 |
---|---|---|
committer | Howard Hinnant <hhinnant@apple.com> | 2010-11-18 20:34:48 +0300 |
commit | d518d1c807ab815735e783a5b1cd7c57b82c9056 (patch) | |
tree | 67f93483c7ff8ea330aa91f0655b435db845a69c /libcxx/include/complex | |
parent | ce02552b6a6b7b09be314624f23bfe1de853eba5 (diff) |
LWG 1522
llvm-svn: 119710
Diffstat (limited to 'libcxx/include/complex')
-rw-r--r-- | libcxx/include/complex | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/libcxx/include/complex b/libcxx/include/complex index fd3375b18d1a..273a807583b6 100644 --- a/libcxx/include/complex +++ b/libcxx/include/complex @@ -191,17 +191,17 @@ template<class T> T norm(const complex<T>&); template<Integral T> double norm(T); float norm(float); -template<class T> complex<T> conj(const complex<T>&); - long double conj(long double); - double conj(double); -template<Integral T> double conj(T); - float conj(float); - -template<class T> complex<T> proj(const complex<T>&); - long double proj(long double); - double proj(double); -template<Integral T> double proj(T); - float proj(float); +template<class T> complex<T> conj(const complex<T>&); + complex<long double> conj(long double); + complex<double> conj(double); +template<Integral T> complex<double> conj(T); + complex<float> conj(float); + +template<class T> complex<T> proj(const complex<T>&); + complex<long double> proj(long double); + complex<double> proj(double); +template<Integral T> complex<double> proj(T); + complex<float> proj(float); template<class T> complex<T> polar(const T&, const T& = 0); @@ -980,17 +980,17 @@ conj(const complex<_Tp>& __c) } inline _LIBCPP_INLINE_VISIBILITY -long double +complex<long double> conj(long double __re) { - return __re; + return complex<long double>(__re); } inline _LIBCPP_INLINE_VISIBILITY -double +complex<double> conj(double __re) { - return __re; + return complex<double>(__re); } template<class _Tp> @@ -998,18 +998,18 @@ inline _LIBCPP_INLINE_VISIBILITY typename enable_if < is_integral<_Tp>::value, - double + complex<double> >::type conj(_Tp __re) { - return __re; + return complex<double>(__re); } inline _LIBCPP_INLINE_VISIBILITY -float +complex<float> conj(float __re) { - return __re; + return complex<float>(__re); } // proj @@ -1026,21 +1026,21 @@ proj(const complex<_Tp>& __c) } inline _LIBCPP_INLINE_VISIBILITY -long double +complex<long double> proj(long double __re) { if (isinf(__re)) __re = abs(__re); - return __re; + return complex<long double>(__re); } inline _LIBCPP_INLINE_VISIBILITY -double +complex<double> proj(double __re) { if (isinf(__re)) __re = abs(__re); - return __re; + return complex<double>(__re); } template<class _Tp> @@ -1048,20 +1048,20 @@ inline _LIBCPP_INLINE_VISIBILITY typename enable_if < is_integral<_Tp>::value, - double + complex<double> >::type proj(_Tp __re) { - return __re; + return complex<double>(__re); } inline _LIBCPP_INLINE_VISIBILITY -float +complex<float> proj(float __re) { if (isinf(__re)) __re = abs(__re); - return __re; + return complex<float>(__re); } // polar |