C++ 17 compile failed
What version of protobuf and what language are you using? Version: v3.17.3 & master Language: C++ OS:Linux Compiler:gcc 7.3
use IDL to code , then use C++ 17 gcc 7.3 compiler, but can compile failed. Error Info like this:
In constructor ‘constexpr onnx::AttributeProtoDefaultTypeInternal::AttributeProtoDefaultTypeInternal()’: error: temporary of non-literal type ‘onnx::AttributeProto’ in a constant expression : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
can it be fix? @elharo
Does this reproduce on the 3.19.x release?
Does this reproduce on the 3.19.x release?
Yes , I tried on 3.19.4, and it is reproducible.
We triage inactive PRs and issues in order to make it easier to find active work. If this issue should remain active or becomes active again, please add a comment.
This issue is labeled inactive because the last activity was over 90 days ago.
Can it be fixed?
To debug this further we need a repro that occurs on the 3.21.x line. At minimum, we likely need a .proto file, a full error message, and precise gcc and protoc versions you are using.
That said, even 21.x is going out of support at the end of March, so I recommend trying to upgrade to 4.25.x.
https://engdoc.corp.google.com/eng/doc/devguide/proto/support/version-support.md?cl=head
Externally visible support schedule: https://protobuf.dev/support/version-support/
We triage inactive PRs and issues in order to make it easier to find active work. If this issue should remain active or becomes active again, please add a comment.
This issue is labeled inactive because the last activity was over 90 days ago.
We triage inactive PRs and issues in order to make it easier to find active work. If this issue should remain active or becomes active again, please reopen it.
This issue was closed and archived because there has been no new activity in the 14 days since the inactive label was added.