s::iota ` ](/w/cpp/ranges/iota_view "cpp/ranges/iota view")

The ranges library includes [ range algorithms ](/w/cpp/algorithm/ranges
"cpp/algorithm/ranges") , which are applied to ranges eagerly, and [ range
adaptors ](/w/cpp/ranges#Range_adaptors "cpp/ranges") , which are applied to
views lazily. Adaptors can be composed into pipelines, so that their actions
take place as the view is iterated.

Defined in header ` [ <ranges> ](/w/cpp/header/ranges "cpp/header/ranges") ` |  |   
---|---|---  
namespace  std  {  
namespace  views  =  ranges  ::  views  ;  
}  |  |  (since C++20)   
|  |   
  
The namespace alias ` std::views ` is provided as a shorthand for `
std::ranges::views ` .

Defined in namespace ` std::ranges `  
---  
|

##  Contents

  * 1  Range access 
  * 2  Range primitives 
  * 3  Dangling iterator handling 
  * 4  Range concepts 
  * 5  Range conversions 
  * 6  Views 
  * 7  Range factories 
  * 8  Range adaptors 
  * 9  Range generators 
  * 10  Helper items 
    * 10.1  Range adaptor objects 
    * 10.2  Range adaptor closure objects 
    * 10.3  Customization point objects 
    * 10.4  Assignable wrapper 
    * 10.5  Non-propagating cache 
    * 10.6  Customization point object helpers 
    * 10.7  Range adaptor helpers 
    * 10.8  Helper concepts 
  * 11  Notes 
  * 12  Example 
  * 13  Defect reports 
  * 14  See also 

  
---  
  
#####  Range access  
  
Defined in header ` [ <ranges> ](/w/cpp/header/ranges "cpp/header/ranges") `  
Defined in header ` [ <iterator> ](/w/cpp/header/iterator
"cpp/header/iterator") `  
[ ranges::begin  ](/w/cpp/ranges/begin "cpp/ranges/begin") (C++20)  |  returns an iterator to the beginning of a range   
(customization point object)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/ranges/dsc_begin&action=edit)  
[ ranges::end  ](/w/cpp/ranges/end "cpp/ranges/end") (C++20)  |  returns a sentinel indicating the end of a range   
(customization point object)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/ranges/dsc_end&action=edit)  
[ ranges::cbegin  ](/w/cpp/ranges/cbegin "cpp/ranges/cbegin") (C++20)  |  returns an iterator to the beginning of a read-only range   
(customization point object)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/ranges/dsc_cbegin&action=edit)  
[ ranges::cend  ](/w/cpp/ranges/cend "cpp/ranges/cend") (C++20)  |  returns a sentinel indicating the end of a read-only range   
(customization point object)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/ranges/dsc_cend&action=edit)  
[ ranges::rbegin  ](/w/cpp/ranges/rbegin "cpp/ranges/rbegin") (C++20)  |  returns a reverse iterator to a range   
(customization point object)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/ranges/dsc_rbegin&action=edit)  
[ ranges::rend  ](/w/cpp/ranges/rend "cpp/ranges/rend") (C++20)  |  returns a reverse end iterator to a range   
(customization point object)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/ranges/dsc_rend&action=edit)  
[ ranges::crbegin  ](/w/cpp/ranges/crbegin "cpp/ranges/crbegin") (C++20)  |  returns a reverse iterator to a read-only range   
(customization point object)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/ranges/dsc_crbegin&action=edit)  
[ ranges::crend  ](/w/cpp/ranges/crend "cpp/ranges/crend") (C++20)  |  returns a reverse end iterator to a read-only range   
(customization point object)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/ranges/dsc_crend&action=edit)  
[ ranges::size  ](/w/cpp/ranges/size "cpp/ranges/size") (C++20)  |  returns an integer equal to the size of a range   
(customization point object)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/ranges/dsc_size&action=edit)  
[ ranges::ssize  ](/w/cpp/ranges/ssize "cpp/ranges/ssize") (C++20)  |  returns a signed integer equal to t