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

Ahmad Samir noreply at phabricator.kde.org
Sun Sep 29 00:01:39 BST 2019


ahmadsamir added a comment.


  @kossebau: did you try the C++ Standard (working draft): https://isocpp.org/blog/2013/10/n3797-working-draft-standard-for-programming-language-c-stefanus-du-toit
  
  This ^ one is circa 2012.
  
  All the sources used to generate the C++ Standard drafts are maintained in this git repo:
  https://github.com/cplusplus/draft
  
  (Reading the standard feels like reading legalese, but it's quite informative albeit very^Wslightly mind boggling).
  
  Sorry if this is off-topic.

INLINE COMMENTS

> kossebau wrote in plugin.cpp:196
> 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 :)

> An entity is captured by copy if it is implicitly captured and the capture-default is = or if it is explicitly
>  captured with a capture that does not include an &. For each entity captured by copy, an unnamed non-
>  static data member is declared in the closure type. The declaration order of these members is unspecified.
>  The type of such a data member is the type of the corresponding captured entity if the entity is not a
>  reference to an object, or the referenced type otherwise. [ Note: If the captured entity is a reference to a
>  function, the corresponding data member is also a reference to a function. — end note ]



> An entity is captured by reference if it is implicitly or explicitly captured but not captured by copy. It is
>  unspecified whether additional unnamed non-static data members are declared in the closure type for entities
>  captured by reference.

REPOSITORY
  R306 KParts

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

To: kossebau, dfaure
Cc: ahmadsamir, 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/09293333/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list