[cfe-commits] [libcxx] r147853 - /libcxx/trunk/include/complex

Howard Hinnant hhinnant at apple.com
Tue Jan 10 07:15:47 PST 2012


Author: hhinnant
Date: Tue Jan 10 09:15:47 2012
New Revision: 147853

URL: http://llvm.org/viewvc/llvm-project?rev=147853&view=rev
Log:
Fix http://llvm.org/bugs/show_bug.cgi?id=11734

Modified:
    libcxx/trunk/include/complex

Modified: libcxx/trunk/include/complex
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/complex?rev=147853&r1=147852&r2=147853&view=diff
==============================================================================
--- libcxx/trunk/include/complex (original)
+++ libcxx/trunk/include/complex Tue Jan 10 09:15:47 2012
@@ -282,7 +282,8 @@
     _LIBCPP_INLINE_VISIBILITY void real(value_type __re) {__re_ = __re;}
     _LIBCPP_INLINE_VISIBILITY void imag(value_type __im) {__im_ = __im;}
 
-    _LIBCPP_INLINE_VISIBILITY complex& operator= (const value_type& __re) {__re_ = __re; return *this;}
+    _LIBCPP_INLINE_VISIBILITY complex& operator= (const value_type& __re)
+        {__re_ = __re; __im_ = value_type(); return *this;}
     _LIBCPP_INLINE_VISIBILITY complex& operator+=(const value_type& __re) {__re_ += __re; return *this;}
     _LIBCPP_INLINE_VISIBILITY complex& operator-=(const value_type& __re) {__re_ -= __re; return *this;}
     _LIBCPP_INLINE_VISIBILITY complex& operator*=(const value_type& __re) {__re_ *= __re; __im_ *= __re; return *this;}
@@ -340,7 +341,8 @@
     _LIBCPP_INLINE_VISIBILITY void real(value_type __re) {__re_ = __re;}
     _LIBCPP_INLINE_VISIBILITY void imag(value_type __im) {__im_ = __im;}
 
-    _LIBCPP_INLINE_VISIBILITY complex& operator= (float __re) {__re_ = __re; return *this;}
+    _LIBCPP_INLINE_VISIBILITY complex& operator= (float __re)
+        {__re_ = __re; __im_ = value_type(); return *this;}
     _LIBCPP_INLINE_VISIBILITY complex& operator+=(float __re) {__re_ += __re; return *this;}
     _LIBCPP_INLINE_VISIBILITY complex& operator-=(float __re) {__re_ -= __re; return *this;}
     _LIBCPP_INLINE_VISIBILITY complex& operator*=(float __re) {__re_ *= __re; __im_ *= __re; return *this;}
@@ -395,7 +397,8 @@
     _LIBCPP_INLINE_VISIBILITY void real(value_type __re) {__re_ = __re;}
     _LIBCPP_INLINE_VISIBILITY void imag(value_type __im) {__im_ = __im;}
 
-    _LIBCPP_INLINE_VISIBILITY complex& operator= (double __re) {__re_ = __re; return *this;}
+    _LIBCPP_INLINE_VISIBILITY complex& operator= (double __re)
+        {__re_ = __re; __im_ = value_type(); return *this;}
     _LIBCPP_INLINE_VISIBILITY complex& operator+=(double __re) {__re_ += __re; return *this;}
     _LIBCPP_INLINE_VISIBILITY complex& operator-=(double __re) {__re_ -= __re; return *this;}
     _LIBCPP_INLINE_VISIBILITY complex& operator*=(double __re) {__re_ *= __re; __im_ *= __re; return *this;}
@@ -450,7 +453,8 @@
     _LIBCPP_INLINE_VISIBILITY void real(value_type __re) {__re_ = __re;}
     _LIBCPP_INLINE_VISIBILITY void imag(value_type __im) {__im_ = __im;}
 
-    _LIBCPP_INLINE_VISIBILITY complex& operator= (long double __re) {__re_ = __re; return *this;}
+    _LIBCPP_INLINE_VISIBILITY complex& operator= (long double __re)
+        {__re_ = __re; __im_ = value_type(); return *this;}
     _LIBCPP_INLINE_VISIBILITY complex& operator+=(long double __re) {__re_ += __re; return *this;}
     _LIBCPP_INLINE_VISIBILITY complex& operator-=(long double __re) {__re_ -= __re; return *this;}
     _LIBCPP_INLINE_VISIBILITY complex& operator*=(long double __re) {__re_ *= __re; __im_ *= __re; return *this;}





More information about the cfe-commits mailing list