#include #include #include int main() { std::vector v { 1, 2, 3, 4 }; auto it = cbegin(v); assert(it != cend(v)); std::cout << (*it) << std::endl; ++it; assert(it != cend(v)); std::cout << (*it) << std::endl; it++; assert(it != cend(v)); std::cout << (*it) << std::endl; it = std::next(it); assert(it != cend(v)); std::cout << (*it) << std::endl; }