Coverage Report

Created: 2020-02-18 08:44

/Users/buildslave/jenkins/workspace/coverage/llvm-project/libcxx/include/istream
Line
Count
Source (jump to first uncovered line)
1
// -*- C++ -*-
2
//===--------------------------- istream ----------------------------------===//
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_ISTREAM
11
#define _LIBCPP_ISTREAM
12
13
/*
14
    istream synopsis
15
16
template <class charT, class traits = char_traits<charT> >
17
class basic_istream
18
    : virtual public basic_ios<charT,traits>
19
{
20
public:
21
    // types (inherited from basic_ios (27.5.4)):
22
    typedef charT                          char_type;
23
    typedef traits                         traits_type;
24
    typedef typename traits_type::int_type int_type;
25
    typedef typename traits_type::pos_type pos_type;
26
    typedef typename traits_type::off_type off_type;
27
28
    // 27.7.1.1.1 Constructor/destructor:
29
    explicit basic_istream(basic_streambuf<char_type, traits_type>* sb);
30
    basic_istream(basic_istream&& rhs);
31
    virtual ~basic_istream();
32
33
    // 27.7.1.1.2 Assign/swap:
34
    basic_istream& operator=(basic_istream&& rhs);
35
    void swap(basic_istream& rhs);
36
37
    // 27.7.1.1.3 Prefix/suffix:
38
    class sentry;
39
40
    // 27.7.1.2 Formatted input:
41
    basic_istream& operator>>(basic_istream& (*pf)(basic_istream&));
42
    basic_istream& operator>>(basic_ios<char_type, traits_type>&
43
                              (*pf)(basic_ios<char_type, traits_type>&));
44
    basic_istream& operator>>(ios_base& (*pf)(ios_base&));
45
    basic_istream& operator>>(basic_streambuf<char_type, traits_type>* sb);
46
    basic_istream& operator>>(bool& n);
47
    basic_istream& operator>>(short& n);
48
    basic_istream& operator>>(unsigned short& n);
49
    basic_istream& operator>>(int& n);
50
    basic_istream& operator>>(unsigned int& n);
51
    basic_istream& operator>>(long& n);
52
    basic_istream& operator>>(unsigned long& n);
53
    basic_istream& operator>>(long long& n);
54
    basic_istream& operator>>(unsigned long long& n);
55
    basic_istream& operator>>(float& f);
56
    basic_istream& operator>>(double& f);
57
    basic_istream& operator>>(long double& f);
58
    basic_istream& operator>>(void*& p);
59
60
    // 27.7.1.3 Unformatted input:
61
    streamsize gcount() const;
62
    int_type get();
63
    basic_istream& get(char_type& c);
64
    basic_istream& get(char_type* s, streamsize n);
65
    basic_istream& get(char_type* s, streamsize n, char_type delim);
66
    basic_istream& get(basic_streambuf<char_type,traits_type>& sb);
67
    basic_istream& get(basic_streambuf<char_type,traits_type>& sb, char_type delim);
68
69
    basic_istream& getline(char_type* s, streamsize n);
70
    basic_istream& getline(char_type* s, streamsize n, char_type delim);
71
72
    basic_istream& ignore(streamsize n = 1, int_type delim = traits_type::eof());
73
    int_type peek();
74
    basic_istream& read (char_type* s, streamsize n);
75
    streamsize readsome(char_type* s, streamsize n);
76
77
    basic_istream& putback(char_type c);
78
    basic_istream& unget();
79
    int sync();
80
81
    pos_type tellg();
82
    basic_istream& seekg(pos_type);
83
    basic_istream& seekg(off_type, ios_base::seekdir);
84
protected:
85
    basic_istream(const basic_istream& rhs) = delete;
86
    basic_istream(basic_istream&& rhs);
87
    // 27.7.2.1.2 Assign/swap:
88
    basic_istream& operator=(const basic_istream& rhs) = delete;
89
    basic_istream& operator=(basic_istream&& rhs);
90
    void swap(basic_istream& rhs);
91
};
92
93
// 27.7.1.2.3 character extraction templates:
94
template<class charT, class traits>
95
  basic_istream<charT,traits>& operator>>(basic_istream<charT,traits>&, charT&);
96
97
template<class traits>
98
  basic_istream<char,traits>& operator>>(basic_istream<char,traits>&, unsigned char&);
99
100
template<class traits>
101
  basic_istream<char,traits>& operator>>(basic_istream<char,traits>&, signed char&);
102
103
template<class charT, class traits>
104
  basic_istream<charT,traits>& operator>>(basic_istream<charT,traits>&, charT*);
105
106
template<class traits>
107
  basic_istream<char,traits>& operator>>(basic_istream<char,traits>&, unsigned char*);
108
109
template<class traits>
110
  basic_istream<char,traits>& operator>>(basic_istream<char,traits>&, signed char*);
111
112
template <class charT, class traits>
113
  void
114
  swap(basic_istream<charT, traits>& x, basic_istream<charT, traits>& y);
115
116
typedef basic_istream<char> istream;
117
typedef basic_istream<wchar_t> wistream;
118
119
template <class charT, class traits = char_traits<charT> >
120
class basic_iostream :
121
    public basic_istream<charT,traits>,
122
    public basic_ostream<charT,traits>
123
{
124
public:
125
    // types:
126
    typedef charT                          char_type;
127
    typedef traits                         traits_type;
128
    typedef typename traits_type::int_type int_type;
129
    typedef typename traits_type::pos_type pos_type;
130
    typedef typename traits_type::off_type off_type;
131
132
    // constructor/destructor
133
    explicit basic_iostream(basic_streambuf<char_type, traits_type>* sb);
134
    basic_iostream(basic_iostream&& rhs);
135
    virtual ~basic_iostream();
136
137
    // assign/swap
138
    basic_iostream& operator=(basic_iostream&& rhs);
139
    void swap(basic_iostream& rhs);
140
};
141
142
template <class charT, class traits>
143
  void
144
  swap(basic_iostream<charT, traits>& x, basic_iostream<charT, traits>& y);
145
146
typedef basic_iostream<char> iostream;
147
typedef basic_iostream<wchar_t> wiostream;
148
149
template <class charT, class traits>
150
  basic_istream<charT,traits>&
151
  ws(basic_istream<charT,traits>& is);
152
153
template <class charT, class traits, class T>
154
  basic_istream<charT, traits>&
155
  operator>>(basic_istream<charT, traits>&& is, T& x);
156
157
}  // std
158
159
*/
160
161
#include <__config>
162
#include <version>
163
#include <ostream>
164
165
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
166
#pragma GCC system_header
167
#endif
168
169
_LIBCPP_PUSH_MACROS
170
#include <__undef_macros>
171
172
173
_LIBCPP_BEGIN_NAMESPACE_STD
174
175
template <class _CharT, class _Traits>
176
class _LIBCPP_TEMPLATE_VIS basic_istream
177
    : virtual public basic_ios<_CharT, _Traits>
