tmp/tmpbmh0afy5/{from.md → to.md}
RENAMED
|
@@ -2,37 +2,34 @@
|
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
namespace std {
|
| 5 |
template <class charT, class traits = char_traits<charT>,
|
| 6 |
class Allocator = allocator<charT>>
|
| 7 |
-
class basic_stringstream
|
| 8 |
-
: public basic_iostream<charT,traits> {
|
| 9 |
public:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
|
| 11 |
-
//
|
| 12 |
-
typedef charT char_type;
|
| 13 |
-
typedef typename traits::int_type int_type;
|
| 14 |
-
typedef typename traits::pos_type pos_type;
|
| 15 |
-
typedef typename traits::off_type off_type;
|
| 16 |
-
typedef traits traits_type;
|
| 17 |
-
typedef Allocator allocator_type;
|
| 18 |
-
|
| 19 |
-
// constructors/destructor
|
| 20 |
explicit basic_stringstream(
|
| 21 |
ios_base::openmode which = ios_base::out | ios_base::in);
|
| 22 |
explicit basic_stringstream(
|
| 23 |
const basic_string<charT, traits, Allocator>& str,
|
| 24 |
ios_base::openmode which = ios_base::out | ios_base::in);
|
| 25 |
basic_stringstream(const basic_stringstream& rhs) = delete;
|
| 26 |
basic_stringstream(basic_stringstream&& rhs);
|
| 27 |
|
| 28 |
-
// [stringstream.assign]
|
| 29 |
basic_stringstream& operator=(const basic_stringstream& rhs) = delete;
|
| 30 |
basic_stringstream& operator=(basic_stringstream&& rhs);
|
| 31 |
void swap(basic_stringstream& rhs);
|
| 32 |
|
| 33 |
-
//
|
| 34 |
basic_stringbuf<charT, traits, Allocator>* rdbuf() const;
|
| 35 |
basic_string<charT, traits, Allocator> str() const;
|
| 36 |
void str(const basic_string<charT, traits, Allocator>& str);
|
| 37 |
|
| 38 |
private:
|
|
@@ -52,11 +49,11 @@ and writing from objects of class
|
|
| 52 |
associated sequence. For the sake of exposition, the maintained data is
|
| 53 |
presented here as
|
| 54 |
|
| 55 |
- `sb`, the `stringbuf` object.
|
| 56 |
|
| 57 |
-
#### basic_stringstream constructors <a id="stringstream.cons">[[stringstream.cons]]</a>
|
| 58 |
|
| 59 |
``` cpp
|
| 60 |
explicit basic_stringstream(
|
| 61 |
ios_base::openmode which = ios_base::out | ios_base::in);
|
| 62 |
```
|
|
@@ -81,12 +78,12 @@ explicit basic_stringstream(
|
|
| 81 |
basic_stringstream(basic_stringstream&& rhs);
|
| 82 |
```
|
| 83 |
|
| 84 |
*Effects:* Move constructs from the rvalue `rhs`. This is accomplished
|
| 85 |
by move constructing the base class, and the contained
|
| 86 |
-
`basic_stringbuf`. Next `basic_istream<charT,traits>::set_rdbuf(&sb)`
|
| 87 |
-
called to install the contained `basic_stringbuf`.
|
| 88 |
|
| 89 |
#### Assign and swap <a id="stringstream.assign">[[stringstream.assign]]</a>
|
| 90 |
|
| 91 |
``` cpp
|
| 92 |
basic_stringstream& operator=(basic_stringstream&& rhs);
|
|
@@ -108,11 +105,11 @@ void swap(basic_stringstream& rhs);
|
|
| 108 |
template <class charT, class traits, class Allocator>
|
| 109 |
void swap(basic_stringstream<charT, traits, Allocator>& x,
|
| 110 |
basic_stringstream<charT, traits, Allocator>& y);
|
| 111 |
```
|
| 112 |
|
| 113 |
-
*Effects:* `x.swap(y)`.
|
| 114 |
|
| 115 |
#### Member functions <a id="stringstream.members">[[stringstream.members]]</a>
|
| 116 |
|
| 117 |
``` cpp
|
| 118 |
basic_stringbuf<charT, traits, Allocator>* rdbuf() const;
|
|
|
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
namespace std {
|
| 5 |
template <class charT, class traits = char_traits<charT>,
|
| 6 |
class Allocator = allocator<charT>>
|
| 7 |
+
class basic_stringstream : public basic_iostream<charT, traits> {
|
|
|
|
| 8 |
public:
|
| 9 |
+
using char_type = charT;
|
| 10 |
+
using int_type = typename traits::int_type;
|
| 11 |
+
using pos_type = typename traits::pos_type;
|
| 12 |
+
using off_type = typename traits::off_type;
|
| 13 |
+
using traits_type = traits;
|
| 14 |
+
using allocator_type = Allocator;
|
| 15 |
|
| 16 |
+
// [stringstream.cons], constructors
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
explicit basic_stringstream(
|
| 18 |
ios_base::openmode which = ios_base::out | ios_base::in);
|
| 19 |
explicit basic_stringstream(
|
| 20 |
const basic_string<charT, traits, Allocator>& str,
|
| 21 |
ios_base::openmode which = ios_base::out | ios_base::in);
|
| 22 |
basic_stringstream(const basic_stringstream& rhs) = delete;
|
| 23 |
basic_stringstream(basic_stringstream&& rhs);
|
| 24 |
|
| 25 |
+
// [stringstream.assign], assign and swap
|
| 26 |
basic_stringstream& operator=(const basic_stringstream& rhs) = delete;
|
| 27 |
basic_stringstream& operator=(basic_stringstream&& rhs);
|
| 28 |
void swap(basic_stringstream& rhs);
|
| 29 |
|
| 30 |
+
// [stringstream.members], members
|
| 31 |
basic_stringbuf<charT, traits, Allocator>* rdbuf() const;
|
| 32 |
basic_string<charT, traits, Allocator> str() const;
|
| 33 |
void str(const basic_string<charT, traits, Allocator>& str);
|
| 34 |
|
| 35 |
private:
|
|
|
|
| 49 |
associated sequence. For the sake of exposition, the maintained data is
|
| 50 |
presented here as
|
| 51 |
|
| 52 |
- `sb`, the `stringbuf` object.
|
| 53 |
|
| 54 |
+
#### `basic_stringstream` constructors <a id="stringstream.cons">[[stringstream.cons]]</a>
|
| 55 |
|
| 56 |
``` cpp
|
| 57 |
explicit basic_stringstream(
|
| 58 |
ios_base::openmode which = ios_base::out | ios_base::in);
|
| 59 |
```
|
|
|
|
| 78 |
basic_stringstream(basic_stringstream&& rhs);
|
| 79 |
```
|
| 80 |
|
| 81 |
*Effects:* Move constructs from the rvalue `rhs`. This is accomplished
|
| 82 |
by move constructing the base class, and the contained
|
| 83 |
+
`basic_stringbuf`. Next `basic_istream<charT, traits>::set_rdbuf(&sb)`
|
| 84 |
+
is called to install the contained `basic_stringbuf`.
|
| 85 |
|
| 86 |
#### Assign and swap <a id="stringstream.assign">[[stringstream.assign]]</a>
|
| 87 |
|
| 88 |
``` cpp
|
| 89 |
basic_stringstream& operator=(basic_stringstream&& rhs);
|
|
|
|
| 105 |
template <class charT, class traits, class Allocator>
|
| 106 |
void swap(basic_stringstream<charT, traits, Allocator>& x,
|
| 107 |
basic_stringstream<charT, traits, Allocator>& y);
|
| 108 |
```
|
| 109 |
|
| 110 |
+
*Effects:* As if by `x.swap(y)`.
|
| 111 |
|
| 112 |
#### Member functions <a id="stringstream.members">[[stringstream.members]]</a>
|
| 113 |
|
| 114 |
``` cpp
|
| 115 |
basic_stringbuf<charT, traits, Allocator>* rdbuf() const;
|