std::vector<int> vec{1,2,3}; for (int* it{vec.begin()} ; it != std::prev(vec.end()) ; it++) #Do something