counted_iterator

counted_iterator (개수 제한 반복자)

std::counted_iterator는 정해진 개수만큼만 순회하도록 하는 반복자 어댑터예요. C++20에서 추가됐어요.

출처: cppreference

본문

std::counted_iterator는 시작 반복자와 개수를 기억해 최대 그만큼만 순회해요.

template< class I >
class counted_iterator;

남은 개수(count())를 셀 수 있어요.

더 알아보기 (Learn more)

cppreference