From Jason Turner

[istringstream]

Diff to HTML by rtfpessoa

tmp/tmprl7163it/{from.md → to.md} RENAMED
@@ -1,7 +1,9 @@
1
  ### Class template `basic_istringstream` <a id="istringstream">[[istringstream]]</a>
2
 
 
 
3
  ``` cpp
4
  namespace std {
5
  template<class charT, class traits = char_traits<charT>,
6
  class Allocator = allocator<charT>>
7
  class basic_istringstream : public basic_istream<charT, traits> {
@@ -36,13 +38,14 @@ namespace std {
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 &;
@@ -57,14 +60,10 @@ namespace std {
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>
64
- void swap(basic_istringstream<charT, traits, Allocator>& x,
65
- basic_istringstream<charT, traits, Allocator>& y);
66
  }
67
  ```
68
 
69
  The class `basic_istringstream<charT, traits, Allocator>` supports
70
  reading objects of class `basic_string<{}charT, traits, Allocator>`. It
@@ -91,11 +90,12 @@ explicit basic_istringstream(
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
 
@@ -122,11 +122,12 @@ template<class SAlloc>
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,
@@ -146,11 +147,11 @@ basic_istringstream(basic_istringstream&& rhs);
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
 
 
1
  ### Class template `basic_istringstream` <a id="istringstream">[[istringstream]]</a>
2
 
3
+ #### General <a id="istringstream.general">[[istringstream.general]]</a>
4
+
5
  ``` cpp
6
  namespace std {
7
  template<class charT, class traits = char_traits<charT>,
8
  class Allocator = allocator<charT>>
9
  class basic_istringstream : public basic_istream<charT, traits> {
 
38
  const basic_string<charT, traits, SAlloc>& s,
39
  ios_base::openmode which = ios_base::in);
40
  basic_istringstream(const basic_istringstream&) = delete;
41
  basic_istringstream(basic_istringstream&& rhs);
42
 
 
43
  basic_istringstream& operator=(const basic_istringstream&) = delete;
44
  basic_istringstream& operator=(basic_istringstream&& rhs);
45
+
46
+ // [istringstream.swap], swap
47
  void swap(basic_istringstream& rhs);
48
 
49
  // [istringstream.members], members
50
  basic_stringbuf<charT, traits, Allocator>* rdbuf() const;
51
  basic_string<charT, traits, Allocator> str() const &;
 
60
  void str(basic_string<charT, traits, Allocator>&& s);
61
 
62
  private:
63
  basic_stringbuf<charT, traits, Allocator> sb; // exposition only
64
  };
 
 
 
 
65
  }
66
  ```
67
 
68
  The class `basic_istringstream<charT, traits, Allocator>` supports
69
  reading objects of class `basic_string<{}charT, traits, Allocator>`. It
 
90
  ios_base::openmode which = ios_base::in);
91
  ```
92
 
93
  *Effects:* Initializes the base class with
94
  `basic_istream<charT, traits>(addressof(sb))` [[istream]] and `sb` with
95
+ `basic_stringbuf<charT, traits, Allocator>(s, which | ios_base::in)`
96
+ [[stringbuf.cons]].
97
 
98
  ``` cpp
99
  basic_istringstream(ios_base::openmode which, const Allocator& a);
100
  ```
101
 
 
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)`
128
+ [[stringbuf.cons]].
129
 
130
  ``` cpp
131
  template<class SAlloc>
132
  explicit basic_istringstream(
133
  const basic_string<charT, traits, SAlloc>& s,
 
147
  by move constructing the base class, and the contained
148
  `basic_stringbuf`. Then calls
149
  `basic_istream<charT, traits>::set_rdbuf(addressof(sb))` to install the
150
  contained `basic_stringbuf`.
151
 
152
+ #### Swap <a id="istringstream.swap">[[istringstream.swap]]</a>
153
 
154
  ``` cpp
155
  void swap(basic_istringstream& rhs);
156
  ```
157