Cython does not allow ctypedef'ing templated types
|Reported by:||tokidoki||Owned by:||robertwb|
Cython raises a syntax error when ctypedef'ing a templated type.
For example, the following code:
from libcpp.vector import vector ctypedef vector[int] VectOfInt
raises the following Syntax Error:
ctypedef vector[int] VectOfInt ^ /home/toki/progs/cython13tests/bug6.pyx:3:21: Syntax error in ctypedef statement
As pointed out by Haoyu BAI (http://codespeak.net/pipermail/cython-dev/2010-July/009126.html), inheritance of templated types can provide a workaround if/when it is implemented.
Change History (6)
comment:5 Changed 4 years ago by robertwb
- Milestone changed from 0.15 to 0.16
- Owner changed from somebody to robertwb