This generalises to_interval_set so that the interval set does not need to share a
common internal map structure with interval_map. The implementation is achieved
through iteration, so there is no requirement for the old restriction.
Signed-off-by: Alex Ainscow <aainscow@uk.ibm.com>
}
return ret;
}
- template<bool strict = true>
- void to_interval_set(interval_set<K, C, strict> &set) const {
+ template<template<typename, typename, typename ...> class ISC = std::map, bool strict = true>
+ void to_interval_set(interval_set<K, ISC, strict> &set) const {
for (auto &&i: *this) {
set.insert(i.get_off(), i.get_len());
}