operator double() surprise in cxx
jdhunter at ace.bsd.uchicago.edu
Fri Apr 30 13:43:57 CEST 2004
>>>>> "Benoît" == Benoît Dejean <bnetNOSPAM at ifrance.com> writes:
>> double l( Py::Float(rect) ); double b( Py::Float(rect) );
Benoît> everything that looks/tastes/sounds like a function
Benoît> declaration is (even with parameters.
So you are saying I can do
because this could not be a function declaration so the double
constructor is called with an integer argument, but in
double l( Py::Float(rect) );
the compiler thinks I am declaring a function l that takes Py::Float*
as an argument and returns a double? Hmm. This line was inside a
class method -- I didn't think you could declare functions in a class
Still confused, but perhaps on the road to enlightenment.
More information about the Python-list