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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
|
2022-10-19 Patrick Palka <ppalka@redhat.com>
* include/std/ranges (views::__detail::__is_repeat_view): Define
and later define a partial specialization.
(views::__detail::__take_of_repeat_view): Declare and later define.
(views::__detail::__drop_of_repeat_view): Likewise.
(views::_Take::operator()): Return a repeat_view if the argument
is a repeat_view as per P2474R2.
(views::_Drop::operator()): Likewise.
(repeat_view): Befriend __take/drop_of_repeat_view.
* testsuite/std/ranges/repeat/1.cc (test04): New test.
2022-10-19 Patrick Palka <ppalka@redhat.com>
PR libstdc++/107313
* include/std/ranges (stride_view::_Iterator::operator-): Fix typo.
* testsuite/std/ranges/adaptors/stride/1.cc (test03): New test.
2022-10-19 LIU Hao <lh_mouse@126.com>
* src/c++11/thread.cc (get_nprocs): Add new implementation
for native Windows targets
2022-10-19 LIU Hao <lh_mouse@126.com>
* libsupc++/atexit_thread.cc (__cxa_thread_atexit): Use
implementation from mcfgthread if available
* libsupc++/guard.cc (__cxa_guard_acquire, __cxa_guard_release,
__cxa_guard_abort): Use implementations from mcfgthread if
available
* configure: Regenerate
2022-10-19 Jakub Jelinek <jakub@redhat.com>
PR c++/106652
* include/std/limits: Fix a typo, 202202L -> 202002L.
(numeric_limits::<_Float16>::radix, numeric_limits::<_Float32>::radix,
numeric_limits::<_Float64>::radix, numeric_limits::<_Float128>::radix,
numeric_limits::<__gnu_cxx::__bfloat16_t>::radix): Use __FLT_RADIX__
macro instead of type specific macros.
* include/c_global/cmath (nextafter(_Float16, _Float16)): New
overload.
(nextafter(__gnu_cxx::__bfloat16_t, __gnu_cxx::__bfloat16_t)):
Likewise.
* testsuite/26_numerics/headers/cmath/functions_std_c++23.cc
(test_functions): Uncomment nextafter test. Fix up sph_neumann call.
* testsuite/26_numerics/headers/cmath/nextafter_c++23.cc: New test.
2022-10-18 Patrick Palka <ppalka@redhat.com>
* include/std/ranges (stride_view): Define.
(stride_view::_Iterator): Define.
(views::__detail::__can_stride_view): Define.
(views::_Stride, views::stride): Define.
* testsuite/std/ranges/adaptors/stride/1.cc: New test.
2022-10-18 Jakub Jelinek <jakub@redhat.com>
PR c++/106652
* include/std/stdfloat: New file.
* include/std/numbers (__glibcxx_numbers): Define and use it
for __float128 explicit instantiations as well as
_Float{16,32,64,128} and __gnu_cxx::__bfloat16_t.
* include/std/atomic (atomic<_Float16>, atomic<_Float32>,
atomic<_Float64>, atomic<_Float128>, atomic<__gnu_cxx::__bfloat16_t>):
New explicit instantiations.
* include/std/type_traits (__is_floating_point_helper<_Float16>,
__is_floating_point_helper<_Float32>,
__is_floating_point_helper<_Float64>,
__is_floating_point_helper<_Float128>,
__is_floating_point_helper<__gnu_cxx::__bfloat16_t>): Likewise.
* include/std/limits (__glibcxx_concat3_, __glibcxx_concat3,
__glibcxx_float_n): Define.
(numeric_limits<_Float16>, numeric_limits<_Float32>,
numeric_limits<_Float64>, numeric_limits<_Float128>,
numeric_limits<__gnu_cxx::__bfloat16_t>): New explicit instantiations.
* include/bits/std_abs.h (abs): New overloads for
_Float{16,32,64,128} and __gnu_cxx::__bfloat16_t.
* include/bits/c++config (_GLIBCXX_LDOUBLE_IS_IEEE_BINARY128): Define
if long double is IEEE quad.
(__gnu_cxx::__bfloat16_t): New using.
* include/c_global/cmath (acos, asin, atan, atan2, ceil, cos, cosh,
exp, fabs, floor, fmod, frexp, ldexp, log, log10, modf, pow, sin,
sinh, sqrt, tan, tanh, fpclassify, isfinite, isinf, isnan, isnormal,
signbit, isgreater, isgreaterequal, isless, islessequal,
islessgreater, isunordered, acosh, asinh, atanh, cbrt, copysign, erf,
erfc, exp2, expm1, fdim, fma, fmax, fmin, hypot, ilogb, lgamma,
llrint, llround, log1p, log2, logb, lrint, lround, nearbyint,
nextafter, remainder, rint, round, scalbln, scalbn, tgamma, trunc,
lerp): New overloads with _Float{16,32,64,128} or
__gnu_cxx::__bfloat16_t types.
* config/os/gnu-linux/os_defines.h (_GLIBCXX_HAVE_FLOAT128_MATH):
Prepare for definition if glibc 2.26 and later implements *f128 APIs
but comment out the actual definition for now.
* include/ext/type_traits.h (__promote<_Float16>, __promote<_Float32>,
__promote<_Float64>, __promote<_Float128>,
__promote<__gnu_cxx::__bfloat16_t>): New specializations.
* include/Makefile.am (std_headers): Add stdfloat.
* include/Makefile.in: Regenerated.
* include/precompiled/stdc++.h: Include stdfloat.
* testsuite/18_support/headers/stdfloat/types_std.cc: New test.
* testsuite/18_support/headers/limits/synopsis_cxx23.cc: New test.
* testsuite/26_numerics/headers/cmath/c99_classification_macros_c++23.cc:
New test.
* testsuite/26_numerics/headers/cmath/functions_std_c++23.cc: New test.
* testsuite/26_numerics/numbers/4.cc: New test.
* testsuite/29_atomics/atomic_float/requirements_cxx23.cc: New test.
2022-10-17 Jonathan Wakely <jwakely@redhat.com>
* include/std/charconv (__cpp_lib_constexpr_charconv): Define to
correct value.
* include/std/version (__cpp_lib_constexpr_charconv): Likewise.
* testsuite/20_util/to_chars/constexpr.cc: Check correct value.
* testsuite/20_util/to_chars/version.cc: Likewise.
2022-10-15 Jonathan Wakely <jwakely@redhat.com>
* src/c++11/debug.cc (print_raw): Move inside #if block.
2022-10-15 Jonathan Wakely <jwakely@redhat.com>
* include/bits/charconv.h (__to_chars_10_impl): Add constexpr
for C++23. Remove 'static' from array.
* include/std/charconv (__cpp_lib_constexpr_charconv): Define.
(__to_chars, __to_chars_16): Remove 'static' from array, add
constexpr.
(__to_chars_10, __to_chars_8, __to_chars_2, __to_chars_i)
(to_chars, __raise_and_add, __from_chars_pow2_base)
(__from_chars_alnum, from_chars): Add constexpr.
(__from_chars_alnum_to_val): Avoid local static during constant
evaluation. Add constexpr.
* include/std/version (__cpp_lib_constexpr_charconv): Define.
* testsuite/20_util/from_chars/constexpr.cc: New test.
* testsuite/20_util/to_chars/constexpr.cc: New test.
* testsuite/20_util/to_chars/version.cc: New test.
2022-10-15 Jonathan Wakely <jwakely@redhat.com>
* include/bits/stl_map.h (map::insert(Pair&&)): Use
remove_const_t on argument to __is_pair.
* include/bits/stl_pair.h (__is_pair<const pair<T,U>>): Remove
partial specialization.
* include/bits/uses_allocator_args.h (_Std_pair): Use
remove_cv_t as per LWG 3677.
* testsuite/20_util/uses_allocator/lwg3677.cc: New test.
2022-10-14 Jonathan Wakely <jwakely@redhat.com>
* libsupc++/eh_alloc.cc [USE_POOL]: New macro.
[!USE_POOL] (__gnu_cxx::__freeres, pool): Do not define.
[_GLIBCXX_EH_POOL_STATIC] (pool::arena): Do not use std::max.
(__cxxabiv1::__cxa_allocate_exception) [!USE_POOL]: Do not use
pool.
(__cxxabiv1::__cxa_free_exception) [!USE_POOL]: Likewise.
(__cxxabiv1::__cxa_allocate_dependent_exception) [!USE_POOL]:
Likewise.
(__cxxabiv1::__cxa_free_dependent_exception) [!USE_POOL]:
Likewise.
2022-10-14 Jonathan Wakely <jwakely@redhat.com>
* src/c++11/debug.cc (print_raw): Simplify.
(print_word): Print indentation by calling fprintf directly.
(_Error_formatter::_M_error): Print unindented string by calling
fprintf directly.
2022-10-14 Jonathan Wakely <jwakely@redhat.com>
* include/std/iostream: Use markdown in Doxygen comment.
2022-10-12 François Dumont <fdumont@gcc.gnu.org>
* include/debug/string: Add using _Base::compare.
(__gnu_debug::basic_string<>::compare(const basic_string<>&)): Remove.
(__gnu_debug::basic_string<>::compare(size_type, size_type, const basic_string<>&)):
Remove.
(__gnu_debug::basic_string<>::compare(size_type, size_type, const basic_string<>&,
size_type, size_type)): Remove.
* testsuite/util/testsuite_string.h [_GLIBCXX_TEST_DEBUG_STRING]: Include <debug/string>.
* testsuite/21_strings/basic_string/operations/compare/char/1.cc: Include testsuite_string.h
and use __gnu_test::string.
* testsuite/21_strings/basic_string/operations/compare/char/13650.cc: Likewise.
* testsuite/21_strings/basic_string/operations/compare/char/2.cc: Likewise.
* testsuite/21_strings/basic_string/operations/rfind/char/1.cc: Likewise.
* testsuite/21_strings/basic_string/operations/rfind/char/2.cc: Likewise.
* testsuite/21_strings/basic_string/operations/rfind/char/3.cc: Likewise.
* testsuite/21_strings/basic_string/operations/compare/wchar_t/1.cc:
Include testsuite_string.h
and use __gnu_test::wstring.
* testsuite/21_strings/basic_string/operations/compare/wchar_t/13650.cc: Likewise.
* testsuite/21_strings/basic_string/operations/compare/wchar_t/2.cc: Likewise.
2022-10-12 Patrick Palka <ppalka@redhat.com>
* include/std/ranges (repeat_view): Define.
(repeat_view::_Iterator): Define.
(views::__detail::__can_repeat_view): Define.
(views::__detail::__can_bounded_repeat_view): Define.
(views::_Repeat, views::repeat): Define.
* testsuite/std/ranges/repeat/1.cc: New test.
2022-10-12 Martin Liska <mliska@suse.cz>
* configure: Regenerate.
2022-10-11 Jonathan Wakely <jwakely@redhat.com>
PR bootstrap/107221
* libsupc++/eh_alloc.cc (pool): Change preprocessor condition
for using __mutex from __GTHREADS to _GLIBCXX_HOSTED.
(pool::allocate): Remove namespace qualification to use
pool::__scoped_lock instead of __gnu_cxx::__scoped_lock.
2022-10-11 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/68606
* Makefile.in: Regenerate.
* acinclude.m4 (GLIBCXX_EMERGENCY_EH_ALLOC): New macro.
* configure: Regenerate.
* configure.ac: Use GLIBCXX_EMERGENCY_EH_ALLOC.
* crossconfig.m4: Check for secure_getenv.
* doc/Makefile.in: Regenerate.
* doc/xml/manual/configure.xml: Document new configure options.
* doc/xml/manual/evolution.xml: Document addition of tunables.
* doc/xml/manual/using_exceptions.xml: Document emergency
buffer and tunables.
* doc/html/*: Regenerate.
* include/Makefile.in: Regenerate.
* libsupc++/Makefile.am: Use EH_POOL_FLAGS.
* libsupc++/Makefile.in: Regenerate.
* libsupc++/eh_alloc.cc (EMERGENCY_OBJ_SIZE): Define in units
of sizeof(void*) not including the ABI's exception header.
(EMERGENCY_OBJ_COUNT): Define as target-independent calculation
based on word size.
(MAX_OBJ_COUNT): Define macro for upper limit on pool size.
(pool) [_GLIBCXX_EH_POOL_STATIC]: Use fixed-size buffer.
(pool::buffer_size_in_bytes): New static member function.
(pool::pool): Parse GLIBCXX_TUNABLES environment variable to set
pool size at runtime.
(pool::in_pool): Use std::less<void*> for total order.
(__freeres) [_GLIBCXX_EH_POOL_STATIC]: Do nothing.
(__cxa_free_exception, __cxa_free_dependent_exception): Add
[[unlikely]] attributes.
* po/Makefile.in: Regenerate.
* python/Makefile.in: Regenerate.
* src/Makefile.in: Regenerate.
* src/c++11/Makefile.in: Regenerate.
* src/c++17/Makefile.in: Regenerate.
* src/c++20/Makefile.in: Regenerate.
* src/c++98/Makefile.in: Regenerate.
* src/filesystem/Makefile.in: Regenerate.
* src/libbacktrace/Makefile.in: Regenerate.
* testsuite/Makefile.in: Regenerate.
2022-10-11 Olivier Hainque <hainque@adacore.com>
Olivier Hainque <hainque@adacore.com>
* configure: Regenerate.
2022-10-10 Jonathan Wakely <jwakely@redhat.com>
* include/std/type_traits (make_signed, make_unsigned): Remove
constraints on primary template.
* testsuite/20_util/make_signed/requirements/typedefs_neg.cc:
Undo changes to expected error in C++20 mode.
* testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc:
Likewise.
* testsuite/24_iterators/range_access/range_access_cpp20_neg.cc:
Likewise.
* testsuite/20_util/make_signed/requirements/uninstantiated.cc:
New test.
* testsuite/20_util/make_unsigned/requirements/uninstantiated.cc:
New test.
2022-10-10 Jonathan Wakely <jwakely@redhat.com>
* include/std/type_traits (make_signed, make_unsigned): Add
specializations for cv bool. Add requires-clause for C++20 to
improve diagnostics for non-integral, non-enum cases.
* testsuite/20_util/make_signed/requirements/typedefs_neg.cc:
Check cv bool.
* testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc:
Likewise.
* testsuite/24_iterators/range_access/range_access_cpp20_neg.cc:
Adjust expected errors for C++20 and later.
* testsuite/lib/prune.exp: Prune "in requirements [with ...]"
lines from diagnostics.
2022-10-07 Jonathan Wakely <jwakely@redhat.com>
* acinclude.m4 (GLIBCXX_ENABLE_HOSTED): Add libstdcxx-hosted
enable arg as an alias for hosted-libstdcxx enable arg.
* configure: Regenerate.
2022-10-07 Jonathan Wakely <jwakely@redhat.com>
* include/bits/std_function.h: Include <new> but do not include
<bits/stl_function.h>.
* include/std/functional: Do not include <new>.
2022-10-07 Jonathan Wakely <jwakely@redhat.com>
* doc/xml/manual/intro.xml: Add role="bold" attribute to
emphasis elements for issue titles.
* doc/html/manual/bugs.html: Regenerate.
2022-10-05 Jonathan Wakely <jwakely@redhat.com>
* include/Makefile.in: Regenerate.
2022-10-05 Jonathan Wakely <jwakely@redhat.com>
* include/bits/invoke.h (__invoke_r): Check
__has_builtin(__reference_converts_from_temporary) before using
built-in.
2022-10-04 Jonathan Wakely <jwakely@redhat.com>
* testsuite/std/ranges/adaptors/join_with/1.cc: Remove unused
<sstream header.
(test04): Remove constexpr for old std::string ABI and test at
runtime.
2022-10-04 Jonathan Wakely <jwakely@redhat.com>
* include/std/type_traits (remove_cv): Use __remove_cv built-in.
(remove_reference): Use __remove_reference built-in.
(remove_cvref): Use __remove_cvref built-in. Remove inheritance
for fallback implementation.
2022-10-04 Jonathan Wakely <jwakely@redhat.com>
* include/bits/random.h (__is_seed_seq): Replace with ...
(_If_seed_seq_for): ... this.
* include/ext/random: Adjust to use _If_seed_seq_for.
2022-10-04 Patrick Palka <ppalka@redhat.com>
* include/std/ranges (join_with_view::_Iterator::operator*):
Replace use of std::visit with manual visitation.
(join_with_view::_Iterator::operator++): Likewise.
(join_with_view::_Iterator::operator--): Likewise.
(join_with_view::_Iterator::iter_move): Likewise.
(join_with_view::_Iterator::iter_swap): Likewise.
2022-10-04 Jonathan Wakely <jwakely@redhat.com>
* testsuite/25_algorithms/stable_sort/mem_check.cc: Do nto run
for freestanding.
2022-10-04 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/107139
* include/std/coroutine: Remove all _GLIBCXXHOSTED preprocessor
conditionals.
2022-10-04 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/107134
* include/c_global/cstdint [!_GLIBCXX_HOSTED]: Include
<stdint-gcc.h> directly.
2022-10-04 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/107135
* include/bits/functexcept.h [!_GLIBCXX_HOSTED]
(__throw_invalid_argument, __throw_out_of_range)
(__throw_out_of_range_fmt, __throw_runtime_error)
(__throw_overflow_error): Define inline.
* include/std/bitset (_M_copy_from_ptr) [!_GLIBCXX_HOSTED]:
Replace __builtin_abort with __throw_invalid_argument.
2022-10-04 Patrick Palka <ppalka@redhat.com>
* include/std/ranges: Include <variant> for C++23.
(__detail::__compatible_joinable_ranges): Define.
(__detail::__bidirectional_common): Define.
(join_with_view): Define.
(join_with_view::_Iterator): Define.
(join_with_view::_Sentinel): Define.
(views::__detail::__can_join_with_view): Define.
(views::_JoinWith, views::join_with): Define.
* testsuite/std/ranges/adaptors/join_with/1.cc: New test.
2022-10-04 Arsen Arsenović <arsen@aarsen.me>
* include/std/iostream: Use ///< for inline documentation.
* include/std/limits: Likewise.
* include/experimental/internet: Likewise.
2022-10-03 Jonathan Wakely <jwakely@redhat.com>
* doc/xml/manual/status_cxx2020.xml: Update C++20 status.
* doc/html/manual/status.html: Regenerate.
2022-10-03 Arsen Arsenović <arsen@aarsen.me>
PR libstdc++/103626
* testsuite/17_intro/headers/c++1998/stdc++_assert_neg.cc:
Require ET hosted.
* testsuite/18_support/aligned_alloc/aligned_alloc.cc: Likewise.
* testsuite/18_support/new_nothrow.cc: Likewise.
* testsuite/20_util/allocator/105975.cc: Likewise.
* testsuite/20_util/allocator/14176.cc: Likewise.
* testsuite/20_util/allocator/64135.cc: Likewise.
* testsuite/20_util/allocator/89510.cc: Likewise.
* testsuite/20_util/allocator/lwg3190.cc: Likewise.
* testsuite/20_util/allocator/overaligned.cc: Likewise.
* testsuite/20_util/allocator/rebind_c++20.cc: Likewise.
* testsuite/20_util/allocator/requirements/constexpr.cc:
Likewise.
* testsuite/20_util/allocator/requirements/explicit_instantiation/1.cc:
Likewise.
* testsuite/20_util/allocator/requirements/typedefs.cc:
Likewise.
* testsuite/20_util/allocator/requirements/typedefs_c++20.cc:
Likewise.
* testsuite/20_util/allocator/void.cc: Likewise.
* testsuite/20_util/allocator_traits/header-2.cc: Likewise.
* testsuite/20_util/allocator_traits/header.cc: Likewise.
* testsuite/20_util/allocator_traits/members/92878_92947.cc:
Likewise.
* testsuite/20_util/allocator_traits/members/pointers.cc:
Likewise.
* testsuite/20_util/allocator_traits/requirements/typedefs.cc:
Likewise.
* testsuite/20_util/bad_function_call/cons_virtual_derivation.cc:
Likewise.
* testsuite/20_util/bind/42593.cc: Likewise.
* testsuite/20_util/bitset/access/dr396.cc: Likewise.
* testsuite/20_util/bitset/access/to_string.cc: Likewise.
* testsuite/20_util/bitset/cons/16020.cc: Likewise.
* testsuite/20_util/bitset/cons/dr1325-2.cc: Likewise.
* testsuite/20_util/bitset/cons/dr396.cc: Likewise.
* testsuite/20_util/bitset/debug/invalidation/1.cc: Likewise.
* testsuite/20_util/bitset/ext/15361.cc: Likewise.
* testsuite/20_util/bitset/operations/13838.cc: Likewise.
* testsuite/20_util/bitset/operations/96303.cc: Likewise.
* testsuite/20_util/bitset/version.cc: Likewise.
* testsuite/20_util/enable_shared_from_this/56383.cc: Likewise.
* testsuite/20_util/enable_shared_from_this/89303.cc: Likewise.
* testsuite/20_util/enable_shared_from_this/members/assign.cc:
Likewise.
* testsuite/20_util/enable_shared_from_this/members/const.cc:
Likewise.
* testsuite/20_util/enable_shared_from_this/members/reinit.cc:
Likewise.
* testsuite/20_util/enable_shared_from_this/members/unique_ptr.cc:
Likewise.
* testsuite/20_util/enable_shared_from_this/members/weak_from_this.cc:
Likewise.
* testsuite/20_util/enable_shared_from_this/requirements/explicit_instantiation.cc:
Likewise.
* testsuite/20_util/forward/1.cc: Likewise.
* testsuite/20_util/forward/1_neg.cc: Likewise.
* testsuite/20_util/function/1.cc: Likewise.
* testsuite/20_util/function/10.cc: Likewise.
* testsuite/20_util/function/2.cc: Likewise.
* testsuite/20_util/function/3.cc: Likewise.
* testsuite/20_util/function/4.cc: Likewise.
* testsuite/20_util/function/43397.cc: Likewise.
* testsuite/20_util/function/48541.cc: Likewise.
* testsuite/20_util/function/5.cc: Likewise.
* testsuite/20_util/function/58569.cc: Likewise.
* testsuite/20_util/function/6.cc: Likewise.
* testsuite/20_util/function/60594.cc: Likewise.
* testsuite/20_util/function/65760.cc: Likewise.
* testsuite/20_util/function/69222.cc: Likewise.
* testsuite/20_util/function/7.cc: Likewise.
* testsuite/20_util/function/77322.cc: Likewise.
* testsuite/20_util/function/8.cc: Likewise.
* testsuite/20_util/function/9.cc: Likewise.
* testsuite/20_util/function/91456.cc: Likewise.
* testsuite/20_util/function/assign/move.cc: Likewise.
* testsuite/20_util/function/assign/move_target.cc: Likewise.
* testsuite/20_util/function/cmp/cmp_neg.cc: Likewise.
* testsuite/20_util/function/cons/55320.cc: Likewise.
* testsuite/20_util/function/cons/57465.cc: Likewise.
* testsuite/20_util/function/cons/72820.cc: Likewise.
* testsuite/20_util/function/cons/addressof.cc: Likewise.
* testsuite/20_util/function/cons/callable.cc: Likewise.
* testsuite/20_util/function/cons/deduction.cc: Likewise.
* testsuite/20_util/function/cons/lwg2774.cc: Likewise.
* testsuite/20_util/function/cons/move.cc: Likewise.
* testsuite/20_util/function/cons/move_target.cc: Likewise.
* testsuite/20_util/function/cons/noexcept.cc: Likewise.
* testsuite/20_util/function/cons/non_copyconstructible.cc:
Likewise.
* testsuite/20_util/function/cons/refqual.cc: Likewise.
* testsuite/20_util/function/cons/70692.cc: Likewise.
* testsuite/20_util/function/cons/deduction_c++23.cc: Likewise.
* testsuite/20_util/function/invoke/forwarding.cc: Likewise.
* testsuite/20_util/function/invoke/move_only.cc: Likewise.
* testsuite/20_util/function/null_pointer_comparisons.cc:
Likewise.
* testsuite/20_util/function/requirements/explicit_instantiation.cc:
Likewise.
* testsuite/20_util/function/target_no_rtti.cc: Likewise.
* testsuite/20_util/function_objects/83607.cc: Likewise.
* testsuite/20_util/function_objects/mem_fn/adl.cc: Likewise.
* testsuite/20_util/headers/cstdlib/functions_std.cc: Likewise.
* testsuite/20_util/headers/functional/types_std_c++0x.cc:
Likewise.
* testsuite/20_util/headers/memory/types_std_c++0x.cc: Likewise.
* testsuite/20_util/is_function/35637.cc: Likewise.
* testsuite/20_util/move/1.cc: Likewise.
* testsuite/20_util/move_only_function/call.cc: Likewise.
* testsuite/20_util/move_only_function/cons.cc: Likewise.
* testsuite/20_util/move_only_function/move.cc: Likewise.
* testsuite/20_util/move_only_function/version.cc: Likewise.
* testsuite/20_util/owner_less/cmp.cc: Likewise.
* testsuite/20_util/owner_less/noexcept.cc: Likewise.
* testsuite/20_util/owner_less/void.cc: Likewise.
* testsuite/20_util/pointer_safety/1.cc: Likewise.
* testsuite/20_util/scoped_allocator/65279.cc: Likewise.
* testsuite/20_util/scoped_allocator/69293_neg.cc: Likewise.
* testsuite/20_util/scoped_allocator/construct_pair.cc:
Likewise.
* testsuite/20_util/scoped_allocator/dr2586.cc: Likewise.
* testsuite/20_util/scoped_allocator/requirements/explicit_instantiation.cc:
Likewise.
* testsuite/20_util/shared_ptr/assign/assign.cc: Likewise.
* testsuite/20_util/shared_ptr/assign/auto_ptr.cc: Likewise.
* testsuite/20_util/shared_ptr/assign/auto_ptr_neg.cc: Likewise.
* testsuite/20_util/shared_ptr/assign/auto_ptr_rvalue.cc:
Likewise.
* testsuite/20_util/shared_ptr/assign/dr541.cc: Likewise.
* testsuite/20_util/shared_ptr/assign/move.cc: Likewise.
* testsuite/20_util/shared_ptr/assign/sfinae.cc: Likewise.
* testsuite/20_util/shared_ptr/assign/shared_ptr.cc: Likewise.
* testsuite/20_util/shared_ptr/assign/shared_ptr_neg.cc:
Likewise.
* testsuite/20_util/shared_ptr/assign/unique_ptr_lvalue_neg.cc:
Likewise.
* testsuite/20_util/shared_ptr/assign/unique_ptr_rvalue.cc:
Likewise.
* testsuite/20_util/shared_ptr/atomic/1.cc: Likewise.
* testsuite/20_util/shared_ptr/atomic/2.cc: Likewise.
* testsuite/20_util/shared_ptr/casts/1.cc: Likewise.
* testsuite/20_util/shared_ptr/casts/reinterpret.cc: Likewise.
* testsuite/20_util/shared_ptr/casts/rval.cc: Likewise.
* testsuite/20_util/shared_ptr/comparison/42925.cc: Likewise.
* testsuite/20_util/shared_ptr/comparison/86537.cc: Likewise.
* testsuite/20_util/shared_ptr/comparison/cmp.cc: Likewise.
* testsuite/20_util/shared_ptr/comparison/cmp_c++20.cc:
Likewise.
* testsuite/20_util/shared_ptr/comparison/dr1401.cc: Likewise.
* testsuite/20_util/shared_ptr/comparison/less.cc: Likewise.
* testsuite/20_util/shared_ptr/cons/39405.cc: Likewise.
* testsuite/20_util/shared_ptr/cons/43820_neg.cc: Likewise.
* testsuite/20_util/shared_ptr/cons/46910.cc: Likewise.
* testsuite/20_util/shared_ptr/cons/51365.cc: Likewise.
* testsuite/20_util/shared_ptr/cons/52924.cc: Likewise.
* testsuite/20_util/shared_ptr/cons/55123.cc: Likewise.
* testsuite/20_util/shared_ptr/cons/58659.cc: Likewise.
* testsuite/20_util/shared_ptr/cons/58839.cc: Likewise.
* testsuite/20_util/shared_ptr/cons/61036.cc: Likewise.
* testsuite/20_util/shared_ptr/cons/79467.cc: Likewise.
* testsuite/20_util/shared_ptr/cons/80229.cc: Likewise.
* testsuite/20_util/shared_ptr/cons/alias-rval.cc: Likewise.
* testsuite/20_util/shared_ptr/cons/alias.cc: Likewise.
* testsuite/20_util/shared_ptr/cons/array.cc: Likewise.
* testsuite/20_util/shared_ptr/cons/auto_ptr.cc: Likewise.
* testsuite/20_util/shared_ptr/cons/auto_ptr_neg.cc: Likewise.
* testsuite/20_util/shared_ptr/cons/copy.cc: Likewise.
* testsuite/20_util/shared_ptr/cons/deduction.cc: Likewise.
* testsuite/20_util/shared_ptr/cons/default.cc: Likewise.
* testsuite/20_util/shared_ptr/cons/lwg2802.cc: Likewise.
* testsuite/20_util/shared_ptr/cons/lwg3548.cc: Likewise.
* testsuite/20_util/shared_ptr/cons/move.cc: Likewise.
* testsuite/20_util/shared_ptr/cons/noexcept_move_construct.cc:
Likewise.
* testsuite/20_util/shared_ptr/cons/nullptr.cc: Likewise.
* testsuite/20_util/shared_ptr/cons/pointer.cc: Likewise.
* testsuite/20_util/shared_ptr/cons/unique_ptr.cc: Likewise.
* testsuite/20_util/shared_ptr/cons/unique_ptr_array.cc:
Likewise.
* testsuite/20_util/shared_ptr/cons/unique_ptr_deleter.cc:
Likewise.
* testsuite/20_util/shared_ptr/cons/unique_ptr_deleter_ref_1.cc:
Likewise.
* testsuite/20_util/shared_ptr/cons/unique_ptr_deleter_ref_2.cc:
Likewise.
* testsuite/20_util/shared_ptr/cons/void_neg.cc: Likewise.
* testsuite/20_util/shared_ptr/cons/weak_ptr.cc: Likewise.
* testsuite/20_util/shared_ptr/creation/36949.cc: Likewise.
* testsuite/20_util/shared_ptr/creation/58594-no-rtti.cc:
Likewise.
* testsuite/20_util/shared_ptr/creation/58594.cc: Likewise.
* testsuite/20_util/shared_ptr/creation/87278.cc: Likewise.
* testsuite/20_util/shared_ptr/creation/92878_92947.cc:
Likewise.
* testsuite/20_util/shared_ptr/creation/99006.cc: Likewise.
* testsuite/20_util/shared_ptr/creation/dr402.cc: Likewise.
* testsuite/20_util/shared_ptr/creation/dr925.cc: Likewise.
* testsuite/20_util/shared_ptr/creation/make.cc: Likewise.
* testsuite/20_util/shared_ptr/creation/no_rtti.cc: Likewise.
* testsuite/20_util/shared_ptr/creation/overwrite.cc: Likewise.
* testsuite/20_util/shared_ptr/creation/private.cc: Likewise.
* testsuite/20_util/shared_ptr/creation/single_allocation.cc:
Likewise.
* testsuite/20_util/shared_ptr/creation/single_allocation_no_rtti.cc:
Likewise.
* testsuite/20_util/shared_ptr/creation/version.cc: Likewise.
* testsuite/20_util/shared_ptr/dest/dest.cc: Likewise.
* testsuite/20_util/shared_ptr/hash/1.cc: Likewise.
* testsuite/20_util/shared_ptr/misc/24595.cc: Likewise.
* testsuite/20_util/shared_ptr/misc/42019.cc: Likewise.
* testsuite/20_util/shared_ptr/misc/get_deleter.cc: Likewise.
* testsuite/20_util/shared_ptr/misc/swap.cc: Likewise.
* testsuite/20_util/shared_ptr/modifiers/reset.cc: Likewise.
* testsuite/20_util/shared_ptr/modifiers/reset_neg.cc: Likewise.
* testsuite/20_util/shared_ptr/modifiers/reset_sfinae.cc:
Likewise.
* testsuite/20_util/shared_ptr/modifiers/swap.cc: Likewise.
* testsuite/20_util/shared_ptr/modifiers/swap_neg.cc: Likewise.
* testsuite/20_util/shared_ptr/observers/array.cc: Likewise.
* testsuite/20_util/shared_ptr/observers/bool_conv.cc: Likewise.
* testsuite/20_util/shared_ptr/observers/get.cc: Likewise.
* testsuite/20_util/shared_ptr/observers/owner_before.cc:
Likewise.
* testsuite/20_util/shared_ptr/observers/unique.cc: Likewise.
* testsuite/20_util/shared_ptr/observers/use_count.cc: Likewise.
* testsuite/20_util/shared_ptr/requirements/explicit_instantiation/1.cc:
Likewise.
* testsuite/20_util/shared_ptr/requirements/explicit_instantiation/2.cc:
Likewise.
* testsuite/20_util/shared_ptr/requirements/weak_type.cc:
Likewise.
* testsuite/20_util/specialized_algorithms/construct_at/95788.cc:
Likewise.
* testsuite/20_util/temporary_buffer.cc: Likewise.
* testsuite/20_util/tuple/48476.cc: Likewise.
* testsuite/20_util/tuple/cons/90700.cc: Likewise.
* testsuite/20_util/tuple/cons/96803.cc: Likewise.
* testsuite/20_util/tuple/cons/allocator_with_any.cc: Likewise.
* testsuite/20_util/tuple/cons/allocators.cc: Likewise.
* testsuite/20_util/tuple/cons/constexpr_allocator_arg_t.cc:
Likewise.
* testsuite/20_util/tuple/cons/explicit_construct.cc: Likewise.
* testsuite/20_util/tuple/p2321r2.cc: Likewise.
* testsuite/20_util/unique_ptr/creation/92878_92947.cc:
Likewise.
* testsuite/20_util/unique_ptr/creation/array.cc: Likewise.
* testsuite/20_util/unique_ptr/creation/array_neg.cc: Likewise.
* testsuite/20_util/unique_ptr/creation/constexpr.cc: Likewise.
* testsuite/20_util/unique_ptr/creation/for_overwrite.cc:
Likewise.
* testsuite/20_util/unique_ptr/creation/for_overwrite__neg.cc:
Likewise.
* testsuite/20_util/unique_ptr/creation/single.cc: Likewise.
* testsuite/20_util/uses_allocator/69293_neg.cc: Likewise.
* testsuite/20_util/uses_allocator/92878_92947.cc: Likewise.
* testsuite/20_util/uses_allocator/uninitialized_construct.cc:
Likewise.
* testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Likewise.
* testsuite/20_util/weak_ptr/cons/deduction.cc: Likewise.
* testsuite/20_util/weak_ptr/cons/noexcept_move_construct.cc:
Likewise.
* testsuite/20_util/weak_ptr/lock/1.cc: Likewise.
* testsuite/20_util/weak_ptr/observers/owner_before.cc:
Likewise.
* testsuite/20_util/weak_ptr/requirements/explicit_instantiation/1.cc:
Likewise.
* testsuite/20_util/weak_ptr/requirements/explicit_instantiation/2.cc:
Likewise.
* testsuite/21_strings/basic_string/version.cc: Likewise.
* testsuite/21_strings/basic_string_view/operations/contains/char/2.cc:
Likewise.
* testsuite/21_strings/c_strings/char/69626.cc: Likewise.
* testsuite/21_strings/char_traits/requirements/version.cc:
Likewise.
* testsuite/23_containers/vector/requirements/version.cc:
Likewise.
* testsuite/24_iterators/back_insert_iterator/requirements/base_classes.cc:
Likewise.
* testsuite/24_iterators/front_insert_iterator/requirements/base_classes.cc:
Likewise.
* testsuite/24_iterators/insert_iterator/requirements/base_classes.cc:
Likewise.
* testsuite/24_iterators/istream_iterator/requirements/base_classes.cc:
Likewise.
* testsuite/24_iterators/istreambuf_iterator/92285.cc: Likewise.
* testsuite/24_iterators/istreambuf_iterator/cons/sentinel.cc:
Likewise.
* testsuite/24_iterators/istreambuf_iterator/requirements/base_classes.cc:
Likewise.
* testsuite/24_iterators/istreambuf_iterator/requirements/dr445.cc:
Likewise.
* testsuite/24_iterators/ostream_iterator/requirements/base_classes.cc:
Likewise.
* testsuite/24_iterators/ostreambuf_iterator/requirements/base_classes.cc:
Likewise.
* testsuite/25_algorithms/constexpr_macro.cc: Likewise.
* testsuite/25_algorithms/equal/constrained.cc: Likewise.
* testsuite/25_algorithms/headers/cstdlib/functions_std.cc:
Likewise.
* testsuite/25_algorithms/inplace_merge/1.cc: Likewise.
* testsuite/25_algorithms/lexicographical_compare/constrained.cc:
Likewise.
* testsuite/25_algorithms/make_heap/movable.cc: Likewise.
* testsuite/25_algorithms/pstl/feature_test-4.cc: Likewise.
* testsuite/25_algorithms/random_shuffle/1.cc: Likewise.
* testsuite/25_algorithms/random_shuffle/moveable.cc: Likewise.
* testsuite/25_algorithms/random_shuffle/requirements/explicit_instantiation/2.cc:
Likewise.
* testsuite/25_algorithms/sort/35588.cc: Likewise.
* testsuite/25_algorithms/stable_partition/1.cc: Likewise.
* testsuite/25_algorithms/stable_partition/constrained.cc:
Likewise.
* testsuite/25_algorithms/stable_partition/mem_check.cc:
Likewise.
* testsuite/25_algorithms/stable_partition/moveable.cc:
Likewise.
* testsuite/25_algorithms/stable_partition/requirements/explicit_instantiation/2.cc:
Likewise.
* testsuite/25_algorithms/stable_partition/requirements/explicit_instantiation/pod.cc:
Likewise.
* testsuite/25_algorithms/stable_sort/1.cc: Likewise.
* testsuite/26_numerics/complex/2.cc: Likewise.
* testsuite/26_numerics/headers/cstdlib/13943.cc: Likewise.
* testsuite/26_numerics/headers/cstdlib/2190.cc: Likewise.
* testsuite/26_numerics/headers/cstdlib/60401.cc: Likewise.
* testsuite/26_numerics/headers/cstdlib/dr2192.cc: Likewise.
* testsuite/26_numerics/headers/cstdlib/dr2192_neg.cc: Likewise.
* testsuite/26_numerics/headers/cstdlib/dr2735.cc: Likewise.
* testsuite/26_numerics/headers/cstdlib/functions_std.cc:
Likewise.
* testsuite/26_numerics/headers/cstdlib/macros.cc: Likewise.
* testsuite/26_numerics/headers/cstdlib/types_std.cc: Likewise.
* testsuite/26_numerics/headers/cstdlib/types_std_c++0x.cc:
Likewise.
* testsuite/26_numerics/lerp/version.cc: Likewise.
* testsuite/26_numerics/midpoint/version.cc: Likewise.
* testsuite/27_io/basic_syncbuf/2.cc: Likewise.
* testsuite/27_io/basic_syncstream/2.cc: Likewise.
* testsuite/27_io/fpos/14320-1.cc: Likewise.
* testsuite/27_io/fpos/14320-2.cc: Likewise.
* testsuite/27_io/fpos/14320-3.cc: Likewise.
* testsuite/27_io/fpos/14320-4.cc: Likewise.
* testsuite/27_io/spanstream/version.cc: Likewise.
* testsuite/29_atomics/atomic/lwg3220.cc: Likewise.
* testsuite/29_atomics/atomic/operators/51811.cc: Likewise.
* testsuite/29_atomics/atomic/wait_notify/1.cc: Likewise.
* testsuite/29_atomics/atomic/wait_notify/102994.cc: Likewise.
* testsuite/29_atomics/atomic/wait_notify/2.cc: Likewise.
* testsuite/29_atomics/headers/stdatomic.h/version.cc: Likewise.
* testsuite/30_threads/barrier/2.cc: Likewise.
* testsuite/30_threads/condition_variable_any/stop_token/2.cc:
Likewise.
* testsuite/30_threads/jthread/version.cc: Likewise.
* testsuite/30_threads/latch/2.cc: Likewise.
* testsuite/30_threads/semaphore/2.cc: Likewise.
* testsuite/30_threads/stop_token/2.cc: Likewise.
* testsuite/abi/pr42230.cc: Likewise.
* testsuite/ext/shared_ptr/1.cc: Likewise.
* testsuite/libstdc++-xmethods/shared_ptr.cc: Likewise.
* testsuite/std/ranges/adaptors/lazy_split_neg.cc: Likewise.
* testsuite/std/ranges/adaptors/p1739.cc: Likewise.
* testsuite/std/ranges/iota/lwg3292_neg.cc: Likewise.
* testsuite/std/ranges/p2325.cc: Likewise.
2022-10-03 Jonathan Wakely <jwakely@redhat.com>
* include/std/bitset (bitset(const C*, size_type n, C, C))
[!_GLIBCXX_HOSTED]: Remove std::basic_string dependency.
(_M_copy_from_ptr) [!_GLIBCXX_HOSTED]: Abort instead of
throwing.
2022-10-03 Arsen Arsenović <arsen@aarsen.me>
PR libstdc++/103626
* include/std/bitset [!_GLIBCXX_HOSTED]: Re-enable std::hash.
* testsuite/20_util/bitset/cons/constexpr_c++23.cc: Require ET
hosted.
* testsuite/20_util/bitset/ext/constexpr.cc: Likewise.
2022-10-03 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/103626
* testsuite/lib/libstdc++.exp (check_effective_target_stacktrace):
Also require hosted.
(check_effective_target_hosted): New proc.
2022-10-03 Arsen Arsenović <arsen@aarsen.me>
Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/103626
* testsuite/17_intro/headers/c++1998/stdc++.cc [!__STDC_HOSTED__]:
Do not include C headers that aren't valid for freestanding.
* testsuite/17_intro/tag_type_explicit_ctor.cc [!__STDC_HOSTED__]:
Do not test tag types that aren't defined for freestanding.
* testsuite/18_support/headers/cstdlib/functions_std.cc: Do not
check for std::getenv and std::system for freestanding.
* testsuite/17_intro/using_namespace_std_exp_neg.cc [!__STDC_HOSTED__]:
Do not test hosted parts of the standard library.
* testsuite/17_intro/using_namespace_std_tr1_neg.cc [!__STDC_HOSTED__]:
Likewise.
* testsuite/20_util/allocator_traits/members/rebind_alloc.cc [!__STDC_HOSTED__]:
Likewise.
* testsuite/20_util/allocator_traits/requirements/explicit_instantiation.cc [!HOSTED]:
Likewise.
* testsuite/20_util/headers/bitset/synopsis.cc [!__STDC_HOSTED__]: Likewise.
* testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc [!__STDC_HOSTED__]:
Likewise.
* testsuite/20_util/pointer_traits/requirements/typedefs.cc [!__STDC_HOSTED__]:
Likewise.
* testsuite/20_util/tuple/cons/deduction.cc [!__STDC_HOSTED__]: Likewise.
* testsuite/25_algorithms/move/93872.cc [!__STDC_HOSTED__]: Likewise.
* testsuite/std/ranges/adaptors/100577.cc [!__STDC_HOSTED__]: Likewise.
2022-10-03 Arsen Arsenović <arsen@aarsen.me>
PR libstdc++/106953
* include/Makefile.am [!_GLIBCXX_HOSTED]: Remove
install-freestanding-headers, unifying it with the usual
install-headers
* include/Makefile.in: Regenerate.
2022-10-03 Arsen Arsenović <arsen@aarsen.me>
Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/103626
* include/Makefile.am: Add new header.
* include/Makefile.in: Regenerate.
* include/bits/requires_hosted.h: New header.
* include/experimental/algorithm: Include
<bits/requires_hosted.h>.
* include/experimental/any: Likewise.
* include/experimental/array: Likewise.
* include/experimental/buffer: Likewise.
* include/experimental/chrono: Likewise.
* include/experimental/deque: Likewise.
* include/experimental/executor: Likewise.
* include/experimental/filesystem: Likewise.
* include/experimental/forward_list: Likewise.
* include/experimental/functional: Likewise.
* include/experimental/internet: Likewise.
* include/experimental/io_context: Likewise.
* include/experimental/iterator: Likewise.
* include/experimental/list: Likewise.
* include/experimental/map: Likewise.
* include/experimental/memory: Likewise.
* include/experimental/memory_resource: Likewise.
* include/experimental/net: Likewise.
* include/experimental/netfwd: Likewise.
* include/experimental/numeric: Likewise.
* include/experimental/optional: Likewise.
* include/experimental/propagate_const: Likewise.
* include/experimental/random: Likewise.
* include/experimental/ratio: Likewise.
* include/experimental/regex: Likewise.
* include/experimental/scope: Likewise.
* include/experimental/set: Likewise.
* include/experimental/simd: Likewise.
* include/experimental/socket: Likewise.
* include/experimental/source_location: Likewise.
* include/experimental/string: Likewise.
* include/experimental/string_view: Likewise.
* include/experimental/system_error: Likewise.
* include/experimental/timer: Likewise.
* include/experimental/tuple: Likewise.
* include/experimental/unordered_map: Likewise.
* include/experimental/unordered_set: Likewise.
* include/experimental/utility: Likewise.
* include/experimental/vector: Likewise.
* include/std/barrier: Likewise.
* include/std/chrono: Likewise.
* include/std/condition_variable: Likewise.
* include/std/deque: Likewise.
* include/std/execution: Likewise.
* include/std/filesystem: Likewise.
* include/std/forward_list: Likewise.
* include/std/fstream: Likewise.
* include/std/future: Likewise.
* include/std/iomanip: Likewise.
* include/std/ios: Likewise.
* include/std/iosfwd: Likewise.
* include/std/iostream: Likewise.
* include/std/istream: Likewise.
* include/std/latch: Likewise.
* include/std/list: Likewise.
* include/std/locale: Likewise.
* include/std/map: Likewise.
* include/std/memory_resource: Likewise.
* include/std/mutex: Likewise.
* include/std/ostream: Likewise.
* include/std/queue: Likewise.
* include/std/random: Likewise.
* include/std/regex: Likewise.
* include/std/semaphore: Likewise.
* include/std/set: Likewise.
* include/std/shared_mutex: Likewise.
* include/std/spanstream: Likewise.
* include/std/sstream: Likewise.
* include/std/stack: Likewise.
* include/std/stacktrace: Likewise.
* include/std/stop_token: Likewise.
* include/std/streambuf: Likewise.
* include/std/string: Likewise.
* include/std/syncstream: Likewise.
* include/std/system_error: Likewise.
* include/std/thread: Likewise.
* include/std/unordered_map: Likewise.
* include/std/unordered_set: Likewise.
* include/std/valarray: Likewise.
* include/std/vector: Likewise.
* include/tr1/array: Likewise.
* include/tr1/ccomplex: Likewise.
* include/tr1/cctype: Likewise.
* include/tr1/cfenv: Likewise.
* include/tr1/cfloat: Likewise.
* include/tr1/cinttypes: Likewise.
* include/tr1/climits: Likewise.
* include/tr1/cmath: Likewise.
* include/tr1/complex: Likewise.
* include/tr1/complex.h: Likewise.
* include/tr1/cstdarg: Likewise.
* include/tr1/cstdbool: Likewise.
* include/tr1/cstdint: Likewise.
* include/tr1/cstdio: Likewise.
* include/tr1/cstdlib: Likewise.
* include/tr1/ctgmath: Likewise.
* include/tr1/ctime: Likewise.
* include/tr1/ctype.h: Likewise.
* include/tr1/cwchar: Likewise.
* include/tr1/cwctype: Likewise.
* include/tr1/fenv.h: Likewise.
* include/tr1/float.h: Likewise.
* include/tr1/functional: Likewise.
* include/tr1/inttypes.h: Likewise.
* include/tr1/limits.h: Likewise.
* include/tr1/math.h: Likewise.
* include/tr1/memory: Likewise.
* include/tr1/random: Likewise.
* include/tr1/regex: Likewise.
* include/tr1/stdarg.h: Likewise.
* include/tr1/stdbool.h: Likewise.
* include/tr1/stdint.h: Likewise.
* include/tr1/stdio.h: Likewise.
* include/tr1/stdlib.h: Likewise.
* include/tr1/tgmath.h: Likewise.
* include/tr1/tuple: Likewise.
* include/tr1/type_traits: Likewise.
* include/tr1/unordered_map: Likewise.
* include/tr1/unordered_set: Likewise.
* include/tr1/utility: Likewise.
* include/tr1/wchar.h: Likewise.
* include/tr1/wctype.h: Likewise.
* include/c_global/cmath: Likewise.
* include/ext/algorithm: Include <bits/requires_hosted.h>.
* include/ext/bitmap_allocator.h: Likewise.
* include/ext/cmath: Likewise.
* include/ext/codecvt_specializations.h: Likewise.
* include/ext/debug_allocator.h: Likewise.
* include/ext/enc_filebuf.h: Likewise.
* include/ext/extptr_allocator.h: Likewise.
* include/ext/functional: Likewise.
* include/ext/malloc_allocator.h: Likewise.
* include/ext/memory: Likewise.
* include/ext/mt_allocator.h: Likewise.
* include/ext/new_allocator.h: Likewise.
* include/ext/numeric: Likewise.
* include/ext/pod_char_traits.h: Likewise.
* include/ext/pool_allocator.h: Likewise.
* include/ext/random: Likewise.
* include/ext/random.tcc: Likewise.
* include/ext/rb_tree: Likewise.
* include/ext/rc_string_base.h: Likewise.
* include/ext/rope: Likewise.
* include/ext/ropeimpl.h: Likewise.
* include/ext/slist: Likewise.
* include/ext/sso_string_base.h: Likewise.
* include/ext/stdio_filebuf.h: Likewise.
* include/ext/stdio_sync_filebuf.h: Likewise.
* include/ext/string_conversions.h: Likewise.
* include/ext/throw_allocator.h: Likewise.
* include/ext/vstring.h: Likewise.
* include/ext/vstring.tcc: Likewise.
* include/ext/vstring_fwd.h: Likewise.
* include/ext/vstring_util.h: Likewise.
* include/std/charconv: Likewise.
(__cpp_lib_to_chars): Do not define for freestanding.
* include/std/version: Adjust which macros get defined in
freestanding.
* include/ext/pointer.h [!_GLIBCXX_HOSTED]: Omit iostream
functionality from freestanding.
* include/std/algorithm [!_GLIBCXX_HOSTED]: Omit PSTL algos.
* include/std/memory [!_GLIBCXX_HOSTED]: Omit
<bits/stl_tempbuf.h> in freestanding
* include/bits/algorithmfwd.h [!_GLIBCXX_HOSTED]: Omit leftover
random_shuffle and stable_partition definition.
* include/bits/stl_algo.h [!_GLIBCXX_HOSTED]: Omit
random_shuffle and stable_partition from freestanding.
* include/bits/ranges_algo.h [!_GLIBCXX_HOSTED]: Omit
stable_partition from freestanding.
* include/bits/concept_check.h: Remove needless HOSTED check.
* include/std/iterator: Include <bits/ranges_base.h>.
* include/std/numeric (__cpp_lib_parallel_algorithms): Do not
define for freestanding.
* include/std/functional (__cpp_lib_boyer_moore_searcher):
Likewise.
* testsuite/lib/prune.exp: Match error for hosted-only libstdc++
tests.
2022-10-03 Jonathan Wakely <jwakely@redhat.com>
Arsen Arsenović <arsen@aarsen.me>
* include/precompiled/extc++.h [!_GLIBCXX_HOSTED]: Do not
include headers that aren't valid for freestanding.
* include/precompiled/stdc++.h [!_GLIBCXX_HOSTED]: Likewise.
2022-10-03 Arsen Arsenović <arsen@aarsen.me>
* configure.ac: Remove any lines that unconditionally include
<stdio.h> from ac_includes_default, when running Autoconf <2.70.
* configure: Regenerate.
2022-10-03 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/103626
* acinclude.m4 (GLIBCXX_ENABLE_HOSTED): Define _GLIBCXX_HOSTED
to __STDC_HOSTED__ for non-freestanding installations.
* configure: Regenerate.
* include/Makefile.am (${host_builddir}/c++config.h): Adjust
grep pattern.
* include/Makefile.in: Regenerate.
* testsuite/lib/libstdc++.exp (v3-build_support): Use
-fno-freestanding.
* testsuite/libstdc++-abi/abi.exp: Likewise.
2022-10-03 Jonathan Wakely <jwakely@redhat.com>
* testsuite/27_io/basic_ostream/inserters_other/char/6.cc:
Change body of unused operator<< overload to throw if called.
* testsuite/27_io/basic_ostream/inserters_other/wchar_t/6.cc:
Likewise.
2022-10-03 François Dumont <fdumont@gcc.gnu.org>
* python/libstdcxx/v6/printers.py (Printer.add_version): Do not add version
namespace for __cxx11 symbols.
(add_one_template_type_printer): Likewise.
(add_one_type_printer): Likewise.
(FilteringTypePrinter._recognizer.recognize): Add a workaround for std::string & al
ambiguous typedef matching both std:: and std::__cxx11:: symbols.
* testsuite/libstdc++-prettyprinters/cxx17.cc: Remove obsolete
\#define _GLIBCXX_USE_CXX11_ABI 0.
* testsuite/libstdc++-prettyprinters/simple.cc: Likewise. Adapt test to accept
std::__cxx11::list.
* testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
* testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
* testsuite/libstdc++-prettyprinters/80276.cc: Likewise and remove xfail for c++20
and debug mode.
* testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
2022-09-30 Jonathan Wakely <jwakely@redhat.com>
* testsuite/20_util/bitset/access/to_ulong.cc: Construct bitset
from binary literal instead of using stringstream.
2022-09-30 Jonathan Wakely <jwakely@redhat.com>
* include/std/bitset (operator>>): Use a simple buffer instead
of std::basic_string.
2022-09-30 Jonathan Wakely <jwakely@redhat.com>
* include/std/bitset (_M_copy_from_ptr, _M_copy_from_string)
(_M_copy_to_string): Change access to private.
(_M_copy_from_string(const basic_string&, size_t, size_t)):
Remove.
(_M_copy_to_string(const basic_string&)): Remove.
2022-09-30 Jonathan Wakely <jwakely@redhat.com>
* testsuite/20_util/bind/ref_neg.cc: Fix dg-prune-output
directive.
2022-09-30 Torbjörn SVENSSON <torbjorn.svensson@foss.st.com>
Yvan ROUX <yvan.roux@foss.st.com>
* testsuite/20_util/bind/ref_neg.cc: Prune Windows paths too.
2022-09-30 Arsen Arsenović <arsen@aarsen.me>
* include/std/bitset: Include <bits/stl_algobase.h>.
2022-09-29 François Dumont <fdumont@gcc.gnu.org>
* python/libstdcxx/v6/printers.py (add_one_template_type_printer): Register
printer for types in std::__debug namespace with template parameters in std::__8
namespace.
2022-09-29 Patrick Palka <ppalka@redhat.com>
* include/bits/unique_ptr.h (unique_ptr<_Tp[], _Dp>): Remove
__remove_cv and use __remove_cv_t instead.
2022-09-29 Jonathan Wakely <jwakely@redhat.com>
* include/std/type_traits (__is_invocable_impl): Check
__has_builtin(__reference_converts_from_temporary) before using
built-in.
2022-09-28 Jonathan Wakely <jwakely@redhat.com>
* doc/xml/manual/evolution.xml: Document std::bind API
changes.
* doc/xml/manual/intro.xml: Document LWG 2487 status.
* doc/xml/manual/using.xml: Clarify default value of
_GLIBCXX_USE_DEPRECATED.
* doc/html/*: Regenerate.
* include/std/functional (_Bind::operator()(Args&&...) volatile)
(_Bind::operator()(Args&&...) const volatile)
(_Bind_result::operator()(Args&&...) volatile)
(_Bind_result::operator()(Args&&...) const volatile): Replace
with deleted overload for C++20 and later.
* testsuite/20_util/bind/cv_quals.cc: Check for deprecated
warnings in C++17.
* testsuite/20_util/bind/cv_quals_2.cc: Likewise, and check for
ill-formed in C++20.
2022-09-28 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/70692
* include/bits/invoke.h [__cplusplus < 201703] (__invoke_r):
Remove is_invocable and is_convertible constraints.
* include/std/type_traits (__is_invocable_impl::_S_conv): Use
non-deduced context for parameter.
(__is_invocable_impl::_S_test): Remove _Check_noex template
parameter and use deduced noexcept value in its place. Add bool
parameter to detect dangling references.
(__is_invocable_impl::type): Adjust call to _S_test to avoid
deducing unnecessary noexcept property..
(__is_invocable_impl::__nothrow_type): Rename to ...
(__is_invocable_impl::__nothrow_conv): ... this. Adjust call
to _S_test to deduce noexcept property.
* testsuite/20_util/bind/dangling_ref.cc: New test.
* testsuite/20_util/function/cons/70692.cc: New test.
* testsuite/20_util/function_objects/invoke/dangling_ref.cc:
New test.
* testsuite/20_util/is_invocable/dangling_ref.cc: New test.
* testsuite/30_threads/packaged_task/cons/dangling_ref.cc:
New test.
2022-09-27 Jonathan Wakely <jwakely@redhat.com>
PR c++/107049
* testsuite/20_util/is_convertible/requirements/access.cc: New
test.
2022-09-27 Jonathan Wakely <jwakely@redhat.com>
PR c++/106651
* include/bits/std_function.h (__function_guide_t): New alias
template.
[__cpp_static_call_operator] (__function_guide_static_helper):
New class template.
(function): Use __function_guide_t in deduction guide.
* include/std/future (packaged_task): Use __function_guide_t in
deduction guide.
* testsuite/20_util/function/cons/deduction_c++23.cc: New test.
* testsuite/30_threads/packaged_task/cons/deduction_c++23.cc:
New test.
2022-09-26 Jonathan Wakely <jwakely@redhat.com>
* include/bits/ptr_traits.h (__ptr_traits_elem) [__cpp_concepts]:
Also define the __ptr_traits_elem class template for the
concepts case.
(pointer_traits<Ptr>): Remove constrained partial
specialization.
* testsuite/20_util/pointer_traits/lwg3545.cc: Check for
ambiguitiy with program-defined partial specialization.
2022-09-26 Jonathan Wakely <jwakely@redhat.com>
* include/std/type_traits (is_convertible, is_convertible_v):
Define using new built-in.
(is_nothrow_convertible is_nothrow_convertible_v): Likewise.
2022-09-26 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/107037
* include/std/bitset (_Base_bitset::_M_do_reset): Use
preprocessor conditional around non-C++03 code.
* testsuite/20_util/bitset/107037.cc: New test.
2022-09-24 Jonathan Wakely <jwakely@redhat.com>
* include/bits/alloc_traits.h (allocator_traits::is_always_equal):
Only instantiate is_empty if needed.
* include/bits/ptr_traits.h (__ptr_traits_impl::difference_type)
(__ptr_traits_impl::rebind): Use __detected_or.
* include/experimental/type_traits (is_same_v): Add a partial
specialization instead of instantiating the std::is_same class
template.
(detected_t): Redefine in terms of detected_or_t.
(is_detected, is_detected_v): Redefine in terms of detected_t.
* include/std/type_traits [__cpp_concepts] (__detected_or): Add
new definition using concepts.
(__detector::value_t): Rename to __is_detected.
* testsuite/17_intro/names.cc: Check value_t isn't used.
2022-09-23 Jonathan Wakely <jwakely@redhat.com>
* testsuite/20_util/is_assignable/requirements/access.cc:
New test.
2022-09-23 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/91456
* include/std/type_traits (__is_nothrow_invocable_lib): Remove.
(__is_invocable_impl::__nothrow_type): New member type which
checks if the conversion can throw.
(__is_nt_invocable_impl): Replace class template with alias
template to __is_nt_invocable_impl::__nothrow_type.
* testsuite/20_util/is_nothrow_invocable/91456.cc: New test.
* testsuite/20_util/is_nothrow_convertible/value.cc: Remove
macro used by value_ext.cc test.
* testsuite/20_util/is_nothrow_convertible/value_ext.cc: Remove
test for non-standard __is_nothrow_invocable_lib trait.
2022-09-23 Marek Polacek <polacek@redhat.com>
PR c++/106784
* include/std/type_traits: Rename __is_nothrow_convertible to
__is_nothrow_convertible_lib.
* testsuite/20_util/is_nothrow_convertible/value_ext.cc: Likewise.
2022-09-23 Jonathan Wakely <jwakely@redhat.com>
* include/std/bitset (operator>>): Do not copy for N==0.
* testsuite/20_util/bitset/io/input.cc: Add comment.
2022-09-23 Jonathan Wakely <jwakely@redhat.com>
* include/debug/bitset (__debug::bitset): Add constexpr to all
member functions.
(operator&, operator|, operator^): Add inline and constexpr.
(operator>>, operator<<): Add inline.
* testsuite/20_util/bitset/access/constexpr.cc: Only check using
constexpr std::string for the cxx11 ABI.
* testsuite/20_util/bitset/cons/constexpr_c++23.cc: Likewise.
* testsuite/20_util/headers/bitset/synopsis.cc: Check constexpr
for C++23.
2022-09-23 Jonathan Wakely <jwakely@redhat.com>
* include/std/bitset (bitset::_M_copy_to_string): Find set bits
instead of iterating over individual bits.
2022-09-22 Jonathan Wakely <jwakely@redhat.com>
* include/std/bitset (bitset): Add constexpr for C++23. Guard
members using std::string with _GLIBCXX_HOSTED.
* include/std/version (__cpp_lib_constexpr_bitset): Define.
* testsuite/20_util/bitset/access/constexpr.cc: New test.
* testsuite/20_util/bitset/cons/constexpr_c++23.cc: New test.
* testsuite/20_util/bitset/count/constexpr.cc: New test.
* testsuite/20_util/bitset/ext/constexpr.cc: New test.
* testsuite/20_util/bitset/operations/constexpr_c++23.cc: New test.
* testsuite/20_util/bitset/version.cc: New test.
2022-09-22 Jonathan Wakely <jwakely@redhat.com>
* testsuite/23_containers/bitset/18604.cc: Moved to...
* testsuite/20_util/bitset/18604.cc: ...here.
* testsuite/23_containers/bitset/45713.cc: Moved to...
* testsuite/20_util/bitset/45713.cc: ...here.
* testsuite/23_containers/bitset/to_string/dr396.cc: Moved to...
* testsuite/20_util/bitset/access/dr396.cc: ...here.
* testsuite/23_containers/bitset/to_string/1.cc: Moved to...
* testsuite/20_util/bitset/access/to_string.cc: ...here.
* testsuite/23_containers/bitset/to_ullong/1.cc: Moved to...
* testsuite/20_util/bitset/access/to_ullong.cc: ...here.
* testsuite/23_containers/bitset/to_ulong/1.cc: Moved to...
* testsuite/20_util/bitset/access/to_ulong.cc: ...here.
* testsuite/23_containers/bitset/cons/1.cc: Moved to...
* testsuite/20_util/bitset/cons/1.cc: ...here.
* testsuite/23_containers/bitset/cons/16020.cc: Moved to...
* testsuite/20_util/bitset/cons/16020.cc: ...here.
* testsuite/23_containers/bitset/cons/2.cc: Moved to...
* testsuite/20_util/bitset/cons/2.cc: ...here.
* testsuite/23_containers/bitset/cons/3.cc: Moved to...
* testsuite/20_util/bitset/cons/3.cc: ...here.
* testsuite/23_containers/bitset/cons/38244.cc: Moved to...
* testsuite/20_util/bitset/cons/38244.cc: ...here.
* testsuite/23_containers/bitset/cons/50268.cc: Moved to...
* testsuite/20_util/bitset/cons/50268.cc: ...here.
* testsuite/23_containers/bitset/cons/6282.cc: Moved to...
* testsuite/20_util/bitset/cons/6282.cc: ...here.
* testsuite/23_containers/bitset/cons/constexpr.cc: Moved to...
* testsuite/20_util/bitset/cons/constexpr.cc: ...here.
* testsuite/23_containers/bitset/cons/dr1325-1.cc: Moved to...
* testsuite/20_util/bitset/cons/dr1325-1.cc: ...here.
* testsuite/23_containers/bitset/cons/dr1325-2.cc: Moved to...
* testsuite/20_util/bitset/cons/dr1325-2.cc: ...here.
* testsuite/23_containers/bitset/cons/dr396.cc: Moved to...
* testsuite/20_util/bitset/cons/dr396.cc: ...here.
* testsuite/23_containers/bitset/debug/invalidation/1.cc: Moved to...
* testsuite/20_util/bitset/debug/invalidation/1.cc: ...here.
* testsuite/23_containers/bitset/ext/15361.cc: Moved to...
* testsuite/20_util/bitset/ext/15361.cc: ...here.
* testsuite/23_containers/bitset/hash/1.cc: Moved to...
* testsuite/20_util/bitset/hash/1.cc: ...here.
* testsuite/23_containers/bitset/input/1.cc: Moved to...
* testsuite/20_util/bitset/io/input.cc: ...here.
* testsuite/23_containers/bitset/count/6124.cc: Moved to...
* testsuite/20_util/bitset/observers/6124.cc: ...here.
* testsuite/23_containers/bitset/all/1.cc: Moved to...
* testsuite/20_util/bitset/observers/all.cc: ...here.
* testsuite/23_containers/bitset/test/1.cc: Moved to...
* testsuite/20_util/bitset/observers/test.cc: ...here.
* testsuite/23_containers/bitset/operations/1.cc: Moved to...
* testsuite/20_util/bitset/operations/1.cc: ...here.
* testsuite/23_containers/bitset/operations/13838.cc: Moved to...
* testsuite/20_util/bitset/operations/13838.cc: ...here.
* testsuite/23_containers/bitset/operations/2.cc: Moved to...
* testsuite/20_util/bitset/operations/2.cc: ...here.
* testsuite/23_containers/bitset/operations/96303.cc: Moved to...
* testsuite/20_util/bitset/operations/96303.cc: ...here.
* testsuite/23_containers/bitset/operations/constexpr-2.cc: Moved to...
* testsuite/20_util/bitset/operations/constexpr-2.cc: ...here.
* testsuite/23_containers/bitset/operations/constexpr.cc: Moved to...
* testsuite/20_util/bitset/operations/constexpr.cc: ...here.
* testsuite/23_containers/bitset/requirements/constexpr_functions.cc: Moved to...
* testsuite/20_util/bitset/requirements/constexpr_functions.cc: ...here.
* testsuite/23_containers/bitset/requirements/explicit_instantiation/1.cc: Moved to...
* testsuite/20_util/bitset/requirements/explicit_instantiation/1.cc: ...here.
* testsuite/23_containers/bitset/requirements/explicit_instantiation/1_c++0x.cc: Moved to...
* testsuite/20_util/bitset/requirements/explicit_instantiation/1_c++0x.cc: ...here.
* testsuite/23_containers/headers/bitset/synopsis.cc: Moved to...
* testsuite/20_util/headers/bitset/synopsis.cc: ...here.
2022-09-22 François Dumont <fdumont@gcc.gnu.org>
* python/libstdcxx/v6/printers.py: Remove ptinter registration for non-existing
types std::__debug::unique_ptr, std::__debug::stack, std::__debug::queue,
std::__debug::priority_queue.
2022-09-21 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/91456
* testsuite/20_util/function/91456.cc: Add comment with PR
number.
* testsuite/20_util/is_invocable/91456.cc: Likewise. Replace
std::function checks with std::is_invocable_r checks.
2022-09-21 Jonathan Wakely <jwakely@redhat.com>
* testsuite/17_intro/headers/c++1998/all_attributes.cc: Remove
unnecessary main function.
* testsuite/17_intro/headers/c++2011/all_attributes.cc:
Likewise.
* testsuite/17_intro/headers/c++2014/all_attributes.cc:
Likewise.
* testsuite/17_intro/headers/c++2017/all_attributes.cc:
Likewise.
* testsuite/17_intro/headers/c++2020/all_attributes.cc:
Likewise.
2022-09-21 Jonathan Wakely <jwakely@redhat.com>
* testsuite/20_util/headers/memory/synopsis.cc: Add declarations
from C++11 and later.
2022-09-21 Jonathan Wakely <jwakely@redhat.com>
* doc/xml/manual/documentation_hacking.xml: Remove trailing
whitespace.
* doc/xml/manual/policy_data_structures.xml: Likewise.
2022-09-21 Jonathan Wakely <jwakely@redhat.com>
* include/c_compatibility/stdlib.h [!_GLIBCXX_HOSTED]: Add
using-declaration for _Exit.
2022-09-21 Jonathan Wakely <jwakely@redhat.com>
* testsuite/18_support/uncaught_exception/14026.cc: Qualify
call to std::abort.
2022-09-21 Jonathan Wakely <jwakely@redhat.com>
* include/bits/ranges_base.h: Include <initializer_list>.
2022-09-20 Jonathan Wakely <jwakely@redhat.com>
* include/c_global/cstdlib [!_GLIBCXX_HOSTED] (quick_exit): Fix
missing space.
2022-09-16 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/106953
* include/backward/auto_ptr.h [!_GLIBCXX_HOSTED]: Do not define
shared_ptr members.
* include/bits/alloc_traits.h [!_GLIBCXX_HOSTED]: Do not declare
std::allocator_traits<std::allocator<T>> specializations for
freestanding.
* include/bits/memoryfwd.h [!_GLIBCXX_HOSTED] (allocator): Do
not declare for freestanding.
* include/bits/stl_algo.h [!_GLIBCXX_HOSTED] (stable_partition):
Do not define for freestanding.
[!_GLIBCXX_HOSTED] (merge, stable_sort): Do not use temporary
buffers for freestanding.
* include/bits/stl_algobase.h [!_GLIBCXX_HOSTED]: Do not declare
streambuf iterators and overloaded algorithms using them.
* include/bits/stl_uninitialized.h [!_GLIBCXX_HOSTED]: Do not
define specialized overloads for std::allocator.
* include/bits/unique_ptr.h [!_GLIBCXX_HOSTED] (make_unique)
(make_unique_for_overwrite, operator<<): Do not define for
freestanding.
* include/c_global/cstdlib [!_GLIBCXX_HOSTED] (_Exit): Declare.
Use _GLIBCXX_NOTHROW instead of throw().
* include/debug/assertions.h [!_GLIBCXX_HOSTED]: Ignore
_GLIBCXX_DEBUG for freestanding.
* include/debug/debug.h [!_GLIBCXX_DEBUG]: Likewise.
* include/std/bit [!_GLIBCXX_HOSTED]: Do not use the custom
__int_traits if <ext/numeric_traits.h> is available.
* include/std/functional [!_GLIBCXX_HOSTED]: Do not include
headers that aren't valid for freestanding.
(boyer_moore_searcher, boyer_moore_horspool_searcher): Do not
define for freestanding.
* include/std/iterator [!_GLIBCXX_HOSTED]: Do not include
headers that aren't valid for freestanding.
* include/std/memory [!_GLIBCXX_HOSTED]: Likewise.
* include/std/ranges [!_GLIBCXX_HOSTED] (istream_view): Do not
define for freestanding.
(views::__detail::__is_basic_string_view) [!_GLIBCXX_HOSTED]:
Do not define partial specialization for freestanding.
2022-09-16 Jonathan Wakely <jwakely@redhat.com>
* include/bits/alloc_traits.h (__alloc_swap)
(__shrink_to_fit_aux): Move here, from ...
* include/bits/allocator.h: ... here.
* include/ext/alloc_traits.h: Do not include allocator.h.
2022-09-16 Jonathan Wakely <jwakely@redhat.com>
* include/bits/stl_algo.h: Include <bits/stl_algobase.h>.
* include/bits/stl_tempbuf.h: Include headers for __try and
__catch macros, std::pair, and __gnu_cxx::__numeric_traits.
* include/bits/stream_iterator.h: Include <iosfwd> and headers
for std::addressof and std::iterator.
* include/bits/streambuf_iterator.h: Include header for
std::iterator.
* include/std/iterator: Do not include <iosfwd>.
2022-09-16 Jonathan Wakely <jwakely@redhat.com>
* testsuite/29_atomics/atomic_ref/compare_exchange_padding.cc:
Store value with non-zero padding bits after construction.
2022-09-16 Jonathan Wakely <jwakely@redhat.com>
* include/tr1/random.h (__detail::_Adaptor::_BEngine): Remove.
(__detail::_Adaptor::_M_g): Make public.
(__detail::_Adaptor<_Engine*, _Dist>): Remove partial
specialization.
(variate_generate::_Value): New helper to simplify handling of
_Engine* and _Engine& template arguments.
(variate_generate::engine_value_type): Define to underlying
engine type, not adapted type.
(variate_generate::engine()): Return underlying engine instead
of adaptor.
* testsuite/tr1/5_numerical_facilities/random/variate_generator/37986.cc:
Fix comment.
* testsuite/tr1/5_numerical_facilities/random/variate_generator/requirements/typedefs.cc:
Check member typedefs have the correct types.
2022-09-16 Jonathan Wakely <jwakely@redhat.com>
* include/debug/formatter.h [_GLIBCXX_DEBUG_BACKTRACE]
(_Error_formatter): Use 0 as null pointer constant.
2022-09-16 Jonathan Wakely <jwakely@redhat.com>
* include/bits/allocator.h (__alloc_neq): Remove.
* include/bits/stl_list.h (list::_M_check_equal_allocators):
Compare allocators directly, without __alloc_neq.
2022-09-16 Jonathan Wakely <jwakely@redhat.com>
* doc/doxygen/user.cfg.in (PREDEFINED): Remove __allocator_base.
* include/bits/allocator.h: Fix nesting of Doxygen commands.
2022-09-16 Jonathan Wakely <jwakely@redhat.com>
* doc/xml/manual/abi.xml: Document GLIBCXX_3.4.30 and
GLIBCXX_3.4.31 versions.
* doc/html/manual/abi.html: Regenerate.
2022-09-15 Jonathan Wakely <jwakely@redhat.com>
* include/std/memory: Do not include <bits/stl_algobase.h>.
2022-09-15 Jonathan Wakely <jwakely@redhat.com>
* include/bits/shared_ptr_atomic.h (_GLIBCXX_TSAN_MUTEX_PRE_LOCK):
Replace with ...
(_GLIBCXX_TSAN_MUTEX_TRY_LOCK): ... this, add try_lock flag.
(_GLIBCXX_TSAN_MUTEX_TRY_LOCK_FAILED): New macro using
try_lock_failed flag
(_GLIBCXX_TSAN_MUTEX_POST_LOCK): Rename to ...
(_GLIBCXX_TSAN_MUTEX_LOCKED): ... this.
(_GLIBCXX_TSAN_MUTEX_PRE_UNLOCK): Remove invalid flag.
(_GLIBCXX_TSAN_MUTEX_POST_UNLOCK): Remove invalid flag.
(_Sp_atomic::_Atomic_count::lock): Use new macros.
2022-09-15 Patrick Palka <ppalka@redhat.com>
* include/bits/ranges_algo.h (__adjacent_find_fn, adjacent_find):
Move to ...
* include/bits/ranges_util.h: ... here.
* include/std/ranges (chunk_by_view): Define.
(chunk_by_view::_Iterator): Define.
(__detail::__can_chunk_by_view): Define.
(_ChunkBy, chunk_by): Define.
* testsuite/std/ranges/adaptors/chunk_by/1.cc: New test.
2022-09-15 François Dumont <fdumont@gcc.gnu.org>
* testsuite/20_util/is_complete_or_unbounded/memoization_neg.cc:
Adapt dg-prune-output to _GLIBCXX_INLINE_VERSION mode.
2022-09-15 François Dumont <fdumont@gcc.gnu.org>
* config/abi/pre/gnu-versioned-namespace.ver: Remove obsolete std::__detail::__8
symbols.
2022-09-14 Jonathan Wakely <jwakely@redhat.com>
* include/bits/shared_ptr_atomic.h (_GLIBCXX_TSAN_MUTEX_DESTROY)
(_GLIBCXX_TSAN_MUTEX_PRE_LOCK, _GLIBCXX_TSAN_MUTEX_POST_LOCK)
(_GLIBCXX_TSAN_MUTEX_PRE_UNLOCK, _GLIBCXX_TSAN_MUTEX_POST_UNLOCK)
(_GLIBCXX_TSAN_MUTEX_PRE_SIGNAL, _GLIBCXX_TSAN_MUTEX_POST_SIGNAL):
Define macros for TSan annotation functions.
(_Sp_atomic::_Atomic_count): Add annotations.
2022-09-14 Jonathan Wakely <jwakely@redhat.com>
* include/bits/stl_tempbuf.h: Include <new>.
2022-09-14 Jonathan Wakely <jwakely@redhat.com>
* testsuite/17_intro/names.cc: Explain why poison pragma can't
be used.
2022-09-14 Jonathan Wakely <jwakely@redhat.com>
* include/std/future
(_State_baseV2::__setter(exception_ptr&, promise&)): Add
assertion for LWG 2276 precondition.
* testsuite/30_threads/promise/members/set_exception_neg.cc:
New test.
2022-09-14 Jonathan Wakely <jwakely@redhat.com>
* doc/xml/manual/intro.xml: Document LWG 1203.
* doc/html/*: Regenerate.
2022-09-14 Philipp Fent <fent@in.tum.de>
* python/libstdcxx/v6/printers.py (access_streambuf_ptrs):
New helper function.
(StdStringBufPrinter, StdStringStreamPrinter): New printers.
(build_libstdcxx_dictionary): Register stringstream printers.
* testsuite/libstdc++-prettyprinters/debug.cc: Check string
streams.
* testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
* testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
2022-09-13 Patrick Palka <ppalka@redhat.com>
* include/std/ranges (__detail::__slide_caches_nothing): Define.
(__detail::__slide_caches_last): Define.
(__detail::__slide_caches_first): Define.
(slide_view): Define.
(enable_borrowed_range<slide_view>): Define.
(slide_view::_Iterator): Define.
(slide_view::_Sentinel): Define.
(views::__detail::__can_slide_view): Define.
(views::_Slide, views::slide): Define.
* testsuite/std/ranges/adaptors/slide/1.cc: New test.
2022-09-13 Patrick Palka <ppalka@redhat.com>
* include/std/ranges (__detail::__div_ceil): Define.
(chunk_view): Define.
(chunk_view::_OuterIter): Define.
(chunk_view::_OuterIter::value_type): Define.
(chunk_view::_InnerIter): Define.
(chunk_view<_Vp>): Define partial specialization for forward
ranges.
(enable_borrowed_range<chunk_view>): Define.
(chunk_view<_Vp>::_Iterator): Define.
(views::__detail::__can_chunk_view): Define.
(views::_Chunk, views::chunk): Define.
* testsuite/std/ranges/adaptors/chunk/1.cc: New test.
2022-09-13 Patrick Palka <ppalka@redhat.com>
* include/std/ranges (join_view::_Iterator::_M_satisfy):
Adjust resetting _M_inner as per LWG 3569.
(join_view::_Iterator::_M_inner): Wrap in std::optional
as per LWG 3569.
(join_view::_Iterator::_Iterator): Relax constraints as
per LWG 3569.
(join_view::_Iterator::operator*): Adjust as per LWG 3569.
(join_view::_Iterator::operator->): Likewise.
(join_view::_Iterator::operator++): Likewise.
(join_view::_Iterator::operator--): Likewise.
(join_view::_Iterator::iter_move): Likewise.
(join_view::_Iterator::iter_swap): Likewise.
* testsuite/std/ranges/adaptors/join.cc (test14): New test.
2022-09-13 Patrick Palka <ppalka@redhat.com>
* include/debug/safe_iterator.h (_GLIBCXX_DEBUG_VERIFY_OPERANDS):
Add parentheses to avoid -Wparentheses warning.
2022-09-12 Patrick Palka <ppalka@redhat.com>
PR libstdc++/106320
* testsuite/std/ranges/adaptors/join.cc (test13): New test.
2022-09-12 Jonathan Wakely <jwakely@redhat.com>
* testsuite/19_diagnostics/error_code/cons/lwg3629.cc: Fix
comments.
* testsuite/19_diagnostics/error_condition/cons/lwg3629.cc:
Likewise.
2022-09-12 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/105329
* acinclude.m4 (libtool_VERSION): Change to 6:31:0.
* config/abi/pre/gnu.ver (GLIBCXX_3.4.21): Don't export
std::basic_string methods with name length of 15.
(GLIBCXX_3.4.31): Export std::basic_string::_M_replace_cold.
* testsuite/util/testsuite_abi.cc (check_version): Handle
GLIBCXX_3.4.31.
* include/bits/basic_string.h (std::basic_string::_M_replace_cold):
Declare.
* include/bits/basic_string.tcc (std::basic_string::_M_replace_cold):
Define and export even for C++20.
(std::basic_string::_M_replace): Use __builtin_expect, outline
the overlapping case to _M_replace_cold.
* configure: Regenerated.
2022-09-09 Jonathan Wakely <jwakely@redhat.com>
* include/bits/atomic_base.h (__atomic_impl::__compare_exchange):
Rename __weak to __is_weak.
* testsuite/17_intro/names.cc: Add __weak and __strong.
2022-09-09 Patrick Palka <ppalka@redhat.com>
PR libstdc++/106803
* include/std/ranges (views::_ZipTransform::operator()): Correct
return type in the empty case.
(views::_AdjacentTransform::operator()): Likewise.
2022-09-09 Patrick Palka <ppalka@redhat.com>
PR libstdc++/106798
* include/std/ranges (adjacent_view::_Iterator::_Iterator): Fix
typo.
* testsuite/std/ranges/adaptors/adjacent/1.cc (test04): New test.
2022-09-09 Patrick Palka <ppalka@redhat.com>
PR libstdc++/106766
* include/std/ranges (zip_view::_Iterator::operator-): Use
__to_unsigned_like instead of make_unsigned_t.
(zip_view::_Sentinel::operator-): Likewise.
* testsuite/std/ranges/zip/1.cc (test04): New test.
2022-09-08 François Dumont <fdumont@gcc.gnu.org>
* testsuite/util/testsuite_performance.h (__gnu_test::MallocInfo): New.
(__gnu_test::malloc_info): New, replace mallinfo on current platform
supporting it and use mallinfo2 when glibc >= 2.33.
2022-09-08 Jonathan Wakely <jwakely@redhat.com>
PR c++/106838
* testsuite/20_util/is_complete_or_unbounded/memoization_neg.cc:
Prune additional errors from front-end.
* testsuite/20_util/is_move_constructible/incomplete_neg.cc:
Likewise.
* testsuite/20_util/is_nothrow_swappable/incomplete_neg.cc:
Likewise.
* testsuite/20_util/is_nothrow_swappable_with/incomplete_neg.cc:
Likewise.
* testsuite/20_util/is_swappable_with/incomplete_neg.cc:
Likewise.
2022-09-08 Jonathan Wakely <jwakely@redhat.com>
* include/c_global/cstddef (byte): Add always_inline attribute
to all operator overloads.
(to_integer): Add always_inline attribute.
2022-09-08 Thomas Rodgers <trodgers@redhat.com>
Jakub Jelinek <jakub@redhat.com>
Jonathan Wakely <jwakely@redhat.com>
* include/bits/atomic_base.h (__atomic_impl::__maybe_has_padding):
New function.
(__atomic_impl::clear_padding): Likewise.
(__atomic_impl::__compare_exchange): Likewise.
(__atomic_impl::compare_exchange_weak): Delegate to
__compare_exchange.
(__atomic_impl::compare_exchange_strong): Likewise.
* include/std/atomic (atomic<T>::atomic(T)): Clear padding when
possible in a constexpr function.
(atomic::store): Clear padding.
(atomic::exchange): Likewise.
(atomic::compare_exchange_weak): Use __compare_exchange.
(atomic::compare_exchange_strong): Likewise.
* testsuite/29_atomics/atomic/compare_exchange_padding.cc: New
test.
* testsuite/29_atomics/atomic_ref/compare_exchange_padding.cc:
New test.
2022-09-08 Jonathan Wakely <jwakely@redhat.com>
* include/std/system_error (__adl_only::make_error_code): Add
deleted function.
(__adl_only::make_error_condition): Likewise.
(error_code::error_code(ErrorCodeEnum)): Add using-declaration
for deleted function.
(error_condition::error_condition(ErrorConditionEnum)):
Likewise.
* testsuite/19_diagnostics/error_code/cons/lwg3629.cc: New test.
* testsuite/19_diagnostics/error_condition/cons/lwg3629.cc: New test.
2022-09-07 Jonathan Wakely <jwakely@redhat.com>
* include/std/barrier: Add missing runtime exception.
2022-09-07 Patrick Palka <ppalka@redhat.com>
* include/std/type_traits (is_reference): Make the primary
template derive from false_type. Define two partial
specializations that derive from true_type.
2022-09-07 Patrick Palka <ppalka@redhat.com>
* include/std/type_traits (__is_void_helper): Remove.
(is_void): Make the primary template derive from false_type,
and define four explicit specializations that derive from
true_type.
(__is_null_pointer_helper, is_null_pointer): Likewise.
2022-09-07 Jason Merrill <jason@redhat.com>
* libsupc++/dyncast.cc (__dynamic_cast): Avoid virtual function
call in simple success case.
2022-09-06 Philipp Fent <fent@in.tum.de>
* testsuite/libstdc++-prettyprinters/48362.cc: Fix expected
tuple indices.
* testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
2022-09-05 Jonathan Wakely <jwakely@redhat.com>
* include/std/type_traits (__success_type, __failure_type): Move
definitions later in the file.
2022-09-05 Jonathan Wakely <jwakely@redhat.com>
* include/std/type_traits (is_trivial_v, is_trivially_copyable_v)
(is_standard_layout_v, is_pod_v, is_literal_type_v): Use
built-in instead of class template.
(is_same_v): Add partial specialization for true case.
2022-09-02 Patrick Palka <ppalka@redhat.com>
* include/std/tuple (tuple::_UseOtherCtor): Use ::type when
deriving from __and_, __or_ or __not_.
* include/std/type_traits (negation): Likewise.
(is_unsigned): Likewise.
(__is_implicitly_default_constructible): Likewise.
(is_trivially_destructible): Likewise.
(__is_nt_invocable_impl): Likewise.
2022-09-02 Jonathan Wakely <jwakely@redhat.com>
* include/std/type_traits (is_constructible_v)
(is_default_constructible_v, is_copy_constructible_v)
(is_move_constructible_v): Define using __is_constructible.
(is_assignable_v, is_copy_assignable_v, is_move_assignable_v):
Define using __is_assignable.
(is_trivially_constructible_v)
(is_trivially_default_constructible_v)
(is_trivially_copy_constructible_v)
(is_trivially_move_constructible_v): Define using
__is_trivially_constructible.
(is_trivially_assignable_v, is_trivially_copy_assignable_v)
(is_trivially_move_assignable_v): Define using
__is_trivially_assignable.
(is_nothrow_constructible_v)
(is_nothrow_default_constructible_v)
(is_nothrow_copy_constructible_v)
(is_nothrow_move_constructible_v): Define using
__is_nothrow_constructible.
(is_nothrow_assignable_v, is_nothrow_copy_assignable_v)
(is_nothrow_move_assignable_v): Define using
__is_nothrow_assignable.
2022-09-02 Patrick Palka <ppalka@redhat.com>
* include/std/type_traits (__or_, __and_, __not_): Redefine as a
class template instead of as an alias template.
* testsuite/20_util/logical_traits/requirements/short_circuit.cc:
Add more tests for conjunction and disjunction. Add corresponding
tests for __and_ and __or_.
2022-09-01 Jonathan Wakely <jwakely@redhat.com>
* include/std/ranges (adjacent_transform_view::_Iterator): Add
typename keyword before dependent qualified-id.
2022-09-01 Jonathan Wakely <jwakely@redhat.com>
* include/std/type_traits (__is_referenceable): Remove.
(__add_lvalue_reference_helper, __add_rvalue_reference_helper):
Use __void_t instead of __is_referenceable.
(__add_pointer_helper): Likewise.
(add_pointer): Add partial specializations for reference types.
2022-09-01 Jonathan Wakely <jwakely@redhat.com>
* include/std/type_traits (__is_constructible_impl): Replace
class template with alias template.
(is_default_constructible, is_nothrow_constructible)
(is_nothrow_constructible): Simplify base-specifier.
(__is_copy_constructible_impl, __is_move_constructible_impl)
(__is_nothrow_copy_constructible_impl)
(__is_nothrow_move_constructible_impl): Remove class templates.
(is_copy_constructible, is_move_constructible)
(is_nothrow_constructible, is_nothrow_default_constructible)
(is_nothrow_copy_constructible, is_nothrow_move_constructible):
Adjust base-specifiers to use __is_constructible_impl.
(__is_copy_assignable_impl, __is_move_assignable_impl)
(__is_nt_copy_assignable_impl, __is_nt_move_assignable_impl):
Remove class templates.
(__is_assignable_impl): New alias template.
(is_assignable, is_copy_assignable, is_move_assignable):
Adjust base-specifiers to use new alias template.
(is_nothrow_copy_assignable, is_nothrow_move_assignable):
Adjust base-specifiers to use existing alias template.
(__is_trivially_constructible_impl): New alias template.
(is_trivially_constructible, is_trivially_default_constructible)
(is_trivially_copy_constructible)
(is_trivially_move_constructible): Adjust base-specifiers to use
new alias template.
(__is_trivially_assignable_impl): New alias template.
(is_trivially_assignable, is_trivially_copy_assignable)
(is_trivially_move_assignable): Adjust base-specifier to use
new alias template.
(__add_lval_ref_t, __add_rval_ref_t): New alias templates.
(add_lvalue_reference, add_rvalue_reference): Use new alias
templates.
2022-09-01 Jonathan Wakely <jwakely@redhat.com>
* include/std/type_traits (__decay_selector): Add partial
specializations for array types. Only check for function types
when not dealing with an array.
(decay): Add partial specializations for reference types.
2022-09-01 Jonathan Wakely <jwakely@redhat.com>
* include/std/type_traits (is_lvalue_reference_v)
(is_rvalue_reference_v, is_reference_v, is_const_v)
(is_volatile_v): Define using partial specializations instead
of instantiating class templates.
2022-09-01 Jonathan Wakely <jwakely@redhat.com>
* include/std/type_traits (is_enum_v, is_class_v, is_union_v)
(is_empty_v, is_polymoprhic_v, is_abstract_v, is_final_v)
(is_base_of_v, is_aggregate_v): Use built-in directly instead of
instantiating class template.
2022-09-01 Jonathan Wakely <jwakely@redhat.com>
* include/std/type_traits (is_scoped_enum): Remove workaround.
2022-09-01 Patrick Palka <ppalka@redhat.com>
* include/std/ranges (__detail::__unarize): Define.
(adjacent_view::_Iterator): Befriend adjacent_transform_view.
(adjacent_transform_view): Define.
(adjacent_transform_view::_Iterator): Define.
(adjacent_transform_view::_Sentinel): Define.
(views::__detail::__can_adjacent_transform_view): Define.
(views::_AdjacentTransform): Define.
(views::adjacent_transform): Define.
(views::pairwise_transform): Define.
* testsuite/std/ranges/adaptors/adjacent_transform/1.cc: New test.
2022-09-01 Jonathan Wakely <jwakely@redhat.com>
* include/std/type_traits (__is_array_known_bounds): Add partial
specialization instead of using std::extent.
(__is_array_unknown_bounds): Likewise.
(extent): Add partial specializations to stop recursion after
the result is found.
(is_array_v): Add partial specializations instead of
instantiating the class template.
(rank_v, extent_v): Likewise.
(is_bounded_array_v, is_unbounded_array_v): Likewise.
(is_bounded_array, is_unbounded_array): Define in terms of the
variable templates.
2022-08-31 Patrick Palka <ppalka@redhat.com>
* include/bits/ranges_base.h (__advance_fn::operator()): Add
parentheses in assert condition to avoid -Wparentheses warning.
* include/std/ranges: (take_view::take_view): Uglify 'base'.
(take_while_view::take_while_view): Likewise.
(elements_view::elements_view): Likewise.
(views::_Zip::operator()): Adjust position of [[nodiscard]] for
compatibility with -fconcepts-ts.
(zip_transform_view::_Sentinel): Uglify 'OtherConst'.
(views::_ZipTransform::operator()): Adjust position of
[[nodiscard]] for compatibilty with -fconcepts-ts.
2022-08-31 Martin Liska <mliska@suse.cz>
* configure: Regenerate.
* crossconfig.m4: Remove deprecated ports.
2022-08-31 François Dumont <fdumont@gcc.gnu.org>
* include/debug/debug.h: Use nullptr rather than '0' in checks in post-C++11.
* include/debug/string: Likewise.
* testsuite/21_strings/basic_string/operations/ends_with/char.cc: Use __gnu_test::string.
* testsuite/21_strings/basic_string/operations/ends_with/nonnull.cc: Likewise.
* testsuite/21_strings/basic_string/operations/ends_with/wchar_t.cc: Likewise.
* testsuite/21_strings/basic_string/operations/starts_with/wchar_t.cc: Likewise.
* testsuite/21_strings/basic_string/operations/starts_with/nonnull.cc: Likewise.
* testsuite/21_strings/basic_string/operations/starts_with/char.cc: Likewise..
2022-08-31 Patrick Palka <ppalka@redhat.com>
* include/std/ranges (adjacent_view): Define.
(enable_borrowed_range<adjacent_view>): Define.
(__detail::__repeated_tuple): Define.
(adjacent_view::_Iterator): Define.
(adjacent_view::_Sentinel): Define.
(views::__detail::__can_adjacent_view): Define.
(views::_Adjacent): Define.
(views::adjacent): Define.
(views::pairwise): Define.
* testsuite/std/ranges/adaptors/adjacent/1.cc: New test.
2022-08-31 François Dumont <fdumont@gcc.gnu.org>
* include/debug/formatter.h
[_GLIBCXX_HAVE_STACKTRACE](__glibcxx_backtrace_state): Declare.
[_GLIBCXX_HAVE_STACKTRACE](__glibcxx_backtrace_create_state): Declare.
[_GLIBCXX_HAVE_STACKTRACE](__glibcxx_backtrace_full_callback): Define.
[_GLIBCXX_HAVE_STACKTRACE](__glibcxx_backtrace_error_callback): Define.
[_GLIBCXX_HAVE_STACKTRACE](__glibcxx_backtrace_full_func): Define.
[_GLIBCXX_HAVE_STACKTRACE](__glibcxx_backtrace_full): Declare.
[_GLIBCXX_HAVE_STACKTRACE](_Error_formatter::_M_backtrace_state): New.
[_GLIBCXX_HAVE_STACKTRACE](_Error_formatter::_M_backtrace_full): New.
* src/c++11/debug.cc [_GLIBCXX_HAVE_STACKTRACE](print_backtrace): New.
(_Error_formatter::_M_error()): Adapt.
* src/libbacktrace/Makefile.am: Add backtrace.c.
* src/libbacktrace/Makefile.in: Regenerate.
* src/libbacktrace/backtrace-rename.h (backtrace_full): New.
* testsuite/23_containers/vector/debug/assign4_backtrace_neg.cc: New test.
* doc/xml/manual/debug_mode.xml: Document _GLIBCXX_DEBUG_BACKTRACE.
* doc/xml/manual/using.xml: Likewise.
2022-08-31 Patrick Palka <ppalka@redhat.com>
* testsuite/20_util/logical_traits/requirements/short_circuit.cc: New test.
2022-08-31 Jonathan Wakely <jwakely@redhat.com>
* include/bits/refwrap.h (reference_wrapper::operator()): Add
noexcept-specifier and use __invoke_result instead of result_of.
* testsuite/20_util/reference_wrapper/invoke-noexcept.cc: New test.
2022-08-31 Jonathan Wakely <jwakely@redhat.com>
* testsuite/20_util/reference_wrapper/invoke-2.cc: Improve
comments.
* testsuite/20_util/reference_wrapper/invoke-3.cc: Likewise.
* testsuite/20_util/reference_wrapper/invoke.cc: Likewise.
2022-08-31 Jonathan Wakely <jwakely@redhat.com>
* include/bits/basic_string.h (basic_string): Add nodiscard
attribute to all relevant functions.
* include/std/string_view (basic_string_view): Likewise.
* testsuite/21_strings/basic_string/capacity/1.cc: Cast unused
results to void.
* testsuite/21_strings/basic_string/capacity/char/1.cc:
Likewise.
* testsuite/21_strings/basic_string/capacity/wchar_t/1.cc:
Likewise.
* testsuite/21_strings/basic_string/cons/char/self_move.cc:
Likewise.
* testsuite/21_strings/basic_string/element_access/char/1.cc:
Likewise.
* testsuite/21_strings/basic_string/element_access/char/21674.cc:
Likewise.
* testsuite/21_strings/basic_string/element_access/wchar_t/1.cc:
Likewise.
* testsuite/21_strings/basic_string/element_access/wchar_t/21674.cc:
Likewise.
* testsuite/21_strings/basic_string/lwg2758.cc: Likewise.
* testsuite/21_strings/basic_string/lwg2946.cc: Likewise.
* testsuite/21_strings/basic_string/operations/contains/nonnull.cc:
Add -Wno-unused-result to options.
* testsuite/21_strings/basic_string/operations/ends_with/nonnull.cc:
Likewise.
* testsuite/21_strings/basic_string/operations/starts_with/nonnull.cc:
Likewise.
* testsuite/21_strings/basic_string/operators/char/1.cc: Cast
unused results to void.
* testsuite/21_strings/basic_string/operators/wchar_t/1.cc:
Likewise.
* testsuite/21_strings/basic_string_view/capacity/1.cc:
Likewise.
* testsuite/21_strings/basic_string_view/element_access/char/1.cc:
Likewise.
* testsuite/21_strings/basic_string_view/element_access/char/2.cc:
Likewise.
* testsuite/21_strings/basic_string_view/element_access/wchar_t/1.cc:
Likewise.
* testsuite/21_strings/basic_string_view/element_access/wchar_t/2.cc:
Likewise.
* testsuite/21_strings/basic_string_view/operations/contains/nonnull.cc:
Likewise.
Add -Wno-unused-result to options.
* testsuite/21_strings/basic_string_view/operations/ends_with/nonnull.cc:
Likewise.
* testsuite/21_strings/basic_string_view/operations/starts_with/nonnull.cc:
Likewise.
* testsuite/27_io/basic_stringbuf/sputbackc/char/1.cc: Cast
unused results to void.
* testsuite/27_io/basic_stringbuf/sputbackc/wchar_t/1.cc:
Likewise.
* testsuite/27_io/basic_stringbuf/sungetc/char/1.cc: Likewise.
* testsuite/27_io/basic_stringbuf/sungetc/wchar_t/1.cc:
Likewise.
2022-08-27 Patrick Palka <ppalka@redhat.com>
* testsuite/20_util/logical_traits/requirements/base_classes.cc: New test.
2022-08-26 Patrick Palka <ppalka@redhat.com>
* include/std/ranges (zip_view::_Iterator::operator<): Remove
as per LWG 3692.
(zip_view::_Iterator::operator>): Likewise.
(zip_view::_Iterator::operator<=): Likewise.
(zip_view::_Iterator::operator>=): Likewise.
(zip_view::_Iterator::operator<=>): Remove three_way_comparable
constraint as per LWG 3692.
(zip_transform_view::_Iterator): Ditto as per LWG 3702.
2022-08-26 Patrick Palka <ppalka@redhat.com>
* include/std/ranges (zip_view::_Iterator): Befriend
zip_transform_view.
(__detail::__range_iter_cat): Define.
(zip_transform_view): Define.
(zip_transform_view::_Iterator): Define.
(zip_transform_view::_Sentinel): Define.
(views::__detail::__can_zip_transform_view): Define.
(views::_ZipTransform): Define.
(views::zip_transform): Define.
* testsuite/std/ranges/zip_transform/1.cc: New test.
2022-08-26 Patrick Palka <ppalka@redhat.com>
* include/std/type_traits (enable_if, __enable_if_t): Define them
earlier.
(__detail::__first_t): Define.
(__detail::__or_fn, __detail::__and_fn): Declare.
(__or_, __and_): Redefine as alias templates in terms of __or_fn
and __and_fn.
(__not_): Redefine as an alias template.
(__detail::__disjunction_impl, __detail::__conjunction_impl):
Define.
(conjuction, disjunction): Redefine in terms of __disjunction_impl
and __conjunction_impl.
2022-08-26 Jonathan Wakely <jwakely@redhat.com>
* include/std/system_error (error_code::_Check): New alias
template for constructor SFINAE constraint.
(error_code::error_code(ErrorCodeEnum)): Use it.
(error_code::operator=(ErrorCodeEnum)): Remove.
(error_condition::_Check): New alias template for constraint.
(error_condition::error_condition(ErrorConditionEnum)): Use it.
(error_condition::operator=(ErrorConditionEnum)): Remove.
* testsuite/19_diagnostics/error_code/cons/1.cc: Check
constructor taking user-defined error enum.
* testsuite/19_diagnostics/error_condition/cons/1.cc: Likewise.
2022-08-26 Jonathan Wakely <jwakely@redhat.com>
* include/bits/basic_string.h (starts_with, ends_with, contains):
Add nonnull attribute.
* include/bits/cow_string.h (starts_with, ends_with, contains):
Likewise.
* include/std/string_view (starts_with, ends_with, contains):
Likewise.
* testsuite/21_strings/basic_string/operations/contains/nonnull.cc
* testsuite/21_strings/basic_string/operations/ends_with/nonnull.cc
* testsuite/21_strings/basic_string/operations/starts_with/nonnull.cc
* testsuite/21_strings/basic_string_view/operations/contains/nonnull.cc
* testsuite/21_strings/basic_string_view/operations/ends_with/nonnull.cc
* testsuite/21_strings/basic_string_view/operations/starts_with/nonnull.cc
2022-08-25 Patrick Palka <ppalka@redhat.com>
* include/std/ranges (lazy_split_view::_OuterIter::_M_current):
Remove redundant comment.
(lazy_split_view::_M_current): Likewise.
(common_view::common_view): Remove commented out view-converting
constructor as per LWG3405.
(elements_view::_Iterator::_Iterator): Uglify 'current' and 'i'.
2022-08-24 Patrick Palka <ppalka@redhat.com>
* include/bits/ranges_algo.h (__min_fn, min): Move to ...
* include/bits/ranges_util.h: ... here, in order to avoid
including all of ranges_algo.h from <ranges>.
* include/std/ranges (__detail::__zip_is_common): Define for
C++23 as per P2321R2.
(__detail::__tuple_or_pair): Likewise.
(__detail::__tuple_or_pair_t): Likewise.
(__detail::__tuple_transform): Likewise.
(__detail::__tuple_for_each): Likewise.
(zip_view): Likewise.
(enable_borrowed_range<zip_view>): Likewise.
(__detail::__all_random_access): Likewise.
(__detail::__all_bidirectional): Likewise.
(__detail::__all_forward): Likewise.
(__detail::__zip_view_iter_cat): Likewise.
(zip_view::_Iterator): Likewise.
(zip_view::_Sentinel): Likewise.
* testsuite/std/ranges/zip/1.cc: New test.
2022-08-24 Jonathan Wakely <jwakely@redhat.com>
Revert:
2022-08-24 Will Hawkins <whh8b@obs.cr>
* include/bits/basic_string.h (operator+(const string&, const char*)):
Remove naive implementation.
* include/bits/basic_string.tcc (operator+(const string&, const char*)):
Add single-allocation implementation.
2022-08-24 Patrick Palka <ppalka@redhat.com>
* include/bits/stl_pair.h (pair::swap const): Add non-standard
is_swappable_v constraints.
* include/std/tuple (tuple::swap const): Likewise.
* testsuite/20_util/tuple/cons/noexcept_specs.cc: Correct some
asserts in C++23 mode.
2022-08-24 Jonathan Wakely <jwakely@redhat.com>
* include/bits/stl_algo.h (__stable_sort): Cast size to
iterator's difference type.
* testsuite/25_algorithms/stable_sort/4.cc: New test.
2022-08-24 Will Hawkins <whh8b@obs.cr>
* include/bits/basic_string.h (operator+(const string&, const char*)):
Remove naive implementation.
* include/bits/basic_string.tcc (operator+(const string&, const char*)):
Add single-allocation implementation.
2022-08-24 Jonathan Wakely <jwakely@redhat.com>
* testsuite/20_util/duration_cast/rounding.cc: Check abs with
non-reduced duration.
2022-08-23 Patrick Palka <ppalka@redhat.com>
* include/bits/stl_bvector.h (_Bit_reference::operator=): Define
const overload for C++23 as per P2321R2.
* include/bits/stl_pair.h (pair::swap): Likewise.
(pair::pair): Define additional converting constructors for
C++23 as per P2321R2.
(pair::operator=): Define const overloads for C++23 as per
P2321R2.
(swap): Define overload taking const pair& for C++23 as per
P2321R2.
(basic_common_reference): Define partial specialization for
pair for C++23 as per P2321R2.
(common_type): Likewise.
* include/bits/uses_allocator_args.h
(uses_allocator_construction_args): Define additional pair
overloads for C++23 as per P2321R2.
* include/std/tuple (_Tuple_impl::_Tuple_impl): Define
additional converting constructors for C++23 as per P2321R2.
(_Tuple_impl::_M_assign): Define const overloads for C++23
as per P2321R2.
(_Tuple_impl::_M_swap): Likewise.
(tuple::__constructible): Define as a convenient renaming of
_TCC<true>::__constructible.
(tuple::__convertible): As above but for _TCC<true>::__convertible.
(tuple::tuple): Define additional converting constructors for
C++23 as per P2321R2.
(tuple::operator=): Define const overloads for C++23 as per
P2321R2.
(tuple::swap): Likewise.
(basic_common_reference): Define partial specialization for
tuple for C++23 as per P2321R2.
(common_type): Likewise.
* testsuite/20_util/pair/p2321r2.cc: New test.
* testsuite/20_util/tuple/p2321r2.cc: New test.
* testsuite/23_containers/vector/bool/element_access/1.cc: New test.
2022-08-23 Patrick Palka <ppalka@redhat.com>
* include/std/tuple (_TupleConstraints::__convertible): Define.
(_TupleConstraints::__constructible): Define.
(_TupleConstraints::__is_explicitly_constructible): Redefine this
in terms of __convertible and __constructible.
(_TupleConstraints::__is_implicitly_constructible): Likewise.
2022-08-23 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/106589
* include/std/variant (__do_visit): Handle is_void<R> for zero
argument case.
* testsuite/20_util/variant/visit_r.cc: Check std::visit<void>(v).
2022-08-22 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/105678
* doc/xml/manual/using.xml: Document -lstdc++_libbacktrace
requirement for using std::stacktrace. Also adjust -frtti and
-fexceptions to document non-default (i.e. negative) forms.
* doc/html/*: Regenerate.
2022-08-22 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/106695
* include/bits/std_thread.h (thread::_State_impl): Forward
individual arguments to _Invoker constructor.
(thread::_Invoker): Add constructor. Delete copies.
* include/std/future (__future_base::_Deferred_state): Forward
individual arguments to _Invoker constructor.
(__future_base::_Async_state_impl): Likewise.
* testsuite/30_threads/async/106695.cc: New test.
* testsuite/30_threads/thread/106695.cc: New test.
2022-08-22 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/106607
* include/bits/regex_compiler.tcc (_Compiler::_M_cur_int_value):
Use built-ins to check for integer overflow in back-reference
number.
* testsuite/28_regex/basic_regex/106607.cc: New test.
2022-08-17 Keef Aragon <keef.aragon@konscious.net>
* libsupc++/eh_alloc.cc (pool::free): Inverse comparison.
2022-08-08 François Dumont <fdumont@gcc.gnu.org>
* include/debug/formatter.h (__singular_value_init): New _Iterator_state enum entry.
(_Parameter<>(const _Safe_iterator<>&, const char*, _Is_iterator)): Check if iterator
parameter is value-initialized.
(_Parameter<>(const _Safe_local_iterator<>&, const char*, _Is_iterator)): Likewise.
* include/debug/safe_iterator.h (_Safe_iterator<>::_M_value_initialized()): New. Adapt
checks.
* include/debug/safe_local_iterator.h (_Safe_local_iterator<>::_M_value_initialized()): New.
Adapt checks.
* src/c++11/debug.cc (_Safe_iterator_base::_M_reset): Do not reset _M_version.
(print_field(PrintContext&, const _Parameter&, const char*)): Adapt state_names.
* testsuite/23_containers/deque/debug/iterator1_neg.cc: New test.
* testsuite/23_containers/deque/debug/iterator2_neg.cc: New test.
* testsuite/23_containers/forward_list/debug/iterator1_neg.cc: New test.
* testsuite/23_containers/forward_list/debug/iterator2_neg.cc: New test.
* testsuite/23_containers/forward_list/debug/iterator3_neg.cc: New test.
2022-08-05 Jonathan Wakely <jwakely@redhat.com>
* include/experimental/scope (__cpp_lib_experimental_scope):
Define.
* testsuite/experimental/scopeguard/uniqueres.cc: Check macro.
2022-08-05 Jonathan Wakely <jwakely@redhat.com>
* include/Makefile.am: Add new header.
* include/Makefile.in: Regenerate.
* include/experimental/scope: New file.
* testsuite/experimental/scopeguard/uniqueres.cc: New test.
* testsuite/experimental/scopeguard/exit.cc: New test.
2022-08-04 Jonathan Wakely <jwakely@redhat.com>
* include/std/string_view (basic_string_view(Range&&)): Add
explicit as per P2499R0.
* testsuite/21_strings/basic_string_view/cons/char/range_c++20.cc:
Adjust implicit conversions. Check implicit conversions fail.
* testsuite/21_strings/basic_string_view/cons/wchar_t/range_c++20.cc:
Likewise.
2022-08-04 Jonathan Wakely <jwakely@redhat.com>
* include/bits/fs_dir.h (directory_iterator): Add comparison
with std::default_sentinel_t. Remove redundant operator!= for
C++20.
* (recursive_directory_iterator): Likewise.
* include/bits/iterator_concepts.h [!__cpp_lib_concepts]
(default_sentinel_t, default_sentinel): Define even if concepts
are not supported.
* include/bits/regex.h (regex_iterator): Add comparison with
std::default_sentinel_t. Remove redundant operator!= for C++20.
(regex_token_iterator): Likewise.
(regex_token_iterator::_M_end_of_seq()): Add noexcept.
* testsuite/27_io/filesystem/iterators/lwg3719.cc: New test.
* testsuite/28_regex/iterators/regex_iterator/lwg3719.cc:
New test.
* testsuite/28_regex/iterators/regex_token_iterator/lwg3719.cc:
New test.
2022-08-04 Jonathan Wakely <jwakely@redhat.com>
* include/std/expected (unexpected::_M_val): Rename to _M_unex.
(bad_expected_access::_M_val): Likewise.
2022-08-04 Jonathan Wakely <jwakely@redhat.com>
* include/bits/ios_base.h (__cpp_lib_ios_noreplace): Update
value to 202207L.
* include/std/version (__cpp_lib_ios_noreplace): Likewise.
* testsuite/27_io/basic_ofstream/open/char/noreplace.cc: Check
for new value.
* testsuite/27_io/basic_ofstream/open/wchar_t/noreplace.cc:
Likewise.
2022-08-04 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/106183
* include/bits/atomic_wait.h (__waiter_pool_base::_M_notify):
Move increment of _M_ver here.
[!_GLIBCXX_HAVE_PLATFORM_WAIT]: Lock mutex around increment.
Use relaxed memory order and always notify all waiters.
(__waiter_base::_M_do_wait) [!_GLIBCXX_HAVE_PLATFORM_WAIT]:
Check value again after locking mutex.
(__waiter_base::_M_notify): Remove increment of _M_ver.
2022-08-04 Ulrich Drepper <drepper@gmail.com>
* python/libstdcxx/v6/printers.py (class StdTuplePrinter): Use
zero-based indeces just like std:get takes.
2022-07-29 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/104443
* include/bits/stl_iterator.h (common_iterator::operator->):
Change return type to just auto.
2022-07-26 Thomas Rodgers <trodgers@redhat.com>
* include/bits/atomic_wait.h (__atomic_spin): Merge spin loops.
2022-07-20 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/100823
* include/bits/stl_iterator.h (common_iterator): Define
destructor, copy constructor and move constructor as trivial
when the underlying types allow.
* testsuite/24_iterators/common_iterator/100823.cc: Check
triviality of special members.
2022-07-20 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/100823
* include/bits/stl_iterator.h (common_iterator): Define move
constructor and move assignment operator.
(common_iterator::_M_assign): New function implementing
assignment.
(common_iterator::operator=): Use _M_assign.
(common_iterator::_S_valueless): New constant.
* testsuite/24_iterators/common_iterator/100823.cc: New test.
2022-07-20 Jonathan Wakely <jwakely@redhat.com>
* include/bits/stl_iterator.h (common_iterator): Fix incorrect
uses of is_nothrow_assignable_v. Fix inconsistent constraints on
friend declaration. Do not move argument in copy constructor.
* testsuite/24_iterators/common_iterator/1.cc: Check for
noexcept constructibnle/assignable.
2022-07-19 François Dumont <fdumont@gcc.gnu.org>
* include/debug/debug.h [_GLIBCXX_DEBUG](__glibcxx_requires_string): Define
using _GLIBCXX_DEBUG_PEDASSERT.
[_GLIBCXX_DEBUG](__glibcxx_requires_string_len): Likewise.
* include/debug/macros.h
(__glibcxx_check_string, __glibcxx_check_string_len): Move...
* include/debug/string
(__glibcxx_check_string, __glibcxx_check_string_len): ...here. And define depending
on _GLIBCXX_DEBUG_PEDANTIC no matter if _GLIBCXX_DEBUG is defined.
Add using of std::string find, rfind, find_first_of, find_last_of, find_first_not_of
and find_last_not_of. Remove debug implementations having no debug assertion.
* testsuite/util/testsuite_string.h: New file. Provides __gnu_test::string and
__gnu_test::wtring which definition depends on _GLIBCXX_DEBUG.
* testsuite/21_strings/basic_string/debug/find1_neg.cc: New test case.
* testsuite/21_strings/basic_string/debug/find2_neg.cc: New test case.
* testsuite/21_strings/basic_string/operations/find/char/1.cc:
Include <testsuite_string.h> and use __gnu_test::string.
* testsuite/21_strings/basic_string/operations/find/char/2.cc: Likewise.
* testsuite/21_strings/basic_string/operations/find/char/3.cc: Likewise.
* testsuite/21_strings/basic_string/operations/find/char/4.cc: Likewise.
* testsuite/21_strings/basic_string/operations/find/char/5.cc: Likewise.
* testsuite/21_strings/basic_string/operations/find/char/6.cc: Likewise.
* testsuite/21_strings/basic_string/operations/find/wchar_t/1.cc:
Include <testsuite_string.h> and use __gnu_test::wstring.
* testsuite/21_strings/basic_string/operations/find/wchar_t/2.cc: Likewise.
* testsuite/21_strings/basic_string/operations/find/wchar_t/3.cc: Likewise.
* testsuite/21_strings/basic_string/operations/find/wchar_t/4.cc: Likewise.
* testsuite/21_strings/basic_string/operations/find/wchar_t/5.cc: Likewise.
* testsuite/21_strings/basic_string/operations/find/wchar_t/6.cc: Likewise.
2022-07-19 Jonathan Wakely <jwakely@redhat.com>
* include/std/type_traits (__cpp_lib_reference_from_temporary)
(reference_constructs_from_temporary)
(reference_converts_from_temporary): Only define when the
built-ins are available.
2022-07-19 Marco Falke <falke.marco@gmail.com>
* include/std/charconv (__from_chars_alnum_to_val): Replace
implicit conversion from int to unsigned char with explicit
cast.
2022-07-19 Sebastian Huber <sebastian.huber@embedded-brains.de>
* configure: Regnerate.
* configure.ac (newlib, *-rtems*): Remove HAVE_POLL.
2022-07-18 François Dumont <fdumont@gcc.gnu.org>
* include/bits/stl_algo.h
(__merge_adaptive): Adapt to merge only when buffer is large enough..
(__merge_adaptive_resize): New, adapt merge when buffer is too small.
(__inplace_merge): Adapt, use latter.
(__stable_sort_adaptive): Adapt to sort only when buffer is large enough.
(__stable_sort_adaptive_resize): New, adapt sort when buffer is too small.
(__stable_sort): Adapt, use latter.
2022-07-15 Marek Polacek <polacek@redhat.com>
PR c++/104477
* include/std/type_traits (reference_constructs_from_temporary,
reference_converts_from_temporary): New class templates.
(reference_constructs_from_temporary_v,
reference_converts_from_temporary_v): New variable templates.
(__cpp_lib_reference_from_temporary): Define for C++23.
* include/std/version (__cpp_lib_reference_from_temporary): Define for
C++23.
* testsuite/20_util/variable_templates_for_traits.cc: Test
reference_constructs_from_temporary_v and
reference_converts_from_temporary_v.
* testsuite/20_util/reference_from_temporary/value.cc: New test.
* testsuite/20_util/reference_from_temporary/value2.cc: New test.
* testsuite/20_util/reference_from_temporary/version.cc: New test.
2022-07-12 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/106248
* include/std/istream [C++17] (operator>>(istream&, char*)):
Set eofbit if we stopped extracting at EOF.
* testsuite/27_io/basic_istream/extractors_character/char/pr106248.cc:
New test.
* testsuite/27_io/basic_istream/extractors_character/wchar_t/pr106248.cc:
New test.
2022-07-12 Jonathan Wakely <jwakely@redhat.com>
* include/bits/stl_iterator.h (__iter_to_alloc_t): Replace
add_const_t with const-qualifier.
* include/bits/utility.h (tuple_element<N, cv T>): Likewise for
all cv-qualifiers.
* include/std/type_traits (add_const, add_volatile): Replace
typedef-declaration with using-declaration.
(add_cv): Replace add_const and add_volatile with cv-qualifiers.
* include/std/variant (variant_alternative<N, cv T>): Replace
add_const_t, add_volatile_t and add_cv_t etc. with cv-qualifiers.
2022-07-09 François Dumont <fdumont@gcc.gnu.org>
* include/std/string: Remove obsolete comment about char_traits.h including
stl_algobase.h.
2022-07-07 Jonathan Wakely <jwakely@redhat.com>
PR c++/89074
* include/bits/char_traits.h (__gnu_cxx::char_traits::move):
Remove workaround for front-end bug.
2022-07-05 Alexandre Oliva <oliva@adacore.com>
* testsuite/util/testsuite_fs.h (nonexistent_path): Explain
why we need the typecast.
2022-07-05 Alexandre Oliva <oliva@adacore.com>
* testsuite/util/testsuite_fs.h (nonexistent_path): Convert
the getpid result to an integral type.
2022-07-01 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/106162
* include/Makefile.am (largefile-config.h): Add
stamp-${host_alias} prerequisite.
* include/Makefile.in: Regenerate.
2022-07-01 Jonathan Wakely <jwakely@redhat.com>
* include/bits/fs_ops.h: Add nodiscard to all pure functions.
* include/experimental/bits/fs_ops.h: Likewise.
* testsuite/27_io/filesystem/operations/all.cc: Do not discard
results of absolute and canonical.
* testsuite/27_io/filesystem/operations/absolute.cc: Cast
discarded result to void.
* testsuite/27_io/filesystem/operations/canonical.cc: Likewise.
* testsuite/27_io/filesystem/operations/exists.cc: Likewise.
* testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
* testsuite/27_io/filesystem/operations/read_symlink.cc:
Likewise.
* testsuite/27_io/filesystem/operations/status.cc: Likewise.
* testsuite/27_io/filesystem/operations/symlink_status.cc:
Likewise.
* testsuite/27_io/filesystem/operations/temp_directory_path.cc:
Likewise.
* testsuite/experimental/filesystem/operations/canonical.cc:
Likewise.
* testsuite/experimental/filesystem/operations/exists.cc:
Likewise.
* testsuite/experimental/filesystem/operations/is_empty.cc:
Likewise.
* testsuite/experimental/filesystem/operations/read_symlink.cc:
Likewise.
* testsuite/experimental/filesystem/operations/temp_directory_path.cc:
Likewise.
2022-07-01 Sebastian Huber <sebastian.huber@embedded-brains.de>
* configure: Regnerate.
* configure.ac (newlib, *-rtems*): Enable TLS support for all RTEMS
targets except bfin, lm32, mips, moxie, or1k, and v850.
For all RTEMS targets, define HAVE_ALIGNED_ALLOC, HAVE_AT_QUICK_EXIT,
HAVE_LINK, HAVE_POLL, HAVE_QUICK_EXIT, HAVE_READLINK, HAVE_SETENV,
HAVE_SLEEP, HAVE_SOCKATMARK, HAVE_STRERROR_L, HAVE_SYMLINK,
HAVE_TRUNCATE, and HAVE_USLEEP.
* crossconfig.m4 (*-rtems*): Remove.
2022-06-30 Jonathan Wakely <jwakely@redhat.com>
* include/bits/utility.h: Fix comment typos.
2022-06-30 Jonathan Wakely <jwakely@redhat.com>
* src/c++17/fs_ops.cc (fs::temp_directory_path()): Include path
in exception.
(fs::temp_directory_path(error_code&)): Rearrange to more
closely match the structure of the first overload.
* src/filesystem/ops.cc (fs::temp_directory_path): Likewise.
* testsuite/27_io/filesystem/operations/temp_directory_path.cc:
Check that exception contains the path.
* testsuite/experimental/filesystem/operations/temp_directory_path.cc:
Likewise.
2022-06-30 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/88881
* src/filesystem/ops.cc (has_trailing_slash): New helper
function.
(fs::status): Strip trailing slashes.
(fs::symlink_status): Likewise.
* testsuite/experimental/filesystem/operations/temp_directory_path.cc:
Clean the environment before each test and use TMP instead of
TMPDIR so the test passes on Windows.
2022-06-28 Jonathan Wakely <jwakely@redhat.com>
* src/filesystem/dir-common.h (_Dir_base::_At_path):
Use char_type consistently for paths.
2022-06-28 Jonathan Wakely <jwakely@redhat.com>
* src/c++17/fs_dir.cc (_Dir::dir_and_pathname):: Replace with
current() returning _At_path.
(_Dir::_Dir, _Dir::open_subdir, _Dir::do_unlink): Adjust.
* src/filesystem/dir-common.h (_Dir_base::_At_path): New class.
(_Dir_base::_Dir_Base, _Dir_base::openat): Use _At_path.
* src/filesystem/dir.cc (_Dir::dir_and_pathname): Replace with
current() returning _At_path.
(_Dir::_Dir, _Dir::open_subdir): Adjust.
2022-06-28 Jonathan Wakely <jwakely@redhat.com>
* src/c++17/fs_dir.cc (_Dir::_Dir) [!_GLIBCXX_HAVE_OPENAT]:
Always store pathname if we don't have openat or unlinkat,
because the full path is needed to open sub-directories and
remove entries.
2022-06-28 Jonathan Wakely <jwakely@redhat.com>
* testsuite/20_util/from_chars/4.cc: Only use log2 if C99 math
functions are available.
2022-06-27 Alexandre Oliva <oliva@adacore.com>
* testsuite/20_util/to_chars/long_double.cc: Use cmath
long double overloads for nexttoward and ldexp.
2022-06-27 Alexandre Oliva <oliva@adacore.com>
* testsuite/experimental/simd/standard_abi_usable.cc: Require
cmath support.
* testsuite/experimental/simd/standard_abi_usable_2.cc:
Likewise.
2022-06-27 Alexandre Oliva <oliva@adacore.com>
* testsuite/26_numerics/complex/proj.cc: Skip test in the
circumstances in which the implementation of proj is known to
be broken.
2022-06-27 Alexandre Oliva <oliva@adacore.com>
* src/c++17/fs_dir.cc (dir_and_pathname): Use dirfd if
_GLIBCXX_HAVE_OPENAT.
2022-06-27 Alexandre Oliva <oliva@adacore.com>
* testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc
(test06): Don't create symlinks when NO_SYMLINKS is defined.
2022-06-27 Alexandre Oliva <oliva@adacore.com>
* testsuite/lib/dg-options.exp (add_options_for_net_ts):
Add -Wl,--gc-sections for RTEMS targets.
* testsuite/experimental/net/timer/waitable/dest.cc: Link-time
xfail on RTEMS.
* testsuite/experimental/net/timer/waitable/ops.cc: Likewise.
* testsuite/experimental/net/internet/resolver/ops/lookup.cc:
Execution-time xfail on RTEMS.
* testsuite/experimental/net/internet/resolver/ops/reverse.cc:
Likewise.
2022-06-27 Jonathan Wakely <jwakely@redhat.com>
* testsuite/ext/mt_allocator/22309_thread.cc: Include <string>.
2022-06-27 Joel Brobecker <brobecker@adacore.com>
Jonathan Wakely <jwakely@redhat.com>
* testsuite/util/testsuite_fs.h (__gnu_test::nonexistent_path):
Always include a counter in the filename returned.
2022-06-27 Jonathan Wakely <jwakely@redhat.com>
* include/bits/move_only_function.h (_Never_valueless_alt):
Define partial specialization for std::move_only_function.
2022-06-27 Jonathan Wakely <jwakely@redhat.com>
* include/std/variant (_Build_FUN::_S_fun): Define fallback case
as deleted.
(__accepted_index, _Extra_visit_slot_needed): Replace class
templates with variable templates.
2022-06-27 Jonathan Wakely <jwakely@redhat.com>
* include/bits/fs_path.h (__is_path_iter_src): Replace class
template with variable template.
2022-06-27 Jonathan Wakely <jwakely@redhat.com>
* include/bits/chrono.h (is_clock_v): Define to false.
(is_clock_v<T>): Define partial specialization for true cases.
(is_clock): Define in terms of is_clock_v.
2022-06-24 Xi Ruoyao <xry111@xry111.site>
* scripts/extract_symvers.in: Use grep -E instead of egrep.
* scripts/run_doxygen: Likewise.
2022-06-24 Alexandre Oliva <oliva@adacore.com>
* acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for
openat.
* configure, config.h.in: Rebuilt.
* src/filesystem/dir-common.h (openat): Use ::openat if
_GLIBCXX_HAVE_OPENAT.
* src/filesystem/dir.cc (dir_and_pathname): Use dirfd if
_GLIBCXX_HAVE_OPENAT.
2022-06-24 Alexandre Oliva <oliva@adacore.com>
* testsuite/27_io/filesystem/operations/rename.cc: xfail on
rtems.
* testsuite/experimental/filesystem/operations/rename.cc:
Likewise.
2022-06-24 Alexandre Oliva <oliva@adacore.com>
* testsuite/util/testsuite_fs.h (NO_LAST_WRITE_TIME): Define
when appropriate.
* testsuite/lib/libstdc++.exp
(check_v3_target_fs_last_write_time): New.
* testsuite/lib/dg-options.exp (dg-require-target-fs-lwt):
New.
* testsuite/27_io/filesystem/operations/last_write_time.cc:
Skip the test if the features are unavailable.
* testsuite/experimental/filesystem/operations/last_write_time.cc:
Likewise.
2022-06-24 Alexandre Oliva <oliva@adacore.com>
* testsuite/util/testsuite_fs.h (NO_SPACE): Define if
appropriate.
* testsuite/lib/libstdc++.exp (check_v3_target_fs_space): New.
* testsuite/lib/dg-options.exp (dg-require-target-fs-space):
New.
* testsuite/27_io/filesystem/operations/space.cc: Require
target-fs-space.
* testsuite/experimental/filesystem/operations/space.cc:
Likewise.
2022-06-24 Alexandre Oliva <oliva@adacore.com>
* testsuite/util/testsuite_fs.h (NO_SYMLINKS): Define on
mingw and when create_symlink is a dummy.
* testsuite/27_io/filesystem/operations/symlink_status.cc:
Drop mingw xfail.
(test01, test02): Don't create symlinks when NO_SYMLINKS is
defined.
* testsuite/27_io/filesystem/operations/canonical.cc (test03):
Likewise.
* testsuite/27_io/filesystem/operations/copy.cc (test02):
Likewise.
* testsuite/27_io/filesystem/operations/create_directories.cc
(test04): Likewise.
* testsuite/27_io/filesystem/operations/create_directory.cc
(test01): Likewise.
* testsuite/27_io/filesystem/operations/permissions.cc
(test03, test04): Likewise.
* testsuite/27_io/filesystem/operations/remove.cc (test01):
Likewise.
* testsuite/27_io/filesystem/operations/remove_all.cc (test01):
Likewise.
* testsuite/27_io/filesystem/operations/rename.cc
(test_symlinks): Likewise.
* testsuite/27_io/filesystem/operations/weakly_canonical.cc
(test01): Likewise.
* testsuite/experimental/filesystem/iterators/recursive_directory_iterator.cc
(test06): Likewise.
* testsuite/experimental/filesystem/operations/copy.cc
(test01): Likewise.
* testsuite/experimental/filesystem/operations/create_directories.cc
(test04): Likewise.
* testsuite/experimental/filesystem/operations/create_directory.cc
(test01): Likewise.
* testsuite/experimental/filesystem/operations/permissions.cc
(test03, test04): Likewise.
* testsuite/experimental/filesystem/operations/remove.cc
(test01): Likewise.
* testsuite/experimental/filesystem/operations/remove_all.cc
(test01): Likewise.
* testsuite/experimental/filesystem/operations/rename.cc
(test01): Likewise.
* testsuite/lib/libstdc++.exp
(v3_check_preprocessor_condition): Add optional inc parameter.
Add it to the test program after include bits/c++config.h.
(check_v3_target_fs_symlinks): New.
* testsuite/lib/dg-options.exp
(dg-require-target-fs-symlinks): New.
* testsuite/27_io/filesystem/operations/read_symlink.cc:
Replace mingw xfail with require target-fs-symlinks.
* testsuite/experimental/filesystem/operations/read_symlink.cc:
Likewise.
2022-06-24 Alexandre Oliva <oliva@adacore.com>
* testsuite/27_io/filesystem/operations/copy.cc (test02):
Select TO after creating FROM.
(test03, test04): Likewise.
* testsuite/experimental/filesystem/operations/copy.cc
(test02, test03, test04): Likewise.
2022-06-24 Alexandre Oliva <oliva@adacore.com>
* testsuite/30_threads/thread/native_handle/cancel.cc: Add an
explicit cancellation point in case sleep_for lacks one.
2022-06-24 Alexandre Oliva <oliva@adacore.com>
* testsuite/lib/dg-options.exp (add_options_for_net_ts): Add
-lbsd for RTEMS targets.
2022-06-23 Jonathan Wakely <jwakely@redhat.com>
* testsuite/27_io/filesystem/iterators/error_reporting.cc: Use
rmdir to remove directories.
* testsuite/experimental/filesystem/iterators/error_reporting.cc:
Likewise.
2022-06-23 Jonathan Wakely <jwakely@redhat.com>
* testsuite/26_numerics/random/random_device/entropy.cc: Use
numeric_limits<unsigned>::digits.
2022-06-22 Alexandre Oliva <oliva@adacore.com>
* libsupc++/eh_globals.cc [!_GLIBCXX_HAVE_TLS]
(__eh_globals_init::~__eh_globals_init): Clear _S_init first.
2022-06-22 Alexandre Oliva <oliva@adacore.com>
* testsuite/30_threads/this_thread/60421.cc (test02): Call
sched_yield.
2022-06-22 Alexandre Oliva <oliva@adacore.com>
* testsuite/20_util/to_chars/long_double.cc: Require cmath.
2022-06-22 Alexandre Oliva <oliva@adacore.com>
* testsuite/23_containers/bitset/cons/dr1325-2.cc: Work around
global struct bitset.
* testsuite/23_containers/bitset/ext/15361.cc: Likewise.
* testsuite/23_containers/bitset/input/1.cc: Likewise.
* testsuite/23_containers/bitset/to_string/1.cc: Likewise.
* testsuite/23_containers/bitset/to_string/dr396.cc: Likewise.
2022-06-17 Jonathan Wakely <jwakely@redhat.com>
* testsuite/21_strings/basic_string/cons/char/105995.cc: Add
missing #include.
2022-06-16 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/105995
* include/bits/basic_string.h (_M_use_local_data): Initialize
the entire SSO buffer.
* testsuite/21_strings/basic_string/cons/char/105995.cc: New test.
2022-06-16 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/101482
* include/ext/vstring.h (operator==): Always check lengths
before comparing.
2022-06-15 François Dumont <fdumont@gcc.gnu.org>
PR libstdc++/105717
* include/bits/hashtable_policy.h (_ConvertToValueType): New.
* include/bits/hashtable.h (_Hashtable<>::_M_insert_unique_aux): New.
(_Hashtable<>::_M_insert(_Arg&&, const _NodeGenerator&, true_type)): Use latters.
(_Hashtable<>::_M_insert(_Arg&&, const _NodeGenerator&, false_type)): Likewise.
(_Hashtable(_InputIterator, _InputIterator, size_type, const _Hash&, const _Equal&,
const allocator_type&, true_type)): Use this.insert range.
(_Hashtable(_InputIterator, _InputIterator, size_type, const _Hash&, const _Equal&,
const allocator_type&, false_type)): Use _M_insert.
* testsuite/23_containers/unordered_map/cons/56112.cc: Check how many times conversion
is done.
* testsuite/23_containers/unordered_map/insert/105717.cc: New test.
* testsuite/23_containers/unordered_set/insert/105717.cc: New test.
2022-06-14 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/62187
* include/bits/basic_string.h (operator==): Always compare
lengths before checking string contents.
[!__cpp_lib_three_way_comparison] (operator==, operator!=):
Reorder arguments.
2022-06-14 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/59048
* include/bits/basic_string.h (compare): Define inline.
* include/bits/basic_string.tcc (compare): Remove out-of-line
definitions.
* include/bits/cow_string.h (compare): Define inline.
* testsuite/21_strings/basic_string/operations/compare/char/3.cc:
New test.
2022-06-14 Jonathan Wakely <jwakely@redhat.com>
* include/bits/new_allocator.h: Fix indentation.
* include/ext/malloc_allocator.h: Likewise.
2022-06-14 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/105957
* include/bits/allocator.h (allocator::allocate): Check for
overflow in constexpr allocation.
* testsuite/20_util/allocator/105975.cc: New test.
2022-06-13 Mark Mentovai <mark@mentovai.com>
* include/experimental/bits/fs_path.h (__detail::__null_terminated):
Rename to __nul_terminated to avoid colliding with a macro in
Apple's SDK.
2022-06-13 Jonathan Wakely <jwakely@redhat.com>
* include/std/atomic (__atomic_val_t): Use __type_identity_t
instead of atomic<T>::value_type, as per LWG 3220.
* testsuite/29_atomics/atomic/lwg3220.cc: New test.
2022-06-10 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/105844
* include/experimental/numeric (experimental::gcd): Simplify
assertions. Use __abs_r instead of __absu.
(experimental::lcm): Likewise. Remove use of __detail::__lcm so
overflow can be detected.
* include/std/numeric (__detail::__absu): Rename to __abs_r and
change to allow signed result type, so overflow can be detected.
(__detail::__lcm): Remove.
(gcd): Simplify assertions. Use __abs_r instead of __absu.
(lcm): Likewise. Remove use of __detail::__lcm so overflow can
be detected.
* testsuite/26_numerics/gcd/gcd_neg.cc: Adjust dg-error lines.
* testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.
* testsuite/26_numerics/gcd/105844.cc: New test.
* testsuite/26_numerics/lcm/105844.cc: New test.
2022-06-10 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/105880
* libsupc++/eh_globals.cc (eh_globals): Ensure constant init and
prevent destruction during termination.
(__eh_globals_init::_M_init): Replace with static member _S_init.
(__cxxabiv1::__cxa_get_globals_fast): Update.
(__cxxabiv1::__cxa_get_globals): Likewise.
2022-06-10 Jonathan Wakely <jwakely@redhat.com>
* include/bits/basic_string.h (__hash_str_base): New class
template.
(hash<basic_string<C, char_traits<C>, A>>): Define partial
specialization for each of the standard character types.
(hash<string>, hash<wstring>, hash<u8string>, hash<u16string>)
(hash<u32string>): Remove explicit specializations.
* include/std/string (__hash_string_base): Remove class
template.
(hash<pmr::string>, hash<pmr::wstring>, hash<pmr::u8string>)
(hash<pmr::u16string>, hash<pmr::u32string>): Remove explicit
specializations.
* testsuite/21_strings/basic_string/hash/hash.cc: Test with
custom allocators.
* testsuite/21_strings/basic_string/hash/hash_char8_t.cc:
Likewise.
2022-05-27 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/105671
* include/std/sstream (basic_stringbuf::_M_high_mark): Add
always_inline attribute.
2022-05-26 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/105681
* include/ext/pb_ds/detail/resize_policy/hash_prime_size_policy_imp.hpp:
Limit ga_sizes array to values that fit in size_t.
* include/ext/random [__SIZE_WIDTH < 32] (sfmt86243)
(sfmt86243_64, sfmt132049, sfmt132049_64, sfmt216091)
(sfmt216091_64): Do not declare.
2022-05-26 Jonathan Wakely <jwakely@redhat.com>
* python/libstdcxx/v6/printers.py (StdErrorCodePrinter): Make
lookup for ios_errc and future_errc check versioned namespace.
(StdAtomicPrinter): Strip versioned namespace from typename.
2022-05-26 Jonathan Wakely <jwakely@redhat.com>
* src/c++11/Makefile.am: Add new source file.
* src/c++11/Makefile.in: Regenerate.
* src/c++11/cxx11-ios_failure.cc (iostream_category):
Move to ...
* src/c++11/ios_errcat.cc: New file.
* testsuite/27_io/ios_base/failure/error_code.cc: Check that
std::iostream_category() is defined and used for std::io_errc.
2022-05-26 Jonathan Wakely <jwakely@redhat.com>
* include/bits/stl_iterator.h (counted_iterator::operator++(int)):
Add 'constexpr' as per LWG 3643.
* testsuite/24_iterators/counted_iterator/lwg3643.cc: New test.
2022-05-26 Jonathan Wakely <jwakely@redhat.com>
* include/bits/functional_hash.h (__is_fast_hash): Add doxygen
comment.
* include/bits/hashtable.h: Do not include <bits/stl_function.h>
here.
* include/bits/hashtable_policy.h: Include <bits/stl_pair.h> and
<bits/functional_hash.h>.
* include/bits/unordered_map.h: Include required headers.
* include/bits/unordered_set.h: Likewise.
* include/std/unordered_map: Do not include headers for indirect
dependencies.
* include/std/unordered_set: Likewise.
2022-05-26 Jonathan Wakely <jwakely@redhat.com>
* include/bits/ranges_algobase.h: Do not include
<bits/stl_iterator_base_types.h>.
* include/std/string: Likewise.
* include/std/variant: Likewise.
2022-05-26 Nathan Sidwell <nathan@acm.org>
* include/bits/hashtable.h: Include required headers.
* include/bits/hashtable_policy.h: Likewise.
* include/bits/stl_heap.h: Likewise.
* include/bits/stl_iterator_base_funcs.h: Likewise.
2022-05-26 François Dumont <fdumont@gcc.gnu.org>
* python/libstdcxx/v6/printers.py (StdSpanPrinter.__init__):
Strip typename from version namespace.
2022-05-26 Jonathan Wakely <jwakely@redhat.com>
* python/libstdcxx/v6/printers.py (SharedPointerPrinter): Strip
versioned namespace from the template argument too.
2022-05-26 Jonathan Wakely <jwakely@redhat.com>
* testsuite/21_strings/basic_string/modifiers/pop_back/char/1.cc:
Moved to...
* testsuite/21_strings/basic_string/modifiers/pop_back/char.cc:
...here.
* testsuite/21_strings/basic_string/modifiers/pop_back/wchar_t/1.cc:
Moved to...
* testsuite/21_strings/basic_string/modifiers/pop_back/wchar_t.cc:
...here.
* testsuite/21_strings/basic_string/modifiers/swap/wchar_t/constexpr.cc:
Moved to...
* testsuite/21_strings/basic_string/modifiers/swap/constexpr-wchar_t.cc:
...here.
* testsuite/21_strings/basic_string/modifiers/swap/char/constexpr.cc:
Moved to...
* testsuite/21_strings/basic_string/modifiers/swap/constexpr.cc:
...here.
* testsuite/21_strings/basic_string/operations/contains/char/1.cc:
Moved to...
* testsuite/21_strings/basic_string/operations/contains/char.cc:
...here.
* testsuite/21_strings/basic_string/operations/contains/wchar_t/1.cc:
Moved to...
* testsuite/21_strings/basic_string/operations/contains/wchar_t.cc:
...here.
* testsuite/21_strings/basic_string/operations/data/char/1.cc:
Moved to...
* testsuite/21_strings/basic_string/operations/data/char.cc:
...here.
* testsuite/21_strings/basic_string/operations/data/wchar_t/1.cc:
Moved to...
* testsuite/21_strings/basic_string/operations/data/wchar_t.cc:
...here.
* testsuite/21_strings/basic_string/operations/ends_with/char/1.cc:
Moved to...
* testsuite/21_strings/basic_string/operations/ends_with/char.cc:
...here.
* testsuite/21_strings/basic_string/operations/ends_with/wchar_t/1.cc:
Moved to...
* testsuite/21_strings/basic_string/operations/ends_with/wchar_t.cc:
...here.
* testsuite/21_strings/basic_string/operations/starts_with/char/1.cc:
Moved to...
* testsuite/21_strings/basic_string/operations/starts_with/char.cc:
...here.
* testsuite/21_strings/basic_string/operations/starts_with/wchar_t/1.cc:
Moved to...
* testsuite/21_strings/basic_string/operations/starts_with/wchar_t.cc:
...here.
* testsuite/21_strings/basic_string/operations/substr/char/1.cc:
Moved to...
* testsuite/21_strings/basic_string/operations/substr/char.cc:
...here.
* testsuite/21_strings/basic_string/operations/substr/wchar_t/1.cc:
Moved to...
* testsuite/21_strings/basic_string/operations/substr/wchar_t.cc:
...here.
* testsuite/21_strings/basic_string/range_access/char/1.cc:
Moved to...
* testsuite/21_strings/basic_string/range_access/char.cc:
...here.
* testsuite/21_strings/basic_string/range_access/wchar_t/1.cc:
Moved to...
* testsuite/21_strings/basic_string/range_access/wchar_t.cc:
...here.
* testsuite/21_strings/basic_string_view/modifiers/remove_prefix/char/1.cc:
Moved to...
* testsuite/21_strings/basic_string_view/modifiers/remove_prefix/char.cc:
...here.
* testsuite/21_strings/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc:
Moved to...
* testsuite/21_strings/basic_string_view/modifiers/remove_prefix/wchar_t.cc:
...here.
* testsuite/21_strings/basic_string_view/modifiers/remove_suffix/char/1.cc:
Moved to...
* testsuite/21_strings/basic_string_view/modifiers/remove_suffix/char.cc:
...here.
* testsuite/21_strings/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc:
Moved to...
* testsuite/21_strings/basic_string_view/modifiers/remove_suffix/wchar_t.cc:
...here.
* testsuite/21_strings/basic_string_view/modifiers/swap/char/1.cc:
Moved to...
* testsuite/21_strings/basic_string_view/modifiers/swap/char.cc:
...here.
* testsuite/21_strings/basic_string_view/modifiers/swap/wchar_t/1.cc:
Moved to...
* testsuite/21_strings/basic_string_view/modifiers/swap/wchar_t.cc:
...here.
* testsuite/21_strings/basic_string_view/operations/contains/char/1.cc:
Moved to...
* testsuite/21_strings/basic_string_view/operations/contains/char.cc:
...here.
* testsuite/21_strings/basic_string_view/operations/contains/wchar_t/1.cc:
Moved to...
* testsuite/21_strings/basic_string_view/operations/contains/wchar_t.cc:
...here.
* testsuite/21_strings/basic_string_view/operations/data/char/1.cc:
Moved to...
* testsuite/21_strings/basic_string_view/operations/data/char.cc:
...here.
* testsuite/21_strings/basic_string_view/operations/data/wchar_t/1.cc:
Moved to...
* testsuite/21_strings/basic_string_view/operations/data/wchar_t.cc:
...here.
* testsuite/21_strings/basic_string_view/operations/ends_with/char/1.cc:
Moved to...
* testsuite/21_strings/basic_string_view/operations/ends_with/char.cc:
...here.
* testsuite/21_strings/basic_string_view/operations/ends_with/wchar_t/1.cc:
Moved to...
* testsuite/21_strings/basic_string_view/operations/ends_with/wchar_t.cc:
...here.
* testsuite/21_strings/basic_string_view/operations/starts_with/char/1.cc:
Moved to...
* testsuite/21_strings/basic_string_view/operations/starts_with/char.cc:
...here.
* testsuite/21_strings/basic_string_view/operations/starts_with/wchar_t/1.cc:
Moved to...
* testsuite/21_strings/basic_string_view/operations/starts_with/wchar_t.cc:
...here.
* testsuite/21_strings/basic_string_view/operations/substr/char/1.cc:
Moved to...
* testsuite/21_strings/basic_string_view/operations/substr/char.cc:
...here.
* testsuite/21_strings/basic_string_view/operations/substr/wchar_t/1.cc:
Moved to...
* testsuite/21_strings/basic_string_view/operations/substr/wchar_t.cc:
...here.
* testsuite/21_strings/basic_string_view/range_access/char/1.cc:
Moved to...
* testsuite/21_strings/basic_string_view/range_access/char.cc:
...here.
* testsuite/21_strings/basic_string_view/range_access/wchar_t/1.cc:
Moved to...
* testsuite/21_strings/basic_string_view/range_access/wchar_t.cc:
...here.
* testsuite/21_strings/basic_string/requirements/explicit_instantiation/char/1.cc:
Moved to...
* testsuite/21_strings/basic_string/requirements/explicit_instantiation/char.cc:
...here.
* testsuite/21_strings/basic_string/requirements/explicit_instantiation/char16_t/1.cc:
Moved to...
* testsuite/21_strings/basic_string/requirements/explicit_instantiation/char16_t.cc:
...here.
* testsuite/21_strings/basic_string/requirements/explicit_instantiation/char32_t/1.cc:
Moved to...
* testsuite/21_strings/basic_string/requirements/explicit_instantiation/char32_t.cc:
...here.
* testsuite/21_strings/basic_string/requirements/explicit_instantiation/char8_t/1.cc:
Moved to...
* testsuite/21_strings/basic_string/requirements/explicit_instantiation/char8_t.cc:
...here.
* testsuite/21_strings/basic_string/requirements/explicit_instantiation/1.cc:
Moved to...
* testsuite/21_strings/basic_string/requirements/explicit_instantiation/int.cc:
...here.
* testsuite/21_strings/basic_string/requirements/explicit_instantiation/wchar_t/1.cc:
Moved to...
* testsuite/21_strings/basic_string/requirements/explicit_instantiation/wchar_t.cc:
...here.
* testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char/1.cc:
Moved to...
* testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char.cc:
...here.
* testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc:
Moved to...
* testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char16_t.cc:
...here.
* testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc:
Moved to...
* testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char32_t.cc:
...here.
* testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char8_t/1.cc:
Moved to...
* testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char8_t.cc:
...here.
* testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/1.cc:
Moved to...
* testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/int.cc:
...here.
* testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc:
Moved to...
* testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/wchar_t.cc:
...here.
* testsuite/21_strings/char_traits/requirements/explicit_instantiation/char/1.cc:
Moved to...
* testsuite/21_strings/char_traits/requirements/explicit_instantiation/char.cc:
...here.
* testsuite/21_strings/char_traits/requirements/explicit_instantiation/char16_t/1.cc:
Moved to...
* testsuite/21_strings/char_traits/requirements/explicit_instantiation/char16_t.cc:
...here.
* testsuite/21_strings/char_traits/requirements/explicit_instantiation/char32_t/1.cc:
Moved to...
* testsuite/21_strings/char_traits/requirements/explicit_instantiation/char32_t.cc:
...here.
* testsuite/21_strings/char_traits/requirements/explicit_instantiation/char8_t/1.cc:
Moved to...
* testsuite/21_strings/char_traits/requirements/explicit_instantiation/char8_t.cc:
...here.
* testsuite/21_strings/char_traits/requirements/explicit_instantiation/short/1.cc:
Moved to...
* testsuite/21_strings/char_traits/requirements/explicit_instantiation/short.cc:
...here.
* testsuite/21_strings/char_traits/requirements/explicit_instantiation/wchar_t/1.cc:
Moved to...
* testsuite/21_strings/char_traits/requirements/explicit_instantiation/wchar_t.cc:
...here.
2022-05-26 Jonathan Wakely <jwakely@redhat.com>
* testsuite/20_util/duration/requirements/explicit_instantiation/explicit_instantiation.cc:
Moved to...
* testsuite/20_util/duration/requirements/explicit_instantiation.cc: ...here.
* testsuite/20_util/time_point/requirements/explicit_instantiation/explicit_instantiation.cc:
Moved to...
* testsuite/20_util/time_point/requirements/explicit_instantiation.cc: ...here.
* testsuite/20_util/unique_ptr/requirements/explicit_instantiation/explicit_instantiation.cc:
Moved to...
* testsuite/20_util/unique_ptr/requirements/explicit_instantiation.cc: ...here.
2022-05-25 Jason Merrill <jason@redhat.com>
* testsuite/20_util/function_objects/constexpr_searcher.cc: Add
constexpr.
2022-05-20 Jonathan Wakely <jwakely@redhat.com>
* testsuite/26_numerics/random/bernoulli_distribution/operators/values.cc:
Run fewer iterations for simulator targets.
* testsuite/26_numerics/random/binomial_distribution/operators/values.cc:
Likewise.
* testsuite/26_numerics/random/discrete_distribution/operators/values.cc:
Likewise.
* testsuite/26_numerics/random/geometric_distribution/operators/values.cc:
Likewise.
* testsuite/26_numerics/random/negative_binomial_distribution/operators/values.cc:
Likewise.
* testsuite/26_numerics/random/poisson_distribution/operators/values.cc:
Likewise.
* testsuite/26_numerics/random/uniform_int_distribution/operators/values.cc:
Likewise.
2022-05-19 Jonathan Wakely <jwakely@redhat.com>
* include/bits/char_traits.h: Only include <cstdint> when
necessary.
* include/std/stacktrace: Use __UINTPTR_TYPE__ instead of
uintptr_t.
* src/c++11/cow-stdexcept.cc: Include <stdint.h>.
* src/c++17/floating_to_chars.cc: Likewise.
* testsuite/20_util/assume_aligned/1.cc: Include <cstdint>.
* testsuite/20_util/assume_aligned/3.cc: Likewise.
* testsuite/20_util/shared_ptr/creation/array.cc: Likewise.
2022-05-19 Jonathan Wakely <jwakely@redhat.com>
* include/bits/basic_string.h: Do not include <ext/atomicity.h>
here.
* include/bits/cow_string.h: Include it here.
2022-05-19 Jonathan Wakely <jwakely@redhat.com>
* include/Makefile.am: Add new header.
* include/Makefile.in: Regenerate.
* include/bits/memory_resource.h: New file.
* include/std/deque: Include <bits/memory_resource.h>.
* include/std/forward_list: Likewise.
* include/std/list: Likewise.
* include/std/map: Likewise.
* include/std/memory_resource (pmr::memory_resource): Move to
new <bits/memory_resource.h> header.
(pmr::polymorphic_allocator): Likewise.
* include/std/regex: Likewise.
* include/std/set: Likewise.
* include/std/stacktrace: Likewise.
* include/std/string: Likewise.
* include/std/unordered_map: Likewise.
* include/std/unordered_set: Likewise.
* include/std/vector: Likewise.
* testsuite/21_strings/basic_string/types/pmr_typedefs.cc:
Remove <memory_resource> header and check construction.
* testsuite/23_containers/deque/types/pmr_typedefs.cc: Likewise.
* testsuite/23_containers/forward_list/pmr_typedefs.cc:
Likewise.
* testsuite/23_containers/list/pmr_typedefs.cc: Likewise.
* testsuite/23_containers/map/pmr_typedefs.cc: Likewise.
* testsuite/23_containers/multimap/pmr_typedefs.cc: Likewise.
* testsuite/23_containers/multiset/pmr_typedefs.cc: Likewise.
* testsuite/23_containers/set/pmr_typedefs.cc: Likewise.
* testsuite/23_containers/unordered_map/pmr_typedefs.cc:
Likewise.
* testsuite/23_containers/unordered_multimap/pmr_typedefs.cc:
Likewise.
* testsuite/23_containers/unordered_multiset/pmr_typedefs.cc:
Likewise.
* testsuite/23_containers/unordered_set/pmr_typedefs.cc:
Likewise.
* testsuite/23_containers/vector/pmr_typedefs.cc: Likewise.
* testsuite/28_regex/match_results/pmr_typedefs.cc: Likewise.
2022-05-19 Jonathan Wakely <jwakely@redhat.com>
* include/std/memory_resource (polymorphic_allocator): Add
non-template equality operator, as proposed for LWG 3683.
* testsuite/20_util/polymorphic_allocator/lwg3683.cc: New test.
2022-05-17 Jonathan Wakely <jwakely@redhat.com>
* src/c++17/memory_resource.cc (set_default_resource): Use
memory_order_acq_rel.
(get_default_resource): Use memory_order_acquire.
2022-05-17 Jonathan Wakely <jwakely@redhat.com>
* include/std/memory_resource (new_delete_resource): Add
nodiscard, returns_nonnull and const attributes.
(null_memory_resource): Likewise.
(set_default_resource, get_default_resource): Add returns_nonnull
attribute.
(memory_resource::is_equal): Add nodiscard attribute.
(operator==, operator!=): Likewise.
2022-05-17 Jonathan Wakely <jwakely@redhat.com>
* include/bits/ios_base.h (io_category): Add const and nodiscard
attributes.
(make_error_code, make_error_condition): Add nodiscard.
* include/std/future (future_category): Add const and nodiscard.
(make_error_code, make_error_condition): Add nodiscard.
* include/std/system_error (generic_category system_category):
Add nodiscard. Replace _GLIBCXX_CONST with C++11 attribute.
(error_code::value, error_code::category, error_code::operator bool)
(error_condition::value, error_condition::category)
(error_condition::operator bool, make_error_code)
(make_error_condition, operator==, operator!=, operator<=>): Add
nodiscard.
2022-05-17 Jonathan Wakely <jwakely@redhat.com>
* testsuite/20_util/expected/synopsis.cc: Skip for versioned
namespace.
* testsuite/27_io/headers/iosfwd/synopsis.cc: Likewise.
2022-05-17 Jonathan Wakely <jwakely@redhat.com>
* src/Makefile.am [ENABLE_SYMVERS_GNU_NAMESPACE] (cxx11_sources):
Do not build the compatibility*-c++0x.cc objects.
* src/Makefile.in: Regenerate.
* src/c++11/compatibility-c++0x.cc [_GLIBCXX_INLINE_VERSION]:
Refuse to build for the versioned namespace.
* src/c++11/compatibility-chrono.cc: Likewise.
* src/c++11/compatibility-condvar.cc: Likewise.
* src/c++11/compatibility-thread-c++0x.cc: Likewise.
* src/c++11/chrono.cc (system_clock, steady_clock):
Use macros to define in inline namespace _V2, matching the
declarations in <system_error>.
* src/c++11/system_error.cc (system_category, generic_category):
Likewise.
2022-05-16 Jonathan Wakely <jwakely@redhat.com>
* doc/xml/manual/prerequisites.xml: Fix attributes for external
hyperlink.
* doc/html/manual/setup.html: Regenerate.
2022-05-16 Jonathan Wakely <jwakely@redhat.com>
* doc/xml/manual/status_cxx2023.xml: Update with gcc-12 support.
* doc/html/*: Regenerate.
2022-05-16 Jonathan Wakely <jwakely@redhat.com>
* doc/xml/manual/intro.xml: Include new chapter.
* doc/xml/manual/status_cxx2020.xml: Tweak release numbers.
* doc/xml/manual/status_cxx2023.xml: New file.
* doc/html/*: Regenerate.
2022-05-16 Jonathan Wakely <jwakely@redhat.com>
* doc/html/manual/status.html: Regenerate.
* doc/xml/manual/status_cxx2020.xml: Fix supported version for
C++20 bit operations.
2022-05-13 Jonathan Wakely <jwakely@redhat.com>
* include/bits/std_thread.h (thread::_State, thread::_State_ptr):
Declare as private unless _GLIBCXX_THREAD_IMPL is defined.
* src/c++11/thread.cc (_GLIBCXX_THREAD_IMPL): Define.
2022-05-13 Jonathan Wakely <jwakely@redhat.com>
* include/std/future (launch): Make operators noexcept.
2022-05-13 Jonathan Wakely <jwakely@redhat.com>
* doc/doxygen/user.cfg.in (PREDEFINED): Replace __exception_ptr
with "__unspecified__".
* libsupc++/exception_ptr.h: Improve doxygen docs.
(__exception_ptr::swap): Also declare in namespace std.
2022-05-13 Jonathan Wakely <jwakely@redhat.com>
* libsupc++/nested_exception.h (throw_with_nested) [C++17]: Use
if-constexpr instead of tag dispatching.
(rethrow_if_nested) [C++17]: Likewise.
(rethrow_if_nested) [!__cpp_rtti]: Do not use dynamic_cast if it
would require RTTI.
* testsuite/18_support/nested_exception/rethrow_if_nested-term.cc:
New test.
2022-05-13 Jonathan Wakely <jwakely@redhat.com>
* doc/doxygen/user.cfg.in (PREDEFINED): Define
_GTHREAD_USE_MUTEX_TIMEDLOCK macro.
* include/bits/std_mutex.h (mutex, lock_guard): Use @since and
@headerfile.
* include/bits/unique_lock.h (unique_lock): Likewise.
* include/std/mutex (recursive_mutex, timed_mutex)
(recursive_timed_mutex, scoped_lock): Likewise.
2022-05-13 Jonathan Wakely <jwakely@redhat.com>
* doc/doxygen/user.cfg.in (PREDEFINED): Define
_GLIBCXX23_CONSTEXPR macro.
* include/backward/auto_ptr.h (auto_ptr): Use @deprecated.
* include/bits/unique_ptr.h (default_delete): Use @since and
@headerfile.
* include/std/scoped_allocator: Remove @ingroup from @file
block.
2022-05-13 Jonathan Wakely <jwakely@redhat.com>
* include/bits/std_thread.h (thread, thread::id): Improve
doxygen docs.
* include/std/future: Likewise.
* include/std/thread (jthread): Likewise.
2022-05-13 Jonathan Wakely <jwakely@redhat.com>
* include/bits/ostream_insert.h: Mark helper functions as
undocumented by Doxygen.
* include/bits/stl_algo.h: Use markdown for formatting and mark
helper functions as undocumented.
* include/bits/stl_numeric.h: Likewise.
* include/bits/stl_pair.h (pair): Add @headerfile.
2022-05-13 Jonathan Wakely <jwakely@redhat.com>
* doc/doxygen/user.cfg.in (PREDEFINED): Define __allocator_base
so that Doxygen shows the right base-class for std::allocator.
* include/bits/alloc_traits.h: Improve doxygen docs.
* include/bits/allocator.h: Likewise.
* include/bits/new_allocator.h: Likewise.
* include/ext/new_allocator.h: Likewise.
2022-05-13 Jonathan Wakely <jwakely@redhat.com>
* doc/doxygen/user.cfg.in (PREDEFINED): Define macro
_GLIBCXX_DOXYGEN_ONLY to expand its argument.
* include/bits/c++config (_GLIBCXX_DOXYGEN_ONLY): Define.
* include/bits/regex.h: Improve doxygen docs.
* include/bits/regex_constants.h: Likewise.
* include/bits/regex_error.h: Likewise.
2022-05-13 Jonathan Wakely <jwakely@redhat.com>
* include/std/atomic: Suppress doxygen docs for
implementation details.
* include/bits/atomic_base.h: Likewise.
* include/bits/shared_ptr_atomic.h: Use markdown. Fix grouping
so that std::atomic is not added to the pointer abstractions
group.
2022-05-13 Jonathan Wakely <jwakely@redhat.com>
* include/std/system_error: Improve doxygen comments.
2022-05-13 Jonathan Wakely <jwakely@redhat.com>
* include/bits/ptr_traits.h: Add some doxygen comments.
2022-05-13 Jonathan Wakely <jwakely@redhat.com>
* doc/doxygen/user.cfg.in (PREDEFINED): Expand new macros to
nothing.
* include/bits/c++config (_GLIBCXX_BEGIN_INLINE_ABI_NAMESPACE)
(_GLIBCXX_END_INLINE_ABI_NAMESPACE): Define new macros.
* include/bits/algorithmfwd.h (_V2::__rotate): Use new macros
for the namespace.
* include/bits/chrono.h (chrono::_V2::system_clock): Likewise.
* include/bits/stl_algo.h (_V2::__rotate): Likewise.
* include/std/condition_variable (_V2::condition_variable_any):
Likewise.
* include/std/system_error (_V2::error_category): Likewise.
2022-05-13 Jonathan Wakely <jwakely@redhat.com>
* include/bits/mofunc_impl.h: Fix doxygen command.
2022-05-13 Jonathan Wakely <jwakely@redhat.com>
* doc/doxygen/user.cfg.in (GROUP_NESTED_COMPOUNDS): Set to NO.
(CLASS_DIAGRAMS): Remove obsolete option.
2022-05-12 Jonathan Wakely <jwakely@redhat.com>
* config/locale/dragonfly/numeric_members.cc: Remove whitespace.
* config/locale/gnu/numeric_members.cc: Likewise.
* include/bits/locale_facets_nonio.h: Likewise.
* libsupc++/typeinfo: Likewise.
2022-05-10 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/105284
* include/std/iosfwd: Add declarations for <spanstream> class
templates and typedefs.
* include/std/spanstream (basic_spanbuf, basic_ispanstream)
(basic_ospanstream, basic_spanstream): Remove default template
arguments.
* testsuite/27_io/headers/iosfwd/synopsis.cc: Add <spanstream>
declarations.
* testsuite/27_io/headers/iosfwd/types.cc: Check <spanstream>
default arguments.
2022-05-10 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/105284
* include/std/iosfwd: Add declarations for <synstream> class
templates and typedefs.
* include/std/syncstream (basic_syncbuf, basic_osyncstream):
Remove default template arguments.
* testsuite/27_io/headers/iosfwd/synopsis.cc: New test.
* testsuite/27_io/headers/iosfwd/types.cc: New test.
2022-05-06 Jonathan Wakely <jwakely@redhat.com>
* include/bits/random.tcc (operator==): Only check
normal_distribution::_M_saved_available once.
* testsuite/26_numerics/random/normal_distribution/operators/equal.cc:
Check equality after state changes.
* testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error
lineno.
2022-05-06 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/105502
* include/bits/random.tcc
(operator>>(basic_istream<C,T>&, normal_distribution<R>&)):
Update state when __state_avail is false.
* testsuite/26_numerics/random/normal_distribution/operators/serialize.cc:
Check that deserialized object equals serialized one.
2022-05-06 Alexandre Oliva <oliva@adacore.com>
* include/experimental/bits/simd.h [__ALTIVEC__]: Require VSX
for double, long long, and 64-bit long intrinsic types.
[__ALTIVEC__] (__intrinsic_type): Mention 128-bit in
preexisting long double diagnostic, adjust no-VSX double
diagnostic to cover 64-bit long double as well.
2022-05-06 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/104731
* testsuite/27_io/filesystem/iterators/error_reporting.cc:
Use a trailing char array as storage for dirent::d_name.
2022-05-06 Jonathan Wakely <jwakely@redhat.com>
* include/std/stacktrace: Do not include <cxxabi.h>.
(__cxa_demangle): Declare.
2022-05-06 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/99871
* include/bits/specfun.h: Use visibility attribute on namespace,
instead of pragma push/pop.
* libsupc++/compare: Likewise.
* libsupc++/exception: Likewise.
* libsupc++/exception.h: Likewise.
* libsupc++/exception_ptr.h: Likewise.
* libsupc++/initializer_list: Likewise.
* libsupc++/nested_exception.h: Likewise.
2022-05-06 Jonathan Wakely <jwakely@redhat.com>
* doc/xml/manual/test.xml: Remove requirement for copyright and
GPL notice in tests.
* doc/html/manual/test.html: Regenerate.
2022-05-05 Jonathan Wakely <jwakely@redhat.com>
* include/experimental/memory_resource [!__cpp_rtti]
(__resource_adaptor_imp::do_is_equal): Do not use dynamic_cast
when RTTI is disabled.
* testsuite/17_intro/freestanding.cc: Require RTTI.
* testsuite/18_support/exception/38732.cc: Likewise.
* testsuite/18_support/exception_ptr/rethrow_exception.cc:
Likewise.
* testsuite/18_support/nested_exception/68139.cc: Likewise.
* testsuite/18_support/nested_exception/rethrow_if_nested.cc:
Likewise.
* testsuite/18_support/type_info/103240.cc: Likewise.
* testsuite/18_support/type_info/fundamental.cc: Likewise.
* testsuite/18_support/type_info/hash_code.cc: Likewise.
* testsuite/20_util/any/assign/emplace.cc: Likewise.
* testsuite/20_util/any/cons/in_place.cc: Likewise.
* testsuite/20_util/any/misc/any_cast.cc: Likewise.
* testsuite/20_util/any/observers/type.cc: Likewise.
* testsuite/20_util/function/1.cc: Likewise.
* testsuite/20_util/function/2.cc: Likewise.
* testsuite/20_util/function/3.cc: Likewise.
* testsuite/20_util/function/4.cc: Likewise.
* testsuite/20_util/function/5.cc: Likewise.
* testsuite/20_util/function/6.cc: Likewise.
* testsuite/20_util/function/7.cc: Likewise.
* testsuite/20_util/function/8.cc: Likewise.
* testsuite/20_util/polymorphic_allocator/resource.cc: Likewise.
* testsuite/20_util/shared_ptr/casts/1.cc: Likewise.
* testsuite/20_util/shared_ptr/casts/rval.cc: Likewise.
* testsuite/20_util/shared_ptr/cons/unique_ptr_deleter_ref_2.cc:
Likewise.
* testsuite/20_util/shared_ptr/misc/get_deleter.cc: Likewise.
* testsuite/20_util/typeindex/comparison_operators.cc: Likewise.
* testsuite/20_util/typeindex/comparison_operators_c++20.cc:
Likewise.
* testsuite/20_util/typeindex/hash.cc: Likewise.
* testsuite/20_util/typeindex/hash_code.cc: Likewise.
* testsuite/20_util/typeindex/name.cc: Likewise.
* testsuite/22_locale/ctype/is/string/89728_neg.cc: Likewise.
* testsuite/22_locale/global_templates/standard_facet_hierarchies.cc:
Likewise.
* testsuite/22_locale/global_templates/user_facet_hierarchies.cc:
Likewise.
* testsuite/22_locale/locale/13630.cc: Check type without using
RTTI.
* testsuite/23_containers/array/requirements/non_default_constructible.cc:
Require RTTI.
* testsuite/27_io/basic_ostream/emit/1.cc: Likewise.
* testsuite/27_io/fpos/14320-1.cc: Check type without using RTTI.
* testsuite/27_io/fpos/mbstate_t/12065.cc: Require RTTI.
* testsuite/27_io/ios_base/failure/dual_abi.cc: Likewise.
* testsuite/experimental/any/misc/any_cast.cc: Likewise.
* testsuite/experimental/any/observers/type.cc: Likewise.
* testsuite/experimental/memory_resource/resource_adaptor.cc:
Likewise.
* testsuite/lib/libstdc++.exp (check_effective_target_rtti):
Define new proc.
* testsuite/tr1/3_function_objects/function/1.cc: Likewise.
* testsuite/tr1/3_function_objects/function/2.cc: Likewise.
* testsuite/tr1/3_function_objects/function/3.cc: Likewise.
* testsuite/tr1/3_function_objects/function/4.cc: Likewise.
* testsuite/tr1/3_function_objects/function/5.cc: Likewise.
* testsuite/tr1/3_function_objects/function/6.cc: Likewise.
* testsuite/tr1/3_function_objects/function/7.cc: Likewise.
* testsuite/tr1/3_function_objects/function/8.cc: Likewise.
* testsuite/tr2/bases/value.cc: Likewise.
* testsuite/tr2/direct_bases/value.cc: Likewise.
* testsuite/util/exception/safety.h [!__cpp_rtti]: Don't print
types without RTTI.
2022-05-04 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/104719
* include/std/array (array::size(), array::max_size())
(array::empty(), array::data()): Add always_inline attribute.
2022-05-04 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/104719
* include/std/array (__array_traits::_S_ref): Remove.
(__array_traits::_S_ptr): Remove.
(__array_traits<T, 0>::_Type): Define operator[] and operator T*
to provide an array-like API.
(array::_AT_Type): Remove public typeef.
(array::operator[], array::at, array::front, array::back): Use
index operator to access _M_elems instead of _S_ref.
(array::data): Use implicit conversion from _M_elems to pointer.
(swap(array&, array&)): Use __enable_if_t helper.
(get<I>): Use index operator to access _M_elems.
* testsuite/23_containers/array/tuple_interface/get_neg.cc:
Adjust dg-error line numbers.
2022-05-03 Alexandre Oliva <oliva@adacore.com>
PR c++/105324
* testsuite/20_util/from_chars/pr105324.cc: Guard test body
with conditional for floating-point overloads of from_char.
2022-05-02 Patrick Palka <ppalka@redhat.com>
PR libstdc++/103911
* src/c++17/floating_from_chars.cc (find_end_of_float): Accept
two delimeters for the exponent part in the form of a possibly
NULL string of length two. Don't use std::tolower.
(pattern): Adjust calls to find_end_of_float accordingly.
2022-05-02 Patrick Palka <ppalka@redhat.com>
PR libstdc++/105441
* src/c++17/floating_from_chars.cc (__floating_from_chars_hex):
Also accept 'P' as the start of the exponent.
* testsuite/20_util/from_chars/7.cc: Add corresponding testcase.
2022-04-29 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/105417
* config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt:
Regenerate.
* src/c++11/compatibility-ldbl-alt128.cc [_GLIBCXX_USE_DUAL_ABI]:
Define __gnu_ieee128::num_get<C>::_M_extract_int[abi:cxx11]<I>
symbols as aliases for corresponding symbols without abi-tag.
2022-04-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* config/abi/post/i386-solaris/baseline_symbols.txt: Regenerate.
* config/abi/post/i386-solaris/amd64/baseline_symbols.txt:
Likewise.
* config/abi/post/sparc-solaris/baseline_symbols.txt: Likewise.
* config/abi/post/sparc-solaris/sparcv9/baseline_symbols.txt:
Likewise.
2022-04-28 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/99290
* src/c++17/fs_ops.cc (fs::copy): Pass error_code to
directory_iterator constructor, and check on each iteration.
* src/filesystem/ops.cc (fs::copy): Likewise.
* testsuite/27_io/filesystem/operations/copy.cc: Check for
errors during recursion.
* testsuite/experimental/filesystem/operations/copy.cc:
Likewise.
2022-04-28 François Dumont <fdumont@gcc.gnu.org>
* config/abi/pre/gnu-versioned-namespace.ver: Remove
std::random_device::* pattern.
2022-04-27 Jakub Jelinek <jakub@redhat.com>
* config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
* config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
* config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
* config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
* config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
* config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update.
* config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
* config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update.
2022-04-27 Jonathan Wakely <jwakely@redhat.com>
* python/libstdcxx/v6/printers.py (SharedPointerPrinter): Add
support for atomic<shared_ptr<T>> and atomic<weak_ptr<T>>.
(StdAtomicPrinter): New printer.
(build_libstdcxx_dictionary): Register new printer.
* testsuite/libstdc++-prettyprinters/cxx11.cc: Test std::atomic.
* testsuite/libstdc++-prettyprinters/cxx20.cc: Test atomic smart
pointers.
2022-04-26 Jonathan Wakely <jwakely@redhat.com>
* include/bits/shared_ptr_atomic.h (atomic<shared_ptr>): Add
constructor for constant initialization from nullptr_t.
* testsuite/20_util/shared_ptr/atomic/atomic_shared_ptr.cc:
Check for new constructor.
2022-04-26 Jonathan Wakely <jwakely@redhat.com>
* include/bits/fs_path.h (hash<filesystem::path>): Define.
* testsuite/27_io/filesystem/path/nonmember/hash_value.cc:
Check std::hash specialization.
2022-04-25 Jonathan Wakely <jwakely@redhat.com>
* include/bits/ptr_traits.h (__cpp_lib_constexpr_memory): Define
conditionally.
* include/bits/unique_ptr.h (__cpp_lib_constexpr_memory):
Define for C++23.
(default_delete, default_delete<T[]>, __uniq_ptr_impl)
(unique_ptr, unique_ptr<T[], D>): Add constexpr to all member
functions.
* include/std/version (__cpp_lib_constexpr_memory): Define new
value for C++23.
* testsuite/20_util/unique_ptr/assign/constexpr.cc: New test.
* testsuite/20_util/unique_ptr/comparison/constexpr.cc: New test.
* testsuite/20_util/unique_ptr/cons/constexpr_c++20.cc: New test.
* testsuite/20_util/unique_ptr/creation/constexpr.cc: New test.
* testsuite/20_util/unique_ptr/modifiers/constexpr.cc: New test.
* testsuite/20_util/unique_ptr/specialized_algorithms/constexpr.cc:
New test.
2022-04-25 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/105375
* include/std/future (packaged_task): Add deduction guides.
* testsuite/30_threads/packaged_task/cons/deduction.cc: New test.
2022-04-25 Philipp Fent <fent@in.tum.de>
* python/libstdcxx/v6/printers.py (StdSpanPrinter._iterator):
Rename as iterator.
(StdInitializerListPrinter): Define new printer.
(build_libstdcxx_dictionary): Register new printer.
* testsuite/libstdc++-prettyprinters/cxx11.cc: Check printer for
initializer_list.
2022-04-22 Thomas W Rodgers <trodgers@redhat.com>
PR libstdc++/102994
* include/bits/atomic_base.h (atomic_flag::notify_one,
notify_all): Remove const qualification.
(__atomic_base::notify_one, notify_all): Likewise.
* include/std/atomic (atomic<bool>::notify_one, notify_all):
Likewise.
(atomic::notify_one, notify_all): Likewise.
(atomic<T*>::notify_one, notify_all): Likewise.
(atomic_notify_one, atomic_notify_all): Likewise.
* testsuite/29_atomics/atomic/wait_notify/102994.cc: Adjust test
to account for change in notify_one/notify_all signature.
2022-04-21 Patrick Palka <ppalka@redhat.com>
* include/std/charconv (__from_chars_alnum_to_val_table):
Simplify initialization of __lower/__upper_letters.
(__from_chars_alnum_to_val): Default the template parameter to
false.
* src/c++17/floating_from_chars.cc (starts_with_ci): Don't
assume the uppercase and lowercase letters are contiguous.
(__floating_from_chars_hex): Likewise.
2022-04-21 Patrick Palka <ppalka@redhat.com>
PR c++/105297
PR c++/105322
* include/std/charconv (__from_chars_alnum_to_val): Make
initializer for __table dependent in an artificial way.
2022-04-21 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/105324
* src/c++17/floating_from_chars.cc (buffer_resource::do_allocate):
Remove assertion.
* testsuite/20_util/from_chars/pr105324.cc: New test.
2022-04-20 Jonathan Wakely <jwakely@redhat.com>
* testsuite/21_strings/basic_string_view/operations/copy/char/constexpr.cc:
Check correct feature test macro.
2022-04-20 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/93602
* doc/xml/manual/prerequisites.xml: Document libiconv
workarounds.
* doc/html/manual/setup.html: Regenerate.
* src/Makefile.am (CXXLINK): Add $(LTLIBICONV).
* src/Makefile.in: Regenerate.
2022-04-19 Patrick Palka <ppalka@redhat.com>
* src/c++17/floating_to_chars.cc (_GLIBCXX_ASSERTIONS): Don't
define.
(__floating_to_chars_shortest): Add __builtin_unreachable calls to
squelch false-positive -Wmaybe-uninitialized and -Wreturn-type
warnings.
(__floating_to_chars_precision): Likewise.
2022-04-19 Philipp Fent <fent@in.tum.de>
* python/libstdcxx/v6/printers.py (StdSpanPrinter): Define.
* testsuite/libstdc++-prettyprinters/cxx20.cc: Test it.
2022-04-19 Jonathan Wakely <jwakely@redhat.com>
* acinclude.m4 (GLIBCXX_ENABLE_BACKTRACE): Fix shell operators.
* configure: Regenerate.
2022-04-18 Patrick Palka <ppalka@redhat.com>
* include/std/charconv (__from_chars_pow2_base): Manually
unroll the first iteration of the main loop and simplify
accordingly.
2022-04-15 Patrick Palka <ppalka@redhat.com>
PR libstdc++/104858
* include/bits/ranges_algo.h (__minmax_fn): Avoid dereferencing
__first twice at the start.
* testsuite/25_algorithms/minmax/constrained.cc (test06): New test.
2022-04-15 Patrick Palka <ppalka@redhat.com>
* include/std/charconv (__from_chars_alnum_to_val_table): Define.
(__from_chars_alnum_to_val): Define.
(__from_chars_binary): Rename to ...
(__from_chars_pow2_base): ... this. Generalize to handle any
power-of-two base using __from_chars_alnum_to_val.
(__from_chars_digit): Optimize digit recognition to a single
test instead of two tests. Use [[__unlikely___]] attribute.
(__from_chars_alpha_to_num): Remove.
(__from_chars_alnum): Use __from_chars_alnum_to_val. Use a
nested loop for the overflow case. Maintain a lower bound
on the number of available bits in the result and use it to
omit the overflow check.
(from_chars): Adjust appropriately.
* src/c++17/floating_from_chars.cc (ascii_to_hexit): Remove.
(__floating_from_chars_hex): Use __from_chars_alnum_to_val
to recognize a hex digit instead.
2022-04-14 Palmer Dabbelt <palmer@rivosinc.com>
* acinclude.m4 (GLIBCXX_ENABLE_LOCK_POLICY): Force auto to mutex
for RISC-V.
* configure: Regenerate.
2022-04-14 Jonathan Wakely <jwakely@redhat.com>
* doc/xml/manual/intro.xml: Fix comment.
2022-04-14 Jonathan Wakely <jwakely@redhat.com>
* include/precompiled/stdc++.h: Include <stacktrace> and
<stdatomic.h> for C++23.
2022-04-14 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/105269
* include/bits/stl_vector.h (__cpp_lib_constexpr_vector):
Define.
* include/c_compatibility/stdatomic.h (__cpp_lib_stdatomic_h):
Define.
* include/std/optional (__cpp_lib_optional): Define new value
for C++23.
(__cpp_lib_monadic_optional): Remove.
* include/std/version (__cpp_lib_constexpr_vector): Define.
(__cpp_lib_stdatomic_h): Define.
(__cpp_lib_optional): Define new value for C++23.
(__cpp_lib_monadic_optional): Remove.
* testsuite/20_util/optional/monadic/and_then.cc: Adjust.
* testsuite/20_util/optional/requirements.cc: Adjust for C++23.
* testsuite/20_util/optional/version.cc: Likewise.
* testsuite/23_containers/vector/cons/constexpr.cc: Check
feature test macro.
* testsuite/29_atomics/headers/stdatomic.h/c_compat.cc:
Likewise.
* testsuite/20_util/optional/monadic/version.cc: Removed.
* testsuite/23_containers/vector/requirements/version.cc: New test.
* testsuite/29_atomics/headers/stdatomic.h/version.cc: New test.
2022-04-12 Jonathan Wakely <jwakely@redhat.com>
* acinclude.m4 (GLIBCXX_ENABLE_BACKTRACE): Check for mmap.
* config.h.in: Regenerate.
* configure: Regenerate.
2022-04-12 Jonathan Wakely <jwakely@redhat.com>
* include/std/stacktrace (basic_stacktrace::current): Reallocate
a smaller container if the unused capacity is larger than the
used size.
2022-04-12 Jonathan Wakely <jwakely@redhat.com>
* include/std/stacktrace (basic_stacktrace): Use _Impl::_M_clone
or _Impl::_M_assign to initialize elements in allocated storage.
(basic_stacktrace::_M_clear()): Use _Impl::_M_resize instead of
_Impl::_M_destroy.
(basic_stacktrace::_Impl::_M_destroy()): Replace with ...
(basic_stacktrace::_Impl::_M_resize(size_type, allocator&)): New
function.
(basic_stacktrace::_Impl::_M_push_back): Use _M_xclone. Construct
new element using allocator.
(basic_stacktrace::_Impl::_M_clone): New function.
(basic_stacktrace::_Impl::_M_xclone): New function.
(basic_stacktrace::_Impl::_M_assign): New function.
2022-04-12 Jonathan Wakely <jwakely@redhat.com>
* include/std/stacktrace (basic_stacktrace::_Impl::_M_allocate):
Use nothrow new instead of try block for std::allocator.
(basic_stacktrace::_Impl::_M_deallocate): Use delete for
std::allocator.
2022-04-12 Jonathan Wakely <jwakely@redhat.com>
* include/std/stacktrace (basic_stacktrace::current): Replace
calls to _M_reserve and _S_curr_cb with call to _M_prepare.
Check return value of backtrace_simple when max depth given.
(basic_stacktrace::_M_reserve): Remove.
(basic_stacktrace::_S_curr_cb): Remove.
(basic_stacktrace::_M_prepare(size_type)): New function to
reserve initial capacity and return callback.
(basic_stacktrace::_Impl::_M_allocate): Remove check for 0 < n
and remove redundant zeroing of _M_frames and _M_capacity.
(basic_stacktrace::_Impl::_M_push_back): Add [[unlikely]]
attribute. Assign _Impl instead of swapping.
* testsuite/19_diagnostics/stacktrace/current.cc: New test.
2022-04-11 Jonathan Wakely <jwakely@redhat.com>
* include/std/stacktrace (basic_stacktrace::_Impl::_M_allocate):
Change [[unlikely]] attribute to [[likely]].
2022-04-11 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/105031
* include/std/stacktrace (basic_stacktrace::basic_stacktrace):
Fix allocator usage in constructors.
(basic_stacktrace::operator=(const basic_stacktrace&)): Do not
try to reallocate using const allocator.
(basic_stacktrace::operator=(basic_stacktrace&&)): Fix
if-constexpr with non-constant condition. Do not allocate new
storage if allocator propagates. Do not set _M_size if
allocation fails.
(basic_stacktrace::swap(basic_stacktrace&)): Fix typo. Add
assertion that non-propagating allocators are equal.
* testsuite/19_diagnostics/stacktrace/stacktrace.cc: New test.
2022-04-11 Jonathan Wakely <jwakely@redhat.com>
* include/std/stacktrace (basic_stacktrace::current): Duplicate
implementation into each overload. Add noinline attribute and
skip current frame.
(basic_stacktrace::max_size()): Call _Impl::_S_max_size.
(basic_stacktrace::_S_curr_cb()): New function defining lambda.
(basic_stacktrace::_Impl::_S_max_size): New function defining
maximum size in terms of allocator and size_type.
(basic_stacktrace::_Impl::_M_allocate): Check against
max_size().
* testsuite/19_diagnostics/stacktrace/entry.cc: Call function
for non-constexpr checks. Check line number is correct.
2022-04-11 Jonathan Wakely <jwakely@redhat.com>
* testsuite/20_util/stacktrace/entry.cc: Moved to...
* testsuite/19_diagnostics/stacktrace/entry.cc: ...here.
* testsuite/20_util/stacktrace/synopsis.cc: Moved to...
* testsuite/19_diagnostics/stacktrace/synopsis.cc: ...here.
* testsuite/20_util/stacktrace/version.cc: Moved to...
* testsuite/19_diagnostics/stacktrace/version.cc: ...here.
2022-04-11 Jonathan Wakely <jwakely@redhat.com>
* include/experimental/bits/fs_path.h (path): Define special
members after path::_Cmpt is complete.
2022-04-08 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/105153
* include/std/expected
(expected<void,E>::expected(expected<U,G>&&)): Fix constraints.
* testsuite/20_util/expected/cons.cc: Check constructor.
2022-04-08 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/105154
* include/std/expected (expected<void, E>::swap): Set
_M_has_value to false for objects that previously had a value.
* testsuite/20_util/expected/swap.cc: Fix test to check void
specialization.
2022-04-08 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/105146
* include/std/expected (bad_expected_access): Move constructor
parameter.
* testsuite/20_util/expected/bad.cc: New test.
2022-04-07 Hans-Peter Nilsson <hp@axis.com>
* testsuite/20_util/expected/requirements.cc: Correct minimal-size
test.
2022-04-02 Jakub Jelinek <jakub@redhat.com>
PR libstdc++/105128
* include/std/source_location (std::source_location::__impl): Move
definition before using __builtin_ret_type.
2022-04-01 Jonathan Wakely <jwakely@redhat.com>
* include/std/utility (unreachable): Define for C++23.
* include/std/version (__cpp_lib_unreachable): Define.
* src/c++11/debug.cc (__glibcxx_assert_fail): Check for valid
arguments. Handle only the function being given.
* testsuite/20_util/unreachable/1.cc: New test.
* testsuite/20_util/unreachable/version.cc: New test.
2022-04-01 Jonathan Wakely <jwakely@redhat.com>
* include/experimental/bits/fs_fwd.h (copy_file): Remove
incorrect noexcept from declaration.
* include/experimental/bits/fs_path.h (path::begin, path::end):
Add noexcept to declarations, to match definitions.
2022-04-01 Timm Bäder <tbaeder@redhat.com>
* include/bits/fs_ops.h: Fix filename in Doxygen comment.
* include/experimental/bits/fs_ops.h: Likewise.
2022-03-31 Jonathan Wakely <jwakely@redhat.com>
* libsupc++/new_opa.cc (aligned_alloc): Add comment.
2022-03-29 Jonathan Wakely <jwakely@redhat.com>
* testsuite/18_support/exception/38732.cc: Disable for C++23.
* testsuite/18_support/headers/exception/synopsis.cc: Likewise.
* testsuite/18_support/unexpected_handler.cc: Likewise.
2022-03-29 Jonathan Wakely <jwakely@redhat.com>
* libsupc++/compare (_Strong_order) [!__cpp_using_enum]: Add
static data members for _Fp_fmt enumerators.
2022-03-29 Jonathan Wakely <jwakely@redhat.com>
* include/std/version (__cpp_lib_variant): Fix conditions to
match <variant>.
(__cpp_lib_expected): Fix condition to match <expected>.
2022-03-28 Jonathan Wakely <jwakely@redhat.com>
* testsuite/20_util/optional/monadic/and_then.cc: Fix typo.
* testsuite/20_util/optional/monadic/transform.cc: Likewise.
* testsuite/22_locale/codecvt/always_noconv/char/1.cc: Likewise.
* testsuite/22_locale/codecvt/encoding/char/1.cc: Likewise.
* testsuite/22_locale/codecvt/in/char/1.cc: Likewise.
* testsuite/22_locale/codecvt/max_length/char/1.cc: Likewise.
* testsuite/22_locale/codecvt/out/char/1.cc: Likewise.
* testsuite/22_locale/codecvt/unshift/char/1.cc: Likewise.
2022-03-27 Jonathan Wakely <jwakely@redhat.com>
* doc/doxygen/user.cfg.in: Add new header.
* include/Makefile.am: Likewise.
* include/Makefile.in: Regenerate.
* include/precompiled/stdc++.h: Add new header.
* include/std/version (__cpp_lib_expected): Define.
* libsupc++/exception [__cplusplus > 202002] (unexpected)
(unexpected_handler, set_unexpected): Do not declare for C++23.
* include/std/expected: New file.
* testsuite/20_util/expected/assign.cc: New test.
* testsuite/20_util/expected/cons.cc: New test.
* testsuite/20_util/expected/illformed_neg.cc: New test.
* testsuite/20_util/expected/observers.cc: New test.
* testsuite/20_util/expected/requirements.cc: New test.
* testsuite/20_util/expected/swap.cc: New test.
* testsuite/20_util/expected/synopsis.cc: New test.
* testsuite/20_util/expected/unexpected.cc: New test.
* testsuite/20_util/expected/version.cc: New test.
2022-03-25 Jonathan Wakely <jwakely@redhat.com>
* include/std/bit (bit_cast, byteswap, endian): Add doxygen
comments.
2022-03-23 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/105027
* include/std/bit (bit_cast): Add constraints.
* testsuite/26_numerics/bit/bit.cast/105027.cc: New test.
2022-03-23 Jonathan Wakely <jwakely@redhat.com>
* include/std/version [!_GLIBCXX_HOSTED]
(__cpp_lib_hardware_interference_size): Define for freestanding.
(__cpp_lib_bit_cast): Likewise.
(__cpp_lib_is_layout_compatible): Likewise.
(__cpp_lib_is_pointer_interconvertible): Likewise.
(__cpp_lib_adaptor_iterator_pair_constructor): Do not define for
freestanding.
(__cpp_lib_invoke_r): Likewise.
(__cpp_lib_ios_noreplace): Likewise.
(__cpp_lib_monadic_optional): Likewise.
(__cpp_lib_move_only_function): Likewise.
(__cpp_lib_spanstream): Likewise.
(__cpp_lib_stacktrace): Likewise.
(__cpp_lib_string_contains): Likewise.
(__cpp_lib_string_resize_and_overwrite): Likewise.
(__cpp_lib_to_underlying): Likewise.
2022-03-23 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/105021
* include/bits/atomic_base.h [!_GLIBCXX_HOSTED]: Do not include
<bits/atomic_wait.h> for freestanding.
2022-03-22 Hans-Peter Nilsson <hp@axis.com>
* testsuite/20_util/from_chars/6.cc (test01) [FE_DOWNWARD]:
Conditionalize call to fesetround.
2022-03-21 Jakub Jelinek <jakub@redhat.com>
PR libstdc++/104990
* include/bits/locale_facets_nonio.tcc (get): Don't check if do_get
isn't overloaded if __clang__ is defined.
2022-03-18 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/104242
* include/std/any (any(T&&)): Revert change to constraints.
* testsuite/20_util/any/cons/104242.cc: New test.
2022-03-18 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/92546
* include/pstl/glue_algorithm_defs.h: Replace <functional> with
<bits/stl_pair.h>.
* include/pstl/utils.h: Replace <iterator> with <type_traits>.
(__pstl::__internal::__except_handler): Use std::__terminate
instead of std::terminate.
* src/c++17/fs_path.cc: Include <array>.
* testsuite/25_algorithms/adjacent_find/constexpr.cc: Include
<functional>.
* testsuite/25_algorithms/binary_search/constexpr.cc: Likewise.
* testsuite/25_algorithms/clamp/constrained.cc: Likewise.
* testsuite/25_algorithms/equal/constrained.cc: Likewise.
* testsuite/25_algorithms/for_each/constrained.cc: Likewise.
* testsuite/25_algorithms/includes/constrained.cc: Likewise.
* testsuite/25_algorithms/is_heap/constexpr.cc: Likewise.
* testsuite/25_algorithms/is_heap_until/constexpr.cc: Likewise.
* testsuite/25_algorithms/is_permutation/constrained.cc: Include
<iterator>.
* testsuite/25_algorithms/is_sorted/constexpr.cc: Include
<functional>.
* testsuite/25_algorithms/is_sorted_until/constexpr.cc:
Likewise.
* testsuite/25_algorithms/lexicographical_compare/constexpr.cc:
Likewise.
* testsuite/25_algorithms/lexicographical_compare/constrained.cc:
Likewise.
* testsuite/25_algorithms/lexicographical_compare_three_way/1.cc:
Include <array>.
* testsuite/25_algorithms/lower_bound/constexpr.cc: Include
<functional>.
* testsuite/25_algorithms/max/constrained.cc: Likewise.
* testsuite/25_algorithms/max_element/constrained.cc: Likewise.
* testsuite/25_algorithms/min/constrained.cc: Likewise.
* testsuite/25_algorithms/min_element/constrained.cc: Likewise.
* testsuite/25_algorithms/minmax_element/constrained.cc:
Likewise.
* testsuite/25_algorithms/mismatch/constexpr.cc: Likewise.
* testsuite/25_algorithms/move/93872.cc: Likewise.
* testsuite/25_algorithms/move_backward/93872.cc: Include
<iterator>.
* testsuite/25_algorithms/nth_element/constexpr.cc: Include
<functional>.
* testsuite/25_algorithms/partial_sort/constexpr.cc: Likewise.
* testsuite/25_algorithms/partial_sort_copy/constexpr.cc:
Likewise.
* testsuite/25_algorithms/search/constexpr.cc: Likewise.
* testsuite/25_algorithms/search_n/constrained.cc: Likewise.
* testsuite/25_algorithms/set_difference/constexpr.cc: Likewise.
* testsuite/25_algorithms/set_difference/constrained.cc:
Likewise.
* testsuite/25_algorithms/set_intersection/constexpr.cc:
Likewise.
* testsuite/25_algorithms/set_intersection/constrained.cc:
Likewise.
* testsuite/25_algorithms/set_symmetric_difference/constexpr.cc:
Likewise.
* testsuite/25_algorithms/set_union/constexpr.cc: Likewise.
* testsuite/25_algorithms/set_union/constrained.cc: Likewise.
* testsuite/25_algorithms/sort/constexpr.cc: Likewise.
* testsuite/25_algorithms/sort_heap/constexpr.cc: Likewise.
* testsuite/25_algorithms/transform/constrained.cc: Likewise.
* testsuite/25_algorithms/unique/constexpr.cc: Likewise.
* testsuite/25_algorithms/unique/constrained.cc: Likewise.
* testsuite/25_algorithms/unique_copy/constexpr.cc: Likewise.
* testsuite/25_algorithms/upper_bound/constexpr.cc: Likewise.
* testsuite/std/ranges/adaptors/elements.cc: Include <vector>.
* testsuite/std/ranges/adaptors/lazy_split.cc: Likewise.
* testsuite/std/ranges/adaptors/split.cc: Likewise.
2022-03-17 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/92546
* include/bits/fs_path.h (path::make_preferred): Use
handwritten loop instead of std::replace.
2022-03-17 Jonathan Wakely <jwakely@redhat.com>
PR middle-end/104966
* include/bits/locale_facets_nonio.tcc
(__moneypunct_cache::_M_cache): Replace try-catch with RAII and
make all string copies before any stores to *this.
2022-03-17 Jonathan Wakely <jwakely@redhat.com>
* testsuite/util/testsuite_character.h: Fix comment.
2022-03-16 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/103407
* config/abi/pre/gnu.ver: Make version for std::from_chars
depend on HAVE_USELOCALE macro.
* testsuite/util/testsuite_abi.cc (compare_symbols): Treat
std::from_chars for floating-point types as undesignated if
not found in the baseline symbols file.
2022-03-16 Jonathan Wakely <jwakely@redhat.com>
* include/std/charconv (__cpp_lib_to_chars): Only define when
both from_chars and to_chars are supported for floating-point
types.
(from_chars, to_chars): Adjust preprocessor conditions guarding
declarations.
* include/std/version (__cpp_lib_to_chars): Adjust condition to
match <charconv> definition.
* src/c++17/floating_from_chars.cc (from_chars_strtod): New
function template.
(from_chars): Simplify preprocessor checks and use
from_chars_strtod when appropriate.
2022-03-14 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/104875
* src/c++11/codecvt.cc (read_utf8_code_point): Use char32_t to
hold octets that will be left-shifted.
2022-03-10 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/104870
* src/c++17/floating_from_chars.cc: Check __SIZE_WIDTH__ >= 32
before using fast_float.
2022-03-10 Detlef Vollmann <dv@vollmann.ch>
PR libstdc++/104866
* include/bits/this_thread_sleep.h: Fix order of #endif and
closing brace of namespace.
2022-03-10 Jonathan Wakely <jwakely@redhat.com>
* libsupc++/compare (_Strong_order::_S_fp_cmp) [__vax__]:
Handle NaN.
2022-03-10 Jonathan Wakely <jwakely@redhat.com>
* libsupc++/compare (_Strong_ordering::_S_fp_cmp) [__vax__]: Use
<=> comparison.
2022-03-09 Patrick Palka <ppalka@redhat.com>
PR libstdc++/104859
* src/c++17/floating_to_chars.cc (__floating_to_chars_hex):
Be explicit when narrowing the shifted effective_mantissa,
since it may have an integer-class type.
2022-03-08 Jonathan Wakely <jwakely@redhat.com>
* include/bits/uses_allocator_args.h: Remove incorrect copyright
notice.
2022-03-07 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/104807
* include/bits/c++config (__terminate, __glibcxx_assert_fail):
Replace _GLIBCXX_VISIBILITY on function with visibility pragma.
(__is_constant_evaluated): Add visibility pragma.
2022-03-07 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
* config/locale/vxworks/ctype_members.cc: Remove <iostream>
include.
2022-03-05 Jonathan Wakely <jwakely@redhat.com>
* include/bits/c++config (__glibcxx_assert_fail): Add visibility
attribute.
(__terminate): Likewise.
2022-03-04 Jonathan Wakely <jwakely@redhat.com>
* libsupc++/compare (strong_order::_S_fp_cmp): Move typedef
inside #if condition.
2022-03-03 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/104748
* testsuite/std/ranges/adaptors/all.cc: Use non-debug vector for
constexpr test.
2022-03-03 Jonathan Wakely <jwakely@redhat.com>
* testsuite/17_intro/names.cc (func): Undef on AIX.
2022-03-03 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/96526
* libsupc++/compare (strong_order): Add missing support for
floating-point types.
* testsuite/18_support/comparisons/algorithms/strong_order_floats.cc:
New test.
2022-03-01 Jonathan Wakely <jwakely@redhat.com>
PR middle-end/103984
* include/bits/regex_compiler.h (_BracketMatcher::_M_char): Use
default member initializer.
2022-02-24 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/104602
* include/std/source_location (source_location::current): Use
deduced type of __builtin_source_location().
2022-02-22 Patrick Palka <ppalka@redhat.com>
* include/bits/ranges_base.h (__detail::__is_initializer_list):
Define.
(viewable_range): Adjust as per P2415R2.
* include/bits/ranges_cmp.h (__cpp_lib_ranges): Adjust value.
* include/std/ranges (owning_view): Define as per P2415R2.
(enable_borrowed_range<owning_view>): Likewise.
(views::__detail::__can_subrange): Replace with ...
(views::__detail::__can_owning_view): ... this.
(views::_All::_S_noexcept): Sync with operator().
(views::_All::operator()): Use owning_view instead of subrange
as per P2415R2.
* include/std/version (__cpp_lib_ranges): Adjust value.
* testsuite/std/ranges/adaptors/all.cc (test06): Adjust now that
views::all uses owning_view instead of subrange.
(test08): New test.
* testsuite/std/ranges/adaptors/lazy_split.cc (test09): Adjust
now that rvalue non-view non-borrowed ranges are viewable.
* testsuite/std/ranges/adaptors/split.cc (test06): Likewise.
2022-02-17 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/104559
* doc/xml/manual/evolution.xml: Document deprecation.
* doc/html/manual/api.html: Regenerate.
* include/bits/stl_bvector.h (insert(const_iterator, const bool&)):
Remove default argument.
(insert(const_iterator)): New overload with deprecated attribute.
* testsuite/23_containers/vector/bool/modifiers/insert/104559.cc:
New test.
2022-02-17 Jonathan Wakely <jwakely@redhat.com>
* python/libstdcxx/v6/printers.py (StdErrorCodePrinter): Replace
code that call cat->name() on std::error_category objects.
Identify known categories by symbol name and use a hardcoded
name. Print error code values as enumerators where appopriate.
* testsuite/libstdc++-prettyprinters/cxx11.cc: Adjust expected
name of custom category. Check io_errc and future_errc errors.
2022-02-15 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/104542
* include/bits/uses_allocator_args.h (make_obj_using_allocator)
(uninitialized_construct_using_allocator): Add constexpr.
* testsuite/20_util/uses_allocator/make_obj.cc: Check constexpr.
* testsuite/20_util/uses_allocator/uninitialized_construct.cc: New test.
2022-02-14 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/100912
* config/locale/gnu/c_locale.h (__convert_from_v): Use inline
namespace for IEEE128 long double mode.
* config/os/gnu-linux/ldbl-ieee128-extra.ver: Add new symbol
version and export __gnu_cxx_ieee128::__convert_from_v.
* include/bits/locale_facets_nonio.tcc (money_put::__do_put):
Make __ibm128 overload use snprintf directly
* testsuite/util/testsuite_abi.cc: Add new symbol version.
Remove stable IEEE128/LDBL versions.
2022-02-14 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/103891
* include/bits/c++config (_GLIBCXX_HAVE_COND_TRIVIAL_SPECIAL_MEMBERS):
Remove.
* include/std/variant: Check feature test macros instead.
* include/std/version: Likewise.
2022-02-14 Jonathan Wakely <jwakely@redhat.com>
* testsuite/20_util/unsynchronized_pool_resource/allocate.cc:
Fix typo.
2022-02-14 Jonathan Wakely <jwakely@redhat.com>
* src/c++17/floating_to_chars.cc (FLOAT128_TO_CHARS): Depend on
LONG_DOUBLE_ALT128_COMPAT instead of USE_FLOAT128.
2022-02-11 Jonathan Wakely <jwakely@redhat.com>
* testsuite/20_util/temporary_buffer.cc: Fix dg-warning target
selector.
2022-02-11 Jonathan Wakely <jwakely@redhat.com>
* testsuite/20_util/monotonic_buffer_resource/allocate.cc:
Ignore -Walloc-larger-than warning.
* testsuite/20_util/unsynchronized_pool_resource/allocate.cc:
Likewise.
* testsuite/29_atomics/atomic/cons/user_pod.cc: Compile with -O1
to avoid linker error for __atomic_is_lock_free.
2022-02-10 Thomas Rodgers <rodgert@appliantology.com>
* include/bits/atomic_wait.h (__waiter_base::_S_do_spin,
__waiter_base::_S_do_spin_v): Change memory order from relaxed
to acquire.
2022-02-10 Jonathan Wakely <jwakely@redhat.com>
* include/c_compatibility/stdatomic.h (atomic_fetch_xor): Add
using-declaration.
(atomic_fetch_xor_explicit): Likewise.
* testsuite/29_atomics/headers/stdatomic.h/c_compat.cc: Check
arithmetic and logical operations for atomic_int.
2022-02-10 Jonathan Wakely <jwakely@redhat.com>
* src/filesystem/dir-common.h (_GLIBCXX_HAVE_DIRFD): Undefine
when <dirent.h> is not available.
(_GLIBCXX_HAVE_UNLINKAT): Likewise.
2022-02-09 Thomas Rodgers <rodgert@appliantology.com>
PR libstdc++/104442
* include/bits/atomic_wait.h (__waiter::_M_do_wait_v): Move spin
loop inside do loop so that threads failing the wait, reload
_M_ver.
2022-02-08 Jonathan Wakely <jwakely@redhat.com>
* src/c++17/fs_dir.cc (_Dir(DIR*, const path&)): Change first
parameter to _Dir_base&&.
* src/filesystem/dir-common.h (_Dir_base(DIR*)): Remove.
* src/filesystem/dir.cc (_Dir(DIR*, const path&)): Change first
parameter to _Dir_base&&.
2022-02-08 Jonathan Wakely <jwakely@redhat.com>
* acinclude.m4 (GLIBCXX_ENABLE_LOCK_POLICY): Add comment about
checking for CAS on correct word size.
2022-02-08 Jonathan Wakely <jwakely@redhat.com>
* testsuite/experimental/filesystem/operations/create_directories.cc:
Adjust expected results for Windows.
2022-02-08 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/104161
* src/c++17/fs_dir.cc (fs::recursive_directory_iterator::__erase):
[i_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Refresh entry._M_type member,
instead of checking for errno values indicating a directory.
* src/c++17/fs_ops.cc (fs::remove_all(const path&)): Use similar
logic to non-throwing overload.
(fs::remove_all(const path&, error_code&)): Add comments.
* src/filesystem/ops-common.h: Likewise.
2022-02-04 Jonathan Wakely <jwakely@redhat.com>
* src/filesystem/dir-common.h (_Dir_base::openat): Change return
type to use portable posix::DIR alias.
2022-02-04 Jonathan Wakely <jwakely@redhat.com>
* include/c_compatibility/stdatomic.h [__clang__]: Use
#include_next <stdatomic.h>.
2022-02-04 Jonathan Wakely <jwakely@redhat.com>
* include/experimental/bits/fs_ops.h (fs::copy_file): Remove
noexcept.
(fs::create_directories): Likewise.
(fs::remove_all): Likewise.
* src/filesystem/ops.cc (fs::copy_file): Remove noexcept.
(fs::create_directories): Likewise.
(fs::remove_all): Likewise.
2022-02-04 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/104161
* acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for dirfd
and unlinkat.
* config.h.in: Regenerate.
* configure: Regenerate.
* include/bits/fs_dir.h (recursive_directory_iterator): Declare
remove_all overloads as friends.
(recursive_directory_iterator::__erase): Declare new member
function.
* include/bits/fs_fwd.h (remove, remove_all): Declare.
* src/c++17/fs_dir.cc (_Dir): Add filename_only parameter to
constructor. Pass file descriptor argument to base constructor.
(_Dir::dir_and_pathname, _Dir::open_subdir, _Dir::do_unlink)
(_Dir::unlink, _Dir::rmdir): Define new member functions.
(directory_iterator): Pass filename_only argument to _Dir
constructor.
(recursive_directory_iterator::_Dir_stack): Adjust constructor
parameters to take a _Dir rvalue instead of creating one.
(_Dir_stack::orig): Add data member for storing original path.
(_Dir_stack::report_error): Define new member function.
(__directory_iterator_nofollow): Move here from dir-common.h and
fix value to be a power of two.
(__directory_iterator_filename_only): Define new constant.
(recursive_directory_iterator): Construct _Dir object and move
into _M_dirs stack. Pass skip_permission_denied argument to first
advance call.
(recursive_directory_iterator::increment): Use _Dir::open_subdir.
(recursive_directory_iterator::__erase): Define new member
function.
* src/c++17/fs_ops.cc (ErrorReporter, do_remove_all): Remove.
(fs::remove_all): Use new recursive_directory_iterator::__erase
member function.
* src/filesystem/dir-common.h (_Dir_base): Add int parameter to
constructor and use openat to implement nofollow semantics.
(_Dir_base::fdcwd, _Dir_base::set_close_on_exec, _Dir_base::openat):
Define new member functions.
(__directory_iterator_nofollow): Move to fs_dir.cc.
* src/filesystem/dir.cc (_Dir): Pass file descriptor argument to
base constructor.
(_Dir::dir_and_pathname, _Dir::open_subdir): Define new member
functions.
(recursive_directory_iterator::_Dir_stack): Adjust constructor
parameters to take a _Dir rvalue instead of creating one.
(recursive_directory_iterator): Check for new nofollow option.
Construct _Dir object and move into _M_dirs stack. Pass
skip_permission_denied argument to first advance call.
(recursive_directory_iterator::increment): Use _Dir::open_subdir.
* src/filesystem/ops.cc (fs::remove_all): Use C++17 remove_all.
2022-02-04 Jonathan Wakely <jwakely@redhat.com>
* include/bits/allocator.h: Qualify std::allocator_traits in
deprecated warnings.
* libsupc++/exception (uncaught_exception): Add suggestion to
deprecated warning.
2022-02-02 Jonathan Wakely <jwakely@redhat.com>
* src/c++17/fs_dir.cc (fs::recursive_directory_iterator::pop):
Add [[maybe_unused]] attribute.
* src/filesystem/dir.cc (fs::recursive_directory_iterator::pop):
Likewise.
2022-02-02 Jonathan Wakely <jwakely@redhat.com>
* testsuite/23_containers/multiset/operators/cmp_c++20.cc: Use
custom comparison function for multiset.
* testsuite/23_containers/set/operators/cmp_c++20.cc: Use custom
comparison function for set.
2022-02-02 Jonathan Wakely <jwakely@redhat.com>
* include/bits/boost_concept_check.h (_OutputIteratorConcept):
Change member function to data member of function pointer type.
2022-02-02 Martin Sebor <msebor@redhat.com>
PR libstdc++/101831
* include/std/array (begin): Declare const member function attribute
const.
(end, rbegin, rend, size, max_size, empty, data): Same.
* testsuite/23_containers/array/capacity/empty.cc: Add test cases.
* testsuite/23_containers/array/capacity/max_size.cc: Same.
* testsuite/23_containers/array/capacity/size.cc: Same.
* testsuite/23_containers/array/iterators/begin_end.cc: New test.
2022-02-02 Jonathan Wakely <jwakely@redhat.com>
* testsuite/27_io/filesystem/iterators/error_reporting.cc: Use
autoconf macro to check whether d_type is present.
* testsuite/experimental/filesystem/iterators/error_reporting.cc:
Likewise.
2022-02-01 Jonathan Wakely <jwakely@redhat.com>
* testsuite/27_io/filesystem/iterators/97731.cc: New test.
* testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
Check follow_directory_symlink option.
* testsuite/experimental/filesystem/iterators/recursive_directory_iterator.cc:
Likewise.
2022-02-01 Jonathan Wakely <jwakely@redhat.com>
* src/c++17/fs_dir.cc (recursive_directory_iterator::increment):
Reset state to past-the-end iterator on error.
(fs::recursive_directory_iterator::pop(error_code&)): Likewise.
(fs::recursive_directory_iterator::pop()): Check _M_dirs before
it might get reset.
* src/filesystem/dir.cc (recursive_directory_iterator): Likewise,
for the TS implementation.
* testsuite/27_io/filesystem/iterators/error_reporting.cc: New test.
* testsuite/experimental/filesystem/iterators/error_reporting.cc: New test.
2022-02-01 Jonathan Wakely <jwakely@redhat.com>
* include/bits/fs_fwd.h (filesystem::perms): Fix comment.
2022-02-01 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/104301
* acinclude.m4 (GLIBCXX_ENABLE_CSTDIO): Print different messages
for stdio_pure and stdio_posix options.
* configure: Regenerate.
2022-02-01 Thomas Rodgers <rodgert@appliantology.com>
* include/bits/atomic_wait.h: Change memory order from
Acquire/Release with relaxed loads to SeqCst+Release for
accesses to the waiter's count.
2022-01-31 Martin Liska <mliska@suse.cz>
* acinclude.m4: Detect *_ld_is_mold and use it.
* configure: Regenerate.
2022-01-30 Hans-Peter Nilsson <hp@axis.com>
* testsuite/27_io/basic_istream/get/char/lwg3464.cc: Don't run on
simulator targets.
* testsuite/27_io/basic_istream/get/wchar_t/lwg3464.cc: Likewise.
2022-01-27 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/100516
* include/bits/deque.tcc (_M_range_initialize<ForwardIterator>):
Add __builtin_unreachable to loop.
* testsuite/23_containers/deque/100516.cc: New test.
2022-01-27 Jonathan Wakely <jwakely@redhat.com>
* include/bits/ranges_base.h (ranges::advance): Avoid signed
overflow. Do nothing if already equal to desired result.
* testsuite/24_iterators/range_operations/advance_overflow.cc:
New test.
2022-01-27 Martin Liska <mliska@suse.cz>
PR libstdc++/104259
* acinclude.m4: Fix typo.
* configure: Regenerate.
2022-01-25 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/104019
* include/bits/istream.tcc (basic_istream::sentry): Add braces
around try-block.
* include/bits/shared_ptr_base.h (_Sp_counted_array_base::_M_init):
Add pragmas to disable bogus warnings from PR 61596.
2022-01-25 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/104217
* src/c++17/fs_ops.cc (_GNU_SOURCE): Define.
* src/filesystem/dir.cc (_GNU_SOURCE): Define.
* src/filesystem/ops.cc (_GNU_SOURCE): Define.
2022-01-25 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/104161
* acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for
fdopendir.
* config.h.in: Regenerate.
* configure: Regenerate.
* src/c++17/fs_dir.cc (_Dir): Add nofollow flag to constructor
and pass it to base class constructor.
(directory_iterator): Pass nofollow flag to _Dir constructor.
(fs::recursive_directory_iterator::increment): Likewise.
* src/c++17/fs_ops.cc (do_remove_all): Use nofollow option for
directory_iterator constructor. Move error check outside loop.
* src/filesystem/dir-common.h (_Dir_base): Add nofollow flag to
constructor and when it's set use ::open with O_NOFOLLOW and
O_DIRECTORY.
* src/filesystem/dir.cc (_Dir): Add nofollow flag to constructor
and pass it to base class constructor.
(directory_iterator): Pass nofollow flag to _Dir constructor.
(fs::recursive_directory_iterator::increment): Likewise.
* src/filesystem/ops.cc (remove_all): Use nofollow option for
directory_iterator constructor. Move error check outside loop.
2022-01-23 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/104032
* include/std/spanstream (basic_spanbuf(basic_spanbuf&&)): Use
mem-initializer for _M_buf.
(basic_spanbuf::Operator=(basic_spanbuf&&)): Fix ill-formed
member access.
* testsuite/27_io/spanstream/2.cc: New test.
2022-01-23 Jonathan Wakely <jwakely@redhat.com>
* src/c++17/floating_from_chars.cc (USE_STRTOD_FOR_FROM_CHARS):
Define macro for case where std::from_chars is implemented in
terms of strtod, strtof or strtold.
(buffer_resource, valid_fmt, find_end_of_float, pattern)
(from_chars_impl, make_result, reserve_string): Do not define
unless USE_STRTOD_FOR_FROM_CHARS is defined.
(from_chars): Define when at least one of USE_LIB_FAST_FLOAT and
USE_STRTOD_FOR_FROM_CHARS is defined, instead of
_GLIBCXX_HAVE_USELOCALE. Use fast_float for long double when it
is binary64.
2022-01-23 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/104174
* include/bits/hashtable_policy.h (_Map_base): Add partial
specialization for maps with const key types.
* testsuite/23_containers/unordered_map/104174.cc: New test.
2022-01-23 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/104019
* include/bits/shared_ptr_base.h (_Sp_counted_base<>::_M_release):
Set members to zero without type punning.
2022-01-21 Jonathan Wakely <jwakely@redhat.com>
* testsuite/20_util/shared_ptr/cons/array.cc: Fix comment.
2022-01-21 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/87193
PR libstdc++/104019
* include/bits/alloc_traits.h (__cpp_lib_allocator_traits_is_always_equal):
Define as type long.
* include/bits/allocator.h (__cpp_lib_incomplete_container_elements):
Likewise.
* include/bits/basic_string.h (__cpp_lib_string_udls): Likewise.
* include/bits/chrono.h (__cpp_lib_chrono): Likewise.
(__cpp_lib_chrono_udls): Likewise.
* include/bits/move.h (__cpp_lib_addressof_constexpr): Likewise.
* include/bits/node_handle.h (__cpp_lib_node_extract): Likewise.
* include/bits/range_access.h (__cpp_lib_nonmember_container_access):
Likewise.
* include/bits/shared_ptr.h (__cpp_lib_enable_shared_from_this):
Likewise.
* include/bits/stl_algo.h (__cpp_lib_clamp): Likewise.
(__cpp_lib_sample): Likewise.
* include/bits/stl_algobase.h (__cpp_lib_robust_nonmodifying_seq_ops):
Likewise.
* include/bits/stl_function.h (__cpp_lib_transparent_operators):
Likewise.
* include/bits/stl_iterator.h (__cpp_lib_make_reverse_iterator):
Likewise.
* include/bits/stl_map.h (__cpp_lib_map_try_emplace):
Likewise.
* include/bits/stl_tree.h (__cpp_lib_generic_associative_lookup):
Likewise.
* include/bits/unique_ptr.h (__cpp_lib_make_unique):
Likewise.
* include/bits/unordered_map.h (__cpp_lib_unordered_map_try_emplace):
Likewise.
* include/c_global/cmath (__cpp_lib_hypot): Likewise.
* include/c_global/cstddef (__cpp_lib_byte): Likewise.
* include/std/atomic (__cpp_lib_atomic_is_always_lock_free):
Likewise.
* include/std/complex (__cpp_lib_complex_udls): Likewise.
* include/std/filesystem (__cpp_lib_filesystem): Likewise.
* include/std/functional (__cpp_lib_not_fn): Likewise.
(__cpp_lib_boyer_moore_searcher): Likewise.
* include/std/iomanip (__cpp_lib_quoted_string_io): Likewise.
* include/std/mutex (__cpp_lib_scoped_lock): Likewise.
* include/std/numeric (__cpp_lib_gcd_lcm): Likewise.
(__cpp_lib_gcd, __cpp_lib_lcm): Likewise.
* include/std/tuple (__cpp_lib_apply): Likewise.
(__cpp_lib_make_from_tuple): Likewise.
* include/std/type_traits (__cpp_lib_integral_constant_callable)
(__cpp_lib_bool_constant, __cpp_lib_logical_traits)
(__cpp_lib_is_null_pointer, __cpp_lib_transformation_trait_aliases)
(__cpp_lib_result_of_sfinae, __cpp_lib_void_t)
(__cpp_lib_is_swappable, __cpp_lib_is_invocable)
(__cpp_lib_has_unique_object_representations)
(__cpp_lib_is_aggregate): Likewise.
* include/std/version: Likewise.
* libsupc++/new (__cpp_lib_launder): Likewise.
2022-01-21 Jonathan Wakely <jwakely@redhat.com>
* include/std/version (__cpp_lib_shared_ptr_arrays): Fix
condition for C++17 definition.
2022-01-21 Jonathan Wakely <jwakely@redhat.com>
* include/bits/shared_ptr_atomic.h (_Sp_atomic::_Atomic_count):
Add constexpr.
(_Sp_atomic::_M_ptr): Add default member-initializer.
* testsuite/20_util/shared_ptr/atomic/atomic_shared_ptr.cc:
Check constant initialization.
* testsuite/20_util/weak_ptr/atomic_weak_ptr.cc: Likewise.
2022-01-20 Jonathan Wakely <jwakely@redhat.com>
* src/c++11/cxx11-ios_failure.cc (__constinit): Define as
equivalent attribute for Clang.
* src/c++11/future.cc (__constinit): Likewise.
* src/c++11/system_error.cc (__constinit): Likewise.
* src/c++17/memory_resource.cc (__constinit): Likewise.
2022-01-20 Jonathan Wakely <jwakely@redhat.com>
* scripts/testsuite_flags.in: Only add src/filesystem/.libs and
src/libbacktrace/.libs to LDFLAGS if those directories exist.
2022-01-19 Jonathan Wakely <jwakely@redhat.com>
* configure.ac (GLIBCXX_ENABLE_DEBUG_FLAGS): Remove -gdwarf-4
from default flags.
* configure: Regenerate.
2022-01-19 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/104123
* testsuite/29_atomics/headers/stdatomic.h/c_compat.cc: Include
<stddef.h>.
2022-01-19 Jonathan Wakely <jwakely@redhat.com>
* scripts/testsuite_flags.in: Add src/libbacktrace/.libs to
linker search paths.
* src/Makefile.am: Fix src/debug/libbacktrace build.
* src/Makefile.in: Regenerate.
* src/libbacktrace/Makefile.am: Use per-library CPPFLAGS
variable. Use symlinks for the source files.
* src/libbacktrace/Makefile.in: Regenerate.
2022-01-19 Matthias Kretz <m.kretz@gsi.de>
* include/experimental/bits/simd.h (__floating_point_flags): Do
not rely on math_errhandling to expand to a constant expression.
2022-01-19 Jonathan Wakely <jwakely@redhat.com>
* doc/xml/manual/evolution.xml: Document deprecations.
* doc/xml/manual/status_cxx2017.xml: Update status.
* doc/html/*: Regenerate.
2022-01-19 Jonathan Wakely <jwakely@redhat.com>
* include/bits/stl_tempbuf.h (get_temporary_buffer): Change
_GLIBCXX14_DEPRECATED to _GLIBCXX17_DEPRECATED.
2022-01-19 Jonathan Wakely <jwakely@redhat.com>
* include/bits/stl_pair.h (_PCC::_DeprConsPair): Remove unused
function.
2022-01-19 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/104101
* include/bits/shared_ptr_atomic.h (_Sp_atomic::_Atomic_count::lock):
Only use __thread_relax if __cpp_lib_atomic_wait is defined.
2022-01-18 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/104099
* include/bits/basic_string.h (basic_string(nullptr_t)): Only
define for C++23.
(operator=(nullptr_t)): Likewise.
* include/bits/cow_string.h: Likewise.
* include/std/string_view (basic_string_view(nullptr_t)):
Likewise.
* testsuite/21_strings/basic_string/cons/char/nullptr.cc: Adjust
expected error. Add examples that become ill-formed in C++23.
* testsuite/21_strings/basic_string_view/cons/char/nonnull.cc:
Adjust expected errors.
* testsuite/21_strings/basic_string_view/cons/wchar_t/nonnull.cc:
Likewise.
2022-01-18 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/104098
* include/bits/stl_iterator.h (reverse_iterator): Check
__cpp_lib_concepts instead of __cplusplus.
2022-01-18 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/101124
* include/bits/stl_pair.h (pair): Adjust constraints on
deprecated constructors accepting literal zero as null pointer
constant. Improve wording of deprecated attribute.
* testsuite/20_util/pair/cons/99957.cc: Check that deprecated
constructors do not cause ambiguities for copyable types.
2022-01-18 Jonathan Wakely <jwakely@redhat.com>
* include/bits/stl_function.h (ptr_fun): Fix suggestion for
non-deprecated alternative.
2022-01-18 Tom Honermann <tom@honermann.net>
* acinclude.m4: Define config macros if uchar.h provides
c8rtomb() and mbrtoc8().
* config.h.in: Regenerate.
* configure: Regenerate.
* include/c_compatibility/uchar.h (c8rtomb, mbrtoc8): Define.
* include/c_global/cuchar (c8rtomb, mbrtoc8): Likewise.
* include/c_std/cuchar (c8rtomb, mbrtoc8): Likewise.
* testsuite/21_strings/headers/cuchar/functions_std_cxx20.cc:
New test.
* testsuite/21_strings/headers/cuchar/functions_std_fchar8_t.cc:
New test.
2022-01-18 Jonathan Wakely <jwakely@redhat.com>
* include/Makefile.am: Install new header.
* include/Makefile.in: Regenerate.
* include/c_compatibility/stdatomic.h: New file.
* testsuite/29_atomics/headers/stdatomic.h/c_compat.cc: New test.
2022-01-18 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/104080
* src/c++17/fast_float/LOCAL_PATCHES: Update.
* src/c++17/fast_float/fast_float.h (FASTFLOAT_IS_BIG_ENDIAN):
Define in terms of __BYTE_ORDER__.
2022-01-18 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/104080
* src/c++17/fast_float/LOCAL_PATCHES: UPDATE.
* src/c++17/fast_float/fast_float.h (round): Use explicit
template argument list for std::min.
2022-01-18 Jonathan Wakely <jwakely@redhat.com>
* doc/xml/manual/status_cxx2017.xml: Update C++17 status.
* doc/xml/manual/status_cxx2020.xml: Use 12.1 instead of 12 for
upcoming release.
* doc/html/manual/status.html: Regenerate.
2022-01-18 Jonathan Wakely <jwakely@redhat.com>
* acinclude.m4 (GLIBCXX_ENABLE_FULLY_DYNAMIC_STRING): Improve
comments.
* configure: Regenerate.
2022-01-17 Patrick Palka <ppalka@redhat.com>
* src/c++17/floating_from_chars.cc: (USE_LIB_FAST_FLOAT):
Conditionally define, and use it to conditionally include
fast_float.
(from_chars): Use fast_float for float and double when
USE_LIB_FAST_FLOAT.
2022-01-17 Patrick Palka <ppalka@redhat.com>
* src/c++17/fast_float/LOCAL_PATCHES: Update.
* src/c++17/fast_float/fast_float.h (from_chars_advanced): In
case of over/underflow, return errc::result_out_of_range and don't
modify 'value'.
2022-01-17 Patrick Palka <ppalka@redhat.com>
* src/c++17/fast_float/LOCAL_PATCHES: Update.
* src/c++17/fast_float/fast_float.h: Apply local modifications.
2022-01-17 Patrick Palka <ppalka@redhat.com>
* src/c++17/fast_float/LOCAL_PATCHES: New file.
* src/c++17/fast_float/MERGE: New file.
* src/c++17/fast_float/README.md: New file, copied from the
fast_float repository.
* src/c++17/fast_float/fast_float.h: New file, an amalgamation
of the fast_float library.
2022-01-17 Patrick Palka <ppalka@redhat.com>
* src/c++17/floating_from_chars.cc: Include <bit>.
(ascii_to_hexit, starts_with_ci): Conditionally define.
(__floating_from_chars_hex): Conditionally define.
(from_chars): Use __floating_from_chars_hex for
chars_format::hex parsing of binary32/64 float/double.
(testsuite/20_util/from_chars/7.cc): New test.
* testsuite/20_util/from_chars/7.cc: New file.
2022-01-17 Jonathan Wakely <jwakely@redhat.com>
* acinclude.m4 (GLIBCXX_ENABLE_BACKTRACE): New macro.
* configure.ac: Use GLIBCXX_ENABLE_BACKTRACE.
* include/Makefile.am: Add new header.
* include/Makefile.in: Regenerate.
* include/std/stacktrace: New header.
* include/std/version (__cpp_lib_stacktrace): Define.
* Makefile.in: Regenerate.
* config.h.in: Regenerate.
* configure: Regenerate.
* doc/Makefile.in: Regenerate.
* libsupc++/Makefile.in: Regenerate.
* po/Makefile.in: Regenerate.
* python/Makefile.in: Regenerate.
* src/Makefile.am: Regenerate.
* src/Makefile.in: Regenerate.
* src/c++11/Makefile.in: Regenerate.
* src/c++17/Makefile.in: Regenerate.
* src/c++20/Makefile.in: Regenerate.
* src/c++98/Makefile.in: Regenerate.
* src/filesystem/Makefile.in: Regenerate.
* testsuite/Makefile.in: Regenerate.
* src/libbacktrace/Makefile.am: New file.
* src/libbacktrace/Makefile.in: New file.
* src/libbacktrace/backtrace-rename.h: New file.
* src/libbacktrace/backtrace-supported.h.in: New file.
* src/libbacktrace/config.h.in: New file.
* testsuite/lib/libstdc++.exp (check_effective_target_stacktrace):
New proc.
* testsuite/20_util/stacktrace/entry.cc: New test.
* testsuite/20_util/stacktrace/synopsis.cc: New test.
* testsuite/20_util/stacktrace/version.cc: New test.
2022-01-17 Jonathan Wakely <jwakely@redhat.com>
* doc/xml/manual/status_cxx2020.xml: Use final C++20 option
names.
* doc/html/manual/status.html: Regenerate.
2022-01-17 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/103650
* include/Makefile.am: Rename LT_OBJDIR and STDC_HEADERS.
* include/Makefile.in: Regenerate.
* testsuite/17_intro/headers/c++1998/103650.cc: New test.
2022-01-17 Matthias Kretz <m.kretz@gsi.de>
* include/experimental/bits/simd.h (__floating_point_flags): Do
not rely on the presence of the math_errhandling macro.
2022-01-17 Jonathan Wakely <jwakely@redhat.com>
* include/bits/shared_ptr_atomic.h (_Sp_atomic): Add typename
to qualified-id for dependent type.
2022-01-17 Jonathan Wakely <jwakely@redhat.com>
* doc/xml/manual/status_cxx2020.xml: Update.
* doc/html/manual/status.html: Regenerate.
2022-01-17 Jonathan Wakely <jwakely@redhat.com>
Thomas Rodgers <trodgers@redhat.com>
* include/bits/shared_ptr_atomic.h (__cpp_lib_atomic_shared_ptr):
New macro.
(_Sp_atomic): New class template.
(atomic<shared_ptr<T>>, atomic<weak_ptr<T>>): New partial
specializations.
* include/bits/shared_ptr_base.h (__shared_count, __weak_count)
(__shared_ptr, __weak_ptr): Declare _Sp_atomic as a friend.
* include/std/version (__cpp_lib_atomic_shared_ptr): New macro.
* testsuite/20_util/shared_ptr/atomic/atomic_shared_ptr.cc: New
test.
* testsuite/20_util/weak_ptr/atomic_weak_ptr.cc: New test.
2022-01-15 Matthias Kretz <m.kretz@gsi.de>
* include/experimental/bits/simd.h: Move feature detection bools
and add __have_avx512bitalg, __have_avx512vbmi2,
__have_avx512vbmi, __have_avx512ifma, __have_avx512cd,
__have_avx512vnni, __have_avx512vpopcntdq.
(__detail::__machine_flags): New function which returns a unique
uint64 depending on relevant -m and -f flags.
(__detail::__odr_helper): New type alias for either an anonymous
type or a type specialized with the __machine_flags number.
(_SimdIntOperators): Change template parameters from _Impl to
_Tp, _Abi because _Impl now has an __odr_helper parameter which
may be _OdrEnforcer from the anonymous namespace, which makes
for a bad base class.
(many): Either add __odr_helper template parameter or mark as
always_inline.
* include/experimental/bits/simd_detail.h: Add defines for
AVX512BITALG, AVX512VBMI2, AVX512VBMI, AVX512IFMA, AVX512CD,
AVX512VNNI, AVX512VPOPCNTDQ, and AVX512VP2INTERSECT.
* include/experimental/bits/simd_builtin.h: Add __odr_helper
template parameter or mark as always_inline.
* include/experimental/bits/simd_fixed_size.h: Ditto.
* include/experimental/bits/simd_math.h: Ditto.
* include/experimental/bits/simd_scalar.h: Ditto.
* include/experimental/bits/simd_neon.h: Add __odr_helper
template parameter.
* include/experimental/bits/simd_ppc.h: Ditto.
* include/experimental/bits/simd_x86.h: Ditto.
2022-01-14 Uroš Bizjak <ubizjak@gmail.com>
* testsuite/22_locale/numpunct/members/char/3.cc:
Require pt_PT locale instead of nl_NL.
(test02): Use pt_PT locale instead of nl_NL.
2022-01-14 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/91260
PR libstdc++/91383
PR libstdc++/95065
* include/backward/binders.h (bind1st, bind2nd): Add deprecated
attribute.
* include/bits/refwrap.h (_Maybe_unary_or_binary_function):
Disable deprecated warnings for base classes.
(_Reference_wrapper_base): Likewise.
* include/bits/shared_ptr_base.h (_Sp_owner_less): Likewise.
* include/bits/stl_bvector.h (_Bit_iterator_base): Likewise.
* include/bits/stl_function.h (unary_function, binary_function):
Add deprecated attribute.
(unary_negate, not1, binary_negate, not2, ptr_fun)
(pointer_to_unary_function, pointer_to_binary_function)
(mem_fun_t, const_mem_fun_t, mem_fun_ref_t, const_mem_fun_ref_t)
(mem_fun1_t, const_mem_fun1_t, mem_fun_ref1_t)
(const_mem_fun1_ref_t, mem_fun, mem_fun_ref): Add deprecated
attributes.
* include/bits/stl_iterator.h: Disable deprecated warnings for
std::iterator base classes.
* include/bits/stl_iterator_base_types.h (iterator): Add
deprecated attribute.
* include/bits/stl_map.h (map::value_compare): Disable
deprecated warnings for base class.
* include/bits/stl_multimap.h (multimap::value_compare):
Likewise.
* include/bits/stl_raw_storage_iter.h (raw_storage_iterator):
Add deprecated attribute.
* include/bits/stl_tempbuf.h (get_temporary_buffer): Likewise.
* include/bits/stream_iterator.h: Disable deprecated warnings.
* include/bits/streambuf_iterator.h: Likewise.
* include/ext/bitmap_allocator.h: Remove unary_function base
classes.
* include/ext/functional: Disable deprecated warnings.
* include/ext/rope: Likewise.
* include/ext/throw_allocator.h: Likewise.
* include/std/type_traits (result_of): Add deprecated attribute.
* include/tr1/functional: Disable deprecated warnings.
* include/tr1/functional_hash.h: Likewise.
* testsuite/20_util/function_objects/binders/1.cc: Add
-Wno-disable-deprecations.
* testsuite/20_util/function_objects/binders/3113.cc: Likewise.
* testsuite/20_util/function_objects/constexpr.cc: Add
dg-warning.
* testsuite/20_util/raw_storage_iterator/base.cc: Likewise.
* testsuite/20_util/raw_storage_iterator/dr2127.cc: Likewise.
* testsuite/20_util/raw_storage_iterator/requirements/base_classes.cc:
Likewise.
* testsuite/20_util/raw_storage_iterator/requirements/explicit_instantiation/1.cc:
Likewise.
* testsuite/20_util/raw_storage_iterator/requirements/typedefs.cc:
Likewise.
* testsuite/20_util/reference_wrapper/24803.cc:
Likewise.
* testsuite/20_util/reference_wrapper/typedefs.cc: Enable for
C++20 and check for absence of nested types.
* testsuite/20_util/shared_ptr/comparison/less.cc: Remove
std::binary_function base class.
* testsuite/20_util/temporary_buffer.cc: Add dg-warning.
* testsuite/21_strings/basic_string/cons/char/69092.cc: Remove
std::iterator base class.
* testsuite/24_iterators/back_insert_iterator/requirements/base_classes.cc:
Likewise.
* testsuite/24_iterators/front_insert_iterator/requirements/base_classes.cc:
Likewise.
* testsuite/24_iterators/insert_iterator/requirements/base_classes.cc:
Likewise.
* testsuite/24_iterators/istream_iterator/requirements/base_classes.cc:
Likewise.
* testsuite/24_iterators/istreambuf_iterator/92285.cc:
Likewise.
* testsuite/24_iterators/istreambuf_iterator/requirements/base_classes.cc:
Likewise.
* testsuite/24_iterators/ostream_iterator/requirements/base_classes.cc:
Likewise.
* testsuite/24_iterators/ostreambuf_iterator/requirements/base_classes.cc:
Likewise.
* testsuite/24_iterators/reverse_iterator/requirements/base_classes.cc:
Likewise.
* testsuite/25_algorithms/copy/34595.cc:
Likewise.
* testsuite/25_algorithms/minmax/3.cc: Remove std::binary_function
base class.
* testsuite/25_algorithms/all_of/requirements/explicit_instantiation/2.cc:
Disable deprecated warnings.
* testsuite/25_algorithms/all_of/requirements/explicit_instantiation/pod.cc:
Likewise.
* testsuite/25_algorithms/any_of/requirements/explicit_instantiation/2.cc:
Likewise.
* testsuite/25_algorithms/any_of/requirements/explicit_instantiation/pod.cc:
Likewise.
* testsuite/25_algorithms/copy_if/requirements/explicit_instantiation/2.cc:
Likewise.
* testsuite/25_algorithms/copy_if/requirements/explicit_instantiation/pod.cc:
Likewise.
* testsuite/25_algorithms/count_if/requirements/explicit_instantiation/2.cc:
Likewise.
* testsuite/25_algorithms/count_if/requirements/explicit_instantiation/pod.cc:
Likewise.
* testsuite/25_algorithms/find_end/requirements/explicit_instantiation/2.cc:
Likewise.
* testsuite/25_algorithms/find_end/requirements/explicit_instantiation/pod.cc:
Likewise.
* testsuite/25_algorithms/find_first_of/requirements/explicit_instantiation/2.cc:
Likewise.
* testsuite/25_algorithms/find_first_of/requirements/explicit_instantiation/pod.cc:
Likewise.
* testsuite/25_algorithms/find_if/requirements/explicit_instantiation/2.cc:
Likewise.
* testsuite/25_algorithms/find_if/requirements/explicit_instantiation/pod.cc:
Likewise.
* testsuite/25_algorithms/find_if_not/requirements/explicit_instantiation/2.cc:
Likewise.
* testsuite/25_algorithms/find_if_not/requirements/explicit_instantiation/pod.cc:
Likewise.
* testsuite/25_algorithms/for_each/requirements/explicit_instantiation/2.cc:
Likewise.
* testsuite/25_algorithms/for_each/requirements/explicit_instantiation/pod.cc:
Likewise.
* testsuite/25_algorithms/is_partitioned/requirements/explicit_instantiation/2.cc:
Likewise.
* testsuite/25_algorithms/is_partitioned/requirements/explicit_instantiation/pod.cc:
Likewise.
* testsuite/25_algorithms/is_permutation/requirements/explicit_instantiation/2.cc:
Likewise.
* testsuite/25_algorithms/is_permutation/requirements/explicit_instantiation/pod.cc:
Likewise.
* testsuite/25_algorithms/none_of/requirements/explicit_instantiation/2.cc:
Likewise.
* testsuite/25_algorithms/none_of/requirements/explicit_instantiation/pod.cc:
Likewise.
* testsuite/25_algorithms/partition/requirements/explicit_instantiation/2.cc:
Likewise.
* testsuite/25_algorithms/partition/requirements/explicit_instantiation/pod.cc:
Likewise.
* testsuite/25_algorithms/partition_copy/requirements/explicit_instantiation/2.cc:
Likewise.
* testsuite/25_algorithms/partition_copy/requirements/explicit_instantiation/pod.cc:
Likewise.
* testsuite/25_algorithms/partition_point/requirements/explicit_instantiation/2.cc:
Likewise.
* testsuite/25_algorithms/partition_point/requirements/explicit_instantiation/pod.cc:
Likewise.
* testsuite/25_algorithms/random_shuffle/requirements/explicit_instantiation/2.cc:
Likewise.
* testsuite/25_algorithms/random_shuffle/requirements/explicit_instantiation/pod.cc:
Likewise.
* testsuite/25_algorithms/remove_copy_if/requirements/explicit_instantiation/2.cc:
Likewise.
* testsuite/25_algorithms/remove_copy_if/requirements/explicit_instantiation/pod.cc:
Likewise.
* testsuite/25_algorithms/remove_if/requirements/explicit_instantiation/2.cc:
Likewise.
* testsuite/25_algorithms/remove_if/requirements/explicit_instantiation/pod.cc:
Likewise.
* testsuite/25_algorithms/replace_copy_if/requirements/explicit_instantiation/2.cc:
Likewise.
* testsuite/25_algorithms/replace_copy_if/requirements/explicit_instantiation/pod.cc:
Likewise.
* testsuite/25_algorithms/replace_if/requirements/explicit_instantiation/2.cc:
Likewise.
* testsuite/25_algorithms/replace_if/requirements/explicit_instantiation/pod.cc:
Likewise.
* testsuite/25_algorithms/search/requirements/explicit_instantiation/2.cc:
Likewise.
* testsuite/25_algorithms/search/requirements/explicit_instantiation/pod.cc:
Likewise.
* testsuite/25_algorithms/search_n/requirements/explicit_instantiation/2.cc:
Likewise.
* testsuite/25_algorithms/search_n/requirements/explicit_instantiation/pod.cc:
Likewise.
* testsuite/25_algorithms/stable_partition/requirements/explicit_instantiation/2.cc:
Likewise.
* testsuite/25_algorithms/stable_partition/requirements/explicit_instantiation/pod.cc:
Likewise.
* testsuite/25_algorithms/transform/requirements/explicit_instantiation/2.cc:
Likewise.
* testsuite/25_algorithms/transform/requirements/explicit_instantiation/pod.cc:
Likewise.
* testsuite/27_io/basic_filebuf/underflow/wchar_t/9178.cc: Add
dg-warning.
* testsuite/ext/pb_ds/example/priority_queue_erase_if.cc:
Likewise.
* testsuite/ext/pb_ds/example/priority_queue_split_join.cc:
Likewise.
* testsuite/tr1/3_function_objects/reference_wrapper/typedefs.cc:
Disable deprecated warnings.
* testsuite/tr1/6_containers/hash/requirements/base_classes.cc:
Likewise.
* testsuite/util/regression/trait/erase_if_fn.hpp: Remove
std::unary_function base classes.
* testsuite/util/testsuite_iterators.h (output_iterator_wrapper):
Remove std::iterator base classes.
2022-01-14 Jonathan Wakely <jwakely@redhat.com>
* include/bits/shared_ptr.h (__cpp_lib_shared_ptr_weak_type):
Correct type of macro value.
(shared_ptr): Add additional friend declarations.
(make_shared, allocate_shared): Constrain existing overloads and
remove static_assert.
* include/bits/shared_ptr_base.h (__cpp_lib_smart_ptr_for_overwrite):
New macro.
(_Sp_counted_ptr_inplace<T, Alloc, Lp>): New partial
specialization for use with make_shared_for_overwrite.
(__cpp_lib_shared_ptr_arrays): Update value for C++20.
(_Sp_counted_array_base): New class template.
(_Sp_counted_array): New class template.
(__shared_count(_Tp*&, const _Sp_counted_array_base&, _Init)):
New constructor for allocating shared arrays.
(__shared_ptr(const _Sp_counted_array_base&, _Init)): Likewise.
* include/std/version (__cpp_lib_shared_ptr_weak_type): Correct
type.
(__cpp_lib_shared_ptr_arrays): Update value for C++20.
(__cpp_lib_smart_ptr_for_overwrite): New macro.
* testsuite/20_util/shared_ptr/creation/99006.cc: Adjust
expected errors.
* testsuite/20_util/shared_ptr/creation/array.cc: New test.
* testsuite/20_util/shared_ptr/creation/overwrite.cc: New test.
* testsuite/20_util/shared_ptr/creation/version.cc: New test.
* testsuite/20_util/unique_ptr/creation/for_overwrite.cc: Check
feature test macro. Test non-trivial default-initialization.
2022-01-14 Jonathan Wakely <jwakely@redhat.com>
* include/bits/stl_construct.h (_Construct, _Construct_novalue):
Also cast away cv-qualifiers when converting pointer to void.
* testsuite/20_util/allocator/void.cc: Test construct function
with cv-qualified types.
2022-01-14 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/103992
* include/bits/stl_iterator.h (common_iterator): Use
std::construct_at instead of placement new.
* testsuite/24_iterators/common_iterator/1.cc: Check copy
construction is usable in constant expressions.
2022-01-14 Jonathan Wakely <jwakely@redhat.com>
* doc/xml/manual/status_cxx2011.xml: Document new tokens
accepted by std::random_device constructor.
* doc/html/manual/status.html: Regenerate.
2022-01-12 Patrick Palka <ppalka@redhat.com>
* testsuite/20_util/to_chars/103955.cc: Add explicit dg-do
directive.
2022-01-12 Patrick Palka <ppalka@redhat.com>
PR libstdc++/103955
* src/c++17/floating_to_chars.cc (__floating_to_chars_hex):
Track the excess precision separately from the effective
precision. Avoid overflow in bounds check by splitting it into
two checks.
(__floating_to_chars_precision): Avoid overflow in bounds checks
similarly.
* testsuite/20_util/to_chars/103955.cc: New test.
2022-01-11 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/103726
* include/Makefile.am: Install <source_location> for
freestanding.
* include/Makefile.in: Regenerate.
* include/std/version (__cpp_lib_source_location): Define for
freestanding.
2022-01-11 Jonathan Wakely <jwakely@redhat.com>
* include/std/ranges (ranges::lazy_split_view::_InnerIter::end()):
Add neoxcept (LWG 3593).
2022-01-11 Jonathan Wakely <jwakely@redhat.com>
* include/std/ranges (ranges::__detail::__box): Add constexpr to
assignment operators (LWG 3572).
* testsuite/std/ranges/adaptors/filter.cc: Check assignment of a
view that uses copyable-box.
2022-01-11 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/103726
* include/Makefile.am: Install <coroutine> for freestanding.
* include/Makefile.in: Regenerate.
* include/std/coroutine: Adjust headers and preprocessor
conditions.
(__coroutine_traits_impl): Use concepts when available.
[_GLIBCXX_HOSTED] (hash<coroutine_handle>): Define.
2022-01-11 Jonathan Wakely <jwakely@redhat.com>
* include/std/ostream (operator<<(basic_ostream&, charT)):
Use unformatted input if no padding is needed.
(operator<<(basic_ostream<char>&, char)): Likewise.
2022-01-11 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/103891
* include/bits/c++config (_GLIBCXX_HAVE_COND_TRIVIAL_SPECIAL_MEMBERS):
Define.
* include/std/variant (__cpp_lib_variant): Only define C++20
value when the compiler is known to support conditionally
trivial destructors.
* include/std/version (__cpp_lib_variant): Likewise.
2022-01-11 Jonathan Wakely <jwakely@redhat.com>
* include/bits/stl_iterator.h (common_iterator): Add constexpr
to all member functions (LWG 3574).
* testsuite/24_iterators/common_iterator/1.cc: Evaluate some
tests as constant expressions.
* testsuite/24_iterators/common_iterator/2.cc: Likewise.
2022-01-10 Jakub Jelinek <jakub@redhat.com>
PR libstdc++/77760
* include/bits/locale_facets_nonio.h (__time_get_state): New struct.
(time_get::_M_extract_via_format): Declare new method with
__time_get_state& as an extra argument.
* include/bits/locale_facets_nonio.tcc (_M_extract_via_format): Add
__state argument, set various fields in it while parsing. Handle %j,
%U, %w and %W, fix up handling of %y, %Y and %C, don't adjust tm_hour
for %p immediately. Add a wrapper around the method without the
__state argument for backwards compatibility.
(_M_extract_num): Remove all __len == 4 special cases.
(time_get::do_get_time, time_get::do_get_date, time_get::do_get): Zero
initialize __state, pass it to _M_extract_via_format and finalize it
at the end.
(do_get_year): For 1-2 digit parsed years, map 0-68 to 2000-2068,
69-99 to 1969-1999. For 3-4 digit parsed years use that as year.
(get): If do_get isn't overloaded from the locale_facets_nonio.tcc
version, don't call do_get but call _M_extract_via_format instead to
pass around state.
* config/abi/pre/gnu.ver (GLIBCXX_3.4.30): Export _M_extract_via_format
with extra __time_get_state and __time_get_state::_M_finalize_state.
* src/c++98/locale_facets.cc (is_leap, day_of_the_week,
day_of_the_year): New functions in anon namespace.
(mon_yday): New var in anon namespace.
(__time_get_state::_M_finalize_state): Define.
* testsuite/22_locale/time_get/get/char/4.cc: New test.
* testsuite/22_locale/time_get/get/wchar_t/4.cc: New test.
* testsuite/22_locale/time_get/get_year/char/1.cc (test01): Parse 197
as year 197AD instead of error.
* testsuite/22_locale/time_get/get_year/char/5.cc (test01): Parse 1 as
year 2001 instead of error.
* testsuite/22_locale/time_get/get_year/char/6.cc: New test.
* testsuite/22_locale/time_get/get_year/wchar_t/1.cc (test01): Parse
197 as year 197AD instead of error.
* testsuite/22_locale/time_get/get_year/wchar_t/5.cc (test01): Parse
1 as year 2001 instead of error.
* testsuite/22_locale/time_get/get_year/wchar_t/6.cc: New test.
2022-01-10 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/103866
* acinclude.m4 (GLIBCXX_COMPUTE_STDIO_INTEGER_CONSTANTS): Do
nothing for freestanding builds.
(GLIBCXX_ENABLE_HOSTED): Define FREESTANDING_FLAGS.
* configure.ac: Do not use AC_LIBTOOL_DLOPEN when configured
with --without-headers. Do not use GCC_HEADER_STDINT for
freestanding builds.
* libsupc++/Makefile.am (HOSTED_CXXFLAGS): Use -ffreestanding
for freestanding builds.
* configure: Regenerate.
* Makefile.in: Regenerate.
* doc/Makefile.in: Regenerate.
* include/Makefile.in: Regenerate.
* libsupc++/Makefile.in: Regenerate.
* po/Makefile.in: Regenerate.
* python/Makefile.in: Regenerate.
* src/Makefile.in: Regenerate.
* src/c++11/Makefile.in: Regenerate.
* src/c++17/Makefile.in: Regenerate.
* src/c++20/Makefile.in: Regenerate.
* src/c++98/Makefile.in: Regenerate.
* src/filesystem/Makefile.in: Regenerate.
* testsuite/Makefile.in: Regenerate.
2022-01-10 Jonathan Wakely <jwakely@redhat.com>
* testsuite/28_regex/algorithms/regex_replace/char/103664.cc:
Add dg-timeout-factor directive.
* testsuite/28_regex/basic_regex/84110.cc: Likewise.
* testsuite/28_regex/basic_regex/ctors/char/other.cc: Likewise.
* testsuite/28_regex/match_results/102667.cc: Likewise.
2022-01-10 Jonathan Wakely <jwakely@redhat.com>
* doc/xml/manual/using.xml: Update documentation around default
-std option.
* doc/html/*: Regenerate.
2022-01-10 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/100017
* src/c++17/Makefile.am (AM_CXXFLAGS): Add -nostdinc++.
* src/c++17/Makefile.in: Regenerate.
2022-01-09 Sandra Loosemore <sandra@codesourcery.com>
* testsuite/18_support/type_info/constexpr.cc: Add explicit
-fdelete-null-pointer-checks option.
2022-01-06 Pavel I. Kryukov <pavel.kryukov@phystech.edu>
Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/103853
* include/bits/forward_list.tcc (forward_list::merge): Check for
self-merge.
* testsuite/23_containers/forward_list/operations/merge.cc: New test.
2022-01-06 Jonathan Wakely <jwakely@redhat.com>
* include/bits/regex.h (basic_regex, match_results): Qualify
name in friend declaration, to work around Clang bug.
2022-01-06 Jonathan Wakely <jwakely@redhat.com>
* testsuite/ext/rope/pthread7-rope.cc: Add dg-timeout-factor.
2022-01-06 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/103911
* include/std/charconv (__from_chars_alpha_to_num): Return
char instead of unsigned char. Change invalid return value to
127 instead of using numeric trait.
(__from_chars_alnum): Fix comment. Do not use std::isdigit.
Change type of variable to char.
2022-01-05 François Dumont <fdumont@gcc.gnu.org>
PR libstdc++/68303
* include/bits/hashtable_policy.h
(_Hashtable_hash_traits<_Hash>): New.
(_Hash_code_base<>::_M_hash_code(const _Hash_node_value<>&)): New.
(_Hashtable_base<>::_M_key_equals): New.
(_Hashtable_base<>::_M_equals): Use latter.
(_Hashtable_base<>::_M_key_equals_tr): New.
(_Hashtable_base<>::_M_equals_tr): Use latter.
* include/bits/hashtable.h
(_Hashtable<>::__small_size_threshold()): New, use _Hashtable_hash_traits.
(_Hashtable<>::find): Loop through elements to look for key if size is lower
than __small_size_threshold().
(_Hashtable<>::_M_emplace(true_type, _Args&&...)): Likewise.
(_Hashtable<>::_M_insert_unique(_Kt&&, _Args&&, const _NodeGenerator&)): Likewise.
(_Hashtable<>::_M_compute_hash_code(const_iterator, const key_type&)): New.
(_Hashtable<>::_M_emplace(const_iterator, false_type, _Args&&...)): Use latter.
(_Hashtable<>::_M_find_before_node(const key_type&)): New.
(_Hashtable<>::_M_erase(true_type, const key_type&)): Use latter.
(_Hashtable<>::_M_erase(false_type, const key_type&)): Likewise.
* src/c++11/hashtable_c++0x.cc: Include <bits/functional_hash.h>.
* testsuite/util/testsuite_performance.h
(report_performance): Use 9 width to display memory.
* testsuite/performance/23_containers/insert_erase/unordered_small_size.cc:
New performance test case.
2022-01-05 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/103919
* include/bits/basic_string.h (basic_string(const T&, size_t, size_t)):
Relax constraints on string_view parameter.
* include/bits/cow_string.h (basic_string(const T&, size_t, size_t)):
Likewise.
* testsuite/21_strings/basic_string/cons/char/103919.cc: New test.
2022-01-05 Jonathan Wakely <jwakely@redhat.com>
* config/abi/pre/gnu.ver (GLIBCXX_3.4.30): Export new symbol for
ARM EABI.
* include/bits/c++config (_GLIBCXX23_CONSTEXPR): Define.
* include/std/version (__cpp_lib_constexpr_typeinfo): Define.
* libsupc++/tinfo.cc: Add #error to ensure non-inline definition
is emitted.
(type_info::__equal): Define alias symbol.
* libsupc++/typeinfo (type_info::before): Combine different
implementations into one.
(type_info::operator==): Likewise. Use address equality for
constant evaluation. Call __equal for targets that require the
definition to be non-inline.
* testsuite/18_support/type_info/constexpr.cc: New test.
2022-01-05 Jonathan Wakely <jwakely@redhat.com>
* src/c++11/cxx11-ios_failure.cc (io_error_category): Define
class and virtual functions as 'final'.
(io_category_instance): Use constinit union to make the object
immortal.
* src/c++11/future.cc (future_error_category): Define class and
virtual functions as 'final'.
(future_category_instance): Use constinit union.
2022-01-05 Jonathan Wakely <jwakely@redhat.com>
* python/libstdcxx/v6/printers.py (StdErrorCodePrinter): Strip
versioned namespace from the type name that is printed.
2022-01-05 Jonathan Wakely <jwakely@redhat.com>
* python/libstdcxx/v6/printers.py (StdRegexStatePrinter): New
printer for std::regex NFA states.
2022-01-05 Jonathan Wakely <jwakely@redhat.com>
* testsuite/23_containers/forward_list/operations/1.cc: Fill in
placeholders in comments.
* testsuite/23_containers/forward_list/operations/2.cc:
Likewise.
* testsuite/23_containers/forward_list/operations/3.cc:
Likewise.
* testsuite/23_containers/forward_list/operations/4.cc:
Likewise.
* testsuite/23_containers/forward_list/operations/5.cc:
Likewise.
* testsuite/23_containers/forward_list/operations/6.cc:
Likewise.
* testsuite/23_containers/forward_list/operations/7.cc:
Likewise.
2022-01-05 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/103848
* include/bits/stl_deque.h (operator-): Do not use 0 as null
pointer constant.
2022-01-05 Jonathan Wakely <jwakely@redhat.com>
* include/bits/alloc_traits.h (allocator_traits<allocator<void>>):
Use std::_Construct for construct.
2022-01-05 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/103877
* doc/xml/faq.xml: Add '-x c++' to preprocessor command.
* doc/html/faq.html: Regenerate.
2022-01-05 Jonathan Wakely <jwakely@redhat.com>
* include/bits/regex.h (__regex_algo_impl): Change __policy and
__match_mode template parameters to be function parameters.
(regex_match, regex_search): Pass policy and match mode as
function arguments.
* include/bits/regex.tcc (__regex_algo_impl): Change template
parameters to function parameters.
* include/bits/regex_compiler.h (_RegexTranslatorBase): Use
'if constexpr' for conditions using template parameters.
(_RegexTranslator): Likewise.
* include/bits/regex_executor.tcc (_Executor::_M_handle_accept):
Likewise.
* testsuite/util/testsuite_regex.h (regex_match_debug)
(regex_search_debug): Move template arguments to function
arguments.
2022-01-05 Jonathan Wakely <jwakely@redhat.com>
* testsuite/util/testsuite_regex.h (regex_match_debug): Compare
results even if the match failed.
2022-01-05 Jonathan Wakely <jwakely@redhat.com>
* include/bits/regex_compiler.tcc: Adjust all calls to
__throw_regex_error.
* include/bits/regex_error.h (__throw_regex_error): Add noreturn
attribute.
* include/bits/regex_scanner.tcc: Likewise.
* src/c++11/regex.cc (desc): New helper function.
(regex_error::regex_error(error_type)): Use desc to get a string
corresponding to the error code.
Copyright (C) 2022 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.
|