Listing 3
// Method 1. Complicated. You always need to remember
// the container_type or the iterator_type
for ( crange<vector> r(int_v); r; ++r) ++(*r);
for ( crange<deque> r(int_d); r; ++r) ++(*r);
for ( crange<list> r(int_l); r; ++r) ++(*r);
// Method 2. Simple. You need to remember only the element type,
// not caring about the underlying type of its container
// (This plays excellent with iterator composition as well)
for ( crange<int> r(int_v); r; ++r) ++(*r);
for ( crange<int> r(int_d); r; ++r) ++(*r);
for ( crange<int> r(int_l); r; ++r) ++(*r);