Skip to main content
5 events
when toggle format what by license comment
Aug 30, 2014 at 11:37 comment added M.M Maybe you could make a single version using variadic templates
May 30, 2011 at 17:42 comment added Tim Martin The handler encapsulates any function with the given number of parameters, e.g. all 1-parameter functions. You need a new version of the handler for each possible number of function arguments, but hopefully there aren't that many cases of functions with lots of parameters. I'm not sure this is the code's biggest weakness, though. :-)
May 29, 2011 at 4:17 comment added Allbite Like it, but the handler needs to encapsulate more than one function. I guess adding the concept of lamdas might allow it, but if anything inside that block happened to be a macro then the templating of it might bust if there's a macro inside the stuff it surrounds.
May 19, 2011 at 17:36 history edited Tim Martin CC BY-SA 3.0
Demonstrate how a functor solution would work.
May 19, 2011 at 17:22 history answered Tim Martin CC BY-SA 3.0