[C++-sig] current spelling of from_python<>?

David Abrahams david.abrahams at rcn.com
Wed Jun 12 00:02:06 CEST 2002


----- Original Message -----
From: "Ralf W. Grosse-Kunstleve" <rwgk at yahoo.com>
To: <c++-sig at python.org>
Sent: Tuesday, June 11, 2002 5:55 PM
Subject: Re: [C++-sig] current spelling of from_python<>?


> --- David Abrahams <david.abrahams at rcn.com> wrote:
> > > Observations:
> > >
> > > The code as shown works with Linux/gcc304, but VC6 reports
> > > "indirect_traits.hpp(308) : error C2057: expected constant
expression."
> > > arg_from_python<container_element_type> also works with Linux/gcc304,
but
> > VC6
> > > reports "fatal error C1001: INTERNAL COMPILER ERROR."
> > > Should/could I use a different approach for testing convertibility
that
> > VC6
> > > might not choke on?
> >
> > Try breaking up the definition of value into little steps so that the
> > expression is simpler.
>
> Indeed,
>
>         PyObject* ti = t[i].get();
>         arg_from_python<container_element_type const&> from_py(ti);
>
> works! That was just too obvious.

That wasn't what I had in mind; I was looking at the definition of "value"
in indirect_traits.hpp... but, whatever.






More information about the Cplusplus-sig mailing list