Class template common_iterator is an iterator/sentinel adaptor that is
capable of representing a non-common range of elements (where the types of the
iterator and sentinel differ) as a common range (where they are the same).
It
does this by holding either an iterator or a sentinel, and implementing the
equality comparison operators appropriately.
[Example 1: template<class ForwardIterator>void fun(ForwardIterator begin, ForwardIterator end);
list<int> s;
// populate the list susing CI = common_iterator<counted_iterator<list<int>::iterator>, default_sentinel_t>;
// call fun on a range of 10 ints
fun(CI(counted_iterator(s.begin(), 10)), CI(default_sentinel));
— end example]