-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstring.gcov
4282 lines (4282 loc) · 218 KB
/
string.gcov
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
-: 0:Source:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string
-: 0:Graph:./CMakeFiles/Multimap.dir/main.gcno
-: 0:Data:./CMakeFiles/Multimap.dir/main.gcda
-: 0:Runs:4
-: 0:Programs:1
-: 1:// -*- C++ -*-
-: 2://===--------------------------- string -----------------------------------===//
-: 3://
-: 4:// The LLVM Compiler Infrastructure
-: 5://
-: 6:// This file is distributed under the University of Illinois Open Source
-: 7:// License. See LICENSE.TXT for details.
-: 8://
-: 9://===----------------------------------------------------------------------===//
-: 10:
-: 11:#ifndef _LIBCPP_STRING
-: 12:#define _LIBCPP_STRING
-: 13:
-: 14:/*
-: 15: string synopsis
-: 16:
-: 17:namespace std
-: 18:{
-: 19:
-: 20:template <class stateT>
-: 21:class fpos
-: 22:{
-: 23:private:
-: 24: stateT st;
-: 25:public:
-: 26: fpos(streamoff = streamoff());
-: 27:
-: 28: operator streamoff() const;
-: 29:
-: 30: stateT state() const;
-: 31: void state(stateT);
-: 32:
-: 33: fpos& operator+=(streamoff);
-: 34: fpos operator+ (streamoff) const;
-: 35: fpos& operator-=(streamoff);
-: 36: fpos operator- (streamoff) const;
-: 37:};
-: 38:
-: 39:template <class stateT> streamoff operator-(const fpos<stateT>& x, const fpos<stateT>& y);
-: 40:
-: 41:template <class stateT> bool operator==(const fpos<stateT>& x, const fpos<stateT>& y);
-: 42:template <class stateT> bool operator!=(const fpos<stateT>& x, const fpos<stateT>& y);
-: 43:
-: 44:template <class charT>
-: 45:struct char_traits
-: 46:{
-: 47: typedef charT char_type;
-: 48: typedef ... int_type;
-: 49: typedef streamoff off_type;
-: 50: typedef streampos pos_type;
-: 51: typedef mbstate_t state_type;
-: 52:
-: 53: static void assign(char_type& c1, const char_type& c2) noexcept;
-: 54: static constexpr bool eq(char_type c1, char_type c2) noexcept;
-: 55: static constexpr bool lt(char_type c1, char_type c2) noexcept;
-: 56:
-: 57: static int compare(const char_type* s1, const char_type* s2, size_t n);
-: 58: static size_t length(const char_type* s);
-: 59: static const char_type* find(const char_type* s, size_t n, const char_type& a);
-: 60: static char_type* move(char_type* s1, const char_type* s2, size_t n);
-: 61: static char_type* copy(char_type* s1, const char_type* s2, size_t n);
-: 62: static char_type* assign(char_type* s, size_t n, char_type a);
-: 63:
-: 64: static constexpr int_type not_eof(int_type c) noexcept;
-: 65: static constexpr char_type to_char_type(int_type c) noexcept;
-: 66: static constexpr int_type to_int_type(char_type c) noexcept;
-: 67: static constexpr bool eq_int_type(int_type c1, int_type c2) noexcept;
-: 68: static constexpr int_type eof() noexcept;
-: 69:};
-: 70:
-: 71:template <> struct char_traits<char>;
-: 72:template <> struct char_traits<wchar_t>;
-: 73:
-: 74:template<class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
-: 75:class basic_string
-: 76:{
-: 77:public:
-: 78:// types:
-: 79: typedef traits traits_type;
-: 80: typedef typename traits_type::char_type value_type;
-: 81: typedef Allocator allocator_type;
-: 82: typedef typename allocator_type::size_type size_type;
-: 83: typedef typename allocator_type::difference_type difference_type;
-: 84: typedef typename allocator_type::reference reference;
-: 85: typedef typename allocator_type::const_reference const_reference;
-: 86: typedef typename allocator_type::pointer pointer;
-: 87: typedef typename allocator_type::const_pointer const_pointer;
-: 88: typedef implementation-defined iterator;
-: 89: typedef implementation-defined const_iterator;
-: 90: typedef std::reverse_iterator<iterator> reverse_iterator;
-: 91: typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
-: 92:
-: 93: static const size_type npos = -1;
-: 94:
-: 95: basic_string()
-: 96: noexcept(is_nothrow_default_constructible<allocator_type>::value);
-: 97: explicit basic_string(const allocator_type& a);
-: 98: basic_string(const basic_string& str);
-: 99: basic_string(basic_string&& str)
-: 100: noexcept(is_nothrow_move_constructible<allocator_type>::value);
-: 101: basic_string(const basic_string& str, size_type pos, size_type n = npos,
-: 102: const allocator_type& a = allocator_type());
-: 103: basic_string(const value_type* s, const allocator_type& a = allocator_type());
-: 104: basic_string(const value_type* s, size_type n, const allocator_type& a = allocator_type());
-: 105: basic_string(size_type n, value_type c, const allocator_type& a = allocator_type());
-: 106: template<class InputIterator>
-: 107: basic_string(InputIterator begin, InputIterator end,
-: 108: const allocator_type& a = allocator_type());
-: 109: basic_string(initializer_list<value_type>, const Allocator& = Allocator());
-: 110: basic_string(const basic_string&, const Allocator&);
-: 111: basic_string(basic_string&&, const Allocator&);
-: 112:
-: 113: ~basic_string();
-: 114:
-: 115: basic_string& operator=(const basic_string& str);
-: 116: basic_string& operator=(basic_string&& str)
-: 117: noexcept(
-: 118: allocator_type::propagate_on_container_move_assignment::value &&
-: 119: is_nothrow_move_assignable<allocator_type>::value);
-: 120: basic_string& operator=(const value_type* s);
-: 121: basic_string& operator=(value_type c);
-: 122: basic_string& operator=(initializer_list<value_type>);
-: 123:
-: 124: iterator begin() noexcept;
-: 125: const_iterator begin() const noexcept;
-: 126: iterator end() noexcept;
-: 127: const_iterator end() const noexcept;
-: 128:
-: 129: reverse_iterator rbegin() noexcept;
-: 130: const_reverse_iterator rbegin() const noexcept;
-: 131: reverse_iterator rend() noexcept;
-: 132: const_reverse_iterator rend() const noexcept;
-: 133:
-: 134: const_iterator cbegin() const noexcept;
-: 135: const_iterator cend() const noexcept;
-: 136: const_reverse_iterator crbegin() const noexcept;
-: 137: const_reverse_iterator crend() const noexcept;
-: 138:
-: 139: size_type size() const noexcept;
-: 140: size_type length() const noexcept;
-: 141: size_type max_size() const noexcept;
-: 142: size_type capacity() const noexcept;
-: 143:
-: 144: void resize(size_type n, value_type c);
-: 145: void resize(size_type n);
-: 146:
-: 147: void reserve(size_type res_arg = 0);
-: 148: void shrink_to_fit();
-: 149: void clear() noexcept;
-: 150: bool empty() const noexcept;
-: 151:
-: 152: const_reference operator[](size_type pos) const;
-: 153: reference operator[](size_type pos);
-: 154:
-: 155: const_reference at(size_type n) const;
-: 156: reference at(size_type n);
-: 157:
-: 158: basic_string& operator+=(const basic_string& str);
-: 159: basic_string& operator+=(const value_type* s);
-: 160: basic_string& operator+=(value_type c);
-: 161: basic_string& operator+=(initializer_list<value_type>);
-: 162:
-: 163: basic_string& append(const basic_string& str);
-: 164: basic_string& append(const basic_string& str, size_type pos, size_type n=npos); //C++14
-: 165: basic_string& append(const value_type* s, size_type n);
-: 166: basic_string& append(const value_type* s);
-: 167: basic_string& append(size_type n, value_type c);
-: 168: template<class InputIterator>
-: 169: basic_string& append(InputIterator first, InputIterator last);
-: 170: basic_string& append(initializer_list<value_type>);
-: 171:
-: 172: void push_back(value_type c);
-: 173: void pop_back();
-: 174: reference front();
-: 175: const_reference front() const;
-: 176: reference back();
-: 177: const_reference back() const;
-: 178:
-: 179: basic_string& assign(const basic_string& str);
-: 180: basic_string& assign(basic_string&& str);
-: 181: basic_string& assign(const basic_string& str, size_type pos, size_type n=npos); // C++14
-: 182: basic_string& assign(const value_type* s, size_type n);
-: 183: basic_string& assign(const value_type* s);
-: 184: basic_string& assign(size_type n, value_type c);
-: 185: template<class InputIterator>
-: 186: basic_string& assign(InputIterator first, InputIterator last);
-: 187: basic_string& assign(initializer_list<value_type>);
-: 188:
-: 189: basic_string& insert(size_type pos1, const basic_string& str);
-: 190: basic_string& insert(size_type pos1, const basic_string& str,
-: 191: size_type pos2, size_type n);
-: 192: basic_string& insert(size_type pos, const value_type* s, size_type n=npos); //C++14
-: 193: basic_string& insert(size_type pos, const value_type* s);
-: 194: basic_string& insert(size_type pos, size_type n, value_type c);
-: 195: iterator insert(const_iterator p, value_type c);
-: 196: iterator insert(const_iterator p, size_type n, value_type c);
-: 197: template<class InputIterator>
-: 198: iterator insert(const_iterator p, InputIterator first, InputIterator last);
-: 199: iterator insert(const_iterator p, initializer_list<value_type>);
-: 200:
-: 201: basic_string& erase(size_type pos = 0, size_type n = npos);
-: 202: iterator erase(const_iterator position);
-: 203: iterator erase(const_iterator first, const_iterator last);
-: 204:
-: 205: basic_string& replace(size_type pos1, size_type n1, const basic_string& str);
-: 206: basic_string& replace(size_type pos1, size_type n1, const basic_string& str,
-: 207: size_type pos2, size_type n2=npos); // C++14
-: 208: basic_string& replace(size_type pos, size_type n1, const value_type* s, size_type n2);
-: 209: basic_string& replace(size_type pos, size_type n1, const value_type* s);
-: 210: basic_string& replace(size_type pos, size_type n1, size_type n2, value_type c);
-: 211: basic_string& replace(const_iterator i1, const_iterator i2, const basic_string& str);
-: 212: basic_string& replace(const_iterator i1, const_iterator i2, const value_type* s, size_type n);
-: 213: basic_string& replace(const_iterator i1, const_iterator i2, const value_type* s);
-: 214: basic_string& replace(const_iterator i1, const_iterator i2, size_type n, value_type c);
-: 215: template<class InputIterator>
-: 216: basic_string& replace(const_iterator i1, const_iterator i2, InputIterator j1, InputIterator j2);
-: 217: basic_string& replace(const_iterator i1, const_iterator i2, initializer_list<value_type>);
-: 218:
-: 219: size_type copy(value_type* s, size_type n, size_type pos = 0) const;
-: 220: basic_string substr(size_type pos = 0, size_type n = npos) const;
-: 221:
-: 222: void swap(basic_string& str)
-: 223: noexcept(allocator_traits<allocator_type>::propagate_on_container_swap::value ||
-: 224: allocator_traits<allocator_type>::is_always_equal::value); // C++17
-: 225:
-: 226: const value_type* c_str() const noexcept;
-: 227: const value_type* data() const noexcept;
-: 228:
-: 229: allocator_type get_allocator() const noexcept;
-: 230:
-: 231: size_type find(const basic_string& str, size_type pos = 0) const noexcept;
-: 232: size_type find(const value_type* s, size_type pos, size_type n) const noexcept;
-: 233: size_type find(const value_type* s, size_type pos = 0) const noexcept;
-: 234: size_type find(value_type c, size_type pos = 0) const noexcept;
-: 235:
-: 236: size_type rfind(const basic_string& str, size_type pos = npos) const noexcept;
-: 237: size_type rfind(const value_type* s, size_type pos, size_type n) const noexcept;
-: 238: size_type rfind(const value_type* s, size_type pos = npos) const noexcept;
-: 239: size_type rfind(value_type c, size_type pos = npos) const noexcept;
-: 240:
-: 241: size_type find_first_of(const basic_string& str, size_type pos = 0) const noexcept;
-: 242: size_type find_first_of(const value_type* s, size_type pos, size_type n) const noexcept;
-: 243: size_type find_first_of(const value_type* s, size_type pos = 0) const noexcept;
-: 244: size_type find_first_of(value_type c, size_type pos = 0) const noexcept;
-: 245:
-: 246: size_type find_last_of(const basic_string& str, size_type pos = npos) const noexcept;
-: 247: size_type find_last_of(const value_type* s, size_type pos, size_type n) const noexcept;
-: 248: size_type find_last_of(const value_type* s, size_type pos = npos) const noexcept;
-: 249: size_type find_last_of(value_type c, size_type pos = npos) const noexcept;
-: 250:
-: 251: size_type find_first_not_of(const basic_string& str, size_type pos = 0) const noexcept;
-: 252: size_type find_first_not_of(const value_type* s, size_type pos, size_type n) const noexcept;
-: 253: size_type find_first_not_of(const value_type* s, size_type pos = 0) const noexcept;
-: 254: size_type find_first_not_of(value_type c, size_type pos = 0) const noexcept;
-: 255:
-: 256: size_type find_last_not_of(const basic_string& str, size_type pos = npos) const noexcept;
-: 257: size_type find_last_not_of(const value_type* s, size_type pos, size_type n) const noexcept;
-: 258: size_type find_last_not_of(const value_type* s, size_type pos = npos) const noexcept;
-: 259: size_type find_last_not_of(value_type c, size_type pos = npos) const noexcept;
-: 260:
-: 261: int compare(const basic_string& str) const noexcept;
-: 262: int compare(size_type pos1, size_type n1, const basic_string& str) const;
-: 263: int compare(size_type pos1, size_type n1, const basic_string& str,
-: 264: size_type pos2, size_type n2=npos) const; // C++14
-: 265: int compare(const value_type* s) const noexcept;
-: 266: int compare(size_type pos1, size_type n1, const value_type* s) const;
-: 267: int compare(size_type pos1, size_type n1, const value_type* s, size_type n2) const;
-: 268:
-: 269: bool __invariants() const;
-: 270:};
-: 271:
-: 272:template<class charT, class traits, class Allocator>
-: 273:basic_string<charT, traits, Allocator>
-: 274:operator+(const basic_string<charT, traits, Allocator>& lhs,
-: 275: const basic_string<charT, traits, Allocator>& rhs);
-: 276:
-: 277:template<class charT, class traits, class Allocator>
-: 278:basic_string<charT, traits, Allocator>
-: 279:operator+(const charT* lhs , const basic_string<charT,traits,Allocator>&rhs);
-: 280:
-: 281:template<class charT, class traits, class Allocator>
-: 282:basic_string<charT, traits, Allocator>
-: 283:operator+(charT lhs, const basic_string<charT,traits,Allocator>& rhs);
-: 284:
-: 285:template<class charT, class traits, class Allocator>
-: 286:basic_string<charT, traits, Allocator>
-: 287:operator+(const basic_string<charT, traits, Allocator>& lhs, const charT* rhs);
-: 288:
-: 289:template<class charT, class traits, class Allocator>
-: 290:basic_string<charT, traits, Allocator>
-: 291:operator+(const basic_string<charT, traits, Allocator>& lhs, charT rhs);
-: 292:
-: 293:template<class charT, class traits, class Allocator>
-: 294:bool operator==(const basic_string<charT, traits, Allocator>& lhs,
-: 295: const basic_string<charT, traits, Allocator>& rhs) noexcept;
-: 296:
-: 297:template<class charT, class traits, class Allocator>
-: 298:bool operator==(const charT* lhs, const basic_string<charT, traits, Allocator>& rhs) noexcept;
-: 299:
-: 300:template<class charT, class traits, class Allocator>
-: 301:bool operator==(const basic_string<charT,traits,Allocator>& lhs, const charT* rhs) noexcept;
-: 302:
-: 303:template<class charT, class traits, class Allocator>
-: 304:bool operator!=(const basic_string<charT,traits,Allocator>& lhs,
-: 305: const basic_string<charT, traits, Allocator>& rhs) noexcept;
-: 306:
-: 307:template<class charT, class traits, class Allocator>
-: 308:bool operator!=(const charT* lhs, const basic_string<charT, traits, Allocator>& rhs) noexcept;
-: 309:
-: 310:template<class charT, class traits, class Allocator>
-: 311:bool operator!=(const basic_string<charT, traits, Allocator>& lhs, const charT* rhs) noexcept;
-: 312:
-: 313:template<class charT, class traits, class Allocator>
-: 314:bool operator< (const basic_string<charT, traits, Allocator>& lhs,
-: 315: const basic_string<charT, traits, Allocator>& rhs) noexcept;
-: 316:
-: 317:template<class charT, class traits, class Allocator>
-: 318:bool operator< (const basic_string<charT, traits, Allocator>& lhs, const charT* rhs) noexcept;
-: 319:
-: 320:template<class charT, class traits, class Allocator>
-: 321:bool operator< (const charT* lhs, const basic_string<charT, traits, Allocator>& rhs) noexcept;
-: 322:
-: 323:template<class charT, class traits, class Allocator>
-: 324:bool operator> (const basic_string<charT, traits, Allocator>& lhs,
-: 325: const basic_string<charT, traits, Allocator>& rhs) noexcept;
-: 326:
-: 327:template<class charT, class traits, class Allocator>
-: 328:bool operator> (const basic_string<charT, traits, Allocator>& lhs, const charT* rhs) noexcept;
-: 329:
-: 330:template<class charT, class traits, class Allocator>
-: 331:bool operator> (const charT* lhs, const basic_string<charT, traits, Allocator>& rhs) noexcept;
-: 332:
-: 333:template<class charT, class traits, class Allocator>
-: 334:bool operator<=(const basic_string<charT, traits, Allocator>& lhs,
-: 335: const basic_string<charT, traits, Allocator>& rhs) noexcept;
-: 336:
-: 337:template<class charT, class traits, class Allocator>
-: 338:bool operator<=(const basic_string<charT, traits, Allocator>& lhs, const charT* rhs) noexcept;
-: 339:
-: 340:template<class charT, class traits, class Allocator>
-: 341:bool operator<=(const charT* lhs, const basic_string<charT, traits, Allocator>& rhs) noexcept;
-: 342:
-: 343:template<class charT, class traits, class Allocator>
-: 344:bool operator>=(const basic_string<charT, traits, Allocator>& lhs,
-: 345: const basic_string<charT, traits, Allocator>& rhs) noexcept;
-: 346:
-: 347:template<class charT, class traits, class Allocator>
-: 348:bool operator>=(const basic_string<charT, traits, Allocator>& lhs, const charT* rhs) noexcept;
-: 349:
-: 350:template<class charT, class traits, class Allocator>
-: 351:bool operator>=(const charT* lhs, const basic_string<charT, traits, Allocator>& rhs) noexcept;
-: 352:
-: 353:template<class charT, class traits, class Allocator>
-: 354:void swap(basic_string<charT, traits, Allocator>& lhs,
-: 355: basic_string<charT, traits, Allocator>& rhs)
-: 356: noexcept(noexcept(lhs.swap(rhs)));
-: 357:
-: 358:template<class charT, class traits, class Allocator>
-: 359:basic_istream<charT, traits>&
-: 360:operator>>(basic_istream<charT, traits>& is, basic_string<charT, traits, Allocator>& str);
-: 361:
-: 362:template<class charT, class traits, class Allocator>
-: 363:basic_ostream<charT, traits>&
-: 364:operator<<(basic_ostream<charT, traits>& os, const basic_string<charT, traits, Allocator>& str);
-: 365:
-: 366:template<class charT, class traits, class Allocator>
-: 367:basic_istream<charT, traits>&
-: 368:getline(basic_istream<charT, traits>& is, basic_string<charT, traits, Allocator>& str,
-: 369: charT delim);
-: 370:
-: 371:template<class charT, class traits, class Allocator>
-: 372:basic_istream<charT, traits>&
-: 373:getline(basic_istream<charT, traits>& is, basic_string<charT, traits, Allocator>& str);
-: 374:
-: 375:typedef basic_string<char> string;
-: 376:typedef basic_string<wchar_t> wstring;
-: 377:typedef basic_string<char16_t> u16string;
-: 378:typedef basic_string<char32_t> u32string;
-: 379:
-: 380:int stoi (const string& str, size_t* idx = 0, int base = 10);
-: 381:long stol (const string& str, size_t* idx = 0, int base = 10);
-: 382:unsigned long stoul (const string& str, size_t* idx = 0, int base = 10);
-: 383:long long stoll (const string& str, size_t* idx = 0, int base = 10);
-: 384:unsigned long long stoull(const string& str, size_t* idx = 0, int base = 10);
-: 385:
-: 386:float stof (const string& str, size_t* idx = 0);
-: 387:double stod (const string& str, size_t* idx = 0);
-: 388:long double stold(const string& str, size_t* idx = 0);
-: 389:
-: 390:string to_string(int val);
-: 391:string to_string(unsigned val);
-: 392:string to_string(long val);
-: 393:string to_string(unsigned long val);
-: 394:string to_string(long long val);
-: 395:string to_string(unsigned long long val);
-: 396:string to_string(float val);
-: 397:string to_string(double val);
-: 398:string to_string(long double val);
-: 399:
-: 400:int stoi (const wstring& str, size_t* idx = 0, int base = 10);
-: 401:long stol (const wstring& str, size_t* idx = 0, int base = 10);
-: 402:unsigned long stoul (const wstring& str, size_t* idx = 0, int base = 10);
-: 403:long long stoll (const wstring& str, size_t* idx = 0, int base = 10);
-: 404:unsigned long long stoull(const wstring& str, size_t* idx = 0, int base = 10);
-: 405:
-: 406:float stof (const wstring& str, size_t* idx = 0);
-: 407:double stod (const wstring& str, size_t* idx = 0);
-: 408:long double stold(const wstring& str, size_t* idx = 0);
-: 409:
-: 410:wstring to_wstring(int val);
-: 411:wstring to_wstring(unsigned val);
-: 412:wstring to_wstring(long val);
-: 413:wstring to_wstring(unsigned long val);
-: 414:wstring to_wstring(long long val);
-: 415:wstring to_wstring(unsigned long long val);
-: 416:wstring to_wstring(float val);
-: 417:wstring to_wstring(double val);
-: 418:wstring to_wstring(long double val);
-: 419:
-: 420:template <> struct hash<string>;
-: 421:template <> struct hash<u16string>;
-: 422:template <> struct hash<u32string>;
-: 423:template <> struct hash<wstring>;
-: 424:
-: 425:basic_string<char> operator "" s( const char *str, size_t len ); // C++14
-: 426:basic_string<wchar_t> operator "" s( const wchar_t *str, size_t len ); // C++14
-: 427:basic_string<char16_t> operator "" s( const char16_t *str, size_t len ); // C++14
-: 428:basic_string<char32_t> operator "" s( const char32_t *str, size_t len ); // C++14
-: 429:
-: 430:} // std
-: 431:
-: 432:*/
-: 433:
-: 434:#include <__config>
-: 435:#include <iosfwd>
-: 436:#include <cstring>
-: 437:#include <cstdio> // For EOF.
-: 438:#include <cwchar>
-: 439:#include <algorithm>
-: 440:#include <iterator>
-: 441:#include <utility>
-: 442:#include <memory>
-: 443:#include <stdexcept>
-: 444:#include <type_traits>
-: 445:#include <initializer_list>
-: 446:#include <__functional_base>
-: 447:#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
-: 448:#include <cstdint>
-: 449:#endif
-: 450:#if defined(_LIBCPP_NO_EXCEPTIONS)
-: 451:#include <cassert>
-: 452:#endif
-: 453:
-: 454:#include <__undef_min_max>
-: 455:
-: 456:#include <__debug>
-: 457:
-: 458:#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
-: 459:#pragma GCC system_header
-: 460:#endif
-: 461:
-: 462:_LIBCPP_BEGIN_NAMESPACE_STD
-: 463:
-: 464:// fpos
-: 465:
-: 466:template <class _StateT>
-: 467:class _LIBCPP_TYPE_VIS_ONLY fpos
-: 468:{
-: 469:private:
-: 470: _StateT __st_;
-: 471: streamoff __off_;
-: 472:public:
-: 473: _LIBCPP_INLINE_VISIBILITY fpos(streamoff __off = streamoff()) : __st_(), __off_(__off) {}
-: 474:
-: 475: _LIBCPP_INLINE_VISIBILITY operator streamoff() const {return __off_;}
-: 476:
-: 477: _LIBCPP_INLINE_VISIBILITY _StateT state() const {return __st_;}
-: 478: _LIBCPP_INLINE_VISIBILITY void state(_StateT __st) {__st_ = __st;}
-: 479:
-: 480: _LIBCPP_INLINE_VISIBILITY fpos& operator+=(streamoff __off) {__off_ += __off; return *this;}
-: 481: _LIBCPP_INLINE_VISIBILITY fpos operator+ (streamoff __off) const {fpos __t(*this); __t += __off; return __t;}
-: 482: _LIBCPP_INLINE_VISIBILITY fpos& operator-=(streamoff __off) {__off_ -= __off; return *this;}
-: 483: _LIBCPP_INLINE_VISIBILITY fpos operator- (streamoff __off) const {fpos __t(*this); __t -= __off; return __t;}
-: 484:};
-: 485:
-: 486:template <class _StateT>
-: 487:inline _LIBCPP_INLINE_VISIBILITY
-: 488:streamoff operator-(const fpos<_StateT>& __x, const fpos<_StateT>& __y)
-: 489: {return streamoff(__x) - streamoff(__y);}
-: 490:
-: 491:template <class _StateT>
-: 492:inline _LIBCPP_INLINE_VISIBILITY
-: 493:bool operator==(const fpos<_StateT>& __x, const fpos<_StateT>& __y)
-: 494: {return streamoff(__x) == streamoff(__y);}
-: 495:
-: 496:template <class _StateT>
-: 497:inline _LIBCPP_INLINE_VISIBILITY
-: 498:bool operator!=(const fpos<_StateT>& __x, const fpos<_StateT>& __y)
-: 499: {return streamoff(__x) != streamoff(__y);}
-: 500:
-: 501:// char_traits
-: 502:
-: 503:template <class _CharT>
-: 504:struct _LIBCPP_TYPE_VIS_ONLY char_traits
-: 505:{
-: 506: typedef _CharT char_type;
-: 507: typedef int int_type;
-: 508: typedef streamoff off_type;
-: 509: typedef streampos pos_type;
-: 510: typedef mbstate_t state_type;
-: 511:
-: 512: static inline void assign(char_type& __c1, const char_type& __c2) _NOEXCEPT
-: 513: {__c1 = __c2;}
-: 514: static inline _LIBCPP_CONSTEXPR bool eq(char_type __c1, char_type __c2) _NOEXCEPT
-: 515: {return __c1 == __c2;}
-: 516: static inline _LIBCPP_CONSTEXPR bool lt(char_type __c1, char_type __c2) _NOEXCEPT
-: 517: {return __c1 < __c2;}
-: 518:
-: 519: static int compare(const char_type* __s1, const char_type* __s2, size_t __n);
-: 520: _LIBCPP_INLINE_VISIBILITY
-: 521: static size_t length(const char_type* __s);
-: 522: _LIBCPP_INLINE_VISIBILITY
-: 523: static const char_type* find(const char_type* __s, size_t __n, const char_type& __a);
-: 524: static char_type* move(char_type* __s1, const char_type* __s2, size_t __n);
-: 525: _LIBCPP_INLINE_VISIBILITY
-: 526: static char_type* copy(char_type* __s1, const char_type* __s2, size_t __n);
-: 527: _LIBCPP_INLINE_VISIBILITY
-: 528: static char_type* assign(char_type* __s, size_t __n, char_type __a);
-: 529:
-: 530: static inline _LIBCPP_CONSTEXPR int_type not_eof(int_type __c) _NOEXCEPT
-: 531: {return eq_int_type(__c, eof()) ? ~eof() : __c;}
-: 532: static inline _LIBCPP_CONSTEXPR char_type to_char_type(int_type __c) _NOEXCEPT
-: 533: {return char_type(__c);}
-: 534: static inline _LIBCPP_CONSTEXPR int_type to_int_type(char_type __c) _NOEXCEPT
-: 535: {return int_type(__c);}
-: 536: static inline _LIBCPP_CONSTEXPR bool eq_int_type(int_type __c1, int_type __c2) _NOEXCEPT
-: 537: {return __c1 == __c2;}
-: 538: static inline _LIBCPP_CONSTEXPR int_type eof() _NOEXCEPT
-: 539: {return int_type(EOF);}
-: 540:};
-: 541:
-: 542:template <class _CharT>
-: 543:int
-: 544:char_traits<_CharT>::compare(const char_type* __s1, const char_type* __s2, size_t __n)
-: 545:{
-: 546: for (; __n; --__n, ++__s1, ++__s2)
-: 547: {
-: 548: if (lt(*__s1, *__s2))
-: 549: return -1;
-: 550: if (lt(*__s2, *__s1))
-: 551: return 1;
-: 552: }
-: 553: return 0;
-: 554:}
-: 555:
-: 556:template <class _CharT>
-: 557:inline
-: 558:size_t
-: 559:char_traits<_CharT>::length(const char_type* __s)
-: 560:{
-: 561: size_t __len = 0;
-: 562: for (; !eq(*__s, char_type(0)); ++__s)
-: 563: ++__len;
-: 564: return __len;
-: 565:}
-: 566:
-: 567:template <class _CharT>
-: 568:inline
-: 569:const _CharT*
-: 570:char_traits<_CharT>::find(const char_type* __s, size_t __n, const char_type& __a)
-: 571:{
-: 572: for (; __n; --__n)
-: 573: {
-: 574: if (eq(*__s, __a))
-: 575: return __s;
-: 576: ++__s;
-: 577: }
-: 578: return 0;
-: 579:}
-: 580:
-: 581:template <class _CharT>
-: 582:_CharT*
-: 583:char_traits<_CharT>::move(char_type* __s1, const char_type* __s2, size_t __n)
-: 584:{
-: 585: char_type* __r = __s1;
-: 586: if (__s1 < __s2)
-: 587: {
-: 588: for (; __n; --__n, ++__s1, ++__s2)
-: 589: assign(*__s1, *__s2);
-: 590: }
-: 591: else if (__s2 < __s1)
-: 592: {
-: 593: __s1 += __n;
-: 594: __s2 += __n;
-: 595: for (; __n; --__n)
-: 596: assign(*--__s1, *--__s2);
-: 597: }
-: 598: return __r;
-: 599:}
-: 600:
-: 601:template <class _CharT>
-: 602:inline
-: 603:_CharT*
-: 604:char_traits<_CharT>::copy(char_type* __s1, const char_type* __s2, size_t __n)
-: 605:{
-: 606: _LIBCPP_ASSERT(__s2 < __s1 || __s2 >= __s1+__n, "char_traits::copy overlapped range");
-: 607: char_type* __r = __s1;
-: 608: for (; __n; --__n, ++__s1, ++__s2)
-: 609: assign(*__s1, *__s2);
-: 610: return __r;
-: 611:}
-: 612:
-: 613:template <class _CharT>
-: 614:inline
-: 615:_CharT*
-: 616:char_traits<_CharT>::assign(char_type* __s, size_t __n, char_type __a)
-: 617:{
-: 618: char_type* __r = __s;
-: 619: for (; __n; --__n, ++__s)
-: 620: assign(*__s, __a);
-: 621: return __r;
-: 622:}
-: 623:
-: 624:// char_traits<char>
-: 625:
-: 626:template <>
-: 627:struct _LIBCPP_TYPE_VIS_ONLY char_traits<char>
-: 628:{
-: 629: typedef char char_type;
-: 630: typedef int int_type;
-: 631: typedef streamoff off_type;
-: 632: typedef streampos pos_type;
-: 633: typedef mbstate_t state_type;
-: 634:
-: 635: static inline void assign(char_type& __c1, const char_type& __c2) _NOEXCEPT
-: 636: {__c1 = __c2;}
-: 637: static inline _LIBCPP_CONSTEXPR bool eq(char_type __c1, char_type __c2) _NOEXCEPT
-: 638: {return __c1 == __c2;}
-: 639: static inline _LIBCPP_CONSTEXPR bool lt(char_type __c1, char_type __c2) _NOEXCEPT
-: 640: {return (unsigned char)__c1 < (unsigned char)__c2;}
-: 641:
-: 642: static inline int compare(const char_type* __s1, const char_type* __s2, size_t __n)
-: 643: {return __n == 0 ? 0 : memcmp(__s1, __s2, __n);}
204: 644: static inline size_t length(const char_type* __s) {return strlen(__s);}
-: 645: static inline const char_type* find(const char_type* __s, size_t __n, const char_type& __a)
-: 646: {return __n == 0 ? NULL : (const char_type*) memchr(__s, to_int_type(__a), __n);}
-: 647: static inline char_type* move(char_type* __s1, const char_type* __s2, size_t __n)
-: 648: {return __n == 0 ? __s1 : (char_type*) memmove(__s1, __s2, __n);}
-: 649: static inline char_type* copy(char_type* __s1, const char_type* __s2, size_t __n)
-: 650: {
-: 651: _LIBCPP_ASSERT(__s2 < __s1 || __s2 >= __s1+__n, "char_traits::copy overlapped range");
-: 652: return __n == 0 ? __s1 : (char_type*)memcpy(__s1, __s2, __n);
-: 653: }
-: 654: static inline char_type* assign(char_type* __s, size_t __n, char_type __a)
-: 655: {return __n == 0 ? __s : (char_type*)memset(__s, to_int_type(__a), __n);}
-: 656:
-: 657: static inline _LIBCPP_CONSTEXPR int_type not_eof(int_type __c) _NOEXCEPT
-: 658: {return eq_int_type(__c, eof()) ? ~eof() : __c;}
-: 659: static inline _LIBCPP_CONSTEXPR char_type to_char_type(int_type __c) _NOEXCEPT
-: 660: {return char_type(__c);}
-: 661: static inline _LIBCPP_CONSTEXPR int_type to_int_type(char_type __c) _NOEXCEPT
-: 662: {return int_type((unsigned char)__c);}
-: 663: static inline _LIBCPP_CONSTEXPR bool eq_int_type(int_type __c1, int_type __c2) _NOEXCEPT
-: 664: {return __c1 == __c2;}
-: 665: static inline _LIBCPP_CONSTEXPR int_type eof() _NOEXCEPT
-: 666: {return int_type(EOF);}
-: 667:};
-: 668:
-: 669:// char_traits<wchar_t>
-: 670:
-: 671:template <>
-: 672:struct _LIBCPP_TYPE_VIS_ONLY char_traits<wchar_t>
-: 673:{
-: 674: typedef wchar_t char_type;
-: 675: typedef wint_t int_type;
-: 676: typedef streamoff off_type;
-: 677: typedef streampos pos_type;
-: 678: typedef mbstate_t state_type;
-: 679:
-: 680: static inline void assign(char_type& __c1, const char_type& __c2) _NOEXCEPT
-: 681: {__c1 = __c2;}
-: 682: static inline _LIBCPP_CONSTEXPR bool eq(char_type __c1, char_type __c2) _NOEXCEPT
-: 683: {return __c1 == __c2;}
-: 684: static inline _LIBCPP_CONSTEXPR bool lt(char_type __c1, char_type __c2) _NOEXCEPT
-: 685: {return __c1 < __c2;}
-: 686:
-: 687: static inline int compare(const char_type* __s1, const char_type* __s2, size_t __n)
-: 688: {return __n == 0 ? 0 : wmemcmp(__s1, __s2, __n);}
-: 689: static inline size_t length(const char_type* __s)
-: 690: {return wcslen(__s);}
-: 691: static inline const char_type* find(const char_type* __s, size_t __n, const char_type& __a)
-: 692: {return __n == 0 ? NULL : (const char_type*)wmemchr(__s, __a, __n);}
-: 693: static inline char_type* move(char_type* __s1, const char_type* __s2, size_t __n)
-: 694: {return __n == 0 ? __s1 : (char_type*)wmemmove(__s1, __s2, __n);}
-: 695: static inline char_type* copy(char_type* __s1, const char_type* __s2, size_t __n)
-: 696: {
-: 697: _LIBCPP_ASSERT(__s2 < __s1 || __s2 >= __s1+__n, "char_traits::copy overlapped range");
-: 698: return __n == 0 ? __s1 : (char_type*)wmemcpy(__s1, __s2, __n);
-: 699: }
-: 700: static inline char_type* assign(char_type* __s, size_t __n, char_type __a)
-: 701: {return __n == 0 ? __s : (char_type*)wmemset(__s, __a, __n);}
-: 702:
-: 703: static inline _LIBCPP_CONSTEXPR int_type not_eof(int_type __c) _NOEXCEPT
-: 704: {return eq_int_type(__c, eof()) ? ~eof() : __c;}
-: 705: static inline _LIBCPP_CONSTEXPR char_type to_char_type(int_type __c) _NOEXCEPT
-: 706: {return char_type(__c);}
-: 707: static inline _LIBCPP_CONSTEXPR int_type to_int_type(char_type __c) _NOEXCEPT
-: 708: {return int_type(__c);}
-: 709: static inline _LIBCPP_CONSTEXPR bool eq_int_type(int_type __c1, int_type __c2) _NOEXCEPT
-: 710: {return __c1 == __c2;}
-: 711: static inline _LIBCPP_CONSTEXPR int_type eof() _NOEXCEPT
-: 712: {return int_type(WEOF);}
-: 713:};
-: 714:
-: 715:#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
-: 716:
-: 717:template <>
-: 718:struct _LIBCPP_TYPE_VIS_ONLY char_traits<char16_t>
-: 719:{
-: 720: typedef char16_t char_type;
-: 721: typedef uint_least16_t int_type;
-: 722: typedef streamoff off_type;
-: 723: typedef u16streampos pos_type;
-: 724: typedef mbstate_t state_type;
-: 725:
-: 726: static inline void assign(char_type& __c1, const char_type& __c2) _NOEXCEPT
-: 727: {__c1 = __c2;}
-: 728: static inline _LIBCPP_CONSTEXPR bool eq(char_type __c1, char_type __c2) _NOEXCEPT
-: 729: {return __c1 == __c2;}
-: 730: static inline _LIBCPP_CONSTEXPR bool lt(char_type __c1, char_type __c2) _NOEXCEPT
-: 731: {return __c1 < __c2;}
-: 732:
-: 733: _LIBCPP_INLINE_VISIBILITY
-: 734: static int compare(const char_type* __s1, const char_type* __s2, size_t __n);
-: 735: _LIBCPP_INLINE_VISIBILITY
-: 736: static size_t length(const char_type* __s);
-: 737: _LIBCPP_INLINE_VISIBILITY
-: 738: static const char_type* find(const char_type* __s, size_t __n, const char_type& __a);
-: 739: _LIBCPP_INLINE_VISIBILITY
-: 740: static char_type* move(char_type* __s1, const char_type* __s2, size_t __n);
-: 741: _LIBCPP_INLINE_VISIBILITY
-: 742: static char_type* copy(char_type* __s1, const char_type* __s2, size_t __n);
-: 743: _LIBCPP_INLINE_VISIBILITY
-: 744: static char_type* assign(char_type* __s, size_t __n, char_type __a);
-: 745:
-: 746: static inline _LIBCPP_CONSTEXPR int_type not_eof(int_type __c) _NOEXCEPT
-: 747: {return eq_int_type(__c, eof()) ? ~eof() : __c;}
-: 748: static inline _LIBCPP_CONSTEXPR char_type to_char_type(int_type __c) _NOEXCEPT
-: 749: {return char_type(__c);}
-: 750: static inline _LIBCPP_CONSTEXPR int_type to_int_type(char_type __c) _NOEXCEPT
-: 751: {return int_type(__c);}
-: 752: static inline _LIBCPP_CONSTEXPR bool eq_int_type(int_type __c1, int_type __c2) _NOEXCEPT
-: 753: {return __c1 == __c2;}
-: 754: static inline _LIBCPP_CONSTEXPR int_type eof() _NOEXCEPT
-: 755: {return int_type(0xFFFF);}
-: 756:};
-: 757:
-: 758:inline
-: 759:int
-: 760:char_traits<char16_t>::compare(const char_type* __s1, const char_type* __s2, size_t __n)
-: 761:{
-: 762: for (; __n; --__n, ++__s1, ++__s2)
-: 763: {
-: 764: if (lt(*__s1, *__s2))
-: 765: return -1;
-: 766: if (lt(*__s2, *__s1))
-: 767: return 1;
-: 768: }
-: 769: return 0;
-: 770:}
-: 771:
-: 772:inline
-: 773:size_t
-: 774:char_traits<char16_t>::length(const char_type* __s)
-: 775:{
-: 776: size_t __len = 0;
-: 777: for (; !eq(*__s, char_type(0)); ++__s)
-: 778: ++__len;
-: 779: return __len;
-: 780:}
-: 781:
-: 782:inline
-: 783:const char16_t*
-: 784:char_traits<char16_t>::find(const char_type* __s, size_t __n, const char_type& __a)
-: 785:{
-: 786: for (; __n; --__n)
-: 787: {
-: 788: if (eq(*__s, __a))
-: 789: return __s;
-: 790: ++__s;
-: 791: }
-: 792: return 0;
-: 793:}
-: 794:
-: 795:inline
-: 796:char16_t*
-: 797:char_traits<char16_t>::move(char_type* __s1, const char_type* __s2, size_t __n)
-: 798:{
-: 799: char_type* __r = __s1;
-: 800: if (__s1 < __s2)
-: 801: {
-: 802: for (; __n; --__n, ++__s1, ++__s2)
-: 803: assign(*__s1, *__s2);
-: 804: }
-: 805: else if (__s2 < __s1)
-: 806: {
-: 807: __s1 += __n;
-: 808: __s2 += __n;
-: 809: for (; __n; --__n)
-: 810: assign(*--__s1, *--__s2);
-: 811: }
-: 812: return __r;
-: 813:}
-: 814:
-: 815:inline
-: 816:char16_t*
-: 817:char_traits<char16_t>::copy(char_type* __s1, const char_type* __s2, size_t __n)
-: 818:{
-: 819: _LIBCPP_ASSERT(__s2 < __s1 || __s2 >= __s1+__n, "char_traits::copy overlapped range");
-: 820: char_type* __r = __s1;
-: 821: for (; __n; --__n, ++__s1, ++__s2)
-: 822: assign(*__s1, *__s2);
-: 823: return __r;
-: 824:}
-: 825:
-: 826:inline
-: 827:char16_t*
-: 828:char_traits<char16_t>::assign(char_type* __s, size_t __n, char_type __a)
-: 829:{
-: 830: char_type* __r = __s;
-: 831: for (; __n; --__n, ++__s)
-: 832: assign(*__s, __a);
-: 833: return __r;
-: 834:}
-: 835:
-: 836:template <>
-: 837:struct _LIBCPP_TYPE_VIS_ONLY char_traits<char32_t>
-: 838:{
-: 839: typedef char32_t char_type;
-: 840: typedef uint_least32_t int_type;
-: 841: typedef streamoff off_type;
-: 842: typedef u32streampos pos_type;
-: 843: typedef mbstate_t state_type;
-: 844:
-: 845: static inline void assign(char_type& __c1, const char_type& __c2) _NOEXCEPT
-: 846: {__c1 = __c2;}
-: 847: static inline _LIBCPP_CONSTEXPR bool eq(char_type __c1, char_type __c2) _NOEXCEPT
-: 848: {return __c1 == __c2;}
-: 849: static inline _LIBCPP_CONSTEXPR bool lt(char_type __c1, char_type __c2) _NOEXCEPT
-: 850: {return __c1 < __c2;}
-: 851:
-: 852: _LIBCPP_INLINE_VISIBILITY
-: 853: static int compare(const char_type* __s1, const char_type* __s2, size_t __n);
-: 854: _LIBCPP_INLINE_VISIBILITY
-: 855: static size_t length(const char_type* __s);
-: 856: _LIBCPP_INLINE_VISIBILITY
-: 857: static const char_type* find(const char_type* __s, size_t __n, const char_type& __a);
-: 858: _LIBCPP_INLINE_VISIBILITY
-: 859: static char_type* move(char_type* __s1, const char_type* __s2, size_t __n);
-: 860: _LIBCPP_INLINE_VISIBILITY
-: 861: static char_type* copy(char_type* __s1, const char_type* __s2, size_t __n);
-: 862: _LIBCPP_INLINE_VISIBILITY
-: 863: static char_type* assign(char_type* __s, size_t __n, char_type __a);
-: 864:
-: 865: static inline _LIBCPP_CONSTEXPR int_type not_eof(int_type __c) _NOEXCEPT
-: 866: {return eq_int_type(__c, eof()) ? ~eof() : __c;}
-: 867: static inline _LIBCPP_CONSTEXPR char_type to_char_type(int_type __c) _NOEXCEPT
-: 868: {return char_type(__c);}
-: 869: static inline _LIBCPP_CONSTEXPR int_type to_int_type(char_type __c) _NOEXCEPT
-: 870: {return int_type(__c);}
-: 871: static inline _LIBCPP_CONSTEXPR bool eq_int_type(int_type __c1, int_type __c2) _NOEXCEPT
-: 872: {return __c1 == __c2;}
-: 873: static inline _LIBCPP_CONSTEXPR int_type eof() _NOEXCEPT
-: 874: {return int_type(0xFFFFFFFF);}
-: 875:};
-: 876:
-: 877:inline
-: 878:int
-: 879:char_traits<char32_t>::compare(const char_type* __s1, const char_type* __s2, size_t __n)
-: 880:{
-: 881: for (; __n; --__n, ++__s1, ++__s2)
-: 882: {
-: 883: if (lt(*__s1, *__s2))
-: 884: return -1;
-: 885: if (lt(*__s2, *__s1))
-: 886: return 1;
-: 887: }
-: 888: return 0;
-: 889:}
-: 890:
-: 891:inline
-: 892:size_t
-: 893:char_traits<char32_t>::length(const char_type* __s)
-: 894:{
-: 895: size_t __len = 0;
-: 896: for (; !eq(*__s, char_type(0)); ++__s)
-: 897: ++__len;
-: 898: return __len;
-: 899:}
-: 900:
-: 901:inline
-: 902:const char32_t*
-: 903:char_traits<char32_t>::find(const char_type* __s, size_t __n, const char_type& __a)
-: 904:{
-: 905: for (; __n; --__n)
-: 906: {
-: 907: if (eq(*__s, __a))
-: 908: return __s;
-: 909: ++__s;
-: 910: }
-: 911: return 0;
-: 912:}
-: 913:
-: 914:inline
-: 915:char32_t*
-: 916:char_traits<char32_t>::move(char_type* __s1, const char_type* __s2, size_t __n)
-: 917:{
-: 918: char_type* __r = __s1;
-: 919: if (__s1 < __s2)
-: 920: {
-: 921: for (; __n; --__n, ++__s1, ++__s2)
-: 922: assign(*__s1, *__s2);
-: 923: }
-: 924: else if (__s2 < __s1)
-: 925: {
-: 926: __s1 += __n;
-: 927: __s2 += __n;
-: 928: for (; __n; --__n)
-: 929: assign(*--__s1, *--__s2);
-: 930: }
-: 931: return __r;
-: 932:}
-: 933:
-: 934:inline
-: 935:char32_t*
-: 936:char_traits<char32_t>::copy(char_type* __s1, const char_type* __s2, size_t __n)
-: 937:{
-: 938: _LIBCPP_ASSERT(__s2 < __s1 || __s2 >= __s1+__n, "char_traits::copy overlapped range");
-: 939: char_type* __r = __s1;
-: 940: for (; __n; --__n, ++__s1, ++__s2)
-: 941: assign(*__s1, *__s2);
-: 942: return __r;
-: 943:}
-: 944:
-: 945:inline
-: 946:char32_t*
-: 947:char_traits<char32_t>::assign(char_type* __s, size_t __n, char_type __a)
-: 948:{
-: 949: char_type* __r = __s;
-: 950: for (; __n; --__n, ++__s)
-: 951: assign(*__s, __a);
-: 952: return __r;
-: 953:}
-: 954:
-: 955:#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
-: 956:
-: 957:// helper fns for basic_string
-: 958:
-: 959:// __str_find
-: 960:template<class _CharT, class _SizeT, class _Traits, _SizeT __npos>
-: 961:_SizeT _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
-: 962:__str_find(const _CharT *__p, _SizeT __sz,
-: 963: _CharT __c, _SizeT __pos) _NOEXCEPT
-: 964:{
-: 965: if (__pos >= __sz)
-: 966: return __npos;
-: 967: const _CharT* __r = _Traits::find(__p + __pos, __sz - __pos, __c);
-: 968: if (__r == 0)
-: 969: return __npos;
-: 970: return static_cast<_SizeT>(__r - __p);
-: 971:}
-: 972:
-: 973:template<class _CharT, class _SizeT, class _Traits, _SizeT __npos>
-: 974:_SizeT _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
-: 975:__str_find(const _CharT *__p, _SizeT __sz,
-: 976: const _CharT* __s, _SizeT __pos, _SizeT __n) _NOEXCEPT
-: 977:{
-: 978: if (__pos > __sz || __sz - __pos < __n)
-: 979: return __npos;
-: 980: if (__n == 0)
-: 981: return __pos;
-: 982: const _CharT* __r =
-: 983: _VSTD::__search(__p + __pos, __p + __sz,
-: 984: __s, __s + __n, _Traits::eq,
-: 985: random_access_iterator_tag(), random_access_iterator_tag());
-: 986: if (__r == __p + __sz)
-: 987: return __npos;
-: 988: return static_cast<_SizeT>(__r - __p);
-: 989:}
-: 990:
-: 991:
-: 992:// __str_rfind
-: 993:
-: 994:template<class _CharT, class _SizeT, class _Traits, _SizeT __npos>
-: 995:_SizeT _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY