From Jason Turner

[ostream]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpyjpoza9x/{from.md → to.md} +40 -34
tmp/tmpyjpoza9x/{from.md → to.md} RENAMED
@@ -1,7 +1,13 @@
1
  #### Class template `basic_ostream` <a id="ostream">[[ostream]]</a>
2
 
 
 
 
 
 
 
3
  ``` cpp
4
  namespace std {
5
  template<class charT, class traits = char_traits<charT>>
6
  class basic_ostream : virtual public basic_ios<charT, traits> {
7
  public:
@@ -18,51 +24,50 @@ namespace std {
18
 
19
  // [ostream.sentry], prefix/suffix
20
  class sentry;
21
 
22
  // [ostream.formatted], formatted output
23
- basic_ostream<charT, traits>&
24
- operator<<(basic_ostream<charT, traits>& (*pf)(basic_ostream<charT, traits>&));
25
- basic_ostream<charT, traits>&
26
- operator<<(basic_ios<charT, traits>& (*pf)(basic_ios<charT, traits>&));
27
- basic_ostream<charT, traits>&
28
- operator<<(ios_base& (*pf)(ios_base&));
29
 
30
- basic_ostream<charT, traits>& operator<<(bool n);
31
- basic_ostream<charT, traits>& operator<<(short n);
32
- basic_ostream<charT, traits>& operator<<(unsigned short n);
33
- basic_ostream<charT, traits>& operator<<(int n);
34
- basic_ostream<charT, traits>& operator<<(unsigned int n);
35
- basic_ostream<charT, traits>& operator<<(long n);
36
- basic_ostream<charT, traits>& operator<<(unsigned long n);
37
- basic_ostream<charT, traits>& operator<<(long long n);
38
- basic_ostream<charT, traits>& operator<<(unsigned long long n);
39
- basic_ostream<charT, traits>& operator<<(float f);
40
- basic_ostream<charT, traits>& operator<<(double f);
41
- basic_ostream<charT, traits>& operator<<(long double f);
 
42
 
43
- basic_ostream<charT, traits>& operator<<(const void* p);
44
- basic_ostream<charT, traits>& operator<<(nullptr_t);
45
- basic_ostream<charT, traits>& operator<<(basic_streambuf<char_type, traits>* sb);
 
46
 
47
  // [ostream.unformatted], unformatted output
48
- basic_ostream<charT, traits>& put(char_type c);
49
- basic_ostream<charT, traits>& write(const char_type* s, streamsize n);
50
 
51
- basic_ostream<charT, traits>& flush();
52
 
53
  // [ostream.seeks], seeks
54
  pos_type tellp();
55
- basic_ostream<charT, traits>& seekp(pos_type);
56
- basic_ostream<charT, traits>& seekp(off_type, ios_base::seekdir);
57
 
58
  protected:
59
  // [ostream.cons], copy/move constructor
60
  basic_ostream(const basic_ostream&) = delete;
61
  basic_ostream(basic_ostream&& rhs);
62
 
63
- // [ostream.assign], assign and swap
64
  basic_ostream& operator=(const basic_ostream&) = delete;
65
  basic_ostream& operator=(basic_ostream&& rhs);
66
  void swap(basic_ostream& rhs);
67
  };
68
 
@@ -198,15 +203,16 @@ void swap(basic_ostream& rhs);
198
 
199
  ##### Class `basic_ostream::sentry` <a id="ostream.sentry">[[ostream.sentry]]</a>
200
 
201
  ``` cpp
