
OvermindDL1 wrote:
Gevorg Voskanyan wrote:
Andrej,
You might try using lambda::bind, which does seem to support functions with up to 10 parameters.
Or phoenix::bind which is configurable by a macro definition.
Yes, PHOENIX_LIMIT is by default 10 so in this case it should work out of the box as well. I once needed to bind a function taking 12 parameters, so neither boost::bind nor boost::lambda::bind were able to help me in that. I turned to phoenix hoping it will do the job as it is configurable, but unfortunately I got compiler errors after defining PHOENIX_LIMIT or PHOENIX_COMPOSITE_LIMIT to anything greater than 10. I was then in a hurry so workarounded the problem by packing about half of the arguments in a dummy struct, creating a wrapper function taking the struct and the other parameters, and then binding that wrapper function with a struct instance and the rest of the arguments. I don't remember what and where exactly the error was, but it was with boost 1.38, so it might have got better since then. Gevorg