std::next and std::prev are C++11 iterator utilities that return the succeeding or preceding iterator.
If the provided iterator models random access, the operation will be constant, even if a custom distance is specified.
Click to open in Compiler Explorer.
Leave a comment
not known much but this is super useful!