178
{
179
    streamsize __gc_;
180
public:
181
    // types (inherited from basic_ios (27.5.4)):
182
    typedef _CharT                         char_type;
183
    typedef _Traits                        traits_type;
184
    typedef typename traits_type::int_type int_type;
185
    typedef typename traits_type::pos_type pos_type;
186
    typedef typename traits_type::off_type off_type;
187
188
    // 27.7.1.1.1 Constructor/destructor:
189
    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
190
    explicit basic_istream(basic_streambuf<char_type, traits_type>* __sb) : __gc_(0)
191
19.1M
    { this->init(__sb); }
std::__1::basic_istream<char, std::__1::char_traits<char> >::basic_istream(std::__1::basic_streambuf<char, std::__1::char_traits<char> >*)
Line
Count
Source
191
19.1M
    { this->init(__sb); }
std::__1::basic_istream<char, std::__1::char_traits<char> >::basic_istream(std::__1::basic_streambuf<char, std::__1::char_traits<char> >*)
Line
Count
Source
191
5.09k
    { this->init(__sb); }
std::__1::basic_istream<wchar_t, std::__1::char_traits<wchar_t> >::basic_istream(std::__1::basic_streambuf<wchar_t, std::__1::char_traits<wchar_t> >*)
Line
Count
Source
191
2
    { this->init(__sb); }
std::__1::basic_istream<wchar_t, std::__1::char_traits<wchar_t> >::basic_istream(std::__1::basic_streambuf<wchar_t, std::__1::char_traits<wchar_t> >*)
Line
Count
Source
191
5.09k
    { this->init(__sb); }
192
    virtual ~basic_istream();
193
protected:
194
#ifndef _LIBCPP_CXX03_LANG
195
    inline _LIBCPP_INLINE_VISIBILITY
196
    basic_istream(basic_istream&& __rhs);
197
198
    // 27.7.1.1.2 Assign/swap:
199
    inline _LIBCPP_INLINE_VISIBILITY
200
    basic_istream& operator=(basic_istream&& __rhs);
201
#endif
202
203
    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
204
0
    void swap(basic_istream& __rhs) {
205
0
      _VSTD::swap(__gc_, __rhs.__gc_);
206
0
      basic_ios<char_type, traits_type>::swap(__rhs);
207
0
    }
Unexecuted instantiation: std::__1::basic_istream<char, std::__1::char_traits<char> >::swap(std::__1::basic_istream<char, std::__1::char_traits<char> >&)
Unexecuted instantiation: std::__1::basic_istream<wchar_t, std::__1::char_traits<wchar_t> >::swap(std::__1::basic_istream<wchar_t, std::__1::char_traits<wchar_t> >&)
208
209
#ifndef _LIBCPP_CXX03_LANG
210
    basic_istream           (const basic_istream& __rhs) = delete;
211
    basic_istream& operator=(const basic_istream& __rhs) = delete;
212
#endif
213
public:
214
215
    // 27.7.1.1.3 Prefix/suffix:
216
    class _LIBCPP_TEMPLATE_VIS sentry;
217
218
    // 27.7.1.2 Formatted input:
219
    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
220
    basic_istream& operator>>(basic_istream& (*__pf)(basic_istream&))
221
0
    { return __pf(*this); }
Unexecuted instantiation: std::__1::basic_istream<char, std::__1::char_traits<char> >::operator>>(std::__1::basic_istream<char, std::__1::char_traits<char> >& (*)(std::__1::basic_istream<char, std::__1::char_traits<char> >&))
Unexecuted instantiation: std::__1::basic_istream<wchar_t, std::__1::char_traits<wchar_t> >::operator>>(std::__1::basic_istream<wchar_t, std::__1::char_traits<wchar_t> >& (*)(std::__1::basic_istream<wchar_t, std::__1::char_traits<wchar_t> >&))
222
223
    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
224
    basic_istream& operator>>(basic_ios<char_type, traits_type>&
225
                              (*__pf)(basic_ios<char_type, traits_type>&))
226
0
    { __pf(*this); return *this; }
Unexecuted instantiation: std::__1::basic_istream<char, std::__1::char_traits<char> >::operator>>(std::__1::basic_ios<char, std::__1::char_traits<char> >& (*)(std::__1::basic_ios<char, std::__1::char_traits<char> >&))
Unexecuted instantiation: std::__1::basic_istream<wchar_t, std::__1::char_traits<wchar_t> >::operator>>(std::__1::basic_ios<wchar_t, std::__1::char_traits<wchar_t> >& (*)(std::__1::basic_ios<wchar_t, std::__1::char_traits<wchar_t> >&))
227
228
    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
229
    basic_istream& operator>>(ios_base& (*__pf)(ios_base&))
230
0
    { __pf(*this); return *this; }
Unexecuted instantiation: std::__1::basic_istream<char, std::__1::char_traits<char> >::operator>>(std::__1::ios_base& (*)(std::__1::ios_base&))
Unexecuted instantiation: std::__1::basic_istream<wchar_t, std::__1::char_traits<wchar_t> >::operator>>(std::__1::ios_base& (*)(std::__1::ios_base&))
231
232
    basic_istream& operator>>(basic_streambuf<char_type, traits_type>* __sb);
233
    basic_istream& operator>>(bool& __n);
234
    basic_istream& operator>>(short& __n);
235
    basic_istream& operator>>(unsigned short& __n);
236
    basic_istream& operator>>(int& __n);
237
    basic_istream& operator>>(unsigned int& __n);
238
    basic_istream& operator>>(long& __n);
239
    basic_istream& operator>>(unsigned long& __n);
240
    basic_istream& operator>>(long long& __n);
241
    basic_istream& operator>>(unsigned long long& __n);
242
    basic_istream& operator>>(float& __f);
243
    basic_istream& operator>>(double& __f);
244
    basic_istream& operator>>(long double& __f);
245
    basic_istream& operator>>(void*& __p);
246
247
    // 27.7.1.3 Unformatted input:
248
    _LIBCPP_INLINE_VISIBILITY
249
    streamsize gcount() const {return __gc_;}
250
    int_type get();
251
252
    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
253
0
    basic_istream& get(char_type& __c) {
254
0
      int_type __ch = get();
255
0
      if (__ch != traits_type::eof())
256
0
        __c = traits_type::to_char_type(__ch);
257
0
      return *this;
258
0
    }
Unexecuted instantiation: std::__1::basic_istream<char, std::__1::char_traits<char> >::get(char&)
Unexecuted instantiation: std::__1::basic_istream<wchar_t, std::__1::char_traits<wchar_t> >::get(wchar_t&)
259
260
    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
261
    basic_istream& get(char_type* __s, streamsize __n)
262
0
    { return get(__s, __n, this->widen('\n')); }
Unexecuted instantiation: std::__1::basic_istream<char, std::__1::char_traits<char> >::get(char*, long)
Unexecuted instantiation: std::__1::basic_istream<wchar_t, std::__1::char_traits<wchar_t> >::get(wchar_t*, long)
263
264
    basic_istream& get(char_type* __s, streamsize __n, char_type __dlm);
265
266
    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
267
    basic_istream& get(basic_streambuf<char_type, traits_type>& __sb)
268
0
    { return get(__sb, this->widen('\n')); }
Unexecuted instantiation: std::__1::basic_istream<char, std::__1::char_traits<char> >::get(std::__1::basic_streambuf<char, std::__1::char_traits<char> >&)
Unexecuted instantiation: std::__1::basic_istream<wchar_t, std::__1::char_traits<wchar_t> >::get(std::__1::basic_streambuf<wchar_t, std::__1::char_traits<wchar_t> >&)
269
270
    basic_istream& get(basic_streambuf<char_type, traits_type>& __sb, char_type __dlm);
271
272
    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
273
    basic_istream& getline(char_type* __s, streamsize __n)
274
0
    { return getline(__s, __n, this->widen('\n')); }
Unexecuted instantiation: std::__1::basic_istream<char, std::__1::char_traits<char> >::getline(char*, long)
Unexecuted instantiation: std::__1::basic_istream<wchar_t, std::__1::char_traits<wchar_t> >::getline(wchar_t*, long)
275
276
    basic_istream& getline(char_type* __s, streamsize __n, char_type __dlm);
277
278
    basic_istream& ignore(streamsize __n = 1, int_type __dlm = traits_type::eof());
279
    int_type peek();
280
    basic_istream& read (char_type* __s, streamsize __n);
281
    streamsize readsome(char_type* __s, streamsize __n);
282
283
    basic_istream& putback(char_type __c);
284
    basic_istream& unget();
285
    int sync();
286
287
    pos_type tellg();
288
    basic_istream& seekg(pos_type __pos);
289
    basic_istream& seekg(off_type __off, ios_base::seekdir __dir);
290
};
291
292
template <class _CharT, class _Traits>
293
class _LIBCPP_TEMPLATE_VIS basic_istream<_CharT, _Traits>::sentry
294
{
295
    bool __ok_;
296
297
    sentry(const sentry&); // = delete;
298
    sentry& operator=(const sentry&); // = delete;
299
300
public:
301
    explicit sentry(basic_istream<_CharT, _Traits>& __is, bool __noskipws = false);
302
//    ~sentry() = default;
303
304
    _LIBCPP_INLINE_VISIBILITY
305
        _LIBCPP_EXPLICIT
306
51.6k
        operator bool() const {return __ok_;}
std::__1::basic_istream<char, std::__1::char_traits<char> >::sentry::operator bool() const
Line
Count
Source
306
51.6k
        operator bool() const {return __ok_;}
Unexecuted instantiation: std::__1::basic_istream<wchar_t, std::__1::char_traits<wchar_t> >::sentry::operator bool() const
307
};
308
309
template <class _CharT, class _Traits>
310
basic_istream<_CharT, _Traits>::sentry::sentry(basic_istream<_CharT, _Traits>& __is,
311
                                               bool __noskipws)
312
    : __ok_(false)
313
10
{
314
10
    if (__is.good())
315
10
    {
316
10
        if (__is.tie())
317
0
            __is.tie()->flush();
318
10
        if (!__noskipws && 
(__is.flags() & ios_base::skipws)0
)
319
0
        {
320
0
            typedef istreambuf_iterator<_CharT, _Traits> _Ip;
321
0
            const ctype<_CharT>& __ct = use_facet<ctype<_CharT> >(__is.getloc());
322
0
            _Ip __i(__is);
323
0
            _Ip __eof;
324
0
            for (; __i != __eof; ++__i)
325
0
                if (!__ct.is(__ct.space, *__i))
326
0
                    break;
327
0
            if (__i == __eof)
328
0
                __is.setstate(ios_base::failbit | ios_base::eofbit);
329
0
        }
330
10
        __ok_ = __is.good();
331
10
    }
332
0
    else
333
0
        __is.setstate(ios_base::failbit);
334
10
}
std::__1::basic_istream<char, std::__1::char_traits<char> >::sentry::sentry(std::__1::basic_istream<char, std::__1::char_traits<char> >&, bool)
Line
Count
Source
313
10
{
314
10
    if (__is.good())
315
10
    {
316
10
        if (__is.tie())
317
0
            __is.tie()->flush();
318
10
        if (!__noskipws && 
(__is.flags() & ios_base::skipws)0
)
319
0
        {
320
0
            typedef istreambuf_iterator<_CharT, _Traits> _Ip;
321
0
            const ctype<_CharT>& __ct = use_facet<ctype<_CharT> >(__is.getloc());
322
0
            _Ip __i(__is);
323
0
            _Ip __eof;
324
0
            for (; __i != __eof; ++__i)
325
0
                if (!__ct.is(__ct.space, *__i))
326
0
                    break;
327
0
            if (__i == __eof)
328
0
                __is.setstate(ios_base::failbit | ios_base::eofbit);
329
0
        }
330
10
        __ok_ = __is.good();
331
10
    }
332
0
    else
333
0
        __is.setstate(ios_base::failbit);
334
10
}
Unexecuted instantiation: std::__1::basic_istream<wchar_t, std::__1::char_traits<wchar_t> >::sentry::sentry(std::__1::basic_istream<wchar_t, std::__1::char_traits<wchar_t> >&, bool)
335
336
#ifndef _LIBCPP_CXX03_LANG
337
338
template <class _CharT, class _Traits>
339
basic_istream<_CharT, _Traits>::basic_istream(basic_istream&& __rhs)
340
    : __gc_(__rhs.__gc_)
