tmp/tmpe5f_do64/{from.md → to.md}
RENAMED
|
@@ -4,17 +4,17 @@ The class template `istreambuf_iterator` defines an input iterator (
|
|
| 4 |
[[input.iterators]]) that reads successive *characters* from the
|
| 5 |
streambuf for which it was constructed. `operator*` provides access to
|
| 6 |
the current input character, if any. `operator->` may return a proxy.
|
| 7 |
Each time `operator++` is evaluated, the iterator advances to the next
|
| 8 |
input character. If the end of stream is reached
|
| 9 |
-
(streambuf_type::sgetc() returns `traits::eof()`), the iterator
|
| 10 |
-
equal to the *end-of-stream* iterator value. The default
|
| 11 |
-
`istreambuf_iterator()` and the constructor
|
| 12 |
-
both construct an end-of-stream iterator object
|
| 13 |
-
end-of-range. All specializations of
|
| 14 |
-
|
| 15 |
-
trivial destructor.
|
| 16 |
|
| 17 |
The result of `operator*()` on an end-of-stream iterator is undefined.
|
| 18 |
For any other iterator value a `char_type` value is returned. It is
|
| 19 |
impossible to assign a character via an input iterator.
|
| 20 |
|
|
@@ -60,15 +60,14 @@ namespace std {
|
|
| 60 |
#### Class template `istreambuf_iterator::proxy` <a id="istreambuf.iterator::proxy">[[istreambuf.iterator::proxy]]</a>
|
| 61 |
|
| 62 |
``` cpp
|
| 63 |
namespace std {
|
| 64 |
template <class charT, class traits = char_traits<charT> >
|
| 65 |
-
class istreambuf_iterator<charT, traits>::proxy {
|
| 66 |
charT keep_;
|
| 67 |
basic_streambuf<charT,traits>* sbuf_;
|
| 68 |
-
proxy(charT c,
|
| 69 |
-
basic_streambuf<charT,traits>* sbuf)
|
| 70 |
: keep_(c), sbuf_(sbuf) { }
|
| 71 |
public:
|
| 72 |
charT operator*() { return keep_; }
|
| 73 |
};
|
| 74 |
}
|
|
@@ -112,28 +111,28 @@ constructor argument `p`.
|
|
| 112 |
``` cpp
|
| 113 |
charT operator*() const
|
| 114 |
```
|
| 115 |
|
| 116 |
*Returns:* The character obtained via the `streambuf` member
|
| 117 |
-
|
| 118 |
|
| 119 |
#### `istreambuf_iterator::operator++` <a id="istreambuf.iterator::op++">[[istreambuf.iterator::op++]]</a>
|
| 120 |
|
| 121 |
``` cpp
|
| 122 |
istreambuf_iterator<charT,traits>&
|
| 123 |
istreambuf_iterator<charT,traits>::operator++();
|
| 124 |
```
|
| 125 |
|
| 126 |
-
*Effects:*
|
| 127 |
|
| 128 |
*Returns:* `*this`.
|
| 129 |
|
| 130 |
``` cpp
|
| 131 |
proxy istreambuf_iterator<charT,traits>::operator++(int);
|
| 132 |
```
|
| 133 |
|
| 134 |
-
*Returns:* `proxy(
|
| 135 |
|
| 136 |
#### `istreambuf_iterator::equal` <a id="istreambuf.iterator::equal">[[istreambuf.iterator::equal]]</a>
|
| 137 |
|
| 138 |
``` cpp
|
| 139 |
bool equal(const istreambuf_iterator<charT,traits>& b) const;
|
|
|
|
| 4 |
[[input.iterators]]) that reads successive *characters* from the
|
| 5 |
streambuf for which it was constructed. `operator*` provides access to
|
| 6 |
the current input character, if any. `operator->` may return a proxy.
|
| 7 |
Each time `operator++` is evaluated, the iterator advances to the next
|
| 8 |
input character. If the end of stream is reached
|
| 9 |
+
(`streambuf_type::sgetc()` returns `traits::eof()`), the iterator
|
| 10 |
+
becomes equal to the *end-of-stream* iterator value. The default
|
| 11 |
+
constructor `istreambuf_iterator()` and the constructor
|
| 12 |
+
`istreambuf_iterator(0)` both construct an end-of-stream iterator object
|
| 13 |
+
suitable for use as an end-of-range. All specializations of
|
| 14 |
+
`istreambuf_iterator` shall have a trivial copy constructor, a
|
| 15 |
+
`constexpr` default constructor, and a trivial destructor.
|
| 16 |
|
| 17 |
The result of `operator*()` on an end-of-stream iterator is undefined.
|
| 18 |
For any other iterator value a `char_type` value is returned. It is
|
| 19 |
impossible to assign a character via an input iterator.
|
| 20 |
|
|
|
|
| 60 |
#### Class template `istreambuf_iterator::proxy` <a id="istreambuf.iterator::proxy">[[istreambuf.iterator::proxy]]</a>
|
| 61 |
|
| 62 |
``` cpp
|
| 63 |
namespace std {
|
| 64 |
template <class charT, class traits = char_traits<charT> >
|
| 65 |
+
class istreambuf_iterator<charT, traits>::proxy { // exposition only
|
| 66 |
charT keep_;
|
| 67 |
basic_streambuf<charT,traits>* sbuf_;
|
| 68 |
+
proxy(charT c, basic_streambuf<charT,traits>* sbuf)
|
|
|
|
| 69 |
: keep_(c), sbuf_(sbuf) { }
|
| 70 |
public:
|
| 71 |
charT operator*() { return keep_; }
|
| 72 |
};
|
| 73 |
}
|
|
|
|
| 111 |
``` cpp
|
| 112 |
charT operator*() const
|
| 113 |
```
|
| 114 |
|
| 115 |
*Returns:* The character obtained via the `streambuf` member
|
| 116 |
+
`sbuf_->sgetc()`.
|
| 117 |
|
| 118 |
#### `istreambuf_iterator::operator++` <a id="istreambuf.iterator::op++">[[istreambuf.iterator::op++]]</a>
|
| 119 |
|
| 120 |
``` cpp
|
| 121 |
istreambuf_iterator<charT,traits>&
|
| 122 |
istreambuf_iterator<charT,traits>::operator++();
|
| 123 |
```
|
| 124 |
|
| 125 |
+
*Effects:* `sbuf_->sbumpc()`.
|
| 126 |
|
| 127 |
*Returns:* `*this`.
|
| 128 |
|
| 129 |
``` cpp
|
| 130 |
proxy istreambuf_iterator<charT,traits>::operator++(int);
|
| 131 |
```
|
| 132 |
|
| 133 |
+
*Returns:* `proxy(sbuf_->sbumpc(), sbuf_)`.
|
| 134 |
|
| 135 |
#### `istreambuf_iterator::equal` <a id="istreambuf.iterator::equal">[[istreambuf.iterator::equal]]</a>
|
| 136 |
|
| 137 |
``` cpp
|
| 138 |
bool equal(const istreambuf_iterator<charT,traits>& b) const;
|