Reputation: 843
How can I use the remove
function from <algorithm>
? (Or any other operation, I want to use this with vectors, I tried to cdef extern
to declare it, but there is no template function yet, I think)
Upvotes: 6
Views: 1052
Reputation: 601919
Cython can only reasonably link against compiled code in some external library following the C calling conventions. To use template functions, you'll have to write an extern "C"
wrapper function that uses a specific incarnation of the algorithm (i.e. you have to fix the template parameters).
Upvotes: 6