23)   
template  < template  < class  ...  > class  C,  class  ...  Args  >  
constexpr  /*range adaptor closure*/  to  (  Args  && ...  args  )  ;  |  (4)  |  (since C++23)   
Helper templates  |  |   
template  < class  Container  >  
constexpr  bool  /*reservable-container*/  =  
[ ranges::  sized_range
](http://en.cppreference.com/w/cpp/ranges/sized_range) < Container  > &&  
requires  (  Container  & c, [ ranges::  range_size_t
](http://en.cppreference.com/w/cpp/ranges/iterator_t) < Container  > n  )  
{  
c.  reserve  (  n  )  ;  
{  c.  capacity  (  )  }  \-  > [ std::  same_as
](http://en.cppreference.com/w/cpp/concepts/same_as) < decltype  (  n  )  > ;  
{  c.  max_size  (  )  }  \-  > [ std::  same_as
](http://en.cppreference.com/w/cpp/concepts/same_as) < decltype  (  n  )  > ;  
}  ;  |  (5)  |  (  exposition only*  )   
template  < class  Container,  class  Reference  >  
constexpr  bool  /*container-appendable*/  =  requires  (  Container  & c,
Reference  && ref  )  
{  
requires  (  requires  {  c.  emplace_back  (  [ std::  forward
](http://en.cppreference.com/w/cpp/utility/forward) < Reference  > (  ref  )
)  ;  }  ||  
requires  {  c.  push_back  (  [ std::  forward
](http://en.cppreference.com/w/cpp/utility/forward) < Reference  > (  ref  )
)  ;  }  ||  
requires  {  c.  emplace  (  c.  end  (  )  , [ std::  forward
](http://en.cppreference.com/w/cpp/utility/forward) < Reference  > (  ref  )
;  }  ||  
requires  {  c.  insert  (  c.  end  (  )  , [ std::  forward
](http://en.cppreference.com/w/cpp/utility/forward) < Reference  > (  ref  )
)  ;  }  )  ;  
}  ;  |  (6)  |  (  exposition only*  )   
template  < class  Reference,  class  C  >  
constexpr  auto  /*container-appender*/  (  C  & c  )  
{  
return  [  & c  ]  < class  Reference  > (  Reference  && ref  )  
{  
if  constexpr  (  requires  {  c.  emplace_back  (  [ std::  declval
](http://en.cppreference.com/w/cpp/utility/declval) < Reference  > (  )  )  ;
}  )  
c.  emplace_back  (  [ std::  forward
](http://en.cppreference.com/w/cpp/utility/forward) < Reference  > (  ref  )
)  ;  
else  if  constexpr  (  requires  {  c.  push_back  (  [ std::  declval
](http://en.cppreference.com/w/cpp/utility/declval) < Reference  > (  )  )  ;
}  )  
c.  push_back  (  [ std::  forward
](http://en.cppreference.com/w/cpp/utility/forward) < Reference  > (  ref  )
)  ;  
else  if  constexpr  (  requires  {  c.  emplace  (  c.  end  (  )  ,  
[ std::  declval  ](http://en.cppreference.com/w/cpp/utility/declval) <
Reference  > (  )  )  ;  }  )  
c.  emplace  (  c.  end  (  )  , [ std::  forward
](http://en.cppreference.com/w/cpp/utility/forward) < Reference  > (  ref  )
)  ;  
else  
c.  insert  (  c.  end  (  )  , [ std::  forward
](http://en.cppreference.com/w/cpp/utility/forward) < Reference  > (  ref  )
)  ;  
}  ;  
}  |  (7)  |  (  exposition only*  )   
template  < class  R,  class  T  >  
concept  /*container-compatible-range*/  =  
[ ranges::  input_range
](http://en.cppreference.com/w/cpp/ranges/input_range) < R  > &&  
[ std::  convertible_to  ](http://en.cppreference.com/w/cpp/concepts/convertible_to) < [ ranges::  range_reference_t  ](http://en.cppreference.com/w/cpp/ranges/iterator_t) < R  > , T  > ;  |  (8)  |  (  exposition only*  )   
|  |   
  
The overloads of the range conversion function construct a new non-view object
from a source range as its first argument by calling a constructor taking a
range, a ` std::from_range_t ` tagged ranged constructor, a constructor taking
an iterator-sentinel pair, or by back inserting each element of the source
range into the arguments-constructed object.

1)  Constructs an object of type ` C ` from the elements of ` r ` in the
following:

a)  If ` C ` does not satisfy [ ` input_range ` ](/w/cpp/ranges/input_range
"cpp/ranges/input range") or  [ std::  convertible_to
](http://en.cppreference.com/w/cpp/concepts/convertible_to) < [ ranges::
range_reference_t  ](http://en.cppreference.com/w/cpp/ranges/iterator_t) < R
> ,