[C++-sig] call policies

Ricardo Kirkner ricardokirkner at gmail.com
Tue Nov 8 00:42:21 CET 2005


Ok... thanks for the reply...

How will boost.python figure out that the corresponding method for

.def(self_ns::str(self))

should be (for example)

std::ostream& operator<< (in the c++ code)

?

I will try to skip pyste, and code directly in boost, as to have less
code levels to deal with...

ricardo

On 11/7/05, Ralf W. Grosse-Kunstleve <rwgk at yahoo.com> wrote:
> --- Ricardo Kirkner <ricardokirkner at gmail.com> wrote:
> > Thank you, this worked... however, pyste is still complaining about my
> > method (the one that returned a double*) returns a pointer, and has no
> > policy defined -- although this method now uses a wrapper which does
> > not return a pointer but a tuple...
> >
> > On the other hand, I have read that the operator << should be replaced
> > by the str function. However,
> >
> > 1. pyste isn't doing it.. (might be a thing with pyste)
>
> Sorry, I never used Pyste. I hope someone else can help.
>
> > 2. when I replace that operator with .def( str( self ) ), compilation fails
> > with
>
> IIRC some compilers have issues with the name lookup. You could try
>
>   .def(self_ns::str(self))
>
> I believe.
>
>
>
>
> __________________________________
> Start your day with Yahoo! - Make it your home page!
> http://www.yahoo.com/r/hs
> _______________________________________________
> 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