Coverage Report

Created: 2024-09-08 06:18

/src/llvm-project-16.0.6.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 <cstdint>
113
#include <ios>
114
#include <iosfwd>
115
#include <version>
116
117
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
118
#  pragma GCC system_header
119
#endif
120
121
_LIBCPP_PUSH_MACROS
122
#include <__undef_macros>
123
124
_LIBCPP_BEGIN_NAMESPACE_STD
125
126
template <class _CharT, class _Traits>
127
class _LIBCPP_TEMPLATE_VIS basic_streambuf
128
{
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
    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
144
0
    locale pubimbue(const locale& __loc) {
145
0
        imbue(__loc);
146
0
        locale __r = __loc_;
147
0
        __loc_ = __loc;
148
0
        return __r;
149
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&)
150
151
    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
152
0
    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
153
154
    // 27.6.2.2.2 buffer and positioning:
155
    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
156
    basic_streambuf* pubsetbuf(char_type* __s, streamsize __n)
157
0
    { return setbuf(__s, __n); }
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)
158
159
    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
160
    pos_type pubseekoff(off_type __off, ios_base::seekdir __way,
161
                        ios_base::openmode __which = ios_base::in | ios_base::out)
162
0
    { return seekoff(__off, __way, __which); }
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)
163
164
    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
165
    pos_type pubseekpos(pos_type __sp,
166
                        ios_base::openmode __which = ios_base::in | ios_base::out)
167
0
    { return seekpos(__sp, __which); }
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)
168
169
    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
170
0
    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()
171
172
    // Get and put areas:
173
    // 27.6.2.2.3 Get area:
174
    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
175
0
    streamsize in_avail() {
176
0
        if (__ninp_ < __einp_)
177
0
            return static_cast<streamsize>(__einp_ - __ninp_);
178
0
        return showmanyc();
179
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()
180
181
    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
182
0
    int_type snextc() {
183
0
        if (sbumpc() == traits_type::eof())
184
0
            return traits_type::eof();
185
0
        return sgetc();
186
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()
187
188
    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
189
5.06M
    int_type sbumpc() {
190
5.06M
        if (__ninp_ == __einp_)
191
0
            return uflow();
192
5.06M
        return traits_type::to_int_type(*__ninp_++);
193
5.06M
    }
std::__1::basic_streambuf<char, std::__1::char_traits<char> >::sbumpc()
Line
Count
Source
189
5.06M
    int_type sbumpc() {
190
5.06M
        if (__ninp_ == __einp_)
191
0
            return uflow();
192
5.06M
        return traits_type::to_int_type(*__ninp_++);
193
5.06M
    }
Unexecuted instantiation: std::__1::basic_streambuf<wchar_t, std::__1::char_traits<wchar_t> >::sbumpc()
194
195
    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
196
10.1M
    int_type sgetc() {
197
10.1M
        if (__ninp_ == __einp_)
198
614
            return underflow();
199
10.1M
        return traits_type::to_int_type(*__ninp_);
200
10.1M
    }
std::__1::basic_streambuf<char, std::__1::char_traits<char> >::sgetc()
Line
Count
Source
196
10.1M
    int_type sgetc() {
197
10.1M
        if (__ninp_ == __einp_)
198
614
            return underflow();
199
10.1M
        return traits_type::to_int_type(*__ninp_);
200
10.1M
    }
Unexecuted instantiation: std::__1::basic_streambuf<wchar_t, std::__1::char_traits<wchar_t> >::sgetc()
201
202
    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
203
    streamsize sgetn(char_type* __s, streamsize __n)
204
0
    { 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)
205
206
    // 27.6.2.2.4 Putback:
207
    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
208
0
    int_type sputbackc(char_type __c) {
209
0
        if (__binp_ == __ninp_ || !traits_type::eq(__c, __ninp_[-1]))
210
0
            return pbackfail(traits_type::to_int_type(__c));
211
0
        return traits_type::to_int_type(*--__ninp_);
212
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)
213
214
    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
215
0
    int_type sungetc() {
216
0
        if (__binp_ == __ninp_)
217
0
          return pbackfail();
218
0
        return traits_type::to_int_type(*--__ninp_);
219
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()
220
221
    // 27.6.2.2.5 Put area:
222
    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
223
0
    int_type sputc(char_type __c) {
224
0
        if (__nout_ == __eout_)
225
0
            return overflow(traits_type::to_int_type(__c));
226
0
        *__nout_++ = __c;
227
0
        return traits_type::to_int_type(__c);
228
0
    }
Unexecuted instantiation: std::__1::basic_streambuf<char, std::__1::char_traits<char> >::sputc(char)
Unexecuted instantiation: std::__1::basic_streambuf<wchar_t, std::__1::char_traits<wchar_t> >::sputc(wchar_t)
229
230
    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
231
    streamsize sputn(const char_type* __s, streamsize __n)
232
9.48k
    { return xsputn(__s, __n); }
std::__1::basic_streambuf<char, std::__1::char_traits<char> >::sputn(char const*, long)
Line
Count
Source
232
9.48k
    { return xsputn(__s, __n); }
Unexecuted instantiation: std::__1::basic_streambuf<wchar_t, std::__1::char_traits<wchar_t> >::sputn(wchar_t const*, long)
233
234
protected:
235
    basic_streambuf();
236
    basic_streambuf(const basic_streambuf& __rhs);
237
    basic_streambuf& operator=(const basic_streambuf& __rhs);
238
    void swap(basic_streambuf& __rhs);
239
240
    // 27.6.2.3.2 Get area:
241
3.53k
    _LIBCPP_INLINE_VISIBILITY char_type* eback() const {return __binp_;}
242
4.15k
    _LIBCPP_INLINE_VISIBILITY char_type* gptr()  const {return __ninp_;}
243
1.22k
    _LIBCPP_INLINE_VISIBILITY char_type* egptr() const {return __einp_;}
244
245
    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
246
0
    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)
247
248
    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
249
0
    void setg(char_type* __gbeg, char_type* __gnext, char_type* __gend) {
250
0
        __binp_ = __gbeg;
251
0
        __ninp_ = __gnext;
252
0
        __einp_ = __gend;
253
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*)
254
255
    // 27.6.2.3.3 Put area:
256
13.4k
    _LIBCPP_INLINE_VISIBILITY char_type* pbase() const {return __bout_;}
257
16.7k
    _LIBCPP_INLINE_VISIBILITY char_type* pptr()  const {return __nout_;}
258
3.53k
    _LIBCPP_INLINE_VISIBILITY char_type* epptr() const {return __eout_;}
259
260
    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
261
0
    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)
262
263
    _LIBCPP_INLINE_VISIBILITY
264
3.53k
    void __pbump(streamsize __n) { __nout_ += __n; }
265
266
    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
267
0
    void setp(char_type* __pbeg, char_type* __pend) {
268
0
        __bout_ = __nout_ = __pbeg;
269
0
        __eout_ = __pend;
270
0
    }
Unexecuted instantiation: std::__1::basic_streambuf<char, std::__1::char_traits<char> >::setp(char*, char*)
Unexecuted instantiation: std::__1::basic_streambuf<wchar_t, std::__1::char_traits<wchar_t> >::setp(wchar_t*, wchar_t*)
271
272
    // 27.6.2.4 virtual functions:
273
    // 27.6.2.4.1 Locales:
274
    virtual void imbue(const locale& __loc);
275
276
    // 27.6.2.4.2 Buffer management and positioning:
277
    virtual basic_streambuf* setbuf(char_type* __s, streamsize __n);
278
    virtual pos_type seekoff(off_type __off, ios_base::seekdir __way,
279
                             ios_base::openmode __which = ios_base::in | ios_base::out);
280
    virtual pos_type seekpos(pos_type __sp,
281
                             ios_base::openmode __which = ios_base::in | ios_base::out);
282
    virtual int sync();
283
284
    // 27.6.2.4.3 Get area:
285
    virtual streamsize showmanyc();
286
    virtual streamsize xsgetn(char_type* __s, streamsize __n);
287
    virtual int_type underflow();
288
    virtual int_type uflow();
289
290
    // 27.6.2.4.4 Putback:
291
    virtual int_type pbackfail(int_type __c = traits_type::eof());
292
293
    // 27.6.2.4.5 Put area:
294
    virtual streamsize xsputn(const char_type* __s, streamsize __n);
295
    virtual int_type overflow(int_type __c = traits_type::eof());
296
297
private:
298
    locale __loc_;
299
    char_type* __binp_;
300
    char_type* __ninp_;
301
    char_type* __einp_;
302
    char_type* __bout_;
303
    char_type* __nout_;
304
    char_type* __eout_;
305
};
306
307
template <class _CharT, class _Traits>
308
basic_streambuf<_CharT, _Traits>::~basic_streambuf()
309
4.92k
{
310
4.92k
}
std::__1::basic_streambuf<char, std::__1::char_traits<char> >::~basic_streambuf()
Line
Count
Source
309
4.92k
{
310
4.92k
}
Unexecuted instantiation: std::__1::basic_streambuf<wchar_t, std::__1::char_traits<wchar_t> >::~basic_streambuf()
311
312
template <class _CharT, class _Traits>
313
basic_streambuf<_CharT, _Traits>::basic_streambuf()
314
    : __binp_(nullptr),
315
      __ninp_(nullptr),
316
      __einp_(nullptr),
317
      __bout_(nullptr),
318
      __nout_(nullptr),
319
      __eout_(nullptr)
320
4.92k
{
321
4.92k
}
std::__1::basic_streambuf<char, std::__1::char_traits<char> >::basic_streambuf()
Line
Count
Source
320
4.92k
{
321
4.92k
}
Unexecuted instantiation: std::__1::basic_streambuf<wchar_t, std::__1::char_traits<wchar_t> >::basic_streambuf()
322
323
template <class _CharT, class _Traits>
324
basic_streambuf<_CharT, _Traits>::basic_streambuf(const basic_streambuf& __sb)
325
    : __loc_(__sb.__loc_),
326
      __binp_(__sb.__binp_),
327
      __ninp_(__sb.__ninp_),
328
      __einp_(__sb.__einp_),
329
      __bout_(__sb.__bout_),
330
      __nout_(__sb.__nout_),
331
      __eout_(__sb.__eout_)
332
0
{
333
0
}
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&)
334
335
template <class _CharT, class _Traits>
336
basic_streambuf<_CharT, _Traits>&
337
basic_streambuf<_CharT, _Traits>::operator=(const basic_streambuf& __sb)
338
0
{
339
0
    __loc_ = __sb.__loc_;
340
0
    __binp_ = __sb.__binp_;
341
0
    __ninp_ = __sb.__ninp_;
342
0
    __einp_ = __sb.__einp_;
343
0
    __bout_ = __sb.__bout_;
344
0
    __nout_ = __sb.__nout_;
345
0
    __eout_ = __sb.__eout_;
346
0
    return *this;
347
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&)
348
349
template <class _CharT, class _Traits>
350
void
351
basic_streambuf<_CharT, _Traits>::swap(basic_streambuf& __sb)
352
0
{
353
0
    _VSTD::swap(__loc_, __sb.__loc_);
354
0
    _VSTD::swap(__binp_, __sb.__binp_);
355
0
    _VSTD::swap(__ninp_, __sb.__ninp_);
356
0
    _VSTD::swap(__einp_, __sb.__einp_);
357
0
    _VSTD::swap(__bout_, __sb.__bout_);
358
0
    _VSTD::swap(__nout_, __sb.__nout_);
359
0
    _VSTD::swap(__eout_, __sb.__eout_);
360
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> >&)
361
362
template <class _CharT, class _Traits>
363
void
364
basic_streambuf<_CharT, _Traits>::imbue(const locale&)
365
0
{
366
0
}
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&)
367
368
template <class _CharT, class _Traits>
369
basic_streambuf<_CharT, _Traits>*
370
basic_streambuf<_CharT, _Traits>::setbuf(char_type*, streamsize)
371
0
{
372
0
    return this;
373
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)
374
375
template <class _CharT, class _Traits>
376
typename basic_streambuf<_CharT, _Traits>::pos_type
377
basic_streambuf<_CharT, _Traits>::seekoff(off_type, ios_base::seekdir,
378
                                          ios_base::openmode)
379
0
{
380
0
    return pos_type(off_type(-1));
381
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)
382
383
template <class _CharT, class _Traits>
384
typename basic_streambuf<_CharT, _Traits>::pos_type
385
basic_streambuf<_CharT, _Traits>::seekpos(pos_type, ios_base::openmode)
386
0
{
387
0
    return pos_type(off_type(-1));
388
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)
389
390
template <class _CharT, class _Traits>
391
int
392
basic_streambuf<_CharT, _Traits>::sync()
393
0
{
394
0
    return 0;
395
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()
396
397
template <class _CharT, class _Traits>
398
streamsize
399
basic_streambuf<_CharT, _Traits>::showmanyc()
400
0
{
401
0
    return 0;
402
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()
403
404
template <class _CharT, class _Traits>
405
streamsize
406
basic_streambuf<_CharT, _Traits>::xsgetn(char_type* __s, streamsize __n)
407
0
{
408
0
    const int_type __eof = traits_type::eof();
409
0
    int_type __c;
410
0
    streamsize __i = 0;
411
0
    while(__i < __n)
412
0
    {
413
0
        if (__ninp_ < __einp_)
414
0
        {
415
0
            const streamsize __len = _VSTD::min(static_cast<streamsize>(INT_MAX),
416
0
                                _VSTD::min(__einp_ - __ninp_, __n - __i));
417
0
            traits_type::copy(__s, __ninp_, __len);
418
0
            __s +=  __len;
419
0
            __i +=  __len;
420
0
            this->gbump(__len);
421
0
        }
422
0
        else if ((__c = uflow()) != __eof)
423
0
        {
424
0
            *__s = traits_type::to_char_type(__c);
425
0
            ++__s;
426
0
            ++__i;
427
0
        }
428
0
        else
429
0
            break;
430
0
    }
431
0
    return __i;
432
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)
433
434
template <class _CharT, class _Traits>
435
typename basic_streambuf<_CharT, _Traits>::int_type
436
basic_streambuf<_CharT, _Traits>::underflow()
437
0
{
438
0
    return traits_type::eof();
439
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()
440
441
template <class _CharT, class _Traits>
442
typename basic_streambuf<_CharT, _Traits>::int_type
443
basic_streambuf<_CharT, _Traits>::uflow()
444
0
{
445
0
    if (underflow() == traits_type::eof())
446
0
        return traits_type::eof();
447
0
    return traits_type::to_int_type(*__ninp_++);
448
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()
449
450
template <class _CharT, class _Traits>
451
typename basic_streambuf<_CharT, _Traits>::int_type
452
basic_streambuf<_CharT, _Traits>::pbackfail(int_type)
453
0
{
454
0
    return traits_type::eof();
455
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)
456
457
template <class _CharT, class _Traits>
458
streamsize
459
basic_streambuf<_CharT, _Traits>::xsputn(const char_type* __s, streamsize __n)
460
9.48k
{
461
9.48k
    streamsize __i = 0;
462
9.48k
    int_type __eof = traits_type::eof();
463
22.1k
    while( __i < __n)
464
12.6k
    {
465
12.6k
        if (__nout_ >= __eout_)
466
3.53k
        {
467
3.53k
            if (overflow(traits_type::to_int_type(*__s)) == __eof)
468
0
                break;
469
3.53k
            ++__s;
470
3.53k
            ++__i;
471
3.53k
        }
472
9.12k
        else
473
9.12k
        {
474
9.12k
            streamsize __chunk_size = _VSTD::min(__eout_ - __nout_, __n - __i);
475
9.12k
            traits_type::copy(__nout_, __s, __chunk_size);
476
9.12k
            __nout_ += __chunk_size;
477
9.12k
            __s     += __chunk_size;
478
9.12k
            __i     += __chunk_size;
479
9.12k
        }
480
12.6k
    }
481
9.48k
    return __i;
482
9.48k
}
std::__1::basic_streambuf<char, std::__1::char_traits<char> >::xsputn(char const*, long)
Line
Count
Source
460
9.48k
{
461
9.48k
    streamsize __i = 0;
462
9.48k
    int_type __eof = traits_type::eof();
463
22.1k
    while( __i < __n)
464
12.6k
    {
465
12.6k
        if (__nout_ >= __eout_)
466
3.53k
        {
467
3.53k
            if (overflow(traits_type::to_int_type(*__s)) == __eof)
468
0
                break;
469
3.53k
            ++__s;
470
3.53k
            ++__i;
471
3.53k
        }
472
9.12k
        else
473
9.12k
        {
474
9.12k
            streamsize __chunk_size = _VSTD::min(__eout_ - __nout_, __n - __i);
475
9.12k
            traits_type::copy(__nout_, __s, __chunk_size);
476
9.12k
            __nout_ += __chunk_size;
477
9.12k
            __s     += __chunk_size;
478
9.12k
            __i     += __chunk_size;
479
9.12k
        }
480
12.6k
    }
481
9.48k
    return __i;
482
9.48k
}
Unexecuted instantiation: std::__1::basic_streambuf<wchar_t, std::__1::char_traits<wchar_t> >::xsputn(wchar_t const*, long)
483
484
template <class _CharT, class _Traits>
485
typename basic_streambuf<_CharT, _Traits>::int_type
486
basic_streambuf<_CharT, _Traits>::overflow(int_type)
487
0
{
488
0
    return traits_type::eof();
489
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)
490
491
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_streambuf<char>;
492
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_ios<char>;
493
494
#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
495
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_streambuf<wchar_t>;
496
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_ios<wchar_t>;
497
#endif
498
499
_LIBCPP_END_NAMESPACE_STD
500
501
_LIBCPP_POP_MACROS
502
503
#endif // _LIBCPP_STREAMBUF