What version (or hash if on master) of pybind11 are you using?
2.12.0
Problem description
The code for get_pointer() reads
T *result = static_cast<T *>(PyCapsule_GetPointer(m_ptr, name));
This makes it impossible to use get_pointer<f>() where f is a function type. I believe the right code should use reinterpret_cast. MSVC does not complain, but GCC breaks my code because of this.
Required prerequisites
What version (or hash if on master) of pybind11 are you using?
2.12.0
Problem description
The code for
get_pointer()
readsThis makes it impossible to use
get_pointer<f>()
wheref
is a function type. I believe the right code should usereinterpret_cast
. MSVC does not complain, but GCC breaks my code because of this.Reproducible example code
Is this a regression? Put the last known working version here if it is.
Not a regression