29 May 2012 01:20
Is there a way of advancing a iterator by multiple steps?
Wenxiang Chen <chenwx.ustc <at> gmail.com>
2012-05-28 23:20:16 GMT
2012-05-28 23:20:16 GMT
Hi all,
I am using Cython with some C++ facilities like vector container.
cdef vector[int] vec
I need to obtain the relative iterator according to some index i. I knew there are at least two methods in standard C++ to achieve this:
1) vec.begin() + i
2) advance(vec.begin(), i)
It appears for me that neither of the above approaches work for Cython 0.16. Is there work around for this issue? Any help will be highly appreciated.
-Wenxiang
RSS Feed