Boost logo

Boost Users :

Subject: Re: [Boost-users] [function] generalization of std::plus and std::multiplies with more than one argument type
From: alfC (alfredo.correa_at_[hidden])
Date: 2009-10-16 03:17:16


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<Tp(const Tp&,const Tp&)
> > >?

what is "ll_static_cast<Tp>"? after that part I got lost.

> I had such a class in our libraries, but threw it out and replaced it  
> with lambda expressions

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?

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


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net