
On Tue, Dec 14, 2010 at 2:49 PM,
Hello,
Could someone tell me why this code does not compile? Can it be modified in order to compile?
struct CcyCplEventKey { CurrencyCouple CcyCpl; EventType Event; }
typedef std::map
mapType; mapType ccyOut;
std::for_each(ccyOut.begin(), ccyOut.end(), (&*boost::lambda::_1)->*&CcyCplEventKey::Event);
Cheers
Ummm - for a start, a std::map iterator references a std::pair containing the key and value for that map entry, so you need to get hold of the 'first' member of the std::pair to use the key. Without type definitions for EventType, CurrencyEventPtr and CurrencyCouple, it's difficult to go further than that... Stuart Dootson