341
{
342
    __rhs.__gc_ = 0;
343
    this->move(__rhs);
344
}
345
346
template <class _CharT, class _Traits>
347
basic_istream<_CharT, _Traits>&
348
basic_istream<_CharT, _Traits>::operator=(basic_istream&& __rhs)
349
0
{
350
0
    swap(__rhs);
351
0
    return *this;
352
0
}
353
354
#endif  // _LIBCPP_CXX03_LANG
355
356
template <class _CharT, class _Traits>
357
basic_istream<_CharT, _Traits>::~basic_istream()
358
16.4M
{
359
16.4M
}
std::__1::basic_istream<char, std::__1::char_traits<char> >::~basic_istream()
Line
Count
Source
358
16.4M
{
359
16.4M
}
Unexecuted instantiation: std::__1::basic_istream<wchar_t, std::__1::char_traits<wchar_t> >::~basic_istream()
360
361
template <class _Tp, class _CharT, class _Traits>
362
_LIBCPP_INLINE_VISIBILITY
363
basic_istream<_CharT, _Traits>&
364
0
__input_arithmetic(basic_istream<_CharT, _Traits>& __is, _Tp& __n) {
365
0
    ios_base::iostate __state = ios_base::goodbit;
366
0
    typename basic_istream<_CharT, _Traits>::sentry __s(__is);
367
0
    if (__s)
368
0
    {
369
0
#ifndef _LIBCPP_NO_EXCEPTIONS
370
0
        try
371
0
        {
372
0
#endif  // _LIBCPP_NO_EXCEPTIONS
373
0
            typedef istreambuf_iterator<_CharT, _Traits> _Ip;
374
0
            typedef num_get<_CharT, _Ip> _Fp;
375
0
            use_facet<_Fp>(__is.getloc()).get(_Ip(__is), _Ip(), __is, __state, __n);
376
0
#ifndef _LIBCPP_NO_EXCEPTIONS
377
0
        }
378
0
        catch (...)
379
0
        {
380
0
            __state |= ios_base::badbit;
381
0
            __is.__setstate_nothrow(__state);
382
0
            if (__is.exceptions() & ios_base::badbit)
383
0
            {
384
0
                throw;
385
0
            }
386
0
        }
387
0
#endif
388
0
        __is.setstate(__state);
389
0
    }
390
0
    return __is;
391
0
}
Unexecuted instantiation: std::__1::basic_istream<char, std::__1::char_traits<char> >& std::__1::__input_arithmetic<bool, char, std::__1::char_traits<char> >(std::__1::basic_istream<char, std::__1::char_traits<char> >&, bool&)
Unexecuted instantiation: std::__1::basic_istream<char, std::__1::char_traits<char> >& std::__1::__input_arithmetic<unsigned short, char, std::__1::char_traits<char> >(std::__1::basic_istream<char, std::__1::char_traits<char> >&, unsigned short&)
Unexecuted instantiation: std::__1::basic_istream<char, std::__1::char_traits<char> >& std::__1::__input_arithmetic<unsigned int, char, std::__1::char_traits<char> >(std::__1::basic_istream<char, std::__1::char_traits<char> >&, unsigned int&)
Unexecuted instantiation: std::__1::basic_istream<char, std::__1::char_traits<char> >& std::__1::__input_arithmetic<long, char, std::__1::char_traits<char> >(std::__1::basic_istream<char, std::__1::char_traits<char> >&, long&)
Unexecuted instantiation: std::__1::basic_istream<char, std::__1::char_traits<char> >& std::__1::__input_arithmetic<unsigned long, char, std::__1::char_traits<char> >(std::__1::basic_istream<char, std::__1::char_traits<char> >&, unsigned long&)
Unexecuted instantiation: std::__1::basic_istream<char, std::__1::char_traits<char> >& std::__1::__input_arithmetic<long long, char, std::__1::char_traits<char> >(std::__1::basic_istream<char, std::__1::char_traits<char> >&, long long&)
Unexecuted instantiation: std::__1::basic_istream<char, std::__1::char_traits<char> >& std::__1::__input_arithmetic<unsigned long long, char, std::__1::char_traits<char> >(std::__1::basic_istream<char, std::__1::char_traits<char> >&, unsigned long long&)
Unexecuted instantiation: std::__1::basic_istream<char, std::__1::char_traits<char> >& std::__1::__input_arithmetic<float, char, std::__1::char_traits<char> >(std::__1::basic_istream<char, std::__1::char_traits<char> >&, float&)
Unexecuted instantiation: std::__1::basic_istream<char, std::__1::char_traits<char> >& std::__1::__input_arithmetic<double, char, std::__1::char_traits<char> >(std::__1::basic_istream<char, std::__1::char_traits<char> >&, double&)
Unexecuted instantiation: std::__1::basic_istream<char, std::__1::char_traits<char> >& std::__1::__input_arithmetic<long double, char, std::__1::char_traits<char> >(std::__1::basic_istream<char, std::__1::char_traits<char> >&, long double&)
Unexecuted instantiation: std::__1::basic_istream<char, std::__1::char_traits<char> >& std::__1::__input_arithmetic<void*, char, std::__1::char_traits<char> >(std::__1::basic_istream<char, std::__1::char_traits<char> >&, void*&)
Unexecuted instantiation: std::__1::basic_istream<wchar_t, std::__1::char_traits<wchar_t> >& std::__1::__input_arithmetic<bool, wchar_t, std::__1::char_traits<wchar_t> >(std::__1::basic_istream<wchar_t, std::__1::char_traits<wchar_t> >&, bool&)
Unexecuted instantiation: std::__1::basic_istream<wchar_t, std::__1::char_traits<wchar_t> >& std::__1::__input_arithmetic<unsigned short, wchar_t, std::__1::char_traits<wchar_t> >(std::__1::basic_istream<wchar_t, std::__1::char_traits<wchar_t> >&, unsigned short&)
Unexecuted instantiation: std::__1::basic_istream<wchar_t, std::__1::char_traits<wchar_t> >& std::__1::__input_arithmetic<unsigned int, wchar_t, std::__1::char_traits<wchar_t> >(std::__1::basic_istream<wchar_t, std::__1::char_traits<wchar_t> >&, unsigned int&)
Unexecuted instantiation: std::__1::basic_istream<wchar_t, std::__1::char_traits<wchar_t> >& std::__1::__input_arithmetic<long, wchar_t, std::__1::char_traits<wchar_t> >(std::__1::basic_istream<wchar_t, std::__1::char_traits<wchar_t> >&, long&)
Unexecuted instantiation: std::__1::basic_istream<wchar_t, std::__1::char_traits<wchar_t> >& std::__1::__input_arithmetic<unsigned long, wchar_t, std::__1::char_traits<wchar_t> >(std::__1::basic_istream<wchar_t, std::__1::char_traits<wchar_t> >&, unsigned long&)
Unexecuted instantiation: std::__1::basic_istream<wchar_t, std::__1::char_traits<wchar_t> >& std::__1::__input_arithmetic<long long, wchar_t, std::__1::char_traits<wchar_t> >(std::__1::basic_istream<wchar_t, std::__1::char_traits<wchar_t> >&, long long&)
Unexecuted instantiation: std::__1::basic_istream<wchar_t, std::__1::char_traits<wchar_t> >& std::__1::__input_arithmetic<unsigned long long, wchar_t, std::__1::char_traits<wchar_t> >(std::__1::basic_istream<wchar_t, std::__1::char_traits<wchar_t> >&, unsigned long long&)
Unexecuted instantiation: std::__1::basic_istream<wchar_t, std::__1::char_traits<wchar_t> >& std::__1::__input_arithmetic<float, wchar_t, std::__1::char_traits<wchar_t> >(std::__1::basic_istream<wchar_t, std::__1::char_traits<wchar_t> >&, float&)
Unexecuted instantiation: std::__1::basic_istream<wchar_t, std::__1::char_traits<wchar_t> >& std::__1::__input_arithmetic<double, wchar_t, std::__1::char_traits<wchar_t> >(std::__1::basic_istream<wchar_t, std::__1::char_traits<wchar_t> >&, double&)
Unexecuted instantiation: std::__1::basic_istream<wchar_t, std::__1::char_traits<wchar_t> >& std::__1::__input_arithmetic<long double, wchar_t, std::__1::char_traits<wchar_t> >(std::__1::basic_istream<wchar_t, std::__1::char_traits<wchar_t> >&, long double&)
Unexecuted instantiation: std::__1::basic_istream<wchar_t, std::__1::char_traits<wchar_t> >& std::__1::__input_arithmetic<void*, wchar_t, std::__1::char_traits<wchar_t> >(std::__1::basic_istream<wchar_t, std::__1::char_traits<wchar_t> >&, void*&)
392
393
template <class _CharT, class _Traits>
394
basic_istream<_CharT, _Traits>&
395
basic_istream<_CharT, _Traits>::operator>>(unsigned short& __n)
396
0
{
397
0
    return _VSTD::__input_arithmetic<unsigned short>(*this, __n);
398
0
}
Unexecuted instantiation: std::__1::basic_istream<char, std::__1::char_traits<char> >::operator>>(unsigned short&)
Unexecuted instantiation: std::__1::basic_istream<wchar_t, std::__1::char_traits<wchar_t> >::operator>>(unsigned short&)
399
400
template <class _CharT, class _Traits>
401
basic_istream<_CharT, _Traits>&
402
basic_istream<_CharT, _Traits>::operator>>(unsigned int& __n)
403
0
{
404
0
    return _VSTD::__input_arithmetic<unsigned int>(*this, __n);
405
0
}
Unexecuted instantiation: std::__1::basic_istream<char, std::__1::char_traits<char> >::operator>>(unsigned int&)
Unexecuted instantiation: std::__1::basic_istream<wchar_t, std::__1::char_traits<wchar_t> >::operator>>(unsigned int&)
406
407
template <class _CharT, class _Traits>
408
basic_istream<_CharT, _Traits>&
409
basic_istream<_CharT, _Traits>::operator>>(long& __n)
410
0
{
411
0
    return _VSTD::__input_arithmetic<long>(*this, __n);
412
0
}
Unexecuted instantiation: std::__1::basic_istream<char, std::__1::char_traits<char> >::operator>>(long&)
Unexecuted instantiation: std::__1::basic_istream<wchar_t, std::__1::char_traits<wchar_t> >::operator>>(long&)
413
414
template <class _CharT, class _Traits>
415
basic_istream<_CharT, _Traits>&
416
basic_istream<_CharT, _Traits>::operator>>(unsigned long& __n)
417
0
{
418
0
    return _VSTD::__input_arithmetic<unsigned long>(*this, __n);
419
0
}
Unexecuted instantiation: std::__1::basic_istream<char, std::__1::char_traits<char> >::operator>>(unsigned long&)
Unexecuted instantiation: std::__1::basic_istream<wchar_t, std::__1::char_traits<wchar_t> >::operator>>(unsigned long&)
420
421
template <class _CharT, class _Traits>
422
basic_istream<_CharT, _Traits>&
423
basic_istream<_CharT, _Traits>::operator>>(long long& __n)
424
0
{
425
0
    return _VSTD::__input_arithmetic<long long>(*this, __n);
426
0
}
Unexecuted instantiation: std::__1::basic_istream<char, std::__1::char_traits<char> >::operator>>(long long&)
Unexecuted instantiation: std::__1::basic_istream<wchar_t, std::__1::char_traits<wchar_t> >::operator>>(long long&)
427
428
template <class _CharT, class _Traits>
429
basic_istream<_CharT, _Traits>&
430
basic_istream<_CharT, _Traits>::operator>>(unsigned long long& __n)
431
0
{
432
0
    return _VSTD::__input_arithmetic<unsigned long long>(*this, __n);
433
0
}
Unexecuted instantiation: std::__1::basic_istream<char, std::__1::char_traits<char> >::operator>>(unsigned long long&)
Unexecuted instantiation: std::__1::basic_istream<wchar_t, std::__1::char_traits<wchar_t> >::operator>>(unsigned long long&)
434
435
template <class _CharT, class _Traits>
436
basic_istream<_CharT, _Traits>&
437
basic_istream<_CharT, _Traits>::operator>>(float& __n)
438
0
{
439
0
    return _VSTD::__input_arithmetic<float>(*this, __n);
440
0
}
Unexecuted instantiation: std::__1::basic_istream<char, std::__1::char_traits<char> >::operator>>(float&)
Unexecuted instantiation: std::__1::basic_istream<wchar_t, std::__1::char_traits<wchar_t> >::operator>>(float&)
441
442
template <class _CharT, class _Traits>
443
basic_istream<_CharT, _Traits>&
444
basic_istream<_CharT, _Traits>::operator>>(double& __n)
445
0
{
446
0
    return _VSTD::__input_arithmetic<double>(*this, __n);
447
0
}
Unexecuted instantiation: std::__1::basic_istream<char, std::__1::char_traits<char> >::operator>>(double&)
Unexecuted instantiation: std::__1::basic_istream<wchar_t, std::__1::char_traits<wchar_t> >::operator>>(double&)
448
449
template <class _CharT, class _Traits>
450
basic_istream<_CharT, _Traits>&
451
basic_istream<_CharT, _Traits>::operator>>(long double& __n)
452
0
{
453
0
    return _VSTD::__input_arithmetic<long double>(*this, __n);
454
0
}
Unexecuted instantiation: std::__1::basic_istream<char, std::__1::char_traits<char> >::operator>>(long double&)
Unexecuted instantiation: std::__1::basic_istream<wchar_t, std::__1::char_traits<wchar_t> >::operator>>(long double&)
455
456
template <class _CharT, class _Traits>
457
basic_istream<_CharT, _Traits>&
458
basic_istream<_CharT, _Traits>::operator>>(bool& __n)
459
0
{
460
0
    return _VSTD::__input_arithmetic<bool>(*this, __n);
461
0
}
Unexecuted instantiation: std::__1::basic_istream<char, std::__1::char_traits<char> >::operator>>(bool&)
Unexecuted instantiation: std::__1::basic_istream<wchar_t, std::__1::char_traits<wchar_t> >::operator>>(bool&)
462
463
template <class _CharT, class _Traits>
464
basic_istream<_CharT, _Traits>&
465
basic_istream<_CharT, _Traits>::operator>>(void*& __n)
466
0
{
467
0
    return _VSTD::__input_arithmetic<void*>(*this, __n);
468
0
}
Unexecuted instantiation: std::__1::basic_istream<char, std::__1::char_traits<char> >::operator>>(void*&)
Unexecuted instantiation: std::__1::basic_istream<wchar_t, std::__1::char_traits<wchar_t> >::operator>>(void*&)
469
470
template <class _Tp, class _CharT, class _Traits>
471
_LIBCPP_INLINE_VISIBILITY
472
basic_istream<_CharT, _Traits>&
473
0
__input_arithmetic_with_numeric_limits(basic_istream<_CharT, _Traits>& __is, _Tp& __n) {
474
0
    ios_base::iostate __state = ios_base::goodbit;
475
0
    typename basic_istream<_CharT, _Traits>::sentry __s(__is);
476
0
    if (__s)
477
0
    {
478
0
#ifndef _LIBCPP_NO_EXCEPTIONS
479
0
        try
480
0
        {
481
0
#endif  // _LIBCPP_NO_EXCEPTIONS
482
0
            typedef istreambuf_iterator<_CharT, _Traits> _Ip;
483
0
            typedef num_get<_CharT, _Ip> _Fp;
484
0
            long __temp;
485
0
            use_facet<_Fp>(__is.getloc()).get(_Ip(__is), _Ip(), __is, __state, __temp);
486
0
            if (__temp < numeric_limits<_Tp>::min())
487
0
            {
488
0
                __state |= ios_base::failbit;
489
0
                __n = numeric_limits<_Tp>::min();
490
0
            }
491
0
            else if (__temp > numeric_limits<_Tp>::max())
492
0
            {
493
0
                __state |= ios_base::failbit;
494
0
                __n = numeric_limits<_Tp>::max();
495
0
            }
496
0
            else
497
0
            {
498
0
                __n = static_cast<_Tp>(__temp);
499
0
            }
500
0
#ifndef _LIBCPP_NO_EXCEPTIONS
501
0
        }
502
0
        catch (...)
503
0
        {
504
0
            __state |= ios_base::badbit;
505
0
            __is.__setstate_nothrow(__state);
506
0
            if (__is.exceptions() & ios_base::badbit)
507
0
            {
508
0
                throw;
509
0
            }
510
0
        }
511
0
#endif  // _LIBCPP_NO_EXCEPTIONS
512
0
        __is.setstate(__state);
513
0
    }
514
0
    return __is;
515
0
}
Unexecuted instantiation: std::__1::basic_istream<char, std::__1::char_traits<char> >& std::__1::__input_arithmetic_with_numeric_limits<short, char, std::__1::char_traits<char> >(std::__1::basic_istream<char, std::__1::char_traits<char> >&, short&)
Unexecuted instantiation: std::__1::basic_istream<char, std::__1::char_traits<char> >& std::__1::__input_arithmetic_with_numeric_limits<int, char, std::__1::char_traits<char> >(std::__1::basic_istream<char, std::__1::char_traits<char> >&, int&)
Unexecuted instantiation: std::__1::basic_istream<wchar_t, std::__1::char_traits<wchar_t> >& std::__1::__input_arithmetic_with_numeric_limits<short, wchar_t, std::__1::char_traits<wchar_t> >(std::__1::basic_istream<wchar_t, std::__1::char_traits<wchar_t> >&, short&)
Unexecuted instantiation: std::__1::basic_istream<wchar_t, std::__1::char_traits<wchar_t> >& std::__1::__input_arithmetic_with_numeric_limits<int, wchar_t, std::__1::char_traits<wchar_t> >(std::__1::basic_istream<wchar_t, std::__1::char_traits<wchar_t> >&, int&)
516
517
template <class _CharT, class _Traits>
518
basic_istream<_CharT, _Traits>&
519
basic_istream<_CharT, _Traits>::operator>>(short& __n)
520
0
{
521
0
    return _VSTD::__input_arithmetic_with_numeric_limits<short>(*this, __n);
522
0
}
Unexecuted instantiation: std::__1::basic_istream<char, std::__1::char_traits<char> >::operator>>(short&)
Unexecuted instantiation: std::__1::basic_istream<wchar_t, std::__1::char_traits<wchar_t> >::operator>>(short&)
523
524
template <class _CharT, class _Traits>
525
basic_istream<_CharT, _Traits>&
526
basic_istream<_CharT, _Traits>::operator>>(int& __n)
527
0
{
528
0
    return _VSTD::__input_arithmetic_with_numeric_limits<int>(*this, __n);
529
0
}
Unexecuted instantiation: std::__1::basic_istream<char, std::__1::char_traits<char> >::operator>>(int&)
Unexecuted instantiation: std::__1::basic_istream<wchar_t, std::__1::char_traits<wchar_t> >::operator>>(int&)
530
531
template<class _CharT, class _Traits>
532
_LIBCPP_INLINE_VISIBILITY
533
basic_istream<_CharT, _Traits>&
534
__input_c_string(basic_istream<_CharT, _Traits>& __is, _CharT* __p, size_t __n)
535
{
536
    ios_base::iostate __state = ios_base::goodbit;
537
    typename basic_istream<_CharT, _Traits>::sentry __sen(__is);
538
    if (__sen)
539
    {
540
#ifndef _LIBCPP_NO_EXCEPTIONS
541
        try
542
        {
543
#endif
544
            _CharT* __s = __p;
545
            const ctype<_CharT>& __ct = use_facet<ctype<_CharT> >(__is.getloc());
546
            while (__s != __p + (__n-1))
547
            {
548
                typename _Traits::int_type __i = __is.rdbuf()->sgetc();
549
                if (_Traits::eq_int_type(__i, _Traits::eof()))
550
                {
551
                   __state |= ios_base::eofbit;
552
                   break;
553
                }
554
                _CharT __ch = _Traits::to_char_type(__i);
555
                if (__ct.is(__ct.space, __ch))
556
                    break;
557
                *__s++ = __ch;
558
                 __is.rdbuf()->sbumpc();
559
            }
560
            *__s = _CharT();
561
            __is.width(0);
562
            if (__s == __p)
563
               __state |= ios_base::failbit;
564
#ifndef _LIBCPP_NO_EXCEPTIONS
565
        }
566
        catch (...)
567
        {
568
            __state |= ios_base::badbit;
569
            __is.__setstate_nothrow(__state);
570
            if (__is.exceptions() & ios_base::badbit)
571
            {
572
                throw;
573
            }
574
        }
575
#endif
576
        __is.setstate(__state);
577
    }
578
    return __is;
579
}
580
581
#if _LIBCPP_STD_VER > 17
582
583
template<class _CharT, class _Traits, size_t _Np>
584
inline _LIBCPP_INLINE_VISIBILITY
585
basic_istream<_CharT, _Traits>&
586
operator>>(basic_istream<_CharT, _Traits>& __is, _CharT (&__buf)[_Np])
587
{
588
    size_t __n = _Np;
589
    if (__is.width() > 0)
590
        __n = _VSTD::min(size_t(__is.width()), _Np);
591
    return _VSTD::__input_c_string(__is, __buf, __n);
592
}
593
594
template<class _Traits, size_t _Np>
595
inline _LIBCPP_INLINE_VISIBILITY
596
basic_istream<char, _Traits>&
597
operator>>(basic_istream<char, _Traits>& __is, unsigned char (&__buf)[_Np])
598
{
599
    return __is >> (char(&)[_Np])__buf;
600
}
601
602
template<class _Traits, size_t _Np>
603
inline _LIBCPP_INLINE_VISIBILITY
604
basic_istream<char, _Traits>&
605
operator>>(basic_istream<char, _Traits>& __is, signed char (&__buf)[_Np])
606
{
607
    return __is >> (char(&)[_Np])__buf;
608
}
609
610
#else
611
612
template<class _CharT, class _Traits>
613
inline _LIBCPP_INLINE_VISIBILITY
614
basic_istream<_CharT, _Traits>&
615
operator>>(basic_istream<_CharT, _Traits>& __is, _CharT* __s)
616
{
617
    streamsize __n = __is.width();
618
    if (__n <= 0)
619
        __n = numeric_limits<streamsize>::max() / sizeof(_CharT) - 1;
620
    return _VSTD::__input_c_string(__is, __s, size_t(__n));
621
}
622
623
template<class _Traits>
624
inline _LIBCPP_INLINE_VISIBILITY
625
basic_istream<char, _Traits>&
626
operator>>(basic_istream<char, _Traits>& __is, unsigned char* __s)
627
{
628
    return __is >> (char*)__s;
629
}
630
631
template<class _Traits>
632
inline _LIBCPP_INLINE_VISIBILITY
633
basic_istream<char, _Traits>&
634
operator>>(basic_istream<char, _Traits>& __is, signed char* __s)
635
{
636
    return __is >> (char*)__s;
637
}
638
639
#endif  // _LIBCPP_STD_VER > 17
640
641
template<class _CharT, class _Traits>
642
basic_istream<_CharT, _Traits>&
643
operator>>(basic_istream<_CharT, _Traits>& __is, _CharT& __c)
644
{
645
    ios_base::iostate __state = ios_base::goodbit;
646
    typename basic_istream<_CharT, _Traits>::sentry __sen(__is);
647
    if (__sen)
648
    {
649
#ifndef _LIBCPP_NO_EXCEPTIONS
650
        try
651
        {
652
#endif
653
            typename _Traits::int_type __i = __is.rdbuf()->sbumpc();
654
            if (_Traits::eq_int_type(__i, _Traits::eof()))
655
                __state |= ios_base::eofbit | ios_base::failbit;
656
            else
657
                __c = _Traits::to_char_type(__i);
658
#ifndef _LIBCPP_NO_EXCEPTIONS
659
        }
660
        catch (...)
661
        {
662
            __state |= ios_base::badbit;
663
            __is.__setstate_nothrow(__state);
664
            if (__is.exceptions() & ios_base::badbit)
665
            {
666
                throw;
667
            }
668
        }
669
#endif
670
        __is.setstate(__state);
671
    }
672
    return __is;
673
}
674
675
template<class _Traits>
676
inline _LIBCPP_INLINE_VISIBILITY
677
basic_istream<char, _Traits>&
678
operator>>(basic_istream<char, _Traits>& __is, unsigned char& __c)
679
{
680
    return __is >> (char&)__c;
681
}
682
683
template<class _Traits>
684
inline _LIBCPP_INLINE_VISIBILITY
685
basic_istream<char, _Traits>&
686
operator>>(basic_istream<char, _Traits>& __is, signed char& __c)
687
{
688
    return __is >> (char&)__c;
689
}
690
691
template<class _CharT, class _Traits>
692
basic_istream<_CharT, _Traits>&
693
basic_istream<_CharT, _Traits>::operator>>(basic_streambuf<char_type, traits_type>* __sb)
694
0
{
695
0
    ios_base::iostate __state = ios_base::goodbit;
696
0
    __gc_ = 0;
697
0
    sentry __s(*this, true);
698
0
    if (__s)
699
0
    {
700
0
        if (__sb)
701
0
        {
702
0
#ifndef _LIBCPP_NO_EXCEPTIONS
703
0
            try
704
0
            {
705
0
#endif // _LIBCPP_NO_EXCEPTIONS
706
0
                while (true)
707
0
                {
708
0
                    typename traits_type::int_type __i = this->rdbuf()->sgetc();
709
0
                    if (traits_type::eq_int_type(__i, _Traits::eof()))
710
0
                    {
711
0
                       __state |= ios_base::eofbit;
712
0
                       break;
713
0
                    }
714
0
                    if (traits_type::eq_int_type(
715
0
                            __sb->sputc(traits_type::to_char_type(__i)),
716
0
                            traits_type::eof()))
717
0
                        break;
718
0
                    ++__gc_;
719
0
                    this->rdbuf()->sbumpc();
720
0
                }
721
0
                if (__gc_ == 0)
722
0
                   __state |= ios_base::failbit;
723
0
#ifndef _LIBCPP_NO_EXCEPTIONS
724
0
            }
725
0
            catch (...)
726
0
            {
727
0
                __state |= ios_base::badbit;
728
0
                if (__gc_ == 0)
729
0
                    __state |= ios_base::failbit;
730
0
731
0
                this->__setstate_nothrow(__state);
732
0
                if (this->exceptions() & ios_base::failbit || this->exceptions() & ios_base::badbit)
733
0
                {
734
0
                    throw;
735
0
                }
736
0
            }
737
0
#endif  // _LIBCPP_NO_EXCEPTIONS
738
0
        }
739
0
        else
740
0
        {
741
0
            __state |= ios_base::failbit;
742
0
        }
743
0
        this->setstate(__state);
744
0
    }
745
0
    return *this;
746
0
}
Unexecuted instantiation: std::__1::basic_istream<char, std::__1::char_traits<char> >::operator>>(std::__1::basic_streambuf<char, std::__1::char_traits<char> >*)
Unexecuted instantiation: std::__1::basic_istream<wchar_t, std::__1::char_traits<wchar_t> >::operator>>(std::__1::basic_streambuf<wchar_t, std::__1::char_traits<wchar_t> >*)
747
748
template<class _CharT, class _Traits>
749
typename basic_istream<_CharT, _Traits>::int_type
750
basic_istream<_CharT, _Traits>::get()
751
0
{
752
0
    ios_base::iostate __state = ios_base::goodbit;
753
0
    __gc_ = 0;
754
0
    int_type __r = traits_type::eof();
755
0
    sentry __s(*this, true);
756
0
    if (__s)
757
0
    {
758
0
#ifndef _LIBCPP_NO_EXCEPTIONS
759
0
        try
760
0
        {
761
0
#endif
762
0
            __r = this->rdbuf()->sbumpc();
763
0
            if (traits_type::eq_int_type(__r, traits_type::eof()))
764
0
               __state |= ios_base::failbit | ios_base::eofbit;
765
0
            else
766
0
                __gc_ = 1;
767
0
#ifndef _LIBCPP_NO_EXCEPTIONS
768
0
        }
769
0
        catch (...)
770
0
        {
771
0
            this->__setstate_nothrow(this->rdstate() | ios_base::badbit);
772
0
            if (this->exceptions() & ios_base::badbit)
773
0
            {
774
0
                throw;
775
0
            }
776
0
        }
777
0
#endif
778
0
        this->setstate(__state);
779
0
    }
780
0
    return __r;
781
0
}
Unexecuted instantiation: std::__1::basic_istream<char, std::__1::char_traits<char> >::get()
Unexecuted instantiation: std::__1::basic_istream<wchar_t, std::__1::char_traits<wchar_t> >::get()
782
783
template<class _CharT, class _Traits>
784
basic_istream<_CharT, _Traits>&
785
basic_istream<_CharT, _Traits>::get(char_type* __s, streamsize __n, char_type __dlm)
786
0
{
787
0
    ios_base::iostate __state = ios_base::goodbit;
788
0
    __gc_ = 0;
789
0
    sentry __sen(*this, true);
790
0
    if (__sen)
791
0
    {
792
0
        if (__n > 0)
793
0
        {
794
0
#ifndef _LIBCPP_NO_EXCEPTIONS
795
0
            try
796
0
            {
797
0
#endif
798
0
                while (__gc_ < __n-1)
799
0
                {
800
0
                    int_type __i = this->rdbuf()->sgetc();
801
0
                    if (traits_type::eq_int_type(__i, traits_type::eof()))
802
0
                    {
803
0
                       __state |= ios_base::eofbit;
804
0
                       break;
805
0
                    }
806
0
                    char_type __ch = traits_type::to_char_type(__i);
807
0
                    if (traits_type::eq(__ch, __dlm))
808
0
                        break;
809
0
                    *__s++ = __ch;
810
0
                    ++__gc_;
811
0
                     this->rdbuf()->sbumpc();
812
0
                }
813
0
                if (__gc_ == 0)
814
0
                   __state |= ios_base::failbit;
815
0
#ifndef _LIBCPP_NO_EXCEPTIONS
816
0
            }
817
0
            catch (...)
818
0
            {
819
0
                __state |= ios_base::badbit;
820
0
                this->__setstate_nothrow(__state);
821
0
                if (this->exceptions() & ios_base::badbit)
822
0
                {
823
0
                    if (__n > 0)
824
0
                        *__s = char_type();
825
0
                    throw;
826
0
                }
827
0
            }
828
0
#endif
829
0
        }
830
0
        else
831
0
        {
832
0
            __state |= ios_base::failbit;
833
0
        }
834
0
835
0
        if (__n > 0)
836
0
            *__s = char_type();
837
0
        this->setstate(__state);
838
0
    }
839
0
    if (__n > 0)
840
0
        *__s = char_type();
841
0
    return *this;
842
0
}
Unexecuted instantiation: std::__1::basic_istream<char, std::__1::char_traits<char> >::get(char*, long, char)
Unexecuted instantiation: std::__1::basic_istream<wchar_t, std::__1::char_traits<wchar_t> >::get(wchar_t*, long, wchar_t)
843
844
template<class _CharT, class _Traits>
845
basic_istream<_CharT, _Traits>&
846
basic_istream<_CharT, _Traits>::get(basic_streambuf<char_type, traits_type>& __sb,
847
                                    char_type __dlm)
