//en.cppreference.com/w/cpp/io/cout) << rem << '{'; 
        for (char o[]{0,' ',0}; auto const& e : r)
            [std::cout](http://en.cppreference.com/w/cpp/io/cout) << o << e, *o = ',';
        [std::cout](http://en.cppreference.com/w/cpp/io/cout) << "}\n";
    }
     
    int main()
    {
        auto v1 = [std::vector](http://en.cppreference.com/w/cpp/container/vector)<float>{1, 2, 3};
        auto v2 = [std::list](http://en.cppreference.com/w/cpp/container/list)<short>{1, 2, 3, 4};
        auto v3 = [std::to_array](http://en.cppreference.com/w/cpp/container/array/to_array)({1, 2, 3, 4, 5});
     
        auto add = [](auto a, auto b, auto c) { return a + b + c; };
     
        auto sum = std::views::zip_transform(add, v1, v2, v3);
     
        print("v1:  ", v1);
        print("v2:  ", v2);
        print("v3:  ", v3);
        print("sum: ", sum);
    }

Output:

    
    
    v1:  {1, 2, 3}
    v2:  {1, 2, 3, 4}
    v3:  {1, 2, 3, 4, 5}
    sum: {3, 6, 9}

###  [ [ edit
](/mwiki/index.php?title=cpp/ranges/zip_transform_view&action=edit&section=8
"Edit section: See also") ]  See also

[ ranges::zip_view  views::zip  ](/w/cpp/ranges/zip_view "cpp/ranges/zip view") (C++23)  |  a [ ` view ` ](/w/cpp/ranges/view "cpp/ranges/view") consisting of tuples of references to corresponding elements of the adapted views   
(class template)  (customization point object)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/ranges/dsc_zip_view&action=edit)  
---|---  
[ ranges::transform_view  views::transform  ](/w/cpp/ranges/transform_view "cpp/ranges/transform view") (C++20)  |  a [ ` view ` ](/w/cpp/ranges/view "cpp/ranges/view") of a sequence that applies a transformation function to each element   
(class template)  (range adaptor object)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/ranges/dsc_transform_view&action=edit)  
[ ranges::elements_view  views::elements  ](/w/cpp/ranges/elements_view "cpp/ranges/elements view") (C++20)  |  takes a [ ` view ` ](/w/cpp/ranges/view "cpp/ranges/view") consisting of [ ` _tuple-like_ ` ](/w/cpp/utility/tuple/tuple-like "cpp/utility/tuple/tuple-like") values and a number N and produces a [ ` view ` ](/w/cpp/ranges/view "cpp/ranges/view") of N  th  element of each tuple   
(class template)  (range adaptor object)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/ranges/dsc_elements_view&action=edit)  
  
Retrieved from " [
https://en.cppreference.com/mwiki/index.php?title=cpp/ranges/zip_transform_view&oldid=168758
](https://en.cppreference.com/mwiki/index.php?title=cpp/ranges/zip_transform_view&oldid=168758)
"

#####  Navigation

  * [ Support us ](http://www.cppreference.com/support)
  * [ Recent changes ](/w/Special:RecentChanges "A list of recent changes in the wiki \[r\]")
  * [ FAQ ](/w/Cppreference:FAQ)
  * [ Offline version ](/w/Cppreference:Archives)

#####  Toolbox

  * [ What links here ](/w/Special:WhatLinksHere/cpp/ranges/zip_transform_view "A list of all wiki pages that link here \[j\]")
  * [ Related changes ](/w/Special:RecentChangesLinked/cpp/ranges/zip_transform_view "Recent changes in pages linked from this page \[k\]")
  * [ Upload file ](http://upload.cppreference.com/w/Special:Upload "Upload files \[u\]")
  * [ Special pages ](/w/Special:SpecialPages "A list of all special pages \[q\]")
  * [ Printable version ](/mwiki/index.php?title=cpp/ranges/zip_transform_view&printable=yes "Printable version of this page \[p\]")
  * [ Permanent link ](/mwiki/index.php?title=cpp/ranges/zip_transform_view&oldid=168758 "Permanent link to this revision of the page")
  * [ Page information ](/mwiki/index.php?title=cpp/ranges/zip_transform_view&action=info)

  * In other languages 

  * [ Deutsch ](http://de.cppreference.com/w/cpp/ranges/zip_transform_view "cpp/ranges/zip transform view")
  * [ Español ](http://es.cppreference.com/w/cpp/ranges/zip_transform_view "cpp/ranges/zip transform view")
  * [ Français ](ht