1# Defines the standard C++ cast operators.
2#
3# Due to type restrictions, these are only defined for pointer parameters,
4# however that is the only case where they are significantly more interesting
5# than the standard C cast operator which can be written "<T>(expression)" in
6# Cython.
7
8cdef extern from * nogil:
9    cdef T dynamic_cast[T](void *) except +   # nullptr may also indicate failure
10    cdef T static_cast[T](void *)
11    cdef T reinterpret_cast[T](void *)
12    cdef T const_cast[T](void *)
13