On Mon, Oct 26, 2009 at 1:26 PM, Murphy, Sean M. <[email protected]> wrote:
>> 1) There is a bug (in current snapshots too) with parsing code like
> the
>> following:
>>
>> c.f()(x)(y)(z);
>>
>> But, this is legal c++.
>
> Curious question of the day, what does the above line of code do? I've
> never seen a C++ construct like that before!
c.f() returns a function pointer or a functor (either one works),
which is invoked with the parameter x; this function returns another
function pointer/functor, which is invoked with parameter y; this
function returns another pointer/functor which is invoked with
parameter z.
Basically, imagine this class:
class Functor {
public:
Functor operator()(int param);
};
/s/ Adam
_______________________________________________
Qt-creator mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt-creator