[C++-sig] Re: Problem with init<>
Pierre Barbier de Reuille
pierre.barbier at cirad.fr
Fri Oct 10 14:20:52 CEST 2003
Le ven 10/10/2003 à 13:48, David Abrahams a écrit :
> Pierre Barbier de Reuille <pierre.barbier at cirad.fr> writes:
>
> > I want to export some classes that takes as constructor argument, a
> > reference on an object (a non-const reference).
> >
> > The problem is that Boost.Python expect only constant reference.
>
> Why do you say that?
>
> > Is there a way to go around this limitation ?
>
> There's no limitation that prevents the passing of non-const
> references:
>
> .def(init<foo&>())
>
> works just fine.
Indeed ... I'm sorry, I forgot that I had the same error twice and I
wrote the solution you propose anly for the first one ! Then I saw the
error again and I wrote this mail ...
Thank you
--
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