0

I have code like:

   int c1 = 1; set<int> s1; s1.insert(c1); // Add a number to a set
   interval_map< date, set<int> > cmap; // Declare an interval_map
   discrete_interval<date> range1 = discrete_interval<date>::closed(from_string("2012-01-01"), from_string("2012-01-30")); // Define the interval
   cmap += make_pair(range1, s1); // Associate the interval with the set

This works well.

But boost complains if I change the 'set' to a 'list' in the above code.

Is only the 'set' supported as a value?

Thanks!

user1259642
  • 671
  • 1
  • 7
  • 5

1 Answers1

0

To do so an aggregate class has to have operator+, probably you have defined some where operator+ for std::set.

Andrey Kartashov
  • 1,368
  • 1
  • 12
  • 20