From 20543ba53ab8737affb06a21149c15f772246aed Mon Sep 17 00:00:00 2001 From: "erikwright@chromium.org" Date: Tue, 13 Dec 2011 19:19:36 +0000 Subject: Extract common code from StringPiece and StringPiece16 into a templated base class. Convert copy-and-pasted unit tests into TYPED_TESTs. The motivation is that I wish to add constructors for string::iterator ranges and I don't want to do it twice. The motivation for adding the string::iterator range constructors is to reduce the number of overloads in string_number_conversions.h . BUG=87634 TEST= Review URL: http://codereview.chromium.org/8659047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@114242 0039d316-1c4b-4281-b951-d872f2087c98 --- base/logging.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'base/logging.h') diff --git a/base/logging.h b/base/logging.h index 94a82ad..9c660fa 100644 --- a/base/logging.h +++ b/base/logging.h @@ -983,7 +983,8 @@ inline std::ostream& operator<<(std::ostream& out, const std::wstring& wstr) { namespace base { -class StringPiece; +template class BasicStringPiece; +typedef BasicStringPiece StringPiece; // Allows StringPiece to be logged. BASE_EXPORT std::ostream& operator<<(std::ostream& o, const StringPiece& piece); -- cgit v1.1