$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
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.