mclow.lists added a comment.

Other than the actual text being output, this LGTM.
I'ld like to see the changes I suggested in the test go in, but they're really 
minor.



================
Comment at: include/ostream:225
+    basic_ostream& operator<<(nullptr_t)
+    { return *this << (const void*)0; }
+
----------------
lichray wrote:
> Oh, common, I persuaded the committee to allow you to print a `(null)`  and 
> you don't do it...
I think that `(null)` is a better thing to output here than `0x0`.


================
Comment at: 
test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/nullptr_t.pass.cpp:72
+        // at least ensure that it does not generate an empty string.
+        assert(!s.empty());
+    }
----------------
You could just say `assert(!sb.str().empty()) here; no need to save the string 
in a variable.


================
Comment at: 
test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/nullptr_t.pass.cpp:79
+        os << n;
+        assert(os.good());
+    }
----------------
Might as well check for a non-empty string here, too.


https://reviews.llvm.org/D33776



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to