ce.com/w/cpp/io/cout) << rem << "{ ";
            for (const auto& [k, v] : mm)
                [std::cout](http://en.cppreference.com/w/cpp/io/cout) << '{' << k << ",'" << v << "'} ";
            [std::cout](http://en.cppreference.com/w/cpp/io/cout) << "}\n";
        };
     
        [std::multimap](http://en.cppreference.com/w/cpp/container/multimap)<int, char> mm{{4,'a'}, {3,'-'}, {4,'b'}, {5,'-'}, {4,'c'}};
        print("Before: ", mm);
        mutate_map_values(mm, 4);
        print("After:  ", mm);
    }

Output:

    
    
    Before: { {3,'-'} {4,'a'} {4,'b'} {4,'c'} {5,'-'} }
    After:  { {3,'-'} {4,'A'} {4,'B'} {4,'C'} {5,'-'} }

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

[ ranges::view_interface  ](/w/cpp/ranges/view_interface "cpp/ranges/view interface") (C++20)  |  helper class template for defining a [ ` view ` ](/w/cpp/ranges/view "cpp/ranges/view") , using the [ curiously recurring template pattern ](/w/cpp/language/crtp "cpp/language/crtp")   
(class template)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/ranges/dsc_view_interface&action=edit)  
---|---  
  
Retrieved from " [
https://en.cppreference.com/mwiki/index.php?title=cpp/ranges/subrange&oldid=167068
](https://en.cppreference.com/mwiki/index.php?title=cpp/ranges/subrange&oldid=167068)
"

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

  * In other languages 

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

  * This page was last modified on 25 December 2023, at 01:59. 
  * This page has been accessed 72,640 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)