-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[BUG]: Typing.h not working with gcc-14 (line 104) #5206
Labels
triage
New bug, unverified
Comments
I get
Isnt there just missing an |
Yes, but shouldn't this |
seems a duplicate of: TLDR: some versions of gcc seems to miss some c++20 STL template functions... |
This was a pybind11 bug (missing include) that was fixed already on master. It'll be in the next release.
commit 51c2aa16de5b50fe4be6a0016d6090d4a831899e
Author: wenqing <wenqing.wang@ufz.de>
Date: Fri Jun 28 16:12:32 2024 +0200
Fixed a compilation error with gcc 14 (#5208)
diff --git a/include/pybind11/typing.h b/include/pybind11/typing.h
index c8ba18d4..b0feb946 100644
--- a/include/pybind11/typing.h
+++ b/include/pybind11/typing.h
@@ -14,6 +14,8 @@
#include "cast.h"
#include "pytypes.h"
+#include <algorithm>
+
PYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE)
PYBIND11_NAMESPACE_BEGIN(typing) |
bilke
added a commit
to ufz/ogs
that referenced
this issue
Sep 27, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Required prerequisites
What version (or hash if on master) of pybind11 are you using?
v2.13.0 & v2.13.1 & #5203
Problem description
So basically, with tag v 2.13.0 a bug considering the GNU 14 compiler was introduced in typing.h line 104 with std::copy_n
tag v2.12.0 works.
So looking at the changelog of the GNU compiler they state this on how to port the code to gcc-14.
"""
C++ language issues
Header dependency changes
Some C++ Standard Library headers have been changed to no longer include other headers that were being used internally by the library. As such, C++ programs that used standard library components without including the right headers will no longer compile.
The following headers are used less widely in libstdc++ and may need to be included explicitly when compiling with GCC 14:
(for std::copy_n, std::find_if, std::lower_bound, std::remove, std::reverse, std::sort etc.)
...
"""
Reproducible example code
No response
Is this a regression? Put the last known working version here if it is.
v2.12.0
The text was updated successfully, but these errors were encountered: