Coverage Report

Created: 2020-07-11 14:00

/Users/buildslave/jenkins/workspace/coverage/llvm-project/libcxx/include/iterator
Line
Count
Source (jump to first uncovered line)
1
// -*- C++ -*-
2
//===-------------------------- iterator ----------------------------------===//
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_ITERATOR
11
#define _LIBCPP_ITERATOR
12
13
/*
14
    iterator synopsis
15
16
namespace std
17
{
18
19
template<class Iterator>
20
struct iterator_traits
21
{
22
    typedef typename Iterator::difference_type difference_type;
23
    typedef typename Iterator::value_type value_type;
24
    typedef typename Iterator::pointer pointer;
25
    typedef typename Iterator::reference reference;
26
    typedef typename Iterator::iterator_category iterator_category;
27
};
28
29
template<class T>
30
struct iterator_traits<T*>
31
{
32
    typedef ptrdiff_t difference_type;
33
    typedef T value_type;
34
    typedef T* pointer;
35
    typedef T& reference;
36
    typedef random_access_iterator_tag iterator_category;
37
};
38
39
template<class Category, class T, class Distance = ptrdiff_t,
40
         class Pointer = T*, class Reference = T&>
41
struct iterator
42
{
43
    typedef T         value_type;
44
    typedef Distance  difference_type;
45
    typedef Pointer   pointer;
46
    typedef Reference reference;
47
    typedef Category  iterator_category;
48
};
49
50
struct input_iterator_tag  {};
51
struct output_iterator_tag {};
52
struct forward_iterator_tag       : public input_iterator_tag         {};
53
struct bidirectional_iterator_tag : public forward_iterator_tag       {};
54
struct random_access_iterator_tag : public bidirectional_iterator_tag {};
55
56
// 27.4.3, iterator operations
57
template <class InputIterator, class Distance>  // constexpr in C++17
58
  constexpr void advance(InputIterator& i, Distance n);
59
60
template <class InputIterator>  // constexpr in C++17
61
  constexpr typename iterator_traits<InputIterator>::difference_type
62
    distance(InputIterator first, InputIterator last);
63
64
template <class InputIterator>  // constexpr in C++17
65
  constexpr InputIterator next(InputIterator x,
66
typename iterator_traits<InputIterator>::difference_type n = 1);
67
68
template <class BidirectionalIterator>  // constexpr in C++17
69
  constexpr BidirectionalIterator prev(BidirectionalIterator x,
70
    typename iterator_traits<BidirectionalIterator>::difference_type n = 1);
71
72
template <class Iterator>
73
class reverse_iterator
74
    : public iterator<typename iterator_traits<Iterator>::iterator_category,
75
                      typename iterator_traits<Iterator>::value_type,
76
                      typename iterator_traits<Iterator>::difference_type,
77
                      typename iterator_traits<Iterator>::pointer,
78
                      typename iterator_traits<Iterator>::reference>
79
{
80
protected:
81
    Iterator current;
82
public:
83
    typedef Iterator                                            iterator_type;
84
    typedef typename iterator_traits<Iterator>::difference_type difference_type;
85
    typedef typename iterator_traits<Iterator>::reference       reference;
86
    typedef typename iterator_traits<Iterator>::pointer         pointer;
87
88
    constexpr reverse_iterator();
89
    constexpr explicit reverse_iterator(Iterator x);
90
    template <class U> constexpr reverse_iterator(const reverse_iterator<U>& u);
91
    template <class U> constexpr reverse_iterator& operator=(const reverse_iterator<U>& u);
92
    constexpr Iterator base() const;
93
    constexpr reference operator*() const;
94
    constexpr pointer   operator->() const;
95
    constexpr reverse_iterator& operator++();
96
    constexpr reverse_iterator  operator++(int);
97
    constexpr reverse_iterator& operator--();
98
    constexpr reverse_iterator  operator--(int);
99
    constexpr reverse_iterator  operator+ (difference_type n) const;
100
    constexpr reverse_iterator& operator+=(difference_type n);
101
    constexpr reverse_iterator  operator- (difference_type n) const;
102
    constexpr reverse_iterator& operator-=(difference_type n);
103
    constexpr reference         operator[](difference_type n) const;
104
};
105
106
template <class Iterator1, class Iterator2>
107
constexpr bool                          // constexpr in C++17
108
operator==(const reverse_iterator<Iterator1>& x, const reverse_iterator<Iterator2>& y);
109
110
template <class Iterator1, class Iterator2>
111
constexpr bool                          // constexpr in C++17
112
operator<(const reverse_iterator<Iterator1>& x, const reverse_iterator<Iterator2>& y);
113
114
template <class Iterator1, class Iterator2>
115
constexpr bool                          // constexpr in C++17
116
operator!=(const reverse_iterator<Iterator1>& x, const reverse_iterator<Iterator2>& y);
117
118
template <class Iterator1, class Iterator2>
119
constexpr bool                          // constexpr in C++17
120
operator>(const reverse_iterator<Iterator1>& x, const reverse_iterator<Iterator2>& y);
121
122
template <class Iterator1, class Iterator2>
123
constexpr bool                          // constexpr in C++17
124
operator>=(const reverse_iterator<Iterator1>& x, const reverse_iterator<Iterator2>& y);
125
126
template <class Iterator1, class Iterator2>
127
constexpr bool                          // constexpr in C++17
128
operator<=(const reverse_iterator<Iterator1>& x, const reverse_iterator<Iterator2>& y);
129
130
template <class Iterator1, class Iterator2>
131
constexpr auto
132
operator-(const reverse_iterator<Iterator1>& x, const reverse_iterator<Iterator2>& y)
133
-> decltype(__y.base() - __x.base());   // constexpr in C++17
134
135
template <class Iterator>
136
constexpr reverse_iterator<Iterator>
137
operator+(typename reverse_iterator<Iterator>::difference_type n,
138
          const reverse_iterator<Iterator>& x);   // constexpr in C++17
139
140
template <class Iterator>
141
constexpr reverse_iterator<Iterator> make_reverse_iterator(Iterator i); // C++14, constexpr in C++17
142
143
template <class Container>
144
class back_insert_iterator
145
{
146
protected:
147
    Container* container;
148
public:
149
    typedef Container                   container_type;
150
    typedef void                        value_type;
151
    typedef void                        difference_type;
152
    typedef void                        reference;
153
    typedef void                        pointer;
154
155
    explicit back_insert_iterator(Container& x);
156
    back_insert_iterator& operator=(const typename Container::value_type& value);
157
    back_insert_iterator& operator*();
158
    back_insert_iterator& operator++();
159
    back_insert_iterator  operator++(int);
160
};
161
162
template <class Container> back_insert_iterator<Container> back_inserter(Container& x);
163
164
template <class Container>
165
class front_insert_iterator
166
{
167
protected:
168
    Container* container;
169
public:
170
    typedef Container                    container_type;
171
    typedef void                         value_type;
172
    typedef void                         difference_type;
173
    typedef void                         reference;
174
    typedef void                         pointer;
175
176
    explicit front_insert_iterator(Container& x);
177
    front_insert_iterator& operator=(const typename Container::value_type& value);
178
    front_insert_iterator& operator*();
179
    front_insert_iterator& operator++();
180
    front_insert_iterator  operator++(int);
181
};
182
183
template <class Container> front_insert_iterator<Container> front_inserter(Container& x);
184
185
template <class Container>
186
class insert_iterator
187
{
188
protected:
189
    Container* container;
190
    typename Container::iterator iter;
191
public:
192
    typedef Container              container_type;
193
    typedef void                   value_type;
194
    typedef void                   difference_type;
195
    typedef void                   reference;
196
    typedef void                   pointer;
197
198
    insert_iterator(Container& x, typename Container::iterator i);
199
    insert_iterator& operator=(const typename Container::value_type& value);
200
    insert_iterator& operator*();
201
    insert_iterator& operator++();
202
    insert_iterator& operator++(int);
203
};
204
205
template <class Container, class Iterator>
206
insert_iterator<Container> inserter(Container& x, Iterator i);
207
208
template <class Iterator>
209
class move_iterator {
210
public:
211
    typedef Iterator                                              iterator_type;
212
    typedef typename iterator_traits<Iterator>::difference_type   difference_type;
213
    typedef Iterator                                              pointer;
214
    typedef typename iterator_traits<Iterator>::value_type        value_type;
215
    typedef typename iterator_traits<Iterator>::iterator_category iterator_category;
216
    typedef value_type&&                                          reference;
217
218
    constexpr move_iterator();  // all the constexprs are in C++17
219
    constexpr explicit move_iterator(Iterator i);
220
    template <class U>
221
      constexpr move_iterator(const move_iterator<U>& u);
222
    template <class U>
223
      constexpr move_iterator& operator=(const move_iterator<U>& u);
224
    constexpr iterator_type base() const;
225
    constexpr reference operator*() const;
226
    constexpr pointer operator->() const;
227
    constexpr move_iterator& operator++();
228
    constexpr move_iterator operator++(int);
229
    constexpr move_iterator& operator--();
230
    constexpr move_iterator operator--(int);
231
    constexpr move_iterator operator+(difference_type n) const;
232
    constexpr move_iterator& operator+=(difference_type n);
233
    constexpr move_iterator operator-(difference_type n) const;
234
    constexpr move_iterator& operator-=(difference_type n);
235
    constexpr unspecified operator[](difference_type n) const;
236
private:
237
    Iterator current; // exposition only
238
};
239
240
template <class Iterator1, class Iterator2>
241
constexpr bool   // constexpr in C++17
242
operator==(const move_iterator<Iterator1>& x, const move_iterator<Iterator2>& y);
243
244
template <class Iterator1, class Iterator2>
245
constexpr bool   // constexpr in C++17
246
operator!=(const move_iterator<Iterator1>& x, const move_iterator<Iterator2>& y);
247
248
template <class Iterator1, class Iterator2>
249
constexpr bool   // constexpr in C++17
250
operator<(const move_iterator<Iterator1>& x, const move_iterator<Iterator2>& y);
251
252
template <class Iterator1, class Iterator2>
253
constexpr bool   // constexpr in C++17
254
operator<=(const move_iterator<Iterator1>& x, const move_iterator<Iterator2>& y);
255
256
template <class Iterator1, class Iterator2>
257
constexpr bool   // constexpr in C++17
258
operator>(const move_iterator<Iterator1>& x, const move_iterator<Iterator2>& y);
259
260
template <class Iterator1, class Iterator2>
261
constexpr bool   // constexpr in C++17
262
operator>=(const move_iterator<Iterator1>& x, const move_iterator<Iterator2>& y);
263
264
template <class Iterator1, class Iterator2>
265
constexpr auto   // constexpr in C++17
266
operator-(const move_iterator<Iterator1>& x,
267
          const move_iterator<Iterator2>& y) -> decltype(x.base() - y.base());
268
269
template <class Iterator>
270
constexpr move_iterator<Iterator> operator+(   // constexpr in C++17
271
            typename move_iterator<Iterator>::difference_type n,
272
            const move_iterator<Iterator>& x);
273
274
template <class Iterator>   // constexpr in C++17
275
constexpr  move_iterator<Iterator> make_move_iterator(const Iterator& i);
276
277
278
template <class T, class charT = char, class traits = char_traits<charT>, class Distance = ptrdiff_t>
279
class istream_iterator
280
    : public iterator<input_iterator_tag, T, Distance, const T*, const T&>
281
{
282
public:
283
    typedef charT char_type;
284
    typedef traits traits_type;
285
    typedef basic_istream<charT,traits> istream_type;
286
287
    constexpr istream_iterator();
288
    istream_iterator(istream_type& s);
289
    istream_iterator(const istream_iterator& x);
290
    ~istream_iterator();
291
292
    const T& operator*() const;
293
    const T* operator->() const;
294
    istream_iterator& operator++();
295
    istream_iterator  operator++(int);
296
};
297
298
template <class T, class charT, class traits, class Distance>
299
bool operator==(const istream_iterator<T,charT,traits,Distance>& x,
300
                const istream_iterator<T,charT,traits,Distance>& y);
301
template <class T, class charT, class traits, class Distance>
302
bool operator!=(const istream_iterator<T,charT,traits,Distance>& x,
303
                const istream_iterator<T,charT,traits,Distance>& y);
304
305
template <class T, class charT = char, class traits = char_traits<charT> >
306
class ostream_iterator
307
    : public iterator<output_iterator_tag, void, void, void ,void>
308
{
309
public:
310
    typedef charT char_type;
311
    typedef traits traits_type;
312
    typedef basic_ostream<charT,traits> ostream_type;
313
314
    ostream_iterator(ostream_type& s);
315
    ostream_iterator(ostream_type& s, const charT* delimiter);
316
    ostream_iterator(const ostream_iterator& x);
317
    ~ostream_iterator();
318
    ostream_iterator& operator=(const T& value);
319
320
    ostream_iterator& operator*();
321
    ostream_iterator& operator++();
322
    ostream_iterator& operator++(int);
323
};
324
325
template<class charT, class traits = char_traits<charT> >
326
class istreambuf_iterator
327
    : public iterator<input_iterator_tag, charT,
328
                      typename traits::off_type, unspecified,
329
                      charT>
330
{
331
public:
332
    typedef charT                         char_type;
333
    typedef traits                        traits_type;
334
    typedef typename traits::int_type     int_type;
335
    typedef basic_streambuf<charT,traits> streambuf_type;
336
    typedef basic_istream<charT,traits>   istream_type;
337
338
    istreambuf_iterator() noexcept;
339
    istreambuf_iterator(istream_type& s) noexcept;
340
    istreambuf_iterator(streambuf_type* s) noexcept;
341
    istreambuf_iterator(a-private-type) noexcept;
342
343
    charT                operator*() const;
344
    pointer operator->() const;
345
    istreambuf_iterator& operator++();
346
    a-private-type       operator++(int);
347
348
    bool equal(const istreambuf_iterator& b) const;
349
};
350
351
template <class charT, class traits>
352
bool operator==(const istreambuf_iterator<charT,traits>& a,
353
                const istreambuf_iterator<charT,traits>& b);
354
template <class charT, class traits>
355
bool operator!=(const istreambuf_iterator<charT,traits>& a,
356
                const istreambuf_iterator<charT,traits>& b);
357
358
template <class charT, class traits = char_traits<charT> >
359
class ostreambuf_iterator
360
    : public iterator<output_iterator_tag, void, void, void, void>
361
{
362
public:
363
    typedef charT                         char_type;
364
    typedef traits                        traits_type;
365
    typedef basic_streambuf<charT,traits> streambuf_type;
366
    typedef basic_ostream<charT,traits>   ostream_type;
367
368
    ostreambuf_iterator(ostream_type& s) noexcept;
369
    ostreambuf_iterator(streambuf_type* s) noexcept;
370
    ostreambuf_iterator& operator=(charT c);
371
    ostreambuf_iterator& operator*();
372
    ostreambuf_iterator& operator++();
373
    ostreambuf_iterator& operator++(int);
374
    bool failed() const noexcept;
375
};
376
377
template <class C> constexpr auto begin(C& c) -> decltype(c.begin());
378
template <class C> constexpr auto begin(const C& c) -> decltype(c.begin());
379
template <class C> constexpr auto end(C& c) -> decltype(c.end());
380
template <class C> constexpr auto end(const C& c) -> decltype(c.end());
381
template <class T, size_t N> constexpr T* begin(T (&array)[N]);
382
template <class T, size_t N> constexpr T* end(T (&array)[N]);
383
384
template <class C> auto constexpr cbegin(const C& c) -> decltype(std::begin(c));        // C++14
385
template <class C> auto constexpr cend(const C& c) -> decltype(std::end(c));            // C++14
386
template <class C> auto constexpr rbegin(C& c) -> decltype(c.rbegin());                 // C++14
387
template <class C> auto constexpr rbegin(const C& c) -> decltype(c.rbegin());           // C++14
388
template <class C> auto constexpr rend(C& c) -> decltype(c.rend());                     // C++14
389
template <class C> constexpr auto rend(const C& c) -> decltype(c.rend());               // C++14
390
template <class E> reverse_iterator<const E*> constexpr rbegin(initializer_list<E> il); // C++14
391
template <class E> reverse_iterator<const E*> constexpr rend(initializer_list<E> il);   // C++14
392
template <class T, size_t N> reverse_iterator<T*> constexpr rbegin(T (&array)[N]);      // C++14
393
template <class T, size_t N> reverse_iterator<T*> constexpr rend(T (&array)[N]);        // C++14
394
template <class C> constexpr auto crbegin(const C& c) -> decltype(std::rbegin(c));      // C++14
395
template <class C> constexpr auto crend(const C& c) -> decltype(std::rend(c));          // C++14
396
397
// 24.8, container access:
398
template <class C> constexpr auto size(const C& c) -> decltype(c.size());         // C++17
399
template <class T, size_t N> constexpr size_t size(const T (&array)[N]) noexcept; // C++17
400
401
template <class C> constexpr auto ssize(const C& c)
402
    -> common_type_t<ptrdiff_t, make_signed_t<decltype(c.size())>>;              // C++20
403
template <class T, ptrdiff_t> constexpr ptrdiff_t ssize(const T (&array)[N]) noexcept; // C++20
404
405
template <class C> constexpr auto empty(const C& c) -> decltype(c.empty());       // C++17
406
template <class T, size_t N> constexpr bool empty(const T (&array)[N]) noexcept;  // C++17
407
template <class E> constexpr bool empty(initializer_list<E> il) noexcept;         // C++17
408
template <class C> constexpr auto data(C& c) -> decltype(c.data());               // C++17
409
template <class C> constexpr auto data(const C& c) -> decltype(c.data());         // C++17
410
template <class T, size_t N> constexpr T* data(T (&array)[N]) noexcept;           // C++17
411
template <class E> constexpr const E* data(initializer_list<E> il) noexcept;      // C++17
412
413
}  // std
414
415
*/
416
417
#include <__config>
418
#include <iosfwd> // for forward declarations of vector and string.
419
#include <__functional_base>
420
#include <type_traits>
421
#include <cstddef>
422
#include <initializer_list>
423
#include <version>
424
#ifdef __APPLE__
425
#include <Availability.h>
426
#endif
427
428
#include <__debug>
429
430
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
431
#pragma GCC system_header
432
#endif
433
434
_LIBCPP_BEGIN_NAMESPACE_STD
435
template <class _Iter>
436
struct _LIBCPP_TEMPLATE_VIS iterator_traits;
437
438
struct _LIBCPP_TEMPLATE_VIS input_iterator_tag {};
439
struct _LIBCPP_TEMPLATE_VIS output_iterator_tag {};
440
struct _LIBCPP_TEMPLATE_VIS forward_iterator_tag       : public input_iterator_tag {};
441
struct _LIBCPP_TEMPLATE_VIS bidirectional_iterator_tag : public forward_iterator_tag {};
442
struct _LIBCPP_TEMPLATE_VIS random_access_iterator_tag : public bidirectional_iterator_tag {};
443
#if _LIBCPP_STD_VER > 17
444
// TODO(EricWF)  contiguous_iterator_tag is provided as an extension prior to
445
//  C++20 to allow optimizations for users providing wrapped iterator types.
446
struct _LIBCPP_TEMPLATE_VIS contiguous_iterator_tag: public random_access_iterator_tag { };
447
#endif
448
449
template <class _Iter>
450
struct __iter_traits_cache {
451
  using type = _If<
452
    __is_primary_template<iterator_traits<_Iter> >::value,
453
    _Iter,
454
    iterator_traits<_Iter>
455
  >;
456
};
457
template <class _Iter>
458
using _ITER_TRAITS = typename __iter_traits_cache<_Iter>::type;
459
460
struct __iter_concept_concept_test {
461
  template <class _Iter>
462
  using _Apply = typename _ITER_TRAITS<_Iter>::iterator_concept;
463
};
464
struct __iter_concept_category_test {
465
  template <class _Iter>
466
  using _Apply = typename _ITER_TRAITS<_Iter>::iterator_category;
467
};
468
struct __iter_concept_random_fallback {
469
  template <class _Iter>
470
  using _Apply = _EnableIf<
471
                          __is_primary_template<iterator_traits<_Iter> >::value,
472
                          random_access_iterator_tag
473
                        >;
474
};
475
476
template <class _Iter, class _Tester> struct __test_iter_concept
477
    : _IsValidExpansion<_Tester::template _Apply, _Iter>,
