|
Boost Users : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2007-02-15 18:57:57
Sergey Ostrovskiy wrote:
> Now I want to write something more difficult:
>
> apReports.push_back(make_report(boost::lambda::bind(&CItem::GetItemCount)*boost::lambda::bind((&CItem::GetItemBytes)));
boost::lambda::bind(&CItem::GetItemCount, _1) *
boost::lambda::bind((&CItem::GetItemBytes, _1)
> or
>
> apReports.push_back(make_report(boost::lambda::bind(&CItem::GetItemCount)*100.0/boost::lambda::bind((&CItem::GetTotalCount)));
boost::lambda::bind(&CItem::GetItemCount,
_1)*100.0/boost::lambda::bind((&CItem::GetTotalCount, _1)
but, depending on your argument type, it may need further fixes, such as
using *_1 instead. lambda::bind doesn't handle smart pointers as 'this'
well.
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