-
Notifications
You must be signed in to change notification settings - Fork 2.2k
[BUG]: 3.0.0rc1 regression: pybind11/cast.h:70:32: error: invalid ‘static_cast’ #5694
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
Comments
Do you mean 3.0.0rc1?
I'm getting a 404 clicking on the link. Could you please double-check the link?
Did you see/try this already?
Hm ... a pointer? A reproducer would be extremely useful. |
Apologies for so many things - yes, it is pybind11 3.0.0rc1 I accidentally enabled when I enabled numpy 2.3.0rc1 . Numpy 2.3.0rc1, or rather, arm64 windows turned out to be quite a change and I had about a dozen changes to get ci to pass, so I deleted the failed ci logs... anyway, the line of code the log referred is Where the enum is defined a few lines up: Afaic, it is just doing |
Anyway, binding against pybind11 2.13.x is passing now, so this is definitely a regression. |
Sorry I don't have a lot of time to spend on this, could you please
Note that the |
Okay, thanks for the time. I see it looks similar to #5555 (comment) - I am busy with the original stuff for which this issue comes as a side line, for a few more days. I'll come back to this perhaps in a weeks' time with trying the type caster in 1, and will try to do 2 too. |
Might this be because it used to convert to the underlying integer type, but now it's expecting a |
... no, I think. The error in the issue description is a compiler error. I looked around:
struct Lattice {
...
enum RectType : uint8_t {
kDefault = 0, //!< draws SkBitmap into lattice rectangle
kTransparent, //!< skips lattice rectangle by making it transparent
kFixedColor, //!< draws one of fColors into lattice rectangle
};
...
}; That looks totally fine. But looking at the error message again, I beginning to think what's missing is dealing with pointers to enums correctly. And I'm beginning to be surprised that this didn't surface before. (The cast.h code did pass global testing.) I think we need to add
or similar. |
Looking at the skia-python code again, I am not sure it makes sense for it to be |
Uh oh!
There was an error while loading. Please reload this page.
Required prerequisites
What version (or hash if on master) of pybind11 are you using?
2.3.0rc1
Problem description
I am trying out the numpy 2.3.0rc1 arm windows support,
and accidentally enabled building skia-python against pybind11 3.0.0rc1 too - https://github.com/kyamagu/skia-python/actions/runs/15240052449 -
It is failing with pybind11's cast.h:
I had a quick look at the upgrade guide and nothing jumps out to me yet.
Reproducible example code
Is this a regression? Put the last known working version here if it is.
2.13.6
The text was updated successfully, but these errors were encountered: