Boost logo

Boost :

Subject: Re: [boost] [functional] New functor adaptors
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2013-09-12 08:08:21


On Thu, Sep 12, 2013 at 4:03 PM, Tigran Hayrapetyan
<tigran.human_at_[hidden]>wrote:

> Hello,
>
> Suppose we want to transform sequence of integers by doubling and adding 5
> to each value (x = 2*x + 5 for all x in sequence). If using std::transform,
> then we need a functor which will for given "x" return "2*x + 5". My
> question is - is it possible to do it in C++98 style (without lambda
> expressions), and without writing additional functor class?
>

I think, Boost.Phoenix is what you're looking for.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk