[range.utility.conv.adaptors]

# 25 Ranges library [[ranges]](./#ranges)

## 25.5 Range utilities [[range.utility]](range.utility#conv.adaptors)

### 25.5.7 Range conversions [[range.utility.conv]](range.utility.conv#adaptors)

#### 25.5.7.3 ranges​::​to adaptors [range.utility.conv.adaptors]

[ð](#lib:to,ranges)

`template<class C, class... Args> requires (![view](range.view#concept:view "25.4.5 Views [range.view]")<C>)
  constexpr auto to(Args&&... args);
template<template<class...> class C, class... Args>
  constexpr auto to(Args&&... args);
`

[1](#1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/ranges.tex#L2552)

*Mandates*: For the first overload,C is a cv-unqualified class type[.](#1.sentence-1)

[2](#2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/ranges.tex#L2557)

*Returns*: A range adaptor closure object ([[range.adaptor.object]](range.adaptor.object "25.7.2 Range adaptor objects")) f that is a perfect forwarding call wrapper ([[func.require]](func.require#term.perfect.forwarding.call.wrapper "22.10.4 Requirements"))
with the following properties:

- [(2.1)](#2.1)

  It has no target object[.](#2.1.sentence-1)

- [(2.2)](#2.2)

  Its bound argument entities bound_args consist of
objects of types decay_t<Args>... direct-non-list-initialized with std​::​forward<Args>(args)...,
respectively[.](#2.2.sentence-1)

- [(2.3)](#2.3)

  Its call pattern is to<C>(r, bound_args...),
where r is the argument used in a function call expression of f[.](#2.3.sentence-1)