478
      _Tester
479
{
480
};
481
482
template <class _Iter>
483
struct __iter_concept_cache {
484
  using type = _Or<
485
    __test_iter_concept<_Iter, __iter_concept_concept_test>,
486
    __test_iter_concept<_Iter, __iter_concept_category_test>,
487
    __test_iter_concept<_Iter, __iter_concept_random_fallback>
488
  >;
489
};
490
491
template <class _Iter>
492
using _ITER_CONCEPT = typename __iter_concept_cache<_Iter>::type::template _Apply<_Iter>;
493
494
495
template <class _Tp>
496
struct __has_iterator_typedefs
497
{
498
private:
499
    struct __two {char __lx; char __lxx;};
500
    template <class _Up> static __two __test(...);
501
    template <class _Up> static char __test(typename std::__void_t<typename _Up::iterator_category>::type* = 0,
502
                        typename std::__void_t<typename _Up::difference_type>::type* = 0,
503
                        typename std::__void_t<typename _Up::value_type>::type* = 0,
504
                        typename std::__void_t<typename _Up::reference>::type* = 0,
505
                        typename std::__void_t<typename _Up::pointer>::type* = 0
506
                        );
507
public:
508
    static const bool value = sizeof(__test<_Tp>(0,0,0,0,0)) == 1;
509
};
510
511
512
template <class _Tp>
513
struct __has_iterator_category
514
{
515
private:
516
    struct __two {char __lx; char __lxx;};
517
    template <class _Up> static __two __test(...);
518
    template <class _Up> static char __test(typename _Up::iterator_category* = 0);
519
public:
520
    static const bool value = sizeof(__test<_Tp>(0)) == 1;
521
};
522
523
template <class _Iter, bool> struct __iterator_traits_impl {};
524
525
template <class _Iter>
526
struct __iterator_traits_impl<_Iter, true>
527
{
528
    typedef typename _Iter::difference_type   difference_type;
529
    typedef typename _Iter::value_type        value_type;
530
    typedef typename _Iter::pointer           pointer;
531
    typedef typename _Iter::reference         reference;
532
    typedef typename _Iter::iterator_category iterator_category;
533
};
534
535
template <class _Iter, bool> struct __iterator_traits {};
536
537
template <class _Iter>
538
struct __iterator_traits<_Iter, true>
539
    :  __iterator_traits_impl
540
      <
541
        _Iter,
542
        is_convertible<typename _Iter::iterator_category, input_iterator_tag>::value ||
543
        is_convertible<typename _Iter::iterator_category, output_iterator_tag>::value
544
      >
545
{};
546
547
// iterator_traits<Iterator> will only have the nested types if Iterator::iterator_category
548
//    exists.  Else iterator_traits<Iterator> will be an empty class.  This is a
549
//    conforming extension which allows some programs to compile and behave as
550
//    the client expects instead of failing at compile time.
551
552
template <class _Iter>
553
struct _LIBCPP_TEMPLATE_VIS iterator_traits
554
    : __iterator_traits<_Iter, __has_iterator_typedefs<_Iter>::value> {
555
556
  using __primary_template = iterator_traits;
557
};
558
559
template<class _Tp>
560
struct _LIBCPP_TEMPLATE_VIS iterator_traits<_Tp*>
561
{
562
    typedef ptrdiff_t difference_type;
563
    typedef typename remove_cv<_Tp>::type value_type;
564
    typedef _Tp* pointer;
565
    typedef _Tp& reference;
566
    typedef random_access_iterator_tag iterator_category;
567
#if _LIBCPP_STD_VER > 17
568
    typedef contiguous_iterator_tag    iterator_concept;
569
#endif
570
};
571
572
template <class _Tp, class _Up, bool = __has_iterator_category<iterator_traits<_Tp> >::value>
573
struct __has_iterator_category_convertible_to
574
    : public integral_constant<bool, is_convertible<typename iterator_traits<_Tp>::iterator_category, _Up>::value>
575
{};
576
577
template <class _Tp, class _Up>
578
struct __has_iterator_category_convertible_to<_Tp, _Up, false> : public false_type {};
579
580
template <class _Tp>
581
struct __is_cpp17_input_iterator : public __has_iterator_category_convertible_to<_Tp, input_iterator_tag> {};
582
583
template <class _Tp>
584
struct __is_cpp17_forward_iterator : public __has_iterator_category_convertible_to<_Tp, forward_iterator_tag> {};
585
586
template <class _Tp>
587
struct __is_cpp17_bidirectional_iterator : public __has_iterator_category_convertible_to<_Tp, bidirectional_iterator_tag> {};
588
589
template <class _Tp>
590
struct __is_cpp17_random_access_iterator : public __has_iterator_category_convertible_to<_Tp, random_access_iterator_tag> {};
591
592
#if _LIBCPP_STD_VER > 17
593
template <class _Tp>
594
struct __is_cpp17_contiguous_iterator : public __has_iterator_category_convertible_to<_Tp, contiguous_iterator_tag> {};
595
#else
596
template <class _Tp>
597
struct __is_cpp17_contiguous_iterator : public false_type {};
598
#endif
599
600
601
template <class _Tp>
602
struct __is_exactly_cpp17_input_iterator
603
    : public integral_constant<bool,
604
         __has_iterator_category_convertible_to<_Tp, input_iterator_tag>::value &&
605
        !__has_iterator_category_convertible_to<_Tp, forward_iterator_tag>::value> {};
606
607
#ifndef _LIBCPP_HAS_NO_DEDUCTION_GUIDES
608
template<class _InputIterator>
609
using __iter_value_type = typename iterator_traits<_InputIterator>::value_type;
610
611
template<class _InputIterator>
612
using __iter_key_type = remove_const_t<typename iterator_traits<_InputIterator>::value_type::first_type>;
613
614
template<class _InputIterator>
615
using __iter_mapped_type = typename iterator_traits<_InputIterator>::value_type::second_type;
616
617
template<class _InputIterator>
618
using __iter_to_alloc_type = pair<
619
    add_const_t<typename iterator_traits<_InputIterator>::value_type::first_type>,
620
    typename iterator_traits<_InputIterator>::value_type::second_type>;
621
#endif
622
623
template<class _Category, class _Tp, class _Distance = ptrdiff_t,
624
         class _Pointer = _Tp*, class _Reference = _Tp&>
625
struct _LIBCPP_TEMPLATE_VIS iterator
626
{
627
    typedef _Tp        value_type;
628
    typedef _Distance  difference_type;
629
    typedef _Pointer   pointer;
630
    typedef _Reference reference;
631
    typedef _Category  iterator_category;
632
};
633
634
template <class _InputIter>
635
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
636
void __advance(_InputIter& __i,
637
             typename iterator_traits<_InputIter>::difference_type __n, input_iterator_tag)
638
{
639
    for (; __n > 0; --__n)
640
        ++__i;
641
}
642
643
template <class _BiDirIter>
644
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
645
void __advance(_BiDirIter& __i,
646
             typename iterator_traits<_BiDirIter>::difference_type __n, bidirectional_iterator_tag)
647
{
648
    if (__n >= 0)
649
        for (; __n > 0; --__n)
650
            ++__i;
651
    else
652
        for (; __n < 0; ++__n)
653
            --__i;
654
}
655
656
template <class _RandIter>
657
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
658
void __advance(_RandIter& __i,
659
             typename iterator_traits<_RandIter>::difference_type __n, random_access_iterator_tag)
