[range.zip.transform.view]

# 25 Ranges library [[ranges]](./#ranges)

## 25.7 Range adaptors [[range.adaptors]](range.adaptors#range.zip.transform.view)

### 25.7.26 Zip transform view [[range.zip.transform]](range.zip.transform#view)

#### 25.7.26.2 Class template zip_transform_view [range.zip.transform.view]

[ð](#lib:zip_transform_view)

namespace std::ranges {template<[move_constructible](concept.moveconstructible#concept:move_constructible "18.4.13 Concept move_­constructible [concept.moveconstructible]") F, [input_range](range.refinements#concept:input_range "25.4.6 Other range refinements [range.refinements]")... Views>requires ([view](range.view#concept:view "25.4.5 Views [range.view]")<Views> && ...) && (sizeof...(Views) > 0) && is_object_v<F> &&[regular_invocable](concept.regularinvocable#concept:regular_invocable "18.7.3 Concept regular_­invocable [concept.regularinvocable]")<F&, range_reference_t<Views>...> &&[*can-reference*](iterator.synopsis#concept:can-reference "24.2 Header <iterator>&nbsp;synopsis [iterator.synopsis]")<invoke_result_t<F&, range_reference_t<Views>...>>class zip_transform_view : public view_interface<zip_transform_view<F, Views...>> {*movable-box*<F> *fun_*; // *exposition only* zip_view<Views...> *zip_*; // *exposition only*using *InnerView* = zip_view<Views...>; // *exposition only*template<bool Const>using *ziperator* = iterator_t<*maybe-const*<Const, *InnerView*>>; // *exposition only*template<bool Const>using *zentinel* = sentinel_t<*maybe-const*<Const, *InnerView*>>; // *exposition only*// [[range.zip.transform.iterator]](range.zip.transform.iterator "25.7.26.3 Class template zip_­transform_­view​::​iterator"), class template zip_transform_view​::​*iterator*template<bool> class *iterator*; // *exposition only*// [[range.zip.transform.sentinel]](range.zip.transform.sentinel "25.7.26.4 Class template zip_­transform_­view​::​sentinel"), class template zip_transform_view​::​*sentinel*template<bool> class *sentinel*; // *exposition only*public: zip_transform_view() = default; constexpr explicit zip_transform_view(F fun, Views... views); constexpr auto begin() { return *iterator*<false>(*this, *zip_*.begin()); }constexpr auto begin() constrequires [range](range.range#concept:range "25.4.2 Ranges [range.range]")<const *InnerView*> &&[regular_invocable](concept.regularinvocable#concept:regular_invocable "18.7.3 Concept regular_­invocable [concept.regularinvocable]")<const F&, range_reference_t<const Views>...> {return *iterator*<true>(*this, *zip_*.begin()); }constexpr auto end() {if constexpr ([common_range](range.refinements#concept:common_range "25.4.6 Other range refinements [range.refinements]")<*InnerView*>) {return *iterator*<false>(*this, *zip_*.end()); } else {return *sentinel*<false>(*zip_*.end()); }}constexpr auto end() constrequires [range](range.range#concept:range "25.4.2 Ranges [range.range]")<const *InnerView*> &&[regular_invocable](concept.regularinvocable#concept:regular_invocable "18.7.3 Concept regular_­invocable [concept.regularinvocable]")<const F&, range_reference_t<const Views>...> {if constexpr ([common_range](range.refinements#concept:common_range "25.4.6 Other range refinements [range.refinements]")<const *InnerView*>) {return *iterator*<true>(*this, *zip_*.end()); } else {return *sentinel*<true>(*zip_*.end()); }}constexpr auto size() requires [sized_range](range.sized#concept:sized_range "25.4.4 Sized ranges [range.sized]")<*InnerView*> {return *zip_*.size(); }constexpr auto size() const requires [sized_range](range.sized#concept:sized_range "25.4.4 Sized ranges [range.sized]")<const *InnerView*> {return *zip_*.size(); }}; template<class F, class... Rs> zip_transform_view(F, Rs&&...) -> zip_transform_view<F, views::all_t<Rs>...>;}

[ð](#lib:zip_transform_view,constructor)

`constexpr explicit zip_transform_view(F fun, Views... views);
`

[1](#1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/ranges.tex#L12112)

*Effects*: Initializes *fun_* with std​::​move(fun) and*zip_* with std​::​move(views)...[.](#1.sentence-1)
