From Jason Turner

[ifstream.cons]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpp5kyr1_c/{from.md → to.md} +14 -15
tmp/tmpp5kyr1_c/{from.md → to.md} RENAMED
@@ -1,42 +1,41 @@
1
- #### `basic_ifstream` constructors <a id="ifstream.cons">[[ifstream.cons]]</a>
2
 
3
  ``` cpp
4
  basic_ifstream();
5
  ```
6
 
7
- *Effects:* Constructs an object of class
8
- `basic_ifstream<charT, traits>`, initializing the base class with
9
- `basic_istream(&sb)` and initializing `sb` with
10
- `basic_filebuf<charT, traits>())` ([[istream.cons]], [[filebuf.cons]]).
11
 
12
  ``` cpp
13
  explicit basic_ifstream(const char* s,
14
  ios_base::openmode mode = ios_base::in);
15
  explicit basic_ifstream(const filesystem::path::value_type* s,
16
  ios_base::openmode mode = ios_base::in); // wide systems only; see [fstream.syn]
17
  ```
18
 
19
- *Effects:* Constructs an object of class `basic_ifstream`, initializing
20
- the base class with `basic_istream(&sb)` and initializing `sb` with
21
- `basic_filebuf<charT, traits>())` ([[istream.cons]], [[filebuf.cons]]),
22
- then calls `rdbuf()->open(s, mode | ios_base::in)`. If that function
23
- returns a null pointer, calls `setstate(failbit)`.
24
 
25
  ``` cpp
26
  explicit basic_ifstream(const string& s,
27
  ios_base::openmode mode = ios_base::in);
28
  explicit basic_ifstream(const filesystem::path& s,
29
  ios_base::openmode mode = ios_base::in);
30
  ```
31
 
32
- *Effects:* The same as `basic_ifstream(s.c_str(), mode)`.
33
 
34
  ``` cpp
35
  basic_ifstream(basic_ifstream&& rhs);
36
  ```
37
 
38
- *Effects:* Move constructs from the rvalue `rhs`. This is accomplished
39
- by move constructing the base class, and the contained `basic_filebuf`.
40
- Next `basic_istream<charT, traits>::set_rdbuf(&sb)` is called to install
41
- the contained `basic_filebuf`.
42
 
 
1
+ #### Constructors <a id="ifstream.cons">[[ifstream.cons]]</a>
2
 
3
  ``` cpp
4
  basic_ifstream();
5
  ```
6
 
7
+ *Effects:* Initializes the base class with
8
+ `basic_istream<charT, traits>(addressof(sb))` [[istream.cons]] and `sb`
9
+ with `basic_filebuf<charT, traits>()` [[filebuf.cons]].
 
10
 
11
  ``` cpp
12
  explicit basic_ifstream(const char* s,
13
  ios_base::openmode mode = ios_base::in);
14
  explicit basic_ifstream(const filesystem::path::value_type* s,
15
  ios_base::openmode mode = ios_base::in); // wide systems only; see [fstream.syn]
16
  ```
17
 
18
+ *Effects:* Initializes the base class with
19
+ `basic_istream<charT, traits>(addressof(sb))` [[istream.cons]] and `sb`
20
+ with `basic_filebuf<charT, traits>()` [[filebuf.cons]], then calls
21
+ `rdbuf()->open(s, mode | ios_base::in)`. If that function returns a null
22
+ pointer, calls `setstate(failbit)`.
23
 
24
  ``` cpp
25
  explicit basic_ifstream(const string& s,
26
  ios_base::openmode mode = ios_base::in);
27
  explicit basic_ifstream(const filesystem::path& s,
28
  ios_base::openmode mode = ios_base::in);
29
  ```
30
 
31
+ *Effects:* Equivalent to: `basic_ifstream(s.c_str(), mode)`.
32
 
33
  ``` cpp
34
  basic_ifstream(basic_ifstream&& rhs);
35
  ```
36
 
37
+ *Effects:* Move constructs the base class, and the contained
38
+ `basic_filebuf`. Then calls
39
+ `basic_istream<charT, traits>::set_rdbuf(addressof(sb))` to install the
40
+ contained `basic_filebuf`.
41