- tmp/tmpran8pd76/{from.md → to.md} +128 -34
tmp/tmpran8pd76/{from.md → to.md}
RENAMED
|
@@ -12,28 +12,52 @@ namespace std {
|
|
| 12 |
using off_type = typename traits::off_type;
|
| 13 |
using traits_type = traits;
|
| 14 |
using allocator_type = Allocator;
|
| 15 |
|
| 16 |
// [istringstream.cons], constructors
|
|
|
|
|
|
|
| 17 |
explicit basic_istringstream(
|
|
|
|
| 18 |
ios_base::openmode which = ios_base::in);
|
|
|
|
| 19 |
explicit basic_istringstream(
|
| 20 |
-
|
| 21 |
ios_base::openmode which = ios_base::in);
|
| 22 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
basic_istringstream(basic_istringstream&& rhs);
|
| 24 |
|
| 25 |
// [istringstream.assign], assign and swap
|
| 26 |
-
basic_istringstream& operator=(const basic_istringstream&
|
| 27 |
basic_istringstream& operator=(basic_istringstream&& rhs);
|
| 28 |
void swap(basic_istringstream& rhs);
|
| 29 |
|
| 30 |
// [istringstream.members], members
|
| 31 |
basic_stringbuf<charT, traits, Allocator>* rdbuf() const;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
|
| 33 |
-
basic_string<charT, traits, Allocator> str() const;
|
| 34 |
void str(const basic_string<charT, traits, Allocator>& s);
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
private:
|
| 36 |
basic_stringbuf<charT, traits, Allocator> sb; // exposition only
|
| 37 |
};
|
| 38 |
|
| 39 |
template<class charT, class traits, class Allocator>
|
|
@@ -48,83 +72,153 @@ uses a `basic_stringbuf<charT, traits, Allocator>` object to control the
|
|
| 48 |
associated storage. For the sake of exposition, the maintained data is
|
| 49 |
presented here as:
|
| 50 |
|
| 51 |
- `sb`, the `stringbuf` object.
|
| 52 |
|
| 53 |
-
####
|
| 54 |
|
| 55 |
``` cpp
|
| 56 |
-
explicit basic_istringstream(ios_base::openmode which
|
| 57 |
```
|
| 58 |
|
| 59 |
-
*Effects:*
|
| 60 |
-
`
|
| 61 |
-
`
|
| 62 |
-
|
| 63 |
|
| 64 |
``` cpp
|
| 65 |
explicit basic_istringstream(
|
| 66 |
-
const basic_string<charT, traits, Allocator>&
|
| 67 |
ios_base::openmode which = ios_base::in);
|
| 68 |
```
|
| 69 |
|
| 70 |
-
*Effects:*
|
| 71 |
-
`
|
| 72 |
-
`
|
| 73 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 74 |
|
| 75 |
``` cpp
|
| 76 |
basic_istringstream(basic_istringstream&& rhs);
|
| 77 |
```
|
| 78 |
|
| 79 |
*Effects:* Move constructs from the rvalue `rhs`. This is accomplished
|
| 80 |
by move constructing the base class, and the contained
|
| 81 |
-
`basic_stringbuf`.
|
| 82 |
-
|
|
|
|
| 83 |
|
| 84 |
-
####
|
| 85 |
-
|
| 86 |
-
``` cpp
|
| 87 |
-
basic_istringstream& operator=(basic_istringstream&& rhs);
|
| 88 |
-
```
|
| 89 |
-
|
| 90 |
-
*Effects:* Move assigns the base and members of `*this` from the base
|
| 91 |
-
and corresponding members of `rhs`.
|
| 92 |
-
|
| 93 |
-
*Returns:* `*this`.
|
| 94 |
|
| 95 |
``` cpp
|
| 96 |
void swap(basic_istringstream& rhs);
|
| 97 |
```
|
| 98 |
|
| 99 |
-
*Effects:*
|
| 100 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 101 |
|
| 102 |
``` cpp
|
| 103 |
template<class charT, class traits, class Allocator>
|
| 104 |
void swap(basic_istringstream<charT, traits, Allocator>& x,
|
| 105 |
basic_istringstream<charT, traits, Allocator>& y);
|
| 106 |
```
|
| 107 |
|
| 108 |
-
*Effects:*
|
| 109 |
|
| 110 |
#### Member functions <a id="istringstream.members">[[istringstream.members]]</a>
|
| 111 |
|
| 112 |
``` cpp
|
| 113 |
basic_stringbuf<charT, traits, Allocator>* rdbuf() const;
|
| 114 |
```
|
| 115 |
|
| 116 |
*Returns:*
|
| 117 |
-
`const_cast<basic_stringbuf<charT, traits, Allocator>*>(
|
| 118 |
|
| 119 |
``` cpp
|
| 120 |
-
basic_string<charT, traits, Allocator> str() const;
|
| 121 |
```
|
| 122 |
|
| 123 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 124 |
|
| 125 |
``` cpp
|
| 126 |
void str(const basic_string<charT, traits, Allocator>& s);
|
| 127 |
```
|
| 128 |
|
| 129 |
-
*Effects:*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 130 |
|
|
|
|
| 12 |
using off_type = typename traits::off_type;
|
| 13 |
using traits_type = traits;
|
| 14 |
using allocator_type = Allocator;
|
| 15 |
|
| 16 |
// [istringstream.cons], constructors
|
| 17 |
+
basic_istringstream() : basic_istringstream(ios_base::in) {}
|
| 18 |
+
explicit basic_istringstream(ios_base::openmode which);
|
| 19 |
explicit basic_istringstream(
|
| 20 |
+
const basic_string<charT, traits, Allocator>& s,
|
| 21 |
ios_base::openmode which = ios_base::in);
|
| 22 |
+
basic_istringstream(ios_base::openmode which, const Allocator& a);
|
| 23 |
explicit basic_istringstream(
|
| 24 |
+
basic_string<charT, traits, Allocator>&& s,
|
| 25 |
ios_base::openmode which = ios_base::in);
|
| 26 |
+
template<class SAlloc>
|
| 27 |
+
basic_istringstream(
|
| 28 |
+
const basic_string<charT, traits, SAlloc>& s, const Allocator& a)
|
| 29 |
+
: basic_istringstream(s, ios_base::in, a) {}
|
| 30 |
+
template<class SAlloc>
|
| 31 |
+
basic_istringstream(
|
| 32 |
+
const basic_string<charT, traits, SAlloc>& s,
|
| 33 |
+
ios_base::openmode which, const Allocator& a);
|
| 34 |
+
template<class SAlloc>
|
| 35 |
+
explicit basic_istringstream(
|
| 36 |
+
const basic_string<charT, traits, SAlloc>& s,
|
| 37 |
+
ios_base::openmode which = ios_base::in);
|
| 38 |
+
basic_istringstream(const basic_istringstream&) = delete;
|
| 39 |
basic_istringstream(basic_istringstream&& rhs);
|
| 40 |
|
| 41 |
// [istringstream.assign], assign and swap
|
| 42 |
+
basic_istringstream& operator=(const basic_istringstream&) = delete;
|
| 43 |
basic_istringstream& operator=(basic_istringstream&& rhs);
|
| 44 |
void swap(basic_istringstream& rhs);
|
| 45 |
|
| 46 |
// [istringstream.members], members
|
| 47 |
basic_stringbuf<charT, traits, Allocator>* rdbuf() const;
|
| 48 |
+
basic_string<charT, traits, Allocator> str() const &;
|
| 49 |
+
template<class SAlloc>
|
| 50 |
+
basic_string<charT,traits,SAlloc> str(const SAlloc& sa) const;
|
| 51 |
+
basic_string<charT, traits, Allocator> str() &&;
|
| 52 |
+
basic_string_view<charT, traits> view() const noexcept;
|
| 53 |
|
|
|
|
| 54 |
void str(const basic_string<charT, traits, Allocator>& s);
|
| 55 |
+
template<class SAlloc>
|
| 56 |
+
void str(const basic_string<charT, traits, SAlloc>& s);
|
| 57 |
+
void str(basic_string<charT, traits, Allocator>&& s);
|
| 58 |
+
|
| 59 |
private:
|
| 60 |
basic_stringbuf<charT, traits, Allocator> sb; // exposition only
|
| 61 |
};
|
| 62 |
|
| 63 |
template<class charT, class traits, class Allocator>
|
|
|
|
| 72 |
associated storage. For the sake of exposition, the maintained data is
|
| 73 |
presented here as:
|
| 74 |
|
| 75 |
- `sb`, the `stringbuf` object.
|
| 76 |
|
| 77 |
+
#### Constructors <a id="istringstream.cons">[[istringstream.cons]]</a>
|
| 78 |
|
| 79 |
``` cpp
|
| 80 |
+
explicit basic_istringstream(ios_base::openmode which);
|
| 81 |
```
|
| 82 |
|
| 83 |
+
*Effects:* Initializes the base class with
|
| 84 |
+
`basic_istream<charT, traits>(addressof(sb))` [[istream]] and `sb` with
|
| 85 |
+
`basic_stringbuf<charT, traits, Allocator>(which | ios_base::in)`
|
| 86 |
+
[[stringbuf.cons]].
|
| 87 |
|
| 88 |
``` cpp
|
| 89 |
explicit basic_istringstream(
|
| 90 |
+
const basic_string<charT, traits, Allocator>& s,
|
| 91 |
ios_base::openmode which = ios_base::in);
|
| 92 |
```
|
| 93 |
|
| 94 |
+
*Effects:* Initializes the base class with
|
| 95 |
+
`basic_istream<charT, traits>(addressof(sb))` [[istream]] and `sb` with
|
| 96 |
+
`basic_stringbuf<charT, traits, Allocator>(s, which | ios_base::in)`([[stringbuf.cons]]).
|
| 97 |
+
|
| 98 |
+
``` cpp
|
| 99 |
+
basic_istringstream(ios_base::openmode which, const Allocator& a);
|
| 100 |
+
```
|
| 101 |
+
|
| 102 |
+
*Effects:* Initializes the base class with
|
| 103 |
+
`basic_istream<charT, traits>(addressof(sb))` [[istream]] and `sb` with
|
| 104 |
+
`basic_stringbuf<charT, traits, Allocator>(which | ios_base::in, a)`
|
| 105 |
+
[[stringbuf.cons]].
|
| 106 |
+
|
| 107 |
+
``` cpp
|
| 108 |
+
explicit basic_istringstream(
|
| 109 |
+
basic_string<charT, traits, Allocator>&& s,
|
| 110 |
+
ios_base::openmode which = ios_base::in);
|
| 111 |
+
```
|
| 112 |
+
|
| 113 |
+
*Effects:* Initializes the base class with
|
| 114 |
+
`basic_istream<charT, traits>(addressof(sb))` [[istream]] and `sb` with
|
| 115 |
+
`basic_stringbuf<charT, traits, Allocator>(std::move(s), which | ios_base::in)`
|
| 116 |
+
[[stringbuf.cons]].
|
| 117 |
+
|
| 118 |
+
``` cpp
|
| 119 |
+
template<class SAlloc>
|
| 120 |
+
basic_istringstream(
|
| 121 |
+
const basic_string<charT, traits, SAlloc>& s,
|
| 122 |
+
ios_base::openmode which, const Allocator& a);
|
| 123 |
+
```
|
| 124 |
+
|
| 125 |
+
*Effects:* Initializes the base class with
|
| 126 |
+
`basic_istream<charT, traits>(addressof(sb))` [[istream]] and `sb` with
|
| 127 |
+
`basic_stringbuf<charT, traits, Allocator>(s, which | ios_base::in, a)`([[stringbuf.cons]]).
|
| 128 |
+
|
| 129 |
+
``` cpp
|
| 130 |
+
template<class SAlloc>
|
| 131 |
+
explicit basic_istringstream(
|
| 132 |
+
const basic_string<charT, traits, SAlloc>& s,
|
| 133 |
+
ios_base::openmode which = ios_base::in);
|
| 134 |
+
```
|
| 135 |
+
|
| 136 |
+
*Effects:* Initializes the base class with
|
| 137 |
+
`basic_istream<charT, traits>(addressof(sb))` [[istream]] and `sb` with
|
| 138 |
+
`basic_stringbuf<charT, traits, Allocator>(s, which | ios_base::in)`
|
| 139 |
+
[[stringbuf.cons]].
|
| 140 |
|
| 141 |
``` cpp
|
| 142 |
basic_istringstream(basic_istringstream&& rhs);
|
| 143 |
```
|
| 144 |
|
| 145 |
*Effects:* Move constructs from the rvalue `rhs`. This is accomplished
|
| 146 |
by move constructing the base class, and the contained
|
| 147 |
+
`basic_stringbuf`. Then calls
|
| 148 |
+
`basic_istream<charT, traits>::set_rdbuf(addressof(sb))` to install the
|
| 149 |
+
contained `basic_stringbuf`.
|
| 150 |
|
| 151 |
+
#### Assignment and swap <a id="istringstream.assign">[[istringstream.assign]]</a>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 152 |
|
| 153 |
``` cpp
|
| 154 |
void swap(basic_istringstream& rhs);
|
| 155 |
```
|
| 156 |
|
| 157 |
+
*Effects:* Equivalent to:
|
| 158 |
+
|
| 159 |
+
``` cpp
|
| 160 |
+
basic_istream<charT, traits>::swap(rhs);
|
| 161 |
+
sb.swap(rhs.sb);
|
| 162 |
+
```
|
| 163 |
|
| 164 |
``` cpp
|
| 165 |
template<class charT, class traits, class Allocator>
|
| 166 |
void swap(basic_istringstream<charT, traits, Allocator>& x,
|
| 167 |
basic_istringstream<charT, traits, Allocator>& y);
|
| 168 |
```
|
| 169 |
|
| 170 |
+
*Effects:* Equivalent to: `x.swap(y)`.
|
| 171 |
|
| 172 |
#### Member functions <a id="istringstream.members">[[istringstream.members]]</a>
|
| 173 |
|
| 174 |
``` cpp
|
| 175 |
basic_stringbuf<charT, traits, Allocator>* rdbuf() const;
|
| 176 |
```
|
| 177 |
|
| 178 |
*Returns:*
|
| 179 |
+
`const_cast<basic_stringbuf<charT, traits, Allocator>*>(addressof(sb))`.
|
| 180 |
|
| 181 |
``` cpp
|
| 182 |
+
basic_string<charT, traits, Allocator> str() const &;
|
| 183 |
```
|
| 184 |
|
| 185 |
+
*Effects:* Equivalent to: `return rdbuf()->str();`
|
| 186 |
+
|
| 187 |
+
``` cpp
|
| 188 |
+
template<class SAlloc>
|
| 189 |
+
basic_string<charT,traits,SAlloc> str(const SAlloc& sa) const;
|
| 190 |
+
```
|
| 191 |
+
|
| 192 |
+
*Effects:* Equivalent to: `return rdbuf()->str(sa);`
|
| 193 |
+
|
| 194 |
+
``` cpp
|
| 195 |
+
basic_string<charT,traits,Allocator> str() &&;
|
| 196 |
+
```
|
| 197 |
+
|
| 198 |
+
*Effects:* Equivalent to: `return std::move(*rdbuf()).str();`
|
| 199 |
+
|
| 200 |
+
``` cpp
|
| 201 |
+
basic_string_view<charT, traits> view() const noexcept;
|
| 202 |
+
```
|
| 203 |
+
|
| 204 |
+
*Effects:* Equivalent to: `return rdbuf()->view();`
|
| 205 |
|
| 206 |
``` cpp
|
| 207 |
void str(const basic_string<charT, traits, Allocator>& s);
|
| 208 |
```
|
| 209 |
|
| 210 |
+
*Effects:* Equivalent to: `rdbuf()->str(s);`
|
| 211 |
+
|
| 212 |
+
``` cpp
|
| 213 |
+
template<class SAlloc>
|
| 214 |
+
void str(const basic_string<charT, traits, SAlloc>& s);
|
| 215 |
+
```
|
| 216 |
+
|
| 217 |
+
*Effects:* Equivalent to: `rdbuf()->str(s);`
|
| 218 |
+
|
| 219 |
+
``` cpp
|
| 220 |
+
void str(basic_string<charT, traits, Allocator>&& s);
|
| 221 |
+
```
|
| 222 |
+
|
| 223 |
+
*Effects:* Equivalent to: `rdbuf()->str(std::move(s));`
|
| 224 |
|