
15 Feb
2007
15 Feb
'07
3:21 p.m.
Сергей Островский wrote:
I have a problem. Here is example of my code:
Now I want to output to a stream some fields of CAddress class. I can get a reference to CAddress object with the CItem::GetAddress method. So I am writing something like it:
apReports.push_back(make_report(boost::bind(&CAddress::GetName,boost::mem_fun(&CItem::GetAddress))); apReports.push_back(make_report(boost::bind(&CAddress::GetSize,boost::mem_fun(&CItem::GetAddress)));
these 2 lines are not compiled.
Use boost::bind( &CAddress::GetName, boost::bind( &CItem::GetAddress, _1 ) )