Hi,
I'm trying to implement an interval map where the keys are close_interval<long> an the values are set<string>.
I modified the party example according to my needs, and came up with this short code:
#include
#include
#include
using namespace std;
using namespace boost::icl;
typedef std::set<string> ids;
int main(int argc, char* argv[])
{
ids ids1;
ids1.insert("T1");
ids ids2;
ids2.insert("T2");
interval_map mymap;
closed_interval<long> i1 = closed_interval<long>(2, 7);
closed_interval<long> i2 = closed_interval<long>(3, 8);
mymap.insert(std::pair(i1,ids1));
mymap.insert(std::pair(i2,ids2));
return 0;
}
However, I get this compilation error:
call of overloaded ‘insert(std::pair >)’ is ambiguous
mymap.insert(std::pair(i2,ids2));
This is after getting compiation errors trying ti use:
mymap += make_pair(i1,ids1);
Any idea what's wrong?