tmp/tmp0w6vgoto/{from.md → to.md}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
-
####
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
namespace std {
|
| 5 |
template<class T> class slice_array {
|
| 6 |
public:
|
|
@@ -26,20 +26,20 @@ namespace std {
|
|
| 26 |
slice_array() = delete; // as implied by declaring copy constructor above
|
| 27 |
};
|
| 28 |
}
|
| 29 |
```
|
| 30 |
|
| 31 |
-
|
| 32 |
-
|
| 33 |
|
| 34 |
``` cpp
|
| 35 |
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 |
[*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
|
| 44 |
-
13. — *end example*]
|
| 45 |
|
|
|
|
| 1 |
+
#### Overview <a id="template.slice.array.overview">[[template.slice.array.overview]]</a>
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
namespace std {
|
| 5 |
template<class T> class slice_array {
|
| 6 |
public:
|
|
|
|
| 26 |
slice_array() = delete; // as implied by declaring copy constructor above
|
| 27 |
};
|
| 28 |
}
|
| 29 |
```
|
| 30 |
|
| 31 |
+
This template is a helper template used by the `slice` subscript
|
| 32 |
+
operator
|
| 33 |
|
| 34 |
``` cpp
|
| 35 |
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 |
[*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
|
| 44 |
+
1, 4, …, 13. — *end example*]
|
| 45 |
|