range
컨테이너 전체를 알고리즘에 넘깁니다.
std::ranges::sort(numbers)
begin/end 쌍을 직접 넘기는 대신, 전체 범위에 필터와 변환 뷰를 겹쳐 원본을 바꾸지 않는 파이프라인을 만듭니다.
컨테이너 전체를 알고리즘에 넘깁니다.
std::ranges::sort(numbers)
필요한 원소만 지연 평가로 걸러냅니다.
views::filter(even)
복사본을 만들기보다 읽을 때 변환합니다.
views::transform(+10)
반복할 때 필요한 값만 실제로 계산됩니다.
for (int n : pipe)