/src/llvm-project-18.1.8.build/include/c++/v1/streambuf
Line | Count | Source (jump to first uncovered line) |
1 | | // -*- C++ -*- |
2 | | //===----------------------------------------------------------------------===// |
3 | | // |
4 | | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
5 | | // See https://llvm.org/LICENSE.txt for license information. |
6 | | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
7 | | // |
8 | | //===----------------------------------------------------------------------===// |
9 | | |
10 | | #ifndef _LIBCPP_STREAMBUF |
11 | | #define _LIBCPP_STREAMBUF |
12 | | |
13 | | /* |
14 | | streambuf synopsis |
15 | | |
16 | | namespace std |
17 | | { |
18 | | |
19 | | template <class charT, class traits = char_traits<charT> > |
20 | | class basic_streambuf |
21 | | { |
22 | | public: |
23 | | // types: |
24 | | typedef charT char_type; |
25 | | typedef traits traits_type; |
26 | | typedef typename traits_type::int_type int_type; |
27 | | typedef typename traits_type::pos_type pos_type; |
28 | | typedef typename traits_type::off_type off_type; |
29 | | |
30 | | virtual ~basic_streambuf(); |
31 | | |
32 | | // 27.6.2.2.1 locales: |
33 | | locale pubimbue(const locale& loc); |
34 | | locale getloc() const; |
35 | | |
36 | | // 27.6.2.2.2 buffer and positioning: |
37 | | basic_streambuf* pubsetbuf(char_type* s, streamsize n); |
38 | | pos_type pubseekoff(off_type off, ios_base::seekdir way, |
39 | | ios_base::openmode which = ios_base::in | ios_base::out); |
40 | | pos_type pubseekpos(pos_type sp, |
41 | | ios_base::openmode which = ios_base::in | ios_base::out); |
42 | | int pubsync(); |
43 | | |
44 | | // Get and put areas: |
45 | | // 27.6.2.2.3 Get area: |
46 | | streamsize in_avail(); |
47 | | int_type snextc(); |
48 | | int_type sbumpc(); |
49 | | int_type sgetc(); |
50 | | streamsize sgetn(char_type* s, streamsize n); |
51 | | |
52 | | // 27.6.2.2.4 Putback: |
53 | | int_type sputbackc(char_type c); |
54 | | int_type sungetc(); |
55 | | |
56 | | // 27.6.2.2.5 Put area: |
57 | | int_type sputc(char_type c); |
58 | | streamsize sputn(const char_type* s, streamsize n); |
59 | | |
60 | | protected: |
61 | | basic_streambuf(); |
62 | | basic_streambuf(const basic_streambuf& rhs); |
63 | | basic_streambuf& operator=(const basic_streambuf& rhs); |
64 | | void swap(basic_streambuf& rhs); |
65 | | |
66 | | // 27.6.2.3.2 Get area: |
67 | | char_type* eback() const; |
68 | | char_type* gptr() const; |
69 | | char_type* egptr() const; |
70 | | void gbump(int n); |
71 | | void setg(char_type* gbeg, char_type* gnext, char_type* gend); |
72 | | |
73 | | // 27.6.2.3.3 Put area: |
74 | | char_type* pbase() const; |
75 | | char_type* pptr() const; |
76 | | char_type* epptr() const; |
77 | | void pbump(int n); |
78 | | void setp(char_type* pbeg, char_type* pend); |
79 | | |
80 | | // 27.6.2.4 virtual functions: |
81 | | // 27.6.2.4.1 Locales: |
82 | | virtual void imbue(const locale& loc); |
83 | | |
84 | | // 27.6.2.4.2 Buffer management and positioning: |
85 | | virtual basic_streambuf* setbuf(char_type* s, streamsize n); |
86 | | virtual pos_type seekoff(off_type off, ios_base::seekdir way, |
87 | | ios_base::openmode which = ios_base::in | ios_base::out); |
88 | | virtual pos_type seekpos(pos_type sp, |
89 | | ios_base::openmode which = ios_base::in | ios_base::out); |
90 | | virtual int sync(); |
91 | | |
92 | | // 27.6.2.4.3 Get area: |
93 | | virtual streamsize showmanyc(); |
94 | | virtual streamsize xsgetn(char_type* s, streamsize n); |
95 | | virtual int_type underflow(); |
96 | | virtual int_type uflow(); |
97 | | |
98 | | // 27.6.2.4.4 Putback: |
99 | | virtual int_type pbackfail(int_type c = traits_type::eof()); |
100 | | |
101 | | // 27.6.2.4.5 Put area: |
102 | | virtual streamsize xsputn(const char_type* s, streamsize n); |
103 | | virtual int_type overflow (int_type c = traits_type::eof()); |
104 | | }; |
105 | | |
106 | | } // std |
107 | | |
108 | | */ |
109 | | |
110 | | #include <__assert> // all public C++ headers provide the assertion handler |
111 | | #include <__config> |
112 | | #include <__fwd/streambuf.h> |
113 | | #include <climits> |
114 | | #include <ios> |
115 | | #include <iosfwd> |
116 | | #include <version> |
117 | | |
118 | | #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) |
119 | | # pragma GCC system_header |
120 | | #endif |
121 | | |
122 | | _LIBCPP_PUSH_MACROS |
123 | | #include <__undef_macros> |
124 | | |
125 | | _LIBCPP_BEGIN_NAMESPACE_STD |
126 | | |
127 | | template <class _CharT, class _Traits> |
128 | | class _LIBCPP_TEMPLATE_VIS basic_streambuf { |
129 | | public: |
130 | | // types: |
131 | | typedef _CharT char_type; |
132 | | typedef _Traits traits_type; |
133 | | typedef typename traits_type::int_type int_type; |
134 | | typedef typename traits_type::pos_type pos_type; |
135 | | typedef typename traits_type::off_type off_type; |
136 | | |
137 | | static_assert((is_same<_CharT, typename traits_type::char_type>::value), |
138 | | "traits_type::char_type must be the same type as CharT"); |
139 | | |
140 | | virtual ~basic_streambuf(); |
141 | | |
142 | | // 27.6.2.2.1 locales: |
143 | 0 | inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1 locale pubimbue(const locale& __loc) { |
144 | 0 | imbue(__loc); |
145 | 0 | locale __r = __loc_; |
146 | 0 | __loc_ = __loc; |
147 | 0 | return __r; |
148 | 0 | } Unexecuted instantiation: std::__1::basic_streambuf<char, std::__1::char_traits<char> >::pubimbue(std::__1::locale const&) Unexecuted instantiation: std::__1::basic_streambuf<wchar_t, std::__1::char_traits<wchar_t> >::pubimbue(std::__1::locale const&) |
149 | | |
150 | 0 | inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1 locale getloc() const { return __loc_; } Unexecuted instantiation: std::__1::basic_streambuf<char, std::__1::char_traits<char> >::getloc() const Unexecuted instantiation: std::__1::basic_streambuf<wchar_t, std::__1::char_traits<wchar_t> >::getloc() const |
151 | | |
152 | | // 27.6.2.2.2 buffer and positioning: |
153 | 0 | inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1 basic_streambuf* pubsetbuf(char_type* __s, streamsize __n) { |
154 | 0 | return setbuf(__s, __n); |
155 | 0 | } Unexecuted instantiation: std::__1::basic_streambuf<char, std::__1::char_traits<char> >::pubsetbuf(char*, long) Unexecuted instantiation: std::__1::basic_streambuf<wchar_t, std::__1::char_traits<wchar_t> >::pubsetbuf(wchar_t*, long) |
156 | | |
157 | | inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1 pos_type |
158 | 0 | pubseekoff(off_type __off, ios_base::seekdir __way, ios_base::openmode __which = ios_base::in | ios_base::out) { |
159 | 0 | return seekoff(__off, __way, __which); |
160 | 0 | } Unexecuted instantiation: std::__1::basic_streambuf<char, std::__1::char_traits<char> >::pubseekoff(long long, std::__1::ios_base::seekdir, unsigned int) Unexecuted instantiation: std::__1::basic_streambuf<wchar_t, std::__1::char_traits<wchar_t> >::pubseekoff(long long, std::__1::ios_base::seekdir, unsigned int) |
161 | | |
162 | | inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1 pos_type |
163 | 0 | pubseekpos(pos_type __sp, ios_base::openmode __which = ios_base::in | ios_base::out) { |
164 | 0 | return seekpos(__sp, __which); |
165 | 0 | } Unexecuted instantiation: std::__1::basic_streambuf<char, std::__1::char_traits<char> >::pubseekpos(std::__1::fpos<__mbstate_t>, unsigned int) Unexecuted instantiation: std::__1::basic_streambuf<wchar_t, std::__1::char_traits<wchar_t> >::pubseekpos(std::__1::fpos<__mbstate_t>, unsigned int) |
166 | | |
167 | 0 | inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1 int pubsync() { return sync(); } Unexecuted instantiation: std::__1::basic_streambuf<char, std::__1::char_traits<char> >::pubsync() Unexecuted instantiation: std::__1::basic_streambuf<wchar_t, std::__1::char_traits<wchar_t> >::pubsync() |
168 | | |
169 | | // Get and put areas: |
170 | | // 27.6.2.2.3 Get area: |
171 | 0 | inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1 streamsize in_avail() { |
172 | 0 | if (__ninp_ < __einp_) |
173 | 0 | return static_cast<streamsize>(__einp_ - __ninp_); |
174 | 0 | return showmanyc(); |
175 | 0 | } Unexecuted instantiation: std::__1::basic_streambuf<char, std::__1::char_traits<char> >::in_avail() Unexecuted instantiation: std::__1::basic_streambuf<wchar_t, std::__1::char_traits<wchar_t> >::in_avail() |
176 | | |
177 | 0 | inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1 int_type snextc() { |
178 | 0 | if (sbumpc() == traits_type::eof()) |
179 | 0 | return traits_type::eof(); |
180 | 0 | return sgetc(); |
181 | 0 | } Unexecuted instantiation: std::__1::basic_streambuf<char, std::__1::char_traits<char> >::snextc() Unexecuted instantiation: std::__1::basic_streambuf<wchar_t, std::__1::char_traits<wchar_t> >::snextc() |
182 | | |
183 | 7.03M | inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1 int_type sbumpc() { |
184 | 7.03M | if (__ninp_ == __einp_) |
185 | 0 | return uflow(); |
186 | 7.03M | return traits_type::to_int_type(*__ninp_++); |
187 | 7.03M | } std::__1::basic_streambuf<char, std::__1::char_traits<char> >::sbumpc() Line | Count | Source | 183 | 7.03M | inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1 int_type sbumpc() { | 184 | 7.03M | if (__ninp_ == __einp_) | 185 | 0 | return uflow(); | 186 | 7.03M | return traits_type::to_int_type(*__ninp_++); | 187 | 7.03M | } |
Unexecuted instantiation: std::__1::basic_streambuf<wchar_t, std::__1::char_traits<wchar_t> >::sbumpc() |
188 | | |
189 | 14.0M | inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1 int_type sgetc() { |
190 | 14.0M | if (__ninp_ == __einp_) |
191 | 875 | return underflow(); |
192 | 14.0M | return traits_type::to_int_type(*__ninp_); |
193 | 14.0M | } std::__1::basic_streambuf<char, std::__1::char_traits<char> >::sgetc() Line | Count | Source | 189 | 14.0M | inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1 int_type sgetc() { | 190 | 14.0M | if (__ninp_ == __einp_) | 191 | 875 | return underflow(); | 192 | 14.0M | return traits_type::to_int_type(*__ninp_); | 193 | 14.0M | } |
Unexecuted instantiation: std::__1::basic_streambuf<wchar_t, std::__1::char_traits<wchar_t> >::sgetc() |
194 | | |
195 | 0 | inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1 streamsize sgetn(char_type* __s, streamsize __n) { return xsgetn(__s, __n); } Unexecuted instantiation: std::__1::basic_streambuf<char, std::__1::char_traits<char> >::sgetn(char*, long) Unexecuted instantiation: std::__1::basic_streambuf<wchar_t, std::__1::char_traits<wchar_t> >::sgetn(wchar_t*, long) |
196 | | |
197 | | // 27.6.2.2.4 Putback: |
198 | 0 | inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1 int_type sputbackc(char_type __c) { |
199 | 0 | if (__binp_ == __ninp_ || !traits_type::eq(__c, __ninp_[-1])) |
200 | 0 | return pbackfail(traits_type::to_int_type(__c)); |
201 | 0 | return traits_type::to_int_type(*--__ninp_); |
202 | 0 | } Unexecuted instantiation: std::__1::basic_streambuf<char, std::__1::char_traits<char> >::sputbackc(char) Unexecuted instantiation: std::__1::basic_streambuf<wchar_t, std::__1::char_traits<wchar_t> >::sputbackc(wchar_t) |
203 | | |
204 | 0 | inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1 int_type sungetc() { |
205 | 0 | if (__binp_ == __ninp_) |
206 | 0 | return pbackfail(); |
207 | 0 | return traits_type::to_int_type(*--__ninp_); |
208 | 0 | } Unexecuted instantiation: std::__1::basic_streambuf<char, std::__1::char_traits<char> >::sungetc() Unexecuted instantiation: std::__1::basic_streambuf<wchar_t, std::__1::char_traits<wchar_t> >::sungetc() |
209 | | |
210 | | // 27.6.2.2.5 Put area: |
211 | 4.36k | inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1 int_type sputc(char_type __c) { |
212 | 4.36k | if (__nout_ == __eout_) |
213 | 0 | return overflow(traits_type::to_int_type(__c)); |
214 | 4.36k | *__nout_++ = __c; |
215 | 4.36k | return traits_type::to_int_type(__c); |
216 | 4.36k | } std::__1::basic_streambuf<char, std::__1::char_traits<char> >::sputc(char) Line | Count | Source | 211 | 4.36k | inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1 int_type sputc(char_type __c) { | 212 | 4.36k | if (__nout_ == __eout_) | 213 | 0 | return overflow(traits_type::to_int_type(__c)); | 214 | 4.36k | *__nout_++ = __c; | 215 | 4.36k | return traits_type::to_int_type(__c); | 216 | 4.36k | } |
Unexecuted instantiation: std::__1::basic_streambuf<wchar_t, std::__1::char_traits<wchar_t> >::sputc(wchar_t) |
217 | | |
218 | 11.5k | inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1 streamsize sputn(const char_type* __s, streamsize __n) { |
219 | 11.5k | return xsputn(__s, __n); |
220 | 11.5k | } std::__1::basic_streambuf<char, std::__1::char_traits<char> >::sputn(char const*, long) Line | Count | Source | 218 | 11.5k | inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1 streamsize sputn(const char_type* __s, streamsize __n) { | 219 | 11.5k | return xsputn(__s, __n); | 220 | 11.5k | } |
Unexecuted instantiation: std::__1::basic_streambuf<wchar_t, std::__1::char_traits<wchar_t> >::sputn(wchar_t const*, long) |
221 | | |
222 | | protected: |
223 | | basic_streambuf(); |
224 | | basic_streambuf(const basic_streambuf& __rhs); |
225 | | basic_streambuf& operator=(const basic_streambuf& __rhs); |
226 | | void swap(basic_streambuf& __rhs); |
227 | | |
228 | | // 27.6.2.3.2 Get area: |
229 | 4.36k | _LIBCPP_HIDE_FROM_ABI char_type* eback() const { return __binp_; } |
230 | 5.23k | _LIBCPP_HIDE_FROM_ABI char_type* gptr() const { return __ninp_; } |
231 | 1.75k | _LIBCPP_HIDE_FROM_ABI char_type* egptr() const { return __einp_; } |
232 | | |
233 | 0 | inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1 void gbump(int __n) { __ninp_ += __n; } Unexecuted instantiation: std::__1::basic_streambuf<char, std::__1::char_traits<char> >::gbump(int) Unexecuted instantiation: std::__1::basic_streambuf<wchar_t, std::__1::char_traits<wchar_t> >::gbump(int) |
234 | | |
235 | 0 | inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1 void setg(char_type* __gbeg, char_type* __gnext, char_type* __gend) { |
236 | 0 | __binp_ = __gbeg; |
237 | 0 | __ninp_ = __gnext; |
238 | 0 | __einp_ = __gend; |
239 | 0 | } Unexecuted instantiation: std::__1::basic_streambuf<char, std::__1::char_traits<char> >::setg(char*, char*, char*) Unexecuted instantiation: std::__1::basic_streambuf<wchar_t, std::__1::char_traits<wchar_t> >::setg(wchar_t*, wchar_t*, wchar_t*) |
240 | | |
241 | | // 27.6.2.3.3 Put area: |
242 | 16.5k | _LIBCPP_HIDE_FROM_ABI char_type* pbase() const { return __bout_; } |
243 | 20.7k | _LIBCPP_HIDE_FROM_ABI char_type* pptr() const { return __nout_; } |
244 | 4.36k | _LIBCPP_HIDE_FROM_ABI char_type* epptr() const { return __eout_; } |
245 | | |
246 | 0 | inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1 void pbump(int __n) { __nout_ += __n; } Unexecuted instantiation: std::__1::basic_streambuf<char, std::__1::char_traits<char> >::pbump(int) Unexecuted instantiation: std::__1::basic_streambuf<wchar_t, std::__1::char_traits<wchar_t> >::pbump(int) |
247 | | |
248 | 4.36k | _LIBCPP_HIDE_FROM_ABI void __pbump(streamsize __n) { __nout_ += __n; } |
249 | | |
250 | 4.36k | inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1 void setp(char_type* __pbeg, char_type* __pend) { |
251 | 4.36k | __bout_ = __nout_ = __pbeg; |
252 | 4.36k | __eout_ = __pend; |
253 | 4.36k | } std::__1::basic_streambuf<char, std::__1::char_traits<char> >::setp(char*, char*) Line | Count | Source | 250 | 4.36k | inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1 void setp(char_type* __pbeg, char_type* __pend) { | 251 | 4.36k | __bout_ = __nout_ = __pbeg; | 252 | 4.36k | __eout_ = __pend; | 253 | 4.36k | } |
Unexecuted instantiation: std::__1::basic_streambuf<wchar_t, std::__1::char_traits<wchar_t> >::setp(wchar_t*, wchar_t*) |
254 | | |
255 | | // 27.6.2.4 virtual functions: |
256 | | // 27.6.2.4.1 Locales: |
257 | | virtual void imbue(const locale& __loc); |
258 | | |
259 | | // 27.6.2.4.2 Buffer management and positioning: |
260 | | virtual basic_streambuf* setbuf(char_type* __s, streamsize __n); |
261 | | virtual pos_type |
262 | | seekoff(off_type __off, ios_base::seekdir __way, ios_base::openmode __which = ios_base::in | ios_base::out); |
263 | | virtual pos_type seekpos(pos_type __sp, ios_base::openmode __which = ios_base::in | ios_base::out); |
264 | | virtual int sync(); |
265 | | |
266 | | // 27.6.2.4.3 Get area: |
267 | | virtual streamsize showmanyc(); |
268 | | virtual streamsize xsgetn(char_type* __s, streamsize __n); |
269 | | virtual int_type underflow(); |
270 | | virtual int_type uflow(); |
271 | | |
272 | | // 27.6.2.4.4 Putback: |
273 | | virtual int_type pbackfail(int_type __c = traits_type::eof()); |
274 | | |
275 | | // 27.6.2.4.5 Put area: |
276 | | virtual streamsize xsputn(const char_type* __s, streamsize __n); |
277 | | virtual int_type overflow(int_type __c = traits_type::eof()); |
278 | | |
279 | | private: |
280 | | locale __loc_; |
281 | | char_type* __binp_; |
282 | | char_type* __ninp_; |
283 | | char_type* __einp_; |
284 | | char_type* __bout_; |
285 | | char_type* __nout_; |
286 | | char_type* __eout_; |
287 | | }; |
288 | | |
289 | | template <class _CharT, class _Traits> |
290 | 5.92k | basic_streambuf<_CharT, _Traits>::~basic_streambuf() {} std::__1::basic_streambuf<char, std::__1::char_traits<char> >::~basic_streambuf() Line | Count | Source | 290 | 5.92k | basic_streambuf<_CharT, _Traits>::~basic_streambuf() {} |
Unexecuted instantiation: std::__1::basic_streambuf<wchar_t, std::__1::char_traits<wchar_t> >::~basic_streambuf() |
291 | | |
292 | | template <class _CharT, class _Traits> |
293 | | basic_streambuf<_CharT, _Traits>::basic_streambuf() |
294 | 5.92k | : __binp_(nullptr), __ninp_(nullptr), __einp_(nullptr), __bout_(nullptr), __nout_(nullptr), __eout_(nullptr) {} std::__1::basic_streambuf<char, std::__1::char_traits<char> >::basic_streambuf() Line | Count | Source | 294 | 5.92k | : __binp_(nullptr), __ninp_(nullptr), __einp_(nullptr), __bout_(nullptr), __nout_(nullptr), __eout_(nullptr) {} |
Unexecuted instantiation: std::__1::basic_streambuf<wchar_t, std::__1::char_traits<wchar_t> >::basic_streambuf() |
295 | | |
296 | | template <class _CharT, class _Traits> |
297 | | basic_streambuf<_CharT, _Traits>::basic_streambuf(const basic_streambuf& __sb) |
298 | 0 | : __loc_(__sb.__loc_), |
299 | 0 | __binp_(__sb.__binp_), |
300 | 0 | __ninp_(__sb.__ninp_), |
301 | 0 | __einp_(__sb.__einp_), |
302 | 0 | __bout_(__sb.__bout_), |
303 | 0 | __nout_(__sb.__nout_), |
304 | 0 | __eout_(__sb.__eout_) {} Unexecuted instantiation: std::__1::basic_streambuf<char, std::__1::char_traits<char> >::basic_streambuf(std::__1::basic_streambuf<char, std::__1::char_traits<char> > const&) Unexecuted instantiation: std::__1::basic_streambuf<wchar_t, std::__1::char_traits<wchar_t> >::basic_streambuf(std::__1::basic_streambuf<wchar_t, std::__1::char_traits<wchar_t> > const&) |
305 | | |
306 | | template <class _CharT, class _Traits> |
307 | 0 | basic_streambuf<_CharT, _Traits>& basic_streambuf<_CharT, _Traits>::operator=(const basic_streambuf& __sb) { |
308 | 0 | __loc_ = __sb.__loc_; |
309 | 0 | __binp_ = __sb.__binp_; |
310 | 0 | __ninp_ = __sb.__ninp_; |
311 | 0 | __einp_ = __sb.__einp_; |
312 | 0 | __bout_ = __sb.__bout_; |
313 | 0 | __nout_ = __sb.__nout_; |
314 | 0 | __eout_ = __sb.__eout_; |
315 | 0 | return *this; |
316 | 0 | } Unexecuted instantiation: std::__1::basic_streambuf<char, std::__1::char_traits<char> >::operator=(std::__1::basic_streambuf<char, std::__1::char_traits<char> > const&) Unexecuted instantiation: std::__1::basic_streambuf<wchar_t, std::__1::char_traits<wchar_t> >::operator=(std::__1::basic_streambuf<wchar_t, std::__1::char_traits<wchar_t> > const&) |
317 | | |
318 | | template <class _CharT, class _Traits> |
319 | 0 | void basic_streambuf<_CharT, _Traits>::swap(basic_streambuf& __sb) { |
320 | 0 | std::swap(__loc_, __sb.__loc_); |
321 | 0 | std::swap(__binp_, __sb.__binp_); |
322 | 0 | std::swap(__ninp_, __sb.__ninp_); |
323 | 0 | std::swap(__einp_, __sb.__einp_); |
324 | 0 | std::swap(__bout_, __sb.__bout_); |
325 | 0 | std::swap(__nout_, __sb.__nout_); |
326 | 0 | std::swap(__eout_, __sb.__eout_); |
327 | 0 | } Unexecuted instantiation: std::__1::basic_streambuf<char, std::__1::char_traits<char> >::swap(std::__1::basic_streambuf<char, std::__1::char_traits<char> >&) Unexecuted instantiation: std::__1::basic_streambuf<wchar_t, std::__1::char_traits<wchar_t> >::swap(std::__1::basic_streambuf<wchar_t, std::__1::char_traits<wchar_t> >&) |
328 | | |
329 | | template <class _CharT, class _Traits> |
330 | 0 | void basic_streambuf<_CharT, _Traits>::imbue(const locale&) {} Unexecuted instantiation: std::__1::basic_streambuf<char, std::__1::char_traits<char> >::imbue(std::__1::locale const&) Unexecuted instantiation: std::__1::basic_streambuf<wchar_t, std::__1::char_traits<wchar_t> >::imbue(std::__1::locale const&) |
331 | | |
332 | | template <class _CharT, class _Traits> |
333 | 0 | basic_streambuf<_CharT, _Traits>* basic_streambuf<_CharT, _Traits>::setbuf(char_type*, streamsize) { |
334 | 0 | return this; |
335 | 0 | } Unexecuted instantiation: std::__1::basic_streambuf<char, std::__1::char_traits<char> >::setbuf(char*, long) Unexecuted instantiation: std::__1::basic_streambuf<wchar_t, std::__1::char_traits<wchar_t> >::setbuf(wchar_t*, long) |
336 | | |
337 | | template <class _CharT, class _Traits> |
338 | | typename basic_streambuf<_CharT, _Traits>::pos_type |
339 | 0 | basic_streambuf<_CharT, _Traits>::seekoff(off_type, ios_base::seekdir, ios_base::openmode) { |
340 | 0 | return pos_type(off_type(-1)); |
341 | 0 | } Unexecuted instantiation: std::__1::basic_streambuf<char, std::__1::char_traits<char> >::seekoff(long long, std::__1::ios_base::seekdir, unsigned int) Unexecuted instantiation: std::__1::basic_streambuf<wchar_t, std::__1::char_traits<wchar_t> >::seekoff(long long, std::__1::ios_base::seekdir, unsigned int) |
342 | | |
343 | | template <class _CharT, class _Traits> |
344 | | typename basic_streambuf<_CharT, _Traits>::pos_type |
345 | 0 | basic_streambuf<_CharT, _Traits>::seekpos(pos_type, ios_base::openmode) { |
346 | 0 | return pos_type(off_type(-1)); |
347 | 0 | } Unexecuted instantiation: std::__1::basic_streambuf<char, std::__1::char_traits<char> >::seekpos(std::__1::fpos<__mbstate_t>, unsigned int) Unexecuted instantiation: std::__1::basic_streambuf<wchar_t, std::__1::char_traits<wchar_t> >::seekpos(std::__1::fpos<__mbstate_t>, unsigned int) |
348 | | |
349 | | template <class _CharT, class _Traits> |
350 | 0 | int basic_streambuf<_CharT, _Traits>::sync() { |
351 | 0 | return 0; |
352 | 0 | } Unexecuted instantiation: std::__1::basic_streambuf<char, std::__1::char_traits<char> >::sync() Unexecuted instantiation: std::__1::basic_streambuf<wchar_t, std::__1::char_traits<wchar_t> >::sync() |
353 | | |
354 | | template <class _CharT, class _Traits> |
355 | 0 | streamsize basic_streambuf<_CharT, _Traits>::showmanyc() { |
356 | 0 | return 0; |
357 | 0 | } Unexecuted instantiation: std::__1::basic_streambuf<char, std::__1::char_traits<char> >::showmanyc() Unexecuted instantiation: std::__1::basic_streambuf<wchar_t, std::__1::char_traits<wchar_t> >::showmanyc() |
358 | | |
359 | | template <class _CharT, class _Traits> |
360 | 0 | streamsize basic_streambuf<_CharT, _Traits>::xsgetn(char_type* __s, streamsize __n) { |
361 | 0 | const int_type __eof = traits_type::eof(); |
362 | 0 | int_type __c; |
363 | 0 | streamsize __i = 0; |
364 | 0 | while (__i < __n) { |
365 | 0 | if (__ninp_ < __einp_) { |
366 | 0 | const streamsize __len = std::min(static_cast<streamsize>(INT_MAX), std::min(__einp_ - __ninp_, __n - __i)); |
367 | 0 | traits_type::copy(__s, __ninp_, __len); |
368 | 0 | __s += __len; |
369 | 0 | __i += __len; |
370 | 0 | this->gbump(__len); |
371 | 0 | } else if ((__c = uflow()) != __eof) { |
372 | 0 | *__s = traits_type::to_char_type(__c); |
373 | 0 | ++__s; |
374 | 0 | ++__i; |
375 | 0 | } else |
376 | 0 | break; |
377 | 0 | } |
378 | 0 | return __i; |
379 | 0 | } Unexecuted instantiation: std::__1::basic_streambuf<char, std::__1::char_traits<char> >::xsgetn(char*, long) Unexecuted instantiation: std::__1::basic_streambuf<wchar_t, std::__1::char_traits<wchar_t> >::xsgetn(wchar_t*, long) |
380 | | |
381 | | template <class _CharT, class _Traits> |
382 | 0 | typename basic_streambuf<_CharT, _Traits>::int_type basic_streambuf<_CharT, _Traits>::underflow() { |
383 | 0 | return traits_type::eof(); |
384 | 0 | } Unexecuted instantiation: std::__1::basic_streambuf<char, std::__1::char_traits<char> >::underflow() Unexecuted instantiation: std::__1::basic_streambuf<wchar_t, std::__1::char_traits<wchar_t> >::underflow() |
385 | | |
386 | | template <class _CharT, class _Traits> |
387 | 0 | typename basic_streambuf<_CharT, _Traits>::int_type basic_streambuf<_CharT, _Traits>::uflow() { |
388 | 0 | if (underflow() == traits_type::eof()) |
389 | 0 | return traits_type::eof(); |
390 | 0 | return traits_type::to_int_type(*__ninp_++); |
391 | 0 | } Unexecuted instantiation: std::__1::basic_streambuf<char, std::__1::char_traits<char> >::uflow() Unexecuted instantiation: std::__1::basic_streambuf<wchar_t, std::__1::char_traits<wchar_t> >::uflow() |
392 | | |
393 | | template <class _CharT, class _Traits> |
394 | 0 | typename basic_streambuf<_CharT, _Traits>::int_type basic_streambuf<_CharT, _Traits>::pbackfail(int_type) { |
395 | 0 | return traits_type::eof(); |
396 | 0 | } Unexecuted instantiation: std::__1::basic_streambuf<char, std::__1::char_traits<char> >::pbackfail(int) Unexecuted instantiation: std::__1::basic_streambuf<wchar_t, std::__1::char_traits<wchar_t> >::pbackfail(unsigned int) |
397 | | |
398 | | template <class _CharT, class _Traits> |
399 | 11.5k | streamsize basic_streambuf<_CharT, _Traits>::xsputn(const char_type* __s, streamsize __n) { |
400 | 11.5k | streamsize __i = 0; |
401 | 11.5k | int_type __eof = traits_type::eof(); |
402 | 27.1k | while (__i < __n) { |
403 | 15.5k | if (__nout_ >= __eout_) { |
404 | 4.36k | if (overflow(traits_type::to_int_type(*__s)) == __eof) |
405 | 0 | break; |
406 | 4.36k | ++__s; |
407 | 4.36k | ++__i; |
408 | 11.1k | } else { |
409 | 11.1k | streamsize __chunk_size = std::min(__eout_ - __nout_, __n - __i); |
410 | 11.1k | traits_type::copy(__nout_, __s, __chunk_size); |
411 | 11.1k | __nout_ += __chunk_size; |
412 | 11.1k | __s += __chunk_size; |
413 | 11.1k | __i += __chunk_size; |
414 | 11.1k | } |
415 | 15.5k | } |
416 | 11.5k | return __i; |
417 | 11.5k | } std::__1::basic_streambuf<char, std::__1::char_traits<char> >::xsputn(char const*, long) Line | Count | Source | 399 | 11.5k | streamsize basic_streambuf<_CharT, _Traits>::xsputn(const char_type* __s, streamsize __n) { | 400 | 11.5k | streamsize __i = 0; | 401 | 11.5k | int_type __eof = traits_type::eof(); | 402 | 27.1k | while (__i < __n) { | 403 | 15.5k | if (__nout_ >= __eout_) { | 404 | 4.36k | if (overflow(traits_type::to_int_type(*__s)) == __eof) | 405 | 0 | break; | 406 | 4.36k | ++__s; | 407 | 4.36k | ++__i; | 408 | 11.1k | } else { | 409 | 11.1k | streamsize __chunk_size = std::min(__eout_ - __nout_, __n - __i); | 410 | 11.1k | traits_type::copy(__nout_, __s, __chunk_size); | 411 | 11.1k | __nout_ += __chunk_size; | 412 | 11.1k | __s += __chunk_size; | 413 | 11.1k | __i += __chunk_size; | 414 | 11.1k | } | 415 | 15.5k | } | 416 | 11.5k | return __i; | 417 | 11.5k | } |
Unexecuted instantiation: std::__1::basic_streambuf<wchar_t, std::__1::char_traits<wchar_t> >::xsputn(wchar_t const*, long) |
418 | | |
419 | | template <class _CharT, class _Traits> |
420 | 0 | typename basic_streambuf<_CharT, _Traits>::int_type basic_streambuf<_CharT, _Traits>::overflow(int_type) { |
421 | 0 | return traits_type::eof(); |
422 | 0 | } Unexecuted instantiation: std::__1::basic_streambuf<char, std::__1::char_traits<char> >::overflow(int) Unexecuted instantiation: std::__1::basic_streambuf<wchar_t, std::__1::char_traits<wchar_t> >::overflow(unsigned int) |
423 | | |
424 | | extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_streambuf<char>; |
425 | | |
426 | | #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS |
427 | | extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_streambuf<wchar_t>; |
428 | | #endif |
429 | | |
430 | | _LIBCPP_END_NAMESPACE_STD |
431 | | |
432 | | _LIBCPP_POP_MACROS |
433 | | |
434 | | #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 |
435 | | # include <cstdint> |
436 | | #endif |
437 | | |
438 | | #endif // _LIBCPP_STREAMBUF |