gument is an lvalue (i.e. ` T ` is an lvalue reference type), 
  * const  T  otherwise. 

A call to ` ranges::cbegin ` is [ expression-equivalent ](/w/cpp/language/expressions#Expression-equivalence "cpp/language/expressions") to  [ ranges::  begin  ](http://en.cppreference.com/w/cpp/ranges-ranges-placeholder/begin) (  static_cast  < CT  && > (  t  )  )  .  |  (until C++23)   
---|---  
If the argument is an lvalue or  [ ranges::  enable_borrowed_range
](http://en.cppreference.com/w/cpp/ranges/borrowed_range) < [ std::
remove_cv_t  ](http://en.cppreference.com/w/cpp/types/remove_cv) < T  >> is
true  , then a call to ` ranges::cbegin ` is [ expression-equivalent
](/w/cpp/language/expressions#Expression-equivalence
"cpp/language/expressions") to:

  * [ std::  const_iterator  ](http://en.cppreference.com/w/cpp/iterator/const_iterator) < decltype  (  U  )  > (  U  )  for some expression ` U ` equivalent to  [ ranges::  begin  ](http://en.cppreference.com/w/cpp/ranges-ranges-placeholder/begin) (  /*possibly-const-range*/  (  t  )  )  . 

In all other cases, a call to ` ranges::cbegin ` is ill-formed, which can result in [ substitution failure ](/w/cpp/language/sfinae "cpp/language/sfinae") when the call appears in the immediate context of a template instantiation.  |  (since C++23)   
  
The return type models  [ std::input_or_output_iterator
](/w/cpp/iterator/input_or_output_iterator "cpp/iterator/input or output
iterator") and [ ` _constant-iterator_ ` ](/w/cpp/ranges/constant_range
"cpp/ranges/constant range") (since C++23)  in all cases.

##  Contents

  * 1  Customization point objects 
  * 2  Notes 
  * 3  Example 
  * 4  See also 

  
---  
  
###  Customization point objects

The name ` ranges::cbegin ` denotes a _customization point object_ , which is
a const [ function object ](/w/cpp/named_req/FunctionObject "cpp/named
req/FunctionObject") of a [ literal ](/w/cpp/named_req/LiteralType "cpp/named
req/LiteralType") [ ` semiregular ` ](/w/cpp/concepts/semiregular
"cpp/concepts/semiregular") class type. For exposition purposes, the cv-
unqualified version of its type is denoted as ` ___cbegin_fn_ ` .

All instances of ` ___cbegin_fn_ ` are equal. The effects of invoking
different instances of type ` ___cbegin_fn_ ` on the same arguments are
equivalent, regardless of whether the expression denoting the instance is an
lvalue or rvalue, and is const-qualified or not (however, a volatile-qualified
instance is not required to be invocable). Thus, ` ranges::cbegin ` can be
copied freely and its copies can be used interchangeably.

Given a set of types ` Args... ` , if  [ std::  declval
](http://en.cppreference.com/w/cpp/utility/declval) < Args  > (  )  ...  meet
the requirements for arguments to ` ranges::cbegin ` above, ` ___cbegin_fn_ `
models  

  * [ std::  invocable  ](http://en.cppreference.com/w/cpp/concepts/invocable) < __cbegin_fn, Args...  > , 
  * [ std::  invocable  ](http://en.cppreference.com/w/cpp/concepts/invocable) < const  __cbegin_fn, Args...  > , 
  * [ std::  invocable  ](http://en.cppreference.com/w/cpp/concepts/invocable) < __cbegin_fn  & , Args...  > , and 
  * [ std::  invocable  ](http://en.cppreference.com/w/cpp/concepts/invocable) < const  __cbegin_fn  & , Args...  > .   

Otherwise, no function call operator of ` ___cbegin_fn_ ` participates in
overload resolution.

###  [ [ edit ](/mwiki/index.php?title=cpp/ranges/cbegin&action=edit&section=1
"Edit section: Notes") ]  Notes

For an lvalue range  e  of type  T  ,  [ ranges::  cbegin
](http://en.cppreference.com/w/cpp/ranges-ranges-placeholder/cbegin) (  e  )
is equivalent to

[ ranges::  begin  ](http://en.cppreference.com/w/cpp/ranges-ranges-placeholder/begin) (  [ std::  as_const  ](http://en.cppreference.com/w/cpp/utility/as_const) (  e  )  )  .  |  (until C++23)   
---|---  
  
  * [ ranges::  begin  ](http://en.cppreference.com/w/cpp/ranges-ranges-placeholder/begin) (  e  )  if  T  models [ ` constant_range ` ](/w/cpp/ranges/constant_range "cpp/r