From Jason Turner

[stringbuf.cons]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpxduikkok/{from.md → to.md} +36 -13
tmp/tmpxduikkok/{from.md → to.md} RENAMED
@@ -3,11 +3,11 @@
3
  ``` cpp
4
  explicit basic_stringbuf(ios_base::openmode which);
5
  ```
6
 
7
  *Effects:* Initializes the base class with `basic_streambuf()`
8
- [[streambuf.cons]], and `mode` with `which`. It is
9
  *implementation-defined* whether the sequence pointers (`eback()`,
10
  `gptr()`, `egptr()`, `pbase()`, `pptr()`, `epptr()`) are initialized to
11
  null pointers.
12
 
13
  *Ensures:* `str().empty()` is `true`.
@@ -17,43 +17,43 @@ explicit basic_stringbuf(
17
  const basic_string<charT, traits, Allocator>& s,
18
  ios_base::openmode which = ios_base::in | ios_base::out);
19
  ```
20
 
21
  *Effects:* Initializes the base class with `basic_streambuf()`
22
- [[streambuf.cons]], `mode` with `which`, and `buf` with `s`, then calls
23
- `init_buf_ptrs()`.
24
 
25
  ``` cpp
26
  basic_stringbuf(ios_base::openmode which, const Allocator& a);
27
  ```
28
 
29
  *Effects:* Initializes the base class with `basic_streambuf()`
30
- [[streambuf.cons]], `mode` with `which`, and `buf` with `a`, then calls
31
- `init_buf_ptrs()`.
32
 
33
  *Ensures:* `str().empty()` is `true`.
34
 
35
  ``` cpp
36
  explicit basic_stringbuf(
37
  basic_string<charT, traits, Allocator>&& s,
38
  ios_base::openmode which = ios_base::in | ios_base::out);
39
  ```
40
 
41
  *Effects:* Initializes the base class with `basic_streambuf()`
42
- [[streambuf.cons]], `mode` with `which`, and `buf` with `std::move(s)`,
43
- then calls `init_buf_ptrs()`.
44
 
45
  ``` cpp
46
  template<class SAlloc>
47
  basic_stringbuf(
48
  const basic_string<charT, traits, SAlloc>& s,
49
  ios_base::openmode which, const Allocator& a);
50
  ```
51
 
52
  *Effects:* Initializes the base class with `basic_streambuf()`
53
- [[streambuf.cons]], `mode` with `which`, and `buf` with `{s,a}`, then
54
- calls `init_buf_ptrs()`.
55
 
56
  ``` cpp
57
  template<class SAlloc>
