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

Reply via email to