-
Notifications
You must be signed in to change notification settings - Fork 15.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error C2127: illegal initialization of 'constinit' entity with a non-constant expression #9698
Labels
Comments
FWIW, I copied the generated code, or at least, enough of it to allow Account_default_instance to be defined, and was unable to reproduce this error. https://godbolt.org/z/j97bvjq44 |
Here is a reproduced issue in godbolt - https://godbolt.org/z/jn8arf97f |
same problem in v3.21.1(msvc c++ lastest) |
The bug seems like it would be caused by #10159. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What version of protobuf and what language are you using?
Version: master
Language: C++
What operating system (Linux, Windows, ...) and version?
Windows 10
What runtime / compiler are you using (e.g., python version or gcc version)
Visual Studio 2022
What did you do?
repeated Order orders
protobuf definition generates compile error in Visual Studio 2022for the following .proto file:
The text was updated successfully, but these errors were encountered: