From 13fd045dbb2b4dacea32be162a41d5a4b0d1802f Mon Sep 17 00:00:00 2001 From: Adam Cozzette Date: Tue, 12 Sep 2017 10:32:01 -0700 Subject: Integrated internal changes from Google --- src/google/protobuf/any.pb.h | 54 ++++++++++++++++++++++++++++---------------- 1 file changed, 35 insertions(+), 19 deletions(-) (limited to 'src/google/protobuf/any.pb.h') diff --git a/src/google/protobuf/any.pb.h b/src/google/protobuf/any.pb.h index 5ffda741..20a1cbed 100644 --- a/src/google/protobuf/any.pb.h +++ b/src/google/protobuf/any.pb.h @@ -31,31 +31,33 @@ #include #include // @@protoc_insertion_point(includes) -namespace google { -namespace protobuf { -class Any; -class AnyDefaultTypeInternal; -LIBPROTOBUF_EXPORT extern AnyDefaultTypeInternal _Any_default_instance_; -} // namespace protobuf -} // namespace google - -namespace google { -namespace protobuf { namespace protobuf_google_2fprotobuf_2fany_2eproto { -// Internal implementation detail -- do not call these. +// Internal implementation detail -- do not use these members. struct LIBPROTOBUF_EXPORT TableStruct { static const ::google::protobuf::internal::ParseTableField entries[]; 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::ParseTable schema[1]; static const ::google::protobuf::internal::FieldMetadata field_metadata[]; static const ::google::protobuf::internal::SerializationTable serialization_table[]; - static void InitDefaultsImpl(); + static const ::google::protobuf::uint32 offsets[]; }; void LIBPROTOBUF_EXPORT AddDescriptors(); -void LIBPROTOBUF_EXPORT InitDefaults(); +void LIBPROTOBUF_EXPORT InitDefaultsAnyImpl(); +void LIBPROTOBUF_EXPORT InitDefaultsAny(); +inline void LIBPROTOBUF_EXPORT InitDefaults() { + InitDefaultsAny(); +} } // namespace protobuf_google_2fprotobuf_2fany_2eproto +namespace google { +namespace protobuf { +class Any; +class AnyDefaultTypeInternal; +LIBPROTOBUF_EXPORT extern AnyDefaultTypeInternal _Any_default_instance_; +} // namespace protobuf +} // namespace google +namespace google { +namespace protobuf { // =================================================================== @@ -70,9 +72,25 @@ class LIBPROTOBUF_EXPORT Any : public ::google::protobuf::Message /* @@protoc_in CopyFrom(from); return *this; } + #if LANG_CXX11 + Any(Any&& from) noexcept + : Any() { + *this = ::std::move(from); + } + + inline Any& operator=(Any&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif static const ::google::protobuf::Descriptor* descriptor(); static const Any& default_instance(); + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY static inline const Any* internal_default_instance() { return reinterpret_cast( &_Any_default_instance_); @@ -171,14 +189,14 @@ class LIBPROTOBUF_EXPORT Any : public ::google::protobuf::Message /* @@protoc_in ::google::protobuf::internal::ArenaStringPtr value_; mutable int _cached_size_; ::google::protobuf::internal::AnyMetadata _any_metadata_; - friend struct protobuf_google_2fprotobuf_2fany_2eproto::TableStruct; + friend struct ::protobuf_google_2fprotobuf_2fany_2eproto::TableStruct; + friend void ::protobuf_google_2fprotobuf_2fany_2eproto::InitDefaultsAnyImpl(); }; // =================================================================== // =================================================================== -#if !PROTOBUF_INLINE_NOT_IN_HEADERS #ifdef __GNUC__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wstrict-aliasing" @@ -294,11 +312,9 @@ inline void Any::set_allocated_value(::std::string* value) { #ifdef __GNUC__ #pragma GCC diagnostic pop #endif // __GNUC__ -#endif // !PROTOBUF_INLINE_NOT_IN_HEADERS // @@protoc_insertion_point(namespace_scope) - } // namespace protobuf } // namespace google -- cgit v1.2.3