[cfe-commits] [libcxx] r148069 - in /libcxx/trunk/include: fstream ostream

Howard Hinnant hhinnant at apple.com
Thu Jan 12 15:37:51 PST 2012


Author: hhinnant
Date: Thu Jan 12 17:37:51 2012
New Revision: 148069

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

Modified:
    libcxx/trunk/include/fstream
    libcxx/trunk/include/ostream

Modified: libcxx/trunk/include/fstream
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/fstream?rev=148069&r1=148068&r2=148069&view=diff
==============================================================================
--- libcxx/trunk/include/fstream (original)
+++ libcxx/trunk/include/fstream Thu Jan 12 17:37:51 2012
@@ -549,7 +549,7 @@
     {
         __rt = this;
         unique_ptr<FILE, int(*)(FILE*)> __h(__file_, fclose);
-        if ((__cm_ & ios_base::out) && sync())
+        if (sync())
             __rt = 0;
         if (fclose(__h.release()) == 0)
             __file_ = 0;

Modified: libcxx/trunk/include/ostream
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/ostream?rev=148069&r1=148068&r2=148069&view=diff
==============================================================================
--- libcxx/trunk/include/ostream (original)
+++ libcxx/trunk/include/ostream Thu Jan 12 17:37:51 2012
@@ -1218,12 +1218,12 @@
 <
     !is_lvalue_reference<_Stream>::value &&
     is_base_of<ios_base, _Stream>::value,
-    _Stream&
+    _Stream&&
 >::type
 operator<<(_Stream&& __os, const _Tp& __x)
 {
     __os << __x;
-    return __os;
+    return _VSTD::move(__os);
 }
 
 #endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES





More information about the cfe-commits mailing list