From Jason Turner

[ostream.general]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpe9pdr60q/{from.md → to.md} +160 -0
tmp/tmpe9pdr60q/{from.md → to.md} RENAMED
@@ -0,0 +1,160 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ##### General <a id="ostream.general">[[ostream.general]]</a>
2
+
3
+ When a function has a parameter type `extended-floating-point-type`, the
4
+ implementation provides overloads for all cv-unqualified extended
5
+ floating-point types [[basic.fundamental]].
6
+
7
+ ``` cpp
8
+ namespace std {
9
+ template<class charT, class traits = char_traits<charT>>
10
+ class basic_ostream : virtual public basic_ios<charT, traits> {
11
+ public:
12
+ // types (inherited from basic_ios[ios])
13
+ using char_type = charT;
14
+ using int_type = typename traits::int_type;
15
+ using pos_type = typename traits::pos_type;
16
+ using off_type = typename traits::off_type;
17
+ using traits_type = traits;
18
+
19
+ // [ostream.cons], constructor/destructor
20
+ explicit basic_ostream(basic_streambuf<char_type, traits>* sb);
21
+ virtual ~basic_ostream();
22
+
23
+ // [ostream.sentry], prefix/suffix
24
+ class sentry;
25
+
26
+ // [ostream.formatted], formatted output
27
+ basic_ostream& operator<<(basic_ostream& (*pf)(basic_ostream&));
28
+ basic_ostream& operator<<(basic_ios<charT, traits>& (*pf)(basic_ios<charT, traits>&));
29
+ basic_ostream& operator<<(ios_base& (*pf)(ios_base&));
30
+
31
+ basic_ostream& operator<<(bool n);
32
+ basic_ostream& operator<<(short n);
33
+ basic_ostream& operator<<(unsigned short n);
34
+ basic_ostream& operator<<(int n);
35
+ basic_ostream& operator<<(unsigned int n);
36
+ basic_ostream& operator<<(long n);
37
+ basic_ostream& operator<<(unsigned long n);
38
+ basic_ostream& operator<<(long long n);
39
+ basic_ostream& operator<<(unsigned long long n);
40
+ basic_ostream& operator<<(float f);
41
+ basic_ostream& operator<<(double f);
42
+ basic_ostream& operator<<(long double f);
43
+ basic_ostream& operator<<(extended-floating-point-type f);
44
+
45
+ basic_ostream& operator<<(const void* p);
46
+ basic_ostream& operator<<(const volatile void* p);
47
+ basic_ostream& operator<<(nullptr_t);
48
+ basic_ostream& operator<<(basic_streambuf<char_type, traits>* sb);
49
+
50
+ // [ostream.unformatted], unformatted output
51
+ basic_ostream& put(char_type c);
52
+ basic_ostream& write(const char_type* s, streamsize n);
53
+
54
+ basic_ostream& flush();
55
+
56
+ // [ostream.seeks], seeks
57
+ pos_type tellp();
58
+ basic_ostream& seekp(pos_type);
59
+ basic_ostream& seekp(off_type, ios_base::seekdir);
60
+
61
+ protected:
62
+ // [ostream.cons], copy/move constructor
63
+ basic_ostream(const basic_ostream&) = delete;
64
+ basic_ostream(basic_ostream&& rhs);
65
+
66
+ // [ostream.assign], assignment and swap
67
+ basic_ostream& operator=(const basic_ostream&) = delete;
68
+ basic_ostream& operator=(basic_ostream&& rhs);
69
+ void swap(basic_ostream& rhs);
70
+ };
71
+
72
+ // [ostream.inserters.character], character inserters
73
+ template<class charT, class traits>
74
+ basic_ostream<charT, traits>& operator<<(basic_ostream<charT, traits>&, charT);
75
+ template<class charT, class traits>
76
+ basic_ostream<charT, traits>& operator<<(basic_ostream<charT, traits>&, char);
77
+ template<class traits>
78
+ basic_ostream<char, traits>& operator<<(basic_ostream<char, traits>&, char);
79
+
80
+ template<class traits>
81
+ basic_ostream<char, traits>& operator<<(basic_ostream<char, traits>&, signed char);
82
+ template<class traits>
83
+ basic_ostream<char, traits>& operator<<(basic_ostream<char, traits>&, unsigned char);
84
+
85
+ template<class traits>
86
+ basic_ostream<char, traits>& operator<<(basic_ostream<char, traits>&, wchar_t) = delete;
87
+ template<class traits>
88
+ basic_ostream<char, traits>& operator<<(basic_ostream<char, traits>&, char8_t) = delete;
89
+ template<class traits>
90
+ basic_ostream<char, traits>& operator<<(basic_ostream<char, traits>&, char16_t) = delete;
91
+ template<class traits>
92
+ basic_ostream<char, traits>& operator<<(basic_ostream<char, traits>&, char32_t) = delete;
93
+ template<class traits>
94
+ basic_ostream<wchar_t, traits>&
95
+ operator<<(basic_ostream<wchar_t, traits>&, char8_t) = delete;
96
+ template<class traits>
97
+ basic_ostream<wchar_t, traits>&
98
+ operator<<(basic_ostream<wchar_t, traits>&, char16_t) = delete;
99
+ template<class traits>
100
+ basic_ostream<wchar_t, traits>&
101
+ operator<<(basic_ostream<wchar_t, traits>&, char32_t) = delete;
102
+
103
+ template<class charT, class traits>
104
+ basic_ostream<charT, traits>& operator<<(basic_ostream<charT, traits>&, const charT*);
105
+ template<class charT, class traits>
106
+ basic_ostream<charT, traits>& operator<<(basic_ostream<charT, traits>&, const char*);
107
+ template<class traits>
108
+ basic_ostream<char, traits>& operator<<(basic_ostream<char, traits>&, const char*);
109
+
110
+ template<class traits>
111
+ basic_ostream<char, traits>& operator<<(basic_ostream<char, traits>&, const signed char*);
112
+ template<class traits>
113
+ basic_ostream<char, traits>& operator<<(basic_ostream<char, traits>&, const unsigned char*);
114
+
115
+ template<class traits>
116
+ basic_ostream<char, traits>&
117
+ operator<<(basic_ostream<char, traits>&, const wchar_t*) = delete;
118
+ template<class traits>
119
+ basic_ostream<char, traits>&
120
+ operator<<(basic_ostream<char, traits>&, const char8_t*) = delete;
121
+ template<class traits>
122
+ basic_ostream<char, traits>&
123
+ operator<<(basic_ostream<char, traits>&, const char16_t*) = delete;
124
+ template<class traits>
125
+ basic_ostream<char, traits>&
126
+ operator<<(basic_ostream<char, traits>&, const char32_t*) = delete;
127
+ template<class traits>
128
+ basic_ostream<wchar_t, traits>&
129
+ operator<<(basic_ostream<wchar_t, traits>&, const char8_t*) = delete;
130
+ template<class traits>
131
+ basic_ostream<wchar_t, traits>&
132
+ operator<<(basic_ostream<wchar_t, traits>&, const char16_t*) = delete;
133
+ template<class traits>
134
+ basic_ostream<wchar_t, traits>&
135
+ operator<<(basic_ostream<wchar_t, traits>&, const char32_t*) = delete;
136
+ }
137
+ ```
138
+
139
+ The class template `basic_ostream` defines a number of member function
140
+ signatures that assist in formatting and writing output to output
141
+ sequences controlled by a stream buffer.
142
+
143
+ Two groups of member function signatures share common properties: the
144
+ *formatted output functions* (or *inserters*) and the *unformatted
145
+ output functions.* Both groups of output functions generate (or
146
+ *insert*) output *characters* by actions equivalent to calling
147
+ `rdbuf()->sputc(int_type)`. They may use other public members of
148
+ `basic_ostream` except that they shall not invoke any virtual members of
149
+ `rdbuf()` except `overflow()`, `xsputn()`, and `sync()`.
150
+
151
+ If one of these called functions throws an exception, then unless
152
+ explicitly noted otherwise the output function sets `badbit` in the
153
+ error state. If `badbit` is set in `exceptions()`, the output function
154
+ rethrows the exception without completing its actions, otherwise it does
155
+ not throw anything and proceeds as if the called function had returned a
156
+ failure indication.
157
+
158
+ [*Note 1*: The deleted overloads of `operator<<` prevent formatting
159
+ characters as integers and strings as pointers. — *end note*]
160
+