202
  namespace std {
203
- template<class charT, class traits = char_traits<charT>>
204
  class basic_ostream<charT, traits>::sentry {
205
  bool ok_; // exposition only
 
206
  public:
207
- explicit sentry(basic_ostream<charT, traits>& os);
208
  ~sentry();
209
  explicit operator bool() const { return ok_; }
210
 
211
  sentry(const sentry&) = delete;
212
  sentry& operator=(const sentry&) = delete;
@@ -216,20 +222,20 @@ namespace std {
216
 
217
  The class `sentry` defines a class that is responsible for doing
218
  exception safe prefix and suffix operations.
219
 
220
  ``` cpp
221
- explicit sentry(basic_ostream<charT, traits>& os);
222
  ```
223
 
224
  If `os.good()` is nonzero, prepares for formatted or unformatted output.
225
- If `os.tie()` is not a null pointer, calls `os.tie()->flush()`.[^31]
226
 
227
  If, after any preparation is completed, `os.good()` is `true`,
228
  `ok_ == true` otherwise, `ok_ == false`. During preparation, the
229
  constructor may call `setstate(failbit)` (which may throw
230
- `ios_base::failure` [[iostate.flags]]).[^32]
231
 
232
  ``` cpp
233
  ~sentry();
234
  ```
235
 
@@ -255,22 +261,22 @@ pos_type tellp();
255
 
256
  *Returns:* If `fail() != false`, returns `pos_type(-1)` to indicate
257
  failure. Otherwise, returns `rdbuf()->pubseekoff(0, cur, out)`.
258
 
259
  ``` cpp
260
- basic_ostream<charT, traits>& seekp(pos_type pos);
261
  ```
262
 
263
  *Effects:* If `fail() != true`, executes
264
  `rdbuf()->pubseekpos(pos, ios_base::out)`. In case of failure, the
265
  function calls `setstate(failbit)` (which may throw
266
  `ios_base::failure`).
267
 
268
  *Returns:* `*this`.
269
 
270
  ``` cpp
271
- basic_ostream<charT, traits>& seekp(off_type off, ios_base::seekdir dir);
272
  ```
273
 
274
  *Effects:* If `fail() != true`, executes
275
  `rdbuf()->pubseekoff(off, dir, ios_base::out)`. In case of failure, the
276
  function calls `setstate(failbit)` (which may throw
 
1
  #### Class template `basic_ostream` <a id="ostream">[[ostream]]</a>
2
 
3
+ ##### General <a id="ostream.general">[[ostream.general]]</a>
4
+
5
+ When a function has a parameter type `extended-floating-point-type`, the
6
+ implementation provides overloads for all cv-unqualified extended
7
+ floating-point types [[basic.fundamental]].
8
+
9
  ``` cpp
10
  namespace std {
11
  template<class charT, class traits = char_traits<charT>>
12
  class basic_ostream : virtual public basic_ios<charT, traits> {
13
  public:
 
24
 
25
  // [ostream.sentry], prefix/suffix
26
  class sentry;
27
 
28
  // [ostream.formatted], formatted output
29
+ basic_ostream& operator<<(basic_ostream& (*pf)(basic_ostream&));
30
+ basic_ostream& operator<<(basic_ios<charT, traits>& (*pf)(basic_ios<charT, traits>&));
31
+ basic_ostream& operator<<(ios_base& (*pf)(ios_base&));
 
 
 
32
 
33
+ basic_ostream& operator<<(bool n);
34
+ basic_ostream& operator<<(short n);
35
+ basic_ostream& operator<<(unsigned short n);
36
+ basic_ostream& operator<<(int n);
37
+ basic_ostream& operator<<(unsigned int n);
38
+ basic_ostream& operator<<(long n);
39
+ basic_ostream& operator<<(unsigned long n);
40
+ basic_ostream& operator<<(long long n);
41
+ basic_ostream& operator<<(unsigned long long n);
42
+ basic_ostream& operator<<(float f);
43
+ basic_ostream& operator<<(double f);
44
+ basic_ostream& operator<<(long double f);
45
+ basic_ostream& operator<<(extended-floating-point-type f);
46
 
47
+ basic_ostream& operator<<(const void* p);
48
+ basic_ostream& operator<<(const volatile void* p);
49
+ basic_ostream& operator<<(nullptr_t);
50
+ basic_ostream& operator<<(basic_streambuf<char_type, traits>* sb);
51
 
52
  // [ostream.unformatted], unformatted output
53
+ basic_ostream& put(char_type c);
54
+ basic_ostream& write(const char_type* s, streamsize n);
55
 
56
+ basic_ostream& flush();
57
 
58
  // [ostream.seeks], seeks
59
  pos_type tellp();
60
+ basic_ostream& seekp(pos_type);
61
+ basic_ostream& seekp(off_type, ios_base::seekdir);
62
 
63
  protected:
64
  // [ostream.cons], copy/move constructor
65
  basic_ostream(const basic_ostream&) = delete;
66
  basic_ostream(basic_ostream&& rhs);
67
 
68
+ // [ostream.assign], assignment and swap
69
  basic_ostream& operator=(const basic_ostream&) = delete;
70
  basic_ostream& operator=(basic_ostream&& rhs);
71
  void swap(basic_ostream& rhs);
72
  };
73
 
 
203
 
204
  ##### Class `basic_ostream::sentry` <a id="ostream.sentry">[[ostream.sentry]]</a>
205
 
206
  ``` cpp
207
  namespace std {
208
+ template<class charT, class traits>
209
  class basic_ostream<charT, traits>::sentry {
210
  bool ok_; // exposition only
211
+
212
  public:
213
+ explicit sentry(basic_ostream& os);
214
  ~sentry();
215
  explicit operator bool() const { return ok_; }
216
 
217
  sentry(const sentry&) = delete;
218
  sentry& operator=(const sentry&) = delete;
 
222
 
223
  The class `sentry` defines a class that is responsible for doing
224
  exception safe prefix and suffix operations.
225
 
226
  ``` cpp
227
+ explicit sentry(basic_ostream& os);
228
  ```
229
 
230
  If `os.good()` is nonzero, prepares for formatted or unformatted output.
231
+ If `os.tie()` is not a null pointer, calls `os.tie()->flush()`.[^29]
232
 
233
  If, after any preparation is completed, `os.good()` is `true`,
234
  `ok_ == true` otherwise, `ok_ == false`. During preparation, the
235
  constructor may call `setstate(failbit)` (which may throw
236
+ `ios_base::failure` [[iostate.flags]]).[^30]
237
 
238
  ``` cpp
239
  ~sentry();
240
  ```
241
 
 
261
 
262
  *Returns:* If `fail() != false`, returns `pos_type(-1)` to indicate
263
  failure. Otherwise, returns `rdbuf()->pubseekoff(0, cur, out)`.
264
 
265
  ``` cpp
266
+ basic_ostream& seekp(pos_type pos);
267
  ```
268
 
269
  *Effects:* If `fail() != true`, executes
270
  `rdbuf()->pubseekpos(pos, ios_base::out)`. In case of failure, the
271
  function calls `setstate(failbit)` (which may throw
272
  `ios_base::failure`).
273
 
274
  *Returns:* `*this`.
275
 
276
  ``` cpp
277
+ basic_ostream& seekp(off_type off, ios_base::seekdir dir);
278
  ```
279
 
280
  *Effects:* If `fail() != true`, executes
281
  `rdbuf()->pubseekoff(off, dir, ios_base::out)`. In case of failure, the
282
  function calls `setstate(failbit)` (which may throw