From Jason Turner

[valarray.assign]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmp447si2b9/{from.md → to.md} +24 -23
tmp/tmp447si2b9/{from.md → to.md} RENAMED
@@ -1,55 +1,56 @@
1
  #### `valarray` assignment <a id="valarray.assign">[[valarray.assign]]</a>
2
 
3
  ``` cpp
4
- valarray<T>& operator=(const valarray<T>& v);
5
  ```
6
 
7
- Each element of the `*this` array is assigned the value of the
8
- corresponding element of the argument array. If the length of `v` is not
9
- equal to the length of `*this` , resizes `*this` to make the two arrays
10
- the same length, as if by calling `resize(v.size())`, before performing
11
- the assignment.
12
 
13
- `size() == v.size()`.
 
 
14
 
15
  ``` cpp
16
- valarray<T>& operator=(valarray<T>&& v) noexcept;
17
  ```
18
 
19
  *Effects:* `*this` obtains the value of `v`. The value of `v` after the
20
  assignment is not specified.
21
 
 
 
22
  *Complexity:* Linear.
23
 
24
  ``` cpp
25
  valarray& operator=(initializer_list<T> il);
26
  ```
27
 
28
- *Effects:* `*this = valarray(il)`.
29
-
30
- *Returns:* `*this`.
31
 
32
  ``` cpp
33
- valarray<T>& operator=(const T&);
34
  ```
35
 
36
- The scalar assignment operator causes each element of the `*this` array
37
- to be assigned the value of the argument.
 
38
 
39
  ``` cpp
40
- valarray<T>& operator=(const slice_array<T>&);
41
- valarray<T>& operator=(const gslice_array<T>&);
42
- valarray<T>& operator=(const mask_array<T>&);
43
- valarray<T>& operator=(const indirect_array<T>&);
44
  ```
45
 
46
  *Requires:* The length of the array to which the argument refers equals
47
- `size()`.
 
 
48
 
49
  These operators allow the results of a generalized subscripting
50
  operation to be assigned directly to a `valarray`.
51
 
52
- If the value of an element in the left-hand side of a valarray
53
- assignment operator depends on the value of another element in that
54
- left-hand side, the resulting behavior is undefined.
55
-
 
1
  #### `valarray` assignment <a id="valarray.assign">[[valarray.assign]]</a>
2
 
3
  ``` cpp
4
+ valarray& operator=(const valarray& v);
5
  ```
6
 
7
+ *Effects:* Each element of the `*this` array is assigned the value of
8
+ the corresponding element of `v`. If the length of `v` is not equal to
9
+ the length of `*this`, resizes `*this` to make the two arrays the same
10
+ length, as if by calling `resize(v.size())`, before performing the
11
+ assignment.
12
 
13
+ *Postconditions:* `size() == v.size()`.
14
+
15
+ *Returns:* `*this`.
16
 
17
  ``` cpp
18
+ valarray& operator=(valarray&& v) noexcept;
19
  ```
20
 
21
  *Effects:* `*this` obtains the value of `v`. The value of `v` after the
22
  assignment is not specified.
23
 
24
+ *Returns:* `*this`.
25
+
26
  *Complexity:* Linear.
27
 
28
  ``` cpp
29
  valarray& operator=(initializer_list<T> il);
30
  ```
31
 
32
+ *Effects:* Equivalent to: `return *this = valarray(il);`
 
 
33
 
34
  ``` cpp
35
+ valarray& operator=(const T& v);
36
  ```
37
 
38
+ *Effects:* Assigns `v` to each element of `*this`.
39
+
40
+ *Returns:* `*this`.
41
 
42
  ``` cpp
43
+ valarray& operator=(const slice_array<T>&);
44
+ valarray& operator=(const gslice_array<T>&);
45
+ valarray& operator=(const mask_array<T>&);
46
+ valarray& operator=(const indirect_array<T>&);
47
  ```
48
 
49
  *Requires:* The length of the array to which the argument refers equals
50
+ `size()`. The value of an element in the left-hand side of a `valarray`
51
+ assignment operator does not depend on the value of another element in
52
+ that left-hand side.
53
 
54
  These operators allow the results of a generalized subscripting
55
  operation to be assigned directly to a `valarray`.
56