Consider the following code:
typedef std::vector<int> cont_t; // Any container with RA-iterators
typedef cont_t::const_iterator citer_t; // Random access iterator
cont_t v(100);
const int start = 15; // start > 0.
citer_t it = v.begin() - start; // Do not use *it
int a1 = 20, b1 = 30; // a1, b1 >= start
int a2 = 30, b2 = 40; // a2, b2 >= start
int x = std::min_element(it + a1, it + b1); //
int y = std::min_element(it + a2, it + b2); //
int z = std::min_element(it + 15, it + 25); //
...
Is it possible to use the random access iterator it
out of range?