On this page
std::valarray<T>::valarray
|
(1) | |
|
(2) | |
|
(3) | |
|
(4) | |
|
(5) | |
|
(6) | (since C++11) |
|
(7) | |
|
(8) | |
|
(9) | |
|
(10) | |
|
(11) | (since C++11) |
Constructs new numeric array from various sources.
1) Default constructor. Constructs an empty numeric array.
3) Constructs a numeric array with
count
copies of val
.
4) Constructs a numeric array with copies of
count
values from an array pointed to by vals
. If this array contains less than count
values, the behavior is undefined.
5) Copy constructor. Constructs the numeric array with the copy of the contents of
other
.
6) Move constructor. Constructs the container with the contents of
other
using move semantics.
11) Constructs the numeric array with the contents of the initializer list
il
.
Parameters
count | - | the number of elements to construct |
val | - | the value to initialize the elements with |
vals | - | pointer to a C array to use as source to initialize the contents |
other | - | another numeric array to use as source to initialize the contents |
sa | - | slice array to initialize the elements with |
gsa | - | generic slice array to initialize the elements with |
ma | - | mask array to initialize the elements with |
ia | - | indirect array to initialize the elements with |
il | - | initializer list to initialize the elements with |
Exceptions
1-5, 7-11) May throw implementation-defined exceptions.
Example
© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
https://en.cppreference.com/w/cpp/numeric/valarray/valarray