D24262: Modernize code: use range-based loops & algorithms in more places

Friedrich W. H. Kossebau noreply at phabricator.kde.org
Sat Sep 28 15:27:26 BST 2019


kossebau added inline comments.

INLINE COMMENTS

> kossebau wrote in plugin.cpp:196
> Meh, I need to check quite some code of mine then, I got that wrong and thought that the values of the actual variables listed are captured (i.e. for a reference type the reference "pointer"), and not that some kind of interpretation happens here.
> I unsure I understood the link (and other search hits I tried so far) and wonder, what actually is the type of `library` then in the lambda? A const reference, to a copy of the originally referenced object?

Confirmed by experiments. Still not yet found a document where explicitly it is mentioned that the copy constructor will be invoked to generate a copy of the object for any captured variables only being of type reference, so if anyone can point out one which reads this clearly to me, happy to get a reference to, so I can try to do a copy of that referenced document into my brain lambda :)

REPOSITORY
  R306 KParts

REVISION DETAIL
  https://phabricator.kde.org/D24262

To: kossebau, dfaure
Cc: dhaumann, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190928/63b12546/attachment.html>


More information about the Kde-frameworks-devel mailing list