diff --git a/src/google/protobuf/compiler/cpp/enum.cc b/src/google/protobuf/compiler/cpp/enum.cc index 969c657d7988..0a168f8ecca9 100644 --- a/src/google/protobuf/compiler/cpp/enum.cc +++ b/src/google/protobuf/compiler/cpp/enum.cc @@ -170,8 +170,10 @@ void EnumGenerator::GenerateDefinition(io::Printer* p) { $dllexport_decl $bool $Msg_Enum$_IsValid(int value); $dllexport_decl $extern const uint32_t $Msg_Enum$_internal_data_[]; - constexpr $Msg_Enum$ $Msg_Enum_Enum_MIN$ = static_cast<$Msg_Enum$>($kMin$); - constexpr $Msg_Enum$ $Msg_Enum_Enum_MAX$ = static_cast<$Msg_Enum$>($kMax$); + inline constexpr $Msg_Enum$ $Msg_Enum_Enum_MIN$ = + static_cast<$Msg_Enum$>($kMin$); + inline constexpr $Msg_Enum$ $Msg_Enum_Enum_MAX$ = + static_cast<$Msg_Enum$>($kMax$); )cc"); if (generate_array_size_) { @@ -180,7 +182,7 @@ void EnumGenerator::GenerateDefinition(io::Printer* p) { "_ARRAYSIZE")) .AnnotatedAs(enum_)}, R"cc( - constexpr int $Msg_Enum_Enum_ARRAYSIZE$ = $kMax$ + 1; + inline constexpr int $Msg_Enum_Enum_ARRAYSIZE$ = $kMax$ + 1; )cc"); } @@ -548,45 +550,6 @@ void EnumGenerator::GenerateMethods(int idx, io::Printer* p) { } )cc"); } - - if (enum_->containing_type() != nullptr) { - // Before C++17, we must define the static constants which were - // declared in the header, to give the linker a place to put them. - // But MSVC++ pre-2015 and post-2017 (version 15.5+) insists that we not. - p->Emit( - { - {"Msg_", ClassName(enum_->containing_type(), false)}, - {"constexpr_storage", - [&] { - for (int i = 0; i < enum_->value_count(); i++) { - p->Emit({{"VALUE", EnumValueName(enum_->value(i))}}, - R"cc( - constexpr $Msg_Enum$ $Msg_$::$VALUE$; - )cc"); - } - }}, - {"array_size", - [&] { - if (generate_array_size_) { - p->Emit(R"cc( - constexpr int $Msg_$::$Enum$_ARRAYSIZE; - )cc"); - } - }}, - }, - R"( - #if (__cplusplus < 201703) && \ - (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) - - $constexpr_storage$; - constexpr $Msg_Enum$ $Msg_$::$Enum$_MIN; - constexpr $Msg_Enum$ $Msg_$::$Enum$_MAX; - $array_size$; - - #endif // (__cplusplus < 201703) && - // (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) - )"); - } } } // namespace cpp } // namespace compiler diff --git a/src/google/protobuf/compiler/cpp/extension.cc b/src/google/protobuf/compiler/cpp/extension.cc index 7e2d53b97240..40fed905f35e 100644 --- a/src/google/protobuf/compiler/cpp/extension.cc +++ b/src/google/protobuf/compiler/cpp/extension.cc @@ -89,8 +89,13 @@ bool ExtensionGenerator::IsScoped() const { void ExtensionGenerator::GenerateDeclaration(io::Printer* p) const { auto var = p->WithVars(variables_); auto annotate = p->WithAnnotations({{"name", descriptor_}}); - - p->Emit({{"qualifier", + p->Emit({{"constant_qualifier", + // If this is a class member, it needs to be declared + // `static constexpr`. + // Otherwise, it will be + // `inline constexpr`. + IsScoped() ? "static" : ""}, + {"id_qualifier", // If this is a class member, it needs to be declared "static". // Otherwise, it needs to be "extern". In the latter case, it // also needs the DLL export/import specifier. @@ -99,8 +104,9 @@ void ExtensionGenerator::GenerateDeclaration(io::Printer* p) const { ? "extern" : absl::StrCat(options_.dllexport_decl, " extern")}}, R"cc( - static const int $constant_name$ = $number$; - $qualifier$ ::$proto_ns$::internal::ExtensionIdentifier< + inline $constant_qualifier $constexpr int $constant_name$ = + $number$; + $id_qualifier$ ::$proto_ns$::internal::ExtensionIdentifier< $extendee$, ::$proto_ns$::internal::$type_traits$, $field_type$, $packed$> $name$; @@ -147,32 +153,13 @@ void ExtensionGenerator::GenerateDefinition(io::Printer* p) { const std::string $default_str$($default_val$); )cc"); }}, - {"declare_const_var", - [&] { - if (!IsScoped()) return; - // Likewise, class members need to declare the field constant - // variable. - p->Emit(R"cc( -#if !defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912) - const int $scope$$constant_name$; -#endif - )cc"); - }}, - {"define_extension_id", - [&] { - p->Emit(R"cc( - PROTOBUF_CONSTINIT$ dllexport_decl$ - PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 ::_pbi:: - ExtensionIdentifier<$extendee$, ::_pbi::$type_traits$, - $field_type$, $packed$> - $scoped_name$($constant_name$, $default_str$); - )cc"); - }}, }, R"cc( $declare_default_str$; - $declare_const_var$; - $define_extension_id$; + PROTOBUF_CONSTINIT$ dllexport_decl$ + PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 ::_pbi::ExtensionIdentifier< + $extendee$, ::_pbi::$type_traits$, $field_type$, $packed$> + $scoped_name$($constant_name$, $default_str$); )cc"); } diff --git a/src/google/protobuf/compiler/java/java_features.pb.cc b/src/google/protobuf/compiler/java/java_features.pb.cc index 1f068e62ed3b..d615a0eab1a8 100644 --- a/src/google/protobuf/compiler/java/java_features.pb.cc +++ b/src/google/protobuf/compiler/java/java_features.pb.cc @@ -139,18 +139,6 @@ PROTOBUF_CONSTINIT const uint32_t JavaFeatures_Utf8Validation_internal_data_[] = bool JavaFeatures_Utf8Validation_IsValid(int value) { return 0 <= value && value <= 2; } -#if (__cplusplus < 201703) && \ - (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) - -constexpr JavaFeatures_Utf8Validation JavaFeatures::UTF8_VALIDATION_UNKNOWN; -constexpr JavaFeatures_Utf8Validation JavaFeatures::DEFAULT; -constexpr JavaFeatures_Utf8Validation JavaFeatures::VERIFY; -constexpr JavaFeatures_Utf8Validation JavaFeatures::Utf8Validation_MIN; -constexpr JavaFeatures_Utf8Validation JavaFeatures::Utf8Validation_MAX; -constexpr int JavaFeatures::Utf8Validation_ARRAYSIZE; - -#endif // (__cplusplus < 201703) && - // (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) // =================================================================== class JavaFeatures::_Internal { @@ -440,10 +428,9 @@ ::google::protobuf::Metadata JavaFeatures::GetMetadata() const { return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); } PROTOBUF_CONSTINIT PROTOC_EXPORT - PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 ::_pbi:: - ExtensionIdentifier<::google::protobuf::FeatureSet, ::_pbi::MessageTypeTraits< ::pb::JavaFeatures >, - 11, false> - java(kJavaFieldNumber, &::pb::_JavaFeatures_default_instance_); + PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 ::_pbi::ExtensionIdentifier< + ::google::protobuf::FeatureSet, ::_pbi::MessageTypeTraits< ::pb::JavaFeatures >, 11, false> + java(kJavaFieldNumber, &::pb::_JavaFeatures_default_instance_); // @@protoc_insertion_point(namespace_scope) } // namespace pb namespace google { diff --git a/src/google/protobuf/compiler/java/java_features.pb.h b/src/google/protobuf/compiler/java/java_features.pb.h index e81b3c9af0ec..89c2d0bf635c 100644 --- a/src/google/protobuf/compiler/java/java_features.pb.h +++ b/src/google/protobuf/compiler/java/java_features.pb.h @@ -79,9 +79,11 @@ enum JavaFeatures_Utf8Validation : int { PROTOC_EXPORT bool JavaFeatures_Utf8Validation_IsValid(int value); PROTOC_EXPORT extern const uint32_t JavaFeatures_Utf8Validation_internal_data_[]; -constexpr JavaFeatures_Utf8Validation JavaFeatures_Utf8Validation_Utf8Validation_MIN = static_cast(0); -constexpr JavaFeatures_Utf8Validation JavaFeatures_Utf8Validation_Utf8Validation_MAX = static_cast(2); -constexpr int JavaFeatures_Utf8Validation_Utf8Validation_ARRAYSIZE = 2 + 1; +inline constexpr JavaFeatures_Utf8Validation JavaFeatures_Utf8Validation_Utf8Validation_MIN = + static_cast(0); +inline constexpr JavaFeatures_Utf8Validation JavaFeatures_Utf8Validation_Utf8Validation_MAX = + static_cast(2); +inline constexpr int JavaFeatures_Utf8Validation_Utf8Validation_ARRAYSIZE = 2 + 1; PROTOC_EXPORT const ::google::protobuf::EnumDescriptor* JavaFeatures_Utf8Validation_descriptor(); template @@ -352,7 +354,8 @@ PROTOC_EXPORT extern const ::google::protobuf::internal::ClassDataFull JavaFeatu -static const int kJavaFieldNumber = 1001; +inline constexpr int kJavaFieldNumber = + 1001; PROTOC_EXPORT extern ::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::FeatureSet, ::google::protobuf::internal::MessageTypeTraits< ::pb::JavaFeatures >, 11, false> diff --git a/src/google/protobuf/compiler/plugin.pb.cc b/src/google/protobuf/compiler/plugin.pb.cc index e09089c436e5..8db02ca148d0 100644 --- a/src/google/protobuf/compiler/plugin.pb.cc +++ b/src/google/protobuf/compiler/plugin.pb.cc @@ -305,18 +305,6 @@ PROTOBUF_CONSTINIT const uint32_t CodeGeneratorResponse_Feature_internal_data_[] bool CodeGeneratorResponse_Feature_IsValid(int value) { return 0 <= value && value <= 2; } -#if (__cplusplus < 201703) && \ - (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) - -constexpr CodeGeneratorResponse_Feature CodeGeneratorResponse::FEATURE_NONE; -constexpr CodeGeneratorResponse_Feature CodeGeneratorResponse::FEATURE_PROTO3_OPTIONAL; -constexpr CodeGeneratorResponse_Feature CodeGeneratorResponse::FEATURE_SUPPORTS_EDITIONS; -constexpr CodeGeneratorResponse_Feature CodeGeneratorResponse::Feature_MIN; -constexpr CodeGeneratorResponse_Feature CodeGeneratorResponse::Feature_MAX; -constexpr int CodeGeneratorResponse::Feature_ARRAYSIZE; - -#endif // (__cplusplus < 201703) && - // (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) // =================================================================== class Version::_Internal { diff --git a/src/google/protobuf/compiler/plugin.pb.h b/src/google/protobuf/compiler/plugin.pb.h index 74a23a1903be..1ad7bb56005d 100644 --- a/src/google/protobuf/compiler/plugin.pb.h +++ b/src/google/protobuf/compiler/plugin.pb.h @@ -99,9 +99,11 @@ enum CodeGeneratorResponse_Feature : int { PROTOC_EXPORT bool CodeGeneratorResponse_Feature_IsValid(int value); PROTOC_EXPORT extern const uint32_t CodeGeneratorResponse_Feature_internal_data_[]; -constexpr CodeGeneratorResponse_Feature CodeGeneratorResponse_Feature_Feature_MIN = static_cast(0); -constexpr CodeGeneratorResponse_Feature CodeGeneratorResponse_Feature_Feature_MAX = static_cast(2); -constexpr int CodeGeneratorResponse_Feature_Feature_ARRAYSIZE = 2 + 1; +inline constexpr CodeGeneratorResponse_Feature CodeGeneratorResponse_Feature_Feature_MIN = + static_cast(0); +inline constexpr CodeGeneratorResponse_Feature CodeGeneratorResponse_Feature_Feature_MAX = + static_cast(2); +inline constexpr int CodeGeneratorResponse_Feature_Feature_ARRAYSIZE = 2 + 1; PROTOC_EXPORT const ::google::protobuf::EnumDescriptor* CodeGeneratorResponse_Feature_descriptor(); template diff --git a/src/google/protobuf/cpp_features.pb.cc b/src/google/protobuf/cpp_features.pb.cc index 4d9ba3d98c4f..301dfa42c6ee 100644 --- a/src/google/protobuf/cpp_features.pb.cc +++ b/src/google/protobuf/cpp_features.pb.cc @@ -133,19 +133,6 @@ PROTOBUF_CONSTINIT const uint32_t CppFeatures_StringType_internal_data_[] = { bool CppFeatures_StringType_IsValid(int value) { return 0 <= value && value <= 3; } -#if (__cplusplus < 201703) && \ - (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) - -constexpr CppFeatures_StringType CppFeatures::STRING_TYPE_UNKNOWN; -constexpr CppFeatures_StringType CppFeatures::VIEW; -constexpr CppFeatures_StringType CppFeatures::CORD; -constexpr CppFeatures_StringType CppFeatures::STRING; -constexpr CppFeatures_StringType CppFeatures::StringType_MIN; -constexpr CppFeatures_StringType CppFeatures::StringType_MAX; -constexpr int CppFeatures::StringType_ARRAYSIZE; - -#endif // (__cplusplus < 201703) && - // (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) // =================================================================== class CppFeatures::_Internal { @@ -435,10 +422,9 @@ ::google::protobuf::Metadata CppFeatures::GetMetadata() const { return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); } PROTOBUF_CONSTINIT PROTOBUF_EXPORT - PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 ::_pbi:: - ExtensionIdentifier<::google::protobuf::FeatureSet, ::_pbi::MessageTypeTraits< ::pb::CppFeatures >, - 11, false> - cpp(kCppFieldNumber, &::pb::_CppFeatures_default_instance_); + PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 ::_pbi::ExtensionIdentifier< + ::google::protobuf::FeatureSet, ::_pbi::MessageTypeTraits< ::pb::CppFeatures >, 11, false> + cpp(kCppFieldNumber, &::pb::_CppFeatures_default_instance_); // @@protoc_insertion_point(namespace_scope) } // namespace pb namespace google { diff --git a/src/google/protobuf/cpp_features.pb.h b/src/google/protobuf/cpp_features.pb.h index 036c0ec209dd..666216843a1a 100644 --- a/src/google/protobuf/cpp_features.pb.h +++ b/src/google/protobuf/cpp_features.pb.h @@ -80,9 +80,11 @@ enum CppFeatures_StringType : int { PROTOBUF_EXPORT bool CppFeatures_StringType_IsValid(int value); PROTOBUF_EXPORT extern const uint32_t CppFeatures_StringType_internal_data_[]; -constexpr CppFeatures_StringType CppFeatures_StringType_StringType_MIN = static_cast(0); -constexpr CppFeatures_StringType CppFeatures_StringType_StringType_MAX = static_cast(3); -constexpr int CppFeatures_StringType_StringType_ARRAYSIZE = 3 + 1; +inline constexpr CppFeatures_StringType CppFeatures_StringType_StringType_MIN = + static_cast(0); +inline constexpr CppFeatures_StringType CppFeatures_StringType_StringType_MAX = + static_cast(3); +inline constexpr int CppFeatures_StringType_StringType_ARRAYSIZE = 3 + 1; PROTOBUF_EXPORT const ::google::protobuf::EnumDescriptor* CppFeatures_StringType_descriptor(); template @@ -354,7 +356,8 @@ PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull CppFeat -static const int kCppFieldNumber = 1000; +inline constexpr int kCppFieldNumber = + 1000; PROTOBUF_EXPORT extern ::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::FeatureSet, ::google::protobuf::internal::MessageTypeTraits< ::pb::CppFeatures >, 11, false> diff --git a/src/google/protobuf/descriptor.pb.cc b/src/google/protobuf/descriptor.pb.cc index e6634d018607..1fd4c5771932 100644 --- a/src/google/protobuf/descriptor.pb.cc +++ b/src/google/protobuf/descriptor.pb.cc @@ -2242,17 +2242,6 @@ PROTOBUF_CONSTINIT const uint32_t ExtensionRangeOptions_VerificationState_intern bool ExtensionRangeOptions_VerificationState_IsValid(int value) { return 0 <= value && value <= 1; } -#if (__cplusplus < 201703) && \ - (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) - -constexpr ExtensionRangeOptions_VerificationState ExtensionRangeOptions::DECLARATION; -constexpr ExtensionRangeOptions_VerificationState ExtensionRangeOptions::UNVERIFIED; -constexpr ExtensionRangeOptions_VerificationState ExtensionRangeOptions::VerificationState_MIN; -constexpr ExtensionRangeOptions_VerificationState ExtensionRangeOptions::VerificationState_MAX; -constexpr int ExtensionRangeOptions::VerificationState_ARRAYSIZE; - -#endif // (__cplusplus < 201703) && - // (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) const ::google::protobuf::EnumDescriptor* FieldDescriptorProto_Type_descriptor() { ::google::protobuf::internal::AssignDescriptors(&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto); return file_level_enum_descriptors_google_2fprotobuf_2fdescriptor_2eproto[1]; @@ -2262,33 +2251,6 @@ PROTOBUF_CONSTINIT const uint32_t FieldDescriptorProto_Type_internal_data_[] = { bool FieldDescriptorProto_Type_IsValid(int value) { return 1 <= value && value <= 18; } -#if (__cplusplus < 201703) && \ - (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) - -constexpr FieldDescriptorProto_Type FieldDescriptorProto::TYPE_DOUBLE; -constexpr FieldDescriptorProto_Type FieldDescriptorProto::TYPE_FLOAT; -constexpr FieldDescriptorProto_Type FieldDescriptorProto::TYPE_INT64; -constexpr FieldDescriptorProto_Type FieldDescriptorProto::TYPE_UINT64; -constexpr FieldDescriptorProto_Type FieldDescriptorProto::TYPE_INT32; -constexpr FieldDescriptorProto_Type FieldDescriptorProto::TYPE_FIXED64; -constexpr FieldDescriptorProto_Type FieldDescriptorProto::TYPE_FIXED32; -constexpr FieldDescriptorProto_Type FieldDescriptorProto::TYPE_BOOL; -constexpr FieldDescriptorProto_Type FieldDescriptorProto::TYPE_STRING; -constexpr FieldDescriptorProto_Type FieldDescriptorProto::TYPE_GROUP; -constexpr FieldDescriptorProto_Type FieldDescriptorProto::TYPE_MESSAGE; -constexpr FieldDescriptorProto_Type FieldDescriptorProto::TYPE_BYTES; -constexpr FieldDescriptorProto_Type FieldDescriptorProto::TYPE_UINT32; -constexpr FieldDescriptorProto_Type FieldDescriptorProto::TYPE_ENUM; -constexpr FieldDescriptorProto_Type FieldDescriptorProto::TYPE_SFIXED32; -constexpr FieldDescriptorProto_Type FieldDescriptorProto::TYPE_SFIXED64; -constexpr FieldDescriptorProto_Type FieldDescriptorProto::TYPE_SINT32; -constexpr FieldDescriptorProto_Type FieldDescriptorProto::TYPE_SINT64; -constexpr FieldDescriptorProto_Type FieldDescriptorProto::Type_MIN; -constexpr FieldDescriptorProto_Type FieldDescriptorProto::Type_MAX; -constexpr int FieldDescriptorProto::Type_ARRAYSIZE; - -#endif // (__cplusplus < 201703) && - // (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) const ::google::protobuf::EnumDescriptor* FieldDescriptorProto_Label_descriptor() { ::google::protobuf::internal::AssignDescriptors(&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto); return file_level_enum_descriptors_google_2fprotobuf_2fdescriptor_2eproto[2]; @@ -2298,18 +2260,6 @@ PROTOBUF_CONSTINIT const uint32_t FieldDescriptorProto_Label_internal_data_[] = bool FieldDescriptorProto_Label_IsValid(int value) { return 1 <= value && value <= 3; } -#if (__cplusplus < 201703) && \ - (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) - -constexpr FieldDescriptorProto_Label FieldDescriptorProto::LABEL_OPTIONAL; -constexpr FieldDescriptorProto_Label FieldDescriptorProto::LABEL_REPEATED; -constexpr FieldDescriptorProto_Label FieldDescriptorProto::LABEL_REQUIRED; -constexpr FieldDescriptorProto_Label FieldDescriptorProto::Label_MIN; -constexpr FieldDescriptorProto_Label FieldDescriptorProto::Label_MAX; -constexpr int FieldDescriptorProto::Label_ARRAYSIZE; - -#endif // (__cplusplus < 201703) && - // (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) const ::google::protobuf::EnumDescriptor* FileOptions_OptimizeMode_descriptor() { ::google::protobuf::internal::AssignDescriptors(&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto); return file_level_enum_descriptors_google_2fprotobuf_2fdescriptor_2eproto[3]; @@ -2319,18 +2269,6 @@ PROTOBUF_CONSTINIT const uint32_t FileOptions_OptimizeMode_internal_data_[] = { bool FileOptions_OptimizeMode_IsValid(int value) { return 1 <= value && value <= 3; } -#if (__cplusplus < 201703) && \ - (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) - -constexpr FileOptions_OptimizeMode FileOptions::SPEED; -constexpr FileOptions_OptimizeMode FileOptions::CODE_SIZE; -constexpr FileOptions_OptimizeMode FileOptions::LITE_RUNTIME; -constexpr FileOptions_OptimizeMode FileOptions::OptimizeMode_MIN; -constexpr FileOptions_OptimizeMode FileOptions::OptimizeMode_MAX; -constexpr int FileOptions::OptimizeMode_ARRAYSIZE; - -#endif // (__cplusplus < 201703) && - // (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) const ::google::protobuf::EnumDescriptor* FieldOptions_CType_descriptor() { ::google::protobuf::internal::AssignDescriptors(&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto); return file_level_enum_descriptors_google_2fprotobuf_2fdescriptor_2eproto[4]; @@ -2340,18 +2278,6 @@ PROTOBUF_CONSTINIT const uint32_t FieldOptions_CType_internal_data_[] = { bool FieldOptions_CType_IsValid(int value) { return 0 <= value && value <= 2; } -#if (__cplusplus < 201703) && \ - (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) - -constexpr FieldOptions_CType FieldOptions::STRING; -constexpr FieldOptions_CType FieldOptions::CORD; -constexpr FieldOptions_CType FieldOptions::STRING_PIECE; -constexpr FieldOptions_CType FieldOptions::CType_MIN; -constexpr FieldOptions_CType FieldOptions::CType_MAX; -constexpr int FieldOptions::CType_ARRAYSIZE; - -#endif // (__cplusplus < 201703) && - // (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) const ::google::protobuf::EnumDescriptor* FieldOptions_JSType_descriptor() { ::google::protobuf::internal::AssignDescriptors(&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto); return file_level_enum_descriptors_google_2fprotobuf_2fdescriptor_2eproto[5]; @@ -2361,18 +2287,6 @@ PROTOBUF_CONSTINIT const uint32_t FieldOptions_JSType_internal_data_[] = { bool FieldOptions_JSType_IsValid(int value) { return 0 <= value && value <= 2; } -#if (__cplusplus < 201703) && \ - (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) - -constexpr FieldOptions_JSType FieldOptions::JS_NORMAL; -constexpr FieldOptions_JSType FieldOptions::JS_STRING; -constexpr FieldOptions_JSType FieldOptions::JS_NUMBER; -constexpr FieldOptions_JSType FieldOptions::JSType_MIN; -constexpr FieldOptions_JSType FieldOptions::JSType_MAX; -constexpr int FieldOptions::JSType_ARRAYSIZE; - -#endif // (__cplusplus < 201703) && - // (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) const ::google::protobuf::EnumDescriptor* FieldOptions_OptionRetention_descriptor() { ::google::protobuf::internal::AssignDescriptors(&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto); return file_level_enum_descriptors_google_2fprotobuf_2fdescriptor_2eproto[6]; @@ -2382,18 +2296,6 @@ PROTOBUF_CONSTINIT const uint32_t FieldOptions_OptionRetention_internal_data_[] bool FieldOptions_OptionRetention_IsValid(int value) { return 0 <= value && value <= 2; } -#if (__cplusplus < 201703) && \ - (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) - -constexpr FieldOptions_OptionRetention FieldOptions::RETENTION_UNKNOWN; -constexpr FieldOptions_OptionRetention FieldOptions::RETENTION_RUNTIME; -constexpr FieldOptions_OptionRetention FieldOptions::RETENTION_SOURCE; -constexpr FieldOptions_OptionRetention FieldOptions::OptionRetention_MIN; -constexpr FieldOptions_OptionRetention FieldOptions::OptionRetention_MAX; -constexpr int FieldOptions::OptionRetention_ARRAYSIZE; - -#endif // (__cplusplus < 201703) && - // (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) const ::google::protobuf::EnumDescriptor* FieldOptions_OptionTargetType_descriptor() { ::google::protobuf::internal::AssignDescriptors(&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto); return file_level_enum_descriptors_google_2fprotobuf_2fdescriptor_2eproto[7]; @@ -2403,25 +2305,6 @@ PROTOBUF_CONSTINIT const uint32_t FieldOptions_OptionTargetType_internal_data_[] bool FieldOptions_OptionTargetType_IsValid(int value) { return 0 <= value && value <= 9; } -#if (__cplusplus < 201703) && \ - (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) - -constexpr FieldOptions_OptionTargetType FieldOptions::TARGET_TYPE_UNKNOWN; -constexpr FieldOptions_OptionTargetType FieldOptions::TARGET_TYPE_FILE; -constexpr FieldOptions_OptionTargetType FieldOptions::TARGET_TYPE_EXTENSION_RANGE; -constexpr FieldOptions_OptionTargetType FieldOptions::TARGET_TYPE_MESSAGE; -constexpr FieldOptions_OptionTargetType FieldOptions::TARGET_TYPE_FIELD; -constexpr FieldOptions_OptionTargetType FieldOptions::TARGET_TYPE_ONEOF; -constexpr FieldOptions_OptionTargetType FieldOptions::TARGET_TYPE_ENUM; -constexpr FieldOptions_OptionTargetType FieldOptions::TARGET_TYPE_ENUM_ENTRY; -constexpr FieldOptions_OptionTargetType FieldOptions::TARGET_TYPE_SERVICE; -constexpr FieldOptions_OptionTargetType FieldOptions::TARGET_TYPE_METHOD; -constexpr FieldOptions_OptionTargetType FieldOptions::OptionTargetType_MIN; -constexpr FieldOptions_OptionTargetType FieldOptions::OptionTargetType_MAX; -constexpr int FieldOptions::OptionTargetType_ARRAYSIZE; - -#endif // (__cplusplus < 201703) && - // (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) const ::google::protobuf::EnumDescriptor* MethodOptions_IdempotencyLevel_descriptor() { ::google::protobuf::internal::AssignDescriptors(&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto); return file_level_enum_descriptors_google_2fprotobuf_2fdescriptor_2eproto[8]; @@ -2431,18 +2314,6 @@ PROTOBUF_CONSTINIT const uint32_t MethodOptions_IdempotencyLevel_internal_data_[ bool MethodOptions_IdempotencyLevel_IsValid(int value) { return 0 <= value && value <= 2; } -#if (__cplusplus < 201703) && \ - (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) - -constexpr MethodOptions_IdempotencyLevel MethodOptions::IDEMPOTENCY_UNKNOWN; -constexpr MethodOptions_IdempotencyLevel MethodOptions::NO_SIDE_EFFECTS; -constexpr MethodOptions_IdempotencyLevel MethodOptions::IDEMPOTENT; -constexpr MethodOptions_IdempotencyLevel MethodOptions::IdempotencyLevel_MIN; -constexpr MethodOptions_IdempotencyLevel MethodOptions::IdempotencyLevel_MAX; -constexpr int MethodOptions::IdempotencyLevel_ARRAYSIZE; - -#endif // (__cplusplus < 201703) && - // (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) const ::google::protobuf::EnumDescriptor* FeatureSet_FieldPresence_descriptor() { ::google::protobuf::internal::AssignDescriptors(&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto); return file_level_enum_descriptors_google_2fprotobuf_2fdescriptor_2eproto[9]; @@ -2452,19 +2323,6 @@ PROTOBUF_CONSTINIT const uint32_t FeatureSet_FieldPresence_internal_data_[] = { bool FeatureSet_FieldPresence_IsValid(int value) { return 0 <= value && value <= 3; } -#if (__cplusplus < 201703) && \ - (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) - -constexpr FeatureSet_FieldPresence FeatureSet::FIELD_PRESENCE_UNKNOWN; -constexpr FeatureSet_FieldPresence FeatureSet::EXPLICIT; -constexpr FeatureSet_FieldPresence FeatureSet::IMPLICIT; -constexpr FeatureSet_FieldPresence FeatureSet::LEGACY_REQUIRED; -constexpr FeatureSet_FieldPresence FeatureSet::FieldPresence_MIN; -constexpr FeatureSet_FieldPresence FeatureSet::FieldPresence_MAX; -constexpr int FeatureSet::FieldPresence_ARRAYSIZE; - -#endif // (__cplusplus < 201703) && - // (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) const ::google::protobuf::EnumDescriptor* FeatureSet_EnumType_descriptor() { ::google::protobuf::internal::AssignDescriptors(&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto); return file_level_enum_descriptors_google_2fprotobuf_2fdescriptor_2eproto[10]; @@ -2474,18 +2332,6 @@ PROTOBUF_CONSTINIT const uint32_t FeatureSet_EnumType_internal_data_[] = { bool FeatureSet_EnumType_IsValid(int value) { return 0 <= value && value <= 2; } -#if (__cplusplus < 201703) && \ - (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) - -constexpr FeatureSet_EnumType FeatureSet::ENUM_TYPE_UNKNOWN; -constexpr FeatureSet_EnumType FeatureSet::OPEN; -constexpr FeatureSet_EnumType FeatureSet::CLOSED; -constexpr FeatureSet_EnumType FeatureSet::EnumType_MIN; -constexpr FeatureSet_EnumType FeatureSet::EnumType_MAX; -constexpr int FeatureSet::EnumType_ARRAYSIZE; - -#endif // (__cplusplus < 201703) && - // (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) const ::google::protobuf::EnumDescriptor* FeatureSet_RepeatedFieldEncoding_descriptor() { ::google::protobuf::internal::AssignDescriptors(&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto); return file_level_enum_descriptors_google_2fprotobuf_2fdescriptor_2eproto[11]; @@ -2495,18 +2341,6 @@ PROTOBUF_CONSTINIT const uint32_t FeatureSet_RepeatedFieldEncoding_internal_data bool FeatureSet_RepeatedFieldEncoding_IsValid(int value) { return 0 <= value && value <= 2; } -#if (__cplusplus < 201703) && \ - (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) - -constexpr FeatureSet_RepeatedFieldEncoding FeatureSet::REPEATED_FIELD_ENCODING_UNKNOWN; -constexpr FeatureSet_RepeatedFieldEncoding FeatureSet::PACKED; -constexpr FeatureSet_RepeatedFieldEncoding FeatureSet::EXPANDED; -constexpr FeatureSet_RepeatedFieldEncoding FeatureSet::RepeatedFieldEncoding_MIN; -constexpr FeatureSet_RepeatedFieldEncoding FeatureSet::RepeatedFieldEncoding_MAX; -constexpr int FeatureSet::RepeatedFieldEncoding_ARRAYSIZE; - -#endif // (__cplusplus < 201703) && - // (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) const ::google::protobuf::EnumDescriptor* FeatureSet_Utf8Validation_descriptor() { ::google::protobuf::internal::AssignDescriptors(&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto); return file_level_enum_descriptors_google_2fprotobuf_2fdescriptor_2eproto[12]; @@ -2516,18 +2350,6 @@ PROTOBUF_CONSTINIT const uint32_t FeatureSet_Utf8Validation_internal_data_[] = { bool FeatureSet_Utf8Validation_IsValid(int value) { return 0 <= value && value <= 3 && ((13u >> value) & 1) != 0; } -#if (__cplusplus < 201703) && \ - (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) - -constexpr FeatureSet_Utf8Validation FeatureSet::UTF8_VALIDATION_UNKNOWN; -constexpr FeatureSet_Utf8Validation FeatureSet::VERIFY; -constexpr FeatureSet_Utf8Validation FeatureSet::NONE; -constexpr FeatureSet_Utf8Validation FeatureSet::Utf8Validation_MIN; -constexpr FeatureSet_Utf8Validation FeatureSet::Utf8Validation_MAX; -constexpr int FeatureSet::Utf8Validation_ARRAYSIZE; - -#endif // (__cplusplus < 201703) && - // (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) const ::google::protobuf::EnumDescriptor* FeatureSet_MessageEncoding_descriptor() { ::google::protobuf::internal::AssignDescriptors(&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto); return file_level_enum_descriptors_google_2fprotobuf_2fdescriptor_2eproto[13]; @@ -2537,18 +2359,6 @@ PROTOBUF_CONSTINIT const uint32_t FeatureSet_MessageEncoding_internal_data_[] = bool FeatureSet_MessageEncoding_IsValid(int value) { return 0 <= value && value <= 2; } -#if (__cplusplus < 201703) && \ - (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) - -constexpr FeatureSet_MessageEncoding FeatureSet::MESSAGE_ENCODING_UNKNOWN; -constexpr FeatureSet_MessageEncoding FeatureSet::LENGTH_PREFIXED; -constexpr FeatureSet_MessageEncoding FeatureSet::DELIMITED; -constexpr FeatureSet_MessageEncoding FeatureSet::MessageEncoding_MIN; -constexpr FeatureSet_MessageEncoding FeatureSet::MessageEncoding_MAX; -constexpr int FeatureSet::MessageEncoding_ARRAYSIZE; - -#endif // (__cplusplus < 201703) && - // (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) const ::google::protobuf::EnumDescriptor* FeatureSet_JsonFormat_descriptor() { ::google::protobuf::internal::AssignDescriptors(&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto); return file_level_enum_descriptors_google_2fprotobuf_2fdescriptor_2eproto[14]; @@ -2558,18 +2368,6 @@ PROTOBUF_CONSTINIT const uint32_t FeatureSet_JsonFormat_internal_data_[] = { bool FeatureSet_JsonFormat_IsValid(int value) { return 0 <= value && value <= 2; } -#if (__cplusplus < 201703) && \ - (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) - -constexpr FeatureSet_JsonFormat FeatureSet::JSON_FORMAT_UNKNOWN; -constexpr FeatureSet_JsonFormat FeatureSet::ALLOW; -constexpr FeatureSet_JsonFormat FeatureSet::LEGACY_BEST_EFFORT; -constexpr FeatureSet_JsonFormat FeatureSet::JsonFormat_MIN; -constexpr FeatureSet_JsonFormat FeatureSet::JsonFormat_MAX; -constexpr int FeatureSet::JsonFormat_ARRAYSIZE; - -#endif // (__cplusplus < 201703) && - // (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) const ::google::protobuf::EnumDescriptor* GeneratedCodeInfo_Annotation_Semantic_descriptor() { ::google::protobuf::internal::AssignDescriptors(&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto); return file_level_enum_descriptors_google_2fprotobuf_2fdescriptor_2eproto[15]; @@ -2579,18 +2377,6 @@ PROTOBUF_CONSTINIT const uint32_t GeneratedCodeInfo_Annotation_Semantic_internal bool GeneratedCodeInfo_Annotation_Semantic_IsValid(int value) { return 0 <= value && value <= 2; } -#if (__cplusplus < 201703) && \ - (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) - -constexpr GeneratedCodeInfo_Annotation_Semantic GeneratedCodeInfo_Annotation::NONE; -constexpr GeneratedCodeInfo_Annotation_Semantic GeneratedCodeInfo_Annotation::SET; -constexpr GeneratedCodeInfo_Annotation_Semantic GeneratedCodeInfo_Annotation::ALIAS; -constexpr GeneratedCodeInfo_Annotation_Semantic GeneratedCodeInfo_Annotation::Semantic_MIN; -constexpr GeneratedCodeInfo_Annotation_Semantic GeneratedCodeInfo_Annotation::Semantic_MAX; -constexpr int GeneratedCodeInfo_Annotation::Semantic_ARRAYSIZE; - -#endif // (__cplusplus < 201703) && - // (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) const ::google::protobuf::EnumDescriptor* Edition_descriptor() { ::google::protobuf::internal::AssignDescriptors(&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto); return file_level_enum_descriptors_google_2fprotobuf_2fdescriptor_2eproto[16]; diff --git a/src/google/protobuf/descriptor.pb.h b/src/google/protobuf/descriptor.pb.h index ea1f90edf947..047ae1e9f2ba 100644 --- a/src/google/protobuf/descriptor.pb.h +++ b/src/google/protobuf/descriptor.pb.h @@ -305,9 +305,11 @@ enum ExtensionRangeOptions_VerificationState : int { PROTOBUF_EXPORT bool ExtensionRangeOptions_VerificationState_IsValid(int value); PROTOBUF_EXPORT extern const uint32_t ExtensionRangeOptions_VerificationState_internal_data_[]; -constexpr ExtensionRangeOptions_VerificationState ExtensionRangeOptions_VerificationState_VerificationState_MIN = static_cast(0); -constexpr ExtensionRangeOptions_VerificationState ExtensionRangeOptions_VerificationState_VerificationState_MAX = static_cast(1); -constexpr int ExtensionRangeOptions_VerificationState_VerificationState_ARRAYSIZE = 1 + 1; +inline constexpr ExtensionRangeOptions_VerificationState ExtensionRangeOptions_VerificationState_VerificationState_MIN = + static_cast(0); +inline constexpr ExtensionRangeOptions_VerificationState ExtensionRangeOptions_VerificationState_VerificationState_MAX = + static_cast(1); +inline constexpr int ExtensionRangeOptions_VerificationState_VerificationState_ARRAYSIZE = 1 + 1; PROTOBUF_EXPORT const ::google::protobuf::EnumDescriptor* ExtensionRangeOptions_VerificationState_descriptor(); template @@ -350,9 +352,11 @@ enum FieldDescriptorProto_Type : int { PROTOBUF_EXPORT bool FieldDescriptorProto_Type_IsValid(int value); PROTOBUF_EXPORT extern const uint32_t FieldDescriptorProto_Type_internal_data_[]; -constexpr FieldDescriptorProto_Type FieldDescriptorProto_Type_Type_MIN = static_cast(1); -constexpr FieldDescriptorProto_Type FieldDescriptorProto_Type_Type_MAX = static_cast(18); -constexpr int FieldDescriptorProto_Type_Type_ARRAYSIZE = 18 + 1; +inline constexpr FieldDescriptorProto_Type FieldDescriptorProto_Type_Type_MIN = + static_cast(1); +inline constexpr FieldDescriptorProto_Type FieldDescriptorProto_Type_Type_MAX = + static_cast(18); +inline constexpr int FieldDescriptorProto_Type_Type_ARRAYSIZE = 18 + 1; PROTOBUF_EXPORT const ::google::protobuf::EnumDescriptor* FieldDescriptorProto_Type_descriptor(); template @@ -380,9 +384,11 @@ enum FieldDescriptorProto_Label : int { PROTOBUF_EXPORT bool FieldDescriptorProto_Label_IsValid(int value); PROTOBUF_EXPORT extern const uint32_t FieldDescriptorProto_Label_internal_data_[]; -constexpr FieldDescriptorProto_Label FieldDescriptorProto_Label_Label_MIN = static_cast(1); -constexpr FieldDescriptorProto_Label FieldDescriptorProto_Label_Label_MAX = static_cast(3); -constexpr int FieldDescriptorProto_Label_Label_ARRAYSIZE = 3 + 1; +inline constexpr FieldDescriptorProto_Label FieldDescriptorProto_Label_Label_MIN = + static_cast(1); +inline constexpr FieldDescriptorProto_Label FieldDescriptorProto_Label_Label_MAX = + static_cast(3); +inline constexpr int FieldDescriptorProto_Label_Label_ARRAYSIZE = 3 + 1; PROTOBUF_EXPORT const ::google::protobuf::EnumDescriptor* FieldDescriptorProto_Label_descriptor(); template @@ -410,9 +416,11 @@ enum FileOptions_OptimizeMode : int { PROTOBUF_EXPORT bool FileOptions_OptimizeMode_IsValid(int value); PROTOBUF_EXPORT extern const uint32_t FileOptions_OptimizeMode_internal_data_[]; -constexpr FileOptions_OptimizeMode FileOptions_OptimizeMode_OptimizeMode_MIN = static_cast(1); -constexpr FileOptions_OptimizeMode FileOptions_OptimizeMode_OptimizeMode_MAX = static_cast(3); -constexpr int FileOptions_OptimizeMode_OptimizeMode_ARRAYSIZE = 3 + 1; +inline constexpr FileOptions_OptimizeMode FileOptions_OptimizeMode_OptimizeMode_MIN = + static_cast(1); +inline constexpr FileOptions_OptimizeMode FileOptions_OptimizeMode_OptimizeMode_MAX = + static_cast(3); +inline constexpr int FileOptions_OptimizeMode_OptimizeMode_ARRAYSIZE = 3 + 1; PROTOBUF_EXPORT const ::google::protobuf::EnumDescriptor* FileOptions_OptimizeMode_descriptor(); template @@ -440,9 +448,11 @@ enum FieldOptions_CType : int { PROTOBUF_EXPORT bool FieldOptions_CType_IsValid(int value); PROTOBUF_EXPORT extern const uint32_t FieldOptions_CType_internal_data_[]; -constexpr FieldOptions_CType FieldOptions_CType_CType_MIN = static_cast(0); -constexpr FieldOptions_CType FieldOptions_CType_CType_MAX = static_cast(2); -constexpr int FieldOptions_CType_CType_ARRAYSIZE = 2 + 1; +inline constexpr FieldOptions_CType FieldOptions_CType_CType_MIN = + static_cast(0); +inline constexpr FieldOptions_CType FieldOptions_CType_CType_MAX = + static_cast(2); +inline constexpr int FieldOptions_CType_CType_ARRAYSIZE = 2 + 1; PROTOBUF_EXPORT const ::google::protobuf::EnumDescriptor* FieldOptions_CType_descriptor(); template @@ -470,9 +480,11 @@ enum FieldOptions_JSType : int { PROTOBUF_EXPORT bool FieldOptions_JSType_IsValid(int value); PROTOBUF_EXPORT extern const uint32_t FieldOptions_JSType_internal_data_[]; -constexpr FieldOptions_JSType FieldOptions_JSType_JSType_MIN = static_cast(0); -constexpr FieldOptions_JSType FieldOptions_JSType_JSType_MAX = static_cast(2); -constexpr int FieldOptions_JSType_JSType_ARRAYSIZE = 2 + 1; +inline constexpr FieldOptions_JSType FieldOptions_JSType_JSType_MIN = + static_cast(0); +inline constexpr FieldOptions_JSType FieldOptions_JSType_JSType_MAX = + static_cast(2); +inline constexpr int FieldOptions_JSType_JSType_ARRAYSIZE = 2 + 1; PROTOBUF_EXPORT const ::google::protobuf::EnumDescriptor* FieldOptions_JSType_descriptor(); template @@ -500,9 +512,11 @@ enum FieldOptions_OptionRetention : int { PROTOBUF_EXPORT bool FieldOptions_OptionRetention_IsValid(int value); PROTOBUF_EXPORT extern const uint32_t FieldOptions_OptionRetention_internal_data_[]; -constexpr FieldOptions_OptionRetention FieldOptions_OptionRetention_OptionRetention_MIN = static_cast(0); -constexpr FieldOptions_OptionRetention FieldOptions_OptionRetention_OptionRetention_MAX = static_cast(2); -constexpr int FieldOptions_OptionRetention_OptionRetention_ARRAYSIZE = 2 + 1; +inline constexpr FieldOptions_OptionRetention FieldOptions_OptionRetention_OptionRetention_MIN = + static_cast(0); +inline constexpr FieldOptions_OptionRetention FieldOptions_OptionRetention_OptionRetention_MAX = + static_cast(2); +inline constexpr int FieldOptions_OptionRetention_OptionRetention_ARRAYSIZE = 2 + 1; PROTOBUF_EXPORT const ::google::protobuf::EnumDescriptor* FieldOptions_OptionRetention_descriptor(); template @@ -537,9 +551,11 @@ enum FieldOptions_OptionTargetType : int { PROTOBUF_EXPORT bool FieldOptions_OptionTargetType_IsValid(int value); PROTOBUF_EXPORT extern const uint32_t FieldOptions_OptionTargetType_internal_data_[]; -constexpr FieldOptions_OptionTargetType FieldOptions_OptionTargetType_OptionTargetType_MIN = static_cast(0); -constexpr FieldOptions_OptionTargetType FieldOptions_OptionTargetType_OptionTargetType_MAX = static_cast(9); -constexpr int FieldOptions_OptionTargetType_OptionTargetType_ARRAYSIZE = 9 + 1; +inline constexpr FieldOptions_OptionTargetType FieldOptions_OptionTargetType_OptionTargetType_MIN = + static_cast(0); +inline constexpr FieldOptions_OptionTargetType FieldOptions_OptionTargetType_OptionTargetType_MAX = + static_cast(9); +inline constexpr int FieldOptions_OptionTargetType_OptionTargetType_ARRAYSIZE = 9 + 1; PROTOBUF_EXPORT const ::google::protobuf::EnumDescriptor* FieldOptions_OptionTargetType_descriptor(); template @@ -567,9 +583,11 @@ enum MethodOptions_IdempotencyLevel : int { PROTOBUF_EXPORT bool MethodOptions_IdempotencyLevel_IsValid(int value); PROTOBUF_EXPORT extern const uint32_t MethodOptions_IdempotencyLevel_internal_data_[]; -constexpr MethodOptions_IdempotencyLevel MethodOptions_IdempotencyLevel_IdempotencyLevel_MIN = static_cast(0); -constexpr MethodOptions_IdempotencyLevel MethodOptions_IdempotencyLevel_IdempotencyLevel_MAX = static_cast(2); -constexpr int MethodOptions_IdempotencyLevel_IdempotencyLevel_ARRAYSIZE = 2 + 1; +inline constexpr MethodOptions_IdempotencyLevel MethodOptions_IdempotencyLevel_IdempotencyLevel_MIN = + static_cast(0); +inline constexpr MethodOptions_IdempotencyLevel MethodOptions_IdempotencyLevel_IdempotencyLevel_MAX = + static_cast(2); +inline constexpr int MethodOptions_IdempotencyLevel_IdempotencyLevel_ARRAYSIZE = 2 + 1; PROTOBUF_EXPORT const ::google::protobuf::EnumDescriptor* MethodOptions_IdempotencyLevel_descriptor(); template @@ -598,9 +616,11 @@ enum FeatureSet_FieldPresence : int { PROTOBUF_EXPORT bool FeatureSet_FieldPresence_IsValid(int value); PROTOBUF_EXPORT extern const uint32_t FeatureSet_FieldPresence_internal_data_[]; -constexpr FeatureSet_FieldPresence FeatureSet_FieldPresence_FieldPresence_MIN = static_cast(0); -constexpr FeatureSet_FieldPresence FeatureSet_FieldPresence_FieldPresence_MAX = static_cast(3); -constexpr int FeatureSet_FieldPresence_FieldPresence_ARRAYSIZE = 3 + 1; +inline constexpr FeatureSet_FieldPresence FeatureSet_FieldPresence_FieldPresence_MIN = + static_cast(0); +inline constexpr FeatureSet_FieldPresence FeatureSet_FieldPresence_FieldPresence_MAX = + static_cast(3); +inline constexpr int FeatureSet_FieldPresence_FieldPresence_ARRAYSIZE = 3 + 1; PROTOBUF_EXPORT const ::google::protobuf::EnumDescriptor* FeatureSet_FieldPresence_descriptor(); template @@ -628,9 +648,11 @@ enum FeatureSet_EnumType : int { PROTOBUF_EXPORT bool FeatureSet_EnumType_IsValid(int value); PROTOBUF_EXPORT extern const uint32_t FeatureSet_EnumType_internal_data_[]; -constexpr FeatureSet_EnumType FeatureSet_EnumType_EnumType_MIN = static_cast(0); -constexpr FeatureSet_EnumType FeatureSet_EnumType_EnumType_MAX = static_cast(2); -constexpr int FeatureSet_EnumType_EnumType_ARRAYSIZE = 2 + 1; +inline constexpr FeatureSet_EnumType FeatureSet_EnumType_EnumType_MIN = + static_cast(0); +inline constexpr FeatureSet_EnumType FeatureSet_EnumType_EnumType_MAX = + static_cast(2); +inline constexpr int FeatureSet_EnumType_EnumType_ARRAYSIZE = 2 + 1; PROTOBUF_EXPORT const ::google::protobuf::EnumDescriptor* FeatureSet_EnumType_descriptor(); template @@ -658,9 +680,11 @@ enum FeatureSet_RepeatedFieldEncoding : int { PROTOBUF_EXPORT bool FeatureSet_RepeatedFieldEncoding_IsValid(int value); PROTOBUF_EXPORT extern const uint32_t FeatureSet_RepeatedFieldEncoding_internal_data_[]; -constexpr FeatureSet_RepeatedFieldEncoding FeatureSet_RepeatedFieldEncoding_RepeatedFieldEncoding_MIN = static_cast(0); -constexpr FeatureSet_RepeatedFieldEncoding FeatureSet_RepeatedFieldEncoding_RepeatedFieldEncoding_MAX = static_cast(2); -constexpr int FeatureSet_RepeatedFieldEncoding_RepeatedFieldEncoding_ARRAYSIZE = 2 + 1; +inline constexpr FeatureSet_RepeatedFieldEncoding FeatureSet_RepeatedFieldEncoding_RepeatedFieldEncoding_MIN = + static_cast(0); +inline constexpr FeatureSet_RepeatedFieldEncoding FeatureSet_RepeatedFieldEncoding_RepeatedFieldEncoding_MAX = + static_cast(2); +inline constexpr int FeatureSet_RepeatedFieldEncoding_RepeatedFieldEncoding_ARRAYSIZE = 2 + 1; PROTOBUF_EXPORT const ::google::protobuf::EnumDescriptor* FeatureSet_RepeatedFieldEncoding_descriptor(); template @@ -688,9 +712,11 @@ enum FeatureSet_Utf8Validation : int { PROTOBUF_EXPORT bool FeatureSet_Utf8Validation_IsValid(int value); PROTOBUF_EXPORT extern const uint32_t FeatureSet_Utf8Validation_internal_data_[]; -constexpr FeatureSet_Utf8Validation FeatureSet_Utf8Validation_Utf8Validation_MIN = static_cast(0); -constexpr FeatureSet_Utf8Validation FeatureSet_Utf8Validation_Utf8Validation_MAX = static_cast(3); -constexpr int FeatureSet_Utf8Validation_Utf8Validation_ARRAYSIZE = 3 + 1; +inline constexpr FeatureSet_Utf8Validation FeatureSet_Utf8Validation_Utf8Validation_MIN = + static_cast(0); +inline constexpr FeatureSet_Utf8Validation FeatureSet_Utf8Validation_Utf8Validation_MAX = + static_cast(3); +inline constexpr int FeatureSet_Utf8Validation_Utf8Validation_ARRAYSIZE = 3 + 1; PROTOBUF_EXPORT const ::google::protobuf::EnumDescriptor* FeatureSet_Utf8Validation_descriptor(); template @@ -718,9 +744,11 @@ enum FeatureSet_MessageEncoding : int { PROTOBUF_EXPORT bool FeatureSet_MessageEncoding_IsValid(int value); PROTOBUF_EXPORT extern const uint32_t FeatureSet_MessageEncoding_internal_data_[]; -constexpr FeatureSet_MessageEncoding FeatureSet_MessageEncoding_MessageEncoding_MIN = static_cast(0); -constexpr FeatureSet_MessageEncoding FeatureSet_MessageEncoding_MessageEncoding_MAX = static_cast(2); -constexpr int FeatureSet_MessageEncoding_MessageEncoding_ARRAYSIZE = 2 + 1; +inline constexpr FeatureSet_MessageEncoding FeatureSet_MessageEncoding_MessageEncoding_MIN = + static_cast(0); +inline constexpr FeatureSet_MessageEncoding FeatureSet_MessageEncoding_MessageEncoding_MAX = + static_cast(2); +inline constexpr int FeatureSet_MessageEncoding_MessageEncoding_ARRAYSIZE = 2 + 1; PROTOBUF_EXPORT const ::google::protobuf::EnumDescriptor* FeatureSet_MessageEncoding_descriptor(); template @@ -748,9 +776,11 @@ enum FeatureSet_JsonFormat : int { PROTOBUF_EXPORT bool FeatureSet_JsonFormat_IsValid(int value); PROTOBUF_EXPORT extern const uint32_t FeatureSet_JsonFormat_internal_data_[]; -constexpr FeatureSet_JsonFormat FeatureSet_JsonFormat_JsonFormat_MIN = static_cast(0); -constexpr FeatureSet_JsonFormat FeatureSet_JsonFormat_JsonFormat_MAX = static_cast(2); -constexpr int FeatureSet_JsonFormat_JsonFormat_ARRAYSIZE = 2 + 1; +inline constexpr FeatureSet_JsonFormat FeatureSet_JsonFormat_JsonFormat_MIN = + static_cast(0); +inline constexpr FeatureSet_JsonFormat FeatureSet_JsonFormat_JsonFormat_MAX = + static_cast(2); +inline constexpr int FeatureSet_JsonFormat_JsonFormat_ARRAYSIZE = 2 + 1; PROTOBUF_EXPORT const ::google::protobuf::EnumDescriptor* FeatureSet_JsonFormat_descriptor(); template @@ -778,9 +808,11 @@ enum GeneratedCodeInfo_Annotation_Semantic : int { PROTOBUF_EXPORT bool GeneratedCodeInfo_Annotation_Semantic_IsValid(int value); PROTOBUF_EXPORT extern const uint32_t GeneratedCodeInfo_Annotation_Semantic_internal_data_[]; -constexpr GeneratedCodeInfo_Annotation_Semantic GeneratedCodeInfo_Annotation_Semantic_Semantic_MIN = static_cast(0); -constexpr GeneratedCodeInfo_Annotation_Semantic GeneratedCodeInfo_Annotation_Semantic_Semantic_MAX = static_cast(2); -constexpr int GeneratedCodeInfo_Annotation_Semantic_Semantic_ARRAYSIZE = 2 + 1; +inline constexpr GeneratedCodeInfo_Annotation_Semantic GeneratedCodeInfo_Annotation_Semantic_Semantic_MIN = + static_cast(0); +inline constexpr GeneratedCodeInfo_Annotation_Semantic GeneratedCodeInfo_Annotation_Semantic_Semantic_MAX = + static_cast(2); +inline constexpr int GeneratedCodeInfo_Annotation_Semantic_Semantic_ARRAYSIZE = 2 + 1; PROTOBUF_EXPORT const ::google::protobuf::EnumDescriptor* GeneratedCodeInfo_Annotation_Semantic_descriptor(); template @@ -817,8 +849,10 @@ enum Edition : int { PROTOBUF_EXPORT bool Edition_IsValid(int value); PROTOBUF_EXPORT extern const uint32_t Edition_internal_data_[]; -constexpr Edition Edition_MIN = static_cast(0); -constexpr Edition Edition_MAX = static_cast(2147483647); +inline constexpr Edition Edition_MIN = + static_cast(0); +inline constexpr Edition Edition_MAX = + static_cast(2147483647); PROTOBUF_EXPORT const ::google::protobuf::EnumDescriptor* Edition_descriptor(); template