From Jason Turner

[valarray.cons]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpljm9fu6d/{from.md → to.md} +25 -27
tmp/tmpljm9fu6d/{from.md → to.md} RENAMED
@@ -2,62 +2,60 @@
2
 
3
  ``` cpp
4
  valarray();
5
  ```
6
 
7
- *Effects:* Constructs an object of class `valarray<T>`[^9] which has
8
- zero length.[^10]
9
 
10
  ``` cpp
11
- explicit valarray(size_t);
12
  ```
13
 
14
- The array created by this constructor has a length equal to the value of
15
- the argument. The elements of the array are
16
- value-initialized ([[dcl.init]]).
17
 
18
  ``` cpp
19
- valarray(const T&, size_t);
20
  ```
21
 
22
- The array created by this constructor has a length equal to the second
23
- argument. The elements of the array are initialized with the value of
24
- the first argument.
25
 
26
  ``` cpp
27
- valarray(const T*, size_t);
28
  ```
29
 
30
- The array created by this constructor has a length equal to the second
31
- argument `n`. The values of the elements of the array are initialized
32
- with the first `n` values pointed to by the first argument.[^11] If the
33
- value of the second argument is greater than the number of values
34
- pointed to by the first argument, the behavior is undefined.
 
35
 
36
  ``` cpp
37
- valarray(const valarray<T>&);
38
  ```
39
 
40
- The array created by this constructor has the same length as the
41
- argument array. The elements are initialized with the values of the
42
- corresponding elements of the argument array.[^12]
43
 
44
  ``` cpp
45
- valarray(valarray<T>&& v) noexcept;
46
  ```
47
 
48
- The array created by this constructor has the same length as the
49
- argument array. The elements are initialized with the values of the
50
- corresponding elements of the argument array.
51
 
52
  *Complexity:* Constant.
53
 
54
  ``` cpp
55
  valarray(initializer_list<T> il);
56
  ```
57
 
58
- *Effects:* Same as `valarray(il.begin(), il.size())`.
59
 
60
  ``` cpp
61
  valarray(const slice_array<T>&);
62
  valarray(const gslice_array<T>&);
63
  valarray(const mask_array<T>&);
@@ -69,8 +67,8 @@ templates to a `valarray`.
69
 
70
  ``` cpp
71
  ~valarray();
72
  ```
73
 
74
- The destructor is applied to every element of `*this`; an implementation
75
- may return all allocated memory.
76
 
 
2
 
3
  ``` cpp
4
  valarray();
5
  ```
6
 
7
+ *Effects:* Constructs a `valarray` that has zero length.[^9]
 
8
 
9
  ``` cpp
10
+ explicit valarray(size_t n);
11
  ```
12
 
13
+ *Effects:* Constructs a `valarray` that has length `n`. Each element of
14
+ the array is value-initialized ([[dcl.init]]).
 
15
 
16
  ``` cpp
17
+ valarray(const T& v, size_t n);
18
  ```
19
 
20
+ *Effects:* Constructs a `valarray` that has length `n`. Each element of
21
+ the array is initialized with `v`.
 
22
 
23
  ``` cpp
24
+ valarray(const T* p, size_t n);
25
  ```
26
 
27
+ *Requires:* `p` points to an array ([[dcl.array]]) of at least `n`
28
+ elements.
29
+
30
+ *Effects:* Constructs a `valarray` that has length `n`. The values of
31
+ the elements of the array are initialized with the first `n` values
32
+ pointed to by the first argument.[^10]
33
 
34
  ``` cpp
35
+ valarray(const valarray& v);
36
  ```
37
 
38
+ *Effects:* Constructs a `valarray` that has the same length as `v`. The
39
+ elements are initialized with the values of the corresponding elements
40
+ of `v`.[^11]
41
 
42
  ``` cpp
43
+ valarray(valarray&& v) noexcept;
44
  ```
45
 
46
+ *Effects:* Constructs a `valarray` that has the same length as `v`. The
47
+ elements are initialized with the values of the corresponding elements
48
+ of `v`.
49
 
50
  *Complexity:* Constant.
51
 
52
  ``` cpp
53
  valarray(initializer_list<T> il);
54
  ```
55
 
56
+ *Effects:* Equivalent to `valarray(il.begin(), il.size())`.
57
 
58
  ``` cpp
59
  valarray(const slice_array<T>&);
60
  valarray(const gslice_array<T>&);
61
  valarray(const mask_array<T>&);
 
67
 
68
  ``` cpp
69
  ~valarray();
70
  ```
71
 
72
+ *Effects:* The destructor is applied to every element of `*this`; an
73
+ implementation may return all allocated memory.
74