directional_range
"cpp/ranges/bidirectional range") .

3)  The name  views  ::  chunk  denotes a [ RangeAdaptorObject
](/w/cpp/named_req/RangeAdaptorObject "cpp/named req/RangeAdaptorObject") .
Given subexpressions  e  and  n  , the expression  views  ::  chunk  (  e, n
)  is [ expression-equivalent ](/w/cpp/language/expressions#Expression-
equivalence "cpp/language/expressions") to  chunk_view  (  e, n  )  .

4)  Computes the smallest integer value that is not less than the quotient of
dividing  num  by  denom  . Equivalent to:

    
    
    I r = num / denom;
    if (num % denom)
        ++r;
    return r;

##  Contents

  * 1  Data members 
    * 1.1  If V models exactly input_range  (1) 
  * 2  Member functions 
    * 2.1  Inherited from  std::ranges::view_interface 
  * 3  Deduction guides 
  * 4  Nested classes 
  * 5  Helper templates 
  * 6  Notes 
  * 7  Example 
  * 8  References 
  * 9  See also 

  
---  
  
###  [ [ edit
](/mwiki/index.php?title=cpp/ranges/chunk_view&action=edit&section=1 "Edit
section: Data members") ]  Data members

Member object  |  Definition   
---|---  
` _base__ ` (private)  |  The underlying [ ` view ` ](/w/cpp/ranges/view "cpp/ranges/view") of type ` V ` .   
(  exposition-only member object*  )  
` _n__ ` (private)  |  The "chunk size" of type  [ ranges::  range_difference_t  ](http://en.cppreference.com/w/cpp/ranges/iterator_t) < V  > .   
(  exposition-only member object*  )  
  
#####  If ` V ` models exactly [ ` input_range ` ](/w/cpp/ranges/input_range
"cpp/ranges/input range") (1)  
  
---  
` _remainder__ ` (private)  
(optional)  |  The number of elements left in the current chunk, of type  [ ranges::  range_difference_t  ](http://en.cppreference.com/w/cpp/ranges/iterator_t) < V  > .   
(  exposition-only member object*  )  
` _current__ ` (private)  
(optional)  |  An [ _optional-like_ ](/w/cpp/ranges#Non-propagating_cache "cpp/ranges") object of type  /*non-propagating-cache*/  < [ ranges::  iterator_t  ](http://en.cppreference.com/w/cpp/ranges-ranges-placeholder/iterator_t) < V  >> that caches current underlying iterator.   
(  exposition-only member object*  )  
  
###  [ [ edit
](/mwiki/index.php?title=cpp/ranges/chunk_view&action=edit&section=2 "Edit
section: Member functions") ]  Member functions

[ (constructor)  ](/w/cpp/ranges/chunk_view/chunk_view "cpp/ranges/chunk view/chunk view") (C++23)  |  constructs a ` chunk_view `   
(public member function)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/ranges/adaptor/dsc_constructor&action=edit)  
---|---  
[ base  ](/w/cpp/ranges/chunk_view/base "cpp/ranges/chunk view/base") (C++23)  |  returns a copy of the underlying (adapted) view   
(public member function)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/ranges/adaptor/dsc_base&action=edit)  
[ begin  ](/w/cpp/ranges/chunk_view/begin "cpp/ranges/chunk view/begin") (C++23)  |  returns an iterator to the beginning   
(public member function)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/ranges/adaptor/dsc_begin&action=edit)  
[ end  ](/w/cpp/ranges/chunk_view/end "cpp/ranges/chunk view/end") (C++23)  |  returns an iterator or a sentinel to the end   
(public member function)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/ranges/adaptor/dsc_end&action=edit)  
[ size  ](/w/cpp/ranges/chunk_view/size "cpp/ranges/chunk view/size") (C++23)  |  returns the number of elements. Provided only if the underlying (adapted) range satisfies [ ` sized_range ` ](/w/cpp/ranges/sized_range "cpp/ranges/sized range") .   
(public member function)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/ranges/adaptor/dsc_size&action=edit)  
  
#####  Inherited from  [ std::ranges::view_interface
](/w/cpp/ranges/view_interface "cpp/ranges/view interface")  
  
[ empty  ](/w/cpp/ranges/view_interface/empty "cpp/ranges/view interface/empty") (C++20)  |  returns wheth