Drinks coffee, re-reads docs, and problem solved. ForEachCollectionInChannels(pAmp,bind(ForEachProperty,_1,protect(bind(&CalcP ropCurValMaxWidth,_1,var(m_ChanCols))))); Cheers, Richard.
-----Original Message----- From: Richard Crossley [mailto:rdc@rdcdesign.com] Sent: 18 July 2003 11:26 To: Boost-Users@yahoogroups.com Subject: [Boost-Users] Bind To Lambda
Hi,
I'm trying merge some code some of which uses a mixture of BB and BLL to just use the BLL under VC7.1. Having changed some 200 expressions without incident if find I can't see the wood for the trees here.
The existing code, working with BB, is;
typedef boost::function
FECCFunc; void ForEachCollectionInChannels(IAmplifier* pIAmp,FECCFunc const & fec); typedef boost::function
FEPFunc; void ForEachProperty(ICollection* pCollection,FEPFunc const & fep); void CalcPropCurValMaxWidth(IProperty* pProp,CColumnMap& map);
...
void Problem() { CColumnMap m_ChanCols; IAmplifier* pIAmp; ForEachCollectionInChannels(pAmp,bind(ForEachProperty,_1,cref( bind(&CalcProp CurValMaxWidth,_1,ref(m_ChanCols)))); //Here }
What's the equivalent with using BLL?
Thanks,
Richard.