From e15326ba807a49365b6c9f5958e969b5aa915f8c Mon Sep 17 00:00:00 2001 From: Mike Kruskal Date: Mon, 15 May 2023 16:11:41 -0700 Subject: [PATCH] Add a workaround for GCC constexpr bug This turns the constexpr constructors into templates to silence errors when constexpr isn't valid. We are also switching to 12.2 for GCC/cmake tests to prevent regressions (9.5 and 13.1 are already tested by GCC/bazel tests). Fixes #12807 PiperOrigin-RevId: 532258101 --- .github/workflows/test_cpp.yml | 2 +- src/google/protobuf/compiler/cpp/message.cc | 14 ++++++++++- src/google/protobuf/compiler/plugin.pb.cc | 4 +++ src/google/protobuf/compiler/plugin.pb.h | 4 +++ src/google/protobuf/descriptor.pb.cc | 28 +++++++++++++++++++++ src/google/protobuf/descriptor.pb.h | 28 +++++++++++++++++++++ 6 files changed, 78 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_cpp.yml b/.github/workflows/test_cpp.yml index a8e7b04065..f45b59ed13 100644 --- a/.github/workflows/test_cpp.yml +++ b/.github/workflows/test_cpp.yml @@ -234,7 +234,7 @@ jobs: - name: Run tests uses: protocolbuffers/protobuf-ci/docker@v1 with: - image: us-docker.pkg.dev/protobuf-build/containers/test/linux/gcc:13.1-5.4.0-307caa02808127e49720f3e77d6a9f3b3ef5a915 + image: us-docker.pkg.dev/protobuf-build/containers/test/linux/gcc:12.2-5.4.0-307caa02808127e49720f3e77d6a9f3b3ef5a915 credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }} entrypoint: bash command: >- diff --git a/src/google/protobuf/compiler/cpp/message.cc b/src/google/protobuf/compiler/cpp/message.cc index 034d5bd3cc..301ddf379b 100644 --- a/src/google/protobuf/compiler/cpp/message.cc +++ b/src/google/protobuf/compiler/cpp/message.cc @@ -156,7 +156,7 @@ std::vector SortFieldsByNumber( struct ExtensionRangeSorter { bool operator()(const Descriptor::ExtensionRange* left, const Descriptor::ExtensionRange* right) const { - return left->start_number() < right->start_number(); + return left->start < right->start; } }; @@ -1176,6 +1176,9 @@ void MessageGenerator::GenerateClassDefinition(io::Printer* p) { " ::$proto_ns$::internal::WireFormatLite::$val_wire_type$> " "SuperType;\n" " $classname$();\n" + // Templatize constexpr constructor as a workaround for a bug in gcc 12 + // (warning in gcc 13). + " template \n" " explicit PROTOBUF_CONSTEXPR $classname$(\n" " ::$proto_ns$::internal::ConstantInitialized);\n" " explicit $classname$(::$proto_ns$::Arena* arena);\n" @@ -1269,6 +1272,9 @@ void MessageGenerator::GenerateClassDefinition(io::Printer* p) { format("~$classname$() override;\n"); } format( + // Templatize constexpr constructor as a workaround for a bug in gcc 12 + // (warning in gcc 13). + "template\n" "explicit PROTOBUF_CONSTEXPR " "$classname$(::$proto_ns$::internal::ConstantInitialized);\n" "\n" @@ -2526,6 +2532,9 @@ void MessageGenerator::GenerateConstexprConstructor(io::Printer* p) { if (IsMapEntryMessage(descriptor_) || !HasImplData(descriptor_, options_)) { p->Emit(R"cc( + //~ Templatize constexpr constructor as a workaround for a bug in gcc 12 + //~ (warning in gcc 13). + template $constexpr$ $classname$::$classname$(::_pbi::ConstantInitialized) {} )cc"); return; @@ -2604,6 +2613,9 @@ void MessageGenerator::GenerateConstexprConstructor(io::Printer* p) { }}, }, R"cc( + //~ Templatize constexpr constructor as a workaround for a bug in gcc 12 + //~ (warning in gcc 13). + template $constexpr$ $classname$::$classname$(::_pbi::ConstantInitialized) : _impl_{$init_body$} {} )cc"); diff --git a/src/google/protobuf/compiler/plugin.pb.cc b/src/google/protobuf/compiler/plugin.pb.cc index 7b46cc4367..f4fceef0eb 100644 --- a/src/google/protobuf/compiler/plugin.pb.cc +++ b/src/google/protobuf/compiler/plugin.pb.cc @@ -23,6 +23,7 @@ namespace _fl = ::google::protobuf::internal::field_layout; namespace google { namespace protobuf { namespace compiler { + template PROTOBUF_CONSTEXPR Version::Version(::_pbi::ConstantInitialized) : _impl_{ /*decltype(_impl_._has_bits_)*/ {}, @@ -45,6 +46,7 @@ struct VersionDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 VersionDefaultTypeInternal _Version_default_instance_; + template PROTOBUF_CONSTEXPR CodeGeneratorRequest::CodeGeneratorRequest(::_pbi::ConstantInitialized) : _impl_{ /*decltype(_impl_._has_bits_)*/ {}, @@ -67,6 +69,7 @@ struct CodeGeneratorRequestDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 CodeGeneratorRequestDefaultTypeInternal _CodeGeneratorRequest_default_instance_; + template PROTOBUF_CONSTEXPR CodeGeneratorResponse_File::CodeGeneratorResponse_File(::_pbi::ConstantInitialized) : _impl_{ /*decltype(_impl_._has_bits_)*/ {}, @@ -95,6 +98,7 @@ struct CodeGeneratorResponse_FileDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 CodeGeneratorResponse_FileDefaultTypeInternal _CodeGeneratorResponse_File_default_instance_; + template PROTOBUF_CONSTEXPR CodeGeneratorResponse::CodeGeneratorResponse(::_pbi::ConstantInitialized) : _impl_{ /*decltype(_impl_._has_bits_)*/ {}, diff --git a/src/google/protobuf/compiler/plugin.pb.h b/src/google/protobuf/compiler/plugin.pb.h index e24f387ed0..ee31e53e68 100644 --- a/src/google/protobuf/compiler/plugin.pb.h +++ b/src/google/protobuf/compiler/plugin.pb.h @@ -130,6 +130,7 @@ class PROTOC_EXPORT Version final : public: inline Version() : Version(nullptr) {} ~Version() override; + template explicit PROTOBUF_CONSTEXPR Version(::google::protobuf::internal::ConstantInitialized); Version(const Version& from); @@ -333,6 +334,7 @@ class PROTOC_EXPORT CodeGeneratorRequest final : public: inline CodeGeneratorRequest() : CodeGeneratorRequest(nullptr) {} ~CodeGeneratorRequest() override; + template explicit PROTOBUF_CONSTEXPR CodeGeneratorRequest(::google::protobuf::internal::ConstantInitialized); CodeGeneratorRequest(const CodeGeneratorRequest& from); @@ -564,6 +566,7 @@ class PROTOC_EXPORT CodeGeneratorResponse_File final : public: inline CodeGeneratorResponse_File() : CodeGeneratorResponse_File(nullptr) {} ~CodeGeneratorResponse_File() override; + template explicit PROTOBUF_CONSTEXPR CodeGeneratorResponse_File(::google::protobuf::internal::ConstantInitialized); CodeGeneratorResponse_File(const CodeGeneratorResponse_File& from); @@ -783,6 +786,7 @@ class PROTOC_EXPORT CodeGeneratorResponse final : public: inline CodeGeneratorResponse() : CodeGeneratorResponse(nullptr) {} ~CodeGeneratorResponse() override; + template explicit PROTOBUF_CONSTEXPR CodeGeneratorResponse(::google::protobuf::internal::ConstantInitialized); CodeGeneratorResponse(const CodeGeneratorResponse& from); diff --git a/src/google/protobuf/descriptor.pb.cc b/src/google/protobuf/descriptor.pb.cc index c79ce8a97e..045d7eba7b 100644 --- a/src/google/protobuf/descriptor.pb.cc +++ b/src/google/protobuf/descriptor.pb.cc @@ -22,6 +22,7 @@ namespace _pbi = ::google::protobuf::internal; namespace _fl = ::google::protobuf::internal::field_layout; namespace google { namespace protobuf { + template PROTOBUF_CONSTEXPR FileDescriptorSet::FileDescriptorSet(::_pbi::ConstantInitialized) : _impl_{ /*decltype(_impl_.file_)*/ {}, @@ -42,6 +43,7 @@ struct FileDescriptorSetDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FileDescriptorSetDefaultTypeInternal _FileDescriptorSet_default_instance_; + template PROTOBUF_CONSTEXPR FileDescriptorProto::FileDescriptorProto(::_pbi::ConstantInitialized) : _impl_{ /*decltype(_impl_._has_bits_)*/ {}, @@ -87,6 +89,7 @@ struct FileDescriptorProtoDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FileDescriptorProtoDefaultTypeInternal _FileDescriptorProto_default_instance_; + template PROTOBUF_CONSTEXPR DescriptorProto_ExtensionRange::DescriptorProto_ExtensionRange(::_pbi::ConstantInitialized) : _impl_{ /*decltype(_impl_._has_bits_)*/ {}, @@ -110,6 +113,7 @@ struct DescriptorProto_ExtensionRangeDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DescriptorProto_ExtensionRangeDefaultTypeInternal _DescriptorProto_ExtensionRange_default_instance_; + template PROTOBUF_CONSTEXPR DescriptorProto_ReservedRange::DescriptorProto_ReservedRange(::_pbi::ConstantInitialized) : _impl_{ /*decltype(_impl_._has_bits_)*/ {}, @@ -132,6 +136,7 @@ struct DescriptorProto_ReservedRangeDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DescriptorProto_ReservedRangeDefaultTypeInternal _DescriptorProto_ReservedRange_default_instance_; + template PROTOBUF_CONSTEXPR DescriptorProto::DescriptorProto(::_pbi::ConstantInitialized) : _impl_{ /*decltype(_impl_._has_bits_)*/ {}, @@ -165,6 +170,7 @@ struct DescriptorProtoDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DescriptorProtoDefaultTypeInternal _DescriptorProto_default_instance_; + template PROTOBUF_CONSTEXPR ExtensionRangeOptions_Declaration::ExtensionRangeOptions_Declaration(::_pbi::ConstantInitialized) : _impl_{ /*decltype(_impl_._has_bits_)*/ {}, @@ -197,6 +203,7 @@ struct ExtensionRangeOptions_DeclarationDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ExtensionRangeOptions_DeclarationDefaultTypeInternal _ExtensionRangeOptions_Declaration_default_instance_; + template PROTOBUF_CONSTEXPR ExtensionRangeOptions::ExtensionRangeOptions(::_pbi::ConstantInitialized) : _impl_{ /*decltype(_impl_._extensions_)*/ {}, @@ -221,6 +228,7 @@ struct ExtensionRangeOptionsDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ExtensionRangeOptionsDefaultTypeInternal _ExtensionRangeOptions_default_instance_; + template PROTOBUF_CONSTEXPR FieldDescriptorProto::FieldDescriptorProto(::_pbi::ConstantInitialized) : _impl_{ /*decltype(_impl_._has_bits_)*/ {}, @@ -267,6 +275,7 @@ struct FieldDescriptorProtoDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FieldDescriptorProtoDefaultTypeInternal _FieldDescriptorProto_default_instance_; + template PROTOBUF_CONSTEXPR OneofDescriptorProto::OneofDescriptorProto(::_pbi::ConstantInitialized) : _impl_{ /*decltype(_impl_._has_bits_)*/ {}, @@ -292,6 +301,7 @@ struct OneofDescriptorProtoDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 OneofDescriptorProtoDefaultTypeInternal _OneofDescriptorProto_default_instance_; + template PROTOBUF_CONSTEXPR EnumDescriptorProto_EnumReservedRange::EnumDescriptorProto_EnumReservedRange(::_pbi::ConstantInitialized) : _impl_{ /*decltype(_impl_._has_bits_)*/ {}, @@ -314,6 +324,7 @@ struct EnumDescriptorProto_EnumReservedRangeDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 EnumDescriptorProto_EnumReservedRangeDefaultTypeInternal _EnumDescriptorProto_EnumReservedRange_default_instance_; + template PROTOBUF_CONSTEXPR EnumDescriptorProto::EnumDescriptorProto(::_pbi::ConstantInitialized) : _impl_{ /*decltype(_impl_._has_bits_)*/ {}, @@ -342,6 +353,7 @@ struct EnumDescriptorProtoDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 EnumDescriptorProtoDefaultTypeInternal _EnumDescriptorProto_default_instance_; + template PROTOBUF_CONSTEXPR EnumValueDescriptorProto::EnumValueDescriptorProto(::_pbi::ConstantInitialized) : _impl_{ /*decltype(_impl_._has_bits_)*/ {}, @@ -368,6 +380,7 @@ struct EnumValueDescriptorProtoDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 EnumValueDescriptorProtoDefaultTypeInternal _EnumValueDescriptorProto_default_instance_; + template PROTOBUF_CONSTEXPR ServiceDescriptorProto::ServiceDescriptorProto(::_pbi::ConstantInitialized) : _impl_{ /*decltype(_impl_._has_bits_)*/ {}, @@ -394,6 +407,7 @@ struct ServiceDescriptorProtoDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ServiceDescriptorProtoDefaultTypeInternal _ServiceDescriptorProto_default_instance_; + template PROTOBUF_CONSTEXPR MethodDescriptorProto::MethodDescriptorProto(::_pbi::ConstantInitialized) : _impl_{ /*decltype(_impl_._has_bits_)*/ {}, @@ -429,6 +443,7 @@ struct MethodDescriptorProtoDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MethodDescriptorProtoDefaultTypeInternal _MethodDescriptorProto_default_instance_; + template PROTOBUF_CONSTEXPR FileOptions::FileOptions(::_pbi::ConstantInitialized) : _impl_{ /*decltype(_impl_._extensions_)*/ {}, @@ -501,6 +516,7 @@ struct FileOptionsDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FileOptionsDefaultTypeInternal _FileOptions_default_instance_; + template PROTOBUF_CONSTEXPR MessageOptions::MessageOptions(::_pbi::ConstantInitialized) : _impl_{ /*decltype(_impl_._extensions_)*/ {}, @@ -528,6 +544,7 @@ struct MessageOptionsDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MessageOptionsDefaultTypeInternal _MessageOptions_default_instance_; + template PROTOBUF_CONSTEXPR FieldOptions::FieldOptions(::_pbi::ConstantInitialized) : _impl_{ /*decltype(_impl_._extensions_)*/ {}, @@ -561,6 +578,7 @@ struct FieldOptionsDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FieldOptionsDefaultTypeInternal _FieldOptions_default_instance_; + template PROTOBUF_CONSTEXPR OneofOptions::OneofOptions(::_pbi::ConstantInitialized) : _impl_{ /*decltype(_impl_._extensions_)*/ {}, @@ -582,6 +600,7 @@ struct OneofOptionsDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 OneofOptionsDefaultTypeInternal _OneofOptions_default_instance_; + template PROTOBUF_CONSTEXPR EnumOptions::EnumOptions(::_pbi::ConstantInitialized) : _impl_{ /*decltype(_impl_._extensions_)*/ {}, @@ -607,6 +626,7 @@ struct EnumOptionsDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 EnumOptionsDefaultTypeInternal _EnumOptions_default_instance_; + template PROTOBUF_CONSTEXPR EnumValueOptions::EnumValueOptions(::_pbi::ConstantInitialized) : _impl_{ /*decltype(_impl_._extensions_)*/ {}, @@ -630,6 +650,7 @@ struct EnumValueOptionsDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 EnumValueOptionsDefaultTypeInternal _EnumValueOptions_default_instance_; + template PROTOBUF_CONSTEXPR ServiceOptions::ServiceOptions(::_pbi::ConstantInitialized) : _impl_{ /*decltype(_impl_._extensions_)*/ {}, @@ -653,6 +674,7 @@ struct ServiceOptionsDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ServiceOptionsDefaultTypeInternal _ServiceOptions_default_instance_; + template PROTOBUF_CONSTEXPR MethodOptions::MethodOptions(::_pbi::ConstantInitialized) : _impl_{ /*decltype(_impl_._extensions_)*/ {}, @@ -677,6 +699,7 @@ struct MethodOptionsDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MethodOptionsDefaultTypeInternal _MethodOptions_default_instance_; + template PROTOBUF_CONSTEXPR UninterpretedOption_NamePart::UninterpretedOption_NamePart(::_pbi::ConstantInitialized) : _impl_{ /*decltype(_impl_._has_bits_)*/ {}, @@ -702,6 +725,7 @@ struct UninterpretedOption_NamePartDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 UninterpretedOption_NamePartDefaultTypeInternal _UninterpretedOption_NamePart_default_instance_; + template PROTOBUF_CONSTEXPR UninterpretedOption::UninterpretedOption(::_pbi::ConstantInitialized) : _impl_{ /*decltype(_impl_._has_bits_)*/ {}, @@ -738,6 +762,7 @@ struct UninterpretedOptionDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 UninterpretedOptionDefaultTypeInternal _UninterpretedOption_default_instance_; + template PROTOBUF_CONSTEXPR SourceCodeInfo_Location::SourceCodeInfo_Location(::_pbi::ConstantInitialized) : _impl_{ /*decltype(_impl_._has_bits_)*/ {}, @@ -771,6 +796,7 @@ struct SourceCodeInfo_LocationDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SourceCodeInfo_LocationDefaultTypeInternal _SourceCodeInfo_Location_default_instance_; + template PROTOBUF_CONSTEXPR SourceCodeInfo::SourceCodeInfo(::_pbi::ConstantInitialized) : _impl_{ /*decltype(_impl_.location_)*/ {}, @@ -791,6 +817,7 @@ struct SourceCodeInfoDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SourceCodeInfoDefaultTypeInternal _SourceCodeInfo_default_instance_; + template PROTOBUF_CONSTEXPR GeneratedCodeInfo_Annotation::GeneratedCodeInfo_Annotation(::_pbi::ConstantInitialized) : _impl_{ /*decltype(_impl_._has_bits_)*/ {}, @@ -820,6 +847,7 @@ struct GeneratedCodeInfo_AnnotationDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GeneratedCodeInfo_AnnotationDefaultTypeInternal _GeneratedCodeInfo_Annotation_default_instance_; + template PROTOBUF_CONSTEXPR GeneratedCodeInfo::GeneratedCodeInfo(::_pbi::ConstantInitialized) : _impl_{ /*decltype(_impl_.annotation_)*/ {}, diff --git a/src/google/protobuf/descriptor.pb.h b/src/google/protobuf/descriptor.pb.h index ab896bff31..e6558a715e 100644 --- a/src/google/protobuf/descriptor.pb.h +++ b/src/google/protobuf/descriptor.pb.h @@ -528,6 +528,7 @@ class PROTOBUF_EXPORT FileDescriptorSet final : public: inline FileDescriptorSet() : FileDescriptorSet(nullptr) {} ~FileDescriptorSet() override; + template explicit PROTOBUF_CONSTEXPR FileDescriptorSet(::google::protobuf::internal::ConstantInitialized); FileDescriptorSet(const FileDescriptorSet& from); @@ -692,6 +693,7 @@ class PROTOBUF_EXPORT FileDescriptorProto final : public: inline FileDescriptorProto() : FileDescriptorProto(nullptr) {} ~FileDescriptorProto() override; + template explicit PROTOBUF_CONSTEXPR FileDescriptorProto(::google::protobuf::internal::ConstantInitialized); FileDescriptorProto(const FileDescriptorProto& from); @@ -1097,6 +1099,7 @@ class PROTOBUF_EXPORT DescriptorProto_ExtensionRange final : public: inline DescriptorProto_ExtensionRange() : DescriptorProto_ExtensionRange(nullptr) {} ~DescriptorProto_ExtensionRange() override; + template explicit PROTOBUF_CONSTEXPR DescriptorProto_ExtensionRange(::google::protobuf::internal::ConstantInitialized); DescriptorProto_ExtensionRange(const DescriptorProto_ExtensionRange& from); @@ -1285,6 +1288,7 @@ class PROTOBUF_EXPORT DescriptorProto_ReservedRange final : public: inline DescriptorProto_ReservedRange() : DescriptorProto_ReservedRange(nullptr) {} ~DescriptorProto_ReservedRange() override; + template explicit PROTOBUF_CONSTEXPR DescriptorProto_ReservedRange(::google::protobuf::internal::ConstantInitialized); DescriptorProto_ReservedRange(const DescriptorProto_ReservedRange& from); @@ -1456,6 +1460,7 @@ class PROTOBUF_EXPORT DescriptorProto final : public: inline DescriptorProto() : DescriptorProto(nullptr) {} ~DescriptorProto() override; + template explicit PROTOBUF_CONSTEXPR DescriptorProto(::google::protobuf::internal::ConstantInitialized); DescriptorProto(const DescriptorProto& from); @@ -1810,6 +1815,7 @@ class PROTOBUF_EXPORT ExtensionRangeOptions_Declaration final : public: inline ExtensionRangeOptions_Declaration() : ExtensionRangeOptions_Declaration(nullptr) {} ~ExtensionRangeOptions_Declaration() override; + template explicit PROTOBUF_CONSTEXPR ExtensionRangeOptions_Declaration(::google::protobuf::internal::ConstantInitialized); ExtensionRangeOptions_Declaration(const ExtensionRangeOptions_Declaration& from); @@ -2045,6 +2051,7 @@ class PROTOBUF_EXPORT ExtensionRangeOptions final : public: inline ExtensionRangeOptions() : ExtensionRangeOptions(nullptr) {} ~ExtensionRangeOptions() override; + template explicit PROTOBUF_CONSTEXPR ExtensionRangeOptions(::google::protobuf::internal::ConstantInitialized); ExtensionRangeOptions(const ExtensionRangeOptions& from); @@ -2418,6 +2425,7 @@ class PROTOBUF_EXPORT FieldDescriptorProto final : public: inline FieldDescriptorProto() : FieldDescriptorProto(nullptr) {} ~FieldDescriptorProto() override; + template explicit PROTOBUF_CONSTEXPR FieldDescriptorProto(::google::protobuf::internal::ConstantInitialized); FieldDescriptorProto(const FieldDescriptorProto& from); @@ -2797,6 +2805,7 @@ class PROTOBUF_EXPORT OneofDescriptorProto final : public: inline OneofDescriptorProto() : OneofDescriptorProto(nullptr) {} ~OneofDescriptorProto() override; + template explicit PROTOBUF_CONSTEXPR OneofDescriptorProto(::google::protobuf::internal::ConstantInitialized); OneofDescriptorProto(const OneofDescriptorProto& from); @@ -2978,6 +2987,7 @@ class PROTOBUF_EXPORT EnumDescriptorProto_EnumReservedRange final : public: inline EnumDescriptorProto_EnumReservedRange() : EnumDescriptorProto_EnumReservedRange(nullptr) {} ~EnumDescriptorProto_EnumReservedRange() override; + template explicit PROTOBUF_CONSTEXPR EnumDescriptorProto_EnumReservedRange(::google::protobuf::internal::ConstantInitialized); EnumDescriptorProto_EnumReservedRange(const EnumDescriptorProto_EnumReservedRange& from); @@ -3149,6 +3159,7 @@ class PROTOBUF_EXPORT EnumDescriptorProto final : public: inline EnumDescriptorProto() : EnumDescriptorProto(nullptr) {} ~EnumDescriptorProto() override; + template explicit PROTOBUF_CONSTEXPR EnumDescriptorProto(::google::protobuf::internal::ConstantInitialized); EnumDescriptorProto(const EnumDescriptorProto& from); @@ -3402,6 +3413,7 @@ class PROTOBUF_EXPORT EnumValueDescriptorProto final : public: inline EnumValueDescriptorProto() : EnumValueDescriptorProto(nullptr) {} ~EnumValueDescriptorProto() override; + template explicit PROTOBUF_CONSTEXPR EnumValueDescriptorProto(::google::protobuf::internal::ConstantInitialized); EnumValueDescriptorProto(const EnumValueDescriptorProto& from); @@ -3596,6 +3608,7 @@ class PROTOBUF_EXPORT ServiceDescriptorProto final : public: inline ServiceDescriptorProto() : ServiceDescriptorProto(nullptr) {} ~ServiceDescriptorProto() override; + template explicit PROTOBUF_CONSTEXPR ServiceDescriptorProto(::google::protobuf::internal::ConstantInitialized); ServiceDescriptorProto(const ServiceDescriptorProto& from); @@ -3797,6 +3810,7 @@ class PROTOBUF_EXPORT MethodDescriptorProto final : public: inline MethodDescriptorProto() : MethodDescriptorProto(nullptr) {} ~MethodDescriptorProto() override; + template explicit PROTOBUF_CONSTEXPR MethodDescriptorProto(::google::protobuf::internal::ConstantInitialized); MethodDescriptorProto(const MethodDescriptorProto& from); @@ -4042,6 +4056,7 @@ class PROTOBUF_EXPORT FileOptions final : public: inline FileOptions() : FileOptions(nullptr) {} ~FileOptions() override; + template explicit PROTOBUF_CONSTEXPR FileOptions(::google::protobuf::internal::ConstantInitialized); FileOptions(const FileOptions& from); @@ -4701,6 +4716,7 @@ class PROTOBUF_EXPORT MessageOptions final : public: inline MessageOptions() : MessageOptions(nullptr) {} ~MessageOptions() override; + template explicit PROTOBUF_CONSTEXPR MessageOptions(::google::protobuf::internal::ConstantInitialized); MessageOptions(const MessageOptions& from); @@ -5084,6 +5100,7 @@ class PROTOBUF_EXPORT FieldOptions final : public: inline FieldOptions() : FieldOptions(nullptr) {} ~FieldOptions() override; + template explicit PROTOBUF_CONSTEXPR FieldOptions(::google::protobuf::internal::ConstantInitialized); FieldOptions(const FieldOptions& from); @@ -5644,6 +5661,7 @@ class PROTOBUF_EXPORT OneofOptions final : public: inline OneofOptions() : OneofOptions(nullptr) {} ~OneofOptions() override; + template explicit PROTOBUF_CONSTEXPR OneofOptions(::google::protobuf::internal::ConstantInitialized); OneofOptions(const OneofOptions& from); @@ -5961,6 +5979,7 @@ class PROTOBUF_EXPORT EnumOptions final : public: inline EnumOptions() : EnumOptions(nullptr) {} ~EnumOptions() override; + template explicit PROTOBUF_CONSTEXPR EnumOptions(::google::protobuf::internal::ConstantInitialized); EnumOptions(const EnumOptions& from); @@ -6318,6 +6337,7 @@ class PROTOBUF_EXPORT EnumValueOptions final : public: inline EnumValueOptions() : EnumValueOptions(nullptr) {} ~EnumValueOptions() override; + template explicit PROTOBUF_CONSTEXPR EnumValueOptions(::google::protobuf::internal::ConstantInitialized); EnumValueOptions(const EnumValueOptions& from); @@ -6649,6 +6669,7 @@ class PROTOBUF_EXPORT ServiceOptions final : public: inline ServiceOptions() : ServiceOptions(nullptr) {} ~ServiceOptions() override; + template explicit PROTOBUF_CONSTEXPR ServiceOptions(::google::protobuf::internal::ConstantInitialized); ServiceOptions(const ServiceOptions& from); @@ -6980,6 +7001,7 @@ class PROTOBUF_EXPORT MethodOptions final : public: inline MethodOptions() : MethodOptions(nullptr) {} ~MethodOptions() override; + template explicit PROTOBUF_CONSTEXPR MethodOptions(::google::protobuf::internal::ConstantInitialized); MethodOptions(const MethodOptions& from); @@ -7345,6 +7367,7 @@ class PROTOBUF_EXPORT UninterpretedOption_NamePart final : public: inline UninterpretedOption_NamePart() : UninterpretedOption_NamePart(nullptr) {} ~UninterpretedOption_NamePart() override; + template explicit PROTOBUF_CONSTEXPR UninterpretedOption_NamePart(::google::protobuf::internal::ConstantInitialized); UninterpretedOption_NamePart(const UninterpretedOption_NamePart& from); @@ -7522,6 +7545,7 @@ class PROTOBUF_EXPORT UninterpretedOption final : public: inline UninterpretedOption() : UninterpretedOption(nullptr) {} ~UninterpretedOption() override; + template explicit PROTOBUF_CONSTEXPR UninterpretedOption(::google::protobuf::internal::ConstantInitialized); UninterpretedOption(const UninterpretedOption& from); @@ -7785,6 +7809,7 @@ class PROTOBUF_EXPORT SourceCodeInfo_Location final : public: inline SourceCodeInfo_Location() : SourceCodeInfo_Location(nullptr) {} ~SourceCodeInfo_Location() override; + template explicit PROTOBUF_CONSTEXPR SourceCodeInfo_Location(::google::protobuf::internal::ConstantInitialized); SourceCodeInfo_Location(const SourceCodeInfo_Location& from); @@ -8040,6 +8065,7 @@ class PROTOBUF_EXPORT SourceCodeInfo final : public: inline SourceCodeInfo() : SourceCodeInfo(nullptr) {} ~SourceCodeInfo() override; + template explicit PROTOBUF_CONSTEXPR SourceCodeInfo(::google::protobuf::internal::ConstantInitialized); SourceCodeInfo(const SourceCodeInfo& from); @@ -8206,6 +8232,7 @@ class PROTOBUF_EXPORT GeneratedCodeInfo_Annotation final : public: inline GeneratedCodeInfo_Annotation() : GeneratedCodeInfo_Annotation(nullptr) {} ~GeneratedCodeInfo_Annotation() override; + template explicit PROTOBUF_CONSTEXPR GeneratedCodeInfo_Annotation(::google::protobuf::internal::ConstantInitialized); GeneratedCodeInfo_Annotation(const GeneratedCodeInfo_Annotation& from); @@ -8451,6 +8478,7 @@ class PROTOBUF_EXPORT GeneratedCodeInfo final : public: inline GeneratedCodeInfo() : GeneratedCodeInfo(nullptr) {} ~GeneratedCodeInfo() override; + template explicit PROTOBUF_CONSTEXPR GeneratedCodeInfo(::google::protobuf::internal::ConstantInitialized); GeneratedCodeInfo(const GeneratedCodeInfo& from);