[Qt5-feedback] Lambdas

Thiago Macieira thiago at kde.org
Wed Jun 29 21:54:18 CEST 2011


Em Wednesday, 29 de June de 2011, às 21:27:57, Konrad Rosenbaum escreveu:
> if(mylist.contains( [](mydata&dat){return dat.name=="hello";} ) )
>   doSomething()

Like I said, this is a job for external functions, like qFind or STL 
algorithms.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt.nokia.com/pipermail/qt5-feedback/attachments/20110629/cd995084/attachment.bin 


More information about the Qt5-feedback mailing list