
Thorsten Ottosen wrote:
Dear all,
I'm working on getting the indirect container library (former smart container lib) ready for a post-review.
During the review it was decided to provide overloads of assign(), insert() etc that takes a Range instead of two iterators.
That is often a problem because of multiple overloads, that is, we get ambiguity. Basically I think we got two alternatives:
1. template< class Iter > void container::assign( const iterator_range<Iter>& ); ... container c; c.assign( make_iterator_range( some_range ) );
2.
template< class Range void container::assign_range( const Range& ): .... container c; c.assign_range( some_range );
Which one do you prefer?
I definitely prefer "assign" to "assign_range". Could you say more explcitly what the ambiguity would be if you try to make assign and insert to too much work? Jonathan