|
Boost Users : |
Subject: Re: [Boost-users] Annoying coding
From: Maxim Koshelev (chuchelo_at_[hidden])
Date: 2009-01-20 09:53:26
> The Lambda version would be similar, just replacing the outer bind with
> infix notation
>
> #include "boost/lambda/lambda.hpp"
> #include "boost/lambda/bind.hpp"
>
> using namespace boost::lambda;
>
> std::accumulate( begin, end, _1 + bind(&A::a, _2 ));
>
> Again untested.
this std::accumulate return complicated lambda function, but not int value :-)
May be we need to use boost::ref?
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