[C++-sig] Re: Naming arguments of exported methods
Pierre Barbier de Reuille
pierre.barbier at cirad.fr
Thu Oct 30 11:52:39 CET 2003
Thanks, it works fine now :)
And, as Mike Rovner pointed out, the anonymous CVS of SourceForge works
well as well !
Le mer 29/10/2003 à 01:45, David Abrahams a écrit :
> Pierre Barbier de Reuille <pierre.barbier at cirad.fr> writes:
>
> > I'm trying to use the "arg" object as descibed in the CVS documentation
> > in "libs/python/doc/v2/args.html" (in your boost directory). It says not
> > to use args. But I cannot succeed in making it compile with g++-3.2
> > Instead, I have the errors put at the end of the text. For all these
> > errors, I just modified the line :
> >
> > .def( "neighbors", cg3d_neighbors)
> >
> > into :
> >
> > .def( "neighbors", cg3d_neighbors , py_arg( "cell" ) )
>
> It's a bug, which the enclosed patch fixes (yes, I'm checking it in,
> nobody needs to ask me).
>
> > I should add that I needed to define:
> >
> > typedef boost::python::arg py_arg;
> >
> > because 'arg' is already used in the STL and in boost itself. I hope
> > there is enough details.
>
> That's only because you've written using-directives to bring all those
> namespaces in without qualification (a bad idea). You can get around
> the problem by adding
>
> using boost::python::arg;
>
> inside your module initialization function.
>
>
> ______________________________________________________________________
--
Pierre Barbier de Reuille
INRA - UMR Cirad/Inra/Cnrs/Univ.MontpellierII AMAP
Botanique et Bio-informatique de l'Architecture des Plantes
TA40/PSII, Boulevard de la Lironde
34398 MONTPELLIER CEDEX 5, France
tel : (33) 4 67 61 65 77 fax : (33) 4 67 61 56 68
More information about the Cplusplus-sig
mailing list