From Jason Turner

[istream.iterator.cons]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpdopw8cvw/{from.md → to.md} +16 -16
tmp/tmpdopw8cvw/{from.md → to.md} RENAMED
@@ -1,39 +1,39 @@
1
- #### `istream_iterator` constructors and destructor <a id="istream.iterator.cons">[[istream.iterator.cons]]</a>
2
 
3
  ``` cpp
4
  constexpr istream_iterator();
 
5
  ```
6
 
7
- *Effects:* Constructs the end-of-stream iterator. If
8
- `is_trivially_default_constructible_v<T>` is `true`, then this
9
- constructor is a constexpr constructor.
10
 
11
- *Postconditions:* `in_stream == 0`.
 
 
 
 
12
 
13
  ``` cpp
14
  istream_iterator(istream_type& s);
15
  ```
16
 
17
- *Effects:* Initializes `in_stream` with `addressof(s)`. `value` may be
18
- initialized during construction or the first time it is referenced.
19
-
20
- *Postconditions:* `in_stream == addressof(s)`.
21
 
22
  ``` cpp
23
  istream_iterator(const istream_iterator& x) = default;
24
  ```
25
 
26
- *Effects:* Constructs a copy of `x`. If
27
- `is_trivially_copy_constructible_v<T>` is `true`, then this constructor
28
- is a trivial copy constructor.
29
 
30
- *Postconditions:* `in_stream == x.in_stream`.
 
31
 
32
  ``` cpp
33
  ~istream_iterator() = default;
34
  ```
35
 
36
- *Effects:* The iterator is destroyed. If
37
- `is_trivially_destructible_v<T>` is `true`, then this destructor is a
38
- trivial destructor.
39
 
 
1
+ #### Constructors and destructor <a id="istream.iterator.cons">[[istream.iterator.cons]]</a>
2
 
3
  ``` cpp
4
  constexpr istream_iterator();
5
+ constexpr istream_iterator(default_sentinel_t);
6
  ```
7
 
8
+ *Effects:* Constructs the end-of-stream iterator, value-initializing
9
+ `value`.
 
10
 
11
+ *Ensures:* `in_stream == nullptr` is `true`.
12
+
13
+ *Remarks:* If the initializer `T()` in the declaration `auto x = T();`
14
+ is a constant initializer [[expr.const]], then these constructors are
15
+ `constexpr` constructors.
16
 
17
  ``` cpp
18
  istream_iterator(istream_type& s);
19
  ```
20
 
21
+ *Effects:* Initializes `in_stream` with `addressof(s)`,
22
+ value-initializes `value`, and then calls `operator++()`.
 
 
23
 
24
  ``` cpp
25
  istream_iterator(const istream_iterator& x) = default;
26
  ```
27
 
28
+ *Ensures:* `in_stream == x.in_stream` is `true`.
 
 
29
 
30
+ *Remarks:* If `is_trivially_copy_constructible_v<T>` is `true`, then
31
+ this constructor is trivial.
32
 
33
  ``` cpp
34
  ~istream_iterator() = default;
35
  ```
36
 
37
+ *Remarks:* If `is_trivially_destructible_v<T>` is `true`, then this
38
+ destructor is trivial.
 
39