##  Range primitives  
  
Defined in namespace ` std::ranges `  
[ ranges::iterator_t  ranges::const_iterator_t  ranges::sentinel_t  ranges::const_sentinel_t  ranges::range_difference_t  ranges::range_size_t  ranges::range_value_t  ranges::range_reference_t  ranges::range_const_reference_t  ranges::range_rvalue_reference_t  ranges::range_common_reference_t  ](/w/cpp/ranges/iterator_t "cpp/ranges/iterator t") (C++20)  (C++23)  (C++20)  (C++23)  (C++20)  (C++20)  (C++20)  (C++20)  (C++23)  (C++20)  (C++20)  |  obtains associated types of a range   
(alias template)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/ranges/dsc_iterator_t&action=edit)  
  
#####  Views  
  
Defined in namespace ` std::ranges `  
[ 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)  
[ ranges::subrange  ](/w/cpp/ranges/subrange "cpp/ranges/subrange") (C++20)  |  combines an iterator-sentinel pair into a [ ` view ` ](/w/cpp/ranges/view "cpp/ranges/view")   
(class template)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/ranges/dsc_subrange&action=edit)  
  
#####  Dangling iterator handling  
  
Defined in namespace ` std::ranges `  
[ ranges::dangling  ](/w/cpp/ranges/dangling "cpp/ranges/dangling") (C++20)  |  a placeholder type indicating that an iterator or a ` subrange ` should not be returned since it would be dangling   
(class)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/ranges/dsc_dangling&action=edit)  
[ ranges::borrowed_iterator_t  ranges::borrowed_subrange_t  ](/w/cpp/ranges/borrowed_iterator_t "cpp/ranges/borrowed iterator t") (C++20)  |  obtains iterator type or ` subrange ` type of a [ ` borrowed_range ` ](/w/cpp/ranges/borrowed_range "cpp/ranges/borrowed range")   
(alias template)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/ranges/dsc_borrowed_iterator_t&action=edit)  
  
#####  Range adaptor objects utility  
  
Defined in namespace ` std::ranges `  
[ ranges::range_adaptor_closure  ](/w/cpp/ranges/range_adaptor_closure "cpp/ranges/range adaptor closure") (C++23)  |  helper base class template for defining a range adaptor closure object   
(class template)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/ranges/dsc_range_adaptor_closure&action=edit)  
  
#####  Factories  
  
Defined in namespace ` std::ranges `  
[ ranges::empty_view  views::empty  ](/w/cpp/ranges/empty_view "cpp/ranges/empty view") (C++20)  |  an empty [ ` view ` ](/w/cpp/ranges/view "cpp/ranges/view") with no elements   
(class template)  (variable template)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/ranges/dsc_empty_view&action=edit)  
[ ranges::single_view  views::single  ](/w/cpp/ranges/single_view "cpp/ranges/single view") (C++20)  |  a [ ` view ` ](/w/cpp/ranges/view "cpp/ranges/view") that contains a single element of a specified value   
(class template)  (customization point object)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/ranges/dsc_single_view&action=edit)  
[ 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)  
[ ranges::basic_istream_view  views::istream  ](/w/cpp/ranges/basic_istream_view "cpp/ranges/basic istream view") (C++20)  |  a [ ` view ` ](/w/cpp/ranges/vi