operator double() surprise in cxx
Isaac To
kkto at csis.hku.hk
Fri Apr 30 04:32:00 EDT 2004
>>>>> "Benoît" == Benoît Dejean <bnetNOSPAM at ifrance.com> writes:
Benoît> Le Thu, 29 Apr 2004 21:35:51 -0500, John Hunter a écrit :
>> I am using pycxx 5.2.2 to generate some extension code. I want to
>> extract some doubles from some python sequences
>>
>> When I do
>>
>> double l( Py::Float(rect[0]) ); double b( Py::Float(rect[1]) );
Benoît> everything that looks/tastes/sounds like a function declaration
Benoît> is (even with parameters.
Is it really a bug in g++? No matter how I look at
Py::Float(rect[0])
it does not look like a type "Py::Float*" that is indicated by the error
message. Perhaps it looks like a (Py::Float (*) (rect*)) if g++ think that
rect is a type instead of a variable, but does it really know some type
called rect, and if not, why no error about unknown type on the "function
declaration"?
Regards,
Isaac.
More information about the Python-list
mailing list