From Jason Turner

[fstream.cons]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpe33goxvn/{from.md → to.md} +10 -10
tmp/tmpe33goxvn/{from.md → to.md} RENAMED
@@ -1,13 +1,13 @@
1
- #### `basic_fstream` constructors <a id="fstream.cons">[[fstream.cons]]</a>
2
 
3
  ``` cpp
4
  basic_fstream();
5
  ```
6
 
7
- *Effects:* Constructs an object of class `basic_fstream<charT, traits>`,
8
- initializing the base class with `basic_iostream(&sb)` and initializing
9
  `sb` with `basic_filebuf<charT, traits>()`.
10
 
11
  ``` cpp
12
  explicit basic_fstream(
13
  const char* s,
@@ -15,12 +15,12 @@ explicit basic_fstream(
15
  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:* Constructs an object of class `basic_fstream<charT, traits>`,
21
- initializing the base class with `basic_iostream(&sb)` and initializing
22
  `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
@@ -30,16 +30,16 @@ explicit basic_fstream(
30
  explicit basic_fstream(
31
  const filesystem::path& s,
32
  ios_base::openmode mode = ios_base::in | ios_base::out);
33
  ```
34
 
35
- *Effects:* The same as `basic_fstream(s.c_str(), mode)`.
36
 
37
  ``` cpp
38
  basic_fstream(basic_fstream&& rhs);
39
  ```
40
 
41
- *Effects:* Move constructs from the rvalue `rhs`. This is accomplished
42
- by move constructing the base class, and the contained `basic_filebuf`.
43
- Next `basic_istream<charT, traits>::set_rdbuf(&sb)` is called to install
44
- the contained `basic_filebuf`.
45
 
 
1
+ #### Constructors <a id="fstream.cons">[[fstream.cons]]</a>
2
 
3
  ``` cpp
4
  basic_fstream();
5
  ```
6
 
7
+ *Effects:* Initializes the base class with
8
+ `basic_iostream<charT, traits>(addressof(sb))` [[iostream.cons]] and
9
  `sb` with `basic_filebuf<charT, traits>()`.
10
 
11
  ``` cpp
12
  explicit basic_fstream(
13
  const char* s,
 
15
  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]] and
22
  `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
 
30
  explicit basic_fstream(
31
  const filesystem::path& s,
32
  ios_base::openmode mode = ios_base::in | ios_base::out);
33
  ```
34
 
35
+ *Effects:* Equivalent to: `basic_fstream(s.c_str(), mode)`.
36
 
37
  ``` cpp
38
  basic_fstream(basic_fstream&& rhs);
39
  ```
40
 
41
+ *Effects:* Move constructs the base class, and the contained
42
+ `basic_filebuf`. Then calls
43
+ `basic_istream<charT, traits>::set_rdbuf(addressof(sb))` to install the
44
+ contained `basic_filebuf`.
45