
interval_set has overloaded insert methods for both intervals and
elements. Is there a reason there insert iterator lacks this ability.
The line in the code below *itr = 4; fails to compile.
This could be made to compile by:
- adding an implicit constructor 'interval( const element& )' for the
underlying (discrete) intervals, initializing to [element, element+1),
or [element, element].
- adding an overloaded operator=( const element& )
- adding an element_insert_iterator class
I've encountered 2 domains now where I need to construct an
interval_set<int> from a range of ints. The most natural ways to
accomplish this (for me) are:
boost::copy( ints, inserter(int_interval_set) );
or
boost::copy_range