Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(267)

Unified Diff: mojo/public/cpp/bindings/string.h

Issue 1532993002: Add output formatters for more mojom types. (Closed) Base URL: git@github.com:domokit/mojo.git@moz-9
Patch Set: move tests, change map formatting Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: mojo/public/cpp/bindings/string.h
diff --git a/mojo/public/cpp/bindings/string.h b/mojo/public/cpp/bindings/string.h
index 4cf863192b64e86595106df5e65261eeb182245f..7f2ca313aacd997d57e971abddc2111e365886d5 100644
--- a/mojo/public/cpp/bindings/string.h
+++ b/mojo/public/cpp/bindings/string.h
@@ -5,6 +5,7 @@
#ifndef MOJO_PUBLIC_CPP_BINDINGS_STRING_H_
#define MOJO_PUBLIC_CPP_BINDINGS_STRING_H_
+#include <iosfwd>
#include <string>
#include "mojo/public/cpp/bindings/lib/array_internal.h"
@@ -122,6 +123,8 @@ inline bool operator!=(const String& a, const char* b) {
return !(a == b);
}
+// TODO(jeffbrown): Decide whether this should print a sentinel value
+// such as "<null>" when formatting null strings.
inline std::ostream& operator<<(std::ostream& out, const String& s) {
return out << s.get();
}

Powered by Google App Engine
This is Rietveld 408576698