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 » Community » U++ community news and announcements » Callback: C++11 lambda support
Re: Callback: C++11 lambda support [message #42727 is a reply to message #42725] Mon, 31 March 2014 14:14 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14265
Registered: November 2005
Ultimate Member
foo.WhenAction = [$]() { foo <<= (int)~foo + 1; }

Anyway, there is still some work to be done; the main issues are overloading problems. Only Callback::operator= works so far.

The problem is that in order to capture lambda, you have to provide completely 'all-catch' template

template <class T>
void CaptureLambda(T x);

which then is causing overloading problems..

I am almost inclined to add some stronger typing via macro, like

foo <<= lambda() { foo <<= (int)~foo + 1; }

and lambda would provide a case to something more reasonable, like #define lambda (LambdaCallback)[&].
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Testing of migrated and upgraded forum
Next Topic: Development blog canceled, topics moved to "news"
Goto Forum:
  


Current Time: Mon Jul 07 12:01:45 CEST 2025

Total time taken to generate the page: 0.03015 seconds