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!
为此,聚合类必须具有operator +,可能您已为std :: set定义了where运算符+。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.