From Jason Turner

[depr.strstreambuf.cons]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpasoxd9go/{from.md → to.md} +42 -3
tmp/tmpasoxd9go/{from.md → to.md} RENAMED
@@ -40,19 +40,58 @@ strstreambuf(signed char* gnext_arg, streamsize n,
40
  signed char* pbeg_arg = 0);
41
  strstreambuf(unsigned char* gnext_arg, streamsize n,
42
  unsigned char* pbeg_arg = 0);
43
  ```
44
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
45
  ``` cpp
46
  setg(gnext_arg, gnext_arg, gnext_arg + N);
47
  ```
48
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
49
  ``` cpp
50
  virtual ~strstreambuf();
51
  ```
52
 
53
  *Effects:* Destroys an object of class `strstreambuf`. The function
54
  frees the dynamically allocated array object only if
55
- `strmode & allocated != 0` and
56
- `strmode & frozen == 0`. ([[depr.strstreambuf.virtuals]] describes how
57
- a dynamically allocated array object is freed.)
58
 
 
40
  signed char* pbeg_arg = 0);
41
  strstreambuf(unsigned char* gnext_arg, streamsize n,
42
  unsigned char* pbeg_arg = 0);
43
  ```
44
 
45
+ *Effects:* Constructs an object of class `strstreambuf`, initializing
46
+ the base class with `streambuf()`. The postconditions of this function
47
+ are indicated in Table  [[tab:future.strstreambuf2.effects]].
48
+
49
+ **Table: `strstreambuf(charT*, streamsize, charT*)` effects** <a id="tab:future.strstreambuf2.effects">[tab:future.strstreambuf2.effects]</a>
50
+
51
+ | Element | Value |
52
+ | --------- | -------------------- |
53
+ | `strmode` | 0 |
54
+ | `alsize` | an unspecified value |
55
+ | `palloc` | a null pointer |
56
+ | `pfree` | a null pointer |
57
+
58
+
59
+ `gnext_arg` shall point to the first element of an array object whose
60
+ number of elements `N` is determined as follows:
61
+
62
+ - If `n > 0`, `N` is `n`.
63
+ - If `n == 0`, `N` is `std::strlen(gnext_arg)`.
64
+ - If `n < 0`, `N` is `INT_MAX`.[^1]
65
+
66
+ If `pbeg_arg` is a null pointer, the function executes:
67
+
68
  ``` cpp
69
  setg(gnext_arg, gnext_arg, gnext_arg + N);
70
  ```
71
 
72
+ Otherwise, the function executes:
73
+
74
+ ``` cpp
75
+ setg(gnext_arg, gnext_arg, pbeg_arg);
76
+ setp(pbeg_arg, pbeg_arg + N);
77
+ ```
78
+
79
+ ``` cpp
80
+ strstreambuf(const char* gnext_arg, streamsize n);
81
+ strstreambuf(const signed char* gnext_arg, streamsize n);
82
+ strstreambuf(const unsigned char* gnext_arg, streamsize n);
83
+ ```
84
+
85
+ *Effects:* Behaves the same as `strstreambuf((char*)gnext_arg,n)`,
86
+ except that the constructor also sets `constant` in `strmode`.
87
+
88
  ``` cpp
89
  virtual ~strstreambuf();
90
  ```
91
 
92
  *Effects:* Destroys an object of class `strstreambuf`. The function
93
  frees the dynamically allocated array object only if
94
+ `(strmode & allocated) != 0` and
95
+ `(strmode & frozen) == 0`. ([[depr.strstreambuf.virtuals]] describes
96
+ how a dynamically allocated array object is freed.)
97