Fix compiler error for empty default ctor for std::atomic<int> variables

pull/8637/head
Daniel Schopf 4 years ago
parent 12a9feca47
commit bbccb31e8b
  1. 2
      src/google/protobuf/compiler/cpp/cpp_enum_field.cc
  2. 2
      src/google/protobuf/compiler/cpp/cpp_primitive_field.cc
  3. 6
      src/google/protobuf/descriptor.pb.cc

@ -496,7 +496,7 @@ void RepeatedEnumFieldGenerator::GenerateConstinitInitializer(
format("$name$_()");
if (descriptor_->is_packed() &&
HasGeneratedMethods(descriptor_->file(), options_)) {
format("\n, _$name$_cached_byte_size_()");
format("\n, _$name$_cached_byte_size_(0)");
}
}

@ -486,7 +486,7 @@ void RepeatedPrimitiveFieldGenerator::GenerateConstinitInitializer(
format("$name$_()");
if (descriptor_->is_packed() && FixedSize(descriptor_->type()) == -1 &&
HasGeneratedMethods(descriptor_->file(), options_)) {
format("\n, _$name$_cached_byte_size_()");
format("\n, _$name$_cached_byte_size_(0)");
}
}

@ -393,9 +393,9 @@ PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT UninterpretedOptionDefaultTypeI
constexpr SourceCodeInfo_Location::SourceCodeInfo_Location(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: path_()
, _path_cached_byte_size_()
, _path_cached_byte_size_(0)
, span_()
, _span_cached_byte_size_()
, _span_cached_byte_size_(0)
, leading_detached_comments_()
, leading_comments_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
, trailing_comments_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){}
@ -423,7 +423,7 @@ PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT SourceCodeInfoDefaultTypeIntern
constexpr GeneratedCodeInfo_Annotation::GeneratedCodeInfo_Annotation(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: path_()
, _path_cached_byte_size_()
, _path_cached_byte_size_(0)
, source_file_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
, begin_(0)
, end_(0){}

Loading…
Cancel
Save