std::experimental::to_array - cppreference.com

##### cppreference.com

##### Search

Create account

##### Namespaces

- Page
- Discussion

##### Variants

##### Views

- View
- Edit
- History

##### Actions

# std::experimental::to_array

From cppreference.com
< cpp‎ | experimental

Defined in header `<experimental/array>` |  |
template <class T, std::size_t N> constexpr std::array<std::remove_cv_t<T>, N> to_array(T (&a)[N]); |  | (library fundamentals TS v2)

Creates a std::array from the built-in array `a`. The elements of the std::array are copy-initialized from the corresponding element of `a`.

### [edit] Parameters

a | - | the built-in array to be used to initialize the std::array

### [edit] Return value

An std::array object whose elements are copy-initialized from the corresponding element of `a`.

### [edit] Example

| This section is incomplete Reason: no example

### [edit] See also

make_array | Creates a std::array object whose size and optionally element type are deduced from the arguments (function template) [edit]

Retrieved from "http://en.cppreference.com/mwiki/index.php?title=cpp/experimental/to_array&oldid=79360"
Category:

- Todo no example