tmp/tmpi52c4zxb/{from.md → to.md}
RENAMED
|
@@ -1,53 +1,55 @@
|
|
| 1 |
#### Class template `basic_iostream` <a id="iostreamclass">[[iostreamclass]]</a>
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
namespace std {
|
| 5 |
template <class charT, class traits = char_traits<charT>>
|
| 6 |
-
class basic_iostream
|
| 7 |
-
public basic_istream<charT,traits>,
|
| 8 |
public basic_ostream<charT, traits> {
|
| 9 |
public:
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
typedef traits traits_type;
|
| 16 |
|
| 17 |
-
// constructor
|
| 18 |
explicit basic_iostream(basic_streambuf<charT, traits>* sb);
|
|
|
|
|
|
|
| 19 |
virtual ~basic_iostream();
|
| 20 |
|
| 21 |
protected:
|
|
|
|
| 22 |
basic_iostream(const basic_iostream& rhs) = delete;
|
| 23 |
basic_iostream(basic_iostream&& rhs);
|
| 24 |
|
| 25 |
-
// assign
|
| 26 |
basic_iostream& operator=(const basic_iostream& rhs) = delete;
|
| 27 |
basic_iostream& operator=(basic_iostream&& rhs);
|
| 28 |
void swap(basic_iostream& rhs);
|
| 29 |
};
|
| 30 |
}
|
| 31 |
```
|
| 32 |
|
| 33 |
-
The class `basic_iostream` inherits a number of functions that
|
| 34 |
-
reading input and writing output to sequences controlled by a
|
| 35 |
-
buffer.
|
| 36 |
|
| 37 |
##### `basic_iostream` constructors <a id="iostream.cons">[[iostream.cons]]</a>
|
| 38 |
|
| 39 |
``` cpp
|
| 40 |
explicit basic_iostream(basic_streambuf<charT, traits>* sb);
|
| 41 |
```
|
| 42 |
|
| 43 |
-
*Effects:* Constructs an object of class `basic_iostream`,
|
| 44 |
-
|
| 45 |
`basic_istream<charT, traits>(sb)` ([[istream]]) and
|
| 46 |
-
`basic_ostream<charT,traits>(sb)`
|
| 47 |
|
| 48 |
-
`rdbuf()==sb` and `gcount()==0`.
|
| 49 |
|
| 50 |
``` cpp
|
| 51 |
basic_iostream(basic_iostream&& rhs);
|
| 52 |
```
|
| 53 |
|
|
@@ -68,11 +70,11 @@ virtual ~basic_iostream();
|
|
| 68 |
|
| 69 |
``` cpp
|
| 70 |
basic_iostream& operator=(basic_iostream&& rhs);
|
| 71 |
```
|
| 72 |
|
| 73 |
-
*Effects:* `swap(rhs)`.
|
| 74 |
|
| 75 |
``` cpp
|
| 76 |
void swap(basic_iostream& rhs);
|
| 77 |
```
|
| 78 |
|
|
|
|
| 1 |
#### Class template `basic_iostream` <a id="iostreamclass">[[iostreamclass]]</a>
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
namespace std {
|
| 5 |
template <class charT, class traits = char_traits<charT>>
|
| 6 |
+
class basic_iostream
|
| 7 |
+
: public basic_istream<charT, traits>,
|
| 8 |
public basic_ostream<charT, traits> {
|
| 9 |
public:
|
| 10 |
+
using char_type = charT;
|
| 11 |
+
using int_type = typename traits::int_type;
|
| 12 |
+
using pos_type = typename traits::pos_type;
|
| 13 |
+
using off_type = typename traits::off_type;
|
| 14 |
+
using traits_type = traits;
|
|
|
|
| 15 |
|
| 16 |
+
// [iostream.cons], constructor
|
| 17 |
explicit basic_iostream(basic_streambuf<charT, traits>* sb);
|
| 18 |
+
|
| 19 |
+
// [iostream.dest], destructor
|
| 20 |
virtual ~basic_iostream();
|
| 21 |
|
| 22 |
protected:
|
| 23 |
+
// [iostream.cons], constructor
|
| 24 |
basic_iostream(const basic_iostream& rhs) = delete;
|
| 25 |
basic_iostream(basic_iostream&& rhs);
|
| 26 |
|
| 27 |
+
// [iostream.assign], assign and swap
|
| 28 |
basic_iostream& operator=(const basic_iostream& rhs) = delete;
|
| 29 |
basic_iostream& operator=(basic_iostream&& rhs);
|
| 30 |
void swap(basic_iostream& rhs);
|
| 31 |
};
|
| 32 |
}
|
| 33 |
```
|
| 34 |
|
| 35 |
+
The class template `basic_iostream` inherits a number of functions that
|
| 36 |
+
allow reading input and writing output to sequences controlled by a
|
| 37 |
+
stream buffer.
|
| 38 |
|
| 39 |
##### `basic_iostream` constructors <a id="iostream.cons">[[iostream.cons]]</a>
|
| 40 |
|
| 41 |
``` cpp
|
| 42 |
explicit basic_iostream(basic_streambuf<charT, traits>* sb);
|
| 43 |
```
|
| 44 |
|
| 45 |
+
*Effects:* Constructs an object of class `basic_iostream`, initializing
|
| 46 |
+
the base class subobjects with
|
| 47 |
`basic_istream<charT, traits>(sb)` ([[istream]]) and
|
| 48 |
+
`basic_ostream<charT, traits>(sb)` ([[ostream]]).
|
| 49 |
|
| 50 |
+
*Postconditions:* `rdbuf() == sb` and `gcount() == 0`.
|
| 51 |
|
| 52 |
``` cpp
|
| 53 |
basic_iostream(basic_iostream&& rhs);
|
| 54 |
```
|
| 55 |
|
|
|
|
| 70 |
|
| 71 |
``` cpp
|
| 72 |
basic_iostream& operator=(basic_iostream&& rhs);
|
| 73 |
```
|
| 74 |
|
| 75 |
+
*Effects:* As if by `swap(rhs)`.
|
| 76 |
|
| 77 |
``` cpp
|
| 78 |
void swap(basic_iostream& rhs);
|
| 79 |
```
|
| 80 |
|