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++ Core » How to bind parameter to PostCallback with Function, Event object (Problem with binding to PostCallback)
How to bind parameter to PostCallback with Function, Event object [message #47911] Sat, 22 April 2017 23:10
Klugier is currently offline  Klugier
Messages: 1075
Registered: September 2012
Location: Poland, Kraków
Senior Contributor
Hello,

I forced problem when compiling Unique from bazaar. The problem is that I can not bind Event to Post callback. Here is the problem:
Event<const Vector<String>&> WhenInstance; // Class member

PostCallback(WhenInstance, v); // How to post that callback, do i need something like std::bind?


All help is welcome Smile

__________________________________________________
Solution:
PostCallback([=, &v]() { WhenInstance(v); } );


Sincerely,
Klugier


U++ - one framework to rule them all.

[Updated on: Sat, 22 April 2017 23:54]

Report message to a moderator

Previous Topic: U++ can't handle float to string and back for large numbers
Next Topic: Cannot use Format for unsigned int
Goto Forum:
  


Current Time: Thu Mar 28 14:10:18 CET 2024

Total time taken to generate the page: 0.00825 seconds