Commit 9610ed34 authored by Robert Bradshaw's avatar Robert Bradshaw

Add dynamic cast and friends.

parent 5ee84d80
......@@ -56,6 +56,8 @@ Features added
* New directive ``use_switch`` (defaults to True) to optionally disable
the optimization of chained if statement to C switch statements.
* Defines dynamic_cast et al. in `libcpp.cast`.
Bugs fixed
----------
......
# empty file
cdef extern from *:
ctypedef bint bool
# Defines the standard C++ cast operators.
#
# Due to type restrictions, these are only defined for pointer parameters,
# however that is the only case where they are significantly more interesting
# than the standard C cast operator which can be written "<T>(expression)" in
# Cython.
cdef extern from *:
cdef T dynamic_cast[T](void *) except + # nullptr may also indicate failure
cdef T static_cast[T](void *)
cdef T reinterpret_cast[T](void *)
cdef T const_cast[T](void *)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment