[Qt5-feedback] Lambdas

joao.abecasis at nokia.com joao.abecasis at nokia.com
Mon Jun 27 17:15:19 CEST 2011


FWIW,

We can code support for lambdas without using any C++11-specific features:

    template <class Sequence, class Functor>
    Sequence filter(const Sequence &, Functor f);

, will take a function pointer, a functor (object) or a lambda function all the same. With things like Boost.Lambda or Boost.Phoenix, you even have some variation of lambdas in C++03-supporting compilers.

With things like that we can improve support for lambdas where it makes sense in the API (e.g. QThread, QRunnable and QtConcurrent). I don't, however see us adding a lot of functional stuff to the container classes as has been discussed elsewhere on this list.

Cheers,


João

________________________________________
From: qt5-feedback-bounces+joao.abecasis=nokia.com at qt.nokia.com [qt5-feedback-bounces+joao.abecasis=nokia.com at qt.nokia.com] On Behalf Of Poenitz Andre (Nokia-MP-Qt/Berlin)
Sent: 27 June 2011 10:52
To: qt5-feedback at qt.nokia.com
Subject: Re: [Qt5-feedback] Lambdas

On Monday 27 June 2011 10:33:08 ext Ivan Cukic wrote:
> Hi all,
>
> There was a discussion about one of the C++'s new features - namely
> lambdas with a conclusion that it'd be nice, but nothing specific was
> decided.
>
> I'm suggesting to create a 'working group' for this so that we can see
> what do people want and how to do it / where to stop and say 'this is
> enough'
>
> I'm mostly interested in adding methods for Qt's collections (mapping,
> filtering, folding... and stuff commonly found in functional pls)
>
> I guess we'd need some place to put the proposals, discuss them, and so on
> without making noise on this list.
>
> Any thoughts?

I think it boils down to the question

   Does Qt 5 have to support compilers that don't "do" C++0x ?

If yes, then we are basically back to the VC6 times when the interface was
sprinkled with #ifdef's due to the missing member template support there.

Andre'
_______________________________________________
Qt5-feedback mailing list
Qt5-feedback at qt.nokia.com
http://lists.qt.nokia.com/mailman/listinfo/qt5-feedback


More information about the Qt5-feedback mailing list