cast.pxd 501 B

123456789101112
  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. cdef extern from * nogil:
  8. cdef T dynamic_cast[T](void *) except + # nullptr may also indicate failure
  9. cdef T static_cast[T](void *)
  10. cdef T reinterpret_cast[T](void *)
  11. cdef T const_cast[T](void *)