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

Unified Diff: Source/wtf/text/WTFString.h

Issue 1257203002: Fix ODR violation that can break WTF::String pretty printing in tests. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: . Created 5 years, 5 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
« no previous file with comments | « Source/wtf/text/StringBuilderTest.cpp ('k') | Source/wtf/wtf.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/wtf/text/WTFString.h
diff --git a/Source/wtf/text/WTFString.h b/Source/wtf/text/WTFString.h
index d6c82501417f8605de3c1f086aac5c888192be9b..a38d613ae96d9ccc7917c8dbfceff138eba4bfe4 100644
--- a/Source/wtf/text/WTFString.h
+++ b/Source/wtf/text/WTFString.h
@@ -31,6 +31,7 @@
#include "wtf/text/StringImpl.h"
#include "wtf/text/StringView.h"
#include <algorithm>
+#include <iosfwd>
#ifdef __OBJC__
#include <objc/objc.h>
@@ -633,6 +634,9 @@ WTF_EXPORT const String& emptyString();
WTF_EXPORT const String& emptyString16Bit();
WTF_EXPORT extern const String& xmlnsWithColon;
+// Pretty printer for gtest. Declared here to avoid ODR violations.
+WTF_EXPORT std::ostream& operator<<(std::ostream&, const String&);
dcheng 2015/07/27 19:59:04 It feels a little sketchy to declare an exported f
+
} // namespace WTF
WTF_ALLOW_MOVE_AND_INIT_WITH_MEM_FUNCTIONS(String);
« no previous file with comments | « Source/wtf/text/StringBuilderTest.cpp ('k') | Source/wtf/wtf.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698