[range.zip.transform.overview]

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

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

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

#### 25.7.26.1 Overview [range.zip.transform.overview]

[1](#1)

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

zip_transform_view takes an invocable object and
any number of views and
produces a view
whose Mth element is
the result of applying the invocable object
to the Mth elements of all views[.](#1.sentence-1)

[2](#2)

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

The name views​::​zip_transform denotes
a customization point object ([[customization.point.object]](customization.point.object "16.3.3.3.5 Customization Point Object types"))[.](#2.sentence-1)

Let F be a subexpression, and
let Es... be a pack of subexpressions[.](#2.sentence-2)

- [(2.1)](#2.1)

  If Es is an empty pack,
let FD be decay_t<decltype((F))>[.](#2.1.sentence-1)

  * [(2.1.1)](#2.1.1)

If [move_constructible](concept.moveconstructible#concept:move_constructible "18.4.13 Concept move_­constructible [concept.moveconstructible]")<FD> &&[regular_invocable](concept.regularinvocable#concept:regular_invocable "18.7.3 Concept regular_­invocable [concept.regularinvocable]")<FD&> is false, or
if decay_t<invoke_result_t<FD&>> is not an object type,views​::​zip_transform(F, Es...) is ill-formed.

  * [(2.1.2)](#2.1.2)

Otherwise, the expression views​::​zip_transform(F, Es...) is expression-equivalent to((void)F, auto(views::empty<decay_t<invoke_result_t<FD&>>>))

- [(2.2)](#2.2)

  Otherwise, the expression views​::​zip_transform(F, Es...) is expression-equivalent to zip_transform_view(F, Es...)[.](#2.2.sentence-1)

[3](#3)

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

[*Example [1](#example-1)*: vector v1 = {1, 2};
vector v2 = {4, 5, 6};

for (auto i : views::zip_transform(plus(), v1, v2)) { cout << i << ' '; // prints 5 7} â *end example*]