660
1.55M
{
661
1.55M
   __i += __n;
662
1.55M
}
void std::__1::__advance<unsigned int const*>(unsigned int const*&, std::__1::iterator_traits<unsigned int const*>::difference_type, std::__1::random_access_iterator_tag)
Line
Count
Source
660
1.55M
{
661
1.55M
   __i += __n;
662
1.55M
}
Unexecuted instantiation: void std::__1::__advance<std::__1::locale::facet**>(std::__1::locale::facet**&, std::__1::iterator_traits<std::__1::locale::facet**>::difference_type, std::__1::random_access_iterator_tag)
Unexecuted instantiation: void std::__1::__advance<std::__1::__wrap_iter<char*> >(std::__1::__wrap_iter<char*>&, std::__1::iterator_traits<std::__1::__wrap_iter<char*> >::difference_type, std::__1::random_access_iterator_tag)
Unexecuted instantiation: void std::__1::__advance<std::__1::__wrap_iter<wchar_t*> >(std::__1::__wrap_iter<wchar_t*>&, std::__1::iterator_traits<std::__1::__wrap_iter<wchar_t*> >::difference_type, std::__1::random_access_iterator_tag)
Unexecuted instantiation: regex.cpp:void std::__1::__advance<std::__1::(anonymous namespace)::collationnames const*>(std::__1::(anonymous namespace)::collationnames const*&, std::__1::iterator_traits<std::__1::(anonymous namespace)::collationnames const*>::difference_type, std::__1::random_access_iterator_tag)
Unexecuted instantiation: regex.cpp:void std::__1::__advance<std::__1::(anonymous namespace)::classnames const*>(std::__1::(anonymous namespace)::classnames const*&, std::__1::iterator_traits<std::__1::(anonymous namespace)::classnames const*>::difference_type, std::__1::random_access_iterator_tag)
663
664
template <class _InputIter, class _Distance>
665
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
666
void advance(_InputIter& __i, _Distance __orig_n)
667
1.53M
{
668
1.53M
    _LIBCPP_ASSERT(__orig_n >= 0 || __is_cpp17_bidirectional_iterator<_InputIter>::value,
669
1.53M
                   "Attempt to advance(it, n) with negative n on a non-bidirectional iterator");
670
1.53M
    typedef decltype(__convert_to_integral(__orig_n)) _IntegralSize;
671
1.53M
    _IntegralSize __n = __orig_n;
672
1.53M
    __advance(__i, __n, typename iterator_traits<_InputIter>::iterator_category());
673
1.53M
}
void std::__1::advance<unsigned int const*, long>(unsigned int const*&, long)
Line
Count
Source
667
1.53M
{
668
1.53M
    _LIBCPP_ASSERT(__orig_n >= 0 || __is_cpp17_bidirectional_iterator<_InputIter>::value,
669
1.53M
                   "Attempt to advance(it, n) with negative n on a non-bidirectional iterator");
670
1.53M
    typedef decltype(__convert_to_integral(__orig_n)) _IntegralSize;
671
1.53M
    _IntegralSize __n = __orig_n;
672
1.53M
    __advance(__i, __n, typename iterator_traits<_InputIter>::iterator_category());
673
1.53M
}
Unexecuted instantiation: void std::__1::advance<std::__1::locale::facet**, unsigned long>(std::__1::locale::facet**&, unsigned long)
Unexecuted instantiation: void std::__1::advance<std::__1::__wrap_iter<char*>, long>(std::__1::__wrap_iter<char*>&, long)
Unexecuted instantiation: void std::__1::advance<std::__1::__wrap_iter<wchar_t*>, long>(std::__1::__wrap_iter<wchar_t*>&, long)
Unexecuted instantiation: regex.cpp:void std::__1::advance<std::__1::(anonymous namespace)::collationnames const*, long>(std::__1::(anonymous namespace)::collationnames const*&, long)
Unexecuted instantiation: regex.cpp:void std::__1::advance<std::__1::(anonymous namespace)::classnames const*, long>(std::__1::(anonymous namespace)::classnames const*&, long)
674
675
template <class _InputIter>
676
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
677
typename iterator_traits<_InputIter>::difference_type
678
__distance(_InputIter __first, _InputIter __last, input_iterator_tag)
679
{
680
    typename iterator_traits<_InputIter>::difference_type __r(0);
681
    for (; __first != __last; ++__first)
682
        ++__r;
683
    return __r;
684
}
685
686
template <class _RandIter>
687
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
688
typename iterator_traits<_RandIter>::difference_type
689
__distance(_RandIter __first, _RandIter __last, random_access_iterator_tag)
690
2.17G
{
691
2.17G
    return __last - __first;
692
2.17G
}
std::__1::iterator_traits<unsigned int const*>::difference_type std::__1::__distance<unsigned int const*>(unsigned int const*, unsigned int const*, std::__1::random_access_iterator_tag)
Line
Count
Source
690
75.9M
{
691
75.9M
    return __last - __first;
692
75.9M
}
Unexecuted instantiation: std::__1::iterator_traits<std::__1::locale::facet**>::difference_type std::__1::__distance<std::__1::locale::facet**>(std::__1::locale::facet**, std::__1::locale::facet**, std::__1::random_access_iterator_tag)
std::__1::iterator_traits<char const*>::difference_type std::__1::__distance<char const*>(char const*, char const*, std::__1::random_access_iterator_tag)
Line
Count
Source
690
2.03G
{
691
2.03G
    return __last - __first;
692
2.03G
}
Unexecuted instantiation: std::__1::iterator_traits<wchar_t const*>::difference_type std::__1::__distance<wchar_t const*>(wchar_t const*, wchar_t const*, std::__1::random_access_iterator_tag)
std::__1::iterator_traits<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*>::difference_type std::__1::__distance<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*, std::__1::random_access_iterator_tag)
Line
Count
Source
690
603k
{
691
603k
    return __last - __first;
692
603k
}
Unexecuted instantiation: std::__1::iterator_traits<std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> >*>::difference_type std::__1::__distance<std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> >*>(std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> >*, std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> >*, std::__1::random_access_iterator_tag)
std::__1::iterator_traits<wchar_t*>::difference_type std::__1::__distance<wchar_t*>(wchar_t*, wchar_t*, std::__1::random_access_iterator_tag)
Line
Count
Source
690
2
{
691
2
    return __last - __first;
692
2
}
std::__1::iterator_traits<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const*>::difference_type std::__1::__distance<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const*>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const*, std::__1::random_access_iterator_tag)
Line
Count
Source
690
262k
{
691
262k
    return __last - __first;
692
262k
}
Unexecuted instantiation: std::__1::iterator_traits<std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> > const*>::difference_type std::__1::__distance<std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> > const*>(std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> > const*, std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> > const*, std::__1::random_access_iterator_tag)
std::__1::iterator_traits<char*>::difference_type std::__1::__distance<char*>(char*, char*, std::__1::random_access_iterator_tag)
Line
Count
Source
690
63.0M
{
691
63.0M
    return __last - __first;
692
63.0M
}
Unexecuted instantiation: regex.cpp:std::__1::iterator_traits<std::__1::(anonymous namespace)::collationnames const*>::difference_type std::__1::__distance<std::__1::(anonymous namespace)::collationnames const*>(std::__1::(anonymous namespace)::collationnames const*, std::__1::(anonymous namespace)::collationnames const*, std::__1::random_access_iterator_tag)
Unexecuted instantiation: regex.cpp:std::__1::iterator_traits<std::__1::(anonymous namespace)::classnames const*>::difference_type std::__1::__distance<std::__1::(anonymous namespace)::classnames const*>(std::__1::(anonymous namespace)::classnames const*, std::__1::(anonymous namespace)::classnames const*, std::__1::random_access_iterator_tag)
Unexecuted instantiation: std::__1::iterator_traits<std::__1::move_iterator<std::__1::__fs::filesystem::__dir_stream**> >::difference_type std::__1::__distance<std::__1::move_iterator<std::__1::__fs::filesystem::__dir_stream**> >(std::__1::move_iterator<std::__1::__fs::filesystem::__dir_stream**>, std::__1::move_iterator<std::__1::__fs::filesystem::__dir_stream**>, std::__1::random_access_iterator_tag)
693
694
template <class _InputIter>
695
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
696
typename iterator_traits<_InputIter>::difference_type
697
distance(_InputIter __first, _InputIter __last)
698
2.17G
{
699
2.17G
    return __distance(__first, __last, typename iterator_traits<_InputIter>::iterator_category());
700
2.17G
}
std::__1::iterator_traits<unsigned int const*>::difference_type std::__1::distance<unsigned int const*>(unsigned int const*, unsigned int const*)
Line
Count
Source
698
75.9M
{
699
75.9M
    return __distance(__first, __last, typename iterator_traits<_InputIter>::iterator_category());
700
75.9M
}
Unexecuted instantiation: std::__1::iterator_traits<std::__1::locale::facet**>::difference_type std::__1::distance<std::__1::locale::facet**>(std::__1::locale::facet**, std::__1::locale::facet**)
std::__1::iterator_traits<char const*>::difference_type std::__1::distance<char const*>(char const*, char const*)
Line
Count
Source
698
2.03G
{
699
2.03G
    return __distance(__first, __last, typename iterator_traits<_InputIter>::iterator_category());
700
2.03G
}
Unexecuted instantiation: std::__1::iterator_traits<wchar_t const*>::difference_type std::__1::distance<wchar_t const*>(wchar_t const*, wchar_t const*)
std::__1::iterator_traits<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*>::difference_type std::__1::distance<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*)
Line
Count
Source
698
603k
{
699
603k
    return __distance(__first, __last, typename iterator_traits<_InputIter>::iterator_category());
700
603k
}
Unexecuted instantiation: std::__1::iterator_traits<std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> >*>::difference_type std::__1::distance<std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> >*>(std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> >*, std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> >*)
std::__1::iterator_traits<wchar_t*>::difference_type std::__1::distance<wchar_t*>(wchar_t*, wchar_t*)
Line
Count
Source
698
2
{
699
2
    return __distance(__first, __last, typename iterator_traits<_InputIter>::iterator_category());
700
2
}
std::__1::iterator_traits<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const*>::difference_type std::__1::distance<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const*>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const*)
Line
Count
Source
698
262k
{
699
262k
    return __distance(__first, __last, typename iterator_traits<_InputIter>::iterator_category());
700
262k
}
Unexecuted instantiation: std::__1::iterator_traits<std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> > const*>::difference_type std::__1::distance<std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> > const*>(std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> > const*, std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> > const*)
std::__1::iterator_traits<char*>::difference_type std::__1::distance<char*>(char*, char*)
Line
Count
Source
698
63.0M
{
699
63.0M
    return __distance(__first, __last, typename iterator_traits<_InputIter>::iterator_category());
700
63.0M
}
Unexecuted instantiation: regex.cpp:std::__1::iterator_traits<std::__1::(anonymous namespace)::collationnames const*>::difference_type std::__1::distance<std::__1::(anonymous namespace)::collationnames const*>(std::__1::(anonymous namespace)::collationnames const*, std::__1::(anonymous namespace)::collationnames const*)
Unexecuted instantiation: regex.cpp:std::__1::iterator_traits<std::__1::(anonymous namespace)::classnames const*>::difference_type std::__1::distance<std::__1::(anonymous namespace)::classnames const*>(std::__1::(anonymous namespace)::classnames const*, std::__1::(anonymous namespace)::classnames const*)
Unexecuted instantiation: std::__1::iterator_traits<std::__1::move_iterator<std::__1::__fs::filesystem::__dir_stream**> >::difference_type std::__1::distance<std::__1::move_iterator<std::__1::__fs::filesystem::__dir_stream**> >(std::__1::move_iterator<std::__1::__fs::filesystem::__dir_stream**>, std::__1::move_iterator<std::__1::__fs::filesystem::__dir_stream**>)
701
702
template <class _InputIter>
703
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
704
typename enable_if
705
<
706
    __is_cpp17_input_iterator<_InputIter>::value,
707
    _InputIter
708
>::type
709
next(_InputIter __x,
710
     typename iterator_traits<_InputIter>::difference_type __n = 1)
711
0
{
712
0
    _LIBCPP_ASSERT(__n >= 0 || __is_cpp17_bidirectional_iterator<_InputIter>::value,
713
0
                       "Attempt to next(it, n) with negative n on a non-bidirectional iterator");
714
0
715
0
    _VSTD::advance(__x, __n);
716
0
    return __x;
717
0
}
Unexecuted instantiation: std::__1::enable_if<__is_cpp17_input_iterator<std::__1::__wrap_iter<char*> >::value, std::__1::__wrap_iter<char*> >::type std::__1::next<std::__1::__wrap_iter<char*> >(std::__1::__wrap_iter<char*>, std::__1::iterator_traits<std::__1::__wrap_iter<char*> >::difference_type)
Unexecuted instantiation: std::__1::enable_if<__is_cpp17_input_iterator<std::__1::__wrap_iter<wchar_t*> >::value, std::__1::__wrap_iter<wchar_t*> >::type std::__1::next<std::__1::__wrap_iter<wchar_t*> >(std::__1::__wrap_iter<wchar_t*>, std::__1::iterator_traits<std::__1::__wrap_iter<wchar_t*> >::difference_type)
718
719
template <class _InputIter>
720
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
721
typename enable_if
722
<
723
    __is_cpp17_input_iterator<_InputIter>::value,
724
    _InputIter
725
>::type
726
prev(_InputIter __x,
727
     typename iterator_traits<_InputIter>::difference_type __n = 1)
728
0
{
729
0
    _LIBCPP_ASSERT(__n <= 0 || __is_cpp17_bidirectional_iterator<_InputIter>::value,
730
0
                       "Attempt to prev(it, n) with a positive n on a non-bidirectional iterator");
731
0
    _VSTD::advance(__x, -__n);
732
0
    return __x;
733
0
}
Unexecuted instantiation: std::__1::enable_if<__is_cpp17_input_iterator<std::__1::__wrap_iter<char*> >::value, std::__1::__wrap_iter<char*> >::type std::__1::prev<std::__1::__wrap_iter<char*> >(std::__1::__wrap_iter<char*>, std::__1::iterator_traits<std::__1::__wrap_iter<char*> >::difference_type)
Unexecuted instantiation: std::__1::enable_if<__is_cpp17_input_iterator<std::__1::__wrap_iter<wchar_t*> >::value, std::__1::__wrap_iter<wchar_t*> >::type std::__1::prev<std::__1::__wrap_iter<wchar_t*> >(std::__1::__wrap_iter<wchar_t*>, std::__1::iterator_traits<std::__1::__wrap_iter<wchar_t*> >::difference_type)
734
735
736
template <class _Tp, class = void>
737
struct __is_stashing_iterator : false_type {};
738
739
template <class _Tp>
740
struct __is_stashing_iterator<_Tp, typename __void_t<typename _Tp::__stashing_iterator_tag>::type>
741
  : true_type {};
742
743
template <class _Iter>
744
class _LIBCPP_TEMPLATE_VIS reverse_iterator
745
    : public iterator<typename iterator_traits<_Iter>::iterator_category,
746
                      typename iterator_traits<_Iter>::value_type,
747
                      typename iterator_traits<_Iter>::difference_type,
748
                      typename iterator_traits<_Iter>::pointer,
749
                      typename iterator_traits<_Iter>::reference>
750
{
751
private:
752
    /*mutable*/ _Iter __t;  // no longer used as of LWG #2360, not removed due to ABI break
753
754
    static_assert(!__is_stashing_iterator<_Iter>::value,
755
      "The specified iterator type cannot be used with reverse_iterator; "
756
      "Using stashing iterators with reverse_iterator causes undefined behavior");
757
758
protected:
759
    _Iter current;
760
public:
761
    typedef _Iter                                            iterator_type;
762
    typedef typename iterator_traits<_Iter>::difference_type difference_type;
763
    typedef typename iterator_traits<_Iter>::reference       reference;
764
    typedef typename iterator_traits<_Iter>::pointer         pointer;
765
766
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
767
    reverse_iterator() : __t(), current() {}
768
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
769
0
    explicit reverse_iterator(_Iter __x) : __t(__x), current(__x) {}
770
    template <class _Up>
771
        _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
772
        reverse_iterator(const reverse_iterator<_Up>& __u) : __t(__u.base()), current(__u.base()) {}
773
    template <class _Up>
774
        _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
775
        reverse_iterator& operator=(const reverse_iterator<_Up>& __u)
776
            { __t = current = __u.base(); return *this; }
777
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
778
0
    _Iter base() const {return current;}
779
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
780
0
    reference operator*() const {_Iter __tmp = current; return *--__tmp;}
781
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
782
    pointer  operator->() const {return _VSTD::addressof(operator*());}
783
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
784
0
    reverse_iterator& operator++() {--current; return *this;}
785
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
786
    reverse_iterator  operator++(int) {reverse_iterator __tmp(*this); --current; return __tmp;}
787
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
788
    reverse_iterator& operator--() {++current; return *this;}
789
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
790
    reverse_iterator  operator--(int) {reverse_iterator __tmp(*this); ++current; return __tmp;}
791
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
792
    reverse_iterator  operator+ (difference_type __n) const {return reverse_iterator(current - __n);}
793
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
794
    reverse_iterator& operator+=(difference_type __n) {current -= __n; return *this;}
795
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
796
    reverse_iterator  operator- (difference_type __n) const {return reverse_iterator(current + __n);}
797
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
798
    reverse_iterator& operator-=(difference_type __n) {current += __n; return *this;}
799
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
800
    reference         operator[](difference_type __n) const {return *(*this + __n);}
801
};
802
803
template <class _Iter1, class _Iter2>
804
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
805
bool
806
operator==(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& __y)
807
{
808
    return __x.base() == __y.base();
809
}
810
811
template <class _Iter1, class _Iter2>
812
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
813
bool
814
operator<(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& __y)
815
{
816
    return __x.base() > __y.base();
817
}
818
819
template <class _Iter1, class _Iter2>
820
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
821
bool
822
operator!=(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& __y)
823
0
{
824
0
    return __x.base() != __y.base();
825
0
}
826
827
template <class _Iter1, class _Iter2>
828
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
829
bool
830
operator>(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& __y)
831
{
832
    return __x.base() < __y.base();
833
}
834
835
template <class _Iter1, class _Iter2>
836
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
837
bool
838
operator>=(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& __y)
839
{
840
    return __x.base() <= __y.base();
841
}
842
843
template <class _Iter1, class _Iter2>
844
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
845
bool
846
operator<=(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& __y)
847
{
848
    return __x.base() >= __y.base();
849
}
850
851
#ifndef _LIBCPP_CXX03_LANG
852
template <class _Iter1, class _Iter2>
853
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
854
auto
855
operator-(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& __y)
856
-> decltype(__y.base() - __x.base())
857
{
858
    return __y.base() - __x.base();
859
}
860
#else
861
template <class _Iter1, class _Iter2>
862
inline _LIBCPP_INLINE_VISIBILITY
863
typename reverse_iterator<_Iter1>::difference_type
864
operator-(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& __y)
865
{
866
    return __y.base() - __x.base();
867
}
868
#endif
869
870
template <class _Iter>
871
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
872
reverse_iterator<_Iter>
873
operator+(typename reverse_iterator<_Iter>::difference_type __n, const reverse_iterator<_Iter>& __x)
874
{
875
    return reverse_iterator<_Iter>(__x.base() - __n);
876
}
877
878
#if _LIBCPP_STD_VER > 11
879
template <class _Iter>
880
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
881
reverse_iterator<_Iter> make_reverse_iterator(_Iter __i)
882
{
883
    return reverse_iterator<_Iter>(__i);
884
}
885
#endif
886
887
template <class _Container>
888
class _LIBCPP_TEMPLATE_VIS back_insert_iterator
889
    : public iterator<output_iterator_tag,
890
                      void,
891
                      void,
892
                      void,
893
                      void>
894
{
895
protected:
896
    _Container* container;
897
public:
898
    typedef _Container container_type;
899
900
0
    _LIBCPP_INLINE_VISIBILITY explicit back_insert_iterator(_Container& __x) : container(_VSTD::addressof(__x)) {}
Unexecuted instantiation: std::__1::back_insert_iterator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >::back_insert_iterator(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&)
Unexecuted instantiation: std::__1::back_insert_iterator<std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> > >::back_insert_iterator(std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> >&)
901
    _LIBCPP_INLINE_VISIBILITY back_insert_iterator& operator=(const typename _Container::value_type& __value_)
902
0
        {container->push_back(__value_); return *this;}
903
#ifndef _LIBCPP_CXX03_LANG
904
    _LIBCPP_INLINE_VISIBILITY back_insert_iterator& operator=(typename _Container::value_type&& __value_)
905
0
        {container->push_back(_VSTD::move(__value_)); return *this;}
Unexecuted instantiation: std::__1::back_insert_iterator<std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> > >::operator=(wchar_t&&)
Unexecuted instantiation: std::__1::back_insert_iterator<std::__1::basic_string<char16_t, std::__1::char_traits<char16_t>, std::__1::allocator<char16_t> > >::operator=(char16_t&&)
Unexecuted instantiation: std::__1::back_insert_iterator<std::__1::basic_string<char32_t, std::__1::char_traits<char32_t>, std::__1::allocator<char32_t> > >::operator=(char32_t&&)
906
#endif  // _LIBCPP_CXX03_LANG
907
0
    _LIBCPP_INLINE_VISIBILITY back_insert_iterator& operator*()     {return *this;}
Unexecuted instantiation: std::__1::back_insert_iterator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >::operator*()
Unexecuted instantiation: std::__1::back_insert_iterator<std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> > >::operator*()
Unexecuted instantiation: std::__1::back_insert_iterator<std::__1::basic_string<char16_t, std::__1::char_traits<char16_t>, std::__1::allocator<char16_t> > >::operator*()
Unexecuted instantiation: std::__1::back_insert_iterator<std::__1::basic_string<char32_t, std::__1::char_traits<char32_t>, std::__1::allocator<char32_t> > >::operator*()
908
0
    _LIBCPP_INLINE_VISIBILITY back_insert_iterator& operator++()    {return *this;}
Unexecuted instantiation: std::__1::back_insert_iterator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >::operator++()
Unexecuted instantiation: std::__1::back_insert_iterator<std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> > >::operator++()
Unexecuted instantiation: std::__1::back_insert_iterator<std::__1::basic_string<char16_t, std::__1::char_traits<char16_t>, std::__1::allocator<char16_t> > >::operator++()
Unexecuted instantiation: std::__1::back_insert_iterator<std::__1::basic_string<char32_t, std::__1::char_traits<char32_t>, std::__1::allocator<char32_t> > >::operator++()
909
    _LIBCPP_INLINE_VISIBILITY back_insert_iterator  operator++(int) {return *this;}
910
};
911
912
template <class _Container>
913
inline _LIBCPP_INLINE_VISIBILITY
914
back_insert_iterator<_Container>
915
back_inserter(_Container& __x)
916
0
{
917
0
    return back_insert_iterator<_Container>(__x);
918
0
}
Unexecuted instantiation: std::__1::back_insert_iterator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > std::__1::back_inserter<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&)
Unexecuted instantiation: std::__1::back_insert_iterator<std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> > > std::__1::back_inserter<std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> > >(std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> >&)
Unexecuted instantiation: std::__1::back_insert_iterator<std::__1::basic_string<char16_t, std::__1::char_traits<char16_t>, std::__1::allocator<char16_t> > > std::__1::back_inserter<std::__1::basic_string<char16_t, std::__1::char_traits<char16_t>, std::__1::allocator<char16_t> > >(std::__1::basic_string<char16_t, std::__1::char_traits<char16_t>, std::__1::allocator<char16_t> >&)
Unexecuted instantiation: std::__1::back_insert_iterator<std::__1::basic_string<char32_t, std::__1::char_traits<char32_t>, std::__1::allocator<char32_t> > > std::__1::back_inserter<std::__1::basic_string<char32_t, std::__1::char_traits<char32_t>, std::__1::allocator<char32_t> > >(std::__1::basic_string<char32_t, std::__1::char_traits<char32_t>, std::__1::allocator<char32_t> >&)
919
920
template <class _Container>
921
class _LIBCPP_TEMPLATE_VIS front_insert_iterator
922
    : public iterator<output_iterator_tag,
923
                      void,
924
                      void,
925
                      void,
926
                      void>
927
{
928
protected:
929
    _Container* container;
930
public:
931
    typedef _Container container_type;
932
933
    _LIBCPP_INLINE_VISIBILITY explicit front_insert_iterator(_Container& __x) : container(_VSTD::addressof(__x)) {}
934
    _LIBCPP_INLINE_VISIBILITY front_insert_iterator& operator=(const typename _Container::value_type& __value_)
935
        {container->push_front(__value_); return *this;}
936
#ifndef _LIBCPP_CXX03_LANG
937
    _LIBCPP_INLINE_VISIBILITY front_insert_iterator& operator=(typename _Container::value_type&& __value_)
938
        {container->push_front(_VSTD::move(__value_)); return *this;}
939
#endif  // _LIBCPP_CXX03_LANG
940
    _LIBCPP_INLINE_VISIBILITY front_insert_iterator& operator*()     {return *this;}
941
    _LIBCPP_INLINE_VISIBILITY front_insert_iterator& operator++()    {return *this;}
942
    _LIBCPP_INLINE_VISIBILITY front_insert_iterator  operator++(int) {return *this;}
943
};
944
945
template <class _Container>
946
inline _LIBCPP_INLINE_VISIBILITY
947
front_insert_iterator<_Container>
948
front_inserter(_Container& __x)
949
{
950
    return front_insert_iterator<_Container>(__x);
951
}
952
953
template <class _Container>
954
class _LIBCPP_TEMPLATE_VIS insert_iterator
955
    : public iterator<output_iterator_tag,
956
                      void,
957
                      void,
958
                      void,
959
                      void>
960
{
961
protected:
962
    _Container* container;
963
    typename _Container::iterator iter;
964
public:
965
    typedef _Container container_type;
966
967
    _LIBCPP_INLINE_VISIBILITY insert_iterator(_Container& __x, typename _Container::iterator __i)
968
        : container(_VSTD::addressof(__x)), iter(__i) {}
969
    _LIBCPP_INLINE_VISIBILITY insert_iterator& operator=(const typename _Container::value_type& __value_)
970
        {iter = container->insert(iter, __value_); ++iter; return *this;}
971
#ifndef _LIBCPP_CXX03_LANG
972
    _LIBCPP_INLINE_VISIBILITY insert_iterator& operator=(typename _Container::value_type&& __value_)
973
        {iter = container->insert(iter, _VSTD::move(__value_)); ++iter; return *this;}
974
#endif  // _LIBCPP_CXX03_LANG
975
    _LIBCPP_INLINE_VISIBILITY insert_iterator& operator*()        {return *this;}
976
    _LIBCPP_INLINE_VISIBILITY insert_iterator& operator++()       {return *this;}
977
    _LIBCPP_INLINE_VISIBILITY insert_iterator& operator++(int)    {return *this;}
978
};
979
980
template <class _Container>
981
inline _LIBCPP_INLINE_VISIBILITY
982
insert_iterator<_Container>
983
inserter(_Container& __x, typename _Container::iterator __i)
984
{
985
    return insert_iterator<_Container>(__x, __i);
986
}
987
988
template <class _Tp, class _CharT = char,
989
          class _Traits = char_traits<_CharT>, class _Distance = ptrdiff_t>
990
class _LIBCPP_TEMPLATE_VIS istream_iterator
991
    : public iterator<input_iterator_tag, _Tp, _Distance, const _Tp*, const _Tp&>
992
{
993
public:
994
    typedef _CharT char_type;
995
    typedef _Traits traits_type;
996
    typedef basic_istream<_CharT,_Traits> istream_type;
997
private:
998
    istream_type* __in_stream_;
999
    _Tp __value_;
1000
public:
1001
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR istream_iterator() : __in_stream_(0), __value_() {}
1002
    _LIBCPP_INLINE_VISIBILITY istream_iterator(istream_type& __s) : __in_stream_(_VSTD::addressof(__s))
1003
        {
1004
            if (!(*__in_stream_ >> __value_))
1005
                __in_stream_ = 0;
1006
        }
1007
1008
    _LIBCPP_INLINE_VISIBILITY const _Tp& operator*() const {return __value_;}
1009
    _LIBCPP_INLINE_VISIBILITY const _Tp* operator->() const {return _VSTD::addressof((operator*()));}
1010
    _LIBCPP_INLINE_VISIBILITY istream_iterator& operator++()
1011
        {
1012
            if (!(*__in_stream_ >> __value_))
1013
                __in_stream_ = 0;
1014
            return *this;
1015
        }
1016
    _LIBCPP_INLINE_VISIBILITY istream_iterator  operator++(int)
1017
        {istream_iterator __t(*this); ++(*this); return __t;}
1018
1019
    template <class _Up, class _CharU, class _TraitsU, class _DistanceU>
1020
    friend _LIBCPP_INLINE_VISIBILITY
1021
    bool
1022
    operator==(const istream_iterator<_Up, _CharU, _TraitsU, _DistanceU>& __x,
1023
               const istream_iterator<_Up, _CharU, _TraitsU, _DistanceU>& __y);
1024
1025
    template <class _Up, class _CharU, class _TraitsU, class _DistanceU>
1026
    friend _LIBCPP_INLINE_VISIBILITY
1027
    bool
1028
    operator==(const istream_iterator<_Up, _CharU, _TraitsU, _DistanceU>& __x,
1029
               const istream_iterator<_Up, _CharU, _TraitsU, _DistanceU>& __y);
1030
};
1031
1032
template <class _Tp, class _CharT, class _Traits, class _Distance>
1033
inline _LIBCPP_INLINE_VISIBILITY
1034
bool
1035
operator==(const istream_iterator<_Tp, _CharT, _Traits, _Distance>& __x,
1036
           const istream_iterator<_Tp, _CharT, _Traits, _Distance>& __y)
1037
{
1038
    return __x.__in_stream_ == __y.__in_stream_;
1039
}
1040
1041
template <class _Tp, class _CharT, class _Traits, class _Distance>
1042
inline _LIBCPP_INLINE_VISIBILITY
1043
bool
1044
operator!=(const istream_iterator<_Tp, _CharT, _Traits, _Distance>& __x,
1045
           const istream_iterator<_Tp, _CharT, _Traits, _Distance>& __y)
1046
{
1047
    return !(__x == __y);
1048
}
1049
1050
template <class _Tp, class _CharT = char, class _Traits = char_traits<_CharT> >
1051
class _LIBCPP_TEMPLATE_VIS ostream_iterator
1052
    : public iterator<output_iterator_tag, void, void, void, void>
1053
{
1054
public:
1055
    typedef _CharT char_type;
1056
    typedef _Traits traits_type;
1057
    typedef basic_ostream<_CharT,_Traits> ostream_type;
1058
private:
1059
    ostream_type* __out_stream_;
1060
    const char_type* __delim_;
1061
public:
1062
    _LIBCPP_INLINE_VISIBILITY ostream_iterator(ostream_type& __s) _NOEXCEPT
1063
        : __out_stream_(_VSTD::addressof(__s)), __delim_(0) {}
1064
    _LIBCPP_INLINE_VISIBILITY ostream_iterator(ostream_type& __s, const _CharT* __delimiter) _NOEXCEPT
1065
        : __out_stream_(_VSTD::addressof(__s)), __delim_(__delimiter) {}
1066
    _LIBCPP_INLINE_VISIBILITY ostream_iterator& operator=(const _Tp& __value_)
1067
        {
1068
            *__out_stream_ << __value_;
1069
            if (__delim_)
1070
                *__out_stream_ << __delim_;
1071
            return *this;
1072
        }
1073
1074
    _LIBCPP_INLINE_VISIBILITY ostream_iterator& operator*()     {return *this;}
1075
    _LIBCPP_INLINE_VISIBILITY ostream_iterator& operator++()    {return *this;}
1076
    _LIBCPP_INLINE_VISIBILITY ostream_iterator& operator++(int) {return *this;}
1077
};
1078
1079
template<class _CharT, class _Traits>
1080
class _LIBCPP_TEMPLATE_VIS istreambuf_iterator
1081
    : public iterator<input_iterator_tag, _CharT,
1082
                      typename _Traits::off_type, _CharT*,
1083
                      _CharT>
