-
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
C++20 no member named 'derived_from' in namespace 'std' #19364
Comments
Thank you for the bug report. We would be happy to review a pull request if you would like to send us one, but if not then we will probably get around to this eventually. |
Unfortunately we do still use this |
@acozzette that is surprising. I thought you guys are using C++20 internally. In that case just remove the |
What version of protobuf and what language are you using?
Version: v28.3
Language: C++
What operating system (Linux, Windows, ...) and version?
Ubuntu 20.04.6, Github runner (see https://github.com/actions/runner-images/blob/ubuntu20/20241117.1/images/ubuntu/Ubuntu2004-Readme.md)
What runtime / compiler are you using (e.g., python version or gcc version)
Clang 10 with
-stdlib=libc++
What did you do?
Compile any program that includes
src/google/protobuf/port.h
.Additionally, regardless of the compiler, the static_assertion inside
google::protobuf::internal::AssertDownCast
fromsrc/google/protobuf/port.h
will always fail.What did you expect to see
Compiles cleanly
What did you see instead?
Anything else we should know about your project / environment
Suggested fixes:
Either keep using C++20
Add the following to the top of
src/google/protobuf/port.h
Clean up this usage of concepts
protobuf/src/google/protobuf/port.h
Line 184 in 8476dba
Change
to
Or switch to older C++ standard
Replace
std::derived_from
withThe text was updated successfully, but these errors were encountered: