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

Unified Diff: third_party/protobuf/src/google/protobuf/stubs/stringpiece.h

Issue 2600753002: Reverts third_party/protobuf: Update to HEAD (f52e188fe4) (Closed)
Patch Set: Created 4 years 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: third_party/protobuf/src/google/protobuf/stubs/stringpiece.h
diff --git a/third_party/protobuf/src/google/protobuf/stubs/stringpiece.h b/third_party/protobuf/src/google/protobuf/stubs/stringpiece.h
index 8910688bf46c9ed1559f6d76f253d164e0408cc3..9167165940d24e88cc29be0fe4de98a8579205ac 100644
--- a/third_party/protobuf/src/google/protobuf/stubs/stringpiece.h
+++ b/third_party/protobuf/src/google/protobuf/stubs/stringpiece.h
@@ -222,6 +222,14 @@ class LIBPROTOBUF_EXPORT StringPiece {
: ptr_(str.data()), length_(0) {
length_ = CheckedSsizeTFromSizeT(str.size());
}
+#if defined(HAS_GLOBAL_STRING)
+ template <class Allocator>
+ StringPiece( // NOLINT(runtime/explicit)
+ const basic_string<char, std::char_traits<char>, Allocator>& str)
+ : ptr_(str.data()), length_(0) {
+ length_ = CheckedSsizeTFromSizeT(str.size());
+ }
+#endif
StringPiece(const char* offset, stringpiece_ssize_type len)
: ptr_(offset), length_(len) {
« no previous file with comments | « third_party/protobuf/src/google/protobuf/stubs/port.h ('k') | third_party/protobuf/src/google/protobuf/stubs/strutil.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698