1084
{
1085
public:
1086
    typedef _CharT                          char_type;
1087
    typedef _Traits                         traits_type;
1088
    typedef typename _Traits::int_type      int_type;
1089
    typedef basic_streambuf<_CharT,_Traits> streambuf_type;
1090
    typedef basic_istream<_CharT,_Traits>   istream_type;
1091
private:
1092
    mutable streambuf_type* __sbuf_;
1093
1094
    class __proxy
1095
    {
1096
        char_type __keep_;
1097
        streambuf_type* __sbuf_;
1098
        _LIBCPP_INLINE_VISIBILITY __proxy(char_type __c, streambuf_type* __s)
1099
0
            : __keep_(__c), __sbuf_(__s) {}
Unexecuted instantiation: std::__1::istreambuf_iterator<char, std::__1::char_traits<char> >::__proxy::__proxy(char, std::__1::basic_streambuf<char, std::__1::char_traits<char> >*)
Unexecuted instantiation: std::__1::istreambuf_iterator<wchar_t, std::__1::char_traits<wchar_t> >::__proxy::__proxy(wchar_t, std::__1::basic_streambuf<wchar_t, std::__1::char_traits<wchar_t> >*)
1100
        friend class istreambuf_iterator;
1101
    public:
1102
0
        _LIBCPP_INLINE_VISIBILITY char_type operator*() const {return __keep_;}
Unexecuted instantiation: std::__1::istreambuf_iterator<char, std::__1::char_traits<char> >::__proxy::operator*() const
Unexecuted instantiation: std::__1::istreambuf_iterator<wchar_t, std::__1::char_traits<wchar_t> >::__proxy::operator*() const
1103
    };
1104
1105
    _LIBCPP_INLINE_VISIBILITY
1106
    bool __test_for_eof() const
1107
4.48k
    {
1108
4.48k
        if (__sbuf_ && 
traits_type::eq_int_type(__sbuf_->sgetc(), traits_type::eof())2.24k
)
1109
9
            __sbuf_ = 0;
1110
4.48k
        return __sbuf_ == 0;
1111
4.48k
    }
std::__1::istreambuf_iterator<char, std::__1::char_traits<char> >::__test_for_eof() const
Line
Count
Source
1107
4.48k
    {
1108
4.48k
        if (__sbuf_ && 
traits_type::eq_int_type(__sbuf_->sgetc(), traits_type::eof())2.24k
)
1109
9
            __sbuf_ = 0;
1110
4.48k
        return __sbuf_ == 0;
1111
4.48k
    }
Unexecuted instantiation: std::__1::istreambuf_iterator<wchar_t, std::__1::char_traits<wchar_t> >::__test_for_eof() const
1112
public:
1113
9
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR istreambuf_iterator() _NOEXCEPT : __sbuf_(0) {}
std::__1::istreambuf_iterator<char, std::__1::char_traits<char> >::istreambuf_iterator()
Line
Count
Source
1113
9
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR istreambuf_iterator() _NOEXCEPT : __sbuf_(0) {}
Unexecuted instantiation: std::__1::istreambuf_iterator<wchar_t, std::__1::char_traits<wchar_t> >::istreambuf_iterator()
1114
    _LIBCPP_INLINE_VISIBILITY istreambuf_iterator(istream_type& __s) _NOEXCEPT
1115
9
        : __sbuf_(__s.rdbuf()) {}
std::__1::istreambuf_iterator<char, std::__1::char_traits<char> >::istreambuf_iterator(std::__1::basic_istream<char, std::__1::char_traits<char> >&)
Line
Count
Source
1115
9
        : __sbuf_(__s.rdbuf()) {}
Unexecuted instantiation: std::__1::istreambuf_iterator<wchar_t, std::__1::char_traits<wchar_t> >::istreambuf_iterator(std::__1::basic_istream<wchar_t, std::__1::char_traits<wchar_t> >&)
1116
    _LIBCPP_INLINE_VISIBILITY istreambuf_iterator(streambuf_type* __s) _NOEXCEPT
1117
0
        : __sbuf_(__s) {}
Unexecuted instantiation: std::__1::istreambuf_iterator<char, std::__1::char_traits<char> >::istreambuf_iterator(std::__1::basic_streambuf<char, std::__1::char_traits<char> >*)
Unexecuted instantiation: std::__1::istreambuf_iterator<wchar_t, std::__1::char_traits<wchar_t> >::istreambuf_iterator(std::__1::basic_streambuf<wchar_t, std::__1::char_traits<wchar_t> >*)
1118
    _LIBCPP_INLINE_VISIBILITY istreambuf_iterator(const __proxy& __p) _NOEXCEPT
1119
        : __sbuf_(__p.__sbuf_) {}
1120
1121
    _LIBCPP_INLINE_VISIBILITY char_type  operator*() const
1122
2.23k
        {return static_cast<char_type>(__sbuf_->sgetc());}
std::__1::istreambuf_iterator<char, std::__1::char_traits<char> >::operator*() const
Line
Count
Source
1122
2.23k
        {return static_cast<char_type>(__sbuf_->sgetc());}
Unexecuted instantiation: std::__1::istreambuf_iterator<wchar_t, std::__1::char_traits<wchar_t> >::operator*() const
1123
    _LIBCPP_INLINE_VISIBILITY istreambuf_iterator& operator++()
1124
2.23k
        {
1125
2.23k
            __sbuf_->sbumpc();
1126
2.23k
            return *this;
1127
2.23k
        }
std::__1::istreambuf_iterator<char, std::__1::char_traits<char> >::operator++()
Line
Count
Source
1124
2.23k
        {
1125
2.23k
            __sbuf_->sbumpc();
1126
2.23k
            return *this;
1127
2.23k
        }
Unexecuted instantiation: std::__1::istreambuf_iterator<wchar_t, std::__1::char_traits<wchar_t> >::operator++()
1128
    _LIBCPP_INLINE_VISIBILITY __proxy              operator++(int)
1129
0
        {
1130
0
            return __proxy(__sbuf_->sbumpc(), __sbuf_);
1131
0
        }
Unexecuted instantiation: std::__1::istreambuf_iterator<char, std::__1::char_traits<char> >::operator++(int)
Unexecuted instantiation: std::__1::istreambuf_iterator<wchar_t, std::__1::char_traits<wchar_t> >::operator++(int)
1132
1133
    _LIBCPP_INLINE_VISIBILITY bool equal(const istreambuf_iterator& __b) const
1134
2.24k
        {return __test_for_eof() == __b.__test_for_eof();}
std::__1::istreambuf_iterator<char, std::__1::char_traits<char> >::equal(std::__1::istreambuf_iterator<char, std::__1::char_traits<char> > const&) const
Line
Count
Source
1134
2.24k
        {return __test_for_eof() == __b.__test_for_eof();}
Unexecuted instantiation: std::__1::istreambuf_iterator<wchar_t, std::__1::char_traits<wchar_t> >::equal(std::__1::istreambuf_iterator<wchar_t, std::__1::char_traits<wchar_t> > const&) const
1135
};
1136
1137
template <class _CharT, class _Traits>
1138
inline _LIBCPP_INLINE_VISIBILITY
1139
bool operator==(const istreambuf_iterator<_CharT,_Traits>& __a,
1140
                const istreambuf_iterator<_CharT,_Traits>& __b)
1141
0
                {return __a.equal(__b);}
Unexecuted instantiation: bool std::__1::operator==<char, std::__1::char_traits<char> >(std::__1::istreambuf_iterator<char, std::__1::char_traits<char> > const&, std::__1::istreambuf_iterator<char, std::__1::char_traits<char> > const&)
Unexecuted instantiation: bool std::__1::operator==<wchar_t, std::__1::char_traits<wchar_t> >(std::__1::istreambuf_iterator<wchar_t, std::__1::char_traits<wchar_t> > const&, std::__1::istreambuf_iterator<wchar_t, std::__1::char_traits<wchar_t> > const&)
1142
1143
template <class _CharT, class _Traits>
1144
inline _LIBCPP_INLINE_VISIBILITY
1145
bool operator!=(const istreambuf_iterator<_CharT,_Traits>& __a,
1146
                const istreambuf_iterator<_CharT,_Traits>& __b)
1147
2.24k
                {return !__a.equal(__b);}
bool std::__1::operator!=<char, std::__1::char_traits<char> >(std::__1::istreambuf_iterator<char, std::__1::char_traits<char> > const&, std::__1::istreambuf_iterator<char, std::__1::char_traits<char> > const&)
Line
Count
Source
1147
2.24k
                {return !__a.equal(__b);}
Unexecuted instantiation: bool std::__1::operator!=<wchar_t, std::__1::char_traits<wchar_t> >(std::__1::istreambuf_iterator<wchar_t, std::__1::char_traits<wchar_t> > const&, std::__1::istreambuf_iterator<wchar_t, std::__1::char_traits<wchar_t> > const&)
1148
1149
template <class _CharT, class _Traits>
1150
class _LIBCPP_TEMPLATE_VIS ostreambuf_iterator
1151
    : public iterator<output_iterator_tag, void, void, void, void>
