From Jason Turner

[ios.base.storage]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpva0wpkh0/{from.md → to.md} +13 -13
tmp/tmpva0wpkh0/{from.md → to.md} RENAMED
@@ -2,25 +2,25 @@
2
 
3
  ``` cpp
4
  static int xalloc();
5
  ```
6
 
7
- *Returns:* `index` `++`.
8
 
9
  *Remarks:* Concurrent access to this function by multiple threads does
10
  not result in a data race [[intro.multithread]].
11
 
12
  ``` cpp
13
  long& iword(int idx);
14
  ```
15
 
16
  *Preconditions:* `idx` is a value obtained by a call to `xalloc`.
17
 
18
- *Effects:* If `iarray` is a null pointer, allocates an array of `long`
19
  of unspecified size and stores a pointer to its first element in
20
- `iarray`. The function then extends the array pointed at by `iarray` as
21
- necessary to include the element `iarray[idx]`. Each newly allocated
22
  element of the array is initialized to zero. The reference returned is
23
  invalid after any other operation on the object.[^6]
24
 
25
  However, the value of the storage referred to is retained, so that until
26
  the next call to `copyfmt`, calling `iword` with the same index yields
@@ -29,28 +29,28 @@ another reference to the same value. If the function fails[^7]
29
  and `*this` is a base class subobject of a `basic_ios<>` object or
30
  subobject, the effect is equivalent to calling
31
  `basic_ios<>::setstate(badbit)` on the derived object (which may throw
32
  `failure`).
33
 
34
- *Returns:* On success `iarray[idx]`. On failure, a valid `long&`
35
  initialized to 0.
36
 
37
  ``` cpp
38
  void*& pword(int idx);
39
  ```
40
 
41
  *Preconditions:* `idx` is a value obtained by a call to `xalloc`.
42
 
43
- *Effects:* If `parray` is a null pointer, allocates an array of pointers
44
  to `void` of unspecified size and stores a pointer to its first element
45
- in `parray`. The function then extends the array pointed at by `parray`
46
- as necessary to include the element `parray[idx]`. Each newly allocated
47
- element of the array is initialized to a null pointer. The reference
48
- returned is invalid after any other operation on the object. However,
49
- the value of the storage referred to is retained, so that until the next
50
- call to `copyfmt`, calling `pword` with the same index yields another
51
- reference to the same value. If the function fails[^8]
52
 
53
  and `*this` is a base class subobject of a `basic_ios<>` object or
54
  subobject, the effect is equivalent to calling
55
  `basic_ios<>::setstate(badbit)` on the derived object (which may throw
56
  `failure`).
 
2
 
3
  ``` cpp
4
  static int xalloc();
5
  ```
6
 
7
+ *Returns:* *index* `++`.
8
 
9
  *Remarks:* Concurrent access to this function by multiple threads does
10
  not result in a data race [[intro.multithread]].
11
 
12
  ``` cpp
13
  long& iword(int idx);
14
  ```
15
 
16
  *Preconditions:* `idx` is a value obtained by a call to `xalloc`.
17
 
18
+ *Effects:* If *iarray* is a null pointer, allocates an array of `long`
19
  of unspecified size and stores a pointer to its first element in
20
+ *iarray*. The function then extends the array pointed at by *iarray* as
21
+ necessary to include the element *`iarray`*`[idx]`. Each newly allocated
22
  element of the array is initialized to zero. The reference returned is
23
  invalid after any other operation on the object.[^6]
24
 
25
  However, the value of the storage referred to is retained, so that until
26
  the next call to `copyfmt`, calling `iword` with the same index yields
 
29
  and `*this` is a base class subobject of a `basic_ios<>` object or
30
  subobject, the effect is equivalent to calling
31
  `basic_ios<>::setstate(badbit)` on the derived object (which may throw
32
  `failure`).
33
 
34
+ *Returns:* On success *`iarray`*`[idx]`. On failure, a valid `long&`
35
  initialized to 0.
36
 
37
  ``` cpp
38
  void*& pword(int idx);
39
  ```
40
 
41
  *Preconditions:* `idx` is a value obtained by a call to `xalloc`.
42
 
43
+ *Effects:* If *parray* is a null pointer, allocates an array of pointers
44
  to `void` of unspecified size and stores a pointer to its first element
45
+ in *parray*. The function then extends the array pointed at by *parray*
46
+ as necessary to include the element *`parray`*`[idx]`. Each newly
47
+ allocated element of the array is initialized to a null pointer. The
48
+ reference returned is invalid after any other operation on the object.
49
+ However, the value of the storage referred to is retained, so that until
50
+ the next call to `copyfmt`, calling `pword` with the same index yields
51
+ another reference to the same value. If the function fails[^8]
52
 
53
  and `*this` is a base class subobject of a `basic_ios<>` object or
54
  subobject, the effect is equivalent to calling
55
  `basic_ios<>::setstate(badbit)` on the derived object (which may throw
56
  `failure`).