tmp/tmpr2qrfxid/{from.md → to.md}
RENAMED
|
@@ -4,33 +4,32 @@
|
|
| 4 |
namespace std {
|
| 5 |
template <class charT, class traits = char_traits<charT>,
|
| 6 |
class Allocator = allocator<charT>>
|
| 7 |
class basic_ostringstream : public basic_ostream<charT, traits> {
|
| 8 |
public:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
|
| 10 |
-
//
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
typedef typename traits::pos_type pos_type;
|
| 14 |
-
typedef typename traits::off_type off_type;
|
| 15 |
-
typedef traits traits_type;
|
| 16 |
-
typedef Allocator allocator_type;
|
| 17 |
-
|
| 18 |
-
// [ostringstream.cons] Constructors/destructor:
|
| 19 |
-
explicit basic_ostringstream(ios_base::openmode which = ios_base::out);
|
| 20 |
explicit basic_ostringstream(
|
| 21 |
const basic_string<charT, traits, Allocator>& str,
|
| 22 |
ios_base::openmode which = ios_base::out);
|
| 23 |
basic_ostringstream(const basic_ostringstream& rhs) = delete;
|
| 24 |
basic_ostringstream(basic_ostringstream&& rhs);
|
| 25 |
|
| 26 |
-
// [ostringstream.assign]
|
| 27 |
basic_ostringstream& operator=(const basic_ostringstream& rhs) = delete;
|
| 28 |
basic_ostringstream& operator=(basic_ostringstream&& rhs);
|
| 29 |
void swap(basic_ostringstream& rhs);
|
| 30 |
|
| 31 |
-
// [ostringstream.members]
|
| 32 |
basic_stringbuf<charT, traits, Allocator>* rdbuf() const;
|
| 33 |
|
| 34 |
basic_string<charT, traits, Allocator> str() const;
|
| 35 |
void str(const basic_string<charT, traits, Allocator>& s);
|
| 36 |
private:
|
|
@@ -51,11 +50,12 @@ the sake of exposition, the maintained data is presented here as:
|
|
| 51 |
- `sb`, the `stringbuf` object.
|
| 52 |
|
| 53 |
#### `basic_ostringstream` constructors <a id="ostringstream.cons">[[ostringstream.cons]]</a>
|
| 54 |
|
| 55 |
``` cpp
|
| 56 |
-
explicit basic_ostringstream(
|
|
|
|
| 57 |
```
|
| 58 |
|
| 59 |
*Effects:* Constructs an object of class `basic_ostringstream`,
|
| 60 |
initializing the base class with `basic_ostream(&sb)` and initializing
|
| 61 |
`sb` with
|
|
@@ -76,12 +76,12 @@ explicit basic_ostringstream(
|
|
| 76 |
basic_ostringstream(basic_ostringstream&& 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`. Next `basic_ostream<charT,traits>::set_rdbuf(&sb)`
|
| 82 |
-
called to install the contained `basic_stringbuf`.
|
| 83 |
|
| 84 |
#### Assign and swap <a id="ostringstream.assign">[[ostringstream.assign]]</a>
|
| 85 |
|
| 86 |
``` cpp
|
| 87 |
basic_ostringstream& operator=(basic_ostringstream&& rhs);
|
|
@@ -103,19 +103,20 @@ void swap(basic_ostringstream& rhs);
|
|
| 103 |
template <class charT, class traits, class Allocator>
|
| 104 |
void swap(basic_ostringstream<charT, traits, Allocator>& x,
|
| 105 |
basic_ostringstream<charT, traits, Allocator>& y);
|
| 106 |
```
|
| 107 |
|
| 108 |
-
*Effects:* `x.swap(y)`.
|
| 109 |
|
| 110 |
#### Member functions <a id="ostringstream.members">[[ostringstream.members]]</a>
|
| 111 |
|
| 112 |
``` cpp
|
| 113 |
basic_stringbuf<charT, traits, Allocator>* rdbuf() const;
|
| 114 |
```
|
| 115 |
|
| 116 |
-
*Returns:*
|
|
|
|
| 117 |
|
| 118 |
``` cpp
|
| 119 |
basic_string<charT, traits, Allocator> str() const;
|
| 120 |
```
|
| 121 |
|
|
|
|
| 4 |
namespace std {
|
| 5 |
template <class charT, class traits = char_traits<charT>,
|
| 6 |
class Allocator = allocator<charT>>
|
| 7 |
class basic_ostringstream : public basic_ostream<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 |
+
// [ostringstream.cons], constructors
|
| 17 |
+
explicit basic_ostringstream(
|
| 18 |
+
ios_base::openmode which = ios_base::out);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
explicit basic_ostringstream(
|
| 20 |
const basic_string<charT, traits, Allocator>& str,
|
| 21 |
ios_base::openmode which = ios_base::out);
|
| 22 |
basic_ostringstream(const basic_ostringstream& rhs) = delete;
|
| 23 |
basic_ostringstream(basic_ostringstream&& rhs);
|
| 24 |
|
| 25 |
+
// [ostringstream.assign], assign and swap
|
| 26 |
basic_ostringstream& operator=(const basic_ostringstream& rhs) = delete;
|
| 27 |
basic_ostringstream& operator=(basic_ostringstream&& rhs);
|
| 28 |
void swap(basic_ostringstream& rhs);
|
| 29 |
|
| 30 |
+
// [ostringstream.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:
|
|
|
|
| 50 |
- `sb`, the `stringbuf` object.
|
| 51 |
|
| 52 |
#### `basic_ostringstream` constructors <a id="ostringstream.cons">[[ostringstream.cons]]</a>
|
| 53 |
|
| 54 |
``` cpp
|
| 55 |
+
explicit basic_ostringstream(
|
| 56 |
+
ios_base::openmode which = ios_base::out);
|
| 57 |
```
|
| 58 |
|
| 59 |
*Effects:* Constructs an object of class `basic_ostringstream`,
|
| 60 |
initializing the base class with `basic_ostream(&sb)` and initializing
|
| 61 |
`sb` with
|
|
|
|
| 76 |
basic_ostringstream(basic_ostringstream&& 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`. Next `basic_ostream<charT, traits>::set_rdbuf(&sb)`
|
| 82 |
+
is called to install the contained `basic_stringbuf`.
|
| 83 |
|
| 84 |
#### Assign and swap <a id="ostringstream.assign">[[ostringstream.assign]]</a>
|
| 85 |
|
| 86 |
``` cpp
|
| 87 |
basic_ostringstream& operator=(basic_ostringstream&& rhs);
|
|
|
|
| 103 |
template <class charT, class traits, class Allocator>
|
| 104 |
void swap(basic_ostringstream<charT, traits, Allocator>& x,
|
| 105 |
basic_ostringstream<charT, traits, Allocator>& y);
|
| 106 |
```
|
| 107 |
|
| 108 |
+
*Effects:* As if by `x.swap(y)`.
|
| 109 |
|
| 110 |
#### Member functions <a id="ostringstream.members">[[ostringstream.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>*>(&sb)`.
|
| 118 |
|
| 119 |
``` cpp
|
| 120 |
basic_string<charT, traits, Allocator> str() const;
|
| 121 |
```
|
| 122 |
|