[C++-sig] Conversion of python files to C++ ostreams

Christopher Bruns cmbruns at stanford.edu
Sun Apr 4 21:10:22 CEST 2010


On Sat, Apr 3, 2010 at 11:53 AM, troy d. straszheim <troy at resophonic.com> wrote:
> BOOST_PYTHON_MODULE(mod)
> {
>  def("sayhello", as<void(conv(object&))>( &sayhello ));
>  //  arg converter       ^^^^^^^^^^^^^
> };
>
> The as<> might need some clarification....

Thanks Troy for the helpful tip.

I'm still confused by the "as<>" symbol.  Is there a particular boost
header I need to include to get this to work?  I get a compile error
('as' : undeclared identifier) when I try this with 'as<..." or
'boost::python::as<..." or 'boost::as<...".  Plus, my google-fu is too
clumsy to be able to google up the documentation for such a thing.


More information about the Cplusplus-sig mailing list