
2009/9/25 Jeff Flinn <TriumphSprint2000@hotmail.com>:
Jeff Flinn wrote:
Ok, I get an "ambiguous use of partial specialization" compiler error when I add the last line below:
{ typedef boost::itl::interval_map<int, int> OverlapCounterT;
OverlapCounterT overlap_counter; boost::itl::interval<int> itv; itv = boost::itl::interval<int>::rightopen(4,8);
overlap_counter += std::make_pair(boost::itl::interval<int>::rightopen(4,8), 1); }
the compiler error text is:
Error : ambiguous use of partial specialization (point of instantiation: 'CoverageGraphIntervalsTest::testTopology()') (instantiating: 'boost::enable_if<boost::itl::is_intra_derivative<boost::itl::interval_map<int, . . .
well I have studied the tiny error message. As far as I can see the instantiations that are given are correct, they should lead to the right instantiation result and there is no hint from the warrior what exactly is ambiguous to him. It's a little depressing to see how much compilers can disagree, specifically in this enable_if SFINAE minefield. In other words, I don't have a quick fix that I can offer here. What you can try, to get the example running, is to apply member function add overlap_counter.add(std::make_pair(boost::itl::interval<int>::rightopen(4,8), 1)); instead of the overloaded operator +=. Regards Joachim