58
  explicit basic_stringbuf(
59
  const basic_string<charT, traits, SAlloc>& s,
@@ -61,21 +61,44 @@ template<class SAlloc>
61
  ```
62
 
63
  *Constraints:* `is_same_v<SAlloc, Allocator>` is `false`.
64
 
65
  *Effects:* Initializes the base class with `basic_streambuf()`
66
- [[streambuf.cons]], `mode` with `which`, and `buf` with `s`, then calls
67
- `init_buf_ptrs()`.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
68
 
69
  ``` cpp
70
  basic_stringbuf(basic_stringbuf&& rhs);
71
  basic_stringbuf(basic_stringbuf&& rhs, const Allocator& a);
72
  ```
73
 
74
  *Effects:* Copy constructs the base class from `rhs` and initializes
75
- `mode` with `rhs.mode`. In the first form `buf` is initialized from
76
- `std::move(rhs).str()`. In the second form `buf` is initialized from
77
  `{std::move(rhs).str(), a}`. It is *implementation-defined* whether the
78
  sequence pointers in `*this` (`eback()`, `gptr()`, `egptr()`, `pbase()`,
79
  `pptr()`, `epptr()`) obtain the values which `rhs` had.
80
 
81
  *Ensures:* Let `rhs_p` refer to the state of `rhs` just prior to this
 
3
  ``` cpp
4
  explicit basic_stringbuf(ios_base::openmode which);
5
  ```
6
 
7
  *Effects:* Initializes the base class with `basic_streambuf()`
8
+ [[streambuf.cons]], and *mode* with `which`. It is
9
  *implementation-defined* whether the sequence pointers (`eback()`,
10
  `gptr()`, `egptr()`, `pbase()`, `pptr()`, `epptr()`) are initialized to
11
  null pointers.
12
 
13
  *Ensures:* `str().empty()` is `true`.
 
17
  const basic_string<charT, traits, Allocator>& s,
18
  ios_base::openmode which = ios_base::in | ios_base::out);
19
  ```
20
 
21
  *Effects:* Initializes the base class with `basic_streambuf()`
22
+ [[streambuf.cons]], *mode* with `which`, and *buf* with `s`, then calls
23
+ *`init-buf-ptrs`*`()`.
24
 
25
  ``` cpp
26
  basic_stringbuf(ios_base::openmode which, const Allocator& a);
27
  ```
28
 
29
  *Effects:* Initializes the base class with `basic_streambuf()`
30
+ [[streambuf.cons]], *mode* with `which`, and *buf* with `a`, then calls
31
+ *`init-buf-ptrs`*`()`.
32
 
33
  *Ensures:* `str().empty()` is `true`.
34
 
35
  ``` cpp
36
  explicit basic_stringbuf(
37
  basic_string<charT, traits, Allocator>&& s,
38
  ios_base::openmode which = ios_base::in | ios_base::out);
39
  ```
40
 
41
  *Effects:* Initializes the base class with `basic_streambuf()`
42
+ [[streambuf.cons]], *mode* with `which`, and *buf* with `std::move(s)`,
43
+ then calls *`init-buf-ptrs`*`()`.
44
 
45
  ``` cpp
46
  template<class SAlloc>
47
  basic_stringbuf(
48
  const basic_string<charT, traits, SAlloc>& s,
49
  ios_base::openmode which, const Allocator& a);
50
  ```
51
 
52
  *Effects:* Initializes the base class with `basic_streambuf()`
53
+ [[streambuf.cons]], *mode* with `which`, and *buf* with `{s,a}`, then
54
+ calls *`init-buf-ptrs`*`()`.
55
 
56
  ``` cpp
57
  template<class SAlloc>
58
  explicit basic_stringbuf(
59
  const basic_string<charT, traits, SAlloc>& s,
 
61
  ```
62
 
63
  *Constraints:* `is_same_v<SAlloc, Allocator>` is `false`.
64
 
65
  *Effects:* Initializes the base class with `basic_streambuf()`
66
+ [[streambuf.cons]], *mode* with `which`, and *buf* with `s`, then calls
67
+ *`init-buf-ptrs`*`()`.
68
+
69
+ ``` cpp
70
+ template<class T>
71
+ explicit basic_stringbuf(const T& t, ios_base::openmode which = ios_base::in | ios_base::out);
72
+ template<class T>
73
+ basic_stringbuf(const T& t, const Allocator& a);
74
+ template<class T>
75
+ basic_stringbuf(const T& t, ios_base::openmode which, const Allocator& a);
76
+ ```
77
+
78
+ Let `which` be `ios_base::in | ios_base::out` for the overload with no
79
+ parameter `which`, and `a` be `Allocator()` for the overload with no
80
+ parameter `a`.
81
+
82
+ *Constraints:*
83
+ `is_convertible_v<const T&, basic_string_view<charT, traits>>` is
84
+ `true`.
85
+
86
+ *Effects:* Creates a variable `sv` as if by
87
+ `basic_string_view<charT, traits> sv = t`, then value-initializes the
88
+ base class, initializes *mode* with `which`, and
89
+ direct-non-list-initializes *buf* with `sv, a`, then calls
90
+ *`init-buf-ptrs`*`()`.
91
 
92
  ``` cpp
93
  basic_stringbuf(basic_stringbuf&& rhs);
94
  basic_stringbuf(basic_stringbuf&& rhs, const Allocator& a);
95
  ```
96
 
97
  *Effects:* Copy constructs the base class from `rhs` and initializes
98
+ *mode* with `rhs.mode`. In the first form `buf` is initialized from
99
+ `std::move(rhs).str()`. In the second form *buf* is initialized from
100
  `{std::move(rhs).str(), a}`. It is *implementation-defined* whether the
101
  sequence pointers in `*this` (`eback()`, `gptr()`, `egptr()`, `pbase()`,
102
  `pptr()`, `epptr()`) obtain the values which `rhs` had.
103
 
104
  *Ensures:* Let `rhs_p` refer to the state of `rhs` just prior to this