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 » "Function" question
Re: "Function" question [message #47715 is a reply to message #47714] Thu, 09 March 2017 17:52 Go to previous messageGo to previous message
koldo is currently offline  koldo
Messages: 3443
Registered: August 2008
Senior Veteran
Replacing

MySource(double data) : FuncSource(&Calc), data(data) {}  // COMPILER ERROR

with
MySource(double data) : FuncSource([=](double x) {return Calc(x);}), data(data) {}
it compiles, but at run time when Calc() have to be used, it has been destroyed.


Best regards
IƱaki
 
Read Message
Read Message
Read Message
Previous Topic: Event.execute
Next Topic: PostCallback in constructor
Goto Forum:
  


Current Time: Wed Aug 27 01:04:16 CEST 2025

Total time taken to generate the page: 0.05235 seconds