Boost logo

Boost Users :

Subject: Re: [Boost-users] Using boost to eliminate an ugly facade function
From: Chris Stankevitz (chrisstankevitz_at_[hidden])
Date: 2012-08-29 15:05:40


On Wed, Aug 29, 2012 at 11:50 AM, Igor R <boost.lists_at_[hidden]> wrote:
> Although this is not an answer to your question, but if you have c++11
> compiler, you can make a lambda:
> Company.BossHired.connect([&Processor](const CPerson& Person) {
> Processor.f(Person.GetAge()); });

Igor,

Thank you for the idea and especially writing out the solution. I am
not using c++11, but I have the option as I am using a newer gcc. In
this simple case a nested bind (as described by Steven) looks simpler.
 However, I can imagine a more complicated case that might lend itself
to a c++11 lambda.

Thank you,

Chris


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