added is_out_of_bounds<T>(const std::vector<T>&, int)