Boost logo

Boost Users :

Subject: Re: [Boost-users] [function] generalization of std::plus and std::multiplies with more than one argument type
From: Joel Falcou (joel.falcou_at_[hidden])
Date: 2009-10-16 06:18:09


alfa wrote:
> 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?

As a part of my workj on Boost.SIMD, i have a generlized fucntor with
result_of protocol support and tag-dispatching.

Basically :

functor<plus>()(x,y)

return the sum of x and y for the correct semantic of + for the type of
x and y.

result_of<functor<plus>(X,Y)>::type returns it result type.

Is that smthg like that you need ?


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