
alfC wrote:
thank you er and Mathias for your answers,
alfC wrote:
Does Boost have a generalization of std::plus and std::multiplies (std_function.hpp)? How about the boost::lambda arithmetic operators, possibly in combination with ll_static_cast<Tp>, and -if necessary- put the result in the functor wrapper boost::function
what is "ll_static_cast<Tp>"? after that part I got lost.
the cast was in mind to allow for an argument that is convertible to but not necessarily equal to Tp.
but I need this generalization of multiplies as one of the default parameter of a template, how would you pass a lambda expression as template parameter?
Since you insist on a template parameter,
template
The reason I returned to my post is that today I found boost/mpl/ plus.hpp and boost/mpl/multiplies.hpp which seem to answer the first part of my question (although not the syntactic sugar part).
Thank you, Alfredo