tmp/tmpsxio9yu0/{from.md → to.md}
RENAMED
|
@@ -77,24 +77,10 @@ namespace std {
|
|
| 77 |
typedef random_access_iterator_tag iterator_category;
|
| 78 |
};
|
| 79 |
}
|
| 80 |
```
|
| 81 |
|
| 82 |
-
If there is an additional pointer type ` \xname{far}` such that the
|
| 83 |
-
difference of two ` \xname{far}` is of type `long`, an implementation
|
| 84 |
-
may define
|
| 85 |
-
|
| 86 |
-
``` cpp
|
| 87 |
-
template<class T> struct iterator_traits<T __far*> {
|
| 88 |
-
typedef long difference_type;
|
| 89 |
-
typedef T value_type;
|
| 90 |
-
typedef T __far* pointer;
|
| 91 |
-
typedef T __far& reference;
|
| 92 |
-
typedef random_access_iterator_tag iterator_category;
|
| 93 |
-
};
|
| 94 |
-
```
|
| 95 |
-
|
| 96 |
To implement a generic `reverse` function, a C++program can do the
|
| 97 |
following:
|
| 98 |
|
| 99 |
``` cpp
|
| 100 |
template <class BidirectionalIterator>
|
|
|
|
| 77 |
typedef random_access_iterator_tag iterator_category;
|
| 78 |
};
|
| 79 |
}
|
| 80 |
```
|
| 81 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 82 |
To implement a generic `reverse` function, a C++program can do the
|
| 83 |
following:
|
| 84 |
|
| 85 |
``` cpp
|
| 86 |
template <class BidirectionalIterator>
|