or_ ::operator*
](/w/cpp/ranges/adjacent_view/iterator/operator* "cpp/ranges/adjacent
view/iterator/operator*")  
[ adjacent_view:: _iterator_ ::operator[]
](/w/cpp/ranges/adjacent_view/iterator/operator_at "cpp/ranges/adjacent
view/iterator/operator at")  
[ adjacent_view:: _iterator_ ::operator++  
adjacent_view:: _iterator_ ::operator++  (int)  
adjacent_view:: _iterator_ ::operator--  
adjacent_view:: _iterator_ ::operator--  (int)  
adjacent_view:: _iterator_ ::operator+=  
adjacent_view:: _iterator_ ::operator-=
](/w/cpp/ranges/adjacent_view/iterator/operator_arith "cpp/ranges/adjacent
view/iterator/operator arith")  
[ Non-member functions ](/w/cpp/ranges/adjacent_view/iterator#Non-
member_functions "cpp/ranges/adjacent view/iterator")  
[ operator==  (adjacent_view:: _iterator_ )  
operator< (adjacent_view:: _iterator_ )  
operator> (adjacent_view:: _iterator_ )  
operator<=  (adjacent_view:: _iterator_ )  
operator>=  (adjacent_view:: _iterator_ )  
operator<=> (adjacent_view:: _iterator_ )
](/w/cpp/ranges/adjacent_view/iterator/operator_cmp "cpp/ranges/adjacent
view/iterator/operator cmp")  
[ operator+  (adjacent_view:: _iterator_ )  
operator-  (adjacent_view:: _iterator_ )
](/w/cpp/ranges/adjacent_view/iterator/operator_arith2 "cpp/ranges/adjacent
view/iterator/operator arith2")  
[ iter_move  (adjacent_view:: _iterator_ )
](/w/cpp/ranges/adjacent_view/iterator/iter_move "cpp/ranges/adjacent
view/iterator/iter move")  
[ iter_swap  (adjacent_view:: _iterator_ )
](/w/cpp/ranges/adjacent_view/iterator/iter_swap "cpp/ranges/adjacent
view/iterator/iter swap")  
[ Sentinel ](/w/cpp/ranges/adjacent_view/sentinel "cpp/ranges/adjacent
view/sentinel")  
Member functions  
[ adjacent_view:: _sentinel_ :: _sentinel_
](/w/cpp/ranges/adjacent_view/sentinel/sentinel "cpp/ranges/adjacent
view/sentinel/sentinel")  
Non-member functions  
[ operator==  (adjacent_view:: _iterator_ ,adjacent_view:: _sentinel_ )
](/w/cpp/ranges/adjacent_view/sentinel/operator_cmp "cpp/ranges/adjacent
view/sentinel/operator cmp")  
[ operator-  (adjacent_view:: _iterator_ ,adjacent_view:: _sentinel_ )
](/w/cpp/ranges/adjacent_view/sentinel/operator- "cpp/ranges/adjacent
view/sentinel/operator-")  
  
[ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/ranges/adjacent_view/navbar_content&action=edit)

Defined in header ` [ <ranges> ](/w/cpp/header/ranges "cpp/header/ranges") ` |  |   
---|---|---  
template  < [ ranges::  forward_range
](http://en.cppreference.com/w/cpp/ranges/forward_range) V, [ std::  size_t
](http://en.cppreference.com/w/cpp/types/size_t) N  >  
requires [ ranges::  view  ](http://en.cppreference.com/w/cpp/ranges/view) < V
> && (  N  > 0  )  
class  adjacent_view  :  public  [ ranges::  view_interface  ](http://en.cppreference.com/w/cpp/ranges/view_interface) < adjacent_view  < V, N  >> |  (1)  |  (since C++23)   
namespace  views  {  
template  < [ std::  size_t  ](http://en.cppreference.com/w/cpp/types/size_t)
N  >  
inline  constexpr  /* unspecified */  adjacent  =  /* unspecified */  ;  
}  |  (2)  |  (since C++23)   
namespace  views  {  
inline  constexpr  auto  pairwise  =  adjacent  < 2  > ;  
}  |  (3)  |  (since C++23)   
Call signature  |  |   
template  < [ ranges::  viewable_range
](http://en.cppreference.com/w/cpp/ranges/viewable_range) R  >  
requires  /* see below */  
constexpr  [ ranges::  view  ](http://en.cppreference.com/w/cpp/ranges/view) auto  adjacent  < N  > (  R  && r  )  ;  |  |  (since C++23)   
|  |   
  
1)  ` adjacent_view ` is a range adaptor that takes a [ ` view `
](/w/cpp/ranges/view "cpp/ranges/view") , and produces a [ ` view `
](/w/cpp/ranges/view "cpp/ranges/view") whose ` _i_ ` _th_ element (a
"window") is a  [ std::tuple ](/w/cpp/utility/tuple "cpp/utility/tuple") that
holds ` _N_ ` references to the elements of the original view, from ` _i_ `
_th_ up to  i  \+  N  \-  1  _th_ inclusively.

Let ` _S_ ` be the size of the original view. Then the size of produced view
is: