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

Friedrich W. H. Kossebau noreply at phabricator.kde.org
Sat Sep 28 23:57:53 BST 2019


kossebau added a comment.


  Thanks for your teaching, appreciated :) Will have another look again when not tired. Just tried again to read on cppreference.com the stuff about lambda capturing, but still not digested what I read this afternoon, reread  now did not help. So next try scheduled.
  
  So far my thinking was, given some variables in the scope `Type& ref; Type* pointer; Type type;`,
  it would be for [&]
  
    class Closure {
        bool operator() const { return ...; }
        Type&& ref; // yes, no idea if this even is supported by C++, that was just my mind model
        Type*& pointer;
        Type& type;
    };
  
  and it would be for [=]
  
    class Closure {
        bool operator() const { return ...; }
        Type& ref;
        Type* pointer;
        Type type;
    };
  
  So seems I have to rewrite my mind model for the type of `ref`.

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/f016fb43/attachment.html>


More information about the Kde-frameworks-devel mailing list