Boost logo

Boost Users :

Subject: Re: [Boost-users] [function] generalization of std::plus and std::multiplies with more than one argument type
From: Matthias Troyer (troyer_at_[hidden])
Date: 2009-10-08 11:35:21


On 08.10.2009, at 17:27, er wrote:

> 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&)
> >?
>
> You probably already know this but in my (non authoritative)
> opinion, this is as close a generalization as can be.
>

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

Matthias


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