
18 Mar
2009
18 Mar
'09
11:19 a.m.
Sandeep Gupta wrote:
Hi, I am sure this is due to some trivial mistake; the statement to create a pointer member function insert of multi_index container fails in the following code:
typedef multi_index_container< std::pair<int,int>, indexed_by< ordered_unique<member<pair<int,int>, int, &pair<int, int>::first> > > > mic;
std::pair<mic_index::iterator, bool> (mic_index::*fn)(pair<int,int>) = &mic_index::insert; //compile error
Are you sure the pair is taken by value?