Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Callbacks and Timers » THISBACK1 works well, how can i make it with lambda
Re: THISBACK1 works well, how can i make it with lambda [message #48336 is a reply to message #48322] Sat, 24 June 2017 14:58 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Oblivion wrote on Thu, 22 June 2017 11:36

butonlar[i]<<[&]{ btnDuzenle(&butonlar[i]); }; // this should work, since butonlar[] is a member of AnaForm class.



Careful here! Do you really want to capture i by reference?

Personally, I believe that the use [&] should be restrict only for cases where lambda is used as 'local function' (not stored anywehere).
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: callbacks freeze gui
Next Topic: About storing references and pointers to callbacks.
Goto Forum:
  


Current Time: Sat Apr 27 19:59:32 CEST 2024

Total time taken to generate the page: 0.04223 seconds