Get VS 2015 to use const int definitions
VC++ up to VS 2015 RTM does not require explicit storage allocation for static const integers declared in classes. VS 2015 Update 1 requires these storage definitions in some cases. It's unclear exactly what cases - simple tests work with and without the explicit storage allocation. Many previous versions of VC++ have theoretically *allowed* a definition to supply storage, but tests on VC++ 2013 show that this doesn't actually work correctly - it leads to duplicate definition errors in Chromium. So, the change is scoped to VS 2015 only. This change also updates the generated files to match the new generator. TL;DR - this change is necessary in order for Chromium to build with VS 2015 Update 1.
This commit is contained in:
parent
86f6f53db3
commit
86ba70ec41
7 changed files with 72 additions and 70 deletions
|
@ -278,9 +278,9 @@ void EnumGenerator::GenerateMethods(io::Printer* printer) {
|
|||
if (descriptor_->containing_type() != NULL) {
|
||||
// We need to "define" the static constants which were declared in the
|
||||
// header, to give the linker a place to put them. Or at least the C++
|
||||
// standard says we have to. MSVC actually insists tha we do _not_ define
|
||||
// them again in the .cc file.
|
||||
printer->Print("#ifndef _MSC_VER\n");
|
||||
// standard says we have to. MSVC actually insists that we do _not_ define
|
||||
// them again in the .cc file, prior to VC++ 2015.
|
||||
printer->Print("#if !defined(_MSC_VER) || _MSC_VER >= 1900\n");
|
||||
|
||||
vars["parent"] = ClassName(descriptor_->containing_type(), false);
|
||||
vars["nested_name"] = descriptor_->name();
|
||||
|
@ -297,7 +297,7 @@ void EnumGenerator::GenerateMethods(io::Printer* printer) {
|
|||
"const int $parent$::$nested_name$_ARRAYSIZE;\n");
|
||||
}
|
||||
|
||||
printer->Print("#endif // _MSC_VER\n");
|
||||
printer->Print("#endif // !defined(_MSC_VER) || _MSC_VER >= 1900\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -155,7 +155,7 @@ void ExtensionGenerator::GenerateDefinition(io::Printer* printer) {
|
|||
// Likewise, class members need to declare the field constant variable.
|
||||
if (descriptor_->extension_scope() != NULL) {
|
||||
printer->Print(vars,
|
||||
"#ifndef _MSC_VER\n"
|
||||
"#if !defined(_MSC_VER) || _MSC_VER >= 1900\n"
|
||||
"const int $scope$$constant_name$;\n"
|
||||
"#endif\n");
|
||||
}
|
||||
|
|
|
@ -1807,7 +1807,7 @@ GenerateClassMethods(io::Printer* printer) {
|
|||
}
|
||||
|
||||
// Generate field number constants.
|
||||
printer->Print("#ifndef _MSC_VER\n");
|
||||
printer->Print("#if !defined(_MSC_VER) || _MSC_VER >= 1900\n");
|
||||
for (int i = 0; i < descriptor_->field_count(); i++) {
|
||||
const FieldDescriptor *field = descriptor_->field(i);
|
||||
printer->Print(
|
||||
|
@ -1816,7 +1816,7 @@ GenerateClassMethods(io::Printer* printer) {
|
|||
"constant_name", FieldConstantName(field));
|
||||
}
|
||||
printer->Print(
|
||||
"#endif // !_MSC_VER\n"
|
||||
"#endif // !defined(_MSC_VER) || _MSC_VER >= 1900\n"
|
||||
"\n");
|
||||
|
||||
// Define extension identifiers.
|
||||
|
|
|
@ -172,11 +172,11 @@ static void MergeFromFail(int line) {
|
|||
|
||||
// ===================================================================
|
||||
|
||||
#ifndef _MSC_VER
|
||||
#if !defined(_MSC_VER) || _MSC_VER >= 1900
|
||||
const int CodeGeneratorRequest::kFileToGenerateFieldNumber;
|
||||
const int CodeGeneratorRequest::kParameterFieldNumber;
|
||||
const int CodeGeneratorRequest::kProtoFileFieldNumber;
|
||||
#endif // !_MSC_VER
|
||||
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
|
||||
|
||||
CodeGeneratorRequest::CodeGeneratorRequest()
|
||||
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
|
||||
|
@ -656,11 +656,11 @@ CodeGeneratorRequest::proto_file() const {
|
|||
|
||||
// ===================================================================
|
||||
|
||||
#ifndef _MSC_VER
|
||||
#if !defined(_MSC_VER) || _MSC_VER >= 1900
|
||||
const int CodeGeneratorResponse_File::kNameFieldNumber;
|
||||
const int CodeGeneratorResponse_File::kInsertionPointFieldNumber;
|
||||
const int CodeGeneratorResponse_File::kContentFieldNumber;
|
||||
#endif // !_MSC_VER
|
||||
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
|
||||
|
||||
CodeGeneratorResponse_File::CodeGeneratorResponse_File()
|
||||
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
|
||||
|
@ -1021,10 +1021,10 @@ void CodeGeneratorResponse_File::InternalSwap(CodeGeneratorResponse_File* other)
|
|||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
#ifndef _MSC_VER
|
||||
#if !defined(_MSC_VER) || _MSC_VER >= 1900
|
||||
const int CodeGeneratorResponse::kErrorFieldNumber;
|
||||
const int CodeGeneratorResponse::kFileFieldNumber;
|
||||
#endif // !_MSC_VER
|
||||
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
|
||||
|
||||
CodeGeneratorResponse::CodeGeneratorResponse()
|
||||
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
|
||||
|
|
|
@ -156,7 +156,7 @@ const char* FileDescriptor::SyntaxName(FileDescriptor::Syntax syntax) {
|
|||
|
||||
static const char * const kNonLinkedWeakMessageReplacementName = "google.protobuf.Empty";
|
||||
|
||||
#ifndef _MSC_VER // MSVC doesn't need these and won't even accept them.
|
||||
#if !defined(_MSC_VER) || _MSC_VER >= 1900
|
||||
const int FieldDescriptor::kMaxNumber;
|
||||
const int FieldDescriptor::kFirstReservedNumber;
|
||||
const int FieldDescriptor::kLastReservedNumber;
|
||||
|
|
|
@ -828,9 +828,9 @@ static void MergeFromFail(int line) {
|
|||
|
||||
// ===================================================================
|
||||
|
||||
#ifndef _MSC_VER
|
||||
#if !defined(_MSC_VER) || _MSC_VER >= 1900
|
||||
const int FileDescriptorSet::kFileFieldNumber;
|
||||
#endif // !_MSC_VER
|
||||
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
|
||||
|
||||
FileDescriptorSet::FileDescriptorSet()
|
||||
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
|
||||
|
@ -1095,7 +1095,7 @@ FileDescriptorSet::file() const {
|
|||
|
||||
// ===================================================================
|
||||
|
||||
#ifndef _MSC_VER
|
||||
#if !defined(_MSC_VER) || _MSC_VER >= 1900
|
||||
const int FileDescriptorProto::kNameFieldNumber;
|
||||
const int FileDescriptorProto::kPackageFieldNumber;
|
||||
const int FileDescriptorProto::kDependencyFieldNumber;
|
||||
|
@ -1108,7 +1108,7 @@ const int FileDescriptorProto::kExtensionFieldNumber;
|
|||
const int FileDescriptorProto::kOptionsFieldNumber;
|
||||
const int FileDescriptorProto::kSourceCodeInfoFieldNumber;
|
||||
const int FileDescriptorProto::kSyntaxFieldNumber;
|
||||
#endif // !_MSC_VER
|
||||
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
|
||||
|
||||
FileDescriptorProto::FileDescriptorProto()
|
||||
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
|
||||
|
@ -2349,10 +2349,10 @@ void FileDescriptorProto::clear_syntax() {
|
|||
|
||||
// ===================================================================
|
||||
|
||||
#ifndef _MSC_VER
|
||||
#if !defined(_MSC_VER) || _MSC_VER >= 1900
|
||||
const int DescriptorProto_ExtensionRange::kStartFieldNumber;
|
||||
const int DescriptorProto_ExtensionRange::kEndFieldNumber;
|
||||
#endif // !_MSC_VER
|
||||
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
|
||||
|
||||
DescriptorProto_ExtensionRange::DescriptorProto_ExtensionRange()
|
||||
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
|
||||
|
@ -2632,10 +2632,10 @@ void DescriptorProto_ExtensionRange::InternalSwap(DescriptorProto_ExtensionRange
|
|||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
#ifndef _MSC_VER
|
||||
#if !defined(_MSC_VER) || _MSC_VER >= 1900
|
||||
const int DescriptorProto_ReservedRange::kStartFieldNumber;
|
||||
const int DescriptorProto_ReservedRange::kEndFieldNumber;
|
||||
#endif // !_MSC_VER
|
||||
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
|
||||
|
||||
DescriptorProto_ReservedRange::DescriptorProto_ReservedRange()
|
||||
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
|
||||
|
@ -2915,7 +2915,7 @@ void DescriptorProto_ReservedRange::InternalSwap(DescriptorProto_ReservedRange*
|
|||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
#ifndef _MSC_VER
|
||||
#if !defined(_MSC_VER) || _MSC_VER >= 1900
|
||||
const int DescriptorProto::kNameFieldNumber;
|
||||
const int DescriptorProto::kFieldFieldNumber;
|
||||
const int DescriptorProto::kExtensionFieldNumber;
|
||||
|
@ -2926,7 +2926,7 @@ const int DescriptorProto::kOneofDeclFieldNumber;
|
|||
const int DescriptorProto::kOptionsFieldNumber;
|
||||
const int DescriptorProto::kReservedRangeFieldNumber;
|
||||
const int DescriptorProto::kReservedNameFieldNumber;
|
||||
#endif // !_MSC_VER
|
||||
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
|
||||
|
||||
DescriptorProto::DescriptorProto()
|
||||
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
|
||||
|
@ -4056,7 +4056,7 @@ bool FieldDescriptorProto_Type_IsValid(int value) {
|
|||
}
|
||||
}
|
||||
|
||||
#ifndef _MSC_VER
|
||||
#if !defined(_MSC_VER) || _MSC_VER >= 1900
|
||||
const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_DOUBLE;
|
||||
const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_FLOAT;
|
||||
const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_INT64;
|
||||
|
@ -4078,7 +4078,7 @@ const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_SINT64;
|
|||
const FieldDescriptorProto_Type FieldDescriptorProto::Type_MIN;
|
||||
const FieldDescriptorProto_Type FieldDescriptorProto::Type_MAX;
|
||||
const int FieldDescriptorProto::Type_ARRAYSIZE;
|
||||
#endif // _MSC_VER
|
||||
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
|
||||
const ::google::protobuf::EnumDescriptor* FieldDescriptorProto_Label_descriptor() {
|
||||
protobuf_AssignDescriptorsOnce();
|
||||
return FieldDescriptorProto_Label_descriptor_;
|
||||
|
@ -4094,15 +4094,15 @@ bool FieldDescriptorProto_Label_IsValid(int value) {
|
|||
}
|
||||
}
|
||||
|
||||
#ifndef _MSC_VER
|
||||
#if !defined(_MSC_VER) || _MSC_VER >= 1900
|
||||
const FieldDescriptorProto_Label FieldDescriptorProto::LABEL_OPTIONAL;
|
||||
const FieldDescriptorProto_Label FieldDescriptorProto::LABEL_REQUIRED;
|
||||
const FieldDescriptorProto_Label FieldDescriptorProto::LABEL_REPEATED;
|
||||
const FieldDescriptorProto_Label FieldDescriptorProto::Label_MIN;
|
||||
const FieldDescriptorProto_Label FieldDescriptorProto::Label_MAX;
|
||||
const int FieldDescriptorProto::Label_ARRAYSIZE;
|
||||
#endif // _MSC_VER
|
||||
#ifndef _MSC_VER
|
||||
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
|
||||
#if !defined(_MSC_VER) || _MSC_VER >= 1900
|
||||
const int FieldDescriptorProto::kNameFieldNumber;
|
||||
const int FieldDescriptorProto::kNumberFieldNumber;
|
||||
const int FieldDescriptorProto::kLabelFieldNumber;
|
||||
|
@ -4113,7 +4113,7 @@ const int FieldDescriptorProto::kDefaultValueFieldNumber;
|
|||
const int FieldDescriptorProto::kOneofIndexFieldNumber;
|
||||
const int FieldDescriptorProto::kJsonNameFieldNumber;
|
||||
const int FieldDescriptorProto::kOptionsFieldNumber;
|
||||
#endif // !_MSC_VER
|
||||
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
|
||||
|
||||
FieldDescriptorProto::FieldDescriptorProto()
|
||||
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
|
||||
|
@ -5210,9 +5210,9 @@ void FieldDescriptorProto::set_allocated_options(::google::protobuf::FieldOption
|
|||
|
||||
// ===================================================================
|
||||
|
||||
#ifndef _MSC_VER
|
||||
#if !defined(_MSC_VER) || _MSC_VER >= 1900
|
||||
const int OneofDescriptorProto::kNameFieldNumber;
|
||||
#endif // !_MSC_VER
|
||||
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
|
||||
|
||||
OneofDescriptorProto::OneofDescriptorProto()
|
||||
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
|
||||
|
@ -5516,11 +5516,11 @@ void OneofDescriptorProto::clear_name() {
|
|||
|
||||
// ===================================================================
|
||||
|
||||
#ifndef _MSC_VER
|
||||
#if !defined(_MSC_VER) || _MSC_VER >= 1900
|
||||
const int EnumDescriptorProto::kNameFieldNumber;
|
||||
const int EnumDescriptorProto::kValueFieldNumber;
|
||||
const int EnumDescriptorProto::kOptionsFieldNumber;
|
||||
#endif // !_MSC_VER
|
||||
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
|
||||
|
||||
EnumDescriptorProto::EnumDescriptorProto()
|
||||
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
|
||||
|
@ -5989,11 +5989,11 @@ void EnumDescriptorProto::set_allocated_options(::google::protobuf::EnumOptions*
|
|||
|
||||
// ===================================================================
|
||||
|
||||
#ifndef _MSC_VER
|
||||
#if !defined(_MSC_VER) || _MSC_VER >= 1900
|
||||
const int EnumValueDescriptorProto::kNameFieldNumber;
|
||||
const int EnumValueDescriptorProto::kNumberFieldNumber;
|
||||
const int EnumValueDescriptorProto::kOptionsFieldNumber;
|
||||
#endif // !_MSC_VER
|
||||
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
|
||||
|
||||
EnumValueDescriptorProto::EnumValueDescriptorProto()
|
||||
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
|
||||
|
@ -6452,11 +6452,11 @@ void EnumValueDescriptorProto::set_allocated_options(::google::protobuf::EnumVal
|
|||
|
||||
// ===================================================================
|
||||
|
||||
#ifndef _MSC_VER
|
||||
#if !defined(_MSC_VER) || _MSC_VER >= 1900
|
||||
const int ServiceDescriptorProto::kNameFieldNumber;
|
||||
const int ServiceDescriptorProto::kMethodFieldNumber;
|
||||
const int ServiceDescriptorProto::kOptionsFieldNumber;
|
||||
#endif // !_MSC_VER
|
||||
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
|
||||
|
||||
ServiceDescriptorProto::ServiceDescriptorProto()
|
||||
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
|
||||
|
@ -6925,14 +6925,14 @@ void ServiceDescriptorProto::set_allocated_options(::google::protobuf::ServiceOp
|
|||
|
||||
// ===================================================================
|
||||
|
||||
#ifndef _MSC_VER
|
||||
#if !defined(_MSC_VER) || _MSC_VER >= 1900
|
||||
const int MethodDescriptorProto::kNameFieldNumber;
|
||||
const int MethodDescriptorProto::kInputTypeFieldNumber;
|
||||
const int MethodDescriptorProto::kOutputTypeFieldNumber;
|
||||
const int MethodDescriptorProto::kOptionsFieldNumber;
|
||||
const int MethodDescriptorProto::kClientStreamingFieldNumber;
|
||||
const int MethodDescriptorProto::kServerStreamingFieldNumber;
|
||||
#endif // !_MSC_VER
|
||||
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
|
||||
|
||||
MethodDescriptorProto::MethodDescriptorProto()
|
||||
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
|
||||
|
@ -7691,15 +7691,15 @@ bool FileOptions_OptimizeMode_IsValid(int value) {
|
|||
}
|
||||
}
|
||||
|
||||
#ifndef _MSC_VER
|
||||
#if !defined(_MSC_VER) || _MSC_VER >= 1900
|
||||
const FileOptions_OptimizeMode FileOptions::SPEED;
|
||||
const FileOptions_OptimizeMode FileOptions::CODE_SIZE;
|
||||
const FileOptions_OptimizeMode FileOptions::LITE_RUNTIME;
|
||||
const FileOptions_OptimizeMode FileOptions::OptimizeMode_MIN;
|
||||
const FileOptions_OptimizeMode FileOptions::OptimizeMode_MAX;
|
||||
const int FileOptions::OptimizeMode_ARRAYSIZE;
|
||||
#endif // _MSC_VER
|
||||
#ifndef _MSC_VER
|
||||
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
|
||||
#if !defined(_MSC_VER) || _MSC_VER >= 1900
|
||||
const int FileOptions::kJavaPackageFieldNumber;
|
||||
const int FileOptions::kJavaOuterClassnameFieldNumber;
|
||||
const int FileOptions::kJavaMultipleFilesFieldNumber;
|
||||
|
@ -7716,7 +7716,7 @@ const int FileOptions::kObjcClassPrefixFieldNumber;
|
|||
const int FileOptions::kCsharpNamespaceFieldNumber;
|
||||
const int FileOptions::kJavananoUseDeprecatedPackageFieldNumber;
|
||||
const int FileOptions::kUninterpretedOptionFieldNumber;
|
||||
#endif // !_MSC_VER
|
||||
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
|
||||
|
||||
FileOptions::FileOptions()
|
||||
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
|
||||
|
@ -9167,13 +9167,13 @@ FileOptions::uninterpreted_option() const {
|
|||
|
||||
// ===================================================================
|
||||
|
||||
#ifndef _MSC_VER
|
||||
#if !defined(_MSC_VER) || _MSC_VER >= 1900
|
||||
const int MessageOptions::kMessageSetWireFormatFieldNumber;
|
||||
const int MessageOptions::kNoStandardDescriptorAccessorFieldNumber;
|
||||
const int MessageOptions::kDeprecatedFieldNumber;
|
||||
const int MessageOptions::kMapEntryFieldNumber;
|
||||
const int MessageOptions::kUninterpretedOptionFieldNumber;
|
||||
#endif // !_MSC_VER
|
||||
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
|
||||
|
||||
MessageOptions::MessageOptions()
|
||||
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
|
||||
|
@ -9725,14 +9725,14 @@ bool FieldOptions_CType_IsValid(int value) {
|
|||
}
|
||||
}
|
||||
|
||||
#ifndef _MSC_VER
|
||||
#if !defined(_MSC_VER) || _MSC_VER >= 1900
|
||||
const FieldOptions_CType FieldOptions::STRING;
|
||||
const FieldOptions_CType FieldOptions::CORD;
|
||||
const FieldOptions_CType FieldOptions::STRING_PIECE;
|
||||
const FieldOptions_CType FieldOptions::CType_MIN;
|
||||
const FieldOptions_CType FieldOptions::CType_MAX;
|
||||
const int FieldOptions::CType_ARRAYSIZE;
|
||||
#endif // _MSC_VER
|
||||
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
|
||||
const ::google::protobuf::EnumDescriptor* FieldOptions_JSType_descriptor() {
|
||||
protobuf_AssignDescriptorsOnce();
|
||||
return FieldOptions_JSType_descriptor_;
|
||||
|
@ -9748,15 +9748,15 @@ bool FieldOptions_JSType_IsValid(int value) {
|
|||
}
|
||||
}
|
||||
|
||||
#ifndef _MSC_VER
|
||||
#if !defined(_MSC_VER) || _MSC_VER >= 1900
|
||||
const FieldOptions_JSType FieldOptions::JS_NORMAL;
|
||||
const FieldOptions_JSType FieldOptions::JS_STRING;
|
||||
const FieldOptions_JSType FieldOptions::JS_NUMBER;
|
||||
const FieldOptions_JSType FieldOptions::JSType_MIN;
|
||||
const FieldOptions_JSType FieldOptions::JSType_MAX;
|
||||
const int FieldOptions::JSType_ARRAYSIZE;
|
||||
#endif // _MSC_VER
|
||||
#ifndef _MSC_VER
|
||||
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
|
||||
#if !defined(_MSC_VER) || _MSC_VER >= 1900
|
||||
const int FieldOptions::kCtypeFieldNumber;
|
||||
const int FieldOptions::kPackedFieldNumber;
|
||||
const int FieldOptions::kJstypeFieldNumber;
|
||||
|
@ -9764,7 +9764,7 @@ const int FieldOptions::kLazyFieldNumber;
|
|||
const int FieldOptions::kDeprecatedFieldNumber;
|
||||
const int FieldOptions::kWeakFieldNumber;
|
||||
const int FieldOptions::kUninterpretedOptionFieldNumber;
|
||||
#endif // !_MSC_VER
|
||||
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
|
||||
|
||||
FieldOptions::FieldOptions()
|
||||
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
|
||||
|
@ -10440,11 +10440,11 @@ FieldOptions::uninterpreted_option() const {
|
|||
|
||||
// ===================================================================
|
||||
|
||||
#ifndef _MSC_VER
|
||||
#if !defined(_MSC_VER) || _MSC_VER >= 1900
|
||||
const int EnumOptions::kAllowAliasFieldNumber;
|
||||
const int EnumOptions::kDeprecatedFieldNumber;
|
||||
const int EnumOptions::kUninterpretedOptionFieldNumber;
|
||||
#endif // !_MSC_VER
|
||||
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
|
||||
|
||||
EnumOptions::EnumOptions()
|
||||
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
|
||||
|
@ -10863,10 +10863,10 @@ EnumOptions::uninterpreted_option() const {
|
|||
|
||||
// ===================================================================
|
||||
|
||||
#ifndef _MSC_VER
|
||||
#if !defined(_MSC_VER) || _MSC_VER >= 1900
|
||||
const int EnumValueOptions::kDeprecatedFieldNumber;
|
||||
const int EnumValueOptions::kUninterpretedOptionFieldNumber;
|
||||
#endif // !_MSC_VER
|
||||
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
|
||||
|
||||
EnumValueOptions::EnumValueOptions()
|
||||
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
|
||||
|
@ -11212,10 +11212,10 @@ EnumValueOptions::uninterpreted_option() const {
|
|||
|
||||
// ===================================================================
|
||||
|
||||
#ifndef _MSC_VER
|
||||
#if !defined(_MSC_VER) || _MSC_VER >= 1900
|
||||
const int ServiceOptions::kDeprecatedFieldNumber;
|
||||
const int ServiceOptions::kUninterpretedOptionFieldNumber;
|
||||
#endif // !_MSC_VER
|
||||
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
|
||||
|
||||
ServiceOptions::ServiceOptions()
|
||||
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
|
||||
|
@ -11561,10 +11561,10 @@ ServiceOptions::uninterpreted_option() const {
|
|||
|
||||
// ===================================================================
|
||||
|
||||
#ifndef _MSC_VER
|
||||
#if !defined(_MSC_VER) || _MSC_VER >= 1900
|
||||
const int MethodOptions::kDeprecatedFieldNumber;
|
||||
const int MethodOptions::kUninterpretedOptionFieldNumber;
|
||||
#endif // !_MSC_VER
|
||||
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
|
||||
|
||||
MethodOptions::MethodOptions()
|
||||
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
|
||||
|
@ -11910,10 +11910,10 @@ MethodOptions::uninterpreted_option() const {
|
|||
|
||||
// ===================================================================
|
||||
|
||||
#ifndef _MSC_VER
|
||||
#if !defined(_MSC_VER) || _MSC_VER >= 1900
|
||||
const int UninterpretedOption_NamePart::kNamePartFieldNumber;
|
||||
const int UninterpretedOption_NamePart::kIsExtensionFieldNumber;
|
||||
#endif // !_MSC_VER
|
||||
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
|
||||
|
||||
UninterpretedOption_NamePart::UninterpretedOption_NamePart()
|
||||
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
|
||||
|
@ -12216,7 +12216,7 @@ void UninterpretedOption_NamePart::InternalSwap(UninterpretedOption_NamePart* ot
|
|||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
#ifndef _MSC_VER
|
||||
#if !defined(_MSC_VER) || _MSC_VER >= 1900
|
||||
const int UninterpretedOption::kNameFieldNumber;
|
||||
const int UninterpretedOption::kIdentifierValueFieldNumber;
|
||||
const int UninterpretedOption::kPositiveIntValueFieldNumber;
|
||||
|
@ -12224,7 +12224,7 @@ const int UninterpretedOption::kNegativeIntValueFieldNumber;
|
|||
const int UninterpretedOption::kDoubleValueFieldNumber;
|
||||
const int UninterpretedOption::kStringValueFieldNumber;
|
||||
const int UninterpretedOption::kAggregateValueFieldNumber;
|
||||
#endif // !_MSC_VER
|
||||
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
|
||||
|
||||
UninterpretedOption::UninterpretedOption()
|
||||
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
|
||||
|
@ -13083,13 +13083,13 @@ void UninterpretedOption::clear_aggregate_value() {
|
|||
|
||||
// ===================================================================
|
||||
|
||||
#ifndef _MSC_VER
|
||||
#if !defined(_MSC_VER) || _MSC_VER >= 1900
|
||||
const int SourceCodeInfo_Location::kPathFieldNumber;
|
||||
const int SourceCodeInfo_Location::kSpanFieldNumber;
|
||||
const int SourceCodeInfo_Location::kLeadingCommentsFieldNumber;
|
||||
const int SourceCodeInfo_Location::kTrailingCommentsFieldNumber;
|
||||
const int SourceCodeInfo_Location::kLeadingDetachedCommentsFieldNumber;
|
||||
#endif // !_MSC_VER
|
||||
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
|
||||
|
||||
SourceCodeInfo_Location::SourceCodeInfo_Location()
|
||||
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
|
||||
|
@ -13568,9 +13568,9 @@ void SourceCodeInfo_Location::InternalSwap(SourceCodeInfo_Location* other) {
|
|||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
#ifndef _MSC_VER
|
||||
#if !defined(_MSC_VER) || _MSC_VER >= 1900
|
||||
const int SourceCodeInfo::kLocationFieldNumber;
|
||||
#endif // !_MSC_VER
|
||||
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
|
||||
|
||||
SourceCodeInfo::SourceCodeInfo()
|
||||
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
|
||||
|
|
|
@ -49,8 +49,10 @@ namespace google {
|
|||
namespace protobuf {
|
||||
namespace internal {
|
||||
|
||||
#ifndef _MSC_VER // MSVC doesn't like definitions of inline constants, GCC
|
||||
// requires them.
|
||||
|
||||
#if !defined(_MSC_VER) || _MSC_VER >= 1900
|
||||
// Old version of MSVC doesn't like definitions of inline constants, GCC
|
||||
// requires them.
|
||||
const int WireFormatLite::kMessageSetItemStartTag;
|
||||
const int WireFormatLite::kMessageSetItemEndTag;
|
||||
const int WireFormatLite::kMessageSetTypeIdTag;
|
||||
|
|
Loading…
Add table
Reference in a new issue