tmp/tmplapvo0ms/{from.md → to.md}
RENAMED
|
@@ -2,11 +2,11 @@
|
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
namespace std {
|
| 5 |
template <class T> class slice_array {
|
| 6 |
public:
|
| 7 |
-
|
| 8 |
|
| 9 |
void operator= (const valarray<T>&) const;
|
| 10 |
void operator*= (const valarray<T>&) const;
|
| 11 |
void operator/= (const valarray<T>&) const;
|
| 12 |
void operator%= (const valarray<T>&) const;
|
|
@@ -36,9 +36,10 @@ slice_array<T> valarray<T>::operator[](slice);
|
|
| 36 |
```
|
| 37 |
|
| 38 |
It has reference semantics to a subset of an array specified by a
|
| 39 |
`slice` object.
|
| 40 |
|
| 41 |
-
The expression `a[slice(1, 5, 3)] = b;` has the effect of
|
| 42 |
-
elements of `b` to a slice of the elements in `a`. For the
|
| 43 |
-
the elements selected from `a` are 1, 4, ...,
|
|
|
|
| 44 |
|
|
|
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
namespace std {
|
| 5 |
template <class T> class slice_array {
|
| 6 |
public:
|
| 7 |
+
using value_type = T;
|
| 8 |
|
| 9 |
void operator= (const valarray<T>&) const;
|
| 10 |
void operator*= (const valarray<T>&) const;
|
| 11 |
void operator/= (const valarray<T>&) const;
|
| 12 |
void operator%= (const valarray<T>&) const;
|
|
|
|
| 36 |
```
|
| 37 |
|
| 38 |
It has reference semantics to a subset of an array specified by a
|
| 39 |
`slice` object.
|
| 40 |
|
| 41 |
+
[*Example 1*: The expression `a[slice(1, 5, 3)] = b;` has the effect of
|
| 42 |
+
assigning the elements of `b` to a slice of the elements in `a`. For the
|
| 43 |
+
slice shown, the elements selected from `a` are 1, 4, ...,
|
| 44 |
+
13. — *end example*]
|
| 45 |
|