1152
{
1153
public:
1154
    typedef _CharT                          char_type;
1155
    typedef _Traits                         traits_type;
1156
    typedef basic_streambuf<_CharT,_Traits> streambuf_type;
1157
    typedef basic_ostream<_CharT,_Traits>   ostream_type;
1158
private:
1159
    streambuf_type* __sbuf_;
1160
public:
1161
    _LIBCPP_INLINE_VISIBILITY ostreambuf_iterator(ostream_type& __s) _NOEXCEPT
1162
271M
        : __sbuf_(__s.rdbuf()) {}
std::__1::ostreambuf_iterator<char, std::__1::char_traits<char> >::ostreambuf_iterator(std::__1::basic_ostream<char, std::__1::char_traits<char> >&)
Line
Count
Source
1162
271M
        : __sbuf_(__s.rdbuf()) {}
std::__1::ostreambuf_iterator<wchar_t, std::__1::char_traits<wchar_t> >::ostreambuf_iterator(std::__1::basic_ostream<wchar_t, std::__1::char_traits<wchar_t> >&)
Line
Count
Source
1162
12
        : __sbuf_(__s.rdbuf()) {}
1163
    _LIBCPP_INLINE_VISIBILITY ostreambuf_iterator(streambuf_type* __s) _NOEXCEPT
1164
        : __sbuf_(__s) {}
1165
    _LIBCPP_INLINE_VISIBILITY ostreambuf_iterator& operator=(_CharT __c)
1166
2.23k
        {
1167
2.23k
            if (__sbuf_ && traits_type::eq_int_type(__sbuf_->sputc(__c), traits_type::eof()))
1168
0
                __sbuf_ = 0;
1169
2.23k
            return *this;
1170
2.23k
        }
std::__1::ostreambuf_iterator<char, std::__1::char_traits<char> >::operator=(char)
Line
Count
Source
1166
2.23k
        {
1167
2.23k
            if (__sbuf_ && traits_type::eq_int_type(__sbuf_->sputc(__c), traits_type::eof()))
1168
0
                __sbuf_ = 0;
1169
2.23k
            return *this;
1170
2.23k
        }
Unexecuted instantiation: std::__1::ostreambuf_iterator<wchar_t, std::__1::char_traits<wchar_t> >::operator=(wchar_t)
1171
2.23k
    _LIBCPP_INLINE_VISIBILITY ostreambuf_iterator& operator*()     {return *this;}
std::__1::ostreambuf_iterator<char, std::__1::char_traits<char> >::operator*()
Line
Count
Source
1171
2.23k
    _LIBCPP_INLINE_VISIBILITY ostreambuf_iterator& operator*()     {return *this;}
Unexecuted instantiation: std::__1::ostreambuf_iterator<wchar_t, std::__1::char_traits<wchar_t> >::operator*()
1172
2.23k
    _LIBCPP_INLINE_VISIBILITY ostreambuf_iterator& operator++()    {return *this;}
std::__1::ostreambuf_iterator<char, std::__1::char_traits<char> >::operator++()
Line
Count
Source
1172
2.23k
    _LIBCPP_INLINE_VISIBILITY ostreambuf_iterator& operator++()    {return *this;}
Unexecuted instantiation: std::__1::ostreambuf_iterator<wchar_t, std::__1::char_traits<wchar_t> >::operator++()
1173
0
    _LIBCPP_INLINE_VISIBILITY ostreambuf_iterator& operator++(int) {return *this;}
Unexecuted instantiation: std::__1::ostreambuf_iterator<char, std::__1::char_traits<char> >::operator++(int)
Unexecuted instantiation: std::__1::ostreambuf_iterator<wchar_t, std::__1::char_traits<wchar_t> >::operator++(int)
1174
271M
    _LIBCPP_INLINE_VISIBILITY bool failed() const _NOEXCEPT {return __sbuf_ == 0;}
std::__1::ostreambuf_iterator<char, std::__1::char_traits<char> >::failed() const
Line
Count
Source
1174
271M
    _LIBCPP_INLINE_VISIBILITY bool failed() const _NOEXCEPT {return __sbuf_ == 0;}
std::__1::ostreambuf_iterator<wchar_t, std::__1::char_traits<wchar_t> >::failed() const
Line
Count
Source
1174
12
    _LIBCPP_INLINE_VISIBILITY bool failed() const _NOEXCEPT {return __sbuf_ == 0;}
1175
1176
    template <class _Ch, class _Tr>
1177
    friend
1178
    _LIBCPP_HIDDEN
1179
    ostreambuf_iterator<_Ch, _Tr>
1180
    __pad_and_output(ostreambuf_iterator<_Ch, _Tr> __s,
1181
                     const _Ch* __ob, const _Ch* __op, const _Ch* __oe,
1182
                     ios_base& __iob, _Ch __fl);
1183
};
1184
1185
template <class _Iter>
1186
class _LIBCPP_TEMPLATE_VIS move_iterator
1187
{
1188
private:
1189
    _Iter __i;
1190
public:
1191
    typedef _Iter                                            iterator_type;
1192
    typedef typename iterator_traits<iterator_type>::iterator_category iterator_category;
1193
    typedef typename iterator_traits<iterator_type>::value_type value_type;
1194
    typedef typename iterator_traits<iterator_type>::difference_type difference_type;
1195
    typedef iterator_type pointer;
1196
#ifndef _LIBCPP_CXX03_LANG
1197
    typedef typename iterator_traits<iterator_type>::reference __reference;
1198
    typedef typename conditional<
1199
            is_reference<__reference>::value,
1200
            typename remove_reference<__reference>::type&&,
1201
            __reference
1202
        >::type reference;
1203
#else
1204
    typedef typename iterator_traits<iterator_type>::reference reference;
1205
#endif
1206
1207
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
1208
    move_iterator() : __i() {}
1209
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
1210
0
    explicit move_iterator(_Iter __x) : __i(__x) {}
1211
    template <class _Up>
1212
      _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
1213
      move_iterator(const move_iterator<_Up>& __u) : __i(__u.base()) {}
1214
0
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 _Iter base() const {return __i;}
1215
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
1216
0
    reference operator*() const { return static_cast<reference>(*__i); }
1217
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
1218
    pointer  operator->() const { return __i;}
1219
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
1220
0
    move_iterator& operator++() {++__i; return *this;}
1221
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
1222
    move_iterator  operator++(int) {move_iterator __tmp(*this); ++__i; return __tmp;}
1223
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
1224
    move_iterator& operator--() {--__i; return *this;}
1225
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
1226
    move_iterator  operator--(int) {move_iterator __tmp(*this); --__i; return __tmp;}
1227
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
1228
    move_iterator  operator+ (difference_type __n) const {return move_iterator(__i + __n);}
1229
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
1230
    move_iterator& operator+=(difference_type __n) {__i += __n; return *this;}
1231
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
1232
    move_iterator  operator- (difference_type __n) const {return move_iterator(__i - __n);}
1233
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
1234
    move_iterator& operator-=(difference_type __n) {__i -= __n; return *this;}
1235
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
1236
    reference operator[](difference_type __n) const { return static_cast<reference>(__i[__n]); }
1237
};
1238
1239
template <class _Iter1, class _Iter2>
1240
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
1241
bool
1242
operator==(const move_iterator<_Iter1>& __x, const move_iterator<_Iter2>& __y)
1243
{
1244
    return __x.base() == __y.base();
1245
}
1246
1247
template <class _Iter1, class _Iter2>
1248
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
1249
bool
1250
operator<(const move_iterator<_Iter1>& __x, const move_iterator<_Iter2>& __y)
1251
{
1252
    return __x.base() < __y.base();
1253
}
1254
1255
template <class _Iter1, class _Iter2>
1256
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
1257
bool
1258
operator!=(const move_iterator<_Iter1>& __x, const move_iterator<_Iter2>& __y)
1259
{
1260
    return __x.base() != __y.base();
1261
}
1262
1263
template <class _Iter1, class _Iter2>
1264
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
1265
bool
1266
operator>(const move_iterator<_Iter1>& __x, const move_iterator<_Iter2>& __y)
1267
{
1268
    return __x.base() > __y.base();
1269
}
1270
1271
template <class _Iter1, class _Iter2>
1272
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
1273
bool
1274
operator>=(const move_iterator<_Iter1>& __x, const move_iterator<_Iter2>& __y)
1275
{
1276
    return __x.base() >= __y.base();
1277
}
1278
1279
template <class _Iter1, class _Iter2>
1280
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
1281
bool
1282
operator<=(const move_iterator<_Iter1>& __x, const move_iterator<_Iter2>& __y)
1283
{
1284
    return __x.base() <= __y.base();
1285
}
1286
1287
#ifndef _LIBCPP_CXX03_LANG
1288
template <class _Iter1, class _Iter2>
1289
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
1290
auto
1291
operator-(const move_iterator<_Iter1>& __x, const move_iterator<_Iter2>& __y)
1292
-> decltype(__x.base() - __y.base())
1293
0
{
1294
0
    return __x.base() - __y.base();
1295
0
}
1296
#else
1297
template <class _Iter1, class _Iter2>
1298
inline _LIBCPP_INLINE_VISIBILITY
1299
typename move_iterator<_Iter1>::difference_type
1300
operator-(const move_iterator<_Iter1>& __x, const move_iterator<_Iter2>& __y)
1301
{
1302
    return __x.base() - __y.base();
1303
}
1304
#endif
1305
1306
template <class _Iter>
1307
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
1308
move_iterator<_Iter>
1309
operator+(typename move_iterator<_Iter>::difference_type __n, const move_iterator<_Iter>& __x)
1310
{
1311
    return move_iterator<_Iter>(__x.base() + __n);
1312
}
1313
1314
template <class _Iter>
1315
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
1316
move_iterator<_Iter>
1317
make_move_iterator(_Iter __i)
1318
{
1319
    return move_iterator<_Iter>(__i);
1320
}
1321
1322
// __wrap_iter
1323
1324
template <class _Iter> class __wrap_iter;
1325
1326
template <class _Iter1, class _Iter2>
1327
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG
1328
bool
1329
operator==(const __wrap_iter<_Iter1>&, const __wrap_iter<_Iter2>&) _NOEXCEPT;
1330
1331
template <class _Iter1, class _Iter2>
1332
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG
1333
bool
1334
operator<(const __wrap_iter<_Iter1>&, const __wrap_iter<_Iter2>&) _NOEXCEPT;
1335
1336
template <class _Iter1, class _Iter2>
1337
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG
1338
bool
1339
operator!=(const __wrap_iter<_Iter1>&, const __wrap_iter<_Iter2>&) _NOEXCEPT;
1340
1341
template <class _Iter1, class _Iter2>
1342
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG
1343
bool
1344
operator>(const __wrap_iter<_Iter1>&, const __wrap_iter<_Iter2>&) _NOEXCEPT;
1345
1346
template <class _Iter1, class _Iter2>
1347
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG
1348
bool
1349
operator>=(const __wrap_iter<_Iter1>&, const __wrap_iter<_Iter2>&) _NOEXCEPT;
1350
1351
template <class _Iter1, class _Iter2>
1352
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG
1353
bool
1354
operator<=(const __wrap_iter<_Iter1>&, const __wrap_iter<_Iter2>&) _NOEXCEPT;
1355
1356
#ifndef _LIBCPP_CXX03_LANG
1357
template <class _Iter1, class _Iter2>
1358
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG
1359
auto
1360
operator-(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT
1361
-> decltype(__x.base() - __y.base());
1362
#else
1363
template <class _Iter1, class _Iter2>
1364
_LIBCPP_INLINE_VISIBILITY
1365
typename __wrap_iter<_Iter1>::difference_type
1366
operator-(const __wrap_iter<_Iter1>&, const __wrap_iter<_Iter2>&) _NOEXCEPT;
1367
#endif
1368
1369
template <class _Iter>
1370
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG
1371
__wrap_iter<_Iter>
1372
operator+(typename __wrap_iter<_Iter>::difference_type, __wrap_iter<_Iter>) _NOEXCEPT;
1373
1374
template <class _Ip, class _Op> _Op _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 copy(_Ip, _Ip, _Op);
1375
template <class _B1, class _B2> _B2 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 copy_backward(_B1, _B1, _B2);
1376
template <class _Ip, class _Op> _Op _LIBCPP_INLINE_VISIBILITY move(_Ip, _Ip, _Op);
1377
template <class _B1, class _B2> _B2 _LIBCPP_INLINE_VISIBILITY move_backward(_B1, _B1, _B2);
1378
1379
#if _LIBCPP_DEBUG_LEVEL < 2
1380
1381
template <class _Tp>
1382
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG
1383
typename enable_if
1384
<
1385
    is_trivially_copy_assignable<_Tp>::value,
1386
    _Tp*
1387
>::type
1388
__unwrap_iter(__wrap_iter<_Tp*>);
1389
1390
#else
1391
1392
template <class _Tp>
1393
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG
1394
typename enable_if
1395
<
1396
    is_trivially_copy_assignable<_Tp>::value,
1397
    __wrap_iter<_Tp*>
1398
>::type
1399
__unwrap_iter(__wrap_iter<_Tp*> __i);
1400
1401
#endif
1402
1403
template <class _Iter>
1404
class __wrap_iter
1405
{
1406
public:
1407
    typedef _Iter                                                      iterator_type;
1408
    typedef typename iterator_traits<iterator_type>::iterator_category iterator_category;
1409
    typedef typename iterator_traits<iterator_type>::value_type        value_type;
1410
    typedef typename iterator_traits<iterator_type>::difference_type   difference_type;
1411
    typedef typename iterator_traits<iterator_type>::pointer           pointer;
1412
    typedef typename iterator_traits<iterator_type>::reference         reference;
1413
private:
1414
    iterator_type __i;
1415
public:
1416
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG __wrap_iter() _NOEXCEPT
1417
#if _LIBCPP_STD_VER > 11
1418
                : __i{}
1419
#endif
1420
    {
1421
#if _LIBCPP_DEBUG_LEVEL >= 2
1422
        __get_db()->__insert_i(this);
1423
#endif
1424
    }
1425
    template <class _Up> _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG
1426
        __wrap_iter(const __wrap_iter<_Up>& __u,
1427
            typename enable_if<is_convertible<_Up, iterator_type>::value>::type* = 0) _NOEXCEPT
1428
            : __i(__u.base())
1429
1.93M
    {
1430
#if _LIBCPP_DEBUG_LEVEL >= 2
1431
        __get_db()->__iterator_copy(this, &__u);
1432
#endif
1433
1.93M
    }
std::__1::__wrap_iter<char const*>::__wrap_iter<char*>(std::__1::__wrap_iter<char*> const&, std::__1::enable_if<is_convertible<char*, char const*>::value, void>::type*)
Line
Count
Source
1429
1.93M
    {
1430
#if _LIBCPP_DEBUG_LEVEL >= 2
1431
        __get_db()->__iterator_copy(this, &__u);
1432
#endif
1433
1.93M
    }
Unexecuted instantiation: std::__1::__wrap_iter<wchar_t const*>::__wrap_iter<wchar_t*>(std::__1::__wrap_iter<wchar_t*> const&, std::__1::enable_if<is_convertible<wchar_t*, wchar_t const*>::value, void>::type*)
1434
#if _LIBCPP_DEBUG_LEVEL >= 2
1435
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG
1436
    __wrap_iter(const __wrap_iter& __x)
1437
        : __i(__x.base())
1438
    {
1439
        __get_db()->__iterator_copy(this, &__x);
1440
    }
1441
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG
1442
    __wrap_iter& operator=(const __wrap_iter& __x)
1443
    {
1444
        if (this != &__x)
1445
        {
1446
            __get_db()->__iterator_copy(this, &__x);
1447
            __i = __x.__i;
1448
        }
1449
        return *this;
1450
    }
1451
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG
1452
    ~__wrap_iter()
1453
    {
1454
        __get_db()->__erase_i(this);
1455
    }
1456
#endif
1457
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG reference operator*() const _NOEXCEPT
1458
3.75G
    {
1459
#if _LIBCPP_DEBUG_LEVEL >= 2
1460
        _LIBCPP_ASSERT(__get_const_db()->__dereferenceable(this),
1461
                       "Attempted to dereference a non-dereferenceable iterator");
1462
#endif
1463
3.75G
        return *__i;
1464
3.75G
    }
std::__1::__wrap_iter<char*>::operator*() const
Line
Count
Source
1458
17.7M
    {
1459
#if _LIBCPP_DEBUG_LEVEL >= 2
1460
        _LIBCPP_ASSERT(__get_const_db()->__dereferenceable(this),
1461
                       "Attempted to dereference a non-dereferenceable iterator");
1462
#endif
1463
17.7M
        return *__i;
1464
17.7M
    }
Unexecuted instantiation: std::__1::__wrap_iter<wchar_t*>::operator*() const
std::__1::__wrap_iter<char const*>::operator*() const
Line
Count
Source
1458
3.74G
    {
1459
#if _LIBCPP_DEBUG_LEVEL >= 2
1460
        _LIBCPP_ASSERT(__get_const_db()->__dereferenceable(this),
1461
                       "Attempted to dereference a non-dereferenceable iterator");
1462
#endif
1463
3.74G
        return *__i;
1464
3.74G
    }
std::__1::__wrap_iter<wchar_t const*>::operator*() const
Line
Count
Source
1458
49
    {
1459
#if _LIBCPP_DEBUG_LEVEL >= 2
1460
        _LIBCPP_ASSERT(__get_const_db()->__dereferenceable(this),
1461
                       "Attempted to dereference a non-dereferenceable iterator");
1462
#endif
1463
49
        return *__i;
1464
49
    }
Unexecuted instantiation: std::__1::__wrap_iter<double*>::operator*() const
Unexecuted instantiation: std::__1::__wrap_iter<std::__1::__assoc_sub_state**>::operator*() const
Unexecuted instantiation: std::__1::__wrap_iter<std::__1::pair<std::__1::basic_string_view<char, std::__1::char_traits<char> >, std::__1::__fs::filesystem::PathPartKind>*>::operator*() const
Unexecuted instantiation: std::__1::__wrap_iter<std::__1::basic_string_view<char, std::__1::char_traits<char> >*>::operator*() const
1465
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG pointer  operator->() const _NOEXCEPT
1466
0
    {
1467
#if _LIBCPP_DEBUG_LEVEL >= 2
1468
        _LIBCPP_ASSERT(__get_const_db()->__dereferenceable(this),
1469
                       "Attempted to dereference a non-dereferenceable iterator");
1470
#endif
1471
0
        return (pointer)_VSTD::addressof(*__i);
1472
0
    }
1473
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG __wrap_iter& operator++() _NOEXCEPT
1474
1.27G
    {
1475
#if _LIBCPP_DEBUG_LEVEL >= 2
1476
        _LIBCPP_ASSERT(__get_const_db()->__dereferenceable(this),
1477
                       "Attempted to increment non-incrementable iterator");
1478
#endif
1479
1.27G
        ++__i;
1480
1.27G
        return *this;
1481
1.27G
    }
std::__1::__wrap_iter<char*>::operator++()
Line
Count
Source
1474
16.9M
    {
1475
#if _LIBCPP_DEBUG_LEVEL >= 2
1476
        _LIBCPP_ASSERT(__get_const_db()->__dereferenceable(this),
1477
                       "Attempted to increment non-incrementable iterator");
1478
#endif
1479
16.9M
        ++__i;
1480
16.9M
        return *this;
1481
16.9M
    }
Unexecuted instantiation: std::__1::__wrap_iter<wchar_t*>::operator++()
std::__1::__wrap_iter<char const*>::operator++()
Line
Count
Source
1474
1.26G
    {
1475
#if _LIBCPP_DEBUG_LEVEL >= 2
1476
        _LIBCPP_ASSERT(__get_const_db()->__dereferenceable(this),
1477
                       "Attempted to increment non-incrementable iterator");
1478
#endif
1479
1.26G
        ++__i;
1480
1.26G
        return *this;
1481
1.26G
    }
std::__1::__wrap_iter<wchar_t const*>::operator++()
Line
Count
Source
1474
48
    {
1475
#if _LIBCPP_DEBUG_LEVEL >= 2
1476
        _LIBCPP_ASSERT(__get_const_db()->__dereferenceable(this),
1477
                       "Attempted to increment non-incrementable iterator");
1478
#endif
1479
48
        ++__i;
1480
48
        return *this;
1481
48
    }
Unexecuted instantiation: std::__1::__wrap_iter<double*>::operator++()
Unexecuted instantiation: std::__1::__wrap_iter<std::__1::pair<std::__1::condition_variable*, std::__1::mutex*>*>::operator++()
Unexecuted instantiation: std::__1::__wrap_iter<std::__1::__assoc_sub_state**>::operator++()
Unexecuted instantiation: std::__1::__wrap_iter<std::__1::pair<std::__1::basic_string_view<char, std::__1::char_traits<char> >, std::__1::__fs::filesystem::PathPartKind>*>::operator++()
1482
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG __wrap_iter  operator++(int) _NOEXCEPT
1483
        {__wrap_iter __tmp(*this); ++(*this); return __tmp;}
1484
1485
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG __wrap_iter& operator--() _NOEXCEPT
1486
663k
    {
1487
#if _LIBCPP_DEBUG_LEVEL >= 2
1488
        _LIBCPP_ASSERT(__get_const_db()->__decrementable(this),
1489
                       "Attempted to decrement non-decrementable iterator");
1490
#endif
1491
663k
        --__i;
1492
663k
        return *this;
1493
663k
    }
std::__1::__wrap_iter<char*>::operator--()
Line
Count
Source
1486
663k
    {
1487
#if _LIBCPP_DEBUG_LEVEL >= 2
1488
        _LIBCPP_ASSERT(__get_const_db()->__decrementable(this),
1489
                       "Attempted to decrement non-decrementable iterator");
1490
#endif
1491
663k
        --__i;
1492
663k
        return *this;
1493
663k
    }
Unexecuted instantiation: std::__1::__wrap_iter<wchar_t*>::operator--()
Unexecuted instantiation: std::__1::__wrap_iter<std::__1::basic_string_view<char, std::__1::char_traits<char> >*>::operator--()
1494
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG __wrap_iter  operator--(int) _NOEXCEPT
1495
        {__wrap_iter __tmp(*this); --(*this); return __tmp;}
1496
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG __wrap_iter  operator+ (difference_type __n) const _NOEXCEPT
1497
4.31M
        {__wrap_iter __w(*this); __w += __n; return __w;}
std::__1::__wrap_iter<char*>::operator+(long) const
Line
Count
Source
1497
4.31M
        {__wrap_iter __w(*this); __w += __n; return __w;}
Unexecuted instantiation: std::__1::__wrap_iter<wchar_t*>::operator+(long) const
std::__1::__wrap_iter<char const*>::operator+(long) const
Line
Count
Source
1497
367
        {__wrap_iter __w(*this); __w += __n; return __w;}
Unexecuted instantiation: std::__1::__wrap_iter<wchar_t const*>::operator+(long) const
Unexecuted instantiation: std::__1::__wrap_iter<double*>::operator+(long) const
1498
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG __wrap_iter& operator+=(difference_type __n) _NOEXCEPT
1499
4.31M
    {
1500
#if _LIBCPP_DEBUG_LEVEL >= 2
1501
        _LIBCPP_ASSERT(__get_const_db()->__addable(this, __n),
1502
                   "Attempted to add/subtract iterator outside of valid range");
1503
#endif
1504
4.31M
        __i += __n;
1505
4.31M
        return *this;
1506
4.31M
    }
std::__1::__wrap_iter<char*>::operator+=(long)
Line
Count
Source
1499
4.31M
    {
1500
#if _LIBCPP_DEBUG_LEVEL >= 2
1501
        _LIBCPP_ASSERT(__get_const_db()->__addable(this, __n),
1502
                   "Attempted to add/subtract iterator outside of valid range");
1503
#endif
1504
4.31M
        __i += __n;
1505
4.31M
        return *this;
1506
4.31M
    }
Unexecuted instantiation: std::__1::__wrap_iter<wchar_t*>::operator+=(long)
std::__1::__wrap_iter<char const*>::operator+=(long)
Line
Count
Source
1499
367
    {
1500
#if _LIBCPP_DEBUG_LEVEL >= 2
1501
        _LIBCPP_ASSERT(__get_const_db()->__addable(this, __n),
1502
                   "Attempted to add/subtract iterator outside of valid range");
1503
#endif
1504
367
        __i += __n;
1505
367
        return *this;
1506
367
    }
Unexecuted instantiation: std::__1::__wrap_iter<wchar_t const*>::operator+=(long)
Unexecuted instantiation: std::__1::__wrap_iter<double*>::operator+=(long)
1507
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG __wrap_iter  operator- (difference_type __n) const _NOEXCEPT
1508
1.20M
        {return *this + (-__n);}
std::__1::__wrap_iter<char*>::operator-(long) const
Line
Count
Source
1508
1.20M
        {return *this + (-__n);}
Unexecuted instantiation: std::__1::__wrap_iter<wchar_t*>::operator-(long) const
Unexecuted instantiation: std::__1::__wrap_iter<double*>::operator-(long) const
1509
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG __wrap_iter& operator-=(difference_type __n) _NOEXCEPT
1510
        {*this += -__n; return *this;}
1511
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG reference    operator[](difference_type __n) const _NOEXCEPT
1512
    {
1513
#if _LIBCPP_DEBUG_LEVEL >= 2
1514
        _LIBCPP_ASSERT(__get_const_db()->__subscriptable(this, __n),
1515
                   "Attempted to subscript iterator outside of valid range");
1516
#endif
1517
        return __i[__n];
1518
    }
1519
1520
2.54G
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG iterator_type base() const _NOEXCEPT {return __i;}
std::__1::__wrap_iter<char*>::base() const
Line
Count
Source
1520
1.27G
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG iterator_type base() const _NOEXCEPT {return __i;}
Unexecuted instantiation: std::__1::__wrap_iter<wchar_t*>::base() const
std::__1::__wrap_iter<char const*>::base() const
Line
Count
Source
1520
1.27G
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG iterator_type base() const _NOEXCEPT {return __i;}
std::__1::__wrap_iter<wchar_t const*>::base() const
Line
Count
Source
1520
124
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG iterator_type base() const _NOEXCEPT {return __i;}
Unexecuted instantiation: std::__1::__wrap_iter<double*>::base() const
std::__1::__wrap_iter<std::__1::pair<std::__1::condition_variable*, std::__1::mutex*>*>::base() const
Line
Count
Source
1520
92
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG iterator_type base() const _NOEXCEPT {return __i;}
std::__1::__wrap_iter<std::__1::__assoc_sub_state**>::base() const
Line
Count
Source
1520
92
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG iterator_type base() const _NOEXCEPT {return __i;}
Unexecuted instantiation: std::__1::__wrap_iter<std::__1::pair<std::__1::basic_string_view<char, std::__1::char_traits<char> >, std::__1::__fs::filesystem::PathPartKind>*>::base() const
Unexecuted instantiation: std::__1::__wrap_iter<std::__1::basic_string_view<char, std::__1::char_traits<char> >*>::base() const
1521
1522
private:
1523
#if _LIBCPP_DEBUG_LEVEL >= 2
1524
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG __wrap_iter(const void* __p, iterator_type __x) : __i(__x)
1525
    {
1526
        __get_db()->__insert_ic(this, __p);
1527
    }
1528
#else
1529
1.25G
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG __wrap_iter(iterator_type __x) _NOEXCEPT : __i(__x) {}
std::__1::__wrap_iter<char*>::__wrap_iter(char*)
Line
Count
Source
1529
1.25G
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG __wrap_iter(iterator_type __x) _NOEXCEPT : __i(__x) {}
Unexecuted instantiation: std::__1::__wrap_iter<wchar_t*>::__wrap_iter(wchar_t*)
std::__1::__wrap_iter<char const*>::__wrap_iter(char const*)
Line
Count
Source
1529
2.23M
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG __wrap_iter(iterator_type __x) _NOEXCEPT : __i(__x) {}
std::__1::__wrap_iter<wchar_t const*>::__wrap_iter(wchar_t const*)
Line
Count
Source
1529
16
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG __wrap_iter(iterator_type __x) _NOEXCEPT : __i(__x) {}
std::__1::__wrap_iter<std::__1::pair<std::__1::condition_variable*, std::__1::mutex*>*>::__wrap_iter(std::__1::pair<std::__1::condition_variable*, std::__1::mutex*>*)
Line
Count
Source
1529
92
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG __wrap_iter(iterator_type __x) _NOEXCEPT : __i(__x) {}
std::__1::__wrap_iter<std::__1::__assoc_sub_state**>::__wrap_iter(std::__1::__assoc_sub_state**)
Line
Count
Source
1529
92
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG __wrap_iter(iterator_type __x) _NOEXCEPT : __i(__x) {}
Unexecuted instantiation: std::__1::__wrap_iter<std::__1::basic_string_view<char, std::__1::char_traits<char> >*>::__wrap_iter(std::__1::basic_string_view<char, std::__1::char_traits<char> >*)
Unexecuted instantiation: std::__1::__wrap_iter<std::__1::pair<std::__1::basic_string_view<char, std::__1::char_traits<char> >, std::__1::__fs::filesystem::PathPartKind>*>::__wrap_iter(std::__1::pair<std::__1::basic_string_view<char, std::__1::char_traits<char> >, std::__1::__fs::filesystem::PathPartKind>*)
1530
#endif
1531
1532
    template <class _Up> friend class __wrap_iter;
1533
    template <class _CharT, class _Traits, class _Alloc> friend class basic_string;
1534
    template <class _Tp, class _Alloc> friend class _LIBCPP_TEMPLATE_VIS vector;
1535
    template <class _Tp, size_t> friend class _LIBCPP_TEMPLATE_VIS span;
1536
1537
    template <class _Iter1, class _Iter2>
1538
    _LIBCPP_CONSTEXPR_IF_NODEBUG friend
1539
    bool
1540
    operator==(const __wrap_iter<_Iter1>&, const __wrap_iter<_Iter2>&) _NOEXCEPT;
1541
1542
    template <class _Iter1, class _Iter2>
1543
    _LIBCPP_CONSTEXPR_IF_NODEBUG friend
1544
    bool
1545
    operator<(const __wrap_iter<_Iter1>&, const __wrap_iter<_Iter2>&) _NOEXCEPT;
1546
1547
    template <class _Iter1, class _Iter2>
1548
    _LIBCPP_CONSTEXPR_IF_NODEBUG friend
1549
    bool
1550
    operator!=(const __wrap_iter<_Iter1>&, const __wrap_iter<_Iter2>&) _NOEXCEPT;
1551
1552
    template <class _Iter1, class _Iter2>
1553
    _LIBCPP_CONSTEXPR_IF_NODEBUG friend
1554
    bool
1555
    operator>(const __wrap_iter<_Iter1>&, const __wrap_iter<_Iter2>&) _NOEXCEPT;
1556
1557
    template <class _Iter1, class _Iter2>
1558
    _LIBCPP_CONSTEXPR_IF_NODEBUG friend
1559
    bool
1560
    operator>=(const __wrap_iter<_Iter1>&, const __wrap_iter<_Iter2>&) _NOEXCEPT;
1561
1562
    template <class _Iter1, class _Iter2>
1563
    _LIBCPP_CONSTEXPR_IF_NODEBUG friend
1564
    bool
1565
    operator<=(const __wrap_iter<_Iter1>&, const __wrap_iter<_Iter2>&) _NOEXCEPT;
1566
1567
#ifndef _LIBCPP_CXX03_LANG
1568
    template <class _Iter1, class _Iter2>
1569
    _LIBCPP_CONSTEXPR_IF_NODEBUG friend
1570
    auto
1571
    operator-(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT
1572
    -> decltype(__x.base() - __y.base());
1573
#else
1574
    template <class _Iter1, class _Iter2>
1575
    _LIBCPP_CONSTEXPR_IF_NODEBUG friend
1576
    typename __wrap_iter<_Iter1>::difference_type
1577
    operator-(const __wrap_iter<_Iter1>&, const __wrap_iter<_Iter2>&) _NOEXCEPT;
1578
#endif
1579
1580
    template <class _Iter1>
1581
    _LIBCPP_CONSTEXPR_IF_NODEBUG friend
1582
    __wrap_iter<_Iter1>
1583
    operator+(typename __wrap_iter<_Iter1>::difference_type, __wrap_iter<_Iter1>) _NOEXCEPT;
1584
1585
    template <class _Ip, class _Op> friend _LIBCPP_CONSTEXPR_AFTER_CXX17 _Op copy(_Ip, _Ip, _Op);
1586
    template <class _B1, class _B2> friend _LIBCPP_CONSTEXPR_AFTER_CXX17 _B2 copy_backward(_B1, _B1, _B2);
1587
    template <class _Ip, class _Op> friend _Op move(_Ip, _Ip, _Op);
1588
    template <class _B1, class _B2> friend _B2 move_backward(_B1, _B1, _B2);
1589
1590
#if _LIBCPP_DEBUG_LEVEL < 2
1591
    template <class _Tp>
1592
    _LIBCPP_CONSTEXPR_IF_NODEBUG friend
1593
    typename enable_if
1594
    <
1595
        is_trivially_copy_assignable<_Tp>::value,
1596
        _Tp*
1597
    >::type
1598
    __unwrap_iter(__wrap_iter<_Tp*>);
1599
#else
1600
  template <class _Tp>
1601
  inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG
1602
  typename enable_if
1603
  <
1604
      is_trivially_copy_assignable<_Tp>::value,
1605
      __wrap_iter<_Tp*>
1606
  >::type
1607
  __unwrap_iter(__wrap_iter<_Tp*> __i);
1608
#endif
1609
};
1610
1611
template <class _Iter1, class _Iter2>
1612
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG
1613
bool
1614
operator==(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT
1615
1.25G
{
1616
1.25G
    return __x.base() == __y.base();
1617
1.25G
}
bool std::__1::operator==<char*, char*>(std::__1::__wrap_iter<char*> const&, std::__1::__wrap_iter<char*> const&)
Line
Count
Source
1615
15.1M
{
1616
15.1M
    return __x.base() == __y.base();
1617
15.1M
}
Unexecuted instantiation: bool std::__1::operator==<wchar_t*, wchar_t*>(std::__1::__wrap_iter<wchar_t*> const&, std::__1::__wrap_iter<wchar_t*> const&)
bool std::__1::operator==<char const*, char*>(std::__1::__wrap_iter<char const*> const&, std::__1::__wrap_iter<char*> const&)
Line
Count
Source
1615
1.24G
{
1616
1.24G
    return __x.base() == __y.base();
1617
1.24G
}
Unexecuted instantiation: bool std::__1::operator==<wchar_t const*, wchar_t*>(std::__1::__wrap_iter<wchar_t const*> const&, std::__1::__wrap_iter<wchar_t*> const&)
bool std::__1::operator==<std::__1::pair<std::__1::condition_variable*, std::__1::mutex*>*, std::__1::pair<std::__1::condition_variable*, std::__1::mutex*>*>(std::__1::__wrap_iter<std::__1::pair<std::__1::condition_variable*, std::__1::mutex*>*> const&, std::__1::__wrap_iter<std::__1::pair<std::__1::condition_variable*, std::__1::mutex*>*> const&)
Line
Count
Source
1615
46
{
1616
46
    return __x.base() == __y.base();
1617
46
}
bool std::__1::operator==<std::__1::__assoc_sub_state**, std::__1::__assoc_sub_state**>(std::__1::__wrap_iter<std::__1::__assoc_sub_state**> const&, std::__1::__wrap_iter<std::__1::__assoc_sub_state**> const&)
Line
Count
Source
1615
46
{
1616
46
    return __x.base() == __y.base();
1617
46
}
Unexecuted instantiation: bool std::__1::operator==<std::__1::pair<std::__1::basic_string_view<char, std::__1::char_traits<char> >, std::__1::__fs::filesystem::PathPartKind>*, std::__1::pair<std::__1::basic_string_view<char, std::__1::char_traits<char> >, std::__1::__fs::filesystem::PathPartKind>*>(std::__1::__wrap_iter<std::__1::pair<std::__1::basic_string_view<char, std::__1::char_traits<char> >, std::__1::__fs::filesystem::PathPartKind>*> const&, std::__1::__wrap_iter<std::__1::pair<std::__1::basic_string_view<char, std::__1::char_traits<char> >, std::__1::__fs::filesystem::PathPartKind>*> const&)
Unexecuted instantiation: bool std::__1::operator==<std::__1::basic_string_view<char, std::__1::char_traits<char> >*, std::__1::basic_string_view<char, std::__1::char_traits<char> >*>(std::__1::__wrap_iter<std::__1::basic_string_view<char, std::__1::char_traits<char> >*> const&, std::__1::__wrap_iter<std::__1::basic_string_view<char, std::__1::char_traits<char> >*> const&)
1618
1619
template <class _Iter1, class _Iter2>
1620
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG
1621
bool
1622
operator<(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT
1623
0
{
1624
0
#if _LIBCPP_DEBUG_LEVEL >= 2
1625
0
    _LIBCPP_ASSERT(__get_const_db()->__less_than_comparable(&__x, &__y),
1626
0
                   "Attempted to compare incomparable iterators");
1627
0
#endif
1628
0
    return __x.base() < __y.base();
1629
0
}
1630
1631
template <class _Iter1, class _Iter2>
1632
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG
1633
bool
1634
operator!=(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT
1635
1.24G
{
1636
1.24G
    return !(__x == __y);
1637
1.24G
}
bool std::__1::operator!=<char const*, char*>(std::__1::__wrap_iter<char const*> const&, std::__1::__wrap_iter<char*> const&)
Line
Count
Source
1635
1.24G
{
1636
1.24G
    return !(__x == __y);
1637
1.24G
}
Unexecuted instantiation: bool std::__1::operator!=<wchar_t const*, wchar_t*>(std::__1::__wrap_iter<wchar_t const*> const&, std::__1::__wrap_iter<wchar_t*> const&)
1638
1639
template <class _Iter1, class _Iter2>
1640
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG
1641
bool
1642
operator>(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT
1643
{
1644
    return __y < __x;
1645
}
1646
1647
template <class _Iter1, class _Iter2>
1648
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG
1649
bool
1650
operator>=(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT
1651
{
1652
    return !(__x < __y);
1653
}
1654
1655
template <class _Iter1, class _Iter2>
1656
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG
1657
bool
1658
operator<=(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT
1659
{
1660
    return !(__y < __x);
1661
}
1662
1663
template <class _Iter1>
1664
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG
1665
bool
1666
operator!=(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter1>& __y) _NOEXCEPT
1667
15.1M
{
1668
15.1M
    return !(__x == __y);
1669
15.1M
}
bool std::__1::operator!=<char*>(std::__1::__wrap_iter<char*> const&, std::__1::__wrap_iter<char*> const&)
Line
Count
Source
1667
15.1M
{
1668
15.1M
    return !(__x == __y);
1669
15.1M
}
Unexecuted instantiation: bool std::__1::operator!=<wchar_t*>(std::__1::__wrap_iter<wchar_t*> const&, std::__1::__wrap_iter<wchar_t*> const&)
bool std::__1::operator!=<std::__1::pair<std::__1::condition_variable*, std::__1::mutex*>*>(std::__1::__wrap_iter<std::__1::pair<std::__1::condition_variable*, std::__1::mutex*>*> const&, std::__1::__wrap_iter<std::__1::pair<std::__1::condition_variable*, std::__1::mutex*>*> const&)
Line
Count
Source
1667
46
{
1668
46
    return !(__x == __y);
1669
46
}
bool std::__1::operator!=<std::__1::__assoc_sub_state**>(std::__1::__wrap_iter<std::__1::__assoc_sub_state**> const&, std::__1::__wrap_iter<std::__1::__assoc_sub_state**> const&)
Line
Count
Source
1667
46
{
1668
46
    return !(__x == __y);
1669
46
}
Unexecuted instantiation: bool std::__1::operator!=<std::__1::pair<std::__1::basic_string_view<char, std::__1::char_traits<char> >, std::__1::__fs::filesystem::PathPartKind>*>(std::__1::__wrap_iter<std::__1::pair<std::__1::basic_string_view<char, std::__1::char_traits<char> >, std::__1::__fs::filesystem::PathPartKind>*> const&, std::__1::__wrap_iter<std::__1::pair<std::__1::basic_string_view<char, std::__1::char_traits<char> >, std::__1::__fs::filesystem::PathPartKind>*> const&)
Unexecuted instantiation: bool std::__1::operator!=<std::__1::basic_string_view<char, std::__1::char_traits<char> >*>(std::__1::__wrap_iter<std::__1::basic_string_view<char, std::__1::char_traits<char> >*> const&, std::__1::__wrap_iter<std::__1::basic_string_view<char, std::__1::char_traits<char> >*> const&)
1670
1671
template <class _Iter1>
1672
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG
1673
bool
1674
operator>(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter1>& __y) _NOEXCEPT
1675
{
1676
    return __y < __x;
1677
}
1678
1679
template <class _Iter1>
1680
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG
1681
bool
1682
operator>=(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter1>& __y) _NOEXCEPT
1683
{
1684
    return !(__x < __y);
1685
}
1686
1687
template <class _Iter1>
1688
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG
1689
bool
1690
operator<=(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter1>& __y) _NOEXCEPT
1691
{
1692
    return !(__y < __x);
1693
}
1694
1695
#ifndef _LIBCPP_CXX03_LANG
1696
template <class _Iter1, class _Iter2>
1697
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG
1698
auto
1699
operator-(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT
1700
-> decltype(__x.base() - __y.base())
1701
2.00M
{
1702
#if _LIBCPP_DEBUG_LEVEL >= 2
1703
    _LIBCPP_ASSERT(__get_const_db()->__less_than_comparable(&__x, &__y),
1704
                   "Attempted to subtract incompatible iterators");
1705
#endif
1706
2.00M
    return __x.base() - __y.base();
1707
2.00M
}
decltype((fp.base()) - (fp0.base())) std::__1::operator-<char const*, char*>(std::__1::__wrap_iter<char const*> const&, std::__1::__wrap_iter<char*> const&)
Line
Count
Source
1701
1.27M
{
1702
#if _LIBCPP_DEBUG_LEVEL >= 2
1703
    _LIBCPP_ASSERT(__get_const_db()->__less_than_comparable(&__x, &__y),
1704
                   "Attempted to subtract incompatible iterators");
1705
#endif
1706
1.27M
    return __x.base() - __y.base();
1707
1.27M
}
Unexecuted instantiation: decltype((fp.base()) - (fp0.base())) std::__1::operator-<wchar_t const*, wchar_t*>(std::__1::__wrap_iter<wchar_t const*> const&, std::__1::__wrap_iter<wchar_t*> const&)
decltype((fp.base()) - (fp0.base())) std::__1::operator-<char*, char*>(std::__1::__wrap_iter<char*> const&, std::__1::__wrap_iter<char*> const&)
Line
Count
Source
1701
737k
{
1702
#if _LIBCPP_DEBUG_LEVEL >= 2
1703
    _LIBCPP_ASSERT(__get_const_db()->__less_than_comparable(&__x, &__y),
1704
                   "Attempted to subtract incompatible iterators");
1705
#endif
1706
737k
    return __x.base() - __y.base();
1707
737k
}
Unexecuted instantiation: decltype((fp.base()) - (fp0.base())) std::__1::operator-<wchar_t*, wchar_t*>(std::__1::__wrap_iter<wchar_t*> const&, std::__1::__wrap_iter<wchar_t*> const&)
1708
#else
1709
template <class _Iter1, class _Iter2>
1710
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG
1711
typename __wrap_iter<_Iter1>::difference_type
1712
operator-(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT
1713
{
1714
#if _LIBCPP_DEBUG_LEVEL >= 2
1715
    _LIBCPP_ASSERT(__get_const_db()->__less_than_comparable(&__x, &__y),
1716
                   "Attempted to subtract incompatible iterators");
1717
#endif
1718
    return __x.base() - __y.base();
1719
}
1720
#endif
1721
1722
template <class _Iter>
1723
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG
1724
__wrap_iter<_Iter>
1725
operator+(typename __wrap_iter<_Iter>::difference_type __n,
1726
          __wrap_iter<_Iter> __x) _NOEXCEPT
1727
{
1728
    __x += __n;
1729
    return __x;
1730
}
1731
1732
template <class _Iter>
1733
struct __libcpp_is_trivial_iterator
1734
    : public _LIBCPP_BOOL_CONSTANT(is_pointer<_Iter>::value) {};
1735
1736
template <class _Iter>
1737
struct __libcpp_is_trivial_iterator<move_iterator<_Iter> >
1738
    : public _LIBCPP_BOOL_CONSTANT(__libcpp_is_trivial_iterator<_Iter>::value) {};
1739
1740
template <class _Iter>
1741
struct __libcpp_is_trivial_iterator<reverse_iterator<_Iter> >
1742
    : public _LIBCPP_BOOL_CONSTANT(__libcpp_is_trivial_iterator<_Iter>::value) {};
1743
1744
template <class _Iter>
1745
struct __libcpp_is_trivial_iterator<__wrap_iter<_Iter> >
1746
    : public _LIBCPP_BOOL_CONSTANT(__libcpp_is_trivial_iterator<_Iter>::value) {};
1747
1748
1749
template <class _Tp, size_t _Np>
1750
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
1751
_Tp*
1752
begin(_Tp (&__array)[_Np])
1753
0
{
1754
0
    return __array;
1755
0
}
Unexecuted instantiation: regex.cpp:std::__1::(anonymous namespace)::collationnames const* std::__1::begin<std::__1::(anonymous namespace)::collationnames const, 111ul>(std::__1::(anonymous namespace)::collationnames const (&) [111ul])
Unexecuted instantiation: regex.cpp:std::__1::(anonymous namespace)::classnames const* std::__1::begin<std::__1::(anonymous namespace)::classnames const, 15ul>(std::__1::(anonymous namespace)::classnames const (&) [15ul])
1756
1757
template <class _Tp, size_t _Np>
1758
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
1759
_Tp*
1760
end(_Tp (&__array)[_Np])
1761
0
{
1762
0
    return __array + _Np;
1763
0
}
Unexecuted instantiation: char* std::__1::end<char, 10ul>(char (&) [10ul])
Unexecuted instantiation: wchar_t* std::__1::end<wchar_t, 10ul>(wchar_t (&) [10ul])
Unexecuted instantiation: regex.cpp:std::__1::(anonymous namespace)::collationnames const* std::__1::end<std::__1::(anonymous namespace)::collationnames const, 111ul>(std::__1::(anonymous namespace)::collationnames const (&) [111ul])
Unexecuted instantiation: regex.cpp:std::__1::(anonymous namespace)::classnames const* std::__1::end<std::__1::(anonymous namespace)::classnames const, 15ul>(std::__1::(anonymous namespace)::classnames const (&) [15ul])
1764
1765
#if !defined(_LIBCPP_CXX03_LANG)
1766
1767
template <class _Cp>
1768
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
1769
auto
1770
begin(_Cp& __c) -> decltype(__c.begin())
1771
{
1772
    return __c.begin();
1773
}
1774
1775
template <class _Cp>
1776
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
1777
auto
1778
begin(const _Cp& __c) -> decltype(__c.begin())
1779
{
1780
    return __c.begin();
1781
}
1782
1783
template <class _Cp>
1784
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
1785
auto
1786
end(_Cp& __c) -> decltype(__c.end())
1787
{
1788
    return __c.end();
1789
}
1790
1791
template <class _Cp>
1792
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
1793
auto
1794
end(const _Cp& __c) -> decltype(__c.end())
1795
{
1796
    return __c.end();
1797
}
1798
1799
#if _LIBCPP_STD_VER > 11
1800
1801
template <class _Tp, size_t _Np>
1802
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
1803
reverse_iterator<_Tp*> rbegin(_Tp (&__array)[_Np])
1804
{
1805
    return reverse_iterator<_Tp*>(__array + _Np);
1806
}
1807
1808
template <class _Tp, size_t _Np>
1809
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
1810
reverse_iterator<_Tp*> rend(_Tp (&__array)[_Np])
1811
{
1812
    return reverse_iterator<_Tp*>(__array);
1813
}
1814
1815
template <class _Ep>
1816
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
1817
reverse_iterator<const _Ep*> rbegin(initializer_list<_Ep> __il)
1818
{
1819
    return reverse_iterator<const _Ep*>(__il.end());
1820
}
1821
1822
template <class _Ep>
1823
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
1824
reverse_iterator<const _Ep*> rend(initializer_list<_Ep> __il)
1825
{
1826
    return reverse_iterator<const _Ep*>(__il.begin());
1827
}
1828
1829
template <class _Cp>
1830
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
1831
auto cbegin(const _Cp& __c) -> decltype(_VSTD::begin(__c))
1832
{
1833
    return _VSTD::begin(__c);
1834
}
1835
1836
template <class _Cp>
1837
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
1838
auto cend(const _Cp& __c) -> decltype(_VSTD::end(__c))
1839
{
1840
    return _VSTD::end(__c);
1841
}
1842
1843
template <class _Cp>
1844
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
1845
auto rbegin(_Cp& __c) -> decltype(__c.rbegin())
1846
{
1847
    return __c.rbegin();
1848
}
1849
1850
template <class _Cp>
1851
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
1852
auto rbegin(const _Cp& __c) -> decltype(__c.rbegin())
1853
{
1854
    return __c.rbegin();
1855
}
1856
1857
template <class _Cp>
1858
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
1859
auto rend(_Cp& __c) -> decltype(__c.rend())
1860
{
1861
    return __c.rend();
1862
}
1863
1864
template <class _Cp>
1865
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
1866
auto rend(const _Cp& __c) -> decltype(__c.rend())
1867
{
1868
    return __c.rend();
1869
}
1870
1871
template <class _Cp>
1872
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
1873
auto crbegin(const _Cp& __c) -> decltype(_VSTD::rbegin(__c))
1874
{
1875
    return _VSTD::rbegin(__c);
1876
}
1877
1878
template <class _Cp>
1879
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
1880
auto crend(const _Cp& __c) -> decltype(_VSTD::rend(__c))
1881
{
1882
    return _VSTD::rend(__c);
1883
}
1884
1885
#endif
1886
1887
1888
#else  // defined(_LIBCPP_CXX03_LANG)
1889
1890
template <class _Cp>
1891
_LIBCPP_INLINE_VISIBILITY
1892
typename _Cp::iterator
1893
begin(_Cp& __c)
1894
{
1895
    return __c.begin();
1896
}
1897
1898
template <class _Cp>
1899
_LIBCPP_INLINE_VISIBILITY
1900
typename _Cp::const_iterator
1901
begin(const _Cp& __c)
1902
{
1903
    return __c.begin();
1904
}
1905
1906
template <class _Cp>
1907
_LIBCPP_INLINE_VISIBILITY
1908
typename _Cp::iterator
1909
end(_Cp& __c)
1910
{
1911
    return __c.end();
1912
}
1913
1914
template <class _Cp>
1915
_LIBCPP_INLINE_VISIBILITY
1916
typename _Cp::const_iterator
1917
end(const _Cp& __c)
1918
{
1919
    return __c.end();
1920
}
1921
1922
#endif  // !defined(_LIBCPP_CXX03_LANG)
1923
1924
#if _LIBCPP_STD_VER > 14
1925
1926
// #if _LIBCPP_STD_VER > 11
1927
// template <>
1928
// struct _LIBCPP_TEMPLATE_VIS plus<void>
1929
// {
1930
//     template <class _T1, class _T2>
1931
//     _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
1932
//     auto operator()(_T1&& __t, _T2&& __u) const
1933
//     _NOEXCEPT_(noexcept(_VSTD::forward<_T1>(__t) + _VSTD::forward<_T2>(__u)))
1934
//     -> decltype        (_VSTD::forward<_T1>(__t) + _VSTD::forward<_T2>(__u))
1935
//         { return        _VSTD::forward<_T1>(__t) + _VSTD::forward<_T2>(__u); }
1936
//     typedef void is_transparent;
1937
// };
1938
// #endif
1939
1940
template <class _Cont>
1941
_LIBCPP_INLINE_VISIBILITY
1942
constexpr auto size(const _Cont& __c)
1943
_NOEXCEPT_(noexcept(__c.size()))
1944
-> decltype        (__c.size())
1945
{ return            __c.size(); }
1946
1947
template <class _Tp, size_t _Sz>
1948
_LIBCPP_INLINE_VISIBILITY
1949
constexpr size_t size(const _Tp (&)[_Sz]) noexcept { return _Sz; }
1950
1951
#if _LIBCPP_STD_VER > 17
1952
template <class _Cont>
1953
_LIBCPP_INLINE_VISIBILITY
1954
constexpr auto ssize(const _Cont& __c)
1955
_NOEXCEPT_(noexcept(static_cast<common_type_t<ptrdiff_t, make_signed_t<decltype(__c.size())>>>(__c.size())))
1956
->                              common_type_t<ptrdiff_t, make_signed_t<decltype(__c.size())>>
1957
{ return            static_cast<common_type_t<ptrdiff_t, make_signed_t<decltype(__c.size())>>>(__c.size()); }
1958
1959
template <class _Tp, ptrdiff_t _Sz>
1960
_LIBCPP_INLINE_VISIBILITY
1961
constexpr ptrdiff_t ssize(const _Tp (&)[_Sz]) noexcept { return _Sz; }
1962
#endif
1963
1964
template <class _Cont>
1965
_LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
1966
constexpr auto empty(const _Cont& __c)
1967
_NOEXCEPT_(noexcept(__c.empty()))
1968
-> decltype        (__c.empty())
1969
{ return            __c.empty(); }
1970
1971
template <class _Tp, size_t _Sz>
1972
_LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
1973
constexpr bool empty(const _Tp (&)[_Sz]) noexcept { return false; }
1974
1975
template <class _Ep>
1976
_LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
1977
constexpr bool empty(initializer_list<_Ep> __il) noexcept { return __il.size() == 0; }
1978
1979
template <class _Cont> constexpr
1980
_LIBCPP_INLINE_VISIBILITY
1981
auto data(_Cont& __c)
1982
_NOEXCEPT_(noexcept(__c.data()))
1983
-> decltype        (__c.data())
1984
{ return            __c.data(); }
1985
1986
template <class _Cont> constexpr
1987
_LIBCPP_INLINE_VISIBILITY
1988
auto data(const _Cont& __c)
1989
_NOEXCEPT_(noexcept(__c.data()))
1990
-> decltype        (__c.data())
1991
{ return            __c.data(); }
1992
1993
template <class _Tp, size_t _Sz>
1994
_LIBCPP_INLINE_VISIBILITY
1995
constexpr _Tp* data(_Tp (&__array)[_Sz]) noexcept { return __array; }
1996
1997
template <class _Ep>
1998
_LIBCPP_INLINE_VISIBILITY
1999
constexpr const _Ep* data(initializer_list<_Ep> __il) noexcept { return __il.begin(); }
2000
#endif
2001
2002
2003
_LIBCPP_END_NAMESPACE_STD
2004
2005
#endif  // _LIBCPP_ITERATOR