updated protobuf to 3.18.1

This commit is contained in:
Sven Czarnian
2021-10-10 20:51:05 +02:00
parent ea460b1aaf
commit 7d69203486
69 changed files with 6374 additions and 3669 deletions

View File

@@ -148,6 +148,10 @@
#include <limits>
#include <string>
#if defined(__cpp_lib_string_view)
#include <string_view>
#endif
#include <google/protobuf/stubs/hash.h>
#include <google/protobuf/port_def.inc>
@@ -215,6 +219,14 @@ class PROTOBUF_EXPORT StringPiece {
length_ = CheckSize(str.size());
}
#if defined(__cpp_lib_string_view)
StringPiece( // NOLINT(runtime/explicit)
std::string_view str)
: ptr_(str.data()), length_(0) {
length_ = CheckSize(str.size());
}
#endif
StringPiece(const char* offset, size_type len)
: ptr_(offset), length_(CheckSize(len)) {}