From 09354db1434859a31a3c81abebcc4018d42f2715 Mon Sep 17 00:00:00 2001 From: Jisi Liu Date: Tue, 18 Jul 2017 15:38:30 -0700 Subject: Merge from Google internal for 3.4 release --- src/google/protobuf/wrappers.pb.h | 203 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 193 insertions(+), 10 deletions(-) (limited to 'src/google/protobuf/wrappers.pb.h') diff --git a/src/google/protobuf/wrappers.pb.h b/src/google/protobuf/wrappers.pb.h index 4202541b..17218aa4 100644 --- a/src/google/protobuf/wrappers.pb.h +++ b/src/google/protobuf/wrappers.pb.h @@ -72,8 +72,9 @@ struct LIBPROTOBUF_EXPORT TableStruct { static const ::google::protobuf::internal::AuxillaryParseTableField aux[]; static const ::google::protobuf::internal::ParseTable schema[]; static const ::google::protobuf::uint32 offsets[]; + static const ::google::protobuf::internal::FieldMetadata field_metadata[]; + static const ::google::protobuf::internal::SerializationTable serialization_table[]; static void InitDefaultsImpl(); - static void Shutdown(); }; void LIBPROTOBUF_EXPORT AddDescriptors(); void LIBPROTOBUF_EXPORT InitDefaults(); @@ -92,7 +93,21 @@ class LIBPROTOBUF_EXPORT DoubleValue : public ::google::protobuf::Message /* @@p CopyFrom(from); return *this; } + #if LANG_CXX11 + DoubleValue(DoubleValue&& from) noexcept + : DoubleValue() { + *this = ::std::move(from); + } + inline DoubleValue& operator=(DoubleValue&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif inline ::google::protobuf::Arena* GetArena() const PROTOBUF_FINAL { return GetArenaNoVirtual(); } @@ -111,6 +126,9 @@ class LIBPROTOBUF_EXPORT DoubleValue : public ::google::protobuf::Message /* @@p void UnsafeArenaSwap(DoubleValue* other); void Swap(DoubleValue* other); + friend void swap(DoubleValue& a, DoubleValue& b) { + a.Swap(&b); + } // implements Message ---------------------------------------------- @@ -167,7 +185,7 @@ class LIBPROTOBUF_EXPORT DoubleValue : public ::google::protobuf::Message /* @@p private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - friend class ::google::protobuf::Arena; + template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; double value_; @@ -187,7 +205,21 @@ class LIBPROTOBUF_EXPORT FloatValue : public ::google::protobuf::Message /* @@pr CopyFrom(from); return *this; } + #if LANG_CXX11 + FloatValue(FloatValue&& from) noexcept + : FloatValue() { + *this = ::std::move(from); + } + inline FloatValue& operator=(FloatValue&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif inline ::google::protobuf::Arena* GetArena() const PROTOBUF_FINAL { return GetArenaNoVirtual(); } @@ -206,6 +238,9 @@ class LIBPROTOBUF_EXPORT FloatValue : public ::google::protobuf::Message /* @@pr void UnsafeArenaSwap(FloatValue* other); void Swap(FloatValue* other); + friend void swap(FloatValue& a, FloatValue& b) { + a.Swap(&b); + } // implements Message ---------------------------------------------- @@ -262,7 +297,7 @@ class LIBPROTOBUF_EXPORT FloatValue : public ::google::protobuf::Message /* @@pr private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - friend class ::google::protobuf::Arena; + template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; float value_; @@ -282,7 +317,21 @@ class LIBPROTOBUF_EXPORT Int64Value : public ::google::protobuf::Message /* @@pr CopyFrom(from); return *this; } + #if LANG_CXX11 + Int64Value(Int64Value&& from) noexcept + : Int64Value() { + *this = ::std::move(from); + } + inline Int64Value& operator=(Int64Value&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif inline ::google::protobuf::Arena* GetArena() const PROTOBUF_FINAL { return GetArenaNoVirtual(); } @@ -301,6 +350,9 @@ class LIBPROTOBUF_EXPORT Int64Value : public ::google::protobuf::Message /* @@pr void UnsafeArenaSwap(Int64Value* other); void Swap(Int64Value* other); + friend void swap(Int64Value& a, Int64Value& b) { + a.Swap(&b); + } // implements Message ---------------------------------------------- @@ -357,7 +409,7 @@ class LIBPROTOBUF_EXPORT Int64Value : public ::google::protobuf::Message /* @@pr private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - friend class ::google::protobuf::Arena; + template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; ::google::protobuf::int64 value_; @@ -377,7 +429,21 @@ class LIBPROTOBUF_EXPORT UInt64Value : public ::google::protobuf::Message /* @@p CopyFrom(from); return *this; } + #if LANG_CXX11 + UInt64Value(UInt64Value&& from) noexcept + : UInt64Value() { + *this = ::std::move(from); + } + inline UInt64Value& operator=(UInt64Value&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif inline ::google::protobuf::Arena* GetArena() const PROTOBUF_FINAL { return GetArenaNoVirtual(); } @@ -396,6 +462,9 @@ class LIBPROTOBUF_EXPORT UInt64Value : public ::google::protobuf::Message /* @@p void UnsafeArenaSwap(UInt64Value* other); void Swap(UInt64Value* other); + friend void swap(UInt64Value& a, UInt64Value& b) { + a.Swap(&b); + } // implements Message ---------------------------------------------- @@ -452,7 +521,7 @@ class LIBPROTOBUF_EXPORT UInt64Value : public ::google::protobuf::Message /* @@p private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - friend class ::google::protobuf::Arena; + template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; ::google::protobuf::uint64 value_; @@ -472,7 +541,21 @@ class LIBPROTOBUF_EXPORT Int32Value : public ::google::protobuf::Message /* @@pr CopyFrom(from); return *this; } + #if LANG_CXX11 + Int32Value(Int32Value&& from) noexcept + : Int32Value() { + *this = ::std::move(from); + } + inline Int32Value& operator=(Int32Value&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif inline ::google::protobuf::Arena* GetArena() const PROTOBUF_FINAL { return GetArenaNoVirtual(); } @@ -491,6 +574,9 @@ class LIBPROTOBUF_EXPORT Int32Value : public ::google::protobuf::Message /* @@pr void UnsafeArenaSwap(Int32Value* other); void Swap(Int32Value* other); + friend void swap(Int32Value& a, Int32Value& b) { + a.Swap(&b); + } // implements Message ---------------------------------------------- @@ -547,7 +633,7 @@ class LIBPROTOBUF_EXPORT Int32Value : public ::google::protobuf::Message /* @@pr private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - friend class ::google::protobuf::Arena; + template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; ::google::protobuf::int32 value_; @@ -567,7 +653,21 @@ class LIBPROTOBUF_EXPORT UInt32Value : public ::google::protobuf::Message /* @@p CopyFrom(from); return *this; } + #if LANG_CXX11 + UInt32Value(UInt32Value&& from) noexcept + : UInt32Value() { + *this = ::std::move(from); + } + inline UInt32Value& operator=(UInt32Value&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif inline ::google::protobuf::Arena* GetArena() const PROTOBUF_FINAL { return GetArenaNoVirtual(); } @@ -586,6 +686,9 @@ class LIBPROTOBUF_EXPORT UInt32Value : public ::google::protobuf::Message /* @@p void UnsafeArenaSwap(UInt32Value* other); void Swap(UInt32Value* other); + friend void swap(UInt32Value& a, UInt32Value& b) { + a.Swap(&b); + } // implements Message ---------------------------------------------- @@ -642,7 +745,7 @@ class LIBPROTOBUF_EXPORT UInt32Value : public ::google::protobuf::Message /* @@p private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - friend class ::google::protobuf::Arena; + template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; ::google::protobuf::uint32 value_; @@ -662,7 +765,21 @@ class LIBPROTOBUF_EXPORT BoolValue : public ::google::protobuf::Message /* @@pro CopyFrom(from); return *this; } + #if LANG_CXX11 + BoolValue(BoolValue&& from) noexcept + : BoolValue() { + *this = ::std::move(from); + } + inline BoolValue& operator=(BoolValue&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif inline ::google::protobuf::Arena* GetArena() const PROTOBUF_FINAL { return GetArenaNoVirtual(); } @@ -681,6 +798,9 @@ class LIBPROTOBUF_EXPORT BoolValue : public ::google::protobuf::Message /* @@pro void UnsafeArenaSwap(BoolValue* other); void Swap(BoolValue* other); + friend void swap(BoolValue& a, BoolValue& b) { + a.Swap(&b); + } // implements Message ---------------------------------------------- @@ -737,7 +857,7 @@ class LIBPROTOBUF_EXPORT BoolValue : public ::google::protobuf::Message /* @@pro private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - friend class ::google::protobuf::Arena; + template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; bool value_; @@ -757,7 +877,21 @@ class LIBPROTOBUF_EXPORT StringValue : public ::google::protobuf::Message /* @@p CopyFrom(from); return *this; } + #if LANG_CXX11 + StringValue(StringValue&& from) noexcept + : StringValue() { + *this = ::std::move(from); + } + inline StringValue& operator=(StringValue&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif inline ::google::protobuf::Arena* GetArena() const PROTOBUF_FINAL { return GetArenaNoVirtual(); } @@ -776,6 +910,9 @@ class LIBPROTOBUF_EXPORT StringValue : public ::google::protobuf::Message /* @@p void UnsafeArenaSwap(StringValue* other); void Swap(StringValue* other); + friend void swap(StringValue& a, StringValue& b) { + a.Swap(&b); + } // implements Message ---------------------------------------------- @@ -827,6 +964,9 @@ class LIBPROTOBUF_EXPORT StringValue : public ::google::protobuf::Message /* @@p static const int kValueFieldNumber = 1; const ::std::string& value() const; void set_value(const ::std::string& value); + #if LANG_CXX11 + void set_value(::std::string&& value); + #endif void set_value(const char* value); void set_value(const char* value, size_t size); ::std::string* mutable_value(); @@ -840,7 +980,7 @@ class LIBPROTOBUF_EXPORT StringValue : public ::google::protobuf::Message /* @@p private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - friend class ::google::protobuf::Arena; + template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; ::google::protobuf::internal::ArenaStringPtr value_; @@ -860,7 +1000,21 @@ class LIBPROTOBUF_EXPORT BytesValue : public ::google::protobuf::Message /* @@pr CopyFrom(from); return *this; } + #if LANG_CXX11 + BytesValue(BytesValue&& from) noexcept + : BytesValue() { + *this = ::std::move(from); + } + inline BytesValue& operator=(BytesValue&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif inline ::google::protobuf::Arena* GetArena() const PROTOBUF_FINAL { return GetArenaNoVirtual(); } @@ -879,6 +1033,9 @@ class LIBPROTOBUF_EXPORT BytesValue : public ::google::protobuf::Message /* @@pr void UnsafeArenaSwap(BytesValue* other); void Swap(BytesValue* other); + friend void swap(BytesValue& a, BytesValue& b) { + a.Swap(&b); + } // implements Message ---------------------------------------------- @@ -930,6 +1087,9 @@ class LIBPROTOBUF_EXPORT BytesValue : public ::google::protobuf::Message /* @@pr static const int kValueFieldNumber = 1; const ::std::string& value() const; void set_value(const ::std::string& value); + #if LANG_CXX11 + void set_value(::std::string&& value); + #endif void set_value(const char* value); void set_value(const void* value, size_t size); ::std::string* mutable_value(); @@ -943,7 +1103,7 @@ class LIBPROTOBUF_EXPORT BytesValue : public ::google::protobuf::Message /* @@pr private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - friend class ::google::protobuf::Arena; + template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; ::google::protobuf::internal::ArenaStringPtr value_; @@ -956,6 +1116,10 @@ class LIBPROTOBUF_EXPORT BytesValue : public ::google::protobuf::Message /* @@pr // =================================================================== #if !PROTOBUF_INLINE_NOT_IN_HEADERS +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ // DoubleValue // double value = 1; @@ -1097,6 +1261,14 @@ inline void StringValue::set_value(const ::std::string& value) { value_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:google.protobuf.StringValue.value) } +#if LANG_CXX11 +inline void StringValue::set_value(::std::string&& value) { + + value_.Set( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.StringValue.value) +} +#endif inline void StringValue::set_value(const char* value) { GOOGLE_DCHECK(value != NULL); @@ -1168,6 +1340,14 @@ inline void BytesValue::set_value(const ::std::string& value) { value_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:google.protobuf.BytesValue.value) } +#if LANG_CXX11 +inline void BytesValue::set_value(::std::string&& value) { + + value_.Set( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.BytesValue.value) +} +#endif inline void BytesValue::set_value(const char* value) { GOOGLE_DCHECK(value != NULL); @@ -1222,6 +1402,9 @@ inline void BytesValue::unsafe_arena_set_allocated_value( // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.BytesValue.value) } +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ #endif // !PROTOBUF_INLINE_NOT_IN_HEADERS // ------------------------------------------------------------------- -- cgit v1.2.3