next

next (다음 반복자)

std::next()은 반복자를 n만큼 전진시킨 복사본을 돌려줘요. 원본은 바꾸지 않아요.

출처: cppreference

본문

std::nextitn(기본 1)만큼 전진시킨 반복자를 새로 반환해요.

template< class InputIt >
InputIt next( InputIt it, typename std::iterator_traits<InputIt>::difference_type n = 1 );

std::advance의 비파괴 버전이에요.

더 알아보기 (Learn more)

cppreference