Skip to content

[BUG]: 3.0.0rc1 regression: pybind11/cast.h:70:32: error: invalid ‘static_cast’ #5694

Description

@HinTak

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:

src/skia/Canvas.cpp:239:19: required from here
/opt/python/cp310-cp310/lib/python3.10/site-packages/pybind11/include/pybind11/cast.h:70:32: error: invalid ‘static_cast’ from type ‘const SkCanvas::Lattice::RectType* const’ to type ‘pybind11::detail::type_caster_enum_type<SkCanvas::Lattice::RectType>::Underlying’ {aka ‘unsigned char’}
70 | return native_enum(static_cast<Underlying>(src)).release();
| ^~~~~~~~~~

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

triageNew bug, unverified

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions