Re: [Cython] Template functions

2013-03-17 Thread John Tyree
> > I was thinking of something along the lines of > > cdef extern from ...: > cpp_string to_string[T](T value) > T my_func[T, S](T a, S b) > ... > > It's more a question of how to implement it. > > - Robert Well this closely matches the syntax used for classes and won't require an

[Cython] Template functions

2013-03-16 Thread John Tyree
There is currently a void in Cython's C++ support with respect to function (not class) templates. It would be great to have such a thing, dangerous or not, so I'm proposing something to get things rolling. Given that function templates are 100% transparent to the caller, it seems that the only bar