848
0
{
849
0
    ios_base::iostate __state = ios_base::goodbit;
850
0
    __gc_ = 0;
851
0
    sentry __sen(*this, true);
852
0
    if (__sen)
853
0
    {
854
0
#ifndef _LIBCPP_NO_EXCEPTIONS
855
0
        try
856
0
        {
857
0
#endif  // _LIBCPP_NO_EXCEPTIONS
858
0
            while (true)
859
0
            {
860
0
                typename traits_type::int_type __i = this->rdbuf()->sgetc();
861
0
                if (traits_type::eq_int_type(__i, traits_type::eof()))
862
0
                {
863
0
                   __state |= ios_base::eofbit;
864
0
                   break;
865
0
                }
866
0
                char_type __ch = traits_type::to_char_type(__i);
867
0
                if (traits_type::eq(__ch, __dlm))
868
0
                    break;
869
0
                if (traits_type::eq_int_type(__sb.sputc(__ch), traits_type::eof()))
870
0
                    break;
871
0
                ++__gc_;
872
0
                this->rdbuf()->sbumpc();
873
0
            }
874
0
#ifndef _LIBCPP_NO_EXCEPTIONS
875
0
        }
876
0
        catch (...)
877
0
        {
878
0
            __state |= ios_base::badbit;
879
0
            // according to the spec, exceptions here are caught but not rethrown
880
0
        }
881
0
#endif  // _LIBCPP_NO_EXCEPTIONS
882
0
        if (__gc_ == 0)
883
0
           __state |= ios_base::failbit;
884
0
        this->setstate(__state);
885
0
    }
886
0
    return *this;
887
0
}
Unexecuted instantiation: std::__1::basic_istream<char, std::__1::char_traits<char> >::get(std::__1::basic_streambuf<char, std::__1::char_traits<char> >&, char)
Unexecuted instantiation: std::__1::basic_istream<wchar_t, std::__1::char_traits<wchar_t> >::get(std::__1::basic_streambuf<wchar_t, std::__1::char_traits<wchar_t> >&, wchar_t)
888
889
template<class _CharT, class _Traits>
890
basic_istream<_CharT, _Traits>&
891
basic_istream<_CharT, _Traits>::getline(char_type* __s, streamsize __n, char_type __dlm)
892
0
{
893
0
    ios_base::iostate __state = ios_base::goodbit;
894
0
    __gc_ = 0;
895
0
    sentry __sen(*this, true);
896
0
    if (__sen)
897
0
    {
898
0
#ifndef _LIBCPP_NO_EXCEPTIONS
899
0
        try
900
0
        {
901
0
#endif  // _LIBCPP_NO_EXCEPTIONS
902
0
            while (true)
903
0
            {
904
0
                typename traits_type::int_type __i = this->rdbuf()->sgetc();
905
0
                if (traits_type::eq_int_type(__i, traits_type::eof()))
906
0
                {
907
0
                   __state |= ios_base::eofbit;
908
0
                   break;
909
0
                }
910
0
                char_type __ch = traits_type::to_char_type(__i);
911
0
                if (traits_type::eq(__ch, __dlm))
912
0
                {
913
0
                    this->rdbuf()->sbumpc();
914
0
                    ++__gc_;
915
0
                    break;
916
0
                }
917
0
                if (__gc_ >= __n-1)
918
0
                {
919
0
                    __state |= ios_base::failbit;
920
0
                    break;
921
0
                }
922
0
                *__s++ = __ch;
923
0
                this->rdbuf()->sbumpc();
924
0
                ++__gc_;
925
0
            }
926
0
#ifndef _LIBCPP_NO_EXCEPTIONS
927
0
        }
928
0
        catch (...)
929
0
        {
930
0
            __state |= ios_base::badbit;
931
0
            this->__setstate_nothrow(__state);
932
0
            if (this->exceptions() & ios_base::badbit)
933
0
            {
934
0
                if (__n > 0)
935
0
                    *__s = char_type();
936
0
                if (__gc_ == 0)
937
0
                    __state |= ios_base::failbit;
938
0
                throw;
939
0
            }
940
0
        }
941
0
#endif  // _LIBCPP_NO_EXCEPTIONS
942
0
    }
943
0
    if (__n > 0)
944
0
        *__s = char_type();
945
0
    if (__gc_ == 0)
946
0
        __state |= ios_base::failbit;
947
0
    this->setstate(__state);
948
0
    return *this;
949
0
}
Unexecuted instantiation: std::__1::basic_istream<char, std::__1::char_traits<char> >::getline(char*, long, char)
Unexecuted instantiation: std::__1::basic_istream<wchar_t, std::__1::char_traits<wchar_t> >::getline(wchar_t*, long, wchar_t)
950
951
template<class _CharT, class _Traits>
952
basic_istream<_CharT, _Traits>&
953
basic_istream<_CharT, _Traits>::ignore(streamsize __n, int_type __dlm)
954
0
{
955
0
    ios_base::iostate __state = ios_base::goodbit;
956
0
    __gc_ = 0;
957
0
    sentry __sen(*this, true);
958
0
    if (__sen)
959
0
    {
960
0
#ifndef _LIBCPP_NO_EXCEPTIONS
961
0
        try
962
0
        {
963
0
#endif  // _LIBCPP_NO_EXCEPTIONS
964
0
            if (__n == numeric_limits<streamsize>::max())
965
0
            {
966
0
                while (true)
967
0
                {
968
0
                    typename traits_type::int_type __i = this->rdbuf()->sbumpc();
969
0
                    if (traits_type::eq_int_type(__i, traits_type::eof()))
970
0
                    {
971
0
                       __state |= ios_base::eofbit;
972
0
                       break;
973
0
                    }
974
0
                    ++__gc_;
975
0
                    if (traits_type::eq_int_type(__i, __dlm))
976
0
                        break;
977
0
                }
978
0
            }
979
0
            else
980
0
            {
981
0
                while (__gc_ < __n)
982
0
                {
983
0
                    typename traits_type::int_type __i = this->rdbuf()->sbumpc();
984
0
                    if (traits_type::eq_int_type(__i, traits_type::eof()))
985
0
                    {
986
0
                       __state |= ios_base::eofbit;
987
0
                       break;
988
0
                    }
989
0
                    ++__gc_;
990
0
                    if (traits_type::eq_int_type(__i, __dlm))
991
0
                        break;
992
0
                }
993
0
            }
994
0
#ifndef _LIBCPP_NO_EXCEPTIONS
995
0
        }
996
0
        catch (...)
997
0
        {
998
0
            __state |= ios_base::badbit;
999
0
            this->__setstate_nothrow(__state);
1000
0
            if (this->exceptions() & ios_base::badbit)
1001
0
            {
1002
0
                throw;
1003
0
            }
1004
0
        }
1005
0
#endif  // _LIBCPP_NO_EXCEPTIONS
1006
0
        this->setstate(__state);
1007
0
    }
1008
0
    return *this;
1009
0
}
Unexecuted instantiation: std::__1::basic_istream<char, std::__1::char_traits<char> >::ignore(long, int)
Unexecuted instantiation: std::__1::basic_istream<wchar_t, std::__1::char_traits<wchar_t> >::ignore(long, int)
1010
1011
template<class _CharT, class _Traits>
1012
typename basic_istream<_CharT, _Traits>::int_type
1013
basic_istream<_CharT, _Traits>::peek()
1014
0
{
1015
0
    ios_base::iostate __state = ios_base::goodbit;
1016
0
    __gc_ = 0;
1017
0
    int_type __r = traits_type::eof();
1018
0
    sentry __sen(*this, true);
1019
0
    if (__sen)
1020
0
    {
1021
0
#ifndef _LIBCPP_NO_EXCEPTIONS
1022
0
        try
1023
0
        {
1024
0
#endif  // _LIBCPP_NO_EXCEPTIONS
1025
0
            __r = this->rdbuf()->sgetc();
1026
0
            if (traits_type::eq_int_type(__r, traits_type::eof()))
1027
0
                __state |= ios_base::eofbit;
1028
0
#ifndef _LIBCPP_NO_EXCEPTIONS
1029
0
        }
1030
0
        catch (...)
1031
0
        {
1032
0
            __state |= ios_base::badbit;
1033
0
            this->__setstate_nothrow(__state);
1034
0
            if (this->exceptions() & ios_base::badbit)
1035
0
            {
1036
0
                throw;
1037
0
            }
1038
0
        }
1039
0
#endif  // _LIBCPP_NO_EXCEPTIONS
1040
0
        this->setstate(__state);
1041
0
    }
1042
0
    return __r;
1043
0
}
Unexecuted instantiation: std::__1::basic_istream<char, std::__1::char_traits<char> >::peek()
Unexecuted instantiation: std::__1::basic_istream<wchar_t, std::__1::char_traits<wchar_t> >::peek()
1044
1045
template<class _CharT, class _Traits>
1046
basic_istream<_CharT, _Traits>&
1047
basic_istream<_CharT, _Traits>::read(char_type* __s, streamsize __n)
1048
0
{
1049
0
    ios_base::iostate __state = ios_base::goodbit;
1050
0
    __gc_ = 0;
1051
0
    sentry __sen(*this, true);
1052
0
    if (__sen)
1053
0
    {
1054
0
#ifndef _LIBCPP_NO_EXCEPTIONS
1055
0
        try
1056
0
        {
1057
0
#endif  // _LIBCPP_NO_EXCEPTIONS
1058
0
            __gc_ = this->rdbuf()->sgetn(__s, __n);
1059
0
            if (__gc_ != __n)
1060
0
                __state |= ios_base::failbit | ios_base::eofbit;
1061
0
#ifndef _LIBCPP_NO_EXCEPTIONS
1062
0
        }
1063
0
        catch (...)
1064
0
        {
1065
0
            __state |= ios_base::badbit;
1066
0
            this->__setstate_nothrow(__state);
1067
0
            if (this->exceptions() & ios_base::badbit)
1068
0
            {
1069
0
                throw;
1070
0
            }
1071
0
        }
1072
0
#endif  // _LIBCPP_NO_EXCEPTIONS
1073
0
    }
1074
0
    else
1075
0
    {
1076
0
        __state |= ios_base::failbit;
1077
0
    }
1078
0
    this->setstate(__state);
1079
0
    return *this;
1080
0
}
Unexecuted instantiation: std::__1::basic_istream<char, std::__1::char_traits<char> >::read(char*, long)
Unexecuted instantiation: std::__1::basic_istream<wchar_t, std::__1::char_traits<wchar_t> >::read(wchar_t*, long)
1081
1082
template<class _CharT, class _Traits>
1083
streamsize
1084
basic_istream<_CharT, _Traits>::readsome(char_type* __s, streamsize __n)
1085
0
{
1086
0
    ios_base::iostate __state = ios_base::goodbit;
1087
0
    __gc_ = 0;
1088
0
    sentry __sen(*this, true);
1089
0
    if (__sen)
1090
0
    {
1091
0
#ifndef _LIBCPP_NO_EXCEPTIONS
1092
0
        try
1093
0
        {
1094
0
#endif  // _LIBCPP_NO_EXCEPTIONS
1095
0
            streamsize __c = this->rdbuf()->in_avail();
1096
0
            switch (__c)
1097
0
            {
1098
0
            case -1:
1099
0
                __state |= ios_base::eofbit;
1100
0
                break;
1101
0
            case 0:
1102
0
                break;
1103
0
            default:
1104
0
                __n = _VSTD::min(__c, __n);
1105
0
                __gc_ = this->rdbuf()->sgetn(__s, __n);
1106
0
                if (__gc_ != __n)
1107
0
                    __state |= ios_base::failbit | ios_base::eofbit;
1108
0
                break;
1109
0
            }
1110
0
#ifndef _LIBCPP_NO_EXCEPTIONS
1111
0
        }
1112
0
        catch (...)
1113
0
        {
1114
0
            __state |= ios_base::badbit;
1115
0
            this->__setstate_nothrow(__state);
1116
0
            if (this->exceptions() & ios_base::badbit)
1117
0
            {
1118
0
                throw;
1119
0
            }
1120
0
        }
1121
0
#endif  // _LIBCPP_NO_EXCEPTIONS
1122
0
    }
1123
0
    else
1124
0
    {
1125
0
        __state |= ios_base::failbit;
1126
0
    }
1127
0
    this->setstate(__state);
1128
0
    return __gc_;
1129
0
}
Unexecuted instantiation: std::__1::basic_istream<char, std::__1::char_traits<char> >::readsome(char*, long)
Unexecuted instantiation: std::__1::basic_istream<wchar_t, std::__1::char_traits<wchar_t> >::readsome(wchar_t*, long)
1130
1131
template<class _CharT, class _Traits>
1132
basic_istream<_CharT, _Traits>&
1133
basic_istream<_CharT, _Traits>::putback(char_type __c)
1134
0
{
1135
0
    ios_base::iostate __state = this->rdstate() & ~ios_base::eofbit;
1136
0
    __gc_ = 0;
1137
0
    this->clear(__state);
1138
0
    sentry __sen(*this, true);
1139
0
    if (__sen)
1140
0
    {
1141
0
#ifndef _LIBCPP_NO_EXCEPTIONS
1142
0
        try
1143
0
        {
1144
0
#endif  // _LIBCPP_NO_EXCEPTIONS
1145
0
            if (this->rdbuf() == 0 || this->rdbuf()->sputbackc(__c) == traits_type::eof())
1146
0
                __state |= ios_base::badbit;
1147
0
#ifndef _LIBCPP_NO_EXCEPTIONS
1148
0
        }
1149
0
        catch (...)
1150
0
        {
1151
0
            __state |= ios_base::badbit;
1152
0
            this->__setstate_nothrow(__state);
1153
0
            if (this->exceptions() & ios_base::badbit)
1154
0
            {
1155
0
                throw;
1156
0
            }
1157
0
        }
1158
0
#endif  // _LIBCPP_NO_EXCEPTIONS
1159
0
    }
1160
0
    else
1161
0
    {
1162
0
        __state |= ios_base::failbit;
1163
0
    }
1164
0
    this->setstate(__state);
1165
0
    return *this;
1166
0
}
Unexecuted instantiation: std::__1::basic_istream<char, std::__1::char_traits<char> >::putback(char)
Unexecuted instantiation: std::__1::basic_istream<wchar_t, std::__1::char_traits<wchar_t> >::putback(wchar_t)
1167
1168
template<class _CharT, class _Traits>
1169
basic_istream<_CharT, _Traits>&
1170
basic_istream<_CharT, _Traits>::unget()
1171
0
{
1172
0
    ios_base::iostate __state = this->rdstate() & ~ios_base::eofbit;
1173
0
    __gc_ = 0;
1174
0
    this->clear(__state);
1175
0
    sentry __sen(*this, true);
1176
0
    if (__sen)
1177
0
    {
1178
0
#ifndef _LIBCPP_NO_EXCEPTIONS
1179
0
        try
1180
0
        {
1181
0
#endif  // _LIBCPP_NO_EXCEPTIONS
1182
0
            if (this->rdbuf() == 0 || this->rdbuf()->sungetc() == traits_type::eof())
1183
0
                __state |= ios_base::badbit;
1184
0
#ifndef _LIBCPP_NO_EXCEPTIONS
1185
0
        }
1186
0
        catch (...)
1187
0
        {
1188
0
            __state |= ios_base::badbit;
1189
0
            this->__setstate_nothrow(__state);
1190
0
            if (this->exceptions() & ios_base::badbit)
1191
0
            {
1192
0
                throw;
1193
0
            }
1194
0
        }
1195
0
#endif  // _LIBCPP_NO_EXCEPTIONS
1196
0
    }
1197
0
    else
1198
0
    {
1199
0
        __state |= ios_base::failbit;
1200
0
    }
1201
0
    this->setstate(__state);
1202
0
    return *this;
1203
0
}
Unexecuted instantiation: std::__1::basic_istream<char, std::__1::char_traits<char> >::unget()
Unexecuted instantiation: std::__1::basic_istream<wchar_t, std::__1::char_traits<wchar_t> >::unget()
1204
1205
template<class _CharT, class _Traits>
1206
int
1207
basic_istream<_CharT, _Traits>::sync()
1208
0
{
1209
0
    ios_base::iostate __state = ios_base::goodbit;
1210
0
    int __r = 0;
1211
0
    sentry __sen(*this, true);
1212
0
    if (__sen)
1213
0
    {
1214
0
#ifndef _LIBCPP_NO_EXCEPTIONS
1215
0
        try
1216
0
        {
1217
0
#endif  // _LIBCPP_NO_EXCEPTIONS
1218
0
            if (this->rdbuf() == 0)
1219
0
                return -1;
1220
0
            if (this->rdbuf()->pubsync() == -1)
1221
0
            {
1222
0
                __state |= ios_base::badbit;
1223
0
                return -1;
1224
0
            }
1225
0
#ifndef _LIBCPP_NO_EXCEPTIONS
1226
0
        }
1227
0
        catch (...)
1228
0
        {
1229
0
            __state |= ios_base::badbit;
1230
0
            this->__setstate_nothrow(__state);
1231
0
            if (this->exceptions() & ios_base::badbit)
1232
0
            {
1233
0
                throw;
1234
0
            }
1235
0
        }
1236
0
#endif  // _LIBCPP_NO_EXCEPTIONS
1237
0
        this->setstate(__state);
1238
0
    }
1239
0
    return __r;
1240
0
}
Unexecuted instantiation: std::__1::basic_istream<char, std::__1::char_traits<char> >::sync()
Unexecuted instantiation: std::__1::basic_istream<wchar_t, std::__1::char_traits<wchar_t> >::sync()
1241
1242
template<class _CharT, class _Traits>
1243
typename basic_istream<_CharT, _Traits>::pos_type
1244
basic_istream<_CharT, _Traits>::tellg()
1245
0
{
1246
0
    ios_base::iostate __state = ios_base::goodbit;
1247
0
    pos_type __r(-1);
1248
0
    sentry __sen(*this, true);
1249
0
    if (__sen)
1250
0
    {
1251
0
#ifndef _LIBCPP_NO_EXCEPTIONS
1252
0
        try
1253
0
        {
1254
0
#endif  // _LIBCPP_NO_EXCEPTIONS
1255
0
        __r = this->rdbuf()->pubseekoff(0, ios_base::cur, ios_base::in);
1256
0
#ifndef _LIBCPP_NO_EXCEPTIONS
1257
0
        }
1258
0
        catch (...)
1259
0
        {
1260
0
            __state |= ios_base::badbit;
1261
0
            this->__setstate_nothrow(__state);
1262
0
            if (this->exceptions() & ios_base::badbit)
1263
0
            {
1264
0
                throw;
1265
0
            }
1266
0
        }
1267
0
#endif  // _LIBCPP_NO_EXCEPTIONS
1268
0
        this->setstate(__state);
1269
0
    }
1270
0
    return __r;
1271
0
}
Unexecuted instantiation: std::__1::basic_istream<char, std::__1::char_traits<char> >::tellg()
Unexecuted instantiation: std::__1::basic_istream<wchar_t, std::__1::char_traits<wchar_t> >::tellg()
1272
1273
template<class _CharT, class _Traits>
1274
basic_istream<_CharT, _Traits>&
1275
basic_istream<_CharT, _Traits>::seekg(pos_type __pos)
1276
0
{
1277
0
    ios_base::iostate __state = this->rdstate() & ~ios_base::eofbit;
1278
0
    this->clear(__state);
1279
0
    sentry __sen(*this, true);
1280
0
    if (__sen)
1281
0
    {
1282
0
#ifndef _LIBCPP_NO_EXCEPTIONS
1283
0
        try
1284
0
        {
1285
0
#endif  // _LIBCPP_NO_EXCEPTIONS
1286
0
            if (this->rdbuf()->pubseekpos(__pos, ios_base::in) == pos_type(-1))
1287
0
                __state |= ios_base::failbit;
1288
0
#ifndef _LIBCPP_NO_EXCEPTIONS
1289
0
        }
1290
0
        catch (...)
1291
0
        {
1292
0
            __state |= ios_base::badbit;
1293
0
            this->__setstate_nothrow(__state);
1294
0
            if (this->exceptions() & ios_base::badbit)
1295
0
            {
1296
0
                throw;
1297
0
            }
1298
0
        }
1299
0
#endif  // _LIBCPP_NO_EXCEPTIONS
1300
0
        this->setstate(__state);
1301
0
    }
1302
0
    return *this;
1303
0
}
Unexecuted instantiation: std::__1::basic_istream<char, std::__1::char_traits<char> >::seekg(std::__1::fpos<__mbstate_t>)
Unexecuted instantiation: std::__1::basic_istream<wchar_t, std::__1::char_traits<wchar_t> >::seekg(std::__1::fpos<__mbstate_t>)
1304
1305
template<class _CharT, class _Traits>
1306
basic_istream<_CharT, _Traits>&
1307
basic_istream<_CharT, _Traits>::seekg(off_type __off, ios_base::seekdir __dir)
1308
0
{
1309
0
    ios_base::iostate __state = this->rdstate() & ~ios_base::eofbit;
1310
0
    this->clear(__state);
1311
0
    sentry __sen(*this, true);
1312
0
    if (__sen)
1313
0
    {
1314
0
#ifndef _LIBCPP_NO_EXCEPTIONS
1315
0
        try
1316
0
        {
1317
0
#endif  // _LIBCPP_NO_EXCEPTIONS
1318
0
            if (this->rdbuf()->pubseekoff(__off, __dir, ios_base::in) == pos_type(-1))
1319
0
                __state |= ios_base::failbit;
1320
0
#ifndef _LIBCPP_NO_EXCEPTIONS
1321
0
        }
1322
0
        catch (...)
1323
0
        {
1324
0
            __state |= ios_base::badbit;
1325
0
            this->__setstate_nothrow(__state);
1326
0
            if (this->exceptions() & ios_base::badbit)
1327
0
            {
1328
0
                throw;
1329
0
            }
1330
0
        }
1331
0
#endif  // _LIBCPP_NO_EXCEPTIONS
1332
0
        this->setstate(__state);
1333
0
    }
1334
0
    return *this;
1335
0
}
Unexecuted instantiation: std::__1::basic_istream<char, std::__1::char_traits<char> >::seekg(long long, std::__1::ios_base::seekdir)
Unexecuted instantiation: std::__1::basic_istream<wchar_t, std::__1::char_traits<wchar_t> >::seekg(long long, std::__1::ios_base::seekdir)
1336
1337
template <class _CharT, class _Traits>
1338
basic_istream<_CharT, _Traits>&
1339
ws(basic_istream<_CharT, _Traits>& __is)
1340
{
1341
    ios_base::iostate __state = ios_base::goodbit;
1342
    typename basic_istream<_CharT, _Traits>::sentry __sen(__is, true);
1343
    if (__sen)
1344
    {
1345
#ifndef _LIBCPP_NO_EXCEPTIONS
1346
        try
1347
        {
1348
#endif  // _LIBCPP_NO_EXCEPTIONS
1349
            const ctype<_CharT>& __ct = use_facet<ctype<_CharT> >(__is.getloc());
1350
            while (true)
1351
            {
1352
                typename _Traits::int_type __i = __is.rdbuf()->sgetc();
1353
                if (_Traits::eq_int_type(__i, _Traits::eof()))
1354
                {
1355
                   __state |= ios_base::eofbit;
1356
                   break;
1357
                }
1358
                if (!__ct.is(__ct.space, _Traits::to_char_type(__i)))
1359
                    break;
1360
                __is.rdbuf()->sbumpc();
1361
            }
1362
#ifndef _LIBCPP_NO_EXCEPTIONS
1363
        }
1364
        catch (...)
1365
        {
1366
            __state |= ios_base::badbit;
1367
            __is.__setstate_nothrow(__state);
1368
            if (__is.exceptions() & ios_base::badbit)
1369
            {
1370
                throw;
1371
            }
1372
        }
1373
#endif  // _LIBCPP_NO_EXCEPTIONS
1374
        __is.setstate(__state);
1375
    }
1376
    return __is;
1377
}
1378
1379
#ifndef _LIBCPP_CXX03_LANG
1380
1381
template <class _CharT, class _Traits, class _Tp>
1382
inline _LIBCPP_INLINE_VISIBILITY
1383
basic_istream<_CharT, _Traits>&
1384
operator>>(basic_istream<_CharT, _Traits>&& __is, _Tp&& __x)
1385
{
1386
    __is >> _VSTD::forward<_Tp>(__x);
1387
    return __is;
1388
}
1389
1390
#endif  // _LIBCPP_CXX03_LANG
1391
1392
template <class _CharT, class _Traits>
1393
class _LIBCPP_TEMPLATE_VIS basic_iostream
1394
    : public basic_istream<_CharT, _Traits>,
1395
      public basic_ostream<_CharT, _Traits>
1396
{
1397
public:
1398
    // types:
1399
    typedef _CharT                         char_type;
1400
    typedef _Traits                        traits_type;
1401
    typedef typename traits_type::int_type int_type;
1402
    typedef typename traits_type::pos_type pos_type;
1403
    typedef typename traits_type::off_type off_type;
1404
1405
    // constructor/destructor
1406
    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
1407
    explicit basic_iostream(basic_streambuf<char_type, traits_type>* __sb)
1408
      : basic_istream<_CharT, _Traits>(__sb)
1409
19.1M
    {}
std::__1::basic_iostream<char, std::__1::char_traits<char> >::basic_iostream(std::__1::basic_streambuf<char, std::__1::char_traits<char> >*)
Line
Count
Source
1409
19.1M
    {}
Unexecuted instantiation: std::__1::basic_iostream<char, std::__1::char_traits<char> >::basic_iostream(std::__1::basic_streambuf<char, std::__1::char_traits<char> >*)
1410
1411
    virtual ~basic_iostream();
1412
protected:
1413
#ifndef _LIBCPP_CXX03_LANG
1414
    inline _LIBCPP_INLINE_VISIBILITY
1415
    basic_iostream(basic_iostream&& __rhs);
1416
1417
    // assign/swap
1418
    inline _LIBCPP_INLINE_VISIBILITY
1419
    basic_iostream& operator=(basic_iostream&& __rhs);
1420
#endif
1421
    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
1422
    void swap(basic_iostream& __rhs)
1423
0
    { basic_istream<char_type, traits_type>::swap(__rhs); }
1424
};
1425
1426
#ifndef _LIBCPP_CXX03_LANG
1427
1428
template <class _CharT, class _Traits>
1429
basic_iostream<_CharT, _Traits>::basic_iostream(basic_iostream&& __rhs)
1430
    : basic_istream<_CharT, _Traits>(_VSTD::move(__rhs))
1431
{
1432
}
1433
1434
template <class _CharT, class _Traits>
1435
basic_iostream<_CharT, _Traits>&
1436
basic_iostream<_CharT, _Traits>::operator=(basic_iostream&& __rhs)
1437
0
{
1438
0
    swap(__rhs);
1439
0
    return *this;
1440
0
}
1441
1442
#endif  // _LIBCPP_CXX03_LANG
1443
1444
template <class _CharT, class _Traits>
1445
basic_iostream<_CharT, _Traits>::~basic_iostream()
1446
16.4M
{
1447
16.4M
}
1448
1449
template<class _CharT, class _Traits, class _Allocator>
1450
basic_istream<_CharT, _Traits>&
1451
operator>>(basic_istream<_CharT, _Traits>& __is,
1452
           basic_string<_CharT, _Traits, _Allocator>& __str)
1453
{
1454
    ios_base::iostate __state = ios_base::goodbit;
1455
    typename basic_istream<_CharT, _Traits>::sentry __sen(__is);
1456
    if (__sen)
1457
    {
1458
#ifndef _LIBCPP_NO_EXCEPTIONS
1459
        try
1460
        {
1461
#endif
1462
            __str.clear();
1463
            streamsize __n = __is.width();
1464
            if (__n <= 0)
1465
                __n = __str.max_size();
1466
            if (__n <= 0)
1467
                __n = numeric_limits<streamsize>::max();
1468
            streamsize __c = 0;
1469
            const ctype<_CharT>& __ct = use_facet<ctype<_CharT> >(__is.getloc());
1470
            while (__c < __n)
1471
            {
1472
                typename _Traits::int_type __i = __is.rdbuf()->sgetc();
1473
                if (_Traits::eq_int_type(__i, _Traits::eof()))
1474
                {
1475
                   __state |= ios_base::eofbit;
1476
                   break;
1477
                }
1478
                _CharT __ch = _Traits::to_char_type(__i);
1479
                if (__ct.is(__ct.space, __ch))
1480
                    break;
1481
                __str.push_back(__ch);
1482
                ++__c;
1483
                 __is.rdbuf()->sbumpc();
1484
            }
1485
            __is.width(0);
1486
            if (__c == 0)
1487
               __state |= ios_base::failbit;
1488
#ifndef _LIBCPP_NO_EXCEPTIONS
1489
        }
1490
        catch (...)
1491
        {
1492
            __state |= ios_base::badbit;
1493
            __is.__setstate_nothrow(__state);
1494
            if (__is.exceptions() & ios_base::badbit)
1495
            {
1496
                throw;
1497
            }
1498
        }
1499
#endif
1500
        __is.setstate(__state);
1501
    }
1502
    return __is;
1503
}
1504
1505
template<class _CharT, class _Traits, class _Allocator>
1506
basic_istream<_CharT, _Traits>&
1507
getline(basic_istream<_CharT, _Traits>& __is,
1508
        basic_string<_CharT, _Traits, _Allocator>& __str, _CharT __dlm)
1509
{
1510
    ios_base::iostate __state = ios_base::goodbit;
1511
    typename basic_istream<_CharT, _Traits>::sentry __sen(__is, true);
1512
    if (__sen)
1513
    {
1514
#ifndef _LIBCPP_NO_EXCEPTIONS
1515
        try
1516
        {
1517
#endif
1518
            __str.clear();
1519
            streamsize __extr = 0;
1520
            while (true)
1521
            {
1522
                typename _Traits::int_type __i = __is.rdbuf()->sbumpc();
1523
                if (_Traits::eq_int_type(__i, _Traits::eof()))
1524
                {
1525
                   __state |= ios_base::eofbit;
1526
                   break;
1527
                }
1528
                ++__extr;
1529
                _CharT __ch = _Traits::to_char_type(__i);
1530
                if (_Traits::eq(__ch, __dlm))
1531
                    break;
1532
                __str.push_back(__ch);
1533
                if (__str.size() == __str.max_size())
1534
                {
1535
                    __state |= ios_base::failbit;
1536
                    break;
1537
                }
1538
            }
1539
            if (__extr == 0)
1540
               __state |= ios_base::failbit;
1541
#ifndef _LIBCPP_NO_EXCEPTIONS
1542
        }
1543
        catch (...)
1544
        {
1545
            __state |= ios_base::badbit;
1546
            __is.__setstate_nothrow(__state);
1547
            if (__is.exceptions() & ios_base::badbit)
1548
            {
1549
                throw;
1550
            }
1551
        }
1552
#endif
1553
        __is.setstate(__state);
1554
    }
1555
    return __is;
1556
}
1557
1558
template<class _CharT, class _Traits, class _Allocator>
1559
inline _LIBCPP_INLINE_VISIBILITY
1560
basic_istream<_CharT, _Traits>&
1561
getline(basic_istream<_CharT, _Traits>& __is,
1562
        basic_string<_CharT, _Traits, _Allocator>& __str)
1563
{
1564
    return getline(__is, __str, __is.widen('\n'));
1565
}
1566
1567
#ifndef _LIBCPP_CXX03_LANG
1568
1569
template<class _CharT, class _Traits, class _Allocator>
1570
inline _LIBCPP_INLINE_VISIBILITY
1571
basic_istream<_CharT, _Traits>&
1572
getline(basic_istream<_CharT, _Traits>&& __is,
1573
        basic_string<_CharT, _Traits, _Allocator>& __str, _CharT __dlm)
1574
{
1575
    return getline(__is, __str, __dlm);
1576
}
1577
1578
template<class _CharT, class _Traits, class _Allocator>
1579
inline _LIBCPP_INLINE_VISIBILITY
1580
basic_istream<_CharT, _Traits>&
1581
getline(basic_istream<_CharT, _Traits>&& __is,
1582
        basic_string<_CharT, _Traits, _Allocator>& __str)
1583
{
1584
    return getline(__is, __str, __is.widen('\n'));
1585
}
1586
1587
#endif  // _LIBCPP_CXX03_LANG
1588
1589
template <class _CharT, class _Traits, size_t _Size>
1590
basic_istream<_CharT, _Traits>&
1591
operator>>(basic_istream<_CharT, _Traits>& __is, bitset<_Size>& __x)
1592
{
1593
    ios_base::iostate __state = ios_base::goodbit;
1594
    typename basic_istream<_CharT, _Traits>::sentry __sen(__is);
1595
    if (__sen)
1596
    {
1597
#ifndef _LIBCPP_NO_EXCEPTIONS
1598
        try
1599
        {
1600
#endif
1601
            basic_string<_CharT, _Traits> __str;
1602
            const ctype<_CharT>& __ct = use_facet<ctype<_CharT> >(__is.getloc());
1603
            size_t __c = 0;
1604
            _CharT __zero = __ct.widen('0');
1605
            _CharT __one = __ct.widen('1');
1606
            while (__c < _Size)
1607
            {
1608
                typename _Traits::int_type __i = __is.rdbuf()->sgetc();
1609
                if (_Traits::eq_int_type(__i, _Traits::eof()))
1610
                {
1611
                   __state |= ios_base::eofbit;
1612
                   break;
1613
                }
1614
                _CharT __ch = _Traits::to_char_type(__i);
1615
                if (!_Traits::eq(__ch, __zero) && !_Traits::eq(__ch, __one))
1616
                    break;
1617
                __str.push_back(__ch);
1618
                ++__c;
1619
                 __is.rdbuf()->sbumpc();
1620
            }
1621
            __x = bitset<_Size>(__str);
1622
            if (_Size > 0 && __c == 0)
1623
               __state |= ios_base::failbit;
1624
#ifndef _LIBCPP_NO_EXCEPTIONS
1625
        }
1626
        catch (...)
1627
        {
1628
            __state |= ios_base::badbit;
1629
            __is.__setstate_nothrow(__state);
1630
            if (__is.exceptions() & ios_base::badbit)
1631
            {
1632
                throw;
1633
            }
1634
        }
1635
#endif
1636
        __is.setstate(__state);
1637
    }
1638
    return __is;
1639
}
1640
1641
#ifndef _LIBCPP_DO_NOT_ASSUME_STREAMS_EXPLICIT_INSTANTIATION_IN_DYLIB
1642
_LIBCPP_EXTERN_TEMPLATE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_istream<char>)
1643
_LIBCPP_EXTERN_TEMPLATE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_istream<wchar_t>)
1644
_LIBCPP_EXTERN_TEMPLATE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_iostream<char>)
1645
#endif
1646
1647
_LIBCPP_END_NAMESPACE_STD
1648
1649
_LIBCPP_POP_MACROS
1650
1651
#endif  // _LIBCPP_ISTREAM