From Jason Turner

[fpos]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpd4grjujn/{from.md → to.md} +24 -15
tmp/tmpd4grjujn/{from.md → to.md} RENAMED
@@ -11,11 +11,11 @@ namespace std {
11
  stateT st; // exposition only
12
  };
13
  }
14
  ```
15
 
16
- #### `fpos` members <a id="fpos.members">[[fpos.members]]</a>
17
 
18
  ``` cpp
19
  void state(stateT s);
20
  ```
21
 
@@ -25,27 +25,36 @@ void state(stateT s);
25
  stateT state() const;
26
  ```
27
 
28
  *Returns:* Current value of `st`.
29
 
30
- #### `fpos` requirements <a id="fpos.operations">[[fpos.operations]]</a>
31
 
32
- Operations specified in Table  [[tab:iostreams.position.requirements]]
33
- are permitted. In that table,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
 
35
  - `P` refers to an instance of `fpos`,
36
- - `p` and `q` refer to values of type `P`,
37
- - `O` refers to type `streamoff`,
38
- - `o` refers to a value of type `streamoff`,
39
- - `sz` refers to a value of type `streamsize` and
40
- - `i` refers to a value of type `int`.
41
-
42
- [*Note 1*: Every implementation is required to supply overloaded
43
- operators on `fpos` objects to satisfy the requirements of 
44
- [[fpos.operations]]. It is unspecified whether these operators are
45
- members of `fpos`, global operators, or provided in some other
46
- way. — *end note*]
47
 
48
  Stream operations that return a value of type `traits::pos_type` return
49
  `P(O(-1))` as an invalid value to signal an error. If this value is used
50
  as an argument to any `istream`, `ostream`, or `streambuf` member that
51
  accepts a value of type `traits::pos_type` then the behavior of that
 
11
  stateT st; // exposition only
12
  };
13
  }
14
  ```
15
 
16
+ #### Members <a id="fpos.members">[[fpos.members]]</a>
17
 
18
  ``` cpp
19
  void state(stateT s);
20
  ```
21
 
 
25
  stateT state() const;
26
  ```
27
 
28
  *Returns:* Current value of `st`.
29
 
30
+ #### Requirements <a id="fpos.operations">[[fpos.operations]]</a>
31
 
32
+ An `fpos` type specifies file position information. It holds a state
33
+ object whose type is equal to the template parameter `stateT`. Type
34
+ `stateT` shall meet the *Cpp17DefaultConstructible* (
35
+ [[cpp17.defaultconstructible]]), *Cpp17CopyConstructible* (
36
+ [[cpp17.copyconstructible]]), *Cpp17CopyAssignable* (
37
+ [[cpp17.copyassignable]]), and *Cpp17Destructible* (
38
+ [[cpp17.destructible]]) requirements. If
39
+ `is_trivially_copy_constructible_v<stateT>` is `true`, then
40
+ `fpos<stateT>` has a trivial copy constructor. If
41
+ `is_trivially_copy_assignable<stateT>` is `true`, then `fpos<stateT>`
42
+ has a trivial copy assignment operator. If
43
+ `is_trivially_destructible_v<stateT>` is `true`, then `fpos<stateT>` has
44
+ a trivial destructor. All specializations of `fpos` meet the
45
+ *Cpp17DefaultConstructible*, *Cpp17CopyConstructible*,
46
+ *Cpp17CopyAssignable*, *Cpp17Destructible*, and
47
+ *Cpp17EqualityComparable* ([[cpp17.equalitycomparable]]) requirements.
48
+ In addition, the expressions shown in [[fpos.operations]] are valid and
49
+ have the indicated semantics. In that table,
50
 
51
  - `P` refers to an instance of `fpos`,
52
+ - `p` and `q` refer to values of type `P` or `const P`,
53
+ - `pl` and `ql` refer to modifiable lvalues of type `P`,
54
+ - `O` refers to type `streamoff`, and
55
+ - `o` refers to a value of type `streamoff` or `const streamoff`.
 
 
 
 
 
 
 
56
 
57
  Stream operations that return a value of type `traits::pos_type` return
58
  `P(O(-1))` as an invalid value to signal an error. If this value is used
59
  as an argument to any `istream`, `ostream`, or `streambuf` member that
60
  accepts a value of type `traits::pos_type` then the behavior of that