tmp/tmpzep9hn8c/{from.md → to.md}
RENAMED
|
@@ -3,12 +3,12 @@
|
|
| 3 |
``` cpp
|
| 4 |
basic_fstream();
|
| 5 |
```
|
| 6 |
|
| 7 |
*Effects:* Initializes the base class with
|
| 8 |
-
`basic_iostream<charT, traits>(addressof(sb))` [[iostream.cons]]
|
| 9 |
-
|
| 10 |
|
| 11 |
``` cpp
|
| 12 |
explicit basic_fstream(
|
| 13 |
const char* s,
|
| 14 |
ios_base::openmode mode = ios_base::in | ios_base::out);
|
|
@@ -16,36 +16,36 @@ explicit basic_fstream(
|
|
| 16 |
const filesystem::path::value_type* s,
|
| 17 |
ios_base::openmode mode = ios_base::in | ios_base::out); // wide systems only; see [fstream.syn]
|
| 18 |
```
|
| 19 |
|
| 20 |
*Effects:* Initializes the base class with
|
| 21 |
-
`basic_iostream<charT, traits>(addressof(sb))` [[iostream.cons]]
|
| 22 |
-
|
| 23 |
`rdbuf()->open(s, mode)`. If that function returns a null pointer, calls
|
| 24 |
`setstate(failbit)`.
|
| 25 |
|
| 26 |
``` cpp
|
| 27 |
explicit basic_fstream(
|
| 28 |
const string& s,
|
| 29 |
ios_base::openmode mode = ios_base::in | ios_base::out);
|
| 30 |
```
|
| 31 |
|
| 32 |
-
*Effects:* Equivalent to
|
| 33 |
|
| 34 |
``` cpp
|
| 35 |
template<class T>
|
| 36 |
explicit basic_fstream(const T& s, ios_base::openmode mode = ios_base::in | ios_base::out);
|
| 37 |
```
|
| 38 |
|
| 39 |
*Constraints:* `is_same_v<T, filesystem::path>` is `true`.
|
| 40 |
|
| 41 |
-
*Effects:* Equivalent to
|
| 42 |
|
| 43 |
``` cpp
|
| 44 |
basic_fstream(basic_fstream&& rhs);
|
| 45 |
```
|
| 46 |
|
| 47 |
*Effects:* Move constructs the base class, and the contained
|
| 48 |
`basic_filebuf`. Then calls
|
| 49 |
-
`basic_istream<charT, traits>::set_rdbuf(addressof(sb))` to
|
| 50 |
-
contained `basic_filebuf`.
|
| 51 |
|
|
|
|
| 3 |
``` cpp
|
| 4 |
basic_fstream();
|
| 5 |
```
|
| 6 |
|
| 7 |
*Effects:* Initializes the base class with
|
| 8 |
+
`basic_iostream<charT, traits>(addressof(`*`sb`*`))` [[iostream.cons]]
|
| 9 |
+
and *sb* with `basic_filebuf<charT, traits>()`.
|
| 10 |
|
| 11 |
``` cpp
|
| 12 |
explicit basic_fstream(
|
| 13 |
const char* s,
|
| 14 |
ios_base::openmode mode = ios_base::in | ios_base::out);
|
|
|
|
| 16 |
const filesystem::path::value_type* s,
|
| 17 |
ios_base::openmode mode = ios_base::in | ios_base::out); // wide systems only; see [fstream.syn]
|
| 18 |
```
|
| 19 |
|
| 20 |
*Effects:* Initializes the base class with
|
| 21 |
+
`basic_iostream<charT, traits>(addressof(`*`sb`*`))` [[iostream.cons]]
|
| 22 |
+
and *sb* with `basic_filebuf<charT, traits>()`. Then calls
|
| 23 |
`rdbuf()->open(s, mode)`. If that function returns a null pointer, calls
|
| 24 |
`setstate(failbit)`.
|
| 25 |
|
| 26 |
``` cpp
|
| 27 |
explicit basic_fstream(
|
| 28 |
const string& s,
|
| 29 |
ios_base::openmode mode = ios_base::in | ios_base::out);
|
| 30 |
```
|
| 31 |
|
| 32 |
+
*Effects:* Equivalent to `basic_fstream(s.c_str(), mode)`.
|
| 33 |
|
| 34 |
``` cpp
|
| 35 |
template<class T>
|
| 36 |
explicit basic_fstream(const T& s, ios_base::openmode mode = ios_base::in | ios_base::out);
|
| 37 |
```
|
| 38 |
|
| 39 |
*Constraints:* `is_same_v<T, filesystem::path>` is `true`.
|
| 40 |
|
| 41 |
+
*Effects:* Equivalent to `basic_fstream(s.c_str(), mode)`.
|
| 42 |
|
| 43 |
``` cpp
|
| 44 |
basic_fstream(basic_fstream&& rhs);
|
| 45 |
```
|
| 46 |
|
| 47 |
*Effects:* Move constructs the base class, and the contained
|
| 48 |
`basic_filebuf`. Then calls
|
| 49 |
+
`basic_istream<charT, traits>::set_rdbuf(addressof(`*`sb`*`))` to
|
| 50 |
+
install the contained `basic_filebuf`.
|
| 51 |
|