overload
        for (auto s : std::views::repeat("I know that you know that"sv)
                    | std::[views::take](http://en.cppreference.com/w/cpp/ranges/take_view)(3))
            [std::cout](http://en.cppreference.com/w/cpp/io/cout) << s << ' ';
        [std::cout](http://en.cppreference.com/w/cpp/io/cout) << "...\n";
    }

Output:

    
    
    C++ C++ C++
    I know that you know that I know that you know that I know that you know that ...

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

[ ranges::iota_view  views::iota  ](/w/cpp/ranges/iota_view "cpp/ranges/iota view") (C++20)  |  a [ ` view ` ](/w/cpp/ranges/view "cpp/ranges/view") consisting of a sequence generated by repeatedly incrementing an initial value   
(class template)  (customization point object)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/ranges/dsc_iota_view&action=edit)  
---|---  
  
Retrieved from " [
https://en.cppreference.com/mwiki/index.php?title=cpp/ranges/repeat_view&oldid=167043
](https://en.cppreference.com/mwiki/index.php?title=cpp/ranges/repeat_view&oldid=167043)
"

#####  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/repeat_view "A list of all wiki pages that link here \[j\]")
  * [ Related changes ](/w/Special:RecentChangesLinked/cpp/ranges/repeat_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/repeat_view&printable=yes "Printable version of this page \[p\]")
  * [ Permanent link ](/mwiki/index.php?title=cpp/ranges/repeat_view&oldid=167043 "Permanent link to this revision of the page")
  * [ Page information ](/mwiki/index.php?title=cpp/ranges/repeat_view&action=info)

  * In other languages 

  * [ Español ](http://es.cppreference.com/w/cpp/ranges/repeat_view "cpp/ranges/repeat view")
  * [ Deutsch ](http://de.cppreference.com/w/cpp/ranges/repeat_view "cpp/ranges/repeat view")
  * [ 日本語 ](http://ja.cppreference.com/w/cpp/ranges/repeat_view "cpp/ranges/repeat view")
  * [ Русский ](http://ru.cppreference.com/w/cpp/ranges/repeat_view "cpp/ranges/repeat view")
  * [ 中文 ](http://zh.cppreference.com/w/cpp/ranges/repeat_view "cpp/ranges/repeat view")

  * This page was last modified on 24 December 2023, at 05:34. 
  * This page has been accessed 13,757 times. 

  * [ Privacy policy ](/w/Cppreference:Privacy_policy "Cppreference:Privacy policy")
  * [ About cppreference.com ](/w/Cppreference:About "Cppreference:About")
  * [ Disclaimers ](/w/Cppreference:General_disclaimer "Cppreference:General disclaimer")

  * [ ![Powered by MediaWiki](/mwiki/skins/common/images/poweredby_mediawiki_88x31.png) ](//www.mediawiki.org/) [ ![Powered by GeSHi](//upload.cppreference.com/mwiki/images/2/2b/powered_by_geshi_88x31.png) ](http://qbnz.com/highlighter/) [ ![Hosted by Tiger Technologies](//upload.cppreference.com/mwiki/images/9/94/powered_by_tigertech_88x31.png) ](http://www.tigertech.net/referral/cppreference.com)