Namespaces
Variants
Views
Actions

Difference between revisions of "cpp/experimental/to array"

From cppreference.com
(+)
(See also: +)
Line 28: Line 28:
  
 
===See also===
 
===See also===
 +
 +
 +

Revision as of 14:17, 5 July 2015

 
 
Experimental
Technical Specification
Filesystem library (filesystem TS)
Library fundamentals (library fundamentals TS)
Library fundamentals 2 (library fundamentals TS v2)
Library fundamentals 3 (library fundamentals TS v3)
Extensions for parallelism (parallelism TS)
Extensions for parallelism 2 (parallelism TS v2)
Extensions for concurrency (concurrency TS)
Extensions for concurrency 2 (concurrency TS v2)
Concepts (concepts TS)
Ranges (ranges TS)
Reflection (reflection TS)
Mathematical special functions (special functions TR)
Experimental Non-TS
Pattern Matching
Linear Algebra
std::execution
Contracts
2D Graphics
 
 
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.


Contents

Parameters

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

Return value

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

Example

See also

(library fundamentals TS v2)
creates a std::array object whose size and optionally element type are deduced from the arguments
(function template) [edit]