ance "cpp/iterator/distance") |  returns the distance between two iterators   
(function template)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/iterator/dsc_distance&action=edit)  
[ next  ](/w/cpp/iterator/next "cpp/iterator/next") (C++11)  |  increment an iterator   
(function template)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/iterator/dsc_next&action=edit)  
[ prev  ](/w/cpp/iterator/prev "cpp/iterator/prev") (C++11)  |  decrement an iterator   
(function template)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/iterator/dsc_prev&action=edit)  
[ ranges::advance  ](/w/cpp/iterator/ranges/advance "cpp/iterator/ranges/advance") (C++20)  |  advances an iterator by given distance or to a given bound   
(niebloid)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/iterator/ranges/dsc_advance&action=edit)  
[ ranges::distance  ](/w/cpp/iterator/ranges/distance "cpp/iterator/ranges/distance") (C++20)  |  returns the distance between an iterator and a sentinel, or between the beginning and end of a range   
(niebloid)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/iterator/ranges/dsc_distance&action=edit)  
[ ranges::next  ](/w/cpp/iterator/ranges/next "cpp/iterator/ranges/next") (C++20)  |  increment an iterator by a given distance or to a bound   
(niebloid)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/iterator/ranges/dsc_next&action=edit)  
[ ranges::prev  ](/w/cpp/iterator/ranges/prev "cpp/iterator/ranges/prev") (C++20)  |  decrement an iterator by a given distance or to a bound   
(niebloid)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/iterator/ranges/dsc_prev&action=edit)  
  
#####  Range access  
  
[ begin  cbegin  ](/w/cpp/iterator/begin "cpp/iterator/begin") (C++11)  (C++14)  |  returns an iterator to the beginning of a container or array   
(function template)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/iterator/dsc_begin&action=edit)  
[ end  cend  ](/w/cpp/iterator/end "cpp/iterator/end") (C++11)  (C++14)  |  returns an iterator to the end of a container or array   
(function template)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/iterator/dsc_end&action=edit)  
[ rbegin  crbegin  ](/w/cpp/iterator/rbegin "cpp/iterator/rbegin") (C++14)  |  returns a reverse iterator to the beginning of a container or array   
(function template)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/iterator/dsc_rbegin&action=edit)  
[ rend  crend  ](/w/cpp/iterator/rend "cpp/iterator/rend") (C++14)  |  returns a reverse end iterator for a container or array   
(function template)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/iterator/dsc_rend&action=edit)  
[ size  ssize  ](/w/cpp/iterator/size "cpp/iterator/size") (C++17)  (C++20)  |  returns the size of a container or array   
(function template)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/iterator/dsc_size&action=edit)  
[ empty  ](/w/cpp/iterator/empty "cpp/iterator/empty") (C++17)  |  checks whether the container is empty   
(function template)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/iterator/dsc_empty&action=edit)  
[ data  ](/w/cpp/iterator/data "cpp/iterator/data") (C++17)  |  obtains the pointer to the underlying array   
(function template)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/iterator/dsc_data&action=edit)  
  
###  [ [ edit
](/mwiki/index.php?title=cpp/header/iterator&action=edit&section=1 "Edit
section: Synopsis") ]  Synopsis

    
    
    #include <compare>
    #include <concepts>
     
    namespace std {
      template<class T> using /*with-reference*/ = T&;  // exposition only
      template<class T> concept /*can-reference*/       // exposition only