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 » callback1 vs callback2
callback1 vs callback2 [message #15281] Tue, 15 April 2008 14:28 Go to previous message
captainc is currently offline  captainc
Messages: 278
Registered: December 2006
Location: New Jersey, USA
Experienced Member
Why can I do this:
void CBTestFunc2(String foo, String bar){
    Cout() << foo << " " << bar << "\n;"
}

Callback1<String> cb1 = callback1(&CBTestFunc2, "parameter 2"));
cb1("parameter 1");


But not:
void CBTestFunc3(String one, String two, String three){
    Cout() << Format("%s %s %s", one, two, three);
}

Callback1<String> cb2 = callback2(&CBTestFunc3, "two", "three");
cb2("one");


?

The error is: Could not deduce template argument for Upp::Callback2<P1,P2>
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Setting a Gate argument.
Next Topic: Is there an easy way to leverage callback into multi-cast delegate?
Goto Forum:
  


Current Time: Wed Sep 30 01:05:15 CEST 2020

Total time taken to generate the page: 0.06171 seconds