tmp/tmpa90d00fw/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
### Header `<fstream>` synopsis <a id="fstream.syn">[[fstream.syn]]</a>
|
| 2 |
+
|
| 3 |
+
``` cpp
|
| 4 |
+
namespace std {
|
| 5 |
+
template <class charT, class traits = char_traits<charT>>
|
| 6 |
+
class basic_filebuf;
|
| 7 |
+
using filebuf = basic_filebuf<char>;
|
| 8 |
+
using wfilebuf = basic_filebuf<wchar_t>;
|
| 9 |
+
|
| 10 |
+
template <class charT, class traits = char_traits<charT>>
|
| 11 |
+
class basic_ifstream;
|
| 12 |
+
using ifstream = basic_ifstream<char>;
|
| 13 |
+
using wifstream = basic_ifstream<wchar_t>;
|
| 14 |
+
|
| 15 |
+
template <class charT, class traits = char_traits<charT>>
|
| 16 |
+
class basic_ofstream;
|
| 17 |
+
using ofstream = basic_ofstream<char>;
|
| 18 |
+
using wofstream = basic_ofstream<wchar_t>;
|
| 19 |
+
|
| 20 |
+
template <class charT, class traits = char_traits<charT>>
|
| 21 |
+
class basic_fstream;
|
| 22 |
+
using fstream = basic_fstream<char>;
|
| 23 |
+
using wfstream = basic_fstream<wchar_t>;
|
| 24 |
+
}
|
| 25 |
+
```
|
| 26 |
+
|
| 27 |
+
The header `<fstream>` defines four class templates and eight types that
|
| 28 |
+
associate stream buffers with files and assist reading and writing
|
| 29 |
+
files.
|
| 30 |
+
|
| 31 |
+
[*Note 1*: The class template `basic_filebuf` treats a file as a source
|
| 32 |
+
or sink of bytes. In an environment that uses a large character set, the
|
| 33 |
+
file typically holds multibyte character sequences and the
|
| 34 |
+
`basic_filebuf` object converts those multibyte sequences into wide
|
| 35 |
+
character sequences. — *end note*]
|
| 36 |
+
|
| 37 |
+
In this subclause, member functions taking arguments of
|
| 38 |
+
`const filesystem::path::value_type*` are only be provided on systems
|
| 39 |
+
where `filesystem::path::value_type` ([[fs.class.path]]) is not `char`.
|
| 40 |
+
|
| 41 |
+
[*Note 2*: These functions enable class `path` support for systems with
|
| 42 |
+
a wide native path character type, such as `wchar_t`. — *end note*]
|
| 43 |
+
|