tmp/tmp8w5g9kl0/{from.md → to.md}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
| 1 |
### Class template `gslice_array` <a id="template.gslice.array">[[template.gslice.array]]</a>
|
| 2 |
|
| 3 |
-
####
|
| 4 |
|
| 5 |
``` cpp
|
| 6 |
namespace std {
|
| 7 |
template<class T> class gslice_array {
|
| 8 |
public:
|
|
@@ -28,36 +28,34 @@ namespace std {
|
|
| 28 |
gslice_array() = delete; // as implied by declaring copy constructor above
|
| 29 |
};
|
| 30 |
}
|
| 31 |
```
|
| 32 |
|
| 33 |
-
This template is a helper template used by the `
|
| 34 |
operator
|
| 35 |
|
| 36 |
``` cpp
|
| 37 |
gslice_array<T> valarray<T>::operator[](const gslice&);
|
| 38 |
```
|
| 39 |
|
| 40 |
It has reference semantics to a subset of an array specified by a
|
| 41 |
-
`gslice` object.
|
|
|
|
|
|
|
| 42 |
|
| 43 |
-
|
| 44 |
-
of assigning the elements of `b` to a generalized slice of the elements
|
| 45 |
-
in `a`.
|
| 46 |
-
|
| 47 |
-
#### `gslice_array` assignment <a id="gslice.array.assign">[[gslice.array.assign]]</a>
|
| 48 |
|
| 49 |
``` cpp
|
| 50 |
void operator=(const valarray<T>&) const;
|
| 51 |
const gslice_array& operator=(const gslice_array&) const;
|
| 52 |
```
|
| 53 |
|
| 54 |
These assignment operators have reference semantics, assigning the
|
| 55 |
values of the argument array elements to selected elements of the
|
| 56 |
`valarray<T>` object to which the `gslice_array` refers.
|
| 57 |
|
| 58 |
-
####
|
| 59 |
|
| 60 |
``` cpp
|
| 61 |
void operator*= (const valarray<T>&) const;
|
| 62 |
void operator/= (const valarray<T>&) const;
|
| 63 |
void operator%= (const valarray<T>&) const;
|
|
@@ -73,11 +71,11 @@ void operator>>=(const valarray<T>&) const;
|
|
| 73 |
These compound assignments have reference semantics, applying the
|
| 74 |
indicated operation to the elements of the argument array and selected
|
| 75 |
elements of the `valarray<T>` object to which the `gslice_array` object
|
| 76 |
refers.
|
| 77 |
|
| 78 |
-
####
|
| 79 |
|
| 80 |
``` cpp
|
| 81 |
void operator=(const T&) const;
|
| 82 |
```
|
| 83 |
|
|
|
|
| 1 |
### Class template `gslice_array` <a id="template.gslice.array">[[template.gslice.array]]</a>
|
| 2 |
|
| 3 |
+
#### Overview <a id="template.gslice.array.overview">[[template.gslice.array.overview]]</a>
|
| 4 |
|
| 5 |
``` cpp
|
| 6 |
namespace std {
|
| 7 |
template<class T> class gslice_array {
|
| 8 |
public:
|
|
|
|
| 28 |
gslice_array() = delete; // as implied by declaring copy constructor above
|
| 29 |
};
|
| 30 |
}
|
| 31 |
```
|
| 32 |
|
| 33 |
+
This template is a helper template used by the `gslice` subscript
|
| 34 |
operator
|
| 35 |
|
| 36 |
``` cpp
|
| 37 |
gslice_array<T> valarray<T>::operator[](const gslice&);
|
| 38 |
```
|
| 39 |
|
| 40 |
It has reference semantics to a subset of an array specified by a
|
| 41 |
+
`gslice` object. Thus, the expression `a[gslice(1, length, stride)] = b`
|
| 42 |
+
has the effect of assigning the elements of `b` to a generalized slice
|
| 43 |
+
of the elements in `a`.
|
| 44 |
|
| 45 |
+
#### Assignment <a id="gslice.array.assign">[[gslice.array.assign]]</a>
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
|
| 47 |
``` cpp
|
| 48 |
void operator=(const valarray<T>&) const;
|
| 49 |
const gslice_array& operator=(const gslice_array&) const;
|
| 50 |
```
|
| 51 |
|
| 52 |
These assignment operators have reference semantics, assigning the
|
| 53 |
values of the argument array elements to selected elements of the
|
| 54 |
`valarray<T>` object to which the `gslice_array` refers.
|
| 55 |
|
| 56 |
+
#### Compound assignment <a id="gslice.array.comp.assign">[[gslice.array.comp.assign]]</a>
|
| 57 |
|
| 58 |
``` cpp
|
| 59 |
void operator*= (const valarray<T>&) const;
|
| 60 |
void operator/= (const valarray<T>&) const;
|
| 61 |
void operator%= (const valarray<T>&) const;
|
|
|
|
| 71 |
These compound assignments have reference semantics, applying the
|
| 72 |
indicated operation to the elements of the argument array and selected
|
| 73 |
elements of the `valarray<T>` object to which the `gslice_array` object
|
| 74 |
refers.
|
| 75 |
|
| 76 |
+
#### Fill function <a id="gslice.array.fill">[[gslice.array.fill]]</a>
|
| 77 |
|
| 78 |
``` cpp
|
| 79 |
void operator=(const T&) const;
|
| 80 |
```
|
| 81 |
|