Namespaces
Variants

std::ranges::transform_view<V,F>::iterator<Const>::operator[]

cppreference.net에서 가져옴
 
 
Ranges 라이브러리
Range 어댑터
 
 
constexpr decltype(auto) operator[]( difference_type n ) const
  requires ranges::random_access_range<Base>;
(C++20부터)

변환 후, 지정된 상대 위치의 요소를 반환합니다.

실질적으로 std::invoke(*parent_->fun_, current_[n])를 반환합니다. 여기서 *parent_->fun_는 부모 transform_view에 저장된 변환 함수이고, current_는 V의 기본 반복자입니다.

매개변수

n - 현재 위치 기준 상대적 위치.

반환값

변환된 요소

예제