[C++-sig] pyste and template functions

Roman Yakovenko roman.yakovenko at gmail.com
Tue Nov 9 05:53:37 CET 2004

On Mon, 08 Nov 2004 09:58:49 -0600, John Hunter
<jdhunter at nitace.bsd.uchicago.edu> wrote:
> I am using pyste to wrap a template function.  I have used Template
> successfully to wrap a templated class, but this does not appear to
> support template functions (at least I didn't see anything in the
> docs).
> I can manually do it with module_code
>   module_code('def("intersect_rectangles", &agg::intersect_rectangles<agg::rect>);');
>   module_code('def("intersect_rectangles_d", &agg::intersect_rectangles<agg::rect_d>);');

My guess - this has nothing to do with Pyste, but with C++.  
I think you should have instantiate the function explicitly in code.
only then you can expose
it. But I could be wrong. 

> Is there a way to do this directly in pyste?
> Thanks!
> boost_python 1.31.0 with pyste and gccxml-0.6.0
> _______________________________________________
> C++-sig mailing list
> C++-sig at python.org
> http://mail.python.org/mailman/listinfo/c++-sig

More information about the Cplusplus-sig mailing list