summaryrefslogtreecommitdiffstats
path: root/base/string_piece.h
diff options
context:
space:
mode:
authorakalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-20 06:33:27 +0000
committerakalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-20 06:33:27 +0000
commit34a90773493e1a272ae21b27616fd80bb2d7300b (patch)
tree02a5db064660ddead32a69b3034acdff5affb650 /base/string_piece.h
parent3b0032a7abc9cc9350253d4f66dcd9a367e206ab (diff)
downloadchromium_src-34a90773493e1a272ae21b27616fd80bb2d7300b.zip
chromium_src-34a90773493e1a272ae21b27616fd80bb2d7300b.tar.gz
chromium_src-34a90773493e1a272ae21b27616fd80bb2d7300b.tar.bz2
Move operator<< for StringPiece into string_piece.{h,cc}
BUG=110651 TEST= Review URL: https://chromiumcodereview.appspot.com/9159005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118416 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/string_piece.h')
-rw-r--r--base/string_piece.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/base/string_piece.h b/base/string_piece.h
index e68302e..7bce4ff 100644
--- a/base/string_piece.h
+++ b/base/string_piece.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Copied from strings/stringpiece.h with modifications
@@ -24,6 +24,7 @@
#define BASE_STRING_PIECE_H_
#pragma once
+#include <iosfwd>
#include <string>
#include "base/base_export.h"
@@ -399,6 +400,9 @@ inline bool operator>=(const StringPiece16& x, const StringPiece16& y) {
return !(x < y);
}
+BASE_EXPORT std::ostream& operator<<(std::ostream& o,
+ const StringPiece& piece);
+
} // namespace base
// We provide appropriate hash functions so StringPiece and StringPiece16 can