--- /srv/rebuilderd/tmp/rebuilderd1zYqjX/inputs/libstdc++-12-doc_12.5.0-6_all.deb +++ /srv/rebuilderd/tmp/rebuilderd1zYqjX/out/libstdc++-12-doc_12.5.0-6_all.deb ├── file list │ @@ -1,3 +1,3 @@ │ -rw-r--r-- 0 0 0 4 2025-09-12 13:43:35.000000 debian-binary │ --rw-r--r-- 0 0 0 185676 2025-09-12 13:43:35.000000 control.tar.xz │ --rw-r--r-- 0 0 0 9980596 2025-09-12 13:43:35.000000 data.tar.xz │ +-rw-r--r-- 0 0 0 185544 2025-09-12 13:43:35.000000 control.tar.xz │ +-rw-r--r-- 0 0 0 10011992 2025-09-12 13:43:35.000000 data.tar.xz ├── control.tar.xz │ ├── control.tar │ │ ├── ./md5sums │ │ │ ├── ./md5sums │ │ │ │┄ Files differ │ │ │ ├── line order │ │ │ │ @@ -198,16 +198,16 @@ │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00005_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00008.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00008_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00011.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00011_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00014.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00014_source.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a00017.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00017_source.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a00020.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00020_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00023_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00026.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00026.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00026_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00029.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00029.js │ │ │ │ @@ -453,73 +453,75 @@ │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00326_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00329.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00329_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00332.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00332.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00332_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00335.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a00335.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00335_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00338.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00338_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00341.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a00341.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00341_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00344.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00344_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00347.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a00347.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00347_source.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a00350.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a00350_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00353.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00353_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00356.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a00356.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00356_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00359.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00359_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00362.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a00362.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00362_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00365.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00365.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00365_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00368.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a00368.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00368_source.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a00371.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00371_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00374.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a00374.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00374_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00377.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00377.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00377_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00380.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a00380.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00380_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00383.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a00383.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00383_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00386.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00386.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00386_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00389.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00389.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00389_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00395.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a00395.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00395_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00398.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00398_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00401.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00401_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00404.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00404_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00407.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00407.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00407_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00410.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00410.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00410_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00413.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a00413.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00413_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00416.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00416.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00416_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00419.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00419.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00419_source.html │ │ │ │ @@ -529,192 +531,170 @@ │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00425.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00425.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00425_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00428.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00428.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00428_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00431.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a00431.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00431_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00434.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00434.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00434_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00437.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a00437.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00437_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00440.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a00440.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00440_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00443.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a00443.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00443_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00446.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00446.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00446_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00449.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a00449.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00449_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00452.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a00452.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00452_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00455.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a00455.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00455_source.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a00461.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a00461.js │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a00461_source.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a00458.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a00458_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00464.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a00464.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00464_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00467.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a00467.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00467_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00470.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00470.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00470_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00473.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a00473.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00473_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00476.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a00476.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00476_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00479.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00479.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00479_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00482.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00482.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00482_source.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a00485.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a00485.js │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a00485_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00488.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00488.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00488_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00491.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a00491.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00491_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00494.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a00494.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00494_source.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a00497.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a00497.js │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a00497_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00500.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00500_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00503.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00503.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00503_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00506.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a00506.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00506_source.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a00509.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a00509.js │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a00509_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00512.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00512_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00515.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00515_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00518.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a00518.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00518_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00521.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a00521.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00521_source.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a00524.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a00524_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00527.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a00527.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00527_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00530.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a00530.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00530_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00533.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a00533.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00533_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00536.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00536_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00539.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a00539.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00539_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00542.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00542.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00542_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00545.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00545_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00548.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a00548.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00548_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00551.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a00551.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00551_source.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a00554.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a00554.js │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a00554_source.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a00557.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a00557_source.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a00560.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a00560.js │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a00560_source.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a00563.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a00563.js │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a00563_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00566.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00566_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00569.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a00569.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00569_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00572.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00572.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00572_source.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a00575.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a00575_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00578.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a00578.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00578_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00581.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a00581.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00581_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00584.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00584.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00584_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00587.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00587_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00590.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00590.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00590_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00593.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00593_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00596.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00596_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00599.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a00599.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00599_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00602.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a00602.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00602_source.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a00605.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a00605.js │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a00605_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00608.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00608_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00611.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00611.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00611_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00614.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a00614.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00614_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00617.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a00617.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00617_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00620.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a00620.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00620_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00623.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00623_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00626.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00626.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00626_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00629.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00629_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00632.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00632.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00632_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00635.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a00635.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00635_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00638.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a00638.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00638_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00641.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00641_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00644.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a00644.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00644_source.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a00647.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a00647.js │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a00647_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00650.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00650_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00653.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00653.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00653_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00656.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00656.js │ │ │ │ @@ -724,101 +704,124 @@ │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00659_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00662.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00662.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00662_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00665.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00665_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00668.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a00668.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00668_source.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a00671.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a00671_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00674.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a00674.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00674_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00677.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a00677.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00677_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00680.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a00680.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00680_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00683.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00683_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00686.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00686_source.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a00689.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a00689_source.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a00692.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a00692_source.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a00695.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a00695.js │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a00695_source.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a00698.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a00698.js │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a00698_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00701.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a00701.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00701_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00704.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00704.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00704_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00707.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a00707.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00707_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00710.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a00710.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00710_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00713.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a00713.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00713_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00716.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a00716.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00716_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00719.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00719_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00722.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00722_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00725.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a00725.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00725_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00728.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00728.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00728_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00731.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00731_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00734.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a00734.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00734_source.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a00737.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00737_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00740.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a00740.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00740_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00743.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a00743.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00743_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00746.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00746.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00746_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00749.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a00749.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00749_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00752.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00752_source.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a00755.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a00755_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00758.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00758_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00761.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a00761.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00761_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00764.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a00764.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00764_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00767.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00767_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00770.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00770_source.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a00773.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a00773.js │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a00773_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00776.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a00776.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00776_source.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a00779.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a00779.js │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a00779_source.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a00782.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00782_source.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a00785.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a00785.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00785_source.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a00788.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00788_source.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a00791.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00791_source.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a00794.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00794_source.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a00797.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00797_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00800.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00800_source.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a00803.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00803_source.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a00809.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a00806.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a00806_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00809_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00812.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00812_source.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a00815.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a00815_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00818.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00818_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00821.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00821_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00824.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00824_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00827.html │ │ │ │ @@ -833,18 +836,15 @@ │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00839_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00842.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00842_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00845.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00845_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00848.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00848_source.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a00851.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00851_source.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a00854.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a00854.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00854_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00857.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00857_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00860.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00860.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00860_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00863.html │ │ │ │ @@ -866,57 +866,57 @@ │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00884.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00884.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00884_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00887.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00887.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00887_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00890.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a00890.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00890_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00893.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a00893.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00893_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00896.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a00896.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00896_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00899.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00899.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00899_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00902.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00902_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00905.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00905.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00905_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00908.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a00908.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00908_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00911.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00911.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00911_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00914.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00914.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00914_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00917.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00917.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00917_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00920.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a00920.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00920_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00923.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00923.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00923_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00926.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a00926.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00926_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00929.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a00929.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00929_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00932.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a00932.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00932_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00935.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a00935.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00935_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00938.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a00938.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00938_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00941.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00941_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00944.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00944_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00947.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00947_source.html │ │ │ │ @@ -935,48 +935,48 @@ │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00962.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00962.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00962_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00965.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00965.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00965_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00968.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a00968.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00968_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00971.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a00971.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00971_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00974.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00974.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00974_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00977.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00977.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00977_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00980.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00980.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00980_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00983.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a00983.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00983_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00986.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a00986.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00986_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00989.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00989.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00989_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00992.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a00992.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00992_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00995.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00995.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00995_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00998.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00998.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a00998_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01001.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01001.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01001_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01004.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a01004.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01004_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01007.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01007.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01007_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01010.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01010.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01010_source.html │ │ │ │ @@ -989,15 +989,14 @@ │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01019.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01019.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01019_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01022.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01022.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01022_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01025.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a01025.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01025_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01028.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01028.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01028_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01031.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01031.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01031_source.html │ │ │ │ @@ -1013,205 +1012,206 @@ │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01043.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01043.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01043_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01046.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01046.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01046_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01049.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a01049.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01049_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01052.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a01052.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01052_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01055.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01055.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01055_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01058.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01058.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01058_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01061.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a01061.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01061_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01064.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01064.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01064_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01067.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a01067.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01067_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01070.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a01070.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01070_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01073.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01073.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01073_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01076.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01076.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01076_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01079.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01079.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01079_source.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a01082_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01085_source.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a01088.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01088_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01091_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01094_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01097_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01100_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01103_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01106_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01109_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01112_source.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a01118.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a01115_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01118_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01121.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01121_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01124.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01124_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01127.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01127_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01130.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01130_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01133.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01133.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01133_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01136.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a01136.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01136_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01139.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a01139.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01139_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01142.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a01142.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01142_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01145.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a01145.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01145_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01148.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01148.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01148_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01151.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a01151.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01151_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01154.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a01154.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01154_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01157.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a01157.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01157_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01160.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01160.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01160_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01163.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a01163.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01163_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01166.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01166.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01166_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01169.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a01169.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01169_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01172.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01172_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01175.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a01175.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01175_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01178.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a01178.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01178_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01181.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a01181.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01181_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01184.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a01184.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01184_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01187.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01187_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01190.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a01190.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01190_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01193.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a01193.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01193_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01196.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01196.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01196_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01199.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01199.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01199_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01202.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a01202.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01202_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01205.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01205_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01208.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a01208.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01208_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01211.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01211.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01211_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01214.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01214.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01214_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01217.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01217_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01220.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a01220.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01220_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01223.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01223.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01223_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01226.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a01226.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01226_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01229.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a01229.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01229_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01232.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01232_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01235.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01235_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01238.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a01238.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01238_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01241.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01241.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01241_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01244.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a01244.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01244_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01247.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01247_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01250.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01250.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01250_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01253.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01253.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01253_source.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a01262.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a01262.js │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a01262_source.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a01283.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a01283.js │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a01283_source.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a01286.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a01286.js │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a01286_source.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a01301.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a01301_source.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a01259.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a01259.js │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a01259_source.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a01268.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a01268.js │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a01268_source.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a01274.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a01274_source.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a01292.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a01292.js │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a01292_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01304.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01304_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01307.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01307.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01307_source.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a01319.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a01319.js │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a01319_source.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a01325.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a01325_source.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a01316.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a01316_source.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a01322.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a01322.js │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a01322_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01328.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01328.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01328_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01331.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01331.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01331_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01334.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01334_source.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a01346.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a01346_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01361.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01361_source.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a01379.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a01379.js │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a01379_source.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a01382.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a01382_source.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a01370.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a01370.js │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a01370_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01385.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01385_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01388.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01388.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01388_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01391.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01391.js │ │ │ │ @@ -1228,46 +1228,46 @@ │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01406.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01406.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01406_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01409.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01409.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01409_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01412.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a01412.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01412_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01415.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a01415.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01415_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01418.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01418.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01418_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01421.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01421_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01424.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a01424.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01424_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01427.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01427.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01427_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01430.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01430.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01430_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01433.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a01433.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01433_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01436.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a01436.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01436_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01439.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a01439.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01439_source.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a01445.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a01445.js │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a01445_source.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a01442.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a01442.js │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a01442_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01448.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a01448.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01448_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01451.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a01451.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01451_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01454.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01454.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01454_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01457.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01457.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01457_source.html │ │ │ │ @@ -1278,44 +1278,44 @@ │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01463_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01466.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01466_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01469.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01469.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01469_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01472.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a01472.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01472_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01475.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a01475.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01475_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01478.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01478_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01481.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01481_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01484.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01484_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01487.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a01487.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01487_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01490.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a01490.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01490_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01493.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01493.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01493_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01496.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01496.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01496_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01499.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01499.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01499_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01502.html │ │ │ │ +usr/share/doc/gcc-12-base/libstdc++/user/a01502.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01502_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01505.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01505_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01508.html │ │ │ │ -usr/share/doc/gcc-12-base/libstdc++/user/a01508.js │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01508_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01511.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01511_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01514.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01514_source.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01517.html │ │ │ │ usr/share/doc/gcc-12-base/libstdc++/user/a01517_source.html ├── data.tar.xz │ ├── data.tar │ │ ├── file list │ │ │ @@ -192,31 +192,31 @@ │ │ │ -rw-r--r-- 0 root (0) root (0) 9029 2025-07-11 06:33:12.000000 ./usr/share/doc/gcc-12-base/libstdc++/manual/using_dynamic_or_shared.html │ │ │ -rw-r--r-- 0 root (0) root (0) 19785 2025-07-11 06:33:12.000000 ./usr/share/doc/gcc-12-base/libstdc++/manual/using_exceptions.html │ │ │ -rw-r--r-- 0 root (0) root (0) 34008 2025-07-11 06:33:12.000000 ./usr/share/doc/gcc-12-base/libstdc++/manual/using_headers.html │ │ │ -rw-r--r-- 0 root (0) root (0) 10624 2025-07-11 06:33:12.000000 ./usr/share/doc/gcc-12-base/libstdc++/manual/using_macros.html │ │ │ -rw-r--r-- 0 root (0) root (0) 6686 2025-07-11 06:33:12.000000 ./usr/share/doc/gcc-12-base/libstdc++/manual/using_namespaces.html │ │ │ -rw-r--r-- 0 root (0) root (0) 5620 2025-07-11 06:33:12.000000 ./usr/share/doc/gcc-12-base/libstdc++/manual/utilities.html │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/ │ │ │ --rw-r--r-- 0 root (0) root (0) 2859 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/_formulas.log │ │ │ +-rw-r--r-- 0 root (0) root (0) 2858 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/_formulas.log │ │ │ -rw-r--r-- 0 root (0) root (0) 2060 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/_formulas.tex.gz │ │ │ --rw-r--r-- 0 root (0) root (0) 2857 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/_formulas_dark.log │ │ │ +-rw-r--r-- 0 root (0) root (0) 2856 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/_formulas_dark.log │ │ │ -rw-r--r-- 0 root (0) root (0) 2075 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/_formulas_dark.tex.gz │ │ │ --rw-r--r-- 0 root (0) root (0) 2799 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00002.html │ │ │ --rw-r--r-- 0 root (0) root (0) 16028 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00002_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 2811 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00005.html │ │ │ --rw-r--r-- 0 root (0) root (0) 29536 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00005_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 2791 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00002.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 13914 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00002_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4127 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00005.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 10021 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00005_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 2791 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00008.html │ │ │ -rw-r--r-- 0 root (0) root (0) 64568 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00008_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4119 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00011.html │ │ │ --rw-r--r-- 0 root (0) root (0) 9059 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00011_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 2791 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00014.html │ │ │ --rw-r--r-- 0 root (0) root (0) 13914 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00014_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4127 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00017.html │ │ │ --rw-r--r-- 0 root (0) root (0) 10021 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00017_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 9014 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00020_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 2799 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00011.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 16028 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00011_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4119 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00014.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9059 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00014_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9014 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00017_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 2811 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00020.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 29536 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00020_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 31307 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00023_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 25538 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00026.html │ │ │ -rw-r--r-- 0 root (0) root (0) 183 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00026.js │ │ │ -rw-r--r-- 0 root (0) root (0) 160352 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00026_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 26070 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00029.html │ │ │ -rw-r--r-- 0 root (0) root (0) 97 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00029.js │ │ │ -rw-r--r-- 0 root (0) root (0) 112801 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00029_source.html │ │ │ @@ -452,902 +452,902 @@ │ │ │ -rw-r--r-- 0 root (0) root (0) 12456 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00314_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 7543 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00317.html │ │ │ -rw-r--r-- 0 root (0) root (0) 36787 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00317_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 4470 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00320.html │ │ │ -rw-r--r-- 0 root (0) root (0) 15324 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00320_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 4969 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00323.html │ │ │ -rw-r--r-- 0 root (0) root (0) 15313 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00323_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5684 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00326.html │ │ │ --rw-r--r-- 0 root (0) root (0) 186 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00326.js │ │ │ --rw-r--r-- 0 root (0) root (0) 34987 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00326_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5010 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00329.html │ │ │ --rw-r--r-- 0 root (0) root (0) 12015 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00329_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6748 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00332.html │ │ │ --rw-r--r-- 0 root (0) root (0) 272 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00332.js │ │ │ --rw-r--r-- 0 root (0) root (0) 52668 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00332_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6525 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00335.html │ │ │ --rw-r--r-- 0 root (0) root (0) 9558 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00335_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3970 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00338.html │ │ │ --rw-r--r-- 0 root (0) root (0) 17381 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00338_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7673 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00341.html │ │ │ --rw-r--r-- 0 root (0) root (0) 14772 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00341_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3544 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00344.html │ │ │ --rw-r--r-- 0 root (0) root (0) 11952 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00344_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7533 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00347.html │ │ │ --rw-r--r-- 0 root (0) root (0) 105 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00347.js │ │ │ --rw-r--r-- 0 root (0) root (0) 12985 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00347_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4794 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00350.html │ │ │ --rw-r--r-- 0 root (0) root (0) 170360 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00350_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 173648 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00353.html │ │ │ --rw-r--r-- 0 root (0) root (0) 95486 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00353_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3838 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00356.html │ │ │ --rw-r--r-- 0 root (0) root (0) 119473 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00356_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 14006 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00359.html │ │ │ --rw-r--r-- 0 root (0) root (0) 37863 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00359_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 125056 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00362.html │ │ │ --rw-r--r-- 0 root (0) root (0) 111904 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00362_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 17580 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00365.html │ │ │ --rw-r--r-- 0 root (0) root (0) 423 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00365.js │ │ │ --rw-r--r-- 0 root (0) root (0) 49024 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00365_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 11413 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00368.html │ │ │ --rw-r--r-- 0 root (0) root (0) 40865 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00368_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 35893 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00371_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 35531 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00374.html │ │ │ --rw-r--r-- 0 root (0) root (0) 177 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00374.js │ │ │ --rw-r--r-- 0 root (0) root (0) 434328 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00374_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 45967 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00377.html │ │ │ --rw-r--r-- 0 root (0) root (0) 177 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00377.js │ │ │ --rw-r--r-- 0 root (0) root (0) 507119 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00377_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 23739 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00380.html │ │ │ --rw-r--r-- 0 root (0) root (0) 1414 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00380.js │ │ │ --rw-r--r-- 0 root (0) root (0) 240141 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00380_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4028 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00383.html │ │ │ --rw-r--r-- 0 root (0) root (0) 45490 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00383_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5992 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00386.html │ │ │ --rw-r--r-- 0 root (0) root (0) 246 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00386.js │ │ │ --rw-r--r-- 0 root (0) root (0) 85562 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00386_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5955 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00389.html │ │ │ --rw-r--r-- 0 root (0) root (0) 170 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00389.js │ │ │ --rw-r--r-- 0 root (0) root (0) 25202 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00389_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5883 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00395.html │ │ │ --rw-r--r-- 0 root (0) root (0) 319 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00395.js │ │ │ --rw-r--r-- 0 root (0) root (0) 20289 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00395_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6928 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00398.html │ │ │ --rw-r--r-- 0 root (0) root (0) 34176 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00398_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 11864 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00401.html │ │ │ --rw-r--r-- 0 root (0) root (0) 103855 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00401_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4379 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00404.html │ │ │ --rw-r--r-- 0 root (0) root (0) 55595 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00404_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 69497 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00326.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3593 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00326.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 301190 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00326_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3838 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00329.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 119473 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00329_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 12655 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00332.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 476 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00332.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 80370 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00332_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 14541 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00335.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 738 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00335.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 72858 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00335_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3803 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00338.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 112896 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00338_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 29340 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00341.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6073 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00341.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 97639 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00341_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 18989 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00344.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 136572 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00344_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 14006 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00347.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 37863 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00347_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4028 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00353.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 45490 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00353_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 49406 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00356.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5907 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00356.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 277066 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00356_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7673 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00359.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 14772 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00359_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 17849 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00362.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 476 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00362.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 156883 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00362_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 45967 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00365.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 177 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00365.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 507119 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00365_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 16003 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00368.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 870 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00368.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 306430 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00368_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4033 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00371.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 51558 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00371_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4379 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00374.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 55595 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00374_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6719 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00377.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 251 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00377.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 45891 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00377_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4803 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00380.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 208392 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00380_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7533 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00383.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 105 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00383.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 12985 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00383_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 36054 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00386.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 2024 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00386.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 141340 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00386_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 28964 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00389.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 485 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00389.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 359595 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00389_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4794 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00395.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 170360 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00395_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 16016 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00398.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 72002 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00398_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 11336 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00401.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 15843 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00401_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4803 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00404.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 64245 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00404_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 19115 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00407.html │ │ │ -rw-r--r-- 0 root (0) root (0) 612 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00407.js │ │ │ -rw-r--r-- 0 root (0) root (0) 396310 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00407_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 13629 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00410.html │ │ │ --rw-r--r-- 0 root (0) root (0) 934 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00410.js │ │ │ --rw-r--r-- 0 root (0) root (0) 193059 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00410_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 11063 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00413.html │ │ │ --rw-r--r-- 0 root (0) root (0) 389800 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00413_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7534 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00416.html │ │ │ --rw-r--r-- 0 root (0) root (0) 277 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00416.js │ │ │ --rw-r--r-- 0 root (0) root (0) 54129 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00416_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 12655 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00419.html │ │ │ --rw-r--r-- 0 root (0) root (0) 476 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00419.js │ │ │ --rw-r--r-- 0 root (0) root (0) 80370 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00419_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 17200 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00422.html │ │ │ --rw-r--r-- 0 root (0) root (0) 547 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00422.js │ │ │ --rw-r--r-- 0 root (0) root (0) 240448 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00422_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6744 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00425.html │ │ │ --rw-r--r-- 0 root (0) root (0) 323 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00425.js │ │ │ --rw-r--r-- 0 root (0) root (0) 26486 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00425_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4088 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00428.html │ │ │ --rw-r--r-- 0 root (0) root (0) 102 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00428.js │ │ │ --rw-r--r-- 0 root (0) root (0) 25048 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00428_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 17849 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00431.html │ │ │ --rw-r--r-- 0 root (0) root (0) 476 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00431.js │ │ │ --rw-r--r-- 0 root (0) root (0) 156883 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00431_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 22900 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00434.html │ │ │ --rw-r--r-- 0 root (0) root (0) 1256 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00434.js │ │ │ --rw-r--r-- 0 root (0) root (0) 191858 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00434_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 14541 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00437.html │ │ │ --rw-r--r-- 0 root (0) root (0) 738 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00437.js │ │ │ --rw-r--r-- 0 root (0) root (0) 72858 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00437_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 17335 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00440.html │ │ │ --rw-r--r-- 0 root (0) root (0) 547 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00440.js │ │ │ --rw-r--r-- 0 root (0) root (0) 229092 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00440_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 17947 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00443.html │ │ │ --rw-r--r-- 0 root (0) root (0) 547 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00443.js │ │ │ --rw-r--r-- 0 root (0) root (0) 262048 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00443_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 19132 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00446.html │ │ │ --rw-r--r-- 0 root (0) root (0) 547 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00446.js │ │ │ --rw-r--r-- 0 root (0) root (0) 339117 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00446_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 15854 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00449.html │ │ │ --rw-r--r-- 0 root (0) root (0) 917 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00449.js │ │ │ --rw-r--r-- 0 root (0) root (0) 415382 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00449_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 9388 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00452.html │ │ │ --rw-r--r-- 0 root (0) root (0) 103 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00452.js │ │ │ --rw-r--r-- 0 root (0) root (0) 54767 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00452_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 14157 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00455.html │ │ │ --rw-r--r-- 0 root (0) root (0) 165 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00455.js │ │ │ --rw-r--r-- 0 root (0) root (0) 44048 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00455_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 23754 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00461.html │ │ │ --rw-r--r-- 0 root (0) root (0) 942 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00461.js │ │ │ --rw-r--r-- 0 root (0) root (0) 95767 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00461_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 27518 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00464.html │ │ │ --rw-r--r-- 0 root (0) root (0) 310 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00464.js │ │ │ --rw-r--r-- 0 root (0) root (0) 274630 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00464_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 14537 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00467.html │ │ │ --rw-r--r-- 0 root (0) root (0) 781 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00467.js │ │ │ --rw-r--r-- 0 root (0) root (0) 444522 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00467_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 11083 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00470.html │ │ │ --rw-r--r-- 0 root (0) root (0) 320 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00470.js │ │ │ --rw-r--r-- 0 root (0) root (0) 49284 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00470_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7375 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00473.html │ │ │ --rw-r--r-- 0 root (0) root (0) 85 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00473.js │ │ │ --rw-r--r-- 0 root (0) root (0) 275062 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00473_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 121674 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00476.html │ │ │ --rw-r--r-- 0 root (0) root (0) 2070 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00476.js │ │ │ --rw-r--r-- 0 root (0) root (0) 378240 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00476_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 184258 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00479.html │ │ │ --rw-r--r-- 0 root (0) root (0) 10387 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00479.js │ │ │ --rw-r--r-- 0 root (0) root (0) 1019734 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00479_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6005 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00482.html │ │ │ --rw-r--r-- 0 root (0) root (0) 209 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00482.js │ │ │ --rw-r--r-- 0 root (0) root (0) 65176 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00482_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6719 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00485.html │ │ │ --rw-r--r-- 0 root (0) root (0) 251 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00485.js │ │ │ --rw-r--r-- 0 root (0) root (0) 45891 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00485_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 9355 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00488.html │ │ │ --rw-r--r-- 0 root (0) root (0) 284 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00488.js │ │ │ --rw-r--r-- 0 root (0) root (0) 143971 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00488_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6609 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00491.html │ │ │ --rw-r--r-- 0 root (0) root (0) 22121 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00491_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4803 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00494.html │ │ │ --rw-r--r-- 0 root (0) root (0) 64245 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00494_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 49406 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00497.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5907 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00497.js │ │ │ --rw-r--r-- 0 root (0) root (0) 277066 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00497_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4293 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00500.html │ │ │ --rw-r--r-- 0 root (0) root (0) 66764 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00500_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 28964 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00503.html │ │ │ --rw-r--r-- 0 root (0) root (0) 485 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00503.js │ │ │ --rw-r--r-- 0 root (0) root (0) 359595 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00503_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 36054 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00506.html │ │ │ --rw-r--r-- 0 root (0) root (0) 2024 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00506.js │ │ │ --rw-r--r-- 0 root (0) root (0) 141340 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00506_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4236 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00512.html │ │ │ --rw-r--r-- 0 root (0) root (0) 45162 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00512_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3839 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00515.html │ │ │ --rw-r--r-- 0 root (0) root (0) 93414 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00515_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4371 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00518.html │ │ │ --rw-r--r-- 0 root (0) root (0) 56561 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00518_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5564 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00521.html │ │ │ --rw-r--r-- 0 root (0) root (0) 96075 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00521_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4666 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00524.html │ │ │ --rw-r--r-- 0 root (0) root (0) 99462 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00524_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3843 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00527.html │ │ │ --rw-r--r-- 0 root (0) root (0) 43796 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00527_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8829 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00530.html │ │ │ --rw-r--r-- 0 root (0) root (0) 1714 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00530.js │ │ │ --rw-r--r-- 0 root (0) root (0) 63569 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00530_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3835 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00533.html │ │ │ --rw-r--r-- 0 root (0) root (0) 89382 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00533_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4335 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00536.html │ │ │ --rw-r--r-- 0 root (0) root (0) 47732 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00536_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 12317 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00539.html │ │ │ --rw-r--r-- 0 root (0) root (0) 2872 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00539.js │ │ │ --rw-r--r-- 0 root (0) root (0) 41543 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00539_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 29340 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00542.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6073 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00542.js │ │ │ --rw-r--r-- 0 root (0) root (0) 97639 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00542_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3803 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00545.html │ │ │ --rw-r--r-- 0 root (0) root (0) 112896 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00545_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 51413 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00548.html │ │ │ --rw-r--r-- 0 root (0) root (0) 2434 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00548.js │ │ │ --rw-r--r-- 0 root (0) root (0) 666928 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00548_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4935 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00551.html │ │ │ --rw-r--r-- 0 root (0) root (0) 76223 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00551_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 25988 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00554.html │ │ │ --rw-r--r-- 0 root (0) root (0) 163 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00554.js │ │ │ --rw-r--r-- 0 root (0) root (0) 125289 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00554_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3048 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00557.html │ │ │ --rw-r--r-- 0 root (0) root (0) 97381 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00557_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6974 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00560.html │ │ │ --rw-r--r-- 0 root (0) root (0) 392 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00560.js │ │ │ --rw-r--r-- 0 root (0) root (0) 38534 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00560_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 64766 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00563.html │ │ │ --rw-r--r-- 0 root (0) root (0) 905 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00563.js │ │ │ --rw-r--r-- 0 root (0) root (0) 164569 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00563_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 142431 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00566.html │ │ │ --rw-r--r-- 0 root (0) root (0) 598069 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00566_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 36029 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00569.html │ │ │ --rw-r--r-- 0 root (0) root (0) 103486 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00569_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 32097 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00572.html │ │ │ --rw-r--r-- 0 root (0) root (0) 2238 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00572.js │ │ │ --rw-r--r-- 0 root (0) root (0) 80107 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00572_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 66739 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00578.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5383 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00578.js │ │ │ --rw-r--r-- 0 root (0) root (0) 1255550 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00578_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7791 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00581.html │ │ │ --rw-r--r-- 0 root (0) root (0) 328 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00581.js │ │ │ --rw-r--r-- 0 root (0) root (0) 36054 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00581_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 66739 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00410.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5383 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00410.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 1255550 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00410_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6636 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00413.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 170 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00413.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 66118 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00413_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4088 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00416.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 102 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00416.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 25048 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00416_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 15702 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00419.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 622 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00419.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 43940 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00419_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 57853 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00422.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 2512 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00422.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 763929 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00422_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 14895 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00425.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 847 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00425.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 301738 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00425_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 15854 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00428.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 917 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00428.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 415382 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00428_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5409 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00431.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 20057 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00431_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 17200 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00434.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 547 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00434.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 240448 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00434_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3541 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00437.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 25492 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00437_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4236 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00440.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 45162 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00440_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4898 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00443.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 345681 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00443_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7865 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00446.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 263 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00446.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 167795 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00446_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3835 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00449.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 89382 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00449_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 173648 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00452.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 95486 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00452_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7454 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00455.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 54439 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00455_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 125056 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00458.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 111904 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00458_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4666 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00464.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 99462 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00464_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6316 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00467.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 75903 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00467_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7128 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00470.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 93 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00470.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 91984 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00470_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 10077 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00473.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 53230 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00473_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3520 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00476.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 15933 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00476_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8829 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00479.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 1714 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00479.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 63569 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00479_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7375 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00482.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 85 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00482.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 275062 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00482_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 13629 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00488.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 934 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00488.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 193059 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00488_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5883 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00491.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 319 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00491.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 20289 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00491_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 22900 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00494.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 1256 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00494.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 191858 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00494_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 36029 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00500.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 103486 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00500_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 64766 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00503.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 905 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00503.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 164569 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00503_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4293 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00506.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 66764 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00506_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 31398 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00509.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 1993 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00509.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 233117 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00509_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3990 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00512.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 37623 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00512_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6609 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00515.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 22121 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00515_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 23754 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00518.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 942 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00518.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 95767 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00518_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 27518 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00521.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 310 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00521.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 274630 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00521_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6386 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00527.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 171 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00527.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 24473 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00527_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3970 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00530.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 17381 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00530_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 35531 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00533.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 177 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00533.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 434328 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00533_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3020 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00536.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8434 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00536_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4371 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00539.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 56561 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00539_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 29471 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00542.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 774 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00542.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 176254 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00542_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6988 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00545.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 47139 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00545_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 29032 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00548.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 232562 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00548_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5944 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00551.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 93 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00551.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 93265 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00551_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7710 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00566.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 249600 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00566_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5684 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00569.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 186 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00569.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 34987 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00569_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9388 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00572.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 103 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00572.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 54767 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00572_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 11063 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00575.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 389800 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00575_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6928 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00578.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 34176 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00578_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4815 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00581.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 39453 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00581_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 11967 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00584.html │ │ │ -rw-r--r-- 0 root (0) root (0) 251 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00584.js │ │ │ -rw-r--r-- 0 root (0) root (0) 51266 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00584_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 36133 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00587.html │ │ │ -rw-r--r-- 0 root (0) root (0) 57920 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00587_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 9048 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00590.html │ │ │ --rw-r--r-- 0 root (0) root (0) 614 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00590.js │ │ │ --rw-r--r-- 0 root (0) root (0) 49403 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00590_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6988 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00593.html │ │ │ --rw-r--r-- 0 root (0) root (0) 47139 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00593_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3541 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00596.html │ │ │ --rw-r--r-- 0 root (0) root (0) 25492 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00596_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5944 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00599.html │ │ │ --rw-r--r-- 0 root (0) root (0) 93 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00599.js │ │ │ --rw-r--r-- 0 root (0) root (0) 93265 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00599_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6316 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00602.html │ │ │ --rw-r--r-- 0 root (0) root (0) 75903 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00602_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3044 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00608.html │ │ │ --rw-r--r-- 0 root (0) root (0) 34444 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00608_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 15702 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00611.html │ │ │ --rw-r--r-- 0 root (0) root (0) 622 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00611.js │ │ │ --rw-r--r-- 0 root (0) root (0) 43940 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00611_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7454 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00614.html │ │ │ --rw-r--r-- 0 root (0) root (0) 54439 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00614_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3520 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00617.html │ │ │ --rw-r--r-- 0 root (0) root (0) 15933 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00617_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3022 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00620.html │ │ │ --rw-r--r-- 0 root (0) root (0) 141584 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00620_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4023 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00623.html │ │ │ --rw-r--r-- 0 root (0) root (0) 49881 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00623_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 15131 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00626.html │ │ │ --rw-r--r-- 0 root (0) root (0) 1207 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00626.js │ │ │ --rw-r--r-- 0 root (0) root (0) 44458 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00626_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4898 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00629.html │ │ │ --rw-r--r-- 0 root (0) root (0) 345681 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00629_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5136 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00590.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 141 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00590.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 165652 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00590_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3022 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00593.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 141584 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00593_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4023 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00596.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 49881 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00596_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5564 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00599.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 96075 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00599_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 10210 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00602.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 319 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00602.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 207731 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00602_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 14537 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00605.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 781 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00605.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 444522 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00605_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 13839 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00608.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 20203 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00608_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 17947 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00611.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 547 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00611.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 262048 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00611_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9048 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00614.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 614 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00614.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 49403 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00614_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6744 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00617.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 323 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00617.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 26486 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00617_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 19132 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00620.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 547 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00620.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 339117 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00620_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4978 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00623.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 108712 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00623_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6136 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00626.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 556 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00626.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 154140 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00626_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3048 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00629.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 97381 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00629_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 7532 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00632.html │ │ │ -rw-r--r-- 0 root (0) root (0) 312 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00632.js │ │ │ -rw-r--r-- 0 root (0) root (0) 411937 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00632_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7710 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00635.html │ │ │ --rw-r--r-- 0 root (0) root (0) 249600 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00635_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 27105 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00638.html │ │ │ --rw-r--r-- 0 root (0) root (0) 1319 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00638.js │ │ │ --rw-r--r-- 0 root (0) root (0) 584859 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00638_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 12563 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00641.html │ │ │ --rw-r--r-- 0 root (0) root (0) 128229 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00641_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6636 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00644.html │ │ │ --rw-r--r-- 0 root (0) root (0) 170 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00644.js │ │ │ --rw-r--r-- 0 root (0) root (0) 66118 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00644_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5136 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00647.html │ │ │ --rw-r--r-- 0 root (0) root (0) 141 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00647.js │ │ │ --rw-r--r-- 0 root (0) root (0) 165652 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00647_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5940 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00650.html │ │ │ --rw-r--r-- 0 root (0) root (0) 125856 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00650_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 29471 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00653.html │ │ │ --rw-r--r-- 0 root (0) root (0) 774 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00653.js │ │ │ --rw-r--r-- 0 root (0) root (0) 176254 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00653_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7664 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00656.html │ │ │ --rw-r--r-- 0 root (0) root (0) 162 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00656.js │ │ │ --rw-r--r-- 0 root (0) root (0) 235085 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00656_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 31398 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00659.html │ │ │ --rw-r--r-- 0 root (0) root (0) 1993 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00659.js │ │ │ --rw-r--r-- 0 root (0) root (0) 233117 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00659_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 11767 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00662.html │ │ │ --rw-r--r-- 0 root (0) root (0) 92 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00662.js │ │ │ --rw-r--r-- 0 root (0) root (0) 32561 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00662_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4043 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00665.html │ │ │ --rw-r--r-- 0 root (0) root (0) 50545 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00665_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3580 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00668.html │ │ │ --rw-r--r-- 0 root (0) root (0) 322420 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00668_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4033 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00674.html │ │ │ --rw-r--r-- 0 root (0) root (0) 51558 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00674_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3990 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00677.html │ │ │ --rw-r--r-- 0 root (0) root (0) 37623 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00677_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 10077 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00680.html │ │ │ --rw-r--r-- 0 root (0) root (0) 53230 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00680_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 13839 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00683.html │ │ │ --rw-r--r-- 0 root (0) root (0) 20203 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00683_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4803 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00686.html │ │ │ --rw-r--r-- 0 root (0) root (0) 208392 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00686_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7128 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00701.html │ │ │ --rw-r--r-- 0 root (0) root (0) 93 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00701.js │ │ │ --rw-r--r-- 0 root (0) root (0) 91984 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00701_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 16003 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00704.html │ │ │ --rw-r--r-- 0 root (0) root (0) 870 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00704.js │ │ │ --rw-r--r-- 0 root (0) root (0) 306430 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00704_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6300 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00707.html │ │ │ --rw-r--r-- 0 root (0) root (0) 13826 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00707_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3539 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00710.html │ │ │ --rw-r--r-- 0 root (0) root (0) 48518 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00710_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 29032 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00713.html │ │ │ --rw-r--r-- 0 root (0) root (0) 232562 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00713_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5851 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00716.html │ │ │ --rw-r--r-- 0 root (0) root (0) 83869 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00716_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5432 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00719.html │ │ │ --rw-r--r-- 0 root (0) root (0) 735621 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00719_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 11336 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00722.html │ │ │ --rw-r--r-- 0 root (0) root (0) 15843 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00722_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6136 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00725.html │ │ │ --rw-r--r-- 0 root (0) root (0) 556 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00725.js │ │ │ --rw-r--r-- 0 root (0) root (0) 154140 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00725_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 69497 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00728.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3593 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00728.js │ │ │ --rw-r--r-- 0 root (0) root (0) 301190 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00728_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5409 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00731.html │ │ │ --rw-r--r-- 0 root (0) root (0) 20057 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00731_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7865 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00734.html │ │ │ --rw-r--r-- 0 root (0) root (0) 263 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00734.js │ │ │ --rw-r--r-- 0 root (0) root (0) 167795 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00734_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3020 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00737.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8434 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00737_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 18989 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00740.html │ │ │ --rw-r--r-- 0 root (0) root (0) 136572 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00740_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 10210 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00743.html │ │ │ --rw-r--r-- 0 root (0) root (0) 319 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00743.js │ │ │ --rw-r--r-- 0 root (0) root (0) 207731 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00743_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 57853 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00746.html │ │ │ --rw-r--r-- 0 root (0) root (0) 2512 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00746.js │ │ │ --rw-r--r-- 0 root (0) root (0) 763929 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00746_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4815 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00749.html │ │ │ --rw-r--r-- 0 root (0) root (0) 39453 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00749_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4978 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00752.html │ │ │ --rw-r--r-- 0 root (0) root (0) 108712 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00752_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 16016 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00755.html │ │ │ --rw-r--r-- 0 root (0) root (0) 72002 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00755_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 51413 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00635.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 2434 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00635.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 666928 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00635_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4335 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00638.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 47732 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00638_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5010 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00641.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 12015 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00641_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4043 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00644.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 50545 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00644_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5432 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00650.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 735621 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00650_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6974 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00653.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 392 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00653.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 38534 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00653_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 25988 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00656.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 163 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00656.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 125289 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00656_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 11083 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00659.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 320 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00659.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 49284 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00659_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5955 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00662.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 170 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00662.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 25202 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00662_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3499 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00665.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 61501 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00665_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6748 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00668.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 272 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00668.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 52668 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00668_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5662 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00671.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 61320 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00671_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7791 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00674.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 328 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00674.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 36054 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00674_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 27105 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00677.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 1319 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00677.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 584859 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00677_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 14157 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00680.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 165 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00680.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 44048 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00680_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3044 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00683.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 34444 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00683_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5851 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00686.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 83869 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00686_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3843 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00689.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 43796 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00689_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6300 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00692.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 13826 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00692_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 184258 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00695.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 10387 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00695.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 1019734 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00695_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 12317 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00698.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 2872 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00698.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 41543 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00698_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4935 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00701.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 76223 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00701_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 121674 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00704.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 2070 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00704.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 378240 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00704_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 11767 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00707.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 92 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00707.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 32561 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00707_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 17580 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00710.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 423 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00710.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 49024 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00710_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7534 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00713.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 277 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00713.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 54129 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00713_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5992 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00716.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 246 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00716.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 85562 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00716_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3536 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00719.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 21942 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00719_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3544 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00722.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 11952 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00722_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 11864 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00725.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 103855 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00725_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 17335 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00728.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 547 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00728.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 229092 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00728_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 142431 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00731.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 598069 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00731_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3839 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00734.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 93414 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00734_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 35893 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00737_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7664 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00740.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 162 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00740.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 235085 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00740_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5940 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00743.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 125856 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00743_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 32097 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00746.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 2238 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00746.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 80107 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00746_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9355 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00749.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 284 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00749.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 143971 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00749_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3539 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00752.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 48518 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00752_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 16900 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00758.html │ │ │ -rw-r--r-- 0 root (0) root (0) 73507 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00758_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3499 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00761.html │ │ │ --rw-r--r-- 0 root (0) root (0) 61501 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00761_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 14895 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00764.html │ │ │ --rw-r--r-- 0 root (0) root (0) 847 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00764.js │ │ │ --rw-r--r-- 0 root (0) root (0) 301738 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00764_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5662 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00767.html │ │ │ --rw-r--r-- 0 root (0) root (0) 61320 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00767_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3536 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00770.html │ │ │ --rw-r--r-- 0 root (0) root (0) 21942 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00770_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6386 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00776.html │ │ │ --rw-r--r-- 0 root (0) root (0) 171 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00776.js │ │ │ --rw-r--r-- 0 root (0) root (0) 24473 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00776_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 128552 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00782_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 128546 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00785_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 43804 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00788_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 26768 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00791_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 327711 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00794.html │ │ │ --rw-r--r-- 0 root (0) root (0) 335303 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00794_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 2859 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00797_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3640 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00800.html │ │ │ --rw-r--r-- 0 root (0) root (0) 15799 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00800_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3656 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00803.html │ │ │ --rw-r--r-- 0 root (0) root (0) 29163 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00803_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4324 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00809.html │ │ │ --rw-r--r-- 0 root (0) root (0) 21530 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00809_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7518 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00812.html │ │ │ --rw-r--r-- 0 root (0) root (0) 21411 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00812_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4782 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00815.html │ │ │ --rw-r--r-- 0 root (0) root (0) 10304 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00815_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 15131 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00761.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 1207 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00761.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 44458 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00761_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 12563 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00764.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 128229 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00764_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 11413 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00767.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 40865 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00767_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6525 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00770.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9558 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00770_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6005 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00773.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 209 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00773.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 65176 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00773_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3580 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00776.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 322420 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00776_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 23739 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00779.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 1414 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00779.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 240141 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00779_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3021 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00782.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 21597 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00782_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4117 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00785.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 64 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00785.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 14705 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00785_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6355 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00788.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 27936 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00788_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3120 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00791.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7891 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00791_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 26768 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00794_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4782 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00797.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 10304 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00797_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3033 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00800.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 13296 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00800_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 128552 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00803_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3021 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00806.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 40708 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00806_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 43804 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00809_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6735 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00812.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8869 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00812_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 3640 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00818.html │ │ │ --rw-r--r-- 0 root (0) root (0) 12703 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00818_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3629 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00821.html │ │ │ --rw-r--r-- 0 root (0) root (0) 24801 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00821_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3632 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00824.html │ │ │ --rw-r--r-- 0 root (0) root (0) 35368 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00824_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3021 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00827.html │ │ │ --rw-r--r-- 0 root (0) root (0) 21597 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00827_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3033 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00830.html │ │ │ --rw-r--r-- 0 root (0) root (0) 13296 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00830_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3021 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00833.html │ │ │ --rw-r--r-- 0 root (0) root (0) 40708 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00833_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6355 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00836.html │ │ │ --rw-r--r-- 0 root (0) root (0) 27936 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00836_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3120 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00839.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7891 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00839_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 13873 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00842.html │ │ │ --rw-r--r-- 0 root (0) root (0) 11749 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00842_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6735 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00845.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8869 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00845_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5514 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00848.html │ │ │ --rw-r--r-- 0 root (0) root (0) 14078 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00848_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3640 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00851.html │ │ │ --rw-r--r-- 0 root (0) root (0) 18935 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00851_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4117 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00854.html │ │ │ --rw-r--r-- 0 root (0) root (0) 64 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00854.js │ │ │ --rw-r--r-- 0 root (0) root (0) 14705 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00854_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 15799 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00818_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 13873 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00821.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 11749 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00821_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4324 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00824.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 21530 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00824_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5514 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00827.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 14078 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00827_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3629 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00830.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 24801 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00830_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7518 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00833.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 21411 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00833_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3656 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00836.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 29163 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00836_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 327711 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00839.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 335303 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00839_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3640 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00842.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 12703 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00842_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3640 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00845.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 18935 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00845_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3632 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00848.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 35368 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00848_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 128546 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00851_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 2859 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00854_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 4162 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00857.html │ │ │ -rw-r--r-- 0 root (0) root (0) 27344 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00857_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6122 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00860.html │ │ │ --rw-r--r-- 0 root (0) root (0) 166 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00860.js │ │ │ --rw-r--r-- 0 root (0) root (0) 35733 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00860_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4302 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00860.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 74 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00860.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 66144 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00860_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 3036 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00863.html │ │ │ -rw-r--r-- 0 root (0) root (0) 12461 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00863_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4302 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00866.html │ │ │ --rw-r--r-- 0 root (0) root (0) 74 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00866.js │ │ │ --rw-r--r-- 0 root (0) root (0) 66144 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00866_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6122 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00866.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 166 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00866.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 35733 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00866_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 11126 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00869.html │ │ │ -rw-r--r-- 0 root (0) root (0) 75701 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00869_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 11086 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00872.html │ │ │ -rw-r--r-- 0 root (0) root (0) 72461 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00872_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 4136 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00875.html │ │ │ -rw-r--r-- 0 root (0) root (0) 31990 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00875_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 18848 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00878.html │ │ │ --rw-r--r-- 0 root (0) root (0) 96 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00878.js │ │ │ --rw-r--r-- 0 root (0) root (0) 124906 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00878_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4917 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00881.html │ │ │ --rw-r--r-- 0 root (0) root (0) 19934 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00881_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4044 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00884.html │ │ │ --rw-r--r-- 0 root (0) root (0) 105 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00884.js │ │ │ --rw-r--r-- 0 root (0) root (0) 34608 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00884_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4302 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00887.html │ │ │ --rw-r--r-- 0 root (0) root (0) 171 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00887.js │ │ │ --rw-r--r-- 0 root (0) root (0) 41308 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00887_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4829 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00890.html │ │ │ --rw-r--r-- 0 root (0) root (0) 33841 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00890_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5184 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00893.html │ │ │ --rw-r--r-- 0 root (0) root (0) 381 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00893.js │ │ │ --rw-r--r-- 0 root (0) root (0) 31340 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00893_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4877 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00896.html │ │ │ --rw-r--r-- 0 root (0) root (0) 18537 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00896_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8327 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00899.html │ │ │ --rw-r--r-- 0 root (0) root (0) 190 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00899.js │ │ │ --rw-r--r-- 0 root (0) root (0) 98571 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00899_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 28489 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00902.html │ │ │ --rw-r--r-- 0 root (0) root (0) 89477 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00902_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5184 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00878.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 381 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00878.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 31340 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00878_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8699 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00881.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 90521 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00881_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4041 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00884.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 138 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00884.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 26251 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00884_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 19673 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00887.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 106 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00887.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 131952 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00887_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 72729 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00890.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 1364 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00890.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 90059 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00890_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4829 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00893.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 33841 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00893_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8327 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00896.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 190 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00896.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 98571 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00896_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4302 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00899.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 171 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00899.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 41308 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00899_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4877 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00902.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 18537 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00902_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 16183 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00905.html │ │ │ -rw-r--r-- 0 root (0) root (0) 347 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00905.js │ │ │ -rw-r--r-- 0 root (0) root (0) 197679 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00905_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4041 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00908.html │ │ │ --rw-r--r-- 0 root (0) root (0) 138 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00908.js │ │ │ --rw-r--r-- 0 root (0) root (0) 26251 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00908_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4954 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00911.html │ │ │ --rw-r--r-- 0 root (0) root (0) 241 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00911.js │ │ │ --rw-r--r-- 0 root (0) root (0) 64151 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00911_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 18983 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00914.html │ │ │ --rw-r--r-- 0 root (0) root (0) 101 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00914.js │ │ │ --rw-r--r-- 0 root (0) root (0) 123559 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00914_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 19673 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00917.html │ │ │ --rw-r--r-- 0 root (0) root (0) 106 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00917.js │ │ │ --rw-r--r-- 0 root (0) root (0) 131952 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00917_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 19538 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00920.html │ │ │ --rw-r--r-- 0 root (0) root (0) 101 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00920.js │ │ │ --rw-r--r-- 0 root (0) root (0) 153921 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00920_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 72729 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00923.html │ │ │ --rw-r--r-- 0 root (0) root (0) 1364 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00923.js │ │ │ --rw-r--r-- 0 root (0) root (0) 90059 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00923_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 21820 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00926.html │ │ │ --rw-r--r-- 0 root (0) root (0) 1318 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00926.js │ │ │ --rw-r--r-- 0 root (0) root (0) 62458 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00926_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 25461 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00929.html │ │ │ --rw-r--r-- 0 root (0) root (0) 196 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00929.js │ │ │ --rw-r--r-- 0 root (0) root (0) 81785 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00929_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8699 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00932.html │ │ │ --rw-r--r-- 0 root (0) root (0) 90521 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00932_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 37586 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00935.html │ │ │ --rw-r--r-- 0 root (0) root (0) 26076 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00935_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 10640 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00938.html │ │ │ --rw-r--r-- 0 root (0) root (0) 13310 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00938_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 10640 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00908.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 13310 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00908_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 18848 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00911.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 96 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00911.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 124906 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00911_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 25461 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00914.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 196 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00914.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 81785 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00914_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4044 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00917.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 105 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00917.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 34608 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00917_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4917 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00920.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 19934 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00920_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4954 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00923.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 241 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00923.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 64151 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00923_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 28489 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00926.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 89477 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00926_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 37586 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00929.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 26076 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00929_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 18983 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00932.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 101 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00932.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 123559 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00932_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 21820 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00935.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 1318 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00935.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 62458 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00935_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 19538 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00938.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 101 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00938.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 153921 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00938_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 5298 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00941.html │ │ │ -rw-r--r-- 0 root (0) root (0) 14392 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00941_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 50444 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00944.html │ │ │ -rw-r--r-- 0 root (0) root (0) 374547 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00944_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 14274 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00947.html │ │ │ -rw-r--r-- 0 root (0) root (0) 135009 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00947_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6663 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00950.html │ │ │ --rw-r--r-- 0 root (0) root (0) 203 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00950.js │ │ │ --rw-r--r-- 0 root (0) root (0) 58187 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00950_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5135 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00953.html │ │ │ --rw-r--r-- 0 root (0) root (0) 194 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00953.js │ │ │ --rw-r--r-- 0 root (0) root (0) 34463 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00953_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 10552 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00956.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3298 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00956.js │ │ │ --rw-r--r-- 0 root (0) root (0) 34833 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00956_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8894 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00959.html │ │ │ --rw-r--r-- 0 root (0) root (0) 1255 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00959.js │ │ │ --rw-r--r-- 0 root (0) root (0) 44167 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00959_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 9694 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00962.html │ │ │ --rw-r--r-- 0 root (0) root (0) 590 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00962.js │ │ │ --rw-r--r-- 0 root (0) root (0) 48961 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00962_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8442 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00965.html │ │ │ --rw-r--r-- 0 root (0) root (0) 172 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00965.js │ │ │ --rw-r--r-- 0 root (0) root (0) 91723 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00965_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8298 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00968.html │ │ │ --rw-r--r-- 0 root (0) root (0) 79321 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00968_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5109 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00971.html │ │ │ --rw-r--r-- 0 root (0) root (0) 181 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00971.js │ │ │ --rw-r--r-- 0 root (0) root (0) 32010 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00971_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 9518 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00974.html │ │ │ --rw-r--r-- 0 root (0) root (0) 836 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00974.js │ │ │ --rw-r--r-- 0 root (0) root (0) 114861 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00974_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4035 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00977.html │ │ │ --rw-r--r-- 0 root (0) root (0) 82 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00977.js │ │ │ --rw-r--r-- 0 root (0) root (0) 26180 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00977_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6308 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00980.html │ │ │ --rw-r--r-- 0 root (0) root (0) 286 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00980.js │ │ │ --rw-r--r-- 0 root (0) root (0) 36292 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00980_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5379 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00983.html │ │ │ --rw-r--r-- 0 root (0) root (0) 193 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00983.js │ │ │ --rw-r--r-- 0 root (0) root (0) 35924 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00983_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7300 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00986.html │ │ │ --rw-r--r-- 0 root (0) root (0) 366 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00986.js │ │ │ --rw-r--r-- 0 root (0) root (0) 79607 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00986_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6163 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00989.html │ │ │ --rw-r--r-- 0 root (0) root (0) 299 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00989.js │ │ │ --rw-r--r-- 0 root (0) root (0) 44128 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00989_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3005 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00992.html │ │ │ --rw-r--r-- 0 root (0) root (0) 10443 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00992_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4629 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00995.html │ │ │ --rw-r--r-- 0 root (0) root (0) 119 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00995.js │ │ │ --rw-r--r-- 0 root (0) root (0) 26868 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00995_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4696 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00998.html │ │ │ --rw-r--r-- 0 root (0) root (0) 132 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00998.js │ │ │ --rw-r--r-- 0 root (0) root (0) 22961 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00998_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4638 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01001.html │ │ │ --rw-r--r-- 0 root (0) root (0) 125 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01001.js │ │ │ --rw-r--r-- 0 root (0) root (0) 22831 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01001_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 38827 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01004.html │ │ │ --rw-r--r-- 0 root (0) root (0) 40828 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01004_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7825 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01007.html │ │ │ --rw-r--r-- 0 root (0) root (0) 790 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01007.js │ │ │ --rw-r--r-- 0 root (0) root (0) 98377 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01007_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 37409 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01010.html │ │ │ --rw-r--r-- 0 root (0) root (0) 2542 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01010.js │ │ │ --rw-r--r-- 0 root (0) root (0) 354247 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01010_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7825 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01013.html │ │ │ --rw-r--r-- 0 root (0) root (0) 371 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01013.js │ │ │ --rw-r--r-- 0 root (0) root (0) 104271 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01013_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7951 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01016.html │ │ │ --rw-r--r-- 0 root (0) root (0) 455 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01016.js │ │ │ --rw-r--r-- 0 root (0) root (0) 48661 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01016_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8183 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01019.html │ │ │ --rw-r--r-- 0 root (0) root (0) 1311 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01019.js │ │ │ --rw-r--r-- 0 root (0) root (0) 177199 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01019_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5960 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01022.html │ │ │ --rw-r--r-- 0 root (0) root (0) 258 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01022.js │ │ │ --rw-r--r-- 0 root (0) root (0) 32975 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01022_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4420 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01025.html │ │ │ --rw-r--r-- 0 root (0) root (0) 248 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01025.js │ │ │ --rw-r--r-- 0 root (0) root (0) 37044 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01025_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 9675 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01028.html │ │ │ --rw-r--r-- 0 root (0) root (0) 1564 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01028.js │ │ │ --rw-r--r-- 0 root (0) root (0) 79303 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01028_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4899 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01031.html │ │ │ --rw-r--r-- 0 root (0) root (0) 116 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01031.js │ │ │ --rw-r--r-- 0 root (0) root (0) 24126 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01031_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5283 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01034.html │ │ │ --rw-r--r-- 0 root (0) root (0) 399 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01034.js │ │ │ --rw-r--r-- 0 root (0) root (0) 43145 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01034_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7090 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01037.html │ │ │ --rw-r--r-- 0 root (0) root (0) 344 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01037.js │ │ │ --rw-r--r-- 0 root (0) root (0) 71376 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01037_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 14310 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01040.html │ │ │ --rw-r--r-- 0 root (0) root (0) 849 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01040.js │ │ │ --rw-r--r-- 0 root (0) root (0) 19523 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01040_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 14310 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00950.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 849 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00950.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 19523 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00950_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9694 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00953.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 590 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00953.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 48961 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00953_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5379 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00956.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 193 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00956.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 35924 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00956_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4638 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00959.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 125 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00959.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 22831 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00959_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 188779 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00962.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 165 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00962.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 440035 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00962_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 10552 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00965.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3298 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00965.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 34833 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00965_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9518 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00968.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 836 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00968.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 114861 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00968_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8298 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00971.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 79321 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00971_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4899 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00974.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 116 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00974.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 24126 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00974_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8183 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00977.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 1311 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00977.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 177199 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00977_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 10842 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00980.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 575 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00980.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 15208 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00980_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 38827 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00983.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 40828 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00983_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 41024 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00986.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 83898 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00986_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 13968 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00989.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 1422 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00989.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 88333 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00989_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9675 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00992.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 1564 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00992.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 79303 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00992_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7825 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00995.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 790 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00995.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 98377 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00995_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5135 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00998.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 194 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00998.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 34463 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a00998_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4370 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01001.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 94 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01001.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 14471 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01001_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8894 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01004.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 1255 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01004.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 44167 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01004_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5109 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01007.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 181 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01007.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 32010 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01007_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6308 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01010.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 286 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01010.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 36292 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01010_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5960 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01013.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 258 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01013.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 32975 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01013_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4035 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01016.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 82 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01016.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 26180 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01016_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8442 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01019.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 172 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01019.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 91723 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01019_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6663 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01022.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 203 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01022.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 58187 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01022_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3005 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01025.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 10443 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01025_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4420 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01028.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 248 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01028.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 37044 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01028_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7300 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01031.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 366 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01031.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 79607 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01031_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4696 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01034.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 132 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01034.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 22961 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01034_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7951 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01037.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 455 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01037.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 48661 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01037_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7974 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01040.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 436 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01040.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 96089 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01040_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 5271 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01043.html │ │ │ -rw-r--r-- 0 root (0) root (0) 186 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01043.js │ │ │ -rw-r--r-- 0 root (0) root (0) 18657 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01043_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 10842 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01046.html │ │ │ --rw-r--r-- 0 root (0) root (0) 575 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01046.js │ │ │ --rw-r--r-- 0 root (0) root (0) 15208 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01046_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4370 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01049.html │ │ │ --rw-r--r-- 0 root (0) root (0) 94 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01049.js │ │ │ --rw-r--r-- 0 root (0) root (0) 14471 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01049_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3048 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01052.html │ │ │ --rw-r--r-- 0 root (0) root (0) 9659 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01052_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 13968 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01055.html │ │ │ --rw-r--r-- 0 root (0) root (0) 1422 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01055.js │ │ │ --rw-r--r-- 0 root (0) root (0) 88333 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01055_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7974 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01058.html │ │ │ --rw-r--r-- 0 root (0) root (0) 436 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01058.js │ │ │ --rw-r--r-- 0 root (0) root (0) 96089 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01058_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 41024 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01061.html │ │ │ --rw-r--r-- 0 root (0) root (0) 83898 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01061_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 188779 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01064.html │ │ │ --rw-r--r-- 0 root (0) root (0) 165 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01064.js │ │ │ --rw-r--r-- 0 root (0) root (0) 440035 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01064_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6477 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01067.html │ │ │ --rw-r--r-- 0 root (0) root (0) 94 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01067.js │ │ │ --rw-r--r-- 0 root (0) root (0) 49646 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01067_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5030 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01070.html │ │ │ --rw-r--r-- 0 root (0) root (0) 44161 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01070_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6163 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01046.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 299 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01046.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 44128 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01046_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3048 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01049.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9659 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01049_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4629 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01052.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 119 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01052.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 26868 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01052_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5283 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01055.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 399 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01055.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 43145 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01055_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7825 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01058.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 371 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01058.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 104271 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01058_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7090 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01061.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 344 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01061.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 71376 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01061_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 37409 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01064.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 2542 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01064.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 354247 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01064_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5030 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01067.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 44161 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01067_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6477 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01070.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 94 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01070.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 49646 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01070_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 19204 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01073.html │ │ │ -rw-r--r-- 0 root (0) root (0) 71 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01073.js │ │ │ -rw-r--r-- 0 root (0) root (0) 39145 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01073_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 14951 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01076.html │ │ │ -rw-r--r-- 0 root (0) root (0) 799 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01076.js │ │ │ -rw-r--r-- 0 root (0) root (0) 151454 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01076_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 284529 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01079.html │ │ │ -rw-r--r-- 0 root (0) root (0) 286 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01079.js │ │ │ -rw-r--r-- 0 root (0) root (0) 66277 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01079_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 364537 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01082_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 936342 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01085_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 141282 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01088_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 27318 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01091_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 87636 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01094_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 255314 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01097_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 335598 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01100_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 56182 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01103_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 61513 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01106_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 483072 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01109_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 918149 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01112_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3083 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01118.html │ │ │ --rw-r--r-- 0 root (0) root (0) 13153 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01118_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 918149 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01085_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3083 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01088.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 13153 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01088_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 364537 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01091_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 141282 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01094_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 61513 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01097_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 87636 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01100_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 936342 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01103_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 27318 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01106_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 335598 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01109_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 483072 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01112_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 255314 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01115_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 56182 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01118_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 27273 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01121.html │ │ │ -rw-r--r-- 0 root (0) root (0) 70405 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01121_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 4661 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01124.html │ │ │ -rw-r--r-- 0 root (0) root (0) 13707 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01124_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3544 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01127.html │ │ │ --rw-r--r-- 0 root (0) root (0) 31680 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01127_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 10335 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01130.html │ │ │ --rw-r--r-- 0 root (0) root (0) 16782 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01130_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 12430 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01133.html │ │ │ --rw-r--r-- 0 root (0) root (0) 547 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01133.js │ │ │ --rw-r--r-- 0 root (0) root (0) 135545 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01133_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 38598 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01136.html │ │ │ --rw-r--r-- 0 root (0) root (0) 2420 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01136.js │ │ │ --rw-r--r-- 0 root (0) root (0) 584190 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01136_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3556 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01139.html │ │ │ --rw-r--r-- 0 root (0) root (0) 84852 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01139_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4081 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01142.html │ │ │ --rw-r--r-- 0 root (0) root (0) 103 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01142.js │ │ │ --rw-r--r-- 0 root (0) root (0) 114962 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01142_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5295 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01145.html │ │ │ --rw-r--r-- 0 root (0) root (0) 39057 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01145_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 65951 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01148.html │ │ │ --rw-r--r-- 0 root (0) root (0) 98 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01148.js │ │ │ --rw-r--r-- 0 root (0) root (0) 85609 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01148_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 16493 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01151.html │ │ │ --rw-r--r-- 0 root (0) root (0) 1207 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01151.js │ │ │ --rw-r--r-- 0 root (0) root (0) 171028 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01151_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5179 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01154.html │ │ │ --rw-r--r-- 0 root (0) root (0) 22803 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01154_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7965 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01157.html │ │ │ --rw-r--r-- 0 root (0) root (0) 251831 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01157_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5179 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01160.html │ │ │ --rw-r--r-- 0 root (0) root (0) 77 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01160.js │ │ │ --rw-r--r-- 0 root (0) root (0) 50907 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01160_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 28724 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01163.html │ │ │ --rw-r--r-- 0 root (0) root (0) 517 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01163.js │ │ │ --rw-r--r-- 0 root (0) root (0) 104515 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01163_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6361 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01166.html │ │ │ --rw-r--r-- 0 root (0) root (0) 184 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01166.js │ │ │ --rw-r--r-- 0 root (0) root (0) 37535 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01166_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8661 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01169.html │ │ │ --rw-r--r-- 0 root (0) root (0) 429 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01169.js │ │ │ --rw-r--r-- 0 root (0) root (0) 126095 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01169_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4028 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01172.html │ │ │ --rw-r--r-- 0 root (0) root (0) 37841 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01172_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4006 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01175.html │ │ │ --rw-r--r-- 0 root (0) root (0) 59834 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01175_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3981 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01178.html │ │ │ --rw-r--r-- 0 root (0) root (0) 33836 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01178_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5147 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01181.html │ │ │ --rw-r--r-- 0 root (0) root (0) 36564 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01181_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3962 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01184.html │ │ │ --rw-r--r-- 0 root (0) root (0) 85 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01184.js │ │ │ --rw-r--r-- 0 root (0) root (0) 14985 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01184_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3982 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01187.html │ │ │ --rw-r--r-- 0 root (0) root (0) 34634 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01187_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6307 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01190.html │ │ │ --rw-r--r-- 0 root (0) root (0) 73 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01190.js │ │ │ --rw-r--r-- 0 root (0) root (0) 47658 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01190_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6071 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01193.html │ │ │ --rw-r--r-- 0 root (0) root (0) 235 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01193.js │ │ │ --rw-r--r-- 0 root (0) root (0) 95717 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01193_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 9215 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01196.html │ │ │ --rw-r--r-- 0 root (0) root (0) 254 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01196.js │ │ │ --rw-r--r-- 0 root (0) root (0) 23602 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01196_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 11741 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01199.html │ │ │ --rw-r--r-- 0 root (0) root (0) 783 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01199.js │ │ │ --rw-r--r-- 0 root (0) root (0) 182527 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01199_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 9307 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01202.html │ │ │ --rw-r--r-- 0 root (0) root (0) 21266 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01202_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3467 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01205.html │ │ │ --rw-r--r-- 0 root (0) root (0) 22656 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01205_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 11430 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01208.html │ │ │ --rw-r--r-- 0 root (0) root (0) 382 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01208.js │ │ │ --rw-r--r-- 0 root (0) root (0) 75992 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01208_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7474 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01211.html │ │ │ --rw-r--r-- 0 root (0) root (0) 137 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01211.js │ │ │ --rw-r--r-- 0 root (0) root (0) 31698 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01211_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 16200 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01214.html │ │ │ --rw-r--r-- 0 root (0) root (0) 116 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01214.js │ │ │ --rw-r--r-- 0 root (0) root (0) 92000 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01214_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4070 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01217.html │ │ │ --rw-r--r-- 0 root (0) root (0) 31833 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01217_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4408 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01220.html │ │ │ --rw-r--r-- 0 root (0) root (0) 185 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01220.js │ │ │ --rw-r--r-- 0 root (0) root (0) 32559 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01220_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 27114 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01223.html │ │ │ --rw-r--r-- 0 root (0) root (0) 887 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01223.js │ │ │ --rw-r--r-- 0 root (0) root (0) 126105 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01223_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6803 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01226.html │ │ │ --rw-r--r-- 0 root (0) root (0) 19647 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01226_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 10190 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01229.html │ │ │ --rw-r--r-- 0 root (0) root (0) 173563 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01229_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7937 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01232.html │ │ │ --rw-r--r-- 0 root (0) root (0) 28137 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01232_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 10335 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01127.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 16782 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01127_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3982 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01130.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 34634 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01130_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6307 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01133.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 73 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01133.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 47658 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01133_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4028 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01136.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 37841 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01136_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 38598 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01139.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 2420 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01139.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 584190 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01139_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3544 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01142.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 31680 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01142_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6071 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01145.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 235 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01145.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 95717 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01145_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5179 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01148.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 77 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01148.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 50907 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01148_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3467 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01151.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 22656 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01151_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 11741 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01154.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 783 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01154.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 182527 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01154_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6361 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01157.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 184 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01157.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 37535 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01157_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 65951 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01160.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 98 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01160.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 85609 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01160_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5147 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01163.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 36564 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01163_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3962 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01166.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 85 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01166.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 14985 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01166_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3981 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01169.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 33836 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01169_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9307 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01172.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 21266 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01172_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 16493 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01175.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 1207 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01175.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 171028 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01175_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4081 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01178.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 103 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01178.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 114962 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01178_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8661 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01181.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 429 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01181.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 126095 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01181_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3556 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01184.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 84852 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01184_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5179 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01187.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 22803 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01187_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4006 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01190.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 59834 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01190_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7965 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01193.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 251831 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01193_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 28724 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01196.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 517 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01196.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 104515 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01196_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9215 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01199.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 254 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01199.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 23602 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01199_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 12430 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01202.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 547 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01202.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 135545 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01202_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5295 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01205.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 39057 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01205_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 10190 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01208.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 173563 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01208_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4408 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01211.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 185 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01211.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 32559 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01211_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 27114 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01214.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 887 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01214.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 126105 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01214_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6803 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01217.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 19647 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01217_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4070 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01220.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 31833 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01220_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 11430 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01223.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 382 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01223.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 75992 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01223_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 16200 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01226.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 116 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01226.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 92000 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01226_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7474 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01229.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 137 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01229.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 31698 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01229_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3131 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01232.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 54056 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01232_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 7664 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01235.html │ │ │ -rw-r--r-- 0 root (0) root (0) 41704 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01235_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3126 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01238.html │ │ │ --rw-r--r-- 0 root (0) root (0) 30501 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01238_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 9726 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01241.html │ │ │ --rw-r--r-- 0 root (0) root (0) 660 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01241.js │ │ │ --rw-r--r-- 0 root (0) root (0) 40270 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01241_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8375 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01244.html │ │ │ --rw-r--r-- 0 root (0) root (0) 549 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01244.js │ │ │ --rw-r--r-- 0 root (0) root (0) 31274 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01244_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3131 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01247.html │ │ │ --rw-r--r-- 0 root (0) root (0) 54056 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01247_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 23221 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01250.html │ │ │ --rw-r--r-- 0 root (0) root (0) 1823 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01250.js │ │ │ --rw-r--r-- 0 root (0) root (0) 80485 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01250_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4165 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01253.html │ │ │ --rw-r--r-- 0 root (0) root (0) 98 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01253.js │ │ │ --rw-r--r-- 0 root (0) root (0) 17088 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01253_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4280 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01262.html │ │ │ --rw-r--r-- 0 root (0) root (0) 89 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01262.js │ │ │ --rw-r--r-- 0 root (0) root (0) 39755 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01262_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4608 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01283.html │ │ │ --rw-r--r-- 0 root (0) root (0) 199 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01283.js │ │ │ --rw-r--r-- 0 root (0) root (0) 17471 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01283_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4934 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01286.html │ │ │ --rw-r--r-- 0 root (0) root (0) 308 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01286.js │ │ │ --rw-r--r-- 0 root (0) root (0) 18255 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01286_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 11063 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01301.html │ │ │ --rw-r--r-- 0 root (0) root (0) 57839 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01301_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4165 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01238.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 98 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01238.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 17088 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01238_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 23221 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01241.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 1823 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01241.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 80485 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01241_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3126 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01244.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 30501 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01244_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7937 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01247.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 28137 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01247_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9726 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01250.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 660 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01250.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 40270 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01250_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8375 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01253.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 549 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01253.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 31274 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01253_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4608 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01259.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 199 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01259.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 17471 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01259_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4280 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01268.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 89 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01268.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 39755 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01268_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 11063 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01274.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 57839 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01274_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4934 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01292.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 308 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01292.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 18255 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01292_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 6647 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01304.html │ │ │ -rw-r--r-- 0 root (0) root (0) 23865 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01304_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 10689 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01307.html │ │ │ -rw-r--r-- 0 root (0) root (0) 117 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01307.js │ │ │ -rw-r--r-- 0 root (0) root (0) 39097 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01307_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 9312 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01319.html │ │ │ --rw-r--r-- 0 root (0) root (0) 384 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01319.js │ │ │ --rw-r--r-- 0 root (0) root (0) 57562 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01319_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 10651 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01325.html │ │ │ --rw-r--r-- 0 root (0) root (0) 70322 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01325_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4329 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01328.html │ │ │ --rw-r--r-- 0 root (0) root (0) 112 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01328.js │ │ │ --rw-r--r-- 0 root (0) root (0) 14465 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01328_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4624 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01331.html │ │ │ --rw-r--r-- 0 root (0) root (0) 211 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01331.js │ │ │ --rw-r--r-- 0 root (0) root (0) 24143 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01331_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3274 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01334.html │ │ │ --rw-r--r-- 0 root (0) root (0) 12350 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01334_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3287 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01361.html │ │ │ --rw-r--r-- 0 root (0) root (0) 16040 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01361_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4367 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01379.html │ │ │ --rw-r--r-- 0 root (0) root (0) 98 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01379.js │ │ │ --rw-r--r-- 0 root (0) root (0) 16489 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01379_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3276 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01382.html │ │ │ --rw-r--r-- 0 root (0) root (0) 15815 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01382_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 11866 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01385.html │ │ │ --rw-r--r-- 0 root (0) root (0) 113754 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01385_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4632 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01388.html │ │ │ --rw-r--r-- 0 root (0) root (0) 199 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01388.js │ │ │ --rw-r--r-- 0 root (0) root (0) 22139 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01388_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4249 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01391.html │ │ │ --rw-r--r-- 0 root (0) root (0) 94 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01391.js │ │ │ --rw-r--r-- 0 root (0) root (0) 14863 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01391_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 10651 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01316.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 70322 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01316_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9312 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01322.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 384 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01322.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 57562 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01322_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4624 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01328.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 211 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01328.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 24143 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01328_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4329 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01331.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 112 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01331.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 14465 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01331_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3287 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01334.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 16040 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01334_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3274 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01346.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 12350 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01346_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 11866 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01361.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 113754 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01361_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4367 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01370.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 98 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01370.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 16489 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01370_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3276 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01385.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 15815 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01385_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4249 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01388.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 94 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01388.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 14863 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01388_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4632 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01391.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 199 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01391.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 22139 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01391_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 3293 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01394.html │ │ │ -rw-r--r-- 0 root (0) root (0) 15071 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01394_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 11890 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01397.html │ │ │ --rw-r--r-- 0 root (0) root (0) 117015 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01397_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3348 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01400.html │ │ │ --rw-r--r-- 0 root (0) root (0) 10402 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01400_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4270 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01403.html │ │ │ --rw-r--r-- 0 root (0) root (0) 85 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01403.js │ │ │ --rw-r--r-- 0 root (0) root (0) 18425 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01403_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4279 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01406.html │ │ │ --rw-r--r-- 0 root (0) root (0) 83 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01406.js │ │ │ --rw-r--r-- 0 root (0) root (0) 15315 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01406_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4273 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01409.html │ │ │ --rw-r--r-- 0 root (0) root (0) 86 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01409.js │ │ │ --rw-r--r-- 0 root (0) root (0) 17613 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01409_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4244 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01412.html │ │ │ --rw-r--r-- 0 root (0) root (0) 80 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01412.js │ │ │ --rw-r--r-- 0 root (0) root (0) 16044 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01412_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 9652 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01415.html │ │ │ --rw-r--r-- 0 root (0) root (0) 390 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01415.js │ │ │ --rw-r--r-- 0 root (0) root (0) 53098 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01415_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 14217 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01418.html │ │ │ --rw-r--r-- 0 root (0) root (0) 466 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01418.js │ │ │ --rw-r--r-- 0 root (0) root (0) 56889 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01418_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3260 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01421.html │ │ │ --rw-r--r-- 0 root (0) root (0) 11260 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01421_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4256 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01424.html │ │ │ --rw-r--r-- 0 root (0) root (0) 92 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01424.js │ │ │ --rw-r--r-- 0 root (0) root (0) 12813 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01424_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4317 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01427.html │ │ │ --rw-r--r-- 0 root (0) root (0) 105 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01427.js │ │ │ --rw-r--r-- 0 root (0) root (0) 15100 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01427_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3348 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01397.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 10402 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01397_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 11890 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01400.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 117015 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01400_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4244 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01403.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 80 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01403.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 16044 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01403_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 14217 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01406.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 466 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01406.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 56889 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01406_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4317 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01409.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 105 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01409.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 15100 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01409_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3248 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01412.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 11244 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01412_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3292 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01415.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 11908 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01415_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4256 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01418.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 92 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01418.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 12813 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01418_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3296 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01421.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 11921 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01421_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3260 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01424.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 11260 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01424_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4273 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01427.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 86 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01427.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 17613 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01427_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 4322 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01430.html │ │ │ -rw-r--r-- 0 root (0) root (0) 106 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01430.js │ │ │ -rw-r--r-- 0 root (0) root (0) 19361 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01430_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3248 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01433.html │ │ │ --rw-r--r-- 0 root (0) root (0) 11244 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01433_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3292 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01436.html │ │ │ --rw-r--r-- 0 root (0) root (0) 11908 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01436_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3296 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01439.html │ │ │ --rw-r--r-- 0 root (0) root (0) 11921 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01439_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6779 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01445.html │ │ │ --rw-r--r-- 0 root (0) root (0) 142 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01445.js │ │ │ --rw-r--r-- 0 root (0) root (0) 50895 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01445_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 9650 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01448.html │ │ │ --rw-r--r-- 0 root (0) root (0) 120 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01448.js │ │ │ --rw-r--r-- 0 root (0) root (0) 59795 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01448_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3791 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01451.html │ │ │ --rw-r--r-- 0 root (0) root (0) 12231 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01451_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4279 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01433.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 83 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01433.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 15315 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01433_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9652 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01436.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 390 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01436.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 53098 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01436_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4270 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01439.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 85 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01439.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 18425 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01439_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6779 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01442.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 142 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01442.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 50895 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01442_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3791 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01448.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 12231 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01448_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9650 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01451.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 120 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01451.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 59795 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01451_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 4302 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01454.html │ │ │ -rw-r--r-- 0 root (0) root (0) 85 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01454.js │ │ │ -rw-r--r-- 0 root (0) root (0) 18684 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01454_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 4645 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01457.html │ │ │ -rw-r--r-- 0 root (0) root (0) 189 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01457.js │ │ │ -rw-r--r-- 0 root (0) root (0) 17654 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01457_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 10173 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01460.html │ │ │ -rw-r--r-- 0 root (0) root (0) 155 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01460.js │ │ │ -rw-r--r-- 0 root (0) root (0) 89793 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01460_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 9133 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01463.html │ │ │ -rw-r--r-- 0 root (0) root (0) 34406 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01463_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3239 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01466.html │ │ │ --rw-r--r-- 0 root (0) root (0) 11592 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01466_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3234 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01466.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 37521 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01466_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 6775 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01469.html │ │ │ -rw-r--r-- 0 root (0) root (0) 118 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01469.js │ │ │ -rw-r--r-- 0 root (0) root (0) 35373 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01469_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3234 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01472.html │ │ │ --rw-r--r-- 0 root (0) root (0) 37521 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01472_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 16993 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01475.html │ │ │ --rw-r--r-- 0 root (0) root (0) 1411 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01475.js │ │ │ --rw-r--r-- 0 root (0) root (0) 219595 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01475_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 16993 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01472.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 1411 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01472.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 219595 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01472_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3239 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01475.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 11592 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01475_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 11089 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01478.html │ │ │ -rw-r--r-- 0 root (0) root (0) 96802 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01478_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 3258 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01481.html │ │ │ -rw-r--r-- 0 root (0) root (0) 68829 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01481_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 10927 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01484.html │ │ │ -rw-r--r-- 0 root (0) root (0) 42817 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01484_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4227 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01487.html │ │ │ --rw-r--r-- 0 root (0) root (0) 88 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01487.js │ │ │ --rw-r--r-- 0 root (0) root (0) 39386 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01487_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7707 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01490.html │ │ │ --rw-r--r-- 0 root (0) root (0) 32820 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01490_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4271 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01493.html │ │ │ --rw-r--r-- 0 root (0) root (0) 83 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01493.js │ │ │ --rw-r--r-- 0 root (0) root (0) 18309 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01493_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4295 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01496.html │ │ │ --rw-r--r-- 0 root (0) root (0) 86 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01496.js │ │ │ --rw-r--r-- 0 root (0) root (0) 35066 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01496_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4292 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01499.html │ │ │ --rw-r--r-- 0 root (0) root (0) 85 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01499.js │ │ │ --rw-r--r-- 0 root (0) root (0) 32564 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01499_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3304 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01502.html │ │ │ --rw-r--r-- 0 root (0) root (0) 35706 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01502_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3289 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01505.html │ │ │ --rw-r--r-- 0 root (0) root (0) 29876 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01505_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4432 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01508.html │ │ │ --rw-r--r-- 0 root (0) root (0) 128 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01508.js │ │ │ --rw-r--r-- 0 root (0) root (0) 18353 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01508_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7707 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01487.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 32820 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01487_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4227 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01490.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 88 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01490.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 39386 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01490_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4292 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01493.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 85 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01493.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 32564 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01493_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4271 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01496.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 83 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01496.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 18309 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01496_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4295 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01499.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 86 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01499.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 35066 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01499_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4432 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01502.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 128 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01502.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 18353 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01502_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3304 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01505.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 35706 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01505_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3289 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01508.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 29876 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01508_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 3317 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01511.html │ │ │ -rw-r--r-- 0 root (0) root (0) 45530 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01511_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3313 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01514.html │ │ │ --rw-r--r-- 0 root (0) root (0) 16432 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01514_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3365 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01517.html │ │ │ --rw-r--r-- 0 root (0) root (0) 33757 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01517_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 10969 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01520.html │ │ │ --rw-r--r-- 0 root (0) root (0) 47674 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01520_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3239 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01523.html │ │ │ --rw-r--r-- 0 root (0) root (0) 39985 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01523_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3365 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01514.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 33757 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01514_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3313 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01517.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 16432 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01517_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3239 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01520.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 39985 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01520_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 10969 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01523.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 47674 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01523_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 13096 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01526.html │ │ │ -rw-r--r-- 0 root (0) root (0) 55743 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01526_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 4346 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01529.html │ │ │ -rw-r--r-- 0 root (0) root (0) 130 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01529.js │ │ │ -rw-r--r-- 0 root (0) root (0) 13526 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01529_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6666 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01538.html │ │ │ --rw-r--r-- 0 root (0) root (0) 126 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01538.js │ │ │ --rw-r--r-- 0 root (0) root (0) 35189 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01538_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4341 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01538.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 129 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01538.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 14778 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01538_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 3353 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01541.html │ │ │ -rw-r--r-- 0 root (0) root (0) 17083 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01541_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4341 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01544.html │ │ │ --rw-r--r-- 0 root (0) root (0) 129 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01544.js │ │ │ --rw-r--r-- 0 root (0) root (0) 14778 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01544_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6666 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01544.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 126 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01544.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 35189 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01544_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 4299 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01547.html │ │ │ -rw-r--r-- 0 root (0) root (0) 90 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01547.js │ │ │ -rw-r--r-- 0 root (0) root (0) 17921 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01547_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 3310 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01550.html │ │ │ -rw-r--r-- 0 root (0) root (0) 24370 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01550_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 3414 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01553.html │ │ │ -rw-r--r-- 0 root (0) root (0) 23563 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/a01553_source.html │ │ │ @@ -8277,60 +8277,60 @@ │ │ │ -rw-r--r-- 0 root (0) root (0) 153 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/nav_f.png │ │ │ -rw-r--r-- 0 root (0) root (0) 169 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/nav_fd.png │ │ │ -rw-r--r-- 0 root (0) root (0) 95 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/nav_g.png │ │ │ -rw-r--r-- 0 root (0) root (0) 98 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/nav_h.png │ │ │ -rw-r--r-- 0 root (0) root (0) 114 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/nav_hd.png │ │ │ -rw-r--r-- 0 root (0) root (0) 2167 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/navtree.css │ │ │ -rw-r--r-- 0 root (0) root (0) 15935 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/navtree.js │ │ │ --rw-r--r-- 0 root (0) root (0) 5315 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/navtreedata.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 5308 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/navtreedata.js │ │ │ -rw-r--r-- 0 root (0) root (0) 11006 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/navtreeindex0.js │ │ │ --rw-r--r-- 0 root (0) root (0) 10177 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/navtreeindex1.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 11697 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/navtreeindex1.js │ │ │ -rw-r--r-- 0 root (0) root (0) 14231 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/navtreeindex10.js │ │ │ -rw-r--r-- 0 root (0) root (0) 15746 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/navtreeindex11.js │ │ │ -rw-r--r-- 0 root (0) root (0) 16611 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/navtreeindex12.js │ │ │ -rw-r--r-- 0 root (0) root (0) 13600 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/navtreeindex13.js │ │ │ -rw-r--r-- 0 root (0) root (0) 15164 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/navtreeindex14.js │ │ │ -rw-r--r-- 0 root (0) root (0) 14063 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/navtreeindex15.js │ │ │ -rw-r--r-- 0 root (0) root (0) 15202 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/navtreeindex16.js │ │ │ -rw-r--r-- 0 root (0) root (0) 15178 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/navtreeindex17.js │ │ │ -rw-r--r-- 0 root (0) root (0) 15171 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/navtreeindex18.js │ │ │ -rw-r--r-- 0 root (0) root (0) 15133 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/navtreeindex19.js │ │ │ --rw-r--r-- 0 root (0) root (0) 14654 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/navtreeindex2.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 11507 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/navtreeindex2.js │ │ │ -rw-r--r-- 0 root (0) root (0) 12914 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/navtreeindex20.js │ │ │ -rw-r--r-- 0 root (0) root (0) 10176 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/navtreeindex21.js │ │ │ -rw-r--r-- 0 root (0) root (0) 13880 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/navtreeindex22.js │ │ │ -rw-r--r-- 0 root (0) root (0) 15230 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/navtreeindex23.js │ │ │ -rw-r--r-- 0 root (0) root (0) 14042 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/navtreeindex24.js │ │ │ -rw-r--r-- 0 root (0) root (0) 14809 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/navtreeindex25.js │ │ │ -rw-r--r-- 0 root (0) root (0) 15082 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/navtreeindex26.js │ │ │ -rw-r--r-- 0 root (0) root (0) 14411 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/navtreeindex27.js │ │ │ -rw-r--r-- 0 root (0) root (0) 15317 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/navtreeindex28.js │ │ │ -rw-r--r-- 0 root (0) root (0) 14104 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/navtreeindex29.js │ │ │ --rw-r--r-- 0 root (0) root (0) 11271 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/navtreeindex3.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 12890 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/navtreeindex3.js │ │ │ -rw-r--r-- 0 root (0) root (0) 13207 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/navtreeindex30.js │ │ │ -rw-r--r-- 0 root (0) root (0) 14132 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/navtreeindex31.js │ │ │ -rw-r--r-- 0 root (0) root (0) 15017 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/navtreeindex32.js │ │ │ -rw-r--r-- 0 root (0) root (0) 15022 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/navtreeindex33.js │ │ │ -rw-r--r-- 0 root (0) root (0) 15382 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/navtreeindex34.js │ │ │ -rw-r--r-- 0 root (0) root (0) 13875 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/navtreeindex35.js │ │ │ -rw-r--r-- 0 root (0) root (0) 14851 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/navtreeindex36.js │ │ │ -rw-r--r-- 0 root (0) root (0) 12494 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/navtreeindex37.js │ │ │ -rw-r--r-- 0 root (0) root (0) 12311 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/navtreeindex38.js │ │ │ -rw-r--r-- 0 root (0) root (0) 13964 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/navtreeindex39.js │ │ │ --rw-r--r-- 0 root (0) root (0) 12081 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/navtreeindex4.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 12058 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/navtreeindex4.js │ │ │ -rw-r--r-- 0 root (0) root (0) 13423 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/navtreeindex40.js │ │ │ -rw-r--r-- 0 root (0) root (0) 12652 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/navtreeindex41.js │ │ │ -rw-r--r-- 0 root (0) root (0) 14215 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/navtreeindex42.js │ │ │ -rw-r--r-- 0 root (0) root (0) 11902 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/navtreeindex43.js │ │ │ -rw-r--r-- 0 root (0) root (0) 13527 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/navtreeindex44.js │ │ │ -rw-r--r-- 0 root (0) root (0) 10527 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/navtreeindex45.js │ │ │ -rw-r--r-- 0 root (0) root (0) 8527 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/navtreeindex46.js │ │ │ -rw-r--r-- 0 root (0) root (0) 9457 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/navtreeindex47.js │ │ │ -rw-r--r-- 0 root (0) root (0) 4947 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/navtreeindex48.js │ │ │ --rw-r--r-- 0 root (0) root (0) 10469 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/navtreeindex5.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 10500 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/navtreeindex5.js │ │ │ -rw-r--r-- 0 root (0) root (0) 11574 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/navtreeindex6.js │ │ │ -rw-r--r-- 0 root (0) root (0) 14987 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/navtreeindex7.js │ │ │ -rw-r--r-- 0 root (0) root (0) 14946 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/navtreeindex8.js │ │ │ -rw-r--r-- 0 root (0) root (0) 14561 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/navtreeindex9.js │ │ │ -rw-r--r-- 0 root (0) root (0) 123 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/open.png │ │ │ -rw-r--r-- 0 root (0) root (0) 2935 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/pages.html │ │ │ -rw-r--r-- 0 root (0) root (0) 696 2025-09-12 13:43:35.000000 ./usr/share/doc/gcc-12-base/libstdc++/user/plus.svg │ │ ├── ./usr/share/doc/gcc-12-base/libstdc++/user/_formulas.log │ │ │ @@ -1,8 +1,8 @@ │ │ │ -This is pdfTeX, Version 3.141592653-2.6-1.40.28 (TeX Live 2025/Debian) (preloaded format=latex 2025.9.12) 12 SEP 2025 18:40 │ │ │ +This is pdfTeX, Version 3.141592653-2.6-1.40.28 (TeX Live 2025/Debian) (preloaded format=latex 2025.10.3) 3 OCT 2025 21:41 │ │ │ entering extended mode │ │ │ restricted \write18 enabled. │ │ │ %&-line parsing enabled. │ │ │ **_formulas │ │ │ (./_formulas.tex │ │ │ LaTeX2e <2025-06-01> patch level 1 │ │ │ L3 programming layer <2025-07-19> │ │ ├── ./usr/share/doc/gcc-12-base/libstdc++/user/_formulas_dark.log │ │ │ @@ -1,8 +1,8 @@ │ │ │ -This is pdfTeX, Version 3.141592653-2.6-1.40.28 (TeX Live 2025/Debian) (preloaded format=latex 2025.9.12) 12 SEP 2025 18:40 │ │ │ +This is pdfTeX, Version 3.141592653-2.6-1.40.28 (TeX Live 2025/Debian) (preloaded format=latex 2025.10.3) 3 OCT 2025 21:41 │ │ │ entering extended mode │ │ │ restricted \write18 enabled. │ │ │ %&-line parsing enabled. │ │ │ **_formulas_dark │ │ │ (./_formulas_dark.tex │ │ │ LaTeX2e <2025-06-01> patch level 1 │ │ │ L3 programming layer <2025-07-19> │ │ ├── ./usr/share/doc/gcc-12-base/libstdc++/user/a00002.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: stdlib.h File Reference │ │ │ +libstdc++: fenv.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -45,27 +45,27 @@ │ │ │ │ │ │
│ │ │
│ │ │ -
stdlib.h File Reference
│ │ │ +
fenv.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │

Go to the source code of this file.

│ │ │

Detailed Description

│ │ │

This is a Standard C++ Library header.

│ │ │ │ │ │ -

Definition in file stdlib.h.

│ │ │ +

Definition in file fenv.h.

│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,8 +1,8 @@ │ │ │ │ libstdc++ │ │ │ │ -stdlib.h File Reference │ │ │ │ +fenv.h File Reference │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ This is a Standard C++ Library header. │ │ │ │ -Definition in file _s_t_d_l_i_b_._h. │ │ │ │ - * _s_t_d_l_i_b_._h │ │ │ │ +Definition in file _f_e_n_v_._h. │ │ │ │ + * _f_e_n_v_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-12-base/libstdc++/user/a00002_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: stdlib.h Source File │ │ │ +libstdc++: fenv.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -45,20 +45,20 @@ │ │ │ │ │ │
│ │ │
│ │ │ -
stdlib.h
│ │ │ +
fenv.h
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1// -*- C++ -*- compatibility header.
│ │ │
2
│ │ │ -
3// Copyright (C) 2002-2022 Free Software Foundation, Inc.
│ │ │ +
3// Copyright (C) 2007-2022 Free Software Foundation, Inc.
│ │ │
4//
│ │ │
5// This file is part of the GNU ISO C++ Library. This library is free
│ │ │
6// software; you can redistribute it and/or modify it under the
│ │ │
7// terms of the GNU General Public License as published by the
│ │ │
8// Free Software Foundation; either version 3, or (at your option)
│ │ │
9// any later version.
│ │ │
10
│ │ │ @@ -72,83 +72,77 @@ │ │ │
18// 3.1, as published by the Free Software Foundation.
│ │ │
19
│ │ │
20// You should have received a copy of the GNU General Public License and
│ │ │
21// a copy of the GCC Runtime Library Exception along with this program;
│ │ │
22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
│ │ │
23// <http://www.gnu.org/licenses/>.
│ │ │
24
│ │ │ -
25/** @file stdlib.h
│ │ │ +
25/** @file fenv.h
│ │ │
26 * This is a Standard C++ Library header.
│ │ │
27 */
│ │ │
28
│ │ │ -
29#if !defined __cplusplus || defined _GLIBCXX_INCLUDE_NEXT_C_HEADERS
│ │ │ -
30# include_next <stdlib.h>
│ │ │ -
31#else
│ │ │ -
32
│ │ │ -
33#ifndef _GLIBCXX_STDLIB_H
│ │ │ -
34#define _GLIBCXX_STDLIB_H 1
│ │ │ -
35
│ │ │ -
36# include <cstdlib>
│ │ │ -
37
│ │ │ -
38using std::abort;
│ │ │ -
39using std::atexit;
│ │ │ -
40using std::exit;
│ │ │ -
41#if __cplusplus >= 201103L
│ │ │ -
42# ifdef _GLIBCXX_HAVE_AT_QUICK_EXIT
│ │ │ - │ │ │ -
44# endif
│ │ │ -
45# ifdef _GLIBCXX_HAVE_QUICK_EXIT
│ │ │ -
46 using std::quick_exit;
│ │ │ -
47# endif
│ │ │ -
48#endif
│ │ │ -
49
│ │ │ -
50#if _GLIBCXX_HOSTED
│ │ │ -
51using std::div_t;
│ │ │ -
52using std::ldiv_t;
│ │ │ -
53
│ │ │ -
54using std::abs;
│ │ │ -
55using std::atof;
│ │ │ -
56using std::atoi;
│ │ │ -
57using std::atol;
│ │ │ -
58using std::bsearch;
│ │ │ -
59using std::calloc;
│ │ │ -
60using std::div;
│ │ │ -
61using std::free;
│ │ │ -
62using std::getenv;
│ │ │ -
63using std::labs;
│ │ │ -
64using std::ldiv;
│ │ │ -
65using std::malloc;
│ │ │ -
66#ifdef _GLIBCXX_HAVE_MBSTATE_T
│ │ │ -
67using std::mblen;
│ │ │ -
68using std::mbstowcs;
│ │ │ -
69using std::mbtowc;
│ │ │ -
70#endif // _GLIBCXX_HAVE_MBSTATE_T
│ │ │ -
71using std::qsort;
│ │ │ -
72using std::rand;
│ │ │ -
73using std::realloc;
│ │ │ -
74using std::srand;
│ │ │ -
75using std::strtod;
│ │ │ -
76using std::strtol;
│ │ │ -
77using std::strtoul;
│ │ │ -
78using std::system;
│ │ │ -
79#ifdef _GLIBCXX_USE_WCHAR_T
│ │ │ -
80using std::wcstombs;
│ │ │ -
81using std::wctomb;
│ │ │ -
82#endif // _GLIBCXX_USE_WCHAR_T
│ │ │ -
83#endif
│ │ │ -
84
│ │ │ -
85#endif // _GLIBCXX_STDLIB_H
│ │ │ -
86#endif // __cplusplus
│ │ │ -
_Tp abs(const complex< _Tp > &)
Return magnitude of z.
Definition complex:630
│ │ │ - │ │ │ - │ │ │ +
29#ifndef _GLIBCXX_FENV_H
│ │ │ +
30#define _GLIBCXX_FENV_H 1
│ │ │ +
31
│ │ │ +
32#pragma GCC system_header
│ │ │ +
33
│ │ │ +
34#include <bits/c++config.h>
│ │ │ +
35#if _GLIBCXX_HAVE_FENV_H
│ │ │ +
36# include_next <fenv.h>
│ │ │ +
37#endif
│ │ │ +
38
│ │ │ +
39#if __cplusplus >= 201103L
│ │ │ +
40
│ │ │ +
41#if _GLIBCXX_USE_C99_FENV_TR1
│ │ │ +
42
│ │ │ +
43#undef feclearexcept
│ │ │ +
44#undef fegetexceptflag
│ │ │ +
45#undef feraiseexcept
│ │ │ +
46#undef fesetexceptflag
│ │ │ +
47#undef fetestexcept
│ │ │ +
48#undef fegetround
│ │ │ +
49#undef fesetround
│ │ │ +
50#undef fegetenv
│ │ │ +
51#undef feholdexcept
│ │ │ +
52#undef fesetenv
│ │ │ +
53#undef feupdateenv
│ │ │ +
54
│ │ │ +
55namespace std
│ │ │ +
56{
│ │ │ +
57 // types
│ │ │ +
58 using ::fenv_t;
│ │ │ +
59 using ::fexcept_t;
│ │ │ +
60
│ │ │ +
61 // functions
│ │ │ +
62 using ::feclearexcept;
│ │ │ +
63 using ::fegetexceptflag;
│ │ │ +
64 using ::feraiseexcept;
│ │ │ +
65 using ::fesetexceptflag;
│ │ │ +
66 using ::fetestexcept;
│ │ │ +
67
│ │ │ +
68 using ::fegetround;
│ │ │ +
69 using ::fesetround;
│ │ │ +
70
│ │ │ +
71 using ::fegetenv;
│ │ │ +
72 using ::feholdexcept;
│ │ │ +
73 using ::fesetenv;
│ │ │ +
74 using ::feupdateenv;
│ │ │ +
75} // namespace
│ │ │ +
76
│ │ │ +
77#endif // _GLIBCXX_USE_C99_FENV_TR1
│ │ │ +
78
│ │ │ +
79#endif // C++11
│ │ │ +
80
│ │ │ +
81#endif // _GLIBCXX_FENV_H
│ │ │ + │ │ │ +
ISO C++ entities toplevel namespace is std.
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,13 +1,13 @@ │ │ │ │ libstdc++ │ │ │ │ -stdlib.h │ │ │ │ +fenv.h │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1// -*- C++ -*- compatibility header. │ │ │ │ 2 │ │ │ │ -3// Copyright (C) 2002-2022 Free Software Foundation, Inc. │ │ │ │ +3// Copyright (C) 2007-2022 Free Software Foundation, Inc. │ │ │ │ 4// │ │ │ │ 5// This file is part of the GNU ISO C++ Library. This library is free │ │ │ │ 6// software; you can redistribute it and/or modify it under the │ │ │ │ 7// terms of the GNU General Public License as published by the │ │ │ │ 8// Free Software Foundation; either version 3, or (at your option) │ │ │ │ 9// any later version. │ │ │ │ 10 │ │ │ │ @@ -21,78 +21,69 @@ │ │ │ │ 18// 3.1, as published by the Free Software Foundation. │ │ │ │ 19 │ │ │ │ 20// You should have received a copy of the GNU General Public License and │ │ │ │ 21// a copy of the GCC Runtime Library Exception along with this program; │ │ │ │ 22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see │ │ │ │ 23// . │ │ │ │ 24 │ │ │ │ -25/** @file stdlib.h │ │ │ │ +25/** @file fenv.h │ │ │ │ 26 * This is a Standard C++ Library header. │ │ │ │ 27 */ │ │ │ │ 28 │ │ │ │ -29#if !defined __cplusplus || defined _GLIBCXX_INCLUDE_NEXT_C_HEADERS │ │ │ │ -30# include_next │ │ │ │ -31#else │ │ │ │ -32 │ │ │ │ -33#ifndef _GLIBCXX_STDLIB_H │ │ │ │ -34#define _GLIBCXX_STDLIB_H 1 │ │ │ │ -35 │ │ │ │ -36# include <_c_s_t_d_l_i_b> │ │ │ │ -37 │ │ │ │ -38using std::abort; │ │ │ │ -39using std::atexit; │ │ │ │ -40using std::exit; │ │ │ │ -41#if __cplusplus >= 201103L │ │ │ │ -42# ifdef _GLIBCXX_HAVE_AT_QUICK_EXIT │ │ │ │ -43 using _s_t_d_:_:_a_t___q_u_i_c_k___e_x_i_t; │ │ │ │ -44# endif │ │ │ │ -45# ifdef _GLIBCXX_HAVE_QUICK_EXIT │ │ │ │ -46 using _s_t_d_:_:_q_u_i_c_k___e_x_i_t; │ │ │ │ -47# endif │ │ │ │ -48#endif │ │ │ │ -49 │ │ │ │ -50#if _GLIBCXX_HOSTED │ │ │ │ -51using std::div_t; │ │ │ │ -52using std::ldiv_t; │ │ │ │ -53 │ │ │ │ -54using _s_t_d_:_:_a_b_s; │ │ │ │ -55using std::atof; │ │ │ │ -56using std::atoi; │ │ │ │ -57using std::atol; │ │ │ │ -58using std::bsearch; │ │ │ │ -59using std::calloc; │ │ │ │ -60using std::div; │ │ │ │ -61using std::free; │ │ │ │ -62using std::getenv; │ │ │ │ -63using std::labs; │ │ │ │ -64using std::ldiv; │ │ │ │ -65using std::malloc; │ │ │ │ -66#ifdef _GLIBCXX_HAVE_MBSTATE_T │ │ │ │ -67using _s_t_d_:_:_m_b_l_e_n; │ │ │ │ -68using _s_t_d_:_:_m_b_s_t_o_w_c_s; │ │ │ │ -69using _s_t_d_:_:_m_b_t_o_w_c; │ │ │ │ -70#endif // _GLIBCXX_HAVE_MBSTATE_T │ │ │ │ -71using std::qsort; │ │ │ │ -72using std::rand; │ │ │ │ -73using std::realloc; │ │ │ │ -74using std::srand; │ │ │ │ -75using std::strtod; │ │ │ │ -76using std::strtol; │ │ │ │ -77using std::strtoul; │ │ │ │ -78using std::system; │ │ │ │ -79#ifdef _GLIBCXX_USE_WCHAR_T │ │ │ │ -80using std::wcstombs; │ │ │ │ -81using std::wctomb; │ │ │ │ -82#endif // _GLIBCXX_USE_WCHAR_T │ │ │ │ -83#endif │ │ │ │ -84 │ │ │ │ -85#endif // _GLIBCXX_STDLIB_H │ │ │ │ -86#endif // __cplusplus │ │ │ │ -_s_t_d_:_:_a_b_s │ │ │ │ -_Tp abs(const complex< _Tp > &) │ │ │ │ -Return magnitude of z. │ │ │ │ -DDeeffiinniittiioonn _c_o_m_p_l_e_x_:_6_3_0 │ │ │ │ -_s_t_d_:_:_a_u_t_o___p_t_r___r_e_f │ │ │ │ -DDeeffiinniittiioonn _a_u_t_o___p_t_r_._h_:_4_9 │ │ │ │ -_c_s_t_d_l_i_b │ │ │ │ - * _s_t_d_l_i_b_._h │ │ │ │ +29#ifndef _GLIBCXX_FENV_H │ │ │ │ +30#define _GLIBCXX_FENV_H 1 │ │ │ │ +31 │ │ │ │ +32#pragma GCC system_header │ │ │ │ +33 │ │ │ │ +34#include <_b_i_t_s_/_c_+_+_c_o_n_f_i_g_._h> │ │ │ │ +35#if _GLIBCXX_HAVE_FENV_H │ │ │ │ +36# include_next │ │ │ │ +37#endif │ │ │ │ +38 │ │ │ │ +39#if __cplusplus >= 201103L │ │ │ │ +40 │ │ │ │ +41#if _GLIBCXX_USE_C99_FENV_TR1 │ │ │ │ +42 │ │ │ │ +43#undef feclearexcept │ │ │ │ +44#undef fegetexceptflag │ │ │ │ +45#undef feraiseexcept │ │ │ │ +46#undef fesetexceptflag │ │ │ │ +47#undef fetestexcept │ │ │ │ +48#undef fegetround │ │ │ │ +49#undef fesetround │ │ │ │ +50#undef fegetenv │ │ │ │ +51#undef feholdexcept │ │ │ │ +52#undef fesetenv │ │ │ │ +53#undef feupdateenv │ │ │ │ +54 │ │ │ │ +55namespace _s_t_d │ │ │ │ +56{ │ │ │ │ +57 // types │ │ │ │ +58 using ::fenv_t; │ │ │ │ +59 using ::fexcept_t; │ │ │ │ +60 │ │ │ │ +61 // functions │ │ │ │ +62 using ::feclearexcept; │ │ │ │ +63 using ::fegetexceptflag; │ │ │ │ +64 using ::feraiseexcept; │ │ │ │ +65 using ::fesetexceptflag; │ │ │ │ +66 using ::fetestexcept; │ │ │ │ +67 │ │ │ │ +68 using ::fegetround; │ │ │ │ +69 using ::fesetround; │ │ │ │ +70 │ │ │ │ +71 using ::fegetenv; │ │ │ │ +72 using ::feholdexcept; │ │ │ │ +73 using ::fesetenv; │ │ │ │ +74 using ::feupdateenv; │ │ │ │ +75} // namespace │ │ │ │ +76 │ │ │ │ +77#endif // _GLIBCXX_USE_C99_FENV_TR1 │ │ │ │ +78 │ │ │ │ +79#endif // C++11 │ │ │ │ +80 │ │ │ │ +81#endif // _GLIBCXX_FENV_H │ │ │ │ +_c_+_+_c_o_n_f_i_g_._h │ │ │ │ +_s_t_d │ │ │ │ +ISO C++ entities toplevel namespace is std. │ │ │ │ + * _f_e_n_v_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-12-base/libstdc++/user/a00005.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: stdatomic.h File Reference │ │ │ +libstdc++: complex.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -45,27 +45,52 @@ │ │ │ │ │ │
│ │ │
│ │ │ -
stdatomic.h File Reference
│ │ │ +
│ │ │ +Macros
│ │ │ +
complex.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │

Go to the source code of this file.

│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +

│ │ │ +Macros

#define _GLIBCXX_COMPLEX_H
 
│ │ │

Detailed Description

│ │ │

This is a Standard C++ Library header.

│ │ │ │ │ │ -

Definition in file stdatomic.h.

│ │ │ -
│ │ │ +

Definition in file complex.h.

│ │ │ +

Macro Definition Documentation

│ │ │ + │ │ │ +

◆ _GLIBCXX_COMPLEX_H

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
#define _GLIBCXX_COMPLEX_H
│ │ │ +
│ │ │ + │ │ │ +

Definition at line 46 of file complex.h.

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,8 +1,16 @@ │ │ │ │ libstdc++ │ │ │ │ -stdatomic.h File Reference │ │ │ │ +_M_a_c_r_o_s │ │ │ │ +complex.h File Reference │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ +MMaaccrrooss │ │ │ │ +#define  ___G_L_I_B_C_X_X___C_O_M_P_L_E_X___H │ │ │ │ +  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ This is a Standard C++ Library header. │ │ │ │ -Definition in file _s_t_d_a_t_o_m_i_c_._h. │ │ │ │ - * _s_t_d_a_t_o_m_i_c_._h │ │ │ │ +Definition in file _c_o_m_p_l_e_x_._h. │ │ │ │ +********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ +********** _?◆_? __GGLLIIBBCCXXXX__CCOOMMPPLLEEXX__HH ********** │ │ │ │ +#define _GLIBCXX_COMPLEX_H │ │ │ │ +Definition at line _4_6 of file _c_o_m_p_l_e_x_._h. │ │ │ │ + * _c_o_m_p_l_e_x_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-12-base/libstdc++/user/a00005_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: stdatomic.h Source File │ │ │ +libstdc++: complex.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -45,20 +45,20 @@ │ │ │ │ │ │
│ │ │
│ │ │ -
stdatomic.h
│ │ │ +
complex.h
│ │ │
│ │ │
│ │ │ -Go to the documentation of this file.
1// C compatibility header <stdatomic.h> -*- C++ -*-
│ │ │ +Go to the documentation of this file.
1// -*- C++ -*- compatibility header.
│ │ │
2
│ │ │ -
3// Copyright The GNU Toolchain Authors.
│ │ │ +
3// Copyright (C) 2007-2022 Free Software Foundation, Inc.
│ │ │
4//
│ │ │
5// This file is part of the GNU ISO C++ Library. This library is free
│ │ │
6// software; you can redistribute it and/or modify it under the
│ │ │
7// terms of the GNU General Public License as published by the
│ │ │
8// Free Software Foundation; either version 3, or (at your option)
│ │ │
9// any later version.
│ │ │
10
│ │ │ @@ -72,143 +72,44 @@ │ │ │
18// 3.1, as published by the Free Software Foundation.
│ │ │
19
│ │ │
20// You should have received a copy of the GNU General Public License and
│ │ │
21// a copy of the GCC Runtime Library Exception along with this program;
│ │ │
22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
│ │ │
23// <http://www.gnu.org/licenses/>.
│ │ │
24
│ │ │ -
25/** @file include/stdatomic.h
│ │ │ +
25/** @file complex.h
│ │ │
26 * This is a Standard C++ Library header.
│ │ │
27 */
│ │ │
28
│ │ │ -
29#ifndef _GLIBCXX_STDATOMIC_H
│ │ │ -
30#define _GLIBCXX_STDATOMIC_H
│ │ │ -
31
│ │ │ -
32#if __cplusplus > 202002L
│ │ │ -
33#include <atomic>
│ │ │ +
29#include <bits/c++config.h>
│ │ │ +
30
│ │ │ +
31#if __cplusplus >= 201103L
│ │ │ +
32# include <ccomplex>
│ │ │ +
33#endif
│ │ │
34
│ │ │ -
35#define __cpp_lib_stdatomic_h 202011L
│ │ │ -
36
│ │ │ -
37#define _Atomic(_Tp) ::std::atomic<_Tp>
│ │ │ -
38
│ │ │ - │ │ │ -
40using std::memory_order_relaxed;
│ │ │ -
41using std::memory_order_consume;
│ │ │ -
42using std::memory_order_acquire;
│ │ │ -
43using std::memory_order_release;
│ │ │ -
44using std::memory_order_acq_rel;
│ │ │ -
45using std::memory_order_seq_cst;
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
53using std::atomic_int;
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
59#ifdef _GLIBCXX_USE_CHAR8_T
│ │ │ - │ │ │ -
61#endif
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
65#ifdef _GLIBCXX_USE_C99_STDINT_TR1
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
90#endif
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
95#ifdef _GLIBCXX_USE_C99_STDINT_TR1
│ │ │ - │ │ │ - │ │ │ -
98#endif
│ │ │ -
99using std::atomic_is_lock_free;
│ │ │ -
100using std::atomic_load;
│ │ │ -
101using std::atomic_load_explicit;
│ │ │ -
102using std::atomic_store;
│ │ │ -
103using std::atomic_store_explicit;
│ │ │ -
104using std::atomic_exchange;
│ │ │ -
105using std::atomic_exchange_explicit;
│ │ │ -
106using std::atomic_compare_exchange_strong;
│ │ │ -
107using std::atomic_compare_exchange_strong_explicit;
│ │ │ -
108using std::atomic_compare_exchange_weak;
│ │ │ -
109using std::atomic_compare_exchange_weak_explicit;
│ │ │ -
110using std::atomic_fetch_add;
│ │ │ -
111using std::atomic_fetch_add_explicit;
│ │ │ -
112using std::atomic_fetch_sub;
│ │ │ -
113using std::atomic_fetch_sub_explicit;
│ │ │ -
114using std::atomic_fetch_or;
│ │ │ -
115using std::atomic_fetch_or_explicit;
│ │ │ -
116using std::atomic_fetch_xor;
│ │ │ -
117using std::atomic_fetch_xor_explicit;
│ │ │ -
118using std::atomic_fetch_and;
│ │ │ -
119using std::atomic_fetch_and_explicit;
│ │ │ -
120using std::atomic_flag_test_and_set;
│ │ │ -
121using std::atomic_flag_test_and_set_explicit;
│ │ │ -
122using std::atomic_flag_clear;
│ │ │ -
123using std::atomic_flag_clear_explicit;
│ │ │ -
124using std::atomic_thread_fence;
│ │ │ -
125using std::atomic_signal_fence;
│ │ │ -
126
│ │ │ -
127#elif defined __clang__
│ │ │ -
128# include_next <stdatomic.h>
│ │ │ -
129#endif // C++23
│ │ │ -
130#endif // _GLIBCXX_STDATOMIC_H
│ │ │ - │ │ │ -
memory_order
Enumeration for memory_order.
Definition atomic_base.h:62
│ │ │ -
atomic<bool>
Definition atomic:63
│ │ │ -
Explicit specialization for char.
Definition atomic:712
│ │ │ -
Explicit specialization for signed char.
Definition atomic:735
│ │ │ -
Explicit specialization for unsigned char.
Definition atomic:758
│ │ │ -
Explicit specialization for short.
Definition atomic:781
│ │ │ -
Explicit specialization for unsigned short.
Definition atomic:804
│ │ │ -
Explicit specialization for int.
Definition atomic:827
│ │ │ -
Explicit specialization for unsigned int.
Definition atomic:850
│ │ │ -
Explicit specialization for long.
Definition atomic:873
│ │ │ -
Explicit specialization for unsigned long.
Definition atomic:896
│ │ │ -
Explicit specialization for long long.
Definition atomic:919
│ │ │ -
Explicit specialization for unsigned long long.
Definition atomic:942
│ │ │ -
Explicit specialization for wchar_t.
Definition atomic:965
│ │ │ -
Explicit specialization for char16_t.
Definition atomic:1014
│ │ │ -
Explicit specialization for char32_t.
Definition atomic:1038
│ │ │ -
atomic_flag
│ │ │ - │ │ │ +
35#if __cplusplus >= 201103L && defined(__STRICT_ANSI__)
│ │ │ +
36// For strict modes do not include the C library's <complex.h>, see PR 82417.
│ │ │ +
37#elif _GLIBCXX_HAVE_COMPLEX_H
│ │ │ +
38# include_next <complex.h>
│ │ │ +
39# ifdef _GLIBCXX_COMPLEX
│ │ │ +
40// See PR56111, keep the macro in C++03 if possible.
│ │ │ +
41# undef complex
│ │ │ +
42# endif
│ │ │ +
43#endif
│ │ │ +
44
│ │ │ +
45#ifndef _GLIBCXX_COMPLEX_H
│ │ │ +
46#define _GLIBCXX_COMPLEX_H 1
│ │ │ +
47
│ │ │ +
48#endif
│ │ │ + │ │ │ + │ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,13 +1,13 @@ │ │ │ │ libstdc++ │ │ │ │ -stdatomic.h │ │ │ │ +complex.h │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -1// C compatibility header -*- C++ -*- │ │ │ │ +1// -*- C++ -*- compatibility header. │ │ │ │ 2 │ │ │ │ -3// Copyright The GNU Toolchain Authors. │ │ │ │ +3// Copyright (C) 2007-2022 Free Software Foundation, Inc. │ │ │ │ 4// │ │ │ │ 5// This file is part of the GNU ISO C++ Library. This library is free │ │ │ │ 6// software; you can redistribute it and/or modify it under the │ │ │ │ 7// terms of the GNU General Public License as published by the │ │ │ │ 8// Free Software Foundation; either version 3, or (at your option) │ │ │ │ 9// any later version. │ │ │ │ 10 │ │ │ │ @@ -21,170 +21,35 @@ │ │ │ │ 18// 3.1, as published by the Free Software Foundation. │ │ │ │ 19 │ │ │ │ 20// You should have received a copy of the GNU General Public License and │ │ │ │ 21// a copy of the GCC Runtime Library Exception along with this program; │ │ │ │ 22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see │ │ │ │ 23// . │ │ │ │ 24 │ │ │ │ -25/** @file include/stdatomic.h │ │ │ │ +25/** @file complex.h │ │ │ │ 26 * This is a Standard C++ Library header. │ │ │ │ 27 */ │ │ │ │ 28 │ │ │ │ -29#ifndef _GLIBCXX_STDATOMIC_H │ │ │ │ -30#define _GLIBCXX_STDATOMIC_H │ │ │ │ -31 │ │ │ │ -32#if __cplusplus > 202002L │ │ │ │ -33#include <_a_t_o_m_i_c> │ │ │ │ +29#include <_b_i_t_s_/_c_+_+_c_o_n_f_i_g_._h> │ │ │ │ +30 │ │ │ │ +31#if __cplusplus >= 201103L │ │ │ │ +32# include <_c_c_o_m_p_l_e_x> │ │ │ │ +33#endif │ │ │ │ 34 │ │ │ │ -35#define __cpp_lib_stdatomic_h 202011L │ │ │ │ -36 │ │ │ │ -37#define _Atomic(_Tp) ::std::atomic<_Tp> │ │ │ │ -38 │ │ │ │ -39using _s_t_d_:_:_m_e_m_o_r_y___o_r_d_e_r; │ │ │ │ -40using std::memory_order_relaxed; │ │ │ │ -41using std::memory_order_consume; │ │ │ │ -42using std::memory_order_acquire; │ │ │ │ -43using std::memory_order_release; │ │ │ │ -44using std::memory_order_acq_rel; │ │ │ │ -45using std::memory_order_seq_cst; │ │ │ │ -46using _s_t_d_:_:_a_t_o_m_i_c___f_l_a_g; │ │ │ │ -47using _s_t_d_:_:_a_t_o_m_i_c___b_o_o_l; │ │ │ │ -48using _s_t_d_:_:_a_t_o_m_i_c___c_h_a_r; │ │ │ │ -49using _s_t_d_:_:_a_t_o_m_i_c___s_c_h_a_r; │ │ │ │ -50using _s_t_d_:_:_a_t_o_m_i_c___u_c_h_a_r; │ │ │ │ -51using _s_t_d_:_:_a_t_o_m_i_c___s_h_o_r_t; │ │ │ │ -52using _s_t_d_:_:_a_t_o_m_i_c___u_s_h_o_r_t; │ │ │ │ -53using _s_t_d_:_:_a_t_o_m_i_c___i_n_t; │ │ │ │ -54using _s_t_d_:_:_a_t_o_m_i_c___u_i_n_t; │ │ │ │ -55using _s_t_d_:_:_a_t_o_m_i_c___l_o_n_g; │ │ │ │ -56using _s_t_d_:_:_a_t_o_m_i_c___u_l_o_n_g; │ │ │ │ -57using _s_t_d_:_:_a_t_o_m_i_c___l_l_o_n_g; │ │ │ │ -58using _s_t_d_:_:_a_t_o_m_i_c___u_l_l_o_n_g; │ │ │ │ -59#ifdef _GLIBCXX_USE_CHAR8_T │ │ │ │ -60using _s_t_d_:_:_a_t_o_m_i_c___c_h_a_r_8___t; │ │ │ │ -61#endif │ │ │ │ -62using _s_t_d_:_:_a_t_o_m_i_c___c_h_a_r_1_6___t; │ │ │ │ -63using _s_t_d_:_:_a_t_o_m_i_c___c_h_a_r_3_2___t; │ │ │ │ -64using _s_t_d_:_:_a_t_o_m_i_c___w_c_h_a_r___t; │ │ │ │ -65#ifdef _GLIBCXX_USE_C99_STDINT_TR1 │ │ │ │ -66using _s_t_d_:_:_a_t_o_m_i_c___i_n_t_8___t; │ │ │ │ -67using _s_t_d_:_:_a_t_o_m_i_c___u_i_n_t_8___t; │ │ │ │ -68using _s_t_d_:_:_a_t_o_m_i_c___i_n_t_1_6___t; │ │ │ │ -69using _s_t_d_:_:_a_t_o_m_i_c___u_i_n_t_1_6___t; │ │ │ │ -70using _s_t_d_:_:_a_t_o_m_i_c___i_n_t_3_2___t; │ │ │ │ -71using _s_t_d_:_:_a_t_o_m_i_c___u_i_n_t_3_2___t; │ │ │ │ -72using _s_t_d_:_:_a_t_o_m_i_c___i_n_t_6_4___t; │ │ │ │ -73using _s_t_d_:_:_a_t_o_m_i_c___u_i_n_t_6_4___t; │ │ │ │ -74using _s_t_d_:_:_a_t_o_m_i_c___i_n_t___l_e_a_s_t_8___t; │ │ │ │ -75using _s_t_d_:_:_a_t_o_m_i_c___u_i_n_t___l_e_a_s_t_8___t; │ │ │ │ -76using _s_t_d_:_:_a_t_o_m_i_c___i_n_t___l_e_a_s_t_1_6___t; │ │ │ │ -77using _s_t_d_:_:_a_t_o_m_i_c___u_i_n_t___l_e_a_s_t_1_6___t; │ │ │ │ -78using _s_t_d_:_:_a_t_o_m_i_c___i_n_t___l_e_a_s_t_3_2___t; │ │ │ │ -79using _s_t_d_:_:_a_t_o_m_i_c___u_i_n_t___l_e_a_s_t_3_2___t; │ │ │ │ -80using _s_t_d_:_:_a_t_o_m_i_c___i_n_t___l_e_a_s_t_6_4___t; │ │ │ │ -81using _s_t_d_:_:_a_t_o_m_i_c___u_i_n_t___l_e_a_s_t_6_4___t; │ │ │ │ -82using _s_t_d_:_:_a_t_o_m_i_c___i_n_t___f_a_s_t_8___t; │ │ │ │ -83using _s_t_d_:_:_a_t_o_m_i_c___u_i_n_t___f_a_s_t_8___t; │ │ │ │ -84using _s_t_d_:_:_a_t_o_m_i_c___i_n_t___f_a_s_t_1_6___t; │ │ │ │ -85using _s_t_d_:_:_a_t_o_m_i_c___u_i_n_t___f_a_s_t_1_6___t; │ │ │ │ -86using _s_t_d_:_:_a_t_o_m_i_c___i_n_t___f_a_s_t_3_2___t; │ │ │ │ -87using _s_t_d_:_:_a_t_o_m_i_c___u_i_n_t___f_a_s_t_3_2___t; │ │ │ │ -88using _s_t_d_:_:_a_t_o_m_i_c___i_n_t___f_a_s_t_6_4___t; │ │ │ │ -89using _s_t_d_:_:_a_t_o_m_i_c___u_i_n_t___f_a_s_t_6_4___t; │ │ │ │ -90#endif │ │ │ │ -91using _s_t_d_:_:_a_t_o_m_i_c___i_n_t_p_t_r___t; │ │ │ │ -92using _s_t_d_:_:_a_t_o_m_i_c___u_i_n_t_p_t_r___t; │ │ │ │ -93using _s_t_d_:_:_a_t_o_m_i_c___s_i_z_e___t; │ │ │ │ -94using _s_t_d_:_:_a_t_o_m_i_c___p_t_r_d_i_f_f___t; │ │ │ │ -95#ifdef _GLIBCXX_USE_C99_STDINT_TR1 │ │ │ │ -96using _s_t_d_:_:_a_t_o_m_i_c___i_n_t_m_a_x___t; │ │ │ │ -97using _s_t_d_:_:_a_t_o_m_i_c___u_i_n_t_m_a_x___t; │ │ │ │ -98#endif │ │ │ │ -99using std::atomic_is_lock_free; │ │ │ │ -100using std::atomic_load; │ │ │ │ -101using std::atomic_load_explicit; │ │ │ │ -102using std::atomic_store; │ │ │ │ -103using std::atomic_store_explicit; │ │ │ │ -104using std::atomic_exchange; │ │ │ │ -105using std::atomic_exchange_explicit; │ │ │ │ -106using std::atomic_compare_exchange_strong; │ │ │ │ -107using std::atomic_compare_exchange_strong_explicit; │ │ │ │ -108using std::atomic_compare_exchange_weak; │ │ │ │ -109using std::atomic_compare_exchange_weak_explicit; │ │ │ │ -110using std::atomic_fetch_add; │ │ │ │ -111using std::atomic_fetch_add_explicit; │ │ │ │ -112using std::atomic_fetch_sub; │ │ │ │ -113using std::atomic_fetch_sub_explicit; │ │ │ │ -114using std::atomic_fetch_or; │ │ │ │ -115using std::atomic_fetch_or_explicit; │ │ │ │ -116using std::atomic_fetch_xor; │ │ │ │ -117using std::atomic_fetch_xor_explicit; │ │ │ │ -118using std::atomic_fetch_and; │ │ │ │ -119using std::atomic_fetch_and_explicit; │ │ │ │ -120using std::atomic_flag_test_and_set; │ │ │ │ -121using std::atomic_flag_test_and_set_explicit; │ │ │ │ -122using std::atomic_flag_clear; │ │ │ │ -123using std::atomic_flag_clear_explicit; │ │ │ │ -124using std::atomic_thread_fence; │ │ │ │ -125using std::atomic_signal_fence; │ │ │ │ -126 │ │ │ │ -127#elif defined __clang__ │ │ │ │ -128# include_next │ │ │ │ -129#endif // C++23 │ │ │ │ -130#endif // _GLIBCXX_STDATOMIC_H │ │ │ │ -_a_t_o_m_i_c │ │ │ │ -_s_t_d_:_:_m_e_m_o_r_y___o_r_d_e_r │ │ │ │ -memory_order │ │ │ │ -Enumeration for memory_order. │ │ │ │ -DDeeffiinniittiioonn _a_t_o_m_i_c___b_a_s_e_._h_:_6_2 │ │ │ │ -_s_t_d_:_:_a_t_o_m_i_c_<_ _b_o_o_l_ _> │ │ │ │ -atomic │ │ │ │ -DDeeffiinniittiioonn _a_t_o_m_i_c_:_6_3 │ │ │ │ -_s_t_d_:_:_a_t_o_m_i_c_<_ _c_h_a_r_ _> │ │ │ │ -Explicit specialization for char. │ │ │ │ -DDeeffiinniittiioonn _a_t_o_m_i_c_:_7_1_2 │ │ │ │ -_s_t_d_:_:_a_t_o_m_i_c_<_ _s_i_g_n_e_d_ _c_h_a_r_ _> │ │ │ │ -Explicit specialization for signed char. │ │ │ │ -DDeeffiinniittiioonn _a_t_o_m_i_c_:_7_3_5 │ │ │ │ -_s_t_d_:_:_a_t_o_m_i_c_<_ _u_n_s_i_g_n_e_d_ _c_h_a_r_ _> │ │ │ │ -Explicit specialization for unsigned char. │ │ │ │ -DDeeffiinniittiioonn _a_t_o_m_i_c_:_7_5_8 │ │ │ │ -_s_t_d_:_:_a_t_o_m_i_c_<_ _s_h_o_r_t_ _> │ │ │ │ -Explicit specialization for short. │ │ │ │ -DDeeffiinniittiioonn _a_t_o_m_i_c_:_7_8_1 │ │ │ │ -_s_t_d_:_:_a_t_o_m_i_c_<_ _u_n_s_i_g_n_e_d_ _s_h_o_r_t_ _> │ │ │ │ -Explicit specialization for unsigned short. │ │ │ │ -DDeeffiinniittiioonn _a_t_o_m_i_c_:_8_0_4 │ │ │ │ -_s_t_d_:_:_a_t_o_m_i_c_<_ _i_n_t_ _> │ │ │ │ -Explicit specialization for int. │ │ │ │ -DDeeffiinniittiioonn _a_t_o_m_i_c_:_8_2_7 │ │ │ │ -_s_t_d_:_:_a_t_o_m_i_c_<_ _u_n_s_i_g_n_e_d_ _i_n_t_ _> │ │ │ │ -Explicit specialization for unsigned int. │ │ │ │ -DDeeffiinniittiioonn _a_t_o_m_i_c_:_8_5_0 │ │ │ │ -_s_t_d_:_:_a_t_o_m_i_c_<_ _l_o_n_g_ _> │ │ │ │ -Explicit specialization for long. │ │ │ │ -DDeeffiinniittiioonn _a_t_o_m_i_c_:_8_7_3 │ │ │ │ -_s_t_d_:_:_a_t_o_m_i_c_<_ _u_n_s_i_g_n_e_d_ _l_o_n_g_ _> │ │ │ │ -Explicit specialization for unsigned long. │ │ │ │ -DDeeffiinniittiioonn _a_t_o_m_i_c_:_8_9_6 │ │ │ │ -_s_t_d_:_:_a_t_o_m_i_c_<_ _l_o_n_g_ _l_o_n_g_ _> │ │ │ │ -Explicit specialization for long long. │ │ │ │ -DDeeffiinniittiioonn _a_t_o_m_i_c_:_9_1_9 │ │ │ │ -_s_t_d_:_:_a_t_o_m_i_c_<_ _u_n_s_i_g_n_e_d_ _l_o_n_g_ _l_o_n_g_ _> │ │ │ │ -Explicit specialization for unsigned long long. │ │ │ │ -DDeeffiinniittiioonn _a_t_o_m_i_c_:_9_4_2 │ │ │ │ -_s_t_d_:_:_a_t_o_m_i_c_<_ _w_c_h_a_r___t_ _> │ │ │ │ -Explicit specialization for wchar_t. │ │ │ │ -DDeeffiinniittiioonn _a_t_o_m_i_c_:_9_6_5 │ │ │ │ -_s_t_d_:_:_a_t_o_m_i_c_<_ _c_h_a_r_1_6___t_ _> │ │ │ │ -Explicit specialization for char16_t. │ │ │ │ -DDeeffiinniittiioonn _a_t_o_m_i_c_:_1_0_1_4 │ │ │ │ -_s_t_d_:_:_a_t_o_m_i_c_<_ _c_h_a_r_3_2___t_ _> │ │ │ │ -Explicit specialization for char32_t. │ │ │ │ -DDeeffiinniittiioonn _a_t_o_m_i_c_:_1_0_3_8 │ │ │ │ -_s_t_d_:_:_a_t_o_m_i_c___f_l_a_g │ │ │ │ -atomic_flag │ │ │ │ -DDeeffiinniittiioonn _a_t_o_m_i_c___b_a_s_e_._h_:_2_1_2 │ │ │ │ -_s_t_d_:_:_a_u_t_o___p_t_r___r_e_f │ │ │ │ -DDeeffiinniittiioonn _a_u_t_o___p_t_r_._h_:_4_9 │ │ │ │ - * _s_t_d_a_t_o_m_i_c_._h │ │ │ │ +35#if __cplusplus >= 201103L && defined(__STRICT_ANSI__) │ │ │ │ +36// For strict modes do not include the C library's , see PR 82417. │ │ │ │ +37#elif _GLIBCXX_HAVE_COMPLEX_H │ │ │ │ +38# include_next │ │ │ │ +39# ifdef _GLIBCXX_COMPLEX │ │ │ │ +40// See PR56111, keep the macro in C++03 if possible. │ │ │ │ +41# undef complex │ │ │ │ +42# endif │ │ │ │ +43#endif │ │ │ │ +44 │ │ │ │ +45#ifndef _GLIBCXX_COMPLEX_H │ │ │ │ +46#define _GLIBCXX_COMPLEX_H 1 │ │ │ │ +47 │ │ │ │ +48#endif │ │ │ │ +_c_+_+_c_o_n_f_i_g_._h │ │ │ │ +_c_c_o_m_p_l_e_x │ │ │ │ + * _c_o_m_p_l_e_x_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-12-base/libstdc++/user/a00008_source.html │ │ │ @@ -247,78 +247,78 @@ │ │ │
complex< _Tp > exp(const complex< _Tp > &)
Return complex base e exponential of z.
Definition complex:797
│ │ │
complex< _Tp > cosh(const complex< _Tp > &)
Return complex hyperbolic cosine of z.
Definition complex:771
│ │ │
complex< _Tp > tanh(const complex< _Tp > &)
Return complex hyperbolic tangent of z.
Definition complex:988
│ │ │
complex< _Tp > pow(const complex< _Tp > &, int)
Return x to the y'th power.
Definition complex:1019
│ │ │
complex< _Tp > sinh(const complex< _Tp > &)
Return complex hyperbolic sine of z.
Definition complex:889
│ │ │
complex< _Tp > cos(const complex< _Tp > &)
Return complex cosine of z.
Definition complex:741
│ │ │
complex< _Tp > sqrt(const complex< _Tp > &)
Return complex square root of z.
Definition complex:933
│ │ │ -
__gnu_cxx::__promote< _Tp >::__type sph_bessel(unsigned int __n, _Tp __x)
Definition specfun.h:1102
│ │ │ -
long double sph_bessell(unsigned int __n, long double __x)
Definition specfun.h:1083
│ │ │ -
float betaf(float __a, float __b)
Definition specfun.h:312
│ │ │ -
long double expintl(long double __x)
Definition specfun.h:854
│ │ │ -
float cyl_bessel_jf(float __nu, float __x)
Definition specfun.h:550
│ │ │ -
__gnu_cxx::__promote_2< _Tpnu, _Tp >::__type cyl_bessel_k(_Tpnu __nu, _Tp __x)
Definition specfun.h:633
│ │ │ -
float ellint_3f(float __k, float __nu, float __phi)
Return the incomplete elliptic integral of the third kind for float argument.
Definition specfun.h:792
│ │ │ -
long double legendrel(unsigned int __l, long double __x)
Definition specfun.h:987
│ │ │ -
long double comp_ellint_3l(long double __k, long double __nu)
Return the complete elliptic integral of the third kind for long double modulus k.
Definition specfun.h:463
│ │ │ -
long double riemann_zetal(long double __s)
Definition specfun.h:1032
│ │ │ -
float cyl_bessel_kf(float __nu, float __x)
Definition specfun.h:596
│ │ │ -
float comp_ellint_2f(float __k)
Definition specfun.h:406
│ │ │ -
long double hermitel(unsigned int __n, long double __x)
Definition specfun.h:895
│ │ │ -
__gnu_cxx::__promote_2< _Tp, _Tpp >::__type ellint_1(_Tp __k, _Tpp __phi)
Definition specfun.h:729
│ │ │ -
long double sph_legendrel(unsigned int __l, unsigned int __m, long double __theta)
Definition specfun.h:1128
│ │ │ -
float ellint_1f(float __k, float __phi)
Definition specfun.h:696
│ │ │ -
__gnu_cxx::__promote_2< _Tpnu, _Tp >::__type cyl_neumann(_Tpnu __nu, _Tp __x)
Definition specfun.h:681
│ │ │ -
float assoc_legendref(unsigned int __l, unsigned int __m, float __x)
Definition specfun.h:267
│ │ │ -
long double sph_neumannl(unsigned int __n, long double __x)
Definition specfun.h:1174
│ │ │ -
long double comp_ellint_2l(long double __k)
Definition specfun.h:416
│ │ │ -
__gnu_cxx::__promote< _Tp >::__type comp_ellint_2(_Tp __k)
Definition specfun.h:438
│ │ │ -
float sph_besself(unsigned int __n, float __x)
Definition specfun.h:1073
│ │ │ -
long double assoc_legendrel(unsigned int __l, unsigned int __m, long double __x)
Definition specfun.h:276
│ │ │ -
__gnu_cxx::__promote< _Tp >::__type legendre(unsigned int __l, _Tp __x)
Definition specfun.h:1007
│ │ │ -
float expintf(float __x)
Definition specfun.h:844
│ │ │ -
float ellint_2f(float __k, float __phi)
Return the incomplete elliptic integral of the second kind for float argument.
Definition specfun.h:744
│ │ │ -
__gnu_cxx::__promote_3< _Tp, _Tpn, _Tpp >::__type ellint_3(_Tp __k, _Tpn __nu, _Tpp __phi)
Return the incomplete elliptic integral of the third kind .
Definition specfun.h:830
│ │ │ -
long double ellint_2l(long double __k, long double __phi)
Return the incomplete elliptic integral of the second kind .
Definition specfun.h:754
│ │ │ -
float cyl_neumannf(float __nu, float __x)
Definition specfun.h:648
│ │ │ -
__gnu_cxx::__promote_2< _Tpa, _Tpb >::__type beta(_Tpa __a, _Tpb __b)
Definition specfun.h:343
│ │ │ -
long double comp_ellint_1l(long double __k)
Definition specfun.h:368
│ │ │ -
float comp_ellint_3f(float __k, float __nu)
Return the complete elliptic integral of the third kind for float modulus k.
Definition specfun.h:453
│ │ │ -
float sph_neumannf(unsigned int __n, float __x)
Definition specfun.h:1164
│ │ │ -
__gnu_cxx::__promote< _Tp >::__type expint(_Tp __x)
Definition specfun.h:870
│ │ │ -
long double ellint_1l(long double __k, long double __phi)
Definition specfun.h:706
│ │ │ -
float comp_ellint_1f(float __k)
Definition specfun.h:358
│ │ │ -
long double betal(long double __a, long double __b)
Definition specfun.h:322
│ │ │ -
float hermitef(unsigned int __n, float __x)
Definition specfun.h:885
│ │ │ -
__gnu_cxx::__promote< _Tp >::__type riemann_zeta(_Tp __s)
Definition specfun.h:1058
│ │ │ -
long double ellint_3l(long double __k, long double __nu, long double __phi)
Return the incomplete elliptic integral of the third kind .
Definition specfun.h:802
│ │ │ -
float sph_legendref(unsigned int __l, unsigned int __m, float __theta)
Definition specfun.h:1117
│ │ │ -
__gnu_cxx::__promote< _Tp >::__type sph_neumann(unsigned int __n, _Tp __x)
Definition specfun.h:1193
│ │ │ -
float cyl_bessel_if(float __nu, float __x)
Definition specfun.h:504
│ │ │ -
long double laguerrel(unsigned int __n, long double __x)
Definition specfun.h:943
│ │ │ -
long double cyl_bessel_il(long double __nu, long double __x)
Definition specfun.h:514
│ │ │ -
__gnu_cxx::__promote< _Tp >::__type assoc_laguerre(unsigned int __n, unsigned int __m, _Tp __x)
Definition specfun.h:252
│ │ │ -
__gnu_cxx::__promote_2< _Tp, _Tpn >::__type comp_ellint_3(_Tp __k, _Tpn __nu)
Definition specfun.h:489
│ │ │ -
__gnu_cxx::__promote< _Tp >::__type sph_legendre(unsigned int __l, unsigned int __m, _Tp __theta)
Definition specfun.h:1149
│ │ │ -
long double cyl_bessel_kl(long double __nu, long double __x)
Definition specfun.h:606
│ │ │ -
long double assoc_laguerrel(unsigned int __n, unsigned int __m, long double __x)
Definition specfun.h:216
│ │ │ -
__gnu_cxx::__promote< _Tp >::__type hermite(unsigned int __n, _Tp __x)
Definition specfun.h:918
│ │ │ -
__gnu_cxx::__promote_2< _Tpnu, _Tp >::__type cyl_bessel_j(_Tpnu __nu, _Tp __x)
Definition specfun.h:581
│ │ │ -
float laguerref(unsigned int __n, float __x)
Definition specfun.h:933
│ │ │ -
long double cyl_bessel_jl(long double __nu, long double __x)
Definition specfun.h:560
│ │ │ -
__gnu_cxx::__promote< _Tp >::__type comp_ellint_1(_Tp __k)
Definition specfun.h:391
│ │ │ -
__gnu_cxx::__promote_2< _Tp, _Tpp >::__type ellint_2(_Tp __k, _Tpp __phi)
Definition specfun.h:777
│ │ │ -
__gnu_cxx::__promote< _Tp >::__type laguerre(unsigned int __n, _Tp __x)
Definition specfun.h:962
│ │ │ -
float legendref(unsigned int __l, float __x)
Definition specfun.h:977
│ │ │ -
__gnu_cxx::__promote_2< _Tpnu, _Tp >::__type cyl_bessel_i(_Tpnu __nu, _Tp __x)
Definition specfun.h:535
│ │ │ -
__gnu_cxx::__promote< _Tp >::__type assoc_legendre(unsigned int __l, unsigned int __m, _Tp __x)
Definition specfun.h:298
│ │ │ -
float assoc_laguerref(unsigned int __n, unsigned int __m, float __x)
Definition specfun.h:206
│ │ │ -
long double cyl_neumannl(long double __nu, long double __x)
Definition specfun.h:658
│ │ │ -
float riemann_zetaf(float __s)
Definition specfun.h:1022
│ │ │ - │ │ │ +
__gnu_cxx::__promote< _Tp >::__type sph_bessel(unsigned int __n, _Tp __x)
Definition specfun.h:1102
│ │ │ +
long double sph_bessell(unsigned int __n, long double __x)
Definition specfun.h:1083
│ │ │ +
float betaf(float __a, float __b)
Definition specfun.h:312
│ │ │ +
long double expintl(long double __x)
Definition specfun.h:854
│ │ │ +
float cyl_bessel_jf(float __nu, float __x)
Definition specfun.h:550
│ │ │ +
__gnu_cxx::__promote_2< _Tpnu, _Tp >::__type cyl_bessel_k(_Tpnu __nu, _Tp __x)
Definition specfun.h:633
│ │ │ +
float ellint_3f(float __k, float __nu, float __phi)
Return the incomplete elliptic integral of the third kind for float argument.
Definition specfun.h:792
│ │ │ +
long double legendrel(unsigned int __l, long double __x)
Definition specfun.h:987
│ │ │ +
long double comp_ellint_3l(long double __k, long double __nu)
Return the complete elliptic integral of the third kind for long double modulus k.
Definition specfun.h:463
│ │ │ +
long double riemann_zetal(long double __s)
Definition specfun.h:1032
│ │ │ +
float cyl_bessel_kf(float __nu, float __x)
Definition specfun.h:596
│ │ │ +
float comp_ellint_2f(float __k)
Definition specfun.h:406
│ │ │ +
long double hermitel(unsigned int __n, long double __x)
Definition specfun.h:895
│ │ │ +
__gnu_cxx::__promote_2< _Tp, _Tpp >::__type ellint_1(_Tp __k, _Tpp __phi)
Definition specfun.h:729
│ │ │ +
long double sph_legendrel(unsigned int __l, unsigned int __m, long double __theta)
Definition specfun.h:1128
│ │ │ +
float ellint_1f(float __k, float __phi)
Definition specfun.h:696
│ │ │ +
__gnu_cxx::__promote_2< _Tpnu, _Tp >::__type cyl_neumann(_Tpnu __nu, _Tp __x)
Definition specfun.h:681
│ │ │ +
float assoc_legendref(unsigned int __l, unsigned int __m, float __x)
Definition specfun.h:267
│ │ │ +
long double sph_neumannl(unsigned int __n, long double __x)
Definition specfun.h:1174
│ │ │ +
long double comp_ellint_2l(long double __k)
Definition specfun.h:416
│ │ │ +
__gnu_cxx::__promote< _Tp >::__type comp_ellint_2(_Tp __k)
Definition specfun.h:438
│ │ │ +
float sph_besself(unsigned int __n, float __x)
Definition specfun.h:1073
│ │ │ +
long double assoc_legendrel(unsigned int __l, unsigned int __m, long double __x)
Definition specfun.h:276
│ │ │ +
__gnu_cxx::__promote< _Tp >::__type legendre(unsigned int __l, _Tp __x)
Definition specfun.h:1007
│ │ │ +
float expintf(float __x)
Definition specfun.h:844
│ │ │ +
float ellint_2f(float __k, float __phi)
Return the incomplete elliptic integral of the second kind for float argument.
Definition specfun.h:744
│ │ │ +
__gnu_cxx::__promote_3< _Tp, _Tpn, _Tpp >::__type ellint_3(_Tp __k, _Tpn __nu, _Tpp __phi)
Return the incomplete elliptic integral of the third kind .
Definition specfun.h:830
│ │ │ +
long double ellint_2l(long double __k, long double __phi)
Return the incomplete elliptic integral of the second kind .
Definition specfun.h:754
│ │ │ +
float cyl_neumannf(float __nu, float __x)
Definition specfun.h:648
│ │ │ +
__gnu_cxx::__promote_2< _Tpa, _Tpb >::__type beta(_Tpa __a, _Tpb __b)
Definition specfun.h:343
│ │ │ +
long double comp_ellint_1l(long double __k)
Definition specfun.h:368
│ │ │ +
float comp_ellint_3f(float __k, float __nu)
Return the complete elliptic integral of the third kind for float modulus k.
Definition specfun.h:453
│ │ │ +
float sph_neumannf(unsigned int __n, float __x)
Definition specfun.h:1164
│ │ │ +
__gnu_cxx::__promote< _Tp >::__type expint(_Tp __x)
Definition specfun.h:870
│ │ │ +
long double ellint_1l(long double __k, long double __phi)
Definition specfun.h:706
│ │ │ +
float comp_ellint_1f(float __k)
Definition specfun.h:358
│ │ │ +
long double betal(long double __a, long double __b)
Definition specfun.h:322
│ │ │ +
float hermitef(unsigned int __n, float __x)
Definition specfun.h:885
│ │ │ +
__gnu_cxx::__promote< _Tp >::__type riemann_zeta(_Tp __s)
Definition specfun.h:1058
│ │ │ +
long double ellint_3l(long double __k, long double __nu, long double __phi)
Return the incomplete elliptic integral of the third kind .
Definition specfun.h:802
│ │ │ +
float sph_legendref(unsigned int __l, unsigned int __m, float __theta)
Definition specfun.h:1117
│ │ │ +
__gnu_cxx::__promote< _Tp >::__type sph_neumann(unsigned int __n, _Tp __x)
Definition specfun.h:1193
│ │ │ +
float cyl_bessel_if(float __nu, float __x)
Definition specfun.h:504
│ │ │ +
long double laguerrel(unsigned int __n, long double __x)
Definition specfun.h:943
│ │ │ +
long double cyl_bessel_il(long double __nu, long double __x)
Definition specfun.h:514
│ │ │ +
__gnu_cxx::__promote< _Tp >::__type assoc_laguerre(unsigned int __n, unsigned int __m, _Tp __x)
Definition specfun.h:252
│ │ │ +
__gnu_cxx::__promote_2< _Tp, _Tpn >::__type comp_ellint_3(_Tp __k, _Tpn __nu)
Definition specfun.h:489
│ │ │ +
__gnu_cxx::__promote< _Tp >::__type sph_legendre(unsigned int __l, unsigned int __m, _Tp __theta)
Definition specfun.h:1149
│ │ │ +
long double cyl_bessel_kl(long double __nu, long double __x)
Definition specfun.h:606
│ │ │ +
long double assoc_laguerrel(unsigned int __n, unsigned int __m, long double __x)
Definition specfun.h:216
│ │ │ +
__gnu_cxx::__promote< _Tp >::__type hermite(unsigned int __n, _Tp __x)
Definition specfun.h:918
│ │ │ +
__gnu_cxx::__promote_2< _Tpnu, _Tp >::__type cyl_bessel_j(_Tpnu __nu, _Tp __x)
Definition specfun.h:581
│ │ │ +
float laguerref(unsigned int __n, float __x)
Definition specfun.h:933
│ │ │ +
long double cyl_bessel_jl(long double __nu, long double __x)
Definition specfun.h:560
│ │ │ +
__gnu_cxx::__promote< _Tp >::__type comp_ellint_1(_Tp __k)
Definition specfun.h:391
│ │ │ +
__gnu_cxx::__promote_2< _Tp, _Tpp >::__type ellint_2(_Tp __k, _Tpp __phi)
Definition specfun.h:777
│ │ │ +
__gnu_cxx::__promote< _Tp >::__type laguerre(unsigned int __n, _Tp __x)
Definition specfun.h:962
│ │ │ +
float legendref(unsigned int __l, float __x)
Definition specfun.h:977
│ │ │ +
__gnu_cxx::__promote_2< _Tpnu, _Tp >::__type cyl_bessel_i(_Tpnu __nu, _Tp __x)
Definition specfun.h:535
│ │ │ +
__gnu_cxx::__promote< _Tp >::__type assoc_legendre(unsigned int __l, unsigned int __m, _Tp __x)
Definition specfun.h:298
│ │ │ +
float assoc_laguerref(unsigned int __n, unsigned int __m, float __x)
Definition specfun.h:206
│ │ │ +
long double cyl_neumannl(long double __nu, long double __x)
Definition specfun.h:658
│ │ │ +
float riemann_zetaf(float __s)
Definition specfun.h:1022
│ │ │ + │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,16 +1,8 @@ │ │ │ │ libstdc++ │ │ │ │ -_M_a_c_r_o_s │ │ │ │ -tgmath.h File Reference │ │ │ │ +stdlib.h File Reference │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -MMaaccrrooss │ │ │ │ -#define  ___G_L_I_B_C_X_X___T_G_M_A_T_H___H │ │ │ │ -  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ This is a Standard C++ Library header. │ │ │ │ -Definition in file _t_g_m_a_t_h_._h. │ │ │ │ -********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ -********** _?◆_? __GGLLIIBBCCXXXX__TTGGMMAATTHH__HH ********** │ │ │ │ -#define _GLIBCXX_TGMATH_H │ │ │ │ -Definition at line _4_0 of file _t_g_m_a_t_h_._h. │ │ │ │ - * _t_g_m_a_t_h_._h │ │ │ │ +Definition in file _s_t_d_l_i_b_._h. │ │ │ │ + * _s_t_d_l_i_b_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-12-base/libstdc++/user/a00011_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: tgmath.h Source File │ │ │ +libstdc++: stdlib.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -45,20 +45,20 @@ │ │ │ │ │ │
│ │ │
│ │ │ -
tgmath.h
│ │ │ +
stdlib.h
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1// -*- C++ -*- compatibility header.
│ │ │
2
│ │ │ -
3// Copyright (C) 2007-2022 Free Software Foundation, Inc.
│ │ │ +
3// Copyright (C) 2002-2022 Free Software Foundation, Inc.
│ │ │
4//
│ │ │
5// This file is part of the GNU ISO C++ Library. This library is free
│ │ │
6// software; you can redistribute it and/or modify it under the
│ │ │
7// terms of the GNU General Public License as published by the
│ │ │
8// Free Software Foundation; either version 3, or (at your option)
│ │ │
9// any later version.
│ │ │
10
│ │ │ @@ -72,38 +72,83 @@ │ │ │
18// 3.1, as published by the Free Software Foundation.
│ │ │
19
│ │ │
20// You should have received a copy of the GNU General Public License and
│ │ │
21// a copy of the GCC Runtime Library Exception along with this program;
│ │ │
22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
│ │ │
23// <http://www.gnu.org/licenses/>.
│ │ │
24
│ │ │ -
25/** @file tgmath.h
│ │ │ +
25/** @file stdlib.h
│ │ │
26 * This is a Standard C++ Library header.
│ │ │
27 */
│ │ │
28
│ │ │ -
29#include <bits/c++config.h>
│ │ │ -
30
│ │ │ -
31#if __cplusplus >= 201103L
│ │ │ -
32# include <ctgmath>
│ │ │ -
33#else
│ │ │ -
34# if _GLIBCXX_HAVE_TGMATH_H
│ │ │ -
35# include_next <tgmath.h>
│ │ │ -
36# endif
│ │ │ -
37#endif
│ │ │ -
38
│ │ │ -
39#ifndef _GLIBCXX_TGMATH_H
│ │ │ -
40#define _GLIBCXX_TGMATH_H 1
│ │ │ -
41
│ │ │ -
42#endif
│ │ │ - │ │ │ - │ │ │ +
29#if !defined __cplusplus || defined _GLIBCXX_INCLUDE_NEXT_C_HEADERS
│ │ │ +
30# include_next <stdlib.h>
│ │ │ +
31#else
│ │ │ +
32
│ │ │ +
33#ifndef _GLIBCXX_STDLIB_H
│ │ │ +
34#define _GLIBCXX_STDLIB_H 1
│ │ │ +
35
│ │ │ +
36# include <cstdlib>
│ │ │ +
37
│ │ │ +
38using std::abort;
│ │ │ +
39using std::atexit;
│ │ │ +
40using std::exit;
│ │ │ +
41#if __cplusplus >= 201103L
│ │ │ +
42# ifdef _GLIBCXX_HAVE_AT_QUICK_EXIT
│ │ │ + │ │ │ +
44# endif
│ │ │ +
45# ifdef _GLIBCXX_HAVE_QUICK_EXIT
│ │ │ +
46 using std::quick_exit;
│ │ │ +
47# endif
│ │ │ +
48#endif
│ │ │ +
49
│ │ │ +
50#if _GLIBCXX_HOSTED
│ │ │ +
51using std::div_t;
│ │ │ +
52using std::ldiv_t;
│ │ │ +
53
│ │ │ +
54using std::abs;
│ │ │ +
55using std::atof;
│ │ │ +
56using std::atoi;
│ │ │ +
57using std::atol;
│ │ │ +
58using std::bsearch;
│ │ │ +
59using std::calloc;
│ │ │ +
60using std::div;
│ │ │ +
61using std::free;
│ │ │ +
62using std::getenv;
│ │ │ +
63using std::labs;
│ │ │ +
64using std::ldiv;
│ │ │ +
65using std::malloc;
│ │ │ +
66#ifdef _GLIBCXX_HAVE_MBSTATE_T
│ │ │ +
67using std::mblen;
│ │ │ +
68using std::mbstowcs;
│ │ │ +
69using std::mbtowc;
│ │ │ +
70#endif // _GLIBCXX_HAVE_MBSTATE_T
│ │ │ +
71using std::qsort;
│ │ │ +
72using std::rand;
│ │ │ +
73using std::realloc;
│ │ │ +
74using std::srand;
│ │ │ +
75using std::strtod;
│ │ │ +
76using std::strtol;
│ │ │ +
77using std::strtoul;
│ │ │ +
78using std::system;
│ │ │ +
79#ifdef _GLIBCXX_USE_WCHAR_T
│ │ │ +
80using std::wcstombs;
│ │ │ +
81using std::wctomb;
│ │ │ +
82#endif // _GLIBCXX_USE_WCHAR_T
│ │ │ +
83#endif
│ │ │ +
84
│ │ │ +
85#endif // _GLIBCXX_STDLIB_H
│ │ │ +
86#endif // __cplusplus
│ │ │ +
_Tp abs(const complex< _Tp > &)
Return magnitude of z.
Definition complex:630
│ │ │ + │ │ │ + │ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,13 +1,13 @@ │ │ │ │ libstdc++ │ │ │ │ -tgmath.h │ │ │ │ +stdlib.h │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1// -*- C++ -*- compatibility header. │ │ │ │ 2 │ │ │ │ -3// Copyright (C) 2007-2022 Free Software Foundation, Inc. │ │ │ │ +3// Copyright (C) 2002-2022 Free Software Foundation, Inc. │ │ │ │ 4// │ │ │ │ 5// This file is part of the GNU ISO C++ Library. This library is free │ │ │ │ 6// software; you can redistribute it and/or modify it under the │ │ │ │ 7// terms of the GNU General Public License as published by the │ │ │ │ 8// Free Software Foundation; either version 3, or (at your option) │ │ │ │ 9// any later version. │ │ │ │ 10 │ │ │ │ @@ -21,29 +21,78 @@ │ │ │ │ 18// 3.1, as published by the Free Software Foundation. │ │ │ │ 19 │ │ │ │ 20// You should have received a copy of the GNU General Public License and │ │ │ │ 21// a copy of the GCC Runtime Library Exception along with this program; │ │ │ │ 22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see │ │ │ │ 23// . │ │ │ │ 24 │ │ │ │ -25/** @file tgmath.h │ │ │ │ +25/** @file stdlib.h │ │ │ │ 26 * This is a Standard C++ Library header. │ │ │ │ 27 */ │ │ │ │ 28 │ │ │ │ -29#include <_b_i_t_s_/_c_+_+_c_o_n_f_i_g_._h> │ │ │ │ -30 │ │ │ │ -31#if __cplusplus >= 201103L │ │ │ │ -32# include <_c_t_g_m_a_t_h> │ │ │ │ -33#else │ │ │ │ -34# if _GLIBCXX_HAVE_TGMATH_H │ │ │ │ -35# include_next │ │ │ │ -36# endif │ │ │ │ -37#endif │ │ │ │ -38 │ │ │ │ -39#ifndef _GLIBCXX_TGMATH_H │ │ │ │ -40#define _GLIBCXX_TGMATH_H 1 │ │ │ │ -41 │ │ │ │ -42#endif │ │ │ │ -_c_+_+_c_o_n_f_i_g_._h │ │ │ │ -_c_t_g_m_a_t_h │ │ │ │ - * _t_g_m_a_t_h_._h │ │ │ │ +29#if !defined __cplusplus || defined _GLIBCXX_INCLUDE_NEXT_C_HEADERS │ │ │ │ +30# include_next │ │ │ │ +31#else │ │ │ │ +32 │ │ │ │ +33#ifndef _GLIBCXX_STDLIB_H │ │ │ │ +34#define _GLIBCXX_STDLIB_H 1 │ │ │ │ +35 │ │ │ │ +36# include <_c_s_t_d_l_i_b> │ │ │ │ +37 │ │ │ │ +38using std::abort; │ │ │ │ +39using std::atexit; │ │ │ │ +40using std::exit; │ │ │ │ +41#if __cplusplus >= 201103L │ │ │ │ +42# ifdef _GLIBCXX_HAVE_AT_QUICK_EXIT │ │ │ │ +43 using _s_t_d_:_:_a_t___q_u_i_c_k___e_x_i_t; │ │ │ │ +44# endif │ │ │ │ +45# ifdef _GLIBCXX_HAVE_QUICK_EXIT │ │ │ │ +46 using _s_t_d_:_:_q_u_i_c_k___e_x_i_t; │ │ │ │ +47# endif │ │ │ │ +48#endif │ │ │ │ +49 │ │ │ │ +50#if _GLIBCXX_HOSTED │ │ │ │ +51using std::div_t; │ │ │ │ +52using std::ldiv_t; │ │ │ │ +53 │ │ │ │ +54using _s_t_d_:_:_a_b_s; │ │ │ │ +55using std::atof; │ │ │ │ +56using std::atoi; │ │ │ │ +57using std::atol; │ │ │ │ +58using std::bsearch; │ │ │ │ +59using std::calloc; │ │ │ │ +60using std::div; │ │ │ │ +61using std::free; │ │ │ │ +62using std::getenv; │ │ │ │ +63using std::labs; │ │ │ │ +64using std::ldiv; │ │ │ │ +65using std::malloc; │ │ │ │ +66#ifdef _GLIBCXX_HAVE_MBSTATE_T │ │ │ │ +67using _s_t_d_:_:_m_b_l_e_n; │ │ │ │ +68using _s_t_d_:_:_m_b_s_t_o_w_c_s; │ │ │ │ +69using _s_t_d_:_:_m_b_t_o_w_c; │ │ │ │ +70#endif // _GLIBCXX_HAVE_MBSTATE_T │ │ │ │ +71using std::qsort; │ │ │ │ +72using std::rand; │ │ │ │ +73using std::realloc; │ │ │ │ +74using std::srand; │ │ │ │ +75using std::strtod; │ │ │ │ +76using std::strtol; │ │ │ │ +77using std::strtoul; │ │ │ │ +78using std::system; │ │ │ │ +79#ifdef _GLIBCXX_USE_WCHAR_T │ │ │ │ +80using std::wcstombs; │ │ │ │ +81using std::wctomb; │ │ │ │ +82#endif // _GLIBCXX_USE_WCHAR_T │ │ │ │ +83#endif │ │ │ │ +84 │ │ │ │ +85#endif // _GLIBCXX_STDLIB_H │ │ │ │ +86#endif // __cplusplus │ │ │ │ +_s_t_d_:_:_a_b_s │ │ │ │ +_Tp abs(const complex< _Tp > &) │ │ │ │ +Return magnitude of z. │ │ │ │ +DDeeffiinniittiioonn _c_o_m_p_l_e_x_:_6_3_0 │ │ │ │ +_s_t_d_:_:_a_u_t_o___p_t_r___r_e_f │ │ │ │ +DDeeffiinniittiioonn _a_u_t_o___p_t_r_._h_:_4_9 │ │ │ │ +_c_s_t_d_l_i_b │ │ │ │ + * _s_t_d_l_i_b_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-12-base/libstdc++/user/a00014.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: fenv.h File Reference │ │ │ +libstdc++: tgmath.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -45,27 +45,52 @@ │ │ │ │ │ │
│ │ │
│ │ │ -
fenv.h File Reference
│ │ │ +
│ │ │ +Macros
│ │ │ +
tgmath.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │

Go to the source code of this file.

│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +

│ │ │ +Macros

#define _GLIBCXX_TGMATH_H
 
│ │ │

Detailed Description

│ │ │

This is a Standard C++ Library header.

│ │ │ │ │ │ -

Definition in file fenv.h.

│ │ │ -
│ │ │ +

Definition in file tgmath.h.

│ │ │ +

Macro Definition Documentation

│ │ │ + │ │ │ +

◆ _GLIBCXX_TGMATH_H

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
#define _GLIBCXX_TGMATH_H
│ │ │ +
│ │ │ + │ │ │ +

Definition at line 40 of file tgmath.h.

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,8 +1,16 @@ │ │ │ │ libstdc++ │ │ │ │ -fenv.h File Reference │ │ │ │ +_M_a_c_r_o_s │ │ │ │ +tgmath.h File Reference │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ +MMaaccrrooss │ │ │ │ +#define  ___G_L_I_B_C_X_X___T_G_M_A_T_H___H │ │ │ │ +  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ This is a Standard C++ Library header. │ │ │ │ -Definition in file _f_e_n_v_._h. │ │ │ │ - * _f_e_n_v_._h │ │ │ │ +Definition in file _t_g_m_a_t_h_._h. │ │ │ │ +********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ +********** _?◆_? __GGLLIIBBCCXXXX__TTGGMMAATTHH__HH ********** │ │ │ │ +#define _GLIBCXX_TGMATH_H │ │ │ │ +Definition at line _4_0 of file _t_g_m_a_t_h_._h. │ │ │ │ + * _t_g_m_a_t_h_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-12-base/libstdc++/user/a00014_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: fenv.h Source File │ │ │ +libstdc++: tgmath.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -45,15 +45,15 @@ │ │ │ │ │ │
│ │ │
│ │ │ -
fenv.h
│ │ │ +
tgmath.h
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1// -*- C++ -*- compatibility header.
│ │ │
2
│ │ │
3// Copyright (C) 2007-2022 Free Software Foundation, Inc.
│ │ │
4//
│ │ │
5// This file is part of the GNU ISO C++ Library. This library is free
│ │ │ @@ -72,77 +72,38 @@ │ │ │
18// 3.1, as published by the Free Software Foundation.
│ │ │
19
│ │ │
20// You should have received a copy of the GNU General Public License and
│ │ │
21// a copy of the GCC Runtime Library Exception along with this program;
│ │ │
22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
│ │ │
23// <http://www.gnu.org/licenses/>.
│ │ │
24
│ │ │ -
25/** @file fenv.h
│ │ │ +
25/** @file tgmath.h
│ │ │
26 * This is a Standard C++ Library header.
│ │ │
27 */
│ │ │
28
│ │ │ -
29#ifndef _GLIBCXX_FENV_H
│ │ │ -
30#define _GLIBCXX_FENV_H 1
│ │ │ -
31
│ │ │ -
32#pragma GCC system_header
│ │ │ -
33
│ │ │ -
34#include <bits/c++config.h>
│ │ │ -
35#if _GLIBCXX_HAVE_FENV_H
│ │ │ -
36# include_next <fenv.h>
│ │ │ +
29#include <bits/c++config.h>
│ │ │ +
30
│ │ │ +
31#if __cplusplus >= 201103L
│ │ │ +
32# include <ctgmath>
│ │ │ +
33#else
│ │ │ +
34# if _GLIBCXX_HAVE_TGMATH_H
│ │ │ +
35# include_next <tgmath.h>
│ │ │ +
36# endif
│ │ │
37#endif
│ │ │
38
│ │ │ -
39#if __cplusplus >= 201103L
│ │ │ -
40
│ │ │ -
41#if _GLIBCXX_USE_C99_FENV_TR1
│ │ │ -
42
│ │ │ -
43#undef feclearexcept
│ │ │ -
44#undef fegetexceptflag
│ │ │ -
45#undef feraiseexcept
│ │ │ -
46#undef fesetexceptflag
│ │ │ -
47#undef fetestexcept
│ │ │ -
48#undef fegetround
│ │ │ -
49#undef fesetround
│ │ │ -
50#undef fegetenv
│ │ │ -
51#undef feholdexcept
│ │ │ -
52#undef fesetenv
│ │ │ -
53#undef feupdateenv
│ │ │ -
54
│ │ │ -
55namespace std
│ │ │ -
56{
│ │ │ -
57 // types
│ │ │ -
58 using ::fenv_t;
│ │ │ -
59 using ::fexcept_t;
│ │ │ -
60
│ │ │ -
61 // functions
│ │ │ -
62 using ::feclearexcept;
│ │ │ -
63 using ::fegetexceptflag;
│ │ │ -
64 using ::feraiseexcept;
│ │ │ -
65 using ::fesetexceptflag;
│ │ │ -
66 using ::fetestexcept;
│ │ │ -
67
│ │ │ -
68 using ::fegetround;
│ │ │ -
69 using ::fesetround;
│ │ │ -
70
│ │ │ -
71 using ::fegetenv;
│ │ │ -
72 using ::feholdexcept;
│ │ │ -
73 using ::fesetenv;
│ │ │ -
74 using ::feupdateenv;
│ │ │ -
75} // namespace
│ │ │ -
76
│ │ │ -
77#endif // _GLIBCXX_USE_C99_FENV_TR1
│ │ │ -
78
│ │ │ -
79#endif // C++11
│ │ │ -
80
│ │ │ -
81#endif // _GLIBCXX_FENV_H
│ │ │ - │ │ │ -
ISO C++ entities toplevel namespace is std.
│ │ │ +
39#ifndef _GLIBCXX_TGMATH_H
│ │ │ +
40#define _GLIBCXX_TGMATH_H 1
│ │ │ +
41
│ │ │ +
42#endif
│ │ │ + │ │ │ + │ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,9 +1,9 @@ │ │ │ │ libstdc++ │ │ │ │ -fenv.h │ │ │ │ +tgmath.h │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1// -*- C++ -*- compatibility header. │ │ │ │ 2 │ │ │ │ 3// Copyright (C) 2007-2022 Free Software Foundation, Inc. │ │ │ │ 4// │ │ │ │ 5// This file is part of the GNU ISO C++ Library. This library is free │ │ │ │ 6// software; you can redistribute it and/or modify it under the │ │ │ │ @@ -21,69 +21,29 @@ │ │ │ │ 18// 3.1, as published by the Free Software Foundation. │ │ │ │ 19 │ │ │ │ 20// You should have received a copy of the GNU General Public License and │ │ │ │ 21// a copy of the GCC Runtime Library Exception along with this program; │ │ │ │ 22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see │ │ │ │ 23// . │ │ │ │ 24 │ │ │ │ -25/** @file fenv.h │ │ │ │ +25/** @file tgmath.h │ │ │ │ 26 * This is a Standard C++ Library header. │ │ │ │ 27 */ │ │ │ │ 28 │ │ │ │ -29#ifndef _GLIBCXX_FENV_H │ │ │ │ -30#define _GLIBCXX_FENV_H 1 │ │ │ │ -31 │ │ │ │ -32#pragma GCC system_header │ │ │ │ -33 │ │ │ │ -34#include <_b_i_t_s_/_c_+_+_c_o_n_f_i_g_._h> │ │ │ │ -35#if _GLIBCXX_HAVE_FENV_H │ │ │ │ -36# include_next │ │ │ │ +29#include <_b_i_t_s_/_c_+_+_c_o_n_f_i_g_._h> │ │ │ │ +30 │ │ │ │ +31#if __cplusplus >= 201103L │ │ │ │ +32# include <_c_t_g_m_a_t_h> │ │ │ │ +33#else │ │ │ │ +34# if _GLIBCXX_HAVE_TGMATH_H │ │ │ │ +35# include_next │ │ │ │ +36# endif │ │ │ │ 37#endif │ │ │ │ 38 │ │ │ │ -39#if __cplusplus >= 201103L │ │ │ │ -40 │ │ │ │ -41#if _GLIBCXX_USE_C99_FENV_TR1 │ │ │ │ -42 │ │ │ │ -43#undef feclearexcept │ │ │ │ -44#undef fegetexceptflag │ │ │ │ -45#undef feraiseexcept │ │ │ │ -46#undef fesetexceptflag │ │ │ │ -47#undef fetestexcept │ │ │ │ -48#undef fegetround │ │ │ │ -49#undef fesetround │ │ │ │ -50#undef fegetenv │ │ │ │ -51#undef feholdexcept │ │ │ │ -52#undef fesetenv │ │ │ │ -53#undef feupdateenv │ │ │ │ -54 │ │ │ │ -55namespace _s_t_d │ │ │ │ -56{ │ │ │ │ -57 // types │ │ │ │ -58 using ::fenv_t; │ │ │ │ -59 using ::fexcept_t; │ │ │ │ -60 │ │ │ │ -61 // functions │ │ │ │ -62 using ::feclearexcept; │ │ │ │ -63 using ::fegetexceptflag; │ │ │ │ -64 using ::feraiseexcept; │ │ │ │ -65 using ::fesetexceptflag; │ │ │ │ -66 using ::fetestexcept; │ │ │ │ -67 │ │ │ │ -68 using ::fegetround; │ │ │ │ -69 using ::fesetround; │ │ │ │ -70 │ │ │ │ -71 using ::fegetenv; │ │ │ │ -72 using ::feholdexcept; │ │ │ │ -73 using ::fesetenv; │ │ │ │ -74 using ::feupdateenv; │ │ │ │ -75} // namespace │ │ │ │ -76 │ │ │ │ -77#endif // _GLIBCXX_USE_C99_FENV_TR1 │ │ │ │ -78 │ │ │ │ -79#endif // C++11 │ │ │ │ -80 │ │ │ │ -81#endif // _GLIBCXX_FENV_H │ │ │ │ +39#ifndef _GLIBCXX_TGMATH_H │ │ │ │ +40#define _GLIBCXX_TGMATH_H 1 │ │ │ │ +41 │ │ │ │ +42#endif │ │ │ │ _c_+_+_c_o_n_f_i_g_._h │ │ │ │ -_s_t_d │ │ │ │ -ISO C++ entities toplevel namespace is std. │ │ │ │ - * _f_e_n_v_._h │ │ │ │ +_c_t_g_m_a_t_h │ │ │ │ + * _t_g_m_a_t_h_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-12-base/libstdc++/user/a00017_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: complex.h Source File │ │ │ +libstdc++: gstdint.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -45,71 +45,68 @@ │ │ │ │ │ │
│ │ │
│ │ │ -
complex.h
│ │ │ +
gstdint.h
│ │ │
│ │ │
│ │ │ -Go to the documentation of this file.
1// -*- C++ -*- compatibility header.
│ │ │ +
1/* generated for xgcc (Debian 12.5.0-6) 12.5.0 */
│ │ │
2
│ │ │ -
3// Copyright (C) 2007-2022 Free Software Foundation, Inc.
│ │ │ -
4//
│ │ │ -
5// This file is part of the GNU ISO C++ Library. This library is free
│ │ │ -
6// software; you can redistribute it and/or modify it under the
│ │ │ -
7// terms of the GNU General Public License as published by the
│ │ │ -
8// Free Software Foundation; either version 3, or (at your option)
│ │ │ -
9// any later version.
│ │ │ -
10
│ │ │ -
11// This library is distributed in the hope that it will be useful,
│ │ │ -
12// but WITHOUT ANY WARRANTY; without even the implied warranty of
│ │ │ -
13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
│ │ │ -
14// GNU General Public License for more details.
│ │ │ -
15
│ │ │ -
16// Under Section 7 of GPL version 3, you are granted additional
│ │ │ -
17// permissions described in the GCC Runtime Library Exception, version
│ │ │ -
18// 3.1, as published by the Free Software Foundation.
│ │ │ -
19
│ │ │ -
20// You should have received a copy of the GNU General Public License and
│ │ │ -
21// a copy of the GCC Runtime Library Exception along with this program;
│ │ │ -
22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
│ │ │ -
23// <http://www.gnu.org/licenses/>.
│ │ │ -
24
│ │ │ -
25/** @file complex.h
│ │ │ -
26 * This is a Standard C++ Library header.
│ │ │ -
27 */
│ │ │ -
28
│ │ │ -
29#include <bits/c++config.h>
│ │ │ -
30
│ │ │ -
31#if __cplusplus >= 201103L
│ │ │ -
32# include <ccomplex>
│ │ │ -
33#endif
│ │ │ -
34
│ │ │ -
35#if __cplusplus >= 201103L && defined(__STRICT_ANSI__)
│ │ │ -
36// For strict modes do not include the C library's <complex.h>, see PR 82417.
│ │ │ -
37#elif _GLIBCXX_HAVE_COMPLEX_H
│ │ │ -
38# include_next <complex.h>
│ │ │ -
39# ifdef _GLIBCXX_COMPLEX
│ │ │ -
40// See PR56111, keep the macro in C++03 if possible.
│ │ │ -
41# undef complex
│ │ │ -
42# endif
│ │ │ -
43#endif
│ │ │ -
44
│ │ │ -
45#ifndef _GLIBCXX_COMPLEX_H
│ │ │ -
46#define _GLIBCXX_COMPLEX_H 1
│ │ │ -
47
│ │ │ -
48#endif
│ │ │ - │ │ │ - │ │ │ +
3#ifndef GCC_GENERATED_STDINT_H
│ │ │ +
4#define GCC_GENERATED_STDINT_H 1
│ │ │ +
5
│ │ │ +
6#include <sys/types.h>
│ │ │ +
7#include <stdint.h>
│ │ │ +
8/* glibc uses these symbols as guards to prevent redefinitions. */
│ │ │ +
9#ifdef __int8_t_defined
│ │ │ +
10#define _INT8_T
│ │ │ +
11#define _INT16_T
│ │ │ +
12#define _INT32_T
│ │ │ +
13#endif
│ │ │ +
14#ifdef __uint32_t_defined
│ │ │ +
15#define _UINT32_T
│ │ │ +
16#endif
│ │ │ +
17
│ │ │ +
18
│ │ │ +
19/* Some systems have guard macros to prevent redefinitions, define them. */
│ │ │ +
20#ifndef _INT8_T
│ │ │ +
21#define _INT8_T
│ │ │ +
22#endif
│ │ │ +
23#ifndef _INT16_T
│ │ │ +
24#define _INT16_T
│ │ │ +
25#endif
│ │ │ +
26#ifndef _INT32_T
│ │ │ +
27#define _INT32_T
│ │ │ +
28#endif
│ │ │ +
29#ifndef _UINT8_T
│ │ │ +
30#define _UINT8_T
│ │ │ +
31#endif
│ │ │ +
32#ifndef _UINT16_T
│ │ │ +
33#define _UINT16_T
│ │ │ +
34#endif
│ │ │ +
35#ifndef _UINT32_T
│ │ │ +
36#define _UINT32_T
│ │ │ +
37#endif
│ │ │ +
38
│ │ │ +
39/* system headers have good uint64_t and int64_t */
│ │ │ +
40#ifndef _INT64_T
│ │ │ +
41#define _INT64_T
│ │ │ +
42#endif
│ │ │ +
43#ifndef _UINT64_T
│ │ │ +
44#define _UINT64_T
│ │ │ +
45#endif
│ │ │ +
46
│ │ │ +
47#endif /* GCC_GENERATED_STDINT_H */
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,55 +1,51 @@ │ │ │ │ libstdc++ │ │ │ │ -complex.h │ │ │ │ -_G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -1// -*- C++ -*- compatibility header. │ │ │ │ +gstdint.h │ │ │ │ +1/* generated for xgcc (Debian 12.5.0-6) 12.5.0 */ │ │ │ │ 2 │ │ │ │ -3// Copyright (C) 2007-2022 Free Software Foundation, Inc. │ │ │ │ -4// │ │ │ │ -5// This file is part of the GNU ISO C++ Library. This library is free │ │ │ │ -6// software; you can redistribute it and/or modify it under the │ │ │ │ -7// terms of the GNU General Public License as published by the │ │ │ │ -8// Free Software Foundation; either version 3, or (at your option) │ │ │ │ -9// any later version. │ │ │ │ -10 │ │ │ │ -11// This library is distributed in the hope that it will be useful, │ │ │ │ -12// but WITHOUT ANY WARRANTY; without even the implied warranty of │ │ │ │ -13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the │ │ │ │ -14// GNU General Public License for more details. │ │ │ │ -15 │ │ │ │ -16// Under Section 7 of GPL version 3, you are granted additional │ │ │ │ -17// permissions described in the GCC Runtime Library Exception, version │ │ │ │ -18// 3.1, as published by the Free Software Foundation. │ │ │ │ -19 │ │ │ │ -20// You should have received a copy of the GNU General Public License and │ │ │ │ -21// a copy of the GCC Runtime Library Exception along with this program; │ │ │ │ -22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see │ │ │ │ -23// . │ │ │ │ -24 │ │ │ │ -25/** @file complex.h │ │ │ │ -26 * This is a Standard C++ Library header. │ │ │ │ -27 */ │ │ │ │ -28 │ │ │ │ -29#include <_b_i_t_s_/_c_+_+_c_o_n_f_i_g_._h> │ │ │ │ -30 │ │ │ │ -31#if __cplusplus >= 201103L │ │ │ │ -32# include <_c_c_o_m_p_l_e_x> │ │ │ │ -33#endif │ │ │ │ -34 │ │ │ │ -35#if __cplusplus >= 201103L && defined(__STRICT_ANSI__) │ │ │ │ -36// For strict modes do not include the C library's , see PR 82417. │ │ │ │ -37#elif _GLIBCXX_HAVE_COMPLEX_H │ │ │ │ -38# include_next │ │ │ │ -39# ifdef _GLIBCXX_COMPLEX │ │ │ │ -40// See PR56111, keep the macro in C++03 if possible. │ │ │ │ -41# undef complex │ │ │ │ -42# endif │ │ │ │ -43#endif │ │ │ │ -44 │ │ │ │ -45#ifndef _GLIBCXX_COMPLEX_H │ │ │ │ -46#define _GLIBCXX_COMPLEX_H 1 │ │ │ │ -47 │ │ │ │ -48#endif │ │ │ │ -_c_+_+_c_o_n_f_i_g_._h │ │ │ │ -_c_c_o_m_p_l_e_x │ │ │ │ - * _c_o_m_p_l_e_x_._h │ │ │ │ +3#ifndef GCC_GENERATED_STDINT_H │ │ │ │ +4#define GCC_GENERATED_STDINT_H 1 │ │ │ │ +5 │ │ │ │ +6#include │ │ │ │ +7#include │ │ │ │ +8/* glibc uses these symbols as guards to prevent redefinitions. */ │ │ │ │ +9#ifdef __int8_t_defined │ │ │ │ +10#define _INT8_T │ │ │ │ +11#define _INT16_T │ │ │ │ +12#define _INT32_T │ │ │ │ +13#endif │ │ │ │ +14#ifdef __uint32_t_defined │ │ │ │ +15#define _UINT32_T │ │ │ │ +16#endif │ │ │ │ +17 │ │ │ │ +18 │ │ │ │ +19/* Some systems have guard macros to prevent redefinitions, define them. */ │ │ │ │ +20#ifndef _INT8_T │ │ │ │ +21#define _INT8_T │ │ │ │ +22#endif │ │ │ │ +23#ifndef _INT16_T │ │ │ │ +24#define _INT16_T │ │ │ │ +25#endif │ │ │ │ +26#ifndef _INT32_T │ │ │ │ +27#define _INT32_T │ │ │ │ +28#endif │ │ │ │ +29#ifndef _UINT8_T │ │ │ │ +30#define _UINT8_T │ │ │ │ +31#endif │ │ │ │ +32#ifndef _UINT16_T │ │ │ │ +33#define _UINT16_T │ │ │ │ +34#endif │ │ │ │ +35#ifndef _UINT32_T │ │ │ │ +36#define _UINT32_T │ │ │ │ +37#endif │ │ │ │ +38 │ │ │ │ +39/* system headers have good uint64_t and int64_t */ │ │ │ │ +40#ifndef _INT64_T │ │ │ │ +41#define _INT64_T │ │ │ │ +42#endif │ │ │ │ +43#ifndef _UINT64_T │ │ │ │ +44#define _UINT64_T │ │ │ │ +45#endif │ │ │ │ +46 │ │ │ │ +47#endif /* GCC_GENERATED_STDINT_H */ │ │ │ │ + * ggssttddiinntt..hh │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-12-base/libstdc++/user/a00020_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: gstdint.h Source File │ │ │ +libstdc++: stdatomic.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -45,68 +45,170 @@ │ │ │ │ │ │
│ │ │
│ │ │ -
gstdint.h
│ │ │ +
stdatomic.h
│ │ │
│ │ │
│ │ │ -
1/* generated for xgcc (Debian 12.5.0-6) 12.5.0 */
│ │ │ +Go to the documentation of this file.
1// C compatibility header <stdatomic.h> -*- C++ -*-
│ │ │
2
│ │ │ -
3#ifndef GCC_GENERATED_STDINT_H
│ │ │ -
4#define GCC_GENERATED_STDINT_H 1
│ │ │ -
5
│ │ │ -
6#include <sys/types.h>
│ │ │ -
7#include <stdint.h>
│ │ │ -
8/* glibc uses these symbols as guards to prevent redefinitions. */
│ │ │ -
9#ifdef __int8_t_defined
│ │ │ -
10#define _INT8_T
│ │ │ -
11#define _INT16_T
│ │ │ -
12#define _INT32_T
│ │ │ -
13#endif
│ │ │ -
14#ifdef __uint32_t_defined
│ │ │ -
15#define _UINT32_T
│ │ │ -
16#endif
│ │ │ -
17
│ │ │ -
18
│ │ │ -
19/* Some systems have guard macros to prevent redefinitions, define them. */
│ │ │ -
20#ifndef _INT8_T
│ │ │ -
21#define _INT8_T
│ │ │ -
22#endif
│ │ │ -
23#ifndef _INT16_T
│ │ │ -
24#define _INT16_T
│ │ │ -
25#endif
│ │ │ -
26#ifndef _INT32_T
│ │ │ -
27#define _INT32_T
│ │ │ -
28#endif
│ │ │ -
29#ifndef _UINT8_T
│ │ │ -
30#define _UINT8_T
│ │ │ -
31#endif
│ │ │ -
32#ifndef _UINT16_T
│ │ │ -
33#define _UINT16_T
│ │ │ -
34#endif
│ │ │ -
35#ifndef _UINT32_T
│ │ │ -
36#define _UINT32_T
│ │ │ -
37#endif
│ │ │ +
3// Copyright The GNU Toolchain Authors.
│ │ │ +
4//
│ │ │ +
5// This file is part of the GNU ISO C++ Library. This library is free
│ │ │ +
6// software; you can redistribute it and/or modify it under the
│ │ │ +
7// terms of the GNU General Public License as published by the
│ │ │ +
8// Free Software Foundation; either version 3, or (at your option)
│ │ │ +
9// any later version.
│ │ │ +
10
│ │ │ +
11// This library is distributed in the hope that it will be useful,
│ │ │ +
12// but WITHOUT ANY WARRANTY; without even the implied warranty of
│ │ │ +
13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
│ │ │ +
14// GNU General Public License for more details.
│ │ │ +
15
│ │ │ +
16// Under Section 7 of GPL version 3, you are granted additional
│ │ │ +
17// permissions described in the GCC Runtime Library Exception, version
│ │ │ +
18// 3.1, as published by the Free Software Foundation.
│ │ │ +
19
│ │ │ +
20// You should have received a copy of the GNU General Public License and
│ │ │ +
21// a copy of the GCC Runtime Library Exception along with this program;
│ │ │ +
22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
│ │ │ +
23// <http://www.gnu.org/licenses/>.
│ │ │ +
24
│ │ │ +
25/** @file include/stdatomic.h
│ │ │ +
26 * This is a Standard C++ Library header.
│ │ │ +
27 */
│ │ │ +
28
│ │ │ +
29#ifndef _GLIBCXX_STDATOMIC_H
│ │ │ +
30#define _GLIBCXX_STDATOMIC_H
│ │ │ +
31
│ │ │ +
32#if __cplusplus > 202002L
│ │ │ +
33#include <atomic>
│ │ │ +
34
│ │ │ +
35#define __cpp_lib_stdatomic_h 202011L
│ │ │ +
36
│ │ │ +
37#define _Atomic(_Tp) ::std::atomic<_Tp>
│ │ │
38
│ │ │ -
39/* system headers have good uint64_t and int64_t */
│ │ │ -
40#ifndef _INT64_T
│ │ │ -
41#define _INT64_T
│ │ │ -
42#endif
│ │ │ -
43#ifndef _UINT64_T
│ │ │ -
44#define _UINT64_T
│ │ │ -
45#endif
│ │ │ -
46
│ │ │ -
47#endif /* GCC_GENERATED_STDINT_H */
│ │ │ + │ │ │ +
40using std::memory_order_relaxed;
│ │ │ +
41using std::memory_order_consume;
│ │ │ +
42using std::memory_order_acquire;
│ │ │ +
43using std::memory_order_release;
│ │ │ +
44using std::memory_order_acq_rel;
│ │ │ +
45using std::memory_order_seq_cst;
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
53using std::atomic_int;
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
59#ifdef _GLIBCXX_USE_CHAR8_T
│ │ │ + │ │ │ +
61#endif
│ │ │ + │ │ │ + │ │ │ + │ │ │ +
65#ifdef _GLIBCXX_USE_C99_STDINT_TR1
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
90#endif
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
95#ifdef _GLIBCXX_USE_C99_STDINT_TR1
│ │ │ + │ │ │ + │ │ │ +
98#endif
│ │ │ +
99using std::atomic_is_lock_free;
│ │ │ +
100using std::atomic_load;
│ │ │ +
101using std::atomic_load_explicit;
│ │ │ +
102using std::atomic_store;
│ │ │ +
103using std::atomic_store_explicit;
│ │ │ +
104using std::atomic_exchange;
│ │ │ +
105using std::atomic_exchange_explicit;
│ │ │ +
106using std::atomic_compare_exchange_strong;
│ │ │ +
107using std::atomic_compare_exchange_strong_explicit;
│ │ │ +
108using std::atomic_compare_exchange_weak;
│ │ │ +
109using std::atomic_compare_exchange_weak_explicit;
│ │ │ +
110using std::atomic_fetch_add;
│ │ │ +
111using std::atomic_fetch_add_explicit;
│ │ │ +
112using std::atomic_fetch_sub;
│ │ │ +
113using std::atomic_fetch_sub_explicit;
│ │ │ +
114using std::atomic_fetch_or;
│ │ │ +
115using std::atomic_fetch_or_explicit;
│ │ │ +
116using std::atomic_fetch_xor;
│ │ │ +
117using std::atomic_fetch_xor_explicit;
│ │ │ +
118using std::atomic_fetch_and;
│ │ │ +
119using std::atomic_fetch_and_explicit;
│ │ │ +
120using std::atomic_flag_test_and_set;
│ │ │ +
121using std::atomic_flag_test_and_set_explicit;
│ │ │ +
122using std::atomic_flag_clear;
│ │ │ +
123using std::atomic_flag_clear_explicit;
│ │ │ +
124using std::atomic_thread_fence;
│ │ │ +
125using std::atomic_signal_fence;
│ │ │ +
126
│ │ │ +
127#elif defined __clang__
│ │ │ +
128# include_next <stdatomic.h>
│ │ │ +
129#endif // C++23
│ │ │ +
130#endif // _GLIBCXX_STDATOMIC_H
│ │ │ + │ │ │ +
memory_order
Enumeration for memory_order.
Definition atomic_base.h:62
│ │ │ +
atomic<bool>
Definition atomic:63
│ │ │ +
Explicit specialization for char.
Definition atomic:712
│ │ │ +
Explicit specialization for signed char.
Definition atomic:735
│ │ │ +
Explicit specialization for unsigned char.
Definition atomic:758
│ │ │ +
Explicit specialization for short.
Definition atomic:781
│ │ │ +
Explicit specialization for unsigned short.
Definition atomic:804
│ │ │ +
Explicit specialization for int.
Definition atomic:827
│ │ │ +
Explicit specialization for unsigned int.
Definition atomic:850
│ │ │ +
Explicit specialization for long.
Definition atomic:873
│ │ │ +
Explicit specialization for unsigned long.
Definition atomic:896
│ │ │ +
Explicit specialization for long long.
Definition atomic:919
│ │ │ +
Explicit specialization for unsigned long long.
Definition atomic:942
│ │ │ +
Explicit specialization for wchar_t.
Definition atomic:965
│ │ │ +
Explicit specialization for char16_t.
Definition atomic:1014
│ │ │ +
Explicit specialization for char32_t.
Definition atomic:1038
│ │ │ +
atomic_flag
│ │ │ + │ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,51 +1,190 @@ │ │ │ │ libstdc++ │ │ │ │ -gstdint.h │ │ │ │ -1/* generated for xgcc (Debian 12.5.0-6) 12.5.0 */ │ │ │ │ +stdatomic.h │ │ │ │ +_G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ +1// C compatibility header -*- C++ -*- │ │ │ │ 2 │ │ │ │ -3#ifndef GCC_GENERATED_STDINT_H │ │ │ │ -4#define GCC_GENERATED_STDINT_H 1 │ │ │ │ -5 │ │ │ │ -6#include │ │ │ │ -7#include │ │ │ │ -8/* glibc uses these symbols as guards to prevent redefinitions. */ │ │ │ │ -9#ifdef __int8_t_defined │ │ │ │ -10#define _INT8_T │ │ │ │ -11#define _INT16_T │ │ │ │ -12#define _INT32_T │ │ │ │ -13#endif │ │ │ │ -14#ifdef __uint32_t_defined │ │ │ │ -15#define _UINT32_T │ │ │ │ -16#endif │ │ │ │ -17 │ │ │ │ -18 │ │ │ │ -19/* Some systems have guard macros to prevent redefinitions, define them. */ │ │ │ │ -20#ifndef _INT8_T │ │ │ │ -21#define _INT8_T │ │ │ │ -22#endif │ │ │ │ -23#ifndef _INT16_T │ │ │ │ -24#define _INT16_T │ │ │ │ -25#endif │ │ │ │ -26#ifndef _INT32_T │ │ │ │ -27#define _INT32_T │ │ │ │ -28#endif │ │ │ │ -29#ifndef _UINT8_T │ │ │ │ -30#define _UINT8_T │ │ │ │ -31#endif │ │ │ │ -32#ifndef _UINT16_T │ │ │ │ -33#define _UINT16_T │ │ │ │ -34#endif │ │ │ │ -35#ifndef _UINT32_T │ │ │ │ -36#define _UINT32_T │ │ │ │ -37#endif │ │ │ │ +3// Copyright The GNU Toolchain Authors. │ │ │ │ +4// │ │ │ │ +5// This file is part of the GNU ISO C++ Library. This library is free │ │ │ │ +6// software; you can redistribute it and/or modify it under the │ │ │ │ +7// terms of the GNU General Public License as published by the │ │ │ │ +8// Free Software Foundation; either version 3, or (at your option) │ │ │ │ +9// any later version. │ │ │ │ +10 │ │ │ │ +11// This library is distributed in the hope that it will be useful, │ │ │ │ +12// but WITHOUT ANY WARRANTY; without even the implied warranty of │ │ │ │ +13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the │ │ │ │ +14// GNU General Public License for more details. │ │ │ │ +15 │ │ │ │ +16// Under Section 7 of GPL version 3, you are granted additional │ │ │ │ +17// permissions described in the GCC Runtime Library Exception, version │ │ │ │ +18// 3.1, as published by the Free Software Foundation. │ │ │ │ +19 │ │ │ │ +20// You should have received a copy of the GNU General Public License and │ │ │ │ +21// a copy of the GCC Runtime Library Exception along with this program; │ │ │ │ +22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see │ │ │ │ +23// . │ │ │ │ +24 │ │ │ │ +25/** @file include/stdatomic.h │ │ │ │ +26 * This is a Standard C++ Library header. │ │ │ │ +27 */ │ │ │ │ +28 │ │ │ │ +29#ifndef _GLIBCXX_STDATOMIC_H │ │ │ │ +30#define _GLIBCXX_STDATOMIC_H │ │ │ │ +31 │ │ │ │ +32#if __cplusplus > 202002L │ │ │ │ +33#include <_a_t_o_m_i_c> │ │ │ │ +34 │ │ │ │ +35#define __cpp_lib_stdatomic_h 202011L │ │ │ │ +36 │ │ │ │ +37#define _Atomic(_Tp) ::std::atomic<_Tp> │ │ │ │ 38 │ │ │ │ -39/* system headers have good uint64_t and int64_t */ │ │ │ │ -40#ifndef _INT64_T │ │ │ │ -41#define _INT64_T │ │ │ │ -42#endif │ │ │ │ -43#ifndef _UINT64_T │ │ │ │ -44#define _UINT64_T │ │ │ │ -45#endif │ │ │ │ -46 │ │ │ │ -47#endif /* GCC_GENERATED_STDINT_H */ │ │ │ │ - * ggssttddiinntt..hh │ │ │ │ +39using _s_t_d_:_:_m_e_m_o_r_y___o_r_d_e_r; │ │ │ │ +40using std::memory_order_relaxed; │ │ │ │ +41using std::memory_order_consume; │ │ │ │ +42using std::memory_order_acquire; │ │ │ │ +43using std::memory_order_release; │ │ │ │ +44using std::memory_order_acq_rel; │ │ │ │ +45using std::memory_order_seq_cst; │ │ │ │ +46using _s_t_d_:_:_a_t_o_m_i_c___f_l_a_g; │ │ │ │ +47using _s_t_d_:_:_a_t_o_m_i_c___b_o_o_l; │ │ │ │ +48using _s_t_d_:_:_a_t_o_m_i_c___c_h_a_r; │ │ │ │ +49using _s_t_d_:_:_a_t_o_m_i_c___s_c_h_a_r; │ │ │ │ +50using _s_t_d_:_:_a_t_o_m_i_c___u_c_h_a_r; │ │ │ │ +51using _s_t_d_:_:_a_t_o_m_i_c___s_h_o_r_t; │ │ │ │ +52using _s_t_d_:_:_a_t_o_m_i_c___u_s_h_o_r_t; │ │ │ │ +53using _s_t_d_:_:_a_t_o_m_i_c___i_n_t; │ │ │ │ +54using _s_t_d_:_:_a_t_o_m_i_c___u_i_n_t; │ │ │ │ +55using _s_t_d_:_:_a_t_o_m_i_c___l_o_n_g; │ │ │ │ +56using _s_t_d_:_:_a_t_o_m_i_c___u_l_o_n_g; │ │ │ │ +57using _s_t_d_:_:_a_t_o_m_i_c___l_l_o_n_g; │ │ │ │ +58using _s_t_d_:_:_a_t_o_m_i_c___u_l_l_o_n_g; │ │ │ │ +59#ifdef _GLIBCXX_USE_CHAR8_T │ │ │ │ +60using _s_t_d_:_:_a_t_o_m_i_c___c_h_a_r_8___t; │ │ │ │ +61#endif │ │ │ │ +62using _s_t_d_:_:_a_t_o_m_i_c___c_h_a_r_1_6___t; │ │ │ │ +63using _s_t_d_:_:_a_t_o_m_i_c___c_h_a_r_3_2___t; │ │ │ │ +64using _s_t_d_:_:_a_t_o_m_i_c___w_c_h_a_r___t; │ │ │ │ +65#ifdef _GLIBCXX_USE_C99_STDINT_TR1 │ │ │ │ +66using _s_t_d_:_:_a_t_o_m_i_c___i_n_t_8___t; │ │ │ │ +67using _s_t_d_:_:_a_t_o_m_i_c___u_i_n_t_8___t; │ │ │ │ +68using _s_t_d_:_:_a_t_o_m_i_c___i_n_t_1_6___t; │ │ │ │ +69using _s_t_d_:_:_a_t_o_m_i_c___u_i_n_t_1_6___t; │ │ │ │ +70using _s_t_d_:_:_a_t_o_m_i_c___i_n_t_3_2___t; │ │ │ │ +71using _s_t_d_:_:_a_t_o_m_i_c___u_i_n_t_3_2___t; │ │ │ │ +72using _s_t_d_:_:_a_t_o_m_i_c___i_n_t_6_4___t; │ │ │ │ +73using _s_t_d_:_:_a_t_o_m_i_c___u_i_n_t_6_4___t; │ │ │ │ +74using _s_t_d_:_:_a_t_o_m_i_c___i_n_t___l_e_a_s_t_8___t; │ │ │ │ +75using _s_t_d_:_:_a_t_o_m_i_c___u_i_n_t___l_e_a_s_t_8___t; │ │ │ │ +76using _s_t_d_:_:_a_t_o_m_i_c___i_n_t___l_e_a_s_t_1_6___t; │ │ │ │ +77using _s_t_d_:_:_a_t_o_m_i_c___u_i_n_t___l_e_a_s_t_1_6___t; │ │ │ │ +78using _s_t_d_:_:_a_t_o_m_i_c___i_n_t___l_e_a_s_t_3_2___t; │ │ │ │ +79using _s_t_d_:_:_a_t_o_m_i_c___u_i_n_t___l_e_a_s_t_3_2___t; │ │ │ │ +80using _s_t_d_:_:_a_t_o_m_i_c___i_n_t___l_e_a_s_t_6_4___t; │ │ │ │ +81using _s_t_d_:_:_a_t_o_m_i_c___u_i_n_t___l_e_a_s_t_6_4___t; │ │ │ │ +82using _s_t_d_:_:_a_t_o_m_i_c___i_n_t___f_a_s_t_8___t; │ │ │ │ +83using _s_t_d_:_:_a_t_o_m_i_c___u_i_n_t___f_a_s_t_8___t; │ │ │ │ +84using _s_t_d_:_:_a_t_o_m_i_c___i_n_t___f_a_s_t_1_6___t; │ │ │ │ +85using _s_t_d_:_:_a_t_o_m_i_c___u_i_n_t___f_a_s_t_1_6___t; │ │ │ │ +86using _s_t_d_:_:_a_t_o_m_i_c___i_n_t___f_a_s_t_3_2___t; │ │ │ │ +87using _s_t_d_:_:_a_t_o_m_i_c___u_i_n_t___f_a_s_t_3_2___t; │ │ │ │ +88using _s_t_d_:_:_a_t_o_m_i_c___i_n_t___f_a_s_t_6_4___t; │ │ │ │ +89using _s_t_d_:_:_a_t_o_m_i_c___u_i_n_t___f_a_s_t_6_4___t; │ │ │ │ +90#endif │ │ │ │ +91using _s_t_d_:_:_a_t_o_m_i_c___i_n_t_p_t_r___t; │ │ │ │ +92using _s_t_d_:_:_a_t_o_m_i_c___u_i_n_t_p_t_r___t; │ │ │ │ +93using _s_t_d_:_:_a_t_o_m_i_c___s_i_z_e___t; │ │ │ │ +94using _s_t_d_:_:_a_t_o_m_i_c___p_t_r_d_i_f_f___t; │ │ │ │ +95#ifdef _GLIBCXX_USE_C99_STDINT_TR1 │ │ │ │ +96using _s_t_d_:_:_a_t_o_m_i_c___i_n_t_m_a_x___t; │ │ │ │ +97using _s_t_d_:_:_a_t_o_m_i_c___u_i_n_t_m_a_x___t; │ │ │ │ +98#endif │ │ │ │ +99using std::atomic_is_lock_free; │ │ │ │ +100using std::atomic_load; │ │ │ │ +101using std::atomic_load_explicit; │ │ │ │ +102using std::atomic_store; │ │ │ │ +103using std::atomic_store_explicit; │ │ │ │ +104using std::atomic_exchange; │ │ │ │ +105using std::atomic_exchange_explicit; │ │ │ │ +106using std::atomic_compare_exchange_strong; │ │ │ │ +107using std::atomic_compare_exchange_strong_explicit; │ │ │ │ +108using std::atomic_compare_exchange_weak; │ │ │ │ +109using std::atomic_compare_exchange_weak_explicit; │ │ │ │ +110using std::atomic_fetch_add; │ │ │ │ +111using std::atomic_fetch_add_explicit; │ │ │ │ +112using std::atomic_fetch_sub; │ │ │ │ +113using std::atomic_fetch_sub_explicit; │ │ │ │ +114using std::atomic_fetch_or; │ │ │ │ +115using std::atomic_fetch_or_explicit; │ │ │ │ +116using std::atomic_fetch_xor; │ │ │ │ +117using std::atomic_fetch_xor_explicit; │ │ │ │ +118using std::atomic_fetch_and; │ │ │ │ +119using std::atomic_fetch_and_explicit; │ │ │ │ +120using std::atomic_flag_test_and_set; │ │ │ │ +121using std::atomic_flag_test_and_set_explicit; │ │ │ │ +122using std::atomic_flag_clear; │ │ │ │ +123using std::atomic_flag_clear_explicit; │ │ │ │ +124using std::atomic_thread_fence; │ │ │ │ +125using std::atomic_signal_fence; │ │ │ │ +126 │ │ │ │ +127#elif defined __clang__ │ │ │ │ +128# include_next │ │ │ │ +129#endif // C++23 │ │ │ │ +130#endif // _GLIBCXX_STDATOMIC_H │ │ │ │ +_a_t_o_m_i_c │ │ │ │ +_s_t_d_:_:_m_e_m_o_r_y___o_r_d_e_r │ │ │ │ +memory_order │ │ │ │ +Enumeration for memory_order. │ │ │ │ +DDeeffiinniittiioonn _a_t_o_m_i_c___b_a_s_e_._h_:_6_2 │ │ │ │ +_s_t_d_:_:_a_t_o_m_i_c_<_ _b_o_o_l_ _> │ │ │ │ +atomic │ │ │ │ +DDeeffiinniittiioonn _a_t_o_m_i_c_:_6_3 │ │ │ │ +_s_t_d_:_:_a_t_o_m_i_c_<_ _c_h_a_r_ _> │ │ │ │ +Explicit specialization for char. │ │ │ │ +DDeeffiinniittiioonn _a_t_o_m_i_c_:_7_1_2 │ │ │ │ +_s_t_d_:_:_a_t_o_m_i_c_<_ _s_i_g_n_e_d_ _c_h_a_r_ _> │ │ │ │ +Explicit specialization for signed char. │ │ │ │ +DDeeffiinniittiioonn _a_t_o_m_i_c_:_7_3_5 │ │ │ │ +_s_t_d_:_:_a_t_o_m_i_c_<_ _u_n_s_i_g_n_e_d_ _c_h_a_r_ _> │ │ │ │ +Explicit specialization for unsigned char. │ │ │ │ +DDeeffiinniittiioonn _a_t_o_m_i_c_:_7_5_8 │ │ │ │ +_s_t_d_:_:_a_t_o_m_i_c_<_ _s_h_o_r_t_ _> │ │ │ │ +Explicit specialization for short. │ │ │ │ +DDeeffiinniittiioonn _a_t_o_m_i_c_:_7_8_1 │ │ │ │ +_s_t_d_:_:_a_t_o_m_i_c_<_ _u_n_s_i_g_n_e_d_ _s_h_o_r_t_ _> │ │ │ │ +Explicit specialization for unsigned short. │ │ │ │ +DDeeffiinniittiioonn _a_t_o_m_i_c_:_8_0_4 │ │ │ │ +_s_t_d_:_:_a_t_o_m_i_c_<_ _i_n_t_ _> │ │ │ │ +Explicit specialization for int. │ │ │ │ +DDeeffiinniittiioonn _a_t_o_m_i_c_:_8_2_7 │ │ │ │ +_s_t_d_:_:_a_t_o_m_i_c_<_ _u_n_s_i_g_n_e_d_ _i_n_t_ _> │ │ │ │ +Explicit specialization for unsigned int. │ │ │ │ +DDeeffiinniittiioonn _a_t_o_m_i_c_:_8_5_0 │ │ │ │ +_s_t_d_:_:_a_t_o_m_i_c_<_ _l_o_n_g_ _> │ │ │ │ +Explicit specialization for long. │ │ │ │ +DDeeffiinniittiioonn _a_t_o_m_i_c_:_8_7_3 │ │ │ │ +_s_t_d_:_:_a_t_o_m_i_c_<_ _u_n_s_i_g_n_e_d_ _l_o_n_g_ _> │ │ │ │ +Explicit specialization for unsigned long. │ │ │ │ +DDeeffiinniittiioonn _a_t_o_m_i_c_:_8_9_6 │ │ │ │ +_s_t_d_:_:_a_t_o_m_i_c_<_ _l_o_n_g_ _l_o_n_g_ _> │ │ │ │ +Explicit specialization for long long. │ │ │ │ +DDeeffiinniittiioonn _a_t_o_m_i_c_:_9_1_9 │ │ │ │ +_s_t_d_:_:_a_t_o_m_i_c_<_ _u_n_s_i_g_n_e_d_ _l_o_n_g_ _l_o_n_g_ _> │ │ │ │ +Explicit specialization for unsigned long long. │ │ │ │ +DDeeffiinniittiioonn _a_t_o_m_i_c_:_9_4_2 │ │ │ │ +_s_t_d_:_:_a_t_o_m_i_c_<_ _w_c_h_a_r___t_ _> │ │ │ │ +Explicit specialization for wchar_t. │ │ │ │ +DDeeffiinniittiioonn _a_t_o_m_i_c_:_9_6_5 │ │ │ │ +_s_t_d_:_:_a_t_o_m_i_c_<_ _c_h_a_r_1_6___t_ _> │ │ │ │ +Explicit specialization for char16_t. │ │ │ │ +DDeeffiinniittiioonn _a_t_o_m_i_c_:_1_0_1_4 │ │ │ │ +_s_t_d_:_:_a_t_o_m_i_c_<_ _c_h_a_r_3_2___t_ _> │ │ │ │ +Explicit specialization for char32_t. │ │ │ │ +DDeeffiinniittiioonn _a_t_o_m_i_c_:_1_0_3_8 │ │ │ │ +_s_t_d_:_:_a_t_o_m_i_c___f_l_a_g │ │ │ │ +atomic_flag │ │ │ │ +DDeeffiinniittiioonn _a_t_o_m_i_c___b_a_s_e_._h_:_2_1_2 │ │ │ │ +_s_t_d_:_:_a_u_t_o___p_t_r___r_e_f │ │ │ │ +DDeeffiinniittiioonn _a_u_t_o___p_t_r_._h_:_4_9 │ │ │ │ + * _s_t_d_a_t_o_m_i_c_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-12-base/libstdc++/user/a00029_source.html │ │ │ @@ -96,18 +96,18 @@ │ │ │
42#define _CXXABI_H 1
│ │ │
43
│ │ │
44#pragma GCC system_header
│ │ │
45
│ │ │
46#pragma GCC visibility push(default)
│ │ │
47
│ │ │
48#include <stddef.h>
│ │ │ -
49#include <bits/c++config.h>
│ │ │ -
50#include <bits/cxxabi_tweaks.h>
│ │ │ -
51#include <bits/cxxabi_forced.h>
│ │ │ - │ │ │ +
49#include <bits/c++config.h>
│ │ │ +
50#include <bits/cxxabi_tweaks.h>
│ │ │ +
51#include <bits/cxxabi_forced.h>
│ │ │ + │ │ │
53
│ │ │
54#ifdef __cplusplus
│ │ │
55namespace __cxxabiv1
│ │ │
56{
│ │ │
57 extern "C"
│ │ │
58 {
│ │ │
59#endif
│ │ │ @@ -764,23 +764,23 @@ │ │ │
710}
│ │ │
711#endif // __cplusplus
│ │ │
712
│ │ │
713#pragma GCC visibility pop
│ │ │
714
│ │ │
715#endif // __CXXABI_H
│ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │
ISO C++ entities toplevel namespace is std.
│ │ │
GNU extensions for public use.
│ │ │ -
constexpr _Iterator __base(_Iterator __it)
│ │ │ +
constexpr _Iterator __base(_Iterator __it)
│ │ │
Part of RTTI.
Definition typeinfo:93
│ │ │ -
Base class for all library exceptions.
Definition exception.h:62
│ │ │ +
Base class for all library exceptions.
Definition exception.h:62
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,24 +1,314 @@ │ │ │ │ libstdc++ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -nested_exception.h File Reference │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _M_a_c_r_o_s | _T_y_p_e_d_e_f_s | _F_u_n_c_t_i_o_n_s | _V_a_r_i_a_b_l_e_s │ │ │ │ +chrono.h File Reference │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ CCllaasssseess │ │ │ │ -class   _s_t_d_:_:_n_e_s_t_e_d___e_x_c_e_p_t_i_o_n │ │ │ │ +struct   _s_t_d_:_:_c_o_m_m_o_n___t_y_p_e_<_ _c_h_r_o_n_o_:_:_d_u_r_a_t_i_o_n_<_ ___R_e_p_,_ ___P_e_r_i_o_d_ _>_ _> │ │ │ │ +  │ │ │ │ +struct   _s_t_d_:_:_c_o_m_m_o_n___t_y_p_e_<_ _c_h_r_o_n_o_:_:_d_u_r_a_t_i_o_n_<_ ___R_e_p_,_ ___P_e_r_i_o_d_ _>_,_ _c_h_r_o_n_o_:_:_d_u_r_a_t_i_o_n_< │ │ │ │ + ___R_e_p_,_ ___P_e_r_i_o_d_ _>_ _> │ │ │ │ +  │ │ │ │ +struct   _s_t_d_:_:_c_o_m_m_o_n___t_y_p_e_<_ _c_h_r_o_n_o_:_:_d_u_r_a_t_i_o_n_<_ ___R_e_p_1_,_ ___P_e_r_i_o_d_1_ _>_,_ _c_h_r_o_n_o_:_: │ │ │ │ + _d_u_r_a_t_i_o_n_<_ ___R_e_p_2_,_ ___P_e_r_i_o_d_2_ _>_ _> │ │ │ │ +  │ │ │ │ +struct   _s_t_d_:_:_c_o_m_m_o_n___t_y_p_e_<_ _c_h_r_o_n_o_:_:_t_i_m_e___p_o_i_n_t_<_ ___C_l_o_c_k_,_ ___D_u_r_a_t_i_o_n_ _>_ _> │ │ │ │ +  │ │ │ │ +struct   _s_t_d_:_:_c_o_m_m_o_n___t_y_p_e_<_ _c_h_r_o_n_o_:_:_t_i_m_e___p_o_i_n_t_<_ ___C_l_o_c_k_,_ ___D_u_r_a_t_i_o_n_ _>_,_ _c_h_r_o_n_o_:_: │ │ │ │ + _t_i_m_e___p_o_i_n_t_<_ ___C_l_o_c_k_,_ ___D_u_r_a_t_i_o_n_ _>_ _> │ │ │ │ +  │ │ │ │ +struct   _s_t_d_:_:_c_o_m_m_o_n___t_y_p_e_<_ _c_h_r_o_n_o_:_:_t_i_m_e___p_o_i_n_t_<_ ___C_l_o_c_k_,_ ___D_u_r_a_t_i_o_n_1_ _>_,_ _c_h_r_o_n_o_:_: │ │ │ │ + _t_i_m_e___p_o_i_n_t_<_ ___C_l_o_c_k_,_ ___D_u_r_a_t_i_o_n_2_ _>_ _> │ │ │ │ +  │ │ │ │ + class   _s_t_d_:_:_c_h_r_o_n_o_:_:_d_u_r_a_t_i_o_n_<_ ___R_e_p_,_ ___P_e_r_i_o_d_ _> │ │ │ │ +  │ │ │ │ +struct   _s_t_d_:_:_c_h_r_o_n_o_:_:_d_u_r_a_t_i_o_n___v_a_l_u_e_s_<_ ___R_e_p_ _> │ │ │ │ +  │ │ │ │ +struct   _s_t_d_:_:_c_h_r_o_n_o_:_:_s_t_e_a_d_y___c_l_o_c_k │ │ │ │ +  │ │ │ │ +struct   _s_t_d_:_:_c_h_r_o_n_o_:_:_s_y_s_t_e_m___c_l_o_c_k │ │ │ │ +  │ │ │ │ + class   _s_t_d_:_:_c_h_r_o_n_o_:_:_t_i_m_e___p_o_i_n_t_<_ ___C_l_o_c_k_,_ ___D_u_r_ _> │ │ │ │ +  │ │ │ │ +struct   _s_t_d_:_:_c_h_r_o_n_o_:_:_t_r_e_a_t___a_s___f_l_o_a_t_i_n_g___p_o_i_n_t_<_ ___R_e_p_ _> │ │ │ │   │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _s_t_d │ │ │ │   │ │ │ │ +namespace   _s_t_d_:_:_c_h_r_o_n_o │ │ │ │ +  │ │ │ │ +namespace   _s_t_d_:_:_f_i_l_e_s_y_s_t_e_m │ │ │ │ +  │ │ │ │ +namespace   _s_t_d_:_:_l_i_t_e_r_a_l_s │ │ │ │ +  │ │ │ │ +namespace   _s_t_d_:_:_l_i_t_e_r_a_l_s_:_:_c_h_r_o_n_o___l_i_t_e_r_a_l_s │ │ │ │ +  │ │ │ │ +MMaaccrrooss │ │ │ │ +#define  _____c_p_p___l_i_b___c_h_r_o_n_o │ │ │ │ +  │ │ │ │ +#define  _____c_p_p___l_i_b___c_h_r_o_n_o___u_d_l_s │ │ │ │ +  │ │ │ │ +TTyyppeeddeeffss │ │ │ │ +_u_s_i_n_g  _s_t_d_:_:_c_h_r_o_n_o_:_:_d_a_y_s = _d_u_r_a_t_i_o_n< int64_t, _r_a_t_i_o< 86400 > > │ │ │ │ +  │ │ │ │ +_u_s_i_n_g  _s_t_d_:_:_c_h_r_o_n_o_:_:_f_i_l_e___c_l_o_c_k = ::std::filesystem::__file_clock │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___D_u_r_a_t_i_o_n > │ │ │ │ +_u_s_i_n_g  _s_t_d_:_:_c_h_r_o_n_o_:_:_f_i_l_e___t_i_m_e = _t_i_m_e___p_o_i_n_t< file_clock, ___D_u_r_a_t_i_o_n > │ │ │ │ +  │ │ │ │ +_u_s_i_n_g  _s_t_d_:_:_c_h_r_o_n_o_:_:_h_i_g_h___r_e_s_o_l_u_t_i_o_n___c_l_o_c_k = _s_y_s_t_e_m___c_l_o_c_k │ │ │ │ +  │ │ │ │ +_u_s_i_n_g  _s_t_d_:_:_c_h_r_o_n_o_:_:_h_o_u_r_s = _d_u_r_a_t_i_o_n< int64_t, _r_a_t_i_o< 3600 > > │ │ │ │ +  │ │ │ │ +_u_s_i_n_g  _s_t_d_:_:_c_h_r_o_n_o_:_:_m_i_c_r_o_s_e_c_o_n_d_s = _d_u_r_a_t_i_o_n< int64_t, _m_i_c_r_o > │ │ │ │ +  │ │ │ │ +_u_s_i_n_g  _s_t_d_:_:_c_h_r_o_n_o_:_:_m_i_l_l_i_s_e_c_o_n_d_s = _d_u_r_a_t_i_o_n< int64_t, _m_i_l_l_i > │ │ │ │ +  │ │ │ │ +_u_s_i_n_g  _s_t_d_:_:_c_h_r_o_n_o_:_:_m_i_n_u_t_e_s = _d_u_r_a_t_i_o_n< int64_t, _r_a_t_i_o< 60 > > │ │ │ │ +  │ │ │ │ +_u_s_i_n_g  _s_t_d_:_:_c_h_r_o_n_o_:_:_m_o_n_t_h_s = _d_u_r_a_t_i_o_n< int64_t, _r_a_t_i_o< 2629746 > > │ │ │ │ +  │ │ │ │ +_u_s_i_n_g  _s_t_d_:_:_c_h_r_o_n_o_:_:_n_a_n_o_s_e_c_o_n_d_s = _d_u_r_a_t_i_o_n< int64_t, _n_a_n_o > │ │ │ │ +  │ │ │ │ +_u_s_i_n_g  _s_t_d_:_:_c_h_r_o_n_o_:_:_s_e_c_o_n_d_s = _d_u_r_a_t_i_o_n< int64_t > │ │ │ │ +  │ │ │ │ +_u_s_i_n_g  _s_t_d_:_:_c_h_r_o_n_o_:_:_s_y_s___d_a_y_s = _s_y_s___t_i_m_e< _d_a_y_s > │ │ │ │ +  │ │ │ │ +_u_s_i_n_g  _s_t_d_:_:_c_h_r_o_n_o_:_:_s_y_s___s_e_c_o_n_d_s = _s_y_s___t_i_m_e< _s_e_c_o_n_d_s > │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___D_u_r_a_t_i_o_n > │ │ │ │ +_u_s_i_n_g  _s_t_d_:_:_c_h_r_o_n_o_:_:_s_y_s___t_i_m_e = _t_i_m_e___p_o_i_n_t< _s_y_s_t_e_m___c_l_o_c_k, ___D_u_r_a_t_i_o_n > │ │ │ │ +  │ │ │ │ +_u_s_i_n_g  _s_t_d_:_:_c_h_r_o_n_o_:_:_w_e_e_k_s = _d_u_r_a_t_i_o_n< int64_t, _r_a_t_i_o< 604800 > > │ │ │ │ +  │ │ │ │ +_u_s_i_n_g  _s_t_d_:_:_c_h_r_o_n_o_:_:_y_e_a_r_s = _d_u_r_a_t_i_o_n< int64_t, _r_a_t_i_o< 31556952 > > │ │ │ │ +  │ │ │ │ FFuunnccttiioonnss │ │ │ │ -template<_t_y_p_e_n_a_m_e ___E_x > │ │ │ │ -_v_o_i_d  _s_t_d_:_:_r_e_t_h_r_o_w___i_f___n_e_s_t_e_d (const ___E_x &_____e_x) │ │ │ │ +template<_t_y_p_e_n_a_m_e _Rep , _t_y_p_e_n_a_m_e ___P_e_r_i_o_d > │ │ │ │ + constexpr _e_n_a_b_l_e___i_f___t< _n_u_m_e_r_i_c___l_i_m_i_t_s< │ │ │ │ + _Rep >::is_signed, _d_u_r_a_t_i_o_n< _Rep, _s_t_d_:_:_c_h_r_o_n_o_:_:_a_b_s (_d_u_r_a_t_i_o_n< _Rep, │ │ │ │ + ___P_e_r_i_o_d > >  ___P_e_r_i_o_d > __d) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___T_o_D_u_r , _t_y_p_e_n_a_m_e _Rep , _t_y_p_e_n_a_m_e ___P_e_r_i_o_d > │ │ │ │ + constexpr _____e_n_a_b_l_e___i_f___i_s___d_u_r_a_t_i_o_n< _s_t_d_:_:_c_h_r_o_n_o_:_:_c_e_i_l (const _d_u_r_a_t_i_o_n< │ │ │ │ + ___T_o_D_u_r >  _Rep, ___P_e_r_i_o_d > &__d) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___T_o_D_u_r , _t_y_p_e_n_a_m_e ___C_l_o_c_k , _t_y_p_e_n_a_m_e _Dur > │ │ │ │ + constexpr _e_n_a_b_l_e___i_f___t< _____i_s___d_u_r_a_t_i_o_n< │ │ │ │ + ___T_o_D_u_r >::value, _t_i_m_e___p_o_i_n_t< ___C_l_o_c_k, _s_t_d_:_:_c_h_r_o_n_o_:_:_c_e_i_l (const _t_i_m_e___p_o_i_n_t< │ │ │ │ + ___T_o_D_u_r > >  ___C_l_o_c_k, _Dur > &_____t_p) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___T_o_D_u_r , _t_y_p_e_n_a_m_e _Rep , _t_y_p_e_n_a_m_e ___P_e_r_i_o_d > │ │ │ │ + constexpr _____e_n_a_b_l_e___i_f___i_s___d_u_r_a_t_i_o_n< _s_t_d_:_:_c_h_r_o_n_o_:_:_d_u_r_a_t_i_o_n___c_a_s_t (const │ │ │ │ + ___T_o_D_u_r >  _d_u_r_a_t_i_o_n< _Rep, ___P_e_r_i_o_d > &__d) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___T_o_D_u_r , _t_y_p_e_n_a_m_e _Rep , _t_y_p_e_n_a_m_e ___P_e_r_i_o_d > │ │ │ │ + constexpr _____e_n_a_b_l_e___i_f___i_s___d_u_r_a_t_i_o_n< _s_t_d_:_:_c_h_r_o_n_o_:_:_f_l_o_o_r (const _d_u_r_a_t_i_o_n< │ │ │ │ + ___T_o_D_u_r >  _Rep, ___P_e_r_i_o_d > &__d) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___T_o_D_u_r , _t_y_p_e_n_a_m_e ___C_l_o_c_k , _t_y_p_e_n_a_m_e _Dur > │ │ │ │ + constexpr _e_n_a_b_l_e___i_f___t< _____i_s___d_u_r_a_t_i_o_n< │ │ │ │ + ___T_o_D_u_r >::value, _t_i_m_e___p_o_i_n_t< ___C_l_o_c_k, _s_t_d_:_:_c_h_r_o_n_o_:_:_f_l_o_o_r (const _t_i_m_e___p_o_i_n_t< │ │ │ │ + ___T_o_D_u_r > >  ___C_l_o_c_k, _Dur > &_____t_p) │ │ │ │   │ │ │ │ +template │ │ │ │ + constexpr _c_h_r_o_n_o_:_:_h_o_u_r_s  _s_t_d_:_:_l_i_t_e_r_a_l_s_:_:_c_h_r_o_n_o___l_i_t_e_r_a_l_s_:_: │ │ │ │ + _o_p_e_r_a_t_o_r_"_"_h () │ │ │ │ +  │ │ │ │ + constexpr _c_h_r_o_n_o_:_:_d_u_r_a_t_i_o_n< long _s_t_d_:_:_l_i_t_e_r_a_l_s_:_:_c_h_r_o_n_o___l_i_t_e_r_a_l_s_:_: │ │ │ │ + double, _r_a_t_i_o< 3600, 1 > >  _o_p_e_r_a_t_o_r_"_"_h (long double _____h_o_u_r_s) │ │ │ │ +  │ │ │ │ +template │ │ │ │ + constexpr _c_h_r_o_n_o_:_:_m_i_n_u_t_e_s  _s_t_d_:_:_l_i_t_e_r_a_l_s_:_:_c_h_r_o_n_o___l_i_t_e_r_a_l_s_:_: │ │ │ │ + _o_p_e_r_a_t_o_r_"_"_m_i_n () │ │ │ │ +  │ │ │ │ + constexpr _c_h_r_o_n_o_:_:_d_u_r_a_t_i_o_n< long _s_t_d_:_:_l_i_t_e_r_a_l_s_:_:_c_h_r_o_n_o___l_i_t_e_r_a_l_s_:_: │ │ │ │ + double, _r_a_t_i_o< 60, 1 > >  _o_p_e_r_a_t_o_r_"_"_m_i_n (long double _____m_i_n_s) │ │ │ │ +  │ │ │ │ +template │ │ │ │ + constexpr _c_h_r_o_n_o_:_:_m_i_l_l_i_s_e_c_o_n_d_s  _s_t_d_:_:_l_i_t_e_r_a_l_s_:_:_c_h_r_o_n_o___l_i_t_e_r_a_l_s_:_: │ │ │ │ + _o_p_e_r_a_t_o_r_"_"_m_s () │ │ │ │ +  │ │ │ │ + constexpr _c_h_r_o_n_o_:_:_d_u_r_a_t_i_o_n< long _s_t_d_:_:_l_i_t_e_r_a_l_s_:_:_c_h_r_o_n_o___l_i_t_e_r_a_l_s_:_: │ │ │ │ + double, _m_i_l_l_i >  _o_p_e_r_a_t_o_r_"_"_m_s (long double _____m_s_e_c_s) │ │ │ │ +  │ │ │ │ +template │ │ │ │ + constexpr _c_h_r_o_n_o_:_:_n_a_n_o_s_e_c_o_n_d_s  _s_t_d_:_:_l_i_t_e_r_a_l_s_:_:_c_h_r_o_n_o___l_i_t_e_r_a_l_s_:_: │ │ │ │ + _o_p_e_r_a_t_o_r_"_"_n_s () │ │ │ │ +  │ │ │ │ + constexpr _c_h_r_o_n_o_:_:_d_u_r_a_t_i_o_n< long _s_t_d_:_:_l_i_t_e_r_a_l_s_:_:_c_h_r_o_n_o___l_i_t_e_r_a_l_s_:_: │ │ │ │ + double, _n_a_n_o >  _o_p_e_r_a_t_o_r_"_"_n_s (long double _____n_s_e_c_s) │ │ │ │ +  │ │ │ │ +template │ │ │ │ + constexpr _c_h_r_o_n_o_:_:_s_e_c_o_n_d_s  _s_t_d_:_:_l_i_t_e_r_a_l_s_:_:_c_h_r_o_n_o___l_i_t_e_r_a_l_s_:_: │ │ │ │ + _o_p_e_r_a_t_o_r_"_"_s () │ │ │ │ +  │ │ │ │ +constexpr _c_h_r_o_n_o_:_:_d_u_r_a_t_i_o_n< long double _s_t_d_:_:_l_i_t_e_r_a_l_s_:_:_c_h_r_o_n_o___l_i_t_e_r_a_l_s_:_: │ │ │ │ + >  _o_p_e_r_a_t_o_r_"_"_s (long double _____s_e_c_s) │ │ │ │ +  │ │ │ │ +template │ │ │ │ + constexpr _c_h_r_o_n_o_:_:_m_i_c_r_o_s_e_c_o_n_d_s  _s_t_d_:_:_l_i_t_e_r_a_l_s_:_:_c_h_r_o_n_o___l_i_t_e_r_a_l_s_:_: │ │ │ │ + _o_p_e_r_a_t_o_r_"_"_u_s () │ │ │ │ +  │ │ │ │ + constexpr _c_h_r_o_n_o_:_:_d_u_r_a_t_i_o_n< long _s_t_d_:_:_l_i_t_e_r_a_l_s_:_:_c_h_r_o_n_o___l_i_t_e_r_a_l_s_:_: │ │ │ │ + double, _m_i_c_r_o >  _o_p_e_r_a_t_o_r_"_"_u_s (long double _____u_s_e_c_s) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___T_o_D_u_r , _t_y_p_e_n_a_m_e _Rep , _t_y_p_e_n_a_m_e ___P_e_r_i_o_d > │ │ │ │ + constexpr _e_n_a_b_l_e___i_f___t< __and_< │ │ │ │ + _____i_s___d_u_r_a_t_i_o_n< ___T_o_D_u_r >, __not_< │ │ │ │ + _t_r_e_a_t___a_s___f_l_o_a_t_i_n_g___p_o_i_n_t< _t_y_p_e_n_a_m_e _s_t_d_:_:_c_h_r_o_n_o_:_:_r_o_u_n_d (const _d_u_r_a_t_i_o_n< │ │ │ │ + _ToDur::rep > > >::value, ___T_o_D_u_r >  _Rep, ___P_e_r_i_o_d > &__d) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___T_o_D_u_r , _t_y_p_e_n_a_m_e ___C_l_o_c_k , _t_y_p_e_n_a_m_e _Dur > │ │ │ │ + constexpr _e_n_a_b_l_e___i_f___t< __and_< │ │ │ │ + _____i_s___d_u_r_a_t_i_o_n< ___T_o_D_u_r >, __not_< │ │ │ │ + _t_r_e_a_t___a_s___f_l_o_a_t_i_n_g___p_o_i_n_t< _t_y_p_e_n_a_m_e │ │ │ │ + _ToDur::rep > > >::value, _t_i_m_e___p_o_i_n_t< _s_t_d_:_:_c_h_r_o_n_o_:_:_r_o_u_n_d (const _t_i_m_e___p_o_i_n_t< │ │ │ │ + ___C_l_o_c_k, ___T_o_D_u_r > >  ___C_l_o_c_k, _Dur > &_____t_p) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___T_o_D_u_r , _t_y_p_e_n_a_m_e ___C_l_o_c_k , _t_y_p_e_n_a_m_e _Dur > │ │ │ │ +constexpr _____e_n_a_b_l_e___i_f___t< _____i_s___d_u_r_a_t_i_o_n< │ │ │ │ + ___T_o_D_u_r >::value, _t_i_m_e___p_o_i_n_t< ___C_l_o_c_k, _s_t_d_:_:_c_h_r_o_n_o_:_:_t_i_m_e___p_o_i_n_t___c_a_s_t (const │ │ │ │ + ___T_o_D_u_r > >  _t_i_m_e___p_o_i_n_t< ___C_l_o_c_k, _Dur > &__t) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___R_e_p_1 , _t_y_p_e_n_a_m_e ___P_e_r_i_o_d_1 , _t_y_p_e_n_a_m_e ___R_e_p_2 , _t_y_p_e_n_a_m_e │ │ │ │ +___P_e_r_i_o_d_2 > │ │ │ │ +constexpr _c_o_m_m_o_n___t_y_p_e< _d_u_r_a_t_i_o_n< ___R_e_p_1, _s_t_d_:_:_c_h_r_o_n_o_:_:_o_p_e_r_a_t_o_r_- (const _d_u_r_a_t_i_o_n< │ │ │ │ +___P_e_r_i_o_d_1 >, _d_u_r_a_t_i_o_n< ___R_e_p_2, ___P_e_r_i_o_d_2 > ___R_e_p_1, ___P_e_r_i_o_d_1 > &_____l_h_s, const │ │ │ │ + >::type  _d_u_r_a_t_i_o_n< ___R_e_p_2, ___P_e_r_i_o_d_2 > &_____r_h_s) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___R_e_p_1 , _t_y_p_e_n_a_m_e ___P_e_r_i_o_d , _t_y_p_e_n_a_m_e ___R_e_p_2 > │ │ │ │ + constexpr _d_u_r_a_t_i_o_n< _____c_o_m_m_o_n___r_e_p___t< _s_t_d_:_:_c_h_r_o_n_o_:_:_o_p_e_r_a_t_o_r_% (const _d_u_r_a_t_i_o_n< │ │ │ │ + ___R_e_p_1, _____d_i_s_a_b_l_e___i_f___i_s___d_u_r_a_t_i_o_n< ___R_e_p_2 ___R_e_p_1, ___P_e_r_i_o_d > &__d, const ___R_e_p_2 │ │ │ │ + > >, ___P_e_r_i_o_d >  &_____s) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___R_e_p_1 , _t_y_p_e_n_a_m_e ___P_e_r_i_o_d_1 , _t_y_p_e_n_a_m_e ___R_e_p_2 , _t_y_p_e_n_a_m_e │ │ │ │ +___P_e_r_i_o_d_2 > │ │ │ │ +constexpr _c_o_m_m_o_n___t_y_p_e< _d_u_r_a_t_i_o_n< ___R_e_p_1, _s_t_d_:_:_c_h_r_o_n_o_:_:_o_p_e_r_a_t_o_r_% (const _d_u_r_a_t_i_o_n< │ │ │ │ +___P_e_r_i_o_d_1 >, _d_u_r_a_t_i_o_n< ___R_e_p_2, ___P_e_r_i_o_d_2 > ___R_e_p_1, ___P_e_r_i_o_d_1 > &_____l_h_s, const │ │ │ │ + >::type  _d_u_r_a_t_i_o_n< ___R_e_p_2, ___P_e_r_i_o_d_2 > &_____r_h_s) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___R_e_p_1 , _t_y_p_e_n_a_m_e ___R_e_p_2 , _t_y_p_e_n_a_m_e ___P_e_r_i_o_d > │ │ │ │ + constexpr _d_u_r_a_t_i_o_n< _____c_o_m_m_o_n___r_e_p___t< _s_t_d_:_:_c_h_r_o_n_o_:_:_o_p_e_r_a_t_o_r_* (const ___R_e_p_1 │ │ │ │ + ___R_e_p_2, ___R_e_p_1 >, ___P_e_r_i_o_d >  &_____s, const _d_u_r_a_t_i_o_n< ___R_e_p_2, ___P_e_r_i_o_d > │ │ │ │ + &__d) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___R_e_p_1 , _t_y_p_e_n_a_m_e ___P_e_r_i_o_d , _t_y_p_e_n_a_m_e ___R_e_p_2 > │ │ │ │ + constexpr _d_u_r_a_t_i_o_n< _____c_o_m_m_o_n___r_e_p___t< _s_t_d_:_:_c_h_r_o_n_o_:_:_o_p_e_r_a_t_o_r_/ (const _d_u_r_a_t_i_o_n< │ │ │ │ + ___R_e_p_1, _____d_i_s_a_b_l_e___i_f___i_s___d_u_r_a_t_i_o_n< ___R_e_p_2 ___R_e_p_1, ___P_e_r_i_o_d > &__d, const ___R_e_p_2 │ │ │ │ + > >, ___P_e_r_i_o_d >  &_____s) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___R_e_p_1 , _t_y_p_e_n_a_m_e ___P_e_r_i_o_d_1 , _t_y_p_e_n_a_m_e ___R_e_p_2 , _t_y_p_e_n_a_m_e │ │ │ │ +___P_e_r_i_o_d_2 > │ │ │ │ +constexpr _c_o_m_m_o_n___t_y_p_e< ___R_e_p_1, ___R_e_p_2 >:: _s_t_d_:_:_c_h_r_o_n_o_:_:_o_p_e_r_a_t_o_r_/ (const _d_u_r_a_t_i_o_n< │ │ │ │ + type  ___R_e_p_1, ___P_e_r_i_o_d_1 > &_____l_h_s, const │ │ │ │ + _d_u_r_a_t_i_o_n< ___R_e_p_2, ___P_e_r_i_o_d_2 > &_____r_h_s) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___R_e_p_1 , _t_y_p_e_n_a_m_e ___P_e_r_i_o_d_1 , _t_y_p_e_n_a_m_e ___R_e_p_2 , _t_y_p_e_n_a_m_e │ │ │ │ +___P_e_r_i_o_d_2 > │ │ │ │ + constexpr bool  _s_t_d_:_:_c_h_r_o_n_o_:_:_o_p_e_r_a_t_o_r_!_= (const │ │ │ │ + _d_u_r_a_t_i_o_n< ___R_e_p_1, ___P_e_r_i_o_d_1 > &_____l_h_s, │ │ │ │ + const _d_u_r_a_t_i_o_n< ___R_e_p_2, ___P_e_r_i_o_d_2 > │ │ │ │ + &_____r_h_s) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___R_e_p_1 , _t_y_p_e_n_a_m_e ___P_e_r_i_o_d_1 , _t_y_p_e_n_a_m_e ___R_e_p_2 , _t_y_p_e_n_a_m_e │ │ │ │ +___P_e_r_i_o_d_2 > │ │ │ │ + constexpr bool  _s_t_d_:_:_c_h_r_o_n_o_:_:_o_p_e_r_a_t_o_r_< (const _d_u_r_a_t_i_o_n< │ │ │ │ + ___R_e_p_1, ___P_e_r_i_o_d_1 > &_____l_h_s, const │ │ │ │ + _d_u_r_a_t_i_o_n< ___R_e_p_2, ___P_e_r_i_o_d_2 > &_____r_h_s) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___R_e_p_1 , _t_y_p_e_n_a_m_e ___P_e_r_i_o_d_1 , _t_y_p_e_n_a_m_e ___R_e_p_2 , _t_y_p_e_n_a_m_e │ │ │ │ +___P_e_r_i_o_d_2 > │ │ │ │ + constexpr bool  _s_t_d_:_:_c_h_r_o_n_o_:_:_o_p_e_r_a_t_o_r_<_= (const │ │ │ │ + _d_u_r_a_t_i_o_n< ___R_e_p_1, ___P_e_r_i_o_d_1 > &_____l_h_s, │ │ │ │ + const _d_u_r_a_t_i_o_n< ___R_e_p_2, ___P_e_r_i_o_d_2 > │ │ │ │ + &_____r_h_s) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___R_e_p_1 , _t_y_p_e_n_a_m_e ___P_e_r_i_o_d_1 , _t_y_p_e_n_a_m_e ___R_e_p_2 , _t_y_p_e_n_a_m_e │ │ │ │ +___P_e_r_i_o_d_2 > │ │ │ │ + constexpr bool  _s_t_d_:_:_c_h_r_o_n_o_:_:_o_p_e_r_a_t_o_r_> (const _d_u_r_a_t_i_o_n< │ │ │ │ + ___R_e_p_1, ___P_e_r_i_o_d_1 > &_____l_h_s, const │ │ │ │ + _d_u_r_a_t_i_o_n< ___R_e_p_2, ___P_e_r_i_o_d_2 > &_____r_h_s) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___R_e_p_1 , _t_y_p_e_n_a_m_e ___P_e_r_i_o_d_1 , _t_y_p_e_n_a_m_e ___R_e_p_2 , _t_y_p_e_n_a_m_e │ │ │ │ +___P_e_r_i_o_d_2 > │ │ │ │ + constexpr bool  _s_t_d_:_:_c_h_r_o_n_o_:_:_o_p_e_r_a_t_o_r_>_= (const │ │ │ │ + _d_u_r_a_t_i_o_n< ___R_e_p_1, ___P_e_r_i_o_d_1 > &_____l_h_s, │ │ │ │ + const _d_u_r_a_t_i_o_n< ___R_e_p_2, ___P_e_r_i_o_d_2 > │ │ │ │ + &_____r_h_s) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___R_e_p_1 , _t_y_p_e_n_a_m_e ___P_e_r_i_o_d_1 , _t_y_p_e_n_a_m_e ___C_l_o_c_k , _t_y_p_e_n_a_m_e ___D_u_r_2 │ │ │ │ +> │ │ │ │ + constexpr _t_i_m_e___p_o_i_n_t< ___C_l_o_c_k, _t_y_p_e_n_a_m_e _s_t_d_:_:_c_h_r_o_n_o_:_:_o_p_e_r_a_t_o_r_+ (const _d_u_r_a_t_i_o_n< │ │ │ │ + _c_o_m_m_o_n___t_y_p_e< _d_u_r_a_t_i_o_n< ___R_e_p_1, ___P_e_r_i_o_d_1 ___R_e_p_1, ___P_e_r_i_o_d_1 > &_____l_h_s, const │ │ │ │ + >, ___D_u_r_2 >::type >  _t_i_m_e___p_o_i_n_t< ___C_l_o_c_k, ___D_u_r_2 > &_____r_h_s) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___C_l_o_c_k , _t_y_p_e_n_a_m_e ___D_u_r_1 , _t_y_p_e_n_a_m_e ___R_e_p_2 , _t_y_p_e_n_a_m_e ___P_e_r_i_o_d_2 │ │ │ │ +> │ │ │ │ + constexpr _t_i_m_e___p_o_i_n_t< ___C_l_o_c_k, _t_y_p_e_n_a_m_e _s_t_d_:_:_c_h_r_o_n_o_:_:_o_p_e_r_a_t_o_r_- (const │ │ │ │ + _c_o_m_m_o_n___t_y_p_e< ___D_u_r_1, _d_u_r_a_t_i_o_n< ___R_e_p_2, _t_i_m_e___p_o_i_n_t< ___C_l_o_c_k, ___D_u_r_1 > &_____l_h_s, │ │ │ │ + ___P_e_r_i_o_d_2 > >::type >  const _d_u_r_a_t_i_o_n< ___R_e_p_2, ___P_e_r_i_o_d_2 > │ │ │ │ + &_____r_h_s) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___C_l_o_c_k , _t_y_p_e_n_a_m_e ___D_u_r_1 , _t_y_p_e_n_a_m_e ___D_u_r_2 > │ │ │ │ +constexpr _c_o_m_m_o_n___t_y_p_e< ___D_u_r_1, ___D_u_r_2 >:: _s_t_d_:_:_c_h_r_o_n_o_:_:_o_p_e_r_a_t_o_r_- (const │ │ │ │ + type  _t_i_m_e___p_o_i_n_t< ___C_l_o_c_k, ___D_u_r_1 > &_____l_h_s, │ │ │ │ + const _t_i_m_e___p_o_i_n_t< ___C_l_o_c_k, ___D_u_r_2 > │ │ │ │ + &_____r_h_s) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___C_l_o_c_k , _t_y_p_e_n_a_m_e ___D_u_r_1 , _t_y_p_e_n_a_m_e ___D_u_r_2 > │ │ │ │ + constexpr bool  _s_t_d_:_:_c_h_r_o_n_o_:_:_o_p_e_r_a_t_o_r_!_= (const │ │ │ │ + _t_i_m_e___p_o_i_n_t< ___C_l_o_c_k, ___D_u_r_1 > &_____l_h_s, │ │ │ │ + const _t_i_m_e___p_o_i_n_t< ___C_l_o_c_k, ___D_u_r_2 > │ │ │ │ + &_____r_h_s) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___C_l_o_c_k , _t_y_p_e_n_a_m_e ___D_u_r_1 , _t_y_p_e_n_a_m_e ___D_u_r_2 > │ │ │ │ + constexpr bool  _s_t_d_:_:_c_h_r_o_n_o_:_:_o_p_e_r_a_t_o_r_< (const │ │ │ │ + _t_i_m_e___p_o_i_n_t< ___C_l_o_c_k, ___D_u_r_1 > &_____l_h_s, │ │ │ │ + const _t_i_m_e___p_o_i_n_t< ___C_l_o_c_k, ___D_u_r_2 > │ │ │ │ + &_____r_h_s) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___C_l_o_c_k , _t_y_p_e_n_a_m_e ___D_u_r_1 , _t_y_p_e_n_a_m_e ___D_u_r_2 > │ │ │ │ + constexpr bool  _s_t_d_:_:_c_h_r_o_n_o_:_:_o_p_e_r_a_t_o_r_<_= (const │ │ │ │ + _t_i_m_e___p_o_i_n_t< ___C_l_o_c_k, ___D_u_r_1 > &_____l_h_s, │ │ │ │ + const _t_i_m_e___p_o_i_n_t< ___C_l_o_c_k, ___D_u_r_2 > │ │ │ │ + &_____r_h_s) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___C_l_o_c_k , _t_y_p_e_n_a_m_e ___D_u_r_1 , _t_y_p_e_n_a_m_e ___D_u_r_2 > │ │ │ │ + constexpr bool  _s_t_d_:_:_c_h_r_o_n_o_:_:_o_p_e_r_a_t_o_r_> (const │ │ │ │ + _t_i_m_e___p_o_i_n_t< ___C_l_o_c_k, ___D_u_r_1 > &_____l_h_s, │ │ │ │ + const _t_i_m_e___p_o_i_n_t< ___C_l_o_c_k, ___D_u_r_2 > │ │ │ │ + &_____r_h_s) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___C_l_o_c_k , _t_y_p_e_n_a_m_e ___D_u_r_1 , _t_y_p_e_n_a_m_e ___D_u_r_2 > │ │ │ │ + constexpr bool  _s_t_d_:_:_c_h_r_o_n_o_:_:_o_p_e_r_a_t_o_r_>_= (const │ │ │ │ + _t_i_m_e___p_o_i_n_t< ___C_l_o_c_k, ___D_u_r_1 > &_____l_h_s, │ │ │ │ + const _t_i_m_e___p_o_i_n_t< ___C_l_o_c_k, ___D_u_r_2 > │ │ │ │ + &_____r_h_s) │ │ │ │ +  │ │ │ │ +VVaarriiaabblleess │ │ │ │ template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ -_v_o_i_d  _s_t_d_:_:_t_h_r_o_w___w_i_t_h___n_e_s_t_e_d (_Tp &&__t) │ │ │ │ +constexpr bool  _s_t_d_:_:_c_h_r_o_n_o_:_:_i_s___c_l_o_c_k___v │ │ │ │ +  │ │ │ │ + template<> │ │ │ │ +constexpr bool  _s_t_d_:_:_c_h_r_o_n_o_:_:_i_s___c_l_o_c_k___v_<_ _f_i_l_e___c_l_o_c_k_ _> │ │ │ │ +  │ │ │ │ + template<> │ │ │ │ +constexpr bool  _s_t_d_:_:_c_h_r_o_n_o_:_:_i_s___c_l_o_c_k___v_<_ _s_t_e_a_d_y___c_l_o_c_k_ _> │ │ │ │ +  │ │ │ │ + template<> │ │ │ │ +constexpr bool  _s_t_d_:_:_c_h_r_o_n_o_:_:_i_s___c_l_o_c_k___v_<_ _s_y_s_t_e_m___c_l_o_c_k_ _> │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Rep > │ │ │ │ +constexpr bool  _s_t_d_:_:_c_h_r_o_n_o_:_:_t_r_e_a_t___a_s___f_l_o_a_t_i_n_g___p_o_i_n_t___v │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ This is an internal header file, included by other library headers. Do not │ │ │ │ -attempt to use it directly. Instead, include . │ │ │ │ -Definition in file _n_e_s_t_e_d___e_x_c_e_p_t_i_o_n_._h. │ │ │ │ +attempt to use it directly. Instead, include . │ │ │ │ +Definition in file _c_h_r_o_n_o_._h. │ │ │ │ +********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ +********** _?◆_? ____ccpppp__lliibb__cchhrroonnoo__uuddllss ********** │ │ │ │ +#define __cpp_lib_chrono_udls │ │ │ │ +Definition at line _1_2_9_7 of file _c_h_r_o_n_o_._h. │ │ │ │ * _b_i_t_s │ │ │ │ - * _n_e_s_t_e_d___e_x_c_e_p_t_i_o_n_._h │ │ │ │ + * _c_h_r_o_n_o_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-12-base/libstdc++/user/a00326.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,4 +1,48 @@ │ │ │ │ var a00326 = [ │ │ │ │ - ["rethrow_if_nested", "a00326.html#gab61c4f8fae83699092207e16594f6b35", null], │ │ │ │ - ["throw_with_nested", "a00326.html#gae6e361189fc8333896bebb3523551209", null] │ │ │ │ + ["days", "a00326.html#ga6ca12ba2604b71c2536a620a01071583", null], │ │ │ │ + ["high_resolution_clock", "a00326.html#gab7a77dbd412dfb55322139b683fe0084", null], │ │ │ │ + ["hours", "a00326.html#ga4e9b1d44e4c500ff23749d1d2191ab5a", null], │ │ │ │ + ["microseconds", "a00326.html#ga5688b0ad006994a28a4bb5c2fd1a715d", null], │ │ │ │ + ["milliseconds", "a00326.html#ga510b3a5514412e7b2499beecba11620a", null], │ │ │ │ + ["minutes", "a00326.html#gaa437f2da16ec4b9b701e8e4c4e414d44", null], │ │ │ │ + ["months", "a00326.html#gae8be7be5e00a7ab8bd0719d527f9c053", null], │ │ │ │ + ["nanoseconds", "a00326.html#ga731f6c493a0ae2b17b9080230c350f1e", null], │ │ │ │ + ["seconds", "a00326.html#ga2872cfa04b6162d31b737f1e21fefb3b", null], │ │ │ │ + ["weeks", "a00326.html#ga44756681d405bfd32989f08c88b8267e", null], │ │ │ │ + ["years", "a00326.html#gafae0ae39b54be93f5853c89492e00dc1", null], │ │ │ │ + ["abs", "a00326.html#ga7961e4f3035476266d1da46e03b221b8", null], │ │ │ │ + ["ceil", "a00326.html#gadad17194f38af8750d8339f40f782f3e", null], │ │ │ │ + ["ceil", "a00326.html#ga008725058aea011138ff2b801aecc1af", null], │ │ │ │ + ["duration_cast", "a00326.html#gaf83c060d5814bd12545e6638b695fa35", null], │ │ │ │ + ["floor", "a00326.html#ga1af25ada6fa51a76cab7f85aafe8a8ac", null], │ │ │ │ + ["floor", "a00326.html#ga4dc018e036979caf69ac81ec659d81ad", null], │ │ │ │ + ["operator!=", "a00326.html#ga6313df3718daec430065b47a353a8c8b", null], │ │ │ │ + ["operator\"\"h", "a00326.html#ga1e9ce474716982d5412d54f0b31cfe83", null], │ │ │ │ + ["operator\"\"h", "a00326.html#ga7b3f4b1b4de41cee51feb7c1360a7415", null], │ │ │ │ + ["operator\"\"min", "a00326.html#gad1645bdcc6bef25113322ffb40afb055", null], │ │ │ │ + ["operator\"\"min", "a00326.html#ga45ebd953aa3b3347b38942dbb5eb236a", null], │ │ │ │ + ["operator\"\"ms", "a00326.html#gacb53b4eca8f8403b4961eb4d73992f0f", null], │ │ │ │ + ["operator\"\"ms", "a00326.html#ga816139642b8ca2115499a6ed4f978bb5", null], │ │ │ │ + ["operator\"\"ns", "a00326.html#ga40735700c3e24f14212f5e05a2aa9cdf", null], │ │ │ │ + ["operator\"\"ns", "a00326.html#ga82298cd374b253d225d87afc14407d79", null], │ │ │ │ + ["operator\"\"s", "a00326.html#gae49b0942a0d85cf3270662695d1c18b2", null], │ │ │ │ + ["operator\"\"s", "a00326.html#ga5b081a48b204f13db454b753749f4832", null], │ │ │ │ + ["operator\"\"us", "a00326.html#ga31002adfb0b32dafe8e3d99af3a615ca", null], │ │ │ │ + ["operator\"\"us", "a00326.html#gae74279a912e28b01038d03eb7163af25", null], │ │ │ │ + ["operator%", "a00326.html#ga89292ce4685ed1acec57917b95078122", null], │ │ │ │ + ["operator%", "a00326.html#gaba5309ded419fee0700d9155befcba71", null], │ │ │ │ + ["operator*", "a00326.html#ga6edb3d16499759e43063499235313f28", null], │ │ │ │ + ["operator+", "a00326.html#gaa69f414c9d1944a4107c5085a6c1e89f", null], │ │ │ │ + ["operator-", "a00326.html#gad6f1e4c4804331c111b73ffd78bed831", null], │ │ │ │ + ["operator-", "a00326.html#ga94a63713be7db2528c3d8af1efc60f8b", null], │ │ │ │ + ["operator-", "a00326.html#gafcb921930536dc4f0955f4fc4a71c6db", null], │ │ │ │ + ["operator/", "a00326.html#gad96e9f7fe7b2ebd017909a985dddcfe0", null], │ │ │ │ + ["operator/", "a00326.html#ga875d781ffc7d293bbe3ca49532ee20b4", null], │ │ │ │ + ["operator<", "a00326.html#gaaffa3384e821547f00bf1ba2deb8f610", null], │ │ │ │ + ["operator<=", "a00326.html#ga40a8edd53345cf9206c212a37635c953", null], │ │ │ │ + ["operator>", "a00326.html#gad624d18e56659a8448b7e76471e9fe16", null], │ │ │ │ + ["operator>=", "a00326.html#ga59bc3e0c5d59be6820eb5237c27b59f2", null], │ │ │ │ + ["round", "a00326.html#ga3153121f776a9d16d42c84f1aca22c9d", null], │ │ │ │ + ["round", "a00326.html#gaa78a8c95b4c818faf05285481002b66c", null], │ │ │ │ + ["time_point_cast", "a00326.html#ga987897765b9f31fce92fa55bc6ca5afb", null] │ │ │ │ ]; │ │ ├── ./usr/share/doc/gcc-12-base/libstdc++/user/a00326_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: nested_exception.h Source File │ │ │ +libstdc++: chrono.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -45,20 +45,20 @@ │ │ │ │ │ │
│ │ │
│ │ │ -
nested_exception.h
│ │ │ +
chrono.h
│ │ │
│ │ │
│ │ │ -Go to the documentation of this file.
1// Nested Exception support header (nested_exception class) for -*- C++ -*-
│ │ │ +Go to the documentation of this file.
1// chrono::duration and chrono::time_point -*- C++ -*-
│ │ │
2
│ │ │ -
3// Copyright (C) 2009-2022 Free Software Foundation, Inc.
│ │ │ +
3// Copyright (C) 2008-2022 Free Software Foundation, Inc.
│ │ │
4//
│ │ │
5// This file is part of the GNU ISO C++ Library. This library is free
│ │ │
6// software; you can redistribute it and/or modify it under the
│ │ │
7// terms of the GNU General Public License as published by the
│ │ │
8// Free Software Foundation; either version 3, or (at your option)
│ │ │
9// any later version.
│ │ │
10
│ │ │ @@ -72,186 +72,1636 @@ │ │ │
18// 3.1, as published by the Free Software Foundation.
│ │ │
19
│ │ │
20// You should have received a copy of the GNU General Public License and
│ │ │
21// a copy of the GCC Runtime Library Exception along with this program;
│ │ │
22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
│ │ │
23// <http://www.gnu.org/licenses/>.
│ │ │
24
│ │ │ -
25/** @file bits/nested_exception.h
│ │ │ +
25/** @file include/bits/chrono.h
│ │ │
26 * This is an internal header file, included by other library headers.
│ │ │ -
27 * Do not attempt to use it directly. @headername{exception}
│ │ │ +
27 * Do not attempt to use it directly. @headername{chrono}
│ │ │
28 */
│ │ │
29
│ │ │ -
30#ifndef _GLIBCXX_NESTED_EXCEPTION_H
│ │ │ -
31#define _GLIBCXX_NESTED_EXCEPTION_H 1
│ │ │ +
30#ifndef _GLIBCXX_CHRONO_H
│ │ │ +
31#define _GLIBCXX_CHRONO_H 1
│ │ │
32
│ │ │ -
33#pragma GCC visibility push(default)
│ │ │ +
33#pragma GCC system_header
│ │ │
34
│ │ │ -
35#if __cplusplus < 201103L
│ │ │ -
36# include <bits/c++0x_warning.h>
│ │ │ -
37#else
│ │ │ -
38
│ │ │ -
39#include <bits/c++config.h>
│ │ │ -
40#include <bits/move.h>
│ │ │ -
41
│ │ │ -
42extern "C++" {
│ │ │ -
43
│ │ │ -
44namespace std
│ │ │ -
45{
│ │ │ -
46 /**
│ │ │ -
47 * @addtogroup exceptions
│ │ │ -
48 * @{
│ │ │ -
49 */
│ │ │ -
50
│ │ │ -
51 /// Exception class with exception_ptr data member.
│ │ │ -
│ │ │ - │ │ │ -
53 {
│ │ │ -
54 exception_ptr _M_ptr;
│ │ │ -
55
│ │ │ -
56 public:
│ │ │ -
57 nested_exception() noexcept : _M_ptr(current_exception()) { }
│ │ │ -
58
│ │ │ -
59 nested_exception(const nested_exception&) noexcept = default;
│ │ │ -
60
│ │ │ -
61 nested_exception& operator=(const nested_exception&) noexcept = default;
│ │ │ -
62
│ │ │ -
63 virtual ~nested_exception() noexcept;
│ │ │ -
64
│ │ │ -
65 [[noreturn]]
│ │ │ -
66 void
│ │ │ -
67 rethrow_nested() const
│ │ │ -
68 {
│ │ │ -
69 if (_M_ptr)
│ │ │ -
70 rethrow_exception(_M_ptr);
│ │ │ - │ │ │ -
72 }
│ │ │ -
73
│ │ │ - │ │ │ -
75 nested_ptr() const noexcept
│ │ │ -
76 { return _M_ptr; }
│ │ │ -
77 };
│ │ │ -
│ │ │ -
78
│ │ │ -
79 /// @cond undocumented
│ │ │ -
80
│ │ │ -
81 template<typename _Except>
│ │ │ -
82 struct _Nested_exception : public _Except, public nested_exception
│ │ │ -
83 {
│ │ │ -
84 explicit _Nested_exception(const _Except& __ex)
│ │ │ -
85 : _Except(__ex)
│ │ │ -
86 { }
│ │ │ -
87
│ │ │ -
88 explicit _Nested_exception(_Except&& __ex)
│ │ │ -
89 : _Except(static_cast<_Except&&>(__ex))
│ │ │ -
90 { }
│ │ │ -
91 };
│ │ │ -
92
│ │ │ -
93 // [except.nested]/8
│ │ │ -
94 // Throw an exception of unspecified type that is publicly derived from
│ │ │ -
95 // both remove_reference_t<_Tp> and nested_exception.
│ │ │ -
96 template<typename _Tp>
│ │ │ -
97 [[noreturn]]
│ │ │ -
98 inline void
│ │ │ -
99 __throw_with_nested_impl(_Tp&& __t, true_type)
│ │ │ -
100 {
│ │ │ -
101 using _Up = typename remove_reference<_Tp>::type;
│ │ │ -
102 throw _Nested_exception<_Up>{std::forward<_Tp>(__t)};
│ │ │ -
103 }
│ │ │ -
104
│ │ │ -
105 template<typename _Tp>
│ │ │ -
106 [[noreturn]]
│ │ │ -
107 inline void
│ │ │ -
108 __throw_with_nested_impl(_Tp&& __t, false_type)
│ │ │ -
109 { throw std::forward<_Tp>(__t); }
│ │ │ -
110
│ │ │ -
111 /// @endcond
│ │ │ -
112
│ │ │ -
113 /// If @p __t is derived from nested_exception, throws @p __t.
│ │ │ -
114 /// Else, throws an implementation-defined object derived from both.
│ │ │ -
115 template<typename _Tp>
│ │ │ -
116 [[noreturn]]
│ │ │ -
117 inline void
│ │ │ -
│ │ │ - │ │ │ -
119 {
│ │ │ -
120 using _Up = typename decay<_Tp>::type;
│ │ │ - │ │ │ - │ │ │ -
123 static_assert(_CopyConstructible::value,
│ │ │ -
124 "throw_with_nested argument must be CopyConstructible");
│ │ │ -
125 using __nest = __and_<is_class<_Up>, __bool_constant<!__is_final(_Up)>,
│ │ │ - │ │ │ - │ │ │ -
128 }
│ │ │ +
35#if __cplusplus >= 201103L
│ │ │ +
36
│ │ │ +
37#include <ratio>
│ │ │ +
38#include <type_traits>
│ │ │ +
39#include <limits>
│ │ │ +
40#include <ctime>
│ │ │ +
41#include <bits/parse_numbers.h> // for literals support.
│ │ │ +
42#if __cplusplus >= 202002L
│ │ │ +
43# include <concepts>
│ │ │ +
44# include <compare>
│ │ │ +
45#endif
│ │ │ +
46
│ │ │ +
47namespace std _GLIBCXX_VISIBILITY(default)
│ │ │ +
48{
│ │ │ +
49_GLIBCXX_BEGIN_NAMESPACE_VERSION
│ │ │ +
50
│ │ │ +
51#if __cplusplus >= 201703L
│ │ │ +
52 namespace filesystem { struct __file_clock; };
│ │ │ +
53#endif
│ │ │ +
54
│ │ │ +
55 namespace chrono
│ │ │ +
56 {
│ │ │ +
57 /// @addtogroup chrono
│ │ │ +
58 /// @{
│ │ │ +
59
│ │ │ +
60 /// `chrono::duration` represents a distance between two points in time
│ │ │ +
61 template<typename _Rep, typename _Period = ratio<1>>
│ │ │ +
62 class duration;
│ │ │ +
63
│ │ │ +
64 /// `chrono::time_point` represents a point in time as measured by a clock
│ │ │ +
65 template<typename _Clock, typename _Dur = typename _Clock::duration>
│ │ │ +
66 class time_point;
│ │ │ +
67 /// @}
│ │ │ +
68 }
│ │ │ +
69
│ │ │ +
70 /// @addtogroup chrono
│ │ │ +
71 /// @{
│ │ │ +
72
│ │ │ +
73 // 20.11.4.3 specialization of common_type (for duration, sfinae-friendly)
│ │ │ +
74
│ │ │ +
75 /// @cond undocumented
│ │ │ +
76
│ │ │ +
77 template<typename _CT, typename _Period1, typename _Period2, typename = void>
│ │ │ +
78 struct __duration_common_type
│ │ │ +
79 { };
│ │ │ +
80
│ │ │ +
81 template<typename _CT, typename _Period1, typename _Period2>
│ │ │ +
82 struct __duration_common_type<_CT, _Period1, _Period2,
│ │ │ +
83 __void_t<typename _CT::type>>
│ │ │ +
84 {
│ │ │ +
85 private:
│ │ │ +
86 using __gcd_num = __static_gcd<_Period1::num, _Period2::num>;
│ │ │ +
87 using __gcd_den = __static_gcd<_Period1::den, _Period2::den>;
│ │ │ +
88 using __cr = typename _CT::type;
│ │ │ +
89 using __r = ratio<__gcd_num::value,
│ │ │ +
90 (_Period1::den / __gcd_den::value) * _Period2::den>;
│ │ │ +
91
│ │ │ +
92 public:
│ │ │ +
93 using type = chrono::duration<__cr, typename __r::type>;
│ │ │ +
94 };
│ │ │ +
95
│ │ │ +
96 /// @endcond
│ │ │ +
97
│ │ │ +
98 /// @{
│ │ │ +
99 /// @relates chrono::duration
│ │ │ +
100
│ │ │ +
101 /// Specialization of common_type for chrono::duration types.
│ │ │ +
102 template<typename _Rep1, typename _Period1, typename _Rep2, typename _Period2>
│ │ │ +
│ │ │ +
103 struct common_type<chrono::duration<_Rep1, _Period1>,
│ │ │ +
104 chrono::duration<_Rep2, _Period2>>
│ │ │ +
105 : __duration_common_type<common_type<_Rep1, _Rep2>,
│ │ │ +
106 typename _Period1::type,
│ │ │ +
107 typename _Period2::type>
│ │ │ +
108 { };
│ │ │
│ │ │ +
109
│ │ │ +
110 /// Specialization of common_type for two identical chrono::duration types.
│ │ │ +
111 template<typename _Rep, typename _Period>
│ │ │ +
│ │ │ +
112 struct common_type<chrono::duration<_Rep, _Period>,
│ │ │ +
113 chrono::duration<_Rep, _Period>>
│ │ │ +
114 {
│ │ │ + │ │ │ +
116 typename _Period::type>;
│ │ │ +
117 };
│ │ │ +
│ │ │ +
118
│ │ │ +
119 /// Specialization of common_type for one chrono::duration type.
│ │ │ +
120 template<typename _Rep, typename _Period>
│ │ │ +
│ │ │ +
121 struct common_type<chrono::duration<_Rep, _Period>>
│ │ │ +
122 {
│ │ │ + │ │ │ +
124 typename _Period::type>;
│ │ │ +
125 };
│ │ │ +
│ │ │ +
126 /// @}
│ │ │ +
127
│ │ │ +
128 // 20.11.4.3 specialization of common_type (for time_point, sfinae-friendly)
│ │ │
129
│ │ │
130 /// @cond undocumented
│ │ │
131
│ │ │ -
132 // Determine if dynamic_cast<const nested_exception&> would be well-formed.
│ │ │ -
133 template<typename _Tp>
│ │ │ -
134 using __rethrow_if_nested_cond = typename enable_if<
│ │ │ -
135 __and_<is_polymorphic<_Tp>,
│ │ │ -
136 __or_<__not_<is_base_of<nested_exception, _Tp>>,
│ │ │ -
137 is_convertible<_Tp*, nested_exception*>>>::value
│ │ │ -
138 >::type;
│ │ │ -
139
│ │ │ -
140 // Attempt dynamic_cast to nested_exception and call rethrow_nested().
│ │ │ -
141 template<typename _Ex>
│ │ │ -
142 inline __rethrow_if_nested_cond<_Ex>
│ │ │ -
143 __rethrow_if_nested_impl(const _Ex* __ptr)
│ │ │ -
144 {
│ │ │ -
145 if (auto __ne_ptr = dynamic_cast<const nested_exception*>(__ptr))
│ │ │ -
146 __ne_ptr->rethrow_nested();
│ │ │ -
147 }
│ │ │ -
148
│ │ │ -
149 // Otherwise, no effects.
│ │ │ -
150 inline void
│ │ │ -
151 __rethrow_if_nested_impl(const void*)
│ │ │ -
152 { }
│ │ │ +
132 template<typename _CT, typename _Clock, typename = void>
│ │ │ +
133 struct __timepoint_common_type
│ │ │ +
134 { };
│ │ │ +
135
│ │ │ +
136 template<typename _CT, typename _Clock>
│ │ │ +
137 struct __timepoint_common_type<_CT, _Clock, __void_t<typename _CT::type>>
│ │ │ +
138 {
│ │ │ +
139 using type = chrono::time_point<_Clock, typename _CT::type>;
│ │ │ +
140 };
│ │ │ +
141
│ │ │ +
142 /// @endcond
│ │ │ +
143
│ │ │ +
144 /// @{
│ │ │ +
145 /// @relates chrono::time_point
│ │ │ +
146
│ │ │ +
147 /// Specialization of common_type for chrono::time_point types.
│ │ │ +
148 template<typename _Clock, typename _Duration1, typename _Duration2>
│ │ │ +
│ │ │ +
149 struct common_type<chrono::time_point<_Clock, _Duration1>,
│ │ │ +
150 chrono::time_point<_Clock, _Duration2>>
│ │ │ +
151 : __timepoint_common_type<common_type<_Duration1, _Duration2>, _Clock>
│ │ │ +
152 { };
│ │ │ +
│ │ │
153
│ │ │ -
154 /// @endcond
│ │ │ -
155
│ │ │ -
156 /// If @p __ex is derived from nested_exception, @p __ex.rethrow_nested().
│ │ │ -
157 template<typename _Ex>
│ │ │ -
158 inline void
│ │ │ -
│ │ │ - │ │ │ - │ │ │ -
│ │ │ -
161
│ │ │ -
162 /// @} group exceptions
│ │ │ -
163} // namespace std
│ │ │ -
164
│ │ │ -
165} // extern "C++"
│ │ │ -
166
│ │ │ -
167#endif // C++11
│ │ │ -
168
│ │ │ -
169#pragma GCC visibility pop
│ │ │ -
170
│ │ │ -
171#endif // _GLIBCXX_NESTED_EXCEPTION_H
│ │ │ - │ │ │ - │ │ │ - │ │ │ +
154 /// Specialization of common_type for two identical chrono::time_point types.
│ │ │ +
155 template<typename _Clock, typename _Duration>
│ │ │ +
│ │ │ +
156 struct common_type<chrono::time_point<_Clock, _Duration>,
│ │ │ +
157 chrono::time_point<_Clock, _Duration>>
│ │ │ + │ │ │ +
│ │ │ +
159
│ │ │ +
160 /// Specialization of common_type for one chrono::time_point type.
│ │ │ +
161 template<typename _Clock, typename _Duration>
│ │ │ +
│ │ │ +
162 struct common_type<chrono::time_point<_Clock, _Duration>>
│ │ │ + │ │ │ +
│ │ │ +
164 /// @}
│ │ │ +
165
│ │ │ +
166 /// @} group chrono
│ │ │ +
167
│ │ │ +
168 namespace chrono
│ │ │ +
169 {
│ │ │ +
170 /// @addtogroup chrono
│ │ │ +
171 /// @{
│ │ │ +
172
│ │ │ +
173 /// @cond undocumented
│ │ │ +
174
│ │ │ +
175 // Primary template for duration_cast impl.
│ │ │ +
176 template<typename _ToDur, typename _CF, typename _CR,
│ │ │ +
177 bool _NumIsOne = false, bool _DenIsOne = false>
│ │ │ + │ │ │ +
179 {
│ │ │ +
180 template<typename _Rep, typename _Period>
│ │ │ +
181 static constexpr _ToDur
│ │ │ + │ │ │ +
183 {
│ │ │ +
184 typedef typename _ToDur::rep __to_rep;
│ │ │ +
185 return _ToDur(static_cast<__to_rep>(static_cast<_CR>(__d.count())
│ │ │ +
186 * static_cast<_CR>(_CF::num)
│ │ │ +
187 / static_cast<_CR>(_CF::den)));
│ │ │ +
188 }
│ │ │ +
189 };
│ │ │ +
190
│ │ │ +
191 template<typename _ToDur, typename _CF, typename _CR>
│ │ │ +
192 struct __duration_cast_impl<_ToDur, _CF, _CR, true, true>
│ │ │ +
193 {
│ │ │ +
194 template<typename _Rep, typename _Period>
│ │ │ +
195 static constexpr _ToDur
│ │ │ +
196 __cast(const duration<_Rep, _Period>& __d)
│ │ │ +
197 {
│ │ │ +
198 typedef typename _ToDur::rep __to_rep;
│ │ │ +
199 return _ToDur(static_cast<__to_rep>(__d.count()));
│ │ │ +
200 }
│ │ │ +
201 };
│ │ │ +
202
│ │ │ +
203 template<typename _ToDur, typename _CF, typename _CR>
│ │ │ +
204 struct __duration_cast_impl<_ToDur, _CF, _CR, true, false>
│ │ │ +
205 {
│ │ │ +
206 template<typename _Rep, typename _Period>
│ │ │ +
207 static constexpr _ToDur
│ │ │ +
208 __cast(const duration<_Rep, _Period>& __d)
│ │ │ +
209 {
│ │ │ +
210 typedef typename _ToDur::rep __to_rep;
│ │ │ +
211 return _ToDur(static_cast<__to_rep>(
│ │ │ +
212 static_cast<_CR>(__d.count()) / static_cast<_CR>(_CF::den)));
│ │ │ +
213 }
│ │ │ +
214 };
│ │ │ +
215
│ │ │ +
216 template<typename _ToDur, typename _CF, typename _CR>
│ │ │ +
217 struct __duration_cast_impl<_ToDur, _CF, _CR, false, true>
│ │ │ +
218 {
│ │ │ +
219 template<typename _Rep, typename _Period>
│ │ │ +
220 static constexpr _ToDur
│ │ │ +
221 __cast(const duration<_Rep, _Period>& __d)
│ │ │ +
222 {
│ │ │ +
223 typedef typename _ToDur::rep __to_rep;
│ │ │ +
224 return _ToDur(static_cast<__to_rep>(
│ │ │ +
225 static_cast<_CR>(__d.count()) * static_cast<_CR>(_CF::num)));
│ │ │ +
226 }
│ │ │ +
227 };
│ │ │ +
228
│ │ │ +
229 template<typename _Tp>
│ │ │ +
230 struct __is_duration
│ │ │ + │ │ │ +
232 { };
│ │ │ +
233
│ │ │ +
234 template<typename _Rep, typename _Period>
│ │ │ +
235 struct __is_duration<duration<_Rep, _Period>>
│ │ │ + │ │ │ +
237 { };
│ │ │ +
238
│ │ │ +
239 template<typename _Tp>
│ │ │ +
240 using __enable_if_is_duration
│ │ │ +
241 = typename enable_if<__is_duration<_Tp>::value, _Tp>::type;
│ │ │ +
242
│ │ │ +
243 template<typename _Tp>
│ │ │ +
244 using __disable_if_is_duration
│ │ │ +
245 = typename enable_if<!__is_duration<_Tp>::value, _Tp>::type;
│ │ │ +
246
│ │ │ +
247 /// @endcond
│ │ │ +
248
│ │ │ +
249 /** Convert a `duration` to type `ToDur`.
│ │ │ +
250 *
│ │ │ +
251 * If the duration cannot be represented accurately in the result type,
│ │ │ +
252 * returns the result of integer truncation (i.e., rounded towards zero).
│ │ │ +
253 *
│ │ │ +
254 * @tparam _ToDur The result type must be a `duration`.
│ │ │ +
255 * @param __d A duration.
│ │ │ +
256 * @return The value of `__d` converted to type `_ToDur`.
│ │ │ +
257 * @since C++11
│ │ │ +
258 */
│ │ │ +
259 template<typename _ToDur, typename _Rep, typename _Period>
│ │ │ +
260 _GLIBCXX_NODISCARD
│ │ │ +
261 constexpr __enable_if_is_duration<_ToDur>
│ │ │ +
│ │ │ + │ │ │ +
263 {
│ │ │ +
264 typedef typename _ToDur::period __to_period;
│ │ │ +
265 typedef typename _ToDur::rep __to_rep;
│ │ │ + │ │ │ + │ │ │ + │ │ │ +
269 __cf::num == 1, __cf::den == 1> __dc;
│ │ │ +
270 return __dc::__cast(__d);
│ │ │ +
271 }
│ │ │ +
│ │ │ +
272
│ │ │ +
273 /** Trait indicating whether to treat a type as a floating-point type.
│ │ │ +
274 *
│ │ │ +
275 * The chrono library uses this trait to tell whether a `duration` can
│ │ │ +
276 * represent fractional values of the given precision, or only integral
│ │ │ +
277 * values.
│ │ │ +
278 *
│ │ │ +
279 * You should specialize this trait for your own numeric types that are
│ │ │ +
280 * used with `duration` and can represent non-integral values.
│ │ │ +
281 *
│ │ │ +
282 * @since C++11
│ │ │ +
283 */
│ │ │ +
284 template<typename _Rep>
│ │ │ +
│ │ │ + │ │ │ +
286 : is_floating_point<_Rep>
│ │ │ +
287 { };
│ │ │ +
│ │ │ +
288
│ │ │ +
289#if __cplusplus > 201402L
│ │ │ +
290 template <typename _Rep>
│ │ │ +
291 inline constexpr bool treat_as_floating_point_v =
│ │ │ + │ │ │ +
293#endif // C++17
│ │ │ +
294
│ │ │ +
295#if __cplusplus > 201703L
│ │ │ +
296 template<typename _Tp>
│ │ │ +
297 struct is_clock;
│ │ │ +
298
│ │ │ +
299 template<typename _Tp>
│ │ │ +
300 inline constexpr bool is_clock_v = is_clock<_Tp>::value;
│ │ │ +
301
│ │ │ +
302#if __cpp_lib_concepts
│ │ │ +
303 template<typename _Tp>
│ │ │ +
304 struct is_clock : false_type
│ │ │ +
305 { };
│ │ │ +
306
│ │ │ +
307 template<typename _Tp>
│ │ │ +
308 requires requires {
│ │ │ +
309 typename _Tp::rep;
│ │ │ +
310 typename _Tp::period;
│ │ │ +
311 typename _Tp::duration;
│ │ │ +
312 typename _Tp::time_point::clock;
│ │ │ +
313 typename _Tp::time_point::duration;
│ │ │ +
314 { &_Tp::is_steady } -> same_as<const bool*>;
│ │ │ +
315 { _Tp::now() } -> same_as<typename _Tp::time_point>;
│ │ │ +
316 requires same_as<typename _Tp::duration,
│ │ │ +
317 duration<typename _Tp::rep, typename _Tp::period>>;
│ │ │ +
318 requires same_as<typename _Tp::time_point::duration,
│ │ │ +
319 typename _Tp::duration>;
│ │ │ +
320 }
│ │ │ +
321 struct is_clock<_Tp> : true_type
│ │ │ +
322 { };
│ │ │ +
323#else
│ │ │ +
324 template<typename _Tp, typename = void>
│ │ │ +
325 struct __is_clock_impl : false_type
│ │ │ +
326 { };
│ │ │ +
327
│ │ │ +
328 template<typename _Tp>
│ │ │ +
329 struct __is_clock_impl<_Tp,
│ │ │ +
330 void_t<typename _Tp::rep, typename _Tp::period,
│ │ │ +
331 typename _Tp::duration,
│ │ │ +
332 typename _Tp::time_point::duration,
│ │ │ +
333 decltype(_Tp::is_steady),
│ │ │ +
334 decltype(_Tp::now())>>
│ │ │ +
335 : __and_<is_same<typename _Tp::duration,
│ │ │ +
336 duration<typename _Tp::rep, typename _Tp::period>>,
│ │ │ +
337 is_same<typename _Tp::time_point::duration,
│ │ │ +
338 typename _Tp::duration>,
│ │ │ +
339 is_same<decltype(&_Tp::is_steady), const bool*>,
│ │ │ +
340 is_same<decltype(_Tp::now()), typename _Tp::time_point>>::type
│ │ │ +
341 { };
│ │ │ +
342
│ │ │ +
343 template<typename _Tp>
│ │ │ +
344 struct is_clock : __is_clock_impl<_Tp>::type
│ │ │ +
345 { };
│ │ │ +
346#endif
│ │ │ +
347#endif // C++20
│ │ │ +
348
│ │ │ +
349#if __cplusplus >= 201703L
│ │ │ +
350# define __cpp_lib_chrono 201611L
│ │ │ +
351
│ │ │ +
352 /** Convert a `duration` to type `ToDur` and round down.
│ │ │ +
353 *
│ │ │ +
354 * If the duration cannot be represented exactly in the result type,
│ │ │ +
355 * returns the closest value that is less than the argument.
│ │ │ +
356 *
│ │ │ +
357 * @tparam _ToDur The result type must be a `duration`.
│ │ │ +
358 * @param __d A duration.
│ │ │ +
359 * @return The value of `__d` converted to type `_ToDur`.
│ │ │ +
360 * @since C++17
│ │ │ +
361 */
│ │ │ +
362 template<typename _ToDur, typename _Rep, typename _Period>
│ │ │ +
363 [[nodiscard]] constexpr __enable_if_is_duration<_ToDur>
│ │ │ +
│ │ │ +
364 floor(const duration<_Rep, _Period>& __d)
│ │ │ +
365 {
│ │ │ +
366 auto __to = chrono::duration_cast<_ToDur>(__d);
│ │ │ +
367 if (__to > __d)
│ │ │ +
368 return __to - _ToDur{1};
│ │ │ +
369 return __to;
│ │ │ +
370 }
│ │ │ +
│ │ │ +
371
│ │ │ +
372 /** Convert a `duration` to type `ToDur` and round up.
│ │ │ +
373 *
│ │ │ +
374 * If the duration cannot be represented exactly in the result type,
│ │ │ +
375 * returns the closest value that is greater than the argument.
│ │ │ +
376 *
│ │ │ +
377 * @tparam _ToDur The result type must be a `duration`.
│ │ │ +
378 * @param __d A duration.
│ │ │ +
379 * @return The value of `__d` converted to type `_ToDur`.
│ │ │ +
380 * @since C++17
│ │ │ +
381 */
│ │ │ +
382 template<typename _ToDur, typename _Rep, typename _Period>
│ │ │ + │ │ │ +
│ │ │ +
384 ceil(const duration<_Rep, _Period>& __d)
│ │ │ +
385 {
│ │ │ +
386 auto __to = chrono::duration_cast<_ToDur>(__d);
│ │ │ +
387 if (__to < __d)
│ │ │ +
388 return __to + _ToDur{1};
│ │ │ +
389 return __to;
│ │ │ +
390 }
│ │ │ +
│ │ │ +
391
│ │ │ +
392 /** Convert a `duration` to type `ToDur` and round to the closest value.
│ │ │ +
393 *
│ │ │ +
394 * If the duration cannot be represented exactly in the result type,
│ │ │ +
395 * returns the closest value, rounding ties to even.
│ │ │ +
396 *
│ │ │ +
397 * @tparam _ToDur The result type must be a `duration` with a
│ │ │ +
398 * non-floating-point `rep` type.
│ │ │ +
399 * @param __d A duration.
│ │ │ +
400 * @return The value of `__d` converted to type `_ToDur`.
│ │ │ +
401 * @since C++17
│ │ │ +
402 */
│ │ │ +
403 template <typename _ToDur, typename _Rep, typename _Period>
│ │ │ +
404 [[nodiscard]] constexpr
│ │ │ + │ │ │ + │ │ │ + │ │ │ +
408 _ToDur>
│ │ │ +
│ │ │ + │ │ │ +
410 {
│ │ │ +
411 _ToDur __t0 = chrono::floor<_ToDur>(__d);
│ │ │ +
412 _ToDur __t1 = __t0 + _ToDur{1};
│ │ │ +
413 auto __diff0 = __d - __t0;
│ │ │ +
414 auto __diff1 = __t1 - __d;
│ │ │ +
415 if (__diff0 == __diff1)
│ │ │ +
416 {
│ │ │ +
417 if (__t0.count() & 1)
│ │ │ +
418 return __t1;
│ │ │ +
419 return __t0;
│ │ │ +
420 }
│ │ │ +
421 else if (__diff0 < __diff1)
│ │ │ +
422 return __t0;
│ │ │ +
423 return __t1;
│ │ │ +
424 }
│ │ │ +
│ │ │ +
425
│ │ │ +
426 /** The absolute (non-negative) value of a duration.
│ │ │ +
427 *
│ │ │ +
428 * @param __d A duration with a signed `rep` type.
│ │ │ +
429 * @return A duration of the same type as the argument, with value |d|.
│ │ │ +
430 * @since C++17
│ │ │ +
431 */
│ │ │ +
432 template<typename _Rep, typename _Period>
│ │ │ +
433 [[nodiscard]] constexpr
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
436 {
│ │ │ +
437 if (__d >= __d.zero())
│ │ │ +
438 return __d;
│ │ │ +
439 return -__d;
│ │ │ +
440 }
│ │ │ +
│ │ │ +
441
│ │ │ +
442 // Make chrono::ceil<D> also usable as chrono::__detail::ceil<D>.
│ │ │ +
443 namespace __detail { using chrono::ceil; }
│ │ │ +
444
│ │ │ +
445#else // ! C++17
│ │ │ +
446
│ │ │ +
447 // We want to use ceil even when compiling for earlier standards versions.
│ │ │ +
448 // C++11 only allows a single statement in a constexpr function, so we
│ │ │ +
449 // need to move the comparison into a separate function, __ceil_impl.
│ │ │ +
450 namespace __detail
│ │ │ +
451 {
│ │ │ +
452 template<typename _Tp, typename _Up>
│ │ │ +
453 constexpr _Tp
│ │ │ +
454 __ceil_impl(const _Tp& __t, const _Up& __u)
│ │ │ +
455 {
│ │ │ +
456 return (__t < __u) ? (__t + _Tp{1}) : __t;
│ │ │ +
457 }
│ │ │ +
458
│ │ │ +
459 // C++11-friendly version of std::chrono::ceil<D> for internal use.
│ │ │ +
460 template<typename _ToDur, typename _Rep, typename _Period>
│ │ │ +
461 constexpr _ToDur
│ │ │ +
462 ceil(const duration<_Rep, _Period>& __d)
│ │ │ +
463 {
│ │ │ +
464 return __detail::__ceil_impl(chrono::duration_cast<_ToDur>(__d), __d);
│ │ │ +
465 }
│ │ │ +
466 }
│ │ │ +
467#endif // C++17
│ │ │ +
468
│ │ │ +
469 /// duration_values
│ │ │ +
470 template<typename _Rep>
│ │ │ +
│ │ │ + │ │ │ +
472 {
│ │ │ +
473 static constexpr _Rep
│ │ │ +
474 zero() noexcept
│ │ │ +
475 { return _Rep(0); }
│ │ │ +
476
│ │ │ +
477 static constexpr _Rep
│ │ │ +
478 max() noexcept
│ │ │ +
479 { return numeric_limits<_Rep>::max(); }
│ │ │ +
480
│ │ │ +
481 static constexpr _Rep
│ │ │ +
482 min() noexcept
│ │ │ +
483 { return numeric_limits<_Rep>::lowest(); }
│ │ │ +
484 };
│ │ │ +
│ │ │ +
485
│ │ │ +
486 template<typename _Rep, typename _Period>
│ │ │ +
│ │ │ + │ │ │ +
488 {
│ │ │ +
489 static_assert(!__is_duration<_Rep>::value,
│ │ │ +
490 "rep cannot be a std::chrono::duration");
│ │ │ +
491 static_assert(__is_ratio<_Period>::value,
│ │ │ +
492 "period must be a specialization of std::ratio");
│ │ │ +
493 static_assert(_Period::num > 0, "period must be positive");
│ │ │ +
494
│ │ │ +
495 template<typename _Rep2>
│ │ │ + │ │ │ +
497
│ │ │ +
498 static constexpr intmax_t
│ │ │ +
499 _S_gcd(intmax_t __m, intmax_t __n) noexcept
│ │ │ +
500 {
│ │ │ +
501 // Duration only allows positive periods so we don't need to
│ │ │ +
502 // handle negative values here (unlike __static_gcd and std::gcd).
│ │ │ +
503#if __cplusplus >= 201402L
│ │ │ +
504 do
│ │ │ +
505 {
│ │ │ +
506 intmax_t __rem = __m % __n;
│ │ │ +
507 __m = __n;
│ │ │ +
508 __n = __rem;
│ │ │ +
509 }
│ │ │ +
510 while (__n != 0);
│ │ │ +
511 return __m;
│ │ │ +
512#else
│ │ │ +
513 // C++11 doesn't allow loops in constexpr functions, but this
│ │ │ +
514 // recursive version can be more expensive to evaluate.
│ │ │ +
515 return (__n == 0) ? __m : _S_gcd(__n, __m % __n);
│ │ │ +
516#endif
│ │ │ +
517 }
│ │ │ +
518
│ │ │ +
519 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ +
520 // 2094. overflow shouldn't participate in overload resolution
│ │ │ +
521 // 3090. What is [2094] intended to mean?
│ │ │ +
522 // This only produces a valid type if no overflow occurs.
│ │ │ +
523 template<typename _R1, typename _R2,
│ │ │ +
524 intmax_t __gcd1 = _S_gcd(_R1::num, _R2::num),
│ │ │ +
525 intmax_t __gcd2 = _S_gcd(_R1::den, _R2::den)>
│ │ │ +
526 using __divide = ratio<(_R1::num / __gcd1) * (_R2::den / __gcd2),
│ │ │ +
527 (_R1::den / __gcd2) * (_R2::num / __gcd1)>;
│ │ │ +
528
│ │ │ +
529 // _Period2 is an exact multiple of _Period
│ │ │ +
530 template<typename _Period2>
│ │ │ +
531 using __is_harmonic
│ │ │ + │ │ │ +
533
│ │ │ +
534 public:
│ │ │ +
535
│ │ │ +
536 using rep = _Rep;
│ │ │ +
537 using period = typename _Period::type;
│ │ │ +
538
│ │ │ +
539 // 20.11.5.1 construction / copy / destroy
│ │ │ +
540 constexpr duration() = default;
│ │ │ +
541
│ │ │ +
542 duration(const duration&) = default;
│ │ │ +
543
│ │ │ +
544 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ +
545 // 3050. Conversion specification problem in chrono::duration
│ │ │ +
546 template<typename _Rep2, typename = _Require<
│ │ │ + │ │ │ + │ │ │ +
549 constexpr explicit duration(const _Rep2& __rep)
│ │ │ +
550 : __r(static_cast<rep>(__rep)) { }
│ │ │ +
551
│ │ │ +
552 template<typename _Rep2, typename _Period2, typename = _Require<
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
557 constexpr duration(const duration<_Rep2, _Period2>& __d)
│ │ │ +
558 : __r(duration_cast<duration>(__d).count()) { }
│ │ │ +
559
│ │ │ +
560 ~duration() = default;
│ │ │ +
561 duration& operator=(const duration&) = default;
│ │ │ +
562
│ │ │ +
563 // 20.11.5.2 observer
│ │ │ +
564 constexpr rep
│ │ │ +
565 count() const
│ │ │ +
566 { return __r; }
│ │ │ +
567
│ │ │ +
568 // 20.11.5.3 arithmetic
│ │ │ +
569
│ │ │ + │ │ │ +
571 operator+() const
│ │ │ +
572 { return duration<typename common_type<rep>::type, period>(__r); }
│ │ │ +
573
│ │ │ + │ │ │ +
575 operator-() const
│ │ │ +
576 { return duration<typename common_type<rep>::type, period>(-__r); }
│ │ │ +
577
│ │ │ + │ │ │ +
579 operator++()
│ │ │ +
580 {
│ │ │ +
581 ++__r;
│ │ │ +
582 return *this;
│ │ │ +
583 }
│ │ │ +
584
│ │ │ + │ │ │ +
586 operator++(int)
│ │ │ +
587 { return duration(__r++); }
│ │ │ +
588
│ │ │ + │ │ │ +
590 operator--()
│ │ │ +
591 {
│ │ │ +
592 --__r;
│ │ │ +
593 return *this;
│ │ │ +
594 }
│ │ │ +
595
│ │ │ + │ │ │ +
597 operator--(int)
│ │ │ +
598 { return duration(__r--); }
│ │ │ +
599
│ │ │ + │ │ │ +
601 operator+=(const duration& __d)
│ │ │ +
602 {
│ │ │ +
603 __r += __d.count();
│ │ │ +
604 return *this;
│ │ │ +
605 }
│ │ │ +
606
│ │ │ + │ │ │ +
608 operator-=(const duration& __d)
│ │ │ +
609 {
│ │ │ +
610 __r -= __d.count();
│ │ │ +
611 return *this;
│ │ │ +
612 }
│ │ │ +
613
│ │ │ + │ │ │ +
615 operator*=(const rep& __rhs)
│ │ │ +
616 {
│ │ │ +
617 __r *= __rhs;
│ │ │ +
618 return *this;
│ │ │ +
619 }
│ │ │ +
620
│ │ │ + │ │ │ +
622 operator/=(const rep& __rhs)
│ │ │ +
623 {
│ │ │ +
624 __r /= __rhs;
│ │ │ +
625 return *this;
│ │ │ +
626 }
│ │ │ +
627
│ │ │ +
628 // DR 934.
│ │ │ +
629 template<typename _Rep2 = rep>
│ │ │ + │ │ │ + │ │ │ +
632 duration&>::type
│ │ │ +
633 operator%=(const rep& __rhs)
│ │ │ +
634 {
│ │ │ +
635 __r %= __rhs;
│ │ │ +
636 return *this;
│ │ │ +
637 }
│ │ │ +
638
│ │ │ +
639 template<typename _Rep2 = rep>
│ │ │ + │ │ │ + │ │ │ +
642 duration&>::type
│ │ │ +
643 operator%=(const duration& __d)
│ │ │ +
644 {
│ │ │ +
645 __r %= __d.count();
│ │ │ +
646 return *this;
│ │ │ +
647 }
│ │ │ +
648
│ │ │ +
649 // 20.11.5.4 special values
│ │ │ +
650 static constexpr duration
│ │ │ +
651 zero() noexcept
│ │ │ + │ │ │ +
653
│ │ │ +
654 static constexpr duration
│ │ │ +
655 min() noexcept
│ │ │ + │ │ │ +
657
│ │ │ +
658 static constexpr duration
│ │ │ +
659 max() noexcept
│ │ │ + │ │ │ +
661
│ │ │ +
662 private:
│ │ │ +
663 rep __r;
│ │ │ +
664 };
│ │ │ +
│ │ │ +
665
│ │ │ +
666 /// @{
│ │ │ +
667 /// @relates std::chrono::duration
│ │ │ +
668
│ │ │ +
669 /// The sum of two durations.
│ │ │ +
670 template<typename _Rep1, typename _Period1,
│ │ │ +
671 typename _Rep2, typename _Period2>
│ │ │ +
672 constexpr typename common_type<duration<_Rep1, _Period1>,
│ │ │ + │ │ │ +
│ │ │ + │ │ │ + │ │ │ +
676 {
│ │ │ + │ │ │ + │ │ │ +
679 typedef typename common_type<__dur1,__dur2>::type __cd;
│ │ │ +
680 return __cd(__cd(__lhs).count() + __cd(__rhs).count());
│ │ │ +
681 }
│ │ │ +
│ │ │ +
682
│ │ │ +
683 /// The difference between two durations.
│ │ │ +
684 template<typename _Rep1, typename _Period1,
│ │ │ +
685 typename _Rep2, typename _Period2>
│ │ │ +
686 constexpr typename common_type<duration<_Rep1, _Period1>,
│ │ │ + │ │ │ +
│ │ │ + │ │ │ + │ │ │ +
690 {
│ │ │ + │ │ │ + │ │ │ +
693 typedef typename common_type<__dur1,__dur2>::type __cd;
│ │ │ +
694 return __cd(__cd(__lhs).count() - __cd(__rhs).count());
│ │ │ +
695 }
│ │ │ +
│ │ │ +
696
│ │ │ +
697 /// @}
│ │ │ +
698
│ │ │ +
699 /// @cond undocumented
│ │ │ +
700
│ │ │ +
701 // SFINAE helper to obtain common_type<_Rep1, _Rep2> only if _Rep2
│ │ │ +
702 // is implicitly convertible to it.
│ │ │ +
703 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ +
704 // 3050. Conversion specification problem in chrono::duration constructor
│ │ │ +
705 template<typename _Rep1, typename _Rep2,
│ │ │ +
706 typename _CRep = typename common_type<_Rep1, _Rep2>::type>
│ │ │ +
707 using __common_rep_t = typename
│ │ │ + │ │ │ +
709
│ │ │ +
710 /// @endcond
│ │ │ +
711
│ │ │ +
712 /** @{
│ │ │ +
713 * Arithmetic operators for chrono::duration
│ │ │ +
714 * @relates std::chrono::duration
│ │ │ +
715 */
│ │ │ +
716
│ │ │ +
717 template<typename _Rep1, typename _Period, typename _Rep2>
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
720 {
│ │ │ + │ │ │ +
722 __cd;
│ │ │ +
723 return __cd(__cd(__d).count() * __s);
│ │ │ +
724 }
│ │ │ +
│ │ │ +
725
│ │ │ +
726 template<typename _Rep1, typename _Rep2, typename _Period>
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
729 { return __d * __s; }
│ │ │ +
│ │ │ +
730
│ │ │ +
731 template<typename _Rep1, typename _Period, typename _Rep2>
│ │ │ +
732 constexpr
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
735 {
│ │ │ + │ │ │ +
737 __cd;
│ │ │ +
738 return __cd(__cd(__d).count() / __s);
│ │ │ +
739 }
│ │ │ +
│ │ │ +
740
│ │ │ +
741 template<typename _Rep1, typename _Period1,
│ │ │ +
742 typename _Rep2, typename _Period2>
│ │ │ +
743 constexpr typename common_type<_Rep1, _Rep2>::type
│ │ │ +
│ │ │ + │ │ │ + │ │ │ +
746 {
│ │ │ + │ │ │ + │ │ │ +
749 typedef typename common_type<__dur1,__dur2>::type __cd;
│ │ │ +
750 return __cd(__lhs).count() / __cd(__rhs).count();
│ │ │ +
751 }
│ │ │ +
│ │ │ +
752
│ │ │ +
753 // DR 934.
│ │ │ +
754 template<typename _Rep1, typename _Period, typename _Rep2>
│ │ │ +
755 constexpr
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
758 {
│ │ │ + │ │ │ +
760 __cd;
│ │ │ +
761 return __cd(__cd(__d).count() % __s);
│ │ │ +
762 }
│ │ │ +
│ │ │ +
763
│ │ │ +
764 template<typename _Rep1, typename _Period1,
│ │ │ +
765 typename _Rep2, typename _Period2>
│ │ │ +
766 constexpr typename common_type<duration<_Rep1, _Period1>,
│ │ │ + │ │ │ +
│ │ │ + │ │ │ + │ │ │ +
770 {
│ │ │ + │ │ │ + │ │ │ +
773 typedef typename common_type<__dur1,__dur2>::type __cd;
│ │ │ +
774 return __cd(__cd(__lhs).count() % __cd(__rhs).count());
│ │ │ +
775 }
│ │ │ +
│ │ │ +
776 /// @}
│ │ │ +
777
│ │ │ +
778 // comparisons
│ │ │ +
779
│ │ │ +
780 /** @{
│ │ │ +
781 * Comparisons for chrono::duration
│ │ │ +
782 * @relates std::chrono::duration
│ │ │ +
783 */
│ │ │ +
784
│ │ │ +
785 template<typename _Rep1, typename _Period1,
│ │ │ +
786 typename _Rep2, typename _Period2>
│ │ │ +
787 constexpr bool
│ │ │ +
│ │ │ + │ │ │ + │ │ │ +
790 {
│ │ │ + │ │ │ + │ │ │ +
793 typedef typename common_type<__dur1,__dur2>::type __ct;
│ │ │ +
794 return __ct(__lhs).count() == __ct(__rhs).count();
│ │ │ +
795 }
│ │ │ +
│ │ │ +
796
│ │ │ +
797 template<typename _Rep1, typename _Period1,
│ │ │ +
798 typename _Rep2, typename _Period2>
│ │ │ +
│ │ │ +
799 constexpr bool
│ │ │ + │ │ │ + │ │ │ +
802 {
│ │ │ + │ │ │ + │ │ │ +
805 typedef typename common_type<__dur1,__dur2>::type __ct;
│ │ │ +
806 return __ct(__lhs).count() < __ct(__rhs).count();
│ │ │ +
807 }
│ │ │ +
│ │ │ +
808
│ │ │ +
809#if __cpp_lib_three_way_comparison
│ │ │ +
810 template<typename _Rep1, typename _Period1,
│ │ │ +
811 typename _Rep2, typename _Period2>
│ │ │ + │ │ │ +
813 constexpr auto
│ │ │ +
814 operator<=>(const duration<_Rep1, _Period1>& __lhs,
│ │ │ + │ │ │ +
816 {
│ │ │ + │ │ │ + │ │ │ +
819 return __ct(__lhs).count() <=> __ct(__rhs).count();
│ │ │ +
820 }
│ │ │ +
821#else
│ │ │ +
822 template<typename _Rep1, typename _Period1,
│ │ │ +
823 typename _Rep2, typename _Period2>
│ │ │ +
824 constexpr bool
│ │ │ +
│ │ │ + │ │ │ + │ │ │ +
827 { return !(__lhs == __rhs); }
│ │ │ +
│ │ │ +
828#endif
│ │ │ +
829
│ │ │ +
830 template<typename _Rep1, typename _Period1,
│ │ │ +
831 typename _Rep2, typename _Period2>
│ │ │ +
│ │ │ +
832 constexpr bool
│ │ │ + │ │ │ + │ │ │ +
835 { return !(__rhs < __lhs); }
│ │ │ +
│ │ │ +
836
│ │ │ +
837 template<typename _Rep1, typename _Period1,
│ │ │ +
838 typename _Rep2, typename _Period2>
│ │ │ +
839 constexpr bool
│ │ │ +
│ │ │ + │ │ │ + │ │ │ +
842 { return __rhs < __lhs; }
│ │ │ +
│ │ │ +
843
│ │ │ +
844 template<typename _Rep1, typename _Period1,
│ │ │ +
845 typename _Rep2, typename _Period2>
│ │ │ +
846 constexpr bool
│ │ │ +
│ │ │ + │ │ │ + │ │ │ +
849 { return !(__lhs < __rhs); }
│ │ │ +
│ │ │ +
850
│ │ │ +
851 /// @}
│ │ │ +
852
│ │ │ +
853 /// @cond undocumented
│ │ │ +
854#ifdef _GLIBCXX_USE_C99_STDINT_TR1
│ │ │ +
855# define _GLIBCXX_CHRONO_INT64_T int64_t
│ │ │ +
856#elif defined __INT64_TYPE__
│ │ │ +
857# define _GLIBCXX_CHRONO_INT64_T __INT64_TYPE__
│ │ │ +
858#else
│ │ │ + │ │ │ +
860 "Representation type for nanoseconds must have at least 64 bits");
│ │ │ +
861# define _GLIBCXX_CHRONO_INT64_T long long
│ │ │ +
862#endif
│ │ │ +
863 /// @endcond
│ │ │ +
864
│ │ │ +
865 /// nanoseconds
│ │ │ + │ │ │ +
867
│ │ │ +
868 /// microseconds
│ │ │ + │ │ │ +
870
│ │ │ +
871 /// milliseconds
│ │ │ + │ │ │ +
873
│ │ │ +
874 /// seconds
│ │ │ + │ │ │ +
876
│ │ │ +
877 /// minutes
│ │ │ + │ │ │ +
879
│ │ │ +
880 /// hours
│ │ │ + │ │ │ +
882
│ │ │ +
883#if __cplusplus > 201703L
│ │ │ +
884 /// days
│ │ │ + │ │ │ +
886
│ │ │ +
887 /// weeks
│ │ │ + │ │ │ +
889
│ │ │ +
890 /// years
│ │ │ + │ │ │ +
892
│ │ │ +
893 /// months
│ │ │ + │ │ │ +
895#endif // C++20
│ │ │ +
896
│ │ │ +
897#undef _GLIBCXX_CHRONO_INT64_T
│ │ │ +
898
│ │ │ +
899 template<typename _Clock, typename _Dur>
│ │ │ +
│ │ │ + │ │ │ +
901 {
│ │ │ +
902 static_assert(__is_duration<_Dur>::value,
│ │ │ +
903 "duration must be a specialization of std::chrono::duration");
│ │ │ +
904
│ │ │ +
905 public:
│ │ │ +
906 typedef _Clock clock;
│ │ │ +
907 typedef _Dur duration;
│ │ │ +
908 typedef typename duration::rep rep;
│ │ │ +
909 typedef typename duration::period period;
│ │ │ +
910
│ │ │ +
911 constexpr time_point() : __d(duration::zero())
│ │ │ +
912 { }
│ │ │ +
913
│ │ │ +
914 constexpr explicit time_point(const duration& __dur)
│ │ │ +
915 : __d(__dur)
│ │ │ +
916 { }
│ │ │ +
917
│ │ │ +
918 // conversions
│ │ │ +
919 template<typename _Dur2,
│ │ │ + │ │ │ +
921 constexpr time_point(const time_point<clock, _Dur2>& __t)
│ │ │ +
922 : __d(__t.time_since_epoch())
│ │ │ +
923 { }
│ │ │ +
924
│ │ │ +
925 // observer
│ │ │ +
926 constexpr duration
│ │ │ +
927 time_since_epoch() const
│ │ │ +
928 { return __d; }
│ │ │ +
929
│ │ │ +
930#if __cplusplus > 201703L
│ │ │ +
931 constexpr time_point&
│ │ │ +
932 operator++()
│ │ │ +
933 {
│ │ │ +
934 ++__d;
│ │ │ +
935 return *this;
│ │ │ +
936 }
│ │ │ +
937
│ │ │ +
938 constexpr time_point
│ │ │ +
939 operator++(int)
│ │ │ +
940 { return time_point{__d++}; }
│ │ │ +
941
│ │ │ +
942 constexpr time_point&
│ │ │ +
943 operator--()
│ │ │ +
944 {
│ │ │ +
945 --__d;
│ │ │ +
946 return *this;
│ │ │ +
947 }
│ │ │ +
948
│ │ │ +
949 constexpr time_point
│ │ │ +
950 operator--(int)
│ │ │ +
951 { return time_point{__d--}; }
│ │ │ +
952#endif
│ │ │ +
953
│ │ │ +
954 // arithmetic
│ │ │ + │ │ │ +
956 operator+=(const duration& __dur)
│ │ │ +
957 {
│ │ │ +
958 __d += __dur;
│ │ │ +
959 return *this;
│ │ │ +
960 }
│ │ │ +
961
│ │ │ + │ │ │ +
963 operator-=(const duration& __dur)
│ │ │ +
964 {
│ │ │ +
965 __d -= __dur;
│ │ │ +
966 return *this;
│ │ │ +
967 }
│ │ │ +
968
│ │ │ +
969 // special values
│ │ │ +
970 static constexpr time_point
│ │ │ +
971 min() noexcept
│ │ │ +
972 { return time_point(duration::min()); }
│ │ │ +
973
│ │ │ +
974 static constexpr time_point
│ │ │ +
975 max() noexcept
│ │ │ +
976 { return time_point(duration::max()); }
│ │ │ +
977
│ │ │ +
978 private:
│ │ │ +
979 duration __d;
│ │ │ +
980 };
│ │ │ +
│ │ │ +
981
│ │ │ +
982 /** Convert a `time_point` to use `duration` type `ToDur`.
│ │ │ +
983 *
│ │ │ +
984 * The result is the same time point as measured by the same clock, but
│ │ │ +
985 * using the specified `duration` to represent the time.
│ │ │ +
986 * If the time point cannot be represented accurately in the result type,
│ │ │ +
987 * returns the result of integer truncation (i.e., rounded towards zero).
│ │ │ +
988 *
│ │ │ +
989 * @tparam _ToDur The `duration` type to use for the result.
│ │ │ +
990 * @param __t A time point.
│ │ │ +
991 * @return The value of `__t` converted to use type `_ToDur`.
│ │ │ +
992 * @since C++11
│ │ │ +
993 */
│ │ │ +
994 template<typename _ToDur, typename _Clock, typename _Dur>
│ │ │ +
995 _GLIBCXX_NODISCARD constexpr
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
998 {
│ │ │ + │ │ │ +
1000 return __time_point(duration_cast<_ToDur>(__t.time_since_epoch()));
│ │ │ +
1001 }
│ │ │ +
│ │ │ +
1002
│ │ │ +
1003#if __cplusplus > 201402L
│ │ │ +
1004 /** Convert a `time_point` to type `ToDur` and round down.
│ │ │ +
1005 *
│ │ │ +
1006 * The result is the same time point as measured by the same clock, but
│ │ │ +
1007 * using the specified `duration` to represent the time.
│ │ │ +
1008 * If the time point cannot be represented exactly in the result type,
│ │ │ +
1009 * returns the closest value that is less than the argument.
│ │ │ +
1010 *
│ │ │ +
1011 * @tparam _ToDur The `duration` type to use for the result.
│ │ │ +
1012 * @param __t A time point.
│ │ │ +
1013 * @return The value of `__d` converted to type `_ToDur`.
│ │ │ +
1014 * @since C++17
│ │ │ +
1015 */
│ │ │ +
1016 template<typename _ToDur, typename _Clock, typename _Dur>
│ │ │ +
1017 [[nodiscard]] constexpr
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
1020 {
│ │ │ + │ │ │ +
1022 chrono::floor<_ToDur>(__tp.time_since_epoch())};
│ │ │ +
1023 }
│ │ │ +
│ │ │ +
1024
│ │ │ +
1025 /** Convert a `time_point` to type `ToDur` and round up.
│ │ │ +
1026 *
│ │ │ +
1027 * The result is the same time point as measured by the same clock, but
│ │ │ +
1028 * using the specified `duration` to represent the time.
│ │ │ +
1029 * If the time point cannot be represented exactly in the result type,
│ │ │ +
1030 * returns the closest value that is greater than the argument.
│ │ │ +
1031 *
│ │ │ +
1032 * @tparam _ToDur The `duration` type to use for the result.
│ │ │ +
1033 * @param __t A time point.
│ │ │ +
1034 * @return The value of `__d` converted to type `_ToDur`.
│ │ │ +
1035 * @since C++17
│ │ │ +
1036 */
│ │ │ +
1037 template<typename _ToDur, typename _Clock, typename _Dur>
│ │ │ +
1038 [[nodiscard]] constexpr
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
1041 {
│ │ │ + │ │ │ +
1043 chrono::ceil<_ToDur>(__tp.time_since_epoch())};
│ │ │ +
1044 }
│ │ │ +
│ │ │ +
1045
│ │ │ +
1046 /** Convert a `time_point` to type `ToDur` and round to the closest value.
│ │ │ +
1047 *
│ │ │ +
1048 * The result is the same time point as measured by the same clock, but
│ │ │ +
1049 * using the specified `duration` to represent the time.
│ │ │ +
1050 * If the time point cannot be represented exactly in the result type,
│ │ │ +
1051 * returns the closest value, rounding ties to even.
│ │ │ +
1052 *
│ │ │ +
1053 * @tparam _ToDur The `duration` type to use for the result,
│ │ │ +
1054 * which must have a non-floating-point `rep` type.
│ │ │ +
1055 * @param __t A time point.
│ │ │ +
1056 * @return The value of `__d` converted to type `_ToDur`.
│ │ │ +
1057 * @since C++17
│ │ │ +
1058 */
│ │ │ +
1059 template<typename _ToDur, typename _Clock, typename _Dur>
│ │ │ +
1060 [[nodiscard]] constexpr
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
│ │ │ + │ │ │ +
1066 {
│ │ │ + │ │ │ +
1068 chrono::round<_ToDur>(__tp.time_since_epoch())};
│ │ │ +
1069 }
│ │ │ +
│ │ │ +
1070#endif // C++17
│ │ │ +
1071
│ │ │ +
1072 /// @{
│ │ │ +
1073 /// @relates time_point
│ │ │ +
1074
│ │ │ +
1075 /// Adjust a time point forwards by the given duration.
│ │ │ +
1076 template<typename _Clock, typename _Dur1,
│ │ │ +
1077 typename _Rep2, typename _Period2>
│ │ │ +
1078 constexpr time_point<_Clock,
│ │ │ + │ │ │ +
│ │ │ + │ │ │ + │ │ │ +
1082 {
│ │ │ + │ │ │ +
1084 typedef typename common_type<_Dur1,__dur2>::type __ct;
│ │ │ + │ │ │ +
1086 return __time_point(__lhs.time_since_epoch() + __rhs);
│ │ │ +
1087 }
│ │ │ +
│ │ │ +
1088
│ │ │ +
1089 /// Adjust a time point forwards by the given duration.
│ │ │ +
1090 template<typename _Rep1, typename _Period1,
│ │ │ +
1091 typename _Clock, typename _Dur2>
│ │ │ +
1092 constexpr time_point<_Clock,
│ │ │ + │ │ │ +
│ │ │ + │ │ │ + │ │ │ +
1096 {
│ │ │ + │ │ │ +
1098 typedef typename common_type<__dur1,_Dur2>::type __ct;
│ │ │ + │ │ │ +
1100 return __time_point(__rhs.time_since_epoch() + __lhs);
│ │ │ +
1101 }
│ │ │ +
│ │ │ +
1102
│ │ │ +
1103 /// Adjust a time point backwards by the given duration.
│ │ │ +
1104 template<typename _Clock, typename _Dur1,
│ │ │ +
1105 typename _Rep2, typename _Period2>
│ │ │ +
1106 constexpr time_point<_Clock,
│ │ │ + │ │ │ +
│ │ │ + │ │ │ + │ │ │ +
1110 {
│ │ │ + │ │ │ +
1112 typedef typename common_type<_Dur1,__dur2>::type __ct;
│ │ │ + │ │ │ +
1114 return __time_point(__lhs.time_since_epoch() -__rhs);
│ │ │ +
1115 }
│ │ │ +
│ │ │ +
1116
│ │ │ +
1117 /// The difference between two time points (as a duration)
│ │ │ +
1118 template<typename _Clock, typename _Dur1, typename _Dur2>
│ │ │ +
1119 constexpr typename common_type<_Dur1, _Dur2>::type
│ │ │ +
│ │ │ + │ │ │ + │ │ │ +
1122 { return __lhs.time_since_epoch() - __rhs.time_since_epoch(); }
│ │ │ +
│ │ │ +
1123 /// @}
│ │ │ +
1124
│ │ │ +
1125 /** @{
│ │ │ +
1126 * Comparisons for time_point
│ │ │ +
1127 * @relates chrono::time_point
│ │ │ +
1128 */
│ │ │ +
1129
│ │ │ +
1130 template<typename _Clock, typename _Dur1, typename _Dur2>
│ │ │ +
1131 constexpr bool
│ │ │ +
1132 operator==(const time_point<_Clock, _Dur1>& __lhs,
│ │ │ + │ │ │ +
1134 { return __lhs.time_since_epoch() == __rhs.time_since_epoch(); }
│ │ │ +
1135
│ │ │ +
1136#if __cpp_lib_three_way_comparison
│ │ │ +
1137 template<typename _Clock, typename _Dur1,
│ │ │ +
1138 three_way_comparable_with<_Dur1> _Dur2>
│ │ │ +
1139 constexpr auto
│ │ │ +
1140 operator<=>(const time_point<_Clock, _Dur1>& __lhs,
│ │ │ +
1141 const time_point<_Clock, _Dur2>& __rhs)
│ │ │ +
1142 { return __lhs.time_since_epoch() <=> __rhs.time_since_epoch(); }
│ │ │ +
1143#else
│ │ │ +
1144 template<typename _Clock, typename _Dur1, typename _Dur2>
│ │ │ +
1145 constexpr bool
│ │ │ +
1146 operator!=(const time_point<_Clock, _Dur1>& __lhs,
│ │ │ +
1147 const time_point<_Clock, _Dur2>& __rhs)
│ │ │ +
1148 { return !(__lhs == __rhs); }
│ │ │ +
1149#endif
│ │ │ +
1150
│ │ │ +
1151 template<typename _Clock, typename _Dur1, typename _Dur2>
│ │ │ +
1152 constexpr bool
│ │ │ +
1153 operator<(const time_point<_Clock, _Dur1>& __lhs,
│ │ │ +
1154 const time_point<_Clock, _Dur2>& __rhs)
│ │ │ +
1155 { return __lhs.time_since_epoch() < __rhs.time_since_epoch(); }
│ │ │ +
1156
│ │ │ +
1157 template<typename _Clock, typename _Dur1, typename _Dur2>
│ │ │ +
1158 constexpr bool
│ │ │ +
1159 operator<=(const time_point<_Clock, _Dur1>& __lhs,
│ │ │ +
1160 const time_point<_Clock, _Dur2>& __rhs)
│ │ │ +
1161 { return !(__rhs < __lhs); }
│ │ │ +
1162
│ │ │ +
1163 template<typename _Clock, typename _Dur1, typename _Dur2>
│ │ │ +
1164 constexpr bool
│ │ │ +
1165 operator>(const time_point<_Clock, _Dur1>& __lhs,
│ │ │ +
1166 const time_point<_Clock, _Dur2>& __rhs)
│ │ │ +
1167 { return __rhs < __lhs; }
│ │ │ +
1168
│ │ │ +
1169 template<typename _Clock, typename _Dur1, typename _Dur2>
│ │ │ +
1170 constexpr bool
│ │ │ +
1171 operator>=(const time_point<_Clock, _Dur1>& __lhs,
│ │ │ +
1172 const time_point<_Clock, _Dur2>& __rhs)
│ │ │ +
1173 { return !(__lhs < __rhs); }
│ │ │ +
1174
│ │ │ +
1175 /// @}
│ │ │ +
1176 /// @} group chrono
│ │ │ +
1177
│ │ │ +
1178 // Clocks.
│ │ │ +
1179
│ │ │ +
1180 // Why nanosecond resolution as the default?
│ │ │ +
1181 // Why have std::system_clock always count in the highest
│ │ │ +
1182 // resolution (ie nanoseconds), even if on some OSes the low 3
│ │ │ +
1183 // or 9 decimal digits will be always zero? This allows later
│ │ │ +
1184 // implementations to change the system_clock::now()
│ │ │ +
1185 // implementation any time to provide better resolution without
│ │ │ +
1186 // changing function signature or units.
│ │ │ +
1187
│ │ │ +
1188 // To support the (forward) evolution of the library's defined
│ │ │ +
1189 // clocks, wrap inside inline namespace so that the current
│ │ │ +
1190 // defintions of system_clock, steady_clock, and
│ │ │ +
1191 // high_resolution_clock types are uniquely mangled. This way, new
│ │ │ +
1192 // code can use the latests clocks, while the library can contain
│ │ │ +
1193 // compatibility definitions for previous versions. At some
│ │ │ +
1194 // point, when these clocks settle down, the inlined namespaces
│ │ │ +
1195 // can be removed. XXX GLIBCXX_ABI Deprecated
│ │ │ +
1196_GLIBCXX_BEGIN_INLINE_ABI_NAMESPACE(_V2)
│ │ │ +
1197
│ │ │ +
1198 /**
│ │ │ +
1199 * @brief System clock.
│ │ │ +
1200 *
│ │ │ +
1201 * Time returned represents wall time from the system-wide clock.
│ │ │ +
1202 * @ingroup chrono
│ │ │ +
1203 */
│ │ │ +
│ │ │ + │ │ │ +
1205 {
│ │ │ + │ │ │ +
1207 typedef duration::rep rep;
│ │ │ +
1208 typedef duration::period period;
│ │ │ + │ │ │ +
1210
│ │ │ +
1211 static_assert(system_clock::duration::min()
│ │ │ +
1212 < system_clock::duration::zero(),
│ │ │ +
1213 "a clock's minimum duration cannot be less than its epoch");
│ │ │ +
1214
│ │ │ +
1215 static constexpr bool is_steady = false;
│ │ │ +
1216
│ │ │ +
1217 static time_point
│ │ │ +
1218 now() noexcept;
│ │ │ +
1219
│ │ │ +
1220 // Map to C API
│ │ │ +
1221 [[__gnu__::__always_inline__]]
│ │ │ +
1222 static std::time_t
│ │ │ +
1223 to_time_t(const time_point& __t) noexcept
│ │ │ +
1224 {
│ │ │ + │ │ │ +
1226 (__t.time_since_epoch()).count());
│ │ │ +
1227 }
│ │ │ +
1228
│ │ │ +
1229 [[__gnu__::__always_inline__]]
│ │ │ +
1230 static time_point
│ │ │ +
1231 from_time_t(std::time_t __t) noexcept
│ │ │ +
1232 {
│ │ │ + │ │ │ + │ │ │ +
1235 (__from(chrono::seconds(__t)));
│ │ │ +
1236 }
│ │ │ +
1237 };
│ │ │ +
│ │ │ +
1238
│ │ │ +
1239
│ │ │ +
1240 /**
│ │ │ +
1241 * @brief Monotonic clock
│ │ │ +
1242 *
│ │ │ +
1243 * Time returned has the property of only increasing at a uniform rate.
│ │ │ +
1244 * @ingroup chrono
│ │ │ +
1245 */
│ │ │ +
│ │ │ + │ │ │ +
1247 {
│ │ │ + │ │ │ +
1249 typedef duration::rep rep;
│ │ │ +
1250 typedef duration::period period;
│ │ │ + │ │ │ +
1252
│ │ │ +
1253 static constexpr bool is_steady = true;
│ │ │ +
1254
│ │ │ +
1255 static time_point
│ │ │ +
1256 now() noexcept;
│ │ │ +
1257 };
│ │ │ +
│ │ │ +
1258
│ │ │ +
1259
│ │ │ +
1260 /**
│ │ │ +
1261 * @brief Highest-resolution clock
│ │ │ +
1262 *
│ │ │ +
1263 * This is the clock "with the shortest tick period." Alias to
│ │ │ +
1264 * std::system_clock until higher-than-nanosecond definitions
│ │ │ +
1265 * become feasible.
│ │ │ +
1266 * @ingroup chrono
│ │ │ +
1267 */
│ │ │ + │ │ │ +
1269
│ │ │ +
1270_GLIBCXX_END_INLINE_ABI_NAMESPACE(_V2)
│ │ │ +
1271
│ │ │ +
1272#if __cplusplus >= 202002L
│ │ │ +
1273 /// @addtogroup chrono
│ │ │ +
1274 /// @{
│ │ │ +
1275 template<typename _Duration>
│ │ │ + │ │ │ + │ │ │ +
1278 using sys_days = sys_time<days>;
│ │ │ +
1279
│ │ │ +
1280 using file_clock = ::std::filesystem::__file_clock;
│ │ │ +
1281
│ │ │ +
1282 template<typename _Duration>
│ │ │ + │ │ │ +
1284
│ │ │ +
1285 template<> struct is_clock<system_clock> : true_type { };
│ │ │ +
1286 template<> struct is_clock<steady_clock> : true_type { };
│ │ │ +
1287 template<> struct is_clock<file_clock> : true_type { };
│ │ │ +
1288
│ │ │ +
1289 template<> inline constexpr bool is_clock_v<system_clock> = true;
│ │ │ +
1290 template<> inline constexpr bool is_clock_v<steady_clock> = true;
│ │ │ +
1291 template<> inline constexpr bool is_clock_v<file_clock> = true;
│ │ │ +
1292 /// @}
│ │ │ +
1293#endif // C++20
│ │ │ +
1294 } // namespace chrono
│ │ │ +
1295
│ │ │ +
1296#if __cplusplus >= 201402L
│ │ │ +
1297#define __cpp_lib_chrono_udls 201304L
│ │ │ +
1298
│ │ │ +
1299 inline namespace literals
│ │ │ +
1300 {
│ │ │ +
1301 /** ISO C++ 2014 namespace for suffixes for duration literals.
│ │ │ +
1302 *
│ │ │ +
1303 * These suffixes can be used to create `chrono::duration` values with
│ │ │ +
1304 * tick periods of hours, minutes, seconds, milliseconds, microseconds
│ │ │ +
1305 * or nanoseconds. For example, `std::chrono::seconds(5)` can be written
│ │ │ +
1306 * as `5s` after making the suffix visible in the current scope.
│ │ │ +
1307 * The suffixes can be made visible by a using-directive or
│ │ │ +
1308 * using-declaration such as:
│ │ │ +
1309 * - `using namespace std::chrono_literals;`
│ │ │ +
1310 * - `using namespace std::literals;`
│ │ │ +
1311 * - `using namespace std::chrono;`
│ │ │ +
1312 * - `using namespace std;`
│ │ │ +
1313 * - `using std::chrono_literals::operator""s;`
│ │ │ +
1314 *
│ │ │ +
1315 * The result of these suffixes on an integer literal is one of the
│ │ │ +
1316 * standard typedefs such as `std::chrono::hours`.
│ │ │ +
1317 * The result on a floating-point literal is a duration type with the
│ │ │ +
1318 * specified tick period and an unspecified floating-point representation,
│ │ │ +
1319 * for example `1.5e2ms` might be equivalent to
│ │ │ +
1320 * `chrono::duration<long double, chrono::milli>(1.5e2)`.
│ │ │ +
1321 *
│ │ │ +
1322 * @since C+14
│ │ │ +
1323 * @ingroup chrono
│ │ │ +
1324 */
│ │ │ +
1325 inline namespace chrono_literals
│ │ │ +
1326 {
│ │ │ +
1327 /// @addtogroup chrono
│ │ │ +
1328 /// @{
│ │ │ +
1329
│ │ │ +
1330#pragma GCC diagnostic push
│ │ │ +
1331#pragma GCC diagnostic ignored "-Wliteral-suffix"
│ │ │ +
1332 /// @cond undocumented
│ │ │ +
1333 template<typename _Dur, char... _Digits>
│ │ │ +
1334 constexpr _Dur __check_overflow()
│ │ │ +
1335 {
│ │ │ +
1336 using _Val = __parse_int::_Parse_int<_Digits...>;
│ │ │ +
1337 constexpr typename _Dur::rep __repval = _Val::value;
│ │ │ +
1338 static_assert(__repval >= 0 && __repval == _Val::value,
│ │ │ +
1339 "literal value cannot be represented by duration type");
│ │ │ +
1340 return _Dur(__repval);
│ │ │ +
1341 }
│ │ │ +
1342 /// @endcond
│ │ │ +
1343
│ │ │ +
1344 /// Literal suffix for durations representing non-integer hours
│ │ │ +
1345 constexpr chrono::duration<long double, ratio<3600,1>>
│ │ │ +
│ │ │ +
1346 operator""h(long double __hours)
│ │ │ + │ │ │ +
│ │ │ +
1348
│ │ │ +
1349 /// Literal suffix for durations of type `std::chrono::hours`
│ │ │ +
1350 template <char... _Digits>
│ │ │ +
1351 constexpr chrono::hours
│ │ │ +
│ │ │ +
1352 operator""h()
│ │ │ +
1353 { return __check_overflow<chrono::hours, _Digits...>(); }
│ │ │ +
│ │ │ +
1354
│ │ │ +
1355 /// Literal suffix for durations representing non-integer minutes
│ │ │ + │ │ │ +
│ │ │ +
1357 operator""min(long double __mins)
│ │ │ + │ │ │ +
│ │ │ +
1359
│ │ │ +
1360 /// Literal suffix for durations of type `std::chrono::minutes`
│ │ │ +
1361 template <char... _Digits>
│ │ │ +
1362 constexpr chrono::minutes
│ │ │ +
│ │ │ +
1363 operator""min()
│ │ │ +
1364 { return __check_overflow<chrono::minutes, _Digits...>(); }
│ │ │ +
│ │ │ +
1365
│ │ │ +
1366 /// Literal suffix for durations representing non-integer seconds
│ │ │ + │ │ │ +
│ │ │ +
1368 operator""s(long double __secs)
│ │ │ + │ │ │ +
│ │ │ +
1370
│ │ │ +
1371 /// Literal suffix for durations of type `std::chrono::seconds`
│ │ │ +
1372 template <char... _Digits>
│ │ │ +
1373 constexpr chrono::seconds
│ │ │ +
│ │ │ +
1374 operator""s()
│ │ │ +
1375 { return __check_overflow<chrono::seconds, _Digits...>(); }
│ │ │ +
│ │ │ +
1376
│ │ │ +
1377 /// Literal suffix for durations representing non-integer milliseconds
│ │ │ + │ │ │ +
│ │ │ +
1379 operator""ms(long double __msecs)
│ │ │ + │ │ │ +
│ │ │ +
1381
│ │ │ +
1382 /// Literal suffix for durations of type `std::chrono::milliseconds`
│ │ │ +
1383 template <char... _Digits>
│ │ │ +
1384 constexpr chrono::milliseconds
│ │ │ +
│ │ │ +
1385 operator""ms()
│ │ │ + │ │ │ +
│ │ │ +
1387
│ │ │ +
1388 /// Literal suffix for durations representing non-integer microseconds
│ │ │ + │ │ │ +
│ │ │ +
1390 operator""us(long double __usecs)
│ │ │ + │ │ │ +
│ │ │ +
1392
│ │ │ +
1393 /// Literal suffix for durations of type `std::chrono::microseconds`
│ │ │ +
1394 template <char... _Digits>
│ │ │ +
1395 constexpr chrono::microseconds
│ │ │ +
│ │ │ +
1396 operator""us()
│ │ │ + │ │ │ +
│ │ │ +
1398
│ │ │ +
1399 /// Literal suffix for durations representing non-integer nanoseconds
│ │ │ + │ │ │ +
│ │ │ +
1401 operator""ns(long double __nsecs)
│ │ │ + │ │ │ +
│ │ │ +
1403
│ │ │ +
1404 /// Literal suffix for durations of type `std::chrono::nanoseconds`
│ │ │ +
1405 template <char... _Digits>
│ │ │ +
1406 constexpr chrono::nanoseconds
│ │ │ +
│ │ │ +
1407 operator""ns()
│ │ │ + │ │ │ +
│ │ │ +
1409
│ │ │ +
1410#pragma GCC diagnostic pop
│ │ │ +
1411 /// @}
│ │ │ +
1412 } // inline namespace chrono_literals
│ │ │ +
1413 } // inline namespace literals
│ │ │ +
1414
│ │ │ +
1415 namespace chrono
│ │ │ +
1416 {
│ │ │ +
1417 using namespace literals::chrono_literals;
│ │ │ +
1418 } // namespace chrono
│ │ │ +
1419#endif // C++14
│ │ │ +
1420
│ │ │ +
1421#if __cplusplus >= 201703L
│ │ │ +
1422 namespace filesystem
│ │ │ +
1423 {
│ │ │ +
1424 struct __file_clock
│ │ │ +
1425 {
│ │ │ +
1426 using duration = chrono::nanoseconds;
│ │ │ +
1427 using rep = duration::rep;
│ │ │ +
1428 using period = duration::period;
│ │ │ +
1429 using time_point = chrono::time_point<__file_clock>;
│ │ │ +
1430 static constexpr bool is_steady = false;
│ │ │ +
1431
│ │ │ +
1432 static time_point
│ │ │ +
1433 now() noexcept
│ │ │ +
1434 { return _S_from_sys(chrono::system_clock::now()); }
│ │ │ +
1435
│ │ │ +
1436#if __cplusplus > 201703L
│ │ │ +
1437 template<typename _Dur>
│ │ │ +
1438 static
│ │ │ +
1439 chrono::file_time<_Dur>
│ │ │ +
1440 from_sys(const chrono::sys_time<_Dur>& __t) noexcept
│ │ │ +
1441 { return _S_from_sys(__t); }
│ │ │ +
1442
│ │ │ +
1443 // For internal use only
│ │ │ +
1444 template<typename _Dur>
│ │ │ +
1445 static
│ │ │ +
1446 chrono::sys_time<_Dur>
│ │ │ +
1447 to_sys(const chrono::file_time<_Dur>& __t) noexcept
│ │ │ +
1448 { return _S_to_sys(__t); }
│ │ │ +
1449#endif // C++20
│ │ │ +
1450
│ │ │ +
1451 private:
│ │ │ +
1452 using __sys_clock = chrono::system_clock;
│ │ │ +
1453
│ │ │ +
1454 // This clock's (unspecified) epoch is 2174-01-01 00:00:00 UTC.
│ │ │ +
1455 // A signed 64-bit duration with nanosecond resolution gives roughly
│ │ │ +
1456 // +/- 292 years, which covers the 1901-2446 date range for ext4.
│ │ │ +
1457 static constexpr chrono::seconds _S_epoch_diff{6437664000};
│ │ │ +
1458
│ │ │ +
1459 protected:
│ │ │ +
1460 // For internal use only
│ │ │ +
1461 template<typename _Dur>
│ │ │ +
1462 static
│ │ │ +
1463 chrono::time_point<__file_clock, _Dur>
│ │ │ +
1464 _S_from_sys(const chrono::time_point<__sys_clock, _Dur>& __t) noexcept
│ │ │ +
1465 {
│ │ │ +
1466 using __file_time = chrono::time_point<__file_clock, _Dur>;
│ │ │ +
1467 return __file_time{__t.time_since_epoch()} - _S_epoch_diff;
│ │ │ +
1468 }
│ │ │ +
1469
│ │ │ +
1470 // For internal use only
│ │ │ +
1471 template<typename _Dur>
│ │ │ +
1472 static
│ │ │ +
1473 chrono::time_point<__sys_clock, _Dur>
│ │ │ +
1474 _S_to_sys(const chrono::time_point<__file_clock, _Dur>& __t) noexcept
│ │ │ +
1475 {
│ │ │ +
1476 using __sys_time = chrono::time_point<__sys_clock, _Dur>;
│ │ │ +
1477 return __sys_time{__t.time_since_epoch()} + _S_epoch_diff;
│ │ │ +
1478 }
│ │ │ +
1479 };
│ │ │ +
1480 } // namespace filesystem
│ │ │ +
1481#endif // C++17
│ │ │ +
1482
│ │ │ +
1483_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ +
1484} // namespace std
│ │ │ +
1485
│ │ │ +
1486#endif // C++11
│ │ │ +
1487
│ │ │ +
1488#endif //_GLIBCXX_CHRONO_H
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
constexpr bool operator==(const duration< _Rep1, _Period1 > &__lhs, const duration< _Rep2, _Period2 > &__rhs)
Definition chrono.h:788
│ │ │ +
duration< int64_t > seconds
seconds
Definition chrono.h:875
│ │ │ +
constexpr enable_if_t< __and_< __is_duration< _ToDur >, __not_< treat_as_floating_point< typename _ToDur::rep > > >::value, _ToDur > round(const duration< _Rep, _Period > &__d)
Definition chrono.h:409
│ │ │ +
constexpr bool operator<=(const duration< _Rep1, _Period1 > &__lhs, const duration< _Rep2, _Period2 > &__rhs)
Definition chrono.h:833
│ │ │ +
duration< int64_t, ratio< 3600 > > hours
hours
Definition chrono.h:881
│ │ │ +
duration< int64_t, milli > milliseconds
milliseconds
Definition chrono.h:872
│ │ │ +
duration< int64_t, micro > microseconds
microseconds
Definition chrono.h:869
│ │ │ +
constexpr bool operator>=(const duration< _Rep1, _Period1 > &__lhs, const duration< _Rep2, _Period2 > &__rhs)
Definition chrono.h:847
│ │ │ +
constexpr bool operator!=(const duration< _Rep1, _Period1 > &__lhs, const duration< _Rep2, _Period2 > &__rhs)
Definition chrono.h:825
│ │ │ +
constexpr duration< __common_rep_t< _Rep2, _Rep1 >, _Period > operator*(const _Rep1 &__s, const duration< _Rep2, _Period > &__d)
Definition chrono.h:728
│ │ │ +
duration< int64_t, nano > nanoseconds
nanoseconds
Definition chrono.h:866
│ │ │ +
constexpr duration< __common_rep_t< _Rep1, __disable_if_is_duration< _Rep2 > >, _Period > operator%(const duration< _Rep1, _Period > &__d, const _Rep2 &__s)
Definition chrono.h:757
│ │ │ +
constexpr time_point< _Clock, typename common_type< _Dur1, duration< _Rep2, _Period2 > >::type > operator+(const time_point< _Clock, _Dur1 > &__lhs, const duration< _Rep2, _Period2 > &__rhs)
Definition chrono.h:1080
│ │ │ +
constexpr __enable_if_t< __is_duration< _ToDur >::value, time_point< _Clock, _ToDur > > time_point_cast(const time_point< _Clock, _Dur > &__t)
Definition chrono.h:997
│ │ │ +
duration< int64_t, ratio< 60 > > minutes
minutes
Definition chrono.h:878
│ │ │ +
constexpr time_point< _Clock, typename common_type< duration< _Rep1, _Period1 >, _Dur2 >::type > operator+(const duration< _Rep1, _Period1 > &__lhs, const time_point< _Clock, _Dur2 > &__rhs)
Adjust a time point forwards by the given duration.
Definition chrono.h:1094
│ │ │ +
constexpr common_type< duration< _Rep1, _Period1 >, duration< _Rep2, _Period2 > >::type operator+(const duration< _Rep1, _Period1 > &__lhs, const duration< _Rep2, _Period2 > &__rhs)
Definition chrono.h:674
│ │ │ +
constexpr bool operator<(const duration< _Rep1, _Period1 > &__lhs, const duration< _Rep2, _Period2 > &__rhs)
Definition chrono.h:800
│ │ │ +
constexpr bool operator>(const duration< _Rep1, _Period1 > &__lhs, const duration< _Rep2, _Period2 > &__rhs)
Definition chrono.h:840
│ │ │ +
constexpr common_type< duration< _Rep1, _Period1 >, duration< _Rep2, _Period2 > >::type operator-(const duration< _Rep1, _Period1 > &__lhs, const duration< _Rep2, _Period2 > &__rhs)
The difference between two durations.
Definition chrono.h:688
│ │ │ +
constexpr duration< __common_rep_t< _Rep1, __disable_if_is_duration< _Rep2 > >, _Period > operator/(const duration< _Rep1, _Period > &__d, const _Rep2 &__s)
Definition chrono.h:734
│ │ │ +
constexpr duration< __common_rep_t< _Rep1, _Rep2 >, _Period > operator*(const duration< _Rep1, _Period > &__d, const _Rep2 &__s)
Definition chrono.h:719
│ │ │ +
constexpr __enable_if_is_duration< _ToDur > ceil(const duration< _Rep, _Period > &__d)
Definition chrono.h:384
│ │ │ +
constexpr __enable_if_is_duration< _ToDur > duration_cast(const duration< _Rep, _Period > &__d)
Definition chrono.h:262
│ │ │ +
_Tp abs(const complex< _Tp > &)
Return magnitude of z.
Definition complex:630
│ │ │ +
void void_t
A metafunction that always yields void, used for detecting valid types.
Definition type_traits:2630
│ │ │
integral_constant< bool, true > true_type
The type used as a compile-time boolean with true value.
Definition type_traits:82
│ │ │
integral_constant< bool, false > false_type
The type used as a compile-time boolean with false value.
Definition type_traits:85
│ │ │ -
constexpr _Tp * __addressof(_Tp &__r) noexcept
Same as C++11 std::addressof.
Definition move.h:49
│ │ │ -
exception_ptr current_exception() noexcept
│ │ │ -
void rethrow_exception(exception_ptr)
Throw the object pointed to by the exception_ptr.
│ │ │ -
void terminate() noexcept
│ │ │ -
void rethrow_if_nested(const _Ex &__ex)
If __ex is derived from nested_exception, __ex.rethrow_nested().
│ │ │ -
void throw_with_nested(_Tp &&__t)
If __t is derived from nested_exception, throws __t. Else, throws an implementation-defined object de...
│ │ │ +
typename enable_if< _Cond, _Tp >::type enable_if_t
Alias template for enable_if.
Definition type_traits:2608
│ │ │ +
constexpr const _Tp & min(const _Tp &, const _Tp &)
This does what you think it does.
│ │ │
ISO C++ entities toplevel namespace is std.
│ │ │ -
An opaque pointer to an arbitrary exception.
│ │ │ -
Exception class with exception_ptr data member.
│ │ │ - │ │ │ +
Properties of fundamental types.
Definition limits:313
│ │ │ +
static constexpr _Tp max() noexcept
Definition limits:321
│ │ │ +
static constexpr _Tp lowest() noexcept
Definition limits:327
│ │ │ +
Provides compile-time rational arithmetic.
Definition ratio:267
│ │ │ +
integral_constant
Definition type_traits:63
│ │ │ +
is_floating_point
Definition type_traits:445
│ │ │ +
common_type
Definition type_traits:2259
│ │ │ +
chrono::duration represents a distance between two points in time
Definition chrono.h:488
│ │ │ +
chrono::time_point represents a point in time as measured by a clock
Definition chrono.h:901
│ │ │ + │ │ │ + │ │ │ + │ │ │ +
Monotonic clock.
Definition chrono.h:1247
│ │ │ + │ │ │ + │ │ │ + │ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,13 +1,13 @@ │ │ │ │ libstdc++ │ │ │ │ -nested_exception.h │ │ │ │ +chrono.h │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -1// Nested Exception support header (nested_exception class) for -*- C++ -*- │ │ │ │ +1// chrono::duration and chrono::time_point -*- C++ -*- │ │ │ │ 2 │ │ │ │ -3// Copyright (C) 2009-2022 Free Software Foundation, Inc. │ │ │ │ +3// Copyright (C) 2008-2022 Free Software Foundation, Inc. │ │ │ │ 4// │ │ │ │ 5// This file is part of the GNU ISO C++ Library. This library is free │ │ │ │ 6// software; you can redistribute it and/or modify it under the │ │ │ │ 7// terms of the GNU General Public License as published by the │ │ │ │ 8// Free Software Foundation; either version 3, or (at your option) │ │ │ │ 9// any later version. │ │ │ │ 10 │ │ │ │ @@ -21,198 +21,1654 @@ │ │ │ │ 18// 3.1, as published by the Free Software Foundation. │ │ │ │ 19 │ │ │ │ 20// You should have received a copy of the GNU General Public License and │ │ │ │ 21// a copy of the GCC Runtime Library Exception along with this program; │ │ │ │ 22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see │ │ │ │ 23// . │ │ │ │ 24 │ │ │ │ -25/** @file bits/nested_exception.h │ │ │ │ +25/** @file include/bits/chrono.h │ │ │ │ 26 * This is an internal header file, included by other library headers. │ │ │ │ -27 * Do not attempt to use it directly. @headername{exception} │ │ │ │ +27 * Do not attempt to use it directly. @headername{chrono} │ │ │ │ 28 */ │ │ │ │ 29 │ │ │ │ -30#ifndef _GLIBCXX_NESTED_EXCEPTION_H │ │ │ │ -31#define _GLIBCXX_NESTED_EXCEPTION_H 1 │ │ │ │ +30#ifndef _GLIBCXX_CHRONO_H │ │ │ │ +31#define _GLIBCXX_CHRONO_H 1 │ │ │ │ 32 │ │ │ │ -33#pragma GCC visibility push(default) │ │ │ │ +33#pragma GCC system_header │ │ │ │ 34 │ │ │ │ -35#if __cplusplus < 201103L │ │ │ │ -36# include <_b_i_t_s_/_c_+_+_0_x___w_a_r_n_i_n_g_._h> │ │ │ │ -37#else │ │ │ │ -38 │ │ │ │ -39#include <_b_i_t_s_/_c_+_+_c_o_n_f_i_g_._h> │ │ │ │ -40#include <_b_i_t_s_/_m_o_v_e_._h> │ │ │ │ -41 │ │ │ │ -42extern "C++" { │ │ │ │ -43 │ │ │ │ -44namespace _s_t_d │ │ │ │ -45{ │ │ │ │ -46 /** │ │ │ │ -47 * @addtogroup exceptions │ │ │ │ -48 * @{ │ │ │ │ -49 */ │ │ │ │ +35#if __cplusplus >= 201103L │ │ │ │ +36 │ │ │ │ +37#include <_r_a_t_i_o> │ │ │ │ +38#include <_t_y_p_e___t_r_a_i_t_s> │ │ │ │ +39#include <_l_i_m_i_t_s> │ │ │ │ +40#include <_c_t_i_m_e> │ │ │ │ +41#include <_b_i_t_s_/_p_a_r_s_e___n_u_m_b_e_r_s_._h> // for literals support. │ │ │ │ +42#if __cplusplus >= 202002L │ │ │ │ +43# include <_c_o_n_c_e_p_t_s> │ │ │ │ +44# include <_c_o_m_p_a_r_e> │ │ │ │ +45#endif │ │ │ │ +46 │ │ │ │ +47namespace _s_t_d _GLIBCXX_VISIBILITY(default) │ │ │ │ +48{ │ │ │ │ +49_GLIBCXX_BEGIN_NAMESPACE_VERSION │ │ │ │ 50 │ │ │ │ -51 /// Exception class with exception_ptr data member. │ │ │ │ -_5_2 class _n_e_s_t_e_d___e_x_c_e_p_t_i_o_n │ │ │ │ -53 { │ │ │ │ -54 _e_x_c_e_p_t_i_o_n___p_t_r _M_ptr; │ │ │ │ -55 │ │ │ │ -56 public: │ │ │ │ -57 _n_e_s_t_e_d___e_x_c_e_p_t_i_o_n() noexcept : _M_ptr(_c_u_r_r_e_n_t___e_x_c_e_p_t_i_o_n()) { } │ │ │ │ -58 │ │ │ │ -59 _n_e_s_t_e_d___e_x_c_e_p_t_i_o_n(const _n_e_s_t_e_d___e_x_c_e_p_t_i_o_n&) noexcept = default; │ │ │ │ -60 │ │ │ │ -61 _n_e_s_t_e_d___e_x_c_e_p_t_i_o_n& operator=(const _n_e_s_t_e_d___e_x_c_e_p_t_i_o_n&) noexcept = default; │ │ │ │ -62 │ │ │ │ -63 virtual _~_n_e_s_t_e_d___e_x_c_e_p_t_i_o_n() noexcept; │ │ │ │ -64 │ │ │ │ -65 [[_n_o_r_e_t_u_r_n]] │ │ │ │ -66 void │ │ │ │ -67 rethrow_nested() const │ │ │ │ -68 { │ │ │ │ -69 if (_M_ptr) │ │ │ │ -70 _r_e_t_h_r_o_w___e_x_c_e_p_t_i_o_n(_M_ptr); │ │ │ │ -71 _s_t_d_:_:_t_e_r_m_i_n_a_t_e(); │ │ │ │ -72 } │ │ │ │ -73 │ │ │ │ -74 _e_x_c_e_p_t_i_o_n___p_t_r │ │ │ │ -75 nested_ptr() const noexcept │ │ │ │ -76 { return _M_ptr; } │ │ │ │ -77 }; │ │ │ │ -78 │ │ │ │ -79 /// @cond undocumented │ │ │ │ +51#if __cplusplus >= 201703L │ │ │ │ +_5_2 namespace filesystem { struct __file_clock; }; │ │ │ │ +53#endif │ │ │ │ +54 │ │ │ │ +55 namespace chrono │ │ │ │ +56 { │ │ │ │ +57 /// @addtogroup chrono │ │ │ │ +58 /// @{ │ │ │ │ +59 │ │ │ │ +60 /// `chrono::duration` represents a distance between two points in time │ │ │ │ +61 template> │ │ │ │ +62 class duration; │ │ │ │ +63 │ │ │ │ +64 /// `chrono::time_point` represents a point in time as measured by a clock │ │ │ │ +65 template │ │ │ │ +66 class time_point; │ │ │ │ +67 /// @} │ │ │ │ +68 } │ │ │ │ +69 │ │ │ │ +70 /// @addtogroup chrono │ │ │ │ +71 /// @{ │ │ │ │ +72 │ │ │ │ +73 // 20.11.4.3 specialization of common_type (for duration, sfinae-friendly) │ │ │ │ +74 │ │ │ │ +75 /// @cond undocumented │ │ │ │ +76 │ │ │ │ +77 template │ │ │ │ +78 struct __duration_common_type │ │ │ │ +79 { }; │ │ │ │ 80 │ │ │ │ -81 template │ │ │ │ -82 struct ___N_e_s_t_e_d___e_x_c_e_p_t_i_o_n : public ___E_x_c_e_p_t, public _n_e_s_t_e_d___e_x_c_e_p_t_i_o_n │ │ │ │ -83 { │ │ │ │ -84 explicit ___N_e_s_t_e_d___e_x_c_e_p_t_i_o_n(const ___E_x_c_e_p_t& _____e_x) │ │ │ │ -85 : ___E_x_c_e_p_t(_____e_x) │ │ │ │ -86 { } │ │ │ │ -87 │ │ │ │ -88 explicit _Nested_exception(_Except&& __ex) │ │ │ │ -89 : _Except(static_cast<_Except&&>(__ex)) │ │ │ │ -90 { } │ │ │ │ -91 }; │ │ │ │ -92 │ │ │ │ -93 // [except.nested]/8 │ │ │ │ -94 // Throw an exception of unspecified type that is publicly derived from │ │ │ │ -95 // both remove_reference_t<_Tp> and nested_exception. │ │ │ │ -96 template │ │ │ │ -97 [[noreturn]] │ │ │ │ -98 inline void │ │ │ │ -99 __throw_with_nested_impl(_Tp&& __t, _t_r_u_e___t_y_p_e) │ │ │ │ -100 { │ │ │ │ -101 using _Up = typename remove_reference<_Tp>::type; │ │ │ │ -102 throw _Nested_exception<_Up>{_s_t_d_:_:_f_o_r_w_a_r_d_<___T_p_>(__t)}; │ │ │ │ -103 } │ │ │ │ -104 │ │ │ │ -105 template │ │ │ │ -106 [[noreturn]] │ │ │ │ -107 inline void │ │ │ │ -108 __throw_with_nested_impl(_Tp&& __t, _f_a_l_s_e___t_y_p_e) │ │ │ │ -109 { throw _s_t_d_:_:_f_o_r_w_a_r_d_<___T_p_>(__t); } │ │ │ │ -110 │ │ │ │ -111 /// @endcond │ │ │ │ -112 │ │ │ │ -113 /// If @p __t is derived from nested_exception, throws @p __t. │ │ │ │ -114 /// Else, throws an implementation-defined object derived from both. │ │ │ │ -115 template │ │ │ │ -116 [[noreturn]] │ │ │ │ -117 inline void │ │ │ │ -_1_1_8 _t_h_r_o_w___w_i_t_h___n_e_s_t_e_d(_Tp&& __t) │ │ │ │ -119 { │ │ │ │ -120 using _Up = typename decay<_Tp>::type; │ │ │ │ -121 using ___C_o_p_y_C_o_n_s_t_r_u_c_t_i_b_l_e │ │ │ │ -122 = _____a_n_d___<_i_s___c_o_p_y___c_o_n_s_t_r_u_c_t_i_b_l_e_<___U_p_>, _i_s___m_o_v_e___c_o_n_s_t_r_u_c_t_i_b_l_e_<___U_p_>>; │ │ │ │ -123 static_assert(_CopyConstructible::value, │ │ │ │ -124 "throw_with_nested argument must be CopyConstructible"); │ │ │ │ -125 using _____n_e_s_t = _____a_n_d___<_i_s___c_l_a_s_s_<___U_p_>, __bool_constant, │ │ │ │ -126 _____n_o_t___<_i_s___b_a_s_e___o_f_<_n_e_s_t_e_d___e_x_c_e_p_t_i_o_n_,_ ___U_p_>>>; │ │ │ │ -127 _s_t_d_:_:_____t_h_r_o_w___w_i_t_h___n_e_s_t_e_d___i_m_p_l(_s_t_d_:_:_f_o_r_w_a_r_d_<___T_p_>(__t), _____n_e_s_t{}); │ │ │ │ -128 } │ │ │ │ +81 template │ │ │ │ +82 struct __duration_common_type<_CT, _Period1, _Period2, │ │ │ │ +83 __void_t> │ │ │ │ +84 { │ │ │ │ +85 private: │ │ │ │ +86 using __gcd_num = __static_gcd<_Period1::num, _Period2::num>; │ │ │ │ +87 using __gcd_den = __static_gcd<_Period1::den, _Period2::den>; │ │ │ │ +88 using __cr = typename _CT::type; │ │ │ │ +89 using __r = ratio<__gcd_num::value, │ │ │ │ +90 (_Period1::den / __gcd_den::value) * _Period2::den>; │ │ │ │ +91 │ │ │ │ +92 public: │ │ │ │ +93 using type = chrono::duration<__cr, typename __r::type>; │ │ │ │ +94 }; │ │ │ │ +95 │ │ │ │ +96 /// @endcond │ │ │ │ +97 │ │ │ │ +98 /// @{ │ │ │ │ +99 /// @relates chrono::duration │ │ │ │ +100 │ │ │ │ +101 /// Specialization of common_type for chrono::duration types. │ │ │ │ +102 template │ │ │ │ +_1_0_3 struct _c_o_m_m_o_n___t_y_p_e, │ │ │ │ +104 _c_h_r_o_n_o_:_:_d_u_r_a_t_i_o_n<_Rep2, _Period2>> │ │ │ │ +105 : __duration_common_type, │ │ │ │ +106 typename _Period1::type, │ │ │ │ +107 typename _Period2::type> │ │ │ │ +108 { }; │ │ │ │ +109 │ │ │ │ +110 /// Specialization of common_type for two identical chrono::duration types. │ │ │ │ +111 template │ │ │ │ +_1_1_2 struct _c_o_m_m_o_n___t_y_p_e, │ │ │ │ +113 _c_h_r_o_n_o_:_:_d_u_r_a_t_i_o_n<_Rep, _Period>> │ │ │ │ +114 { │ │ │ │ +115 using _t_y_p_e = _c_h_r_o_n_o_:_:_d_u_r_a_t_i_o_n_<_t_y_p_e_n_a_m_e_ _c_o_m_m_o_n___t_y_p_e_<___R_e_p_>_:_:_t_y_p_e, │ │ │ │ +116 typename _Period::type>; │ │ │ │ +117 }; │ │ │ │ +118 │ │ │ │ +119 /// Specialization of common_type for one chrono::duration type. │ │ │ │ +120 template │ │ │ │ +_1_2_1 struct _c_o_m_m_o_n___t_y_p_e> │ │ │ │ +122 { │ │ │ │ +123 using _t_y_p_e = _c_h_r_o_n_o_:_:_d_u_r_a_t_i_o_n_<_t_y_p_e_n_a_m_e_ _c_o_m_m_o_n___t_y_p_e_<___R_e_p_>_:_:_t_y_p_e, │ │ │ │ +124 typename _Period::type>; │ │ │ │ +125 }; │ │ │ │ +126 /// @} │ │ │ │ +127 │ │ │ │ +128 // 20.11.4.3 specialization of common_type (for time_point, sfinae- │ │ │ │ +friendly) │ │ │ │ 129 │ │ │ │ 130 /// @cond undocumented │ │ │ │ 131 │ │ │ │ -132 // Determine if dynamic_cast would be well-formed. │ │ │ │ -133 template │ │ │ │ -134 using __rethrow_if_nested_cond = typename enable_if< │ │ │ │ -135 __and_, │ │ │ │ -136 __or_<__not_>, │ │ │ │ -137 is_convertible<_Tp*, nested_exception*>>>::value │ │ │ │ -138 >::type; │ │ │ │ -139 │ │ │ │ -140 // Attempt dynamic_cast to nested_exception and call rethrow_nested(). │ │ │ │ -141 template │ │ │ │ -142 inline __rethrow_if_nested_cond<_Ex> │ │ │ │ -143 __rethrow_if_nested_impl(const _Ex* __ptr) │ │ │ │ -144 { │ │ │ │ -145 if (auto __ne_ptr = dynamic_cast(__ptr)) │ │ │ │ -146 __ne_ptr->rethrow_nested(); │ │ │ │ -147 } │ │ │ │ -148 │ │ │ │ -149 // Otherwise, no effects. │ │ │ │ -150 inline void │ │ │ │ -151 __rethrow_if_nested_impl(const void*) │ │ │ │ -152 { } │ │ │ │ +132 template │ │ │ │ +133 struct __timepoint_common_type │ │ │ │ +134 { }; │ │ │ │ +135 │ │ │ │ +136 template │ │ │ │ +137 struct __timepoint_common_type<_CT, _Clock, __void_t> │ │ │ │ +138 { │ │ │ │ +139 using type = chrono::time_point<_Clock, typename _CT::type>; │ │ │ │ +140 }; │ │ │ │ +141 │ │ │ │ +142 /// @endcond │ │ │ │ +143 │ │ │ │ +144 /// @{ │ │ │ │ +145 /// @relates chrono::time_point │ │ │ │ +146 │ │ │ │ +147 /// Specialization of common_type for chrono::time_point types. │ │ │ │ +148 template │ │ │ │ +_1_4_9 struct _c_o_m_m_o_n___t_y_p_e, │ │ │ │ +150 _c_h_r_o_n_o_:_:_t_i_m_e___p_o_i_n_t<_Clock, _Duration2>> │ │ │ │ +151 : __timepoint_common_type, _Clock> │ │ │ │ +152 { }; │ │ │ │ 153 │ │ │ │ -154 /// @endcond │ │ │ │ -155 │ │ │ │ -156 /// If @p __ex is derived from nested_exception, @p __ex.rethrow_nested(). │ │ │ │ -157 template │ │ │ │ -158 inline void │ │ │ │ -_1_5_9 _r_e_t_h_r_o_w___i_f___n_e_s_t_e_d(const ___E_x& _____e_x) │ │ │ │ -160 { _s_t_d_:_:_____r_e_t_h_r_o_w___i_f___n_e_s_t_e_d___i_m_p_l(_s_t_d_:_:_____a_d_d_r_e_s_s_o_f(_____e_x)); } │ │ │ │ -161 │ │ │ │ -162 /// @} group exceptions │ │ │ │ -163} // namespace std │ │ │ │ -164 │ │ │ │ -165} // extern "C++" │ │ │ │ -166 │ │ │ │ -167#endif // C++11 │ │ │ │ -168 │ │ │ │ -169#pragma GCC visibility pop │ │ │ │ -170 │ │ │ │ -171#endif // _GLIBCXX_NESTED_EXCEPTION_H │ │ │ │ -_m_o_v_e_._h │ │ │ │ -_c_+_+_0_x___w_a_r_n_i_n_g_._h │ │ │ │ -_c_+_+_c_o_n_f_i_g_._h │ │ │ │ +154 /// Specialization of common_type for two identical chrono::time_point │ │ │ │ +types. │ │ │ │ +155 template │ │ │ │ +_1_5_6 struct _c_o_m_m_o_n___t_y_p_e, │ │ │ │ +157 _c_h_r_o_n_o_:_:_t_i_m_e___p_o_i_n_t<_Clock, _Duration>> │ │ │ │ +158 { using _t_y_p_e = _c_h_r_o_n_o_:_:_t_i_m_e___p_o_i_n_t_<___C_l_o_c_k_,_ ___D_u_r_a_t_i_o_n_>; }; │ │ │ │ +159 │ │ │ │ +160 /// Specialization of common_type for one chrono::time_point type. │ │ │ │ +161 template │ │ │ │ +_1_6_2 struct _c_o_m_m_o_n___t_y_p_e> │ │ │ │ +163 { using _t_y_p_e = _c_h_r_o_n_o_:_:_t_i_m_e___p_o_i_n_t_<___C_l_o_c_k_,_ ___D_u_r_a_t_i_o_n_>; }; │ │ │ │ +164 /// @} │ │ │ │ +165 │ │ │ │ +166 /// @} group chrono │ │ │ │ +167 │ │ │ │ +168 namespace chrono │ │ │ │ +169 { │ │ │ │ +170 /// @addtogroup chrono │ │ │ │ +171 /// @{ │ │ │ │ +172 │ │ │ │ +173 /// @cond undocumented │ │ │ │ +174 │ │ │ │ +175 // Primary template for duration_cast impl. │ │ │ │ +176 template │ │ │ │ +178 struct _____d_u_r_a_t_i_o_n___c_a_s_t___i_m_p_l │ │ │ │ +179 { │ │ │ │ +180 template │ │ │ │ +181 static constexpr ___T_o_D_u_r │ │ │ │ +182 _____c_a_s_t(const _d_u_r_a_t_i_o_n_<___R_e_p_,_ ___P_e_r_i_o_d_>& __d) │ │ │ │ +183 { │ │ │ │ +184 typedef typename _ToDur::rep _____t_o___r_e_p; │ │ │ │ +185 return ___T_o_D_u_r(static_cast<_____t_o___r_e_p>(static_cast<___C_R>(__d.count()) │ │ │ │ +186 * static_cast<___C_R>(_CF::num) │ │ │ │ +187 / static_cast<___C_R>(_CF::den))); │ │ │ │ +188 } │ │ │ │ +189 }; │ │ │ │ +190 │ │ │ │ +191 template │ │ │ │ +192 struct __duration_cast_impl<_ToDur, _CF, _CR, true, true> │ │ │ │ +193 { │ │ │ │ +194 template │ │ │ │ +195 static constexpr _ToDur │ │ │ │ +196 __cast(const duration<_Rep, _Period>& __d) │ │ │ │ +197 { │ │ │ │ +198 typedef typename _ToDur::rep __to_rep; │ │ │ │ +199 return _ToDur(static_cast<__to_rep>(__d.count())); │ │ │ │ +200 } │ │ │ │ +201 }; │ │ │ │ +202 │ │ │ │ +203 template │ │ │ │ +204 struct __duration_cast_impl<_ToDur, _CF, _CR, true, false> │ │ │ │ +205 { │ │ │ │ +206 template │ │ │ │ +207 static constexpr _ToDur │ │ │ │ +208 __cast(const duration<_Rep, _Period>& __d) │ │ │ │ +209 { │ │ │ │ +210 typedef typename _ToDur::rep __to_rep; │ │ │ │ +211 return _ToDur(static_cast<__to_rep>( │ │ │ │ +212 static_cast<_CR>(__d.count()) / static_cast<_CR>(_CF::den))); │ │ │ │ +213 } │ │ │ │ +214 }; │ │ │ │ +215 │ │ │ │ +216 template │ │ │ │ +217 struct __duration_cast_impl<_ToDur, _CF, _CR, false, true> │ │ │ │ +218 { │ │ │ │ +219 template │ │ │ │ +220 static constexpr _ToDur │ │ │ │ +221 __cast(const duration<_Rep, _Period>& __d) │ │ │ │ +222 { │ │ │ │ +223 typedef typename _ToDur::rep __to_rep; │ │ │ │ +224 return _ToDur(static_cast<__to_rep>( │ │ │ │ +225 static_cast<_CR>(__d.count()) * static_cast<_CR>(_CF::num))); │ │ │ │ +226 } │ │ │ │ +227 }; │ │ │ │ +228 │ │ │ │ +229 template │ │ │ │ +230 struct __is_duration │ │ │ │ +231 : _s_t_d_:_:_f_a_l_s_e___t_y_p_e │ │ │ │ +232 { }; │ │ │ │ +233 │ │ │ │ +234 template │ │ │ │ +235 struct __is_duration> │ │ │ │ +236 : _s_t_d_:_:_t_r_u_e___t_y_p_e │ │ │ │ +237 { }; │ │ │ │ +238 │ │ │ │ +239 template │ │ │ │ +240 using __enable_if_is_duration │ │ │ │ +241 = typename enable_if<__is_duration<_Tp>::value, _Tp>::type; │ │ │ │ +242 │ │ │ │ +243 template │ │ │ │ +244 using __disable_if_is_duration │ │ │ │ +245 = typename enable_if::value, _Tp>::type; │ │ │ │ +246 │ │ │ │ +247 /// @endcond │ │ │ │ +248 │ │ │ │ +249 /** Convert a `duration` to type `ToDur`. │ │ │ │ +250 * │ │ │ │ +251 * If the duration cannot be represented accurately in the result type, │ │ │ │ +252 * returns the result of integer truncation (i.e., rounded towards zero). │ │ │ │ +253 * │ │ │ │ +254 * @tparam _ToDur The result type must be a `duration`. │ │ │ │ +255 * @param __d A duration. │ │ │ │ +256 * @return The value of `__d` converted to type `_ToDur`. │ │ │ │ +257 * @since C++11 │ │ │ │ +258 */ │ │ │ │ +259 template │ │ │ │ +260 _GLIBCXX_NODISCARD │ │ │ │ +261 constexpr __enable_if_is_duration<_ToDur> │ │ │ │ +_2_6_2 _d_u_r_a_t_i_o_n___c_a_s_t(const _d_u_r_a_t_i_o_n_<___R_e_p_,_ ___P_e_r_i_o_d_>& __d) │ │ │ │ +263 { │ │ │ │ +264 typedef typename _ToDur::period _____t_o___p_e_r_i_o_d; │ │ │ │ +265 typedef typename _ToDur::rep _____t_o___r_e_p; │ │ │ │ +266 typedef _r_a_t_i_o___d_i_v_i_d_e_<___P_e_r_i_o_d_,_ _____t_o___p_e_r_i_o_d_> _____c_f; │ │ │ │ +267 typedef typename _c_o_m_m_o_n___t_y_p_e_<_____t_o___r_e_p_,_ ___R_e_p_,_ _i_n_t_m_a_x___t_>_:_:_t_y_p_e _____c_r; │ │ │ │ +268 typedef _____d_u_r_a_t_i_o_n___c_a_s_t___i_m_p_l<___T_o_D_u_r, _____c_f, _____c_r, │ │ │ │ +269 __cf::num == 1, __cf::den == 1> _____d_c; │ │ │ │ +270 return __dc::__cast(__d); │ │ │ │ +271 } │ │ │ │ +272 │ │ │ │ +273 /** Trait indicating whether to treat a type as a floating-point type. │ │ │ │ +274 * │ │ │ │ +275 * The chrono library uses this trait to tell whether a `duration` can │ │ │ │ +276 * represent fractional values of the given precision, or only integral │ │ │ │ +277 * values. │ │ │ │ +278 * │ │ │ │ +279 * You should specialize this trait for your own numeric types that are │ │ │ │ +280 * used with `duration` and can represent non-integral values. │ │ │ │ +281 * │ │ │ │ +282 * @since C++11 │ │ │ │ +283 */ │ │ │ │ +284 template │ │ │ │ +_2_8_5 struct _t_r_e_a_t___a_s___f_l_o_a_t_i_n_g___p_o_i_n_t │ │ │ │ +286 : _i_s___f_l_o_a_t_i_n_g___p_o_i_n_t<_Rep> │ │ │ │ +287 { }; │ │ │ │ +288 │ │ │ │ +289#if __cplusplus > 201402L │ │ │ │ +290 template │ │ │ │ +291 inline constexpr bool treat_as_floating_point_v = │ │ │ │ +292 _t_r_e_a_t___a_s___f_l_o_a_t_i_n_g___p_o_i_n_t_<___R_e_p_>_:_:_v_a_l_u_e; │ │ │ │ +293#endif // C++17 │ │ │ │ +294 │ │ │ │ +295#if __cplusplus > 201703L │ │ │ │ +296 template │ │ │ │ +297 struct is_clock; │ │ │ │ +298 │ │ │ │ +299 template │ │ │ │ +300 inline constexpr bool is_clock_v = is_clock<_Tp>::value; │ │ │ │ +301 │ │ │ │ +302#if __cpp_lib_concepts │ │ │ │ +303 template │ │ │ │ +304 struct is_clock : _f_a_l_s_e___t_y_p_e │ │ │ │ +305 { }; │ │ │ │ +306 │ │ │ │ +307 template │ │ │ │ +308 requires requires { │ │ │ │ +309 typename _Tp::rep; │ │ │ │ +310 typename _Tp::period; │ │ │ │ +311 typename _Tp::duration; │ │ │ │ +312 typename _Tp::time_point::clock; │ │ │ │ +313 typename _Tp::time_point::duration; │ │ │ │ +314 { &_Tp::is_steady } -> same_as; │ │ │ │ +315 { _Tp::now() } -> same_as; │ │ │ │ +316 requires same_as>; │ │ │ │ +318 requires same_as; │ │ │ │ +320 } │ │ │ │ +321 struct is_clock<_Tp> : _t_r_u_e___t_y_p_e │ │ │ │ +322 { }; │ │ │ │ +323#else │ │ │ │ +324 template │ │ │ │ +325 struct __is_clock_impl : _f_a_l_s_e___t_y_p_e │ │ │ │ +326 { }; │ │ │ │ +327 │ │ │ │ +328 template │ │ │ │ +329 struct __is_clock_impl<_Tp, │ │ │ │ +330 _v_o_i_d___t> │ │ │ │ +335 : __and_>, │ │ │ │ +337 is_same, │ │ │ │ +339 is_same, │ │ │ │ +340 is_same>::type │ │ │ │ +341 { }; │ │ │ │ +342 │ │ │ │ +343 template │ │ │ │ +344 struct is_clock : __is_clock_impl<_Tp>::type │ │ │ │ +345 { }; │ │ │ │ +346#endif │ │ │ │ +347#endif // C++20 │ │ │ │ +348 │ │ │ │ +349#if __cplusplus >= 201703L │ │ │ │ +350# define __cpp_lib_chrono 201611L │ │ │ │ +351 │ │ │ │ +352 /** Convert a `duration` to type `ToDur` and round down. │ │ │ │ +353 * │ │ │ │ +354 * If the duration cannot be represented exactly in the result type, │ │ │ │ +355 * returns the closest value that is less than the argument. │ │ │ │ +356 * │ │ │ │ +357 * @tparam _ToDur The result type must be a `duration`. │ │ │ │ +358 * @param __d A duration. │ │ │ │ +359 * @return The value of `__d` converted to type `_ToDur`. │ │ │ │ +360 * @since C++17 │ │ │ │ +361 */ │ │ │ │ +362 template │ │ │ │ +363 [[nodiscard]] constexpr __enable_if_is_duration<_ToDur> │ │ │ │ +_3_6_4 floor(const _d_u_r_a_t_i_o_n_<___R_e_p_,_ ___P_e_r_i_o_d_>& __d) │ │ │ │ +365 { │ │ │ │ +366 auto _____t_o = chrono::duration_cast<_ToDur>(__d); │ │ │ │ +367 if (_____t_o > __d) │ │ │ │ +368 return _____t_o - ___T_o_D_u_r{1}; │ │ │ │ +369 return _____t_o; │ │ │ │ +370 } │ │ │ │ +371 │ │ │ │ +372 /** Convert a `duration` to type `ToDur` and round up. │ │ │ │ +373 * │ │ │ │ +374 * If the duration cannot be represented exactly in the result type, │ │ │ │ +375 * returns the closest value that is greater than the argument. │ │ │ │ +376 * │ │ │ │ +377 * @tparam _ToDur The result type must be a `duration`. │ │ │ │ +378 * @param __d A duration. │ │ │ │ +379 * @return The value of `__d` converted to type `_ToDur`. │ │ │ │ +380 * @since C++17 │ │ │ │ +381 */ │ │ │ │ +382 template │ │ │ │ +383 [[_n_o_d_i_s_c_a_r_d]] constexpr _____e_n_a_b_l_e___i_f___i_s___d_u_r_a_t_i_o_n_<___T_o_D_u_r_> │ │ │ │ +_3_8_4 ceil(const _d_u_r_a_t_i_o_n_<___R_e_p_,_ ___P_e_r_i_o_d_>& __d) │ │ │ │ +385 { │ │ │ │ +386 auto _____t_o = chrono::duration_cast<_ToDur>(__d); │ │ │ │ +387 if (_____t_o < __d) │ │ │ │ +388 return _____t_o + ___T_o_D_u_r{1}; │ │ │ │ +389 return _____t_o; │ │ │ │ +390 } │ │ │ │ +391 │ │ │ │ +392 /** Convert a `duration` to type `ToDur` and round to the closest value. │ │ │ │ +393 * │ │ │ │ +394 * If the duration cannot be represented exactly in the result type, │ │ │ │ +395 * returns the closest value, rounding ties to even. │ │ │ │ +396 * │ │ │ │ +397 * @tparam _ToDur The result type must be a `duration` with a │ │ │ │ +398 * non-floating-point `rep` type. │ │ │ │ +399 * @param __d A duration. │ │ │ │ +400 * @return The value of `__d` converted to type `_ToDur`. │ │ │ │ +401 * @since C++17 │ │ │ │ +402 */ │ │ │ │ +403 template │ │ │ │ +404 [[_n_o_d_i_s_c_a_r_d]] constexpr │ │ │ │ +405 _e_n_a_b_l_e___i_f___t< │ │ │ │ +406 _____a_n_d___<_____i_s___d_u_r_a_t_i_o_n_<___T_o_D_u_r_>, │ │ │ │ +407 _____n_o_t___<_t_r_e_a_t___a_s___f_l_o_a_t_i_n_g___p_o_i_n_t_<_t_y_p_e_n_a_m_e_ ___T_o_D_u_r_:_:_r_e_p_>>>::value, │ │ │ │ +408 ___T_o_D_u_r> │ │ │ │ +_4_0_9 _r_o_u_n_d(const _d_u_r_a_t_i_o_n_<___R_e_p_,_ ___P_e_r_i_o_d_>& __d) │ │ │ │ +410 { │ │ │ │ +411 ___T_o_D_u_r _____t_0 = chrono::floor<_ToDur>(__d); │ │ │ │ +412 ___T_o_D_u_r _____t_1 = _____t_0 + ___T_o_D_u_r{1}; │ │ │ │ +413 auto _____d_i_f_f_0 = __d - _____t_0; │ │ │ │ +414 auto _____d_i_f_f_1 = _____t_1 - __d; │ │ │ │ +415 if (_____d_i_f_f_0 == _____d_i_f_f_1) │ │ │ │ +416 { │ │ │ │ +417 if (_____t_0.count() & 1) │ │ │ │ +418 return _____t_1; │ │ │ │ +419 return _____t_0; │ │ │ │ +420 } │ │ │ │ +421 else if (_____d_i_f_f_0 < _____d_i_f_f_1) │ │ │ │ +422 return _____t_0; │ │ │ │ +423 return _____t_1; │ │ │ │ +424 } │ │ │ │ +425 │ │ │ │ +426 /** The absolute (non-negative) value of a duration. │ │ │ │ +427 * │ │ │ │ +428 * @param __d A duration with a signed `rep` type. │ │ │ │ +429 * @return A duration of the same type as the argument, with value |d|. │ │ │ │ +430 * @since C++17 │ │ │ │ +431 */ │ │ │ │ +432 template │ │ │ │ +433 [[_n_o_d_i_s_c_a_r_d]] constexpr │ │ │ │ +434 _e_n_a_b_l_e___i_f___t_<_n_u_m_e_r_i_c___l_i_m_i_t_s_<___R_e_p_>_:_:_i_s___s_i_g_n_e_d, _d_u_r_a_t_i_o_n_<___R_e_p_,_ ___P_e_r_i_o_d_>> │ │ │ │ +_4_3_5 _a_b_s(_d_u_r_a_t_i_o_n_<___R_e_p_,_ ___P_e_r_i_o_d_> __d) │ │ │ │ +436 { │ │ │ │ +437 if (__d >= __d.zero()) │ │ │ │ +438 return __d; │ │ │ │ +439 return -__d; │ │ │ │ +440 } │ │ │ │ +441 │ │ │ │ +442 // Make chrono::ceil also usable as chrono::__detail::ceil. │ │ │ │ +443 namespace __detail { using _c_h_r_o_n_o_:_:_c_e_i_l; } │ │ │ │ +444 │ │ │ │ +445#else // ! C++17 │ │ │ │ +446 │ │ │ │ +447 // We want to use ceil even when compiling for earlier standards versions. │ │ │ │ +448 // C++11 only allows a single statement in a constexpr function, so we │ │ │ │ +449 // need to move the comparison into a separate function, __ceil_impl. │ │ │ │ +450 namespace __detail │ │ │ │ +451 { │ │ │ │ +452 template │ │ │ │ +453 constexpr _Tp │ │ │ │ +454 __ceil_impl(const _Tp& __t, const _Up& __u) │ │ │ │ +455 { │ │ │ │ +456 return (__t < __u) ? (__t + _Tp{1}) : __t; │ │ │ │ +457 } │ │ │ │ +458 │ │ │ │ +459 // C++11-friendly version of std::chrono::ceil for internal use. │ │ │ │ +460 template │ │ │ │ +461 constexpr _ToDur │ │ │ │ +462 ceil(const duration<_Rep, _Period>& __d) │ │ │ │ +463 { │ │ │ │ +464 return __detail::__ceil_impl(chrono::duration_cast<_ToDur>(__d), __d); │ │ │ │ +465 } │ │ │ │ +466 } │ │ │ │ +467#endif // C++17 │ │ │ │ +468 │ │ │ │ +469 /// duration_values │ │ │ │ +470 template │ │ │ │ +_4_7_1 struct _d_u_r_a_t_i_o_n___v_a_l_u_e_s │ │ │ │ +472 { │ │ │ │ +473 static constexpr _Rep │ │ │ │ +474 zero() noexcept │ │ │ │ +475 { return _Rep(0); } │ │ │ │ +476 │ │ │ │ +477 static constexpr _Rep │ │ │ │ +478 max() noexcept │ │ │ │ +479 { return _n_u_m_e_r_i_c___l_i_m_i_t_s_<___R_e_p_>_:_:_m_a_x(); } │ │ │ │ +480 │ │ │ │ +481 static constexpr _Rep │ │ │ │ +482 min() noexcept │ │ │ │ +483 { return _n_u_m_e_r_i_c___l_i_m_i_t_s_<___R_e_p_>_:_:_l_o_w_e_s_t(); } │ │ │ │ +484 }; │ │ │ │ +485 │ │ │ │ +486 template │ │ │ │ +_4_8_7 class _d_u_r_a_t_i_o_n │ │ │ │ +488 { │ │ │ │ +489 static_assert(!_____i_s___d_u_r_a_t_i_o_n_<___R_e_p_>_:_:_v_a_l_u_e, │ │ │ │ +490 "rep cannot be a std::chrono::duration"); │ │ │ │ +491 static_assert(_____i_s___r_a_t_i_o_<___P_e_r_i_o_d_>_:_:_v_a_l_u_e, │ │ │ │ +492 "period must be a specialization of std::ratio"); │ │ │ │ +493 static_assert(_Period::num > 0, "period must be positive"); │ │ │ │ +494 │ │ │ │ +495 template │ │ │ │ +496 using _____i_s___f_l_o_a_t = _t_r_e_a_t___a_s___f_l_o_a_t_i_n_g___p_o_i_n_t_<___R_e_p_2_>; │ │ │ │ +497 │ │ │ │ +498 static constexpr _i_n_t_m_a_x___t │ │ │ │ +499 _S_gcd(_i_n_t_m_a_x___t _____m, _i_n_t_m_a_x___t __n) noexcept │ │ │ │ +500 { │ │ │ │ +501 // Duration only allows positive periods so we don't need to │ │ │ │ +502 // handle negative values here (unlike __static_gcd and std::gcd). │ │ │ │ +503#if __cplusplus >= 201402L │ │ │ │ +504 do │ │ │ │ +505 { │ │ │ │ +506 _i_n_t_m_a_x___t _____r_e_m = _____m % __n; │ │ │ │ +507 _____m = __n; │ │ │ │ +508 __n = _____r_e_m; │ │ │ │ +509 } │ │ │ │ +510 while (__n != 0); │ │ │ │ +511 return _____m; │ │ │ │ +512#else │ │ │ │ +513 // C++11 doesn't allow loops in constexpr functions, but this │ │ │ │ +514 // recursive version can be more expensive to evaluate. │ │ │ │ +515 return (__n == 0) ? _____m : _S_gcd(__n, _____m % __n); │ │ │ │ +516#endif │ │ │ │ +517 } │ │ │ │ +518 │ │ │ │ +519 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ +520 // 2094. overflow shouldn't participate in overload resolution │ │ │ │ +521 // 3090. What is [2094] intended to mean? │ │ │ │ +522 // This only produces a valid type if no overflow occurs. │ │ │ │ +523 template │ │ │ │ +526 using _____d_i_v_i_d_e = _r_a_t_i_o<(_R1::num / _____g_c_d_1) * (_R2::den / _____g_c_d_2), │ │ │ │ +527 (_R1::den / _____g_c_d_2) * (_R2::num / _____g_c_d_1)>; │ │ │ │ +528 │ │ │ │ +529 // _Period2 is an exact multiple of _Period │ │ │ │ +530 template │ │ │ │ +531 using _____i_s___h_a_r_m_o_n_i_c │ │ │ │ +532 = _____b_o_o_l___c_o_n_s_t_a_n_t_<_____d_i_v_i_d_e_<___P_e_r_i_o_d_2_,_ ___P_e_r_i_o_d_>_:_:_d_e_n == 1>; │ │ │ │ +533 │ │ │ │ +534 public: │ │ │ │ +535 │ │ │ │ +536 using rep = _Rep; │ │ │ │ +537 using period = typename _Period::type; │ │ │ │ +538 │ │ │ │ +539 // 20.11.5.1 construction / copy / destroy │ │ │ │ +540 constexpr _d_u_r_a_t_i_o_n() = default; │ │ │ │ +541 │ │ │ │ +542 _d_u_r_a_t_i_o_n(const _d_u_r_a_t_i_o_n&) = default; │ │ │ │ +543 │ │ │ │ +544 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ +545 // 3050. Conversion specification problem in chrono::duration │ │ │ │ +546 template, │ │ │ │ +548 _____o_r___<_____i_s___f_l_o_a_t_<_r_e_p_>, _____n_o_t___<_____i_s___f_l_o_a_t_<___R_e_p_2_>>>>> │ │ │ │ +549 constexpr explicit _d_u_r_a_t_i_o_n(const ___R_e_p_2& __rep) │ │ │ │ +550 : __r(static_cast(__rep)) { } │ │ │ │ +551 │ │ │ │ +552 template, │ │ │ │ +554 _____o_r___<_____i_s___f_l_o_a_t_<_r_e_p_>, │ │ │ │ +555 _____a_n_d___<_____i_s___h_a_r_m_o_n_i_c_<___P_e_r_i_o_d_2_>, │ │ │ │ +556 _____n_o_t___<_____i_s___f_l_o_a_t_<___R_e_p_2_>>>>>> │ │ │ │ +557 constexpr _d_u_r_a_t_i_o_n(const _d_u_r_a_t_i_o_n_<___R_e_p_2_,_ ___P_e_r_i_o_d_2_>& __d) │ │ │ │ +558 : __r(_d_u_r_a_t_i_o_n___c_a_s_t_<_d_u_r_a_t_i_o_n_>(__d).count()) { } │ │ │ │ +559 │ │ │ │ +560 _~_d_u_r_a_t_i_o_n() = default; │ │ │ │ +561 _d_u_r_a_t_i_o_n& operator=(const _d_u_r_a_t_i_o_n&) = default; │ │ │ │ +562 │ │ │ │ +563 // 20.11.5.2 observer │ │ │ │ +564 constexpr rep │ │ │ │ +565 count() const │ │ │ │ +566 { return __r; } │ │ │ │ +567 │ │ │ │ +568 // 20.11.5.3 arithmetic │ │ │ │ +569 │ │ │ │ +570 constexpr _d_u_r_a_t_i_o_n_<_t_y_p_e_n_a_m_e_ _c_o_m_m_o_n___t_y_p_e_<_r_e_p_>_:_:_t_y_p_e, period> │ │ │ │ +571 operator+() const │ │ │ │ +572 { return _d_u_r_a_t_i_o_n_<_t_y_p_e_n_a_m_e_ _c_o_m_m_o_n___t_y_p_e_<_r_e_p_>_:_:_t_y_p_e, period>(__r); } │ │ │ │ +573 │ │ │ │ +574 constexpr _d_u_r_a_t_i_o_n_<_t_y_p_e_n_a_m_e_ _c_o_m_m_o_n___t_y_p_e_<_r_e_p_>_:_:_t_y_p_e, period> │ │ │ │ +575 operator-() const │ │ │ │ +576 { return _d_u_r_a_t_i_o_n_<_t_y_p_e_n_a_m_e_ _c_o_m_m_o_n___t_y_p_e_<_r_e_p_>_:_:_t_y_p_e, period>(-__r); } │ │ │ │ +577 │ │ │ │ +578 ___G_L_I_B_C_X_X_1_7___C_O_N_S_T_E_X_P_R _d_u_r_a_t_i_o_n& │ │ │ │ +579 operator++() │ │ │ │ +580 { │ │ │ │ +581 ++__r; │ │ │ │ +582 return *this; │ │ │ │ +583 } │ │ │ │ +584 │ │ │ │ +585 ___G_L_I_B_C_X_X_1_7___C_O_N_S_T_E_X_P_R _d_u_r_a_t_i_o_n │ │ │ │ +586 operator++(int) │ │ │ │ +587 { return _d_u_r_a_t_i_o_n(__r++); } │ │ │ │ +588 │ │ │ │ +589 ___G_L_I_B_C_X_X_1_7___C_O_N_S_T_E_X_P_R _d_u_r_a_t_i_o_n& │ │ │ │ +590 operator--() │ │ │ │ +591 { │ │ │ │ +592 --__r; │ │ │ │ +593 return *this; │ │ │ │ +594 } │ │ │ │ +595 │ │ │ │ +596 ___G_L_I_B_C_X_X_1_7___C_O_N_S_T_E_X_P_R _d_u_r_a_t_i_o_n │ │ │ │ +597 operator--(int) │ │ │ │ +598 { return _d_u_r_a_t_i_o_n(__r--); } │ │ │ │ +599 │ │ │ │ +600 ___G_L_I_B_C_X_X_1_7___C_O_N_S_T_E_X_P_R _d_u_r_a_t_i_o_n& │ │ │ │ +601 operator+=(const _d_u_r_a_t_i_o_n& __d) │ │ │ │ +602 { │ │ │ │ +603 __r += __d.count(); │ │ │ │ +604 return *this; │ │ │ │ +605 } │ │ │ │ +606 │ │ │ │ +607 ___G_L_I_B_C_X_X_1_7___C_O_N_S_T_E_X_P_R _d_u_r_a_t_i_o_n& │ │ │ │ +608 operator-=(const _d_u_r_a_t_i_o_n& __d) │ │ │ │ +609 { │ │ │ │ +610 __r -= __d.count(); │ │ │ │ +611 return *this; │ │ │ │ +612 } │ │ │ │ +613 │ │ │ │ +614 ___G_L_I_B_C_X_X_1_7___C_O_N_S_T_E_X_P_R _d_u_r_a_t_i_o_n& │ │ │ │ +615 operator*=(const rep& _____r_h_s) │ │ │ │ +616 { │ │ │ │ +617 __r *= _____r_h_s; │ │ │ │ +618 return *this; │ │ │ │ +619 } │ │ │ │ +620 │ │ │ │ +621 ___G_L_I_B_C_X_X_1_7___C_O_N_S_T_E_X_P_R _d_u_r_a_t_i_o_n& │ │ │ │ +622 operator/=(const rep& _____r_h_s) │ │ │ │ +623 { │ │ │ │ +624 __r /= _____r_h_s; │ │ │ │ +625 return *this; │ │ │ │ +626 } │ │ │ │ +627 │ │ │ │ +628 // DR 934. │ │ │ │ +629 template │ │ │ │ +630 ___G_L_I_B_C_X_X_1_7___C_O_N_S_T_E_X_P_R │ │ │ │ +631 typename _e_n_a_b_l_e___i_f_<_!_t_r_e_a_t___a_s___f_l_o_a_t_i_n_g___p_o_i_n_t_<___R_e_p_2_>_:_:_v_a_l_u_e, │ │ │ │ +632 _d_u_r_a_t_i_o_n&>::type │ │ │ │ +633 operator%=(const rep& _____r_h_s) │ │ │ │ +634 { │ │ │ │ +635 __r %= _____r_h_s; │ │ │ │ +636 return *this; │ │ │ │ +637 } │ │ │ │ +638 │ │ │ │ +639 template │ │ │ │ +640 ___G_L_I_B_C_X_X_1_7___C_O_N_S_T_E_X_P_R │ │ │ │ +641 typename _e_n_a_b_l_e___i_f_<_!_t_r_e_a_t___a_s___f_l_o_a_t_i_n_g___p_o_i_n_t_<___R_e_p_2_>_:_:_v_a_l_u_e, │ │ │ │ +642 _d_u_r_a_t_i_o_n&>::type │ │ │ │ +643 operator%=(const _d_u_r_a_t_i_o_n& __d) │ │ │ │ +644 { │ │ │ │ +645 __r %= __d.count(); │ │ │ │ +646 return *this; │ │ │ │ +647 } │ │ │ │ +648 │ │ │ │ +649 // 20.11.5.4 special values │ │ │ │ +650 static constexpr _d_u_r_a_t_i_o_n │ │ │ │ +651 zero() noexcept │ │ │ │ +652 { return _d_u_r_a_t_i_o_n(_d_u_r_a_t_i_o_n___v_a_l_u_e_s_<_r_e_p_>_:_:_z_e_r_o()); } │ │ │ │ +653 │ │ │ │ +654 static constexpr _d_u_r_a_t_i_o_n │ │ │ │ +655 min() noexcept │ │ │ │ +656 { return _d_u_r_a_t_i_o_n(_d_u_r_a_t_i_o_n___v_a_l_u_e_s_<_r_e_p_>_:_:_m_i_n()); } │ │ │ │ +657 │ │ │ │ +658 static constexpr _d_u_r_a_t_i_o_n │ │ │ │ +659 max() noexcept │ │ │ │ +660 { return _d_u_r_a_t_i_o_n(_d_u_r_a_t_i_o_n___v_a_l_u_e_s_<_r_e_p_>_:_:_m_a_x()); } │ │ │ │ +661 │ │ │ │ +662 private: │ │ │ │ +663 rep __r; │ │ │ │ +664 }; │ │ │ │ +665 │ │ │ │ +666 /// @{ │ │ │ │ +667 /// @relates std::chrono::duration │ │ │ │ +668 │ │ │ │ +669 /// The sum of two durations. │ │ │ │ +670 template │ │ │ │ +672 constexpr typename _c_o_m_m_o_n___t_y_p_e_<_d_u_r_a_t_i_o_n_<___R_e_p_1_,_ ___P_e_r_i_o_d_1_>, │ │ │ │ +673 _d_u_r_a_t_i_o_n_<___R_e_p_2_,_ ___P_e_r_i_o_d_2_>>::type │ │ │ │ +_6_7_4 _o_p_e_r_a_t_o_r_+(const _d_u_r_a_t_i_o_n_<___R_e_p_1_,_ ___P_e_r_i_o_d_1_>& _____l_h_s, │ │ │ │ +675 const _d_u_r_a_t_i_o_n_<___R_e_p_2_,_ ___P_e_r_i_o_d_2_>& _____r_h_s) │ │ │ │ +676 { │ │ │ │ +677 typedef _d_u_r_a_t_i_o_n_<___R_e_p_1_,_ ___P_e_r_i_o_d_1_> _____d_u_r_1; │ │ │ │ +678 typedef _d_u_r_a_t_i_o_n_<___R_e_p_2_,_ ___P_e_r_i_o_d_2_> _____d_u_r_2; │ │ │ │ +679 typedef typename _c_o_m_m_o_n___t_y_p_e_<_____d_u_r_1_,_____d_u_r_2_>_:_:_t_y_p_e _____c_d; │ │ │ │ +680 return _____c_d(_____c_d(_____l_h_s).count() + _____c_d(_____r_h_s).count()); │ │ │ │ +681 } │ │ │ │ +682 │ │ │ │ +683 /// The difference between two durations. │ │ │ │ +684 template │ │ │ │ +686 constexpr typename _c_o_m_m_o_n___t_y_p_e_<_d_u_r_a_t_i_o_n_<___R_e_p_1_,_ ___P_e_r_i_o_d_1_>, │ │ │ │ +687 _d_u_r_a_t_i_o_n_<___R_e_p_2_,_ ___P_e_r_i_o_d_2_>>::type │ │ │ │ +_6_8_8 _o_p_e_r_a_t_o_r_-(const _d_u_r_a_t_i_o_n_<___R_e_p_1_,_ ___P_e_r_i_o_d_1_>& _____l_h_s, │ │ │ │ +689 const _d_u_r_a_t_i_o_n_<___R_e_p_2_,_ ___P_e_r_i_o_d_2_>& _____r_h_s) │ │ │ │ +690 { │ │ │ │ +691 typedef _d_u_r_a_t_i_o_n_<___R_e_p_1_,_ ___P_e_r_i_o_d_1_> _____d_u_r_1; │ │ │ │ +692 typedef _d_u_r_a_t_i_o_n_<___R_e_p_2_,_ ___P_e_r_i_o_d_2_> _____d_u_r_2; │ │ │ │ +693 typedef typename _c_o_m_m_o_n___t_y_p_e_<_____d_u_r_1_,_____d_u_r_2_>_:_:_t_y_p_e _____c_d; │ │ │ │ +694 return _____c_d(_____c_d(_____l_h_s).count() - _____c_d(_____r_h_s).count()); │ │ │ │ +695 } │ │ │ │ +696 │ │ │ │ +697 /// @} │ │ │ │ +698 │ │ │ │ +699 /// @cond undocumented │ │ │ │ +700 │ │ │ │ +701 // SFINAE helper to obtain common_type<_Rep1, _Rep2> only if _Rep2 │ │ │ │ +702 // is implicitly convertible to it. │ │ │ │ +703 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ +704 // 3050. Conversion specification problem in chrono::duration constructor │ │ │ │ +705 template_:_:_t_y_p_e> │ │ │ │ +707 using _____c_o_m_m_o_n___r_e_p___t = typename │ │ │ │ +708 _e_n_a_b_l_e___i_f_<_i_s___c_o_n_v_e_r_t_i_b_l_e_<_c_o_n_s_t_ ___R_e_p_2_&_,_ ___C_R_e_p_>_:_:_v_a_l_u_e, ___C_R_e_p>::type; │ │ │ │ +709 │ │ │ │ +710 /// @endcond │ │ │ │ +711 │ │ │ │ +712 /** @{ │ │ │ │ +713 * Arithmetic operators for chrono::duration │ │ │ │ +714 * @relates std::chrono::duration │ │ │ │ +715 */ │ │ │ │ +716 │ │ │ │ +717 template │ │ │ │ +718 constexpr _d_u_r_a_t_i_o_n_<_____c_o_m_m_o_n___r_e_p___t_<___R_e_p_1_,_ ___R_e_p_2_>, ___P_e_r_i_o_d> │ │ │ │ +_7_1_9 _o_p_e_r_a_t_o_r_*(const _d_u_r_a_t_i_o_n_<___R_e_p_1_,_ ___P_e_r_i_o_d_>& __d, const ___R_e_p_2& _____s) │ │ │ │ +720 { │ │ │ │ +721 typedef _d_u_r_a_t_i_o_n_<_t_y_p_e_n_a_m_e_ _c_o_m_m_o_n___t_y_p_e_<___R_e_p_1_,_ ___R_e_p_2_>_:_:_t_y_p_e, ___P_e_r_i_o_d> │ │ │ │ +722 _____c_d; │ │ │ │ +723 return _____c_d(_____c_d(__d).count() * _____s); │ │ │ │ +724 } │ │ │ │ +725 │ │ │ │ +726 template │ │ │ │ +727 constexpr _d_u_r_a_t_i_o_n_<_____c_o_m_m_o_n___r_e_p___t_<___R_e_p_2_,_ ___R_e_p_1_>, ___P_e_r_i_o_d> │ │ │ │ +_7_2_8 _o_p_e_r_a_t_o_r_*(const ___R_e_p_1& _____s, const _d_u_r_a_t_i_o_n_<___R_e_p_2_,_ ___P_e_r_i_o_d_>& __d) │ │ │ │ +729 { return __d * _____s; } │ │ │ │ +730 │ │ │ │ +731 template │ │ │ │ +732 constexpr │ │ │ │ +733 _d_u_r_a_t_i_o_n_<_____c_o_m_m_o_n___r_e_p___t_<___R_e_p_1_,_ _____d_i_s_a_b_l_e___i_f___i_s___d_u_r_a_t_i_o_n_<___R_e_p_2_>>, ___P_e_r_i_o_d> │ │ │ │ +_7_3_4 _o_p_e_r_a_t_o_r_/(const _d_u_r_a_t_i_o_n_<___R_e_p_1_,_ ___P_e_r_i_o_d_>& __d, const ___R_e_p_2& _____s) │ │ │ │ +735 { │ │ │ │ +736 typedef _d_u_r_a_t_i_o_n_<_t_y_p_e_n_a_m_e_ _c_o_m_m_o_n___t_y_p_e_<___R_e_p_1_,_ ___R_e_p_2_>_:_:_t_y_p_e, ___P_e_r_i_o_d> │ │ │ │ +737 _____c_d; │ │ │ │ +738 return _____c_d(_____c_d(__d).count() / _____s); │ │ │ │ +739 } │ │ │ │ +740 │ │ │ │ +741 template │ │ │ │ +743 constexpr typename _c_o_m_m_o_n___t_y_p_e_<___R_e_p_1_,_ ___R_e_p_2_>_:_:_t_y_p_e │ │ │ │ +_7_4_4 _o_p_e_r_a_t_o_r_/(const _d_u_r_a_t_i_o_n_<___R_e_p_1_,_ ___P_e_r_i_o_d_1_>& _____l_h_s, │ │ │ │ +745 const _d_u_r_a_t_i_o_n_<___R_e_p_2_,_ ___P_e_r_i_o_d_2_>& _____r_h_s) │ │ │ │ +746 { │ │ │ │ +747 typedef _d_u_r_a_t_i_o_n_<___R_e_p_1_,_ ___P_e_r_i_o_d_1_> _____d_u_r_1; │ │ │ │ +748 typedef _d_u_r_a_t_i_o_n_<___R_e_p_2_,_ ___P_e_r_i_o_d_2_> _____d_u_r_2; │ │ │ │ +749 typedef typename _c_o_m_m_o_n___t_y_p_e_<_____d_u_r_1_,_____d_u_r_2_>_:_:_t_y_p_e _____c_d; │ │ │ │ +750 return _____c_d(_____l_h_s).count() / _____c_d(_____r_h_s).count(); │ │ │ │ +751 } │ │ │ │ +752 │ │ │ │ +753 // DR 934. │ │ │ │ +754 template │ │ │ │ +755 constexpr │ │ │ │ +756 _d_u_r_a_t_i_o_n_<_____c_o_m_m_o_n___r_e_p___t_<___R_e_p_1_,_ _____d_i_s_a_b_l_e___i_f___i_s___d_u_r_a_t_i_o_n_<___R_e_p_2_>>, ___P_e_r_i_o_d> │ │ │ │ +_7_5_7 _o_p_e_r_a_t_o_r_%(const _d_u_r_a_t_i_o_n_<___R_e_p_1_,_ ___P_e_r_i_o_d_>& __d, const ___R_e_p_2& _____s) │ │ │ │ +758 { │ │ │ │ +759 typedef _d_u_r_a_t_i_o_n_<_t_y_p_e_n_a_m_e_ _c_o_m_m_o_n___t_y_p_e_<___R_e_p_1_,_ ___R_e_p_2_>_:_:_t_y_p_e, ___P_e_r_i_o_d> │ │ │ │ +760 _____c_d; │ │ │ │ +761 return _____c_d(_____c_d(__d).count() % _____s); │ │ │ │ +762 } │ │ │ │ +763 │ │ │ │ +764 template │ │ │ │ +766 constexpr typename _c_o_m_m_o_n___t_y_p_e_<_d_u_r_a_t_i_o_n_<___R_e_p_1_,_ ___P_e_r_i_o_d_1_>, │ │ │ │ +767 _d_u_r_a_t_i_o_n_<___R_e_p_2_,_ ___P_e_r_i_o_d_2_>>::type │ │ │ │ +_7_6_8 _o_p_e_r_a_t_o_r_%(const _d_u_r_a_t_i_o_n_<___R_e_p_1_,_ ___P_e_r_i_o_d_1_>& _____l_h_s, │ │ │ │ +769 const _d_u_r_a_t_i_o_n_<___R_e_p_2_,_ ___P_e_r_i_o_d_2_>& _____r_h_s) │ │ │ │ +770 { │ │ │ │ +771 typedef _d_u_r_a_t_i_o_n_<___R_e_p_1_,_ ___P_e_r_i_o_d_1_> _____d_u_r_1; │ │ │ │ +772 typedef _d_u_r_a_t_i_o_n_<___R_e_p_2_,_ ___P_e_r_i_o_d_2_> _____d_u_r_2; │ │ │ │ +773 typedef typename _c_o_m_m_o_n___t_y_p_e_<_____d_u_r_1_,_____d_u_r_2_>_:_:_t_y_p_e _____c_d; │ │ │ │ +774 return _____c_d(_____c_d(_____l_h_s).count() % _____c_d(_____r_h_s).count()); │ │ │ │ +775 } │ │ │ │ +776 /// @} │ │ │ │ +777 │ │ │ │ +778 // comparisons │ │ │ │ +779 │ │ │ │ +780 /** @{ │ │ │ │ +781 * Comparisons for chrono::duration │ │ │ │ +782 * @relates std::chrono::duration │ │ │ │ +783 */ │ │ │ │ +784 │ │ │ │ +785 template │ │ │ │ +787 constexpr bool │ │ │ │ +_7_8_8 _o_p_e_r_a_t_o_r_=_=(const _d_u_r_a_t_i_o_n_<___R_e_p_1_,_ ___P_e_r_i_o_d_1_>& _____l_h_s, │ │ │ │ +789 const _d_u_r_a_t_i_o_n_<___R_e_p_2_,_ ___P_e_r_i_o_d_2_>& _____r_h_s) │ │ │ │ +790 { │ │ │ │ +791 typedef _d_u_r_a_t_i_o_n_<___R_e_p_1_,_ ___P_e_r_i_o_d_1_> _____d_u_r_1; │ │ │ │ +792 typedef _d_u_r_a_t_i_o_n_<___R_e_p_2_,_ ___P_e_r_i_o_d_2_> _____d_u_r_2; │ │ │ │ +793 typedef typename _c_o_m_m_o_n___t_y_p_e_<_____d_u_r_1_,_____d_u_r_2_>_:_:_t_y_p_e _____c_t; │ │ │ │ +794 return _____c_t(_____l_h_s).count() == _____c_t(_____r_h_s).count(); │ │ │ │ +795 } │ │ │ │ +796 │ │ │ │ +797 template │ │ │ │ +_7_9_9 constexpr bool │ │ │ │ +800 _o_p_e_r_a_t_o_r_<(const _d_u_r_a_t_i_o_n_<___R_e_p_1_,_ ___P_e_r_i_o_d_1_>& _____l_h_s, │ │ │ │ +801 const _d_u_r_a_t_i_o_n_<___R_e_p_2_,_ ___P_e_r_i_o_d_2_>& _____r_h_s) │ │ │ │ +802 { │ │ │ │ +803 typedef _d_u_r_a_t_i_o_n_<___R_e_p_1_,_ ___P_e_r_i_o_d_1_> _____d_u_r_1; │ │ │ │ +804 typedef _d_u_r_a_t_i_o_n_<___R_e_p_2_,_ ___P_e_r_i_o_d_2_> _____d_u_r_2; │ │ │ │ +805 typedef typename _c_o_m_m_o_n___t_y_p_e_<_____d_u_r_1_,_____d_u_r_2_>_:_:_t_y_p_e _____c_t; │ │ │ │ +806 return _____c_t(_____l_h_s).count() < _____c_t(_____r_h_s).count(); │ │ │ │ +807 } │ │ │ │ +808 │ │ │ │ +809#if __cpp_lib_three_way_comparison │ │ │ │ +810 template │ │ │ │ +812 requires _t_h_r_e_e___w_a_y___c_o_m_p_a_r_a_b_l_e_<_c_o_m_m_o_n___t_y_p_e___t_<___R_e_p_1_,_ ___R_e_p_2_>> │ │ │ │ +813 constexpr auto │ │ │ │ +814 operator<=>(const _d_u_r_a_t_i_o_n_<___R_e_p_1_,_ ___P_e_r_i_o_d_1_>& _____l_h_s, │ │ │ │ +815 const _d_u_r_a_t_i_o_n_<___R_e_p_2_,_ ___P_e_r_i_o_d_2_>& _____r_h_s) │ │ │ │ +816 { │ │ │ │ +817 using _____c_t = _c_o_m_m_o_n___t_y_p_e___t_<_d_u_r_a_t_i_o_n_<___R_e_p_1_,_ ___P_e_r_i_o_d_1_>, │ │ │ │ +818 _d_u_r_a_t_i_o_n_<___R_e_p_2_,_ ___P_e_r_i_o_d_2_>>; │ │ │ │ +819 return _____c_t(_____l_h_s).count() <=> _____c_t(_____r_h_s).count(); │ │ │ │ +820 } │ │ │ │ +821#else │ │ │ │ +822 template │ │ │ │ +824 constexpr bool │ │ │ │ +_8_2_5 _o_p_e_r_a_t_o_r_!_=(const _d_u_r_a_t_i_o_n_<___R_e_p_1_,_ ___P_e_r_i_o_d_1_>& _____l_h_s, │ │ │ │ +826 const _d_u_r_a_t_i_o_n_<___R_e_p_2_,_ ___P_e_r_i_o_d_2_>& _____r_h_s) │ │ │ │ +827 { return !(_____l_h_s == _____r_h_s); } │ │ │ │ +828#endif │ │ │ │ +829 │ │ │ │ +830 template │ │ │ │ +_8_3_2 constexpr bool │ │ │ │ +833 _o_p_e_r_a_t_o_r_<_=(const _d_u_r_a_t_i_o_n_<___R_e_p_1_,_ ___P_e_r_i_o_d_1_>& _____l_h_s, │ │ │ │ +834 const _d_u_r_a_t_i_o_n_<___R_e_p_2_,_ ___P_e_r_i_o_d_2_>& _____r_h_s) │ │ │ │ +835 { return !(_____r_h_s < _____l_h_s); } │ │ │ │ +836 │ │ │ │ +837 template │ │ │ │ +839 constexpr bool │ │ │ │ +_8_4_0 _o_p_e_r_a_t_o_r_>(const _d_u_r_a_t_i_o_n_<___R_e_p_1_,_ ___P_e_r_i_o_d_1_>& _____l_h_s, │ │ │ │ +841 const _d_u_r_a_t_i_o_n_<___R_e_p_2_,_ ___P_e_r_i_o_d_2_>& _____r_h_s) │ │ │ │ +842 { return _____r_h_s < _____l_h_s; } │ │ │ │ +843 │ │ │ │ +844 template │ │ │ │ +846 constexpr bool │ │ │ │ +_8_4_7 _o_p_e_r_a_t_o_r_>_=(const _d_u_r_a_t_i_o_n_<___R_e_p_1_,_ ___P_e_r_i_o_d_1_>& _____l_h_s, │ │ │ │ +848 const _d_u_r_a_t_i_o_n_<___R_e_p_2_,_ ___P_e_r_i_o_d_2_>& _____r_h_s) │ │ │ │ +849 { return !(_____l_h_s < _____r_h_s); } │ │ │ │ +850 │ │ │ │ +851 /// @} │ │ │ │ +852 │ │ │ │ +853 /// @cond undocumented │ │ │ │ +854#ifdef _GLIBCXX_USE_C99_STDINT_TR1 │ │ │ │ +855# define _GLIBCXX_CHRONO_INT64_T int64_t │ │ │ │ +856#elif defined __INT64_TYPE__ │ │ │ │ +857# define _GLIBCXX_CHRONO_INT64_T __INT64_TYPE__ │ │ │ │ +858#else │ │ │ │ +859 static_assert(_s_t_d_:_:_n_u_m_e_r_i_c___l_i_m_i_t_s_<_u_n_s_i_g_n_e_d_ _l_o_n_g_ _l_o_n_g_>_:_:_d_i_g_i_t_s >= 64, │ │ │ │ +860 "Representation type for nanoseconds must have at least 64 bits"); │ │ │ │ +861# define _GLIBCXX_CHRONO_INT64_T long long │ │ │ │ +862#endif │ │ │ │ +863 /// @endcond │ │ │ │ +864 │ │ │ │ +865 /// nanoseconds │ │ │ │ +_8_6_6 using _n_a_n_o_s_e_c_o_n_d_s = _d_u_r_a_t_i_o_n_<___G_L_I_B_C_X_X___C_H_R_O_N_O___I_N_T_6_4___T_,_ _n_a_n_o_>; │ │ │ │ +867 │ │ │ │ +868 /// microseconds │ │ │ │ +_8_6_9 using _m_i_c_r_o_s_e_c_o_n_d_s = _d_u_r_a_t_i_o_n_<___G_L_I_B_C_X_X___C_H_R_O_N_O___I_N_T_6_4___T_,_ _m_i_c_r_o_>; │ │ │ │ +870 │ │ │ │ +871 /// milliseconds │ │ │ │ +_8_7_2 using _m_i_l_l_i_s_e_c_o_n_d_s = _d_u_r_a_t_i_o_n_<___G_L_I_B_C_X_X___C_H_R_O_N_O___I_N_T_6_4___T_,_ _m_i_l_l_i_>; │ │ │ │ +873 │ │ │ │ +874 /// seconds │ │ │ │ +_8_7_5 using _s_e_c_o_n_d_s = _d_u_r_a_t_i_o_n_<___G_L_I_B_C_X_X___C_H_R_O_N_O___I_N_T_6_4___T_>; │ │ │ │ +876 │ │ │ │ +877 /// minutes │ │ │ │ +_8_7_8 using _m_i_n_u_t_e_s = _d_u_r_a_t_i_o_n_<___G_L_I_B_C_X_X___C_H_R_O_N_O___I_N_T_6_4___T_,_ _r_a_t_i_o_<_ _6_0_>>; │ │ │ │ +879 │ │ │ │ +880 /// hours │ │ │ │ +_8_8_1 using _h_o_u_r_s = _d_u_r_a_t_i_o_n_<___G_L_I_B_C_X_X___C_H_R_O_N_O___I_N_T_6_4___T_,_ _r_a_t_i_o_<_3_6_0_0_>>; │ │ │ │ +882 │ │ │ │ +883#if __cplusplus > 201703L │ │ │ │ +884 /// days │ │ │ │ +_8_8_5 using _d_a_y_s = _d_u_r_a_t_i_o_n_<___G_L_I_B_C_X_X___C_H_R_O_N_O___I_N_T_6_4___T_,_ _r_a_t_i_o_<_8_6_4_0_0_>>; │ │ │ │ +886 │ │ │ │ +887 /// weeks │ │ │ │ +_8_8_8 using _w_e_e_k_s = _d_u_r_a_t_i_o_n_<___G_L_I_B_C_X_X___C_H_R_O_N_O___I_N_T_6_4___T_,_ _r_a_t_i_o_<_6_0_4_8_0_0_>>; │ │ │ │ +889 │ │ │ │ +890 /// years │ │ │ │ +_8_9_1 using _y_e_a_r_s = _d_u_r_a_t_i_o_n_<___G_L_I_B_C_X_X___C_H_R_O_N_O___I_N_T_6_4___T_,_ _r_a_t_i_o_<_3_1_5_5_6_9_5_2_>>; │ │ │ │ +892 │ │ │ │ +893 /// months │ │ │ │ +_8_9_4 using _m_o_n_t_h_s = _d_u_r_a_t_i_o_n_<___G_L_I_B_C_X_X___C_H_R_O_N_O___I_N_T_6_4___T_,_ _r_a_t_i_o_<_2_6_2_9_7_4_6_>>; │ │ │ │ +895#endif // C++20 │ │ │ │ +896 │ │ │ │ +897#undef _GLIBCXX_CHRONO_INT64_T │ │ │ │ +898 │ │ │ │ +899 template │ │ │ │ +_9_0_0 class _t_i_m_e___p_o_i_n_t │ │ │ │ +901 { │ │ │ │ +902 static_assert(_____i_s___d_u_r_a_t_i_o_n_<___D_u_r_>_:_:_v_a_l_u_e, │ │ │ │ +903 "duration must be a specialization of std::chrono::duration"); │ │ │ │ +904 │ │ │ │ +905 public: │ │ │ │ +906 typedef ___C_l_o_c_k _c_l_o_c_k; │ │ │ │ +907 typedef _Dur duration; │ │ │ │ +908 typedef typename duration::rep rep; │ │ │ │ +909 typedef typename duration::period period; │ │ │ │ +910 │ │ │ │ +911 constexpr _t_i_m_e___p_o_i_n_t() : __d(duration::zero()) │ │ │ │ +912 { } │ │ │ │ +913 │ │ │ │ +914 constexpr explicit _t_i_m_e___p_o_i_n_t(const duration& _____d_u_r) │ │ │ │ +915 : __d(_____d_u_r) │ │ │ │ +916 { } │ │ │ │ +917 │ │ │ │ +918 // conversions │ │ │ │ +919 template>> │ │ │ │ +921 constexpr _t_i_m_e___p_o_i_n_t(const _t_i_m_e___p_o_i_n_t_<_c_l_o_c_k_,_ ___D_u_r_2_>& __t) │ │ │ │ +922 : __d(__t.time_since_epoch()) │ │ │ │ +923 { } │ │ │ │ +924 │ │ │ │ +925 // observer │ │ │ │ +926 constexpr duration │ │ │ │ +927 time_since_epoch() const │ │ │ │ +928 { return __d; } │ │ │ │ +929 │ │ │ │ +930#if __cplusplus > 201703L │ │ │ │ +931 constexpr _t_i_m_e___p_o_i_n_t& │ │ │ │ +932 operator++() │ │ │ │ +933 { │ │ │ │ +934 ++__d; │ │ │ │ +935 return *this; │ │ │ │ +936 } │ │ │ │ +937 │ │ │ │ +938 constexpr _t_i_m_e___p_o_i_n_t │ │ │ │ +939 operator++(int) │ │ │ │ +940 { return _t_i_m_e___p_o_i_n_t{__d++}; } │ │ │ │ +941 │ │ │ │ +942 constexpr _t_i_m_e___p_o_i_n_t& │ │ │ │ +943 operator--() │ │ │ │ +944 { │ │ │ │ +945 --__d; │ │ │ │ +946 return *this; │ │ │ │ +947 } │ │ │ │ +948 │ │ │ │ +949 constexpr _t_i_m_e___p_o_i_n_t │ │ │ │ +950 operator--(int) │ │ │ │ +951 { return _t_i_m_e___p_o_i_n_t{__d--}; } │ │ │ │ +952#endif │ │ │ │ +953 │ │ │ │ +954 // arithmetic │ │ │ │ +955 ___G_L_I_B_C_X_X_1_7___C_O_N_S_T_E_X_P_R _t_i_m_e___p_o_i_n_t& │ │ │ │ +956 operator+=(const duration& _____d_u_r) │ │ │ │ +957 { │ │ │ │ +958 __d += _____d_u_r; │ │ │ │ +959 return *this; │ │ │ │ +960 } │ │ │ │ +961 │ │ │ │ +962 ___G_L_I_B_C_X_X_1_7___C_O_N_S_T_E_X_P_R _t_i_m_e___p_o_i_n_t& │ │ │ │ +963 operator-=(const duration& _____d_u_r) │ │ │ │ +964 { │ │ │ │ +965 __d -= _____d_u_r; │ │ │ │ +966 return *this; │ │ │ │ +967 } │ │ │ │ +968 │ │ │ │ +969 // special values │ │ │ │ +970 static constexpr _t_i_m_e___p_o_i_n_t │ │ │ │ +971 min() noexcept │ │ │ │ +972 { return _t_i_m_e___p_o_i_n_t(duration::min()); } │ │ │ │ +973 │ │ │ │ +974 static constexpr _t_i_m_e___p_o_i_n_t │ │ │ │ +975 max() noexcept │ │ │ │ +976 { return _t_i_m_e___p_o_i_n_t(duration::max()); } │ │ │ │ +977 │ │ │ │ +978 private: │ │ │ │ +979 duration __d; │ │ │ │ +980 }; │ │ │ │ +981 │ │ │ │ +982 /** Convert a `time_point` to use `duration` type `ToDur`. │ │ │ │ +983 * │ │ │ │ +984 * The result is the same time point as measured by the same clock, but │ │ │ │ +985 * using the specified `duration` to represent the time. │ │ │ │ +986 * If the time point cannot be represented accurately in the result type, │ │ │ │ +987 * returns the result of integer truncation (i.e., rounded towards zero). │ │ │ │ +988 * │ │ │ │ +989 * @tparam _ToDur The `duration` type to use for the result. │ │ │ │ +990 * @param __t A time point. │ │ │ │ +991 * @return The value of `__t` converted to use type `_ToDur`. │ │ │ │ +992 * @since C++11 │ │ │ │ +993 */ │ │ │ │ +994 template │ │ │ │ +995 _GLIBCXX_NODISCARD constexpr │ │ │ │ +996 _____e_n_a_b_l_e___i_f___t_<_____i_s___d_u_r_a_t_i_o_n_<___T_o_D_u_r_>_:_:_v_a_l_u_e, _t_i_m_e___p_o_i_n_t_<___C_l_o_c_k_,_ ___T_o_D_u_r_>> │ │ │ │ +_9_9_7 _t_i_m_e___p_o_i_n_t___c_a_s_t(const _t_i_m_e___p_o_i_n_t_<___C_l_o_c_k_,_ ___D_u_r_>& __t) │ │ │ │ +998 { │ │ │ │ +999 typedef _t_i_m_e___p_o_i_n_t_<___C_l_o_c_k_,_ ___T_o_D_u_r_> _____t_i_m_e___p_o_i_n_t; │ │ │ │ +1000 return _____t_i_m_e___p_o_i_n_t(_d_u_r_a_t_i_o_n___c_a_s_t_<___T_o_D_u_r_>(__t.time_since_epoch())); │ │ │ │ +1001 } │ │ │ │ +1002 │ │ │ │ +1003#if __cplusplus > 201402L │ │ │ │ +1004 /** Convert a `time_point` to type `ToDur` and round down. │ │ │ │ +1005 * │ │ │ │ +1006 * The result is the same time point as measured by the same clock, but │ │ │ │ +1007 * using the specified `duration` to represent the time. │ │ │ │ +1008 * If the time point cannot be represented exactly in the result type, │ │ │ │ +1009 * returns the closest value that is less than the argument. │ │ │ │ +1010 * │ │ │ │ +1011 * @tparam _ToDur The `duration` type to use for the result. │ │ │ │ +1012 * @param __t A time point. │ │ │ │ +1013 * @return The value of `__d` converted to type `_ToDur`. │ │ │ │ +1014 * @since C++17 │ │ │ │ +1015 */ │ │ │ │ +1016 template │ │ │ │ +1017 [[_n_o_d_i_s_c_a_r_d]] constexpr │ │ │ │ +1018 _e_n_a_b_l_e___i_f___t_<_____i_s___d_u_r_a_t_i_o_n_<___T_o_D_u_r_>_:_:_v_a_l_u_e, _t_i_m_e___p_o_i_n_t_<___C_l_o_c_k_,_ ___T_o_D_u_r_>> │ │ │ │ +_1_0_1_9 floor(const _t_i_m_e___p_o_i_n_t_<___C_l_o_c_k_,_ ___D_u_r_>& _____t_p) │ │ │ │ +1020 { │ │ │ │ +1021 return _t_i_m_e___p_o_i_n_t_<___C_l_o_c_k_,_ ___T_o_D_u_r_>{ │ │ │ │ +1022 chrono::floor<_ToDur>(_____t_p.time_since_epoch())}; │ │ │ │ +1023 } │ │ │ │ +1024 │ │ │ │ +1025 /** Convert a `time_point` to type `ToDur` and round up. │ │ │ │ +1026 * │ │ │ │ +1027 * The result is the same time point as measured by the same clock, but │ │ │ │ +1028 * using the specified `duration` to represent the time. │ │ │ │ +1029 * If the time point cannot be represented exactly in the result type, │ │ │ │ +1030 * returns the closest value that is greater than the argument. │ │ │ │ +1031 * │ │ │ │ +1032 * @tparam _ToDur The `duration` type to use for the result. │ │ │ │ +1033 * @param __t A time point. │ │ │ │ +1034 * @return The value of `__d` converted to type `_ToDur`. │ │ │ │ +1035 * @since C++17 │ │ │ │ +1036 */ │ │ │ │ +1037 template │ │ │ │ +1038 [[_n_o_d_i_s_c_a_r_d]] constexpr │ │ │ │ +1039 _e_n_a_b_l_e___i_f___t_<_____i_s___d_u_r_a_t_i_o_n_<___T_o_D_u_r_>_:_:_v_a_l_u_e, _t_i_m_e___p_o_i_n_t_<___C_l_o_c_k_,_ ___T_o_D_u_r_>> │ │ │ │ +_1_0_4_0 ceil(const _t_i_m_e___p_o_i_n_t_<___C_l_o_c_k_,_ ___D_u_r_>& _____t_p) │ │ │ │ +1041 { │ │ │ │ +1042 return _t_i_m_e___p_o_i_n_t_<___C_l_o_c_k_,_ ___T_o_D_u_r_>{ │ │ │ │ +1043 chrono::ceil<_ToDur>(_____t_p.time_since_epoch())}; │ │ │ │ +1044 } │ │ │ │ +1045 │ │ │ │ +1046 /** Convert a `time_point` to type `ToDur` and round to the closest value. │ │ │ │ +1047 * │ │ │ │ +1048 * The result is the same time point as measured by the same clock, but │ │ │ │ +1049 * using the specified `duration` to represent the time. │ │ │ │ +1050 * If the time point cannot be represented exactly in the result type, │ │ │ │ +1051 * returns the closest value, rounding ties to even. │ │ │ │ +1052 * │ │ │ │ +1053 * @tparam _ToDur The `duration` type to use for the result, │ │ │ │ +1054 * which must have a non-floating-point `rep` type. │ │ │ │ +1055 * @param __t A time point. │ │ │ │ +1056 * @return The value of `__d` converted to type `_ToDur`. │ │ │ │ +1057 * @since C++17 │ │ │ │ +1058 */ │ │ │ │ +1059 template │ │ │ │ +1060 [[_n_o_d_i_s_c_a_r_d]] constexpr │ │ │ │ +1061 _e_n_a_b_l_e___i_f___t< │ │ │ │ +1062 _____a_n_d___<_____i_s___d_u_r_a_t_i_o_n_<___T_o_D_u_r_>, │ │ │ │ +1063 _____n_o_t___<_t_r_e_a_t___a_s___f_l_o_a_t_i_n_g___p_o_i_n_t_<_t_y_p_e_n_a_m_e_ ___T_o_D_u_r_:_:_r_e_p_>>>::value, │ │ │ │ +1064 _t_i_m_e___p_o_i_n_t_<___C_l_o_c_k_,_ ___T_o_D_u_r_>> │ │ │ │ +_1_0_6_5 _r_o_u_n_d(const _t_i_m_e___p_o_i_n_t_<___C_l_o_c_k_,_ ___D_u_r_>& _____t_p) │ │ │ │ +1066 { │ │ │ │ +1067 return _t_i_m_e___p_o_i_n_t_<___C_l_o_c_k_,_ ___T_o_D_u_r_>{ │ │ │ │ +1068 chrono::round<_ToDur>(_____t_p.time_since_epoch())}; │ │ │ │ +1069 } │ │ │ │ +1070#endif // C++17 │ │ │ │ +1071 │ │ │ │ +1072 /// @{ │ │ │ │ +1073 /// @relates time_point │ │ │ │ +1074 │ │ │ │ +1075 /// Adjust a time point forwards by the given duration. │ │ │ │ +1076 template │ │ │ │ +1078 constexpr time_point<___C_l_o_c_k, │ │ │ │ +1079 typename _c_o_m_m_o_n___t_y_p_e_<___D_u_r_1_,_ _d_u_r_a_t_i_o_n_<___R_e_p_2_,_ ___P_e_r_i_o_d_2_>>::type> │ │ │ │ +_1_0_8_0 _o_p_e_r_a_t_o_r_+(const _t_i_m_e___p_o_i_n_t_<___C_l_o_c_k_,_ ___D_u_r_1_>& _____l_h_s, │ │ │ │ +1081 const _d_u_r_a_t_i_o_n_<___R_e_p_2_,_ ___P_e_r_i_o_d_2_>& _____r_h_s) │ │ │ │ +1082 { │ │ │ │ +1083 typedef _d_u_r_a_t_i_o_n_<___R_e_p_2_,_ ___P_e_r_i_o_d_2_> _____d_u_r_2; │ │ │ │ +1084 typedef typename _c_o_m_m_o_n___t_y_p_e_<___D_u_r_1_,_____d_u_r_2_>_:_:_t_y_p_e _____c_t; │ │ │ │ +1085 typedef _t_i_m_e___p_o_i_n_t_<___C_l_o_c_k_,_ _____c_t_> _____t_i_m_e___p_o_i_n_t; │ │ │ │ +1086 return _____t_i_m_e___p_o_i_n_t(_____l_h_s.time_since_epoch() + _____r_h_s); │ │ │ │ +1087 } │ │ │ │ +1088 │ │ │ │ +1089 /// Adjust a time point forwards by the given duration. │ │ │ │ +1090 template │ │ │ │ +1092 constexpr _t_i_m_e___p_o_i_n_t<___C_l_o_c_k, │ │ │ │ +1093 typename _c_o_m_m_o_n___t_y_p_e_<_d_u_r_a_t_i_o_n_<___R_e_p_1_,_ ___P_e_r_i_o_d_1_>, ___D_u_r_2>::type> │ │ │ │ +_1_0_9_4 _o_p_e_r_a_t_o_r_+(const _d_u_r_a_t_i_o_n_<___R_e_p_1_,_ ___P_e_r_i_o_d_1_>& _____l_h_s, │ │ │ │ +1095 const _t_i_m_e___p_o_i_n_t_<___C_l_o_c_k_,_ ___D_u_r_2_>& _____r_h_s) │ │ │ │ +1096 { │ │ │ │ +1097 typedef _d_u_r_a_t_i_o_n_<___R_e_p_1_,_ ___P_e_r_i_o_d_1_> _____d_u_r_1; │ │ │ │ +1098 typedef typename _c_o_m_m_o_n___t_y_p_e_<_____d_u_r_1_,___D_u_r_2_>_:_:_t_y_p_e _____c_t; │ │ │ │ +1099 typedef _t_i_m_e___p_o_i_n_t_<___C_l_o_c_k_,_ _____c_t_> _____t_i_m_e___p_o_i_n_t; │ │ │ │ +1100 return _____t_i_m_e___p_o_i_n_t(_____r_h_s.time_since_epoch() + _____l_h_s); │ │ │ │ +1101 } │ │ │ │ +1102 │ │ │ │ +1103 /// Adjust a time point backwards by the given duration. │ │ │ │ +1104 template │ │ │ │ +1106 constexpr time_point<___C_l_o_c_k, │ │ │ │ +1107 typename _c_o_m_m_o_n___t_y_p_e_<___D_u_r_1_,_ _d_u_r_a_t_i_o_n_<___R_e_p_2_,_ ___P_e_r_i_o_d_2_>>::type> │ │ │ │ +_1_1_0_8 _o_p_e_r_a_t_o_r_-(const _t_i_m_e___p_o_i_n_t_<___C_l_o_c_k_,_ ___D_u_r_1_>& _____l_h_s, │ │ │ │ +1109 const _d_u_r_a_t_i_o_n_<___R_e_p_2_,_ ___P_e_r_i_o_d_2_>& _____r_h_s) │ │ │ │ +1110 { │ │ │ │ +1111 typedef _d_u_r_a_t_i_o_n_<___R_e_p_2_,_ ___P_e_r_i_o_d_2_> _____d_u_r_2; │ │ │ │ +1112 typedef typename _c_o_m_m_o_n___t_y_p_e_<___D_u_r_1_,_____d_u_r_2_>_:_:_t_y_p_e _____c_t; │ │ │ │ +1113 typedef _t_i_m_e___p_o_i_n_t_<___C_l_o_c_k_,_ _____c_t_> _____t_i_m_e___p_o_i_n_t; │ │ │ │ +1114 return _____t_i_m_e___p_o_i_n_t(_____l_h_s.time_since_epoch() -_____r_h_s); │ │ │ │ +1115 } │ │ │ │ +1116 │ │ │ │ +1117 /// The difference between two time points (as a duration) │ │ │ │ +1118 template │ │ │ │ +1119 constexpr typename _c_o_m_m_o_n___t_y_p_e_<___D_u_r_1_,_ ___D_u_r_2_>_:_:_t_y_p_e │ │ │ │ +_1_1_2_0 _o_p_e_r_a_t_o_r_-(const _t_i_m_e___p_o_i_n_t_<___C_l_o_c_k_,_ ___D_u_r_1_>& _____l_h_s, │ │ │ │ +1121 const _t_i_m_e___p_o_i_n_t_<___C_l_o_c_k_,_ ___D_u_r_2_>& _____r_h_s) │ │ │ │ +1122 { return _____l_h_s.time_since_epoch() - _____r_h_s.time_since_epoch(); } │ │ │ │ +1123 /// @} │ │ │ │ +1124 │ │ │ │ +1125 /** @{ │ │ │ │ +1126 * Comparisons for time_point │ │ │ │ +1127 * @relates chrono::time_point │ │ │ │ +1128 */ │ │ │ │ +1129 │ │ │ │ +1130 template │ │ │ │ +1131 constexpr bool │ │ │ │ +1132 operator==(const _t_i_m_e___p_o_i_n_t_<___C_l_o_c_k_,_ ___D_u_r_1_>& _____l_h_s, │ │ │ │ +1133 const _t_i_m_e___p_o_i_n_t_<___C_l_o_c_k_,_ ___D_u_r_2_>& _____r_h_s) │ │ │ │ +1134 { return _____l_h_s.time_since_epoch() == _____r_h_s.time_since_epoch(); } │ │ │ │ +1135 │ │ │ │ +1136#if __cpp_lib_three_way_comparison │ │ │ │ +1137 template _Dur2> │ │ │ │ +1139 constexpr auto │ │ │ │ +1140 operator<=>(const time_point<_Clock, _Dur1>& __lhs, │ │ │ │ +1141 const time_point<_Clock, _Dur2>& __rhs) │ │ │ │ +1142 { return __lhs.time_since_epoch() <=> __rhs.time_since_epoch(); } │ │ │ │ +1143#else │ │ │ │ +1144 template │ │ │ │ +1145 constexpr bool │ │ │ │ +1146 _o_p_e_r_a_t_o_r_!_=(const time_point<_Clock, _Dur1>& __lhs, │ │ │ │ +1147 const time_point<_Clock, _Dur2>& __rhs) │ │ │ │ +1148 { return !(__lhs == __rhs); } │ │ │ │ +1149#endif │ │ │ │ +1150 │ │ │ │ +1151 template │ │ │ │ +1152 constexpr bool │ │ │ │ +1153 _o_p_e_r_a_t_o_r_<(const time_point<_Clock, _Dur1>& __lhs, │ │ │ │ +1154 const time_point<_Clock, _Dur2>& __rhs) │ │ │ │ +1155 { return __lhs.time_since_epoch() < __rhs.time_since_epoch(); } │ │ │ │ +1156 │ │ │ │ +1157 template │ │ │ │ +1158 constexpr bool │ │ │ │ +1159 _o_p_e_r_a_t_o_r_<_=(const time_point<_Clock, _Dur1>& __lhs, │ │ │ │ +1160 const time_point<_Clock, _Dur2>& __rhs) │ │ │ │ +1161 { return !(__rhs < __lhs); } │ │ │ │ +1162 │ │ │ │ +1163 template │ │ │ │ +1164 constexpr bool │ │ │ │ +1165 _o_p_e_r_a_t_o_r_>(const time_point<_Clock, _Dur1>& __lhs, │ │ │ │ +1166 const time_point<_Clock, _Dur2>& __rhs) │ │ │ │ +1167 { return __rhs < __lhs; } │ │ │ │ +1168 │ │ │ │ +1169 template │ │ │ │ +1170 constexpr bool │ │ │ │ +1171 _o_p_e_r_a_t_o_r_>_=(const time_point<_Clock, _Dur1>& __lhs, │ │ │ │ +1172 const time_point<_Clock, _Dur2>& __rhs) │ │ │ │ +1173 { return !(__lhs < __rhs); } │ │ │ │ +1174 │ │ │ │ +1175 /// @} │ │ │ │ +1176 /// @} group chrono │ │ │ │ +1177 │ │ │ │ +1178 // Clocks. │ │ │ │ +1179 │ │ │ │ +1180 // Why nanosecond resolution as the default? │ │ │ │ +1181 // Why have std::system_clock always count in the highest │ │ │ │ +1182 // resolution (ie nanoseconds), even if on some OSes the low 3 │ │ │ │ +1183 // or 9 decimal digits will be always zero? This allows later │ │ │ │ +1184 // implementations to change the system_clock::now() │ │ │ │ +1185 // implementation any time to provide better resolution without │ │ │ │ +1186 // changing function signature or units. │ │ │ │ +1187 │ │ │ │ +1188 // To support the (forward) evolution of the library's defined │ │ │ │ +1189 // clocks, wrap inside inline namespace so that the current │ │ │ │ +1190 // defintions of system_clock, steady_clock, and │ │ │ │ +1191 // high_resolution_clock types are uniquely mangled. This way, new │ │ │ │ +1192 // code can use the latests clocks, while the library can contain │ │ │ │ +1193 // compatibility definitions for previous versions. At some │ │ │ │ +1194 // point, when these clocks settle down, the inlined namespaces │ │ │ │ +1195 // can be removed. XXX GLIBCXX_ABI Deprecated │ │ │ │ +1196_GLIBCXX_BEGIN_INLINE_ABI_NAMESPACE(_V2) │ │ │ │ +1197 │ │ │ │ +1198 /** │ │ │ │ +1199 * @brief System clock. │ │ │ │ +1200 * │ │ │ │ +1201 * Time returned represents wall time from the system-wide clock. │ │ │ │ +1202 * @ingroup chrono │ │ │ │ +1203 */ │ │ │ │ +_1_2_0_4 _s_t_r_u_c_t _s_y_s_t_e_m___c_l_o_c_k │ │ │ │ +1205 { │ │ │ │ +1206 typedef _c_h_r_o_n_o_:_:_n_a_n_o_s_e_c_o_n_d_s _d_u_r_a_t_i_o_n; │ │ │ │ +1207 typedef duration::rep rep; │ │ │ │ +1208 typedef duration::period period; │ │ │ │ +1209 typedef _c_h_r_o_n_o_:_:_t_i_m_e___p_o_i_n_t_<_s_y_s_t_e_m___c_l_o_c_k_,_ _d_u_r_a_t_i_o_n_> _t_i_m_e___p_o_i_n_t; │ │ │ │ +1210 │ │ │ │ +1211 static_assert(system_clock::duration::min() │ │ │ │ +1212 < system_clock::duration::zero(), │ │ │ │ +1213 "a clock's minimum duration cannot be less than its epoch"); │ │ │ │ +1214 │ │ │ │ +1215 static constexpr bool is_steady = false; │ │ │ │ +1216 │ │ │ │ +1217 static _t_i_m_e___p_o_i_n_t │ │ │ │ +1218 now() noexcept; │ │ │ │ +1219 │ │ │ │ +1220 // Map to C API │ │ │ │ +1221 [[__gnu__::__always_inline__]] │ │ │ │ +1222 static _s_t_d_:_:_t_i_m_e___t │ │ │ │ +1223 to_time_t(const _t_i_m_e___p_o_i_n_t& __t) noexcept │ │ │ │ +1224 { │ │ │ │ +1225 return _s_t_d_:_:_t_i_m_e___t(_d_u_r_a_t_i_o_n___c_a_s_t_<_c_h_r_o_n_o_:_:_s_e_c_o_n_d_s_> │ │ │ │ +1226 (__t.time_since_epoch()).count()); │ │ │ │ +1227 } │ │ │ │ +1228 │ │ │ │ +1229 [[__gnu__::__always_inline__]] │ │ │ │ +1230 static _t_i_m_e___p_o_i_n_t │ │ │ │ +1231 from_time_t(_s_t_d_:_:_t_i_m_e___t __t) noexcept │ │ │ │ +1232 { │ │ │ │ +1233 typedef _c_h_r_o_n_o_:_:_t_i_m_e___p_o_i_n_t_<_s_y_s_t_e_m___c_l_o_c_k_,_ _s_e_c_o_n_d_s_> _____f_r_o_m; │ │ │ │ +1234 return _t_i_m_e___p_o_i_n_t___c_a_s_t_<_s_y_s_t_e_m___c_l_o_c_k_:_:_d_u_r_a_t_i_o_n_> │ │ │ │ +1235 (_____f_r_o_m(_c_h_r_o_n_o_:_:_s_e_c_o_n_d_s(__t))); │ │ │ │ +1236 } │ │ │ │ +1237 }; │ │ │ │ +1238 │ │ │ │ +1239 │ │ │ │ +1240 /** │ │ │ │ +1241 * @brief Monotonic clock │ │ │ │ +1242 * │ │ │ │ +1243 * Time returned has the property of only increasing at a uniform rate. │ │ │ │ +1244 * @ingroup chrono │ │ │ │ +1245 */ │ │ │ │ +_1_2_4_6 struct _s_t_e_a_d_y___c_l_o_c_k │ │ │ │ +1247 { │ │ │ │ +1248 typedef _c_h_r_o_n_o_:_:_n_a_n_o_s_e_c_o_n_d_s _d_u_r_a_t_i_o_n; │ │ │ │ +1249 typedef duration::rep rep; │ │ │ │ +1250 typedef duration::period period; │ │ │ │ +1251 typedef _c_h_r_o_n_o_:_:_t_i_m_e___p_o_i_n_t_<_s_t_e_a_d_y___c_l_o_c_k_,_ _d_u_r_a_t_i_o_n_> _t_i_m_e___p_o_i_n_t; │ │ │ │ +1252 │ │ │ │ +1253 static constexpr bool is_steady = true; │ │ │ │ +1254 │ │ │ │ +1255 static _t_i_m_e___p_o_i_n_t │ │ │ │ +1256 now() noexcept; │ │ │ │ +1257 }; │ │ │ │ +1258 │ │ │ │ +1259 │ │ │ │ +1260 /** │ │ │ │ +1261 * @brief Highest-resolution clock │ │ │ │ +1262 * │ │ │ │ +1263 * This is the clock "with the shortest tick period." Alias to │ │ │ │ +1264 * std::system_clock until higher-than-nanosecond definitions │ │ │ │ +1265 * become feasible. │ │ │ │ +1266 * @ingroup chrono │ │ │ │ +1267 */ │ │ │ │ +_1_2_6_8 using _h_i_g_h___r_e_s_o_l_u_t_i_o_n___c_l_o_c_k = _s_y_s_t_e_m___c_l_o_c_k; │ │ │ │ +1269 │ │ │ │ +1270_GLIBCXX_END_INLINE_ABI_NAMESPACE(___V_2) │ │ │ │ +1271 │ │ │ │ +1272#if __cplusplus >= 202002L │ │ │ │ +1273 /// @addtogroup chrono │ │ │ │ +1274 /// @{ │ │ │ │ +1275 template │ │ │ │ +1276 using _s_y_s___t_i_m_e = _t_i_m_e___p_o_i_n_t_<_s_y_s_t_e_m___c_l_o_c_k_,_ ___D_u_r_a_t_i_o_n_>; │ │ │ │ +1277 using _s_y_s___s_e_c_o_n_d_s = _s_y_s___t_i_m_e_<_s_e_c_o_n_d_s_>; │ │ │ │ +1278 using _s_y_s___d_a_y_s = _s_y_s___t_i_m_e_<_d_a_y_s_>; │ │ │ │ +1279 │ │ │ │ +1280 using file_clock = ::std::filesystem::__file_clock; │ │ │ │ +1281 │ │ │ │ +1282 template │ │ │ │ +1283 using _f_i_l_e___t_i_m_e = _t_i_m_e___p_o_i_n_t_<_f_i_l_e___c_l_o_c_k_,_ ___D_u_r_a_t_i_o_n_>; │ │ │ │ +1284 │ │ │ │ +1285 template<> struct is_clock<_s_y_s_t_e_m___c_l_o_c_k> : _t_r_u_e___t_y_p_e { }; │ │ │ │ +1286 template<> struct is_clock : _t_r_u_e___t_y_p_e { }; │ │ │ │ +1287 template<> struct is_clock : _t_r_u_e___t_y_p_e { }; │ │ │ │ +1288 │ │ │ │ +1289 template<> inline constexpr bool is_clock_v = true; │ │ │ │ +1290 template<> inline constexpr bool is_clock_v = true; │ │ │ │ +1291 template<> inline constexpr bool is_clock_v = true; │ │ │ │ +1292 /// @} │ │ │ │ +1293#endif // C++20 │ │ │ │ +1294 } // namespace chrono │ │ │ │ +1295 │ │ │ │ +1296#if __cplusplus >= 201402L │ │ │ │ +1297#define __cpp_lib_chrono_udls 201304L │ │ │ │ +1298 │ │ │ │ +1299 inline namespace literals │ │ │ │ +1300 { │ │ │ │ +1301 /** ISO C++ 2014 namespace for suffixes for duration literals. │ │ │ │ +1302 * │ │ │ │ +1303 * These suffixes can be used to create `chrono::duration` values with │ │ │ │ +1304 * tick periods of hours, minutes, seconds, milliseconds, microseconds │ │ │ │ +1305 * or nanoseconds. For example, `std::chrono::seconds(5)` can be written │ │ │ │ +1306 * as `5s` after making the suffix visible in the current scope. │ │ │ │ +1307 * The suffixes can be made visible by a using-directive or │ │ │ │ +1308 * using-declaration such as: │ │ │ │ +1309 * - `using namespace std::chrono_literals;` │ │ │ │ +1310 * - `using namespace std::literals;` │ │ │ │ +1311 * - `using namespace std::chrono;` │ │ │ │ +1312 * - `using namespace std;` │ │ │ │ +1313 * - `using std::chrono_literals::operator""s;` │ │ │ │ +1314 * │ │ │ │ +1315 * The result of these suffixes on an integer literal is one of the │ │ │ │ +1316 * standard typedefs such as `std::chrono::hours`. │ │ │ │ +1317 * The result on a floating-point literal is a duration type with the │ │ │ │ +1318 * specified tick period and an unspecified floating-point representation, │ │ │ │ +1319 * for example `1.5e2ms` might be equivalent to │ │ │ │ +1320 * `chrono::duration(1.5e2)`. │ │ │ │ +1321 * │ │ │ │ +1322 * @since C+14 │ │ │ │ +1323 * @ingroup chrono │ │ │ │ +1324 */ │ │ │ │ +1325 inline namespace chrono_literals │ │ │ │ +1326 { │ │ │ │ +1327 /// @addtogroup chrono │ │ │ │ +1328 /// @{ │ │ │ │ +1329 │ │ │ │ +1330#pragma GCC diagnostic push │ │ │ │ +1331#pragma GCC diagnostic ignored "-Wliteral-suffix" │ │ │ │ +1332 /// @cond undocumented │ │ │ │ +1333 template │ │ │ │ +1334 constexpr _Dur __check_overflow() │ │ │ │ +1335 { │ │ │ │ +1336 using _Val = __parse_int::_Parse_int<_Digits...>; │ │ │ │ +1337 constexpr typename _Dur::rep __repval = _Val::value; │ │ │ │ +1338 static_assert(__repval >= 0 && __repval == _Val::value, │ │ │ │ +1339 "literal value cannot be represented by duration type"); │ │ │ │ +1340 return _Dur(__repval); │ │ │ │ +1341 } │ │ │ │ +1342 /// @endcond │ │ │ │ +1343 │ │ │ │ +1344 /// Literal suffix for durations representing non-integer hours │ │ │ │ +1345 constexpr chrono::duration> │ │ │ │ +_1_3_4_6 operator""_h(long double _____h_o_u_r_s) │ │ │ │ +1347 { return _c_h_r_o_n_o_:_:_d_u_r_a_t_i_o_n_<_l_o_n_g_ _d_o_u_b_l_e_,_ _r_a_t_i_o_<_3_6_0_0_,_1_>>{_____h_o_u_r_s}; } │ │ │ │ +1348 │ │ │ │ +1349 /// Literal suffix for durations of type `std::chrono::hours` │ │ │ │ +1350 template │ │ │ │ +1351 constexpr _c_h_r_o_n_o_:_:_h_o_u_r_s │ │ │ │ +_1_3_5_2 operator""_h() │ │ │ │ +1353 { return _____c_h_e_c_k___o_v_e_r_f_l_o_w<_c_h_r_o_n_o_:_:_h_o_u_r_s, ___D_i_g_i_t_s...>(); } │ │ │ │ +1354 │ │ │ │ +1355 /// Literal suffix for durations representing non-integer minutes │ │ │ │ +1356 constexpr _c_h_r_o_n_o_:_:_d_u_r_a_t_i_o_n_<_l_o_n_g_ _d_o_u_b_l_e_,_ _r_a_t_i_o_<_6_0_,_1_>> │ │ │ │ +_1_3_5_7 operator""_m_i_n(long double _____m_i_n_s) │ │ │ │ +1358 { return _c_h_r_o_n_o_:_:_d_u_r_a_t_i_o_n_<_l_o_n_g_ _d_o_u_b_l_e_,_ _r_a_t_i_o_<_6_0_,_1_>>{_____m_i_n_s}; } │ │ │ │ +1359 │ │ │ │ +1360 /// Literal suffix for durations of type `std::chrono::minutes` │ │ │ │ +1361 template │ │ │ │ +1362 constexpr _c_h_r_o_n_o_:_:_m_i_n_u_t_e_s │ │ │ │ +_1_3_6_3 operator""_m_i_n() │ │ │ │ +1364 { return _____c_h_e_c_k___o_v_e_r_f_l_o_w<_c_h_r_o_n_o_:_:_m_i_n_u_t_e_s, ___D_i_g_i_t_s...>(); } │ │ │ │ +1365 │ │ │ │ +1366 /// Literal suffix for durations representing non-integer seconds │ │ │ │ +1367 constexpr _c_h_r_o_n_o_:_:_d_u_r_a_t_i_o_n_<_l_o_n_g_ _d_o_u_b_l_e_> │ │ │ │ +_1_3_6_8 operator""s(long double _____s_e_c_s) │ │ │ │ +1369 { return _c_h_r_o_n_o_:_:_d_u_r_a_t_i_o_n_<_l_o_n_g_ _d_o_u_b_l_e_>{_____s_e_c_s}; } │ │ │ │ +1370 │ │ │ │ +1371 /// Literal suffix for durations of type `std::chrono::seconds` │ │ │ │ +1372 template │ │ │ │ +1373 constexpr _c_h_r_o_n_o_:_:_s_e_c_o_n_d_s │ │ │ │ +_1_3_7_4 operator""s() │ │ │ │ +1375 { return _____c_h_e_c_k___o_v_e_r_f_l_o_w<_c_h_r_o_n_o_:_:_s_e_c_o_n_d_s, ___D_i_g_i_t_s...>(); } │ │ │ │ +1376 │ │ │ │ +1377 /// Literal suffix for durations representing non-integer milliseconds │ │ │ │ +1378 constexpr _c_h_r_o_n_o_:_:_d_u_r_a_t_i_o_n_<_l_o_n_g_ _d_o_u_b_l_e_,_ _m_i_l_l_i_> │ │ │ │ +_1_3_7_9 operator""_m_s(long double _____m_s_e_c_s) │ │ │ │ +1380 { return _c_h_r_o_n_o_:_:_d_u_r_a_t_i_o_n_<_l_o_n_g_ _d_o_u_b_l_e_,_ _m_i_l_l_i_>{_____m_s_e_c_s}; } │ │ │ │ +1381 │ │ │ │ +1382 /// Literal suffix for durations of type `std::chrono::milliseconds` │ │ │ │ +1383 template │ │ │ │ +1384 constexpr _c_h_r_o_n_o_:_:_m_i_l_l_i_s_e_c_o_n_d_s │ │ │ │ +_1_3_8_5 operator""_m_s() │ │ │ │ +1386 { return _____c_h_e_c_k___o_v_e_r_f_l_o_w<_c_h_r_o_n_o_:_:_m_i_l_l_i_s_e_c_o_n_d_s, ___D_i_g_i_t_s...>(); } │ │ │ │ +1387 │ │ │ │ +1388 /// Literal suffix for durations representing non-integer microseconds │ │ │ │ +1389 constexpr _c_h_r_o_n_o_:_:_d_u_r_a_t_i_o_n_<_l_o_n_g_ _d_o_u_b_l_e_,_ _m_i_c_r_o_> │ │ │ │ +_1_3_9_0 operator""_u_s(long double _____u_s_e_c_s) │ │ │ │ +1391 { return _c_h_r_o_n_o_:_:_d_u_r_a_t_i_o_n_<_l_o_n_g_ _d_o_u_b_l_e_,_ _m_i_c_r_o_>{_____u_s_e_c_s}; } │ │ │ │ +1392 │ │ │ │ +1393 /// Literal suffix for durations of type `std::chrono::microseconds` │ │ │ │ +1394 template │ │ │ │ +1395 constexpr _c_h_r_o_n_o_:_:_m_i_c_r_o_s_e_c_o_n_d_s │ │ │ │ +_1_3_9_6 operator""_u_s() │ │ │ │ +1397 { return _____c_h_e_c_k___o_v_e_r_f_l_o_w<_c_h_r_o_n_o_:_:_m_i_c_r_o_s_e_c_o_n_d_s, ___D_i_g_i_t_s...>(); } │ │ │ │ +1398 │ │ │ │ +1399 /// Literal suffix for durations representing non-integer nanoseconds │ │ │ │ +1400 constexpr _c_h_r_o_n_o_:_:_d_u_r_a_t_i_o_n_<_l_o_n_g_ _d_o_u_b_l_e_,_ _n_a_n_o_> │ │ │ │ +_1_4_0_1 operator""_n_s(long double _____n_s_e_c_s) │ │ │ │ +1402 { return _c_h_r_o_n_o_:_:_d_u_r_a_t_i_o_n_<_l_o_n_g_ _d_o_u_b_l_e_,_ _n_a_n_o_>{_____n_s_e_c_s}; } │ │ │ │ +1403 │ │ │ │ +1404 /// Literal suffix for durations of type `std::chrono::nanoseconds` │ │ │ │ +1405 template │ │ │ │ +1406 constexpr _c_h_r_o_n_o_:_:_n_a_n_o_s_e_c_o_n_d_s │ │ │ │ +_1_4_0_7 operator""_n_s() │ │ │ │ +1408 { return _____c_h_e_c_k___o_v_e_r_f_l_o_w<_c_h_r_o_n_o_:_:_n_a_n_o_s_e_c_o_n_d_s, ___D_i_g_i_t_s...>(); } │ │ │ │ +1409 │ │ │ │ +1410#pragma GCC diagnostic pop │ │ │ │ +1411 /// @} │ │ │ │ +1412 } // inline namespace chrono_literals │ │ │ │ +1413 } // inline namespace literals │ │ │ │ +1414 │ │ │ │ +1415 namespace chrono │ │ │ │ +1416 { │ │ │ │ +1417 using namespace literals::chrono_literals; │ │ │ │ +1418 } // namespace chrono │ │ │ │ +1419#endif // C++14 │ │ │ │ +1420 │ │ │ │ +1421#if __cplusplus >= 201703L │ │ │ │ +1422 namespace filesystem │ │ │ │ +1423 { │ │ │ │ +1424 struct __file_clock │ │ │ │ +1425 { │ │ │ │ +1426 using duration = _c_h_r_o_n_o_:_:_n_a_n_o_s_e_c_o_n_d_s; │ │ │ │ +1427 using rep = duration::rep; │ │ │ │ +1428 using period = duration::period; │ │ │ │ +1429 using time_point = chrono::time_point<__file_clock>; │ │ │ │ +1430 static constexpr bool is_steady = false; │ │ │ │ +1431 │ │ │ │ +1432 static time_point │ │ │ │ +1433 now() noexcept │ │ │ │ +1434 { return _S_from_sys(chrono::system_clock::now()); } │ │ │ │ +1435 │ │ │ │ +1436#if __cplusplus > 201703L │ │ │ │ +1437 template │ │ │ │ +1438 static │ │ │ │ +1439 chrono::file_time<_Dur> │ │ │ │ +1440 from_sys(const chrono::sys_time<_Dur>& __t) noexcept │ │ │ │ +1441 { return _S_from_sys(__t); } │ │ │ │ +1442 │ │ │ │ +1443 // For internal use only │ │ │ │ +1444 template │ │ │ │ +1445 static │ │ │ │ +1446 chrono::sys_time<_Dur> │ │ │ │ +1447 to_sys(const chrono::file_time<_Dur>& __t) noexcept │ │ │ │ +1448 { return _S_to_sys(__t); } │ │ │ │ +1449#endif // C++20 │ │ │ │ +1450 │ │ │ │ +1451 private: │ │ │ │ +1452 using __sys_clock = chrono::system_clock; │ │ │ │ +1453 │ │ │ │ +1454 // This clock's (unspecified) epoch is 2174-01-01 00:00:00 UTC. │ │ │ │ +1455 // A signed 64-bit duration with nanosecond resolution gives roughly │ │ │ │ +1456 // +/- 292 years, which covers the 1901-2446 date range for ext4. │ │ │ │ +1457 static constexpr _c_h_r_o_n_o_:_:_s_e_c_o_n_d_s _S_epoch_diff{6437664000}; │ │ │ │ +1458 │ │ │ │ +1459 protected: │ │ │ │ +1460 // For internal use only │ │ │ │ +1461 template │ │ │ │ +1462 static │ │ │ │ +1463 chrono::time_point<__file_clock, _Dur> │ │ │ │ +1464 _S_from_sys(const chrono::time_point<__sys_clock, _Dur>& __t) noexcept │ │ │ │ +1465 { │ │ │ │ +1466 using __file_time = chrono::time_point<__file_clock, _Dur>; │ │ │ │ +1467 return __file_time{__t.time_since_epoch()} - _S_epoch_diff; │ │ │ │ +1468 } │ │ │ │ +1469 │ │ │ │ +1470 // For internal use only │ │ │ │ +1471 template │ │ │ │ +1472 static │ │ │ │ +1473 chrono::time_point<__sys_clock, _Dur> │ │ │ │ +1474 _S_to_sys(const chrono::time_point<__file_clock, _Dur>& __t) noexcept │ │ │ │ +1475 { │ │ │ │ +1476 using __sys_time = chrono::time_point<__sys_clock, _Dur>; │ │ │ │ +1477 return __sys_time{__t.time_since_epoch()} + _S_epoch_diff; │ │ │ │ +1478 } │ │ │ │ +1479 }; │ │ │ │ +1480 } // namespace filesystem │ │ │ │ +1481#endif // C++17 │ │ │ │ +1482 │ │ │ │ +1483_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ +1484} // namespace std │ │ │ │ +1485 │ │ │ │ +1486#endif // C++11 │ │ │ │ +1487 │ │ │ │ +1488#endif //_GLIBCXX_CHRONO_H │ │ │ │ +_c_o_m_p_a_r_e │ │ │ │ +_c_o_n_c_e_p_t_s │ │ │ │ +_l_i_m_i_t_s │ │ │ │ +_t_y_p_e___t_r_a_i_t_s │ │ │ │ +_p_a_r_s_e___n_u_m_b_e_r_s_._h │ │ │ │ +_s_t_d_:_:_c_h_r_o_n_o_:_:_d_u_r_a_t_i_o_n_:_:_o_p_e_r_a_t_o_r_=_= │ │ │ │ +constexpr bool operator==(const duration< _Rep1, _Period1 > &__lhs, const │ │ │ │ +duration< _Rep2, _Period2 > &__rhs) │ │ │ │ +DDeeffiinniittiioonn _c_h_r_o_n_o_._h_:_7_8_8 │ │ │ │ +_s_t_d_:_:_c_h_r_o_n_o_:_:_s_e_c_o_n_d_s │ │ │ │ +duration< int64_t > seconds │ │ │ │ +seconds │ │ │ │ +DDeeffiinniittiioonn _c_h_r_o_n_o_._h_:_8_7_5 │ │ │ │ +_s_t_d_:_:_c_h_r_o_n_o_:_:_r_o_u_n_d │ │ │ │ +constexpr enable_if_t< __and_< __is_duration< _ToDur >, __not_< │ │ │ │ +treat_as_floating_point< typename _ToDur::rep > > >::value, _ToDur > round │ │ │ │ +(const duration< _Rep, _Period > &__d) │ │ │ │ +DDeeffiinniittiioonn _c_h_r_o_n_o_._h_:_4_0_9 │ │ │ │ +_s_t_d_:_:_c_h_r_o_n_o_:_:_o_p_e_r_a_t_o_r_<_= │ │ │ │ +constexpr bool operator<=(const duration< _Rep1, _Period1 > &__lhs, const │ │ │ │ +duration< _Rep2, _Period2 > &__rhs) │ │ │ │ +DDeeffiinniittiioonn _c_h_r_o_n_o_._h_:_8_3_3 │ │ │ │ +_s_t_d_:_:_c_h_r_o_n_o_:_:_h_o_u_r_s │ │ │ │ +duration< int64_t, ratio< 3600 > > hours │ │ │ │ +hours │ │ │ │ +DDeeffiinniittiioonn _c_h_r_o_n_o_._h_:_8_8_1 │ │ │ │ +_s_t_d_:_:_c_h_r_o_n_o_:_:_m_i_l_l_i_s_e_c_o_n_d_s │ │ │ │ +duration< int64_t, milli > milliseconds │ │ │ │ +milliseconds │ │ │ │ +DDeeffiinniittiioonn _c_h_r_o_n_o_._h_:_8_7_2 │ │ │ │ +_s_t_d_:_:_c_h_r_o_n_o_:_:_m_i_c_r_o_s_e_c_o_n_d_s │ │ │ │ +duration< int64_t, micro > microseconds │ │ │ │ +microseconds │ │ │ │ +DDeeffiinniittiioonn _c_h_r_o_n_o_._h_:_8_6_9 │ │ │ │ +_s_t_d_:_:_c_h_r_o_n_o_:_:_o_p_e_r_a_t_o_r_>_= │ │ │ │ +constexpr bool operator>=(const duration< _Rep1, _Period1 > &__lhs, const │ │ │ │ +duration< _Rep2, _Period2 > &__rhs) │ │ │ │ +DDeeffiinniittiioonn _c_h_r_o_n_o_._h_:_8_4_7 │ │ │ │ +_s_t_d_:_:_c_h_r_o_n_o_:_:_o_p_e_r_a_t_o_r_!_= │ │ │ │ +constexpr bool operator!=(const duration< _Rep1, _Period1 > &__lhs, const │ │ │ │ +duration< _Rep2, _Period2 > &__rhs) │ │ │ │ +DDeeffiinniittiioonn _c_h_r_o_n_o_._h_:_8_2_5 │ │ │ │ +_s_t_d_:_:_c_h_r_o_n_o_:_:_o_p_e_r_a_t_o_r_* │ │ │ │ +constexpr duration< __common_rep_t< _Rep2, _Rep1 >, _Period > operator*(const │ │ │ │ +_Rep1 &__s, const duration< _Rep2, _Period > &__d) │ │ │ │ +DDeeffiinniittiioonn _c_h_r_o_n_o_._h_:_7_2_8 │ │ │ │ +_s_t_d_:_:_c_h_r_o_n_o_:_:_n_a_n_o_s_e_c_o_n_d_s │ │ │ │ +duration< int64_t, nano > nanoseconds │ │ │ │ +nanoseconds │ │ │ │ +DDeeffiinniittiioonn _c_h_r_o_n_o_._h_:_8_6_6 │ │ │ │ +_s_t_d_:_:_c_h_r_o_n_o_:_:_o_p_e_r_a_t_o_r_% │ │ │ │ +constexpr duration< __common_rep_t< _Rep1, __disable_if_is_duration< _Rep2 > >, │ │ │ │ +_Period > operator%(const duration< _Rep1, _Period > &__d, const _Rep2 &__s) │ │ │ │ +DDeeffiinniittiioonn _c_h_r_o_n_o_._h_:_7_5_7 │ │ │ │ +_s_t_d_:_:_c_h_r_o_n_o_:_:_t_i_m_e___p_o_i_n_t_:_:_o_p_e_r_a_t_o_r_+ │ │ │ │ +constexpr time_point< _Clock, typename common_type< _Dur1, duration< _Rep2, │ │ │ │ +_Period2 > >::type > operator+(const time_point< _Clock, _Dur1 > &__lhs, const │ │ │ │ +duration< _Rep2, _Period2 > &__rhs) │ │ │ │ +DDeeffiinniittiioonn _c_h_r_o_n_o_._h_:_1_0_8_0 │ │ │ │ +_s_t_d_:_:_c_h_r_o_n_o_:_:_t_i_m_e___p_o_i_n_t___c_a_s_t │ │ │ │ +constexpr __enable_if_t< __is_duration< _ToDur >::value, time_point< _Clock, │ │ │ │ +_ToDur > > time_point_cast(const time_point< _Clock, _Dur > &__t) │ │ │ │ +DDeeffiinniittiioonn _c_h_r_o_n_o_._h_:_9_9_7 │ │ │ │ +_s_t_d_:_:_c_h_r_o_n_o_:_:_m_i_n_u_t_e_s │ │ │ │ +duration< int64_t, ratio< 60 > > minutes │ │ │ │ +minutes │ │ │ │ +DDeeffiinniittiioonn _c_h_r_o_n_o_._h_:_8_7_8 │ │ │ │ +_s_t_d_:_:_c_h_r_o_n_o_:_:_o_p_e_r_a_t_o_r_+ │ │ │ │ +constexpr time_point< _Clock, typename common_type< duration< _Rep1, _Period1 │ │ │ │ +>, _Dur2 >::type > operator+(const duration< _Rep1, _Period1 > &__lhs, const │ │ │ │ +time_point< _Clock, _Dur2 > &__rhs) │ │ │ │ +Adjust a time point forwards by the given duration. │ │ │ │ +DDeeffiinniittiioonn _c_h_r_o_n_o_._h_:_1_0_9_4 │ │ │ │ +_s_t_d_:_:_c_h_r_o_n_o_:_:_d_u_r_a_t_i_o_n_:_:_o_p_e_r_a_t_o_r_+ │ │ │ │ +constexpr common_type< duration< _Rep1, _Period1 >, duration< _Rep2, _Period2 > │ │ │ │ +>::type operator+(const duration< _Rep1, _Period1 > &__lhs, const duration< │ │ │ │ +_Rep2, _Period2 > &__rhs) │ │ │ │ +DDeeffiinniittiioonn _c_h_r_o_n_o_._h_:_6_7_4 │ │ │ │ +_s_t_d_:_:_c_h_r_o_n_o_:_:_o_p_e_r_a_t_o_r_< │ │ │ │ +constexpr bool operator<(const duration< _Rep1, _Period1 > &__lhs, const │ │ │ │ +duration< _Rep2, _Period2 > &__rhs) │ │ │ │ +DDeeffiinniittiioonn _c_h_r_o_n_o_._h_:_8_0_0 │ │ │ │ +_s_t_d_:_:_c_h_r_o_n_o_:_:_o_p_e_r_a_t_o_r_> │ │ │ │ +constexpr bool operator>(const duration< _Rep1, _Period1 > &__lhs, const │ │ │ │ +duration< _Rep2, _Period2 > &__rhs) │ │ │ │ +DDeeffiinniittiioonn _c_h_r_o_n_o_._h_:_8_4_0 │ │ │ │ +_s_t_d_:_:_c_h_r_o_n_o_:_:_o_p_e_r_a_t_o_r_- │ │ │ │ +constexpr common_type< duration< _Rep1, _Period1 >, duration< _Rep2, _Period2 > │ │ │ │ +>::type operator-(const duration< _Rep1, _Period1 > &__lhs, const duration< │ │ │ │ +_Rep2, _Period2 > &__rhs) │ │ │ │ +The difference between two durations. │ │ │ │ +DDeeffiinniittiioonn _c_h_r_o_n_o_._h_:_6_8_8 │ │ │ │ +_s_t_d_:_:_c_h_r_o_n_o_:_:_o_p_e_r_a_t_o_r_/ │ │ │ │ +constexpr duration< __common_rep_t< _Rep1, __disable_if_is_duration< _Rep2 > >, │ │ │ │ +_Period > operator/(const duration< _Rep1, _Period > &__d, const _Rep2 &__s) │ │ │ │ +DDeeffiinniittiioonn _c_h_r_o_n_o_._h_:_7_3_4 │ │ │ │ +_s_t_d_:_:_c_h_r_o_n_o_:_:_d_u_r_a_t_i_o_n_:_:_o_p_e_r_a_t_o_r_* │ │ │ │ +constexpr duration< __common_rep_t< _Rep1, _Rep2 >, _Period > operator*(const │ │ │ │ +duration< _Rep1, _Period > &__d, const _Rep2 &__s) │ │ │ │ +DDeeffiinniittiioonn _c_h_r_o_n_o_._h_:_7_1_9 │ │ │ │ +_s_t_d_:_:_c_h_r_o_n_o_:_:_c_e_i_l │ │ │ │ +constexpr __enable_if_is_duration< _ToDur > ceil(const duration< _Rep, _Period │ │ │ │ +> &__d) │ │ │ │ +DDeeffiinniittiioonn _c_h_r_o_n_o_._h_:_3_8_4 │ │ │ │ +_s_t_d_:_:_c_h_r_o_n_o_:_:_d_u_r_a_t_i_o_n___c_a_s_t │ │ │ │ +constexpr __enable_if_is_duration< _ToDur > duration_cast(const duration< _Rep, │ │ │ │ +_Period > &__d) │ │ │ │ +DDeeffiinniittiioonn _c_h_r_o_n_o_._h_:_2_6_2 │ │ │ │ +_s_t_d_:_:_a_b_s │ │ │ │ +_Tp abs(const complex< _Tp > &) │ │ │ │ +Return magnitude of z. │ │ │ │ +DDeeffiinniittiioonn _c_o_m_p_l_e_x_:_6_3_0 │ │ │ │ +_s_t_d_:_:_v_o_i_d___t │ │ │ │ +void void_t │ │ │ │ +A metafunction that always yields void, used for detecting valid types. │ │ │ │ +DDeeffiinniittiioonn _t_y_p_e___t_r_a_i_t_s_:_2_6_3_0 │ │ │ │ _s_t_d_:_:_t_r_u_e___t_y_p_e │ │ │ │ integral_constant< bool, true > true_type │ │ │ │ The type used as a compile-time boolean with true value. │ │ │ │ DDeeffiinniittiioonn _t_y_p_e___t_r_a_i_t_s_:_8_2 │ │ │ │ _s_t_d_:_:_f_a_l_s_e___t_y_p_e │ │ │ │ integral_constant< bool, false > false_type │ │ │ │ The type used as a compile-time boolean with false value. │ │ │ │ DDeeffiinniittiioonn _t_y_p_e___t_r_a_i_t_s_:_8_5 │ │ │ │ -_s_t_d_:_:_____a_d_d_r_e_s_s_o_f │ │ │ │ -constexpr _Tp * __addressof(_Tp &__r) noexcept │ │ │ │ -Same as C++11 std::addressof. │ │ │ │ -DDeeffiinniittiioonn _m_o_v_e_._h_:_4_9 │ │ │ │ -_s_t_d_:_:_c_u_r_r_e_n_t___e_x_c_e_p_t_i_o_n │ │ │ │ -exception_ptr current_exception() noexcept │ │ │ │ -_s_t_d_:_:_r_e_t_h_r_o_w___e_x_c_e_p_t_i_o_n │ │ │ │ -void rethrow_exception(exception_ptr) │ │ │ │ -Throw the object pointed to by the exception_ptr. │ │ │ │ -_s_t_d_:_:_t_e_r_m_i_n_a_t_e │ │ │ │ -void terminate() noexcept │ │ │ │ -_s_t_d_:_:_r_e_t_h_r_o_w___i_f___n_e_s_t_e_d │ │ │ │ -void rethrow_if_nested(const _Ex &__ex) │ │ │ │ -If __ex is derived from nested_exception, __ex.rethrow_nested(). │ │ │ │ -DDeeffiinniittiioonn _n_e_s_t_e_d___e_x_c_e_p_t_i_o_n_._h_:_1_5_9 │ │ │ │ -_s_t_d_:_:_t_h_r_o_w___w_i_t_h___n_e_s_t_e_d │ │ │ │ -void throw_with_nested(_Tp &&__t) │ │ │ │ -If __t is derived from nested_exception, throws __t. Else, throws an │ │ │ │ -implementation-defined object de... │ │ │ │ -DDeeffiinniittiioonn _n_e_s_t_e_d___e_x_c_e_p_t_i_o_n_._h_:_1_1_8 │ │ │ │ +_s_t_d_:_:_e_n_a_b_l_e___i_f___t │ │ │ │ +typename enable_if< _Cond, _Tp >::type enable_if_t │ │ │ │ +Alias template for enable_if. │ │ │ │ +DDeeffiinniittiioonn _t_y_p_e___t_r_a_i_t_s_:_2_6_0_8 │ │ │ │ +_s_t_d_:_:_m_i_n │ │ │ │ +constexpr const _Tp & min(const _Tp &, const _Tp &) │ │ │ │ +This does what you think it does. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___a_l_g_o_b_a_s_e_._h_:_2_3_0 │ │ │ │ _s_t_d │ │ │ │ ISO C++ entities toplevel namespace is std. │ │ │ │ -_s_t_d_:_:_____e_x_c_e_p_t_i_o_n___p_t_r_:_:_e_x_c_e_p_t_i_o_n___p_t_r │ │ │ │ -An opaque pointer to an arbitrary exception. │ │ │ │ -DDeeffiinniittiioonn _e_x_c_e_p_t_i_o_n___p_t_r_._h_:_9_1 │ │ │ │ -_s_t_d_:_:_n_e_s_t_e_d___e_x_c_e_p_t_i_o_n │ │ │ │ -Exception class with exception_ptr data member. │ │ │ │ -DDeeffiinniittiioonn _n_e_s_t_e_d___e_x_c_e_p_t_i_o_n_._h_:_5_3 │ │ │ │ +_s_t_d_:_:_n_u_m_e_r_i_c___l_i_m_i_t_s │ │ │ │ +Properties of fundamental types. │ │ │ │ +DDeeffiinniittiioonn _l_i_m_i_t_s_:_3_1_3 │ │ │ │ +_s_t_d_:_:_n_u_m_e_r_i_c___l_i_m_i_t_s_:_:_m_a_x │ │ │ │ +static constexpr _Tp max() noexcept │ │ │ │ +DDeeffiinniittiioonn _l_i_m_i_t_s_:_3_2_1 │ │ │ │ +_s_t_d_:_:_n_u_m_e_r_i_c___l_i_m_i_t_s_:_:_l_o_w_e_s_t │ │ │ │ +static constexpr _Tp lowest() noexcept │ │ │ │ +DDeeffiinniittiioonn _l_i_m_i_t_s_:_3_2_7 │ │ │ │ +_s_t_d_:_:_r_a_t_i_o │ │ │ │ +Provides compile-time rational arithmetic. │ │ │ │ +DDeeffiinniittiioonn _r_a_t_i_o_:_2_6_7 │ │ │ │ +_s_t_d_:_:_i_n_t_e_g_r_a_l___c_o_n_s_t_a_n_t │ │ │ │ +integral_constant │ │ │ │ +DDeeffiinniittiioonn _t_y_p_e___t_r_a_i_t_s_:_6_3 │ │ │ │ +_s_t_d_:_:_i_s___f_l_o_a_t_i_n_g___p_o_i_n_t │ │ │ │ +is_floating_point │ │ │ │ +DDeeffiinniittiioonn _t_y_p_e___t_r_a_i_t_s_:_4_4_5 │ │ │ │ +_s_t_d_:_:_c_o_m_m_o_n___t_y_p_e │ │ │ │ +common_type │ │ │ │ +DDeeffiinniittiioonn _t_y_p_e___t_r_a_i_t_s_:_2_2_5_9 │ │ │ │ +_s_t_d_:_:_c_h_r_o_n_o_:_:_d_u_r_a_t_i_o_n │ │ │ │ +chrono::duration represents a distance between two points in time │ │ │ │ +DDeeffiinniittiioonn _c_h_r_o_n_o_._h_:_4_8_8 │ │ │ │ +_s_t_d_:_:_c_h_r_o_n_o_:_:_t_i_m_e___p_o_i_n_t │ │ │ │ +chrono::time_point represents a point in time as measured by a clock │ │ │ │ +DDeeffiinniittiioonn _c_h_r_o_n_o_._h_:_9_0_1 │ │ │ │ +_s_t_d_:_:_c_h_r_o_n_o_:_:_t_r_e_a_t___a_s___f_l_o_a_t_i_n_g___p_o_i_n_t │ │ │ │ +DDeeffiinniittiioonn _c_h_r_o_n_o_._h_:_2_8_7 │ │ │ │ +_s_t_d_:_:_c_h_r_o_n_o_:_:_d_u_r_a_t_i_o_n___v_a_l_u_e_s │ │ │ │ +duration_values │ │ │ │ +DDeeffiinniittiioonn _c_h_r_o_n_o_._h_:_4_7_2 │ │ │ │ +_s_t_d_:_:_c_h_r_o_n_o_:_:_s_y_s_t_e_m___c_l_o_c_k │ │ │ │ +System clock. │ │ │ │ +DDeeffiinniittiioonn _c_h_r_o_n_o_._h_:_1_2_0_5 │ │ │ │ +_s_t_d_:_:_c_h_r_o_n_o_:_:_s_t_e_a_d_y___c_l_o_c_k │ │ │ │ +Monotonic clock. │ │ │ │ +DDeeffiinniittiioonn _c_h_r_o_n_o_._h_:_1_2_4_7 │ │ │ │ _s_t_d_:_:_a_u_t_o___p_t_r___r_e_f │ │ │ │ DDeeffiinniittiioonn _a_u_t_o___p_t_r_._h_:_4_9 │ │ │ │ +_c_t_i_m_e │ │ │ │ +_r_a_t_i_o │ │ │ │ * _b_i_t_s │ │ │ │ - * _n_e_s_t_e_d___e_x_c_e_p_t_i_o_n_._h │ │ │ │ + * _c_h_r_o_n_o_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-12-base/libstdc++/user/a00329.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: hash_bytes.h File Reference │ │ │ +libstdc++: valarray_before.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -46,44 +46,36 @@ │ │ │ /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */ │ │ │ $(document).ready(function(){initNavTree('a00329.html',''); initResizable(); }); │ │ │ /* @license-end */ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -Namespaces | │ │ │ -Functions
│ │ │ -
hash_bytes.h File Reference
│ │ │ +Namespaces
│ │ │ +
valarray_before.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

│ │ │ Namespaces

namespace  std
 
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │

│ │ │ -Functions

│ │ │ -size_t std::_Fnv_hash_bytes (const void *__ptr, size_t __len, size_t __seed)
 
│ │ │ -size_t std::_Hash_bytes (const void *__ptr, size_t __len, size_t __seed)
 
namespace  std::__detail
 
│ │ │

Detailed Description

│ │ │ -

This is an internal header file, included by other library headers. Do not attempt to use it directly. Instead, include <functional>.

│ │ │ +

This is an internal header file, included by other library headers. Do not attempt to use it directly. Instead, include <valarray>.

│ │ │ │ │ │ -

Definition in file hash_bytes.h.

│ │ │ +

Definition in file valarray_before.h.

│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,19 +1,16 @@ │ │ │ │ libstdc++ │ │ │ │ -_N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -hash_bytes.h File Reference │ │ │ │ +_N_a_m_e_s_p_a_c_e_s │ │ │ │ +valarray_before.h File Reference │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _s_t_d │ │ │ │   │ │ │ │ -FFuunnccttiioonnss │ │ │ │ -size_t  ssttdd::::__FFnnvv__hhaasshh__bbyytteess (const _v_o_i_d *_____p_t_r, size_t _____l_e_n, size_t _____s_e_e_d) │ │ │ │ -  │ │ │ │ -size_t  ssttdd::::__HHaasshh__bbyytteess (const _v_o_i_d *_____p_t_r, size_t _____l_e_n, size_t _____s_e_e_d) │ │ │ │ +namespace   _s_t_d_:_:_____d_e_t_a_i_l │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ This is an internal header file, included by other library headers. Do not │ │ │ │ -attempt to use it directly. Instead, include . │ │ │ │ -Definition in file _h_a_s_h___b_y_t_e_s_._h. │ │ │ │ +attempt to use it directly. Instead, include . │ │ │ │ +Definition in file _v_a_l_a_r_r_a_y___b_e_f_o_r_e_._h. │ │ │ │ * _b_i_t_s │ │ │ │ - * _h_a_s_h___b_y_t_e_s_._h │ │ │ │ + * _v_a_l_a_r_r_a_y___b_e_f_o_r_e_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-12-base/libstdc++/user/a00329_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: hash_bytes.h Source File │ │ │ +libstdc++: valarray_before.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -45,20 +45,20 @@ │ │ │ │ │ │
│ │ │
│ │ │ -
hash_bytes.h
│ │ │ +
valarray_before.h
│ │ │
│ │ │
│ │ │ -Go to the documentation of this file.
1// Declarations for hash functions. -*- C++ -*-
│ │ │ +Go to the documentation of this file.
1// The template and inlines for the -*- C++ -*- internal _Meta class.
│ │ │
2
│ │ │ -
3// Copyright (C) 2010-2022 Free Software Foundation, Inc.
│ │ │ +
3// Copyright (C) 1997-2022 Free Software Foundation, Inc.
│ │ │
4//
│ │ │
5// This file is part of the GNU ISO C++ Library. This library is free
│ │ │
6// software; you can redistribute it and/or modify it under the
│ │ │
7// terms of the GNU General Public License as published by the
│ │ │
8// Free Software Foundation; either version 3, or (at your option)
│ │ │
9// any later version.
│ │ │
10
│ │ │ @@ -72,55 +72,766 @@ │ │ │
18// 3.1, as published by the Free Software Foundation.
│ │ │
19
│ │ │
20// You should have received a copy of the GNU General Public License and
│ │ │
21// a copy of the GCC Runtime Library Exception along with this program;
│ │ │
22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
│ │ │
23// <http://www.gnu.org/licenses/>.
│ │ │
24
│ │ │ -
25/** @file bits/hash_bytes.h
│ │ │ +
25/** @file bits/valarray_before.h
│ │ │
26 * This is an internal header file, included by other library headers.
│ │ │ -
27 * Do not attempt to use it directly. @headername{functional}
│ │ │ +
27 * Do not attempt to use it directly. @headername{valarray}
│ │ │
28 */
│ │ │
29
│ │ │ -
30#ifndef _HASH_BYTES_H
│ │ │ -
31#define _HASH_BYTES_H 1
│ │ │ -
32
│ │ │ -
33#pragma GCC system_header
│ │ │ +
30// Written by Gabriel Dos Reis <Gabriel.Dos-Reis@cmla.ens-cachan.fr>
│ │ │ +
31
│ │ │ +
32#ifndef _VALARRAY_BEFORE_H
│ │ │ +
33#define _VALARRAY_BEFORE_H 1
│ │ │
34
│ │ │ -
35#include <bits/c++config.h>
│ │ │ +
35#pragma GCC system_header
│ │ │
36
│ │ │ -
37namespace std
│ │ │ -
38{
│ │ │ -
39_GLIBCXX_BEGIN_NAMESPACE_VERSION
│ │ │ -
40
│ │ │ -
41 // Hash function implementation for the nontrivial specialization.
│ │ │ -
42 // All of them are based on a primitive that hashes a pointer to a
│ │ │ -
43 // byte array. The actual hash algorithm is not guaranteed to stay
│ │ │ -
44 // the same from release to release -- it may be updated or tuned to
│ │ │ -
45 // improve hash quality or speed.
│ │ │ -
46 size_t
│ │ │ -
47 _Hash_bytes(const void* __ptr, size_t __len, size_t __seed);
│ │ │ -
48
│ │ │ -
49 // A similar hash primitive, using the FNV hash algorithm. This
│ │ │ -
50 // algorithm is guaranteed to stay the same from release to release.
│ │ │ -
51 // (although it might not produce the same values on different
│ │ │ -
52 // machines.)
│ │ │ -
53 size_t
│ │ │ -
54 _Fnv_hash_bytes(const void* __ptr, size_t __len, size_t __seed);
│ │ │ -
55
│ │ │ -
56_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ -
57} // namespace
│ │ │ -
58
│ │ │ -
59#endif
│ │ │ - │ │ │ +
37#include <bits/slice_array.h>
│ │ │ +
38
│ │ │ +
39namespace std _GLIBCXX_VISIBILITY(default)
│ │ │ +
40{
│ │ │ +
41_GLIBCXX_BEGIN_NAMESPACE_VERSION
│ │ │ +
42
│ │ │ +
43 //
│ │ │ +
44 // Implementing a loosened valarray return value is tricky.
│ │ │ +
45 // First we need to meet 26.3.1/3: we should not add more than
│ │ │ +
46 // two levels of template nesting. Therefore we resort to template
│ │ │ +
47 // template to "flatten" loosened return value types.
│ │ │ +
48 // At some point we use partial specialization to remove one level
│ │ │ +
49 // template nesting due to _Expr<>
│ │ │ +
50 //
│ │ │ +
51
│ │ │ +
52 // This class is NOT defined. It doesn't need to.
│ │ │ +
53 template<typename _Tp1, typename _Tp2> class _Constant;
│ │ │ +
54
│ │ │ +
55 // Implementations of unary functions applied to valarray<>s.
│ │ │ +
56 // I use hard-coded object functions here instead of a generic
│ │ │ +
57 // approach like pointers to function:
│ │ │ +
58 // 1) correctness: some functions take references, others values.
│ │ │ +
59 // we can't deduce the correct type afterwards.
│ │ │ +
60 // 2) efficiency -- object functions can be easily inlined
│ │ │ +
61 // 3) be Koenig-lookup-friendly
│ │ │ +
62
│ │ │ +
63 struct _Abs
│ │ │ +
64 {
│ │ │ +
65 template<typename _Tp>
│ │ │ +
66 _Tp operator()(const _Tp& __t) const
│ │ │ +
67 { return abs(__t); }
│ │ │ +
68 };
│ │ │ +
69
│ │ │ +
70 struct _Cos
│ │ │ +
71 {
│ │ │ +
72 template<typename _Tp>
│ │ │ +
73 _Tp operator()(const _Tp& __t) const
│ │ │ +
74 { return cos(__t); }
│ │ │ +
75 };
│ │ │ +
76
│ │ │ +
77 struct _Acos
│ │ │ +
78 {
│ │ │ +
79 template<typename _Tp>
│ │ │ +
80 _Tp operator()(const _Tp& __t) const
│ │ │ +
81 { return acos(__t); }
│ │ │ +
82 };
│ │ │ +
83
│ │ │ +
84 struct _Cosh
│ │ │ +
85 {
│ │ │ +
86 template<typename _Tp>
│ │ │ +
87 _Tp operator()(const _Tp& __t) const
│ │ │ +
88 { return cosh(__t); }
│ │ │ +
89 };
│ │ │ +
90
│ │ │ +
91 struct _Sin
│ │ │ +
92 {
│ │ │ +
93 template<typename _Tp>
│ │ │ +
94 _Tp operator()(const _Tp& __t) const
│ │ │ +
95 { return sin(__t); }
│ │ │ +
96 };
│ │ │ +
97
│ │ │ +
98 struct _Asin
│ │ │ +
99 {
│ │ │ +
100 template<typename _Tp>
│ │ │ +
101 _Tp operator()(const _Tp& __t) const
│ │ │ +
102 { return asin(__t); }
│ │ │ +
103 };
│ │ │ +
104
│ │ │ +
105 struct _Sinh
│ │ │ +
106 {
│ │ │ +
107 template<typename _Tp>
│ │ │ +
108 _Tp operator()(const _Tp& __t) const
│ │ │ +
109 { return sinh(__t); }
│ │ │ +
110 };
│ │ │ +
111
│ │ │ +
112 struct _Tan
│ │ │ +
113 {
│ │ │ +
114 template<typename _Tp>
│ │ │ +
115 _Tp operator()(const _Tp& __t) const
│ │ │ +
116 { return tan(__t); }
│ │ │ +
117 };
│ │ │ +
118
│ │ │ +
119 struct _Atan
│ │ │ +
120 {
│ │ │ +
121 template<typename _Tp>
│ │ │ +
122 _Tp operator()(const _Tp& __t) const
│ │ │ +
123 { return atan(__t); }
│ │ │ +
124 };
│ │ │ +
125
│ │ │ +
126 struct _Tanh
│ │ │ +
127 {
│ │ │ +
128 template<typename _Tp>
│ │ │ +
129 _Tp operator()(const _Tp& __t) const
│ │ │ +
130 { return tanh(__t); }
│ │ │ +
131 };
│ │ │ +
132
│ │ │ +
133 struct _Exp
│ │ │ +
134 {
│ │ │ +
135 template<typename _Tp>
│ │ │ +
136 _Tp operator()(const _Tp& __t) const
│ │ │ +
137 { return exp(__t); }
│ │ │ +
138 };
│ │ │ +
139
│ │ │ +
140 struct _Log
│ │ │ +
141 {
│ │ │ +
142 template<typename _Tp>
│ │ │ +
143 _Tp operator()(const _Tp& __t) const
│ │ │ +
144 { return log(__t); }
│ │ │ +
145 };
│ │ │ +
146
│ │ │ +
147 struct _Log10
│ │ │ +
148 {
│ │ │ +
149 template<typename _Tp>
│ │ │ +
150 _Tp operator()(const _Tp& __t) const
│ │ │ +
151 { return log10(__t); }
│ │ │ +
152 };
│ │ │ +
153
│ │ │ +
154 struct _Sqrt
│ │ │ +
155 {
│ │ │ +
156 template<typename _Tp>
│ │ │ +
157 _Tp operator()(const _Tp& __t) const
│ │ │ +
158 { return sqrt(__t); }
│ │ │ +
159 };
│ │ │ +
160
│ │ │ +
161 // In the past, we used to tailor operator applications semantics
│ │ │ +
162 // to the specialization of standard function objects (i.e. plus<>, etc.)
│ │ │ +
163 // That is incorrect. Therefore we provide our own surrogates.
│ │ │ +
164
│ │ │ +
165 struct __unary_plus
│ │ │ +
166 {
│ │ │ +
167 template<typename _Tp>
│ │ │ +
168 _Tp operator()(const _Tp& __t) const
│ │ │ +
169 { return +__t; }
│ │ │ +
170 };
│ │ │ +
171
│ │ │ +
172 struct __negate
│ │ │ +
173 {
│ │ │ +
174 template<typename _Tp>
│ │ │ +
175 _Tp operator()(const _Tp& __t) const
│ │ │ +
176 { return -__t; }
│ │ │ +
177 };
│ │ │ +
178
│ │ │ +
179 struct __bitwise_not
│ │ │ +
180 {
│ │ │ +
181 template<typename _Tp>
│ │ │ +
182 _Tp operator()(const _Tp& __t) const
│ │ │ +
183 { return ~__t; }
│ │ │ +
184 };
│ │ │ +
185
│ │ │ +
186 struct __plus
│ │ │ +
187 {
│ │ │ +
188 template<typename _Tp>
│ │ │ +
189 _Tp operator()(const _Tp& __x, const _Tp& __y) const
│ │ │ +
190 { return __x + __y; }
│ │ │ +
191 };
│ │ │ +
192
│ │ │ +
193 struct __minus
│ │ │ +
194 {
│ │ │ +
195 template<typename _Tp>
│ │ │ +
196 _Tp operator()(const _Tp& __x, const _Tp& __y) const
│ │ │ +
197 { return __x - __y; }
│ │ │ +
198 };
│ │ │ +
199
│ │ │ +
200 struct __multiplies
│ │ │ +
201 {
│ │ │ +
202 template<typename _Tp>
│ │ │ +
203 _Tp operator()(const _Tp& __x, const _Tp& __y) const
│ │ │ +
204 { return __x * __y; }
│ │ │ +
205 };
│ │ │ +
206
│ │ │ +
207 struct __divides
│ │ │ +
208 {
│ │ │ +
209 template<typename _Tp>
│ │ │ +
210 _Tp operator()(const _Tp& __x, const _Tp& __y) const
│ │ │ +
211 { return __x / __y; }
│ │ │ +
212 };
│ │ │ +
213
│ │ │ +
214 struct __modulus
│ │ │ +
215 {
│ │ │ +
216 template<typename _Tp>
│ │ │ +
217 _Tp operator()(const _Tp& __x, const _Tp& __y) const
│ │ │ +
218 { return __x % __y; }
│ │ │ +
219 };
│ │ │ +
220
│ │ │ +
221 struct __bitwise_xor
│ │ │ +
222 {
│ │ │ +
223 template<typename _Tp>
│ │ │ +
224 _Tp operator()(const _Tp& __x, const _Tp& __y) const
│ │ │ +
225 { return __x ^ __y; }
│ │ │ +
226 };
│ │ │ +
227
│ │ │ +
228 struct __bitwise_and
│ │ │ +
229 {
│ │ │ +
230 template<typename _Tp>
│ │ │ +
231 _Tp operator()(const _Tp& __x, const _Tp& __y) const
│ │ │ +
232 { return __x & __y; }
│ │ │ +
233 };
│ │ │ +
234
│ │ │ +
235 struct __bitwise_or
│ │ │ +
236 {
│ │ │ +
237 template<typename _Tp>
│ │ │ +
238 _Tp operator()(const _Tp& __x, const _Tp& __y) const
│ │ │ +
239 { return __x | __y; }
│ │ │ +
240 };
│ │ │ +
241
│ │ │ +
242 struct __shift_left
│ │ │ +
243 {
│ │ │ +
244 template<typename _Tp>
│ │ │ +
245 _Tp operator()(const _Tp& __x, const _Tp& __y) const
│ │ │ +
246 { return __x << __y; }
│ │ │ +
247 };
│ │ │ +
248
│ │ │ +
249 struct __shift_right
│ │ │ +
250 {
│ │ │ +
251 template<typename _Tp>
│ │ │ +
252 _Tp operator()(const _Tp& __x, const _Tp& __y) const
│ │ │ +
253 { return __x >> __y; }
│ │ │ +
254 };
│ │ │ +
255
│ │ │ +
256 struct __logical_and
│ │ │ +
257 {
│ │ │ +
258 template<typename _Tp>
│ │ │ +
259 bool operator()(const _Tp& __x, const _Tp& __y) const
│ │ │ +
260 { return __x && __y; }
│ │ │ +
261 };
│ │ │ +
262
│ │ │ +
263 struct __logical_or
│ │ │ +
264 {
│ │ │ +
265 template<typename _Tp>
│ │ │ +
266 bool operator()(const _Tp& __x, const _Tp& __y) const
│ │ │ +
267 { return __x || __y; }
│ │ │ +
268 };
│ │ │ +
269
│ │ │ +
270 struct __logical_not
│ │ │ +
271 {
│ │ │ +
272 template<typename _Tp>
│ │ │ +
273 bool operator()(const _Tp& __x) const
│ │ │ +
274 { return !__x; }
│ │ │ +
275 };
│ │ │ +
276
│ │ │ +
277 struct __equal_to
│ │ │ +
278 {
│ │ │ +
279 template<typename _Tp>
│ │ │ +
280 bool operator()(const _Tp& __x, const _Tp& __y) const
│ │ │ +
281 { return __x == __y; }
│ │ │ +
282 };
│ │ │ +
283
│ │ │ +
284 struct __not_equal_to
│ │ │ +
285 {
│ │ │ +
286 template<typename _Tp>
│ │ │ +
287 bool operator()(const _Tp& __x, const _Tp& __y) const
│ │ │ +
288 { return __x != __y; }
│ │ │ +
289 };
│ │ │ +
290
│ │ │ +
291 struct __less
│ │ │ +
292 {
│ │ │ +
293 template<typename _Tp>
│ │ │ +
294 bool operator()(const _Tp& __x, const _Tp& __y) const
│ │ │ +
295 { return __x < __y; }
│ │ │ +
296 };
│ │ │ +
297
│ │ │ +
298 struct __greater
│ │ │ +
299 {
│ │ │ +
300 template<typename _Tp>
│ │ │ +
301 bool operator()(const _Tp& __x, const _Tp& __y) const
│ │ │ +
302 { return __x > __y; }
│ │ │ +
303 };
│ │ │ +
304
│ │ │ +
305 struct __less_equal
│ │ │ +
306 {
│ │ │ +
307 template<typename _Tp>
│ │ │ +
308 bool operator()(const _Tp& __x, const _Tp& __y) const
│ │ │ +
309 { return __x <= __y; }
│ │ │ +
310 };
│ │ │ +
311
│ │ │ +
312 struct __greater_equal
│ │ │ +
313 {
│ │ │ +
314 template<typename _Tp>
│ │ │ +
315 bool operator()(const _Tp& __x, const _Tp& __y) const
│ │ │ +
316 { return __x >= __y; }
│ │ │ +
317 };
│ │ │ +
318
│ │ │ +
319 // The few binary functions we miss.
│ │ │ +
320 struct _Atan2
│ │ │ +
321 {
│ │ │ +
322 template<typename _Tp>
│ │ │ +
323 _Tp operator()(const _Tp& __x, const _Tp& __y) const
│ │ │ +
324 { return atan2(__x, __y); }
│ │ │ +
325 };
│ │ │ +
326
│ │ │ +
327 struct _Pow
│ │ │ +
328 {
│ │ │ +
329 template<typename _Tp>
│ │ │ +
330 _Tp operator()(const _Tp& __x, const _Tp& __y) const
│ │ │ +
331 { return pow(__x, __y); }
│ │ │ +
332 };
│ │ │ +
333
│ │ │ +
334 template<typename _Tp, bool _IsValidValarrayValue = !__is_abstract(_Tp)>
│ │ │ +
335 struct __fun_with_valarray
│ │ │ +
336 {
│ │ │ +
337 typedef _Tp result_type;
│ │ │ +
338 };
│ │ │ +
339
│ │ │ +
340 template<typename _Tp>
│ │ │ +
341 struct __fun_with_valarray<_Tp, false>
│ │ │ +
342 {
│ │ │ +
343 // No result type defined for invalid value types.
│ │ │ +
344 };
│ │ │ +
345
│ │ │ +
346 // We need these bits in order to recover the return type of
│ │ │ +
347 // some functions/operators now that we're no longer using
│ │ │ +
348 // function templates.
│ │ │ +
349 template<typename, typename _Tp>
│ │ │ +
350 struct __fun : __fun_with_valarray<_Tp>
│ │ │ +
351 {
│ │ │ +
352 };
│ │ │ +
353
│ │ │ +
354 // several specializations for relational operators.
│ │ │ +
355 template<typename _Tp>
│ │ │ +
356 struct __fun<__logical_not, _Tp>
│ │ │ +
357 {
│ │ │ +
358 typedef bool result_type;
│ │ │ +
359 };
│ │ │ +
360
│ │ │ +
361 template<typename _Tp>
│ │ │ +
362 struct __fun<__logical_and, _Tp>
│ │ │ +
363 {
│ │ │ +
364 typedef bool result_type;
│ │ │ +
365 };
│ │ │ +
366
│ │ │ +
367 template<typename _Tp>
│ │ │ +
368 struct __fun<__logical_or, _Tp>
│ │ │ +
369 {
│ │ │ +
370 typedef bool result_type;
│ │ │ +
371 };
│ │ │ +
372
│ │ │ +
373 template<typename _Tp>
│ │ │ +
374 struct __fun<__less, _Tp>
│ │ │ +
375 {
│ │ │ +
376 typedef bool result_type;
│ │ │ +
377 };
│ │ │ +
378
│ │ │ +
379 template<typename _Tp>
│ │ │ +
380 struct __fun<__greater, _Tp>
│ │ │ +
381 {
│ │ │ +
382 typedef bool result_type;
│ │ │ +
383 };
│ │ │ +
384
│ │ │ +
385 template<typename _Tp>
│ │ │ +
386 struct __fun<__less_equal, _Tp>
│ │ │ +
387 {
│ │ │ +
388 typedef bool result_type;
│ │ │ +
389 };
│ │ │ +
390
│ │ │ +
391 template<typename _Tp>
│ │ │ +
392 struct __fun<__greater_equal, _Tp>
│ │ │ +
393 {
│ │ │ +
394 typedef bool result_type;
│ │ │ +
395 };
│ │ │ +
396
│ │ │ +
397 template<typename _Tp>
│ │ │ +
398 struct __fun<__equal_to, _Tp>
│ │ │ +
399 {
│ │ │ +
400 typedef bool result_type;
│ │ │ +
401 };
│ │ │ +
402
│ │ │ +
403 template<typename _Tp>
│ │ │ +
404 struct __fun<__not_equal_to, _Tp>
│ │ │ +
405 {
│ │ │ +
406 typedef bool result_type;
│ │ │ +
407 };
│ │ │ +
408
│ │ │ +
409namespace __detail
│ │ │ +
410{
│ │ │ +
411 // Closure types already have reference semantics and are often short-lived,
│ │ │ +
412 // so store them by value to avoid (some cases of) dangling references to
│ │ │ +
413 // out-of-scope temporaries.
│ │ │ +
414 template<typename _Tp>
│ │ │ +
415 struct _ValArrayRef
│ │ │ +
416 { typedef const _Tp __type; };
│ │ │ +
417
│ │ │ +
418 // Use real references for std::valarray objects.
│ │ │ +
419 template<typename _Tp>
│ │ │ +
420 struct _ValArrayRef< valarray<_Tp> >
│ │ │ +
421 { typedef const valarray<_Tp>& __type; };
│ │ │ +
422
│ │ │ +
423 //
│ │ │ +
424 // Apply function taking a value/const reference closure
│ │ │ +
425 //
│ │ │ +
426
│ │ │ +
427 template<typename _Dom, typename _Arg>
│ │ │ +
428 class _FunBase
│ │ │ +
429 {
│ │ │ +
430 public:
│ │ │ +
431 typedef typename _Dom::value_type value_type;
│ │ │ +
432
│ │ │ +
433 _FunBase(const _Dom& __e, value_type __f(_Arg))
│ │ │ +
434 : _M_expr(__e), _M_func(__f) {}
│ │ │ +
435
│ │ │ +
436 value_type operator[](size_t __i) const
│ │ │ +
437 { return _M_func (_M_expr[__i]); }
│ │ │ +
438
│ │ │ +
439 size_t size() const { return _M_expr.size ();}
│ │ │ +
440
│ │ │ +
441 private:
│ │ │ +
442 typename _ValArrayRef<_Dom>::__type _M_expr;
│ │ │ +
443 value_type (*_M_func)(_Arg);
│ │ │ +
444 };
│ │ │ +
445
│ │ │ +
446 template<class _Dom>
│ │ │ +
447 struct _ValFunClos<_Expr,_Dom> : _FunBase<_Dom, typename _Dom::value_type>
│ │ │ +
448 {
│ │ │ +
449 typedef _FunBase<_Dom, typename _Dom::value_type> _Base;
│ │ │ +
450 typedef typename _Base::value_type value_type;
│ │ │ +
451 typedef value_type _Tp;
│ │ │ +
452
│ │ │ +
453 _ValFunClos(const _Dom& __e, _Tp __f(_Tp)) : _Base(__e, __f) {}
│ │ │ +
454 };
│ │ │ +
455
│ │ │ +
456 template<typename _Tp>
│ │ │ +
457 struct _ValFunClos<_ValArray,_Tp> : _FunBase<valarray<_Tp>, _Tp>
│ │ │ +
458 {
│ │ │ +
459 typedef _FunBase<valarray<_Tp>, _Tp> _Base;
│ │ │ +
460 typedef _Tp value_type;
│ │ │ +
461
│ │ │ +
462 _ValFunClos(const valarray<_Tp>& __v, _Tp __f(_Tp)) : _Base(__v, __f) {}
│ │ │ +
463 };
│ │ │ +
464
│ │ │ +
465 template<class _Dom>
│ │ │ +
466 struct _RefFunClos<_Expr, _Dom>
│ │ │ +
467 : _FunBase<_Dom, const typename _Dom::value_type&>
│ │ │ +
468 {
│ │ │ +
469 typedef _FunBase<_Dom, const typename _Dom::value_type&> _Base;
│ │ │ +
470 typedef typename _Base::value_type value_type;
│ │ │ +
471 typedef value_type _Tp;
│ │ │ +
472
│ │ │ +
473 _RefFunClos(const _Dom& __e, _Tp __f(const _Tp&))
│ │ │ +
474 : _Base(__e, __f) {}
│ │ │ +
475 };
│ │ │ +
476
│ │ │ +
477 template<typename _Tp>
│ │ │ +
478 struct _RefFunClos<_ValArray, _Tp>
│ │ │ +
479 : _FunBase<valarray<_Tp>, const _Tp&>
│ │ │ +
480 {
│ │ │ +
481 typedef _FunBase<valarray<_Tp>, const _Tp&> _Base;
│ │ │ +
482 typedef _Tp value_type;
│ │ │ +
483
│ │ │ +
484 _RefFunClos(const valarray<_Tp>& __v, _Tp __f(const _Tp&))
│ │ │ +
485 : _Base(__v, __f) {}
│ │ │ +
486 };
│ │ │ +
487
│ │ │ +
488 //
│ │ │ +
489 // Unary expression closure.
│ │ │ +
490 //
│ │ │ +
491
│ │ │ +
492 template<class _Oper, class _Arg>
│ │ │ +
493 class _UnBase
│ │ │ +
494 {
│ │ │ +
495 public:
│ │ │ +
496 typedef typename _Arg::value_type _Vt;
│ │ │ +
497 typedef typename __fun<_Oper, _Vt>::result_type value_type;
│ │ │ +
498
│ │ │ +
499 _UnBase(const _Arg& __e) : _M_expr(__e) {}
│ │ │ +
500
│ │ │ +
501 value_type operator[](size_t __i) const
│ │ │ +
502 { return _Oper()(_M_expr[__i]); }
│ │ │ +
503
│ │ │ +
504 size_t size() const { return _M_expr.size(); }
│ │ │ +
505
│ │ │ +
506 private:
│ │ │ +
507 typename _ValArrayRef<_Arg>::__type _M_expr;
│ │ │ +
508 };
│ │ │ +
509
│ │ │ +
510 template<class _Oper, class _Dom>
│ │ │ +
511 struct _UnClos<_Oper, _Expr, _Dom>
│ │ │ +
512 : _UnBase<_Oper, _Dom>
│ │ │ +
513 {
│ │ │ +
514 typedef _Dom _Arg;
│ │ │ +
515 typedef _UnBase<_Oper, _Dom> _Base;
│ │ │ +
516 typedef typename _Base::value_type value_type;
│ │ │ +
517
│ │ │ +
518 _UnClos(const _Arg& __e) : _Base(__e) {}
│ │ │ +
519 };
│ │ │ +
520
│ │ │ +
521 template<class _Oper, typename _Tp>
│ │ │ +
522 struct _UnClos<_Oper, _ValArray, _Tp>
│ │ │ +
523 : _UnBase<_Oper, valarray<_Tp> >
│ │ │ +
524 {
│ │ │ +
525 typedef valarray<_Tp> _Arg;
│ │ │ +
526 typedef _UnBase<_Oper, valarray<_Tp> > _Base;
│ │ │ +
527 typedef typename _Base::value_type value_type;
│ │ │ +
528
│ │ │ +
529 _UnClos(const _Arg& __e) : _Base(__e) {}
│ │ │ +
530 };
│ │ │ +
531
│ │ │ +
532
│ │ │ +
533 //
│ │ │ +
534 // Binary expression closure.
│ │ │ +
535 //
│ │ │ +
536
│ │ │ +
537 template<class _Oper, class _FirstArg, class _SecondArg>
│ │ │ +
538 class _BinBase
│ │ │ +
539 {
│ │ │ +
540 public:
│ │ │ +
541 typedef typename _FirstArg::value_type _Vt;
│ │ │ +
542 typedef typename __fun<_Oper, _Vt>::result_type value_type;
│ │ │ +
543
│ │ │ +
544 _BinBase(const _FirstArg& __e1, const _SecondArg& __e2)
│ │ │ +
545 : _M_expr1(__e1), _M_expr2(__e2) {}
│ │ │ +
546
│ │ │ +
547 value_type operator[](size_t __i) const
│ │ │ +
548 { return _Oper()(_M_expr1[__i], _M_expr2[__i]); }
│ │ │ +
549
│ │ │ +
550 size_t size() const { return _M_expr1.size(); }
│ │ │ +
551
│ │ │ +
552 private:
│ │ │ +
553 typename _ValArrayRef<_FirstArg>::__type _M_expr1;
│ │ │ +
554 typename _ValArrayRef<_SecondArg>::__type _M_expr2;
│ │ │ +
555 };
│ │ │ +
556
│ │ │ +
557
│ │ │ +
558 template<class _Oper, class _Clos>
│ │ │ +
559 class _BinBase2
│ │ │ +
560 {
│ │ │ +
561 public:
│ │ │ +
562 typedef typename _Clos::value_type _Vt;
│ │ │ +
563 typedef typename __fun<_Oper, _Vt>::result_type value_type;
│ │ │ +
564
│ │ │ +
565 _BinBase2(const _Clos& __e, const _Vt& __t)
│ │ │ +
566 : _M_expr1(__e), _M_expr2(__t) {}
│ │ │ +
567
│ │ │ +
568 value_type operator[](size_t __i) const
│ │ │ +
569 { return _Oper()(_M_expr1[__i], _M_expr2); }
│ │ │ +
570
│ │ │ +
571 size_t size() const { return _M_expr1.size(); }
│ │ │ +
572
│ │ │ +
573 private:
│ │ │ +
574 typename _ValArrayRef<_Clos>::__type _M_expr1;
│ │ │ +
575 _Vt _M_expr2;
│ │ │ +
576 };
│ │ │ +
577
│ │ │ +
578 template<class _Oper, class _Clos>
│ │ │ +
579 class _BinBase1
│ │ │ +
580 {
│ │ │ +
581 public:
│ │ │ +
582 typedef typename _Clos::value_type _Vt;
│ │ │ +
583 typedef typename __fun<_Oper, _Vt>::result_type value_type;
│ │ │ +
584
│ │ │ +
585 _BinBase1(const _Vt& __t, const _Clos& __e)
│ │ │ +
586 : _M_expr1(__t), _M_expr2(__e) {}
│ │ │ +
587
│ │ │ +
588 value_type operator[](size_t __i) const
│ │ │ +
589 { return _Oper()(_M_expr1, _M_expr2[__i]); }
│ │ │ +
590
│ │ │ +
591 size_t size() const { return _M_expr2.size(); }
│ │ │ +
592
│ │ │ +
593 private:
│ │ │ +
594 _Vt _M_expr1;
│ │ │ +
595 typename _ValArrayRef<_Clos>::__type _M_expr2;
│ │ │ +
596 };
│ │ │ +
597
│ │ │ +
598 template<class _Oper, class _Dom1, class _Dom2>
│ │ │ +
599 struct _BinClos<_Oper, _Expr, _Expr, _Dom1, _Dom2>
│ │ │ +
600 : _BinBase<_Oper, _Dom1, _Dom2>
│ │ │ +
601 {
│ │ │ +
602 typedef _BinBase<_Oper, _Dom1, _Dom2> _Base;
│ │ │ +
603 typedef typename _Base::value_type value_type;
│ │ │ +
604
│ │ │ +
605 _BinClos(const _Dom1& __e1, const _Dom2& __e2) : _Base(__e1, __e2) {}
│ │ │ +
606 };
│ │ │ +
607
│ │ │ +
608 template<class _Oper, typename _Tp>
│ │ │ +
609 struct _BinClos<_Oper, _ValArray, _ValArray, _Tp, _Tp>
│ │ │ +
610 : _BinBase<_Oper, valarray<_Tp>, valarray<_Tp> >
│ │ │ +
611 {
│ │ │ +
612 typedef _BinBase<_Oper, valarray<_Tp>, valarray<_Tp> > _Base;
│ │ │ +
613 typedef typename _Base::value_type value_type;
│ │ │ +
614
│ │ │ +
615 _BinClos(const valarray<_Tp>& __v, const valarray<_Tp>& __w)
│ │ │ +
616 : _Base(__v, __w) {}
│ │ │ +
617 };
│ │ │ +
618
│ │ │ +
619 template<class _Oper, class _Dom>
│ │ │ +
620 struct _BinClos<_Oper, _Expr, _ValArray, _Dom, typename _Dom::value_type>
│ │ │ +
621 : _BinBase<_Oper, _Dom, valarray<typename _Dom::value_type> >
│ │ │ +
622 {
│ │ │ +
623 typedef typename _Dom::value_type _Tp;
│ │ │ +
624 typedef _BinBase<_Oper,_Dom,valarray<_Tp> > _Base;
│ │ │ +
625 typedef typename _Base::value_type value_type;
│ │ │ +
626
│ │ │ +
627 _BinClos(const _Dom& __e1, const valarray<_Tp>& __e2)
│ │ │ +
628 : _Base(__e1, __e2) {}
│ │ │ +
629 };
│ │ │ +
630
│ │ │ +
631 template<class _Oper, class _Dom>
│ │ │ +
632 struct _BinClos<_Oper, _ValArray, _Expr, typename _Dom::value_type, _Dom>
│ │ │ +
633 : _BinBase<_Oper, valarray<typename _Dom::value_type>,_Dom>
│ │ │ +
634 {
│ │ │ +
635 typedef typename _Dom::value_type _Tp;
│ │ │ +
636 typedef _BinBase<_Oper, valarray<_Tp>, _Dom> _Base;
│ │ │ +
637 typedef typename _Base::value_type value_type;
│ │ │ +
638
│ │ │ +
639 _BinClos(const valarray<_Tp>& __e1, const _Dom& __e2)
│ │ │ +
640 : _Base(__e1, __e2) {}
│ │ │ +
641 };
│ │ │ +
642
│ │ │ +
643 template<class _Oper, class _Dom>
│ │ │ +
644 struct _BinClos<_Oper, _Expr, _Constant, _Dom, typename _Dom::value_type>
│ │ │ +
645 : _BinBase2<_Oper, _Dom>
│ │ │ +
646 {
│ │ │ +
647 typedef typename _Dom::value_type _Tp;
│ │ │ +
648 typedef _BinBase2<_Oper,_Dom> _Base;
│ │ │ +
649 typedef typename _Base::value_type value_type;
│ │ │ +
650
│ │ │ +
651 _BinClos(const _Dom& __e1, const _Tp& __e2) : _Base(__e1, __e2) {}
│ │ │ +
652 };
│ │ │ +
653
│ │ │ +
654 template<class _Oper, class _Dom>
│ │ │ +
655 struct _BinClos<_Oper, _Constant, _Expr, typename _Dom::value_type, _Dom>
│ │ │ +
656 : _BinBase1<_Oper, _Dom>
│ │ │ +
657 {
│ │ │ +
658 typedef typename _Dom::value_type _Tp;
│ │ │ +
659 typedef _BinBase1<_Oper, _Dom> _Base;
│ │ │ +
660 typedef typename _Base::value_type value_type;
│ │ │ +
661
│ │ │ +
662 _BinClos(const _Tp& __e1, const _Dom& __e2) : _Base(__e1, __e2) {}
│ │ │ +
663 };
│ │ │ +
664
│ │ │ +
665 template<class _Oper, typename _Tp>
│ │ │ +
666 struct _BinClos<_Oper, _ValArray, _Constant, _Tp, _Tp>
│ │ │ +
667 : _BinBase2<_Oper, valarray<_Tp> >
│ │ │ +
668 {
│ │ │ +
669 typedef _BinBase2<_Oper,valarray<_Tp> > _Base;
│ │ │ +
670 typedef typename _Base::value_type value_type;
│ │ │ +
671
│ │ │ +
672 _BinClos(const valarray<_Tp>& __v, const _Tp& __t) : _Base(__v, __t) {}
│ │ │ +
673 };
│ │ │ +
674
│ │ │ +
675 template<class _Oper, typename _Tp>
│ │ │ +
676 struct _BinClos<_Oper, _Constant, _ValArray, _Tp, _Tp>
│ │ │ +
677 : _BinBase1<_Oper, valarray<_Tp> >
│ │ │ +
678 {
│ │ │ +
679 typedef _BinBase1<_Oper, valarray<_Tp> > _Base;
│ │ │ +
680 typedef typename _Base::value_type value_type;
│ │ │ +
681
│ │ │ +
682 _BinClos(const _Tp& __t, const valarray<_Tp>& __v) : _Base(__t, __v) {}
│ │ │ +
683 };
│ │ │ +
684
│ │ │ +
685 //
│ │ │ +
686 // slice_array closure.
│ │ │ +
687 //
│ │ │ +
688 template<typename _Dom>
│ │ │ +
689 class _SBase
│ │ │ +
690 {
│ │ │ +
691 public:
│ │ │ +
692 typedef typename _Dom::value_type value_type;
│ │ │ +
693
│ │ │ +
694 _SBase (const _Dom& __e, const slice& __s)
│ │ │ +
695 : _M_expr (__e), _M_slice (__s) {}
│ │ │ +
696
│ │ │ +
697 value_type
│ │ │ +
698 operator[] (size_t __i) const
│ │ │ +
699 { return _M_expr[_M_slice.start () + __i * _M_slice.stride ()]; }
│ │ │ +
700
│ │ │ +
701 size_t
│ │ │ +
702 size() const
│ │ │ +
703 { return _M_slice.size (); }
│ │ │ +
704
│ │ │ +
705 private:
│ │ │ +
706 typename _ValArrayRef<_Dom>::__type _M_expr;
│ │ │ +
707 const slice& _M_slice;
│ │ │ +
708 };
│ │ │ +
709
│ │ │ +
710 template<typename _Tp>
│ │ │ +
711 class _SBase<_Array<_Tp> >
│ │ │ +
712 {
│ │ │ +
713 public:
│ │ │ +
714 typedef _Tp value_type;
│ │ │ +
715
│ │ │ +
716 _SBase (_Array<_Tp> __a, const slice& __s)
│ │ │ +
717 : _M_array (__a._M_data+__s.start()), _M_size (__s.size()),
│ │ │ +
718 _M_stride (__s.stride()) {}
│ │ │ +
719
│ │ │ +
720 value_type
│ │ │ +
721 operator[] (size_t __i) const
│ │ │ +
722 { return _M_array._M_data[__i * _M_stride]; }
│ │ │ +
723
│ │ │ +
724 size_t
│ │ │ +
725 size() const
│ │ │ +
726 { return _M_size; }
│ │ │ +
727
│ │ │ +
728 private:
│ │ │ +
729 const _Array<_Tp> _M_array;
│ │ │ +
730 const size_t _M_size;
│ │ │ +
731 const size_t _M_stride;
│ │ │ +
732 };
│ │ │ +
733
│ │ │ +
734 template<class _Dom>
│ │ │ +
735 struct _SClos<_Expr, _Dom>
│ │ │ +
736 : _SBase<_Dom>
│ │ │ +
737 {
│ │ │ +
738 typedef _SBase<_Dom> _Base;
│ │ │ +
739 typedef typename _Base::value_type value_type;
│ │ │ +
740
│ │ │ +
741 _SClos (const _Dom& __e, const slice& __s) : _Base (__e, __s) {}
│ │ │ +
742 };
│ │ │ +
743
│ │ │ +
744 template<typename _Tp>
│ │ │ +
745 struct _SClos<_ValArray, _Tp>
│ │ │ +
746 : _SBase<_Array<_Tp> >
│ │ │ +
747 {
│ │ │ +
748 typedef _SBase<_Array<_Tp> > _Base;
│ │ │ +
749 typedef _Tp value_type;
│ │ │ +
750
│ │ │ +
751 _SClos (_Array<_Tp> __a, const slice& __s) : _Base (__a, __s) {}
│ │ │ +
752 };
│ │ │ +
753} // namespace __detail
│ │ │ +
754
│ │ │ +
755_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ +
756} // namespace
│ │ │ +
757
│ │ │ +
758#endif /* _CPP_VALARRAY_BEFORE_H */
│ │ │ + │ │ │ +
complex< _Tp > log10(const complex< _Tp > &)
Return complex base 10 logarithm of z.
Definition complex:829
│ │ │ +
complex< _Tp > sin(const complex< _Tp > &)
Return complex sine of z.
Definition complex:859
│ │ │ +
complex< _Tp > log(const complex< _Tp > &)
Return complex natural logarithm of z.
Definition complex:824
│ │ │ +
complex< _Tp > tan(const complex< _Tp > &)
Return complex tangent of z.
Definition complex:960
│ │ │ +
_Tp abs(const complex< _Tp > &)
Return magnitude of z.
Definition complex:630
│ │ │ +
complex< _Tp > exp(const complex< _Tp > &)
Return complex base e exponential of z.
Definition complex:797
│ │ │ +
complex< _Tp > cosh(const complex< _Tp > &)
Return complex hyperbolic cosine of z.
Definition complex:771
│ │ │ +
complex< _Tp > tanh(const complex< _Tp > &)
Return complex hyperbolic tangent of z.
Definition complex:988
│ │ │ +
complex< _Tp > pow(const complex< _Tp > &, int)
Return x to the y'th power.
Definition complex:1019
│ │ │ +
complex< _Tp > sinh(const complex< _Tp > &)
Return complex hyperbolic sine of z.
Definition complex:889
│ │ │ +
complex< _Tp > cos(const complex< _Tp > &)
Return complex cosine of z.
Definition complex:741
│ │ │ +
complex< _Tp > sqrt(const complex< _Tp > &)
Return complex square root of z.
Definition complex:933
│ │ │
ISO C++ entities toplevel namespace is std.
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,13 +1,13 @@ │ │ │ │ libstdc++ │ │ │ │ -hash_bytes.h │ │ │ │ +valarray_before.h │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -1// Declarations for hash functions. -*- C++ -*- │ │ │ │ +1// The template and inlines for the -*- C++ -*- internal _Meta class. │ │ │ │ 2 │ │ │ │ -3// Copyright (C) 2010-2022 Free Software Foundation, Inc. │ │ │ │ +3// Copyright (C) 1997-2022 Free Software Foundation, Inc. │ │ │ │ 4// │ │ │ │ 5// This file is part of the GNU ISO C++ Library. This library is free │ │ │ │ 6// software; you can redistribute it and/or modify it under the │ │ │ │ 7// terms of the GNU General Public License as published by the │ │ │ │ 8// Free Software Foundation; either version 3, or (at your option) │ │ │ │ 9// any later version. │ │ │ │ 10 │ │ │ │ @@ -21,48 +21,796 @@ │ │ │ │ 18// 3.1, as published by the Free Software Foundation. │ │ │ │ 19 │ │ │ │ 20// You should have received a copy of the GNU General Public License and │ │ │ │ 21// a copy of the GCC Runtime Library Exception along with this program; │ │ │ │ 22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see │ │ │ │ 23// . │ │ │ │ 24 │ │ │ │ -25/** @file bits/hash_bytes.h │ │ │ │ +25/** @file bits/valarray_before.h │ │ │ │ 26 * This is an internal header file, included by other library headers. │ │ │ │ -27 * Do not attempt to use it directly. @headername{functional} │ │ │ │ +27 * Do not attempt to use it directly. @headername{valarray} │ │ │ │ 28 */ │ │ │ │ 29 │ │ │ │ -30#ifndef _HASH_BYTES_H │ │ │ │ -31#define _HASH_BYTES_H 1 │ │ │ │ -32 │ │ │ │ -33#pragma GCC system_header │ │ │ │ +30// Written by Gabriel Dos Reis │ │ │ │ +31 │ │ │ │ +32#ifndef _VALARRAY_BEFORE_H │ │ │ │ +33#define _VALARRAY_BEFORE_H 1 │ │ │ │ 34 │ │ │ │ -35#include <_b_i_t_s_/_c_+_+_c_o_n_f_i_g_._h> │ │ │ │ +35#pragma GCC system_header │ │ │ │ 36 │ │ │ │ -37namespace _s_t_d │ │ │ │ -38{ │ │ │ │ -39_GLIBCXX_BEGIN_NAMESPACE_VERSION │ │ │ │ -40 │ │ │ │ -41 // Hash function implementation for the nontrivial specialization. │ │ │ │ -42 // All of them are based on a primitive that hashes a pointer to a │ │ │ │ -43 // byte array. The actual hash algorithm is not guaranteed to stay │ │ │ │ -44 // the same from release to release -- it may be updated or tuned to │ │ │ │ -45 // improve hash quality or speed. │ │ │ │ -46 size_t │ │ │ │ -47 _Hash_bytes(const void* __ptr, size_t __len, size_t __seed); │ │ │ │ -48 │ │ │ │ -49 // A similar hash primitive, using the FNV hash algorithm. This │ │ │ │ -50 // algorithm is guaranteed to stay the same from release to release. │ │ │ │ -51 // (although it might not produce the same values on different │ │ │ │ -52 // machines.) │ │ │ │ -53 size_t │ │ │ │ -54 _Fnv_hash_bytes(const void* __ptr, size_t __len, size_t __seed); │ │ │ │ -55 │ │ │ │ -56_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ -57} // namespace │ │ │ │ -58 │ │ │ │ -59#endif │ │ │ │ -_c_+_+_c_o_n_f_i_g_._h │ │ │ │ +37#include <_b_i_t_s_/_s_l_i_c_e___a_r_r_a_y_._h> │ │ │ │ +38 │ │ │ │ +39namespace _s_t_d _GLIBCXX_VISIBILITY(default) │ │ │ │ +40{ │ │ │ │ +41_GLIBCXX_BEGIN_NAMESPACE_VERSION │ │ │ │ +42 │ │ │ │ +43 // │ │ │ │ +44 // Implementing a loosened valarray return value is tricky. │ │ │ │ +45 // First we need to meet 26.3.1/3: we should not add more than │ │ │ │ +46 // two levels of template nesting. Therefore we resort to template │ │ │ │ +47 // template to "flatten" loosened return value types. │ │ │ │ +48 // At some point we use partial specialization to remove one level │ │ │ │ +49 // template nesting due to _Expr<> │ │ │ │ +50 // │ │ │ │ +51 │ │ │ │ +52 // This class is NOT defined. It doesn't need to. │ │ │ │ +53 template class _Constant; │ │ │ │ +54 │ │ │ │ +55 // Implementations of unary functions applied to valarray<>s. │ │ │ │ +56 // I use hard-coded object functions here instead of a generic │ │ │ │ +57 // approach like pointers to function: │ │ │ │ +58 // 1) correctness: some functions take references, others values. │ │ │ │ +59 // we can't deduce the correct type afterwards. │ │ │ │ +60 // 2) efficiency -- object functions can be easily inlined │ │ │ │ +61 // 3) be Koenig-lookup-friendly │ │ │ │ +62 │ │ │ │ +63 struct _Abs │ │ │ │ +64 { │ │ │ │ +65 template │ │ │ │ +66 _Tp operator()(const _Tp& __t) const │ │ │ │ +67 { return _a_b_s(__t); } │ │ │ │ +68 }; │ │ │ │ +69 │ │ │ │ +70 struct _Cos │ │ │ │ +71 { │ │ │ │ +72 template │ │ │ │ +73 _Tp operator()(const _Tp& __t) const │ │ │ │ +74 { return _c_o_s(__t); } │ │ │ │ +75 }; │ │ │ │ +76 │ │ │ │ +77 struct _Acos │ │ │ │ +78 { │ │ │ │ +79 template │ │ │ │ +80 _Tp operator()(const _Tp& __t) const │ │ │ │ +81 { return acos(__t); } │ │ │ │ +82 }; │ │ │ │ +83 │ │ │ │ +84 struct _Cosh │ │ │ │ +85 { │ │ │ │ +86 template │ │ │ │ +87 _Tp operator()(const _Tp& __t) const │ │ │ │ +88 { return _c_o_s_h(__t); } │ │ │ │ +89 }; │ │ │ │ +90 │ │ │ │ +91 struct _Sin │ │ │ │ +92 { │ │ │ │ +93 template │ │ │ │ +94 _Tp operator()(const _Tp& __t) const │ │ │ │ +95 { return _s_i_n(__t); } │ │ │ │ +96 }; │ │ │ │ +97 │ │ │ │ +98 struct _Asin │ │ │ │ +99 { │ │ │ │ +100 template │ │ │ │ +101 _Tp operator()(const _Tp& __t) const │ │ │ │ +102 { return asin(__t); } │ │ │ │ +103 }; │ │ │ │ +104 │ │ │ │ +105 struct _Sinh │ │ │ │ +106 { │ │ │ │ +107 template │ │ │ │ +108 _Tp operator()(const _Tp& __t) const │ │ │ │ +109 { return _s_i_n_h(__t); } │ │ │ │ +110 }; │ │ │ │ +111 │ │ │ │ +112 struct _Tan │ │ │ │ +113 { │ │ │ │ +114 template │ │ │ │ +115 _Tp operator()(const _Tp& __t) const │ │ │ │ +116 { return _t_a_n(__t); } │ │ │ │ +117 }; │ │ │ │ +118 │ │ │ │ +119 struct _Atan │ │ │ │ +120 { │ │ │ │ +121 template │ │ │ │ +122 _Tp operator()(const _Tp& __t) const │ │ │ │ +123 { return atan(__t); } │ │ │ │ +124 }; │ │ │ │ +125 │ │ │ │ +126 struct _Tanh │ │ │ │ +127 { │ │ │ │ +128 template │ │ │ │ +129 _Tp operator()(const _Tp& __t) const │ │ │ │ +130 { return _t_a_n_h(__t); } │ │ │ │ +131 }; │ │ │ │ +132 │ │ │ │ +133 struct _Exp │ │ │ │ +134 { │ │ │ │ +135 template │ │ │ │ +136 _Tp operator()(const _Tp& __t) const │ │ │ │ +137 { return _e_x_p(__t); } │ │ │ │ +138 }; │ │ │ │ +139 │ │ │ │ +140 struct _Log │ │ │ │ +141 { │ │ │ │ +142 template │ │ │ │ +143 _Tp operator()(const _Tp& __t) const │ │ │ │ +144 { return _l_o_g(__t); } │ │ │ │ +145 }; │ │ │ │ +146 │ │ │ │ +147 struct _Log10 │ │ │ │ +148 { │ │ │ │ +149 template │ │ │ │ +150 _Tp operator()(const _Tp& __t) const │ │ │ │ +151 { return _l_o_g_1_0(__t); } │ │ │ │ +152 }; │ │ │ │ +153 │ │ │ │ +154 struct _Sqrt │ │ │ │ +155 { │ │ │ │ +156 template │ │ │ │ +157 _Tp operator()(const _Tp& __t) const │ │ │ │ +158 { return _s_q_r_t(__t); } │ │ │ │ +159 }; │ │ │ │ +160 │ │ │ │ +161 // In the past, we used to tailor operator applications semantics │ │ │ │ +162 // to the specialization of standard function objects (i.e. plus<>, etc.) │ │ │ │ +163 // That is incorrect. Therefore we provide our own surrogates. │ │ │ │ +164 │ │ │ │ +165 struct __unary_plus │ │ │ │ +166 { │ │ │ │ +167 template │ │ │ │ +168 _Tp operator()(const _Tp& __t) const │ │ │ │ +169 { return +__t; } │ │ │ │ +170 }; │ │ │ │ +171 │ │ │ │ +172 struct __negate │ │ │ │ +173 { │ │ │ │ +174 template │ │ │ │ +175 _Tp operator()(const _Tp& __t) const │ │ │ │ +176 { return -__t; } │ │ │ │ +177 }; │ │ │ │ +178 │ │ │ │ +179 struct __bitwise_not │ │ │ │ +180 { │ │ │ │ +181 template │ │ │ │ +182 _Tp operator()(const _Tp& __t) const │ │ │ │ +183 { return ~__t; } │ │ │ │ +184 }; │ │ │ │ +185 │ │ │ │ +186 struct __plus │ │ │ │ +187 { │ │ │ │ +188 template │ │ │ │ +189 _Tp operator()(const _Tp& __x, const _Tp& __y) const │ │ │ │ +190 { return __x + __y; } │ │ │ │ +191 }; │ │ │ │ +192 │ │ │ │ +193 struct __minus │ │ │ │ +194 { │ │ │ │ +195 template │ │ │ │ +196 _Tp operator()(const _Tp& __x, const _Tp& __y) const │ │ │ │ +197 { return __x - __y; } │ │ │ │ +198 }; │ │ │ │ +199 │ │ │ │ +200 struct __multiplies │ │ │ │ +201 { │ │ │ │ +202 template │ │ │ │ +203 _Tp operator()(const _Tp& __x, const _Tp& __y) const │ │ │ │ +204 { return __x * __y; } │ │ │ │ +205 }; │ │ │ │ +206 │ │ │ │ +207 struct __divides │ │ │ │ +208 { │ │ │ │ +209 template │ │ │ │ +210 _Tp operator()(const _Tp& __x, const _Tp& __y) const │ │ │ │ +211 { return __x / __y; } │ │ │ │ +212 }; │ │ │ │ +213 │ │ │ │ +214 struct __modulus │ │ │ │ +215 { │ │ │ │ +216 template │ │ │ │ +217 _Tp operator()(const _Tp& __x, const _Tp& __y) const │ │ │ │ +218 { return __x % __y; } │ │ │ │ +219 }; │ │ │ │ +220 │ │ │ │ +221 struct __bitwise_xor │ │ │ │ +222 { │ │ │ │ +223 template │ │ │ │ +224 _Tp operator()(const _Tp& __x, const _Tp& __y) const │ │ │ │ +225 { return __x ^ __y; } │ │ │ │ +226 }; │ │ │ │ +227 │ │ │ │ +228 struct __bitwise_and │ │ │ │ +229 { │ │ │ │ +230 template │ │ │ │ +231 _Tp operator()(const _Tp& __x, const _Tp& __y) const │ │ │ │ +232 { return __x & __y; } │ │ │ │ +233 }; │ │ │ │ +234 │ │ │ │ +235 struct __bitwise_or │ │ │ │ +236 { │ │ │ │ +237 template │ │ │ │ +238 _Tp operator()(const _Tp& __x, const _Tp& __y) const │ │ │ │ +239 { return __x | __y; } │ │ │ │ +240 }; │ │ │ │ +241 │ │ │ │ +242 struct __shift_left │ │ │ │ +243 { │ │ │ │ +244 template │ │ │ │ +245 _Tp operator()(const _Tp& __x, const _Tp& __y) const │ │ │ │ +246 { return __x << __y; } │ │ │ │ +247 }; │ │ │ │ +248 │ │ │ │ +249 struct __shift_right │ │ │ │ +250 { │ │ │ │ +251 template │ │ │ │ +252 _Tp operator()(const _Tp& __x, const _Tp& __y) const │ │ │ │ +253 { return __x >> __y; } │ │ │ │ +254 }; │ │ │ │ +255 │ │ │ │ +256 struct __logical_and │ │ │ │ +257 { │ │ │ │ +258 template │ │ │ │ +259 bool operator()(const _Tp& __x, const _Tp& __y) const │ │ │ │ +260 { return __x && __y; } │ │ │ │ +261 }; │ │ │ │ +262 │ │ │ │ +263 struct __logical_or │ │ │ │ +264 { │ │ │ │ +265 template │ │ │ │ +266 bool operator()(const _Tp& __x, const _Tp& __y) const │ │ │ │ +267 { return __x || __y; } │ │ │ │ +268 }; │ │ │ │ +269 │ │ │ │ +270 struct __logical_not │ │ │ │ +271 { │ │ │ │ +272 template │ │ │ │ +273 bool operator()(const _Tp& __x) const │ │ │ │ +274 { return !__x; } │ │ │ │ +275 }; │ │ │ │ +276 │ │ │ │ +277 struct __equal_to │ │ │ │ +278 { │ │ │ │ +279 template │ │ │ │ +280 bool operator()(const _Tp& __x, const _Tp& __y) const │ │ │ │ +281 { return __x == __y; } │ │ │ │ +282 }; │ │ │ │ +283 │ │ │ │ +284 struct __not_equal_to │ │ │ │ +285 { │ │ │ │ +286 template │ │ │ │ +287 bool operator()(const _Tp& __x, const _Tp& __y) const │ │ │ │ +288 { return __x != __y; } │ │ │ │ +289 }; │ │ │ │ +290 │ │ │ │ +291 struct __less │ │ │ │ +292 { │ │ │ │ +293 template │ │ │ │ +294 bool operator()(const _Tp& __x, const _Tp& __y) const │ │ │ │ +295 { return __x < __y; } │ │ │ │ +296 }; │ │ │ │ +297 │ │ │ │ +298 struct __greater │ │ │ │ +299 { │ │ │ │ +300 template │ │ │ │ +301 bool operator()(const _Tp& __x, const _Tp& __y) const │ │ │ │ +302 { return __x > __y; } │ │ │ │ +303 }; │ │ │ │ +304 │ │ │ │ +305 struct __less_equal │ │ │ │ +306 { │ │ │ │ +307 template │ │ │ │ +308 bool operator()(const _Tp& __x, const _Tp& __y) const │ │ │ │ +309 { return __x <= __y; } │ │ │ │ +310 }; │ │ │ │ +311 │ │ │ │ +312 struct __greater_equal │ │ │ │ +313 { │ │ │ │ +314 template │ │ │ │ +315 bool operator()(const _Tp& __x, const _Tp& __y) const │ │ │ │ +316 { return __x >= __y; } │ │ │ │ +317 }; │ │ │ │ +318 │ │ │ │ +319 // The few binary functions we miss. │ │ │ │ +320 struct _Atan2 │ │ │ │ +321 { │ │ │ │ +322 template │ │ │ │ +323 _Tp operator()(const _Tp& __x, const _Tp& __y) const │ │ │ │ +324 { return atan2(__x, __y); } │ │ │ │ +325 }; │ │ │ │ +326 │ │ │ │ +327 struct _Pow │ │ │ │ +328 { │ │ │ │ +329 template │ │ │ │ +330 _Tp operator()(const _Tp& __x, const _Tp& __y) const │ │ │ │ +331 { return _p_o_w(__x, __y); } │ │ │ │ +332 }; │ │ │ │ +333 │ │ │ │ +334 template │ │ │ │ +335 struct __fun_with_valarray │ │ │ │ +336 { │ │ │ │ +337 typedef _Tp result_type; │ │ │ │ +338 }; │ │ │ │ +339 │ │ │ │ +340 template │ │ │ │ +341 struct __fun_with_valarray<_Tp, false> │ │ │ │ +342 { │ │ │ │ +343 // No result type defined for invalid value types. │ │ │ │ +344 }; │ │ │ │ +345 │ │ │ │ +346 // We need these bits in order to recover the return type of │ │ │ │ +347 // some functions/operators now that we're no longer using │ │ │ │ +348 // function templates. │ │ │ │ +349 template │ │ │ │ +350 struct __fun : __fun_with_valarray<_Tp> │ │ │ │ +351 { │ │ │ │ +352 }; │ │ │ │ +353 │ │ │ │ +354 // several specializations for relational operators. │ │ │ │ +355 template │ │ │ │ +356 struct __fun<__logical_not, _Tp> │ │ │ │ +357 { │ │ │ │ +358 typedef bool result_type; │ │ │ │ +359 }; │ │ │ │ +360 │ │ │ │ +361 template │ │ │ │ +362 struct __fun<__logical_and, _Tp> │ │ │ │ +363 { │ │ │ │ +364 typedef bool result_type; │ │ │ │ +365 }; │ │ │ │ +366 │ │ │ │ +367 template │ │ │ │ +368 struct __fun<__logical_or, _Tp> │ │ │ │ +369 { │ │ │ │ +370 typedef bool result_type; │ │ │ │ +371 }; │ │ │ │ +372 │ │ │ │ +373 template │ │ │ │ +374 struct __fun<__less, _Tp> │ │ │ │ +375 { │ │ │ │ +376 typedef bool result_type; │ │ │ │ +377 }; │ │ │ │ +378 │ │ │ │ +379 template │ │ │ │ +380 struct __fun<__greater, _Tp> │ │ │ │ +381 { │ │ │ │ +382 typedef bool result_type; │ │ │ │ +383 }; │ │ │ │ +384 │ │ │ │ +385 template │ │ │ │ +386 struct __fun<__less_equal, _Tp> │ │ │ │ +387 { │ │ │ │ +388 typedef bool result_type; │ │ │ │ +389 }; │ │ │ │ +390 │ │ │ │ +391 template │ │ │ │ +392 struct __fun<__greater_equal, _Tp> │ │ │ │ +393 { │ │ │ │ +394 typedef bool result_type; │ │ │ │ +395 }; │ │ │ │ +396 │ │ │ │ +397 template │ │ │ │ +398 struct __fun<__equal_to, _Tp> │ │ │ │ +399 { │ │ │ │ +400 typedef bool result_type; │ │ │ │ +401 }; │ │ │ │ +402 │ │ │ │ +403 template │ │ │ │ +404 struct __fun<__not_equal_to, _Tp> │ │ │ │ +405 { │ │ │ │ +406 typedef bool result_type; │ │ │ │ +407 }; │ │ │ │ +408 │ │ │ │ +409namespace __detail │ │ │ │ +410{ │ │ │ │ +411 // Closure types already have reference semantics and are often short- │ │ │ │ +lived, │ │ │ │ +412 // so store them by value to avoid (some cases of) dangling references to │ │ │ │ +413 // out-of-scope temporaries. │ │ │ │ +414 template │ │ │ │ +415 struct _ValArrayRef │ │ │ │ +416 { typedef const _Tp __type; }; │ │ │ │ +417 │ │ │ │ +418 // Use real references for std::valarray objects. │ │ │ │ +419 template │ │ │ │ +420 struct _ValArrayRef< valarray<_Tp> > │ │ │ │ +421 { typedef const valarray<_Tp>& __type; }; │ │ │ │ +422 │ │ │ │ +423 // │ │ │ │ +424 // Apply function taking a value/const reference closure │ │ │ │ +425 // │ │ │ │ +426 │ │ │ │ +427 template │ │ │ │ +428 class _FunBase │ │ │ │ +429 { │ │ │ │ +430 public: │ │ │ │ +431 typedef typename _Dom::value_type value_type; │ │ │ │ +432 │ │ │ │ +433 _FunBase(const _Dom& __e, value_type __f(_Arg)) │ │ │ │ +434 : _M_expr(__e), _M_func(__f) {} │ │ │ │ +435 │ │ │ │ +436 value_type operator[](size_t __i) const │ │ │ │ +437 { return _M_func (_M_expr[__i]); } │ │ │ │ +438 │ │ │ │ +439 size_t size() const { return _M_expr.size ();} │ │ │ │ +440 │ │ │ │ +441 private: │ │ │ │ +442 typename _ValArrayRef<_Dom>::__type _M_expr; │ │ │ │ +443 value_type (*_M_func)(_Arg); │ │ │ │ +444 }; │ │ │ │ +445 │ │ │ │ +446 template │ │ │ │ +447 struct _ValFunClos<_Expr,_Dom> : _FunBase<_Dom, typename _Dom::value_type> │ │ │ │ +448 { │ │ │ │ +449 typedef _FunBase<_Dom, typename _Dom::value_type> _Base; │ │ │ │ +450 typedef typename _Base::value_type value_type; │ │ │ │ +451 typedef value_type _Tp; │ │ │ │ +452 │ │ │ │ +453 _ValFunClos(const _Dom& __e, _Tp __f(_Tp)) : _Base(__e, __f) {} │ │ │ │ +454 }; │ │ │ │ +455 │ │ │ │ +456 template │ │ │ │ +457 struct _ValFunClos<_ValArray,_Tp> : _FunBase, _Tp> │ │ │ │ +458 { │ │ │ │ +459 typedef _FunBase, _Tp> _Base; │ │ │ │ +460 typedef _Tp value_type; │ │ │ │ +461 │ │ │ │ +462 _ValFunClos(const valarray<_Tp>& __v, _Tp __f(_Tp)) : _Base(__v, __f) {} │ │ │ │ +463 }; │ │ │ │ +464 │ │ │ │ +465 template │ │ │ │ +466 struct _RefFunClos<_Expr, _Dom> │ │ │ │ +467 : _FunBase<_Dom, const typename _Dom::value_type&> │ │ │ │ +468 { │ │ │ │ +469 typedef _FunBase<_Dom, const typename _Dom::value_type&> _Base; │ │ │ │ +470 typedef typename _Base::value_type value_type; │ │ │ │ +471 typedef value_type _Tp; │ │ │ │ +472 │ │ │ │ +473 _RefFunClos(const _Dom& __e, _Tp __f(const _Tp&)) │ │ │ │ +474 : _Base(__e, __f) {} │ │ │ │ +475 }; │ │ │ │ +476 │ │ │ │ +477 template │ │ │ │ +478 struct _RefFunClos<_ValArray, _Tp> │ │ │ │ +479 : _FunBase, const _Tp&> │ │ │ │ +480 { │ │ │ │ +481 typedef _FunBase, const _Tp&> _Base; │ │ │ │ +482 typedef _Tp value_type; │ │ │ │ +483 │ │ │ │ +484 _RefFunClos(const valarray<_Tp>& __v, _Tp __f(const _Tp&)) │ │ │ │ +485 : _Base(__v, __f) {} │ │ │ │ +486 }; │ │ │ │ +487 │ │ │ │ +488 // │ │ │ │ +489 // Unary expression closure. │ │ │ │ +490 // │ │ │ │ +491 │ │ │ │ +492 template │ │ │ │ +493 class _UnBase │ │ │ │ +494 { │ │ │ │ +495 public: │ │ │ │ +496 typedef typename _Arg::value_type _Vt; │ │ │ │ +497 typedef typename __fun<_Oper, _Vt>::result_type value_type; │ │ │ │ +498 │ │ │ │ +499 _UnBase(const _Arg& __e) : _M_expr(__e) {} │ │ │ │ +500 │ │ │ │ +501 value_type operator[](size_t __i) const │ │ │ │ +502 { return _Oper()(_M_expr[__i]); } │ │ │ │ +503 │ │ │ │ +504 size_t size() const { return _M_expr.size(); } │ │ │ │ +505 │ │ │ │ +506 private: │ │ │ │ +507 typename _ValArrayRef<_Arg>::__type _M_expr; │ │ │ │ +508 }; │ │ │ │ +509 │ │ │ │ +510 template │ │ │ │ +511 struct _UnClos<_Oper, _Expr, _Dom> │ │ │ │ +512 : _UnBase<_Oper, _Dom> │ │ │ │ +513 { │ │ │ │ +514 typedef _Dom _Arg; │ │ │ │ +515 typedef _UnBase<_Oper, _Dom> _Base; │ │ │ │ +516 typedef typename _Base::value_type value_type; │ │ │ │ +517 │ │ │ │ +518 _UnClos(const _Arg& __e) : _Base(__e) {} │ │ │ │ +519 }; │ │ │ │ +520 │ │ │ │ +521 template │ │ │ │ +522 struct _UnClos<_Oper, _ValArray, _Tp> │ │ │ │ +523 : _UnBase<_Oper, valarray<_Tp> > │ │ │ │ +524 { │ │ │ │ +525 typedef valarray<_Tp> _Arg; │ │ │ │ +526 typedef _UnBase<_Oper, valarray<_Tp> > _Base; │ │ │ │ +527 typedef typename _Base::value_type value_type; │ │ │ │ +528 │ │ │ │ +529 _UnClos(const _Arg& __e) : _Base(__e) {} │ │ │ │ +530 }; │ │ │ │ +531 │ │ │ │ +532 │ │ │ │ +533 // │ │ │ │ +534 // Binary expression closure. │ │ │ │ +535 // │ │ │ │ +536 │ │ │ │ +537 template │ │ │ │ +538 class _BinBase │ │ │ │ +539 { │ │ │ │ +540 public: │ │ │ │ +541 typedef typename _FirstArg::value_type _Vt; │ │ │ │ +542 typedef typename __fun<_Oper, _Vt>::result_type value_type; │ │ │ │ +543 │ │ │ │ +544 _BinBase(const _FirstArg& __e1, const _SecondArg& __e2) │ │ │ │ +545 : _M_expr1(__e1), _M_expr2(__e2) {} │ │ │ │ +546 │ │ │ │ +547 value_type operator[](size_t __i) const │ │ │ │ +548 { return _Oper()(_M_expr1[__i], _M_expr2[__i]); } │ │ │ │ +549 │ │ │ │ +550 size_t size() const { return _M_expr1.size(); } │ │ │ │ +551 │ │ │ │ +552 private: │ │ │ │ +553 typename _ValArrayRef<_FirstArg>::__type _M_expr1; │ │ │ │ +554 typename _ValArrayRef<_SecondArg>::__type _M_expr2; │ │ │ │ +555 }; │ │ │ │ +556 │ │ │ │ +557 │ │ │ │ +558 template │ │ │ │ +559 class _BinBase2 │ │ │ │ +560 { │ │ │ │ +561 public: │ │ │ │ +562 typedef typename _Clos::value_type _Vt; │ │ │ │ +563 typedef typename __fun<_Oper, _Vt>::result_type value_type; │ │ │ │ +564 │ │ │ │ +565 _BinBase2(const _Clos& __e, const _Vt& __t) │ │ │ │ +566 : _M_expr1(__e), _M_expr2(__t) {} │ │ │ │ +567 │ │ │ │ +568 value_type operator[](size_t __i) const │ │ │ │ +569 { return _Oper()(_M_expr1[__i], _M_expr2); } │ │ │ │ +570 │ │ │ │ +571 size_t size() const { return _M_expr1.size(); } │ │ │ │ +572 │ │ │ │ +573 private: │ │ │ │ +574 typename _ValArrayRef<_Clos>::__type _M_expr1; │ │ │ │ +575 _Vt _M_expr2; │ │ │ │ +576 }; │ │ │ │ +577 │ │ │ │ +578 template │ │ │ │ +579 class _BinBase1 │ │ │ │ +580 { │ │ │ │ +581 public: │ │ │ │ +582 typedef typename _Clos::value_type _Vt; │ │ │ │ +583 typedef typename __fun<_Oper, _Vt>::result_type value_type; │ │ │ │ +584 │ │ │ │ +585 _BinBase1(const _Vt& __t, const _Clos& __e) │ │ │ │ +586 : _M_expr1(__t), _M_expr2(__e) {} │ │ │ │ +587 │ │ │ │ +588 value_type operator[](size_t __i) const │ │ │ │ +589 { return _Oper()(_M_expr1, _M_expr2[__i]); } │ │ │ │ +590 │ │ │ │ +591 size_t size() const { return _M_expr2.size(); } │ │ │ │ +592 │ │ │ │ +593 private: │ │ │ │ +594 _Vt _M_expr1; │ │ │ │ +595 typename _ValArrayRef<_Clos>::__type _M_expr2; │ │ │ │ +596 }; │ │ │ │ +597 │ │ │ │ +598 template │ │ │ │ +599 struct _BinClos<_Oper, _Expr, _Expr, _Dom1, _Dom2> │ │ │ │ +600 : _BinBase<_Oper, _Dom1, _Dom2> │ │ │ │ +601 { │ │ │ │ +602 typedef _BinBase<_Oper, _Dom1, _Dom2> _Base; │ │ │ │ +603 typedef typename _Base::value_type value_type; │ │ │ │ +604 │ │ │ │ +605 _BinClos(const _Dom1& __e1, const _Dom2& __e2) : _Base(__e1, __e2) {} │ │ │ │ +606 }; │ │ │ │ +607 │ │ │ │ +608 template │ │ │ │ +609 struct _BinClos<_Oper, _ValArray, _ValArray, _Tp, _Tp> │ │ │ │ +610 : _BinBase<_Oper, valarray<_Tp>, valarray<_Tp> > │ │ │ │ +611 { │ │ │ │ +612 typedef _BinBase<_Oper, valarray<_Tp>, valarray<_Tp> > _Base; │ │ │ │ +613 typedef typename _Base::value_type value_type; │ │ │ │ +614 │ │ │ │ +615 _BinClos(const valarray<_Tp>& __v, const valarray<_Tp>& __w) │ │ │ │ +616 : _Base(__v, __w) {} │ │ │ │ +617 }; │ │ │ │ +618 │ │ │ │ +619 template │ │ │ │ +620 struct _BinClos<_Oper, _Expr, _ValArray, _Dom, typename _Dom::value_type> │ │ │ │ +621 : _BinBase<_Oper, _Dom, valarray > │ │ │ │ +622 { │ │ │ │ +623 typedef typename _Dom::value_type _Tp; │ │ │ │ +624 typedef _BinBase<_Oper,_Dom,valarray<_Tp> > _Base; │ │ │ │ +625 typedef typename _Base::value_type value_type; │ │ │ │ +626 │ │ │ │ +627 _BinClos(const _Dom& __e1, const valarray<_Tp>& __e2) │ │ │ │ +628 : _Base(__e1, __e2) {} │ │ │ │ +629 }; │ │ │ │ +630 │ │ │ │ +631 template │ │ │ │ +632 struct _BinClos<_Oper, _ValArray, _Expr, typename _Dom::value_type, _Dom> │ │ │ │ +633 : _BinBase<_Oper, valarray,_Dom> │ │ │ │ +634 { │ │ │ │ +635 typedef typename _Dom::value_type _Tp; │ │ │ │ +636 typedef _BinBase<_Oper, valarray<_Tp>, _Dom> _Base; │ │ │ │ +637 typedef typename _Base::value_type value_type; │ │ │ │ +638 │ │ │ │ +639 _BinClos(const valarray<_Tp>& __e1, const _Dom& __e2) │ │ │ │ +640 : _Base(__e1, __e2) {} │ │ │ │ +641 }; │ │ │ │ +642 │ │ │ │ +643 template │ │ │ │ +644 struct _BinClos<_Oper, _Expr, _Constant, _Dom, typename _Dom::value_type> │ │ │ │ +645 : _BinBase2<_Oper, _Dom> │ │ │ │ +646 { │ │ │ │ +647 typedef typename _Dom::value_type _Tp; │ │ │ │ +648 typedef _BinBase2<_Oper,_Dom> _Base; │ │ │ │ +649 typedef typename _Base::value_type value_type; │ │ │ │ +650 │ │ │ │ +651 _BinClos(const _Dom& __e1, const _Tp& __e2) : _Base(__e1, __e2) {} │ │ │ │ +652 }; │ │ │ │ +653 │ │ │ │ +654 template │ │ │ │ +655 struct _BinClos<_Oper, _Constant, _Expr, typename _Dom::value_type, _Dom> │ │ │ │ +656 : _BinBase1<_Oper, _Dom> │ │ │ │ +657 { │ │ │ │ +658 typedef typename _Dom::value_type _Tp; │ │ │ │ +659 typedef _BinBase1<_Oper, _Dom> _Base; │ │ │ │ +660 typedef typename _Base::value_type value_type; │ │ │ │ +661 │ │ │ │ +662 _BinClos(const _Tp& __e1, const _Dom& __e2) : _Base(__e1, __e2) {} │ │ │ │ +663 }; │ │ │ │ +664 │ │ │ │ +665 template │ │ │ │ +666 struct _BinClos<_Oper, _ValArray, _Constant, _Tp, _Tp> │ │ │ │ +667 : _BinBase2<_Oper, valarray<_Tp> > │ │ │ │ +668 { │ │ │ │ +669 typedef _BinBase2<_Oper,valarray<_Tp> > _Base; │ │ │ │ +670 typedef typename _Base::value_type value_type; │ │ │ │ +671 │ │ │ │ +672 _BinClos(const valarray<_Tp>& __v, const _Tp& __t) : _Base(__v, __t) {} │ │ │ │ +673 }; │ │ │ │ +674 │ │ │ │ +675 template │ │ │ │ +676 struct _BinClos<_Oper, _Constant, _ValArray, _Tp, _Tp> │ │ │ │ +677 : _BinBase1<_Oper, valarray<_Tp> > │ │ │ │ +678 { │ │ │ │ +679 typedef _BinBase1<_Oper, valarray<_Tp> > _Base; │ │ │ │ +680 typedef typename _Base::value_type value_type; │ │ │ │ +681 │ │ │ │ +682 _BinClos(const _Tp& __t, const valarray<_Tp>& __v) : _Base(__t, __v) {} │ │ │ │ +683 }; │ │ │ │ +684 │ │ │ │ +685 // │ │ │ │ +686 // slice_array closure. │ │ │ │ +687 // │ │ │ │ +688 template │ │ │ │ +689 class _SBase │ │ │ │ +690 { │ │ │ │ +691 public: │ │ │ │ +692 typedef typename _Dom::value_type value_type; │ │ │ │ +693 │ │ │ │ +694 _SBase (const _Dom& __e, const slice& __s) │ │ │ │ +695 : _M_expr (__e), _M_slice (__s) {} │ │ │ │ +696 │ │ │ │ +697 value_type │ │ │ │ +698 operator[] (size_t __i) const │ │ │ │ +699 { return _M_expr[_M_slice.start () + __i * _M_slice.stride ()]; } │ │ │ │ +700 │ │ │ │ +701 size_t │ │ │ │ +702 size() const │ │ │ │ +703 { return _M_slice.size (); } │ │ │ │ +704 │ │ │ │ +705 private: │ │ │ │ +706 typename _ValArrayRef<_Dom>::__type _M_expr; │ │ │ │ +707 const slice& _M_slice; │ │ │ │ +708 }; │ │ │ │ +709 │ │ │ │ +710 template │ │ │ │ +711 class _SBase<_Array<_Tp> > │ │ │ │ +712 { │ │ │ │ +713 public: │ │ │ │ +714 typedef _Tp value_type; │ │ │ │ +715 │ │ │ │ +716 _SBase (_Array<_Tp> __a, const slice& __s) │ │ │ │ +717 : _M_array (__a._M_data+__s.start()), _M_size (__s.size()), │ │ │ │ +718 _M_stride (__s.stride()) {} │ │ │ │ +719 │ │ │ │ +720 value_type │ │ │ │ +721 operator[] (size_t __i) const │ │ │ │ +722 { return _M_array._M_data[__i * _M_stride]; } │ │ │ │ +723 │ │ │ │ +724 size_t │ │ │ │ +725 size() const │ │ │ │ +726 { return _M_size; } │ │ │ │ +727 │ │ │ │ +728 private: │ │ │ │ +729 const _Array<_Tp> _M_array; │ │ │ │ +730 const size_t _M_size; │ │ │ │ +731 const size_t _M_stride; │ │ │ │ +732 }; │ │ │ │ +733 │ │ │ │ +734 template │ │ │ │ +735 struct _SClos<_Expr, _Dom> │ │ │ │ +736 : _SBase<_Dom> │ │ │ │ +737 { │ │ │ │ +738 typedef _SBase<_Dom> _Base; │ │ │ │ +739 typedef typename _Base::value_type value_type; │ │ │ │ +740 │ │ │ │ +741 _SClos (const _Dom& __e, const slice& __s) : _Base (__e, __s) {} │ │ │ │ +742 }; │ │ │ │ +743 │ │ │ │ +744 template │ │ │ │ +745 struct _SClos<_ValArray, _Tp> │ │ │ │ +746 : _SBase<_Array<_Tp> > │ │ │ │ +747 { │ │ │ │ +748 typedef _SBase<_Array<_Tp> > _Base; │ │ │ │ +749 typedef _Tp value_type; │ │ │ │ +750 │ │ │ │ +751 _SClos (_Array<_Tp> __a, const slice& __s) : _Base (__a, __s) {} │ │ │ │ +752 }; │ │ │ │ +753} // namespace __detail │ │ │ │ +754 │ │ │ │ +755_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ +756} // namespace │ │ │ │ +757 │ │ │ │ +758#endif /* _CPP_VALARRAY_BEFORE_H */ │ │ │ │ +_s_l_i_c_e___a_r_r_a_y_._h │ │ │ │ +_s_t_d_:_:_l_o_g_1_0 │ │ │ │ +complex< _Tp > log10(const complex< _Tp > &) │ │ │ │ +Return complex base 10 logarithm of z. │ │ │ │ +DDeeffiinniittiioonn _c_o_m_p_l_e_x_:_8_2_9 │ │ │ │ +_s_t_d_:_:_s_i_n │ │ │ │ +complex< _Tp > sin(const complex< _Tp > &) │ │ │ │ +Return complex sine of z. │ │ │ │ +DDeeffiinniittiioonn _c_o_m_p_l_e_x_:_8_5_9 │ │ │ │ +_s_t_d_:_:_l_o_g │ │ │ │ +complex< _Tp > log(const complex< _Tp > &) │ │ │ │ +Return complex natural logarithm of z. │ │ │ │ +DDeeffiinniittiioonn _c_o_m_p_l_e_x_:_8_2_4 │ │ │ │ +_s_t_d_:_:_t_a_n │ │ │ │ +complex< _Tp > tan(const complex< _Tp > &) │ │ │ │ +Return complex tangent of z. │ │ │ │ +DDeeffiinniittiioonn _c_o_m_p_l_e_x_:_9_6_0 │ │ │ │ +_s_t_d_:_:_a_b_s │ │ │ │ +_Tp abs(const complex< _Tp > &) │ │ │ │ +Return magnitude of z. │ │ │ │ +DDeeffiinniittiioonn _c_o_m_p_l_e_x_:_6_3_0 │ │ │ │ +_s_t_d_:_:_e_x_p │ │ │ │ +complex< _Tp > exp(const complex< _Tp > &) │ │ │ │ +Return complex base e exponential of z. │ │ │ │ +DDeeffiinniittiioonn _c_o_m_p_l_e_x_:_7_9_7 │ │ │ │ +_s_t_d_:_:_c_o_s_h │ │ │ │ +complex< _Tp > cosh(const complex< _Tp > &) │ │ │ │ +Return complex hyperbolic cosine of z. │ │ │ │ +DDeeffiinniittiioonn _c_o_m_p_l_e_x_:_7_7_1 │ │ │ │ +_s_t_d_:_:_t_a_n_h │ │ │ │ +complex< _Tp > tanh(const complex< _Tp > &) │ │ │ │ +Return complex hyperbolic tangent of z. │ │ │ │ +DDeeffiinniittiioonn _c_o_m_p_l_e_x_:_9_8_8 │ │ │ │ +_s_t_d_:_:_p_o_w │ │ │ │ +complex< _Tp > pow(const complex< _Tp > &, int) │ │ │ │ +Return x to the y'th power. │ │ │ │ +DDeeffiinniittiioonn _c_o_m_p_l_e_x_:_1_0_1_9 │ │ │ │ +_s_t_d_:_:_s_i_n_h │ │ │ │ +complex< _Tp > sinh(const complex< _Tp > &) │ │ │ │ +Return complex hyperbolic sine of z. │ │ │ │ +DDeeffiinniittiioonn _c_o_m_p_l_e_x_:_8_8_9 │ │ │ │ +_s_t_d_:_:_c_o_s │ │ │ │ +complex< _Tp > cos(const complex< _Tp > &) │ │ │ │ +Return complex cosine of z. │ │ │ │ +DDeeffiinniittiioonn _c_o_m_p_l_e_x_:_7_4_1 │ │ │ │ +_s_t_d_:_:_s_q_r_t │ │ │ │ +complex< _Tp > sqrt(const complex< _Tp > &) │ │ │ │ +Return complex square root of z. │ │ │ │ +DDeeffiinniittiioonn _c_o_m_p_l_e_x_:_9_3_3 │ │ │ │ _s_t_d │ │ │ │ ISO C++ entities toplevel namespace is std. │ │ │ │ * _b_i_t_s │ │ │ │ - * _h_a_s_h___b_y_t_e_s_._h │ │ │ │ + * _v_a_l_a_r_r_a_y___b_e_f_o_r_e_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-12-base/libstdc++/user/a00332.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: exception_ptr.h File Reference │ │ │ +libstdc++: stl_stack.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -48,67 +48,71 @@ │ │ │ /* @license-end */ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces | │ │ │ -Macros | │ │ │ Functions
│ │ │ -
exception_ptr.h File Reference
│ │ │ +
stl_stack.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ - │ │ │ + │ │ │ │ │ │

│ │ │ Classes

class  std::__exception_ptr::exception_ptr
class  std::stack< _Tp, _Sequence >
 
│ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Namespaces

namespace  std
 
│ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ Functions

exception_ptr std::current_exception () noexcept
 
template<typename _Ex >
exception_ptr std::make_exception_ptr (_Ex __ex) noexcept
 
void std::rethrow_exception (exception_ptr)
 
template<typename _Tp , typename _Seq >
bool std::operator!= (const stack< _Tp, _Seq > &__x, const stack< _Tp, _Seq > &__y)
 
template<typename _Tp , typename _Seq >
bool std::operator< (const stack< _Tp, _Seq > &__x, const stack< _Tp, _Seq > &__y)
 
template<typename _Tp , typename _Seq >
bool std::operator<= (const stack< _Tp, _Seq > &__x, const stack< _Tp, _Seq > &__y)
 
template<typename _Tp , typename _Seq >
bool std::operator== (const stack< _Tp, _Seq > &__x, const stack< _Tp, _Seq > &__y)
 
template<typename _Tp , typename _Seq >
bool std::operator> (const stack< _Tp, _Seq > &__x, const stack< _Tp, _Seq > &__y)
 
template<typename _Tp , typename _Seq >
bool std::operator>= (const stack< _Tp, _Seq > &__x, const stack< _Tp, _Seq > &__y)
 
│ │ │ +template<typename _Container , typename = _RequireNotAllocator<_Container>>
 std::stack (_Container) -> stack< typename _Container::value_type, _Container >
 
│ │ │ +template<typename _Container , typename _Allocator , typename = _RequireNotAllocator<_Container>>
 std::stack (_Container, _Allocator) -> stack< typename _Container::value_type, _Container >
 
template<typename _Tp , typename _Seq >
enable_if< __is_swappable< _Seq >::value >::type std::swap (stack< _Tp, _Seq > &__x, stack< _Tp, _Seq > &__y) noexcept(noexcept(__x.swap(__y)))
 
│ │ │

Detailed Description

│ │ │ -

This is an internal header file, included by other library headers. Do not attempt to use it directly. Instead, include <exception>.

│ │ │ +

This is an internal header file, included by other library headers. Do not attempt to use it directly. Instead, include <stack>.

│ │ │ │ │ │ -

Definition in file exception_ptr.h.

│ │ │ -

Macro Definition Documentation

│ │ │ - │ │ │ -

◆ _GLIBCXX_EH_PTR_USED

│ │ │ - │ │ │ -
│ │ │ -
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
#define _GLIBCXX_EH_PTR_USED
│ │ │ -
│ │ │ - │ │ │ -

Definition at line 49 of file exception_ptr.h.

│ │ │ - │ │ │ -
│ │ │ -
│ │ │ -
│ │ │ +

Definition in file stl_stack.h.

│ │ │ +
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,29 +1,58 @@ │ │ │ │ libstdc++ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _M_a_c_r_o_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -exception_ptr.h File Reference │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ +stl_stack.h File Reference │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ CCllaasssseess │ │ │ │ -class   _s_t_d_:_:_____e_x_c_e_p_t_i_o_n___p_t_r_:_:_e_x_c_e_p_t_i_o_n___p_t_r │ │ │ │ +class   _s_t_d_:_:_s_t_a_c_k_<_ ___T_p_,_ ___S_e_q_u_e_n_c_e_ _> │ │ │ │   │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _s_t_d │ │ │ │   │ │ │ │ FFuunnccttiioonnss │ │ │ │ -_e_x_c_e_p_t_i_o_n___p_t_r  _s_t_d_:_:_c_u_r_r_e_n_t___e_x_c_e_p_t_i_o_n () noexcept │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___S_e_q > │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_!_= (const _s_t_a_c_k< _Tp, ___S_e_q │ │ │ │ + > &__x, const _s_t_a_c_k< _Tp, ___S_e_q > &__y) │ │ │ │   │ │ │ │ -template<_t_y_p_e_n_a_m_e ___E_x > │ │ │ │ -_e_x_c_e_p_t_i_o_n___p_t_r  _s_t_d_:_:_m_a_k_e___e_x_c_e_p_t_i_o_n___p_t_r (___E_x _____e_x) noexcept │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___S_e_q > │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_< (const _s_t_a_c_k< _Tp, ___S_e_q > │ │ │ │ + &__x, const _s_t_a_c_k< _Tp, ___S_e_q > &__y) │ │ │ │   │ │ │ │ - _v_o_i_d  _s_t_d_:_:_r_e_t_h_r_o_w___e_x_c_e_p_t_i_o_n (_e_x_c_e_p_t_i_o_n___p_t_r) │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___S_e_q > │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_<_= (const _s_t_a_c_k< _Tp, ___S_e_q │ │ │ │ + > &__x, const _s_t_a_c_k< _Tp, ___S_e_q > &__y) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___S_e_q > │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_=_= (const _s_t_a_c_k< _Tp, ___S_e_q │ │ │ │ + > &__x, const _s_t_a_c_k< _Tp, ___S_e_q > &__y) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___S_e_q > │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_> (const _s_t_a_c_k< _Tp, ___S_e_q > │ │ │ │ + &__x, const _s_t_a_c_k< _Tp, ___S_e_q > &__y) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___S_e_q > │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_>_= (const _s_t_a_c_k< _Tp, ___S_e_q │ │ │ │ + > &__x, const _s_t_a_c_k< _Tp, ___S_e_q > &__y) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Container , _t_y_p_e_n_a_m_e = _RequireNotAllocator<_Container>> │ │ │ │ +   ssttdd::::ssttaacckk (_Container) -> _s_t_a_c_k< │ │ │ │ + _t_y_p_e_n_a_m_e _Container::value_type, │ │ │ │ + _Container > │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Container , _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r , _t_y_p_e_n_a_m_e = │ │ │ │ +_RequireNotAllocator<_Container>> │ │ │ │ +   ssttdd::::ssttaacckk (_Container, ___A_l_l_o_c_a_t_o_r) - │ │ │ │ + > _s_t_a_c_k< _t_y_p_e_n_a_m_e _Container:: │ │ │ │ + value_type, _Container > │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___S_e_q > │ │ │ │ +_e_n_a_b_l_e___i_f< _____i_s___s_w_a_p_p_a_b_l_e< ___S_e_q >:: _s_t_d_:_:_s_w_a_p (_s_t_a_c_k< _Tp, ___S_e_q > &__x, │ │ │ │ + value >::type  _s_t_a_c_k< _Tp, ___S_e_q > &__y) noexcept │ │ │ │ + (noexcept(__x.swap(__y))) │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ This is an internal header file, included by other library headers. Do not │ │ │ │ -attempt to use it directly. Instead, include . │ │ │ │ -Definition in file _e_x_c_e_p_t_i_o_n___p_t_r_._h. │ │ │ │ -********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ -********** _?◆_? __GGLLIIBBCCXXXX__EEHH__PPTTRR__UUSSEEDD ********** │ │ │ │ -#define _GLIBCXX_EH_PTR_USED │ │ │ │ -Definition at line _4_9 of file _e_x_c_e_p_t_i_o_n___p_t_r_._h. │ │ │ │ +attempt to use it directly. Instead, include . │ │ │ │ +Definition in file _s_t_l___s_t_a_c_k_._h. │ │ │ │ * _b_i_t_s │ │ │ │ - * _e_x_c_e_p_t_i_o_n___p_t_r_._h │ │ │ │ + * _s_t_l___s_t_a_c_k_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-12-base/libstdc++/user/a00332.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,5 +1,8 @@ │ │ │ │ var a00332 = [ │ │ │ │ - ["current_exception", "a00332.html#ga02cdcc517fefe661313437aa9356a28f", null], │ │ │ │ - ["make_exception_ptr", "a00332.html#ga200c1d3152b2fd43b206da6c031b9730", null], │ │ │ │ - ["rethrow_exception", "a00332.html#ga3d868a099252fe5a49e09b53b2d403cc", null] │ │ │ │ + ["operator!=", "a00332.html#a481ee02f06a7c42bd2762516975d7082", null], │ │ │ │ + ["operator<", "a00332.html#a53d215eee36632ee43c5039c54d648ae", null], │ │ │ │ + ["operator<=", "a00332.html#a930dd0467ade4b159f585b09a918c395", null], │ │ │ │ + ["operator==", "a00332.html#a05fbef1e7e15558f5933ed15a339e97d", null], │ │ │ │ + ["operator>", "a00332.html#a886fc839debeebe4e1453774a028d1e3", null], │ │ │ │ + ["operator>=", "a00332.html#a11bb9b3800196c309babae27f4b4a900", null] │ │ │ │ ]; │ │ ├── ./usr/share/doc/gcc-12-base/libstdc++/user/a00332_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: exception_ptr.h Source File │ │ │ +libstdc++: stl_stack.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -45,327 +45,499 @@ │ │ │ │ │ │
│ │ │
│ │ │ -
exception_ptr.h
│ │ │ +
stl_stack.h
│ │ │
│ │ │
│ │ │ -Go to the documentation of this file.
1// Exception Handling support header (exception_ptr class) for -*- C++ -*-
│ │ │ +Go to the documentation of this file.
1// Stack implementation -*- C++ -*-
│ │ │
2
│ │ │ -
3// Copyright (C) 2008-2022 Free Software Foundation, Inc.
│ │ │ +
3// Copyright (C) 2001-2022 Free Software Foundation, Inc.
│ │ │
4//
│ │ │ -
5// This file is part of GCC.
│ │ │ -
6//
│ │ │ -
7// GCC is free software; you can redistribute it and/or modify
│ │ │ -
8// it under the terms of the GNU General Public License as published by
│ │ │ -
9// the Free Software Foundation; either version 3, or (at your option)
│ │ │ -
10// any later version.
│ │ │ -
11//
│ │ │ -
12// GCC is distributed in the hope that it will be useful,
│ │ │ -
13// but WITHOUT ANY WARRANTY; without even the implied warranty of
│ │ │ -
14// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
│ │ │ -
15// GNU General Public License for more details.
│ │ │ -
16//
│ │ │ -
17// Under Section 7 of GPL version 3, you are granted additional
│ │ │ -
18// permissions described in the GCC Runtime Library Exception, version
│ │ │ -
19// 3.1, as published by the Free Software Foundation.
│ │ │ -
20
│ │ │ -
21// You should have received a copy of the GNU General Public License and
│ │ │ -
22// a copy of the GCC Runtime Library Exception along with this program;
│ │ │ -
23// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
│ │ │ -
24// <http://www.gnu.org/licenses/>.
│ │ │ -
25
│ │ │ -
26/** @file bits/exception_ptr.h
│ │ │ -
27 * This is an internal header file, included by other library headers.
│ │ │ -
28 * Do not attempt to use it directly. @headername{exception}
│ │ │ -
29 */
│ │ │ -
30
│ │ │ -
31#ifndef _EXCEPTION_PTR_H
│ │ │ -
32#define _EXCEPTION_PTR_H
│ │ │ -
33
│ │ │ -
34#pragma GCC visibility push(default)
│ │ │ -
35
│ │ │ -
36#include <bits/c++config.h>
│ │ │ - │ │ │ - │ │ │ -
39#include <typeinfo>
│ │ │ -
40#include <new>
│ │ │ -
41
│ │ │ -
42#if __cplusplus >= 201103L
│ │ │ -
43# include <bits/move.h>
│ │ │ -
44#endif
│ │ │ -
45
│ │ │ -
46#ifdef _GLIBCXX_EH_PTR_RELOPS_COMPAT
│ │ │ -
47# define _GLIBCXX_EH_PTR_USED __attribute__((__used__))
│ │ │ -
48#else
│ │ │ -
49# define _GLIBCXX_EH_PTR_USED
│ │ │ -
50#endif
│ │ │ -
51
│ │ │ -
52extern "C++" {
│ │ │ -
53
│ │ │ -
54namespace std
│ │ │ -
55{
│ │ │ -
56 class type_info;
│ │ │ -
57
│ │ │ -
58 /**
│ │ │ -
59 * @addtogroup exceptions
│ │ │ -
60 * @{
│ │ │ -
61 */
│ │ │ -
62
│ │ │ -
63 namespace __exception_ptr
│ │ │ -
64 {
│ │ │ -
65 class exception_ptr;
│ │ │ -
66 }
│ │ │ -
67
│ │ │ -
68 using __exception_ptr::exception_ptr;
│ │ │ -
69
│ │ │ -
70 /** Obtain an exception_ptr to the currently handled exception. If there
│ │ │ -
71 * is none, or the currently handled exception is foreign, return the null
│ │ │ -
72 * value.
│ │ │ -
73 */
│ │ │ - │ │ │ -
75
│ │ │ - │ │ │ - │ │ │ -
78
│ │ │ -
79 /// Throw the object pointed to by the exception_ptr.
│ │ │ -
80 void rethrow_exception(exception_ptr) __attribute__ ((__noreturn__));
│ │ │ -
81
│ │ │ -
82 namespace __exception_ptr
│ │ │ -
83 {
│ │ │ - │ │ │ -
85
│ │ │ -
86 /**
│ │ │ -
87 * @brief An opaque pointer to an arbitrary exception.
│ │ │ -
88 * @ingroup exceptions
│ │ │ -
89 */
│ │ │ -
│ │ │ - │ │ │ -
91 {
│ │ │ -
92 void* _M_exception_object;
│ │ │ -
93
│ │ │ -
94 explicit exception_ptr(void* __e) _GLIBCXX_USE_NOEXCEPT;
│ │ │ -
95
│ │ │ -
96 void _M_addref() _GLIBCXX_USE_NOEXCEPT;
│ │ │ -
97 void _M_release() _GLIBCXX_USE_NOEXCEPT;
│ │ │ -
98
│ │ │ -
99 void *_M_get() const _GLIBCXX_NOEXCEPT __attribute__ ((__pure__));
│ │ │ -
100
│ │ │ - │ │ │ - │ │ │ -
103 template<typename _Ex>
│ │ │ - │ │ │ -
105
│ │ │ -
106 public:
│ │ │ - │ │ │ -
108
│ │ │ - │ │ │ +
5// This file is part of the GNU ISO C++ Library. This library is free
│ │ │ +
6// software; you can redistribute it and/or modify it under the
│ │ │ +
7// terms of the GNU General Public License as published by the
│ │ │ +
8// Free Software Foundation; either version 3, or (at your option)
│ │ │ +
9// any later version.
│ │ │ +
10
│ │ │ +
11// This library is distributed in the hope that it will be useful,
│ │ │ +
12// but WITHOUT ANY WARRANTY; without even the implied warranty of
│ │ │ +
13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
│ │ │ +
14// GNU General Public License for more details.
│ │ │ +
15
│ │ │ +
16// Under Section 7 of GPL version 3, you are granted additional
│ │ │ +
17// permissions described in the GCC Runtime Library Exception, version
│ │ │ +
18// 3.1, as published by the Free Software Foundation.
│ │ │ +
19
│ │ │ +
20// You should have received a copy of the GNU General Public License and
│ │ │ +
21// a copy of the GCC Runtime Library Exception along with this program;
│ │ │ +
22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
│ │ │ +
23// <http://www.gnu.org/licenses/>.
│ │ │ +
24
│ │ │ +
25/*
│ │ │ +
26 *
│ │ │ +
27 * Copyright (c) 1994
│ │ │ +
28 * Hewlett-Packard Company
│ │ │ +
29 *
│ │ │ +
30 * Permission to use, copy, modify, distribute and sell this software
│ │ │ +
31 * and its documentation for any purpose is hereby granted without fee,
│ │ │ +
32 * provided that the above copyright notice appear in all copies and
│ │ │ +
33 * that both that copyright notice and this permission notice appear
│ │ │ +
34 * in supporting documentation. Hewlett-Packard Company makes no
│ │ │ +
35 * representations about the suitability of this software for any
│ │ │ +
36 * purpose. It is provided "as is" without express or implied warranty.
│ │ │ +
37 *
│ │ │ +
38 *
│ │ │ +
39 * Copyright (c) 1996,1997
│ │ │ +
40 * Silicon Graphics Computer Systems, Inc.
│ │ │ +
41 *
│ │ │ +
42 * Permission to use, copy, modify, distribute and sell this software
│ │ │ +
43 * and its documentation for any purpose is hereby granted without fee,
│ │ │ +
44 * provided that the above copyright notice appear in all copies and
│ │ │ +
45 * that both that copyright notice and this permission notice appear
│ │ │ +
46 * in supporting documentation. Silicon Graphics makes no
│ │ │ +
47 * representations about the suitability of this software for any
│ │ │ +
48 * purpose. It is provided "as is" without express or implied warranty.
│ │ │ +
49 */
│ │ │ +
50
│ │ │ +
51/** @file bits/stl_stack.h
│ │ │ +
52 * This is an internal header file, included by other library headers.
│ │ │ +
53 * Do not attempt to use it directly. @headername{stack}
│ │ │ +
54 */
│ │ │ +
55
│ │ │ +
56#ifndef _STL_STACK_H
│ │ │ +
57#define _STL_STACK_H 1
│ │ │ +
58
│ │ │ +
59#include <bits/concept_check.h>
│ │ │ +
60#include <debug/debug.h>
│ │ │ +
61#if __cplusplus >= 201103L
│ │ │ +
62# include <bits/uses_allocator.h>
│ │ │ +
63#endif
│ │ │ +
64
│ │ │ +
65namespace std _GLIBCXX_VISIBILITY(default)
│ │ │ +
66{
│ │ │ +
67_GLIBCXX_BEGIN_NAMESPACE_VERSION
│ │ │ +
68
│ │ │ +
69 /**
│ │ │ +
70 * @brief A standard container giving FILO behavior.
│ │ │ +
71 *
│ │ │ +
72 * @ingroup sequences
│ │ │ +
73 *
│ │ │ +
74 * @tparam _Tp Type of element.
│ │ │ +
75 * @tparam _Sequence Type of underlying sequence, defaults to deque<_Tp>.
│ │ │ +
76 *
│ │ │ +
77 * Meets many of the requirements of a
│ │ │ +
78 * <a href="tables.html#65">container</a>,
│ │ │ +
79 * but does not define anything to do with iterators. Very few of the
│ │ │ +
80 * other standard container interfaces are defined.
│ │ │ +
81 *
│ │ │ +
82 * This is not a true container, but an @e adaptor. It holds
│ │ │ +
83 * another container, and provides a wrapper interface to that
│ │ │ +
84 * container. The wrapper is what enforces strict
│ │ │ +
85 * first-in-last-out %stack behavior.
│ │ │ +
86 *
│ │ │ +
87 * The second template parameter defines the type of the underlying
│ │ │ +
88 * sequence/container. It defaults to std::deque, but it can be
│ │ │ +
89 * any type that supports @c back, @c push_back, and @c pop_back,
│ │ │ +
90 * such as std::list, std::vector, or an appropriate user-defined
│ │ │ +
91 * type.
│ │ │ +
92 *
│ │ │ +
93 * Members not found in @a normal containers are @c container_type,
│ │ │ +
94 * which is a typedef for the second Sequence parameter, and @c
│ │ │ +
95 * push, @c pop, and @c top, which are standard %stack/FILO
│ │ │ +
96 * operations.
│ │ │ +
97 */
│ │ │ +
98 template<typename _Tp, typename _Sequence = deque<_Tp> >
│ │ │ +
│ │ │ +
99 class stack
│ │ │ +
100 {
│ │ │ +
101#ifdef _GLIBCXX_CONCEPT_CHECKS
│ │ │ +
102 // concept requirements
│ │ │ +
103 typedef typename _Sequence::value_type _Sequence_value_type;
│ │ │ +
104# if __cplusplus < 201103L
│ │ │ +
105 __glibcxx_class_requires(_Tp, _SGIAssignableConcept)
│ │ │ +
106 __glibcxx_class_requires(_Sequence, _BackInsertionSequenceConcept)
│ │ │ +
107# endif
│ │ │ +
108 __glibcxx_class_requires2(_Tp, _Sequence_value_type, _SameTypeConcept)
│ │ │ +
109#endif
│ │ │
110
│ │ │ -
111#if __cplusplus >= 201103L
│ │ │ -
112 exception_ptr(nullptr_t) noexcept
│ │ │ -
113 : _M_exception_object(nullptr)
│ │ │ -
114 { }
│ │ │ -
115
│ │ │ - │ │ │ -
117 : _M_exception_object(__o._M_exception_object)
│ │ │ -
118 { __o._M_exception_object = nullptr; }
│ │ │ -
119#endif
│ │ │ -
120
│ │ │ -
121#if (__cplusplus < 201103L) || defined (_GLIBCXX_EH_PTR_COMPAT)
│ │ │ -
122 typedef void (exception_ptr::*__safe_bool)();
│ │ │ -
123
│ │ │ -
124 // For construction from nullptr or 0.
│ │ │ - │ │ │ -
126#endif
│ │ │ -
127
│ │ │ - │ │ │ -
129 operator=(const exception_ptr&) _GLIBCXX_USE_NOEXCEPT;
│ │ │ -
130
│ │ │ -
131#if __cplusplus >= 201103L
│ │ │ - │ │ │ -
133 operator=(exception_ptr&& __o) noexcept
│ │ │ -
134 {
│ │ │ -
135 exception_ptr(static_cast<exception_ptr&&>(__o)).swap(*this);
│ │ │ -
136 return *this;
│ │ │ -
137 }
│ │ │ -
138#endif
│ │ │ -
139
│ │ │ - │ │ │ -
141
│ │ │ -
142 void
│ │ │ - │ │ │ -
144
│ │ │ -
145#ifdef _GLIBCXX_EH_PTR_COMPAT
│ │ │ -
146 // Retained for compatibility with CXXABI_1.3.
│ │ │ - │ │ │ - │ │ │ -
149 bool operator!() const _GLIBCXX_USE_NOEXCEPT
│ │ │ - │ │ │ -
151 operator __safe_bool() const _GLIBCXX_USE_NOEXCEPT;
│ │ │ -
152#endif
│ │ │ -
153
│ │ │ -
154#if __cplusplus >= 201103L
│ │ │ -
155 explicit operator bool() const noexcept
│ │ │ -
156 { return _M_exception_object; }
│ │ │ -
157#endif
│ │ │ -
158
│ │ │ -
159#if __cpp_impl_three_way_comparison >= 201907L \
│ │ │ -
160 && ! defined _GLIBCXX_EH_PTR_RELOPS_COMPAT
│ │ │ -
161 friend bool
│ │ │ -
162 operator==(const exception_ptr&, const exception_ptr&) noexcept = default;
│ │ │ -
163#else
│ │ │ -
164 friend _GLIBCXX_EH_PTR_USED bool
│ │ │ -
165 operator==(const exception_ptr& __x, const exception_ptr& __y)
│ │ │ - │ │ │ -
167 { return __x._M_exception_object == __y._M_exception_object; }
│ │ │ +
111 template<typename _Tp1, typename _Seq1>
│ │ │ +
112 friend bool
│ │ │ +
113 operator==(const stack<_Tp1, _Seq1>&, const stack<_Tp1, _Seq1>&);
│ │ │ +
114
│ │ │ +
115 template<typename _Tp1, typename _Seq1>
│ │ │ +
116 friend bool
│ │ │ +
117 operator<(const stack<_Tp1, _Seq1>&, const stack<_Tp1, _Seq1>&);
│ │ │ +
118
│ │ │ +
119#if __cpp_lib_three_way_comparison
│ │ │ +
120 template<typename _Tp1, three_way_comparable _Seq1>
│ │ │ + │ │ │ +
122 operator<=>(const stack<_Tp1, _Seq1>&, const stack<_Tp1, _Seq1>&);
│ │ │ +
123#endif
│ │ │ +
124
│ │ │ +
125#if __cplusplus >= 201103L
│ │ │ +
126 template<typename _Alloc>
│ │ │ +
127 using _Uses = typename
│ │ │ + │ │ │ +
129
│ │ │ +
130#if __cplusplus >= 201703L
│ │ │ +
131 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ +
132 // 2566. Requirements on the first template parameter of container
│ │ │ +
133 // adaptors
│ │ │ + │ │ │ +
135 "value_type must be the same as the underlying container");
│ │ │ +
136#endif // C++17
│ │ │ +
137#endif // C++11
│ │ │ +
138
│ │ │ +
139 public:
│ │ │ +
140 typedef typename _Sequence::value_type value_type;
│ │ │ +
141 typedef typename _Sequence::reference reference;
│ │ │ +
142 typedef typename _Sequence::const_reference const_reference;
│ │ │ +
143 typedef typename _Sequence::size_type size_type;
│ │ │ +
144 typedef _Sequence container_type;
│ │ │ +
145
│ │ │ +
146 protected:
│ │ │ +
147 // See queue::c for notes on this name.
│ │ │ +
148 _Sequence c;
│ │ │ +
149
│ │ │ +
150 public:
│ │ │ +
151 // XXX removed old def ctor, added def arg to this one to match 14882
│ │ │ +
152 /**
│ │ │ +
153 * @brief Default constructor creates no elements.
│ │ │ +
154 */
│ │ │ +
155#if __cplusplus < 201103L
│ │ │ +
156 explicit
│ │ │ +
157 stack(const _Sequence& __c = _Sequence())
│ │ │ +
158 : c(__c) { }
│ │ │ +
159#else
│ │ │ +
160 template<typename _Seq = _Sequence, typename _Requires = typename
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
163 : c() { }
│ │ │ +
│ │ │ +
164
│ │ │ +
165 explicit
│ │ │ +
166 stack(const _Sequence& __c)
│ │ │ +
167 : c(__c) { }
│ │ │
168
│ │ │ -
169 friend _GLIBCXX_EH_PTR_USED bool
│ │ │ -
170 operator!=(const exception_ptr& __x, const exception_ptr& __y)
│ │ │ - │ │ │ -
172 { return __x._M_exception_object != __y._M_exception_object; }
│ │ │ -
173#endif
│ │ │ -
174
│ │ │ -
175 const class std::type_info*
│ │ │ -
176 __cxa_exception_type() const _GLIBCXX_USE_NOEXCEPT
│ │ │ - │ │ │ -
178 };
│ │ │ -
│ │ │ -
179
│ │ │ -
180 _GLIBCXX_EH_PTR_USED
│ │ │ -
181 inline
│ │ │ -
182 exception_ptr::exception_ptr() _GLIBCXX_USE_NOEXCEPT
│ │ │ -
183 : _M_exception_object(0)
│ │ │ -
184 { }
│ │ │ -
185
│ │ │ -
186 _GLIBCXX_EH_PTR_USED
│ │ │ -
187 inline
│ │ │ -
188 exception_ptr::exception_ptr(const exception_ptr& __other)
│ │ │ - │ │ │ -
190 : _M_exception_object(__other._M_exception_object)
│ │ │ -
191 {
│ │ │ -
192 if (_M_exception_object)
│ │ │ -
193 _M_addref();
│ │ │ -
194 }
│ │ │ +
169 explicit
│ │ │ +
170 stack(_Sequence&& __c)
│ │ │ +
171 : c(std::move(__c)) { }
│ │ │ +
172
│ │ │ +
173#if __cplusplus > 202002L
│ │ │ +
174#define __cpp_lib_adaptor_iterator_pair_constructor 202106L
│ │ │ +
175
│ │ │ +
176 template<typename _InputIterator,
│ │ │ +
177 typename = _RequireInputIter<_InputIterator>>
│ │ │ +
178 stack(_InputIterator __first, _InputIterator __last)
│ │ │ +
179 : c(__first, __last) { }
│ │ │ +
180#endif
│ │ │ +
181
│ │ │ +
182
│ │ │ +
183 template<typename _Alloc, typename _Requires = _Uses<_Alloc>>
│ │ │ +
184 explicit
│ │ │ +
185 stack(const _Alloc& __a)
│ │ │ +
186 : c(__a) { }
│ │ │ +
187
│ │ │ +
188 template<typename _Alloc, typename _Requires = _Uses<_Alloc>>
│ │ │ +
189 stack(const _Sequence& __c, const _Alloc& __a)
│ │ │ +
190 : c(__c, __a) { }
│ │ │ +
191
│ │ │ +
192 template<typename _Alloc, typename _Requires = _Uses<_Alloc>>
│ │ │ +
193 stack(_Sequence&& __c, const _Alloc& __a)
│ │ │ +
194 : c(std::move(__c), __a) { }
│ │ │
195
│ │ │ -
196 _GLIBCXX_EH_PTR_USED
│ │ │ -
197 inline
│ │ │ -
198 exception_ptr::~exception_ptr() _GLIBCXX_USE_NOEXCEPT
│ │ │ -
199 {
│ │ │ -
200 if (_M_exception_object)
│ │ │ -
201 _M_release();
│ │ │ -
202 }
│ │ │ +
196 template<typename _Alloc, typename _Requires = _Uses<_Alloc>>
│ │ │ +
197 stack(const stack& __q, const _Alloc& __a)
│ │ │ +
198 : c(__q.c, __a) { }
│ │ │ +
199
│ │ │ +
200 template<typename _Alloc, typename _Requires = _Uses<_Alloc>>
│ │ │ +
201 stack(stack&& __q, const _Alloc& __a)
│ │ │ +
202 : c(std::move(__q.c), __a) { }
│ │ │
203
│ │ │ -
204 _GLIBCXX_EH_PTR_USED
│ │ │ -
205 inline exception_ptr&
│ │ │ -
206 exception_ptr::operator=(const exception_ptr& __other) _GLIBCXX_USE_NOEXCEPT
│ │ │ -
207 {
│ │ │ -
208 exception_ptr(__other).swap(*this);
│ │ │ -
209 return *this;
│ │ │ -
210 }
│ │ │ -
211
│ │ │ -
212 _GLIBCXX_EH_PTR_USED
│ │ │ -
213 inline void
│ │ │ -
214 exception_ptr::swap(exception_ptr &__other) _GLIBCXX_USE_NOEXCEPT
│ │ │ -
215 {
│ │ │ -
216 void *__tmp = _M_exception_object;
│ │ │ -
217 _M_exception_object = __other._M_exception_object;
│ │ │ -
218 __other._M_exception_object = __tmp;
│ │ │ -
219 }
│ │ │ -
220
│ │ │ -
221 /// @relates exception_ptr
│ │ │ -
222 inline void
│ │ │ -
223 swap(exception_ptr& __lhs, exception_ptr& __rhs)
│ │ │ -
224 { __lhs.swap(__rhs); }
│ │ │ +
204#if __cplusplus > 202002L
│ │ │ +
205 template<typename _InputIterator, typename _Alloc,
│ │ │ +
206 typename = _RequireInputIter<_InputIterator>,
│ │ │ +
207 typename = _Uses<_Alloc>>
│ │ │ +
208 stack(_InputIterator __first, _InputIterator __last, const _Alloc& __a)
│ │ │ +
209 : c(__first, __last, __a) { }
│ │ │ +
210#endif
│ │ │ +
211#endif
│ │ │ +
212
│ │ │ +
213 /**
│ │ │ +
214 * Returns true if the %stack is empty.
│ │ │ +
215 */
│ │ │ +
216 _GLIBCXX_NODISCARD bool
│ │ │ +
│ │ │ +
217 empty() const
│ │ │ +
218 { return c.empty(); }
│ │ │ +
│ │ │ +
219
│ │ │ +
220 /** Returns the number of elements in the %stack. */
│ │ │ +
221 _GLIBCXX_NODISCARD
│ │ │ +
222 size_type
│ │ │ +
│ │ │ +
223 size() const
│ │ │ +
224 { return c.size(); }
│ │ │ +
│ │ │
225
│ │ │ -
226 /// @cond undocumented
│ │ │ -
227 template<typename _Ex>
│ │ │ -
228 _GLIBCXX_CDTOR_CALLABI
│ │ │ -
229 inline void
│ │ │ -
230 __dest_thunk(void* __x)
│ │ │ -
231 { static_cast<_Ex*>(__x)->~_Ex(); }
│ │ │ -
232 /// @endcond
│ │ │ -
233
│ │ │ -
234 } // namespace __exception_ptr
│ │ │ -
235
│ │ │ -
236 /// Obtain an exception_ptr pointing to a copy of the supplied object.
│ │ │ -
237#if (__cplusplus >= 201103L && __cpp_rtti) || __cpp_exceptions
│ │ │ -
238 template<typename _Ex>
│ │ │ -
239 exception_ptr
│ │ │ -
│ │ │ - │ │ │ -
241 {
│ │ │ -
242#if __cplusplus >= 201103L && __cpp_rtti
│ │ │ -
243 using _Ex2 = typename decay<_Ex>::type;
│ │ │ -
244 void* __e = __cxxabiv1::__cxa_allocate_exception(sizeof(_Ex));
│ │ │ -
245 (void) __cxxabiv1::__cxa_init_primary_exception(
│ │ │ -
246 __e, const_cast<std::type_info*>(&typeid(_Ex)),
│ │ │ -
247 __exception_ptr::__dest_thunk<_Ex2>);
│ │ │ -
248 __try
│ │ │ -
249 {
│ │ │ -
250 ::new (__e) _Ex2(__ex);
│ │ │ -
251 return exception_ptr(__e);
│ │ │ -
252 }
│ │ │ -
253 __catch(...)
│ │ │ -
254 {
│ │ │ -
255 __cxxabiv1::__cxa_free_exception(__e);
│ │ │ -
256 return current_exception();
│ │ │ -
257 }
│ │ │ -
258#else
│ │ │ -
259 try
│ │ │ -
260 {
│ │ │ -
261 throw __ex;
│ │ │ -
262 }
│ │ │ -
263 catch(...)
│ │ │ -
264 {
│ │ │ -
265 return current_exception();
│ │ │ -
266 }
│ │ │ -
267#endif
│ │ │ -
268 }
│ │ │ -
│ │ │ -
269#else // no RTTI and no exceptions
│ │ │ -
270 // This is always_inline so the linker will never use this useless definition
│ │ │ -
271 // instead of a working one compiled with RTTI and/or exceptions enabled.
│ │ │ -
272 template<typename _Ex>
│ │ │ -
273 __attribute__ ((__always_inline__))
│ │ │ -
274 inline exception_ptr
│ │ │ -
275 make_exception_ptr(_Ex) _GLIBCXX_USE_NOEXCEPT
│ │ │ -
276 { return exception_ptr(); }
│ │ │ -
277#endif
│ │ │ -
278
│ │ │ -
279#undef _GLIBCXX_EH_PTR_USED
│ │ │ +
226 /**
│ │ │ +
227 * Returns a read/write reference to the data at the first
│ │ │ +
228 * element of the %stack.
│ │ │ +
229 */
│ │ │ +
230 _GLIBCXX_NODISCARD
│ │ │ +
231 reference
│ │ │ +
│ │ │ + │ │ │ +
233 {
│ │ │ +
234 __glibcxx_requires_nonempty();
│ │ │ +
235 return c.back();
│ │ │ +
236 }
│ │ │ +
│ │ │ +
237
│ │ │ +
238 /**
│ │ │ +
239 * Returns a read-only (constant) reference to the data at the first
│ │ │ +
240 * element of the %stack.
│ │ │ +
241 */
│ │ │ +
242 _GLIBCXX_NODISCARD
│ │ │ +
243 const_reference
│ │ │ +
│ │ │ +
244 top() const
│ │ │ +
245 {
│ │ │ +
246 __glibcxx_requires_nonempty();
│ │ │ +
247 return c.back();
│ │ │ +
248 }
│ │ │ +
│ │ │ +
249
│ │ │ +
250 /**
│ │ │ +
251 * @brief Add data to the top of the %stack.
│ │ │ +
252 * @param __x Data to be added.
│ │ │ +
253 *
│ │ │ +
254 * This is a typical %stack operation. The function creates an
│ │ │ +
255 * element at the top of the %stack and assigns the given data
│ │ │ +
256 * to it. The time complexity of the operation depends on the
│ │ │ +
257 * underlying sequence.
│ │ │ +
258 */
│ │ │ +
259 void
│ │ │ +
│ │ │ +
260 push(const value_type& __x)
│ │ │ +
261 { c.push_back(__x); }
│ │ │ +
│ │ │ +
262
│ │ │ +
263#if __cplusplus >= 201103L
│ │ │ +
264 void
│ │ │ +
265 push(value_type&& __x)
│ │ │ +
266 { c.push_back(std::move(__x)); }
│ │ │ +
267
│ │ │ +
268#if __cplusplus > 201402L
│ │ │ +
269 template<typename... _Args>
│ │ │ +
270 decltype(auto)
│ │ │ +
271 emplace(_Args&&... __args)
│ │ │ +
272 { return c.emplace_back(std::forward<_Args>(__args)...); }
│ │ │ +
273#else
│ │ │ +
274 template<typename... _Args>
│ │ │ +
275 void
│ │ │ +
276 emplace(_Args&&... __args)
│ │ │ +
277 { c.emplace_back(std::forward<_Args>(__args)...); }
│ │ │ +
278#endif
│ │ │ +
279#endif
│ │ │
280
│ │ │ -
281 /// @} group exceptions
│ │ │ -
282} // namespace std
│ │ │ -
283
│ │ │ -
284} // extern "C++"
│ │ │ -
285
│ │ │ -
286#pragma GCC visibility pop
│ │ │ -
287
│ │ │ -
288#endif
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ +
281 /**
│ │ │ +
282 * @brief Removes first element.
│ │ │ +
283 *
│ │ │ +
284 * This is a typical %stack operation. It shrinks the %stack
│ │ │ +
285 * by one. The time complexity of the operation depends on the
│ │ │ +
286 * underlying sequence.
│ │ │ +
287 *
│ │ │ +
288 * Note that no data is returned, and if the first element's
│ │ │ +
289 * data is needed, it should be retrieved before pop() is
│ │ │ +
290 * called.
│ │ │ +
291 */
│ │ │ +
292 void
│ │ │ +
│ │ │ + │ │ │ +
294 {
│ │ │ +
295 __glibcxx_requires_nonempty();
│ │ │ +
296 c.pop_back();
│ │ │ +
297 }
│ │ │ +
│ │ │ +
298
│ │ │ +
299#if __cplusplus >= 201103L
│ │ │ +
300 void
│ │ │ +
301 swap(stack& __s)
│ │ │ +
302#if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11
│ │ │ + │ │ │ +
304#else
│ │ │ + │ │ │ +
306#endif
│ │ │ +
307 {
│ │ │ +
308 using std::swap;
│ │ │ +
309 swap(c, __s.c);
│ │ │ +
310 }
│ │ │ +
311#endif // __cplusplus >= 201103L
│ │ │ +
312 };
│ │ │ +
│ │ │ +
313
│ │ │ +
314#if __cpp_deduction_guides >= 201606
│ │ │ +
315 template<typename _Container,
│ │ │ +
316 typename = _RequireNotAllocator<_Container>>
│ │ │ +
317 stack(_Container) -> stack<typename _Container::value_type, _Container>;
│ │ │ +
318
│ │ │ +
319 template<typename _Container, typename _Allocator,
│ │ │ +
320 typename = _RequireNotAllocator<_Container>>
│ │ │ +
321 stack(_Container, _Allocator)
│ │ │ +
322 -> stack<typename _Container::value_type, _Container>;
│ │ │ +
323
│ │ │ +
324#ifdef __cpp_lib_adaptor_iterator_pair_constructor
│ │ │ +
325 template<typename _InputIterator,
│ │ │ +
326 typename _ValT
│ │ │ +
327 = typename iterator_traits<_InputIterator>::value_type,
│ │ │ +
328 typename = _RequireInputIter<_InputIterator>>
│ │ │ +
329 stack(_InputIterator, _InputIterator) -> stack<_ValT>;
│ │ │ +
330
│ │ │ +
331 template<typename _InputIterator, typename _Allocator,
│ │ │ +
332 typename _ValT
│ │ │ +
333 = typename iterator_traits<_InputIterator>::value_type,
│ │ │ +
334 typename = _RequireInputIter<_InputIterator>,
│ │ │ +
335 typename = _RequireAllocator<_Allocator>>
│ │ │ +
336 stack(_InputIterator, _InputIterator, _Allocator)
│ │ │ +
337 -> stack<_ValT, deque<_ValT, _Allocator>>;
│ │ │ +
338#endif
│ │ │ +
339#endif
│ │ │ +
340
│ │ │ +
341 /**
│ │ │ +
342 * @brief Stack equality comparison.
│ │ │ +
343 * @param __x A %stack.
│ │ │ +
344 * @param __y A %stack of the same type as @a __x.
│ │ │ +
345 * @return True iff the size and elements of the stacks are equal.
│ │ │ +
346 *
│ │ │ +
347 * This is an equivalence relation. Complexity and semantics
│ │ │ +
348 * depend on the underlying sequence type, but the expected rules
│ │ │ +
349 * are: this relation is linear in the size of the sequences, and
│ │ │ +
350 * stacks are considered equivalent if their sequences compare
│ │ │ +
351 * equal.
│ │ │ +
352 */
│ │ │ +
353 template<typename _Tp, typename _Seq>
│ │ │ +
354 _GLIBCXX_NODISCARD
│ │ │ +
355 inline bool
│ │ │ +
│ │ │ +
356 operator==(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y)
│ │ │ +
357 { return __x.c == __y.c; }
│ │ │ +
│ │ │ +
358
│ │ │ +
359 /**
│ │ │ +
360 * @brief Stack ordering relation.
│ │ │ +
361 * @param __x A %stack.
│ │ │ +
362 * @param __y A %stack of the same type as @a x.
│ │ │ +
363 * @return True iff @a x is lexicographically less than @a __y.
│ │ │ +
364 *
│ │ │ +
365 * This is an total ordering relation. Complexity and semantics
│ │ │ +
366 * depend on the underlying sequence type, but the expected rules
│ │ │ +
367 * are: this relation is linear in the size of the sequences, the
│ │ │ +
368 * elements must be comparable with @c <, and
│ │ │ +
369 * std::lexicographical_compare() is usually used to make the
│ │ │ +
370 * determination.
│ │ │ +
371 */
│ │ │ +
372 template<typename _Tp, typename _Seq>
│ │ │ +
373 _GLIBCXX_NODISCARD
│ │ │ +
│ │ │ +
374 inline bool
│ │ │ +
375 operator<(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y)
│ │ │ +
376 { return __x.c < __y.c; }
│ │ │ +
│ │ │ +
377
│ │ │ +
378 /// Based on operator==
│ │ │ +
379 template<typename _Tp, typename _Seq>
│ │ │ +
380 _GLIBCXX_NODISCARD
│ │ │ +
381 inline bool
│ │ │ +
│ │ │ +
382 operator!=(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y)
│ │ │ +
383 { return !(__x == __y); }
│ │ │ +
│ │ │ +
384
│ │ │ +
385 /// Based on operator<
│ │ │ +
386 template<typename _Tp, typename _Seq>
│ │ │ +
387 _GLIBCXX_NODISCARD
│ │ │ +
388 inline bool
│ │ │ +
│ │ │ +
389 operator>(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y)
│ │ │ +
390 { return __y < __x; }
│ │ │ +
│ │ │ +
391
│ │ │ +
392 /// Based on operator<
│ │ │ +
393 template<typename _Tp, typename _Seq>
│ │ │ +
394 _GLIBCXX_NODISCARD
│ │ │ +
│ │ │ +
395 inline bool
│ │ │ +
396 operator<=(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y)
│ │ │ +
397 { return !(__y < __x); }
│ │ │ +
│ │ │ +
398
│ │ │ +
399 /// Based on operator<
│ │ │ +
400 template<typename _Tp, typename _Seq>
│ │ │ +
401 _GLIBCXX_NODISCARD
│ │ │ +
402 inline bool
│ │ │ +
│ │ │ +
403 operator>=(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y)
│ │ │ +
404 { return !(__x < __y); }
│ │ │ +
│ │ │ +
405
│ │ │ +
406#if __cpp_lib_three_way_comparison
│ │ │ +
407 template<typename _Tp, three_way_comparable _Seq>
│ │ │ +
408 [[nodiscard]]
│ │ │ +
409 inline compare_three_way_result_t<_Seq>
│ │ │ +
410 operator<=>(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y)
│ │ │ +
411 { return __x.c <=> __y.c; }
│ │ │ +
412#endif
│ │ │ +
413
│ │ │ +
414#if __cplusplus >= 201103L
│ │ │ +
415 template<typename _Tp, typename _Seq>
│ │ │ +
416 inline
│ │ │ +
417#if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11
│ │ │ +
418 // Constrained free swap overload, see p0185r1
│ │ │ +
419 typename enable_if<__is_swappable<_Seq>::value>::type
│ │ │ +
420#else
│ │ │ +
421 void
│ │ │ +
422#endif
│ │ │ +
423 swap(stack<_Tp, _Seq>& __x, stack<_Tp, _Seq>& __y)
│ │ │ +
424 noexcept(noexcept(__x.swap(__y)))
│ │ │ +
425 { __x.swap(__y); }
│ │ │ +
426
│ │ │ +
427 template<typename _Tp, typename _Seq, typename _Alloc>
│ │ │ +
428 struct uses_allocator<stack<_Tp, _Seq>, _Alloc>
│ │ │ +
429 : public uses_allocator<_Seq, _Alloc>::type { };
│ │ │ +
430#endif // __cplusplus >= 201103L
│ │ │ +
431
│ │ │ +
432_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ +
433} // namespace
│ │ │ +
434
│ │ │ +
435#endif /* _STL_STACK_H */
│ │ │ + │ │ │ + │ │ │ +
constexpr std::remove_reference< _Tp >::type && move(_Tp &&__t) noexcept
Convert a value to an rvalue.
Definition move.h:104
│ │ │
void swap(any &__x, any &__y) noexcept
Exchange the states of two any objects.
Definition any:429
│ │ │ -
exception_ptr current_exception() noexcept
│ │ │ -
exception_ptr make_exception_ptr(_Ex) noexcept
Obtain an exception_ptr pointing to a copy of the supplied object.
│ │ │ -
void rethrow_exception(exception_ptr)
Throw the object pointed to by the exception_ptr.
│ │ │
ISO C++ entities toplevel namespace is std.
│ │ │ -
Part of RTTI.
Definition typeinfo:93
│ │ │ -
An opaque pointer to an arbitrary exception.
│ │ │ - │ │ │ + │ │ │ +
A standard container giving FILO behavior.
Definition stl_stack.h:100
│ │ │ +
void pop()
Removes first element.
Definition stl_stack.h:293
│ │ │ +
size_type size() const
Definition stl_stack.h:223
│ │ │ +
void push(const value_type &__x)
Add data to the top of the stack.
Definition stl_stack.h:260
│ │ │ +
bool empty() const
Definition stl_stack.h:217
│ │ │ +
const_reference top() const
Definition stl_stack.h:244
│ │ │ +
stack()
Default constructor creates no elements.
Definition stl_stack.h:162
│ │ │ +
reference top()
Definition stl_stack.h:232
│ │ │ + │ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,325 +1,485 @@ │ │ │ │ libstdc++ │ │ │ │ -exception_ptr.h │ │ │ │ +stl_stack.h │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -1// Exception Handling support header (exception_ptr class) for -*- C++ -*- │ │ │ │ +1// Stack implementation -*- C++ -*- │ │ │ │ 2 │ │ │ │ -3// Copyright (C) 2008-2022 Free Software Foundation, Inc. │ │ │ │ +3// Copyright (C) 2001-2022 Free Software Foundation, Inc. │ │ │ │ 4// │ │ │ │ -5// This file is part of GCC. │ │ │ │ -6// │ │ │ │ -7// GCC is free software; you can redistribute it and/or modify │ │ │ │ -8// it under the terms of the GNU General Public License as published by │ │ │ │ -9// the Free Software Foundation; either version 3, or (at your option) │ │ │ │ -10// any later version. │ │ │ │ -11// │ │ │ │ -12// GCC is distributed in the hope that it will be useful, │ │ │ │ -13// but WITHOUT ANY WARRANTY; without even the implied warranty of │ │ │ │ -14// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the │ │ │ │ -15// GNU General Public License for more details. │ │ │ │ -16// │ │ │ │ -17// Under Section 7 of GPL version 3, you are granted additional │ │ │ │ -18// permissions described in the GCC Runtime Library Exception, version │ │ │ │ -19// 3.1, as published by the Free Software Foundation. │ │ │ │ -20 │ │ │ │ -21// You should have received a copy of the GNU General Public License and │ │ │ │ -22// a copy of the GCC Runtime Library Exception along with this program; │ │ │ │ -23// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see │ │ │ │ -24// . │ │ │ │ -25 │ │ │ │ -26/** @file bits/exception_ptr.h │ │ │ │ -27 * This is an internal header file, included by other library headers. │ │ │ │ -28 * Do not attempt to use it directly. @headername{exception} │ │ │ │ -29 */ │ │ │ │ -30 │ │ │ │ -31#ifndef _EXCEPTION_PTR_H │ │ │ │ -32#define _EXCEPTION_PTR_H │ │ │ │ -33 │ │ │ │ -34#pragma GCC visibility push(default) │ │ │ │ -35 │ │ │ │ -36#include <_b_i_t_s_/_c_+_+_c_o_n_f_i_g_._h> │ │ │ │ -37#include <_b_i_t_s_/_e_x_c_e_p_t_i_o_n___d_e_f_i_n_e_s_._h> │ │ │ │ -38#include <_b_i_t_s_/_c_x_x_a_b_i___i_n_i_t___e_x_c_e_p_t_i_o_n_._h> │ │ │ │ -39#include <_t_y_p_e_i_n_f_o> │ │ │ │ -40#include <_n_e_w> │ │ │ │ -41 │ │ │ │ -42#if __cplusplus >= 201103L │ │ │ │ -43# include <_b_i_t_s_/_m_o_v_e_._h> │ │ │ │ -44#endif │ │ │ │ -45 │ │ │ │ -46#ifdef _GLIBCXX_EH_PTR_RELOPS_COMPAT │ │ │ │ -47# define _GLIBCXX_EH_PTR_USED __attribute__((__used__)) │ │ │ │ -48#else │ │ │ │ -49# define _GLIBCXX_EH_PTR_USED │ │ │ │ -50#endif │ │ │ │ -51 │ │ │ │ -52extern "C++" { │ │ │ │ -53 │ │ │ │ -54namespace _s_t_d │ │ │ │ -55{ │ │ │ │ -56 class type_info; │ │ │ │ -57 │ │ │ │ -58 /** │ │ │ │ -59 * @addtogroup exceptions │ │ │ │ -60 * @{ │ │ │ │ -61 */ │ │ │ │ -62 │ │ │ │ -63 namespace __exception_ptr │ │ │ │ -64 { │ │ │ │ -65 class exception_ptr; │ │ │ │ -66 } │ │ │ │ -67 │ │ │ │ -68 using __exception_ptr::exception_ptr; │ │ │ │ -69 │ │ │ │ -70 /** Obtain an exception_ptr to the currently handled exception. If there │ │ │ │ -71 * is none, or the currently handled exception is foreign, return the null │ │ │ │ -72 * value. │ │ │ │ -73 */ │ │ │ │ -_7_4 _e_x_c_e_p_t_i_o_n___p_t_r _c_u_r_r_e_n_t___e_x_c_e_p_t_i_o_n() ___G_L_I_B_C_X_X___U_S_E___N_O_E_X_C_E_P_T; │ │ │ │ -75 │ │ │ │ -76 _t_e_m_p_l_a_t_e<_t_y_p_e_n_a_m_e ___E_x> │ │ │ │ -77 _e_x_c_e_p_t_i_o_n___p_t_r _m_a_k_e___e_x_c_e_p_t_i_o_n___p_t_r(___E_x) ___G_L_I_B_C_X_X___U_S_E___N_O_E_X_C_E_P_T; │ │ │ │ -78 │ │ │ │ -79 /// Throw the object pointed to by the exception_ptr. │ │ │ │ -_8_0 void rethrow_exception(_e_x_c_e_p_t_i_o_n___p_t_r) _____a_t_t_r_i_b_u_t_e____ ((_____n_o_r_e_t_u_r_n____)); │ │ │ │ -81 │ │ │ │ -82 _n_a_m_e_s_p_a_c_e __exception_ptr │ │ │ │ -83 { │ │ │ │ -84 using _s_t_d_:_:_r_e_t_h_r_o_w___e_x_c_e_p_t_i_o_n; │ │ │ │ -85 │ │ │ │ -86 /** │ │ │ │ -87 * @brief An opaque pointer to an arbitrary exception. │ │ │ │ -88 * @ingroup exceptions │ │ │ │ -89 */ │ │ │ │ -_9_0 class _e_x_c_e_p_t_i_o_n___p_t_r │ │ │ │ -91 { │ │ │ │ -92 void* _M_exception_object; │ │ │ │ -93 │ │ │ │ -94 explicit _e_x_c_e_p_t_i_o_n___p_t_r(void* __e) ___G_L_I_B_C_X_X___U_S_E___N_O_E_X_C_E_P_T; │ │ │ │ -95 │ │ │ │ -96 void _M_addref() ___G_L_I_B_C_X_X___U_S_E___N_O_E_X_C_E_P_T; │ │ │ │ -97 void _M_release() ___G_L_I_B_C_X_X___U_S_E___N_O_E_X_C_E_P_T; │ │ │ │ -98 │ │ │ │ -99 void *_M_get() const ___G_L_I_B_C_X_X___N_O_E_X_C_E_P_T _____a_t_t_r_i_b_u_t_e____ ((_____p_u_r_e____)); │ │ │ │ -100 │ │ │ │ -101 friend _e_x_c_e_p_t_i_o_n___p_t_r _s_t_d_:_:_c_u_r_r_e_n_t___e_x_c_e_p_t_i_o_n() ___G_L_I_B_C_X_X___U_S_E___N_O_E_X_C_E_P_T; │ │ │ │ -102 friend void _s_t_d_:_:_r_e_t_h_r_o_w___e_x_c_e_p_t_i_o_n(_e_x_c_e_p_t_i_o_n___p_t_r); │ │ │ │ -103 template │ │ │ │ -104 friend _e_x_c_e_p_t_i_o_n___p_t_r _s_t_d_:_:_m_a_k_e___e_x_c_e_p_t_i_o_n___p_t_r(___E_x) ___G_L_I_B_C_X_X___U_S_E___N_O_E_X_C_E_P_T; │ │ │ │ -105 │ │ │ │ -106 public: │ │ │ │ -107 _e_x_c_e_p_t_i_o_n___p_t_r() ___G_L_I_B_C_X_X___U_S_E___N_O_E_X_C_E_P_T; │ │ │ │ -108 │ │ │ │ -109 _e_x_c_e_p_t_i_o_n___p_t_r(const _e_x_c_e_p_t_i_o_n___p_t_r&) ___G_L_I_B_C_X_X___U_S_E___N_O_E_X_C_E_P_T; │ │ │ │ +5// This file is part of the GNU ISO C++ Library. This library is free │ │ │ │ +6// software; you can redistribute it and/or modify it under the │ │ │ │ +7// terms of the GNU General Public License as published by the │ │ │ │ +8// Free Software Foundation; either version 3, or (at your option) │ │ │ │ +9// any later version. │ │ │ │ +10 │ │ │ │ +11// This library is distributed in the hope that it will be useful, │ │ │ │ +12// but WITHOUT ANY WARRANTY; without even the implied warranty of │ │ │ │ +13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the │ │ │ │ +14// GNU General Public License for more details. │ │ │ │ +15 │ │ │ │ +16// Under Section 7 of GPL version 3, you are granted additional │ │ │ │ +17// permissions described in the GCC Runtime Library Exception, version │ │ │ │ +18// 3.1, as published by the Free Software Foundation. │ │ │ │ +19 │ │ │ │ +20// You should have received a copy of the GNU General Public License and │ │ │ │ +21// a copy of the GCC Runtime Library Exception along with this program; │ │ │ │ +22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see │ │ │ │ +23// . │ │ │ │ +24 │ │ │ │ +25/* │ │ │ │ +26 * │ │ │ │ +27 * Copyright (c) 1994 │ │ │ │ +28 * Hewlett-Packard Company │ │ │ │ +29 * │ │ │ │ +30 * Permission to use, copy, modify, distribute and sell this software │ │ │ │ +31 * and its documentation for any purpose is hereby granted without fee, │ │ │ │ +32 * provided that the above copyright notice appear in all copies and │ │ │ │ +33 * that both that copyright notice and this permission notice appear │ │ │ │ +34 * in supporting documentation. Hewlett-Packard Company makes no │ │ │ │ +35 * representations about the suitability of this software for any │ │ │ │ +36 * purpose. It is provided "as is" without express or implied warranty. │ │ │ │ +37 * │ │ │ │ +38 * │ │ │ │ +39 * Copyright (c) 1996,1997 │ │ │ │ +40 * Silicon Graphics Computer Systems, Inc. │ │ │ │ +41 * │ │ │ │ +42 * Permission to use, copy, modify, distribute and sell this software │ │ │ │ +43 * and its documentation for any purpose is hereby granted without fee, │ │ │ │ +44 * provided that the above copyright notice appear in all copies and │ │ │ │ +45 * that both that copyright notice and this permission notice appear │ │ │ │ +46 * in supporting documentation. Silicon Graphics makes no │ │ │ │ +47 * representations about the suitability of this software for any │ │ │ │ +48 * purpose. It is provided "as is" without express or implied warranty. │ │ │ │ +49 */ │ │ │ │ +50 │ │ │ │ +51/** @file bits/stl_stack.h │ │ │ │ +52 * This is an internal header file, included by other library headers. │ │ │ │ +53 * Do not attempt to use it directly. @headername{stack} │ │ │ │ +54 */ │ │ │ │ +55 │ │ │ │ +56#ifndef _STL_STACK_H │ │ │ │ +57#define _STL_STACK_H 1 │ │ │ │ +58 │ │ │ │ +59#include <_b_i_t_s_/_c_o_n_c_e_p_t___c_h_e_c_k_._h> │ │ │ │ +60#include <_d_e_b_u_g_/_d_e_b_u_g_._h> │ │ │ │ +61#if __cplusplus >= 201103L │ │ │ │ +62# include │ │ │ │ +63#endif │ │ │ │ +64 │ │ │ │ +65namespace _s_t_d _GLIBCXX_VISIBILITY(default) │ │ │ │ +66{ │ │ │ │ +67_GLIBCXX_BEGIN_NAMESPACE_VERSION │ │ │ │ +68 │ │ │ │ +69 /** │ │ │ │ +70 * @brief A standard container giving FILO behavior. │ │ │ │ +71 * │ │ │ │ +72 * @ingroup sequences │ │ │ │ +73 * │ │ │ │ +74 * @tparam _Tp Type of element. │ │ │ │ +75 * @tparam _Sequence Type of underlying sequence, defaults to deque<_Tp>. │ │ │ │ +76 * │ │ │ │ +77 * Meets many of the requirements of a │ │ │ │ +78 * container, │ │ │ │ +79 * but does not define anything to do with iterators. Very few of the │ │ │ │ +80 * other standard container interfaces are defined. │ │ │ │ +81 * │ │ │ │ +82 * This is not a true container, but an @e adaptor. It holds │ │ │ │ +83 * another container, and provides a wrapper interface to that │ │ │ │ +84 * container. The wrapper is what enforces strict │ │ │ │ +85 * first-in-last-out %stack behavior. │ │ │ │ +86 * │ │ │ │ +87 * The second template parameter defines the type of the underlying │ │ │ │ +88 * sequence/container. It defaults to std::deque, but it can be │ │ │ │ +89 * any type that supports @c back, @c push_back, and @c pop_back, │ │ │ │ +90 * such as std::list, std::vector, or an appropriate user-defined │ │ │ │ +91 * type. │ │ │ │ +92 * │ │ │ │ +93 * Members not found in @a normal containers are @c container_type, │ │ │ │ +94 * which is a typedef for the second Sequence parameter, and @c │ │ │ │ +95 * push, @c pop, and @c top, which are standard %stack/FILO │ │ │ │ +96 * operations. │ │ │ │ +97 */ │ │ │ │ +98 template > │ │ │ │ +_9_9 class _s_t_a_c_k │ │ │ │ +100 { │ │ │ │ +101#ifdef _GLIBCXX_CONCEPT_CHECKS │ │ │ │ +102 // concept requirements │ │ │ │ +103 typedef typename _Sequence::value_type ___S_e_q_u_e_n_c_e___v_a_l_u_e___t_y_p_e; │ │ │ │ +104# if __cplusplus < 201103L │ │ │ │ +105 __glibcxx_class_requires(_Tp, _SGIAssignableConcept) │ │ │ │ +106 __glibcxx_class_requires(_Sequence, _BackInsertionSequenceConcept) │ │ │ │ +107# endif │ │ │ │ +108 __glibcxx_class_requires2(_Tp, ___S_e_q_u_e_n_c_e___v_a_l_u_e___t_y_p_e, _SameTypeConcept) │ │ │ │ +109#endif │ │ │ │ 110 │ │ │ │ -111#if __cplusplus >= 201103L │ │ │ │ -112 _e_x_c_e_p_t_i_o_n___p_t_r(_n_u_l_l_p_t_r___t) noexcept │ │ │ │ -113 : _M_exception_object(nullptr) │ │ │ │ -114 { } │ │ │ │ -115 │ │ │ │ -116 _e_x_c_e_p_t_i_o_n___p_t_r(_e_x_c_e_p_t_i_o_n___p_t_r&& _____o) noexcept │ │ │ │ -117 : _M_exception_object(_____o._M_exception_object) │ │ │ │ -118 { _____o._M_exception_object = nullptr; } │ │ │ │ -119#endif │ │ │ │ -120 │ │ │ │ -121#if (__cplusplus < 201103L) || defined (_GLIBCXX_EH_PTR_COMPAT) │ │ │ │ -122 typedef _v_o_i_d (_e_x_c_e_p_t_i_o_n___p_t_r::*_____s_a_f_e___b_o_o_l)(); │ │ │ │ -123 │ │ │ │ -124 // For construction from nullptr or 0. │ │ │ │ -125 _e_x_c_e_p_t_i_o_n___p_t_r(_____s_a_f_e___b_o_o_l) ___G_L_I_B_C_X_X___U_S_E___N_O_E_X_C_E_P_T; │ │ │ │ -126#endif │ │ │ │ -127 │ │ │ │ -128 _e_x_c_e_p_t_i_o_n___p_t_r& │ │ │ │ -129 operator=(const _e_x_c_e_p_t_i_o_n___p_t_r&) ___G_L_I_B_C_X_X___U_S_E___N_O_E_X_C_E_P_T; │ │ │ │ -130 │ │ │ │ -131#if __cplusplus >= 201103L │ │ │ │ -132 _e_x_c_e_p_t_i_o_n___p_t_r& │ │ │ │ -133 operator=(_e_x_c_e_p_t_i_o_n___p_t_r&& _____o) noexcept │ │ │ │ -134 { │ │ │ │ -135 _e_x_c_e_p_t_i_o_n___p_t_r(static_cast<_e_x_c_e_p_t_i_o_n___p_t_r&&>(_____o)).swap(*this); │ │ │ │ -136 return *this; │ │ │ │ -137 } │ │ │ │ -138#endif │ │ │ │ -139 │ │ │ │ -140 _~_e_x_c_e_p_t_i_o_n___p_t_r() ___G_L_I_B_C_X_X___U_S_E___N_O_E_X_C_E_P_T; │ │ │ │ -141 │ │ │ │ -142 void │ │ │ │ -143 swap(_e_x_c_e_p_t_i_o_n___p_t_r&) ___G_L_I_B_C_X_X___U_S_E___N_O_E_X_C_E_P_T; │ │ │ │ -144 │ │ │ │ -145#ifdef _GLIBCXX_EH_PTR_COMPAT │ │ │ │ -146 // Retained for compatibility with CXXABI_1.3. │ │ │ │ -147 void ___M___s_a_f_e___b_o_o_l___d_u_m_m_y() ___G_L_I_B_C_X_X___U_S_E___N_O_E_X_C_E_P_T │ │ │ │ -148 _____a_t_t_r_i_b_u_t_e____ ((_____c_o_n_s_t____)); │ │ │ │ -149 bool operator!() const ___G_L_I_B_C_X_X___U_S_E___N_O_E_X_C_E_P_T │ │ │ │ -150 _____a_t_t_r_i_b_u_t_e____ ((_____p_u_r_e____)); │ │ │ │ -151 operator _____s_a_f_e___b_o_o_l() const ___G_L_I_B_C_X_X___U_S_E___N_O_E_X_C_E_P_T; │ │ │ │ -152#endif │ │ │ │ -153 │ │ │ │ -154#if __cplusplus >= 201103L │ │ │ │ -155 explicit operator bool() const noexcept │ │ │ │ -156 { return _M_exception_object; } │ │ │ │ -157#endif │ │ │ │ -158 │ │ │ │ -159#if __cpp_impl_three_way_comparison >= 201907L \ │ │ │ │ -160 && ! defined _GLIBCXX_EH_PTR_RELOPS_COMPAT │ │ │ │ -161 friend bool │ │ │ │ -162 operator==(const _e_x_c_e_p_t_i_o_n___p_t_r&, const _e_x_c_e_p_t_i_o_n___p_t_r&) noexcept = default; │ │ │ │ -163#else │ │ │ │ -164 friend _GLIBCXX_EH_PTR_USED bool │ │ │ │ -165 operator==(const _e_x_c_e_p_t_i_o_n___p_t_r& __x, const _e_x_c_e_p_t_i_o_n___p_t_r& __y) │ │ │ │ -166 ___G_L_I_B_C_X_X___U_S_E___N_O_E_X_C_E_P_T │ │ │ │ -167 { return __x._M_exception_object == __y._M_exception_object; } │ │ │ │ +111 template │ │ │ │ +112 friend bool │ │ │ │ +113 operator==(const _s_t_a_c_k_<___T_p_1_,_ ___S_e_q_1_>&, const _s_t_a_c_k_<___T_p_1_,_ ___S_e_q_1_>&); │ │ │ │ +114 │ │ │ │ +115 template │ │ │ │ +116 friend bool │ │ │ │ +117 operator<(const _s_t_a_c_k_<___T_p_1_,_ ___S_e_q_1_>&, const _s_t_a_c_k_<___T_p_1_,_ ___S_e_q_1_>&); │ │ │ │ +118 │ │ │ │ +119#if __cpp_lib_three_way_comparison │ │ │ │ +120 template │ │ │ │ +121 friend _c_o_m_p_a_r_e___t_h_r_e_e___w_a_y___r_e_s_u_l_t___t_<___S_e_q_1_> │ │ │ │ +122 operator<=>(const _s_t_a_c_k_<___T_p_1_,_ ___S_e_q_1_>&, const _s_t_a_c_k_<___T_p_1_,_ ___S_e_q_1_>&); │ │ │ │ +123#endif │ │ │ │ +124 │ │ │ │ +125#if __cplusplus >= 201103L │ │ │ │ +126 template │ │ │ │ +127 using _Uses = typename │ │ │ │ +128 _e_n_a_b_l_e___i_f_<_u_s_e_s___a_l_l_o_c_a_t_o_r_<___S_e_q_u_e_n_c_e_,_ ___A_l_l_o_c_>_:_:_v_a_l_u_e>::type; │ │ │ │ +129 │ │ │ │ +130#if __cplusplus >= 201703L │ │ │ │ +131 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ +132 // 2566. Requirements on the first template parameter of container │ │ │ │ +133 // adaptors │ │ │ │ +134 static_assert(_i_s___s_a_m_e_<___T_p_,_ _t_y_p_e_n_a_m_e_ ___S_e_q_u_e_n_c_e_:_:_v_a_l_u_e___t_y_p_e_>_:_:_v_a_l_u_e, │ │ │ │ +135 "value_type must be the same as the underlying container"); │ │ │ │ +136#endif // C++17 │ │ │ │ +137#endif // C++11 │ │ │ │ +138 │ │ │ │ +139 public: │ │ │ │ +140 typedef typename _Sequence::value_type value_type; │ │ │ │ +141 typedef typename _Sequence::reference reference; │ │ │ │ +142 typedef typename _Sequence::const_reference const_reference; │ │ │ │ +143 typedef typename _Sequence::size_type size_type; │ │ │ │ +144 typedef _Sequence container_type; │ │ │ │ +145 │ │ │ │ +146 protected: │ │ │ │ +147 // See queue::c for notes on this name. │ │ │ │ +148 _Sequence c; │ │ │ │ +149 │ │ │ │ +150 public: │ │ │ │ +151 // XXX removed old def ctor, added def arg to this one to match 14882 │ │ │ │ +152 /** │ │ │ │ +153 * @brief Default constructor creates no elements. │ │ │ │ +154 */ │ │ │ │ +155#if __cplusplus < 201103L │ │ │ │ +156 explicit │ │ │ │ +157 _s_t_a_c_k(const _Sequence& __c = _Sequence()) │ │ │ │ +158 : c(__c) { } │ │ │ │ +159#else │ │ │ │ +160 template_:_:_v_a_l_u_e>::type> │ │ │ │ +_1_6_2 _s_t_a_c_k() │ │ │ │ +163 : c() { } │ │ │ │ +164 │ │ │ │ +165 explicit │ │ │ │ +166 _s_t_a_c_k(const _Sequence& __c) │ │ │ │ +167 : c(__c) { } │ │ │ │ 168 │ │ │ │ -169 friend _GLIBCXX_EH_PTR_USED bool │ │ │ │ -170 operator!=(const _e_x_c_e_p_t_i_o_n___p_t_r& __x, const _e_x_c_e_p_t_i_o_n___p_t_r& __y) │ │ │ │ -171 ___G_L_I_B_C_X_X___U_S_E___N_O_E_X_C_E_P_T │ │ │ │ -172 { return __x._M_exception_object != __y._M_exception_object; } │ │ │ │ -173#endif │ │ │ │ -174 │ │ │ │ -175 const class _s_t_d_:_:_t_y_p_e___i_n_f_o* │ │ │ │ -176 __cxa_exception_type() const ___G_L_I_B_C_X_X___U_S_E___N_O_E_X_C_E_P_T │ │ │ │ -177 _____a_t_t_r_i_b_u_t_e____ ((_____p_u_r_e____)); │ │ │ │ -178 }; │ │ │ │ -179 │ │ │ │ -180 _GLIBCXX_EH_PTR_USED │ │ │ │ -181 inline │ │ │ │ -182 exception_ptr::exception_ptr() ___G_L_I_B_C_X_X___U_S_E___N_O_E_X_C_E_P_T │ │ │ │ -183 : _M_exception_object(0) │ │ │ │ -184 { } │ │ │ │ -185 │ │ │ │ -186 _GLIBCXX_EH_PTR_USED │ │ │ │ -187 inline │ │ │ │ -188 exception_ptr::exception_ptr(const _e_x_c_e_p_t_i_o_n___p_t_r& __other) │ │ │ │ -189 ___G_L_I_B_C_X_X___U_S_E___N_O_E_X_C_E_P_T │ │ │ │ -190 : _M_exception_object(__other._M_exception_object) │ │ │ │ -191 { │ │ │ │ -192 if (_M_exception_object) │ │ │ │ -193 _M_addref(); │ │ │ │ -194 } │ │ │ │ +169 explicit │ │ │ │ +170 _s_t_a_c_k(_Sequence&& __c) │ │ │ │ +171 : c(_s_t_d::_m_o_v_e(__c)) { } │ │ │ │ +172 │ │ │ │ +173#if __cplusplus > 202002L │ │ │ │ +174#define __cpp_lib_adaptor_iterator_pair_constructor 202106L │ │ │ │ +175 │ │ │ │ +176 template> │ │ │ │ +178 _s_t_a_c_k(_InputIterator __first, _InputIterator __last) │ │ │ │ +179 : c(__first, __last) { } │ │ │ │ +180#endif │ │ │ │ +181 │ │ │ │ +182 │ │ │ │ +183 template> │ │ │ │ +184 explicit │ │ │ │ +185 _s_t_a_c_k(const _Alloc& __a) │ │ │ │ +186 : c(__a) { } │ │ │ │ +187 │ │ │ │ +188 template> │ │ │ │ +189 _s_t_a_c_k(const _Sequence& __c, const _Alloc& __a) │ │ │ │ +190 : c(__c, __a) { } │ │ │ │ +191 │ │ │ │ +192 template> │ │ │ │ +193 _s_t_a_c_k(_Sequence&& __c, const _Alloc& __a) │ │ │ │ +194 : c(_s_t_d::_m_o_v_e(__c), __a) { } │ │ │ │ 195 │ │ │ │ -196 _GLIBCXX_EH_PTR_USED │ │ │ │ -197 inline │ │ │ │ -198 exception_ptr::~exception_ptr() _GLIBCXX_USE_NOEXCEPT │ │ │ │ -199 { │ │ │ │ -200 if (_M_exception_object) │ │ │ │ -201 _M_release(); │ │ │ │ -202 } │ │ │ │ +196 template> │ │ │ │ +197 _s_t_a_c_k(const _s_t_a_c_k& __q, const _Alloc& __a) │ │ │ │ +198 : c(__q.c, __a) { } │ │ │ │ +199 │ │ │ │ +200 template> │ │ │ │ +201 _s_t_a_c_k(_s_t_a_c_k&& __q, const _Alloc& __a) │ │ │ │ +202 : c(_s_t_d::_m_o_v_e(__q.c), __a) { } │ │ │ │ 203 │ │ │ │ -204 _GLIBCXX_EH_PTR_USED │ │ │ │ -205 inline exception_ptr& │ │ │ │ -206 exception_ptr::operator=(const exception_ptr& __other) │ │ │ │ -_GLIBCXX_USE_NOEXCEPT │ │ │ │ -207 { │ │ │ │ -208 exception_ptr(__other).swap(*this); │ │ │ │ -209 return *this; │ │ │ │ -210 } │ │ │ │ -211 │ │ │ │ -212 _GLIBCXX_EH_PTR_USED │ │ │ │ -213 inline void │ │ │ │ -214 exception_ptr::swap(exception_ptr &__other) _GLIBCXX_USE_NOEXCEPT │ │ │ │ -215 { │ │ │ │ -216 void *__tmp = _M_exception_object; │ │ │ │ -217 _M_exception_object = __other._M_exception_object; │ │ │ │ -218 __other._M_exception_object = __tmp; │ │ │ │ -219 } │ │ │ │ -220 │ │ │ │ -221 /// @relates exception_ptr │ │ │ │ -222 inline void │ │ │ │ -223 _s_w_a_p(exception_ptr& __lhs, exception_ptr& __rhs) │ │ │ │ -224 { __lhs.swap(__rhs); } │ │ │ │ +204#if __cplusplus > 202002L │ │ │ │ +205 template, │ │ │ │ +207 typename = _Uses<_Alloc>> │ │ │ │ +208 _s_t_a_c_k(_InputIterator __first, _InputIterator __last, const _Alloc& __a) │ │ │ │ +209 : c(__first, __last, __a) { } │ │ │ │ +210#endif │ │ │ │ +211#endif │ │ │ │ +212 │ │ │ │ +213 /** │ │ │ │ +214 * Returns true if the %stack is empty. │ │ │ │ +215 */ │ │ │ │ +216 _GLIBCXX_NODISCARD bool │ │ │ │ +_2_1_7 _e_m_p_t_y() const │ │ │ │ +218 { return c.empty(); } │ │ │ │ +219 │ │ │ │ +220 /** Returns the number of elements in the %stack. */ │ │ │ │ +221 _GLIBCXX_NODISCARD │ │ │ │ +222 size_type │ │ │ │ +_2_2_3 _s_i_z_e() const │ │ │ │ +224 { return c.size(); } │ │ │ │ 225 │ │ │ │ -226 /// @cond undocumented │ │ │ │ -227 template │ │ │ │ -228 _GLIBCXX_CDTOR_CALLABI │ │ │ │ -229 inline void │ │ │ │ -230 __dest_thunk(void* __x) │ │ │ │ -231 { static_cast<_Ex*>(__x)->~_Ex(); } │ │ │ │ -232 /// @endcond │ │ │ │ -233 │ │ │ │ -234 } // namespace __exception_ptr │ │ │ │ -235 │ │ │ │ -236 /// Obtain an exception_ptr pointing to a copy of the supplied object. │ │ │ │ -237#if (__cplusplus >= 201103L && __cpp_rtti) || __cpp_exceptions │ │ │ │ -238 template │ │ │ │ -239 exception_ptr │ │ │ │ -_2_4_0 _m_a_k_e___e_x_c_e_p_t_i_o_n___p_t_r(___E_x _____e_x) ___G_L_I_B_C_X_X___U_S_E___N_O_E_X_C_E_P_T │ │ │ │ -241 { │ │ │ │ -242#if __cplusplus >= 201103L && __cpp_rtti │ │ │ │ -243 using ___E_x_2 = typename decay<_Ex>::type; │ │ │ │ -244 void* __e = __cxxabiv1::__cxa_allocate_exception(sizeof(___E_x)); │ │ │ │ -245 (_v_o_i_d) __cxxabiv1::__cxa_init_primary_exception( │ │ │ │ -246 __e, const_cast<_s_t_d_:_:_t_y_p_e___i_n_f_o*>(&typeid(___E_x)), │ │ │ │ -247 __exception_ptr::__dest_thunk<_Ex2>); │ │ │ │ -248 __try │ │ │ │ -249 { │ │ │ │ -250 ::new (__e) ___E_x_2(_____e_x); │ │ │ │ -251 return _e_x_c_e_p_t_i_o_n___p_t_r(__e); │ │ │ │ -252 } │ │ │ │ -253 __catch(...) │ │ │ │ -254 { │ │ │ │ -255 __cxxabiv1::__cxa_free_exception(__e); │ │ │ │ -256 return _c_u_r_r_e_n_t___e_x_c_e_p_t_i_o_n(); │ │ │ │ -257 } │ │ │ │ -258#else │ │ │ │ -259 try │ │ │ │ -260 { │ │ │ │ -261 throw _____e_x; │ │ │ │ -262 } │ │ │ │ -263 catch(...) │ │ │ │ -264 { │ │ │ │ -265 return _c_u_r_r_e_n_t___e_x_c_e_p_t_i_o_n(); │ │ │ │ -266 } │ │ │ │ -267#endif │ │ │ │ -268 } │ │ │ │ -269#else // no RTTI and no exceptions │ │ │ │ -270 // This is always_inline so the linker will never use this useless │ │ │ │ -definition │ │ │ │ -271 // instead of a working one compiled with RTTI and/or exceptions enabled. │ │ │ │ -272 template │ │ │ │ -273 __attribute__ ((__always_inline__)) │ │ │ │ -274 inline exception_ptr │ │ │ │ -275 _m_a_k_e___e_x_c_e_p_t_i_o_n___p_t_r(_Ex) _GLIBCXX_USE_NOEXCEPT │ │ │ │ -276 { return exception_ptr(); } │ │ │ │ -277#endif │ │ │ │ -278 │ │ │ │ -279#undef _GLIBCXX_EH_PTR_USED │ │ │ │ +226 /** │ │ │ │ +227 * Returns a read/write reference to the data at the first │ │ │ │ +228 * element of the %stack. │ │ │ │ +229 */ │ │ │ │ +230 _GLIBCXX_NODISCARD │ │ │ │ +231 reference │ │ │ │ +_2_3_2 _t_o_p() │ │ │ │ +233 { │ │ │ │ +234 __glibcxx_requires_nonempty(); │ │ │ │ +235 return c.back(); │ │ │ │ +236 } │ │ │ │ +237 │ │ │ │ +238 /** │ │ │ │ +239 * Returns a read-only (constant) reference to the data at the first │ │ │ │ +240 * element of the %stack. │ │ │ │ +241 */ │ │ │ │ +242 _GLIBCXX_NODISCARD │ │ │ │ +243 const_reference │ │ │ │ +_2_4_4 _t_o_p() const │ │ │ │ +245 { │ │ │ │ +246 __glibcxx_requires_nonempty(); │ │ │ │ +247 return c.back(); │ │ │ │ +248 } │ │ │ │ +249 │ │ │ │ +250 /** │ │ │ │ +251 * @brief Add data to the top of the %stack. │ │ │ │ +252 * @param __x Data to be added. │ │ │ │ +253 * │ │ │ │ +254 * This is a typical %stack operation. The function creates an │ │ │ │ +255 * element at the top of the %stack and assigns the given data │ │ │ │ +256 * to it. The time complexity of the operation depends on the │ │ │ │ +257 * underlying sequence. │ │ │ │ +258 */ │ │ │ │ +259 void │ │ │ │ +_2_6_0 _p_u_s_h(const value_type& __x) │ │ │ │ +261 { c.push_back(__x); } │ │ │ │ +262 │ │ │ │ +263#if __cplusplus >= 201103L │ │ │ │ +264 void │ │ │ │ +265 _p_u_s_h(value_type&& __x) │ │ │ │ +266 { c.push_back(_s_t_d_:_:_m_o_v_e(__x)); } │ │ │ │ +267 │ │ │ │ +268#if __cplusplus > 201402L │ │ │ │ +269 template │ │ │ │ +270 decltype(auto) │ │ │ │ +271 emplace(_Args&&... __args) │ │ │ │ +272 { return c.emplace_back(_s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(__args)...); } │ │ │ │ +273#else │ │ │ │ +274 template │ │ │ │ +275 void │ │ │ │ +276 emplace(_Args&&... __args) │ │ │ │ +277 { c.emplace_back(_s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(__args)...); } │ │ │ │ +278#endif │ │ │ │ +279#endif │ │ │ │ 280 │ │ │ │ -281 /// @} group exceptions │ │ │ │ -282} // namespace std │ │ │ │ -283 │ │ │ │ -284} // extern "C++" │ │ │ │ -285 │ │ │ │ -286#pragma GCC visibility pop │ │ │ │ -287 │ │ │ │ -288#endif │ │ │ │ -_n_e_w │ │ │ │ -_t_y_p_e_i_n_f_o │ │ │ │ -_e_x_c_e_p_t_i_o_n___d_e_f_i_n_e_s_._h │ │ │ │ -_c_x_x_a_b_i___i_n_i_t___e_x_c_e_p_t_i_o_n_._h │ │ │ │ -_m_o_v_e_._h │ │ │ │ -_c_+_+_c_o_n_f_i_g_._h │ │ │ │ +281 /** │ │ │ │ +282 * @brief Removes first element. │ │ │ │ +283 * │ │ │ │ +284 * This is a typical %stack operation. It shrinks the %stack │ │ │ │ +285 * by one. The time complexity of the operation depends on the │ │ │ │ +286 * underlying sequence. │ │ │ │ +287 * │ │ │ │ +288 * Note that no data is returned, and if the first element's │ │ │ │ +289 * data is needed, it should be retrieved before pop() is │ │ │ │ +290 * called. │ │ │ │ +291 */ │ │ │ │ +292 void │ │ │ │ +_2_9_3 _p_o_p() │ │ │ │ +294 { │ │ │ │ +295 __glibcxx_requires_nonempty(); │ │ │ │ +296 c.pop_back(); │ │ │ │ +297 } │ │ │ │ +298 │ │ │ │ +299#if __cplusplus >= 201103L │ │ │ │ +300 void │ │ │ │ +301 swap(_s_t_a_c_k& _____s) │ │ │ │ +302#if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11 │ │ │ │ +303 noexcept(_____i_s___n_o_t_h_r_o_w___s_w_a_p_p_a_b_l_e_<___S_e_q_u_e_n_c_e_>_:_:_v_a_l_u_e) │ │ │ │ +304#else │ │ │ │ +305 noexcept(_____i_s___n_o_t_h_r_o_w___s_w_a_p_p_a_b_l_e_<___T_p_>_:_:_v_a_l_u_e) │ │ │ │ +306#endif │ │ │ │ +307 { │ │ │ │ +308 using _s_t_d_:_:_s_w_a_p; │ │ │ │ +309 swap(c, _____s.c); │ │ │ │ +310 } │ │ │ │ +311#endif // __cplusplus >= 201103L │ │ │ │ +312 }; │ │ │ │ +313 │ │ │ │ +314#if __cpp_deduction_guides >= 201606 │ │ │ │ +315 template> │ │ │ │ +317 stack(_Container) -> stack; │ │ │ │ +318 │ │ │ │ +319 template> │ │ │ │ +321 stack(_Container, _Allocator) │ │ │ │ +322 -> stack; │ │ │ │ +323 │ │ │ │ +324#ifdef __cpp_lib_adaptor_iterator_pair_constructor │ │ │ │ +325 template::value_type, │ │ │ │ +328 typename = _RequireInputIter<_InputIterator>> │ │ │ │ +329 stack(_InputIterator, _InputIterator) -> stack<_ValT>; │ │ │ │ +330 │ │ │ │ +331 template::value_type, │ │ │ │ +334 typename = _RequireInputIter<_InputIterator>, │ │ │ │ +335 typename = _RequireAllocator<_Allocator>> │ │ │ │ +336 stack(_InputIterator, _InputIterator, _Allocator) │ │ │ │ +337 -> stack<_ValT, deque<_ValT, _Allocator>>; │ │ │ │ +338#endif │ │ │ │ +339#endif │ │ │ │ +340 │ │ │ │ +341 /** │ │ │ │ +342 * @brief Stack equality comparison. │ │ │ │ +343 * @param __x A %stack. │ │ │ │ +344 * @param __y A %stack of the same type as @a __x. │ │ │ │ +345 * @return True iff the size and elements of the stacks are equal. │ │ │ │ +346 * │ │ │ │ +347 * This is an equivalence relation. Complexity and semantics │ │ │ │ +348 * depend on the underlying sequence type, but the expected rules │ │ │ │ +349 * are: this relation is linear in the size of the sequences, and │ │ │ │ +350 * stacks are considered equivalent if their sequences compare │ │ │ │ +351 * equal. │ │ │ │ +352 */ │ │ │ │ +353 template │ │ │ │ +354 _GLIBCXX_NODISCARD │ │ │ │ +355 inline bool │ │ │ │ +_3_5_6 operator==(const _s_t_a_c_k_<___T_p_,_ ___S_e_q_>& __x, const _s_t_a_c_k_<___T_p_,_ ___S_e_q_>& __y) │ │ │ │ +357 { return __x.c == __y.c; } │ │ │ │ +358 │ │ │ │ +359 /** │ │ │ │ +360 * @brief Stack ordering relation. │ │ │ │ +361 * @param __x A %stack. │ │ │ │ +362 * @param __y A %stack of the same type as @a x. │ │ │ │ +363 * @return True iff @a x is lexicographically less than @a __y. │ │ │ │ +364 * │ │ │ │ +365 * This is an total ordering relation. Complexity and semantics │ │ │ │ +366 * depend on the underlying sequence type, but the expected rules │ │ │ │ +367 * are: this relation is linear in the size of the sequences, the │ │ │ │ +368 * elements must be comparable with @c <, and │ │ │ │ +369 * std::lexicographical_compare() is usually used to make the │ │ │ │ +370 * determination. │ │ │ │ +371 */ │ │ │ │ +372 template │ │ │ │ +373 _GLIBCXX_NODISCARD │ │ │ │ +_3_7_4 inline bool │ │ │ │ +375 operator<(const _s_t_a_c_k_<___T_p_,_ ___S_e_q_>& __x, const _s_t_a_c_k_<___T_p_,_ ___S_e_q_>& __y) │ │ │ │ +376 { return __x.c < __y.c; } │ │ │ │ +377 │ │ │ │ +378 /// Based on operator== │ │ │ │ +379 template │ │ │ │ +380 _GLIBCXX_NODISCARD │ │ │ │ +381 inline bool │ │ │ │ +_3_8_2 operator!=(const _s_t_a_c_k_<___T_p_,_ ___S_e_q_>& __x, const _s_t_a_c_k_<___T_p_,_ ___S_e_q_>& __y) │ │ │ │ +383 { return !(__x == __y); } │ │ │ │ +384 │ │ │ │ +385 /// Based on operator< │ │ │ │ +386 template │ │ │ │ +387 _GLIBCXX_NODISCARD │ │ │ │ +388 inline bool │ │ │ │ +_3_8_9 operator>(const _s_t_a_c_k_<___T_p_,_ ___S_e_q_>& __x, const _s_t_a_c_k_<___T_p_,_ ___S_e_q_>& __y) │ │ │ │ +390 { return __y < __x; } │ │ │ │ +391 │ │ │ │ +392 /// Based on operator< │ │ │ │ +393 template │ │ │ │ +394 _GLIBCXX_NODISCARD │ │ │ │ +_3_9_5 inline bool │ │ │ │ +396 operator<=(const _s_t_a_c_k_<___T_p_,_ ___S_e_q_>& __x, const _s_t_a_c_k_<___T_p_,_ ___S_e_q_>& __y) │ │ │ │ +397 { return !(__y < __x); } │ │ │ │ +398 │ │ │ │ +399 /// Based on operator< │ │ │ │ +400 template │ │ │ │ +401 _GLIBCXX_NODISCARD │ │ │ │ +402 inline bool │ │ │ │ +_4_0_3 operator>=(const _s_t_a_c_k_<___T_p_,_ ___S_e_q_>& __x, const _s_t_a_c_k_<___T_p_,_ ___S_e_q_>& __y) │ │ │ │ +404 { return !(__x < __y); } │ │ │ │ +405 │ │ │ │ +406#if __cpp_lib_three_way_comparison │ │ │ │ +407 template │ │ │ │ +408 [[nodiscard]] │ │ │ │ +409 inline compare_three_way_result_t<_Seq> │ │ │ │ +410 operator<=>(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y) │ │ │ │ +411 { return __x.c <=> __y.c; } │ │ │ │ +412#endif │ │ │ │ +413 │ │ │ │ +414#if __cplusplus >= 201103L │ │ │ │ +415 template │ │ │ │ +416 inline │ │ │ │ +417#if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11 │ │ │ │ +418 // Constrained free swap overload, see p0185r1 │ │ │ │ +419 typename enable_if<__is_swappable<_Seq>::value>::type │ │ │ │ +420#else │ │ │ │ +421 void │ │ │ │ +422#endif │ │ │ │ +423 _s_w_a_p(stack<_Tp, _Seq>& __x, stack<_Tp, _Seq>& __y) │ │ │ │ +424 noexcept(noexcept(__x.swap(__y))) │ │ │ │ +425 { __x.swap(__y); } │ │ │ │ +426 │ │ │ │ +427 template │ │ │ │ +428 struct uses_allocator, _Alloc> │ │ │ │ +429 : public uses_allocator<_Seq, _Alloc>::type { }; │ │ │ │ +430#endif // __cplusplus >= 201103L │ │ │ │ +431 │ │ │ │ +432_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ +433} // namespace │ │ │ │ +434 │ │ │ │ +435#endif /* _STL_STACK_H */ │ │ │ │ +_c_o_n_c_e_p_t___c_h_e_c_k_._h │ │ │ │ +_d_e_b_u_g_._h │ │ │ │ +_s_t_d_:_:_m_o_v_e │ │ │ │ +constexpr std::remove_reference< _Tp >::type && move(_Tp &&__t) noexcept │ │ │ │ +Convert a value to an rvalue. │ │ │ │ +DDeeffiinniittiioonn _m_o_v_e_._h_:_1_0_4 │ │ │ │ _s_t_d_:_:_s_w_a_p │ │ │ │ void swap(any &__x, any &__y) noexcept │ │ │ │ Exchange the states of two any objects. │ │ │ │ DDeeffiinniittiioonn _a_n_y_:_4_2_9 │ │ │ │ -_s_t_d_:_:_c_u_r_r_e_n_t___e_x_c_e_p_t_i_o_n │ │ │ │ -exception_ptr current_exception() noexcept │ │ │ │ -_s_t_d_:_:_m_a_k_e___e_x_c_e_p_t_i_o_n___p_t_r │ │ │ │ -exception_ptr make_exception_ptr(_Ex) noexcept │ │ │ │ -Obtain an exception_ptr pointing to a copy of the supplied object. │ │ │ │ -DDeeffiinniittiioonn _e_x_c_e_p_t_i_o_n___p_t_r_._h_:_2_4_0 │ │ │ │ -_s_t_d_:_:_r_e_t_h_r_o_w___e_x_c_e_p_t_i_o_n │ │ │ │ -void rethrow_exception(exception_ptr) │ │ │ │ -Throw the object pointed to by the exception_ptr. │ │ │ │ _s_t_d │ │ │ │ ISO C++ entities toplevel namespace is std. │ │ │ │ -_s_t_d_:_:_t_y_p_e___i_n_f_o │ │ │ │ -Part of RTTI. │ │ │ │ -DDeeffiinniittiioonn _t_y_p_e_i_n_f_o_:_9_3 │ │ │ │ -_s_t_d_:_:_____e_x_c_e_p_t_i_o_n___p_t_r_:_:_e_x_c_e_p_t_i_o_n___p_t_r │ │ │ │ -An opaque pointer to an arbitrary exception. │ │ │ │ -DDeeffiinniittiioonn _e_x_c_e_p_t_i_o_n___p_t_r_._h_:_9_1 │ │ │ │ +_s_t_d_:_:_i_s___s_a_m_e │ │ │ │ +is_same │ │ │ │ +DDeeffiinniittiioonn _t_y_p_e___t_r_a_i_t_s_:_1_4_3_5 │ │ │ │ +_s_t_d_:_:_s_t_a_c_k │ │ │ │ +A standard container giving FILO behavior. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___s_t_a_c_k_._h_:_1_0_0 │ │ │ │ +_s_t_d_:_:_s_t_a_c_k_:_:_p_o_p │ │ │ │ +void pop() │ │ │ │ +Removes first element. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___s_t_a_c_k_._h_:_2_9_3 │ │ │ │ +_s_t_d_:_:_s_t_a_c_k_:_:_s_i_z_e │ │ │ │ +size_type size() const │ │ │ │ +DDeeffiinniittiioonn _s_t_l___s_t_a_c_k_._h_:_2_2_3 │ │ │ │ +_s_t_d_:_:_s_t_a_c_k_:_:_p_u_s_h │ │ │ │ +void push(const value_type &__x) │ │ │ │ +Add data to the top of the stack. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___s_t_a_c_k_._h_:_2_6_0 │ │ │ │ +_s_t_d_:_:_s_t_a_c_k_:_:_e_m_p_t_y │ │ │ │ +bool empty() const │ │ │ │ +DDeeffiinniittiioonn _s_t_l___s_t_a_c_k_._h_:_2_1_7 │ │ │ │ +_s_t_d_:_:_s_t_a_c_k_:_:_t_o_p │ │ │ │ +const_reference top() const │ │ │ │ +DDeeffiinniittiioonn _s_t_l___s_t_a_c_k_._h_:_2_4_4 │ │ │ │ +_s_t_d_:_:_s_t_a_c_k_:_:_s_t_a_c_k │ │ │ │ +stack() │ │ │ │ +Default constructor creates no elements. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___s_t_a_c_k_._h_:_1_6_2 │ │ │ │ +_s_t_d_:_:_s_t_a_c_k_:_:_t_o_p │ │ │ │ +reference top() │ │ │ │ +DDeeffiinniittiioonn _s_t_l___s_t_a_c_k_._h_:_2_3_2 │ │ │ │ _s_t_d_:_:_a_u_t_o___p_t_r___r_e_f │ │ │ │ DDeeffiinniittiioonn _a_u_t_o___p_t_r_._h_:_4_9 │ │ │ │ * _b_i_t_s │ │ │ │ - * _e_x_c_e_p_t_i_o_n___p_t_r_._h │ │ │ │ + * _s_t_l___s_t_a_c_k_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-12-base/libstdc++/user/a00335.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: exception_defines.h File Reference │ │ │ +libstdc++: stl_numeric.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -46,91 +46,92 @@ │ │ │ /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */ │ │ │ $(document).ready(function(){initNavTree('a00335.html',''); initResizable(); }); │ │ │ /* @license-end */ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -Macros
│ │ │ -
exception_defines.h File Reference
│ │ │ +Namespaces | │ │ │ +Macros | │ │ │ +Functions
│ │ │ +
stl_numeric.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ + │ │ │ + │ │ │ + │ │ │ +

│ │ │ +Namespaces

namespace  std
 
│ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ +

│ │ │ Macros

#define __catch(X)
 
#define __throw_exception_again
 
#define __try
 
#define _GLIBCXX_MOVE_IF_20(_E)
 
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ +Functions

template<typename _InputIterator , typename _Tp >
constexpr _Tp std::accumulate (_InputIterator __first, _InputIterator __last, _Tp __init)
 
template<typename _InputIterator , typename _Tp , typename _BinaryOperation >
constexpr _Tp std::accumulate (_InputIterator __first, _InputIterator __last, _Tp __init, _BinaryOperation __binary_op)
 
template<typename _InputIterator , typename _OutputIterator >
constexpr _OutputIterator std::adjacent_difference (_InputIterator __first, _InputIterator __last, _OutputIterator __result)
 
template<typename _InputIterator , typename _OutputIterator , typename _BinaryOperation >
constexpr _OutputIterator std::adjacent_difference (_InputIterator __first, _InputIterator __last, _OutputIterator __result, _BinaryOperation __binary_op)
 
template<typename _InputIterator1 , typename _InputIterator2 , typename _Tp >
constexpr _Tp std::inner_product (_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _Tp __init)
 
template<typename _InputIterator1 , typename _InputIterator2 , typename _Tp , typename _BinaryOperation1 , typename _BinaryOperation2 >
constexpr _Tp std::inner_product (_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _Tp __init, _BinaryOperation1 __binary_op1, _BinaryOperation2 __binary_op2)
 
template<typename _ForwardIterator , typename _Tp >
constexpr void std::iota (_ForwardIterator __first, _ForwardIterator __last, _Tp __value)
 
template<typename _InputIterator , typename _OutputIterator >
constexpr _OutputIterator std::partial_sum (_InputIterator __first, _InputIterator __last, _OutputIterator __result)
 
template<typename _InputIterator , typename _OutputIterator , typename _BinaryOperation >
constexpr _OutputIterator std::partial_sum (_InputIterator __first, _InputIterator __last, _OutputIterator __result, _BinaryOperation __binary_op)
 
│ │ │

Detailed Description

│ │ │ -

This is an internal header file, included by other library headers. Do not attempt to use it directly. Instead, include <exception>.

│ │ │ +

This is an internal header file, included by other library headers. Do not attempt to use it directly. Instead, include <numeric>.

│ │ │ │ │ │ -

Definition in file exception_defines.h.

│ │ │ +

Definition in file stl_numeric.h.

│ │ │

Macro Definition Documentation

│ │ │ - │ │ │ -

◆ __catch

│ │ │ + │ │ │ +

◆ _GLIBCXX_MOVE_IF_20

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │ │ │ │ - │ │ │ + │ │ │ │ │ │ │ │ │ - │ │ │ + │ │ │ │ │ │ │ │ │
#define __catch#define _GLIBCXX_MOVE_IF_20( X)_E)
│ │ │
│ │ │ │ │ │ -

Definition at line 41 of file exception_defines.h.

│ │ │ - │ │ │ -
│ │ │ -
│ │ │ - │ │ │ -

◆ __throw_exception_again

│ │ │ - │ │ │ -
│ │ │ -
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
#define __throw_exception_again
│ │ │ -
│ │ │ - │ │ │ -

Definition at line 42 of file exception_defines.h.

│ │ │ - │ │ │ -
│ │ │ -
│ │ │ - │ │ │ -

◆ __try

│ │ │ - │ │ │ -
│ │ │ -
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
#define __try
│ │ │ -
│ │ │ - │ │ │ -

Definition at line 40 of file exception_defines.h.

│ │ │ +

Definition at line 112 of file stl_numeric.h.

│ │ │ │ │ │
│ │ │
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,28 +1,67 @@ │ │ │ │ libstdc++ │ │ │ │ -_M_a_c_r_o_s │ │ │ │ -exception_defines.h File Reference │ │ │ │ +_N_a_m_e_s_p_a_c_e_s | _M_a_c_r_o_s | _F_u_n_c_t_i_o_n_s │ │ │ │ +stl_numeric.h File Reference │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ +NNaammeessppaacceess │ │ │ │ +namespace   _s_t_d │ │ │ │ +  │ │ │ │ MMaaccrrooss │ │ │ │ -#define  _____c_a_t_c_h(X) │ │ │ │ +#define  ___G_L_I_B_C_X_X___M_O_V_E___I_F___2_0(_E) │ │ │ │ +  │ │ │ │ +FFuunnccttiioonnss │ │ │ │ +template<_t_y_p_e_n_a_m_e ___I_n_p_u_t_I_t_e_r_a_t_o_r , _t_y_p_e_n_a_m_e _Tp > │ │ │ │ + constexpr _Tp  _s_t_d_:_:_a_c_c_u_m_u_l_a_t_e (___I_n_p_u_t_I_t_e_r_a_t_o_r __first, │ │ │ │ + ___I_n_p_u_t_I_t_e_r_a_t_o_r __last, _Tp __init) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___I_n_p_u_t_I_t_e_r_a_t_o_r , _t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___B_i_n_a_r_y_O_p_e_r_a_t_i_o_n > │ │ │ │ + constexpr _Tp  _s_t_d_:_:_a_c_c_u_m_u_l_a_t_e (___I_n_p_u_t_I_t_e_r_a_t_o_r __first, │ │ │ │ + ___I_n_p_u_t_I_t_e_r_a_t_o_r __last, _Tp __init, ___B_i_n_a_r_y_O_p_e_r_a_t_i_o_n │ │ │ │ + _____b_i_n_a_r_y___o_p) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___I_n_p_u_t_I_t_e_r_a_t_o_r , _t_y_p_e_n_a_m_e _OutputIterator > │ │ │ │ +constexpr _OutputIterator  _s_t_d_:_:_a_d_j_a_c_e_n_t___d_i_f_f_e_r_e_n_c_e (___I_n_p_u_t_I_t_e_r_a_t_o_r __first, │ │ │ │ + ___I_n_p_u_t_I_t_e_r_a_t_o_r __last, _OutputIterator __result) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___I_n_p_u_t_I_t_e_r_a_t_o_r , _t_y_p_e_n_a_m_e _OutputIterator , _t_y_p_e_n_a_m_e │ │ │ │ +___B_i_n_a_r_y_O_p_e_r_a_t_i_o_n > │ │ │ │ +constexpr _OutputIterator  _s_t_d_:_:_a_d_j_a_c_e_n_t___d_i_f_f_e_r_e_n_c_e (___I_n_p_u_t_I_t_e_r_a_t_o_r __first, │ │ │ │ + ___I_n_p_u_t_I_t_e_r_a_t_o_r __last, _OutputIterator __result, │ │ │ │ + ___B_i_n_a_r_y_O_p_e_r_a_t_i_o_n _____b_i_n_a_r_y___o_p) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___I_n_p_u_t_I_t_e_r_a_t_o_r_1 , _t_y_p_e_n_a_m_e ___I_n_p_u_t_I_t_e_r_a_t_o_r_2 , _t_y_p_e_n_a_m_e _Tp > │ │ │ │ + constexpr _Tp  _s_t_d_:_:_i_n_n_e_r___p_r_o_d_u_c_t (___I_n_p_u_t_I_t_e_r_a_t_o_r_1 _____f_i_r_s_t_1, │ │ │ │ + ___I_n_p_u_t_I_t_e_r_a_t_o_r_1 _____l_a_s_t_1, ___I_n_p_u_t_I_t_e_r_a_t_o_r_2 _____f_i_r_s_t_2, │ │ │ │ + _Tp __init) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___I_n_p_u_t_I_t_e_r_a_t_o_r_1 , _t_y_p_e_n_a_m_e ___I_n_p_u_t_I_t_e_r_a_t_o_r_2 , _t_y_p_e_n_a_m_e _Tp , │ │ │ │ +_t_y_p_e_n_a_m_e ___B_i_n_a_r_y_O_p_e_r_a_t_i_o_n_1 , _t_y_p_e_n_a_m_e ___B_i_n_a_r_y_O_p_e_r_a_t_i_o_n_2 > │ │ │ │ + constexpr _Tp  _s_t_d_:_:_i_n_n_e_r___p_r_o_d_u_c_t (___I_n_p_u_t_I_t_e_r_a_t_o_r_1 _____f_i_r_s_t_1, │ │ │ │ + ___I_n_p_u_t_I_t_e_r_a_t_o_r_1 _____l_a_s_t_1, ___I_n_p_u_t_I_t_e_r_a_t_o_r_2 _____f_i_r_s_t_2, │ │ │ │ + _Tp __init, ___B_i_n_a_r_y_O_p_e_r_a_t_i_o_n_1 _____b_i_n_a_r_y___o_p_1, │ │ │ │ + ___B_i_n_a_r_y_O_p_e_r_a_t_i_o_n_2 _____b_i_n_a_r_y___o_p_2) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___F_o_r_w_a_r_d_I_t_e_r_a_t_o_r , _t_y_p_e_n_a_m_e _Tp > │ │ │ │ + constexpr _v_o_i_d  _s_t_d_:_:_i_o_t_a (___F_o_r_w_a_r_d_I_t_e_r_a_t_o_r __first, │ │ │ │ + ___F_o_r_w_a_r_d_I_t_e_r_a_t_o_r __last, _Tp __value) │ │ │ │   │ │ │ │ -#define  _____t_h_r_o_w___e_x_c_e_p_t_i_o_n___a_g_a_i_n │ │ │ │ +template<_t_y_p_e_n_a_m_e ___I_n_p_u_t_I_t_e_r_a_t_o_r , _t_y_p_e_n_a_m_e _OutputIterator > │ │ │ │ +constexpr _OutputIterator  _s_t_d_:_:_p_a_r_t_i_a_l___s_u_m (___I_n_p_u_t_I_t_e_r_a_t_o_r __first, │ │ │ │ + ___I_n_p_u_t_I_t_e_r_a_t_o_r __last, _OutputIterator __result) │ │ │ │   │ │ │ │ -#define  _____t_r_y │ │ │ │ +template<_t_y_p_e_n_a_m_e ___I_n_p_u_t_I_t_e_r_a_t_o_r , _t_y_p_e_n_a_m_e _OutputIterator , _t_y_p_e_n_a_m_e │ │ │ │ +___B_i_n_a_r_y_O_p_e_r_a_t_i_o_n > │ │ │ │ +constexpr _OutputIterator  _s_t_d_:_:_p_a_r_t_i_a_l___s_u_m (___I_n_p_u_t_I_t_e_r_a_t_o_r __first, │ │ │ │ + ___I_n_p_u_t_I_t_e_r_a_t_o_r __last, _OutputIterator __result, │ │ │ │ + ___B_i_n_a_r_y_O_p_e_r_a_t_i_o_n _____b_i_n_a_r_y___o_p) │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ This is an internal header file, included by other library headers. Do not │ │ │ │ -attempt to use it directly. Instead, include . │ │ │ │ -Definition in file _e_x_c_e_p_t_i_o_n___d_e_f_i_n_e_s_._h. │ │ │ │ +attempt to use it directly. Instead, include . │ │ │ │ +Definition in file _s_t_l___n_u_m_e_r_i_c_._h. │ │ │ │ ********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ -********** _?◆_? ____ccaattcchh ********** │ │ │ │ -#define __catch (   X ) │ │ │ │ -Definition at line _4_1 of file _e_x_c_e_p_t_i_o_n___d_e_f_i_n_e_s_._h. │ │ │ │ -********** _?◆_? ____tthhrrooww__eexxcceeppttiioonn__aaggaaiinn ********** │ │ │ │ -#define __throw_exception_again │ │ │ │ -Definition at line _4_2 of file _e_x_c_e_p_t_i_o_n___d_e_f_i_n_e_s_._h. │ │ │ │ -********** _?◆_? ____ttrryy ********** │ │ │ │ -#define __try │ │ │ │ -Definition at line _4_0 of file _e_x_c_e_p_t_i_o_n___d_e_f_i_n_e_s_._h. │ │ │ │ +********** _?◆_? __GGLLIIBBCCXXXX__MMOOVVEE__IIFF__2200 ********** │ │ │ │ +#define _GLIBCXX_MOVE_IF_20 (   _E ) │ │ │ │ +Definition at line _1_1_2 of file _s_t_l___n_u_m_e_r_i_c_._h. │ │ │ │ * _b_i_t_s │ │ │ │ - * _e_x_c_e_p_t_i_o_n___d_e_f_i_n_e_s_._h │ │ │ │ + * _s_t_l___n_u_m_e_r_i_c_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-12-base/libstdc++/user/a00335_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: exception_defines.h Source File │ │ │ +libstdc++: stl_numeric.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -45,18 +45,18 @@ │ │ │ │ │ │
│ │ │
│ │ │ -
exception_defines.h
│ │ │ +
stl_numeric.h
│ │ │
│ │ │
│ │ │ -Go to the documentation of this file.
1// -fno-exceptions Support -*- C++ -*-
│ │ │ +Go to the documentation of this file.
1// Numeric functions implementation -*- C++ -*-
│ │ │
2
│ │ │
3// Copyright (C) 2001-2022 Free Software Foundation, Inc.
│ │ │
4//
│ │ │
5// This file is part of the GNU ISO C++ Library. This library is free
│ │ │
6// software; you can redistribute it and/or modify it under the
│ │ │
7// terms of the GNU General Public License as published by the
│ │ │
8// Free Software Foundation; either version 3, or (at your option)
│ │ │ @@ -71,40 +71,434 @@ │ │ │
17// permissions described in the GCC Runtime Library Exception, version
│ │ │
18// 3.1, as published by the Free Software Foundation.
│ │ │
19
│ │ │
20// You should have received a copy of the GNU General Public License and
│ │ │
21// a copy of the GCC Runtime Library Exception along with this program;
│ │ │
22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
│ │ │
23// <http://www.gnu.org/licenses/>.
│ │ │ -
24
│ │ │ -
25/** @file bits/exception_defines.h
│ │ │ -
26 * This is an internal header file, included by other library headers.
│ │ │ -
27 * Do not attempt to use it directly. @headername{exception}
│ │ │ -
28 */
│ │ │ -
29
│ │ │ -
30#ifndef _EXCEPTION_DEFINES_H
│ │ │ -
31#define _EXCEPTION_DEFINES_H 1
│ │ │ -
32
│ │ │ -
33#if ! __cpp_exceptions
│ │ │ -
34// Iff -fno-exceptions, transform error handling code to work without it.
│ │ │ -
35# define __try if (true)
│ │ │ -
36# define __catch(X) if (false)
│ │ │ -
37# define __throw_exception_again
│ │ │ -
38#else
│ │ │ -
39// Else proceed normally.
│ │ │ -
40# define __try try
│ │ │ -
41# define __catch(X) catch(X)
│ │ │ -
42# define __throw_exception_again throw
│ │ │ -
43#endif
│ │ │ -
44
│ │ │ -
45#endif
│ │ │ +
24
│ │ │ +
25/*
│ │ │ +
26 *
│ │ │ +
27 * Copyright (c) 1994
│ │ │ +
28 * Hewlett-Packard Company
│ │ │ +
29 *
│ │ │ +
30 * Permission to use, copy, modify, distribute and sell this software
│ │ │ +
31 * and its documentation for any purpose is hereby granted without fee,
│ │ │ +
32 * provided that the above copyright notice appear in all copies and
│ │ │ +
33 * that both that copyright notice and this permission notice appear
│ │ │ +
34 * in supporting documentation. Hewlett-Packard Company makes no
│ │ │ +
35 * representations about the suitability of this software for any
│ │ │ +
36 * purpose. It is provided "as is" without express or implied warranty.
│ │ │ +
37 *
│ │ │ +
38 *
│ │ │ +
39 * Copyright (c) 1996,1997
│ │ │ +
40 * Silicon Graphics Computer Systems, Inc.
│ │ │ +
41 *
│ │ │ +
42 * Permission to use, copy, modify, distribute and sell this software
│ │ │ +
43 * and its documentation for any purpose is hereby granted without fee,
│ │ │ +
44 * provided that the above copyright notice appear in all copies and
│ │ │ +
45 * that both that copyright notice and this permission notice appear
│ │ │ +
46 * in supporting documentation. Silicon Graphics makes no
│ │ │ +
47 * representations about the suitability of this software for any
│ │ │ +
48 * purpose. It is provided "as is" without express or implied warranty.
│ │ │ +
49 */
│ │ │ +
50
│ │ │ +
51/** @file bits/stl_numeric.h
│ │ │ +
52 * This is an internal header file, included by other library headers.
│ │ │ +
53 * Do not attempt to use it directly. @headername{numeric}
│ │ │ +
54 */
│ │ │ +
55
│ │ │ +
56#ifndef _STL_NUMERIC_H
│ │ │ +
57#define _STL_NUMERIC_H 1
│ │ │ +
58
│ │ │ +
59#include <bits/concept_check.h>
│ │ │ +
60#include <debug/debug.h>
│ │ │ +
61#include <bits/move.h> // For _GLIBCXX_MOVE
│ │ │ +
62
│ │ │ +
63
│ │ │ +
64namespace std _GLIBCXX_VISIBILITY(default)
│ │ │ +
65{
│ │ │ +
66_GLIBCXX_BEGIN_NAMESPACE_VERSION
│ │ │ +
67
│ │ │ +
68 /** @defgroup numeric_ops Generalized Numeric operations
│ │ │ +
69 * @ingroup algorithms
│ │ │ +
70 */
│ │ │ +
71
│ │ │ +
72#if __cplusplus >= 201103L
│ │ │ +
73 /**
│ │ │ +
74 * @brief Create a range of sequentially increasing values.
│ │ │ +
75 *
│ │ │ +
76 * For each element in the range @p [first,last) assigns @p value and
│ │ │ +
77 * increments @p value as if by @p ++value.
│ │ │ +
78 *
│ │ │ +
79 * @param __first Start of range.
│ │ │ +
80 * @param __last End of range.
│ │ │ +
81 * @param __value Starting value.
│ │ │ +
82 * @return Nothing.
│ │ │ +
83 * @ingroup numeric_ops
│ │ │ +
84 */
│ │ │ +
85 template<typename _ForwardIterator, typename _Tp>
│ │ │ +
86 _GLIBCXX20_CONSTEXPR
│ │ │ +
87 void
│ │ │ +
│ │ │ +
88 iota(_ForwardIterator __first, _ForwardIterator __last, _Tp __value)
│ │ │ +
89 {
│ │ │ +
90 // concept requirements
│ │ │ +
91 __glibcxx_function_requires(_Mutable_ForwardIteratorConcept<
│ │ │ + │ │ │ +
93 __glibcxx_function_requires(_ConvertibleConcept<_Tp,
│ │ │ + │ │ │ +
95 __glibcxx_requires_valid_range(__first, __last);
│ │ │ +
96
│ │ │ +
97 for (; __first != __last; ++__first)
│ │ │ +
98 {
│ │ │ +
99 *__first = __value;
│ │ │ +
100 ++__value;
│ │ │ +
101 }
│ │ │ +
102 }
│ │ │ +
│ │ │ +
103#endif
│ │ │ +
104
│ │ │ +
105_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ +
106
│ │ │ +
107_GLIBCXX_BEGIN_NAMESPACE_ALGO
│ │ │ +
108
│ │ │ +
109#if __cplusplus > 201703L
│ │ │ +
110// _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ +
111// DR 2055. std::move in std::accumulate and other algorithms
│ │ │ +
112# define _GLIBCXX_MOVE_IF_20(_E) std::move(_E)
│ │ │ +
113#else
│ │ │ +
114# define _GLIBCXX_MOVE_IF_20(_E) _E
│ │ │ +
115#endif
│ │ │ +
116
│ │ │ +
117 /// @addtogroup numeric_ops
│ │ │ +
118 /// @{
│ │ │ +
119
│ │ │ +
120 /**
│ │ │ +
121 * @brief Accumulate values in a range.
│ │ │ +
122 *
│ │ │ +
123 * Accumulates the values in the range [first,last) using operator+(). The
│ │ │ +
124 * initial value is @a init. The values are processed in order.
│ │ │ +
125 *
│ │ │ +
126 * @param __first Start of range.
│ │ │ +
127 * @param __last End of range.
│ │ │ +
128 * @param __init Starting value to add other values to.
│ │ │ +
129 * @return The final sum.
│ │ │ +
130 */
│ │ │ +
131 template<typename _InputIterator, typename _Tp>
│ │ │ +
132 _GLIBCXX20_CONSTEXPR
│ │ │ +
133 inline _Tp
│ │ │ +
│ │ │ +
134 accumulate(_InputIterator __first, _InputIterator __last, _Tp __init)
│ │ │ +
135 {
│ │ │ +
136 // concept requirements
│ │ │ +
137 __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
│ │ │ +
138 __glibcxx_requires_valid_range(__first, __last);
│ │ │ +
139
│ │ │ +
140 for (; __first != __last; ++__first)
│ │ │ +
141 __init = _GLIBCXX_MOVE_IF_20(__init) + *__first;
│ │ │ +
142 return __init;
│ │ │ +
143 }
│ │ │ +
│ │ │ +
144
│ │ │ +
145 /**
│ │ │ +
146 * @brief Accumulate values in a range with operation.
│ │ │ +
147 *
│ │ │ +
148 * Accumulates the values in the range `[first,last)` using the function
│ │ │ +
149 * object `__binary_op`. The initial value is `__init`. The values are
│ │ │ +
150 * processed in order.
│ │ │ +
151 *
│ │ │ +
152 * @param __first Start of range.
│ │ │ +
153 * @param __last End of range.
│ │ │ +
154 * @param __init Starting value to add other values to.
│ │ │ +
155 * @param __binary_op Function object to accumulate with.
│ │ │ +
156 * @return The final sum.
│ │ │ +
157 */
│ │ │ +
158 template<typename _InputIterator, typename _Tp, typename _BinaryOperation>
│ │ │ +
159 _GLIBCXX20_CONSTEXPR
│ │ │ +
160 inline _Tp
│ │ │ +
│ │ │ +
161 accumulate(_InputIterator __first, _InputIterator __last, _Tp __init,
│ │ │ + │ │ │ +
163 {
│ │ │ +
164 // concept requirements
│ │ │ +
165 __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
│ │ │ +
166 __glibcxx_requires_valid_range(__first, __last);
│ │ │ +
167
│ │ │ +
168 for (; __first != __last; ++__first)
│ │ │ +
169 __init = __binary_op(_GLIBCXX_MOVE_IF_20(__init), *__first);
│ │ │ +
170 return __init;
│ │ │ +
171 }
│ │ │ +
│ │ │ +
172
│ │ │ +
173 /**
│ │ │ +
174 * @brief Compute inner product of two ranges.
│ │ │ +
175 *
│ │ │ +
176 * Starting with an initial value of @p __init, multiplies successive
│ │ │ +
177 * elements from the two ranges and adds each product into the accumulated
│ │ │ +
178 * value using operator+(). The values in the ranges are processed in
│ │ │ +
179 * order.
│ │ │ +
180 *
│ │ │ +
181 * @param __first1 Start of range 1.
│ │ │ +
182 * @param __last1 End of range 1.
│ │ │ +
183 * @param __first2 Start of range 2.
│ │ │ +
184 * @param __init Starting value to add other values to.
│ │ │ +
185 * @return The final inner product.
│ │ │ +
186 */
│ │ │ +
187 template<typename _InputIterator1, typename _InputIterator2, typename _Tp>
│ │ │ +
188 _GLIBCXX20_CONSTEXPR
│ │ │ +
189 inline _Tp
│ │ │ +
│ │ │ + │ │ │ +
191 _InputIterator2 __first2, _Tp __init)
│ │ │ +
192 {
│ │ │ +
193 // concept requirements
│ │ │ +
194 __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
│ │ │ +
195 __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
│ │ │ +
196 __glibcxx_requires_valid_range(__first1, __last1);
│ │ │ +
197
│ │ │ +
198 for (; __first1 != __last1; ++__first1, (void)++__first2)
│ │ │ +
199 __init = _GLIBCXX_MOVE_IF_20(__init) + (*__first1 * *__first2);
│ │ │ +
200 return __init;
│ │ │ +
201 }
│ │ │ +
│ │ │ +
202
│ │ │ +
203 /**
│ │ │ +
204 * @brief Compute inner product of two ranges.
│ │ │ +
205 *
│ │ │ +
206 * Starting with an initial value of @p __init, applies @p __binary_op2 to
│ │ │ +
207 * successive elements from the two ranges and accumulates each result into
│ │ │ +
208 * the accumulated value using @p __binary_op1. The values in the ranges are
│ │ │ +
209 * processed in order.
│ │ │ +
210 *
│ │ │ +
211 * @param __first1 Start of range 1.
│ │ │ +
212 * @param __last1 End of range 1.
│ │ │ +
213 * @param __first2 Start of range 2.
│ │ │ +
214 * @param __init Starting value to add other values to.
│ │ │ +
215 * @param __binary_op1 Function object to accumulate with.
│ │ │ +
216 * @param __binary_op2 Function object to apply to pairs of input values.
│ │ │ +
217 * @return The final inner product.
│ │ │ +
218 */
│ │ │ +
219 template<typename _InputIterator1, typename _InputIterator2, typename _Tp,
│ │ │ +
220 typename _BinaryOperation1, typename _BinaryOperation2>
│ │ │ +
221 _GLIBCXX20_CONSTEXPR
│ │ │ +
222 inline _Tp
│ │ │ +
│ │ │ + │ │ │ +
224 _InputIterator2 __first2, _Tp __init,
│ │ │ + │ │ │ + │ │ │ +
227 {
│ │ │ +
228 // concept requirements
│ │ │ +
229 __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
│ │ │ +
230 __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
│ │ │ +
231 __glibcxx_requires_valid_range(__first1, __last1);
│ │ │ +
232
│ │ │ +
233 for (; __first1 != __last1; ++__first1, (void)++__first2)
│ │ │ +
234 __init = __binary_op1(_GLIBCXX_MOVE_IF_20(__init),
│ │ │ + │ │ │ +
236 return __init;
│ │ │ +
237 }
│ │ │ +
│ │ │ +
238
│ │ │ +
239 /**
│ │ │ +
240 * @brief Return list of partial sums
│ │ │ +
241 *
│ │ │ +
242 * Accumulates the values in the range [first,last) using the @c + operator.
│ │ │ +
243 * As each successive input value is added into the total, that partial sum
│ │ │ +
244 * is written to @p __result. Therefore, the first value in @p __result is
│ │ │ +
245 * the first value of the input, the second value in @p __result is the sum
│ │ │ +
246 * of the first and second input values, and so on.
│ │ │ +
247 *
│ │ │ +
248 * @param __first Start of input range.
│ │ │ +
249 * @param __last End of input range.
│ │ │ +
250 * @param __result Output sum.
│ │ │ +
251 * @return Iterator pointing just beyond the values written to __result.
│ │ │ +
252 */
│ │ │ +
253 template<typename _InputIterator, typename _OutputIterator>
│ │ │ +
254 _GLIBCXX20_CONSTEXPR
│ │ │ +
255 _OutputIterator
│ │ │ +
│ │ │ + │ │ │ +
257 _OutputIterator __result)
│ │ │ +
258 {
│ │ │ +
259 typedef typename iterator_traits<_InputIterator>::value_type _ValueType;
│ │ │ +
260
│ │ │ +
261 // concept requirements
│ │ │ +
262 __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
│ │ │ +
263 __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
│ │ │ +
264 _ValueType>)
│ │ │ +
265 __glibcxx_requires_valid_range(__first, __last);
│ │ │ +
266
│ │ │ +
267 if (__first == __last)
│ │ │ +
268 return __result;
│ │ │ +
269 _ValueType __value = *__first;
│ │ │ +
270 *__result = __value;
│ │ │ +
271 while (++__first != __last)
│ │ │ +
272 {
│ │ │ +
273 __value = _GLIBCXX_MOVE_IF_20(__value) + *__first;
│ │ │ +
274 *++__result = __value;
│ │ │ +
275 }
│ │ │ +
276 return ++__result;
│ │ │ +
277 }
│ │ │ +
│ │ │ +
278
│ │ │ +
279 /**
│ │ │ +
280 * @brief Return list of partial sums
│ │ │ +
281 *
│ │ │ +
282 * Accumulates the values in the range [first,last) using @p __binary_op.
│ │ │ +
283 * As each successive input value is added into the total, that partial sum
│ │ │ +
284 * is written to @p __result. Therefore, the first value in @p __result is
│ │ │ +
285 * the first value of the input, the second value in @p __result is the sum
│ │ │ +
286 * of the first and second input values, and so on.
│ │ │ +
287 *
│ │ │ +
288 * @param __first Start of input range.
│ │ │ +
289 * @param __last End of input range.
│ │ │ +
290 * @param __result Output sum.
│ │ │ +
291 * @param __binary_op Function object.
│ │ │ +
292 * @return Iterator pointing just beyond the values written to __result.
│ │ │ +
293 */
│ │ │ +
294 template<typename _InputIterator, typename _OutputIterator,
│ │ │ +
295 typename _BinaryOperation>
│ │ │ +
296 _GLIBCXX20_CONSTEXPR
│ │ │ +
297 _OutputIterator
│ │ │ +
│ │ │ + │ │ │ +
299 _OutputIterator __result, _BinaryOperation __binary_op)
│ │ │ +
300 {
│ │ │ +
301 typedef typename iterator_traits<_InputIterator>::value_type _ValueType;
│ │ │ +
302
│ │ │ +
303 // concept requirements
│ │ │ +
304 __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
│ │ │ +
305 __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
│ │ │ +
306 _ValueType>)
│ │ │ +
307 __glibcxx_requires_valid_range(__first, __last);
│ │ │ +
308
│ │ │ +
309 if (__first == __last)
│ │ │ +
310 return __result;
│ │ │ +
311 _ValueType __value = *__first;
│ │ │ +
312 *__result = __value;
│ │ │ +
313 while (++__first != __last)
│ │ │ +
314 {
│ │ │ +
315 __value = __binary_op(_GLIBCXX_MOVE_IF_20(__value), *__first);
│ │ │ +
316 *++__result = __value;
│ │ │ +
317 }
│ │ │ +
318 return ++__result;
│ │ │ +
319 }
│ │ │ +
│ │ │ +
320
│ │ │ +
321 /**
│ │ │ +
322 * @brief Return differences between adjacent values.
│ │ │ +
323 *
│ │ │ +
324 * Computes the difference between adjacent values in the range
│ │ │ +
325 * [first,last) using operator-() and writes the result to @p __result.
│ │ │ +
326 *
│ │ │ +
327 * @param __first Start of input range.
│ │ │ +
328 * @param __last End of input range.
│ │ │ +
329 * @param __result Output sums.
│ │ │ +
330 * @return Iterator pointing just beyond the values written to result.
│ │ │ +
331 */
│ │ │ +
332 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ +
333 // DR 539. partial_sum and adjacent_difference should mention requirements
│ │ │ +
334 template<typename _InputIterator, typename _OutputIterator>
│ │ │ +
335 _GLIBCXX20_CONSTEXPR
│ │ │ +
336 _OutputIterator
│ │ │ +
│ │ │ + │ │ │ +
338 _InputIterator __last, _OutputIterator __result)
│ │ │ +
339 {
│ │ │ +
340 typedef typename iterator_traits<_InputIterator>::value_type _ValueType;
│ │ │ +
341
│ │ │ +
342 // concept requirements
│ │ │ +
343 __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
│ │ │ +
344 __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
│ │ │ +
345 _ValueType>)
│ │ │ +
346 __glibcxx_requires_valid_range(__first, __last);
│ │ │ +
347
│ │ │ +
348 if (__first == __last)
│ │ │ +
349 return __result;
│ │ │ +
350 _ValueType __value = *__first;
│ │ │ +
351 *__result = __value;
│ │ │ +
352 while (++__first != __last)
│ │ │ +
353 {
│ │ │ +
354 _ValueType __tmp = *__first;
│ │ │ +
355 *++__result = __tmp - _GLIBCXX_MOVE_IF_20(__value);
│ │ │ +
356 __value = _GLIBCXX_MOVE(__tmp);
│ │ │ +
357 }
│ │ │ +
358 return ++__result;
│ │ │ +
359 }
│ │ │ +
│ │ │ +
360
│ │ │ +
361 /**
│ │ │ +
362 * @brief Return differences between adjacent values.
│ │ │ +
363 *
│ │ │ +
364 * Computes the difference between adjacent values in the range
│ │ │ +
365 * [__first,__last) using the function object @p __binary_op and writes the
│ │ │ +
366 * result to @p __result.
│ │ │ +
367 *
│ │ │ +
368 * @param __first Start of input range.
│ │ │ +
369 * @param __last End of input range.
│ │ │ +
370 * @param __result Output sum.
│ │ │ +
371 * @param __binary_op Function object.
│ │ │ +
372 * @return Iterator pointing just beyond the values written to result.
│ │ │ +
373 */
│ │ │ +
374 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ +
375 // DR 539. partial_sum and adjacent_difference should mention requirements
│ │ │ +
376 template<typename _InputIterator, typename _OutputIterator,
│ │ │ +
377 typename _BinaryOperation>
│ │ │ +
378 _GLIBCXX20_CONSTEXPR
│ │ │ +
379 _OutputIterator
│ │ │ +
│ │ │ + │ │ │ +
381 _OutputIterator __result, _BinaryOperation __binary_op)
│ │ │ +
382 {
│ │ │ +
383 typedef typename iterator_traits<_InputIterator>::value_type _ValueType;
│ │ │ +
384
│ │ │ +
385 // concept requirements
│ │ │ +
386 __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
│ │ │ +
387 __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
│ │ │ +
388 _ValueType>)
│ │ │ +
389 __glibcxx_requires_valid_range(__first, __last);
│ │ │ +
390
│ │ │ +
391 if (__first == __last)
│ │ │ +
392 return __result;
│ │ │ +
393 _ValueType __value = *__first;
│ │ │ +
394 *__result = __value;
│ │ │ +
395 while (++__first != __last)
│ │ │ +
396 {
│ │ │ +
397 _ValueType __tmp = *__first;
│ │ │ +
398 *++__result = __binary_op(__tmp, _GLIBCXX_MOVE_IF_20(__value));
│ │ │ +
399 __value = _GLIBCXX_MOVE(__tmp);
│ │ │ +
400 }
│ │ │ +
401 return ++__result;
│ │ │ +
402 }
│ │ │ +
│ │ │ +
403
│ │ │ +
404 /// @} group numeric_ops
│ │ │ +
405
│ │ │ +
406#undef _GLIBCXX_MOVE_IF_20
│ │ │ +
407
│ │ │ +
408_GLIBCXX_END_NAMESPACE_ALGO
│ │ │ +
409} // namespace std
│ │ │ +
410
│ │ │ +
411#endif /* _STL_NUMERIC_H */
│ │ │ + │ │ │ + │ │ │ + │ │ │ +
constexpr _Tp accumulate(_InputIterator __first, _InputIterator __last, _Tp __init)
Accumulate values in a range.
│ │ │ +
constexpr _OutputIterator adjacent_difference(_InputIterator __first, _InputIterator __last, _OutputIterator __result)
Return differences between adjacent values.
│ │ │ +
constexpr _OutputIterator partial_sum(_InputIterator __first, _InputIterator __last, _OutputIterator __result)
Return list of partial sums.
│ │ │ +
constexpr _Tp inner_product(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _Tp __init)
Compute inner product of two ranges.
│ │ │ +
ISO C++ entities toplevel namespace is std.
│ │ │ +
Traits class for iterators.
│ │ │ + │ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,11 +1,11 @@ │ │ │ │ libstdc++ │ │ │ │ -exception_defines.h │ │ │ │ +stl_numeric.h │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -1// -fno-exceptions Support -*- C++ -*- │ │ │ │ +1// Numeric functions implementation -*- C++ -*- │ │ │ │ 2 │ │ │ │ 3// Copyright (C) 2001-2022 Free Software Foundation, Inc. │ │ │ │ 4// │ │ │ │ 5// This file is part of the GNU ISO C++ Library. This library is free │ │ │ │ 6// software; you can redistribute it and/or modify it under the │ │ │ │ 7// terms of the GNU General Public License as published by the │ │ │ │ 8// Free Software Foundation; either version 3, or (at your option) │ │ │ │ @@ -21,31 +21,427 @@ │ │ │ │ 18// 3.1, as published by the Free Software Foundation. │ │ │ │ 19 │ │ │ │ 20// You should have received a copy of the GNU General Public License and │ │ │ │ 21// a copy of the GCC Runtime Library Exception along with this program; │ │ │ │ 22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see │ │ │ │ 23// . │ │ │ │ 24 │ │ │ │ -25/** @file bits/exception_defines.h │ │ │ │ -26 * This is an internal header file, included by other library headers. │ │ │ │ -27 * Do not attempt to use it directly. @headername{exception} │ │ │ │ -28 */ │ │ │ │ -29 │ │ │ │ -30#ifndef _EXCEPTION_DEFINES_H │ │ │ │ -31#define _EXCEPTION_DEFINES_H 1 │ │ │ │ -32 │ │ │ │ -33#if ! __cpp_exceptions │ │ │ │ -34// Iff -fno-exceptions, transform error handling code to work without it. │ │ │ │ -35# define __try if (true) │ │ │ │ -36# define __catch(X) if (false) │ │ │ │ -37# define __throw_exception_again │ │ │ │ -38#else │ │ │ │ -39// Else proceed normally. │ │ │ │ -40# define __try try │ │ │ │ -41# define __catch(X) catch(X) │ │ │ │ -42# define __throw_exception_again throw │ │ │ │ -43#endif │ │ │ │ -44 │ │ │ │ -45#endif │ │ │ │ +25/* │ │ │ │ +26 * │ │ │ │ +27 * Copyright (c) 1994 │ │ │ │ +28 * Hewlett-Packard Company │ │ │ │ +29 * │ │ │ │ +30 * Permission to use, copy, modify, distribute and sell this software │ │ │ │ +31 * and its documentation for any purpose is hereby granted without fee, │ │ │ │ +32 * provided that the above copyright notice appear in all copies and │ │ │ │ +33 * that both that copyright notice and this permission notice appear │ │ │ │ +34 * in supporting documentation. Hewlett-Packard Company makes no │ │ │ │ +35 * representations about the suitability of this software for any │ │ │ │ +36 * purpose. It is provided "as is" without express or implied warranty. │ │ │ │ +37 * │ │ │ │ +38 * │ │ │ │ +39 * Copyright (c) 1996,1997 │ │ │ │ +40 * Silicon Graphics Computer Systems, Inc. │ │ │ │ +41 * │ │ │ │ +42 * Permission to use, copy, modify, distribute and sell this software │ │ │ │ +43 * and its documentation for any purpose is hereby granted without fee, │ │ │ │ +44 * provided that the above copyright notice appear in all copies and │ │ │ │ +45 * that both that copyright notice and this permission notice appear │ │ │ │ +46 * in supporting documentation. Silicon Graphics makes no │ │ │ │ +47 * representations about the suitability of this software for any │ │ │ │ +48 * purpose. It is provided "as is" without express or implied warranty. │ │ │ │ +49 */ │ │ │ │ +50 │ │ │ │ +51/** @file bits/stl_numeric.h │ │ │ │ +52 * This is an internal header file, included by other library headers. │ │ │ │ +53 * Do not attempt to use it directly. @headername{numeric} │ │ │ │ +54 */ │ │ │ │ +55 │ │ │ │ +56#ifndef _STL_NUMERIC_H │ │ │ │ +57#define _STL_NUMERIC_H 1 │ │ │ │ +58 │ │ │ │ +59#include <_b_i_t_s_/_c_o_n_c_e_p_t___c_h_e_c_k_._h> │ │ │ │ +60#include <_d_e_b_u_g_/_d_e_b_u_g_._h> │ │ │ │ +61#include <_b_i_t_s_/_m_o_v_e_._h> // For _GLIBCXX_MOVE │ │ │ │ +62 │ │ │ │ +63 │ │ │ │ +64namespace _s_t_d _GLIBCXX_VISIBILITY(default) │ │ │ │ +65{ │ │ │ │ +66_GLIBCXX_BEGIN_NAMESPACE_VERSION │ │ │ │ +67 │ │ │ │ +68 /** @defgroup numeric_ops Generalized Numeric operations │ │ │ │ +69 * @ingroup algorithms │ │ │ │ +70 */ │ │ │ │ +71 │ │ │ │ +72#if __cplusplus >= 201103L │ │ │ │ +73 /** │ │ │ │ +74 * @brief Create a range of sequentially increasing values. │ │ │ │ +75 * │ │ │ │ +76 * For each element in the range @p [first,last) assigns @p value and │ │ │ │ +77 * increments @p value as if by @p ++value. │ │ │ │ +78 * │ │ │ │ +79 * @param __first Start of range. │ │ │ │ +80 * @param __last End of range. │ │ │ │ +81 * @param __value Starting value. │ │ │ │ +82 * @return Nothing. │ │ │ │ +83 * @ingroup numeric_ops │ │ │ │ +84 */ │ │ │ │ +85 template │ │ │ │ +86 _GLIBCXX20_CONSTEXPR │ │ │ │ +87 void │ │ │ │ +_8_8 iota(___F_o_r_w_a_r_d_I_t_e_r_a_t_o_r __first, ___F_o_r_w_a_r_d_I_t_e_r_a_t_o_r __last, _Tp __value) │ │ │ │ +89 { │ │ │ │ +90 // concept requirements │ │ │ │ +91 __glibcxx_function_requires(_Mutable_ForwardIteratorConcept< │ │ │ │ +92 ___F_o_r_w_a_r_d_I_t_e_r_a_t_o_r>) │ │ │ │ +93 __glibcxx_function_requires(_ConvertibleConcept<_Tp, │ │ │ │ +94 typename _i_t_e_r_a_t_o_r___t_r_a_i_t_s_<___F_o_r_w_a_r_d_I_t_e_r_a_t_o_r_>_:_:_v_a_l_u_e___t_y_p_e>) │ │ │ │ +95 __glibcxx_requires_valid_range(__first, __last); │ │ │ │ +96 │ │ │ │ +97 for (; __first != __last; ++__first) │ │ │ │ +98 { │ │ │ │ +99 *__first = __value; │ │ │ │ +100 ++__value; │ │ │ │ +101 } │ │ │ │ +102 } │ │ │ │ +103#endif │ │ │ │ +104 │ │ │ │ +105_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ +106 │ │ │ │ +107_GLIBCXX_BEGIN_NAMESPACE_ALGO │ │ │ │ +108 │ │ │ │ +109#if __cplusplus > 201703L │ │ │ │ +110// _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ +111// DR 2055. std::move in std::accumulate and other algorithms │ │ │ │ +112# define _GLIBCXX_MOVE_IF_20(_E) std::move(_E) │ │ │ │ +113#else │ │ │ │ +114# define _GLIBCXX_MOVE_IF_20(_E) _E │ │ │ │ +115#endif │ │ │ │ +116 │ │ │ │ +117 /// @addtogroup numeric_ops │ │ │ │ +118 /// @{ │ │ │ │ +119 │ │ │ │ +120 /** │ │ │ │ +121 * @brief Accumulate values in a range. │ │ │ │ +122 * │ │ │ │ +123 * Accumulates the values in the range [first,last) using operator+(). The │ │ │ │ +124 * initial value is @a init. The values are processed in order. │ │ │ │ +125 * │ │ │ │ +126 * @param __first Start of range. │ │ │ │ +127 * @param __last End of range. │ │ │ │ +128 * @param __init Starting value to add other values to. │ │ │ │ +129 * @return The final sum. │ │ │ │ +130 */ │ │ │ │ +131 template │ │ │ │ +132 _GLIBCXX20_CONSTEXPR │ │ │ │ +133 inline _Tp │ │ │ │ +_1_3_4 _a_c_c_u_m_u_l_a_t_e(___I_n_p_u_t_I_t_e_r_a_t_o_r __first, ___I_n_p_u_t_I_t_e_r_a_t_o_r __last, _Tp __init) │ │ │ │ +135 { │ │ │ │ +136 // concept requirements │ │ │ │ +137 __glibcxx_function_requires(___I_n_p_u_t_I_t_e_r_a_t_o_r_C_o_n_c_e_p_t_<___I_n_p_u_t_I_t_e_r_a_t_o_r_>) │ │ │ │ +138 __glibcxx_requires_valid_range(__first, __last); │ │ │ │ +139 │ │ │ │ +140 for (; __first != __last; ++__first) │ │ │ │ +141 __init = _GLIBCXX_MOVE_IF_20(__init) + *__first; │ │ │ │ +142 return __init; │ │ │ │ +143 } │ │ │ │ +144 │ │ │ │ +145 /** │ │ │ │ +146 * @brief Accumulate values in a range with operation. │ │ │ │ +147 * │ │ │ │ +148 * Accumulates the values in the range `[first,last)` using the function │ │ │ │ +149 * object `__binary_op`. The initial value is `__init`. The values are │ │ │ │ +150 * processed in order. │ │ │ │ +151 * │ │ │ │ +152 * @param __first Start of range. │ │ │ │ +153 * @param __last End of range. │ │ │ │ +154 * @param __init Starting value to add other values to. │ │ │ │ +155 * @param __binary_op Function object to accumulate with. │ │ │ │ +156 * @return The final sum. │ │ │ │ +157 */ │ │ │ │ +158 template │ │ │ │ +159 _GLIBCXX20_CONSTEXPR │ │ │ │ +160 inline _Tp │ │ │ │ +_1_6_1 _a_c_c_u_m_u_l_a_t_e(___I_n_p_u_t_I_t_e_r_a_t_o_r __first, ___I_n_p_u_t_I_t_e_r_a_t_o_r __last, _Tp __init, │ │ │ │ +162 ___B_i_n_a_r_y_O_p_e_r_a_t_i_o_n _____b_i_n_a_r_y___o_p) │ │ │ │ +163 { │ │ │ │ +164 // concept requirements │ │ │ │ +165 __glibcxx_function_requires(___I_n_p_u_t_I_t_e_r_a_t_o_r_C_o_n_c_e_p_t_<___I_n_p_u_t_I_t_e_r_a_t_o_r_>) │ │ │ │ +166 __glibcxx_requires_valid_range(__first, __last); │ │ │ │ +167 │ │ │ │ +168 for (; __first != __last; ++__first) │ │ │ │ +169 __init = _____b_i_n_a_r_y___o_p(_GLIBCXX_MOVE_IF_20(__init), *__first); │ │ │ │ +170 return __init; │ │ │ │ +171 } │ │ │ │ +172 │ │ │ │ +173 /** │ │ │ │ +174 * @brief Compute inner product of two ranges. │ │ │ │ +175 * │ │ │ │ +176 * Starting with an initial value of @p __init, multiplies successive │ │ │ │ +177 * elements from the two ranges and adds each product into the accumulated │ │ │ │ +178 * value using operator+(). The values in the ranges are processed in │ │ │ │ +179 * order. │ │ │ │ +180 * │ │ │ │ +181 * @param __first1 Start of range 1. │ │ │ │ +182 * @param __last1 End of range 1. │ │ │ │ +183 * @param __first2 Start of range 2. │ │ │ │ +184 * @param __init Starting value to add other values to. │ │ │ │ +185 * @return The final inner product. │ │ │ │ +186 */ │ │ │ │ +187 template │ │ │ │ +188 _GLIBCXX20_CONSTEXPR │ │ │ │ +189 inline _Tp │ │ │ │ +_1_9_0 _i_n_n_e_r___p_r_o_d_u_c_t(___I_n_p_u_t_I_t_e_r_a_t_o_r_1 _____f_i_r_s_t_1, ___I_n_p_u_t_I_t_e_r_a_t_o_r_1 _____l_a_s_t_1, │ │ │ │ +191 ___I_n_p_u_t_I_t_e_r_a_t_o_r_2 _____f_i_r_s_t_2, _Tp __init) │ │ │ │ +192 { │ │ │ │ +193 // concept requirements │ │ │ │ +194 __glibcxx_function_requires(___I_n_p_u_t_I_t_e_r_a_t_o_r_C_o_n_c_e_p_t_<___I_n_p_u_t_I_t_e_r_a_t_o_r_1_>) │ │ │ │ +195 __glibcxx_function_requires(___I_n_p_u_t_I_t_e_r_a_t_o_r_C_o_n_c_e_p_t_<___I_n_p_u_t_I_t_e_r_a_t_o_r_2_>) │ │ │ │ +196 __glibcxx_requires_valid_range(_____f_i_r_s_t_1, _____l_a_s_t_1); │ │ │ │ +197 │ │ │ │ +198 for (; _____f_i_r_s_t_1 != _____l_a_s_t_1; ++_____f_i_r_s_t_1, (_v_o_i_d)++_____f_i_r_s_t_2) │ │ │ │ +199 __init = _GLIBCXX_MOVE_IF_20(__init) + (*_____f_i_r_s_t_1 * *_____f_i_r_s_t_2); │ │ │ │ +200 return __init; │ │ │ │ +201 } │ │ │ │ +202 │ │ │ │ +203 /** │ │ │ │ +204 * @brief Compute inner product of two ranges. │ │ │ │ +205 * │ │ │ │ +206 * Starting with an initial value of @p __init, applies @p __binary_op2 to │ │ │ │ +207 * successive elements from the two ranges and accumulates each result into │ │ │ │ +208 * the accumulated value using @p __binary_op1. The values in the ranges are │ │ │ │ +209 * processed in order. │ │ │ │ +210 * │ │ │ │ +211 * @param __first1 Start of range 1. │ │ │ │ +212 * @param __last1 End of range 1. │ │ │ │ +213 * @param __first2 Start of range 2. │ │ │ │ +214 * @param __init Starting value to add other values to. │ │ │ │ +215 * @param __binary_op1 Function object to accumulate with. │ │ │ │ +216 * @param __binary_op2 Function object to apply to pairs of input values. │ │ │ │ +217 * @return The final inner product. │ │ │ │ +218 */ │ │ │ │ +219 template │ │ │ │ +221 _GLIBCXX20_CONSTEXPR │ │ │ │ +222 inline _Tp │ │ │ │ +_2_2_3 _i_n_n_e_r___p_r_o_d_u_c_t(___I_n_p_u_t_I_t_e_r_a_t_o_r_1 _____f_i_r_s_t_1, ___I_n_p_u_t_I_t_e_r_a_t_o_r_1 _____l_a_s_t_1, │ │ │ │ +224 ___I_n_p_u_t_I_t_e_r_a_t_o_r_2 _____f_i_r_s_t_2, _Tp __init, │ │ │ │ +225 ___B_i_n_a_r_y_O_p_e_r_a_t_i_o_n_1 _____b_i_n_a_r_y___o_p_1, │ │ │ │ +226 ___B_i_n_a_r_y_O_p_e_r_a_t_i_o_n_2 _____b_i_n_a_r_y___o_p_2) │ │ │ │ +227 { │ │ │ │ +228 // concept requirements │ │ │ │ +229 __glibcxx_function_requires(___I_n_p_u_t_I_t_e_r_a_t_o_r_C_o_n_c_e_p_t_<___I_n_p_u_t_I_t_e_r_a_t_o_r_1_>) │ │ │ │ +230 __glibcxx_function_requires(___I_n_p_u_t_I_t_e_r_a_t_o_r_C_o_n_c_e_p_t_<___I_n_p_u_t_I_t_e_r_a_t_o_r_2_>) │ │ │ │ +231 __glibcxx_requires_valid_range(_____f_i_r_s_t_1, _____l_a_s_t_1); │ │ │ │ +232 │ │ │ │ +233 for (; _____f_i_r_s_t_1 != _____l_a_s_t_1; ++_____f_i_r_s_t_1, (_v_o_i_d)++_____f_i_r_s_t_2) │ │ │ │ +234 __init = _____b_i_n_a_r_y___o_p_1(_GLIBCXX_MOVE_IF_20(__init), │ │ │ │ +235 _____b_i_n_a_r_y___o_p_2(*_____f_i_r_s_t_1, *_____f_i_r_s_t_2)); │ │ │ │ +236 return __init; │ │ │ │ +237 } │ │ │ │ +238 │ │ │ │ +239 /** │ │ │ │ +240 * @brief Return list of partial sums │ │ │ │ +241 * │ │ │ │ +242 * Accumulates the values in the range [first,last) using the @c + operator. │ │ │ │ +243 * As each successive input value is added into the total, that partial sum │ │ │ │ +244 * is written to @p __result. Therefore, the first value in @p __result is │ │ │ │ +245 * the first value of the input, the second value in @p __result is the sum │ │ │ │ +246 * of the first and second input values, and so on. │ │ │ │ +247 * │ │ │ │ +248 * @param __first Start of input range. │ │ │ │ +249 * @param __last End of input range. │ │ │ │ +250 * @param __result Output sum. │ │ │ │ +251 * @return Iterator pointing just beyond the values written to __result. │ │ │ │ +252 */ │ │ │ │ +253 template │ │ │ │ +254 _GLIBCXX20_CONSTEXPR │ │ │ │ +255 _OutputIterator │ │ │ │ +_2_5_6 _p_a_r_t_i_a_l___s_u_m(___I_n_p_u_t_I_t_e_r_a_t_o_r __first, ___I_n_p_u_t_I_t_e_r_a_t_o_r __last, │ │ │ │ +257 _OutputIterator __result) │ │ │ │ +258 { │ │ │ │ +259 typedef typename _i_t_e_r_a_t_o_r___t_r_a_i_t_s_<___I_n_p_u_t_I_t_e_r_a_t_o_r_>_:_:_v_a_l_u_e___t_y_p_e _ValueType; │ │ │ │ +260 │ │ │ │ +261 // concept requirements │ │ │ │ +262 __glibcxx_function_requires(___I_n_p_u_t_I_t_e_r_a_t_o_r_C_o_n_c_e_p_t_<___I_n_p_u_t_I_t_e_r_a_t_o_r_>) │ │ │ │ +263 __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator, │ │ │ │ +264 _ValueType>) │ │ │ │ +265 __glibcxx_requires_valid_range(__first, __last); │ │ │ │ +266 │ │ │ │ +267 if (__first == __last) │ │ │ │ +268 return __result; │ │ │ │ +269 _ValueType __value = *__first; │ │ │ │ +270 *__result = __value; │ │ │ │ +271 while (++__first != __last) │ │ │ │ +272 { │ │ │ │ +273 __value = _GLIBCXX_MOVE_IF_20(__value) + *__first; │ │ │ │ +274 *++__result = __value; │ │ │ │ +275 } │ │ │ │ +276 return ++__result; │ │ │ │ +277 } │ │ │ │ +278 │ │ │ │ +279 /** │ │ │ │ +280 * @brief Return list of partial sums │ │ │ │ +281 * │ │ │ │ +282 * Accumulates the values in the range [first,last) using @p __binary_op. │ │ │ │ +283 * As each successive input value is added into the total, that partial sum │ │ │ │ +284 * is written to @p __result. Therefore, the first value in @p __result is │ │ │ │ +285 * the first value of the input, the second value in @p __result is the sum │ │ │ │ +286 * of the first and second input values, and so on. │ │ │ │ +287 * │ │ │ │ +288 * @param __first Start of input range. │ │ │ │ +289 * @param __last End of input range. │ │ │ │ +290 * @param __result Output sum. │ │ │ │ +291 * @param __binary_op Function object. │ │ │ │ +292 * @return Iterator pointing just beyond the values written to __result. │ │ │ │ +293 */ │ │ │ │ +294 template │ │ │ │ +296 _GLIBCXX20_CONSTEXPR │ │ │ │ +297 _OutputIterator │ │ │ │ +_2_9_8 _p_a_r_t_i_a_l___s_u_m(___I_n_p_u_t_I_t_e_r_a_t_o_r __first, ___I_n_p_u_t_I_t_e_r_a_t_o_r __last, │ │ │ │ +299 _OutputIterator __result, ___B_i_n_a_r_y_O_p_e_r_a_t_i_o_n _____b_i_n_a_r_y___o_p) │ │ │ │ +300 { │ │ │ │ +301 typedef typename _i_t_e_r_a_t_o_r___t_r_a_i_t_s_<___I_n_p_u_t_I_t_e_r_a_t_o_r_>_:_:_v_a_l_u_e___t_y_p_e _ValueType; │ │ │ │ +302 │ │ │ │ +303 // concept requirements │ │ │ │ +304 __glibcxx_function_requires(___I_n_p_u_t_I_t_e_r_a_t_o_r_C_o_n_c_e_p_t_<___I_n_p_u_t_I_t_e_r_a_t_o_r_>) │ │ │ │ +305 __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator, │ │ │ │ +306 _ValueType>) │ │ │ │ +307 __glibcxx_requires_valid_range(__first, __last); │ │ │ │ +308 │ │ │ │ +309 if (__first == __last) │ │ │ │ +310 return __result; │ │ │ │ +311 _ValueType __value = *__first; │ │ │ │ +312 *__result = __value; │ │ │ │ +313 while (++__first != __last) │ │ │ │ +314 { │ │ │ │ +315 __value = _____b_i_n_a_r_y___o_p(_GLIBCXX_MOVE_IF_20(__value), *__first); │ │ │ │ +316 *++__result = __value; │ │ │ │ +317 } │ │ │ │ +318 return ++__result; │ │ │ │ +319 } │ │ │ │ +320 │ │ │ │ +321 /** │ │ │ │ +322 * @brief Return differences between adjacent values. │ │ │ │ +323 * │ │ │ │ +324 * Computes the difference between adjacent values in the range │ │ │ │ +325 * [first,last) using operator-() and writes the result to @p __result. │ │ │ │ +326 * │ │ │ │ +327 * @param __first Start of input range. │ │ │ │ +328 * @param __last End of input range. │ │ │ │ +329 * @param __result Output sums. │ │ │ │ +330 * @return Iterator pointing just beyond the values written to result. │ │ │ │ +331 */ │ │ │ │ +332 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ +333 // DR 539. partial_sum and adjacent_difference should mention requirements │ │ │ │ +334 template │ │ │ │ +335 _GLIBCXX20_CONSTEXPR │ │ │ │ +336 _OutputIterator │ │ │ │ +_3_3_7 _a_d_j_a_c_e_n_t___d_i_f_f_e_r_e_n_c_e(___I_n_p_u_t_I_t_e_r_a_t_o_r __first, │ │ │ │ +338 ___I_n_p_u_t_I_t_e_r_a_t_o_r __last, _OutputIterator __result) │ │ │ │ +339 { │ │ │ │ +340 typedef typename _i_t_e_r_a_t_o_r___t_r_a_i_t_s_<___I_n_p_u_t_I_t_e_r_a_t_o_r_>_:_:_v_a_l_u_e___t_y_p_e _ValueType; │ │ │ │ +341 │ │ │ │ +342 // concept requirements │ │ │ │ +343 __glibcxx_function_requires(___I_n_p_u_t_I_t_e_r_a_t_o_r_C_o_n_c_e_p_t_<___I_n_p_u_t_I_t_e_r_a_t_o_r_>) │ │ │ │ +344 __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator, │ │ │ │ +345 _ValueType>) │ │ │ │ +346 __glibcxx_requires_valid_range(__first, __last); │ │ │ │ +347 │ │ │ │ +348 if (__first == __last) │ │ │ │ +349 return __result; │ │ │ │ +350 _ValueType __value = *__first; │ │ │ │ +351 *__result = __value; │ │ │ │ +352 while (++__first != __last) │ │ │ │ +353 { │ │ │ │ +354 _ValueType _____t_m_p = *__first; │ │ │ │ +355 *++__result = _____t_m_p - _GLIBCXX_MOVE_IF_20(__value); │ │ │ │ +356 __value = _GLIBCXX_MOVE(_____t_m_p); │ │ │ │ +357 } │ │ │ │ +358 return ++__result; │ │ │ │ +359 } │ │ │ │ +360 │ │ │ │ +361 /** │ │ │ │ +362 * @brief Return differences between adjacent values. │ │ │ │ +363 * │ │ │ │ +364 * Computes the difference between adjacent values in the range │ │ │ │ +365 * [__first,__last) using the function object @p __binary_op and writes the │ │ │ │ +366 * result to @p __result. │ │ │ │ +367 * │ │ │ │ +368 * @param __first Start of input range. │ │ │ │ +369 * @param __last End of input range. │ │ │ │ +370 * @param __result Output sum. │ │ │ │ +371 * @param __binary_op Function object. │ │ │ │ +372 * @return Iterator pointing just beyond the values written to result. │ │ │ │ +373 */ │ │ │ │ +374 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ +375 // DR 539. partial_sum and adjacent_difference should mention requirements │ │ │ │ +376 template │ │ │ │ +378 _GLIBCXX20_CONSTEXPR │ │ │ │ +379 _OutputIterator │ │ │ │ +_3_8_0 _a_d_j_a_c_e_n_t___d_i_f_f_e_r_e_n_c_e(___I_n_p_u_t_I_t_e_r_a_t_o_r __first, ___I_n_p_u_t_I_t_e_r_a_t_o_r __last, │ │ │ │ +381 _OutputIterator __result, ___B_i_n_a_r_y_O_p_e_r_a_t_i_o_n _____b_i_n_a_r_y___o_p) │ │ │ │ +382 { │ │ │ │ +383 typedef typename _i_t_e_r_a_t_o_r___t_r_a_i_t_s_<___I_n_p_u_t_I_t_e_r_a_t_o_r_>_:_:_v_a_l_u_e___t_y_p_e _ValueType; │ │ │ │ +384 │ │ │ │ +385 // concept requirements │ │ │ │ +386 __glibcxx_function_requires(___I_n_p_u_t_I_t_e_r_a_t_o_r_C_o_n_c_e_p_t_<___I_n_p_u_t_I_t_e_r_a_t_o_r_>) │ │ │ │ +387 __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator, │ │ │ │ +388 _ValueType>) │ │ │ │ +389 __glibcxx_requires_valid_range(__first, __last); │ │ │ │ +390 │ │ │ │ +391 if (__first == __last) │ │ │ │ +392 return __result; │ │ │ │ +393 _ValueType __value = *__first; │ │ │ │ +394 *__result = __value; │ │ │ │ +395 while (++__first != __last) │ │ │ │ +396 { │ │ │ │ +397 _ValueType _____t_m_p = *__first; │ │ │ │ +398 *++__result = _____b_i_n_a_r_y___o_p(_____t_m_p, _GLIBCXX_MOVE_IF_20(__value)); │ │ │ │ +399 __value = _GLIBCXX_MOVE(_____t_m_p); │ │ │ │ +400 } │ │ │ │ +401 return ++__result; │ │ │ │ +402 } │ │ │ │ +403 │ │ │ │ +404 /// @} group numeric_ops │ │ │ │ +405 │ │ │ │ +406#undef _GLIBCXX_MOVE_IF_20 │ │ │ │ +407 │ │ │ │ +408_GLIBCXX_END_NAMESPACE_ALGO │ │ │ │ +409} // namespace std │ │ │ │ +410 │ │ │ │ +411#endif /* _STL_NUMERIC_H */ │ │ │ │ +_c_o_n_c_e_p_t___c_h_e_c_k_._h │ │ │ │ +_m_o_v_e_._h │ │ │ │ +_d_e_b_u_g_._h │ │ │ │ +_s_t_d_:_:_a_c_c_u_m_u_l_a_t_e │ │ │ │ +constexpr _Tp accumulate(_InputIterator __first, _InputIterator __last, _Tp │ │ │ │ +__init) │ │ │ │ +Accumulate values in a range. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___n_u_m_e_r_i_c_._h_:_1_3_4 │ │ │ │ +_s_t_d_:_:_a_d_j_a_c_e_n_t___d_i_f_f_e_r_e_n_c_e │ │ │ │ +constexpr _OutputIterator adjacent_difference(_InputIterator __first, │ │ │ │ +_InputIterator __last, _OutputIterator __result) │ │ │ │ +Return differences between adjacent values. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___n_u_m_e_r_i_c_._h_:_3_3_7 │ │ │ │ +_s_t_d_:_:_p_a_r_t_i_a_l___s_u_m │ │ │ │ +constexpr _OutputIterator partial_sum(_InputIterator __first, _InputIterator │ │ │ │ +__last, _OutputIterator __result) │ │ │ │ +Return list of partial sums. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___n_u_m_e_r_i_c_._h_:_2_5_6 │ │ │ │ +_s_t_d_:_:_i_n_n_e_r___p_r_o_d_u_c_t │ │ │ │ +constexpr _Tp inner_product(_InputIterator1 __first1, _InputIterator1 __last1, │ │ │ │ +_InputIterator2 __first2, _Tp __init) │ │ │ │ +Compute inner product of two ranges. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___n_u_m_e_r_i_c_._h_:_1_9_0 │ │ │ │ +_s_t_d │ │ │ │ +ISO C++ entities toplevel namespace is std. │ │ │ │ +_s_t_d_:_:_i_t_e_r_a_t_o_r___t_r_a_i_t_s │ │ │ │ +Traits class for iterators. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___i_t_e_r_a_t_o_r___b_a_s_e___t_y_p_e_s_._h_:_1_7_8 │ │ │ │ +_s_t_d_:_:_a_u_t_o___p_t_r___r_e_f │ │ │ │ +DDeeffiinniittiioonn _a_u_t_o___p_t_r_._h_:_4_9 │ │ │ │ * _b_i_t_s │ │ │ │ - * _e_x_c_e_p_t_i_o_n___d_e_f_i_n_e_s_._h │ │ │ │ + * _s_t_l___n_u_m_e_r_i_c_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-12-base/libstdc++/user/a00338.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: exception.h File Reference │ │ │ +libstdc++: regex.tcc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -46,40 +46,36 @@ │ │ │ /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */ │ │ │ $(document).ready(function(){initNavTree('a00338.html',''); initResizable(); }); │ │ │ /* @license-end */ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -Classes | │ │ │ Namespaces
│ │ │ -
exception.h File Reference
│ │ │ +
regex.tcc File Reference
│ │ │
│ │ │
│ │ │ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ -

│ │ │ -Classes

class  std::exception
 
│ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ + │ │ │

│ │ │ Namespaces

namespace  std
 
namespace  std::__detail
 
│ │ │

Detailed Description

│ │ │ -

This is an internal header file, included by other library headers. Do not attempt to use it directly.

│ │ │ +

This is an internal header file, included by other library headers. Do not attempt to use it directly. Instead, include <regex>.

│ │ │ │ │ │ -

Definition in file exception.h.

│ │ │ +

Definition in file regex.tcc.

│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,17 +1,16 @@ │ │ │ │ libstdc++ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ -exception.h File Reference │ │ │ │ +_N_a_m_e_s_p_a_c_e_s │ │ │ │ +regex.tcc File Reference │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -CCllaasssseess │ │ │ │ -class   _s_t_d_:_:_e_x_c_e_p_t_i_o_n │ │ │ │ -  │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _s_t_d │ │ │ │   │ │ │ │ +namespace   _s_t_d_:_:_____d_e_t_a_i_l │ │ │ │ +  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ This is an internal header file, included by other library headers. Do not │ │ │ │ -attempt to use it directly. │ │ │ │ -Definition in file _e_x_c_e_p_t_i_o_n_._h. │ │ │ │ +attempt to use it directly. Instead, include . │ │ │ │ +Definition in file _r_e_g_e_x_._t_c_c. │ │ │ │ * _b_i_t_s │ │ │ │ - * _e_x_c_e_p_t_i_o_n_._h │ │ │ │ + * _r_e_g_e_x_._t_c_c │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-12-base/libstdc++/user/a00338_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: exception.h Source File │ │ │ +libstdc++: regex.tcc Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -45,115 +45,716 @@ │ │ │ │ │ │
│ │ │
│ │ │ -
exception.h
│ │ │ +
regex.tcc
│ │ │
│ │ │
│ │ │ -Go to the documentation of this file.
1// Exception Handling support header for -*- C++ -*-
│ │ │ +Go to the documentation of this file.
1// class template regex -*- C++ -*-
│ │ │
2
│ │ │ -
3// Copyright (C) 2016-2022 Free Software Foundation, Inc.
│ │ │ +
3// Copyright (C) 2013-2022 Free Software Foundation, Inc.
│ │ │
4//
│ │ │ -
5// This file is part of GCC.
│ │ │ -
6//
│ │ │ -
7// GCC is free software; you can redistribute it and/or modify
│ │ │ -
8// it under the terms of the GNU General Public License as published by
│ │ │ -
9// the Free Software Foundation; either version 3, or (at your option)
│ │ │ -
10// any later version.
│ │ │ -
11//
│ │ │ -
12// GCC is distributed in the hope that it will be useful,
│ │ │ -
13// but WITHOUT ANY WARRANTY; without even the implied warranty of
│ │ │ -
14// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
│ │ │ -
15// GNU General Public License for more details.
│ │ │ -
16//
│ │ │ -
17// Under Section 7 of GPL version 3, you are granted additional
│ │ │ -
18// permissions described in the GCC Runtime Library Exception, version
│ │ │ -
19// 3.1, as published by the Free Software Foundation.
│ │ │ -
20
│ │ │ -
21// You should have received a copy of the GNU General Public License and
│ │ │ -
22// a copy of the GCC Runtime Library Exception along with this program;
│ │ │ -
23// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
│ │ │ -
24// <http://www.gnu.org/licenses/>.
│ │ │ -
25
│ │ │ -
26/** @file bits/exception.h
│ │ │ +
5// This file is part of the GNU ISO C++ Library. This library is free
│ │ │ +
6// software; you can redistribute it and/or modify it under the
│ │ │ +
7// terms of the GNU General Public License as published by the
│ │ │ +
8// Free Software Foundation; either version 3, or (at your option)
│ │ │ +
9// any later version.
│ │ │ +
10
│ │ │ +
11// This library is distributed in the hope that it will be useful,
│ │ │ +
12// but WITHOUT ANY WARRANTY; without even the implied warranty of
│ │ │ +
13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
│ │ │ +
14// GNU General Public License for more details.
│ │ │ +
15
│ │ │ +
16// Under Section 7 of GPL version 3, you are granted additional
│ │ │ +
17// permissions described in the GCC Runtime Library Exception, version
│ │ │ +
18// 3.1, as published by the Free Software Foundation.
│ │ │ +
19
│ │ │ +
20// You should have received a copy of the GNU General Public License and
│ │ │ +
21// a copy of the GCC Runtime Library Exception along with this program;
│ │ │ +
22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
│ │ │ +
23// <http://www.gnu.org/licenses/>.
│ │ │ +
24
│ │ │ +
25/**
│ │ │ +
26 * @file bits/regex.tcc
│ │ │
27 * This is an internal header file, included by other library headers.
│ │ │ -
28 * Do not attempt to use it directly.
│ │ │ +
28 * Do not attempt to use it directly. @headername{regex}
│ │ │
29 */
│ │ │
30
│ │ │ -
31#ifndef __EXCEPTION_H
│ │ │ -
32#define __EXCEPTION_H 1
│ │ │ -
33
│ │ │ -
34#pragma GCC system_header
│ │ │ -
35
│ │ │ -
36#pragma GCC visibility push(default)
│ │ │ -
37
│ │ │ -
38#include <bits/c++config.h>
│ │ │ -
39
│ │ │ -
40extern "C++" {
│ │ │ -
41
│ │ │ -
42namespace std
│ │ │ -
43{
│ │ │ -
44 /**
│ │ │ -
45 * @defgroup exceptions Exceptions
│ │ │ -
46 * @ingroup diagnostics
│ │ │ -
47 * @since C++98
│ │ │ -
48 *
│ │ │ -
49 * Classes and functions for reporting errors via exceptions.
│ │ │ -
50 * @{
│ │ │ -
51 */
│ │ │ -
52
│ │ │ -
53 /**
│ │ │ -
54 * @brief Base class for all library exceptions.
│ │ │ -
55 *
│ │ │ -
56 * This is the base class for all exceptions thrown by the standard
│ │ │ -
57 * library, and by certain language expressions. You are free to derive
│ │ │ -
58 * your own %exception classes, or use a different hierarchy, or to
│ │ │ -
59 * throw non-class data (e.g., fundamental types).
│ │ │ -
60 */
│ │ │ -
│ │ │ - │ │ │ -
62 {
│ │ │ -
63 public:
│ │ │ - │ │ │ -
65 virtual ~exception() _GLIBCXX_TXN_SAFE_DYN _GLIBCXX_NOTHROW;
│ │ │ -
66#if __cplusplus >= 201103L
│ │ │ -
67 exception(const exception&) = default;
│ │ │ -
68 exception& operator=(const exception&) = default;
│ │ │ -
69 exception(exception&&) = default;
│ │ │ -
70 exception& operator=(exception&&) = default;
│ │ │ -
71#endif
│ │ │ -
72
│ │ │ -
73 /** Returns a C-style character string describing the general cause
│ │ │ -
74 * of the current error. */
│ │ │ -
75 virtual const char*
│ │ │ -
76 what() const _GLIBCXX_TXN_SAFE_DYN _GLIBCXX_NOTHROW;
│ │ │ -
77 };
│ │ │ -
│ │ │ -
78
│ │ │ -
79 /// @}
│ │ │ -
80
│ │ │ -
81} // namespace std
│ │ │ -
82
│ │ │ -
83}
│ │ │ -
84
│ │ │ -
85#pragma GCC visibility pop
│ │ │ -
86
│ │ │ -
87#endif
│ │ │ - │ │ │ +
31namespace std _GLIBCXX_VISIBILITY(default)
│ │ │ +
32{
│ │ │ +
33_GLIBCXX_BEGIN_NAMESPACE_VERSION
│ │ │ +
34
│ │ │ +
35namespace __detail
│ │ │ +
36{
│ │ │ +
37 /// @cond undocumented
│ │ │ +
38
│ │ │ +
39 // Result of merging regex_match and regex_search.
│ │ │ +
40 //
│ │ │ +
41 // __policy now can be _S_auto (auto dispatch) and _S_alternate (use
│ │ │ +
42 // the other one if possible, for test purpose).
│ │ │ +
43 //
│ │ │ +
44 // That __match_mode is true means regex_match, else regex_search.
│ │ │ +
45 template<typename _BiIter, typename _Alloc,
│ │ │ +
46 typename _CharT, typename _TraitsT>
│ │ │ +
47 bool
│ │ │ +
48 __regex_algo_impl(_BiIter __s,
│ │ │ +
49 _BiIter __e,
│ │ │ +
50 match_results<_BiIter, _Alloc>& __m,
│ │ │ +
51 const basic_regex<_CharT, _TraitsT>& __re,
│ │ │ + │ │ │ +
53 _RegexExecutorPolicy __policy,
│ │ │ +
54 bool __match_mode)
│ │ │ +
55 {
│ │ │ +
56 if (__re._M_automaton == nullptr)
│ │ │ +
57 return false;
│ │ │ +
58
│ │ │ +
59 typename match_results<_BiIter, _Alloc>::_Unchecked& __res = __m;
│ │ │ +
60 __m._M_begin = __s;
│ │ │ +
61 __m._M_resize(__re._M_automaton->_M_sub_count());
│ │ │ +
62
│ │ │ +
63 bool __ret;
│ │ │ +
64 if ((__re.flags() & regex_constants::__polynomial)
│ │ │ +
65 || (__policy == _RegexExecutorPolicy::_S_alternate
│ │ │ +
66 && !__re._M_automaton->_M_has_backref))
│ │ │ +
67 {
│ │ │ +
68 _Executor<_BiIter, _Alloc, _TraitsT, false>
│ │ │ +
69 __executor(__s, __e, __res, __re, __flags);
│ │ │ +
70 if (__match_mode)
│ │ │ +
71 __ret = __executor._M_match();
│ │ │ +
72 else
│ │ │ +
73 __ret = __executor._M_search();
│ │ │ +
74 }
│ │ │ +
75 else
│ │ │ +
76 {
│ │ │ +
77 _Executor<_BiIter, _Alloc, _TraitsT, true>
│ │ │ +
78 __executor(__s, __e, __res, __re, __flags);
│ │ │ +
79 if (__match_mode)
│ │ │ +
80 __ret = __executor._M_match();
│ │ │ +
81 else
│ │ │ +
82 __ret = __executor._M_search();
│ │ │ +
83 }
│ │ │ +
84 if (__ret)
│ │ │ +
85 {
│ │ │ +
86 for (auto& __it : __res)
│ │ │ +
87 if (!__it.matched)
│ │ │ +
88 __it.first = __it.second = __e;
│ │ │ +
89 auto& __pre = __m._M_prefix();
│ │ │ +
90 auto& __suf = __m._M_suffix();
│ │ │ +
91 if (__match_mode)
│ │ │ +
92 {
│ │ │ +
93 __pre.matched = false;
│ │ │ +
94 __pre.first = __s;
│ │ │ +
95 __pre.second = __s;
│ │ │ +
96 __suf.matched = false;
│ │ │ +
97 __suf.first = __e;
│ │ │ +
98 __suf.second = __e;
│ │ │ +
99 }
│ │ │ +
100 else
│ │ │ +
101 {
│ │ │ +
102 __pre.first = __s;
│ │ │ +
103 __pre.second = __res[0].first;
│ │ │ +
104 __pre.matched = (__pre.first != __pre.second);
│ │ │ +
105 __suf.first = __res[0].second;
│ │ │ +
106 __suf.second = __e;
│ │ │ +
107 __suf.matched = (__suf.first != __suf.second);
│ │ │ +
108 }
│ │ │ +
109 }
│ │ │ +
110 else
│ │ │ +
111 {
│ │ │ +
112 __m._M_establish_failed_match(__e);
│ │ │ +
113 }
│ │ │ +
114 return __ret;
│ │ │ +
115 }
│ │ │ +
116 /// @endcond
│ │ │ +
117} // namespace __detail
│ │ │ +
118
│ │ │ +
119 /// @cond
│ │ │ +
120
│ │ │ +
121 template<typename _Ch_type>
│ │ │ +
122 template<typename _Fwd_iter>
│ │ │ +
123 typename regex_traits<_Ch_type>::string_type
│ │ │ + │ │ │ +
125 lookup_collatename(_Fwd_iter __first, _Fwd_iter __last) const
│ │ │ +
126 {
│ │ │ +
127 typedef std::ctype<char_type> __ctype_type;
│ │ │ +
128 const __ctype_type& __fctyp(use_facet<__ctype_type>(_M_locale));
│ │ │ +
129
│ │ │ +
130 static const char* __collatenames[] =
│ │ │ +
131 {
│ │ │ +
132 "NUL",
│ │ │ +
133 "SOH",
│ │ │ +
134 "STX",
│ │ │ +
135 "ETX",
│ │ │ +
136 "EOT",
│ │ │ +
137 "ENQ",
│ │ │ +
138 "ACK",
│ │ │ +
139 "alert",
│ │ │ +
140 "backspace",
│ │ │ +
141 "tab",
│ │ │ +
142 "newline",
│ │ │ +
143 "vertical-tab",
│ │ │ +
144 "form-feed",
│ │ │ +
145 "carriage-return",
│ │ │ +
146 "SO",
│ │ │ +
147 "SI",
│ │ │ +
148 "DLE",
│ │ │ +
149 "DC1",
│ │ │ +
150 "DC2",
│ │ │ +
151 "DC3",
│ │ │ +
152 "DC4",
│ │ │ +
153 "NAK",
│ │ │ +
154 "SYN",
│ │ │ +
155 "ETB",
│ │ │ +
156 "CAN",
│ │ │ +
157 "EM",
│ │ │ +
158 "SUB",
│ │ │ +
159 "ESC",
│ │ │ +
160 "IS4",
│ │ │ +
161 "IS3",
│ │ │ +
162 "IS2",
│ │ │ +
163 "IS1",
│ │ │ +
164 "space",
│ │ │ +
165 "exclamation-mark",
│ │ │ +
166 "quotation-mark",
│ │ │ +
167 "number-sign",
│ │ │ +
168 "dollar-sign",
│ │ │ +
169 "percent-sign",
│ │ │ +
170 "ampersand",
│ │ │ +
171 "apostrophe",
│ │ │ +
172 "left-parenthesis",
│ │ │ +
173 "right-parenthesis",
│ │ │ +
174 "asterisk",
│ │ │ +
175 "plus-sign",
│ │ │ +
176 "comma",
│ │ │ +
177 "hyphen",
│ │ │ +
178 "period",
│ │ │ +
179 "slash",
│ │ │ +
180 "zero",
│ │ │ +
181 "one",
│ │ │ +
182 "two",
│ │ │ +
183 "three",
│ │ │ +
184 "four",
│ │ │ +
185 "five",
│ │ │ +
186 "six",
│ │ │ +
187 "seven",
│ │ │ +
188 "eight",
│ │ │ +
189 "nine",
│ │ │ +
190 "colon",
│ │ │ +
191 "semicolon",
│ │ │ +
192 "less-than-sign",
│ │ │ +
193 "equals-sign",
│ │ │ +
194 "greater-than-sign",
│ │ │ +
195 "question-mark",
│ │ │ +
196 "commercial-at",
│ │ │ +
197 "A",
│ │ │ +
198 "B",
│ │ │ +
199 "C",
│ │ │ +
200 "D",
│ │ │ +
201 "E",
│ │ │ +
202 "F",
│ │ │ +
203 "G",
│ │ │ +
204 "H",
│ │ │ +
205 "I",
│ │ │ +
206 "J",
│ │ │ +
207 "K",
│ │ │ +
208 "L",
│ │ │ +
209 "M",
│ │ │ +
210 "N",
│ │ │ +
211 "O",
│ │ │ +
212 "P",
│ │ │ +
213 "Q",
│ │ │ +
214 "R",
│ │ │ +
215 "S",
│ │ │ +
216 "T",
│ │ │ +
217 "U",
│ │ │ +
218 "V",
│ │ │ +
219 "W",
│ │ │ +
220 "X",
│ │ │ +
221 "Y",
│ │ │ +
222 "Z",
│ │ │ +
223 "left-square-bracket",
│ │ │ +
224 "backslash",
│ │ │ +
225 "right-square-bracket",
│ │ │ +
226 "circumflex",
│ │ │ +
227 "underscore",
│ │ │ +
228 "grave-accent",
│ │ │ +
229 "a",
│ │ │ +
230 "b",
│ │ │ +
231 "c",
│ │ │ +
232 "d",
│ │ │ +
233 "e",
│ │ │ +
234 "f",
│ │ │ +
235 "g",
│ │ │ +
236 "h",
│ │ │ +
237 "i",
│ │ │ +
238 "j",
│ │ │ +
239 "k",
│ │ │ +
240 "l",
│ │ │ +
241 "m",
│ │ │ +
242 "n",
│ │ │ +
243 "o",
│ │ │ +
244 "p",
│ │ │ +
245 "q",
│ │ │ +
246 "r",
│ │ │ +
247 "s",
│ │ │ +
248 "t",
│ │ │ +
249 "u",
│ │ │ +
250 "v",
│ │ │ +
251 "w",
│ │ │ +
252 "x",
│ │ │ +
253 "y",
│ │ │ +
254 "z",
│ │ │ +
255 "left-curly-bracket",
│ │ │ +
256 "vertical-line",
│ │ │ +
257 "right-curly-bracket",
│ │ │ +
258 "tilde",
│ │ │ +
259 "DEL",
│ │ │ +
260 };
│ │ │ +
261
│ │ │ +
262 string __s;
│ │ │ +
263 for (; __first != __last; ++__first)
│ │ │ +
264 __s += __fctyp.narrow(*__first, 0);
│ │ │ +
265
│ │ │ +
266 for (const auto& __it : __collatenames)
│ │ │ +
267 if (__s == __it)
│ │ │ +
268 return string_type(1, __fctyp.widen(
│ │ │ +
269 static_cast<char>(&__it - __collatenames)));
│ │ │ +
270
│ │ │ +
271 // TODO Add digraph support:
│ │ │ +
272 // http://boost.sourceforge.net/libs/regex/doc/collating_names.html
│ │ │ +
273
│ │ │ +
274 return string_type();
│ │ │ +
275 }
│ │ │ +
276
│ │ │ +
277 template<typename _Ch_type>
│ │ │ +
278 template<typename _Fwd_iter>
│ │ │ +
279 typename regex_traits<_Ch_type>::char_class_type
│ │ │ + │ │ │ +
281 lookup_classname(_Fwd_iter __first, _Fwd_iter __last, bool __icase) const
│ │ │ +
282 {
│ │ │ +
283 typedef std::ctype<char_type> __ctype_type;
│ │ │ +
284 const __ctype_type& __fctyp(use_facet<__ctype_type>(_M_locale));
│ │ │ +
285
│ │ │ +
286 // Mappings from class name to class mask.
│ │ │ +
287 static const pair<const char*, char_class_type> __classnames[] =
│ │ │ +
288 {
│ │ │ +
289 {"d", ctype_base::digit},
│ │ │ +
290 {"w", {ctype_base::alnum, _RegexMask::_S_under}},
│ │ │ +
291 {"s", ctype_base::space},
│ │ │ +
292 {"alnum", ctype_base::alnum},
│ │ │ +
293 {"alpha", ctype_base::alpha},
│ │ │ +
294 {"blank", ctype_base::blank},
│ │ │ +
295 {"cntrl", ctype_base::cntrl},
│ │ │ +
296 {"digit", ctype_base::digit},
│ │ │ +
297 {"graph", ctype_base::graph},
│ │ │ +
298 {"lower", ctype_base::lower},
│ │ │ +
299 {"print", ctype_base::print},
│ │ │ +
300 {"punct", ctype_base::punct},
│ │ │ +
301 {"space", ctype_base::space},
│ │ │ +
302 {"upper", ctype_base::upper},
│ │ │ +
303 {"xdigit", ctype_base::xdigit},
│ │ │ +
304 };
│ │ │ +
305
│ │ │ +
306 string __s;
│ │ │ +
307 for (; __first != __last; ++__first)
│ │ │ +
308 __s += __fctyp.narrow(__fctyp.tolower(*__first), 0);
│ │ │ +
309
│ │ │ +
310 for (const auto& __it : __classnames)
│ │ │ +
311 if (__s == __it.first)
│ │ │ +
312 {
│ │ │ +
313 if (__icase
│ │ │ +
314 && ((__it.second
│ │ │ +
315 & (ctype_base::lower | ctype_base::upper)) != 0))
│ │ │ +
316 return ctype_base::alpha;
│ │ │ +
317 return __it.second;
│ │ │ +
318 }
│ │ │ +
319 return 0;
│ │ │ +
320 }
│ │ │ +
321
│ │ │ +
322 template<typename _Ch_type>
│ │ │ +
323 bool
│ │ │ + │ │ │ +
325 isctype(_Ch_type __c, char_class_type __f) const
│ │ │ +
326 {
│ │ │ +
327 typedef std::ctype<char_type> __ctype_type;
│ │ │ +
328 const __ctype_type& __fctyp(use_facet<__ctype_type>(_M_locale));
│ │ │ +
329
│ │ │ +
330 return __fctyp.is(__f._M_base, __c)
│ │ │ +
331 // [[:w:]]
│ │ │ +
332 || ((__f._M_extended & _RegexMask::_S_under)
│ │ │ +
333 && __c == __fctyp.widen('_'));
│ │ │ +
334 }
│ │ │ +
335
│ │ │ +
336 template<typename _Ch_type>
│ │ │ +
337 int
│ │ │ + │ │ │ +
339 value(_Ch_type __ch, int __radix) const
│ │ │ +
340 {
│ │ │ +
341 std::basic_istringstream<char_type> __is(string_type(1, __ch));
│ │ │ +
342 long __v;
│ │ │ +
343 if (__radix == 8)
│ │ │ +
344 __is >> std::oct;
│ │ │ +
345 else if (__radix == 16)
│ │ │ +
346 __is >> std::hex;
│ │ │ +
347 __is >> __v;
│ │ │ +
348 return __is.fail() ? -1 : __v;
│ │ │ +
349 }
│ │ │ +
350
│ │ │ +
351 template<typename _Bi_iter, typename _Alloc>
│ │ │ +
352 template<typename _Out_iter>
│ │ │ +
353 _Out_iter
│ │ │ + │ │ │ +
355 format(_Out_iter __out,
│ │ │ +
356 const match_results<_Bi_iter, _Alloc>::char_type* __fmt_first,
│ │ │ +
357 const match_results<_Bi_iter, _Alloc>::char_type* __fmt_last,
│ │ │ +
358 match_flag_type __flags) const
│ │ │ +
359 {
│ │ │ +
360 __glibcxx_assert( ready() );
│ │ │ +
361 regex_traits<char_type> __traits;
│ │ │ +
362 typedef std::ctype<char_type> __ctype_type;
│ │ │ +
363 const __ctype_type&
│ │ │ +
364 __fctyp(use_facet<__ctype_type>(__traits.getloc()));
│ │ │ +
365
│ │ │ +
366 auto __output = [&](size_t __idx)
│ │ │ +
367 {
│ │ │ +
368 auto& __sub = (*this)[__idx];
│ │ │ +
369 if (__sub.matched)
│ │ │ +
370 __out = std::copy(__sub.first, __sub.second, __out);
│ │ │ +
371 };
│ │ │ +
372
│ │ │ +
373 if (__flags & regex_constants::format_sed)
│ │ │ +
374 {
│ │ │ +
375 bool __escaping = false;
│ │ │ +
376 for (; __fmt_first != __fmt_last; __fmt_first++)
│ │ │ +
377 {
│ │ │ +
378 if (__escaping)
│ │ │ +
379 {
│ │ │ +
380 __escaping = false;
│ │ │ +
381 if (__fctyp.is(__ctype_type::digit, *__fmt_first))
│ │ │ +
382 __output(__traits.value(*__fmt_first, 10));
│ │ │ +
383 else
│ │ │ +
384 *__out++ = *__fmt_first;
│ │ │ +
385 continue;
│ │ │ +
386 }
│ │ │ +
387 if (*__fmt_first == '\\')
│ │ │ +
388 {
│ │ │ +
389 __escaping = true;
│ │ │ +
390 continue;
│ │ │ +
391 }
│ │ │ +
392 if (*__fmt_first == '&')
│ │ │ +
393 {
│ │ │ +
394 __output(0);
│ │ │ +
395 continue;
│ │ │ +
396 }
│ │ │ +
397 *__out++ = *__fmt_first;
│ │ │ +
398 }
│ │ │ +
399 if (__escaping)
│ │ │ +
400 *__out++ = '\\';
│ │ │ +
401 }
│ │ │ +
402 else
│ │ │ +
403 {
│ │ │ +
404 while (1)
│ │ │ +
405 {
│ │ │ +
406 auto __next = std::find(__fmt_first, __fmt_last, '$');
│ │ │ +
407 if (__next == __fmt_last)
│ │ │ +
408 break;
│ │ │ +
409
│ │ │ +
410 __out = std::copy(__fmt_first, __next, __out);
│ │ │ +
411
│ │ │ +
412 auto __eat = [&](char __ch) -> bool
│ │ │ +
413 {
│ │ │ +
414 if (*__next == __ch)
│ │ │ +
415 {
│ │ │ +
416 ++__next;
│ │ │ +
417 return true;
│ │ │ +
418 }
│ │ │ +
419 return false;
│ │ │ +
420 };
│ │ │ +
421
│ │ │ +
422 if (++__next == __fmt_last)
│ │ │ +
423 *__out++ = '$';
│ │ │ +
424 else if (__eat('$'))
│ │ │ +
425 *__out++ = '$';
│ │ │ +
426 else if (__eat('&'))
│ │ │ +
427 __output(0);
│ │ │ +
428 else if (__eat('`'))
│ │ │ +
429 {
│ │ │ +
430 auto& __sub = _M_prefix();
│ │ │ +
431 if (__sub.matched)
│ │ │ +
432 __out = std::copy(__sub.first, __sub.second, __out);
│ │ │ +
433 }
│ │ │ +
434 else if (__eat('\''))
│ │ │ +
435 {
│ │ │ +
436 auto& __sub = _M_suffix();
│ │ │ +
437 if (__sub.matched)
│ │ │ +
438 __out = std::copy(__sub.first, __sub.second, __out);
│ │ │ +
439 }
│ │ │ +
440 else if (__fctyp.is(__ctype_type::digit, *__next))
│ │ │ +
441 {
│ │ │ +
442 long __num = __traits.value(*__next, 10);
│ │ │ +
443 if (++__next != __fmt_last
│ │ │ +
444 && __fctyp.is(__ctype_type::digit, *__next))
│ │ │ +
445 {
│ │ │ +
446 __num *= 10;
│ │ │ +
447 __num += __traits.value(*__next++, 10);
│ │ │ +
448 }
│ │ │ +
449 if (0 <= __num && __num < this->size())
│ │ │ +
450 __output(__num);
│ │ │ +
451 }
│ │ │ +
452 else
│ │ │ +
453 *__out++ = '$';
│ │ │ +
454 __fmt_first = __next;
│ │ │ +
455 }
│ │ │ +
456 __out = std::copy(__fmt_first, __fmt_last, __out);
│ │ │ +
457 }
│ │ │ +
458 return __out;
│ │ │ +
459 }
│ │ │ +
460
│ │ │ +
461 template<typename _Out_iter, typename _Bi_iter,
│ │ │ +
462 typename _Rx_traits, typename _Ch_type>
│ │ │ +
463 _Out_iter
│ │ │ +
464 __regex_replace(_Out_iter __out, _Bi_iter __first, _Bi_iter __last,
│ │ │ +
465 const basic_regex<_Ch_type, _Rx_traits>& __e,
│ │ │ +
466 const _Ch_type* __fmt, size_t __len,
│ │ │ + │ │ │ +
468 {
│ │ │ +
469 typedef regex_iterator<_Bi_iter, _Ch_type, _Rx_traits> _IterT;
│ │ │ +
470 _IterT __i(__first, __last, __e, __flags);
│ │ │ +
471 _IterT __end;
│ │ │ +
472 if (__i == __end)
│ │ │ +
473 {
│ │ │ +
474 if (!(__flags & regex_constants::format_no_copy))
│ │ │ +
475 __out = std::copy(__first, __last, __out);
│ │ │ +
476 }
│ │ │ +
477 else
│ │ │ +
478 {
│ │ │ +
479 sub_match<_Bi_iter> __last;
│ │ │ +
480 for (; __i != __end; ++__i)
│ │ │ +
481 {
│ │ │ +
482 if (!(__flags & regex_constants::format_no_copy))
│ │ │ +
483 __out = std::copy(__i->prefix().first, __i->prefix().second,
│ │ │ +
484 __out);
│ │ │ +
485 __out = __i->format(__out, __fmt, __fmt + __len, __flags);
│ │ │ +
486 __last = __i->suffix();
│ │ │ + │ │ │ +
488 break;
│ │ │ +
489 }
│ │ │ +
490 if (!(__flags & regex_constants::format_no_copy))
│ │ │ +
491 __out = std::copy(__last.first, __last.second, __out);
│ │ │ +
492 }
│ │ │ +
493 return __out;
│ │ │ +
494 }
│ │ │ +
495
│ │ │ +
496 template<typename _Bi_iter,
│ │ │ +
497 typename _Ch_type,
│ │ │ +
498 typename _Rx_traits>
│ │ │ +
499 bool
│ │ │ + │ │ │ +
501 operator==(const regex_iterator& __rhs) const noexcept
│ │ │ +
502 {
│ │ │ +
503 if (_M_pregex == nullptr && __rhs._M_pregex == nullptr)
│ │ │ +
504 return true;
│ │ │ +
505 return _M_pregex == __rhs._M_pregex
│ │ │ +
506 && _M_begin == __rhs._M_begin
│ │ │ +
507 && _M_end == __rhs._M_end
│ │ │ +
508 && _M_flags == __rhs._M_flags
│ │ │ +
509 && _M_match[0] == __rhs._M_match[0];
│ │ │ +
510 }
│ │ │ +
511
│ │ │ +
512 template<typename _Bi_iter,
│ │ │ +
513 typename _Ch_type,
│ │ │ +
514 typename _Rx_traits>
│ │ │ +
515 regex_iterator<_Bi_iter, _Ch_type, _Rx_traits>&
│ │ │ + │ │ │ + │ │ │ +
518 {
│ │ │ +
519 // In all cases in which the call to regex_search returns true,
│ │ │ +
520 // match.prefix().first shall be equal to the previous value of
│ │ │ +
521 // match[0].second, and for each index i in the half-open range
│ │ │ +
522 // [0, match.size()) for which match[i].matched is true,
│ │ │ +
523 // match[i].position() shall return distance(begin, match[i].first).
│ │ │ +
524 // [28.12.1.4.5]
│ │ │ +
525 if (_M_match[0].matched)
│ │ │ +
526 {
│ │ │ +
527 auto __start = _M_match[0].second;
│ │ │ +
528 auto __prefix_first = _M_match[0].second;
│ │ │ +
529 if (_M_match[0].first == _M_match[0].second)
│ │ │ +
530 {
│ │ │ +
531 if (__start == _M_end)
│ │ │ +
532 {
│ │ │ +
533 _M_pregex = nullptr;
│ │ │ +
534 return *this;
│ │ │ +
535 }
│ │ │ +
536 else
│ │ │ +
537 {
│ │ │ +
538 if (regex_search(__start, _M_end, _M_match, *_M_pregex,
│ │ │ +
539 _M_flags
│ │ │ + │ │ │ + │ │ │ +
542 {
│ │ │ +
543 __glibcxx_assert(_M_match[0].matched);
│ │ │ +
544 auto& __prefix = _M_match._M_prefix();
│ │ │ +
545 __prefix.first = __prefix_first;
│ │ │ +
546 __prefix.matched = __prefix.first != __prefix.second;
│ │ │ +
547 // [28.12.1.4.5]
│ │ │ +
548 _M_match._M_begin = _M_begin;
│ │ │ +
549 return *this;
│ │ │ +
550 }
│ │ │ +
551 else
│ │ │ +
552 ++__start;
│ │ │ +
553 }
│ │ │ +
554 }
│ │ │ + │ │ │ +
556 if (regex_search(__start, _M_end, _M_match, *_M_pregex, _M_flags))
│ │ │ +
557 {
│ │ │ +
558 __glibcxx_assert(_M_match[0].matched);
│ │ │ +
559 auto& __prefix = _M_match._M_prefix();
│ │ │ +
560 __prefix.first = __prefix_first;
│ │ │ +
561 __prefix.matched = __prefix.first != __prefix.second;
│ │ │ +
562 // [28.12.1.4.5]
│ │ │ +
563 _M_match._M_begin = _M_begin;
│ │ │ +
564 }
│ │ │ +
565 else
│ │ │ +
566 _M_pregex = nullptr;
│ │ │ +
567 }
│ │ │ +
568 return *this;
│ │ │ +
569 }
│ │ │ +
570
│ │ │ +
571 template<typename _Bi_iter,
│ │ │ +
572 typename _Ch_type,
│ │ │ +
573 typename _Rx_traits>
│ │ │ +
574 regex_token_iterator<_Bi_iter, _Ch_type, _Rx_traits>&
│ │ │ + │ │ │ +
576 operator=(const regex_token_iterator& __rhs)
│ │ │ +
577 {
│ │ │ +
578 _M_position = __rhs._M_position;
│ │ │ +
579 _M_subs = __rhs._M_subs;
│ │ │ +
580 _M_n = __rhs._M_n;
│ │ │ +
581 _M_suffix = __rhs._M_suffix;
│ │ │ +
582 _M_has_m1 = __rhs._M_has_m1;
│ │ │ +
583 _M_normalize_result();
│ │ │ +
584 return *this;
│ │ │ +
585 }
│ │ │ +
586
│ │ │ +
587 template<typename _Bi_iter,
│ │ │ +
588 typename _Ch_type,
│ │ │ +
589 typename _Rx_traits>
│ │ │ +
590 bool
│ │ │ + │ │ │ +
592 operator==(const regex_token_iterator& __rhs) const
│ │ │ +
593 {
│ │ │ +
594 if (_M_end_of_seq() && __rhs._M_end_of_seq())
│ │ │ +
595 return true;
│ │ │ +
596 if (_M_suffix.matched && __rhs._M_suffix.matched
│ │ │ +
597 && _M_suffix == __rhs._M_suffix)
│ │ │ +
598 return true;
│ │ │ +
599 if (_M_end_of_seq() || _M_suffix.matched
│ │ │ +
600 || __rhs._M_end_of_seq() || __rhs._M_suffix.matched)
│ │ │ +
601 return false;
│ │ │ +
602 return _M_position == __rhs._M_position
│ │ │ +
603 && _M_n == __rhs._M_n
│ │ │ +
604 && _M_subs == __rhs._M_subs;
│ │ │ +
605 }
│ │ │ +
606
│ │ │ +
607 template<typename _Bi_iter,
│ │ │ +
608 typename _Ch_type,
│ │ │ +
609 typename _Rx_traits>
│ │ │ +
610 regex_token_iterator<_Bi_iter, _Ch_type, _Rx_traits>&
│ │ │ + │ │ │ + │ │ │ +
613 {
│ │ │ +
614 _Position __prev = _M_position;
│ │ │ +
615 if (_M_suffix.matched)
│ │ │ +
616 *this = regex_token_iterator();
│ │ │ +
617 else if (_M_n + 1 < _M_subs.size())
│ │ │ +
618 {
│ │ │ +
619 _M_n++;
│ │ │ +
620 _M_result = &_M_current_match();
│ │ │ +
621 }
│ │ │ +
622 else
│ │ │ +
623 {
│ │ │ +
624 _M_n = 0;
│ │ │ +
625 ++_M_position;
│ │ │ +
626 if (_M_position != _Position())
│ │ │ +
627 _M_result = &_M_current_match();
│ │ │ +
628 else if (_M_has_m1 && __prev->suffix().length() != 0)
│ │ │ +
629 {
│ │ │ +
630 _M_suffix.matched = true;
│ │ │ +
631 _M_suffix.first = __prev->suffix().first;
│ │ │ +
632 _M_suffix.second = __prev->suffix().second;
│ │ │ +
633 _M_result = &_M_suffix;
│ │ │ +
634 }
│ │ │ +
635 else
│ │ │ +
636 *this = regex_token_iterator();
│ │ │ +
637 }
│ │ │ +
638 return *this;
│ │ │ +
639 }
│ │ │ +
640
│ │ │ +
641 template<typename _Bi_iter,
│ │ │ +
642 typename _Ch_type,
│ │ │ +
643 typename _Rx_traits>
│ │ │ +
644 void
│ │ │ +
645 regex_token_iterator<_Bi_iter, _Ch_type, _Rx_traits>::
│ │ │ +
646 _M_init(_Bi_iter __a, _Bi_iter __b)
│ │ │ +
647 {
│ │ │ +
648 _M_has_m1 = false;
│ │ │ +
649 for (auto __it : _M_subs)
│ │ │ +
650 if (__it == -1)
│ │ │ +
651 {
│ │ │ +
652 _M_has_m1 = true;
│ │ │ +
653 break;
│ │ │ +
654 }
│ │ │ +
655 if (_M_position != _Position())
│ │ │ +
656 _M_result = &_M_current_match();
│ │ │ +
657 else if (_M_has_m1)
│ │ │ +
658 {
│ │ │ +
659 _M_suffix.matched = true;
│ │ │ +
660 _M_suffix.first = __a;
│ │ │ +
661 _M_suffix.second = __b;
│ │ │ +
662 _M_result = &_M_suffix;
│ │ │ +
663 }
│ │ │ +
664 else
│ │ │ +
665 _M_result = nullptr;
│ │ │ +
666 }
│ │ │ +
667
│ │ │ +
668 /// @endcond
│ │ │ +
669
│ │ │ +
670_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ +
671} // namespace
│ │ │ +
bool regex_search(_Bi_iter __s, _Bi_iter __e, match_results< _Bi_iter, _Alloc > &__m, const basic_regex< _Ch_type, _Rx_traits > &__re, regex_constants::match_flag_type __flags=regex_constants::match_default)
Definition regex.h:2418
│ │ │
ISO C++ entities toplevel namespace is std.
│ │ │ -
Base class for all library exceptions.
Definition exception.h:62
│ │ │ -
virtual const char * what() const noexcept
│ │ │ - │ │ │ +
ios_base & hex(ios_base &__base)
Calls base.setf(ios_base::hex, ios_base::basefield).
Definition ios_base.h:1067
│ │ │ +
constexpr auto size(const _Container &__cont) noexcept(noexcept(__cont.size())) -> decltype(__cont.size())
Return the size of a container.
│ │ │ +
ios_base & oct(ios_base &__base)
Calls base.setf(ios_base::oct, ios_base::basefield).
Definition ios_base.h:1075
│ │ │ +
constexpr syntax_option_type __polynomial
│ │ │ +
constexpr match_flag_type format_first_only
│ │ │ +
constexpr match_flag_type match_continuous
│ │ │ +
match_flag_type
This is a bitmask type indicating regex matching rules.
│ │ │ +
constexpr match_flag_type match_prev_avail
│ │ │ +
constexpr match_flag_type format_sed
│ │ │ +
constexpr match_flag_type match_not_null
│ │ │ +
constexpr match_flag_type format_no_copy
│ │ │ +
_Out_iter format(_Out_iter __out, const char_type *__fmt_first, const char_type *__fmt_last, match_flag_type __flags=regex_constants::format_default) const
│ │ │ +
string_type lookup_collatename(_Fwd_iter __first, _Fwd_iter __last) const
Gets a collation element by name.
│ │ │ +
char_class_type lookup_classname(_Fwd_iter __first, _Fwd_iter __last, bool __icase=false) const
Maps one or more characters to a named character classification.
│ │ │ +
int value(_Ch_type __ch, int __radix) const
Converts a digit to an int.
│ │ │ +
bool isctype(_Ch_type __c, char_class_type __f) const
Determines if c is a member of an identified class.
│ │ │ +
regex_iterator & operator++()
Increments a regex_iterator.
│ │ │ +
bool operator==(const regex_iterator &) const noexcept
Tests the equivalence of two regex iterators.
│ │ │ +
bool operator==(const regex_token_iterator &__rhs) const
Compares a regex_token_iterator to another for equality.
│ │ │ +
regex_token_iterator & operator++()
Increments a regex_token_iterator.
│ │ │ +
regex_token_iterator & operator=(const regex_token_iterator &__rhs)
Assigns a regex_token_iterator to another.
│ │ │ + │ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,103 +1,755 @@ │ │ │ │ libstdc++ │ │ │ │ -exception.h │ │ │ │ +regex.tcc │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -1// Exception Handling support header for -*- C++ -*- │ │ │ │ +1// class template regex -*- C++ -*- │ │ │ │ 2 │ │ │ │ -3// Copyright (C) 2016-2022 Free Software Foundation, Inc. │ │ │ │ +3// Copyright (C) 2013-2022 Free Software Foundation, Inc. │ │ │ │ 4// │ │ │ │ -5// This file is part of GCC. │ │ │ │ -6// │ │ │ │ -7// GCC is free software; you can redistribute it and/or modify │ │ │ │ -8// it under the terms of the GNU General Public License as published by │ │ │ │ -9// the Free Software Foundation; either version 3, or (at your option) │ │ │ │ -10// any later version. │ │ │ │ -11// │ │ │ │ -12// GCC is distributed in the hope that it will be useful, │ │ │ │ -13// but WITHOUT ANY WARRANTY; without even the implied warranty of │ │ │ │ -14// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the │ │ │ │ -15// GNU General Public License for more details. │ │ │ │ -16// │ │ │ │ -17// Under Section 7 of GPL version 3, you are granted additional │ │ │ │ -18// permissions described in the GCC Runtime Library Exception, version │ │ │ │ -19// 3.1, as published by the Free Software Foundation. │ │ │ │ -20 │ │ │ │ -21// You should have received a copy of the GNU General Public License and │ │ │ │ -22// a copy of the GCC Runtime Library Exception along with this program; │ │ │ │ -23// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see │ │ │ │ -24// . │ │ │ │ -25 │ │ │ │ -26/** @file bits/exception.h │ │ │ │ +5// This file is part of the GNU ISO C++ Library. This library is free │ │ │ │ +6// software; you can redistribute it and/or modify it under the │ │ │ │ +7// terms of the GNU General Public License as published by the │ │ │ │ +8// Free Software Foundation; either version 3, or (at your option) │ │ │ │ +9// any later version. │ │ │ │ +10 │ │ │ │ +11// This library is distributed in the hope that it will be useful, │ │ │ │ +12// but WITHOUT ANY WARRANTY; without even the implied warranty of │ │ │ │ +13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the │ │ │ │ +14// GNU General Public License for more details. │ │ │ │ +15 │ │ │ │ +16// Under Section 7 of GPL version 3, you are granted additional │ │ │ │ +17// permissions described in the GCC Runtime Library Exception, version │ │ │ │ +18// 3.1, as published by the Free Software Foundation. │ │ │ │ +19 │ │ │ │ +20// You should have received a copy of the GNU General Public License and │ │ │ │ +21// a copy of the GCC Runtime Library Exception along with this program; │ │ │ │ +22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see │ │ │ │ +23// . │ │ │ │ +24 │ │ │ │ +25/** │ │ │ │ +26 * @file bits/regex.tcc │ │ │ │ 27 * This is an internal header file, included by other library headers. │ │ │ │ -28 * Do not attempt to use it directly. │ │ │ │ +28 * Do not attempt to use it directly. @headername{regex} │ │ │ │ 29 */ │ │ │ │ 30 │ │ │ │ -31#ifndef __EXCEPTION_H │ │ │ │ -32#define __EXCEPTION_H 1 │ │ │ │ -33 │ │ │ │ -34#pragma GCC system_header │ │ │ │ -35 │ │ │ │ -36#pragma GCC visibility push(default) │ │ │ │ -37 │ │ │ │ -38#include <_b_i_t_s_/_c_+_+_c_o_n_f_i_g_._h> │ │ │ │ -39 │ │ │ │ -40extern "C++" { │ │ │ │ -41 │ │ │ │ -42namespace _s_t_d │ │ │ │ -43{ │ │ │ │ -44 /** │ │ │ │ -45 * @defgroup exceptions Exceptions │ │ │ │ -46 * @ingroup diagnostics │ │ │ │ -47 * @since C++98 │ │ │ │ -48 * │ │ │ │ -49 * Classes and functions for reporting errors via exceptions. │ │ │ │ -50 * @{ │ │ │ │ -51 */ │ │ │ │ -52 │ │ │ │ -53 /** │ │ │ │ -54 * @brief Base class for all library exceptions. │ │ │ │ -55 * │ │ │ │ -56 * This is the base class for all exceptions thrown by the standard │ │ │ │ -57 * library, and by certain language expressions. You are free to derive │ │ │ │ -58 * your own %exception classes, or use a different hierarchy, or to │ │ │ │ -59 * throw non-class data (e.g., fundamental types). │ │ │ │ -60 */ │ │ │ │ -_6_1 class _e_x_c_e_p_t_i_o_n │ │ │ │ -62 { │ │ │ │ -63 public: │ │ │ │ -64 _e_x_c_e_p_t_i_o_n() ___G_L_I_B_C_X_X___N_O_T_H_R_O_W { } │ │ │ │ -65 virtual _~_e_x_c_e_p_t_i_o_n() _GLIBCXX_TXN_SAFE_DYN ___G_L_I_B_C_X_X___N_O_T_H_R_O_W; │ │ │ │ -66#if __cplusplus >= 201103L │ │ │ │ -67 _e_x_c_e_p_t_i_o_n(const _e_x_c_e_p_t_i_o_n&) = default; │ │ │ │ -68 _e_x_c_e_p_t_i_o_n& operator=(const _e_x_c_e_p_t_i_o_n&) = default; │ │ │ │ -69 _e_x_c_e_p_t_i_o_n(_e_x_c_e_p_t_i_o_n&&) = default; │ │ │ │ -70 _e_x_c_e_p_t_i_o_n& operator=(_e_x_c_e_p_t_i_o_n&&) = default; │ │ │ │ -71#endif │ │ │ │ -72 │ │ │ │ -73 /** Returns a C-style character string describing the general cause │ │ │ │ -74 * of the current error. */ │ │ │ │ -75 virtual const char* │ │ │ │ -_7_6 _w_h_a_t() const _GLIBCXX_TXN_SAFE_DYN ___G_L_I_B_C_X_X___N_O_T_H_R_O_W; │ │ │ │ -77 }; │ │ │ │ -78 │ │ │ │ -79 /// @} │ │ │ │ -80 │ │ │ │ -81} // namespace std │ │ │ │ -82 │ │ │ │ -83} │ │ │ │ -84 │ │ │ │ -85#pragma GCC visibility pop │ │ │ │ -86 │ │ │ │ -87#endif │ │ │ │ -_c_+_+_c_o_n_f_i_g_._h │ │ │ │ +31namespace _s_t_d _GLIBCXX_VISIBILITY(default) │ │ │ │ +32{ │ │ │ │ +33_GLIBCXX_BEGIN_NAMESPACE_VERSION │ │ │ │ +34 │ │ │ │ +35namespace __detail │ │ │ │ +36{ │ │ │ │ +37 /// @cond undocumented │ │ │ │ +38 │ │ │ │ +39 // Result of merging regex_match and regex_search. │ │ │ │ +40 // │ │ │ │ +41 // __policy now can be _S_auto (auto dispatch) and _S_alternate (use │ │ │ │ +42 // the other one if possible, for test purpose). │ │ │ │ +43 // │ │ │ │ +44 // That __match_mode is true means regex_match, else regex_search. │ │ │ │ +45 template │ │ │ │ +47 bool │ │ │ │ +48 __regex_algo_impl(_BiIter __s, │ │ │ │ +49 _BiIter __e, │ │ │ │ +50 match_results<_BiIter, _Alloc>& __m, │ │ │ │ +51 const basic_regex<_CharT, _TraitsT>& __re, │ │ │ │ +52 _r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_m_a_t_c_h___f_l_a_g___t_y_p_e __flags, │ │ │ │ +53 _RegexExecutorPolicy __policy, │ │ │ │ +54 bool __match_mode) │ │ │ │ +55 { │ │ │ │ +56 if (__re._M_automaton == nullptr) │ │ │ │ +57 return false; │ │ │ │ +58 │ │ │ │ +59 typename match_results<_BiIter, _Alloc>::_Unchecked& __res = __m; │ │ │ │ +60 __m._M_begin = __s; │ │ │ │ +61 __m._M_resize(__re._M_automaton->_M_sub_count()); │ │ │ │ +62 │ │ │ │ +63 bool __ret; │ │ │ │ +64 if ((__re.flags() & _r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_____p_o_l_y_n_o_m_i_a_l) │ │ │ │ +65 || (__policy == _RegexExecutorPolicy::_S_alternate │ │ │ │ +66 && !__re._M_automaton->_M_has_backref)) │ │ │ │ +67 { │ │ │ │ +68 _Executor<_BiIter, _Alloc, _TraitsT, false> │ │ │ │ +69 __executor(__s, __e, __res, __re, __flags); │ │ │ │ +70 if (__match_mode) │ │ │ │ +71 __ret = __executor._M_match(); │ │ │ │ +72 else │ │ │ │ +73 __ret = __executor._M_search(); │ │ │ │ +74 } │ │ │ │ +75 else │ │ │ │ +76 { │ │ │ │ +77 _Executor<_BiIter, _Alloc, _TraitsT, true> │ │ │ │ +78 __executor(__s, __e, __res, __re, __flags); │ │ │ │ +79 if (__match_mode) │ │ │ │ +80 __ret = __executor._M_match(); │ │ │ │ +81 else │ │ │ │ +82 __ret = __executor._M_search(); │ │ │ │ +83 } │ │ │ │ +84 if (__ret) │ │ │ │ +85 { │ │ │ │ +86 for (auto& __it : __res) │ │ │ │ +87 if (!__it.matched) │ │ │ │ +88 __it.first = __it.second = __e; │ │ │ │ +89 auto& __pre = __m._M_prefix(); │ │ │ │ +90 auto& __suf = __m._M_suffix(); │ │ │ │ +91 if (__match_mode) │ │ │ │ +92 { │ │ │ │ +93 __pre.matched = false; │ │ │ │ +94 __pre.first = __s; │ │ │ │ +95 __pre.second = __s; │ │ │ │ +96 __suf.matched = false; │ │ │ │ +97 __suf.first = __e; │ │ │ │ +98 __suf.second = __e; │ │ │ │ +99 } │ │ │ │ +100 else │ │ │ │ +101 { │ │ │ │ +102 __pre.first = __s; │ │ │ │ +103 __pre.second = __res[0].first; │ │ │ │ +104 __pre.matched = (__pre.first != __pre.second); │ │ │ │ +105 __suf.first = __res[0].second; │ │ │ │ +106 __suf.second = __e; │ │ │ │ +107 __suf.matched = (__suf.first != __suf.second); │ │ │ │ +108 } │ │ │ │ +109 } │ │ │ │ +110 else │ │ │ │ +111 { │ │ │ │ +112 __m._M_establish_failed_match(__e); │ │ │ │ +113 } │ │ │ │ +114 return __ret; │ │ │ │ +115 } │ │ │ │ +116 /// @endcond │ │ │ │ +117} // namespace __detail │ │ │ │ +118 │ │ │ │ +119 /// @cond │ │ │ │ +120 │ │ │ │ +121 template │ │ │ │ +122 template │ │ │ │ +123 typename regex_traits<_Ch_type>::string_type │ │ │ │ +124 _r_e_g_e_x___t_r_a_i_t_s_<___C_h___t_y_p_e_>_:_: │ │ │ │ +125_ _l_o_o_k_u_p___c_o_l_l_a_t_e_n_a_m_e(_Fwd_iter __first, _Fwd_iter __last) const │ │ │ │ +126 { │ │ │ │ +127 typedef _s_t_d_:_:_c_t_y_p_e_<_c_h_a_r___t_y_p_e_> __ctype_type; │ │ │ │ +128 const __ctype_type& __fctyp(use_facet<__ctype_type>(_M_locale)); │ │ │ │ +129 │ │ │ │ +130 static const char* __collatenames[] = │ │ │ │ +131 { │ │ │ │ +132 "NUL", │ │ │ │ +133 "SOH", │ │ │ │ +134 "STX", │ │ │ │ +135 "ETX", │ │ │ │ +136 "EOT", │ │ │ │ +137 "ENQ", │ │ │ │ +138 "ACK", │ │ │ │ +139 "alert", │ │ │ │ +140 "backspace", │ │ │ │ +141 "tab", │ │ │ │ +142 "newline", │ │ │ │ +143 "vertical-tab", │ │ │ │ +144 "form-feed", │ │ │ │ +145 "carriage-return", │ │ │ │ +146 "SO", │ │ │ │ +147 "SI", │ │ │ │ +148 "DLE", │ │ │ │ +149 "DC1", │ │ │ │ +150 "DC2", │ │ │ │ +151 "DC3", │ │ │ │ +152 "DC4", │ │ │ │ +153 "NAK", │ │ │ │ +154 "SYN", │ │ │ │ +155 "ETB", │ │ │ │ +156 "CAN", │ │ │ │ +157 "EM", │ │ │ │ +158 "SUB", │ │ │ │ +159 "ESC", │ │ │ │ +160 "IS4", │ │ │ │ +161 "IS3", │ │ │ │ +162 "IS2", │ │ │ │ +163 "IS1", │ │ │ │ +164 "space", │ │ │ │ +165 "exclamation-mark", │ │ │ │ +166 "quotation-mark", │ │ │ │ +167 "number-sign", │ │ │ │ +168 "dollar-sign", │ │ │ │ +169 "percent-sign", │ │ │ │ +170 "ampersand", │ │ │ │ +171 "apostrophe", │ │ │ │ +172 "left-parenthesis", │ │ │ │ +173 "right-parenthesis", │ │ │ │ +174 "asterisk", │ │ │ │ +175 "plus-sign", │ │ │ │ +176 "comma", │ │ │ │ +177 "hyphen", │ │ │ │ +178 "period", │ │ │ │ +179 "slash", │ │ │ │ +180 "zero", │ │ │ │ +181 "one", │ │ │ │ +182 "two", │ │ │ │ +183 "three", │ │ │ │ +184 "four", │ │ │ │ +185 "five", │ │ │ │ +186 "six", │ │ │ │ +187 "seven", │ │ │ │ +188 "eight", │ │ │ │ +189 "nine", │ │ │ │ +190 "colon", │ │ │ │ +191 "semicolon", │ │ │ │ +192 "less-than-sign", │ │ │ │ +193 "equals-sign", │ │ │ │ +194 "greater-than-sign", │ │ │ │ +195 "question-mark", │ │ │ │ +196 "commercial-at", │ │ │ │ +197 "A", │ │ │ │ +198 "B", │ │ │ │ +199 "C", │ │ │ │ +200 "D", │ │ │ │ +201 "E", │ │ │ │ +202 "F", │ │ │ │ +203 "G", │ │ │ │ +204 "H", │ │ │ │ +205 "I", │ │ │ │ +206 "J", │ │ │ │ +207 "K", │ │ │ │ +208 "L", │ │ │ │ +209 "M", │ │ │ │ +210 "N", │ │ │ │ +211 "O", │ │ │ │ +212 "P", │ │ │ │ +213 "Q", │ │ │ │ +214 "R", │ │ │ │ +215 "S", │ │ │ │ +216 "T", │ │ │ │ +217 "U", │ │ │ │ +218 "V", │ │ │ │ +219 "W", │ │ │ │ +220 "X", │ │ │ │ +221 "Y", │ │ │ │ +222 "Z", │ │ │ │ +223 "left-square-bracket", │ │ │ │ +224 "backslash", │ │ │ │ +225 "right-square-bracket", │ │ │ │ +226 "circumflex", │ │ │ │ +227 "underscore", │ │ │ │ +228 "grave-accent", │ │ │ │ +229 "a", │ │ │ │ +230 "b", │ │ │ │ +231 "c", │ │ │ │ +232 "d", │ │ │ │ +233 "e", │ │ │ │ +234 "f", │ │ │ │ +235 "g", │ │ │ │ +236 "h", │ │ │ │ +237 "i", │ │ │ │ +238 "j", │ │ │ │ +239 "k", │ │ │ │ +240 "l", │ │ │ │ +241 "m", │ │ │ │ +242 "n", │ │ │ │ +243 "o", │ │ │ │ +244 "p", │ │ │ │ +245 "q", │ │ │ │ +246 "r", │ │ │ │ +247 "s", │ │ │ │ +248 "t", │ │ │ │ +249 "u", │ │ │ │ +250 "v", │ │ │ │ +251 "w", │ │ │ │ +252 "x", │ │ │ │ +253 "y", │ │ │ │ +254 "z", │ │ │ │ +255 "left-curly-bracket", │ │ │ │ +256 "vertical-line", │ │ │ │ +257 "right-curly-bracket", │ │ │ │ +258 "tilde", │ │ │ │ +259 "DEL", │ │ │ │ +260 }; │ │ │ │ +261 │ │ │ │ +262 string __s; │ │ │ │ +263 for (; __first != __last; ++__first) │ │ │ │ +264 __s += __fctyp.narrow(*__first, 0); │ │ │ │ +265 │ │ │ │ +266 for (const auto& __it : __collatenames) │ │ │ │ +267 if (__s == __it) │ │ │ │ +268 return string_type(1, __fctyp.widen( │ │ │ │ +269 static_cast(&__it - __collatenames))); │ │ │ │ +270 │ │ │ │ +271 // TODO Add digraph support: │ │ │ │ +272 // http://boost.sourceforge.net/libs/regex/doc/collating_names.html │ │ │ │ +273 │ │ │ │ +274 return string_type(); │ │ │ │ +275 } │ │ │ │ +276 │ │ │ │ +277 template │ │ │ │ +278 template │ │ │ │ +279 typename regex_traits<_Ch_type>::char_class_type │ │ │ │ +280 _r_e_g_e_x___t_r_a_i_t_s_<___C_h___t_y_p_e_>_:_: │ │ │ │ +281_ _l_o_o_k_u_p___c_l_a_s_s_n_a_m_e(_Fwd_iter __first, _Fwd_iter __last, bool __icase) const │ │ │ │ +282 { │ │ │ │ +283 typedef _s_t_d_:_:_c_t_y_p_e_<_c_h_a_r___t_y_p_e_> __ctype_type; │ │ │ │ +284 const __ctype_type& __fctyp(use_facet<__ctype_type>(_M_locale)); │ │ │ │ +285 │ │ │ │ +286 // Mappings from class name to class mask. │ │ │ │ +287 static const pair __classnames[] = │ │ │ │ +288 { │ │ │ │ +289 {"d", ctype_base::digit}, │ │ │ │ +290 {"w", {ctype_base::alnum, _RegexMask::_S_under}}, │ │ │ │ +291 {"s", ctype_base::space}, │ │ │ │ +292 {"alnum", ctype_base::alnum}, │ │ │ │ +293 {"alpha", ctype_base::alpha}, │ │ │ │ +294 {"blank", ctype_base::blank}, │ │ │ │ +295 {"cntrl", ctype_base::cntrl}, │ │ │ │ +296 {"digit", ctype_base::digit}, │ │ │ │ +297 {"graph", ctype_base::graph}, │ │ │ │ +298 {"lower", ctype_base::lower}, │ │ │ │ +299 {"print", ctype_base::print}, │ │ │ │ +300 {"punct", ctype_base::punct}, │ │ │ │ +301 {"space", ctype_base::space}, │ │ │ │ +302 {"upper", ctype_base::upper}, │ │ │ │ +303 {"xdigit", ctype_base::xdigit}, │ │ │ │ +304 }; │ │ │ │ +305 │ │ │ │ +306 string __s; │ │ │ │ +307 for (; __first != __last; ++__first) │ │ │ │ +308 __s += __fctyp.narrow(__fctyp.tolower(*__first), 0); │ │ │ │ +309 │ │ │ │ +310 for (const auto& __it : __classnames) │ │ │ │ +311 if (__s == __it.first) │ │ │ │ +312 { │ │ │ │ +313 if (__icase │ │ │ │ +314 && ((__it.second │ │ │ │ +315 & (ctype_base::lower | ctype_base::upper)) != 0)) │ │ │ │ +316 return ctype_base::alpha; │ │ │ │ +317 return __it.second; │ │ │ │ +318 } │ │ │ │ +319 return 0; │ │ │ │ +320 } │ │ │ │ +321 │ │ │ │ +322 template │ │ │ │ +323 bool │ │ │ │ +324 _r_e_g_e_x___t_r_a_i_t_s_<___C_h___t_y_p_e_>_:_: │ │ │ │ +325_ _i_s_c_t_y_p_e(_Ch_type __c, char_class_type __f) const │ │ │ │ +326 { │ │ │ │ +327 typedef _s_t_d_:_:_c_t_y_p_e_<_c_h_a_r___t_y_p_e_> __ctype_type; │ │ │ │ +328 const __ctype_type& __fctyp(use_facet<__ctype_type>(_M_locale)); │ │ │ │ +329 │ │ │ │ +330 return __fctyp.is(__f._M_base, __c) │ │ │ │ +331 // [[:w:]] │ │ │ │ +332 || ((__f._M_extended & _RegexMask::_S_under) │ │ │ │ +333 && __c == __fctyp.widen('_')); │ │ │ │ +334 } │ │ │ │ +335 │ │ │ │ +336 template │ │ │ │ +337 int │ │ │ │ +338 _r_e_g_e_x___t_r_a_i_t_s_<___C_h___t_y_p_e_>_:_: │ │ │ │ +339_ _v_a_l_u_e(_Ch_type __ch, int __radix) const │ │ │ │ +340 { │ │ │ │ +341 _s_t_d_:_:_b_a_s_i_c___i_s_t_r_i_n_g_s_t_r_e_a_m_<_c_h_a_r___t_y_p_e_> __is(string_type(1, __ch)); │ │ │ │ +342 long __v; │ │ │ │ +343 if (__radix == 8) │ │ │ │ +344 __is >> _s_t_d_:_:_o_c_t; │ │ │ │ +345 else if (__radix == 16) │ │ │ │ +346 __is >> _s_t_d_:_:_h_e_x; │ │ │ │ +347 __is >> __v; │ │ │ │ +348 return __is.fail() ? -1 : __v; │ │ │ │ +349 } │ │ │ │ +350 │ │ │ │ +351 template │ │ │ │ +352 template │ │ │ │ +353 _Out_iter │ │ │ │ +354 _m_a_t_c_h___r_e_s_u_l_t_s_<___B_i___i_t_e_r_,_ ___A_l_l_o_c_>_:_: │ │ │ │ +355_ _f_o_r_m_a_t(_Out_iter __out, │ │ │ │ +356 const match_results<_Bi_iter, _Alloc>::char_type* __fmt_first, │ │ │ │ +357 const match_results<_Bi_iter, _Alloc>::char_type* __fmt_last, │ │ │ │ +358 match_flag_type __flags) const │ │ │ │ +359 { │ │ │ │ +360 __glibcxx_assert( ready() ); │ │ │ │ +361 regex_traits __traits; │ │ │ │ +362 typedef _s_t_d_:_:_c_t_y_p_e_<_c_h_a_r___t_y_p_e_> __ctype_type; │ │ │ │ +363 const __ctype_type& │ │ │ │ +364 __fctyp(use_facet<__ctype_type>(__traits.getloc())); │ │ │ │ +365 │ │ │ │ +366 auto __output = [&](size_t __idx) │ │ │ │ +367 { │ │ │ │ +368 auto& __sub = (*this)[__idx]; │ │ │ │ +369 if (__sub.matched) │ │ │ │ +370 __out = std::copy(__sub.first, __sub.second, __out); │ │ │ │ +371 }; │ │ │ │ +372 │ │ │ │ +373 if (__flags & _r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_f_o_r_m_a_t___s_e_d) │ │ │ │ +374 { │ │ │ │ +375 bool __escaping = false; │ │ │ │ +376 for (; __fmt_first != __fmt_last; __fmt_first++) │ │ │ │ +377 { │ │ │ │ +378 if (__escaping) │ │ │ │ +379 { │ │ │ │ +380 __escaping = false; │ │ │ │ +381 if (__fctyp.is(__ctype_type::digit, *__fmt_first)) │ │ │ │ +382 __output(__traits.value(*__fmt_first, 10)); │ │ │ │ +383 else │ │ │ │ +384 *__out++ = *__fmt_first; │ │ │ │ +385 continue; │ │ │ │ +386 } │ │ │ │ +387 if (*__fmt_first == '\\') │ │ │ │ +388 { │ │ │ │ +389 __escaping = true; │ │ │ │ +390 continue; │ │ │ │ +391 } │ │ │ │ +392 if (*__fmt_first == '&') │ │ │ │ +393 { │ │ │ │ +394 __output(0); │ │ │ │ +395 continue; │ │ │ │ +396 } │ │ │ │ +397 *__out++ = *__fmt_first; │ │ │ │ +398 } │ │ │ │ +399 if (__escaping) │ │ │ │ +400 *__out++ = '\\'; │ │ │ │ +401 } │ │ │ │ +402 else │ │ │ │ +403 { │ │ │ │ +404 while (1) │ │ │ │ +405 { │ │ │ │ +406 auto __next = std::find(__fmt_first, __fmt_last, '$'); │ │ │ │ +407 if (__next == __fmt_last) │ │ │ │ +408 break; │ │ │ │ +409 │ │ │ │ +410 __out = std::copy(__fmt_first, __next, __out); │ │ │ │ +411 │ │ │ │ +412 auto __eat = [&](char __ch) -> bool │ │ │ │ +413 { │ │ │ │ +414 if (*__next == __ch) │ │ │ │ +415 { │ │ │ │ +416 ++__next; │ │ │ │ +417 return true; │ │ │ │ +418 } │ │ │ │ +419 return false; │ │ │ │ +420 }; │ │ │ │ +421 │ │ │ │ +422 if (++__next == __fmt_last) │ │ │ │ +423 *__out++ = '$'; │ │ │ │ +424 else if (__eat('$')) │ │ │ │ +425 *__out++ = '$'; │ │ │ │ +426 else if (__eat('&')) │ │ │ │ +427 __output(0); │ │ │ │ +428 else if (__eat('`')) │ │ │ │ +429 { │ │ │ │ +430 auto& __sub = _M_prefix(); │ │ │ │ +431 if (__sub.matched) │ │ │ │ +432 __out = std::copy(__sub.first, __sub.second, __out); │ │ │ │ +433 } │ │ │ │ +434 else if (__eat('\'')) │ │ │ │ +435 { │ │ │ │ +436 auto& __sub = _M_suffix(); │ │ │ │ +437 if (__sub.matched) │ │ │ │ +438 __out = std::copy(__sub.first, __sub.second, __out); │ │ │ │ +439 } │ │ │ │ +440 else if (__fctyp.is(__ctype_type::digit, *__next)) │ │ │ │ +441 { │ │ │ │ +442 long __num = __traits.value(*__next, 10); │ │ │ │ +443 if (++__next != __fmt_last │ │ │ │ +444 && __fctyp.is(__ctype_type::digit, *__next)) │ │ │ │ +445 { │ │ │ │ +446 __num *= 10; │ │ │ │ +447 __num += __traits.value(*__next++, 10); │ │ │ │ +448 } │ │ │ │ +449 if (0 <= __num && __num < this->_s_i_z_e()) │ │ │ │ +450 __output(__num); │ │ │ │ +451 } │ │ │ │ +452 else │ │ │ │ +453 *__out++ = '$'; │ │ │ │ +454 __fmt_first = __next; │ │ │ │ +455 } │ │ │ │ +456 __out = std::copy(__fmt_first, __fmt_last, __out); │ │ │ │ +457 } │ │ │ │ +458 return __out; │ │ │ │ +459 } │ │ │ │ +460 │ │ │ │ +461 template │ │ │ │ +463 _Out_iter │ │ │ │ +464 __regex_replace(_Out_iter __out, _Bi_iter __first, _Bi_iter __last, │ │ │ │ +465 const basic_regex<_Ch_type, _Rx_traits>& __e, │ │ │ │ +466 const _Ch_type* __fmt, size_t __len, │ │ │ │ +467 _r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_m_a_t_c_h___f_l_a_g___t_y_p_e __flags) │ │ │ │ +468 { │ │ │ │ +469 typedef regex_iterator<_Bi_iter, _Ch_type, _Rx_traits> _IterT; │ │ │ │ +470 _IterT __i(__first, __last, __e, __flags); │ │ │ │ +471 _IterT __end; │ │ │ │ +472 if (__i == __end) │ │ │ │ +473 { │ │ │ │ +474 if (!(__flags & _r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_f_o_r_m_a_t___n_o___c_o_p_y)) │ │ │ │ +475 __out = std::copy(__first, __last, __out); │ │ │ │ +476 } │ │ │ │ +477 else │ │ │ │ +478 { │ │ │ │ +479 sub_match<_Bi_iter> __last; │ │ │ │ +480 for (; __i != __end; ++__i) │ │ │ │ +481 { │ │ │ │ +482 if (!(__flags & _r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_f_o_r_m_a_t___n_o___c_o_p_y)) │ │ │ │ +483 __out = std::copy(__i->prefix().first, __i->prefix().second, │ │ │ │ +484 __out); │ │ │ │ +485 __out = __i->format(__out, __fmt, __fmt + __len, __flags); │ │ │ │ +486 __last = __i->suffix(); │ │ │ │ +487 if (__flags & _r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_f_o_r_m_a_t___f_i_r_s_t___o_n_l_y) │ │ │ │ +488 break; │ │ │ │ +489 } │ │ │ │ +490 if (!(__flags & _r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_f_o_r_m_a_t___n_o___c_o_p_y)) │ │ │ │ +491 __out = std::copy(__last.first, __last.second, __out); │ │ │ │ +492 } │ │ │ │ +493 return __out; │ │ │ │ +494 } │ │ │ │ +495 │ │ │ │ +496 template │ │ │ │ +499 bool │ │ │ │ +500 _r_e_g_e_x___i_t_e_r_a_t_o_r_<___B_i___i_t_e_r_,_ ___C_h___t_y_p_e_,_ ___R_x___t_r_a_i_t_s_>_:_: │ │ │ │ +501_ _o_p_e_r_a_t_o_r_=_=(const regex_iterator& __rhs) const noexcept │ │ │ │ +502 { │ │ │ │ +503 if (_M_pregex == nullptr && __rhs._M_pregex == nullptr) │ │ │ │ +504 return true; │ │ │ │ +505 return _M_pregex == __rhs._M_pregex │ │ │ │ +506 && _M_begin == __rhs._M_begin │ │ │ │ +507 && _M_end == __rhs._M_end │ │ │ │ +508 && _M_flags == __rhs._M_flags │ │ │ │ +509 && _M_match[0] == __rhs._M_match[0]; │ │ │ │ +510 } │ │ │ │ +511 │ │ │ │ +512 template │ │ │ │ +515 regex_iterator<_Bi_iter, _Ch_type, _Rx_traits>& │ │ │ │ +516 _r_e_g_e_x___i_t_e_r_a_t_o_r_<___B_i___i_t_e_r_,_ ___C_h___t_y_p_e_,_ ___R_x___t_r_a_i_t_s_>_:_: │ │ │ │ +517_ _o_p_e_r_a_t_o_r_+_+() │ │ │ │ +518 { │ │ │ │ +519 // In all cases in which the call to regex_search returns true, │ │ │ │ +520 // match.prefix().first shall be equal to the previous value of │ │ │ │ +521 // match[0].second, and for each index i in the half-open range │ │ │ │ +522 // [0, match.size()) for which match[i].matched is true, │ │ │ │ +523 // match[i].position() shall return distance(begin, match[i].first). │ │ │ │ +524 // [28.12.1.4.5] │ │ │ │ +525 if (_M_match[0].matched) │ │ │ │ +526 { │ │ │ │ +527 auto __start = _M_match[0].second; │ │ │ │ +528 auto __prefix_first = _M_match[0].second; │ │ │ │ +529 if (_M_match[0].first == _M_match[0].second) │ │ │ │ +530 { │ │ │ │ +531 if (__start == _M_end) │ │ │ │ +532 { │ │ │ │ +533 _M_pregex = nullptr; │ │ │ │ +534 return *this; │ │ │ │ +535 } │ │ │ │ +536 else │ │ │ │ +537 { │ │ │ │ +538 if (_r_e_g_e_x___s_e_a_r_c_h(__start, _M_end, _M_match, *_M_pregex, │ │ │ │ +539 _M_flags │ │ │ │ +540 | _r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_m_a_t_c_h___n_o_t___n_u_l_l │ │ │ │ +541 | _r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_m_a_t_c_h___c_o_n_t_i_n_u_o_u_s)) │ │ │ │ +542 { │ │ │ │ +543 __glibcxx_assert(_M_match[0].matched); │ │ │ │ +544 auto& __prefix = _M_match._M_prefix(); │ │ │ │ +545 __prefix.first = __prefix_first; │ │ │ │ +546 __prefix.matched = __prefix.first != __prefix.second; │ │ │ │ +547 // [28.12.1.4.5] │ │ │ │ +548 _M_match._M_begin = _M_begin; │ │ │ │ +549 return *this; │ │ │ │ +550 } │ │ │ │ +551 else │ │ │ │ +552 ++__start; │ │ │ │ +553 } │ │ │ │ +554 } │ │ │ │ +555 _M_flags |= _r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_m_a_t_c_h___p_r_e_v___a_v_a_i_l; │ │ │ │ +556 if (_r_e_g_e_x___s_e_a_r_c_h(__start, _M_end, _M_match, *_M_pregex, _M_flags)) │ │ │ │ +557 { │ │ │ │ +558 __glibcxx_assert(_M_match[0].matched); │ │ │ │ +559 auto& __prefix = _M_match._M_prefix(); │ │ │ │ +560 __prefix.first = __prefix_first; │ │ │ │ +561 __prefix.matched = __prefix.first != __prefix.second; │ │ │ │ +562 // [28.12.1.4.5] │ │ │ │ +563 _M_match._M_begin = _M_begin; │ │ │ │ +564 } │ │ │ │ +565 else │ │ │ │ +566 _M_pregex = nullptr; │ │ │ │ +567 } │ │ │ │ +568 return *this; │ │ │ │ +569 } │ │ │ │ +570 │ │ │ │ +571 template │ │ │ │ +574 regex_token_iterator<_Bi_iter, _Ch_type, _Rx_traits>& │ │ │ │ +575 _r_e_g_e_x___t_o_k_e_n___i_t_e_r_a_t_o_r_<___B_i___i_t_e_r_,_ ___C_h___t_y_p_e_,_ ___R_x___t_r_a_i_t_s_>_:_: │ │ │ │ +576_ _o_p_e_r_a_t_o_r_=(const regex_token_iterator& __rhs) │ │ │ │ +577 { │ │ │ │ +578 _M_position = __rhs._M_position; │ │ │ │ +579 _M_subs = __rhs._M_subs; │ │ │ │ +580 _M_n = __rhs._M_n; │ │ │ │ +581 _M_suffix = __rhs._M_suffix; │ │ │ │ +582 _M_has_m1 = __rhs._M_has_m1; │ │ │ │ +583 _M_normalize_result(); │ │ │ │ +584 return *this; │ │ │ │ +585 } │ │ │ │ +586 │ │ │ │ +587 template │ │ │ │ +590 bool │ │ │ │ +591 _r_e_g_e_x___t_o_k_e_n___i_t_e_r_a_t_o_r_<___B_i___i_t_e_r_,_ ___C_h___t_y_p_e_,_ ___R_x___t_r_a_i_t_s_>_:_: │ │ │ │ +592_ _o_p_e_r_a_t_o_r_=_=(const regex_token_iterator& __rhs) const │ │ │ │ +593 { │ │ │ │ +594 if (_M_end_of_seq() && __rhs._M_end_of_seq()) │ │ │ │ +595 return true; │ │ │ │ +596 if (_M_suffix.matched && __rhs._M_suffix.matched │ │ │ │ +597 && _M_suffix == __rhs._M_suffix) │ │ │ │ +598 return true; │ │ │ │ +599 if (_M_end_of_seq() || _M_suffix.matched │ │ │ │ +600 || __rhs._M_end_of_seq() || __rhs._M_suffix.matched) │ │ │ │ +601 return false; │ │ │ │ +602 return _M_position == __rhs._M_position │ │ │ │ +603 && _M_n == __rhs._M_n │ │ │ │ +604 && _M_subs == __rhs._M_subs; │ │ │ │ +605 } │ │ │ │ +606 │ │ │ │ +607 template │ │ │ │ +610 regex_token_iterator<_Bi_iter, _Ch_type, _Rx_traits>& │ │ │ │ +611 _r_e_g_e_x___t_o_k_e_n___i_t_e_r_a_t_o_r_<___B_i___i_t_e_r_,_ ___C_h___t_y_p_e_,_ ___R_x___t_r_a_i_t_s_>_:_: │ │ │ │ +612_ _o_p_e_r_a_t_o_r_+_+() │ │ │ │ +613 { │ │ │ │ +614 _Position __prev = _M_position; │ │ │ │ +615 if (_M_suffix.matched) │ │ │ │ +616 *this = regex_token_iterator(); │ │ │ │ +617 else if (_M_n + 1 < _M_subs.size()) │ │ │ │ +618 { │ │ │ │ +619 _M_n++; │ │ │ │ +620 _M_result = &_M_current_match(); │ │ │ │ +621 } │ │ │ │ +622 else │ │ │ │ +623 { │ │ │ │ +624 _M_n = 0; │ │ │ │ +625 ++_M_position; │ │ │ │ +626 if (_M_position != _Position()) │ │ │ │ +627 _M_result = &_M_current_match(); │ │ │ │ +628 else if (_M_has_m1 && __prev->suffix().length() != 0) │ │ │ │ +629 { │ │ │ │ +630 _M_suffix.matched = true; │ │ │ │ +631 _M_suffix.first = __prev->suffix().first; │ │ │ │ +632 _M_suffix.second = __prev->suffix().second; │ │ │ │ +633 _M_result = &_M_suffix; │ │ │ │ +634 } │ │ │ │ +635 else │ │ │ │ +636 *this = regex_token_iterator(); │ │ │ │ +637 } │ │ │ │ +638 return *this; │ │ │ │ +639 } │ │ │ │ +640 │ │ │ │ +641 template │ │ │ │ +644 void │ │ │ │ +645 regex_token_iterator<_Bi_iter, _Ch_type, _Rx_traits>:: │ │ │ │ +646 _M_init(_Bi_iter __a, _Bi_iter __b) │ │ │ │ +647 { │ │ │ │ +648 _M_has_m1 = false; │ │ │ │ +649 for (auto __it : _M_subs) │ │ │ │ +650 if (__it == -1) │ │ │ │ +651 { │ │ │ │ +652 _M_has_m1 = true; │ │ │ │ +653 break; │ │ │ │ +654 } │ │ │ │ +655 if (_M_position != _Position()) │ │ │ │ +656 _M_result = &_M_current_match(); │ │ │ │ +657 else if (_M_has_m1) │ │ │ │ +658 { │ │ │ │ +659 _M_suffix.matched = true; │ │ │ │ +660 _M_suffix.first = __a; │ │ │ │ +661 _M_suffix.second = __b; │ │ │ │ +662 _M_result = &_M_suffix; │ │ │ │ +663 } │ │ │ │ +664 else │ │ │ │ +665 _M_result = nullptr; │ │ │ │ +666 } │ │ │ │ +667 │ │ │ │ +668 /// @endcond │ │ │ │ +669 │ │ │ │ +670_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ +671} // namespace │ │ │ │ +_s_t_d_:_:_r_e_g_e_x___s_e_a_r_c_h │ │ │ │ +bool regex_search(_Bi_iter __s, _Bi_iter __e, match_results< _Bi_iter, _Alloc > │ │ │ │ +&__m, const basic_regex< _Ch_type, _Rx_traits > &__re, regex_constants:: │ │ │ │ +match_flag_type __flags=regex_constants::match_default) │ │ │ │ +DDeeffiinniittiioonn _r_e_g_e_x_._h_:_2_4_1_8 │ │ │ │ _s_t_d │ │ │ │ ISO C++ entities toplevel namespace is std. │ │ │ │ -_s_t_d_:_:_e_x_c_e_p_t_i_o_n │ │ │ │ -Base class for all library exceptions. │ │ │ │ -DDeeffiinniittiioonn _e_x_c_e_p_t_i_o_n_._h_:_6_2 │ │ │ │ -_s_t_d_:_:_e_x_c_e_p_t_i_o_n_:_:_w_h_a_t │ │ │ │ -virtual const char * what() const noexcept │ │ │ │ +_s_t_d_:_:_h_e_x │ │ │ │ +ios_base & hex(ios_base &__base) │ │ │ │ +Calls base.setf(ios_base::hex, ios_base::basefield). │ │ │ │ +DDeeffiinniittiioonn _i_o_s___b_a_s_e_._h_:_1_0_6_7 │ │ │ │ +_s_t_d_:_:_s_i_z_e │ │ │ │ +constexpr auto size(const _Container &__cont) noexcept(noexcept(__cont.size())) │ │ │ │ +-> decltype(__cont.size()) │ │ │ │ +Return the size of a container. │ │ │ │ +DDeeffiinniittiioonn _r_a_n_g_e___a_c_c_e_s_s_._h_:_2_6_4 │ │ │ │ +_s_t_d_:_:_o_c_t │ │ │ │ +ios_base & oct(ios_base &__base) │ │ │ │ +Calls base.setf(ios_base::oct, ios_base::basefield). │ │ │ │ +DDeeffiinniittiioonn _i_o_s___b_a_s_e_._h_:_1_0_7_5 │ │ │ │ +_s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_____p_o_l_y_n_o_m_i_a_l │ │ │ │ +constexpr syntax_option_type __polynomial │ │ │ │ +DDeeffiinniittiioonn _r_e_g_e_x___c_o_n_s_t_a_n_t_s_._h_:_1_8_7 │ │ │ │ +_s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_f_o_r_m_a_t___f_i_r_s_t___o_n_l_y │ │ │ │ +constexpr match_flag_type format_first_only │ │ │ │ +DDeeffiinniittiioonn _r_e_g_e_x___c_o_n_s_t_a_n_t_s_._h_:_3_6_8 │ │ │ │ +_s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_m_a_t_c_h___c_o_n_t_i_n_u_o_u_s │ │ │ │ +constexpr match_flag_type match_continuous │ │ │ │ +DDeeffiinniittiioonn _r_e_g_e_x___c_o_n_s_t_a_n_t_s_._h_:_3_1_1 │ │ │ │ +_s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_m_a_t_c_h___f_l_a_g___t_y_p_e │ │ │ │ +match_flag_type │ │ │ │ +This is a bitmask type indicating regex matching rules. │ │ │ │ +DDeeffiinniittiioonn _r_e_g_e_x___c_o_n_s_t_a_n_t_s_._h_:_2_5_0 │ │ │ │ +_s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_m_a_t_c_h___p_r_e_v___a_v_a_i_l │ │ │ │ +constexpr match_flag_type match_prev_avail │ │ │ │ +DDeeffiinniittiioonn _r_e_g_e_x___c_o_n_s_t_a_n_t_s_._h_:_3_1_9 │ │ │ │ +_s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_f_o_r_m_a_t___s_e_d │ │ │ │ +constexpr match_flag_type format_sed │ │ │ │ +DDeeffiinniittiioonn _r_e_g_e_x___c_o_n_s_t_a_n_t_s_._h_:_3_5_5 │ │ │ │ +_s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_m_a_t_c_h___n_o_t___n_u_l_l │ │ │ │ +constexpr match_flag_type match_not_null │ │ │ │ +DDeeffiinniittiioonn _r_e_g_e_x___c_o_n_s_t_a_n_t_s_._h_:_3_0_6 │ │ │ │ +_s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_f_o_r_m_a_t___n_o___c_o_p_y │ │ │ │ +constexpr match_flag_type format_no_copy │ │ │ │ +DDeeffiinniittiioonn _r_e_g_e_x___c_o_n_s_t_a_n_t_s_._h_:_3_6_2 │ │ │ │ +_s_t_d_:_:_m_a_t_c_h___r_e_s_u_l_t_s_:_:_f_o_r_m_a_t │ │ │ │ +_Out_iter format(_Out_iter __out, const char_type *__fmt_first, const char_type │ │ │ │ +*__fmt_last, match_flag_type __flags=regex_constants::format_default) const │ │ │ │ +_s_t_d_:_:_r_e_g_e_x___t_r_a_i_t_s_:_:_l_o_o_k_u_p___c_o_l_l_a_t_e_n_a_m_e │ │ │ │ +string_type lookup_collatename(_Fwd_iter __first, _Fwd_iter __last) const │ │ │ │ +Gets a collation element by name. │ │ │ │ +_s_t_d_:_:_r_e_g_e_x___t_r_a_i_t_s_:_:_l_o_o_k_u_p___c_l_a_s_s_n_a_m_e │ │ │ │ +char_class_type lookup_classname(_Fwd_iter __first, _Fwd_iter __last, bool │ │ │ │ +__icase=false) const │ │ │ │ +Maps one or more characters to a named character classification. │ │ │ │ +_s_t_d_:_:_r_e_g_e_x___t_r_a_i_t_s_:_:_v_a_l_u_e │ │ │ │ +int value(_Ch_type __ch, int __radix) const │ │ │ │ +Converts a digit to an int. │ │ │ │ +_s_t_d_:_:_r_e_g_e_x___t_r_a_i_t_s_:_:_i_s_c_t_y_p_e │ │ │ │ +bool isctype(_Ch_type __c, char_class_type __f) const │ │ │ │ +Determines if c is a member of an identified class. │ │ │ │ +_s_t_d_:_:_r_e_g_e_x___i_t_e_r_a_t_o_r_:_:_o_p_e_r_a_t_o_r_+_+ │ │ │ │ +regex_iterator & operator++() │ │ │ │ +Increments a regex_iterator. │ │ │ │ +_s_t_d_:_:_r_e_g_e_x___i_t_e_r_a_t_o_r_:_:_o_p_e_r_a_t_o_r_=_= │ │ │ │ +bool operator==(const regex_iterator &) const noexcept │ │ │ │ +Tests the equivalence of two regex iterators. │ │ │ │ +_s_t_d_:_:_r_e_g_e_x___t_o_k_e_n___i_t_e_r_a_t_o_r_:_:_o_p_e_r_a_t_o_r_=_= │ │ │ │ +bool operator==(const regex_token_iterator &__rhs) const │ │ │ │ +Compares a regex_token_iterator to another for equality. │ │ │ │ +_s_t_d_:_:_r_e_g_e_x___t_o_k_e_n___i_t_e_r_a_t_o_r_:_:_o_p_e_r_a_t_o_r_+_+ │ │ │ │ +regex_token_iterator & operator++() │ │ │ │ +Increments a regex_token_iterator. │ │ │ │ +_s_t_d_:_:_r_e_g_e_x___t_o_k_e_n___i_t_e_r_a_t_o_r_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ +regex_token_iterator & operator=(const regex_token_iterator &__rhs) │ │ │ │ +Assigns a regex_token_iterator to another. │ │ │ │ _s_t_d_:_:_a_u_t_o___p_t_r___r_e_f │ │ │ │ DDeeffiinniittiioonn _a_u_t_o___p_t_r_._h_:_4_9 │ │ │ │ * _b_i_t_s │ │ │ │ - * _e_x_c_e_p_t_i_o_n_._h │ │ │ │ + * _r_e_g_e_x_._t_c_c │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-12-base/libstdc++/user/a00341.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: cxxabi_init_exception.h File Reference │ │ │ +libstdc++: regex_constants.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -46,88 +46,161 @@ │ │ │ /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */ │ │ │ $(document).ready(function(){initNavTree('a00341.html',''); initResizable(); }); │ │ │ /* @license-end */ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -Namespaces | │ │ │ -Macros | │ │ │ -Functions
│ │ │ -
cxxabi_init_exception.h File Reference
│ │ │ +Namespaces
│ │ │ +
regex_constants.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ + │ │ │

│ │ │ Namespaces

namespace  std
 
namespace  std::regex_constants
 
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ -Macros

#define _GLIBCXX_CDTOR_CALLABI
 
#define _GLIBCXX_HAVE_CDTOR_CALLABI
 

5.1 Regular Expression Syntax Options

constexpr syntax_option_type std::regex_constants::__multiline
 
constexpr syntax_option_type std::regex_constants::__polynomial
 
constexpr syntax_option_type std::regex_constants::awk
 
constexpr syntax_option_type std::regex_constants::basic
 
constexpr syntax_option_type std::regex_constants::collate
 
constexpr syntax_option_type std::regex_constants::ECMAScript
 
constexpr syntax_option_type std::regex_constants::egrep
 
constexpr syntax_option_type std::regex_constants::extended
 
constexpr syntax_option_type std::regex_constants::grep
 
constexpr syntax_option_type std::regex_constants::icase
 
constexpr syntax_option_type std::regex_constants::multiline
 
constexpr syntax_option_type std::regex_constants::nosubs
 
constexpr syntax_option_type std::regex_constants::operator& (syntax_option_type __a, syntax_option_type __b)
 
constexpr syntax_option_typestd::regex_constants::operator&= (syntax_option_type &__a, syntax_option_type __b)
 
constexpr syntax_option_type std::regex_constants::operator^ (syntax_option_type __a, syntax_option_type __b)
 
constexpr syntax_option_typestd::regex_constants::operator^= (syntax_option_type &__a, syntax_option_type __b)
 
constexpr syntax_option_type std::regex_constants::operator| (syntax_option_type __a, syntax_option_type __b)
 
constexpr syntax_option_typestd::regex_constants::operator|= (syntax_option_type &__a, syntax_option_type __b)
 
constexpr syntax_option_type std::regex_constants::operator~ (syntax_option_type __a)
 
constexpr syntax_option_type std::regex_constants::optimize
 
enum  std::regex_constants::syntax_option_type : unsigned int {
│ │ │ +  _S_icase │ │ │ +, _S_nosubs │ │ │ +, _S_optimize │ │ │ +, _S_collate │ │ │ +,
│ │ │ +  _S_ECMAScript │ │ │ +, _S_basic │ │ │ +, _S_extended │ │ │ +, _S_awk │ │ │ +,
│ │ │ +  _S_grep │ │ │ +, _S_egrep │ │ │ +, _S_polynomial │ │ │ +, _S_multiline │ │ │ +
│ │ │ + }
 
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ -Functions

│ │ │ -void * __cxxabiv1::__cxa_allocate_exception (size_t) noexcept
 
│ │ │ -void __cxxabiv1::__cxa_free_exception (void *) noexcept
 
│ │ │ -__cxa_refcounted_exception * __cxxabiv1::__cxa_init_primary_exception (void *__object, std::type_info *__tinfo, void(*__dest)(void *)) noexcept
 

5.2 Matching Rules

Matching a regular expression against a sequence of characters [first, last) proceeds according to the rules of the grammar specified for the regular expression object, modified according to the effects listed below for any bitmask elements set.

│ │ │ +
constexpr match_flag_type std::regex_constants::format_default
 
constexpr match_flag_type std::regex_constants::format_first_only
 
constexpr match_flag_type std::regex_constants::format_no_copy
 
constexpr match_flag_type std::regex_constants::format_sed
 
constexpr match_flag_type std::regex_constants::match_any
 
constexpr match_flag_type std::regex_constants::match_continuous
 
constexpr match_flag_type std::regex_constants::match_default
 
enum  std::regex_constants::match_flag_type : unsigned int {
│ │ │ +  _S_default │ │ │ +, _S_not_bol │ │ │ +, _S_not_eol │ │ │ +, _S_not_bow │ │ │ +,
│ │ │ +  _S_not_eow │ │ │ +, _S_any │ │ │ +, _S_not_null │ │ │ +, _S_continuous │ │ │ +,
│ │ │ +  _S_prev_avail │ │ │ +, _S_sed │ │ │ +, _S_no_copy │ │ │ +, _S_first_only │ │ │ +,
│ │ │ +  _S_match_flag_last │ │ │ +
│ │ │ + }
 
constexpr match_flag_type std::regex_constants::match_not_bol
 
constexpr match_flag_type std::regex_constants::match_not_bow
 
constexpr match_flag_type std::regex_constants::match_not_eol
 
constexpr match_flag_type std::regex_constants::match_not_eow
 
constexpr match_flag_type std::regex_constants::match_not_null
 
constexpr match_flag_type std::regex_constants::match_prev_avail
 
constexpr match_flag_type std::regex_constants::operator& (match_flag_type __a, match_flag_type __b)
 
constexpr match_flag_typestd::regex_constants::operator&= (match_flag_type &__a, match_flag_type __b)
 
constexpr match_flag_type std::regex_constants::operator^ (match_flag_type __a, match_flag_type __b)
 
constexpr match_flag_typestd::regex_constants::operator^= (match_flag_type &__a, match_flag_type __b)
 
constexpr match_flag_type std::regex_constants::operator| (match_flag_type __a, match_flag_type __b)
 
constexpr match_flag_typestd::regex_constants::operator|= (match_flag_type &__a, match_flag_type __b)
 
constexpr match_flag_type std::regex_constants::operator~ (match_flag_type __a)
 
│ │ │

Detailed Description

│ │ │ -

This is an internal header file, included by other library headers. Do not attempt to use it directly.

│ │ │ - │ │ │ -

Definition in file cxxabi_init_exception.h.

│ │ │ -

Macro Definition Documentation

│ │ │ - │ │ │ -

◆ _GLIBCXX_CDTOR_CALLABI

│ │ │ - │ │ │ -
│ │ │ -
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
#define _GLIBCXX_CDTOR_CALLABI
│ │ │ -
│ │ │ +

Constant definitions for the std regex library.

│ │ │ +

This is an internal header file, included by other library headers. Do not attempt to use it directly. Instead, include <regex>.

│ │ │ │ │ │ -

Definition at line 42 of file cxxabi_init_exception.h.

│ │ │ - │ │ │ -
│ │ │ -
│ │ │ - │ │ │ -

◆ _GLIBCXX_HAVE_CDTOR_CALLABI

│ │ │ - │ │ │ -
│ │ │ -
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
#define _GLIBCXX_HAVE_CDTOR_CALLABI
│ │ │ -
│ │ │ - │ │ │ -

Definition at line 43 of file cxxabi_init_exception.h.

│ │ │ - │ │ │ -
│ │ │ -
│ │ │ -
│ │ │ +

Definition in file regex_constants.h.

│ │ │ +
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,37 +1,144 @@ │ │ │ │ libstdc++ │ │ │ │ -_N_a_m_e_s_p_a_c_e_s | _M_a_c_r_o_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -cxxabi_init_exception.h File Reference │ │ │ │ +_N_a_m_e_s_p_a_c_e_s │ │ │ │ +regex_constants.h File Reference │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _s_t_d │ │ │ │   │ │ │ │ -MMaaccrrooss │ │ │ │ -#define  ___G_L_I_B_C_X_X___C_D_T_O_R___C_A_L_L_A_B_I │ │ │ │ +namespace   _s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s │ │ │ │   │ │ │ │ -#define  ___G_L_I_B_C_X_X___H_A_V_E___C_D_T_O_R___C_A_L_L_A_B_I │ │ │ │ +********** 55..11 RReegguullaarr EExxpprreessssiioonn SSyynnttaaxx OOppttiioonnss ********** │ │ │ │ + constexpr _s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e  _s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_____m_u_l_t_i_l_i_n_e │ │ │ │   │ │ │ │ -FFuunnccttiioonnss │ │ │ │ - void *  ____ccxxxxaabbiivv11::::____ccxxaa__aallllooccaattee__eexxcceeppttiioonn (size_t) │ │ │ │ - noexcept │ │ │ │ + constexpr _s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e  _s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_____p_o_l_y_n_o_m_i_a_l │ │ │ │   │ │ │ │ - void  ____ccxxxxaabbiivv11::::____ccxxaa__ffrreeee__eexxcceeppttiioonn (void *) │ │ │ │ - noexcept │ │ │ │ + constexpr _s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e  _s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_a_w_k │ │ │ │   │ │ │ │ -__cxa_refcounted_exception *  ____ccxxxxaabbiivv11::::____ccxxaa__iinniitt__pprriimmaarryy__eexxcceeppttiioonn (void │ │ │ │ - *__object, _s_t_d_:_:_t_y_p_e___i_n_f_o *__tinfo, void(*__dest) │ │ │ │ - (void *)) noexcept │ │ │ │ + constexpr _s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e  _s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_b_a_s_i_c │ │ │ │ +  │ │ │ │ + constexpr _s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e  _s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_c_o_l_l_a_t_e │ │ │ │ +  │ │ │ │ + constexpr _s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e  _s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_E_C_M_A_S_c_r_i_p_t │ │ │ │ +  │ │ │ │ + constexpr _s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e  _s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_e_g_r_e_p │ │ │ │ +  │ │ │ │ + constexpr _s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e  _s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_e_x_t_e_n_d_e_d │ │ │ │ +  │ │ │ │ + constexpr _s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e  _s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_g_r_e_p │ │ │ │ +  │ │ │ │ + constexpr _s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e  _s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_i_c_a_s_e │ │ │ │ +  │ │ │ │ + constexpr _s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e  _s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_m_u_l_t_i_l_i_n_e │ │ │ │ +  │ │ │ │ + constexpr _s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e  _s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_n_o_s_u_b_s │ │ │ │ +  │ │ │ │ + constexpr _s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e  _s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_o_p_e_r_a_t_o_r_& │ │ │ │ + (_s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e __a, _s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e │ │ │ │ + __b) │ │ │ │ +  │ │ │ │ +constexpr _s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e &  _s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_o_p_e_r_a_t_o_r_&_= │ │ │ │ + (_s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e &__a, _s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e │ │ │ │ + __b) │ │ │ │ +  │ │ │ │ + constexpr _s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e  _s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_o_p_e_r_a_t_o_r_^ │ │ │ │ + (_s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e __a, _s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e │ │ │ │ + __b) │ │ │ │ +  │ │ │ │ +constexpr _s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e &  _s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_o_p_e_r_a_t_o_r_^_= │ │ │ │ + (_s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e &__a, _s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e │ │ │ │ + __b) │ │ │ │ +  │ │ │ │ + constexpr _s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e  _s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_o_p_e_r_a_t_o_r_| │ │ │ │ + (_s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e __a, _s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e │ │ │ │ + __b) │ │ │ │ +  │ │ │ │ +constexpr _s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e &  _s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_o_p_e_r_a_t_o_r_|_= │ │ │ │ + (_s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e &__a, _s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e │ │ │ │ + __b) │ │ │ │ +  │ │ │ │ + constexpr _s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e  _s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_o_p_e_r_a_t_o_r_~ │ │ │ │ + (_s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e __a) │ │ │ │ +  │ │ │ │ + constexpr _s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e  _s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_o_p_t_i_m_i_z_e │ │ │ │ +  │ │ │ │ + enum   _s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e : │ │ │ │ + unsigned int { │ │ │ │ +   __SS__iiccaassee , __SS__nnoossuubbss , __SS__ooppttiimmiizzee , │ │ │ │ + __SS__ccoollllaattee , │ │ │ │ +   __SS__EECCMMAASSccrriipptt , __SS__bbaassiicc , __SS__eexxtteennddeedd , │ │ │ │ + __SS__aawwkk , │ │ │ │ +   __SS__ggrreepp , __SS__eeggrreepp , __SS__ppoollyynnoommiiaall , │ │ │ │ + __SS__mmuullttiilliinnee │ │ │ │ + } │ │ │ │ +  │ │ │ │ +********** 55..22 MMaattcchhiinngg RRuulleess ********** │ │ │ │ +Matching a regular expression against a sequence of characters [first, last) │ │ │ │ +proceeds according to the rules of the grammar specified for the regular │ │ │ │ +expression object, modified according to the effects listed below for any │ │ │ │ +bitmask elements set. │ │ │ │ + constexpr _m_a_t_c_h___f_l_a_g___t_y_p_e  _s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_f_o_r_m_a_t___d_e_f_a_u_l_t │ │ │ │ +  │ │ │ │ + constexpr _m_a_t_c_h___f_l_a_g___t_y_p_e  _s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_f_o_r_m_a_t___f_i_r_s_t___o_n_l_y │ │ │ │ +  │ │ │ │ + constexpr _m_a_t_c_h___f_l_a_g___t_y_p_e  _s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_f_o_r_m_a_t___n_o___c_o_p_y │ │ │ │ +  │ │ │ │ + constexpr _m_a_t_c_h___f_l_a_g___t_y_p_e  _s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_f_o_r_m_a_t___s_e_d │ │ │ │ +  │ │ │ │ + constexpr _m_a_t_c_h___f_l_a_g___t_y_p_e  _s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_m_a_t_c_h___a_n_y │ │ │ │ +  │ │ │ │ + constexpr _m_a_t_c_h___f_l_a_g___t_y_p_e  _s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_m_a_t_c_h___c_o_n_t_i_n_u_o_u_s │ │ │ │ +  │ │ │ │ + constexpr _m_a_t_c_h___f_l_a_g___t_y_p_e  _s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_m_a_t_c_h___d_e_f_a_u_l_t │ │ │ │ +  │ │ │ │ + enum   _s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_m_a_t_c_h___f_l_a_g___t_y_p_e : unsigned │ │ │ │ + int { │ │ │ │ +   __SS__ddeeffaauulltt , __SS__nnoott__bbooll , __SS__nnoott__eeooll , │ │ │ │ + __SS__nnoott__bbooww , │ │ │ │ +   __SS__nnoott__eeooww , __SS__aannyy , __SS__nnoott__nnuullll , │ │ │ │ + __SS__ccoonnttiinnuuoouuss , │ │ │ │ +   __SS__pprreevv__aavvaaiill , __SS__sseedd , __SS__nnoo__ccooppyy , │ │ │ │ + __SS__ffiirrsstt__oonnllyy , │ │ │ │ +   __SS__mmaattcchh__ffllaagg__llaasstt │ │ │ │ + } │ │ │ │ +  │ │ │ │ + constexpr _m_a_t_c_h___f_l_a_g___t_y_p_e  _s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_m_a_t_c_h___n_o_t___b_o_l │ │ │ │ +  │ │ │ │ + constexpr _m_a_t_c_h___f_l_a_g___t_y_p_e  _s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_m_a_t_c_h___n_o_t___b_o_w │ │ │ │ +  │ │ │ │ + constexpr _m_a_t_c_h___f_l_a_g___t_y_p_e  _s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_m_a_t_c_h___n_o_t___e_o_l │ │ │ │ +  │ │ │ │ + constexpr _m_a_t_c_h___f_l_a_g___t_y_p_e  _s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_m_a_t_c_h___n_o_t___e_o_w │ │ │ │ +  │ │ │ │ + constexpr _m_a_t_c_h___f_l_a_g___t_y_p_e  _s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_m_a_t_c_h___n_o_t___n_u_l_l │ │ │ │ +  │ │ │ │ + constexpr _m_a_t_c_h___f_l_a_g___t_y_p_e  _s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_m_a_t_c_h___p_r_e_v___a_v_a_i_l │ │ │ │ +  │ │ │ │ + constexpr _m_a_t_c_h___f_l_a_g___t_y_p_e  _s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_o_p_e_r_a_t_o_r_& (_m_a_t_c_h___f_l_a_g___t_y_p_e │ │ │ │ + __a, _m_a_t_c_h___f_l_a_g___t_y_p_e __b) │ │ │ │ +  │ │ │ │ +constexpr _m_a_t_c_h___f_l_a_g___t_y_p_e &  _s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_o_p_e_r_a_t_o_r_&_= (_m_a_t_c_h___f_l_a_g___t_y_p_e │ │ │ │ + &__a, _m_a_t_c_h___f_l_a_g___t_y_p_e __b) │ │ │ │ +  │ │ │ │ + constexpr _m_a_t_c_h___f_l_a_g___t_y_p_e  _s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_o_p_e_r_a_t_o_r_^ (_m_a_t_c_h___f_l_a_g___t_y_p_e │ │ │ │ + __a, _m_a_t_c_h___f_l_a_g___t_y_p_e __b) │ │ │ │ +  │ │ │ │ +constexpr _m_a_t_c_h___f_l_a_g___t_y_p_e &  _s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_o_p_e_r_a_t_o_r_^_= (_m_a_t_c_h___f_l_a_g___t_y_p_e │ │ │ │ + &__a, _m_a_t_c_h___f_l_a_g___t_y_p_e __b) │ │ │ │ +  │ │ │ │ + constexpr _m_a_t_c_h___f_l_a_g___t_y_p_e  _s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_o_p_e_r_a_t_o_r_| (_m_a_t_c_h___f_l_a_g___t_y_p_e │ │ │ │ + __a, _m_a_t_c_h___f_l_a_g___t_y_p_e __b) │ │ │ │ +  │ │ │ │ +constexpr _m_a_t_c_h___f_l_a_g___t_y_p_e &  _s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_o_p_e_r_a_t_o_r_|_= (_m_a_t_c_h___f_l_a_g___t_y_p_e │ │ │ │ + &__a, _m_a_t_c_h___f_l_a_g___t_y_p_e __b) │ │ │ │ +  │ │ │ │ + constexpr _m_a_t_c_h___f_l_a_g___t_y_p_e  _s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_o_p_e_r_a_t_o_r_~ (_m_a_t_c_h___f_l_a_g___t_y_p_e │ │ │ │ + __a) │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ +Constant definitions for the std regex library. │ │ │ │ This is an internal header file, included by other library headers. Do not │ │ │ │ -attempt to use it directly. │ │ │ │ -Definition in file _c_x_x_a_b_i___i_n_i_t___e_x_c_e_p_t_i_o_n_._h. │ │ │ │ -********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ -********** _?◆_? __GGLLIIBBCCXXXX__CCDDTTOORR__CCAALLLLAABBII ********** │ │ │ │ -#define _GLIBCXX_CDTOR_CALLABI │ │ │ │ -Definition at line _4_2 of file _c_x_x_a_b_i___i_n_i_t___e_x_c_e_p_t_i_o_n_._h. │ │ │ │ -********** _?◆_? __GGLLIIBBCCXXXX__HHAAVVEE__CCDDTTOORR__CCAALLLLAABBII ********** │ │ │ │ -#define _GLIBCXX_HAVE_CDTOR_CALLABI │ │ │ │ -Definition at line _4_3 of file _c_x_x_a_b_i___i_n_i_t___e_x_c_e_p_t_i_o_n_._h. │ │ │ │ +attempt to use it directly. Instead, include . │ │ │ │ +Definition in file _r_e_g_e_x___c_o_n_s_t_a_n_t_s_._h. │ │ │ │ * _b_i_t_s │ │ │ │ - * _c_x_x_a_b_i___i_n_i_t___e_x_c_e_p_t_i_o_n_._h │ │ │ │ + * _r_e_g_e_x___c_o_n_s_t_a_n_t_s_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-12-base/libstdc++/user/a00341_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: cxxabi_init_exception.h Source File │ │ │ +libstdc++: regex_constants.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -45,105 +45,506 @@ │ │ │ │ │ │
│ │ │
│ │ │ -
cxxabi_init_exception.h
│ │ │ +
regex_constants.h
│ │ │
│ │ │
│ │ │ -Go to the documentation of this file.
1// ABI Support -*- C++ -*-
│ │ │ +Go to the documentation of this file.
1// Namespace std::regex_constants -*- C++ -*-
│ │ │
2
│ │ │ -
3// Copyright (C) 2016-2022 Free Software Foundation, Inc.
│ │ │ +
3// Copyright (C) 2010-2022 Free Software Foundation, Inc.
│ │ │
4//
│ │ │ -
5// This file is part of GCC.
│ │ │ -
6//
│ │ │ -
7// GCC is free software; you can redistribute it and/or modify
│ │ │ -
8// it under the terms of the GNU General Public License as published by
│ │ │ -
9// the Free Software Foundation; either version 3, or (at your option)
│ │ │ -
10// any later version.
│ │ │ -
11//
│ │ │ -
12// GCC is distributed in the hope that it will be useful,
│ │ │ -
13// but WITHOUT ANY WARRANTY; without even the implied warranty of
│ │ │ -
14// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
│ │ │ -
15// GNU General Public License for more details.
│ │ │ -
16//
│ │ │ -
17// Under Section 7 of GPL version 3, you are granted additional
│ │ │ -
18// permissions described in the GCC Runtime Library Exception, version
│ │ │ -
19// 3.1, as published by the Free Software Foundation.
│ │ │ -
20
│ │ │ -
21// You should have received a copy of the GNU General Public License and
│ │ │ -
22// a copy of the GCC Runtime Library Exception along with this program;
│ │ │ -
23// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
│ │ │ -
24// <http://www.gnu.org/licenses/>.
│ │ │ -
25
│ │ │ -
26/** @file bits/cxxabi_init_exception.h
│ │ │ -
27 * This is an internal header file, included by other library headers.
│ │ │ -
28 * Do not attempt to use it directly.
│ │ │ -
29 */
│ │ │ -
30
│ │ │ -
31#ifndef _CXXABI_INIT_EXCEPTION_H
│ │ │ -
32#define _CXXABI_INIT_EXCEPTION_H 1
│ │ │ -
33
│ │ │ -
34#pragma GCC system_header
│ │ │ -
35
│ │ │ -
36#pragma GCC visibility push(default)
│ │ │ -
37
│ │ │ -
38#include <stddef.h>
│ │ │ -
39#include <bits/c++config.h>
│ │ │ -
40
│ │ │ -
41#ifndef _GLIBCXX_CDTOR_CALLABI
│ │ │ -
42#define _GLIBCXX_CDTOR_CALLABI
│ │ │ -
43#define _GLIBCXX_HAVE_CDTOR_CALLABI 0
│ │ │ -
44#else
│ │ │ -
45#define _GLIBCXX_HAVE_CDTOR_CALLABI 1
│ │ │ -
46#endif
│ │ │ -
47
│ │ │ -
48#ifdef __cplusplus
│ │ │ -
49
│ │ │ -
50namespace std
│ │ │ -
51{
│ │ │ -
52 class type_info;
│ │ │ -
53}
│ │ │ -
54
│ │ │ -
55namespace __cxxabiv1
│ │ │ -
56{
│ │ │ -
57 struct __cxa_refcounted_exception;
│ │ │ -
58
│ │ │ -
59 extern "C"
│ │ │ -
60 {
│ │ │ -
61 // Allocate memory for the primary exception plus the thrown object.
│ │ │ -
62 void*
│ │ │ -
63 __cxa_allocate_exception(size_t) _GLIBCXX_NOTHROW;
│ │ │ -
64
│ │ │ -
65 void
│ │ │ -
66 __cxa_free_exception(void*) _GLIBCXX_NOTHROW;
│ │ │ -
67
│ │ │ -
68 // Initialize exception (this is a GNU extension)
│ │ │ -
69 __cxa_refcounted_exception*
│ │ │ -
70 __cxa_init_primary_exception(void *__object, std::type_info *__tinfo,
│ │ │ -
71 void (_GLIBCXX_CDTOR_CALLABI *__dest) (void *))
│ │ │ -
72 _GLIBCXX_NOTHROW;
│ │ │ -
73
│ │ │ -
74 }
│ │ │ -
75} // namespace __cxxabiv1
│ │ │ -
76
│ │ │ -
77#endif
│ │ │ -
78
│ │ │ -
79#pragma GCC visibility pop
│ │ │ -
80
│ │ │ -
81#endif // _CXXABI_INIT_EXCEPTION_H
│ │ │ - │ │ │ +
5// This file is part of the GNU ISO C++ Library. This library is free
│ │ │ +
6// software; you can redistribute it and/or modify it under the
│ │ │ +
7// terms of the GNU General Public License as published by the
│ │ │ +
8// Free Software Foundation; either version 3, or (at your option)
│ │ │ +
9// any later version.
│ │ │ +
10
│ │ │ +
11// This library is distributed in the hope that it will be useful,
│ │ │ +
12// but WITHOUT ANY WARRANTY; without even the implied warranty of
│ │ │ +
13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
│ │ │ +
14// GNU General Public License for more details.
│ │ │ +
15
│ │ │ +
16// Under Section 7 of GPL version 3, you are granted additional
│ │ │ +
17// permissions described in the GCC Runtime Library Exception, version
│ │ │ +
18// 3.1, as published by the Free Software Foundation.
│ │ │ +
19
│ │ │ +
20// You should have received a copy of the GNU General Public License and
│ │ │ +
21// a copy of the GCC Runtime Library Exception along with this program;
│ │ │ +
22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
│ │ │ +
23// <http://www.gnu.org/licenses/>.
│ │ │ +
24
│ │ │ +
25/**
│ │ │ +
26 * @file bits/regex_constants.h
│ │ │ +
27 * @brief Constant definitions for the std regex library.
│ │ │ +
28 *
│ │ │ +
29 * This is an internal header file, included by other library headers.
│ │ │ +
30 * Do not attempt to use it directly. @headername{regex}
│ │ │ +
31 */
│ │ │ +
32
│ │ │ +
33namespace std _GLIBCXX_VISIBILITY(default)
│ │ │ +
34{
│ │ │ +
35_GLIBCXX_BEGIN_NAMESPACE_VERSION
│ │ │ +
36
│ │ │ +
37/**
│ │ │ +
38 * @defgroup regex Regular Expressions
│ │ │ +
39 *
│ │ │ +
40 * A facility for performing regular expression pattern matching.
│ │ │ +
41 *
│ │ │ +
42 * @since C++11
│ │ │ +
43 *
│ │ │ +
44 * @{
│ │ │ +
45 */
│ │ │ +
46
│ │ │ +
47/**
│ │ │ +
48 * @namespace std::regex_constants
│ │ │ +
49 * @brief ISO C++ 2011 namespace for options and flags used with std::regex
│ │ │ +
50 */
│ │ │ +
51namespace regex_constants
│ │ │ +
52{
│ │ │ +
53 /**
│ │ │ +
54 * @name 5.1 Regular Expression Syntax Options
│ │ │ +
55 */
│ │ │ +
56 ///@{
│ │ │ +
57
│ │ │ +
58 /**
│ │ │ +
59 * @brief This is a bitmask type indicating how to interpret the regex.
│ │ │ +
60 *
│ │ │ +
61 * The @c syntax_option_type is implementation defined but it is valid to
│ │ │ +
62 * perform bitwise operations on these values and expect the right thing to
│ │ │ +
63 * happen.
│ │ │ +
64 *
│ │ │ +
65 * A valid value of type syntax_option_type shall have exactly one of the
│ │ │ +
66 * elements @c ECMAScript, @c basic, @c extended, @c awk, @c grep, @c egrep
│ │ │ +
67 * %set.
│ │ │ +
68 */
│ │ │ +
│ │ │ +
69 enum syntax_option_type : unsigned int
│ │ │ +
70 {
│ │ │ +
71 _S_icase = 1 << 0,
│ │ │ +
72 _S_nosubs = 1 << 1,
│ │ │ +
73 _S_optimize = 1 << 2,
│ │ │ +
74 _S_collate = 1 << 3,
│ │ │ +
75 _S_ECMAScript = 1 << 4,
│ │ │ +
76 _S_basic = 1 << 5,
│ │ │ +
77 _S_extended = 1 << 6,
│ │ │ +
78 _S_awk = 1 << 7,
│ │ │ +
79 _S_grep = 1 << 8,
│ │ │ +
80 _S_egrep = 1 << 9,
│ │ │ +
81 _S_polynomial = 1 << 10,
│ │ │ +
82 _S_multiline = 1 << 11
│ │ │ +
83 };
│ │ │ +
│ │ │ +
84
│ │ │ +
85 /**
│ │ │ +
86 * Specifies that the matching of regular expressions against a character
│ │ │ +
87 * sequence shall be performed without regard to case.
│ │ │ +
88 */
│ │ │ + │ │ │ +
90
│ │ │ +
91 /**
│ │ │ +
92 * Specifies that when a regular expression is matched against a character
│ │ │ +
93 * container sequence, no sub-expression matches are to be stored in the
│ │ │ +
94 * supplied match_results structure.
│ │ │ +
95 */
│ │ │ + │ │ │ +
97
│ │ │ +
98 /**
│ │ │ +
99 * Specifies that the regular expression engine should pay more attention to
│ │ │ +
100 * the speed with which regular expressions are matched, and less to the
│ │ │ +
101 * speed with which regular expression objects are constructed. Otherwise
│ │ │ +
102 * it has no detectable effect on the program output.
│ │ │ +
103 */
│ │ │ + │ │ │ +
105
│ │ │ +
106 /**
│ │ │ +
107 * Specifies that character ranges of the form [a-b] should be locale
│ │ │ +
108 * sensitive.
│ │ │ +
109 */
│ │ │ + │ │ │ +
111
│ │ │ +
112 /**
│ │ │ +
113 * Specifies that the grammar recognized by the regular expression engine is
│ │ │ +
114 * that used by ECMAScript in ECMA-262 [Ecma International, ECMAScript
│ │ │ +
115 * Language Specification, Standard Ecma-262, third edition, 1999], as
│ │ │ +
116 * modified in section [28.13]. This grammar is similar to that defined
│ │ │ +
117 * in the PERL scripting language but extended with elements found in the
│ │ │ +
118 * POSIX regular expression grammar.
│ │ │ +
119 */
│ │ │ + │ │ │ +
121
│ │ │ +
122 /**
│ │ │ +
123 * Specifies that the grammar recognized by the regular expression engine is
│ │ │ +
124 * that used by POSIX basic regular expressions in IEEE Std 1003.1-2001,
│ │ │ +
125 * Portable Operating System Interface (POSIX), Base Definitions and
│ │ │ +
126 * Headers, Section 9, Regular Expressions [IEEE, Information Technology --
│ │ │ +
127 * Portable Operating System Interface (POSIX), IEEE Standard 1003.1-2001].
│ │ │ +
128 */
│ │ │ + │ │ │ +
130
│ │ │ +
131 /**
│ │ │ +
132 * Specifies that the grammar recognized by the regular expression engine is
│ │ │ +
133 * that used by POSIX extended regular expressions in IEEE Std 1003.1-2001,
│ │ │ +
134 * Portable Operating System Interface (POSIX), Base Definitions and
│ │ │ +
135 * Headers, Section 9, Regular Expressions.
│ │ │ +
136 */
│ │ │ + │ │ │ +
138
│ │ │ +
139 /**
│ │ │ +
140 * Specifies that the grammar recognized by the regular expression engine is
│ │ │ +
141 * that used by POSIX utility awk in IEEE Std 1003.1-2001. This option is
│ │ │ +
142 * identical to syntax_option_type extended, except that C-style escape
│ │ │ +
143 * sequences are supported. These sequences are:
│ │ │ +
144 * \\\\, \\a, \\b, \\f, \\n, \\r, \\t , \\v, \\&apos,, &apos,,
│ │ │ +
145 * and \\ddd (where ddd is one, two, or three octal digits).
│ │ │ +
146 */
│ │ │ + │ │ │ +
148
│ │ │ +
149 /**
│ │ │ +
150 * Specifies that the grammar recognized by the regular expression engine is
│ │ │ +
151 * that used by POSIX utility grep in IEEE Std 1003.1-2001. This option is
│ │ │ +
152 * identical to syntax_option_type basic, except that newlines are treated
│ │ │ +
153 * as whitespace.
│ │ │ +
154 */
│ │ │ + │ │ │ +
156
│ │ │ +
157 /**
│ │ │ +
158 * Specifies that the grammar recognized by the regular expression engine is
│ │ │ +
159 * that used by POSIX utility grep when given the -E option in
│ │ │ +
160 * IEEE Std 1003.1-2001. This option is identical to syntax_option_type
│ │ │ +
161 * extended, except that newlines are treated as whitespace.
│ │ │ +
162 */
│ │ │ + │ │ │ +
164
│ │ │ +
165#if __cplusplus >= 201703L || !defined __STRICT_ANSI__
│ │ │ +
166 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ +
167 // 2503. multiline option should be added to syntax_option_type
│ │ │ +
168 /**
│ │ │ +
169 * Specifies that the `^` anchor matches at the beginning of a line,
│ │ │ +
170 * and the `$` anchor matches at the end of a line, not only at the
│ │ │ +
171 * beginning/end of the input.
│ │ │ +
172 * Valid for the ECMAScript syntax, ignored otherwise.
│ │ │ +
173 * @since C++17
│ │ │ +
174 */
│ │ │ + │ │ │ +
176#endif
│ │ │ +
177
│ │ │ +
178 /// Extension: Equivalent to regex_constants::multiline for C++11 and C++14.
│ │ │ + │ │ │ +
180
│ │ │ +
181 /**
│ │ │ +
182 * Extension: Ensure both space complexity of compiled regex and
│ │ │ +
183 * time complexity execution are not exponential.
│ │ │ +
184 * If specified in a regex with back-references, the exception
│ │ │ +
185 * regex_constants::error_complexity will be thrown.
│ │ │ +
186 */
│ │ │ + │ │ │ +
188
│ │ │ +
189 constexpr inline syntax_option_type
│ │ │ +
│ │ │ + │ │ │ +
191 {
│ │ │ +
192 return (syntax_option_type)(static_cast<unsigned int>(__a)
│ │ │ +
193 & static_cast<unsigned int>(__b));
│ │ │ +
194 }
│ │ │ +
│ │ │ +
195
│ │ │ +
196 constexpr inline syntax_option_type
│ │ │ +
│ │ │ + │ │ │ +
198 {
│ │ │ +
199 return (syntax_option_type)(static_cast<unsigned int>(__a)
│ │ │ +
200 | static_cast<unsigned int>(__b));
│ │ │ +
201 }
│ │ │ +
│ │ │ +
202
│ │ │ +
203 constexpr inline syntax_option_type
│ │ │ +
│ │ │ + │ │ │ +
205 {
│ │ │ +
206 return (syntax_option_type)(static_cast<unsigned int>(__a)
│ │ │ +
207 ^ static_cast<unsigned int>(__b));
│ │ │ +
208 }
│ │ │ +
│ │ │ +
209
│ │ │ +
210 constexpr inline syntax_option_type
│ │ │ +
│ │ │ + │ │ │ + │ │ │ +
│ │ │ +
213
│ │ │ + │ │ │ +
215 inline syntax_option_type&
│ │ │ +
│ │ │ + │ │ │ +
217 { return __a = __a & __b; }
│ │ │ +
│ │ │ +
218
│ │ │ + │ │ │ +
220 inline syntax_option_type&
│ │ │ +
│ │ │ + │ │ │ +
222 { return __a = __a | __b; }
│ │ │ +
│ │ │ +
223
│ │ │ + │ │ │ +
225 inline syntax_option_type&
│ │ │ +
│ │ │ + │ │ │ +
227 { return __a = __a ^ __b; }
│ │ │ +
│ │ │ +
228
│ │ │ +
229 ///@}
│ │ │ +
230
│ │ │ +
231 /**
│ │ │ +
232 * @name 5.2 Matching Rules
│ │ │ +
233 *
│ │ │ +
234 * Matching a regular expression against a sequence of characters [first,
│ │ │ +
235 * last) proceeds according to the rules of the grammar specified for the
│ │ │ +
236 * regular expression object, modified according to the effects listed
│ │ │ +
237 * below for any bitmask elements set.
│ │ │ +
238 *
│ │ │ +
239 */
│ │ │ +
240 ///@{
│ │ │ +
241
│ │ │ +
242 /**
│ │ │ +
243 * @brief This is a bitmask type indicating regex matching rules.
│ │ │ +
244 *
│ │ │ +
245 * The @c match_flag_type is implementation defined but it is valid to
│ │ │ +
246 * perform bitwise operations on these values and expect the right thing to
│ │ │ +
247 * happen.
│ │ │ +
248 */
│ │ │ +
│ │ │ +
249 enum match_flag_type : unsigned int
│ │ │ +
250 {
│ │ │ +
251 _S_default,
│ │ │ +
252 _S_not_bol = 1 << 0,
│ │ │ +
253 _S_not_eol = 1 << 1,
│ │ │ +
254 _S_not_bow = 1 << 2,
│ │ │ +
255 _S_not_eow = 1 << 3,
│ │ │ +
256 _S_any = 1 << 4,
│ │ │ +
257 _S_not_null = 1 << 5,
│ │ │ +
258 _S_continuous = 1 << 6,
│ │ │ +
259 _S_prev_avail = 1 << 7,
│ │ │ +
260 _S_sed = 1 << 8,
│ │ │ +
261 _S_no_copy = 1 << 9,
│ │ │ +
262 _S_first_only = 1 << 10,
│ │ │ +
263 _S_match_flag_last = 1 << 11
│ │ │ +
264 };
│ │ │ +
│ │ │ +
265
│ │ │ +
266 /**
│ │ │ +
267 * The default matching rules.
│ │ │ +
268 */
│ │ │ + │ │ │ +
270
│ │ │ +
271 /**
│ │ │ +
272 * The first character in the sequence [first, last) is treated as though it
│ │ │ +
273 * is not at the beginning of a line, so the character (^) in the regular
│ │ │ +
274 * expression shall not match [first, first).
│ │ │ +
275 */
│ │ │ + │ │ │ +
277
│ │ │ +
278 /**
│ │ │ +
279 * The last character in the sequence [first, last) is treated as though it
│ │ │ +
280 * is not at the end of a line, so the character ($) in the regular
│ │ │ +
281 * expression shall not match [last, last).
│ │ │ +
282 */
│ │ │ + │ │ │ +
284
│ │ │ +
285 /**
│ │ │ +
286 * The expression \\b is not matched against the sub-sequence
│ │ │ +
287 * [first,first).
│ │ │ +
288 */
│ │ │ + │ │ │ +
290
│ │ │ +
291 /**
│ │ │ +
292 * The expression \\b should not be matched against the sub-sequence
│ │ │ +
293 * [last,last).
│ │ │ +
294 */
│ │ │ + │ │ │ +
296
│ │ │ +
297 /**
│ │ │ +
298 * If more than one match is possible then any match is an acceptable
│ │ │ +
299 * result.
│ │ │ +
300 */
│ │ │ + │ │ │ +
302
│ │ │ +
303 /**
│ │ │ +
304 * The expression does not match an empty sequence.
│ │ │ +
305 */
│ │ │ + │ │ │ +
307
│ │ │ +
308 /**
│ │ │ +
309 * The expression only matches a sub-sequence that begins at first .
│ │ │ +
310 */
│ │ │ + │ │ │ +
312
│ │ │ +
313 /**
│ │ │ +
314 * `--first` is a valid iterator position. When this flag is set then the
│ │ │ +
315 * flags `match_not_bol` and `match_not_bow` are ignored by the algorithms
│ │ │ +
316 * `regex_match`, `regex_search`, and `regex_replace`, and by the iterators
│ │ │ +
317 * `regex_iterator` and `regex_token_iterator`.
│ │ │ +
318 */
│ │ │ + │ │ │ +
320
│ │ │ +
321 /**
│ │ │ +
322 * When a regular expression match is to be replaced by a new string, the
│ │ │ +
323 * new string is constructed using the rules used by the ECMAScript replace
│ │ │ +
324 * function in ECMA- 262 [Ecma International, ECMAScript Language
│ │ │ +
325 * Specification, Standard Ecma-262, third edition, 1999], part 15.5.4.11
│ │ │ +
326 * String.prototype.replace. In addition, during search and replace
│ │ │ +
327 * operations all non-overlapping occurrences of the regular expression
│ │ │ +
328 * are located and replaced, and sections of the input that did not match
│ │ │ +
329 * the expression are copied unchanged to the output string.
│ │ │ +
330 *
│ │ │ +
331 * Format strings (from ECMA-262 [15.5.4.11]):
│ │ │ +
332 * @li $$ The dollar-sign itself ($)
│ │ │ +
333 * @li $& The matched substring.
│ │ │ +
334 * @li $` The portion of @a string that precedes the matched substring.
│ │ │ +
335 * This would be match_results::prefix().
│ │ │ +
336 * @li $' The portion of @a string that follows the matched substring.
│ │ │ +
337 * This would be match_results::suffix().
│ │ │ +
338 * @li $n The nth capture, where n is in [1,9] and $n is not followed by a
│ │ │ +
339 * decimal digit. If n <= match_results::size() and the nth capture
│ │ │ +
340 * is undefined, use the empty string instead. If n >
│ │ │ +
341 * match_results::size(), the result is implementation-defined.
│ │ │ +
342 * @li $nn The nnth capture, where nn is a two-digit decimal number on
│ │ │ +
343 * [01, 99]. If nn <= match_results::size() and the nth capture is
│ │ │ +
344 * undefined, use the empty string instead. If
│ │ │ +
345 * nn > match_results::size(), the result is implementation-defined.
│ │ │ +
346 */
│ │ │ + │ │ │ +
348
│ │ │ +
349 /**
│ │ │ +
350 * When a regular expression match is to be replaced by a new string, the
│ │ │ +
351 * new string is constructed using the rules used by the POSIX sed utility
│ │ │ +
352 * in IEEE Std 1003.1- 2001 [IEEE, Information Technology -- Portable
│ │ │ +
353 * Operating System Interface (POSIX), IEEE Standard 1003.1-2001].
│ │ │ +
354 */
│ │ │ + │ │ │ +
356
│ │ │ +
357 /**
│ │ │ +
358 * During a search and replace operation, sections of the character
│ │ │ +
359 * container sequence being searched that do not match the regular
│ │ │ +
360 * expression shall not be copied to the output string.
│ │ │ +
361 */
│ │ │ + │ │ │ +
363
│ │ │ +
364 /**
│ │ │ +
365 * When specified during a search and replace operation, only the first
│ │ │ +
366 * occurrence of the regular expression shall be replaced.
│ │ │ +
367 */
│ │ │ + │ │ │ +
369
│ │ │ +
370 constexpr inline match_flag_type
│ │ │ +
│ │ │ + │ │ │ +
372 {
│ │ │ +
373 return (match_flag_type)(static_cast<unsigned int>(__a)
│ │ │ +
374 & static_cast<unsigned int>(__b));
│ │ │ +
375 }
│ │ │ +
│ │ │ +
376
│ │ │ +
377 constexpr inline match_flag_type
│ │ │ +
│ │ │ + │ │ │ +
379 {
│ │ │ +
380 return (match_flag_type)(static_cast<unsigned int>(__a)
│ │ │ +
381 | static_cast<unsigned int>(__b));
│ │ │ +
382 }
│ │ │ +
│ │ │ +
383
│ │ │ +
384 constexpr inline match_flag_type
│ │ │ +
│ │ │ + │ │ │ +
386 {
│ │ │ +
387 return (match_flag_type)(static_cast<unsigned int>(__a)
│ │ │ +
388 ^ static_cast<unsigned int>(__b));
│ │ │ +
389 }
│ │ │ +
│ │ │ +
390
│ │ │ +
391 constexpr inline match_flag_type
│ │ │ +
│ │ │ + │ │ │ + │ │ │ +
│ │ │ +
394
│ │ │ + │ │ │ +
396 inline match_flag_type&
│ │ │ +
│ │ │ + │ │ │ +
398 { return __a = __a & __b; }
│ │ │ +
│ │ │ +
399
│ │ │ + │ │ │ +
401 inline match_flag_type&
│ │ │ +
│ │ │ + │ │ │ +
403 { return __a = __a | __b; }
│ │ │ +
│ │ │ +
404
│ │ │ + │ │ │ +
406 inline match_flag_type&
│ │ │ +
│ │ │ + │ │ │ +
408 { return __a = __a ^ __b; }
│ │ │ +
│ │ │ +
409
│ │ │ +
410 ///@}
│ │ │ +
411} // namespace regex_constants
│ │ │ +
412/// @} group regex
│ │ │ +
413
│ │ │ +
414_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ +
415} // namespace std
│ │ │ +
416
│ │ │
ISO C++ entities toplevel namespace is std.
│ │ │ -
Part of RTTI.
Definition typeinfo:93
│ │ │ +
constexpr syntax_option_type & operator|=(syntax_option_type &__a, syntax_option_type __b)
This is a bitmask type indicating how to interpret the regex.
│ │ │ +
constexpr syntax_option_type __polynomial
│ │ │ +
constexpr syntax_option_type & operator&=(syntax_option_type &__a, syntax_option_type __b)
This is a bitmask type indicating how to interpret the regex.
│ │ │ +
constexpr syntax_option_type operator&(syntax_option_type __a, syntax_option_type __b)
This is a bitmask type indicating how to interpret the regex.
│ │ │ +
constexpr match_flag_type match_not_bow
│ │ │ +
constexpr match_flag_type match_not_bol
│ │ │ +
constexpr syntax_option_type ECMAScript
│ │ │ +
constexpr match_flag_type match_any
│ │ │ +
constexpr syntax_option_type egrep
│ │ │ +
syntax_option_type
This is a bitmask type indicating how to interpret the regex.
│ │ │ +
constexpr syntax_option_type multiline
│ │ │ +
constexpr match_flag_type match_default
│ │ │ +
constexpr match_flag_type format_first_only
│ │ │ +
constexpr syntax_option_type awk
│ │ │ +
constexpr syntax_option_type __multiline
Extension: Equivalent to regex_constants::multiline for C++11 and C++14.
│ │ │ +
constexpr match_flag_type match_continuous
│ │ │ +
constexpr syntax_option_type extended
│ │ │ +
constexpr syntax_option_type operator^(syntax_option_type __a, syntax_option_type __b)
This is a bitmask type indicating how to interpret the regex.
│ │ │ +
constexpr syntax_option_type basic
│ │ │ +
constexpr match_flag_type match_not_eol
│ │ │ +
match_flag_type
This is a bitmask type indicating regex matching rules.
│ │ │ +
constexpr syntax_option_type icase
│ │ │ +
constexpr syntax_option_type optimize
│ │ │ +
constexpr match_flag_type format_default
│ │ │ +
constexpr syntax_option_type nosubs
│ │ │ +
constexpr syntax_option_type operator~(syntax_option_type __a)
This is a bitmask type indicating how to interpret the regex.
│ │ │ +
constexpr match_flag_type match_prev_avail
│ │ │ +
constexpr match_flag_type format_sed
│ │ │ +
constexpr syntax_option_type operator|(syntax_option_type __a, syntax_option_type __b)
This is a bitmask type indicating how to interpret the regex.
│ │ │ +
constexpr syntax_option_type & operator^=(syntax_option_type &__a, syntax_option_type __b)
This is a bitmask type indicating how to interpret the regex.
│ │ │ +
constexpr match_flag_type match_not_eow
│ │ │ +
constexpr match_flag_type match_not_null
│ │ │ +
constexpr match_flag_type format_no_copy
│ │ │ +
constexpr syntax_option_type grep
│ │ │ +
Facet for localized string comparison.
│ │ │ + │ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,93 +1,552 @@ │ │ │ │ libstdc++ │ │ │ │ -cxxabi_init_exception.h │ │ │ │ +regex_constants.h │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -1// ABI Support -*- C++ -*- │ │ │ │ +1// Namespace std::regex_constants -*- C++ -*- │ │ │ │ 2 │ │ │ │ -3// Copyright (C) 2016-2022 Free Software Foundation, Inc. │ │ │ │ +3// Copyright (C) 2010-2022 Free Software Foundation, Inc. │ │ │ │ 4// │ │ │ │ -5// This file is part of GCC. │ │ │ │ -6// │ │ │ │ -7// GCC is free software; you can redistribute it and/or modify │ │ │ │ -8// it under the terms of the GNU General Public License as published by │ │ │ │ -9// the Free Software Foundation; either version 3, or (at your option) │ │ │ │ -10// any later version. │ │ │ │ -11// │ │ │ │ -12// GCC is distributed in the hope that it will be useful, │ │ │ │ -13// but WITHOUT ANY WARRANTY; without even the implied warranty of │ │ │ │ -14// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the │ │ │ │ -15// GNU General Public License for more details. │ │ │ │ -16// │ │ │ │ -17// Under Section 7 of GPL version 3, you are granted additional │ │ │ │ -18// permissions described in the GCC Runtime Library Exception, version │ │ │ │ -19// 3.1, as published by the Free Software Foundation. │ │ │ │ -20 │ │ │ │ -21// You should have received a copy of the GNU General Public License and │ │ │ │ -22// a copy of the GCC Runtime Library Exception along with this program; │ │ │ │ -23// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see │ │ │ │ -24// . │ │ │ │ -25 │ │ │ │ -26/** @file bits/cxxabi_init_exception.h │ │ │ │ -27 * This is an internal header file, included by other library headers. │ │ │ │ -28 * Do not attempt to use it directly. │ │ │ │ -29 */ │ │ │ │ -30 │ │ │ │ -31#ifndef _CXXABI_INIT_EXCEPTION_H │ │ │ │ -32#define _CXXABI_INIT_EXCEPTION_H 1 │ │ │ │ -33 │ │ │ │ -34#pragma GCC system_header │ │ │ │ -35 │ │ │ │ -36#pragma GCC visibility push(default) │ │ │ │ -37 │ │ │ │ -38#include │ │ │ │ -39#include <_b_i_t_s_/_c_+_+_c_o_n_f_i_g_._h> │ │ │ │ -40 │ │ │ │ -41#ifndef _GLIBCXX_CDTOR_CALLABI │ │ │ │ -42#define _GLIBCXX_CDTOR_CALLABI │ │ │ │ -43#define _GLIBCXX_HAVE_CDTOR_CALLABI 0 │ │ │ │ -44#else │ │ │ │ -45#define _GLIBCXX_HAVE_CDTOR_CALLABI 1 │ │ │ │ -46#endif │ │ │ │ -47 │ │ │ │ -48#ifdef __cplusplus │ │ │ │ -49 │ │ │ │ -50namespace _s_t_d │ │ │ │ -51{ │ │ │ │ -52 class type_info; │ │ │ │ -53} │ │ │ │ -54 │ │ │ │ -55namespace __cxxabiv1 │ │ │ │ -56{ │ │ │ │ -57 struct __cxa_refcounted_exception; │ │ │ │ -58 │ │ │ │ -59 extern "C" │ │ │ │ -60 { │ │ │ │ -61 // Allocate memory for the primary exception plus the thrown object. │ │ │ │ -62 void* │ │ │ │ -63 __cxa_allocate_exception(size_t) _GLIBCXX_NOTHROW; │ │ │ │ -64 │ │ │ │ -65 void │ │ │ │ -66 __cxa_free_exception(void*) _GLIBCXX_NOTHROW; │ │ │ │ -67 │ │ │ │ -68 // Initialize exception (this is a GNU extension) │ │ │ │ -69 __cxa_refcounted_exception* │ │ │ │ -70 __cxa_init_primary_exception(void *__object, _s_t_d_:_:_t_y_p_e___i_n_f_o *__tinfo, │ │ │ │ -71 void (_GLIBCXX_CDTOR_CALLABI *__dest) (void *)) │ │ │ │ -72 _GLIBCXX_NOTHROW; │ │ │ │ -73 │ │ │ │ -74 } │ │ │ │ -75} // namespace __cxxabiv1 │ │ │ │ -76 │ │ │ │ -77#endif │ │ │ │ -78 │ │ │ │ -79#pragma GCC visibility pop │ │ │ │ -80 │ │ │ │ -81#endif // _CXXABI_INIT_EXCEPTION_H │ │ │ │ -_c_+_+_c_o_n_f_i_g_._h │ │ │ │ +5// This file is part of the GNU ISO C++ Library. This library is free │ │ │ │ +6// software; you can redistribute it and/or modify it under the │ │ │ │ +7// terms of the GNU General Public License as published by the │ │ │ │ +8// Free Software Foundation; either version 3, or (at your option) │ │ │ │ +9// any later version. │ │ │ │ +10 │ │ │ │ +11// This library is distributed in the hope that it will be useful, │ │ │ │ +12// but WITHOUT ANY WARRANTY; without even the implied warranty of │ │ │ │ +13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the │ │ │ │ +14// GNU General Public License for more details. │ │ │ │ +15 │ │ │ │ +16// Under Section 7 of GPL version 3, you are granted additional │ │ │ │ +17// permissions described in the GCC Runtime Library Exception, version │ │ │ │ +18// 3.1, as published by the Free Software Foundation. │ │ │ │ +19 │ │ │ │ +20// You should have received a copy of the GNU General Public License and │ │ │ │ +21// a copy of the GCC Runtime Library Exception along with this program; │ │ │ │ +22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see │ │ │ │ +23// . │ │ │ │ +24 │ │ │ │ +25/** │ │ │ │ +26 * @file bits/regex_constants.h │ │ │ │ +27 * @brief Constant definitions for the std regex library. │ │ │ │ +28 * │ │ │ │ +29 * This is an internal header file, included by other library headers. │ │ │ │ +30 * Do not attempt to use it directly. @headername{regex} │ │ │ │ +31 */ │ │ │ │ +32 │ │ │ │ +33namespace _s_t_d _GLIBCXX_VISIBILITY(default) │ │ │ │ +34{ │ │ │ │ +35_GLIBCXX_BEGIN_NAMESPACE_VERSION │ │ │ │ +36 │ │ │ │ +37/** │ │ │ │ +38 * @defgroup regex Regular Expressions │ │ │ │ +39 * │ │ │ │ +40 * A facility for performing regular expression pattern matching. │ │ │ │ +41 * │ │ │ │ +42 * @since C++11 │ │ │ │ +43 * │ │ │ │ +44 * @{ │ │ │ │ +45 */ │ │ │ │ +46 │ │ │ │ +47/** │ │ │ │ +_4_8 * @namespace std::regex_constants │ │ │ │ +49 * @brief ISO C++ 2011 namespace for options and flags used with std::regex │ │ │ │ +50 */ │ │ │ │ +51namespace regex_constants │ │ │ │ +52{ │ │ │ │ +53 /** │ │ │ │ +54 * @name 5.1 Regular Expression Syntax Options │ │ │ │ +55 */ │ │ │ │ +56 ///@{ │ │ │ │ +57 │ │ │ │ +58 /** │ │ │ │ +59 * @brief This is a bitmask type indicating how to interpret the regex. │ │ │ │ +60 * │ │ │ │ +61 * The @c syntax_option_type is implementation defined but it is valid to │ │ │ │ +62 * perform bitwise operations on these values and expect the right thing to │ │ │ │ +63 * happen. │ │ │ │ +64 * │ │ │ │ +65 * A valid value of type syntax_option_type shall have exactly one of the │ │ │ │ +66 * elements @c ECMAScript, @c basic, @c extended, @c awk, @c grep, @c egrep │ │ │ │ +67 * %set. │ │ │ │ +68 */ │ │ │ │ +_6_9 enum _s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e : unsigned int │ │ │ │ +70 { │ │ │ │ +71 _S_icase = 1 << 0, │ │ │ │ +72 _S_nosubs = 1 << 1, │ │ │ │ +73 _S_optimize = 1 << 2, │ │ │ │ +74 _S_collate = 1 << 3, │ │ │ │ +75 _S_ECMAScript = 1 << 4, │ │ │ │ +76 _S_basic = 1 << 5, │ │ │ │ +77 _S_extended = 1 << 6, │ │ │ │ +78 _S_awk = 1 << 7, │ │ │ │ +79 _S_grep = 1 << 8, │ │ │ │ +80 _S_egrep = 1 << 9, │ │ │ │ +81 _S_polynomial = 1 << 10, │ │ │ │ +82 _S_multiline = 1 << 11 │ │ │ │ +83 }; │ │ │ │ +84 │ │ │ │ +85 /** │ │ │ │ +86 * Specifies that the matching of regular expressions against a character │ │ │ │ +87 * sequence shall be performed without regard to case. │ │ │ │ +88 */ │ │ │ │ +_8_9 ___G_L_I_B_C_X_X_1_7___I_N_L_I_N_E constexpr _s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e _i_c_a_s_e = _S_icase; │ │ │ │ +90 │ │ │ │ +91 /** │ │ │ │ +92 * Specifies that when a regular expression is matched against a character │ │ │ │ +93 * container sequence, no sub-expression matches are to be stored in the │ │ │ │ +94 * supplied match_results structure. │ │ │ │ +95 */ │ │ │ │ +_9_6 ___G_L_I_B_C_X_X_1_7___I_N_L_I_N_E constexpr _s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e _n_o_s_u_b_s = _S_nosubs; │ │ │ │ +97 │ │ │ │ +98 /** │ │ │ │ +99 * Specifies that the regular expression engine should pay more attention to │ │ │ │ +100 * the speed with which regular expressions are matched, and less to the │ │ │ │ +101 * speed with which regular expression objects are constructed. Otherwise │ │ │ │ +102 * it has no detectable effect on the program output. │ │ │ │ +103 */ │ │ │ │ +_1_0_4 ___G_L_I_B_C_X_X_1_7___I_N_L_I_N_E constexpr _s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e _o_p_t_i_m_i_z_e = _S_optimize; │ │ │ │ +105 │ │ │ │ +106 /** │ │ │ │ +107 * Specifies that character ranges of the form [a-b] should be locale │ │ │ │ +108 * sensitive. │ │ │ │ +109 */ │ │ │ │ +_1_1_0 ___G_L_I_B_C_X_X_1_7___I_N_L_I_N_E constexpr _s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e _c_o_l_l_a_t_e = _S_collate; │ │ │ │ +111 │ │ │ │ +112 /** │ │ │ │ +113 * Specifies that the grammar recognized by the regular expression engine is │ │ │ │ +114 * that used by ECMAScript in ECMA-262 [Ecma International, ECMAScript │ │ │ │ +115 * Language Specification, Standard Ecma-262, third edition, 1999], as │ │ │ │ +116 * modified in section [28.13]. This grammar is similar to that defined │ │ │ │ +117 * in the PERL scripting language but extended with elements found in the │ │ │ │ +118 * POSIX regular expression grammar. │ │ │ │ +119 */ │ │ │ │ +_1_2_0 ___G_L_I_B_C_X_X_1_7___I_N_L_I_N_E constexpr _s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e _E_C_M_A_S_c_r_i_p_t = _S_ECMAScript; │ │ │ │ +121 │ │ │ │ +122 /** │ │ │ │ +123 * Specifies that the grammar recognized by the regular expression engine is │ │ │ │ +124 * that used by POSIX basic regular expressions in IEEE Std 1003.1-2001, │ │ │ │ +125 * Portable Operating System Interface (POSIX), Base Definitions and │ │ │ │ +126 * Headers, Section 9, Regular Expressions [IEEE, Information Technology -- │ │ │ │ +127 * Portable Operating System Interface (POSIX), IEEE Standard 1003.1-2001]. │ │ │ │ +128 */ │ │ │ │ +_1_2_9 ___G_L_I_B_C_X_X_1_7___I_N_L_I_N_E constexpr _s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e _b_a_s_i_c = _S_basic; │ │ │ │ +130 │ │ │ │ +131 /** │ │ │ │ +132 * Specifies that the grammar recognized by the regular expression engine is │ │ │ │ +133 * that used by POSIX extended regular expressions in IEEE Std 1003.1-2001, │ │ │ │ +134 * Portable Operating System Interface (POSIX), Base Definitions and │ │ │ │ +135 * Headers, Section 9, Regular Expressions. │ │ │ │ +136 */ │ │ │ │ +_1_3_7 ___G_L_I_B_C_X_X_1_7___I_N_L_I_N_E constexpr _s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e _e_x_t_e_n_d_e_d = _S_extended; │ │ │ │ +138 │ │ │ │ +139 /** │ │ │ │ +140 * Specifies that the grammar recognized by the regular expression engine is │ │ │ │ +141 * that used by POSIX utility awk in IEEE Std 1003.1-2001. This option is │ │ │ │ +142 * identical to syntax_option_type extended, except that C-style escape │ │ │ │ +143 * sequences are supported. These sequences are: │ │ │ │ +144 * \\\\, \\a, \\b, \\f, \\n, \\r, \\t , \\v, \\&apos,, &apos,, │ │ │ │ +145 * and \\ddd (where ddd is one, two, or three octal digits). │ │ │ │ +146 */ │ │ │ │ +_1_4_7 ___G_L_I_B_C_X_X_1_7___I_N_L_I_N_E constexpr _s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e _a_w_k = _S_awk; │ │ │ │ +148 │ │ │ │ +149 /** │ │ │ │ +150 * Specifies that the grammar recognized by the regular expression engine is │ │ │ │ +151 * that used by POSIX utility grep in IEEE Std 1003.1-2001. This option is │ │ │ │ +152 * identical to syntax_option_type basic, except that newlines are treated │ │ │ │ +153 * as whitespace. │ │ │ │ +154 */ │ │ │ │ +_1_5_5 ___G_L_I_B_C_X_X_1_7___I_N_L_I_N_E constexpr _s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e _g_r_e_p = _S_grep; │ │ │ │ +156 │ │ │ │ +157 /** │ │ │ │ +158 * Specifies that the grammar recognized by the regular expression engine is │ │ │ │ +159 * that used by POSIX utility grep when given the -E option in │ │ │ │ +160 * IEEE Std 1003.1-2001. This option is identical to syntax_option_type │ │ │ │ +161 * extended, except that newlines are treated as whitespace. │ │ │ │ +162 */ │ │ │ │ +_1_6_3 ___G_L_I_B_C_X_X_1_7___I_N_L_I_N_E constexpr _s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e _e_g_r_e_p = _S_egrep; │ │ │ │ +164 │ │ │ │ +165#if __cplusplus >= 201703L || !defined __STRICT_ANSI__ │ │ │ │ +166 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ +167 // 2503. multiline option should be added to syntax_option_type │ │ │ │ +168 /** │ │ │ │ +169 * Specifies that the `^` anchor matches at the beginning of a line, │ │ │ │ +170 * and the `$` anchor matches at the end of a line, not only at the │ │ │ │ +171 * beginning/end of the input. │ │ │ │ +172 * Valid for the ECMAScript syntax, ignored otherwise. │ │ │ │ +173 * @since C++17 │ │ │ │ +174 */ │ │ │ │ +_1_7_5 ___G_L_I_B_C_X_X_1_7___I_N_L_I_N_E constexpr _s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e _m_u_l_t_i_l_i_n_e = _S_multiline; │ │ │ │ +176#endif │ │ │ │ +177 │ │ │ │ +178 /// Extension: Equivalent to regex_constants::multiline for C++11 and │ │ │ │ +C++14. │ │ │ │ +_1_7_9 ___G_L_I_B_C_X_X_1_7___I_N_L_I_N_E constexpr _s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e _____m_u_l_t_i_l_i_n_e = _S_multiline; │ │ │ │ +180 │ │ │ │ +181 /** │ │ │ │ +182 * Extension: Ensure both space complexity of compiled regex and │ │ │ │ +183 * time complexity execution are not exponential. │ │ │ │ +184 * If specified in a regex with back-references, the exception │ │ │ │ +185 * regex_constants::error_complexity will be thrown. │ │ │ │ +186 */ │ │ │ │ +_1_8_7 ___G_L_I_B_C_X_X_1_7___I_N_L_I_N_E constexpr _s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e _____p_o_l_y_n_o_m_i_a_l = │ │ │ │ +_S_polynomial; │ │ │ │ +188 │ │ │ │ +189 constexpr inline _s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e │ │ │ │ +_1_9_0 _o_p_e_r_a_t_o_r_&(_s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e __a, _s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e __b) │ │ │ │ +191 { │ │ │ │ +192 return (_s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e)(static_cast(__a) │ │ │ │ +193 & static_cast(__b)); │ │ │ │ +194 } │ │ │ │ +195 │ │ │ │ +196 constexpr inline _s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e │ │ │ │ +_1_9_7 _o_p_e_r_a_t_o_r_|(_s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e __a, _s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e __b) │ │ │ │ +198 { │ │ │ │ +199 return (_s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e)(static_cast(__a) │ │ │ │ +200 | static_cast(__b)); │ │ │ │ +201 } │ │ │ │ +202 │ │ │ │ +203 constexpr inline _s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e │ │ │ │ +_2_0_4 _o_p_e_r_a_t_o_r_^(_s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e __a, _s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e __b) │ │ │ │ +205 { │ │ │ │ +206 return (_s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e)(static_cast(__a) │ │ │ │ +207 ^ static_cast(__b)); │ │ │ │ +208 } │ │ │ │ +209 │ │ │ │ +210 constexpr inline _s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e │ │ │ │ +_2_1_1 _o_p_e_r_a_t_o_r_~(_s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e __a) │ │ │ │ +212 { return (_s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e)(_~_s_t_a_t_i_c___c_a_s_t_<_u_n_s_i_g_n_e_d_ _i_n_t_>(__a)); } │ │ │ │ +213 │ │ │ │ +214 ___G_L_I_B_C_X_X_1_4___C_O_N_S_T_E_X_P_R │ │ │ │ +215 inline _s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e& │ │ │ │ +_2_1_6 _o_p_e_r_a_t_o_r_&_=(_s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e& __a, _s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e __b) │ │ │ │ +217 { return __a = __a & __b; } │ │ │ │ +218 │ │ │ │ +219 ___G_L_I_B_C_X_X_1_4___C_O_N_S_T_E_X_P_R │ │ │ │ +220 inline _s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e& │ │ │ │ +_2_2_1 _o_p_e_r_a_t_o_r_|_=(_s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e& __a, _s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e __b) │ │ │ │ +222 { return __a = __a | __b; } │ │ │ │ +223 │ │ │ │ +224 ___G_L_I_B_C_X_X_1_4___C_O_N_S_T_E_X_P_R │ │ │ │ +225 inline _s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e& │ │ │ │ +_2_2_6 _o_p_e_r_a_t_o_r_^_=(_s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e& __a, _s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e __b) │ │ │ │ +227 { return __a = __a ^ __b; } │ │ │ │ +228 │ │ │ │ +229 ///@} │ │ │ │ +230 │ │ │ │ +231 /** │ │ │ │ +232 * @name 5.2 Matching Rules │ │ │ │ +233 * │ │ │ │ +234 * Matching a regular expression against a sequence of characters [first, │ │ │ │ +235 * last) proceeds according to the rules of the grammar specified for the │ │ │ │ +236 * regular expression object, modified according to the effects listed │ │ │ │ +237 * below for any bitmask elements set. │ │ │ │ +238 * │ │ │ │ +239 */ │ │ │ │ +240 ///@{ │ │ │ │ +241 │ │ │ │ +242 /** │ │ │ │ +243 * @brief This is a bitmask type indicating regex matching rules. │ │ │ │ +244 * │ │ │ │ +245 * The @c match_flag_type is implementation defined but it is valid to │ │ │ │ +246 * perform bitwise operations on these values and expect the right thing to │ │ │ │ +247 * happen. │ │ │ │ +248 */ │ │ │ │ +_2_4_9 enum _m_a_t_c_h___f_l_a_g___t_y_p_e : unsigned int │ │ │ │ +250 { │ │ │ │ +251 _S_default, │ │ │ │ +252 _S_not_bol = 1 << 0, │ │ │ │ +253 _S_not_eol = 1 << 1, │ │ │ │ +254 _S_not_bow = 1 << 2, │ │ │ │ +255 _S_not_eow = 1 << 3, │ │ │ │ +256 _S_any = 1 << 4, │ │ │ │ +257 _S_not_null = 1 << 5, │ │ │ │ +258 _S_continuous = 1 << 6, │ │ │ │ +259 _S_prev_avail = 1 << 7, │ │ │ │ +260 _S_sed = 1 << 8, │ │ │ │ +261 _S_no_copy = 1 << 9, │ │ │ │ +262 _S_first_only = 1 << 10, │ │ │ │ +263 _S_match_flag_last = 1 << 11 │ │ │ │ +264 }; │ │ │ │ +265 │ │ │ │ +266 /** │ │ │ │ +267 * The default matching rules. │ │ │ │ +268 */ │ │ │ │ +_2_6_9 ___G_L_I_B_C_X_X_1_7___I_N_L_I_N_E constexpr _m_a_t_c_h___f_l_a_g___t_y_p_e _m_a_t_c_h___d_e_f_a_u_l_t = _S_default; │ │ │ │ +270 │ │ │ │ +271 /** │ │ │ │ +272 * The first character in the sequence [first, last) is treated as though it │ │ │ │ +273 * is not at the beginning of a line, so the character (^) in the regular │ │ │ │ +274 * expression shall not match [first, first). │ │ │ │ +275 */ │ │ │ │ +_2_7_6 ___G_L_I_B_C_X_X_1_7___I_N_L_I_N_E constexpr _m_a_t_c_h___f_l_a_g___t_y_p_e _m_a_t_c_h___n_o_t___b_o_l = _S_not_bol; │ │ │ │ +277 │ │ │ │ +278 /** │ │ │ │ +279 * The last character in the sequence [first, last) is treated as though it │ │ │ │ +280 * is not at the end of a line, so the character ($) in the regular │ │ │ │ +281 * expression shall not match [last, last). │ │ │ │ +282 */ │ │ │ │ +_2_8_3 ___G_L_I_B_C_X_X_1_7___I_N_L_I_N_E constexpr _m_a_t_c_h___f_l_a_g___t_y_p_e _m_a_t_c_h___n_o_t___e_o_l = _S_not_eol; │ │ │ │ +284 │ │ │ │ +285 /** │ │ │ │ +286 * The expression \\b is not matched against the sub-sequence │ │ │ │ +287 * [first,first). │ │ │ │ +288 */ │ │ │ │ +_2_8_9 ___G_L_I_B_C_X_X_1_7___I_N_L_I_N_E constexpr _m_a_t_c_h___f_l_a_g___t_y_p_e _m_a_t_c_h___n_o_t___b_o_w = _S_not_bow; │ │ │ │ +290 │ │ │ │ +291 /** │ │ │ │ +292 * The expression \\b should not be matched against the sub-sequence │ │ │ │ +293 * [last,last). │ │ │ │ +294 */ │ │ │ │ +_2_9_5 ___G_L_I_B_C_X_X_1_7___I_N_L_I_N_E constexpr _m_a_t_c_h___f_l_a_g___t_y_p_e _m_a_t_c_h___n_o_t___e_o_w = _S_not_eow; │ │ │ │ +296 │ │ │ │ +297 /** │ │ │ │ +298 * If more than one match is possible then any match is an acceptable │ │ │ │ +299 * result. │ │ │ │ +300 */ │ │ │ │ +_3_0_1 ___G_L_I_B_C_X_X_1_7___I_N_L_I_N_E constexpr _m_a_t_c_h___f_l_a_g___t_y_p_e _m_a_t_c_h___a_n_y = _S_any; │ │ │ │ +302 │ │ │ │ +303 /** │ │ │ │ +304 * The expression does not match an empty sequence. │ │ │ │ +305 */ │ │ │ │ +_3_0_6 ___G_L_I_B_C_X_X_1_7___I_N_L_I_N_E constexpr _m_a_t_c_h___f_l_a_g___t_y_p_e _m_a_t_c_h___n_o_t___n_u_l_l = _S_not_null; │ │ │ │ +307 │ │ │ │ +308 /** │ │ │ │ +309 * The expression only matches a sub-sequence that begins at first . │ │ │ │ +310 */ │ │ │ │ +_3_1_1 ___G_L_I_B_C_X_X_1_7___I_N_L_I_N_E constexpr _m_a_t_c_h___f_l_a_g___t_y_p_e _m_a_t_c_h___c_o_n_t_i_n_u_o_u_s = │ │ │ │ +_S_continuous; │ │ │ │ +312 │ │ │ │ +313 /** │ │ │ │ +314 * `--first` is a valid iterator position. When this flag is set then the │ │ │ │ +315 * flags `match_not_bol` and `match_not_bow` are ignored by the algorithms │ │ │ │ +316 * `regex_match`, `regex_search`, and `regex_replace`, and by the iterators │ │ │ │ +317 * `regex_iterator` and `regex_token_iterator`. │ │ │ │ +318 */ │ │ │ │ +_3_1_9 ___G_L_I_B_C_X_X_1_7___I_N_L_I_N_E constexpr _m_a_t_c_h___f_l_a_g___t_y_p_e _m_a_t_c_h___p_r_e_v___a_v_a_i_l = │ │ │ │ +_S_prev_avail; │ │ │ │ +320 │ │ │ │ +321 /** │ │ │ │ +322 * When a regular expression match is to be replaced by a new string, the │ │ │ │ +323 * new string is constructed using the rules used by the ECMAScript replace │ │ │ │ +324 * function in ECMA- 262 [Ecma International, ECMAScript Language │ │ │ │ +325 * Specification, Standard Ecma-262, third edition, 1999], part 15.5.4.11 │ │ │ │ +326 * String.prototype.replace. In addition, during search and replace │ │ │ │ +327 * operations all non-overlapping occurrences of the regular expression │ │ │ │ +328 * are located and replaced, and sections of the input that did not match │ │ │ │ +329 * the expression are copied unchanged to the output string. │ │ │ │ +330 * │ │ │ │ +331 * Format strings (from ECMA-262 [15.5.4.11]): │ │ │ │ +332 * @li $$ The dollar-sign itself ($) │ │ │ │ +333 * @li $& The matched substring. │ │ │ │ +334 * @li $` The portion of @a string that precedes the matched substring. │ │ │ │ +335 * This would be match_results::prefix(). │ │ │ │ +336 * @li $' The portion of @a string that follows the matched substring. │ │ │ │ +337 * This would be match_results::suffix(). │ │ │ │ +338 * @li $n The nth capture, where n is in [1,9] and $n is not followed by a │ │ │ │ +339 * decimal digit. If n <= match_results::size() and the nth capture │ │ │ │ +340 * is undefined, use the empty string instead. If n > │ │ │ │ +341 * match_results::size(), the result is implementation-defined. │ │ │ │ +342 * @li $nn The nnth capture, where nn is a two-digit decimal number on │ │ │ │ +343 * [01, 99]. If nn <= match_results::size() and the nth capture is │ │ │ │ +344 * undefined, use the empty string instead. If │ │ │ │ +345 * nn > match_results::size(), the result is implementation-defined. │ │ │ │ +346 */ │ │ │ │ +_3_4_7 ___G_L_I_B_C_X_X_1_7___I_N_L_I_N_E constexpr _m_a_t_c_h___f_l_a_g___t_y_p_e _f_o_r_m_a_t___d_e_f_a_u_l_t = _S_default; │ │ │ │ +348 │ │ │ │ +349 /** │ │ │ │ +350 * When a regular expression match is to be replaced by a new string, the │ │ │ │ +351 * new string is constructed using the rules used by the POSIX sed utility │ │ │ │ +352 * in IEEE Std 1003.1- 2001 [IEEE, Information Technology -- Portable │ │ │ │ +353 * Operating System Interface (POSIX), IEEE Standard 1003.1-2001]. │ │ │ │ +354 */ │ │ │ │ +_3_5_5 ___G_L_I_B_C_X_X_1_7___I_N_L_I_N_E constexpr _m_a_t_c_h___f_l_a_g___t_y_p_e _f_o_r_m_a_t___s_e_d = _S_sed; │ │ │ │ +356 │ │ │ │ +357 /** │ │ │ │ +358 * During a search and replace operation, sections of the character │ │ │ │ +359 * container sequence being searched that do not match the regular │ │ │ │ +360 * expression shall not be copied to the output string. │ │ │ │ +361 */ │ │ │ │ +_3_6_2 ___G_L_I_B_C_X_X_1_7___I_N_L_I_N_E constexpr _m_a_t_c_h___f_l_a_g___t_y_p_e _f_o_r_m_a_t___n_o___c_o_p_y = _S_no_copy; │ │ │ │ +363 │ │ │ │ +364 /** │ │ │ │ +365 * When specified during a search and replace operation, only the first │ │ │ │ +366 * occurrence of the regular expression shall be replaced. │ │ │ │ +367 */ │ │ │ │ +_3_6_8 ___G_L_I_B_C_X_X_1_7___I_N_L_I_N_E constexpr _m_a_t_c_h___f_l_a_g___t_y_p_e _f_o_r_m_a_t___f_i_r_s_t___o_n_l_y = │ │ │ │ +_S_first_only; │ │ │ │ +369 │ │ │ │ +370 constexpr inline _m_a_t_c_h___f_l_a_g___t_y_p_e │ │ │ │ +_3_7_1 _o_p_e_r_a_t_o_r_&(_m_a_t_c_h___f_l_a_g___t_y_p_e __a, _m_a_t_c_h___f_l_a_g___t_y_p_e __b) │ │ │ │ +372 { │ │ │ │ +373 return (_m_a_t_c_h___f_l_a_g___t_y_p_e)(static_cast(__a) │ │ │ │ +374 & static_cast(__b)); │ │ │ │ +375 } │ │ │ │ +376 │ │ │ │ +377 constexpr inline _m_a_t_c_h___f_l_a_g___t_y_p_e │ │ │ │ +_3_7_8 _o_p_e_r_a_t_o_r_|(_m_a_t_c_h___f_l_a_g___t_y_p_e __a, _m_a_t_c_h___f_l_a_g___t_y_p_e __b) │ │ │ │ +379 { │ │ │ │ +380 return (_m_a_t_c_h___f_l_a_g___t_y_p_e)(static_cast(__a) │ │ │ │ +381 | static_cast(__b)); │ │ │ │ +382 } │ │ │ │ +383 │ │ │ │ +384 constexpr inline _m_a_t_c_h___f_l_a_g___t_y_p_e │ │ │ │ +_3_8_5 _o_p_e_r_a_t_o_r_^(_m_a_t_c_h___f_l_a_g___t_y_p_e __a, _m_a_t_c_h___f_l_a_g___t_y_p_e __b) │ │ │ │ +386 { │ │ │ │ +387 return (_m_a_t_c_h___f_l_a_g___t_y_p_e)(static_cast(__a) │ │ │ │ +388 ^ static_cast(__b)); │ │ │ │ +389 } │ │ │ │ +390 │ │ │ │ +391 constexpr inline _m_a_t_c_h___f_l_a_g___t_y_p_e │ │ │ │ +_3_9_2 _o_p_e_r_a_t_o_r_~(_m_a_t_c_h___f_l_a_g___t_y_p_e __a) │ │ │ │ +393 { return (_m_a_t_c_h___f_l_a_g___t_y_p_e)(_~_s_t_a_t_i_c___c_a_s_t_<_u_n_s_i_g_n_e_d_ _i_n_t_>(__a)); } │ │ │ │ +394 │ │ │ │ +395 ___G_L_I_B_C_X_X_1_4___C_O_N_S_T_E_X_P_R │ │ │ │ +396 inline _m_a_t_c_h___f_l_a_g___t_y_p_e& │ │ │ │ +_3_9_7 _o_p_e_r_a_t_o_r_&_=(_m_a_t_c_h___f_l_a_g___t_y_p_e& __a, _m_a_t_c_h___f_l_a_g___t_y_p_e __b) │ │ │ │ +398 { return __a = __a & __b; } │ │ │ │ +399 │ │ │ │ +400 ___G_L_I_B_C_X_X_1_4___C_O_N_S_T_E_X_P_R │ │ │ │ +401 inline _m_a_t_c_h___f_l_a_g___t_y_p_e& │ │ │ │ +_4_0_2 _o_p_e_r_a_t_o_r_|_=(_m_a_t_c_h___f_l_a_g___t_y_p_e& __a, _m_a_t_c_h___f_l_a_g___t_y_p_e __b) │ │ │ │ +403 { return __a = __a | __b; } │ │ │ │ +404 │ │ │ │ +405 ___G_L_I_B_C_X_X_1_4___C_O_N_S_T_E_X_P_R │ │ │ │ +406 inline _m_a_t_c_h___f_l_a_g___t_y_p_e& │ │ │ │ +_4_0_7 _o_p_e_r_a_t_o_r_^_=(_m_a_t_c_h___f_l_a_g___t_y_p_e& __a, _m_a_t_c_h___f_l_a_g___t_y_p_e __b) │ │ │ │ +408 { return __a = __a ^ __b; } │ │ │ │ +409 │ │ │ │ +410 ///@} │ │ │ │ +411} // namespace regex_constants │ │ │ │ +412/// @} group regex │ │ │ │ +413 │ │ │ │ +414_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ +415} // namespace std │ │ │ │ +416 │ │ │ │ _s_t_d │ │ │ │ ISO C++ entities toplevel namespace is std. │ │ │ │ -_s_t_d_:_:_t_y_p_e___i_n_f_o │ │ │ │ -Part of RTTI. │ │ │ │ -DDeeffiinniittiioonn _t_y_p_e_i_n_f_o_:_9_3 │ │ │ │ +_s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_o_p_e_r_a_t_o_r_|_= │ │ │ │ +constexpr syntax_option_type & operator|=(syntax_option_type &__a, │ │ │ │ +syntax_option_type __b) │ │ │ │ +This is a bitmask type indicating how to interpret the regex. │ │ │ │ +DDeeffiinniittiioonn _r_e_g_e_x___c_o_n_s_t_a_n_t_s_._h_:_2_2_1 │ │ │ │ +_s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_____p_o_l_y_n_o_m_i_a_l │ │ │ │ +constexpr syntax_option_type __polynomial │ │ │ │ +DDeeffiinniittiioonn _r_e_g_e_x___c_o_n_s_t_a_n_t_s_._h_:_1_8_7 │ │ │ │ +_s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_o_p_e_r_a_t_o_r_&_= │ │ │ │ +constexpr syntax_option_type & operator&=(syntax_option_type &__a, │ │ │ │ +syntax_option_type __b) │ │ │ │ +This is a bitmask type indicating how to interpret the regex. │ │ │ │ +DDeeffiinniittiioonn _r_e_g_e_x___c_o_n_s_t_a_n_t_s_._h_:_2_1_6 │ │ │ │ +_s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_o_p_e_r_a_t_o_r_& │ │ │ │ +constexpr syntax_option_type operator&(syntax_option_type __a, │ │ │ │ +syntax_option_type __b) │ │ │ │ +This is a bitmask type indicating how to interpret the regex. │ │ │ │ +DDeeffiinniittiioonn _r_e_g_e_x___c_o_n_s_t_a_n_t_s_._h_:_1_9_0 │ │ │ │ +_s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_m_a_t_c_h___n_o_t___b_o_w │ │ │ │ +constexpr match_flag_type match_not_bow │ │ │ │ +DDeeffiinniittiioonn _r_e_g_e_x___c_o_n_s_t_a_n_t_s_._h_:_2_8_9 │ │ │ │ +_s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_m_a_t_c_h___n_o_t___b_o_l │ │ │ │ +constexpr match_flag_type match_not_bol │ │ │ │ +DDeeffiinniittiioonn _r_e_g_e_x___c_o_n_s_t_a_n_t_s_._h_:_2_7_6 │ │ │ │ +_s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_E_C_M_A_S_c_r_i_p_t │ │ │ │ +constexpr syntax_option_type ECMAScript │ │ │ │ +DDeeffiinniittiioonn _r_e_g_e_x___c_o_n_s_t_a_n_t_s_._h_:_1_2_0 │ │ │ │ +_s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_m_a_t_c_h___a_n_y │ │ │ │ +constexpr match_flag_type match_any │ │ │ │ +DDeeffiinniittiioonn _r_e_g_e_x___c_o_n_s_t_a_n_t_s_._h_:_3_0_1 │ │ │ │ +_s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_e_g_r_e_p │ │ │ │ +constexpr syntax_option_type egrep │ │ │ │ +DDeeffiinniittiioonn _r_e_g_e_x___c_o_n_s_t_a_n_t_s_._h_:_1_6_3 │ │ │ │ +_s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e │ │ │ │ +syntax_option_type │ │ │ │ +This is a bitmask type indicating how to interpret the regex. │ │ │ │ +DDeeffiinniittiioonn _r_e_g_e_x___c_o_n_s_t_a_n_t_s_._h_:_7_0 │ │ │ │ +_s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_m_u_l_t_i_l_i_n_e │ │ │ │ +constexpr syntax_option_type multiline │ │ │ │ +DDeeffiinniittiioonn _r_e_g_e_x___c_o_n_s_t_a_n_t_s_._h_:_1_7_5 │ │ │ │ +_s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_m_a_t_c_h___d_e_f_a_u_l_t │ │ │ │ +constexpr match_flag_type match_default │ │ │ │ +DDeeffiinniittiioonn _r_e_g_e_x___c_o_n_s_t_a_n_t_s_._h_:_2_6_9 │ │ │ │ +_s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_f_o_r_m_a_t___f_i_r_s_t___o_n_l_y │ │ │ │ +constexpr match_flag_type format_first_only │ │ │ │ +DDeeffiinniittiioonn _r_e_g_e_x___c_o_n_s_t_a_n_t_s_._h_:_3_6_8 │ │ │ │ +_s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_a_w_k │ │ │ │ +constexpr syntax_option_type awk │ │ │ │ +DDeeffiinniittiioonn _r_e_g_e_x___c_o_n_s_t_a_n_t_s_._h_:_1_4_7 │ │ │ │ +_s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_____m_u_l_t_i_l_i_n_e │ │ │ │ +constexpr syntax_option_type __multiline │ │ │ │ +Extension: Equivalent to regex_constants::multiline for C++11 and C++14. │ │ │ │ +DDeeffiinniittiioonn _r_e_g_e_x___c_o_n_s_t_a_n_t_s_._h_:_1_7_9 │ │ │ │ +_s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_m_a_t_c_h___c_o_n_t_i_n_u_o_u_s │ │ │ │ +constexpr match_flag_type match_continuous │ │ │ │ +DDeeffiinniittiioonn _r_e_g_e_x___c_o_n_s_t_a_n_t_s_._h_:_3_1_1 │ │ │ │ +_s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_e_x_t_e_n_d_e_d │ │ │ │ +constexpr syntax_option_type extended │ │ │ │ +DDeeffiinniittiioonn _r_e_g_e_x___c_o_n_s_t_a_n_t_s_._h_:_1_3_7 │ │ │ │ +_s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_o_p_e_r_a_t_o_r_^ │ │ │ │ +constexpr syntax_option_type operator^(syntax_option_type __a, │ │ │ │ +syntax_option_type __b) │ │ │ │ +This is a bitmask type indicating how to interpret the regex. │ │ │ │ +DDeeffiinniittiioonn _r_e_g_e_x___c_o_n_s_t_a_n_t_s_._h_:_2_0_4 │ │ │ │ +_s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_b_a_s_i_c │ │ │ │ +constexpr syntax_option_type basic │ │ │ │ +DDeeffiinniittiioonn _r_e_g_e_x___c_o_n_s_t_a_n_t_s_._h_:_1_2_9 │ │ │ │ +_s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_m_a_t_c_h___n_o_t___e_o_l │ │ │ │ +constexpr match_flag_type match_not_eol │ │ │ │ +DDeeffiinniittiioonn _r_e_g_e_x___c_o_n_s_t_a_n_t_s_._h_:_2_8_3 │ │ │ │ +_s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_m_a_t_c_h___f_l_a_g___t_y_p_e │ │ │ │ +match_flag_type │ │ │ │ +This is a bitmask type indicating regex matching rules. │ │ │ │ +DDeeffiinniittiioonn _r_e_g_e_x___c_o_n_s_t_a_n_t_s_._h_:_2_5_0 │ │ │ │ +_s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_i_c_a_s_e │ │ │ │ +constexpr syntax_option_type icase │ │ │ │ +DDeeffiinniittiioonn _r_e_g_e_x___c_o_n_s_t_a_n_t_s_._h_:_8_9 │ │ │ │ +_s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_o_p_t_i_m_i_z_e │ │ │ │ +constexpr syntax_option_type optimize │ │ │ │ +DDeeffiinniittiioonn _r_e_g_e_x___c_o_n_s_t_a_n_t_s_._h_:_1_0_4 │ │ │ │ +_s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_f_o_r_m_a_t___d_e_f_a_u_l_t │ │ │ │ +constexpr match_flag_type format_default │ │ │ │ +DDeeffiinniittiioonn _r_e_g_e_x___c_o_n_s_t_a_n_t_s_._h_:_3_4_7 │ │ │ │ +_s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_n_o_s_u_b_s │ │ │ │ +constexpr syntax_option_type nosubs │ │ │ │ +DDeeffiinniittiioonn _r_e_g_e_x___c_o_n_s_t_a_n_t_s_._h_:_9_6 │ │ │ │ +_s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_o_p_e_r_a_t_o_r_~ │ │ │ │ +constexpr syntax_option_type operator~(syntax_option_type __a) │ │ │ │ +This is a bitmask type indicating how to interpret the regex. │ │ │ │ +DDeeffiinniittiioonn _r_e_g_e_x___c_o_n_s_t_a_n_t_s_._h_:_2_1_1 │ │ │ │ +_s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_m_a_t_c_h___p_r_e_v___a_v_a_i_l │ │ │ │ +constexpr match_flag_type match_prev_avail │ │ │ │ +DDeeffiinniittiioonn _r_e_g_e_x___c_o_n_s_t_a_n_t_s_._h_:_3_1_9 │ │ │ │ +_s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_f_o_r_m_a_t___s_e_d │ │ │ │ +constexpr match_flag_type format_sed │ │ │ │ +DDeeffiinniittiioonn _r_e_g_e_x___c_o_n_s_t_a_n_t_s_._h_:_3_5_5 │ │ │ │ +_s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_o_p_e_r_a_t_o_r_| │ │ │ │ +constexpr syntax_option_type operator|(syntax_option_type __a, │ │ │ │ +syntax_option_type __b) │ │ │ │ +This is a bitmask type indicating how to interpret the regex. │ │ │ │ +DDeeffiinniittiioonn _r_e_g_e_x___c_o_n_s_t_a_n_t_s_._h_:_1_9_7 │ │ │ │ +_s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_o_p_e_r_a_t_o_r_^_= │ │ │ │ +constexpr syntax_option_type & operator^=(syntax_option_type &__a, │ │ │ │ +syntax_option_type __b) │ │ │ │ +This is a bitmask type indicating how to interpret the regex. │ │ │ │ +DDeeffiinniittiioonn _r_e_g_e_x___c_o_n_s_t_a_n_t_s_._h_:_2_2_6 │ │ │ │ +_s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_m_a_t_c_h___n_o_t___e_o_w │ │ │ │ +constexpr match_flag_type match_not_eow │ │ │ │ +DDeeffiinniittiioonn _r_e_g_e_x___c_o_n_s_t_a_n_t_s_._h_:_2_9_5 │ │ │ │ +_s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_m_a_t_c_h___n_o_t___n_u_l_l │ │ │ │ +constexpr match_flag_type match_not_null │ │ │ │ +DDeeffiinniittiioonn _r_e_g_e_x___c_o_n_s_t_a_n_t_s_._h_:_3_0_6 │ │ │ │ +_s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_f_o_r_m_a_t___n_o___c_o_p_y │ │ │ │ +constexpr match_flag_type format_no_copy │ │ │ │ +DDeeffiinniittiioonn _r_e_g_e_x___c_o_n_s_t_a_n_t_s_._h_:_3_6_2 │ │ │ │ +_s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s_:_:_g_r_e_p │ │ │ │ +constexpr syntax_option_type grep │ │ │ │ +DDeeffiinniittiioonn _r_e_g_e_x___c_o_n_s_t_a_n_t_s_._h_:_1_5_5 │ │ │ │ +_s_t_d_:_:_c_o_l_l_a_t_e │ │ │ │ +Facet for localized string comparison. │ │ │ │ +DDeeffiinniittiioonn _l_o_c_a_l_e___c_l_a_s_s_e_s_._h_:_6_4_9 │ │ │ │ +_s_t_d_:_:_a_u_t_o___p_t_r___r_e_f │ │ │ │ +DDeeffiinniittiioonn _a_u_t_o___p_t_r_._h_:_4_9 │ │ │ │ * _b_i_t_s │ │ │ │ - * _c_x_x_a_b_i___i_n_i_t___e_x_c_e_p_t_i_o_n_._h │ │ │ │ + * _r_e_g_e_x___c_o_n_s_t_a_n_t_s_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-12-base/libstdc++/user/a00344.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: cxxabi_forced.h File Reference │ │ │ +libstdc++: boost_concept_check.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -46,34 +46,332 @@ │ │ │ /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */ │ │ │ $(document).ready(function(){initNavTree('a00344.html',''); initResizable(); }); │ │ │ /* @license-end */ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -Classes
│ │ │ -
cxxabi_forced.h File Reference
│ │ │ +Namespaces | │ │ │ +Macros | │ │ │ +Functions
│ │ │ +
boost_concept_check.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +

│ │ │ -Classes

class  __cxxabiv1::__forced_unwind

│ │ │ +Namespaces

namespace  __gnu_cxx
 
namespace  __gnu_debug
 
namespace  std
 
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +

│ │ │ +Macros

#define _GLIBCXX_CLASS_REQUIRES(_type_var, _ns, _concept)
 
#define _GLIBCXX_CLASS_REQUIRES2(_type_var1, _type_var2, _ns, _concept)
 
#define _GLIBCXX_CLASS_REQUIRES3(_type_var1, _type_var2, _type_var3, _ns, _concept)
 
#define _GLIBCXX_CLASS_REQUIRES4(_type_var1, _type_var2, _type_var3, _type_var4, _ns, _concept)
 
#define _GLIBCXX_DEFINE_BINARY_OPERATOR_CONSTRAINT(_OP, _NAME)
 
#define _GLIBCXX_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(_OP, _NAME)
 
#define _IsUnused
 
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ +Functions

template<class _Tp >
void __gnu_cxx::__aux_require_boolean_expr (const _Tp &__t)
 
│ │ │ +void __gnu_cxx::__error_type_must_be_a_signed_integer_type ()
 
│ │ │ +void __gnu_cxx::__error_type_must_be_an_integer_type ()
 
│ │ │ +void __gnu_cxx::__error_type_must_be_an_unsigned_integer_type ()
 
template<class _Concept >
constexpr void __gnu_cxx::__function_requires ()
 
│ │ │

Detailed Description

│ │ │ -

This is an internal header file, included by other library headers. Do not attempt to use it directly. Instead, include <cxxabi.h>.

│ │ │ +

This is an internal header file, included by other library headers. Do not attempt to use it directly. Instead, include <iterator>.

│ │ │ + │ │ │ +

Definition in file boost_concept_check.h.

│ │ │ +

Macro Definition Documentation

│ │ │ + │ │ │ +

◆ _GLIBCXX_CLASS_REQUIRES

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
#define _GLIBCXX_CLASS_REQUIRES( _type_var,
 _ns,
 _concept 
)
│ │ │ +
│ │ │ + │ │ │ +

Definition at line 89 of file boost_concept_check.h.

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ +

◆ _GLIBCXX_CLASS_REQUIRES2

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
#define _GLIBCXX_CLASS_REQUIRES2( _type_var1,
 _type_var2,
 _ns,
 _concept 
)
│ │ │ +
│ │ │ + │ │ │ +

Definition at line 97 of file boost_concept_check.h.

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ +

◆ _GLIBCXX_CLASS_REQUIRES3

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
#define _GLIBCXX_CLASS_REQUIRES3( _type_var1,
 _type_var2,
 _type_var3,
 _ns,
 _concept 
)
│ │ │ +
│ │ │ + │ │ │ +

Definition at line 105 of file boost_concept_check.h.

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ +

◆ _GLIBCXX_CLASS_REQUIRES4

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
#define _GLIBCXX_CLASS_REQUIRES4( _type_var1,
 _type_var2,
 _type_var3,
 _type_var4,
 _ns,
 _concept 
)
│ │ │ +
│ │ │ │ │ │ -

Definition in file cxxabi_forced.h.

│ │ │ -
│ │ │ +

Definition at line 113 of file boost_concept_check.h.

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ +

◆ _GLIBCXX_DEFINE_BINARY_OPERATOR_CONSTRAINT

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
#define _GLIBCXX_DEFINE_BINARY_OPERATOR_CONSTRAINT( _OP,
 _NAME 
)
│ │ │ +
│ │ │ + │ │ │ +

Definition at line 301 of file boost_concept_check.h.

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ +

◆ _GLIBCXX_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
#define _GLIBCXX_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT( _OP,
 _NAME 
)
│ │ │ +
│ │ │ + │ │ │ +

Definition at line 290 of file boost_concept_check.h.

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ +

◆ _IsUnused

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
#define _IsUnused
│ │ │ +
│ │ │ + │ │ │ +

Definition at line 70 of file boost_concept_check.h.

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ +
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,14 +1,92 @@ │ │ │ │ libstdc++ │ │ │ │ -_C_l_a_s_s_e_s │ │ │ │ -cxxabi_forced.h File Reference │ │ │ │ +_N_a_m_e_s_p_a_c_e_s | _M_a_c_r_o_s | _F_u_n_c_t_i_o_n_s │ │ │ │ +boost_concept_check.h File Reference │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -CCllaasssseess │ │ │ │ -class   _____c_x_x_a_b_i_v_1_:_:_____f_o_r_c_e_d___u_n_w_i_n_d │ │ │ │ +NNaammeessppaacceess │ │ │ │ +namespace   _____g_n_u___c_x_x │ │ │ │ +  │ │ │ │ +namespace   _____g_n_u___d_e_b_u_g │ │ │ │ +  │ │ │ │ +namespace   _s_t_d │ │ │ │ +  │ │ │ │ +MMaaccrrooss │ │ │ │ +#define  ___G_L_I_B_C_X_X___C_L_A_S_S___R_E_Q_U_I_R_E_S(_type_var, _ns, _concept) │ │ │ │ +  │ │ │ │ +#define  ___G_L_I_B_C_X_X___C_L_A_S_S___R_E_Q_U_I_R_E_S_2(_type_var1, _type_var2, _ns, _concept) │ │ │ │ +  │ │ │ │ +#define  ___G_L_I_B_C_X_X___C_L_A_S_S___R_E_Q_U_I_R_E_S_3(_type_var1, _type_var2, _type_var3, _ns, │ │ │ │ + _concept) │ │ │ │ +  │ │ │ │ +#define  ___G_L_I_B_C_X_X___C_L_A_S_S___R_E_Q_U_I_R_E_S_4(_type_var1, _type_var2, _type_var3, │ │ │ │ + _type_var4, _ns, _concept) │ │ │ │ +  │ │ │ │ +#define  ___G_L_I_B_C_X_X___D_E_F_I_N_E___B_I_N_A_R_Y___O_P_E_R_A_T_O_R___C_O_N_S_T_R_A_I_N_T(_OP, _NAME) │ │ │ │ +  │ │ │ │ +#define  ___G_L_I_B_C_X_X___D_E_F_I_N_E___B_I_N_A_R_Y___P_R_E_D_I_C_A_T_E___O_P___C_O_N_S_T_R_A_I_N_T(_OP, _NAME) │ │ │ │ +  │ │ │ │ +#define  ___I_s_U_n_u_s_e_d │ │ │ │ +  │ │ │ │ +FFuunnccttiioonnss │ │ │ │ +template │ │ │ │ + void  _____g_n_u___c_x_x_:_:_____a_u_x___r_e_q_u_i_r_e___b_o_o_l_e_a_n___e_x_p_r (const _Tp &__t) │ │ │ │ +  │ │ │ │ + void  ____ggnnuu__ccxxxx::::____eerrrroorr__ttyyppee__mmuusstt__bbee__aa__ssiiggnneedd__iinntteeggeerr__ttyyppee () │ │ │ │ +  │ │ │ │ + void  ____ggnnuu__ccxxxx::::____eerrrroorr__ttyyppee__mmuusstt__bbee__aann__iinntteeggeerr__ttyyppee () │ │ │ │ +  │ │ │ │ + void  ____ggnnuu__ccxxxx::::____eerrrroorr__ttyyppee__mmuusstt__bbee__aann__uunnssiiggnneedd__iinntteeggeerr__ttyyppee () │ │ │ │ +  │ │ │ │ +template │ │ │ │ +constexpr void  _____g_n_u___c_x_x_:_:_____f_u_n_c_t_i_o_n___r_e_q_u_i_r_e_s () │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ This is an internal header file, included by other library headers. Do not │ │ │ │ -attempt to use it directly. Instead, include . │ │ │ │ -Definition in file _c_x_x_a_b_i___f_o_r_c_e_d_._h. │ │ │ │ +attempt to use it directly. Instead, include . │ │ │ │ +Definition in file _b_o_o_s_t___c_o_n_c_e_p_t___c_h_e_c_k_._h. │ │ │ │ +********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ +********** _?◆_? __GGLLIIBBCCXXXX__CCLLAASSSS__RREEQQUUIIRREESS ********** │ │ │ │ +#define _GLIBCXX_CLASS_REQUIRES (   _type_var, │ │ │ │ +   _ns, │ │ │ │ +   _concept  │ │ │ │ + ) │ │ │ │ +Definition at line _8_9 of file _b_o_o_s_t___c_o_n_c_e_p_t___c_h_e_c_k_._h. │ │ │ │ +********** _?◆_? __GGLLIIBBCCXXXX__CCLLAASSSS__RREEQQUUIIRREESS22 ********** │ │ │ │ +#define _GLIBCXX_CLASS_REQUIRES2 (   _type_var1, │ │ │ │ +   _type_var2, │ │ │ │ +   _ns, │ │ │ │ +   _concept  │ │ │ │ + ) │ │ │ │ +Definition at line _9_7 of file _b_o_o_s_t___c_o_n_c_e_p_t___c_h_e_c_k_._h. │ │ │ │ +********** _?◆_? __GGLLIIBBCCXXXX__CCLLAASSSS__RREEQQUUIIRREESS33 ********** │ │ │ │ +#define _GLIBCXX_CLASS_REQUIRES3 (   _type_var1, │ │ │ │ +   _type_var2, │ │ │ │ +   _type_var3, │ │ │ │ +   _ns, │ │ │ │ +   _concept  │ │ │ │ + ) │ │ │ │ +Definition at line _1_0_5 of file _b_o_o_s_t___c_o_n_c_e_p_t___c_h_e_c_k_._h. │ │ │ │ +********** _?◆_? __GGLLIIBBCCXXXX__CCLLAASSSS__RREEQQUUIIRREESS44 ********** │ │ │ │ +#define _GLIBCXX_CLASS_REQUIRES4 (   _type_var1, │ │ │ │ +   _type_var2, │ │ │ │ +   _type_var3, │ │ │ │ +   _type_var4, │ │ │ │ +   _ns, │ │ │ │ +   _concept  │ │ │ │ + ) │ │ │ │ +Definition at line _1_1_3 of file _b_o_o_s_t___c_o_n_c_e_p_t___c_h_e_c_k_._h. │ │ │ │ +********** _?◆_? __GGLLIIBBCCXXXX__DDEEFFIINNEE__BBIINNAARRYY__OOPPEERRAATTOORR__CCOONNSSTTRRAAIINNTT ********** │ │ │ │ +#define _GLIBCXX_DEFINE_BINARY_OPERATOR_CONSTRAINT (   _OP, │ │ │ │ +   _NAME  │ │ │ │ + ) │ │ │ │ +Definition at line _3_0_1 of file _b_o_o_s_t___c_o_n_c_e_p_t___c_h_e_c_k_._h. │ │ │ │ +********** _?◆_? __GGLLIIBBCCXXXX__DDEEFFIINNEE__BBIINNAARRYY__PPRREEDDIICCAATTEE__OOPP__CCOONNSSTTRRAAIINNTT ********** │ │ │ │ +#define _GLIBCXX_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT (   _OP, │ │ │ │ +   _NAME  │ │ │ │ + ) │ │ │ │ +Definition at line _2_9_0 of file _b_o_o_s_t___c_o_n_c_e_p_t___c_h_e_c_k_._h. │ │ │ │ +********** _?◆_? __IIssUUnnuusseedd ********** │ │ │ │ +#define _IsUnused │ │ │ │ +Definition at line _7_0 of file _b_o_o_s_t___c_o_n_c_e_p_t___c_h_e_c_k_._h. │ │ │ │ * _b_i_t_s │ │ │ │ - * _c_x_x_a_b_i___f_o_r_c_e_d_._h │ │ │ │ + * _b_o_o_s_t___c_o_n_c_e_p_t___c_h_e_c_k_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-12-base/libstdc++/user/a00344_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: cxxabi_forced.h Source File │ │ │ +libstdc++: boost_concept_check.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -45,84 +45,918 @@ │ │ │ │ │ │
│ │ │
│ │ │ -
cxxabi_forced.h
│ │ │ +
boost_concept_check.h
│ │ │
│ │ │
│ │ │ -Go to the documentation of this file.
1// cxxabi.h subset for cancellation -*- C++ -*-
│ │ │ -
2
│ │ │ -
3// Copyright (C) 2007-2022 Free Software Foundation, Inc.
│ │ │ +Go to the documentation of this file.
1// -*- C++ -*-
│ │ │ +
2
│ │ │ +
3// Copyright (C) 2004-2022 Free Software Foundation, Inc.
│ │ │
4//
│ │ │ -
5// This file is part of GCC.
│ │ │ -
6//
│ │ │ -
7// GCC is free software; you can redistribute it and/or modify
│ │ │ -
8// it under the terms of the GNU General Public License as published by
│ │ │ -
9// the Free Software Foundation; either version 3, or (at your option)
│ │ │ -
10// any later version.
│ │ │ -
11//
│ │ │ -
12// GCC is distributed in the hope that it will be useful,
│ │ │ -
13// but WITHOUT ANY WARRANTY; without even the implied warranty of
│ │ │ -
14// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
│ │ │ -
15// GNU General Public License for more details.
│ │ │ -
16//
│ │ │ -
17// Under Section 7 of GPL version 3, you are granted additional
│ │ │ -
18// permissions described in the GCC Runtime Library Exception, version
│ │ │ -
19// 3.1, as published by the Free Software Foundation.
│ │ │ -
20
│ │ │ -
21// You should have received a copy of the GNU General Public License and
│ │ │ -
22// a copy of the GCC Runtime Library Exception along with this program;
│ │ │ -
23// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
│ │ │ -
24// <http://www.gnu.org/licenses/>.
│ │ │ -
25
│ │ │ -
26/** @file bits/cxxabi_forced.h
│ │ │ -
27 * This is an internal header file, included by other library headers.
│ │ │ -
28 * Do not attempt to use it directly. @headername{cxxabi.h}
│ │ │ -
29 */
│ │ │ -
30
│ │ │ -
31#ifndef _CXXABI_FORCED_H
│ │ │ -
32#define _CXXABI_FORCED_H 1
│ │ │ -
33
│ │ │ -
34#pragma GCC system_header
│ │ │ -
35
│ │ │ -
36#pragma GCC visibility push(default)
│ │ │ -
37
│ │ │ -
38#ifdef __cplusplus
│ │ │ -
39namespace __cxxabiv1
│ │ │ -
40{
│ │ │ -
41 /**
│ │ │ -
42 * @brief Thrown as part of forced unwinding.
│ │ │ -
43 * @ingroup exceptions
│ │ │ -
44 *
│ │ │ -
45 * A magic placeholder class that can be caught by reference to
│ │ │ -
46 * recognize forced unwinding.
│ │ │ -
47 */
│ │ │ -
│ │ │ - │ │ │ -
49 {
│ │ │ -
50 virtual ~__forced_unwind() throw();
│ │ │ -
51
│ │ │ -
52 // Prevent catch by value.
│ │ │ -
53 virtual void __pure_dummy() = 0;
│ │ │ -
54 };
│ │ │ -
│ │ │ +
5// This file is part of the GNU ISO C++ Library. This library is free
│ │ │ +
6// software; you can redistribute it and/or modify it under the
│ │ │ +
7// terms of the GNU General Public License as published by the
│ │ │ +
8// Free Software Foundation; either version 3, or (at your option)
│ │ │ +
9// any later version.
│ │ │ +
10
│ │ │ +
11// This library is distributed in the hope that it will be useful,
│ │ │ +
12// but WITHOUT ANY WARRANTY; without even the implied warranty of
│ │ │ +
13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
│ │ │ +
14// GNU General Public License for more details.
│ │ │ +
15
│ │ │ +
16// Under Section 7 of GPL version 3, you are granted additional
│ │ │ +
17// permissions described in the GCC Runtime Library Exception, version
│ │ │ +
18// 3.1, as published by the Free Software Foundation.
│ │ │ +
19
│ │ │ +
20// You should have received a copy of the GNU General Public License and
│ │ │ +
21// a copy of the GCC Runtime Library Exception along with this program;
│ │ │ +
22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
│ │ │ +
23// <http://www.gnu.org/licenses/>.
│ │ │ +
24
│ │ │ +
25// (C) Copyright Jeremy Siek 2000. Permission to copy, use, modify,
│ │ │ +
26// sell and distribute this software is granted provided this
│ │ │ +
27// copyright notice appears in all copies. This software is provided
│ │ │ +
28// "as is" without express or implied warranty, and with no claim as
│ │ │ +
29// to its suitability for any purpose.
│ │ │ +
30//
│ │ │ +
31
│ │ │ +
32/** @file bits/boost_concept_check.h
│ │ │ +
33 * This is an internal header file, included by other library headers.
│ │ │ +
34 * Do not attempt to use it directly. @headername{iterator}
│ │ │ +
35 */
│ │ │ +
36
│ │ │ +
37// GCC Note: based on version 1.12.0 of the Boost library.
│ │ │ +
38
│ │ │ +
39#ifndef _BOOST_CONCEPT_CHECK_H
│ │ │ +
40#define _BOOST_CONCEPT_CHECK_H 1
│ │ │ +
41
│ │ │ +
42#pragma GCC system_header
│ │ │ +
43
│ │ │ +
44#include <bits/c++config.h>
│ │ │ +
45#include <bits/stl_iterator_base_types.h> // for traits and tags
│ │ │ +
46
│ │ │ +
47namespace std _GLIBCXX_VISIBILITY(default)
│ │ │ +
48{
│ │ │ +
49_GLIBCXX_BEGIN_NAMESPACE_VERSION
│ │ │ +
50_GLIBCXX_BEGIN_NAMESPACE_CONTAINER
│ │ │ +
51 struct _Bit_iterator;
│ │ │ +
52 struct _Bit_const_iterator;
│ │ │ +
53_GLIBCXX_END_NAMESPACE_CONTAINER
│ │ │ +
54_GLIBCXX_END_NAMESPACE_VERSION
│ │ │
55}
│ │ │ -
56#endif // __cplusplus
│ │ │ -
57
│ │ │ -
58#pragma GCC visibility pop
│ │ │ -
59
│ │ │ -
60#endif // __CXXABI_FORCED_H
│ │ │ -
Thrown as part of forced unwinding.
│ │ │ +
56
│ │ │ +
│ │ │ +
57namespace __gnu_debug
│ │ │ +
58{
│ │ │ +
59 template<typename _Iterator, typename _Sequence, typename _Category>
│ │ │ +
60 class _Safe_iterator;
│ │ │ +
61}
│ │ │ +
│ │ │ +
62
│ │ │ +
63namespace __gnu_cxx _GLIBCXX_VISIBILITY(default)
│ │ │ +
64{
│ │ │ +
65_GLIBCXX_BEGIN_NAMESPACE_VERSION
│ │ │ +
66
│ │ │ +
67#pragma GCC diagnostic push
│ │ │ +
68#pragma GCC diagnostic ignored "-Wunused-local-typedefs"
│ │ │ +
69
│ │ │ +
70#define _IsUnused __attribute__ ((__unused__))
│ │ │ +
71
│ │ │ +
72// When the C-C code is in use, we would like this function to do as little
│ │ │ +
73// as possible at runtime, use as few resources as possible, and hopefully
│ │ │ +
74// be elided out of existence... hmmm.
│ │ │ +
75template <class _Concept>
│ │ │ +
76_GLIBCXX14_CONSTEXPR inline void __function_requires()
│ │ │ +
77{
│ │ │ +
78 void (_Concept::*__x)() _IsUnused = &_Concept::__constraints;
│ │ │ +
79}
│ │ │ +
80
│ │ │ +
81// No definition: if this is referenced, there's a problem with
│ │ │ +
82// the instantiating type not being one of the required integer types.
│ │ │ +
83// Unfortunately, this results in a link-time error, not a compile-time error.
│ │ │ +
84void __error_type_must_be_an_integer_type();
│ │ │ +
85void __error_type_must_be_an_unsigned_integer_type();
│ │ │ +
86void __error_type_must_be_a_signed_integer_type();
│ │ │ +
87
│ │ │ +
88// ??? Should the "concept_checking*" structs begin with more than _ ?
│ │ │ +
89#define _GLIBCXX_CLASS_REQUIRES(_type_var, _ns, _concept) \
│ │ │ +
90 typedef void (_ns::_concept <_type_var>::* _func##_type_var##_concept)(); \
│ │ │ +
91 template <_func##_type_var##_concept _Tp1> \
│ │ │ +
92 struct _concept_checking##_type_var##_concept { }; \
│ │ │ +
93 typedef _concept_checking##_type_var##_concept< \
│ │ │ +
94 &_ns::_concept <_type_var>::__constraints> \
│ │ │ +
95 _concept_checking_typedef##_type_var##_concept
│ │ │ +
96
│ │ │ +
97#define _GLIBCXX_CLASS_REQUIRES2(_type_var1, _type_var2, _ns, _concept) \
│ │ │ +
98 typedef void (_ns::_concept <_type_var1,_type_var2>::* _func##_type_var1##_type_var2##_concept)(); \
│ │ │ +
99 template <_func##_type_var1##_type_var2##_concept _Tp1> \
│ │ │ +
100 struct _concept_checking##_type_var1##_type_var2##_concept { }; \
│ │ │ +
101 typedef _concept_checking##_type_var1##_type_var2##_concept< \
│ │ │ +
102 &_ns::_concept <_type_var1,_type_var2>::__constraints> \
│ │ │ +
103 _concept_checking_typedef##_type_var1##_type_var2##_concept
│ │ │ +
104
│ │ │ +
105#define _GLIBCXX_CLASS_REQUIRES3(_type_var1, _type_var2, _type_var3, _ns, _concept) \
│ │ │ +
106 typedef void (_ns::_concept <_type_var1,_type_var2,_type_var3>::* _func##_type_var1##_type_var2##_type_var3##_concept)(); \
│ │ │ +
107 template <_func##_type_var1##_type_var2##_type_var3##_concept _Tp1> \
│ │ │ +
108 struct _concept_checking##_type_var1##_type_var2##_type_var3##_concept { }; \
│ │ │ +
109 typedef _concept_checking##_type_var1##_type_var2##_type_var3##_concept< \
│ │ │ +
110 &_ns::_concept <_type_var1,_type_var2,_type_var3>::__constraints> \
│ │ │ +
111 _concept_checking_typedef##_type_var1##_type_var2##_type_var3##_concept
│ │ │ +
112
│ │ │ +
113#define _GLIBCXX_CLASS_REQUIRES4(_type_var1, _type_var2, _type_var3, _type_var4, _ns, _concept) \
│ │ │ +
114 typedef void (_ns::_concept <_type_var1,_type_var2,_type_var3,_type_var4>::* _func##_type_var1##_type_var2##_type_var3##_type_var4##_concept)(); \
│ │ │ +
115 template <_func##_type_var1##_type_var2##_type_var3##_type_var4##_concept _Tp1> \
│ │ │ +
116 struct _concept_checking##_type_var1##_type_var2##_type_var3##_type_var4##_concept { }; \
│ │ │ +
117 typedef _concept_checking##_type_var1##_type_var2##_type_var3##_type_var4##_concept< \
│ │ │ +
118 &_ns::_concept <_type_var1,_type_var2,_type_var3,_type_var4>::__constraints> \
│ │ │ +
119 _concept_checking_typedef##_type_var1##_type_var2##_type_var3##_type_var4##_concept
│ │ │ +
120
│ │ │ +
121
│ │ │ +
122template <class _Tp1, class _Tp2>
│ │ │ +
123struct _Aux_require_same { };
│ │ │ +
124
│ │ │ +
125template <class _Tp>
│ │ │ +
126struct _Aux_require_same<_Tp,_Tp> { typedef _Tp _Type; };
│ │ │ +
127
│ │ │ +
128 template <class _Tp1, class _Tp2>
│ │ │ +
129 struct _SameTypeConcept
│ │ │ +
130 {
│ │ │ +
131 void __constraints() {
│ │ │ +
132 typedef typename _Aux_require_same<_Tp1, _Tp2>::_Type _Required;
│ │ │ +
133 }
│ │ │ +
134 };
│ │ │ +
135
│ │ │ +
136 template <class _Tp>
│ │ │ +
137 struct _IntegerConcept {
│ │ │ +
138 void __constraints() {
│ │ │ +
139 __error_type_must_be_an_integer_type();
│ │ │ +
140 }
│ │ │ +
141 };
│ │ │ +
142 template <> struct _IntegerConcept<short> { void __constraints() {} };
│ │ │ +
143 template <> struct _IntegerConcept<unsigned short> { void __constraints(){} };
│ │ │ +
144 template <> struct _IntegerConcept<int> { void __constraints() {} };
│ │ │ +
145 template <> struct _IntegerConcept<unsigned int> { void __constraints() {} };
│ │ │ +
146 template <> struct _IntegerConcept<long> { void __constraints() {} };
│ │ │ +
147 template <> struct _IntegerConcept<unsigned long> { void __constraints() {} };
│ │ │ +
148 template <> struct _IntegerConcept<long long> { void __constraints() {} };
│ │ │ +
149 template <> struct _IntegerConcept<unsigned long long>
│ │ │ +
150 { void __constraints() {} };
│ │ │ +
151
│ │ │ +
152 template <class _Tp>
│ │ │ +
153 struct _SignedIntegerConcept {
│ │ │ +
154 void __constraints() {
│ │ │ +
155 __error_type_must_be_a_signed_integer_type();
│ │ │ +
156 }
│ │ │ +
157 };
│ │ │ +
158 template <> struct _SignedIntegerConcept<short> { void __constraints() {} };
│ │ │ +
159 template <> struct _SignedIntegerConcept<int> { void __constraints() {} };
│ │ │ +
160 template <> struct _SignedIntegerConcept<long> { void __constraints() {} };
│ │ │ +
161 template <> struct _SignedIntegerConcept<long long> { void __constraints(){}};
│ │ │ +
162
│ │ │ +
163 template <class _Tp>
│ │ │ +
164 struct _UnsignedIntegerConcept {
│ │ │ +
165 void __constraints() {
│ │ │ +
166 __error_type_must_be_an_unsigned_integer_type();
│ │ │ +
167 }
│ │ │ +
168 };
│ │ │ +
169 template <> struct _UnsignedIntegerConcept<unsigned short>
│ │ │ +
170 { void __constraints() {} };
│ │ │ +
171 template <> struct _UnsignedIntegerConcept<unsigned int>
│ │ │ +
172 { void __constraints() {} };
│ │ │ +
173 template <> struct _UnsignedIntegerConcept<unsigned long>
│ │ │ +
174 { void __constraints() {} };
│ │ │ +
175 template <> struct _UnsignedIntegerConcept<unsigned long long>
│ │ │ +
176 { void __constraints() {} };
│ │ │ +
177
│ │ │ +
178 //===========================================================================
│ │ │ +
179 // Basic Concepts
│ │ │ +
180
│ │ │ +
181 template <class _Tp>
│ │ │ +
182 struct _DefaultConstructibleConcept
│ │ │ +
183 {
│ │ │ +
184 void __constraints() {
│ │ │ +
185 _Tp __a _IsUnused; // require default constructor
│ │ │ +
186 }
│ │ │ +
187 };
│ │ │ +
188
│ │ │ +
189 template <class _Tp>
│ │ │ +
190 struct _AssignableConcept
│ │ │ +
191 {
│ │ │ +
192 void __constraints() {
│ │ │ +
193 __a = __a; // require assignment operator
│ │ │ +
194 __const_constraints(__a);
│ │ │ +
195 }
│ │ │ +
196 void __const_constraints(const _Tp& __b) {
│ │ │ +
197 __a = __b; // const required for argument to assignment
│ │ │ +
198 }
│ │ │ +
199 _Tp __a;
│ │ │ +
200 // possibly should be "Tp* a;" and then dereference "a" in constraint
│ │ │ +
201 // functions? present way would require a default ctor, i think...
│ │ │ +
202 };
│ │ │ +
203
│ │ │ +
204 template <class _Tp>
│ │ │ +
205 struct _CopyConstructibleConcept
│ │ │ +
206 {
│ │ │ +
207 void __constraints() {
│ │ │ +
208 _Tp __a(__b); // require copy constructor
│ │ │ +
209 _Tp* __ptr _IsUnused = &__a; // require address of operator
│ │ │ +
210 __const_constraints(__a);
│ │ │ +
211 }
│ │ │ +
212 void __const_constraints(const _Tp& __a) {
│ │ │ +
213 _Tp __c _IsUnused(__a); // require const copy constructor
│ │ │ +
214 const _Tp* __ptr _IsUnused = &__a; // require const address of operator
│ │ │ +
215 }
│ │ │ +
216 _Tp __b;
│ │ │ +
217 };
│ │ │ +
218
│ │ │ +
219 // The SGI STL version of Assignable requires copy constructor and operator=
│ │ │ +
220 template <class _Tp>
│ │ │ +
221 struct _SGIAssignableConcept
│ │ │ +
222 {
│ │ │ +
223 void __constraints() {
│ │ │ +
224 _Tp __b _IsUnused(__a);
│ │ │ +
225 __a = __a; // require assignment operator
│ │ │ +
226 __const_constraints(__a);
│ │ │ +
227 }
│ │ │ +
228 void __const_constraints(const _Tp& __b) {
│ │ │ +
229 _Tp __c _IsUnused(__b);
│ │ │ +
230 __a = __b; // const required for argument to assignment
│ │ │ +
231 }
│ │ │ +
232 _Tp __a;
│ │ │ +
233 };
│ │ │ +
234
│ │ │ +
235 template <class _From, class _To>
│ │ │ +
236 struct _ConvertibleConcept
│ │ │ +
237 {
│ │ │ +
238 void __constraints() {
│ │ │ +
239 _To __y _IsUnused = __x;
│ │ │ +
240 }
│ │ │ +
241 _From __x;
│ │ │ +
242 };
│ │ │ +
243
│ │ │ +
244 // The C++ standard requirements for many concepts talk about return
│ │ │ +
245 // types that must be "convertible to bool". The problem with this
│ │ │ +
246 // requirement is that it leaves the door open for evil proxies that
│ │ │ +
247 // define things like operator|| with strange return types. Two
│ │ │ +
248 // possible solutions are:
│ │ │ +
249 // 1) require the return type to be exactly bool
│ │ │ +
250 // 2) stay with convertible to bool, and also
│ │ │ +
251 // specify stuff about all the logical operators.
│ │ │ +
252 // For now we just test for convertible to bool.
│ │ │ +
253 template <class _Tp>
│ │ │ +
254 void __aux_require_boolean_expr(const _Tp& __t) {
│ │ │ +
255 bool __x _IsUnused = __t;
│ │ │ +
256 }
│ │ │ +
257
│ │ │ +
258// FIXME
│ │ │ +
259 template <class _Tp>
│ │ │ +
260 struct _EqualityComparableConcept
│ │ │ +
261 {
│ │ │ +
262 void __constraints() {
│ │ │ +
263 __aux_require_boolean_expr(__a == __b);
│ │ │ +
264 }
│ │ │ +
265 _Tp __a, __b;
│ │ │ +
266 };
│ │ │ +
267
│ │ │ +
268 template <class _Tp>
│ │ │ +
269 struct _LessThanComparableConcept
│ │ │ +
270 {
│ │ │ +
271 void __constraints() {
│ │ │ +
272 __aux_require_boolean_expr(__a < __b);
│ │ │ +
273 }
│ │ │ +
274 _Tp __a, __b;
│ │ │ +
275 };
│ │ │ +
276
│ │ │ +
277 // This is equivalent to SGI STL's LessThanComparable.
│ │ │ +
278 template <class _Tp>
│ │ │ +
279 struct _ComparableConcept
│ │ │ +
280 {
│ │ │ +
281 void __constraints() {
│ │ │ +
282 __aux_require_boolean_expr(__a < __b);
│ │ │ +
283 __aux_require_boolean_expr(__a > __b);
│ │ │ +
284 __aux_require_boolean_expr(__a <= __b);
│ │ │ +
285 __aux_require_boolean_expr(__a >= __b);
│ │ │ +
286 }
│ │ │ +
287 _Tp __a, __b;
│ │ │ +
288 };
│ │ │ +
289
│ │ │ +
290#define _GLIBCXX_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(_OP,_NAME) \
│ │ │ +
291 template <class _First, class _Second> \
│ │ │ +
292 struct _NAME { \
│ │ │ +
293 void __constraints() { (void)__constraints_(); } \
│ │ │ +
294 bool __constraints_() { \
│ │ │ +
295 return __a _OP __b; \
│ │ │ +
296 } \
│ │ │ +
297 _First __a; \
│ │ │ +
298 _Second __b; \
│ │ │ +
299 }
│ │ │ +
300
│ │ │ +
301#define _GLIBCXX_DEFINE_BINARY_OPERATOR_CONSTRAINT(_OP,_NAME) \
│ │ │ +
302 template <class _Ret, class _First, class _Second> \
│ │ │ +
303 struct _NAME { \
│ │ │ +
304 void __constraints() { (void)__constraints_(); } \
│ │ │ +
305 _Ret __constraints_() { \
│ │ │ +
306 return __a _OP __b; \
│ │ │ +
307 } \
│ │ │ +
308 _First __a; \
│ │ │ +
309 _Second __b; \
│ │ │ +
310 }
│ │ │ +
311
│ │ │ +
312 _GLIBCXX_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(==, _EqualOpConcept);
│ │ │ +
313 _GLIBCXX_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(!=, _NotEqualOpConcept);
│ │ │ +
314 _GLIBCXX_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(<, _LessThanOpConcept);
│ │ │ +
315 _GLIBCXX_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(<=, _LessEqualOpConcept);
│ │ │ +
316 _GLIBCXX_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(>, _GreaterThanOpConcept);
│ │ │ +
317 _GLIBCXX_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(>=, _GreaterEqualOpConcept);
│ │ │ +
318
│ │ │ +
319 _GLIBCXX_DEFINE_BINARY_OPERATOR_CONSTRAINT(+, _PlusOpConcept);
│ │ │ +
320 _GLIBCXX_DEFINE_BINARY_OPERATOR_CONSTRAINT(*, _TimesOpConcept);
│ │ │ +
321 _GLIBCXX_DEFINE_BINARY_OPERATOR_CONSTRAINT(/, _DivideOpConcept);
│ │ │ +
322 _GLIBCXX_DEFINE_BINARY_OPERATOR_CONSTRAINT(-, _SubtractOpConcept);
│ │ │ +
323 _GLIBCXX_DEFINE_BINARY_OPERATOR_CONSTRAINT(%, _ModOpConcept);
│ │ │ +
324
│ │ │ +
325#undef _GLIBCXX_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT
│ │ │ +
326#undef _GLIBCXX_DEFINE_BINARY_OPERATOR_CONSTRAINT
│ │ │ +
327
│ │ │ +
328 //===========================================================================
│ │ │ +
329 // Function Object Concepts
│ │ │ +
330
│ │ │ +
331 template <class _Func, class _Return>
│ │ │ +
332 struct _GeneratorConcept
│ │ │ +
333 {
│ │ │ +
334 void __constraints() {
│ │ │ +
335 const _Return& __r _IsUnused = __f();// require operator() member function
│ │ │ +
336 }
│ │ │ +
337 _Func __f;
│ │ │ +
338 };
│ │ │ +
339
│ │ │ +
340
│ │ │ +
341 template <class _Func>
│ │ │ +
342 struct _GeneratorConcept<_Func,void>
│ │ │ +
343 {
│ │ │ +
344 void __constraints() {
│ │ │ +
345 __f(); // require operator() member function
│ │ │ +
346 }
│ │ │ +
347 _Func __f;
│ │ │ +
348 };
│ │ │ +
349
│ │ │ +
350 template <class _Func, class _Return, class _Arg>
│ │ │ +
351 struct _UnaryFunctionConcept
│ │ │ +
352 {
│ │ │ +
353 void __constraints() {
│ │ │ +
354 __r = __f(__arg); // require operator()
│ │ │ +
355 }
│ │ │ +
356 _Func __f;
│ │ │ +
357 _Arg __arg;
│ │ │ +
358 _Return __r;
│ │ │ +
359 };
│ │ │ +
360
│ │ │ +
361 template <class _Func, class _Arg>
│ │ │ +
362 struct _UnaryFunctionConcept<_Func, void, _Arg> {
│ │ │ +
363 void __constraints() {
│ │ │ +
364 __f(__arg); // require operator()
│ │ │ +
365 }
│ │ │ +
366 _Func __f;
│ │ │ +
367 _Arg __arg;
│ │ │ +
368 };
│ │ │ +
369
│ │ │ +
370 template <class _Func, class _Return, class _First, class _Second>
│ │ │ +
371 struct _BinaryFunctionConcept
│ │ │ +
372 {
│ │ │ +
373 void __constraints() {
│ │ │ +
374 __r = __f(__first, __second); // require operator()
│ │ │ +
375 }
│ │ │ +
376 _Func __f;
│ │ │ +
377 _First __first;
│ │ │ +
378 _Second __second;
│ │ │ +
379 _Return __r;
│ │ │ +
380 };
│ │ │ +
381
│ │ │ +
382 template <class _Func, class _First, class _Second>
│ │ │ +
383 struct _BinaryFunctionConcept<_Func, void, _First, _Second>
│ │ │ +
384 {
│ │ │ +
385 void __constraints() {
│ │ │ +
386 __f(__first, __second); // require operator()
│ │ │ +
387 }
│ │ │ +
388 _Func __f;
│ │ │ +
389 _First __first;
│ │ │ +
390 _Second __second;
│ │ │ +
391 };
│ │ │ +
392
│ │ │ +
393 template <class _Func, class _Arg>
│ │ │ +
394 struct _UnaryPredicateConcept
│ │ │ +
395 {
│ │ │ +
396 void __constraints() {
│ │ │ +
397 __aux_require_boolean_expr(__f(__arg)); // require op() returning bool
│ │ │ +
398 }
│ │ │ +
399 _Func __f;
│ │ │ +
400 _Arg __arg;
│ │ │ +
401 };
│ │ │ +
402
│ │ │ +
403 template <class _Func, class _First, class _Second>
│ │ │ +
404 struct _BinaryPredicateConcept
│ │ │ +
405 {
│ │ │ +
406 void __constraints() {
│ │ │ +
407 __aux_require_boolean_expr(__f(__a, __b)); // require op() returning bool
│ │ │ +
408 }
│ │ │ +
409 _Func __f;
│ │ │ +
410 _First __a;
│ │ │ +
411 _Second __b;
│ │ │ +
412 };
│ │ │ +
413
│ │ │ +
414 // use this when functor is used inside a container class like std::set
│ │ │ +
415 template <class _Func, class _First, class _Second>
│ │ │ +
416 struct _Const_BinaryPredicateConcept {
│ │ │ +
417 void __constraints() {
│ │ │ +
418 __const_constraints(__f);
│ │ │ +
419 }
│ │ │ +
420 void __const_constraints(const _Func& __fun) {
│ │ │ +
421 __function_requires<_BinaryPredicateConcept<_Func, _First, _Second> >();
│ │ │ +
422 // operator() must be a const member function
│ │ │ +
423 __aux_require_boolean_expr(__fun(__a, __b));
│ │ │ +
424 }
│ │ │ +
425 _Func __f;
│ │ │ +
426 _First __a;
│ │ │ +
427 _Second __b;
│ │ │ +
428 };
│ │ │ +
429
│ │ │ +
430 //===========================================================================
│ │ │ +
431 // Iterator Concepts
│ │ │ +
432
│ │ │ +
433 template <class _Tp>
│ │ │ +
434 struct _TrivialIteratorConcept
│ │ │ +
435 {
│ │ │ +
436 void __constraints() {
│ │ │ +
437// __function_requires< _DefaultConstructibleConcept<_Tp> >();
│ │ │ +
438 __function_requires< _AssignableConcept<_Tp> >();
│ │ │ +
439 __function_requires< _EqualityComparableConcept<_Tp> >();
│ │ │ +
440// typedef typename std::iterator_traits<_Tp>::value_type _V;
│ │ │ +
441 (void)*__i; // require dereference operator
│ │ │ +
442 }
│ │ │ +
443 _Tp __i;
│ │ │ +
444 };
│ │ │ +
445
│ │ │ +
446 template <class _Tp>
│ │ │ +
447 struct _Mutable_TrivialIteratorConcept
│ │ │ +
448 {
│ │ │ +
449 void __constraints() {
│ │ │ +
450 __function_requires< _TrivialIteratorConcept<_Tp> >();
│ │ │ +
451 *__i = *__j; // require dereference and assignment
│ │ │ +
452 }
│ │ │ +
453 _Tp __i, __j;
│ │ │ +
454 };
│ │ │ +
455
│ │ │ +
456 template <class _Tp>
│ │ │ +
457 struct _InputIteratorConcept
│ │ │ +
458 {
│ │ │ +
459 void __constraints() {
│ │ │ +
460 __function_requires< _TrivialIteratorConcept<_Tp> >();
│ │ │ +
461 // require iterator_traits typedef's
│ │ │ +
462 typedef typename std::iterator_traits<_Tp>::difference_type _Diff;
│ │ │ +
463// __function_requires< _SignedIntegerConcept<_Diff> >();
│ │ │ +
464 typedef typename std::iterator_traits<_Tp>::reference _Ref;
│ │ │ +
465 typedef typename std::iterator_traits<_Tp>::pointer _Pt;
│ │ │ + │ │ │ +
467 __function_requires< _ConvertibleConcept<
│ │ │ + │ │ │ + │ │ │ +
470 ++__i; // require preincrement operator
│ │ │ +
471 __i++; // require postincrement operator
│ │ │ +
472 }
│ │ │ +
473 _Tp __i;
│ │ │ +
474 };
│ │ │ +
475
│ │ │ +
476 template <class _Tp, class _ValueT>
│ │ │ +
477 struct _OutputIteratorConcept
│ │ │ +
478 {
│ │ │ +
479 void __constraints() {
│ │ │ +
480 __function_requires< _AssignableConcept<_Tp> >();
│ │ │ +
481 ++__i; // require preincrement operator
│ │ │ +
482 __i++; // require postincrement operator
│ │ │ +
483 *__i++ = __val(); // require postincrement and assignment
│ │ │ +
484 }
│ │ │ +
485 _Tp __i;
│ │ │ +
486 // Use a function pointer here so no definition of the function needed.
│ │ │ +
487 // Just need something that returns a _ValueT (which might be a reference).
│ │ │ +
488 _ValueT (*__val)();
│ │ │ +
489 };
│ │ │ +
490
│ │ │ +
491 template<typename _Tp>
│ │ │ +
492 struct _Is_vector_bool_iterator
│ │ │ +
493 { static const bool __value = false; };
│ │ │ +
494
│ │ │ +
495#ifdef _GLIBCXX_DEBUG
│ │ │ +
496 namespace __cont = ::std::_GLIBCXX_STD_C;
│ │ │ +
497#else
│ │ │ +
498 namespace __cont = ::std;
│ │ │ +
499#endif
│ │ │ +
500
│ │ │ +
501 // Trait to identify vector<bool>::iterator
│ │ │ +
502 template <>
│ │ │ +
503 struct _Is_vector_bool_iterator<__cont::_Bit_iterator>
│ │ │ +
504 { static const bool __value = true; };
│ │ │ +
505
│ │ │ +
506 // And for vector<bool>::const_iterator.
│ │ │ +
507 template <>
│ │ │ +
508 struct _Is_vector_bool_iterator<__cont::_Bit_const_iterator>
│ │ │ +
509 { static const bool __value = true; };
│ │ │ +
510
│ │ │ +
511 // And for __gnu_debug::vector<bool> iterators too.
│ │ │ +
512 template <typename _It, typename _Seq, typename _Tag>
│ │ │ +
513 struct _Is_vector_bool_iterator<__gnu_debug::_Safe_iterator<_It, _Seq, _Tag> >
│ │ │ +
514 : _Is_vector_bool_iterator<_It> { };
│ │ │ +
515
│ │ │ +
516 template <class _Tp, bool = _Is_vector_bool_iterator<_Tp>::__value>
│ │ │ +
517 struct _ForwardIteratorReferenceConcept
│ │ │ +
518 {
│ │ │ +
519 void __constraints() {
│ │ │ +
520#if __cplusplus >= 201103L
│ │ │ +
521 typedef typename std::iterator_traits<_Tp>::reference _Ref;
│ │ │ +
522 static_assert(std::is_reference<_Ref>::value,
│ │ │ +
523 "reference type of a forward iterator must be a real reference");
│ │ │ +
524#endif
│ │ │ +
525 }
│ │ │ +
526 };
│ │ │ +
527
│ │ │ +
528 template <class _Tp, bool = _Is_vector_bool_iterator<_Tp>::__value>
│ │ │ +
529 struct _Mutable_ForwardIteratorReferenceConcept
│ │ │ +
530 {
│ │ │ +
531 void __constraints() {
│ │ │ +
532 typedef typename std::iterator_traits<_Tp>::reference _Ref;
│ │ │ +
533 typedef typename std::iterator_traits<_Tp>::value_type _Val;
│ │ │ +
534 __function_requires< _SameTypeConcept<_Ref, _Val&> >();
│ │ │ +
535 }
│ │ │ +
536 };
│ │ │ +
537
│ │ │ +
538 // vector<bool> iterators are not real forward iterators, but we ignore that.
│ │ │ +
539 template <class _Tp>
│ │ │ +
540 struct _ForwardIteratorReferenceConcept<_Tp, true>
│ │ │ +
541 {
│ │ │ +
542 void __constraints() { }
│ │ │ +
543 };
│ │ │ +
544
│ │ │ +
545 // vector<bool> iterators are not real forward iterators, but we ignore that.
│ │ │ +
546 template <class _Tp>
│ │ │ +
547 struct _Mutable_ForwardIteratorReferenceConcept<_Tp, true>
│ │ │ +
548 {
│ │ │ +
549 void __constraints() { }
│ │ │ +
550 };
│ │ │ +
551
│ │ │ +
552#pragma GCC diagnostic push
│ │ │ +
553#pragma GCC diagnostic ignored "-Wunused-variable"
│ │ │ +
554
│ │ │ +
555 template <class _Tp>
│ │ │ +
556 struct _ForwardIteratorConcept
│ │ │ +
557 {
│ │ │ +
558 void __constraints() {
│ │ │ +
559 __function_requires< _InputIteratorConcept<_Tp> >();
│ │ │ +
560 __function_requires< _DefaultConstructibleConcept<_Tp> >();
│ │ │ +
561 __function_requires< _ConvertibleConcept<
│ │ │ + │ │ │ + │ │ │ +
564 __function_requires< _ForwardIteratorReferenceConcept<_Tp> >();
│ │ │ +
565 _Tp& __j = ++__i;
│ │ │ +
566 const _Tp& __k = __i++;
│ │ │ +
567 typedef typename std::iterator_traits<_Tp>::reference _Ref;
│ │ │ +
568 _Ref __r = *__k;
│ │ │ +
569 _Ref __r2 = *__i++;
│ │ │ +
570 }
│ │ │ +
571 _Tp __i;
│ │ │ +
572 };
│ │ │ +
573
│ │ │ +
574 template <class _Tp>
│ │ │ +
575 struct _Mutable_ForwardIteratorConcept
│ │ │ +
576 {
│ │ │ +
577 void __constraints() {
│ │ │ +
578 __function_requires< _ForwardIteratorConcept<_Tp> >();
│ │ │ +
579 typedef typename std::iterator_traits<_Tp>::reference _Ref;
│ │ │ +
580 typedef typename std::iterator_traits<_Tp>::value_type _Val;
│ │ │ +
581 __function_requires< _Mutable_ForwardIteratorReferenceConcept<_Tp> >();
│ │ │ +
582 }
│ │ │ +
583 _Tp __i;
│ │ │ +
584 };
│ │ │ +
585
│ │ │ +
586 template <class _Tp>
│ │ │ +
587 struct _BidirectionalIteratorConcept
│ │ │ +
588 {
│ │ │ +
589 void __constraints() {
│ │ │ +
590 __function_requires< _ForwardIteratorConcept<_Tp> >();
│ │ │ +
591 __function_requires< _ConvertibleConcept<
│ │ │ + │ │ │ + │ │ │ +
594 _Tp& __j = --__i; // require predecrement operator
│ │ │ +
595 const _Tp& __k = __i--; // require postdecrement operator
│ │ │ +
596 typedef typename std::iterator_traits<_Tp>::reference _Ref;
│ │ │ +
597 _Ref __r = *__j--;
│ │ │ +
598 }
│ │ │ +
599 _Tp __i;
│ │ │ +
600 };
│ │ │ +
601
│ │ │ +
602 template <class _Tp>
│ │ │ +
603 struct _Mutable_BidirectionalIteratorConcept
│ │ │ +
604 {
│ │ │ +
605 void __constraints() {
│ │ │ +
606 __function_requires< _BidirectionalIteratorConcept<_Tp> >();
│ │ │ +
607 __function_requires< _Mutable_ForwardIteratorConcept<_Tp> >();
│ │ │ +
608 }
│ │ │ +
609 _Tp __i;
│ │ │ +
610 };
│ │ │ +
611
│ │ │ +
612
│ │ │ +
613 template <class _Tp>
│ │ │ +
614 struct _RandomAccessIteratorConcept
│ │ │ +
615 {
│ │ │ +
616 void __constraints() {
│ │ │ +
617 __function_requires< _BidirectionalIteratorConcept<_Tp> >();
│ │ │ +
618 __function_requires< _ComparableConcept<_Tp> >();
│ │ │ +
619 __function_requires< _ConvertibleConcept<
│ │ │ + │ │ │ + │ │ │ +
622 typedef typename std::iterator_traits<_Tp>::reference _Ref;
│ │ │ +
623
│ │ │ +
624 _Tp& __j = __i += __n; // require assignment addition operator
│ │ │ +
625 __i = __i + __n; __i = __n + __i; // require addition with difference type
│ │ │ +
626 _Tp& __k = __i -= __n; // require assignment subtraction op
│ │ │ +
627 __i = __i - __n; // require subtraction with
│ │ │ +
628 // difference type
│ │ │ +
629 __n = __i - __j; // require difference operator
│ │ │ +
630 _Ref __r = __i[__n]; // require element access operator
│ │ │ +
631 }
│ │ │ +
632 _Tp __a, __b;
│ │ │ +
633 _Tp __i, __j;
│ │ │ + │ │ │ +
635 };
│ │ │ +
636
│ │ │ +
637 template <class _Tp>
│ │ │ +
638 struct _Mutable_RandomAccessIteratorConcept
│ │ │ +
639 {
│ │ │ +
640 void __constraints() {
│ │ │ +
641 __function_requires< _RandomAccessIteratorConcept<_Tp> >();
│ │ │ +
642 __function_requires< _Mutable_BidirectionalIteratorConcept<_Tp> >();
│ │ │ +
643 }
│ │ │ +
644 _Tp __i;
│ │ │ + │ │ │ +
646 };
│ │ │ +
647
│ │ │ +
648#pragma GCC diagnostic pop
│ │ │ +
649
│ │ │ +
650 //===========================================================================
│ │ │ +
651 // Container Concepts
│ │ │ +
652
│ │ │ +
653 template <class _Container>
│ │ │ +
654 struct _ContainerConcept
│ │ │ +
655 {
│ │ │ +
656 typedef typename _Container::value_type _Value_type;
│ │ │ +
657 typedef typename _Container::difference_type _Difference_type;
│ │ │ +
658 typedef typename _Container::size_type _Size_type;
│ │ │ +
659 typedef typename _Container::const_reference _Const_reference;
│ │ │ +
660 typedef typename _Container::const_pointer _Const_pointer;
│ │ │ +
661 typedef typename _Container::const_iterator _Const_iterator;
│ │ │ +
662
│ │ │ +
663 void __constraints() {
│ │ │ +
664 __function_requires< _InputIteratorConcept<_Const_iterator> >();
│ │ │ +
665 __function_requires< _AssignableConcept<_Container> >();
│ │ │ +
666 const _Container __c;
│ │ │ +
667 __i = __c.begin();
│ │ │ +
668 __i = __c.end();
│ │ │ +
669 __n = __c.size();
│ │ │ +
670 __n = __c.max_size();
│ │ │ +
671 __b = __c.empty();
│ │ │ +
672 }
│ │ │ +
673 bool __b;
│ │ │ +
674 _Const_iterator __i;
│ │ │ +
675 _Size_type __n;
│ │ │ +
676 };
│ │ │ +
677
│ │ │ +
678 template <class _Container>
│ │ │ +
679 struct _Mutable_ContainerConcept
│ │ │ +
680 {
│ │ │ +
681 typedef typename _Container::value_type _Value_type;
│ │ │ +
682 typedef typename _Container::reference _Reference;
│ │ │ +
683 typedef typename _Container::iterator _Iterator;
│ │ │ +
684 typedef typename _Container::pointer _Pointer;
│ │ │ +
685
│ │ │ +
686 void __constraints() {
│ │ │ +
687 __function_requires< _ContainerConcept<_Container> >();
│ │ │ +
688 __function_requires< _AssignableConcept<_Value_type> >();
│ │ │ +
689 __function_requires< _InputIteratorConcept<_Iterator> >();
│ │ │ +
690
│ │ │ +
691 __i = __c.begin();
│ │ │ +
692 __i = __c.end();
│ │ │ +
693 __c.swap(__c2);
│ │ │ +
694 }
│ │ │ +
695 _Iterator __i;
│ │ │ +
696 _Container __c, __c2;
│ │ │ +
697 };
│ │ │ +
698
│ │ │ +
699 template <class _ForwardContainer>
│ │ │ +
700 struct _ForwardContainerConcept
│ │ │ +
701 {
│ │ │ +
702 void __constraints() {
│ │ │ +
703 __function_requires< _ContainerConcept<_ForwardContainer> >();
│ │ │ +
704 typedef typename _ForwardContainer::const_iterator _Const_iterator;
│ │ │ +
705 __function_requires< _ForwardIteratorConcept<_Const_iterator> >();
│ │ │ +
706 }
│ │ │ +
707 };
│ │ │ +
708
│ │ │ +
709 template <class _ForwardContainer>
│ │ │ +
710 struct _Mutable_ForwardContainerConcept
│ │ │ +
711 {
│ │ │ +
712 void __constraints() {
│ │ │ +
713 __function_requires< _ForwardContainerConcept<_ForwardContainer> >();
│ │ │ +
714 __function_requires< _Mutable_ContainerConcept<_ForwardContainer> >();
│ │ │ +
715 typedef typename _ForwardContainer::iterator _Iterator;
│ │ │ +
716 __function_requires< _Mutable_ForwardIteratorConcept<_Iterator> >();
│ │ │ +
717 }
│ │ │ +
718 };
│ │ │ +
719
│ │ │ +
720 template <class _ReversibleContainer>
│ │ │ +
721 struct _ReversibleContainerConcept
│ │ │ +
722 {
│ │ │ +
723 typedef typename _ReversibleContainer::const_iterator _Const_iterator;
│ │ │ +
724 typedef typename _ReversibleContainer::const_reverse_iterator
│ │ │ +
725 _Const_reverse_iterator;
│ │ │ +
726
│ │ │ +
727 void __constraints() {
│ │ │ +
728 __function_requires< _ForwardContainerConcept<_ReversibleContainer> >();
│ │ │ +
729 __function_requires< _BidirectionalIteratorConcept<_Const_iterator> >();
│ │ │ +
730 __function_requires<
│ │ │ +
731 _BidirectionalIteratorConcept<_Const_reverse_iterator> >();
│ │ │ +
732
│ │ │ +
733 const _ReversibleContainer __c;
│ │ │ +
734 _Const_reverse_iterator __i = __c.rbegin();
│ │ │ +
735 __i = __c.rend();
│ │ │ +
736 }
│ │ │ +
737 };
│ │ │ +
738
│ │ │ +
739 template <class _ReversibleContainer>
│ │ │ +
740 struct _Mutable_ReversibleContainerConcept
│ │ │ +
741 {
│ │ │ +
742 typedef typename _ReversibleContainer::iterator _Iterator;
│ │ │ +
743 typedef typename _ReversibleContainer::reverse_iterator _Reverse_iterator;
│ │ │ +
744
│ │ │ +
745 void __constraints() {
│ │ │ +
746 __function_requires<_ReversibleContainerConcept<_ReversibleContainer> >();
│ │ │ +
747 __function_requires<
│ │ │ +
748 _Mutable_ForwardContainerConcept<_ReversibleContainer> >();
│ │ │ +
749 __function_requires<_Mutable_BidirectionalIteratorConcept<_Iterator> >();
│ │ │ +
750 __function_requires<
│ │ │ +
751 _Mutable_BidirectionalIteratorConcept<_Reverse_iterator> >();
│ │ │ +
752
│ │ │ +
753 _Reverse_iterator __i = __c.rbegin();
│ │ │ +
754 __i = __c.rend();
│ │ │ +
755 }
│ │ │ +
756 _ReversibleContainer __c;
│ │ │ +
757 };
│ │ │ +
758
│ │ │ +
759 template <class _RandomAccessContainer>
│ │ │ +
760 struct _RandomAccessContainerConcept
│ │ │ +
761 {
│ │ │ +
762 typedef typename _RandomAccessContainer::size_type _Size_type;
│ │ │ +
763 typedef typename _RandomAccessContainer::const_reference _Const_reference;
│ │ │ +
764 typedef typename _RandomAccessContainer::const_iterator _Const_iterator;
│ │ │ +
765 typedef typename _RandomAccessContainer::const_reverse_iterator
│ │ │ +
766 _Const_reverse_iterator;
│ │ │ +
767
│ │ │ +
768 void __constraints() {
│ │ │ +
769 __function_requires<
│ │ │ +
770 _ReversibleContainerConcept<_RandomAccessContainer> >();
│ │ │ +
771 __function_requires< _RandomAccessIteratorConcept<_Const_iterator> >();
│ │ │ +
772 __function_requires<
│ │ │ +
773 _RandomAccessIteratorConcept<_Const_reverse_iterator> >();
│ │ │ +
774
│ │ │ +
775 const _RandomAccessContainer __c;
│ │ │ +
776 _Const_reference __r _IsUnused = __c[__n];
│ │ │ +
777 }
│ │ │ +
778 _Size_type __n;
│ │ │ +
779 };
│ │ │ +
780
│ │ │ +
781 template <class _RandomAccessContainer>
│ │ │ +
782 struct _Mutable_RandomAccessContainerConcept
│ │ │ +
783 {
│ │ │ +
784 typedef typename _RandomAccessContainer::size_type _Size_type;
│ │ │ +
785 typedef typename _RandomAccessContainer::reference _Reference;
│ │ │ +
786 typedef typename _RandomAccessContainer::iterator _Iterator;
│ │ │ +
787 typedef typename _RandomAccessContainer::reverse_iterator _Reverse_iterator;
│ │ │ +
788
│ │ │ +
789 void __constraints() {
│ │ │ +
790 __function_requires<
│ │ │ +
791 _RandomAccessContainerConcept<_RandomAccessContainer> >();
│ │ │ +
792 __function_requires<
│ │ │ +
793 _Mutable_ReversibleContainerConcept<_RandomAccessContainer> >();
│ │ │ +
794 __function_requires< _Mutable_RandomAccessIteratorConcept<_Iterator> >();
│ │ │ +
795 __function_requires<
│ │ │ +
796 _Mutable_RandomAccessIteratorConcept<_Reverse_iterator> >();
│ │ │ +
797
│ │ │ +
798 _Reference __r _IsUnused = __c[__i];
│ │ │ +
799 }
│ │ │ +
800 _Size_type __i;
│ │ │ +
801 _RandomAccessContainer __c;
│ │ │ +
802 };
│ │ │ +
803
│ │ │ +
804 // A Sequence is inherently mutable
│ │ │ +
805 template <class _Sequence>
│ │ │ +
806 struct _SequenceConcept
│ │ │ +
807 {
│ │ │ +
808 typedef typename _Sequence::reference _Reference;
│ │ │ +
809 typedef typename _Sequence::const_reference _Const_reference;
│ │ │ +
810
│ │ │ +
811 void __constraints() {
│ │ │ +
812 // Matt Austern's book puts DefaultConstructible here, the C++
│ │ │ +
813 // standard places it in Container
│ │ │ +
814 // function_requires< DefaultConstructible<Sequence> >();
│ │ │ +
815 __function_requires< _Mutable_ForwardContainerConcept<_Sequence> >();
│ │ │ +
816 __function_requires< _DefaultConstructibleConcept<_Sequence> >();
│ │ │ +
817
│ │ │ +
818 _Sequence
│ │ │ +
819 __c _IsUnused(__n, __t),
│ │ │ +
820 __c2 _IsUnused(__first, __last);
│ │ │ +
821
│ │ │ +
822 __c.insert(__p, __t);
│ │ │ +
823 __c.insert(__p, __n, __t);
│ │ │ +
824 __c.insert(__p, __first, __last);
│ │ │ +
825
│ │ │ +
826 __c.erase(__p);
│ │ │ +
827 __c.erase(__p, __q);
│ │ │ +
828
│ │ │ +
829 _Reference __r _IsUnused = __c.front();
│ │ │ +
830
│ │ │ +
831 __const_constraints(__c);
│ │ │ +
832 }
│ │ │ +
833 void __const_constraints(const _Sequence& __c) {
│ │ │ +
834 _Const_reference __r _IsUnused = __c.front();
│ │ │ +
835 }
│ │ │ +
836 typename _Sequence::value_type __t;
│ │ │ +
837 typename _Sequence::size_type __n;
│ │ │ +
838 typename _Sequence::value_type *__first, *__last;
│ │ │ +
839 typename _Sequence::iterator __p, __q;
│ │ │ +
840 };
│ │ │ +
841
│ │ │ +
842 template <class _FrontInsertionSequence>
│ │ │ +
843 struct _FrontInsertionSequenceConcept
│ │ │ +
844 {
│ │ │ +
845 void __constraints() {
│ │ │ +
846 __function_requires< _SequenceConcept<_FrontInsertionSequence> >();
│ │ │ +
847
│ │ │ +
848 __c.push_front(__t);
│ │ │ +
849 __c.pop_front();
│ │ │ +
850 }
│ │ │ +
851 _FrontInsertionSequence __c;
│ │ │ +
852 typename _FrontInsertionSequence::value_type __t;
│ │ │ +
853 };
│ │ │ +
854
│ │ │ +
855 template <class _BackInsertionSequence>
│ │ │ +
856 struct _BackInsertionSequenceConcept
│ │ │ +
857 {
│ │ │ +
858 typedef typename _BackInsertionSequence::reference _Reference;
│ │ │ +
859 typedef typename _BackInsertionSequence::const_reference _Const_reference;
│ │ │ +
860
│ │ │ +
861 void __constraints() {
│ │ │ +
862 __function_requires< _SequenceConcept<_BackInsertionSequence> >();
│ │ │ +
863
│ │ │ +
864 __c.push_back(__t);
│ │ │ +
865 __c.pop_back();
│ │ │ +
866 _Reference __r _IsUnused = __c.back();
│ │ │ +
867 }
│ │ │ +
868 void __const_constraints(const _BackInsertionSequence& __c) {
│ │ │ +
869 _Const_reference __r _IsUnused = __c.back();
│ │ │ +
870 };
│ │ │ +
871 _BackInsertionSequence __c;
│ │ │ +
872 typename _BackInsertionSequence::value_type __t;
│ │ │ +
873 };
│ │ │ +
874
│ │ │ +
875_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ +
876} // namespace
│ │ │ +
877
│ │ │ +
878#pragma GCC diagnostic pop
│ │ │ +
879#undef _IsUnused
│ │ │ +
880
│ │ │ +
881#endif // _GLIBCXX_BOOST_CONCEPT_CHECK
│ │ │ +
882
│ │ │ +
883
│ │ │ + │ │ │ + │ │ │ +
ISO C++ entities toplevel namespace is std.
│ │ │ +
GNU extensions for public use.
│ │ │ +
GNU debug classes for public use.
│ │ │ +
is_reference
Definition type_traits:581
│ │ │ +
Safe iterator wrapper.
│ │ │ +
Traits class for iterators.
│ │ │ +
Marking input iterators.
│ │ │ +
Forward iterators support a superset of input iterator operations.
│ │ │ +
Bidirectional iterators support a superset of forward iterator operations.
│ │ │ +
Random-access iterators support a superset of bidirectional iterator operations.
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,69 +1,947 @@ │ │ │ │ libstdc++ │ │ │ │ -cxxabi_forced.h │ │ │ │ +boost_concept_check.h │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -1// cxxabi.h subset for cancellation -*- C++ -*- │ │ │ │ +1// -*- C++ -*- │ │ │ │ 2 │ │ │ │ -3// Copyright (C) 2007-2022 Free Software Foundation, Inc. │ │ │ │ +3// Copyright (C) 2004-2022 Free Software Foundation, Inc. │ │ │ │ 4// │ │ │ │ -5// This file is part of GCC. │ │ │ │ -6// │ │ │ │ -7// GCC is free software; you can redistribute it and/or modify │ │ │ │ -8// it under the terms of the GNU General Public License as published by │ │ │ │ -9// the Free Software Foundation; either version 3, or (at your option) │ │ │ │ -10// any later version. │ │ │ │ -11// │ │ │ │ -12// GCC is distributed in the hope that it will be useful, │ │ │ │ -13// but WITHOUT ANY WARRANTY; without even the implied warranty of │ │ │ │ -14// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the │ │ │ │ -15// GNU General Public License for more details. │ │ │ │ -16// │ │ │ │ -17// Under Section 7 of GPL version 3, you are granted additional │ │ │ │ -18// permissions described in the GCC Runtime Library Exception, version │ │ │ │ -19// 3.1, as published by the Free Software Foundation. │ │ │ │ -20 │ │ │ │ -21// You should have received a copy of the GNU General Public License and │ │ │ │ -22// a copy of the GCC Runtime Library Exception along with this program; │ │ │ │ -23// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see │ │ │ │ -24// . │ │ │ │ -25 │ │ │ │ -26/** @file bits/cxxabi_forced.h │ │ │ │ -27 * This is an internal header file, included by other library headers. │ │ │ │ -28 * Do not attempt to use it directly. @headername{cxxabi.h} │ │ │ │ -29 */ │ │ │ │ -30 │ │ │ │ -31#ifndef _CXXABI_FORCED_H │ │ │ │ -32#define _CXXABI_FORCED_H 1 │ │ │ │ -33 │ │ │ │ -34#pragma GCC system_header │ │ │ │ -35 │ │ │ │ -36#pragma GCC visibility push(default) │ │ │ │ -37 │ │ │ │ -38#ifdef __cplusplus │ │ │ │ -39namespace __cxxabiv1 │ │ │ │ -40{ │ │ │ │ -41 /** │ │ │ │ -42 * @brief Thrown as part of forced unwinding. │ │ │ │ -43 * @ingroup exceptions │ │ │ │ -44 * │ │ │ │ -45 * A magic placeholder class that can be caught by reference to │ │ │ │ -46 * recognize forced unwinding. │ │ │ │ -47 */ │ │ │ │ -_4_8 class _____f_o_r_c_e_d___u_n_w_i_n_d │ │ │ │ -49 { │ │ │ │ -50 virtual _~_____f_o_r_c_e_d___u_n_w_i_n_d() throw(); │ │ │ │ -51 │ │ │ │ -52 // Prevent catch by value. │ │ │ │ -53 virtual void __pure_dummy() = 0; │ │ │ │ -54 }; │ │ │ │ +5// This file is part of the GNU ISO C++ Library. This library is free │ │ │ │ +6// software; you can redistribute it and/or modify it under the │ │ │ │ +7// terms of the GNU General Public License as published by the │ │ │ │ +8// Free Software Foundation; either version 3, or (at your option) │ │ │ │ +9// any later version. │ │ │ │ +10 │ │ │ │ +11// This library is distributed in the hope that it will be useful, │ │ │ │ +12// but WITHOUT ANY WARRANTY; without even the implied warranty of │ │ │ │ +13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the │ │ │ │ +14// GNU General Public License for more details. │ │ │ │ +15 │ │ │ │ +16// Under Section 7 of GPL version 3, you are granted additional │ │ │ │ +17// permissions described in the GCC Runtime Library Exception, version │ │ │ │ +18// 3.1, as published by the Free Software Foundation. │ │ │ │ +19 │ │ │ │ +20// You should have received a copy of the GNU General Public License and │ │ │ │ +21// a copy of the GCC Runtime Library Exception along with this program; │ │ │ │ +22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see │ │ │ │ +23// . │ │ │ │ +24 │ │ │ │ +25// (C) Copyright Jeremy Siek 2000. Permission to copy, use, modify, │ │ │ │ +26// sell and distribute this software is granted provided this │ │ │ │ +27// copyright notice appears in all copies. This software is provided │ │ │ │ +28// "as is" without express or implied warranty, and with no claim as │ │ │ │ +29// to its suitability for any purpose. │ │ │ │ +30// │ │ │ │ +31 │ │ │ │ +32/** @file bits/boost_concept_check.h │ │ │ │ +33 * This is an internal header file, included by other library headers. │ │ │ │ +34 * Do not attempt to use it directly. @headername{iterator} │ │ │ │ +35 */ │ │ │ │ +36 │ │ │ │ +37// GCC Note: based on version 1.12.0 of the Boost library. │ │ │ │ +38 │ │ │ │ +39#ifndef _BOOST_CONCEPT_CHECK_H │ │ │ │ +40#define _BOOST_CONCEPT_CHECK_H 1 │ │ │ │ +41 │ │ │ │ +42#pragma GCC system_header │ │ │ │ +43 │ │ │ │ +44#include <_b_i_t_s_/_c_+_+_c_o_n_f_i_g_._h> │ │ │ │ +45#include <_b_i_t_s_/_s_t_l___i_t_e_r_a_t_o_r___b_a_s_e___t_y_p_e_s_._h> // for traits and tags │ │ │ │ +46 │ │ │ │ +47namespace _s_t_d _GLIBCXX_VISIBILITY(default) │ │ │ │ +48{ │ │ │ │ +49_GLIBCXX_BEGIN_NAMESPACE_VERSION │ │ │ │ +50_GLIBCXX_BEGIN_NAMESPACE_CONTAINER │ │ │ │ +51 struct _Bit_iterator; │ │ │ │ +52 struct _Bit_const_iterator; │ │ │ │ +53_GLIBCXX_END_NAMESPACE_CONTAINER │ │ │ │ +54_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ 55} │ │ │ │ -56#endif // __cplusplus │ │ │ │ -57 │ │ │ │ -58#pragma GCC visibility pop │ │ │ │ -59 │ │ │ │ -60#endif // __CXXABI_FORCED_H │ │ │ │ -_____c_x_x_a_b_i_v_1_:_:_____f_o_r_c_e_d___u_n_w_i_n_d │ │ │ │ -Thrown as part of forced unwinding. │ │ │ │ -DDeeffiinniittiioonn _c_x_x_a_b_i___f_o_r_c_e_d_._h_:_4_9 │ │ │ │ +56 │ │ │ │ +_5_7namespace _____g_n_u___d_e_b_u_g │ │ │ │ +58{ │ │ │ │ +59 template │ │ │ │ +60 class ___S_a_f_e___i_t_e_r_a_t_o_r; │ │ │ │ +61} │ │ │ │ +62 │ │ │ │ +63namespace _____g_n_u___c_x_x _GLIBCXX_VISIBILITY(default) │ │ │ │ +64{ │ │ │ │ +65_GLIBCXX_BEGIN_NAMESPACE_VERSION │ │ │ │ +66 │ │ │ │ +67#pragma GCC diagnostic push │ │ │ │ +68#pragma GCC diagnostic ignored "-Wunused-local-typedefs" │ │ │ │ +69 │ │ │ │ +70#define _IsUnused __attribute__ ((__unused__)) │ │ │ │ +71 │ │ │ │ +72// When the C-C code is in use, we would like this function to do as little │ │ │ │ +73// as possible at runtime, use as few resources as possible, and hopefully │ │ │ │ +74// be elided out of existence... hmmm. │ │ │ │ +75template │ │ │ │ +76_GLIBCXX14_CONSTEXPR inline void __function_requires() │ │ │ │ +77{ │ │ │ │ +78 void (_Concept::*__x)() _IsUnused = &_Concept::__constraints; │ │ │ │ +79} │ │ │ │ +80 │ │ │ │ +81// No definition: if this is referenced, there's a problem with │ │ │ │ +82// the instantiating type not being one of the required integer types. │ │ │ │ +83// Unfortunately, this results in a link-time error, not a compile-time │ │ │ │ +error. │ │ │ │ +84void __error_type_must_be_an_integer_type(); │ │ │ │ +85void __error_type_must_be_an_unsigned_integer_type(); │ │ │ │ +86void __error_type_must_be_a_signed_integer_type(); │ │ │ │ +87 │ │ │ │ +88// ??? Should the "concept_checking*" structs begin with more than _ ? │ │ │ │ +89#define _GLIBCXX_CLASS_REQUIRES(_type_var, _ns, _concept) \ │ │ │ │ +90 typedef void (_ns::_concept <_type_var>::* _func##_type_var##_concept)(); \ │ │ │ │ +91 template <_func##_type_var##_concept _Tp1> \ │ │ │ │ +92 struct _concept_checking##_type_var##_concept { }; \ │ │ │ │ +93 typedef _concept_checking##_type_var##_concept< \ │ │ │ │ +94 &_ns::_concept <_type_var>::__constraints> \ │ │ │ │ +95 _concept_checking_typedef##_type_var##_concept │ │ │ │ +96 │ │ │ │ +97#define _GLIBCXX_CLASS_REQUIRES2(_type_var1, _type_var2, _ns, _concept) \ │ │ │ │ +98 typedef void (_ns::_concept <_type_var1,_type_var2>:: │ │ │ │ +* _func##_type_var1##_type_var2##_concept)(); \ │ │ │ │ +99 template <_func##_type_var1##_type_var2##_concept _Tp1> \ │ │ │ │ +100 struct _concept_checking##_type_var1##_type_var2##_concept { }; \ │ │ │ │ +101 typedef _concept_checking##_type_var1##_type_var2##_concept< \ │ │ │ │ +102 &_ns::_concept <_type_var1,_type_var2>::__constraints> \ │ │ │ │ +103 _concept_checking_typedef##_type_var1##_type_var2##_concept │ │ │ │ +104 │ │ │ │ +105#define _GLIBCXX_CLASS_REQUIRES3(_type_var1, _type_var2, _type_var3, _ns, │ │ │ │ +_concept) \ │ │ │ │ +106 typedef void (_ns::_concept <_type_var1,_type_var2,_type_var3>:: │ │ │ │ +* _func##_type_var1##_type_var2##_type_var3##_concept)(); \ │ │ │ │ +107 template <_func##_type_var1##_type_var2##_type_var3##_concept _Tp1> \ │ │ │ │ +108 struct _concept_checking##_type_var1##_type_var2##_type_var3##_concept { }; │ │ │ │ +\ │ │ │ │ +109 typedef _concept_checking##_type_var1##_type_var2##_type_var3##_concept< \ │ │ │ │ +110 &_ns::_concept <_type_var1,_type_var2,_type_var3>::__constraints> \ │ │ │ │ +111 _concept_checking_typedef##_type_var1##_type_var2##_type_var3##_concept │ │ │ │ +112 │ │ │ │ +113#define _GLIBCXX_CLASS_REQUIRES4(_type_var1, _type_var2, _type_var3, │ │ │ │ +_type_var4, _ns, _concept) \ │ │ │ │ +114 typedef void (_ns::_concept <_type_var1,_type_var2,_type_var3,_type_var4>:: │ │ │ │ +* _func##_type_var1##_type_var2##_type_var3##_type_var4##_concept)(); \ │ │ │ │ +115 template <_func##_type_var1##_type_var2##_type_var3##_type_var4##_concept │ │ │ │ +_Tp1> \ │ │ │ │ +116 struct │ │ │ │ +_concept_checking##_type_var1##_type_var2##_type_var3##_type_var4##_concept │ │ │ │ +{ }; \ │ │ │ │ +117 typedef │ │ │ │ +_concept_checking##_type_var1##_type_var2##_type_var3##_type_var4##_concept< \ │ │ │ │ +118 &_ns::_concept <_type_var1,_type_var2,_type_var3,_type_var4>:: │ │ │ │ +__constraints> \ │ │ │ │ +119 │ │ │ │ +_concept_checking_typedef##_type_var1##_type_var2##_type_var3##_type_var4##_concept │ │ │ │ +120 │ │ │ │ +121 │ │ │ │ +122template │ │ │ │ +123struct _Aux_require_same { }; │ │ │ │ +124 │ │ │ │ +125template │ │ │ │ +126struct _Aux_require_same<_Tp,_Tp> { typedef _Tp _Type; }; │ │ │ │ +127 │ │ │ │ +128 template │ │ │ │ +129 struct _SameTypeConcept │ │ │ │ +130 { │ │ │ │ +131 void __constraints() { │ │ │ │ +132 typedef typename _Aux_require_same<_Tp1, _Tp2>::_Type _Required; │ │ │ │ +133 } │ │ │ │ +134 }; │ │ │ │ +135 │ │ │ │ +136 template │ │ │ │ +137 struct _IntegerConcept { │ │ │ │ +138 void __constraints() { │ │ │ │ +139 __error_type_must_be_an_integer_type(); │ │ │ │ +140 } │ │ │ │ +141 }; │ │ │ │ +142 template <> struct _IntegerConcept { void __constraints() {} }; │ │ │ │ +143 template <> struct _IntegerConcept { void __constraints(){} │ │ │ │ +}; │ │ │ │ +144 template <> struct _IntegerConcept { void __constraints() {} }; │ │ │ │ +145 template <> struct _IntegerConcept { void __constraints() {} │ │ │ │ +}; │ │ │ │ +146 template <> struct _IntegerConcept { void __constraints() {} }; │ │ │ │ +147 template <> struct _IntegerConcept { void __constraints() {} │ │ │ │ +}; │ │ │ │ +148 template <> struct _IntegerConcept { void __constraints() {} }; │ │ │ │ +149 template <> struct _IntegerConcept │ │ │ │ +150 { void __constraints() {} }; │ │ │ │ +151 │ │ │ │ +152 template │ │ │ │ +153 struct _SignedIntegerConcept { │ │ │ │ +154 void __constraints() { │ │ │ │ +155 __error_type_must_be_a_signed_integer_type(); │ │ │ │ +156 } │ │ │ │ +157 }; │ │ │ │ +158 template <> struct _SignedIntegerConcept { void __constraints() {} │ │ │ │ +}; │ │ │ │ +159 template <> struct _SignedIntegerConcept { void __constraints() {} }; │ │ │ │ +160 template <> struct _SignedIntegerConcept { void __constraints() {} }; │ │ │ │ +161 template <> struct _SignedIntegerConcept { void __constraints() │ │ │ │ +{}}; │ │ │ │ +162 │ │ │ │ +163 template │ │ │ │ +164 struct _UnsignedIntegerConcept { │ │ │ │ +165 void __constraints() { │ │ │ │ +166 __error_type_must_be_an_unsigned_integer_type(); │ │ │ │ +167 } │ │ │ │ +168 }; │ │ │ │ +169 template <> struct _UnsignedIntegerConcept │ │ │ │ +170 { void __constraints() {} }; │ │ │ │ +171 template <> struct _UnsignedIntegerConcept │ │ │ │ +172 { void __constraints() {} }; │ │ │ │ +173 template <> struct _UnsignedIntegerConcept │ │ │ │ +174 { void __constraints() {} }; │ │ │ │ +175 template <> struct _UnsignedIntegerConcept │ │ │ │ +176 { void __constraints() {} }; │ │ │ │ +177 │ │ │ │ +178 // │ │ │ │ +=========================================================================== │ │ │ │ +179 // Basic Concepts │ │ │ │ +180 │ │ │ │ +181 template │ │ │ │ +182 struct _DefaultConstructibleConcept │ │ │ │ +183 { │ │ │ │ +184 void __constraints() { │ │ │ │ +185 _Tp __a _IsUnused; // require default constructor │ │ │ │ +186 } │ │ │ │ +187 }; │ │ │ │ +188 │ │ │ │ +189 template │ │ │ │ +190 struct _AssignableConcept │ │ │ │ +191 { │ │ │ │ +192 void __constraints() { │ │ │ │ +193 __a = __a; // require assignment operator │ │ │ │ +194 __const_constraints(__a); │ │ │ │ +195 } │ │ │ │ +196 void __const_constraints(const _Tp& __b) { │ │ │ │ +197 __a = __b; // const required for argument to assignment │ │ │ │ +198 } │ │ │ │ +199 _Tp __a; │ │ │ │ +200 // possibly should be "Tp* a;" and then dereference "a" in constraint │ │ │ │ +201 // functions? present way would require a default ctor, i think... │ │ │ │ +202 }; │ │ │ │ +203 │ │ │ │ +204 template │ │ │ │ +205 struct _CopyConstructibleConcept │ │ │ │ +206 { │ │ │ │ +207 void __constraints() { │ │ │ │ +208 _Tp __a(__b); // require copy constructor │ │ │ │ +209 _Tp* __ptr _IsUnused = &__a; // require address of operator │ │ │ │ +210 __const_constraints(__a); │ │ │ │ +211 } │ │ │ │ +212 void __const_constraints(const _Tp& __a) { │ │ │ │ +213 _Tp __c _IsUnused(__a); // require const copy constructor │ │ │ │ +214 const _Tp* __ptr _IsUnused = &__a; // require const address of operator │ │ │ │ +215 } │ │ │ │ +216 _Tp __b; │ │ │ │ +217 }; │ │ │ │ +218 │ │ │ │ +219 // The SGI STL version of Assignable requires copy constructor and │ │ │ │ +operator= │ │ │ │ +220 template │ │ │ │ +221 struct _SGIAssignableConcept │ │ │ │ +222 { │ │ │ │ +223 void __constraints() { │ │ │ │ +224 _Tp __b _IsUnused(__a); │ │ │ │ +225 __a = __a; // require assignment operator │ │ │ │ +226 __const_constraints(__a); │ │ │ │ +227 } │ │ │ │ +228 void __const_constraints(const _Tp& __b) { │ │ │ │ +229 _Tp __c _IsUnused(__b); │ │ │ │ +230 __a = __b; // const required for argument to assignment │ │ │ │ +231 } │ │ │ │ +232 _Tp __a; │ │ │ │ +233 }; │ │ │ │ +234 │ │ │ │ +235 template │ │ │ │ +236 struct _ConvertibleConcept │ │ │ │ +237 { │ │ │ │ +238 void __constraints() { │ │ │ │ +239 _To __y _IsUnused = __x; │ │ │ │ +240 } │ │ │ │ +241 _From __x; │ │ │ │ +242 }; │ │ │ │ +243 │ │ │ │ +244 // The C++ standard requirements for many concepts talk about return │ │ │ │ +245 // types that must be "convertible to bool". The problem with this │ │ │ │ +246 // requirement is that it leaves the door open for evil proxies that │ │ │ │ +247 // define things like operator|| with strange return types. Two │ │ │ │ +248 // possible solutions are: │ │ │ │ +249 // 1) require the return type to be exactly bool │ │ │ │ +250 // 2) stay with convertible to bool, and also │ │ │ │ +251 // specify stuff about all the logical operators. │ │ │ │ +252 // For now we just test for convertible to bool. │ │ │ │ +253 template │ │ │ │ +254 void __aux_require_boolean_expr(const _Tp& __t) { │ │ │ │ +255 bool __x _IsUnused = __t; │ │ │ │ +256 } │ │ │ │ +257 │ │ │ │ +258// FIXME │ │ │ │ +259 template │ │ │ │ +260 struct _EqualityComparableConcept │ │ │ │ +261 { │ │ │ │ +262 void __constraints() { │ │ │ │ +263 __aux_require_boolean_expr(__a == __b); │ │ │ │ +264 } │ │ │ │ +265 _Tp __a, __b; │ │ │ │ +266 }; │ │ │ │ +267 │ │ │ │ +268 template │ │ │ │ +269 struct _LessThanComparableConcept │ │ │ │ +270 { │ │ │ │ +271 void __constraints() { │ │ │ │ +272 __aux_require_boolean_expr(__a < __b); │ │ │ │ +273 } │ │ │ │ +274 _Tp __a, __b; │ │ │ │ +275 }; │ │ │ │ +276 │ │ │ │ +277 // This is equivalent to SGI STL's LessThanComparable. │ │ │ │ +278 template │ │ │ │ +279 struct _ComparableConcept │ │ │ │ +280 { │ │ │ │ +281 void __constraints() { │ │ │ │ +282 __aux_require_boolean_expr(__a < __b); │ │ │ │ +283 __aux_require_boolean_expr(__a > __b); │ │ │ │ +284 __aux_require_boolean_expr(__a <= __b); │ │ │ │ +285 __aux_require_boolean_expr(__a >= __b); │ │ │ │ +286 } │ │ │ │ +287 _Tp __a, __b; │ │ │ │ +288 }; │ │ │ │ +289 │ │ │ │ +290#define _GLIBCXX_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(_OP,_NAME) \ │ │ │ │ +291 template \ │ │ │ │ +292 struct _NAME { \ │ │ │ │ +293 void __constraints() { (void)__constraints_(); } \ │ │ │ │ +294 bool __constraints_() { \ │ │ │ │ +295 return __a _OP __b; \ │ │ │ │ +296 } \ │ │ │ │ +297 _First __a; \ │ │ │ │ +298 _Second __b; \ │ │ │ │ +299 } │ │ │ │ +300 │ │ │ │ +301#define _GLIBCXX_DEFINE_BINARY_OPERATOR_CONSTRAINT(_OP,_NAME) \ │ │ │ │ +302 template \ │ │ │ │ +303 struct _NAME { \ │ │ │ │ +304 void __constraints() { (void)__constraints_(); } \ │ │ │ │ +305 _Ret __constraints_() { \ │ │ │ │ +306 return __a _OP __b; \ │ │ │ │ +307 } \ │ │ │ │ +308 _First __a; \ │ │ │ │ +309 _Second __b; \ │ │ │ │ +310 } │ │ │ │ +311 │ │ │ │ +312 _GLIBCXX_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(==, _EqualOpConcept); │ │ │ │ +313 _GLIBCXX_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(!=, _NotEqualOpConcept); │ │ │ │ +314 _GLIBCXX_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(<, _LessThanOpConcept); │ │ │ │ +315 _GLIBCXX_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(<=, _LessEqualOpConcept); │ │ │ │ +316 _GLIBCXX_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(>, _GreaterThanOpConcept); │ │ │ │ +317 _GLIBCXX_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(>=, _GreaterEqualOpConcept); │ │ │ │ +318 │ │ │ │ +319 _GLIBCXX_DEFINE_BINARY_OPERATOR_CONSTRAINT(+, _PlusOpConcept); │ │ │ │ +320 _GLIBCXX_DEFINE_BINARY_OPERATOR_CONSTRAINT(*, _TimesOpConcept); │ │ │ │ +321 _GLIBCXX_DEFINE_BINARY_OPERATOR_CONSTRAINT(/, _DivideOpConcept); │ │ │ │ +322 _GLIBCXX_DEFINE_BINARY_OPERATOR_CONSTRAINT(-, _SubtractOpConcept); │ │ │ │ +323 _GLIBCXX_DEFINE_BINARY_OPERATOR_CONSTRAINT(%, _ModOpConcept); │ │ │ │ +324 │ │ │ │ +325#undef _GLIBCXX_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT │ │ │ │ +326#undef _GLIBCXX_DEFINE_BINARY_OPERATOR_CONSTRAINT │ │ │ │ +327 │ │ │ │ +328 // │ │ │ │ +=========================================================================== │ │ │ │ +329 // Function Object Concepts │ │ │ │ +330 │ │ │ │ +331 template │ │ │ │ +332 struct _GeneratorConcept │ │ │ │ +333 { │ │ │ │ +334 void __constraints() { │ │ │ │ +335 const _Return& __r _IsUnused = __f();// require operator() member function │ │ │ │ +336 } │ │ │ │ +337 _Func __f; │ │ │ │ +338 }; │ │ │ │ +339 │ │ │ │ +340 │ │ │ │ +341 template │ │ │ │ +342 struct _GeneratorConcept<_Func,void> │ │ │ │ +343 { │ │ │ │ +344 void __constraints() { │ │ │ │ +345 __f(); // require operator() member function │ │ │ │ +346 } │ │ │ │ +347 _Func __f; │ │ │ │ +348 }; │ │ │ │ +349 │ │ │ │ +350 template │ │ │ │ +351 struct _UnaryFunctionConcept │ │ │ │ +352 { │ │ │ │ +353 void __constraints() { │ │ │ │ +354 __r = __f(__arg); // require operator() │ │ │ │ +355 } │ │ │ │ +356 _Func __f; │ │ │ │ +357 _Arg __arg; │ │ │ │ +358 _Return __r; │ │ │ │ +359 }; │ │ │ │ +360 │ │ │ │ +361 template │ │ │ │ +362 struct _UnaryFunctionConcept<_Func, void, _Arg> { │ │ │ │ +363 void __constraints() { │ │ │ │ +364 __f(__arg); // require operator() │ │ │ │ +365 } │ │ │ │ +366 _Func __f; │ │ │ │ +367 _Arg __arg; │ │ │ │ +368 }; │ │ │ │ +369 │ │ │ │ +370 template │ │ │ │ +371 struct _BinaryFunctionConcept │ │ │ │ +372 { │ │ │ │ +373 void __constraints() { │ │ │ │ +374 __r = __f(__first, __second); // require operator() │ │ │ │ +375 } │ │ │ │ +376 _Func __f; │ │ │ │ +377 _First __first; │ │ │ │ +378 _Second __second; │ │ │ │ +379 _Return __r; │ │ │ │ +380 }; │ │ │ │ +381 │ │ │ │ +382 template │ │ │ │ +383 struct _BinaryFunctionConcept<_Func, void, _First, _Second> │ │ │ │ +384 { │ │ │ │ +385 void __constraints() { │ │ │ │ +386 __f(__first, __second); // require operator() │ │ │ │ +387 } │ │ │ │ +388 _Func __f; │ │ │ │ +389 _First __first; │ │ │ │ +390 _Second __second; │ │ │ │ +391 }; │ │ │ │ +392 │ │ │ │ +393 template │ │ │ │ +394 struct _UnaryPredicateConcept │ │ │ │ +395 { │ │ │ │ +396 void __constraints() { │ │ │ │ +397 __aux_require_boolean_expr(__f(__arg)); // require op() returning bool │ │ │ │ +398 } │ │ │ │ +399 _Func __f; │ │ │ │ +400 _Arg __arg; │ │ │ │ +401 }; │ │ │ │ +402 │ │ │ │ +403 template │ │ │ │ +404 struct _BinaryPredicateConcept │ │ │ │ +405 { │ │ │ │ +406 void __constraints() { │ │ │ │ +407 __aux_require_boolean_expr(__f(__a, __b)); // require op() returning bool │ │ │ │ +408 } │ │ │ │ +409 _Func __f; │ │ │ │ +410 _First __a; │ │ │ │ +411 _Second __b; │ │ │ │ +412 }; │ │ │ │ +413 │ │ │ │ +414 // use this when functor is used inside a container class like std::set │ │ │ │ +415 template │ │ │ │ +416 struct _Const_BinaryPredicateConcept { │ │ │ │ +417 void __constraints() { │ │ │ │ +418 __const_constraints(__f); │ │ │ │ +419 } │ │ │ │ +420 void __const_constraints(const _Func& __fun) { │ │ │ │ +421 __function_requires<_BinaryPredicateConcept<_Func, _First, _Second> >(); │ │ │ │ +422 // operator() must be a const member function │ │ │ │ +423 __aux_require_boolean_expr(__fun(__a, __b)); │ │ │ │ +424 } │ │ │ │ +425 _Func __f; │ │ │ │ +426 _First __a; │ │ │ │ +427 _Second __b; │ │ │ │ +428 }; │ │ │ │ +429 │ │ │ │ +430 // │ │ │ │ +=========================================================================== │ │ │ │ +431 // Iterator Concepts │ │ │ │ +432 │ │ │ │ +433 template │ │ │ │ +434 struct _TrivialIteratorConcept │ │ │ │ +435 { │ │ │ │ +436 void __constraints() { │ │ │ │ +437// __function_requires< _DefaultConstructibleConcept<_Tp> >(); │ │ │ │ +438 __function_requires< _AssignableConcept<_Tp> >(); │ │ │ │ +439 __function_requires< _EqualityComparableConcept<_Tp> >(); │ │ │ │ +440// typedef typename std::iterator_traits<_Tp>::value_type _V; │ │ │ │ +441 (void)*__i; // require dereference operator │ │ │ │ +442 } │ │ │ │ +443 _Tp __i; │ │ │ │ +444 }; │ │ │ │ +445 │ │ │ │ +446 template │ │ │ │ +447 struct _Mutable_TrivialIteratorConcept │ │ │ │ +448 { │ │ │ │ +449 void __constraints() { │ │ │ │ +450 __function_requires< _TrivialIteratorConcept<_Tp> >(); │ │ │ │ +451 *__i = *__j; // require dereference and assignment │ │ │ │ +452 } │ │ │ │ +453 _Tp __i, __j; │ │ │ │ +454 }; │ │ │ │ +455 │ │ │ │ +456 template │ │ │ │ +457 struct _InputIteratorConcept │ │ │ │ +458 { │ │ │ │ +459 void __constraints() { │ │ │ │ +460 __function_requires< _TrivialIteratorConcept<_Tp> >(); │ │ │ │ +461 // require iterator_traits typedef's │ │ │ │ +462 typedef typename _s_t_d_:_:_i_t_e_r_a_t_o_r___t_r_a_i_t_s_<___T_p_>_:_:_d_i_f_f_e_r_e_n_c_e___t_y_p_e _Diff; │ │ │ │ +463// __function_requires< _SignedIntegerConcept<_Diff> >(); │ │ │ │ +464 typedef typename _s_t_d_:_:_i_t_e_r_a_t_o_r___t_r_a_i_t_s_<___T_p_>_:_:_r_e_f_e_r_e_n_c_e _Ref; │ │ │ │ +465 typedef typename _s_t_d_:_:_i_t_e_r_a_t_o_r___t_r_a_i_t_s_<___T_p_>_:_:_p_o_i_n_t_e_r _Pt; │ │ │ │ +466 typedef typename _s_t_d_:_:_i_t_e_r_a_t_o_r___t_r_a_i_t_s_<___T_p_>_:_:_i_t_e_r_a_t_o_r___c_a_t_e_g_o_r_y _Cat; │ │ │ │ +467 __function_requires< _ConvertibleConcept< │ │ │ │ +468 typename _s_t_d_:_:_i_t_e_r_a_t_o_r___t_r_a_i_t_s_<___T_p_>_:_:_i_t_e_r_a_t_o_r___c_a_t_e_g_o_r_y, │ │ │ │ +469 _s_t_d_:_:_i_n_p_u_t___i_t_e_r_a_t_o_r___t_a_g> >(); │ │ │ │ +470 ++__i; // require preincrement operator │ │ │ │ +471 __i++; // require postincrement operator │ │ │ │ +472 } │ │ │ │ +473 _Tp __i; │ │ │ │ +474 }; │ │ │ │ +475 │ │ │ │ +476 template │ │ │ │ +477 struct _OutputIteratorConcept │ │ │ │ +478 { │ │ │ │ +479 void __constraints() { │ │ │ │ +480 __function_requires< _AssignableConcept<_Tp> >(); │ │ │ │ +481 ++__i; // require preincrement operator │ │ │ │ +482 __i++; // require postincrement operator │ │ │ │ +483 *__i++ = __val(); // require postincrement and assignment │ │ │ │ +484 } │ │ │ │ +485 _Tp __i; │ │ │ │ +486 // Use a function pointer here so no definition of the function needed. │ │ │ │ +487 // Just need something that returns a _ValueT (which might be a reference). │ │ │ │ +488 _ValueT (*__val)(); │ │ │ │ +489 }; │ │ │ │ +490 │ │ │ │ +491 template │ │ │ │ +492 struct _Is_vector_bool_iterator │ │ │ │ +493 { static const bool __value = false; }; │ │ │ │ +494 │ │ │ │ +495#ifdef _GLIBCXX_DEBUG │ │ │ │ +496 namespace _____c_o_n_t = ::std::_GLIBCXX_STD_C; │ │ │ │ +497#else │ │ │ │ +498 namespace _____c_o_n_t = ::std; │ │ │ │ +499#endif │ │ │ │ +500 │ │ │ │ +501 // Trait to identify vector::iterator │ │ │ │ +502 template <> │ │ │ │ +503 struct _Is_vector_bool_iterator<_____c_o_n_t::_Bit_iterator> │ │ │ │ +504 { static const bool __value = true; }; │ │ │ │ +505 │ │ │ │ +506 // And for vector::const_iterator. │ │ │ │ +507 template <> │ │ │ │ +508 struct _Is_vector_bool_iterator<_____c_o_n_t::_Bit_const_iterator> │ │ │ │ +509 { static const bool __value = true; }; │ │ │ │ +510 │ │ │ │ +511 // And for __gnu_debug::vector iterators too. │ │ │ │ +512 template │ │ │ │ +513 struct _Is_vector_bool_iterator<_____g_n_u___d_e_b_u_g::_Safe_iterator<_It, _Seq, │ │ │ │ +_Tag> > │ │ │ │ +514 : _Is_vector_bool_iterator<_It> { }; │ │ │ │ +515 │ │ │ │ +516 template ::__value> │ │ │ │ +517 struct _ForwardIteratorReferenceConcept │ │ │ │ +518 { │ │ │ │ +519 void __constraints() { │ │ │ │ +520#if __cplusplus >= 201103L │ │ │ │ +521 typedef typename _s_t_d_:_:_i_t_e_r_a_t_o_r___t_r_a_i_t_s_<___T_p_>_:_:_r_e_f_e_r_e_n_c_e _Ref; │ │ │ │ +522 static_assert(_s_t_d_:_:_i_s___r_e_f_e_r_e_n_c_e_<___R_e_f_>_:_:_v_a_l_u_e, │ │ │ │ +523 "reference type of a forward iterator must be a real reference"); │ │ │ │ +524#endif │ │ │ │ +525 } │ │ │ │ +526 }; │ │ │ │ +527 │ │ │ │ +528 template ::__value> │ │ │ │ +529 struct _Mutable_ForwardIteratorReferenceConcept │ │ │ │ +530 { │ │ │ │ +531 void __constraints() { │ │ │ │ +532 typedef typename _s_t_d_:_:_i_t_e_r_a_t_o_r___t_r_a_i_t_s_<___T_p_>_:_:_r_e_f_e_r_e_n_c_e _Ref; │ │ │ │ +533 typedef typename _s_t_d_:_:_i_t_e_r_a_t_o_r___t_r_a_i_t_s_<___T_p_>_:_:_v_a_l_u_e___t_y_p_e _Val; │ │ │ │ +534 __function_requires< _SameTypeConcept<_Ref, _Val&> >(); │ │ │ │ +535 } │ │ │ │ +536 }; │ │ │ │ +537 │ │ │ │ +538 // vector iterators are not real forward iterators, but we ignore │ │ │ │ +that. │ │ │ │ +539 template │ │ │ │ +540 struct _ForwardIteratorReferenceConcept<_Tp, true> │ │ │ │ +541 { │ │ │ │ +542 void __constraints() { } │ │ │ │ +543 }; │ │ │ │ +544 │ │ │ │ +545 // vector iterators are not real forward iterators, but we ignore │ │ │ │ +that. │ │ │ │ +546 template │ │ │ │ +547 struct _Mutable_ForwardIteratorReferenceConcept<_Tp, true> │ │ │ │ +548 { │ │ │ │ +549 void __constraints() { } │ │ │ │ +550 }; │ │ │ │ +551 │ │ │ │ +552#pragma GCC diagnostic push │ │ │ │ +553#pragma GCC diagnostic ignored "-Wunused-variable" │ │ │ │ +554 │ │ │ │ +555 template │ │ │ │ +556 struct _ForwardIteratorConcept │ │ │ │ +557 { │ │ │ │ +558 void __constraints() { │ │ │ │ +559 __function_requires< _InputIteratorConcept<_Tp> >(); │ │ │ │ +560 __function_requires< _DefaultConstructibleConcept<_Tp> >(); │ │ │ │ +561 __function_requires< _ConvertibleConcept< │ │ │ │ +562 typename _s_t_d_:_:_i_t_e_r_a_t_o_r___t_r_a_i_t_s_<___T_p_>_:_:_i_t_e_r_a_t_o_r___c_a_t_e_g_o_r_y, │ │ │ │ +563 _s_t_d_:_:_f_o_r_w_a_r_d___i_t_e_r_a_t_o_r___t_a_g> >(); │ │ │ │ +564 __function_requires< _ForwardIteratorReferenceConcept<_Tp> >(); │ │ │ │ +565 _Tp& __j = ++__i; │ │ │ │ +566 const _Tp& __k = __i++; │ │ │ │ +567 typedef typename _s_t_d_:_:_i_t_e_r_a_t_o_r___t_r_a_i_t_s_<___T_p_>_:_:_r_e_f_e_r_e_n_c_e _Ref; │ │ │ │ +568 _Ref __r = *__k; │ │ │ │ +569 _Ref __r2 = *__i++; │ │ │ │ +570 } │ │ │ │ +571 _Tp __i; │ │ │ │ +572 }; │ │ │ │ +573 │ │ │ │ +574 template │ │ │ │ +575 struct _Mutable_ForwardIteratorConcept │ │ │ │ +576 { │ │ │ │ +577 void __constraints() { │ │ │ │ +578 __function_requires< _ForwardIteratorConcept<_Tp> >(); │ │ │ │ +579 typedef typename _s_t_d_:_:_i_t_e_r_a_t_o_r___t_r_a_i_t_s_<___T_p_>_:_:_r_e_f_e_r_e_n_c_e _Ref; │ │ │ │ +580 typedef typename _s_t_d_:_:_i_t_e_r_a_t_o_r___t_r_a_i_t_s_<___T_p_>_:_:_v_a_l_u_e___t_y_p_e _Val; │ │ │ │ +581 __function_requires< _Mutable_ForwardIteratorReferenceConcept<_Tp> >(); │ │ │ │ +582 } │ │ │ │ +583 _Tp __i; │ │ │ │ +584 }; │ │ │ │ +585 │ │ │ │ +586 template │ │ │ │ +587 struct _BidirectionalIteratorConcept │ │ │ │ +588 { │ │ │ │ +589 void __constraints() { │ │ │ │ +590 __function_requires< _ForwardIteratorConcept<_Tp> >(); │ │ │ │ +591 __function_requires< _ConvertibleConcept< │ │ │ │ +592 typename _s_t_d_:_:_i_t_e_r_a_t_o_r___t_r_a_i_t_s_<___T_p_>_:_:_i_t_e_r_a_t_o_r___c_a_t_e_g_o_r_y, │ │ │ │ +593 _s_t_d_:_:_b_i_d_i_r_e_c_t_i_o_n_a_l___i_t_e_r_a_t_o_r___t_a_g> >(); │ │ │ │ +594 _Tp& __j = --__i; // require predecrement operator │ │ │ │ +595 const _Tp& __k = __i--; // require postdecrement operator │ │ │ │ +596 typedef typename _s_t_d_:_:_i_t_e_r_a_t_o_r___t_r_a_i_t_s_<___T_p_>_:_:_r_e_f_e_r_e_n_c_e _Ref; │ │ │ │ +597 _Ref __r = *__j--; │ │ │ │ +598 } │ │ │ │ +599 _Tp __i; │ │ │ │ +600 }; │ │ │ │ +601 │ │ │ │ +602 template │ │ │ │ +603 struct _Mutable_BidirectionalIteratorConcept │ │ │ │ +604 { │ │ │ │ +605 void __constraints() { │ │ │ │ +606 __function_requires< _BidirectionalIteratorConcept<_Tp> >(); │ │ │ │ +607 __function_requires< _Mutable_ForwardIteratorConcept<_Tp> >(); │ │ │ │ +608 } │ │ │ │ +609 _Tp __i; │ │ │ │ +610 }; │ │ │ │ +611 │ │ │ │ +612 │ │ │ │ +613 template │ │ │ │ +614 struct _RandomAccessIteratorConcept │ │ │ │ +615 { │ │ │ │ +616 void __constraints() { │ │ │ │ +617 __function_requires< _BidirectionalIteratorConcept<_Tp> >(); │ │ │ │ +618 __function_requires< _ComparableConcept<_Tp> >(); │ │ │ │ +619 __function_requires< _ConvertibleConcept< │ │ │ │ +620 typename _s_t_d_:_:_i_t_e_r_a_t_o_r___t_r_a_i_t_s_<___T_p_>_:_:_i_t_e_r_a_t_o_r___c_a_t_e_g_o_r_y, │ │ │ │ +621 _s_t_d_:_:_r_a_n_d_o_m___a_c_c_e_s_s___i_t_e_r_a_t_o_r___t_a_g> >(); │ │ │ │ +622 typedef typename _s_t_d_:_:_i_t_e_r_a_t_o_r___t_r_a_i_t_s_<___T_p_>_:_:_r_e_f_e_r_e_n_c_e _Ref; │ │ │ │ +623 │ │ │ │ +624 _Tp& __j = __i += __n; // require assignment addition operator │ │ │ │ +625 __i = __i + __n; __i = __n + __i; // require addition with difference type │ │ │ │ +626 _Tp& __k = __i -= __n; // require assignment subtraction op │ │ │ │ +627 __i = __i - __n; // require subtraction with │ │ │ │ +628 // difference type │ │ │ │ +629 __n = __i - __j; // require difference operator │ │ │ │ +630 _Ref __r = __i[__n]; // require element access operator │ │ │ │ +631 } │ │ │ │ +632 _Tp __a, __b; │ │ │ │ +633 _Tp __i, __j; │ │ │ │ +634 typename _s_t_d_:_:_i_t_e_r_a_t_o_r___t_r_a_i_t_s_<___T_p_>_:_:_d_i_f_f_e_r_e_n_c_e___t_y_p_e __n; │ │ │ │ +635 }; │ │ │ │ +636 │ │ │ │ +637 template │ │ │ │ +638 struct _Mutable_RandomAccessIteratorConcept │ │ │ │ +639 { │ │ │ │ +640 void __constraints() { │ │ │ │ +641 __function_requires< _RandomAccessIteratorConcept<_Tp> >(); │ │ │ │ +642 __function_requires< _Mutable_BidirectionalIteratorConcept<_Tp> >(); │ │ │ │ +643 } │ │ │ │ +644 _Tp __i; │ │ │ │ +645 typename _s_t_d_:_:_i_t_e_r_a_t_o_r___t_r_a_i_t_s_<___T_p_>_:_:_d_i_f_f_e_r_e_n_c_e___t_y_p_e __n; │ │ │ │ +646 }; │ │ │ │ +647 │ │ │ │ +648#pragma GCC diagnostic pop │ │ │ │ +649 │ │ │ │ +650 // │ │ │ │ +=========================================================================== │ │ │ │ +651 // Container Concepts │ │ │ │ +652 │ │ │ │ +653 template │ │ │ │ +654 struct _ContainerConcept │ │ │ │ +655 { │ │ │ │ +656 typedef typename _Container::value_type _Value_type; │ │ │ │ +657 typedef typename _Container::difference_type _Difference_type; │ │ │ │ +658 typedef typename _Container::size_type _Size_type; │ │ │ │ +659 typedef typename _Container::const_reference _Const_reference; │ │ │ │ +660 typedef typename _Container::const_pointer _Const_pointer; │ │ │ │ +661 typedef typename _Container::const_iterator _Const_iterator; │ │ │ │ +662 │ │ │ │ +663 void __constraints() { │ │ │ │ +664 __function_requires< _InputIteratorConcept<_Const_iterator> >(); │ │ │ │ +665 __function_requires< _AssignableConcept<_Container> >(); │ │ │ │ +666 const _Container __c; │ │ │ │ +667 __i = __c.begin(); │ │ │ │ +668 __i = __c.end(); │ │ │ │ +669 __n = __c.size(); │ │ │ │ +670 __n = __c.max_size(); │ │ │ │ +671 __b = __c.empty(); │ │ │ │ +672 } │ │ │ │ +673 bool __b; │ │ │ │ +674 _Const_iterator __i; │ │ │ │ +675 _Size_type __n; │ │ │ │ +676 }; │ │ │ │ +677 │ │ │ │ +678 template │ │ │ │ +679 struct _Mutable_ContainerConcept │ │ │ │ +680 { │ │ │ │ +681 typedef typename _Container::value_type _Value_type; │ │ │ │ +682 typedef typename _Container::reference _Reference; │ │ │ │ +683 typedef typename _Container::iterator _Iterator; │ │ │ │ +684 typedef typename _Container::pointer _Pointer; │ │ │ │ +685 │ │ │ │ +686 void __constraints() { │ │ │ │ +687 __function_requires< _ContainerConcept<_Container> >(); │ │ │ │ +688 __function_requires< _AssignableConcept<_Value_type> >(); │ │ │ │ +689 __function_requires< _InputIteratorConcept<_Iterator> >(); │ │ │ │ +690 │ │ │ │ +691 __i = __c.begin(); │ │ │ │ +692 __i = __c.end(); │ │ │ │ +693 __c.swap(__c2); │ │ │ │ +694 } │ │ │ │ +695 _Iterator __i; │ │ │ │ +696 _Container __c, __c2; │ │ │ │ +697 }; │ │ │ │ +698 │ │ │ │ +699 template │ │ │ │ +700 struct _ForwardContainerConcept │ │ │ │ +701 { │ │ │ │ +702 void __constraints() { │ │ │ │ +703 __function_requires< _ContainerConcept<_ForwardContainer> >(); │ │ │ │ +704 typedef typename _ForwardContainer::const_iterator _Const_iterator; │ │ │ │ +705 __function_requires< _ForwardIteratorConcept<_Const_iterator> >(); │ │ │ │ +706 } │ │ │ │ +707 }; │ │ │ │ +708 │ │ │ │ +709 template │ │ │ │ +710 struct _Mutable_ForwardContainerConcept │ │ │ │ +711 { │ │ │ │ +712 void __constraints() { │ │ │ │ +713 __function_requires< _ForwardContainerConcept<_ForwardContainer> >(); │ │ │ │ +714 __function_requires< _Mutable_ContainerConcept<_ForwardContainer> >(); │ │ │ │ +715 typedef typename _ForwardContainer::iterator _Iterator; │ │ │ │ +716 __function_requires< _Mutable_ForwardIteratorConcept<_Iterator> >(); │ │ │ │ +717 } │ │ │ │ +718 }; │ │ │ │ +719 │ │ │ │ +720 template │ │ │ │ +721 struct _ReversibleContainerConcept │ │ │ │ +722 { │ │ │ │ +723 typedef typename _ReversibleContainer::const_iterator _Const_iterator; │ │ │ │ +724 typedef typename _ReversibleContainer::const_reverse_iterator │ │ │ │ +725 _Const_reverse_iterator; │ │ │ │ +726 │ │ │ │ +727 void __constraints() { │ │ │ │ +728 __function_requires< _ForwardContainerConcept<_ReversibleContainer> >(); │ │ │ │ +729 __function_requires< _BidirectionalIteratorConcept<_Const_iterator> >(); │ │ │ │ +730 __function_requires< │ │ │ │ +731 _BidirectionalIteratorConcept<_Const_reverse_iterator> >(); │ │ │ │ +732 │ │ │ │ +733 const _ReversibleContainer __c; │ │ │ │ +734 _Const_reverse_iterator __i = __c.rbegin(); │ │ │ │ +735 __i = __c.rend(); │ │ │ │ +736 } │ │ │ │ +737 }; │ │ │ │ +738 │ │ │ │ +739 template │ │ │ │ +740 struct _Mutable_ReversibleContainerConcept │ │ │ │ +741 { │ │ │ │ +742 typedef typename _ReversibleContainer::iterator _Iterator; │ │ │ │ +743 typedef typename _ReversibleContainer::reverse_iterator _Reverse_iterator; │ │ │ │ +744 │ │ │ │ +745 void __constraints() { │ │ │ │ +746 __function_requires<_ReversibleContainerConcept<_ReversibleContainer> >(); │ │ │ │ +747 __function_requires< │ │ │ │ +748 _Mutable_ForwardContainerConcept<_ReversibleContainer> >(); │ │ │ │ +749 __function_requires<_Mutable_BidirectionalIteratorConcept<_Iterator> >(); │ │ │ │ +750 __function_requires< │ │ │ │ +751 _Mutable_BidirectionalIteratorConcept<_Reverse_iterator> >(); │ │ │ │ +752 │ │ │ │ +753 _Reverse_iterator __i = __c.rbegin(); │ │ │ │ +754 __i = __c.rend(); │ │ │ │ +755 } │ │ │ │ +756 _ReversibleContainer __c; │ │ │ │ +757 }; │ │ │ │ +758 │ │ │ │ +759 template │ │ │ │ +760 struct _RandomAccessContainerConcept │ │ │ │ +761 { │ │ │ │ +762 typedef typename _RandomAccessContainer::size_type _Size_type; │ │ │ │ +763 typedef typename _RandomAccessContainer::const_reference _Const_reference; │ │ │ │ +764 typedef typename _RandomAccessContainer::const_iterator _Const_iterator; │ │ │ │ +765 typedef typename _RandomAccessContainer::const_reverse_iterator │ │ │ │ +766 _Const_reverse_iterator; │ │ │ │ +767 │ │ │ │ +768 void __constraints() { │ │ │ │ +769 __function_requires< │ │ │ │ +770 _ReversibleContainerConcept<_RandomAccessContainer> >(); │ │ │ │ +771 __function_requires< _RandomAccessIteratorConcept<_Const_iterator> >(); │ │ │ │ +772 __function_requires< │ │ │ │ +773 _RandomAccessIteratorConcept<_Const_reverse_iterator> >(); │ │ │ │ +774 │ │ │ │ +775 const _RandomAccessContainer __c; │ │ │ │ +776 _Const_reference __r _IsUnused = __c[__n]; │ │ │ │ +777 } │ │ │ │ +778 _Size_type __n; │ │ │ │ +779 }; │ │ │ │ +780 │ │ │ │ +781 template │ │ │ │ +782 struct _Mutable_RandomAccessContainerConcept │ │ │ │ +783 { │ │ │ │ +784 typedef typename _RandomAccessContainer::size_type _Size_type; │ │ │ │ +785 typedef typename _RandomAccessContainer::reference _Reference; │ │ │ │ +786 typedef typename _RandomAccessContainer::iterator _Iterator; │ │ │ │ +787 typedef typename _RandomAccessContainer::reverse_iterator │ │ │ │ +_Reverse_iterator; │ │ │ │ +788 │ │ │ │ +789 void __constraints() { │ │ │ │ +790 __function_requires< │ │ │ │ +791 _RandomAccessContainerConcept<_RandomAccessContainer> >(); │ │ │ │ +792 __function_requires< │ │ │ │ +793 _Mutable_ReversibleContainerConcept<_RandomAccessContainer> >(); │ │ │ │ +794 __function_requires< _Mutable_RandomAccessIteratorConcept<_Iterator> >(); │ │ │ │ +795 __function_requires< │ │ │ │ +796 _Mutable_RandomAccessIteratorConcept<_Reverse_iterator> >(); │ │ │ │ +797 │ │ │ │ +798 _Reference __r _IsUnused = __c[__i]; │ │ │ │ +799 } │ │ │ │ +800 _Size_type __i; │ │ │ │ +801 _RandomAccessContainer __c; │ │ │ │ +802 }; │ │ │ │ +803 │ │ │ │ +804 // A Sequence is inherently mutable │ │ │ │ +805 template │ │ │ │ +806 struct _SequenceConcept │ │ │ │ +807 { │ │ │ │ +808 typedef typename _Sequence::reference _Reference; │ │ │ │ +809 typedef typename _Sequence::const_reference _Const_reference; │ │ │ │ +810 │ │ │ │ +811 void __constraints() { │ │ │ │ +812 // Matt Austern's book puts DefaultConstructible here, the C++ │ │ │ │ +813 // standard places it in Container │ │ │ │ +814 // function_requires< DefaultConstructible >(); │ │ │ │ +815 __function_requires< _Mutable_ForwardContainerConcept<_Sequence> >(); │ │ │ │ +816 __function_requires< _DefaultConstructibleConcept<_Sequence> >(); │ │ │ │ +817 │ │ │ │ +818 _Sequence │ │ │ │ +819 __c _IsUnused(__n, __t), │ │ │ │ +820 __c2 _IsUnused(__first, __last); │ │ │ │ +821 │ │ │ │ +822 __c.insert(__p, __t); │ │ │ │ +823 __c.insert(__p, __n, __t); │ │ │ │ +824 __c.insert(__p, __first, __last); │ │ │ │ +825 │ │ │ │ +826 __c.erase(__p); │ │ │ │ +827 __c.erase(__p, __q); │ │ │ │ +828 │ │ │ │ +829 _Reference __r _IsUnused = __c.front(); │ │ │ │ +830 │ │ │ │ +831 __const_constraints(__c); │ │ │ │ +832 } │ │ │ │ +833 void __const_constraints(const _Sequence& __c) { │ │ │ │ +834 _Const_reference __r _IsUnused = __c.front(); │ │ │ │ +835 } │ │ │ │ +836 typename _Sequence::value_type __t; │ │ │ │ +837 typename _Sequence::size_type __n; │ │ │ │ +838 typename _Sequence::value_type *__first, *__last; │ │ │ │ +839 typename _Sequence::iterator __p, __q; │ │ │ │ +840 }; │ │ │ │ +841 │ │ │ │ +842 template │ │ │ │ +843 struct _FrontInsertionSequenceConcept │ │ │ │ +844 { │ │ │ │ +845 void __constraints() { │ │ │ │ +846 __function_requires< _SequenceConcept<_FrontInsertionSequence> >(); │ │ │ │ +847 │ │ │ │ +848 __c.push_front(__t); │ │ │ │ +849 __c.pop_front(); │ │ │ │ +850 } │ │ │ │ +851 _FrontInsertionSequence __c; │ │ │ │ +852 typename _FrontInsertionSequence::value_type __t; │ │ │ │ +853 }; │ │ │ │ +854 │ │ │ │ +855 template │ │ │ │ +856 struct _BackInsertionSequenceConcept │ │ │ │ +857 { │ │ │ │ +858 typedef typename _BackInsertionSequence::reference _Reference; │ │ │ │ +859 typedef typename _BackInsertionSequence::const_reference _Const_reference; │ │ │ │ +860 │ │ │ │ +861 void __constraints() { │ │ │ │ +862 __function_requires< _SequenceConcept<_BackInsertionSequence> >(); │ │ │ │ +863 │ │ │ │ +864 __c.push_back(__t); │ │ │ │ +865 __c.pop_back(); │ │ │ │ +866 _Reference __r _IsUnused = __c.back(); │ │ │ │ +867 } │ │ │ │ +868 void __const_constraints(const _BackInsertionSequence& __c) { │ │ │ │ +869 _Const_reference __r _IsUnused = __c.back(); │ │ │ │ +870 }; │ │ │ │ +871 _BackInsertionSequence __c; │ │ │ │ +872 typename _BackInsertionSequence::value_type __t; │ │ │ │ +873 }; │ │ │ │ +874 │ │ │ │ +875_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ +876} // namespace │ │ │ │ +877 │ │ │ │ +878#pragma GCC diagnostic pop │ │ │ │ +879#undef _IsUnused │ │ │ │ +880 │ │ │ │ +881#endif // _GLIBCXX_BOOST_CONCEPT_CHECK │ │ │ │ +882 │ │ │ │ +883 │ │ │ │ +_s_t_l___i_t_e_r_a_t_o_r___b_a_s_e___t_y_p_e_s_._h │ │ │ │ +_c_+_+_c_o_n_f_i_g_._h │ │ │ │ +_s_t_d │ │ │ │ +ISO C++ entities toplevel namespace is std. │ │ │ │ +_____g_n_u___c_x_x │ │ │ │ +GNU extensions for public use. │ │ │ │ +_____g_n_u___d_e_b_u_g │ │ │ │ +GNU debug classes for public use. │ │ │ │ +DDeeffiinniittiioonn _b_o_o_s_t___c_o_n_c_e_p_t___c_h_e_c_k_._h_:_5_8 │ │ │ │ +_s_t_d_:_:_i_s___r_e_f_e_r_e_n_c_e │ │ │ │ +is_reference │ │ │ │ +DDeeffiinniittiioonn _t_y_p_e___t_r_a_i_t_s_:_5_8_1 │ │ │ │ +_____g_n_u___d_e_b_u_g_:_:___S_a_f_e___i_t_e_r_a_t_o_r │ │ │ │ +Safe iterator wrapper. │ │ │ │ +DDeeffiinniittiioonn _s_a_f_e___i_t_e_r_a_t_o_r_._h_:_1_1_7 │ │ │ │ +_s_t_d_:_:_i_t_e_r_a_t_o_r___t_r_a_i_t_s │ │ │ │ +Traits class for iterators. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___i_t_e_r_a_t_o_r___b_a_s_e___t_y_p_e_s_._h_:_1_7_8 │ │ │ │ +_s_t_d_:_:_i_n_p_u_t___i_t_e_r_a_t_o_r___t_a_g │ │ │ │ +Marking input iterators. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___i_t_e_r_a_t_o_r___b_a_s_e___t_y_p_e_s_._h_:_9_3 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___i_t_e_r_a_t_o_r___t_a_g │ │ │ │ +Forward iterators support a superset of input iterator operations. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___i_t_e_r_a_t_o_r___b_a_s_e___t_y_p_e_s_._h_:_9_9 │ │ │ │ +_s_t_d_:_:_b_i_d_i_r_e_c_t_i_o_n_a_l___i_t_e_r_a_t_o_r___t_a_g │ │ │ │ +Bidirectional iterators support a superset of forward iterator operations. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___i_t_e_r_a_t_o_r___b_a_s_e___t_y_p_e_s_._h_:_1_0_3 │ │ │ │ +_s_t_d_:_:_r_a_n_d_o_m___a_c_c_e_s_s___i_t_e_r_a_t_o_r___t_a_g │ │ │ │ +Random-access iterators support a superset of bidirectional iterator │ │ │ │ +operations. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___i_t_e_r_a_t_o_r___b_a_s_e___t_y_p_e_s_._h_:_1_0_7 │ │ │ │ * _b_i_t_s │ │ │ │ - * _c_x_x_a_b_i___f_o_r_c_e_d_._h │ │ │ │ + * _b_o_o_s_t___c_o_n_c_e_p_t___c_h_e_c_k_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-12-base/libstdc++/user/a00347.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: atomic_lockfree_defines.h File Reference │ │ │ +libstdc++: valarray_array.tcc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -46,52 +46,94 @@ │ │ │ /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */ │ │ │ $(document).ready(function(){initNavTree('a00347.html',''); initResizable(); }); │ │ │ /* @license-end */ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -Macros
│ │ │ -
atomic_lockfree_defines.h File Reference
│ │ │ +Namespaces | │ │ │ +Macros | │ │ │ +Functions
│ │ │ +
valarray_array.tcc File Reference
│ │ │
│ │ │
│ │ │ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ + │ │ │ + │ │ │ + │ │ │ +

│ │ │ +Namespaces

namespace  std
 
│ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ +

│ │ │ Macros

#define ATOMIC_BOOL_LOCK_FREE
 
#define ATOMIC_CHAR16_T_LOCK_FREE
 
#define ATOMIC_CHAR32_T_LOCK_FREE
 
#define ATOMIC_CHAR_LOCK_FREE
 
#define ATOMIC_INT_LOCK_FREE
 
#define ATOMIC_LLONG_LOCK_FREE
 
#define ATOMIC_LONG_LOCK_FREE
 
#define ATOMIC_POINTER_LOCK_FREE
 
#define ATOMIC_SHORT_LOCK_FREE
 
#define ATOMIC_WCHAR_T_LOCK_FREE
 
#define _VALARRAY_ARRAY_TCC
 
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ +Functions

template<typename _Tp >
void std::__valarray_copy (_Array< _Tp > __a, _Array< bool > __m, _Array< _Tp > __b, size_t __n)
 
template<typename _Tp >
void std::__valarray_copy (_Array< _Tp > __a, _Array< bool > __m, size_t __n, _Array< _Tp > __b, _Array< bool > __k)
 
template<typename _Tp >
void std::__valarray_copy (_Array< _Tp > __a, size_t __n, _Array< _Tp > __b, _Array< bool > __m)
 
template<typename _Tp >
void std::__valarray_copy (_Array< _Tp > __e, _Array< size_t > __f, size_t __n, _Array< _Tp > __a, _Array< size_t > __i)
 
template<typename _Tp , class _Dom >
void std::__valarray_copy (const _Expr< _Dom, _Tp > &__e, size_t __n, _Array< _Tp > __a)
 
template<typename _Tp , class _Dom >
void std::__valarray_copy (const _Expr< _Dom, _Tp > &__e, size_t __n, _Array< _Tp > __a, _Array< bool > __m)
 
template<typename _Tp , class _Dom >
void std::__valarray_copy (const _Expr< _Dom, _Tp > &__e, size_t __n, _Array< _Tp > __a, _Array< size_t > __i)
 
template<typename _Tp , class _Dom >
void std::__valarray_copy (const _Expr< _Dom, _Tp > &__e, size_t __n, _Array< _Tp > __a, size_t __s)
 
template<typename _Tp >
void std::__valarray_copy_construct (_Array< _Tp > __a, _Array< bool > __m, _Array< _Tp > __b, size_t __n)
 
template<typename _Tp , class _Dom >
void std::__valarray_copy_construct (const _Expr< _Dom, _Tp > &__e, size_t __n, _Array< _Tp > __a)
 
template<typename _Tp >
void std::__valarray_fill (_Array< _Tp > __a, size_t __n, _Array< bool > __m, const _Tp &__t)
 
│ │ │

Detailed Description

│ │ │ -

This is an internal header file, included by other library headers. Do not attempt to use it directly. Instead, include <atomic>.

│ │ │ +

This is an internal header file, included by other library headers. Do not attempt to use it directly. Instead, include <valarray>.

│ │ │ │ │ │ -

Definition in file atomic_lockfree_defines.h.

│ │ │ -
│ │ │ +

Definition in file valarray_array.tcc.

│ │ │ +

Macro Definition Documentation

│ │ │ + │ │ │ +

◆ _VALARRAY_ARRAY_TCC

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
#define _VALARRAY_ARRAY_TCC
│ │ │ +
│ │ │ + │ │ │ +

Definition at line 33 of file valarray_array.tcc.

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ +
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,32 +1,66 @@ │ │ │ │ libstdc++ │ │ │ │ -_M_a_c_r_o_s │ │ │ │ -atomic_lockfree_defines.h File Reference │ │ │ │ +_N_a_m_e_s_p_a_c_e_s | _M_a_c_r_o_s | _F_u_n_c_t_i_o_n_s │ │ │ │ +valarray_array.tcc File Reference │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -MMaaccrrooss │ │ │ │ -#define  _A_T_O_M_I_C___B_O_O_L___L_O_C_K___F_R_E_E │ │ │ │ -  │ │ │ │ -#define  _A_T_O_M_I_C___C_H_A_R_1_6___T___L_O_C_K___F_R_E_E │ │ │ │ -  │ │ │ │ -#define  _A_T_O_M_I_C___C_H_A_R_3_2___T___L_O_C_K___F_R_E_E │ │ │ │ -  │ │ │ │ -#define  _A_T_O_M_I_C___C_H_A_R___L_O_C_K___F_R_E_E │ │ │ │ -  │ │ │ │ -#define  _A_T_O_M_I_C___I_N_T___L_O_C_K___F_R_E_E │ │ │ │ +NNaammeessppaacceess │ │ │ │ +namespace   _s_t_d │ │ │ │   │ │ │ │ -#define  _A_T_O_M_I_C___L_L_O_N_G___L_O_C_K___F_R_E_E │ │ │ │ -  │ │ │ │ -#define  _A_T_O_M_I_C___L_O_N_G___L_O_C_K___F_R_E_E │ │ │ │ -  │ │ │ │ -#define  _A_T_O_M_I_C___P_O_I_N_T_E_R___L_O_C_K___F_R_E_E │ │ │ │ -  │ │ │ │ -#define  _A_T_O_M_I_C___S_H_O_R_T___L_O_C_K___F_R_E_E │ │ │ │ +MMaaccrrooss │ │ │ │ +#define  ___V_A_L_A_R_R_A_Y___A_R_R_A_Y___T_C_C │ │ │ │   │ │ │ │ -#define  _A_T_O_M_I_C___W_C_H_A_R___T___L_O_C_K___F_R_E_E │ │ │ │ +FFuunnccttiioonnss │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ +_v_o_i_d  _s_t_d_:_:_____v_a_l_a_r_r_a_y___c_o_p_y (_Array< _Tp > __a, _Array< bool > _____m, _Array< _Tp │ │ │ │ + > __b, size_t __n) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ +_v_o_i_d  _s_t_d_:_:_____v_a_l_a_r_r_a_y___c_o_p_y (_Array< _Tp > __a, _Array< bool > _____m, size_t __n, │ │ │ │ + _Array< _Tp > __b, _Array< bool > _____k) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ +_v_o_i_d  _s_t_d_:_:_____v_a_l_a_r_r_a_y___c_o_p_y (_Array< _Tp > __a, size_t __n, _Array< _Tp > __b, │ │ │ │ + _Array< bool > _____m) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ +_v_o_i_d  _s_t_d_:_:_____v_a_l_a_r_r_a_y___c_o_p_y (_Array< _Tp > __e, _Array< size_t > __f, size_t │ │ │ │ + __n, _Array< _Tp > __a, _Array< size_t > __i) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _c_l_a_s_s ___D_o_m > │ │ │ │ +_v_o_i_d  _s_t_d_:_:_____v_a_l_a_r_r_a_y___c_o_p_y (const _Expr< ___D_o_m, _Tp > &__e, size_t __n, _Array< │ │ │ │ + _Tp > __a) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _c_l_a_s_s ___D_o_m > │ │ │ │ +_v_o_i_d  _s_t_d_:_:_____v_a_l_a_r_r_a_y___c_o_p_y (const _Expr< ___D_o_m, _Tp > &__e, size_t __n, _Array< │ │ │ │ + _Tp > __a, _Array< bool > _____m) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _c_l_a_s_s ___D_o_m > │ │ │ │ +_v_o_i_d  _s_t_d_:_:_____v_a_l_a_r_r_a_y___c_o_p_y (const _Expr< ___D_o_m, _Tp > &__e, size_t __n, _Array< │ │ │ │ + _Tp > __a, _Array< size_t > __i) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _c_l_a_s_s ___D_o_m > │ │ │ │ +_v_o_i_d  _s_t_d_:_:_____v_a_l_a_r_r_a_y___c_o_p_y (const _Expr< ___D_o_m, _Tp > &__e, size_t __n, _Array< │ │ │ │ + _Tp > __a, size_t _____s) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ +_v_o_i_d  _s_t_d_:_:_____v_a_l_a_r_r_a_y___c_o_p_y___c_o_n_s_t_r_u_c_t (_Array< _Tp > __a, _Array< bool > _____m, │ │ │ │ + _Array< _Tp > __b, size_t __n) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _c_l_a_s_s ___D_o_m > │ │ │ │ +_v_o_i_d  _s_t_d_:_:_____v_a_l_a_r_r_a_y___c_o_p_y___c_o_n_s_t_r_u_c_t (const _Expr< ___D_o_m, _Tp > &__e, size_t │ │ │ │ + __n, _Array< _Tp > __a) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ +_v_o_i_d  _s_t_d_:_:_____v_a_l_a_r_r_a_y___f_i_l_l (_Array< _Tp > __a, size_t __n, _Array< bool > _____m, │ │ │ │ + const _Tp &__t) │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ This is an internal header file, included by other library headers. Do not │ │ │ │ -attempt to use it directly. Instead, include . │ │ │ │ -Definition in file _a_t_o_m_i_c___l_o_c_k_f_r_e_e___d_e_f_i_n_e_s_._h. │ │ │ │ +attempt to use it directly. Instead, include . │ │ │ │ +Definition in file _v_a_l_a_r_r_a_y___a_r_r_a_y_._t_c_c. │ │ │ │ +********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ +********** _?◆_? __VVAALLAARRRRAAYY__AARRRRAAYY__TTCCCC ********** │ │ │ │ +#define _VALARRAY_ARRAY_TCC │ │ │ │ +Definition at line _3_3 of file _v_a_l_a_r_r_a_y___a_r_r_a_y_._t_c_c. │ │ │ │ * _b_i_t_s │ │ │ │ - * _a_t_o_m_i_c___l_o_c_k_f_r_e_e___d_e_f_i_n_e_s_._h │ │ │ │ + * _v_a_l_a_r_r_a_y___a_r_r_a_y_._t_c_c │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-12-base/libstdc++/user/a00347_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: atomic_lockfree_defines.h Source File │ │ │ +libstdc++: valarray_array.tcc Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -45,20 +45,20 @@ │ │ │ │ │ │
│ │ │
│ │ │ -
atomic_lockfree_defines.h
│ │ │ +
valarray_array.tcc
│ │ │
│ │ │
│ │ │ -Go to the documentation of this file.
1// -*- C++ -*- header.
│ │ │ +Go to the documentation of this file.
1// The template and inlines for the -*- C++ -*- internal _Array helper class.
│ │ │
2
│ │ │ -
3// Copyright (C) 2008-2022 Free Software Foundation, Inc.
│ │ │ +
3// Copyright (C) 1997-2022 Free Software Foundation, Inc.
│ │ │
4//
│ │ │
5// This file is part of the GNU ISO C++ Library. This library is free
│ │ │
6// software; you can redistribute it and/or modify it under the
│ │ │
7// terms of the GNU General Public License as published by the
│ │ │
8// Free Software Foundation; either version 3, or (at your option)
│ │ │
9// any later version.
│ │ │
10
│ │ │ @@ -72,60 +72,239 @@ │ │ │
18// 3.1, as published by the Free Software Foundation.
│ │ │
19
│ │ │
20// You should have received a copy of the GNU General Public License and
│ │ │
21// a copy of the GCC Runtime Library Exception along with this program;
│ │ │
22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
│ │ │
23// <http://www.gnu.org/licenses/>.
│ │ │
24
│ │ │ -
25/** @file bits/atomic_lockfree_defines.h
│ │ │ +
25/** @file bits/valarray_array.tcc
│ │ │
26 * This is an internal header file, included by other library headers.
│ │ │ -
27 * Do not attempt to use it directly. @headername{atomic}
│ │ │ +
27 * Do not attempt to use it directly. @headername{valarray}
│ │ │
28 */
│ │ │
29
│ │ │ -
30#ifndef _GLIBCXX_ATOMIC_LOCK_FREE_H
│ │ │ -
31#define _GLIBCXX_ATOMIC_LOCK_FREE_H 1
│ │ │ -
32
│ │ │ -
33#pragma GCC system_header
│ │ │ -
34
│ │ │ -
35/**
│ │ │ -
36 * @addtogroup atomics
│ │ │ -
37 * @{
│ │ │ -
38 */
│ │ │ -
39
│ │ │ -
40/**
│ │ │ -
41 * Lock-free property.
│ │ │ -
42 *
│ │ │ -
43 * 0 indicates that the types are never lock-free.
│ │ │ -
44 * 1 indicates that the types are sometimes lock-free.
│ │ │ -
45 * 2 indicates that the types are always lock-free.
│ │ │ -
46 */
│ │ │ -
47
│ │ │ -
48#if __cplusplus >= 201103L
│ │ │ -
49#define ATOMIC_BOOL_LOCK_FREE __GCC_ATOMIC_BOOL_LOCK_FREE
│ │ │ -
50#define ATOMIC_CHAR_LOCK_FREE __GCC_ATOMIC_CHAR_LOCK_FREE
│ │ │ -
51#define ATOMIC_WCHAR_T_LOCK_FREE __GCC_ATOMIC_WCHAR_T_LOCK_FREE
│ │ │ -
52#ifdef _GLIBCXX_USE_CHAR8_T
│ │ │ -
53#define ATOMIC_CHAR8_T_LOCK_FREE __GCC_ATOMIC_CHAR8_T_LOCK_FREE
│ │ │ -
54#endif
│ │ │ -
55#define ATOMIC_CHAR16_T_LOCK_FREE __GCC_ATOMIC_CHAR16_T_LOCK_FREE
│ │ │ -
56#define ATOMIC_CHAR32_T_LOCK_FREE __GCC_ATOMIC_CHAR32_T_LOCK_FREE
│ │ │ -
57#define ATOMIC_SHORT_LOCK_FREE __GCC_ATOMIC_SHORT_LOCK_FREE
│ │ │ -
58#define ATOMIC_INT_LOCK_FREE __GCC_ATOMIC_INT_LOCK_FREE
│ │ │ -
59#define ATOMIC_LONG_LOCK_FREE __GCC_ATOMIC_LONG_LOCK_FREE
│ │ │ -
60#define ATOMIC_LLONG_LOCK_FREE __GCC_ATOMIC_LLONG_LOCK_FREE
│ │ │ -
61#define ATOMIC_POINTER_LOCK_FREE __GCC_ATOMIC_POINTER_LOCK_FREE
│ │ │ -
62#endif
│ │ │ -
63
│ │ │ -
64/// @} group atomics
│ │ │ -
65
│ │ │ -
66#endif
│ │ │ +
30// Written by Gabriel Dos Reis <Gabriel.Dos-Reis@DPTMaths.ENS-Cachan.Fr>
│ │ │ +
31
│ │ │ +
32#ifndef _VALARRAY_ARRAY_TCC
│ │ │ +
33#define _VALARRAY_ARRAY_TCC 1
│ │ │ +
34
│ │ │ +
35namespace std _GLIBCXX_VISIBILITY(default)
│ │ │ +
36{
│ │ │ +
37_GLIBCXX_BEGIN_NAMESPACE_VERSION
│ │ │ +
38
│ │ │ +
39 template<typename _Tp>
│ │ │ +
40 void
│ │ │ +
41 __valarray_fill(_Array<_Tp> __a, size_t __n, _Array<bool> __m,
│ │ │ +
42 const _Tp& __t)
│ │ │ +
43 {
│ │ │ +
44 _Tp* __p = __a._M_data;
│ │ │ +
45 bool* __ok (__m._M_data);
│ │ │ +
46 for (size_t __i=0; __i < __n; ++__i, ++__ok, ++__p)
│ │ │ +
47 {
│ │ │ +
48 while (!*__ok)
│ │ │ +
49 {
│ │ │ +
50 ++__ok;
│ │ │ +
51 ++__p;
│ │ │ +
52 }
│ │ │ +
53 *__p = __t;
│ │ │ +
54 }
│ │ │ +
55 }
│ │ │ +
56
│ │ │ +
57 // Copy n elements of a into consecutive elements of b. When m is
│ │ │ +
58 // false, the corresponding element of a is skipped. m must contain
│ │ │ +
59 // at least n true elements. a must contain at least n elements and
│ │ │ +
60 // enough elements to match up with m through the nth true element
│ │ │ +
61 // of m. I.e. if n is 10, m has 15 elements with 5 false followed
│ │ │ +
62 // by 10 true, a must have 15 elements.
│ │ │ +
63 template<typename _Tp>
│ │ │ +
64 void
│ │ │ +
65 __valarray_copy(_Array<_Tp> __a, _Array<bool> __m, _Array<_Tp> __b,
│ │ │ +
66 size_t __n)
│ │ │ +
67 {
│ │ │ +
68 _Tp* __p (__a._M_data);
│ │ │ +
69 bool* __ok (__m._M_data);
│ │ │ +
70 for (_Tp* __q = __b._M_data; __q < __b._M_data + __n;
│ │ │ +
71 ++__q, ++__ok, ++__p)
│ │ │ +
72 {
│ │ │ +
73 while (! *__ok)
│ │ │ +
74 {
│ │ │ +
75 ++__ok;
│ │ │ +
76 ++__p;
│ │ │ +
77 }
│ │ │ +
78 *__q = *__p;
│ │ │ +
79 }
│ │ │ +
80 }
│ │ │ +
81
│ │ │ +
82 // Copy n consecutive elements from a into elements of b. Elements
│ │ │ +
83 // of b are skipped if the corresponding element of m is false. m
│ │ │ +
84 // must contain at least n true elements. b must have at least as
│ │ │ +
85 // many elements as the index of the nth true element of m. I.e. if
│ │ │ +
86 // m has 15 elements with 5 false followed by 10 true, b must have
│ │ │ +
87 // at least 15 elements.
│ │ │ +
88 template<typename _Tp>
│ │ │ +
89 void
│ │ │ +
90 __valarray_copy(_Array<_Tp> __a, size_t __n, _Array<_Tp> __b,
│ │ │ +
91 _Array<bool> __m)
│ │ │ +
92 {
│ │ │ +
93 _Tp* __q (__b._M_data);
│ │ │ +
94 bool* __ok (__m._M_data);
│ │ │ +
95 for (_Tp* __p = __a._M_data; __p < __a._M_data+__n;
│ │ │ +
96 ++__p, ++__ok, ++__q)
│ │ │ +
97 {
│ │ │ +
98 while (! *__ok)
│ │ │ +
99 {
│ │ │ +
100 ++__ok;
│ │ │ +
101 ++__q;
│ │ │ +
102 }
│ │ │ +
103 *__q = *__p;
│ │ │ +
104 }
│ │ │ +
105 }
│ │ │ +
106
│ │ │ +
107 // Copy n elements from a into elements of b. Elements of a are
│ │ │ +
108 // skipped if the corresponding element of m is false. Elements of
│ │ │ +
109 // b are skipped if the corresponding element of k is false. m and
│ │ │ +
110 // k must contain at least n true elements. a and b must have at
│ │ │ +
111 // least as many elements as the index of the nth true element of m.
│ │ │ +
112 template<typename _Tp>
│ │ │ +
113 void
│ │ │ +
114 __valarray_copy(_Array<_Tp> __a, _Array<bool> __m, size_t __n,
│ │ │ +
115 _Array<_Tp> __b, _Array<bool> __k)
│ │ │ +
116 {
│ │ │ +
117 _Tp* __p (__a._M_data);
│ │ │ +
118 _Tp* __q (__b._M_data);
│ │ │ +
119 bool* __srcok (__m._M_data);
│ │ │ +
120 bool* __dstok (__k._M_data);
│ │ │ +
121 for (size_t __i = 0; __i < __n;
│ │ │ +
122 ++__srcok, ++__p, ++__dstok, ++__q, ++__i)
│ │ │ +
123 {
│ │ │ +
124 while (! *__srcok)
│ │ │ +
125 {
│ │ │ +
126 ++__srcok;
│ │ │ +
127 ++__p;
│ │ │ +
128 }
│ │ │ +
129 while (! *__dstok)
│ │ │ +
130 {
│ │ │ +
131 ++__dstok;
│ │ │ +
132 ++__q;
│ │ │ +
133 }
│ │ │ +
134 *__q = *__p;
│ │ │ +
135 }
│ │ │ +
136 }
│ │ │ +
137
│ │ │ +
138 // Copy n consecutive elements of e into consecutive elements of a.
│ │ │ +
139 // I.e. a[i] = e[i].
│ │ │ +
140 template<typename _Tp, class _Dom>
│ │ │ +
141 void
│ │ │ +
142 __valarray_copy(const _Expr<_Dom, _Tp>& __e, size_t __n, _Array<_Tp> __a)
│ │ │ +
143 {
│ │ │ +
144 _Tp* __p (__a._M_data);
│ │ │ +
145 for (size_t __i = 0; __i < __n; ++__i, ++__p)
│ │ │ +
146 *__p = __e[__i];
│ │ │ +
147 }
│ │ │ +
148
│ │ │ +
149 // Copy n consecutive elements of e into elements of a using stride
│ │ │ +
150 // s. I.e., a[0] = e[0], a[s] = e[1], a[2*s] = e[2].
│ │ │ +
151 template<typename _Tp, class _Dom>
│ │ │ +
152 void
│ │ │ +
153 __valarray_copy(const _Expr<_Dom, _Tp>& __e, size_t __n,
│ │ │ +
154 _Array<_Tp> __a, size_t __s)
│ │ │ +
155 {
│ │ │ +
156 _Tp* __p (__a._M_data);
│ │ │ +
157 for (size_t __i = 0; __i < __n; ++__i, __p += __s)
│ │ │ +
158 *__p = __e[__i];
│ │ │ +
159 }
│ │ │ +
160
│ │ │ +
161 // Copy n consecutive elements of e into elements of a indexed by
│ │ │ +
162 // contents of i. I.e., a[i[0]] = e[0].
│ │ │ +
163 template<typename _Tp, class _Dom>
│ │ │ +
164 void
│ │ │ +
165 __valarray_copy(const _Expr<_Dom, _Tp>& __e, size_t __n,
│ │ │ +
166 _Array<_Tp> __a, _Array<size_t> __i)
│ │ │ +
167 {
│ │ │ +
168 size_t* __j (__i._M_data);
│ │ │ +
169 for (size_t __k = 0; __k < __n; ++__k, ++__j)
│ │ │ +
170 __a._M_data[*__j] = __e[__k];
│ │ │ +
171 }
│ │ │ +
172
│ │ │ +
173 // Copy n elements of e indexed by contents of f into elements of a
│ │ │ +
174 // indexed by contents of i. I.e., a[i[0]] = e[f[0]].
│ │ │ +
175 template<typename _Tp>
│ │ │ +
176 void
│ │ │ +
177 __valarray_copy(_Array<_Tp> __e, _Array<size_t> __f,
│ │ │ +
178 size_t __n,
│ │ │ +
179 _Array<_Tp> __a, _Array<size_t> __i)
│ │ │ +
180 {
│ │ │ +
181 size_t* __g (__f._M_data);
│ │ │ +
182 size_t* __j (__i._M_data);
│ │ │ +
183 for (size_t __k = 0; __k < __n; ++__k, ++__j, ++__g)
│ │ │ +
184 __a._M_data[*__j] = __e._M_data[*__g];
│ │ │ +
185 }
│ │ │ +
186
│ │ │ +
187 // Copy n consecutive elements of e into elements of a. Elements of
│ │ │ +
188 // a are skipped if the corresponding element of m is false. m must
│ │ │ +
189 // have at least n true elements and a must have at least as many
│ │ │ +
190 // elements as the index of the nth true element of m. I.e. if m
│ │ │ +
191 // has 5 false followed by 10 true elements and n == 10, a must have
│ │ │ +
192 // at least 15 elements.
│ │ │ +
193 template<typename _Tp, class _Dom>
│ │ │ +
194 void
│ │ │ +
195 __valarray_copy(const _Expr<_Dom, _Tp>& __e, size_t __n,
│ │ │ +
196 _Array<_Tp> __a, _Array<bool> __m)
│ │ │ +
197 {
│ │ │ +
198 bool* __ok (__m._M_data);
│ │ │ +
199 _Tp* __p (__a._M_data);
│ │ │ +
200 for (size_t __i = 0; __i < __n; ++__i, ++__ok, ++__p)
│ │ │ +
201 {
│ │ │ +
202 while (! *__ok)
│ │ │ +
203 {
│ │ │ +
204 ++__ok;
│ │ │ +
205 ++__p;
│ │ │ +
206 }
│ │ │ +
207 *__p = __e[__i];
│ │ │ +
208 }
│ │ │ +
209 }
│ │ │ +
210
│ │ │ +
211
│ │ │ +
212 template<typename _Tp, class _Dom>
│ │ │ +
213 void
│ │ │ +
214 __valarray_copy_construct(const _Expr<_Dom, _Tp>& __e, size_t __n,
│ │ │ +
215 _Array<_Tp> __a)
│ │ │ +
216 {
│ │ │ +
217 _Tp* __p (__a._M_data);
│ │ │ +
218 for (size_t __i = 0; __i < __n; ++__i, ++__p)
│ │ │ +
219 new (__p) _Tp(__e[__i]);
│ │ │ +
220 }
│ │ │ +
221
│ │ │ +
222
│ │ │ +
223 template<typename _Tp>
│ │ │ +
224 void
│ │ │ +
225 __valarray_copy_construct(_Array<_Tp> __a, _Array<bool> __m,
│ │ │ +
226 _Array<_Tp> __b, size_t __n)
│ │ │ +
227 {
│ │ │ +
228 _Tp* __p (__a._M_data);
│ │ │ +
229 bool* __ok (__m._M_data);
│ │ │ +
230 for (_Tp* __q = __b._M_data; __q < __b._M_data+__n; ++__q, ++__ok, ++__p)
│ │ │ +
231 {
│ │ │ +
232 while (! *__ok)
│ │ │ +
233 {
│ │ │ +
234 ++__ok;
│ │ │ +
235 ++__p;
│ │ │ +
236 }
│ │ │ +
237 new (__q) _Tp(*__p);
│ │ │ +
238 }
│ │ │ +
239 }
│ │ │ +
240
│ │ │ +
241_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ +
242} // namespace
│ │ │ +
243
│ │ │ +
244#endif /* _VALARRAY_ARRAY_TCC */
│ │ │ +
ISO C++ entities toplevel namespace is std.
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,13 +1,13 @@ │ │ │ │ libstdc++ │ │ │ │ -atomic_lockfree_defines.h │ │ │ │ +valarray_array.tcc │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -1// -*- C++ -*- header. │ │ │ │ +1// The template and inlines for the -*- C++ -*- internal _Array helper class. │ │ │ │ 2 │ │ │ │ -3// Copyright (C) 2008-2022 Free Software Foundation, Inc. │ │ │ │ +3// Copyright (C) 1997-2022 Free Software Foundation, Inc. │ │ │ │ 4// │ │ │ │ 5// This file is part of the GNU ISO C++ Library. This library is free │ │ │ │ 6// software; you can redistribute it and/or modify it under the │ │ │ │ 7// terms of the GNU General Public License as published by the │ │ │ │ 8// Free Software Foundation; either version 3, or (at your option) │ │ │ │ 9// any later version. │ │ │ │ 10 │ │ │ │ @@ -21,52 +21,232 @@ │ │ │ │ 18// 3.1, as published by the Free Software Foundation. │ │ │ │ 19 │ │ │ │ 20// You should have received a copy of the GNU General Public License and │ │ │ │ 21// a copy of the GCC Runtime Library Exception along with this program; │ │ │ │ 22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see │ │ │ │ 23// . │ │ │ │ 24 │ │ │ │ -25/** @file bits/atomic_lockfree_defines.h │ │ │ │ +25/** @file bits/valarray_array.tcc │ │ │ │ 26 * This is an internal header file, included by other library headers. │ │ │ │ -27 * Do not attempt to use it directly. @headername{atomic} │ │ │ │ +27 * Do not attempt to use it directly. @headername{valarray} │ │ │ │ 28 */ │ │ │ │ 29 │ │ │ │ -30#ifndef _GLIBCXX_ATOMIC_LOCK_FREE_H │ │ │ │ -31#define _GLIBCXX_ATOMIC_LOCK_FREE_H 1 │ │ │ │ -32 │ │ │ │ -33#pragma GCC system_header │ │ │ │ +30// Written by Gabriel Dos Reis │ │ │ │ +31 │ │ │ │ +32#ifndef _VALARRAY_ARRAY_TCC │ │ │ │ +33#define _VALARRAY_ARRAY_TCC 1 │ │ │ │ 34 │ │ │ │ -35/** │ │ │ │ -36 * @addtogroup atomics │ │ │ │ -37 * @{ │ │ │ │ -38 */ │ │ │ │ -39 │ │ │ │ -40/** │ │ │ │ -41 * Lock-free property. │ │ │ │ -42 * │ │ │ │ -43 * 0 indicates that the types are never lock-free. │ │ │ │ -44 * 1 indicates that the types are sometimes lock-free. │ │ │ │ -45 * 2 indicates that the types are always lock-free. │ │ │ │ -46 */ │ │ │ │ -47 │ │ │ │ -48#if __cplusplus >= 201103L │ │ │ │ -_4_9#define ATOMIC_BOOL_LOCK_FREE __GCC_ATOMIC_BOOL_LOCK_FREE │ │ │ │ -50#define ATOMIC_CHAR_LOCK_FREE __GCC_ATOMIC_CHAR_LOCK_FREE │ │ │ │ -51#define ATOMIC_WCHAR_T_LOCK_FREE __GCC_ATOMIC_WCHAR_T_LOCK_FREE │ │ │ │ -52#ifdef _GLIBCXX_USE_CHAR8_T │ │ │ │ -53#define ATOMIC_CHAR8_T_LOCK_FREE __GCC_ATOMIC_CHAR8_T_LOCK_FREE │ │ │ │ -54#endif │ │ │ │ -55#define ATOMIC_CHAR16_T_LOCK_FREE __GCC_ATOMIC_CHAR16_T_LOCK_FREE │ │ │ │ -56#define ATOMIC_CHAR32_T_LOCK_FREE __GCC_ATOMIC_CHAR32_T_LOCK_FREE │ │ │ │ -57#define ATOMIC_SHORT_LOCK_FREE __GCC_ATOMIC_SHORT_LOCK_FREE │ │ │ │ -58#define ATOMIC_INT_LOCK_FREE __GCC_ATOMIC_INT_LOCK_FREE │ │ │ │ -59#define ATOMIC_LONG_LOCK_FREE __GCC_ATOMIC_LONG_LOCK_FREE │ │ │ │ -60#define ATOMIC_LLONG_LOCK_FREE __GCC_ATOMIC_LLONG_LOCK_FREE │ │ │ │ -61#define ATOMIC_POINTER_LOCK_FREE __GCC_ATOMIC_POINTER_LOCK_FREE │ │ │ │ -62#endif │ │ │ │ -63 │ │ │ │ -64/// @} group atomics │ │ │ │ -65 │ │ │ │ -66#endif │ │ │ │ +35namespace _s_t_d _GLIBCXX_VISIBILITY(default) │ │ │ │ +36{ │ │ │ │ +37_GLIBCXX_BEGIN_NAMESPACE_VERSION │ │ │ │ +38 │ │ │ │ +39 template │ │ │ │ +40 void │ │ │ │ +41 __valarray_fill(_Array<_Tp> __a, size_t __n, _Array __m, │ │ │ │ +42 const _Tp& __t) │ │ │ │ +43 { │ │ │ │ +44 _Tp* __p = __a._M_data; │ │ │ │ +45 bool* __ok (__m._M_data); │ │ │ │ +46 for (size_t __i=0; __i < __n; ++__i, ++__ok, ++__p) │ │ │ │ +47 { │ │ │ │ +48 while (!*__ok) │ │ │ │ +49 { │ │ │ │ +50 ++__ok; │ │ │ │ +51 ++__p; │ │ │ │ +52 } │ │ │ │ +53 *__p = __t; │ │ │ │ +54 } │ │ │ │ +55 } │ │ │ │ +56 │ │ │ │ +57 // Copy n elements of a into consecutive elements of b. When m is │ │ │ │ +58 // false, the corresponding element of a is skipped. m must contain │ │ │ │ +59 // at least n true elements. a must contain at least n elements and │ │ │ │ +60 // enough elements to match up with m through the nth true element │ │ │ │ +61 // of m. I.e. if n is 10, m has 15 elements with 5 false followed │ │ │ │ +62 // by 10 true, a must have 15 elements. │ │ │ │ +63 template │ │ │ │ +64 void │ │ │ │ +65 __valarray_copy(_Array<_Tp> __a, _Array __m, _Array<_Tp> __b, │ │ │ │ +66 size_t __n) │ │ │ │ +67 { │ │ │ │ +68 _Tp* __p (__a._M_data); │ │ │ │ +69 bool* __ok (__m._M_data); │ │ │ │ +70 for (_Tp* __q = __b._M_data; __q < __b._M_data + __n; │ │ │ │ +71 ++__q, ++__ok, ++__p) │ │ │ │ +72 { │ │ │ │ +73 while (! *__ok) │ │ │ │ +74 { │ │ │ │ +75 ++__ok; │ │ │ │ +76 ++__p; │ │ │ │ +77 } │ │ │ │ +78 *__q = *__p; │ │ │ │ +79 } │ │ │ │ +80 } │ │ │ │ +81 │ │ │ │ +82 // Copy n consecutive elements from a into elements of b. Elements │ │ │ │ +83 // of b are skipped if the corresponding element of m is false. m │ │ │ │ +84 // must contain at least n true elements. b must have at least as │ │ │ │ +85 // many elements as the index of the nth true element of m. I.e. if │ │ │ │ +86 // m has 15 elements with 5 false followed by 10 true, b must have │ │ │ │ +87 // at least 15 elements. │ │ │ │ +88 template │ │ │ │ +89 void │ │ │ │ +90 __valarray_copy(_Array<_Tp> __a, size_t __n, _Array<_Tp> __b, │ │ │ │ +91 _Array __m) │ │ │ │ +92 { │ │ │ │ +93 _Tp* __q (__b._M_data); │ │ │ │ +94 bool* __ok (__m._M_data); │ │ │ │ +95 for (_Tp* __p = __a._M_data; __p < __a._M_data+__n; │ │ │ │ +96 ++__p, ++__ok, ++__q) │ │ │ │ +97 { │ │ │ │ +98 while (! *__ok) │ │ │ │ +99 { │ │ │ │ +100 ++__ok; │ │ │ │ +101 ++__q; │ │ │ │ +102 } │ │ │ │ +103 *__q = *__p; │ │ │ │ +104 } │ │ │ │ +105 } │ │ │ │ +106 │ │ │ │ +107 // Copy n elements from a into elements of b. Elements of a are │ │ │ │ +108 // skipped if the corresponding element of m is false. Elements of │ │ │ │ +109 // b are skipped if the corresponding element of k is false. m and │ │ │ │ +110 // k must contain at least n true elements. a and b must have at │ │ │ │ +111 // least as many elements as the index of the nth true element of m. │ │ │ │ +112 template │ │ │ │ +113 void │ │ │ │ +114 __valarray_copy(_Array<_Tp> __a, _Array __m, size_t __n, │ │ │ │ +115 _Array<_Tp> __b, _Array __k) │ │ │ │ +116 { │ │ │ │ +117 _Tp* __p (__a._M_data); │ │ │ │ +118 _Tp* __q (__b._M_data); │ │ │ │ +119 bool* __srcok (__m._M_data); │ │ │ │ +120 bool* __dstok (__k._M_data); │ │ │ │ +121 for (size_t __i = 0; __i < __n; │ │ │ │ +122 ++__srcok, ++__p, ++__dstok, ++__q, ++__i) │ │ │ │ +123 { │ │ │ │ +124 while (! *__srcok) │ │ │ │ +125 { │ │ │ │ +126 ++__srcok; │ │ │ │ +127 ++__p; │ │ │ │ +128 } │ │ │ │ +129 while (! *__dstok) │ │ │ │ +130 { │ │ │ │ +131 ++__dstok; │ │ │ │ +132 ++__q; │ │ │ │ +133 } │ │ │ │ +134 *__q = *__p; │ │ │ │ +135 } │ │ │ │ +136 } │ │ │ │ +137 │ │ │ │ +138 // Copy n consecutive elements of e into consecutive elements of a. │ │ │ │ +139 // I.e. a[i] = e[i]. │ │ │ │ +140 template │ │ │ │ +141 void │ │ │ │ +142 __valarray_copy(const _Expr<_Dom, _Tp>& __e, size_t __n, _Array<_Tp> __a) │ │ │ │ +143 { │ │ │ │ +144 _Tp* __p (__a._M_data); │ │ │ │ +145 for (size_t __i = 0; __i < __n; ++__i, ++__p) │ │ │ │ +146 *__p = __e[__i]; │ │ │ │ +147 } │ │ │ │ +148 │ │ │ │ +149 // Copy n consecutive elements of e into elements of a using stride │ │ │ │ +150 // s. I.e., a[0] = e[0], a[s] = e[1], a[2*s] = e[2]. │ │ │ │ +151 template │ │ │ │ +152 void │ │ │ │ +153 __valarray_copy(const _Expr<_Dom, _Tp>& __e, size_t __n, │ │ │ │ +154 _Array<_Tp> __a, size_t __s) │ │ │ │ +155 { │ │ │ │ +156 _Tp* __p (__a._M_data); │ │ │ │ +157 for (size_t __i = 0; __i < __n; ++__i, __p += __s) │ │ │ │ +158 *__p = __e[__i]; │ │ │ │ +159 } │ │ │ │ +160 │ │ │ │ +161 // Copy n consecutive elements of e into elements of a indexed by │ │ │ │ +162 // contents of i. I.e., a[i[0]] = e[0]. │ │ │ │ +163 template │ │ │ │ +164 void │ │ │ │ +165 __valarray_copy(const _Expr<_Dom, _Tp>& __e, size_t __n, │ │ │ │ +166 _Array<_Tp> __a, _Array __i) │ │ │ │ +167 { │ │ │ │ +168 size_t* __j (__i._M_data); │ │ │ │ +169 for (size_t __k = 0; __k < __n; ++__k, ++__j) │ │ │ │ +170 __a._M_data[*__j] = __e[__k]; │ │ │ │ +171 } │ │ │ │ +172 │ │ │ │ +173 // Copy n elements of e indexed by contents of f into elements of a │ │ │ │ +174 // indexed by contents of i. I.e., a[i[0]] = e[f[0]]. │ │ │ │ +175 template │ │ │ │ +176 void │ │ │ │ +177 __valarray_copy(_Array<_Tp> __e, _Array __f, │ │ │ │ +178 size_t __n, │ │ │ │ +179 _Array<_Tp> __a, _Array __i) │ │ │ │ +180 { │ │ │ │ +181 size_t* __g (__f._M_data); │ │ │ │ +182 size_t* __j (__i._M_data); │ │ │ │ +183 for (size_t __k = 0; __k < __n; ++__k, ++__j, ++__g) │ │ │ │ +184 __a._M_data[*__j] = __e._M_data[*__g]; │ │ │ │ +185 } │ │ │ │ +186 │ │ │ │ +187 // Copy n consecutive elements of e into elements of a. Elements of │ │ │ │ +188 // a are skipped if the corresponding element of m is false. m must │ │ │ │ +189 // have at least n true elements and a must have at least as many │ │ │ │ +190 // elements as the index of the nth true element of m. I.e. if m │ │ │ │ +191 // has 5 false followed by 10 true elements and n == 10, a must have │ │ │ │ +192 // at least 15 elements. │ │ │ │ +193 template │ │ │ │ +194 void │ │ │ │ +195 __valarray_copy(const _Expr<_Dom, _Tp>& __e, size_t __n, │ │ │ │ +196 _Array<_Tp> __a, _Array __m) │ │ │ │ +197 { │ │ │ │ +198 bool* __ok (__m._M_data); │ │ │ │ +199 _Tp* __p (__a._M_data); │ │ │ │ +200 for (size_t __i = 0; __i < __n; ++__i, ++__ok, ++__p) │ │ │ │ +201 { │ │ │ │ +202 while (! *__ok) │ │ │ │ +203 { │ │ │ │ +204 ++__ok; │ │ │ │ +205 ++__p; │ │ │ │ +206 } │ │ │ │ +207 *__p = __e[__i]; │ │ │ │ +208 } │ │ │ │ +209 } │ │ │ │ +210 │ │ │ │ +211 │ │ │ │ +212 template │ │ │ │ +213 void │ │ │ │ +214 __valarray_copy_construct(const _Expr<_Dom, _Tp>& __e, size_t __n, │ │ │ │ +215 _Array<_Tp> __a) │ │ │ │ +216 { │ │ │ │ +217 _Tp* __p (__a._M_data); │ │ │ │ +218 for (size_t __i = 0; __i < __n; ++__i, ++__p) │ │ │ │ +219 new (__p) _Tp(__e[__i]); │ │ │ │ +220 } │ │ │ │ +221 │ │ │ │ +222 │ │ │ │ +223 template │ │ │ │ +224 void │ │ │ │ +225 __valarray_copy_construct(_Array<_Tp> __a, _Array __m, │ │ │ │ +226 _Array<_Tp> __b, size_t __n) │ │ │ │ +227 { │ │ │ │ +228 _Tp* __p (__a._M_data); │ │ │ │ +229 bool* __ok (__m._M_data); │ │ │ │ +230 for (_Tp* __q = __b._M_data; __q < __b._M_data+__n; ++__q, ++__ok, ++__p) │ │ │ │ +231 { │ │ │ │ +232 while (! *__ok) │ │ │ │ +233 { │ │ │ │ +234 ++__ok; │ │ │ │ +235 ++__p; │ │ │ │ +236 } │ │ │ │ +237 new (__q) _Tp(*__p); │ │ │ │ +238 } │ │ │ │ +239 } │ │ │ │ +240 │ │ │ │ +241_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ +242} // namespace │ │ │ │ +243 │ │ │ │ +244#endif /* _VALARRAY_ARRAY_TCC */ │ │ │ │ +_s_t_d │ │ │ │ +ISO C++ entities toplevel namespace is std. │ │ │ │ * _b_i_t_s │ │ │ │ - * _a_t_o_m_i_c___l_o_c_k_f_r_e_e___d_e_f_i_n_e_s_._h │ │ │ │ + * _v_a_l_a_r_r_a_y___a_r_r_a_y_._t_c_c │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-12-base/libstdc++/user/a00353.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: valarray_after.h File Reference │ │ │ +libstdc++: unique_lock.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -46,575 +46,40 @@ │ │ │ /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */ │ │ │ $(document).ready(function(){initNavTree('a00353.html',''); initResizable(); }); │ │ │ /* @license-end */ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -Namespaces | │ │ │ -Macros | │ │ │ -Functions
│ │ │ -
valarray_after.h File Reference
│ │ │ +Classes | │ │ │ +Namespaces
│ │ │ +
unique_lock.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ + │ │ │ + │ │ │ + │ │ │ +

│ │ │ +Classes

class  std::unique_lock< _Mutex >
 
│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ - │ │ │ -

│ │ │ Namespaces

namespace  std
 
namespace  std::__detail
 
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -

│ │ │ -Macros

#define _DEFINE_EXPR_BINARY_FUNCTION(_Fun, _UFun)
 
#define _DEFINE_EXPR_BINARY_OPERATOR(_Op, _Name)
 
#define _DEFINE_EXPR_UNARY_FUNCTION(_Name, _UName)
 
#define _DEFINE_EXPR_UNARY_OPERATOR(_Op, _Name)
 
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │

│ │ │ -Functions

template<class _Dom >
_Expr< _UnClos< struct std::_Abs, _Expr, _Dom >, typename _Dom::value_type > std::abs (const _Expr< _Dom, typename _Dom::value_type > &__e)
 
template<typename _Tp >
_Expr< _UnClos< struct std::_Abs, _ValArray, _Tp >, _Tp > std::abs (const valarray< _Tp > &__v)
 
template<class _Dom >
_Expr< _UnClos< struct std::_Acos, _Expr, _Dom >, typename _Dom::value_type > std::acos (const _Expr< _Dom, typename _Dom::value_type > &__e)
 
template<typename _Tp >
_Expr< _UnClos< struct std::_Acos, _ValArray, _Tp >, _Tp > std::acos (const valarray< _Tp > &__v)
 
template<class _Dom >
_Expr< _UnClos< struct std::_Asin, _Expr, _Dom >, typename _Dom::value_type > std::asin (const _Expr< _Dom, typename _Dom::value_type > &__e)
 
template<typename _Tp >
_Expr< _UnClos< struct std::_Asin, _ValArray, _Tp >, _Tp > std::asin (const valarray< _Tp > &__v)
 
template<class _Dom >
_Expr< _UnClos< struct std::_Atan, _Expr, _Dom >, typename _Dom::value_type > std::atan (const _Expr< _Dom, typename _Dom::value_type > &__e)
 
template<typename _Tp >
_Expr< _UnClos< struct std::_Atan, _ValArray, _Tp >, _Tp > std::atan (const valarray< _Tp > &__v)
 
template<class _Dom >
_Expr< _BinClos< struct std::_Atan2, _Expr, _Constant, _Dom, typename _Dom::value_type >, typename _Dom::value_type > std::atan2 (const _Expr< _Dom, typename _Dom::value_type > &__e, const typename _Dom::value_type &__t)
 
template<class _Dom >
_Expr< _BinClos< struct std::_Atan2, _Expr, _ValArray, _Dom, typename _Dom::value_type >, typename _Dom::value_type > std::atan2 (const _Expr< _Dom, typename _Dom::value_type > &__e, const valarray< typename _Dom::value_type > &__v)
 
template<class _Dom1 , class _Dom2 >
_Expr< _BinClos< struct std::_Atan2, _Expr, _Expr, _Dom1, _Dom2 >, typename _Dom1::value_type > std::atan2 (const _Expr< _Dom1, typename _Dom1::value_type > &__e1, const _Expr< _Dom2, typename _Dom2::value_type > &__e2)
 
template<class _Dom >
_Expr< _BinClos< struct std::_Atan2, _Constant, _Expr, typename _Dom::value_type, _Dom >, typename _Dom::value_type > std::atan2 (const typename _Dom::value_type &__t, const _Expr< _Dom, typename _Dom::value_type > &__e)
 
template<typename _Tp >
_Expr< _BinClos< struct std::_Atan2, _Constant, _ValArray, _Tp, _Tp >, _Tp > std::atan2 (const typename valarray< _Tp >::value_type &__t, const valarray< _Tp > &__v)
 
template<typename _Tp >
_Expr< _BinClos< struct std::_Atan2, _ValArray, _Constant, _Tp, _Tp >, _Tp > std::atan2 (const valarray< _Tp > &__v, const typename valarray< _Tp >::value_type &__t)
 
template<typename _Tp >
_Expr< _BinClos< struct std::_Atan2, _ValArray, _ValArray, _Tp, _Tp >, _Tp > std::atan2 (const valarray< _Tp > &__v, const valarray< _Tp > &__w)
 
template<class _Dom >
_Expr< _BinClos< struct std::_Atan2, _ValArray, _Expr, typename _Dom::value_type, _Dom >, typename _Dom::value_type > std::atan2 (const valarray< typename _Dom::valarray > &__v, const _Expr< _Dom, typename _Dom::value_type > &__e)
 
template<class _Dom >
_Expr< _UnClos< struct std::_Cos, _Expr, _Dom >, typename _Dom::value_type > std::cos (const _Expr< _Dom, typename _Dom::value_type > &__e)
 
template<typename _Tp >
_Expr< _UnClos< struct std::_Cos, _ValArray, _Tp >, _Tp > std::cos (const valarray< _Tp > &__v)
 
template<class _Dom >
_Expr< _UnClos< struct std::_Cosh, _Expr, _Dom >, typename _Dom::value_type > std::cosh (const _Expr< _Dom, typename _Dom::value_type > &__e)
 
template<typename _Tp >
_Expr< _UnClos< struct std::_Cosh, _ValArray, _Tp >, _Tp > std::cosh (const valarray< _Tp > &__v)
 
template<class _Dom >
_Expr< _UnClos< struct std::_Exp, _Expr, _Dom >, typename _Dom::value_type > std::exp (const _Expr< _Dom, typename _Dom::value_type > &__e)
 
template<typename _Tp >
_Expr< _UnClos< struct std::_Exp, _ValArray, _Tp >, _Tp > std::exp (const valarray< _Tp > &__v)
 
template<class _Dom >
_Expr< _UnClos< struct std::_Log, _Expr, _Dom >, typename _Dom::value_type > std::log (const _Expr< _Dom, typename _Dom::value_type > &__e)
 
template<typename _Tp >
_Expr< _UnClos< struct std::_Log, _ValArray, _Tp >, _Tp > std::log (const valarray< _Tp > &__v)
 
template<class _Dom >
_Expr< _UnClos< struct std::_Log10, _Expr, _Dom >, typename _Dom::value_type > std::log10 (const _Expr< _Dom, typename _Dom::value_type > &__e)
 
template<typename _Tp >
_Expr< _UnClos< struct std::_Log10, _ValArray, _Tp >, _Tp > std::log10 (const valarray< _Tp > &__v)
 
template<class _Dom >
_Expr< _BinClos< struct std::__not_equal_to, _Expr, _ValArray, _Dom, typename _Dom::value_type >, typename __fun< struct std::__not_equal_to, typename _Dom::value_type >::result_type > std::operator!= (const _Expr< _Dom, typename _Dom::value_type > &__e, const valarray< typename _Dom::value_type > &__v)
 
template<class _Dom >
_Expr< _BinClos< struct std::__not_equal_to, _Expr, _Constant, _Dom, typename _Dom::value_type >, typename __fun< struct std::__not_equal_to, typename _Dom::value_type >::result_type > std::operator!= (const _Expr< _Dom, typename _Dom::value_type > &__v, const typename _Dom::value_type &__t)
 
template<class _Dom1 , class _Dom2 >
_Expr< _BinClos< struct std::__not_equal_to, _Expr, _Expr, _Dom1, _Dom2 >, typename __fun< struct std::__not_equal_to, typename _Dom1::value_type >::result_type > std::operator!= (const _Expr< _Dom1, typename _Dom1::value_type > &__v, const _Expr< _Dom2, typename _Dom2::value_type > &__w)
 
template<class _Dom >
_Expr< _BinClos< struct std::__not_equal_to, _Constant, _Expr, typename _Dom::value_type, _Dom >, typename __fun< struct std::__not_equal_to, typename _Dom::value_type >::result_type > std::operator!= (const typename _Dom::value_type &__t, const _Expr< _Dom, typename _Dom::value_type > &__v)
 
template<class _Dom >
_Expr< _BinClos< struct std::__not_equal_to, _ValArray, _Expr, typename _Dom::value_type, _Dom >, typename __fun< struct std::__not_equal_to, typename _Dom::value_type >::result_type > std::operator!= (const valarray< typename _Dom::value_type > &__v, const _Expr< _Dom, typename _Dom::value_type > &__e)
 
template<class _Dom >
_Expr< _BinClos< struct std::__modulus, _Expr, _ValArray, _Dom, typename _Dom::value_type >, typename __fun< struct std::__modulus, typename _Dom::value_type >::result_type > std::operator% (const _Expr< _Dom, typename _Dom::value_type > &__e, const valarray< typename _Dom::value_type > &__v)
 
template<class _Dom >
_Expr< _BinClos< struct std::__modulus, _Expr, _Constant, _Dom, typename _Dom::value_type >, typename __fun< struct std::__modulus, typename _Dom::value_type >::result_type > std::operator% (const _Expr< _Dom, typename _Dom::value_type > &__v, const typename _Dom::value_type &__t)
 
template<class _Dom1 , class _Dom2 >
_Expr< _BinClos< struct std::__modulus, _Expr, _Expr, _Dom1, _Dom2 >, typename __fun< struct std::__modulus, typename _Dom1::value_type >::result_type > std::operator% (const _Expr< _Dom1, typename _Dom1::value_type > &__v, const _Expr< _Dom2, typename _Dom2::value_type > &__w)
 
template<class _Dom >
_Expr< _BinClos< struct std::__modulus, _Constant, _Expr, typename _Dom::value_type, _Dom >, typename __fun< struct std::__modulus, typename _Dom::value_type >::result_type > std::operator% (const typename _Dom::value_type &__t, const _Expr< _Dom, typename _Dom::value_type > &__v)
 
template<class _Dom >
_Expr< _BinClos< struct std::__modulus, _ValArray, _Expr, typename _Dom::value_type, _Dom >, typename __fun< struct std::__modulus, typename _Dom::value_type >::result_type > std::operator% (const valarray< typename _Dom::value_type > &__v, const _Expr< _Dom, typename _Dom::value_type > &__e)
 
template<class _Dom >
_Expr< _BinClos< struct std::__bitwise_and, _Expr, _ValArray, _Dom, typename _Dom::value_type >, typename __fun< struct std::__bitwise_and, typename _Dom::value_type >::result_type > std::operator& (const _Expr< _Dom, typename _Dom::value_type > &__e, const valarray< typename _Dom::value_type > &__v)
 
template<class _Dom >
_Expr< _BinClos< struct std::__bitwise_and, _Expr, _Constant, _Dom, typename _Dom::value_type >, typename __fun< struct std::__bitwise_and, typename _Dom::value_type >::result_type > std::operator& (const _Expr< _Dom, typename _Dom::value_type > &__v, const typename _Dom::value_type &__t)
 
template<class _Dom1 , class _Dom2 >
_Expr< _BinClos< struct std::__bitwise_and, _Expr, _Expr, _Dom1, _Dom2 >, typename __fun< struct std::__bitwise_and, typename _Dom1::value_type >::result_type > std::operator& (const _Expr< _Dom1, typename _Dom1::value_type > &__v, const _Expr< _Dom2, typename _Dom2::value_type > &__w)
 
template<class _Dom >
_Expr< _BinClos< struct std::__bitwise_and, _Constant, _Expr, typename _Dom::value_type, _Dom >, typename __fun< struct std::__bitwise_and, typename _Dom::value_type >::result_type > std::operator& (const typename _Dom::value_type &__t, const _Expr< _Dom, typename _Dom::value_type > &__v)
 
template<class _Dom >
_Expr< _BinClos< struct std::__bitwise_and, _ValArray, _Expr, typename _Dom::value_type, _Dom >, typename __fun< struct std::__bitwise_and, typename _Dom::value_type >::result_type > std::operator& (const valarray< typename _Dom::value_type > &__v, const _Expr< _Dom, typename _Dom::value_type > &__e)
 
template<class _Dom >
_Expr< _BinClos< struct std::__logical_and, _Expr, _ValArray, _Dom, typename _Dom::value_type >, typename __fun< struct std::__logical_and, typename _Dom::value_type >::result_type > std::operator&& (const _Expr< _Dom, typename _Dom::value_type > &__e, const valarray< typename _Dom::value_type > &__v)
 
template<class _Dom >
_Expr< _BinClos< struct std::__logical_and, _Expr, _Constant, _Dom, typename _Dom::value_type >, typename __fun< struct std::__logical_and, typename _Dom::value_type >::result_type > std::operator&& (const _Expr< _Dom, typename _Dom::value_type > &__v, const typename _Dom::value_type &__t)
 
template<class _Dom1 , class _Dom2 >
_Expr< _BinClos< struct std::__logical_and, _Expr, _Expr, _Dom1, _Dom2 >, typename __fun< struct std::__logical_and, typename _Dom1::value_type >::result_type > std::operator&& (const _Expr< _Dom1, typename _Dom1::value_type > &__v, const _Expr< _Dom2, typename _Dom2::value_type > &__w)
 
template<class _Dom >
_Expr< _BinClos< struct std::__logical_and, _Constant, _Expr, typename _Dom::value_type, _Dom >, typename __fun< struct std::__logical_and, typename _Dom::value_type >::result_type > std::operator&& (const typename _Dom::value_type &__t, const _Expr< _Dom, typename _Dom::value_type > &__v)
 
template<class _Dom >
_Expr< _BinClos< struct std::__logical_and, _ValArray, _Expr, typename _Dom::value_type, _Dom >, typename __fun< struct std::__logical_and, typename _Dom::value_type >::result_type > std::operator&& (const valarray< typename _Dom::value_type > &__v, const _Expr< _Dom, typename _Dom::value_type > &__e)
 
template<class _Dom >
_Expr< _BinClos< struct std::__multiplies, _Expr, _ValArray, _Dom, typename _Dom::value_type >, typename __fun< struct std::__multiplies, typename _Dom::value_type >::result_type > std::operator* (const _Expr< _Dom, typename _Dom::value_type > &__e, const valarray< typename _Dom::value_type > &__v)
 
template<class _Dom >
_Expr< _BinClos< struct std::__multiplies, _Expr, _Constant, _Dom, typename _Dom::value_type >, typename __fun< struct std::__multiplies, typename _Dom::value_type >::result_type > std::operator* (const _Expr< _Dom, typename _Dom::value_type > &__v, const typename _Dom::value_type &__t)
 
template<class _Dom1 , class _Dom2 >
_Expr< _BinClos< struct std::__multiplies, _Expr, _Expr, _Dom1, _Dom2 >, typename __fun< struct std::__multiplies, typename _Dom1::value_type >::result_type > std::operator* (const _Expr< _Dom1, typename _Dom1::value_type > &__v, const _Expr< _Dom2, typename _Dom2::value_type > &__w)
 
template<class _Dom >
_Expr< _BinClos< struct std::__multiplies, _Constant, _Expr, typename _Dom::value_type, _Dom >, typename __fun< struct std::__multiplies, typename _Dom::value_type >::result_type > std::operator* (const typename _Dom::value_type &__t, const _Expr< _Dom, typename _Dom::value_type > &__v)
 
template<class _Dom >
_Expr< _BinClos< struct std::__multiplies, _ValArray, _Expr, typename _Dom::value_type, _Dom >, typename __fun< struct std::__multiplies, typename _Dom::value_type >::result_type > std::operator* (const valarray< typename _Dom::value_type > &__v, const _Expr< _Dom, typename _Dom::value_type > &__e)
 
template<class _Dom >
_Expr< _BinClos< struct std::__plus, _Expr, _ValArray, _Dom, typename _Dom::value_type >, typename __fun< struct std::__plus, typename _Dom::value_type >::result_type > std::operator+ (const _Expr< _Dom, typename _Dom::value_type > &__e, const valarray< typename _Dom::value_type > &__v)
 
template<class _Dom >
_Expr< _BinClos< struct std::__plus, _Expr, _Constant, _Dom, typename _Dom::value_type >, typename __fun< struct std::__plus, typename _Dom::value_type >::result_type > std::operator+ (const _Expr< _Dom, typename _Dom::value_type > &__v, const typename _Dom::value_type &__t)
 
template<class _Dom1 , class _Dom2 >
_Expr< _BinClos< struct std::__plus, _Expr, _Expr, _Dom1, _Dom2 >, typename __fun< struct std::__plus, typename _Dom1::value_type >::result_type > std::operator+ (const _Expr< _Dom1, typename _Dom1::value_type > &__v, const _Expr< _Dom2, typename _Dom2::value_type > &__w)
 
template<class _Dom >
_Expr< _BinClos< struct std::__plus, _Constant, _Expr, typename _Dom::value_type, _Dom >, typename __fun< struct std::__plus, typename _Dom::value_type >::result_type > std::operator+ (const typename _Dom::value_type &__t, const _Expr< _Dom, typename _Dom::value_type > &__v)
 
template<class _Dom >
_Expr< _BinClos< struct std::__plus, _ValArray, _Expr, typename _Dom::value_type, _Dom >, typename __fun< struct std::__plus, typename _Dom::value_type >::result_type > std::operator+ (const valarray< typename _Dom::value_type > &__v, const _Expr< _Dom, typename _Dom::value_type > &__e)
 
template<class _Dom >
_Expr< _BinClos< struct std::__minus, _Expr, _ValArray, _Dom, typename _Dom::value_type >, typename __fun< struct std::__minus, typename _Dom::value_type >::result_type > std::operator- (const _Expr< _Dom, typename _Dom::value_type > &__e, const valarray< typename _Dom::value_type > &__v)
 
template<class _Dom >
_Expr< _BinClos< struct std::__minus, _Expr, _Constant, _Dom, typename _Dom::value_type >, typename __fun< struct std::__minus, typename _Dom::value_type >::result_type > std::operator- (const _Expr< _Dom, typename _Dom::value_type > &__v, const typename _Dom::value_type &__t)
 
template<class _Dom1 , class _Dom2 >
_Expr< _BinClos< struct std::__minus, _Expr, _Expr, _Dom1, _Dom2 >, typename __fun< struct std::__minus, typename _Dom1::value_type >::result_type > std::operator- (const _Expr< _Dom1, typename _Dom1::value_type > &__v, const _Expr< _Dom2, typename _Dom2::value_type > &__w)
 
template<class _Dom >
_Expr< _BinClos< struct std::__minus, _Constant, _Expr, typename _Dom::value_type, _Dom >, typename __fun< struct std::__minus, typename _Dom::value_type >::result_type > std::operator- (const typename _Dom::value_type &__t, const _Expr< _Dom, typename _Dom::value_type > &__v)
 
template<class _Dom >
_Expr< _BinClos< struct std::__minus, _ValArray, _Expr, typename _Dom::value_type, _Dom >, typename __fun< struct std::__minus, typename _Dom::value_type >::result_type > std::operator- (const valarray< typename _Dom::value_type > &__v, const _Expr< _Dom, typename _Dom::value_type > &__e)
 
template<class _Dom >
_Expr< _BinClos< struct std::__divides, _Expr, _ValArray, _Dom, typename _Dom::value_type >, typename __fun< struct std::__divides, typename _Dom::value_type >::result_type > std::operator/ (const _Expr< _Dom, typename _Dom::value_type > &__e, const valarray< typename _Dom::value_type > &__v)
 
template<class _Dom >
_Expr< _BinClos< struct std::__divides, _Expr, _Constant, _Dom, typename _Dom::value_type >, typename __fun< struct std::__divides, typename _Dom::value_type >::result_type > std::operator/ (const _Expr< _Dom, typename _Dom::value_type > &__v, const typename _Dom::value_type &__t)
 
template<class _Dom1 , class _Dom2 >
_Expr< _BinClos< struct std::__divides, _Expr, _Expr, _Dom1, _Dom2 >, typename __fun< struct std::__divides, typename _Dom1::value_type >::result_type > std::operator/ (const _Expr< _Dom1, typename _Dom1::value_type > &__v, const _Expr< _Dom2, typename _Dom2::value_type > &__w)
 
template<class _Dom >
_Expr< _BinClos< struct std::__divides, _Constant, _Expr, typename _Dom::value_type, _Dom >, typename __fun< struct std::__divides, typename _Dom::value_type >::result_type > std::operator/ (const typename _Dom::value_type &__t, const _Expr< _Dom, typename _Dom::value_type > &__v)
 
template<class _Dom >
_Expr< _BinClos< struct std::__divides, _ValArray, _Expr, typename _Dom::value_type, _Dom >, typename __fun< struct std::__divides, typename _Dom::value_type >::result_type > std::operator/ (const valarray< typename _Dom::value_type > &__v, const _Expr< _Dom, typename _Dom::value_type > &__e)
 
template<class _Dom >
_Expr< _BinClos< struct std::__less, _Expr, _ValArray, _Dom, typename _Dom::value_type >, typename __fun< struct std::__less, typename _Dom::value_type >::result_type > std::operator< (const _Expr< _Dom, typename _Dom::value_type > &__e, const valarray< typename _Dom::value_type > &__v)
 
template<class _Dom >
_Expr< _BinClos< struct std::__less, _Expr, _Constant, _Dom, typename _Dom::value_type >, typename __fun< struct std::__less, typename _Dom::value_type >::result_type > std::operator< (const _Expr< _Dom, typename _Dom::value_type > &__v, const typename _Dom::value_type &__t)
 
template<class _Dom1 , class _Dom2 >
_Expr< _BinClos< struct std::__less, _Expr, _Expr, _Dom1, _Dom2 >, typename __fun< struct std::__less, typename _Dom1::value_type >::result_type > std::operator< (const _Expr< _Dom1, typename _Dom1::value_type > &__v, const _Expr< _Dom2, typename _Dom2::value_type > &__w)
 
template<class _Dom >
_Expr< _BinClos< struct std::__less, _Constant, _Expr, typename _Dom::value_type, _Dom >, typename __fun< struct std::__less, typename _Dom::value_type >::result_type > std::operator< (const typename _Dom::value_type &__t, const _Expr< _Dom, typename _Dom::value_type > &__v)
 
template<class _Dom >
_Expr< _BinClos< struct std::__less, _ValArray, _Expr, typename _Dom::value_type, _Dom >, typename __fun< struct std::__less, typename _Dom::value_type >::result_type > std::operator< (const valarray< typename _Dom::value_type > &__v, const _Expr< _Dom, typename _Dom::value_type > &__e)
 
template<class _Dom >
_Expr< _BinClos< struct std::__shift_left, _Expr, _ValArray, _Dom, typename _Dom::value_type >, typename __fun< struct std::__shift_left, typename _Dom::value_type >::result_type > std::operator<< (const _Expr< _Dom, typename _Dom::value_type > &__e, const valarray< typename _Dom::value_type > &__v)
 
template<class _Dom >
_Expr< _BinClos< struct std::__shift_left, _Expr, _Constant, _Dom, typename _Dom::value_type >, typename __fun< struct std::__shift_left, typename _Dom::value_type >::result_type > std::operator<< (const _Expr< _Dom, typename _Dom::value_type > &__v, const typename _Dom::value_type &__t)
 
template<class _Dom1 , class _Dom2 >
_Expr< _BinClos< struct std::__shift_left, _Expr, _Expr, _Dom1, _Dom2 >, typename __fun< struct std::__shift_left, typename _Dom1::value_type >::result_type > std::operator<< (const _Expr< _Dom1, typename _Dom1::value_type > &__v, const _Expr< _Dom2, typename _Dom2::value_type > &__w)
 
template<class _Dom >
_Expr< _BinClos< struct std::__shift_left, _Constant, _Expr, typename _Dom::value_type, _Dom >, typename __fun< struct std::__shift_left, typename _Dom::value_type >::result_type > std::operator<< (const typename _Dom::value_type &__t, const _Expr< _Dom, typename _Dom::value_type > &__v)
 
template<class _Dom >
_Expr< _BinClos< struct std::__shift_left, _ValArray, _Expr, typename _Dom::value_type, _Dom >, typename __fun< struct std::__shift_left, typename _Dom::value_type >::result_type > std::operator<< (const valarray< typename _Dom::value_type > &__v, const _Expr< _Dom, typename _Dom::value_type > &__e)
 
template<class _Dom >
_Expr< _BinClos< struct std::__less_equal, _Expr, _ValArray, _Dom, typename _Dom::value_type >, typename __fun< struct std::__less_equal, typename _Dom::value_type >::result_type > std::operator<= (const _Expr< _Dom, typename _Dom::value_type > &__e, const valarray< typename _Dom::value_type > &__v)
 
template<class _Dom >
_Expr< _BinClos< struct std::__less_equal, _Expr, _Constant, _Dom, typename _Dom::value_type >, typename __fun< struct std::__less_equal, typename _Dom::value_type >::result_type > std::operator<= (const _Expr< _Dom, typename _Dom::value_type > &__v, const typename _Dom::value_type &__t)
 
template<class _Dom1 , class _Dom2 >
_Expr< _BinClos< struct std::__less_equal, _Expr, _Expr, _Dom1, _Dom2 >, typename __fun< struct std::__less_equal, typename _Dom1::value_type >::result_type > std::operator<= (const _Expr< _Dom1, typename _Dom1::value_type > &__v, const _Expr< _Dom2, typename _Dom2::value_type > &__w)
 
template<class _Dom >
_Expr< _BinClos< struct std::__less_equal, _Constant, _Expr, typename _Dom::value_type, _Dom >, typename __fun< struct std::__less_equal, typename _Dom::value_type >::result_type > std::operator<= (const typename _Dom::value_type &__t, const _Expr< _Dom, typename _Dom::value_type > &__v)
 
template<class _Dom >
_Expr< _BinClos< struct std::__less_equal, _ValArray, _Expr, typename _Dom::value_type, _Dom >, typename __fun< struct std::__less_equal, typename _Dom::value_type >::result_type > std::operator<= (const valarray< typename _Dom::value_type > &__v, const _Expr< _Dom, typename _Dom::value_type > &__e)
 
template<class _Dom >
_Expr< _BinClos< struct std::__equal_to, _Expr, _ValArray, _Dom, typename _Dom::value_type >, typename __fun< struct std::__equal_to, typename _Dom::value_type >::result_type > std::operator== (const _Expr< _Dom, typename _Dom::value_type > &__e, const valarray< typename _Dom::value_type > &__v)
 
template<class _Dom >
_Expr< _BinClos< struct std::__equal_to, _Expr, _Constant, _Dom, typename _Dom::value_type >, typename __fun< struct std::__equal_to, typename _Dom::value_type >::result_type > std::operator== (const _Expr< _Dom, typename _Dom::value_type > &__v, const typename _Dom::value_type &__t)
 
template<class _Dom1 , class _Dom2 >
_Expr< _BinClos< struct std::__equal_to, _Expr, _Expr, _Dom1, _Dom2 >, typename __fun< struct std::__equal_to, typename _Dom1::value_type >::result_type > std::operator== (const _Expr< _Dom1, typename _Dom1::value_type > &__v, const _Expr< _Dom2, typename _Dom2::value_type > &__w)
 
template<class _Dom >
_Expr< _BinClos< struct std::__equal_to, _Constant, _Expr, typename _Dom::value_type, _Dom >, typename __fun< struct std::__equal_to, typename _Dom::value_type >::result_type > std::operator== (const typename _Dom::value_type &__t, const _Expr< _Dom, typename _Dom::value_type > &__v)
 
template<class _Dom >
_Expr< _BinClos< struct std::__equal_to, _ValArray, _Expr, typename _Dom::value_type, _Dom >, typename __fun< struct std::__equal_to, typename _Dom::value_type >::result_type > std::operator== (const valarray< typename _Dom::value_type > &__v, const _Expr< _Dom, typename _Dom::value_type > &__e)
 
template<class _Dom >
_Expr< _BinClos< struct std::__greater, _Expr, _ValArray, _Dom, typename _Dom::value_type >, typename __fun< struct std::__greater, typename _Dom::value_type >::result_type > std::operator> (const _Expr< _Dom, typename _Dom::value_type > &__e, const valarray< typename _Dom::value_type > &__v)
 
template<class _Dom >
_Expr< _BinClos< struct std::__greater, _Expr, _Constant, _Dom, typename _Dom::value_type >, typename __fun< struct std::__greater, typename _Dom::value_type >::result_type > std::operator> (const _Expr< _Dom, typename _Dom::value_type > &__v, const typename _Dom::value_type &__t)
 
template<class _Dom1 , class _Dom2 >
_Expr< _BinClos< struct std::__greater, _Expr, _Expr, _Dom1, _Dom2 >, typename __fun< struct std::__greater, typename _Dom1::value_type >::result_type > std::operator> (const _Expr< _Dom1, typename _Dom1::value_type > &__v, const _Expr< _Dom2, typename _Dom2::value_type > &__w)
 
template<class _Dom >
_Expr< _BinClos< struct std::__greater, _Constant, _Expr, typename _Dom::value_type, _Dom >, typename __fun< struct std::__greater, typename _Dom::value_type >::result_type > std::operator> (const typename _Dom::value_type &__t, const _Expr< _Dom, typename _Dom::value_type > &__v)
 
template<class _Dom >
_Expr< _BinClos< struct std::__greater, _ValArray, _Expr, typename _Dom::value_type, _Dom >, typename __fun< struct std::__greater, typename _Dom::value_type >::result_type > std::operator> (const valarray< typename _Dom::value_type > &__v, const _Expr< _Dom, typename _Dom::value_type > &__e)
 
template<class _Dom >
_Expr< _BinClos< struct std::__greater_equal, _Expr, _ValArray, _Dom, typename _Dom::value_type >, typename __fun< struct std::__greater_equal, typename _Dom::value_type >::result_type > std::operator>= (const _Expr< _Dom, typename _Dom::value_type > &__e, const valarray< typename _Dom::value_type > &__v)
 
template<class _Dom >
_Expr< _BinClos< struct std::__greater_equal, _Expr, _Constant, _Dom, typename _Dom::value_type >, typename __fun< struct std::__greater_equal, typename _Dom::value_type >::result_type > std::operator>= (const _Expr< _Dom, typename _Dom::value_type > &__v, const typename _Dom::value_type &__t)
 
template<class _Dom1 , class _Dom2 >
_Expr< _BinClos< struct std::__greater_equal, _Expr, _Expr, _Dom1, _Dom2 >, typename __fun< struct std::__greater_equal, typename _Dom1::value_type >::result_type > std::operator>= (const _Expr< _Dom1, typename _Dom1::value_type > &__v, const _Expr< _Dom2, typename _Dom2::value_type > &__w)
 
template<class _Dom >
_Expr< _BinClos< struct std::__greater_equal, _Constant, _Expr, typename _Dom::value_type, _Dom >, typename __fun< struct std::__greater_equal, typename _Dom::value_type >::result_type > std::operator>= (const typename _Dom::value_type &__t, const _Expr< _Dom, typename _Dom::value_type > &__v)
 
template<class _Dom >
_Expr< _BinClos< struct std::__greater_equal, _ValArray, _Expr, typename _Dom::value_type, _Dom >, typename __fun< struct std::__greater_equal, typename _Dom::value_type >::result_type > std::operator>= (const valarray< typename _Dom::value_type > &__v, const _Expr< _Dom, typename _Dom::value_type > &__e)
 
template<class _Dom >
_Expr< _BinClos< struct std::__shift_right, _Expr, _ValArray, _Dom, typename _Dom::value_type >, typename __fun< struct std::__shift_right, typename _Dom::value_type >::result_type > std::operator>> (const _Expr< _Dom, typename _Dom::value_type > &__e, const valarray< typename _Dom::value_type > &__v)
 
template<class _Dom >
_Expr< _BinClos< struct std::__shift_right, _Expr, _Constant, _Dom, typename _Dom::value_type >, typename __fun< struct std::__shift_right, typename _Dom::value_type >::result_type > std::operator>> (const _Expr< _Dom, typename _Dom::value_type > &__v, const typename _Dom::value_type &__t)
 
template<class _Dom1 , class _Dom2 >
_Expr< _BinClos< struct std::__shift_right, _Expr, _Expr, _Dom1, _Dom2 >, typename __fun< struct std::__shift_right, typename _Dom1::value_type >::result_type > std::operator>> (const _Expr< _Dom1, typename _Dom1::value_type > &__v, const _Expr< _Dom2, typename _Dom2::value_type > &__w)
 
template<class _Dom >
_Expr< _BinClos< struct std::__shift_right, _Constant, _Expr, typename _Dom::value_type, _Dom >, typename __fun< struct std::__shift_right, typename _Dom::value_type >::result_type > std::operator>> (const typename _Dom::value_type &__t, const _Expr< _Dom, typename _Dom::value_type > &__v)
 
template<class _Dom >
_Expr< _BinClos< struct std::__shift_right, _ValArray, _Expr, typename _Dom::value_type, _Dom >, typename __fun< struct std::__shift_right, typename _Dom::value_type >::result_type > std::operator>> (const valarray< typename _Dom::value_type > &__v, const _Expr< _Dom, typename _Dom::value_type > &__e)
 
template<class _Dom >
_Expr< _BinClos< struct std::__bitwise_xor, _Expr, _ValArray, _Dom, typename _Dom::value_type >, typename __fun< struct std::__bitwise_xor, typename _Dom::value_type >::result_type > std::operator^ (const _Expr< _Dom, typename _Dom::value_type > &__e, const valarray< typename _Dom::value_type > &__v)
 
template<class _Dom >
_Expr< _BinClos< struct std::__bitwise_xor, _Expr, _Constant, _Dom, typename _Dom::value_type >, typename __fun< struct std::__bitwise_xor, typename _Dom::value_type >::result_type > std::operator^ (const _Expr< _Dom, typename _Dom::value_type > &__v, const typename _Dom::value_type &__t)
 
template<class _Dom1 , class _Dom2 >
_Expr< _BinClos< struct std::__bitwise_xor, _Expr, _Expr, _Dom1, _Dom2 >, typename __fun< struct std::__bitwise_xor, typename _Dom1::value_type >::result_type > std::operator^ (const _Expr< _Dom1, typename _Dom1::value_type > &__v, const _Expr< _Dom2, typename _Dom2::value_type > &__w)
 
template<class _Dom >
_Expr< _BinClos< struct std::__bitwise_xor, _Constant, _Expr, typename _Dom::value_type, _Dom >, typename __fun< struct std::__bitwise_xor, typename _Dom::value_type >::result_type > std::operator^ (const typename _Dom::value_type &__t, const _Expr< _Dom, typename _Dom::value_type > &__v)
 
template<class _Dom >
_Expr< _BinClos< struct std::__bitwise_xor, _ValArray, _Expr, typename _Dom::value_type, _Dom >, typename __fun< struct std::__bitwise_xor, typename _Dom::value_type >::result_type > std::operator^ (const valarray< typename _Dom::value_type > &__v, const _Expr< _Dom, typename _Dom::value_type > &__e)
 
template<class _Dom >
_Expr< _BinClos< struct std::__bitwise_or, _Expr, _ValArray, _Dom, typename _Dom::value_type >, typename __fun< struct std::__bitwise_or, typename _Dom::value_type >::result_type > std::operator| (const _Expr< _Dom, typename _Dom::value_type > &__e, const valarray< typename _Dom::value_type > &__v)
 
template<class _Dom >
_Expr< _BinClos< struct std::__bitwise_or, _Expr, _Constant, _Dom, typename _Dom::value_type >, typename __fun< struct std::__bitwise_or, typename _Dom::value_type >::result_type > std::operator| (const _Expr< _Dom, typename _Dom::value_type > &__v, const typename _Dom::value_type &__t)
 
template<class _Dom1 , class _Dom2 >
_Expr< _BinClos< struct std::__bitwise_or, _Expr, _Expr, _Dom1, _Dom2 >, typename __fun< struct std::__bitwise_or, typename _Dom1::value_type >::result_type > std::operator| (const _Expr< _Dom1, typename _Dom1::value_type > &__v, const _Expr< _Dom2, typename _Dom2::value_type > &__w)
 
template<class _Dom >
_Expr< _BinClos< struct std::__bitwise_or, _Constant, _Expr, typename _Dom::value_type, _Dom >, typename __fun< struct std::__bitwise_or, typename _Dom::value_type >::result_type > std::operator| (const typename _Dom::value_type &__t, const _Expr< _Dom, typename _Dom::value_type > &__v)
 
template<class _Dom >
_Expr< _BinClos< struct std::__bitwise_or, _ValArray, _Expr, typename _Dom::value_type, _Dom >, typename __fun< struct std::__bitwise_or, typename _Dom::value_type >::result_type > std::operator| (const valarray< typename _Dom::value_type > &__v, const _Expr< _Dom, typename _Dom::value_type > &__e)
 
template<class _Dom >
_Expr< _BinClos< struct std::__logical_or, _Expr, _ValArray, _Dom, typename _Dom::value_type >, typename __fun< struct std::__logical_or, typename _Dom::value_type >::result_type > std::operator|| (const _Expr< _Dom, typename _Dom::value_type > &__e, const valarray< typename _Dom::value_type > &__v)
 
template<class _Dom >
_Expr< _BinClos< struct std::__logical_or, _Expr, _Constant, _Dom, typename _Dom::value_type >, typename __fun< struct std::__logical_or, typename _Dom::value_type >::result_type > std::operator|| (const _Expr< _Dom, typename _Dom::value_type > &__v, const typename _Dom::value_type &__t)
 
template<class _Dom1 , class _Dom2 >
_Expr< _BinClos< struct std::__logical_or, _Expr, _Expr, _Dom1, _Dom2 >, typename __fun< struct std::__logical_or, typename _Dom1::value_type >::result_type > std::operator|| (const _Expr< _Dom1, typename _Dom1::value_type > &__v, const _Expr< _Dom2, typename _Dom2::value_type > &__w)
 
template<class _Dom >
_Expr< _BinClos< struct std::__logical_or, _Constant, _Expr, typename _Dom::value_type, _Dom >, typename __fun< struct std::__logical_or, typename _Dom::value_type >::result_type > std::operator|| (const typename _Dom::value_type &__t, const _Expr< _Dom, typename _Dom::value_type > &__v)
 
template<class _Dom >
_Expr< _BinClos< struct std::__logical_or, _ValArray, _Expr, typename _Dom::value_type, _Dom >, typename __fun< struct std::__logical_or, typename _Dom::value_type >::result_type > std::operator|| (const valarray< typename _Dom::value_type > &__v, const _Expr< _Dom, typename _Dom::value_type > &__e)
 
template<class _Dom >
_Expr< _BinClos< struct std::_Pow, _Expr, _Constant, _Dom, typename _Dom::value_type >, typename _Dom::value_type > std::pow (const _Expr< _Dom, typename _Dom::value_type > &__e, const typename _Dom::value_type &__t)
 
template<class _Dom >
_Expr< _BinClos< struct std::_Pow, _Expr, _ValArray, _Dom, typename _Dom::value_type >, typename _Dom::value_type > std::pow (const _Expr< _Dom, typename _Dom::value_type > &__e, const valarray< typename _Dom::value_type > &__v)
 
template<class _Dom1 , class _Dom2 >
_Expr< _BinClos< struct std::_Pow, _Expr, _Expr, _Dom1, _Dom2 >, typename _Dom1::value_type > std::pow (const _Expr< _Dom1, typename _Dom1::value_type > &__e1, const _Expr< _Dom2, typename _Dom2::value_type > &__e2)
 
template<class _Dom >
_Expr< _BinClos< struct std::_Pow, _Constant, _Expr, typename _Dom::value_type, _Dom >, typename _Dom::value_type > std::pow (const typename _Dom::value_type &__t, const _Expr< _Dom, typename _Dom::value_type > &__e)
 
template<typename _Tp >
_Expr< _BinClos< struct std::_Pow, _Constant, _ValArray, _Tp, _Tp >, _Tp > std::pow (const typename valarray< _Tp >::value_type &__t, const valarray< _Tp > &__v)
 
template<typename _Tp >
_Expr< _BinClos< struct std::_Pow, _ValArray, _Constant, _Tp, _Tp >, _Tp > std::pow (const valarray< _Tp > &__v, const typename valarray< _Tp >::value_type &__t)
 
template<typename _Tp >
_Expr< _BinClos< struct std::_Pow, _ValArray, _ValArray, _Tp, _Tp >, _Tp > std::pow (const valarray< _Tp > &__v, const valarray< _Tp > &__w)
 
template<class _Dom >
_Expr< _BinClos< struct std::_Pow, _ValArray, _Expr, typename _Dom::value_type, _Dom >, typename _Dom::value_type > std::pow (const valarray< typename _Dom::valarray > &__v, const _Expr< _Dom, typename _Dom::value_type > &__e)
 
template<class _Dom >
_Expr< _UnClos< struct std::_Sin, _Expr, _Dom >, typename _Dom::value_type > std::sin (const _Expr< _Dom, typename _Dom::value_type > &__e)
 
template<typename _Tp >
_Expr< _UnClos< struct std::_Sin, _ValArray, _Tp >, _Tp > std::sin (const valarray< _Tp > &__v)
 
template<class _Dom >
_Expr< _UnClos< struct std::_Sinh, _Expr, _Dom >, typename _Dom::value_type > std::sinh (const _Expr< _Dom, typename _Dom::value_type > &__e)
 
template<typename _Tp >
_Expr< _UnClos< struct std::_Sinh, _ValArray, _Tp >, _Tp > std::sinh (const valarray< _Tp > &__v)
 
template<class _Dom >
_Expr< _UnClos< struct std::_Sqrt, _Expr, _Dom >, typename _Dom::value_type > std::sqrt (const _Expr< _Dom, typename _Dom::value_type > &__e)
 
template<typename _Tp >
_Expr< _UnClos< struct std::_Sqrt, _ValArray, _Tp >, _Tp > std::sqrt (const valarray< _Tp > &__v)
 
template<class _Dom >
_Expr< _UnClos< struct std::_Tan, _Expr, _Dom >, typename _Dom::value_type > std::tan (const _Expr< _Dom, typename _Dom::value_type > &__e)
 
template<typename _Tp >
_Expr< _UnClos< struct std::_Tan, _ValArray, _Tp >, _Tp > std::tan (const valarray< _Tp > &__v)
 
template<class _Dom >
_Expr< _UnClos< struct std::_Tanh, _Expr, _Dom >, typename _Dom::value_type > std::tanh (const _Expr< _Dom, typename _Dom::value_type > &__e)
 
template<typename _Tp >
_Expr< _UnClos< struct std::_Tanh, _ValArray, _Tp >, _Tp > std::tanh (const valarray< _Tp > &__v)
 
│ │ │

Detailed Description

│ │ │ -

This is an internal header file, included by other library headers. Do not attempt to use it directly. Instead, include <valarray>.

│ │ │ - │ │ │ -

Definition in file valarray_after.h.

│ │ │ -

Macro Definition Documentation

│ │ │ - │ │ │ -

◆ _DEFINE_EXPR_BINARY_FUNCTION

│ │ │ - │ │ │ -
│ │ │ -
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
#define _DEFINE_EXPR_BINARY_FUNCTION( _Fun,
 _UFun 
)
│ │ │ -
│ │ │ - │ │ │ -

Definition at line 462 of file valarray_after.h.

│ │ │ - │ │ │ -
│ │ │ -
│ │ │ - │ │ │ -

◆ _DEFINE_EXPR_BINARY_OPERATOR

│ │ │ - │ │ │ -
│ │ │ -
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
#define _DEFINE_EXPR_BINARY_OPERATOR( _Op,
 _Name 
)
│ │ │ -
│ │ │ - │ │ │ -

Definition at line 340 of file valarray_after.h.

│ │ │ +

This is an internal header file, included by other library headers. Do not attempt to use it directly. Instead, include <mutex>.

│ │ │ │ │ │ -
│ │ │ -
│ │ │ - │ │ │ -

◆ _DEFINE_EXPR_UNARY_FUNCTION

│ │ │ - │ │ │ -
│ │ │ -
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
#define _DEFINE_EXPR_UNARY_FUNCTION( _Name,
 _UName 
)
│ │ │ -
│ │ │ - │ │ │ -

Definition at line 426 of file valarray_after.h.

│ │ │ - │ │ │ -
│ │ │ -
│ │ │ - │ │ │ -

◆ _DEFINE_EXPR_UNARY_OPERATOR

│ │ │ - │ │ │ -
│ │ │ -
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
#define _DEFINE_EXPR_UNARY_OPERATOR( _Op,
 _Name 
)
│ │ │ -
│ │ │ - │ │ │ -

Definition at line 325 of file valarray_after.h.

│ │ │ - │ │ │ -
│ │ │ -
│ │ │ -
│ │ │ +

Definition in file unique_lock.h.

│ │ │ +
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,931 +1,17 @@ │ │ │ │ libstdc++ │ │ │ │ -_N_a_m_e_s_p_a_c_e_s | _M_a_c_r_o_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -valarray_after.h File Reference │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ +unique_lock.h File Reference │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ +CCllaasssseess │ │ │ │ +class   _s_t_d_:_:_u_n_i_q_u_e___l_o_c_k_<_ ___M_u_t_e_x_ _> │ │ │ │ +  │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _s_t_d │ │ │ │   │ │ │ │ -namespace   _s_t_d_:_:_____d_e_t_a_i_l │ │ │ │ -  │ │ │ │ -MMaaccrrooss │ │ │ │ -#define  ___D_E_F_I_N_E___E_X_P_R___B_I_N_A_R_Y___F_U_N_C_T_I_O_N(_Fun, _UFun) │ │ │ │ -  │ │ │ │ -#define  ___D_E_F_I_N_E___E_X_P_R___B_I_N_A_R_Y___O_P_E_R_A_T_O_R(_Op, _Name) │ │ │ │ -  │ │ │ │ -#define  ___D_E_F_I_N_E___E_X_P_R___U_N_A_R_Y___F_U_N_C_T_I_O_N(_Name, _UName) │ │ │ │ -  │ │ │ │ -#define  ___D_E_F_I_N_E___E_X_P_R___U_N_A_R_Y___O_P_E_R_A_T_O_R(_Op, _Name) │ │ │ │ -  │ │ │ │ -FFuunnccttiioonnss │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _UnClos< _s_t_r_u_c_t std::_Abs, │ │ │ │ - _Expr, ___D_o_m >, _t_y_p_e_n_a_m_e _Dom:: _s_t_d_:_:_a_b_s (const _Expr< ___D_o_m, _t_y_p_e_n_a_m_e │ │ │ │ - value_type >  _Dom::value_type > &__e) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _Expr< _UnClos< _s_t_r_u_c_t std::_Abs, │ │ │ │ - _ValArray, _Tp >, _Tp >  _s_t_d_:_:_a_b_s (const _v_a_l_a_r_r_a_y< _Tp > &_____v) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _UnClos< _s_t_r_u_c_t std::_Acos, │ │ │ │ - _Expr, ___D_o_m >, _t_y_p_e_n_a_m_e _Dom:: _s_t_d_:_:_a_c_o_s (const _Expr< ___D_o_m, _t_y_p_e_n_a_m_e │ │ │ │ - value_type >  _Dom::value_type > &__e) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _Expr< _UnClos< _s_t_r_u_c_t std::_Acos, │ │ │ │ - _ValArray, _Tp >, _Tp >  _s_t_d_:_:_a_c_o_s (const _v_a_l_a_r_r_a_y< _Tp > &_____v) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _UnClos< _s_t_r_u_c_t std::_Asin, │ │ │ │ - _Expr, ___D_o_m >, _t_y_p_e_n_a_m_e _Dom:: _s_t_d_:_:_a_s_i_n (const _Expr< ___D_o_m, _t_y_p_e_n_a_m_e │ │ │ │ - value_type >  _Dom::value_type > &__e) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _Expr< _UnClos< _s_t_r_u_c_t std::_Asin, │ │ │ │ - _ValArray, _Tp >, _Tp >  _s_t_d_:_:_a_s_i_n (const _v_a_l_a_r_r_a_y< _Tp > &_____v) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _UnClos< _s_t_r_u_c_t std::_Atan, │ │ │ │ - _Expr, ___D_o_m >, _t_y_p_e_n_a_m_e _Dom:: _s_t_d_:_:_a_t_a_n (const _Expr< ___D_o_m, _t_y_p_e_n_a_m_e │ │ │ │ - value_type >  _Dom::value_type > &__e) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _Expr< _UnClos< _s_t_r_u_c_t std::_Atan, │ │ │ │ - _ValArray, _Tp >, _Tp >  _s_t_d_:_:_a_t_a_n (const _v_a_l_a_r_r_a_y< _Tp > &_____v) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std::_Atan2, │ │ │ │ -_Expr, _Constant, ___D_o_m, _t_y_p_e_n_a_m_e _Dom:: _s_t_d_:_:_a_t_a_n_2 (const _Expr< ___D_o_m, _t_y_p_e_n_a_m_e │ │ │ │ -value_type >, _t_y_p_e_n_a_m_e _Dom::value_type _Dom::value_type > &__e, const _t_y_p_e_n_a_m_e │ │ │ │ - >  _Dom::value_type &__t) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std::_Atan2, _s_t_d_:_:_a_t_a_n_2 (const _Expr< ___D_o_m, _t_y_p_e_n_a_m_e │ │ │ │ -_Expr, _ValArray, ___D_o_m, _t_y_p_e_n_a_m_e _Dom:: _Dom::value_type > &__e, const │ │ │ │ -value_type >, _t_y_p_e_n_a_m_e _Dom::value_type _v_a_l_a_r_r_a_y< _t_y_p_e_n_a_m_e _Dom::value_type > │ │ │ │ - >  &_____v) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m_1 , _c_l_a_s_s ___D_o_m_2 > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std::_Atan2, _s_t_d_:_:_a_t_a_n_2 (const _Expr< ___D_o_m_1, │ │ │ │ - _Expr, _Expr, ___D_o_m_1, ___D_o_m_2 >, _t_y_p_e_n_a_m_e _t_y_p_e_n_a_m_e _Dom1::value_type > &_____e_1, │ │ │ │ - _Dom1::value_type >  const _Expr< ___D_o_m_2, _t_y_p_e_n_a_m_e _Dom2:: │ │ │ │ - value_type > &_____e_2) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std::_Atan2, │ │ │ │ - _Constant, _Expr, _t_y_p_e_n_a_m_e _Dom:: _s_t_d_:_:_a_t_a_n_2 (const _t_y_p_e_n_a_m_e _Dom:: │ │ │ │ - value_type, ___D_o_m >, _t_y_p_e_n_a_m_e _Dom:: value_type &__t, const _Expr< ___D_o_m, │ │ │ │ - value_type >  _t_y_p_e_n_a_m_e _Dom::value_type > &__e) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std::_Atan2, _s_t_d_:_:_a_t_a_n_2 (const _t_y_p_e_n_a_m_e _v_a_l_a_r_r_a_y< │ │ │ │ - _Constant, _ValArray, _Tp, _Tp >, _Tp _Tp >::value_type &__t, const _v_a_l_a_r_r_a_y< │ │ │ │ - >  _Tp > &_____v) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std::_Atan2, _s_t_d_:_:_a_t_a_n_2 (const _v_a_l_a_r_r_a_y< _Tp > &_____v, │ │ │ │ - _ValArray, _Constant, _Tp, _Tp >, _Tp const _t_y_p_e_n_a_m_e _v_a_l_a_r_r_a_y< _Tp >:: │ │ │ │ - >  value_type &__t) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std::_Atan2, │ │ │ │ - _ValArray, _ValArray, _Tp, _Tp >, _Tp _s_t_d_:_:_a_t_a_n_2 (const _v_a_l_a_r_r_a_y< _Tp > &_____v, │ │ │ │ - >  const _v_a_l_a_r_r_a_y< _Tp > &_____w) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std::_Atan2, │ │ │ │ - _ValArray, _Expr, _t_y_p_e_n_a_m_e _Dom:: _s_t_d_:_:_a_t_a_n_2 (const _v_a_l_a_r_r_a_y< _t_y_p_e_n_a_m_e │ │ │ │ - value_type, ___D_o_m >, _t_y_p_e_n_a_m_e _Dom:: _Dom::valarray > &_____v, const _Expr< │ │ │ │ - value_type >  ___D_o_m, _t_y_p_e_n_a_m_e _Dom::value_type > &__e) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _UnClos< _s_t_r_u_c_t std::_Cos, │ │ │ │ - _Expr, ___D_o_m >, _t_y_p_e_n_a_m_e _Dom:: _s_t_d_:_:_c_o_s (const _Expr< ___D_o_m, _t_y_p_e_n_a_m_e │ │ │ │ - value_type >  _Dom::value_type > &__e) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _Expr< _UnClos< _s_t_r_u_c_t std::_Cos, │ │ │ │ - _ValArray, _Tp >, _Tp >  _s_t_d_:_:_c_o_s (const _v_a_l_a_r_r_a_y< _Tp > &_____v) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _UnClos< _s_t_r_u_c_t std::_Cosh, │ │ │ │ - _Expr, ___D_o_m >, _t_y_p_e_n_a_m_e _Dom:: _s_t_d_:_:_c_o_s_h (const _Expr< ___D_o_m, _t_y_p_e_n_a_m_e │ │ │ │ - value_type >  _Dom::value_type > &__e) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _Expr< _UnClos< _s_t_r_u_c_t std::_Cosh, │ │ │ │ - _ValArray, _Tp >, _Tp >  _s_t_d_:_:_c_o_s_h (const _v_a_l_a_r_r_a_y< _Tp > &_____v) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _UnClos< _s_t_r_u_c_t std::_Exp, │ │ │ │ - _Expr, ___D_o_m >, _t_y_p_e_n_a_m_e _Dom:: _s_t_d_:_:_e_x_p (const _Expr< ___D_o_m, _t_y_p_e_n_a_m_e │ │ │ │ - value_type >  _Dom::value_type > &__e) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _Expr< _UnClos< _s_t_r_u_c_t std::_Exp, │ │ │ │ - _ValArray, _Tp >, _Tp >  _s_t_d_:_:_e_x_p (const _v_a_l_a_r_r_a_y< _Tp > &_____v) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _UnClos< _s_t_r_u_c_t std::_Log, │ │ │ │ - _Expr, ___D_o_m >, _t_y_p_e_n_a_m_e _Dom:: _s_t_d_:_:_l_o_g (const _Expr< ___D_o_m, _t_y_p_e_n_a_m_e │ │ │ │ - value_type >  _Dom::value_type > &__e) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _Expr< _UnClos< _s_t_r_u_c_t std::_Log, │ │ │ │ - _ValArray, _Tp >, _Tp >  _s_t_d_:_:_l_o_g (const _v_a_l_a_r_r_a_y< _Tp > &_____v) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _UnClos< _s_t_r_u_c_t std::_Log10, │ │ │ │ - _Expr, ___D_o_m >, _t_y_p_e_n_a_m_e _Dom:: _s_t_d_:_:_l_o_g_1_0 (const _Expr< ___D_o_m, _t_y_p_e_n_a_m_e │ │ │ │ - value_type >  _Dom::value_type > &__e) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _Expr< _UnClos< _s_t_r_u_c_t std::_Log10, │ │ │ │ - _ValArray, _Tp >, _Tp >  _s_t_d_:_:_l_o_g_1_0 (const _v_a_l_a_r_r_a_y< _Tp > &_____v) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std:: │ │ │ │ -__not_equal_to, _Expr, _ValArray, ___D_o_m, │ │ │ │ - _t_y_p_e_n_a_m_e _Dom::value_type >, _t_y_p_e_n_a_m_e _s_t_d_:_:_o_p_e_r_a_t_o_r_!_= (const _Expr< ___D_o_m, │ │ │ │ - __fun< _s_t_r_u_c_t std::__not_equal_to, _t_y_p_e_n_a_m_e _Dom::value_type > &__e, const │ │ │ │ - _t_y_p_e_n_a_m_e _Dom::value_type >:: _v_a_l_a_r_r_a_y< _t_y_p_e_n_a_m_e _Dom::value_type > │ │ │ │ - result_type >  &_____v) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std:: │ │ │ │ -__not_equal_to, _Expr, _Constant, ___D_o_m, │ │ │ │ - _t_y_p_e_n_a_m_e _Dom::value_type >, _t_y_p_e_n_a_m_e │ │ │ │ - __fun< _s_t_r_u_c_t std::__not_equal_to, _s_t_d_:_:_o_p_e_r_a_t_o_r_!_= (const _Expr< ___D_o_m, │ │ │ │ - _t_y_p_e_n_a_m_e _Dom::value_type >:: _t_y_p_e_n_a_m_e _Dom::value_type > &_____v, const │ │ │ │ - result_type >  _t_y_p_e_n_a_m_e _Dom::value_type &__t) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m_1 , _c_l_a_s_s ___D_o_m_2 > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std:: │ │ │ │ - __not_equal_to, _Expr, _Expr, ___D_o_m_1, _s_t_d_:_:_o_p_e_r_a_t_o_r_!_= (const _Expr< ___D_o_m_1, │ │ │ │ - ___D_o_m_2 >, _t_y_p_e_n_a_m_e __fun< _s_t_r_u_c_t std:: _t_y_p_e_n_a_m_e _Dom1::value_type > &_____v, │ │ │ │ - __not_equal_to, _t_y_p_e_n_a_m_e _Dom1:: const _Expr< ___D_o_m_2, _t_y_p_e_n_a_m_e _Dom2:: │ │ │ │ - value_type >::result_type >  value_type > &_____w) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std:: │ │ │ │ - __not_equal_to, _Constant, _Expr, │ │ │ │ - _t_y_p_e_n_a_m_e _Dom::value_type, ___D_o_m >, │ │ │ │ - _t_y_p_e_n_a_m_e __fun< _s_t_r_u_c_t std:: _s_t_d_:_:_o_p_e_r_a_t_o_r_!_= (const _t_y_p_e_n_a_m_e _Dom:: │ │ │ │ - __not_equal_to, _t_y_p_e_n_a_m_e _Dom:: value_type &__t, const _Expr< ___D_o_m, │ │ │ │ - value_type >::result_type >  _t_y_p_e_n_a_m_e _Dom::value_type > &_____v) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std:: │ │ │ │ - __not_equal_to, _ValArray, _Expr, │ │ │ │ - _t_y_p_e_n_a_m_e _Dom::value_type, ___D_o_m >, _s_t_d_:_:_o_p_e_r_a_t_o_r_!_= (const _v_a_l_a_r_r_a_y< │ │ │ │ - _t_y_p_e_n_a_m_e __fun< _s_t_r_u_c_t std:: _t_y_p_e_n_a_m_e _Dom::value_type > &_____v, const │ │ │ │ - __not_equal_to, _t_y_p_e_n_a_m_e _Dom:: _Expr< ___D_o_m, _t_y_p_e_n_a_m_e _Dom::value_type │ │ │ │ - value_type >::result_type >  > &__e) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ -_Expr< _BinClos< _s_t_r_u_c_t std::__modulus, │ │ │ │ -_Expr, _ValArray, ___D_o_m, _t_y_p_e_n_a_m_e _Dom:: _s_t_d_:_:_o_p_e_r_a_t_o_r_% (const _Expr< ___D_o_m, │ │ │ │ - value_type >, _t_y_p_e_n_a_m_e __fun< _s_t_r_u_c_t _t_y_p_e_n_a_m_e _Dom::value_type > &__e, const │ │ │ │ - std::__modulus, _t_y_p_e_n_a_m_e _Dom:: _v_a_l_a_r_r_a_y< _t_y_p_e_n_a_m_e _Dom::value_type > │ │ │ │ - value_type >::result_type >  &_____v) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ -_Expr< _BinClos< _s_t_r_u_c_t std::__modulus, │ │ │ │ -_Expr, _Constant, ___D_o_m, _t_y_p_e_n_a_m_e _Dom:: │ │ │ │ - value_type >, _t_y_p_e_n_a_m_e __fun< _s_t_r_u_c_t _s_t_d_:_:_o_p_e_r_a_t_o_r_% (const _Expr< ___D_o_m, │ │ │ │ - std::__modulus, _t_y_p_e_n_a_m_e _Dom:: _t_y_p_e_n_a_m_e _Dom::value_type > &_____v, const │ │ │ │ - value_type >::result_type >  _t_y_p_e_n_a_m_e _Dom::value_type &__t) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m_1 , _c_l_a_s_s ___D_o_m_2 > │ │ │ │ -_Expr< _BinClos< _s_t_r_u_c_t std::__modulus, _s_t_d_:_:_o_p_e_r_a_t_o_r_% (const _Expr< ___D_o_m_1, │ │ │ │ - _Expr, _Expr, ___D_o_m_1, ___D_o_m_2 >, _t_y_p_e_n_a_m_e _t_y_p_e_n_a_m_e _Dom1::value_type > &_____v, │ │ │ │ - __fun< _s_t_r_u_c_t std::__modulus, _t_y_p_e_n_a_m_e const _Expr< ___D_o_m_2, _t_y_p_e_n_a_m_e _Dom2:: │ │ │ │ - _Dom1::value_type >::result_type >  value_type > &_____w) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ -_Expr< _BinClos< _s_t_r_u_c_t std::__modulus, │ │ │ │ - _Constant, _Expr, _t_y_p_e_n_a_m_e _Dom:: │ │ │ │ - value_type, ___D_o_m >, _t_y_p_e_n_a_m_e __fun< _s_t_d_:_:_o_p_e_r_a_t_o_r_% (const _t_y_p_e_n_a_m_e _Dom:: │ │ │ │ - _s_t_r_u_c_t std::__modulus, _t_y_p_e_n_a_m_e _Dom:: value_type &__t, const _Expr< ___D_o_m, │ │ │ │ - value_type >::result_type >  _t_y_p_e_n_a_m_e _Dom::value_type > &_____v) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ -_Expr< _BinClos< _s_t_r_u_c_t std::__modulus, │ │ │ │ - _ValArray, _Expr, _t_y_p_e_n_a_m_e _Dom:: _s_t_d_:_:_o_p_e_r_a_t_o_r_% (const _v_a_l_a_r_r_a_y< │ │ │ │ - value_type, ___D_o_m >, _t_y_p_e_n_a_m_e __fun< _t_y_p_e_n_a_m_e _Dom::value_type > &_____v, const │ │ │ │ - _s_t_r_u_c_t std::__modulus, _t_y_p_e_n_a_m_e _Dom:: _Expr< ___D_o_m, _t_y_p_e_n_a_m_e _Dom::value_type │ │ │ │ - value_type >::result_type >  > &__e) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std:: │ │ │ │ - __bitwise_and, _Expr, _ValArray, ___D_o_m, │ │ │ │ - _t_y_p_e_n_a_m_e _Dom::value_type >, _t_y_p_e_n_a_m_e _s_t_d_:_:_o_p_e_r_a_t_o_r_& (const _Expr< ___D_o_m, │ │ │ │ - __fun< _s_t_r_u_c_t std::__bitwise_and, _t_y_p_e_n_a_m_e _Dom::value_type > &__e, const │ │ │ │ - _t_y_p_e_n_a_m_e _Dom::value_type >:: _v_a_l_a_r_r_a_y< _t_y_p_e_n_a_m_e _Dom::value_type > │ │ │ │ - result_type >  &_____v) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std:: │ │ │ │ - __bitwise_and, _Expr, _Constant, ___D_o_m, │ │ │ │ - _t_y_p_e_n_a_m_e _Dom::value_type >, _t_y_p_e_n_a_m_e │ │ │ │ - __fun< _s_t_r_u_c_t std::__bitwise_and, _s_t_d_:_:_o_p_e_r_a_t_o_r_& (const _Expr< ___D_o_m, │ │ │ │ - _t_y_p_e_n_a_m_e _Dom::value_type >:: _t_y_p_e_n_a_m_e _Dom::value_type > &_____v, const │ │ │ │ - result_type >  _t_y_p_e_n_a_m_e _Dom::value_type &__t) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m_1 , _c_l_a_s_s ___D_o_m_2 > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std:: │ │ │ │ - __bitwise_and, _Expr, _Expr, ___D_o_m_1, _s_t_d_:_:_o_p_e_r_a_t_o_r_& (const _Expr< ___D_o_m_1, │ │ │ │ - ___D_o_m_2 >, _t_y_p_e_n_a_m_e __fun< _s_t_r_u_c_t std:: _t_y_p_e_n_a_m_e _Dom1::value_type > &_____v, │ │ │ │ - __bitwise_and, _t_y_p_e_n_a_m_e _Dom1:: const _Expr< ___D_o_m_2, _t_y_p_e_n_a_m_e _Dom2:: │ │ │ │ - value_type >::result_type >  value_type > &_____w) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std:: │ │ │ │ - __bitwise_and, _Constant, _Expr, │ │ │ │ - _t_y_p_e_n_a_m_e _Dom::value_type, ___D_o_m >, │ │ │ │ - _t_y_p_e_n_a_m_e __fun< _s_t_r_u_c_t std:: _s_t_d_:_:_o_p_e_r_a_t_o_r_& (const _t_y_p_e_n_a_m_e _Dom:: │ │ │ │ - __bitwise_and, _t_y_p_e_n_a_m_e _Dom:: value_type &__t, const _Expr< ___D_o_m, │ │ │ │ - value_type >::result_type >  _t_y_p_e_n_a_m_e _Dom::value_type > &_____v) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std:: │ │ │ │ - __bitwise_and, _ValArray, _Expr, │ │ │ │ - _t_y_p_e_n_a_m_e _Dom::value_type, ___D_o_m >, _s_t_d_:_:_o_p_e_r_a_t_o_r_& (const _v_a_l_a_r_r_a_y< │ │ │ │ - _t_y_p_e_n_a_m_e __fun< _s_t_r_u_c_t std:: _t_y_p_e_n_a_m_e _Dom::value_type > &_____v, const │ │ │ │ - __bitwise_and, _t_y_p_e_n_a_m_e _Dom:: _Expr< ___D_o_m, _t_y_p_e_n_a_m_e _Dom::value_type │ │ │ │ - value_type >::result_type >  > &__e) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std:: │ │ │ │ - __logical_and, _Expr, _ValArray, ___D_o_m, │ │ │ │ - _t_y_p_e_n_a_m_e _Dom::value_type >, _t_y_p_e_n_a_m_e _s_t_d_:_:_o_p_e_r_a_t_o_r_&_& (const _Expr< ___D_o_m, │ │ │ │ - __fun< _s_t_r_u_c_t std::__logical_and, _t_y_p_e_n_a_m_e _Dom::value_type > &__e, const │ │ │ │ - _t_y_p_e_n_a_m_e _Dom::value_type >:: _v_a_l_a_r_r_a_y< _t_y_p_e_n_a_m_e _Dom::value_type > │ │ │ │ - result_type >  &_____v) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std:: │ │ │ │ - __logical_and, _Expr, _Constant, ___D_o_m, │ │ │ │ - _t_y_p_e_n_a_m_e _Dom::value_type >, _t_y_p_e_n_a_m_e │ │ │ │ - __fun< _s_t_r_u_c_t std::__logical_and, _s_t_d_:_:_o_p_e_r_a_t_o_r_&_& (const _Expr< ___D_o_m, │ │ │ │ - _t_y_p_e_n_a_m_e _Dom::value_type >:: _t_y_p_e_n_a_m_e _Dom::value_type > &_____v, const │ │ │ │ - result_type >  _t_y_p_e_n_a_m_e _Dom::value_type &__t) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m_1 , _c_l_a_s_s ___D_o_m_2 > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std:: │ │ │ │ - __logical_and, _Expr, _Expr, ___D_o_m_1, _s_t_d_:_:_o_p_e_r_a_t_o_r_&_& (const _Expr< ___D_o_m_1, │ │ │ │ - ___D_o_m_2 >, _t_y_p_e_n_a_m_e __fun< _s_t_r_u_c_t std:: _t_y_p_e_n_a_m_e _Dom1::value_type > &_____v, │ │ │ │ - __logical_and, _t_y_p_e_n_a_m_e _Dom1:: const _Expr< ___D_o_m_2, _t_y_p_e_n_a_m_e _Dom2:: │ │ │ │ - value_type >::result_type >  value_type > &_____w) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std:: │ │ │ │ - __logical_and, _Constant, _Expr, │ │ │ │ - _t_y_p_e_n_a_m_e _Dom::value_type, ___D_o_m >, │ │ │ │ - _t_y_p_e_n_a_m_e __fun< _s_t_r_u_c_t std:: _s_t_d_:_:_o_p_e_r_a_t_o_r_&_& (const _t_y_p_e_n_a_m_e _Dom:: │ │ │ │ - __logical_and, _t_y_p_e_n_a_m_e _Dom:: value_type &__t, const _Expr< ___D_o_m, │ │ │ │ - value_type >::result_type >  _t_y_p_e_n_a_m_e _Dom::value_type > &_____v) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std:: │ │ │ │ - __logical_and, _ValArray, _Expr, │ │ │ │ - _t_y_p_e_n_a_m_e _Dom::value_type, ___D_o_m >, _s_t_d_:_:_o_p_e_r_a_t_o_r_&_& (const _v_a_l_a_r_r_a_y< │ │ │ │ - _t_y_p_e_n_a_m_e __fun< _s_t_r_u_c_t std:: _t_y_p_e_n_a_m_e _Dom::value_type > &_____v, const │ │ │ │ - __logical_and, _t_y_p_e_n_a_m_e _Dom:: _Expr< ___D_o_m, _t_y_p_e_n_a_m_e _Dom::value_type │ │ │ │ - value_type >::result_type >  > &__e) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std:: │ │ │ │ - __multiplies, _Expr, _ValArray, ___D_o_m, │ │ │ │ - _t_y_p_e_n_a_m_e _Dom::value_type >, _t_y_p_e_n_a_m_e _s_t_d_:_:_o_p_e_r_a_t_o_r_* (const _Expr< ___D_o_m, │ │ │ │ - __fun< _s_t_r_u_c_t std::__multiplies, _t_y_p_e_n_a_m_e _Dom::value_type > &__e, const │ │ │ │ - _t_y_p_e_n_a_m_e _Dom::value_type >:: _v_a_l_a_r_r_a_y< _t_y_p_e_n_a_m_e _Dom::value_type > │ │ │ │ - result_type >  &_____v) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std:: │ │ │ │ - __multiplies, _Expr, _Constant, ___D_o_m, │ │ │ │ - _t_y_p_e_n_a_m_e _Dom::value_type >, _t_y_p_e_n_a_m_e │ │ │ │ - __fun< _s_t_r_u_c_t std::__multiplies, _s_t_d_:_:_o_p_e_r_a_t_o_r_* (const _Expr< ___D_o_m, │ │ │ │ - _t_y_p_e_n_a_m_e _Dom::value_type >:: _t_y_p_e_n_a_m_e _Dom::value_type > &_____v, const │ │ │ │ - result_type >  _t_y_p_e_n_a_m_e _Dom::value_type &__t) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m_1 , _c_l_a_s_s ___D_o_m_2 > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std:: │ │ │ │ - __multiplies, _Expr, _Expr, ___D_o_m_1, _s_t_d_:_:_o_p_e_r_a_t_o_r_* (const _Expr< ___D_o_m_1, │ │ │ │ - ___D_o_m_2 >, _t_y_p_e_n_a_m_e __fun< _s_t_r_u_c_t std:: _t_y_p_e_n_a_m_e _Dom1::value_type > &_____v, │ │ │ │ - __multiplies, _t_y_p_e_n_a_m_e _Dom1:: const _Expr< ___D_o_m_2, _t_y_p_e_n_a_m_e _Dom2:: │ │ │ │ - value_type >::result_type >  value_type > &_____w) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std:: │ │ │ │ - __multiplies, _Constant, _Expr, │ │ │ │ - _t_y_p_e_n_a_m_e _Dom::value_type, ___D_o_m >, │ │ │ │ - _t_y_p_e_n_a_m_e __fun< _s_t_r_u_c_t std:: _s_t_d_:_:_o_p_e_r_a_t_o_r_* (const _t_y_p_e_n_a_m_e _Dom:: │ │ │ │ -__multiplies, _t_y_p_e_n_a_m_e _Dom::value_type value_type &__t, const _Expr< ___D_o_m, │ │ │ │ - >::result_type >  _t_y_p_e_n_a_m_e _Dom::value_type > &_____v) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std:: │ │ │ │ - __multiplies, _ValArray, _Expr, │ │ │ │ - _t_y_p_e_n_a_m_e _Dom::value_type, ___D_o_m >, _s_t_d_:_:_o_p_e_r_a_t_o_r_* (const _v_a_l_a_r_r_a_y< │ │ │ │ - _t_y_p_e_n_a_m_e __fun< _s_t_r_u_c_t std:: _t_y_p_e_n_a_m_e _Dom::value_type > &_____v, const │ │ │ │ -__multiplies, _t_y_p_e_n_a_m_e _Dom::value_type _Expr< ___D_o_m, _t_y_p_e_n_a_m_e _Dom::value_type │ │ │ │ - >::result_type >  > &__e) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std::__plus, │ │ │ │ -_Expr, _ValArray, ___D_o_m, _t_y_p_e_n_a_m_e _Dom:: _s_t_d_:_:_o_p_e_r_a_t_o_r_+ (const _Expr< ___D_o_m, │ │ │ │ - value_type >, _t_y_p_e_n_a_m_e __fun< _s_t_r_u_c_t _t_y_p_e_n_a_m_e _Dom::value_type > &__e, const │ │ │ │ - std::__plus, _t_y_p_e_n_a_m_e _Dom::value_type _v_a_l_a_r_r_a_y< _t_y_p_e_n_a_m_e _Dom::value_type > │ │ │ │ - >::result_type >  &_____v) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std::__plus, │ │ │ │ -_Expr, _Constant, ___D_o_m, _t_y_p_e_n_a_m_e _Dom:: │ │ │ │ - value_type >, _t_y_p_e_n_a_m_e __fun< _s_t_r_u_c_t _s_t_d_:_:_o_p_e_r_a_t_o_r_+ (const _Expr< ___D_o_m, │ │ │ │ - std::__plus, _t_y_p_e_n_a_m_e _Dom::value_type _t_y_p_e_n_a_m_e _Dom::value_type > &_____v, const │ │ │ │ - >::result_type >  _t_y_p_e_n_a_m_e _Dom::value_type &__t) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m_1 , _c_l_a_s_s ___D_o_m_2 > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std::__plus, _s_t_d_:_:_o_p_e_r_a_t_o_r_+ (const _Expr< ___D_o_m_1, │ │ │ │ - _Expr, _Expr, ___D_o_m_1, ___D_o_m_2 >, _t_y_p_e_n_a_m_e _t_y_p_e_n_a_m_e _Dom1::value_type > &_____v, │ │ │ │ - __fun< _s_t_r_u_c_t std::__plus, _t_y_p_e_n_a_m_e const _Expr< ___D_o_m_2, _t_y_p_e_n_a_m_e _Dom2:: │ │ │ │ - _Dom1::value_type >::result_type >  value_type > &_____w) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std::__plus, │ │ │ │ - _Constant, _Expr, _t_y_p_e_n_a_m_e _Dom:: │ │ │ │ - value_type, ___D_o_m >, _t_y_p_e_n_a_m_e __fun< _s_t_d_:_:_o_p_e_r_a_t_o_r_+ (const _t_y_p_e_n_a_m_e _Dom:: │ │ │ │ - _s_t_r_u_c_t std::__plus, _t_y_p_e_n_a_m_e _Dom:: value_type &__t, const _Expr< ___D_o_m, │ │ │ │ - value_type >::result_type >  _t_y_p_e_n_a_m_e _Dom::value_type > &_____v) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std::__plus, │ │ │ │ - _ValArray, _Expr, _t_y_p_e_n_a_m_e _Dom:: _s_t_d_:_:_o_p_e_r_a_t_o_r_+ (const _v_a_l_a_r_r_a_y< │ │ │ │ - value_type, ___D_o_m >, _t_y_p_e_n_a_m_e __fun< _t_y_p_e_n_a_m_e _Dom::value_type > &_____v, const │ │ │ │ - _s_t_r_u_c_t std::__plus, _t_y_p_e_n_a_m_e _Dom:: _Expr< ___D_o_m, _t_y_p_e_n_a_m_e _Dom::value_type │ │ │ │ - value_type >::result_type >  > &__e) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std::__minus, │ │ │ │ -_Expr, _ValArray, ___D_o_m, _t_y_p_e_n_a_m_e _Dom:: _s_t_d_:_:_o_p_e_r_a_t_o_r_- (const _Expr< ___D_o_m, │ │ │ │ - value_type >, _t_y_p_e_n_a_m_e __fun< _s_t_r_u_c_t _t_y_p_e_n_a_m_e _Dom::value_type > &__e, const │ │ │ │ -std::__minus, _t_y_p_e_n_a_m_e _Dom::value_type _v_a_l_a_r_r_a_y< _t_y_p_e_n_a_m_e _Dom::value_type > │ │ │ │ - >::result_type >  &_____v) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std::__minus, │ │ │ │ -_Expr, _Constant, ___D_o_m, _t_y_p_e_n_a_m_e _Dom:: │ │ │ │ - value_type >, _t_y_p_e_n_a_m_e __fun< _s_t_r_u_c_t _s_t_d_:_:_o_p_e_r_a_t_o_r_- (const _Expr< ___D_o_m, │ │ │ │ -std::__minus, _t_y_p_e_n_a_m_e _Dom::value_type _t_y_p_e_n_a_m_e _Dom::value_type > &_____v, const │ │ │ │ - >::result_type >  _t_y_p_e_n_a_m_e _Dom::value_type &__t) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m_1 , _c_l_a_s_s ___D_o_m_2 > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std::__minus, _s_t_d_:_:_o_p_e_r_a_t_o_r_- (const _Expr< ___D_o_m_1, │ │ │ │ - _Expr, _Expr, ___D_o_m_1, ___D_o_m_2 >, _t_y_p_e_n_a_m_e _t_y_p_e_n_a_m_e _Dom1::value_type > &_____v, │ │ │ │ - __fun< _s_t_r_u_c_t std::__minus, _t_y_p_e_n_a_m_e const _Expr< ___D_o_m_2, _t_y_p_e_n_a_m_e _Dom2:: │ │ │ │ - _Dom1::value_type >::result_type >  value_type > &_____w) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std::__minus, │ │ │ │ - _Constant, _Expr, _t_y_p_e_n_a_m_e _Dom:: │ │ │ │ - value_type, ___D_o_m >, _t_y_p_e_n_a_m_e __fun< _s_t_d_:_:_o_p_e_r_a_t_o_r_- (const _t_y_p_e_n_a_m_e _Dom:: │ │ │ │ - _s_t_r_u_c_t std::__minus, _t_y_p_e_n_a_m_e _Dom:: value_type &__t, const _Expr< ___D_o_m, │ │ │ │ - value_type >::result_type >  _t_y_p_e_n_a_m_e _Dom::value_type > &_____v) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std::__minus, │ │ │ │ - _ValArray, _Expr, _t_y_p_e_n_a_m_e _Dom:: _s_t_d_:_:_o_p_e_r_a_t_o_r_- (const _v_a_l_a_r_r_a_y< │ │ │ │ - value_type, ___D_o_m >, _t_y_p_e_n_a_m_e __fun< _t_y_p_e_n_a_m_e _Dom::value_type > &_____v, const │ │ │ │ - _s_t_r_u_c_t std::__minus, _t_y_p_e_n_a_m_e _Dom:: _Expr< ___D_o_m, _t_y_p_e_n_a_m_e _Dom::value_type │ │ │ │ - value_type >::result_type >  > &__e) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ -_Expr< _BinClos< _s_t_r_u_c_t std::__divides, │ │ │ │ -_Expr, _ValArray, ___D_o_m, _t_y_p_e_n_a_m_e _Dom:: _s_t_d_:_:_o_p_e_r_a_t_o_r_/ (const _Expr< ___D_o_m, │ │ │ │ - value_type >, _t_y_p_e_n_a_m_e __fun< _s_t_r_u_c_t _t_y_p_e_n_a_m_e _Dom::value_type > &__e, const │ │ │ │ - std::__divides, _t_y_p_e_n_a_m_e _Dom:: _v_a_l_a_r_r_a_y< _t_y_p_e_n_a_m_e _Dom::value_type > │ │ │ │ - value_type >::result_type >  &_____v) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ -_Expr< _BinClos< _s_t_r_u_c_t std::__divides, │ │ │ │ -_Expr, _Constant, ___D_o_m, _t_y_p_e_n_a_m_e _Dom:: │ │ │ │ - value_type >, _t_y_p_e_n_a_m_e __fun< _s_t_r_u_c_t _s_t_d_:_:_o_p_e_r_a_t_o_r_/ (const _Expr< ___D_o_m, │ │ │ │ - std::__divides, _t_y_p_e_n_a_m_e _Dom:: _t_y_p_e_n_a_m_e _Dom::value_type > &_____v, const │ │ │ │ - value_type >::result_type >  _t_y_p_e_n_a_m_e _Dom::value_type &__t) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m_1 , _c_l_a_s_s ___D_o_m_2 > │ │ │ │ -_Expr< _BinClos< _s_t_r_u_c_t std::__divides, _s_t_d_:_:_o_p_e_r_a_t_o_r_/ (const _Expr< ___D_o_m_1, │ │ │ │ - _Expr, _Expr, ___D_o_m_1, ___D_o_m_2 >, _t_y_p_e_n_a_m_e _t_y_p_e_n_a_m_e _Dom1::value_type > &_____v, │ │ │ │ - __fun< _s_t_r_u_c_t std::__divides, _t_y_p_e_n_a_m_e const _Expr< ___D_o_m_2, _t_y_p_e_n_a_m_e _Dom2:: │ │ │ │ - _Dom1::value_type >::result_type >  value_type > &_____w) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ -_Expr< _BinClos< _s_t_r_u_c_t std::__divides, │ │ │ │ - _Constant, _Expr, _t_y_p_e_n_a_m_e _Dom:: │ │ │ │ - value_type, ___D_o_m >, _t_y_p_e_n_a_m_e __fun< _s_t_d_:_:_o_p_e_r_a_t_o_r_/ (const _t_y_p_e_n_a_m_e _Dom:: │ │ │ │ - _s_t_r_u_c_t std::__divides, _t_y_p_e_n_a_m_e _Dom:: value_type &__t, const _Expr< ___D_o_m, │ │ │ │ - value_type >::result_type >  _t_y_p_e_n_a_m_e _Dom::value_type > &_____v) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ -_Expr< _BinClos< _s_t_r_u_c_t std::__divides, │ │ │ │ - _ValArray, _Expr, _t_y_p_e_n_a_m_e _Dom:: _s_t_d_:_:_o_p_e_r_a_t_o_r_/ (const _v_a_l_a_r_r_a_y< │ │ │ │ - value_type, ___D_o_m >, _t_y_p_e_n_a_m_e __fun< _t_y_p_e_n_a_m_e _Dom::value_type > &_____v, const │ │ │ │ - _s_t_r_u_c_t std::__divides, _t_y_p_e_n_a_m_e _Dom:: _Expr< ___D_o_m, _t_y_p_e_n_a_m_e _Dom::value_type │ │ │ │ - value_type >::result_type >  > &__e) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std::__less, │ │ │ │ -_Expr, _ValArray, ___D_o_m, _t_y_p_e_n_a_m_e _Dom:: _s_t_d_:_:_o_p_e_r_a_t_o_r_< (const _Expr< ___D_o_m, │ │ │ │ - value_type >, _t_y_p_e_n_a_m_e __fun< _s_t_r_u_c_t _t_y_p_e_n_a_m_e _Dom::value_type > &__e, const │ │ │ │ - std::__less, _t_y_p_e_n_a_m_e _Dom::value_type _v_a_l_a_r_r_a_y< _t_y_p_e_n_a_m_e _Dom::value_type > │ │ │ │ - >::result_type >  &_____v) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std::__less, │ │ │ │ -_Expr, _Constant, ___D_o_m, _t_y_p_e_n_a_m_e _Dom:: │ │ │ │ - value_type >, _t_y_p_e_n_a_m_e __fun< _s_t_r_u_c_t _s_t_d_:_:_o_p_e_r_a_t_o_r_< (const _Expr< ___D_o_m, │ │ │ │ - std::__less, _t_y_p_e_n_a_m_e _Dom::value_type _t_y_p_e_n_a_m_e _Dom::value_type > &_____v, const │ │ │ │ - >::result_type >  _t_y_p_e_n_a_m_e _Dom::value_type &__t) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m_1 , _c_l_a_s_s ___D_o_m_2 > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std::__less, _s_t_d_:_:_o_p_e_r_a_t_o_r_< (const _Expr< ___D_o_m_1, │ │ │ │ - _Expr, _Expr, ___D_o_m_1, ___D_o_m_2 >, _t_y_p_e_n_a_m_e _t_y_p_e_n_a_m_e _Dom1::value_type > &_____v, │ │ │ │ - __fun< _s_t_r_u_c_t std::__less, _t_y_p_e_n_a_m_e const _Expr< ___D_o_m_2, _t_y_p_e_n_a_m_e _Dom2:: │ │ │ │ - _Dom1::value_type >::result_type >  value_type > &_____w) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std::__less, │ │ │ │ - _Constant, _Expr, _t_y_p_e_n_a_m_e _Dom:: │ │ │ │ - value_type, ___D_o_m >, _t_y_p_e_n_a_m_e __fun< _s_t_d_:_:_o_p_e_r_a_t_o_r_< (const _t_y_p_e_n_a_m_e _Dom:: │ │ │ │ - _s_t_r_u_c_t std::__less, _t_y_p_e_n_a_m_e _Dom:: value_type &__t, const _Expr< ___D_o_m, │ │ │ │ - value_type >::result_type >  _t_y_p_e_n_a_m_e _Dom::value_type > &_____v) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std::__less, │ │ │ │ - _ValArray, _Expr, _t_y_p_e_n_a_m_e _Dom:: _s_t_d_:_:_o_p_e_r_a_t_o_r_< (const _v_a_l_a_r_r_a_y< │ │ │ │ - value_type, ___D_o_m >, _t_y_p_e_n_a_m_e __fun< _t_y_p_e_n_a_m_e _Dom::value_type > &_____v, const │ │ │ │ - _s_t_r_u_c_t std::__less, _t_y_p_e_n_a_m_e _Dom:: _Expr< ___D_o_m, _t_y_p_e_n_a_m_e _Dom::value_type │ │ │ │ - value_type >::result_type >  > &__e) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std:: │ │ │ │ - __shift_left, _Expr, _ValArray, ___D_o_m, │ │ │ │ - _t_y_p_e_n_a_m_e _Dom::value_type >, _t_y_p_e_n_a_m_e _s_t_d_:_:_o_p_e_r_a_t_o_r_<_< (const _Expr< ___D_o_m, │ │ │ │ - __fun< _s_t_r_u_c_t std::__shift_left, _t_y_p_e_n_a_m_e _Dom::value_type > &__e, const │ │ │ │ - _t_y_p_e_n_a_m_e _Dom::value_type >:: _v_a_l_a_r_r_a_y< _t_y_p_e_n_a_m_e _Dom::value_type > │ │ │ │ - result_type >  &_____v) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std:: │ │ │ │ - __shift_left, _Expr, _Constant, ___D_o_m, │ │ │ │ - _t_y_p_e_n_a_m_e _Dom::value_type >, _t_y_p_e_n_a_m_e │ │ │ │ - __fun< _s_t_r_u_c_t std::__shift_left, _s_t_d_:_:_o_p_e_r_a_t_o_r_<_< (const _Expr< ___D_o_m, │ │ │ │ - _t_y_p_e_n_a_m_e _Dom::value_type >:: _t_y_p_e_n_a_m_e _Dom::value_type > &_____v, const │ │ │ │ - result_type >  _t_y_p_e_n_a_m_e _Dom::value_type &__t) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m_1 , _c_l_a_s_s ___D_o_m_2 > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std:: │ │ │ │ - __shift_left, _Expr, _Expr, ___D_o_m_1, _s_t_d_:_:_o_p_e_r_a_t_o_r_<_< (const _Expr< ___D_o_m_1, │ │ │ │ - ___D_o_m_2 >, _t_y_p_e_n_a_m_e __fun< _s_t_r_u_c_t std:: _t_y_p_e_n_a_m_e _Dom1::value_type > &_____v, │ │ │ │ - __shift_left, _t_y_p_e_n_a_m_e _Dom1:: const _Expr< ___D_o_m_2, _t_y_p_e_n_a_m_e _Dom2:: │ │ │ │ - value_type >::result_type >  value_type > &_____w) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std:: │ │ │ │ - __shift_left, _Constant, _Expr, │ │ │ │ - _t_y_p_e_n_a_m_e _Dom::value_type, ___D_o_m >, │ │ │ │ - _t_y_p_e_n_a_m_e __fun< _s_t_r_u_c_t std:: _s_t_d_:_:_o_p_e_r_a_t_o_r_<_< (const _t_y_p_e_n_a_m_e _Dom:: │ │ │ │ -__shift_left, _t_y_p_e_n_a_m_e _Dom::value_type value_type &__t, const _Expr< ___D_o_m, │ │ │ │ - >::result_type >  _t_y_p_e_n_a_m_e _Dom::value_type > &_____v) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std:: │ │ │ │ - __shift_left, _ValArray, _Expr, │ │ │ │ - _t_y_p_e_n_a_m_e _Dom::value_type, ___D_o_m >, _s_t_d_:_:_o_p_e_r_a_t_o_r_<_< (const _v_a_l_a_r_r_a_y< │ │ │ │ - _t_y_p_e_n_a_m_e __fun< _s_t_r_u_c_t std:: _t_y_p_e_n_a_m_e _Dom::value_type > &_____v, const │ │ │ │ -__shift_left, _t_y_p_e_n_a_m_e _Dom::value_type _Expr< ___D_o_m, _t_y_p_e_n_a_m_e _Dom::value_type │ │ │ │ - >::result_type >  > &__e) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std:: │ │ │ │ - __less_equal, _Expr, _ValArray, ___D_o_m, │ │ │ │ - _t_y_p_e_n_a_m_e _Dom::value_type >, _t_y_p_e_n_a_m_e _s_t_d_:_:_o_p_e_r_a_t_o_r_<_= (const _Expr< ___D_o_m, │ │ │ │ - __fun< _s_t_r_u_c_t std::__less_equal, _t_y_p_e_n_a_m_e _Dom::value_type > &__e, const │ │ │ │ - _t_y_p_e_n_a_m_e _Dom::value_type >:: _v_a_l_a_r_r_a_y< _t_y_p_e_n_a_m_e _Dom::value_type > │ │ │ │ - result_type >  &_____v) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std:: │ │ │ │ - __less_equal, _Expr, _Constant, ___D_o_m, │ │ │ │ - _t_y_p_e_n_a_m_e _Dom::value_type >, _t_y_p_e_n_a_m_e │ │ │ │ - __fun< _s_t_r_u_c_t std::__less_equal, _s_t_d_:_:_o_p_e_r_a_t_o_r_<_= (const _Expr< ___D_o_m, │ │ │ │ - _t_y_p_e_n_a_m_e _Dom::value_type >:: _t_y_p_e_n_a_m_e _Dom::value_type > &_____v, const │ │ │ │ - result_type >  _t_y_p_e_n_a_m_e _Dom::value_type &__t) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m_1 , _c_l_a_s_s ___D_o_m_2 > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std:: │ │ │ │ - __less_equal, _Expr, _Expr, ___D_o_m_1, _s_t_d_:_:_o_p_e_r_a_t_o_r_<_= (const _Expr< ___D_o_m_1, │ │ │ │ - ___D_o_m_2 >, _t_y_p_e_n_a_m_e __fun< _s_t_r_u_c_t std:: _t_y_p_e_n_a_m_e _Dom1::value_type > &_____v, │ │ │ │ - __less_equal, _t_y_p_e_n_a_m_e _Dom1:: const _Expr< ___D_o_m_2, _t_y_p_e_n_a_m_e _Dom2:: │ │ │ │ - value_type >::result_type >  value_type > &_____w) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std:: │ │ │ │ - __less_equal, _Constant, _Expr, │ │ │ │ - _t_y_p_e_n_a_m_e _Dom::value_type, ___D_o_m >, │ │ │ │ - _t_y_p_e_n_a_m_e __fun< _s_t_r_u_c_t std:: _s_t_d_:_:_o_p_e_r_a_t_o_r_<_= (const _t_y_p_e_n_a_m_e _Dom:: │ │ │ │ -__less_equal, _t_y_p_e_n_a_m_e _Dom::value_type value_type &__t, const _Expr< ___D_o_m, │ │ │ │ - >::result_type >  _t_y_p_e_n_a_m_e _Dom::value_type > &_____v) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std:: │ │ │ │ - __less_equal, _ValArray, _Expr, │ │ │ │ - _t_y_p_e_n_a_m_e _Dom::value_type, ___D_o_m >, _s_t_d_:_:_o_p_e_r_a_t_o_r_<_= (const _v_a_l_a_r_r_a_y< │ │ │ │ - _t_y_p_e_n_a_m_e __fun< _s_t_r_u_c_t std:: _t_y_p_e_n_a_m_e _Dom::value_type > &_____v, const │ │ │ │ -__less_equal, _t_y_p_e_n_a_m_e _Dom::value_type _Expr< ___D_o_m, _t_y_p_e_n_a_m_e _Dom::value_type │ │ │ │ - >::result_type >  > &__e) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std:: │ │ │ │ - __equal_to, _Expr, _ValArray, ___D_o_m, _s_t_d_:_:_o_p_e_r_a_t_o_r_=_= (const _Expr< ___D_o_m, │ │ │ │ - _t_y_p_e_n_a_m_e _Dom::value_type >, _t_y_p_e_n_a_m_e _t_y_p_e_n_a_m_e _Dom::value_type > &__e, const │ │ │ │ -__fun< _s_t_r_u_c_t std::__equal_to, _t_y_p_e_n_a_m_e _v_a_l_a_r_r_a_y< _t_y_p_e_n_a_m_e _Dom::value_type > │ │ │ │ - _Dom::value_type >::result_type >  &_____v) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std:: │ │ │ │ - __equal_to, _Expr, _Constant, ___D_o_m, │ │ │ │ - _t_y_p_e_n_a_m_e _Dom::value_type >, _t_y_p_e_n_a_m_e _s_t_d_:_:_o_p_e_r_a_t_o_r_=_= (const _Expr< ___D_o_m, │ │ │ │ -__fun< _s_t_r_u_c_t std::__equal_to, _t_y_p_e_n_a_m_e _t_y_p_e_n_a_m_e _Dom::value_type > &_____v, const │ │ │ │ - _Dom::value_type >::result_type >  _t_y_p_e_n_a_m_e _Dom::value_type &__t) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m_1 , _c_l_a_s_s ___D_o_m_2 > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std:: │ │ │ │ - __equal_to, _Expr, _Expr, ___D_o_m_1, ___D_o_m_2 _s_t_d_:_:_o_p_e_r_a_t_o_r_=_= (const _Expr< ___D_o_m_1, │ │ │ │ - >, _t_y_p_e_n_a_m_e __fun< _s_t_r_u_c_t std:: _t_y_p_e_n_a_m_e _Dom1::value_type > &_____v, │ │ │ │ - __equal_to, _t_y_p_e_n_a_m_e _Dom1::value_type const _Expr< ___D_o_m_2, _t_y_p_e_n_a_m_e _Dom2:: │ │ │ │ - >::result_type >  value_type > &_____w) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std:: │ │ │ │ - __equal_to, _Constant, _Expr, _t_y_p_e_n_a_m_e │ │ │ │ - _Dom::value_type, ___D_o_m >, _t_y_p_e_n_a_m_e _s_t_d_:_:_o_p_e_r_a_t_o_r_=_= (const _t_y_p_e_n_a_m_e _Dom:: │ │ │ │ -__fun< _s_t_r_u_c_t std::__equal_to, _t_y_p_e_n_a_m_e value_type &__t, const _Expr< ___D_o_m, │ │ │ │ - _Dom::value_type >::result_type >  _t_y_p_e_n_a_m_e _Dom::value_type > &_____v) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std:: │ │ │ │ - __equal_to, _ValArray, _Expr, _t_y_p_e_n_a_m_e _s_t_d_:_:_o_p_e_r_a_t_o_r_=_= (const _v_a_l_a_r_r_a_y< │ │ │ │ - _Dom::value_type, ___D_o_m >, _t_y_p_e_n_a_m_e _t_y_p_e_n_a_m_e _Dom::value_type > &_____v, const │ │ │ │ -__fun< _s_t_r_u_c_t std::__equal_to, _t_y_p_e_n_a_m_e _Expr< ___D_o_m, _t_y_p_e_n_a_m_e _Dom::value_type │ │ │ │ - _Dom::value_type >::result_type >  > &__e) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ -_Expr< _BinClos< _s_t_r_u_c_t std::__greater, │ │ │ │ -_Expr, _ValArray, ___D_o_m, _t_y_p_e_n_a_m_e _Dom:: _s_t_d_:_:_o_p_e_r_a_t_o_r_> (const _Expr< ___D_o_m, │ │ │ │ - value_type >, _t_y_p_e_n_a_m_e __fun< _s_t_r_u_c_t _t_y_p_e_n_a_m_e _Dom::value_type > &__e, const │ │ │ │ - std::__greater, _t_y_p_e_n_a_m_e _Dom:: _v_a_l_a_r_r_a_y< _t_y_p_e_n_a_m_e _Dom::value_type > │ │ │ │ - value_type >::result_type >  &_____v) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ -_Expr< _BinClos< _s_t_r_u_c_t std::__greater, │ │ │ │ -_Expr, _Constant, ___D_o_m, _t_y_p_e_n_a_m_e _Dom:: │ │ │ │ - value_type >, _t_y_p_e_n_a_m_e __fun< _s_t_r_u_c_t _s_t_d_:_:_o_p_e_r_a_t_o_r_> (const _Expr< ___D_o_m, │ │ │ │ - std::__greater, _t_y_p_e_n_a_m_e _Dom:: _t_y_p_e_n_a_m_e _Dom::value_type > &_____v, const │ │ │ │ - value_type >::result_type >  _t_y_p_e_n_a_m_e _Dom::value_type &__t) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m_1 , _c_l_a_s_s ___D_o_m_2 > │ │ │ │ -_Expr< _BinClos< _s_t_r_u_c_t std::__greater, _s_t_d_:_:_o_p_e_r_a_t_o_r_> (const _Expr< ___D_o_m_1, │ │ │ │ - _Expr, _Expr, ___D_o_m_1, ___D_o_m_2 >, _t_y_p_e_n_a_m_e _t_y_p_e_n_a_m_e _Dom1::value_type > &_____v, │ │ │ │ - __fun< _s_t_r_u_c_t std::__greater, _t_y_p_e_n_a_m_e const _Expr< ___D_o_m_2, _t_y_p_e_n_a_m_e _Dom2:: │ │ │ │ - _Dom1::value_type >::result_type >  value_type > &_____w) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ -_Expr< _BinClos< _s_t_r_u_c_t std::__greater, │ │ │ │ - _Constant, _Expr, _t_y_p_e_n_a_m_e _Dom:: │ │ │ │ - value_type, ___D_o_m >, _t_y_p_e_n_a_m_e __fun< _s_t_d_:_:_o_p_e_r_a_t_o_r_> (const _t_y_p_e_n_a_m_e _Dom:: │ │ │ │ - _s_t_r_u_c_t std::__greater, _t_y_p_e_n_a_m_e _Dom:: value_type &__t, const _Expr< ___D_o_m, │ │ │ │ - value_type >::result_type >  _t_y_p_e_n_a_m_e _Dom::value_type > &_____v) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ -_Expr< _BinClos< _s_t_r_u_c_t std::__greater, │ │ │ │ - _ValArray, _Expr, _t_y_p_e_n_a_m_e _Dom:: _s_t_d_:_:_o_p_e_r_a_t_o_r_> (const _v_a_l_a_r_r_a_y< │ │ │ │ - value_type, ___D_o_m >, _t_y_p_e_n_a_m_e __fun< _t_y_p_e_n_a_m_e _Dom::value_type > &_____v, const │ │ │ │ - _s_t_r_u_c_t std::__greater, _t_y_p_e_n_a_m_e _Dom:: _Expr< ___D_o_m, _t_y_p_e_n_a_m_e _Dom::value_type │ │ │ │ - value_type >::result_type >  > &__e) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std:: │ │ │ │ - __greater_equal, _Expr, _ValArray, │ │ │ │ - ___D_o_m, _t_y_p_e_n_a_m_e _Dom::value_type >, _s_t_d_:_:_o_p_e_r_a_t_o_r_>_= (const _Expr< ___D_o_m, │ │ │ │ - _t_y_p_e_n_a_m_e __fun< _s_t_r_u_c_t std:: _t_y_p_e_n_a_m_e _Dom::value_type > &__e, const │ │ │ │ - __greater_equal, _t_y_p_e_n_a_m_e _Dom:: _v_a_l_a_r_r_a_y< _t_y_p_e_n_a_m_e _Dom::value_type > │ │ │ │ - value_type >::result_type >  &_____v) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std:: │ │ │ │ - __greater_equal, _Expr, _Constant, │ │ │ │ - ___D_o_m, _t_y_p_e_n_a_m_e _Dom::value_type >, │ │ │ │ - _t_y_p_e_n_a_m_e __fun< _s_t_r_u_c_t std:: _s_t_d_:_:_o_p_e_r_a_t_o_r_>_= (const _Expr< ___D_o_m, │ │ │ │ - __greater_equal, _t_y_p_e_n_a_m_e _Dom:: _t_y_p_e_n_a_m_e _Dom::value_type > &_____v, const │ │ │ │ - value_type >::result_type >  _t_y_p_e_n_a_m_e _Dom::value_type &__t) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m_1 , _c_l_a_s_s ___D_o_m_2 > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std:: │ │ │ │ - __greater_equal, _Expr, _Expr, ___D_o_m_1, _s_t_d_:_:_o_p_e_r_a_t_o_r_>_= (const _Expr< ___D_o_m_1, │ │ │ │ - ___D_o_m_2 >, _t_y_p_e_n_a_m_e __fun< _s_t_r_u_c_t std:: _t_y_p_e_n_a_m_e _Dom1::value_type > &_____v, │ │ │ │ - __greater_equal, _t_y_p_e_n_a_m_e _Dom1:: const _Expr< ___D_o_m_2, _t_y_p_e_n_a_m_e _Dom2:: │ │ │ │ - value_type >::result_type >  value_type > &_____w) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std:: │ │ │ │ - __greater_equal, _Constant, _Expr, │ │ │ │ - _t_y_p_e_n_a_m_e _Dom::value_type, ___D_o_m >, │ │ │ │ - _t_y_p_e_n_a_m_e __fun< _s_t_r_u_c_t std:: _s_t_d_:_:_o_p_e_r_a_t_o_r_>_= (const _t_y_p_e_n_a_m_e _Dom:: │ │ │ │ - __greater_equal, _t_y_p_e_n_a_m_e _Dom:: value_type &__t, const _Expr< ___D_o_m, │ │ │ │ - value_type >::result_type >  _t_y_p_e_n_a_m_e _Dom::value_type > &_____v) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std:: │ │ │ │ - __greater_equal, _ValArray, _Expr, │ │ │ │ - _t_y_p_e_n_a_m_e _Dom::value_type, ___D_o_m >, _s_t_d_:_:_o_p_e_r_a_t_o_r_>_= (const _v_a_l_a_r_r_a_y< │ │ │ │ - _t_y_p_e_n_a_m_e __fun< _s_t_r_u_c_t std:: _t_y_p_e_n_a_m_e _Dom::value_type > &_____v, const │ │ │ │ - __greater_equal, _t_y_p_e_n_a_m_e _Dom:: _Expr< ___D_o_m, _t_y_p_e_n_a_m_e _Dom::value_type │ │ │ │ - value_type >::result_type >  > &__e) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std:: │ │ │ │ - __shift_right, _Expr, _ValArray, ___D_o_m, │ │ │ │ - _t_y_p_e_n_a_m_e _Dom::value_type >, _t_y_p_e_n_a_m_e _s_t_d_:_:_o_p_e_r_a_t_o_r_>_> (const _Expr< ___D_o_m, │ │ │ │ - __fun< _s_t_r_u_c_t std::__shift_right, _t_y_p_e_n_a_m_e _Dom::value_type > &__e, const │ │ │ │ - _t_y_p_e_n_a_m_e _Dom::value_type >:: _v_a_l_a_r_r_a_y< _t_y_p_e_n_a_m_e _Dom::value_type > │ │ │ │ - result_type >  &_____v) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std:: │ │ │ │ - __shift_right, _Expr, _Constant, ___D_o_m, │ │ │ │ - _t_y_p_e_n_a_m_e _Dom::value_type >, _t_y_p_e_n_a_m_e │ │ │ │ - __fun< _s_t_r_u_c_t std::__shift_right, _s_t_d_:_:_o_p_e_r_a_t_o_r_>_> (const _Expr< ___D_o_m, │ │ │ │ - _t_y_p_e_n_a_m_e _Dom::value_type >:: _t_y_p_e_n_a_m_e _Dom::value_type > &_____v, const │ │ │ │ - result_type >  _t_y_p_e_n_a_m_e _Dom::value_type &__t) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m_1 , _c_l_a_s_s ___D_o_m_2 > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std:: │ │ │ │ - __shift_right, _Expr, _Expr, ___D_o_m_1, _s_t_d_:_:_o_p_e_r_a_t_o_r_>_> (const _Expr< ___D_o_m_1, │ │ │ │ - ___D_o_m_2 >, _t_y_p_e_n_a_m_e __fun< _s_t_r_u_c_t std:: _t_y_p_e_n_a_m_e _Dom1::value_type > &_____v, │ │ │ │ - __shift_right, _t_y_p_e_n_a_m_e _Dom1:: const _Expr< ___D_o_m_2, _t_y_p_e_n_a_m_e _Dom2:: │ │ │ │ - value_type >::result_type >  value_type > &_____w) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std:: │ │ │ │ - __shift_right, _Constant, _Expr, │ │ │ │ - _t_y_p_e_n_a_m_e _Dom::value_type, ___D_o_m >, │ │ │ │ - _t_y_p_e_n_a_m_e __fun< _s_t_r_u_c_t std:: _s_t_d_:_:_o_p_e_r_a_t_o_r_>_> (const _t_y_p_e_n_a_m_e _Dom:: │ │ │ │ - __shift_right, _t_y_p_e_n_a_m_e _Dom:: value_type &__t, const _Expr< ___D_o_m, │ │ │ │ - value_type >::result_type >  _t_y_p_e_n_a_m_e _Dom::value_type > &_____v) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std:: │ │ │ │ - __shift_right, _ValArray, _Expr, │ │ │ │ - _t_y_p_e_n_a_m_e _Dom::value_type, ___D_o_m >, _s_t_d_:_:_o_p_e_r_a_t_o_r_>_> (const _v_a_l_a_r_r_a_y< │ │ │ │ - _t_y_p_e_n_a_m_e __fun< _s_t_r_u_c_t std:: _t_y_p_e_n_a_m_e _Dom::value_type > &_____v, const │ │ │ │ - __shift_right, _t_y_p_e_n_a_m_e _Dom:: _Expr< ___D_o_m, _t_y_p_e_n_a_m_e _Dom::value_type │ │ │ │ - value_type >::result_type >  > &__e) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std:: │ │ │ │ - __bitwise_xor, _Expr, _ValArray, ___D_o_m, │ │ │ │ - _t_y_p_e_n_a_m_e _Dom::value_type >, _t_y_p_e_n_a_m_e _s_t_d_:_:_o_p_e_r_a_t_o_r_^ (const _Expr< ___D_o_m, │ │ │ │ - __fun< _s_t_r_u_c_t std::__bitwise_xor, _t_y_p_e_n_a_m_e _Dom::value_type > &__e, const │ │ │ │ - _t_y_p_e_n_a_m_e _Dom::value_type >:: _v_a_l_a_r_r_a_y< _t_y_p_e_n_a_m_e _Dom::value_type > │ │ │ │ - result_type >  &_____v) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std:: │ │ │ │ - __bitwise_xor, _Expr, _Constant, ___D_o_m, │ │ │ │ - _t_y_p_e_n_a_m_e _Dom::value_type >, _t_y_p_e_n_a_m_e │ │ │ │ - __fun< _s_t_r_u_c_t std::__bitwise_xor, _s_t_d_:_:_o_p_e_r_a_t_o_r_^ (const _Expr< ___D_o_m, │ │ │ │ - _t_y_p_e_n_a_m_e _Dom::value_type >:: _t_y_p_e_n_a_m_e _Dom::value_type > &_____v, const │ │ │ │ - result_type >  _t_y_p_e_n_a_m_e _Dom::value_type &__t) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m_1 , _c_l_a_s_s ___D_o_m_2 > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std:: │ │ │ │ - __bitwise_xor, _Expr, _Expr, ___D_o_m_1, _s_t_d_:_:_o_p_e_r_a_t_o_r_^ (const _Expr< ___D_o_m_1, │ │ │ │ - ___D_o_m_2 >, _t_y_p_e_n_a_m_e __fun< _s_t_r_u_c_t std:: _t_y_p_e_n_a_m_e _Dom1::value_type > &_____v, │ │ │ │ - __bitwise_xor, _t_y_p_e_n_a_m_e _Dom1:: const _Expr< ___D_o_m_2, _t_y_p_e_n_a_m_e _Dom2:: │ │ │ │ - value_type >::result_type >  value_type > &_____w) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std:: │ │ │ │ - __bitwise_xor, _Constant, _Expr, │ │ │ │ - _t_y_p_e_n_a_m_e _Dom::value_type, ___D_o_m >, │ │ │ │ - _t_y_p_e_n_a_m_e __fun< _s_t_r_u_c_t std:: _s_t_d_:_:_o_p_e_r_a_t_o_r_^ (const _t_y_p_e_n_a_m_e _Dom:: │ │ │ │ - __bitwise_xor, _t_y_p_e_n_a_m_e _Dom:: value_type &__t, const _Expr< ___D_o_m, │ │ │ │ - value_type >::result_type >  _t_y_p_e_n_a_m_e _Dom::value_type > &_____v) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std:: │ │ │ │ - __bitwise_xor, _ValArray, _Expr, │ │ │ │ - _t_y_p_e_n_a_m_e _Dom::value_type, ___D_o_m >, _s_t_d_:_:_o_p_e_r_a_t_o_r_^ (const _v_a_l_a_r_r_a_y< │ │ │ │ - _t_y_p_e_n_a_m_e __fun< _s_t_r_u_c_t std:: _t_y_p_e_n_a_m_e _Dom::value_type > &_____v, const │ │ │ │ - __bitwise_xor, _t_y_p_e_n_a_m_e _Dom:: _Expr< ___D_o_m, _t_y_p_e_n_a_m_e _Dom::value_type │ │ │ │ - value_type >::result_type >  > &__e) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std:: │ │ │ │ - __bitwise_or, _Expr, _ValArray, ___D_o_m, │ │ │ │ - _t_y_p_e_n_a_m_e _Dom::value_type >, _t_y_p_e_n_a_m_e _s_t_d_:_:_o_p_e_r_a_t_o_r_| (const _Expr< ___D_o_m, │ │ │ │ - __fun< _s_t_r_u_c_t std::__bitwise_or, _t_y_p_e_n_a_m_e _Dom::value_type > &__e, const │ │ │ │ - _t_y_p_e_n_a_m_e _Dom::value_type >:: _v_a_l_a_r_r_a_y< _t_y_p_e_n_a_m_e _Dom::value_type > │ │ │ │ - result_type >  &_____v) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std:: │ │ │ │ - __bitwise_or, _Expr, _Constant, ___D_o_m, │ │ │ │ - _t_y_p_e_n_a_m_e _Dom::value_type >, _t_y_p_e_n_a_m_e │ │ │ │ - __fun< _s_t_r_u_c_t std::__bitwise_or, _s_t_d_:_:_o_p_e_r_a_t_o_r_| (const _Expr< ___D_o_m, │ │ │ │ - _t_y_p_e_n_a_m_e _Dom::value_type >:: _t_y_p_e_n_a_m_e _Dom::value_type > &_____v, const │ │ │ │ - result_type >  _t_y_p_e_n_a_m_e _Dom::value_type &__t) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m_1 , _c_l_a_s_s ___D_o_m_2 > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std:: │ │ │ │ - __bitwise_or, _Expr, _Expr, ___D_o_m_1, _s_t_d_:_:_o_p_e_r_a_t_o_r_| (const _Expr< ___D_o_m_1, │ │ │ │ - ___D_o_m_2 >, _t_y_p_e_n_a_m_e __fun< _s_t_r_u_c_t std:: _t_y_p_e_n_a_m_e _Dom1::value_type > &_____v, │ │ │ │ - __bitwise_or, _t_y_p_e_n_a_m_e _Dom1:: const _Expr< ___D_o_m_2, _t_y_p_e_n_a_m_e _Dom2:: │ │ │ │ - value_type >::result_type >  value_type > &_____w) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std:: │ │ │ │ - __bitwise_or, _Constant, _Expr, │ │ │ │ - _t_y_p_e_n_a_m_e _Dom::value_type, ___D_o_m >, │ │ │ │ - _t_y_p_e_n_a_m_e __fun< _s_t_r_u_c_t std:: _s_t_d_:_:_o_p_e_r_a_t_o_r_| (const _t_y_p_e_n_a_m_e _Dom:: │ │ │ │ -__bitwise_or, _t_y_p_e_n_a_m_e _Dom::value_type value_type &__t, const _Expr< ___D_o_m, │ │ │ │ - >::result_type >  _t_y_p_e_n_a_m_e _Dom::value_type > &_____v) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std:: │ │ │ │ - __bitwise_or, _ValArray, _Expr, │ │ │ │ - _t_y_p_e_n_a_m_e _Dom::value_type, ___D_o_m >, _s_t_d_:_:_o_p_e_r_a_t_o_r_| (const _v_a_l_a_r_r_a_y< │ │ │ │ - _t_y_p_e_n_a_m_e __fun< _s_t_r_u_c_t std:: _t_y_p_e_n_a_m_e _Dom::value_type > &_____v, const │ │ │ │ -__bitwise_or, _t_y_p_e_n_a_m_e _Dom::value_type _Expr< ___D_o_m, _t_y_p_e_n_a_m_e _Dom::value_type │ │ │ │ - >::result_type >  > &__e) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std:: │ │ │ │ - __logical_or, _Expr, _ValArray, ___D_o_m, │ │ │ │ - _t_y_p_e_n_a_m_e _Dom::value_type >, _t_y_p_e_n_a_m_e _s_t_d_:_:_o_p_e_r_a_t_o_r_|_| (const _Expr< ___D_o_m, │ │ │ │ - __fun< _s_t_r_u_c_t std::__logical_or, _t_y_p_e_n_a_m_e _Dom::value_type > &__e, const │ │ │ │ - _t_y_p_e_n_a_m_e _Dom::value_type >:: _v_a_l_a_r_r_a_y< _t_y_p_e_n_a_m_e _Dom::value_type > │ │ │ │ - result_type >  &_____v) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std:: │ │ │ │ - __logical_or, _Expr, _Constant, ___D_o_m, │ │ │ │ - _t_y_p_e_n_a_m_e _Dom::value_type >, _t_y_p_e_n_a_m_e │ │ │ │ - __fun< _s_t_r_u_c_t std::__logical_or, _s_t_d_:_:_o_p_e_r_a_t_o_r_|_| (const _Expr< ___D_o_m, │ │ │ │ - _t_y_p_e_n_a_m_e _Dom::value_type >:: _t_y_p_e_n_a_m_e _Dom::value_type > &_____v, const │ │ │ │ - result_type >  _t_y_p_e_n_a_m_e _Dom::value_type &__t) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m_1 , _c_l_a_s_s ___D_o_m_2 > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std:: │ │ │ │ - __logical_or, _Expr, _Expr, ___D_o_m_1, _s_t_d_:_:_o_p_e_r_a_t_o_r_|_| (const _Expr< ___D_o_m_1, │ │ │ │ - ___D_o_m_2 >, _t_y_p_e_n_a_m_e __fun< _s_t_r_u_c_t std:: _t_y_p_e_n_a_m_e _Dom1::value_type > &_____v, │ │ │ │ - __logical_or, _t_y_p_e_n_a_m_e _Dom1:: const _Expr< ___D_o_m_2, _t_y_p_e_n_a_m_e _Dom2:: │ │ │ │ - value_type >::result_type >  value_type > &_____w) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std:: │ │ │ │ - __logical_or, _Constant, _Expr, │ │ │ │ - _t_y_p_e_n_a_m_e _Dom::value_type, ___D_o_m >, │ │ │ │ - _t_y_p_e_n_a_m_e __fun< _s_t_r_u_c_t std:: _s_t_d_:_:_o_p_e_r_a_t_o_r_|_| (const _t_y_p_e_n_a_m_e _Dom:: │ │ │ │ -__logical_or, _t_y_p_e_n_a_m_e _Dom::value_type value_type &__t, const _Expr< ___D_o_m, │ │ │ │ - >::result_type >  _t_y_p_e_n_a_m_e _Dom::value_type > &_____v) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std:: │ │ │ │ - __logical_or, _ValArray, _Expr, │ │ │ │ - _t_y_p_e_n_a_m_e _Dom::value_type, ___D_o_m >, _s_t_d_:_:_o_p_e_r_a_t_o_r_|_| (const _v_a_l_a_r_r_a_y< │ │ │ │ - _t_y_p_e_n_a_m_e __fun< _s_t_r_u_c_t std:: _t_y_p_e_n_a_m_e _Dom::value_type > &_____v, const │ │ │ │ -__logical_or, _t_y_p_e_n_a_m_e _Dom::value_type _Expr< ___D_o_m, _t_y_p_e_n_a_m_e _Dom::value_type │ │ │ │ - >::result_type >  > &__e) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std::_Pow, │ │ │ │ -_Expr, _Constant, ___D_o_m, _t_y_p_e_n_a_m_e _Dom:: _s_t_d_:_:_p_o_w (const _Expr< ___D_o_m, _t_y_p_e_n_a_m_e │ │ │ │ -value_type >, _t_y_p_e_n_a_m_e _Dom::value_type _Dom::value_type > &__e, const _t_y_p_e_n_a_m_e │ │ │ │ - >  _Dom::value_type &__t) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std::_Pow, _s_t_d_:_:_p_o_w (const _Expr< ___D_o_m, _t_y_p_e_n_a_m_e │ │ │ │ -_Expr, _ValArray, ___D_o_m, _t_y_p_e_n_a_m_e _Dom:: _Dom::value_type > &__e, const │ │ │ │ -value_type >, _t_y_p_e_n_a_m_e _Dom::value_type _v_a_l_a_r_r_a_y< _t_y_p_e_n_a_m_e _Dom::value_type > │ │ │ │ - >  &_____v) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m_1 , _c_l_a_s_s ___D_o_m_2 > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std::_Pow, _s_t_d_:_:_p_o_w (const _Expr< ___D_o_m_1, _t_y_p_e_n_a_m_e │ │ │ │ - _Expr, _Expr, ___D_o_m_1, ___D_o_m_2 >, _t_y_p_e_n_a_m_e _Dom1::value_type > &_____e_1, const _Expr< │ │ │ │ - _Dom1::value_type >  ___D_o_m_2, _t_y_p_e_n_a_m_e _Dom2::value_type > │ │ │ │ - &_____e_2) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std::_Pow, │ │ │ │ - _Constant, _Expr, _t_y_p_e_n_a_m_e _Dom:: _s_t_d_:_:_p_o_w (const _t_y_p_e_n_a_m_e _Dom:: │ │ │ │ - value_type, ___D_o_m >, _t_y_p_e_n_a_m_e _Dom:: value_type &__t, const _Expr< ___D_o_m, │ │ │ │ - value_type >  _t_y_p_e_n_a_m_e _Dom::value_type > &__e) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std::_Pow, _s_t_d_:_:_p_o_w (const _t_y_p_e_n_a_m_e _v_a_l_a_r_r_a_y< _Tp │ │ │ │ - _Constant, _ValArray, _Tp, _Tp >, _Tp >::value_type &__t, const _v_a_l_a_r_r_a_y< _Tp │ │ │ │ - >  > &_____v) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std::_Pow, _s_t_d_:_:_p_o_w (const _v_a_l_a_r_r_a_y< _Tp > &_____v, │ │ │ │ - _ValArray, _Constant, _Tp, _Tp >, _Tp const _t_y_p_e_n_a_m_e _v_a_l_a_r_r_a_y< _Tp >:: │ │ │ │ - >  value_type &__t) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std::_Pow, │ │ │ │ - _ValArray, _ValArray, _Tp, _Tp >, _Tp _s_t_d_:_:_p_o_w (const _v_a_l_a_r_r_a_y< _Tp > &_____v, │ │ │ │ - >  const _v_a_l_a_r_r_a_y< _Tp > &_____w) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _BinClos< _s_t_r_u_c_t std::_Pow, │ │ │ │ - _ValArray, _Expr, _t_y_p_e_n_a_m_e _Dom:: _s_t_d_:_:_p_o_w (const _v_a_l_a_r_r_a_y< _t_y_p_e_n_a_m_e │ │ │ │ - value_type, ___D_o_m >, _t_y_p_e_n_a_m_e _Dom:: _Dom::valarray > &_____v, const _Expr< │ │ │ │ - value_type >  ___D_o_m, _t_y_p_e_n_a_m_e _Dom::value_type > &__e) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _UnClos< _s_t_r_u_c_t std::_Sin, │ │ │ │ - _Expr, ___D_o_m >, _t_y_p_e_n_a_m_e _Dom:: _s_t_d_:_:_s_i_n (const _Expr< ___D_o_m, _t_y_p_e_n_a_m_e │ │ │ │ - value_type >  _Dom::value_type > &__e) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _Expr< _UnClos< _s_t_r_u_c_t std::_Sin, │ │ │ │ - _ValArray, _Tp >, _Tp >  _s_t_d_:_:_s_i_n (const _v_a_l_a_r_r_a_y< _Tp > &_____v) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _UnClos< _s_t_r_u_c_t std::_Sinh, │ │ │ │ - _Expr, ___D_o_m >, _t_y_p_e_n_a_m_e _Dom:: _s_t_d_:_:_s_i_n_h (const _Expr< ___D_o_m, _t_y_p_e_n_a_m_e │ │ │ │ - value_type >  _Dom::value_type > &__e) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _Expr< _UnClos< _s_t_r_u_c_t std::_Sinh, │ │ │ │ - _ValArray, _Tp >, _Tp >  _s_t_d_:_:_s_i_n_h (const _v_a_l_a_r_r_a_y< _Tp > &_____v) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _UnClos< _s_t_r_u_c_t std::_Sqrt, │ │ │ │ - _Expr, ___D_o_m >, _t_y_p_e_n_a_m_e _Dom:: _s_t_d_:_:_s_q_r_t (const _Expr< ___D_o_m, _t_y_p_e_n_a_m_e │ │ │ │ - value_type >  _Dom::value_type > &__e) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _Expr< _UnClos< _s_t_r_u_c_t std::_Sqrt, │ │ │ │ - _ValArray, _Tp >, _Tp >  _s_t_d_:_:_s_q_r_t (const _v_a_l_a_r_r_a_y< _Tp > &_____v) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _UnClos< _s_t_r_u_c_t std::_Tan, │ │ │ │ - _Expr, ___D_o_m >, _t_y_p_e_n_a_m_e _Dom:: _s_t_d_:_:_t_a_n (const _Expr< ___D_o_m, _t_y_p_e_n_a_m_e │ │ │ │ - value_type >  _Dom::value_type > &__e) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _Expr< _UnClos< _s_t_r_u_c_t std::_Tan, │ │ │ │ - _ValArray, _Tp >, _Tp >  _s_t_d_:_:_t_a_n (const _v_a_l_a_r_r_a_y< _Tp > &_____v) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___D_o_m > │ │ │ │ - _Expr< _UnClos< _s_t_r_u_c_t std::_Tanh, │ │ │ │ - _Expr, ___D_o_m >, _t_y_p_e_n_a_m_e _Dom:: _s_t_d_:_:_t_a_n_h (const _Expr< ___D_o_m, _t_y_p_e_n_a_m_e │ │ │ │ - value_type >  _Dom::value_type > &__e) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _Expr< _UnClos< _s_t_r_u_c_t std::_Tanh, │ │ │ │ - _ValArray, _Tp >, _Tp >  _s_t_d_:_:_t_a_n_h (const _v_a_l_a_r_r_a_y< _Tp > &_____v) │ │ │ │ -  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ This is an internal header file, included by other library headers. Do not │ │ │ │ -attempt to use it directly. Instead, include . │ │ │ │ -Definition in file _v_a_l_a_r_r_a_y___a_f_t_e_r_._h. │ │ │ │ -********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ -********** _?◆_? __DDEEFFIINNEE__EEXXPPRR__BBIINNAARRYY__FFUUNNCCTTIIOONN ********** │ │ │ │ -#define _DEFINE_EXPR_BINARY_FUNCTION (   _Fun, │ │ │ │ -   _UFun  │ │ │ │ - ) │ │ │ │ -Definition at line _4_6_2 of file _v_a_l_a_r_r_a_y___a_f_t_e_r_._h. │ │ │ │ -********** _?◆_? __DDEEFFIINNEE__EEXXPPRR__BBIINNAARRYY__OOPPEERRAATTOORR ********** │ │ │ │ -#define _DEFINE_EXPR_BINARY_OPERATOR (   _Op, │ │ │ │ -   _Name  │ │ │ │ - ) │ │ │ │ -Definition at line _3_4_0 of file _v_a_l_a_r_r_a_y___a_f_t_e_r_._h. │ │ │ │ -********** _?◆_? __DDEEFFIINNEE__EEXXPPRR__UUNNAARRYY__FFUUNNCCTTIIOONN ********** │ │ │ │ -#define _DEFINE_EXPR_UNARY_FUNCTION (   _Name, │ │ │ │ -   _UName  │ │ │ │ - ) │ │ │ │ -Definition at line _4_2_6 of file _v_a_l_a_r_r_a_y___a_f_t_e_r_._h. │ │ │ │ -********** _?◆_? __DDEEFFIINNEE__EEXXPPRR__UUNNAARRYY__OOPPEERRAATTOORR ********** │ │ │ │ -#define _DEFINE_EXPR_UNARY_OPERATOR (   _Op, │ │ │ │ -   _Name  │ │ │ │ - ) │ │ │ │ -Definition at line _3_2_5 of file _v_a_l_a_r_r_a_y___a_f_t_e_r_._h. │ │ │ │ +attempt to use it directly. Instead, include . │ │ │ │ +Definition in file _u_n_i_q_u_e___l_o_c_k_._h. │ │ │ │ * _b_i_t_s │ │ │ │ - * _v_a_l_a_r_r_a_y___a_f_t_e_r_._h │ │ │ │ + * _u_n_i_q_u_e___l_o_c_k_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-12-base/libstdc++/user/a00353_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: valarray_after.h Source File │ │ │ +libstdc++: unique_lock.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -45,20 +45,20 @@ │ │ │ │ │ │
│ │ │
│ │ │ -
valarray_after.h
│ │ │ +
unique_lock.h
│ │ │
│ │ │
│ │ │ -Go to the documentation of this file.
1// The template and inlines for the -*- C++ -*- internal _Meta class.
│ │ │ +Go to the documentation of this file.
1// std::unique_lock implementation -*- C++ -*-
│ │ │
2
│ │ │ -
3// Copyright (C) 1997-2022 Free Software Foundation, Inc.
│ │ │ +
3// Copyright (C) 2008-2022 Free Software Foundation, Inc.
│ │ │
4//
│ │ │
5// This file is part of the GNU ISO C++ Library. This library is free
│ │ │
6// software; you can redistribute it and/or modify it under the
│ │ │
7// terms of the GNU General Public License as published by the
│ │ │
8// Free Software Foundation; either version 3, or (at your option)
│ │ │
9// any later version.
│ │ │
10
│ │ │ @@ -72,553 +72,260 @@ │ │ │
18// 3.1, as published by the Free Software Foundation.
│ │ │
19
│ │ │
20// You should have received a copy of the GNU General Public License and
│ │ │
21// a copy of the GCC Runtime Library Exception along with this program;
│ │ │
22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
│ │ │
23// <http://www.gnu.org/licenses/>.
│ │ │
24
│ │ │ -
25/** @file bits/valarray_after.h
│ │ │ +
25/** @file bits/unique_lock.h
│ │ │
26 * This is an internal header file, included by other library headers.
│ │ │ -
27 * Do not attempt to use it directly. @headername{valarray}
│ │ │ +
27 * Do not attempt to use it directly. @headername{mutex}
│ │ │
28 */
│ │ │
29
│ │ │ -
30// Written by Gabriel Dos Reis <Gabriel.Dos-Reis@cmla.ens-cachan.fr>
│ │ │ -
31
│ │ │ -
32#ifndef _VALARRAY_AFTER_H
│ │ │ -
33#define _VALARRAY_AFTER_H 1
│ │ │ +
30#ifndef _GLIBCXX_UNIQUE_LOCK_H
│ │ │ +
31#define _GLIBCXX_UNIQUE_LOCK_H 1
│ │ │ +
32
│ │ │ +
33#pragma GCC system_header
│ │ │
34
│ │ │ -
35#pragma GCC system_header
│ │ │ -
36
│ │ │ -
37namespace std _GLIBCXX_VISIBILITY(default)
│ │ │ -
38{
│ │ │ -
39_GLIBCXX_BEGIN_NAMESPACE_VERSION
│ │ │ -
40
│ │ │ -
41namespace __detail
│ │ │ -
42{
│ │ │ -
43 //
│ │ │ -
44 // gslice_array closure.
│ │ │ -
45 //
│ │ │ -
46 template<class _Dom>
│ │ │ -
47 class _GBase
│ │ │ -
48 {
│ │ │ -
49 public:
│ │ │ -
50 typedef typename _Dom::value_type value_type;
│ │ │ -
51
│ │ │ -
52 _GBase (const _Dom& __e, const valarray<size_t>& __i)
│ │ │ -
53 : _M_expr (__e), _M_index(__i) {}
│ │ │ -
54
│ │ │ -
55 value_type
│ │ │ -
56 operator[] (size_t __i) const
│ │ │ -
57 { return _M_expr[_M_index[__i]]; }
│ │ │ -
58
│ │ │ -
59 size_t
│ │ │ -
60 size () const
│ │ │ -
61 { return _M_index.size(); }
│ │ │ -
62
│ │ │ -
63 private:
│ │ │ -
64 typename _ValArrayRef<_Dom>::__type _M_expr;
│ │ │ -
65 const valarray<size_t>& _M_index;
│ │ │ -
66 };
│ │ │ +
35#if __cplusplus < 201103L
│ │ │ +
36# include <bits/c++0x_warning.h>
│ │ │ +
37#else
│ │ │ +
38
│ │ │ +
39#include <bits/chrono.h>
│ │ │ +
40#include <bits/move.h> // for std::swap
│ │ │ +
41#include <bits/std_mutex.h> // for std::defer_lock_t
│ │ │ +
42
│ │ │ +
43namespace std _GLIBCXX_VISIBILITY(default)
│ │ │ +
44{
│ │ │ +
45_GLIBCXX_BEGIN_NAMESPACE_VERSION
│ │ │ +
46
│ │ │ +
47 /** @brief A movable scoped lock type.
│ │ │ +
48 *
│ │ │ +
49 * A unique_lock controls mutex ownership within a scope. Ownership of the
│ │ │ +
50 * mutex can be delayed until after construction and can be transferred
│ │ │ +
51 * to another unique_lock by move construction or move assignment. If a
│ │ │ +
52 * mutex lock is owned when the destructor runs ownership will be released.
│ │ │ +
53 *
│ │ │ +
54 * @headerfile mutex
│ │ │ +
55 * @ingroup mutexes
│ │ │ +
56 * @since C++11
│ │ │ +
57 */
│ │ │ +
58 template<typename _Mutex>
│ │ │ +
│ │ │ + │ │ │ +
60 {
│ │ │ +
61 public:
│ │ │ +
62 typedef _Mutex mutex_type;
│ │ │ +
63
│ │ │ +
64 unique_lock() noexcept
│ │ │ +
65 : _M_device(0), _M_owns(false)
│ │ │ +
66 { }
│ │ │
67
│ │ │ -
68 template<typename _Tp>
│ │ │ -
69 class _GBase<_Array<_Tp> >
│ │ │ -
70 {
│ │ │ -
71 public:
│ │ │ -
72 typedef _Tp value_type;
│ │ │ -
73
│ │ │ -
74 _GBase (_Array<_Tp> __a, const valarray<size_t>& __i)
│ │ │ -
75 : _M_array (__a), _M_index(__i) {}
│ │ │ -
76
│ │ │ -
77 value_type
│ │ │ -
78 operator[] (size_t __i) const
│ │ │ -
79 { return _M_array._M_data[_M_index[__i]]; }
│ │ │ -
80
│ │ │ -
81 size_t
│ │ │ -
82 size () const
│ │ │ -
83 { return _M_index.size(); }
│ │ │ -
84
│ │ │ -
85 private:
│ │ │ -
86 const _Array<_Tp> _M_array;
│ │ │ -
87 const valarray<size_t>& _M_index;
│ │ │ -
88 };
│ │ │ -
89
│ │ │ -
90 template<class _Dom>
│ │ │ -
91 struct _GClos<_Expr, _Dom>
│ │ │ -
92 : _GBase<_Dom>
│ │ │ -
93 {
│ │ │ -
94 typedef _GBase<_Dom> _Base;
│ │ │ -
95 typedef typename _Base::value_type value_type;
│ │ │ -
96
│ │ │ -
97 _GClos (const _Dom& __e, const valarray<size_t>& __i)
│ │ │ -
98 : _Base (__e, __i) {}
│ │ │ -
99 };
│ │ │ -
100
│ │ │ -
101 template<typename _Tp>
│ │ │ -
102 struct _GClos<_ValArray, _Tp>
│ │ │ -
103 : _GBase<_Array<_Tp> >
│ │ │ -
104 {
│ │ │ -
105 typedef _GBase<_Array<_Tp> > _Base;
│ │ │ -
106 typedef typename _Base::value_type value_type;
│ │ │ -
107
│ │ │ -
108 _GClos (_Array<_Tp> __a, const valarray<size_t>& __i)
│ │ │ -
109 : _Base (__a, __i) {}
│ │ │ -
110 };
│ │ │ +
68 explicit unique_lock(mutex_type& __m)
│ │ │ +
69 : _M_device(std::__addressof(__m)), _M_owns(false)
│ │ │ +
70 {
│ │ │ +
71 lock();
│ │ │ +
72 _M_owns = true;
│ │ │ +
73 }
│ │ │ +
74
│ │ │ +
75 unique_lock(mutex_type& __m, defer_lock_t) noexcept
│ │ │ +
76 : _M_device(std::__addressof(__m)), _M_owns(false)
│ │ │ +
77 { }
│ │ │ +
78
│ │ │ +
79 unique_lock(mutex_type& __m, try_to_lock_t)
│ │ │ +
80 : _M_device(std::__addressof(__m)), _M_owns(_M_device->try_lock())
│ │ │ +
81 { }
│ │ │ +
82
│ │ │ +
83 unique_lock(mutex_type& __m, adopt_lock_t) noexcept
│ │ │ +
84 : _M_device(std::__addressof(__m)), _M_owns(true)
│ │ │ +
85 {
│ │ │ +
86 // XXX calling thread owns mutex
│ │ │ +
87 }
│ │ │ +
88
│ │ │ +
89 template<typename _Clock, typename _Duration>
│ │ │ +
90 unique_lock(mutex_type& __m,
│ │ │ + │ │ │ +
92 : _M_device(std::__addressof(__m)),
│ │ │ +
93 _M_owns(_M_device->try_lock_until(__atime))
│ │ │ +
94 { }
│ │ │ +
95
│ │ │ +
96 template<typename _Rep, typename _Period>
│ │ │ +
97 unique_lock(mutex_type& __m,
│ │ │ + │ │ │ +
99 : _M_device(std::__addressof(__m)),
│ │ │ +
100 _M_owns(_M_device->try_lock_for(__rtime))
│ │ │ +
101 { }
│ │ │ +
102
│ │ │ + │ │ │ +
104 {
│ │ │ +
105 if (_M_owns)
│ │ │ +
106 unlock();
│ │ │ +
107 }
│ │ │ +
108
│ │ │ +
109 unique_lock(const unique_lock&) = delete;
│ │ │ +
110 unique_lock& operator=(const unique_lock&) = delete;
│ │ │
111
│ │ │ -
112 //
│ │ │ -
113 // indirect_array closure
│ │ │ -
114 //
│ │ │ -
115 template<class _Dom>
│ │ │ -
116 class _IBase
│ │ │ -
117 {
│ │ │ -
118 public:
│ │ │ -
119 typedef typename _Dom::value_type value_type;
│ │ │ -
120
│ │ │ -
121 _IBase (const _Dom& __e, const valarray<size_t>& __i)
│ │ │ -
122 : _M_expr (__e), _M_index (__i) {}
│ │ │ -
123
│ │ │ -
124 value_type
│ │ │ -
125 operator[] (size_t __i) const
│ │ │ -
126 { return _M_expr[_M_index[__i]]; }
│ │ │ -
127
│ │ │ -
128 size_t
│ │ │ -
129 size() const
│ │ │ -
130 { return _M_index.size(); }
│ │ │ +
112 unique_lock(unique_lock&& __u) noexcept
│ │ │ +
113 : _M_device(__u._M_device), _M_owns(__u._M_owns)
│ │ │ +
114 {
│ │ │ +
115 __u._M_device = 0;
│ │ │ +
116 __u._M_owns = false;
│ │ │ +
117 }
│ │ │ +
118
│ │ │ +
119 unique_lock& operator=(unique_lock&& __u) noexcept
│ │ │ +
120 {
│ │ │ +
121 if(_M_owns)
│ │ │ +
122 unlock();
│ │ │ +
123
│ │ │ +
124 unique_lock(std::move(__u)).swap(*this);
│ │ │ +
125
│ │ │ +
126 __u._M_device = 0;
│ │ │ +
127 __u._M_owns = false;
│ │ │ +
128
│ │ │ +
129 return *this;
│ │ │ +
130 }
│ │ │
131
│ │ │ -
132 private:
│ │ │ -
133 typename _ValArrayRef<_Dom>::__type _M_expr;
│ │ │ -
134 const valarray<size_t>& _M_index;
│ │ │ -
135 };
│ │ │ -
136
│ │ │ -
137 template<class _Dom>
│ │ │ -
138 struct _IClos<_Expr, _Dom>
│ │ │ -
139 : _IBase<_Dom>
│ │ │ -
140 {
│ │ │ -
141 typedef _IBase<_Dom> _Base;
│ │ │ -
142 typedef typename _Base::value_type value_type;
│ │ │ -
143
│ │ │ -
144 _IClos (const _Dom& __e, const valarray<size_t>& __i)
│ │ │ -
145 : _Base (__e, __i) {}
│ │ │ -
146 };
│ │ │ -
147
│ │ │ -
148 template<typename _Tp>
│ │ │ -
149 struct _IClos<_ValArray, _Tp>
│ │ │ -
150 : _IBase<valarray<_Tp> >
│ │ │ -
151 {
│ │ │ -
152 typedef _IBase<valarray<_Tp> > _Base;
│ │ │ -
153 typedef _Tp value_type;
│ │ │ -
154
│ │ │ -
155 _IClos (const valarray<_Tp>& __a, const valarray<size_t>& __i)
│ │ │ -
156 : _Base (__a, __i) {}
│ │ │ -
157 };
│ │ │ -
158} // namespace __detail
│ │ │ -
159
│ │ │ -
160 //
│ │ │ -
161 // class _Expr
│ │ │ -
162 //
│ │ │ -
163 template<class _Clos, typename _Tp>
│ │ │ -
164 class _Expr
│ │ │ -
165 {
│ │ │ -
166 public:
│ │ │ -
167 typedef _Tp value_type;
│ │ │ -
168
│ │ │ -
169 _Expr(const _Clos&);
│ │ │ -
170
│ │ │ -
171 const _Clos& operator()() const;
│ │ │ -
172
│ │ │ -
173 value_type operator[](size_t) const;
│ │ │ -
174 valarray<value_type> operator[](slice) const;
│ │ │ -
175 valarray<value_type> operator[](const gslice&) const;
│ │ │ -
176 valarray<value_type> operator[](const valarray<bool>&) const;
│ │ │ -
177 valarray<value_type> operator[](const valarray<size_t>&) const;
│ │ │ -
178
│ │ │ -
179 _Expr<_UnClos<__unary_plus, std::_Expr, _Clos>, value_type>
│ │ │ -
180 operator+() const;
│ │ │ -
181
│ │ │ -
182 _Expr<_UnClos<__negate, std::_Expr, _Clos>, value_type>
│ │ │ -
183 operator-() const;
│ │ │ -
184
│ │ │ -
185 _Expr<_UnClos<__bitwise_not, std::_Expr, _Clos>, value_type>
│ │ │ -
186 operator~() const;
│ │ │ -
187
│ │ │ -
188 _Expr<_UnClos<__logical_not, std::_Expr, _Clos>, bool>
│ │ │ -
189 operator!() const;
│ │ │ -
190
│ │ │ -
191 size_t size() const;
│ │ │ -
192 value_type sum() const;
│ │ │ -
193
│ │ │ -
194 valarray<value_type> shift(int) const;
│ │ │ -
195 valarray<value_type> cshift(int) const;
│ │ │ -
196
│ │ │ -
197 value_type min() const;
│ │ │ -
198 value_type max() const;
│ │ │ -
199
│ │ │ -
200 valarray<value_type> apply(value_type (*)(const value_type&)) const;
│ │ │ -
201 valarray<value_type> apply(value_type (*)(value_type)) const;
│ │ │ -
202
│ │ │ -
203 private:
│ │ │ -
204 const _Clos _M_closure;
│ │ │ -
205 };
│ │ │ -
206
│ │ │ -
207 template<class _Clos, typename _Tp>
│ │ │ -
208 inline
│ │ │ -
209 _Expr<_Clos, _Tp>::_Expr(const _Clos& __c) : _M_closure(__c) {}
│ │ │ -
210
│ │ │ -
211 template<class _Clos, typename _Tp>
│ │ │ -
212 inline const _Clos&
│ │ │ -
213 _Expr<_Clos, _Tp>::operator()() const
│ │ │ -
214 { return _M_closure; }
│ │ │ -
215
│ │ │ -
216 template<class _Clos, typename _Tp>
│ │ │ -
217 inline _Tp
│ │ │ -
218 _Expr<_Clos, _Tp>::operator[](size_t __i) const
│ │ │ -
219 { return _M_closure[__i]; }
│ │ │ -
220
│ │ │ -
221 template<class _Clos, typename _Tp>
│ │ │ -
222 inline valarray<_Tp>
│ │ │ -
223 _Expr<_Clos, _Tp>::operator[](slice __s) const
│ │ │ -
224 {
│ │ │ -
225 valarray<_Tp> __v = valarray<_Tp>(*this)[__s];
│ │ │ -
226 return __v;
│ │ │ -
227 }
│ │ │ +
132 void
│ │ │ +
133 lock()
│ │ │ +
134 {
│ │ │ +
135 if (!_M_device)
│ │ │ +
136 __throw_system_error(int(errc::operation_not_permitted));
│ │ │ +
137 else if (_M_owns)
│ │ │ +
138 __throw_system_error(int(errc::resource_deadlock_would_occur));
│ │ │ +
139 else
│ │ │ +
140 {
│ │ │ +
141 _M_device->lock();
│ │ │ +
142 _M_owns = true;
│ │ │ +
143 }
│ │ │ +
144 }
│ │ │ +
145
│ │ │ +
146 bool
│ │ │ +
147 try_lock()
│ │ │ +
148 {
│ │ │ +
149 if (!_M_device)
│ │ │ +
150 __throw_system_error(int(errc::operation_not_permitted));
│ │ │ +
151 else if (_M_owns)
│ │ │ +
152 __throw_system_error(int(errc::resource_deadlock_would_occur));
│ │ │ +
153 else
│ │ │ +
154 {
│ │ │ +
155 _M_owns = _M_device->try_lock();
│ │ │ +
156 return _M_owns;
│ │ │ +
157 }
│ │ │ +
158 }
│ │ │ +
159
│ │ │ +
160 template<typename _Clock, typename _Duration>
│ │ │ +
161 bool
│ │ │ + │ │ │ +
163 {
│ │ │ +
164 if (!_M_device)
│ │ │ +
165 __throw_system_error(int(errc::operation_not_permitted));
│ │ │ +
166 else if (_M_owns)
│ │ │ +
167 __throw_system_error(int(errc::resource_deadlock_would_occur));
│ │ │ +
168 else
│ │ │ +
169 {
│ │ │ +
170 _M_owns = _M_device->try_lock_until(__atime);
│ │ │ +
171 return _M_owns;
│ │ │ +
172 }
│ │ │ +
173 }
│ │ │ +
174
│ │ │ +
175 template<typename _Rep, typename _Period>
│ │ │ +
176 bool
│ │ │ +
177 try_lock_for(const chrono::duration<_Rep, _Period>& __rtime)
│ │ │ +
178 {
│ │ │ +
179 if (!_M_device)
│ │ │ +
180 __throw_system_error(int(errc::operation_not_permitted));
│ │ │ +
181 else if (_M_owns)
│ │ │ +
182 __throw_system_error(int(errc::resource_deadlock_would_occur));
│ │ │ +
183 else
│ │ │ +
184 {
│ │ │ +
185 _M_owns = _M_device->try_lock_for(__rtime);
│ │ │ +
186 return _M_owns;
│ │ │ +
187 }
│ │ │ +
188 }
│ │ │ +
189
│ │ │ +
190 void
│ │ │ +
191 unlock()
│ │ │ +
192 {
│ │ │ +
193 if (!_M_owns)
│ │ │ +
194 __throw_system_error(int(errc::operation_not_permitted));
│ │ │ +
195 else if (_M_device)
│ │ │ +
196 {
│ │ │ +
197 _M_device->unlock();
│ │ │ +
198 _M_owns = false;
│ │ │ +
199 }
│ │ │ +
200 }
│ │ │ +
201
│ │ │ +
202 void
│ │ │ +
203 swap(unique_lock& __u) noexcept
│ │ │ +
204 {
│ │ │ +
205 std::swap(_M_device, __u._M_device);
│ │ │ +
206 std::swap(_M_owns, __u._M_owns);
│ │ │ +
207 }
│ │ │ +
208
│ │ │ +
209 mutex_type*
│ │ │ +
210 release() noexcept
│ │ │ +
211 {
│ │ │ +
212 mutex_type* __ret = _M_device;
│ │ │ +
213 _M_device = 0;
│ │ │ +
214 _M_owns = false;
│ │ │ +
215 return __ret;
│ │ │ +
216 }
│ │ │ +
217
│ │ │ +
218 bool
│ │ │ +
219 owns_lock() const noexcept
│ │ │ +
220 { return _M_owns; }
│ │ │ +
221
│ │ │ +
222 explicit operator bool() const noexcept
│ │ │ +
223 { return owns_lock(); }
│ │ │ +
224
│ │ │ +
225 mutex_type*
│ │ │ +
226 mutex() const noexcept
│ │ │ +
227 { return _M_device; }
│ │ │
228
│ │ │ -
229 template<class _Clos, typename _Tp>
│ │ │ -
230 inline valarray<_Tp>
│ │ │ -
231 _Expr<_Clos, _Tp>::operator[](const gslice& __gs) const
│ │ │ -
232 {
│ │ │ -
233 valarray<_Tp> __v = valarray<_Tp>(*this)[__gs];
│ │ │ -
234 return __v;
│ │ │ -
235 }
│ │ │ -
236
│ │ │ -
237 template<class _Clos, typename _Tp>
│ │ │ -
238 inline valarray<_Tp>
│ │ │ -
239 _Expr<_Clos, _Tp>::operator[](const valarray<bool>& __m) const
│ │ │ -
240 {
│ │ │ -
241 valarray<_Tp> __v = valarray<_Tp>(*this)[__m];
│ │ │ -
242 return __v;
│ │ │ -
243 }
│ │ │ -
244
│ │ │ -
245 template<class _Clos, typename _Tp>
│ │ │ -
246 inline valarray<_Tp>
│ │ │ -
247 _Expr<_Clos, _Tp>::operator[](const valarray<size_t>& __i) const
│ │ │ -
248 {
│ │ │ -
249 valarray<_Tp> __v = valarray<_Tp>(*this)[__i];
│ │ │ -
250 return __v;
│ │ │ -
251 }
│ │ │ -
252
│ │ │ -
253 template<class _Clos, typename _Tp>
│ │ │ -
254 inline size_t
│ │ │ -
255 _Expr<_Clos, _Tp>::size() const
│ │ │ -
256 { return _M_closure.size(); }
│ │ │ -
257
│ │ │ -
258 template<class _Clos, typename _Tp>
│ │ │ -
259 inline valarray<_Tp>
│ │ │ -
260 _Expr<_Clos, _Tp>::shift(int __n) const
│ │ │ -
261 {
│ │ │ -
262 valarray<_Tp> __v = valarray<_Tp>(*this).shift(__n);
│ │ │ -
263 return __v;
│ │ │ -
264 }
│ │ │ -
265
│ │ │ -
266 template<class _Clos, typename _Tp>
│ │ │ -
267 inline valarray<_Tp>
│ │ │ -
268 _Expr<_Clos, _Tp>::cshift(int __n) const
│ │ │ -
269 {
│ │ │ -
270 valarray<_Tp> __v = valarray<_Tp>(*this).cshift(__n);
│ │ │ -
271 return __v;
│ │ │ -
272 }
│ │ │ -
273
│ │ │ -
274 template<class _Clos, typename _Tp>
│ │ │ -
275 inline valarray<_Tp>
│ │ │ -
276 _Expr<_Clos, _Tp>::apply(_Tp __f(const _Tp&)) const
│ │ │ -
277 {
│ │ │ -
278 valarray<_Tp> __v = valarray<_Tp>(*this).apply(__f);
│ │ │ -
279 return __v;
│ │ │ -
280 }
│ │ │ -
281
│ │ │ -
282 template<class _Clos, typename _Tp>
│ │ │ -
283 inline valarray<_Tp>
│ │ │ -
284 _Expr<_Clos, _Tp>::apply(_Tp __f(_Tp)) const
│ │ │ -
285 {
│ │ │ -
286 valarray<_Tp> __v = valarray<_Tp>(*this).apply(__f);
│ │ │ -
287 return __v;
│ │ │ -
288 }
│ │ │ -
289
│ │ │ -
290 // XXX: replace this with a more robust summation algorithm.
│ │ │ -
291 template<class _Clos, typename _Tp>
│ │ │ -
292 inline _Tp
│ │ │ -
293 _Expr<_Clos, _Tp>::sum() const
│ │ │ -
294 {
│ │ │ -
295 size_t __n = _M_closure.size();
│ │ │ -
296 if (__n == 0)
│ │ │ -
297 return _Tp();
│ │ │ -
298 else
│ │ │ -
299 {
│ │ │ -
300 _Tp __s = _M_closure[--__n];
│ │ │ -
301 while (__n != 0)
│ │ │ -
302 __s += _M_closure[--__n];
│ │ │ -
303 return __s;
│ │ │ -
304 }
│ │ │ -
305 }
│ │ │ -
306
│ │ │ -
307 template<class _Clos, typename _Tp>
│ │ │ -
308 inline _Tp
│ │ │ -
309 _Expr<_Clos, _Tp>::min() const
│ │ │ -
310 { return __valarray_min(_M_closure); }
│ │ │ -
311
│ │ │ -
312 template<class _Clos, typename _Tp>
│ │ │ -
313 inline _Tp
│ │ │ -
314 _Expr<_Clos, _Tp>::max() const
│ │ │ -
315 { return __valarray_max(_M_closure); }
│ │ │ -
316
│ │ │ -
317 template<class _Dom, typename _Tp>
│ │ │ -
318 inline _Expr<_UnClos<__logical_not, _Expr, _Dom>, bool>
│ │ │ -
319 _Expr<_Dom, _Tp>::operator!() const
│ │ │ -
320 {
│ │ │ -
321 typedef _UnClos<__logical_not, std::_Expr, _Dom> _Closure;
│ │ │ -
322 return _Expr<_Closure, bool>(_Closure(this->_M_closure));
│ │ │ -
323 }
│ │ │ -
324
│ │ │ -
325#define _DEFINE_EXPR_UNARY_OPERATOR(_Op, _Name) \
│ │ │ -
326 template<class _Dom, typename _Tp> \
│ │ │ -
327 inline _Expr<_UnClos<_Name, std::_Expr, _Dom>, _Tp> \
│ │ │ -
328 _Expr<_Dom, _Tp>::operator _Op() const \
│ │ │ -
329 { \
│ │ │ -
330 typedef _UnClos<_Name, std::_Expr, _Dom> _Closure; \
│ │ │ -
331 return _Expr<_Closure, _Tp>(_Closure(this->_M_closure)); \
│ │ │ -
332 }
│ │ │ -
333
│ │ │ -
334 _DEFINE_EXPR_UNARY_OPERATOR(+, struct std::__unary_plus)
│ │ │ -
335 _DEFINE_EXPR_UNARY_OPERATOR(-, struct std::__negate)
│ │ │ -
336 _DEFINE_EXPR_UNARY_OPERATOR(~, struct std::__bitwise_not)
│ │ │ -
337
│ │ │ -
338#undef _DEFINE_EXPR_UNARY_OPERATOR
│ │ │ -
339
│ │ │ -
340#define _DEFINE_EXPR_BINARY_OPERATOR(_Op, _Name) \
│ │ │ -
341 template<class _Dom1, class _Dom2> \
│ │ │ -
342 inline _Expr<_BinClos<_Name, _Expr, _Expr, _Dom1, _Dom2>, \
│ │ │ -
343 typename __fun<_Name, typename _Dom1::value_type>::result_type> \
│ │ │ -
344 operator _Op(const _Expr<_Dom1, typename _Dom1::value_type>& __v, \
│ │ │ -
345 const _Expr<_Dom2, typename _Dom2::value_type>& __w) \
│ │ │ -
346 { \
│ │ │ -
347 typedef typename _Dom1::value_type _Arg; \
│ │ │ -
348 typedef typename __fun<_Name, _Arg>::result_type _Value; \
│ │ │ -
349 typedef _BinClos<_Name, _Expr, _Expr, _Dom1, _Dom2> _Closure; \
│ │ │ -
350 return _Expr<_Closure, _Value>(_Closure(__v(), __w())); \
│ │ │ -
351 } \
│ │ │ -
352 \
│ │ │ -
353 template<class _Dom> \
│ │ │ -
354 inline _Expr<_BinClos<_Name, _Expr, _Constant, _Dom, \
│ │ │ -
355 typename _Dom::value_type>, \
│ │ │ -
356 typename __fun<_Name, typename _Dom::value_type>::result_type> \
│ │ │ -
357 operator _Op(const _Expr<_Dom, typename _Dom::value_type>& __v, \
│ │ │ -
358 const typename _Dom::value_type& __t) \
│ │ │ -
359 { \
│ │ │ -
360 typedef typename _Dom::value_type _Arg; \
│ │ │ -
361 typedef typename __fun<_Name, _Arg>::result_type _Value; \
│ │ │ -
362 typedef _BinClos<_Name, _Expr, _Constant, _Dom, _Arg> _Closure; \
│ │ │ -
363 return _Expr<_Closure, _Value>(_Closure(__v(), __t)); \
│ │ │ -
364 } \
│ │ │ -
365 \
│ │ │ -
366 template<class _Dom> \
│ │ │ -
367 inline _Expr<_BinClos<_Name, _Constant, _Expr, \
│ │ │ -
368 typename _Dom::value_type, _Dom>, \
│ │ │ -
369 typename __fun<_Name, typename _Dom::value_type>::result_type> \
│ │ │ -
370 operator _Op(const typename _Dom::value_type& __t, \
│ │ │ -
371 const _Expr<_Dom, typename _Dom::value_type>& __v) \
│ │ │ -
372 { \
│ │ │ -
373 typedef typename _Dom::value_type _Arg; \
│ │ │ -
374 typedef typename __fun<_Name, _Arg>::result_type _Value; \
│ │ │ -
375 typedef _BinClos<_Name, _Constant, _Expr, _Arg, _Dom> _Closure; \
│ │ │ -
376 return _Expr<_Closure, _Value>(_Closure(__t, __v())); \
│ │ │ -
377 } \
│ │ │ -
378 \
│ │ │ -
379 template<class _Dom> \
│ │ │ -
380 inline _Expr<_BinClos<_Name, _Expr, _ValArray, \
│ │ │ -
381 _Dom, typename _Dom::value_type>, \
│ │ │ -
382 typename __fun<_Name, typename _Dom::value_type>::result_type> \
│ │ │ -
383 operator _Op(const _Expr<_Dom,typename _Dom::value_type>& __e, \
│ │ │ -
384 const valarray<typename _Dom::value_type>& __v) \
│ │ │ -
385 { \
│ │ │ -
386 typedef typename _Dom::value_type _Arg; \
│ │ │ -
387 typedef typename __fun<_Name, _Arg>::result_type _Value; \
│ │ │ -
388 typedef _BinClos<_Name, _Expr, _ValArray, _Dom, _Arg> _Closure; \
│ │ │ -
389 return _Expr<_Closure, _Value>(_Closure(__e(), __v)); \
│ │ │ -
390 } \
│ │ │ -
391 \
│ │ │ -
392 template<class _Dom> \
│ │ │ -
393 inline _Expr<_BinClos<_Name, _ValArray, _Expr, \
│ │ │ -
394 typename _Dom::value_type, _Dom>, \
│ │ │ -
395 typename __fun<_Name, typename _Dom::value_type>::result_type> \
│ │ │ -
396 operator _Op(const valarray<typename _Dom::value_type>& __v, \
│ │ │ -
397 const _Expr<_Dom, typename _Dom::value_type>& __e) \
│ │ │ -
398 { \
│ │ │ -
399 typedef typename _Dom::value_type _Tp; \
│ │ │ -
400 typedef typename __fun<_Name, _Tp>::result_type _Value; \
│ │ │ -
401 typedef _BinClos<_Name, _ValArray, _Expr, _Tp, _Dom> _Closure; \
│ │ │ -
402 return _Expr<_Closure, _Value>(_Closure(__v, __e ())); \
│ │ │ -
403 }
│ │ │ -
404
│ │ │ -
405 _DEFINE_EXPR_BINARY_OPERATOR(+, struct std::__plus)
│ │ │ -
406 _DEFINE_EXPR_BINARY_OPERATOR(-, struct std::__minus)
│ │ │ -
407 _DEFINE_EXPR_BINARY_OPERATOR(*, struct std::__multiplies)
│ │ │ -
408 _DEFINE_EXPR_BINARY_OPERATOR(/, struct std::__divides)
│ │ │ -
409 _DEFINE_EXPR_BINARY_OPERATOR(%, struct std::__modulus)
│ │ │ -
410 _DEFINE_EXPR_BINARY_OPERATOR(^, struct std::__bitwise_xor)
│ │ │ -
411 _DEFINE_EXPR_BINARY_OPERATOR(&, struct std::__bitwise_and)
│ │ │ -
412 _DEFINE_EXPR_BINARY_OPERATOR(|, struct std::__bitwise_or)
│ │ │ -
413 _DEFINE_EXPR_BINARY_OPERATOR(<<, struct std::__shift_left)
│ │ │ -
414 _DEFINE_EXPR_BINARY_OPERATOR(>>, struct std::__shift_right)
│ │ │ -
415 _DEFINE_EXPR_BINARY_OPERATOR(&&, struct std::__logical_and)
│ │ │ -
416 _DEFINE_EXPR_BINARY_OPERATOR(||, struct std::__logical_or)
│ │ │ -
417 _DEFINE_EXPR_BINARY_OPERATOR(==, struct std::__equal_to)
│ │ │ -
418 _DEFINE_EXPR_BINARY_OPERATOR(!=, struct std::__not_equal_to)
│ │ │ -
419 _DEFINE_EXPR_BINARY_OPERATOR(<, struct std::__less)
│ │ │ -
420 _DEFINE_EXPR_BINARY_OPERATOR(>, struct std::__greater)
│ │ │ -
421 _DEFINE_EXPR_BINARY_OPERATOR(<=, struct std::__less_equal)
│ │ │ -
422 _DEFINE_EXPR_BINARY_OPERATOR(>=, struct std::__greater_equal)
│ │ │ -
423
│ │ │ -
424#undef _DEFINE_EXPR_BINARY_OPERATOR
│ │ │ -
425
│ │ │ -
426#define _DEFINE_EXPR_UNARY_FUNCTION(_Name, _UName) \
│ │ │ -
427 template<class _Dom> \
│ │ │ -
428 inline _Expr<_UnClos<_UName, _Expr, _Dom>, \
│ │ │ -
429 typename _Dom::value_type> \
│ │ │ -
430 _Name(const _Expr<_Dom, typename _Dom::value_type>& __e) \
│ │ │ -
431 { \
│ │ │ -
432 typedef typename _Dom::value_type _Tp; \
│ │ │ -
433 typedef _UnClos<_UName, _Expr, _Dom> _Closure; \
│ │ │ -
434 return _Expr<_Closure, _Tp>(_Closure(__e())); \
│ │ │ -
435 } \
│ │ │ -
436 \
│ │ │ -
437 template<typename _Tp> \
│ │ │ -
438 inline _Expr<_UnClos<_UName, _ValArray, _Tp>, _Tp> \
│ │ │ -
439 _Name(const valarray<_Tp>& __v) \
│ │ │ -
440 { \
│ │ │ -
441 typedef _UnClos<_UName, _ValArray, _Tp> _Closure; \
│ │ │ -
442 return _Expr<_Closure, _Tp>(_Closure(__v)); \
│ │ │ -
443 }
│ │ │ -
444
│ │ │ -
445 _DEFINE_EXPR_UNARY_FUNCTION(abs, struct std::_Abs)
│ │ │ -
446 _DEFINE_EXPR_UNARY_FUNCTION(cos, struct std::_Cos)
│ │ │ -
447 _DEFINE_EXPR_UNARY_FUNCTION(acos, struct std::_Acos)
│ │ │ -
448 _DEFINE_EXPR_UNARY_FUNCTION(cosh, struct std::_Cosh)
│ │ │ -
449 _DEFINE_EXPR_UNARY_FUNCTION(sin, struct std::_Sin)
│ │ │ -
450 _DEFINE_EXPR_UNARY_FUNCTION(asin, struct std::_Asin)
│ │ │ -
451 _DEFINE_EXPR_UNARY_FUNCTION(sinh, struct std::_Sinh)
│ │ │ -
452 _DEFINE_EXPR_UNARY_FUNCTION(tan, struct std::_Tan)
│ │ │ -
453 _DEFINE_EXPR_UNARY_FUNCTION(tanh, struct std::_Tanh)
│ │ │ -
454 _DEFINE_EXPR_UNARY_FUNCTION(atan, struct std::_Atan)
│ │ │ -
455 _DEFINE_EXPR_UNARY_FUNCTION(exp, struct std::_Exp)
│ │ │ -
456 _DEFINE_EXPR_UNARY_FUNCTION(log, struct std::_Log)
│ │ │ -
457 _DEFINE_EXPR_UNARY_FUNCTION(log10, struct std::_Log10)
│ │ │ -
458 _DEFINE_EXPR_UNARY_FUNCTION(sqrt, struct std::_Sqrt)
│ │ │ -
459
│ │ │ -
460#undef _DEFINE_EXPR_UNARY_FUNCTION
│ │ │ -
461
│ │ │ -
462#define _DEFINE_EXPR_BINARY_FUNCTION(_Fun, _UFun) \
│ │ │ -
463 template<class _Dom1, class _Dom2> \
│ │ │ -
464 inline _Expr<_BinClos<_UFun, _Expr, _Expr, _Dom1, _Dom2>, \
│ │ │ -
465 typename _Dom1::value_type> \
│ │ │ -
466 _Fun(const _Expr<_Dom1, typename _Dom1::value_type>& __e1, \
│ │ │ -
467 const _Expr<_Dom2, typename _Dom2::value_type>& __e2) \
│ │ │ -
468 { \
│ │ │ -
469 typedef typename _Dom1::value_type _Tp; \
│ │ │ -
470 typedef _BinClos<_UFun, _Expr, _Expr, _Dom1, _Dom2> _Closure; \
│ │ │ -
471 return _Expr<_Closure, _Tp>(_Closure(__e1(), __e2())); \
│ │ │ -
472 } \
│ │ │ -
473 \
│ │ │ -
474 template<class _Dom> \
│ │ │ -
475 inline _Expr<_BinClos<_UFun, _Expr, _ValArray, _Dom, \
│ │ │ -
476 typename _Dom::value_type>, \
│ │ │ -
477 typename _Dom::value_type> \
│ │ │ -
478 _Fun(const _Expr<_Dom, typename _Dom::value_type>& __e, \
│ │ │ -
479 const valarray<typename _Dom::value_type>& __v) \
│ │ │ -
480 { \
│ │ │ -
481 typedef typename _Dom::value_type _Tp; \
│ │ │ -
482 typedef _BinClos<_UFun, _Expr, _ValArray, _Dom, _Tp> _Closure; \
│ │ │ -
483 return _Expr<_Closure, _Tp>(_Closure(__e(), __v)); \
│ │ │ -
484 } \
│ │ │ -
485 \
│ │ │ -
486 template<class _Dom> \
│ │ │ -
487 inline _Expr<_BinClos<_UFun, _ValArray, _Expr, \
│ │ │ -
488 typename _Dom::value_type, _Dom>, \
│ │ │ -
489 typename _Dom::value_type> \
│ │ │ -
490 _Fun(const valarray<typename _Dom::valarray>& __v, \
│ │ │ -
491 const _Expr<_Dom, typename _Dom::value_type>& __e) \
│ │ │ -
492 { \
│ │ │ -
493 typedef typename _Dom::value_type _Tp; \
│ │ │ -
494 typedef _BinClos<_UFun, _ValArray, _Expr, _Tp, _Dom> _Closure; \
│ │ │ -
495 return _Expr<_Closure, _Tp>(_Closure(__v, __e())); \
│ │ │ -
496 } \
│ │ │ -
497 \
│ │ │ -
498 template<class _Dom> \
│ │ │ -
499 inline _Expr<_BinClos<_UFun, _Expr, _Constant, _Dom, \
│ │ │ -
500 typename _Dom::value_type>, \
│ │ │ -
501 typename _Dom::value_type> \
│ │ │ -
502 _Fun(const _Expr<_Dom, typename _Dom::value_type>& __e, \
│ │ │ -
503 const typename _Dom::value_type& __t) \
│ │ │ -
504 { \
│ │ │ -
505 typedef typename _Dom::value_type _Tp; \
│ │ │ -
506 typedef _BinClos<_UFun, _Expr, _Constant, _Dom, _Tp> _Closure; \
│ │ │ -
507 return _Expr<_Closure, _Tp>(_Closure(__e(), __t)); \
│ │ │ -
508 } \
│ │ │ -
509 \
│ │ │ -
510 template<class _Dom> \
│ │ │ -
511 inline _Expr<_BinClos<_UFun, _Constant, _Expr, \
│ │ │ -
512 typename _Dom::value_type, _Dom>, \
│ │ │ -
513 typename _Dom::value_type> \
│ │ │ -
514 _Fun(const typename _Dom::value_type& __t, \
│ │ │ -
515 const _Expr<_Dom, typename _Dom::value_type>& __e) \
│ │ │ -
516 { \
│ │ │ -
517 typedef typename _Dom::value_type _Tp; \
│ │ │ -
518 typedef _BinClos<_UFun, _Constant, _Expr, _Tp, _Dom> _Closure; \
│ │ │ -
519 return _Expr<_Closure, _Tp>(_Closure(__t, __e())); \
│ │ │ -
520 } \
│ │ │ -
521 \
│ │ │ -
522 template<typename _Tp> \
│ │ │ -
523 inline _Expr<_BinClos<_UFun, _ValArray, _ValArray, _Tp, _Tp>, _Tp> \
│ │ │ -
524 _Fun(const valarray<_Tp>& __v, const valarray<_Tp>& __w) \
│ │ │ -
525 { \
│ │ │ -
526 typedef _BinClos<_UFun, _ValArray, _ValArray, _Tp, _Tp> _Closure;\
│ │ │ -
527 return _Expr<_Closure, _Tp>(_Closure(__v, __w)); \
│ │ │ -
528 } \
│ │ │ -
529 \
│ │ │ -
530 template<typename _Tp> \
│ │ │ -
531 inline _Expr<_BinClos<_UFun, _ValArray, _Constant, _Tp, _Tp>, _Tp> \
│ │ │ -
532 _Fun(const valarray<_Tp>& __v, \
│ │ │ -
533 const typename valarray<_Tp>::value_type& __t) \
│ │ │ -
534 { \
│ │ │ -
535 typedef _BinClos<_UFun, _ValArray, _Constant, _Tp, _Tp> _Closure;\
│ │ │ -
536 return _Expr<_Closure, _Tp>(_Closure(__v, __t)); \
│ │ │ -
537 } \
│ │ │ -
538 \
│ │ │ -
539 template<typename _Tp> \
│ │ │ -
540 inline _Expr<_BinClos<_UFun, _Constant, _ValArray, _Tp, _Tp>, _Tp> \
│ │ │ -
541 _Fun(const typename valarray<_Tp>::value_type& __t, \
│ │ │ -
542 const valarray<_Tp>& __v) \
│ │ │ -
543 { \
│ │ │ -
544 typedef _BinClos<_UFun, _Constant, _ValArray, _Tp, _Tp> _Closure;\
│ │ │ -
545 return _Expr<_Closure, _Tp>(_Closure(__t, __v)); \
│ │ │ -
546 }
│ │ │ -
547
│ │ │ -
548_DEFINE_EXPR_BINARY_FUNCTION(atan2, struct std::_Atan2)
│ │ │ -
549_DEFINE_EXPR_BINARY_FUNCTION(pow, struct std::_Pow)
│ │ │ -
550
│ │ │ -
551#undef _DEFINE_EXPR_BINARY_FUNCTION
│ │ │ -
552
│ │ │ -
553_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ -
554} // namespace
│ │ │ -
555
│ │ │ -
556#endif /* _CPP_VALARRAY_AFTER_H */
│ │ │ -
constexpr complex< _Tp > operator-(const complex< _Tp > &__x, const complex< _Tp > &__y)
Return new complex value x minus y.
Definition complex:362
│ │ │ -
constexpr complex< _Tp > operator+(const complex< _Tp > &__x, const complex< _Tp > &__y)
Return new complex value x plus y.
Definition complex:332
│ │ │ +
229 private:
│ │ │ +
230 mutex_type* _M_device;
│ │ │ +
231 bool _M_owns;
│ │ │ +
232 };
│ │ │ +
│ │ │ +
233
│ │ │ +
234 /// Swap overload for unique_lock objects.
│ │ │ +
235 /// @relates unique_lock
│ │ │ +
236 template<typename _Mutex>
│ │ │ +
237 inline void
│ │ │ +
│ │ │ + │ │ │ +
239 { __x.swap(__y); }
│ │ │ +
│ │ │ +
240
│ │ │ +
241_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ +
242} // namespace
│ │ │ +
243
│ │ │ +
244#endif // C++11
│ │ │ +
245#endif // _GLIBCXX_UNIQUE_LOCK_H
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
constexpr std::remove_reference< _Tp >::type && move(_Tp &&__t) noexcept
Convert a value to an rvalue.
Definition move.h:104
│ │ │ +
void swap(any &__x, any &__y) noexcept
Exchange the states of two any objects.
Definition any:429
│ │ │ +
constexpr _Tp * __addressof(_Tp &__r) noexcept
Same as C++11 std::addressof.
Definition move.h:49
│ │ │
ISO C++ entities toplevel namespace is std.
│ │ │ +
chrono::duration represents a distance between two points in time
Definition chrono.h:488
│ │ │ +
chrono::time_point represents a point in time as measured by a clock
Definition chrono.h:901
│ │ │ + │ │ │ +
Do not acquire ownership of the mutex.
Definition std_mutex.h:215
│ │ │ +
Try to acquire ownership of the mutex without blocking.
Definition std_mutex.h:218
│ │ │ +
Assume the calling thread has already obtained mutex ownership and manage it.
Definition std_mutex.h:222
│ │ │ +
A movable scoped lock type.
Definition unique_lock.h:60
│ │ │ +
void swap(unique_lock< _Mutex > &__x, unique_lock< _Mutex > &__y) noexcept
Swap overload for unique_lock objects.
│ │ │ + │ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,13 +1,13 @@ │ │ │ │ libstdc++ │ │ │ │ -valarray_after.h │ │ │ │ +unique_lock.h │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -1// The template and inlines for the -*- C++ -*- internal _Meta class. │ │ │ │ +1// std::unique_lock implementation -*- C++ -*- │ │ │ │ 2 │ │ │ │ -3// Copyright (C) 1997-2022 Free Software Foundation, Inc. │ │ │ │ +3// Copyright (C) 2008-2022 Free Software Foundation, Inc. │ │ │ │ 4// │ │ │ │ 5// This file is part of the GNU ISO C++ Library. This library is free │ │ │ │ 6// software; you can redistribute it and/or modify it under the │ │ │ │ 7// terms of the GNU General Public License as published by the │ │ │ │ 8// Free Software Foundation; either version 3, or (at your option) │ │ │ │ 9// any later version. │ │ │ │ 10 │ │ │ │ @@ -21,554 +21,275 @@ │ │ │ │ 18// 3.1, as published by the Free Software Foundation. │ │ │ │ 19 │ │ │ │ 20// You should have received a copy of the GNU General Public License and │ │ │ │ 21// a copy of the GCC Runtime Library Exception along with this program; │ │ │ │ 22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see │ │ │ │ 23// . │ │ │ │ 24 │ │ │ │ -25/** @file bits/valarray_after.h │ │ │ │ +25/** @file bits/unique_lock.h │ │ │ │ 26 * This is an internal header file, included by other library headers. │ │ │ │ -27 * Do not attempt to use it directly. @headername{valarray} │ │ │ │ +27 * Do not attempt to use it directly. @headername{mutex} │ │ │ │ 28 */ │ │ │ │ 29 │ │ │ │ -30// Written by Gabriel Dos Reis │ │ │ │ -31 │ │ │ │ -32#ifndef _VALARRAY_AFTER_H │ │ │ │ -33#define _VALARRAY_AFTER_H 1 │ │ │ │ +30#ifndef _GLIBCXX_UNIQUE_LOCK_H │ │ │ │ +31#define _GLIBCXX_UNIQUE_LOCK_H 1 │ │ │ │ +32 │ │ │ │ +33#pragma GCC system_header │ │ │ │ 34 │ │ │ │ -35#pragma GCC system_header │ │ │ │ -36 │ │ │ │ -37namespace _s_t_d _GLIBCXX_VISIBILITY(default) │ │ │ │ -38{ │ │ │ │ -39_GLIBCXX_BEGIN_NAMESPACE_VERSION │ │ │ │ -40 │ │ │ │ -41namespace __detail │ │ │ │ -42{ │ │ │ │ -43 // │ │ │ │ -44 // gslice_array closure. │ │ │ │ -45 // │ │ │ │ -46 template │ │ │ │ -47 class _GBase │ │ │ │ -48 { │ │ │ │ -49 public: │ │ │ │ -50 typedef typename _Dom::value_type value_type; │ │ │ │ -51 │ │ │ │ -52 _GBase (const _Dom& __e, const valarray& __i) │ │ │ │ -53 : _M_expr (__e), _M_index(__i) {} │ │ │ │ -54 │ │ │ │ -55 value_type │ │ │ │ -56 operator[] (size_t __i) const │ │ │ │ -57 { return _M_expr[_M_index[__i]]; } │ │ │ │ -58 │ │ │ │ -59 size_t │ │ │ │ -60 size () const │ │ │ │ -61 { return _M_index.size(); } │ │ │ │ -62 │ │ │ │ -63 private: │ │ │ │ -64 typename _ValArrayRef<_Dom>::__type _M_expr; │ │ │ │ -65 const valarray& _M_index; │ │ │ │ -66 }; │ │ │ │ +35#if __cplusplus < 201103L │ │ │ │ +36# include <_b_i_t_s_/_c_+_+_0_x___w_a_r_n_i_n_g_._h> │ │ │ │ +37#else │ │ │ │ +38 │ │ │ │ +39#include <_b_i_t_s_/_c_h_r_o_n_o_._h> │ │ │ │ +40#include <_b_i_t_s_/_m_o_v_e_._h> // for std::swap │ │ │ │ +41#include <_b_i_t_s_/_s_t_d___m_u_t_e_x_._h> // for std::defer_lock_t │ │ │ │ +42 │ │ │ │ +43namespace _s_t_d _GLIBCXX_VISIBILITY(default) │ │ │ │ +44{ │ │ │ │ +45_GLIBCXX_BEGIN_NAMESPACE_VERSION │ │ │ │ +46 │ │ │ │ +47 /** @brief A movable scoped lock type. │ │ │ │ +48 * │ │ │ │ +49 * A unique_lock controls mutex ownership within a scope. Ownership of the │ │ │ │ +50 * mutex can be delayed until after construction and can be transferred │ │ │ │ +51 * to another unique_lock by move construction or move assignment. If a │ │ │ │ +52 * mutex lock is owned when the destructor runs ownership will be released. │ │ │ │ +53 * │ │ │ │ +54 * @headerfile mutex │ │ │ │ +55 * @ingroup mutexes │ │ │ │ +56 * @since C++11 │ │ │ │ +57 */ │ │ │ │ +58 template │ │ │ │ +_5_9 class _u_n_i_q_u_e___l_o_c_k │ │ │ │ +60 { │ │ │ │ +61 public: │ │ │ │ +62 typedef ___M_u_t_e_x mutex_type; │ │ │ │ +63 │ │ │ │ +64 _u_n_i_q_u_e___l_o_c_k() noexcept │ │ │ │ +65 : _M_device(0), _M_owns(false) │ │ │ │ +66 { } │ │ │ │ 67 │ │ │ │ -68 template │ │ │ │ -69 class _GBase<_Array<_Tp> > │ │ │ │ +68 explicit _u_n_i_q_u_e___l_o_c_k(mutex_type& _____m) │ │ │ │ +69 : _M_device(_s_t_d_:_:_____a_d_d_r_e_s_s_o_f(_____m)), _M_owns(false) │ │ │ │ 70 { │ │ │ │ -71 public: │ │ │ │ -72 typedef _Tp value_type; │ │ │ │ -73 │ │ │ │ -74 _GBase (_Array<_Tp> __a, const valarray& __i) │ │ │ │ -75 : _M_array (__a), _M_index(__i) {} │ │ │ │ -76 │ │ │ │ -77 value_type │ │ │ │ -78 operator[] (size_t __i) const │ │ │ │ -79 { return _M_array._M_data[_M_index[__i]]; } │ │ │ │ -80 │ │ │ │ -81 size_t │ │ │ │ -82 size () const │ │ │ │ -83 { return _M_index.size(); } │ │ │ │ -84 │ │ │ │ -85 private: │ │ │ │ -86 const _Array<_Tp> _M_array; │ │ │ │ -87 const valarray& _M_index; │ │ │ │ -88 }; │ │ │ │ -89 │ │ │ │ -90 template │ │ │ │ -91 struct _GClos<_Expr, _Dom> │ │ │ │ -92 : _GBase<_Dom> │ │ │ │ -93 { │ │ │ │ -94 typedef _GBase<_Dom> _Base; │ │ │ │ -95 typedef typename _Base::value_type value_type; │ │ │ │ -96 │ │ │ │ -97 _GClos (const _Dom& __e, const valarray& __i) │ │ │ │ -98 : _Base (__e, __i) {} │ │ │ │ -99 }; │ │ │ │ -100 │ │ │ │ -101 template │ │ │ │ -102 struct _GClos<_ValArray, _Tp> │ │ │ │ -103 : _GBase<_Array<_Tp> > │ │ │ │ +71 lock(); │ │ │ │ +72 _M_owns = true; │ │ │ │ +73 } │ │ │ │ +74 │ │ │ │ +75 _u_n_i_q_u_e___l_o_c_k(mutex_type& _____m, _d_e_f_e_r___l_o_c_k___t) noexcept │ │ │ │ +76 : _M_device(_s_t_d_:_:_____a_d_d_r_e_s_s_o_f(_____m)), _M_owns(false) │ │ │ │ +77 { } │ │ │ │ +78 │ │ │ │ +79 _u_n_i_q_u_e___l_o_c_k(mutex_type& _____m, _t_r_y___t_o___l_o_c_k___t) │ │ │ │ +80 : _M_device(_s_t_d_:_:_____a_d_d_r_e_s_s_o_f(_____m)), _M_owns(_M_device->try_lock()) │ │ │ │ +81 { } │ │ │ │ +82 │ │ │ │ +83 _u_n_i_q_u_e___l_o_c_k(mutex_type& _____m, _a_d_o_p_t___l_o_c_k___t) noexcept │ │ │ │ +84 : _M_device(_s_t_d_:_:_____a_d_d_r_e_s_s_o_f(_____m)), _M_owns(true) │ │ │ │ +85 { │ │ │ │ +86 // XXX calling thread owns mutex │ │ │ │ +87 } │ │ │ │ +88 │ │ │ │ +89 template │ │ │ │ +90 _u_n_i_q_u_e___l_o_c_k(mutex_type& _____m, │ │ │ │ +91 const _c_h_r_o_n_o_:_:_t_i_m_e___p_o_i_n_t_<___C_l_o_c_k_,_ ___D_u_r_a_t_i_o_n_>& _____a_t_i_m_e) │ │ │ │ +92 : _M_device(_s_t_d_:_:_____a_d_d_r_e_s_s_o_f(_____m)), │ │ │ │ +93 _M_owns(_M_device->try_lock_until(_____a_t_i_m_e)) │ │ │ │ +94 { } │ │ │ │ +95 │ │ │ │ +96 template │ │ │ │ +97 _u_n_i_q_u_e___l_o_c_k(mutex_type& _____m, │ │ │ │ +98 const _c_h_r_o_n_o_:_:_d_u_r_a_t_i_o_n_<___R_e_p_,_ ___P_e_r_i_o_d_>& _____r_t_i_m_e) │ │ │ │ +99 : _M_device(_s_t_d_:_:_____a_d_d_r_e_s_s_o_f(_____m)), │ │ │ │ +100 _M_owns(_M_device->try_lock_for(_____r_t_i_m_e)) │ │ │ │ +101 { } │ │ │ │ +102 │ │ │ │ +103 _~_u_n_i_q_u_e___l_o_c_k() │ │ │ │ 104 { │ │ │ │ -105 typedef _GBase<_Array<_Tp> > _Base; │ │ │ │ -106 typedef typename _Base::value_type value_type; │ │ │ │ -107 │ │ │ │ -108 _GClos (_Array<_Tp> __a, const valarray& __i) │ │ │ │ -109 : _Base (__a, __i) {} │ │ │ │ -110 }; │ │ │ │ +105 if (_M_owns) │ │ │ │ +106 unlock(); │ │ │ │ +107 } │ │ │ │ +108 │ │ │ │ +109 _u_n_i_q_u_e___l_o_c_k(const _u_n_i_q_u_e___l_o_c_k&) = delete; │ │ │ │ +110 _u_n_i_q_u_e___l_o_c_k& operator=(const _u_n_i_q_u_e___l_o_c_k&) = delete; │ │ │ │ 111 │ │ │ │ -112 // │ │ │ │ -113 // indirect_array closure │ │ │ │ -114 // │ │ │ │ -115 template │ │ │ │ -116 class _IBase │ │ │ │ -117 { │ │ │ │ -118 public: │ │ │ │ -119 typedef typename _Dom::value_type value_type; │ │ │ │ -120 │ │ │ │ -121 _IBase (const _Dom& __e, const valarray& __i) │ │ │ │ -122 : _M_expr (__e), _M_index (__i) {} │ │ │ │ +112 _u_n_i_q_u_e___l_o_c_k(_u_n_i_q_u_e___l_o_c_k&& _____u) noexcept │ │ │ │ +113 : _M_device(_____u._M_device), _M_owns(_____u._M_owns) │ │ │ │ +114 { │ │ │ │ +115 _____u._M_device = 0; │ │ │ │ +116 _____u._M_owns = false; │ │ │ │ +117 } │ │ │ │ +118 │ │ │ │ +119 _u_n_i_q_u_e___l_o_c_k& operator=(_u_n_i_q_u_e___l_o_c_k&& _____u) noexcept │ │ │ │ +120 { │ │ │ │ +121 if(_M_owns) │ │ │ │ +122 unlock(); │ │ │ │ 123 │ │ │ │ -124 value_type │ │ │ │ -125 operator[] (size_t __i) const │ │ │ │ -126 { return _M_expr[_M_index[__i]]; } │ │ │ │ -127 │ │ │ │ -128 size_t │ │ │ │ -129 size() const │ │ │ │ -130 { return _M_index.size(); } │ │ │ │ +124 _u_n_i_q_u_e___l_o_c_k(_s_t_d_:_:_m_o_v_e(_____u)).swap(*this); │ │ │ │ +125 │ │ │ │ +126 _____u._M_device = 0; │ │ │ │ +127 _____u._M_owns = false; │ │ │ │ +128 │ │ │ │ +129 return *this; │ │ │ │ +130 } │ │ │ │ 131 │ │ │ │ -132 private: │ │ │ │ -133 typename _ValArrayRef<_Dom>::__type _M_expr; │ │ │ │ -134 const valarray& _M_index; │ │ │ │ -135 }; │ │ │ │ -136 │ │ │ │ -137 template │ │ │ │ -138 struct _IClos<_Expr, _Dom> │ │ │ │ -139 : _IBase<_Dom> │ │ │ │ +132 void │ │ │ │ +133 lock() │ │ │ │ +134 { │ │ │ │ +135 if (!_M_device) │ │ │ │ +136 __throw_system_error(int(errc::operation_not_permitted)); │ │ │ │ +137 else if (_M_owns) │ │ │ │ +138 __throw_system_error(int(errc::resource_deadlock_would_occur)); │ │ │ │ +139 else │ │ │ │ 140 { │ │ │ │ -141 typedef _IBase<_Dom> _Base; │ │ │ │ -142 typedef typename _Base::value_type value_type; │ │ │ │ -143 │ │ │ │ -144 _IClos (const _Dom& __e, const valarray& __i) │ │ │ │ -145 : _Base (__e, __i) {} │ │ │ │ -146 }; │ │ │ │ -147 │ │ │ │ -148 template │ │ │ │ -149 struct _IClos<_ValArray, _Tp> │ │ │ │ -150 : _IBase > │ │ │ │ -151 { │ │ │ │ -152 typedef _IBase > _Base; │ │ │ │ -153 typedef _Tp value_type; │ │ │ │ -154 │ │ │ │ -155 _IClos (const valarray<_Tp>& __a, const valarray& __i) │ │ │ │ -156 : _Base (__a, __i) {} │ │ │ │ -157 }; │ │ │ │ -158} // namespace __detail │ │ │ │ +141 _M_device->lock(); │ │ │ │ +142 _M_owns = true; │ │ │ │ +143 } │ │ │ │ +144 } │ │ │ │ +145 │ │ │ │ +146 bool │ │ │ │ +147 try_lock() │ │ │ │ +148 { │ │ │ │ +149 if (!_M_device) │ │ │ │ +150 __throw_system_error(int(errc::operation_not_permitted)); │ │ │ │ +151 else if (_M_owns) │ │ │ │ +152 __throw_system_error(int(errc::resource_deadlock_would_occur)); │ │ │ │ +153 else │ │ │ │ +154 { │ │ │ │ +155 _M_owns = _M_device->try_lock(); │ │ │ │ +156 return _M_owns; │ │ │ │ +157 } │ │ │ │ +158 } │ │ │ │ 159 │ │ │ │ -160 // │ │ │ │ -161 // class _Expr │ │ │ │ -162 // │ │ │ │ -163 template │ │ │ │ -164 class _Expr │ │ │ │ -165 { │ │ │ │ -166 public: │ │ │ │ -167 typedef _Tp value_type; │ │ │ │ -168 │ │ │ │ -169 _Expr(const _Clos&); │ │ │ │ -170 │ │ │ │ -171 const _Clos& operator()() const; │ │ │ │ -172 │ │ │ │ -173 value_type operator[](size_t) const; │ │ │ │ -174 valarray operator[](slice) const; │ │ │ │ -175 valarray operator[](const gslice&) const; │ │ │ │ -176 valarray operator[](const valarray&) const; │ │ │ │ -177 valarray operator[](const valarray&) const; │ │ │ │ -178 │ │ │ │ -179 _Expr<_UnClos<__unary_plus, std::_Expr, _Clos>, value_type> │ │ │ │ -180 _o_p_e_r_a_t_o_r_+() const; │ │ │ │ -181 │ │ │ │ -182 _Expr<_UnClos<__negate, std::_Expr, _Clos>, value_type> │ │ │ │ -183 _o_p_e_r_a_t_o_r_-() const; │ │ │ │ -184 │ │ │ │ -185 _Expr<_UnClos<__bitwise_not, std::_Expr, _Clos>, value_type> │ │ │ │ -186 operator~() const; │ │ │ │ -187 │ │ │ │ -188 _Expr<_UnClos<__logical_not, std::_Expr, _Clos>, bool> │ │ │ │ -189 operator!() const; │ │ │ │ -190 │ │ │ │ -191 size_t size() const; │ │ │ │ -192 value_type sum() const; │ │ │ │ -193 │ │ │ │ -194 valarray shift(int) const; │ │ │ │ -195 valarray cshift(int) const; │ │ │ │ -196 │ │ │ │ -197 value_type min() const; │ │ │ │ -198 value_type max() const; │ │ │ │ -199 │ │ │ │ -200 valarray apply(value_type (*)(const value_type&)) const; │ │ │ │ -201 valarray apply(value_type (*)(value_type)) const; │ │ │ │ -202 │ │ │ │ -203 private: │ │ │ │ -204 const _Clos _M_closure; │ │ │ │ -205 }; │ │ │ │ -206 │ │ │ │ -207 template │ │ │ │ -208 inline │ │ │ │ -209 _Expr<_Clos, _Tp>::_Expr(const _Clos& __c) : _M_closure(__c) {} │ │ │ │ -210 │ │ │ │ -211 template │ │ │ │ -212 inline const _Clos& │ │ │ │ -213 _Expr<_Clos, _Tp>::operator()() const │ │ │ │ -214 { return _M_closure; } │ │ │ │ -215 │ │ │ │ -216 template │ │ │ │ -217 inline _Tp │ │ │ │ -218 _Expr<_Clos, _Tp>::operator[](size_t __i) const │ │ │ │ -219 { return _M_closure[__i]; } │ │ │ │ -220 │ │ │ │ -221 template │ │ │ │ -222 inline valarray<_Tp> │ │ │ │ -223 _Expr<_Clos, _Tp>::operator[](slice __s) const │ │ │ │ -224 { │ │ │ │ -225 valarray<_Tp> __v = valarray<_Tp>(*this)[__s]; │ │ │ │ -226 return __v; │ │ │ │ -227 } │ │ │ │ +160 template │ │ │ │ +161 bool │ │ │ │ +162 try_lock_until(const _c_h_r_o_n_o_:_:_t_i_m_e___p_o_i_n_t_<___C_l_o_c_k_,_ ___D_u_r_a_t_i_o_n_>& _____a_t_i_m_e) │ │ │ │ +163 { │ │ │ │ +164 if (!_M_device) │ │ │ │ +165 __throw_system_error(int(errc::operation_not_permitted)); │ │ │ │ +166 else if (_M_owns) │ │ │ │ +167 __throw_system_error(int(errc::resource_deadlock_would_occur)); │ │ │ │ +168 else │ │ │ │ +169 { │ │ │ │ +170 _M_owns = _M_device->try_lock_until(_____a_t_i_m_e); │ │ │ │ +171 return _M_owns; │ │ │ │ +172 } │ │ │ │ +173 } │ │ │ │ +174 │ │ │ │ +175 template │ │ │ │ +176 bool │ │ │ │ +177 try_lock_for(const _c_h_r_o_n_o_:_:_d_u_r_a_t_i_o_n_<___R_e_p_,_ ___P_e_r_i_o_d_>& _____r_t_i_m_e) │ │ │ │ +178 { │ │ │ │ +179 if (!_M_device) │ │ │ │ +180 __throw_system_error(int(errc::operation_not_permitted)); │ │ │ │ +181 else if (_M_owns) │ │ │ │ +182 __throw_system_error(int(errc::resource_deadlock_would_occur)); │ │ │ │ +183 else │ │ │ │ +184 { │ │ │ │ +185 _M_owns = _M_device->try_lock_for(_____r_t_i_m_e); │ │ │ │ +186 return _M_owns; │ │ │ │ +187 } │ │ │ │ +188 } │ │ │ │ +189 │ │ │ │ +190 void │ │ │ │ +191 unlock() │ │ │ │ +192 { │ │ │ │ +193 if (!_M_owns) │ │ │ │ +194 __throw_system_error(int(errc::operation_not_permitted)); │ │ │ │ +195 else if (_M_device) │ │ │ │ +196 { │ │ │ │ +197 _M_device->unlock(); │ │ │ │ +198 _M_owns = false; │ │ │ │ +199 } │ │ │ │ +200 } │ │ │ │ +201 │ │ │ │ +202 void │ │ │ │ +203 swap(_u_n_i_q_u_e___l_o_c_k& _____u) noexcept │ │ │ │ +204 { │ │ │ │ +205 _s_t_d_:_:_s_w_a_p(_M_device, _____u._M_device); │ │ │ │ +206 _s_t_d_:_:_s_w_a_p(_M_owns, _____u._M_owns); │ │ │ │ +207 } │ │ │ │ +208 │ │ │ │ +209 mutex_type* │ │ │ │ +210 release() noexcept │ │ │ │ +211 { │ │ │ │ +212 mutex_type* _____r_e_t = _M_device; │ │ │ │ +213 _M_device = 0; │ │ │ │ +214 _M_owns = false; │ │ │ │ +215 return _____r_e_t; │ │ │ │ +216 } │ │ │ │ +217 │ │ │ │ +218 bool │ │ │ │ +219 owns_lock() const noexcept │ │ │ │ +220 { return _M_owns; } │ │ │ │ +221 │ │ │ │ +222 explicit operator bool() const noexcept │ │ │ │ +223 { return owns_lock(); } │ │ │ │ +224 │ │ │ │ +225 mutex_type* │ │ │ │ +226 _m_u_t_e_x() const noexcept │ │ │ │ +227 { return _M_device; } │ │ │ │ 228 │ │ │ │ -229 template │ │ │ │ -230 inline valarray<_Tp> │ │ │ │ -231 _Expr<_Clos, _Tp>::operator[](const gslice& __gs) const │ │ │ │ -232 { │ │ │ │ -233 valarray<_Tp> __v = valarray<_Tp>(*this)[__gs]; │ │ │ │ -234 return __v; │ │ │ │ -235 } │ │ │ │ -236 │ │ │ │ -237 template │ │ │ │ -238 inline valarray<_Tp> │ │ │ │ -239 _Expr<_Clos, _Tp>::operator[](const valarray& __m) const │ │ │ │ -240 { │ │ │ │ -241 valarray<_Tp> __v = valarray<_Tp>(*this)[__m]; │ │ │ │ -242 return __v; │ │ │ │ -243 } │ │ │ │ -244 │ │ │ │ -245 template │ │ │ │ -246 inline valarray<_Tp> │ │ │ │ -247 _Expr<_Clos, _Tp>::operator[](const valarray& __i) const │ │ │ │ -248 { │ │ │ │ -249 valarray<_Tp> __v = valarray<_Tp>(*this)[__i]; │ │ │ │ -250 return __v; │ │ │ │ -251 } │ │ │ │ -252 │ │ │ │ -253 template │ │ │ │ -254 inline size_t │ │ │ │ -255 _Expr<_Clos, _Tp>::size() const │ │ │ │ -256 { return _M_closure.size(); } │ │ │ │ -257 │ │ │ │ -258 template │ │ │ │ -259 inline valarray<_Tp> │ │ │ │ -260 _Expr<_Clos, _Tp>::shift(int __n) const │ │ │ │ -261 { │ │ │ │ -262 valarray<_Tp> __v = valarray<_Tp>(*this).shift(__n); │ │ │ │ -263 return __v; │ │ │ │ -264 } │ │ │ │ -265 │ │ │ │ -266 template │ │ │ │ -267 inline valarray<_Tp> │ │ │ │ -268 _Expr<_Clos, _Tp>::cshift(int __n) const │ │ │ │ -269 { │ │ │ │ -270 valarray<_Tp> __v = valarray<_Tp>(*this).cshift(__n); │ │ │ │ -271 return __v; │ │ │ │ -272 } │ │ │ │ -273 │ │ │ │ -274 template │ │ │ │ -275 inline valarray<_Tp> │ │ │ │ -276 _Expr<_Clos, _Tp>::apply(_Tp __f(const _Tp&)) const │ │ │ │ -277 { │ │ │ │ -278 valarray<_Tp> __v = valarray<_Tp>(*this).apply(__f); │ │ │ │ -279 return __v; │ │ │ │ -280 } │ │ │ │ -281 │ │ │ │ -282 template │ │ │ │ -283 inline valarray<_Tp> │ │ │ │ -284 _Expr<_Clos, _Tp>::apply(_Tp __f(_Tp)) const │ │ │ │ -285 { │ │ │ │ -286 valarray<_Tp> __v = valarray<_Tp>(*this).apply(__f); │ │ │ │ -287 return __v; │ │ │ │ -288 } │ │ │ │ -289 │ │ │ │ -290 // XXX: replace this with a more robust summation algorithm. │ │ │ │ -291 template │ │ │ │ -292 inline _Tp │ │ │ │ -293 _Expr<_Clos, _Tp>::sum() const │ │ │ │ -294 { │ │ │ │ -295 size_t __n = _M_closure.size(); │ │ │ │ -296 if (__n == 0) │ │ │ │ -297 return _Tp(); │ │ │ │ -298 else │ │ │ │ -299 { │ │ │ │ -300 _Tp __s = _M_closure[--__n]; │ │ │ │ -301 while (__n != 0) │ │ │ │ -302 __s += _M_closure[--__n]; │ │ │ │ -303 return __s; │ │ │ │ -304 } │ │ │ │ -305 } │ │ │ │ -306 │ │ │ │ -307 template │ │ │ │ -308 inline _Tp │ │ │ │ -309 _Expr<_Clos, _Tp>::min() const │ │ │ │ -310 { return __valarray_min(_M_closure); } │ │ │ │ -311 │ │ │ │ -312 template │ │ │ │ -313 inline _Tp │ │ │ │ -314 _Expr<_Clos, _Tp>::max() const │ │ │ │ -315 { return __valarray_max(_M_closure); } │ │ │ │ -316 │ │ │ │ -317 template │ │ │ │ -318 inline _Expr<_UnClos<__logical_not, _Expr, _Dom>, bool> │ │ │ │ -319 _Expr<_Dom, _Tp>::operator!() const │ │ │ │ -320 { │ │ │ │ -321 typedef _UnClos<__logical_not, std::_Expr, _Dom> _Closure; │ │ │ │ -322 return _Expr<_Closure, bool>(_Closure(this->_M_closure)); │ │ │ │ -323 } │ │ │ │ -324 │ │ │ │ -325#define _DEFINE_EXPR_UNARY_OPERATOR(_Op, _Name) \ │ │ │ │ -326 template \ │ │ │ │ -327 inline _Expr<_UnClos<_Name, std::_Expr, _Dom>, _Tp> \ │ │ │ │ -328 _Expr<_Dom, _Tp>::operator _Op() const \ │ │ │ │ -329 { \ │ │ │ │ -330 typedef _UnClos<_Name, std::_Expr, _Dom> _Closure; \ │ │ │ │ -331 return _Expr<_Closure, _Tp>(_Closure(this->_M_closure)); \ │ │ │ │ -332 } │ │ │ │ -333 │ │ │ │ -334 _DEFINE_EXPR_UNARY_OPERATOR(+, struct std::__unary_plus) │ │ │ │ -335 _DEFINE_EXPR_UNARY_OPERATOR(-, struct std::__negate) │ │ │ │ -336 _DEFINE_EXPR_UNARY_OPERATOR(~, struct std::__bitwise_not) │ │ │ │ -337 │ │ │ │ -338#undef _DEFINE_EXPR_UNARY_OPERATOR │ │ │ │ -339 │ │ │ │ -340#define _DEFINE_EXPR_BINARY_OPERATOR(_Op, _Name) \ │ │ │ │ -341 template \ │ │ │ │ -342 inline _Expr<_BinClos<_Name, _Expr, _Expr, _Dom1, _Dom2>, \ │ │ │ │ -343 typename __fun<_Name, typename _Dom1::value_type>::result_type> \ │ │ │ │ -344 operator _Op(const _Expr<_Dom1, typename _Dom1::value_type>& __v, \ │ │ │ │ -345 const _Expr<_Dom2, typename _Dom2::value_type>& __w) \ │ │ │ │ -346 { \ │ │ │ │ -347 typedef typename _Dom1::value_type _Arg; \ │ │ │ │ -348 typedef typename __fun<_Name, _Arg>::result_type _Value; \ │ │ │ │ -349 typedef _BinClos<_Name, _Expr, _Expr, _Dom1, _Dom2> _Closure; \ │ │ │ │ -350 return _Expr<_Closure, _Value>(_Closure(__v(), __w())); \ │ │ │ │ -351 } \ │ │ │ │ -352 \ │ │ │ │ -353 template \ │ │ │ │ -354 inline _Expr<_BinClos<_Name, _Expr, _Constant, _Dom, \ │ │ │ │ -355 typename _Dom::value_type>, \ │ │ │ │ -356 typename __fun<_Name, typename _Dom::value_type>::result_type> \ │ │ │ │ -357 operator _Op(const _Expr<_Dom, typename _Dom::value_type>& __v, \ │ │ │ │ -358 const typename _Dom::value_type& __t) \ │ │ │ │ -359 { \ │ │ │ │ -360 typedef typename _Dom::value_type _Arg; \ │ │ │ │ -361 typedef typename __fun<_Name, _Arg>::result_type _Value; \ │ │ │ │ -362 typedef _BinClos<_Name, _Expr, _Constant, _Dom, _Arg> _Closure; \ │ │ │ │ -363 return _Expr<_Closure, _Value>(_Closure(__v(), __t)); \ │ │ │ │ -364 } \ │ │ │ │ -365 \ │ │ │ │ -366 template \ │ │ │ │ -367 inline _Expr<_BinClos<_Name, _Constant, _Expr, \ │ │ │ │ -368 typename _Dom::value_type, _Dom>, \ │ │ │ │ -369 typename __fun<_Name, typename _Dom::value_type>::result_type> \ │ │ │ │ -370 operator _Op(const typename _Dom::value_type& __t, \ │ │ │ │ -371 const _Expr<_Dom, typename _Dom::value_type>& __v) \ │ │ │ │ -372 { \ │ │ │ │ -373 typedef typename _Dom::value_type _Arg; \ │ │ │ │ -374 typedef typename __fun<_Name, _Arg>::result_type _Value; \ │ │ │ │ -375 typedef _BinClos<_Name, _Constant, _Expr, _Arg, _Dom> _Closure; \ │ │ │ │ -376 return _Expr<_Closure, _Value>(_Closure(__t, __v())); \ │ │ │ │ -377 } \ │ │ │ │ -378 \ │ │ │ │ -379 template \ │ │ │ │ -380 inline _Expr<_BinClos<_Name, _Expr, _ValArray, \ │ │ │ │ -381 _Dom, typename _Dom::value_type>, \ │ │ │ │ -382 typename __fun<_Name, typename _Dom::value_type>::result_type> \ │ │ │ │ -383 operator _Op(const _Expr<_Dom,typename _Dom::value_type>& __e, \ │ │ │ │ -384 const valarray& __v) \ │ │ │ │ -385 { \ │ │ │ │ -386 typedef typename _Dom::value_type _Arg; \ │ │ │ │ -387 typedef typename __fun<_Name, _Arg>::result_type _Value; \ │ │ │ │ -388 typedef _BinClos<_Name, _Expr, _ValArray, _Dom, _Arg> _Closure; \ │ │ │ │ -389 return _Expr<_Closure, _Value>(_Closure(__e(), __v)); \ │ │ │ │ -390 } \ │ │ │ │ -391 \ │ │ │ │ -392 template \ │ │ │ │ -393 inline _Expr<_BinClos<_Name, _ValArray, _Expr, \ │ │ │ │ -394 typename _Dom::value_type, _Dom>, \ │ │ │ │ -395 typename __fun<_Name, typename _Dom::value_type>::result_type> \ │ │ │ │ -396 operator _Op(const valarray& __v, \ │ │ │ │ -397 const _Expr<_Dom, typename _Dom::value_type>& __e) \ │ │ │ │ -398 { \ │ │ │ │ -399 typedef typename _Dom::value_type _Tp; \ │ │ │ │ -400 typedef typename __fun<_Name, _Tp>::result_type _Value; \ │ │ │ │ -401 typedef _BinClos<_Name, _ValArray, _Expr, _Tp, _Dom> _Closure; \ │ │ │ │ -402 return _Expr<_Closure, _Value>(_Closure(__v, __e ())); \ │ │ │ │ -403 } │ │ │ │ -404 │ │ │ │ -405 _DEFINE_EXPR_BINARY_OPERATOR(+, struct std::__plus) │ │ │ │ -406 _DEFINE_EXPR_BINARY_OPERATOR(-, struct std::__minus) │ │ │ │ -407 _DEFINE_EXPR_BINARY_OPERATOR(*, struct std::__multiplies) │ │ │ │ -408 _DEFINE_EXPR_BINARY_OPERATOR(/, struct std::__divides) │ │ │ │ -409 _DEFINE_EXPR_BINARY_OPERATOR(%, struct std::__modulus) │ │ │ │ -410 _DEFINE_EXPR_BINARY_OPERATOR(^, struct std::__bitwise_xor) │ │ │ │ -411 _DEFINE_EXPR_BINARY_OPERATOR(&, struct std::__bitwise_and) │ │ │ │ -412 _DEFINE_EXPR_BINARY_OPERATOR(|, struct std::__bitwise_or) │ │ │ │ -413 _DEFINE_EXPR_BINARY_OPERATOR(<<, struct std::__shift_left) │ │ │ │ -414 _DEFINE_EXPR_BINARY_OPERATOR(>>, struct std::__shift_right) │ │ │ │ -415 _DEFINE_EXPR_BINARY_OPERATOR(&&, struct std::__logical_and) │ │ │ │ -416 _DEFINE_EXPR_BINARY_OPERATOR(||, struct std::__logical_or) │ │ │ │ -417 _DEFINE_EXPR_BINARY_OPERATOR(==, struct std::__equal_to) │ │ │ │ -418 _DEFINE_EXPR_BINARY_OPERATOR(!=, struct std::__not_equal_to) │ │ │ │ -419 _DEFINE_EXPR_BINARY_OPERATOR(<, struct std::__less) │ │ │ │ -420 _DEFINE_EXPR_BINARY_OPERATOR(>, struct std::__greater) │ │ │ │ -421 _DEFINE_EXPR_BINARY_OPERATOR(<=, struct std::__less_equal) │ │ │ │ -422 _DEFINE_EXPR_BINARY_OPERATOR(>=, struct std::__greater_equal) │ │ │ │ -423 │ │ │ │ -424#undef _DEFINE_EXPR_BINARY_OPERATOR │ │ │ │ -425 │ │ │ │ -426#define _DEFINE_EXPR_UNARY_FUNCTION(_Name, _UName) \ │ │ │ │ -427 template \ │ │ │ │ -428 inline _Expr<_UnClos<_UName, _Expr, _Dom>, \ │ │ │ │ -429 typename _Dom::value_type> \ │ │ │ │ -430 _Name(const _Expr<_Dom, typename _Dom::value_type>& __e) \ │ │ │ │ -431 { \ │ │ │ │ -432 typedef typename _Dom::value_type _Tp; \ │ │ │ │ -433 typedef _UnClos<_UName, _Expr, _Dom> _Closure; \ │ │ │ │ -434 return _Expr<_Closure, _Tp>(_Closure(__e())); \ │ │ │ │ -435 } \ │ │ │ │ -436 \ │ │ │ │ -437 template \ │ │ │ │ -438 inline _Expr<_UnClos<_UName, _ValArray, _Tp>, _Tp> \ │ │ │ │ -439 _Name(const valarray<_Tp>& __v) \ │ │ │ │ -440 { \ │ │ │ │ -441 typedef _UnClos<_UName, _ValArray, _Tp> _Closure; \ │ │ │ │ -442 return _Expr<_Closure, _Tp>(_Closure(__v)); \ │ │ │ │ -443 } │ │ │ │ -444 │ │ │ │ -445 _DEFINE_EXPR_UNARY_FUNCTION(abs, struct std::_Abs) │ │ │ │ -446 _DEFINE_EXPR_UNARY_FUNCTION(cos, struct std::_Cos) │ │ │ │ -447 _DEFINE_EXPR_UNARY_FUNCTION(acos, struct std::_Acos) │ │ │ │ -448 _DEFINE_EXPR_UNARY_FUNCTION(cosh, struct std::_Cosh) │ │ │ │ -449 _DEFINE_EXPR_UNARY_FUNCTION(sin, struct std::_Sin) │ │ │ │ -450 _DEFINE_EXPR_UNARY_FUNCTION(asin, struct std::_Asin) │ │ │ │ -451 _DEFINE_EXPR_UNARY_FUNCTION(sinh, struct std::_Sinh) │ │ │ │ -452 _DEFINE_EXPR_UNARY_FUNCTION(tan, struct std::_Tan) │ │ │ │ -453 _DEFINE_EXPR_UNARY_FUNCTION(tanh, struct std::_Tanh) │ │ │ │ -454 _DEFINE_EXPR_UNARY_FUNCTION(atan, struct std::_Atan) │ │ │ │ -455 _DEFINE_EXPR_UNARY_FUNCTION(exp, struct std::_Exp) │ │ │ │ -456 _DEFINE_EXPR_UNARY_FUNCTION(log, struct std::_Log) │ │ │ │ -457 _DEFINE_EXPR_UNARY_FUNCTION(log10, struct std::_Log10) │ │ │ │ -458 _DEFINE_EXPR_UNARY_FUNCTION(sqrt, struct std::_Sqrt) │ │ │ │ -459 │ │ │ │ -460#undef _DEFINE_EXPR_UNARY_FUNCTION │ │ │ │ -461 │ │ │ │ -462#define _DEFINE_EXPR_BINARY_FUNCTION(_Fun, _UFun) \ │ │ │ │ -463 template \ │ │ │ │ -464 inline _Expr<_BinClos<_UFun, _Expr, _Expr, _Dom1, _Dom2>, \ │ │ │ │ -465 typename _Dom1::value_type> \ │ │ │ │ -466 _Fun(const _Expr<_Dom1, typename _Dom1::value_type>& __e1, \ │ │ │ │ -467 const _Expr<_Dom2, typename _Dom2::value_type>& __e2) \ │ │ │ │ -468 { \ │ │ │ │ -469 typedef typename _Dom1::value_type _Tp; \ │ │ │ │ -470 typedef _BinClos<_UFun, _Expr, _Expr, _Dom1, _Dom2> _Closure; \ │ │ │ │ -471 return _Expr<_Closure, _Tp>(_Closure(__e1(), __e2())); \ │ │ │ │ -472 } \ │ │ │ │ -473 \ │ │ │ │ -474 template \ │ │ │ │ -475 inline _Expr<_BinClos<_UFun, _Expr, _ValArray, _Dom, \ │ │ │ │ -476 typename _Dom::value_type>, \ │ │ │ │ -477 typename _Dom::value_type> \ │ │ │ │ -478 _Fun(const _Expr<_Dom, typename _Dom::value_type>& __e, \ │ │ │ │ -479 const valarray& __v) \ │ │ │ │ -480 { \ │ │ │ │ -481 typedef typename _Dom::value_type _Tp; \ │ │ │ │ -482 typedef _BinClos<_UFun, _Expr, _ValArray, _Dom, _Tp> _Closure; \ │ │ │ │ -483 return _Expr<_Closure, _Tp>(_Closure(__e(), __v)); \ │ │ │ │ -484 } \ │ │ │ │ -485 \ │ │ │ │ -486 template \ │ │ │ │ -487 inline _Expr<_BinClos<_UFun, _ValArray, _Expr, \ │ │ │ │ -488 typename _Dom::value_type, _Dom>, \ │ │ │ │ -489 typename _Dom::value_type> \ │ │ │ │ -490 _Fun(const valarray& __v, \ │ │ │ │ -491 const _Expr<_Dom, typename _Dom::value_type>& __e) \ │ │ │ │ -492 { \ │ │ │ │ -493 typedef typename _Dom::value_type _Tp; \ │ │ │ │ -494 typedef _BinClos<_UFun, _ValArray, _Expr, _Tp, _Dom> _Closure; \ │ │ │ │ -495 return _Expr<_Closure, _Tp>(_Closure(__v, __e())); \ │ │ │ │ -496 } \ │ │ │ │ -497 \ │ │ │ │ -498 template \ │ │ │ │ -499 inline _Expr<_BinClos<_UFun, _Expr, _Constant, _Dom, \ │ │ │ │ -500 typename _Dom::value_type>, \ │ │ │ │ -501 typename _Dom::value_type> \ │ │ │ │ -502 _Fun(const _Expr<_Dom, typename _Dom::value_type>& __e, \ │ │ │ │ -503 const typename _Dom::value_type& __t) \ │ │ │ │ -504 { \ │ │ │ │ -505 typedef typename _Dom::value_type _Tp; \ │ │ │ │ -506 typedef _BinClos<_UFun, _Expr, _Constant, _Dom, _Tp> _Closure; \ │ │ │ │ -507 return _Expr<_Closure, _Tp>(_Closure(__e(), __t)); \ │ │ │ │ -508 } \ │ │ │ │ -509 \ │ │ │ │ -510 template \ │ │ │ │ -511 inline _Expr<_BinClos<_UFun, _Constant, _Expr, \ │ │ │ │ -512 typename _Dom::value_type, _Dom>, \ │ │ │ │ -513 typename _Dom::value_type> \ │ │ │ │ -514 _Fun(const typename _Dom::value_type& __t, \ │ │ │ │ -515 const _Expr<_Dom, typename _Dom::value_type>& __e) \ │ │ │ │ -516 { \ │ │ │ │ -517 typedef typename _Dom::value_type _Tp; \ │ │ │ │ -518 typedef _BinClos<_UFun, _Constant, _Expr, _Tp, _Dom> _Closure; \ │ │ │ │ -519 return _Expr<_Closure, _Tp>(_Closure(__t, __e())); \ │ │ │ │ -520 } \ │ │ │ │ -521 \ │ │ │ │ -522 template \ │ │ │ │ -523 inline _Expr<_BinClos<_UFun, _ValArray, _ValArray, _Tp, _Tp>, _Tp> \ │ │ │ │ -524 _Fun(const valarray<_Tp>& __v, const valarray<_Tp>& __w) \ │ │ │ │ -525 { \ │ │ │ │ -526 typedef _BinClos<_UFun, _ValArray, _ValArray, _Tp, _Tp> _Closure;\ │ │ │ │ -527 return _Expr<_Closure, _Tp>(_Closure(__v, __w)); \ │ │ │ │ -528 } \ │ │ │ │ -529 \ │ │ │ │ -530 template \ │ │ │ │ -531 inline _Expr<_BinClos<_UFun, _ValArray, _Constant, _Tp, _Tp>, _Tp> \ │ │ │ │ -532 _Fun(const valarray<_Tp>& __v, \ │ │ │ │ -533 const typename valarray<_Tp>::value_type& __t) \ │ │ │ │ -534 { \ │ │ │ │ -535 typedef _BinClos<_UFun, _ValArray, _Constant, _Tp, _Tp> _Closure;\ │ │ │ │ -536 return _Expr<_Closure, _Tp>(_Closure(__v, __t)); \ │ │ │ │ -537 } \ │ │ │ │ -538 \ │ │ │ │ -539 template \ │ │ │ │ -540 inline _Expr<_BinClos<_UFun, _Constant, _ValArray, _Tp, _Tp>, _Tp> \ │ │ │ │ -541 _Fun(const typename valarray<_Tp>::value_type& __t, \ │ │ │ │ -542 const valarray<_Tp>& __v) \ │ │ │ │ -543 { \ │ │ │ │ -544 typedef _BinClos<_UFun, _Constant, _ValArray, _Tp, _Tp> _Closure;\ │ │ │ │ -545 return _Expr<_Closure, _Tp>(_Closure(__t, __v)); \ │ │ │ │ -546 } │ │ │ │ -547 │ │ │ │ -548_DEFINE_EXPR_BINARY_FUNCTION(atan2, struct std::_Atan2) │ │ │ │ -549_DEFINE_EXPR_BINARY_FUNCTION(pow, struct std::_Pow) │ │ │ │ -550 │ │ │ │ -551#undef _DEFINE_EXPR_BINARY_FUNCTION │ │ │ │ -552 │ │ │ │ -553_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ -554} // namespace │ │ │ │ -555 │ │ │ │ -556#endif /* _CPP_VALARRAY_AFTER_H */ │ │ │ │ -_s_t_d_:_:_o_p_e_r_a_t_o_r_- │ │ │ │ -constexpr complex< _Tp > operator-(const complex< _Tp > &__x, const complex< │ │ │ │ -_Tp > &__y) │ │ │ │ -Return new complex value x minus y. │ │ │ │ -DDeeffiinniittiioonn _c_o_m_p_l_e_x_:_3_6_2 │ │ │ │ -_s_t_d_:_:_o_p_e_r_a_t_o_r_+ │ │ │ │ -constexpr complex< _Tp > operator+(const complex< _Tp > &__x, const complex< │ │ │ │ -_Tp > &__y) │ │ │ │ -Return new complex value x plus y. │ │ │ │ -DDeeffiinniittiioonn _c_o_m_p_l_e_x_:_3_3_2 │ │ │ │ +229 private: │ │ │ │ +230 mutex_type* _M_device; │ │ │ │ +231 bool _M_owns; │ │ │ │ +232 }; │ │ │ │ +233 │ │ │ │ +234 /// Swap overload for unique_lock objects. │ │ │ │ +235 /// @relates unique_lock │ │ │ │ +236 template │ │ │ │ +237 inline void │ │ │ │ +_2_3_8 _s_w_a_p(_u_n_i_q_u_e___l_o_c_k_<___M_u_t_e_x_>& __x, _u_n_i_q_u_e___l_o_c_k_<___M_u_t_e_x_>& __y) noexcept │ │ │ │ +239 { __x.swap(__y); } │ │ │ │ +240 │ │ │ │ +241_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ +242} // namespace │ │ │ │ +243 │ │ │ │ +244#endif // C++11 │ │ │ │ +245#endif // _GLIBCXX_UNIQUE_LOCK_H │ │ │ │ +_c_h_r_o_n_o_._h │ │ │ │ +_s_t_d___m_u_t_e_x_._h │ │ │ │ +_m_o_v_e_._h │ │ │ │ +_c_+_+_0_x___w_a_r_n_i_n_g_._h │ │ │ │ +_s_t_d_:_:_m_o_v_e │ │ │ │ +constexpr std::remove_reference< _Tp >::type && move(_Tp &&__t) noexcept │ │ │ │ +Convert a value to an rvalue. │ │ │ │ +DDeeffiinniittiioonn _m_o_v_e_._h_:_1_0_4 │ │ │ │ +_s_t_d_:_:_s_w_a_p │ │ │ │ +void swap(any &__x, any &__y) noexcept │ │ │ │ +Exchange the states of two any objects. │ │ │ │ +DDeeffiinniittiioonn _a_n_y_:_4_2_9 │ │ │ │ +_s_t_d_:_:_____a_d_d_r_e_s_s_o_f │ │ │ │ +constexpr _Tp * __addressof(_Tp &__r) noexcept │ │ │ │ +Same as C++11 std::addressof. │ │ │ │ +DDeeffiinniittiioonn _m_o_v_e_._h_:_4_9 │ │ │ │ _s_t_d │ │ │ │ ISO C++ entities toplevel namespace is std. │ │ │ │ +_s_t_d_:_:_c_h_r_o_n_o_:_:_d_u_r_a_t_i_o_n │ │ │ │ +chrono::duration represents a distance between two points in time │ │ │ │ +DDeeffiinniittiioonn _c_h_r_o_n_o_._h_:_4_8_8 │ │ │ │ +_s_t_d_:_:_c_h_r_o_n_o_:_:_t_i_m_e___p_o_i_n_t │ │ │ │ +chrono::time_point represents a point in time as measured by a clock │ │ │ │ +DDeeffiinniittiioonn _c_h_r_o_n_o_._h_:_9_0_1 │ │ │ │ +_s_t_d_:_:_m_u_t_e_x │ │ │ │ +DDeeffiinniittiioonn _s_t_d___m_u_t_e_x_._h_:_9_7 │ │ │ │ +_s_t_d_:_:_d_e_f_e_r___l_o_c_k___t │ │ │ │ +Do not acquire ownership of the mutex. │ │ │ │ +DDeeffiinniittiioonn _s_t_d___m_u_t_e_x_._h_:_2_1_5 │ │ │ │ +_s_t_d_:_:_t_r_y___t_o___l_o_c_k___t │ │ │ │ +Try to acquire ownership of the mutex without blocking. │ │ │ │ +DDeeffiinniittiioonn _s_t_d___m_u_t_e_x_._h_:_2_1_8 │ │ │ │ +_s_t_d_:_:_a_d_o_p_t___l_o_c_k___t │ │ │ │ +Assume the calling thread has already obtained mutex ownership and manage it. │ │ │ │ +DDeeffiinniittiioonn _s_t_d___m_u_t_e_x_._h_:_2_2_2 │ │ │ │ +_s_t_d_:_:_u_n_i_q_u_e___l_o_c_k │ │ │ │ +A movable scoped lock type. │ │ │ │ +DDeeffiinniittiioonn _u_n_i_q_u_e___l_o_c_k_._h_:_6_0 │ │ │ │ +_s_t_d_:_:_u_n_i_q_u_e___l_o_c_k_:_:_s_w_a_p │ │ │ │ +void swap(unique_lock< _Mutex > &__x, unique_lock< _Mutex > &__y) noexcept │ │ │ │ +Swap overload for unique_lock objects. │ │ │ │ +DDeeffiinniittiioonn _u_n_i_q_u_e___l_o_c_k_._h_:_2_3_8 │ │ │ │ +_s_t_d_:_:_a_u_t_o___p_t_r___r_e_f │ │ │ │ +DDeeffiinniittiioonn _a_u_t_o___p_t_r_._h_:_4_9 │ │ │ │ * _b_i_t_s │ │ │ │ - * _v_a_l_a_r_r_a_y___a_f_t_e_r_._h │ │ │ │ + * _u_n_i_q_u_e___l_o_c_k_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-12-base/libstdc++/user/a00356.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: valarray_before.h File Reference │ │ │ +libstdc++: specfun.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -46,36 +46,256 @@ │ │ │ /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */ │ │ │ $(document).ready(function(){initNavTree('a00356.html',''); initResizable(); }); │ │ │ /* @license-end */ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -Namespaces
│ │ │ -
valarray_before.h File Reference
│ │ │ +Namespaces | │ │ │ +Macros | │ │ │ +Functions
│ │ │ +
specfun.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ - │ │ │ + │ │ │ │ │ │ - │ │ │ + │ │ │ │ │ │ +

│ │ │ Namespaces

namespace  std
namespace  __gnu_cxx
 
namespace  std::__detail
namespace  std
 
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +

│ │ │ +Macros

#define __cpp_lib_math_special_functions
 
#define __STDCPP_MATH_SPEC_FUNCS__
 
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ +Functions

template<typename _Tp >
__gnu_cxx::__promote< _Tp >::__type __gnu_cxx::airy_ai (_Tp __x)
 
float __gnu_cxx::airy_aif (float __x)
 
long double __gnu_cxx::airy_ail (long double __x)
 
template<typename _Tp >
__gnu_cxx::__promote< _Tp >::__type __gnu_cxx::airy_bi (_Tp __x)
 
float __gnu_cxx::airy_bif (float __x)
 
long double __gnu_cxx::airy_bil (long double __x)
 
template<typename _Tp >
__gnu_cxx::__promote< _Tp >::__type std::assoc_laguerre (unsigned int __n, unsigned int __m, _Tp __x)
 
float std::assoc_laguerref (unsigned int __n, unsigned int __m, float __x)
 
long double std::assoc_laguerrel (unsigned int __n, unsigned int __m, long double __x)
 
template<typename _Tp >
__gnu_cxx::__promote< _Tp >::__type std::assoc_legendre (unsigned int __l, unsigned int __m, _Tp __x)
 
float std::assoc_legendref (unsigned int __l, unsigned int __m, float __x)
 
long double std::assoc_legendrel (unsigned int __l, unsigned int __m, long double __x)
 
template<typename _Tpa , typename _Tpb >
__gnu_cxx::__promote_2< _Tpa, _Tpb >::__type std::beta (_Tpa __a, _Tpb __b)
 
float std::betaf (float __a, float __b)
 
long double std::betal (long double __a, long double __b)
 
template<typename _Tp >
__gnu_cxx::__promote< _Tp >::__type std::comp_ellint_1 (_Tp __k)
 
float std::comp_ellint_1f (float __k)
 
long double std::comp_ellint_1l (long double __k)
 
template<typename _Tp >
__gnu_cxx::__promote< _Tp >::__type std::comp_ellint_2 (_Tp __k)
 
float std::comp_ellint_2f (float __k)
 
long double std::comp_ellint_2l (long double __k)
 
template<typename _Tp , typename _Tpn >
__gnu_cxx::__promote_2< _Tp, _Tpn >::__type std::comp_ellint_3 (_Tp __k, _Tpn __nu)
 
float std::comp_ellint_3f (float __k, float __nu)
 
long double std::comp_ellint_3l (long double __k, long double __nu)
 
template<typename _Tpa , typename _Tpc , typename _Tp >
__gnu_cxx::__promote_3< _Tpa, _Tpc, _Tp >::__type __gnu_cxx::conf_hyperg (_Tpa __a, _Tpc __c, _Tp __x)
 
float __gnu_cxx::conf_hypergf (float __a, float __c, float __x)
 
long double __gnu_cxx::conf_hypergl (long double __a, long double __c, long double __x)
 
template<typename _Tpnu , typename _Tp >
__gnu_cxx::__promote_2< _Tpnu, _Tp >::__type std::cyl_bessel_i (_Tpnu __nu, _Tp __x)
 
float std::cyl_bessel_if (float __nu, float __x)
 
long double std::cyl_bessel_il (long double __nu, long double __x)
 
template<typename _Tpnu , typename _Tp >
__gnu_cxx::__promote_2< _Tpnu, _Tp >::__type std::cyl_bessel_j (_Tpnu __nu, _Tp __x)
 
float std::cyl_bessel_jf (float __nu, float __x)
 
long double std::cyl_bessel_jl (long double __nu, long double __x)
 
template<typename _Tpnu , typename _Tp >
__gnu_cxx::__promote_2< _Tpnu, _Tp >::__type std::cyl_bessel_k (_Tpnu __nu, _Tp __x)
 
float std::cyl_bessel_kf (float __nu, float __x)
 
long double std::cyl_bessel_kl (long double __nu, long double __x)
 
template<typename _Tpnu , typename _Tp >
__gnu_cxx::__promote_2< _Tpnu, _Tp >::__type std::cyl_neumann (_Tpnu __nu, _Tp __x)
 
float std::cyl_neumannf (float __nu, float __x)
 
long double std::cyl_neumannl (long double __nu, long double __x)
 
template<typename _Tp , typename _Tpp >
__gnu_cxx::__promote_2< _Tp, _Tpp >::__type std::ellint_1 (_Tp __k, _Tpp __phi)
 
float std::ellint_1f (float __k, float __phi)
 
long double std::ellint_1l (long double __k, long double __phi)
 
template<typename _Tp , typename _Tpp >
__gnu_cxx::__promote_2< _Tp, _Tpp >::__type std::ellint_2 (_Tp __k, _Tpp __phi)
 
float std::ellint_2f (float __k, float __phi)
 
long double std::ellint_2l (long double __k, long double __phi)
 
template<typename _Tp , typename _Tpn , typename _Tpp >
__gnu_cxx::__promote_3< _Tp, _Tpn, _Tpp >::__type std::ellint_3 (_Tp __k, _Tpn __nu, _Tpp __phi)
 
float std::ellint_3f (float __k, float __nu, float __phi)
 
long double std::ellint_3l (long double __k, long double __nu, long double __phi)
 
template<typename _Tp >
__gnu_cxx::__promote< _Tp >::__type std::expint (_Tp __x)
 
float std::expintf (float __x)
 
long double std::expintl (long double __x)
 
template<typename _Tp >
__gnu_cxx::__promote< _Tp >::__type std::hermite (unsigned int __n, _Tp __x)
 
float std::hermitef (unsigned int __n, float __x)
 
long double std::hermitel (unsigned int __n, long double __x)
 
template<typename _Tpa , typename _Tpb , typename _Tpc , typename _Tp >
__gnu_cxx::__promote_4< _Tpa, _Tpb, _Tpc, _Tp >::__type __gnu_cxx::hyperg (_Tpa __a, _Tpb __b, _Tpc __c, _Tp __x)
 
float __gnu_cxx::hypergf (float __a, float __b, float __c, float __x)
 
long double __gnu_cxx::hypergl (long double __a, long double __b, long double __c, long double __x)
 
template<typename _Tp >
__gnu_cxx::__promote< _Tp >::__type std::laguerre (unsigned int __n, _Tp __x)
 
float std::laguerref (unsigned int __n, float __x)
 
long double std::laguerrel (unsigned int __n, long double __x)
 
template<typename _Tp >
__gnu_cxx::__promote< _Tp >::__type std::legendre (unsigned int __l, _Tp __x)
 
float std::legendref (unsigned int __l, float __x)
 
long double std::legendrel (unsigned int __l, long double __x)
 
template<typename _Tp >
__gnu_cxx::__promote< _Tp >::__type std::riemann_zeta (_Tp __s)
 
float std::riemann_zetaf (float __s)
 
long double std::riemann_zetal (long double __s)
 
template<typename _Tp >
__gnu_cxx::__promote< _Tp >::__type std::sph_bessel (unsigned int __n, _Tp __x)
 
float std::sph_besself (unsigned int __n, float __x)
 
long double std::sph_bessell (unsigned int __n, long double __x)
 
template<typename _Tp >
__gnu_cxx::__promote< _Tp >::__type std::sph_legendre (unsigned int __l, unsigned int __m, _Tp __theta)
 
float std::sph_legendref (unsigned int __l, unsigned int __m, float __theta)
 
long double std::sph_legendrel (unsigned int __l, unsigned int __m, long double __theta)
 
template<typename _Tp >
__gnu_cxx::__promote< _Tp >::__type std::sph_neumann (unsigned int __n, _Tp __x)
 
float std::sph_neumannf (unsigned int __n, float __x)
 
long double std::sph_neumannl (unsigned int __n, long double __x)
 
│ │ │

Detailed Description

│ │ │ -

This is an internal header file, included by other library headers. Do not attempt to use it directly. Instead, include <valarray>.

│ │ │ +

This is an internal header file, included by other library headers. Do not attempt to use it directly. Instead, include <cmath>.

│ │ │ + │ │ │ +

Definition in file specfun.h.

│ │ │ +

Macro Definition Documentation

│ │ │ + │ │ │ +

◆ __cpp_lib_math_special_functions

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
#define __cpp_lib_math_special_functions
│ │ │ +
│ │ │ + │ │ │ +

Definition at line 39 of file specfun.h.

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ +

◆ __STDCPP_MATH_SPEC_FUNCS__

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
#define __STDCPP_MATH_SPEC_FUNCS__
│ │ │ +
│ │ │ │ │ │ -

Definition in file valarray_before.h.

│ │ │ -
│ │ │ +

Definition at line 37 of file specfun.h.

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ +
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,16 +1,259 @@ │ │ │ │ libstdc++ │ │ │ │ -_N_a_m_e_s_p_a_c_e_s │ │ │ │ -valarray_before.h File Reference │ │ │ │ +_N_a_m_e_s_p_a_c_e_s | _M_a_c_r_o_s | _F_u_n_c_t_i_o_n_s │ │ │ │ +specfun.h File Reference │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ NNaammeessppaacceess │ │ │ │ +namespace   _____g_n_u___c_x_x │ │ │ │ +  │ │ │ │ namespace   _s_t_d │ │ │ │   │ │ │ │ -namespace   _s_t_d_:_:_____d_e_t_a_i_l │ │ │ │ +MMaaccrrooss │ │ │ │ +#define  _____c_p_p___l_i_b___m_a_t_h___s_p_e_c_i_a_l___f_u_n_c_t_i_o_n_s │ │ │ │ +  │ │ │ │ +#define  _____S_T_D_C_P_P___M_A_T_H___S_P_E_C___F_U_N_C_S____ │ │ │ │ +  │ │ │ │ +FFuunnccttiioonnss │ │ │ │ +template │ │ │ │ + __gnu_cxx::__promote< _Tp >::__type  _____g_n_u___c_x_x_:_:_a_i_r_y___a_i (_Tp __x) │ │ │ │ +  │ │ │ │ + float  _____g_n_u___c_x_x_:_:_a_i_r_y___a_i_f (float __x) │ │ │ │ +  │ │ │ │ + long double  _____g_n_u___c_x_x_:_:_a_i_r_y___a_i_l (long double __x) │ │ │ │ +  │ │ │ │ +template │ │ │ │ + __gnu_cxx::__promote< _Tp >::__type  _____g_n_u___c_x_x_:_:_a_i_r_y___b_i (_Tp __x) │ │ │ │ +  │ │ │ │ + float  _____g_n_u___c_x_x_:_:_a_i_r_y___b_i_f (float __x) │ │ │ │ +  │ │ │ │ + long double  _____g_n_u___c_x_x_:_:_a_i_r_y___b_i_l (long double __x) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ + __gnu_cxx::__promote< _Tp >::__type  _s_t_d_:_:_a_s_s_o_c___l_a_g_u_e_r_r_e (unsigned int __n, │ │ │ │ + unsigned int _____m, _Tp __x) │ │ │ │ +  │ │ │ │ + float  _s_t_d_:_:_a_s_s_o_c___l_a_g_u_e_r_r_e_f (unsigned int __n, │ │ │ │ + unsigned int _____m, float __x) │ │ │ │ +  │ │ │ │ + long double  _s_t_d_:_:_a_s_s_o_c___l_a_g_u_e_r_r_e_l (unsigned int __n, │ │ │ │ + unsigned int _____m, long double __x) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ + __gnu_cxx::__promote< _Tp >::__type  _s_t_d_:_:_a_s_s_o_c___l_e_g_e_n_d_r_e (unsigned int _____l, │ │ │ │ + unsigned int _____m, _Tp __x) │ │ │ │ +  │ │ │ │ + float  _s_t_d_:_:_a_s_s_o_c___l_e_g_e_n_d_r_e_f (unsigned int _____l, │ │ │ │ + unsigned int _____m, float __x) │ │ │ │ +  │ │ │ │ + long double  _s_t_d_:_:_a_s_s_o_c___l_e_g_e_n_d_r_e_l (unsigned int _____l, │ │ │ │ + unsigned int _____m, long double __x) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___T_p_a , _t_y_p_e_n_a_m_e ___T_p_b > │ │ │ │ + __gnu_cxx::__promote_2< ___T_p_a, ___T_p_b >:: │ │ │ │ + __type  _s_t_d_:_:_b_e_t_a (___T_p_a __a, ___T_p_b __b) │ │ │ │ +  │ │ │ │ + float  _s_t_d_:_:_b_e_t_a_f (float __a, float __b) │ │ │ │ +  │ │ │ │ + long double  _s_t_d_:_:_b_e_t_a_l (long double __a, long │ │ │ │ + double __b) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ + __gnu_cxx::__promote< _Tp >::__type  _s_t_d_:_:_c_o_m_p___e_l_l_i_n_t___1 (_Tp _____k) │ │ │ │ +  │ │ │ │ + float  _s_t_d_:_:_c_o_m_p___e_l_l_i_n_t___1_f (float _____k) │ │ │ │ +  │ │ │ │ + long double  _s_t_d_:_:_c_o_m_p___e_l_l_i_n_t___1_l (long double _____k) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ + __gnu_cxx::__promote< _Tp >::__type  _s_t_d_:_:_c_o_m_p___e_l_l_i_n_t___2 (_Tp _____k) │ │ │ │ +  │ │ │ │ + float  _s_t_d_:_:_c_o_m_p___e_l_l_i_n_t___2_f (float _____k) │ │ │ │ +  │ │ │ │ + long double  _s_t_d_:_:_c_o_m_p___e_l_l_i_n_t___2_l (long double _____k) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___T_p_n > │ │ │ │ + __gnu_cxx::__promote_2< _Tp, ___T_p_n >:: │ │ │ │ + __type  _s_t_d_:_:_c_o_m_p___e_l_l_i_n_t___3 (_Tp _____k, ___T_p_n _____n_u) │ │ │ │ +  │ │ │ │ + float  _s_t_d_:_:_c_o_m_p___e_l_l_i_n_t___3_f (float _____k, float │ │ │ │ + _____n_u) │ │ │ │ +  │ │ │ │ + long double  _s_t_d_:_:_c_o_m_p___e_l_l_i_n_t___3_l (long double _____k, │ │ │ │ + long double _____n_u) │ │ │ │ +  │ │ │ │ +template │ │ │ │ +__gnu_cxx::__promote_3< _Tpa, _Tpc, _Tp _____g_n_u___c_x_x_:_:_c_o_n_f___h_y_p_e_r_g (_Tpa __a, _Tpc │ │ │ │ + >::__type  __c, _Tp __x) │ │ │ │ +  │ │ │ │ + float  _____g_n_u___c_x_x_:_:_c_o_n_f___h_y_p_e_r_g_f (float __a, │ │ │ │ + float __c, float __x) │ │ │ │ +  │ │ │ │ + long double  _____g_n_u___c_x_x_:_:_c_o_n_f___h_y_p_e_r_g_l (long double │ │ │ │ + __a, long double __c, long double __x) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___T_p_n_u , _t_y_p_e_n_a_m_e _Tp > │ │ │ │ + __gnu_cxx::__promote_2< ___T_p_n_u, _Tp >:: │ │ │ │ + __type  _s_t_d_:_:_c_y_l___b_e_s_s_e_l___i (___T_p_n_u _____n_u, _Tp __x) │ │ │ │ +  │ │ │ │ + float  _s_t_d_:_:_c_y_l___b_e_s_s_e_l___i_f (float _____n_u, float │ │ │ │ + __x) │ │ │ │ +  │ │ │ │ + long double  _s_t_d_:_:_c_y_l___b_e_s_s_e_l___i_l (long double _____n_u, │ │ │ │ + long double __x) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___T_p_n_u , _t_y_p_e_n_a_m_e _Tp > │ │ │ │ + __gnu_cxx::__promote_2< ___T_p_n_u, _Tp >:: │ │ │ │ + __type  _s_t_d_:_:_c_y_l___b_e_s_s_e_l___j (___T_p_n_u _____n_u, _Tp __x) │ │ │ │ +  │ │ │ │ + float  _s_t_d_:_:_c_y_l___b_e_s_s_e_l___j_f (float _____n_u, float │ │ │ │ + __x) │ │ │ │ +  │ │ │ │ + long double  _s_t_d_:_:_c_y_l___b_e_s_s_e_l___j_l (long double _____n_u, │ │ │ │ + long double __x) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___T_p_n_u , _t_y_p_e_n_a_m_e _Tp > │ │ │ │ + __gnu_cxx::__promote_2< ___T_p_n_u, _Tp >:: │ │ │ │ + __type  _s_t_d_:_:_c_y_l___b_e_s_s_e_l___k (___T_p_n_u _____n_u, _Tp __x) │ │ │ │ +  │ │ │ │ + float  _s_t_d_:_:_c_y_l___b_e_s_s_e_l___k_f (float _____n_u, float │ │ │ │ + __x) │ │ │ │ +  │ │ │ │ + long double  _s_t_d_:_:_c_y_l___b_e_s_s_e_l___k_l (long double _____n_u, │ │ │ │ + long double __x) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___T_p_n_u , _t_y_p_e_n_a_m_e _Tp > │ │ │ │ + __gnu_cxx::__promote_2< ___T_p_n_u, _Tp >:: │ │ │ │ + __type  _s_t_d_:_:_c_y_l___n_e_u_m_a_n_n (___T_p_n_u _____n_u, _Tp __x) │ │ │ │ +  │ │ │ │ + float  _s_t_d_:_:_c_y_l___n_e_u_m_a_n_n_f (float _____n_u, float │ │ │ │ + __x) │ │ │ │ +  │ │ │ │ + long double  _s_t_d_:_:_c_y_l___n_e_u_m_a_n_n_l (long double _____n_u, │ │ │ │ + long double __x) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___T_p_p > │ │ │ │ + __gnu_cxx::__promote_2< _Tp, ___T_p_p >:: │ │ │ │ + __type  _s_t_d_:_:_e_l_l_i_n_t___1 (_Tp _____k, ___T_p_p __phi) │ │ │ │ +  │ │ │ │ + float  _s_t_d_:_:_e_l_l_i_n_t___1_f (float _____k, float __phi) │ │ │ │ +  │ │ │ │ + long double  _s_t_d_:_:_e_l_l_i_n_t___1_l (long double _____k, long │ │ │ │ + double __phi) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___T_p_p > │ │ │ │ + __gnu_cxx::__promote_2< _Tp, ___T_p_p >:: │ │ │ │ + __type  _s_t_d_:_:_e_l_l_i_n_t___2 (_Tp _____k, ___T_p_p __phi) │ │ │ │ +  │ │ │ │ + float  _s_t_d_:_:_e_l_l_i_n_t___2_f (float _____k, float __phi) │ │ │ │ +  │ │ │ │ + long double  _s_t_d_:_:_e_l_l_i_n_t___2_l (long double _____k, long │ │ │ │ + double __phi) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___T_p_n , _t_y_p_e_n_a_m_e ___T_p_p > │ │ │ │ +__gnu_cxx::__promote_3< _Tp, ___T_p_n, ___T_p_p _s_t_d_:_:_e_l_l_i_n_t___3 (_Tp _____k, ___T_p_n _____n_u, ___T_p_p │ │ │ │ + >::__type  __phi) │ │ │ │ +  │ │ │ │ + float  _s_t_d_:_:_e_l_l_i_n_t___3_f (float _____k, float _____n_u, │ │ │ │ + float __phi) │ │ │ │ +  │ │ │ │ + long double  _s_t_d_:_:_e_l_l_i_n_t___3_l (long double _____k, long │ │ │ │ + double _____n_u, long double __phi) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ + __gnu_cxx::__promote< _Tp >::__type  _s_t_d_:_:_e_x_p_i_n_t (_Tp __x) │ │ │ │ +  │ │ │ │ + float  _s_t_d_:_:_e_x_p_i_n_t_f (float __x) │ │ │ │ +  │ │ │ │ + long double  _s_t_d_:_:_e_x_p_i_n_t_l (long double __x) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ + __gnu_cxx::__promote< _Tp >::__type  _s_t_d_:_:_h_e_r_m_i_t_e (unsigned int __n, _Tp │ │ │ │ + __x) │ │ │ │ +  │ │ │ │ + float  _s_t_d_:_:_h_e_r_m_i_t_e_f (unsigned int __n, float │ │ │ │ + __x) │ │ │ │ +  │ │ │ │ + long double  _s_t_d_:_:_h_e_r_m_i_t_e_l (unsigned int __n, long │ │ │ │ + double __x) │ │ │ │ +  │ │ │ │ +template │ │ │ │ + __gnu_cxx::__promote_4< _Tpa, _Tpb, _____g_n_u___c_x_x_:_:_h_y_p_e_r_g (_Tpa __a, _Tpb __b, │ │ │ │ + _Tpc, _Tp >::__type  _Tpc __c, _Tp __x) │ │ │ │ +  │ │ │ │ + float  _____g_n_u___c_x_x_:_:_h_y_p_e_r_g_f (float __a, float │ │ │ │ + __b, float __c, float __x) │ │ │ │ +  │ │ │ │ + long double  _____g_n_u___c_x_x_:_:_h_y_p_e_r_g_l (long double __a, │ │ │ │ + long double __b, long double __c, long │ │ │ │ + double __x) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ + __gnu_cxx::__promote< _Tp >::__type  _s_t_d_:_:_l_a_g_u_e_r_r_e (unsigned int __n, _Tp │ │ │ │ + __x) │ │ │ │ +  │ │ │ │ + float  _s_t_d_:_:_l_a_g_u_e_r_r_e_f (unsigned int __n, float │ │ │ │ + __x) │ │ │ │ +  │ │ │ │ + long double  _s_t_d_:_:_l_a_g_u_e_r_r_e_l (unsigned int __n, long │ │ │ │ + double __x) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ + __gnu_cxx::__promote< _Tp >::__type  _s_t_d_:_:_l_e_g_e_n_d_r_e (unsigned int _____l, _Tp │ │ │ │ + __x) │ │ │ │ +  │ │ │ │ + float  _s_t_d_:_:_l_e_g_e_n_d_r_e_f (unsigned int _____l, float │ │ │ │ + __x) │ │ │ │ +  │ │ │ │ + long double  _s_t_d_:_:_l_e_g_e_n_d_r_e_l (unsigned int _____l, long │ │ │ │ + double __x) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ + __gnu_cxx::__promote< _Tp >::__type  _s_t_d_:_:_r_i_e_m_a_n_n___z_e_t_a (_Tp _____s) │ │ │ │ +  │ │ │ │ + float  _s_t_d_:_:_r_i_e_m_a_n_n___z_e_t_a_f (float _____s) │ │ │ │ +  │ │ │ │ + long double  _s_t_d_:_:_r_i_e_m_a_n_n___z_e_t_a_l (long double _____s) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ + __gnu_cxx::__promote< _Tp >::__type  _s_t_d_:_:_s_p_h___b_e_s_s_e_l (unsigned int __n, _Tp │ │ │ │ + __x) │ │ │ │ +  │ │ │ │ + float  _s_t_d_:_:_s_p_h___b_e_s_s_e_l_f (unsigned int __n, │ │ │ │ + float __x) │ │ │ │ +  │ │ │ │ + long double  _s_t_d_:_:_s_p_h___b_e_s_s_e_l_l (unsigned int __n, │ │ │ │ + long double __x) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ + __gnu_cxx::__promote< _Tp >::__type  _s_t_d_:_:_s_p_h___l_e_g_e_n_d_r_e (unsigned int _____l, │ │ │ │ + unsigned int _____m, _Tp _____t_h_e_t_a) │ │ │ │ +  │ │ │ │ + float  _s_t_d_:_:_s_p_h___l_e_g_e_n_d_r_e_f (unsigned int _____l, │ │ │ │ + unsigned int _____m, float _____t_h_e_t_a) │ │ │ │ +  │ │ │ │ + long double  _s_t_d_:_:_s_p_h___l_e_g_e_n_d_r_e_l (unsigned int _____l, │ │ │ │ + unsigned int _____m, long double _____t_h_e_t_a) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ + __gnu_cxx::__promote< _Tp >::__type  _s_t_d_:_:_s_p_h___n_e_u_m_a_n_n (unsigned int __n, _Tp │ │ │ │ + __x) │ │ │ │ +  │ │ │ │ + float  _s_t_d_:_:_s_p_h___n_e_u_m_a_n_n_f (unsigned int __n, │ │ │ │ + float __x) │ │ │ │ +  │ │ │ │ + long double  _s_t_d_:_:_s_p_h___n_e_u_m_a_n_n_l (unsigned int __n, │ │ │ │ + long double __x) │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ This is an internal header file, included by other library headers. Do not │ │ │ │ -attempt to use it directly. Instead, include . │ │ │ │ -Definition in file _v_a_l_a_r_r_a_y___b_e_f_o_r_e_._h. │ │ │ │ +attempt to use it directly. Instead, include . │ │ │ │ +Definition in file _s_p_e_c_f_u_n_._h. │ │ │ │ +********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ +********** _?◆_? ____ccpppp__lliibb__mmaatthh__ssppeecciiaall__ffuunnccttiioonnss ********** │ │ │ │ +#define __cpp_lib_math_special_functions │ │ │ │ +Definition at line _3_9 of file _s_p_e_c_f_u_n_._h. │ │ │ │ +********** _?◆_? ____SSTTDDCCPPPP__MMAATTHH__SSPPEECC__FFUUNNCCSS____ ********** │ │ │ │ +#define __STDCPP_MATH_SPEC_FUNCS__ │ │ │ │ +Definition at line _3_7 of file _s_p_e_c_f_u_n_._h. │ │ │ │ * _b_i_t_s │ │ │ │ - * _v_a_l_a_r_r_a_y___b_e_f_o_r_e_._h │ │ │ │ + * _s_p_e_c_f_u_n_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-12-base/libstdc++/user/a00356_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: valarray_before.h Source File │ │ │ +libstdc++: specfun.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -45,20 +45,20 @@ │ │ │ │ │ │
│ │ │
│ │ │ -
valarray_before.h
│ │ │ +
specfun.h
│ │ │
│ │ │
│ │ │ -Go to the documentation of this file.
1// The template and inlines for the -*- C++ -*- internal _Meta class.
│ │ │ +Go to the documentation of this file.
1// Mathematical Special Functions for -*- C++ -*-
│ │ │
2
│ │ │ -
3// Copyright (C) 1997-2022 Free Software Foundation, Inc.
│ │ │ +
3// Copyright (C) 2006-2022 Free Software Foundation, Inc.
│ │ │
4//
│ │ │
5// This file is part of the GNU ISO C++ Library. This library is free
│ │ │
6// software; you can redistribute it and/or modify it under the
│ │ │
7// terms of the GNU General Public License as published by the
│ │ │
8// Free Software Foundation; either version 3, or (at your option)
│ │ │
9// any later version.
│ │ │
10
│ │ │ @@ -72,766 +72,1615 @@ │ │ │
18// 3.1, as published by the Free Software Foundation.
│ │ │
19
│ │ │
20// You should have received a copy of the GNU General Public License and
│ │ │
21// a copy of the GCC Runtime Library Exception along with this program;
│ │ │
22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
│ │ │
23// <http://www.gnu.org/licenses/>.
│ │ │
24
│ │ │ -
25/** @file bits/valarray_before.h
│ │ │ +
25/** @file bits/specfun.h
│ │ │
26 * This is an internal header file, included by other library headers.
│ │ │ -
27 * Do not attempt to use it directly. @headername{valarray}
│ │ │ +
27 * Do not attempt to use it directly. @headername{cmath}
│ │ │
28 */
│ │ │
29
│ │ │ -
30// Written by Gabriel Dos Reis <Gabriel.Dos-Reis@cmla.ens-cachan.fr>
│ │ │ -
31
│ │ │ -
32#ifndef _VALARRAY_BEFORE_H
│ │ │ -
33#define _VALARRAY_BEFORE_H 1
│ │ │ +
30#ifndef _GLIBCXX_BITS_SPECFUN_H
│ │ │ +
31#define _GLIBCXX_BITS_SPECFUN_H 1
│ │ │ +
32
│ │ │ +
33#pragma GCC visibility push(default)
│ │ │
34
│ │ │ -
35#pragma GCC system_header
│ │ │ +
35#include <bits/c++config.h>
│ │ │
36
│ │ │ -
37#include <bits/slice_array.h>
│ │ │ +
37#define __STDCPP_MATH_SPEC_FUNCS__ 201003L
│ │ │
38
│ │ │ -
39namespace std _GLIBCXX_VISIBILITY(default)
│ │ │ -
40{
│ │ │ -
41_GLIBCXX_BEGIN_NAMESPACE_VERSION
│ │ │ -
42
│ │ │ -
43 //
│ │ │ -
44 // Implementing a loosened valarray return value is tricky.
│ │ │ -
45 // First we need to meet 26.3.1/3: we should not add more than
│ │ │ -
46 // two levels of template nesting. Therefore we resort to template
│ │ │ -
47 // template to "flatten" loosened return value types.
│ │ │ -
48 // At some point we use partial specialization to remove one level
│ │ │ -
49 // template nesting due to _Expr<>
│ │ │ -
50 //
│ │ │ -
51
│ │ │ -
52 // This class is NOT defined. It doesn't need to.
│ │ │ -
53 template<typename _Tp1, typename _Tp2> class _Constant;
│ │ │ -
54
│ │ │ -
55 // Implementations of unary functions applied to valarray<>s.
│ │ │ -
56 // I use hard-coded object functions here instead of a generic
│ │ │ -
57 // approach like pointers to function:
│ │ │ -
58 // 1) correctness: some functions take references, others values.
│ │ │ -
59 // we can't deduce the correct type afterwards.
│ │ │ -
60 // 2) efficiency -- object functions can be easily inlined
│ │ │ -
61 // 3) be Koenig-lookup-friendly
│ │ │ -
62
│ │ │ -
63 struct _Abs
│ │ │ -
64 {
│ │ │ -
65 template<typename _Tp>
│ │ │ -
66 _Tp operator()(const _Tp& __t) const
│ │ │ -
67 { return abs(__t); }
│ │ │ -
68 };
│ │ │ -
69
│ │ │ -
70 struct _Cos
│ │ │ -
71 {
│ │ │ -
72 template<typename _Tp>
│ │ │ -
73 _Tp operator()(const _Tp& __t) const
│ │ │ -
74 { return cos(__t); }
│ │ │ -
75 };
│ │ │ -
76
│ │ │ -
77 struct _Acos
│ │ │ -
78 {
│ │ │ -
79 template<typename _Tp>
│ │ │ -
80 _Tp operator()(const _Tp& __t) const
│ │ │ -
81 { return acos(__t); }
│ │ │ -
82 };
│ │ │ -
83
│ │ │ -
84 struct _Cosh
│ │ │ -
85 {
│ │ │ -
86 template<typename _Tp>
│ │ │ -
87 _Tp operator()(const _Tp& __t) const
│ │ │ -
88 { return cosh(__t); }
│ │ │ -
89 };
│ │ │ -
90
│ │ │ -
91 struct _Sin
│ │ │ -
92 {
│ │ │ -
93 template<typename _Tp>
│ │ │ -
94 _Tp operator()(const _Tp& __t) const
│ │ │ -
95 { return sin(__t); }
│ │ │ -
96 };
│ │ │ -
97
│ │ │ -
98 struct _Asin
│ │ │ -
99 {
│ │ │ -
100 template<typename _Tp>
│ │ │ -
101 _Tp operator()(const _Tp& __t) const
│ │ │ -
102 { return asin(__t); }
│ │ │ -
103 };
│ │ │ -
104
│ │ │ -
105 struct _Sinh
│ │ │ -
106 {
│ │ │ -
107 template<typename _Tp>
│ │ │ -
108 _Tp operator()(const _Tp& __t) const
│ │ │ -
109 { return sinh(__t); }
│ │ │ -
110 };
│ │ │ -
111
│ │ │ -
112 struct _Tan
│ │ │ -
113 {
│ │ │ -
114 template<typename _Tp>
│ │ │ -
115 _Tp operator()(const _Tp& __t) const
│ │ │ -
116 { return tan(__t); }
│ │ │ -
117 };
│ │ │ -
118
│ │ │ -
119 struct _Atan
│ │ │ -
120 {
│ │ │ -
121 template<typename _Tp>
│ │ │ -
122 _Tp operator()(const _Tp& __t) const
│ │ │ -
123 { return atan(__t); }
│ │ │ -
124 };
│ │ │ -
125
│ │ │ -
126 struct _Tanh
│ │ │ -
127 {
│ │ │ -
128 template<typename _Tp>
│ │ │ -
129 _Tp operator()(const _Tp& __t) const
│ │ │ -
130 { return tanh(__t); }
│ │ │ -
131 };
│ │ │ -
132
│ │ │ -
133 struct _Exp
│ │ │ -
134 {
│ │ │ -
135 template<typename _Tp>
│ │ │ -
136 _Tp operator()(const _Tp& __t) const
│ │ │ -
137 { return exp(__t); }
│ │ │ -
138 };
│ │ │ -
139
│ │ │ -
140 struct _Log
│ │ │ -
141 {
│ │ │ -
142 template<typename _Tp>
│ │ │ -
143 _Tp operator()(const _Tp& __t) const
│ │ │ -
144 { return log(__t); }
│ │ │ -
145 };
│ │ │ -
146
│ │ │ -
147 struct _Log10
│ │ │ -
148 {
│ │ │ -
149 template<typename _Tp>
│ │ │ -
150 _Tp operator()(const _Tp& __t) const
│ │ │ -
151 { return log10(__t); }
│ │ │ -
152 };
│ │ │ -
153
│ │ │ -
154 struct _Sqrt
│ │ │ -
155 {
│ │ │ -
156 template<typename _Tp>
│ │ │ -
157 _Tp operator()(const _Tp& __t) const
│ │ │ -
158 { return sqrt(__t); }
│ │ │ -
159 };
│ │ │ -
160
│ │ │ -
161 // In the past, we used to tailor operator applications semantics
│ │ │ -
162 // to the specialization of standard function objects (i.e. plus<>, etc.)
│ │ │ -
163 // That is incorrect. Therefore we provide our own surrogates.
│ │ │ -
164
│ │ │ -
165 struct __unary_plus
│ │ │ -
166 {
│ │ │ -
167 template<typename _Tp>
│ │ │ -
168 _Tp operator()(const _Tp& __t) const
│ │ │ -
169 { return +__t; }
│ │ │ -
170 };
│ │ │ -
171
│ │ │ -
172 struct __negate
│ │ │ -
173 {
│ │ │ -
174 template<typename _Tp>
│ │ │ -
175 _Tp operator()(const _Tp& __t) const
│ │ │ -
176 { return -__t; }
│ │ │ -
177 };
│ │ │ -
178
│ │ │ -
179 struct __bitwise_not
│ │ │ -
180 {
│ │ │ -
181 template<typename _Tp>
│ │ │ -
182 _Tp operator()(const _Tp& __t) const
│ │ │ -
183 { return ~__t; }
│ │ │ -
184 };
│ │ │ -
185
│ │ │ -
186 struct __plus
│ │ │ -
187 {
│ │ │ -
188 template<typename _Tp>
│ │ │ -
189 _Tp operator()(const _Tp& __x, const _Tp& __y) const
│ │ │ -
190 { return __x + __y; }
│ │ │ -
191 };
│ │ │ -
192
│ │ │ -
193 struct __minus
│ │ │ -
194 {
│ │ │ -
195 template<typename _Tp>
│ │ │ -
196 _Tp operator()(const _Tp& __x, const _Tp& __y) const
│ │ │ -
197 { return __x - __y; }
│ │ │ -
198 };
│ │ │ -
199
│ │ │ -
200 struct __multiplies
│ │ │ -
201 {
│ │ │ -
202 template<typename _Tp>
│ │ │ -
203 _Tp operator()(const _Tp& __x, const _Tp& __y) const
│ │ │ -
204 { return __x * __y; }
│ │ │ -
205 };
│ │ │ -
206
│ │ │ -
207 struct __divides
│ │ │ -
208 {
│ │ │ -
209 template<typename _Tp>
│ │ │ -
210 _Tp operator()(const _Tp& __x, const _Tp& __y) const
│ │ │ -
211 { return __x / __y; }
│ │ │ -
212 };
│ │ │ -
213
│ │ │ -
214 struct __modulus
│ │ │ -
215 {
│ │ │ -
216 template<typename _Tp>
│ │ │ -
217 _Tp operator()(const _Tp& __x, const _Tp& __y) const
│ │ │ -
218 { return __x % __y; }
│ │ │ -
219 };
│ │ │ -
220
│ │ │ -
221 struct __bitwise_xor
│ │ │ -
222 {
│ │ │ -
223 template<typename _Tp>
│ │ │ -
224 _Tp operator()(const _Tp& __x, const _Tp& __y) const
│ │ │ -
225 { return __x ^ __y; }
│ │ │ -
226 };
│ │ │ -
227
│ │ │ -
228 struct __bitwise_and
│ │ │ -
229 {
│ │ │ -
230 template<typename _Tp>
│ │ │ -
231 _Tp operator()(const _Tp& __x, const _Tp& __y) const
│ │ │ -
232 { return __x & __y; }
│ │ │ -
233 };
│ │ │ -
234
│ │ │ -
235 struct __bitwise_or
│ │ │ -
236 {
│ │ │ -
237 template<typename _Tp>
│ │ │ -
238 _Tp operator()(const _Tp& __x, const _Tp& __y) const
│ │ │ -
239 { return __x | __y; }
│ │ │ -
240 };
│ │ │ -
241
│ │ │ -
242 struct __shift_left
│ │ │ -
243 {
│ │ │ -
244 template<typename _Tp>
│ │ │ -
245 _Tp operator()(const _Tp& __x, const _Tp& __y) const
│ │ │ -
246 { return __x << __y; }
│ │ │ -
247 };
│ │ │ -
248
│ │ │ -
249 struct __shift_right
│ │ │ -
250 {
│ │ │ -
251 template<typename _Tp>
│ │ │ -
252 _Tp operator()(const _Tp& __x, const _Tp& __y) const
│ │ │ -
253 { return __x >> __y; }
│ │ │ -
254 };
│ │ │ -
255
│ │ │ -
256 struct __logical_and
│ │ │ -
257 {
│ │ │ -
258 template<typename _Tp>
│ │ │ -
259 bool operator()(const _Tp& __x, const _Tp& __y) const
│ │ │ -
260 { return __x && __y; }
│ │ │ -
261 };
│ │ │ -
262
│ │ │ -
263 struct __logical_or
│ │ │ -
264 {
│ │ │ -
265 template<typename _Tp>
│ │ │ -
266 bool operator()(const _Tp& __x, const _Tp& __y) const
│ │ │ -
267 { return __x || __y; }
│ │ │ -
268 };
│ │ │ -
269
│ │ │ -
270 struct __logical_not
│ │ │ -
271 {
│ │ │ -
272 template<typename _Tp>
│ │ │ -
273 bool operator()(const _Tp& __x) const
│ │ │ -
274 { return !__x; }
│ │ │ -
275 };
│ │ │ -
276
│ │ │ -
277 struct __equal_to
│ │ │ -
278 {
│ │ │ -
279 template<typename _Tp>
│ │ │ -
280 bool operator()(const _Tp& __x, const _Tp& __y) const
│ │ │ -
281 { return __x == __y; }
│ │ │ -
282 };
│ │ │ -
283
│ │ │ -
284 struct __not_equal_to
│ │ │ -
285 {
│ │ │ -
286 template<typename _Tp>
│ │ │ -
287 bool operator()(const _Tp& __x, const _Tp& __y) const
│ │ │ -
288 { return __x != __y; }
│ │ │ -
289 };
│ │ │ -
290
│ │ │ -
291 struct __less
│ │ │ -
292 {
│ │ │ -
293 template<typename _Tp>
│ │ │ -
294 bool operator()(const _Tp& __x, const _Tp& __y) const
│ │ │ -
295 { return __x < __y; }
│ │ │ -
296 };
│ │ │ -
297
│ │ │ -
298 struct __greater
│ │ │ -
299 {
│ │ │ -
300 template<typename _Tp>
│ │ │ -
301 bool operator()(const _Tp& __x, const _Tp& __y) const
│ │ │ -
302 { return __x > __y; }
│ │ │ -
303 };
│ │ │ -
304
│ │ │ -
305 struct __less_equal
│ │ │ -
306 {
│ │ │ -
307 template<typename _Tp>
│ │ │ -
308 bool operator()(const _Tp& __x, const _Tp& __y) const
│ │ │ -
309 { return __x <= __y; }
│ │ │ -
310 };
│ │ │ -
311
│ │ │ -
312 struct __greater_equal
│ │ │ -
313 {
│ │ │ -
314 template<typename _Tp>
│ │ │ -
315 bool operator()(const _Tp& __x, const _Tp& __y) const
│ │ │ -
316 { return __x >= __y; }
│ │ │ -
317 };
│ │ │ -
318
│ │ │ -
319 // The few binary functions we miss.
│ │ │ -
320 struct _Atan2
│ │ │ -
321 {
│ │ │ -
322 template<typename _Tp>
│ │ │ -
323 _Tp operator()(const _Tp& __x, const _Tp& __y) const
│ │ │ -
324 { return atan2(__x, __y); }
│ │ │ -
325 };
│ │ │ -
326
│ │ │ -
327 struct _Pow
│ │ │ -
328 {
│ │ │ -
329 template<typename _Tp>
│ │ │ -
330 _Tp operator()(const _Tp& __x, const _Tp& __y) const
│ │ │ -
331 { return pow(__x, __y); }
│ │ │ -
332 };
│ │ │ -
333
│ │ │ -
334 template<typename _Tp, bool _IsValidValarrayValue = !__is_abstract(_Tp)>
│ │ │ -
335 struct __fun_with_valarray
│ │ │ -
336 {
│ │ │ -
337 typedef _Tp result_type;
│ │ │ -
338 };
│ │ │ -
339
│ │ │ -
340 template<typename _Tp>
│ │ │ -
341 struct __fun_with_valarray<_Tp, false>
│ │ │ -
342 {
│ │ │ -
343 // No result type defined for invalid value types.
│ │ │ -
344 };
│ │ │ -
345
│ │ │ -
346 // We need these bits in order to recover the return type of
│ │ │ -
347 // some functions/operators now that we're no longer using
│ │ │ -
348 // function templates.
│ │ │ -
349 template<typename, typename _Tp>
│ │ │ -
350 struct __fun : __fun_with_valarray<_Tp>
│ │ │ -
351 {
│ │ │ -
352 };
│ │ │ -
353
│ │ │ -
354 // several specializations for relational operators.
│ │ │ -
355 template<typename _Tp>
│ │ │ -
356 struct __fun<__logical_not, _Tp>
│ │ │ -
357 {
│ │ │ -
358 typedef bool result_type;
│ │ │ -
359 };
│ │ │ -
360
│ │ │ -
361 template<typename _Tp>
│ │ │ -
362 struct __fun<__logical_and, _Tp>
│ │ │ -
363 {
│ │ │ -
364 typedef bool result_type;
│ │ │ -
365 };
│ │ │ -
366
│ │ │ -
367 template<typename _Tp>
│ │ │ -
368 struct __fun<__logical_or, _Tp>
│ │ │ -
369 {
│ │ │ -
370 typedef bool result_type;
│ │ │ -
371 };
│ │ │ -
372
│ │ │ -
373 template<typename _Tp>
│ │ │ -
374 struct __fun<__less, _Tp>
│ │ │ -
375 {
│ │ │ -
376 typedef bool result_type;
│ │ │ -
377 };
│ │ │ -
378
│ │ │ -
379 template<typename _Tp>
│ │ │ -
380 struct __fun<__greater, _Tp>
│ │ │ -
381 {
│ │ │ -
382 typedef bool result_type;
│ │ │ -
383 };
│ │ │ -
384
│ │ │ -
385 template<typename _Tp>
│ │ │ -
386 struct __fun<__less_equal, _Tp>
│ │ │ -
387 {
│ │ │ -
388 typedef bool result_type;
│ │ │ -
389 };
│ │ │ -
390
│ │ │ -
391 template<typename _Tp>
│ │ │ -
392 struct __fun<__greater_equal, _Tp>
│ │ │ -
393 {
│ │ │ -
394 typedef bool result_type;
│ │ │ -
395 };
│ │ │ +
39#define __cpp_lib_math_special_functions 201603L
│ │ │ +
40
│ │ │ +
41#if __cplusplus <= 201403L && __STDCPP_WANT_MATH_SPEC_FUNCS__ == 0
│ │ │ +
42# error include <cmath> and define __STDCPP_WANT_MATH_SPEC_FUNCS__
│ │ │ +
43#endif
│ │ │ +
44
│ │ │ +
45#include <bits/stl_algobase.h>
│ │ │ +
46#include <limits>
│ │ │ +
47#include <type_traits>
│ │ │ +
48
│ │ │ +
49#include <tr1/gamma.tcc>
│ │ │ +
50#include <tr1/bessel_function.tcc>
│ │ │ +
51#include <tr1/beta_function.tcc>
│ │ │ +
52#include <tr1/ell_integral.tcc>
│ │ │ +
53#include <tr1/exp_integral.tcc>
│ │ │ +
54#include <tr1/hypergeometric.tcc>
│ │ │ +
55#include <tr1/legendre_function.tcc>
│ │ │ +
56#include <tr1/modified_bessel_func.tcc>
│ │ │ +
57#include <tr1/poly_hermite.tcc>
│ │ │ +
58#include <tr1/poly_laguerre.tcc>
│ │ │ +
59#include <tr1/riemann_zeta.tcc>
│ │ │ +
60
│ │ │ +
61namespace std _GLIBCXX_VISIBILITY(default)
│ │ │ +
62{
│ │ │ +
63_GLIBCXX_BEGIN_NAMESPACE_VERSION
│ │ │ +
64
│ │ │ +
65 /**
│ │ │ +
66 * @defgroup mathsf Mathematical Special Functions
│ │ │ +
67 * @ingroup numerics
│ │ │ +
68 *
│ │ │ +
69 * @section mathsf_desc Mathematical Special Functions
│ │ │ +
70 *
│ │ │ +
71 * A collection of advanced mathematical special functions,
│ │ │ +
72 * defined by ISO/IEC IS 29124 and then added to ISO C++ 2017.
│ │ │ +
73 *
│ │ │ +
74 *
│ │ │ +
75 * @subsection mathsf_intro Introduction and History
│ │ │ +
76 * The first significant library upgrade on the road to C++2011,
│ │ │ +
77 * <a href="http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2005/n1836.pdf">
│ │ │ +
78 * TR1</a>, included a set of 23 mathematical functions that significantly
│ │ │ +
79 * extended the standard transcendental functions inherited from C and declared
│ │ │ +
80 * in @<cmath@>.
│ │ │ +
81 *
│ │ │ +
82 * Although most components from TR1 were eventually adopted for C++11 these
│ │ │ +
83 * math functions were left behind out of concern for implementability.
│ │ │ +
84 * The math functions were published as a separate international standard
│ │ │ +
85 * <a href="http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2010/n3060.pdf">
│ │ │ +
86 * IS 29124 - Extensions to the C++ Library to Support Mathematical Special
│ │ │ +
87 * Functions</a>.
│ │ │ +
88 *
│ │ │ +
89 * For C++17 these functions were incorporated into the main standard.
│ │ │ +
90 *
│ │ │ +
91 * @subsection mathsf_contents Contents
│ │ │ +
92 * The following functions are implemented in namespace @c std:
│ │ │ +
93 * - @ref assoc_laguerre "assoc_laguerre - Associated Laguerre functions"
│ │ │ +
94 * - @ref assoc_legendre "assoc_legendre - Associated Legendre functions"
│ │ │ +
95 * - @ref beta "beta - Beta functions"
│ │ │ +
96 * - @ref comp_ellint_1 "comp_ellint_1 - Complete elliptic functions of the first kind"
│ │ │ +
97 * - @ref comp_ellint_2 "comp_ellint_2 - Complete elliptic functions of the second kind"
│ │ │ +
98 * - @ref comp_ellint_3 "comp_ellint_3 - Complete elliptic functions of the third kind"
│ │ │ +
99 * - @ref cyl_bessel_i "cyl_bessel_i - Regular modified cylindrical Bessel functions"
│ │ │ +
100 * - @ref cyl_bessel_j "cyl_bessel_j - Cylindrical Bessel functions of the first kind"
│ │ │ +
101 * - @ref cyl_bessel_k "cyl_bessel_k - Irregular modified cylindrical Bessel functions"
│ │ │ +
102 * - @ref cyl_neumann "cyl_neumann - Cylindrical Neumann functions or Cylindrical Bessel functions of the second kind"
│ │ │ +
103 * - @ref ellint_1 "ellint_1 - Incomplete elliptic functions of the first kind"
│ │ │ +
104 * - @ref ellint_2 "ellint_2 - Incomplete elliptic functions of the second kind"
│ │ │ +
105 * - @ref ellint_3 "ellint_3 - Incomplete elliptic functions of the third kind"
│ │ │ +
106 * - @ref expint "expint - The exponential integral"
│ │ │ +
107 * - @ref hermite "hermite - Hermite polynomials"
│ │ │ +
108 * - @ref laguerre "laguerre - Laguerre functions"
│ │ │ +
109 * - @ref legendre "legendre - Legendre polynomials"
│ │ │ +
110 * - @ref riemann_zeta "riemann_zeta - The Riemann zeta function"
│ │ │ +
111 * - @ref sph_bessel "sph_bessel - Spherical Bessel functions"
│ │ │ +
112 * - @ref sph_legendre "sph_legendre - Spherical Legendre functions"
│ │ │ +
113 * - @ref sph_neumann "sph_neumann - Spherical Neumann functions"
│ │ │ +
114 *
│ │ │ +
115 * The hypergeometric functions were stricken from the TR29124 and C++17
│ │ │ +
116 * versions of this math library because of implementation concerns.
│ │ │ +
117 * However, since they were in the TR1 version and since they are popular
│ │ │ +
118 * we kept them as an extension in namespace @c __gnu_cxx:
│ │ │ +
119 * - @ref __gnu_cxx::conf_hyperg "conf_hyperg - Confluent hypergeometric functions"
│ │ │ +
120 * - @ref __gnu_cxx::hyperg "hyperg - Hypergeometric functions"
│ │ │ +
121 *
│ │ │ +
122 * <!-- @subsection mathsf_general General Features -->
│ │ │ +
123 *
│ │ │ +
124 * @subsection mathsf_promotion Argument Promotion
│ │ │ +
125 * The arguments suppled to the non-suffixed functions will be promoted
│ │ │ +
126 * according to the following rules:
│ │ │ +
127 * 1. If any argument intended to be floating point is given an integral value
│ │ │ +
128 * That integral value is promoted to double.
│ │ │ +
129 * 2. All floating point arguments are promoted up to the largest floating
│ │ │ +
130 * point precision among them.
│ │ │ +
131 *
│ │ │ +
132 * @subsection mathsf_NaN NaN Arguments
│ │ │ +
133 * If any of the floating point arguments supplied to these functions is
│ │ │ +
134 * invalid or NaN (std::numeric_limits<Tp>::quiet_NaN),
│ │ │ +
135 * the value NaN is returned.
│ │ │ +
136 *
│ │ │ +
137 * @subsection mathsf_impl Implementation
│ │ │ +
138 *
│ │ │ +
139 * We strive to implement the underlying math with type generic algorithms
│ │ │ +
140 * to the greatest extent possible. In practice, the functions are thin
│ │ │ +
141 * wrappers that dispatch to function templates. Type dependence is
│ │ │ +
142 * controlled with std::numeric_limits and functions thereof.
│ │ │ +
143 *
│ │ │ +
144 * We don't promote @c float to @c double or @c double to <tt>long double</tt>
│ │ │ +
145 * reflexively. The goal is for @c float functions to operate more quickly,
│ │ │ +
146 * at the cost of @c float accuracy and possibly a smaller domain of validity.
│ │ │ +
147 * Similaryly, <tt>long double</tt> should give you more dynamic range
│ │ │ +
148 * and slightly more pecision than @c double on many systems.
│ │ │ +
149 *
│ │ │ +
150 * @subsection mathsf_testing Testing
│ │ │ +
151 *
│ │ │ +
152 * These functions have been tested against equivalent implementations
│ │ │ +
153 * from the <a href="http://www.gnu.org/software/gsl">
│ │ │ +
154 * Gnu Scientific Library, GSL</a> and
│ │ │ +
155 * <a href="http://www.boost.org/doc/libs/1_60_0/libs/math/doc/html/index.html">Boost</a>
│ │ │ +
156 * and the ratio
│ │ │ +
157 * @f[
│ │ │ +
158 * \frac{|f - f_{test}|}{|f_{test}|}
│ │ │ +
159 * @f]
│ │ │ +
160 * is generally found to be within 10<sup>-15</sup> for 64-bit double on
│ │ │ +
161 * linux-x86_64 systems over most of the ranges of validity.
│ │ │ +
162 *
│ │ │ +
163 * @todo Provide accuracy comparisons on a per-function basis for a small
│ │ │ +
164 * number of targets.
│ │ │ +
165 *
│ │ │ +
166 * @subsection mathsf_bibliography General Bibliography
│ │ │ +
167 *
│ │ │ +
168 * @see Abramowitz and Stegun: Handbook of Mathematical Functions,
│ │ │ +
169 * with Formulas, Graphs, and Mathematical Tables
│ │ │ +
170 * Edited by Milton Abramowitz and Irene A. Stegun,
│ │ │ +
171 * National Bureau of Standards Applied Mathematics Series - 55
│ │ │ +
172 * Issued June 1964, Tenth Printing, December 1972, with corrections
│ │ │ +
173 * Electronic versions of A&S abound including both pdf and navigable html.
│ │ │ +
174 * @see for example http://people.math.sfu.ca/~cbm/aands/
│ │ │ +
175 *
│ │ │ +
176 * @see The old A&S has been redone as the
│ │ │ +
177 * NIST Digital Library of Mathematical Functions: http://dlmf.nist.gov/
│ │ │ +
178 * This version is far more navigable and includes more recent work.
│ │ │ +
179 *
│ │ │ +
180 * @see An Atlas of Functions: with Equator, the Atlas Function Calculator
│ │ │ +
181 * 2nd Edition, by Oldham, Keith B., Myland, Jan, Spanier, Jerome
│ │ │ +
182 *
│ │ │ +
183 * @see Asymptotics and Special Functions by Frank W. J. Olver,
│ │ │ +
184 * Academic Press, 1974
│ │ │ +
185 *
│ │ │ +
186 * @see Numerical Recipes in C, The Art of Scientific Computing,
│ │ │ +
187 * by William H. Press, Second Ed., Saul A. Teukolsky,
│ │ │ +
188 * William T. Vetterling, and Brian P. Flannery,
│ │ │ +
189 * Cambridge University Press, 1992
│ │ │ +
190 *
│ │ │ +
191 * @see The Special Functions and Their Approximations: Volumes 1 and 2,
│ │ │ +
192 * by Yudell L. Luke, Academic Press, 1969
│ │ │ +
193 *
│ │ │ +
194 * @{
│ │ │ +
195 */
│ │ │ +
196
│ │ │ +
197 // Associated Laguerre polynomials
│ │ │ +
198
│ │ │ +
199 /**
│ │ │ +
200 * Return the associated Laguerre polynomial of order @c n,
│ │ │ +
201 * degree @c m: @f$ L_n^m(x) @f$ for @c float argument.
│ │ │ +
202 *
│ │ │ +
203 * @see assoc_laguerre for more details.
│ │ │ +
204 */
│ │ │ +
205 inline float
│ │ │ +
│ │ │ +
206 assoc_laguerref(unsigned int __n, unsigned int __m, float __x)
│ │ │ +
207 { return __detail::__assoc_laguerre<float>(__n, __m, __x); }
│ │ │ +
│ │ │ +
208
│ │ │ +
209 /**
│ │ │ +
210 * Return the associated Laguerre polynomial of order @c n,
│ │ │ +
211 * degree @c m: @f$ L_n^m(x) @f$.
│ │ │ +
212 *
│ │ │ +
213 * @see assoc_laguerre for more details.
│ │ │ +
214 */
│ │ │ +
215 inline long double
│ │ │ +
│ │ │ +
216 assoc_laguerrel(unsigned int __n, unsigned int __m, long double __x)
│ │ │ +
217 { return __detail::__assoc_laguerre<long double>(__n, __m, __x); }
│ │ │ +
│ │ │ +
218
│ │ │ +
219 /**
│ │ │ +
220 * Return the associated Laguerre polynomial of nonnegative order @c n,
│ │ │ +
221 * nonnegative degree @c m and real argument @c x: @f$ L_n^m(x) @f$.
│ │ │ +
222 *
│ │ │ +
223 * The associated Laguerre function of real degree @f$ \alpha @f$,
│ │ │ +
224 * @f$ L_n^\alpha(x) @f$, is defined by
│ │ │ +
225 * @f[
│ │ │ +
226 * L_n^\alpha(x) = \frac{(\alpha + 1)_n}{n!}
│ │ │ +
227 * {}_1F_1(-n; \alpha + 1; x)
│ │ │ +
228 * @f]
│ │ │ +
229 * where @f$ (\alpha)_n @f$ is the Pochhammer symbol and
│ │ │ +
230 * @f$ {}_1F_1(a; c; x) @f$ is the confluent hypergeometric function.
│ │ │ +
231 *
│ │ │ +
232 * The associated Laguerre polynomial is defined for integral
│ │ │ +
233 * degree @f$ \alpha = m @f$ by:
│ │ │ +
234 * @f[
│ │ │ +
235 * L_n^m(x) = (-1)^m \frac{d^m}{dx^m} L_{n + m}(x)
│ │ │ +
236 * @f]
│ │ │ +
237 * where the Laguerre polynomial is defined by:
│ │ │ +
238 * @f[
│ │ │ +
239 * L_n(x) = \frac{e^x}{n!} \frac{d^n}{dx^n} (x^ne^{-x})
│ │ │ +
240 * @f]
│ │ │ +
241 * and @f$ x >= 0 @f$.
│ │ │ +
242 * @see laguerre for details of the Laguerre function of degree @c n
│ │ │ +
243 *
│ │ │ +
244 * @tparam _Tp The floating-point type of the argument @c __x.
│ │ │ +
245 * @param __n The order of the Laguerre function, <tt>__n >= 0</tt>.
│ │ │ +
246 * @param __m The degree of the Laguerre function, <tt>__m >= 0</tt>.
│ │ │ +
247 * @param __x The argument of the Laguerre function, <tt>__x >= 0</tt>.
│ │ │ +
248 * @throw std::domain_error if <tt>__x < 0</tt>.
│ │ │ +
249 */
│ │ │ +
250 template<typename _Tp>
│ │ │ +
251 inline typename __gnu_cxx::__promote<_Tp>::__type
│ │ │ +
│ │ │ +
252 assoc_laguerre(unsigned int __n, unsigned int __m, _Tp __x)
│ │ │ +
253 {
│ │ │ +
254 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
│ │ │ +
255 return __detail::__assoc_laguerre<__type>(__n, __m, __x);
│ │ │ +
256 }
│ │ │ +
│ │ │ +
257
│ │ │ +
258 // Associated Legendre functions
│ │ │ +
259
│ │ │ +
260 /**
│ │ │ +
261 * Return the associated Legendre function of degree @c l and order @c m
│ │ │ +
262 * for @c float argument.
│ │ │ +
263 *
│ │ │ +
264 * @see assoc_legendre for more details.
│ │ │ +
265 */
│ │ │ +
266 inline float
│ │ │ +
│ │ │ +
267 assoc_legendref(unsigned int __l, unsigned int __m, float __x)
│ │ │ +
268 { return __detail::__assoc_legendre_p<float>(__l, __m, __x); }
│ │ │ +
│ │ │ +
269
│ │ │ +
270 /**
│ │ │ +
271 * Return the associated Legendre function of degree @c l and order @c m.
│ │ │ +
272 *
│ │ │ +
273 * @see assoc_legendre for more details.
│ │ │ +
274 */
│ │ │ +
275 inline long double
│ │ │ +
│ │ │ +
276 assoc_legendrel(unsigned int __l, unsigned int __m, long double __x)
│ │ │ +
277 { return __detail::__assoc_legendre_p<long double>(__l, __m, __x); }
│ │ │ +
│ │ │ +
278
│ │ │ +
279
│ │ │ +
280 /**
│ │ │ +
281 * Return the associated Legendre function of degree @c l and order @c m.
│ │ │ +
282 *
│ │ │ +
283 * The associated Legendre function is derived from the Legendre function
│ │ │ +
284 * @f$ P_l(x) @f$ by the Rodrigues formula:
│ │ │ +
285 * @f[
│ │ │ +
286 * P_l^m(x) = (1 - x^2)^{m/2}\frac{d^m}{dx^m}P_l(x)
│ │ │ +
287 * @f]
│ │ │ +
288 * @see legendre for details of the Legendre function of degree @c l
│ │ │ +
289 *
│ │ │ +
290 * @tparam _Tp The floating-point type of the argument @c __x.
│ │ │ +
291 * @param __l The degree <tt>__l >= 0</tt>.
│ │ │ +
292 * @param __m The order <tt>__m <= l</tt>.
│ │ │ +
293 * @param __x The argument, <tt>abs(__x) <= 1</tt>.
│ │ │ +
294 * @throw std::domain_error if <tt>abs(__x) > 1</tt>.
│ │ │ +
295 */
│ │ │ +
296 template<typename _Tp>
│ │ │ +
297 inline typename __gnu_cxx::__promote<_Tp>::__type
│ │ │ +
│ │ │ +
298 assoc_legendre(unsigned int __l, unsigned int __m, _Tp __x)
│ │ │ +
299 {
│ │ │ +
300 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
│ │ │ +
301 return __detail::__assoc_legendre_p<__type>(__l, __m, __x);
│ │ │ +
302 }
│ │ │ +
│ │ │ +
303
│ │ │ +
304 // Beta functions
│ │ │ +
305
│ │ │ +
306 /**
│ │ │ +
307 * Return the beta function, @f$ B(a,b) @f$, for @c float parameters @c a, @c b.
│ │ │ +
308 *
│ │ │ +
309 * @see beta for more details.
│ │ │ +
310 */
│ │ │ +
311 inline float
│ │ │ +
│ │ │ +
312 betaf(float __a, float __b)
│ │ │ +
313 { return __detail::__beta<float>(__a, __b); }
│ │ │ +
│ │ │ +
314
│ │ │ +
315 /**
│ │ │ +
316 * Return the beta function, @f$B(a,b)@f$, for long double
│ │ │ +
317 * parameters @c a, @c b.
│ │ │ +
318 *
│ │ │ +
319 * @see beta for more details.
│ │ │ +
320 */
│ │ │ +
321 inline long double
│ │ │ +
│ │ │ +
322 betal(long double __a, long double __b)
│ │ │ +
323 { return __detail::__beta<long double>(__a, __b); }
│ │ │ +
│ │ │ +
324
│ │ │ +
325 /**
│ │ │ +
326 * Return the beta function, @f$B(a,b)@f$, for real parameters @c a, @c b.
│ │ │ +
327 *
│ │ │ +
328 * The beta function is defined by
│ │ │ +
329 * @f[
│ │ │ +
330 * B(a,b) = \int_0^1 t^{a - 1} (1 - t)^{b - 1} dt
│ │ │ +
331 * = \frac{\Gamma(a)\Gamma(b)}{\Gamma(a+b)}
│ │ │ +
332 * @f]
│ │ │ +
333 * where @f$ a > 0 @f$ and @f$ b > 0 @f$
│ │ │ +
334 *
│ │ │ +
335 * @tparam _Tpa The floating-point type of the parameter @c __a.
│ │ │ +
336 * @tparam _Tpb The floating-point type of the parameter @c __b.
│ │ │ +
337 * @param __a The first argument of the beta function, <tt> __a > 0 </tt>.
│ │ │ +
338 * @param __b The second argument of the beta function, <tt> __b > 0 </tt>.
│ │ │ +
339 * @throw std::domain_error if <tt> __a < 0 </tt> or <tt> __b < 0 </tt>.
│ │ │ +
340 */
│ │ │ +
341 template<typename _Tpa, typename _Tpb>
│ │ │ +
342 inline typename __gnu_cxx::__promote_2<_Tpa, _Tpb>::__type
│ │ │ +
│ │ │ +
343 beta(_Tpa __a, _Tpb __b)
│ │ │ +
344 {
│ │ │ +
345 typedef typename __gnu_cxx::__promote_2<_Tpa, _Tpb>::__type __type;
│ │ │ +
346 return __detail::__beta<__type>(__a, __b);
│ │ │ +
347 }
│ │ │ +
│ │ │ +
348
│ │ │ +
349 // Complete elliptic integrals of the first kind
│ │ │ +
350
│ │ │ +
351 /**
│ │ │ +
352 * Return the complete elliptic integral of the first kind @f$ E(k) @f$
│ │ │ +
353 * for @c float modulus @c k.
│ │ │ +
354 *
│ │ │ +
355 * @see comp_ellint_1 for details.
│ │ │ +
356 */
│ │ │ +
357 inline float
│ │ │ +
│ │ │ + │ │ │ +
359 { return __detail::__comp_ellint_1<float>(__k); }
│ │ │ +
│ │ │ +
360
│ │ │ +
361 /**
│ │ │ +
362 * Return the complete elliptic integral of the first kind @f$ E(k) @f$
│ │ │ +
363 * for long double modulus @c k.
│ │ │ +
364 *
│ │ │ +
365 * @see comp_ellint_1 for details.
│ │ │ +
366 */
│ │ │ +
367 inline long double
│ │ │ +
│ │ │ +
368 comp_ellint_1l(long double __k)
│ │ │ +
369 { return __detail::__comp_ellint_1<long double>(__k); }
│ │ │ +
│ │ │ +
370
│ │ │ +
371 /**
│ │ │ +
372 * Return the complete elliptic integral of the first kind
│ │ │ +
373 * @f$ K(k) @f$ for real modulus @c k.
│ │ │ +
374 *
│ │ │ +
375 * The complete elliptic integral of the first kind is defined as
│ │ │ +
376 * @f[
│ │ │ +
377 * K(k) = F(k,\pi/2) = \int_0^{\pi/2}\frac{d\theta}
│ │ │ +
378 * {\sqrt{1 - k^2 sin^2\theta}}
│ │ │ +
379 * @f]
│ │ │ +
380 * where @f$ F(k,\phi) @f$ is the incomplete elliptic integral of the
│ │ │ +
381 * first kind and the modulus @f$ |k| <= 1 @f$.
│ │ │ +
382 * @see ellint_1 for details of the incomplete elliptic function
│ │ │ +
383 * of the first kind.
│ │ │ +
384 *
│ │ │ +
385 * @tparam _Tp The floating-point type of the modulus @c __k.
│ │ │ +
386 * @param __k The modulus, <tt> abs(__k) <= 1 </tt>
│ │ │ +
387 * @throw std::domain_error if <tt> abs(__k) > 1 </tt>.
│ │ │ +
388 */
│ │ │ +
389 template<typename _Tp>
│ │ │ +
390 inline typename __gnu_cxx::__promote<_Tp>::__type
│ │ │ +
│ │ │ + │ │ │ +
392 {
│ │ │ +
393 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
│ │ │ +
394 return __detail::__comp_ellint_1<__type>(__k);
│ │ │ +
395 }
│ │ │ +
│ │ │
396
│ │ │ -
397 template<typename _Tp>
│ │ │ -
398 struct __fun<__equal_to, _Tp>
│ │ │ -
399 {
│ │ │ -
400 typedef bool result_type;
│ │ │ -
401 };
│ │ │ -
402
│ │ │ -
403 template<typename _Tp>
│ │ │ -
404 struct __fun<__not_equal_to, _Tp>
│ │ │ -
405 {
│ │ │ -
406 typedef bool result_type;
│ │ │ -
407 };
│ │ │ -
408
│ │ │ -
409namespace __detail
│ │ │ -
410{
│ │ │ -
411 // Closure types already have reference semantics and are often short-lived,
│ │ │ -
412 // so store them by value to avoid (some cases of) dangling references to
│ │ │ -
413 // out-of-scope temporaries.
│ │ │ -
414 template<typename _Tp>
│ │ │ -
415 struct _ValArrayRef
│ │ │ -
416 { typedef const _Tp __type; };
│ │ │ -
417
│ │ │ -
418 // Use real references for std::valarray objects.
│ │ │ -
419 template<typename _Tp>
│ │ │ -
420 struct _ValArrayRef< valarray<_Tp> >
│ │ │ -
421 { typedef const valarray<_Tp>& __type; };
│ │ │ -
422
│ │ │ -
423 //
│ │ │ -
424 // Apply function taking a value/const reference closure
│ │ │ -
425 //
│ │ │ -
426
│ │ │ -
427 template<typename _Dom, typename _Arg>
│ │ │ -
428 class _FunBase
│ │ │ -
429 {
│ │ │ -
430 public:
│ │ │ -
431 typedef typename _Dom::value_type value_type;
│ │ │ -
432
│ │ │ -
433 _FunBase(const _Dom& __e, value_type __f(_Arg))
│ │ │ -
434 : _M_expr(__e), _M_func(__f) {}
│ │ │ -
435
│ │ │ -
436 value_type operator[](size_t __i) const
│ │ │ -
437 { return _M_func (_M_expr[__i]); }
│ │ │ -
438
│ │ │ -
439 size_t size() const { return _M_expr.size ();}
│ │ │ -
440
│ │ │ -
441 private:
│ │ │ -
442 typename _ValArrayRef<_Dom>::__type _M_expr;
│ │ │ -
443 value_type (*_M_func)(_Arg);
│ │ │ -
444 };
│ │ │ -
445
│ │ │ -
446 template<class _Dom>
│ │ │ -
447 struct _ValFunClos<_Expr,_Dom> : _FunBase<_Dom, typename _Dom::value_type>
│ │ │ -
448 {
│ │ │ -
449 typedef _FunBase<_Dom, typename _Dom::value_type> _Base;
│ │ │ -
450 typedef typename _Base::value_type value_type;
│ │ │ -
451 typedef value_type _Tp;
│ │ │ -
452
│ │ │ -
453 _ValFunClos(const _Dom& __e, _Tp __f(_Tp)) : _Base(__e, __f) {}
│ │ │ -
454 };
│ │ │ -
455
│ │ │ -
456 template<typename _Tp>
│ │ │ -
457 struct _ValFunClos<_ValArray,_Tp> : _FunBase<valarray<_Tp>, _Tp>
│ │ │ -
458 {
│ │ │ -
459 typedef _FunBase<valarray<_Tp>, _Tp> _Base;
│ │ │ -
460 typedef _Tp value_type;
│ │ │ -
461
│ │ │ -
462 _ValFunClos(const valarray<_Tp>& __v, _Tp __f(_Tp)) : _Base(__v, __f) {}
│ │ │ -
463 };
│ │ │ -
464
│ │ │ -
465 template<class _Dom>
│ │ │ -
466 struct _RefFunClos<_Expr, _Dom>
│ │ │ -
467 : _FunBase<_Dom, const typename _Dom::value_type&>
│ │ │ -
468 {
│ │ │ -
469 typedef _FunBase<_Dom, const typename _Dom::value_type&> _Base;
│ │ │ -
470 typedef typename _Base::value_type value_type;
│ │ │ -
471 typedef value_type _Tp;
│ │ │ -
472
│ │ │ -
473 _RefFunClos(const _Dom& __e, _Tp __f(const _Tp&))
│ │ │ -
474 : _Base(__e, __f) {}
│ │ │ -
475 };
│ │ │ -
476
│ │ │ -
477 template<typename _Tp>
│ │ │ -
478 struct _RefFunClos<_ValArray, _Tp>
│ │ │ -
479 : _FunBase<valarray<_Tp>, const _Tp&>
│ │ │ -
480 {
│ │ │ -
481 typedef _FunBase<valarray<_Tp>, const _Tp&> _Base;
│ │ │ -
482 typedef _Tp value_type;
│ │ │ -
483
│ │ │ -
484 _RefFunClos(const valarray<_Tp>& __v, _Tp __f(const _Tp&))
│ │ │ -
485 : _Base(__v, __f) {}
│ │ │ -
486 };
│ │ │ -
487
│ │ │ -
488 //
│ │ │ -
489 // Unary expression closure.
│ │ │ -
490 //
│ │ │ -
491
│ │ │ -
492 template<class _Oper, class _Arg>
│ │ │ -
493 class _UnBase
│ │ │ -
494 {
│ │ │ -
495 public:
│ │ │ -
496 typedef typename _Arg::value_type _Vt;
│ │ │ -
497 typedef typename __fun<_Oper, _Vt>::result_type value_type;
│ │ │ -
498
│ │ │ -
499 _UnBase(const _Arg& __e) : _M_expr(__e) {}
│ │ │ -
500
│ │ │ -
501 value_type operator[](size_t __i) const
│ │ │ -
502 { return _Oper()(_M_expr[__i]); }
│ │ │ -
503
│ │ │ -
504 size_t size() const { return _M_expr.size(); }
│ │ │ -
505
│ │ │ -
506 private:
│ │ │ -
507 typename _ValArrayRef<_Arg>::__type _M_expr;
│ │ │ -
508 };
│ │ │ -
509
│ │ │ -
510 template<class _Oper, class _Dom>
│ │ │ -
511 struct _UnClos<_Oper, _Expr, _Dom>
│ │ │ -
512 : _UnBase<_Oper, _Dom>
│ │ │ -
513 {
│ │ │ -
514 typedef _Dom _Arg;
│ │ │ -
515 typedef _UnBase<_Oper, _Dom> _Base;
│ │ │ -
516 typedef typename _Base::value_type value_type;
│ │ │ -
517
│ │ │ -
518 _UnClos(const _Arg& __e) : _Base(__e) {}
│ │ │ -
519 };
│ │ │ -
520
│ │ │ -
521 template<class _Oper, typename _Tp>
│ │ │ -
522 struct _UnClos<_Oper, _ValArray, _Tp>
│ │ │ -
523 : _UnBase<_Oper, valarray<_Tp> >
│ │ │ -
524 {
│ │ │ -
525 typedef valarray<_Tp> _Arg;
│ │ │ -
526 typedef _UnBase<_Oper, valarray<_Tp> > _Base;
│ │ │ -
527 typedef typename _Base::value_type value_type;
│ │ │ -
528
│ │ │ -
529 _UnClos(const _Arg& __e) : _Base(__e) {}
│ │ │ -
530 };
│ │ │ -
531
│ │ │ -
532
│ │ │ -
533 //
│ │ │ -
534 // Binary expression closure.
│ │ │ -
535 //
│ │ │ -
536
│ │ │ -
537 template<class _Oper, class _FirstArg, class _SecondArg>
│ │ │ -
538 class _BinBase
│ │ │ -
539 {
│ │ │ -
540 public:
│ │ │ -
541 typedef typename _FirstArg::value_type _Vt;
│ │ │ -
542 typedef typename __fun<_Oper, _Vt>::result_type value_type;
│ │ │ -
543
│ │ │ -
544 _BinBase(const _FirstArg& __e1, const _SecondArg& __e2)
│ │ │ -
545 : _M_expr1(__e1), _M_expr2(__e2) {}
│ │ │ -
546
│ │ │ -
547 value_type operator[](size_t __i) const
│ │ │ -
548 { return _Oper()(_M_expr1[__i], _M_expr2[__i]); }
│ │ │ -
549
│ │ │ -
550 size_t size() const { return _M_expr1.size(); }
│ │ │ -
551
│ │ │ -
552 private:
│ │ │ -
553 typename _ValArrayRef<_FirstArg>::__type _M_expr1;
│ │ │ -
554 typename _ValArrayRef<_SecondArg>::__type _M_expr2;
│ │ │ -
555 };
│ │ │ -
556
│ │ │ -
557
│ │ │ -
558 template<class _Oper, class _Clos>
│ │ │ -
559 class _BinBase2
│ │ │ -
560 {
│ │ │ -
561 public:
│ │ │ -
562 typedef typename _Clos::value_type _Vt;
│ │ │ -
563 typedef typename __fun<_Oper, _Vt>::result_type value_type;
│ │ │ -
564
│ │ │ -
565 _BinBase2(const _Clos& __e, const _Vt& __t)
│ │ │ -
566 : _M_expr1(__e), _M_expr2(__t) {}
│ │ │ -
567
│ │ │ -
568 value_type operator[](size_t __i) const
│ │ │ -
569 { return _Oper()(_M_expr1[__i], _M_expr2); }
│ │ │ -
570
│ │ │ -
571 size_t size() const { return _M_expr1.size(); }
│ │ │ -
572
│ │ │ -
573 private:
│ │ │ -
574 typename _ValArrayRef<_Clos>::__type _M_expr1;
│ │ │ -
575 _Vt _M_expr2;
│ │ │ -
576 };
│ │ │ -
577
│ │ │ -
578 template<class _Oper, class _Clos>
│ │ │ -
579 class _BinBase1
│ │ │ -
580 {
│ │ │ -
581 public:
│ │ │ -
582 typedef typename _Clos::value_type _Vt;
│ │ │ -
583 typedef typename __fun<_Oper, _Vt>::result_type value_type;
│ │ │ -
584
│ │ │ -
585 _BinBase1(const _Vt& __t, const _Clos& __e)
│ │ │ -
586 : _M_expr1(__t), _M_expr2(__e) {}
│ │ │ -
587
│ │ │ -
588 value_type operator[](size_t __i) const
│ │ │ -
589 { return _Oper()(_M_expr1, _M_expr2[__i]); }
│ │ │ -
590
│ │ │ -
591 size_t size() const { return _M_expr2.size(); }
│ │ │ -
592
│ │ │ -
593 private:
│ │ │ -
594 _Vt _M_expr1;
│ │ │ -
595 typename _ValArrayRef<_Clos>::__type _M_expr2;
│ │ │ -
596 };
│ │ │ -
597
│ │ │ -
598 template<class _Oper, class _Dom1, class _Dom2>
│ │ │ -
599 struct _BinClos<_Oper, _Expr, _Expr, _Dom1, _Dom2>
│ │ │ -
600 : _BinBase<_Oper, _Dom1, _Dom2>
│ │ │ -
601 {
│ │ │ -
602 typedef _BinBase<_Oper, _Dom1, _Dom2> _Base;
│ │ │ -
603 typedef typename _Base::value_type value_type;
│ │ │ -
604
│ │ │ -
605 _BinClos(const _Dom1& __e1, const _Dom2& __e2) : _Base(__e1, __e2) {}
│ │ │ -
606 };
│ │ │ -
607
│ │ │ -
608 template<class _Oper, typename _Tp>
│ │ │ -
609 struct _BinClos<_Oper, _ValArray, _ValArray, _Tp, _Tp>
│ │ │ -
610 : _BinBase<_Oper, valarray<_Tp>, valarray<_Tp> >
│ │ │ -
611 {
│ │ │ -
612 typedef _BinBase<_Oper, valarray<_Tp>, valarray<_Tp> > _Base;
│ │ │ -
613 typedef typename _Base::value_type value_type;
│ │ │ -
614
│ │ │ -
615 _BinClos(const valarray<_Tp>& __v, const valarray<_Tp>& __w)
│ │ │ -
616 : _Base(__v, __w) {}
│ │ │ -
617 };
│ │ │ -
618
│ │ │ -
619 template<class _Oper, class _Dom>
│ │ │ -
620 struct _BinClos<_Oper, _Expr, _ValArray, _Dom, typename _Dom::value_type>
│ │ │ -
621 : _BinBase<_Oper, _Dom, valarray<typename _Dom::value_type> >
│ │ │ -
622 {
│ │ │ -
623 typedef typename _Dom::value_type _Tp;
│ │ │ -
624 typedef _BinBase<_Oper,_Dom,valarray<_Tp> > _Base;
│ │ │ -
625 typedef typename _Base::value_type value_type;
│ │ │ -
626
│ │ │ -
627 _BinClos(const _Dom& __e1, const valarray<_Tp>& __e2)
│ │ │ -
628 : _Base(__e1, __e2) {}
│ │ │ -
629 };
│ │ │ -
630
│ │ │ -
631 template<class _Oper, class _Dom>
│ │ │ -
632 struct _BinClos<_Oper, _ValArray, _Expr, typename _Dom::value_type, _Dom>
│ │ │ -
633 : _BinBase<_Oper, valarray<typename _Dom::value_type>,_Dom>
│ │ │ +
397 // Complete elliptic integrals of the second kind
│ │ │ +
398
│ │ │ +
399 /**
│ │ │ +
400 * Return the complete elliptic integral of the second kind @f$ E(k) @f$
│ │ │ +
401 * for @c float modulus @c k.
│ │ │ +
402 *
│ │ │ +
403 * @see comp_ellint_2 for details.
│ │ │ +
404 */
│ │ │ +
405 inline float
│ │ │ +
│ │ │ + │ │ │ +
407 { return __detail::__comp_ellint_2<float>(__k); }
│ │ │ +
│ │ │ +
408
│ │ │ +
409 /**
│ │ │ +
410 * Return the complete elliptic integral of the second kind @f$ E(k) @f$
│ │ │ +
411 * for long double modulus @c k.
│ │ │ +
412 *
│ │ │ +
413 * @see comp_ellint_2 for details.
│ │ │ +
414 */
│ │ │ +
415 inline long double
│ │ │ +
│ │ │ +
416 comp_ellint_2l(long double __k)
│ │ │ +
417 { return __detail::__comp_ellint_2<long double>(__k); }
│ │ │ +
│ │ │ +
418
│ │ │ +
419 /**
│ │ │ +
420 * Return the complete elliptic integral of the second kind @f$ E(k) @f$
│ │ │ +
421 * for real modulus @c k.
│ │ │ +
422 *
│ │ │ +
423 * The complete elliptic integral of the second kind is defined as
│ │ │ +
424 * @f[
│ │ │ +
425 * E(k) = E(k,\pi/2) = \int_0^{\pi/2}\sqrt{1 - k^2 sin^2\theta}
│ │ │ +
426 * @f]
│ │ │ +
427 * where @f$ E(k,\phi) @f$ is the incomplete elliptic integral of the
│ │ │ +
428 * second kind and the modulus @f$ |k| <= 1 @f$.
│ │ │ +
429 * @see ellint_2 for details of the incomplete elliptic function
│ │ │ +
430 * of the second kind.
│ │ │ +
431 *
│ │ │ +
432 * @tparam _Tp The floating-point type of the modulus @c __k.
│ │ │ +
433 * @param __k The modulus, @c abs(__k) <= 1
│ │ │ +
434 * @throw std::domain_error if @c abs(__k) > 1.
│ │ │ +
435 */
│ │ │ +
436 template<typename _Tp>
│ │ │ +
437 inline typename __gnu_cxx::__promote<_Tp>::__type
│ │ │ +
│ │ │ + │ │ │ +
439 {
│ │ │ +
440 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
│ │ │ +
441 return __detail::__comp_ellint_2<__type>(__k);
│ │ │ +
442 }
│ │ │ +
│ │ │ +
443
│ │ │ +
444 // Complete elliptic integrals of the third kind
│ │ │ +
445
│ │ │ +
446 /**
│ │ │ +
447 * @brief Return the complete elliptic integral of the third kind
│ │ │ +
448 * @f$ \Pi(k,\nu) @f$ for @c float modulus @c k.
│ │ │ +
449 *
│ │ │ +
450 * @see comp_ellint_3 for details.
│ │ │ +
451 */
│ │ │ +
452 inline float
│ │ │ +
│ │ │ +
453 comp_ellint_3f(float __k, float __nu)
│ │ │ +
454 { return __detail::__comp_ellint_3<float>(__k, __nu); }
│ │ │ +
│ │ │ +
455
│ │ │ +
456 /**
│ │ │ +
457 * @brief Return the complete elliptic integral of the third kind
│ │ │ +
458 * @f$ \Pi(k,\nu) @f$ for <tt>long double</tt> modulus @c k.
│ │ │ +
459 *
│ │ │ +
460 * @see comp_ellint_3 for details.
│ │ │ +
461 */
│ │ │ +
462 inline long double
│ │ │ +
│ │ │ +
463 comp_ellint_3l(long double __k, long double __nu)
│ │ │ +
464 { return __detail::__comp_ellint_3<long double>(__k, __nu); }
│ │ │ +
│ │ │ +
465
│ │ │ +
466 /**
│ │ │ +
467 * Return the complete elliptic integral of the third kind
│ │ │ +
468 * @f$ \Pi(k,\nu) = \Pi(k,\nu,\pi/2) @f$ for real modulus @c k.
│ │ │ +
469 *
│ │ │ +
470 * The complete elliptic integral of the third kind is defined as
│ │ │ +
471 * @f[
│ │ │ +
472 * \Pi(k,\nu) = \Pi(k,\nu,\pi/2) = \int_0^{\pi/2}
│ │ │ +
473 * \frac{d\theta}
│ │ │ +
474 * {(1 - \nu \sin^2\theta)\sqrt{1 - k^2 \sin^2\theta}}
│ │ │ +
475 * @f]
│ │ │ +
476 * where @f$ \Pi(k,\nu,\phi) @f$ is the incomplete elliptic integral of the
│ │ │ +
477 * second kind and the modulus @f$ |k| <= 1 @f$.
│ │ │ +
478 * @see ellint_3 for details of the incomplete elliptic function
│ │ │ +
479 * of the third kind.
│ │ │ +
480 *
│ │ │ +
481 * @tparam _Tp The floating-point type of the modulus @c __k.
│ │ │ +
482 * @tparam _Tpn The floating-point type of the argument @c __nu.
│ │ │ +
483 * @param __k The modulus, @c abs(__k) <= 1
│ │ │ +
484 * @param __nu The argument
│ │ │ +
485 * @throw std::domain_error if @c abs(__k) > 1.
│ │ │ +
486 */
│ │ │ +
487 template<typename _Tp, typename _Tpn>
│ │ │ +
488 inline typename __gnu_cxx::__promote_2<_Tp, _Tpn>::__type
│ │ │ +
│ │ │ + │ │ │ +
490 {
│ │ │ +
491 typedef typename __gnu_cxx::__promote_2<_Tp, _Tpn>::__type __type;
│ │ │ +
492 return __detail::__comp_ellint_3<__type>(__k, __nu);
│ │ │ +
493 }
│ │ │ +
│ │ │ +
494
│ │ │ +
495 // Regular modified cylindrical Bessel functions
│ │ │ +
496
│ │ │ +
497 /**
│ │ │ +
498 * Return the regular modified Bessel function @f$ I_{\nu}(x) @f$
│ │ │ +
499 * for @c float order @f$ \nu @f$ and argument @f$ x >= 0 @f$.
│ │ │ +
500 *
│ │ │ +
501 * @see cyl_bessel_i for setails.
│ │ │ +
502 */
│ │ │ +
503 inline float
│ │ │ +
│ │ │ +
504 cyl_bessel_if(float __nu, float __x)
│ │ │ +
505 { return __detail::__cyl_bessel_i<float>(__nu, __x); }
│ │ │ +
│ │ │ +
506
│ │ │ +
507 /**
│ │ │ +
508 * Return the regular modified Bessel function @f$ I_{\nu}(x) @f$
│ │ │ +
509 * for <tt>long double</tt> order @f$ \nu @f$ and argument @f$ x >= 0 @f$.
│ │ │ +
510 *
│ │ │ +
511 * @see cyl_bessel_i for setails.
│ │ │ +
512 */
│ │ │ +
513 inline long double
│ │ │ +
│ │ │ +
514 cyl_bessel_il(long double __nu, long double __x)
│ │ │ +
515 { return __detail::__cyl_bessel_i<long double>(__nu, __x); }
│ │ │ +
│ │ │ +
516
│ │ │ +
517 /**
│ │ │ +
518 * Return the regular modified Bessel function @f$ I_{\nu}(x) @f$
│ │ │ +
519 * for real order @f$ \nu @f$ and argument @f$ x >= 0 @f$.
│ │ │ +
520 *
│ │ │ +
521 * The regular modified cylindrical Bessel function is:
│ │ │ +
522 * @f[
│ │ │ +
523 * I_{\nu}(x) = i^{-\nu}J_\nu(ix) = \sum_{k=0}^{\infty}
│ │ │ +
524 * \frac{(x/2)^{\nu + 2k}}{k!\Gamma(\nu+k+1)}
│ │ │ +
525 * @f]
│ │ │ +
526 *
│ │ │ +
527 * @tparam _Tpnu The floating-point type of the order @c __nu.
│ │ │ +
528 * @tparam _Tp The floating-point type of the argument @c __x.
│ │ │ +
529 * @param __nu The order
│ │ │ +
530 * @param __x The argument, <tt> __x >= 0 </tt>
│ │ │ +
531 * @throw std::domain_error if <tt> __x < 0 </tt>.
│ │ │ +
532 */
│ │ │ +
533 template<typename _Tpnu, typename _Tp>
│ │ │ +
534 inline typename __gnu_cxx::__promote_2<_Tpnu, _Tp>::__type
│ │ │ +
│ │ │ + │ │ │ +
536 {
│ │ │ +
537 typedef typename __gnu_cxx::__promote_2<_Tpnu, _Tp>::__type __type;
│ │ │ +
538 return __detail::__cyl_bessel_i<__type>(__nu, __x);
│ │ │ +
539 }
│ │ │ +
│ │ │ +
540
│ │ │ +
541 // Cylindrical Bessel functions (of the first kind)
│ │ │ +
542
│ │ │ +
543 /**
│ │ │ +
544 * Return the Bessel function of the first kind @f$ J_{\nu}(x) @f$
│ │ │ +
545 * for @c float order @f$ \nu @f$ and argument @f$ x >= 0 @f$.
│ │ │ +
546 *
│ │ │ +
547 * @see cyl_bessel_j for setails.
│ │ │ +
548 */
│ │ │ +
549 inline float
│ │ │ +
│ │ │ +
550 cyl_bessel_jf(float __nu, float __x)
│ │ │ +
551 { return __detail::__cyl_bessel_j<float>(__nu, __x); }
│ │ │ +
│ │ │ +
552
│ │ │ +
553 /**
│ │ │ +
554 * Return the Bessel function of the first kind @f$ J_{\nu}(x) @f$
│ │ │ +
555 * for <tt>long double</tt> order @f$ \nu @f$ and argument @f$ x >= 0 @f$.
│ │ │ +
556 *
│ │ │ +
557 * @see cyl_bessel_j for setails.
│ │ │ +
558 */
│ │ │ +
559 inline long double
│ │ │ +
│ │ │ +
560 cyl_bessel_jl(long double __nu, long double __x)
│ │ │ +
561 { return __detail::__cyl_bessel_j<long double>(__nu, __x); }
│ │ │ +
│ │ │ +
562
│ │ │ +
563 /**
│ │ │ +
564 * Return the Bessel function @f$ J_{\nu}(x) @f$ of real order @f$ \nu @f$
│ │ │ +
565 * and argument @f$ x >= 0 @f$.
│ │ │ +
566 *
│ │ │ +
567 * The cylindrical Bessel function is:
│ │ │ +
568 * @f[
│ │ │ +
569 * J_{\nu}(x) = \sum_{k=0}^{\infty}
│ │ │ +
570 * \frac{(-1)^k (x/2)^{\nu + 2k}}{k!\Gamma(\nu+k+1)}
│ │ │ +
571 * @f]
│ │ │ +
572 *
│ │ │ +
573 * @tparam _Tpnu The floating-point type of the order @c __nu.
│ │ │ +
574 * @tparam _Tp The floating-point type of the argument @c __x.
│ │ │ +
575 * @param __nu The order
│ │ │ +
576 * @param __x The argument, <tt> __x >= 0 </tt>
│ │ │ +
577 * @throw std::domain_error if <tt> __x < 0 </tt>.
│ │ │ +
578 */
│ │ │ +
579 template<typename _Tpnu, typename _Tp>
│ │ │ +
580 inline typename __gnu_cxx::__promote_2<_Tpnu, _Tp>::__type
│ │ │ +
│ │ │ + │ │ │ +
582 {
│ │ │ +
583 typedef typename __gnu_cxx::__promote_2<_Tpnu, _Tp>::__type __type;
│ │ │ +
584 return __detail::__cyl_bessel_j<__type>(__nu, __x);
│ │ │ +
585 }
│ │ │ +
│ │ │ +
586
│ │ │ +
587 // Irregular modified cylindrical Bessel functions
│ │ │ +
588
│ │ │ +
589 /**
│ │ │ +
590 * Return the irregular modified Bessel function @f$ K_{\nu}(x) @f$
│ │ │ +
591 * for @c float order @f$ \nu @f$ and argument @f$ x >= 0 @f$.
│ │ │ +
592 *
│ │ │ +
593 * @see cyl_bessel_k for setails.
│ │ │ +
594 */
│ │ │ +
595 inline float
│ │ │ +
│ │ │ +
596 cyl_bessel_kf(float __nu, float __x)
│ │ │ +
597 { return __detail::__cyl_bessel_k<float>(__nu, __x); }
│ │ │ +
│ │ │ +
598
│ │ │ +
599 /**
│ │ │ +
600 * Return the irregular modified Bessel function @f$ K_{\nu}(x) @f$
│ │ │ +
601 * for <tt>long double</tt> order @f$ \nu @f$ and argument @f$ x >= 0 @f$.
│ │ │ +
602 *
│ │ │ +
603 * @see cyl_bessel_k for setails.
│ │ │ +
604 */
│ │ │ +
605 inline long double
│ │ │ +
│ │ │ +
606 cyl_bessel_kl(long double __nu, long double __x)
│ │ │ +
607 { return __detail::__cyl_bessel_k<long double>(__nu, __x); }
│ │ │ +
│ │ │ +
608
│ │ │ +
609 /**
│ │ │ +
610 * Return the irregular modified Bessel function @f$ K_{\nu}(x) @f$
│ │ │ +
611 * of real order @f$ \nu @f$ and argument @f$ x @f$.
│ │ │ +
612 *
│ │ │ +
613 * The irregular modified Bessel function is defined by:
│ │ │ +
614 * @f[
│ │ │ +
615 * K_{\nu}(x) = \frac{\pi}{2}
│ │ │ +
616 * \frac{I_{-\nu}(x) - I_{\nu}(x)}{\sin \nu\pi}
│ │ │ +
617 * @f]
│ │ │ +
618 * where for integral @f$ \nu = n @f$ a limit is taken:
│ │ │ +
619 * @f$ lim_{\nu \to n} @f$.
│ │ │ +
620 * For negative argument we have simply:
│ │ │ +
621 * @f[
│ │ │ +
622 * K_{-\nu}(x) = K_{\nu}(x)
│ │ │ +
623 * @f]
│ │ │ +
624 *
│ │ │ +
625 * @tparam _Tpnu The floating-point type of the order @c __nu.
│ │ │ +
626 * @tparam _Tp The floating-point type of the argument @c __x.
│ │ │ +
627 * @param __nu The order
│ │ │ +
628 * @param __x The argument, <tt> __x >= 0 </tt>
│ │ │ +
629 * @throw std::domain_error if <tt> __x < 0 </tt>.
│ │ │ +
630 */
│ │ │ +
631 template<typename _Tpnu, typename _Tp>
│ │ │ +
632 inline typename __gnu_cxx::__promote_2<_Tpnu, _Tp>::__type
│ │ │ +
│ │ │ + │ │ │
634 {
│ │ │ -
635 typedef typename _Dom::value_type _Tp;
│ │ │ -
636 typedef _BinBase<_Oper, valarray<_Tp>, _Dom> _Base;
│ │ │ -
637 typedef typename _Base::value_type value_type;
│ │ │ +
635 typedef typename __gnu_cxx::__promote_2<_Tpnu, _Tp>::__type __type;
│ │ │ +
636 return __detail::__cyl_bessel_k<__type>(__nu, __x);
│ │ │ +
637 }
│ │ │ +
│ │ │
638
│ │ │ -
639 _BinClos(const valarray<_Tp>& __e1, const _Dom& __e2)
│ │ │ -
640 : _Base(__e1, __e2) {}
│ │ │ -
641 };
│ │ │ -
642
│ │ │ -
643 template<class _Oper, class _Dom>
│ │ │ -
644 struct _BinClos<_Oper, _Expr, _Constant, _Dom, typename _Dom::value_type>
│ │ │ -
645 : _BinBase2<_Oper, _Dom>
│ │ │ -
646 {
│ │ │ -
647 typedef typename _Dom::value_type _Tp;
│ │ │ -
648 typedef _BinBase2<_Oper,_Dom> _Base;
│ │ │ -
649 typedef typename _Base::value_type value_type;
│ │ │ -
650
│ │ │ -
651 _BinClos(const _Dom& __e1, const _Tp& __e2) : _Base(__e1, __e2) {}
│ │ │ -
652 };
│ │ │ -
653
│ │ │ -
654 template<class _Oper, class _Dom>
│ │ │ -
655 struct _BinClos<_Oper, _Constant, _Expr, typename _Dom::value_type, _Dom>
│ │ │ -
656 : _BinBase1<_Oper, _Dom>
│ │ │ -
657 {
│ │ │ -
658 typedef typename _Dom::value_type _Tp;
│ │ │ -
659 typedef _BinBase1<_Oper, _Dom> _Base;
│ │ │ -
660 typedef typename _Base::value_type value_type;
│ │ │ -
661
│ │ │ -
662 _BinClos(const _Tp& __e1, const _Dom& __e2) : _Base(__e1, __e2) {}
│ │ │ -
663 };
│ │ │ -
664
│ │ │ -
665 template<class _Oper, typename _Tp>
│ │ │ -
666 struct _BinClos<_Oper, _ValArray, _Constant, _Tp, _Tp>
│ │ │ -
667 : _BinBase2<_Oper, valarray<_Tp> >
│ │ │ -
668 {
│ │ │ -
669 typedef _BinBase2<_Oper,valarray<_Tp> > _Base;
│ │ │ -
670 typedef typename _Base::value_type value_type;
│ │ │ -
671
│ │ │ -
672 _BinClos(const valarray<_Tp>& __v, const _Tp& __t) : _Base(__v, __t) {}
│ │ │ -
673 };
│ │ │ -
674
│ │ │ -
675 template<class _Oper, typename _Tp>
│ │ │ -
676 struct _BinClos<_Oper, _Constant, _ValArray, _Tp, _Tp>
│ │ │ -
677 : _BinBase1<_Oper, valarray<_Tp> >
│ │ │ -
678 {
│ │ │ -
679 typedef _BinBase1<_Oper, valarray<_Tp> > _Base;
│ │ │ -
680 typedef typename _Base::value_type value_type;
│ │ │ -
681
│ │ │ -
682 _BinClos(const _Tp& __t, const valarray<_Tp>& __v) : _Base(__t, __v) {}
│ │ │ -
683 };
│ │ │ -
684
│ │ │ -
685 //
│ │ │ -
686 // slice_array closure.
│ │ │ -
687 //
│ │ │ -
688 template<typename _Dom>
│ │ │ -
689 class _SBase
│ │ │ -
690 {
│ │ │ -
691 public:
│ │ │ -
692 typedef typename _Dom::value_type value_type;
│ │ │ -
693
│ │ │ -
694 _SBase (const _Dom& __e, const slice& __s)
│ │ │ -
695 : _M_expr (__e), _M_slice (__s) {}
│ │ │ -
696
│ │ │ -
697 value_type
│ │ │ -
698 operator[] (size_t __i) const
│ │ │ -
699 { return _M_expr[_M_slice.start () + __i * _M_slice.stride ()]; }
│ │ │ -
700
│ │ │ -
701 size_t
│ │ │ -
702 size() const
│ │ │ -
703 { return _M_slice.size (); }
│ │ │ -
704
│ │ │ -
705 private:
│ │ │ -
706 typename _ValArrayRef<_Dom>::__type _M_expr;
│ │ │ -
707 const slice& _M_slice;
│ │ │ -
708 };
│ │ │ -
709
│ │ │ -
710 template<typename _Tp>
│ │ │ -
711 class _SBase<_Array<_Tp> >
│ │ │ -
712 {
│ │ │ -
713 public:
│ │ │ -
714 typedef _Tp value_type;
│ │ │ -
715
│ │ │ -
716 _SBase (_Array<_Tp> __a, const slice& __s)
│ │ │ -
717 : _M_array (__a._M_data+__s.start()), _M_size (__s.size()),
│ │ │ -
718 _M_stride (__s.stride()) {}
│ │ │ -
719
│ │ │ -
720 value_type
│ │ │ -
721 operator[] (size_t __i) const
│ │ │ -
722 { return _M_array._M_data[__i * _M_stride]; }
│ │ │ -
723
│ │ │ -
724 size_t
│ │ │ -
725 size() const
│ │ │ -
726 { return _M_size; }
│ │ │ -
727
│ │ │ -
728 private:
│ │ │ -
729 const _Array<_Tp> _M_array;
│ │ │ -
730 const size_t _M_size;
│ │ │ -
731 const size_t _M_stride;
│ │ │ -
732 };
│ │ │ -
733
│ │ │ -
734 template<class _Dom>
│ │ │ -
735 struct _SClos<_Expr, _Dom>
│ │ │ -
736 : _SBase<_Dom>
│ │ │ -
737 {
│ │ │ -
738 typedef _SBase<_Dom> _Base;
│ │ │ -
739 typedef typename _Base::value_type value_type;
│ │ │ -
740
│ │ │ -
741 _SClos (const _Dom& __e, const slice& __s) : _Base (__e, __s) {}
│ │ │ -
742 };
│ │ │ -
743
│ │ │ -
744 template<typename _Tp>
│ │ │ -
745 struct _SClos<_ValArray, _Tp>
│ │ │ -
746 : _SBase<_Array<_Tp> >
│ │ │ -
747 {
│ │ │ -
748 typedef _SBase<_Array<_Tp> > _Base;
│ │ │ -
749 typedef _Tp value_type;
│ │ │ -
750
│ │ │ -
751 _SClos (_Array<_Tp> __a, const slice& __s) : _Base (__a, __s) {}
│ │ │ -
752 };
│ │ │ -
753} // namespace __detail
│ │ │ -
754
│ │ │ -
755_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ -
756} // namespace
│ │ │ -
757
│ │ │ -
758#endif /* _CPP_VALARRAY_BEFORE_H */
│ │ │ - │ │ │ -
complex< _Tp > log10(const complex< _Tp > &)
Return complex base 10 logarithm of z.
Definition complex:829
│ │ │ -
complex< _Tp > sin(const complex< _Tp > &)
Return complex sine of z.
Definition complex:859
│ │ │ -
complex< _Tp > log(const complex< _Tp > &)
Return complex natural logarithm of z.
Definition complex:824
│ │ │ -
complex< _Tp > tan(const complex< _Tp > &)
Return complex tangent of z.
Definition complex:960
│ │ │ -
_Tp abs(const complex< _Tp > &)
Return magnitude of z.
Definition complex:630
│ │ │ -
complex< _Tp > exp(const complex< _Tp > &)
Return complex base e exponential of z.
Definition complex:797
│ │ │ -
complex< _Tp > cosh(const complex< _Tp > &)
Return complex hyperbolic cosine of z.
Definition complex:771
│ │ │ -
complex< _Tp > tanh(const complex< _Tp > &)
Return complex hyperbolic tangent of z.
Definition complex:988
│ │ │ -
complex< _Tp > pow(const complex< _Tp > &, int)
Return x to the y'th power.
Definition complex:1019
│ │ │ -
complex< _Tp > sinh(const complex< _Tp > &)
Return complex hyperbolic sine of z.
Definition complex:889
│ │ │ -
complex< _Tp > cos(const complex< _Tp > &)
Return complex cosine of z.
Definition complex:741
│ │ │ -
complex< _Tp > sqrt(const complex< _Tp > &)
Return complex square root of z.
Definition complex:933
│ │ │ +
639 // Cylindrical Neumann functions
│ │ │ +
640
│ │ │ +
641 /**
│ │ │ +
642 * Return the Neumann function @f$ N_{\nu}(x) @f$
│ │ │ +
643 * of @c float order @f$ \nu @f$ and argument @f$ x @f$.
│ │ │ +
644 *
│ │ │ +
645 * @see cyl_neumann for setails.
│ │ │ +
646 */
│ │ │ +
647 inline float
│ │ │ +
│ │ │ +
648 cyl_neumannf(float __nu, float __x)
│ │ │ +
649 { return __detail::__cyl_neumann_n<float>(__nu, __x); }
│ │ │ +
│ │ │ +
650
│ │ │ +
651 /**
│ │ │ +
652 * Return the Neumann function @f$ N_{\nu}(x) @f$
│ │ │ +
653 * of <tt>long double</tt> order @f$ \nu @f$ and argument @f$ x @f$.
│ │ │ +
654 *
│ │ │ +
655 * @see cyl_neumann for setails.
│ │ │ +
656 */
│ │ │ +
657 inline long double
│ │ │ +
│ │ │ +
658 cyl_neumannl(long double __nu, long double __x)
│ │ │ +
659 { return __detail::__cyl_neumann_n<long double>(__nu, __x); }
│ │ │ +
│ │ │ +
660
│ │ │ +
661 /**
│ │ │ +
662 * Return the Neumann function @f$ N_{\nu}(x) @f$
│ │ │ +
663 * of real order @f$ \nu @f$ and argument @f$ x >= 0 @f$.
│ │ │ +
664 *
│ │ │ +
665 * The Neumann function is defined by:
│ │ │ +
666 * @f[
│ │ │ +
667 * N_{\nu}(x) = \frac{J_{\nu}(x) \cos \nu\pi - J_{-\nu}(x)}
│ │ │ +
668 * {\sin \nu\pi}
│ │ │ +
669 * @f]
│ │ │ +
670 * where @f$ x >= 0 @f$ and for integral order @f$ \nu = n @f$
│ │ │ +
671 * a limit is taken: @f$ lim_{\nu \to n} @f$.
│ │ │ +
672 *
│ │ │ +
673 * @tparam _Tpnu The floating-point type of the order @c __nu.
│ │ │ +
674 * @tparam _Tp The floating-point type of the argument @c __x.
│ │ │ +
675 * @param __nu The order
│ │ │ +
676 * @param __x The argument, <tt> __x >= 0 </tt>
│ │ │ +
677 * @throw std::domain_error if <tt> __x < 0 </tt>.
│ │ │ +
678 */
│ │ │ +
679 template<typename _Tpnu, typename _Tp>
│ │ │ +
680 inline typename __gnu_cxx::__promote_2<_Tpnu, _Tp>::__type
│ │ │ +
│ │ │ + │ │ │ +
682 {
│ │ │ +
683 typedef typename __gnu_cxx::__promote_2<_Tpnu, _Tp>::__type __type;
│ │ │ +
684 return __detail::__cyl_neumann_n<__type>(__nu, __x);
│ │ │ +
685 }
│ │ │ +
│ │ │ +
686
│ │ │ +
687 // Incomplete elliptic integrals of the first kind
│ │ │ +
688
│ │ │ +
689 /**
│ │ │ +
690 * Return the incomplete elliptic integral of the first kind @f$ E(k,\phi) @f$
│ │ │ +
691 * for @c float modulus @f$ k @f$ and angle @f$ \phi @f$.
│ │ │ +
692 *
│ │ │ +
693 * @see ellint_1 for details.
│ │ │ +
694 */
│ │ │ +
695 inline float
│ │ │ +
│ │ │ +
696 ellint_1f(float __k, float __phi)
│ │ │ +
697 { return __detail::__ellint_1<float>(__k, __phi); }
│ │ │ +
│ │ │ +
698
│ │ │ +
699 /**
│ │ │ +
700 * Return the incomplete elliptic integral of the first kind @f$ E(k,\phi) @f$
│ │ │ +
701 * for <tt>long double</tt> modulus @f$ k @f$ and angle @f$ \phi @f$.
│ │ │ +
702 *
│ │ │ +
703 * @see ellint_1 for details.
│ │ │ +
704 */
│ │ │ +
705 inline long double
│ │ │ +
│ │ │ +
706 ellint_1l(long double __k, long double __phi)
│ │ │ +
707 { return __detail::__ellint_1<long double>(__k, __phi); }
│ │ │ +
│ │ │ +
708
│ │ │ +
709 /**
│ │ │ +
710 * Return the incomplete elliptic integral of the first kind @f$ F(k,\phi) @f$
│ │ │ +
711 * for @c real modulus @f$ k @f$ and angle @f$ \phi @f$.
│ │ │ +
712 *
│ │ │ +
713 * The incomplete elliptic integral of the first kind is defined as
│ │ │ +
714 * @f[
│ │ │ +
715 * F(k,\phi) = \int_0^{\phi}\frac{d\theta}
│ │ │ +
716 * {\sqrt{1 - k^2 sin^2\theta}}
│ │ │ +
717 * @f]
│ │ │ +
718 * For @f$ \phi= \pi/2 @f$ this becomes the complete elliptic integral of
│ │ │ +
719 * the first kind, @f$ K(k) @f$. @see comp_ellint_1.
│ │ │ +
720 *
│ │ │ +
721 * @tparam _Tp The floating-point type of the modulus @c __k.
│ │ │ +
722 * @tparam _Tpp The floating-point type of the angle @c __phi.
│ │ │ +
723 * @param __k The modulus, <tt> abs(__k) <= 1 </tt>
│ │ │ +
724 * @param __phi The integral limit argument in radians
│ │ │ +
725 * @throw std::domain_error if <tt> abs(__k) > 1 </tt>.
│ │ │ +
726 */
│ │ │ +
727 template<typename _Tp, typename _Tpp>
│ │ │ +
728 inline typename __gnu_cxx::__promote_2<_Tp, _Tpp>::__type
│ │ │ +
│ │ │ +
729 ellint_1(_Tp __k, _Tpp __phi)
│ │ │ +
730 {
│ │ │ +
731 typedef typename __gnu_cxx::__promote_2<_Tp, _Tpp>::__type __type;
│ │ │ +
732 return __detail::__ellint_1<__type>(__k, __phi);
│ │ │ +
733 }
│ │ │ +
│ │ │ +
734
│ │ │ +
735 // Incomplete elliptic integrals of the second kind
│ │ │ +
736
│ │ │ +
737 /**
│ │ │ +
738 * @brief Return the incomplete elliptic integral of the second kind
│ │ │ +
739 * @f$ E(k,\phi) @f$ for @c float argument.
│ │ │ +
740 *
│ │ │ +
741 * @see ellint_2 for details.
│ │ │ +
742 */
│ │ │ +
743 inline float
│ │ │ +
│ │ │ +
744 ellint_2f(float __k, float __phi)
│ │ │ +
745 { return __detail::__ellint_2<float>(__k, __phi); }
│ │ │ +
│ │ │ +
746
│ │ │ +
747 /**
│ │ │ +
748 * @brief Return the incomplete elliptic integral of the second kind
│ │ │ +
749 * @f$ E(k,\phi) @f$.
│ │ │ +
750 *
│ │ │ +
751 * @see ellint_2 for details.
│ │ │ +
752 */
│ │ │ +
753 inline long double
│ │ │ +
│ │ │ +
754 ellint_2l(long double __k, long double __phi)
│ │ │ +
755 { return __detail::__ellint_2<long double>(__k, __phi); }
│ │ │ +
│ │ │ +
756
│ │ │ +
757 /**
│ │ │ +
758 * Return the incomplete elliptic integral of the second kind
│ │ │ +
759 * @f$ E(k,\phi) @f$.
│ │ │ +
760 *
│ │ │ +
761 * The incomplete elliptic integral of the second kind is defined as
│ │ │ +
762 * @f[
│ │ │ +
763 * E(k,\phi) = \int_0^{\phi} \sqrt{1 - k^2 sin^2\theta}
│ │ │ +
764 * @f]
│ │ │ +
765 * For @f$ \phi= \pi/2 @f$ this becomes the complete elliptic integral of
│ │ │ +
766 * the second kind, @f$ E(k) @f$. @see comp_ellint_2.
│ │ │ +
767 *
│ │ │ +
768 * @tparam _Tp The floating-point type of the modulus @c __k.
│ │ │ +
769 * @tparam _Tpp The floating-point type of the angle @c __phi.
│ │ │ +
770 * @param __k The modulus, <tt> abs(__k) <= 1 </tt>
│ │ │ +
771 * @param __phi The integral limit argument in radians
│ │ │ +
772 * @return The elliptic function of the second kind.
│ │ │ +
773 * @throw std::domain_error if <tt> abs(__k) > 1 </tt>.
│ │ │ +
774 */
│ │ │ +
775 template<typename _Tp, typename _Tpp>
│ │ │ +
776 inline typename __gnu_cxx::__promote_2<_Tp, _Tpp>::__type
│ │ │ +
│ │ │ +
777 ellint_2(_Tp __k, _Tpp __phi)
│ │ │ +
778 {
│ │ │ +
779 typedef typename __gnu_cxx::__promote_2<_Tp, _Tpp>::__type __type;
│ │ │ +
780 return __detail::__ellint_2<__type>(__k, __phi);
│ │ │ +
781 }
│ │ │ +
│ │ │ +
782
│ │ │ +
783 // Incomplete elliptic integrals of the third kind
│ │ │ +
784
│ │ │ +
785 /**
│ │ │ +
786 * @brief Return the incomplete elliptic integral of the third kind
│ │ │ +
787 * @f$ \Pi(k,\nu,\phi) @f$ for @c float argument.
│ │ │ +
788 *
│ │ │ +
789 * @see ellint_3 for details.
│ │ │ +
790 */
│ │ │ +
791 inline float
│ │ │ +
│ │ │ +
792 ellint_3f(float __k, float __nu, float __phi)
│ │ │ +
793 { return __detail::__ellint_3<float>(__k, __nu, __phi); }
│ │ │ +
│ │ │ +
794
│ │ │ +
795 /**
│ │ │ +
796 * @brief Return the incomplete elliptic integral of the third kind
│ │ │ +
797 * @f$ \Pi(k,\nu,\phi) @f$.
│ │ │ +
798 *
│ │ │ +
799 * @see ellint_3 for details.
│ │ │ +
800 */
│ │ │ +
801 inline long double
│ │ │ +
│ │ │ +
802 ellint_3l(long double __k, long double __nu, long double __phi)
│ │ │ +
803 { return __detail::__ellint_3<long double>(__k, __nu, __phi); }
│ │ │ +
│ │ │ +
804
│ │ │ +
805 /**
│ │ │ +
806 * @brief Return the incomplete elliptic integral of the third kind
│ │ │ +
807 * @f$ \Pi(k,\nu,\phi) @f$.
│ │ │ +
808 *
│ │ │ +
809 * The incomplete elliptic integral of the third kind is defined by:
│ │ │ +
810 * @f[
│ │ │ +
811 * \Pi(k,\nu,\phi) = \int_0^{\phi}
│ │ │ +
812 * \frac{d\theta}
│ │ │ +
813 * {(1 - \nu \sin^2\theta)
│ │ │ +
814 * \sqrt{1 - k^2 \sin^2\theta}}
│ │ │ +
815 * @f]
│ │ │ +
816 * For @f$ \phi= \pi/2 @f$ this becomes the complete elliptic integral of
│ │ │ +
817 * the third kind, @f$ \Pi(k,\nu) @f$. @see comp_ellint_3.
│ │ │ +
818 *
│ │ │ +
819 * @tparam _Tp The floating-point type of the modulus @c __k.
│ │ │ +
820 * @tparam _Tpn The floating-point type of the argument @c __nu.
│ │ │ +
821 * @tparam _Tpp The floating-point type of the angle @c __phi.
│ │ │ +
822 * @param __k The modulus, <tt> abs(__k) <= 1 </tt>
│ │ │ +
823 * @param __nu The second argument
│ │ │ +
824 * @param __phi The integral limit argument in radians
│ │ │ +
825 * @return The elliptic function of the third kind.
│ │ │ +
826 * @throw std::domain_error if <tt> abs(__k) > 1 </tt>.
│ │ │ +
827 */
│ │ │ +
828 template<typename _Tp, typename _Tpn, typename _Tpp>
│ │ │ +
829 inline typename __gnu_cxx::__promote_3<_Tp, _Tpn, _Tpp>::__type
│ │ │ +
│ │ │ +
830 ellint_3(_Tp __k, _Tpn __nu, _Tpp __phi)
│ │ │ +
831 {
│ │ │ +
832 typedef typename __gnu_cxx::__promote_3<_Tp, _Tpn, _Tpp>::__type __type;
│ │ │ +
833 return __detail::__ellint_3<__type>(__k, __nu, __phi);
│ │ │ +
834 }
│ │ │ +
│ │ │ +
835
│ │ │ +
836 // Exponential integrals
│ │ │ +
837
│ │ │ +
838 /**
│ │ │ +
839 * Return the exponential integral @f$ Ei(x) @f$ for @c float argument @c x.
│ │ │ +
840 *
│ │ │ +
841 * @see expint for details.
│ │ │ +
842 */
│ │ │ +
843 inline float
│ │ │ +
│ │ │ +
844 expintf(float __x)
│ │ │ +
845 { return __detail::__expint<float>(__x); }
│ │ │ +
│ │ │ +
846
│ │ │ +
847 /**
│ │ │ +
848 * Return the exponential integral @f$ Ei(x) @f$
│ │ │ +
849 * for <tt>long double</tt> argument @c x.
│ │ │ +
850 *
│ │ │ +
851 * @see expint for details.
│ │ │ +
852 */
│ │ │ +
853 inline long double
│ │ │ +
│ │ │ +
854 expintl(long double __x)
│ │ │ +
855 { return __detail::__expint<long double>(__x); }
│ │ │ +
│ │ │ +
856
│ │ │ +
857 /**
│ │ │ +
858 * Return the exponential integral @f$ Ei(x) @f$ for @c real argument @c x.
│ │ │ +
859 *
│ │ │ +
860 * The exponential integral is given by
│ │ │ +
861 * \f[
│ │ │ +
862 * Ei(x) = -\int_{-x}^\infty \frac{e^t}{t} dt
│ │ │ +
863 * \f]
│ │ │ +
864 *
│ │ │ +
865 * @tparam _Tp The floating-point type of the argument @c __x.
│ │ │ +
866 * @param __x The argument of the exponential integral function.
│ │ │ +
867 */
│ │ │ +
868 template<typename _Tp>
│ │ │ +
869 inline typename __gnu_cxx::__promote<_Tp>::__type
│ │ │ +
│ │ │ +
870 expint(_Tp __x)
│ │ │ +
871 {
│ │ │ +
872 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
│ │ │ +
873 return __detail::__expint<__type>(__x);
│ │ │ +
874 }
│ │ │ +
│ │ │ +
875
│ │ │ +
876 // Hermite polynomials
│ │ │ +
877
│ │ │ +
878 /**
│ │ │ +
879 * Return the Hermite polynomial @f$ H_n(x) @f$ of nonnegative order n
│ │ │ +
880 * and float argument @c x.
│ │ │ +
881 *
│ │ │ +
882 * @see hermite for details.
│ │ │ +
883 */
│ │ │ +
884 inline float
│ │ │ +
│ │ │ +
885 hermitef(unsigned int __n, float __x)
│ │ │ +
886 { return __detail::__poly_hermite<float>(__n, __x); }
│ │ │ +
│ │ │ +
887
│ │ │ +
888 /**
│ │ │ +
889 * Return the Hermite polynomial @f$ H_n(x) @f$ of nonnegative order n
│ │ │ +
890 * and <tt>long double</tt> argument @c x.
│ │ │ +
891 *
│ │ │ +
892 * @see hermite for details.
│ │ │ +
893 */
│ │ │ +
894 inline long double
│ │ │ +
│ │ │ +
895 hermitel(unsigned int __n, long double __x)
│ │ │ +
896 { return __detail::__poly_hermite<long double>(__n, __x); }
│ │ │ +
│ │ │ +
897
│ │ │ +
898 /**
│ │ │ +
899 * Return the Hermite polynomial @f$ H_n(x) @f$ of order n
│ │ │ +
900 * and @c real argument @c x.
│ │ │ +
901 *
│ │ │ +
902 * The Hermite polynomial is defined by:
│ │ │ +
903 * @f[
│ │ │ +
904 * H_n(x) = (-1)^n e^{x^2} \frac{d^n}{dx^n} e^{-x^2}
│ │ │ +
905 * @f]
│ │ │ +
906 *
│ │ │ +
907 * The Hermite polynomial obeys a reflection formula:
│ │ │ +
908 * @f[
│ │ │ +
909 * H_n(-x) = (-1)^n H_n(x)
│ │ │ +
910 * @f]
│ │ │ +
911 *
│ │ │ +
912 * @tparam _Tp The floating-point type of the argument @c __x.
│ │ │ +
913 * @param __n The order
│ │ │ +
914 * @param __x The argument
│ │ │ +
915 */
│ │ │ +
916 template<typename _Tp>
│ │ │ +
917 inline typename __gnu_cxx::__promote<_Tp>::__type
│ │ │ +
│ │ │ +
918 hermite(unsigned int __n, _Tp __x)
│ │ │ +
919 {
│ │ │ +
920 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
│ │ │ +
921 return __detail::__poly_hermite<__type>(__n, __x);
│ │ │ +
922 }
│ │ │ +
│ │ │ +
923
│ │ │ +
924 // Laguerre polynomials
│ │ │ +
925
│ │ │ +
926 /**
│ │ │ +
927 * Returns the Laguerre polynomial @f$ L_n(x) @f$ of nonnegative degree @c n
│ │ │ +
928 * and @c float argument @f$ x >= 0 @f$.
│ │ │ +
929 *
│ │ │ +
930 * @see laguerre for more details.
│ │ │ +
931 */
│ │ │ +
932 inline float
│ │ │ +
│ │ │ +
933 laguerref(unsigned int __n, float __x)
│ │ │ +
934 { return __detail::__laguerre<float>(__n, __x); }
│ │ │ +
│ │ │ +
935
│ │ │ +
936 /**
│ │ │ +
937 * Returns the Laguerre polynomial @f$ L_n(x) @f$ of nonnegative degree @c n
│ │ │ +
938 * and <tt>long double</tt> argument @f$ x >= 0 @f$.
│ │ │ +
939 *
│ │ │ +
940 * @see laguerre for more details.
│ │ │ +
941 */
│ │ │ +
942 inline long double
│ │ │ +
│ │ │ +
943 laguerrel(unsigned int __n, long double __x)
│ │ │ +
944 { return __detail::__laguerre<long double>(__n, __x); }
│ │ │ +
│ │ │ +
945
│ │ │ +
946 /**
│ │ │ +
947 * Returns the Laguerre polynomial @f$ L_n(x) @f$
│ │ │ +
948 * of nonnegative degree @c n and real argument @f$ x >= 0 @f$.
│ │ │ +
949 *
│ │ │ +
950 * The Laguerre polynomial is defined by:
│ │ │ +
951 * @f[
│ │ │ +
952 * L_n(x) = \frac{e^x}{n!} \frac{d^n}{dx^n} (x^ne^{-x})
│ │ │ +
953 * @f]
│ │ │ +
954 *
│ │ │ +
955 * @tparam _Tp The floating-point type of the argument @c __x.
│ │ │ +
956 * @param __n The nonnegative order
│ │ │ +
957 * @param __x The argument <tt> __x >= 0 </tt>
│ │ │ +
958 * @throw std::domain_error if <tt> __x < 0 </tt>.
│ │ │ +
959 */
│ │ │ +
960 template<typename _Tp>
│ │ │ +
961 inline typename __gnu_cxx::__promote<_Tp>::__type
│ │ │ +
│ │ │ +
962 laguerre(unsigned int __n, _Tp __x)
│ │ │ +
963 {
│ │ │ +
964 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
│ │ │ +
965 return __detail::__laguerre<__type>(__n, __x);
│ │ │ +
966 }
│ │ │ +
│ │ │ +
967
│ │ │ +
968 // Legendre polynomials
│ │ │ +
969
│ │ │ +
970 /**
│ │ │ +
971 * Return the Legendre polynomial @f$ P_l(x) @f$ of nonnegative
│ │ │ +
972 * degree @f$ l @f$ and @c float argument @f$ |x| <= 0 @f$.
│ │ │ +
973 *
│ │ │ +
974 * @see legendre for more details.
│ │ │ +
975 */
│ │ │ +
976 inline float
│ │ │ +
│ │ │ +
977 legendref(unsigned int __l, float __x)
│ │ │ +
978 { return __detail::__poly_legendre_p<float>(__l, __x); }
│ │ │ +
│ │ │ +
979
│ │ │ +
980 /**
│ │ │ +
981 * Return the Legendre polynomial @f$ P_l(x) @f$ of nonnegative
│ │ │ +
982 * degree @f$ l @f$ and <tt>long double</tt> argument @f$ |x| <= 0 @f$.
│ │ │ +
983 *
│ │ │ +
984 * @see legendre for more details.
│ │ │ +
985 */
│ │ │ +
986 inline long double
│ │ │ +
│ │ │ +
987 legendrel(unsigned int __l, long double __x)
│ │ │ +
988 { return __detail::__poly_legendre_p<long double>(__l, __x); }
│ │ │ +
│ │ │ +
989
│ │ │ +
990 /**
│ │ │ +
991 * Return the Legendre polynomial @f$ P_l(x) @f$ of nonnegative
│ │ │ +
992 * degree @f$ l @f$ and real argument @f$ |x| <= 0 @f$.
│ │ │ +
993 *
│ │ │ +
994 * The Legendre function of order @f$ l @f$ and argument @f$ x @f$,
│ │ │ +
995 * @f$ P_l(x) @f$, is defined by:
│ │ │ +
996 * @f[
│ │ │ +
997 * P_l(x) = \frac{1}{2^l l!}\frac{d^l}{dx^l}(x^2 - 1)^{l}
│ │ │ +
998 * @f]
│ │ │ +
999 *
│ │ │ +
1000 * @tparam _Tp The floating-point type of the argument @c __x.
│ │ │ +
1001 * @param __l The degree @f$ l >= 0 @f$
│ │ │ +
1002 * @param __x The argument @c abs(__x) <= 1
│ │ │ +
1003 * @throw std::domain_error if @c abs(__x) > 1
│ │ │ +
1004 */
│ │ │ +
1005 template<typename _Tp>
│ │ │ +
1006 inline typename __gnu_cxx::__promote<_Tp>::__type
│ │ │ +
│ │ │ +
1007 legendre(unsigned int __l, _Tp __x)
│ │ │ +
1008 {
│ │ │ +
1009 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
│ │ │ +
1010 return __detail::__poly_legendre_p<__type>(__l, __x);
│ │ │ +
1011 }
│ │ │ +
│ │ │ +
1012
│ │ │ +
1013 // Riemann zeta functions
│ │ │ +
1014
│ │ │ +
1015 /**
│ │ │ +
1016 * Return the Riemann zeta function @f$ \zeta(s) @f$
│ │ │ +
1017 * for @c float argument @f$ s @f$.
│ │ │ +
1018 *
│ │ │ +
1019 * @see riemann_zeta for more details.
│ │ │ +
1020 */
│ │ │ +
1021 inline float
│ │ │ +
│ │ │ + │ │ │ +
1023 { return __detail::__riemann_zeta<float>(__s); }
│ │ │ +
│ │ │ +
1024
│ │ │ +
1025 /**
│ │ │ +
1026 * Return the Riemann zeta function @f$ \zeta(s) @f$
│ │ │ +
1027 * for <tt>long double</tt> argument @f$ s @f$.
│ │ │ +
1028 *
│ │ │ +
1029 * @see riemann_zeta for more details.
│ │ │ +
1030 */
│ │ │ +
1031 inline long double
│ │ │ +
│ │ │ +
1032 riemann_zetal(long double __s)
│ │ │ +
1033 { return __detail::__riemann_zeta<long double>(__s); }
│ │ │ +
│ │ │ +
1034
│ │ │ +
1035 /**
│ │ │ +
1036 * Return the Riemann zeta function @f$ \zeta(s) @f$
│ │ │ +
1037 * for real argument @f$ s @f$.
│ │ │ +
1038 *
│ │ │ +
1039 * The Riemann zeta function is defined by:
│ │ │ +
1040 * @f[
│ │ │ +
1041 * \zeta(s) = \sum_{k=1}^{\infty} k^{-s} \hbox{ for } s > 1
│ │ │ +
1042 * @f]
│ │ │ +
1043 * and
│ │ │ +
1044 * @f[
│ │ │ +
1045 * \zeta(s) = \frac{1}{1-2^{1-s}}\sum_{k=1}^{\infty}(-1)^{k-1}k^{-s}
│ │ │ +
1046 * \hbox{ for } 0 <= s <= 1
│ │ │ +
1047 * @f]
│ │ │ +
1048 * For s < 1 use the reflection formula:
│ │ │ +
1049 * @f[
│ │ │ +
1050 * \zeta(s) = 2^s \pi^{s-1} \sin(\frac{\pi s}{2}) \Gamma(1-s) \zeta(1-s)
│ │ │ +
1051 * @f]
│ │ │ +
1052 *
│ │ │ +
1053 * @tparam _Tp The floating-point type of the argument @c __s.
│ │ │ +
1054 * @param __s The argument <tt> s != 1 </tt>
│ │ │ +
1055 */
│ │ │ +
1056 template<typename _Tp>
│ │ │ +
1057 inline typename __gnu_cxx::__promote<_Tp>::__type
│ │ │ +
│ │ │ + │ │ │ +
1059 {
│ │ │ +
1060 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
│ │ │ +
1061 return __detail::__riemann_zeta<__type>(__s);
│ │ │ +
1062 }
│ │ │ +
│ │ │ +
1063
│ │ │ +
1064 // Spherical Bessel functions
│ │ │ +
1065
│ │ │ +
1066 /**
│ │ │ +
1067 * Return the spherical Bessel function @f$ j_n(x) @f$ of nonnegative order n
│ │ │ +
1068 * and @c float argument @f$ x >= 0 @f$.
│ │ │ +
1069 *
│ │ │ +
1070 * @see sph_bessel for more details.
│ │ │ +
1071 */
│ │ │ +
1072 inline float
│ │ │ +
│ │ │ +
1073 sph_besself(unsigned int __n, float __x)
│ │ │ +
1074 { return __detail::__sph_bessel<float>(__n, __x); }
│ │ │ +
│ │ │ +
1075
│ │ │ +
1076 /**
│ │ │ +
1077 * Return the spherical Bessel function @f$ j_n(x) @f$ of nonnegative order n
│ │ │ +
1078 * and <tt>long double</tt> argument @f$ x >= 0 @f$.
│ │ │ +
1079 *
│ │ │ +
1080 * @see sph_bessel for more details.
│ │ │ +
1081 */
│ │ │ +
1082 inline long double
│ │ │ +
│ │ │ +
1083 sph_bessell(unsigned int __n, long double __x)
│ │ │ +
1084 { return __detail::__sph_bessel<long double>(__n, __x); }
│ │ │ +
│ │ │ +
1085
│ │ │ +
1086 /**
│ │ │ +
1087 * Return the spherical Bessel function @f$ j_n(x) @f$ of nonnegative order n
│ │ │ +
1088 * and real argument @f$ x >= 0 @f$.
│ │ │ +
1089 *
│ │ │ +
1090 * The spherical Bessel function is defined by:
│ │ │ +
1091 * @f[
│ │ │ +
1092 * j_n(x) = \left(\frac{\pi}{2x} \right) ^{1/2} J_{n+1/2}(x)
│ │ │ +
1093 * @f]
│ │ │ +
1094 *
│ │ │ +
1095 * @tparam _Tp The floating-point type of the argument @c __x.
│ │ │ +
1096 * @param __n The integral order <tt> n >= 0 </tt>
│ │ │ +
1097 * @param __x The real argument <tt> x >= 0 </tt>
│ │ │ +
1098 * @throw std::domain_error if <tt> __x < 0 </tt>.
│ │ │ +
1099 */
│ │ │ +
1100 template<typename _Tp>
│ │ │ +
1101 inline typename __gnu_cxx::__promote<_Tp>::__type
│ │ │ +
│ │ │ +
1102 sph_bessel(unsigned int __n, _Tp __x)
│ │ │ +
1103 {
│ │ │ +
1104 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
│ │ │ +
1105 return __detail::__sph_bessel<__type>(__n, __x);
│ │ │ +
1106 }
│ │ │ +
│ │ │ +
1107
│ │ │ +
1108 // Spherical associated Legendre functions
│ │ │ +
1109
│ │ │ +
1110 /**
│ │ │ +
1111 * Return the spherical Legendre function of nonnegative integral
│ │ │ +
1112 * degree @c l and order @c m and float angle @f$ \theta @f$ in radians.
│ │ │ +
1113 *
│ │ │ +
1114 * @see sph_legendre for details.
│ │ │ +
1115 */
│ │ │ +
1116 inline float
│ │ │ +
│ │ │ +
1117 sph_legendref(unsigned int __l, unsigned int __m, float __theta)
│ │ │ +
1118 { return __detail::__sph_legendre<float>(__l, __m, __theta); }
│ │ │ +
│ │ │ +
1119
│ │ │ +
1120 /**
│ │ │ +
1121 * Return the spherical Legendre function of nonnegative integral
│ │ │ +
1122 * degree @c l and order @c m and <tt>long double</tt> angle @f$ \theta @f$
│ │ │ +
1123 * in radians.
│ │ │ +
1124 *
│ │ │ +
1125 * @see sph_legendre for details.
│ │ │ +
1126 */
│ │ │ +
1127 inline long double
│ │ │ +
│ │ │ +
1128 sph_legendrel(unsigned int __l, unsigned int __m, long double __theta)
│ │ │ +
1129 { return __detail::__sph_legendre<long double>(__l, __m, __theta); }
│ │ │ +
│ │ │ +
1130
│ │ │ +
1131 /**
│ │ │ +
1132 * Return the spherical Legendre function of nonnegative integral
│ │ │ +
1133 * degree @c l and order @c m and real angle @f$ \theta @f$ in radians.
│ │ │ +
1134 *
│ │ │ +
1135 * The spherical Legendre function is defined by
│ │ │ +
1136 * @f[
│ │ │ +
1137 * Y_l^m(\theta,\phi) = (-1)^m[\frac{(2l+1)}{4\pi}
│ │ │ +
1138 * \frac{(l-m)!}{(l+m)!}]
│ │ │ +
1139 * P_l^m(\cos\theta) \exp^{im\phi}
│ │ │ +
1140 * @f]
│ │ │ +
1141 *
│ │ │ +
1142 * @tparam _Tp The floating-point type of the angle @c __theta.
│ │ │ +
1143 * @param __l The order <tt> __l >= 0 </tt>
│ │ │ +
1144 * @param __m The degree <tt> __m >= 0 </tt> and <tt> __m <= __l </tt>
│ │ │ +
1145 * @param __theta The radian polar angle argument
│ │ │ +
1146 */
│ │ │ +
1147 template<typename _Tp>
│ │ │ +
1148 inline typename __gnu_cxx::__promote<_Tp>::__type
│ │ │ +
│ │ │ +
1149 sph_legendre(unsigned int __l, unsigned int __m, _Tp __theta)
│ │ │ +
1150 {
│ │ │ +
1151 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
│ │ │ +
1152 return __detail::__sph_legendre<__type>(__l, __m, __theta);
│ │ │ +
1153 }
│ │ │ +
│ │ │ +
1154
│ │ │ +
1155 // Spherical Neumann functions
│ │ │ +
1156
│ │ │ +
1157 /**
│ │ │ +
1158 * Return the spherical Neumann function of integral order @f$ n >= 0 @f$
│ │ │ +
1159 * and @c float argument @f$ x >= 0 @f$.
│ │ │ +
1160 *
│ │ │ +
1161 * @see sph_neumann for details.
│ │ │ +
1162 */
│ │ │ +
1163 inline float
│ │ │ +
│ │ │ +
1164 sph_neumannf(unsigned int __n, float __x)
│ │ │ +
1165 { return __detail::__sph_neumann<float>(__n, __x); }
│ │ │ +
│ │ │ +
1166
│ │ │ +
1167 /**
│ │ │ +
1168 * Return the spherical Neumann function of integral order @f$ n >= 0 @f$
│ │ │ +
1169 * and <tt>long double</tt> @f$ x >= 0 @f$.
│ │ │ +
1170 *
│ │ │ +
1171 * @see sph_neumann for details.
│ │ │ +
1172 */
│ │ │ +
1173 inline long double
│ │ │ +
│ │ │ +
1174 sph_neumannl(unsigned int __n, long double __x)
│ │ │ +
1175 { return __detail::__sph_neumann<long double>(__n, __x); }
│ │ │ +
│ │ │ +
1176
│ │ │ +
1177 /**
│ │ │ +
1178 * Return the spherical Neumann function of integral order @f$ n >= 0 @f$
│ │ │ +
1179 * and real argument @f$ x >= 0 @f$.
│ │ │ +
1180 *
│ │ │ +
1181 * The spherical Neumann function is defined by
│ │ │ +
1182 * @f[
│ │ │ +
1183 * n_n(x) = \left(\frac{\pi}{2x} \right) ^{1/2} N_{n+1/2}(x)
│ │ │ +
1184 * @f]
│ │ │ +
1185 *
│ │ │ +
1186 * @tparam _Tp The floating-point type of the argument @c __x.
│ │ │ +
1187 * @param __n The integral order <tt> n >= 0 </tt>
│ │ │ +
1188 * @param __x The real argument <tt> __x >= 0 </tt>
│ │ │ +
1189 * @throw std::domain_error if <tt> __x < 0 </tt>.
│ │ │ +
1190 */
│ │ │ +
1191 template<typename _Tp>
│ │ │ +
1192 inline typename __gnu_cxx::__promote<_Tp>::__type
│ │ │ +
│ │ │ +
1193 sph_neumann(unsigned int __n, _Tp __x)
│ │ │ +
1194 {
│ │ │ +
1195 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
│ │ │ +
1196 return __detail::__sph_neumann<__type>(__n, __x);
│ │ │ +
1197 }
│ │ │ +
│ │ │ +
1198
│ │ │ +
1199 /// @} group mathsf
│ │ │ +
1200
│ │ │ +
1201_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ +
1202} // namespace std
│ │ │ +
1203
│ │ │ +
1204#ifndef __STRICT_ANSI__
│ │ │ +
1205namespace __gnu_cxx _GLIBCXX_VISIBILITY(default)
│ │ │ +
1206{
│ │ │ +
1207_GLIBCXX_BEGIN_NAMESPACE_VERSION
│ │ │ +
1208
│ │ │ +
1209 /** @addtogroup mathsf
│ │ │ +
1210 * @{
│ │ │ +
1211 */
│ │ │ +
1212
│ │ │ +
1213 // Airy functions
│ │ │ +
1214
│ │ │ +
1215 /**
│ │ │ +
1216 * Return the Airy function @f$ Ai(x) @f$ of @c float argument x.
│ │ │ +
1217 */
│ │ │ +
1218 inline float
│ │ │ +
│ │ │ +
1219 airy_aif(float __x)
│ │ │ +
1220 {
│ │ │ +
1221 float __Ai, __Bi, __Aip, __Bip;
│ │ │ +
1222 std::__detail::__airy<float>(__x, __Ai, __Bi, __Aip, __Bip);
│ │ │ +
1223 return __Ai;
│ │ │ +
1224 }
│ │ │ +
│ │ │ +
1225
│ │ │ +
1226 /**
│ │ │ +
1227 * Return the Airy function @f$ Ai(x) @f$ of <tt>long double</tt> argument x.
│ │ │ +
1228 */
│ │ │ +
1229 inline long double
│ │ │ +
│ │ │ +
1230 airy_ail(long double __x)
│ │ │ +
1231 {
│ │ │ +
1232 long double __Ai, __Bi, __Aip, __Bip;
│ │ │ +
1233 std::__detail::__airy<long double>(__x, __Ai, __Bi, __Aip, __Bip);
│ │ │ +
1234 return __Ai;
│ │ │ +
1235 }
│ │ │ +
│ │ │ +
1236
│ │ │ +
1237 /**
│ │ │ +
1238 * Return the Airy function @f$ Ai(x) @f$ of real argument x.
│ │ │ +
1239 */
│ │ │ +
1240 template<typename _Tp>
│ │ │ +
1241 inline typename __gnu_cxx::__promote<_Tp>::__type
│ │ │ +
│ │ │ +
1242 airy_ai(_Tp __x)
│ │ │ +
1243 {
│ │ │ +
1244 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
│ │ │ +
1245 __type __Ai, __Bi, __Aip, __Bip;
│ │ │ +
1246 std::__detail::__airy<__type>(__x, __Ai, __Bi, __Aip, __Bip);
│ │ │ +
1247 return __Ai;
│ │ │ +
1248 }
│ │ │ +
│ │ │ +
1249
│ │ │ +
1250 /**
│ │ │ +
1251 * Return the Airy function @f$ Bi(x) @f$ of @c float argument x.
│ │ │ +
1252 */
│ │ │ +
1253 inline float
│ │ │ +
│ │ │ +
1254 airy_bif(float __x)
│ │ │ +
1255 {
│ │ │ +
1256 float __Ai, __Bi, __Aip, __Bip;
│ │ │ +
1257 std::__detail::__airy<float>(__x, __Ai, __Bi, __Aip, __Bip);
│ │ │ +
1258 return __Bi;
│ │ │ +
1259 }
│ │ │ +
│ │ │ +
1260
│ │ │ +
1261 /**
│ │ │ +
1262 * Return the Airy function @f$ Bi(x) @f$ of <tt>long double</tt> argument x.
│ │ │ +
1263 */
│ │ │ +
1264 inline long double
│ │ │ +
│ │ │ +
1265 airy_bil(long double __x)
│ │ │ +
1266 {
│ │ │ +
1267 long double __Ai, __Bi, __Aip, __Bip;
│ │ │ +
1268 std::__detail::__airy<long double>(__x, __Ai, __Bi, __Aip, __Bip);
│ │ │ +
1269 return __Bi;
│ │ │ +
1270 }
│ │ │ +
│ │ │ +
1271
│ │ │ +
1272 /**
│ │ │ +
1273 * Return the Airy function @f$ Bi(x) @f$ of real argument x.
│ │ │ +
1274 */
│ │ │ +
1275 template<typename _Tp>
│ │ │ +
1276 inline typename __gnu_cxx::__promote<_Tp>::__type
│ │ │ +
│ │ │ +
1277 airy_bi(_Tp __x)
│ │ │ +
1278 {
│ │ │ +
1279 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
│ │ │ +
1280 __type __Ai, __Bi, __Aip, __Bip;
│ │ │ +
1281 std::__detail::__airy<__type>(__x, __Ai, __Bi, __Aip, __Bip);
│ │ │ +
1282 return __Bi;
│ │ │ +
1283 }
│ │ │ +
│ │ │ +
1284
│ │ │ +
1285 // Confluent hypergeometric functions
│ │ │ +
1286
│ │ │ +
1287 /**
│ │ │ +
1288 * Return the confluent hypergeometric function @f$ {}_1F_1(a;c;x) @f$
│ │ │ +
1289 * of @c float numeratorial parameter @c a, denominatorial parameter @c c,
│ │ │ +
1290 * and argument @c x.
│ │ │ +
1291 *
│ │ │ +
1292 * @see conf_hyperg for details.
│ │ │ +
1293 */
│ │ │ +
1294 inline float
│ │ │ +
│ │ │ +
1295 conf_hypergf(float __a, float __c, float __x)
│ │ │ +
1296 { return std::__detail::__conf_hyperg<float>(__a, __c, __x); }
│ │ │ +
│ │ │ +
1297
│ │ │ +
1298 /**
│ │ │ +
1299 * Return the confluent hypergeometric function @f$ {}_1F_1(a;c;x) @f$
│ │ │ +
1300 * of <tt>long double</tt> numeratorial parameter @c a,
│ │ │ +
1301 * denominatorial parameter @c c, and argument @c x.
│ │ │ +
1302 *
│ │ │ +
1303 * @see conf_hyperg for details.
│ │ │ +
1304 */
│ │ │ +
1305 inline long double
│ │ │ +
│ │ │ +
1306 conf_hypergl(long double __a, long double __c, long double __x)
│ │ │ +
1307 { return std::__detail::__conf_hyperg<long double>(__a, __c, __x); }
│ │ │ +
│ │ │ +
1308
│ │ │ +
1309 /**
│ │ │ +
1310 * Return the confluent hypergeometric function @f$ {}_1F_1(a;c;x) @f$
│ │ │ +
1311 * of real numeratorial parameter @c a, denominatorial parameter @c c,
│ │ │ +
1312 * and argument @c x.
│ │ │ +
1313 *
│ │ │ +
1314 * The confluent hypergeometric function is defined by
│ │ │ +
1315 * @f[
│ │ │ +
1316 * {}_1F_1(a;c;x) = \sum_{n=0}^{\infty} \frac{(a)_n x^n}{(c)_n n!}
│ │ │ +
1317 * @f]
│ │ │ +
1318 * where the Pochhammer symbol is @f$ (x)_k = (x)(x+1)...(x+k-1) @f$,
│ │ │ +
1319 * @f$ (x)_0 = 1 @f$
│ │ │ +
1320 *
│ │ │ +
1321 * @param __a The numeratorial parameter
│ │ │ +
1322 * @param __c The denominatorial parameter
│ │ │ +
1323 * @param __x The argument
│ │ │ +
1324 */
│ │ │ +
1325 template<typename _Tpa, typename _Tpc, typename _Tp>
│ │ │ +
1326 inline typename __gnu_cxx::__promote_3<_Tpa, _Tpc, _Tp>::__type
│ │ │ +
│ │ │ +
1327 conf_hyperg(_Tpa __a, _Tpc __c, _Tp __x)
│ │ │ +
1328 {
│ │ │ +
1329 typedef typename __gnu_cxx::__promote_3<_Tpa, _Tpc, _Tp>::__type __type;
│ │ │ +
1330 return std::__detail::__conf_hyperg<__type>(__a, __c, __x);
│ │ │ +
1331 }
│ │ │ +
│ │ │ +
1332
│ │ │ +
1333 // Hypergeometric functions
│ │ │ +
1334
│ │ │ +
1335 /**
│ │ │ +
1336 * Return the hypergeometric function @f$ {}_2F_1(a,b;c;x) @f$
│ │ │ +
1337 * of @ float numeratorial parameters @c a and @c b,
│ │ │ +
1338 * denominatorial parameter @c c, and argument @c x.
│ │ │ +
1339 *
│ │ │ +
1340 * @see hyperg for details.
│ │ │ +
1341 */
│ │ │ +
1342 inline float
│ │ │ +
│ │ │ +
1343 hypergf(float __a, float __b, float __c, float __x)
│ │ │ +
1344 { return std::__detail::__hyperg<float>(__a, __b, __c, __x); }
│ │ │ +
│ │ │ +
1345
│ │ │ +
1346 /**
│ │ │ +
1347 * Return the hypergeometric function @f$ {}_2F_1(a,b;c;x) @f$
│ │ │ +
1348 * of <tt>long double</tt> numeratorial parameters @c a and @c b,
│ │ │ +
1349 * denominatorial parameter @c c, and argument @c x.
│ │ │ +
1350 *
│ │ │ +
1351 * @see hyperg for details.
│ │ │ +
1352 */
│ │ │ +
1353 inline long double
│ │ │ +
│ │ │ +
1354 hypergl(long double __a, long double __b, long double __c, long double __x)
│ │ │ +
1355 { return std::__detail::__hyperg<long double>(__a, __b, __c, __x); }
│ │ │ +
│ │ │ +
1356
│ │ │ +
1357 /**
│ │ │ +
1358 * Return the hypergeometric function @f$ {}_2F_1(a,b;c;x) @f$
│ │ │ +
1359 * of real numeratorial parameters @c a and @c b,
│ │ │ +
1360 * denominatorial parameter @c c, and argument @c x.
│ │ │ +
1361 *
│ │ │ +
1362 * The hypergeometric function is defined by
│ │ │ +
1363 * @f[
│ │ │ +
1364 * {}_2F_1(a;c;x) = \sum_{n=0}^{\infty} \frac{(a)_n (b)_n x^n}{(c)_n n!}
│ │ │ +
1365 * @f]
│ │ │ +
1366 * where the Pochhammer symbol is @f$ (x)_k = (x)(x+1)...(x+k-1) @f$,
│ │ │ +
1367 * @f$ (x)_0 = 1 @f$
│ │ │ +
1368 *
│ │ │ +
1369 * @param __a The first numeratorial parameter
│ │ │ +
1370 * @param __b The second numeratorial parameter
│ │ │ +
1371 * @param __c The denominatorial parameter
│ │ │ +
1372 * @param __x The argument
│ │ │ +
1373 */
│ │ │ +
1374 template<typename _Tpa, typename _Tpb, typename _Tpc, typename _Tp>
│ │ │ +
1375 inline typename __gnu_cxx::__promote_4<_Tpa, _Tpb, _Tpc, _Tp>::__type
│ │ │ +
│ │ │ +
1376 hyperg(_Tpa __a, _Tpb __b, _Tpc __c, _Tp __x)
│ │ │ +
1377 {
│ │ │ +
1378 typedef typename __gnu_cxx::__promote_4<_Tpa, _Tpb, _Tpc, _Tp>
│ │ │ +
1379 ::__type __type;
│ │ │ +
1380 return std::__detail::__hyperg<__type>(__a, __b, __c, __x);
│ │ │ +
1381 }
│ │ │ +
│ │ │ +
1382
│ │ │ +
1383 /// @}
│ │ │ +
1384_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ +
1385} // namespace __gnu_cxx
│ │ │ +
1386#endif // __STRICT_ANSI__
│ │ │ +
1387
│ │ │ +
1388#pragma GCC visibility pop
│ │ │ +
1389
│ │ │ +
1390#endif // _GLIBCXX_BITS_SPECFUN_H
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
__gnu_cxx::__promote< _Tp >::__type sph_bessel(unsigned int __n, _Tp __x)
Definition specfun.h:1102
│ │ │ +
long double conf_hypergl(long double __a, long double __c, long double __x)
Definition specfun.h:1306
│ │ │ +
long double sph_bessell(unsigned int __n, long double __x)
Definition specfun.h:1083
│ │ │ +
float betaf(float __a, float __b)
Definition specfun.h:312
│ │ │ +
long double expintl(long double __x)
Definition specfun.h:854
│ │ │ +
float cyl_bessel_jf(float __nu, float __x)
Definition specfun.h:550
│ │ │ +
__gnu_cxx::__promote_2< _Tpnu, _Tp >::__type cyl_bessel_k(_Tpnu __nu, _Tp __x)
Definition specfun.h:633
│ │ │ +
float ellint_3f(float __k, float __nu, float __phi)
Return the incomplete elliptic integral of the third kind for float argument.
Definition specfun.h:792
│ │ │ +
long double legendrel(unsigned int __l, long double __x)
Definition specfun.h:987
│ │ │ +
long double comp_ellint_3l(long double __k, long double __nu)
Return the complete elliptic integral of the third kind for long double modulus k.
Definition specfun.h:463
│ │ │ +
long double riemann_zetal(long double __s)
Definition specfun.h:1032
│ │ │ +
float cyl_bessel_kf(float __nu, float __x)
Definition specfun.h:596
│ │ │ +
float comp_ellint_2f(float __k)
Definition specfun.h:406
│ │ │ +
long double hermitel(unsigned int __n, long double __x)
Definition specfun.h:895
│ │ │ +
float airy_bif(float __x)
Definition specfun.h:1254
│ │ │ +
__gnu_cxx::__promote_2< _Tp, _Tpp >::__type ellint_1(_Tp __k, _Tpp __phi)
Definition specfun.h:729
│ │ │ +
long double sph_legendrel(unsigned int __l, unsigned int __m, long double __theta)
Definition specfun.h:1128
│ │ │ +
float ellint_1f(float __k, float __phi)
Definition specfun.h:696
│ │ │ +
__gnu_cxx::__promote_2< _Tpnu, _Tp >::__type cyl_neumann(_Tpnu __nu, _Tp __x)
Definition specfun.h:681
│ │ │ +
float assoc_legendref(unsigned int __l, unsigned int __m, float __x)
Definition specfun.h:267
│ │ │ +
long double sph_neumannl(unsigned int __n, long double __x)
Definition specfun.h:1174
│ │ │ +
__gnu_cxx::__promote_4< _Tpa, _Tpb, _Tpc, _Tp >::__type hyperg(_Tpa __a, _Tpb __b, _Tpc __c, _Tp __x)
Definition specfun.h:1376
│ │ │ +
long double comp_ellint_2l(long double __k)
Definition specfun.h:416
│ │ │ +
__gnu_cxx::__promote< _Tp >::__type airy_bi(_Tp __x)
Definition specfun.h:1277
│ │ │ +
__gnu_cxx::__promote< _Tp >::__type comp_ellint_2(_Tp __k)
Definition specfun.h:438
│ │ │ +
float sph_besself(unsigned int __n, float __x)
Definition specfun.h:1073
│ │ │ +
long double assoc_legendrel(unsigned int __l, unsigned int __m, long double __x)
Definition specfun.h:276
│ │ │ +
__gnu_cxx::__promote< _Tp >::__type legendre(unsigned int __l, _Tp __x)
Definition specfun.h:1007
│ │ │ +
float expintf(float __x)
Definition specfun.h:844
│ │ │ +
long double airy_bil(long double __x)
Definition specfun.h:1265
│ │ │ +
float ellint_2f(float __k, float __phi)
Return the incomplete elliptic integral of the second kind for float argument.
Definition specfun.h:744
│ │ │ +
long double ellint_2l(long double __k, long double __phi)
Return the incomplete elliptic integral of the second kind .
Definition specfun.h:754
│ │ │ +
float cyl_neumannf(float __nu, float __x)
Definition specfun.h:648
│ │ │ +
__gnu_cxx::__promote_2< _Tpa, _Tpb >::__type beta(_Tpa __a, _Tpb __b)
Definition specfun.h:343
│ │ │ +
long double comp_ellint_1l(long double __k)
Definition specfun.h:368
│ │ │ +
float comp_ellint_3f(float __k, float __nu)
Return the complete elliptic integral of the third kind for float modulus k.
Definition specfun.h:453
│ │ │ +
float sph_neumannf(unsigned int __n, float __x)
Definition specfun.h:1164
│ │ │ +
__gnu_cxx::__promote< _Tp >::__type expint(_Tp __x)
Definition specfun.h:870
│ │ │ +
long double ellint_1l(long double __k, long double __phi)
Definition specfun.h:706
│ │ │ +
float comp_ellint_1f(float __k)
Definition specfun.h:358
│ │ │ +
long double airy_ail(long double __x)
Definition specfun.h:1230
│ │ │ +
long double betal(long double __a, long double __b)
Definition specfun.h:322
│ │ │ +
__gnu_cxx::__promote_3< _Tpa, _Tpc, _Tp >::__type conf_hyperg(_Tpa __a, _Tpc __c, _Tp __x)
Definition specfun.h:1327
│ │ │ +
float hermitef(unsigned int __n, float __x)
Definition specfun.h:885
│ │ │ +
__gnu_cxx::__promote< _Tp >::__type riemann_zeta(_Tp __s)
Definition specfun.h:1058
│ │ │ +
long double hypergl(long double __a, long double __b, long double __c, long double __x)
Definition specfun.h:1354
│ │ │ +
long double ellint_3l(long double __k, long double __nu, long double __phi)
Return the incomplete elliptic integral of the third kind .
Definition specfun.h:802
│ │ │ +
float sph_legendref(unsigned int __l, unsigned int __m, float __theta)
Definition specfun.h:1117
│ │ │ +
__gnu_cxx::__promote< _Tp >::__type sph_neumann(unsigned int __n, _Tp __x)
Definition specfun.h:1193
│ │ │ +
float cyl_bessel_if(float __nu, float __x)
Definition specfun.h:504
│ │ │ +
long double laguerrel(unsigned int __n, long double __x)
Definition specfun.h:943
│ │ │ +
long double cyl_bessel_il(long double __nu, long double __x)
Definition specfun.h:514
│ │ │ +
__gnu_cxx::__promote< _Tp >::__type assoc_laguerre(unsigned int __n, unsigned int __m, _Tp __x)
Definition specfun.h:252
│ │ │ +
float conf_hypergf(float __a, float __c, float __x)
Definition specfun.h:1295
│ │ │ +
__gnu_cxx::__promote_2< _Tp, _Tpn >::__type comp_ellint_3(_Tp __k, _Tpn __nu)
Definition specfun.h:489
│ │ │ +
__gnu_cxx::__promote< _Tp >::__type sph_legendre(unsigned int __l, unsigned int __m, _Tp __theta)
Definition specfun.h:1149
│ │ │ +
long double cyl_bessel_kl(long double __nu, long double __x)
Definition specfun.h:606
│ │ │ +
float hypergf(float __a, float __b, float __c, float __x)
Definition specfun.h:1343
│ │ │ +
__gnu_cxx::__promote< _Tp >::__type airy_ai(_Tp __x)
Definition specfun.h:1242
│ │ │ +
long double assoc_laguerrel(unsigned int __n, unsigned int __m, long double __x)
Definition specfun.h:216
│ │ │ +
__gnu_cxx::__promote< _Tp >::__type hermite(unsigned int __n, _Tp __x)
Definition specfun.h:918
│ │ │ +
__gnu_cxx::__promote_2< _Tpnu, _Tp >::__type cyl_bessel_j(_Tpnu __nu, _Tp __x)
Definition specfun.h:581
│ │ │ +
float laguerref(unsigned int __n, float __x)
Definition specfun.h:933
│ │ │ +
long double cyl_bessel_jl(long double __nu, long double __x)
Definition specfun.h:560
│ │ │ +
__gnu_cxx::__promote< _Tp >::__type comp_ellint_1(_Tp __k)
Definition specfun.h:391
│ │ │ +
__gnu_cxx::__promote_2< _Tp, _Tpp >::__type ellint_2(_Tp __k, _Tpp __phi)
Definition specfun.h:777
│ │ │ +
__gnu_cxx::__promote< _Tp >::__type laguerre(unsigned int __n, _Tp __x)
Definition specfun.h:962
│ │ │ +
float legendref(unsigned int __l, float __x)
Definition specfun.h:977
│ │ │ +
__gnu_cxx::__promote_2< _Tpnu, _Tp >::__type cyl_bessel_i(_Tpnu __nu, _Tp __x)
Definition specfun.h:535
│ │ │ +
float airy_aif(float __x)
Definition specfun.h:1219
│ │ │ +
__gnu_cxx::__promote< _Tp >::__type assoc_legendre(unsigned int __l, unsigned int __m, _Tp __x)
Definition specfun.h:298
│ │ │ +
float assoc_laguerref(unsigned int __n, unsigned int __m, float __x)
Definition specfun.h:206
│ │ │ +
long double cyl_neumannl(long double __nu, long double __x)
Definition specfun.h:658
│ │ │ +
float riemann_zetaf(float __s)
Definition specfun.h:1022
│ │ │
ISO C++ entities toplevel namespace is std.
│ │ │ +
GNU extensions for public use.
│ │ │ + │ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,13 +1,13 @@ │ │ │ │ libstdc++ │ │ │ │ -valarray_before.h │ │ │ │ +specfun.h │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -1// The template and inlines for the -*- C++ -*- internal _Meta class. │ │ │ │ +1// Mathematical Special Functions for -*- C++ -*- │ │ │ │ 2 │ │ │ │ -3// Copyright (C) 1997-2022 Free Software Foundation, Inc. │ │ │ │ +3// Copyright (C) 2006-2022 Free Software Foundation, Inc. │ │ │ │ 4// │ │ │ │ 5// This file is part of the GNU ISO C++ Library. This library is free │ │ │ │ 6// software; you can redistribute it and/or modify it under the │ │ │ │ 7// terms of the GNU General Public License as published by the │ │ │ │ 8// Free Software Foundation; either version 3, or (at your option) │ │ │ │ 9// any later version. │ │ │ │ 10 │ │ │ │ @@ -21,796 +21,1652 @@ │ │ │ │ 18// 3.1, as published by the Free Software Foundation. │ │ │ │ 19 │ │ │ │ 20// You should have received a copy of the GNU General Public License and │ │ │ │ 21// a copy of the GCC Runtime Library Exception along with this program; │ │ │ │ 22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see │ │ │ │ 23// . │ │ │ │ 24 │ │ │ │ -25/** @file bits/valarray_before.h │ │ │ │ +25/** @file bits/specfun.h │ │ │ │ 26 * This is an internal header file, included by other library headers. │ │ │ │ -27 * Do not attempt to use it directly. @headername{valarray} │ │ │ │ +27 * Do not attempt to use it directly. @headername{cmath} │ │ │ │ 28 */ │ │ │ │ 29 │ │ │ │ -30// Written by Gabriel Dos Reis │ │ │ │ -31 │ │ │ │ -32#ifndef _VALARRAY_BEFORE_H │ │ │ │ -33#define _VALARRAY_BEFORE_H 1 │ │ │ │ +30#ifndef _GLIBCXX_BITS_SPECFUN_H │ │ │ │ +31#define _GLIBCXX_BITS_SPECFUN_H 1 │ │ │ │ +32 │ │ │ │ +33#pragma GCC visibility push(default) │ │ │ │ 34 │ │ │ │ -35#pragma GCC system_header │ │ │ │ +35#include <_b_i_t_s_/_c_+_+_c_o_n_f_i_g_._h> │ │ │ │ 36 │ │ │ │ -37#include <_b_i_t_s_/_s_l_i_c_e___a_r_r_a_y_._h> │ │ │ │ +37#define __STDCPP_MATH_SPEC_FUNCS__ 201003L │ │ │ │ 38 │ │ │ │ -39namespace _s_t_d _GLIBCXX_VISIBILITY(default) │ │ │ │ -40{ │ │ │ │ -41_GLIBCXX_BEGIN_NAMESPACE_VERSION │ │ │ │ -42 │ │ │ │ -43 // │ │ │ │ -44 // Implementing a loosened valarray return value is tricky. │ │ │ │ -45 // First we need to meet 26.3.1/3: we should not add more than │ │ │ │ -46 // two levels of template nesting. Therefore we resort to template │ │ │ │ -47 // template to "flatten" loosened return value types. │ │ │ │ -48 // At some point we use partial specialization to remove one level │ │ │ │ -49 // template nesting due to _Expr<> │ │ │ │ -50 // │ │ │ │ -51 │ │ │ │ -52 // This class is NOT defined. It doesn't need to. │ │ │ │ -53 template class _Constant; │ │ │ │ -54 │ │ │ │ -55 // Implementations of unary functions applied to valarray<>s. │ │ │ │ -56 // I use hard-coded object functions here instead of a generic │ │ │ │ -57 // approach like pointers to function: │ │ │ │ -58 // 1) correctness: some functions take references, others values. │ │ │ │ -59 // we can't deduce the correct type afterwards. │ │ │ │ -60 // 2) efficiency -- object functions can be easily inlined │ │ │ │ -61 // 3) be Koenig-lookup-friendly │ │ │ │ -62 │ │ │ │ -63 struct _Abs │ │ │ │ -64 { │ │ │ │ -65 template │ │ │ │ -66 _Tp operator()(const _Tp& __t) const │ │ │ │ -67 { return _a_b_s(__t); } │ │ │ │ -68 }; │ │ │ │ -69 │ │ │ │ -70 struct _Cos │ │ │ │ -71 { │ │ │ │ -72 template │ │ │ │ -73 _Tp operator()(const _Tp& __t) const │ │ │ │ -74 { return _c_o_s(__t); } │ │ │ │ -75 }; │ │ │ │ -76 │ │ │ │ -77 struct _Acos │ │ │ │ -78 { │ │ │ │ -79 template │ │ │ │ -80 _Tp operator()(const _Tp& __t) const │ │ │ │ -81 { return acos(__t); } │ │ │ │ -82 }; │ │ │ │ -83 │ │ │ │ -84 struct _Cosh │ │ │ │ -85 { │ │ │ │ -86 template │ │ │ │ -87 _Tp operator()(const _Tp& __t) const │ │ │ │ -88 { return _c_o_s_h(__t); } │ │ │ │ -89 }; │ │ │ │ -90 │ │ │ │ -91 struct _Sin │ │ │ │ -92 { │ │ │ │ -93 template │ │ │ │ -94 _Tp operator()(const _Tp& __t) const │ │ │ │ -95 { return _s_i_n(__t); } │ │ │ │ -96 }; │ │ │ │ -97 │ │ │ │ -98 struct _Asin │ │ │ │ -99 { │ │ │ │ -100 template │ │ │ │ -101 _Tp operator()(const _Tp& __t) const │ │ │ │ -102 { return asin(__t); } │ │ │ │ -103 }; │ │ │ │ -104 │ │ │ │ -105 struct _Sinh │ │ │ │ -106 { │ │ │ │ -107 template │ │ │ │ -108 _Tp operator()(const _Tp& __t) const │ │ │ │ -109 { return _s_i_n_h(__t); } │ │ │ │ -110 }; │ │ │ │ -111 │ │ │ │ -112 struct _Tan │ │ │ │ -113 { │ │ │ │ -114 template │ │ │ │ -115 _Tp operator()(const _Tp& __t) const │ │ │ │ -116 { return _t_a_n(__t); } │ │ │ │ -117 }; │ │ │ │ -118 │ │ │ │ -119 struct _Atan │ │ │ │ -120 { │ │ │ │ -121 template │ │ │ │ -122 _Tp operator()(const _Tp& __t) const │ │ │ │ -123 { return atan(__t); } │ │ │ │ -124 }; │ │ │ │ -125 │ │ │ │ -126 struct _Tanh │ │ │ │ -127 { │ │ │ │ -128 template │ │ │ │ -129 _Tp operator()(const _Tp& __t) const │ │ │ │ -130 { return _t_a_n_h(__t); } │ │ │ │ -131 }; │ │ │ │ -132 │ │ │ │ -133 struct _Exp │ │ │ │ -134 { │ │ │ │ -135 template │ │ │ │ -136 _Tp operator()(const _Tp& __t) const │ │ │ │ -137 { return _e_x_p(__t); } │ │ │ │ -138 }; │ │ │ │ -139 │ │ │ │ -140 struct _Log │ │ │ │ -141 { │ │ │ │ -142 template │ │ │ │ -143 _Tp operator()(const _Tp& __t) const │ │ │ │ -144 { return _l_o_g(__t); } │ │ │ │ -145 }; │ │ │ │ -146 │ │ │ │ -147 struct _Log10 │ │ │ │ -148 { │ │ │ │ -149 template │ │ │ │ -150 _Tp operator()(const _Tp& __t) const │ │ │ │ -151 { return _l_o_g_1_0(__t); } │ │ │ │ -152 }; │ │ │ │ -153 │ │ │ │ -154 struct _Sqrt │ │ │ │ -155 { │ │ │ │ -156 template │ │ │ │ -157 _Tp operator()(const _Tp& __t) const │ │ │ │ -158 { return _s_q_r_t(__t); } │ │ │ │ -159 }; │ │ │ │ -160 │ │ │ │ -161 // In the past, we used to tailor operator applications semantics │ │ │ │ -162 // to the specialization of standard function objects (i.e. plus<>, etc.) │ │ │ │ -163 // That is incorrect. Therefore we provide our own surrogates. │ │ │ │ -164 │ │ │ │ -165 struct __unary_plus │ │ │ │ -166 { │ │ │ │ -167 template │ │ │ │ -168 _Tp operator()(const _Tp& __t) const │ │ │ │ -169 { return +__t; } │ │ │ │ -170 }; │ │ │ │ -171 │ │ │ │ -172 struct __negate │ │ │ │ -173 { │ │ │ │ -174 template │ │ │ │ -175 _Tp operator()(const _Tp& __t) const │ │ │ │ -176 { return -__t; } │ │ │ │ -177 }; │ │ │ │ -178 │ │ │ │ -179 struct __bitwise_not │ │ │ │ -180 { │ │ │ │ -181 template │ │ │ │ -182 _Tp operator()(const _Tp& __t) const │ │ │ │ -183 { return ~__t; } │ │ │ │ -184 }; │ │ │ │ -185 │ │ │ │ -186 struct __plus │ │ │ │ -187 { │ │ │ │ -188 template │ │ │ │ -189 _Tp operator()(const _Tp& __x, const _Tp& __y) const │ │ │ │ -190 { return __x + __y; } │ │ │ │ -191 }; │ │ │ │ -192 │ │ │ │ -193 struct __minus │ │ │ │ -194 { │ │ │ │ -195 template │ │ │ │ -196 _Tp operator()(const _Tp& __x, const _Tp& __y) const │ │ │ │ -197 { return __x - __y; } │ │ │ │ -198 }; │ │ │ │ -199 │ │ │ │ -200 struct __multiplies │ │ │ │ -201 { │ │ │ │ -202 template │ │ │ │ -203 _Tp operator()(const _Tp& __x, const _Tp& __y) const │ │ │ │ -204 { return __x * __y; } │ │ │ │ -205 }; │ │ │ │ -206 │ │ │ │ -207 struct __divides │ │ │ │ -208 { │ │ │ │ -209 template │ │ │ │ -210 _Tp operator()(const _Tp& __x, const _Tp& __y) const │ │ │ │ -211 { return __x / __y; } │ │ │ │ -212 }; │ │ │ │ -213 │ │ │ │ -214 struct __modulus │ │ │ │ -215 { │ │ │ │ -216 template │ │ │ │ -217 _Tp operator()(const _Tp& __x, const _Tp& __y) const │ │ │ │ -218 { return __x % __y; } │ │ │ │ -219 }; │ │ │ │ -220 │ │ │ │ -221 struct __bitwise_xor │ │ │ │ -222 { │ │ │ │ -223 template │ │ │ │ -224 _Tp operator()(const _Tp& __x, const _Tp& __y) const │ │ │ │ -225 { return __x ^ __y; } │ │ │ │ -226 }; │ │ │ │ -227 │ │ │ │ -228 struct __bitwise_and │ │ │ │ -229 { │ │ │ │ -230 template │ │ │ │ -231 _Tp operator()(const _Tp& __x, const _Tp& __y) const │ │ │ │ -232 { return __x & __y; } │ │ │ │ -233 }; │ │ │ │ -234 │ │ │ │ -235 struct __bitwise_or │ │ │ │ -236 { │ │ │ │ -237 template │ │ │ │ -238 _Tp operator()(const _Tp& __x, const _Tp& __y) const │ │ │ │ -239 { return __x | __y; } │ │ │ │ -240 }; │ │ │ │ -241 │ │ │ │ -242 struct __shift_left │ │ │ │ -243 { │ │ │ │ -244 template │ │ │ │ -245 _Tp operator()(const _Tp& __x, const _Tp& __y) const │ │ │ │ -246 { return __x << __y; } │ │ │ │ -247 }; │ │ │ │ -248 │ │ │ │ -249 struct __shift_right │ │ │ │ -250 { │ │ │ │ -251 template │ │ │ │ -252 _Tp operator()(const _Tp& __x, const _Tp& __y) const │ │ │ │ -253 { return __x >> __y; } │ │ │ │ -254 }; │ │ │ │ -255 │ │ │ │ -256 struct __logical_and │ │ │ │ -257 { │ │ │ │ -258 template │ │ │ │ -259 bool operator()(const _Tp& __x, const _Tp& __y) const │ │ │ │ -260 { return __x && __y; } │ │ │ │ -261 }; │ │ │ │ -262 │ │ │ │ -263 struct __logical_or │ │ │ │ -264 { │ │ │ │ -265 template │ │ │ │ -266 bool operator()(const _Tp& __x, const _Tp& __y) const │ │ │ │ -267 { return __x || __y; } │ │ │ │ -268 }; │ │ │ │ +39#define __cpp_lib_math_special_functions 201603L │ │ │ │ +40 │ │ │ │ +41#if __cplusplus <= 201403L && __STDCPP_WANT_MATH_SPEC_FUNCS__ == 0 │ │ │ │ +42# error include and define __STDCPP_WANT_MATH_SPEC_FUNCS__ │ │ │ │ +43#endif │ │ │ │ +44 │ │ │ │ +45#include <_b_i_t_s_/_s_t_l___a_l_g_o_b_a_s_e_._h> │ │ │ │ +46#include <_l_i_m_i_t_s> │ │ │ │ +47#include <_t_y_p_e___t_r_a_i_t_s> │ │ │ │ +48 │ │ │ │ +49#include │ │ │ │ +50#include │ │ │ │ +51#include │ │ │ │ +52#include │ │ │ │ +53#include │ │ │ │ +54#include │ │ │ │ +55#include │ │ │ │ +56#include │ │ │ │ +57#include │ │ │ │ +58#include │ │ │ │ +59#include │ │ │ │ +60 │ │ │ │ +61namespace _s_t_d _GLIBCXX_VISIBILITY(default) │ │ │ │ +62{ │ │ │ │ +63_GLIBCXX_BEGIN_NAMESPACE_VERSION │ │ │ │ +64 │ │ │ │ +65 /** │ │ │ │ +66 * @defgroup mathsf Mathematical Special Functions │ │ │ │ +67 * @ingroup numerics │ │ │ │ +68 * │ │ │ │ +69 * @section mathsf_desc Mathematical Special Functions │ │ │ │ +70 * │ │ │ │ +71 * A collection of advanced mathematical special functions, │ │ │ │ +72 * defined by ISO/IEC IS 29124 and then added to ISO C++ 2017. │ │ │ │ +73 * │ │ │ │ +74 * │ │ │ │ +75 * @subsection mathsf_intro Introduction and History │ │ │ │ +76 * The first significant library upgrade on the road to C++2011, │ │ │ │ +77 * │ │ │ │ +78 * TR1, included a set of 23 mathematical functions that significantly │ │ │ │ +79 * extended the standard transcendental functions inherited from C and │ │ │ │ +declared │ │ │ │ +80 * in @. │ │ │ │ +81 * │ │ │ │ +82 * Although most components from TR1 were eventually adopted for C++11 these │ │ │ │ +83 * math functions were left behind out of concern for implementability. │ │ │ │ +84 * The math functions were published as a separate international standard │ │ │ │ +85 * │ │ │ │ +86 * IS 29124 - Extensions to the C++ Library to Support Mathematical Special │ │ │ │ +87 * Functions. │ │ │ │ +88 * │ │ │ │ +89 * For C++17 these functions were incorporated into the main standard. │ │ │ │ +90 * │ │ │ │ +91 * @subsection mathsf_contents Contents │ │ │ │ +92 * The following functions are implemented in namespace @c std: │ │ │ │ +93 * - @ref assoc_laguerre "assoc_laguerre - Associated Laguerre functions" │ │ │ │ +94 * - @ref assoc_legendre "assoc_legendre - Associated Legendre functions" │ │ │ │ +95 * - @ref beta "beta - Beta functions" │ │ │ │ +96 * - @ref comp_ellint_1 "comp_ellint_1 - Complete elliptic functions of the │ │ │ │ +first kind" │ │ │ │ +97 * - @ref comp_ellint_2 "comp_ellint_2 - Complete elliptic functions of the │ │ │ │ +second kind" │ │ │ │ +98 * - @ref comp_ellint_3 "comp_ellint_3 - Complete elliptic functions of the │ │ │ │ +third kind" │ │ │ │ +99 * - @ref cyl_bessel_i "cyl_bessel_i - Regular modified cylindrical Bessel │ │ │ │ +functions" │ │ │ │ +100 * - @ref cyl_bessel_j "cyl_bessel_j - Cylindrical Bessel functions of the │ │ │ │ +first kind" │ │ │ │ +101 * - @ref cyl_bessel_k "cyl_bessel_k - Irregular modified cylindrical Bessel │ │ │ │ +functions" │ │ │ │ +102 * - @ref cyl_neumann "cyl_neumann - Cylindrical Neumann functions or │ │ │ │ +Cylindrical Bessel functions of the second kind" │ │ │ │ +103 * - @ref ellint_1 "ellint_1 - Incomplete elliptic functions of the first │ │ │ │ +kind" │ │ │ │ +104 * - @ref ellint_2 "ellint_2 - Incomplete elliptic functions of the second │ │ │ │ +kind" │ │ │ │ +105 * - @ref ellint_3 "ellint_3 - Incomplete elliptic functions of the third │ │ │ │ +kind" │ │ │ │ +106 * - @ref expint "expint - The exponential integral" │ │ │ │ +107 * - @ref hermite "hermite - Hermite polynomials" │ │ │ │ +108 * - @ref laguerre "laguerre - Laguerre functions" │ │ │ │ +109 * - @ref legendre "legendre - Legendre polynomials" │ │ │ │ +110 * - @ref riemann_zeta "riemann_zeta - The Riemann zeta function" │ │ │ │ +111 * - @ref sph_bessel "sph_bessel - Spherical Bessel functions" │ │ │ │ +112 * - @ref sph_legendre "sph_legendre - Spherical Legendre functions" │ │ │ │ +113 * - @ref sph_neumann "sph_neumann - Spherical Neumann functions" │ │ │ │ +114 * │ │ │ │ +115 * The hypergeometric functions were stricken from the TR29124 and C++17 │ │ │ │ +116 * versions of this math library because of implementation concerns. │ │ │ │ +117 * However, since they were in the TR1 version and since they are popular │ │ │ │ +118 * we kept them as an extension in namespace @c __gnu_cxx: │ │ │ │ +119 * - @ref __gnu_cxx::conf_hyperg "conf_hyperg - Confluent hypergeometric │ │ │ │ +functions" │ │ │ │ +120 * - @ref __gnu_cxx::hyperg "hyperg - Hypergeometric functions" │ │ │ │ +121 * │ │ │ │ +122 * │ │ │ │ +123 * │ │ │ │ +124 * @subsection mathsf_promotion Argument Promotion │ │ │ │ +125 * The arguments suppled to the non-suffixed functions will be promoted │ │ │ │ +126 * according to the following rules: │ │ │ │ +127 * 1. If any argument intended to be floating point is given an integral │ │ │ │ +value │ │ │ │ +128 * That integral value is promoted to double. │ │ │ │ +129 * 2. All floating point arguments are promoted up to the largest floating │ │ │ │ +130 * point precision among them. │ │ │ │ +131 * │ │ │ │ +132 * @subsection mathsf_NaN NaN Arguments │ │ │ │ +133 * If any of the floating point arguments supplied to these functions is │ │ │ │ +134 * invalid or NaN (std::numeric_limits::quiet_NaN), │ │ │ │ +135 * the value NaN is returned. │ │ │ │ +136 * │ │ │ │ +137 * @subsection mathsf_impl Implementation │ │ │ │ +138 * │ │ │ │ +139 * We strive to implement the underlying math with type generic algorithms │ │ │ │ +140 * to the greatest extent possible. In practice, the functions are thin │ │ │ │ +141 * wrappers that dispatch to function templates. Type dependence is │ │ │ │ +142 * controlled with std::numeric_limits and functions thereof. │ │ │ │ +143 * │ │ │ │ +144 * We don't promote @c float to @c double or @c double to long double │ │ │ │ +145 * reflexively. The goal is for @c float functions to operate more quickly, │ │ │ │ +146 * at the cost of @c float accuracy and possibly a smaller domain of │ │ │ │ +validity. │ │ │ │ +147 * Similaryly, long double should give you more dynamic range │ │ │ │ +148 * and slightly more pecision than @c double on many systems. │ │ │ │ +149 * │ │ │ │ +150 * @subsection mathsf_testing Testing │ │ │ │ +151 * │ │ │ │ +152 * These functions have been tested against equivalent implementations │ │ │ │ +153 * from the │ │ │ │ +154 * Gnu Scientific Library, GSL and │ │ │ │ +155 * Boost │ │ │ │ +156 * and the ratio │ │ │ │ +157 * @f[ │ │ │ │ +158 * \frac{|f - f_{test}|}{|f_{test}|} │ │ │ │ +159 * @f] │ │ │ │ +160 * is generally found to be within 10-15 for 64-bit double on │ │ │ │ +161 * linux-x86_64 systems over most of the ranges of validity. │ │ │ │ +162 * │ │ │ │ +163 * @todo Provide accuracy comparisons on a per-function basis for a small │ │ │ │ +164 * number of targets. │ │ │ │ +165 * │ │ │ │ +166 * @subsection mathsf_bibliography General Bibliography │ │ │ │ +167 * │ │ │ │ +168 * @see Abramowitz and Stegun: Handbook of Mathematical Functions, │ │ │ │ +169 * with Formulas, Graphs, and Mathematical Tables │ │ │ │ +170 * Edited by Milton Abramowitz and Irene A. Stegun, │ │ │ │ +171 * National Bureau of Standards Applied Mathematics Series - 55 │ │ │ │ +172 * Issued June 1964, Tenth Printing, December 1972, with corrections │ │ │ │ +173 * Electronic versions of A&S abound including both pdf and navigable html. │ │ │ │ +174 * @see for example http://people.math.sfu.ca/~cbm/aands/ │ │ │ │ +175 * │ │ │ │ +176 * @see The old A&S has been redone as the │ │ │ │ +177 * NIST Digital Library of Mathematical Functions: http://dlmf.nist.gov/ │ │ │ │ +178 * This version is far more navigable and includes more recent work. │ │ │ │ +179 * │ │ │ │ +180 * @see An Atlas of Functions: with Equator, the Atlas Function Calculator │ │ │ │ +181 * 2nd Edition, by Oldham, Keith B., Myland, Jan, Spanier, Jerome │ │ │ │ +182 * │ │ │ │ +183 * @see Asymptotics and Special Functions by Frank W. J. Olver, │ │ │ │ +184 * Academic Press, 1974 │ │ │ │ +185 * │ │ │ │ +186 * @see Numerical Recipes in C, The Art of Scientific Computing, │ │ │ │ +187 * by William H. Press, Second Ed., Saul A. Teukolsky, │ │ │ │ +188 * William T. Vetterling, and Brian P. Flannery, │ │ │ │ +189 * Cambridge University Press, 1992 │ │ │ │ +190 * │ │ │ │ +191 * @see The Special Functions and Their Approximations: Volumes 1 and 2, │ │ │ │ +192 * by Yudell L. Luke, Academic Press, 1969 │ │ │ │ +193 * │ │ │ │ +194 * @{ │ │ │ │ +195 */ │ │ │ │ +196 │ │ │ │ +197 // Associated Laguerre polynomials │ │ │ │ +198 │ │ │ │ +199 /** │ │ │ │ +200 * Return the associated Laguerre polynomial of order @c n, │ │ │ │ +201 * degree @c m: @f$ L_n^m(x) @f$ for @c float argument. │ │ │ │ +202 * │ │ │ │ +203 * @see assoc_laguerre for more details. │ │ │ │ +204 */ │ │ │ │ +205 inline float │ │ │ │ +_2_0_6 _a_s_s_o_c___l_a_g_u_e_r_r_e_f(unsigned int __n, unsigned int _____m, float __x) │ │ │ │ +207 { return __detail::__assoc_laguerre(__n, _____m, __x); } │ │ │ │ +208 │ │ │ │ +209 /** │ │ │ │ +210 * Return the associated Laguerre polynomial of order @c n, │ │ │ │ +211 * degree @c m: @f$ L_n^m(x) @f$. │ │ │ │ +212 * │ │ │ │ +213 * @see assoc_laguerre for more details. │ │ │ │ +214 */ │ │ │ │ +215 inline long double │ │ │ │ +_2_1_6 _a_s_s_o_c___l_a_g_u_e_r_r_e_l(unsigned int __n, unsigned int _____m, long double __x) │ │ │ │ +217 { return __detail::__assoc_laguerre(__n, _____m, __x); } │ │ │ │ +218 │ │ │ │ +219 /** │ │ │ │ +220 * Return the associated Laguerre polynomial of nonnegative order @c n, │ │ │ │ +221 * nonnegative degree @c m and real argument @c x: @f$ L_n^m(x) @f$. │ │ │ │ +222 * │ │ │ │ +223 * The associated Laguerre function of real degree @f$ \alpha @f$, │ │ │ │ +224 * @f$ L_n^\alpha(x) @f$, is defined by │ │ │ │ +225 * @f[ │ │ │ │ +226 * L_n^\alpha(x) = \frac{(\alpha + 1)_n}{n!} │ │ │ │ +227 * {}_1F_1(-n; \alpha + 1; x) │ │ │ │ +228 * @f] │ │ │ │ +229 * where @f$ (\alpha)_n @f$ is the Pochhammer symbol and │ │ │ │ +230 * @f$ {}_1F_1(a; c; x) @f$ is the confluent hypergeometric function. │ │ │ │ +231 * │ │ │ │ +232 * The associated Laguerre polynomial is defined for integral │ │ │ │ +233 * degree @f$ \alpha = m @f$ by: │ │ │ │ +234 * @f[ │ │ │ │ +235 * L_n^m(x) = (-1)^m \frac{d^m}{dx^m} L_{n + m}(x) │ │ │ │ +236 * @f] │ │ │ │ +237 * where the Laguerre polynomial is defined by: │ │ │ │ +238 * @f[ │ │ │ │ +239 * L_n(x) = \frac{e^x}{n!} \frac{d^n}{dx^n} (x^ne^{-x}) │ │ │ │ +240 * @f] │ │ │ │ +241 * and @f$ x >= 0 @f$. │ │ │ │ +242 * @see laguerre for details of the Laguerre function of degree @c n │ │ │ │ +243 * │ │ │ │ +244 * @tparam _Tp The floating-point type of the argument @c __x. │ │ │ │ +245 * @param __n The order of the Laguerre function, __n >= 0. │ │ │ │ +246 * @param __m The degree of the Laguerre function, __m >= 0. │ │ │ │ +247 * @param __x The argument of the Laguerre function, __x >= 0. │ │ │ │ +248 * @throw std::domain_error if __x < 0. │ │ │ │ +249 */ │ │ │ │ +250 template │ │ │ │ +251 inline typename __gnu_cxx::__promote<_Tp>::__type │ │ │ │ +_2_5_2 _a_s_s_o_c___l_a_g_u_e_r_r_e(unsigned int __n, unsigned int _____m, _Tp __x) │ │ │ │ +253 { │ │ │ │ +254 typedef typename __gnu_cxx::__promote<_Tp>::__type __type; │ │ │ │ +255 return __detail::__assoc_laguerre<__type>(__n, _____m, __x); │ │ │ │ +256 } │ │ │ │ +257 │ │ │ │ +258 // Associated Legendre functions │ │ │ │ +259 │ │ │ │ +260 /** │ │ │ │ +261 * Return the associated Legendre function of degree @c l and order @c m │ │ │ │ +262 * for @c float argument. │ │ │ │ +263 * │ │ │ │ +264 * @see assoc_legendre for more details. │ │ │ │ +265 */ │ │ │ │ +266 inline float │ │ │ │ +_2_6_7 _a_s_s_o_c___l_e_g_e_n_d_r_e_f(unsigned int _____l, unsigned int _____m, float __x) │ │ │ │ +268 { return __detail::__assoc_legendre_p(_____l, _____m, __x); } │ │ │ │ 269 │ │ │ │ -270 struct __logical_not │ │ │ │ -271 { │ │ │ │ -272 template │ │ │ │ -273 bool operator()(const _Tp& __x) const │ │ │ │ -274 { return !__x; } │ │ │ │ -275 }; │ │ │ │ -276 │ │ │ │ -277 struct __equal_to │ │ │ │ -278 { │ │ │ │ -279 template │ │ │ │ -280 bool operator()(const _Tp& __x, const _Tp& __y) const │ │ │ │ -281 { return __x == __y; } │ │ │ │ -282 }; │ │ │ │ -283 │ │ │ │ -284 struct __not_equal_to │ │ │ │ -285 { │ │ │ │ -286 template │ │ │ │ -287 bool operator()(const _Tp& __x, const _Tp& __y) const │ │ │ │ -288 { return __x != __y; } │ │ │ │ -289 }; │ │ │ │ -290 │ │ │ │ -291 struct __less │ │ │ │ -292 { │ │ │ │ -293 template │ │ │ │ -294 bool operator()(const _Tp& __x, const _Tp& __y) const │ │ │ │ -295 { return __x < __y; } │ │ │ │ -296 }; │ │ │ │ -297 │ │ │ │ -298 struct __greater │ │ │ │ +270 /** │ │ │ │ +271 * Return the associated Legendre function of degree @c l and order @c m. │ │ │ │ +272 * │ │ │ │ +273 * @see assoc_legendre for more details. │ │ │ │ +274 */ │ │ │ │ +275 inline long double │ │ │ │ +_2_7_6 _a_s_s_o_c___l_e_g_e_n_d_r_e_l(unsigned int _____l, unsigned int _____m, long double __x) │ │ │ │ +277 { return __detail::__assoc_legendre_p(_____l, _____m, __x); } │ │ │ │ +278 │ │ │ │ +279 │ │ │ │ +280 /** │ │ │ │ +281 * Return the associated Legendre function of degree @c l and order @c m. │ │ │ │ +282 * │ │ │ │ +283 * The associated Legendre function is derived from the Legendre function │ │ │ │ +284 * @f$ P_l(x) @f$ by the Rodrigues formula: │ │ │ │ +285 * @f[ │ │ │ │ +286 * P_l^m(x) = (1 - x^2)^{m/2}\frac{d^m}{dx^m}P_l(x) │ │ │ │ +287 * @f] │ │ │ │ +288 * @see legendre for details of the Legendre function of degree @c l │ │ │ │ +289 * │ │ │ │ +290 * @tparam _Tp The floating-point type of the argument @c __x. │ │ │ │ +291 * @param __l The degree __l >= 0. │ │ │ │ +292 * @param __m The order __m <= l. │ │ │ │ +293 * @param __x The argument, abs(__x) <= 1. │ │ │ │ +294 * @throw std::domain_error if abs(__x) > 1. │ │ │ │ +295 */ │ │ │ │ +296 template │ │ │ │ +297 inline typename __gnu_cxx::__promote<_Tp>::__type │ │ │ │ +_2_9_8 _a_s_s_o_c___l_e_g_e_n_d_r_e(unsigned int _____l, unsigned int _____m, _Tp __x) │ │ │ │ 299 { │ │ │ │ -300 template │ │ │ │ -301 bool operator()(const _Tp& __x, const _Tp& __y) const │ │ │ │ -302 { return __x > __y; } │ │ │ │ -303 }; │ │ │ │ -304 │ │ │ │ -305 struct __less_equal │ │ │ │ -306 { │ │ │ │ -307 template │ │ │ │ -308 bool operator()(const _Tp& __x, const _Tp& __y) const │ │ │ │ -309 { return __x <= __y; } │ │ │ │ -310 }; │ │ │ │ -311 │ │ │ │ -312 struct __greater_equal │ │ │ │ -313 { │ │ │ │ -314 template │ │ │ │ -315 bool operator()(const _Tp& __x, const _Tp& __y) const │ │ │ │ -316 { return __x >= __y; } │ │ │ │ -317 }; │ │ │ │ -318 │ │ │ │ -319 // The few binary functions we miss. │ │ │ │ -320 struct _Atan2 │ │ │ │ -321 { │ │ │ │ -322 template │ │ │ │ -323 _Tp operator()(const _Tp& __x, const _Tp& __y) const │ │ │ │ -324 { return atan2(__x, __y); } │ │ │ │ -325 }; │ │ │ │ -326 │ │ │ │ -327 struct _Pow │ │ │ │ -328 { │ │ │ │ -329 template │ │ │ │ -330 _Tp operator()(const _Tp& __x, const _Tp& __y) const │ │ │ │ -331 { return _p_o_w(__x, __y); } │ │ │ │ -332 }; │ │ │ │ -333 │ │ │ │ -334 template │ │ │ │ -335 struct __fun_with_valarray │ │ │ │ -336 { │ │ │ │ -337 typedef _Tp result_type; │ │ │ │ -338 }; │ │ │ │ -339 │ │ │ │ -340 template │ │ │ │ -341 struct __fun_with_valarray<_Tp, false> │ │ │ │ -342 { │ │ │ │ -343 // No result type defined for invalid value types. │ │ │ │ -344 }; │ │ │ │ -345 │ │ │ │ -346 // We need these bits in order to recover the return type of │ │ │ │ -347 // some functions/operators now that we're no longer using │ │ │ │ -348 // function templates. │ │ │ │ -349 template │ │ │ │ -350 struct __fun : __fun_with_valarray<_Tp> │ │ │ │ -351 { │ │ │ │ -352 }; │ │ │ │ -353 │ │ │ │ -354 // several specializations for relational operators. │ │ │ │ -355 template │ │ │ │ -356 struct __fun<__logical_not, _Tp> │ │ │ │ -357 { │ │ │ │ -358 typedef bool result_type; │ │ │ │ -359 }; │ │ │ │ +300 typedef typename __gnu_cxx::__promote<_Tp>::__type __type; │ │ │ │ +301 return __detail::__assoc_legendre_p<__type>(_____l, _____m, __x); │ │ │ │ +302 } │ │ │ │ +303 │ │ │ │ +304 // Beta functions │ │ │ │ +305 │ │ │ │ +306 /** │ │ │ │ +307 * Return the beta function, @f$ B(a,b) @f$, for @c float parameters @c a, │ │ │ │ +@c b. │ │ │ │ +308 * │ │ │ │ +309 * @see beta for more details. │ │ │ │ +310 */ │ │ │ │ +311 inline float │ │ │ │ +_3_1_2 _b_e_t_a_f(float __a, float __b) │ │ │ │ +313 { return __detail::__beta(__a, __b); } │ │ │ │ +314 │ │ │ │ +315 /** │ │ │ │ +316 * Return the beta function, @f$B(a,b)@f$, for long double │ │ │ │ +317 * parameters @c a, @c b. │ │ │ │ +318 * │ │ │ │ +319 * @see beta for more details. │ │ │ │ +320 */ │ │ │ │ +321 inline long double │ │ │ │ +_3_2_2 _b_e_t_a_l(long double __a, long double __b) │ │ │ │ +323 { return __detail::__beta(__a, __b); } │ │ │ │ +324 │ │ │ │ +325 /** │ │ │ │ +326 * Return the beta function, @f$B(a,b)@f$, for real parameters @c a, @c b. │ │ │ │ +327 * │ │ │ │ +328 * The beta function is defined by │ │ │ │ +329 * @f[ │ │ │ │ +330 * B(a,b) = \int_0^1 t^{a - 1} (1 - t)^{b - 1} dt │ │ │ │ +331 * = \frac{\Gamma(a)\Gamma(b)}{\Gamma(a+b)} │ │ │ │ +332 * @f] │ │ │ │ +333 * where @f$ a > 0 @f$ and @f$ b > 0 @f$ │ │ │ │ +334 * │ │ │ │ +335 * @tparam _Tpa The floating-point type of the parameter @c __a. │ │ │ │ +336 * @tparam _Tpb The floating-point type of the parameter @c __b. │ │ │ │ +337 * @param __a The first argument of the beta function, __a > 0 . │ │ │ │ +338 * @param __b The second argument of the beta function, __b > 0 . │ │ │ │ +339 * @throw std::domain_error if __a < 0 or __b < 0 . │ │ │ │ +340 */ │ │ │ │ +341 template │ │ │ │ +342 inline typename __gnu_cxx::__promote_2<_Tpa, _Tpb>::__type │ │ │ │ +_3_4_3 _b_e_t_a(___T_p_a __a, ___T_p_b __b) │ │ │ │ +344 { │ │ │ │ +345 typedef typename __gnu_cxx::__promote_2<_Tpa, _Tpb>::__type __type; │ │ │ │ +346 return __detail::__beta<__type>(__a, __b); │ │ │ │ +347 } │ │ │ │ +348 │ │ │ │ +349 // Complete elliptic integrals of the first kind │ │ │ │ +350 │ │ │ │ +351 /** │ │ │ │ +352 * Return the complete elliptic integral of the first kind @f$ E(k) @f$ │ │ │ │ +353 * for @c float modulus @c k. │ │ │ │ +354 * │ │ │ │ +355 * @see comp_ellint_1 for details. │ │ │ │ +356 */ │ │ │ │ +357 inline float │ │ │ │ +_3_5_8 _c_o_m_p___e_l_l_i_n_t___1_f(float _____k) │ │ │ │ +359 { return __detail::__comp_ellint_1(_____k); } │ │ │ │ 360 │ │ │ │ -361 template │ │ │ │ -362 struct __fun<__logical_and, _Tp> │ │ │ │ -363 { │ │ │ │ -364 typedef bool result_type; │ │ │ │ -365 }; │ │ │ │ -366 │ │ │ │ -367 template │ │ │ │ -368 struct __fun<__logical_or, _Tp> │ │ │ │ -369 { │ │ │ │ -370 typedef bool result_type; │ │ │ │ -371 }; │ │ │ │ -372 │ │ │ │ -373 template │ │ │ │ -374 struct __fun<__less, _Tp> │ │ │ │ -375 { │ │ │ │ -376 typedef bool result_type; │ │ │ │ -377 }; │ │ │ │ -378 │ │ │ │ -379 template │ │ │ │ -380 struct __fun<__greater, _Tp> │ │ │ │ -381 { │ │ │ │ -382 typedef bool result_type; │ │ │ │ -383 }; │ │ │ │ -384 │ │ │ │ -385 template │ │ │ │ -386 struct __fun<__less_equal, _Tp> │ │ │ │ -387 { │ │ │ │ -388 typedef bool result_type; │ │ │ │ -389 }; │ │ │ │ -390 │ │ │ │ -391 template │ │ │ │ -392 struct __fun<__greater_equal, _Tp> │ │ │ │ -393 { │ │ │ │ -394 typedef bool result_type; │ │ │ │ -395 }; │ │ │ │ +361 /** │ │ │ │ +362 * Return the complete elliptic integral of the first kind @f$ E(k) @f$ │ │ │ │ +363 * for long double modulus @c k. │ │ │ │ +364 * │ │ │ │ +365 * @see comp_ellint_1 for details. │ │ │ │ +366 */ │ │ │ │ +367 inline long double │ │ │ │ +_3_6_8 _c_o_m_p___e_l_l_i_n_t___1_l(long double _____k) │ │ │ │ +369 { return __detail::__comp_ellint_1(_____k); } │ │ │ │ +370 │ │ │ │ +371 /** │ │ │ │ +372 * Return the complete elliptic integral of the first kind │ │ │ │ +373 * @f$ K(k) @f$ for real modulus @c k. │ │ │ │ +374 * │ │ │ │ +375 * The complete elliptic integral of the first kind is defined as │ │ │ │ +376 * @f[ │ │ │ │ +377 * K(k) = F(k,\pi/2) = \int_0^{\pi/2}\frac{d\theta} │ │ │ │ +378 * {\sqrt{1 - k^2 sin^2\theta}} │ │ │ │ +379 * @f] │ │ │ │ +380 * where @f$ F(k,\phi) @f$ is the incomplete elliptic integral of the │ │ │ │ +381 * first kind and the modulus @f$ |k| <= 1 @f$. │ │ │ │ +382 * @see ellint_1 for details of the incomplete elliptic function │ │ │ │ +383 * of the first kind. │ │ │ │ +384 * │ │ │ │ +385 * @tparam _Tp The floating-point type of the modulus @c __k. │ │ │ │ +386 * @param __k The modulus, abs(__k) <= 1 │ │ │ │ +387 * @throw std::domain_error if abs(__k) > 1 . │ │ │ │ +388 */ │ │ │ │ +389 template │ │ │ │ +390 inline typename __gnu_cxx::__promote<_Tp>::__type │ │ │ │ +_3_9_1 _c_o_m_p___e_l_l_i_n_t___1(_Tp _____k) │ │ │ │ +392 { │ │ │ │ +393 typedef typename __gnu_cxx::__promote<_Tp>::__type __type; │ │ │ │ +394 return __detail::__comp_ellint_1<__type>(_____k); │ │ │ │ +395 } │ │ │ │ 396 │ │ │ │ -397 template │ │ │ │ -398 struct __fun<__equal_to, _Tp> │ │ │ │ -399 { │ │ │ │ -400 typedef bool result_type; │ │ │ │ -401 }; │ │ │ │ -402 │ │ │ │ -403 template │ │ │ │ -404 struct __fun<__not_equal_to, _Tp> │ │ │ │ -405 { │ │ │ │ -406 typedef bool result_type; │ │ │ │ -407 }; │ │ │ │ +397 // Complete elliptic integrals of the second kind │ │ │ │ +398 │ │ │ │ +399 /** │ │ │ │ +400 * Return the complete elliptic integral of the second kind @f$ E(k) @f$ │ │ │ │ +401 * for @c float modulus @c k. │ │ │ │ +402 * │ │ │ │ +403 * @see comp_ellint_2 for details. │ │ │ │ +404 */ │ │ │ │ +405 inline float │ │ │ │ +_4_0_6 _c_o_m_p___e_l_l_i_n_t___2_f(float _____k) │ │ │ │ +407 { return __detail::__comp_ellint_2(_____k); } │ │ │ │ 408 │ │ │ │ -409namespace __detail │ │ │ │ -410{ │ │ │ │ -411 // Closure types already have reference semantics and are often short- │ │ │ │ -lived, │ │ │ │ -412 // so store them by value to avoid (some cases of) dangling references to │ │ │ │ -413 // out-of-scope temporaries. │ │ │ │ -414 template │ │ │ │ -415 struct _ValArrayRef │ │ │ │ -416 { typedef const _Tp __type; }; │ │ │ │ -417 │ │ │ │ -418 // Use real references for std::valarray objects. │ │ │ │ -419 template │ │ │ │ -420 struct _ValArrayRef< valarray<_Tp> > │ │ │ │ -421 { typedef const valarray<_Tp>& __type; }; │ │ │ │ -422 │ │ │ │ -423 // │ │ │ │ -424 // Apply function taking a value/const reference closure │ │ │ │ -425 // │ │ │ │ -426 │ │ │ │ -427 template │ │ │ │ -428 class _FunBase │ │ │ │ -429 { │ │ │ │ -430 public: │ │ │ │ -431 typedef typename _Dom::value_type value_type; │ │ │ │ -432 │ │ │ │ -433 _FunBase(const _Dom& __e, value_type __f(_Arg)) │ │ │ │ -434 : _M_expr(__e), _M_func(__f) {} │ │ │ │ -435 │ │ │ │ -436 value_type operator[](size_t __i) const │ │ │ │ -437 { return _M_func (_M_expr[__i]); } │ │ │ │ -438 │ │ │ │ -439 size_t size() const { return _M_expr.size ();} │ │ │ │ -440 │ │ │ │ -441 private: │ │ │ │ -442 typename _ValArrayRef<_Dom>::__type _M_expr; │ │ │ │ -443 value_type (*_M_func)(_Arg); │ │ │ │ -444 }; │ │ │ │ +409 /** │ │ │ │ +410 * Return the complete elliptic integral of the second kind @f$ E(k) @f$ │ │ │ │ +411 * for long double modulus @c k. │ │ │ │ +412 * │ │ │ │ +413 * @see comp_ellint_2 for details. │ │ │ │ +414 */ │ │ │ │ +415 inline long double │ │ │ │ +_4_1_6 _c_o_m_p___e_l_l_i_n_t___2_l(long double _____k) │ │ │ │ +417 { return __detail::__comp_ellint_2(_____k); } │ │ │ │ +418 │ │ │ │ +419 /** │ │ │ │ +420 * Return the complete elliptic integral of the second kind @f$ E(k) @f$ │ │ │ │ +421 * for real modulus @c k. │ │ │ │ +422 * │ │ │ │ +423 * The complete elliptic integral of the second kind is defined as │ │ │ │ +424 * @f[ │ │ │ │ +425 * E(k) = E(k,\pi/2) = \int_0^{\pi/2}\sqrt{1 - k^2 sin^2\theta} │ │ │ │ +426 * @f] │ │ │ │ +427 * where @f$ E(k,\phi) @f$ is the incomplete elliptic integral of the │ │ │ │ +428 * second kind and the modulus @f$ |k| <= 1 @f$. │ │ │ │ +429 * @see ellint_2 for details of the incomplete elliptic function │ │ │ │ +430 * of the second kind. │ │ │ │ +431 * │ │ │ │ +432 * @tparam _Tp The floating-point type of the modulus @c __k. │ │ │ │ +433 * @param __k The modulus, @c abs(__k) <= 1 │ │ │ │ +434 * @throw std::domain_error if @c abs(__k) > 1. │ │ │ │ +435 */ │ │ │ │ +436 template │ │ │ │ +437 inline typename __gnu_cxx::__promote<_Tp>::__type │ │ │ │ +_4_3_8 _c_o_m_p___e_l_l_i_n_t___2(_Tp _____k) │ │ │ │ +439 { │ │ │ │ +440 typedef typename __gnu_cxx::__promote<_Tp>::__type __type; │ │ │ │ +441 return __detail::__comp_ellint_2<__type>(_____k); │ │ │ │ +442 } │ │ │ │ +443 │ │ │ │ +444 // Complete elliptic integrals of the third kind │ │ │ │ 445 │ │ │ │ -446 template │ │ │ │ -447 struct _ValFunClos<_Expr,_Dom> : _FunBase<_Dom, typename _Dom::value_type> │ │ │ │ -448 { │ │ │ │ -449 typedef _FunBase<_Dom, typename _Dom::value_type> _Base; │ │ │ │ -450 typedef typename _Base::value_type value_type; │ │ │ │ -451 typedef value_type _Tp; │ │ │ │ -452 │ │ │ │ -453 _ValFunClos(const _Dom& __e, _Tp __f(_Tp)) : _Base(__e, __f) {} │ │ │ │ -454 }; │ │ │ │ +446 /** │ │ │ │ +447 * @brief Return the complete elliptic integral of the third kind │ │ │ │ +448 * @f$ \Pi(k,\nu) @f$ for @c float modulus @c k. │ │ │ │ +449 * │ │ │ │ +450 * @see comp_ellint_3 for details. │ │ │ │ +451 */ │ │ │ │ +452 inline float │ │ │ │ +_4_5_3 _c_o_m_p___e_l_l_i_n_t___3_f(float _____k, float _____n_u) │ │ │ │ +454 { return __detail::__comp_ellint_3(_____k, _____n_u); } │ │ │ │ 455 │ │ │ │ -456 template │ │ │ │ -457 struct _ValFunClos<_ValArray,_Tp> : _FunBase, _Tp> │ │ │ │ -458 { │ │ │ │ -459 typedef _FunBase, _Tp> _Base; │ │ │ │ -460 typedef _Tp value_type; │ │ │ │ -461 │ │ │ │ -462 _ValFunClos(const valarray<_Tp>& __v, _Tp __f(_Tp)) : _Base(__v, __f) {} │ │ │ │ -463 }; │ │ │ │ -464 │ │ │ │ -465 template │ │ │ │ -466 struct _RefFunClos<_Expr, _Dom> │ │ │ │ -467 : _FunBase<_Dom, const typename _Dom::value_type&> │ │ │ │ -468 { │ │ │ │ -469 typedef _FunBase<_Dom, const typename _Dom::value_type&> _Base; │ │ │ │ -470 typedef typename _Base::value_type value_type; │ │ │ │ -471 typedef value_type _Tp; │ │ │ │ -472 │ │ │ │ -473 _RefFunClos(const _Dom& __e, _Tp __f(const _Tp&)) │ │ │ │ -474 : _Base(__e, __f) {} │ │ │ │ -475 }; │ │ │ │ -476 │ │ │ │ -477 template │ │ │ │ -478 struct _RefFunClos<_ValArray, _Tp> │ │ │ │ -479 : _FunBase, const _Tp&> │ │ │ │ -480 { │ │ │ │ -481 typedef _FunBase, const _Tp&> _Base; │ │ │ │ -482 typedef _Tp value_type; │ │ │ │ -483 │ │ │ │ -484 _RefFunClos(const valarray<_Tp>& __v, _Tp __f(const _Tp&)) │ │ │ │ -485 : _Base(__v, __f) {} │ │ │ │ -486 }; │ │ │ │ -487 │ │ │ │ -488 // │ │ │ │ -489 // Unary expression closure. │ │ │ │ -490 // │ │ │ │ -491 │ │ │ │ -492 template │ │ │ │ -493 class _UnBase │ │ │ │ -494 { │ │ │ │ -495 public: │ │ │ │ -496 typedef typename _Arg::value_type _Vt; │ │ │ │ -497 typedef typename __fun<_Oper, _Vt>::result_type value_type; │ │ │ │ -498 │ │ │ │ -499 _UnBase(const _Arg& __e) : _M_expr(__e) {} │ │ │ │ -500 │ │ │ │ -501 value_type operator[](size_t __i) const │ │ │ │ -502 { return _Oper()(_M_expr[__i]); } │ │ │ │ -503 │ │ │ │ -504 size_t size() const { return _M_expr.size(); } │ │ │ │ -505 │ │ │ │ -506 private: │ │ │ │ -507 typename _ValArrayRef<_Arg>::__type _M_expr; │ │ │ │ -508 }; │ │ │ │ -509 │ │ │ │ -510 template │ │ │ │ -511 struct _UnClos<_Oper, _Expr, _Dom> │ │ │ │ -512 : _UnBase<_Oper, _Dom> │ │ │ │ -513 { │ │ │ │ -514 typedef _Dom _Arg; │ │ │ │ -515 typedef _UnBase<_Oper, _Dom> _Base; │ │ │ │ -516 typedef typename _Base::value_type value_type; │ │ │ │ -517 │ │ │ │ -518 _UnClos(const _Arg& __e) : _Base(__e) {} │ │ │ │ -519 }; │ │ │ │ -520 │ │ │ │ -521 template │ │ │ │ -522 struct _UnClos<_Oper, _ValArray, _Tp> │ │ │ │ -523 : _UnBase<_Oper, valarray<_Tp> > │ │ │ │ -524 { │ │ │ │ -525 typedef valarray<_Tp> _Arg; │ │ │ │ -526 typedef _UnBase<_Oper, valarray<_Tp> > _Base; │ │ │ │ -527 typedef typename _Base::value_type value_type; │ │ │ │ -528 │ │ │ │ -529 _UnClos(const _Arg& __e) : _Base(__e) {} │ │ │ │ -530 }; │ │ │ │ -531 │ │ │ │ -532 │ │ │ │ -533 // │ │ │ │ -534 // Binary expression closure. │ │ │ │ -535 // │ │ │ │ -536 │ │ │ │ -537 template │ │ │ │ -538 class _BinBase │ │ │ │ -539 { │ │ │ │ -540 public: │ │ │ │ -541 typedef typename _FirstArg::value_type _Vt; │ │ │ │ -542 typedef typename __fun<_Oper, _Vt>::result_type value_type; │ │ │ │ -543 │ │ │ │ -544 _BinBase(const _FirstArg& __e1, const _SecondArg& __e2) │ │ │ │ -545 : _M_expr1(__e1), _M_expr2(__e2) {} │ │ │ │ -546 │ │ │ │ -547 value_type operator[](size_t __i) const │ │ │ │ -548 { return _Oper()(_M_expr1[__i], _M_expr2[__i]); } │ │ │ │ -549 │ │ │ │ -550 size_t size() const { return _M_expr1.size(); } │ │ │ │ -551 │ │ │ │ -552 private: │ │ │ │ -553 typename _ValArrayRef<_FirstArg>::__type _M_expr1; │ │ │ │ -554 typename _ValArrayRef<_SecondArg>::__type _M_expr2; │ │ │ │ -555 }; │ │ │ │ -556 │ │ │ │ -557 │ │ │ │ -558 template │ │ │ │ -559 class _BinBase2 │ │ │ │ -560 { │ │ │ │ -561 public: │ │ │ │ -562 typedef typename _Clos::value_type _Vt; │ │ │ │ -563 typedef typename __fun<_Oper, _Vt>::result_type value_type; │ │ │ │ -564 │ │ │ │ -565 _BinBase2(const _Clos& __e, const _Vt& __t) │ │ │ │ -566 : _M_expr1(__e), _M_expr2(__t) {} │ │ │ │ -567 │ │ │ │ -568 value_type operator[](size_t __i) const │ │ │ │ -569 { return _Oper()(_M_expr1[__i], _M_expr2); } │ │ │ │ -570 │ │ │ │ -571 size_t size() const { return _M_expr1.size(); } │ │ │ │ -572 │ │ │ │ -573 private: │ │ │ │ -574 typename _ValArrayRef<_Clos>::__type _M_expr1; │ │ │ │ -575 _Vt _M_expr2; │ │ │ │ -576 }; │ │ │ │ -577 │ │ │ │ -578 template │ │ │ │ -579 class _BinBase1 │ │ │ │ -580 { │ │ │ │ -581 public: │ │ │ │ -582 typedef typename _Clos::value_type _Vt; │ │ │ │ -583 typedef typename __fun<_Oper, _Vt>::result_type value_type; │ │ │ │ -584 │ │ │ │ -585 _BinBase1(const _Vt& __t, const _Clos& __e) │ │ │ │ -586 : _M_expr1(__t), _M_expr2(__e) {} │ │ │ │ -587 │ │ │ │ -588 value_type operator[](size_t __i) const │ │ │ │ -589 { return _Oper()(_M_expr1, _M_expr2[__i]); } │ │ │ │ -590 │ │ │ │ -591 size_t size() const { return _M_expr2.size(); } │ │ │ │ -592 │ │ │ │ -593 private: │ │ │ │ -594 _Vt _M_expr1; │ │ │ │ -595 typename _ValArrayRef<_Clos>::__type _M_expr2; │ │ │ │ -596 }; │ │ │ │ -597 │ │ │ │ -598 template │ │ │ │ -599 struct _BinClos<_Oper, _Expr, _Expr, _Dom1, _Dom2> │ │ │ │ -600 : _BinBase<_Oper, _Dom1, _Dom2> │ │ │ │ -601 { │ │ │ │ -602 typedef _BinBase<_Oper, _Dom1, _Dom2> _Base; │ │ │ │ -603 typedef typename _Base::value_type value_type; │ │ │ │ -604 │ │ │ │ -605 _BinClos(const _Dom1& __e1, const _Dom2& __e2) : _Base(__e1, __e2) {} │ │ │ │ -606 }; │ │ │ │ -607 │ │ │ │ -608 template │ │ │ │ -609 struct _BinClos<_Oper, _ValArray, _ValArray, _Tp, _Tp> │ │ │ │ -610 : _BinBase<_Oper, valarray<_Tp>, valarray<_Tp> > │ │ │ │ -611 { │ │ │ │ -612 typedef _BinBase<_Oper, valarray<_Tp>, valarray<_Tp> > _Base; │ │ │ │ -613 typedef typename _Base::value_type value_type; │ │ │ │ -614 │ │ │ │ -615 _BinClos(const valarray<_Tp>& __v, const valarray<_Tp>& __w) │ │ │ │ -616 : _Base(__v, __w) {} │ │ │ │ -617 }; │ │ │ │ -618 │ │ │ │ -619 template │ │ │ │ -620 struct _BinClos<_Oper, _Expr, _ValArray, _Dom, typename _Dom::value_type> │ │ │ │ -621 : _BinBase<_Oper, _Dom, valarray > │ │ │ │ -622 { │ │ │ │ -623 typedef typename _Dom::value_type _Tp; │ │ │ │ -624 typedef _BinBase<_Oper,_Dom,valarray<_Tp> > _Base; │ │ │ │ -625 typedef typename _Base::value_type value_type; │ │ │ │ -626 │ │ │ │ -627 _BinClos(const _Dom& __e1, const valarray<_Tp>& __e2) │ │ │ │ -628 : _Base(__e1, __e2) {} │ │ │ │ -629 }; │ │ │ │ -630 │ │ │ │ -631 template │ │ │ │ -632 struct _BinClos<_Oper, _ValArray, _Expr, typename _Dom::value_type, _Dom> │ │ │ │ -633 : _BinBase<_Oper, valarray,_Dom> │ │ │ │ +456 /** │ │ │ │ +457 * @brief Return the complete elliptic integral of the third kind │ │ │ │ +458 * @f$ \Pi(k,\nu) @f$ for long double modulus @c k. │ │ │ │ +459 * │ │ │ │ +460 * @see comp_ellint_3 for details. │ │ │ │ +461 */ │ │ │ │ +462 inline long double │ │ │ │ +_4_6_3 _c_o_m_p___e_l_l_i_n_t___3_l(long double _____k, long double _____n_u) │ │ │ │ +464 { return __detail::__comp_ellint_3(_____k, _____n_u); } │ │ │ │ +465 │ │ │ │ +466 /** │ │ │ │ +467 * Return the complete elliptic integral of the third kind │ │ │ │ +468 * @f$ \Pi(k,\nu) = \Pi(k,\nu,\pi/2) @f$ for real modulus @c k. │ │ │ │ +469 * │ │ │ │ +470 * The complete elliptic integral of the third kind is defined as │ │ │ │ +471 * @f[ │ │ │ │ +472 * \Pi(k,\nu) = \Pi(k,\nu,\pi/2) = \int_0^{\pi/2} │ │ │ │ +473 * \frac{d\theta} │ │ │ │ +474 * {(1 - \nu \sin^2\theta)\sqrt{1 - k^2 \sin^2\theta}} │ │ │ │ +475 * @f] │ │ │ │ +476 * where @f$ \Pi(k,\nu,\phi) @f$ is the incomplete elliptic integral of the │ │ │ │ +477 * second kind and the modulus @f$ |k| <= 1 @f$. │ │ │ │ +478 * @see ellint_3 for details of the incomplete elliptic function │ │ │ │ +479 * of the third kind. │ │ │ │ +480 * │ │ │ │ +481 * @tparam _Tp The floating-point type of the modulus @c __k. │ │ │ │ +482 * @tparam _Tpn The floating-point type of the argument @c __nu. │ │ │ │ +483 * @param __k The modulus, @c abs(__k) <= 1 │ │ │ │ +484 * @param __nu The argument │ │ │ │ +485 * @throw std::domain_error if @c abs(__k) > 1. │ │ │ │ +486 */ │ │ │ │ +487 template │ │ │ │ +488 inline typename __gnu_cxx::__promote_2<_Tp, _Tpn>::__type │ │ │ │ +_4_8_9 _c_o_m_p___e_l_l_i_n_t___3(_Tp _____k, ___T_p_n _____n_u) │ │ │ │ +490 { │ │ │ │ +491 typedef typename __gnu_cxx::__promote_2<_Tp, _Tpn>::__type __type; │ │ │ │ +492 return __detail::__comp_ellint_3<__type>(_____k, _____n_u); │ │ │ │ +493 } │ │ │ │ +494 │ │ │ │ +495 // Regular modified cylindrical Bessel functions │ │ │ │ +496 │ │ │ │ +497 /** │ │ │ │ +498 * Return the regular modified Bessel function @f$ I_{\nu}(x) @f$ │ │ │ │ +499 * for @c float order @f$ \nu @f$ and argument @f$ x >= 0 @f$. │ │ │ │ +500 * │ │ │ │ +501 * @see cyl_bessel_i for setails. │ │ │ │ +502 */ │ │ │ │ +503 inline float │ │ │ │ +_5_0_4 _c_y_l___b_e_s_s_e_l___i_f(float _____n_u, float __x) │ │ │ │ +505 { return __detail::__cyl_bessel_i(_____n_u, __x); } │ │ │ │ +506 │ │ │ │ +507 /** │ │ │ │ +508 * Return the regular modified Bessel function @f$ I_{\nu}(x) @f$ │ │ │ │ +509 * for long double order @f$ \nu @f$ and argument @f$ x >= 0 @f$. │ │ │ │ +510 * │ │ │ │ +511 * @see cyl_bessel_i for setails. │ │ │ │ +512 */ │ │ │ │ +513 inline long double │ │ │ │ +_5_1_4 _c_y_l___b_e_s_s_e_l___i_l(long double _____n_u, long double __x) │ │ │ │ +515 { return __detail::__cyl_bessel_i(_____n_u, __x); } │ │ │ │ +516 │ │ │ │ +517 /** │ │ │ │ +518 * Return the regular modified Bessel function @f$ I_{\nu}(x) @f$ │ │ │ │ +519 * for real order @f$ \nu @f$ and argument @f$ x >= 0 @f$. │ │ │ │ +520 * │ │ │ │ +521 * The regular modified cylindrical Bessel function is: │ │ │ │ +522 * @f[ │ │ │ │ +523 * I_{\nu}(x) = i^{-\nu}J_\nu(ix) = \sum_{k=0}^{\infty} │ │ │ │ +524 * \frac{(x/2)^{\nu + 2k}}{k!\Gamma(\nu+k+1)} │ │ │ │ +525 * @f] │ │ │ │ +526 * │ │ │ │ +527 * @tparam _Tpnu The floating-point type of the order @c __nu. │ │ │ │ +528 * @tparam _Tp The floating-point type of the argument @c __x. │ │ │ │ +529 * @param __nu The order │ │ │ │ +530 * @param __x The argument, __x >= 0 │ │ │ │ +531 * @throw std::domain_error if __x < 0 . │ │ │ │ +532 */ │ │ │ │ +533 template │ │ │ │ +534 inline typename __gnu_cxx::__promote_2<_Tpnu, _Tp>::__type │ │ │ │ +_5_3_5 _c_y_l___b_e_s_s_e_l___i(___T_p_n_u _____n_u, _Tp __x) │ │ │ │ +536 { │ │ │ │ +537 typedef typename __gnu_cxx::__promote_2<_Tpnu, _Tp>::__type __type; │ │ │ │ +538 return __detail::__cyl_bessel_i<__type>(_____n_u, __x); │ │ │ │ +539 } │ │ │ │ +540 │ │ │ │ +541 // Cylindrical Bessel functions (of the first kind) │ │ │ │ +542 │ │ │ │ +543 /** │ │ │ │ +544 * Return the Bessel function of the first kind @f$ J_{\nu}(x) @f$ │ │ │ │ +545 * for @c float order @f$ \nu @f$ and argument @f$ x >= 0 @f$. │ │ │ │ +546 * │ │ │ │ +547 * @see cyl_bessel_j for setails. │ │ │ │ +548 */ │ │ │ │ +549 inline float │ │ │ │ +_5_5_0 _c_y_l___b_e_s_s_e_l___j_f(float _____n_u, float __x) │ │ │ │ +551 { return __detail::__cyl_bessel_j(_____n_u, __x); } │ │ │ │ +552 │ │ │ │ +553 /** │ │ │ │ +554 * Return the Bessel function of the first kind @f$ J_{\nu}(x) @f$ │ │ │ │ +555 * for long double order @f$ \nu @f$ and argument @f$ x >= 0 @f$. │ │ │ │ +556 * │ │ │ │ +557 * @see cyl_bessel_j for setails. │ │ │ │ +558 */ │ │ │ │ +559 inline long double │ │ │ │ +_5_6_0 _c_y_l___b_e_s_s_e_l___j_l(long double _____n_u, long double __x) │ │ │ │ +561 { return __detail::__cyl_bessel_j(_____n_u, __x); } │ │ │ │ +562 │ │ │ │ +563 /** │ │ │ │ +564 * Return the Bessel function @f$ J_{\nu}(x) @f$ of real order @f$ \nu @f$ │ │ │ │ +565 * and argument @f$ x >= 0 @f$. │ │ │ │ +566 * │ │ │ │ +567 * The cylindrical Bessel function is: │ │ │ │ +568 * @f[ │ │ │ │ +569 * J_{\nu}(x) = \sum_{k=0}^{\infty} │ │ │ │ +570 * \frac{(-1)^k (x/2)^{\nu + 2k}}{k!\Gamma(\nu+k+1)} │ │ │ │ +571 * @f] │ │ │ │ +572 * │ │ │ │ +573 * @tparam _Tpnu The floating-point type of the order @c __nu. │ │ │ │ +574 * @tparam _Tp The floating-point type of the argument @c __x. │ │ │ │ +575 * @param __nu The order │ │ │ │ +576 * @param __x The argument, __x >= 0 │ │ │ │ +577 * @throw std::domain_error if __x < 0 . │ │ │ │ +578 */ │ │ │ │ +579 template │ │ │ │ +580 inline typename __gnu_cxx::__promote_2<_Tpnu, _Tp>::__type │ │ │ │ +_5_8_1 _c_y_l___b_e_s_s_e_l___j(___T_p_n_u _____n_u, _Tp __x) │ │ │ │ +582 { │ │ │ │ +583 typedef typename __gnu_cxx::__promote_2<_Tpnu, _Tp>::__type __type; │ │ │ │ +584 return __detail::__cyl_bessel_j<__type>(_____n_u, __x); │ │ │ │ +585 } │ │ │ │ +586 │ │ │ │ +587 // Irregular modified cylindrical Bessel functions │ │ │ │ +588 │ │ │ │ +589 /** │ │ │ │ +590 * Return the irregular modified Bessel function @f$ K_{\nu}(x) @f$ │ │ │ │ +591 * for @c float order @f$ \nu @f$ and argument @f$ x >= 0 @f$. │ │ │ │ +592 * │ │ │ │ +593 * @see cyl_bessel_k for setails. │ │ │ │ +594 */ │ │ │ │ +595 inline float │ │ │ │ +_5_9_6 _c_y_l___b_e_s_s_e_l___k_f(float _____n_u, float __x) │ │ │ │ +597 { return __detail::__cyl_bessel_k(_____n_u, __x); } │ │ │ │ +598 │ │ │ │ +599 /** │ │ │ │ +600 * Return the irregular modified Bessel function @f$ K_{\nu}(x) @f$ │ │ │ │ +601 * for long double order @f$ \nu @f$ and argument @f$ x >= 0 @f$. │ │ │ │ +602 * │ │ │ │ +603 * @see cyl_bessel_k for setails. │ │ │ │ +604 */ │ │ │ │ +605 inline long double │ │ │ │ +_6_0_6 _c_y_l___b_e_s_s_e_l___k_l(long double _____n_u, long double __x) │ │ │ │ +607 { return __detail::__cyl_bessel_k(_____n_u, __x); } │ │ │ │ +608 │ │ │ │ +609 /** │ │ │ │ +610 * Return the irregular modified Bessel function @f$ K_{\nu}(x) @f$ │ │ │ │ +611 * of real order @f$ \nu @f$ and argument @f$ x @f$. │ │ │ │ +612 * │ │ │ │ +613 * The irregular modified Bessel function is defined by: │ │ │ │ +614 * @f[ │ │ │ │ +615 * K_{\nu}(x) = \frac{\pi}{2} │ │ │ │ +616 * \frac{I_{-\nu}(x) - I_{\nu}(x)}{\sin \nu\pi} │ │ │ │ +617 * @f] │ │ │ │ +618 * where for integral @f$ \nu = n @f$ a limit is taken: │ │ │ │ +619 * @f$ lim_{\nu \to n} @f$. │ │ │ │ +620 * For negative argument we have simply: │ │ │ │ +621 * @f[ │ │ │ │ +622 * K_{-\nu}(x) = K_{\nu}(x) │ │ │ │ +623 * @f] │ │ │ │ +624 * │ │ │ │ +625 * @tparam _Tpnu The floating-point type of the order @c __nu. │ │ │ │ +626 * @tparam _Tp The floating-point type of the argument @c __x. │ │ │ │ +627 * @param __nu The order │ │ │ │ +628 * @param __x The argument, __x >= 0 │ │ │ │ +629 * @throw std::domain_error if __x < 0 . │ │ │ │ +630 */ │ │ │ │ +631 template │ │ │ │ +632 inline typename __gnu_cxx::__promote_2<_Tpnu, _Tp>::__type │ │ │ │ +_6_3_3 _c_y_l___b_e_s_s_e_l___k(___T_p_n_u _____n_u, _Tp __x) │ │ │ │ 634 { │ │ │ │ -635 typedef typename _Dom::value_type _Tp; │ │ │ │ -636 typedef _BinBase<_Oper, valarray<_Tp>, _Dom> _Base; │ │ │ │ -637 typedef typename _Base::value_type value_type; │ │ │ │ +635 typedef typename __gnu_cxx::__promote_2<_Tpnu, _Tp>::__type __type; │ │ │ │ +636 return __detail::__cyl_bessel_k<__type>(_____n_u, __x); │ │ │ │ +637 } │ │ │ │ 638 │ │ │ │ -639 _BinClos(const valarray<_Tp>& __e1, const _Dom& __e2) │ │ │ │ -640 : _Base(__e1, __e2) {} │ │ │ │ -641 }; │ │ │ │ -642 │ │ │ │ -643 template │ │ │ │ -644 struct _BinClos<_Oper, _Expr, _Constant, _Dom, typename _Dom::value_type> │ │ │ │ -645 : _BinBase2<_Oper, _Dom> │ │ │ │ -646 { │ │ │ │ -647 typedef typename _Dom::value_type _Tp; │ │ │ │ -648 typedef _BinBase2<_Oper,_Dom> _Base; │ │ │ │ -649 typedef typename _Base::value_type value_type; │ │ │ │ +639 // Cylindrical Neumann functions │ │ │ │ +640 │ │ │ │ +641 /** │ │ │ │ +642 * Return the Neumann function @f$ N_{\nu}(x) @f$ │ │ │ │ +643 * of @c float order @f$ \nu @f$ and argument @f$ x @f$. │ │ │ │ +644 * │ │ │ │ +645 * @see cyl_neumann for setails. │ │ │ │ +646 */ │ │ │ │ +647 inline float │ │ │ │ +_6_4_8 _c_y_l___n_e_u_m_a_n_n_f(float _____n_u, float __x) │ │ │ │ +649 { return __detail::__cyl_neumann_n(_____n_u, __x); } │ │ │ │ 650 │ │ │ │ -651 _BinClos(const _Dom& __e1, const _Tp& __e2) : _Base(__e1, __e2) {} │ │ │ │ -652 }; │ │ │ │ -653 │ │ │ │ -654 template │ │ │ │ -655 struct _BinClos<_Oper, _Constant, _Expr, typename _Dom::value_type, _Dom> │ │ │ │ -656 : _BinBase1<_Oper, _Dom> │ │ │ │ -657 { │ │ │ │ -658 typedef typename _Dom::value_type _Tp; │ │ │ │ -659 typedef _BinBase1<_Oper, _Dom> _Base; │ │ │ │ -660 typedef typename _Base::value_type value_type; │ │ │ │ -661 │ │ │ │ -662 _BinClos(const _Tp& __e1, const _Dom& __e2) : _Base(__e1, __e2) {} │ │ │ │ -663 }; │ │ │ │ -664 │ │ │ │ -665 template │ │ │ │ -666 struct _BinClos<_Oper, _ValArray, _Constant, _Tp, _Tp> │ │ │ │ -667 : _BinBase2<_Oper, valarray<_Tp> > │ │ │ │ -668 { │ │ │ │ -669 typedef _BinBase2<_Oper,valarray<_Tp> > _Base; │ │ │ │ -670 typedef typename _Base::value_type value_type; │ │ │ │ -671 │ │ │ │ -672 _BinClos(const valarray<_Tp>& __v, const _Tp& __t) : _Base(__v, __t) {} │ │ │ │ -673 }; │ │ │ │ -674 │ │ │ │ -675 template │ │ │ │ -676 struct _BinClos<_Oper, _Constant, _ValArray, _Tp, _Tp> │ │ │ │ -677 : _BinBase1<_Oper, valarray<_Tp> > │ │ │ │ -678 { │ │ │ │ -679 typedef _BinBase1<_Oper, valarray<_Tp> > _Base; │ │ │ │ -680 typedef typename _Base::value_type value_type; │ │ │ │ -681 │ │ │ │ -682 _BinClos(const _Tp& __t, const valarray<_Tp>& __v) : _Base(__t, __v) {} │ │ │ │ -683 }; │ │ │ │ -684 │ │ │ │ -685 // │ │ │ │ -686 // slice_array closure. │ │ │ │ -687 // │ │ │ │ -688 template │ │ │ │ -689 class _SBase │ │ │ │ -690 { │ │ │ │ -691 public: │ │ │ │ -692 typedef typename _Dom::value_type value_type; │ │ │ │ -693 │ │ │ │ -694 _SBase (const _Dom& __e, const slice& __s) │ │ │ │ -695 : _M_expr (__e), _M_slice (__s) {} │ │ │ │ -696 │ │ │ │ -697 value_type │ │ │ │ -698 operator[] (size_t __i) const │ │ │ │ -699 { return _M_expr[_M_slice.start () + __i * _M_slice.stride ()]; } │ │ │ │ -700 │ │ │ │ -701 size_t │ │ │ │ -702 size() const │ │ │ │ -703 { return _M_slice.size (); } │ │ │ │ -704 │ │ │ │ -705 private: │ │ │ │ -706 typename _ValArrayRef<_Dom>::__type _M_expr; │ │ │ │ -707 const slice& _M_slice; │ │ │ │ -708 }; │ │ │ │ -709 │ │ │ │ -710 template │ │ │ │ -711 class _SBase<_Array<_Tp> > │ │ │ │ -712 { │ │ │ │ -713 public: │ │ │ │ -714 typedef _Tp value_type; │ │ │ │ -715 │ │ │ │ -716 _SBase (_Array<_Tp> __a, const slice& __s) │ │ │ │ -717 : _M_array (__a._M_data+__s.start()), _M_size (__s.size()), │ │ │ │ -718 _M_stride (__s.stride()) {} │ │ │ │ -719 │ │ │ │ -720 value_type │ │ │ │ -721 operator[] (size_t __i) const │ │ │ │ -722 { return _M_array._M_data[__i * _M_stride]; } │ │ │ │ -723 │ │ │ │ -724 size_t │ │ │ │ -725 size() const │ │ │ │ -726 { return _M_size; } │ │ │ │ -727 │ │ │ │ -728 private: │ │ │ │ -729 const _Array<_Tp> _M_array; │ │ │ │ -730 const size_t _M_size; │ │ │ │ -731 const size_t _M_stride; │ │ │ │ -732 }; │ │ │ │ -733 │ │ │ │ -734 template │ │ │ │ -735 struct _SClos<_Expr, _Dom> │ │ │ │ -736 : _SBase<_Dom> │ │ │ │ -737 { │ │ │ │ -738 typedef _SBase<_Dom> _Base; │ │ │ │ -739 typedef typename _Base::value_type value_type; │ │ │ │ -740 │ │ │ │ -741 _SClos (const _Dom& __e, const slice& __s) : _Base (__e, __s) {} │ │ │ │ -742 }; │ │ │ │ -743 │ │ │ │ -744 template │ │ │ │ -745 struct _SClos<_ValArray, _Tp> │ │ │ │ -746 : _SBase<_Array<_Tp> > │ │ │ │ -747 { │ │ │ │ -748 typedef _SBase<_Array<_Tp> > _Base; │ │ │ │ -749 typedef _Tp value_type; │ │ │ │ -750 │ │ │ │ -751 _SClos (_Array<_Tp> __a, const slice& __s) : _Base (__a, __s) {} │ │ │ │ -752 }; │ │ │ │ -753} // namespace __detail │ │ │ │ -754 │ │ │ │ -755_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ -756} // namespace │ │ │ │ -757 │ │ │ │ -758#endif /* _CPP_VALARRAY_BEFORE_H */ │ │ │ │ -_s_l_i_c_e___a_r_r_a_y_._h │ │ │ │ -_s_t_d_:_:_l_o_g_1_0 │ │ │ │ -complex< _Tp > log10(const complex< _Tp > &) │ │ │ │ -Return complex base 10 logarithm of z. │ │ │ │ -DDeeffiinniittiioonn _c_o_m_p_l_e_x_:_8_2_9 │ │ │ │ -_s_t_d_:_:_s_i_n │ │ │ │ -complex< _Tp > sin(const complex< _Tp > &) │ │ │ │ -Return complex sine of z. │ │ │ │ -DDeeffiinniittiioonn _c_o_m_p_l_e_x_:_8_5_9 │ │ │ │ -_s_t_d_:_:_l_o_g │ │ │ │ -complex< _Tp > log(const complex< _Tp > &) │ │ │ │ -Return complex natural logarithm of z. │ │ │ │ -DDeeffiinniittiioonn _c_o_m_p_l_e_x_:_8_2_4 │ │ │ │ -_s_t_d_:_:_t_a_n │ │ │ │ -complex< _Tp > tan(const complex< _Tp > &) │ │ │ │ -Return complex tangent of z. │ │ │ │ -DDeeffiinniittiioonn _c_o_m_p_l_e_x_:_9_6_0 │ │ │ │ -_s_t_d_:_:_a_b_s │ │ │ │ -_Tp abs(const complex< _Tp > &) │ │ │ │ -Return magnitude of z. │ │ │ │ -DDeeffiinniittiioonn _c_o_m_p_l_e_x_:_6_3_0 │ │ │ │ -_s_t_d_:_:_e_x_p │ │ │ │ -complex< _Tp > exp(const complex< _Tp > &) │ │ │ │ -Return complex base e exponential of z. │ │ │ │ -DDeeffiinniittiioonn _c_o_m_p_l_e_x_:_7_9_7 │ │ │ │ -_s_t_d_:_:_c_o_s_h │ │ │ │ -complex< _Tp > cosh(const complex< _Tp > &) │ │ │ │ -Return complex hyperbolic cosine of z. │ │ │ │ -DDeeffiinniittiioonn _c_o_m_p_l_e_x_:_7_7_1 │ │ │ │ -_s_t_d_:_:_t_a_n_h │ │ │ │ -complex< _Tp > tanh(const complex< _Tp > &) │ │ │ │ -Return complex hyperbolic tangent of z. │ │ │ │ -DDeeffiinniittiioonn _c_o_m_p_l_e_x_:_9_8_8 │ │ │ │ -_s_t_d_:_:_p_o_w │ │ │ │ -complex< _Tp > pow(const complex< _Tp > &, int) │ │ │ │ -Return x to the y'th power. │ │ │ │ -DDeeffiinniittiioonn _c_o_m_p_l_e_x_:_1_0_1_9 │ │ │ │ -_s_t_d_:_:_s_i_n_h │ │ │ │ -complex< _Tp > sinh(const complex< _Tp > &) │ │ │ │ -Return complex hyperbolic sine of z. │ │ │ │ -DDeeffiinniittiioonn _c_o_m_p_l_e_x_:_8_8_9 │ │ │ │ -_s_t_d_:_:_c_o_s │ │ │ │ -complex< _Tp > cos(const complex< _Tp > &) │ │ │ │ -Return complex cosine of z. │ │ │ │ -DDeeffiinniittiioonn _c_o_m_p_l_e_x_:_7_4_1 │ │ │ │ -_s_t_d_:_:_s_q_r_t │ │ │ │ -complex< _Tp > sqrt(const complex< _Tp > &) │ │ │ │ -Return complex square root of z. │ │ │ │ -DDeeffiinniittiioonn _c_o_m_p_l_e_x_:_9_3_3 │ │ │ │ +651 /** │ │ │ │ +652 * Return the Neumann function @f$ N_{\nu}(x) @f$ │ │ │ │ +653 * of long double order @f$ \nu @f$ and argument @f$ x @f$. │ │ │ │ +654 * │ │ │ │ +655 * @see cyl_neumann for setails. │ │ │ │ +656 */ │ │ │ │ +657 inline long double │ │ │ │ +_6_5_8 _c_y_l___n_e_u_m_a_n_n_l(long double _____n_u, long double __x) │ │ │ │ +659 { return __detail::__cyl_neumann_n(_____n_u, __x); } │ │ │ │ +660 │ │ │ │ +661 /** │ │ │ │ +662 * Return the Neumann function @f$ N_{\nu}(x) @f$ │ │ │ │ +663 * of real order @f$ \nu @f$ and argument @f$ x >= 0 @f$. │ │ │ │ +664 * │ │ │ │ +665 * The Neumann function is defined by: │ │ │ │ +666 * @f[ │ │ │ │ +667 * N_{\nu}(x) = \frac{J_{\nu}(x) \cos \nu\pi - J_{-\nu}(x)} │ │ │ │ +668 * {\sin \nu\pi} │ │ │ │ +669 * @f] │ │ │ │ +670 * where @f$ x >= 0 @f$ and for integral order @f$ \nu = n @f$ │ │ │ │ +671 * a limit is taken: @f$ lim_{\nu \to n} @f$. │ │ │ │ +672 * │ │ │ │ +673 * @tparam _Tpnu The floating-point type of the order @c __nu. │ │ │ │ +674 * @tparam _Tp The floating-point type of the argument @c __x. │ │ │ │ +675 * @param __nu The order │ │ │ │ +676 * @param __x The argument, __x >= 0 │ │ │ │ +677 * @throw std::domain_error if __x < 0 . │ │ │ │ +678 */ │ │ │ │ +679 template │ │ │ │ +680 inline typename __gnu_cxx::__promote_2<_Tpnu, _Tp>::__type │ │ │ │ +_6_8_1 _c_y_l___n_e_u_m_a_n_n(___T_p_n_u _____n_u, _Tp __x) │ │ │ │ +682 { │ │ │ │ +683 typedef typename __gnu_cxx::__promote_2<_Tpnu, _Tp>::__type __type; │ │ │ │ +684 return __detail::__cyl_neumann_n<__type>(_____n_u, __x); │ │ │ │ +685 } │ │ │ │ +686 │ │ │ │ +687 // Incomplete elliptic integrals of the first kind │ │ │ │ +688 │ │ │ │ +689 /** │ │ │ │ +690 * Return the incomplete elliptic integral of the first kind @f$ E(k,\phi) │ │ │ │ +@f$ │ │ │ │ +691 * for @c float modulus @f$ k @f$ and angle @f$ \phi @f$. │ │ │ │ +692 * │ │ │ │ +693 * @see ellint_1 for details. │ │ │ │ +694 */ │ │ │ │ +695 inline float │ │ │ │ +_6_9_6 _e_l_l_i_n_t___1_f(float _____k, float __phi) │ │ │ │ +697 { return __detail::__ellint_1(_____k, __phi); } │ │ │ │ +698 │ │ │ │ +699 /** │ │ │ │ +700 * Return the incomplete elliptic integral of the first kind @f$ E(k,\phi) │ │ │ │ +@f$ │ │ │ │ +701 * for long double modulus @f$ k @f$ and angle @f$ \phi @f$. │ │ │ │ +702 * │ │ │ │ +703 * @see ellint_1 for details. │ │ │ │ +704 */ │ │ │ │ +705 inline long double │ │ │ │ +_7_0_6 _e_l_l_i_n_t___1_l(long double _____k, long double __phi) │ │ │ │ +707 { return __detail::__ellint_1(_____k, __phi); } │ │ │ │ +708 │ │ │ │ +709 /** │ │ │ │ +710 * Return the incomplete elliptic integral of the first kind @f$ F(k,\phi) │ │ │ │ +@f$ │ │ │ │ +711 * for @c real modulus @f$ k @f$ and angle @f$ \phi @f$. │ │ │ │ +712 * │ │ │ │ +713 * The incomplete elliptic integral of the first kind is defined as │ │ │ │ +714 * @f[ │ │ │ │ +715 * F(k,\phi) = \int_0^{\phi}\frac{d\theta} │ │ │ │ +716 * {\sqrt{1 - k^2 sin^2\theta}} │ │ │ │ +717 * @f] │ │ │ │ +718 * For @f$ \phi= \pi/2 @f$ this becomes the complete elliptic integral of │ │ │ │ +719 * the first kind, @f$ K(k) @f$. @see comp_ellint_1. │ │ │ │ +720 * │ │ │ │ +721 * @tparam _Tp The floating-point type of the modulus @c __k. │ │ │ │ +722 * @tparam _Tpp The floating-point type of the angle @c __phi. │ │ │ │ +723 * @param __k The modulus, abs(__k) <= 1 │ │ │ │ +724 * @param __phi The integral limit argument in radians │ │ │ │ +725 * @throw std::domain_error if abs(__k) > 1 . │ │ │ │ +726 */ │ │ │ │ +727 template │ │ │ │ +728 inline typename __gnu_cxx::__promote_2<_Tp, _Tpp>::__type │ │ │ │ +_7_2_9 _e_l_l_i_n_t___1(_Tp _____k, ___T_p_p __phi) │ │ │ │ +730 { │ │ │ │ +731 typedef typename __gnu_cxx::__promote_2<_Tp, _Tpp>::__type __type; │ │ │ │ +732 return __detail::__ellint_1<__type>(_____k, __phi); │ │ │ │ +733 } │ │ │ │ +734 │ │ │ │ +735 // Incomplete elliptic integrals of the second kind │ │ │ │ +736 │ │ │ │ +737 /** │ │ │ │ +738 * @brief Return the incomplete elliptic integral of the second kind │ │ │ │ +739 * @f$ E(k,\phi) @f$ for @c float argument. │ │ │ │ +740 * │ │ │ │ +741 * @see ellint_2 for details. │ │ │ │ +742 */ │ │ │ │ +743 inline float │ │ │ │ +_7_4_4 _e_l_l_i_n_t___2_f(float _____k, float __phi) │ │ │ │ +745 { return __detail::__ellint_2(_____k, __phi); } │ │ │ │ +746 │ │ │ │ +747 /** │ │ │ │ +748 * @brief Return the incomplete elliptic integral of the second kind │ │ │ │ +749 * @f$ E(k,\phi) @f$. │ │ │ │ +750 * │ │ │ │ +751 * @see ellint_2 for details. │ │ │ │ +752 */ │ │ │ │ +753 inline long double │ │ │ │ +_7_5_4 _e_l_l_i_n_t___2_l(long double _____k, long double __phi) │ │ │ │ +755 { return __detail::__ellint_2(_____k, __phi); } │ │ │ │ +756 │ │ │ │ +757 /** │ │ │ │ +758 * Return the incomplete elliptic integral of the second kind │ │ │ │ +759 * @f$ E(k,\phi) @f$. │ │ │ │ +760 * │ │ │ │ +761 * The incomplete elliptic integral of the second kind is defined as │ │ │ │ +762 * @f[ │ │ │ │ +763 * E(k,\phi) = \int_0^{\phi} \sqrt{1 - k^2 sin^2\theta} │ │ │ │ +764 * @f] │ │ │ │ +765 * For @f$ \phi= \pi/2 @f$ this becomes the complete elliptic integral of │ │ │ │ +766 * the second kind, @f$ E(k) @f$. @see comp_ellint_2. │ │ │ │ +767 * │ │ │ │ +768 * @tparam _Tp The floating-point type of the modulus @c __k. │ │ │ │ +769 * @tparam _Tpp The floating-point type of the angle @c __phi. │ │ │ │ +770 * @param __k The modulus, abs(__k) <= 1 │ │ │ │ +771 * @param __phi The integral limit argument in radians │ │ │ │ +772 * @return The elliptic function of the second kind. │ │ │ │ +773 * @throw std::domain_error if abs(__k) > 1 . │ │ │ │ +774 */ │ │ │ │ +775 template │ │ │ │ +776 inline typename __gnu_cxx::__promote_2<_Tp, _Tpp>::__type │ │ │ │ +_7_7_7 _e_l_l_i_n_t___2(_Tp _____k, ___T_p_p __phi) │ │ │ │ +778 { │ │ │ │ +779 typedef typename __gnu_cxx::__promote_2<_Tp, _Tpp>::__type __type; │ │ │ │ +780 return __detail::__ellint_2<__type>(_____k, __phi); │ │ │ │ +781 } │ │ │ │ +782 │ │ │ │ +783 // Incomplete elliptic integrals of the third kind │ │ │ │ +784 │ │ │ │ +785 /** │ │ │ │ +786 * @brief Return the incomplete elliptic integral of the third kind │ │ │ │ +787 * @f$ \Pi(k,\nu,\phi) @f$ for @c float argument. │ │ │ │ +788 * │ │ │ │ +789 * @see ellint_3 for details. │ │ │ │ +790 */ │ │ │ │ +791 inline float │ │ │ │ +_7_9_2 _e_l_l_i_n_t___3_f(float _____k, float _____n_u, float __phi) │ │ │ │ +793 { return __detail::__ellint_3(_____k, _____n_u, __phi); } │ │ │ │ +794 │ │ │ │ +795 /** │ │ │ │ +796 * @brief Return the incomplete elliptic integral of the third kind │ │ │ │ +797 * @f$ \Pi(k,\nu,\phi) @f$. │ │ │ │ +798 * │ │ │ │ +799 * @see ellint_3 for details. │ │ │ │ +800 */ │ │ │ │ +801 inline long double │ │ │ │ +_8_0_2 _e_l_l_i_n_t___3_l(long double _____k, long double _____n_u, long double __phi) │ │ │ │ +803 { return __detail::__ellint_3(_____k, _____n_u, __phi); } │ │ │ │ +804 │ │ │ │ +805 /** │ │ │ │ +806 * @brief Return the incomplete elliptic integral of the third kind │ │ │ │ +807 * @f$ \Pi(k,\nu,\phi) @f$. │ │ │ │ +808 * │ │ │ │ +809 * The incomplete elliptic integral of the third kind is defined by: │ │ │ │ +810 * @f[ │ │ │ │ +811 * \Pi(k,\nu,\phi) = \int_0^{\phi} │ │ │ │ +812 * \frac{d\theta} │ │ │ │ +813 * {(1 - \nu \sin^2\theta) │ │ │ │ +814 * \sqrt{1 - k^2 \sin^2\theta}} │ │ │ │ +815 * @f] │ │ │ │ +816 * For @f$ \phi= \pi/2 @f$ this becomes the complete elliptic integral of │ │ │ │ +817 * the third kind, @f$ \Pi(k,\nu) @f$. @see comp_ellint_3. │ │ │ │ +818 * │ │ │ │ +819 * @tparam _Tp The floating-point type of the modulus @c __k. │ │ │ │ +820 * @tparam _Tpn The floating-point type of the argument @c __nu. │ │ │ │ +821 * @tparam _Tpp The floating-point type of the angle @c __phi. │ │ │ │ +822 * @param __k The modulus, abs(__k) <= 1 │ │ │ │ +823 * @param __nu The second argument │ │ │ │ +824 * @param __phi The integral limit argument in radians │ │ │ │ +825 * @return The elliptic function of the third kind. │ │ │ │ +826 * @throw std::domain_error if abs(__k) > 1 . │ │ │ │ +827 */ │ │ │ │ +828 template │ │ │ │ +829 inline typename __gnu_cxx::__promote_3<_Tp, _Tpn, _Tpp>::__type │ │ │ │ +_8_3_0 ellint_3(_Tp _____k, ___T_p_n _____n_u, ___T_p_p __phi) │ │ │ │ +831 { │ │ │ │ +832 typedef typename __gnu_cxx::__promote_3<_Tp, _Tpn, _Tpp>::__type __type; │ │ │ │ +833 return __detail::__ellint_3<__type>(_____k, _____n_u, __phi); │ │ │ │ +834 } │ │ │ │ +835 │ │ │ │ +836 // Exponential integrals │ │ │ │ +837 │ │ │ │ +838 /** │ │ │ │ +839 * Return the exponential integral @f$ Ei(x) @f$ for @c float argument @c x. │ │ │ │ +840 * │ │ │ │ +841 * @see expint for details. │ │ │ │ +842 */ │ │ │ │ +843 inline float │ │ │ │ +_8_4_4 _e_x_p_i_n_t_f(float __x) │ │ │ │ +845 { return __detail::__expint(__x); } │ │ │ │ +846 │ │ │ │ +847 /** │ │ │ │ +848 * Return the exponential integral @f$ Ei(x) @f$ │ │ │ │ +849 * for long double argument @c x. │ │ │ │ +850 * │ │ │ │ +851 * @see expint for details. │ │ │ │ +852 */ │ │ │ │ +853 inline long double │ │ │ │ +_8_5_4 _e_x_p_i_n_t_l(long double __x) │ │ │ │ +855 { return __detail::__expint(__x); } │ │ │ │ +856 │ │ │ │ +857 /** │ │ │ │ +858 * Return the exponential integral @f$ Ei(x) @f$ for @c real argument @c x. │ │ │ │ +859 * │ │ │ │ +860 * The exponential integral is given by │ │ │ │ +861 * \f[ │ │ │ │ +862 * Ei(x) = -\int_{-x}^\infty \frac{e^t}{t} dt │ │ │ │ +863 * \f] │ │ │ │ +864 * │ │ │ │ +865 * @tparam _Tp The floating-point type of the argument @c __x. │ │ │ │ +866 * @param __x The argument of the exponential integral function. │ │ │ │ +867 */ │ │ │ │ +868 template │ │ │ │ +869 inline typename __gnu_cxx::__promote<_Tp>::__type │ │ │ │ +_8_7_0 _e_x_p_i_n_t(_Tp __x) │ │ │ │ +871 { │ │ │ │ +872 typedef typename __gnu_cxx::__promote<_Tp>::__type __type; │ │ │ │ +873 return __detail::__expint<__type>(__x); │ │ │ │ +874 } │ │ │ │ +875 │ │ │ │ +876 // Hermite polynomials │ │ │ │ +877 │ │ │ │ +878 /** │ │ │ │ +879 * Return the Hermite polynomial @f$ H_n(x) @f$ of nonnegative order n │ │ │ │ +880 * and float argument @c x. │ │ │ │ +881 * │ │ │ │ +882 * @see hermite for details. │ │ │ │ +883 */ │ │ │ │ +884 inline float │ │ │ │ +_8_8_5 _h_e_r_m_i_t_e_f(unsigned int __n, float __x) │ │ │ │ +886 { return __detail::__poly_hermite(__n, __x); } │ │ │ │ +887 │ │ │ │ +888 /** │ │ │ │ +889 * Return the Hermite polynomial @f$ H_n(x) @f$ of nonnegative order n │ │ │ │ +890 * and long double argument @c x. │ │ │ │ +891 * │ │ │ │ +892 * @see hermite for details. │ │ │ │ +893 */ │ │ │ │ +894 inline long double │ │ │ │ +_8_9_5 _h_e_r_m_i_t_e_l(unsigned int __n, long double __x) │ │ │ │ +896 { return __detail::__poly_hermite(__n, __x); } │ │ │ │ +897 │ │ │ │ +898 /** │ │ │ │ +899 * Return the Hermite polynomial @f$ H_n(x) @f$ of order n │ │ │ │ +900 * and @c real argument @c x. │ │ │ │ +901 * │ │ │ │ +902 * The Hermite polynomial is defined by: │ │ │ │ +903 * @f[ │ │ │ │ +904 * H_n(x) = (-1)^n e^{x^2} \frac{d^n}{dx^n} e^{-x^2} │ │ │ │ +905 * @f] │ │ │ │ +906 * │ │ │ │ +907 * The Hermite polynomial obeys a reflection formula: │ │ │ │ +908 * @f[ │ │ │ │ +909 * H_n(-x) = (-1)^n H_n(x) │ │ │ │ +910 * @f] │ │ │ │ +911 * │ │ │ │ +912 * @tparam _Tp The floating-point type of the argument @c __x. │ │ │ │ +913 * @param __n The order │ │ │ │ +914 * @param __x The argument │ │ │ │ +915 */ │ │ │ │ +916 template │ │ │ │ +917 inline typename __gnu_cxx::__promote<_Tp>::__type │ │ │ │ +_9_1_8 _h_e_r_m_i_t_e(unsigned int __n, _Tp __x) │ │ │ │ +919 { │ │ │ │ +920 typedef typename __gnu_cxx::__promote<_Tp>::__type __type; │ │ │ │ +921 return __detail::__poly_hermite<__type>(__n, __x); │ │ │ │ +922 } │ │ │ │ +923 │ │ │ │ +924 // Laguerre polynomials │ │ │ │ +925 │ │ │ │ +926 /** │ │ │ │ +927 * Returns the Laguerre polynomial @f$ L_n(x) @f$ of nonnegative degree @c n │ │ │ │ +928 * and @c float argument @f$ x >= 0 @f$. │ │ │ │ +929 * │ │ │ │ +930 * @see laguerre for more details. │ │ │ │ +931 */ │ │ │ │ +932 inline float │ │ │ │ +_9_3_3 _l_a_g_u_e_r_r_e_f(unsigned int __n, float __x) │ │ │ │ +934 { return __detail::__laguerre(__n, __x); } │ │ │ │ +935 │ │ │ │ +936 /** │ │ │ │ +937 * Returns the Laguerre polynomial @f$ L_n(x) @f$ of nonnegative degree @c n │ │ │ │ +938 * and long double argument @f$ x >= 0 @f$. │ │ │ │ +939 * │ │ │ │ +940 * @see laguerre for more details. │ │ │ │ +941 */ │ │ │ │ +942 inline long double │ │ │ │ +_9_4_3 _l_a_g_u_e_r_r_e_l(unsigned int __n, long double __x) │ │ │ │ +944 { return __detail::__laguerre(__n, __x); } │ │ │ │ +945 │ │ │ │ +946 /** │ │ │ │ +947 * Returns the Laguerre polynomial @f$ L_n(x) @f$ │ │ │ │ +948 * of nonnegative degree @c n and real argument @f$ x >= 0 @f$. │ │ │ │ +949 * │ │ │ │ +950 * The Laguerre polynomial is defined by: │ │ │ │ +951 * @f[ │ │ │ │ +952 * L_n(x) = \frac{e^x}{n!} \frac{d^n}{dx^n} (x^ne^{-x}) │ │ │ │ +953 * @f] │ │ │ │ +954 * │ │ │ │ +955 * @tparam _Tp The floating-point type of the argument @c __x. │ │ │ │ +956 * @param __n The nonnegative order │ │ │ │ +957 * @param __x The argument __x >= 0 │ │ │ │ +958 * @throw std::domain_error if __x < 0 . │ │ │ │ +959 */ │ │ │ │ +960 template │ │ │ │ +961 inline typename __gnu_cxx::__promote<_Tp>::__type │ │ │ │ +_9_6_2 _l_a_g_u_e_r_r_e(unsigned int __n, _Tp __x) │ │ │ │ +963 { │ │ │ │ +964 typedef typename __gnu_cxx::__promote<_Tp>::__type __type; │ │ │ │ +965 return __detail::__laguerre<__type>(__n, __x); │ │ │ │ +966 } │ │ │ │ +967 │ │ │ │ +968 // Legendre polynomials │ │ │ │ +969 │ │ │ │ +970 /** │ │ │ │ +971 * Return the Legendre polynomial @f$ P_l(x) @f$ of nonnegative │ │ │ │ +972 * degree @f$ l @f$ and @c float argument @f$ |x| <= 0 @f$. │ │ │ │ +973 * │ │ │ │ +974 * @see legendre for more details. │ │ │ │ +975 */ │ │ │ │ +976 inline float │ │ │ │ +_9_7_7 _l_e_g_e_n_d_r_e_f(unsigned int _____l, float __x) │ │ │ │ +978 { return __detail::__poly_legendre_p(_____l, __x); } │ │ │ │ +979 │ │ │ │ +980 /** │ │ │ │ +981 * Return the Legendre polynomial @f$ P_l(x) @f$ of nonnegative │ │ │ │ +982 * degree @f$ l @f$ and long double argument @f$ |x| <= 0 @f$. │ │ │ │ +983 * │ │ │ │ +984 * @see legendre for more details. │ │ │ │ +985 */ │ │ │ │ +986 inline long double │ │ │ │ +_9_8_7 _l_e_g_e_n_d_r_e_l(unsigned int _____l, long double __x) │ │ │ │ +988 { return __detail::__poly_legendre_p(_____l, __x); } │ │ │ │ +989 │ │ │ │ +990 /** │ │ │ │ +991 * Return the Legendre polynomial @f$ P_l(x) @f$ of nonnegative │ │ │ │ +992 * degree @f$ l @f$ and real argument @f$ |x| <= 0 @f$. │ │ │ │ +993 * │ │ │ │ +994 * The Legendre function of order @f$ l @f$ and argument @f$ x @f$, │ │ │ │ +995 * @f$ P_l(x) @f$, is defined by: │ │ │ │ +996 * @f[ │ │ │ │ +997 * P_l(x) = \frac{1}{2^l l!}\frac{d^l}{dx^l}(x^2 - 1)^{l} │ │ │ │ +998 * @f] │ │ │ │ +999 * │ │ │ │ +1000 * @tparam _Tp The floating-point type of the argument @c __x. │ │ │ │ +1001 * @param __l The degree @f$ l >= 0 @f$ │ │ │ │ +1002 * @param __x The argument @c abs(__x) <= 1 │ │ │ │ +1003 * @throw std::domain_error if @c abs(__x) > 1 │ │ │ │ +1004 */ │ │ │ │ +1005 template │ │ │ │ +1006 inline typename __gnu_cxx::__promote<_Tp>::__type │ │ │ │ +_1_0_0_7 _l_e_g_e_n_d_r_e(unsigned int _____l, _Tp __x) │ │ │ │ +1008 { │ │ │ │ +1009 typedef typename __gnu_cxx::__promote<_Tp>::__type __type; │ │ │ │ +1010 return __detail::__poly_legendre_p<__type>(_____l, __x); │ │ │ │ +1011 } │ │ │ │ +1012 │ │ │ │ +1013 // Riemann zeta functions │ │ │ │ +1014 │ │ │ │ +1015 /** │ │ │ │ +1016 * Return the Riemann zeta function @f$ \zeta(s) @f$ │ │ │ │ +1017 * for @c float argument @f$ s @f$. │ │ │ │ +1018 * │ │ │ │ +1019 * @see riemann_zeta for more details. │ │ │ │ +1020 */ │ │ │ │ +1021 inline float │ │ │ │ +_1_0_2_2 _r_i_e_m_a_n_n___z_e_t_a_f(float _____s) │ │ │ │ +1023 { return __detail::__riemann_zeta(_____s); } │ │ │ │ +1024 │ │ │ │ +1025 /** │ │ │ │ +1026 * Return the Riemann zeta function @f$ \zeta(s) @f$ │ │ │ │ +1027 * for long double argument @f$ s @f$. │ │ │ │ +1028 * │ │ │ │ +1029 * @see riemann_zeta for more details. │ │ │ │ +1030 */ │ │ │ │ +1031 inline long double │ │ │ │ +_1_0_3_2 _r_i_e_m_a_n_n___z_e_t_a_l(long double _____s) │ │ │ │ +1033 { return __detail::__riemann_zeta(_____s); } │ │ │ │ +1034 │ │ │ │ +1035 /** │ │ │ │ +1036 * Return the Riemann zeta function @f$ \zeta(s) @f$ │ │ │ │ +1037 * for real argument @f$ s @f$. │ │ │ │ +1038 * │ │ │ │ +1039 * The Riemann zeta function is defined by: │ │ │ │ +1040 * @f[ │ │ │ │ +1041 * \zeta(s) = \sum_{k=1}^{\infty} k^{-s} \hbox{ for } s > 1 │ │ │ │ +1042 * @f] │ │ │ │ +1043 * and │ │ │ │ +1044 * @f[ │ │ │ │ +1045 * \zeta(s) = \frac{1}{1-2^{1-s}}\sum_{k=1}^{\infty}(-1)^{k-1}k^{-s} │ │ │ │ +1046 * \hbox{ for } 0 <= s <= 1 │ │ │ │ +1047 * @f] │ │ │ │ +1048 * For s < 1 use the reflection formula: │ │ │ │ +1049 * @f[ │ │ │ │ +1050 * \zeta(s) = 2^s \pi^{s-1} \sin(\frac{\pi s}{2}) \Gamma(1-s) \zeta(1-s) │ │ │ │ +1051 * @f] │ │ │ │ +1052 * │ │ │ │ +1053 * @tparam _Tp The floating-point type of the argument @c __s. │ │ │ │ +1054 * @param __s The argument s != 1 │ │ │ │ +1055 */ │ │ │ │ +1056 template │ │ │ │ +1057 inline typename __gnu_cxx::__promote<_Tp>::__type │ │ │ │ +_1_0_5_8 _r_i_e_m_a_n_n___z_e_t_a(_Tp _____s) │ │ │ │ +1059 { │ │ │ │ +1060 typedef typename __gnu_cxx::__promote<_Tp>::__type __type; │ │ │ │ +1061 return __detail::__riemann_zeta<__type>(_____s); │ │ │ │ +1062 } │ │ │ │ +1063 │ │ │ │ +1064 // Spherical Bessel functions │ │ │ │ +1065 │ │ │ │ +1066 /** │ │ │ │ +1067 * Return the spherical Bessel function @f$ j_n(x) @f$ of nonnegative order │ │ │ │ +n │ │ │ │ +1068 * and @c float argument @f$ x >= 0 @f$. │ │ │ │ +1069 * │ │ │ │ +1070 * @see sph_bessel for more details. │ │ │ │ +1071 */ │ │ │ │ +1072 inline float │ │ │ │ +_1_0_7_3 _s_p_h___b_e_s_s_e_l_f(unsigned int __n, float __x) │ │ │ │ +1074 { return __detail::__sph_bessel(__n, __x); } │ │ │ │ +1075 │ │ │ │ +1076 /** │ │ │ │ +1077 * Return the spherical Bessel function @f$ j_n(x) @f$ of nonnegative order │ │ │ │ +n │ │ │ │ +1078 * and long double argument @f$ x >= 0 @f$. │ │ │ │ +1079 * │ │ │ │ +1080 * @see sph_bessel for more details. │ │ │ │ +1081 */ │ │ │ │ +1082 inline long double │ │ │ │ +_1_0_8_3 _s_p_h___b_e_s_s_e_l_l(unsigned int __n, long double __x) │ │ │ │ +1084 { return __detail::__sph_bessel(__n, __x); } │ │ │ │ +1085 │ │ │ │ +1086 /** │ │ │ │ +1087 * Return the spherical Bessel function @f$ j_n(x) @f$ of nonnegative order │ │ │ │ +n │ │ │ │ +1088 * and real argument @f$ x >= 0 @f$. │ │ │ │ +1089 * │ │ │ │ +1090 * The spherical Bessel function is defined by: │ │ │ │ +1091 * @f[ │ │ │ │ +1092 * j_n(x) = \left(\frac{\pi}{2x} \right) ^{1/2} J_{n+1/2}(x) │ │ │ │ +1093 * @f] │ │ │ │ +1094 * │ │ │ │ +1095 * @tparam _Tp The floating-point type of the argument @c __x. │ │ │ │ +1096 * @param __n The integral order n >= 0 │ │ │ │ +1097 * @param __x The real argument x >= 0 │ │ │ │ +1098 * @throw std::domain_error if __x < 0 . │ │ │ │ +1099 */ │ │ │ │ +1100 template │ │ │ │ +1101 inline typename __gnu_cxx::__promote<_Tp>::__type │ │ │ │ +_1_1_0_2 _s_p_h___b_e_s_s_e_l(unsigned int __n, _Tp __x) │ │ │ │ +1103 { │ │ │ │ +1104 typedef typename __gnu_cxx::__promote<_Tp>::__type __type; │ │ │ │ +1105 return __detail::__sph_bessel<__type>(__n, __x); │ │ │ │ +1106 } │ │ │ │ +1107 │ │ │ │ +1108 // Spherical associated Legendre functions │ │ │ │ +1109 │ │ │ │ +1110 /** │ │ │ │ +1111 * Return the spherical Legendre function of nonnegative integral │ │ │ │ +1112 * degree @c l and order @c m and float angle @f$ \theta @f$ in radians. │ │ │ │ +1113 * │ │ │ │ +1114 * @see sph_legendre for details. │ │ │ │ +1115 */ │ │ │ │ +1116 inline float │ │ │ │ +_1_1_1_7 _s_p_h___l_e_g_e_n_d_r_e_f(unsigned int _____l, unsigned int _____m, float _____t_h_e_t_a) │ │ │ │ +1118 { return __detail::__sph_legendre(_____l, _____m, _____t_h_e_t_a); } │ │ │ │ +1119 │ │ │ │ +1120 /** │ │ │ │ +1121 * Return the spherical Legendre function of nonnegative integral │ │ │ │ +1122 * degree @c l and order @c m and long double angle @f$ \theta @f$ │ │ │ │ +1123 * in radians. │ │ │ │ +1124 * │ │ │ │ +1125 * @see sph_legendre for details. │ │ │ │ +1126 */ │ │ │ │ +1127 inline long double │ │ │ │ +_1_1_2_8 _s_p_h___l_e_g_e_n_d_r_e_l(unsigned int _____l, unsigned int _____m, long double _____t_h_e_t_a) │ │ │ │ +1129 { return __detail::__sph_legendre(_____l, _____m, _____t_h_e_t_a); } │ │ │ │ +1130 │ │ │ │ +1131 /** │ │ │ │ +1132 * Return the spherical Legendre function of nonnegative integral │ │ │ │ +1133 * degree @c l and order @c m and real angle @f$ \theta @f$ in radians. │ │ │ │ +1134 * │ │ │ │ +1135 * The spherical Legendre function is defined by │ │ │ │ +1136 * @f[ │ │ │ │ +1137 * Y_l^m(\theta,\phi) = (-1)^m[\frac{(2l+1)}{4\pi} │ │ │ │ +1138 * \frac{(l-m)!}{(l+m)!}] │ │ │ │ +1139 * P_l^m(\cos\theta) \exp^{im\phi} │ │ │ │ +1140 * @f] │ │ │ │ +1141 * │ │ │ │ +1142 * @tparam _Tp The floating-point type of the angle @c __theta. │ │ │ │ +1143 * @param __l The order __l >= 0 │ │ │ │ +1144 * @param __m The degree __m >= 0 and __m <= __l │ │ │ │ +1145 * @param __theta The radian polar angle argument │ │ │ │ +1146 */ │ │ │ │ +1147 template │ │ │ │ +1148 inline typename __gnu_cxx::__promote<_Tp>::__type │ │ │ │ +_1_1_4_9 _s_p_h___l_e_g_e_n_d_r_e(unsigned int _____l, unsigned int _____m, _Tp _____t_h_e_t_a) │ │ │ │ +1150 { │ │ │ │ +1151 typedef typename __gnu_cxx::__promote<_Tp>::__type __type; │ │ │ │ +1152 return __detail::__sph_legendre<__type>(_____l, _____m, _____t_h_e_t_a); │ │ │ │ +1153 } │ │ │ │ +1154 │ │ │ │ +1155 // Spherical Neumann functions │ │ │ │ +1156 │ │ │ │ +1157 /** │ │ │ │ +1158 * Return the spherical Neumann function of integral order @f$ n >= 0 @f$ │ │ │ │ +1159 * and @c float argument @f$ x >= 0 @f$. │ │ │ │ +1160 * │ │ │ │ +1161 * @see sph_neumann for details. │ │ │ │ +1162 */ │ │ │ │ +1163 inline float │ │ │ │ +_1_1_6_4 _s_p_h___n_e_u_m_a_n_n_f(unsigned int __n, float __x) │ │ │ │ +1165 { return __detail::__sph_neumann(__n, __x); } │ │ │ │ +1166 │ │ │ │ +1167 /** │ │ │ │ +1168 * Return the spherical Neumann function of integral order @f$ n >= 0 @f$ │ │ │ │ +1169 * and long double @f$ x >= 0 @f$. │ │ │ │ +1170 * │ │ │ │ +1171 * @see sph_neumann for details. │ │ │ │ +1172 */ │ │ │ │ +1173 inline long double │ │ │ │ +_1_1_7_4 _s_p_h___n_e_u_m_a_n_n_l(unsigned int __n, long double __x) │ │ │ │ +1175 { return __detail::__sph_neumann(__n, __x); } │ │ │ │ +1176 │ │ │ │ +1177 /** │ │ │ │ +1178 * Return the spherical Neumann function of integral order @f$ n >= 0 @f$ │ │ │ │ +1179 * and real argument @f$ x >= 0 @f$. │ │ │ │ +1180 * │ │ │ │ +1181 * The spherical Neumann function is defined by │ │ │ │ +1182 * @f[ │ │ │ │ +1183 * n_n(x) = \left(\frac{\pi}{2x} \right) ^{1/2} N_{n+1/2}(x) │ │ │ │ +1184 * @f] │ │ │ │ +1185 * │ │ │ │ +1186 * @tparam _Tp The floating-point type of the argument @c __x. │ │ │ │ +1187 * @param __n The integral order n >= 0 │ │ │ │ +1188 * @param __x The real argument __x >= 0 │ │ │ │ +1189 * @throw std::domain_error if __x < 0 . │ │ │ │ +1190 */ │ │ │ │ +1191 template │ │ │ │ +1192 inline typename __gnu_cxx::__promote<_Tp>::__type │ │ │ │ +_1_1_9_3 _s_p_h___n_e_u_m_a_n_n(unsigned int __n, _Tp __x) │ │ │ │ +1194 { │ │ │ │ +1195 typedef typename __gnu_cxx::__promote<_Tp>::__type __type; │ │ │ │ +1196 return __detail::__sph_neumann<__type>(__n, __x); │ │ │ │ +1197 } │ │ │ │ +1198 │ │ │ │ +1199 /// @} group mathsf │ │ │ │ +1200 │ │ │ │ +1201_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ +1202} // namespace std │ │ │ │ +1203 │ │ │ │ +1204#ifndef __STRICT_ANSI__ │ │ │ │ +1205namespace _____g_n_u___c_x_x _GLIBCXX_VISIBILITY(default) │ │ │ │ +1206{ │ │ │ │ +1207_GLIBCXX_BEGIN_NAMESPACE_VERSION │ │ │ │ +1208 │ │ │ │ +1209 /** @addtogroup mathsf │ │ │ │ +1210 * @{ │ │ │ │ +1211 */ │ │ │ │ +1212 │ │ │ │ +1213 // Airy functions │ │ │ │ +1214 │ │ │ │ +1215 /** │ │ │ │ +1216 * Return the Airy function @f$ Ai(x) @f$ of @c float argument x. │ │ │ │ +1217 */ │ │ │ │ +1218 inline float │ │ │ │ +_1_2_1_9 _a_i_r_y___a_i_f(float __x) │ │ │ │ +1220 { │ │ │ │ +1221 float __Ai, __Bi, __Aip, __Bip; │ │ │ │ +1222 std::__detail::__airy(__x, __Ai, __Bi, __Aip, __Bip); │ │ │ │ +1223 return __Ai; │ │ │ │ +1224 } │ │ │ │ +1225 │ │ │ │ +1226 /** │ │ │ │ +1227 * Return the Airy function @f$ Ai(x) @f$ of long double argument │ │ │ │ +x. │ │ │ │ +1228 */ │ │ │ │ +1229 inline long double │ │ │ │ +_1_2_3_0 _a_i_r_y___a_i_l(long double __x) │ │ │ │ +1231 { │ │ │ │ +1232 long double __Ai, __Bi, __Aip, __Bip; │ │ │ │ +1233 std::__detail::__airy(__x, __Ai, __Bi, __Aip, __Bip); │ │ │ │ +1234 return __Ai; │ │ │ │ +1235 } │ │ │ │ +1236 │ │ │ │ +1237 /** │ │ │ │ +1238 * Return the Airy function @f$ Ai(x) @f$ of real argument x. │ │ │ │ +1239 */ │ │ │ │ +1240 template │ │ │ │ +1241 inline typename __gnu_cxx::__promote<_Tp>::__type │ │ │ │ +_1_2_4_2 _a_i_r_y___a_i(_Tp __x) │ │ │ │ +1243 { │ │ │ │ +1244 typedef typename __gnu_cxx::__promote<_Tp>::__type __type; │ │ │ │ +1245 __type __Ai, __Bi, __Aip, __Bip; │ │ │ │ +1246 std::__detail::__airy<__type>(__x, __Ai, __Bi, __Aip, __Bip); │ │ │ │ +1247 return __Ai; │ │ │ │ +1248 } │ │ │ │ +1249 │ │ │ │ +1250 /** │ │ │ │ +1251 * Return the Airy function @f$ Bi(x) @f$ of @c float argument x. │ │ │ │ +1252 */ │ │ │ │ +1253 inline float │ │ │ │ +_1_2_5_4 _a_i_r_y___b_i_f(float __x) │ │ │ │ +1255 { │ │ │ │ +1256 float __Ai, __Bi, __Aip, __Bip; │ │ │ │ +1257 std::__detail::__airy(__x, __Ai, __Bi, __Aip, __Bip); │ │ │ │ +1258 return __Bi; │ │ │ │ +1259 } │ │ │ │ +1260 │ │ │ │ +1261 /** │ │ │ │ +1262 * Return the Airy function @f$ Bi(x) @f$ of long double argument │ │ │ │ +x. │ │ │ │ +1263 */ │ │ │ │ +1264 inline long double │ │ │ │ +_1_2_6_5 _a_i_r_y___b_i_l(long double __x) │ │ │ │ +1266 { │ │ │ │ +1267 long double __Ai, __Bi, __Aip, __Bip; │ │ │ │ +1268 std::__detail::__airy(__x, __Ai, __Bi, __Aip, __Bip); │ │ │ │ +1269 return __Bi; │ │ │ │ +1270 } │ │ │ │ +1271 │ │ │ │ +1272 /** │ │ │ │ +1273 * Return the Airy function @f$ Bi(x) @f$ of real argument x. │ │ │ │ +1274 */ │ │ │ │ +1275 template │ │ │ │ +1276 inline typename __gnu_cxx::__promote<_Tp>::__type │ │ │ │ +_1_2_7_7 _a_i_r_y___b_i(_Tp __x) │ │ │ │ +1278 { │ │ │ │ +1279 typedef typename __gnu_cxx::__promote<_Tp>::__type __type; │ │ │ │ +1280 __type __Ai, __Bi, __Aip, __Bip; │ │ │ │ +1281 std::__detail::__airy<__type>(__x, __Ai, __Bi, __Aip, __Bip); │ │ │ │ +1282 return __Bi; │ │ │ │ +1283 } │ │ │ │ +1284 │ │ │ │ +1285 // Confluent hypergeometric functions │ │ │ │ +1286 │ │ │ │ +1287 /** │ │ │ │ +1288 * Return the confluent hypergeometric function @f$ {}_1F_1(a;c;x) @f$ │ │ │ │ +1289 * of @c float numeratorial parameter @c a, denominatorial parameter @c c, │ │ │ │ +1290 * and argument @c x. │ │ │ │ +1291 * │ │ │ │ +1292 * @see conf_hyperg for details. │ │ │ │ +1293 */ │ │ │ │ +1294 inline float │ │ │ │ +_1_2_9_5 _c_o_n_f___h_y_p_e_r_g_f(float __a, float __c, float __x) │ │ │ │ +1296 { return std::__detail::__conf_hyperg(__a, __c, __x); } │ │ │ │ +1297 │ │ │ │ +1298 /** │ │ │ │ +1299 * Return the confluent hypergeometric function @f$ {}_1F_1(a;c;x) @f$ │ │ │ │ +1300 * of long double numeratorial parameter @c a, │ │ │ │ +1301 * denominatorial parameter @c c, and argument @c x. │ │ │ │ +1302 * │ │ │ │ +1303 * @see conf_hyperg for details. │ │ │ │ +1304 */ │ │ │ │ +1305 inline long double │ │ │ │ +_1_3_0_6 _c_o_n_f___h_y_p_e_r_g_l(long double __a, long double __c, long double __x) │ │ │ │ +1307 { return std::__detail::__conf_hyperg(__a, __c, __x); } │ │ │ │ +1308 │ │ │ │ +1309 /** │ │ │ │ +1310 * Return the confluent hypergeometric function @f$ {}_1F_1(a;c;x) @f$ │ │ │ │ +1311 * of real numeratorial parameter @c a, denominatorial parameter @c c, │ │ │ │ +1312 * and argument @c x. │ │ │ │ +1313 * │ │ │ │ +1314 * The confluent hypergeometric function is defined by │ │ │ │ +1315 * @f[ │ │ │ │ +1316 * {}_1F_1(a;c;x) = \sum_{n=0}^{\infty} \frac{(a)_n x^n}{(c)_n n!} │ │ │ │ +1317 * @f] │ │ │ │ +1318 * where the Pochhammer symbol is @f$ (x)_k = (x)(x+1)...(x+k-1) @f$, │ │ │ │ +1319 * @f$ (x)_0 = 1 @f$ │ │ │ │ +1320 * │ │ │ │ +1321 * @param __a The numeratorial parameter │ │ │ │ +1322 * @param __c The denominatorial parameter │ │ │ │ +1323 * @param __x The argument │ │ │ │ +1324 */ │ │ │ │ +1325 template │ │ │ │ +1326 inline typename __gnu_cxx::__promote_3<_Tpa, _Tpc, _Tp>::__type │ │ │ │ +_1_3_2_7 _c_o_n_f___h_y_p_e_r_g(_Tpa __a, _Tpc __c, _Tp __x) │ │ │ │ +1328 { │ │ │ │ +1329 typedef typename __gnu_cxx::__promote_3<_Tpa, _Tpc, _Tp>::__type __type; │ │ │ │ +1330 return std::__detail::__conf_hyperg<__type>(__a, __c, __x); │ │ │ │ +1331 } │ │ │ │ +1332 │ │ │ │ +1333 // Hypergeometric functions │ │ │ │ +1334 │ │ │ │ +1335 /** │ │ │ │ +1336 * Return the hypergeometric function @f$ {}_2F_1(a,b;c;x) @f$ │ │ │ │ +1337 * of @ float numeratorial parameters @c a and @c b, │ │ │ │ +1338 * denominatorial parameter @c c, and argument @c x. │ │ │ │ +1339 * │ │ │ │ +1340 * @see hyperg for details. │ │ │ │ +1341 */ │ │ │ │ +1342 inline float │ │ │ │ +_1_3_4_3 _h_y_p_e_r_g_f(float __a, float __b, float __c, float __x) │ │ │ │ +1344 { return std::__detail::__hyperg(__a, __b, __c, __x); } │ │ │ │ +1345 │ │ │ │ +1346 /** │ │ │ │ +1347 * Return the hypergeometric function @f$ {}_2F_1(a,b;c;x) @f$ │ │ │ │ +1348 * of long double numeratorial parameters @c a and @c b, │ │ │ │ +1349 * denominatorial parameter @c c, and argument @c x. │ │ │ │ +1350 * │ │ │ │ +1351 * @see hyperg for details. │ │ │ │ +1352 */ │ │ │ │ +1353 inline long double │ │ │ │ +_1_3_5_4 _h_y_p_e_r_g_l(long double __a, long double __b, long double __c, long double │ │ │ │ +__x) │ │ │ │ +1355 { return std::__detail::__hyperg(__a, __b, __c, __x); } │ │ │ │ +1356 │ │ │ │ +1357 /** │ │ │ │ +1358 * Return the hypergeometric function @f$ {}_2F_1(a,b;c;x) @f$ │ │ │ │ +1359 * of real numeratorial parameters @c a and @c b, │ │ │ │ +1360 * denominatorial parameter @c c, and argument @c x. │ │ │ │ +1361 * │ │ │ │ +1362 * The hypergeometric function is defined by │ │ │ │ +1363 * @f[ │ │ │ │ +1364 * {}_2F_1(a;c;x) = \sum_{n=0}^{\infty} \frac{(a)_n (b)_n x^n}{(c)_n n!} │ │ │ │ +1365 * @f] │ │ │ │ +1366 * where the Pochhammer symbol is @f$ (x)_k = (x)(x+1)...(x+k-1) @f$, │ │ │ │ +1367 * @f$ (x)_0 = 1 @f$ │ │ │ │ +1368 * │ │ │ │ +1369 * @param __a The first numeratorial parameter │ │ │ │ +1370 * @param __b The second numeratorial parameter │ │ │ │ +1371 * @param __c The denominatorial parameter │ │ │ │ +1372 * @param __x The argument │ │ │ │ +1373 */ │ │ │ │ +1374 template │ │ │ │ +1375 inline typename __gnu_cxx::__promote_4<_Tpa, _Tpb, _Tpc, _Tp>::__type │ │ │ │ +_1_3_7_6 _h_y_p_e_r_g(_Tpa __a, _Tpb __b, _Tpc __c, _Tp __x) │ │ │ │ +1377 { │ │ │ │ +1378 typedef typename __gnu_cxx::__promote_4<_Tpa, _Tpb, _Tpc, _Tp> │ │ │ │ +1379 ::__type __type; │ │ │ │ +1380 return std::__detail::__hyperg<__type>(__a, __b, __c, __x); │ │ │ │ +1381 } │ │ │ │ +1382 │ │ │ │ +1383 /// @} │ │ │ │ +1384_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ +1385} // namespace __gnu_cxx │ │ │ │ +1386#endif // __STRICT_ANSI__ │ │ │ │ +1387 │ │ │ │ +1388#pragma GCC visibility pop │ │ │ │ +1389 │ │ │ │ +1390#endif // _GLIBCXX_BITS_SPECFUN_H │ │ │ │ +_l_i_m_i_t_s │ │ │ │ +_t_y_p_e___t_r_a_i_t_s │ │ │ │ +_s_t_l___a_l_g_o_b_a_s_e_._h │ │ │ │ +_c_+_+_c_o_n_f_i_g_._h │ │ │ │ +_s_t_d_:_:_s_p_h___b_e_s_s_e_l │ │ │ │ +__gnu_cxx::__promote< _Tp >::__type sph_bessel(unsigned int __n, _Tp __x) │ │ │ │ +DDeeffiinniittiioonn _s_p_e_c_f_u_n_._h_:_1_1_0_2 │ │ │ │ +_____g_n_u___c_x_x_:_:_c_o_n_f___h_y_p_e_r_g_l │ │ │ │ +long double conf_hypergl(long double __a, long double __c, long double __x) │ │ │ │ +DDeeffiinniittiioonn _s_p_e_c_f_u_n_._h_:_1_3_0_6 │ │ │ │ +_s_t_d_:_:_s_p_h___b_e_s_s_e_l_l │ │ │ │ +long double sph_bessell(unsigned int __n, long double __x) │ │ │ │ +DDeeffiinniittiioonn _s_p_e_c_f_u_n_._h_:_1_0_8_3 │ │ │ │ +_s_t_d_:_:_b_e_t_a_f │ │ │ │ +float betaf(float __a, float __b) │ │ │ │ +DDeeffiinniittiioonn _s_p_e_c_f_u_n_._h_:_3_1_2 │ │ │ │ +_s_t_d_:_:_e_x_p_i_n_t_l │ │ │ │ +long double expintl(long double __x) │ │ │ │ +DDeeffiinniittiioonn _s_p_e_c_f_u_n_._h_:_8_5_4 │ │ │ │ +_s_t_d_:_:_c_y_l___b_e_s_s_e_l___j_f │ │ │ │ +float cyl_bessel_jf(float __nu, float __x) │ │ │ │ +DDeeffiinniittiioonn _s_p_e_c_f_u_n_._h_:_5_5_0 │ │ │ │ +_s_t_d_:_:_c_y_l___b_e_s_s_e_l___k │ │ │ │ +__gnu_cxx::__promote_2< _Tpnu, _Tp >::__type cyl_bessel_k(_Tpnu __nu, _Tp __x) │ │ │ │ +DDeeffiinniittiioonn _s_p_e_c_f_u_n_._h_:_6_3_3 │ │ │ │ +_s_t_d_:_:_e_l_l_i_n_t___3_f │ │ │ │ +float ellint_3f(float __k, float __nu, float __phi) │ │ │ │ +Return the incomplete elliptic integral of the third kind for float argument. │ │ │ │ +DDeeffiinniittiioonn _s_p_e_c_f_u_n_._h_:_7_9_2 │ │ │ │ +_s_t_d_:_:_l_e_g_e_n_d_r_e_l │ │ │ │ +long double legendrel(unsigned int __l, long double __x) │ │ │ │ +DDeeffiinniittiioonn _s_p_e_c_f_u_n_._h_:_9_8_7 │ │ │ │ +_s_t_d_:_:_c_o_m_p___e_l_l_i_n_t___3_l │ │ │ │ +long double comp_ellint_3l(long double __k, long double __nu) │ │ │ │ +Return the complete elliptic integral of the third kind for long double modulus │ │ │ │ +k. │ │ │ │ +DDeeffiinniittiioonn _s_p_e_c_f_u_n_._h_:_4_6_3 │ │ │ │ +_s_t_d_:_:_r_i_e_m_a_n_n___z_e_t_a_l │ │ │ │ +long double riemann_zetal(long double __s) │ │ │ │ +DDeeffiinniittiioonn _s_p_e_c_f_u_n_._h_:_1_0_3_2 │ │ │ │ +_s_t_d_:_:_c_y_l___b_e_s_s_e_l___k_f │ │ │ │ +float cyl_bessel_kf(float __nu, float __x) │ │ │ │ +DDeeffiinniittiioonn _s_p_e_c_f_u_n_._h_:_5_9_6 │ │ │ │ +_s_t_d_:_:_c_o_m_p___e_l_l_i_n_t___2_f │ │ │ │ +float comp_ellint_2f(float __k) │ │ │ │ +DDeeffiinniittiioonn _s_p_e_c_f_u_n_._h_:_4_0_6 │ │ │ │ +_s_t_d_:_:_h_e_r_m_i_t_e_l │ │ │ │ +long double hermitel(unsigned int __n, long double __x) │ │ │ │ +DDeeffiinniittiioonn _s_p_e_c_f_u_n_._h_:_8_9_5 │ │ │ │ +_____g_n_u___c_x_x_:_:_a_i_r_y___b_i_f │ │ │ │ +float airy_bif(float __x) │ │ │ │ +DDeeffiinniittiioonn _s_p_e_c_f_u_n_._h_:_1_2_5_4 │ │ │ │ +_s_t_d_:_:_e_l_l_i_n_t___1 │ │ │ │ +__gnu_cxx::__promote_2< _Tp, _Tpp >::__type ellint_1(_Tp __k, _Tpp __phi) │ │ │ │ +DDeeffiinniittiioonn _s_p_e_c_f_u_n_._h_:_7_2_9 │ │ │ │ +_s_t_d_:_:_s_p_h___l_e_g_e_n_d_r_e_l │ │ │ │ +long double sph_legendrel(unsigned int __l, unsigned int __m, long double │ │ │ │ +__theta) │ │ │ │ +DDeeffiinniittiioonn _s_p_e_c_f_u_n_._h_:_1_1_2_8 │ │ │ │ +_s_t_d_:_:_e_l_l_i_n_t___1_f │ │ │ │ +float ellint_1f(float __k, float __phi) │ │ │ │ +DDeeffiinniittiioonn _s_p_e_c_f_u_n_._h_:_6_9_6 │ │ │ │ +_s_t_d_:_:_c_y_l___n_e_u_m_a_n_n │ │ │ │ +__gnu_cxx::__promote_2< _Tpnu, _Tp >::__type cyl_neumann(_Tpnu __nu, _Tp __x) │ │ │ │ +DDeeffiinniittiioonn _s_p_e_c_f_u_n_._h_:_6_8_1 │ │ │ │ +_s_t_d_:_:_a_s_s_o_c___l_e_g_e_n_d_r_e_f │ │ │ │ +float assoc_legendref(unsigned int __l, unsigned int __m, float __x) │ │ │ │ +DDeeffiinniittiioonn _s_p_e_c_f_u_n_._h_:_2_6_7 │ │ │ │ +_s_t_d_:_:_s_p_h___n_e_u_m_a_n_n_l │ │ │ │ +long double sph_neumannl(unsigned int __n, long double __x) │ │ │ │ +DDeeffiinniittiioonn _s_p_e_c_f_u_n_._h_:_1_1_7_4 │ │ │ │ +_____g_n_u___c_x_x_:_:_h_y_p_e_r_g │ │ │ │ +__gnu_cxx::__promote_4< _Tpa, _Tpb, _Tpc, _Tp >::__type hyperg(_Tpa __a, _Tpb │ │ │ │ +__b, _Tpc __c, _Tp __x) │ │ │ │ +DDeeffiinniittiioonn _s_p_e_c_f_u_n_._h_:_1_3_7_6 │ │ │ │ +_s_t_d_:_:_c_o_m_p___e_l_l_i_n_t___2_l │ │ │ │ +long double comp_ellint_2l(long double __k) │ │ │ │ +DDeeffiinniittiioonn _s_p_e_c_f_u_n_._h_:_4_1_6 │ │ │ │ +_____g_n_u___c_x_x_:_:_a_i_r_y___b_i │ │ │ │ +__gnu_cxx::__promote< _Tp >::__type airy_bi(_Tp __x) │ │ │ │ +DDeeffiinniittiioonn _s_p_e_c_f_u_n_._h_:_1_2_7_7 │ │ │ │ +_s_t_d_:_:_c_o_m_p___e_l_l_i_n_t___2 │ │ │ │ +__gnu_cxx::__promote< _Tp >::__type comp_ellint_2(_Tp __k) │ │ │ │ +DDeeffiinniittiioonn _s_p_e_c_f_u_n_._h_:_4_3_8 │ │ │ │ +_s_t_d_:_:_s_p_h___b_e_s_s_e_l_f │ │ │ │ +float sph_besself(unsigned int __n, float __x) │ │ │ │ +DDeeffiinniittiioonn _s_p_e_c_f_u_n_._h_:_1_0_7_3 │ │ │ │ +_s_t_d_:_:_a_s_s_o_c___l_e_g_e_n_d_r_e_l │ │ │ │ +long double assoc_legendrel(unsigned int __l, unsigned int __m, long double │ │ │ │ +__x) │ │ │ │ +DDeeffiinniittiioonn _s_p_e_c_f_u_n_._h_:_2_7_6 │ │ │ │ +_s_t_d_:_:_l_e_g_e_n_d_r_e │ │ │ │ +__gnu_cxx::__promote< _Tp >::__type legendre(unsigned int __l, _Tp __x) │ │ │ │ +DDeeffiinniittiioonn _s_p_e_c_f_u_n_._h_:_1_0_0_7 │ │ │ │ +_s_t_d_:_:_e_x_p_i_n_t_f │ │ │ │ +float expintf(float __x) │ │ │ │ +DDeeffiinniittiioonn _s_p_e_c_f_u_n_._h_:_8_4_4 │ │ │ │ +_____g_n_u___c_x_x_:_:_a_i_r_y___b_i_l │ │ │ │ +long double airy_bil(long double __x) │ │ │ │ +DDeeffiinniittiioonn _s_p_e_c_f_u_n_._h_:_1_2_6_5 │ │ │ │ +_s_t_d_:_:_e_l_l_i_n_t___2_f │ │ │ │ +float ellint_2f(float __k, float __phi) │ │ │ │ +Return the incomplete elliptic integral of the second kind for float argument. │ │ │ │ +DDeeffiinniittiioonn _s_p_e_c_f_u_n_._h_:_7_4_4 │ │ │ │ +_s_t_d_:_:_e_l_l_i_n_t___2_l │ │ │ │ +long double ellint_2l(long double __k, long double __phi) │ │ │ │ +Return the incomplete elliptic integral of the second kind . │ │ │ │ +DDeeffiinniittiioonn _s_p_e_c_f_u_n_._h_:_7_5_4 │ │ │ │ +_s_t_d_:_:_c_y_l___n_e_u_m_a_n_n_f │ │ │ │ +float cyl_neumannf(float __nu, float __x) │ │ │ │ +DDeeffiinniittiioonn _s_p_e_c_f_u_n_._h_:_6_4_8 │ │ │ │ +_s_t_d_:_:_b_e_t_a │ │ │ │ +__gnu_cxx::__promote_2< _Tpa, _Tpb >::__type beta(_Tpa __a, _Tpb __b) │ │ │ │ +DDeeffiinniittiioonn _s_p_e_c_f_u_n_._h_:_3_4_3 │ │ │ │ +_s_t_d_:_:_c_o_m_p___e_l_l_i_n_t___1_l │ │ │ │ +long double comp_ellint_1l(long double __k) │ │ │ │ +DDeeffiinniittiioonn _s_p_e_c_f_u_n_._h_:_3_6_8 │ │ │ │ +_s_t_d_:_:_c_o_m_p___e_l_l_i_n_t___3_f │ │ │ │ +float comp_ellint_3f(float __k, float __nu) │ │ │ │ +Return the complete elliptic integral of the third kind for float modulus k. │ │ │ │ +DDeeffiinniittiioonn _s_p_e_c_f_u_n_._h_:_4_5_3 │ │ │ │ +_s_t_d_:_:_s_p_h___n_e_u_m_a_n_n_f │ │ │ │ +float sph_neumannf(unsigned int __n, float __x) │ │ │ │ +DDeeffiinniittiioonn _s_p_e_c_f_u_n_._h_:_1_1_6_4 │ │ │ │ +_s_t_d_:_:_e_x_p_i_n_t │ │ │ │ +__gnu_cxx::__promote< _Tp >::__type expint(_Tp __x) │ │ │ │ +DDeeffiinniittiioonn _s_p_e_c_f_u_n_._h_:_8_7_0 │ │ │ │ +_s_t_d_:_:_e_l_l_i_n_t___1_l │ │ │ │ +long double ellint_1l(long double __k, long double __phi) │ │ │ │ +DDeeffiinniittiioonn _s_p_e_c_f_u_n_._h_:_7_0_6 │ │ │ │ +_s_t_d_:_:_c_o_m_p___e_l_l_i_n_t___1_f │ │ │ │ +float comp_ellint_1f(float __k) │ │ │ │ +DDeeffiinniittiioonn _s_p_e_c_f_u_n_._h_:_3_5_8 │ │ │ │ +_____g_n_u___c_x_x_:_:_a_i_r_y___a_i_l │ │ │ │ +long double airy_ail(long double __x) │ │ │ │ +DDeeffiinniittiioonn _s_p_e_c_f_u_n_._h_:_1_2_3_0 │ │ │ │ +_s_t_d_:_:_b_e_t_a_l │ │ │ │ +long double betal(long double __a, long double __b) │ │ │ │ +DDeeffiinniittiioonn _s_p_e_c_f_u_n_._h_:_3_2_2 │ │ │ │ +_____g_n_u___c_x_x_:_:_c_o_n_f___h_y_p_e_r_g │ │ │ │ +__gnu_cxx::__promote_3< _Tpa, _Tpc, _Tp >::__type conf_hyperg(_Tpa __a, _Tpc │ │ │ │ +__c, _Tp __x) │ │ │ │ +DDeeffiinniittiioonn _s_p_e_c_f_u_n_._h_:_1_3_2_7 │ │ │ │ +_s_t_d_:_:_h_e_r_m_i_t_e_f │ │ │ │ +float hermitef(unsigned int __n, float __x) │ │ │ │ +DDeeffiinniittiioonn _s_p_e_c_f_u_n_._h_:_8_8_5 │ │ │ │ +_s_t_d_:_:_r_i_e_m_a_n_n___z_e_t_a │ │ │ │ +__gnu_cxx::__promote< _Tp >::__type riemann_zeta(_Tp __s) │ │ │ │ +DDeeffiinniittiioonn _s_p_e_c_f_u_n_._h_:_1_0_5_8 │ │ │ │ +_____g_n_u___c_x_x_:_:_h_y_p_e_r_g_l │ │ │ │ +long double hypergl(long double __a, long double __b, long double __c, long │ │ │ │ +double __x) │ │ │ │ +DDeeffiinniittiioonn _s_p_e_c_f_u_n_._h_:_1_3_5_4 │ │ │ │ +_s_t_d_:_:_e_l_l_i_n_t___3_l │ │ │ │ +long double ellint_3l(long double __k, long double __nu, long double __phi) │ │ │ │ +Return the incomplete elliptic integral of the third kind . │ │ │ │ +DDeeffiinniittiioonn _s_p_e_c_f_u_n_._h_:_8_0_2 │ │ │ │ +_s_t_d_:_:_s_p_h___l_e_g_e_n_d_r_e_f │ │ │ │ +float sph_legendref(unsigned int __l, unsigned int __m, float __theta) │ │ │ │ +DDeeffiinniittiioonn _s_p_e_c_f_u_n_._h_:_1_1_1_7 │ │ │ │ +_s_t_d_:_:_s_p_h___n_e_u_m_a_n_n │ │ │ │ +__gnu_cxx::__promote< _Tp >::__type sph_neumann(unsigned int __n, _Tp __x) │ │ │ │ +DDeeffiinniittiioonn _s_p_e_c_f_u_n_._h_:_1_1_9_3 │ │ │ │ +_s_t_d_:_:_c_y_l___b_e_s_s_e_l___i_f │ │ │ │ +float cyl_bessel_if(float __nu, float __x) │ │ │ │ +DDeeffiinniittiioonn _s_p_e_c_f_u_n_._h_:_5_0_4 │ │ │ │ +_s_t_d_:_:_l_a_g_u_e_r_r_e_l │ │ │ │ +long double laguerrel(unsigned int __n, long double __x) │ │ │ │ +DDeeffiinniittiioonn _s_p_e_c_f_u_n_._h_:_9_4_3 │ │ │ │ +_s_t_d_:_:_c_y_l___b_e_s_s_e_l___i_l │ │ │ │ +long double cyl_bessel_il(long double __nu, long double __x) │ │ │ │ +DDeeffiinniittiioonn _s_p_e_c_f_u_n_._h_:_5_1_4 │ │ │ │ +_s_t_d_:_:_a_s_s_o_c___l_a_g_u_e_r_r_e │ │ │ │ +__gnu_cxx::__promote< _Tp >::__type assoc_laguerre(unsigned int __n, unsigned │ │ │ │ +int __m, _Tp __x) │ │ │ │ +DDeeffiinniittiioonn _s_p_e_c_f_u_n_._h_:_2_5_2 │ │ │ │ +_____g_n_u___c_x_x_:_:_c_o_n_f___h_y_p_e_r_g_f │ │ │ │ +float conf_hypergf(float __a, float __c, float __x) │ │ │ │ +DDeeffiinniittiioonn _s_p_e_c_f_u_n_._h_:_1_2_9_5 │ │ │ │ +_s_t_d_:_:_c_o_m_p___e_l_l_i_n_t___3 │ │ │ │ +__gnu_cxx::__promote_2< _Tp, _Tpn >::__type comp_ellint_3(_Tp __k, _Tpn __nu) │ │ │ │ +DDeeffiinniittiioonn _s_p_e_c_f_u_n_._h_:_4_8_9 │ │ │ │ +_s_t_d_:_:_s_p_h___l_e_g_e_n_d_r_e │ │ │ │ +__gnu_cxx::__promote< _Tp >::__type sph_legendre(unsigned int __l, unsigned int │ │ │ │ +__m, _Tp __theta) │ │ │ │ +DDeeffiinniittiioonn _s_p_e_c_f_u_n_._h_:_1_1_4_9 │ │ │ │ +_s_t_d_:_:_c_y_l___b_e_s_s_e_l___k_l │ │ │ │ +long double cyl_bessel_kl(long double __nu, long double __x) │ │ │ │ +DDeeffiinniittiioonn _s_p_e_c_f_u_n_._h_:_6_0_6 │ │ │ │ +_____g_n_u___c_x_x_:_:_h_y_p_e_r_g_f │ │ │ │ +float hypergf(float __a, float __b, float __c, float __x) │ │ │ │ +DDeeffiinniittiioonn _s_p_e_c_f_u_n_._h_:_1_3_4_3 │ │ │ │ +_____g_n_u___c_x_x_:_:_a_i_r_y___a_i │ │ │ │ +__gnu_cxx::__promote< _Tp >::__type airy_ai(_Tp __x) │ │ │ │ +DDeeffiinniittiioonn _s_p_e_c_f_u_n_._h_:_1_2_4_2 │ │ │ │ +_s_t_d_:_:_a_s_s_o_c___l_a_g_u_e_r_r_e_l │ │ │ │ +long double assoc_laguerrel(unsigned int __n, unsigned int __m, long double │ │ │ │ +__x) │ │ │ │ +DDeeffiinniittiioonn _s_p_e_c_f_u_n_._h_:_2_1_6 │ │ │ │ +_s_t_d_:_:_h_e_r_m_i_t_e │ │ │ │ +__gnu_cxx::__promote< _Tp >::__type hermite(unsigned int __n, _Tp __x) │ │ │ │ +DDeeffiinniittiioonn _s_p_e_c_f_u_n_._h_:_9_1_8 │ │ │ │ +_s_t_d_:_:_c_y_l___b_e_s_s_e_l___j │ │ │ │ +__gnu_cxx::__promote_2< _Tpnu, _Tp >::__type cyl_bessel_j(_Tpnu __nu, _Tp __x) │ │ │ │ +DDeeffiinniittiioonn _s_p_e_c_f_u_n_._h_:_5_8_1 │ │ │ │ +_s_t_d_:_:_l_a_g_u_e_r_r_e_f │ │ │ │ +float laguerref(unsigned int __n, float __x) │ │ │ │ +DDeeffiinniittiioonn _s_p_e_c_f_u_n_._h_:_9_3_3 │ │ │ │ +_s_t_d_:_:_c_y_l___b_e_s_s_e_l___j_l │ │ │ │ +long double cyl_bessel_jl(long double __nu, long double __x) │ │ │ │ +DDeeffiinniittiioonn _s_p_e_c_f_u_n_._h_:_5_6_0 │ │ │ │ +_s_t_d_:_:_c_o_m_p___e_l_l_i_n_t___1 │ │ │ │ +__gnu_cxx::__promote< _Tp >::__type comp_ellint_1(_Tp __k) │ │ │ │ +DDeeffiinniittiioonn _s_p_e_c_f_u_n_._h_:_3_9_1 │ │ │ │ +_s_t_d_:_:_e_l_l_i_n_t___2 │ │ │ │ +__gnu_cxx::__promote_2< _Tp, _Tpp >::__type ellint_2(_Tp __k, _Tpp __phi) │ │ │ │ +DDeeffiinniittiioonn _s_p_e_c_f_u_n_._h_:_7_7_7 │ │ │ │ +_s_t_d_:_:_l_a_g_u_e_r_r_e │ │ │ │ +__gnu_cxx::__promote< _Tp >::__type laguerre(unsigned int __n, _Tp __x) │ │ │ │ +DDeeffiinniittiioonn _s_p_e_c_f_u_n_._h_:_9_6_2 │ │ │ │ +_s_t_d_:_:_l_e_g_e_n_d_r_e_f │ │ │ │ +float legendref(unsigned int __l, float __x) │ │ │ │ +DDeeffiinniittiioonn _s_p_e_c_f_u_n_._h_:_9_7_7 │ │ │ │ +_s_t_d_:_:_c_y_l___b_e_s_s_e_l___i │ │ │ │ +__gnu_cxx::__promote_2< _Tpnu, _Tp >::__type cyl_bessel_i(_Tpnu __nu, _Tp __x) │ │ │ │ +DDeeffiinniittiioonn _s_p_e_c_f_u_n_._h_:_5_3_5 │ │ │ │ +_____g_n_u___c_x_x_:_:_a_i_r_y___a_i_f │ │ │ │ +float airy_aif(float __x) │ │ │ │ +DDeeffiinniittiioonn _s_p_e_c_f_u_n_._h_:_1_2_1_9 │ │ │ │ +_s_t_d_:_:_a_s_s_o_c___l_e_g_e_n_d_r_e │ │ │ │ +__gnu_cxx::__promote< _Tp >::__type assoc_legendre(unsigned int __l, unsigned │ │ │ │ +int __m, _Tp __x) │ │ │ │ +DDeeffiinniittiioonn _s_p_e_c_f_u_n_._h_:_2_9_8 │ │ │ │ +_s_t_d_:_:_a_s_s_o_c___l_a_g_u_e_r_r_e_f │ │ │ │ +float assoc_laguerref(unsigned int __n, unsigned int __m, float __x) │ │ │ │ +DDeeffiinniittiioonn _s_p_e_c_f_u_n_._h_:_2_0_6 │ │ │ │ +_s_t_d_:_:_c_y_l___n_e_u_m_a_n_n_l │ │ │ │ +long double cyl_neumannl(long double __nu, long double __x) │ │ │ │ +DDeeffiinniittiioonn _s_p_e_c_f_u_n_._h_:_6_5_8 │ │ │ │ +_s_t_d_:_:_r_i_e_m_a_n_n___z_e_t_a_f │ │ │ │ +float riemann_zetaf(float __s) │ │ │ │ +DDeeffiinniittiioonn _s_p_e_c_f_u_n_._h_:_1_0_2_2 │ │ │ │ _s_t_d │ │ │ │ ISO C++ entities toplevel namespace is std. │ │ │ │ +_____g_n_u___c_x_x │ │ │ │ +GNU extensions for public use. │ │ │ │ +_s_t_d_:_:_a_u_t_o___p_t_r___r_e_f │ │ │ │ +DDeeffiinniittiioonn _a_u_t_o___p_t_r_._h_:_4_9 │ │ │ │ * _b_i_t_s │ │ │ │ - * _v_a_l_a_r_r_a_y___b_e_f_o_r_e_._h │ │ │ │ + * _s_p_e_c_f_u_n_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-12-base/libstdc++/user/a00359.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: valarray_array.tcc File Reference │ │ │ +libstdc++: cxxabi_init_exception.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -49,91 +49,85 @@ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ Namespaces | │ │ │ Macros | │ │ │ Functions
│ │ │ -
valarray_array.tcc File Reference
│ │ │ +
cxxabi_init_exception.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Namespaces

namespace  std
 
│ │ │ │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ Macros

#define _VALARRAY_ARRAY_TCC
 
#define _GLIBCXX_CDTOR_CALLABI
 
#define _GLIBCXX_HAVE_CDTOR_CALLABI
 
│ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ Functions

template<typename _Tp >
void std::__valarray_copy (_Array< _Tp > __a, _Array< bool > __m, _Array< _Tp > __b, size_t __n)
 
template<typename _Tp >
void std::__valarray_copy (_Array< _Tp > __a, _Array< bool > __m, size_t __n, _Array< _Tp > __b, _Array< bool > __k)
 
template<typename _Tp >
void std::__valarray_copy (_Array< _Tp > __a, size_t __n, _Array< _Tp > __b, _Array< bool > __m)
 
template<typename _Tp >
void std::__valarray_copy (_Array< _Tp > __e, _Array< size_t > __f, size_t __n, _Array< _Tp > __a, _Array< size_t > __i)
 
template<typename _Tp , class _Dom >
void std::__valarray_copy (const _Expr< _Dom, _Tp > &__e, size_t __n, _Array< _Tp > __a)
 
template<typename _Tp , class _Dom >
void std::__valarray_copy (const _Expr< _Dom, _Tp > &__e, size_t __n, _Array< _Tp > __a, _Array< bool > __m)
 
template<typename _Tp , class _Dom >
void std::__valarray_copy (const _Expr< _Dom, _Tp > &__e, size_t __n, _Array< _Tp > __a, _Array< size_t > __i)
 
template<typename _Tp , class _Dom >
void std::__valarray_copy (const _Expr< _Dom, _Tp > &__e, size_t __n, _Array< _Tp > __a, size_t __s)
 
template<typename _Tp >
void std::__valarray_copy_construct (_Array< _Tp > __a, _Array< bool > __m, _Array< _Tp > __b, size_t __n)
 
template<typename _Tp , class _Dom >
void std::__valarray_copy_construct (const _Expr< _Dom, _Tp > &__e, size_t __n, _Array< _Tp > __a)
 
template<typename _Tp >
void std::__valarray_fill (_Array< _Tp > __a, size_t __n, _Array< bool > __m, const _Tp &__t)
 
│ │ │ +void * __cxxabiv1::__cxa_allocate_exception (size_t) noexcept
 
│ │ │ +void __cxxabiv1::__cxa_free_exception (void *) noexcept
 
│ │ │ +__cxa_refcounted_exception * __cxxabiv1::__cxa_init_primary_exception (void *__object, std::type_info *__tinfo, void(*__dest)(void *)) noexcept
 
│ │ │

Detailed Description

│ │ │ -

This is an internal header file, included by other library headers. Do not attempt to use it directly. Instead, include <valarray>.

│ │ │ +

This is an internal header file, included by other library headers. Do not attempt to use it directly.

│ │ │ │ │ │ -

Definition in file valarray_array.tcc.

│ │ │ +

Definition in file cxxabi_init_exception.h.

│ │ │

Macro Definition Documentation

│ │ │ - │ │ │ -

◆ _VALARRAY_ARRAY_TCC

│ │ │ + │ │ │ +

◆ _GLIBCXX_CDTOR_CALLABI

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │ │ │ │ - │ │ │ + │ │ │ │ │ │
#define _VALARRAY_ARRAY_TCC#define _GLIBCXX_CDTOR_CALLABI
│ │ │
│ │ │ │ │ │ -

Definition at line 33 of file valarray_array.tcc.

│ │ │ +

Definition at line 42 of file cxxabi_init_exception.h.

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ +

◆ _GLIBCXX_HAVE_CDTOR_CALLABI

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
#define _GLIBCXX_HAVE_CDTOR_CALLABI
│ │ │ +
│ │ │ + │ │ │ +

Definition at line 43 of file cxxabi_init_exception.h.

│ │ │ │ │ │
│ │ │
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,66 +1,37 @@ │ │ │ │ libstdc++ │ │ │ │ _N_a_m_e_s_p_a_c_e_s | _M_a_c_r_o_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -valarray_array.tcc File Reference │ │ │ │ +cxxabi_init_exception.h File Reference │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _s_t_d │ │ │ │   │ │ │ │ MMaaccrrooss │ │ │ │ -#define  ___V_A_L_A_R_R_A_Y___A_R_R_A_Y___T_C_C │ │ │ │ +#define  ___G_L_I_B_C_X_X___C_D_T_O_R___C_A_L_L_A_B_I │ │ │ │ +  │ │ │ │ +#define  ___G_L_I_B_C_X_X___H_A_V_E___C_D_T_O_R___C_A_L_L_A_B_I │ │ │ │   │ │ │ │ FFuunnccttiioonnss │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ -_v_o_i_d  _s_t_d_:_:_____v_a_l_a_r_r_a_y___c_o_p_y (_Array< _Tp > __a, _Array< bool > _____m, _Array< _Tp │ │ │ │ - > __b, size_t __n) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ -_v_o_i_d  _s_t_d_:_:_____v_a_l_a_r_r_a_y___c_o_p_y (_Array< _Tp > __a, _Array< bool > _____m, size_t __n, │ │ │ │ - _Array< _Tp > __b, _Array< bool > _____k) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ -_v_o_i_d  _s_t_d_:_:_____v_a_l_a_r_r_a_y___c_o_p_y (_Array< _Tp > __a, size_t __n, _Array< _Tp > __b, │ │ │ │ - _Array< bool > _____m) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ -_v_o_i_d  _s_t_d_:_:_____v_a_l_a_r_r_a_y___c_o_p_y (_Array< _Tp > __e, _Array< size_t > __f, size_t │ │ │ │ - __n, _Array< _Tp > __a, _Array< size_t > __i) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _c_l_a_s_s ___D_o_m > │ │ │ │ -_v_o_i_d  _s_t_d_:_:_____v_a_l_a_r_r_a_y___c_o_p_y (const _Expr< ___D_o_m, _Tp > &__e, size_t __n, _Array< │ │ │ │ - _Tp > __a) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _c_l_a_s_s ___D_o_m > │ │ │ │ -_v_o_i_d  _s_t_d_:_:_____v_a_l_a_r_r_a_y___c_o_p_y (const _Expr< ___D_o_m, _Tp > &__e, size_t __n, _Array< │ │ │ │ - _Tp > __a, _Array< bool > _____m) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _c_l_a_s_s ___D_o_m > │ │ │ │ -_v_o_i_d  _s_t_d_:_:_____v_a_l_a_r_r_a_y___c_o_p_y (const _Expr< ___D_o_m, _Tp > &__e, size_t __n, _Array< │ │ │ │ - _Tp > __a, _Array< size_t > __i) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _c_l_a_s_s ___D_o_m > │ │ │ │ -_v_o_i_d  _s_t_d_:_:_____v_a_l_a_r_r_a_y___c_o_p_y (const _Expr< ___D_o_m, _Tp > &__e, size_t __n, _Array< │ │ │ │ - _Tp > __a, size_t _____s) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ -_v_o_i_d  _s_t_d_:_:_____v_a_l_a_r_r_a_y___c_o_p_y___c_o_n_s_t_r_u_c_t (_Array< _Tp > __a, _Array< bool > _____m, │ │ │ │ - _Array< _Tp > __b, size_t __n) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _c_l_a_s_s ___D_o_m > │ │ │ │ -_v_o_i_d  _s_t_d_:_:_____v_a_l_a_r_r_a_y___c_o_p_y___c_o_n_s_t_r_u_c_t (const _Expr< ___D_o_m, _Tp > &__e, size_t │ │ │ │ - __n, _Array< _Tp > __a) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ -_v_o_i_d  _s_t_d_:_:_____v_a_l_a_r_r_a_y___f_i_l_l (_Array< _Tp > __a, size_t __n, _Array< bool > _____m, │ │ │ │ - const _Tp &__t) │ │ │ │ + void *  ____ccxxxxaabbiivv11::::____ccxxaa__aallllooccaattee__eexxcceeppttiioonn (size_t) │ │ │ │ + noexcept │ │ │ │ +  │ │ │ │ + void  ____ccxxxxaabbiivv11::::____ccxxaa__ffrreeee__eexxcceeppttiioonn (void *) │ │ │ │ + noexcept │ │ │ │ +  │ │ │ │ +__cxa_refcounted_exception *  ____ccxxxxaabbiivv11::::____ccxxaa__iinniitt__pprriimmaarryy__eexxcceeppttiioonn (void │ │ │ │ + *__object, _s_t_d_:_:_t_y_p_e___i_n_f_o *__tinfo, void(*__dest) │ │ │ │ + (void *)) noexcept │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ This is an internal header file, included by other library headers. Do not │ │ │ │ -attempt to use it directly. Instead, include . │ │ │ │ -Definition in file _v_a_l_a_r_r_a_y___a_r_r_a_y_._t_c_c. │ │ │ │ +attempt to use it directly. │ │ │ │ +Definition in file _c_x_x_a_b_i___i_n_i_t___e_x_c_e_p_t_i_o_n_._h. │ │ │ │ ********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ -********** _?◆_? __VVAALLAARRRRAAYY__AARRRRAAYY__TTCCCC ********** │ │ │ │ -#define _VALARRAY_ARRAY_TCC │ │ │ │ -Definition at line _3_3 of file _v_a_l_a_r_r_a_y___a_r_r_a_y_._t_c_c. │ │ │ │ +********** _?◆_? __GGLLIIBBCCXXXX__CCDDTTOORR__CCAALLLLAABBII ********** │ │ │ │ +#define _GLIBCXX_CDTOR_CALLABI │ │ │ │ +Definition at line _4_2 of file _c_x_x_a_b_i___i_n_i_t___e_x_c_e_p_t_i_o_n_._h. │ │ │ │ +********** _?◆_? __GGLLIIBBCCXXXX__HHAAVVEE__CCDDTTOORR__CCAALLLLAABBII ********** │ │ │ │ +#define _GLIBCXX_HAVE_CDTOR_CALLABI │ │ │ │ +Definition at line _4_3 of file _c_x_x_a_b_i___i_n_i_t___e_x_c_e_p_t_i_o_n_._h. │ │ │ │ * _b_i_t_s │ │ │ │ - * _v_a_l_a_r_r_a_y___a_r_r_a_y_._t_c_c │ │ │ │ + * _c_x_x_a_b_i___i_n_i_t___e_x_c_e_p_t_i_o_n_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-12-base/libstdc++/user/a00359_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: valarray_array.tcc Source File │ │ │ +libstdc++: cxxabi_init_exception.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -45,266 +45,105 @@ │ │ │ │ │ │
│ │ │
│ │ │ -
valarray_array.tcc
│ │ │ +
cxxabi_init_exception.h
│ │ │
│ │ │
│ │ │ -Go to the documentation of this file.
1// The template and inlines for the -*- C++ -*- internal _Array helper class.
│ │ │ +Go to the documentation of this file.
1// ABI Support -*- C++ -*-
│ │ │
2
│ │ │ -
3// Copyright (C) 1997-2022 Free Software Foundation, Inc.
│ │ │ +
3// Copyright (C) 2016-2022 Free Software Foundation, Inc.
│ │ │
4//
│ │ │ -
5// This file is part of the GNU ISO C++ Library. This library is free
│ │ │ -
6// software; you can redistribute it and/or modify it under the
│ │ │ -
7// terms of the GNU General Public License as published by the
│ │ │ -
8// Free Software Foundation; either version 3, or (at your option)
│ │ │ -
9// any later version.
│ │ │ -
10
│ │ │ -
11// This library is distributed in the hope that it will be useful,
│ │ │ -
12// but WITHOUT ANY WARRANTY; without even the implied warranty of
│ │ │ -
13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
│ │ │ -
14// GNU General Public License for more details.
│ │ │ -
15
│ │ │ -
16// Under Section 7 of GPL version 3, you are granted additional
│ │ │ -
17// permissions described in the GCC Runtime Library Exception, version
│ │ │ -
18// 3.1, as published by the Free Software Foundation.
│ │ │ -
19
│ │ │ -
20// You should have received a copy of the GNU General Public License and
│ │ │ -
21// a copy of the GCC Runtime Library Exception along with this program;
│ │ │ -
22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
│ │ │ -
23// <http://www.gnu.org/licenses/>.
│ │ │ -
24
│ │ │ -
25/** @file bits/valarray_array.tcc
│ │ │ -
26 * This is an internal header file, included by other library headers.
│ │ │ -
27 * Do not attempt to use it directly. @headername{valarray}
│ │ │ -
28 */
│ │ │ -
29
│ │ │ -
30// Written by Gabriel Dos Reis <Gabriel.Dos-Reis@DPTMaths.ENS-Cachan.Fr>
│ │ │ -
31
│ │ │ -
32#ifndef _VALARRAY_ARRAY_TCC
│ │ │ -
33#define _VALARRAY_ARRAY_TCC 1
│ │ │ -
34
│ │ │ -
35namespace std _GLIBCXX_VISIBILITY(default)
│ │ │ -
36{
│ │ │ -
37_GLIBCXX_BEGIN_NAMESPACE_VERSION
│ │ │ -
38
│ │ │ -
39 template<typename _Tp>
│ │ │ -
40 void
│ │ │ -
41 __valarray_fill(_Array<_Tp> __a, size_t __n, _Array<bool> __m,
│ │ │ -
42 const _Tp& __t)
│ │ │ -
43 {
│ │ │ -
44 _Tp* __p = __a._M_data;
│ │ │ -
45 bool* __ok (__m._M_data);
│ │ │ -
46 for (size_t __i=0; __i < __n; ++__i, ++__ok, ++__p)
│ │ │ -
47 {
│ │ │ -
48 while (!*__ok)
│ │ │ -
49 {
│ │ │ -
50 ++__ok;
│ │ │ -
51 ++__p;
│ │ │ -
52 }
│ │ │ -
53 *__p = __t;
│ │ │ -
54 }
│ │ │ -
55 }
│ │ │ -
56
│ │ │ -
57 // Copy n elements of a into consecutive elements of b. When m is
│ │ │ -
58 // false, the corresponding element of a is skipped. m must contain
│ │ │ -
59 // at least n true elements. a must contain at least n elements and
│ │ │ -
60 // enough elements to match up with m through the nth true element
│ │ │ -
61 // of m. I.e. if n is 10, m has 15 elements with 5 false followed
│ │ │ -
62 // by 10 true, a must have 15 elements.
│ │ │ -
63 template<typename _Tp>
│ │ │ -
64 void
│ │ │ -
65 __valarray_copy(_Array<_Tp> __a, _Array<bool> __m, _Array<_Tp> __b,
│ │ │ -
66 size_t __n)
│ │ │ -
67 {
│ │ │ -
68 _Tp* __p (__a._M_data);
│ │ │ -
69 bool* __ok (__m._M_data);
│ │ │ -
70 for (_Tp* __q = __b._M_data; __q < __b._M_data + __n;
│ │ │ -
71 ++__q, ++__ok, ++__p)
│ │ │ -
72 {
│ │ │ -
73 while (! *__ok)
│ │ │ -
74 {
│ │ │ -
75 ++__ok;
│ │ │ -
76 ++__p;
│ │ │ -
77 }
│ │ │ -
78 *__q = *__p;
│ │ │ -
79 }
│ │ │ -
80 }
│ │ │ -
81
│ │ │ -
82 // Copy n consecutive elements from a into elements of b. Elements
│ │ │ -
83 // of b are skipped if the corresponding element of m is false. m
│ │ │ -
84 // must contain at least n true elements. b must have at least as
│ │ │ -
85 // many elements as the index of the nth true element of m. I.e. if
│ │ │ -
86 // m has 15 elements with 5 false followed by 10 true, b must have
│ │ │ -
87 // at least 15 elements.
│ │ │ -
88 template<typename _Tp>
│ │ │ -
89 void
│ │ │ -
90 __valarray_copy(_Array<_Tp> __a, size_t __n, _Array<_Tp> __b,
│ │ │ -
91 _Array<bool> __m)
│ │ │ -
92 {
│ │ │ -
93 _Tp* __q (__b._M_data);
│ │ │ -
94 bool* __ok (__m._M_data);
│ │ │ -
95 for (_Tp* __p = __a._M_data; __p < __a._M_data+__n;
│ │ │ -
96 ++__p, ++__ok, ++__q)
│ │ │ -
97 {
│ │ │ -
98 while (! *__ok)
│ │ │ -
99 {
│ │ │ -
100 ++__ok;
│ │ │ -
101 ++__q;
│ │ │ -
102 }
│ │ │ -
103 *__q = *__p;
│ │ │ -
104 }
│ │ │ -
105 }
│ │ │ -
106
│ │ │ -
107 // Copy n elements from a into elements of b. Elements of a are
│ │ │ -
108 // skipped if the corresponding element of m is false. Elements of
│ │ │ -
109 // b are skipped if the corresponding element of k is false. m and
│ │ │ -
110 // k must contain at least n true elements. a and b must have at
│ │ │ -
111 // least as many elements as the index of the nth true element of m.
│ │ │ -
112 template<typename _Tp>
│ │ │ -
113 void
│ │ │ -
114 __valarray_copy(_Array<_Tp> __a, _Array<bool> __m, size_t __n,
│ │ │ -
115 _Array<_Tp> __b, _Array<bool> __k)
│ │ │ -
116 {
│ │ │ -
117 _Tp* __p (__a._M_data);
│ │ │ -
118 _Tp* __q (__b._M_data);
│ │ │ -
119 bool* __srcok (__m._M_data);
│ │ │ -
120 bool* __dstok (__k._M_data);
│ │ │ -
121 for (size_t __i = 0; __i < __n;
│ │ │ -
122 ++__srcok, ++__p, ++__dstok, ++__q, ++__i)
│ │ │ -
123 {
│ │ │ -
124 while (! *__srcok)
│ │ │ -
125 {
│ │ │ -
126 ++__srcok;
│ │ │ -
127 ++__p;
│ │ │ -
128 }
│ │ │ -
129 while (! *__dstok)
│ │ │ -
130 {
│ │ │ -
131 ++__dstok;
│ │ │ -
132 ++__q;
│ │ │ -
133 }
│ │ │ -
134 *__q = *__p;
│ │ │ -
135 }
│ │ │ -
136 }
│ │ │ -
137
│ │ │ -
138 // Copy n consecutive elements of e into consecutive elements of a.
│ │ │ -
139 // I.e. a[i] = e[i].
│ │ │ -
140 template<typename _Tp, class _Dom>
│ │ │ -
141 void
│ │ │ -
142 __valarray_copy(const _Expr<_Dom, _Tp>& __e, size_t __n, _Array<_Tp> __a)
│ │ │ -
143 {
│ │ │ -
144 _Tp* __p (__a._M_data);
│ │ │ -
145 for (size_t __i = 0; __i < __n; ++__i, ++__p)
│ │ │ -
146 *__p = __e[__i];
│ │ │ -
147 }
│ │ │ -
148
│ │ │ -
149 // Copy n consecutive elements of e into elements of a using stride
│ │ │ -
150 // s. I.e., a[0] = e[0], a[s] = e[1], a[2*s] = e[2].
│ │ │ -
151 template<typename _Tp, class _Dom>
│ │ │ -
152 void
│ │ │ -
153 __valarray_copy(const _Expr<_Dom, _Tp>& __e, size_t __n,
│ │ │ -
154 _Array<_Tp> __a, size_t __s)
│ │ │ -
155 {
│ │ │ -
156 _Tp* __p (__a._M_data);
│ │ │ -
157 for (size_t __i = 0; __i < __n; ++__i, __p += __s)
│ │ │ -
158 *__p = __e[__i];
│ │ │ -
159 }
│ │ │ -
160
│ │ │ -
161 // Copy n consecutive elements of e into elements of a indexed by
│ │ │ -
162 // contents of i. I.e., a[i[0]] = e[0].
│ │ │ -
163 template<typename _Tp, class _Dom>
│ │ │ -
164 void
│ │ │ -
165 __valarray_copy(const _Expr<_Dom, _Tp>& __e, size_t __n,
│ │ │ -
166 _Array<_Tp> __a, _Array<size_t> __i)
│ │ │ -
167 {
│ │ │ -
168 size_t* __j (__i._M_data);
│ │ │ -
169 for (size_t __k = 0; __k < __n; ++__k, ++__j)
│ │ │ -
170 __a._M_data[*__j] = __e[__k];
│ │ │ -
171 }
│ │ │ -
172
│ │ │ -
173 // Copy n elements of e indexed by contents of f into elements of a
│ │ │ -
174 // indexed by contents of i. I.e., a[i[0]] = e[f[0]].
│ │ │ -
175 template<typename _Tp>
│ │ │ -
176 void
│ │ │ -
177 __valarray_copy(_Array<_Tp> __e, _Array<size_t> __f,
│ │ │ -
178 size_t __n,
│ │ │ -
179 _Array<_Tp> __a, _Array<size_t> __i)
│ │ │ -
180 {
│ │ │ -
181 size_t* __g (__f._M_data);
│ │ │ -
182 size_t* __j (__i._M_data);
│ │ │ -
183 for (size_t __k = 0; __k < __n; ++__k, ++__j, ++__g)
│ │ │ -
184 __a._M_data[*__j] = __e._M_data[*__g];
│ │ │ -
185 }
│ │ │ -
186
│ │ │ -
187 // Copy n consecutive elements of e into elements of a. Elements of
│ │ │ -
188 // a are skipped if the corresponding element of m is false. m must
│ │ │ -
189 // have at least n true elements and a must have at least as many
│ │ │ -
190 // elements as the index of the nth true element of m. I.e. if m
│ │ │ -
191 // has 5 false followed by 10 true elements and n == 10, a must have
│ │ │ -
192 // at least 15 elements.
│ │ │ -
193 template<typename _Tp, class _Dom>
│ │ │ -
194 void
│ │ │ -
195 __valarray_copy(const _Expr<_Dom, _Tp>& __e, size_t __n,
│ │ │ -
196 _Array<_Tp> __a, _Array<bool> __m)
│ │ │ -
197 {
│ │ │ -
198 bool* __ok (__m._M_data);
│ │ │ -
199 _Tp* __p (__a._M_data);
│ │ │ -
200 for (size_t __i = 0; __i < __n; ++__i, ++__ok, ++__p)
│ │ │ -
201 {
│ │ │ -
202 while (! *__ok)
│ │ │ -
203 {
│ │ │ -
204 ++__ok;
│ │ │ -
205 ++__p;
│ │ │ -
206 }
│ │ │ -
207 *__p = __e[__i];
│ │ │ -
208 }
│ │ │ -
209 }
│ │ │ -
210
│ │ │ -
211
│ │ │ -
212 template<typename _Tp, class _Dom>
│ │ │ -
213 void
│ │ │ -
214 __valarray_copy_construct(const _Expr<_Dom, _Tp>& __e, size_t __n,
│ │ │ -
215 _Array<_Tp> __a)
│ │ │ -
216 {
│ │ │ -
217 _Tp* __p (__a._M_data);
│ │ │ -
218 for (size_t __i = 0; __i < __n; ++__i, ++__p)
│ │ │ -
219 new (__p) _Tp(__e[__i]);
│ │ │ -
220 }
│ │ │ -
221
│ │ │ -
222
│ │ │ -
223 template<typename _Tp>
│ │ │ -
224 void
│ │ │ -
225 __valarray_copy_construct(_Array<_Tp> __a, _Array<bool> __m,
│ │ │ -
226 _Array<_Tp> __b, size_t __n)
│ │ │ -
227 {
│ │ │ -
228 _Tp* __p (__a._M_data);
│ │ │ -
229 bool* __ok (__m._M_data);
│ │ │ -
230 for (_Tp* __q = __b._M_data; __q < __b._M_data+__n; ++__q, ++__ok, ++__p)
│ │ │ -
231 {
│ │ │ -
232 while (! *__ok)
│ │ │ -
233 {
│ │ │ -
234 ++__ok;
│ │ │ -
235 ++__p;
│ │ │ -
236 }
│ │ │ -
237 new (__q) _Tp(*__p);
│ │ │ -
238 }
│ │ │ -
239 }
│ │ │ -
240
│ │ │ -
241_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ -
242} // namespace
│ │ │ -
243
│ │ │ -
244#endif /* _VALARRAY_ARRAY_TCC */
│ │ │ +
5// This file is part of GCC.
│ │ │ +
6//
│ │ │ +
7// GCC is free software; you can redistribute it and/or modify
│ │ │ +
8// it under the terms of the GNU General Public License as published by
│ │ │ +
9// the Free Software Foundation; either version 3, or (at your option)
│ │ │ +
10// any later version.
│ │ │ +
11//
│ │ │ +
12// GCC is distributed in the hope that it will be useful,
│ │ │ +
13// but WITHOUT ANY WARRANTY; without even the implied warranty of
│ │ │ +
14// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
│ │ │ +
15// GNU General Public License for more details.
│ │ │ +
16//
│ │ │ +
17// Under Section 7 of GPL version 3, you are granted additional
│ │ │ +
18// permissions described in the GCC Runtime Library Exception, version
│ │ │ +
19// 3.1, as published by the Free Software Foundation.
│ │ │ +
20
│ │ │ +
21// You should have received a copy of the GNU General Public License and
│ │ │ +
22// a copy of the GCC Runtime Library Exception along with this program;
│ │ │ +
23// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
│ │ │ +
24// <http://www.gnu.org/licenses/>.
│ │ │ +
25
│ │ │ +
26/** @file bits/cxxabi_init_exception.h
│ │ │ +
27 * This is an internal header file, included by other library headers.
│ │ │ +
28 * Do not attempt to use it directly.
│ │ │ +
29 */
│ │ │ +
30
│ │ │ +
31#ifndef _CXXABI_INIT_EXCEPTION_H
│ │ │ +
32#define _CXXABI_INIT_EXCEPTION_H 1
│ │ │ +
33
│ │ │ +
34#pragma GCC system_header
│ │ │ +
35
│ │ │ +
36#pragma GCC visibility push(default)
│ │ │ +
37
│ │ │ +
38#include <stddef.h>
│ │ │ +
39#include <bits/c++config.h>
│ │ │ +
40
│ │ │ +
41#ifndef _GLIBCXX_CDTOR_CALLABI
│ │ │ +
42#define _GLIBCXX_CDTOR_CALLABI
│ │ │ +
43#define _GLIBCXX_HAVE_CDTOR_CALLABI 0
│ │ │ +
44#else
│ │ │ +
45#define _GLIBCXX_HAVE_CDTOR_CALLABI 1
│ │ │ +
46#endif
│ │ │ +
47
│ │ │ +
48#ifdef __cplusplus
│ │ │ +
49
│ │ │ +
50namespace std
│ │ │ +
51{
│ │ │ +
52 class type_info;
│ │ │ +
53}
│ │ │ +
54
│ │ │ +
55namespace __cxxabiv1
│ │ │ +
56{
│ │ │ +
57 struct __cxa_refcounted_exception;
│ │ │ +
58
│ │ │ +
59 extern "C"
│ │ │ +
60 {
│ │ │ +
61 // Allocate memory for the primary exception plus the thrown object.
│ │ │ +
62 void*
│ │ │ +
63 __cxa_allocate_exception(size_t) _GLIBCXX_NOTHROW;
│ │ │ +
64
│ │ │ +
65 void
│ │ │ +
66 __cxa_free_exception(void*) _GLIBCXX_NOTHROW;
│ │ │ +
67
│ │ │ +
68 // Initialize exception (this is a GNU extension)
│ │ │ +
69 __cxa_refcounted_exception*
│ │ │ +
70 __cxa_init_primary_exception(void *__object, std::type_info *__tinfo,
│ │ │ +
71 void (_GLIBCXX_CDTOR_CALLABI *__dest) (void *))
│ │ │ +
72 _GLIBCXX_NOTHROW;
│ │ │ +
73
│ │ │ +
74 }
│ │ │ +
75} // namespace __cxxabiv1
│ │ │ +
76
│ │ │ +
77#endif
│ │ │ +
78
│ │ │ +
79#pragma GCC visibility pop
│ │ │ +
80
│ │ │ +
81#endif // _CXXABI_INIT_EXCEPTION_H
│ │ │ + │ │ │
ISO C++ entities toplevel namespace is std.
│ │ │ +
Part of RTTI.
Definition typeinfo:93
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,252 +1,93 @@ │ │ │ │ libstdc++ │ │ │ │ -valarray_array.tcc │ │ │ │ +cxxabi_init_exception.h │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -1// The template and inlines for the -*- C++ -*- internal _Array helper class. │ │ │ │ +1// ABI Support -*- C++ -*- │ │ │ │ 2 │ │ │ │ -3// Copyright (C) 1997-2022 Free Software Foundation, Inc. │ │ │ │ +3// Copyright (C) 2016-2022 Free Software Foundation, Inc. │ │ │ │ 4// │ │ │ │ -5// This file is part of the GNU ISO C++ Library. This library is free │ │ │ │ -6// software; you can redistribute it and/or modify it under the │ │ │ │ -7// terms of the GNU General Public License as published by the │ │ │ │ -8// Free Software Foundation; either version 3, or (at your option) │ │ │ │ -9// any later version. │ │ │ │ -10 │ │ │ │ -11// This library is distributed in the hope that it will be useful, │ │ │ │ -12// but WITHOUT ANY WARRANTY; without even the implied warranty of │ │ │ │ -13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the │ │ │ │ -14// GNU General Public License for more details. │ │ │ │ -15 │ │ │ │ -16// Under Section 7 of GPL version 3, you are granted additional │ │ │ │ -17// permissions described in the GCC Runtime Library Exception, version │ │ │ │ -18// 3.1, as published by the Free Software Foundation. │ │ │ │ -19 │ │ │ │ -20// You should have received a copy of the GNU General Public License and │ │ │ │ -21// a copy of the GCC Runtime Library Exception along with this program; │ │ │ │ -22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see │ │ │ │ -23// . │ │ │ │ -24 │ │ │ │ -25/** @file bits/valarray_array.tcc │ │ │ │ -26 * This is an internal header file, included by other library headers. │ │ │ │ -27 * Do not attempt to use it directly. @headername{valarray} │ │ │ │ -28 */ │ │ │ │ -29 │ │ │ │ -30// Written by Gabriel Dos Reis │ │ │ │ -31 │ │ │ │ -32#ifndef _VALARRAY_ARRAY_TCC │ │ │ │ -33#define _VALARRAY_ARRAY_TCC 1 │ │ │ │ -34 │ │ │ │ -35namespace _s_t_d _GLIBCXX_VISIBILITY(default) │ │ │ │ -36{ │ │ │ │ -37_GLIBCXX_BEGIN_NAMESPACE_VERSION │ │ │ │ -38 │ │ │ │ -39 template │ │ │ │ -40 void │ │ │ │ -41 __valarray_fill(_Array<_Tp> __a, size_t __n, _Array __m, │ │ │ │ -42 const _Tp& __t) │ │ │ │ -43 { │ │ │ │ -44 _Tp* __p = __a._M_data; │ │ │ │ -45 bool* __ok (__m._M_data); │ │ │ │ -46 for (size_t __i=0; __i < __n; ++__i, ++__ok, ++__p) │ │ │ │ -47 { │ │ │ │ -48 while (!*__ok) │ │ │ │ -49 { │ │ │ │ -50 ++__ok; │ │ │ │ -51 ++__p; │ │ │ │ -52 } │ │ │ │ -53 *__p = __t; │ │ │ │ -54 } │ │ │ │ -55 } │ │ │ │ -56 │ │ │ │ -57 // Copy n elements of a into consecutive elements of b. When m is │ │ │ │ -58 // false, the corresponding element of a is skipped. m must contain │ │ │ │ -59 // at least n true elements. a must contain at least n elements and │ │ │ │ -60 // enough elements to match up with m through the nth true element │ │ │ │ -61 // of m. I.e. if n is 10, m has 15 elements with 5 false followed │ │ │ │ -62 // by 10 true, a must have 15 elements. │ │ │ │ -63 template │ │ │ │ -64 void │ │ │ │ -65 __valarray_copy(_Array<_Tp> __a, _Array __m, _Array<_Tp> __b, │ │ │ │ -66 size_t __n) │ │ │ │ -67 { │ │ │ │ -68 _Tp* __p (__a._M_data); │ │ │ │ -69 bool* __ok (__m._M_data); │ │ │ │ -70 for (_Tp* __q = __b._M_data; __q < __b._M_data + __n; │ │ │ │ -71 ++__q, ++__ok, ++__p) │ │ │ │ -72 { │ │ │ │ -73 while (! *__ok) │ │ │ │ -74 { │ │ │ │ -75 ++__ok; │ │ │ │ -76 ++__p; │ │ │ │ -77 } │ │ │ │ -78 *__q = *__p; │ │ │ │ -79 } │ │ │ │ -80 } │ │ │ │ -81 │ │ │ │ -82 // Copy n consecutive elements from a into elements of b. Elements │ │ │ │ -83 // of b are skipped if the corresponding element of m is false. m │ │ │ │ -84 // must contain at least n true elements. b must have at least as │ │ │ │ -85 // many elements as the index of the nth true element of m. I.e. if │ │ │ │ -86 // m has 15 elements with 5 false followed by 10 true, b must have │ │ │ │ -87 // at least 15 elements. │ │ │ │ -88 template │ │ │ │ -89 void │ │ │ │ -90 __valarray_copy(_Array<_Tp> __a, size_t __n, _Array<_Tp> __b, │ │ │ │ -91 _Array __m) │ │ │ │ -92 { │ │ │ │ -93 _Tp* __q (__b._M_data); │ │ │ │ -94 bool* __ok (__m._M_data); │ │ │ │ -95 for (_Tp* __p = __a._M_data; __p < __a._M_data+__n; │ │ │ │ -96 ++__p, ++__ok, ++__q) │ │ │ │ -97 { │ │ │ │ -98 while (! *__ok) │ │ │ │ -99 { │ │ │ │ -100 ++__ok; │ │ │ │ -101 ++__q; │ │ │ │ -102 } │ │ │ │ -103 *__q = *__p; │ │ │ │ -104 } │ │ │ │ -105 } │ │ │ │ -106 │ │ │ │ -107 // Copy n elements from a into elements of b. Elements of a are │ │ │ │ -108 // skipped if the corresponding element of m is false. Elements of │ │ │ │ -109 // b are skipped if the corresponding element of k is false. m and │ │ │ │ -110 // k must contain at least n true elements. a and b must have at │ │ │ │ -111 // least as many elements as the index of the nth true element of m. │ │ │ │ -112 template │ │ │ │ -113 void │ │ │ │ -114 __valarray_copy(_Array<_Tp> __a, _Array __m, size_t __n, │ │ │ │ -115 _Array<_Tp> __b, _Array __k) │ │ │ │ -116 { │ │ │ │ -117 _Tp* __p (__a._M_data); │ │ │ │ -118 _Tp* __q (__b._M_data); │ │ │ │ -119 bool* __srcok (__m._M_data); │ │ │ │ -120 bool* __dstok (__k._M_data); │ │ │ │ -121 for (size_t __i = 0; __i < __n; │ │ │ │ -122 ++__srcok, ++__p, ++__dstok, ++__q, ++__i) │ │ │ │ -123 { │ │ │ │ -124 while (! *__srcok) │ │ │ │ -125 { │ │ │ │ -126 ++__srcok; │ │ │ │ -127 ++__p; │ │ │ │ -128 } │ │ │ │ -129 while (! *__dstok) │ │ │ │ -130 { │ │ │ │ -131 ++__dstok; │ │ │ │ -132 ++__q; │ │ │ │ -133 } │ │ │ │ -134 *__q = *__p; │ │ │ │ -135 } │ │ │ │ -136 } │ │ │ │ -137 │ │ │ │ -138 // Copy n consecutive elements of e into consecutive elements of a. │ │ │ │ -139 // I.e. a[i] = e[i]. │ │ │ │ -140 template │ │ │ │ -141 void │ │ │ │ -142 __valarray_copy(const _Expr<_Dom, _Tp>& __e, size_t __n, _Array<_Tp> __a) │ │ │ │ -143 { │ │ │ │ -144 _Tp* __p (__a._M_data); │ │ │ │ -145 for (size_t __i = 0; __i < __n; ++__i, ++__p) │ │ │ │ -146 *__p = __e[__i]; │ │ │ │ -147 } │ │ │ │ -148 │ │ │ │ -149 // Copy n consecutive elements of e into elements of a using stride │ │ │ │ -150 // s. I.e., a[0] = e[0], a[s] = e[1], a[2*s] = e[2]. │ │ │ │ -151 template │ │ │ │ -152 void │ │ │ │ -153 __valarray_copy(const _Expr<_Dom, _Tp>& __e, size_t __n, │ │ │ │ -154 _Array<_Tp> __a, size_t __s) │ │ │ │ -155 { │ │ │ │ -156 _Tp* __p (__a._M_data); │ │ │ │ -157 for (size_t __i = 0; __i < __n; ++__i, __p += __s) │ │ │ │ -158 *__p = __e[__i]; │ │ │ │ -159 } │ │ │ │ -160 │ │ │ │ -161 // Copy n consecutive elements of e into elements of a indexed by │ │ │ │ -162 // contents of i. I.e., a[i[0]] = e[0]. │ │ │ │ -163 template │ │ │ │ -164 void │ │ │ │ -165 __valarray_copy(const _Expr<_Dom, _Tp>& __e, size_t __n, │ │ │ │ -166 _Array<_Tp> __a, _Array __i) │ │ │ │ -167 { │ │ │ │ -168 size_t* __j (__i._M_data); │ │ │ │ -169 for (size_t __k = 0; __k < __n; ++__k, ++__j) │ │ │ │ -170 __a._M_data[*__j] = __e[__k]; │ │ │ │ -171 } │ │ │ │ -172 │ │ │ │ -173 // Copy n elements of e indexed by contents of f into elements of a │ │ │ │ -174 // indexed by contents of i. I.e., a[i[0]] = e[f[0]]. │ │ │ │ -175 template │ │ │ │ -176 void │ │ │ │ -177 __valarray_copy(_Array<_Tp> __e, _Array __f, │ │ │ │ -178 size_t __n, │ │ │ │ -179 _Array<_Tp> __a, _Array __i) │ │ │ │ -180 { │ │ │ │ -181 size_t* __g (__f._M_data); │ │ │ │ -182 size_t* __j (__i._M_data); │ │ │ │ -183 for (size_t __k = 0; __k < __n; ++__k, ++__j, ++__g) │ │ │ │ -184 __a._M_data[*__j] = __e._M_data[*__g]; │ │ │ │ -185 } │ │ │ │ -186 │ │ │ │ -187 // Copy n consecutive elements of e into elements of a. Elements of │ │ │ │ -188 // a are skipped if the corresponding element of m is false. m must │ │ │ │ -189 // have at least n true elements and a must have at least as many │ │ │ │ -190 // elements as the index of the nth true element of m. I.e. if m │ │ │ │ -191 // has 5 false followed by 10 true elements and n == 10, a must have │ │ │ │ -192 // at least 15 elements. │ │ │ │ -193 template │ │ │ │ -194 void │ │ │ │ -195 __valarray_copy(const _Expr<_Dom, _Tp>& __e, size_t __n, │ │ │ │ -196 _Array<_Tp> __a, _Array __m) │ │ │ │ -197 { │ │ │ │ -198 bool* __ok (__m._M_data); │ │ │ │ -199 _Tp* __p (__a._M_data); │ │ │ │ -200 for (size_t __i = 0; __i < __n; ++__i, ++__ok, ++__p) │ │ │ │ -201 { │ │ │ │ -202 while (! *__ok) │ │ │ │ -203 { │ │ │ │ -204 ++__ok; │ │ │ │ -205 ++__p; │ │ │ │ -206 } │ │ │ │ -207 *__p = __e[__i]; │ │ │ │ -208 } │ │ │ │ -209 } │ │ │ │ -210 │ │ │ │ -211 │ │ │ │ -212 template │ │ │ │ -213 void │ │ │ │ -214 __valarray_copy_construct(const _Expr<_Dom, _Tp>& __e, size_t __n, │ │ │ │ -215 _Array<_Tp> __a) │ │ │ │ -216 { │ │ │ │ -217 _Tp* __p (__a._M_data); │ │ │ │ -218 for (size_t __i = 0; __i < __n; ++__i, ++__p) │ │ │ │ -219 new (__p) _Tp(__e[__i]); │ │ │ │ -220 } │ │ │ │ -221 │ │ │ │ -222 │ │ │ │ -223 template │ │ │ │ -224 void │ │ │ │ -225 __valarray_copy_construct(_Array<_Tp> __a, _Array __m, │ │ │ │ -226 _Array<_Tp> __b, size_t __n) │ │ │ │ -227 { │ │ │ │ -228 _Tp* __p (__a._M_data); │ │ │ │ -229 bool* __ok (__m._M_data); │ │ │ │ -230 for (_Tp* __q = __b._M_data; __q < __b._M_data+__n; ++__q, ++__ok, ++__p) │ │ │ │ -231 { │ │ │ │ -232 while (! *__ok) │ │ │ │ -233 { │ │ │ │ -234 ++__ok; │ │ │ │ -235 ++__p; │ │ │ │ -236 } │ │ │ │ -237 new (__q) _Tp(*__p); │ │ │ │ -238 } │ │ │ │ -239 } │ │ │ │ -240 │ │ │ │ -241_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ -242} // namespace │ │ │ │ -243 │ │ │ │ -244#endif /* _VALARRAY_ARRAY_TCC */ │ │ │ │ +5// This file is part of GCC. │ │ │ │ +6// │ │ │ │ +7// GCC is free software; you can redistribute it and/or modify │ │ │ │ +8// it under the terms of the GNU General Public License as published by │ │ │ │ +9// the Free Software Foundation; either version 3, or (at your option) │ │ │ │ +10// any later version. │ │ │ │ +11// │ │ │ │ +12// GCC is distributed in the hope that it will be useful, │ │ │ │ +13// but WITHOUT ANY WARRANTY; without even the implied warranty of │ │ │ │ +14// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the │ │ │ │ +15// GNU General Public License for more details. │ │ │ │ +16// │ │ │ │ +17// Under Section 7 of GPL version 3, you are granted additional │ │ │ │ +18// permissions described in the GCC Runtime Library Exception, version │ │ │ │ +19// 3.1, as published by the Free Software Foundation. │ │ │ │ +20 │ │ │ │ +21// You should have received a copy of the GNU General Public License and │ │ │ │ +22// a copy of the GCC Runtime Library Exception along with this program; │ │ │ │ +23// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see │ │ │ │ +24// . │ │ │ │ +25 │ │ │ │ +26/** @file bits/cxxabi_init_exception.h │ │ │ │ +27 * This is an internal header file, included by other library headers. │ │ │ │ +28 * Do not attempt to use it directly. │ │ │ │ +29 */ │ │ │ │ +30 │ │ │ │ +31#ifndef _CXXABI_INIT_EXCEPTION_H │ │ │ │ +32#define _CXXABI_INIT_EXCEPTION_H 1 │ │ │ │ +33 │ │ │ │ +34#pragma GCC system_header │ │ │ │ +35 │ │ │ │ +36#pragma GCC visibility push(default) │ │ │ │ +37 │ │ │ │ +38#include │ │ │ │ +39#include <_b_i_t_s_/_c_+_+_c_o_n_f_i_g_._h> │ │ │ │ +40 │ │ │ │ +41#ifndef _GLIBCXX_CDTOR_CALLABI │ │ │ │ +42#define _GLIBCXX_CDTOR_CALLABI │ │ │ │ +43#define _GLIBCXX_HAVE_CDTOR_CALLABI 0 │ │ │ │ +44#else │ │ │ │ +45#define _GLIBCXX_HAVE_CDTOR_CALLABI 1 │ │ │ │ +46#endif │ │ │ │ +47 │ │ │ │ +48#ifdef __cplusplus │ │ │ │ +49 │ │ │ │ +50namespace _s_t_d │ │ │ │ +51{ │ │ │ │ +52 class type_info; │ │ │ │ +53} │ │ │ │ +54 │ │ │ │ +55namespace __cxxabiv1 │ │ │ │ +56{ │ │ │ │ +57 struct __cxa_refcounted_exception; │ │ │ │ +58 │ │ │ │ +59 extern "C" │ │ │ │ +60 { │ │ │ │ +61 // Allocate memory for the primary exception plus the thrown object. │ │ │ │ +62 void* │ │ │ │ +63 __cxa_allocate_exception(size_t) _GLIBCXX_NOTHROW; │ │ │ │ +64 │ │ │ │ +65 void │ │ │ │ +66 __cxa_free_exception(void*) _GLIBCXX_NOTHROW; │ │ │ │ +67 │ │ │ │ +68 // Initialize exception (this is a GNU extension) │ │ │ │ +69 __cxa_refcounted_exception* │ │ │ │ +70 __cxa_init_primary_exception(void *__object, _s_t_d_:_:_t_y_p_e___i_n_f_o *__tinfo, │ │ │ │ +71 void (_GLIBCXX_CDTOR_CALLABI *__dest) (void *)) │ │ │ │ +72 _GLIBCXX_NOTHROW; │ │ │ │ +73 │ │ │ │ +74 } │ │ │ │ +75} // namespace __cxxabiv1 │ │ │ │ +76 │ │ │ │ +77#endif │ │ │ │ +78 │ │ │ │ +79#pragma GCC visibility pop │ │ │ │ +80 │ │ │ │ +81#endif // _CXXABI_INIT_EXCEPTION_H │ │ │ │ +_c_+_+_c_o_n_f_i_g_._h │ │ │ │ _s_t_d │ │ │ │ ISO C++ entities toplevel namespace is std. │ │ │ │ +_s_t_d_:_:_t_y_p_e___i_n_f_o │ │ │ │ +Part of RTTI. │ │ │ │ +DDeeffiinniittiioonn _t_y_p_e_i_n_f_o_:_9_3 │ │ │ │ * _b_i_t_s │ │ │ │ - * _v_a_l_a_r_r_a_y___a_r_r_a_y_._t_c_c │ │ │ │ + * _c_x_x_a_b_i___i_n_i_t___e_x_c_e_p_t_i_o_n_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-12-base/libstdc++/user/a00362.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: valarray_array.h File Reference │ │ │ +libstdc++: stl_queue.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -46,533 +46,90 @@ │ │ │ /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */ │ │ │ $(document).ready(function(){initNavTree('a00362.html',''); initResizable(); }); │ │ │ /* @license-end */ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ +Classes | │ │ │ Namespaces | │ │ │ -Macros | │ │ │ Functions
│ │ │ -
valarray_array.h File Reference
│ │ │ +
stl_queue.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +

│ │ │ +Classes

class  std::priority_queue< _Tp, _Sequence, _Compare >
 
class  std::queue< _Tp, _Sequence >
 
│ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Namespaces

namespace  std
 
│ │ │ - │ │ │ - │ │ │ - │ │ │ -

│ │ │ -Macros

#define _DEFINE_ARRAY_FUNCTION(_Op, _Name)
 
│ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ Functions

template<typename _Tp >
void std::__valarray_copy (_Array< _Tp > __a, _Array< _Tp > __b, size_t __n, size_t __s)
 
template<typename _Tp >
void std::__valarray_copy (_Array< _Tp > __a, _Array< size_t > __i, _Array< _Tp > __b, size_t __n)
 
template<typename _Tp >
void std::__valarray_copy (_Array< _Tp > __a, size_t __n, _Array< _Tp > __b)
 
template<typename _Tp >
void std::__valarray_copy (_Array< _Tp > __a, size_t __n, _Array< _Tp > __b, _Array< size_t > __i)
 
template<typename _Tp >
void std::__valarray_copy (_Array< _Tp > __a, size_t __n, size_t __s, _Array< _Tp > __b)
 
template<typename _Tp >
void std::__valarray_copy (_Array< _Tp > __a, size_t __n, size_t __s1, _Array< _Tp > __b, size_t __s2)
 
template<typename _Tp >
void std::__valarray_copy (_Array< _Tp > __src, size_t __n, _Array< size_t > __i, _Array< _Tp > __dst, _Array< size_t > __j)
 
template<typename _Tp >
void std::__valarray_copy (const _Tp *__restrict__ __a, _Tp *__restrict__ __b, size_t __n, size_t __s)
 
template<typename _Tp >
void std::__valarray_copy (const _Tp *__restrict__ __a, const size_t *__restrict__ __i, _Tp *__restrict__ __b, size_t __n)
 
template<typename _Tp >
void std::__valarray_copy (const _Tp *__restrict__ __a, size_t __n, _Tp *__restrict__ __b)
 
template<typename _Tp >
void std::__valarray_copy (const _Tp *__restrict__ __a, size_t __n, _Tp *__restrict__ __b, const size_t *__restrict__ __i)
 
template<typename _Tp >
void std::__valarray_copy (const _Tp *__restrict__ __a, size_t __n, size_t __s, _Tp *__restrict__ __b)
 
template<typename _Tp >
void std::__valarray_copy (const _Tp *__restrict__ __src, size_t __n, const size_t *__restrict__ __i, _Tp *__restrict__ __dst, const size_t *__restrict__ __j)
 
template<typename _Tp >
void std::__valarray_copy (const _Tp *__restrict__ __src, size_t __n, size_t __s1, _Tp *__restrict__ __dst, size_t __s2)
 
template<typename _Tp >
void std::__valarray_copy_construct (_Array< _Tp > __a, _Array< size_t > __i, _Array< _Tp > __b, size_t __n)
 
template<typename _Tp >
void std::__valarray_copy_construct (_Array< _Tp > __a, size_t __n, size_t __s, _Array< _Tp > __b)
 
template<typename _Tp >
void std::__valarray_copy_construct (const _Tp *__b, const _Tp *__e, _Tp *__restrict__ __o)
 
template<typename _Tp >
void std::__valarray_copy_construct (const _Tp *__restrict__ __a, const size_t *__restrict__ __i, _Tp *__restrict__ __o, size_t __n)
 
template<typename _Tp >
void std::__valarray_copy_construct (const _Tp *__restrict__ __a, size_t __n, size_t __s, _Tp *__restrict__ __o)
 
template<typename _Tp >
void std::__valarray_default_construct (_Tp *__b, _Tp *__e)
 
template<typename _Tp >
void std::__valarray_destroy_elements (_Tp *__b, _Tp *__e)
 
template<typename _Tp >
void std::__valarray_fill (_Array< _Tp > __a, _Array< size_t > __i, size_t __n, const _Tp &__t)
 
template<typename _Tp >
void std::__valarray_fill (_Array< _Tp > __a, size_t __n, const _Tp &__t)
 
template<typename _Tp >
void std::__valarray_fill (_Array< _Tp > __a, size_t __n, size_t __s, const _Tp &__t)
 
template<typename _Tp >
void std::__valarray_fill (_Tp *__restrict__ __a, const size_t *__restrict__ __i, size_t __n, const _Tp &__t)
 
template<typename _Tp >
void std::__valarray_fill (_Tp *__restrict__ __a, size_t __n, const _Tp &__t)
 
template<typename _Tp >
void std::__valarray_fill (_Tp *__restrict__ __a, size_t __n, size_t __s, const _Tp &__t)
 
template<typename _Tp >
void std::__valarray_fill_construct (_Tp *__b, _Tp *__e, const _Tp __t)
 
template<typename _Tp >
_Tp * std::__valarray_get_storage (size_t)
 
template<typename _Ta >
_Ta::value_type std::__valarray_max (const _Ta &__a)
 
template<typename _Ta >
_Ta::value_type std::__valarray_min (const _Ta &__a)
 
void std::__valarray_release_memory (void *__p)
 
template<typename _Tp >
_Tp std::__valarray_sum (const _Tp *__f, const _Tp *__l)
 
template<typename _Tp >
void std::_Array_augmented___bitwise_and (_Array< _Tp > __a, _Array< _Tp > __b, size_t __n, size_t __s)
 
template<typename _Tp >
void std::_Array_augmented___bitwise_and (_Array< _Tp > __a, _Array< bool > __m, _Array< _Tp > __b, size_t __n)
 
template<typename _Tp , class _Dom >
void std::_Array_augmented___bitwise_and (_Array< _Tp > __a, _Array< bool > __m, const _Expr< _Dom, _Tp > &__e, size_t __n)
 
template<typename _Tp >
void std::_Array_augmented___bitwise_and (_Array< _Tp > __a, _Array< size_t > __i, _Array< _Tp > __b, size_t __n)
 
template<typename _Tp , class _Dom >
void std::_Array_augmented___bitwise_and (_Array< _Tp > __a, _Array< size_t > __i, const _Expr< _Dom, _Tp > &__e, size_t __n)
 
template<typename _Tp , class _Dom >
void std::_Array_augmented___bitwise_and (_Array< _Tp > __a, const _Expr< _Dom, _Tp > &__e, size_t __n)
 
template<typename _Tp >
void std::_Array_augmented___bitwise_and (_Array< _Tp > __a, size_t __n, _Array< _Tp > __b)
 
template<typename _Tp >
void std::_Array_augmented___bitwise_and (_Array< _Tp > __a, size_t __n, _Array< _Tp > __b, _Array< bool > __m)
 
template<typename _Tp >
void std::_Array_augmented___bitwise_and (_Array< _Tp > __a, size_t __n, _Array< _Tp > __b, _Array< size_t > __i)
 
template<typename _Tp >
void std::_Array_augmented___bitwise_and (_Array< _Tp > __a, size_t __n, const _Tp &__t)
 
template<typename _Tp >
void std::_Array_augmented___bitwise_and (_Array< _Tp > __a, size_t __n, size_t __s, _Array< _Tp > __b)
 
template<typename _Tp , class _Dom >
void std::_Array_augmented___bitwise_and (_Array< _Tp > __a, size_t __s, const _Expr< _Dom, _Tp > &__e, size_t __n)
 
template<typename _Tp >
void std::_Array_augmented___bitwise_or (_Array< _Tp > __a, _Array< _Tp > __b, size_t __n, size_t __s)
 
template<typename _Tp >
void std::_Array_augmented___bitwise_or (_Array< _Tp > __a, _Array< bool > __m, _Array< _Tp > __b, size_t __n)
 
template<typename _Tp , class _Dom >
void std::_Array_augmented___bitwise_or (_Array< _Tp > __a, _Array< bool > __m, const _Expr< _Dom, _Tp > &__e, size_t __n)
 
template<typename _Tp >
void std::_Array_augmented___bitwise_or (_Array< _Tp > __a, _Array< size_t > __i, _Array< _Tp > __b, size_t __n)
 
template<typename _Tp , class _Dom >
void std::_Array_augmented___bitwise_or (_Array< _Tp > __a, _Array< size_t > __i, const _Expr< _Dom, _Tp > &__e, size_t __n)
 
template<typename _Tp , class _Dom >
void std::_Array_augmented___bitwise_or (_Array< _Tp > __a, const _Expr< _Dom, _Tp > &__e, size_t __n)
 
template<typename _Tp >
void std::_Array_augmented___bitwise_or (_Array< _Tp > __a, size_t __n, _Array< _Tp > __b)
 
template<typename _Tp >
void std::_Array_augmented___bitwise_or (_Array< _Tp > __a, size_t __n, _Array< _Tp > __b, _Array< bool > __m)
 
template<typename _Tp >
void std::_Array_augmented___bitwise_or (_Array< _Tp > __a, size_t __n, _Array< _Tp > __b, _Array< size_t > __i)
 
template<typename _Tp >
void std::_Array_augmented___bitwise_or (_Array< _Tp > __a, size_t __n, const _Tp &__t)
 
template<typename _Tp >
void std::_Array_augmented___bitwise_or (_Array< _Tp > __a, size_t __n, size_t __s, _Array< _Tp > __b)
 
template<typename _Tp , class _Dom >
void std::_Array_augmented___bitwise_or (_Array< _Tp > __a, size_t __s, const _Expr< _Dom, _Tp > &__e, size_t __n)
 
template<typename _Tp >
void std::_Array_augmented___bitwise_xor (_Array< _Tp > __a, _Array< _Tp > __b, size_t __n, size_t __s)
 
template<typename _Tp >
void std::_Array_augmented___bitwise_xor (_Array< _Tp > __a, _Array< bool > __m, _Array< _Tp > __b, size_t __n)
 
template<typename _Tp , class _Dom >
void std::_Array_augmented___bitwise_xor (_Array< _Tp > __a, _Array< bool > __m, const _Expr< _Dom, _Tp > &__e, size_t __n)
 
template<typename _Tp >
void std::_Array_augmented___bitwise_xor (_Array< _Tp > __a, _Array< size_t > __i, _Array< _Tp > __b, size_t __n)
 
template<typename _Tp , class _Dom >
void std::_Array_augmented___bitwise_xor (_Array< _Tp > __a, _Array< size_t > __i, const _Expr< _Dom, _Tp > &__e, size_t __n)
 
template<typename _Tp , class _Dom >
void std::_Array_augmented___bitwise_xor (_Array< _Tp > __a, const _Expr< _Dom, _Tp > &__e, size_t __n)
 
template<typename _Tp >
void std::_Array_augmented___bitwise_xor (_Array< _Tp > __a, size_t __n, _Array< _Tp > __b)
 
template<typename _Tp >
void std::_Array_augmented___bitwise_xor (_Array< _Tp > __a, size_t __n, _Array< _Tp > __b, _Array< bool > __m)
 
template<typename _Tp >
void std::_Array_augmented___bitwise_xor (_Array< _Tp > __a, size_t __n, _Array< _Tp > __b, _Array< size_t > __i)
 
template<typename _Tp >
void std::_Array_augmented___bitwise_xor (_Array< _Tp > __a, size_t __n, const _Tp &__t)
 
template<typename _Tp >
void std::_Array_augmented___bitwise_xor (_Array< _Tp > __a, size_t __n, size_t __s, _Array< _Tp > __b)
 
template<typename _Tp , class _Dom >
void std::_Array_augmented___bitwise_xor (_Array< _Tp > __a, size_t __s, const _Expr< _Dom, _Tp > &__e, size_t __n)
 
template<typename _Tp >
void std::_Array_augmented___divides (_Array< _Tp > __a, _Array< _Tp > __b, size_t __n, size_t __s)
 
template<typename _Tp >
void std::_Array_augmented___divides (_Array< _Tp > __a, _Array< bool > __m, _Array< _Tp > __b, size_t __n)
 
template<typename _Tp , class _Dom >
void std::_Array_augmented___divides (_Array< _Tp > __a, _Array< bool > __m, const _Expr< _Dom, _Tp > &__e, size_t __n)
 
template<typename _Tp >
void std::_Array_augmented___divides (_Array< _Tp > __a, _Array< size_t > __i, _Array< _Tp > __b, size_t __n)
 
template<typename _Tp , class _Dom >
void std::_Array_augmented___divides (_Array< _Tp > __a, _Array< size_t > __i, const _Expr< _Dom, _Tp > &__e, size_t __n)
 
template<typename _Tp , class _Dom >
void std::_Array_augmented___divides (_Array< _Tp > __a, const _Expr< _Dom, _Tp > &__e, size_t __n)
 
template<typename _Tp >
void std::_Array_augmented___divides (_Array< _Tp > __a, size_t __n, _Array< _Tp > __b)
 
template<typename _Tp >
void std::_Array_augmented___divides (_Array< _Tp > __a, size_t __n, _Array< _Tp > __b, _Array< bool > __m)
 
template<typename _Tp >
void std::_Array_augmented___divides (_Array< _Tp > __a, size_t __n, _Array< _Tp > __b, _Array< size_t > __i)
 
template<typename _Tp >
void std::_Array_augmented___divides (_Array< _Tp > __a, size_t __n, const _Tp &__t)
 
template<typename _Tp >
void std::_Array_augmented___divides (_Array< _Tp > __a, size_t __n, size_t __s, _Array< _Tp > __b)
 
template<typename _Tp , class _Dom >
void std::_Array_augmented___divides (_Array< _Tp > __a, size_t __s, const _Expr< _Dom, _Tp > &__e, size_t __n)
 
template<typename _Tp >
void std::_Array_augmented___minus (_Array< _Tp > __a, _Array< _Tp > __b, size_t __n, size_t __s)
 
template<typename _Tp >
void std::_Array_augmented___minus (_Array< _Tp > __a, _Array< bool > __m, _Array< _Tp > __b, size_t __n)
 
template<typename _Tp , class _Dom >
void std::_Array_augmented___minus (_Array< _Tp > __a, _Array< bool > __m, const _Expr< _Dom, _Tp > &__e, size_t __n)
 
template<typename _Tp >
void std::_Array_augmented___minus (_Array< _Tp > __a, _Array< size_t > __i, _Array< _Tp > __b, size_t __n)
 
template<typename _Tp , class _Dom >
void std::_Array_augmented___minus (_Array< _Tp > __a, _Array< size_t > __i, const _Expr< _Dom, _Tp > &__e, size_t __n)
 
template<typename _Tp , class _Dom >
void std::_Array_augmented___minus (_Array< _Tp > __a, const _Expr< _Dom, _Tp > &__e, size_t __n)
 
template<typename _Tp >
void std::_Array_augmented___minus (_Array< _Tp > __a, size_t __n, _Array< _Tp > __b)
 
template<typename _Tp >
void std::_Array_augmented___minus (_Array< _Tp > __a, size_t __n, _Array< _Tp > __b, _Array< bool > __m)
 
template<typename _Tp >
void std::_Array_augmented___minus (_Array< _Tp > __a, size_t __n, _Array< _Tp > __b, _Array< size_t > __i)
 
template<typename _Tp >
void std::_Array_augmented___minus (_Array< _Tp > __a, size_t __n, const _Tp &__t)
 
template<typename _Tp >
void std::_Array_augmented___minus (_Array< _Tp > __a, size_t __n, size_t __s, _Array< _Tp > __b)
 
template<typename _Tp , class _Dom >
void std::_Array_augmented___minus (_Array< _Tp > __a, size_t __s, const _Expr< _Dom, _Tp > &__e, size_t __n)
 
template<typename _Tp >
void std::_Array_augmented___modulus (_Array< _Tp > __a, _Array< _Tp > __b, size_t __n, size_t __s)
 
template<typename _Tp >
void std::_Array_augmented___modulus (_Array< _Tp > __a, _Array< bool > __m, _Array< _Tp > __b, size_t __n)
 
template<typename _Tp , class _Dom >
void std::_Array_augmented___modulus (_Array< _Tp > __a, _Array< bool > __m, const _Expr< _Dom, _Tp > &__e, size_t __n)
 
template<typename _Tp >
void std::_Array_augmented___modulus (_Array< _Tp > __a, _Array< size_t > __i, _Array< _Tp > __b, size_t __n)
 
template<typename _Tp , class _Dom >
void std::_Array_augmented___modulus (_Array< _Tp > __a, _Array< size_t > __i, const _Expr< _Dom, _Tp > &__e, size_t __n)
 
template<typename _Tp , class _Dom >
void std::_Array_augmented___modulus (_Array< _Tp > __a, const _Expr< _Dom, _Tp > &__e, size_t __n)
 
template<typename _Tp >
void std::_Array_augmented___modulus (_Array< _Tp > __a, size_t __n, _Array< _Tp > __b)
 
template<typename _Tp >
void std::_Array_augmented___modulus (_Array< _Tp > __a, size_t __n, _Array< _Tp > __b, _Array< bool > __m)
 
template<typename _Tp >
void std::_Array_augmented___modulus (_Array< _Tp > __a, size_t __n, _Array< _Tp > __b, _Array< size_t > __i)
 
template<typename _Tp >
void std::_Array_augmented___modulus (_Array< _Tp > __a, size_t __n, const _Tp &__t)
 
template<typename _Tp >
void std::_Array_augmented___modulus (_Array< _Tp > __a, size_t __n, size_t __s, _Array< _Tp > __b)
 
template<typename _Tp , class _Dom >
void std::_Array_augmented___modulus (_Array< _Tp > __a, size_t __s, const _Expr< _Dom, _Tp > &__e, size_t __n)
 
template<typename _Tp >
void std::_Array_augmented___multiplies (_Array< _Tp > __a, _Array< _Tp > __b, size_t __n, size_t __s)
 
template<typename _Tp >
void std::_Array_augmented___multiplies (_Array< _Tp > __a, _Array< bool > __m, _Array< _Tp > __b, size_t __n)
 
template<typename _Tp , class _Dom >
void std::_Array_augmented___multiplies (_Array< _Tp > __a, _Array< bool > __m, const _Expr< _Dom, _Tp > &__e, size_t __n)
 
template<typename _Tp >
void std::_Array_augmented___multiplies (_Array< _Tp > __a, _Array< size_t > __i, _Array< _Tp > __b, size_t __n)
 
template<typename _Tp , class _Dom >
void std::_Array_augmented___multiplies (_Array< _Tp > __a, _Array< size_t > __i, const _Expr< _Dom, _Tp > &__e, size_t __n)
 
template<typename _Tp , class _Dom >
void std::_Array_augmented___multiplies (_Array< _Tp > __a, const _Expr< _Dom, _Tp > &__e, size_t __n)
 
template<typename _Tp >
void std::_Array_augmented___multiplies (_Array< _Tp > __a, size_t __n, _Array< _Tp > __b)
 
template<typename _Tp >
void std::_Array_augmented___multiplies (_Array< _Tp > __a, size_t __n, _Array< _Tp > __b, _Array< bool > __m)
 
template<typename _Tp >
void std::_Array_augmented___multiplies (_Array< _Tp > __a, size_t __n, _Array< _Tp > __b, _Array< size_t > __i)
 
template<typename _Tp >
void std::_Array_augmented___multiplies (_Array< _Tp > __a, size_t __n, const _Tp &__t)
 
template<typename _Tp >
void std::_Array_augmented___multiplies (_Array< _Tp > __a, size_t __n, size_t __s, _Array< _Tp > __b)
 
template<typename _Tp , class _Dom >
void std::_Array_augmented___multiplies (_Array< _Tp > __a, size_t __s, const _Expr< _Dom, _Tp > &__e, size_t __n)
 
template<typename _Tp >
void std::_Array_augmented___plus (_Array< _Tp > __a, _Array< _Tp > __b, size_t __n, size_t __s)
 
template<typename _Tp >
void std::_Array_augmented___plus (_Array< _Tp > __a, _Array< bool > __m, _Array< _Tp > __b, size_t __n)
 
template<typename _Tp , class _Dom >
void std::_Array_augmented___plus (_Array< _Tp > __a, _Array< bool > __m, const _Expr< _Dom, _Tp > &__e, size_t __n)
 
template<typename _Tp >
void std::_Array_augmented___plus (_Array< _Tp > __a, _Array< size_t > __i, _Array< _Tp > __b, size_t __n)
 
template<typename _Tp , class _Dom >
void std::_Array_augmented___plus (_Array< _Tp > __a, _Array< size_t > __i, const _Expr< _Dom, _Tp > &__e, size_t __n)
 
template<typename _Tp , class _Dom >
void std::_Array_augmented___plus (_Array< _Tp > __a, const _Expr< _Dom, _Tp > &__e, size_t __n)
 
template<typename _Tp >
void std::_Array_augmented___plus (_Array< _Tp > __a, size_t __n, _Array< _Tp > __b)
 
template<typename _Tp >
void std::_Array_augmented___plus (_Array< _Tp > __a, size_t __n, _Array< _Tp > __b, _Array< bool > __m)
 
template<typename _Tp >
void std::_Array_augmented___plus (_Array< _Tp > __a, size_t __n, _Array< _Tp > __b, _Array< size_t > __i)
 
template<typename _Tp >
void std::_Array_augmented___plus (_Array< _Tp > __a, size_t __n, const _Tp &__t)
 
template<typename _Tp >
void std::_Array_augmented___plus (_Array< _Tp > __a, size_t __n, size_t __s, _Array< _Tp > __b)
 
template<typename _Tp , class _Dom >
void std::_Array_augmented___plus (_Array< _Tp > __a, size_t __s, const _Expr< _Dom, _Tp > &__e, size_t __n)
 
template<typename _Tp >
void std::_Array_augmented___shift_left (_Array< _Tp > __a, _Array< _Tp > __b, size_t __n, size_t __s)
 
template<typename _Tp >
void std::_Array_augmented___shift_left (_Array< _Tp > __a, _Array< bool > __m, _Array< _Tp > __b, size_t __n)
 
template<typename _Tp , class _Dom >
void std::_Array_augmented___shift_left (_Array< _Tp > __a, _Array< bool > __m, const _Expr< _Dom, _Tp > &__e, size_t __n)
 
template<typename _Tp >
void std::_Array_augmented___shift_left (_Array< _Tp > __a, _Array< size_t > __i, _Array< _Tp > __b, size_t __n)
 
template<typename _Tp , class _Dom >
void std::_Array_augmented___shift_left (_Array< _Tp > __a, _Array< size_t > __i, const _Expr< _Dom, _Tp > &__e, size_t __n)
 
template<typename _Tp , class _Dom >
void std::_Array_augmented___shift_left (_Array< _Tp > __a, const _Expr< _Dom, _Tp > &__e, size_t __n)
 
template<typename _Tp >
void std::_Array_augmented___shift_left (_Array< _Tp > __a, size_t __n, _Array< _Tp > __b)
 
template<typename _Tp >
void std::_Array_augmented___shift_left (_Array< _Tp > __a, size_t __n, _Array< _Tp > __b, _Array< bool > __m)
 
template<typename _Tp >
void std::_Array_augmented___shift_left (_Array< _Tp > __a, size_t __n, _Array< _Tp > __b, _Array< size_t > __i)
 
template<typename _Tp >
void std::_Array_augmented___shift_left (_Array< _Tp > __a, size_t __n, const _Tp &__t)
 
template<typename _Tp >
void std::_Array_augmented___shift_left (_Array< _Tp > __a, size_t __n, size_t __s, _Array< _Tp > __b)
 
template<typename _Tp , class _Dom >
void std::_Array_augmented___shift_left (_Array< _Tp > __a, size_t __s, const _Expr< _Dom, _Tp > &__e, size_t __n)
 
template<typename _Tp >
void std::_Array_augmented___shift_right (_Array< _Tp > __a, _Array< _Tp > __b, size_t __n, size_t __s)
 
template<typename _Tp >
void std::_Array_augmented___shift_right (_Array< _Tp > __a, _Array< bool > __m, _Array< _Tp > __b, size_t __n)
 
template<typename _Tp , class _Dom >
void std::_Array_augmented___shift_right (_Array< _Tp > __a, _Array< bool > __m, const _Expr< _Dom, _Tp > &__e, size_t __n)
 
template<typename _Tp >
void std::_Array_augmented___shift_right (_Array< _Tp > __a, _Array< size_t > __i, _Array< _Tp > __b, size_t __n)
 
template<typename _Tp , class _Dom >
void std::_Array_augmented___shift_right (_Array< _Tp > __a, _Array< size_t > __i, const _Expr< _Dom, _Tp > &__e, size_t __n)
 
template<typename _Tp , class _Dom >
void std::_Array_augmented___shift_right (_Array< _Tp > __a, const _Expr< _Dom, _Tp > &__e, size_t __n)
 
template<typename _Tp >
void std::_Array_augmented___shift_right (_Array< _Tp > __a, size_t __n, _Array< _Tp > __b)
 
template<typename _Tp >
void std::_Array_augmented___shift_right (_Array< _Tp > __a, size_t __n, _Array< _Tp > __b, _Array< bool > __m)
 
template<typename _Tp >
void std::_Array_augmented___shift_right (_Array< _Tp > __a, size_t __n, _Array< _Tp > __b, _Array< size_t > __i)
 
template<typename _Tp >
void std::_Array_augmented___shift_right (_Array< _Tp > __a, size_t __n, const _Tp &__t)
 
template<typename _Tp >
void std::_Array_augmented___shift_right (_Array< _Tp > __a, size_t __n, size_t __s, _Array< _Tp > __b)
 
template<typename _Tp , class _Dom >
void std::_Array_augmented___shift_right (_Array< _Tp > __a, size_t __s, const _Expr< _Dom, _Tp > &__e, size_t __n)
 
template<typename _Tp , typename _Seq >
bool std::operator!= (const queue< _Tp, _Seq > &__x, const queue< _Tp, _Seq > &__y)
 
template<typename _Tp , typename _Seq >
bool std::operator< (const queue< _Tp, _Seq > &__x, const queue< _Tp, _Seq > &__y)
 
template<typename _Tp , typename _Seq >
bool std::operator<= (const queue< _Tp, _Seq > &__x, const queue< _Tp, _Seq > &__y)
 
template<typename _Tp , typename _Seq >
bool std::operator== (const queue< _Tp, _Seq > &__x, const queue< _Tp, _Seq > &__y)
 
template<typename _Tp , typename _Seq >
bool std::operator> (const queue< _Tp, _Seq > &__x, const queue< _Tp, _Seq > &__y)
 
template<typename _Tp , typename _Seq >
bool std::operator>= (const queue< _Tp, _Seq > &__x, const queue< _Tp, _Seq > &__y)
 
│ │ │ +template<typename _Compare , typename _Container , typename = _RequireNotAllocator<_Compare>, typename = _RequireNotAllocator<_Container>>
 std::priority_queue (_Compare, _Container) -> priority_queue< typename _Container::value_type, _Container, _Compare >
 
│ │ │ +template<typename _Compare , typename _Container , typename _Allocator , typename = _RequireNotAllocator<_Compare>, typename = _RequireNotAllocator<_Container>>
 std::priority_queue (_Compare, _Container, _Allocator) -> priority_queue< typename _Container::value_type, _Container, _Compare >
 
│ │ │ +template<typename _InputIterator , typename _ValT = typename iterator_traits<_InputIterator>::value_type, typename _Compare = less<_ValT>, typename _Container = vector<_ValT>, typename = _RequireInputIter<_InputIterator>, typename = _RequireNotAllocator<_Compare>, typename = _RequireNotAllocator<_Container>>
 std::priority_queue (_InputIterator, _InputIterator, _Compare=_Compare(), _Container=_Container()) -> priority_queue< _ValT, _Container, _Compare >
 
│ │ │ +template<typename _Container , typename = _RequireNotAllocator<_Container>>
 std::queue (_Container) -> queue< typename _Container::value_type, _Container >
 
│ │ │ +template<typename _Container , typename _Allocator , typename = _RequireNotAllocator<_Container>>
 std::queue (_Container, _Allocator) -> queue< typename _Container::value_type, _Container >
 
template<typename _Tp , typename _Sequence , typename _Compare >
enable_if< __and_< __is_swappable< _Sequence >, __is_swappable< _Compare > >::value >::type std::swap (priority_queue< _Tp, _Sequence, _Compare > &__x, priority_queue< _Tp, _Sequence, _Compare > &__y) noexcept(noexcept(__x.swap(__y)))
 
template<typename _Tp , typename _Seq >
enable_if< __is_swappable< _Seq >::value >::type std::swap (queue< _Tp, _Seq > &__x, queue< _Tp, _Seq > &__y) noexcept(noexcept(__x.swap(__y)))
 
│ │ │

Detailed Description

│ │ │ -

This is an internal header file, included by other library headers. Do not attempt to use it directly. Instead, include <valarray>.

│ │ │ - │ │ │ -

Definition in file valarray_array.h.

│ │ │ -

Macro Definition Documentation

│ │ │ - │ │ │ -

◆ _DEFINE_ARRAY_FUNCTION

│ │ │ +

This is an internal header file, included by other library headers. Do not attempt to use it directly. Instead, include <queue>.

│ │ │ │ │ │ -
│ │ │ -
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
#define _DEFINE_ARRAY_FUNCTION( _Op,
 _Name 
)
│ │ │ -
│ │ │ - │ │ │ -

Definition at line 511 of file valarray_array.h.

│ │ │ - │ │ │ -
│ │ │ -
│ │ │ -
│ │ │ +

Definition in file stl_queue.h.

│ │ │ +
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,633 +1,93 @@ │ │ │ │ libstdc++ │ │ │ │ -_N_a_m_e_s_p_a_c_e_s | _M_a_c_r_o_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -valarray_array.h File Reference │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ +stl_queue.h File Reference │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ +CCllaasssseess │ │ │ │ +class   _s_t_d_:_:_p_r_i_o_r_i_t_y___q_u_e_u_e_<_ ___T_p_,_ ___S_e_q_u_e_n_c_e_,_ ___C_o_m_p_a_r_e_ _> │ │ │ │ +  │ │ │ │ +class   _s_t_d_:_:_q_u_e_u_e_<_ ___T_p_,_ ___S_e_q_u_e_n_c_e_ _> │ │ │ │ +  │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _s_t_d │ │ │ │   │ │ │ │ -MMaaccrrooss │ │ │ │ -#define  ___D_E_F_I_N_E___A_R_R_A_Y___F_U_N_C_T_I_O_N(_Op, _Name) │ │ │ │ -  │ │ │ │ FFuunnccttiioonnss │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:_____v_a_l_a_r_r_a_y___c_o_p_y (_Array< _Tp > __a, _Array< _Tp > __b, │ │ │ │ - size_t __n, size_t _____s) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:_____v_a_l_a_r_r_a_y___c_o_p_y (_Array< _Tp > __a, _Array< size_t > __i, │ │ │ │ - _Array< _Tp > __b, size_t __n) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:_____v_a_l_a_r_r_a_y___c_o_p_y (_Array< _Tp > __a, size_t __n, _Array< │ │ │ │ - _Tp > __b) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:_____v_a_l_a_r_r_a_y___c_o_p_y (_Array< _Tp > __a, size_t __n, _Array< │ │ │ │ - _Tp > __b, _Array< size_t > __i) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:_____v_a_l_a_r_r_a_y___c_o_p_y (_Array< _Tp > __a, size_t __n, size_t │ │ │ │ - _____s, _Array< _Tp > __b) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:_____v_a_l_a_r_r_a_y___c_o_p_y (_Array< _Tp > __a, size_t __n, size_t │ │ │ │ - _____s_1, _Array< _Tp > __b, size_t _____s_2) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:_____v_a_l_a_r_r_a_y___c_o_p_y (_Array< _Tp > _____s_r_c, size_t __n, _Array< │ │ │ │ - size_t > __i, _Array< _Tp > _____d_s_t, _Array< size_t > __j) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:_____v_a_l_a_r_r_a_y___c_o_p_y (const _Tp *_____r_e_s_t_r_i_c_t____ __a, _Tp │ │ │ │ - *_____r_e_s_t_r_i_c_t____ __b, size_t __n, size_t _____s) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:_____v_a_l_a_r_r_a_y___c_o_p_y (const _Tp *_____r_e_s_t_r_i_c_t____ __a, const │ │ │ │ - size_t *_____r_e_s_t_r_i_c_t____ __i, _Tp *_____r_e_s_t_r_i_c_t____ __b, size_t __n) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:_____v_a_l_a_r_r_a_y___c_o_p_y (const _Tp *_____r_e_s_t_r_i_c_t____ __a, size_t __n, │ │ │ │ - _Tp *_____r_e_s_t_r_i_c_t____ __b) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:_____v_a_l_a_r_r_a_y___c_o_p_y (const _Tp *_____r_e_s_t_r_i_c_t____ __a, size_t __n, │ │ │ │ - _Tp *_____r_e_s_t_r_i_c_t____ __b, const size_t *_____r_e_s_t_r_i_c_t____ __i) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:_____v_a_l_a_r_r_a_y___c_o_p_y (const _Tp *_____r_e_s_t_r_i_c_t____ __a, size_t __n, │ │ │ │ - size_t _____s, _Tp *_____r_e_s_t_r_i_c_t____ __b) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:_____v_a_l_a_r_r_a_y___c_o_p_y (const _Tp *_____r_e_s_t_r_i_c_t____ _____s_r_c, size_t │ │ │ │ - __n, const size_t *_____r_e_s_t_r_i_c_t____ __i, _Tp *_____r_e_s_t_r_i_c_t____ _____d_s_t, │ │ │ │ - const size_t *_____r_e_s_t_r_i_c_t____ __j) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:_____v_a_l_a_r_r_a_y___c_o_p_y (const _Tp *_____r_e_s_t_r_i_c_t____ _____s_r_c, size_t │ │ │ │ - __n, size_t _____s_1, _Tp *_____r_e_s_t_r_i_c_t____ _____d_s_t, size_t _____s_2) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:_____v_a_l_a_r_r_a_y___c_o_p_y___c_o_n_s_t_r_u_c_t (_Array< _Tp > __a, _Array< │ │ │ │ - size_t > __i, _Array< _Tp > __b, size_t __n) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:_____v_a_l_a_r_r_a_y___c_o_p_y___c_o_n_s_t_r_u_c_t (_Array< _Tp > __a, size_t __n, │ │ │ │ - size_t _____s, _Array< _Tp > __b) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:_____v_a_l_a_r_r_a_y___c_o_p_y___c_o_n_s_t_r_u_c_t (const _Tp *__b, const _Tp │ │ │ │ - *__e, _Tp *_____r_e_s_t_r_i_c_t____ _____o) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:_____v_a_l_a_r_r_a_y___c_o_p_y___c_o_n_s_t_r_u_c_t (const _Tp *_____r_e_s_t_r_i_c_t____ __a, │ │ │ │ - const size_t *_____r_e_s_t_r_i_c_t____ __i, _Tp *_____r_e_s_t_r_i_c_t____ _____o, size_t │ │ │ │ - __n) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:_____v_a_l_a_r_r_a_y___c_o_p_y___c_o_n_s_t_r_u_c_t (const _Tp *_____r_e_s_t_r_i_c_t____ __a, │ │ │ │ - size_t __n, size_t _____s, _Tp *_____r_e_s_t_r_i_c_t____ _____o) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:_____v_a_l_a_r_r_a_y___d_e_f_a_u_l_t___c_o_n_s_t_r_u_c_t (_Tp *__b, _Tp *__e) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:_____v_a_l_a_r_r_a_y___d_e_s_t_r_o_y___e_l_e_m_e_n_t_s (_Tp *__b, _Tp *__e) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:_____v_a_l_a_r_r_a_y___f_i_l_l (_Array< _Tp > __a, _Array< size_t > __i, │ │ │ │ - size_t __n, const _Tp &__t) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:_____v_a_l_a_r_r_a_y___f_i_l_l (_Array< _Tp > __a, size_t __n, const _Tp │ │ │ │ - &__t) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:_____v_a_l_a_r_r_a_y___f_i_l_l (_Array< _Tp > __a, size_t __n, size_t │ │ │ │ - _____s, const _Tp &__t) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:_____v_a_l_a_r_r_a_y___f_i_l_l (_Tp *_____r_e_s_t_r_i_c_t____ __a, const size_t │ │ │ │ - *_____r_e_s_t_r_i_c_t____ __i, size_t __n, const _Tp &__t) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:_____v_a_l_a_r_r_a_y___f_i_l_l (_Tp *_____r_e_s_t_r_i_c_t____ __a, size_t __n, const │ │ │ │ - _Tp &__t) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:_____v_a_l_a_r_r_a_y___f_i_l_l (_Tp *_____r_e_s_t_r_i_c_t____ __a, size_t __n, │ │ │ │ - size_t _____s, const _Tp &__t) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:_____v_a_l_a_r_r_a_y___f_i_l_l___c_o_n_s_t_r_u_c_t (_Tp *__b, _Tp *__e, const _Tp │ │ │ │ - __t) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _Tp *  _s_t_d_:_:_____v_a_l_a_r_r_a_y___g_e_t___s_t_o_r_a_g_e (size_t) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e ___T_a > │ │ │ │ -_Ta::value_type  _s_t_d_:_:_____v_a_l_a_r_r_a_y___m_a_x (const ___T_a &__a) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e ___T_a > │ │ │ │ -_Ta::value_type  _s_t_d_:_:_____v_a_l_a_r_r_a_y___m_i_n (const ___T_a &__a) │ │ │ │ -  │ │ │ │ - _v_o_i_d  _s_t_d_:_:_____v_a_l_a_r_r_a_y___r_e_l_e_a_s_e___m_e_m_o_r_y (_v_o_i_d *__p) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _Tp  _s_t_d_:_:_____v_a_l_a_r_r_a_y___s_u_m (const _Tp *__f, const _Tp *_____l) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______b_i_t_w_i_s_e___a_n_d (_Array< _Tp > __a, │ │ │ │ - _Array< _Tp > __b, size_t __n, size_t _____s) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______b_i_t_w_i_s_e___a_n_d (_Array< _Tp > __a, │ │ │ │ - _Array< bool > _____m, _Array< _Tp > __b, size_t __n) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _c_l_a_s_s ___D_o_m > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______b_i_t_w_i_s_e___a_n_d (_Array< _Tp > __a, │ │ │ │ - _Array< bool > _____m, const _Expr< ___D_o_m, _Tp > &__e, size_t __n) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______b_i_t_w_i_s_e___a_n_d (_Array< _Tp > __a, │ │ │ │ - _Array< size_t > __i, _Array< _Tp > __b, size_t __n) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _c_l_a_s_s ___D_o_m > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______b_i_t_w_i_s_e___a_n_d (_Array< _Tp > __a, │ │ │ │ - _Array< size_t > __i, const _Expr< ___D_o_m, _Tp > &__e, size_t │ │ │ │ - __n) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _c_l_a_s_s ___D_o_m > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______b_i_t_w_i_s_e___a_n_d (_Array< _Tp > __a, const │ │ │ │ - _Expr< ___D_o_m, _Tp > &__e, size_t __n) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______b_i_t_w_i_s_e___a_n_d (_Array< _Tp > __a, size_t │ │ │ │ - __n, _Array< _Tp > __b) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______b_i_t_w_i_s_e___a_n_d (_Array< _Tp > __a, size_t │ │ │ │ - __n, _Array< _Tp > __b, _Array< bool > _____m) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______b_i_t_w_i_s_e___a_n_d (_Array< _Tp > __a, size_t │ │ │ │ - __n, _Array< _Tp > __b, _Array< size_t > __i) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______b_i_t_w_i_s_e___a_n_d (_Array< _Tp > __a, size_t │ │ │ │ - __n, const _Tp &__t) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______b_i_t_w_i_s_e___a_n_d (_Array< _Tp > __a, size_t │ │ │ │ - __n, size_t _____s, _Array< _Tp > __b) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _c_l_a_s_s ___D_o_m > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______b_i_t_w_i_s_e___a_n_d (_Array< _Tp > __a, size_t │ │ │ │ - _____s, const _Expr< ___D_o_m, _Tp > &__e, size_t __n) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______b_i_t_w_i_s_e___o_r (_Array< _Tp > __a, _Array< │ │ │ │ - _Tp > __b, size_t __n, size_t _____s) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______b_i_t_w_i_s_e___o_r (_Array< _Tp > __a, _Array< │ │ │ │ - bool > _____m, _Array< _Tp > __b, size_t __n) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _c_l_a_s_s ___D_o_m > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______b_i_t_w_i_s_e___o_r (_Array< _Tp > __a, _Array< │ │ │ │ - bool > _____m, const _Expr< ___D_o_m, _Tp > &__e, size_t __n) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______b_i_t_w_i_s_e___o_r (_Array< _Tp > __a, _Array< │ │ │ │ - size_t > __i, _Array< _Tp > __b, size_t __n) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _c_l_a_s_s ___D_o_m > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______b_i_t_w_i_s_e___o_r (_Array< _Tp > __a, _Array< │ │ │ │ - size_t > __i, const _Expr< ___D_o_m, _Tp > &__e, size_t __n) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _c_l_a_s_s ___D_o_m > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______b_i_t_w_i_s_e___o_r (_Array< _Tp > __a, const │ │ │ │ - _Expr< ___D_o_m, _Tp > &__e, size_t __n) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______b_i_t_w_i_s_e___o_r (_Array< _Tp > __a, size_t │ │ │ │ - __n, _Array< _Tp > __b) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______b_i_t_w_i_s_e___o_r (_Array< _Tp > __a, size_t │ │ │ │ - __n, _Array< _Tp > __b, _Array< bool > _____m) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______b_i_t_w_i_s_e___o_r (_Array< _Tp > __a, size_t │ │ │ │ - __n, _Array< _Tp > __b, _Array< size_t > __i) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______b_i_t_w_i_s_e___o_r (_Array< _Tp > __a, size_t │ │ │ │ - __n, const _Tp &__t) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______b_i_t_w_i_s_e___o_r (_Array< _Tp > __a, size_t │ │ │ │ - __n, size_t _____s, _Array< _Tp > __b) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _c_l_a_s_s ___D_o_m > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______b_i_t_w_i_s_e___o_r (_Array< _Tp > __a, size_t │ │ │ │ - _____s, const _Expr< ___D_o_m, _Tp > &__e, size_t __n) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______b_i_t_w_i_s_e___x_o_r (_Array< _Tp > __a, │ │ │ │ - _Array< _Tp > __b, size_t __n, size_t _____s) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______b_i_t_w_i_s_e___x_o_r (_Array< _Tp > __a, │ │ │ │ - _Array< bool > _____m, _Array< _Tp > __b, size_t __n) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _c_l_a_s_s ___D_o_m > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______b_i_t_w_i_s_e___x_o_r (_Array< _Tp > __a, │ │ │ │ - _Array< bool > _____m, const _Expr< ___D_o_m, _Tp > &__e, size_t __n) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______b_i_t_w_i_s_e___x_o_r (_Array< _Tp > __a, │ │ │ │ - _Array< size_t > __i, _Array< _Tp > __b, size_t __n) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _c_l_a_s_s ___D_o_m > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______b_i_t_w_i_s_e___x_o_r (_Array< _Tp > __a, │ │ │ │ - _Array< size_t > __i, const _Expr< ___D_o_m, _Tp > &__e, size_t │ │ │ │ - __n) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _c_l_a_s_s ___D_o_m > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______b_i_t_w_i_s_e___x_o_r (_Array< _Tp > __a, const │ │ │ │ - _Expr< ___D_o_m, _Tp > &__e, size_t __n) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______b_i_t_w_i_s_e___x_o_r (_Array< _Tp > __a, size_t │ │ │ │ - __n, _Array< _Tp > __b) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______b_i_t_w_i_s_e___x_o_r (_Array< _Tp > __a, size_t │ │ │ │ - __n, _Array< _Tp > __b, _Array< bool > _____m) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______b_i_t_w_i_s_e___x_o_r (_Array< _Tp > __a, size_t │ │ │ │ - __n, _Array< _Tp > __b, _Array< size_t > __i) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______b_i_t_w_i_s_e___x_o_r (_Array< _Tp > __a, size_t │ │ │ │ - __n, const _Tp &__t) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______b_i_t_w_i_s_e___x_o_r (_Array< _Tp > __a, size_t │ │ │ │ - __n, size_t _____s, _Array< _Tp > __b) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _c_l_a_s_s ___D_o_m > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______b_i_t_w_i_s_e___x_o_r (_Array< _Tp > __a, size_t │ │ │ │ - _____s, const _Expr< ___D_o_m, _Tp > &__e, size_t __n) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______d_i_v_i_d_e_s (_Array< _Tp > __a, _Array< │ │ │ │ - _Tp > __b, size_t __n, size_t _____s) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______d_i_v_i_d_e_s (_Array< _Tp > __a, _Array< │ │ │ │ - bool > _____m, _Array< _Tp > __b, size_t __n) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _c_l_a_s_s ___D_o_m > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______d_i_v_i_d_e_s (_Array< _Tp > __a, _Array< │ │ │ │ - bool > _____m, const _Expr< ___D_o_m, _Tp > &__e, size_t __n) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______d_i_v_i_d_e_s (_Array< _Tp > __a, _Array< │ │ │ │ - size_t > __i, _Array< _Tp > __b, size_t __n) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _c_l_a_s_s ___D_o_m > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______d_i_v_i_d_e_s (_Array< _Tp > __a, _Array< │ │ │ │ - size_t > __i, const _Expr< ___D_o_m, _Tp > &__e, size_t __n) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _c_l_a_s_s ___D_o_m > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______d_i_v_i_d_e_s (_Array< _Tp > __a, const │ │ │ │ - _Expr< ___D_o_m, _Tp > &__e, size_t __n) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______d_i_v_i_d_e_s (_Array< _Tp > __a, size_t │ │ │ │ - __n, _Array< _Tp > __b) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______d_i_v_i_d_e_s (_Array< _Tp > __a, size_t │ │ │ │ - __n, _Array< _Tp > __b, _Array< bool > _____m) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______d_i_v_i_d_e_s (_Array< _Tp > __a, size_t │ │ │ │ - __n, _Array< _Tp > __b, _Array< size_t > __i) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______d_i_v_i_d_e_s (_Array< _Tp > __a, size_t │ │ │ │ - __n, const _Tp &__t) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______d_i_v_i_d_e_s (_Array< _Tp > __a, size_t │ │ │ │ - __n, size_t _____s, _Array< _Tp > __b) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _c_l_a_s_s ___D_o_m > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______d_i_v_i_d_e_s (_Array< _Tp > __a, size_t │ │ │ │ - _____s, const _Expr< ___D_o_m, _Tp > &__e, size_t __n) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______m_i_n_u_s (_Array< _Tp > __a, _Array< _Tp │ │ │ │ - > __b, size_t __n, size_t _____s) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______m_i_n_u_s (_Array< _Tp > __a, _Array< bool │ │ │ │ - > _____m, _Array< _Tp > __b, size_t __n) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _c_l_a_s_s ___D_o_m > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______m_i_n_u_s (_Array< _Tp > __a, _Array< bool │ │ │ │ - > _____m, const _Expr< ___D_o_m, _Tp > &__e, size_t __n) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______m_i_n_u_s (_Array< _Tp > __a, _Array< │ │ │ │ - size_t > __i, _Array< _Tp > __b, size_t __n) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _c_l_a_s_s ___D_o_m > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______m_i_n_u_s (_Array< _Tp > __a, _Array< │ │ │ │ - size_t > __i, const _Expr< ___D_o_m, _Tp > &__e, size_t __n) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _c_l_a_s_s ___D_o_m > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______m_i_n_u_s (_Array< _Tp > __a, const _Expr< │ │ │ │ - ___D_o_m, _Tp > &__e, size_t __n) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______m_i_n_u_s (_Array< _Tp > __a, size_t __n, │ │ │ │ - _Array< _Tp > __b) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______m_i_n_u_s (_Array< _Tp > __a, size_t __n, │ │ │ │ - _Array< _Tp > __b, _Array< bool > _____m) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______m_i_n_u_s (_Array< _Tp > __a, size_t __n, │ │ │ │ - _Array< _Tp > __b, _Array< size_t > __i) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______m_i_n_u_s (_Array< _Tp > __a, size_t __n, │ │ │ │ - const _Tp &__t) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______m_i_n_u_s (_Array< _Tp > __a, size_t __n, │ │ │ │ - size_t _____s, _Array< _Tp > __b) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _c_l_a_s_s ___D_o_m > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______m_i_n_u_s (_Array< _Tp > __a, size_t _____s, │ │ │ │ - const _Expr< ___D_o_m, _Tp > &__e, size_t __n) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______m_o_d_u_l_u_s (_Array< _Tp > __a, _Array< │ │ │ │ - _Tp > __b, size_t __n, size_t _____s) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______m_o_d_u_l_u_s (_Array< _Tp > __a, _Array< │ │ │ │ - bool > _____m, _Array< _Tp > __b, size_t __n) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _c_l_a_s_s ___D_o_m > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______m_o_d_u_l_u_s (_Array< _Tp > __a, _Array< │ │ │ │ - bool > _____m, const _Expr< ___D_o_m, _Tp > &__e, size_t __n) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______m_o_d_u_l_u_s (_Array< _Tp > __a, _Array< │ │ │ │ - size_t > __i, _Array< _Tp > __b, size_t __n) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _c_l_a_s_s ___D_o_m > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______m_o_d_u_l_u_s (_Array< _Tp > __a, _Array< │ │ │ │ - size_t > __i, const _Expr< ___D_o_m, _Tp > &__e, size_t __n) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _c_l_a_s_s ___D_o_m > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______m_o_d_u_l_u_s (_Array< _Tp > __a, const │ │ │ │ - _Expr< ___D_o_m, _Tp > &__e, size_t __n) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______m_o_d_u_l_u_s (_Array< _Tp > __a, size_t │ │ │ │ - __n, _Array< _Tp > __b) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______m_o_d_u_l_u_s (_Array< _Tp > __a, size_t │ │ │ │ - __n, _Array< _Tp > __b, _Array< bool > _____m) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______m_o_d_u_l_u_s (_Array< _Tp > __a, size_t │ │ │ │ - __n, _Array< _Tp > __b, _Array< size_t > __i) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______m_o_d_u_l_u_s (_Array< _Tp > __a, size_t │ │ │ │ - __n, const _Tp &__t) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______m_o_d_u_l_u_s (_Array< _Tp > __a, size_t │ │ │ │ - __n, size_t _____s, _Array< _Tp > __b) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _c_l_a_s_s ___D_o_m > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______m_o_d_u_l_u_s (_Array< _Tp > __a, size_t │ │ │ │ - _____s, const _Expr< ___D_o_m, _Tp > &__e, size_t __n) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______m_u_l_t_i_p_l_i_e_s (_Array< _Tp > __a, _Array< │ │ │ │ - _Tp > __b, size_t __n, size_t _____s) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______m_u_l_t_i_p_l_i_e_s (_Array< _Tp > __a, _Array< │ │ │ │ - bool > _____m, _Array< _Tp > __b, size_t __n) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _c_l_a_s_s ___D_o_m > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______m_u_l_t_i_p_l_i_e_s (_Array< _Tp > __a, _Array< │ │ │ │ - bool > _____m, const _Expr< ___D_o_m, _Tp > &__e, size_t __n) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______m_u_l_t_i_p_l_i_e_s (_Array< _Tp > __a, _Array< │ │ │ │ - size_t > __i, _Array< _Tp > __b, size_t __n) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _c_l_a_s_s ___D_o_m > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______m_u_l_t_i_p_l_i_e_s (_Array< _Tp > __a, _Array< │ │ │ │ - size_t > __i, const _Expr< ___D_o_m, _Tp > &__e, size_t __n) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _c_l_a_s_s ___D_o_m > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______m_u_l_t_i_p_l_i_e_s (_Array< _Tp > __a, const │ │ │ │ - _Expr< ___D_o_m, _Tp > &__e, size_t __n) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______m_u_l_t_i_p_l_i_e_s (_Array< _Tp > __a, size_t │ │ │ │ - __n, _Array< _Tp > __b) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______m_u_l_t_i_p_l_i_e_s (_Array< _Tp > __a, size_t │ │ │ │ - __n, _Array< _Tp > __b, _Array< bool > _____m) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______m_u_l_t_i_p_l_i_e_s (_Array< _Tp > __a, size_t │ │ │ │ - __n, _Array< _Tp > __b, _Array< size_t > __i) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______m_u_l_t_i_p_l_i_e_s (_Array< _Tp > __a, size_t │ │ │ │ - __n, const _Tp &__t) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______m_u_l_t_i_p_l_i_e_s (_Array< _Tp > __a, size_t │ │ │ │ - __n, size_t _____s, _Array< _Tp > __b) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _c_l_a_s_s ___D_o_m > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______m_u_l_t_i_p_l_i_e_s (_Array< _Tp > __a, size_t │ │ │ │ - _____s, const _Expr< ___D_o_m, _Tp > &__e, size_t __n) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______p_l_u_s (_Array< _Tp > __a, _Array< _Tp > │ │ │ │ - __b, size_t __n, size_t _____s) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______p_l_u_s (_Array< _Tp > __a, _Array< bool │ │ │ │ - > _____m, _Array< _Tp > __b, size_t __n) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _c_l_a_s_s ___D_o_m > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______p_l_u_s (_Array< _Tp > __a, _Array< bool │ │ │ │ - > _____m, const _Expr< ___D_o_m, _Tp > &__e, size_t __n) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______p_l_u_s (_Array< _Tp > __a, _Array< │ │ │ │ - size_t > __i, _Array< _Tp > __b, size_t __n) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _c_l_a_s_s ___D_o_m > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______p_l_u_s (_Array< _Tp > __a, _Array< │ │ │ │ - size_t > __i, const _Expr< ___D_o_m, _Tp > &__e, size_t __n) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _c_l_a_s_s ___D_o_m > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______p_l_u_s (_Array< _Tp > __a, const _Expr< │ │ │ │ - ___D_o_m, _Tp > &__e, size_t __n) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______p_l_u_s (_Array< _Tp > __a, size_t __n, │ │ │ │ - _Array< _Tp > __b) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______p_l_u_s (_Array< _Tp > __a, size_t __n, │ │ │ │ - _Array< _Tp > __b, _Array< bool > _____m) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______p_l_u_s (_Array< _Tp > __a, size_t __n, │ │ │ │ - _Array< _Tp > __b, _Array< size_t > __i) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______p_l_u_s (_Array< _Tp > __a, size_t __n, │ │ │ │ - const _Tp &__t) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______p_l_u_s (_Array< _Tp > __a, size_t __n, │ │ │ │ - size_t _____s, _Array< _Tp > __b) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _c_l_a_s_s ___D_o_m > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______p_l_u_s (_Array< _Tp > __a, size_t _____s, │ │ │ │ - const _Expr< ___D_o_m, _Tp > &__e, size_t __n) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______s_h_i_f_t___l_e_f_t (_Array< _Tp > __a, _Array< │ │ │ │ - _Tp > __b, size_t __n, size_t _____s) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______s_h_i_f_t___l_e_f_t (_Array< _Tp > __a, _Array< │ │ │ │ - bool > _____m, _Array< _Tp > __b, size_t __n) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _c_l_a_s_s ___D_o_m > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______s_h_i_f_t___l_e_f_t (_Array< _Tp > __a, _Array< │ │ │ │ - bool > _____m, const _Expr< ___D_o_m, _Tp > &__e, size_t __n) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______s_h_i_f_t___l_e_f_t (_Array< _Tp > __a, _Array< │ │ │ │ - size_t > __i, _Array< _Tp > __b, size_t __n) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _c_l_a_s_s ___D_o_m > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______s_h_i_f_t___l_e_f_t (_Array< _Tp > __a, _Array< │ │ │ │ - size_t > __i, const _Expr< ___D_o_m, _Tp > &__e, size_t __n) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _c_l_a_s_s ___D_o_m > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______s_h_i_f_t___l_e_f_t (_Array< _Tp > __a, const │ │ │ │ - _Expr< ___D_o_m, _Tp > &__e, size_t __n) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______s_h_i_f_t___l_e_f_t (_Array< _Tp > __a, size_t │ │ │ │ - __n, _Array< _Tp > __b) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______s_h_i_f_t___l_e_f_t (_Array< _Tp > __a, size_t │ │ │ │ - __n, _Array< _Tp > __b, _Array< bool > _____m) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______s_h_i_f_t___l_e_f_t (_Array< _Tp > __a, size_t │ │ │ │ - __n, _Array< _Tp > __b, _Array< size_t > __i) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______s_h_i_f_t___l_e_f_t (_Array< _Tp > __a, size_t │ │ │ │ - __n, const _Tp &__t) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______s_h_i_f_t___l_e_f_t (_Array< _Tp > __a, size_t │ │ │ │ - __n, size_t _____s, _Array< _Tp > __b) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _c_l_a_s_s ___D_o_m > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______s_h_i_f_t___l_e_f_t (_Array< _Tp > __a, size_t │ │ │ │ - _____s, const _Expr< ___D_o_m, _Tp > &__e, size_t __n) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______s_h_i_f_t___r_i_g_h_t (_Array< _Tp > __a, │ │ │ │ - _Array< _Tp > __b, size_t __n, size_t _____s) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______s_h_i_f_t___r_i_g_h_t (_Array< _Tp > __a, │ │ │ │ - _Array< bool > _____m, _Array< _Tp > __b, size_t __n) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _c_l_a_s_s ___D_o_m > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______s_h_i_f_t___r_i_g_h_t (_Array< _Tp > __a, │ │ │ │ - _Array< bool > _____m, const _Expr< ___D_o_m, _Tp > &__e, size_t __n) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______s_h_i_f_t___r_i_g_h_t (_Array< _Tp > __a, │ │ │ │ - _Array< size_t > __i, _Array< _Tp > __b, size_t __n) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _c_l_a_s_s ___D_o_m > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______s_h_i_f_t___r_i_g_h_t (_Array< _Tp > __a, │ │ │ │ - _Array< size_t > __i, const _Expr< ___D_o_m, _Tp > &__e, size_t │ │ │ │ - __n) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _c_l_a_s_s ___D_o_m > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______s_h_i_f_t___r_i_g_h_t (_Array< _Tp > __a, const │ │ │ │ - _Expr< ___D_o_m, _Tp > &__e, size_t __n) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______s_h_i_f_t___r_i_g_h_t (_Array< _Tp > __a, size_t │ │ │ │ - __n, _Array< _Tp > __b) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______s_h_i_f_t___r_i_g_h_t (_Array< _Tp > __a, size_t │ │ │ │ - __n, _Array< _Tp > __b, _Array< bool > _____m) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______s_h_i_f_t___r_i_g_h_t (_Array< _Tp > __a, size_t │ │ │ │ - __n, _Array< _Tp > __b, _Array< size_t > __i) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______s_h_i_f_t___r_i_g_h_t (_Array< _Tp > __a, size_t │ │ │ │ - __n, const _Tp &__t) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______s_h_i_f_t___r_i_g_h_t (_Array< _Tp > __a, size_t │ │ │ │ - __n, size_t _____s, _Array< _Tp > __b) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _c_l_a_s_s ___D_o_m > │ │ │ │ - _v_o_i_d  _s_t_d_:_:___A_r_r_a_y___a_u_g_m_e_n_t_e_d_______s_h_i_f_t___r_i_g_h_t (_Array< _Tp > __a, size_t │ │ │ │ - _____s, const _Expr< ___D_o_m, _Tp > &__e, size_t __n) │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___S_e_q > │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_!_= (const _q_u_e_u_e< _Tp, ___S_e_q │ │ │ │ + > &__x, const _q_u_e_u_e< _Tp, ___S_e_q > &__y) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___S_e_q > │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_< (const _q_u_e_u_e< _Tp, ___S_e_q │ │ │ │ + > &__x, const _q_u_e_u_e< _Tp, ___S_e_q > &__y) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___S_e_q > │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_<_= (const _q_u_e_u_e< _Tp, ___S_e_q │ │ │ │ + > &__x, const _q_u_e_u_e< _Tp, ___S_e_q > &__y) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___S_e_q > │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_=_= (const _q_u_e_u_e< _Tp, ___S_e_q │ │ │ │ + > &__x, const _q_u_e_u_e< _Tp, ___S_e_q > &__y) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___S_e_q > │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_> (const _q_u_e_u_e< _Tp, ___S_e_q │ │ │ │ + > &__x, const _q_u_e_u_e< _Tp, ___S_e_q > &__y) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___S_e_q > │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_>_= (const _q_u_e_u_e< _Tp, ___S_e_q │ │ │ │ + > &__x, const _q_u_e_u_e< _Tp, ___S_e_q > &__y) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Compare , _t_y_p_e_n_a_m_e _Container , _t_y_p_e_n_a_m_e = │ │ │ │ +_RequireNotAllocator<_Compare>, _t_y_p_e_n_a_m_e = _RequireNotAllocator<_Container>> │ │ │ │ +   ssttdd::::pprriioorriittyy__qquueeuuee (_Compare, │ │ │ │ + _Container) -> _p_r_i_o_r_i_t_y___q_u_e_u_e< _t_y_p_e_n_a_m_e │ │ │ │ + _Container::value_type, _Container, │ │ │ │ + _Compare > │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Compare , _t_y_p_e_n_a_m_e _Container , _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r , │ │ │ │ +_t_y_p_e_n_a_m_e = _RequireNotAllocator<_Compare>, _t_y_p_e_n_a_m_e = │ │ │ │ +_RequireNotAllocator<_Container>> │ │ │ │ +   ssttdd::::pprriioorriittyy__qquueeuuee (_Compare, │ │ │ │ + _Container, ___A_l_l_o_c_a_t_o_r) - │ │ │ │ + > _p_r_i_o_r_i_t_y___q_u_e_u_e< _t_y_p_e_n_a_m_e _Container:: │ │ │ │ + value_type, _Container, _Compare > │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___I_n_p_u_t_I_t_e_r_a_t_o_r , _t_y_p_e_n_a_m_e ___V_a_l_T = typename │ │ │ │ +iterator_traits<_InputIterator>::value_type, _t_y_p_e_n_a_m_e _Compare = less<_ValT>, │ │ │ │ +_t_y_p_e_n_a_m_e _Container = vector<_ValT>, _t_y_p_e_n_a_m_e = │ │ │ │ +_RequireInputIter<_InputIterator>, _t_y_p_e_n_a_m_e = _RequireNotAllocator<_Compare>, │ │ │ │ +_t_y_p_e_n_a_m_e = _RequireNotAllocator<_Container>> │ │ │ │ +   ssttdd::::pprriioorriittyy__qquueeuuee (___I_n_p_u_t_I_t_e_r_a_t_o_r, │ │ │ │ + ___I_n_p_u_t_I_t_e_r_a_t_o_r, _Compare=_Compare(), │ │ │ │ + _Container=_Container()) - │ │ │ │ + > _p_r_i_o_r_i_t_y___q_u_e_u_e< ___V_a_l_T, _Container, │ │ │ │ + _Compare > │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Container , _t_y_p_e_n_a_m_e = _RequireNotAllocator<_Container>> │ │ │ │ +   ssttdd::::qquueeuuee (_Container) -> _q_u_e_u_e< │ │ │ │ + _t_y_p_e_n_a_m_e _Container::value_type, │ │ │ │ + _Container > │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Container , _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r , _t_y_p_e_n_a_m_e = │ │ │ │ +_RequireNotAllocator<_Container>> │ │ │ │ +   ssttdd::::qquueeuuee (_Container, ___A_l_l_o_c_a_t_o_r) - │ │ │ │ + > _q_u_e_u_e< _t_y_p_e_n_a_m_e _Container:: │ │ │ │ + value_type, _Container > │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e _Sequence , _t_y_p_e_n_a_m_e _Compare > │ │ │ │ + _e_n_a_b_l_e___i_f< __and_< _____i_s___s_w_a_p_p_a_b_l_e< _s_t_d_:_:_s_w_a_p (_p_r_i_o_r_i_t_y___q_u_e_u_e< _Tp, │ │ │ │ +_Sequence >, _____i_s___s_w_a_p_p_a_b_l_e< _Compare > _Sequence, _Compare > &__x, │ │ │ │ + >::value >::type  _p_r_i_o_r_i_t_y___q_u_e_u_e< _Tp, _Sequence, │ │ │ │ + _Compare > &__y) noexcept(noexcept │ │ │ │ + (__x.swap(__y))) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___S_e_q > │ │ │ │ + _e_n_a_b_l_e___i_f< _____i_s___s_w_a_p_p_a_b_l_e< ___S_e_q >:: _s_t_d_:_:_s_w_a_p (_q_u_e_u_e< _Tp, ___S_e_q > &__x, │ │ │ │ + value >::type  _q_u_e_u_e< _Tp, ___S_e_q > &__y) noexcept │ │ │ │ + (noexcept(__x.swap(__y))) │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ This is an internal header file, included by other library headers. Do not │ │ │ │ -attempt to use it directly. Instead, include . │ │ │ │ -Definition in file _v_a_l_a_r_r_a_y___a_r_r_a_y_._h. │ │ │ │ -********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ -********** _?◆_? __DDEEFFIINNEE__AARRRRAAYY__FFUUNNCCTTIIOONN ********** │ │ │ │ -#define _DEFINE_ARRAY_FUNCTION (   _Op, │ │ │ │ -   _Name  │ │ │ │ - ) │ │ │ │ -Definition at line _5_1_1 of file _v_a_l_a_r_r_a_y___a_r_r_a_y_._h. │ │ │ │ +attempt to use it directly. Instead, include . │ │ │ │ +Definition in file _s_t_l___q_u_e_u_e_._h. │ │ │ │ * _b_i_t_s │ │ │ │ - * _v_a_l_a_r_r_a_y___a_r_r_a_y_._h │ │ │ │ + * _s_t_l___q_u_e_u_e_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-12-base/libstdc++/user/a00362_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: valarray_array.h Source File │ │ │ +libstdc++: stl_queue.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -45,20 +45,20 @@ │ │ │ │ │ │
│ │ │
│ │ │ -
valarray_array.h
│ │ │ +
stl_queue.h
│ │ │
│ │ │
│ │ │ -Go to the documentation of this file.
1// The template and inlines for the -*- C++ -*- internal _Array helper class.
│ │ │ +Go to the documentation of this file.
1// Queue implementation -*- C++ -*-
│ │ │
2
│ │ │ -
3// Copyright (C) 1997-2022 Free Software Foundation, Inc.
│ │ │ +
3// Copyright (C) 2001-2022 Free Software Foundation, Inc.
│ │ │
4//
│ │ │
5// This file is part of the GNU ISO C++ Library. This library is free
│ │ │
6// software; you can redistribute it and/or modify it under the
│ │ │
7// terms of the GNU General Public License as published by the
│ │ │
8// Free Software Foundation; either version 3, or (at your option)
│ │ │
9// any later version.
│ │ │
10
│ │ │ @@ -71,678 +71,919 @@ │ │ │
17// permissions described in the GCC Runtime Library Exception, version
│ │ │
18// 3.1, as published by the Free Software Foundation.
│ │ │
19
│ │ │
20// You should have received a copy of the GNU General Public License and
│ │ │
21// a copy of the GCC Runtime Library Exception along with this program;
│ │ │
22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
│ │ │
23// <http://www.gnu.org/licenses/>.
│ │ │ -
24
│ │ │ -
25/** @file bits/valarray_array.h
│ │ │ -
26 * This is an internal header file, included by other library headers.
│ │ │ -
27 * Do not attempt to use it directly. @headername{valarray}
│ │ │ -
28 */
│ │ │ -
29
│ │ │ -
30// Written by Gabriel Dos Reis <Gabriel.Dos-Reis@DPTMaths.ENS-Cachan.Fr>
│ │ │ -
31
│ │ │ -
32#ifndef _VALARRAY_ARRAY_H
│ │ │ -
33#define _VALARRAY_ARRAY_H 1
│ │ │ -
34
│ │ │ -
35#pragma GCC system_header
│ │ │ -
36
│ │ │ -
37#include <bits/c++config.h>
│ │ │ - │ │ │ -
39#include <cstdlib>
│ │ │ -
40#include <new>
│ │ │ -
41
│ │ │ -
42namespace std _GLIBCXX_VISIBILITY(default)
│ │ │ -
43{
│ │ │ -
44_GLIBCXX_BEGIN_NAMESPACE_VERSION
│ │ │ -
45
│ │ │ -
46 //
│ │ │ -
47 // Helper functions on raw pointers
│ │ │ -
48 //
│ │ │ -
49
│ │ │ -
50 // We get memory the old fashioned way
│ │ │ -
51 template<typename _Tp>
│ │ │ -
52 _Tp*
│ │ │ -
53 __valarray_get_storage(size_t) __attribute__((__malloc__));
│ │ │ -
54
│ │ │ -
55 template<typename _Tp>
│ │ │ -
56 inline _Tp*
│ │ │ -
57 __valarray_get_storage(size_t __n)
│ │ │ -
58 { return static_cast<_Tp*>(operator new(__n * sizeof(_Tp))); }
│ │ │ -
59
│ │ │ -
60 // Return memory to the system
│ │ │ -
61 inline void
│ │ │ -
62 __valarray_release_memory(void* __p)
│ │ │ -
63 { operator delete(__p); }
│ │ │ +
24
│ │ │ +
25/*
│ │ │ +
26 *
│ │ │ +
27 * Copyright (c) 1994
│ │ │ +
28 * Hewlett-Packard Company
│ │ │ +
29 *
│ │ │ +
30 * Permission to use, copy, modify, distribute and sell this software
│ │ │ +
31 * and its documentation for any purpose is hereby granted without fee,
│ │ │ +
32 * provided that the above copyright notice appear in all copies and
│ │ │ +
33 * that both that copyright notice and this permission notice appear
│ │ │ +
34 * in supporting documentation. Hewlett-Packard Company makes no
│ │ │ +
35 * representations about the suitability of this software for any
│ │ │ +
36 * purpose. It is provided "as is" without express or implied warranty.
│ │ │ +
37 *
│ │ │ +
38 *
│ │ │ +
39 * Copyright (c) 1996,1997
│ │ │ +
40 * Silicon Graphics Computer Systems, Inc.
│ │ │ +
41 *
│ │ │ +
42 * Permission to use, copy, modify, distribute and sell this software
│ │ │ +
43 * and its documentation for any purpose is hereby granted without fee,
│ │ │ +
44 * provided that the above copyright notice appear in all copies and
│ │ │ +
45 * that both that copyright notice and this permission notice appear
│ │ │ +
46 * in supporting documentation. Silicon Graphics makes no
│ │ │ +
47 * representations about the suitability of this software for any
│ │ │ +
48 * purpose. It is provided "as is" without express or implied warranty.
│ │ │ +
49 */
│ │ │ +
50
│ │ │ +
51/** @file bits/stl_queue.h
│ │ │ +
52 * This is an internal header file, included by other library headers.
│ │ │ +
53 * Do not attempt to use it directly. @headername{queue}
│ │ │ +
54 */
│ │ │ +
55
│ │ │ +
56#ifndef _STL_QUEUE_H
│ │ │ +
57#define _STL_QUEUE_H 1
│ │ │ +
58
│ │ │ +
59#include <bits/concept_check.h>
│ │ │ +
60#include <debug/debug.h>
│ │ │ +
61#if __cplusplus >= 201103L
│ │ │ +
62# include <bits/uses_allocator.h>
│ │ │ +
63#endif
│ │ │
64
│ │ │ -
65 // Turn a raw-memory into an array of _Tp filled with _Tp()
│ │ │ -
66 // This is required in 'valarray<T> v(n);'
│ │ │ -
67 template<typename _Tp, bool>
│ │ │ -
68 struct _Array_default_ctor
│ │ │ -
69 {
│ │ │ -
70 // Please note that this isn't exception safe. But
│ │ │ -
71 // valarrays aren't required to be exception safe.
│ │ │ -
72 inline static void
│ │ │ -
73 _S_do_it(_Tp* __b, _Tp* __e)
│ │ │ -
74 {
│ │ │ -
75 while (__b != __e)
│ │ │ -
76 new(__b++) _Tp();
│ │ │ -
77 }
│ │ │ -
78 };
│ │ │ -
79
│ │ │ -
80 template<typename _Tp>
│ │ │ -
81 struct _Array_default_ctor<_Tp, true>
│ │ │ -
82 {
│ │ │ -
83 // For fundamental types, it suffices to say 'memset()'
│ │ │ -
84 inline static void
│ │ │ -
85 _S_do_it(_Tp* __b, _Tp* __e)
│ │ │ -
86 { __builtin_memset(__b, 0, (__e - __b) * sizeof(_Tp)); }
│ │ │ -
87 };
│ │ │ -
88
│ │ │ -
89 template<typename _Tp>
│ │ │ -
90 inline void
│ │ │ -
91 __valarray_default_construct(_Tp* __b, _Tp* __e)
│ │ │ -
92 {
│ │ │ -
93 _Array_default_ctor<_Tp, __is_scalar<_Tp>::__value>::_S_do_it(__b, __e);
│ │ │ -
94 }
│ │ │ -
95
│ │ │ -
96 // Turn a raw-memory into an array of _Tp filled with __t
│ │ │ -
97 // This is the required in valarray<T> v(n, t). Also
│ │ │ -
98 // used in valarray<>::resize().
│ │ │ -
99 template<typename _Tp, bool>
│ │ │ -
100 struct _Array_init_ctor
│ │ │ -
101 {
│ │ │ -
102 // Please note that this isn't exception safe. But
│ │ │ -
103 // valarrays aren't required to be exception safe.
│ │ │ -
104 inline static void
│ │ │ -
105 _S_do_it(_Tp* __b, _Tp* __e, const _Tp __t)
│ │ │ -
106 {
│ │ │ -
107 while (__b != __e)
│ │ │ -
108 new(__b++) _Tp(__t);
│ │ │ -
109 }
│ │ │ -
110 };
│ │ │ -
111
│ │ │ -
112 template<typename _Tp>
│ │ │ -
113 struct _Array_init_ctor<_Tp, true>
│ │ │ -
114 {
│ │ │ -
115 inline static void
│ │ │ -
116 _S_do_it(_Tp* __b, _Tp* __e, const _Tp __t)
│ │ │ -
117 {
│ │ │ -
118 while (__b != __e)
│ │ │ -
119 *__b++ = __t;
│ │ │ -
120 }
│ │ │ -
121 };
│ │ │ +
65namespace std _GLIBCXX_VISIBILITY(default)
│ │ │ +
66{
│ │ │ +
67_GLIBCXX_BEGIN_NAMESPACE_VERSION
│ │ │ +
68
│ │ │ +
69 /**
│ │ │ +
70 * @brief A standard container giving FIFO behavior.
│ │ │ +
71 *
│ │ │ +
72 * @ingroup sequences
│ │ │ +
73 *
│ │ │ +
74 * @tparam _Tp Type of element.
│ │ │ +
75 * @tparam _Sequence Type of underlying sequence, defaults to deque<_Tp>.
│ │ │ +
76 *
│ │ │ +
77 * Meets many of the requirements of a
│ │ │ +
78 * <a href="tables.html#65">container</a>,
│ │ │ +
79 * but does not define anything to do with iterators. Very few of the
│ │ │ +
80 * other standard container interfaces are defined.
│ │ │ +
81 *
│ │ │ +
82 * This is not a true container, but an @e adaptor. It holds another
│ │ │ +
83 * container, and provides a wrapper interface to that container. The
│ │ │ +
84 * wrapper is what enforces strict first-in-first-out %queue behavior.
│ │ │ +
85 *
│ │ │ +
86 * The second template parameter defines the type of the underlying
│ │ │ +
87 * sequence/container. It defaults to std::deque, but it can be any type
│ │ │ +
88 * that supports @c front, @c back, @c push_back, and @c pop_front,
│ │ │ +
89 * such as std::list or an appropriate user-defined type.
│ │ │ +
90 *
│ │ │ +
91 * Members not found in @a normal containers are @c container_type,
│ │ │ +
92 * which is a typedef for the second Sequence parameter, and @c push and
│ │ │ +
93 * @c pop, which are standard %queue/FIFO operations.
│ │ │ +
94 */
│ │ │ +
95 template<typename _Tp, typename _Sequence = deque<_Tp> >
│ │ │ +
│ │ │ +
96 class queue
│ │ │ +
97 {
│ │ │ +
98#ifdef _GLIBCXX_CONCEPT_CHECKS
│ │ │ +
99 // concept requirements
│ │ │ +
100 typedef typename _Sequence::value_type _Sequence_value_type;
│ │ │ +
101# if __cplusplus < 201103L
│ │ │ +
102 __glibcxx_class_requires(_Tp, _SGIAssignableConcept)
│ │ │ +
103# endif
│ │ │ +
104 __glibcxx_class_requires(_Sequence, _FrontInsertionSequenceConcept)
│ │ │ +
105 __glibcxx_class_requires(_Sequence, _BackInsertionSequenceConcept)
│ │ │ +
106 __glibcxx_class_requires2(_Tp, _Sequence_value_type, _SameTypeConcept)
│ │ │ +
107#endif
│ │ │ +
108
│ │ │ +
109 template<typename _Tp1, typename _Seq1>
│ │ │ +
110 friend bool
│ │ │ +
111 operator==(const queue<_Tp1, _Seq1>&, const queue<_Tp1, _Seq1>&);
│ │ │ +
112
│ │ │ +
113 template<typename _Tp1, typename _Seq1>
│ │ │ +
114 friend bool
│ │ │ +
115 operator<(const queue<_Tp1, _Seq1>&, const queue<_Tp1, _Seq1>&);
│ │ │ +
116
│ │ │ +
117#if __cpp_lib_three_way_comparison
│ │ │ +
118 template<typename _Tp1, three_way_comparable _Seq1>
│ │ │ + │ │ │ +
120 operator<=>(const queue<_Tp1, _Seq1>&, const queue<_Tp1, _Seq1>&);
│ │ │ +
121#endif
│ │ │
122
│ │ │ -
123 template<typename _Tp>
│ │ │ -
124 inline void
│ │ │ -
125 __valarray_fill_construct(_Tp* __b, _Tp* __e, const _Tp __t)
│ │ │ -
126 {
│ │ │ -
127 _Array_init_ctor<_Tp, __is_trivial(_Tp)>::_S_do_it(__b, __e, __t);
│ │ │ -
128 }
│ │ │ -
129
│ │ │ -
130 //
│ │ │ -
131 // copy-construct raw array [__o, *) from plain array [__b, __e)
│ │ │ -
132 // We can't just say 'memcpy()'
│ │ │ -
133 //
│ │ │ -
134 template<typename _Tp, bool>
│ │ │ -
135 struct _Array_copy_ctor
│ │ │ -
136 {
│ │ │ -
137 // Please note that this isn't exception safe. But
│ │ │ -
138 // valarrays aren't required to be exception safe.
│ │ │ -
139 inline static void
│ │ │ -
140 _S_do_it(const _Tp* __b, const _Tp* __e, _Tp* __restrict__ __o)
│ │ │ -
141 {
│ │ │ -
142 while (__b != __e)
│ │ │ -
143 new(__o++) _Tp(*__b++);
│ │ │ -
144 }
│ │ │ -
145 };
│ │ │ -
146
│ │ │ -
147 template<typename _Tp>
│ │ │ -
148 struct _Array_copy_ctor<_Tp, true>
│ │ │ -
149 {
│ │ │ -
150 inline static void
│ │ │ -
151 _S_do_it(const _Tp* __b, const _Tp* __e, _Tp* __restrict__ __o)
│ │ │ -
152 {
│ │ │ -
153 if (__b)
│ │ │ -
154 __builtin_memcpy(__o, __b, (__e - __b) * sizeof(_Tp));
│ │ │ -
155 }
│ │ │ -
156 };
│ │ │ -
157
│ │ │ -
158 template<typename _Tp>
│ │ │ -
159 inline void
│ │ │ -
160 __valarray_copy_construct(const _Tp* __b, const _Tp* __e,
│ │ │ -
161 _Tp* __restrict__ __o)
│ │ │ -
162 {
│ │ │ -
163 _Array_copy_ctor<_Tp, __is_trivial(_Tp)>::_S_do_it(__b, __e, __o);
│ │ │ -
164 }
│ │ │ -
165
│ │ │ -
166 // copy-construct raw array [__o, *) from strided array __a[<__n : __s>]
│ │ │ -
167 template<typename _Tp>
│ │ │ -
168 inline void
│ │ │ -
169 __valarray_copy_construct (const _Tp* __restrict__ __a, size_t __n,
│ │ │ -
170 size_t __s, _Tp* __restrict__ __o)
│ │ │ -
171 {
│ │ │ -
172 if (__is_trivial(_Tp))
│ │ │ -
173 while (__n--)
│ │ │ -
174 {
│ │ │ -
175 *__o++ = *__a;
│ │ │ -
176 __a += __s;
│ │ │ -
177 }
│ │ │ -
178 else
│ │ │ -
179 while (__n--)
│ │ │ -
180 {
│ │ │ -
181 new(__o++) _Tp(*__a);
│ │ │ -
182 __a += __s;
│ │ │ -
183 }
│ │ │ -
184 }
│ │ │ +
123#if __cplusplus >= 201103L
│ │ │ +
124 template<typename _Alloc>
│ │ │ +
125 using _Uses = typename
│ │ │ + │ │ │ +
127
│ │ │ +
128#if __cplusplus >= 201703L
│ │ │ +
129 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ +
130 // 2566. Requirements on the first template parameter of container
│ │ │ +
131 // adaptors
│ │ │ + │ │ │ +
133 "value_type must be the same as the underlying container");
│ │ │ +
134#endif // C++17
│ │ │ +
135#endif // C++11
│ │ │ +
136
│ │ │ +
137 public:
│ │ │ +
138 typedef typename _Sequence::value_type value_type;
│ │ │ +
139 typedef typename _Sequence::reference reference;
│ │ │ +
140 typedef typename _Sequence::const_reference const_reference;
│ │ │ +
141 typedef typename _Sequence::size_type size_type;
│ │ │ +
142 typedef _Sequence container_type;
│ │ │ +
143
│ │ │ +
144 protected:
│ │ │ +
145 /* Maintainers wondering why this isn't uglified as per style
│ │ │ +
146 * guidelines should note that this name is specified in the standard,
│ │ │ +
147 * C++98 [23.2.3.1].
│ │ │ +
148 * (Why? Presumably for the same reason that it's protected instead
│ │ │ +
149 * of private: to allow derivation. But none of the other
│ │ │ +
150 * containers allow for derivation. Odd.)
│ │ │ +
151 */
│ │ │ +
152 /// @c c is the underlying container.
│ │ │ +
153 _Sequence c;
│ │ │ +
154
│ │ │ +
155 public:
│ │ │ +
156 /**
│ │ │ +
157 * @brief Default constructor creates no elements.
│ │ │ +
158 */
│ │ │ +
159#if __cplusplus < 201103L
│ │ │ +
160 explicit
│ │ │ +
161 queue(const _Sequence& __c = _Sequence())
│ │ │ +
162 : c(__c) { }
│ │ │ +
163#else
│ │ │ +
164 template<typename _Seq = _Sequence, typename _Requires = typename
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
167 : c() { }
│ │ │ +
│ │ │ +
168
│ │ │ +
169 explicit
│ │ │ +
170 queue(const _Sequence& __c)
│ │ │ +
171 : c(__c) { }
│ │ │ +
172
│ │ │ +
173 explicit
│ │ │ +
174 queue(_Sequence&& __c)
│ │ │ +
175 : c(std::move(__c)) { }
│ │ │ +
176
│ │ │ +
177 template<typename _Alloc, typename _Requires = _Uses<_Alloc>>
│ │ │ +
178 explicit
│ │ │ +
179 queue(const _Alloc& __a)
│ │ │ +
180 : c(__a) { }
│ │ │ +
181
│ │ │ +
182 template<typename _Alloc, typename _Requires = _Uses<_Alloc>>
│ │ │ +
183 queue(const _Sequence& __c, const _Alloc& __a)
│ │ │ +
184 : c(__c, __a) { }
│ │ │
185
│ │ │ -
186 // copy-construct raw array [__o, *) from indexed array __a[__i[<__n>]]
│ │ │ -
187 template<typename _Tp>
│ │ │ -
188 inline void
│ │ │ -
189 __valarray_copy_construct (const _Tp* __restrict__ __a,
│ │ │ -
190 const size_t* __restrict__ __i,
│ │ │ -
191 _Tp* __restrict__ __o, size_t __n)
│ │ │ -
192 {
│ │ │ -
193 if (__is_trivial(_Tp))
│ │ │ -
194 while (__n--)
│ │ │ -
195 *__o++ = __a[*__i++];
│ │ │ -
196 else
│ │ │ -
197 while (__n--)
│ │ │ -
198 new (__o++) _Tp(__a[*__i++]);
│ │ │ -
199 }
│ │ │ +
186 template<typename _Alloc, typename _Requires = _Uses<_Alloc>>
│ │ │ +
187 queue(_Sequence&& __c, const _Alloc& __a)
│ │ │ +
188 : c(std::move(__c), __a) { }
│ │ │ +
189
│ │ │ +
190 template<typename _Alloc, typename _Requires = _Uses<_Alloc>>
│ │ │ +
191 queue(const queue& __q, const _Alloc& __a)
│ │ │ +
192 : c(__q.c, __a) { }
│ │ │ +
193
│ │ │ +
194 template<typename _Alloc, typename _Requires = _Uses<_Alloc>>
│ │ │ +
195 queue(queue&& __q, const _Alloc& __a)
│ │ │ +
196 : c(std::move(__q.c), __a) { }
│ │ │ +
197
│ │ │ +
198#if __cplusplus > 202002L
│ │ │ +
199#define __cpp_lib_adaptor_iterator_pair_constructor 202106L
│ │ │
200
│ │ │ -
201 // Do the necessary cleanup when we're done with arrays.
│ │ │ -
202 template<typename _Tp>
│ │ │ -
203 inline void
│ │ │ -
204 __valarray_destroy_elements(_Tp* __b, _Tp* __e)
│ │ │ -
205 {
│ │ │ -
206 if (!__is_trivial(_Tp))
│ │ │ -
207 while (__b != __e)
│ │ │ -
208 {
│ │ │ -
209 __b->~_Tp();
│ │ │ -
210 ++__b;
│ │ │ -
211 }
│ │ │ -
212 }
│ │ │ -
213
│ │ │ -
214 // Fill a plain array __a[<__n>] with __t
│ │ │ -
215 template<typename _Tp>
│ │ │ -
216 inline void
│ │ │ -
217 __valarray_fill(_Tp* __restrict__ __a, size_t __n, const _Tp& __t)
│ │ │ -
218 {
│ │ │ -
219 while (__n--)
│ │ │ -
220 *__a++ = __t;
│ │ │ -
221 }
│ │ │ -
222
│ │ │ -
223 // fill strided array __a[<__n-1 : __s>] with __t
│ │ │ -
224 template<typename _Tp>
│ │ │ -
225 inline void
│ │ │ -
226 __valarray_fill(_Tp* __restrict__ __a, size_t __n,
│ │ │ -
227 size_t __s, const _Tp& __t)
│ │ │ -
228 {
│ │ │ -
229 for (size_t __i = 0; __i < __n; ++__i, __a += __s)
│ │ │ -
230 *__a = __t;
│ │ │ -
231 }
│ │ │ -
232
│ │ │ -
233 // fill indirect array __a[__i[<__n>]] with __i
│ │ │ -
234 template<typename _Tp>
│ │ │ -
235 inline void
│ │ │ -
236 __valarray_fill(_Tp* __restrict__ __a, const size_t* __restrict__ __i,
│ │ │ -
237 size_t __n, const _Tp& __t)
│ │ │ -
238 {
│ │ │ -
239 for (size_t __j = 0; __j < __n; ++__j, ++__i)
│ │ │ -
240 __a[*__i] = __t;
│ │ │ -
241 }
│ │ │ -
242
│ │ │ -
243 // copy plain array __a[<__n>] in __b[<__n>]
│ │ │ -
244 // For non-fundamental types, it is wrong to say 'memcpy()'
│ │ │ -
245 template<typename _Tp, bool>
│ │ │ -
246 struct _Array_copier
│ │ │ -
247 {
│ │ │ -
248 inline static void
│ │ │ -
249 _S_do_it(const _Tp* __restrict__ __a, size_t __n, _Tp* __restrict__ __b)
│ │ │ -
250 {
│ │ │ -
251 while(__n--)
│ │ │ -
252 *__b++ = *__a++;
│ │ │ -
253 }
│ │ │ -
254 };
│ │ │ -
255
│ │ │ -
256 template<typename _Tp>
│ │ │ -
257 struct _Array_copier<_Tp, true>
│ │ │ -
258 {
│ │ │ -
259 inline static void
│ │ │ -
260 _S_do_it(const _Tp* __restrict__ __a, size_t __n, _Tp* __restrict__ __b)
│ │ │ -
261 {
│ │ │ -
262 if (__n != 0)
│ │ │ -
263 __builtin_memcpy(__b, __a, __n * sizeof (_Tp));
│ │ │ -
264 }
│ │ │ -
265 };
│ │ │ -
266
│ │ │ -
267 // Copy a plain array __a[<__n>] into a play array __b[<>]
│ │ │ -
268 template<typename _Tp>
│ │ │ -
269 inline void
│ │ │ -
270 __valarray_copy(const _Tp* __restrict__ __a, size_t __n,
│ │ │ -
271 _Tp* __restrict__ __b)
│ │ │ -
272 {
│ │ │ -
273 _Array_copier<_Tp, __is_trivial(_Tp)>::_S_do_it(__a, __n, __b);
│ │ │ -
274 }
│ │ │ -
275
│ │ │ -
276 // Copy strided array __a[<__n : __s>] in plain __b[<__n>]
│ │ │ -
277 template<typename _Tp>
│ │ │ -
278 inline void
│ │ │ -
279 __valarray_copy(const _Tp* __restrict__ __a, size_t __n, size_t __s,
│ │ │ -
280 _Tp* __restrict__ __b)
│ │ │ -
281 {
│ │ │ -
282 for (size_t __i = 0; __i < __n; ++__i, ++__b, __a += __s)
│ │ │ -
283 *__b = *__a;
│ │ │ -
284 }
│ │ │ -
285
│ │ │ -
286 // Copy a plain array __a[<__n>] into a strided array __b[<__n : __s>]
│ │ │ -
287 template<typename _Tp>
│ │ │ -
288 inline void
│ │ │ -
289 __valarray_copy(const _Tp* __restrict__ __a, _Tp* __restrict__ __b,
│ │ │ -
290 size_t __n, size_t __s)
│ │ │ -
291 {
│ │ │ -
292 for (size_t __i = 0; __i < __n; ++__i, ++__a, __b += __s)
│ │ │ -
293 *__b = *__a;
│ │ │ -
294 }
│ │ │ -
295
│ │ │ -
296 // Copy strided array __src[<__n : __s1>] into another
│ │ │ -
297 // strided array __dst[< : __s2>]. Their sizes must match.
│ │ │ -
298 template<typename _Tp>
│ │ │ -
299 inline void
│ │ │ -
300 __valarray_copy(const _Tp* __restrict__ __src, size_t __n, size_t __s1,
│ │ │ -
301 _Tp* __restrict__ __dst, size_t __s2)
│ │ │ -
302 {
│ │ │ -
303 for (size_t __i = 0; __i < __n; ++__i)
│ │ │ -
304 __dst[__i * __s2] = __src[__i * __s1];
│ │ │ -
305 }
│ │ │ -
306
│ │ │ -
307 // Copy an indexed array __a[__i[<__n>]] in plain array __b[<__n>]
│ │ │ -
308 template<typename _Tp>
│ │ │ -
309 inline void
│ │ │ -
310 __valarray_copy(const _Tp* __restrict__ __a,
│ │ │ -
311 const size_t* __restrict__ __i,
│ │ │ -
312 _Tp* __restrict__ __b, size_t __n)
│ │ │ -
313 {
│ │ │ -
314 for (size_t __j = 0; __j < __n; ++__j, ++__b, ++__i)
│ │ │ -
315 *__b = __a[*__i];
│ │ │ -
316 }
│ │ │ -
317
│ │ │ -
318 // Copy a plain array __a[<__n>] in an indexed array __b[__i[<__n>]]
│ │ │ -
319 template<typename _Tp>
│ │ │ -
320 inline void
│ │ │ -
321 __valarray_copy(const _Tp* __restrict__ __a, size_t __n,
│ │ │ -
322 _Tp* __restrict__ __b, const size_t* __restrict__ __i)
│ │ │ -
323 {
│ │ │ -
324 for (size_t __j = 0; __j < __n; ++__j, ++__a, ++__i)
│ │ │ -
325 __b[*__i] = *__a;
│ │ │ -
326 }
│ │ │ -
327
│ │ │ -
328 // Copy the __n first elements of an indexed array __src[<__i>] into
│ │ │ -
329 // another indexed array __dst[<__j>].
│ │ │ -
330 template<typename _Tp>
│ │ │ -
331 inline void
│ │ │ -
332 __valarray_copy(const _Tp* __restrict__ __src, size_t __n,
│ │ │ -
333 const size_t* __restrict__ __i,
│ │ │ -
334 _Tp* __restrict__ __dst, const size_t* __restrict__ __j)
│ │ │ -
335 {
│ │ │ -
336 for (size_t __k = 0; __k < __n; ++__k)
│ │ │ -
337 __dst[*__j++] = __src[*__i++];
│ │ │ -
338 }
│ │ │ -
339
│ │ │ -
340 //
│ │ │ -
341 // Compute the sum of elements in range [__f, __l) which must not be empty.
│ │ │ -
342 // This is a naive algorithm. It suffers from cancelling.
│ │ │ -
343 // In the future try to specialize for _Tp = float, double, long double
│ │ │ -
344 // using a more accurate algorithm.
│ │ │ -
345 //
│ │ │ -
346 template<typename _Tp>
│ │ │ -
347 inline _Tp
│ │ │ -
348 __valarray_sum(const _Tp* __f, const _Tp* __l)
│ │ │ -
349 {
│ │ │ -
350 _Tp __r = *__f++;
│ │ │ -
351 while (__f != __l)
│ │ │ -
352 __r += *__f++;
│ │ │ -
353 return __r;
│ │ │ -
354 }
│ │ │ +
201 template<typename _InputIterator,
│ │ │ +
202 typename = _RequireInputIter<_InputIterator>>
│ │ │ +
203 queue(_InputIterator __first, _InputIterator __last)
│ │ │ +
204 : c(__first, __last) { }
│ │ │ +
205
│ │ │ +
206 template<typename _InputIterator, typename _Alloc,
│ │ │ +
207 typename = _RequireInputIter<_InputIterator>,
│ │ │ +
208 typename = _Uses<_Alloc>>
│ │ │ +
209 queue(_InputIterator __first, _InputIterator __last, const _Alloc& __a)
│ │ │ +
210 : c(__first, __last, __a) { }
│ │ │ +
211#endif
│ │ │ +
212#endif
│ │ │ +
213
│ │ │ +
214 /**
│ │ │ +
215 * Returns true if the %queue is empty.
│ │ │ +
216 */
│ │ │ +
217 _GLIBCXX_NODISCARD bool
│ │ │ +
│ │ │ +
218 empty() const
│ │ │ +
219 { return c.empty(); }
│ │ │ +
│ │ │ +
220
│ │ │ +
221 /** Returns the number of elements in the %queue. */
│ │ │ +
222 _GLIBCXX_NODISCARD
│ │ │ +
223 size_type
│ │ │ +
│ │ │ +
224 size() const
│ │ │ +
225 { return c.size(); }
│ │ │ +
│ │ │ +
226
│ │ │ +
227 /**
│ │ │ +
228 * Returns a read/write reference to the data at the first
│ │ │ +
229 * element of the %queue.
│ │ │ +
230 */
│ │ │ +
231 _GLIBCXX_NODISCARD
│ │ │ +
232 reference
│ │ │ +
│ │ │ + │ │ │ +
234 {
│ │ │ +
235 __glibcxx_requires_nonempty();
│ │ │ +
236 return c.front();
│ │ │ +
237 }
│ │ │ +
│ │ │ +
238
│ │ │ +
239 /**
│ │ │ +
240 * Returns a read-only (constant) reference to the data at the first
│ │ │ +
241 * element of the %queue.
│ │ │ +
242 */
│ │ │ +
243 _GLIBCXX_NODISCARD
│ │ │ +
244 const_reference
│ │ │ +
│ │ │ +
245 front() const
│ │ │ +
246 {
│ │ │ +
247 __glibcxx_requires_nonempty();
│ │ │ +
248 return c.front();
│ │ │ +
249 }
│ │ │ +
│ │ │ +
250
│ │ │ +
251 /**
│ │ │ +
252 * Returns a read/write reference to the data at the last
│ │ │ +
253 * element of the %queue.
│ │ │ +
254 */
│ │ │ +
255 _GLIBCXX_NODISCARD
│ │ │ +
256 reference
│ │ │ +
│ │ │ + │ │ │ +
258 {
│ │ │ +
259 __glibcxx_requires_nonempty();
│ │ │ +
260 return c.back();
│ │ │ +
261 }
│ │ │ +
│ │ │ +
262
│ │ │ +
263 /**
│ │ │ +
264 * Returns a read-only (constant) reference to the data at the last
│ │ │ +
265 * element of the %queue.
│ │ │ +
266 */
│ │ │ +
267 _GLIBCXX_NODISCARD
│ │ │ +
268 const_reference
│ │ │ +
│ │ │ +
269 back() const
│ │ │ +
270 {
│ │ │ +
271 __glibcxx_requires_nonempty();
│ │ │ +
272 return c.back();
│ │ │ +
273 }
│ │ │ +
│ │ │ +
274
│ │ │ +
275 /**
│ │ │ +
276 * @brief Add data to the end of the %queue.
│ │ │ +
277 * @param __x Data to be added.
│ │ │ +
278 *
│ │ │ +
279 * This is a typical %queue operation. The function creates an
│ │ │ +
280 * element at the end of the %queue and assigns the given data
│ │ │ +
281 * to it. The time complexity of the operation depends on the
│ │ │ +
282 * underlying sequence.
│ │ │ +
283 */
│ │ │ +
284 void
│ │ │ +
│ │ │ +
285 push(const value_type& __x)
│ │ │ +
286 { c.push_back(__x); }
│ │ │ +
│ │ │ +
287
│ │ │ +
288#if __cplusplus >= 201103L
│ │ │ +
289 void
│ │ │ +
290 push(value_type&& __x)
│ │ │ +
291 { c.push_back(std::move(__x)); }
│ │ │ +
292
│ │ │ +
293#if __cplusplus > 201402L
│ │ │ +
294 template<typename... _Args>
│ │ │ +
295 decltype(auto)
│ │ │ +
296 emplace(_Args&&... __args)
│ │ │ +
297 { return c.emplace_back(std::forward<_Args>(__args)...); }
│ │ │ +
298#else
│ │ │ +
299 template<typename... _Args>
│ │ │ +
300 void
│ │ │ +
301 emplace(_Args&&... __args)
│ │ │ +
302 { c.emplace_back(std::forward<_Args>(__args)...); }
│ │ │ +
303#endif
│ │ │ +
304#endif
│ │ │ +
305
│ │ │ +
306 /**
│ │ │ +
307 * @brief Removes first element.
│ │ │ +
308 *
│ │ │ +
309 * This is a typical %queue operation. It shrinks the %queue by one.
│ │ │ +
310 * The time complexity of the operation depends on the underlying
│ │ │ +
311 * sequence.
│ │ │ +
312 *
│ │ │ +
313 * Note that no data is returned, and if the first element's
│ │ │ +
314 * data is needed, it should be retrieved before pop() is
│ │ │ +
315 * called.
│ │ │ +
316 */
│ │ │ +
317 void
│ │ │ +
│ │ │ + │ │ │ +
319 {
│ │ │ +
320 __glibcxx_requires_nonempty();
│ │ │ +
321 c.pop_front();
│ │ │ +
322 }
│ │ │ +
│ │ │ +
323
│ │ │ +
324#if __cplusplus >= 201103L
│ │ │ +
325 void
│ │ │ +
326 swap(queue& __q)
│ │ │ +
327#if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11
│ │ │ + │ │ │ +
329#else
│ │ │ + │ │ │ +
331#endif
│ │ │ +
332 {
│ │ │ +
333 using std::swap;
│ │ │ +
334 swap(c, __q.c);
│ │ │ +
335 }
│ │ │ +
336#endif // __cplusplus >= 201103L
│ │ │ +
337 };
│ │ │ +
│ │ │ +
338
│ │ │ +
339#if __cpp_deduction_guides >= 201606
│ │ │ +
340 template<typename _Container,
│ │ │ +
341 typename = _RequireNotAllocator<_Container>>
│ │ │ +
342 queue(_Container) -> queue<typename _Container::value_type, _Container>;
│ │ │ +
343
│ │ │ +
344 template<typename _Container, typename _Allocator,
│ │ │ +
345 typename = _RequireNotAllocator<_Container>>
│ │ │ +
346 queue(_Container, _Allocator)
│ │ │ +
347 -> queue<typename _Container::value_type, _Container>;
│ │ │ +
348
│ │ │ +
349#ifdef __cpp_lib_adaptor_iterator_pair_constructor
│ │ │ +
350 template<typename _InputIterator,
│ │ │ +
351 typename _ValT
│ │ │ +
352 = typename iterator_traits<_InputIterator>::value_type,
│ │ │ +
353 typename = _RequireInputIter<_InputIterator>>
│ │ │ +
354 queue(_InputIterator, _InputIterator) -> queue<_ValT>;
│ │ │
355
│ │ │ -
356 // Compute the min/max of an array-expression
│ │ │ -
357 template<typename _Ta>
│ │ │ -
358 inline typename _Ta::value_type
│ │ │ -
359 __valarray_min(const _Ta& __a)
│ │ │ -
360 {
│ │ │ -
361 size_t __s = __a.size();
│ │ │ -
362 typedef typename _Ta::value_type _Value_type;
│ │ │ -
363 _Value_type __r = __s == 0 ? _Value_type() : __a[0];
│ │ │ -
364 for (size_t __i = 1; __i < __s; ++__i)
│ │ │ -
365 {
│ │ │ -
366 _Value_type __t = __a[__i];
│ │ │ -
367 if (__t < __r)
│ │ │ -
368 __r = __t;
│ │ │ -
369 }
│ │ │ -
370 return __r;
│ │ │ -
371 }
│ │ │ -
372
│ │ │ -
373 template<typename _Ta>
│ │ │ -
374 inline typename _Ta::value_type
│ │ │ -
375 __valarray_max(const _Ta& __a)
│ │ │ -
376 {
│ │ │ -
377 size_t __s = __a.size();
│ │ │ -
378 typedef typename _Ta::value_type _Value_type;
│ │ │ -
379 _Value_type __r = __s == 0 ? _Value_type() : __a[0];
│ │ │ -
380 for (size_t __i = 1; __i < __s; ++__i)
│ │ │ -
381 {
│ │ │ -
382 _Value_type __t = __a[__i];
│ │ │ -
383 if (__t > __r)
│ │ │ -
384 __r = __t;
│ │ │ -
385 }
│ │ │ -
386 return __r;
│ │ │ -
387 }
│ │ │ -
388
│ │ │ -
389 //
│ │ │ -
390 // Helper class _Array, first layer of valarray abstraction.
│ │ │ -
391 // All operations on valarray should be forwarded to this class
│ │ │ -
392 // whenever possible. -- gdr
│ │ │ -
393 //
│ │ │ -
394
│ │ │ -
395 template<typename _Tp>
│ │ │ -
396 struct _Array
│ │ │ -
397 {
│ │ │ -
398 explicit _Array(_Tp* const __restrict__);
│ │ │ -
399 explicit _Array(const valarray<_Tp>&);
│ │ │ -
400 _Array(const _Tp* __restrict__, size_t);
│ │ │ -
401
│ │ │ -
402 _Tp* begin() const;
│ │ │ -
403
│ │ │ -
404 _Tp* const __restrict__ _M_data;
│ │ │ -
405 };
│ │ │ -
406
│ │ │ -
407
│ │ │ -
408 // Copy-construct plain array __b[<__n>] from indexed array __a[__i[<__n>]]
│ │ │ -
409 template<typename _Tp>
│ │ │ -
410 inline void
│ │ │ -
411 __valarray_copy_construct(_Array<_Tp> __a, _Array<size_t> __i,
│ │ │ -
412 _Array<_Tp> __b, size_t __n)
│ │ │ -
413 { std::__valarray_copy_construct(__a._M_data, __i._M_data,
│ │ │ -
414 __b._M_data, __n); }
│ │ │ -
415
│ │ │ -
416 // Copy-construct plain array __b[<__n>] from strided array __a[<__n : __s>]
│ │ │ -
417 template<typename _Tp>
│ │ │ -
418 inline void
│ │ │ -
419 __valarray_copy_construct(_Array<_Tp> __a, size_t __n, size_t __s,
│ │ │ -
420 _Array<_Tp> __b)
│ │ │ -
421 { std::__valarray_copy_construct(__a._M_data, __n, __s, __b._M_data); }
│ │ │ -
422
│ │ │ -
423 template<typename _Tp>
│ │ │ -
424 inline void
│ │ │ -
425 __valarray_fill (_Array<_Tp> __a, size_t __n, const _Tp& __t)
│ │ │ -
426 { std::__valarray_fill(__a._M_data, __n, __t); }
│ │ │ -
427
│ │ │ -
428 template<typename _Tp>
│ │ │ -
429 inline void
│ │ │ -
430 __valarray_fill(_Array<_Tp> __a, size_t __n, size_t __s, const _Tp& __t)
│ │ │ -
431 { std::__valarray_fill(__a._M_data, __n, __s, __t); }
│ │ │ -
432
│ │ │ -
433 template<typename _Tp>
│ │ │ -
434 inline void
│ │ │ -
435 __valarray_fill(_Array<_Tp> __a, _Array<size_t> __i,
│ │ │ -
436 size_t __n, const _Tp& __t)
│ │ │ -
437 { std::__valarray_fill(__a._M_data, __i._M_data, __n, __t); }
│ │ │ -
438
│ │ │ -
439 // Copy a plain array __a[<__n>] into a play array __b[<>]
│ │ │ -
440 template<typename _Tp>
│ │ │ -
441 inline void
│ │ │ -
442 __valarray_copy(_Array<_Tp> __a, size_t __n, _Array<_Tp> __b)
│ │ │ -
443 { std::__valarray_copy(__a._M_data, __n, __b._M_data); }
│ │ │ -
444
│ │ │ -
445 // Copy strided array __a[<__n : __s>] in plain __b[<__n>]
│ │ │ -
446 template<typename _Tp>
│ │ │ -
447 inline void
│ │ │ -
448 __valarray_copy(_Array<_Tp> __a, size_t __n, size_t __s, _Array<_Tp> __b)
│ │ │ -
449 { std::__valarray_copy(__a._M_data, __n, __s, __b._M_data); }
│ │ │ +
356 template<typename _InputIterator, typename _Allocator,
│ │ │ +
357 typename _ValT
│ │ │ +
358 = typename iterator_traits<_InputIterator>::value_type,
│ │ │ +
359 typename = _RequireInputIter<_InputIterator>,
│ │ │ +
360 typename = _RequireAllocator<_Allocator>>
│ │ │ +
361 queue(_InputIterator, _InputIterator, _Allocator)
│ │ │ +
362 -> queue<_ValT, deque<_ValT, _Allocator>>;
│ │ │ +
363#endif
│ │ │ +
364#endif
│ │ │ +
365
│ │ │ +
366 /**
│ │ │ +
367 * @brief Queue equality comparison.
│ │ │ +
368 * @param __x A %queue.
│ │ │ +
369 * @param __y A %queue of the same type as @a __x.
│ │ │ +
370 * @return True iff the size and elements of the queues are equal.
│ │ │ +
371 *
│ │ │ +
372 * This is an equivalence relation. Complexity and semantics depend on the
│ │ │ +
373 * underlying sequence type, but the expected rules are: this relation is
│ │ │ +
374 * linear in the size of the sequences, and queues are considered equivalent
│ │ │ +
375 * if their sequences compare equal.
│ │ │ +
376 */
│ │ │ +
377 template<typename _Tp, typename _Seq>
│ │ │ +
378 _GLIBCXX_NODISCARD
│ │ │ +
379 inline bool
│ │ │ +
│ │ │ +
380 operator==(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y)
│ │ │ +
381 { return __x.c == __y.c; }
│ │ │ +
│ │ │ +
382
│ │ │ +
383 /**
│ │ │ +
384 * @brief Queue ordering relation.
│ │ │ +
385 * @param __x A %queue.
│ │ │ +
386 * @param __y A %queue of the same type as @a x.
│ │ │ +
387 * @return True iff @a __x is lexicographically less than @a __y.
│ │ │ +
388 *
│ │ │ +
389 * This is an total ordering relation. Complexity and semantics
│ │ │ +
390 * depend on the underlying sequence type, but the expected rules
│ │ │ +
391 * are: this relation is linear in the size of the sequences, the
│ │ │ +
392 * elements must be comparable with @c <, and
│ │ │ +
393 * std::lexicographical_compare() is usually used to make the
│ │ │ +
394 * determination.
│ │ │ +
395 */
│ │ │ +
396 template<typename _Tp, typename _Seq>
│ │ │ +
397 _GLIBCXX_NODISCARD
│ │ │ +
│ │ │ +
398 inline bool
│ │ │ +
399 operator<(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y)
│ │ │ +
400 { return __x.c < __y.c; }
│ │ │ +
│ │ │ +
401
│ │ │ +
402 /// Based on operator==
│ │ │ +
403 template<typename _Tp, typename _Seq>
│ │ │ +
404 _GLIBCXX_NODISCARD
│ │ │ +
405 inline bool
│ │ │ +
│ │ │ +
406 operator!=(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y)
│ │ │ +
407 { return !(__x == __y); }
│ │ │ +
│ │ │ +
408
│ │ │ +
409 /// Based on operator<
│ │ │ +
410 template<typename _Tp, typename _Seq>
│ │ │ +
411 _GLIBCXX_NODISCARD
│ │ │ +
412 inline bool
│ │ │ +
│ │ │ +
413 operator>(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y)
│ │ │ +
414 { return __y < __x; }
│ │ │ +
│ │ │ +
415
│ │ │ +
416 /// Based on operator<
│ │ │ +
417 template<typename _Tp, typename _Seq>
│ │ │ +
418 _GLIBCXX_NODISCARD
│ │ │ +
│ │ │ +
419 inline bool
│ │ │ +
420 operator<=(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y)
│ │ │ +
421 { return !(__y < __x); }
│ │ │ +
│ │ │ +
422
│ │ │ +
423 /// Based on operator<
│ │ │ +
424 template<typename _Tp, typename _Seq>
│ │ │ +
425 _GLIBCXX_NODISCARD
│ │ │ +
426 inline bool
│ │ │ +
│ │ │ +
427 operator>=(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y)
│ │ │ +
428 { return !(__x < __y); }
│ │ │ +
│ │ │ +
429
│ │ │ +
430#if __cpp_lib_three_way_comparison
│ │ │ +
431 template<typename _Tp, three_way_comparable _Seq>
│ │ │ +
432 [[nodiscard]]
│ │ │ +
433 inline compare_three_way_result_t<_Seq>
│ │ │ +
434 operator<=>(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y)
│ │ │ +
435 { return __x.c <=> __y.c; }
│ │ │ +
436#endif
│ │ │ +
437
│ │ │ +
438#if __cplusplus >= 201103L
│ │ │ +
439 template<typename _Tp, typename _Seq>
│ │ │ +
440 inline
│ │ │ +
441#if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11
│ │ │ +
442 // Constrained free swap overload, see p0185r1
│ │ │ +
443 typename enable_if<__is_swappable<_Seq>::value>::type
│ │ │ +
444#else
│ │ │ +
445 void
│ │ │ +
446#endif
│ │ │ +
447 swap(queue<_Tp, _Seq>& __x, queue<_Tp, _Seq>& __y)
│ │ │ +
448 noexcept(noexcept(__x.swap(__y)))
│ │ │ +
449 { __x.swap(__y); }
│ │ │
450
│ │ │ -
451 // Copy a plain array __a[<__n>] into a strided array __b[<__n : __s>]
│ │ │ -
452 template<typename _Tp>
│ │ │ -
453 inline void
│ │ │ -
454 __valarray_copy(_Array<_Tp> __a, _Array<_Tp> __b, size_t __n, size_t __s)
│ │ │ -
455 { __valarray_copy(__a._M_data, __b._M_data, __n, __s); }
│ │ │ -
456
│ │ │ -
457 // Copy strided array __src[<__n : __s1>] into another
│ │ │ -
458 // strided array __dst[< : __s2>]. Their sizes must match.
│ │ │ -
459 template<typename _Tp>
│ │ │ -
460 inline void
│ │ │ -
461 __valarray_copy(_Array<_Tp> __a, size_t __n, size_t __s1,
│ │ │ -
462 _Array<_Tp> __b, size_t __s2)
│ │ │ -
463 { std::__valarray_copy(__a._M_data, __n, __s1, __b._M_data, __s2); }
│ │ │ -
464
│ │ │ -
465 // Copy an indexed array __a[__i[<__n>]] in plain array __b[<__n>]
│ │ │ -
466 template<typename _Tp>
│ │ │ -
467 inline void
│ │ │ -
468 __valarray_copy(_Array<_Tp> __a, _Array<size_t> __i,
│ │ │ -
469 _Array<_Tp> __b, size_t __n)
│ │ │ -
470 { std::__valarray_copy(__a._M_data, __i._M_data, __b._M_data, __n); }
│ │ │ -
471
│ │ │ -
472 // Copy a plain array __a[<__n>] in an indexed array __b[__i[<__n>]]
│ │ │ -
473 template<typename _Tp>
│ │ │ -
474 inline void
│ │ │ -
475 __valarray_copy(_Array<_Tp> __a, size_t __n, _Array<_Tp> __b,
│ │ │ -
476 _Array<size_t> __i)
│ │ │ -
477 { std::__valarray_copy(__a._M_data, __n, __b._M_data, __i._M_data); }
│ │ │ -
478
│ │ │ -
479 // Copy the __n first elements of an indexed array __src[<__i>] into
│ │ │ -
480 // another indexed array __dst[<__j>].
│ │ │ -
481 template<typename _Tp>
│ │ │ -
482 inline void
│ │ │ -
483 __valarray_copy(_Array<_Tp> __src, size_t __n, _Array<size_t> __i,
│ │ │ -
484 _Array<_Tp> __dst, _Array<size_t> __j)
│ │ │ -
485 {
│ │ │ -
486 std::__valarray_copy(__src._M_data, __n, __i._M_data,
│ │ │ -
487 __dst._M_data, __j._M_data);
│ │ │ -
488 }
│ │ │ -
489
│ │ │ -
490 template<typename _Tp>
│ │ │ -
491 inline
│ │ │ -
492 _Array<_Tp>::_Array(_Tp* const __restrict__ __p)
│ │ │ -
493 : _M_data (__p) {}
│ │ │ -
494
│ │ │ -
495 template<typename _Tp>
│ │ │ -
496 inline
│ │ │ -
497 _Array<_Tp>::_Array(const valarray<_Tp>& __v)
│ │ │ -
498 : _M_data (__v._M_data) {}
│ │ │ -
499
│ │ │ -
500 template<typename _Tp>
│ │ │ -
501 inline
│ │ │ -
502 _Array<_Tp>::_Array(const _Tp* __restrict__ __b, size_t __s)
│ │ │ -
503 : _M_data(__valarray_get_storage<_Tp>(__s))
│ │ │ -
504 { std::__valarray_copy_construct(__b, __s, _M_data); }
│ │ │ -
505
│ │ │ -
506 template<typename _Tp>
│ │ │ -
507 inline _Tp*
│ │ │ -
508 _Array<_Tp>::begin () const
│ │ │ -
509 { return _M_data; }
│ │ │ -
510
│ │ │ -
511#define _DEFINE_ARRAY_FUNCTION(_Op, _Name) \
│ │ │ -
512 template<typename _Tp> \
│ │ │ -
513 inline void \
│ │ │ -
514 _Array_augmented_##_Name(_Array<_Tp> __a, size_t __n, const _Tp& __t) \
│ │ │ -
515 { \
│ │ │ -
516 for (_Tp* __p = __a._M_data; __p < __a._M_data + __n; ++__p) \
│ │ │ -
517 *__p _Op##= __t; \
│ │ │ -
518 } \
│ │ │ -
519 \
│ │ │ -
520 template<typename _Tp> \
│ │ │ -
521 inline void \
│ │ │ -
522 _Array_augmented_##_Name(_Array<_Tp> __a, size_t __n, _Array<_Tp> __b) \
│ │ │ -
523 { \
│ │ │ -
524 _Tp* __p = __a._M_data; \
│ │ │ -
525 for (_Tp* __q = __b._M_data; __q < __b._M_data + __n; ++__p, ++__q) \
│ │ │ -
526 *__p _Op##= *__q; \
│ │ │ -
527 } \
│ │ │ -
528 \
│ │ │ -
529 template<typename _Tp, class _Dom> \
│ │ │ -
530 void \
│ │ │ -
531 _Array_augmented_##_Name(_Array<_Tp> __a, \
│ │ │ -
532 const _Expr<_Dom, _Tp>& __e, size_t __n) \
│ │ │ -
533 { \
│ │ │ -
534 _Tp* __p(__a._M_data); \
│ │ │ -
535 for (size_t __i = 0; __i < __n; ++__i, ++__p) \
│ │ │ -
536 *__p _Op##= __e[__i]; \
│ │ │ -
537 } \
│ │ │ -
538 \
│ │ │ -
539 template<typename _Tp> \
│ │ │ -
540 inline void \
│ │ │ -
541 _Array_augmented_##_Name(_Array<_Tp> __a, size_t __n, size_t __s, \
│ │ │ -
542 _Array<_Tp> __b) \
│ │ │ -
543 { \
│ │ │ -
544 _Tp* __q(__b._M_data); \
│ │ │ -
545 for (_Tp* __p = __a._M_data; __p < __a._M_data + __s * __n; \
│ │ │ -
546 __p += __s, ++__q) \
│ │ │ -
547 *__p _Op##= *__q; \
│ │ │ -
548 } \
│ │ │ -
549 \
│ │ │ -
550 template<typename _Tp> \
│ │ │ -
551 inline void \
│ │ │ -
552 _Array_augmented_##_Name(_Array<_Tp> __a, _Array<_Tp> __b, \
│ │ │ -
553 size_t __n, size_t __s) \
│ │ │ -
554 { \
│ │ │ -
555 _Tp* __q(__b._M_data); \
│ │ │ -
556 for (_Tp* __p = __a._M_data; __p < __a._M_data + __n; \
│ │ │ -
557 ++__p, __q += __s) \
│ │ │ -
558 *__p _Op##= *__q; \
│ │ │ -
559 } \
│ │ │ -
560 \
│ │ │ -
561 template<typename _Tp, class _Dom> \
│ │ │ -
562 void \
│ │ │ -
563 _Array_augmented_##_Name(_Array<_Tp> __a, size_t __s, \
│ │ │ -
564 const _Expr<_Dom, _Tp>& __e, size_t __n) \
│ │ │ -
565 { \
│ │ │ -
566 _Tp* __p(__a._M_data); \
│ │ │ -
567 for (size_t __i = 0; __i < __n; ++__i, __p += __s) \
│ │ │ -
568 *__p _Op##= __e[__i]; \
│ │ │ -
569 } \
│ │ │ -
570 \
│ │ │ -
571 template<typename _Tp> \
│ │ │ -
572 inline void \
│ │ │ -
573 _Array_augmented_##_Name(_Array<_Tp> __a, _Array<size_t> __i, \
│ │ │ -
574 _Array<_Tp> __b, size_t __n) \
│ │ │ -
575 { \
│ │ │ -
576 _Tp* __q(__b._M_data); \
│ │ │ -
577 for (size_t* __j = __i._M_data; __j < __i._M_data + __n; \
│ │ │ -
578 ++__j, ++__q) \
│ │ │ -
579 __a._M_data[*__j] _Op##= *__q; \
│ │ │ -
580 } \
│ │ │ -
581 \
│ │ │ -
582 template<typename _Tp> \
│ │ │ -
583 inline void \
│ │ │ -
584 _Array_augmented_##_Name(_Array<_Tp> __a, size_t __n, \
│ │ │ -
585 _Array<_Tp> __b, _Array<size_t> __i) \
│ │ │ -
586 { \
│ │ │ -
587 _Tp* __p(__a._M_data); \
│ │ │ -
588 for (size_t* __j = __i._M_data; __j<__i._M_data + __n; \
│ │ │ -
589 ++__j, ++__p) \
│ │ │ -
590 *__p _Op##= __b._M_data[*__j]; \
│ │ │ -
591 } \
│ │ │ -
592 \
│ │ │ -
593 template<typename _Tp, class _Dom> \
│ │ │ -
594 void \
│ │ │ -
595 _Array_augmented_##_Name(_Array<_Tp> __a, _Array<size_t> __i, \
│ │ │ -
596 const _Expr<_Dom, _Tp>& __e, size_t __n) \
│ │ │ -
597 { \
│ │ │ -
598 size_t* __j(__i._M_data); \
│ │ │ -
599 for (size_t __k = 0; __k<__n; ++__k, ++__j) \
│ │ │ -
600 __a._M_data[*__j] _Op##= __e[__k]; \
│ │ │ -
601 } \
│ │ │ -
602 \
│ │ │ -
603 template<typename _Tp> \
│ │ │ -
604 void \
│ │ │ -
605 _Array_augmented_##_Name(_Array<_Tp> __a, _Array<bool> __m, \
│ │ │ -
606 _Array<_Tp> __b, size_t __n) \
│ │ │ -
607 { \
│ │ │ -
608 bool* __ok(__m._M_data); \
│ │ │ -
609 _Tp* __p(__a._M_data); \
│ │ │ -
610 for (_Tp* __q = __b._M_data; __q < __b._M_data + __n; \
│ │ │ -
611 ++__q, ++__ok, ++__p) \
│ │ │ -
612 { \
│ │ │ -
613 while (! *__ok) \
│ │ │ -
614 { \
│ │ │ -
615 ++__ok; \
│ │ │ -
616 ++__p; \
│ │ │ -
617 } \
│ │ │ -
618 *__p _Op##= *__q; \
│ │ │ -
619 } \
│ │ │ -
620 } \
│ │ │ -
621 \
│ │ │ -
622 template<typename _Tp> \
│ │ │ -
623 void \
│ │ │ -
624 _Array_augmented_##_Name(_Array<_Tp> __a, size_t __n, \
│ │ │ -
625 _Array<_Tp> __b, _Array<bool> __m) \
│ │ │ -
626 { \
│ │ │ -
627 bool* __ok(__m._M_data); \
│ │ │ -
628 _Tp* __q(__b._M_data); \
│ │ │ -
629 for (_Tp* __p = __a._M_data; __p < __a._M_data + __n; \
│ │ │ -
630 ++__p, ++__ok, ++__q) \
│ │ │ -
631 { \
│ │ │ -
632 while (! *__ok) \
│ │ │ -
633 { \
│ │ │ -
634 ++__ok; \
│ │ │ -
635 ++__q; \
│ │ │ -
636 } \
│ │ │ -
637 *__p _Op##= *__q; \
│ │ │ -
638 } \
│ │ │ -
639 } \
│ │ │ -
640 \
│ │ │ -
641 template<typename _Tp, class _Dom> \
│ │ │ -
642 void \
│ │ │ -
643 _Array_augmented_##_Name(_Array<_Tp> __a, _Array<bool> __m, \
│ │ │ -
644 const _Expr<_Dom, _Tp>& __e, size_t __n) \
│ │ │ -
645 { \
│ │ │ -
646 bool* __ok(__m._M_data); \
│ │ │ -
647 _Tp* __p(__a._M_data); \
│ │ │ -
648 for (size_t __i = 0; __i < __n; ++__i, ++__ok, ++__p) \
│ │ │ -
649 { \
│ │ │ -
650 while (! *__ok) \
│ │ │ -
651 { \
│ │ │ -
652 ++__ok; \
│ │ │ -
653 ++__p; \
│ │ │ -
654 } \
│ │ │ -
655 *__p _Op##= __e[__i]; \
│ │ │ -
656 } \
│ │ │ -
657 }
│ │ │ -
658
│ │ │ -
659 _DEFINE_ARRAY_FUNCTION(+, __plus)
│ │ │ -
660 _DEFINE_ARRAY_FUNCTION(-, __minus)
│ │ │ -
661 _DEFINE_ARRAY_FUNCTION(*, __multiplies)
│ │ │ -
662 _DEFINE_ARRAY_FUNCTION(/, __divides)
│ │ │ -
663 _DEFINE_ARRAY_FUNCTION(%, __modulus)
│ │ │ -
664 _DEFINE_ARRAY_FUNCTION(^, __bitwise_xor)
│ │ │ -
665 _DEFINE_ARRAY_FUNCTION(|, __bitwise_or)
│ │ │ -
666 _DEFINE_ARRAY_FUNCTION(&, __bitwise_and)
│ │ │ -
667 _DEFINE_ARRAY_FUNCTION(<<, __shift_left)
│ │ │ -
668 _DEFINE_ARRAY_FUNCTION(>>, __shift_right)
│ │ │ +
451 template<typename _Tp, typename _Seq, typename _Alloc>
│ │ │ +
452 struct uses_allocator<queue<_Tp, _Seq>, _Alloc>
│ │ │ +
453 : public uses_allocator<_Seq, _Alloc>::type { };
│ │ │ +
454#endif // __cplusplus >= 201103L
│ │ │ +
455
│ │ │ +
456 /**
│ │ │ +
457 * @brief A standard container automatically sorting its contents.
│ │ │ +
458 *
│ │ │ +
459 * @ingroup sequences
│ │ │ +
460 *
│ │ │ +
461 * @tparam _Tp Type of element.
│ │ │ +
462 * @tparam _Sequence Type of underlying sequence, defaults to vector<_Tp>.
│ │ │ +
463 * @tparam _Compare Comparison function object type, defaults to
│ │ │ +
464 * less<_Sequence::value_type>.
│ │ │ +
465 *
│ │ │ +
466 * This is not a true container, but an @e adaptor. It holds
│ │ │ +
467 * another container, and provides a wrapper interface to that
│ │ │ +
468 * container. The wrapper is what enforces priority-based sorting
│ │ │ +
469 * and %queue behavior. Very few of the standard container/sequence
│ │ │ +
470 * interface requirements are met (e.g., iterators).
│ │ │ +
471 *
│ │ │ +
472 * The second template parameter defines the type of the underlying
│ │ │ +
473 * sequence/container. It defaults to std::vector, but it can be
│ │ │ +
474 * any type that supports @c front(), @c push_back, @c pop_back,
│ │ │ +
475 * and random-access iterators, such as std::deque or an
│ │ │ +
476 * appropriate user-defined type.
│ │ │ +
477 *
│ │ │ +
478 * The third template parameter supplies the means of making
│ │ │ +
479 * priority comparisons. It defaults to @c less<value_type> but
│ │ │ +
480 * can be anything defining a strict weak ordering.
│ │ │ +
481 *
│ │ │ +
482 * Members not found in @a normal containers are @c container_type,
│ │ │ +
483 * which is a typedef for the second Sequence parameter, and @c
│ │ │ +
484 * push, @c pop, and @c top, which are standard %queue operations.
│ │ │ +
485 *
│ │ │ +
486 * @note No equality/comparison operators are provided for
│ │ │ +
487 * %priority_queue.
│ │ │ +
488 *
│ │ │ +
489 * @note Sorting of the elements takes place as they are added to,
│ │ │ +
490 * and removed from, the %priority_queue using the
│ │ │ +
491 * %priority_queue's member functions. If you access the elements
│ │ │ +
492 * by other means, and change their data such that the sorting
│ │ │ +
493 * order would be different, the %priority_queue will not re-sort
│ │ │ +
494 * the elements for you. (How could it know to do so?)
│ │ │ +
495 */
│ │ │ +
496 template<typename _Tp, typename _Sequence = vector<_Tp>,
│ │ │ +
497 typename _Compare = less<typename _Sequence::value_type> >
│ │ │ +
│ │ │ + │ │ │ +
499 {
│ │ │ +
500#ifdef _GLIBCXX_CONCEPT_CHECKS
│ │ │ +
501 // concept requirements
│ │ │ +
502 typedef typename _Sequence::value_type _Sequence_value_type;
│ │ │ +
503# if __cplusplus < 201103L
│ │ │ +
504 __glibcxx_class_requires(_Tp, _SGIAssignableConcept)
│ │ │ +
505# endif
│ │ │ +
506 __glibcxx_class_requires(_Sequence, _SequenceConcept)
│ │ │ +
507 __glibcxx_class_requires(_Sequence, _RandomAccessContainerConcept)
│ │ │ +
508 __glibcxx_class_requires2(_Tp, _Sequence_value_type, _SameTypeConcept)
│ │ │ +
509 __glibcxx_class_requires4(_Compare, bool, _Tp, _Tp,
│ │ │ +
510 _BinaryFunctionConcept)
│ │ │ +
511#endif
│ │ │ +
512
│ │ │ +
513#if __cplusplus >= 201103L
│ │ │ +
514 template<typename _Alloc>
│ │ │ +
515 using _Uses = typename
│ │ │ + │ │ │ +
517
│ │ │ +
518#if __cplusplus >= 201703L
│ │ │ +
519 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ +
520 // 2566. Requirements on the first template parameter of container
│ │ │ +
521 // adaptors
│ │ │ + │ │ │ +
523 "value_type must be the same as the underlying container");
│ │ │ +
524#endif // C++17
│ │ │ +
525#endif // C++11
│ │ │ +
526
│ │ │ +
527 public:
│ │ │ +
528 typedef typename _Sequence::value_type value_type;
│ │ │ +
529 typedef typename _Sequence::reference reference;
│ │ │ +
530 typedef typename _Sequence::const_reference const_reference;
│ │ │ +
531 typedef typename _Sequence::size_type size_type;
│ │ │ +
532 typedef _Sequence container_type;
│ │ │ +
533 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ +
534 // DR 2684. priority_queue lacking comparator typedef
│ │ │ +
535 typedef _Compare value_compare;
│ │ │ +
536
│ │ │ +
537 protected:
│ │ │ +
538 // See queue::c for notes on these names.
│ │ │ +
539 _Sequence c;
│ │ │ +
540 _Compare comp;
│ │ │ +
541
│ │ │ +
542 public:
│ │ │ +
543 /**
│ │ │ +
544 * @brief Default constructor creates no elements.
│ │ │ +
545 */
│ │ │ +
546#if __cplusplus < 201103L
│ │ │ +
547 explicit
│ │ │ +
548 priority_queue(const _Compare& __x = _Compare(),
│ │ │ +
549 const _Sequence& __s = _Sequence())
│ │ │ +
550 : c(__s), comp(__x)
│ │ │ +
551 { std::make_heap(c.begin(), c.end(), comp); }
│ │ │ +
552#else
│ │ │ +
553 template<typename _Seq = _Sequence, typename _Requires = typename
│ │ │ + │ │ │ +
555 is_default_constructible<_Seq>>::value>::type>
│ │ │ +
│ │ │ + │ │ │ +
557 : c(), comp() { }
│ │ │ +
│ │ │ +
558
│ │ │ +
559 explicit
│ │ │ +
560 priority_queue(const _Compare& __x, const _Sequence& __s)
│ │ │ +
561 : c(__s), comp(__x)
│ │ │ +
562 { std::make_heap(c.begin(), c.end(), comp); }
│ │ │ +
563
│ │ │ +
564 explicit
│ │ │ +
565 priority_queue(const _Compare& __x, _Sequence&& __s = _Sequence())
│ │ │ +
566 : c(std::move(__s)), comp(__x)
│ │ │ +
567 { std::make_heap(c.begin(), c.end(), comp); }
│ │ │ +
568
│ │ │ +
569 template<typename _Alloc, typename _Requires = _Uses<_Alloc>>
│ │ │ +
570 explicit
│ │ │ +
571 priority_queue(const _Alloc& __a)
│ │ │ +
572 : c(__a), comp() { }
│ │ │ +
573
│ │ │ +
574 template<typename _Alloc, typename _Requires = _Uses<_Alloc>>
│ │ │ +
575 priority_queue(const _Compare& __x, const _Alloc& __a)
│ │ │ +
576 : c(__a), comp(__x) { }
│ │ │ +
577
│ │ │ +
578 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ +
579 // 2537. Constructors [...] taking allocators should call make_heap
│ │ │ +
580 template<typename _Alloc, typename _Requires = _Uses<_Alloc>>
│ │ │ +
581 priority_queue(const _Compare& __x, const _Sequence& __c,
│ │ │ +
582 const _Alloc& __a)
│ │ │ +
583 : c(__c, __a), comp(__x)
│ │ │ +
584 { std::make_heap(c.begin(), c.end(), comp); }
│ │ │ +
585
│ │ │ +
586 template<typename _Alloc, typename _Requires = _Uses<_Alloc>>
│ │ │ +
587 priority_queue(const _Compare& __x, _Sequence&& __c, const _Alloc& __a)
│ │ │ +
588 : c(std::move(__c), __a), comp(__x)
│ │ │ +
589 { std::make_heap(c.begin(), c.end(), comp); }
│ │ │ +
590
│ │ │ +
591 template<typename _Alloc, typename _Requires = _Uses<_Alloc>>
│ │ │ +
592 priority_queue(const priority_queue& __q, const _Alloc& __a)
│ │ │ +
593 : c(__q.c, __a), comp(__q.comp) { }
│ │ │ +
594
│ │ │ +
595 template<typename _Alloc, typename _Requires = _Uses<_Alloc>>
│ │ │ +
596 priority_queue(priority_queue&& __q, const _Alloc& __a)
│ │ │ +
597 : c(std::move(__q.c), __a), comp(std::move(__q.comp)) { }
│ │ │ +
598#endif
│ │ │ +
599
│ │ │ +
600 /**
│ │ │ +
601 * @brief Builds a %queue from a range.
│ │ │ +
602 * @param __first An input iterator.
│ │ │ +
603 * @param __last An input iterator.
│ │ │ +
604 * @param __x A comparison functor describing a strict weak ordering.
│ │ │ +
605 * @param __s An initial sequence with which to start.
│ │ │ +
606 *
│ │ │ +
607 * Begins by copying @a __s, inserting a copy of the elements
│ │ │ +
608 * from @a [first,last) into the copy of @a __s, then ordering
│ │ │ +
609 * the copy according to @a __x.
│ │ │ +
610 *
│ │ │ +
611 * For more information on function objects, see the
│ │ │ +
612 * documentation on @link functors functor base
│ │ │ +
613 * classes@endlink.
│ │ │ +
614 */
│ │ │ +
615#if __cplusplus < 201103L
│ │ │ +
616 template<typename _InputIterator>
│ │ │ +
617 priority_queue(_InputIterator __first, _InputIterator __last,
│ │ │ +
618 const _Compare& __x = _Compare(),
│ │ │ +
619 const _Sequence& __s = _Sequence())
│ │ │ +
620 : c(__s), comp(__x)
│ │ │ +
621 {
│ │ │ +
622 __glibcxx_requires_valid_range(__first, __last);
│ │ │ +
623 c.insert(c.end(), __first, __last);
│ │ │ +
624 std::make_heap(c.begin(), c.end(), comp);
│ │ │ +
625 }
│ │ │ +
626#else
│ │ │ +
627 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ +
628 // 3529. priority_queue(first, last) should construct c with (first, last)
│ │ │ +
629 template<typename _InputIterator,
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
632 const _Compare& __x = _Compare())
│ │ │ +
633 : c(__first, __last), comp(__x)
│ │ │ +
634 { std::make_heap(c.begin(), c.end(), comp); }
│ │ │ +
│ │ │ +
635
│ │ │ +
636 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ +
637 // 3522. Missing requirement on InputIterator template parameter
│ │ │ +
638 template<typename _InputIterator,
│ │ │ + │ │ │ + │ │ │ +
641 const _Compare& __x, const _Sequence& __s)
│ │ │ +
642 : c(__s), comp(__x)
│ │ │ +
643 {
│ │ │ +
644 __glibcxx_requires_valid_range(__first, __last);
│ │ │ +
645 c.insert(c.end(), __first, __last);
│ │ │ +
646 std::make_heap(c.begin(), c.end(), comp);
│ │ │ +
647 }
│ │ │ +
648
│ │ │ +
649 template<typename _InputIterator,
│ │ │ + │ │ │ +
651 priority_queue(_InputIterator __first, _InputIterator __last,
│ │ │ +
652 const _Compare& __x, _Sequence&& __s)
│ │ │ +
653 : c(std::move(__s)), comp(__x)
│ │ │ +
654 {
│ │ │ +
655 __glibcxx_requires_valid_range(__first, __last);
│ │ │ +
656 c.insert(c.end(), __first, __last);
│ │ │ +
657 std::make_heap(c.begin(), c.end(), comp);
│ │ │ +
658 }
│ │ │ +
659
│ │ │ +
660 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ +
661 // 3506. Missing allocator-extended constructors for priority_queue
│ │ │ +
662 template<typename _InputIterator, typename _Alloc,
│ │ │ + │ │ │ +
664 typename _Requires = _Uses<_Alloc>>
│ │ │ +
665 priority_queue(_InputIterator __first, _InputIterator __last,
│ │ │ +
666 const _Alloc& __alloc)
│ │ │ +
667 : c(__first, __last, __alloc), comp()
│ │ │ +
668 { std::make_heap(c.begin(), c.end(), comp); }
│ │ │
669
│ │ │ -
670#undef _DEFINE_ARRAY_FUNCTION
│ │ │ -
671
│ │ │ -
672_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ -
673} // namespace
│ │ │ -
674
│ │ │ -
675# include <bits/valarray_array.tcc>
│ │ │ -
676
│ │ │ -
677#endif /* _ARRAY_H */
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ +
670 template<typename _InputIterator, typename _Alloc,
│ │ │ + │ │ │ +
672 typename _Requires = _Uses<_Alloc>>
│ │ │ +
673 priority_queue(_InputIterator __first, _InputIterator __last,
│ │ │ +
674 const _Compare& __x, const _Alloc& __alloc)
│ │ │ +
675 : c(__first, __last, __alloc), comp(__x)
│ │ │ +
676 { std::make_heap(c.begin(), c.end(), comp); }
│ │ │ +
677
│ │ │ +
678 template<typename _InputIterator, typename _Alloc,
│ │ │ + │ │ │ +
680 typename _Requires = _Uses<_Alloc>>
│ │ │ +
681 priority_queue(_InputIterator __first, _InputIterator __last,
│ │ │ +
682 const _Compare& __x, const _Sequence& __s,
│ │ │ +
683 const _Alloc& __alloc)
│ │ │ +
684 : c(__s, __alloc), comp(__x)
│ │ │ +
685 {
│ │ │ +
686 __glibcxx_requires_valid_range(__first, __last);
│ │ │ +
687 c.insert(c.end(), __first, __last);
│ │ │ +
688 std::make_heap(c.begin(), c.end(), comp);
│ │ │ +
689 }
│ │ │ +
690
│ │ │ +
691 template<typename _InputIterator, typename _Alloc,
│ │ │ +
692 typename _Requires = _Uses<_Alloc>>
│ │ │ +
693 priority_queue(_InputIterator __first, _InputIterator __last,
│ │ │ +
694 const _Compare& __x, _Sequence&& __s,
│ │ │ +
695 const _Alloc& __alloc)
│ │ │ +
696 : c(std::move(__s), __alloc), comp(__x)
│ │ │ +
697 {
│ │ │ +
698 __glibcxx_requires_valid_range(__first, __last);
│ │ │ +
699 c.insert(c.end(), __first, __last);
│ │ │ +
700 std::make_heap(c.begin(), c.end(), comp);
│ │ │ +
701 }
│ │ │ +
702#endif
│ │ │ +
703
│ │ │ +
704 /**
│ │ │ +
705 * Returns true if the %queue is empty.
│ │ │ +
706 */
│ │ │ +
707 _GLIBCXX_NODISCARD bool
│ │ │ +
│ │ │ +
708 empty() const
│ │ │ +
709 { return c.empty(); }
│ │ │ +
│ │ │ +
710
│ │ │ +
711 /** Returns the number of elements in the %queue. */
│ │ │ +
712 _GLIBCXX_NODISCARD
│ │ │ +
713 size_type
│ │ │ +
│ │ │ +
714 size() const
│ │ │ +
715 { return c.size(); }
│ │ │ +
│ │ │ +
716
│ │ │ +
717 /**
│ │ │ +
718 * Returns a read-only (constant) reference to the data at the first
│ │ │ +
719 * element of the %queue.
│ │ │ +
720 */
│ │ │ +
721 _GLIBCXX_NODISCARD
│ │ │ +
722 const_reference
│ │ │ +
│ │ │ +
723 top() const
│ │ │ +
724 {
│ │ │ +
725 __glibcxx_requires_nonempty();
│ │ │ +
726 return c.front();
│ │ │ +
727 }
│ │ │ +
│ │ │ +
728
│ │ │ +
729 /**
│ │ │ +
730 * @brief Add data to the %queue.
│ │ │ +
731 * @param __x Data to be added.
│ │ │ +
732 *
│ │ │ +
733 * This is a typical %queue operation.
│ │ │ +
734 * The time complexity of the operation depends on the underlying
│ │ │ +
735 * sequence.
│ │ │ +
736 */
│ │ │ +
737 void
│ │ │ +
│ │ │ +
738 push(const value_type& __x)
│ │ │ +
739 {
│ │ │ +
740 c.push_back(__x);
│ │ │ +
741 std::push_heap(c.begin(), c.end(), comp);
│ │ │ +
742 }
│ │ │ +
│ │ │ +
743
│ │ │ +
744#if __cplusplus >= 201103L
│ │ │ +
745 void
│ │ │ +
746 push(value_type&& __x)
│ │ │ +
747 {
│ │ │ +
748 c.push_back(std::move(__x));
│ │ │ +
749 std::push_heap(c.begin(), c.end(), comp);
│ │ │ +
750 }
│ │ │ +
751
│ │ │ +
752 template<typename... _Args>
│ │ │ +
753 void
│ │ │ +
754 emplace(_Args&&... __args)
│ │ │ +
755 {
│ │ │ +
756 c.emplace_back(std::forward<_Args>(__args)...);
│ │ │ +
757 std::push_heap(c.begin(), c.end(), comp);
│ │ │ +
758 }
│ │ │ +
759#endif
│ │ │ +
760
│ │ │ +
761 /**
│ │ │ +
762 * @brief Removes first element.
│ │ │ +
763 *
│ │ │ +
764 * This is a typical %queue operation. It shrinks the %queue
│ │ │ +
765 * by one. The time complexity of the operation depends on the
│ │ │ +
766 * underlying sequence.
│ │ │ +
767 *
│ │ │ +
768 * Note that no data is returned, and if the first element's
│ │ │ +
769 * data is needed, it should be retrieved before pop() is
│ │ │ +
770 * called.
│ │ │ +
771 */
│ │ │ +
772 void
│ │ │ +
│ │ │ + │ │ │ +
774 {
│ │ │ +
775 __glibcxx_requires_nonempty();
│ │ │ +
776 std::pop_heap(c.begin(), c.end(), comp);
│ │ │ +
777 c.pop_back();
│ │ │ +
778 }
│ │ │ +
│ │ │ +
779
│ │ │ +
780#if __cplusplus >= 201103L
│ │ │ +
781 void
│ │ │ +
782 swap(priority_queue& __pq)
│ │ │ +
783 noexcept(__and_<
│ │ │ +
784#if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11
│ │ │ + │ │ │ +
786#else
│ │ │ + │ │ │ +
788#endif
│ │ │ + │ │ │ +
790 >::value)
│ │ │ +
791 {
│ │ │ +
792 using std::swap;
│ │ │ +
793 swap(c, __pq.c);
│ │ │ +
794 swap(comp, __pq.comp);
│ │ │ +
795 }
│ │ │ +
796#endif // __cplusplus >= 201103L
│ │ │ +
797 };
│ │ │ +
│ │ │ +
798
│ │ │ +
799#if __cpp_deduction_guides >= 201606
│ │ │ +
800 template<typename _Compare, typename _Container,
│ │ │ +
801 typename = _RequireNotAllocator<_Compare>,
│ │ │ +
802 typename = _RequireNotAllocator<_Container>>
│ │ │ +
803 priority_queue(_Compare, _Container)
│ │ │ +
804 -> priority_queue<typename _Container::value_type, _Container, _Compare>;
│ │ │ +
805
│ │ │ +
806 template<typename _InputIterator, typename _ValT
│ │ │ +
807 = typename iterator_traits<_InputIterator>::value_type,
│ │ │ +
808 typename _Compare = less<_ValT>,
│ │ │ +
809 typename _Container = vector<_ValT>,
│ │ │ +
810 typename = _RequireInputIter<_InputIterator>,
│ │ │ +
811 typename = _RequireNotAllocator<_Compare>,
│ │ │ +
812 typename = _RequireNotAllocator<_Container>>
│ │ │ +
813 priority_queue(_InputIterator, _InputIterator, _Compare = _Compare(),
│ │ │ +
814 _Container = _Container())
│ │ │ +
815 -> priority_queue<_ValT, _Container, _Compare>;
│ │ │ +
816
│ │ │ +
817 template<typename _Compare, typename _Container, typename _Allocator,
│ │ │ +
818 typename = _RequireNotAllocator<_Compare>,
│ │ │ +
819 typename = _RequireNotAllocator<_Container>>
│ │ │ +
820 priority_queue(_Compare, _Container, _Allocator)
│ │ │ +
821 -> priority_queue<typename _Container::value_type, _Container, _Compare>;
│ │ │ +
822#endif
│ │ │ +
823
│ │ │ +
824 // No equality/comparison operators are provided for priority_queue.
│ │ │ +
825
│ │ │ +
826#if __cplusplus >= 201103L
│ │ │ +
827 template<typename _Tp, typename _Sequence, typename _Compare>
│ │ │ +
828 inline
│ │ │ +
829#if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11
│ │ │ +
830 // Constrained free swap overload, see p0185r1
│ │ │ +
831 typename enable_if<__and_<__is_swappable<_Sequence>,
│ │ │ +
832 __is_swappable<_Compare>>::value>::type
│ │ │ +
833#else
│ │ │ +
834 void
│ │ │ +
835#endif
│ │ │ +
836 swap(priority_queue<_Tp, _Sequence, _Compare>& __x,
│ │ │ +
837 priority_queue<_Tp, _Sequence, _Compare>& __y)
│ │ │ +
838 noexcept(noexcept(__x.swap(__y)))
│ │ │ +
839 { __x.swap(__y); }
│ │ │ +
840
│ │ │ +
841 template<typename _Tp, typename _Sequence, typename _Compare,
│ │ │ +
842 typename _Alloc>
│ │ │ +
843 struct uses_allocator<priority_queue<_Tp, _Sequence, _Compare>, _Alloc>
│ │ │ +
844 : public uses_allocator<_Sequence, _Alloc>::type { };
│ │ │ +
845#endif // __cplusplus >= 201103L
│ │ │ +
846
│ │ │ +
847_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ +
848} // namespace
│ │ │ +
849
│ │ │ +
850#endif /* _STL_QUEUE_H */
│ │ │ + │ │ │ + │ │ │ +
constexpr std::remove_reference< _Tp >::type && move(_Tp &&__t) noexcept
Convert a value to an rvalue.
Definition move.h:104
│ │ │ +
void swap(any &__x, any &__y) noexcept
Exchange the states of two any objects.
Definition any:429
│ │ │
ISO C++ entities toplevel namespace is std.
│ │ │ - │ │ │ + │ │ │ +
A standard container giving FIFO behavior.
Definition stl_queue.h:97
│ │ │ +
void push(const value_type &__x)
Add data to the end of the queue.
Definition stl_queue.h:285
│ │ │ +
_Sequence c
c is the underlying container.
Definition stl_queue.h:153
│ │ │ +
size_type size() const
Definition stl_queue.h:224
│ │ │ +
reference front()
Definition stl_queue.h:233
│ │ │ +
const_reference back() const
Definition stl_queue.h:269
│ │ │ +
void pop()
Removes first element.
Definition stl_queue.h:318
│ │ │ +
queue()
Default constructor creates no elements.
Definition stl_queue.h:166
│ │ │ +
const_reference front() const
Definition stl_queue.h:245
│ │ │ +
bool empty() const
Definition stl_queue.h:218
│ │ │ +
reference back()
Definition stl_queue.h:257
│ │ │ +
A standard container automatically sorting its contents.
Definition stl_queue.h:499
│ │ │ +
size_type size() const
Definition stl_queue.h:714
│ │ │ +
bool empty() const
Definition stl_queue.h:708
│ │ │ +
void pop()
Removes first element.
Definition stl_queue.h:773
│ │ │ +
const_reference top() const
Definition stl_queue.h:723
│ │ │ +
priority_queue(_InputIterator __first, _InputIterator __last, const _Compare &__x=_Compare())
Builds a queue from a range.
Definition stl_queue.h:631
│ │ │ +
void push(const value_type &__x)
Add data to the queue.
Definition stl_queue.h:738
│ │ │ +
priority_queue()
Default constructor creates no elements.
Definition stl_queue.h:556
│ │ │ + │ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,13 +1,13 @@ │ │ │ │ libstdc++ │ │ │ │ -valarray_array.h │ │ │ │ +stl_queue.h │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -1// The template and inlines for the -*- C++ -*- internal _Array helper class. │ │ │ │ +1// Queue implementation -*- C++ -*- │ │ │ │ 2 │ │ │ │ -3// Copyright (C) 1997-2022 Free Software Foundation, Inc. │ │ │ │ +3// Copyright (C) 2001-2022 Free Software Foundation, Inc. │ │ │ │ 4// │ │ │ │ 5// This file is part of the GNU ISO C++ Library. This library is free │ │ │ │ 6// software; you can redistribute it and/or modify it under the │ │ │ │ 7// terms of the GNU General Public License as published by the │ │ │ │ 8// Free Software Foundation; either version 3, or (at your option) │ │ │ │ 9// any later version. │ │ │ │ 10 │ │ │ │ @@ -21,671 +21,919 @@ │ │ │ │ 18// 3.1, as published by the Free Software Foundation. │ │ │ │ 19 │ │ │ │ 20// You should have received a copy of the GNU General Public License and │ │ │ │ 21// a copy of the GCC Runtime Library Exception along with this program; │ │ │ │ 22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see │ │ │ │ 23// . │ │ │ │ 24 │ │ │ │ -25/** @file bits/valarray_array.h │ │ │ │ -26 * This is an internal header file, included by other library headers. │ │ │ │ -27 * Do not attempt to use it directly. @headername{valarray} │ │ │ │ -28 */ │ │ │ │ -29 │ │ │ │ -30// Written by Gabriel Dos Reis │ │ │ │ -31 │ │ │ │ -32#ifndef _VALARRAY_ARRAY_H │ │ │ │ -33#define _VALARRAY_ARRAY_H 1 │ │ │ │ -34 │ │ │ │ -35#pragma GCC system_header │ │ │ │ -36 │ │ │ │ -37#include <_b_i_t_s_/_c_+_+_c_o_n_f_i_g_._h> │ │ │ │ -38#include <_b_i_t_s_/_c_p_p___t_y_p_e___t_r_a_i_t_s_._h> │ │ │ │ -39#include <_c_s_t_d_l_i_b> │ │ │ │ -40#include <_n_e_w> │ │ │ │ -41 │ │ │ │ -42namespace _s_t_d _GLIBCXX_VISIBILITY(default) │ │ │ │ -43{ │ │ │ │ -44_GLIBCXX_BEGIN_NAMESPACE_VERSION │ │ │ │ -45 │ │ │ │ -46 // │ │ │ │ -47 // Helper functions on raw pointers │ │ │ │ -48 // │ │ │ │ -49 │ │ │ │ -50 // We get memory the old fashioned way │ │ │ │ -51 template │ │ │ │ -52 _Tp* │ │ │ │ -53 __valarray_get_storage(size_t) __attribute__((__malloc__)); │ │ │ │ -54 │ │ │ │ -55 template │ │ │ │ -56 inline _Tp* │ │ │ │ -57 __valarray_get_storage(size_t __n) │ │ │ │ -58 { return static_cast<_Tp*>(operator new(__n * sizeof(_Tp))); } │ │ │ │ -59 │ │ │ │ -60 // Return memory to the system │ │ │ │ -61 inline void │ │ │ │ -62 __valarray_release_memory(void* __p) │ │ │ │ -63 { operator delete(__p); } │ │ │ │ +25/* │ │ │ │ +26 * │ │ │ │ +27 * Copyright (c) 1994 │ │ │ │ +28 * Hewlett-Packard Company │ │ │ │ +29 * │ │ │ │ +30 * Permission to use, copy, modify, distribute and sell this software │ │ │ │ +31 * and its documentation for any purpose is hereby granted without fee, │ │ │ │ +32 * provided that the above copyright notice appear in all copies and │ │ │ │ +33 * that both that copyright notice and this permission notice appear │ │ │ │ +34 * in supporting documentation. Hewlett-Packard Company makes no │ │ │ │ +35 * representations about the suitability of this software for any │ │ │ │ +36 * purpose. It is provided "as is" without express or implied warranty. │ │ │ │ +37 * │ │ │ │ +38 * │ │ │ │ +39 * Copyright (c) 1996,1997 │ │ │ │ +40 * Silicon Graphics Computer Systems, Inc. │ │ │ │ +41 * │ │ │ │ +42 * Permission to use, copy, modify, distribute and sell this software │ │ │ │ +43 * and its documentation for any purpose is hereby granted without fee, │ │ │ │ +44 * provided that the above copyright notice appear in all copies and │ │ │ │ +45 * that both that copyright notice and this permission notice appear │ │ │ │ +46 * in supporting documentation. Silicon Graphics makes no │ │ │ │ +47 * representations about the suitability of this software for any │ │ │ │ +48 * purpose. It is provided "as is" without express or implied warranty. │ │ │ │ +49 */ │ │ │ │ +50 │ │ │ │ +51/** @file bits/stl_queue.h │ │ │ │ +52 * This is an internal header file, included by other library headers. │ │ │ │ +53 * Do not attempt to use it directly. @headername{queue} │ │ │ │ +54 */ │ │ │ │ +55 │ │ │ │ +56#ifndef _STL_QUEUE_H │ │ │ │ +57#define _STL_QUEUE_H 1 │ │ │ │ +58 │ │ │ │ +59#include <_b_i_t_s_/_c_o_n_c_e_p_t___c_h_e_c_k_._h> │ │ │ │ +60#include <_d_e_b_u_g_/_d_e_b_u_g_._h> │ │ │ │ +61#if __cplusplus >= 201103L │ │ │ │ +62# include │ │ │ │ +63#endif │ │ │ │ 64 │ │ │ │ -65 // Turn a raw-memory into an array of _Tp filled with _Tp() │ │ │ │ -66 // This is required in 'valarray v(n);' │ │ │ │ -67 template │ │ │ │ -68 struct _Array_default_ctor │ │ │ │ -69 { │ │ │ │ -70 // Please note that this isn't exception safe. But │ │ │ │ -71 // valarrays aren't required to be exception safe. │ │ │ │ -72 inline static void │ │ │ │ -73 _S_do_it(_Tp* __b, _Tp* __e) │ │ │ │ -74 { │ │ │ │ -75 while (__b != __e) │ │ │ │ -76 new(__b++) _Tp(); │ │ │ │ -77 } │ │ │ │ -78 }; │ │ │ │ -79 │ │ │ │ -80 template │ │ │ │ -81 struct _Array_default_ctor<_Tp, true> │ │ │ │ -82 { │ │ │ │ -83 // For fundamental types, it suffices to say 'memset()' │ │ │ │ -84 inline static void │ │ │ │ -85 _S_do_it(_Tp* __b, _Tp* __e) │ │ │ │ -86 { __builtin_memset(__b, 0, (__e - __b) * sizeof(_Tp)); } │ │ │ │ -87 }; │ │ │ │ -88 │ │ │ │ -89 template │ │ │ │ -90 inline void │ │ │ │ -91 __valarray_default_construct(_Tp* __b, _Tp* __e) │ │ │ │ -92 { │ │ │ │ -93 _Array_default_ctor<_Tp, __is_scalar<_Tp>::__value>::_S_do_it(__b, __e); │ │ │ │ -94 } │ │ │ │ -95 │ │ │ │ -96 // Turn a raw-memory into an array of _Tp filled with __t │ │ │ │ -97 // This is the required in valarray v(n, t). Also │ │ │ │ -98 // used in valarray<>::resize(). │ │ │ │ -99 template │ │ │ │ -100 struct _Array_init_ctor │ │ │ │ -101 { │ │ │ │ -102 // Please note that this isn't exception safe. But │ │ │ │ -103 // valarrays aren't required to be exception safe. │ │ │ │ -104 inline static void │ │ │ │ -105 _S_do_it(_Tp* __b, _Tp* __e, const _Tp __t) │ │ │ │ -106 { │ │ │ │ -107 while (__b != __e) │ │ │ │ -108 new(__b++) _Tp(__t); │ │ │ │ -109 } │ │ │ │ -110 }; │ │ │ │ -111 │ │ │ │ -112 template │ │ │ │ -113 struct _Array_init_ctor<_Tp, true> │ │ │ │ -114 { │ │ │ │ -115 inline static void │ │ │ │ -116 _S_do_it(_Tp* __b, _Tp* __e, const _Tp __t) │ │ │ │ -117 { │ │ │ │ -118 while (__b != __e) │ │ │ │ -119 *__b++ = __t; │ │ │ │ -120 } │ │ │ │ -121 }; │ │ │ │ +65namespace _s_t_d _GLIBCXX_VISIBILITY(default) │ │ │ │ +66{ │ │ │ │ +67_GLIBCXX_BEGIN_NAMESPACE_VERSION │ │ │ │ +68 │ │ │ │ +69 /** │ │ │ │ +70 * @brief A standard container giving FIFO behavior. │ │ │ │ +71 * │ │ │ │ +72 * @ingroup sequences │ │ │ │ +73 * │ │ │ │ +74 * @tparam _Tp Type of element. │ │ │ │ +75 * @tparam _Sequence Type of underlying sequence, defaults to deque<_Tp>. │ │ │ │ +76 * │ │ │ │ +77 * Meets many of the requirements of a │ │ │ │ +78 * container, │ │ │ │ +79 * but does not define anything to do with iterators. Very few of the │ │ │ │ +80 * other standard container interfaces are defined. │ │ │ │ +81 * │ │ │ │ +82 * This is not a true container, but an @e adaptor. It holds another │ │ │ │ +83 * container, and provides a wrapper interface to that container. The │ │ │ │ +84 * wrapper is what enforces strict first-in-first-out %queue behavior. │ │ │ │ +85 * │ │ │ │ +86 * The second template parameter defines the type of the underlying │ │ │ │ +87 * sequence/container. It defaults to std::deque, but it can be any type │ │ │ │ +88 * that supports @c front, @c back, @c push_back, and @c pop_front, │ │ │ │ +89 * such as std::list or an appropriate user-defined type. │ │ │ │ +90 * │ │ │ │ +91 * Members not found in @a normal containers are @c container_type, │ │ │ │ +92 * which is a typedef for the second Sequence parameter, and @c push and │ │ │ │ +93 * @c pop, which are standard %queue/FIFO operations. │ │ │ │ +94 */ │ │ │ │ +95 template > │ │ │ │ +_9_6 class _q_u_e_u_e │ │ │ │ +97 { │ │ │ │ +98#ifdef _GLIBCXX_CONCEPT_CHECKS │ │ │ │ +99 // concept requirements │ │ │ │ +100 typedef typename _Sequence::value_type ___S_e_q_u_e_n_c_e___v_a_l_u_e___t_y_p_e; │ │ │ │ +101# if __cplusplus < 201103L │ │ │ │ +102 __glibcxx_class_requires(_Tp, _SGIAssignableConcept) │ │ │ │ +103# endif │ │ │ │ +104 __glibcxx_class_requires(_Sequence, _FrontInsertionSequenceConcept) │ │ │ │ +105 __glibcxx_class_requires(_Sequence, _BackInsertionSequenceConcept) │ │ │ │ +106 __glibcxx_class_requires2(_Tp, ___S_e_q_u_e_n_c_e___v_a_l_u_e___t_y_p_e, _SameTypeConcept) │ │ │ │ +107#endif │ │ │ │ +108 │ │ │ │ +109 template │ │ │ │ +110 friend bool │ │ │ │ +111 operator==(const _q_u_e_u_e_<___T_p_1_,_ ___S_e_q_1_>&, const _q_u_e_u_e_<___T_p_1_,_ ___S_e_q_1_>&); │ │ │ │ +112 │ │ │ │ +113 template │ │ │ │ +114 friend bool │ │ │ │ +115 operator<(const _q_u_e_u_e_<___T_p_1_,_ ___S_e_q_1_>&, const _q_u_e_u_e_<___T_p_1_,_ ___S_e_q_1_>&); │ │ │ │ +116 │ │ │ │ +117#if __cpp_lib_three_way_comparison │ │ │ │ +118 template │ │ │ │ +119 friend _c_o_m_p_a_r_e___t_h_r_e_e___w_a_y___r_e_s_u_l_t___t_<___S_e_q_1_> │ │ │ │ +120 operator<=>(const _q_u_e_u_e_<___T_p_1_,_ ___S_e_q_1_>&, const _q_u_e_u_e_<___T_p_1_,_ ___S_e_q_1_>&); │ │ │ │ +121#endif │ │ │ │ 122 │ │ │ │ -123 template │ │ │ │ -124 inline void │ │ │ │ -125 __valarray_fill_construct(_Tp* __b, _Tp* __e, const _Tp __t) │ │ │ │ -126 { │ │ │ │ -127 _Array_init_ctor<_Tp, __is_trivial(_Tp)>::_S_do_it(__b, __e, __t); │ │ │ │ -128 } │ │ │ │ -129 │ │ │ │ -130 // │ │ │ │ -131 // copy-construct raw array [__o, *) from plain array [__b, __e) │ │ │ │ -132 // We can't just say 'memcpy()' │ │ │ │ -133 // │ │ │ │ -134 template │ │ │ │ -135 struct _Array_copy_ctor │ │ │ │ -136 { │ │ │ │ -137 // Please note that this isn't exception safe. But │ │ │ │ -138 // valarrays aren't required to be exception safe. │ │ │ │ -139 inline static void │ │ │ │ -140 _S_do_it(const _Tp* __b, const _Tp* __e, _Tp* __restrict__ __o) │ │ │ │ -141 { │ │ │ │ -142 while (__b != __e) │ │ │ │ -143 new(__o++) _Tp(*__b++); │ │ │ │ -144 } │ │ │ │ -145 }; │ │ │ │ -146 │ │ │ │ -147 template │ │ │ │ -148 struct _Array_copy_ctor<_Tp, true> │ │ │ │ -149 { │ │ │ │ -150 inline static void │ │ │ │ -151 _S_do_it(const _Tp* __b, const _Tp* __e, _Tp* __restrict__ __o) │ │ │ │ -152 { │ │ │ │ -153 if (__b) │ │ │ │ -154 __builtin_memcpy(__o, __b, (__e - __b) * sizeof(_Tp)); │ │ │ │ -155 } │ │ │ │ -156 }; │ │ │ │ -157 │ │ │ │ -158 template │ │ │ │ -159 inline void │ │ │ │ -160 __valarray_copy_construct(const _Tp* __b, const _Tp* __e, │ │ │ │ -161 _Tp* __restrict__ __o) │ │ │ │ -162 { │ │ │ │ -163 _Array_copy_ctor<_Tp, __is_trivial(_Tp)>::_S_do_it(__b, __e, __o); │ │ │ │ -164 } │ │ │ │ -165 │ │ │ │ -166 // copy-construct raw array [__o, *) from strided array __a[<__n : __s>] │ │ │ │ -167 template │ │ │ │ -168 inline void │ │ │ │ -169 __valarray_copy_construct (const _Tp* __restrict__ __a, size_t __n, │ │ │ │ -170 size_t __s, _Tp* __restrict__ __o) │ │ │ │ -171 { │ │ │ │ -172 if (__is_trivial(_Tp)) │ │ │ │ -173 while (__n--) │ │ │ │ -174 { │ │ │ │ -175 *__o++ = *__a; │ │ │ │ -176 __a += __s; │ │ │ │ -177 } │ │ │ │ -178 else │ │ │ │ -179 while (__n--) │ │ │ │ -180 { │ │ │ │ -181 new(__o++) _Tp(*__a); │ │ │ │ -182 __a += __s; │ │ │ │ -183 } │ │ │ │ -184 } │ │ │ │ +123#if __cplusplus >= 201103L │ │ │ │ +124 template │ │ │ │ +125 using _Uses = typename │ │ │ │ +126 _e_n_a_b_l_e___i_f_<_u_s_e_s___a_l_l_o_c_a_t_o_r_<___S_e_q_u_e_n_c_e_,_ ___A_l_l_o_c_>_:_:_v_a_l_u_e>::type; │ │ │ │ +127 │ │ │ │ +128#if __cplusplus >= 201703L │ │ │ │ +129 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ +130 // 2566. Requirements on the first template parameter of container │ │ │ │ +131 // adaptors │ │ │ │ +132 static_assert(_i_s___s_a_m_e_<___T_p_,_ _t_y_p_e_n_a_m_e_ ___S_e_q_u_e_n_c_e_:_:_v_a_l_u_e___t_y_p_e_>_:_:_v_a_l_u_e, │ │ │ │ +133 "value_type must be the same as the underlying container"); │ │ │ │ +134#endif // C++17 │ │ │ │ +135#endif // C++11 │ │ │ │ +136 │ │ │ │ +137 public: │ │ │ │ +138 typedef typename _Sequence::value_type value_type; │ │ │ │ +139 typedef typename _Sequence::reference reference; │ │ │ │ +140 typedef typename _Sequence::const_reference const_reference; │ │ │ │ +141 typedef typename _Sequence::size_type size_type; │ │ │ │ +142 typedef _Sequence container_type; │ │ │ │ +143 │ │ │ │ +144 protected: │ │ │ │ +145 /* Maintainers wondering why this isn't uglified as per style │ │ │ │ +146 * guidelines should note that this name is specified in the standard, │ │ │ │ +147 * C++98 [23.2.3.1]. │ │ │ │ +148 * (Why? Presumably for the same reason that it's protected instead │ │ │ │ +149 * of private: to allow derivation. But none of the other │ │ │ │ +150 * containers allow for derivation. Odd.) │ │ │ │ +151 */ │ │ │ │ +152 /// @c c is the underlying container. │ │ │ │ +_1_5_3 _Sequence _c; │ │ │ │ +154 │ │ │ │ +155 public: │ │ │ │ +156 /** │ │ │ │ +157 * @brief Default constructor creates no elements. │ │ │ │ +158 */ │ │ │ │ +159#if __cplusplus < 201103L │ │ │ │ +160 explicit │ │ │ │ +161 _q_u_e_u_e(const _Sequence& __c = _Sequence()) │ │ │ │ +162 : _c(__c) { } │ │ │ │ +163#else │ │ │ │ +164 template_:_:_v_a_l_u_e>::type> │ │ │ │ +_1_6_6 _q_u_e_u_e() │ │ │ │ +167 : _c() { } │ │ │ │ +168 │ │ │ │ +169 explicit │ │ │ │ +170 _q_u_e_u_e(const _Sequence& __c) │ │ │ │ +171 : _c(__c) { } │ │ │ │ +172 │ │ │ │ +173 explicit │ │ │ │ +174 _q_u_e_u_e(_Sequence&& __c) │ │ │ │ +175 : _c(_s_t_d::_m_o_v_e(__c)) { } │ │ │ │ +176 │ │ │ │ +177 template> │ │ │ │ +178 explicit │ │ │ │ +179 _q_u_e_u_e(const _Alloc& __a) │ │ │ │ +180 : _c(__a) { } │ │ │ │ +181 │ │ │ │ +182 template> │ │ │ │ +183 _q_u_e_u_e(const _Sequence& __c, const _Alloc& __a) │ │ │ │ +184 : _c(__c, __a) { } │ │ │ │ 185 │ │ │ │ -186 // copy-construct raw array [__o, *) from indexed array __a[__i[<__n>]] │ │ │ │ -187 template │ │ │ │ -188 inline void │ │ │ │ -189 __valarray_copy_construct (const _Tp* __restrict__ __a, │ │ │ │ -190 const size_t* __restrict__ __i, │ │ │ │ -191 _Tp* __restrict__ __o, size_t __n) │ │ │ │ -192 { │ │ │ │ -193 if (__is_trivial(_Tp)) │ │ │ │ -194 while (__n--) │ │ │ │ -195 *__o++ = __a[*__i++]; │ │ │ │ -196 else │ │ │ │ -197 while (__n--) │ │ │ │ -198 new (__o++) _Tp(__a[*__i++]); │ │ │ │ -199 } │ │ │ │ +186 template> │ │ │ │ +187 _q_u_e_u_e(_Sequence&& __c, const _Alloc& __a) │ │ │ │ +188 : _c(_s_t_d::_m_o_v_e(__c), __a) { } │ │ │ │ +189 │ │ │ │ +190 template> │ │ │ │ +191 _q_u_e_u_e(const _q_u_e_u_e& __q, const _Alloc& __a) │ │ │ │ +192 : _c(__q._c, __a) { } │ │ │ │ +193 │ │ │ │ +194 template> │ │ │ │ +195 _q_u_e_u_e(_q_u_e_u_e&& __q, const _Alloc& __a) │ │ │ │ +196 : _c(_s_t_d::_m_o_v_e(__q._c), __a) { } │ │ │ │ +197 │ │ │ │ +198#if __cplusplus > 202002L │ │ │ │ +199#define __cpp_lib_adaptor_iterator_pair_constructor 202106L │ │ │ │ 200 │ │ │ │ -201 // Do the necessary cleanup when we're done with arrays. │ │ │ │ -202 template │ │ │ │ -203 inline void │ │ │ │ -204 __valarray_destroy_elements(_Tp* __b, _Tp* __e) │ │ │ │ -205 { │ │ │ │ -206 if (!__is_trivial(_Tp)) │ │ │ │ -207 while (__b != __e) │ │ │ │ -208 { │ │ │ │ -209 __b->~_Tp(); │ │ │ │ -210 ++__b; │ │ │ │ -211 } │ │ │ │ -212 } │ │ │ │ +201 template> │ │ │ │ +203 _q_u_e_u_e(_InputIterator __first, _InputIterator __last) │ │ │ │ +204 : _c(__first, __last) { } │ │ │ │ +205 │ │ │ │ +206 template, │ │ │ │ +208 typename = _Uses<_Alloc>> │ │ │ │ +209 _q_u_e_u_e(_InputIterator __first, _InputIterator __last, const _Alloc& __a) │ │ │ │ +210 : _c(__first, __last, __a) { } │ │ │ │ +211#endif │ │ │ │ +212#endif │ │ │ │ 213 │ │ │ │ -214 // Fill a plain array __a[<__n>] with __t │ │ │ │ -215 template │ │ │ │ -216 inline void │ │ │ │ -217 __valarray_fill(_Tp* __restrict__ __a, size_t __n, const _Tp& __t) │ │ │ │ -218 { │ │ │ │ -219 while (__n--) │ │ │ │ -220 *__a++ = __t; │ │ │ │ -221 } │ │ │ │ -222 │ │ │ │ -223 // fill strided array __a[<__n-1 : __s>] with __t │ │ │ │ -224 template │ │ │ │ -225 inline void │ │ │ │ -226 __valarray_fill(_Tp* __restrict__ __a, size_t __n, │ │ │ │ -227 size_t __s, const _Tp& __t) │ │ │ │ -228 { │ │ │ │ -229 for (size_t __i = 0; __i < __n; ++__i, __a += __s) │ │ │ │ -230 *__a = __t; │ │ │ │ -231 } │ │ │ │ -232 │ │ │ │ -233 // fill indirect array __a[__i[<__n>]] with __i │ │ │ │ -234 template │ │ │ │ -235 inline void │ │ │ │ -236 __valarray_fill(_Tp* __restrict__ __a, const size_t* __restrict__ __i, │ │ │ │ -237 size_t __n, const _Tp& __t) │ │ │ │ -238 { │ │ │ │ -239 for (size_t __j = 0; __j < __n; ++__j, ++__i) │ │ │ │ -240 __a[*__i] = __t; │ │ │ │ -241 } │ │ │ │ -242 │ │ │ │ -243 // copy plain array __a[<__n>] in __b[<__n>] │ │ │ │ -244 // For non-fundamental types, it is wrong to say 'memcpy()' │ │ │ │ -245 template │ │ │ │ -246 struct _Array_copier │ │ │ │ -247 { │ │ │ │ -248 inline static void │ │ │ │ -249 _S_do_it(const _Tp* __restrict__ __a, size_t __n, _Tp* __restrict__ __b) │ │ │ │ -250 { │ │ │ │ -251 while(__n--) │ │ │ │ -252 *__b++ = *__a++; │ │ │ │ -253 } │ │ │ │ -254 }; │ │ │ │ -255 │ │ │ │ -256 template │ │ │ │ -257 struct _Array_copier<_Tp, true> │ │ │ │ +214 /** │ │ │ │ +215 * Returns true if the %queue is empty. │ │ │ │ +216 */ │ │ │ │ +217 _GLIBCXX_NODISCARD bool │ │ │ │ +_2_1_8 _e_m_p_t_y() const │ │ │ │ +219 { return _c.empty(); } │ │ │ │ +220 │ │ │ │ +221 /** Returns the number of elements in the %queue. */ │ │ │ │ +222 _GLIBCXX_NODISCARD │ │ │ │ +223 size_type │ │ │ │ +_2_2_4 _s_i_z_e() const │ │ │ │ +225 { return _c.size(); } │ │ │ │ +226 │ │ │ │ +227 /** │ │ │ │ +228 * Returns a read/write reference to the data at the first │ │ │ │ +229 * element of the %queue. │ │ │ │ +230 */ │ │ │ │ +231 _GLIBCXX_NODISCARD │ │ │ │ +232 reference │ │ │ │ +_2_3_3 _f_r_o_n_t() │ │ │ │ +234 { │ │ │ │ +235 __glibcxx_requires_nonempty(); │ │ │ │ +236 return _c.front(); │ │ │ │ +237 } │ │ │ │ +238 │ │ │ │ +239 /** │ │ │ │ +240 * Returns a read-only (constant) reference to the data at the first │ │ │ │ +241 * element of the %queue. │ │ │ │ +242 */ │ │ │ │ +243 _GLIBCXX_NODISCARD │ │ │ │ +244 const_reference │ │ │ │ +_2_4_5 _f_r_o_n_t() const │ │ │ │ +246 { │ │ │ │ +247 __glibcxx_requires_nonempty(); │ │ │ │ +248 return _c.front(); │ │ │ │ +249 } │ │ │ │ +250 │ │ │ │ +251 /** │ │ │ │ +252 * Returns a read/write reference to the data at the last │ │ │ │ +253 * element of the %queue. │ │ │ │ +254 */ │ │ │ │ +255 _GLIBCXX_NODISCARD │ │ │ │ +256 reference │ │ │ │ +_2_5_7 _b_a_c_k() │ │ │ │ 258 { │ │ │ │ -259 inline static void │ │ │ │ -260 _S_do_it(const _Tp* __restrict__ __a, size_t __n, _Tp* __restrict__ __b) │ │ │ │ -261 { │ │ │ │ -262 if (__n != 0) │ │ │ │ -263 __builtin_memcpy(__b, __a, __n * sizeof (_Tp)); │ │ │ │ -264 } │ │ │ │ -265 }; │ │ │ │ -266 │ │ │ │ -267 // Copy a plain array __a[<__n>] into a play array __b[<>] │ │ │ │ -268 template │ │ │ │ -269 inline void │ │ │ │ -270 __valarray_copy(const _Tp* __restrict__ __a, size_t __n, │ │ │ │ -271 _Tp* __restrict__ __b) │ │ │ │ -272 { │ │ │ │ -273 _Array_copier<_Tp, __is_trivial(_Tp)>::_S_do_it(__a, __n, __b); │ │ │ │ -274 } │ │ │ │ -275 │ │ │ │ -276 // Copy strided array __a[<__n : __s>] in plain __b[<__n>] │ │ │ │ -277 template │ │ │ │ -278 inline void │ │ │ │ -279 __valarray_copy(const _Tp* __restrict__ __a, size_t __n, size_t __s, │ │ │ │ -280 _Tp* __restrict__ __b) │ │ │ │ -281 { │ │ │ │ -282 for (size_t __i = 0; __i < __n; ++__i, ++__b, __a += __s) │ │ │ │ -283 *__b = *__a; │ │ │ │ -284 } │ │ │ │ -285 │ │ │ │ -286 // Copy a plain array __a[<__n>] into a strided array __b[<__n : __s>] │ │ │ │ -287 template │ │ │ │ -288 inline void │ │ │ │ -289 __valarray_copy(const _Tp* __restrict__ __a, _Tp* __restrict__ __b, │ │ │ │ -290 size_t __n, size_t __s) │ │ │ │ -291 { │ │ │ │ -292 for (size_t __i = 0; __i < __n; ++__i, ++__a, __b += __s) │ │ │ │ -293 *__b = *__a; │ │ │ │ -294 } │ │ │ │ -295 │ │ │ │ -296 // Copy strided array __src[<__n : __s1>] into another │ │ │ │ -297 // strided array __dst[< : __s2>]. Their sizes must match. │ │ │ │ -298 template │ │ │ │ -299 inline void │ │ │ │ -300 __valarray_copy(const _Tp* __restrict__ __src, size_t __n, size_t __s1, │ │ │ │ -301 _Tp* __restrict__ __dst, size_t __s2) │ │ │ │ -302 { │ │ │ │ -303 for (size_t __i = 0; __i < __n; ++__i) │ │ │ │ -304 __dst[__i * __s2] = __src[__i * __s1]; │ │ │ │ -305 } │ │ │ │ -306 │ │ │ │ -307 // Copy an indexed array __a[__i[<__n>]] in plain array __b[<__n>] │ │ │ │ -308 template │ │ │ │ -309 inline void │ │ │ │ -310 __valarray_copy(const _Tp* __restrict__ __a, │ │ │ │ -311 const size_t* __restrict__ __i, │ │ │ │ -312 _Tp* __restrict__ __b, size_t __n) │ │ │ │ -313 { │ │ │ │ -314 for (size_t __j = 0; __j < __n; ++__j, ++__b, ++__i) │ │ │ │ -315 *__b = __a[*__i]; │ │ │ │ -316 } │ │ │ │ -317 │ │ │ │ -318 // Copy a plain array __a[<__n>] in an indexed array __b[__i[<__n>]] │ │ │ │ -319 template │ │ │ │ -320 inline void │ │ │ │ -321 __valarray_copy(const _Tp* __restrict__ __a, size_t __n, │ │ │ │ -322 _Tp* __restrict__ __b, const size_t* __restrict__ __i) │ │ │ │ -323 { │ │ │ │ -324 for (size_t __j = 0; __j < __n; ++__j, ++__a, ++__i) │ │ │ │ -325 __b[*__i] = *__a; │ │ │ │ -326 } │ │ │ │ -327 │ │ │ │ -328 // Copy the __n first elements of an indexed array __src[<__i>] into │ │ │ │ -329 // another indexed array __dst[<__j>]. │ │ │ │ -330 template │ │ │ │ -331 inline void │ │ │ │ -332 __valarray_copy(const _Tp* __restrict__ __src, size_t __n, │ │ │ │ -333 const size_t* __restrict__ __i, │ │ │ │ -334 _Tp* __restrict__ __dst, const size_t* __restrict__ __j) │ │ │ │ -335 { │ │ │ │ -336 for (size_t __k = 0; __k < __n; ++__k) │ │ │ │ -337 __dst[*__j++] = __src[*__i++]; │ │ │ │ -338 } │ │ │ │ -339 │ │ │ │ -340 // │ │ │ │ -341 // Compute the sum of elements in range [__f, __l) which must not be empty. │ │ │ │ -342 // This is a naive algorithm. It suffers from cancelling. │ │ │ │ -343 // In the future try to specialize for _Tp = float, double, long double │ │ │ │ -344 // using a more accurate algorithm. │ │ │ │ -345 // │ │ │ │ -346 template │ │ │ │ -347 inline _Tp │ │ │ │ -348 __valarray_sum(const _Tp* __f, const _Tp* __l) │ │ │ │ -349 { │ │ │ │ -350 _Tp __r = *__f++; │ │ │ │ -351 while (__f != __l) │ │ │ │ -352 __r += *__f++; │ │ │ │ -353 return __r; │ │ │ │ -354 } │ │ │ │ +259 __glibcxx_requires_nonempty(); │ │ │ │ +260 return _c.back(); │ │ │ │ +261 } │ │ │ │ +262 │ │ │ │ +263 /** │ │ │ │ +264 * Returns a read-only (constant) reference to the data at the last │ │ │ │ +265 * element of the %queue. │ │ │ │ +266 */ │ │ │ │ +267 _GLIBCXX_NODISCARD │ │ │ │ +268 const_reference │ │ │ │ +_2_6_9 _b_a_c_k() const │ │ │ │ +270 { │ │ │ │ +271 __glibcxx_requires_nonempty(); │ │ │ │ +272 return _c.back(); │ │ │ │ +273 } │ │ │ │ +274 │ │ │ │ +275 /** │ │ │ │ +276 * @brief Add data to the end of the %queue. │ │ │ │ +277 * @param __x Data to be added. │ │ │ │ +278 * │ │ │ │ +279 * This is a typical %queue operation. The function creates an │ │ │ │ +280 * element at the end of the %queue and assigns the given data │ │ │ │ +281 * to it. The time complexity of the operation depends on the │ │ │ │ +282 * underlying sequence. │ │ │ │ +283 */ │ │ │ │ +284 void │ │ │ │ +_2_8_5 _p_u_s_h(const value_type& __x) │ │ │ │ +286 { _c.push_back(__x); } │ │ │ │ +287 │ │ │ │ +288#if __cplusplus >= 201103L │ │ │ │ +289 void │ │ │ │ +290 _p_u_s_h(value_type&& __x) │ │ │ │ +291 { _c.push_back(_s_t_d_:_:_m_o_v_e(__x)); } │ │ │ │ +292 │ │ │ │ +293#if __cplusplus > 201402L │ │ │ │ +294 template │ │ │ │ +295 decltype(auto) │ │ │ │ +296 emplace(_Args&&... __args) │ │ │ │ +297 { return _c.emplace_back(_s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(__args)...); } │ │ │ │ +298#else │ │ │ │ +299 template │ │ │ │ +300 void │ │ │ │ +301 emplace(_Args&&... __args) │ │ │ │ +302 { _c.emplace_back(_s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(__args)...); } │ │ │ │ +303#endif │ │ │ │ +304#endif │ │ │ │ +305 │ │ │ │ +306 /** │ │ │ │ +307 * @brief Removes first element. │ │ │ │ +308 * │ │ │ │ +309 * This is a typical %queue operation. It shrinks the %queue by one. │ │ │ │ +310 * The time complexity of the operation depends on the underlying │ │ │ │ +311 * sequence. │ │ │ │ +312 * │ │ │ │ +313 * Note that no data is returned, and if the first element's │ │ │ │ +314 * data is needed, it should be retrieved before pop() is │ │ │ │ +315 * called. │ │ │ │ +316 */ │ │ │ │ +317 void │ │ │ │ +_3_1_8 _p_o_p() │ │ │ │ +319 { │ │ │ │ +320 __glibcxx_requires_nonempty(); │ │ │ │ +321 _c.pop_front(); │ │ │ │ +322 } │ │ │ │ +323 │ │ │ │ +324#if __cplusplus >= 201103L │ │ │ │ +325 void │ │ │ │ +326 swap(_q_u_e_u_e& __q) │ │ │ │ +327#if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11 │ │ │ │ +328 noexcept(_____i_s___n_o_t_h_r_o_w___s_w_a_p_p_a_b_l_e_<___S_e_q_u_e_n_c_e_>_:_:_v_a_l_u_e) │ │ │ │ +329#else │ │ │ │ +330 noexcept(_____i_s___n_o_t_h_r_o_w___s_w_a_p_p_a_b_l_e_<___T_p_>_:_:_v_a_l_u_e) │ │ │ │ +331#endif │ │ │ │ +332 { │ │ │ │ +333 using _s_t_d_:_:_s_w_a_p; │ │ │ │ +334 swap(_c, __q._c); │ │ │ │ +335 } │ │ │ │ +336#endif // __cplusplus >= 201103L │ │ │ │ +337 }; │ │ │ │ +338 │ │ │ │ +339#if __cpp_deduction_guides >= 201606 │ │ │ │ +340 template> │ │ │ │ +342 queue(_Container) -> queue; │ │ │ │ +343 │ │ │ │ +344 template> │ │ │ │ +346 queue(_Container, _Allocator) │ │ │ │ +347 -> queue; │ │ │ │ +348 │ │ │ │ +349#ifdef __cpp_lib_adaptor_iterator_pair_constructor │ │ │ │ +350 template::value_type, │ │ │ │ +353 typename = _RequireInputIter<_InputIterator>> │ │ │ │ +354 queue(_InputIterator, _InputIterator) -> queue<_ValT>; │ │ │ │ 355 │ │ │ │ -356 // Compute the min/max of an array-expression │ │ │ │ -357 template │ │ │ │ -358 inline typename _Ta::value_type │ │ │ │ -359 __valarray_min(const _Ta& __a) │ │ │ │ -360 { │ │ │ │ -361 size_t __s = __a.size(); │ │ │ │ -362 typedef typename _Ta::value_type _Value_type; │ │ │ │ -363 _Value_type __r = __s == 0 ? _Value_type() : __a[0]; │ │ │ │ -364 for (size_t __i = 1; __i < __s; ++__i) │ │ │ │ -365 { │ │ │ │ -366 _Value_type __t = __a[__i]; │ │ │ │ -367 if (__t < __r) │ │ │ │ -368 __r = __t; │ │ │ │ -369 } │ │ │ │ -370 return __r; │ │ │ │ -371 } │ │ │ │ -372 │ │ │ │ -373 template │ │ │ │ -374 inline typename _Ta::value_type │ │ │ │ -375 __valarray_max(const _Ta& __a) │ │ │ │ -376 { │ │ │ │ -377 size_t __s = __a.size(); │ │ │ │ -378 typedef typename _Ta::value_type _Value_type; │ │ │ │ -379 _Value_type __r = __s == 0 ? _Value_type() : __a[0]; │ │ │ │ -380 for (size_t __i = 1; __i < __s; ++__i) │ │ │ │ -381 { │ │ │ │ -382 _Value_type __t = __a[__i]; │ │ │ │ -383 if (__t > __r) │ │ │ │ -384 __r = __t; │ │ │ │ -385 } │ │ │ │ -386 return __r; │ │ │ │ -387 } │ │ │ │ -388 │ │ │ │ -389 // │ │ │ │ -390 // Helper class _Array, first layer of valarray abstraction. │ │ │ │ -391 // All operations on valarray should be forwarded to this class │ │ │ │ -392 // whenever possible. -- gdr │ │ │ │ -393 // │ │ │ │ -394 │ │ │ │ -395 template │ │ │ │ -396 struct _Array │ │ │ │ -397 { │ │ │ │ -398 explicit _Array(_Tp* const __restrict__); │ │ │ │ -399 explicit _Array(const valarray<_Tp>&); │ │ │ │ -400 _Array(const _Tp* __restrict__, size_t); │ │ │ │ +356 template::value_type, │ │ │ │ +359 typename = _RequireInputIter<_InputIterator>, │ │ │ │ +360 typename = _RequireAllocator<_Allocator>> │ │ │ │ +361 queue(_InputIterator, _InputIterator, _Allocator) │ │ │ │ +362 -> queue<_ValT, deque<_ValT, _Allocator>>; │ │ │ │ +363#endif │ │ │ │ +364#endif │ │ │ │ +365 │ │ │ │ +366 /** │ │ │ │ +367 * @brief Queue equality comparison. │ │ │ │ +368 * @param __x A %queue. │ │ │ │ +369 * @param __y A %queue of the same type as @a __x. │ │ │ │ +370 * @return True iff the size and elements of the queues are equal. │ │ │ │ +371 * │ │ │ │ +372 * This is an equivalence relation. Complexity and semantics depend on the │ │ │ │ +373 * underlying sequence type, but the expected rules are: this relation is │ │ │ │ +374 * linear in the size of the sequences, and queues are considered equivalent │ │ │ │ +375 * if their sequences compare equal. │ │ │ │ +376 */ │ │ │ │ +377 template │ │ │ │ +378 _GLIBCXX_NODISCARD │ │ │ │ +379 inline bool │ │ │ │ +_3_8_0 operator==(const _q_u_e_u_e_<___T_p_,_ ___S_e_q_>& __x, const _q_u_e_u_e_<___T_p_,_ ___S_e_q_>& __y) │ │ │ │ +381 { return __x.c == __y.c; } │ │ │ │ +382 │ │ │ │ +383 /** │ │ │ │ +384 * @brief Queue ordering relation. │ │ │ │ +385 * @param __x A %queue. │ │ │ │ +386 * @param __y A %queue of the same type as @a x. │ │ │ │ +387 * @return True iff @a __x is lexicographically less than @a __y. │ │ │ │ +388 * │ │ │ │ +389 * This is an total ordering relation. Complexity and semantics │ │ │ │ +390 * depend on the underlying sequence type, but the expected rules │ │ │ │ +391 * are: this relation is linear in the size of the sequences, the │ │ │ │ +392 * elements must be comparable with @c <, and │ │ │ │ +393 * std::lexicographical_compare() is usually used to make the │ │ │ │ +394 * determination. │ │ │ │ +395 */ │ │ │ │ +396 template │ │ │ │ +397 _GLIBCXX_NODISCARD │ │ │ │ +_3_9_8 inline bool │ │ │ │ +399 operator<(const _q_u_e_u_e_<___T_p_,_ ___S_e_q_>& __x, const _q_u_e_u_e_<___T_p_,_ ___S_e_q_>& __y) │ │ │ │ +400 { return __x.c < __y.c; } │ │ │ │ 401 │ │ │ │ -402 _Tp* begin() const; │ │ │ │ -403 │ │ │ │ -404 _Tp* const __restrict__ _M_data; │ │ │ │ -405 }; │ │ │ │ -406 │ │ │ │ -407 │ │ │ │ -408 // Copy-construct plain array __b[<__n>] from indexed array __a[__i[<__n>]] │ │ │ │ -409 template │ │ │ │ -410 inline void │ │ │ │ -411 __valarray_copy_construct(_Array<_Tp> __a, _Array __i, │ │ │ │ -412 _Array<_Tp> __b, size_t __n) │ │ │ │ -413 { std::__valarray_copy_construct(__a._M_data, __i._M_data, │ │ │ │ -414 __b._M_data, __n); } │ │ │ │ +402 /// Based on operator== │ │ │ │ +403 template │ │ │ │ +404 _GLIBCXX_NODISCARD │ │ │ │ +405 inline bool │ │ │ │ +_4_0_6 operator!=(const _q_u_e_u_e_<___T_p_,_ ___S_e_q_>& __x, const _q_u_e_u_e_<___T_p_,_ ___S_e_q_>& __y) │ │ │ │ +407 { return !(__x == __y); } │ │ │ │ +408 │ │ │ │ +409 /// Based on operator< │ │ │ │ +410 template │ │ │ │ +411 _GLIBCXX_NODISCARD │ │ │ │ +412 inline bool │ │ │ │ +_4_1_3 operator>(const _q_u_e_u_e_<___T_p_,_ ___S_e_q_>& __x, const _q_u_e_u_e_<___T_p_,_ ___S_e_q_>& __y) │ │ │ │ +414 { return __y < __x; } │ │ │ │ 415 │ │ │ │ -416 // Copy-construct plain array __b[<__n>] from strided array __a[<__n : │ │ │ │ -__s>] │ │ │ │ -417 template │ │ │ │ -418 inline void │ │ │ │ -419 __valarray_copy_construct(_Array<_Tp> __a, size_t __n, size_t __s, │ │ │ │ -420 _Array<_Tp> __b) │ │ │ │ -421 { std::__valarray_copy_construct(__a._M_data, __n, __s, __b._M_data); } │ │ │ │ +416 /// Based on operator< │ │ │ │ +417 template │ │ │ │ +418 _GLIBCXX_NODISCARD │ │ │ │ +_4_1_9 inline bool │ │ │ │ +420 operator<=(const _q_u_e_u_e_<___T_p_,_ ___S_e_q_>& __x, const _q_u_e_u_e_<___T_p_,_ ___S_e_q_>& __y) │ │ │ │ +421 { return !(__y < __x); } │ │ │ │ 422 │ │ │ │ -423 template │ │ │ │ -424 inline void │ │ │ │ -425 __valarray_fill (_Array<_Tp> __a, size_t __n, const _Tp& __t) │ │ │ │ -426 { std::__valarray_fill(__a._M_data, __n, __t); } │ │ │ │ -427 │ │ │ │ -428 template │ │ │ │ -429 inline void │ │ │ │ -430 __valarray_fill(_Array<_Tp> __a, size_t __n, size_t __s, const _Tp& __t) │ │ │ │ -431 { std::__valarray_fill(__a._M_data, __n, __s, __t); } │ │ │ │ -432 │ │ │ │ -433 template │ │ │ │ -434 inline void │ │ │ │ -435 __valarray_fill(_Array<_Tp> __a, _Array __i, │ │ │ │ -436 size_t __n, const _Tp& __t) │ │ │ │ -437 { std::__valarray_fill(__a._M_data, __i._M_data, __n, __t); } │ │ │ │ -438 │ │ │ │ -439 // Copy a plain array __a[<__n>] into a play array __b[<>] │ │ │ │ -440 template │ │ │ │ -441 inline void │ │ │ │ -442 __valarray_copy(_Array<_Tp> __a, size_t __n, _Array<_Tp> __b) │ │ │ │ -443 { std::__valarray_copy(__a._M_data, __n, __b._M_data); } │ │ │ │ -444 │ │ │ │ -445 // Copy strided array __a[<__n : __s>] in plain __b[<__n>] │ │ │ │ -446 template │ │ │ │ -447 inline void │ │ │ │ -448 __valarray_copy(_Array<_Tp> __a, size_t __n, size_t __s, _Array<_Tp> __b) │ │ │ │ -449 { std::__valarray_copy(__a._M_data, __n, __s, __b._M_data); } │ │ │ │ +423 /// Based on operator< │ │ │ │ +424 template │ │ │ │ +425 _GLIBCXX_NODISCARD │ │ │ │ +426 inline bool │ │ │ │ +_4_2_7 operator>=(const _q_u_e_u_e_<___T_p_,_ ___S_e_q_>& __x, const _q_u_e_u_e_<___T_p_,_ ___S_e_q_>& __y) │ │ │ │ +428 { return !(__x < __y); } │ │ │ │ +429 │ │ │ │ +430#if __cpp_lib_three_way_comparison │ │ │ │ +431 template │ │ │ │ +432 [[nodiscard]] │ │ │ │ +433 inline compare_three_way_result_t<_Seq> │ │ │ │ +434 operator<=>(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y) │ │ │ │ +435 { return __x.c <=> __y.c; } │ │ │ │ +436#endif │ │ │ │ +437 │ │ │ │ +438#if __cplusplus >= 201103L │ │ │ │ +439 template │ │ │ │ +440 inline │ │ │ │ +441#if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11 │ │ │ │ +442 // Constrained free swap overload, see p0185r1 │ │ │ │ +443 typename enable_if<__is_swappable<_Seq>::value>::type │ │ │ │ +444#else │ │ │ │ +445 void │ │ │ │ +446#endif │ │ │ │ +447 _s_w_a_p(queue<_Tp, _Seq>& __x, queue<_Tp, _Seq>& __y) │ │ │ │ +448 noexcept(noexcept(__x.swap(__y))) │ │ │ │ +449 { __x.swap(__y); } │ │ │ │ 450 │ │ │ │ -451 // Copy a plain array __a[<__n>] into a strided array __b[<__n : __s>] │ │ │ │ -452 template │ │ │ │ -453 inline void │ │ │ │ -454 __valarray_copy(_Array<_Tp> __a, _Array<_Tp> __b, size_t __n, size_t __s) │ │ │ │ -455 { __valarray_copy(__a._M_data, __b._M_data, __n, __s); } │ │ │ │ -456 │ │ │ │ -457 // Copy strided array __src[<__n : __s1>] into another │ │ │ │ -458 // strided array __dst[< : __s2>]. Their sizes must match. │ │ │ │ -459 template │ │ │ │ -460 inline void │ │ │ │ -461 __valarray_copy(_Array<_Tp> __a, size_t __n, size_t __s1, │ │ │ │ -462 _Array<_Tp> __b, size_t __s2) │ │ │ │ -463 { std::__valarray_copy(__a._M_data, __n, __s1, __b._M_data, __s2); } │ │ │ │ -464 │ │ │ │ -465 // Copy an indexed array __a[__i[<__n>]] in plain array __b[<__n>] │ │ │ │ -466 template │ │ │ │ -467 inline void │ │ │ │ -468 __valarray_copy(_Array<_Tp> __a, _Array __i, │ │ │ │ -469 _Array<_Tp> __b, size_t __n) │ │ │ │ -470 { std::__valarray_copy(__a._M_data, __i._M_data, __b._M_data, __n); } │ │ │ │ -471 │ │ │ │ -472 // Copy a plain array __a[<__n>] in an indexed array __b[__i[<__n>]] │ │ │ │ -473 template │ │ │ │ -474 inline void │ │ │ │ -475 __valarray_copy(_Array<_Tp> __a, size_t __n, _Array<_Tp> __b, │ │ │ │ -476 _Array __i) │ │ │ │ -477 { std::__valarray_copy(__a._M_data, __n, __b._M_data, __i._M_data); } │ │ │ │ -478 │ │ │ │ -479 // Copy the __n first elements of an indexed array __src[<__i>] into │ │ │ │ -480 // another indexed array __dst[<__j>]. │ │ │ │ -481 template │ │ │ │ -482 inline void │ │ │ │ -483 __valarray_copy(_Array<_Tp> __src, size_t __n, _Array __i, │ │ │ │ -484 _Array<_Tp> __dst, _Array __j) │ │ │ │ -485 { │ │ │ │ -486 std::__valarray_copy(__src._M_data, __n, __i._M_data, │ │ │ │ -487 __dst._M_data, __j._M_data); │ │ │ │ -488 } │ │ │ │ -489 │ │ │ │ -490 template │ │ │ │ -491 inline │ │ │ │ -492 _Array<_Tp>::_Array(_Tp* const __restrict__ __p) │ │ │ │ -493 : _M_data (__p) {} │ │ │ │ -494 │ │ │ │ -495 template │ │ │ │ -496 inline │ │ │ │ -497 _Array<_Tp>::_Array(const valarray<_Tp>& __v) │ │ │ │ -498 : _M_data (__v._M_data) {} │ │ │ │ -499 │ │ │ │ -500 template │ │ │ │ -501 inline │ │ │ │ -502 _Array<_Tp>::_Array(const _Tp* __restrict__ __b, size_t __s) │ │ │ │ -503 : _M_data(__valarray_get_storage<_Tp>(__s)) │ │ │ │ -504 { std::__valarray_copy_construct(__b, __s, _M_data); } │ │ │ │ -505 │ │ │ │ -506 template │ │ │ │ -507 inline _Tp* │ │ │ │ -508 _Array<_Tp>::begin () const │ │ │ │ -509 { return _M_data; } │ │ │ │ -510 │ │ │ │ -511#define _DEFINE_ARRAY_FUNCTION(_Op, _Name) \ │ │ │ │ -512 template \ │ │ │ │ -513 inline void \ │ │ │ │ -514 _Array_augmented_##_Name(_Array<_Tp> __a, size_t __n, const _Tp& __t) \ │ │ │ │ -515 { \ │ │ │ │ -516 for (_Tp* __p = __a._M_data; __p < __a._M_data + __n; ++__p) \ │ │ │ │ -517 *__p _Op##= __t; \ │ │ │ │ -518 } \ │ │ │ │ -519 \ │ │ │ │ -520 template \ │ │ │ │ -521 inline void \ │ │ │ │ -522 _Array_augmented_##_Name(_Array<_Tp> __a, size_t __n, _Array<_Tp> __b) \ │ │ │ │ -523 { \ │ │ │ │ -524 _Tp* __p = __a._M_data; \ │ │ │ │ -525 for (_Tp* __q = __b._M_data; __q < __b._M_data + __n; ++__p, ++__q) \ │ │ │ │ -526 *__p _Op##= *__q; \ │ │ │ │ -527 } \ │ │ │ │ -528 \ │ │ │ │ -529 template \ │ │ │ │ -530 void \ │ │ │ │ -531 _Array_augmented_##_Name(_Array<_Tp> __a, \ │ │ │ │ -532 const _Expr<_Dom, _Tp>& __e, size_t __n) \ │ │ │ │ -533 { \ │ │ │ │ -534 _Tp* __p(__a._M_data); \ │ │ │ │ -535 for (size_t __i = 0; __i < __n; ++__i, ++__p) \ │ │ │ │ -536 *__p _Op##= __e[__i]; \ │ │ │ │ -537 } \ │ │ │ │ -538 \ │ │ │ │ -539 template \ │ │ │ │ -540 inline void \ │ │ │ │ -541 _Array_augmented_##_Name(_Array<_Tp> __a, size_t __n, size_t __s, \ │ │ │ │ -542 _Array<_Tp> __b) \ │ │ │ │ -543 { \ │ │ │ │ -544 _Tp* __q(__b._M_data); \ │ │ │ │ -545 for (_Tp* __p = __a._M_data; __p < __a._M_data + __s * __n; \ │ │ │ │ -546 __p += __s, ++__q) \ │ │ │ │ -547 *__p _Op##= *__q; \ │ │ │ │ -548 } \ │ │ │ │ -549 \ │ │ │ │ -550 template \ │ │ │ │ -551 inline void \ │ │ │ │ -552 _Array_augmented_##_Name(_Array<_Tp> __a, _Array<_Tp> __b, \ │ │ │ │ -553 size_t __n, size_t __s) \ │ │ │ │ -554 { \ │ │ │ │ -555 _Tp* __q(__b._M_data); \ │ │ │ │ -556 for (_Tp* __p = __a._M_data; __p < __a._M_data + __n; \ │ │ │ │ -557 ++__p, __q += __s) \ │ │ │ │ -558 *__p _Op##= *__q; \ │ │ │ │ -559 } \ │ │ │ │ -560 \ │ │ │ │ -561 template \ │ │ │ │ -562 void \ │ │ │ │ -563 _Array_augmented_##_Name(_Array<_Tp> __a, size_t __s, \ │ │ │ │ -564 const _Expr<_Dom, _Tp>& __e, size_t __n) \ │ │ │ │ -565 { \ │ │ │ │ -566 _Tp* __p(__a._M_data); \ │ │ │ │ -567 for (size_t __i = 0; __i < __n; ++__i, __p += __s) \ │ │ │ │ -568 *__p _Op##= __e[__i]; \ │ │ │ │ -569 } \ │ │ │ │ -570 \ │ │ │ │ -571 template \ │ │ │ │ -572 inline void \ │ │ │ │ -573 _Array_augmented_##_Name(_Array<_Tp> __a, _Array __i, \ │ │ │ │ -574 _Array<_Tp> __b, size_t __n) \ │ │ │ │ -575 { \ │ │ │ │ -576 _Tp* __q(__b._M_data); \ │ │ │ │ -577 for (size_t* __j = __i._M_data; __j < __i._M_data + __n; \ │ │ │ │ -578 ++__j, ++__q) \ │ │ │ │ -579 __a._M_data[*__j] _Op##= *__q; \ │ │ │ │ -580 } \ │ │ │ │ -581 \ │ │ │ │ -582 template \ │ │ │ │ -583 inline void \ │ │ │ │ -584 _Array_augmented_##_Name(_Array<_Tp> __a, size_t __n, \ │ │ │ │ -585 _Array<_Tp> __b, _Array __i) \ │ │ │ │ -586 { \ │ │ │ │ -587 _Tp* __p(__a._M_data); \ │ │ │ │ -588 for (size_t* __j = __i._M_data; __j<__i._M_data + __n; \ │ │ │ │ -589 ++__j, ++__p) \ │ │ │ │ -590 *__p _Op##= __b._M_data[*__j]; \ │ │ │ │ -591 } \ │ │ │ │ -592 \ │ │ │ │ -593 template \ │ │ │ │ -594 void \ │ │ │ │ -595 _Array_augmented_##_Name(_Array<_Tp> __a, _Array __i, \ │ │ │ │ -596 const _Expr<_Dom, _Tp>& __e, size_t __n) \ │ │ │ │ -597 { \ │ │ │ │ -598 size_t* __j(__i._M_data); \ │ │ │ │ -599 for (size_t __k = 0; __k<__n; ++__k, ++__j) \ │ │ │ │ -600 __a._M_data[*__j] _Op##= __e[__k]; \ │ │ │ │ -601 } \ │ │ │ │ -602 \ │ │ │ │ -603 template \ │ │ │ │ -604 void \ │ │ │ │ -605 _Array_augmented_##_Name(_Array<_Tp> __a, _Array __m, \ │ │ │ │ -606 _Array<_Tp> __b, size_t __n) \ │ │ │ │ -607 { \ │ │ │ │ -608 bool* __ok(__m._M_data); \ │ │ │ │ -609 _Tp* __p(__a._M_data); \ │ │ │ │ -610 for (_Tp* __q = __b._M_data; __q < __b._M_data + __n; \ │ │ │ │ -611 ++__q, ++__ok, ++__p) \ │ │ │ │ -612 { \ │ │ │ │ -613 while (! *__ok) \ │ │ │ │ -614 { \ │ │ │ │ -615 ++__ok; \ │ │ │ │ -616 ++__p; \ │ │ │ │ -617 } \ │ │ │ │ -618 *__p _Op##= *__q; \ │ │ │ │ -619 } \ │ │ │ │ -620 } \ │ │ │ │ -621 \ │ │ │ │ -622 template \ │ │ │ │ -623 void \ │ │ │ │ -624 _Array_augmented_##_Name(_Array<_Tp> __a, size_t __n, \ │ │ │ │ -625 _Array<_Tp> __b, _Array __m) \ │ │ │ │ -626 { \ │ │ │ │ -627 bool* __ok(__m._M_data); \ │ │ │ │ -628 _Tp* __q(__b._M_data); \ │ │ │ │ -629 for (_Tp* __p = __a._M_data; __p < __a._M_data + __n; \ │ │ │ │ -630 ++__p, ++__ok, ++__q) \ │ │ │ │ -631 { \ │ │ │ │ -632 while (! *__ok) \ │ │ │ │ -633 { \ │ │ │ │ -634 ++__ok; \ │ │ │ │ -635 ++__q; \ │ │ │ │ -636 } \ │ │ │ │ -637 *__p _Op##= *__q; \ │ │ │ │ -638 } \ │ │ │ │ -639 } \ │ │ │ │ -640 \ │ │ │ │ -641 template \ │ │ │ │ -642 void \ │ │ │ │ -643 _Array_augmented_##_Name(_Array<_Tp> __a, _Array __m, \ │ │ │ │ -644 const _Expr<_Dom, _Tp>& __e, size_t __n) \ │ │ │ │ -645 { \ │ │ │ │ -646 bool* __ok(__m._M_data); \ │ │ │ │ -647 _Tp* __p(__a._M_data); \ │ │ │ │ -648 for (size_t __i = 0; __i < __n; ++__i, ++__ok, ++__p) \ │ │ │ │ -649 { \ │ │ │ │ -650 while (! *__ok) \ │ │ │ │ -651 { \ │ │ │ │ -652 ++__ok; \ │ │ │ │ -653 ++__p; \ │ │ │ │ -654 } \ │ │ │ │ -655 *__p _Op##= __e[__i]; \ │ │ │ │ -656 } \ │ │ │ │ -657 } │ │ │ │ -658 │ │ │ │ -659 _DEFINE_ARRAY_FUNCTION(+, __plus) │ │ │ │ -660 _DEFINE_ARRAY_FUNCTION(-, __minus) │ │ │ │ -661 _DEFINE_ARRAY_FUNCTION(*, __multiplies) │ │ │ │ -662 _DEFINE_ARRAY_FUNCTION(/, __divides) │ │ │ │ -663 _DEFINE_ARRAY_FUNCTION(%, __modulus) │ │ │ │ -664 _DEFINE_ARRAY_FUNCTION(^, __bitwise_xor) │ │ │ │ -665 _DEFINE_ARRAY_FUNCTION(|, __bitwise_or) │ │ │ │ -666 _DEFINE_ARRAY_FUNCTION(&, __bitwise_and) │ │ │ │ -667 _DEFINE_ARRAY_FUNCTION(<<, __shift_left) │ │ │ │ -668 _DEFINE_ARRAY_FUNCTION(>>, __shift_right) │ │ │ │ +451 template │ │ │ │ +452 struct uses_allocator, _Alloc> │ │ │ │ +453 : public uses_allocator<_Seq, _Alloc>::type { }; │ │ │ │ +454#endif // __cplusplus >= 201103L │ │ │ │ +455 │ │ │ │ +456 /** │ │ │ │ +457 * @brief A standard container automatically sorting its contents. │ │ │ │ +458 * │ │ │ │ +459 * @ingroup sequences │ │ │ │ +460 * │ │ │ │ +461 * @tparam _Tp Type of element. │ │ │ │ +462 * @tparam _Sequence Type of underlying sequence, defaults to vector<_Tp>. │ │ │ │ +463 * @tparam _Compare Comparison function object type, defaults to │ │ │ │ +464 * less<_Sequence::value_type>. │ │ │ │ +465 * │ │ │ │ +466 * This is not a true container, but an @e adaptor. It holds │ │ │ │ +467 * another container, and provides a wrapper interface to that │ │ │ │ +468 * container. The wrapper is what enforces priority-based sorting │ │ │ │ +469 * and %queue behavior. Very few of the standard container/sequence │ │ │ │ +470 * interface requirements are met (e.g., iterators). │ │ │ │ +471 * │ │ │ │ +472 * The second template parameter defines the type of the underlying │ │ │ │ +473 * sequence/container. It defaults to std::vector, but it can be │ │ │ │ +474 * any type that supports @c front(), @c push_back, @c pop_back, │ │ │ │ +475 * and random-access iterators, such as std::deque or an │ │ │ │ +476 * appropriate user-defined type. │ │ │ │ +477 * │ │ │ │ +478 * The third template parameter supplies the means of making │ │ │ │ +479 * priority comparisons. It defaults to @c less but │ │ │ │ +480 * can be anything defining a strict weak ordering. │ │ │ │ +481 * │ │ │ │ +482 * Members not found in @a normal containers are @c container_type, │ │ │ │ +483 * which is a typedef for the second Sequence parameter, and @c │ │ │ │ +484 * push, @c pop, and @c top, which are standard %queue operations. │ │ │ │ +485 * │ │ │ │ +486 * @note No equality/comparison operators are provided for │ │ │ │ +487 * %priority_queue. │ │ │ │ +488 * │ │ │ │ +489 * @note Sorting of the elements takes place as they are added to, │ │ │ │ +490 * and removed from, the %priority_queue using the │ │ │ │ +491 * %priority_queue's member functions. If you access the elements │ │ │ │ +492 * by other means, and change their data such that the sorting │ │ │ │ +493 * order would be different, the %priority_queue will not re-sort │ │ │ │ +494 * the elements for you. (How could it know to do so?) │ │ │ │ +495 */ │ │ │ │ +496 template, │ │ │ │ +497 typename _Compare = less > │ │ │ │ +_4_9_8 class _p_r_i_o_r_i_t_y___q_u_e_u_e │ │ │ │ +499 { │ │ │ │ +500#ifdef _GLIBCXX_CONCEPT_CHECKS │ │ │ │ +501 // concept requirements │ │ │ │ +502 typedef typename _Sequence::value_type ___S_e_q_u_e_n_c_e___v_a_l_u_e___t_y_p_e; │ │ │ │ +503# if __cplusplus < 201103L │ │ │ │ +504 __glibcxx_class_requires(_Tp, _SGIAssignableConcept) │ │ │ │ +505# endif │ │ │ │ +506 __glibcxx_class_requires(_Sequence, _SequenceConcept) │ │ │ │ +507 __glibcxx_class_requires(_Sequence, _RandomAccessContainerConcept) │ │ │ │ +508 __glibcxx_class_requires2(_Tp, ___S_e_q_u_e_n_c_e___v_a_l_u_e___t_y_p_e, _SameTypeConcept) │ │ │ │ +509 __glibcxx_class_requires4(_Compare, bool, _Tp, _Tp, │ │ │ │ +510 _BinaryFunctionConcept) │ │ │ │ +511#endif │ │ │ │ +512 │ │ │ │ +513#if __cplusplus >= 201103L │ │ │ │ +514 template │ │ │ │ +515 using _Uses = typename │ │ │ │ +516 _e_n_a_b_l_e___i_f_<_u_s_e_s___a_l_l_o_c_a_t_o_r_<___S_e_q_u_e_n_c_e_,_ ___A_l_l_o_c_>_:_:_v_a_l_u_e>::type; │ │ │ │ +517 │ │ │ │ +518#if __cplusplus >= 201703L │ │ │ │ +519 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ +520 // 2566. Requirements on the first template parameter of container │ │ │ │ +521 // adaptors │ │ │ │ +522 static_assert(_i_s___s_a_m_e_<___T_p_,_ _t_y_p_e_n_a_m_e_ ___S_e_q_u_e_n_c_e_:_:_v_a_l_u_e___t_y_p_e_>_:_:_v_a_l_u_e, │ │ │ │ +523 "value_type must be the same as the underlying container"); │ │ │ │ +524#endif // C++17 │ │ │ │ +525#endif // C++11 │ │ │ │ +526 │ │ │ │ +527 public: │ │ │ │ +528 typedef typename _Sequence::value_type value_type; │ │ │ │ +529 typedef typename _Sequence::reference reference; │ │ │ │ +530 typedef typename _Sequence::const_reference const_reference; │ │ │ │ +531 typedef typename _Sequence::size_type size_type; │ │ │ │ +532 typedef _Sequence container_type; │ │ │ │ +533 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ +534 // DR 2684. priority_queue lacking comparator typedef │ │ │ │ +535 typedef _Compare value_compare; │ │ │ │ +536 │ │ │ │ +537 protected: │ │ │ │ +538 // See queue::c for notes on these names. │ │ │ │ +539 _Sequence c; │ │ │ │ +540 _Compare comp; │ │ │ │ +541 │ │ │ │ +542 public: │ │ │ │ +543 /** │ │ │ │ +544 * @brief Default constructor creates no elements. │ │ │ │ +545 */ │ │ │ │ +546#if __cplusplus < 201103L │ │ │ │ +547 explicit │ │ │ │ +548 _p_r_i_o_r_i_t_y___q_u_e_u_e(const _Compare& __x = _Compare(), │ │ │ │ +549 const _Sequence& _____s = _Sequence()) │ │ │ │ +550 : c(_____s), comp(__x) │ │ │ │ +551 { std::make_heap(c.begin(), c.end(), comp); } │ │ │ │ +552#else │ │ │ │ +553 template, │ │ │ │ +555 _i_s___d_e_f_a_u_l_t___c_o_n_s_t_r_u_c_t_i_b_l_e_<___S_e_q_>>::value>::type> │ │ │ │ +_5_5_6 _p_r_i_o_r_i_t_y___q_u_e_u_e() │ │ │ │ +557 : c(), comp() { } │ │ │ │ +558 │ │ │ │ +559 explicit │ │ │ │ +560 _p_r_i_o_r_i_t_y___q_u_e_u_e(const _Compare& __x, const _Sequence& _____s) │ │ │ │ +561 : c(_____s), comp(__x) │ │ │ │ +562 { std::make_heap(c.begin(), c.end(), comp); } │ │ │ │ +563 │ │ │ │ +564 explicit │ │ │ │ +565 _p_r_i_o_r_i_t_y___q_u_e_u_e(const _Compare& __x, _Sequence&& __s = _Sequence()) │ │ │ │ +566 : c(_s_t_d::_m_o_v_e(__s)), comp(__x) │ │ │ │ +567 { std::make_heap(c.begin(), c.end(), comp); } │ │ │ │ +568 │ │ │ │ +569 template> │ │ │ │ +570 explicit │ │ │ │ +571 _p_r_i_o_r_i_t_y___q_u_e_u_e(const _Alloc& __a) │ │ │ │ +572 : c(__a), comp() { } │ │ │ │ +573 │ │ │ │ +574 template> │ │ │ │ +575 _p_r_i_o_r_i_t_y___q_u_e_u_e(const _Compare& __x, const _Alloc& __a) │ │ │ │ +576 : c(__a), comp(__x) { } │ │ │ │ +577 │ │ │ │ +578 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ +579 // 2537. Constructors [...] taking allocators should call make_heap │ │ │ │ +580 template> │ │ │ │ +581 _p_r_i_o_r_i_t_y___q_u_e_u_e(const _Compare& __x, const _Sequence& __c, │ │ │ │ +582 const _Alloc& __a) │ │ │ │ +583 : c(__c, __a), comp(__x) │ │ │ │ +584 { std::make_heap(c.begin(), c.end(), comp); } │ │ │ │ +585 │ │ │ │ +586 template> │ │ │ │ +587 _p_r_i_o_r_i_t_y___q_u_e_u_e(const _Compare& __x, _Sequence&& __c, const _Alloc& __a) │ │ │ │ +588 : c(_s_t_d::_m_o_v_e(__c), __a), comp(__x) │ │ │ │ +589 { std::make_heap(c.begin(), c.end(), comp); } │ │ │ │ +590 │ │ │ │ +591 template> │ │ │ │ +592 _p_r_i_o_r_i_t_y___q_u_e_u_e(const _p_r_i_o_r_i_t_y___q_u_e_u_e& __q, const _Alloc& __a) │ │ │ │ +593 : c(__q.c, __a), comp(__q.comp) { } │ │ │ │ +594 │ │ │ │ +595 template> │ │ │ │ +596 _p_r_i_o_r_i_t_y___q_u_e_u_e(_p_r_i_o_r_i_t_y___q_u_e_u_e&& __q, const _Alloc& __a) │ │ │ │ +597 : c(_s_t_d::_m_o_v_e(__q.c), __a), comp(_s_t_d::_m_o_v_e(__q.comp)) { } │ │ │ │ +598#endif │ │ │ │ +599 │ │ │ │ +600 /** │ │ │ │ +601 * @brief Builds a %queue from a range. │ │ │ │ +602 * @param __first An input iterator. │ │ │ │ +603 * @param __last An input iterator. │ │ │ │ +604 * @param __x A comparison functor describing a strict weak ordering. │ │ │ │ +605 * @param __s An initial sequence with which to start. │ │ │ │ +606 * │ │ │ │ +607 * Begins by copying @a __s, inserting a copy of the elements │ │ │ │ +608 * from @a [first,last) into the copy of @a __s, then ordering │ │ │ │ +609 * the copy according to @a __x. │ │ │ │ +610 * │ │ │ │ +611 * For more information on function objects, see the │ │ │ │ +612 * documentation on @link functors functor base │ │ │ │ +613 * classes@endlink. │ │ │ │ +614 */ │ │ │ │ +615#if __cplusplus < 201103L │ │ │ │ +616 template │ │ │ │ +617 _p_r_i_o_r_i_t_y___q_u_e_u_e(_InputIterator __first, _InputIterator __last, │ │ │ │ +618 const _Compare& __x = _Compare(), │ │ │ │ +619 const _Sequence& __s = _Sequence()) │ │ │ │ +620 : c(__s), comp(__x) │ │ │ │ +621 { │ │ │ │ +622 __glibcxx_requires_valid_range(__first, __last); │ │ │ │ +623 c.insert(c.end(), __first, __last); │ │ │ │ +624 std::make_heap(c.begin(), c.end(), comp); │ │ │ │ +625 } │ │ │ │ +626#else │ │ │ │ +627 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ +628 // 3529. priority_queue(first, last) should construct c with (first, last) │ │ │ │ +629 template> │ │ │ │ +_6_3_1 _p_r_i_o_r_i_t_y___q_u_e_u_e(___I_n_p_u_t_I_t_e_r_a_t_o_r __first, ___I_n_p_u_t_I_t_e_r_a_t_o_r __last, │ │ │ │ +632 const _Compare& __x = _Compare()) │ │ │ │ +633 : c(__first, __last), comp(__x) │ │ │ │ +634 { std::make_heap(c.begin(), c.end(), comp); } │ │ │ │ +635 │ │ │ │ +636 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ +637 // 3522. Missing requirement on InputIterator template parameter │ │ │ │ +638 template> │ │ │ │ +640 _p_r_i_o_r_i_t_y___q_u_e_u_e(___I_n_p_u_t_I_t_e_r_a_t_o_r __first, ___I_n_p_u_t_I_t_e_r_a_t_o_r __last, │ │ │ │ +641 const _Compare& __x, const _Sequence& _____s) │ │ │ │ +642 : c(_____s), comp(__x) │ │ │ │ +643 { │ │ │ │ +644 __glibcxx_requires_valid_range(__first, __last); │ │ │ │ +645 c.insert(c.end(), __first, __last); │ │ │ │ +646 std::make_heap(c.begin(), c.end(), comp); │ │ │ │ +647 } │ │ │ │ +648 │ │ │ │ +649 template> │ │ │ │ +651 _p_r_i_o_r_i_t_y___q_u_e_u_e(_InputIterator __first, _InputIterator __last, │ │ │ │ +652 const _Compare& __x, _Sequence&& __s) │ │ │ │ +653 : c(_s_t_d::_m_o_v_e(__s)), comp(__x) │ │ │ │ +654 { │ │ │ │ +655 __glibcxx_requires_valid_range(__first, __last); │ │ │ │ +656 c.insert(c.end(), __first, __last); │ │ │ │ +657 std::make_heap(c.begin(), c.end(), comp); │ │ │ │ +658 } │ │ │ │ +659 │ │ │ │ +660 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ +661 // 3506. Missing allocator-extended constructors for priority_queue │ │ │ │ +662 template, │ │ │ │ +664 typename _Requires = _Uses<_Alloc>> │ │ │ │ +665 _p_r_i_o_r_i_t_y___q_u_e_u_e(_InputIterator __first, _InputIterator __last, │ │ │ │ +666 const _Alloc& __alloc) │ │ │ │ +667 : c(__first, __last, __alloc), comp() │ │ │ │ +668 { std::make_heap(c.begin(), c.end(), comp); } │ │ │ │ 669 │ │ │ │ -670#undef _DEFINE_ARRAY_FUNCTION │ │ │ │ -671 │ │ │ │ -672_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ -673} // namespace │ │ │ │ -674 │ │ │ │ -675# include <_b_i_t_s_/_v_a_l_a_r_r_a_y___a_r_r_a_y_._t_c_c> │ │ │ │ -676 │ │ │ │ -677#endif /* _ARRAY_H */ │ │ │ │ -_n_e_w │ │ │ │ -_v_a_l_a_r_r_a_y___a_r_r_a_y_._t_c_c │ │ │ │ -_c_p_p___t_y_p_e___t_r_a_i_t_s_._h │ │ │ │ -_c_+_+_c_o_n_f_i_g_._h │ │ │ │ +670 template, │ │ │ │ +672 typename _Requires = _Uses<_Alloc>> │ │ │ │ +673 _p_r_i_o_r_i_t_y___q_u_e_u_e(_InputIterator __first, _InputIterator __last, │ │ │ │ +674 const _Compare& __x, const _Alloc& __alloc) │ │ │ │ +675 : c(__first, __last, __alloc), comp(__x) │ │ │ │ +676 { std::make_heap(c.begin(), c.end(), comp); } │ │ │ │ +677 │ │ │ │ +678 template, │ │ │ │ +680 typename _Requires = _Uses<_Alloc>> │ │ │ │ +681 _p_r_i_o_r_i_t_y___q_u_e_u_e(_InputIterator __first, _InputIterator __last, │ │ │ │ +682 const _Compare& __x, const _Sequence& __s, │ │ │ │ +683 const _Alloc& __alloc) │ │ │ │ +684 : c(__s, __alloc), comp(__x) │ │ │ │ +685 { │ │ │ │ +686 __glibcxx_requires_valid_range(__first, __last); │ │ │ │ +687 c.insert(c.end(), __first, __last); │ │ │ │ +688 std::make_heap(c.begin(), c.end(), comp); │ │ │ │ +689 } │ │ │ │ +690 │ │ │ │ +691 template> │ │ │ │ +693 _p_r_i_o_r_i_t_y___q_u_e_u_e(_InputIterator __first, _InputIterator __last, │ │ │ │ +694 const _Compare& __x, _Sequence&& __s, │ │ │ │ +695 const _Alloc& __alloc) │ │ │ │ +696 : c(_s_t_d::_m_o_v_e(__s), __alloc), comp(__x) │ │ │ │ +697 { │ │ │ │ +698 __glibcxx_requires_valid_range(__first, __last); │ │ │ │ +699 c.insert(c.end(), __first, __last); │ │ │ │ +700 std::make_heap(c.begin(), c.end(), comp); │ │ │ │ +701 } │ │ │ │ +702#endif │ │ │ │ +703 │ │ │ │ +704 /** │ │ │ │ +705 * Returns true if the %queue is empty. │ │ │ │ +706 */ │ │ │ │ +707 _GLIBCXX_NODISCARD bool │ │ │ │ +_7_0_8 _e_m_p_t_y() const │ │ │ │ +709 { return c.empty(); } │ │ │ │ +710 │ │ │ │ +711 /** Returns the number of elements in the %queue. */ │ │ │ │ +712 _GLIBCXX_NODISCARD │ │ │ │ +713 size_type │ │ │ │ +_7_1_4 _s_i_z_e() const │ │ │ │ +715 { return c.size(); } │ │ │ │ +716 │ │ │ │ +717 /** │ │ │ │ +718 * Returns a read-only (constant) reference to the data at the first │ │ │ │ +719 * element of the %queue. │ │ │ │ +720 */ │ │ │ │ +721 _GLIBCXX_NODISCARD │ │ │ │ +722 const_reference │ │ │ │ +_7_2_3 _t_o_p() const │ │ │ │ +724 { │ │ │ │ +725 __glibcxx_requires_nonempty(); │ │ │ │ +726 return c.front(); │ │ │ │ +727 } │ │ │ │ +728 │ │ │ │ +729 /** │ │ │ │ +730 * @brief Add data to the %queue. │ │ │ │ +731 * @param __x Data to be added. │ │ │ │ +732 * │ │ │ │ +733 * This is a typical %queue operation. │ │ │ │ +734 * The time complexity of the operation depends on the underlying │ │ │ │ +735 * sequence. │ │ │ │ +736 */ │ │ │ │ +737 void │ │ │ │ +_7_3_8 _p_u_s_h(const value_type& __x) │ │ │ │ +739 { │ │ │ │ +740 c.push_back(__x); │ │ │ │ +741 std::push_heap(c.begin(), c.end(), comp); │ │ │ │ +742 } │ │ │ │ +743 │ │ │ │ +744#if __cplusplus >= 201103L │ │ │ │ +745 void │ │ │ │ +746 _p_u_s_h(value_type&& __x) │ │ │ │ +747 { │ │ │ │ +748 c.push_back(_s_t_d_:_:_m_o_v_e(__x)); │ │ │ │ +749 std::push_heap(c.begin(), c.end(), comp); │ │ │ │ +750 } │ │ │ │ +751 │ │ │ │ +752 template │ │ │ │ +753 void │ │ │ │ +754 emplace(_Args&&... __args) │ │ │ │ +755 { │ │ │ │ +756 c.emplace_back(_s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(__args)...); │ │ │ │ +757 std::push_heap(c.begin(), c.end(), comp); │ │ │ │ +758 } │ │ │ │ +759#endif │ │ │ │ +760 │ │ │ │ +761 /** │ │ │ │ +762 * @brief Removes first element. │ │ │ │ +763 * │ │ │ │ +764 * This is a typical %queue operation. It shrinks the %queue │ │ │ │ +765 * by one. The time complexity of the operation depends on the │ │ │ │ +766 * underlying sequence. │ │ │ │ +767 * │ │ │ │ +768 * Note that no data is returned, and if the first element's │ │ │ │ +769 * data is needed, it should be retrieved before pop() is │ │ │ │ +770 * called. │ │ │ │ +771 */ │ │ │ │ +772 void │ │ │ │ +_7_7_3 _p_o_p() │ │ │ │ +774 { │ │ │ │ +775 __glibcxx_requires_nonempty(); │ │ │ │ +776 std::pop_heap(c.begin(), c.end(), comp); │ │ │ │ +777 c.pop_back(); │ │ │ │ +778 } │ │ │ │ +779 │ │ │ │ +780#if __cplusplus >= 201103L │ │ │ │ +781 void │ │ │ │ +782 swap(_p_r_i_o_r_i_t_y___q_u_e_u_e& _____p_q) │ │ │ │ +783 noexcept(__and_< │ │ │ │ +784#if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11 │ │ │ │ +785 _____i_s___n_o_t_h_r_o_w___s_w_a_p_p_a_b_l_e_<___S_e_q_u_e_n_c_e_>, │ │ │ │ +786#else │ │ │ │ +787 _____i_s___n_o_t_h_r_o_w___s_w_a_p_p_a_b_l_e_<___T_p_>, │ │ │ │ +788#endif │ │ │ │ +789 _____i_s___n_o_t_h_r_o_w___s_w_a_p_p_a_b_l_e_<___C_o_m_p_a_r_e_> │ │ │ │ +790 >::value) │ │ │ │ +791 { │ │ │ │ +792 using _s_t_d_:_:_s_w_a_p; │ │ │ │ +793 swap(c, _____p_q.c); │ │ │ │ +794 swap(comp, _____p_q.comp); │ │ │ │ +795 } │ │ │ │ +796#endif // __cplusplus >= 201103L │ │ │ │ +797 }; │ │ │ │ +798 │ │ │ │ +799#if __cpp_deduction_guides >= 201606 │ │ │ │ +800 template, │ │ │ │ +802 typename = _RequireNotAllocator<_Container>> │ │ │ │ +803 priority_queue(_Compare, _Container) │ │ │ │ +804 -> priority_queue; │ │ │ │ +805 │ │ │ │ +806 template::value_type, │ │ │ │ +808 typename _Compare = less<_ValT>, │ │ │ │ +809 typename _Container = vector<_ValT>, │ │ │ │ +810 typename = _RequireInputIter<_InputIterator>, │ │ │ │ +811 typename = _RequireNotAllocator<_Compare>, │ │ │ │ +812 typename = _RequireNotAllocator<_Container>> │ │ │ │ +813 priority_queue(_InputIterator, _InputIterator, _Compare = _Compare(), │ │ │ │ +814 _Container = _Container()) │ │ │ │ +815 -> priority_queue<_ValT, _Container, _Compare>; │ │ │ │ +816 │ │ │ │ +817 template, │ │ │ │ +819 typename = _RequireNotAllocator<_Container>> │ │ │ │ +820 priority_queue(_Compare, _Container, _Allocator) │ │ │ │ +821 -> priority_queue; │ │ │ │ +822#endif │ │ │ │ +823 │ │ │ │ +824 // No equality/comparison operators are provided for priority_queue. │ │ │ │ +825 │ │ │ │ +826#if __cplusplus >= 201103L │ │ │ │ +827 template │ │ │ │ +828 inline │ │ │ │ +829#if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11 │ │ │ │ +830 // Constrained free swap overload, see p0185r1 │ │ │ │ +831 typename enable_if<__and_<__is_swappable<_Sequence>, │ │ │ │ +832 __is_swappable<_Compare>>::value>::type │ │ │ │ +833#else │ │ │ │ +834 void │ │ │ │ +835#endif │ │ │ │ +836 _s_w_a_p(priority_queue<_Tp, _Sequence, _Compare>& __x, │ │ │ │ +837 priority_queue<_Tp, _Sequence, _Compare>& __y) │ │ │ │ +838 noexcept(noexcept(__x.swap(__y))) │ │ │ │ +839 { __x.swap(__y); } │ │ │ │ +840 │ │ │ │ +841 template │ │ │ │ +843 struct uses_allocator, _Alloc> │ │ │ │ +844 : public uses_allocator<_Sequence, _Alloc>::type { }; │ │ │ │ +845#endif // __cplusplus >= 201103L │ │ │ │ +846 │ │ │ │ +847_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ +848} // namespace │ │ │ │ +849 │ │ │ │ +850#endif /* _STL_QUEUE_H */ │ │ │ │ +_c_o_n_c_e_p_t___c_h_e_c_k_._h │ │ │ │ +_d_e_b_u_g_._h │ │ │ │ +_s_t_d_:_:_m_o_v_e │ │ │ │ +constexpr std::remove_reference< _Tp >::type && move(_Tp &&__t) noexcept │ │ │ │ +Convert a value to an rvalue. │ │ │ │ +DDeeffiinniittiioonn _m_o_v_e_._h_:_1_0_4 │ │ │ │ +_s_t_d_:_:_s_w_a_p │ │ │ │ +void swap(any &__x, any &__y) noexcept │ │ │ │ +Exchange the states of two any objects. │ │ │ │ +DDeeffiinniittiioonn _a_n_y_:_4_2_9 │ │ │ │ _s_t_d │ │ │ │ ISO C++ entities toplevel namespace is std. │ │ │ │ -_c_s_t_d_l_i_b │ │ │ │ +_s_t_d_:_:_i_s___s_a_m_e │ │ │ │ +is_same │ │ │ │ +DDeeffiinniittiioonn _t_y_p_e___t_r_a_i_t_s_:_1_4_3_5 │ │ │ │ +_s_t_d_:_:_q_u_e_u_e │ │ │ │ +A standard container giving FIFO behavior. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___q_u_e_u_e_._h_:_9_7 │ │ │ │ +_s_t_d_:_:_q_u_e_u_e_:_:_p_u_s_h │ │ │ │ +void push(const value_type &__x) │ │ │ │ +Add data to the end of the queue. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___q_u_e_u_e_._h_:_2_8_5 │ │ │ │ +_s_t_d_:_:_q_u_e_u_e_:_:_c │ │ │ │ +_Sequence c │ │ │ │ +c is the underlying container. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___q_u_e_u_e_._h_:_1_5_3 │ │ │ │ +_s_t_d_:_:_q_u_e_u_e_:_:_s_i_z_e │ │ │ │ +size_type size() const │ │ │ │ +DDeeffiinniittiioonn _s_t_l___q_u_e_u_e_._h_:_2_2_4 │ │ │ │ +_s_t_d_:_:_q_u_e_u_e_:_:_f_r_o_n_t │ │ │ │ +reference front() │ │ │ │ +DDeeffiinniittiioonn _s_t_l___q_u_e_u_e_._h_:_2_3_3 │ │ │ │ +_s_t_d_:_:_q_u_e_u_e_:_:_b_a_c_k │ │ │ │ +const_reference back() const │ │ │ │ +DDeeffiinniittiioonn _s_t_l___q_u_e_u_e_._h_:_2_6_9 │ │ │ │ +_s_t_d_:_:_q_u_e_u_e_:_:_p_o_p │ │ │ │ +void pop() │ │ │ │ +Removes first element. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___q_u_e_u_e_._h_:_3_1_8 │ │ │ │ +_s_t_d_:_:_q_u_e_u_e_:_:_q_u_e_u_e │ │ │ │ +queue() │ │ │ │ +Default constructor creates no elements. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___q_u_e_u_e_._h_:_1_6_6 │ │ │ │ +_s_t_d_:_:_q_u_e_u_e_:_:_f_r_o_n_t │ │ │ │ +const_reference front() const │ │ │ │ +DDeeffiinniittiioonn _s_t_l___q_u_e_u_e_._h_:_2_4_5 │ │ │ │ +_s_t_d_:_:_q_u_e_u_e_:_:_e_m_p_t_y │ │ │ │ +bool empty() const │ │ │ │ +DDeeffiinniittiioonn _s_t_l___q_u_e_u_e_._h_:_2_1_8 │ │ │ │ +_s_t_d_:_:_q_u_e_u_e_:_:_b_a_c_k │ │ │ │ +reference back() │ │ │ │ +DDeeffiinniittiioonn _s_t_l___q_u_e_u_e_._h_:_2_5_7 │ │ │ │ +_s_t_d_:_:_p_r_i_o_r_i_t_y___q_u_e_u_e │ │ │ │ +A standard container automatically sorting its contents. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___q_u_e_u_e_._h_:_4_9_9 │ │ │ │ +_s_t_d_:_:_p_r_i_o_r_i_t_y___q_u_e_u_e_:_:_s_i_z_e │ │ │ │ +size_type size() const │ │ │ │ +DDeeffiinniittiioonn _s_t_l___q_u_e_u_e_._h_:_7_1_4 │ │ │ │ +_s_t_d_:_:_p_r_i_o_r_i_t_y___q_u_e_u_e_:_:_e_m_p_t_y │ │ │ │ +bool empty() const │ │ │ │ +DDeeffiinniittiioonn _s_t_l___q_u_e_u_e_._h_:_7_0_8 │ │ │ │ +_s_t_d_:_:_p_r_i_o_r_i_t_y___q_u_e_u_e_:_:_p_o_p │ │ │ │ +void pop() │ │ │ │ +Removes first element. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___q_u_e_u_e_._h_:_7_7_3 │ │ │ │ +_s_t_d_:_:_p_r_i_o_r_i_t_y___q_u_e_u_e_:_:_t_o_p │ │ │ │ +const_reference top() const │ │ │ │ +DDeeffiinniittiioonn _s_t_l___q_u_e_u_e_._h_:_7_2_3 │ │ │ │ +_s_t_d_:_:_p_r_i_o_r_i_t_y___q_u_e_u_e_:_:_p_r_i_o_r_i_t_y___q_u_e_u_e │ │ │ │ +priority_queue(_InputIterator __first, _InputIterator __last, const _Compare │ │ │ │ +&__x=_Compare()) │ │ │ │ +Builds a queue from a range. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___q_u_e_u_e_._h_:_6_3_1 │ │ │ │ +_s_t_d_:_:_p_r_i_o_r_i_t_y___q_u_e_u_e_:_:_p_u_s_h │ │ │ │ +void push(const value_type &__x) │ │ │ │ +Add data to the queue. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___q_u_e_u_e_._h_:_7_3_8 │ │ │ │ +_s_t_d_:_:_p_r_i_o_r_i_t_y___q_u_e_u_e_:_:_p_r_i_o_r_i_t_y___q_u_e_u_e │ │ │ │ +priority_queue() │ │ │ │ +Default constructor creates no elements. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___q_u_e_u_e_._h_:_5_5_6 │ │ │ │ +_s_t_d_:_:_a_u_t_o___p_t_r___r_e_f │ │ │ │ +DDeeffiinniittiioonn _a_u_t_o___p_t_r_._h_:_4_9 │ │ │ │ * _b_i_t_s │ │ │ │ - * _v_a_l_a_r_r_a_y___a_r_r_a_y_._h │ │ │ │ + * _s_t_l___q_u_e_u_e_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-12-base/libstdc++/user/a00365.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: utility.h File Reference │ │ │ +libstdc++: unordered_map.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -50,134 +50,157 @@ │ │ │
│ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces | │ │ │ Macros | │ │ │ Typedefs | │ │ │ -Functions | │ │ │ -Variables
│ │ │ -
utility.h File Reference
│ │ │ +Functions
│ │ │ +
unordered_map.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ │ │ │

│ │ │ Classes

struct  std::integer_sequence< _Tp, _Idx >
class  std::unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc >
 
class  std::unordered_multimap< _Key, _Tp, _Hash, _Pred, _Alloc >
 
│ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Namespaces

namespace  std
 
│ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │

│ │ │ Macros

#define __cpp_lib_integer_sequence
 
#define __cpp_lib_tuple_element_t
 
#define __cpp_lib_unordered_map_try_emplace
 
│ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ Typedefs

template<typename _Tp , typename _Up = typename remove_cv<_Tp>::type, typename = typename enable_if<is_same<_Tp, _Up>::value>::type, size_t = tuple_size<_Tp>::value>
using std::__enable_if_has_tuple_size = _Tp
 
template<typename _Tp >
using std::__is_in_place_type = bool_constant< __is_in_place_type_v< _Tp > >
 
template<size_t __i, typename _Tp >
using std::__tuple_element_t = typename tuple_element< __i, _Tp >::type
 
template<size_t... _Idx>
using std::index_sequence = integer_sequence< size_t, _Idx... >
 
template<typename... _Types>
using std::index_sequence_for = make_index_sequence< sizeof...(_Types)>
 
template<size_t _Num>
using std::make_index_sequence = make_integer_sequence< size_t, _Num >
 
template<typename _Tp , _Tp _Num>
using std::make_integer_sequence = __make_integer_seq< integer_sequence, _Tp, _Num >
 
template<size_t __i, typename _Tp >
using std::tuple_element_t = typename tuple_element< __i, _Tp >::type
 
template<typename _Key , typename _Tp , typename _Hash = hash<_Key>, typename _Pred = std::equal_to<_Key>, typename _Alloc = std::allocator<std::pair<const _Key, _Tp> >, typename _Tr = __umap_traits<__cache_default<_Key, _Hash>::value>>
using std::__umap_hashtable = _Hashtable< _Key, std::pair< const _Key, _Tp >, _Alloc, __detail::_Select1st, _Pred, _Hash, __detail::_Mod_range_hashing, __detail::_Default_ranged_hash, __detail::_Prime_rehash_policy, _Tr >
 
template<bool _Cache>
using std::__umap_traits = __detail::_Hashtable_traits< _Cache, false, true >
 
template<typename _Key , typename _Tp , typename _Hash = hash<_Key>, typename _Pred = std::equal_to<_Key>, typename _Alloc = std::allocator<std::pair<const _Key, _Tp> >, typename _Tr = __ummap_traits<__cache_default<_Key, _Hash>::value>>
using std::__ummap_hashtable = _Hashtable< _Key, std::pair< const _Key, _Tp >, _Alloc, __detail::_Select1st, _Pred, _Hash, __detail::_Mod_range_hashing, __detail::_Default_ranged_hash, __detail::_Prime_rehash_policy, _Tr >
 
template<bool _Cache>
using std::__ummap_traits = __detail::_Hashtable_traits< _Cache, false, false >
 
│ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ -

│ │ │ Functions

template<typename _Tp , typename... _Types>
constexpr size_t std::__find_uniq_type_in_pack ()
 
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ -Variables

template<typename >
constexpr bool std::__is_in_place_type_v
 
template<typename _Tp >
constexpr bool std::__is_in_place_type_v< in_place_type_t< _Tp > >
 
constexpr in_place_t std::in_place
 
template<size_t _Idx>
constexpr in_place_index_t< _Idxstd::in_place_index
 
template<typename _Tp >
constexpr in_place_type_t< _Tp > std::in_place_type
 
template<typename _Tp >
constexpr size_t std::tuple_size_v
 
template<class _Key , class _Tp , class _Hash , class _Pred , class _Alloc >
bool std::operator== (const unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc > &__x, const unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc > &__y)
 
template<class _Key , class _Tp , class _Hash , class _Pred , class _Alloc >
bool std::operator== (const unordered_multimap< _Key, _Tp, _Hash, _Pred, _Alloc > &__x, const unordered_multimap< _Key, _Tp, _Hash, _Pred, _Alloc > &__y)
 
template<class _Key , class _Tp , class _Hash , class _Pred , class _Alloc >
void std::swap (unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc > &__x, unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc > &__y) noexcept(noexcept(__x.swap(__y)))
 
template<class _Key , class _Tp , class _Hash , class _Pred , class _Alloc >
void std::swap (unordered_multimap< _Key, _Tp, _Hash, _Pred, _Alloc > &__x, unordered_multimap< _Key, _Tp, _Hash, _Pred, _Alloc > &__y) noexcept(noexcept(__x.swap(__y)))
 
│ │ │ +template<typename _InputIterator , typename _Allocator , typename = _RequireInputIter<_InputIterator>, typename = _RequireAllocator<_Allocator>>
 std::unordered_map (_InputIterator, _InputIterator, _Allocator) -> unordered_map< __iter_key_t< _InputIterator >, __iter_val_t< _InputIterator >, hash< __iter_key_t< _InputIterator > >, equal_to< __iter_key_t< _InputIterator > >, _Allocator >
 
│ │ │ +template<typename _InputIterator , typename _Allocator , typename = _RequireInputIter<_InputIterator>, typename = _RequireAllocator<_Allocator>>
 std::unordered_map (_InputIterator, _InputIterator, typename unordered_map< int, int >::size_type, _Allocator) -> unordered_map< __iter_key_t< _InputIterator >, __iter_val_t< _InputIterator >, hash< __iter_key_t< _InputIterator > >, equal_to< __iter_key_t< _InputIterator > >, _Allocator >
 
│ │ │ +template<typename _InputIterator , typename _Hash , typename _Allocator , typename = _RequireInputIter<_InputIterator>, typename = _RequireNotAllocatorOrIntegral<_Hash>, typename = _RequireAllocator<_Allocator>>
 std::unordered_map (_InputIterator, _InputIterator, typename unordered_map< int, int >::size_type, _Hash, _Allocator) -> unordered_map< __iter_key_t< _InputIterator >, __iter_val_t< _InputIterator >, _Hash, equal_to< __iter_key_t< _InputIterator > >, _Allocator >
 
│ │ │ +template<typename _InputIterator , typename _Hash = hash<__iter_key_t<_InputIterator>>, typename _Pred = equal_to<__iter_key_t<_InputIterator>>, typename _Allocator = allocator<__iter_to_alloc_t<_InputIterator>>, typename = _RequireInputIter<_InputIterator>, typename = _RequireNotAllocatorOrIntegral<_Hash>, typename = _RequireNotAllocator<_Pred>, typename = _RequireAllocator<_Allocator>>
 std::unordered_map (_InputIterator, _InputIterator, typename unordered_map< int, int >::size_type={}, _Hash=_Hash(), _Pred=_Pred(), _Allocator=_Allocator()) -> unordered_map< __iter_key_t< _InputIterator >, __iter_val_t< _InputIterator >, _Hash, _Pred, _Allocator >
 
│ │ │ +template<typename _Key , typename _Tp , typename _Allocator , typename = _RequireAllocator<_Allocator>>
 std::unordered_map (initializer_list< pair< _Key, _Tp > >, _Allocator) -> unordered_map< _Key, _Tp, hash< _Key >, equal_to< _Key >, _Allocator >
 
│ │ │ +template<typename _Key , typename _Tp , typename _Allocator , typename = _RequireAllocator<_Allocator>>
 std::unordered_map (initializer_list< pair< _Key, _Tp > >, typename unordered_map< int, int >::size_type, _Allocator) -> unordered_map< _Key, _Tp, hash< _Key >, equal_to< _Key >, _Allocator >
 
│ │ │ +template<typename _Key , typename _Tp , typename _Hash , typename _Allocator , typename = _RequireNotAllocatorOrIntegral<_Hash>, typename = _RequireAllocator<_Allocator>>
 std::unordered_map (initializer_list< pair< _Key, _Tp > >, typename unordered_map< int, int >::size_type, _Hash, _Allocator) -> unordered_map< _Key, _Tp, _Hash, equal_to< _Key >, _Allocator >
 
│ │ │ +template<typename _Key , typename _Tp , typename _Hash = hash<_Key>, typename _Pred = equal_to<_Key>, typename _Allocator = allocator<pair<const _Key, _Tp>>, typename = _RequireNotAllocatorOrIntegral<_Hash>, typename = _RequireNotAllocator<_Pred>, typename = _RequireAllocator<_Allocator>>
 std::unordered_map (initializer_list< pair< _Key, _Tp > >, typename unordered_map< int, int >::size_type={}, _Hash=_Hash(), _Pred=_Pred(), _Allocator=_Allocator()) -> unordered_map< _Key, _Tp, _Hash, _Pred, _Allocator >
 
│ │ │ +template<typename _InputIterator , typename _Allocator , typename = _RequireInputIter<_InputIterator>, typename = _RequireAllocator<_Allocator>>
 std::unordered_multimap (_InputIterator, _InputIterator, _Allocator) -> unordered_multimap< __iter_key_t< _InputIterator >, __iter_val_t< _InputIterator >, hash< __iter_key_t< _InputIterator > >, equal_to< __iter_key_t< _InputIterator > >, _Allocator >
 
│ │ │ +template<typename _InputIterator , typename _Allocator , typename = _RequireInputIter<_InputIterator>, typename = _RequireAllocator<_Allocator>>
 std::unordered_multimap (_InputIterator, _InputIterator, unordered_multimap< int, int >::size_type, _Allocator) -> unordered_multimap< __iter_key_t< _InputIterator >, __iter_val_t< _InputIterator >, hash< __iter_key_t< _InputIterator > >, equal_to< __iter_key_t< _InputIterator > >, _Allocator >
 
│ │ │ +template<typename _InputIterator , typename _Hash , typename _Allocator , typename = _RequireInputIter<_InputIterator>, typename = _RequireNotAllocatorOrIntegral<_Hash>, typename = _RequireAllocator<_Allocator>>
 std::unordered_multimap (_InputIterator, _InputIterator, unordered_multimap< int, int >::size_type, _Hash, _Allocator) -> unordered_multimap< __iter_key_t< _InputIterator >, __iter_val_t< _InputIterator >, _Hash, equal_to< __iter_key_t< _InputIterator > >, _Allocator >
 
│ │ │ +template<typename _InputIterator , typename _Hash = hash<__iter_key_t<_InputIterator>>, typename _Pred = equal_to<__iter_key_t<_InputIterator>>, typename _Allocator = allocator<__iter_to_alloc_t<_InputIterator>>, typename = _RequireInputIter<_InputIterator>, typename = _RequireNotAllocatorOrIntegral<_Hash>, typename = _RequireNotAllocator<_Pred>, typename = _RequireAllocator<_Allocator>>
 std::unordered_multimap (_InputIterator, _InputIterator, unordered_multimap< int, int >::size_type={}, _Hash=_Hash(), _Pred=_Pred(), _Allocator=_Allocator()) -> unordered_multimap< __iter_key_t< _InputIterator >, __iter_val_t< _InputIterator >, _Hash, _Pred, _Allocator >
 
│ │ │ +template<typename _Key , typename _Tp , typename _Allocator , typename = _RequireAllocator<_Allocator>>
 std::unordered_multimap (initializer_list< pair< _Key, _Tp > >, _Allocator) -> unordered_multimap< _Key, _Tp, hash< _Key >, equal_to< _Key >, _Allocator >
 
│ │ │ +template<typename _Key , typename _Tp , typename _Allocator , typename = _RequireAllocator<_Allocator>>
 std::unordered_multimap (initializer_list< pair< _Key, _Tp > >, unordered_multimap< int, int >::size_type, _Allocator) -> unordered_multimap< _Key, _Tp, hash< _Key >, equal_to< _Key >, _Allocator >
 
│ │ │ +template<typename _Key , typename _Tp , typename _Hash , typename _Allocator , typename = _RequireNotAllocatorOrIntegral<_Hash>, typename = _RequireAllocator<_Allocator>>
 std::unordered_multimap (initializer_list< pair< _Key, _Tp > >, unordered_multimap< int, int >::size_type, _Hash, _Allocator) -> unordered_multimap< _Key, _Tp, _Hash, equal_to< _Key >, _Allocator >
 
│ │ │ +template<typename _Key , typename _Tp , typename _Hash = hash<_Key>, typename _Pred = equal_to<_Key>, typename _Allocator = allocator<pair<const _Key, _Tp>>, typename = _RequireNotAllocatorOrIntegral<_Hash>, typename = _RequireNotAllocator<_Pred>, typename = _RequireAllocator<_Allocator>>
 std::unordered_multimap (initializer_list< pair< _Key, _Tp > >, unordered_multimap< int, int >::size_type={}, _Hash=_Hash(), _Pred=_Pred(), _Allocator=_Allocator()) -> unordered_multimap< _Key, _Tp, _Hash, _Pred, _Allocator >
 
│ │ │

Detailed Description

│ │ │ -

This is an internal header file, included by other library headers. Do not attempt to use it directly. Instead, include <utility>.

│ │ │ -

This file contains the parts of <utility> needed by other headers, so they don't need to include the whole of <utility>.

│ │ │ +

This is an internal header file, included by other library headers. Do not attempt to use it directly. Instead, include <unordered_map>.

│ │ │ │ │ │ -

Definition in file utility.h.

│ │ │ +

Definition in file unordered_map.h.

│ │ │

Macro Definition Documentation

│ │ │ - │ │ │ -

◆ __cpp_lib_integer_sequence

│ │ │ - │ │ │ -
│ │ │ -
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
#define __cpp_lib_integer_sequence
│ │ │ -
│ │ │ - │ │ │ -

Definition at line 160 of file utility.h.

│ │ │ - │ │ │ -
│ │ │ -
│ │ │ - │ │ │ -

◆ __cpp_lib_tuple_element_t

│ │ │ + │ │ │ +

◆ __cpp_lib_unordered_map_try_emplace

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │ │ │ │ - │ │ │ + │ │ │ │ │ │
#define __cpp_lib_tuple_element_t#define __cpp_lib_unordered_map_try_emplace
│ │ │
│ │ │ │ │ │ -

Definition at line 132 of file utility.h.

│ │ │ +

Definition at line 448 of file unordered_map.h.

│ │ │ │ │ │
│ │ │
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,82 +1,203 @@ │ │ │ │ libstdc++ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _M_a_c_r_o_s | _T_y_p_e_d_e_f_s | _F_u_n_c_t_i_o_n_s | _V_a_r_i_a_b_l_e_s │ │ │ │ -utility.h File Reference │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _M_a_c_r_o_s | _T_y_p_e_d_e_f_s | _F_u_n_c_t_i_o_n_s │ │ │ │ +unordered_map.h File Reference │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ CCllaasssseess │ │ │ │ -struct   _s_t_d_:_:_i_n_t_e_g_e_r___s_e_q_u_e_n_c_e_<_ ___T_p_,_ ___I_d_x_ _> │ │ │ │ +class   _s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_<_ ___K_e_y_,_ ___T_p_,_ ___H_a_s_h_,_ ___P_r_e_d_,_ ___A_l_l_o_c_ _> │ │ │ │ +  │ │ │ │ +class   _s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_<_ ___K_e_y_,_ ___T_p_,_ ___H_a_s_h_,_ ___P_r_e_d_,_ ___A_l_l_o_c_ _> │ │ │ │   │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _s_t_d │ │ │ │   │ │ │ │ MMaaccrrooss │ │ │ │ -#define  _____c_p_p___l_i_b___i_n_t_e_g_e_r___s_e_q_u_e_n_c_e │ │ │ │ -  │ │ │ │ -#define  _____c_p_p___l_i_b___t_u_p_l_e___e_l_e_m_e_n_t___t │ │ │ │ +#define  _____c_p_p___l_i_b___u_n_o_r_d_e_r_e_d___m_a_p___t_r_y___e_m_p_l_a_c_e │ │ │ │   │ │ │ │ TTyyppeeddeeffss │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e _Up = typename remove_cv<_Tp>::type, _t_y_p_e_n_a_m_e │ │ │ │ -= typename enable_if::value>::type, size_t = │ │ │ │ -tuple_size<_Tp>::value> │ │ │ │ -_u_s_i_n_g  _s_t_d_:_:_____e_n_a_b_l_e___i_f___h_a_s___t_u_p_l_e___s_i_z_e = _Tp │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ -_u_s_i_n_g  _s_t_d_:_:_____i_s___i_n___p_l_a_c_e___t_y_p_e = _b_o_o_l___c_o_n_s_t_a_n_t< __is_in_place_type_v< _Tp > > │ │ │ │ -  │ │ │ │ -template │ │ │ │ -_u_s_i_n_g  _s_t_d_:_:_____t_u_p_l_e___e_l_e_m_e_n_t___t = _t_y_p_e_n_a_m_e _t_u_p_l_e___e_l_e_m_e_n_t< __i, _Tp >::type │ │ │ │ -  │ │ │ │ -template │ │ │ │ -_u_s_i_n_g  _s_t_d_:_:_i_n_d_e_x___s_e_q_u_e_n_c_e = _i_n_t_e_g_e_r___s_e_q_u_e_n_c_e< size_t, _Idx... > │ │ │ │ -  │ │ │ │ -template │ │ │ │ -_u_s_i_n_g  _s_t_d_:_:_i_n_d_e_x___s_e_q_u_e_n_c_e___f_o_r = _m_a_k_e___i_n_d_e_x___s_e_q_u_e_n_c_e< sizeof...(___T_y_p_e_s)> │ │ │ │ -  │ │ │ │ -template │ │ │ │ -_u_s_i_n_g  _s_t_d_:_:_m_a_k_e___i_n_d_e_x___s_e_q_u_e_n_c_e = _m_a_k_e___i_n_t_e_g_e_r___s_e_q_u_e_n_c_e< size_t, ___N_u_m > │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _Tp _Num> │ │ │ │ -_u_s_i_n_g  _s_t_d_:_:_m_a_k_e___i_n_t_e_g_e_r___s_e_q_u_e_n_c_e = _____m_a_k_e___i_n_t_e_g_e_r___s_e_q< _i_n_t_e_g_e_r___s_e_q_u_e_n_c_e, _Tp, │ │ │ │ - ___N_u_m > │ │ │ │ -  │ │ │ │ -template │ │ │ │ -_u_s_i_n_g  _s_t_d_:_:_t_u_p_l_e___e_l_e_m_e_n_t___t = _t_y_p_e_n_a_m_e _t_u_p_l_e___e_l_e_m_e_n_t< __i, _Tp >::type │ │ │ │ +template<_t_y_p_e_n_a_m_e ___K_e_y , _t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___H_a_s_h = hash<_Key>, _t_y_p_e_n_a_m_e │ │ │ │ +___P_r_e_d = std::equal_to<_Key>, _t_y_p_e_n_a_m_e _Alloc = std::allocator >, _t_y_p_e_n_a_m_e ___T_r = __umap_traits<__cache_default<_Key, _Hash>:: │ │ │ │ +value>> │ │ │ │ +_u_s_i_n_g  _s_t_d_:_:_____u_m_a_p___h_a_s_h_t_a_b_l_e = _Hashtable< ___K_e_y, _s_t_d_:_:_p_a_i_r< const ___K_e_y, _Tp >, │ │ │ │ + _Alloc, __detail::_Select1st, ___P_r_e_d, ___H_a_s_h, __detail:: │ │ │ │ + _Mod_range_hashing, __detail::_Default_ranged_hash, __detail:: │ │ │ │ + _Prime_rehash_policy, ___T_r > │ │ │ │ +  │ │ │ │ +template │ │ │ │ +_u_s_i_n_g  _s_t_d_:_:_____u_m_a_p___t_r_a_i_t_s = __detail::_Hashtable_traits< ___C_a_c_h_e, _f_a_l_s_e, _t_r_u_e > │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___K_e_y , _t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___H_a_s_h = hash<_Key>, _t_y_p_e_n_a_m_e │ │ │ │ +___P_r_e_d = std::equal_to<_Key>, _t_y_p_e_n_a_m_e _Alloc = std::allocator >, _t_y_p_e_n_a_m_e ___T_r = __ummap_traits<__cache_default<_Key, _Hash>:: │ │ │ │ +value>> │ │ │ │ +_u_s_i_n_g  _s_t_d_:_:_____u_m_m_a_p___h_a_s_h_t_a_b_l_e = _Hashtable< ___K_e_y, _s_t_d_:_:_p_a_i_r< const ___K_e_y, _Tp >, │ │ │ │ + _Alloc, __detail::_Select1st, ___P_r_e_d, ___H_a_s_h, __detail:: │ │ │ │ + _Mod_range_hashing, __detail::_Default_ranged_hash, __detail:: │ │ │ │ + _Prime_rehash_policy, ___T_r > │ │ │ │ +  │ │ │ │ +template │ │ │ │ +_u_s_i_n_g  _s_t_d_:_:_____u_m_m_a_p___t_r_a_i_t_s = __detail::_Hashtable_traits< ___C_a_c_h_e, _f_a_l_s_e, _f_a_l_s_e │ │ │ │ + > │ │ │ │   │ │ │ │ FFuunnccttiioonnss │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , typename... _Types> │ │ │ │ -constexpr size_t  _s_t_d_:_:_____f_i_n_d___u_n_i_q___t_y_p_e___i_n___p_a_c_k () │ │ │ │ -  │ │ │ │ -VVaarriiaabblleess │ │ │ │ -template<_t_y_p_e_n_a_m_e > │ │ │ │ - constexpr bool  _s_t_d_:_:_____i_s___i_n___p_l_a_c_e___t_y_p_e___v │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - constexpr bool  _s_t_d_:_:_____i_s___i_n___p_l_a_c_e___t_y_p_e___v_<_ _i_n___p_l_a_c_e___t_y_p_e___t_< │ │ │ │ - ___T_p_ _>_ _> │ │ │ │ -  │ │ │ │ - constexpr in_place_t  _s_t_d_:_:_i_n___p_l_a_c_e │ │ │ │ -  │ │ │ │ -template │ │ │ │ -constexpr in_place_index_t< ___I_d_x >  _s_t_d_:_:_i_n___p_l_a_c_e___i_n_d_e_x │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - constexpr in_place_type_t< _Tp >  _s_t_d_:_:_i_n___p_l_a_c_e___t_y_p_e │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - constexpr size_t  _s_t_d_:_:_t_u_p_l_e___s_i_z_e___v │ │ │ │ +template<_c_l_a_s_s ___K_e_y , _c_l_a_s_s _Tp , _c_l_a_s_s ___H_a_s_h , _c_l_a_s_s ___P_r_e_d , _c_l_a_s_s _Alloc > │ │ │ │ +bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_=_= (const _u_n_o_r_d_e_r_e_d___m_a_p< ___K_e_y, _Tp, ___H_a_s_h, ___P_r_e_d, _Alloc > │ │ │ │ + &__x, const _u_n_o_r_d_e_r_e_d___m_a_p< ___K_e_y, _Tp, ___H_a_s_h, ___P_r_e_d, _Alloc > &__y) │ │ │ │ +  │ │ │ │ +template<_c_l_a_s_s ___K_e_y , _c_l_a_s_s _Tp , _c_l_a_s_s ___H_a_s_h , _c_l_a_s_s ___P_r_e_d , _c_l_a_s_s _Alloc > │ │ │ │ +bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_=_= (const _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p< ___K_e_y, _Tp, ___H_a_s_h, ___P_r_e_d, │ │ │ │ + _Alloc > &__x, const _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p< ___K_e_y, _Tp, ___H_a_s_h, ___P_r_e_d, _Alloc │ │ │ │ + > &__y) │ │ │ │ +  │ │ │ │ +template<_c_l_a_s_s ___K_e_y , _c_l_a_s_s _Tp , _c_l_a_s_s ___H_a_s_h , _c_l_a_s_s ___P_r_e_d , _c_l_a_s_s _Alloc > │ │ │ │ +_v_o_i_d  _s_t_d_:_:_s_w_a_p (_u_n_o_r_d_e_r_e_d___m_a_p< ___K_e_y, _Tp, ___H_a_s_h, ___P_r_e_d, _Alloc > &__x, │ │ │ │ + _u_n_o_r_d_e_r_e_d___m_a_p< ___K_e_y, _Tp, ___H_a_s_h, ___P_r_e_d, _Alloc > &__y) noexcept(noexcept │ │ │ │ + (__x.swap(__y))) │ │ │ │ +  │ │ │ │ +template<_c_l_a_s_s ___K_e_y , _c_l_a_s_s _Tp , _c_l_a_s_s ___H_a_s_h , _c_l_a_s_s ___P_r_e_d , _c_l_a_s_s _Alloc > │ │ │ │ +_v_o_i_d  _s_t_d_:_:_s_w_a_p (_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p< ___K_e_y, _Tp, ___H_a_s_h, ___P_r_e_d, _Alloc > &__x, │ │ │ │ + _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p< ___K_e_y, _Tp, ___H_a_s_h, ___P_r_e_d, _Alloc > &__y) noexcept │ │ │ │ + (noexcept(__x.swap(__y))) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___I_n_p_u_t_I_t_e_r_a_t_o_r , _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r , _t_y_p_e_n_a_m_e = │ │ │ │ +_RequireInputIter<_InputIterator>, _t_y_p_e_n_a_m_e = _RequireAllocator<_Allocator>> │ │ │ │ +   ssttdd::::uunnoorrddeerreedd__mmaapp (___I_n_p_u_t_I_t_e_r_a_t_o_r, ___I_n_p_u_t_I_t_e_r_a_t_o_r, ___A_l_l_o_c_a_t_o_r) - │ │ │ │ + > _u_n_o_r_d_e_r_e_d___m_a_p< _____i_t_e_r___k_e_y___t< ___I_n_p_u_t_I_t_e_r_a_t_o_r >, __iter_val_t< │ │ │ │ + ___I_n_p_u_t_I_t_e_r_a_t_o_r >, _h_a_s_h< _____i_t_e_r___k_e_y___t< ___I_n_p_u_t_I_t_e_r_a_t_o_r > >, _e_q_u_a_l___t_o< │ │ │ │ + _____i_t_e_r___k_e_y___t< ___I_n_p_u_t_I_t_e_r_a_t_o_r > >, ___A_l_l_o_c_a_t_o_r > │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___I_n_p_u_t_I_t_e_r_a_t_o_r , _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r , _t_y_p_e_n_a_m_e = │ │ │ │ +_RequireInputIter<_InputIterator>, _t_y_p_e_n_a_m_e = _RequireAllocator<_Allocator>> │ │ │ │ +   ssttdd::::uunnoorrddeerreedd__mmaapp (___I_n_p_u_t_I_t_e_r_a_t_o_r, ___I_n_p_u_t_I_t_e_r_a_t_o_r, _t_y_p_e_n_a_m_e │ │ │ │ + _u_n_o_r_d_e_r_e_d___m_a_p< int, int >::size_type, ___A_l_l_o_c_a_t_o_r) -> _u_n_o_r_d_e_r_e_d___m_a_p< │ │ │ │ + _____i_t_e_r___k_e_y___t< ___I_n_p_u_t_I_t_e_r_a_t_o_r >, __iter_val_t< ___I_n_p_u_t_I_t_e_r_a_t_o_r >, _h_a_s_h< │ │ │ │ + _____i_t_e_r___k_e_y___t< ___I_n_p_u_t_I_t_e_r_a_t_o_r > >, _e_q_u_a_l___t_o< _____i_t_e_r___k_e_y___t< ___I_n_p_u_t_I_t_e_r_a_t_o_r │ │ │ │ + > >, ___A_l_l_o_c_a_t_o_r > │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___I_n_p_u_t_I_t_e_r_a_t_o_r , _t_y_p_e_n_a_m_e ___H_a_s_h , _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r , │ │ │ │ +_t_y_p_e_n_a_m_e = _RequireInputIter<_InputIterator>, _t_y_p_e_n_a_m_e = │ │ │ │ +_RequireNotAllocatorOrIntegral<_Hash>, _t_y_p_e_n_a_m_e = │ │ │ │ +_RequireAllocator<_Allocator>> │ │ │ │ +   ssttdd::::uunnoorrddeerreedd__mmaapp (___I_n_p_u_t_I_t_e_r_a_t_o_r, ___I_n_p_u_t_I_t_e_r_a_t_o_r, _t_y_p_e_n_a_m_e │ │ │ │ + _u_n_o_r_d_e_r_e_d___m_a_p< int, int >::size_type, ___H_a_s_h, ___A_l_l_o_c_a_t_o_r) - │ │ │ │ + > _u_n_o_r_d_e_r_e_d___m_a_p< _____i_t_e_r___k_e_y___t< ___I_n_p_u_t_I_t_e_r_a_t_o_r >, __iter_val_t< │ │ │ │ + ___I_n_p_u_t_I_t_e_r_a_t_o_r >, ___H_a_s_h, _e_q_u_a_l___t_o< _____i_t_e_r___k_e_y___t< ___I_n_p_u_t_I_t_e_r_a_t_o_r > >, │ │ │ │ + ___A_l_l_o_c_a_t_o_r > │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___I_n_p_u_t_I_t_e_r_a_t_o_r , _t_y_p_e_n_a_m_e ___H_a_s_h = │ │ │ │ +hash<__iter_key_t<_InputIterator>>, _t_y_p_e_n_a_m_e ___P_r_e_d = │ │ │ │ +equal_to<__iter_key_t<_InputIterator>>, _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r = │ │ │ │ +allocator<__iter_to_alloc_t<_InputIterator>>, _t_y_p_e_n_a_m_e = │ │ │ │ +_RequireInputIter<_InputIterator>, _t_y_p_e_n_a_m_e = │ │ │ │ +_RequireNotAllocatorOrIntegral<_Hash>, _t_y_p_e_n_a_m_e = _RequireNotAllocator<_Pred>, │ │ │ │ +_t_y_p_e_n_a_m_e = _RequireAllocator<_Allocator>> │ │ │ │ +   ssttdd::::uunnoorrddeerreedd__mmaapp (___I_n_p_u_t_I_t_e_r_a_t_o_r, ___I_n_p_u_t_I_t_e_r_a_t_o_r, _t_y_p_e_n_a_m_e │ │ │ │ + _u_n_o_r_d_e_r_e_d___m_a_p< int, int >::size_type={}, ___H_a_s_h=___H_a_s_h(), ___P_r_e_d=___P_r_e_d(), │ │ │ │ + ___A_l_l_o_c_a_t_o_r=___A_l_l_o_c_a_t_o_r()) -> _u_n_o_r_d_e_r_e_d___m_a_p< _____i_t_e_r___k_e_y___t< ___I_n_p_u_t_I_t_e_r_a_t_o_r │ │ │ │ + >, __iter_val_t< ___I_n_p_u_t_I_t_e_r_a_t_o_r >, ___H_a_s_h, ___P_r_e_d, ___A_l_l_o_c_a_t_o_r > │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___K_e_y , _t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r , _t_y_p_e_n_a_m_e = │ │ │ │ +_RequireAllocator<_Allocator>> │ │ │ │ +   ssttdd::::uunnoorrddeerreedd__mmaapp (_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t< _p_a_i_r< ___K_e_y, _Tp > >, ___A_l_l_o_c_a_t_o_r) - │ │ │ │ + > _u_n_o_r_d_e_r_e_d___m_a_p< ___K_e_y, _Tp, _h_a_s_h< ___K_e_y >, _e_q_u_a_l___t_o< ___K_e_y >, ___A_l_l_o_c_a_t_o_r > │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___K_e_y , _t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r , _t_y_p_e_n_a_m_e = │ │ │ │ +_RequireAllocator<_Allocator>> │ │ │ │ +   ssttdd::::uunnoorrddeerreedd__mmaapp (_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t< _p_a_i_r< ___K_e_y, _Tp > >, _t_y_p_e_n_a_m_e │ │ │ │ + _u_n_o_r_d_e_r_e_d___m_a_p< int, int >::size_type, ___A_l_l_o_c_a_t_o_r) -> _u_n_o_r_d_e_r_e_d___m_a_p< ___K_e_y, │ │ │ │ + _Tp, _h_a_s_h< ___K_e_y >, _e_q_u_a_l___t_o< ___K_e_y >, ___A_l_l_o_c_a_t_o_r > │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___K_e_y , _t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___H_a_s_h , _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r , │ │ │ │ +_t_y_p_e_n_a_m_e = _RequireNotAllocatorOrIntegral<_Hash>, _t_y_p_e_n_a_m_e = │ │ │ │ +_RequireAllocator<_Allocator>> │ │ │ │ +   ssttdd::::uunnoorrddeerreedd__mmaapp (_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t< _p_a_i_r< ___K_e_y, _Tp > >, _t_y_p_e_n_a_m_e │ │ │ │ + _u_n_o_r_d_e_r_e_d___m_a_p< int, int >::size_type, ___H_a_s_h, ___A_l_l_o_c_a_t_o_r) - │ │ │ │ + > _u_n_o_r_d_e_r_e_d___m_a_p< ___K_e_y, _Tp, ___H_a_s_h, _e_q_u_a_l___t_o< ___K_e_y >, ___A_l_l_o_c_a_t_o_r > │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___K_e_y , _t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___H_a_s_h = hash<_Key>, _t_y_p_e_n_a_m_e │ │ │ │ +___P_r_e_d = equal_to<_Key>, _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r = allocator>, │ │ │ │ +_t_y_p_e_n_a_m_e = _RequireNotAllocatorOrIntegral<_Hash>, _t_y_p_e_n_a_m_e = │ │ │ │ +_RequireNotAllocator<_Pred>, _t_y_p_e_n_a_m_e = _RequireAllocator<_Allocator>> │ │ │ │ +   ssttdd::::uunnoorrddeerreedd__mmaapp (_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t< _p_a_i_r< ___K_e_y, _Tp > >, _t_y_p_e_n_a_m_e │ │ │ │ + _u_n_o_r_d_e_r_e_d___m_a_p< int, int >::size_type={}, ___H_a_s_h=___H_a_s_h(), ___P_r_e_d=___P_r_e_d(), │ │ │ │ + ___A_l_l_o_c_a_t_o_r=___A_l_l_o_c_a_t_o_r()) -> _u_n_o_r_d_e_r_e_d___m_a_p< ___K_e_y, _Tp, ___H_a_s_h, ___P_r_e_d, │ │ │ │ + ___A_l_l_o_c_a_t_o_r > │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___I_n_p_u_t_I_t_e_r_a_t_o_r , _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r , _t_y_p_e_n_a_m_e = │ │ │ │ +_RequireInputIter<_InputIterator>, _t_y_p_e_n_a_m_e = _RequireAllocator<_Allocator>> │ │ │ │ +   ssttdd::::uunnoorrddeerreedd__mmuullttiimmaapp (___I_n_p_u_t_I_t_e_r_a_t_o_r, ___I_n_p_u_t_I_t_e_r_a_t_o_r, ___A_l_l_o_c_a_t_o_r) - │ │ │ │ + > _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p< _____i_t_e_r___k_e_y___t< ___I_n_p_u_t_I_t_e_r_a_t_o_r >, __iter_val_t< │ │ │ │ + ___I_n_p_u_t_I_t_e_r_a_t_o_r >, _h_a_s_h< _____i_t_e_r___k_e_y___t< ___I_n_p_u_t_I_t_e_r_a_t_o_r > >, _e_q_u_a_l___t_o< │ │ │ │ + _____i_t_e_r___k_e_y___t< ___I_n_p_u_t_I_t_e_r_a_t_o_r > >, ___A_l_l_o_c_a_t_o_r > │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___I_n_p_u_t_I_t_e_r_a_t_o_r , _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r , _t_y_p_e_n_a_m_e = │ │ │ │ +_RequireInputIter<_InputIterator>, _t_y_p_e_n_a_m_e = _RequireAllocator<_Allocator>> │ │ │ │ +   ssttdd::::uunnoorrddeerreedd__mmuullttiimmaapp (___I_n_p_u_t_I_t_e_r_a_t_o_r, ___I_n_p_u_t_I_t_e_r_a_t_o_r, │ │ │ │ + _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p< int, int >::size_type, ___A_l_l_o_c_a_t_o_r) - │ │ │ │ + > _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p< _____i_t_e_r___k_e_y___t< ___I_n_p_u_t_I_t_e_r_a_t_o_r >, __iter_val_t< │ │ │ │ + ___I_n_p_u_t_I_t_e_r_a_t_o_r >, _h_a_s_h< _____i_t_e_r___k_e_y___t< ___I_n_p_u_t_I_t_e_r_a_t_o_r > >, _e_q_u_a_l___t_o< │ │ │ │ + _____i_t_e_r___k_e_y___t< ___I_n_p_u_t_I_t_e_r_a_t_o_r > >, ___A_l_l_o_c_a_t_o_r > │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___I_n_p_u_t_I_t_e_r_a_t_o_r , _t_y_p_e_n_a_m_e ___H_a_s_h , _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r , │ │ │ │ +_t_y_p_e_n_a_m_e = _RequireInputIter<_InputIterator>, _t_y_p_e_n_a_m_e = │ │ │ │ +_RequireNotAllocatorOrIntegral<_Hash>, _t_y_p_e_n_a_m_e = │ │ │ │ +_RequireAllocator<_Allocator>> │ │ │ │ +   ssttdd::::uunnoorrddeerreedd__mmuullttiimmaapp (___I_n_p_u_t_I_t_e_r_a_t_o_r, ___I_n_p_u_t_I_t_e_r_a_t_o_r, │ │ │ │ + _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p< int, int >::size_type, ___H_a_s_h, ___A_l_l_o_c_a_t_o_r) - │ │ │ │ + > _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p< _____i_t_e_r___k_e_y___t< ___I_n_p_u_t_I_t_e_r_a_t_o_r >, __iter_val_t< │ │ │ │ + ___I_n_p_u_t_I_t_e_r_a_t_o_r >, ___H_a_s_h, _e_q_u_a_l___t_o< _____i_t_e_r___k_e_y___t< ___I_n_p_u_t_I_t_e_r_a_t_o_r > >, │ │ │ │ + ___A_l_l_o_c_a_t_o_r > │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___I_n_p_u_t_I_t_e_r_a_t_o_r , _t_y_p_e_n_a_m_e ___H_a_s_h = │ │ │ │ +hash<__iter_key_t<_InputIterator>>, _t_y_p_e_n_a_m_e ___P_r_e_d = │ │ │ │ +equal_to<__iter_key_t<_InputIterator>>, _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r = │ │ │ │ +allocator<__iter_to_alloc_t<_InputIterator>>, _t_y_p_e_n_a_m_e = │ │ │ │ +_RequireInputIter<_InputIterator>, _t_y_p_e_n_a_m_e = │ │ │ │ +_RequireNotAllocatorOrIntegral<_Hash>, _t_y_p_e_n_a_m_e = _RequireNotAllocator<_Pred>, │ │ │ │ +_t_y_p_e_n_a_m_e = _RequireAllocator<_Allocator>> │ │ │ │ +   ssttdd::::uunnoorrddeerreedd__mmuullttiimmaapp (___I_n_p_u_t_I_t_e_r_a_t_o_r, ___I_n_p_u_t_I_t_e_r_a_t_o_r, │ │ │ │ + _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p< int, int >::size_type={}, ___H_a_s_h=___H_a_s_h(), ___P_r_e_d=___P_r_e_d │ │ │ │ + (), ___A_l_l_o_c_a_t_o_r=___A_l_l_o_c_a_t_o_r()) -> _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p< _____i_t_e_r___k_e_y___t< │ │ │ │ + ___I_n_p_u_t_I_t_e_r_a_t_o_r >, __iter_val_t< ___I_n_p_u_t_I_t_e_r_a_t_o_r >, ___H_a_s_h, ___P_r_e_d, │ │ │ │ + ___A_l_l_o_c_a_t_o_r > │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___K_e_y , _t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r , _t_y_p_e_n_a_m_e = │ │ │ │ +_RequireAllocator<_Allocator>> │ │ │ │ +   ssttdd::::uunnoorrddeerreedd__mmuullttiimmaapp (_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t< _p_a_i_r< ___K_e_y, _Tp > >, │ │ │ │ + ___A_l_l_o_c_a_t_o_r) -> _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p< ___K_e_y, _Tp, _h_a_s_h< ___K_e_y >, _e_q_u_a_l___t_o< │ │ │ │ + ___K_e_y >, ___A_l_l_o_c_a_t_o_r > │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___K_e_y , _t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r , _t_y_p_e_n_a_m_e = │ │ │ │ +_RequireAllocator<_Allocator>> │ │ │ │ +   ssttdd::::uunnoorrddeerreedd__mmuullttiimmaapp (_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t< _p_a_i_r< ___K_e_y, _Tp > >, │ │ │ │ + _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p< int, int >::size_type, ___A_l_l_o_c_a_t_o_r) - │ │ │ │ + > _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p< ___K_e_y, _Tp, _h_a_s_h< ___K_e_y >, _e_q_u_a_l___t_o< ___K_e_y >, │ │ │ │ + ___A_l_l_o_c_a_t_o_r > │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___K_e_y , _t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___H_a_s_h , _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r , │ │ │ │ +_t_y_p_e_n_a_m_e = _RequireNotAllocatorOrIntegral<_Hash>, _t_y_p_e_n_a_m_e = │ │ │ │ +_RequireAllocator<_Allocator>> │ │ │ │ +   ssttdd::::uunnoorrddeerreedd__mmuullttiimmaapp (_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t< _p_a_i_r< ___K_e_y, _Tp > >, │ │ │ │ + _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p< int, int >::size_type, ___H_a_s_h, ___A_l_l_o_c_a_t_o_r) - │ │ │ │ + > _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p< ___K_e_y, _Tp, ___H_a_s_h, _e_q_u_a_l___t_o< ___K_e_y >, ___A_l_l_o_c_a_t_o_r > │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___K_e_y , _t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___H_a_s_h = hash<_Key>, _t_y_p_e_n_a_m_e │ │ │ │ +___P_r_e_d = equal_to<_Key>, _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r = allocator>, │ │ │ │ +_t_y_p_e_n_a_m_e = _RequireNotAllocatorOrIntegral<_Hash>, _t_y_p_e_n_a_m_e = │ │ │ │ +_RequireNotAllocator<_Pred>, _t_y_p_e_n_a_m_e = _RequireAllocator<_Allocator>> │ │ │ │ +   ssttdd::::uunnoorrddeerreedd__mmuullttiimmaapp (_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t< _p_a_i_r< ___K_e_y, _Tp > >, │ │ │ │ + _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p< int, int >::size_type={}, ___H_a_s_h=___H_a_s_h(), ___P_r_e_d=___P_r_e_d │ │ │ │ + (), ___A_l_l_o_c_a_t_o_r=___A_l_l_o_c_a_t_o_r()) -> _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p< ___K_e_y, _Tp, ___H_a_s_h, │ │ │ │ + ___P_r_e_d, ___A_l_l_o_c_a_t_o_r > │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ This is an internal header file, included by other library headers. Do not │ │ │ │ -attempt to use it directly. Instead, include . │ │ │ │ -This file contains the parts of needed by other headers, so they │ │ │ │ -don't need to include the whole of . │ │ │ │ -Definition in file _u_t_i_l_i_t_y_._h. │ │ │ │ +attempt to use it directly. Instead, include . │ │ │ │ +Definition in file _u_n_o_r_d_e_r_e_d___m_a_p_._h. │ │ │ │ ********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ -********** _?◆_? ____ccpppp__lliibb__iinntteeggeerr__sseeqquueennccee ********** │ │ │ │ -#define __cpp_lib_integer_sequence │ │ │ │ -Definition at line _1_6_0 of file _u_t_i_l_i_t_y_._h. │ │ │ │ -********** _?◆_? ____ccpppp__lliibb__ttuuppllee__eelleemmeenntt__tt ********** │ │ │ │ -#define __cpp_lib_tuple_element_t │ │ │ │ -Definition at line _1_3_2 of file _u_t_i_l_i_t_y_._h. │ │ │ │ +********** _?◆_? ____ccpppp__lliibb__uunnoorrddeerreedd__mmaapp__ttrryy__eemmppllaaccee ********** │ │ │ │ +#define __cpp_lib_unordered_map_try_emplace │ │ │ │ +Definition at line _4_4_8 of file _u_n_o_r_d_e_r_e_d___m_a_p_._h. │ │ │ │ * _b_i_t_s │ │ │ │ - * _u_t_i_l_i_t_y_._h │ │ │ │ + * _u_n_o_r_d_e_r_e_d___m_a_p_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-12-base/libstdc++/user/a00365.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,7 +1,4 @@ │ │ │ │ var a00365 = [ │ │ │ │ - ["std::integer_sequence< _Tp, _Idx >", "a08696.html", null], │ │ │ │ - ["index_sequence", "a00365.html#acdfada06a9fb47abbf52c264b95e689e", null], │ │ │ │ - ["index_sequence_for", "a00365.html#af540abd32f95a08e48ea6ca00a5a8ad3", null], │ │ │ │ - ["make_index_sequence", "a00365.html#a52f9da82a634cff032d6df672cd9a25d", null], │ │ │ │ - ["make_integer_sequence", "a00365.html#a9d875ee92145b28db9d8332b80ba2625", null] │ │ │ │ + ["__umap_traits", "a00365.html#a84b02064179c0ef21d0189a7bf15803b", null], │ │ │ │ + ["__ummap_traits", "a00365.html#a1a55f2ace43a0a61a859367d227d245f", null] │ │ │ │ ]; │ │ ├── ./usr/share/doc/gcc-12-base/libstdc++/user/a00365_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: utility.h Source File │ │ │ +libstdc++: unordered_map.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -45,20 +45,20 @@ │ │ │ │ │ │
│ │ │
│ │ │ -
utility.h
│ │ │ +
unordered_map.h
│ │ │
│ │ │
│ │ │ -Go to the documentation of this file.
1// Utilities used throughout the library -*- C++ -*-
│ │ │ +Go to the documentation of this file.
1// unordered_map implementation -*- C++ -*-
│ │ │
2
│ │ │ -
3// Copyright (C) 2004-2022 Free Software Foundation, Inc.
│ │ │ +
3// Copyright (C) 2010-2022 Free Software Foundation, Inc.
│ │ │
4//
│ │ │
5// This file is part of the GNU ISO C++ Library. This library is free
│ │ │
6// software; you can redistribute it and/or modify it under the
│ │ │
7// terms of the GNU General Public License as published by the
│ │ │
8// Free Software Foundation; either version 3, or (at your option)
│ │ │
9// any later version.
│ │ │
10
│ │ │ @@ -72,276 +72,2664 @@ │ │ │
18// 3.1, as published by the Free Software Foundation.
│ │ │
19
│ │ │
20// You should have received a copy of the GNU General Public License and
│ │ │
21// a copy of the GCC Runtime Library Exception along with this program;
│ │ │
22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
│ │ │
23// <http://www.gnu.org/licenses/>.
│ │ │
24
│ │ │ -
25/** @file include/bits/utility.h
│ │ │ +
25/** @file bits/unordered_map.h
│ │ │
26 * This is an internal header file, included by other library headers.
│ │ │ -
27 * Do not attempt to use it directly. @headername{utility}
│ │ │ -
28 *
│ │ │ -
29 * This file contains the parts of `<utility>` needed by other headers,
│ │ │ -
30 * so they don't need to include the whole of `<utility>`.
│ │ │ -
31 */
│ │ │ +
27 * Do not attempt to use it directly. @headername{unordered_map}
│ │ │ +
28 */
│ │ │ +
29
│ │ │ +
30#ifndef _UNORDERED_MAP_H
│ │ │ +
31#define _UNORDERED_MAP_H
│ │ │
32
│ │ │ -
33#ifndef _GLIBCXX_UTILITY_H
│ │ │ -
34#define _GLIBCXX_UTILITY_H 1
│ │ │ -
35
│ │ │ -
36#pragma GCC system_header
│ │ │ -
37
│ │ │ -
38#if __cplusplus >= 201103L
│ │ │ -
39
│ │ │ -
40#include <type_traits>
│ │ │ -
41#include <bits/move.h>
│ │ │ -
42
│ │ │ -
43namespace std _GLIBCXX_VISIBILITY(default)
│ │ │ -
44{
│ │ │ -
45_GLIBCXX_BEGIN_NAMESPACE_VERSION
│ │ │ -
46
│ │ │ -
47 /// Finds the size of a given tuple type.
│ │ │ -
48 template<typename _Tp>
│ │ │ -
49 struct tuple_size;
│ │ │ -
50
│ │ │ -
51 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ -
52 // 2313. tuple_size should always derive from integral_constant<size_t, N>
│ │ │ -
53 // 2770. tuple_size<const T> specialization is not SFINAE compatible
│ │ │ -
54
│ │ │ -
55 template<typename _Tp,
│ │ │ -
56 typename _Up = typename remove_cv<_Tp>::type,
│ │ │ -
57 typename = typename enable_if<is_same<_Tp, _Up>::value>::type,
│ │ │ - │ │ │ -
59 using __enable_if_has_tuple_size = _Tp;
│ │ │ -
60
│ │ │ -
61 template<typename _Tp>
│ │ │ -
62 struct tuple_size<const __enable_if_has_tuple_size<_Tp>>
│ │ │ -
63 : public tuple_size<_Tp> { };
│ │ │ -
64
│ │ │ -
65 template<typename _Tp>
│ │ │ -
66 struct tuple_size<volatile __enable_if_has_tuple_size<_Tp>>
│ │ │ -
67 : public tuple_size<_Tp> { };
│ │ │ -
68
│ │ │ -
69 template<typename _Tp>
│ │ │ -
70 struct tuple_size<const volatile __enable_if_has_tuple_size<_Tp>>
│ │ │ -
71 : public tuple_size<_Tp> { };
│ │ │ -
72
│ │ │ -
73#if __cplusplus >= 201703L
│ │ │ -
74 template<typename _Tp>
│ │ │ -
75 inline constexpr size_t tuple_size_v = tuple_size<_Tp>::value;
│ │ │ -
76#endif
│ │ │ -
77
│ │ │ -
78 /// Gives the type of the ith element of a given tuple type.
│ │ │ -
79 template<size_t __i, typename _Tp>
│ │ │ - │ │ │ -
81
│ │ │ -
82 // Duplicate of C++14's tuple_element_t for internal use in C++11 mode
│ │ │ -
83 template<size_t __i, typename _Tp>
│ │ │ -
84 using __tuple_element_t = typename tuple_element<__i, _Tp>::type;
│ │ │ -
85
│ │ │ -
86 template<size_t __i, typename _Tp>
│ │ │ -
87 struct tuple_element<__i, const _Tp>
│ │ │ -
88 {
│ │ │ -
89 typedef typename add_const<__tuple_element_t<__i, _Tp>>::type type;
│ │ │ -
90 };
│ │ │ -
91
│ │ │ -
92 template<size_t __i, typename _Tp>
│ │ │ -
93 struct tuple_element<__i, volatile _Tp>
│ │ │ -
94 {
│ │ │ -
95 typedef typename add_volatile<__tuple_element_t<__i, _Tp>>::type type;
│ │ │ -
96 };
│ │ │ -
97
│ │ │ -
98 template<size_t __i, typename _Tp>
│ │ │ -
99 struct tuple_element<__i, const volatile _Tp>
│ │ │ -
100 {
│ │ │ -
101 typedef typename add_cv<__tuple_element_t<__i, _Tp>>::type type;
│ │ │ -
102 };
│ │ │ -
103
│ │ │ -
104#if __cplusplus >= 201402L
│ │ │ -
105
│ │ │ -
106 // Return the index of _Tp in _Types, if it occurs exactly once.
│ │ │ -
107 // Otherwise, return sizeof...(_Types).
│ │ │ -
108 template<typename _Tp, typename... _Types>
│ │ │ -
109 constexpr size_t
│ │ │ -
110 __find_uniq_type_in_pack()
│ │ │ -
111 {
│ │ │ -
112 constexpr size_t __sz = sizeof...(_Types);
│ │ │ -
113 constexpr bool __found[__sz] = { __is_same(_Tp, _Types) ... };
│ │ │ -
114 size_t __n = __sz;
│ │ │ -
115 for (size_t __i = 0; __i < __sz; ++__i)
│ │ │ -
116 {
│ │ │ -
117 if (__found[__i])
│ │ │ -
118 {
│ │ │ -
119 if (__n < __sz) // more than one _Tp found
│ │ │ -
120 return __sz;
│ │ │ -
121 __n = __i;
│ │ │ -
122 }
│ │ │ -
123 }
│ │ │ -
124 return __n;
│ │ │ -
125 }
│ │ │ -
126
│ │ │ -
127// The standard says this macro and alias template should be in <tuple> but we
│ │ │ -
128// define them here, to be available in <array>, <utility> and <ranges> too.
│ │ │ -
129// _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ -
130// 3378. tuple_size_v/tuple_element_t should be available when
│ │ │ -
131// tuple_size/tuple_element are
│ │ │ -
132#define __cpp_lib_tuple_element_t 201402L
│ │ │ -
133
│ │ │ -
134 template<size_t __i, typename _Tp>
│ │ │ -
135 using tuple_element_t = typename tuple_element<__i, _Tp>::type;
│ │ │ -
136#endif // C++14
│ │ │ -
137
│ │ │ -
138 // Stores a tuple of indices. Used by tuple and pair, and by bind() to
│ │ │ -
139 // extract the elements in a tuple.
│ │ │ -
140 template<size_t... _Indexes> struct _Index_tuple { };
│ │ │ -
141
│ │ │ -
142 // Builds an _Index_tuple<0, 1, 2, ..., _Num-1>.
│ │ │ -
143 template<size_t _Num>
│ │ │ -
144 struct _Build_index_tuple
│ │ │ -
145 {
│ │ │ -
146#if __has_builtin(__make_integer_seq)
│ │ │ -
147 template<typename, size_t... _Indices>
│ │ │ -
148 using _IdxTuple = _Index_tuple<_Indices...>;
│ │ │ -
149
│ │ │ -
150 // Clang defines __make_integer_seq for this purpose.
│ │ │ -
151 using __type = __make_integer_seq<_IdxTuple, size_t, _Num>;
│ │ │ -
152#else
│ │ │ -
153 // For GCC and other compilers, use __integer_pack instead.
│ │ │ -
154 using __type = _Index_tuple<__integer_pack(_Num)...>;
│ │ │ -
155#endif
│ │ │ -
156 };
│ │ │ -
157
│ │ │ -
158#if __cplusplus >= 201402L
│ │ │ -
159
│ │ │ -
160#define __cpp_lib_integer_sequence 201304L
│ │ │ -
161
│ │ │ -
162 /// Class template integer_sequence
│ │ │ -
163 template<typename _Tp, _Tp... _Idx>
│ │ │ -
│ │ │ - │ │ │ -
165 {
│ │ │ -
166#if __cplusplus >= 202002L
│ │ │ -
167 static_assert(is_integral_v<_Tp>);
│ │ │ -
168#endif
│ │ │ -
169 typedef _Tp value_type;
│ │ │ -
170 static constexpr size_t size() noexcept { return sizeof...(_Idx); }
│ │ │ -
171 };
│ │ │ -
│ │ │ -
172
│ │ │ -
173 /// Alias template make_integer_sequence
│ │ │ -
174 template<typename _Tp, _Tp _Num>
│ │ │ - │ │ │ -
176#if __has_builtin(__make_integer_seq)
│ │ │ - │ │ │ -
178#else
│ │ │ -
179 = integer_sequence<_Tp, __integer_pack(_Tp(_Num))...>;
│ │ │ -
180#endif
│ │ │ +
33namespace std _GLIBCXX_VISIBILITY(default)
│ │ │ +
34{
│ │ │ +
35_GLIBCXX_BEGIN_NAMESPACE_VERSION
│ │ │ +
36_GLIBCXX_BEGIN_NAMESPACE_CONTAINER
│ │ │ +
37
│ │ │ +
38 /// Base types for unordered_map.
│ │ │ +
39 template<bool _Cache>
│ │ │ +
40 using __umap_traits = __detail::_Hashtable_traits<_Cache, false, true>;
│ │ │ +
41
│ │ │ +
42 template<typename _Key,
│ │ │ +
43 typename _Tp,
│ │ │ +
44 typename _Hash = hash<_Key>,
│ │ │ +
45 typename _Pred = std::equal_to<_Key>,
│ │ │ + │ │ │ + │ │ │ + │ │ │ +
49 _Alloc, __detail::_Select1st,
│ │ │ +
50 _Pred, _Hash,
│ │ │ +
51 __detail::_Mod_range_hashing,
│ │ │ +
52 __detail::_Default_ranged_hash,
│ │ │ +
53 __detail::_Prime_rehash_policy, _Tr>;
│ │ │ +
54
│ │ │ +
55 /// Base types for unordered_multimap.
│ │ │ +
56 template<bool _Cache>
│ │ │ +
57 using __ummap_traits = __detail::_Hashtable_traits<_Cache, false, false>;
│ │ │ +
58
│ │ │ +
59 template<typename _Key,
│ │ │ +
60 typename _Tp,
│ │ │ +
61 typename _Hash = hash<_Key>,
│ │ │ +
62 typename _Pred = std::equal_to<_Key>,
│ │ │ + │ │ │ + │ │ │ + │ │ │ +
66 _Alloc, __detail::_Select1st,
│ │ │ +
67 _Pred, _Hash,
│ │ │ +
68 __detail::_Mod_range_hashing,
│ │ │ +
69 __detail::_Default_ranged_hash,
│ │ │ +
70 __detail::_Prime_rehash_policy, _Tr>;
│ │ │ +
71
│ │ │ +
72 template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
│ │ │ + │ │ │ +
74
│ │ │ +
75 /**
│ │ │ +
76 * @brief A standard container composed of unique keys (containing
│ │ │ +
77 * at most one of each key value) that associates values of another type
│ │ │ +
78 * with the keys.
│ │ │ +
79 *
│ │ │ +
80 * @ingroup unordered_associative_containers
│ │ │ +
81 * @headerfile unordered_map
│ │ │ +
82 * @since C++11
│ │ │ +
83 *
│ │ │ +
84 * @tparam _Key Type of key objects.
│ │ │ +
85 * @tparam _Tp Type of mapped objects.
│ │ │ +
86 * @tparam _Hash Hashing function object type, defaults to hash<_Value>.
│ │ │ +
87 * @tparam _Pred Predicate function object type, defaults
│ │ │ +
88 * to equal_to<_Value>.
│ │ │ +
89 * @tparam _Alloc Allocator type, defaults to
│ │ │ +
90 * std::allocator<std::pair<const _Key, _Tp>>.
│ │ │ +
91 *
│ │ │ +
92 * Meets the requirements of a <a href="tables.html#65">container</a>, and
│ │ │ +
93 * <a href="tables.html#xx">unordered associative container</a>
│ │ │ +
94 *
│ │ │ +
95 * The resulting value type of the container is std::pair<const _Key, _Tp>.
│ │ │ +
96 *
│ │ │ +
97 * Base is _Hashtable, dispatched at compile time via template
│ │ │ +
98 * alias __umap_hashtable.
│ │ │ +
99 */
│ │ │ +
100 template<typename _Key, typename _Tp,
│ │ │ +
101 typename _Hash = hash<_Key>,
│ │ │ +
102 typename _Pred = equal_to<_Key>,
│ │ │ +
103 typename _Alloc = allocator<std::pair<const _Key, _Tp>>>
│ │ │ +
│ │ │ + │ │ │ +
105 {
│ │ │ + │ │ │ +
107 _Hashtable _M_h;
│ │ │ +
108
│ │ │ +
109 public:
│ │ │ +
110 // typedefs:
│ │ │ +
111 ///@{
│ │ │ +
112 /// Public typedefs.
│ │ │ +
113 typedef typename _Hashtable::key_type key_type;
│ │ │ +
114 typedef typename _Hashtable::value_type value_type;
│ │ │ +
115 typedef typename _Hashtable::mapped_type mapped_type;
│ │ │ +
116 typedef typename _Hashtable::hasher hasher;
│ │ │ +
117 typedef typename _Hashtable::key_equal key_equal;
│ │ │ +
118 typedef typename _Hashtable::allocator_type allocator_type;
│ │ │ +
119 ///@}
│ │ │ +
120
│ │ │ +
121 ///@{
│ │ │ +
122 /// Iterator-related typedefs.
│ │ │ +
123 typedef typename _Hashtable::pointer pointer;
│ │ │ +
124 typedef typename _Hashtable::const_pointer const_pointer;
│ │ │ +
125 typedef typename _Hashtable::reference reference;
│ │ │ +
126 typedef typename _Hashtable::const_reference const_reference;
│ │ │ +
127 typedef typename _Hashtable::iterator iterator;
│ │ │ +
128 typedef typename _Hashtable::const_iterator const_iterator;
│ │ │ +
129 typedef typename _Hashtable::local_iterator local_iterator;
│ │ │ +
130 typedef typename _Hashtable::const_local_iterator const_local_iterator;
│ │ │ +
131 typedef typename _Hashtable::size_type size_type;
│ │ │ +
132 typedef typename _Hashtable::difference_type difference_type;
│ │ │ +
133 ///@}
│ │ │ +
134
│ │ │ +
135#if __cplusplus > 201402L
│ │ │ +
136 using node_type = typename _Hashtable::node_type;
│ │ │ +
137 using insert_return_type = typename _Hashtable::insert_return_type;
│ │ │ +
138#endif
│ │ │ +
139
│ │ │ +
140 //construct/destroy/copy
│ │ │ +
141
│ │ │ +
142 /// Default constructor.
│ │ │ +
143 unordered_map() = default;
│ │ │ +
144
│ │ │ +
145 /**
│ │ │ +
146 * @brief Default constructor creates no elements.
│ │ │ +
147 * @param __n Minimal initial number of buckets.
│ │ │ +
148 * @param __hf A hash functor.
│ │ │ +
149 * @param __eql A key equality functor.
│ │ │ +
150 * @param __a An allocator object.
│ │ │ +
151 */
│ │ │ +
152 explicit
│ │ │ +
│ │ │ + │ │ │ +
154 const hasher& __hf = hasher(),
│ │ │ +
155 const key_equal& __eql = key_equal(),
│ │ │ +
156 const allocator_type& __a = allocator_type())
│ │ │ +
157 : _M_h(__n, __hf, __eql, __a)
│ │ │ +
158 { }
│ │ │ +
│ │ │ +
159
│ │ │ +
160 /**
│ │ │ +
161 * @brief Builds an %unordered_map from a range.
│ │ │ +
162 * @param __first An input iterator.
│ │ │ +
163 * @param __last An input iterator.
│ │ │ +
164 * @param __n Minimal initial number of buckets.
│ │ │ +
165 * @param __hf A hash functor.
│ │ │ +
166 * @param __eql A key equality functor.
│ │ │ +
167 * @param __a An allocator object.
│ │ │ +
168 *
│ │ │ +
169 * Create an %unordered_map consisting of copies of the elements from
│ │ │ +
170 * [__first,__last). This is linear in N (where N is
│ │ │ +
171 * distance(__first,__last)).
│ │ │ +
172 */
│ │ │ +
173 template<typename _InputIterator>
│ │ │ +
│ │ │ + │ │ │ +
175 size_type __n = 0,
│ │ │ +
176 const hasher& __hf = hasher(),
│ │ │ +
177 const key_equal& __eql = key_equal(),
│ │ │ +
178 const allocator_type& __a = allocator_type())
│ │ │ +
179 : _M_h(__first, __last, __n, __hf, __eql, __a)
│ │ │ +
180 { }
│ │ │ +
│ │ │
181
│ │ │ -
182 /// Alias template index_sequence
│ │ │ -
183 template<size_t... _Idx>
│ │ │ - │ │ │ -
185
│ │ │ -
186 /// Alias template make_index_sequence
│ │ │ -
187 template<size_t _Num>
│ │ │ - │ │ │ -
189
│ │ │ -
190 /// Alias template index_sequence_for
│ │ │ -
191 template<typename... _Types>
│ │ │ -
192 using index_sequence_for = make_index_sequence<sizeof...(_Types)>;
│ │ │ -
193
│ │ │ -
194#if __cplusplus >= 201703L
│ │ │ -
195
│ │ │ -
196 struct in_place_t {
│ │ │ -
197 explicit in_place_t() = default;
│ │ │ -
198 };
│ │ │ -
199
│ │ │ -
200 inline constexpr in_place_t in_place{};
│ │ │ -
201
│ │ │ -
202 template<typename _Tp> struct in_place_type_t
│ │ │ -
203 {
│ │ │ -
204 explicit in_place_type_t() = default;
│ │ │ -
205 };
│ │ │ +
182 /// Copy constructor.
│ │ │ +
183 unordered_map(const unordered_map&) = default;
│ │ │ +
184
│ │ │ +
185 /// Move constructor.
│ │ │ + │ │ │ +
187
│ │ │ +
188 /**
│ │ │ +
189 * @brief Creates an %unordered_map with no elements.
│ │ │ +
190 * @param __a An allocator object.
│ │ │ +
191 */
│ │ │ +
192 explicit
│ │ │ +
│ │ │ + │ │ │ +
194 : _M_h(__a)
│ │ │ +
195 { }
│ │ │ +
│ │ │ +
196
│ │ │ +
197 /*
│ │ │ +
198 * @brief Copy constructor with allocator argument.
│ │ │ +
199 * @param __uset Input %unordered_map to copy.
│ │ │ +
200 * @param __a An allocator object.
│ │ │ +
201 */
│ │ │ + │ │ │ +
203 const allocator_type& __a)
│ │ │ +
204 : _M_h(__umap._M_h, __a)
│ │ │ +
205 { }
│ │ │
206
│ │ │ -
207 template<typename _Tp>
│ │ │ -
208 inline constexpr in_place_type_t<_Tp> in_place_type{};
│ │ │ -
209
│ │ │ -
210 template<size_t _Idx> struct in_place_index_t
│ │ │ -
211 {
│ │ │ -
212 explicit in_place_index_t() = default;
│ │ │ -
213 };
│ │ │ -
214
│ │ │ -
215 template<size_t _Idx>
│ │ │ -
216 inline constexpr in_place_index_t<_Idx> in_place_index{};
│ │ │ -
217
│ │ │ -
218 template<typename>
│ │ │ -
219 inline constexpr bool __is_in_place_type_v = false;
│ │ │ -
220
│ │ │ -
221 template<typename _Tp>
│ │ │ -
222 inline constexpr bool __is_in_place_type_v<in_place_type_t<_Tp>> = true;
│ │ │ -
223
│ │ │ -
224 template<typename _Tp>
│ │ │ -
225 using __is_in_place_type = bool_constant<__is_in_place_type_v<_Tp>>;
│ │ │ -
226
│ │ │ -
227#endif // C++17
│ │ │ -
228#endif // C++14
│ │ │ -
229
│ │ │ -
230 template<size_t _Np, typename... _Types>
│ │ │ -
231 struct _Nth_type
│ │ │ -
232 { };
│ │ │ -
233
│ │ │ -
234 template<typename _Tp0, typename... _Rest>
│ │ │ -
235 struct _Nth_type<0, _Tp0, _Rest...>
│ │ │ -
236 { using type = _Tp0; };
│ │ │ -
237
│ │ │ -
238 template<typename _Tp0, typename _Tp1, typename... _Rest>
│ │ │ -
239 struct _Nth_type<1, _Tp0, _Tp1, _Rest...>
│ │ │ -
240 { using type = _Tp1; };
│ │ │ -
241
│ │ │ -
242 template<typename _Tp0, typename _Tp1, typename _Tp2, typename... _Rest>
│ │ │ -
243 struct _Nth_type<2, _Tp0, _Tp1, _Tp2, _Rest...>
│ │ │ -
244 { using type = _Tp2; };
│ │ │ +
207 /*
│ │ │ +
208 * @brief Move constructor with allocator argument.
│ │ │ +
209 * @param __uset Input %unordered_map to move.
│ │ │ +
210 * @param __a An allocator object.
│ │ │ +
211 */
│ │ │ + │ │ │ +
213 const allocator_type& __a)
│ │ │ +
214 noexcept( noexcept(_Hashtable(std::move(__umap._M_h), __a)) )
│ │ │ +
215 : _M_h(std::move(__umap._M_h), __a)
│ │ │ +
216 { }
│ │ │ +
217
│ │ │ +
218 /**
│ │ │ +
219 * @brief Builds an %unordered_map from an initializer_list.
│ │ │ +
220 * @param __l An initializer_list.
│ │ │ +
221 * @param __n Minimal initial number of buckets.
│ │ │ +
222 * @param __hf A hash functor.
│ │ │ +
223 * @param __eql A key equality functor.
│ │ │ +
224 * @param __a An allocator object.
│ │ │ +
225 *
│ │ │ +
226 * Create an %unordered_map consisting of copies of the elements in the
│ │ │ +
227 * list. This is linear in N (where N is @a __l.size()).
│ │ │ +
228 */
│ │ │ +
│ │ │ + │ │ │ +
230 size_type __n = 0,
│ │ │ +
231 const hasher& __hf = hasher(),
│ │ │ +
232 const key_equal& __eql = key_equal(),
│ │ │ +
233 const allocator_type& __a = allocator_type())
│ │ │ +
234 : _M_h(__l, __n, __hf, __eql, __a)
│ │ │ +
235 { }
│ │ │ +
│ │ │ +
236
│ │ │ +
237 unordered_map(size_type __n, const allocator_type& __a)
│ │ │ +
238 : unordered_map(__n, hasher(), key_equal(), __a)
│ │ │ +
239 { }
│ │ │ +
240
│ │ │ +
241 unordered_map(size_type __n, const hasher& __hf,
│ │ │ +
242 const allocator_type& __a)
│ │ │ +
243 : unordered_map(__n, __hf, key_equal(), __a)
│ │ │ +
244 { }
│ │ │
245
│ │ │ -
246 template<size_t _Np, typename _Tp0, typename _Tp1, typename _Tp2,
│ │ │ -
247 typename... _Rest>
│ │ │ -
248#if __cpp_concepts
│ │ │ -
249 requires (_Np >= 3)
│ │ │ -
250#endif
│ │ │ -
251 struct _Nth_type<_Np, _Tp0, _Tp1, _Tp2, _Rest...>
│ │ │ -
252 : _Nth_type<_Np - 3, _Rest...>
│ │ │ -
253 { };
│ │ │ -
254
│ │ │ -
255#if ! __cpp_concepts // Need additional specializations to avoid ambiguities.
│ │ │ -
256 template<typename _Tp0, typename _Tp1, typename... _Rest>
│ │ │ -
257 struct _Nth_type<0, _Tp0, _Tp1, _Rest...>
│ │ │ -
258 { using type = _Tp0; };
│ │ │ +
246 template<typename _InputIterator>
│ │ │ +
247 unordered_map(_InputIterator __first, _InputIterator __last,
│ │ │ +
248 size_type __n,
│ │ │ +
249 const allocator_type& __a)
│ │ │ +
250 : unordered_map(__first, __last, __n, hasher(), key_equal(), __a)
│ │ │ +
251 { }
│ │ │ +
252
│ │ │ +
253 template<typename _InputIterator>
│ │ │ +
254 unordered_map(_InputIterator __first, _InputIterator __last,
│ │ │ +
255 size_type __n, const hasher& __hf,
│ │ │ +
256 const allocator_type& __a)
│ │ │ +
257 : unordered_map(__first, __last, __n, __hf, key_equal(), __a)
│ │ │ +
258 { }
│ │ │
259
│ │ │ -
260 template<typename _Tp0, typename _Tp1, typename _Tp2, typename... _Rest>
│ │ │ -
261 struct _Nth_type<0, _Tp0, _Tp1, _Tp2, _Rest...>
│ │ │ -
262 { using type = _Tp0; };
│ │ │ -
263
│ │ │ -
264 template<typename _Tp0, typename _Tp1, typename _Tp2, typename... _Rest>
│ │ │ -
265 struct _Nth_type<1, _Tp0, _Tp1, _Tp2, _Rest...>
│ │ │ -
266 { using type = _Tp1; };
│ │ │ -
267#endif
│ │ │ -
268
│ │ │ -
269_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ -
270} // namespace
│ │ │ -
271
│ │ │ -
272#endif // C++11
│ │ │ -
273#endif /* _GLIBCXX_UTILITY_H */
│ │ │ - │ │ │ - │ │ │ +
260 unordered_map(initializer_list<value_type> __l,
│ │ │ +
261 size_type __n,
│ │ │ +
262 const allocator_type& __a)
│ │ │ +
263 : unordered_map(__l, __n, hasher(), key_equal(), __a)
│ │ │ +
264 { }
│ │ │ +
265
│ │ │ +
266 unordered_map(initializer_list<value_type> __l,
│ │ │ +
267 size_type __n, const hasher& __hf,
│ │ │ +
268 const allocator_type& __a)
│ │ │ +
269 : unordered_map(__l, __n, __hf, key_equal(), __a)
│ │ │ +
270 { }
│ │ │ +
271
│ │ │ +
272 /// Copy assignment operator.
│ │ │ + │ │ │ +
274 operator=(const unordered_map&) = default;
│ │ │ +
275
│ │ │ +
276 /// Move assignment operator.
│ │ │ + │ │ │ + │ │ │ +
279
│ │ │ +
280 /**
│ │ │ +
281 * @brief %Unordered_map list assignment operator.
│ │ │ +
282 * @param __l An initializer_list.
│ │ │ +
283 *
│ │ │ +
284 * This function fills an %unordered_map with copies of the elements in
│ │ │ +
285 * the initializer list @a __l.
│ │ │ +
286 *
│ │ │ +
287 * Note that the assignment completely changes the %unordered_map and
│ │ │ +
288 * that the resulting %unordered_map's size is the same as the number
│ │ │ +
289 * of elements assigned.
│ │ │ +
290 */
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
293 {
│ │ │ +
294 _M_h = __l;
│ │ │ +
295 return *this;
│ │ │ +
296 }
│ │ │ +
│ │ │ +
297
│ │ │ +
298 /// Returns the allocator object used by the %unordered_map.
│ │ │ + │ │ │ +
│ │ │ +
300 get_allocator() const noexcept
│ │ │ +
301 { return _M_h.get_allocator(); }
│ │ │ +
│ │ │ +
302
│ │ │ +
303 // size and capacity:
│ │ │ +
304
│ │ │ +
305 /// Returns true if the %unordered_map is empty.
│ │ │ +
306 _GLIBCXX_NODISCARD bool
│ │ │ +
│ │ │ +
307 empty() const noexcept
│ │ │ +
308 { return _M_h.empty(); }
│ │ │ +
│ │ │ +
309
│ │ │ +
310 /// Returns the size of the %unordered_map.
│ │ │ + │ │ │ +
│ │ │ +
312 size() const noexcept
│ │ │ +
313 { return _M_h.size(); }
│ │ │ +
│ │ │ +
314
│ │ │ +
315 /// Returns the maximum size of the %unordered_map.
│ │ │ + │ │ │ +
│ │ │ +
317 max_size() const noexcept
│ │ │ +
318 { return _M_h.max_size(); }
│ │ │ +
│ │ │ +
319
│ │ │ +
320 // iterators.
│ │ │ +
321
│ │ │ +
322 /**
│ │ │ +
323 * Returns a read/write iterator that points to the first element in the
│ │ │ +
324 * %unordered_map.
│ │ │ +
325 */
│ │ │ + │ │ │ +
│ │ │ +
327 begin() noexcept
│ │ │ +
328 { return _M_h.begin(); }
│ │ │ +
│ │ │ +
329
│ │ │ +
330 ///@{
│ │ │ +
331 /**
│ │ │ +
332 * Returns a read-only (constant) iterator that points to the first
│ │ │ +
333 * element in the %unordered_map.
│ │ │ +
334 */
│ │ │ + │ │ │ +
│ │ │ +
336 begin() const noexcept
│ │ │ +
337 { return _M_h.begin(); }
│ │ │ +
│ │ │ +
338
│ │ │ + │ │ │ +
│ │ │ +
340 cbegin() const noexcept
│ │ │ +
341 { return _M_h.begin(); }
│ │ │ +
│ │ │ +
342 ///@}
│ │ │ +
343
│ │ │ +
344 /**
│ │ │ +
345 * Returns a read/write iterator that points one past the last element in
│ │ │ +
346 * the %unordered_map.
│ │ │ +
347 */
│ │ │ + │ │ │ +
│ │ │ +
349 end() noexcept
│ │ │ +
350 { return _M_h.end(); }
│ │ │ +
│ │ │ +
351
│ │ │ +
352 ///@{
│ │ │ +
353 /**
│ │ │ +
354 * Returns a read-only (constant) iterator that points one past the last
│ │ │ +
355 * element in the %unordered_map.
│ │ │ +
356 */
│ │ │ + │ │ │ +
│ │ │ +
358 end() const noexcept
│ │ │ +
359 { return _M_h.end(); }
│ │ │ +
│ │ │ +
360
│ │ │ + │ │ │ +
│ │ │ +
362 cend() const noexcept
│ │ │ +
363 { return _M_h.end(); }
│ │ │ +
│ │ │ +
364 ///@}
│ │ │ +
365
│ │ │ +
366 // modifiers.
│ │ │ +
367
│ │ │ +
368 /**
│ │ │ +
369 * @brief Attempts to build and insert a std::pair into the
│ │ │ +
370 * %unordered_map.
│ │ │ +
371 *
│ │ │ +
372 * @param __args Arguments used to generate a new pair instance (see
│ │ │ +
373 * std::piecewise_contruct for passing arguments to each
│ │ │ +
374 * part of the pair constructor).
│ │ │ +
375 *
│ │ │ +
376 * @return A pair, of which the first element is an iterator that points
│ │ │ +
377 * to the possibly inserted pair, and the second is a bool that
│ │ │ +
378 * is true if the pair was actually inserted.
│ │ │ +
379 *
│ │ │ +
380 * This function attempts to build and insert a (key, value) %pair into
│ │ │ +
381 * the %unordered_map.
│ │ │ +
382 * An %unordered_map relies on unique keys and thus a %pair is only
│ │ │ +
383 * inserted if its first element (the key) is not already present in the
│ │ │ +
384 * %unordered_map.
│ │ │ +
385 *
│ │ │ +
386 * Insertion requires amortized constant time.
│ │ │ +
387 */
│ │ │ +
388 template<typename... _Args>
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
391 { return _M_h.emplace(std::forward<_Args>(__args)...); }
│ │ │ +
│ │ │ +
392
│ │ │ +
393 /**
│ │ │ +
394 * @brief Attempts to build and insert a std::pair into the
│ │ │ +
395 * %unordered_map.
│ │ │ +
396 *
│ │ │ +
397 * @param __pos An iterator that serves as a hint as to where the pair
│ │ │ +
398 * should be inserted.
│ │ │ +
399 * @param __args Arguments used to generate a new pair instance (see
│ │ │ +
400 * std::piecewise_contruct for passing arguments to each
│ │ │ +
401 * part of the pair constructor).
│ │ │ +
402 * @return An iterator that points to the element with key of the
│ │ │ +
403 * std::pair built from @a __args (may or may not be that
│ │ │ +
404 * std::pair).
│ │ │ +
405 *
│ │ │ +
406 * This function is not concerned about whether the insertion took place,
│ │ │ +
407 * and thus does not return a boolean like the single-argument emplace()
│ │ │ +
408 * does.
│ │ │ +
409 * Note that the first parameter is only a hint and can potentially
│ │ │ +
410 * improve the performance of the insertion process. A bad hint would
│ │ │ +
411 * cause no gains in efficiency.
│ │ │ +
412 *
│ │ │ +
413 * See
│ │ │ +
414 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/associative.html#containers.associative.insert_hints
│ │ │ +
415 * for more on @a hinting.
│ │ │ +
416 *
│ │ │ +
417 * Insertion requires amortized constant time.
│ │ │ +
418 */
│ │ │ +
419 template<typename... _Args>
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
422 { return _M_h.emplace_hint(__pos, std::forward<_Args>(__args)...); }
│ │ │ +
│ │ │ +
423
│ │ │ +
424#if __cplusplus > 201402L
│ │ │ +
425 /// Extract a node.
│ │ │ +
426 node_type
│ │ │ +
│ │ │ + │ │ │ +
428 {
│ │ │ +
429 __glibcxx_assert(__pos != end());
│ │ │ +
430 return _M_h.extract(__pos);
│ │ │ +
431 }
│ │ │ +
│ │ │ +
432
│ │ │ +
433 /// Extract a node.
│ │ │ +
434 node_type
│ │ │ +
│ │ │ + │ │ │ +
436 { return _M_h.extract(__key); }
│ │ │ +
│ │ │ +
437
│ │ │ +
438 /// Re-insert an extracted node.
│ │ │ +
439 insert_return_type
│ │ │ +
│ │ │ +
440 insert(node_type&& __nh)
│ │ │ +
441 { return _M_h._M_reinsert_node(std::move(__nh)); }
│ │ │ +
│ │ │ +
442
│ │ │ +
443 /// Re-insert an extracted node.
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
446 { return _M_h._M_reinsert_node(std::move(__nh)).position; }
│ │ │ +
│ │ │ +
447
│ │ │ +
448#define __cpp_lib_unordered_map_try_emplace 201411L
│ │ │ +
449 /**
│ │ │ +
450 * @brief Attempts to build and insert a std::pair into the
│ │ │ +
451 * %unordered_map.
│ │ │ +
452 *
│ │ │ +
453 * @param __k Key to use for finding a possibly existing pair in
│ │ │ +
454 * the unordered_map.
│ │ │ +
455 * @param __args Arguments used to generate the .second for a
│ │ │ +
456 * new pair instance.
│ │ │ +
457 *
│ │ │ +
458 * @return A pair, of which the first element is an iterator that points
│ │ │ +
459 * to the possibly inserted pair, and the second is a bool that
│ │ │ +
460 * is true if the pair was actually inserted.
│ │ │ +
461 *
│ │ │ +
462 * This function attempts to build and insert a (key, value) %pair into
│ │ │ +
463 * the %unordered_map.
│ │ │ +
464 * An %unordered_map relies on unique keys and thus a %pair is only
│ │ │ +
465 * inserted if its first element (the key) is not already present in the
│ │ │ +
466 * %unordered_map.
│ │ │ +
467 * If a %pair is not inserted, this function has no effect.
│ │ │ +
468 *
│ │ │ +
469 * Insertion requires amortized constant time.
│ │ │ +
470 */
│ │ │ +
471 template <typename... _Args>
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
474 {
│ │ │ +
475 return _M_h.try_emplace(cend(), __k, std::forward<_Args>(__args)...);
│ │ │ +
476 }
│ │ │ +
│ │ │ +
477
│ │ │ +
478 // move-capable overload
│ │ │ +
479 template <typename... _Args>
│ │ │ + │ │ │ + │ │ │ +
482 {
│ │ │ +
483 return _M_h.try_emplace(cend(), std::move(__k),
│ │ │ + │ │ │ +
485 }
│ │ │ +
486
│ │ │ +
487 /**
│ │ │ +
488 * @brief Attempts to build and insert a std::pair into the
│ │ │ +
489 * %unordered_map.
│ │ │ +
490 *
│ │ │ +
491 * @param __hint An iterator that serves as a hint as to where the pair
│ │ │ +
492 * should be inserted.
│ │ │ +
493 * @param __k Key to use for finding a possibly existing pair in
│ │ │ +
494 * the unordered_map.
│ │ │ +
495 * @param __args Arguments used to generate the .second for a
│ │ │ +
496 * new pair instance.
│ │ │ +
497 * @return An iterator that points to the element with key of the
│ │ │ +
498 * std::pair built from @a __args (may or may not be that
│ │ │ +
499 * std::pair).
│ │ │ +
500 *
│ │ │ +
501 * This function is not concerned about whether the insertion took place,
│ │ │ +
502 * and thus does not return a boolean like the single-argument emplace()
│ │ │ +
503 * does. However, if insertion did not take place,
│ │ │ +
504 * this function has no effect.
│ │ │ +
505 * Note that the first parameter is only a hint and can potentially
│ │ │ +
506 * improve the performance of the insertion process. A bad hint would
│ │ │ +
507 * cause no gains in efficiency.
│ │ │ +
508 *
│ │ │ +
509 * See
│ │ │ +
510 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/associative.html#containers.associative.insert_hints
│ │ │ +
511 * for more on @a hinting.
│ │ │ +
512 *
│ │ │ +
513 * Insertion requires amortized constant time.
│ │ │ +
514 */
│ │ │ +
515 template <typename... _Args>
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
518 _Args&&... __args)
│ │ │ +
519 {
│ │ │ +
520 return _M_h.try_emplace(__hint, __k,
│ │ │ +
521 std::forward<_Args>(__args)...).first;
│ │ │ +
522 }
│ │ │ +
│ │ │ +
523
│ │ │ +
524 // move-capable overload
│ │ │ +
525 template <typename... _Args>
│ │ │ + │ │ │ + │ │ │ +
528 {
│ │ │ +
529 return _M_h.try_emplace(__hint, std::move(__k),
│ │ │ +
530 std::forward<_Args>(__args)...).first;
│ │ │ +
531 }
│ │ │ +
532#endif // C++17
│ │ │ +
533
│ │ │ +
534 ///@{
│ │ │ +
535 /**
│ │ │ +
536 * @brief Attempts to insert a std::pair into the %unordered_map.
│ │ │ +
537
│ │ │ +
538 * @param __x Pair to be inserted (see std::make_pair for easy
│ │ │ +
539 * creation of pairs).
│ │ │ +
540 *
│ │ │ +
541 * @return A pair, of which the first element is an iterator that
│ │ │ +
542 * points to the possibly inserted pair, and the second is
│ │ │ +
543 * a bool that is true if the pair was actually inserted.
│ │ │ +
544 *
│ │ │ +
545 * This function attempts to insert a (key, value) %pair into the
│ │ │ +
546 * %unordered_map. An %unordered_map relies on unique keys and thus a
│ │ │ +
547 * %pair is only inserted if its first element (the key) is not already
│ │ │ +
548 * present in the %unordered_map.
│ │ │ +
549 *
│ │ │ +
550 * Insertion requires amortized constant time.
│ │ │ +
551 */
│ │ │ + │ │ │ +
│ │ │ +
553 insert(const value_type& __x)
│ │ │ +
554 { return _M_h.insert(__x); }
│ │ │ +
│ │ │ +
555
│ │ │ +
556 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ +
557 // 2354. Unnecessary copying when inserting into maps with braced-init
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
560 { return _M_h.insert(std::move(__x)); }
│ │ │ +
│ │ │ +
561
│ │ │ +
562 template<typename _Pair>
│ │ │ + │ │ │ + │ │ │ +
│ │ │ + │ │ │ +
566 { return _M_h.emplace(std::forward<_Pair>(__x)); }
│ │ │ +
│ │ │ +
567 ///@}
│ │ │ +
568
│ │ │ +
569 ///@{
│ │ │ +
570 /**
│ │ │ +
571 * @brief Attempts to insert a std::pair into the %unordered_map.
│ │ │ +
572 * @param __hint An iterator that serves as a hint as to where the
│ │ │ +
573 * pair should be inserted.
│ │ │ +
574 * @param __x Pair to be inserted (see std::make_pair for easy creation
│ │ │ +
575 * of pairs).
│ │ │ +
576 * @return An iterator that points to the element with key of
│ │ │ +
577 * @a __x (may or may not be the %pair passed in).
│ │ │ +
578 *
│ │ │ +
579 * This function is not concerned about whether the insertion took place,
│ │ │ +
580 * and thus does not return a boolean like the single-argument insert()
│ │ │ +
581 * does. Note that the first parameter is only a hint and can
│ │ │ +
582 * potentially improve the performance of the insertion process. A bad
│ │ │ +
583 * hint would cause no gains in efficiency.
│ │ │ +
584 *
│ │ │ +
585 * See
│ │ │ +
586 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/associative.html#containers.associative.insert_hints
│ │ │ +
587 * for more on @a hinting.
│ │ │ +
588 *
│ │ │ +
589 * Insertion requires amortized constant time.
│ │ │ +
590 */
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
593 { return _M_h.insert(__hint, __x); }
│ │ │ +
│ │ │ +
594
│ │ │ +
595 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ +
596 // 2354. Unnecessary copying when inserting into maps with braced-init
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
599 { return _M_h.insert(__hint, std::move(__x)); }
│ │ │ +
│ │ │ +
600
│ │ │ +
601 template<typename _Pair>
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
604 { return _M_h.emplace_hint(__hint, std::forward<_Pair>(__x)); }
│ │ │ +
│ │ │ +
605 ///@}
│ │ │ +
606
│ │ │ +
607 /**
│ │ │ +
608 * @brief A template function that attempts to insert a range of
│ │ │ +
609 * elements.
│ │ │ +
610 * @param __first Iterator pointing to the start of the range to be
│ │ │ +
611 * inserted.
│ │ │ +
612 * @param __last Iterator pointing to the end of the range.
│ │ │ +
613 *
│ │ │ +
614 * Complexity similar to that of the range constructor.
│ │ │ +
615 */
│ │ │ +
616 template<typename _InputIterator>
│ │ │ +
617 void
│ │ │ +
│ │ │ + │ │ │ +
619 { _M_h.insert(__first, __last); }
│ │ │ +
│ │ │ +
620
│ │ │ +
621 /**
│ │ │ +
622 * @brief Attempts to insert a list of elements into the %unordered_map.
│ │ │ +
623 * @param __l A std::initializer_list<value_type> of elements
│ │ │ +
624 * to be inserted.
│ │ │ +
625 *
│ │ │ +
626 * Complexity similar to that of the range constructor.
│ │ │ +
627 */
│ │ │ +
628 void
│ │ │ +
│ │ │ + │ │ │ +
630 { _M_h.insert(__l); }
│ │ │ +
│ │ │ +
631
│ │ │ +
632
│ │ │ +
633#if __cplusplus > 201402L
│ │ │ +
634 /**
│ │ │ +
635 * @brief Attempts to insert a std::pair into the %unordered_map.
│ │ │ +
636 * @param __k Key to use for finding a possibly existing pair in
│ │ │ +
637 * the map.
│ │ │ +
638 * @param __obj Argument used to generate the .second for a pair
│ │ │ +
639 * instance.
│ │ │ +
640 *
│ │ │ +
641 * @return A pair, of which the first element is an iterator that
│ │ │ +
642 * points to the possibly inserted pair, and the second is
│ │ │ +
643 * a bool that is true if the pair was actually inserted.
│ │ │ +
644 *
│ │ │ +
645 * This function attempts to insert a (key, value) %pair into the
│ │ │ +
646 * %unordered_map. An %unordered_map relies on unique keys and thus a
│ │ │ +
647 * %pair is only inserted if its first element (the key) is not already
│ │ │ +
648 * present in the %unordered_map.
│ │ │ +
649 * If the %pair was already in the %unordered_map, the .second of
│ │ │ +
650 * the %pair is assigned from __obj.
│ │ │ +
651 *
│ │ │ +
652 * Insertion requires amortized constant time.
│ │ │ +
653 */
│ │ │ +
654 template <typename _Obj>
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
657 {
│ │ │ +
658 auto __ret = _M_h.try_emplace(cend(), __k,
│ │ │ + │ │ │ +
660 if (!__ret.second)
│ │ │ +
661 __ret.first->second = std::forward<_Obj>(__obj);
│ │ │ +
662 return __ret;
│ │ │ +
663 }
│ │ │ +
│ │ │ +
664
│ │ │ +
665 // move-capable overload
│ │ │ +
666 template <typename _Obj>
│ │ │ + │ │ │ + │ │ │ +
669 {
│ │ │ +
670 auto __ret = _M_h.try_emplace(cend(), std::move(__k),
│ │ │ + │ │ │ +
672 if (!__ret.second)
│ │ │ +
673 __ret.first->second = std::forward<_Obj>(__obj);
│ │ │ +
674 return __ret;
│ │ │ +
675 }
│ │ │ +
676
│ │ │ +
677 /**
│ │ │ +
678 * @brief Attempts to insert a std::pair into the %unordered_map.
│ │ │ +
679 * @param __hint An iterator that serves as a hint as to where the
│ │ │ +
680 * pair should be inserted.
│ │ │ +
681 * @param __k Key to use for finding a possibly existing pair in
│ │ │ +
682 * the unordered_map.
│ │ │ +
683 * @param __obj Argument used to generate the .second for a pair
│ │ │ +
684 * instance.
│ │ │ +
685 * @return An iterator that points to the element with key of
│ │ │ +
686 * @a __x (may or may not be the %pair passed in).
│ │ │ +
687 *
│ │ │ +
688 * This function is not concerned about whether the insertion took place,
│ │ │ +
689 * and thus does not return a boolean like the single-argument insert()
│ │ │ +
690 * does.
│ │ │ +
691 * If the %pair was already in the %unordered map, the .second of
│ │ │ +
692 * the %pair is assigned from __obj.
│ │ │ +
693 * Note that the first parameter is only a hint and can
│ │ │ +
694 * potentially improve the performance of the insertion process. A bad
│ │ │ +
695 * hint would cause no gains in efficiency.
│ │ │ +
696 *
│ │ │ +
697 * See
│ │ │ +
698 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/associative.html#containers.associative.insert_hints
│ │ │ +
699 * for more on @a hinting.
│ │ │ +
700 *
│ │ │ +
701 * Insertion requires amortized constant time.
│ │ │ +
702 */
│ │ │ +
703 template <typename _Obj>
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
706 _Obj&& __obj)
│ │ │ +
707 {
│ │ │ +
708 auto __ret = _M_h.try_emplace(__hint, __k, std::forward<_Obj>(__obj));
│ │ │ +
709 if (!__ret.second)
│ │ │ +
710 __ret.first->second = std::forward<_Obj>(__obj);
│ │ │ +
711 return __ret.first;
│ │ │ +
712 }
│ │ │ +
│ │ │ +
713
│ │ │ +
714 // move-capable overload
│ │ │ +
715 template <typename _Obj>
│ │ │ + │ │ │ + │ │ │ +
718 {
│ │ │ +
719 auto __ret = _M_h.try_emplace(__hint, std::move(__k),
│ │ │ + │ │ │ +
721 if (!__ret.second)
│ │ │ +
722 __ret.first->second = std::forward<_Obj>(__obj);
│ │ │ +
723 return __ret.first;
│ │ │ +
724 }
│ │ │ +
725#endif
│ │ │ +
726
│ │ │ +
727 ///@{
│ │ │ +
728 /**
│ │ │ +
729 * @brief Erases an element from an %unordered_map.
│ │ │ +
730 * @param __position An iterator pointing to the element to be erased.
│ │ │ +
731 * @return An iterator pointing to the element immediately following
│ │ │ +
732 * @a __position prior to the element being erased. If no such
│ │ │ +
733 * element exists, end() is returned.
│ │ │ +
734 *
│ │ │ +
735 * This function erases an element, pointed to by the given iterator,
│ │ │ +
736 * from an %unordered_map.
│ │ │ +
737 * Note that this function only erases the element, and that if the
│ │ │ +
738 * element is itself a pointer, the pointed-to memory is not touched in
│ │ │ +
739 * any way. Managing the pointer is the user's responsibility.
│ │ │ +
740 */
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
743 { return _M_h.erase(__position); }
│ │ │ +
│ │ │ +
744
│ │ │ +
745 // LWG 2059.
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
748 { return _M_h.erase(__position); }
│ │ │ +
│ │ │ +
749 ///@}
│ │ │ +
750
│ │ │ +
751 /**
│ │ │ +
752 * @brief Erases elements according to the provided key.
│ │ │ +
753 * @param __x Key of element to be erased.
│ │ │ +
754 * @return The number of elements erased.
│ │ │ +
755 *
│ │ │ +
756 * This function erases all the elements located by the given key from
│ │ │ +
757 * an %unordered_map. For an %unordered_map the result of this function
│ │ │ +
758 * can only be 0 (not present) or 1 (present).
│ │ │ +
759 * Note that this function only erases the element, and that if the
│ │ │ +
760 * element is itself a pointer, the pointed-to memory is not touched in
│ │ │ +
761 * any way. Managing the pointer is the user's responsibility.
│ │ │ +
762 */
│ │ │ + │ │ │ +
│ │ │ +
764 erase(const key_type& __x)
│ │ │ +
765 { return _M_h.erase(__x); }
│ │ │ +
│ │ │ +
766
│ │ │ +
767 /**
│ │ │ +
768 * @brief Erases a [__first,__last) range of elements from an
│ │ │ +
769 * %unordered_map.
│ │ │ +
770 * @param __first Iterator pointing to the start of the range to be
│ │ │ +
771 * erased.
│ │ │ +
772 * @param __last Iterator pointing to the end of the range to
│ │ │ +
773 * be erased.
│ │ │ +
774 * @return The iterator @a __last.
│ │ │ +
775 *
│ │ │ +
776 * This function erases a sequence of elements from an %unordered_map.
│ │ │ +
777 * Note that this function only erases the elements, and that if
│ │ │ +
778 * the element is itself a pointer, the pointed-to memory is not touched
│ │ │ +
779 * in any way. Managing the pointer is the user's responsibility.
│ │ │ +
780 */
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
783 { return _M_h.erase(__first, __last); }
│ │ │ +
│ │ │ +
784
│ │ │ +
785 /**
│ │ │ +
786 * Erases all elements in an %unordered_map.
│ │ │ +
787 * Note that this function only erases the elements, and that if the
│ │ │ +
788 * elements themselves are pointers, the pointed-to memory is not touched
│ │ │ +
789 * in any way. Managing the pointer is the user's responsibility.
│ │ │ +
790 */
│ │ │ +
791 void
│ │ │ +
│ │ │ +
792 clear() noexcept
│ │ │ +
793 { _M_h.clear(); }
│ │ │ +
│ │ │ +
794
│ │ │ +
795 /**
│ │ │ +
796 * @brief Swaps data with another %unordered_map.
│ │ │ +
797 * @param __x An %unordered_map of the same element and allocator
│ │ │ +
798 * types.
│ │ │ +
799 *
│ │ │ +
800 * This exchanges the elements between two %unordered_map in constant
│ │ │ +
801 * time.
│ │ │ +
802 * Note that the global std::swap() function is specialized such that
│ │ │ +
803 * std::swap(m1,m2) will feed to this function.
│ │ │ +
804 */
│ │ │ +
805 void
│ │ │ +
│ │ │ + │ │ │ +
807 noexcept( noexcept(_M_h.swap(__x._M_h)) )
│ │ │ +
808 { _M_h.swap(__x._M_h); }
│ │ │ +
│ │ │ +
809
│ │ │ +
810#if __cplusplus > 201402L
│ │ │ +
811 template<typename, typename, typename>
│ │ │ +
812 friend class std::_Hash_merge_helper;
│ │ │ +
813
│ │ │ +
814 template<typename _H2, typename _P2>
│ │ │ +
815 void
│ │ │ + │ │ │ +
817 {
│ │ │ + │ │ │ +
819 _M_h._M_merge_unique(_Merge_helper::_S_get_table(__source));
│ │ │ +
820 }
│ │ │ +
821
│ │ │ +
822 template<typename _H2, typename _P2>
│ │ │ +
823 void
│ │ │ +
824 merge(unordered_map<_Key, _Tp, _H2, _P2, _Alloc>&& __source)
│ │ │ +
825 { merge(__source); }
│ │ │ +
826
│ │ │ +
827 template<typename _H2, typename _P2>
│ │ │ +
828 void
│ │ │ +
829 merge(unordered_multimap<_Key, _Tp, _H2, _P2, _Alloc>& __source)
│ │ │ +
830 {
│ │ │ +
831 using _Merge_helper = _Hash_merge_helper<unordered_map, _H2, _P2>;
│ │ │ +
832 _M_h._M_merge_unique(_Merge_helper::_S_get_table(__source));
│ │ │ +
833 }
│ │ │ +
834
│ │ │ +
835 template<typename _H2, typename _P2>
│ │ │ +
836 void
│ │ │ +
837 merge(unordered_multimap<_Key, _Tp, _H2, _P2, _Alloc>&& __source)
│ │ │ +
838 { merge(__source); }
│ │ │ +
839#endif // C++17
│ │ │ +
840
│ │ │ +
841 // observers.
│ │ │ +
842
│ │ │ +
843 /// Returns the hash functor object with which the %unordered_map was
│ │ │ +
844 /// constructed.
│ │ │ +
845 hasher
│ │ │ +
│ │ │ + │ │ │ +
847 { return _M_h.hash_function(); }
│ │ │ +
│ │ │ +
848
│ │ │ +
849 /// Returns the key comparison object with which the %unordered_map was
│ │ │ +
850 /// constructed.
│ │ │ + │ │ │ +
│ │ │ +
852 key_eq() const
│ │ │ +
853 { return _M_h.key_eq(); }
│ │ │ +
│ │ │ +
854
│ │ │ +
855 // lookup.
│ │ │ +
856
│ │ │ +
857 ///@{
│ │ │ +
858 /**
│ │ │ +
859 * @brief Tries to locate an element in an %unordered_map.
│ │ │ +
860 * @param __x Key to be located.
│ │ │ +
861 * @return Iterator pointing to sought-after element, or end() if not
│ │ │ +
862 * found.
│ │ │ +
863 *
│ │ │ +
864 * This function takes a key and tries to locate the element with which
│ │ │ +
865 * the key matches. If successful the function returns an iterator
│ │ │ +
866 * pointing to the sought after element. If unsuccessful it returns the
│ │ │ +
867 * past-the-end ( @c end() ) iterator.
│ │ │ +
868 */
│ │ │ + │ │ │ +
│ │ │ +
870 find(const key_type& __x)
│ │ │ +
871 { return _M_h.find(__x); }
│ │ │ +
│ │ │ +
872
│ │ │ +
873#if __cplusplus > 201703L
│ │ │ +
874 template<typename _Kt>
│ │ │ +
875 auto
│ │ │ +
│ │ │ +
876 find(const _Kt& __x) -> decltype(_M_h._M_find_tr(__x))
│ │ │ +
877 { return _M_h._M_find_tr(__x); }
│ │ │ +
│ │ │ +
878#endif
│ │ │ +
879
│ │ │ + │ │ │ +
│ │ │ +
881 find(const key_type& __x) const
│ │ │ +
882 { return _M_h.find(__x); }
│ │ │ +
│ │ │ +
883
│ │ │ +
884#if __cplusplus > 201703L
│ │ │ +
885 template<typename _Kt>
│ │ │ +
886 auto
│ │ │ +
│ │ │ +
887 find(const _Kt& __x) const -> decltype(_M_h._M_find_tr(__x))
│ │ │ +
888 { return _M_h._M_find_tr(__x); }
│ │ │ +
│ │ │ +
889#endif
│ │ │ +
890 ///@}
│ │ │ +
891
│ │ │ +
892 ///@{
│ │ │ +
893 /**
│ │ │ +
894 * @brief Finds the number of elements.
│ │ │ +
895 * @param __x Key to count.
│ │ │ +
896 * @return Number of elements with specified key.
│ │ │ +
897 *
│ │ │ +
898 * This function only makes sense for %unordered_multimap; for
│ │ │ +
899 * %unordered_map the result will either be 0 (not present) or 1
│ │ │ +
900 * (present).
│ │ │ +
901 */
│ │ │ + │ │ │ +
│ │ │ +
903 count(const key_type& __x) const
│ │ │ +
904 { return _M_h.count(__x); }
│ │ │ +
│ │ │ +
905
│ │ │ +
906#if __cplusplus > 201703L
│ │ │ +
907 template<typename _Kt>
│ │ │ +
908 auto
│ │ │ +
│ │ │ +
909 count(const _Kt& __x) const -> decltype(_M_h._M_count_tr(__x))
│ │ │ +
910 { return _M_h._M_count_tr(__x); }
│ │ │ +
│ │ │ +
911#endif
│ │ │ +
912 ///@}
│ │ │ +
913
│ │ │ +
914#if __cplusplus > 201703L
│ │ │ +
915 ///@{
│ │ │ +
916 /**
│ │ │ +
917 * @brief Finds whether an element with the given key exists.
│ │ │ +
918 * @param __x Key of elements to be located.
│ │ │ +
919 * @return True if there is any element with the specified key.
│ │ │ +
920 */
│ │ │ +
921 bool
│ │ │ +
│ │ │ +
922 contains(const key_type& __x) const
│ │ │ +
923 { return _M_h.find(__x) != _M_h.end(); }
│ │ │ +
│ │ │ +
924
│ │ │ +
925 template<typename _Kt>
│ │ │ +
926 auto
│ │ │ +
│ │ │ +
927 contains(const _Kt& __x) const
│ │ │ +
928 -> decltype(_M_h._M_find_tr(__x), void(), true)
│ │ │ +
929 { return _M_h._M_find_tr(__x) != _M_h.end(); }
│ │ │ +
│ │ │ +
930 ///@}
│ │ │ +
931#endif
│ │ │ +
932
│ │ │ +
933 ///@{
│ │ │ +
934 /**
│ │ │ +
935 * @brief Finds a subsequence matching given key.
│ │ │ +
936 * @param __x Key to be located.
│ │ │ +
937 * @return Pair of iterators that possibly points to the subsequence
│ │ │ +
938 * matching given key.
│ │ │ +
939 *
│ │ │ +
940 * This function probably only makes sense for %unordered_multimap.
│ │ │ +
941 */
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
944 { return _M_h.equal_range(__x); }
│ │ │ +
│ │ │ +
945
│ │ │ +
946#if __cplusplus > 201703L
│ │ │ +
947 template<typename _Kt>
│ │ │ +
948 auto
│ │ │ +
│ │ │ +
949 equal_range(const _Kt& __x)
│ │ │ +
950 -> decltype(_M_h._M_equal_range_tr(__x))
│ │ │ +
951 { return _M_h._M_equal_range_tr(__x); }
│ │ │ +
│ │ │ +
952#endif
│ │ │ +
953
│ │ │ + │ │ │ +
│ │ │ +
955 equal_range(const key_type& __x) const
│ │ │ +
956 { return _M_h.equal_range(__x); }
│ │ │ +
│ │ │ +
957
│ │ │ +
958#if __cplusplus > 201703L
│ │ │ +
959 template<typename _Kt>
│ │ │ +
960 auto
│ │ │ +
│ │ │ +
961 equal_range(const _Kt& __x) const
│ │ │ +
962 -> decltype(_M_h._M_equal_range_tr(__x))
│ │ │ +
963 { return _M_h._M_equal_range_tr(__x); }
│ │ │ +
│ │ │ +
964#endif
│ │ │ +
965 ///@}
│ │ │ +
966
│ │ │ +
967 ///@{
│ │ │ +
968 /**
│ │ │ +
969 * @brief Subscript ( @c [] ) access to %unordered_map data.
│ │ │ +
970 * @param __k The key for which data should be retrieved.
│ │ │ +
971 * @return A reference to the data of the (key,data) %pair.
│ │ │ +
972 *
│ │ │ +
973 * Allows for easy lookup with the subscript ( @c [] )operator. Returns
│ │ │ +
974 * data associated with the key specified in subscript. If the key does
│ │ │ +
975 * not exist, a pair with that key is created using default values, which
│ │ │ +
976 * is then returned.
│ │ │ +
977 *
│ │ │ +
978 * Lookup requires constant time.
│ │ │ +
979 */
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
982 { return _M_h[__k]; }
│ │ │ +
│ │ │ +
983
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
986 { return _M_h[std::move(__k)]; }
│ │ │ +
│ │ │ +
987 ///@}
│ │ │ +
988
│ │ │ +
989 ///@{
│ │ │ +
990 /**
│ │ │ +
991 * @brief Access to %unordered_map data.
│ │ │ +
992 * @param __k The key for which data should be retrieved.
│ │ │ +
993 * @return A reference to the data whose key is equal to @a __k, if
│ │ │ +
994 * such a data is present in the %unordered_map.
│ │ │ +
995 * @throw std::out_of_range If no such data is present.
│ │ │ +
996 */
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
999 { return _M_h.at(__k); }
│ │ │ +
│ │ │ +
1000
│ │ │ +
1001 const mapped_type&
│ │ │ +
│ │ │ +
1002 at(const key_type& __k) const
│ │ │ +
1003 { return _M_h.at(__k); }
│ │ │ +
│ │ │ +
1004 ///@}
│ │ │ +
1005
│ │ │ +
1006 // bucket interface.
│ │ │ +
1007
│ │ │ +
1008 /// Returns the number of buckets of the %unordered_map.
│ │ │ +
1009 size_type
│ │ │ +
│ │ │ +
1010 bucket_count() const noexcept
│ │ │ +
1011 { return _M_h.bucket_count(); }
│ │ │ +
│ │ │ +
1012
│ │ │ +
1013 /// Returns the maximum number of buckets of the %unordered_map.
│ │ │ +
1014 size_type
│ │ │ +
│ │ │ +
1015 max_bucket_count() const noexcept
│ │ │ +
1016 { return _M_h.max_bucket_count(); }
│ │ │ +
│ │ │ +
1017
│ │ │ +
1018 /*
│ │ │ +
1019 * @brief Returns the number of elements in a given bucket.
│ │ │ +
1020 * @param __n A bucket index.
│ │ │ +
1021 * @return The number of elements in the bucket.
│ │ │ +
1022 */
│ │ │ +
1023 size_type
│ │ │ +
1024 bucket_size(size_type __n) const
│ │ │ +
1025 { return _M_h.bucket_size(__n); }
│ │ │ +
1026
│ │ │ +
1027 /*
│ │ │ +
1028 * @brief Returns the bucket index of a given element.
│ │ │ +
1029 * @param __key A key instance.
│ │ │ +
1030 * @return The key bucket index.
│ │ │ +
1031 */
│ │ │ +
1032 size_type
│ │ │ +
1033 bucket(const key_type& __key) const
│ │ │ +
1034 { return _M_h.bucket(__key); }
│ │ │ +
1035
│ │ │ +
1036 /**
│ │ │ +
1037 * @brief Returns a read/write iterator pointing to the first bucket
│ │ │ +
1038 * element.
│ │ │ +
1039 * @param __n The bucket index.
│ │ │ +
1040 * @return A read/write local iterator.
│ │ │ +
1041 */
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
1044 { return _M_h.begin(__n); }
│ │ │ +
│ │ │ +
1045
│ │ │ +
1046 ///@{
│ │ │ +
1047 /**
│ │ │ +
1048 * @brief Returns a read-only (constant) iterator pointing to the first
│ │ │ +
1049 * bucket element.
│ │ │ +
1050 * @param __n The bucket index.
│ │ │ +
1051 * @return A read-only local iterator.
│ │ │ +
1052 */
│ │ │ + │ │ │ +
│ │ │ +
1054 begin(size_type __n) const
│ │ │ +
1055 { return _M_h.begin(__n); }
│ │ │ +
│ │ │ +
1056
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
1059 { return _M_h.cbegin(__n); }
│ │ │ +
│ │ │ +
1060 ///@}
│ │ │ +
1061
│ │ │ +
1062 /**
│ │ │ +
1063 * @brief Returns a read/write iterator pointing to one past the last
│ │ │ +
1064 * bucket elements.
│ │ │ +
1065 * @param __n The bucket index.
│ │ │ +
1066 * @return A read/write local iterator.
│ │ │ +
1067 */
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
1070 { return _M_h.end(__n); }
│ │ │ +
│ │ │ +
1071
│ │ │ +
1072 ///@{
│ │ │ +
1073 /**
│ │ │ +
1074 * @brief Returns a read-only (constant) iterator pointing to one past
│ │ │ +
1075 * the last bucket elements.
│ │ │ +
1076 * @param __n The bucket index.
│ │ │ +
1077 * @return A read-only local iterator.
│ │ │ +
1078 */
│ │ │ + │ │ │ +
│ │ │ +
1080 end(size_type __n) const
│ │ │ +
1081 { return _M_h.end(__n); }
│ │ │ +
│ │ │ +
1082
│ │ │ + │ │ │ +
│ │ │ +
1084 cend(size_type __n) const
│ │ │ +
1085 { return _M_h.cend(__n); }
│ │ │ +
│ │ │ +
1086 ///@}
│ │ │ +
1087
│ │ │ +
1088 // hash policy.
│ │ │ +
1089
│ │ │ +
1090 /// Returns the average number of elements per bucket.
│ │ │ +
1091 float
│ │ │ +
│ │ │ +
1092 load_factor() const noexcept
│ │ │ +
1093 { return _M_h.load_factor(); }
│ │ │ +
│ │ │ +
1094
│ │ │ +
1095 /// Returns a positive number that the %unordered_map tries to keep the
│ │ │ +
1096 /// load factor less than or equal to.
│ │ │ +
1097 float
│ │ │ +
│ │ │ +
1098 max_load_factor() const noexcept
│ │ │ +
1099 { return _M_h.max_load_factor(); }
│ │ │ +
│ │ │ +
1100
│ │ │ +
1101 /**
│ │ │ +
1102 * @brief Change the %unordered_map maximum load factor.
│ │ │ +
1103 * @param __z The new maximum load factor.
│ │ │ +
1104 */
│ │ │ +
1105 void
│ │ │ +
│ │ │ + │ │ │ +
1107 { _M_h.max_load_factor(__z); }
│ │ │ +
│ │ │ +
1108
│ │ │ +
1109 /**
│ │ │ +
1110 * @brief May rehash the %unordered_map.
│ │ │ +
1111 * @param __n The new number of buckets.
│ │ │ +
1112 *
│ │ │ +
1113 * Rehash will occur only if the new number of buckets respect the
│ │ │ +
1114 * %unordered_map maximum load factor.
│ │ │ +
1115 */
│ │ │ +
1116 void
│ │ │ +
│ │ │ + │ │ │ +
1118 { _M_h.rehash(__n); }
│ │ │ +
│ │ │ +
1119
│ │ │ +
1120 /**
│ │ │ +
1121 * @brief Prepare the %unordered_map for a specified number of
│ │ │ +
1122 * elements.
│ │ │ +
1123 * @param __n Number of elements required.
│ │ │ +
1124 *
│ │ │ +
1125 * Same as rehash(ceil(n / max_load_factor())).
│ │ │ +
1126 */
│ │ │ +
1127 void
│ │ │ +
│ │ │ + │ │ │ +
1129 { _M_h.reserve(__n); }
│ │ │ +
│ │ │ +
1130
│ │ │ +
1131 template<typename _Key1, typename _Tp1, typename _Hash1, typename _Pred1,
│ │ │ +
1132 typename _Alloc1>
│ │ │ +
1133 friend bool
│ │ │ + │ │ │ + │ │ │ +
1136 };
│ │ │ +
│ │ │ +
1137
│ │ │ +
1138#if __cpp_deduction_guides >= 201606
│ │ │ +
1139
│ │ │ +
1140 template<typename _InputIterator,
│ │ │ +
1141 typename _Hash = hash<__iter_key_t<_InputIterator>>,
│ │ │ +
1142 typename _Pred = equal_to<__iter_key_t<_InputIterator>>,
│ │ │ +
1143 typename _Allocator = allocator<__iter_to_alloc_t<_InputIterator>>,
│ │ │ +
1144 typename = _RequireInputIter<_InputIterator>,
│ │ │ +
1145 typename = _RequireNotAllocatorOrIntegral<_Hash>,
│ │ │ +
1146 typename = _RequireNotAllocator<_Pred>,
│ │ │ +
1147 typename = _RequireAllocator<_Allocator>>
│ │ │ +
1148 unordered_map(_InputIterator, _InputIterator,
│ │ │ + │ │ │ +
1150 _Hash = _Hash(), _Pred = _Pred(), _Allocator = _Allocator())
│ │ │ +
1151 -> unordered_map<__iter_key_t<_InputIterator>,
│ │ │ +
1152 __iter_val_t<_InputIterator>,
│ │ │ +
1153 _Hash, _Pred, _Allocator>;
│ │ │ +
1154
│ │ │ +
1155 template<typename _Key, typename _Tp, typename _Hash = hash<_Key>,
│ │ │ +
1156 typename _Pred = equal_to<_Key>,
│ │ │ +
1157 typename _Allocator = allocator<pair<const _Key, _Tp>>,
│ │ │ +
1158 typename = _RequireNotAllocatorOrIntegral<_Hash>,
│ │ │ +
1159 typename = _RequireNotAllocator<_Pred>,
│ │ │ +
1160 typename = _RequireAllocator<_Allocator>>
│ │ │ +
1161 unordered_map(initializer_list<pair<_Key, _Tp>>,
│ │ │ + │ │ │ +
1163 _Hash = _Hash(), _Pred = _Pred(), _Allocator = _Allocator())
│ │ │ +
1164 -> unordered_map<_Key, _Tp, _Hash, _Pred, _Allocator>;
│ │ │ +
1165
│ │ │ +
1166 template<typename _InputIterator, typename _Allocator,
│ │ │ +
1167 typename = _RequireInputIter<_InputIterator>,
│ │ │ +
1168 typename = _RequireAllocator<_Allocator>>
│ │ │ +
1169 unordered_map(_InputIterator, _InputIterator,
│ │ │ +
1170 typename unordered_map<int, int>::size_type, _Allocator)
│ │ │ +
1171 -> unordered_map<__iter_key_t<_InputIterator>,
│ │ │ +
1172 __iter_val_t<_InputIterator>,
│ │ │ +
1173 hash<__iter_key_t<_InputIterator>>,
│ │ │ +
1174 equal_to<__iter_key_t<_InputIterator>>,
│ │ │ +
1175 _Allocator>;
│ │ │ +
1176
│ │ │ +
1177 template<typename _InputIterator, typename _Allocator,
│ │ │ +
1178 typename = _RequireInputIter<_InputIterator>,
│ │ │ +
1179 typename = _RequireAllocator<_Allocator>>
│ │ │ +
1180 unordered_map(_InputIterator, _InputIterator, _Allocator)
│ │ │ +
1181 -> unordered_map<__iter_key_t<_InputIterator>,
│ │ │ +
1182 __iter_val_t<_InputIterator>,
│ │ │ +
1183 hash<__iter_key_t<_InputIterator>>,
│ │ │ +
1184 equal_to<__iter_key_t<_InputIterator>>,
│ │ │ +
1185 _Allocator>;
│ │ │ +
1186
│ │ │ +
1187 template<typename _InputIterator, typename _Hash, typename _Allocator,
│ │ │ +
1188 typename = _RequireInputIter<_InputIterator>,
│ │ │ +
1189 typename = _RequireNotAllocatorOrIntegral<_Hash>,
│ │ │ +
1190 typename = _RequireAllocator<_Allocator>>
│ │ │ +
1191 unordered_map(_InputIterator, _InputIterator,
│ │ │ + │ │ │ +
1193 _Hash, _Allocator)
│ │ │ +
1194 -> unordered_map<__iter_key_t<_InputIterator>,
│ │ │ +
1195 __iter_val_t<_InputIterator>, _Hash,
│ │ │ +
1196 equal_to<__iter_key_t<_InputIterator>>, _Allocator>;
│ │ │ +
1197
│ │ │ +
1198 template<typename _Key, typename _Tp, typename _Allocator,
│ │ │ +
1199 typename = _RequireAllocator<_Allocator>>
│ │ │ +
1200 unordered_map(initializer_list<pair<_Key, _Tp>>,
│ │ │ + │ │ │ +
1202 _Allocator)
│ │ │ +
1203 -> unordered_map<_Key, _Tp, hash<_Key>, equal_to<_Key>, _Allocator>;
│ │ │ +
1204
│ │ │ +
1205 template<typename _Key, typename _Tp, typename _Allocator,
│ │ │ +
1206 typename = _RequireAllocator<_Allocator>>
│ │ │ +
1207 unordered_map(initializer_list<pair<_Key, _Tp>>, _Allocator)
│ │ │ +
1208 -> unordered_map<_Key, _Tp, hash<_Key>, equal_to<_Key>, _Allocator>;
│ │ │ +
1209
│ │ │ +
1210 template<typename _Key, typename _Tp, typename _Hash, typename _Allocator,
│ │ │ +
1211 typename = _RequireNotAllocatorOrIntegral<_Hash>,
│ │ │ +
1212 typename = _RequireAllocator<_Allocator>>
│ │ │ +
1213 unordered_map(initializer_list<pair<_Key, _Tp>>,
│ │ │ + │ │ │ +
1215 _Hash, _Allocator)
│ │ │ +
1216 -> unordered_map<_Key, _Tp, _Hash, equal_to<_Key>, _Allocator>;
│ │ │ +
1217
│ │ │ +
1218#endif
│ │ │ +
1219
│ │ │ +
1220 /**
│ │ │ +
1221 * @brief A standard container composed of equivalent keys
│ │ │ +
1222 * (possibly containing multiple of each key value) that associates
│ │ │ +
1223 * values of another type with the keys.
│ │ │ +
1224 *
│ │ │ +
1225 * @ingroup unordered_associative_containers
│ │ │ +
1226 * @headerfile unordered_map
│ │ │ +
1227 * @since C++11
│ │ │ +
1228 *
│ │ │ +
1229 * @tparam _Key Type of key objects.
│ │ │ +
1230 * @tparam _Tp Type of mapped objects.
│ │ │ +
1231 * @tparam _Hash Hashing function object type, defaults to hash<_Value>.
│ │ │ +
1232 * @tparam _Pred Predicate function object type, defaults
│ │ │ +
1233 * to equal_to<_Value>.
│ │ │ +
1234 * @tparam _Alloc Allocator type, defaults to
│ │ │ +
1235 * std::allocator<std::pair<const _Key, _Tp>>.
│ │ │ +
1236 *
│ │ │ +
1237 * Meets the requirements of a <a href="tables.html#65">container</a>, and
│ │ │ +
1238 * <a href="tables.html#xx">unordered associative container</a>
│ │ │ +
1239 *
│ │ │ +
1240 * The resulting value type of the container is std::pair<const _Key, _Tp>.
│ │ │ +
1241 *
│ │ │ +
1242 * Base is _Hashtable, dispatched at compile time via template
│ │ │ +
1243 * alias __ummap_hashtable.
│ │ │ +
1244 */
│ │ │ +
1245 template<typename _Key, typename _Tp,
│ │ │ +
1246 typename _Hash = hash<_Key>,
│ │ │ +
1247 typename _Pred = equal_to<_Key>,
│ │ │ +
1248 typename _Alloc = allocator<std::pair<const _Key, _Tp>>>
│ │ │ +
│ │ │ + │ │ │ +
1250 {
│ │ │ + │ │ │ +
1252 _Hashtable _M_h;
│ │ │ +
1253
│ │ │ +
1254 public:
│ │ │ +
1255 // typedefs:
│ │ │ +
1256 ///@{
│ │ │ +
1257 /// Public typedefs.
│ │ │ +
1258 typedef typename _Hashtable::key_type key_type;
│ │ │ +
1259 typedef typename _Hashtable::value_type value_type;
│ │ │ +
1260 typedef typename _Hashtable::mapped_type mapped_type;
│ │ │ +
1261 typedef typename _Hashtable::hasher hasher;
│ │ │ +
1262 typedef typename _Hashtable::key_equal key_equal;
│ │ │ +
1263 typedef typename _Hashtable::allocator_type allocator_type;
│ │ │ +
1264 ///@}
│ │ │ +
1265
│ │ │ +
1266 ///@{
│ │ │ +
1267 /// Iterator-related typedefs.
│ │ │ +
1268 typedef typename _Hashtable::pointer pointer;
│ │ │ +
1269 typedef typename _Hashtable::const_pointer const_pointer;
│ │ │ +
1270 typedef typename _Hashtable::reference reference;
│ │ │ +
1271 typedef typename _Hashtable::const_reference const_reference;
│ │ │ +
1272 typedef typename _Hashtable::iterator iterator;
│ │ │ +
1273 typedef typename _Hashtable::const_iterator const_iterator;
│ │ │ +
1274 typedef typename _Hashtable::local_iterator local_iterator;
│ │ │ +
1275 typedef typename _Hashtable::const_local_iterator const_local_iterator;
│ │ │ +
1276 typedef typename _Hashtable::size_type size_type;
│ │ │ +
1277 typedef typename _Hashtable::difference_type difference_type;
│ │ │ +
1278 ///@}
│ │ │ +
1279
│ │ │ +
1280#if __cplusplus > 201402L
│ │ │ +
1281 using node_type = typename _Hashtable::node_type;
│ │ │ +
1282#endif
│ │ │ +
1283
│ │ │ +
1284 //construct/destroy/copy
│ │ │ +
1285
│ │ │ +
1286 /// Default constructor.
│ │ │ + │ │ │ +
1288
│ │ │ +
1289 /**
│ │ │ +
1290 * @brief Default constructor creates no elements.
│ │ │ +
1291 * @param __n Mnimal initial number of buckets.
│ │ │ +
1292 * @param __hf A hash functor.
│ │ │ +
1293 * @param __eql A key equality functor.
│ │ │ +
1294 * @param __a An allocator object.
│ │ │ +
1295 */
│ │ │ +
1296 explicit
│ │ │ +
│ │ │ + │ │ │ +
1298 const hasher& __hf = hasher(),
│ │ │ +
1299 const key_equal& __eql = key_equal(),
│ │ │ +
1300 const allocator_type& __a = allocator_type())
│ │ │ +
1301 : _M_h(__n, __hf, __eql, __a)
│ │ │ +
1302 { }
│ │ │ +
│ │ │ +
1303
│ │ │ +
1304 /**
│ │ │ +
1305 * @brief Builds an %unordered_multimap from a range.
│ │ │ +
1306 * @param __first An input iterator.
│ │ │ +
1307 * @param __last An input iterator.
│ │ │ +
1308 * @param __n Minimal initial number of buckets.
│ │ │ +
1309 * @param __hf A hash functor.
│ │ │ +
1310 * @param __eql A key equality functor.
│ │ │ +
1311 * @param __a An allocator object.
│ │ │ +
1312 *
│ │ │ +
1313 * Create an %unordered_multimap consisting of copies of the elements
│ │ │ +
1314 * from [__first,__last). This is linear in N (where N is
│ │ │ +
1315 * distance(__first,__last)).
│ │ │ +
1316 */
│ │ │ +
1317 template<typename _InputIterator>
│ │ │ +
│ │ │ + │ │ │ +
1319 size_type __n = 0,
│ │ │ +
1320 const hasher& __hf = hasher(),
│ │ │ +
1321 const key_equal& __eql = key_equal(),
│ │ │ +
1322 const allocator_type& __a = allocator_type())
│ │ │ +
1323 : _M_h(__first, __last, __n, __hf, __eql, __a)
│ │ │ +
1324 { }
│ │ │ +
│ │ │ +
1325
│ │ │ +
1326 /// Copy constructor.
│ │ │ + │ │ │ +
1328
│ │ │ +
1329 /// Move constructor.
│ │ │ + │ │ │ +
1331
│ │ │ +
1332 /**
│ │ │ +
1333 * @brief Creates an %unordered_multimap with no elements.
│ │ │ +
1334 * @param __a An allocator object.
│ │ │ +
1335 */
│ │ │ +
1336 explicit
│ │ │ +
│ │ │ + │ │ │ +
1338 : _M_h(__a)
│ │ │ +
1339 { }
│ │ │ +
│ │ │ +
1340
│ │ │ +
1341 /*
│ │ │ +
1342 * @brief Copy constructor with allocator argument.
│ │ │ +
1343 * @param __uset Input %unordered_multimap to copy.
│ │ │ +
1344 * @param __a An allocator object.
│ │ │ +
1345 */
│ │ │ + │ │ │ +
1347 const allocator_type& __a)
│ │ │ +
1348 : _M_h(__ummap._M_h, __a)
│ │ │ +
1349 { }
│ │ │ +
1350
│ │ │ +
1351 /*
│ │ │ +
1352 * @brief Move constructor with allocator argument.
│ │ │ +
1353 * @param __uset Input %unordered_multimap to move.
│ │ │ +
1354 * @param __a An allocator object.
│ │ │ +
1355 */
│ │ │ + │ │ │ +
1357 const allocator_type& __a)
│ │ │ +
1358 noexcept( noexcept(_Hashtable(std::move(__ummap._M_h), __a)) )
│ │ │ +
1359 : _M_h(std::move(__ummap._M_h), __a)
│ │ │ +
1360 { }
│ │ │ +
1361
│ │ │ +
1362 /**
│ │ │ +
1363 * @brief Builds an %unordered_multimap from an initializer_list.
│ │ │ +
1364 * @param __l An initializer_list.
│ │ │ +
1365 * @param __n Minimal initial number of buckets.
│ │ │ +
1366 * @param __hf A hash functor.
│ │ │ +
1367 * @param __eql A key equality functor.
│ │ │ +
1368 * @param __a An allocator object.
│ │ │ +
1369 *
│ │ │ +
1370 * Create an %unordered_multimap consisting of copies of the elements in
│ │ │ +
1371 * the list. This is linear in N (where N is @a __l.size()).
│ │ │ +
1372 */
│ │ │ +
│ │ │ + │ │ │ +
1374 size_type __n = 0,
│ │ │ +
1375 const hasher& __hf = hasher(),
│ │ │ +
1376 const key_equal& __eql = key_equal(),
│ │ │ +
1377 const allocator_type& __a = allocator_type())
│ │ │ +
1378 : _M_h(__l, __n, __hf, __eql, __a)
│ │ │ +
1379 { }
│ │ │ +
│ │ │ +
1380
│ │ │ + │ │ │ +
1382 : unordered_multimap(__n, hasher(), key_equal(), __a)
│ │ │ +
1383 { }
│ │ │ +
1384
│ │ │ +
1385 unordered_multimap(size_type __n, const hasher& __hf,
│ │ │ +
1386 const allocator_type& __a)
│ │ │ +
1387 : unordered_multimap(__n, __hf, key_equal(), __a)
│ │ │ +
1388 { }
│ │ │ +
1389
│ │ │ +
1390 template<typename _InputIterator>
│ │ │ +
1391 unordered_multimap(_InputIterator __first, _InputIterator __last,
│ │ │ +
1392 size_type __n,
│ │ │ +
1393 const allocator_type& __a)
│ │ │ +
1394 : unordered_multimap(__first, __last, __n, hasher(), key_equal(), __a)
│ │ │ +
1395 { }
│ │ │ +
1396
│ │ │ +
1397 template<typename _InputIterator>
│ │ │ +
1398 unordered_multimap(_InputIterator __first, _InputIterator __last,
│ │ │ +
1399 size_type __n, const hasher& __hf,
│ │ │ +
1400 const allocator_type& __a)
│ │ │ +
1401 : unordered_multimap(__first, __last, __n, __hf, key_equal(), __a)
│ │ │ +
1402 { }
│ │ │ +
1403
│ │ │ +
1404 unordered_multimap(initializer_list<value_type> __l,
│ │ │ +
1405 size_type __n,
│ │ │ +
1406 const allocator_type& __a)
│ │ │ +
1407 : unordered_multimap(__l, __n, hasher(), key_equal(), __a)
│ │ │ +
1408 { }
│ │ │ +
1409
│ │ │ +
1410 unordered_multimap(initializer_list<value_type> __l,
│ │ │ +
1411 size_type __n, const hasher& __hf,
│ │ │ +
1412 const allocator_type& __a)
│ │ │ +
1413 : unordered_multimap(__l, __n, __hf, key_equal(), __a)
│ │ │ +
1414 { }
│ │ │ +
1415
│ │ │ +
1416 /// Copy assignment operator.
│ │ │ + │ │ │ + │ │ │ +
1419
│ │ │ +
1420 /// Move assignment operator.
│ │ │ + │ │ │ + │ │ │ +
1423
│ │ │ +
1424 /**
│ │ │ +
1425 * @brief %Unordered_multimap list assignment operator.
│ │ │ +
1426 * @param __l An initializer_list.
│ │ │ +
1427 *
│ │ │ +
1428 * This function fills an %unordered_multimap with copies of the
│ │ │ +
1429 * elements in the initializer list @a __l.
│ │ │ +
1430 *
│ │ │ +
1431 * Note that the assignment completely changes the %unordered_multimap
│ │ │ +
1432 * and that the resulting %unordered_multimap's size is the same as the
│ │ │ +
1433 * number of elements assigned.
│ │ │ +
1434 */
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
1437 {
│ │ │ +
1438 _M_h = __l;
│ │ │ +
1439 return *this;
│ │ │ +
1440 }
│ │ │ +
│ │ │ +
1441
│ │ │ +
1442 /// Returns the allocator object used by the %unordered_multimap.
│ │ │ + │ │ │ +
│ │ │ +
1444 get_allocator() const noexcept
│ │ │ +
1445 { return _M_h.get_allocator(); }
│ │ │ +
│ │ │ +
1446
│ │ │ +
1447 // size and capacity:
│ │ │ +
1448
│ │ │ +
1449 /// Returns true if the %unordered_multimap is empty.
│ │ │ +
1450 _GLIBCXX_NODISCARD bool
│ │ │ +
│ │ │ +
1451 empty() const noexcept
│ │ │ +
1452 { return _M_h.empty(); }
│ │ │ +
│ │ │ +
1453
│ │ │ +
1454 /// Returns the size of the %unordered_multimap.
│ │ │ +
1455 size_type
│ │ │ +
│ │ │ +
1456 size() const noexcept
│ │ │ +
1457 { return _M_h.size(); }
│ │ │ +
│ │ │ +
1458
│ │ │ +
1459 /// Returns the maximum size of the %unordered_multimap.
│ │ │ +
1460 size_type
│ │ │ +
│ │ │ +
1461 max_size() const noexcept
│ │ │ +
1462 { return _M_h.max_size(); }
│ │ │ +
│ │ │ +
1463
│ │ │ +
1464 // iterators.
│ │ │ +
1465
│ │ │ +
1466 /**
│ │ │ +
1467 * Returns a read/write iterator that points to the first element in the
│ │ │ +
1468 * %unordered_multimap.
│ │ │ +
1469 */
│ │ │ +
1470 iterator
│ │ │ +
│ │ │ +
1471 begin() noexcept
│ │ │ +
1472 { return _M_h.begin(); }
│ │ │ +
│ │ │ +
1473
│ │ │ +
1474 ///@{
│ │ │ +
1475 /**
│ │ │ +
1476 * Returns a read-only (constant) iterator that points to the first
│ │ │ +
1477 * element in the %unordered_multimap.
│ │ │ +
1478 */
│ │ │ + │ │ │ +
│ │ │ +
1480 begin() const noexcept
│ │ │ +
1481 { return _M_h.begin(); }
│ │ │ +
│ │ │ +
1482
│ │ │ + │ │ │ +
│ │ │ +
1484 cbegin() const noexcept
│ │ │ +
1485 { return _M_h.begin(); }
│ │ │ +
│ │ │ +
1486 ///@}
│ │ │ +
1487
│ │ │ +
1488 /**
│ │ │ +
1489 * Returns a read/write iterator that points one past the last element in
│ │ │ +
1490 * the %unordered_multimap.
│ │ │ +
1491 */
│ │ │ +
1492 iterator
│ │ │ +
│ │ │ +
1493 end() noexcept
│ │ │ +
1494 { return _M_h.end(); }
│ │ │ +
│ │ │ +
1495
│ │ │ +
1496 ///@{
│ │ │ +
1497 /**
│ │ │ +
1498 * Returns a read-only (constant) iterator that points one past the last
│ │ │ +
1499 * element in the %unordered_multimap.
│ │ │ +
1500 */
│ │ │ + │ │ │ +
│ │ │ +
1502 end() const noexcept
│ │ │ +
1503 { return _M_h.end(); }
│ │ │ +
│ │ │ +
1504
│ │ │ + │ │ │ +
│ │ │ +
1506 cend() const noexcept
│ │ │ +
1507 { return _M_h.end(); }
│ │ │ +
│ │ │ +
1508 ///@}
│ │ │ +
1509
│ │ │ +
1510 // modifiers.
│ │ │ +
1511
│ │ │ +
1512 /**
│ │ │ +
1513 * @brief Attempts to build and insert a std::pair into the
│ │ │ +
1514 * %unordered_multimap.
│ │ │ +
1515 *
│ │ │ +
1516 * @param __args Arguments used to generate a new pair instance (see
│ │ │ +
1517 * std::piecewise_contruct for passing arguments to each
│ │ │ +
1518 * part of the pair constructor).
│ │ │ +
1519 *
│ │ │ +
1520 * @return An iterator that points to the inserted pair.
│ │ │ +
1521 *
│ │ │ +
1522 * This function attempts to build and insert a (key, value) %pair into
│ │ │ +
1523 * the %unordered_multimap.
│ │ │ +
1524 *
│ │ │ +
1525 * Insertion requires amortized constant time.
│ │ │ +
1526 */
│ │ │ +
1527 template<typename... _Args>
│ │ │ +
1528 iterator
│ │ │ +
│ │ │ + │ │ │ +
1530 { return _M_h.emplace(std::forward<_Args>(__args)...); }
│ │ │ +
│ │ │ +
1531
│ │ │ +
1532 /**
│ │ │ +
1533 * @brief Attempts to build and insert a std::pair into the
│ │ │ +
1534 * %unordered_multimap.
│ │ │ +
1535 *
│ │ │ +
1536 * @param __pos An iterator that serves as a hint as to where the pair
│ │ │ +
1537 * should be inserted.
│ │ │ +
1538 * @param __args Arguments used to generate a new pair instance (see
│ │ │ +
1539 * std::piecewise_contruct for passing arguments to each
│ │ │ +
1540 * part of the pair constructor).
│ │ │ +
1541 * @return An iterator that points to the element with key of the
│ │ │ +
1542 * std::pair built from @a __args.
│ │ │ +
1543 *
│ │ │ +
1544 * Note that the first parameter is only a hint and can potentially
│ │ │ +
1545 * improve the performance of the insertion process. A bad hint would
│ │ │ +
1546 * cause no gains in efficiency.
│ │ │ +
1547 *
│ │ │ +
1548 * See
│ │ │ +
1549 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/associative.html#containers.associative.insert_hints
│ │ │ +
1550 * for more on @a hinting.
│ │ │ +
1551 *
│ │ │ +
1552 * Insertion requires amortized constant time.
│ │ │ +
1553 */
│ │ │ +
1554 template<typename... _Args>
│ │ │ +
1555 iterator
│ │ │ +
│ │ │ + │ │ │ +
1557 { return _M_h.emplace_hint(__pos, std::forward<_Args>(__args)...); }
│ │ │ +
│ │ │ +
1558
│ │ │ +
1559 ///@{
│ │ │ +
1560 /**
│ │ │ +
1561 * @brief Inserts a std::pair into the %unordered_multimap.
│ │ │ +
1562 * @param __x Pair to be inserted (see std::make_pair for easy
│ │ │ +
1563 * creation of pairs).
│ │ │ +
1564 *
│ │ │ +
1565 * @return An iterator that points to the inserted pair.
│ │ │ +
1566 *
│ │ │ +
1567 * Insertion requires amortized constant time.
│ │ │ +
1568 */
│ │ │ +
1569 iterator
│ │ │ +
│ │ │ +
1570 insert(const value_type& __x)
│ │ │ +
1571 { return _M_h.insert(__x); }
│ │ │ +
│ │ │ +
1572
│ │ │ +
1573 iterator
│ │ │ +
│ │ │ + │ │ │ +
1575 { return _M_h.insert(std::move(__x)); }
│ │ │ +
│ │ │ +
1576
│ │ │ +
1577 template<typename _Pair>
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
1580 { return _M_h.emplace(std::forward<_Pair>(__x)); }
│ │ │ +
│ │ │ +
1581 ///@}
│ │ │ +
1582
│ │ │ +
1583 ///@{
│ │ │ +
1584 /**
│ │ │ +
1585 * @brief Inserts a std::pair into the %unordered_multimap.
│ │ │ +
1586 * @param __hint An iterator that serves as a hint as to where the
│ │ │ +
1587 * pair should be inserted.
│ │ │ +
1588 * @param __x Pair to be inserted (see std::make_pair for easy creation
│ │ │ +
1589 * of pairs).
│ │ │ +
1590 * @return An iterator that points to the element with key of
│ │ │ +
1591 * @a __x (may or may not be the %pair passed in).
│ │ │ +
1592 *
│ │ │ +
1593 * Note that the first parameter is only a hint and can potentially
│ │ │ +
1594 * improve the performance of the insertion process. A bad hint would
│ │ │ +
1595 * cause no gains in efficiency.
│ │ │ +
1596 *
│ │ │ +
1597 * See
│ │ │ +
1598 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/associative.html#containers.associative.insert_hints
│ │ │ +
1599 * for more on @a hinting.
│ │ │ +
1600 *
│ │ │ +
1601 * Insertion requires amortized constant time.
│ │ │ +
1602 */
│ │ │ +
1603 iterator
│ │ │ +
│ │ │ + │ │ │ +
1605 { return _M_h.insert(__hint, __x); }
│ │ │ +
│ │ │ +
1606
│ │ │ +
1607 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ +
1608 // 2354. Unnecessary copying when inserting into maps with braced-init
│ │ │ +
1609 iterator
│ │ │ +
│ │ │ + │ │ │ +
1611 { return _M_h.insert(__hint, std::move(__x)); }
│ │ │ +
│ │ │ +
1612
│ │ │ +
1613 template<typename _Pair>
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
1616 { return _M_h.emplace_hint(__hint, std::forward<_Pair>(__x)); }
│ │ │ +
│ │ │ +
1617 ///@}
│ │ │ +
1618
│ │ │ +
1619 /**
│ │ │ +
1620 * @brief A template function that attempts to insert a range of
│ │ │ +
1621 * elements.
│ │ │ +
1622 * @param __first Iterator pointing to the start of the range to be
│ │ │ +
1623 * inserted.
│ │ │ +
1624 * @param __last Iterator pointing to the end of the range.
│ │ │ +
1625 *
│ │ │ +
1626 * Complexity similar to that of the range constructor.
│ │ │ +
1627 */
│ │ │ +
1628 template<typename _InputIterator>
│ │ │ +
1629 void
│ │ │ +
│ │ │ + │ │ │ +
1631 { _M_h.insert(__first, __last); }
│ │ │ +
│ │ │ +
1632
│ │ │ +
1633 /**
│ │ │ +
1634 * @brief Attempts to insert a list of elements into the
│ │ │ +
1635 * %unordered_multimap.
│ │ │ +
1636 * @param __l A std::initializer_list<value_type> of elements
│ │ │ +
1637 * to be inserted.
│ │ │ +
1638 *
│ │ │ +
1639 * Complexity similar to that of the range constructor.
│ │ │ +
1640 */
│ │ │ +
1641 void
│ │ │ +
│ │ │ + │ │ │ +
1643 { _M_h.insert(__l); }
│ │ │ +
│ │ │ +
1644
│ │ │ +
1645#if __cplusplus > 201402L
│ │ │ +
1646 /// Extract a node.
│ │ │ +
1647 node_type
│ │ │ +
│ │ │ + │ │ │ +
1649 {
│ │ │ +
1650 __glibcxx_assert(__pos != end());
│ │ │ +
1651 return _M_h.extract(__pos);
│ │ │ +
1652 }
│ │ │ +
│ │ │ +
1653
│ │ │ +
1654 /// Extract a node.
│ │ │ +
1655 node_type
│ │ │ +
│ │ │ + │ │ │ +
1657 { return _M_h.extract(__key); }
│ │ │ +
│ │ │ +
1658
│ │ │ +
1659 /// Re-insert an extracted node.
│ │ │ +
1660 iterator
│ │ │ +
│ │ │ +
1661 insert(node_type&& __nh)
│ │ │ +
1662 { return _M_h._M_reinsert_node_multi(cend(), std::move(__nh)); }
│ │ │ +
│ │ │ +
1663
│ │ │ +
1664 /// Re-insert an extracted node.
│ │ │ +
1665 iterator
│ │ │ +
│ │ │ + │ │ │ +
1667 { return _M_h._M_reinsert_node_multi(__hint, std::move(__nh)); }
│ │ │ +
│ │ │ +
1668#endif // C++17
│ │ │ +
1669
│ │ │ +
1670 ///@{
│ │ │ +
1671 /**
│ │ │ +
1672 * @brief Erases an element from an %unordered_multimap.
│ │ │ +
1673 * @param __position An iterator pointing to the element to be erased.
│ │ │ +
1674 * @return An iterator pointing to the element immediately following
│ │ │ +
1675 * @a __position prior to the element being erased. If no such
│ │ │ +
1676 * element exists, end() is returned.
│ │ │ +
1677 *
│ │ │ +
1678 * This function erases an element, pointed to by the given iterator,
│ │ │ +
1679 * from an %unordered_multimap.
│ │ │ +
1680 * Note that this function only erases the element, and that if the
│ │ │ +
1681 * element is itself a pointer, the pointed-to memory is not touched in
│ │ │ +
1682 * any way. Managing the pointer is the user's responsibility.
│ │ │ +
1683 */
│ │ │ +
1684 iterator
│ │ │ +
│ │ │ + │ │ │ +
1686 { return _M_h.erase(__position); }
│ │ │ +
│ │ │ +
1687
│ │ │ +
1688 // LWG 2059.
│ │ │ +
1689 iterator
│ │ │ +
│ │ │ + │ │ │ +
1691 { return _M_h.erase(__position); }
│ │ │ +
│ │ │ +
1692 ///@}
│ │ │ +
1693
│ │ │ +
1694 /**
│ │ │ +
1695 * @brief Erases elements according to the provided key.
│ │ │ +
1696 * @param __x Key of elements to be erased.
│ │ │ +
1697 * @return The number of elements erased.
│ │ │ +
1698 *
│ │ │ +
1699 * This function erases all the elements located by the given key from
│ │ │ +
1700 * an %unordered_multimap.
│ │ │ +
1701 * Note that this function only erases the element, and that if the
│ │ │ +
1702 * element is itself a pointer, the pointed-to memory is not touched in
│ │ │ +
1703 * any way. Managing the pointer is the user's responsibility.
│ │ │ +
1704 */
│ │ │ +
1705 size_type
│ │ │ +
│ │ │ +
1706 erase(const key_type& __x)
│ │ │ +
1707 { return _M_h.erase(__x); }
│ │ │ +
│ │ │ +
1708
│ │ │ +
1709 /**
│ │ │ +
1710 * @brief Erases a [__first,__last) range of elements from an
│ │ │ +
1711 * %unordered_multimap.
│ │ │ +
1712 * @param __first Iterator pointing to the start of the range to be
│ │ │ +
1713 * erased.
│ │ │ +
1714 * @param __last Iterator pointing to the end of the range to
│ │ │ +
1715 * be erased.
│ │ │ +
1716 * @return The iterator @a __last.
│ │ │ +
1717 *
│ │ │ +
1718 * This function erases a sequence of elements from an
│ │ │ +
1719 * %unordered_multimap.
│ │ │ +
1720 * Note that this function only erases the elements, and that if
│ │ │ +
1721 * the element is itself a pointer, the pointed-to memory is not touched
│ │ │ +
1722 * in any way. Managing the pointer is the user's responsibility.
│ │ │ +
1723 */
│ │ │ +
1724 iterator
│ │ │ +
│ │ │ + │ │ │ +
1726 { return _M_h.erase(__first, __last); }
│ │ │ +
│ │ │ +
1727
│ │ │ +
1728 /**
│ │ │ +
1729 * Erases all elements in an %unordered_multimap.
│ │ │ +
1730 * Note that this function only erases the elements, and that if the
│ │ │ +
1731 * elements themselves are pointers, the pointed-to memory is not touched
│ │ │ +
1732 * in any way. Managing the pointer is the user's responsibility.
│ │ │ +
1733 */
│ │ │ +
1734 void
│ │ │ +
│ │ │ +
1735 clear() noexcept
│ │ │ +
1736 { _M_h.clear(); }
│ │ │ +
│ │ │ +
1737
│ │ │ +
1738 /**
│ │ │ +
1739 * @brief Swaps data with another %unordered_multimap.
│ │ │ +
1740 * @param __x An %unordered_multimap of the same element and allocator
│ │ │ +
1741 * types.
│ │ │ +
1742 *
│ │ │ +
1743 * This exchanges the elements between two %unordered_multimap in
│ │ │ +
1744 * constant time.
│ │ │ +
1745 * Note that the global std::swap() function is specialized such that
│ │ │ +
1746 * std::swap(m1,m2) will feed to this function.
│ │ │ +
1747 */
│ │ │ +
1748 void
│ │ │ +
│ │ │ + │ │ │ +
1750 noexcept( noexcept(_M_h.swap(__x._M_h)) )
│ │ │ +
1751 { _M_h.swap(__x._M_h); }
│ │ │ +
│ │ │ +
1752
│ │ │ +
1753#if __cplusplus > 201402L
│ │ │ +
1754 template<typename, typename, typename>
│ │ │ +
1755 friend class std::_Hash_merge_helper;
│ │ │ +
1756
│ │ │ +
1757 template<typename _H2, typename _P2>
│ │ │ +
1758 void
│ │ │ + │ │ │ +
1760 {
│ │ │ +
1761 using _Merge_helper
│ │ │ + │ │ │ +
1763 _M_h._M_merge_multi(_Merge_helper::_S_get_table(__source));
│ │ │ +
1764 }
│ │ │ +
1765
│ │ │ +
1766 template<typename _H2, typename _P2>
│ │ │ +
1767 void
│ │ │ +
1768 merge(unordered_multimap<_Key, _Tp, _H2, _P2, _Alloc>&& __source)
│ │ │ +
1769 { merge(__source); }
│ │ │ +
1770
│ │ │ +
1771 template<typename _H2, typename _P2>
│ │ │ +
1772 void
│ │ │ +
1773 merge(unordered_map<_Key, _Tp, _H2, _P2, _Alloc>& __source)
│ │ │ +
1774 {
│ │ │ +
1775 using _Merge_helper
│ │ │ +
1776 = _Hash_merge_helper<unordered_multimap, _H2, _P2>;
│ │ │ +
1777 _M_h._M_merge_multi(_Merge_helper::_S_get_table(__source));
│ │ │ +
1778 }
│ │ │ +
1779
│ │ │ +
1780 template<typename _H2, typename _P2>
│ │ │ +
1781 void
│ │ │ +
1782 merge(unordered_map<_Key, _Tp, _H2, _P2, _Alloc>&& __source)
│ │ │ +
1783 { merge(__source); }
│ │ │ +
1784#endif // C++17
│ │ │ +
1785
│ │ │ +
1786 // observers.
│ │ │ +
1787
│ │ │ +
1788 /// Returns the hash functor object with which the %unordered_multimap
│ │ │ +
1789 /// was constructed.
│ │ │ +
1790 hasher
│ │ │ +
│ │ │ + │ │ │ +
1792 { return _M_h.hash_function(); }
│ │ │ +
│ │ │ +
1793
│ │ │ +
1794 /// Returns the key comparison object with which the %unordered_multimap
│ │ │ +
1795 /// was constructed.
│ │ │ +
1796 key_equal
│ │ │ +
│ │ │ +
1797 key_eq() const
│ │ │ +
1798 { return _M_h.key_eq(); }
│ │ │ +
│ │ │ +
1799
│ │ │ +
1800 // lookup.
│ │ │ +
1801
│ │ │ +
1802 ///@{
│ │ │ +
1803 /**
│ │ │ +
1804 * @brief Tries to locate an element in an %unordered_multimap.
│ │ │ +
1805 * @param __x Key to be located.
│ │ │ +
1806 * @return Iterator pointing to sought-after element, or end() if not
│ │ │ +
1807 * found.
│ │ │ +
1808 *
│ │ │ +
1809 * This function takes a key and tries to locate the element with which
│ │ │ +
1810 * the key matches. If successful the function returns an iterator
│ │ │ +
1811 * pointing to the sought after element. If unsuccessful it returns the
│ │ │ +
1812 * past-the-end ( @c end() ) iterator.
│ │ │ +
1813 */
│ │ │ +
1814 iterator
│ │ │ +
│ │ │ +
1815 find(const key_type& __x)
│ │ │ +
1816 { return _M_h.find(__x); }
│ │ │ +
│ │ │ +
1817
│ │ │ +
1818#if __cplusplus > 201703L
│ │ │ +
1819 template<typename _Kt>
│ │ │ +
1820 auto
│ │ │ +
│ │ │ +
1821 find(const _Kt& __x) -> decltype(_M_h._M_find_tr(__x))
│ │ │ +
1822 { return _M_h._M_find_tr(__x); }
│ │ │ +
│ │ │ +
1823#endif
│ │ │ +
1824
│ │ │ + │ │ │ +
│ │ │ +
1826 find(const key_type& __x) const
│ │ │ +
1827 { return _M_h.find(__x); }
│ │ │ +
│ │ │ +
1828
│ │ │ +
1829#if __cplusplus > 201703L
│ │ │ +
1830 template<typename _Kt>
│ │ │ +
1831 auto
│ │ │ +
│ │ │ +
1832 find(const _Kt& __x) const -> decltype(_M_h._M_find_tr(__x))
│ │ │ +
1833 { return _M_h._M_find_tr(__x); }
│ │ │ +
│ │ │ +
1834#endif
│ │ │ +
1835 ///@}
│ │ │ +
1836
│ │ │ +
1837 ///@{
│ │ │ +
1838 /**
│ │ │ +
1839 * @brief Finds the number of elements.
│ │ │ +
1840 * @param __x Key to count.
│ │ │ +
1841 * @return Number of elements with specified key.
│ │ │ +
1842 */
│ │ │ +
1843 size_type
│ │ │ +
│ │ │ +
1844 count(const key_type& __x) const
│ │ │ +
1845 { return _M_h.count(__x); }
│ │ │ +
│ │ │ +
1846
│ │ │ +
1847#if __cplusplus > 201703L
│ │ │ +
1848 template<typename _Kt>
│ │ │ +
1849 auto
│ │ │ +
│ │ │ +
1850 count(const _Kt& __x) const -> decltype(_M_h._M_count_tr(__x))
│ │ │ +
1851 { return _M_h._M_count_tr(__x); }
│ │ │ +
│ │ │ +
1852#endif
│ │ │ +
1853 ///@}
│ │ │ +
1854
│ │ │ +
1855#if __cplusplus > 201703L
│ │ │ +
1856 ///@{
│ │ │ +
1857 /**
│ │ │ +
1858 * @brief Finds whether an element with the given key exists.
│ │ │ +
1859 * @param __x Key of elements to be located.
│ │ │ +
1860 * @return True if there is any element with the specified key.
│ │ │ +
1861 */
│ │ │ +
1862 bool
│ │ │ +
│ │ │ +
1863 contains(const key_type& __x) const
│ │ │ +
1864 { return _M_h.find(__x) != _M_h.end(); }
│ │ │ +
│ │ │ +
1865
│ │ │ +
1866 template<typename _Kt>
│ │ │ +
1867 auto
│ │ │ +
│ │ │ +
1868 contains(const _Kt& __x) const
│ │ │ +
1869 -> decltype(_M_h._M_find_tr(__x), void(), true)
│ │ │ +
1870 { return _M_h._M_find_tr(__x) != _M_h.end(); }
│ │ │ +
│ │ │ +
1871 ///@}
│ │ │ +
1872#endif
│ │ │ +
1873
│ │ │ +
1874 ///@{
│ │ │ +
1875 /**
│ │ │ +
1876 * @brief Finds a subsequence matching given key.
│ │ │ +
1877 * @param __x Key to be located.
│ │ │ +
1878 * @return Pair of iterators that possibly points to the subsequence
│ │ │ +
1879 * matching given key.
│ │ │ +
1880 */
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
1883 { return _M_h.equal_range(__x); }
│ │ │ +
│ │ │ +
1884
│ │ │ +
1885#if __cplusplus > 201703L
│ │ │ +
1886 template<typename _Kt>
│ │ │ +
1887 auto
│ │ │ +
│ │ │ +
1888 equal_range(const _Kt& __x)
│ │ │ +
1889 -> decltype(_M_h._M_equal_range_tr(__x))
│ │ │ +
1890 { return _M_h._M_equal_range_tr(__x); }
│ │ │ +
│ │ │ +
1891#endif
│ │ │ +
1892
│ │ │ + │ │ │ +
│ │ │ +
1894 equal_range(const key_type& __x) const
│ │ │ +
1895 { return _M_h.equal_range(__x); }
│ │ │ +
│ │ │ +
1896
│ │ │ +
1897#if __cplusplus > 201703L
│ │ │ +
1898 template<typename _Kt>
│ │ │ +
1899 auto
│ │ │ +
│ │ │ +
1900 equal_range(const _Kt& __x) const
│ │ │ +
1901 -> decltype(_M_h._M_equal_range_tr(__x))
│ │ │ +
1902 { return _M_h._M_equal_range_tr(__x); }
│ │ │ +
│ │ │ +
1903#endif
│ │ │ +
1904 ///@}
│ │ │ +
1905
│ │ │ +
1906 // bucket interface.
│ │ │ +
1907
│ │ │ +
1908 /// Returns the number of buckets of the %unordered_multimap.
│ │ │ +
1909 size_type
│ │ │ +
│ │ │ +
1910 bucket_count() const noexcept
│ │ │ +
1911 { return _M_h.bucket_count(); }
│ │ │ +
│ │ │ +
1912
│ │ │ +
1913 /// Returns the maximum number of buckets of the %unordered_multimap.
│ │ │ +
1914 size_type
│ │ │ +
│ │ │ +
1915 max_bucket_count() const noexcept
│ │ │ +
1916 { return _M_h.max_bucket_count(); }
│ │ │ +
│ │ │ +
1917
│ │ │ +
1918 /*
│ │ │ +
1919 * @brief Returns the number of elements in a given bucket.
│ │ │ +
1920 * @param __n A bucket index.
│ │ │ +
1921 * @return The number of elements in the bucket.
│ │ │ +
1922 */
│ │ │ +
1923 size_type
│ │ │ +
1924 bucket_size(size_type __n) const
│ │ │ +
1925 { return _M_h.bucket_size(__n); }
│ │ │ +
1926
│ │ │ +
1927 /*
│ │ │ +
1928 * @brief Returns the bucket index of a given element.
│ │ │ +
1929 * @param __key A key instance.
│ │ │ +
1930 * @return The key bucket index.
│ │ │ +
1931 */
│ │ │ +
1932 size_type
│ │ │ +
1933 bucket(const key_type& __key) const
│ │ │ +
1934 { return _M_h.bucket(__key); }
│ │ │ +
1935
│ │ │ +
1936 /**
│ │ │ +
1937 * @brief Returns a read/write iterator pointing to the first bucket
│ │ │ +
1938 * element.
│ │ │ +
1939 * @param __n The bucket index.
│ │ │ +
1940 * @return A read/write local iterator.
│ │ │ +
1941 */
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
1944 { return _M_h.begin(__n); }
│ │ │ +
│ │ │ +
1945
│ │ │ +
1946 ///@{
│ │ │ +
1947 /**
│ │ │ +
1948 * @brief Returns a read-only (constant) iterator pointing to the first
│ │ │ +
1949 * bucket element.
│ │ │ +
1950 * @param __n The bucket index.
│ │ │ +
1951 * @return A read-only local iterator.
│ │ │ +
1952 */
│ │ │ + │ │ │ +
│ │ │ +
1954 begin(size_type __n) const
│ │ │ +
1955 { return _M_h.begin(__n); }
│ │ │ +
│ │ │ +
1956
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
1959 { return _M_h.cbegin(__n); }
│ │ │ +
│ │ │ +
1960 ///@}
│ │ │ +
1961
│ │ │ +
1962 /**
│ │ │ +
1963 * @brief Returns a read/write iterator pointing to one past the last
│ │ │ +
1964 * bucket elements.
│ │ │ +
1965 * @param __n The bucket index.
│ │ │ +
1966 * @return A read/write local iterator.
│ │ │ +
1967 */
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
1970 { return _M_h.end(__n); }
│ │ │ +
│ │ │ +
1971
│ │ │ +
1972 ///@{
│ │ │ +
1973 /**
│ │ │ +
1974 * @brief Returns a read-only (constant) iterator pointing to one past
│ │ │ +
1975 * the last bucket elements.
│ │ │ +
1976 * @param __n The bucket index.
│ │ │ +
1977 * @return A read-only local iterator.
│ │ │ +
1978 */
│ │ │ + │ │ │ +
│ │ │ +
1980 end(size_type __n) const
│ │ │ +
1981 { return _M_h.end(__n); }
│ │ │ +
│ │ │ +
1982
│ │ │ + │ │ │ +
│ │ │ +
1984 cend(size_type __n) const
│ │ │ +
1985 { return _M_h.cend(__n); }
│ │ │ +
│ │ │ +
1986 ///@}
│ │ │ +
1987
│ │ │ +
1988 // hash policy.
│ │ │ +
1989
│ │ │ +
1990 /// Returns the average number of elements per bucket.
│ │ │ +
1991 float
│ │ │ +
│ │ │ +
1992 load_factor() const noexcept
│ │ │ +
1993 { return _M_h.load_factor(); }
│ │ │ +
│ │ │ +
1994
│ │ │ +
1995 /// Returns a positive number that the %unordered_multimap tries to keep
│ │ │ +
1996 /// the load factor less than or equal to.
│ │ │ +
1997 float
│ │ │ +
│ │ │ +
1998 max_load_factor() const noexcept
│ │ │ +
1999 { return _M_h.max_load_factor(); }
│ │ │ +
│ │ │ +
2000
│ │ │ +
2001 /**
│ │ │ +
2002 * @brief Change the %unordered_multimap maximum load factor.
│ │ │ +
2003 * @param __z The new maximum load factor.
│ │ │ +
2004 */
│ │ │ +
2005 void
│ │ │ +
│ │ │ + │ │ │ +
2007 { _M_h.max_load_factor(__z); }
│ │ │ +
│ │ │ +
2008
│ │ │ +
2009 /**
│ │ │ +
2010 * @brief May rehash the %unordered_multimap.
│ │ │ +
2011 * @param __n The new number of buckets.
│ │ │ +
2012 *
│ │ │ +
2013 * Rehash will occur only if the new number of buckets respect the
│ │ │ +
2014 * %unordered_multimap maximum load factor.
│ │ │ +
2015 */
│ │ │ +
2016 void
│ │ │ +
│ │ │ + │ │ │ +
2018 { _M_h.rehash(__n); }
│ │ │ +
│ │ │ +
2019
│ │ │ +
2020 /**
│ │ │ +
2021 * @brief Prepare the %unordered_multimap for a specified number of
│ │ │ +
2022 * elements.
│ │ │ +
2023 * @param __n Number of elements required.
│ │ │ +
2024 *
│ │ │ +
2025 * Same as rehash(ceil(n / max_load_factor())).
│ │ │ +
2026 */
│ │ │ +
2027 void
│ │ │ +
│ │ │ + │ │ │ +
2029 { _M_h.reserve(__n); }
│ │ │ +
│ │ │ +
2030
│ │ │ +
2031 template<typename _Key1, typename _Tp1, typename _Hash1, typename _Pred1,
│ │ │ +
2032 typename _Alloc1>
│ │ │ +
2033 friend bool
│ │ │ +
2034 operator==(const unordered_multimap<_Key1, _Tp1,
│ │ │ +
2035 _Hash1, _Pred1, _Alloc1>&,
│ │ │ + │ │ │ +
2037 _Hash1, _Pred1, _Alloc1>&);
│ │ │ +
2038 };
│ │ │ +
│ │ │ +
2039
│ │ │ +
2040#if __cpp_deduction_guides >= 201606
│ │ │ +
2041
│ │ │ +
2042 template<typename _InputIterator,
│ │ │ +
2043 typename _Hash = hash<__iter_key_t<_InputIterator>>,
│ │ │ +
2044 typename _Pred = equal_to<__iter_key_t<_InputIterator>>,
│ │ │ +
2045 typename _Allocator = allocator<__iter_to_alloc_t<_InputIterator>>,
│ │ │ +
2046 typename = _RequireInputIter<_InputIterator>,
│ │ │ +
2047 typename = _RequireNotAllocatorOrIntegral<_Hash>,
│ │ │ +
2048 typename = _RequireNotAllocator<_Pred>,
│ │ │ +
2049 typename = _RequireAllocator<_Allocator>>
│ │ │ +
2050 unordered_multimap(_InputIterator, _InputIterator,
│ │ │ + │ │ │ +
2052 _Hash = _Hash(), _Pred = _Pred(),
│ │ │ +
2053 _Allocator = _Allocator())
│ │ │ +
2054 -> unordered_multimap<__iter_key_t<_InputIterator>,
│ │ │ +
2055 __iter_val_t<_InputIterator>, _Hash, _Pred,
│ │ │ +
2056 _Allocator>;
│ │ │ +
2057
│ │ │ +
2058 template<typename _Key, typename _Tp, typename _Hash = hash<_Key>,
│ │ │ +
2059 typename _Pred = equal_to<_Key>,
│ │ │ +
2060 typename _Allocator = allocator<pair<const _Key, _Tp>>,
│ │ │ +
2061 typename = _RequireNotAllocatorOrIntegral<_Hash>,
│ │ │ +
2062 typename = _RequireNotAllocator<_Pred>,
│ │ │ +
2063 typename = _RequireAllocator<_Allocator>>
│ │ │ +
2064 unordered_multimap(initializer_list<pair<_Key, _Tp>>,
│ │ │ + │ │ │ +
2066 _Hash = _Hash(), _Pred = _Pred(),
│ │ │ +
2067 _Allocator = _Allocator())
│ │ │ +
2068 -> unordered_multimap<_Key, _Tp, _Hash, _Pred, _Allocator>;
│ │ │ +
2069
│ │ │ +
2070 template<typename _InputIterator, typename _Allocator,
│ │ │ +
2071 typename = _RequireInputIter<_InputIterator>,
│ │ │ +
2072 typename = _RequireAllocator<_Allocator>>
│ │ │ +
2073 unordered_multimap(_InputIterator, _InputIterator,
│ │ │ + │ │ │ +
2075 -> unordered_multimap<__iter_key_t<_InputIterator>,
│ │ │ +
2076 __iter_val_t<_InputIterator>,
│ │ │ +
2077 hash<__iter_key_t<_InputIterator>>,
│ │ │ +
2078 equal_to<__iter_key_t<_InputIterator>>, _Allocator>;
│ │ │ +
2079
│ │ │ +
2080 template<typename _InputIterator, typename _Allocator,
│ │ │ +
2081 typename = _RequireInputIter<_InputIterator>,
│ │ │ +
2082 typename = _RequireAllocator<_Allocator>>
│ │ │ +
2083 unordered_multimap(_InputIterator, _InputIterator, _Allocator)
│ │ │ +
2084 -> unordered_multimap<__iter_key_t<_InputIterator>,
│ │ │ +
2085 __iter_val_t<_InputIterator>,
│ │ │ +
2086 hash<__iter_key_t<_InputIterator>>,
│ │ │ +
2087 equal_to<__iter_key_t<_InputIterator>>, _Allocator>;
│ │ │ +
2088
│ │ │ +
2089 template<typename _InputIterator, typename _Hash, typename _Allocator,
│ │ │ +
2090 typename = _RequireInputIter<_InputIterator>,
│ │ │ +
2091 typename = _RequireNotAllocatorOrIntegral<_Hash>,
│ │ │ +
2092 typename = _RequireAllocator<_Allocator>>
│ │ │ +
2093 unordered_multimap(_InputIterator, _InputIterator,
│ │ │ + │ │ │ +
2095 _Allocator)
│ │ │ +
2096 -> unordered_multimap<__iter_key_t<_InputIterator>,
│ │ │ +
2097 __iter_val_t<_InputIterator>, _Hash,
│ │ │ +
2098 equal_to<__iter_key_t<_InputIterator>>, _Allocator>;
│ │ │ +
2099
│ │ │ +
2100 template<typename _Key, typename _Tp, typename _Allocator,
│ │ │ +
2101 typename = _RequireAllocator<_Allocator>>
│ │ │ +
2102 unordered_multimap(initializer_list<pair<_Key, _Tp>>,
│ │ │ + │ │ │ +
2104 _Allocator)
│ │ │ +
2105 -> unordered_multimap<_Key, _Tp, hash<_Key>, equal_to<_Key>, _Allocator>;
│ │ │ +
2106
│ │ │ +
2107 template<typename _Key, typename _Tp, typename _Allocator,
│ │ │ +
2108 typename = _RequireAllocator<_Allocator>>
│ │ │ +
2109 unordered_multimap(initializer_list<pair<_Key, _Tp>>, _Allocator)
│ │ │ +
2110 -> unordered_multimap<_Key, _Tp, hash<_Key>, equal_to<_Key>, _Allocator>;
│ │ │ +
2111
│ │ │ +
2112 template<typename _Key, typename _Tp, typename _Hash, typename _Allocator,
│ │ │ +
2113 typename = _RequireNotAllocatorOrIntegral<_Hash>,
│ │ │ +
2114 typename = _RequireAllocator<_Allocator>>
│ │ │ +
2115 unordered_multimap(initializer_list<pair<_Key, _Tp>>,
│ │ │ + │ │ │ +
2117 _Hash, _Allocator)
│ │ │ +
2118 -> unordered_multimap<_Key, _Tp, _Hash, equal_to<_Key>, _Allocator>;
│ │ │ +
2119
│ │ │ +
2120#endif
│ │ │ +
2121
│ │ │ +
2122 template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
│ │ │ +
2123 inline void
│ │ │ +
2124 swap(unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
│ │ │ +
2125 unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
│ │ │ +
2126 noexcept(noexcept(__x.swap(__y)))
│ │ │ +
2127 { __x.swap(__y); }
│ │ │ +
2128
│ │ │ +
2129 template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
│ │ │ +
2130 inline void
│ │ │ +
2131 swap(unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
│ │ │ +
2132 unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
│ │ │ +
2133 noexcept(noexcept(__x.swap(__y)))
│ │ │ +
2134 { __x.swap(__y); }
│ │ │ +
2135
│ │ │ +
2136 template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
│ │ │ +
2137 inline bool
│ │ │ +
2138 operator==(const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
│ │ │ +
2139 const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
│ │ │ +
2140 { return __x._M_h._M_equal(__y._M_h); }
│ │ │ +
2141
│ │ │ +
2142#if __cpp_impl_three_way_comparison < 201907L
│ │ │ +
2143 template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
│ │ │ +
2144 inline bool
│ │ │ +
2145 operator!=(const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
│ │ │ +
2146 const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
│ │ │ +
2147 { return !(__x == __y); }
│ │ │ +
2148#endif
│ │ │ +
2149
│ │ │ +
2150 template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
│ │ │ +
2151 inline bool
│ │ │ +
2152 operator==(const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
│ │ │ +
2153 const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
│ │ │ +
2154 { return __x._M_h._M_equal(__y._M_h); }
│ │ │ +
2155
│ │ │ +
2156#if __cpp_impl_three_way_comparison < 201907L
│ │ │ +
2157 template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
│ │ │ +
2158 inline bool
│ │ │ +
2159 operator!=(const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
│ │ │ +
2160 const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
│ │ │ +
2161 { return !(__x == __y); }
│ │ │ +
2162#endif
│ │ │ +
2163
│ │ │ +
2164_GLIBCXX_END_NAMESPACE_CONTAINER
│ │ │ +
2165
│ │ │ +
2166#if __cplusplus > 201402L
│ │ │ +
2167 // Allow std::unordered_map access to internals of compatible maps.
│ │ │ +
2168 template<typename _Key, typename _Val, typename _Hash1, typename _Eq1,
│ │ │ +
2169 typename _Alloc, typename _Hash2, typename _Eq2>
│ │ │ +
2170 struct _Hash_merge_helper<
│ │ │ +
2171 _GLIBCXX_STD_C::unordered_map<_Key, _Val, _Hash1, _Eq1, _Alloc>,
│ │ │ +
2172 _Hash2, _Eq2>
│ │ │ +
2173 {
│ │ │ +
2174 private:
│ │ │ +
2175 template<typename... _Tp>
│ │ │ +
2176 using unordered_map = _GLIBCXX_STD_C::unordered_map<_Tp...>;
│ │ │ +
2177 template<typename... _Tp>
│ │ │ +
2178 using unordered_multimap = _GLIBCXX_STD_C::unordered_multimap<_Tp...>;
│ │ │ +
2179
│ │ │ +
2180 friend unordered_map<_Key, _Val, _Hash1, _Eq1, _Alloc>;
│ │ │ +
2181
│ │ │ +
2182 static auto&
│ │ │ +
2183 _S_get_table(unordered_map<_Key, _Val, _Hash2, _Eq2, _Alloc>& __map)
│ │ │ +
2184 { return __map._M_h; }
│ │ │ +
2185
│ │ │ +
2186 static auto&
│ │ │ +
2187 _S_get_table(unordered_multimap<_Key, _Val, _Hash2, _Eq2, _Alloc>& __map)
│ │ │ +
2188 { return __map._M_h; }
│ │ │ +
2189 };
│ │ │ +
2190
│ │ │ +
2191 // Allow std::unordered_multimap access to internals of compatible maps.
│ │ │ +
2192 template<typename _Key, typename _Val, typename _Hash1, typename _Eq1,
│ │ │ +
2193 typename _Alloc, typename _Hash2, typename _Eq2>
│ │ │ +
2194 struct _Hash_merge_helper<
│ │ │ +
2195 _GLIBCXX_STD_C::unordered_multimap<_Key, _Val, _Hash1, _Eq1, _Alloc>,
│ │ │ +
2196 _Hash2, _Eq2>
│ │ │ +
2197 {
│ │ │ +
2198 private:
│ │ │ +
2199 template<typename... _Tp>
│ │ │ +
2200 using unordered_map = _GLIBCXX_STD_C::unordered_map<_Tp...>;
│ │ │ +
2201 template<typename... _Tp>
│ │ │ +
2202 using unordered_multimap = _GLIBCXX_STD_C::unordered_multimap<_Tp...>;
│ │ │ +
2203
│ │ │ +
2204 friend unordered_multimap<_Key, _Val, _Hash1, _Eq1, _Alloc>;
│ │ │ +
2205
│ │ │ +
2206 static auto&
│ │ │ +
2207 _S_get_table(unordered_map<_Key, _Val, _Hash2, _Eq2, _Alloc>& __map)
│ │ │ +
2208 { return __map._M_h; }
│ │ │ +
2209
│ │ │ +
2210 static auto&
│ │ │ +
2211 _S_get_table(unordered_multimap<_Key, _Val, _Hash2, _Eq2, _Alloc>& __map)
│ │ │ +
2212 { return __map._M_h; }
│ │ │ +
2213 };
│ │ │ +
2214#endif // C++17
│ │ │ +
2215
│ │ │ +
2216_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ +
2217} // namespace std
│ │ │ +
2218
│ │ │ +
2219#endif /* _UNORDERED_MAP_H */
│ │ │ +
constexpr std::remove_reference< _Tp >::type && move(_Tp &&__t) noexcept
Convert a value to an rvalue.
Definition move.h:104
│ │ │ +
void swap(any &__x, any &__y) noexcept
Exchange the states of two any objects.
Definition any:429
│ │ │
ISO C++ entities toplevel namespace is std.
│ │ │ -
Finds the size of a given tuple type.
Definition utility.h:49
│ │ │ -
Gives the type of the ith element of a given tuple type.
Definition utility.h:80
│ │ │ -
Class template integer_sequence.
Definition utility.h:165
│ │ │ - │ │ │ +
__detail::_Hashtable_traits< _Cache, false, false > __ummap_traits
Base types for unordered_multimap.
│ │ │ +
__detail::_Hashtable_traits< _Cache, false, true > __umap_traits
Base types for unordered_map.
│ │ │ +
Common iterator class.
│ │ │ +
A standard container composed of equivalent keys (possibly containing multiple of each key value) tha...
│ │ │ +
float load_factor() const noexcept
Returns the average number of elements per bucket.
│ │ │ +
_Hashtable::reference reference
Iterator-related typedefs.
│ │ │ +
iterator erase(iterator __position)
Erases an element from an unordered_multimap.
│ │ │ +
const_iterator end() const noexcept
│ │ │ +
size_type erase(const key_type &__x)
Erases elements according to the provided key.
│ │ │ +
std::pair< iterator, iterator > equal_range(const key_type &__x)
Finds a subsequence matching given key.
│ │ │ +
size_type bucket_count() const noexcept
Returns the number of buckets of the unordered_multimap.
│ │ │ +
_Hashtable::iterator iterator
Iterator-related typedefs.
│ │ │ +
size_type max_bucket_count() const noexcept
Returns the maximum number of buckets of the unordered_multimap.
│ │ │ +
iterator begin() noexcept
│ │ │ +
const_iterator begin() const noexcept
│ │ │ +
hasher hash_function() const
Returns the hash functor object with which the unordered_multimap was constructed.
│ │ │ +
iterator insert(const_iterator __hint, node_type &&__nh)
Re-insert an extracted node.
│ │ │ +
__enable_if_t< is_constructible< value_type, _Pair && >::value, iterator > insert(const_iterator __hint, _Pair &&__x)
Inserts a std::pair into the unordered_multimap.
│ │ │ +
unordered_multimap & operator=(const unordered_multimap &)=default
Copy assignment operator.
│ │ │ +
key_equal key_eq() const
Returns the key comparison object with which the unordered_multimap was constructed.
│ │ │ +
size_type count(const key_type &__x) const
Finds the number of elements.
│ │ │ +
const_iterator find(const key_type &__x) const
Tries to locate an element in an unordered_multimap.
│ │ │ +
_Hashtable::mapped_type mapped_type
Public typedefs.
│ │ │ +
auto find(const _Kt &__x) -> decltype(_M_h._M_find_tr(__x))
Tries to locate an element in an unordered_multimap.
│ │ │ +
local_iterator end(size_type __n)
Returns a read/write iterator pointing to one past the last bucket elements.
│ │ │ +
void insert(_InputIterator __first, _InputIterator __last)
A template function that attempts to insert a range of elements.
│ │ │ +
unordered_multimap & operator=(initializer_list< value_type > __l)
Unordered_multimap list assignment operator.
│ │ │ +
unordered_multimap(size_type __n, const hasher &__hf=hasher(), const key_equal &__eql=key_equal(), const allocator_type &__a=allocator_type())
Default constructor creates no elements.
│ │ │ +
_Hashtable::value_type value_type
Public typedefs.
│ │ │ +
iterator emplace(_Args &&... __args)
Attempts to build and insert a std::pair into the unordered_multimap.
│ │ │ +
node_type extract(const key_type &__key)
Extract a node.
│ │ │ +
bool contains(const key_type &__x) const
Finds whether an element with the given key exists.
│ │ │ +
_Hashtable::const_reference const_reference
Iterator-related typedefs.
│ │ │ +
iterator insert(node_type &&__nh)
Re-insert an extracted node.
│ │ │ +
iterator erase(const_iterator __position)
Erases an element from an unordered_multimap.
│ │ │ +
iterator end() noexcept
│ │ │ +
local_iterator begin(size_type __n)
Returns a read/write iterator pointing to the first bucket element.
│ │ │ +
float max_load_factor() const noexcept
Returns a positive number that the unordered_multimap tries to keep the load factor less than or equa...
│ │ │ +
unordered_multimap()=default
Default constructor.
│ │ │ +
iterator insert(value_type &&__x)
Inserts a std::pair into the unordered_multimap.
│ │ │ +
iterator insert(const value_type &__x)
Inserts a std::pair into the unordered_multimap.
│ │ │ +
unordered_multimap & operator=(unordered_multimap &&)=default
Move assignment operator.
│ │ │ +
_Hashtable::hasher hasher
Public typedefs.
│ │ │ +
_Hashtable::local_iterator local_iterator
Iterator-related typedefs.
│ │ │ +
void reserve(size_type __n)
Prepare the unordered_multimap for a specified number of elements.
│ │ │ +
std::pair< const_iterator, const_iterator > equal_range(const key_type &__x) const
Finds a subsequence matching given key.
│ │ │ +
unordered_multimap(_InputIterator __first, _InputIterator __last, size_type __n=0, const hasher &__hf=hasher(), const key_equal &__eql=key_equal(), const allocator_type &__a=allocator_type())
Builds an unordered_multimap from a range.
│ │ │ + │ │ │ +
iterator find(const key_type &__x)
Tries to locate an element in an unordered_multimap.
│ │ │ +
unordered_multimap(initializer_list< value_type > __l, size_type __n=0, const hasher &__hf=hasher(), const key_equal &__eql=key_equal(), const allocator_type &__a=allocator_type())
Builds an unordered_multimap from an initializer_list.
│ │ │ +
auto count(const _Kt &__x) const -> decltype(_M_h._M_count_tr(__x))
Finds the number of elements.
│ │ │ +
iterator erase(const_iterator __first, const_iterator __last)
Erases a [__first,__last) range of elements from an unordered_multimap.
│ │ │ +
const_local_iterator end(size_type __n) const
Returns a read-only (constant) iterator pointing to one past the last bucket elements.
│ │ │ +
_Hashtable::pointer pointer
Iterator-related typedefs.
│ │ │ +
_Hashtable::allocator_type allocator_type
Public typedefs.
│ │ │ +
const_local_iterator begin(size_type __n) const
Returns a read-only (constant) iterator pointing to the first bucket element.
│ │ │ +
auto find(const _Kt &__x) const -> decltype(_M_h._M_find_tr(__x))
Tries to locate an element in an unordered_multimap.
│ │ │ +
_Hashtable::const_local_iterator const_local_iterator
Iterator-related typedefs.
│ │ │ +
unordered_multimap(unordered_multimap &&)=default
Move constructor.
│ │ │ +
unordered_multimap(const allocator_type &__a)
Creates an unordered_multimap with no elements.
│ │ │ +
_Hashtable::difference_type difference_type
Iterator-related typedefs.
│ │ │ +
_Hashtable::size_type size_type
Iterator-related typedefs.
│ │ │ +
_Hashtable::const_pointer const_pointer
Iterator-related typedefs.
│ │ │ +
__enable_if_t< is_constructible< value_type, _Pair && >::value, iterator > insert(_Pair &&__x)
Inserts a std::pair into the unordered_multimap.
│ │ │ +
auto contains(const _Kt &__x) const -> decltype(_M_h._M_find_tr(__x), void(), true)
Finds whether an element with the given key exists.
│ │ │ +
void swap(unordered_multimap &__x) noexcept(noexcept(_M_h.swap(__x._M_h)))
Swaps data with another unordered_multimap.
│ │ │ +
void rehash(size_type __n)
May rehash the unordered_multimap.
│ │ │ +
_Hashtable::const_iterator const_iterator
Iterator-related typedefs.
│ │ │ +
void insert(initializer_list< value_type > __l)
Attempts to insert a list of elements into the unordered_multimap.
│ │ │ +
const_iterator cend() const noexcept
│ │ │ +
size_type max_size() const noexcept
Returns the maximum size of the unordered_multimap.
│ │ │ +
const_local_iterator cbegin(size_type __n) const
Returns a read-only (constant) iterator pointing to the first bucket element.
│ │ │ +
bool empty() const noexcept
Returns true if the unordered_multimap is empty.
│ │ │ +
const_iterator cbegin() const noexcept
│ │ │ +
_Hashtable::key_type key_type
Public typedefs.
│ │ │ +
node_type extract(const_iterator __pos)
Extract a node.
│ │ │ +
const_local_iterator cend(size_type __n) const
Returns a read-only (constant) iterator pointing to one past the last bucket elements.
│ │ │ +
iterator insert(const_iterator __hint, const value_type &__x)
Inserts a std::pair into the unordered_multimap.
│ │ │ +
size_type size() const noexcept
Returns the size of the unordered_multimap.
│ │ │ +
unordered_multimap(const unordered_multimap &)=default
Copy constructor.
│ │ │ +
iterator emplace_hint(const_iterator __pos, _Args &&... __args)
Attempts to build and insert a std::pair into the unordered_multimap.
│ │ │ +
iterator insert(const_iterator __hint, value_type &&__x)
Inserts a std::pair into the unordered_multimap.
│ │ │ +
auto equal_range(const _Kt &__x) -> decltype(_M_h._M_equal_range_tr(__x))
Finds a subsequence matching given key.
│ │ │ +
_Hashtable::key_equal key_equal
Public typedefs.
│ │ │ +
allocator_type get_allocator() const noexcept
Returns the allocator object used by the unordered_multimap.
│ │ │ +
void max_load_factor(float __z)
Change the unordered_multimap maximum load factor.
│ │ │ +
auto equal_range(const _Kt &__x) const -> decltype(_M_h._M_equal_range_tr(__x))
Finds a subsequence matching given key.
│ │ │ +
A standard container composed of unique keys (containing at most one of each key value) that associat...
│ │ │ +
iterator insert(const_iterator __hint, value_type &&__x)
Attempts to insert a std::pair into the unordered_map.
│ │ │ +
_Hashtable::iterator iterator
Iterator-related typedefs.
│ │ │ +
void max_load_factor(float __z)
Change the unordered_map maximum load factor.
│ │ │ +
const mapped_type & at(const key_type &__k) const
Access to unordered_map data.
│ │ │ +
bool contains(const key_type &__x) const
Finds whether an element with the given key exists.
│ │ │ +
node_type extract(const key_type &__key)
Extract a node.
│ │ │ +
void insert(_InputIterator __first, _InputIterator __last)
A template function that attempts to insert a range of elements.
│ │ │ +
allocator_type get_allocator() const noexcept
Returns the allocator object used by the unordered_map.
│ │ │ +
auto find(const _Kt &__x) -> decltype(_M_h._M_find_tr(__x))
Tries to locate an element in an unordered_map.
│ │ │ +
unordered_map & operator=(initializer_list< value_type > __l)
Unordered_map list assignment operator.
│ │ │ +
_Hashtable::const_pointer const_pointer
Iterator-related typedefs.
│ │ │ +
auto find(const _Kt &__x) const -> decltype(_M_h._M_find_tr(__x))
Tries to locate an element in an unordered_map.
│ │ │ +
void insert(initializer_list< value_type > __l)
Attempts to insert a list of elements into the unordered_map.
│ │ │ +
__enable_if_t< is_constructible< value_type, _Pair && >::value, iterator > insert(const_iterator __hint, _Pair &&__x)
Attempts to insert a std::pair into the unordered_map.
│ │ │ +
std::pair< iterator, iterator > equal_range(const key_type &__x)
Finds a subsequence matching given key.
│ │ │ +
mapped_type & at(const key_type &__k)
Access to unordered_map data.
│ │ │ +
iterator erase(const_iterator __first, const_iterator __last)
Erases a [__first,__last) range of elements from an unordered_map.
│ │ │ +
iterator try_emplace(const_iterator __hint, const key_type &__k, _Args &&... __args)
Attempts to build and insert a std::pair into the unordered_map.
│ │ │ +
node_type extract(const_iterator __pos)
Extract a node.
│ │ │ +
std::pair< iterator, bool > insert(const value_type &__x)
Attempts to insert a std::pair into the unordered_map.
│ │ │ +
void reserve(size_type __n)
Prepare the unordered_map for a specified number of elements.
│ │ │ +
const_local_iterator cbegin(size_type __n) const
Returns a read-only (constant) iterator pointing to the first bucket element.
│ │ │ +
std::pair< const_iterator, const_iterator > equal_range(const key_type &__x) const
Finds a subsequence matching given key.
│ │ │ +
iterator insert(const_iterator, node_type &&__nh)
Re-insert an extracted node.
│ │ │ +
_Hashtable::reference reference
Iterator-related typedefs.
│ │ │ +
iterator insert(const_iterator __hint, const value_type &__x)
Attempts to insert a std::pair into the unordered_map.
│ │ │ +
iterator end() noexcept
│ │ │ +
_Hashtable::allocator_type allocator_type
Public typedefs.
│ │ │ +
unordered_map(const unordered_map &)=default
Copy constructor.
│ │ │ +
size_type count(const key_type &__x) const
Finds the number of elements.
│ │ │ +
bool empty() const noexcept
Returns true if the unordered_map is empty.
│ │ │ +
size_type erase(const key_type &__x)
Erases elements according to the provided key.
│ │ │ +
const_iterator find(const key_type &__x) const
Tries to locate an element in an unordered_map.
│ │ │ +
unordered_map(unordered_map &&)=default
Move constructor.
│ │ │ +
const_local_iterator end(size_type __n) const
Returns a read-only (constant) iterator pointing to one past the last bucket elements.
│ │ │ +
auto equal_range(const _Kt &__x) -> decltype(_M_h._M_equal_range_tr(__x))
Finds a subsequence matching given key.
│ │ │ +
auto contains(const _Kt &__x) const -> decltype(_M_h._M_find_tr(__x), void(), true)
Finds whether an element with the given key exists.
│ │ │ +
size_type max_size() const noexcept
Returns the maximum size of the unordered_map.
│ │ │ +
const_iterator end() const noexcept
│ │ │ +
unordered_map()=default
Default constructor.
│ │ │ +
_Hashtable::mapped_type mapped_type
Public typedefs.
│ │ │ +
unordered_map & operator=(unordered_map &&)=default
Move assignment operator.
│ │ │ +
const_local_iterator begin(size_type __n) const
Returns a read-only (constant) iterator pointing to the first bucket element.
│ │ │ +
unordered_map(size_type __n, const hasher &__hf=hasher(), const key_equal &__eql=key_equal(), const allocator_type &__a=allocator_type())
Default constructor creates no elements.
│ │ │ +
std::pair< iterator, bool > emplace(_Args &&... __args)
Attempts to build and insert a std::pair into the unordered_map.
│ │ │ +
const_local_iterator cend(size_type __n) const
Returns a read-only (constant) iterator pointing to one past the last bucket elements.
│ │ │ +
size_type size() const noexcept
Returns the size of the unordered_map.
│ │ │ +
__enable_if_t< is_constructible< value_type, _Pair && >::value, pair< iterator, bool > > insert(_Pair &&__x)
Attempts to insert a std::pair into the unordered_map.
│ │ │ +
mapped_type & operator[](key_type &&__k)
Subscript ( [] ) access to unordered_map data.
│ │ │ +
std::pair< iterator, bool > insert(value_type &&__x)
Attempts to insert a std::pair into the unordered_map.
│ │ │ +
_Hashtable::hasher hasher
Public typedefs.
│ │ │ +
pair< iterator, bool > insert_or_assign(const key_type &__k, _Obj &&__obj)
Attempts to insert a std::pair into the unordered_map.
│ │ │ +
unordered_map(_InputIterator __first, _InputIterator __last, size_type __n=0, const hasher &__hf=hasher(), const key_equal &__eql=key_equal(), const allocator_type &__a=allocator_type())
Builds an unordered_map from a range.
│ │ │ +
void clear() noexcept
│ │ │ +
mapped_type & operator[](const key_type &__k)
Subscript ( [] ) access to unordered_map data.
│ │ │ +
pair< iterator, bool > try_emplace(const key_type &__k, _Args &&... __args)
Attempts to build and insert a std::pair into the unordered_map.
│ │ │ +
const_iterator begin() const noexcept
│ │ │ +
key_equal key_eq() const
Returns the key comparison object with which the unordered_map was constructed.
│ │ │ +
_Hashtable::const_reference const_reference
Iterator-related typedefs.
│ │ │ +
_Hashtable::key_equal key_equal
Public typedefs.
│ │ │ +
_Hashtable::local_iterator local_iterator
Iterator-related typedefs.
│ │ │ +
iterator erase(iterator __position)
Erases an element from an unordered_map.
│ │ │ +
const_iterator cend() const noexcept
│ │ │ +
local_iterator end(size_type __n)
Returns a read/write iterator pointing to one past the last bucket elements.
│ │ │ +
_Hashtable::pointer pointer
Iterator-related typedefs.
│ │ │ +
iterator insert_or_assign(const_iterator __hint, const key_type &__k, _Obj &&__obj)
Attempts to insert a std::pair into the unordered_map.
│ │ │ +
unordered_map(const allocator_type &__a)
Creates an unordered_map with no elements.
│ │ │ +
_Hashtable::key_type key_type
Public typedefs.
│ │ │ +
size_type bucket_count() const noexcept
Returns the number of buckets of the unordered_map.
│ │ │ +
iterator begin() noexcept
│ │ │ +
hasher hash_function() const
Returns the hash functor object with which the unordered_map was constructed.
│ │ │ +
auto equal_range(const _Kt &__x) const -> decltype(_M_h._M_equal_range_tr(__x))
Finds a subsequence matching given key.
│ │ │ +
unordered_map(initializer_list< value_type > __l, size_type __n=0, const hasher &__hf=hasher(), const key_equal &__eql=key_equal(), const allocator_type &__a=allocator_type())
Builds an unordered_map from an initializer_list.
│ │ │ +
_Hashtable::const_iterator const_iterator
Iterator-related typedefs.
│ │ │ +
_Hashtable::size_type size_type
Iterator-related typedefs.
│ │ │ +
iterator find(const key_type &__x)
Tries to locate an element in an unordered_map.
│ │ │ +
float load_factor() const noexcept
Returns the average number of elements per bucket.
│ │ │ +
iterator erase(const_iterator __position)
Erases an element from an unordered_map.
│ │ │ +
void swap(unordered_map &__x) noexcept(noexcept(_M_h.swap(__x._M_h)))
Swaps data with another unordered_map.
│ │ │ +
local_iterator begin(size_type __n)
Returns a read/write iterator pointing to the first bucket element.
│ │ │ +
float max_load_factor() const noexcept
Returns a positive number that the unordered_map tries to keep the load factor less than or equal to.
│ │ │ +
unordered_map & operator=(const unordered_map &)=default
Copy assignment operator.
│ │ │ +
_Hashtable::difference_type difference_type
Iterator-related typedefs.
│ │ │ +
auto count(const _Kt &__x) const -> decltype(_M_h._M_count_tr(__x))
Finds the number of elements.
│ │ │ +
_Hashtable::const_local_iterator const_local_iterator
Iterator-related typedefs.
│ │ │ +
size_type max_bucket_count() const noexcept
Returns the maximum number of buckets of the unordered_map.
│ │ │ +
iterator emplace_hint(const_iterator __pos, _Args &&... __args)
Attempts to build and insert a std::pair into the unordered_map.
│ │ │ +
insert_return_type insert(node_type &&__nh)
Re-insert an extracted node.
│ │ │ +
_Hashtable::value_type value_type
Public typedefs.
│ │ │ +
void rehash(size_type __n)
May rehash the unordered_map.
│ │ │ +
const_iterator cbegin() const noexcept
│ │ │ + │ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,13 +1,13 @@ │ │ │ │ libstdc++ │ │ │ │ -utility.h │ │ │ │ +unordered_map.h │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -1// Utilities used throughout the library -*- C++ -*- │ │ │ │ +1// unordered_map implementation -*- C++ -*- │ │ │ │ 2 │ │ │ │ -3// Copyright (C) 2004-2022 Free Software Foundation, Inc. │ │ │ │ +3// Copyright (C) 2010-2022 Free Software Foundation, Inc. │ │ │ │ 4// │ │ │ │ 5// This file is part of the GNU ISO C++ Library. This library is free │ │ │ │ 6// software; you can redistribute it and/or modify it under the │ │ │ │ 7// terms of the GNU General Public License as published by the │ │ │ │ 8// Free Software Foundation; either version 3, or (at your option) │ │ │ │ 9// any later version. │ │ │ │ 10 │ │ │ │ @@ -21,276 +21,2942 @@ │ │ │ │ 18// 3.1, as published by the Free Software Foundation. │ │ │ │ 19 │ │ │ │ 20// You should have received a copy of the GNU General Public License and │ │ │ │ 21// a copy of the GCC Runtime Library Exception along with this program; │ │ │ │ 22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see │ │ │ │ 23// . │ │ │ │ 24 │ │ │ │ -25/** @file include/bits/utility.h │ │ │ │ +25/** @file bits/unordered_map.h │ │ │ │ 26 * This is an internal header file, included by other library headers. │ │ │ │ -27 * Do not attempt to use it directly. @headername{utility} │ │ │ │ -28 * │ │ │ │ -29 * This file contains the parts of `` needed by other headers, │ │ │ │ -30 * so they don't need to include the whole of ``. │ │ │ │ -31 */ │ │ │ │ +27 * Do not attempt to use it directly. @headername{unordered_map} │ │ │ │ +28 */ │ │ │ │ +29 │ │ │ │ +30#ifndef _UNORDERED_MAP_H │ │ │ │ +31#define _UNORDERED_MAP_H │ │ │ │ 32 │ │ │ │ -33#ifndef _GLIBCXX_UTILITY_H │ │ │ │ -34#define _GLIBCXX_UTILITY_H 1 │ │ │ │ -35 │ │ │ │ -36#pragma GCC system_header │ │ │ │ +33namespace _s_t_d _GLIBCXX_VISIBILITY(default) │ │ │ │ +34{ │ │ │ │ +35_GLIBCXX_BEGIN_NAMESPACE_VERSION │ │ │ │ +36_GLIBCXX_BEGIN_NAMESPACE_CONTAINER │ │ │ │ 37 │ │ │ │ -38#if __cplusplus >= 201103L │ │ │ │ -39 │ │ │ │ -40#include <_t_y_p_e___t_r_a_i_t_s> │ │ │ │ -41#include <_b_i_t_s_/_m_o_v_e_._h> │ │ │ │ -42 │ │ │ │ -43namespace _s_t_d _GLIBCXX_VISIBILITY(default) │ │ │ │ -44{ │ │ │ │ -45_GLIBCXX_BEGIN_NAMESPACE_VERSION │ │ │ │ -46 │ │ │ │ -47 /// Finds the size of a given tuple type. │ │ │ │ -48 template │ │ │ │ -_4_9 struct _t_u_p_l_e___s_i_z_e; │ │ │ │ -50 │ │ │ │ -51 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ -52 // 2313. tuple_size should always derive from integral_constant │ │ │ │ -53 // 2770. tuple_size specialization is not SFINAE compatible │ │ │ │ +38 /// Base types for unordered_map. │ │ │ │ +39 template │ │ │ │ +_4_0 using _____u_m_a_p___t_r_a_i_t_s = __detail::_Hashtable_traits<_Cache, false, true>; │ │ │ │ +41 │ │ │ │ +42 template, │ │ │ │ +45 typename ___P_r_e_d = _s_t_d_:_:_e_q_u_a_l___t_o_<___K_e_y_>, │ │ │ │ +46 typename _Alloc = _s_t_d_:_:_a_l_l_o_c_a_t_o_r_<_s_t_d_:_:_p_a_i_r_<_c_o_n_s_t_ ___K_e_y_,_ ___T_p_> >, │ │ │ │ +47 typename ___T_r = _____u_m_a_p___t_r_a_i_t_s_<_____c_a_c_h_e___d_e_f_a_u_l_t_<___K_e_y_,_ ___H_a_s_h_>_:_:_v_a_l_u_e>> │ │ │ │ +48 using _____u_m_a_p___h_a_s_h_t_a_b_l_e = ___H_a_s_h_t_a_b_l_e_<___K_e_y_,_ _s_t_d_:_:_p_a_i_r_<_c_o_n_s_t_ ___K_e_y_,_ ___T_p_>, │ │ │ │ +49 _Alloc, __detail::_Select1st, │ │ │ │ +50 ___P_r_e_d, ___H_a_s_h, │ │ │ │ +51 __detail::_Mod_range_hashing, │ │ │ │ +52 __detail::_Default_ranged_hash, │ │ │ │ +53 __detail::_Prime_rehash_policy, ___T_r>; │ │ │ │ 54 │ │ │ │ -55 template::type, │ │ │ │ -57 typename = typename _e_n_a_b_l_e___i_f_<_i_s___s_a_m_e_<___T_p_,_ ___U_p_>_:_:_v_a_l_u_e>::type, │ │ │ │ -58 size_t = _t_u_p_l_e___s_i_z_e_<___T_p_>_:_:_v_a_l_u_e> │ │ │ │ -59 using __enable_if_has_tuple_size = _Tp; │ │ │ │ -60 │ │ │ │ -61 template │ │ │ │ -62 struct _t_u_p_l_e___s_i_z_e> │ │ │ │ -63 : public _t_u_p_l_e___s_i_z_e<_Tp> { }; │ │ │ │ -64 │ │ │ │ -65 template │ │ │ │ -66 struct _t_u_p_l_e___s_i_z_e<_v_o_l_a_t_i_l_e __enable_if_has_tuple_size<_Tp>> │ │ │ │ -67 : public _t_u_p_l_e___s_i_z_e<_Tp> { }; │ │ │ │ -68 │ │ │ │ -69 template │ │ │ │ -70 struct tuple_size> │ │ │ │ -71 : public tuple_size<_Tp> { }; │ │ │ │ -72 │ │ │ │ -73#if __cplusplus >= 201703L │ │ │ │ -74 template │ │ │ │ -75 inline constexpr size_t tuple_size_v = tuple_size<_Tp>::value; │ │ │ │ -76#endif │ │ │ │ -77 │ │ │ │ -78 /// Gives the type of the ith element of a given tuple type. │ │ │ │ -79 template │ │ │ │ -_8_0 struct _t_u_p_l_e___e_l_e_m_e_n_t; │ │ │ │ -81 │ │ │ │ -82 // Duplicate of C++14's tuple_element_t for internal use in C++11 mode │ │ │ │ -83 template │ │ │ │ -84 using __tuple_element_t = typename _t_u_p_l_e___e_l_e_m_e_n_t_<_____i_,_ ___T_p_>_:_:_t_y_p_e; │ │ │ │ -85 │ │ │ │ -86 template │ │ │ │ -87 struct _t_u_p_l_e___e_l_e_m_e_n_t<__i, const _Tp> │ │ │ │ -88 { │ │ │ │ -89 typedef typename _a_d_d___c_o_n_s_t_<_____t_u_p_l_e___e_l_e_m_e_n_t___t_<_____i_,_ ___T_p_>>::type type; │ │ │ │ -90 }; │ │ │ │ -91 │ │ │ │ -92 template │ │ │ │ -93 struct _t_u_p_l_e___e_l_e_m_e_n_t<__i, _v_o_l_a_t_i_l_e _Tp> │ │ │ │ -94 { │ │ │ │ -95 typedef typename _a_d_d___v_o_l_a_t_i_l_e_<_____t_u_p_l_e___e_l_e_m_e_n_t___t_<_____i_,_ ___T_p_>>::type type; │ │ │ │ -96 }; │ │ │ │ -97 │ │ │ │ -98 template │ │ │ │ -99 struct tuple_element<__i, const volatile _Tp> │ │ │ │ -100 { │ │ │ │ -101 typedef typename add_cv<__tuple_element_t<__i, _Tp>>::type type; │ │ │ │ -102 }; │ │ │ │ -103 │ │ │ │ -104#if __cplusplus >= 201402L │ │ │ │ -105 │ │ │ │ -106 // Return the index of _Tp in _Types, if it occurs exactly once. │ │ │ │ -107 // Otherwise, return sizeof...(_Types). │ │ │ │ -108 template │ │ │ │ -109 constexpr size_t │ │ │ │ -110 __find_uniq_type_in_pack() │ │ │ │ -111 { │ │ │ │ -112 constexpr size_t __sz = sizeof...(_Types); │ │ │ │ -113 constexpr bool __found[__sz] = { __is_same(_Tp, _Types) ... }; │ │ │ │ -114 size_t __n = __sz; │ │ │ │ -115 for (size_t __i = 0; __i < __sz; ++__i) │ │ │ │ -116 { │ │ │ │ -117 if (__found[__i]) │ │ │ │ -118 { │ │ │ │ -119 if (__n < __sz) // more than one _Tp found │ │ │ │ -120 return __sz; │ │ │ │ -121 __n = __i; │ │ │ │ -122 } │ │ │ │ -123 } │ │ │ │ -124 return __n; │ │ │ │ -125 } │ │ │ │ -126 │ │ │ │ -127// The standard says this macro and alias template should be in but │ │ │ │ -we │ │ │ │ -128// define them here, to be available in , and too. │ │ │ │ -129// _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ -130// 3378. tuple_size_v/tuple_element_t should be available when │ │ │ │ -131// tuple_size/tuple_element are │ │ │ │ -132#define __cpp_lib_tuple_element_t 201402L │ │ │ │ -133 │ │ │ │ -134 template │ │ │ │ -135 using tuple_element_t = typename tuple_element<__i, _Tp>::type; │ │ │ │ -136#endif // C++14 │ │ │ │ -137 │ │ │ │ -138 // Stores a tuple of indices. Used by tuple and pair, and by bind() to │ │ │ │ -139 // extract the elements in a tuple. │ │ │ │ -140 template struct _Index_tuple { }; │ │ │ │ +55 /// Base types for unordered_multimap. │ │ │ │ +56 template │ │ │ │ +_5_7 using _____u_m_m_a_p___t_r_a_i_t_s = __detail::_Hashtable_traits<_Cache, false, false>; │ │ │ │ +58 │ │ │ │ +59 template, │ │ │ │ +62 typename ___P_r_e_d = _s_t_d_:_:_e_q_u_a_l___t_o_<___K_e_y_>, │ │ │ │ +63 typename _Alloc = _s_t_d_:_:_a_l_l_o_c_a_t_o_r_<_s_t_d_:_:_p_a_i_r_<_c_o_n_s_t_ ___K_e_y_,_ ___T_p_> >, │ │ │ │ +64 typename ___T_r = _____u_m_m_a_p___t_r_a_i_t_s_<_____c_a_c_h_e___d_e_f_a_u_l_t_<___K_e_y_,_ ___H_a_s_h_>_:_:_v_a_l_u_e>> │ │ │ │ +65 using _____u_m_m_a_p___h_a_s_h_t_a_b_l_e = ___H_a_s_h_t_a_b_l_e_<___K_e_y_,_ _s_t_d_:_:_p_a_i_r_<_c_o_n_s_t_ ___K_e_y_,_ ___T_p_>, │ │ │ │ +66 _Alloc, __detail::_Select1st, │ │ │ │ +67 ___P_r_e_d, ___H_a_s_h, │ │ │ │ +68 __detail::_Mod_range_hashing, │ │ │ │ +69 __detail::_Default_ranged_hash, │ │ │ │ +70 __detail::_Prime_rehash_policy, ___T_r>; │ │ │ │ +71 │ │ │ │ +72 template │ │ │ │ +73 class _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p; │ │ │ │ +74 │ │ │ │ +75 /** │ │ │ │ +76 * @brief A standard container composed of unique keys (containing │ │ │ │ +77 * at most one of each key value) that associates values of another type │ │ │ │ +78 * with the keys. │ │ │ │ +79 * │ │ │ │ +80 * @ingroup unordered_associative_containers │ │ │ │ +81 * @headerfile unordered_map │ │ │ │ +82 * @since C++11 │ │ │ │ +83 * │ │ │ │ +84 * @tparam _Key Type of key objects. │ │ │ │ +85 * @tparam _Tp Type of mapped objects. │ │ │ │ +86 * @tparam _Hash Hashing function object type, defaults to hash<_Value>. │ │ │ │ +87 * @tparam _Pred Predicate function object type, defaults │ │ │ │ +88 * to equal_to<_Value>. │ │ │ │ +89 * @tparam _Alloc Allocator type, defaults to │ │ │ │ +90 * std::allocator>. │ │ │ │ +91 * │ │ │ │ +92 * Meets the requirements of a container, and │ │ │ │ +93 * unordered associative container │ │ │ │ +94 * │ │ │ │ +95 * The resulting value type of the container is std::pair. │ │ │ │ +96 * │ │ │ │ +97 * Base is _Hashtable, dispatched at compile time via template │ │ │ │ +98 * alias __umap_hashtable. │ │ │ │ +99 */ │ │ │ │ +100 template, │ │ │ │ +102 typename ___P_r_e_d = _e_q_u_a_l___t_o_<___K_e_y_>, │ │ │ │ +103 typename _Alloc = _a_l_l_o_c_a_t_o_r_<_s_t_d_:_:_p_a_i_r_<_c_o_n_s_t_ ___K_e_y_,_ ___T_p_>>> │ │ │ │ +_1_0_4 class _u_n_o_r_d_e_r_e_d___m_a_p │ │ │ │ +105 { │ │ │ │ +106 typedef _____u_m_a_p___h_a_s_h_t_a_b_l_e_<___K_e_y_,_ ___T_p_,_ ___H_a_s_h_,_ ___P_r_e_d_,_ ___A_l_l_o_c_> ___H_a_s_h_t_a_b_l_e; │ │ │ │ +107 ___H_a_s_h_t_a_b_l_e _M_h; │ │ │ │ +108 │ │ │ │ +109 public: │ │ │ │ +110 // typedefs: │ │ │ │ +111 ///@{ │ │ │ │ +112 /// Public typedefs. │ │ │ │ +_1_1_3 typedef typename _Hashtable::key_type _k_e_y___t_y_p_e; │ │ │ │ +_1_1_4 typedef typename _Hashtable::value_type _v_a_l_u_e___t_y_p_e; │ │ │ │ +_1_1_5 typedef typename _Hashtable::mapped_type _m_a_p_p_e_d___t_y_p_e; │ │ │ │ +_1_1_6 typedef typename _Hashtable::hasher _h_a_s_h_e_r; │ │ │ │ +_1_1_7 typedef typename _Hashtable::key_equal _k_e_y___e_q_u_a_l; │ │ │ │ +_1_1_8 typedef typename _Hashtable::allocator_type _a_l_l_o_c_a_t_o_r___t_y_p_e; │ │ │ │ +119 ///@} │ │ │ │ +120 │ │ │ │ +121 ///@{ │ │ │ │ +122 /// Iterator-related typedefs. │ │ │ │ +_1_2_3 typedef typename _Hashtable::pointer _p_o_i_n_t_e_r; │ │ │ │ +_1_2_4 typedef typename _Hashtable::const_pointer _c_o_n_s_t___p_o_i_n_t_e_r; │ │ │ │ +_1_2_5 typedef typename _Hashtable::reference _r_e_f_e_r_e_n_c_e; │ │ │ │ +_1_2_6 typedef typename _Hashtable::const_reference _c_o_n_s_t___r_e_f_e_r_e_n_c_e; │ │ │ │ +_1_2_7 typedef typename _Hashtable::iterator _i_t_e_r_a_t_o_r; │ │ │ │ +_1_2_8 typedef typename _Hashtable::const_iterator _c_o_n_s_t___i_t_e_r_a_t_o_r; │ │ │ │ +_1_2_9 typedef typename _Hashtable::local_iterator _l_o_c_a_l___i_t_e_r_a_t_o_r; │ │ │ │ +_1_3_0 typedef typename _Hashtable::const_local_iterator _c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r; │ │ │ │ +_1_3_1 typedef typename _Hashtable::size_type _s_i_z_e___t_y_p_e; │ │ │ │ +_1_3_2 typedef typename _Hashtable::difference_type _d_i_f_f_e_r_e_n_c_e___t_y_p_e; │ │ │ │ +133 ///@} │ │ │ │ +134 │ │ │ │ +135#if __cplusplus > 201402L │ │ │ │ +136 using node_type = typename _Hashtable::node_type; │ │ │ │ +137 using insert_return_type = typename _Hashtable::insert_return_type; │ │ │ │ +138#endif │ │ │ │ +139 │ │ │ │ +140 //construct/destroy/copy │ │ │ │ 141 │ │ │ │ -142 // Builds an _Index_tuple<0, 1, 2, ..., _Num-1>. │ │ │ │ -143 template │ │ │ │ -144 struct _Build_index_tuple │ │ │ │ -145 { │ │ │ │ -146#if __has_builtin(__make_integer_seq) │ │ │ │ -147 template │ │ │ │ -148 using _IdxTuple = _Index_tuple<_Indices...>; │ │ │ │ -149 │ │ │ │ -150 // Clang defines __make_integer_seq for this purpose. │ │ │ │ -151 using __type = __make_integer_seq<_IdxTuple, size_t, _Num>; │ │ │ │ -152#else │ │ │ │ -153 // For GCC and other compilers, use __integer_pack instead. │ │ │ │ -154 using __type = _Index_tuple<__integer_pack(_Num)...>; │ │ │ │ -155#endif │ │ │ │ -156 }; │ │ │ │ -157 │ │ │ │ -158#if __cplusplus >= 201402L │ │ │ │ +142 /// Default constructor. │ │ │ │ +_1_4_3 _u_n_o_r_d_e_r_e_d___m_a_p() = default; │ │ │ │ +144 │ │ │ │ +145 /** │ │ │ │ +146 * @brief Default constructor creates no elements. │ │ │ │ +147 * @param __n Minimal initial number of buckets. │ │ │ │ +148 * @param __hf A hash functor. │ │ │ │ +149 * @param __eql A key equality functor. │ │ │ │ +150 * @param __a An allocator object. │ │ │ │ +151 */ │ │ │ │ +152 explicit │ │ │ │ +_1_5_3 _u_n_o_r_d_e_r_e_d___m_a_p(_s_i_z_e___t_y_p_e __n, │ │ │ │ +154 const _h_a_s_h_e_r& _____h_f = _h_a_s_h_e_r(), │ │ │ │ +155 const _k_e_y___e_q_u_a_l& _____e_q_l = _k_e_y___e_q_u_a_l(), │ │ │ │ +156 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a = _a_l_l_o_c_a_t_o_r___t_y_p_e()) │ │ │ │ +157 : _M_h(__n, _____h_f, _____e_q_l, __a) │ │ │ │ +158 { } │ │ │ │ 159 │ │ │ │ -160#define __cpp_lib_integer_sequence 201304L │ │ │ │ -161 │ │ │ │ -162 /// Class template integer_sequence │ │ │ │ -163 template │ │ │ │ -_1_6_4 struct _i_n_t_e_g_e_r___s_e_q_u_e_n_c_e │ │ │ │ -165 { │ │ │ │ -166#if __cplusplus >= 202002L │ │ │ │ -167 static_assert(_i_s___i_n_t_e_g_r_a_l___v_<___T_p_>); │ │ │ │ -168#endif │ │ │ │ -169 typedef _Tp value_type; │ │ │ │ -170 static constexpr size_t size() noexcept { return sizeof...(_Idx); } │ │ │ │ -171 }; │ │ │ │ -172 │ │ │ │ -173 /// Alias template make_integer_sequence │ │ │ │ -174 template │ │ │ │ -_1_7_5 using _m_a_k_e___i_n_t_e_g_e_r___s_e_q_u_e_n_c_e │ │ │ │ -176#if __has_builtin(__make_integer_seq) │ │ │ │ -177 = _____m_a_k_e___i_n_t_e_g_e_r___s_e_q_<_i_n_t_e_g_e_r___s_e_q_u_e_n_c_e_,_ ___T_p_,_ ___N_u_m_>; │ │ │ │ -178#else │ │ │ │ -179 = _i_n_t_e_g_e_r___s_e_q_u_e_n_c_e<_Tp, _____i_n_t_e_g_e_r___p_a_c_k(_Tp(___N_u_m))...>; │ │ │ │ -180#endif │ │ │ │ +160 /** │ │ │ │ +161 * @brief Builds an %unordered_map from a range. │ │ │ │ +162 * @param __first An input iterator. │ │ │ │ +163 * @param __last An input iterator. │ │ │ │ +164 * @param __n Minimal initial number of buckets. │ │ │ │ +165 * @param __hf A hash functor. │ │ │ │ +166 * @param __eql A key equality functor. │ │ │ │ +167 * @param __a An allocator object. │ │ │ │ +168 * │ │ │ │ +169 * Create an %unordered_map consisting of copies of the elements from │ │ │ │ +170 * [__first,__last). This is linear in N (where N is │ │ │ │ +171 * distance(__first,__last)). │ │ │ │ +172 */ │ │ │ │ +173 template │ │ │ │ +_1_7_4 _u_n_o_r_d_e_r_e_d___m_a_p(___I_n_p_u_t_I_t_e_r_a_t_o_r __first, ___I_n_p_u_t_I_t_e_r_a_t_o_r __last, │ │ │ │ +175 _s_i_z_e___t_y_p_e __n = 0, │ │ │ │ +176 const _h_a_s_h_e_r& _____h_f = _h_a_s_h_e_r(), │ │ │ │ +177 const _k_e_y___e_q_u_a_l& _____e_q_l = _k_e_y___e_q_u_a_l(), │ │ │ │ +178 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a = _a_l_l_o_c_a_t_o_r___t_y_p_e()) │ │ │ │ +179 : _M_h(__first, __last, __n, _____h_f, _____e_q_l, __a) │ │ │ │ +180 { } │ │ │ │ 181 │ │ │ │ -182 /// Alias template index_sequence │ │ │ │ -183 template │ │ │ │ -_1_8_4 using _i_n_d_e_x___s_e_q_u_e_n_c_e = _i_n_t_e_g_e_r___s_e_q_u_e_n_c_e; │ │ │ │ -185 │ │ │ │ -186 /// Alias template make_index_sequence │ │ │ │ -187 template │ │ │ │ -_1_8_8 using _m_a_k_e___i_n_d_e_x___s_e_q_u_e_n_c_e = _m_a_k_e___i_n_t_e_g_e_r___s_e_q_u_e_n_c_e_<_s_i_z_e___t_,_ ___N_u_m_>; │ │ │ │ -189 │ │ │ │ -190 /// Alias template index_sequence_for │ │ │ │ -191 template │ │ │ │ -_1_9_2 using _i_n_d_e_x___s_e_q_u_e_n_c_e___f_o_r = _m_a_k_e___i_n_d_e_x___s_e_q_u_e_n_c_e; │ │ │ │ -193 │ │ │ │ -194#if __cplusplus >= 201703L │ │ │ │ -195 │ │ │ │ -196 struct in_place_t { │ │ │ │ -197 explicit in_place_t() = default; │ │ │ │ -198 }; │ │ │ │ -199 │ │ │ │ -200 inline constexpr in_place_t in_place{}; │ │ │ │ -201 │ │ │ │ -202 template struct in_place_type_t │ │ │ │ -203 { │ │ │ │ -204 explicit in_place_type_t() = default; │ │ │ │ -205 }; │ │ │ │ +182 /// Copy constructor. │ │ │ │ +_1_8_3 _u_n_o_r_d_e_r_e_d___m_a_p(const _u_n_o_r_d_e_r_e_d___m_a_p&) = default; │ │ │ │ +184 │ │ │ │ +185 /// Move constructor. │ │ │ │ +_1_8_6 _u_n_o_r_d_e_r_e_d___m_a_p(_u_n_o_r_d_e_r_e_d___m_a_p&&) = default; │ │ │ │ +187 │ │ │ │ +188 /** │ │ │ │ +189 * @brief Creates an %unordered_map with no elements. │ │ │ │ +190 * @param __a An allocator object. │ │ │ │ +191 */ │ │ │ │ +192 explicit │ │ │ │ +_1_9_3 _u_n_o_r_d_e_r_e_d___m_a_p(const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ +194 : _M_h(__a) │ │ │ │ +195 { } │ │ │ │ +196 │ │ │ │ +197 /* │ │ │ │ +198 * @brief Copy constructor with allocator argument. │ │ │ │ +199 * @param __uset Input %unordered_map to copy. │ │ │ │ +200 * @param __a An allocator object. │ │ │ │ +201 */ │ │ │ │ +202 _u_n_o_r_d_e_r_e_d___m_a_p(const _u_n_o_r_d_e_r_e_d___m_a_p& _____u_m_a_p, │ │ │ │ +203 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ +204 : _M_h(_____u_m_a_p._M_h, __a) │ │ │ │ +205 { } │ │ │ │ 206 │ │ │ │ -207 template │ │ │ │ -208 inline constexpr in_place_type_t<_Tp> in_place_type{}; │ │ │ │ -209 │ │ │ │ -210 template struct in_place_index_t │ │ │ │ -211 { │ │ │ │ -212 explicit in_place_index_t() = default; │ │ │ │ -213 }; │ │ │ │ -214 │ │ │ │ -215 template │ │ │ │ -216 inline constexpr in_place_index_t<_Idx> in_place_index{}; │ │ │ │ +207 /* │ │ │ │ +208 * @brief Move constructor with allocator argument. │ │ │ │ +209 * @param __uset Input %unordered_map to move. │ │ │ │ +210 * @param __a An allocator object. │ │ │ │ +211 */ │ │ │ │ +212 _u_n_o_r_d_e_r_e_d___m_a_p(_u_n_o_r_d_e_r_e_d___m_a_p&& __umap, │ │ │ │ +213 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ +214 noexcept( noexcept(_Hashtable(_s_t_d_:_:_m_o_v_e(__umap._M_h), __a)) ) │ │ │ │ +215 : _M_h(_s_t_d_:_:_m_o_v_e(__umap._M_h), __a) │ │ │ │ +216 { } │ │ │ │ 217 │ │ │ │ -218 template │ │ │ │ -219 inline constexpr bool __is_in_place_type_v = false; │ │ │ │ -220 │ │ │ │ -221 template │ │ │ │ -222 inline constexpr bool __is_in_place_type_v> = true; │ │ │ │ -223 │ │ │ │ -224 template │ │ │ │ -225 using __is_in_place_type = bool_constant<__is_in_place_type_v<_Tp>>; │ │ │ │ -226 │ │ │ │ -227#endif // C++17 │ │ │ │ -228#endif // C++14 │ │ │ │ -229 │ │ │ │ -230 template │ │ │ │ -231 struct _Nth_type │ │ │ │ -232 { }; │ │ │ │ -233 │ │ │ │ -234 template │ │ │ │ -235 struct _Nth_type<0, _Tp0, _Rest...> │ │ │ │ -236 { using type = _Tp0; }; │ │ │ │ -237 │ │ │ │ -238 template │ │ │ │ -239 struct _Nth_type<1, _Tp0, _Tp1, _Rest...> │ │ │ │ -240 { using type = _Tp1; }; │ │ │ │ -241 │ │ │ │ -242 template │ │ │ │ -243 struct _Nth_type<2, _Tp0, _Tp1, _Tp2, _Rest...> │ │ │ │ -244 { using type = _Tp2; }; │ │ │ │ +218 /** │ │ │ │ +219 * @brief Builds an %unordered_map from an initializer_list. │ │ │ │ +220 * @param __l An initializer_list. │ │ │ │ +221 * @param __n Minimal initial number of buckets. │ │ │ │ +222 * @param __hf A hash functor. │ │ │ │ +223 * @param __eql A key equality functor. │ │ │ │ +224 * @param __a An allocator object. │ │ │ │ +225 * │ │ │ │ +226 * Create an %unordered_map consisting of copies of the elements in the │ │ │ │ +227 * list. This is linear in N (where N is @a __l.size()). │ │ │ │ +228 */ │ │ │ │ +_2_2_9 _u_n_o_r_d_e_r_e_d___m_a_p(_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t_<_v_a_l_u_e___t_y_p_e_> _____l, │ │ │ │ +230 _s_i_z_e___t_y_p_e __n = 0, │ │ │ │ +231 const _h_a_s_h_e_r& _____h_f = _h_a_s_h_e_r(), │ │ │ │ +232 const _k_e_y___e_q_u_a_l& _____e_q_l = _k_e_y___e_q_u_a_l(), │ │ │ │ +233 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a = _a_l_l_o_c_a_t_o_r___t_y_p_e()) │ │ │ │ +234 : _M_h(_____l, __n, _____h_f, _____e_q_l, __a) │ │ │ │ +235 { } │ │ │ │ +236 │ │ │ │ +237 _u_n_o_r_d_e_r_e_d___m_a_p(_s_i_z_e___t_y_p_e __n, const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ +238 : _u_n_o_r_d_e_r_e_d___m_a_p(__n, _h_a_s_h_e_r(), _k_e_y___e_q_u_a_l(), __a) │ │ │ │ +239 { } │ │ │ │ +240 │ │ │ │ +241 _u_n_o_r_d_e_r_e_d___m_a_p(_s_i_z_e___t_y_p_e __n, const _h_a_s_h_e_r& __hf, │ │ │ │ +242 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ +243 : _u_n_o_r_d_e_r_e_d___m_a_p(__n, __hf, _k_e_y___e_q_u_a_l(), __a) │ │ │ │ +244 { } │ │ │ │ 245 │ │ │ │ -246 template │ │ │ │ -248#if __cpp_concepts │ │ │ │ -249 requires (_Np >= 3) │ │ │ │ -250#endif │ │ │ │ -251 struct _Nth_type<_Np, _Tp0, _Tp1, _Tp2, _Rest...> │ │ │ │ -252 : _Nth_type<_Np - 3, _Rest...> │ │ │ │ -253 { }; │ │ │ │ -254 │ │ │ │ -255#if ! __cpp_concepts // Need additional specializations to avoid │ │ │ │ -ambiguities. │ │ │ │ -256 template │ │ │ │ -257 struct _Nth_type<0, _Tp0, _Tp1, _Rest...> │ │ │ │ -258 { using type = _Tp0; }; │ │ │ │ +246 template │ │ │ │ +247 _u_n_o_r_d_e_r_e_d___m_a_p(_InputIterator __first, _InputIterator __last, │ │ │ │ +248 _s_i_z_e___t_y_p_e __n, │ │ │ │ +249 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ +250 : _u_n_o_r_d_e_r_e_d___m_a_p(__first, __last, __n, _h_a_s_h_e_r(), _k_e_y___e_q_u_a_l(), __a) │ │ │ │ +251 { } │ │ │ │ +252 │ │ │ │ +253 template │ │ │ │ +254 _u_n_o_r_d_e_r_e_d___m_a_p(_InputIterator __first, _InputIterator __last, │ │ │ │ +255 _s_i_z_e___t_y_p_e __n, const _h_a_s_h_e_r& __hf, │ │ │ │ +256 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ +257 : _u_n_o_r_d_e_r_e_d___m_a_p(__first, __last, __n, __hf, _k_e_y___e_q_u_a_l(), __a) │ │ │ │ +258 { } │ │ │ │ 259 │ │ │ │ -260 template │ │ │ │ -261 struct _Nth_type<0, _Tp0, _Tp1, _Tp2, _Rest...> │ │ │ │ -262 { using type = _Tp0; }; │ │ │ │ -263 │ │ │ │ -264 template │ │ │ │ -265 struct _Nth_type<1, _Tp0, _Tp1, _Tp2, _Rest...> │ │ │ │ -266 { using type = _Tp1; }; │ │ │ │ -267#endif │ │ │ │ -268 │ │ │ │ -269_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ -270} // namespace │ │ │ │ +260 _u_n_o_r_d_e_r_e_d___m_a_p(initializer_list __l, │ │ │ │ +261 _s_i_z_e___t_y_p_e __n, │ │ │ │ +262 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ +263 : _u_n_o_r_d_e_r_e_d___m_a_p(__l, __n, _h_a_s_h_e_r(), _k_e_y___e_q_u_a_l(), __a) │ │ │ │ +264 { } │ │ │ │ +265 │ │ │ │ +266 _u_n_o_r_d_e_r_e_d___m_a_p(initializer_list __l, │ │ │ │ +267 _s_i_z_e___t_y_p_e __n, const _h_a_s_h_e_r& __hf, │ │ │ │ +268 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ +269 : _u_n_o_r_d_e_r_e_d___m_a_p(__l, __n, __hf, _k_e_y___e_q_u_a_l(), __a) │ │ │ │ +270 { } │ │ │ │ 271 │ │ │ │ -272#endif // C++11 │ │ │ │ -273#endif /* _GLIBCXX_UTILITY_H */ │ │ │ │ -_t_y_p_e___t_r_a_i_t_s │ │ │ │ -_m_o_v_e_._h │ │ │ │ +272 /// Copy assignment operator. │ │ │ │ +273 _u_n_o_r_d_e_r_e_d___m_a_p& │ │ │ │ +_2_7_4 _o_p_e_r_a_t_o_r_=(const _u_n_o_r_d_e_r_e_d___m_a_p&) = default; │ │ │ │ +275 │ │ │ │ +276 /// Move assignment operator. │ │ │ │ +277 _u_n_o_r_d_e_r_e_d___m_a_p& │ │ │ │ +_2_7_8 _o_p_e_r_a_t_o_r_=(_u_n_o_r_d_e_r_e_d___m_a_p&&) = default; │ │ │ │ +279 │ │ │ │ +280 /** │ │ │ │ +281 * @brief %Unordered_map list assignment operator. │ │ │ │ +282 * @param __l An initializer_list. │ │ │ │ +283 * │ │ │ │ +284 * This function fills an %unordered_map with copies of the elements in │ │ │ │ +285 * the initializer list @a __l. │ │ │ │ +286 * │ │ │ │ +287 * Note that the assignment completely changes the %unordered_map and │ │ │ │ +288 * that the resulting %unordered_map's size is the same as the number │ │ │ │ +289 * of elements assigned. │ │ │ │ +290 */ │ │ │ │ +291 _u_n_o_r_d_e_r_e_d___m_a_p& │ │ │ │ +_2_9_2 _o_p_e_r_a_t_o_r_=(_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t_<_v_a_l_u_e___t_y_p_e_> _____l) │ │ │ │ +293 { │ │ │ │ +294 _M_h = _____l; │ │ │ │ +295 return *this; │ │ │ │ +296 } │ │ │ │ +297 │ │ │ │ +298 /// Returns the allocator object used by the %unordered_map. │ │ │ │ +299 _a_l_l_o_c_a_t_o_r___t_y_p_e │ │ │ │ +_3_0_0 _g_e_t___a_l_l_o_c_a_t_o_r() const noexcept │ │ │ │ +301 { return _M_h.get_allocator(); } │ │ │ │ +302 │ │ │ │ +303 // size and capacity: │ │ │ │ +304 │ │ │ │ +305 /// Returns true if the %unordered_map is empty. │ │ │ │ +306 _GLIBCXX_NODISCARD bool │ │ │ │ +_3_0_7 _e_m_p_t_y() const noexcept │ │ │ │ +308 { return _M_h.empty(); } │ │ │ │ +309 │ │ │ │ +310 /// Returns the size of the %unordered_map. │ │ │ │ +311 _s_i_z_e___t_y_p_e │ │ │ │ +_3_1_2 _s_i_z_e() const noexcept │ │ │ │ +313 { return _M_h.size(); } │ │ │ │ +314 │ │ │ │ +315 /// Returns the maximum size of the %unordered_map. │ │ │ │ +316 _s_i_z_e___t_y_p_e │ │ │ │ +_3_1_7 _m_a_x___s_i_z_e() const noexcept │ │ │ │ +318 { return _M_h.max_size(); } │ │ │ │ +319 │ │ │ │ +320 // iterators. │ │ │ │ +321 │ │ │ │ +322 /** │ │ │ │ +323 * Returns a read/write iterator that points to the first element in the │ │ │ │ +324 * %unordered_map. │ │ │ │ +325 */ │ │ │ │ +326 _i_t_e_r_a_t_o_r │ │ │ │ +_3_2_7 _b_e_g_i_n() noexcept │ │ │ │ +328 { return _M_h.begin(); } │ │ │ │ +329 │ │ │ │ +330 ///@{ │ │ │ │ +331 /** │ │ │ │ +332 * Returns a read-only (constant) iterator that points to the first │ │ │ │ +333 * element in the %unordered_map. │ │ │ │ +334 */ │ │ │ │ +335 _c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ +_3_3_6 _b_e_g_i_n() const noexcept │ │ │ │ +337 { return _M_h.begin(); } │ │ │ │ +338 │ │ │ │ +339 _c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ +_3_4_0 _c_b_e_g_i_n() const noexcept │ │ │ │ +341 { return _M_h.begin(); } │ │ │ │ +342 ///@} │ │ │ │ +343 │ │ │ │ +344 /** │ │ │ │ +345 * Returns a read/write iterator that points one past the last element in │ │ │ │ +346 * the %unordered_map. │ │ │ │ +347 */ │ │ │ │ +348 _i_t_e_r_a_t_o_r │ │ │ │ +_3_4_9 _e_n_d() noexcept │ │ │ │ +350 { return _M_h.end(); } │ │ │ │ +351 │ │ │ │ +352 ///@{ │ │ │ │ +353 /** │ │ │ │ +354 * Returns a read-only (constant) iterator that points one past the last │ │ │ │ +355 * element in the %unordered_map. │ │ │ │ +356 */ │ │ │ │ +357 _c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ +_3_5_8 _e_n_d() const noexcept │ │ │ │ +359 { return _M_h.end(); } │ │ │ │ +360 │ │ │ │ +361 _c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ +_3_6_2 _c_e_n_d() const noexcept │ │ │ │ +363 { return _M_h.end(); } │ │ │ │ +364 ///@} │ │ │ │ +365 │ │ │ │ +366 // modifiers. │ │ │ │ +367 │ │ │ │ +368 /** │ │ │ │ +369 * @brief Attempts to build and insert a std::pair into the │ │ │ │ +370 * %unordered_map. │ │ │ │ +371 * │ │ │ │ +372 * @param __args Arguments used to generate a new pair instance (see │ │ │ │ +373 * std::piecewise_contruct for passing arguments to each │ │ │ │ +374 * part of the pair constructor). │ │ │ │ +375 * │ │ │ │ +376 * @return A pair, of which the first element is an iterator that points │ │ │ │ +377 * to the possibly inserted pair, and the second is a bool that │ │ │ │ +378 * is true if the pair was actually inserted. │ │ │ │ +379 * │ │ │ │ +380 * This function attempts to build and insert a (key, value) %pair into │ │ │ │ +381 * the %unordered_map. │ │ │ │ +382 * An %unordered_map relies on unique keys and thus a %pair is only │ │ │ │ +383 * inserted if its first element (the key) is not already present in the │ │ │ │ +384 * %unordered_map. │ │ │ │ +385 * │ │ │ │ +386 * Insertion requires amortized constant time. │ │ │ │ +387 */ │ │ │ │ +388 template │ │ │ │ +389 _s_t_d_:_:_p_a_i_r_<_i_t_e_r_a_t_o_r_,_ _b_o_o_l_> │ │ │ │ +_3_9_0 _e_m_p_l_a_c_e(___A_r_g_s&&... _____a_r_g_s) │ │ │ │ +391 { return _M_h.emplace(_s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(_____a_r_g_s)...); } │ │ │ │ +392 │ │ │ │ +393 /** │ │ │ │ +394 * @brief Attempts to build and insert a std::pair into the │ │ │ │ +395 * %unordered_map. │ │ │ │ +396 * │ │ │ │ +397 * @param __pos An iterator that serves as a hint as to where the pair │ │ │ │ +398 * should be inserted. │ │ │ │ +399 * @param __args Arguments used to generate a new pair instance (see │ │ │ │ +400 * std::piecewise_contruct for passing arguments to each │ │ │ │ +401 * part of the pair constructor). │ │ │ │ +402 * @return An iterator that points to the element with key of the │ │ │ │ +403 * std::pair built from @a __args (may or may not be that │ │ │ │ +404 * std::pair). │ │ │ │ +405 * │ │ │ │ +406 * This function is not concerned about whether the insertion took place, │ │ │ │ +407 * and thus does not return a boolean like the single-argument emplace() │ │ │ │ +408 * does. │ │ │ │ +409 * Note that the first parameter is only a hint and can potentially │ │ │ │ +410 * improve the performance of the insertion process. A bad hint would │ │ │ │ +411 * cause no gains in efficiency. │ │ │ │ +412 * │ │ │ │ +413 * See │ │ │ │ +414 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/ │ │ │ │ +associative.html#containers.associative.insert_hints │ │ │ │ +415 * for more on @a hinting. │ │ │ │ +416 * │ │ │ │ +417 * Insertion requires amortized constant time. │ │ │ │ +418 */ │ │ │ │ +419 template │ │ │ │ +420 _i_t_e_r_a_t_o_r │ │ │ │ +_4_2_1 _e_m_p_l_a_c_e___h_i_n_t(_c_o_n_s_t___i_t_e_r_a_t_o_r _____p_o_s, ___A_r_g_s&&... _____a_r_g_s) │ │ │ │ +422 { return _M_h.emplace_hint(_____p_o_s, _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(_____a_r_g_s)...); } │ │ │ │ +423 │ │ │ │ +424#if __cplusplus > 201402L │ │ │ │ +425 /// Extract a node. │ │ │ │ +426 node_type │ │ │ │ +_4_2_7 _e_x_t_r_a_c_t(_c_o_n_s_t___i_t_e_r_a_t_o_r _____p_o_s) │ │ │ │ +428 { │ │ │ │ +429 __glibcxx_assert(_____p_o_s != _e_n_d()); │ │ │ │ +430 return _M_h.extract(_____p_o_s); │ │ │ │ +431 } │ │ │ │ +432 │ │ │ │ +433 /// Extract a node. │ │ │ │ +434 node_type │ │ │ │ +_4_3_5 _e_x_t_r_a_c_t(const _k_e_y___t_y_p_e& _____k_e_y) │ │ │ │ +436 { return _M_h.extract(_____k_e_y); } │ │ │ │ +437 │ │ │ │ +438 /// Re-insert an extracted node. │ │ │ │ +439 insert_return_type │ │ │ │ +_4_4_0 _i_n_s_e_r_t(node_type&& _____n_h) │ │ │ │ +441 { return _M_h._M_reinsert_node(_s_t_d_:_:_m_o_v_e(_____n_h)); } │ │ │ │ +442 │ │ │ │ +443 /// Re-insert an extracted node. │ │ │ │ +444 _i_t_e_r_a_t_o_r │ │ │ │ +_4_4_5 _i_n_s_e_r_t(_c_o_n_s_t___i_t_e_r_a_t_o_r, node_type&& _____n_h) │ │ │ │ +446 { return _M_h._M_reinsert_node(_s_t_d_:_:_m_o_v_e(_____n_h)).position; } │ │ │ │ +447 │ │ │ │ +448#define __cpp_lib_unordered_map_try_emplace 201411L │ │ │ │ +449 /** │ │ │ │ +450 * @brief Attempts to build and insert a std::pair into the │ │ │ │ +451 * %unordered_map. │ │ │ │ +452 * │ │ │ │ +453 * @param __k Key to use for finding a possibly existing pair in │ │ │ │ +454 * the unordered_map. │ │ │ │ +455 * @param __args Arguments used to generate the .second for a │ │ │ │ +456 * new pair instance. │ │ │ │ +457 * │ │ │ │ +458 * @return A pair, of which the first element is an iterator that points │ │ │ │ +459 * to the possibly inserted pair, and the second is a bool that │ │ │ │ +460 * is true if the pair was actually inserted. │ │ │ │ +461 * │ │ │ │ +462 * This function attempts to build and insert a (key, value) %pair into │ │ │ │ +463 * the %unordered_map. │ │ │ │ +464 * An %unordered_map relies on unique keys and thus a %pair is only │ │ │ │ +465 * inserted if its first element (the key) is not already present in the │ │ │ │ +466 * %unordered_map. │ │ │ │ +467 * If a %pair is not inserted, this function has no effect. │ │ │ │ +468 * │ │ │ │ +469 * Insertion requires amortized constant time. │ │ │ │ +470 */ │ │ │ │ +471 template │ │ │ │ +472 _p_a_i_r_<_i_t_e_r_a_t_o_r_,_ _b_o_o_l_> │ │ │ │ +_4_7_3 _t_r_y___e_m_p_l_a_c_e(const _k_e_y___t_y_p_e& _____k, ___A_r_g_s&&... _____a_r_g_s) │ │ │ │ +474 { │ │ │ │ +475 return _M_h.try_emplace(_c_e_n_d(), _____k, _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(_____a_r_g_s)...); │ │ │ │ +476 } │ │ │ │ +477 │ │ │ │ +478 // move-capable overload │ │ │ │ +479 template │ │ │ │ +480 _p_a_i_r_<_i_t_e_r_a_t_o_r_,_ _b_o_o_l_> │ │ │ │ +481 _t_r_y___e_m_p_l_a_c_e(_k_e_y___t_y_p_e&& _____k, ___A_r_g_s&&... _____a_r_g_s) │ │ │ │ +482 { │ │ │ │ +483 return _M_h.try_emplace(_c_e_n_d(), _s_t_d_:_:_m_o_v_e(_____k), │ │ │ │ +484 _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(_____a_r_g_s)...); │ │ │ │ +485 } │ │ │ │ +486 │ │ │ │ +487 /** │ │ │ │ +488 * @brief Attempts to build and insert a std::pair into the │ │ │ │ +489 * %unordered_map. │ │ │ │ +490 * │ │ │ │ +491 * @param __hint An iterator that serves as a hint as to where the pair │ │ │ │ +492 * should be inserted. │ │ │ │ +493 * @param __k Key to use for finding a possibly existing pair in │ │ │ │ +494 * the unordered_map. │ │ │ │ +495 * @param __args Arguments used to generate the .second for a │ │ │ │ +496 * new pair instance. │ │ │ │ +497 * @return An iterator that points to the element with key of the │ │ │ │ +498 * std::pair built from @a __args (may or may not be that │ │ │ │ +499 * std::pair). │ │ │ │ +500 * │ │ │ │ +501 * This function is not concerned about whether the insertion took place, │ │ │ │ +502 * and thus does not return a boolean like the single-argument emplace() │ │ │ │ +503 * does. However, if insertion did not take place, │ │ │ │ +504 * this function has no effect. │ │ │ │ +505 * Note that the first parameter is only a hint and can potentially │ │ │ │ +506 * improve the performance of the insertion process. A bad hint would │ │ │ │ +507 * cause no gains in efficiency. │ │ │ │ +508 * │ │ │ │ +509 * See │ │ │ │ +510 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/ │ │ │ │ +associative.html#containers.associative.insert_hints │ │ │ │ +511 * for more on @a hinting. │ │ │ │ +512 * │ │ │ │ +513 * Insertion requires amortized constant time. │ │ │ │ +514 */ │ │ │ │ +515 template │ │ │ │ +516 _i_t_e_r_a_t_o_r │ │ │ │ +_5_1_7 _t_r_y___e_m_p_l_a_c_e(_c_o_n_s_t___i_t_e_r_a_t_o_r _____h_i_n_t, const _k_e_y___t_y_p_e& _____k, │ │ │ │ +518 ___A_r_g_s&&... _____a_r_g_s) │ │ │ │ +519 { │ │ │ │ +520 return _M_h.try_emplace(_____h_i_n_t, _____k, │ │ │ │ +521 _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(_____a_r_g_s)...).first; │ │ │ │ +522 } │ │ │ │ +523 │ │ │ │ +524 // move-capable overload │ │ │ │ +525 template │ │ │ │ +526 _i_t_e_r_a_t_o_r │ │ │ │ +527 _t_r_y___e_m_p_l_a_c_e(_c_o_n_s_t___i_t_e_r_a_t_o_r _____h_i_n_t, _k_e_y___t_y_p_e&& _____k, ___A_r_g_s&&... _____a_r_g_s) │ │ │ │ +528 { │ │ │ │ +529 return _M_h.try_emplace(_____h_i_n_t, _s_t_d_:_:_m_o_v_e(_____k), │ │ │ │ +530 _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(_____a_r_g_s)...).first; │ │ │ │ +531 } │ │ │ │ +532#endif // C++17 │ │ │ │ +533 │ │ │ │ +534 ///@{ │ │ │ │ +535 /** │ │ │ │ +536 * @brief Attempts to insert a std::pair into the %unordered_map. │ │ │ │ +537 │ │ │ │ +538 * @param __x Pair to be inserted (see std::make_pair for easy │ │ │ │ +539 * creation of pairs). │ │ │ │ +540 * │ │ │ │ +541 * @return A pair, of which the first element is an iterator that │ │ │ │ +542 * points to the possibly inserted pair, and the second is │ │ │ │ +543 * a bool that is true if the pair was actually inserted. │ │ │ │ +544 * │ │ │ │ +545 * This function attempts to insert a (key, value) %pair into the │ │ │ │ +546 * %unordered_map. An %unordered_map relies on unique keys and thus a │ │ │ │ +547 * %pair is only inserted if its first element (the key) is not already │ │ │ │ +548 * present in the %unordered_map. │ │ │ │ +549 * │ │ │ │ +550 * Insertion requires amortized constant time. │ │ │ │ +551 */ │ │ │ │ +552 _s_t_d_:_:_p_a_i_r_<_i_t_e_r_a_t_o_r_,_ _b_o_o_l_> │ │ │ │ +_5_5_3 _i_n_s_e_r_t(const _v_a_l_u_e___t_y_p_e& __x) │ │ │ │ +554 { return _M_h.insert(__x); } │ │ │ │ +555 │ │ │ │ +556 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ +557 // 2354. Unnecessary copying when inserting into maps with braced-init │ │ │ │ +558 _s_t_d_:_:_p_a_i_r_<_i_t_e_r_a_t_o_r_,_ _b_o_o_l_> │ │ │ │ +_5_5_9 _i_n_s_e_r_t(_v_a_l_u_e___t_y_p_e&& __x) │ │ │ │ +560 { return _M_h.insert(_s_t_d_:_:_m_o_v_e(__x)); } │ │ │ │ +561 │ │ │ │ +562 template │ │ │ │ +563 _____e_n_a_b_l_e___i_f___t_<_i_s___c_o_n_s_t_r_u_c_t_i_b_l_e_<_v_a_l_u_e___t_y_p_e_,_ ___P_a_i_r_&_&_>_:_:_v_a_l_u_e, │ │ │ │ +564 _p_a_i_r_<_i_t_e_r_a_t_o_r_,_ _b_o_o_l_>> │ │ │ │ +_5_6_5 _i_n_s_e_r_t(___P_a_i_r&& __x) │ │ │ │ +566 { return _M_h.emplace(_s_t_d_:_:_f_o_r_w_a_r_d_<___P_a_i_r_>(__x)); } │ │ │ │ +567 ///@} │ │ │ │ +568 │ │ │ │ +569 ///@{ │ │ │ │ +570 /** │ │ │ │ +571 * @brief Attempts to insert a std::pair into the %unordered_map. │ │ │ │ +572 * @param __hint An iterator that serves as a hint as to where the │ │ │ │ +573 * pair should be inserted. │ │ │ │ +574 * @param __x Pair to be inserted (see std::make_pair for easy creation │ │ │ │ +575 * of pairs). │ │ │ │ +576 * @return An iterator that points to the element with key of │ │ │ │ +577 * @a __x (may or may not be the %pair passed in). │ │ │ │ +578 * │ │ │ │ +579 * This function is not concerned about whether the insertion took place, │ │ │ │ +580 * and thus does not return a boolean like the single-argument insert() │ │ │ │ +581 * does. Note that the first parameter is only a hint and can │ │ │ │ +582 * potentially improve the performance of the insertion process. A bad │ │ │ │ +583 * hint would cause no gains in efficiency. │ │ │ │ +584 * │ │ │ │ +585 * See │ │ │ │ +586 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/ │ │ │ │ +associative.html#containers.associative.insert_hints │ │ │ │ +587 * for more on @a hinting. │ │ │ │ +588 * │ │ │ │ +589 * Insertion requires amortized constant time. │ │ │ │ +590 */ │ │ │ │ +591 _i_t_e_r_a_t_o_r │ │ │ │ +_5_9_2 _i_n_s_e_r_t(_c_o_n_s_t___i_t_e_r_a_t_o_r _____h_i_n_t, const _v_a_l_u_e___t_y_p_e& __x) │ │ │ │ +593 { return _M_h.insert(_____h_i_n_t, __x); } │ │ │ │ +594 │ │ │ │ +595 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ +596 // 2354. Unnecessary copying when inserting into maps with braced-init │ │ │ │ +597 _i_t_e_r_a_t_o_r │ │ │ │ +_5_9_8 _i_n_s_e_r_t(_c_o_n_s_t___i_t_e_r_a_t_o_r _____h_i_n_t, _v_a_l_u_e___t_y_p_e&& __x) │ │ │ │ +599 { return _M_h.insert(_____h_i_n_t, _s_t_d_:_:_m_o_v_e(__x)); } │ │ │ │ +600 │ │ │ │ +601 template │ │ │ │ +602 _____e_n_a_b_l_e___i_f___t_<_i_s___c_o_n_s_t_r_u_c_t_i_b_l_e_<_v_a_l_u_e___t_y_p_e_,_ ___P_a_i_r_&_&_>_:_:_v_a_l_u_e, _i_t_e_r_a_t_o_r> │ │ │ │ +_6_0_3 _i_n_s_e_r_t(_c_o_n_s_t___i_t_e_r_a_t_o_r _____h_i_n_t, ___P_a_i_r&& __x) │ │ │ │ +604 { return _M_h.emplace_hint(_____h_i_n_t, _s_t_d_:_:_f_o_r_w_a_r_d_<___P_a_i_r_>(__x)); } │ │ │ │ +605 ///@} │ │ │ │ +606 │ │ │ │ +607 /** │ │ │ │ +608 * @brief A template function that attempts to insert a range of │ │ │ │ +609 * elements. │ │ │ │ +610 * @param __first Iterator pointing to the start of the range to be │ │ │ │ +611 * inserted. │ │ │ │ +612 * @param __last Iterator pointing to the end of the range. │ │ │ │ +613 * │ │ │ │ +614 * Complexity similar to that of the range constructor. │ │ │ │ +615 */ │ │ │ │ +616 template │ │ │ │ +617 void │ │ │ │ +_6_1_8 _i_n_s_e_r_t(___I_n_p_u_t_I_t_e_r_a_t_o_r __first, ___I_n_p_u_t_I_t_e_r_a_t_o_r __last) │ │ │ │ +619 { _M_h.insert(__first, __last); } │ │ │ │ +620 │ │ │ │ +621 /** │ │ │ │ +622 * @brief Attempts to insert a list of elements into the %unordered_map. │ │ │ │ +623 * @param __l A std::initializer_list of elements │ │ │ │ +624 * to be inserted. │ │ │ │ +625 * │ │ │ │ +626 * Complexity similar to that of the range constructor. │ │ │ │ +627 */ │ │ │ │ +628 void │ │ │ │ +_6_2_9 _i_n_s_e_r_t(_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t_<_v_a_l_u_e___t_y_p_e_> _____l) │ │ │ │ +630 { _M_h.insert(_____l); } │ │ │ │ +631 │ │ │ │ +632 │ │ │ │ +633#if __cplusplus > 201402L │ │ │ │ +634 /** │ │ │ │ +635 * @brief Attempts to insert a std::pair into the %unordered_map. │ │ │ │ +636 * @param __k Key to use for finding a possibly existing pair in │ │ │ │ +637 * the map. │ │ │ │ +638 * @param __obj Argument used to generate the .second for a pair │ │ │ │ +639 * instance. │ │ │ │ +640 * │ │ │ │ +641 * @return A pair, of which the first element is an iterator that │ │ │ │ +642 * points to the possibly inserted pair, and the second is │ │ │ │ +643 * a bool that is true if the pair was actually inserted. │ │ │ │ +644 * │ │ │ │ +645 * This function attempts to insert a (key, value) %pair into the │ │ │ │ +646 * %unordered_map. An %unordered_map relies on unique keys and thus a │ │ │ │ +647 * %pair is only inserted if its first element (the key) is not already │ │ │ │ +648 * present in the %unordered_map. │ │ │ │ +649 * If the %pair was already in the %unordered_map, the .second of │ │ │ │ +650 * the %pair is assigned from __obj. │ │ │ │ +651 * │ │ │ │ +652 * Insertion requires amortized constant time. │ │ │ │ +653 */ │ │ │ │ +654 template │ │ │ │ +655 _p_a_i_r_<_i_t_e_r_a_t_o_r_,_ _b_o_o_l_> │ │ │ │ +_6_5_6 _i_n_s_e_r_t___o_r___a_s_s_i_g_n(const _k_e_y___t_y_p_e& _____k, _Obj&& _____o_b_j) │ │ │ │ +657 { │ │ │ │ +658 auto _____r_e_t = _M_h.try_emplace(_c_e_n_d(), _____k, │ │ │ │ +659 _s_t_d_:_:_f_o_r_w_a_r_d_<___O_b_j_>(_____o_b_j)); │ │ │ │ +660 if (!_____r_e_t.second) │ │ │ │ +661 _____r_e_t.first->second = _s_t_d_:_:_f_o_r_w_a_r_d_<___O_b_j_>(_____o_b_j); │ │ │ │ +662 return _____r_e_t; │ │ │ │ +663 } │ │ │ │ +664 │ │ │ │ +665 // move-capable overload │ │ │ │ +666 template │ │ │ │ +667 _p_a_i_r_<_i_t_e_r_a_t_o_r_,_ _b_o_o_l_> │ │ │ │ +668 _i_n_s_e_r_t___o_r___a_s_s_i_g_n(_k_e_y___t_y_p_e&& _____k, _Obj&& _____o_b_j) │ │ │ │ +669 { │ │ │ │ +670 auto _____r_e_t = _M_h.try_emplace(_c_e_n_d(), _s_t_d_:_:_m_o_v_e(_____k), │ │ │ │ +671 _s_t_d_:_:_f_o_r_w_a_r_d_<___O_b_j_>(_____o_b_j)); │ │ │ │ +672 if (!_____r_e_t.second) │ │ │ │ +673 _____r_e_t.first->second = _s_t_d_:_:_f_o_r_w_a_r_d_<___O_b_j_>(_____o_b_j); │ │ │ │ +674 return _____r_e_t; │ │ │ │ +675 } │ │ │ │ +676 │ │ │ │ +677 /** │ │ │ │ +678 * @brief Attempts to insert a std::pair into the %unordered_map. │ │ │ │ +679 * @param __hint An iterator that serves as a hint as to where the │ │ │ │ +680 * pair should be inserted. │ │ │ │ +681 * @param __k Key to use for finding a possibly existing pair in │ │ │ │ +682 * the unordered_map. │ │ │ │ +683 * @param __obj Argument used to generate the .second for a pair │ │ │ │ +684 * instance. │ │ │ │ +685 * @return An iterator that points to the element with key of │ │ │ │ +686 * @a __x (may or may not be the %pair passed in). │ │ │ │ +687 * │ │ │ │ +688 * This function is not concerned about whether the insertion took place, │ │ │ │ +689 * and thus does not return a boolean like the single-argument insert() │ │ │ │ +690 * does. │ │ │ │ +691 * If the %pair was already in the %unordered map, the .second of │ │ │ │ +692 * the %pair is assigned from __obj. │ │ │ │ +693 * Note that the first parameter is only a hint and can │ │ │ │ +694 * potentially improve the performance of the insertion process. A bad │ │ │ │ +695 * hint would cause no gains in efficiency. │ │ │ │ +696 * │ │ │ │ +697 * See │ │ │ │ +698 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/ │ │ │ │ +associative.html#containers.associative.insert_hints │ │ │ │ +699 * for more on @a hinting. │ │ │ │ +700 * │ │ │ │ +701 * Insertion requires amortized constant time. │ │ │ │ +702 */ │ │ │ │ +703 template │ │ │ │ +704 _i_t_e_r_a_t_o_r │ │ │ │ +_7_0_5 _i_n_s_e_r_t___o_r___a_s_s_i_g_n(_c_o_n_s_t___i_t_e_r_a_t_o_r _____h_i_n_t, const _k_e_y___t_y_p_e& _____k, │ │ │ │ +706 _Obj&& _____o_b_j) │ │ │ │ +707 { │ │ │ │ +708 auto _____r_e_t = _M_h.try_emplace(_____h_i_n_t, _____k, _s_t_d_:_:_f_o_r_w_a_r_d_<___O_b_j_>(_____o_b_j)); │ │ │ │ +709 if (!_____r_e_t.second) │ │ │ │ +710 _____r_e_t.first->second = _s_t_d_:_:_f_o_r_w_a_r_d_<___O_b_j_>(_____o_b_j); │ │ │ │ +711 return _____r_e_t.first; │ │ │ │ +712 } │ │ │ │ +713 │ │ │ │ +714 // move-capable overload │ │ │ │ +715 template │ │ │ │ +716 _i_t_e_r_a_t_o_r │ │ │ │ +717 _i_n_s_e_r_t___o_r___a_s_s_i_g_n(_c_o_n_s_t___i_t_e_r_a_t_o_r _____h_i_n_t, _k_e_y___t_y_p_e&& _____k, _Obj&& _____o_b_j) │ │ │ │ +718 { │ │ │ │ +719 auto _____r_e_t = _M_h.try_emplace(_____h_i_n_t, _s_t_d_:_:_m_o_v_e(_____k), │ │ │ │ +720 _s_t_d_:_:_f_o_r_w_a_r_d_<___O_b_j_>(_____o_b_j)); │ │ │ │ +721 if (!_____r_e_t.second) │ │ │ │ +722 _____r_e_t.first->second = _s_t_d_:_:_f_o_r_w_a_r_d_<___O_b_j_>(_____o_b_j); │ │ │ │ +723 return _____r_e_t.first; │ │ │ │ +724 } │ │ │ │ +725#endif │ │ │ │ +726 │ │ │ │ +727 ///@{ │ │ │ │ +728 /** │ │ │ │ +729 * @brief Erases an element from an %unordered_map. │ │ │ │ +730 * @param __position An iterator pointing to the element to be erased. │ │ │ │ +731 * @return An iterator pointing to the element immediately following │ │ │ │ +732 * @a __position prior to the element being erased. If no such │ │ │ │ +733 * element exists, end() is returned. │ │ │ │ +734 * │ │ │ │ +735 * This function erases an element, pointed to by the given iterator, │ │ │ │ +736 * from an %unordered_map. │ │ │ │ +737 * Note that this function only erases the element, and that if the │ │ │ │ +738 * element is itself a pointer, the pointed-to memory is not touched in │ │ │ │ +739 * any way. Managing the pointer is the user's responsibility. │ │ │ │ +740 */ │ │ │ │ +741 _i_t_e_r_a_t_o_r │ │ │ │ +_7_4_2 _e_r_a_s_e(_c_o_n_s_t___i_t_e_r_a_t_o_r _____p_o_s_i_t_i_o_n) │ │ │ │ +743 { return _M_h.erase(_____p_o_s_i_t_i_o_n); } │ │ │ │ +744 │ │ │ │ +745 // LWG 2059. │ │ │ │ +746 _i_t_e_r_a_t_o_r │ │ │ │ +_7_4_7 _e_r_a_s_e(_i_t_e_r_a_t_o_r _____p_o_s_i_t_i_o_n) │ │ │ │ +748 { return _M_h.erase(_____p_o_s_i_t_i_o_n); } │ │ │ │ +749 ///@} │ │ │ │ +750 │ │ │ │ +751 /** │ │ │ │ +752 * @brief Erases elements according to the provided key. │ │ │ │ +753 * @param __x Key of element to be erased. │ │ │ │ +754 * @return The number of elements erased. │ │ │ │ +755 * │ │ │ │ +756 * This function erases all the elements located by the given key from │ │ │ │ +757 * an %unordered_map. For an %unordered_map the result of this function │ │ │ │ +758 * can only be 0 (not present) or 1 (present). │ │ │ │ +759 * Note that this function only erases the element, and that if the │ │ │ │ +760 * element is itself a pointer, the pointed-to memory is not touched in │ │ │ │ +761 * any way. Managing the pointer is the user's responsibility. │ │ │ │ +762 */ │ │ │ │ +763 _s_i_z_e___t_y_p_e │ │ │ │ +_7_6_4 _e_r_a_s_e(const _k_e_y___t_y_p_e& __x) │ │ │ │ +765 { return _M_h.erase(__x); } │ │ │ │ +766 │ │ │ │ +767 /** │ │ │ │ +768 * @brief Erases a [__first,__last) range of elements from an │ │ │ │ +769 * %unordered_map. │ │ │ │ +770 * @param __first Iterator pointing to the start of the range to be │ │ │ │ +771 * erased. │ │ │ │ +772 * @param __last Iterator pointing to the end of the range to │ │ │ │ +773 * be erased. │ │ │ │ +774 * @return The iterator @a __last. │ │ │ │ +775 * │ │ │ │ +776 * This function erases a sequence of elements from an %unordered_map. │ │ │ │ +777 * Note that this function only erases the elements, and that if │ │ │ │ +778 * the element is itself a pointer, the pointed-to memory is not touched │ │ │ │ +779 * in any way. Managing the pointer is the user's responsibility. │ │ │ │ +780 */ │ │ │ │ +781 _i_t_e_r_a_t_o_r │ │ │ │ +_7_8_2 _e_r_a_s_e(_c_o_n_s_t___i_t_e_r_a_t_o_r __first, _c_o_n_s_t___i_t_e_r_a_t_o_r __last) │ │ │ │ +783 { return _M_h.erase(__first, __last); } │ │ │ │ +784 │ │ │ │ +785 /** │ │ │ │ +786 * Erases all elements in an %unordered_map. │ │ │ │ +787 * Note that this function only erases the elements, and that if the │ │ │ │ +788 * elements themselves are pointers, the pointed-to memory is not touched │ │ │ │ +789 * in any way. Managing the pointer is the user's responsibility. │ │ │ │ +790 */ │ │ │ │ +791 void │ │ │ │ +_7_9_2 _c_l_e_a_r() noexcept │ │ │ │ +793 { _M_h.clear(); } │ │ │ │ +794 │ │ │ │ +795 /** │ │ │ │ +796 * @brief Swaps data with another %unordered_map. │ │ │ │ +797 * @param __x An %unordered_map of the same element and allocator │ │ │ │ +798 * types. │ │ │ │ +799 * │ │ │ │ +800 * This exchanges the elements between two %unordered_map in constant │ │ │ │ +801 * time. │ │ │ │ +802 * Note that the global std::swap() function is specialized such that │ │ │ │ +803 * std::swap(m1,m2) will feed to this function. │ │ │ │ +804 */ │ │ │ │ +805 void │ │ │ │ +_8_0_6 _s_w_a_p(_u_n_o_r_d_e_r_e_d___m_a_p& __x) │ │ │ │ +807 noexcept( noexcept(_M_h.swap(__x._M_h)) ) │ │ │ │ +808 { _M_h.swap(__x._M_h); } │ │ │ │ +809 │ │ │ │ +810#if __cplusplus > 201402L │ │ │ │ +811 template │ │ │ │ +812 friend class std::_Hash_merge_helper; │ │ │ │ +813 │ │ │ │ +814 template │ │ │ │ +815 void │ │ │ │ +816 merge(_u_n_o_r_d_e_r_e_d___m_a_p_<___K_e_y_,_ ___T_p_,_ ___H_2_,_ ___P_2_,_ ___A_l_l_o_c_>& _____s_o_u_r_c_e) │ │ │ │ +817 { │ │ │ │ +818 using ___M_e_r_g_e___h_e_l_p_e_r = ___H_a_s_h___m_e_r_g_e___h_e_l_p_e_r_<_u_n_o_r_d_e_r_e_d___m_a_p_,_ ___H_2_,_ ___P_2_>; │ │ │ │ +819 _M_h._M_merge_unique(_Merge_helper::_S_get_table(_____s_o_u_r_c_e)); │ │ │ │ +820 } │ │ │ │ +821 │ │ │ │ +822 template │ │ │ │ +823 void │ │ │ │ +824 merge(unordered_map<_Key, _Tp, _H2, _P2, _Alloc>&& __source) │ │ │ │ +825 { merge(__source); } │ │ │ │ +826 │ │ │ │ +827 template │ │ │ │ +828 void │ │ │ │ +829 merge(unordered_multimap<_Key, _Tp, _H2, _P2, _Alloc>& __source) │ │ │ │ +830 { │ │ │ │ +831 using _Merge_helper = _Hash_merge_helper; │ │ │ │ +832 _M_h._M_merge_unique(_Merge_helper::_S_get_table(__source)); │ │ │ │ +833 } │ │ │ │ +834 │ │ │ │ +835 template │ │ │ │ +836 void │ │ │ │ +837 merge(unordered_multimap<_Key, _Tp, _H2, _P2, _Alloc>&& __source) │ │ │ │ +838 { merge(__source); } │ │ │ │ +839#endif // C++17 │ │ │ │ +840 │ │ │ │ +841 // observers. │ │ │ │ +842 │ │ │ │ +843 /// Returns the hash functor object with which the %unordered_map was │ │ │ │ +844 /// constructed. │ │ │ │ +845 _h_a_s_h_e_r │ │ │ │ +_8_4_6 _h_a_s_h___f_u_n_c_t_i_o_n() const │ │ │ │ +847 { return _M_h.hash_function(); } │ │ │ │ +848 │ │ │ │ +849 /// Returns the key comparison object with which the %unordered_map was │ │ │ │ +850 /// constructed. │ │ │ │ +851 _k_e_y___e_q_u_a_l │ │ │ │ +_8_5_2 _k_e_y___e_q() const │ │ │ │ +853 { return _M_h.key_eq(); } │ │ │ │ +854 │ │ │ │ +855 // lookup. │ │ │ │ +856 │ │ │ │ +857 ///@{ │ │ │ │ +858 /** │ │ │ │ +859 * @brief Tries to locate an element in an %unordered_map. │ │ │ │ +860 * @param __x Key to be located. │ │ │ │ +861 * @return Iterator pointing to sought-after element, or end() if not │ │ │ │ +862 * found. │ │ │ │ +863 * │ │ │ │ +864 * This function takes a key and tries to locate the element with which │ │ │ │ +865 * the key matches. If successful the function returns an iterator │ │ │ │ +866 * pointing to the sought after element. If unsuccessful it returns the │ │ │ │ +867 * past-the-end ( @c end() ) iterator. │ │ │ │ +868 */ │ │ │ │ +869 _i_t_e_r_a_t_o_r │ │ │ │ +_8_7_0 _f_i_n_d(const _k_e_y___t_y_p_e& __x) │ │ │ │ +871 { return _M_h.find(__x); } │ │ │ │ +872 │ │ │ │ +873#if __cplusplus > 201703L │ │ │ │ +874 template │ │ │ │ +875 auto │ │ │ │ +_8_7_6 _f_i_n_d(const ___K_t& __x) -> decltype(_M_h._M_find_tr(__x)) │ │ │ │ +877 { return _M_h._M_find_tr(__x); } │ │ │ │ +878#endif │ │ │ │ +879 │ │ │ │ +880 _c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ +_8_8_1 _f_i_n_d(const _k_e_y___t_y_p_e& __x) const │ │ │ │ +882 { return _M_h.find(__x); } │ │ │ │ +883 │ │ │ │ +884#if __cplusplus > 201703L │ │ │ │ +885 template │ │ │ │ +886 auto │ │ │ │ +_8_8_7 _f_i_n_d(const ___K_t& __x) const -> decltype(_M_h._M_find_tr(__x)) │ │ │ │ +888 { return _M_h._M_find_tr(__x); } │ │ │ │ +889#endif │ │ │ │ +890 ///@} │ │ │ │ +891 │ │ │ │ +892 ///@{ │ │ │ │ +893 /** │ │ │ │ +894 * @brief Finds the number of elements. │ │ │ │ +895 * @param __x Key to count. │ │ │ │ +896 * @return Number of elements with specified key. │ │ │ │ +897 * │ │ │ │ +898 * This function only makes sense for %unordered_multimap; for │ │ │ │ +899 * %unordered_map the result will either be 0 (not present) or 1 │ │ │ │ +900 * (present). │ │ │ │ +901 */ │ │ │ │ +902 _s_i_z_e___t_y_p_e │ │ │ │ +_9_0_3 _c_o_u_n_t(const _k_e_y___t_y_p_e& __x) const │ │ │ │ +904 { return _M_h.count(__x); } │ │ │ │ +905 │ │ │ │ +906#if __cplusplus > 201703L │ │ │ │ +907 template │ │ │ │ +908 auto │ │ │ │ +_9_0_9 _c_o_u_n_t(const ___K_t& __x) const -> decltype(_M_h._M_count_tr(__x)) │ │ │ │ +910 { return _M_h._M_count_tr(__x); } │ │ │ │ +911#endif │ │ │ │ +912 ///@} │ │ │ │ +913 │ │ │ │ +914#if __cplusplus > 201703L │ │ │ │ +915 ///@{ │ │ │ │ +916 /** │ │ │ │ +917 * @brief Finds whether an element with the given key exists. │ │ │ │ +918 * @param __x Key of elements to be located. │ │ │ │ +919 * @return True if there is any element with the specified key. │ │ │ │ +920 */ │ │ │ │ +921 bool │ │ │ │ +_9_2_2 _c_o_n_t_a_i_n_s(const _k_e_y___t_y_p_e& __x) const │ │ │ │ +923 { return _M_h.find(__x) != _M_h.end(); } │ │ │ │ +924 │ │ │ │ +925 template │ │ │ │ +926 auto │ │ │ │ +_9_2_7 _c_o_n_t_a_i_n_s(const ___K_t& __x) const │ │ │ │ +928 -> decltype(_M_h._M_find_tr(__x), _v_o_i_d(), true) │ │ │ │ +929 { return _M_h._M_find_tr(__x) != _M_h.end(); } │ │ │ │ +930 ///@} │ │ │ │ +931#endif │ │ │ │ +932 │ │ │ │ +933 ///@{ │ │ │ │ +934 /** │ │ │ │ +935 * @brief Finds a subsequence matching given key. │ │ │ │ +936 * @param __x Key to be located. │ │ │ │ +937 * @return Pair of iterators that possibly points to the subsequence │ │ │ │ +938 * matching given key. │ │ │ │ +939 * │ │ │ │ +940 * This function probably only makes sense for %unordered_multimap. │ │ │ │ +941 */ │ │ │ │ +942 _s_t_d_:_:_p_a_i_r_<_i_t_e_r_a_t_o_r_,_ _i_t_e_r_a_t_o_r_> │ │ │ │ +_9_4_3 _e_q_u_a_l___r_a_n_g_e(const _k_e_y___t_y_p_e& __x) │ │ │ │ +944 { return _M_h.equal_range(__x); } │ │ │ │ +945 │ │ │ │ +946#if __cplusplus > 201703L │ │ │ │ +947 template │ │ │ │ +948 auto │ │ │ │ +_9_4_9 _e_q_u_a_l___r_a_n_g_e(const ___K_t& __x) │ │ │ │ +950 -> decltype(_M_h._M_equal_range_tr(__x)) │ │ │ │ +951 { return _M_h._M_equal_range_tr(__x); } │ │ │ │ +952#endif │ │ │ │ +953 │ │ │ │ +954 _s_t_d_:_:_p_a_i_r_<_c_o_n_s_t___i_t_e_r_a_t_o_r_,_ _c_o_n_s_t___i_t_e_r_a_t_o_r_> │ │ │ │ +_9_5_5 _e_q_u_a_l___r_a_n_g_e(const _k_e_y___t_y_p_e& __x) const │ │ │ │ +956 { return _M_h.equal_range(__x); } │ │ │ │ +957 │ │ │ │ +958#if __cplusplus > 201703L │ │ │ │ +959 template │ │ │ │ +960 auto │ │ │ │ +_9_6_1 _e_q_u_a_l___r_a_n_g_e(const ___K_t& __x) const │ │ │ │ +962 -> decltype(_M_h._M_equal_range_tr(__x)) │ │ │ │ +963 { return _M_h._M_equal_range_tr(__x); } │ │ │ │ +964#endif │ │ │ │ +965 ///@} │ │ │ │ +966 │ │ │ │ +967 ///@{ │ │ │ │ +968 /** │ │ │ │ +969 * @brief Subscript ( @c [] ) access to %unordered_map data. │ │ │ │ +970 * @param __k The key for which data should be retrieved. │ │ │ │ +971 * @return A reference to the data of the (key,data) %pair. │ │ │ │ +972 * │ │ │ │ +973 * Allows for easy lookup with the subscript ( @c [] )operator. Returns │ │ │ │ +974 * data associated with the key specified in subscript. If the key does │ │ │ │ +975 * not exist, a pair with that key is created using default values, which │ │ │ │ +976 * is then returned. │ │ │ │ +977 * │ │ │ │ +978 * Lookup requires constant time. │ │ │ │ +979 */ │ │ │ │ +980 _m_a_p_p_e_d___t_y_p_e& │ │ │ │ +_9_8_1 _o_p_e_r_a_t_o_r_[_](const _k_e_y___t_y_p_e& _____k) │ │ │ │ +982 { return _M_h[_____k]; } │ │ │ │ +983 │ │ │ │ +984 _m_a_p_p_e_d___t_y_p_e& │ │ │ │ +_9_8_5 _o_p_e_r_a_t_o_r_[_](_k_e_y___t_y_p_e&& _____k) │ │ │ │ +986 { return _M_h[_s_t_d_:_:_m_o_v_e(_____k)]; } │ │ │ │ +987 ///@} │ │ │ │ +988 │ │ │ │ +989 ///@{ │ │ │ │ +990 /** │ │ │ │ +991 * @brief Access to %unordered_map data. │ │ │ │ +992 * @param __k The key for which data should be retrieved. │ │ │ │ +993 * @return A reference to the data whose key is equal to @a __k, if │ │ │ │ +994 * such a data is present in the %unordered_map. │ │ │ │ +995 * @throw std::out_of_range If no such data is present. │ │ │ │ +996 */ │ │ │ │ +997 _m_a_p_p_e_d___t_y_p_e& │ │ │ │ +_9_9_8 _a_t(const _k_e_y___t_y_p_e& _____k) │ │ │ │ +999 { return _M_h.at(_____k); } │ │ │ │ +1000 │ │ │ │ +1001 const _m_a_p_p_e_d___t_y_p_e& │ │ │ │ +_1_0_0_2 _a_t(const _k_e_y___t_y_p_e& _____k) const │ │ │ │ +1003 { return _M_h.at(_____k); } │ │ │ │ +1004 ///@} │ │ │ │ +1005 │ │ │ │ +1006 // bucket interface. │ │ │ │ +1007 │ │ │ │ +1008 /// Returns the number of buckets of the %unordered_map. │ │ │ │ +1009 _s_i_z_e___t_y_p_e │ │ │ │ +_1_0_1_0 _b_u_c_k_e_t___c_o_u_n_t() const noexcept │ │ │ │ +1011 { return _M_h.bucket_count(); } │ │ │ │ +1012 │ │ │ │ +1013 /// Returns the maximum number of buckets of the %unordered_map. │ │ │ │ +1014 _s_i_z_e___t_y_p_e │ │ │ │ +_1_0_1_5 _m_a_x___b_u_c_k_e_t___c_o_u_n_t() const noexcept │ │ │ │ +1016 { return _M_h.max_bucket_count(); } │ │ │ │ +1017 │ │ │ │ +1018 /* │ │ │ │ +1019 * @brief Returns the number of elements in a given bucket. │ │ │ │ +1020 * @param __n A bucket index. │ │ │ │ +1021 * @return The number of elements in the bucket. │ │ │ │ +1022 */ │ │ │ │ +1023 _s_i_z_e___t_y_p_e │ │ │ │ +1024 bucket_size(_s_i_z_e___t_y_p_e __n) const │ │ │ │ +1025 { return _M_h.bucket_size(__n); } │ │ │ │ +1026 │ │ │ │ +1027 /* │ │ │ │ +1028 * @brief Returns the bucket index of a given element. │ │ │ │ +1029 * @param __key A key instance. │ │ │ │ +1030 * @return The key bucket index. │ │ │ │ +1031 */ │ │ │ │ +1032 _s_i_z_e___t_y_p_e │ │ │ │ +1033 bucket(const _k_e_y___t_y_p_e& __key) const │ │ │ │ +1034 { return _M_h.bucket(__key); } │ │ │ │ +1035 │ │ │ │ +1036 /** │ │ │ │ +1037 * @brief Returns a read/write iterator pointing to the first bucket │ │ │ │ +1038 * element. │ │ │ │ +1039 * @param __n The bucket index. │ │ │ │ +1040 * @return A read/write local iterator. │ │ │ │ +1041 */ │ │ │ │ +1042 _l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ +_1_0_4_3 _b_e_g_i_n(_s_i_z_e___t_y_p_e __n) │ │ │ │ +1044 { return _M_h.begin(__n); } │ │ │ │ +1045 │ │ │ │ +1046 ///@{ │ │ │ │ +1047 /** │ │ │ │ +1048 * @brief Returns a read-only (constant) iterator pointing to the first │ │ │ │ +1049 * bucket element. │ │ │ │ +1050 * @param __n The bucket index. │ │ │ │ +1051 * @return A read-only local iterator. │ │ │ │ +1052 */ │ │ │ │ +1053 _c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ +_1_0_5_4 _b_e_g_i_n(_s_i_z_e___t_y_p_e __n) const │ │ │ │ +1055 { return _M_h.begin(__n); } │ │ │ │ +1056 │ │ │ │ +1057 _c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ +_1_0_5_8 _c_b_e_g_i_n(_s_i_z_e___t_y_p_e __n) const │ │ │ │ +1059 { return _M_h.cbegin(__n); } │ │ │ │ +1060 ///@} │ │ │ │ +1061 │ │ │ │ +1062 /** │ │ │ │ +1063 * @brief Returns a read/write iterator pointing to one past the last │ │ │ │ +1064 * bucket elements. │ │ │ │ +1065 * @param __n The bucket index. │ │ │ │ +1066 * @return A read/write local iterator. │ │ │ │ +1067 */ │ │ │ │ +1068 _l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ +_1_0_6_9 _e_n_d(_s_i_z_e___t_y_p_e __n) │ │ │ │ +1070 { return _M_h.end(__n); } │ │ │ │ +1071 │ │ │ │ +1072 ///@{ │ │ │ │ +1073 /** │ │ │ │ +1074 * @brief Returns a read-only (constant) iterator pointing to one past │ │ │ │ +1075 * the last bucket elements. │ │ │ │ +1076 * @param __n The bucket index. │ │ │ │ +1077 * @return A read-only local iterator. │ │ │ │ +1078 */ │ │ │ │ +1079 _c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ +_1_0_8_0 _e_n_d(_s_i_z_e___t_y_p_e __n) const │ │ │ │ +1081 { return _M_h.end(__n); } │ │ │ │ +1082 │ │ │ │ +1083 _c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ +_1_0_8_4 _c_e_n_d(_s_i_z_e___t_y_p_e __n) const │ │ │ │ +1085 { return _M_h.cend(__n); } │ │ │ │ +1086 ///@} │ │ │ │ +1087 │ │ │ │ +1088 // hash policy. │ │ │ │ +1089 │ │ │ │ +1090 /// Returns the average number of elements per bucket. │ │ │ │ +1091 float │ │ │ │ +_1_0_9_2 _l_o_a_d___f_a_c_t_o_r() const noexcept │ │ │ │ +1093 { return _M_h.load_factor(); } │ │ │ │ +1094 │ │ │ │ +1095 /// Returns a positive number that the %unordered_map tries to keep the │ │ │ │ +1096 /// load factor less than or equal to. │ │ │ │ +1097 float │ │ │ │ +_1_0_9_8 _m_a_x___l_o_a_d___f_a_c_t_o_r() const noexcept │ │ │ │ +1099 { return _M_h.max_load_factor(); } │ │ │ │ +1100 │ │ │ │ +1101 /** │ │ │ │ +1102 * @brief Change the %unordered_map maximum load factor. │ │ │ │ +1103 * @param __z The new maximum load factor. │ │ │ │ +1104 */ │ │ │ │ +1105 void │ │ │ │ +_1_1_0_6 _m_a_x___l_o_a_d___f_a_c_t_o_r(float _____z) │ │ │ │ +1107 { _M_h.max_load_factor(_____z); } │ │ │ │ +1108 │ │ │ │ +1109 /** │ │ │ │ +1110 * @brief May rehash the %unordered_map. │ │ │ │ +1111 * @param __n The new number of buckets. │ │ │ │ +1112 * │ │ │ │ +1113 * Rehash will occur only if the new number of buckets respect the │ │ │ │ +1114 * %unordered_map maximum load factor. │ │ │ │ +1115 */ │ │ │ │ +1116 void │ │ │ │ +_1_1_1_7 _r_e_h_a_s_h(_s_i_z_e___t_y_p_e __n) │ │ │ │ +1118 { _M_h.rehash(__n); } │ │ │ │ +1119 │ │ │ │ +1120 /** │ │ │ │ +1121 * @brief Prepare the %unordered_map for a specified number of │ │ │ │ +1122 * elements. │ │ │ │ +1123 * @param __n Number of elements required. │ │ │ │ +1124 * │ │ │ │ +1125 * Same as rehash(ceil(n / max_load_factor())). │ │ │ │ +1126 */ │ │ │ │ +1127 void │ │ │ │ +_1_1_2_8 _r_e_s_e_r_v_e(_s_i_z_e___t_y_p_e __n) │ │ │ │ +1129 { _M_h.reserve(__n); } │ │ │ │ +1130 │ │ │ │ +1131 template │ │ │ │ +1133 friend bool │ │ │ │ +1134 operator==(const _u_n_o_r_d_e_r_e_d___m_a_p_<___K_e_y_1_,_ ___T_p_1_,_ ___H_a_s_h_1_,_ ___P_r_e_d_1_,_ ___A_l_l_o_c_1_>&, │ │ │ │ +1135 const _u_n_o_r_d_e_r_e_d___m_a_p_<___K_e_y_1_,_ ___T_p_1_,_ ___H_a_s_h_1_,_ ___P_r_e_d_1_,_ ___A_l_l_o_c_1_>&); │ │ │ │ +1136 }; │ │ │ │ +1137 │ │ │ │ +1138#if __cpp_deduction_guides >= 201606 │ │ │ │ +1139 │ │ │ │ +1140 template>, │ │ │ │ +1142 typename _Pred = equal_to<__iter_key_t<_InputIterator>>, │ │ │ │ +1143 typename _Allocator = allocator<__iter_to_alloc_t<_InputIterator>>, │ │ │ │ +1144 typename = _RequireInputIter<_InputIterator>, │ │ │ │ +1145 typename = _RequireNotAllocatorOrIntegral<_Hash>, │ │ │ │ +1146 typename = _RequireNotAllocator<_Pred>, │ │ │ │ +1147 typename = _RequireAllocator<_Allocator>> │ │ │ │ +1148 unordered_map(_InputIterator, _InputIterator, │ │ │ │ +1149 typename _u_n_o_r_d_e_r_e_d___m_a_p_<_i_n_t_,_ _i_n_t_>_:_:_s_i_z_e___t_y_p_e = {}, │ │ │ │ +1150 _Hash = _Hash(), _Pred = _Pred(), _Allocator = _Allocator()) │ │ │ │ +1151 -> unordered_map<__iter_key_t<_InputIterator>, │ │ │ │ +1152 __iter_val_t<_InputIterator>, │ │ │ │ +1153 _Hash, _Pred, _Allocator>; │ │ │ │ +1154 │ │ │ │ +1155 template, │ │ │ │ +1156 typename _Pred = equal_to<_Key>, │ │ │ │ +1157 typename _Allocator = allocator>, │ │ │ │ +1158 typename = _RequireNotAllocatorOrIntegral<_Hash>, │ │ │ │ +1159 typename = _RequireNotAllocator<_Pred>, │ │ │ │ +1160 typename = _RequireAllocator<_Allocator>> │ │ │ │ +1161 unordered_map(initializer_list>, │ │ │ │ +1162 typename _u_n_o_r_d_e_r_e_d___m_a_p_<_i_n_t_,_ _i_n_t_>_:_:_s_i_z_e___t_y_p_e = {}, │ │ │ │ +1163 _Hash = _Hash(), _Pred = _Pred(), _Allocator = _Allocator()) │ │ │ │ +1164 -> unordered_map<_Key, _Tp, _Hash, _Pred, _Allocator>; │ │ │ │ +1165 │ │ │ │ +1166 template, │ │ │ │ +1168 typename = _RequireAllocator<_Allocator>> │ │ │ │ +1169 unordered_map(_InputIterator, _InputIterator, │ │ │ │ +1170 typename _u_n_o_r_d_e_r_e_d___m_a_p_<_i_n_t_,_ _i_n_t_>_:_:_s_i_z_e___t_y_p_e, _Allocator) │ │ │ │ +1171 -> unordered_map<__iter_key_t<_InputIterator>, │ │ │ │ +1172 __iter_val_t<_InputIterator>, │ │ │ │ +1173 hash<__iter_key_t<_InputIterator>>, │ │ │ │ +1174 equal_to<__iter_key_t<_InputIterator>>, │ │ │ │ +1175 _Allocator>; │ │ │ │ +1176 │ │ │ │ +1177 template, │ │ │ │ +1179 typename = _RequireAllocator<_Allocator>> │ │ │ │ +1180 unordered_map(_InputIterator, _InputIterator, _Allocator) │ │ │ │ +1181 -> unordered_map<__iter_key_t<_InputIterator>, │ │ │ │ +1182 __iter_val_t<_InputIterator>, │ │ │ │ +1183 hash<__iter_key_t<_InputIterator>>, │ │ │ │ +1184 equal_to<__iter_key_t<_InputIterator>>, │ │ │ │ +1185 _Allocator>; │ │ │ │ +1186 │ │ │ │ +1187 template, │ │ │ │ +1189 typename = _RequireNotAllocatorOrIntegral<_Hash>, │ │ │ │ +1190 typename = _RequireAllocator<_Allocator>> │ │ │ │ +1191 unordered_map(_InputIterator, _InputIterator, │ │ │ │ +1192 typename _u_n_o_r_d_e_r_e_d___m_a_p_<_i_n_t_,_ _i_n_t_>_:_:_s_i_z_e___t_y_p_e, │ │ │ │ +1193 _Hash, _Allocator) │ │ │ │ +1194 -> unordered_map<__iter_key_t<_InputIterator>, │ │ │ │ +1195 __iter_val_t<_InputIterator>, _Hash, │ │ │ │ +1196 equal_to<__iter_key_t<_InputIterator>>, _Allocator>; │ │ │ │ +1197 │ │ │ │ +1198 template> │ │ │ │ +1200 unordered_map(initializer_list>, │ │ │ │ +1201 typename _u_n_o_r_d_e_r_e_d___m_a_p_<_i_n_t_,_ _i_n_t_>_:_:_s_i_z_e___t_y_p_e, │ │ │ │ +1202 _Allocator) │ │ │ │ +1203 -> unordered_map<_Key, _Tp, hash<_Key>, equal_to<_Key>, _Allocator>; │ │ │ │ +1204 │ │ │ │ +1205 template> │ │ │ │ +1207 unordered_map(initializer_list>, _Allocator) │ │ │ │ +1208 -> unordered_map<_Key, _Tp, hash<_Key>, equal_to<_Key>, _Allocator>; │ │ │ │ +1209 │ │ │ │ +1210 template, │ │ │ │ +1212 typename = _RequireAllocator<_Allocator>> │ │ │ │ +1213 unordered_map(initializer_list>, │ │ │ │ +1214 typename _u_n_o_r_d_e_r_e_d___m_a_p_<_i_n_t_,_ _i_n_t_>_:_:_s_i_z_e___t_y_p_e, │ │ │ │ +1215 _Hash, _Allocator) │ │ │ │ +1216 -> unordered_map<_Key, _Tp, _Hash, equal_to<_Key>, _Allocator>; │ │ │ │ +1217 │ │ │ │ +1218#endif │ │ │ │ +1219 │ │ │ │ +1220 /** │ │ │ │ +1221 * @brief A standard container composed of equivalent keys │ │ │ │ +1222 * (possibly containing multiple of each key value) that associates │ │ │ │ +1223 * values of another type with the keys. │ │ │ │ +1224 * │ │ │ │ +1225 * @ingroup unordered_associative_containers │ │ │ │ +1226 * @headerfile unordered_map │ │ │ │ +1227 * @since C++11 │ │ │ │ +1228 * │ │ │ │ +1229 * @tparam _Key Type of key objects. │ │ │ │ +1230 * @tparam _Tp Type of mapped objects. │ │ │ │ +1231 * @tparam _Hash Hashing function object type, defaults to hash<_Value>. │ │ │ │ +1232 * @tparam _Pred Predicate function object type, defaults │ │ │ │ +1233 * to equal_to<_Value>. │ │ │ │ +1234 * @tparam _Alloc Allocator type, defaults to │ │ │ │ +1235 * std::allocator>. │ │ │ │ +1236 * │ │ │ │ +1237 * Meets the requirements of a container, and │ │ │ │ +1238 * unordered associative container │ │ │ │ +1239 * │ │ │ │ +1240 * The resulting value type of the container is std::pair. │ │ │ │ +1241 * │ │ │ │ +1242 * Base is _Hashtable, dispatched at compile time via template │ │ │ │ +1243 * alias __ummap_hashtable. │ │ │ │ +1244 */ │ │ │ │ +1245 template, │ │ │ │ +1247 typename _Pred = equal_to<_Key>, │ │ │ │ +1248 typename _Alloc = allocator>> │ │ │ │ +_1_2_4_9 class _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p │ │ │ │ +1250 { │ │ │ │ +1251 typedef _____u_m_m_a_p___h_a_s_h_t_a_b_l_e_<___K_e_y_,_ ___T_p_,_ ___H_a_s_h_,_ ___P_r_e_d_,_ ___A_l_l_o_c_> ___H_a_s_h_t_a_b_l_e; │ │ │ │ +1252 ___H_a_s_h_t_a_b_l_e _M_h; │ │ │ │ +1253 │ │ │ │ +1254 public: │ │ │ │ +1255 // typedefs: │ │ │ │ +1256 ///@{ │ │ │ │ +1257 /// Public typedefs. │ │ │ │ +_1_2_5_8 typedef typename _Hashtable::key_type _k_e_y___t_y_p_e; │ │ │ │ +_1_2_5_9 typedef typename _Hashtable::value_type _v_a_l_u_e___t_y_p_e; │ │ │ │ +_1_2_6_0 typedef typename _Hashtable::mapped_type _m_a_p_p_e_d___t_y_p_e; │ │ │ │ +_1_2_6_1 typedef typename _Hashtable::hasher _h_a_s_h_e_r; │ │ │ │ +_1_2_6_2 typedef typename _Hashtable::key_equal _k_e_y___e_q_u_a_l; │ │ │ │ +_1_2_6_3 typedef typename _Hashtable::allocator_type _a_l_l_o_c_a_t_o_r___t_y_p_e; │ │ │ │ +1264 ///@} │ │ │ │ +1265 │ │ │ │ +1266 ///@{ │ │ │ │ +1267 /// Iterator-related typedefs. │ │ │ │ +_1_2_6_8 typedef typename _Hashtable::pointer _p_o_i_n_t_e_r; │ │ │ │ +_1_2_6_9 typedef typename _Hashtable::const_pointer _c_o_n_s_t___p_o_i_n_t_e_r; │ │ │ │ +_1_2_7_0 typedef typename _Hashtable::reference _r_e_f_e_r_e_n_c_e; │ │ │ │ +_1_2_7_1 typedef typename _Hashtable::const_reference _c_o_n_s_t___r_e_f_e_r_e_n_c_e; │ │ │ │ +_1_2_7_2 typedef typename _Hashtable::iterator _i_t_e_r_a_t_o_r; │ │ │ │ +_1_2_7_3 typedef typename _Hashtable::const_iterator _c_o_n_s_t___i_t_e_r_a_t_o_r; │ │ │ │ +_1_2_7_4 typedef typename _Hashtable::local_iterator _l_o_c_a_l___i_t_e_r_a_t_o_r; │ │ │ │ +_1_2_7_5 typedef typename _Hashtable::const_local_iterator _c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r; │ │ │ │ +_1_2_7_6 typedef typename _Hashtable::size_type _s_i_z_e___t_y_p_e; │ │ │ │ +_1_2_7_7 typedef typename _Hashtable::difference_type _d_i_f_f_e_r_e_n_c_e___t_y_p_e; │ │ │ │ +1278 ///@} │ │ │ │ +1279 │ │ │ │ +1280#if __cplusplus > 201402L │ │ │ │ +1281 using node_type = typename _Hashtable::node_type; │ │ │ │ +1282#endif │ │ │ │ +1283 │ │ │ │ +1284 //construct/destroy/copy │ │ │ │ +1285 │ │ │ │ +1286 /// Default constructor. │ │ │ │ +_1_2_8_7 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p() = default; │ │ │ │ +1288 │ │ │ │ +1289 /** │ │ │ │ +1290 * @brief Default constructor creates no elements. │ │ │ │ +1291 * @param __n Mnimal initial number of buckets. │ │ │ │ +1292 * @param __hf A hash functor. │ │ │ │ +1293 * @param __eql A key equality functor. │ │ │ │ +1294 * @param __a An allocator object. │ │ │ │ +1295 */ │ │ │ │ +1296 explicit │ │ │ │ +_1_2_9_7 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p(_s_i_z_e___t_y_p_e __n, │ │ │ │ +1298 const _h_a_s_h_e_r& _____h_f = _h_a_s_h_e_r(), │ │ │ │ +1299 const _k_e_y___e_q_u_a_l& _____e_q_l = _k_e_y___e_q_u_a_l(), │ │ │ │ +1300 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a = _a_l_l_o_c_a_t_o_r___t_y_p_e()) │ │ │ │ +1301 : _M_h(__n, _____h_f, _____e_q_l, __a) │ │ │ │ +1302 { } │ │ │ │ +1303 │ │ │ │ +1304 /** │ │ │ │ +1305 * @brief Builds an %unordered_multimap from a range. │ │ │ │ +1306 * @param __first An input iterator. │ │ │ │ +1307 * @param __last An input iterator. │ │ │ │ +1308 * @param __n Minimal initial number of buckets. │ │ │ │ +1309 * @param __hf A hash functor. │ │ │ │ +1310 * @param __eql A key equality functor. │ │ │ │ +1311 * @param __a An allocator object. │ │ │ │ +1312 * │ │ │ │ +1313 * Create an %unordered_multimap consisting of copies of the elements │ │ │ │ +1314 * from [__first,__last). This is linear in N (where N is │ │ │ │ +1315 * distance(__first,__last)). │ │ │ │ +1316 */ │ │ │ │ +1317 template │ │ │ │ +_1_3_1_8 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p(___I_n_p_u_t_I_t_e_r_a_t_o_r __first, ___I_n_p_u_t_I_t_e_r_a_t_o_r __last, │ │ │ │ +1319 _s_i_z_e___t_y_p_e __n = 0, │ │ │ │ +1320 const _h_a_s_h_e_r& _____h_f = _h_a_s_h_e_r(), │ │ │ │ +1321 const _k_e_y___e_q_u_a_l& _____e_q_l = _k_e_y___e_q_u_a_l(), │ │ │ │ +1322 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a = _a_l_l_o_c_a_t_o_r___t_y_p_e()) │ │ │ │ +1323 : _M_h(__first, __last, __n, _____h_f, _____e_q_l, __a) │ │ │ │ +1324 { } │ │ │ │ +1325 │ │ │ │ +1326 /// Copy constructor. │ │ │ │ +_1_3_2_7 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p(const _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p&) = default; │ │ │ │ +1328 │ │ │ │ +1329 /// Move constructor. │ │ │ │ +_1_3_3_0 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p(_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p&&) = default; │ │ │ │ +1331 │ │ │ │ +1332 /** │ │ │ │ +1333 * @brief Creates an %unordered_multimap with no elements. │ │ │ │ +1334 * @param __a An allocator object. │ │ │ │ +1335 */ │ │ │ │ +1336 explicit │ │ │ │ +_1_3_3_7 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p(const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ +1338 : _M_h(__a) │ │ │ │ +1339 { } │ │ │ │ +1340 │ │ │ │ +1341 /* │ │ │ │ +1342 * @brief Copy constructor with allocator argument. │ │ │ │ +1343 * @param __uset Input %unordered_multimap to copy. │ │ │ │ +1344 * @param __a An allocator object. │ │ │ │ +1345 */ │ │ │ │ +1346 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p(const _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p& _____u_m_m_a_p, │ │ │ │ +1347 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ +1348 : _M_h(_____u_m_m_a_p._M_h, __a) │ │ │ │ +1349 { } │ │ │ │ +1350 │ │ │ │ +1351 /* │ │ │ │ +1352 * @brief Move constructor with allocator argument. │ │ │ │ +1353 * @param __uset Input %unordered_multimap to move. │ │ │ │ +1354 * @param __a An allocator object. │ │ │ │ +1355 */ │ │ │ │ +1356 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p(_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p&& __ummap, │ │ │ │ +1357 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ +1358 noexcept( noexcept(_Hashtable(_s_t_d_:_:_m_o_v_e(__ummap._M_h), __a)) ) │ │ │ │ +1359 : _M_h(_s_t_d_:_:_m_o_v_e(__ummap._M_h), __a) │ │ │ │ +1360 { } │ │ │ │ +1361 │ │ │ │ +1362 /** │ │ │ │ +1363 * @brief Builds an %unordered_multimap from an initializer_list. │ │ │ │ +1364 * @param __l An initializer_list. │ │ │ │ +1365 * @param __n Minimal initial number of buckets. │ │ │ │ +1366 * @param __hf A hash functor. │ │ │ │ +1367 * @param __eql A key equality functor. │ │ │ │ +1368 * @param __a An allocator object. │ │ │ │ +1369 * │ │ │ │ +1370 * Create an %unordered_multimap consisting of copies of the elements in │ │ │ │ +1371 * the list. This is linear in N (where N is @a __l.size()). │ │ │ │ +1372 */ │ │ │ │ +_1_3_7_3 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p(_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t_<_v_a_l_u_e___t_y_p_e_> _____l, │ │ │ │ +1374 _s_i_z_e___t_y_p_e __n = 0, │ │ │ │ +1375 const _h_a_s_h_e_r& _____h_f = _h_a_s_h_e_r(), │ │ │ │ +1376 const _k_e_y___e_q_u_a_l& _____e_q_l = _k_e_y___e_q_u_a_l(), │ │ │ │ +1377 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a = _a_l_l_o_c_a_t_o_r___t_y_p_e()) │ │ │ │ +1378 : _M_h(_____l, __n, _____h_f, _____e_q_l, __a) │ │ │ │ +1379 { } │ │ │ │ +1380 │ │ │ │ +1381 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p(_s_i_z_e___t_y_p_e __n, const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ +1382 : _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p(__n, _h_a_s_h_e_r(), _k_e_y___e_q_u_a_l(), __a) │ │ │ │ +1383 { } │ │ │ │ +1384 │ │ │ │ +1385 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p(_s_i_z_e___t_y_p_e __n, const _h_a_s_h_e_r& __hf, │ │ │ │ +1386 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ +1387 : _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p(__n, __hf, _k_e_y___e_q_u_a_l(), __a) │ │ │ │ +1388 { } │ │ │ │ +1389 │ │ │ │ +1390 template │ │ │ │ +1391 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p(_InputIterator __first, _InputIterator __last, │ │ │ │ +1392 _s_i_z_e___t_y_p_e __n, │ │ │ │ +1393 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ +1394 : _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p(__first, __last, __n, _h_a_s_h_e_r(), _k_e_y___e_q_u_a_l(), __a) │ │ │ │ +1395 { } │ │ │ │ +1396 │ │ │ │ +1397 template │ │ │ │ +1398 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p(_InputIterator __first, _InputIterator __last, │ │ │ │ +1399 _s_i_z_e___t_y_p_e __n, const _h_a_s_h_e_r& __hf, │ │ │ │ +1400 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ +1401 : _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p(__first, __last, __n, __hf, _k_e_y___e_q_u_a_l(), __a) │ │ │ │ +1402 { } │ │ │ │ +1403 │ │ │ │ +1404 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p(initializer_list __l, │ │ │ │ +1405 _s_i_z_e___t_y_p_e __n, │ │ │ │ +1406 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ +1407 : _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p(__l, __n, _h_a_s_h_e_r(), _k_e_y___e_q_u_a_l(), __a) │ │ │ │ +1408 { } │ │ │ │ +1409 │ │ │ │ +1410 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p(initializer_list __l, │ │ │ │ +1411 _s_i_z_e___t_y_p_e __n, const _h_a_s_h_e_r& __hf, │ │ │ │ +1412 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ +1413 : _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p(__l, __n, __hf, _k_e_y___e_q_u_a_l(), __a) │ │ │ │ +1414 { } │ │ │ │ +1415 │ │ │ │ +1416 /// Copy assignment operator. │ │ │ │ +1417 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p& │ │ │ │ +_1_4_1_8 _o_p_e_r_a_t_o_r_=(const _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p&) = default; │ │ │ │ +1419 │ │ │ │ +1420 /// Move assignment operator. │ │ │ │ +1421 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p& │ │ │ │ +_1_4_2_2 _o_p_e_r_a_t_o_r_=(_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p&&) = default; │ │ │ │ +1423 │ │ │ │ +1424 /** │ │ │ │ +1425 * @brief %Unordered_multimap list assignment operator. │ │ │ │ +1426 * @param __l An initializer_list. │ │ │ │ +1427 * │ │ │ │ +1428 * This function fills an %unordered_multimap with copies of the │ │ │ │ +1429 * elements in the initializer list @a __l. │ │ │ │ +1430 * │ │ │ │ +1431 * Note that the assignment completely changes the %unordered_multimap │ │ │ │ +1432 * and that the resulting %unordered_multimap's size is the same as the │ │ │ │ +1433 * number of elements assigned. │ │ │ │ +1434 */ │ │ │ │ +1435 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p& │ │ │ │ +_1_4_3_6 _o_p_e_r_a_t_o_r_=(_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t_<_v_a_l_u_e___t_y_p_e_> _____l) │ │ │ │ +1437 { │ │ │ │ +1438 _M_h = _____l; │ │ │ │ +1439 return *this; │ │ │ │ +1440 } │ │ │ │ +1441 │ │ │ │ +1442 /// Returns the allocator object used by the %unordered_multimap. │ │ │ │ +1443 _a_l_l_o_c_a_t_o_r___t_y_p_e │ │ │ │ +_1_4_4_4 _g_e_t___a_l_l_o_c_a_t_o_r() const noexcept │ │ │ │ +1445 { return _M_h.get_allocator(); } │ │ │ │ +1446 │ │ │ │ +1447 // size and capacity: │ │ │ │ +1448 │ │ │ │ +1449 /// Returns true if the %unordered_multimap is empty. │ │ │ │ +1450 _GLIBCXX_NODISCARD bool │ │ │ │ +_1_4_5_1 _e_m_p_t_y() const noexcept │ │ │ │ +1452 { return _M_h.empty(); } │ │ │ │ +1453 │ │ │ │ +1454 /// Returns the size of the %unordered_multimap. │ │ │ │ +1455 _s_i_z_e___t_y_p_e │ │ │ │ +_1_4_5_6 _s_i_z_e() const noexcept │ │ │ │ +1457 { return _M_h.size(); } │ │ │ │ +1458 │ │ │ │ +1459 /// Returns the maximum size of the %unordered_multimap. │ │ │ │ +1460 _s_i_z_e___t_y_p_e │ │ │ │ +_1_4_6_1 _m_a_x___s_i_z_e() const noexcept │ │ │ │ +1462 { return _M_h.max_size(); } │ │ │ │ +1463 │ │ │ │ +1464 // iterators. │ │ │ │ +1465 │ │ │ │ +1466 /** │ │ │ │ +1467 * Returns a read/write iterator that points to the first element in the │ │ │ │ +1468 * %unordered_multimap. │ │ │ │ +1469 */ │ │ │ │ +1470 _i_t_e_r_a_t_o_r │ │ │ │ +_1_4_7_1 _b_e_g_i_n() noexcept │ │ │ │ +1472 { return _M_h.begin(); } │ │ │ │ +1473 │ │ │ │ +1474 ///@{ │ │ │ │ +1475 /** │ │ │ │ +1476 * Returns a read-only (constant) iterator that points to the first │ │ │ │ +1477 * element in the %unordered_multimap. │ │ │ │ +1478 */ │ │ │ │ +1479 _c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ +_1_4_8_0 _b_e_g_i_n() const noexcept │ │ │ │ +1481 { return _M_h.begin(); } │ │ │ │ +1482 │ │ │ │ +1483 _c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ +_1_4_8_4 _c_b_e_g_i_n() const noexcept │ │ │ │ +1485 { return _M_h.begin(); } │ │ │ │ +1486 ///@} │ │ │ │ +1487 │ │ │ │ +1488 /** │ │ │ │ +1489 * Returns a read/write iterator that points one past the last element in │ │ │ │ +1490 * the %unordered_multimap. │ │ │ │ +1491 */ │ │ │ │ +1492 _i_t_e_r_a_t_o_r │ │ │ │ +_1_4_9_3 _e_n_d() noexcept │ │ │ │ +1494 { return _M_h.end(); } │ │ │ │ +1495 │ │ │ │ +1496 ///@{ │ │ │ │ +1497 /** │ │ │ │ +1498 * Returns a read-only (constant) iterator that points one past the last │ │ │ │ +1499 * element in the %unordered_multimap. │ │ │ │ +1500 */ │ │ │ │ +1501 _c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ +_1_5_0_2 _e_n_d() const noexcept │ │ │ │ +1503 { return _M_h.end(); } │ │ │ │ +1504 │ │ │ │ +1505 _c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ +_1_5_0_6 _c_e_n_d() const noexcept │ │ │ │ +1507 { return _M_h.end(); } │ │ │ │ +1508 ///@} │ │ │ │ +1509 │ │ │ │ +1510 // modifiers. │ │ │ │ +1511 │ │ │ │ +1512 /** │ │ │ │ +1513 * @brief Attempts to build and insert a std::pair into the │ │ │ │ +1514 * %unordered_multimap. │ │ │ │ +1515 * │ │ │ │ +1516 * @param __args Arguments used to generate a new pair instance (see │ │ │ │ +1517 * std::piecewise_contruct for passing arguments to each │ │ │ │ +1518 * part of the pair constructor). │ │ │ │ +1519 * │ │ │ │ +1520 * @return An iterator that points to the inserted pair. │ │ │ │ +1521 * │ │ │ │ +1522 * This function attempts to build and insert a (key, value) %pair into │ │ │ │ +1523 * the %unordered_multimap. │ │ │ │ +1524 * │ │ │ │ +1525 * Insertion requires amortized constant time. │ │ │ │ +1526 */ │ │ │ │ +1527 template │ │ │ │ +1528 _i_t_e_r_a_t_o_r │ │ │ │ +_1_5_2_9 _e_m_p_l_a_c_e(___A_r_g_s&&... _____a_r_g_s) │ │ │ │ +1530 { return _M_h.emplace(_s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(_____a_r_g_s)...); } │ │ │ │ +1531 │ │ │ │ +1532 /** │ │ │ │ +1533 * @brief Attempts to build and insert a std::pair into the │ │ │ │ +1534 * %unordered_multimap. │ │ │ │ +1535 * │ │ │ │ +1536 * @param __pos An iterator that serves as a hint as to where the pair │ │ │ │ +1537 * should be inserted. │ │ │ │ +1538 * @param __args Arguments used to generate a new pair instance (see │ │ │ │ +1539 * std::piecewise_contruct for passing arguments to each │ │ │ │ +1540 * part of the pair constructor). │ │ │ │ +1541 * @return An iterator that points to the element with key of the │ │ │ │ +1542 * std::pair built from @a __args. │ │ │ │ +1543 * │ │ │ │ +1544 * Note that the first parameter is only a hint and can potentially │ │ │ │ +1545 * improve the performance of the insertion process. A bad hint would │ │ │ │ +1546 * cause no gains in efficiency. │ │ │ │ +1547 * │ │ │ │ +1548 * See │ │ │ │ +1549 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/ │ │ │ │ +associative.html#containers.associative.insert_hints │ │ │ │ +1550 * for more on @a hinting. │ │ │ │ +1551 * │ │ │ │ +1552 * Insertion requires amortized constant time. │ │ │ │ +1553 */ │ │ │ │ +1554 template │ │ │ │ +1555 _i_t_e_r_a_t_o_r │ │ │ │ +_1_5_5_6 _e_m_p_l_a_c_e___h_i_n_t(_c_o_n_s_t___i_t_e_r_a_t_o_r _____p_o_s, ___A_r_g_s&&... _____a_r_g_s) │ │ │ │ +1557 { return _M_h.emplace_hint(_____p_o_s, _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(_____a_r_g_s)...); } │ │ │ │ +1558 │ │ │ │ +1559 ///@{ │ │ │ │ +1560 /** │ │ │ │ +1561 * @brief Inserts a std::pair into the %unordered_multimap. │ │ │ │ +1562 * @param __x Pair to be inserted (see std::make_pair for easy │ │ │ │ +1563 * creation of pairs). │ │ │ │ +1564 * │ │ │ │ +1565 * @return An iterator that points to the inserted pair. │ │ │ │ +1566 * │ │ │ │ +1567 * Insertion requires amortized constant time. │ │ │ │ +1568 */ │ │ │ │ +1569 _i_t_e_r_a_t_o_r │ │ │ │ +_1_5_7_0 _i_n_s_e_r_t(const _v_a_l_u_e___t_y_p_e& __x) │ │ │ │ +1571 { return _M_h.insert(__x); } │ │ │ │ +1572 │ │ │ │ +1573 _i_t_e_r_a_t_o_r │ │ │ │ +_1_5_7_4 _i_n_s_e_r_t(_v_a_l_u_e___t_y_p_e&& __x) │ │ │ │ +1575 { return _M_h.insert(_s_t_d_:_:_m_o_v_e(__x)); } │ │ │ │ +1576 │ │ │ │ +1577 template │ │ │ │ +1578 _____e_n_a_b_l_e___i_f___t_<_i_s___c_o_n_s_t_r_u_c_t_i_b_l_e_<_v_a_l_u_e___t_y_p_e_,_ ___P_a_i_r_&_&_>_:_:_v_a_l_u_e, _i_t_e_r_a_t_o_r> │ │ │ │ +_1_5_7_9 _i_n_s_e_r_t(___P_a_i_r&& __x) │ │ │ │ +1580 { return _M_h.emplace(_s_t_d_:_:_f_o_r_w_a_r_d_<___P_a_i_r_>(__x)); } │ │ │ │ +1581 ///@} │ │ │ │ +1582 │ │ │ │ +1583 ///@{ │ │ │ │ +1584 /** │ │ │ │ +1585 * @brief Inserts a std::pair into the %unordered_multimap. │ │ │ │ +1586 * @param __hint An iterator that serves as a hint as to where the │ │ │ │ +1587 * pair should be inserted. │ │ │ │ +1588 * @param __x Pair to be inserted (see std::make_pair for easy creation │ │ │ │ +1589 * of pairs). │ │ │ │ +1590 * @return An iterator that points to the element with key of │ │ │ │ +1591 * @a __x (may or may not be the %pair passed in). │ │ │ │ +1592 * │ │ │ │ +1593 * Note that the first parameter is only a hint and can potentially │ │ │ │ +1594 * improve the performance of the insertion process. A bad hint would │ │ │ │ +1595 * cause no gains in efficiency. │ │ │ │ +1596 * │ │ │ │ +1597 * See │ │ │ │ +1598 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/ │ │ │ │ +associative.html#containers.associative.insert_hints │ │ │ │ +1599 * for more on @a hinting. │ │ │ │ +1600 * │ │ │ │ +1601 * Insertion requires amortized constant time. │ │ │ │ +1602 */ │ │ │ │ +1603 _i_t_e_r_a_t_o_r │ │ │ │ +_1_6_0_4 _i_n_s_e_r_t(_c_o_n_s_t___i_t_e_r_a_t_o_r _____h_i_n_t, const _v_a_l_u_e___t_y_p_e& __x) │ │ │ │ +1605 { return _M_h.insert(_____h_i_n_t, __x); } │ │ │ │ +1606 │ │ │ │ +1607 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ +1608 // 2354. Unnecessary copying when inserting into maps with braced-init │ │ │ │ +1609 _i_t_e_r_a_t_o_r │ │ │ │ +_1_6_1_0 _i_n_s_e_r_t(_c_o_n_s_t___i_t_e_r_a_t_o_r _____h_i_n_t, _v_a_l_u_e___t_y_p_e&& __x) │ │ │ │ +1611 { return _M_h.insert(_____h_i_n_t, _s_t_d_:_:_m_o_v_e(__x)); } │ │ │ │ +1612 │ │ │ │ +1613 template │ │ │ │ +1614 _____e_n_a_b_l_e___i_f___t_<_i_s___c_o_n_s_t_r_u_c_t_i_b_l_e_<_v_a_l_u_e___t_y_p_e_,_ ___P_a_i_r_&_&_>_:_:_v_a_l_u_e, _i_t_e_r_a_t_o_r> │ │ │ │ +_1_6_1_5 _i_n_s_e_r_t(_c_o_n_s_t___i_t_e_r_a_t_o_r _____h_i_n_t, ___P_a_i_r&& __x) │ │ │ │ +1616 { return _M_h.emplace_hint(_____h_i_n_t, _s_t_d_:_:_f_o_r_w_a_r_d_<___P_a_i_r_>(__x)); } │ │ │ │ +1617 ///@} │ │ │ │ +1618 │ │ │ │ +1619 /** │ │ │ │ +1620 * @brief A template function that attempts to insert a range of │ │ │ │ +1621 * elements. │ │ │ │ +1622 * @param __first Iterator pointing to the start of the range to be │ │ │ │ +1623 * inserted. │ │ │ │ +1624 * @param __last Iterator pointing to the end of the range. │ │ │ │ +1625 * │ │ │ │ +1626 * Complexity similar to that of the range constructor. │ │ │ │ +1627 */ │ │ │ │ +1628 template │ │ │ │ +1629 void │ │ │ │ +_1_6_3_0 _i_n_s_e_r_t(___I_n_p_u_t_I_t_e_r_a_t_o_r __first, ___I_n_p_u_t_I_t_e_r_a_t_o_r __last) │ │ │ │ +1631 { _M_h.insert(__first, __last); } │ │ │ │ +1632 │ │ │ │ +1633 /** │ │ │ │ +1634 * @brief Attempts to insert a list of elements into the │ │ │ │ +1635 * %unordered_multimap. │ │ │ │ +1636 * @param __l A std::initializer_list of elements │ │ │ │ +1637 * to be inserted. │ │ │ │ +1638 * │ │ │ │ +1639 * Complexity similar to that of the range constructor. │ │ │ │ +1640 */ │ │ │ │ +1641 void │ │ │ │ +_1_6_4_2 _i_n_s_e_r_t(_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t_<_v_a_l_u_e___t_y_p_e_> _____l) │ │ │ │ +1643 { _M_h.insert(_____l); } │ │ │ │ +1644 │ │ │ │ +1645#if __cplusplus > 201402L │ │ │ │ +1646 /// Extract a node. │ │ │ │ +1647 node_type │ │ │ │ +_1_6_4_8 _e_x_t_r_a_c_t(_c_o_n_s_t___i_t_e_r_a_t_o_r _____p_o_s) │ │ │ │ +1649 { │ │ │ │ +1650 __glibcxx_assert(_____p_o_s != _e_n_d()); │ │ │ │ +1651 return _M_h.extract(_____p_o_s); │ │ │ │ +1652 } │ │ │ │ +1653 │ │ │ │ +1654 /// Extract a node. │ │ │ │ +1655 node_type │ │ │ │ +_1_6_5_6 _e_x_t_r_a_c_t(const _k_e_y___t_y_p_e& _____k_e_y) │ │ │ │ +1657 { return _M_h.extract(_____k_e_y); } │ │ │ │ +1658 │ │ │ │ +1659 /// Re-insert an extracted node. │ │ │ │ +1660 _i_t_e_r_a_t_o_r │ │ │ │ +_1_6_6_1 _i_n_s_e_r_t(node_type&& _____n_h) │ │ │ │ +1662 { return _M_h._M_reinsert_node_multi(_c_e_n_d(), _s_t_d_:_:_m_o_v_e(_____n_h)); } │ │ │ │ +1663 │ │ │ │ +1664 /// Re-insert an extracted node. │ │ │ │ +1665 _i_t_e_r_a_t_o_r │ │ │ │ +_1_6_6_6 _i_n_s_e_r_t(_c_o_n_s_t___i_t_e_r_a_t_o_r _____h_i_n_t, node_type&& _____n_h) │ │ │ │ +1667 { return _M_h._M_reinsert_node_multi(_____h_i_n_t, _s_t_d_:_:_m_o_v_e(_____n_h)); } │ │ │ │ +1668#endif // C++17 │ │ │ │ +1669 │ │ │ │ +1670 ///@{ │ │ │ │ +1671 /** │ │ │ │ +1672 * @brief Erases an element from an %unordered_multimap. │ │ │ │ +1673 * @param __position An iterator pointing to the element to be erased. │ │ │ │ +1674 * @return An iterator pointing to the element immediately following │ │ │ │ +1675 * @a __position prior to the element being erased. If no such │ │ │ │ +1676 * element exists, end() is returned. │ │ │ │ +1677 * │ │ │ │ +1678 * This function erases an element, pointed to by the given iterator, │ │ │ │ +1679 * from an %unordered_multimap. │ │ │ │ +1680 * Note that this function only erases the element, and that if the │ │ │ │ +1681 * element is itself a pointer, the pointed-to memory is not touched in │ │ │ │ +1682 * any way. Managing the pointer is the user's responsibility. │ │ │ │ +1683 */ │ │ │ │ +1684 _i_t_e_r_a_t_o_r │ │ │ │ +_1_6_8_5 _e_r_a_s_e(_c_o_n_s_t___i_t_e_r_a_t_o_r _____p_o_s_i_t_i_o_n) │ │ │ │ +1686 { return _M_h.erase(_____p_o_s_i_t_i_o_n); } │ │ │ │ +1687 │ │ │ │ +1688 // LWG 2059. │ │ │ │ +1689 _i_t_e_r_a_t_o_r │ │ │ │ +_1_6_9_0 _e_r_a_s_e(_i_t_e_r_a_t_o_r _____p_o_s_i_t_i_o_n) │ │ │ │ +1691 { return _M_h.erase(_____p_o_s_i_t_i_o_n); } │ │ │ │ +1692 ///@} │ │ │ │ +1693 │ │ │ │ +1694 /** │ │ │ │ +1695 * @brief Erases elements according to the provided key. │ │ │ │ +1696 * @param __x Key of elements to be erased. │ │ │ │ +1697 * @return The number of elements erased. │ │ │ │ +1698 * │ │ │ │ +1699 * This function erases all the elements located by the given key from │ │ │ │ +1700 * an %unordered_multimap. │ │ │ │ +1701 * Note that this function only erases the element, and that if the │ │ │ │ +1702 * element is itself a pointer, the pointed-to memory is not touched in │ │ │ │ +1703 * any way. Managing the pointer is the user's responsibility. │ │ │ │ +1704 */ │ │ │ │ +1705 _s_i_z_e___t_y_p_e │ │ │ │ +_1_7_0_6 _e_r_a_s_e(const _k_e_y___t_y_p_e& __x) │ │ │ │ +1707 { return _M_h.erase(__x); } │ │ │ │ +1708 │ │ │ │ +1709 /** │ │ │ │ +1710 * @brief Erases a [__first,__last) range of elements from an │ │ │ │ +1711 * %unordered_multimap. │ │ │ │ +1712 * @param __first Iterator pointing to the start of the range to be │ │ │ │ +1713 * erased. │ │ │ │ +1714 * @param __last Iterator pointing to the end of the range to │ │ │ │ +1715 * be erased. │ │ │ │ +1716 * @return The iterator @a __last. │ │ │ │ +1717 * │ │ │ │ +1718 * This function erases a sequence of elements from an │ │ │ │ +1719 * %unordered_multimap. │ │ │ │ +1720 * Note that this function only erases the elements, and that if │ │ │ │ +1721 * the element is itself a pointer, the pointed-to memory is not touched │ │ │ │ +1722 * in any way. Managing the pointer is the user's responsibility. │ │ │ │ +1723 */ │ │ │ │ +1724 _i_t_e_r_a_t_o_r │ │ │ │ +_1_7_2_5 _e_r_a_s_e(_c_o_n_s_t___i_t_e_r_a_t_o_r __first, _c_o_n_s_t___i_t_e_r_a_t_o_r __last) │ │ │ │ +1726 { return _M_h.erase(__first, __last); } │ │ │ │ +1727 │ │ │ │ +1728 /** │ │ │ │ +1729 * Erases all elements in an %unordered_multimap. │ │ │ │ +1730 * Note that this function only erases the elements, and that if the │ │ │ │ +1731 * elements themselves are pointers, the pointed-to memory is not touched │ │ │ │ +1732 * in any way. Managing the pointer is the user's responsibility. │ │ │ │ +1733 */ │ │ │ │ +1734 void │ │ │ │ +_1_7_3_5 _c_l_e_a_r() noexcept │ │ │ │ +1736 { _M_h.clear(); } │ │ │ │ +1737 │ │ │ │ +1738 /** │ │ │ │ +1739 * @brief Swaps data with another %unordered_multimap. │ │ │ │ +1740 * @param __x An %unordered_multimap of the same element and allocator │ │ │ │ +1741 * types. │ │ │ │ +1742 * │ │ │ │ +1743 * This exchanges the elements between two %unordered_multimap in │ │ │ │ +1744 * constant time. │ │ │ │ +1745 * Note that the global std::swap() function is specialized such that │ │ │ │ +1746 * std::swap(m1,m2) will feed to this function. │ │ │ │ +1747 */ │ │ │ │ +1748 void │ │ │ │ +_1_7_4_9 _s_w_a_p(_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p& __x) │ │ │ │ +1750 noexcept( noexcept(_M_h.swap(__x._M_h)) ) │ │ │ │ +1751 { _M_h.swap(__x._M_h); } │ │ │ │ +1752 │ │ │ │ +1753#if __cplusplus > 201402L │ │ │ │ +1754 template │ │ │ │ +1755 friend class std::_Hash_merge_helper; │ │ │ │ +1756 │ │ │ │ +1757 template │ │ │ │ +1758 void │ │ │ │ +1759 merge(_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_<___K_e_y_,_ ___T_p_,_ ___H_2_,_ ___P_2_,_ ___A_l_l_o_c_>& _____s_o_u_r_c_e) │ │ │ │ +1760 { │ │ │ │ +1761 using ___M_e_r_g_e___h_e_l_p_e_r │ │ │ │ +1762 = ___H_a_s_h___m_e_r_g_e___h_e_l_p_e_r_<_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_,_ ___H_2_,_ ___P_2_>; │ │ │ │ +1763 _M_h._M_merge_multi(_Merge_helper::_S_get_table(_____s_o_u_r_c_e)); │ │ │ │ +1764 } │ │ │ │ +1765 │ │ │ │ +1766 template │ │ │ │ +1767 void │ │ │ │ +1768 merge(unordered_multimap<_Key, _Tp, _H2, _P2, _Alloc>&& __source) │ │ │ │ +1769 { merge(__source); } │ │ │ │ +1770 │ │ │ │ +1771 template │ │ │ │ +1772 void │ │ │ │ +1773 merge(unordered_map<_Key, _Tp, _H2, _P2, _Alloc>& __source) │ │ │ │ +1774 { │ │ │ │ +1775 using _Merge_helper │ │ │ │ +1776 = _Hash_merge_helper; │ │ │ │ +1777 _M_h._M_merge_multi(_Merge_helper::_S_get_table(__source)); │ │ │ │ +1778 } │ │ │ │ +1779 │ │ │ │ +1780 template │ │ │ │ +1781 void │ │ │ │ +1782 merge(unordered_map<_Key, _Tp, _H2, _P2, _Alloc>&& __source) │ │ │ │ +1783 { merge(__source); } │ │ │ │ +1784#endif // C++17 │ │ │ │ +1785 │ │ │ │ +1786 // observers. │ │ │ │ +1787 │ │ │ │ +1788 /// Returns the hash functor object with which the %unordered_multimap │ │ │ │ +1789 /// was constructed. │ │ │ │ +1790 _h_a_s_h_e_r │ │ │ │ +_1_7_9_1 _h_a_s_h___f_u_n_c_t_i_o_n() const │ │ │ │ +1792 { return _M_h.hash_function(); } │ │ │ │ +1793 │ │ │ │ +1794 /// Returns the key comparison object with which the %unordered_multimap │ │ │ │ +1795 /// was constructed. │ │ │ │ +1796 _k_e_y___e_q_u_a_l │ │ │ │ +_1_7_9_7 _k_e_y___e_q() const │ │ │ │ +1798 { return _M_h.key_eq(); } │ │ │ │ +1799 │ │ │ │ +1800 // lookup. │ │ │ │ +1801 │ │ │ │ +1802 ///@{ │ │ │ │ +1803 /** │ │ │ │ +1804 * @brief Tries to locate an element in an %unordered_multimap. │ │ │ │ +1805 * @param __x Key to be located. │ │ │ │ +1806 * @return Iterator pointing to sought-after element, or end() if not │ │ │ │ +1807 * found. │ │ │ │ +1808 * │ │ │ │ +1809 * This function takes a key and tries to locate the element with which │ │ │ │ +1810 * the key matches. If successful the function returns an iterator │ │ │ │ +1811 * pointing to the sought after element. If unsuccessful it returns the │ │ │ │ +1812 * past-the-end ( @c end() ) iterator. │ │ │ │ +1813 */ │ │ │ │ +1814 _i_t_e_r_a_t_o_r │ │ │ │ +_1_8_1_5 _f_i_n_d(const _k_e_y___t_y_p_e& __x) │ │ │ │ +1816 { return _M_h.find(__x); } │ │ │ │ +1817 │ │ │ │ +1818#if __cplusplus > 201703L │ │ │ │ +1819 template │ │ │ │ +1820 auto │ │ │ │ +_1_8_2_1 _f_i_n_d(const ___K_t& __x) -> decltype(_M_h._M_find_tr(__x)) │ │ │ │ +1822 { return _M_h._M_find_tr(__x); } │ │ │ │ +1823#endif │ │ │ │ +1824 │ │ │ │ +1825 _c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ +_1_8_2_6 _f_i_n_d(const _k_e_y___t_y_p_e& __x) const │ │ │ │ +1827 { return _M_h.find(__x); } │ │ │ │ +1828 │ │ │ │ +1829#if __cplusplus > 201703L │ │ │ │ +1830 template │ │ │ │ +1831 auto │ │ │ │ +_1_8_3_2 _f_i_n_d(const ___K_t& __x) const -> decltype(_M_h._M_find_tr(__x)) │ │ │ │ +1833 { return _M_h._M_find_tr(__x); } │ │ │ │ +1834#endif │ │ │ │ +1835 ///@} │ │ │ │ +1836 │ │ │ │ +1837 ///@{ │ │ │ │ +1838 /** │ │ │ │ +1839 * @brief Finds the number of elements. │ │ │ │ +1840 * @param __x Key to count. │ │ │ │ +1841 * @return Number of elements with specified key. │ │ │ │ +1842 */ │ │ │ │ +1843 _s_i_z_e___t_y_p_e │ │ │ │ +_1_8_4_4 _c_o_u_n_t(const _k_e_y___t_y_p_e& __x) const │ │ │ │ +1845 { return _M_h.count(__x); } │ │ │ │ +1846 │ │ │ │ +1847#if __cplusplus > 201703L │ │ │ │ +1848 template │ │ │ │ +1849 auto │ │ │ │ +_1_8_5_0 _c_o_u_n_t(const ___K_t& __x) const -> decltype(_M_h._M_count_tr(__x)) │ │ │ │ +1851 { return _M_h._M_count_tr(__x); } │ │ │ │ +1852#endif │ │ │ │ +1853 ///@} │ │ │ │ +1854 │ │ │ │ +1855#if __cplusplus > 201703L │ │ │ │ +1856 ///@{ │ │ │ │ +1857 /** │ │ │ │ +1858 * @brief Finds whether an element with the given key exists. │ │ │ │ +1859 * @param __x Key of elements to be located. │ │ │ │ +1860 * @return True if there is any element with the specified key. │ │ │ │ +1861 */ │ │ │ │ +1862 bool │ │ │ │ +_1_8_6_3 _c_o_n_t_a_i_n_s(const _k_e_y___t_y_p_e& __x) const │ │ │ │ +1864 { return _M_h.find(__x) != _M_h.end(); } │ │ │ │ +1865 │ │ │ │ +1866 template │ │ │ │ +1867 auto │ │ │ │ +_1_8_6_8 _c_o_n_t_a_i_n_s(const ___K_t& __x) const │ │ │ │ +1869 -> decltype(_M_h._M_find_tr(__x), _v_o_i_d(), true) │ │ │ │ +1870 { return _M_h._M_find_tr(__x) != _M_h.end(); } │ │ │ │ +1871 ///@} │ │ │ │ +1872#endif │ │ │ │ +1873 │ │ │ │ +1874 ///@{ │ │ │ │ +1875 /** │ │ │ │ +1876 * @brief Finds a subsequence matching given key. │ │ │ │ +1877 * @param __x Key to be located. │ │ │ │ +1878 * @return Pair of iterators that possibly points to the subsequence │ │ │ │ +1879 * matching given key. │ │ │ │ +1880 */ │ │ │ │ +1881 _s_t_d_:_:_p_a_i_r_<_i_t_e_r_a_t_o_r_,_ _i_t_e_r_a_t_o_r_> │ │ │ │ +_1_8_8_2 _e_q_u_a_l___r_a_n_g_e(const _k_e_y___t_y_p_e& __x) │ │ │ │ +1883 { return _M_h.equal_range(__x); } │ │ │ │ +1884 │ │ │ │ +1885#if __cplusplus > 201703L │ │ │ │ +1886 template │ │ │ │ +1887 auto │ │ │ │ +_1_8_8_8 _e_q_u_a_l___r_a_n_g_e(const ___K_t& __x) │ │ │ │ +1889 -> decltype(_M_h._M_equal_range_tr(__x)) │ │ │ │ +1890 { return _M_h._M_equal_range_tr(__x); } │ │ │ │ +1891#endif │ │ │ │ +1892 │ │ │ │ +1893 _s_t_d_:_:_p_a_i_r_<_c_o_n_s_t___i_t_e_r_a_t_o_r_,_ _c_o_n_s_t___i_t_e_r_a_t_o_r_> │ │ │ │ +_1_8_9_4 _e_q_u_a_l___r_a_n_g_e(const _k_e_y___t_y_p_e& __x) const │ │ │ │ +1895 { return _M_h.equal_range(__x); } │ │ │ │ +1896 │ │ │ │ +1897#if __cplusplus > 201703L │ │ │ │ +1898 template │ │ │ │ +1899 auto │ │ │ │ +_1_9_0_0 _e_q_u_a_l___r_a_n_g_e(const ___K_t& __x) const │ │ │ │ +1901 -> decltype(_M_h._M_equal_range_tr(__x)) │ │ │ │ +1902 { return _M_h._M_equal_range_tr(__x); } │ │ │ │ +1903#endif │ │ │ │ +1904 ///@} │ │ │ │ +1905 │ │ │ │ +1906 // bucket interface. │ │ │ │ +1907 │ │ │ │ +1908 /// Returns the number of buckets of the %unordered_multimap. │ │ │ │ +1909 _s_i_z_e___t_y_p_e │ │ │ │ +_1_9_1_0 _b_u_c_k_e_t___c_o_u_n_t() const noexcept │ │ │ │ +1911 { return _M_h.bucket_count(); } │ │ │ │ +1912 │ │ │ │ +1913 /// Returns the maximum number of buckets of the %unordered_multimap. │ │ │ │ +1914 _s_i_z_e___t_y_p_e │ │ │ │ +_1_9_1_5 _m_a_x___b_u_c_k_e_t___c_o_u_n_t() const noexcept │ │ │ │ +1916 { return _M_h.max_bucket_count(); } │ │ │ │ +1917 │ │ │ │ +1918 /* │ │ │ │ +1919 * @brief Returns the number of elements in a given bucket. │ │ │ │ +1920 * @param __n A bucket index. │ │ │ │ +1921 * @return The number of elements in the bucket. │ │ │ │ +1922 */ │ │ │ │ +1923 _s_i_z_e___t_y_p_e │ │ │ │ +1924 bucket_size(_s_i_z_e___t_y_p_e __n) const │ │ │ │ +1925 { return _M_h.bucket_size(__n); } │ │ │ │ +1926 │ │ │ │ +1927 /* │ │ │ │ +1928 * @brief Returns the bucket index of a given element. │ │ │ │ +1929 * @param __key A key instance. │ │ │ │ +1930 * @return The key bucket index. │ │ │ │ +1931 */ │ │ │ │ +1932 _s_i_z_e___t_y_p_e │ │ │ │ +1933 bucket(const _k_e_y___t_y_p_e& __key) const │ │ │ │ +1934 { return _M_h.bucket(__key); } │ │ │ │ +1935 │ │ │ │ +1936 /** │ │ │ │ +1937 * @brief Returns a read/write iterator pointing to the first bucket │ │ │ │ +1938 * element. │ │ │ │ +1939 * @param __n The bucket index. │ │ │ │ +1940 * @return A read/write local iterator. │ │ │ │ +1941 */ │ │ │ │ +1942 _l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ +_1_9_4_3 _b_e_g_i_n(_s_i_z_e___t_y_p_e __n) │ │ │ │ +1944 { return _M_h.begin(__n); } │ │ │ │ +1945 │ │ │ │ +1946 ///@{ │ │ │ │ +1947 /** │ │ │ │ +1948 * @brief Returns a read-only (constant) iterator pointing to the first │ │ │ │ +1949 * bucket element. │ │ │ │ +1950 * @param __n The bucket index. │ │ │ │ +1951 * @return A read-only local iterator. │ │ │ │ +1952 */ │ │ │ │ +1953 _c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ +_1_9_5_4 _b_e_g_i_n(_s_i_z_e___t_y_p_e __n) const │ │ │ │ +1955 { return _M_h.begin(__n); } │ │ │ │ +1956 │ │ │ │ +1957 _c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ +_1_9_5_8 _c_b_e_g_i_n(_s_i_z_e___t_y_p_e __n) const │ │ │ │ +1959 { return _M_h.cbegin(__n); } │ │ │ │ +1960 ///@} │ │ │ │ +1961 │ │ │ │ +1962 /** │ │ │ │ +1963 * @brief Returns a read/write iterator pointing to one past the last │ │ │ │ +1964 * bucket elements. │ │ │ │ +1965 * @param __n The bucket index. │ │ │ │ +1966 * @return A read/write local iterator. │ │ │ │ +1967 */ │ │ │ │ +1968 _l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ +_1_9_6_9 _e_n_d(_s_i_z_e___t_y_p_e __n) │ │ │ │ +1970 { return _M_h.end(__n); } │ │ │ │ +1971 │ │ │ │ +1972 ///@{ │ │ │ │ +1973 /** │ │ │ │ +1974 * @brief Returns a read-only (constant) iterator pointing to one past │ │ │ │ +1975 * the last bucket elements. │ │ │ │ +1976 * @param __n The bucket index. │ │ │ │ +1977 * @return A read-only local iterator. │ │ │ │ +1978 */ │ │ │ │ +1979 _c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ +_1_9_8_0 _e_n_d(_s_i_z_e___t_y_p_e __n) const │ │ │ │ +1981 { return _M_h.end(__n); } │ │ │ │ +1982 │ │ │ │ +1983 _c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ +_1_9_8_4 _c_e_n_d(_s_i_z_e___t_y_p_e __n) const │ │ │ │ +1985 { return _M_h.cend(__n); } │ │ │ │ +1986 ///@} │ │ │ │ +1987 │ │ │ │ +1988 // hash policy. │ │ │ │ +1989 │ │ │ │ +1990 /// Returns the average number of elements per bucket. │ │ │ │ +1991 float │ │ │ │ +_1_9_9_2 _l_o_a_d___f_a_c_t_o_r() const noexcept │ │ │ │ +1993 { return _M_h.load_factor(); } │ │ │ │ +1994 │ │ │ │ +1995 /// Returns a positive number that the %unordered_multimap tries to keep │ │ │ │ +1996 /// the load factor less than or equal to. │ │ │ │ +1997 float │ │ │ │ +_1_9_9_8 _m_a_x___l_o_a_d___f_a_c_t_o_r() const noexcept │ │ │ │ +1999 { return _M_h.max_load_factor(); } │ │ │ │ +2000 │ │ │ │ +2001 /** │ │ │ │ +2002 * @brief Change the %unordered_multimap maximum load factor. │ │ │ │ +2003 * @param __z The new maximum load factor. │ │ │ │ +2004 */ │ │ │ │ +2005 void │ │ │ │ +_2_0_0_6 _m_a_x___l_o_a_d___f_a_c_t_o_r(float _____z) │ │ │ │ +2007 { _M_h.max_load_factor(_____z); } │ │ │ │ +2008 │ │ │ │ +2009 /** │ │ │ │ +2010 * @brief May rehash the %unordered_multimap. │ │ │ │ +2011 * @param __n The new number of buckets. │ │ │ │ +2012 * │ │ │ │ +2013 * Rehash will occur only if the new number of buckets respect the │ │ │ │ +2014 * %unordered_multimap maximum load factor. │ │ │ │ +2015 */ │ │ │ │ +2016 void │ │ │ │ +_2_0_1_7 _r_e_h_a_s_h(_s_i_z_e___t_y_p_e __n) │ │ │ │ +2018 { _M_h.rehash(__n); } │ │ │ │ +2019 │ │ │ │ +2020 /** │ │ │ │ +2021 * @brief Prepare the %unordered_multimap for a specified number of │ │ │ │ +2022 * elements. │ │ │ │ +2023 * @param __n Number of elements required. │ │ │ │ +2024 * │ │ │ │ +2025 * Same as rehash(ceil(n / max_load_factor())). │ │ │ │ +2026 */ │ │ │ │ +2027 void │ │ │ │ +_2_0_2_8 _r_e_s_e_r_v_e(_s_i_z_e___t_y_p_e __n) │ │ │ │ +2029 { _M_h.reserve(__n); } │ │ │ │ +2030 │ │ │ │ +2031 template │ │ │ │ +2033 friend bool │ │ │ │ +2034 operator==(const _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p<___K_e_y_1, ___T_p_1, │ │ │ │ +2035 ___H_a_s_h_1, ___P_r_e_d_1, _Alloc1>&, │ │ │ │ +2036 const _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p<___K_e_y_1, ___T_p_1, │ │ │ │ +2037 ___H_a_s_h_1, ___P_r_e_d_1, _Alloc1>&); │ │ │ │ +2038 }; │ │ │ │ +2039 │ │ │ │ +2040#if __cpp_deduction_guides >= 201606 │ │ │ │ +2041 │ │ │ │ +2042 template>, │ │ │ │ +2044 typename _Pred = equal_to<__iter_key_t<_InputIterator>>, │ │ │ │ +2045 typename _Allocator = allocator<__iter_to_alloc_t<_InputIterator>>, │ │ │ │ +2046 typename = _RequireInputIter<_InputIterator>, │ │ │ │ +2047 typename = _RequireNotAllocatorOrIntegral<_Hash>, │ │ │ │ +2048 typename = _RequireNotAllocator<_Pred>, │ │ │ │ +2049 typename = _RequireAllocator<_Allocator>> │ │ │ │ +2050 unordered_multimap(_InputIterator, _InputIterator, │ │ │ │ +2051 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_<_i_n_t_,_ _i_n_t_>_:_:_s_i_z_e___t_y_p_e = {}, │ │ │ │ +2052 _Hash = _Hash(), _Pred = _Pred(), │ │ │ │ +2053 _Allocator = _Allocator()) │ │ │ │ +2054 -> unordered_multimap<__iter_key_t<_InputIterator>, │ │ │ │ +2055 __iter_val_t<_InputIterator>, _Hash, _Pred, │ │ │ │ +2056 _Allocator>; │ │ │ │ +2057 │ │ │ │ +2058 template, │ │ │ │ +2059 typename _Pred = equal_to<_Key>, │ │ │ │ +2060 typename _Allocator = allocator>, │ │ │ │ +2061 typename = _RequireNotAllocatorOrIntegral<_Hash>, │ │ │ │ +2062 typename = _RequireNotAllocator<_Pred>, │ │ │ │ +2063 typename = _RequireAllocator<_Allocator>> │ │ │ │ +2064 unordered_multimap(initializer_list>, │ │ │ │ +2065 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_<_i_n_t_,_ _i_n_t_>_:_:_s_i_z_e___t_y_p_e = {}, │ │ │ │ +2066 _Hash = _Hash(), _Pred = _Pred(), │ │ │ │ +2067 _Allocator = _Allocator()) │ │ │ │ +2068 -> unordered_multimap<_Key, _Tp, _Hash, _Pred, _Allocator>; │ │ │ │ +2069 │ │ │ │ +2070 template, │ │ │ │ +2072 typename = _RequireAllocator<_Allocator>> │ │ │ │ +2073 unordered_multimap(_InputIterator, _InputIterator, │ │ │ │ +2074 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_<_i_n_t_,_ _i_n_t_>_:_:_s_i_z_e___t_y_p_e, _Allocator) │ │ │ │ +2075 -> unordered_multimap<__iter_key_t<_InputIterator>, │ │ │ │ +2076 __iter_val_t<_InputIterator>, │ │ │ │ +2077 hash<__iter_key_t<_InputIterator>>, │ │ │ │ +2078 equal_to<__iter_key_t<_InputIterator>>, _Allocator>; │ │ │ │ +2079 │ │ │ │ +2080 template, │ │ │ │ +2082 typename = _RequireAllocator<_Allocator>> │ │ │ │ +2083 unordered_multimap(_InputIterator, _InputIterator, _Allocator) │ │ │ │ +2084 -> unordered_multimap<__iter_key_t<_InputIterator>, │ │ │ │ +2085 __iter_val_t<_InputIterator>, │ │ │ │ +2086 hash<__iter_key_t<_InputIterator>>, │ │ │ │ +2087 equal_to<__iter_key_t<_InputIterator>>, _Allocator>; │ │ │ │ +2088 │ │ │ │ +2089 template, │ │ │ │ +2091 typename = _RequireNotAllocatorOrIntegral<_Hash>, │ │ │ │ +2092 typename = _RequireAllocator<_Allocator>> │ │ │ │ +2093 unordered_multimap(_InputIterator, _InputIterator, │ │ │ │ +2094 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_<_i_n_t_,_ _i_n_t_>_:_:_s_i_z_e___t_y_p_e, _Hash, │ │ │ │ +2095 _Allocator) │ │ │ │ +2096 -> unordered_multimap<__iter_key_t<_InputIterator>, │ │ │ │ +2097 __iter_val_t<_InputIterator>, _Hash, │ │ │ │ +2098 equal_to<__iter_key_t<_InputIterator>>, _Allocator>; │ │ │ │ +2099 │ │ │ │ +2100 template> │ │ │ │ +2102 unordered_multimap(initializer_list>, │ │ │ │ +2103 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_<_i_n_t_,_ _i_n_t_>_:_:_s_i_z_e___t_y_p_e, │ │ │ │ +2104 _Allocator) │ │ │ │ +2105 -> unordered_multimap<_Key, _Tp, hash<_Key>, equal_to<_Key>, _Allocator>; │ │ │ │ +2106 │ │ │ │ +2107 template> │ │ │ │ +2109 unordered_multimap(initializer_list>, _Allocator) │ │ │ │ +2110 -> unordered_multimap<_Key, _Tp, hash<_Key>, equal_to<_Key>, _Allocator>; │ │ │ │ +2111 │ │ │ │ +2112 template, │ │ │ │ +2114 typename = _RequireAllocator<_Allocator>> │ │ │ │ +2115 unordered_multimap(initializer_list>, │ │ │ │ +2116 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_<_i_n_t_,_ _i_n_t_>_:_:_s_i_z_e___t_y_p_e, │ │ │ │ +2117 _Hash, _Allocator) │ │ │ │ +2118 -> unordered_multimap<_Key, _Tp, _Hash, equal_to<_Key>, _Allocator>; │ │ │ │ +2119 │ │ │ │ +2120#endif │ │ │ │ +2121 │ │ │ │ +2122 template │ │ │ │ +2123 inline void │ │ │ │ +2124 _s_w_a_p(unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, │ │ │ │ +2125 unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) │ │ │ │ +2126 noexcept(noexcept(__x.swap(__y))) │ │ │ │ +2127 { __x.swap(__y); } │ │ │ │ +2128 │ │ │ │ +2129 template │ │ │ │ +2130 inline void │ │ │ │ +2131 _s_w_a_p(unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, │ │ │ │ +2132 unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) │ │ │ │ +2133 noexcept(noexcept(__x.swap(__y))) │ │ │ │ +2134 { __x.swap(__y); } │ │ │ │ +2135 │ │ │ │ +2136 template │ │ │ │ +2137 inline bool │ │ │ │ +2138 operator==(const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, │ │ │ │ +2139 const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) │ │ │ │ +2140 { return __x._M_h._M_equal(__y._M_h); } │ │ │ │ +2141 │ │ │ │ +2142#if __cpp_impl_three_way_comparison < 201907L │ │ │ │ +2143 template │ │ │ │ +2144 inline bool │ │ │ │ +2145 operator!=(const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, │ │ │ │ +2146 const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) │ │ │ │ +2147 { return !(__x == __y); } │ │ │ │ +2148#endif │ │ │ │ +2149 │ │ │ │ +2150 template │ │ │ │ +2151 inline bool │ │ │ │ +2152 operator==(const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, │ │ │ │ +2153 const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) │ │ │ │ +2154 { return __x._M_h._M_equal(__y._M_h); } │ │ │ │ +2155 │ │ │ │ +2156#if __cpp_impl_three_way_comparison < 201907L │ │ │ │ +2157 template │ │ │ │ +2158 inline bool │ │ │ │ +2159 operator!=(const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, │ │ │ │ +2160 const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) │ │ │ │ +2161 { return !(__x == __y); } │ │ │ │ +2162#endif │ │ │ │ +2163 │ │ │ │ +2164_GLIBCXX_END_NAMESPACE_CONTAINER │ │ │ │ +2165 │ │ │ │ +2166#if __cplusplus > 201402L │ │ │ │ +2167 // Allow std::unordered_map access to internals of compatible maps. │ │ │ │ +2168 template │ │ │ │ +2170 struct _Hash_merge_helper< │ │ │ │ +2171 _GLIBCXX_STD_C::unordered_map<_Key, _Val, _Hash1, _Eq1, _Alloc>, │ │ │ │ +2172 _Hash2, _Eq2> │ │ │ │ +2173 { │ │ │ │ +2174 private: │ │ │ │ +2175 template │ │ │ │ +2176 using unordered_map = _GLIBCXX_STD_C::unordered_map<_Tp...>; │ │ │ │ +2177 template │ │ │ │ +2178 using unordered_multimap = _GLIBCXX_STD_C::unordered_multimap<_Tp...>; │ │ │ │ +2179 │ │ │ │ +2180 friend unordered_map<_Key, _Val, _Hash1, _Eq1, _Alloc>; │ │ │ │ +2181 │ │ │ │ +2182 static auto& │ │ │ │ +2183 _S_get_table(unordered_map<_Key, _Val, _Hash2, _Eq2, _Alloc>& __map) │ │ │ │ +2184 { return __map._M_h; } │ │ │ │ +2185 │ │ │ │ +2186 static auto& │ │ │ │ +2187 _S_get_table(unordered_multimap<_Key, _Val, _Hash2, _Eq2, _Alloc>& __map) │ │ │ │ +2188 { return __map._M_h; } │ │ │ │ +2189 }; │ │ │ │ +2190 │ │ │ │ +2191 // Allow std::unordered_multimap access to internals of compatible maps. │ │ │ │ +2192 template │ │ │ │ +2194 struct _Hash_merge_helper< │ │ │ │ +2195 _GLIBCXX_STD_C::unordered_multimap<_Key, _Val, _Hash1, _Eq1, _Alloc>, │ │ │ │ +2196 _Hash2, _Eq2> │ │ │ │ +2197 { │ │ │ │ +2198 private: │ │ │ │ +2199 template │ │ │ │ +2200 using unordered_map = _GLIBCXX_STD_C::unordered_map<_Tp...>; │ │ │ │ +2201 template │ │ │ │ +2202 using unordered_multimap = _GLIBCXX_STD_C::unordered_multimap<_Tp...>; │ │ │ │ +2203 │ │ │ │ +2204 friend unordered_multimap<_Key, _Val, _Hash1, _Eq1, _Alloc>; │ │ │ │ +2205 │ │ │ │ +2206 static auto& │ │ │ │ +2207 _S_get_table(unordered_map<_Key, _Val, _Hash2, _Eq2, _Alloc>& __map) │ │ │ │ +2208 { return __map._M_h; } │ │ │ │ +2209 │ │ │ │ +2210 static auto& │ │ │ │ +2211 _S_get_table(unordered_multimap<_Key, _Val, _Hash2, _Eq2, _Alloc>& __map) │ │ │ │ +2212 { return __map._M_h; } │ │ │ │ +2213 }; │ │ │ │ +2214#endif // C++17 │ │ │ │ +2215 │ │ │ │ +2216_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ +2217} // namespace std │ │ │ │ +2218 │ │ │ │ +2219#endif /* _UNORDERED_MAP_H */ │ │ │ │ +_s_t_d_:_:_m_o_v_e │ │ │ │ +constexpr std::remove_reference< _Tp >::type && move(_Tp &&__t) noexcept │ │ │ │ +Convert a value to an rvalue. │ │ │ │ +DDeeffiinniittiioonn _m_o_v_e_._h_:_1_0_4 │ │ │ │ +_s_t_d_:_:_s_w_a_p │ │ │ │ +void swap(any &__x, any &__y) noexcept │ │ │ │ +Exchange the states of two any objects. │ │ │ │ +DDeeffiinniittiioonn _a_n_y_:_4_2_9 │ │ │ │ _s_t_d │ │ │ │ ISO C++ entities toplevel namespace is std. │ │ │ │ -_s_t_d_:_:_t_u_p_l_e___s_i_z_e │ │ │ │ -Finds the size of a given tuple type. │ │ │ │ -DDeeffiinniittiioonn _u_t_i_l_i_t_y_._h_:_4_9 │ │ │ │ -_s_t_d_:_:_t_u_p_l_e___e_l_e_m_e_n_t │ │ │ │ -Gives the type of the ith element of a given tuple type. │ │ │ │ -DDeeffiinniittiioonn _u_t_i_l_i_t_y_._h_:_8_0 │ │ │ │ -_s_t_d_:_:_i_n_t_e_g_e_r___s_e_q_u_e_n_c_e │ │ │ │ -Class template integer_sequence. │ │ │ │ -DDeeffiinniittiioonn _u_t_i_l_i_t_y_._h_:_1_6_5 │ │ │ │ +_s_t_d_:_:_____u_m_m_a_p___t_r_a_i_t_s │ │ │ │ +__detail::_Hashtable_traits< _Cache, false, false > __ummap_traits │ │ │ │ +Base types for unordered_multimap. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_5_7 │ │ │ │ +_s_t_d_:_:_____u_m_a_p___t_r_a_i_t_s │ │ │ │ +__detail::_Hashtable_traits< _Cache, false, true > __umap_traits │ │ │ │ +Base types for unordered_map. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_4_0 │ │ │ │ +_s_t_d_:_:_i_t_e_r_a_t_o_r │ │ │ │ +Common iterator class. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___i_t_e_r_a_t_o_r___b_a_s_e___t_y_p_e_s_._h_:_1_2_8 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p │ │ │ │ +A standard container composed of equivalent keys (possibly containing multiple │ │ │ │ +of each key value) tha... │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_5_0 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_l_o_a_d___f_a_c_t_o_r │ │ │ │ +float load_factor() const noexcept │ │ │ │ +Returns the average number of elements per bucket. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_9_9_2 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_r_e_f_e_r_e_n_c_e │ │ │ │ +_Hashtable::reference reference │ │ │ │ +Iterator-related typedefs. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_7_0 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_e_r_a_s_e │ │ │ │ +iterator erase(iterator __position) │ │ │ │ +Erases an element from an unordered_multimap. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_6_9_0 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_e_n_d │ │ │ │ +const_iterator end() const noexcept │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_5_0_2 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_e_r_a_s_e │ │ │ │ +size_type erase(const key_type &__x) │ │ │ │ +Erases elements according to the provided key. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_7_0_6 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_e_q_u_a_l___r_a_n_g_e │ │ │ │ +std::pair< iterator, iterator > equal_range(const key_type &__x) │ │ │ │ +Finds a subsequence matching given key. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_8_8_2 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_b_u_c_k_e_t___c_o_u_n_t │ │ │ │ +size_type bucket_count() const noexcept │ │ │ │ +Returns the number of buckets of the unordered_multimap. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_9_1_0 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_i_t_e_r_a_t_o_r │ │ │ │ +_Hashtable::iterator iterator │ │ │ │ +Iterator-related typedefs. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_7_2 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_m_a_x___b_u_c_k_e_t___c_o_u_n_t │ │ │ │ +size_type max_bucket_count() const noexcept │ │ │ │ +Returns the maximum number of buckets of the unordered_multimap. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_9_1_5 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_b_e_g_i_n │ │ │ │ +iterator begin() noexcept │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_4_7_1 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_b_e_g_i_n │ │ │ │ +const_iterator begin() const noexcept │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_4_8_0 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_h_a_s_h___f_u_n_c_t_i_o_n │ │ │ │ +hasher hash_function() const │ │ │ │ +Returns the hash functor object with which the unordered_multimap was │ │ │ │ +constructed. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_7_9_1 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_i_n_s_e_r_t │ │ │ │ +iterator insert(const_iterator __hint, node_type &&__nh) │ │ │ │ +Re-insert an extracted node. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_6_6_6 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_i_n_s_e_r_t │ │ │ │ +__enable_if_t< is_constructible< value_type, _Pair && >::value, iterator > │ │ │ │ +insert(const_iterator __hint, _Pair &&__x) │ │ │ │ +Inserts a std::pair into the unordered_multimap. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_6_1_5 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ +unordered_multimap & operator=(const unordered_multimap &)=default │ │ │ │ +Copy assignment operator. │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_k_e_y___e_q │ │ │ │ +key_equal key_eq() const │ │ │ │ +Returns the key comparison object with which the unordered_multimap was │ │ │ │ +constructed. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_7_9_7 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_c_o_u_n_t │ │ │ │ +size_type count(const key_type &__x) const │ │ │ │ +Finds the number of elements. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_8_4_4 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_f_i_n_d │ │ │ │ +const_iterator find(const key_type &__x) const │ │ │ │ +Tries to locate an element in an unordered_multimap. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_8_2_6 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_m_a_p_p_e_d___t_y_p_e │ │ │ │ +_Hashtable::mapped_type mapped_type │ │ │ │ +Public typedefs. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_6_0 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_f_i_n_d │ │ │ │ +auto find(const _Kt &__x) -> decltype(_M_h._M_find_tr(__x)) │ │ │ │ +Tries to locate an element in an unordered_multimap. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_8_2_1 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_e_n_d │ │ │ │ +local_iterator end(size_type __n) │ │ │ │ +Returns a read/write iterator pointing to one past the last bucket elements. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_9_6_9 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_i_n_s_e_r_t │ │ │ │ +void insert(_InputIterator __first, _InputIterator __last) │ │ │ │ +A template function that attempts to insert a range of elements. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_6_3_0 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ +unordered_multimap & operator=(initializer_list< value_type > __l) │ │ │ │ +Unordered_multimap list assignment operator. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_4_3_6 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p │ │ │ │ +unordered_multimap(size_type __n, const hasher &__hf=hasher(), const key_equal │ │ │ │ +&__eql=key_equal(), const allocator_type &__a=allocator_type()) │ │ │ │ +Default constructor creates no elements. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_9_7 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_v_a_l_u_e___t_y_p_e │ │ │ │ +_Hashtable::value_type value_type │ │ │ │ +Public typedefs. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_5_9 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_e_m_p_l_a_c_e │ │ │ │ +iterator emplace(_Args &&... __args) │ │ │ │ +Attempts to build and insert a std::pair into the unordered_multimap. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_5_2_9 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_e_x_t_r_a_c_t │ │ │ │ +node_type extract(const key_type &__key) │ │ │ │ +Extract a node. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_6_5_6 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_c_o_n_t_a_i_n_s │ │ │ │ +bool contains(const key_type &__x) const │ │ │ │ +Finds whether an element with the given key exists. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_8_6_3 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_c_o_n_s_t___r_e_f_e_r_e_n_c_e │ │ │ │ +_Hashtable::const_reference const_reference │ │ │ │ +Iterator-related typedefs. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_7_1 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_i_n_s_e_r_t │ │ │ │ +iterator insert(node_type &&__nh) │ │ │ │ +Re-insert an extracted node. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_6_6_1 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_e_r_a_s_e │ │ │ │ +iterator erase(const_iterator __position) │ │ │ │ +Erases an element from an unordered_multimap. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_6_8_5 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_e_n_d │ │ │ │ +iterator end() noexcept │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_4_9_3 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_b_e_g_i_n │ │ │ │ +local_iterator begin(size_type __n) │ │ │ │ +Returns a read/write iterator pointing to the first bucket element. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_9_4_3 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_m_a_x___l_o_a_d___f_a_c_t_o_r │ │ │ │ +float max_load_factor() const noexcept │ │ │ │ +Returns a positive number that the unordered_multimap tries to keep the load │ │ │ │ +factor less than or equa... │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_9_9_8 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p │ │ │ │ +unordered_multimap()=default │ │ │ │ +Default constructor. │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_i_n_s_e_r_t │ │ │ │ +iterator insert(value_type &&__x) │ │ │ │ +Inserts a std::pair into the unordered_multimap. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_5_7_4 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_i_n_s_e_r_t │ │ │ │ +iterator insert(const value_type &__x) │ │ │ │ +Inserts a std::pair into the unordered_multimap. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_5_7_0 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ +unordered_multimap & operator=(unordered_multimap &&)=default │ │ │ │ +Move assignment operator. │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_h_a_s_h_e_r │ │ │ │ +_Hashtable::hasher hasher │ │ │ │ +Public typedefs. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_6_1 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ +_Hashtable::local_iterator local_iterator │ │ │ │ +Iterator-related typedefs. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_7_4 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_r_e_s_e_r_v_e │ │ │ │ +void reserve(size_type __n) │ │ │ │ +Prepare the unordered_multimap for a specified number of elements. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_2_0_2_8 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_e_q_u_a_l___r_a_n_g_e │ │ │ │ +std::pair< const_iterator, const_iterator > equal_range(const key_type &__x) │ │ │ │ +const │ │ │ │ +Finds a subsequence matching given key. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_8_9_4 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p │ │ │ │ +unordered_multimap(_InputIterator __first, _InputIterator __last, size_type │ │ │ │ +__n=0, const hasher &__hf=hasher(), const key_equal &__eql=key_equal(), const │ │ │ │ +allocator_type &__a=allocator_type()) │ │ │ │ +Builds an unordered_multimap from a range. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_3_1_8 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_c_l_e_a_r │ │ │ │ +void clear() noexcept │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_7_3_5 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_f_i_n_d │ │ │ │ +iterator find(const key_type &__x) │ │ │ │ +Tries to locate an element in an unordered_multimap. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_8_1_5 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p │ │ │ │ +unordered_multimap(initializer_list< value_type > __l, size_type __n=0, const │ │ │ │ +hasher &__hf=hasher(), const key_equal &__eql=key_equal(), const allocator_type │ │ │ │ +&__a=allocator_type()) │ │ │ │ +Builds an unordered_multimap from an initializer_list. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_3_7_3 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_c_o_u_n_t │ │ │ │ +auto count(const _Kt &__x) const -> decltype(_M_h._M_count_tr(__x)) │ │ │ │ +Finds the number of elements. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_8_5_0 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_e_r_a_s_e │ │ │ │ +iterator erase(const_iterator __first, const_iterator __last) │ │ │ │ +Erases a [__first,__last) range of elements from an unordered_multimap. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_7_2_5 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_e_n_d │ │ │ │ +const_local_iterator end(size_type __n) const │ │ │ │ +Returns a read-only (constant) iterator pointing to one past the last bucket │ │ │ │ +elements. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_9_8_0 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_p_o_i_n_t_e_r │ │ │ │ +_Hashtable::pointer pointer │ │ │ │ +Iterator-related typedefs. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_6_8 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_a_l_l_o_c_a_t_o_r___t_y_p_e │ │ │ │ +_Hashtable::allocator_type allocator_type │ │ │ │ +Public typedefs. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_6_3 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_b_e_g_i_n │ │ │ │ +const_local_iterator begin(size_type __n) const │ │ │ │ +Returns a read-only (constant) iterator pointing to the first bucket element. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_9_5_4 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_f_i_n_d │ │ │ │ +auto find(const _Kt &__x) const -> decltype(_M_h._M_find_tr(__x)) │ │ │ │ +Tries to locate an element in an unordered_multimap. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_8_3_2 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ +_Hashtable::const_local_iterator const_local_iterator │ │ │ │ +Iterator-related typedefs. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_7_5 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p │ │ │ │ +unordered_multimap(unordered_multimap &&)=default │ │ │ │ +Move constructor. │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p │ │ │ │ +unordered_multimap(const allocator_type &__a) │ │ │ │ +Creates an unordered_multimap with no elements. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_3_3_7 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_d_i_f_f_e_r_e_n_c_e___t_y_p_e │ │ │ │ +_Hashtable::difference_type difference_type │ │ │ │ +Iterator-related typedefs. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_7_7 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_s_i_z_e___t_y_p_e │ │ │ │ +_Hashtable::size_type size_type │ │ │ │ +Iterator-related typedefs. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_7_6 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_c_o_n_s_t___p_o_i_n_t_e_r │ │ │ │ +_Hashtable::const_pointer const_pointer │ │ │ │ +Iterator-related typedefs. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_6_9 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_i_n_s_e_r_t │ │ │ │ +__enable_if_t< is_constructible< value_type, _Pair && >::value, iterator > │ │ │ │ +insert(_Pair &&__x) │ │ │ │ +Inserts a std::pair into the unordered_multimap. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_5_7_9 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_c_o_n_t_a_i_n_s │ │ │ │ +auto contains(const _Kt &__x) const -> decltype(_M_h._M_find_tr(__x), void(), │ │ │ │ +true) │ │ │ │ +Finds whether an element with the given key exists. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_8_6_8 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_s_w_a_p │ │ │ │ +void swap(unordered_multimap &__x) noexcept(noexcept(_M_h.swap(__x._M_h))) │ │ │ │ +Swaps data with another unordered_multimap. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_7_4_9 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_r_e_h_a_s_h │ │ │ │ +void rehash(size_type __n) │ │ │ │ +May rehash the unordered_multimap. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_2_0_1_7 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ +_Hashtable::const_iterator const_iterator │ │ │ │ +Iterator-related typedefs. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_7_3 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_i_n_s_e_r_t │ │ │ │ +void insert(initializer_list< value_type > __l) │ │ │ │ +Attempts to insert a list of elements into the unordered_multimap. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_6_4_2 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_c_e_n_d │ │ │ │ +const_iterator cend() const noexcept │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_5_0_6 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_m_a_x___s_i_z_e │ │ │ │ +size_type max_size() const noexcept │ │ │ │ +Returns the maximum size of the unordered_multimap. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_4_6_1 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_c_b_e_g_i_n │ │ │ │ +const_local_iterator cbegin(size_type __n) const │ │ │ │ +Returns a read-only (constant) iterator pointing to the first bucket element. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_9_5_8 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_e_m_p_t_y │ │ │ │ +bool empty() const noexcept │ │ │ │ +Returns true if the unordered_multimap is empty. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_4_5_1 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_c_b_e_g_i_n │ │ │ │ +const_iterator cbegin() const noexcept │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_4_8_4 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_k_e_y___t_y_p_e │ │ │ │ +_Hashtable::key_type key_type │ │ │ │ +Public typedefs. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_5_8 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_e_x_t_r_a_c_t │ │ │ │ +node_type extract(const_iterator __pos) │ │ │ │ +Extract a node. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_6_4_8 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_c_e_n_d │ │ │ │ +const_local_iterator cend(size_type __n) const │ │ │ │ +Returns a read-only (constant) iterator pointing to one past the last bucket │ │ │ │ +elements. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_9_8_4 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_i_n_s_e_r_t │ │ │ │ +iterator insert(const_iterator __hint, const value_type &__x) │ │ │ │ +Inserts a std::pair into the unordered_multimap. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_6_0_4 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_s_i_z_e │ │ │ │ +size_type size() const noexcept │ │ │ │ +Returns the size of the unordered_multimap. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_4_5_6 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p │ │ │ │ +unordered_multimap(const unordered_multimap &)=default │ │ │ │ +Copy constructor. │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_e_m_p_l_a_c_e___h_i_n_t │ │ │ │ +iterator emplace_hint(const_iterator __pos, _Args &&... __args) │ │ │ │ +Attempts to build and insert a std::pair into the unordered_multimap. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_5_5_6 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_i_n_s_e_r_t │ │ │ │ +iterator insert(const_iterator __hint, value_type &&__x) │ │ │ │ +Inserts a std::pair into the unordered_multimap. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_6_1_0 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_e_q_u_a_l___r_a_n_g_e │ │ │ │ +auto equal_range(const _Kt &__x) -> decltype(_M_h._M_equal_range_tr(__x)) │ │ │ │ +Finds a subsequence matching given key. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_8_8_8 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_k_e_y___e_q_u_a_l │ │ │ │ +_Hashtable::key_equal key_equal │ │ │ │ +Public typedefs. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_6_2 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_g_e_t___a_l_l_o_c_a_t_o_r │ │ │ │ +allocator_type get_allocator() const noexcept │ │ │ │ +Returns the allocator object used by the unordered_multimap. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_4_4_4 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_m_a_x___l_o_a_d___f_a_c_t_o_r │ │ │ │ +void max_load_factor(float __z) │ │ │ │ +Change the unordered_multimap maximum load factor. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_2_0_0_6 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_e_q_u_a_l___r_a_n_g_e │ │ │ │ +auto equal_range(const _Kt &__x) const -> decltype(_M_h._M_equal_range_tr(__x)) │ │ │ │ +Finds a subsequence matching given key. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_9_0_0 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p │ │ │ │ +A standard container composed of unique keys (containing at most one of each │ │ │ │ +key value) that associat... │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_0_5 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_i_n_s_e_r_t │ │ │ │ +iterator insert(const_iterator __hint, value_type &&__x) │ │ │ │ +Attempts to insert a std::pair into the unordered_map. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_5_9_8 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_i_t_e_r_a_t_o_r │ │ │ │ +_Hashtable::iterator iterator │ │ │ │ +Iterator-related typedefs. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_7 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_m_a_x___l_o_a_d___f_a_c_t_o_r │ │ │ │ +void max_load_factor(float __z) │ │ │ │ +Change the unordered_map maximum load factor. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_1_0_6 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_a_t │ │ │ │ +const mapped_type & at(const key_type &__k) const │ │ │ │ +Access to unordered_map data. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_0_0_2 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_c_o_n_t_a_i_n_s │ │ │ │ +bool contains(const key_type &__x) const │ │ │ │ +Finds whether an element with the given key exists. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_9_2_2 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_e_x_t_r_a_c_t │ │ │ │ +node_type extract(const key_type &__key) │ │ │ │ +Extract a node. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_4_3_5 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_i_n_s_e_r_t │ │ │ │ +void insert(_InputIterator __first, _InputIterator __last) │ │ │ │ +A template function that attempts to insert a range of elements. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_6_1_8 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_g_e_t___a_l_l_o_c_a_t_o_r │ │ │ │ +allocator_type get_allocator() const noexcept │ │ │ │ +Returns the allocator object used by the unordered_map. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_3_0_0 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_f_i_n_d │ │ │ │ +auto find(const _Kt &__x) -> decltype(_M_h._M_find_tr(__x)) │ │ │ │ +Tries to locate an element in an unordered_map. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_8_7_6 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ +unordered_map & operator=(initializer_list< value_type > __l) │ │ │ │ +Unordered_map list assignment operator. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_2_9_2 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_c_o_n_s_t___p_o_i_n_t_e_r │ │ │ │ +_Hashtable::const_pointer const_pointer │ │ │ │ +Iterator-related typedefs. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_4 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_f_i_n_d │ │ │ │ +auto find(const _Kt &__x) const -> decltype(_M_h._M_find_tr(__x)) │ │ │ │ +Tries to locate an element in an unordered_map. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_8_8_7 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_i_n_s_e_r_t │ │ │ │ +void insert(initializer_list< value_type > __l) │ │ │ │ +Attempts to insert a list of elements into the unordered_map. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_6_2_9 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_i_n_s_e_r_t │ │ │ │ +__enable_if_t< is_constructible< value_type, _Pair && >::value, iterator > │ │ │ │ +insert(const_iterator __hint, _Pair &&__x) │ │ │ │ +Attempts to insert a std::pair into the unordered_map. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_6_0_3 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_e_q_u_a_l___r_a_n_g_e │ │ │ │ +std::pair< iterator, iterator > equal_range(const key_type &__x) │ │ │ │ +Finds a subsequence matching given key. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_9_4_3 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_a_t │ │ │ │ +mapped_type & at(const key_type &__k) │ │ │ │ +Access to unordered_map data. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_9_9_8 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_e_r_a_s_e │ │ │ │ +iterator erase(const_iterator __first, const_iterator __last) │ │ │ │ +Erases a [__first,__last) range of elements from an unordered_map. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_7_8_2 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_t_r_y___e_m_p_l_a_c_e │ │ │ │ +iterator try_emplace(const_iterator __hint, const key_type &__k, _Args &&... │ │ │ │ +__args) │ │ │ │ +Attempts to build and insert a std::pair into the unordered_map. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_5_1_7 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_e_x_t_r_a_c_t │ │ │ │ +node_type extract(const_iterator __pos) │ │ │ │ +Extract a node. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_4_2_7 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_i_n_s_e_r_t │ │ │ │ +std::pair< iterator, bool > insert(const value_type &__x) │ │ │ │ +Attempts to insert a std::pair into the unordered_map. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_5_5_3 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_r_e_s_e_r_v_e │ │ │ │ +void reserve(size_type __n) │ │ │ │ +Prepare the unordered_map for a specified number of elements. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_1_2_8 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_c_b_e_g_i_n │ │ │ │ +const_local_iterator cbegin(size_type __n) const │ │ │ │ +Returns a read-only (constant) iterator pointing to the first bucket element. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_0_5_8 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_e_q_u_a_l___r_a_n_g_e │ │ │ │ +std::pair< const_iterator, const_iterator > equal_range(const key_type &__x) │ │ │ │ +const │ │ │ │ +Finds a subsequence matching given key. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_9_5_5 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_i_n_s_e_r_t │ │ │ │ +iterator insert(const_iterator, node_type &&__nh) │ │ │ │ +Re-insert an extracted node. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_4_4_5 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_r_e_f_e_r_e_n_c_e │ │ │ │ +_Hashtable::reference reference │ │ │ │ +Iterator-related typedefs. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_5 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_i_n_s_e_r_t │ │ │ │ +iterator insert(const_iterator __hint, const value_type &__x) │ │ │ │ +Attempts to insert a std::pair into the unordered_map. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_5_9_2 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_e_n_d │ │ │ │ +iterator end() noexcept │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_3_4_9 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_a_l_l_o_c_a_t_o_r___t_y_p_e │ │ │ │ +_Hashtable::allocator_type allocator_type │ │ │ │ +Public typedefs. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_1_8 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_u_n_o_r_d_e_r_e_d___m_a_p │ │ │ │ +unordered_map(const unordered_map &)=default │ │ │ │ +Copy constructor. │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_c_o_u_n_t │ │ │ │ +size_type count(const key_type &__x) const │ │ │ │ +Finds the number of elements. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_9_0_3 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_e_m_p_t_y │ │ │ │ +bool empty() const noexcept │ │ │ │ +Returns true if the unordered_map is empty. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_3_0_7 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_e_r_a_s_e │ │ │ │ +size_type erase(const key_type &__x) │ │ │ │ +Erases elements according to the provided key. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_7_6_4 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_f_i_n_d │ │ │ │ +const_iterator find(const key_type &__x) const │ │ │ │ +Tries to locate an element in an unordered_map. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_8_8_1 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_u_n_o_r_d_e_r_e_d___m_a_p │ │ │ │ +unordered_map(unordered_map &&)=default │ │ │ │ +Move constructor. │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_e_n_d │ │ │ │ +const_local_iterator end(size_type __n) const │ │ │ │ +Returns a read-only (constant) iterator pointing to one past the last bucket │ │ │ │ +elements. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_0_8_0 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_e_q_u_a_l___r_a_n_g_e │ │ │ │ +auto equal_range(const _Kt &__x) -> decltype(_M_h._M_equal_range_tr(__x)) │ │ │ │ +Finds a subsequence matching given key. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_9_4_9 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_c_o_n_t_a_i_n_s │ │ │ │ +auto contains(const _Kt &__x) const -> decltype(_M_h._M_find_tr(__x), void(), │ │ │ │ +true) │ │ │ │ +Finds whether an element with the given key exists. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_9_2_7 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_m_a_x___s_i_z_e │ │ │ │ +size_type max_size() const noexcept │ │ │ │ +Returns the maximum size of the unordered_map. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_3_1_7 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_e_n_d │ │ │ │ +const_iterator end() const noexcept │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_3_5_8 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_u_n_o_r_d_e_r_e_d___m_a_p │ │ │ │ +unordered_map()=default │ │ │ │ +Default constructor. │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_m_a_p_p_e_d___t_y_p_e │ │ │ │ +_Hashtable::mapped_type mapped_type │ │ │ │ +Public typedefs. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_1_5 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ +unordered_map & operator=(unordered_map &&)=default │ │ │ │ +Move assignment operator. │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_b_e_g_i_n │ │ │ │ +const_local_iterator begin(size_type __n) const │ │ │ │ +Returns a read-only (constant) iterator pointing to the first bucket element. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_0_5_4 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_u_n_o_r_d_e_r_e_d___m_a_p │ │ │ │ +unordered_map(size_type __n, const hasher &__hf=hasher(), const key_equal │ │ │ │ +&__eql=key_equal(), const allocator_type &__a=allocator_type()) │ │ │ │ +Default constructor creates no elements. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_5_3 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_e_m_p_l_a_c_e │ │ │ │ +std::pair< iterator, bool > emplace(_Args &&... __args) │ │ │ │ +Attempts to build and insert a std::pair into the unordered_map. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_3_9_0 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_c_e_n_d │ │ │ │ +const_local_iterator cend(size_type __n) const │ │ │ │ +Returns a read-only (constant) iterator pointing to one past the last bucket │ │ │ │ +elements. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_0_8_4 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_s_i_z_e │ │ │ │ +size_type size() const noexcept │ │ │ │ +Returns the size of the unordered_map. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_3_1_2 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_i_n_s_e_r_t │ │ │ │ +__enable_if_t< is_constructible< value_type, _Pair && >::value, pair< iterator, │ │ │ │ +bool > > insert(_Pair &&__x) │ │ │ │ +Attempts to insert a std::pair into the unordered_map. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_5_6_5 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_o_p_e_r_a_t_o_r_[_] │ │ │ │ +mapped_type & operator[](key_type &&__k) │ │ │ │ +Subscript ( [] ) access to unordered_map data. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_9_8_5 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_i_n_s_e_r_t │ │ │ │ +std::pair< iterator, bool > insert(value_type &&__x) │ │ │ │ +Attempts to insert a std::pair into the unordered_map. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_5_5_9 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_h_a_s_h_e_r │ │ │ │ +_Hashtable::hasher hasher │ │ │ │ +Public typedefs. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_1_6 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_i_n_s_e_r_t___o_r___a_s_s_i_g_n │ │ │ │ +pair< iterator, bool > insert_or_assign(const key_type &__k, _Obj &&__obj) │ │ │ │ +Attempts to insert a std::pair into the unordered_map. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_6_5_6 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_u_n_o_r_d_e_r_e_d___m_a_p │ │ │ │ +unordered_map(_InputIterator __first, _InputIterator __last, size_type __n=0, │ │ │ │ +const hasher &__hf=hasher(), const key_equal &__eql=key_equal(), const │ │ │ │ +allocator_type &__a=allocator_type()) │ │ │ │ +Builds an unordered_map from a range. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_7_4 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_c_l_e_a_r │ │ │ │ +void clear() noexcept │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_7_9_2 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_o_p_e_r_a_t_o_r_[_] │ │ │ │ +mapped_type & operator[](const key_type &__k) │ │ │ │ +Subscript ( [] ) access to unordered_map data. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_9_8_1 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_t_r_y___e_m_p_l_a_c_e │ │ │ │ +pair< iterator, bool > try_emplace(const key_type &__k, _Args &&... __args) │ │ │ │ +Attempts to build and insert a std::pair into the unordered_map. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_4_7_3 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_b_e_g_i_n │ │ │ │ +const_iterator begin() const noexcept │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_3_3_6 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_k_e_y___e_q │ │ │ │ +key_equal key_eq() const │ │ │ │ +Returns the key comparison object with which the unordered_map was constructed. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_8_5_2 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_c_o_n_s_t___r_e_f_e_r_e_n_c_e │ │ │ │ +_Hashtable::const_reference const_reference │ │ │ │ +Iterator-related typedefs. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_6 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_k_e_y___e_q_u_a_l │ │ │ │ +_Hashtable::key_equal key_equal │ │ │ │ +Public typedefs. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_1_7 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ +_Hashtable::local_iterator local_iterator │ │ │ │ +Iterator-related typedefs. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_9 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_e_r_a_s_e │ │ │ │ +iterator erase(iterator __position) │ │ │ │ +Erases an element from an unordered_map. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_7_4_7 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_c_e_n_d │ │ │ │ +const_iterator cend() const noexcept │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_3_6_2 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_e_n_d │ │ │ │ +local_iterator end(size_type __n) │ │ │ │ +Returns a read/write iterator pointing to one past the last bucket elements. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_0_6_9 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_p_o_i_n_t_e_r │ │ │ │ +_Hashtable::pointer pointer │ │ │ │ +Iterator-related typedefs. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_3 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_i_n_s_e_r_t___o_r___a_s_s_i_g_n │ │ │ │ +iterator insert_or_assign(const_iterator __hint, const key_type &__k, _Obj │ │ │ │ +&&__obj) │ │ │ │ +Attempts to insert a std::pair into the unordered_map. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_7_0_5 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_u_n_o_r_d_e_r_e_d___m_a_p │ │ │ │ +unordered_map(const allocator_type &__a) │ │ │ │ +Creates an unordered_map with no elements. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_9_3 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_k_e_y___t_y_p_e │ │ │ │ +_Hashtable::key_type key_type │ │ │ │ +Public typedefs. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_1_3 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_b_u_c_k_e_t___c_o_u_n_t │ │ │ │ +size_type bucket_count() const noexcept │ │ │ │ +Returns the number of buckets of the unordered_map. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_0_1_0 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_b_e_g_i_n │ │ │ │ +iterator begin() noexcept │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_3_2_7 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_h_a_s_h___f_u_n_c_t_i_o_n │ │ │ │ +hasher hash_function() const │ │ │ │ +Returns the hash functor object with which the unordered_map was constructed. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_8_4_6 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_e_q_u_a_l___r_a_n_g_e │ │ │ │ +auto equal_range(const _Kt &__x) const -> decltype(_M_h._M_equal_range_tr(__x)) │ │ │ │ +Finds a subsequence matching given key. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_9_6_1 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_u_n_o_r_d_e_r_e_d___m_a_p │ │ │ │ +unordered_map(initializer_list< value_type > __l, size_type __n=0, const hasher │ │ │ │ +&__hf=hasher(), const key_equal &__eql=key_equal(), const allocator_type │ │ │ │ +&__a=allocator_type()) │ │ │ │ +Builds an unordered_map from an initializer_list. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_2_2_9 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ +_Hashtable::const_iterator const_iterator │ │ │ │ +Iterator-related typedefs. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_8 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_s_i_z_e___t_y_p_e │ │ │ │ +_Hashtable::size_type size_type │ │ │ │ +Iterator-related typedefs. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_3_1 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_f_i_n_d │ │ │ │ +iterator find(const key_type &__x) │ │ │ │ +Tries to locate an element in an unordered_map. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_8_7_0 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_l_o_a_d___f_a_c_t_o_r │ │ │ │ +float load_factor() const noexcept │ │ │ │ +Returns the average number of elements per bucket. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_0_9_2 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_e_r_a_s_e │ │ │ │ +iterator erase(const_iterator __position) │ │ │ │ +Erases an element from an unordered_map. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_7_4_2 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_s_w_a_p │ │ │ │ +void swap(unordered_map &__x) noexcept(noexcept(_M_h.swap(__x._M_h))) │ │ │ │ +Swaps data with another unordered_map. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_8_0_6 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_b_e_g_i_n │ │ │ │ +local_iterator begin(size_type __n) │ │ │ │ +Returns a read/write iterator pointing to the first bucket element. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_0_4_3 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_m_a_x___l_o_a_d___f_a_c_t_o_r │ │ │ │ +float max_load_factor() const noexcept │ │ │ │ +Returns a positive number that the unordered_map tries to keep the load factor │ │ │ │ +less than or equal to. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_0_9_8 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ +unordered_map & operator=(const unordered_map &)=default │ │ │ │ +Copy assignment operator. │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_d_i_f_f_e_r_e_n_c_e___t_y_p_e │ │ │ │ +_Hashtable::difference_type difference_type │ │ │ │ +Iterator-related typedefs. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_3_2 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_c_o_u_n_t │ │ │ │ +auto count(const _Kt &__x) const -> decltype(_M_h._M_count_tr(__x)) │ │ │ │ +Finds the number of elements. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_9_0_9 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ +_Hashtable::const_local_iterator const_local_iterator │ │ │ │ +Iterator-related typedefs. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_3_0 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_m_a_x___b_u_c_k_e_t___c_o_u_n_t │ │ │ │ +size_type max_bucket_count() const noexcept │ │ │ │ +Returns the maximum number of buckets of the unordered_map. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_0_1_5 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_e_m_p_l_a_c_e___h_i_n_t │ │ │ │ +iterator emplace_hint(const_iterator __pos, _Args &&... __args) │ │ │ │ +Attempts to build and insert a std::pair into the unordered_map. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_4_2_1 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_i_n_s_e_r_t │ │ │ │ +insert_return_type insert(node_type &&__nh) │ │ │ │ +Re-insert an extracted node. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_4_4_0 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_v_a_l_u_e___t_y_p_e │ │ │ │ +_Hashtable::value_type value_type │ │ │ │ +Public typedefs. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_1_4 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_r_e_h_a_s_h │ │ │ │ +void rehash(size_type __n) │ │ │ │ +May rehash the unordered_map. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_1_1_7 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_c_b_e_g_i_n │ │ │ │ +const_iterator cbegin() const noexcept │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_3_4_0 │ │ │ │ _s_t_d_:_:_a_u_t_o___p_t_r___r_e_f │ │ │ │ DDeeffiinniittiioonn _a_u_t_o___p_t_r_._h_:_4_9 │ │ │ │ * _b_i_t_s │ │ │ │ - * _u_t_i_l_i_t_y_._h │ │ │ │ + * _u_n_o_r_d_e_r_e_d___m_a_p_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-12-base/libstdc++/user/a00368.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: uses_allocator_args.h File Reference │ │ │ +libstdc++: forward_list.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -46,69 +46,120 @@ │ │ │ /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */ │ │ │ $(document).ready(function(){initNavTree('a00368.html',''); initResizable(); }); │ │ │ /* @license-end */ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ +Classes | │ │ │ Namespaces | │ │ │ Macros | │ │ │ Functions
│ │ │ -
uses_allocator_args.h File Reference
│ │ │ +
forward_list.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +

│ │ │ +Classes

struct  std::_Fwd_list_base< _Tp, _Alloc >
 
struct  std::_Fwd_list_const_iterator< _Tp >
 
struct  std::_Fwd_list_iterator< _Tp >
 
struct  std::_Fwd_list_node< _Tp >
 
struct  std::_Fwd_list_node_base
 
class  std::forward_list< _Tp, _Alloc >
 
│ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Namespaces

namespace  std
 
│ │ │ │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ Macros

#define __cpp_lib_make_obj_using_allocator
 
#define __cpp_lib_list_remove_return_type
 
#define _GLIBCXX_FWDLIST_REMOVE_RETURN_TYPE_TAG
 
│ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ Functions

template<typename _Tp , typename _Alloc , typename... _Args>
constexpr _Tp std::make_obj_using_allocator (const _Alloc &__a, _Args &&... __args)
 
template<typename _Tp , typename _Alloc , typename... _Args>
constexpr _Tp * std::uninitialized_construct_using_allocator (_Tp *__p, const _Alloc &__a, _Args &&... __args)
 
template<_Std_pair _Tp, typename _Alloc >
constexpr auto std::uses_allocator_construction_args (const _Alloc &) noexcept
 
template<_Std_pair _Tp, typename _Alloc , typename _Up , typename _Vp >
constexpr auto std::uses_allocator_construction_args (const _Alloc &, _Up &&, _Vp &&) noexcept
 
template<_Std_pair _Tp, typename _Alloc , typename _Up , typename _Vp >
constexpr auto std::uses_allocator_construction_args (const _Alloc &, const pair< _Up, _Vp > &) noexcept
 
template<_Std_pair _Tp, typename _Alloc , typename _Up , typename _Vp >
constexpr auto std::uses_allocator_construction_args (const _Alloc &, pair< _Up, _Vp > &&) noexcept
 
template<typename _Tp , typename _Alloc , typename... _Args>
│ │ │ -requires (! _Std_pair<_Tp>)
constexpr auto std::uses_allocator_construction_args (const _Alloc &__a, _Args &&... __args) noexcept
 
template<_Std_pair _Tp, typename _Alloc , typename _Tuple1 , typename _Tuple2 >
constexpr auto std::uses_allocator_construction_args (const _Alloc &__a, piecewise_construct_t, _Tuple1 &&__x, _Tuple2 &&__y) noexcept
 
│ │ │ +template<typename _InputIterator , typename _ValT = typename iterator_traits<_InputIterator>::value_type, typename _Allocator = allocator<_ValT>, typename = _RequireInputIter<_InputIterator>, typename = _RequireAllocator<_Allocator>>
 std::forward_list (_InputIterator, _InputIterator, _Allocator=_Allocator()) -> forward_list< _ValT, _Allocator >
 
template<typename _Tp , typename _Alloc >
bool std::operator!= (const forward_list< _Tp, _Alloc > &__lx, const forward_list< _Tp, _Alloc > &__ly)
 
template<typename _Tp , typename _Alloc >
bool std::operator< (const forward_list< _Tp, _Alloc > &__lx, const forward_list< _Tp, _Alloc > &__ly)
 
template<typename _Tp , typename _Alloc >
bool std::operator<= (const forward_list< _Tp, _Alloc > &__lx, const forward_list< _Tp, _Alloc > &__ly)
 
template<typename _Tp , typename _Alloc >
bool std::operator== (const forward_list< _Tp, _Alloc > &__lx, const forward_list< _Tp, _Alloc > &__ly)
 
template<typename _Tp , typename _Alloc >
bool std::operator> (const forward_list< _Tp, _Alloc > &__lx, const forward_list< _Tp, _Alloc > &__ly)
 
template<typename _Tp , typename _Alloc >
bool std::operator>= (const forward_list< _Tp, _Alloc > &__lx, const forward_list< _Tp, _Alloc > &__ly)
 
template<typename _Tp , typename _Alloc >
void std::swap (forward_list< _Tp, _Alloc > &__lx, forward_list< _Tp, _Alloc > &__ly) noexcept(noexcept(__lx.swap(__ly)))
 
│ │ │

Detailed Description

│ │ │ -

This is an internal header file, included by other library headers. Do not attempt to use it directly. Instead, include <memory>.

│ │ │ +

This is an internal header file, included by other library headers. Do not attempt to use it directly. Instead, include <forward_list>.

│ │ │ + │ │ │ +

Definition in file forward_list.h.

│ │ │ +

Macro Definition Documentation

│ │ │ + │ │ │ +

◆ __cpp_lib_list_remove_return_type

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
#define __cpp_lib_list_remove_return_type
│ │ │ +
│ │ │ │ │ │ -

Definition in file uses_allocator_args.h.

│ │ │ -
│ │ │ +

Definition at line 1184 of file forward_list.h.

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ +

◆ _GLIBCXX_FWDLIST_REMOVE_RETURN_TYPE_TAG

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
#define _GLIBCXX_FWDLIST_REMOVE_RETURN_TYPE_TAG
│ │ │ +
│ │ │ + │ │ │ +

Definition at line 1186 of file forward_list.h.

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ +
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,51 +1,75 @@ │ │ │ │ libstdc++ │ │ │ │ -_N_a_m_e_s_p_a_c_e_s | _M_a_c_r_o_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -uses_allocator_args.h File Reference │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _M_a_c_r_o_s | _F_u_n_c_t_i_o_n_s │ │ │ │ +forward_list.h File Reference │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ +CCllaasssseess │ │ │ │ +struct   _s_t_d_:_:___F_w_d___l_i_s_t___b_a_s_e_<_ ___T_p_,_ ___A_l_l_o_c_ _> │ │ │ │ +  │ │ │ │ +struct   _s_t_d_:_:___F_w_d___l_i_s_t___c_o_n_s_t___i_t_e_r_a_t_o_r_<_ ___T_p_ _> │ │ │ │ +  │ │ │ │ +struct   _s_t_d_:_:___F_w_d___l_i_s_t___i_t_e_r_a_t_o_r_<_ ___T_p_ _> │ │ │ │ +  │ │ │ │ +struct   _s_t_d_:_:___F_w_d___l_i_s_t___n_o_d_e_<_ ___T_p_ _> │ │ │ │ +  │ │ │ │ +struct   _s_t_d_:_:___F_w_d___l_i_s_t___n_o_d_e___b_a_s_e │ │ │ │ +  │ │ │ │ + class   _s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_<_ ___T_p_,_ ___A_l_l_o_c_ _> │ │ │ │ +  │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _s_t_d │ │ │ │   │ │ │ │ MMaaccrrooss │ │ │ │ -#define  _____c_p_p___l_i_b___m_a_k_e___o_b_j___u_s_i_n_g___a_l_l_o_c_a_t_o_r │ │ │ │ +#define  _____c_p_p___l_i_b___l_i_s_t___r_e_m_o_v_e___r_e_t_u_r_n___t_y_p_e │ │ │ │ +  │ │ │ │ +#define  ___G_L_I_B_C_X_X___F_W_D_L_I_S_T___R_E_M_O_V_E___R_E_T_U_R_N___T_Y_P_E___T_A_G │ │ │ │   │ │ │ │ FFuunnccttiioonnss │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e _Alloc , typename... _Args> │ │ │ │ - constexpr _Tp  _s_t_d_:_:_m_a_k_e___o_b_j___u_s_i_n_g___a_l_l_o_c_a_t_o_r (const _Alloc &__a, ___A_r_g_s &&... │ │ │ │ - _____a_r_g_s) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e _Alloc , typename... _Args> │ │ │ │ -constexpr _Tp *  _s_t_d_:_:_u_n_i_n_i_t_i_a_l_i_z_e_d___c_o_n_s_t_r_u_c_t___u_s_i_n_g___a_l_l_o_c_a_t_o_r (_Tp *__p, const │ │ │ │ - _Alloc &__a, ___A_r_g_s &&... _____a_r_g_s) │ │ │ │ -  │ │ │ │ -template<_Std_pair _Tp, _t_y_p_e_n_a_m_e _Alloc > │ │ │ │ - constexpr _a_u_t_o  _s_t_d_:_:_u_s_e_s___a_l_l_o_c_a_t_o_r___c_o_n_s_t_r_u_c_t_i_o_n___a_r_g_s (const _Alloc &) │ │ │ │ - noexcept │ │ │ │ -  │ │ │ │ -template<_Std_pair _Tp, _t_y_p_e_n_a_m_e _Alloc , _t_y_p_e_n_a_m_e _Up , _t_y_p_e_n_a_m_e _Vp > │ │ │ │ - constexpr _a_u_t_o  _s_t_d_:_:_u_s_e_s___a_l_l_o_c_a_t_o_r___c_o_n_s_t_r_u_c_t_i_o_n___a_r_g_s (const _Alloc &, _Up &&, │ │ │ │ - _Vp &&) noexcept │ │ │ │ -  │ │ │ │ -template<_Std_pair _Tp, _t_y_p_e_n_a_m_e _Alloc , _t_y_p_e_n_a_m_e _Up , _t_y_p_e_n_a_m_e _Vp > │ │ │ │ - constexpr _a_u_t_o  _s_t_d_:_:_u_s_e_s___a_l_l_o_c_a_t_o_r___c_o_n_s_t_r_u_c_t_i_o_n___a_r_g_s (const _Alloc &, const │ │ │ │ - _p_a_i_r< _Up, _Vp > &) noexcept │ │ │ │ -  │ │ │ │ -template<_Std_pair _Tp, _t_y_p_e_n_a_m_e _Alloc , _t_y_p_e_n_a_m_e _Up , _t_y_p_e_n_a_m_e _Vp > │ │ │ │ - constexpr _a_u_t_o  _s_t_d_:_:_u_s_e_s___a_l_l_o_c_a_t_o_r___c_o_n_s_t_r_u_c_t_i_o_n___a_r_g_s (const _Alloc &, _p_a_i_r< │ │ │ │ - _Up, _Vp > &&) noexcept │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e _Alloc , typename... _Args> │ │ │ │ -requires (! _Std_pair<_Tp>) │ │ │ │ - constexpr _a_u_t_o  _s_t_d_:_:_u_s_e_s___a_l_l_o_c_a_t_o_r___c_o_n_s_t_r_u_c_t_i_o_n___a_r_g_s (const _Alloc &__a, │ │ │ │ - ___A_r_g_s &&... _____a_r_g_s) noexcept │ │ │ │ -  │ │ │ │ -template<_Std_pair _Tp, _t_y_p_e_n_a_m_e _Alloc , _t_y_p_e_n_a_m_e ___T_u_p_l_e_1 , _t_y_p_e_n_a_m_e ___T_u_p_l_e_2 > │ │ │ │ - constexpr _a_u_t_o  _s_t_d_:_:_u_s_e_s___a_l_l_o_c_a_t_o_r___c_o_n_s_t_r_u_c_t_i_o_n___a_r_g_s (const _Alloc &__a, │ │ │ │ - _p_i_e_c_e_w_i_s_e___c_o_n_s_t_r_u_c_t___t, ___T_u_p_l_e_1 &&__x, ___T_u_p_l_e_2 &&__y) noexcept │ │ │ │ +template<_t_y_p_e_n_a_m_e ___I_n_p_u_t_I_t_e_r_a_t_o_r , _t_y_p_e_n_a_m_e ___V_a_l_T = typename │ │ │ │ +iterator_traits<_InputIterator>::value_type, _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r = │ │ │ │ +allocator<_ValT>, _t_y_p_e_n_a_m_e = _RequireInputIter<_InputIterator>, _t_y_p_e_n_a_m_e = │ │ │ │ +_RequireAllocator<_Allocator>> │ │ │ │ +   ssttdd::::ffoorrwwaarrdd__lliisstt (___I_n_p_u_t_I_t_e_r_a_t_o_r, ___I_n_p_u_t_I_t_e_r_a_t_o_r, ___A_l_l_o_c_a_t_o_r=___A_l_l_o_c_a_t_o_r │ │ │ │ + ()) -> _f_o_r_w_a_r_d___l_i_s_t< ___V_a_l_T, ___A_l_l_o_c_a_t_o_r > │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e _Alloc > │ │ │ │ +bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_!_= (const _f_o_r_w_a_r_d___l_i_s_t< _Tp, _Alloc > &_____l_x, const │ │ │ │ + _f_o_r_w_a_r_d___l_i_s_t< _Tp, _Alloc > &_____l_y) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e _Alloc > │ │ │ │ +bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_< (const _f_o_r_w_a_r_d___l_i_s_t< _Tp, _Alloc > &_____l_x, const │ │ │ │ + _f_o_r_w_a_r_d___l_i_s_t< _Tp, _Alloc > &_____l_y) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e _Alloc > │ │ │ │ +bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_<_= (const _f_o_r_w_a_r_d___l_i_s_t< _Tp, _Alloc > &_____l_x, const │ │ │ │ + _f_o_r_w_a_r_d___l_i_s_t< _Tp, _Alloc > &_____l_y) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e _Alloc > │ │ │ │ +bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_=_= (const _f_o_r_w_a_r_d___l_i_s_t< _Tp, _Alloc > &_____l_x, const │ │ │ │ + _f_o_r_w_a_r_d___l_i_s_t< _Tp, _Alloc > &_____l_y) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e _Alloc > │ │ │ │ +bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_> (const _f_o_r_w_a_r_d___l_i_s_t< _Tp, _Alloc > &_____l_x, const │ │ │ │ + _f_o_r_w_a_r_d___l_i_s_t< _Tp, _Alloc > &_____l_y) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e _Alloc > │ │ │ │ +bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_>_= (const _f_o_r_w_a_r_d___l_i_s_t< _Tp, _Alloc > &_____l_x, const │ │ │ │ + _f_o_r_w_a_r_d___l_i_s_t< _Tp, _Alloc > &_____l_y) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e _Alloc > │ │ │ │ +_v_o_i_d  _s_t_d_:_:_s_w_a_p (_f_o_r_w_a_r_d___l_i_s_t< _Tp, _Alloc > &_____l_x, _f_o_r_w_a_r_d___l_i_s_t< _Tp, _Alloc > │ │ │ │ + &_____l_y) noexcept(noexcept(__lx.swap(_____l_y))) │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ This is an internal header file, included by other library headers. Do not │ │ │ │ -attempt to use it directly. Instead, include . │ │ │ │ -Definition in file _u_s_e_s___a_l_l_o_c_a_t_o_r___a_r_g_s_._h. │ │ │ │ +attempt to use it directly. Instead, include . │ │ │ │ +Definition in file _f_o_r_w_a_r_d___l_i_s_t_._h. │ │ │ │ +********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ +********** _?◆_? ____ccpppp__lliibb__lliisstt__rreemmoovvee__rreettuurrnn__ttyyppee ********** │ │ │ │ +#define __cpp_lib_list_remove_return_type │ │ │ │ +Definition at line _1_1_8_4 of file _f_o_r_w_a_r_d___l_i_s_t_._h. │ │ │ │ +********** _?◆_? __GGLLIIBBCCXXXX__FFWWDDLLIISSTT__RREEMMOOVVEE__RREETTUURRNN__TTYYPPEE__TTAAGG ********** │ │ │ │ +#define _GLIBCXX_FWDLIST_REMOVE_RETURN_TYPE_TAG │ │ │ │ +Definition at line _1_1_8_6 of file _f_o_r_w_a_r_d___l_i_s_t_._h. │ │ │ │ * _b_i_t_s │ │ │ │ - * _u_s_e_s___a_l_l_o_c_a_t_o_r___a_r_g_s_._h │ │ │ │ + * _f_o_r_w_a_r_d___l_i_s_t_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-12-base/libstdc++/user/a00368_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: uses_allocator_args.h Source File │ │ │ +libstdc++: forward_list.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -45,20 +45,20 @@ │ │ │ │ │ │
│ │ │
│ │ │ -
uses_allocator_args.h
│ │ │ +
forward_list.h
│ │ │
│ │ │
│ │ │ -Go to the documentation of this file.
1// Utility functions for uses-allocator construction -*- C++ -*-
│ │ │ +Go to the documentation of this file.
1// <forward_list.h> -*- C++ -*-
│ │ │
2
│ │ │ -
3// Copyright (C) 2019-2022 Free Software Foundation, Inc.
│ │ │ +
3// Copyright (C) 2008-2022 Free Software Foundation, Inc.
│ │ │
4//
│ │ │
5// This file is part of the GNU ISO C++ Library. This library is free
│ │ │
6// software; you can redistribute it and/or modify it under the
│ │ │
7// terms of the GNU General Public License as published by the
│ │ │
8// Free Software Foundation; either version 3, or (at your option)
│ │ │
9// any later version.
│ │ │
10
│ │ │ @@ -72,214 +72,1743 @@ │ │ │
18// 3.1, as published by the Free Software Foundation.
│ │ │
19
│ │ │
20// You should have received a copy of the GNU General Public License and
│ │ │
21// a copy of the GCC Runtime Library Exception along with this program;
│ │ │
22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
│ │ │
23// <http://www.gnu.org/licenses/>.
│ │ │
24
│ │ │ -
25/** @file include/bits/uses_allocator_args.h
│ │ │ +
25/** @file bits/forward_list.h
│ │ │
26 * This is an internal header file, included by other library headers.
│ │ │ -
27 * Do not attempt to use it directly. @headername{memory}
│ │ │ +
27 * Do not attempt to use it directly. @headername{forward_list}
│ │ │
28 */
│ │ │
29
│ │ │ -
30#ifndef _USES_ALLOCATOR_ARGS
│ │ │ -
31#define _USES_ALLOCATOR_ARGS 1
│ │ │ +
30#ifndef _FORWARD_LIST_H
│ │ │ +
31#define _FORWARD_LIST_H 1
│ │ │
32
│ │ │
33#pragma GCC system_header
│ │ │
34
│ │ │ -
35#if __cplusplus > 201703L && __cpp_concepts
│ │ │ -
36
│ │ │ -
37#include <new> // for placement operator new
│ │ │ -
38#include <tuple> // for tuple, make_tuple, make_from_tuple
│ │ │ -
39#include <bits/stl_construct.h> // construct_at
│ │ │ -
40#include <bits/stl_pair.h> // pair
│ │ │ -
41
│ │ │ -
42namespace std _GLIBCXX_VISIBILITY(default)
│ │ │ -
43{
│ │ │ -
44_GLIBCXX_BEGIN_NAMESPACE_VERSION
│ │ │ -
45
│ │ │ -
46 template<typename _Tp>
│ │ │ -
47 concept _Std_pair = __is_pair<_Tp>;
│ │ │ +
35#include <initializer_list>
│ │ │ + │ │ │ +
37#include <bits/stl_iterator.h>
│ │ │ +
38#include <bits/stl_algobase.h>
│ │ │ +
39#include <bits/stl_function.h>
│ │ │ +
40#include <bits/allocator.h>
│ │ │ +
41#include <ext/alloc_traits.h>
│ │ │ +
42#include <ext/aligned_buffer.h>
│ │ │ +
43
│ │ │ +
44namespace std _GLIBCXX_VISIBILITY(default)
│ │ │ +
45{
│ │ │ +
46_GLIBCXX_BEGIN_NAMESPACE_VERSION
│ │ │ +
47_GLIBCXX_BEGIN_NAMESPACE_CONTAINER
│ │ │
48
│ │ │ -
49/** @addtogroup allocators
│ │ │ -
50 * @{
│ │ │ -
51 */
│ │ │ -
52
│ │ │ -
53// Not specified by C++20, used internally
│ │ │ -
54#define __cpp_lib_make_obj_using_allocator 201811L
│ │ │ -
55
│ │ │ -
56 template<typename _Tp, typename _Alloc, typename... _Args>
│ │ │ -
57 constexpr auto
│ │ │ -
58 uses_allocator_construction_args(const _Alloc& __a,
│ │ │ -
59 _Args&&... __args) noexcept
│ │ │ -
60 requires (! _Std_pair<_Tp>)
│ │ │ -
61 {
│ │ │ -
62 if constexpr (uses_allocator_v<remove_cv_t<_Tp>, _Alloc>)
│ │ │ -
63 {
│ │ │ -
64 if constexpr (is_constructible_v<_Tp, allocator_arg_t,
│ │ │ -
65 const _Alloc&, _Args...>)
│ │ │ -
66 {
│ │ │ -
67 return tuple<allocator_arg_t, const _Alloc&, _Args&&...>(
│ │ │ -
68 allocator_arg, __a, std::forward<_Args>(__args)...);
│ │ │ -
69 }
│ │ │ -
70 else
│ │ │ -
71 {
│ │ │ -
72 static_assert(is_constructible_v<_Tp, _Args..., const _Alloc&>,
│ │ │ -
73 "construction with an allocator must be possible"
│ │ │ -
74 " if uses_allocator is true");
│ │ │ -
75
│ │ │ -
76 return tuple<_Args&&..., const _Alloc&>(
│ │ │ -
77 std::forward<_Args>(__args)..., __a);
│ │ │ -
78 }
│ │ │ -
79 }
│ │ │ -
80 else
│ │ │ -
81 {
│ │ │ -
82 static_assert(is_constructible_v<_Tp, _Args...>);
│ │ │ -
83
│ │ │ -
84 return tuple<_Args&&...>(std::forward<_Args>(__args)...);
│ │ │ -
85 }
│ │ │ -
86 }
│ │ │ -
87
│ │ │ -
88 template<_Std_pair _Tp, typename _Alloc, typename _Tuple1, typename _Tuple2>
│ │ │ -
89 constexpr auto
│ │ │ -
90 uses_allocator_construction_args(const _Alloc& __a, piecewise_construct_t,
│ │ │ -
91 _Tuple1&& __x, _Tuple2&& __y) noexcept;
│ │ │ -
92
│ │ │ -
93 template<_Std_pair _Tp, typename _Alloc>
│ │ │ -
94 constexpr auto
│ │ │ -
95 uses_allocator_construction_args(const _Alloc&) noexcept;
│ │ │ -
96
│ │ │ -
97 template<_Std_pair _Tp, typename _Alloc, typename _Up, typename _Vp>
│ │ │ -
98 constexpr auto
│ │ │ -
99 uses_allocator_construction_args(const _Alloc&, _Up&&, _Vp&&) noexcept;
│ │ │ -
100
│ │ │ -
101 template<_Std_pair _Tp, typename _Alloc, typename _Up, typename _Vp>
│ │ │ -
102 constexpr auto
│ │ │ -
103 uses_allocator_construction_args(const _Alloc&,
│ │ │ -
104 const pair<_Up, _Vp>&) noexcept;
│ │ │ -
105
│ │ │ -
106 template<_Std_pair _Tp, typename _Alloc, typename _Up, typename _Vp>
│ │ │ -
107 constexpr auto
│ │ │ -
108 uses_allocator_construction_args(const _Alloc&, pair<_Up, _Vp>&&) noexcept;
│ │ │ -
109
│ │ │ -
110 template<_Std_pair _Tp, typename _Alloc, typename _Tuple1, typename _Tuple2>
│ │ │ -
111 constexpr auto
│ │ │ -
112 uses_allocator_construction_args(const _Alloc& __a, piecewise_construct_t,
│ │ │ -
113 _Tuple1&& __x, _Tuple2&& __y) noexcept
│ │ │ -
114 {
│ │ │ -
115 using _Tp1 = typename _Tp::first_type;
│ │ │ -
116 using _Tp2 = typename _Tp::second_type;
│ │ │ +
49 /**
│ │ │ +
50 * @brief A helper basic node class for %forward_list.
│ │ │ +
51 * This is just a linked list with nothing inside it.
│ │ │ +
52 * There are purely list shuffling utility methods here.
│ │ │ +
53 */
│ │ │ +
│ │ │ + │ │ │ +
55 {
│ │ │ +
56 _Fwd_list_node_base() = default;
│ │ │ + │ │ │ +
58 : _M_next(__x._M_next)
│ │ │ +
59 { __x._M_next = nullptr; }
│ │ │ +
60
│ │ │ + │ │ │ +
62 _Fwd_list_node_base& operator=(const _Fwd_list_node_base&) = delete;
│ │ │ +
63
│ │ │ + │ │ │ +
65 operator=(_Fwd_list_node_base&& __x) noexcept
│ │ │ +
66 {
│ │ │ +
67 _M_next = __x._M_next;
│ │ │ +
68 __x._M_next = nullptr;
│ │ │ +
69 return *this;
│ │ │ +
70 }
│ │ │ +
71
│ │ │ +
72 _Fwd_list_node_base* _M_next = nullptr;
│ │ │ +
73
│ │ │ + │ │ │ +
75 _M_transfer_after(_Fwd_list_node_base* __begin,
│ │ │ +
76 _Fwd_list_node_base* __end) noexcept
│ │ │ +
77 {
│ │ │ +
78 _Fwd_list_node_base* __keep = __begin->_M_next;
│ │ │ +
79 if (__end)
│ │ │ +
80 {
│ │ │ +
81 __begin->_M_next = __end->_M_next;
│ │ │ +
82 __end->_M_next = _M_next;
│ │ │ +
83 }
│ │ │ +
84 else
│ │ │ +
85 __begin->_M_next = nullptr;
│ │ │ +
86 _M_next = __keep;
│ │ │ +
87 return __end;
│ │ │ +
88 }
│ │ │ +
89
│ │ │ +
90 void
│ │ │ +
91 _M_reverse_after() noexcept
│ │ │ +
92 {
│ │ │ +
93 _Fwd_list_node_base* __tail = _M_next;
│ │ │ +
94 if (!__tail)
│ │ │ +
95 return;
│ │ │ +
96 while (_Fwd_list_node_base* __temp = __tail->_M_next)
│ │ │ +
97 {
│ │ │ +
98 _Fwd_list_node_base* __keep = _M_next;
│ │ │ +
99 _M_next = __temp;
│ │ │ +
100 __tail->_M_next = __temp->_M_next;
│ │ │ +
101 _M_next->_M_next = __keep;
│ │ │ +
102 }
│ │ │ +
103 }
│ │ │ +
104 };
│ │ │ +
│ │ │ +
105
│ │ │ +
106 /**
│ │ │ +
107 * @brief A helper node class for %forward_list.
│ │ │ +
108 * This is just a linked list with uninitialized storage for a
│ │ │ +
109 * data value in each node.
│ │ │ +
110 * There is a sorting utility method.
│ │ │ +
111 */
│ │ │ +
112 template<typename _Tp>
│ │ │ +
│ │ │ + │ │ │ +
114 : public _Fwd_list_node_base
│ │ │ +
115 {
│ │ │ +
116 _Fwd_list_node() = default;
│ │ │
117
│ │ │ - │ │ │ -
119 std::apply([&__a](auto&&... __args1) {
│ │ │ - │ │ │ -
121 __a, std::forward<decltype(__args1)>(__args1)...);
│ │ │ -
122 }, std::forward<_Tuple1>(__x)),
│ │ │ -
123 std::apply([&__a](auto&&... __args2) {
│ │ │ - │ │ │ -
125 __a, std::forward<decltype(__args2)>(__args2)...);
│ │ │ -
126 }, std::forward<_Tuple2>(__y)));
│ │ │ -
127 }
│ │ │ -
128
│ │ │ -
129 template<_Std_pair _Tp, typename _Alloc>
│ │ │ -
130 constexpr auto
│ │ │ -
131 uses_allocator_construction_args(const _Alloc& __a) noexcept
│ │ │ -
132 {
│ │ │ -
133 using _Tp1 = typename _Tp::first_type;
│ │ │ -
134 using _Tp2 = typename _Tp::second_type;
│ │ │ -
135
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
139 }
│ │ │ -
140
│ │ │ -
141 template<_Std_pair _Tp, typename _Alloc, typename _Up, typename _Vp>
│ │ │ -
142 constexpr auto
│ │ │ -
143 uses_allocator_construction_args(const _Alloc& __a, _Up&& __u, _Vp&& __v)
│ │ │ -
144 noexcept
│ │ │ -
145 {
│ │ │ -
146 using _Tp1 = typename _Tp::first_type;
│ │ │ -
147 using _Tp2 = typename _Tp::second_type;
│ │ │ +
118 __gnu_cxx::__aligned_buffer<_Tp> _M_storage;
│ │ │ +
119
│ │ │ +
120 _Tp*
│ │ │ +
121 _M_valptr() noexcept
│ │ │ +
122 { return _M_storage._M_ptr(); }
│ │ │ +
123
│ │ │ +
124 const _Tp*
│ │ │ +
125 _M_valptr() const noexcept
│ │ │ +
126 { return _M_storage._M_ptr(); }
│ │ │ +
127 };
│ │ │ +
│ │ │ +
128
│ │ │ +
129 /**
│ │ │ +
130 * @brief A forward_list::iterator.
│ │ │ +
131 *
│ │ │ +
132 * All the functions are op overloads.
│ │ │ +
133 */
│ │ │ +
134 template<typename _Tp>
│ │ │ +
│ │ │ + │ │ │ +
136 {
│ │ │ + │ │ │ + │ │ │ +
139
│ │ │ +
140 typedef _Tp value_type;
│ │ │ +
141 typedef _Tp* pointer;
│ │ │ +
142 typedef _Tp& reference;
│ │ │ +
143 typedef ptrdiff_t difference_type;
│ │ │ + │ │ │ +
145
│ │ │ +
146 _Fwd_list_iterator() noexcept
│ │ │ +
147 : _M_node() { }
│ │ │
148
│ │ │ - │ │ │ - │ │ │ -
151 std::forward<_Up>(__u)),
│ │ │ - │ │ │ -
153 std::forward<_Vp>(__v)));
│ │ │ -
154 }
│ │ │ -
155
│ │ │ -
156 template<_Std_pair _Tp, typename _Alloc, typename _Up, typename _Vp>
│ │ │ -
157 constexpr auto
│ │ │ -
158 uses_allocator_construction_args(const _Alloc& __a,
│ │ │ -
159 const pair<_Up, _Vp>& __pr) noexcept
│ │ │ -
160 {
│ │ │ -
161 using _Tp1 = typename _Tp::first_type;
│ │ │ -
162 using _Tp2 = typename _Tp::second_type;
│ │ │ -
163
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
167 }
│ │ │ -
168
│ │ │ -
169 template<_Std_pair _Tp, typename _Alloc, typename _Up, typename _Vp>
│ │ │ -
170 constexpr auto
│ │ │ -
171 uses_allocator_construction_args(const _Alloc& __a,
│ │ │ -
172 pair<_Up, _Vp>&& __pr) noexcept
│ │ │ -
173 {
│ │ │ -
174 using _Tp1 = typename _Tp::first_type;
│ │ │ -
175 using _Tp2 = typename _Tp::second_type;
│ │ │ -
176
│ │ │ -
177 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ -
178 // 3527. uses_allocator_construction_args handles rvalue pairs
│ │ │ -
179 // of rvalue references incorrectly
│ │ │ - │ │ │ - │ │ │ -
182 std::get<0>(std::move(__pr))),
│ │ │ - │ │ │ -
184 std::get<1>(std::move(__pr))));
│ │ │ -
185 }
│ │ │ -
186
│ │ │ -
187 template<typename _Tp, typename _Alloc, typename... _Args>
│ │ │ -
188 constexpr _Tp
│ │ │ -
189 make_obj_using_allocator(const _Alloc& __a, _Args&&... __args)
│ │ │ -
190 {
│ │ │ - │ │ │ - │ │ │ -
193 std::forward<_Args>(__args)...));
│ │ │ -
194 }
│ │ │ +
149 explicit
│ │ │ + │ │ │ +
151 : _M_node(__n) { }
│ │ │ +
152
│ │ │ +
153 [[__nodiscard__]]
│ │ │ +
154 reference
│ │ │ +
155 operator*() const noexcept
│ │ │ +
156 { return *static_cast<_Node*>(this->_M_node)->_M_valptr(); }
│ │ │ +
157
│ │ │ +
158 [[__nodiscard__]]
│ │ │ +
159 pointer
│ │ │ +
160 operator->() const noexcept
│ │ │ +
161 { return static_cast<_Node*>(this->_M_node)->_M_valptr(); }
│ │ │ +
162
│ │ │ +
163 _Self&
│ │ │ +
164 operator++() noexcept
│ │ │ +
165 {
│ │ │ +
166 _M_node = _M_node->_M_next;
│ │ │ +
167 return *this;
│ │ │ +
168 }
│ │ │ +
169
│ │ │ +
170 _Self
│ │ │ +
171 operator++(int) noexcept
│ │ │ +
172 {
│ │ │ +
173 _Self __tmp(*this);
│ │ │ +
174 _M_node = _M_node->_M_next;
│ │ │ +
175 return __tmp;
│ │ │ +
176 }
│ │ │ +
177
│ │ │ +
178 /**
│ │ │ +
179 * @brief Forward list iterator equality comparison.
│ │ │ +
180 */
│ │ │ +
181 [[__nodiscard__]]
│ │ │ +
182 friend bool
│ │ │ +
│ │ │ +
183 operator==(const _Self& __x, const _Self& __y) noexcept
│ │ │ +
184 { return __x._M_node == __y._M_node; }
│ │ │ +
│ │ │ +
185
│ │ │ +
186#if __cpp_impl_three_way_comparison < 201907L
│ │ │ +
187 /**
│ │ │ +
188 * @brief Forward list iterator inequality comparison.
│ │ │ +
189 */
│ │ │ +
190 [[__nodiscard__]]
│ │ │ +
191 friend bool
│ │ │ +
192 operator!=(const _Self& __x, const _Self& __y) noexcept
│ │ │ +
193 { return __x._M_node != __y._M_node; }
│ │ │ +
194#endif
│ │ │
195
│ │ │ -
196 template<typename _Tp, typename _Alloc, typename... _Args>
│ │ │ -
197 constexpr _Tp*
│ │ │ -
198 uninitialized_construct_using_allocator(_Tp* __p, const _Alloc& __a,
│ │ │ -
199 _Args&&... __args)
│ │ │ -
200 {
│ │ │ -
201 return std::apply([&](auto&&... __xs) {
│ │ │ -
202 return std::construct_at(__p, std::forward<decltype(__xs)>(__xs)...);
│ │ │ - │ │ │ -
204 std::forward<_Args>(__args)...));
│ │ │ -
205 }
│ │ │ -
206/// @}
│ │ │ -
207_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ -
208} // namespace std
│ │ │ -
209#endif // C++20
│ │ │ -
210#endif // _USES_ALLOCATOR_ARGS
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
constexpr tuple< typename __decay_and_strip< _Elements >::__type... > make_tuple(_Elements &&... __args)
Create a tuple containing copies of the arguments.
Definition tuple:1592
│ │ │ -
constexpr std::remove_reference< _Tp >::type && move(_Tp &&__t) noexcept
Convert a value to an rvalue.
Definition move.h:104
│ │ │ -
constexpr piecewise_construct_t piecewise_construct
Tag for piecewise construction of std::pair objects.
Definition stl_pair.h:83
│ │ │ -
constexpr _Tp && forward(typename std::remove_reference< _Tp >::type &__t) noexcept
Forward an lvalue.
Definition move.h:77
│ │ │ +
196 _Self
│ │ │ +
197 _M_next() const noexcept
│ │ │ +
198 {
│ │ │ +
199 if (_M_node)
│ │ │ +
200 return _Fwd_list_iterator(_M_node->_M_next);
│ │ │ +
201 else
│ │ │ +
202 return _Fwd_list_iterator(nullptr);
│ │ │ +
203 }
│ │ │ +
204
│ │ │ +
205 _Fwd_list_node_base* _M_node;
│ │ │ +
206 };
│ │ │ +
│ │ │ +
207
│ │ │ +
208 /**
│ │ │ +
209 * @brief A forward_list::const_iterator.
│ │ │ +
210 *
│ │ │ +
211 * All the functions are op overloads.
│ │ │ +
212 */
│ │ │ +
213 template<typename _Tp>
│ │ │ +
│ │ │ + │ │ │ +
215 {
│ │ │ + │ │ │ +
217 typedef const _Fwd_list_node<_Tp> _Node;
│ │ │ + │ │ │ +
219
│ │ │ +
220 typedef _Tp value_type;
│ │ │ +
221 typedef const _Tp* pointer;
│ │ │ +
222 typedef const _Tp& reference;
│ │ │ +
223 typedef ptrdiff_t difference_type;
│ │ │ + │ │ │ +
225
│ │ │ +
226 _Fwd_list_const_iterator() noexcept
│ │ │ +
227 : _M_node() { }
│ │ │ +
228
│ │ │ +
229 explicit
│ │ │ + │ │ │ +
231 : _M_node(__n) { }
│ │ │ +
232
│ │ │ +
233 _Fwd_list_const_iterator(const iterator& __iter) noexcept
│ │ │ +
234 : _M_node(__iter._M_node) { }
│ │ │ +
235
│ │ │ +
236 [[__nodiscard__]]
│ │ │ +
237 reference
│ │ │ +
238 operator*() const noexcept
│ │ │ +
239 { return *static_cast<_Node*>(this->_M_node)->_M_valptr(); }
│ │ │ +
240
│ │ │ +
241 [[__nodiscard__]]
│ │ │ +
242 pointer
│ │ │ +
243 operator->() const noexcept
│ │ │ +
244 { return static_cast<_Node*>(this->_M_node)->_M_valptr(); }
│ │ │ +
245
│ │ │ +
246 _Self&
│ │ │ +
247 operator++() noexcept
│ │ │ +
248 {
│ │ │ +
249 _M_node = _M_node->_M_next;
│ │ │ +
250 return *this;
│ │ │ +
251 }
│ │ │ +
252
│ │ │ +
253 _Self
│ │ │ +
254 operator++(int) noexcept
│ │ │ +
255 {
│ │ │ +
256 _Self __tmp(*this);
│ │ │ +
257 _M_node = _M_node->_M_next;
│ │ │ +
258 return __tmp;
│ │ │ +
259 }
│ │ │ +
260
│ │ │ +
261 /**
│ │ │ +
262 * @brief Forward list const_iterator equality comparison.
│ │ │ +
263 */
│ │ │ +
264 [[__nodiscard__]]
│ │ │ +
265 friend bool
│ │ │ +
│ │ │ +
266 operator==(const _Self& __x, const _Self& __y) noexcept
│ │ │ +
267 { return __x._M_node == __y._M_node; }
│ │ │ +
│ │ │ +
268
│ │ │ +
269#if __cpp_impl_three_way_comparison < 201907L
│ │ │ +
270 /**
│ │ │ +
271 * @brief Forward list const_iterator inequality comparison.
│ │ │ +
272 */
│ │ │ +
273 [[__nodiscard__]]
│ │ │ +
274 friend bool
│ │ │ +
275 operator!=(const _Self& __x, const _Self& __y) noexcept
│ │ │ +
276 { return __x._M_node != __y._M_node; }
│ │ │ +
277#endif
│ │ │ +
278
│ │ │ +
279 _Self
│ │ │ +
280 _M_next() const noexcept
│ │ │ +
281 {
│ │ │ +
282 if (this->_M_node)
│ │ │ +
283 return _Fwd_list_const_iterator(_M_node->_M_next);
│ │ │ +
284 else
│ │ │ +
285 return _Fwd_list_const_iterator(nullptr);
│ │ │ +
286 }
│ │ │ +
287
│ │ │ +
288 const _Fwd_list_node_base* _M_node;
│ │ │ +
289 };
│ │ │ +
│ │ │ +
290
│ │ │ +
291 /**
│ │ │ +
292 * @brief Base class for %forward_list.
│ │ │ +
293 */
│ │ │ +
294 template<typename _Tp, typename _Alloc>
│ │ │ +
│ │ │ + │ │ │ +
296 {
│ │ │ +
297 protected:
│ │ │ +
298 typedef __alloc_rebind<_Alloc, _Fwd_list_node<_Tp>> _Node_alloc_type;
│ │ │ + │ │ │ +
300
│ │ │ +
301 struct _Fwd_list_impl
│ │ │ +
302 : public _Node_alloc_type
│ │ │ +
303 {
│ │ │ +
304 _Fwd_list_node_base _M_head;
│ │ │ +
305
│ │ │ +
306 _Fwd_list_impl()
│ │ │ + │ │ │ +
308 : _Node_alloc_type(), _M_head()
│ │ │ +
309 { }
│ │ │ +
310
│ │ │ +
311 _Fwd_list_impl(_Fwd_list_impl&&) = default;
│ │ │ +
312
│ │ │ +
313 _Fwd_list_impl(_Fwd_list_impl&& __fl, _Node_alloc_type&& __a)
│ │ │ +
314 : _Node_alloc_type(std::move(__a)), _M_head(std::move(__fl._M_head))
│ │ │ +
315 { }
│ │ │ +
316
│ │ │ +
317 _Fwd_list_impl(_Node_alloc_type&& __a)
│ │ │ +
318 : _Node_alloc_type(std::move(__a)), _M_head()
│ │ │ +
319 { }
│ │ │ +
320 };
│ │ │ +
321
│ │ │ +
322 _Fwd_list_impl _M_impl;
│ │ │ +
323
│ │ │ +
324 public:
│ │ │ + │ │ │ + │ │ │ + │ │ │ +
328
│ │ │ +
329 _Node_alloc_type&
│ │ │ +
330 _M_get_Node_allocator() noexcept
│ │ │ +
331 { return this->_M_impl; }
│ │ │ +
332
│ │ │ +
333 const _Node_alloc_type&
│ │ │ +
334 _M_get_Node_allocator() const noexcept
│ │ │ +
335 { return this->_M_impl; }
│ │ │ +
336
│ │ │ +
337 _Fwd_list_base() = default;
│ │ │ +
338
│ │ │ +
339 _Fwd_list_base(_Node_alloc_type&& __a)
│ │ │ +
340 : _M_impl(std::move(__a)) { }
│ │ │ +
341
│ │ │ +
342 // When allocators are always equal.
│ │ │ +
343 _Fwd_list_base(_Fwd_list_base&& __lst, _Node_alloc_type&& __a,
│ │ │ + │ │ │ +
345 : _M_impl(std::move(__lst._M_impl), std::move(__a))
│ │ │ +
346 { }
│ │ │ +
347
│ │ │ +
348 // When allocators are not always equal.
│ │ │ +
349 _Fwd_list_base(_Fwd_list_base&& __lst, _Node_alloc_type&& __a);
│ │ │ +
350
│ │ │ +
351 _Fwd_list_base(_Fwd_list_base&&) = default;
│ │ │ +
352
│ │ │ + │ │ │ +
354 { _M_erase_after(&_M_impl._M_head, nullptr); }
│ │ │ +
355
│ │ │ +
356 protected:
│ │ │ +
357 _Node*
│ │ │ +
358 _M_get_node()
│ │ │ +
359 {
│ │ │ +
360 auto __ptr = _Node_alloc_traits::allocate(_M_get_Node_allocator(), 1);
│ │ │ +
361 return std::__to_address(__ptr);
│ │ │ +
362 }
│ │ │ +
363
│ │ │ +
364 template<typename... _Args>
│ │ │ +
365 _Node*
│ │ │ +
366 _M_create_node(_Args&&... __args)
│ │ │ +
367 {
│ │ │ +
368 _Node* __node = this->_M_get_node();
│ │ │ +
369 __try
│ │ │ +
370 {
│ │ │ +
371 ::new ((void*)__node) _Node;
│ │ │ +
372 _Node_alloc_traits::construct(_M_get_Node_allocator(),
│ │ │ +
373 __node->_M_valptr(),
│ │ │ + │ │ │ +
375 }
│ │ │ +
376 __catch(...)
│ │ │ +
377 {
│ │ │ +
378 this->_M_put_node(__node);
│ │ │ +
379 __throw_exception_again;
│ │ │ +
380 }
│ │ │ +
381 return __node;
│ │ │ +
382 }
│ │ │ +
383
│ │ │ +
384 template<typename... _Args>
│ │ │ + │ │ │ +
386 _M_insert_after(const_iterator __pos, _Args&&... __args);
│ │ │ +
387
│ │ │ +
388 void
│ │ │ +
389 _M_put_node(_Node* __p)
│ │ │ +
390 {
│ │ │ +
391 typedef typename _Node_alloc_traits::pointer _Ptr;
│ │ │ + │ │ │ +
393 _Node_alloc_traits::deallocate(_M_get_Node_allocator(), __ptr, 1);
│ │ │ +
394 }
│ │ │ +
395
│ │ │ + │ │ │ +
397 _M_erase_after(_Fwd_list_node_base* __pos);
│ │ │ +
398
│ │ │ + │ │ │ +
400 _M_erase_after(_Fwd_list_node_base* __pos,
│ │ │ +
401 _Fwd_list_node_base* __last);
│ │ │ +
402 };
│ │ │ +
│ │ │ +
403
│ │ │ +
404 /**
│ │ │ +
405 * @brief A standard container with linear time access to elements,
│ │ │ +
406 * and fixed time insertion/deletion at any point in the sequence.
│ │ │ +
407 *
│ │ │ +
408 * @ingroup sequences
│ │ │ +
409 * @headerfile forward_list
│ │ │ +
410 * @since C++11
│ │ │ +
411 *
│ │ │ +
412 * @tparam _Tp Type of element.
│ │ │ +
413 * @tparam _Alloc Allocator type, defaults to allocator<_Tp>.
│ │ │ +
414 *
│ │ │ +
415 * Meets the requirements of a <a href="tables.html#65">container</a>, a
│ │ │ +
416 * <a href="tables.html#67">sequence</a>, including the
│ │ │ +
417 * <a href="tables.html#68">optional sequence requirements</a> with the
│ │ │ +
418 * %exception of @c at and @c operator[].
│ │ │ +
419 *
│ │ │ +
420 * This is a @e singly @e linked %list. Traversal up the
│ │ │ +
421 * %list requires linear time, but adding and removing elements (or
│ │ │ +
422 * @e nodes) is done in constant time, regardless of where the
│ │ │ +
423 * change takes place. Unlike std::vector and std::deque,
│ │ │ +
424 * random-access iterators are not provided, so subscripting ( @c
│ │ │ +
425 * [] ) access is not allowed. For algorithms which only need
│ │ │ +
426 * sequential access, this lack makes no difference.
│ │ │ +
427 *
│ │ │ +
428 * Also unlike the other standard containers, std::forward_list provides
│ │ │ +
429 * specialized algorithms %unique to linked lists, such as
│ │ │ +
430 * splicing, sorting, and in-place reversal.
│ │ │ +
431 */
│ │ │ +
432 template<typename _Tp, typename _Alloc = allocator<_Tp>>
│ │ │ +
│ │ │ +
433 class forward_list : private _Fwd_list_base<_Tp, _Alloc>
│ │ │ +
434 {
│ │ │ +
435 static_assert(is_same<typename remove_cv<_Tp>::type, _Tp>::value,
│ │ │ +
436 "std::forward_list must have a non-const, non-volatile value_type");
│ │ │ +
437#if __cplusplus > 201703L || defined __STRICT_ANSI__
│ │ │ + │ │ │ +
439 "std::forward_list must have the same value_type as its allocator");
│ │ │ +
440#endif
│ │ │ +
441
│ │ │ +
442 private:
│ │ │ + │ │ │ + │ │ │ +
445 typedef typename _Base::_Node _Node;
│ │ │ + │ │ │ + │ │ │ + │ │ │ +
449
│ │ │ +
450 public:
│ │ │ +
451 // types:
│ │ │ +
452 typedef _Tp value_type;
│ │ │ +
453 typedef typename _Alloc_traits::pointer pointer;
│ │ │ +
454 typedef typename _Alloc_traits::const_pointer const_pointer;
│ │ │ +
455 typedef value_type& reference;
│ │ │ +
456 typedef const value_type& const_reference;
│ │ │ +
457
│ │ │ +
458 typedef typename _Base::iterator iterator;
│ │ │ +
459 typedef typename _Base::const_iterator const_iterator;
│ │ │ +
460 typedef std::size_t size_type;
│ │ │ +
461 typedef std::ptrdiff_t difference_type;
│ │ │ +
462 typedef _Alloc allocator_type;
│ │ │ +
463
│ │ │ +
464 // 23.3.4.2 construct/copy/destroy:
│ │ │ +
465
│ │ │ +
466 /**
│ │ │ +
467 * @brief Creates a %forward_list with no elements.
│ │ │ +
468 */
│ │ │ +
469 forward_list() = default;
│ │ │ +
470
│ │ │ +
471 /**
│ │ │ +
472 * @brief Creates a %forward_list with no elements.
│ │ │ +
473 * @param __al An allocator object.
│ │ │ +
474 */
│ │ │ +
475 explicit
│ │ │ +
│ │ │ +
476 forward_list(const _Alloc& __al) noexcept
│ │ │ + │ │ │ +
478 { }
│ │ │ +
│ │ │ +
479
│ │ │ +
480 /**
│ │ │ +
481 * @brief Copy constructor with allocator argument.
│ │ │ +
482 * @param __list Input list to copy.
│ │ │ +
483 * @param __al An allocator object.
│ │ │ +
484 */
│ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ +
488 { _M_range_initialize(__list.begin(), __list.end()); }
│ │ │ +
│ │ │ +
489
│ │ │ +
490 private:
│ │ │ +
491 forward_list(forward_list&& __list, _Node_alloc_type&& __al,
│ │ │ + │ │ │ +
493 : _Base(std::move(__list), std::move(__al))
│ │ │ +
494 {
│ │ │ +
495 // If __list is not empty it means its allocator is not equal to __a,
│ │ │ +
496 // so we need to move from each element individually.
│ │ │ + │ │ │ +
498 std::__make_move_if_noexcept_iterator(__list.begin()),
│ │ │ +
499 std::__make_move_if_noexcept_iterator(__list.end()));
│ │ │ +
500 }
│ │ │ +
501
│ │ │ +
502 forward_list(forward_list&& __list, _Node_alloc_type&& __al,
│ │ │ +
503 true_type)
│ │ │ +
504 noexcept
│ │ │ +
505 : _Base(std::move(__list), _Node_alloc_type(__al), true_type{})
│ │ │ +
506 { }
│ │ │ +
507
│ │ │ +
508 public:
│ │ │ +
509 /**
│ │ │ +
510 * @brief Move constructor with allocator argument.
│ │ │ +
511 * @param __list Input list to move.
│ │ │ +
512 * @param __al An allocator object.
│ │ │ +
513 */
│ │ │ +
│ │ │ + │ │ │ + │ │ │ +
516 noexcept(_Node_alloc_traits::_S_always_equal())
│ │ │ + │ │ │ +
518 typename _Node_alloc_traits::is_always_equal{})
│ │ │ +
519 { }
│ │ │ +
│ │ │ +
520
│ │ │ +
521 /**
│ │ │ +
522 * @brief Creates a %forward_list with default constructed elements.
│ │ │ +
523 * @param __n The number of elements to initially create.
│ │ │ +
524 * @param __al An allocator object.
│ │ │ +
525 *
│ │ │ +
526 * This constructor creates the %forward_list with @a __n default
│ │ │ +
527 * constructed elements.
│ │ │ +
528 */
│ │ │ +
529 explicit
│ │ │ +
│ │ │ +
530 forward_list(size_type __n, const _Alloc& __al = _Alloc())
│ │ │ + │ │ │ +
532 { _M_default_initialize(__n); }
│ │ │ +
│ │ │ +
533
│ │ │ +
534 /**
│ │ │ +
535 * @brief Creates a %forward_list with copies of an exemplar element.
│ │ │ +
536 * @param __n The number of elements to initially create.
│ │ │ +
537 * @param __value An element to copy.
│ │ │ +
538 * @param __al An allocator object.
│ │ │ +
539 *
│ │ │ +
540 * This constructor fills the %forward_list with @a __n copies of
│ │ │ +
541 * @a __value.
│ │ │ +
542 */
│ │ │ +
│ │ │ +
543 forward_list(size_type __n, const _Tp& __value,
│ │ │ +
544 const _Alloc& __al = _Alloc())
│ │ │ + │ │ │ +
546 { _M_fill_initialize(__n, __value); }
│ │ │ +
│ │ │ +
547
│ │ │ +
548 /**
│ │ │ +
549 * @brief Builds a %forward_list from a range.
│ │ │ +
550 * @param __first An input iterator.
│ │ │ +
551 * @param __last An input iterator.
│ │ │ +
552 * @param __al An allocator object.
│ │ │ +
553 *
│ │ │ +
554 * Create a %forward_list consisting of copies of the elements from
│ │ │ +
555 * [@a __first,@a __last). This is linear in N (where N is
│ │ │ +
556 * distance(@a __first,@a __last)).
│ │ │ +
557 */
│ │ │ +
558 template<typename _InputIterator,
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
561 const _Alloc& __al = _Alloc())
│ │ │ + │ │ │ +
563 { _M_range_initialize(__first, __last); }
│ │ │ +
│ │ │ +
564
│ │ │ +
565 /**
│ │ │ +
566 * @brief The %forward_list copy constructor.
│ │ │ +
567 * @param __list A %forward_list of identical element and allocator
│ │ │ +
568 * types.
│ │ │ +
569 */
│ │ │ +
│ │ │ + │ │ │ +
571 : _Base(_Node_alloc_traits::_S_select_on_copy(
│ │ │ +
572 __list._M_get_Node_allocator()))
│ │ │ +
573 { _M_range_initialize(__list.begin(), __list.end()); }
│ │ │ +
│ │ │ +
574
│ │ │ +
575 /**
│ │ │ +
576 * @brief The %forward_list move constructor.
│ │ │ +
577 * @param __list A %forward_list of identical element and allocator
│ │ │ +
578 * types.
│ │ │ +
579 *
│ │ │ +
580 * The newly-created %forward_list contains the exact contents of the
│ │ │ +
581 * moved instance. The contents of the moved instance are a valid, but
│ │ │ +
582 * unspecified %forward_list.
│ │ │ +
583 */
│ │ │ + │ │ │ +
585
│ │ │ +
586 /**
│ │ │ +
587 * @brief Builds a %forward_list from an initializer_list
│ │ │ +
588 * @param __il An initializer_list of value_type.
│ │ │ +
589 * @param __al An allocator object.
│ │ │ +
590 *
│ │ │ +
591 * Create a %forward_list consisting of copies of the elements
│ │ │ +
592 * in the initializer_list @a __il. This is linear in __il.size().
│ │ │ +
593 */
│ │ │ +
│ │ │ + │ │ │ +
595 const _Alloc& __al = _Alloc())
│ │ │ + │ │ │ +
597 { _M_range_initialize(__il.begin(), __il.end()); }
│ │ │ +
│ │ │ +
598
│ │ │ +
599 /**
│ │ │ +
600 * @brief The forward_list dtor.
│ │ │ +
601 */
│ │ │ +
│ │ │ +
602 ~forward_list() noexcept
│ │ │ +
603 { }
│ │ │ +
│ │ │ +
604
│ │ │ +
605 /**
│ │ │ +
606 * @brief The %forward_list assignment operator.
│ │ │ +
607 * @param __list A %forward_list of identical element and allocator
│ │ │ +
608 * types.
│ │ │ +
609 *
│ │ │ +
610 * All the elements of @a __list are copied.
│ │ │ +
611 *
│ │ │ +
612 * Whether the allocator is copied depends on the allocator traits.
│ │ │ +
613 */
│ │ │ + │ │ │ + │ │ │ +
616
│ │ │ +
617 /**
│ │ │ +
618 * @brief The %forward_list move assignment operator.
│ │ │ +
619 * @param __list A %forward_list of identical element and allocator
│ │ │ +
620 * types.
│ │ │ +
621 *
│ │ │ +
622 * The contents of @a __list are moved into this %forward_list
│ │ │ +
623 * (without copying, if the allocators permit it).
│ │ │ +
624 *
│ │ │ +
625 * Afterwards @a __list is a valid, but unspecified %forward_list
│ │ │ +
626 *
│ │ │ +
627 * Whether the allocator is moved depends on the allocator traits.
│ │ │ +
628 */
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
631 noexcept(_Node_alloc_traits::_S_nothrow_move())
│ │ │ +
632 {
│ │ │ +
633 constexpr bool __move_storage =
│ │ │ +
634 _Node_alloc_traits::_S_propagate_on_move_assign()
│ │ │ +
635 || _Node_alloc_traits::_S_always_equal();
│ │ │ + │ │ │ +
637 return *this;
│ │ │ +
638 }
│ │ │ +
│ │ │ +
639
│ │ │ +
640 /**
│ │ │ +
641 * @brief The %forward_list initializer list assignment operator.
│ │ │ +
642 * @param __il An initializer_list of value_type.
│ │ │ +
643 *
│ │ │ +
644 * Replace the contents of the %forward_list with copies of the
│ │ │ +
645 * elements in the initializer_list @a __il. This is linear in
│ │ │ +
646 * __il.size().
│ │ │ +
647 */
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
650 {
│ │ │ +
651 assign(__il);
│ │ │ +
652 return *this;
│ │ │ +
653 }
│ │ │ +
│ │ │ +
654
│ │ │ +
655 /**
│ │ │ +
656 * @brief Assigns a range to a %forward_list.
│ │ │ +
657 * @param __first An input iterator.
│ │ │ +
658 * @param __last An input iterator.
│ │ │ +
659 *
│ │ │ +
660 * This function fills a %forward_list with copies of the elements
│ │ │ +
661 * in the range [@a __first,@a __last).
│ │ │ +
662 *
│ │ │ +
663 * Note that the assignment completely changes the %forward_list and
│ │ │ +
664 * that the number of elements of the resulting %forward_list is the
│ │ │ +
665 * same as the number of elements assigned.
│ │ │ +
666 */
│ │ │ +
667 template<typename _InputIterator,
│ │ │ + │ │ │ +
669 void
│ │ │ +
│ │ │ + │ │ │ +
671 {
│ │ │ +
672 typedef is_assignable<_Tp, decltype(*__first)> __assignable;
│ │ │ +
673 _M_assign(__first, __last, __assignable());
│ │ │ +
674 }
│ │ │ +
│ │ │ +
675
│ │ │ +
676 /**
│ │ │ +
677 * @brief Assigns a given value to a %forward_list.
│ │ │ +
678 * @param __n Number of elements to be assigned.
│ │ │ +
679 * @param __val Value to be assigned.
│ │ │ +
680 *
│ │ │ +
681 * This function fills a %forward_list with @a __n copies of the
│ │ │ +
682 * given value. Note that the assignment completely changes the
│ │ │ +
683 * %forward_list, and that the resulting %forward_list has __n
│ │ │ +
684 * elements.
│ │ │ +
685 */
│ │ │ +
686 void
│ │ │ +
│ │ │ +
687 assign(size_type __n, const _Tp& __val)
│ │ │ +
688 { _M_assign_n(__n, __val, is_copy_assignable<_Tp>()); }
│ │ │ +
│ │ │ +
689
│ │ │ +
690 /**
│ │ │ +
691 * @brief Assigns an initializer_list to a %forward_list.
│ │ │ +
692 * @param __il An initializer_list of value_type.
│ │ │ +
693 *
│ │ │ +
694 * Replace the contents of the %forward_list with copies of the
│ │ │ +
695 * elements in the initializer_list @a __il. This is linear in
│ │ │ +
696 * il.size().
│ │ │ +
697 */
│ │ │ +
698 void
│ │ │ +
│ │ │ + │ │ │ +
700 { assign(__il.begin(), __il.end()); }
│ │ │ +
│ │ │ +
701
│ │ │ +
702 /// Get a copy of the memory allocation object.
│ │ │ +
703 allocator_type
│ │ │ +
│ │ │ +
704 get_allocator() const noexcept
│ │ │ +
705 { return allocator_type(this->_M_get_Node_allocator()); }
│ │ │ +
│ │ │ +
706
│ │ │ +
707 // 23.3.4.3 iterators:
│ │ │ +
708
│ │ │ +
709 /**
│ │ │ +
710 * Returns a read/write iterator that points before the first element
│ │ │ +
711 * in the %forward_list. Iteration is done in ordinary element order.
│ │ │ +
712 */
│ │ │ +
713 [[__nodiscard__]]
│ │ │ + │ │ │ +
│ │ │ +
715 before_begin() noexcept
│ │ │ +
716 { return iterator(&this->_M_impl._M_head); }
│ │ │ +
│ │ │ +
717
│ │ │ +
718 /**
│ │ │ +
719 * Returns a read-only (constant) iterator that points before the
│ │ │ +
720 * first element in the %forward_list. Iteration is done in ordinary
│ │ │ +
721 * element order.
│ │ │ +
722 */
│ │ │ +
723 [[__nodiscard__]]
│ │ │ +
724 const_iterator
│ │ │ +
│ │ │ +
725 before_begin() const noexcept
│ │ │ +
726 { return const_iterator(&this->_M_impl._M_head); }
│ │ │ +
│ │ │ +
727
│ │ │ +
728 /**
│ │ │ +
729 * Returns a read/write iterator that points to the first element
│ │ │ +
730 * in the %forward_list. Iteration is done in ordinary element order.
│ │ │ +
731 */
│ │ │ +
732 [[__nodiscard__]]
│ │ │ + │ │ │ +
│ │ │ +
734 begin() noexcept
│ │ │ +
735 { return iterator(this->_M_impl._M_head._M_next); }
│ │ │ +
│ │ │ +
736
│ │ │ +
737 /**
│ │ │ +
738 * Returns a read-only (constant) iterator that points to the first
│ │ │ +
739 * element in the %forward_list. Iteration is done in ordinary
│ │ │ +
740 * element order.
│ │ │ +
741 */
│ │ │ +
742 [[__nodiscard__]]
│ │ │ +
743 const_iterator
│ │ │ +
│ │ │ +
744 begin() const noexcept
│ │ │ +
745 { return const_iterator(this->_M_impl._M_head._M_next); }
│ │ │ +
│ │ │ +
746
│ │ │ +
747 /**
│ │ │ +
748 * Returns a read/write iterator that points one past the last
│ │ │ +
749 * element in the %forward_list. Iteration is done in ordinary
│ │ │ +
750 * element order.
│ │ │ +
751 */
│ │ │ +
752 [[__nodiscard__]]
│ │ │ + │ │ │ +
│ │ │ +
754 end() noexcept
│ │ │ +
755 { return iterator(nullptr); }
│ │ │ +
│ │ │ +
756
│ │ │ +
757 /**
│ │ │ +
758 * Returns a read-only iterator that points one past the last
│ │ │ +
759 * element in the %forward_list. Iteration is done in ordinary
│ │ │ +
760 * element order.
│ │ │ +
761 */
│ │ │ +
762 [[__nodiscard__]]
│ │ │ +
763 const_iterator
│ │ │ +
│ │ │ +
764 end() const noexcept
│ │ │ +
765 { return const_iterator(nullptr); }
│ │ │ +
│ │ │ +
766
│ │ │ +
767 /**
│ │ │ +
768 * Returns a read-only (constant) iterator that points to the
│ │ │ +
769 * first element in the %forward_list. Iteration is done in ordinary
│ │ │ +
770 * element order.
│ │ │ +
771 */
│ │ │ +
772 [[__nodiscard__]]
│ │ │ +
773 const_iterator
│ │ │ +
│ │ │ +
774 cbegin() const noexcept
│ │ │ +
775 { return const_iterator(this->_M_impl._M_head._M_next); }
│ │ │ +
│ │ │ +
776
│ │ │ +
777 /**
│ │ │ +
778 * Returns a read-only (constant) iterator that points before the
│ │ │ +
779 * first element in the %forward_list. Iteration is done in ordinary
│ │ │ +
780 * element order.
│ │ │ +
781 */
│ │ │ +
782 [[__nodiscard__]]
│ │ │ +
783 const_iterator
│ │ │ +
│ │ │ +
784 cbefore_begin() const noexcept
│ │ │ +
785 { return const_iterator(&this->_M_impl._M_head); }
│ │ │ +
│ │ │ +
786
│ │ │ +
787 /**
│ │ │ +
788 * Returns a read-only (constant) iterator that points one past
│ │ │ +
789 * the last element in the %forward_list. Iteration is done in
│ │ │ +
790 * ordinary element order.
│ │ │ +
791 */
│ │ │ +
792 [[__nodiscard__]]
│ │ │ +
793 const_iterator
│ │ │ +
│ │ │ +
794 cend() const noexcept
│ │ │ +
795 { return const_iterator(nullptr); }
│ │ │ +
│ │ │ +
796
│ │ │ +
797 /**
│ │ │ +
798 * Returns true if the %forward_list is empty. (Thus begin() would
│ │ │ +
799 * equal end().)
│ │ │ +
800 */
│ │ │ +
801 [[__nodiscard__]]
│ │ │ +
802 bool
│ │ │ +
│ │ │ +
803 empty() const noexcept
│ │ │ +
804 { return this->_M_impl._M_head._M_next == nullptr; }
│ │ │ +
│ │ │ +
805
│ │ │ +
806 /**
│ │ │ +
807 * Returns the largest possible number of elements of %forward_list.
│ │ │ +
808 */
│ │ │ +
809 [[__nodiscard__]]
│ │ │ +
810 size_type
│ │ │ +
│ │ │ +
811 max_size() const noexcept
│ │ │ +
812 { return _Node_alloc_traits::max_size(this->_M_get_Node_allocator()); }
│ │ │ +
│ │ │ +
813
│ │ │ +
814 // 23.3.4.4 element access:
│ │ │ +
815
│ │ │ +
816 /**
│ │ │ +
817 * Returns a read/write reference to the data at the first
│ │ │ +
818 * element of the %forward_list.
│ │ │ +
819 */
│ │ │ +
820 [[__nodiscard__]]
│ │ │ +
821 reference
│ │ │ +
│ │ │ + │ │ │ +
823 {
│ │ │ +
824 _Node* __front = static_cast<_Node*>(this->_M_impl._M_head._M_next);
│ │ │ +
825 return *__front->_M_valptr();
│ │ │ +
826 }
│ │ │ +
│ │ │ +
827
│ │ │ +
828 /**
│ │ │ +
829 * Returns a read-only (constant) reference to the data at the first
│ │ │ +
830 * element of the %forward_list.
│ │ │ +
831 */
│ │ │ +
832 [[__nodiscard__]]
│ │ │ +
833 const_reference
│ │ │ +
│ │ │ +
834 front() const
│ │ │ +
835 {
│ │ │ +
836 _Node* __front = static_cast<_Node*>(this->_M_impl._M_head._M_next);
│ │ │ +
837 return *__front->_M_valptr();
│ │ │ +
838 }
│ │ │ +
│ │ │ +
839
│ │ │ +
840 // 23.3.4.5 modifiers:
│ │ │ +
841
│ │ │ +
842 /**
│ │ │ +
843 * @brief Constructs object in %forward_list at the front of the
│ │ │ +
844 * list.
│ │ │ +
845 * @param __args Arguments.
│ │ │ +
846 *
│ │ │ +
847 * This function will insert an object of type Tp constructed
│ │ │ +
848 * with Tp(std::forward<Args>(args)...) at the front of the list
│ │ │ +
849 * Due to the nature of a %forward_list this operation can
│ │ │ +
850 * be done in constant time, and does not invalidate iterators
│ │ │ +
851 * and references.
│ │ │ +
852 */
│ │ │ +
853 template<typename... _Args>
│ │ │ +
854#if __cplusplus > 201402L
│ │ │ +
855 reference
│ │ │ +
856#else
│ │ │ +
857 void
│ │ │ +
858#endif
│ │ │ +
│ │ │ + │ │ │ +
860 {
│ │ │ +
861 this->_M_insert_after(cbefore_begin(),
│ │ │ + │ │ │ +
863#if __cplusplus > 201402L
│ │ │ +
864 return front();
│ │ │ +
865#endif
│ │ │ +
866 }
│ │ │ +
│ │ │ +
867
│ │ │ +
868 /**
│ │ │ +
869 * @brief Add data to the front of the %forward_list.
│ │ │ +
870 * @param __val Data to be added.
│ │ │ +
871 *
│ │ │ +
872 * This is a typical stack operation. The function creates an
│ │ │ +
873 * element at the front of the %forward_list and assigns the given
│ │ │ +
874 * data to it. Due to the nature of a %forward_list this operation
│ │ │ +
875 * can be done in constant time, and does not invalidate iterators
│ │ │ +
876 * and references.
│ │ │ +
877 */
│ │ │ +
878 void
│ │ │ +
│ │ │ +
879 push_front(const _Tp& __val)
│ │ │ +
880 { this->_M_insert_after(cbefore_begin(), __val); }
│ │ │ +
│ │ │ +
881
│ │ │ +
882 /**
│ │ │ +
883 *
│ │ │ +
884 */
│ │ │ +
885 void
│ │ │ +
886 push_front(_Tp&& __val)
│ │ │ +
887 { this->_M_insert_after(cbefore_begin(), std::move(__val)); }
│ │ │ +
888
│ │ │ +
889 /**
│ │ │ +
890 * @brief Removes first element.
│ │ │ +
891 *
│ │ │ +
892 * This is a typical stack operation. It shrinks the %forward_list
│ │ │ +
893 * by one. Due to the nature of a %forward_list this operation can
│ │ │ +
894 * be done in constant time, and only invalidates iterators/references
│ │ │ +
895 * to the element being removed.
│ │ │ +
896 *
│ │ │ +
897 * Note that no data is returned, and if the first element's data
│ │ │ +
898 * is needed, it should be retrieved before pop_front() is
│ │ │ +
899 * called.
│ │ │ +
900 */
│ │ │ +
901 void
│ │ │ +
│ │ │ + │ │ │ +
903 { this->_M_erase_after(&this->_M_impl._M_head); }
│ │ │ +
│ │ │ +
904
│ │ │ +
905 /**
│ │ │ +
906 * @brief Constructs object in %forward_list after the specified
│ │ │ +
907 * iterator.
│ │ │ +
908 * @param __pos A const_iterator into the %forward_list.
│ │ │ +
909 * @param __args Arguments.
│ │ │ +
910 * @return An iterator that points to the inserted data.
│ │ │ +
911 *
│ │ │ +
912 * This function will insert an object of type T constructed
│ │ │ +
913 * with T(std::forward<Args>(args)...) after the specified
│ │ │ +
914 * location. Due to the nature of a %forward_list this operation can
│ │ │ +
915 * be done in constant time, and does not invalidate iterators
│ │ │ +
916 * and references.
│ │ │ +
917 */
│ │ │ +
918 template<typename... _Args>
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
921 { return iterator(this->_M_insert_after(__pos,
│ │ │ + │ │ │ +
│ │ │ +
923
│ │ │ +
924 /**
│ │ │ +
925 * @brief Inserts given value into %forward_list after specified
│ │ │ +
926 * iterator.
│ │ │ +
927 * @param __pos An iterator into the %forward_list.
│ │ │ +
928 * @param __val Data to be inserted.
│ │ │ +
929 * @return An iterator that points to the inserted data.
│ │ │ +
930 *
│ │ │ +
931 * This function will insert a copy of the given value after
│ │ │ +
932 * the specified location. Due to the nature of a %forward_list this
│ │ │ +
933 * operation can be done in constant time, and does not
│ │ │ +
934 * invalidate iterators and references.
│ │ │ +
935 */
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
938 { return iterator(this->_M_insert_after(__pos, __val)); }
│ │ │ +
│ │ │ +
939
│ │ │ +
940 /**
│ │ │ +
941 *
│ │ │ +
942 */
│ │ │ + │ │ │ +
944 insert_after(const_iterator __pos, _Tp&& __val)
│ │ │ +
945 { return iterator(this->_M_insert_after(__pos, std::move(__val))); }
│ │ │ +
946
│ │ │ +
947 /**
│ │ │ +
948 * @brief Inserts a number of copies of given data into the
│ │ │ +
949 * %forward_list.
│ │ │ +
950 * @param __pos An iterator into the %forward_list.
│ │ │ +
951 * @param __n Number of elements to be inserted.
│ │ │ +
952 * @param __val Data to be inserted.
│ │ │ +
953 * @return An iterator pointing to the last inserted copy of
│ │ │ +
954 * @a val or @a pos if @a n == 0.
│ │ │ +
955 *
│ │ │ +
956 * This function will insert a specified number of copies of the
│ │ │ +
957 * given data after the location specified by @a pos.
│ │ │ +
958 *
│ │ │ +
959 * This operation is linear in the number of elements inserted and
│ │ │ +
960 * does not invalidate iterators and references.
│ │ │ +
961 */
│ │ │ +
962 iterator
│ │ │ +
963 insert_after(const_iterator __pos, size_type __n, const _Tp& __val);
│ │ │ +
964
│ │ │ +
965 /**
│ │ │ +
966 * @brief Inserts a range into the %forward_list.
│ │ │ +
967 * @param __pos An iterator into the %forward_list.
│ │ │ +
968 * @param __first An input iterator.
│ │ │ +
969 * @param __last An input iterator.
│ │ │ +
970 * @return An iterator pointing to the last inserted element or
│ │ │ +
971 * @a __pos if @a __first == @a __last.
│ │ │ +
972 *
│ │ │ +
973 * This function will insert copies of the data in the range
│ │ │ +
974 * [@a __first,@a __last) into the %forward_list after the
│ │ │ +
975 * location specified by @a __pos.
│ │ │ +
976 *
│ │ │ +
977 * This operation is linear in the number of elements inserted and
│ │ │ +
978 * does not invalidate iterators and references.
│ │ │ +
979 */
│ │ │ +
980 template<typename _InputIterator,
│ │ │ + │ │ │ +
982 iterator
│ │ │ +
983 insert_after(const_iterator __pos,
│ │ │ +
984 _InputIterator __first, _InputIterator __last);
│ │ │ +
985
│ │ │ +
986 /**
│ │ │ +
987 * @brief Inserts the contents of an initializer_list into
│ │ │ +
988 * %forward_list after the specified iterator.
│ │ │ +
989 * @param __pos An iterator into the %forward_list.
│ │ │ +
990 * @param __il An initializer_list of value_type.
│ │ │ +
991 * @return An iterator pointing to the last inserted element
│ │ │ +
992 * or @a __pos if @a __il is empty.
│ │ │ +
993 *
│ │ │ +
994 * This function will insert copies of the data in the
│ │ │ +
995 * initializer_list @a __il into the %forward_list before the location
│ │ │ +
996 * specified by @a __pos.
│ │ │ +
997 *
│ │ │ +
998 * This operation is linear in the number of elements inserted and
│ │ │ +
999 * does not invalidate iterators and references.
│ │ │ +
1000 */
│ │ │ +
1001 iterator
│ │ │ +
│ │ │ + │ │ │ +
1003 { return insert_after(__pos, __il.begin(), __il.end()); }
│ │ │ +
│ │ │ +
1004
│ │ │ +
1005 /**
│ │ │ +
1006 * @brief Removes the element pointed to by the iterator following
│ │ │ +
1007 * @c pos.
│ │ │ +
1008 * @param __pos Iterator pointing before element to be erased.
│ │ │ +
1009 * @return An iterator pointing to the element following the one
│ │ │ +
1010 * that was erased, or end() if no such element exists.
│ │ │ +
1011 *
│ │ │ +
1012 * This function will erase the element at the given position and
│ │ │ +
1013 * thus shorten the %forward_list by one.
│ │ │ +
1014 *
│ │ │ +
1015 * Due to the nature of a %forward_list this operation can be done
│ │ │ +
1016 * in constant time, and only invalidates iterators/references to
│ │ │ +
1017 * the element being removed. The user is also cautioned that
│ │ │ +
1018 * this function only erases the element, and that if the element
│ │ │ +
1019 * is itself a pointer, the pointed-to memory is not touched in
│ │ │ +
1020 * any way. Managing the pointer is the user's responsibility.
│ │ │ +
1021 */
│ │ │ +
1022 iterator
│ │ │ +
│ │ │ + │ │ │ +
1024 { return iterator(this->_M_erase_after(const_cast<_Node_base*>
│ │ │ +
1025 (__pos._M_node))); }
│ │ │ +
│ │ │ +
1026
│ │ │ +
1027 /**
│ │ │ +
1028 * @brief Remove a range of elements.
│ │ │ +
1029 * @param __pos Iterator pointing before the first element to be
│ │ │ +
1030 * erased.
│ │ │ +
1031 * @param __last Iterator pointing to one past the last element to be
│ │ │ +
1032 * erased.
│ │ │ +
1033 * @return @ __last.
│ │ │ +
1034 *
│ │ │ +
1035 * This function will erase the elements in the range
│ │ │ +
1036 * @a (__pos,__last) and shorten the %forward_list accordingly.
│ │ │ +
1037 *
│ │ │ +
1038 * This operation is linear time in the size of the range and only
│ │ │ +
1039 * invalidates iterators/references to the element being removed.
│ │ │ +
1040 * The user is also cautioned that this function only erases the
│ │ │ +
1041 * elements, and that if the elements themselves are pointers, the
│ │ │ +
1042 * pointed-to memory is not touched in any way. Managing the pointer
│ │ │ +
1043 * is the user's responsibility.
│ │ │ +
1044 */
│ │ │ +
1045 iterator
│ │ │ +
│ │ │ + │ │ │ +
1047 { return iterator(this->_M_erase_after(const_cast<_Node_base*>
│ │ │ +
1048 (__pos._M_node),
│ │ │ +
1049 const_cast<_Node_base*>
│ │ │ +
1050 (__last._M_node))); }
│ │ │ +
│ │ │ +
1051
│ │ │ +
1052 /**
│ │ │ +
1053 * @brief Swaps data with another %forward_list.
│ │ │ +
1054 * @param __list A %forward_list of the same element and allocator
│ │ │ +
1055 * types.
│ │ │ +
1056 *
│ │ │ +
1057 * This exchanges the elements between two lists in constant
│ │ │ +
1058 * time. Note that the global std::swap() function is
│ │ │ +
1059 * specialized such that std::swap(l1,l2) will feed to this
│ │ │ +
1060 * function.
│ │ │ +
1061 *
│ │ │ +
1062 * Whether the allocators are swapped depends on the allocator traits.
│ │ │ +
1063 */
│ │ │ +
1064 void
│ │ │ +
│ │ │ + │ │ │ +
1066 {
│ │ │ +
1067 std::swap(this->_M_impl._M_head._M_next,
│ │ │ +
1068 __list._M_impl._M_head._M_next);
│ │ │ +
1069 _Node_alloc_traits::_S_on_swap(this->_M_get_Node_allocator(),
│ │ │ +
1070 __list._M_get_Node_allocator());
│ │ │ +
1071 }
│ │ │ +
│ │ │ +
1072
│ │ │ +
1073 /**
│ │ │ +
1074 * @brief Resizes the %forward_list to the specified number of
│ │ │ +
1075 * elements.
│ │ │ +
1076 * @param __sz Number of elements the %forward_list should contain.
│ │ │ +
1077 *
│ │ │ +
1078 * This function will %resize the %forward_list to the specified
│ │ │ +
1079 * number of elements. If the number is smaller than the
│ │ │ +
1080 * %forward_list's current number of elements the %forward_list
│ │ │ +
1081 * is truncated, otherwise the %forward_list is extended and the
│ │ │ +
1082 * new elements are default constructed.
│ │ │ +
1083 */
│ │ │ +
1084 void
│ │ │ +
1085 resize(size_type __sz);
│ │ │ +
1086
│ │ │ +
1087 /**
│ │ │ +
1088 * @brief Resizes the %forward_list to the specified number of
│ │ │ +
1089 * elements.
│ │ │ +
1090 * @param __sz Number of elements the %forward_list should contain.
│ │ │ +
1091 * @param __val Data with which new elements should be populated.
│ │ │ +
1092 *
│ │ │ +
1093 * This function will %resize the %forward_list to the specified
│ │ │ +
1094 * number of elements. If the number is smaller than the
│ │ │ +
1095 * %forward_list's current number of elements the %forward_list
│ │ │ +
1096 * is truncated, otherwise the %forward_list is extended and new
│ │ │ +
1097 * elements are populated with given data.
│ │ │ +
1098 */
│ │ │ +
1099 void
│ │ │ +
1100 resize(size_type __sz, const value_type& __val);
│ │ │ +
1101
│ │ │ +
1102 /**
│ │ │ +
1103 * @brief Erases all the elements.
│ │ │ +
1104 *
│ │ │ +
1105 * Note that this function only erases
│ │ │ +
1106 * the elements, and that if the elements themselves are
│ │ │ +
1107 * pointers, the pointed-to memory is not touched in any way.
│ │ │ +
1108 * Managing the pointer is the user's responsibility.
│ │ │ +
1109 */
│ │ │ +
1110 void
│ │ │ +
│ │ │ +
1111 clear() noexcept
│ │ │ +
1112 { this->_M_erase_after(&this->_M_impl._M_head, nullptr); }
│ │ │ +
│ │ │ +
1113
│ │ │ +
1114 // 23.3.4.6 forward_list operations:
│ │ │ +
1115
│ │ │ +
1116 /**
│ │ │ +
1117 * @brief Insert contents of another %forward_list.
│ │ │ +
1118 * @param __pos Iterator referencing the element to insert after.
│ │ │ +
1119 * @param __list Source list.
│ │ │ +
1120 *
│ │ │ +
1121 * The elements of @a list are inserted in constant time after
│ │ │ +
1122 * the element referenced by @a pos. @a list becomes an empty
│ │ │ +
1123 * list.
│ │ │ +
1124 *
│ │ │ +
1125 * Requires this != @a x.
│ │ │ +
1126 */
│ │ │ +
1127 void
│ │ │ +
│ │ │ + │ │ │ +
1129 {
│ │ │ +
1130 if (!__list.empty())
│ │ │ +
1131 _M_splice_after(__pos, __list.before_begin(), __list.end());
│ │ │ +
1132 }
│ │ │ +
│ │ │ +
1133
│ │ │ +
1134 void
│ │ │ +
1135 splice_after(const_iterator __pos, forward_list& __list) noexcept
│ │ │ + │ │ │ +
1137
│ │ │ +
1138 /**
│ │ │ +
1139 * @brief Insert element from another %forward_list.
│ │ │ +
1140 * @param __pos Iterator referencing the element to insert after.
│ │ │ +
1141 * @param __list Source list.
│ │ │ +
1142 * @param __i Iterator referencing the element before the element
│ │ │ +
1143 * to move.
│ │ │ +
1144 *
│ │ │ +
1145 * Removes the element in list @a list referenced by @a i and
│ │ │ +
1146 * inserts it into the current list after @a pos.
│ │ │ +
1147 */
│ │ │ +
1148 void
│ │ │ +
1149 splice_after(const_iterator __pos, forward_list&& __list,
│ │ │ +
1150 const_iterator __i) noexcept;
│ │ │ +
1151
│ │ │ +
1152 void
│ │ │ +
1153 splice_after(const_iterator __pos, forward_list& __list,
│ │ │ +
1154 const_iterator __i) noexcept
│ │ │ +
1155 { splice_after(__pos, std::move(__list), __i); }
│ │ │ +
1156
│ │ │ +
1157 /**
│ │ │ +
1158 * @brief Insert range from another %forward_list.
│ │ │ +
1159 * @param __pos Iterator referencing the element to insert after.
│ │ │ +
1160 * @param __list Source list.
│ │ │ +
1161 * @param __before Iterator referencing before the start of range
│ │ │ +
1162 * in list.
│ │ │ +
1163 * @param __last Iterator referencing the end of range in list.
│ │ │ +
1164 *
│ │ │ +
1165 * Removes elements in the range (__before,__last) and inserts them
│ │ │ +
1166 * after @a __pos in constant time.
│ │ │ +
1167 *
│ │ │ +
1168 * Undefined if @a __pos is in (__before,__last).
│ │ │ +
1169 * @{
│ │ │ +
1170 */
│ │ │ +
1171 void
│ │ │ +
│ │ │ + │ │ │ +
1173 const_iterator __before, const_iterator __last) noexcept
│ │ │ +
1174 { _M_splice_after(__pos, __before, __last); }
│ │ │ +
│ │ │ +
1175
│ │ │ +
1176 void
│ │ │ +
│ │ │ + │ │ │ +
1178 const_iterator __before, const_iterator __last) noexcept
│ │ │ +
1179 { _M_splice_after(__pos, __before, __last); }
│ │ │ +
│ │ │ +
1180 /// @}
│ │ │ +
1181
│ │ │ +
1182 private:
│ │ │ +
1183#if __cplusplus > 201703L
│ │ │ +
1184# define __cpp_lib_list_remove_return_type 201806L
│ │ │ +
1185 using __remove_return_type = size_type;
│ │ │ +
1186# define _GLIBCXX_FWDLIST_REMOVE_RETURN_TYPE_TAG \
│ │ │ +
1187 __attribute__((__abi_tag__("__cxx20")))
│ │ │ +
1188#else
│ │ │ +
1189 using __remove_return_type = void;
│ │ │ +
1190# define _GLIBCXX_FWDLIST_REMOVE_RETURN_TYPE_TAG
│ │ │ +
1191#endif
│ │ │ +
1192 public:
│ │ │ +
1193
│ │ │ +
1194 /**
│ │ │ +
1195 * @brief Remove all elements equal to value.
│ │ │ +
1196 * @param __val The value to remove.
│ │ │ +
1197 *
│ │ │ +
1198 * Removes every element in the list equal to @a __val.
│ │ │ +
1199 * Remaining elements stay in list order. Note that this
│ │ │ +
1200 * function only erases the elements, and that if the elements
│ │ │ +
1201 * themselves are pointers, the pointed-to memory is not
│ │ │ +
1202 * touched in any way. Managing the pointer is the user's
│ │ │ +
1203 * responsibility.
│ │ │ +
1204 */
│ │ │ +
1205 _GLIBCXX_FWDLIST_REMOVE_RETURN_TYPE_TAG
│ │ │ +
1206 __remove_return_type
│ │ │ +
1207 remove(const _Tp& __val);
│ │ │ +
1208
│ │ │ +
1209 /**
│ │ │ +
1210 * @brief Remove all elements satisfying a predicate.
│ │ │ +
1211 * @param __pred Unary predicate function or object.
│ │ │ +
1212 *
│ │ │ +
1213 * Removes every element in the list for which the predicate
│ │ │ +
1214 * returns true. Remaining elements stay in list order. Note
│ │ │ +
1215 * that this function only erases the elements, and that if the
│ │ │ +
1216 * elements themselves are pointers, the pointed-to memory is
│ │ │ +
1217 * not touched in any way. Managing the pointer is the user's
│ │ │ +
1218 * responsibility.
│ │ │ +
1219 */
│ │ │ +
1220 template<typename _Pred>
│ │ │ +
1221 __remove_return_type
│ │ │ + │ │ │ +
1223
│ │ │ +
1224 /**
│ │ │ +
1225 * @brief Remove consecutive duplicate elements.
│ │ │ +
1226 *
│ │ │ +
1227 * For each consecutive set of elements with the same value,
│ │ │ +
1228 * remove all but the first one. Remaining elements stay in
│ │ │ +
1229 * list order. Note that this function only erases the
│ │ │ +
1230 * elements, and that if the elements themselves are pointers,
│ │ │ +
1231 * the pointed-to memory is not touched in any way. Managing
│ │ │ +
1232 * the pointer is the user's responsibility.
│ │ │ +
1233 */
│ │ │ +
1234 _GLIBCXX_FWDLIST_REMOVE_RETURN_TYPE_TAG
│ │ │ +
1235 __remove_return_type
│ │ │ +
│ │ │ + │ │ │ +
1237 { return unique(std::equal_to<_Tp>()); }
│ │ │ +
│ │ │ +
1238
│ │ │ +
1239#undef _GLIBCXX_FWDLIST_REMOVE_RETURN_TYPE_TAG
│ │ │ +
1240
│ │ │ +
1241 /**
│ │ │ +
1242 * @brief Remove consecutive elements satisfying a predicate.
│ │ │ +
1243 * @param __binary_pred Binary predicate function or object.
│ │ │ +
1244 *
│ │ │ +
1245 * For each consecutive set of elements [first,last) that
│ │ │ +
1246 * satisfy predicate(first,i) where i is an iterator in
│ │ │ +
1247 * [first,last), remove all but the first one. Remaining
│ │ │ +
1248 * elements stay in list order. Note that this function only
│ │ │ +
1249 * erases the elements, and that if the elements themselves are
│ │ │ +
1250 * pointers, the pointed-to memory is not touched in any way.
│ │ │ +
1251 * Managing the pointer is the user's responsibility.
│ │ │ +
1252 */
│ │ │ +
1253 template<typename _BinPred>
│ │ │ +
1254 __remove_return_type
│ │ │ + │ │ │ +
1256
│ │ │ +
1257 /**
│ │ │ +
1258 * @brief Merge sorted lists.
│ │ │ +
1259 * @param __list Sorted list to merge.
│ │ │ +
1260 *
│ │ │ +
1261 * Assumes that both @a list and this list are sorted according to
│ │ │ +
1262 * operator<(). Merges elements of @a __list into this list in
│ │ │ +
1263 * sorted order, leaving @a __list empty when complete. Elements in
│ │ │ +
1264 * this list precede elements in @a __list that are equal.
│ │ │ +
1265 */
│ │ │ +
1266 void
│ │ │ +
│ │ │ + │ │ │ + │ │ │ +
│ │ │ +
1269
│ │ │ +
1270 void
│ │ │ + │ │ │ +
1272 { merge(std::move(__list)); }
│ │ │ +
1273
│ │ │ +
1274 /**
│ │ │ +
1275 * @brief Merge sorted lists according to comparison function.
│ │ │ +
1276 * @param __list Sorted list to merge.
│ │ │ +
1277 * @param __comp Comparison function defining sort order.
│ │ │ +
1278 *
│ │ │ +
1279 * Assumes that both @a __list and this list are sorted according to
│ │ │ +
1280 * comp. Merges elements of @a __list into this list
│ │ │ +
1281 * in sorted order, leaving @a __list empty when complete. Elements
│ │ │ +
1282 * in this list precede elements in @a __list that are equivalent
│ │ │ +
1283 * according to comp().
│ │ │ +
1284 */
│ │ │ +
1285 template<typename _Comp>
│ │ │ +
1286 void
│ │ │ +
1287 merge(forward_list&& __list, _Comp __comp);
│ │ │ +
1288
│ │ │ +
1289 template<typename _Comp>
│ │ │ +
1290 void
│ │ │ +
1291 merge(forward_list& __list, _Comp __comp)
│ │ │ +
1292 { merge(std::move(__list), __comp); }
│ │ │ +
1293
│ │ │ +
1294 /**
│ │ │ +
1295 * @brief Sort the elements of the list.
│ │ │ +
1296 *
│ │ │ +
1297 * Sorts the elements of this list in NlogN time. Equivalent
│ │ │ +
1298 * elements remain in list order.
│ │ │ +
1299 */
│ │ │ +
1300 void
│ │ │ +
│ │ │ + │ │ │ +
1302 { sort(std::less<_Tp>()); }
│ │ │ +
│ │ │ +
1303
│ │ │ +
1304 /**
│ │ │ +
1305 * @brief Sort the forward_list using a comparison function.
│ │ │ +
1306 *
│ │ │ +
1307 * Sorts the elements of this list in NlogN time. Equivalent
│ │ │ +
1308 * elements remain in list order.
│ │ │ +
1309 */
│ │ │ +
1310 template<typename _Comp>
│ │ │ +
1311 void
│ │ │ +
1312 sort(_Comp __comp);
│ │ │ +
1313
│ │ │ +
1314 /**
│ │ │ +
1315 * @brief Reverse the elements in list.
│ │ │ +
1316 *
│ │ │ +
1317 * Reverse the order of elements in the list in linear time.
│ │ │ +
1318 */
│ │ │ +
1319 void
│ │ │ +
│ │ │ +
1320 reverse() noexcept
│ │ │ +
1321 { this->_M_impl._M_head._M_reverse_after(); }
│ │ │ +
│ │ │ +
1322
│ │ │ +
1323 private:
│ │ │ +
1324 // Called by the range constructor to implement [23.3.4.2]/9
│ │ │ +
1325 template<typename _InputIterator>
│ │ │ +
1326 void
│ │ │ +
1327 _M_range_initialize(_InputIterator __first, _InputIterator __last);
│ │ │ +
1328
│ │ │ +
1329 // Called by forward_list(n,v,a), and the range constructor when it
│ │ │ +
1330 // turns out to be the same thing.
│ │ │ +
1331 void
│ │ │ +
1332 _M_fill_initialize(size_type __n, const value_type& __value);
│ │ │ +
1333
│ │ │ +
1334 // Called by splice_after and insert_after.
│ │ │ +
1335 iterator
│ │ │ +
1336 _M_splice_after(const_iterator __pos, const_iterator __before,
│ │ │ +
1337 const_iterator __last);
│ │ │ +
1338
│ │ │ +
1339 // Called by forward_list(n).
│ │ │ +
1340 void
│ │ │ +
1341 _M_default_initialize(size_type __n);
│ │ │ +
1342
│ │ │ +
1343 // Called by resize(sz).
│ │ │ +
1344 void
│ │ │ +
1345 _M_default_insert_after(const_iterator __pos, size_type __n);
│ │ │ +
1346
│ │ │ +
1347 // Called by operator=(forward_list&&)
│ │ │ +
1348 void
│ │ │ +
1349 _M_move_assign(forward_list&& __list, true_type) noexcept
│ │ │ +
1350 {
│ │ │ +
1351 clear();
│ │ │ +
1352 this->_M_impl._M_head._M_next = __list._M_impl._M_head._M_next;
│ │ │ +
1353 __list._M_impl._M_head._M_next = nullptr;
│ │ │ +
1354 std::__alloc_on_move(this->_M_get_Node_allocator(),
│ │ │ +
1355 __list._M_get_Node_allocator());
│ │ │ +
1356 }
│ │ │ +
1357
│ │ │ +
1358 // Called by operator=(forward_list&&)
│ │ │ +
1359 void
│ │ │ +
1360 _M_move_assign(forward_list&& __list, false_type)
│ │ │ +
1361 {
│ │ │ +
1362 if (__list._M_get_Node_allocator() == this->_M_get_Node_allocator())
│ │ │ +
1363 _M_move_assign(std::move(__list), true_type());
│ │ │ +
1364 else
│ │ │ +
1365 // The rvalue's allocator cannot be moved, or is not equal,
│ │ │ +
1366 // so we need to individually move each element.
│ │ │ +
1367 this->assign(std::make_move_iterator(__list.begin()),
│ │ │ +
1368 std::make_move_iterator(__list.end()));
│ │ │ +
1369 }
│ │ │ +
1370
│ │ │ +
1371 // Called by assign(_InputIterator, _InputIterator) if _Tp is
│ │ │ +
1372 // CopyAssignable.
│ │ │ +
1373 template<typename _InputIterator>
│ │ │ +
1374 void
│ │ │ +
1375 _M_assign(_InputIterator __first, _InputIterator __last, true_type)
│ │ │ +
1376 {
│ │ │ +
1377 auto __prev = before_begin();
│ │ │ +
1378 auto __curr = begin();
│ │ │ +
1379 auto __end = end();
│ │ │ +
1380 while (__curr != __end && __first != __last)
│ │ │ +
1381 {
│ │ │ +
1382 *__curr = *__first;
│ │ │ +
1383 ++__prev;
│ │ │ +
1384 ++__curr;
│ │ │ +
1385 ++__first;
│ │ │ +
1386 }
│ │ │ +
1387 if (__first != __last)
│ │ │ +
1388 insert_after(__prev, __first, __last);
│ │ │ +
1389 else if (__curr != __end)
│ │ │ +
1390 erase_after(__prev, __end);
│ │ │ +
1391 }
│ │ │ +
1392
│ │ │ +
1393 // Called by assign(_InputIterator, _InputIterator) if _Tp is not
│ │ │ +
1394 // CopyAssignable.
│ │ │ +
1395 template<typename _InputIterator>
│ │ │ +
1396 void
│ │ │ +
1397 _M_assign(_InputIterator __first, _InputIterator __last, false_type)
│ │ │ +
1398 {
│ │ │ +
1399 clear();
│ │ │ +
1400 insert_after(cbefore_begin(), __first, __last);
│ │ │ +
1401 }
│ │ │ +
1402
│ │ │ +
1403 // Called by assign(size_type, const _Tp&) if Tp is CopyAssignable
│ │ │ +
1404 void
│ │ │ +
1405 _M_assign_n(size_type __n, const _Tp& __val, true_type)
│ │ │ +
1406 {
│ │ │ +
1407 auto __prev = before_begin();
│ │ │ +
1408 auto __curr = begin();
│ │ │ +
1409 auto __end = end();
│ │ │ +
1410 while (__curr != __end && __n > 0)
│ │ │ +
1411 {
│ │ │ +
1412 *__curr = __val;
│ │ │ +
1413 ++__prev;
│ │ │ +
1414 ++__curr;
│ │ │ +
1415 --__n;
│ │ │ +
1416 }
│ │ │ +
1417 if (__n > 0)
│ │ │ +
1418 insert_after(__prev, __n, __val);
│ │ │ +
1419 else if (__curr != __end)
│ │ │ +
1420 erase_after(__prev, __end);
│ │ │ +
1421 }
│ │ │ +
1422
│ │ │ +
1423 // Called by assign(size_type, const _Tp&) if Tp is non-CopyAssignable
│ │ │ +
1424 void
│ │ │ +
1425 _M_assign_n(size_type __n, const _Tp& __val, false_type)
│ │ │ +
1426 {
│ │ │ +
1427 clear();
│ │ │ +
1428 insert_after(cbefore_begin(), __n, __val);
│ │ │ +
1429 }
│ │ │ +
1430 };
│ │ │ +
│ │ │ +
1431
│ │ │ +
1432#if __cpp_deduction_guides >= 201606
│ │ │ +
1433 template<typename _InputIterator, typename _ValT
│ │ │ +
1434 = typename iterator_traits<_InputIterator>::value_type,
│ │ │ +
1435 typename _Allocator = allocator<_ValT>,
│ │ │ +
1436 typename = _RequireInputIter<_InputIterator>,
│ │ │ +
1437 typename = _RequireAllocator<_Allocator>>
│ │ │ +
1438 forward_list(_InputIterator, _InputIterator, _Allocator = _Allocator())
│ │ │ +
1439 -> forward_list<_ValT, _Allocator>;
│ │ │ +
1440#endif
│ │ │ +
1441
│ │ │ +
1442 /**
│ │ │ +
1443 * @brief Forward list equality comparison.
│ │ │ +
1444 * @param __lx A %forward_list
│ │ │ +
1445 * @param __ly A %forward_list of the same type as @a __lx.
│ │ │ +
1446 * @return True iff the elements of the forward lists are equal.
│ │ │ +
1447 *
│ │ │ +
1448 * This is an equivalence relation. It is linear in the number of
│ │ │ +
1449 * elements of the forward lists. Deques are considered equivalent
│ │ │ +
1450 * if corresponding elements compare equal.
│ │ │ +
1451 */
│ │ │ +
1452 template<typename _Tp, typename _Alloc>
│ │ │ +
1453 [[__nodiscard__]]
│ │ │ +
1454 bool
│ │ │ +
1455 operator==(const forward_list<_Tp, _Alloc>& __lx,
│ │ │ +
1456 const forward_list<_Tp, _Alloc>& __ly);
│ │ │ +
1457
│ │ │ +
1458#if __cpp_lib_three_way_comparison
│ │ │ +
1459 /**
│ │ │ +
1460 * @brief Forward list ordering relation.
│ │ │ +
1461 * @param __x A `forward_list`.
│ │ │ +
1462 * @param __y A `forward_list` of the same type as `__x`.
│ │ │ +
1463 * @return A value indicating whether `__x` is less than, equal to,
│ │ │ +
1464 * greater than, or incomparable with `__y`.
│ │ │ +
1465 *
│ │ │ +
1466 * See `std::lexicographical_compare_three_way()` for how the determination
│ │ │ +
1467 * is made. This operator is used to synthesize relational operators like
│ │ │ +
1468 * `<` and `>=` etc.
│ │ │ +
1469 */
│ │ │ +
1470 template<typename _Tp, typename _Alloc>
│ │ │ +
1471 [[nodiscard]]
│ │ │ +
1472 inline __detail::__synth3way_t<_Tp>
│ │ │ +
1473 operator<=>(const forward_list<_Tp, _Alloc>& __x,
│ │ │ +
1474 const forward_list<_Tp, _Alloc>& __y)
│ │ │ +
1475 {
│ │ │ +
1476 return std::lexicographical_compare_three_way(__x.begin(), __x.end(),
│ │ │ +
1477 __y.begin(), __y.end(),
│ │ │ +
1478 __detail::__synth3way);
│ │ │ +
1479 }
│ │ │ +
1480#else
│ │ │ +
1481 /**
│ │ │ +
1482 * @brief Forward list ordering relation.
│ │ │ +
1483 * @param __lx A %forward_list.
│ │ │ +
1484 * @param __ly A %forward_list of the same type as @a __lx.
│ │ │ +
1485 * @return True iff @a __lx is lexicographically less than @a __ly.
│ │ │ +
1486 *
│ │ │ +
1487 * This is a total ordering relation. It is linear in the number of
│ │ │ +
1488 * elements of the forward lists. The elements must be comparable
│ │ │ +
1489 * with @c <.
│ │ │ +
1490 *
│ │ │ +
1491 * See std::lexicographical_compare() for how the determination is made.
│ │ │ +
1492 */
│ │ │ +
1493 template<typename _Tp, typename _Alloc>
│ │ │ +
1494 [[__nodiscard__]]
│ │ │ +
│ │ │ +
1495 inline bool
│ │ │ +
1496 operator<(const forward_list<_Tp, _Alloc>& __lx,
│ │ │ + │ │ │ +
1498 { return std::lexicographical_compare(__lx.cbegin(), __lx.cend(),
│ │ │ +
1499 __ly.cbegin(), __ly.cend()); }
│ │ │ +
│ │ │ +
1500
│ │ │ +
1501 /// Based on operator==
│ │ │ +
1502 template<typename _Tp, typename _Alloc>
│ │ │ +
1503 [[__nodiscard__]]
│ │ │ +
1504 inline bool
│ │ │ +
│ │ │ + │ │ │ + │ │ │ +
1507 { return !(__lx == __ly); }
│ │ │ +
│ │ │ +
1508
│ │ │ +
1509 /// Based on operator<
│ │ │ +
1510 template<typename _Tp, typename _Alloc>
│ │ │ +
1511 [[__nodiscard__]]
│ │ │ +
1512 inline bool
│ │ │ +
│ │ │ + │ │ │ + │ │ │ +
1515 { return (__ly < __lx); }
│ │ │ +
│ │ │ +
1516
│ │ │ +
1517 /// Based on operator<
│ │ │ +
1518 template<typename _Tp, typename _Alloc>
│ │ │ +
1519 [[__nodiscard__]]
│ │ │ +
1520 inline bool
│ │ │ +
│ │ │ + │ │ │ + │ │ │ +
1523 { return !(__lx < __ly); }
│ │ │ +
│ │ │ +
1524
│ │ │ +
1525 /// Based on operator<
│ │ │ +
1526 template<typename _Tp, typename _Alloc>
│ │ │ +
1527 [[__nodiscard__]]
│ │ │ +
│ │ │ +
1528 inline bool
│ │ │ +
1529 operator<=(const forward_list<_Tp, _Alloc>& __lx,
│ │ │ + │ │ │ +
1531 { return !(__ly < __lx); }
│ │ │ +
│ │ │ +
1532#endif // three-way comparison
│ │ │ +
1533
│ │ │ +
1534 /// See std::forward_list::swap().
│ │ │ +
1535 template<typename _Tp, typename _Alloc>
│ │ │ +
1536 inline void
│ │ │ +
│ │ │ + │ │ │ + │ │ │ +
1539 noexcept(noexcept(__lx.swap(__ly)))
│ │ │ +
1540 { __lx.swap(__ly); }
│ │ │ +
│ │ │ +
1541
│ │ │ +
1542_GLIBCXX_END_NAMESPACE_CONTAINER
│ │ │ +
1543_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ +
1544} // namespace std
│ │ │ +
1545
│ │ │ +
1546#endif // _FORWARD_LIST_H
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
integral_constant< bool, true > true_type
The type used as a compile-time boolean with true value.
Definition type_traits:82
│ │ │ +
integral_constant< bool, false > false_type
The type used as a compile-time boolean with false value.
Definition type_traits:85
│ │ │ +
constexpr std::remove_reference< _Tp >::type && move(_Tp &&__t) noexcept
Convert a value to an rvalue.
Definition move.h:104
│ │ │ +
void swap(any &__x, any &__y) noexcept
Exchange the states of two any objects.
Definition any:429
│ │ │
ISO C++ entities toplevel namespace is std.
│ │ │ - │ │ │ +
integral_constant
Definition type_traits:63
│ │ │ + │ │ │ +
is_nothrow_default_constructible
Definition type_traits:1058
│ │ │ +
is_assignable
Definition type_traits:1113
│ │ │ +
A helper basic node class for forward_list. This is just a linked list with nothing inside it....
│ │ │ +
A helper node class for forward_list. This is just a linked list with uninitialized storage for a dat...
│ │ │ +
A forward_list::iterator.
│ │ │ +
friend bool operator==(const _Self &__x, const _Self &__y) noexcept
Forward list iterator equality comparison.
│ │ │ +
A forward_list::const_iterator.
│ │ │ +
friend bool operator==(const _Self &__x, const _Self &__y) noexcept
Forward list const_iterator equality comparison.
│ │ │ +
Base class for forward_list.
│ │ │ +
A standard container with linear time access to elements, and fixed time insertion/deletion at any po...
│ │ │ +
__remove_return_type unique(_BinPred __binary_pred)
Remove consecutive elements satisfying a predicate.
│ │ │ +
iterator begin() noexcept
│ │ │ +
const_iterator before_begin() const noexcept
│ │ │ +
void reverse() noexcept
Reverse the elements in list.
│ │ │ +
forward_list()=default
Creates a forward_list with no elements.
│ │ │ +
~forward_list() noexcept
The forward_list dtor.
│ │ │ +
iterator erase_after(const_iterator __pos)
Removes the element pointed to by the iterator following pos.
│ │ │ +
void swap(forward_list &__list) noexcept
Swaps data with another forward_list.
│ │ │ +
const_reference front() const
│ │ │ +
void merge(forward_list &&__list)
Merge sorted lists.
│ │ │ +
forward_list(const _Alloc &__al) noexcept
Creates a forward_list with no elements.
│ │ │ +
void sort()
Sort the elements of the list.
│ │ │ +
iterator before_begin() noexcept
│ │ │ +
forward_list(const forward_list &__list, const __type_identity_t< _Alloc > &__al)
Copy constructor with allocator argument.
│ │ │ +
iterator emplace_after(const_iterator __pos, _Args &&... __args)
Constructs object in forward_list after the specified iterator.
│ │ │ +
forward_list(const forward_list &__list)
The forward_list copy constructor.
│ │ │ +
iterator insert_after(const_iterator __pos, const _Tp &__val)
Inserts given value into forward_list after specified iterator.
│ │ │ +
forward_list & operator=(forward_list &&__list) noexcept(_Node_alloc_traits::_S_nothrow_move())
The forward_list move assignment operator.
│ │ │ +
void resize(size_type __sz)
Resizes the forward_list to the specified number of elements.
│ │ │ +
forward_list & operator=(const forward_list &__list)
The forward_list assignment operator.
│ │ │ +
__remove_return_type remove_if(_Pred __pred)
Remove all elements satisfying a predicate.
│ │ │ +
iterator end() noexcept
│ │ │ +
forward_list(size_type __n, const _Tp &__value, const _Alloc &__al=_Alloc())
Creates a forward_list with copies of an exemplar element.
│ │ │ +
void assign(size_type __n, const _Tp &__val)
Assigns a given value to a forward_list.
│ │ │ +
const_iterator begin() const noexcept
│ │ │ +
void splice_after(const_iterator __pos, forward_list &&__list) noexcept
Insert contents of another forward_list.
│ │ │ +
const_iterator cbefore_begin() const noexcept
│ │ │ +
forward_list & operator=(std::initializer_list< _Tp > __il)
The forward_list initializer list assignment operator.
│ │ │ +
forward_list(std::initializer_list< _Tp > __il, const _Alloc &__al=_Alloc())
Builds a forward_list from an initializer_list.
│ │ │ +
reference emplace_front(_Args &&... __args)
Constructs object in forward_list at the front of the list.
│ │ │ +
forward_list(size_type __n, const _Alloc &__al=_Alloc())
Creates a forward_list with default constructed elements.
│ │ │ +
iterator insert_after(const_iterator __pos, std::initializer_list< _Tp > __il)
Inserts the contents of an initializer_list into forward_list after the specified iterator.
│ │ │ +
const_iterator end() const noexcept
│ │ │ +
void splice_after(const_iterator __pos, forward_list &&, const_iterator __before, const_iterator __last) noexcept
Insert range from another forward_list.
│ │ │ +
reference front()
│ │ │ +
forward_list(forward_list &&__list, const __type_identity_t< _Alloc > &__al) noexcept(_Node_alloc_traits::_S_always_equal())
Move constructor with allocator argument.
│ │ │ +
iterator erase_after(const_iterator __pos, const_iterator __last)
Remove a range of elements.
│ │ │ +
__remove_return_type unique()
Remove consecutive duplicate elements.
│ │ │ +
void clear() noexcept
Erases all the elements.
│ │ │ +
__remove_return_type remove(const _Tp &__val)
Remove all elements equal to value.
│ │ │ +
const_iterator cend() const noexcept
│ │ │ +
void assign(_InputIterator __first, _InputIterator __last)
Assigns a range to a forward_list.
│ │ │ +
bool empty() const noexcept
│ │ │ +
allocator_type get_allocator() const noexcept
Get a copy of the memory allocation object.
│ │ │ +
void push_front(const _Tp &__val)
Add data to the front of the forward_list.
│ │ │ +
forward_list(forward_list &&)=default
The forward_list move constructor.
│ │ │ +
forward_list(_InputIterator __first, _InputIterator __last, const _Alloc &__al=_Alloc())
Builds a forward_list from a range.
│ │ │ +
void splice_after(const_iterator __pos, forward_list &, const_iterator __before, const_iterator __last) noexcept
Insert range from another forward_list.
│ │ │ +
const_iterator cbegin() const noexcept
│ │ │ +
void pop_front()
Removes first element.
│ │ │ +
void assign(std::initializer_list< _Tp > __il)
Assigns an initializer_list to a forward_list.
│ │ │ +
size_type max_size() const noexcept
│ │ │ +
Uniform interface to all pointer-like types.
Definition ptr_traits.h:182
│ │ │ +
Forward iterators support a superset of input iterator operations.
│ │ │ +
Common iterator class.
│ │ │ + │ │ │ +
Uniform interface to C++98 and C++11 allocators.
│ │ │ +
static constexpr pointer allocate(_Alloc &__a, size_type __n)
Allocate memory.
│ │ │ +
static constexpr void deallocate(_Alloc &__a, pointer __p, size_type __n)
Deallocate memory.
│ │ │ +
static constexpr size_type max_size(const _Alloc &__a) noexcept
The maximum supported allocation size.
│ │ │ + │ │ │ + │ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,13 +1,13 @@ │ │ │ │ libstdc++ │ │ │ │ -uses_allocator_args.h │ │ │ │ +forward_list.h │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -1// Utility functions for uses-allocator construction -*- C++ -*- │ │ │ │ +1// -*- C++ -*- │ │ │ │ 2 │ │ │ │ -3// Copyright (C) 2019-2022 Free Software Foundation, Inc. │ │ │ │ +3// Copyright (C) 2008-2022 Free Software Foundation, Inc. │ │ │ │ 4// │ │ │ │ 5// This file is part of the GNU ISO C++ Library. This library is free │ │ │ │ 6// software; you can redistribute it and/or modify it under the │ │ │ │ 7// terms of the GNU General Public License as published by the │ │ │ │ 8// Free Software Foundation; either version 3, or (at your option) │ │ │ │ 9// any later version. │ │ │ │ 10 │ │ │ │ @@ -21,223 +21,1823 @@ │ │ │ │ 18// 3.1, as published by the Free Software Foundation. │ │ │ │ 19 │ │ │ │ 20// You should have received a copy of the GNU General Public License and │ │ │ │ 21// a copy of the GCC Runtime Library Exception along with this program; │ │ │ │ 22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see │ │ │ │ 23// . │ │ │ │ 24 │ │ │ │ -25/** @file include/bits/uses_allocator_args.h │ │ │ │ +25/** @file bits/forward_list.h │ │ │ │ 26 * This is an internal header file, included by other library headers. │ │ │ │ -27 * Do not attempt to use it directly. @headername{memory} │ │ │ │ +27 * Do not attempt to use it directly. @headername{forward_list} │ │ │ │ 28 */ │ │ │ │ 29 │ │ │ │ -30#ifndef _USES_ALLOCATOR_ARGS │ │ │ │ -31#define _USES_ALLOCATOR_ARGS 1 │ │ │ │ +30#ifndef _FORWARD_LIST_H │ │ │ │ +31#define _FORWARD_LIST_H 1 │ │ │ │ 32 │ │ │ │ 33#pragma GCC system_header │ │ │ │ 34 │ │ │ │ -35#if __cplusplus > 201703L && __cpp_concepts │ │ │ │ -36 │ │ │ │ -37#include <_n_e_w> // for placement operator new │ │ │ │ -38#include <_t_u_p_l_e> // for tuple, make_tuple, make_from_tuple │ │ │ │ -39#include <_b_i_t_s_/_s_t_l___c_o_n_s_t_r_u_c_t_._h> // construct_at │ │ │ │ -40#include <_b_i_t_s_/_s_t_l___p_a_i_r_._h> // pair │ │ │ │ -41 │ │ │ │ -42namespace _s_t_d _GLIBCXX_VISIBILITY(default) │ │ │ │ -43{ │ │ │ │ -44_GLIBCXX_BEGIN_NAMESPACE_VERSION │ │ │ │ -45 │ │ │ │ -46 template │ │ │ │ -47 concept _Std_pair = __is_pair<_Tp>; │ │ │ │ +35#include <_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t> │ │ │ │ +36#include <_b_i_t_s_/_s_t_l___i_t_e_r_a_t_o_r___b_a_s_e___t_y_p_e_s_._h> │ │ │ │ +37#include <_b_i_t_s_/_s_t_l___i_t_e_r_a_t_o_r_._h> │ │ │ │ +38#include <_b_i_t_s_/_s_t_l___a_l_g_o_b_a_s_e_._h> │ │ │ │ +39#include <_b_i_t_s_/_s_t_l___f_u_n_c_t_i_o_n_._h> │ │ │ │ +40#include <_b_i_t_s_/_a_l_l_o_c_a_t_o_r_._h> │ │ │ │ +41#include <_e_x_t_/_a_l_l_o_c___t_r_a_i_t_s_._h> │ │ │ │ +42#include <_e_x_t_/_a_l_i_g_n_e_d___b_u_f_f_e_r_._h> │ │ │ │ +43 │ │ │ │ +44namespace _s_t_d _GLIBCXX_VISIBILITY(default) │ │ │ │ +45{ │ │ │ │ +46_GLIBCXX_BEGIN_NAMESPACE_VERSION │ │ │ │ +47_GLIBCXX_BEGIN_NAMESPACE_CONTAINER │ │ │ │ 48 │ │ │ │ -49/** @addtogroup allocators │ │ │ │ -50 * @{ │ │ │ │ -51 */ │ │ │ │ -52 │ │ │ │ -53// Not specified by C++20, used internally │ │ │ │ -54#define __cpp_lib_make_obj_using_allocator 201811L │ │ │ │ -55 │ │ │ │ -56 template │ │ │ │ -57 constexpr auto │ │ │ │ -58 uses_allocator_construction_args(const _Alloc& __a, │ │ │ │ -59 _Args&&... __args) noexcept │ │ │ │ -60 requires (! _Std_pair<_Tp>) │ │ │ │ -61 { │ │ │ │ -62 if constexpr (uses_allocator_v, _Alloc>) │ │ │ │ -63 { │ │ │ │ -64 if constexpr (is_constructible_v<_Tp, allocator_arg_t, │ │ │ │ -65 const _Alloc&, _Args...>) │ │ │ │ +49 /** │ │ │ │ +50 * @brief A helper basic node class for %forward_list. │ │ │ │ +51 * This is just a linked list with nothing inside it. │ │ │ │ +52 * There are purely list shuffling utility methods here. │ │ │ │ +53 */ │ │ │ │ +_5_4 struct ___F_w_d___l_i_s_t___n_o_d_e___b_a_s_e │ │ │ │ +55 { │ │ │ │ +56 ___F_w_d___l_i_s_t___n_o_d_e___b_a_s_e() = default; │ │ │ │ +57 ___F_w_d___l_i_s_t___n_o_d_e___b_a_s_e(___F_w_d___l_i_s_t___n_o_d_e___b_a_s_e&& __x) noexcept │ │ │ │ +58 : _M_next(__x._M_next) │ │ │ │ +59 { __x._M_next = nullptr; } │ │ │ │ +60 │ │ │ │ +61 ___F_w_d___l_i_s_t___n_o_d_e___b_a_s_e(const ___F_w_d___l_i_s_t___n_o_d_e___b_a_s_e&) = delete; │ │ │ │ +62 ___F_w_d___l_i_s_t___n_o_d_e___b_a_s_e& operator=(const ___F_w_d___l_i_s_t___n_o_d_e___b_a_s_e&) = delete; │ │ │ │ +63 │ │ │ │ +64 ___F_w_d___l_i_s_t___n_o_d_e___b_a_s_e& │ │ │ │ +65 operator=(___F_w_d___l_i_s_t___n_o_d_e___b_a_s_e&& __x) noexcept │ │ │ │ 66 { │ │ │ │ -67 return tuple( │ │ │ │ -68 allocator_arg, __a, _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(__args)...); │ │ │ │ -69 } │ │ │ │ -70 else │ │ │ │ -71 { │ │ │ │ -72 static_assert(is_constructible_v<_Tp, _Args..., const _Alloc&>, │ │ │ │ -73 "construction with an allocator must be possible" │ │ │ │ -74 " if uses_allocator is true"); │ │ │ │ -75 │ │ │ │ -76 return tuple<_Args&&..., const _Alloc&>( │ │ │ │ -77 _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(__args)..., __a); │ │ │ │ -78 } │ │ │ │ -79 } │ │ │ │ -80 else │ │ │ │ -81 { │ │ │ │ -82 static_assert(is_constructible_v<_Tp, _Args...>); │ │ │ │ -83 │ │ │ │ -84 return tuple<_Args&&...>(_s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(__args)...); │ │ │ │ -85 } │ │ │ │ -86 } │ │ │ │ -87 │ │ │ │ -88 template<_Std_pair _Tp, typename _Alloc, typename _Tuple1, typename _Tuple2> │ │ │ │ -89 constexpr auto │ │ │ │ -90 uses_allocator_construction_args(const _Alloc& __a, piecewise_construct_t, │ │ │ │ -91 _Tuple1&& __x, _Tuple2&& __y) noexcept; │ │ │ │ -92 │ │ │ │ -93 template<_Std_pair _Tp, typename _Alloc> │ │ │ │ -94 constexpr auto │ │ │ │ -95 uses_allocator_construction_args(const _Alloc&) noexcept; │ │ │ │ -96 │ │ │ │ -97 template<_Std_pair _Tp, typename _Alloc, typename _Up, typename _Vp> │ │ │ │ -98 constexpr auto │ │ │ │ -99 uses_allocator_construction_args(const _Alloc&, _Up&&, _Vp&&) noexcept; │ │ │ │ -100 │ │ │ │ -101 template<_Std_pair _Tp, typename _Alloc, typename _Up, typename _Vp> │ │ │ │ -102 constexpr auto │ │ │ │ -103 uses_allocator_construction_args(const _Alloc&, │ │ │ │ -104 const pair<_Up, _Vp>&) noexcept; │ │ │ │ +67 _M_next = __x._M_next; │ │ │ │ +68 __x._M_next = nullptr; │ │ │ │ +69 return *this; │ │ │ │ +70 } │ │ │ │ +71 │ │ │ │ +72 ___F_w_d___l_i_s_t___n_o_d_e___b_a_s_e* _M_next = nullptr; │ │ │ │ +73 │ │ │ │ +74 ___F_w_d___l_i_s_t___n_o_d_e___b_a_s_e* │ │ │ │ +75 _M_transfer_after(___F_w_d___l_i_s_t___n_o_d_e___b_a_s_e* __begin, │ │ │ │ +76 ___F_w_d___l_i_s_t___n_o_d_e___b_a_s_e* __end) noexcept │ │ │ │ +77 { │ │ │ │ +78 ___F_w_d___l_i_s_t___n_o_d_e___b_a_s_e* _____k_e_e_p = __begin->_M_next; │ │ │ │ +79 if (__end) │ │ │ │ +80 { │ │ │ │ +81 __begin->_M_next = __end->_M_next; │ │ │ │ +82 __end->_M_next = _M_next; │ │ │ │ +83 } │ │ │ │ +84 else │ │ │ │ +85 __begin->_M_next = nullptr; │ │ │ │ +86 _M_next = _____k_e_e_p; │ │ │ │ +87 return __end; │ │ │ │ +88 } │ │ │ │ +89 │ │ │ │ +90 void │ │ │ │ +91 _M_reverse_after() noexcept │ │ │ │ +92 { │ │ │ │ +93 ___F_w_d___l_i_s_t___n_o_d_e___b_a_s_e* _____t_a_i_l = _M_next; │ │ │ │ +94 if (!_____t_a_i_l) │ │ │ │ +95 return; │ │ │ │ +96 while (___F_w_d___l_i_s_t___n_o_d_e___b_a_s_e* _____t_e_m_p = _____t_a_i_l->_M_next) │ │ │ │ +97 { │ │ │ │ +98 ___F_w_d___l_i_s_t___n_o_d_e___b_a_s_e* _____k_e_e_p = _M_next; │ │ │ │ +99 _M_next = _____t_e_m_p; │ │ │ │ +100 _____t_a_i_l->_M_next = _____t_e_m_p->_M_next; │ │ │ │ +101 _M_next->_M_next = _____k_e_e_p; │ │ │ │ +102 } │ │ │ │ +103 } │ │ │ │ +104 }; │ │ │ │ 105 │ │ │ │ -106 template<_Std_pair _Tp, typename _Alloc, typename _Up, typename _Vp> │ │ │ │ -107 constexpr auto │ │ │ │ -108 uses_allocator_construction_args(const _Alloc&, pair<_Up, _Vp>&&) noexcept; │ │ │ │ -109 │ │ │ │ -110 template<_Std_pair _Tp, typename _Alloc, typename _Tuple1, typename │ │ │ │ -_Tuple2> │ │ │ │ -111 constexpr auto │ │ │ │ -112 uses_allocator_construction_args(const _Alloc& __a, piecewise_construct_t, │ │ │ │ -113 _Tuple1&& __x, _Tuple2&& __y) noexcept │ │ │ │ -114 { │ │ │ │ -115 using _Tp1 = typename _Tp::first_type; │ │ │ │ -116 using _Tp2 = typename _Tp::second_type; │ │ │ │ +106 /** │ │ │ │ +107 * @brief A helper node class for %forward_list. │ │ │ │ +108 * This is just a linked list with uninitialized storage for a │ │ │ │ +109 * data value in each node. │ │ │ │ +110 * There is a sorting utility method. │ │ │ │ +111 */ │ │ │ │ +112 template │ │ │ │ +_1_1_3 struct ___F_w_d___l_i_s_t___n_o_d_e │ │ │ │ +114 : public ___F_w_d___l_i_s_t___n_o_d_e___b_a_s_e │ │ │ │ +115 { │ │ │ │ +116 ___F_w_d___l_i_s_t___n_o_d_e() = default; │ │ │ │ 117 │ │ │ │ -118 return _s_t_d_:_:_m_a_k_e___t_u_p_l_e(_p_i_e_c_e_w_i_s_e___c_o_n_s_t_r_u_c_t, │ │ │ │ -119 std::apply([&__a](auto&&... __args1) { │ │ │ │ -120 return _s_t_d_:_:_u_s_e_s___a_l_l_o_c_a_t_o_r___c_o_n_s_t_r_u_c_t_i_o_n___a_r_g_s_<___T_p_1_>( │ │ │ │ -121 __a, _s_t_d_:_:_f_o_r_w_a_r_d(__args1)...); │ │ │ │ -122 }, _s_t_d_:_:_f_o_r_w_a_r_d_<___T_u_p_l_e_1_>(__x)), │ │ │ │ -123 std::apply([&__a](auto&&... __args2) { │ │ │ │ -124 return _s_t_d_:_:_u_s_e_s___a_l_l_o_c_a_t_o_r___c_o_n_s_t_r_u_c_t_i_o_n___a_r_g_s_<___T_p_2_>( │ │ │ │ -125 __a, _s_t_d_:_:_f_o_r_w_a_r_d(__args2)...); │ │ │ │ -126 }, _s_t_d_:_:_f_o_r_w_a_r_d_<___T_u_p_l_e_2_>(__y))); │ │ │ │ -127 } │ │ │ │ +118 __gnu_cxx::__aligned_buffer<_Tp> _M_storage; │ │ │ │ +119 │ │ │ │ +120 _Tp* │ │ │ │ +121 _M_valptr() noexcept │ │ │ │ +122 { return _M_storage._M_ptr(); } │ │ │ │ +123 │ │ │ │ +124 const _Tp* │ │ │ │ +125 _M_valptr() const noexcept │ │ │ │ +126 { return _M_storage._M_ptr(); } │ │ │ │ +127 }; │ │ │ │ 128 │ │ │ │ -129 template<_Std_pair _Tp, typename _Alloc> │ │ │ │ -130 constexpr auto │ │ │ │ -131 uses_allocator_construction_args(const _Alloc& __a) noexcept │ │ │ │ -132 { │ │ │ │ -133 using _Tp1 = typename _Tp::first_type; │ │ │ │ -134 using _Tp2 = typename _Tp::second_type; │ │ │ │ -135 │ │ │ │ -136 return _s_t_d_:_:_m_a_k_e___t_u_p_l_e(_p_i_e_c_e_w_i_s_e___c_o_n_s_t_r_u_c_t, │ │ │ │ -137 _s_t_d_:_:_u_s_e_s___a_l_l_o_c_a_t_o_r___c_o_n_s_t_r_u_c_t_i_o_n___a_r_g_s_<___T_p_1_>(__a), │ │ │ │ -138 _s_t_d_:_:_u_s_e_s___a_l_l_o_c_a_t_o_r___c_o_n_s_t_r_u_c_t_i_o_n___a_r_g_s_<___T_p_2_>(__a)); │ │ │ │ -139 } │ │ │ │ -140 │ │ │ │ -141 template<_Std_pair _Tp, typename _Alloc, typename _Up, typename _Vp> │ │ │ │ -142 constexpr auto │ │ │ │ -143 uses_allocator_construction_args(const _Alloc& __a, _Up&& __u, _Vp&& __v) │ │ │ │ -144 noexcept │ │ │ │ -145 { │ │ │ │ -146 using _Tp1 = typename _Tp::first_type; │ │ │ │ -147 using _Tp2 = typename _Tp::second_type; │ │ │ │ +129 /** │ │ │ │ +130 * @brief A forward_list::iterator. │ │ │ │ +131 * │ │ │ │ +132 * All the functions are op overloads. │ │ │ │ +133 */ │ │ │ │ +134 template │ │ │ │ +_1_3_5 struct ___F_w_d___l_i_s_t___i_t_e_r_a_t_o_r │ │ │ │ +136 { │ │ │ │ +137 typedef ___F_w_d___l_i_s_t___i_t_e_r_a_t_o_r_<___T_p_> ___S_e_l_f; │ │ │ │ +138 typedef ___F_w_d___l_i_s_t___n_o_d_e_<___T_p_> ___N_o_d_e; │ │ │ │ +139 │ │ │ │ +140 typedef _Tp value_type; │ │ │ │ +141 typedef _Tp* pointer; │ │ │ │ +142 typedef _Tp& reference; │ │ │ │ +143 typedef ptrdiff_t difference_type; │ │ │ │ +144 typedef _s_t_d_:_:_f_o_r_w_a_r_d___i_t_e_r_a_t_o_r___t_a_g _i_t_e_r_a_t_o_r___c_a_t_e_g_o_r_y; │ │ │ │ +145 │ │ │ │ +146 ___F_w_d___l_i_s_t___i_t_e_r_a_t_o_r() noexcept │ │ │ │ +147 : _M_node() { } │ │ │ │ 148 │ │ │ │ -149 return _s_t_d_:_:_m_a_k_e___t_u_p_l_e(_p_i_e_c_e_w_i_s_e___c_o_n_s_t_r_u_c_t, │ │ │ │ -150 _s_t_d_:_:_u_s_e_s___a_l_l_o_c_a_t_o_r___c_o_n_s_t_r_u_c_t_i_o_n___a_r_g_s_<___T_p_1_>(__a, │ │ │ │ -151 _s_t_d_:_:_f_o_r_w_a_r_d_<___U_p_>(__u)), │ │ │ │ -152 _s_t_d_:_:_u_s_e_s___a_l_l_o_c_a_t_o_r___c_o_n_s_t_r_u_c_t_i_o_n___a_r_g_s_<___T_p_2_>(__a, │ │ │ │ -153 _s_t_d_:_:_f_o_r_w_a_r_d_<___V_p_>(__v))); │ │ │ │ -154 } │ │ │ │ -155 │ │ │ │ -156 template<_Std_pair _Tp, typename _Alloc, typename _Up, typename _Vp> │ │ │ │ -157 constexpr auto │ │ │ │ -158 uses_allocator_construction_args(const _Alloc& __a, │ │ │ │ -159 const pair<_Up, _Vp>& __pr) noexcept │ │ │ │ -160 { │ │ │ │ -161 using _Tp1 = typename _Tp::first_type; │ │ │ │ -162 using _Tp2 = typename _Tp::second_type; │ │ │ │ -163 │ │ │ │ -164 return _s_t_d_:_:_m_a_k_e___t_u_p_l_e(_p_i_e_c_e_w_i_s_e___c_o_n_s_t_r_u_c_t, │ │ │ │ -165 _s_t_d_:_:_u_s_e_s___a_l_l_o_c_a_t_o_r___c_o_n_s_t_r_u_c_t_i_o_n___a_r_g_s_<___T_p_1_>(__a, __pr.first), │ │ │ │ -166 _s_t_d_:_:_u_s_e_s___a_l_l_o_c_a_t_o_r___c_o_n_s_t_r_u_c_t_i_o_n___a_r_g_s_<___T_p_2_>(__a, __pr.second)); │ │ │ │ -167 } │ │ │ │ -168 │ │ │ │ -169 template<_Std_pair _Tp, typename _Alloc, typename _Up, typename _Vp> │ │ │ │ -170 constexpr auto │ │ │ │ -171 uses_allocator_construction_args(const _Alloc& __a, │ │ │ │ -172 pair<_Up, _Vp>&& __pr) noexcept │ │ │ │ -173 { │ │ │ │ -174 using _Tp1 = typename _Tp::first_type; │ │ │ │ -175 using _Tp2 = typename _Tp::second_type; │ │ │ │ -176 │ │ │ │ -177 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ -178 // 3527. uses_allocator_construction_args handles rvalue pairs │ │ │ │ -179 // of rvalue references incorrectly │ │ │ │ -180 return _s_t_d_:_:_m_a_k_e___t_u_p_l_e(_p_i_e_c_e_w_i_s_e___c_o_n_s_t_r_u_c_t, │ │ │ │ -181 _s_t_d_:_:_u_s_e_s___a_l_l_o_c_a_t_o_r___c_o_n_s_t_r_u_c_t_i_o_n___a_r_g_s_<___T_p_1_>(__a, │ │ │ │ -182 _s_t_d_:_:_g_e_t_<_0_>(_s_t_d_:_:_m_o_v_e(__pr))), │ │ │ │ -183 _s_t_d_:_:_u_s_e_s___a_l_l_o_c_a_t_o_r___c_o_n_s_t_r_u_c_t_i_o_n___a_r_g_s_<___T_p_2_>(__a, │ │ │ │ -184 _s_t_d_:_:_g_e_t_<_1_>(_s_t_d_:_:_m_o_v_e(__pr)))); │ │ │ │ -185 } │ │ │ │ -186 │ │ │ │ -187 template │ │ │ │ -188 constexpr _Tp │ │ │ │ -189 make_obj_using_allocator(const _Alloc& __a, _Args&&... __args) │ │ │ │ -190 { │ │ │ │ -191 return _s_t_d_:_:_m_a_k_e___f_r_o_m___t_u_p_l_e_<___T_p_>( │ │ │ │ -192 _s_t_d_:_:_u_s_e_s___a_l_l_o_c_a_t_o_r___c_o_n_s_t_r_u_c_t_i_o_n___a_r_g_s_<___T_p_>(__a, │ │ │ │ -193 _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(__args)...)); │ │ │ │ -194 } │ │ │ │ +149 explicit │ │ │ │ +150 ___F_w_d___l_i_s_t___i_t_e_r_a_t_o_r(___F_w_d___l_i_s_t___n_o_d_e___b_a_s_e* __n) noexcept │ │ │ │ +151 : _M_node(__n) { } │ │ │ │ +152 │ │ │ │ +153 [[_____n_o_d_i_s_c_a_r_d____]] │ │ │ │ +154 reference │ │ │ │ +155 operator*() const noexcept │ │ │ │ +156 { return *static_cast<___N_o_d_e*>(this->_M_node)->_M_valptr(); } │ │ │ │ +157 │ │ │ │ +158 [[_____n_o_d_i_s_c_a_r_d____]] │ │ │ │ +159 pointer │ │ │ │ +160 operator->() const noexcept │ │ │ │ +161 { return static_cast<___N_o_d_e*>(this->_M_node)->_M_valptr(); } │ │ │ │ +162 │ │ │ │ +163 ___S_e_l_f& │ │ │ │ +164 operator++() noexcept │ │ │ │ +165 { │ │ │ │ +166 _M_node = _M_node->_M_next; │ │ │ │ +167 return *this; │ │ │ │ +168 } │ │ │ │ +169 │ │ │ │ +170 ___S_e_l_f │ │ │ │ +171 operator++(int) noexcept │ │ │ │ +172 { │ │ │ │ +173 ___S_e_l_f _____t_m_p(*this); │ │ │ │ +174 _M_node = _M_node->_M_next; │ │ │ │ +175 return _____t_m_p; │ │ │ │ +176 } │ │ │ │ +177 │ │ │ │ +178 /** │ │ │ │ +179 * @brief Forward list iterator equality comparison. │ │ │ │ +180 */ │ │ │ │ +181 [[_____n_o_d_i_s_c_a_r_d____]] │ │ │ │ +182 friend bool │ │ │ │ +_1_8_3 _o_p_e_r_a_t_o_r_=_=(const ___S_e_l_f& __x, const ___S_e_l_f& __y) noexcept │ │ │ │ +184 { return __x._M_node == __y._M_node; } │ │ │ │ +185 │ │ │ │ +186#if __cpp_impl_three_way_comparison < 201907L │ │ │ │ +187 /** │ │ │ │ +188 * @brief Forward list iterator inequality comparison. │ │ │ │ +189 */ │ │ │ │ +190 [[_____n_o_d_i_s_c_a_r_d____]] │ │ │ │ +191 friend bool │ │ │ │ +192 operator!=(const _Self& __x, const _Self& __y) noexcept │ │ │ │ +193 { return __x._M_node != __y._M_node; } │ │ │ │ +194#endif │ │ │ │ 195 │ │ │ │ -196 template │ │ │ │ -197 constexpr _Tp* │ │ │ │ -198 uninitialized_construct_using_allocator(_Tp* __p, const _Alloc& __a, │ │ │ │ -199 _Args&&... __args) │ │ │ │ -200 { │ │ │ │ -201 return std::apply([&](auto&&... __xs) { │ │ │ │ -202 return std::construct_at(__p, _s_t_d_:_:_f_o_r_w_a_r_d(__xs)...); │ │ │ │ -203 }, _s_t_d_:_:_u_s_e_s___a_l_l_o_c_a_t_o_r___c_o_n_s_t_r_u_c_t_i_o_n___a_r_g_s_<___T_p_>(__a, │ │ │ │ -204 _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(__args)...)); │ │ │ │ -205 } │ │ │ │ -206/// @} │ │ │ │ -207_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ -208} // namespace std │ │ │ │ -209#endif // C++20 │ │ │ │ -210#endif // _USES_ALLOCATOR_ARGS │ │ │ │ -_n_e_w │ │ │ │ -_t_u_p_l_e │ │ │ │ -_s_t_l___p_a_i_r_._h │ │ │ │ -_s_t_l___c_o_n_s_t_r_u_c_t_._h │ │ │ │ -_s_t_d_:_:_m_a_k_e___t_u_p_l_e │ │ │ │ -constexpr tuple< typename __decay_and_strip< _Elements >::__type... > │ │ │ │ -make_tuple(_Elements &&... __args) │ │ │ │ -Create a tuple containing copies of the arguments. │ │ │ │ -DDeeffiinniittiioonn _t_u_p_l_e_:_1_5_9_2 │ │ │ │ +196 _Self │ │ │ │ +197 _M_next() const noexcept │ │ │ │ +198 { │ │ │ │ +199 if (_M_node) │ │ │ │ +200 return _Fwd_list_iterator(_M_node->_M_next); │ │ │ │ +201 else │ │ │ │ +202 return _Fwd_list_iterator(nullptr); │ │ │ │ +203 } │ │ │ │ +204 │ │ │ │ +205 _Fwd_list_node_base* _M_node; │ │ │ │ +206 }; │ │ │ │ +207 │ │ │ │ +208 /** │ │ │ │ +209 * @brief A forward_list::const_iterator. │ │ │ │ +210 * │ │ │ │ +211 * All the functions are op overloads. │ │ │ │ +212 */ │ │ │ │ +213 template │ │ │ │ +_2_1_4 struct ___F_w_d___l_i_s_t___c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ +215 { │ │ │ │ +216 typedef ___F_w_d___l_i_s_t___c_o_n_s_t___i_t_e_r_a_t_o_r_<___T_p_> ___S_e_l_f; │ │ │ │ +217 typedef const ___F_w_d___l_i_s_t___n_o_d_e_<___T_p_> ___N_o_d_e; │ │ │ │ +218 typedef ___F_w_d___l_i_s_t___i_t_e_r_a_t_o_r_<___T_p_> _i_t_e_r_a_t_o_r; │ │ │ │ +219 │ │ │ │ +220 typedef _Tp value_type; │ │ │ │ +221 typedef const _Tp* pointer; │ │ │ │ +222 typedef const _Tp& reference; │ │ │ │ +223 typedef ptrdiff_t difference_type; │ │ │ │ +224 typedef _s_t_d_:_:_f_o_r_w_a_r_d___i_t_e_r_a_t_o_r___t_a_g _i_t_e_r_a_t_o_r___c_a_t_e_g_o_r_y; │ │ │ │ +225 │ │ │ │ +226 ___F_w_d___l_i_s_t___c_o_n_s_t___i_t_e_r_a_t_o_r() noexcept │ │ │ │ +227 : _M_node() { } │ │ │ │ +228 │ │ │ │ +229 explicit │ │ │ │ +230 ___F_w_d___l_i_s_t___c_o_n_s_t___i_t_e_r_a_t_o_r(const ___F_w_d___l_i_s_t___n_o_d_e___b_a_s_e* __n) noexcept │ │ │ │ +231 : _M_node(__n) { } │ │ │ │ +232 │ │ │ │ +233 ___F_w_d___l_i_s_t___c_o_n_s_t___i_t_e_r_a_t_o_r(const _i_t_e_r_a_t_o_r& __iter) noexcept │ │ │ │ +234 : _M_node(__iter._M_node) { } │ │ │ │ +235 │ │ │ │ +236 [[_____n_o_d_i_s_c_a_r_d____]] │ │ │ │ +237 reference │ │ │ │ +238 operator*() const noexcept │ │ │ │ +239 { return *static_cast<___N_o_d_e*>(this->_M_node)->_M_valptr(); } │ │ │ │ +240 │ │ │ │ +241 [[_____n_o_d_i_s_c_a_r_d____]] │ │ │ │ +242 pointer │ │ │ │ +243 operator->() const noexcept │ │ │ │ +244 { return static_cast<___N_o_d_e*>(this->_M_node)->_M_valptr(); } │ │ │ │ +245 │ │ │ │ +246 ___S_e_l_f& │ │ │ │ +247 operator++() noexcept │ │ │ │ +248 { │ │ │ │ +249 _M_node = _M_node->_M_next; │ │ │ │ +250 return *this; │ │ │ │ +251 } │ │ │ │ +252 │ │ │ │ +253 ___S_e_l_f │ │ │ │ +254 operator++(int) noexcept │ │ │ │ +255 { │ │ │ │ +256 ___S_e_l_f _____t_m_p(*this); │ │ │ │ +257 _M_node = _M_node->_M_next; │ │ │ │ +258 return _____t_m_p; │ │ │ │ +259 } │ │ │ │ +260 │ │ │ │ +261 /** │ │ │ │ +262 * @brief Forward list const_iterator equality comparison. │ │ │ │ +263 */ │ │ │ │ +264 [[_____n_o_d_i_s_c_a_r_d____]] │ │ │ │ +265 friend bool │ │ │ │ +_2_6_6 _o_p_e_r_a_t_o_r_=_=(const ___S_e_l_f& __x, const ___S_e_l_f& __y) noexcept │ │ │ │ +267 { return __x._M_node == __y._M_node; } │ │ │ │ +268 │ │ │ │ +269#if __cpp_impl_three_way_comparison < 201907L │ │ │ │ +270 /** │ │ │ │ +271 * @brief Forward list const_iterator inequality comparison. │ │ │ │ +272 */ │ │ │ │ +273 [[_____n_o_d_i_s_c_a_r_d____]] │ │ │ │ +274 friend bool │ │ │ │ +275 operator!=(const _Self& __x, const _Self& __y) noexcept │ │ │ │ +276 { return __x._M_node != __y._M_node; } │ │ │ │ +277#endif │ │ │ │ +278 │ │ │ │ +279 _Self │ │ │ │ +280 _M_next() const noexcept │ │ │ │ +281 { │ │ │ │ +282 if (this->_M_node) │ │ │ │ +283 return _Fwd_list_const_iterator(_M_node->_M_next); │ │ │ │ +284 else │ │ │ │ +285 return _Fwd_list_const_iterator(nullptr); │ │ │ │ +286 } │ │ │ │ +287 │ │ │ │ +288 const _Fwd_list_node_base* _M_node; │ │ │ │ +289 }; │ │ │ │ +290 │ │ │ │ +291 /** │ │ │ │ +292 * @brief Base class for %forward_list. │ │ │ │ +293 */ │ │ │ │ +294 template │ │ │ │ +_2_9_5 struct ___F_w_d___l_i_s_t___b_a_s_e │ │ │ │ +296 { │ │ │ │ +297 protected: │ │ │ │ +298 typedef _____a_l_l_o_c___r_e_b_i_n_d_<___A_l_l_o_c_,_ ___F_w_d___l_i_s_t___n_o_d_e_<___T_p_>> _Node_alloc_type; │ │ │ │ +299 typedef _____g_n_u___c_x_x_:_:_____a_l_l_o_c___t_r_a_i_t_s_<___N_o_d_e___a_l_l_o_c___t_y_p_e_> ___N_o_d_e___a_l_l_o_c___t_r_a_i_t_s; │ │ │ │ +300 │ │ │ │ +301 struct _Fwd_list_impl │ │ │ │ +302 : public _Node_alloc_type │ │ │ │ +303 { │ │ │ │ +304 ___F_w_d___l_i_s_t___n_o_d_e___b_a_s_e _M_head; │ │ │ │ +305 │ │ │ │ +306 _Fwd_list_impl() │ │ │ │ +307 noexcept(_i_s___n_o_t_h_r_o_w___d_e_f_a_u_l_t___c_o_n_s_t_r_u_c_t_i_b_l_e_<___N_o_d_e___a_l_l_o_c___t_y_p_e_>_:_:_v_a_l_u_e) │ │ │ │ +308 : _Node_alloc_type(), _M_head() │ │ │ │ +309 { } │ │ │ │ +310 │ │ │ │ +311 _Fwd_list_impl(_Fwd_list_impl&&) = default; │ │ │ │ +312 │ │ │ │ +313 _Fwd_list_impl(_Fwd_list_impl&& _____f_l, _Node_alloc_type&& __a) │ │ │ │ +314 : _Node_alloc_type(_s_t_d_:_:_m_o_v_e(__a)), _M_head(_s_t_d_:_:_m_o_v_e(_____f_l._M_head)) │ │ │ │ +315 { } │ │ │ │ +316 │ │ │ │ +317 _Fwd_list_impl(_Node_alloc_type&& __a) │ │ │ │ +318 : _Node_alloc_type(_s_t_d_:_:_m_o_v_e(__a)), _M_head() │ │ │ │ +319 { } │ │ │ │ +320 }; │ │ │ │ +321 │ │ │ │ +322 _Fwd_list_impl _M_impl; │ │ │ │ +323 │ │ │ │ +324 public: │ │ │ │ +325 typedef ___F_w_d___l_i_s_t___i_t_e_r_a_t_o_r_<___T_p_> _i_t_e_r_a_t_o_r; │ │ │ │ +326 typedef ___F_w_d___l_i_s_t___c_o_n_s_t___i_t_e_r_a_t_o_r_<___T_p_> _c_o_n_s_t___i_t_e_r_a_t_o_r; │ │ │ │ +327 typedef ___F_w_d___l_i_s_t___n_o_d_e_<___T_p_> ___N_o_d_e; │ │ │ │ +328 │ │ │ │ +329 _Node_alloc_type& │ │ │ │ +330 _M_get_Node_allocator() noexcept │ │ │ │ +331 { return this->_M_impl; } │ │ │ │ +332 │ │ │ │ +333 const _Node_alloc_type& │ │ │ │ +334 _M_get_Node_allocator() const noexcept │ │ │ │ +335 { return this->_M_impl; } │ │ │ │ +336 │ │ │ │ +337 ___F_w_d___l_i_s_t___b_a_s_e() = default; │ │ │ │ +338 │ │ │ │ +339 ___F_w_d___l_i_s_t___b_a_s_e(_Node_alloc_type&& __a) │ │ │ │ +340 : _M_impl(_s_t_d_:_:_m_o_v_e(__a)) { } │ │ │ │ +341 │ │ │ │ +342 // When allocators are always equal. │ │ │ │ +343 ___F_w_d___l_i_s_t___b_a_s_e(___F_w_d___l_i_s_t___b_a_s_e&& _____l_s_t, _Node_alloc_type&& __a, │ │ │ │ +344 _s_t_d_:_:_t_r_u_e___t_y_p_e) │ │ │ │ +345 : _M_impl(_s_t_d_:_:_m_o_v_e(_____l_s_t._M_impl), _s_t_d_:_:_m_o_v_e(__a)) │ │ │ │ +346 { } │ │ │ │ +347 │ │ │ │ +348 // When allocators are not always equal. │ │ │ │ +349 ___F_w_d___l_i_s_t___b_a_s_e(___F_w_d___l_i_s_t___b_a_s_e&& _____l_s_t, _Node_alloc_type&& __a); │ │ │ │ +350 │ │ │ │ +351 ___F_w_d___l_i_s_t___b_a_s_e(___F_w_d___l_i_s_t___b_a_s_e&&) = default; │ │ │ │ +352 │ │ │ │ +353 _~___F_w_d___l_i_s_t___b_a_s_e() │ │ │ │ +354 { _M_erase_after(&_M_impl._M_head, nullptr); } │ │ │ │ +355 │ │ │ │ +356 protected: │ │ │ │ +357 ___N_o_d_e* │ │ │ │ +358 _M_get_node() │ │ │ │ +359 { │ │ │ │ +360 auto _____p_t_r = ___N_o_d_e___a_l_l_o_c___t_r_a_i_t_s_:_:_a_l_l_o_c_a_t_e(_M_get_Node_allocator(), 1); │ │ │ │ +361 return std::__to_address(_____p_t_r); │ │ │ │ +362 } │ │ │ │ +363 │ │ │ │ +364 template │ │ │ │ +365 ___N_o_d_e* │ │ │ │ +366 _M_create_node(___A_r_g_s&&... _____a_r_g_s) │ │ │ │ +367 { │ │ │ │ +368 ___N_o_d_e* _____n_o_d_e = this->_M_get_node(); │ │ │ │ +369 __try │ │ │ │ +370 { │ │ │ │ +371 ::new ((void*)_____n_o_d_e) ___N_o_d_e; │ │ │ │ +372 _Node_alloc_traits::construct(_M_get_Node_allocator(), │ │ │ │ +373 _____n_o_d_e->_M_valptr(), │ │ │ │ +374 _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(_____a_r_g_s)...); │ │ │ │ +375 } │ │ │ │ +376 __catch(...) │ │ │ │ +377 { │ │ │ │ +378 this->_M_put_node(_____n_o_d_e); │ │ │ │ +379 __throw_exception_again; │ │ │ │ +380 } │ │ │ │ +381 return _____n_o_d_e; │ │ │ │ +382 } │ │ │ │ +383 │ │ │ │ +384 template │ │ │ │ +385 ___F_w_d___l_i_s_t___n_o_d_e___b_a_s_e* │ │ │ │ +386 _M_insert_after(_c_o_n_s_t___i_t_e_r_a_t_o_r _____p_o_s, ___A_r_g_s&&... _____a_r_g_s); │ │ │ │ +387 │ │ │ │ +388 void │ │ │ │ +389 _M_put_node(___N_o_d_e* __p) │ │ │ │ +390 { │ │ │ │ +391 typedef typename ___N_o_d_e___a_l_l_o_c___t_r_a_i_t_s_:_:_p_o_i_n_t_e_r _Ptr; │ │ │ │ +392 auto _____p_t_r = _s_t_d_:_:_p_o_i_n_t_e_r___t_r_a_i_t_s_<___P_t_r_>_:_:_p_o_i_n_t_e_r___t_o(*__p); │ │ │ │ +393 ___N_o_d_e___a_l_l_o_c___t_r_a_i_t_s_:_:_d_e_a_l_l_o_c_a_t_e(_M_get_Node_allocator(), _____p_t_r, 1); │ │ │ │ +394 } │ │ │ │ +395 │ │ │ │ +396 ___F_w_d___l_i_s_t___n_o_d_e___b_a_s_e* │ │ │ │ +397 _M_erase_after(___F_w_d___l_i_s_t___n_o_d_e___b_a_s_e* _____p_o_s); │ │ │ │ +398 │ │ │ │ +399 ___F_w_d___l_i_s_t___n_o_d_e___b_a_s_e* │ │ │ │ +400 _M_erase_after(___F_w_d___l_i_s_t___n_o_d_e___b_a_s_e* _____p_o_s, │ │ │ │ +401 ___F_w_d___l_i_s_t___n_o_d_e___b_a_s_e* __last); │ │ │ │ +402 }; │ │ │ │ +403 │ │ │ │ +404 /** │ │ │ │ +405 * @brief A standard container with linear time access to elements, │ │ │ │ +406 * and fixed time insertion/deletion at any point in the sequence. │ │ │ │ +407 * │ │ │ │ +408 * @ingroup sequences │ │ │ │ +409 * @headerfile forward_list │ │ │ │ +410 * @since C++11 │ │ │ │ +411 * │ │ │ │ +412 * @tparam _Tp Type of element. │ │ │ │ +413 * @tparam _Alloc Allocator type, defaults to allocator<_Tp>. │ │ │ │ +414 * │ │ │ │ +415 * Meets the requirements of a container, a │ │ │ │ +416 * sequence, including the │ │ │ │ +417 * optional sequence requirements with the │ │ │ │ +418 * %exception of @c at and @c operator[]. │ │ │ │ +419 * │ │ │ │ +420 * This is a @e singly @e linked %list. Traversal up the │ │ │ │ +421 * %list requires linear time, but adding and removing elements (or │ │ │ │ +422 * @e nodes) is done in constant time, regardless of where the │ │ │ │ +423 * change takes place. Unlike std::vector and std::deque, │ │ │ │ +424 * random-access iterators are not provided, so subscripting ( @c │ │ │ │ +425 * [] ) access is not allowed. For algorithms which only need │ │ │ │ +426 * sequential access, this lack makes no difference. │ │ │ │ +427 * │ │ │ │ +428 * Also unlike the other standard containers, std::forward_list provides │ │ │ │ +429 * specialized algorithms %unique to linked lists, such as │ │ │ │ +430 * splicing, sorting, and in-place reversal. │ │ │ │ +431 */ │ │ │ │ +432 template> │ │ │ │ +_4_3_3 class _f_o_r_w_a_r_d___l_i_s_t : private ___F_w_d___l_i_s_t___b_a_s_e<_Tp, _Alloc> │ │ │ │ +434 { │ │ │ │ +435 static_assert(_i_s___s_a_m_e_<_t_y_p_e_n_a_m_e_ _r_e_m_o_v_e___c_v_<___T_p_>_:_:_t_y_p_e, _Tp>::value, │ │ │ │ +436 "std::forward_list must have a non-const, non-volatile value_type"); │ │ │ │ +437#if __cplusplus > 201703L || defined __STRICT_ANSI__ │ │ │ │ +438 static_assert(_i_s___s_a_m_e_<_t_y_p_e_n_a_m_e_ ___A_l_l_o_c_:_:_v_a_l_u_e___t_y_p_e_,_ ___T_p_>_:_:_v_a_l_u_e, │ │ │ │ +439 "std::forward_list must have the same value_type as its allocator"); │ │ │ │ +440#endif │ │ │ │ +441 │ │ │ │ +442 private: │ │ │ │ +443 typedef ___F_w_d___l_i_s_t___b_a_s_e_<___T_p_,_ ___A_l_l_o_c_> ___B_a_s_e; │ │ │ │ +444 typedef ___F_w_d___l_i_s_t___n_o_d_e___b_a_s_e ___N_o_d_e___b_a_s_e; │ │ │ │ +445 typedef typename ___B_a_s_e_:_:___N_o_d_e ___N_o_d_e; │ │ │ │ +446 typedef typename ___B_a_s_e_:_:___N_o_d_e___a_l_l_o_c___t_y_p_e ___N_o_d_e___a_l_l_o_c___t_y_p_e; │ │ │ │ +447 typedef typename ___B_a_s_e_:_:___N_o_d_e___a_l_l_o_c___t_r_a_i_t_s ___N_o_d_e___a_l_l_o_c___t_r_a_i_t_s; │ │ │ │ +448 typedef _a_l_l_o_c_a_t_o_r___t_r_a_i_t_s_<_____a_l_l_o_c___r_e_b_i_n_d_<___A_l_l_o_c_,_ ___T_p_>> ___A_l_l_o_c___t_r_a_i_t_s; │ │ │ │ +449 │ │ │ │ +450 public: │ │ │ │ +451 // types: │ │ │ │ +452 typedef _Tp value_type; │ │ │ │ +453 typedef typename _Alloc_traits::pointer pointer; │ │ │ │ +454 typedef typename _Alloc_traits::const_pointer const_pointer; │ │ │ │ +455 typedef value_type& reference; │ │ │ │ +456 typedef const value_type& const_reference; │ │ │ │ +457 │ │ │ │ +458 typedef typename ___B_a_s_e_:_:_i_t_e_r_a_t_o_r _i_t_e_r_a_t_o_r; │ │ │ │ +459 typedef typename ___B_a_s_e_:_:_c_o_n_s_t___i_t_e_r_a_t_o_r _c_o_n_s_t___i_t_e_r_a_t_o_r; │ │ │ │ +460 typedef std::size_t size_type; │ │ │ │ +461 typedef std::ptrdiff_t difference_type; │ │ │ │ +462 typedef _Alloc allocator_type; │ │ │ │ +463 │ │ │ │ +464 // 23.3.4.2 construct/copy/destroy: │ │ │ │ +465 │ │ │ │ +466 /** │ │ │ │ +467 * @brief Creates a %forward_list with no elements. │ │ │ │ +468 */ │ │ │ │ +_4_6_9 _f_o_r_w_a_r_d___l_i_s_t() = default; │ │ │ │ +470 │ │ │ │ +471 /** │ │ │ │ +472 * @brief Creates a %forward_list with no elements. │ │ │ │ +473 * @param __al An allocator object. │ │ │ │ +474 */ │ │ │ │ +475 explicit │ │ │ │ +_4_7_6 _f_o_r_w_a_r_d___l_i_s_t(const _Alloc& _____a_l) noexcept │ │ │ │ +477 : ___B_a_s_e(___N_o_d_e___a_l_l_o_c___t_y_p_e(_____a_l)) │ │ │ │ +478 { } │ │ │ │ +479 │ │ │ │ +480 /** │ │ │ │ +481 * @brief Copy constructor with allocator argument. │ │ │ │ +482 * @param __list Input list to copy. │ │ │ │ +483 * @param __al An allocator object. │ │ │ │ +484 */ │ │ │ │ +_4_8_5 _f_o_r_w_a_r_d___l_i_s_t(const _f_o_r_w_a_r_d___l_i_s_t& _____l_i_s_t, │ │ │ │ +486 const _____t_y_p_e___i_d_e_n_t_i_t_y___t_<___A_l_l_o_c_>& _____a_l) │ │ │ │ +487 : ___B_a_s_e(___N_o_d_e___a_l_l_o_c___t_y_p_e(_____a_l)) │ │ │ │ +488 { _M_range_initialize(_____l_i_s_t.begin(), _____l_i_s_t.end()); } │ │ │ │ +489 │ │ │ │ +490 private: │ │ │ │ +491 _f_o_r_w_a_r_d___l_i_s_t(_f_o_r_w_a_r_d___l_i_s_t&& _____l_i_s_t, _Node_alloc_type&& _____a_l, │ │ │ │ +492 _f_a_l_s_e___t_y_p_e) │ │ │ │ +493 : _Base(_s_t_d::_m_o_v_e(_____l_i_s_t), _s_t_d::_m_o_v_e(_____a_l)) │ │ │ │ +494 { │ │ │ │ +495 // If __list is not empty it means its allocator is not equal to __a, │ │ │ │ +496 // so we need to move from each element individually. │ │ │ │ +497 _i_n_s_e_r_t___a_f_t_e_r(_c_b_e_f_o_r_e___b_e_g_i_n(), │ │ │ │ +498 std::__make_move_if_noexcept_iterator(_____l_i_s_t.begin()), │ │ │ │ +499 std::__make_move_if_noexcept_iterator(_____l_i_s_t.end())); │ │ │ │ +500 } │ │ │ │ +501 │ │ │ │ +502 _f_o_r_w_a_r_d___l_i_s_t(_f_o_r_w_a_r_d___l_i_s_t&& __list, _Node_alloc_type&& __al, │ │ │ │ +503 _t_r_u_e___t_y_p_e) │ │ │ │ +504 noexcept │ │ │ │ +505 : _Base(_s_t_d_:_:_m_o_v_e(__list), _Node_alloc_type(__al), _t_r_u_e___t_y_p_e{}) │ │ │ │ +506 { } │ │ │ │ +507 │ │ │ │ +508 public: │ │ │ │ +509 /** │ │ │ │ +510 * @brief Move constructor with allocator argument. │ │ │ │ +511 * @param __list Input list to move. │ │ │ │ +512 * @param __al An allocator object. │ │ │ │ +513 */ │ │ │ │ +_5_1_4 _f_o_r_w_a_r_d___l_i_s_t(_f_o_r_w_a_r_d___l_i_s_t&& _____l_i_s_t, │ │ │ │ +515 const _____t_y_p_e___i_d_e_n_t_i_t_y___t_<___A_l_l_o_c_>& _____a_l) │ │ │ │ +516 noexcept(_Node_alloc_traits::_S_always_equal()) │ │ │ │ +517 : _f_o_r_w_a_r_d___l_i_s_t(_s_t_d::_m_o_v_e(_____l_i_s_t), ___N_o_d_e___a_l_l_o_c___t_y_p_e(_____a_l), │ │ │ │ +518 _t_y_p_e_n_a_m_e ___N_o_d_e___a_l_l_o_c___t_r_a_i_t_s::is_always_equal{}) │ │ │ │ +519 { } │ │ │ │ +520 │ │ │ │ +521 /** │ │ │ │ +522 * @brief Creates a %forward_list with default constructed elements. │ │ │ │ +523 * @param __n The number of elements to initially create. │ │ │ │ +524 * @param __al An allocator object. │ │ │ │ +525 * │ │ │ │ +526 * This constructor creates the %forward_list with @a __n default │ │ │ │ +527 * constructed elements. │ │ │ │ +528 */ │ │ │ │ +529 explicit │ │ │ │ +_5_3_0 _f_o_r_w_a_r_d___l_i_s_t(size_type __n, const _Alloc& _____a_l = _Alloc()) │ │ │ │ +531 : ___B_a_s_e(___N_o_d_e___a_l_l_o_c___t_y_p_e(_____a_l)) │ │ │ │ +532 { _M_default_initialize(__n); } │ │ │ │ +533 │ │ │ │ +534 /** │ │ │ │ +535 * @brief Creates a %forward_list with copies of an exemplar element. │ │ │ │ +536 * @param __n The number of elements to initially create. │ │ │ │ +537 * @param __value An element to copy. │ │ │ │ +538 * @param __al An allocator object. │ │ │ │ +539 * │ │ │ │ +540 * This constructor fills the %forward_list with @a __n copies of │ │ │ │ +541 * @a __value. │ │ │ │ +542 */ │ │ │ │ +_5_4_3 _f_o_r_w_a_r_d___l_i_s_t(size_type __n, const _Tp& __value, │ │ │ │ +544 const _Alloc& _____a_l = _Alloc()) │ │ │ │ +545 : ___B_a_s_e(___N_o_d_e___a_l_l_o_c___t_y_p_e(_____a_l)) │ │ │ │ +546 { _M_fill_initialize(__n, __value); } │ │ │ │ +547 │ │ │ │ +548 /** │ │ │ │ +549 * @brief Builds a %forward_list from a range. │ │ │ │ +550 * @param __first An input iterator. │ │ │ │ +551 * @param __last An input iterator. │ │ │ │ +552 * @param __al An allocator object. │ │ │ │ +553 * │ │ │ │ +554 * Create a %forward_list consisting of copies of the elements from │ │ │ │ +555 * [@a __first,@a __last). This is linear in N (where N is │ │ │ │ +556 * distance(@a __first,@a __last)). │ │ │ │ +557 */ │ │ │ │ +558 template> │ │ │ │ +_5_6_0 _f_o_r_w_a_r_d___l_i_s_t(___I_n_p_u_t_I_t_e_r_a_t_o_r __first, ___I_n_p_u_t_I_t_e_r_a_t_o_r __last, │ │ │ │ +561 const _Alloc& _____a_l = _Alloc()) │ │ │ │ +562 : ___B_a_s_e(___N_o_d_e___a_l_l_o_c___t_y_p_e(_____a_l)) │ │ │ │ +563 { _M_range_initialize(__first, __last); } │ │ │ │ +564 │ │ │ │ +565 /** │ │ │ │ +566 * @brief The %forward_list copy constructor. │ │ │ │ +567 * @param __list A %forward_list of identical element and allocator │ │ │ │ +568 * types. │ │ │ │ +569 */ │ │ │ │ +_5_7_0 _f_o_r_w_a_r_d___l_i_s_t(const _f_o_r_w_a_r_d___l_i_s_t& _____l_i_s_t) │ │ │ │ +571 : ___B_a_s_e(___N_o_d_e___a_l_l_o_c___t_r_a_i_t_s::_S_select_on_copy( │ │ │ │ +572 _____l_i_s_t._M_get_Node_allocator())) │ │ │ │ +573 { _M_range_initialize(_____l_i_s_t.begin(), _____l_i_s_t.end()); } │ │ │ │ +574 │ │ │ │ +575 /** │ │ │ │ +576 * @brief The %forward_list move constructor. │ │ │ │ +577 * @param __list A %forward_list of identical element and allocator │ │ │ │ +578 * types. │ │ │ │ +579 * │ │ │ │ +580 * The newly-created %forward_list contains the exact contents of the │ │ │ │ +581 * moved instance. The contents of the moved instance are a valid, but │ │ │ │ +582 * unspecified %forward_list. │ │ │ │ +583 */ │ │ │ │ +_5_8_4 _f_o_r_w_a_r_d___l_i_s_t(_f_o_r_w_a_r_d___l_i_s_t&&) = default; │ │ │ │ +585 │ │ │ │ +586 /** │ │ │ │ +587 * @brief Builds a %forward_list from an initializer_list │ │ │ │ +588 * @param __il An initializer_list of value_type. │ │ │ │ +589 * @param __al An allocator object. │ │ │ │ +590 * │ │ │ │ +591 * Create a %forward_list consisting of copies of the elements │ │ │ │ +592 * in the initializer_list @a __il. This is linear in __il.size(). │ │ │ │ +593 */ │ │ │ │ +_5_9_4 _f_o_r_w_a_r_d___l_i_s_t(_s_t_d_:_:_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t_<___T_p_> _____i_l, │ │ │ │ +595 const _Alloc& _____a_l = _Alloc()) │ │ │ │ +596 : ___B_a_s_e(___N_o_d_e___a_l_l_o_c___t_y_p_e(_____a_l)) │ │ │ │ +597 { _M_range_initialize(_____i_l.begin(), _____i_l.end()); } │ │ │ │ +598 │ │ │ │ +599 /** │ │ │ │ +600 * @brief The forward_list dtor. │ │ │ │ +601 */ │ │ │ │ +_6_0_2 _~_f_o_r_w_a_r_d___l_i_s_t() noexcept │ │ │ │ +603 { } │ │ │ │ +604 │ │ │ │ +605 /** │ │ │ │ +606 * @brief The %forward_list assignment operator. │ │ │ │ +607 * @param __list A %forward_list of identical element and allocator │ │ │ │ +608 * types. │ │ │ │ +609 * │ │ │ │ +610 * All the elements of @a __list are copied. │ │ │ │ +611 * │ │ │ │ +612 * Whether the allocator is copied depends on the allocator traits. │ │ │ │ +613 */ │ │ │ │ +614 _f_o_r_w_a_r_d___l_i_s_t& │ │ │ │ +615 _o_p_e_r_a_t_o_r_=(const _f_o_r_w_a_r_d___l_i_s_t& _____l_i_s_t); │ │ │ │ +616 │ │ │ │ +617 /** │ │ │ │ +618 * @brief The %forward_list move assignment operator. │ │ │ │ +619 * @param __list A %forward_list of identical element and allocator │ │ │ │ +620 * types. │ │ │ │ +621 * │ │ │ │ +622 * The contents of @a __list are moved into this %forward_list │ │ │ │ +623 * (without copying, if the allocators permit it). │ │ │ │ +624 * │ │ │ │ +625 * Afterwards @a __list is a valid, but unspecified %forward_list │ │ │ │ +626 * │ │ │ │ +627 * Whether the allocator is moved depends on the allocator traits. │ │ │ │ +628 */ │ │ │ │ +629 _f_o_r_w_a_r_d___l_i_s_t& │ │ │ │ +_6_3_0 _o_p_e_r_a_t_o_r_=(_f_o_r_w_a_r_d___l_i_s_t&& _____l_i_s_t) │ │ │ │ +631 noexcept(_Node_alloc_traits::_S_nothrow_move()) │ │ │ │ +632 { │ │ │ │ +633 constexpr bool _____m_o_v_e___s_t_o_r_a_g_e = │ │ │ │ +634 _Node_alloc_traits::_S_propagate_on_move_assign() │ │ │ │ +635 || _Node_alloc_traits::_S_always_equal(); │ │ │ │ +636 _M_move_assign(_s_t_d_:_:_m_o_v_e(_____l_i_s_t), _____b_o_o_l___c_o_n_s_t_a_n_t_<_____m_o_v_e___s_t_o_r_a_g_e_>()); │ │ │ │ +637 return *this; │ │ │ │ +638 } │ │ │ │ +639 │ │ │ │ +640 /** │ │ │ │ +641 * @brief The %forward_list initializer list assignment operator. │ │ │ │ +642 * @param __il An initializer_list of value_type. │ │ │ │ +643 * │ │ │ │ +644 * Replace the contents of the %forward_list with copies of the │ │ │ │ +645 * elements in the initializer_list @a __il. This is linear in │ │ │ │ +646 * __il.size(). │ │ │ │ +647 */ │ │ │ │ +648 _f_o_r_w_a_r_d___l_i_s_t& │ │ │ │ +_6_4_9 _o_p_e_r_a_t_o_r_=(_s_t_d_:_:_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t_<___T_p_> _____i_l) │ │ │ │ +650 { │ │ │ │ +651 _a_s_s_i_g_n(_____i_l); │ │ │ │ +652 return *this; │ │ │ │ +653 } │ │ │ │ +654 │ │ │ │ +655 /** │ │ │ │ +656 * @brief Assigns a range to a %forward_list. │ │ │ │ +657 * @param __first An input iterator. │ │ │ │ +658 * @param __last An input iterator. │ │ │ │ +659 * │ │ │ │ +660 * This function fills a %forward_list with copies of the elements │ │ │ │ +661 * in the range [@a __first,@a __last). │ │ │ │ +662 * │ │ │ │ +663 * Note that the assignment completely changes the %forward_list and │ │ │ │ +664 * that the number of elements of the resulting %forward_list is the │ │ │ │ +665 * same as the number of elements assigned. │ │ │ │ +666 */ │ │ │ │ +667 template> │ │ │ │ +669 void │ │ │ │ +_6_7_0 _a_s_s_i_g_n(___I_n_p_u_t_I_t_e_r_a_t_o_r __first, ___I_n_p_u_t_I_t_e_r_a_t_o_r __last) │ │ │ │ +671 { │ │ │ │ +672 typedef _i_s___a_s_s_i_g_n_a_b_l_e<_Tp, decltype(*__first)> __assignable; │ │ │ │ +673 _M_assign(__first, __last, __assignable()); │ │ │ │ +674 } │ │ │ │ +675 │ │ │ │ +676 /** │ │ │ │ +677 * @brief Assigns a given value to a %forward_list. │ │ │ │ +678 * @param __n Number of elements to be assigned. │ │ │ │ +679 * @param __val Value to be assigned. │ │ │ │ +680 * │ │ │ │ +681 * This function fills a %forward_list with @a __n copies of the │ │ │ │ +682 * given value. Note that the assignment completely changes the │ │ │ │ +683 * %forward_list, and that the resulting %forward_list has __n │ │ │ │ +684 * elements. │ │ │ │ +685 */ │ │ │ │ +686 void │ │ │ │ +_6_8_7 _a_s_s_i_g_n(size_type __n, const _Tp& __val) │ │ │ │ +688 { _M_assign_n(__n, __val, _i_s___c_o_p_y___a_s_s_i_g_n_a_b_l_e_<___T_p_>()); } │ │ │ │ +689 │ │ │ │ +690 /** │ │ │ │ +691 * @brief Assigns an initializer_list to a %forward_list. │ │ │ │ +692 * @param __il An initializer_list of value_type. │ │ │ │ +693 * │ │ │ │ +694 * Replace the contents of the %forward_list with copies of the │ │ │ │ +695 * elements in the initializer_list @a __il. This is linear in │ │ │ │ +696 * il.size(). │ │ │ │ +697 */ │ │ │ │ +698 void │ │ │ │ +_6_9_9 _a_s_s_i_g_n(_s_t_d_:_:_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t_<___T_p_> _____i_l) │ │ │ │ +700 { _a_s_s_i_g_n(_____i_l.begin(), _____i_l.end()); } │ │ │ │ +701 │ │ │ │ +702 /// Get a copy of the memory allocation object. │ │ │ │ +703 allocator_type │ │ │ │ +_7_0_4 _g_e_t___a_l_l_o_c_a_t_o_r() const noexcept │ │ │ │ +705 { return allocator_type(this->_M_get_Node_allocator()); } │ │ │ │ +706 │ │ │ │ +707 // 23.3.4.3 iterators: │ │ │ │ +708 │ │ │ │ +709 /** │ │ │ │ +710 * Returns a read/write iterator that points before the first element │ │ │ │ +711 * in the %forward_list. Iteration is done in ordinary element order. │ │ │ │ +712 */ │ │ │ │ +713 [[_____n_o_d_i_s_c_a_r_d____]] │ │ │ │ +714 _i_t_e_r_a_t_o_r │ │ │ │ +_7_1_5 _b_e_f_o_r_e___b_e_g_i_n() noexcept │ │ │ │ +716 { return _i_t_e_r_a_t_o_r(&this->_M_impl._M_head); } │ │ │ │ +717 │ │ │ │ +718 /** │ │ │ │ +719 * Returns a read-only (constant) iterator that points before the │ │ │ │ +720 * first element in the %forward_list. Iteration is done in ordinary │ │ │ │ +721 * element order. │ │ │ │ +722 */ │ │ │ │ +723 [[_____n_o_d_i_s_c_a_r_d____]] │ │ │ │ +724 const_iterator │ │ │ │ +_7_2_5 _b_e_f_o_r_e___b_e_g_i_n() const noexcept │ │ │ │ +726 { return _c_o_n_s_t___i_t_e_r_a_t_o_r(&this->_M_impl._M_head); } │ │ │ │ +727 │ │ │ │ +728 /** │ │ │ │ +729 * Returns a read/write iterator that points to the first element │ │ │ │ +730 * in the %forward_list. Iteration is done in ordinary element order. │ │ │ │ +731 */ │ │ │ │ +732 [[_____n_o_d_i_s_c_a_r_d____]] │ │ │ │ +733 _i_t_e_r_a_t_o_r │ │ │ │ +_7_3_4 _b_e_g_i_n() noexcept │ │ │ │ +735 { return _i_t_e_r_a_t_o_r(this->_M_impl._M_head._M_next); } │ │ │ │ +736 │ │ │ │ +737 /** │ │ │ │ +738 * Returns a read-only (constant) iterator that points to the first │ │ │ │ +739 * element in the %forward_list. Iteration is done in ordinary │ │ │ │ +740 * element order. │ │ │ │ +741 */ │ │ │ │ +742 [[_____n_o_d_i_s_c_a_r_d____]] │ │ │ │ +743 const_iterator │ │ │ │ +_7_4_4 _b_e_g_i_n() const noexcept │ │ │ │ +745 { return _c_o_n_s_t___i_t_e_r_a_t_o_r(this->_M_impl._M_head._M_next); } │ │ │ │ +746 │ │ │ │ +747 /** │ │ │ │ +748 * Returns a read/write iterator that points one past the last │ │ │ │ +749 * element in the %forward_list. Iteration is done in ordinary │ │ │ │ +750 * element order. │ │ │ │ +751 */ │ │ │ │ +752 [[_____n_o_d_i_s_c_a_r_d____]] │ │ │ │ +753 _i_t_e_r_a_t_o_r │ │ │ │ +_7_5_4 _e_n_d() noexcept │ │ │ │ +755 { return _i_t_e_r_a_t_o_r(nullptr); } │ │ │ │ +756 │ │ │ │ +757 /** │ │ │ │ +758 * Returns a read-only iterator that points one past the last │ │ │ │ +759 * element in the %forward_list. Iteration is done in ordinary │ │ │ │ +760 * element order. │ │ │ │ +761 */ │ │ │ │ +762 [[_____n_o_d_i_s_c_a_r_d____]] │ │ │ │ +763 const_iterator │ │ │ │ +_7_6_4 _e_n_d() const noexcept │ │ │ │ +765 { return _c_o_n_s_t___i_t_e_r_a_t_o_r(nullptr); } │ │ │ │ +766 │ │ │ │ +767 /** │ │ │ │ +768 * Returns a read-only (constant) iterator that points to the │ │ │ │ +769 * first element in the %forward_list. Iteration is done in ordinary │ │ │ │ +770 * element order. │ │ │ │ +771 */ │ │ │ │ +772 [[_____n_o_d_i_s_c_a_r_d____]] │ │ │ │ +773 const_iterator │ │ │ │ +_7_7_4 _c_b_e_g_i_n() const noexcept │ │ │ │ +775 { return _c_o_n_s_t___i_t_e_r_a_t_o_r(this->_M_impl._M_head._M_next); } │ │ │ │ +776 │ │ │ │ +777 /** │ │ │ │ +778 * Returns a read-only (constant) iterator that points before the │ │ │ │ +779 * first element in the %forward_list. Iteration is done in ordinary │ │ │ │ +780 * element order. │ │ │ │ +781 */ │ │ │ │ +782 [[_____n_o_d_i_s_c_a_r_d____]] │ │ │ │ +783 const_iterator │ │ │ │ +_7_8_4 _c_b_e_f_o_r_e___b_e_g_i_n() const noexcept │ │ │ │ +785 { return _c_o_n_s_t___i_t_e_r_a_t_o_r(&this->_M_impl._M_head); } │ │ │ │ +786 │ │ │ │ +787 /** │ │ │ │ +788 * Returns a read-only (constant) iterator that points one past │ │ │ │ +789 * the last element in the %forward_list. Iteration is done in │ │ │ │ +790 * ordinary element order. │ │ │ │ +791 */ │ │ │ │ +792 [[_____n_o_d_i_s_c_a_r_d____]] │ │ │ │ +793 const_iterator │ │ │ │ +_7_9_4 _c_e_n_d() const noexcept │ │ │ │ +795 { return _c_o_n_s_t___i_t_e_r_a_t_o_r(nullptr); } │ │ │ │ +796 │ │ │ │ +797 /** │ │ │ │ +798 * Returns true if the %forward_list is empty. (Thus begin() would │ │ │ │ +799 * equal end().) │ │ │ │ +800 */ │ │ │ │ +801 [[_____n_o_d_i_s_c_a_r_d____]] │ │ │ │ +802 bool │ │ │ │ +_8_0_3 _e_m_p_t_y() const noexcept │ │ │ │ +804 { return this->_M_impl._M_head._M_next == nullptr; } │ │ │ │ +805 │ │ │ │ +806 /** │ │ │ │ +807 * Returns the largest possible number of elements of %forward_list. │ │ │ │ +808 */ │ │ │ │ +809 [[_____n_o_d_i_s_c_a_r_d____]] │ │ │ │ +810 size_type │ │ │ │ +_8_1_1 _m_a_x___s_i_z_e() const noexcept │ │ │ │ +812 { return ___N_o_d_e___a_l_l_o_c___t_r_a_i_t_s_:_:_m_a_x___s_i_z_e(this->_M_get_Node_allocator()); } │ │ │ │ +813 │ │ │ │ +814 // 23.3.4.4 element access: │ │ │ │ +815 │ │ │ │ +816 /** │ │ │ │ +817 * Returns a read/write reference to the data at the first │ │ │ │ +818 * element of the %forward_list. │ │ │ │ +819 */ │ │ │ │ +820 [[_____n_o_d_i_s_c_a_r_d____]] │ │ │ │ +821 reference │ │ │ │ +_8_2_2 _f_r_o_n_t() │ │ │ │ +823 { │ │ │ │ +824 ___N_o_d_e* _____f_r_o_n_t = static_cast<___N_o_d_e*>(this->_M_impl._M_head._M_next); │ │ │ │ +825 return *_____f_r_o_n_t->_M_valptr(); │ │ │ │ +826 } │ │ │ │ +827 │ │ │ │ +828 /** │ │ │ │ +829 * Returns a read-only (constant) reference to the data at the first │ │ │ │ +830 * element of the %forward_list. │ │ │ │ +831 */ │ │ │ │ +832 [[_____n_o_d_i_s_c_a_r_d____]] │ │ │ │ +833 const_reference │ │ │ │ +_8_3_4 _f_r_o_n_t() const │ │ │ │ +835 { │ │ │ │ +836 ___N_o_d_e* _____f_r_o_n_t = static_cast<___N_o_d_e*>(this->_M_impl._M_head._M_next); │ │ │ │ +837 return *_____f_r_o_n_t->_M_valptr(); │ │ │ │ +838 } │ │ │ │ +839 │ │ │ │ +840 // 23.3.4.5 modifiers: │ │ │ │ +841 │ │ │ │ +842 /** │ │ │ │ +843 * @brief Constructs object in %forward_list at the front of the │ │ │ │ +844 * list. │ │ │ │ +845 * @param __args Arguments. │ │ │ │ +846 * │ │ │ │ +847 * This function will insert an object of type Tp constructed │ │ │ │ +848 * with Tp(std::forward(args)...) at the front of the list │ │ │ │ +849 * Due to the nature of a %forward_list this operation can │ │ │ │ +850 * be done in constant time, and does not invalidate iterators │ │ │ │ +851 * and references. │ │ │ │ +852 */ │ │ │ │ +853 template │ │ │ │ +854#if __cplusplus > 201402L │ │ │ │ +855 reference │ │ │ │ +856#else │ │ │ │ +857 void │ │ │ │ +858#endif │ │ │ │ +_8_5_9 _e_m_p_l_a_c_e___f_r_o_n_t(___A_r_g_s&&... _____a_r_g_s) │ │ │ │ +860 { │ │ │ │ +861 this->_M_insert_after(_c_b_e_f_o_r_e___b_e_g_i_n(), │ │ │ │ +862 _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(_____a_r_g_s)...); │ │ │ │ +863#if __cplusplus > 201402L │ │ │ │ +864 return _f_r_o_n_t(); │ │ │ │ +865#endif │ │ │ │ +866 } │ │ │ │ +867 │ │ │ │ +868 /** │ │ │ │ +869 * @brief Add data to the front of the %forward_list. │ │ │ │ +870 * @param __val Data to be added. │ │ │ │ +871 * │ │ │ │ +872 * This is a typical stack operation. The function creates an │ │ │ │ +873 * element at the front of the %forward_list and assigns the given │ │ │ │ +874 * data to it. Due to the nature of a %forward_list this operation │ │ │ │ +875 * can be done in constant time, and does not invalidate iterators │ │ │ │ +876 * and references. │ │ │ │ +877 */ │ │ │ │ +878 void │ │ │ │ +_8_7_9 _p_u_s_h___f_r_o_n_t(const _Tp& __val) │ │ │ │ +880 { this->_M_insert_after(_c_b_e_f_o_r_e___b_e_g_i_n(), __val); } │ │ │ │ +881 │ │ │ │ +882 /** │ │ │ │ +883 * │ │ │ │ +884 */ │ │ │ │ +885 void │ │ │ │ +886 _p_u_s_h___f_r_o_n_t(_Tp&& __val) │ │ │ │ +887 { this->_M_insert_after(_c_b_e_f_o_r_e___b_e_g_i_n(), _s_t_d_:_:_m_o_v_e(__val)); } │ │ │ │ +888 │ │ │ │ +889 /** │ │ │ │ +890 * @brief Removes first element. │ │ │ │ +891 * │ │ │ │ +892 * This is a typical stack operation. It shrinks the %forward_list │ │ │ │ +893 * by one. Due to the nature of a %forward_list this operation can │ │ │ │ +894 * be done in constant time, and only invalidates iterators/references │ │ │ │ +895 * to the element being removed. │ │ │ │ +896 * │ │ │ │ +897 * Note that no data is returned, and if the first element's data │ │ │ │ +898 * is needed, it should be retrieved before pop_front() is │ │ │ │ +899 * called. │ │ │ │ +900 */ │ │ │ │ +901 void │ │ │ │ +_9_0_2 _p_o_p___f_r_o_n_t() │ │ │ │ +903 { this->_M_erase_after(&this->_M_impl._M_head); } │ │ │ │ +904 │ │ │ │ +905 /** │ │ │ │ +906 * @brief Constructs object in %forward_list after the specified │ │ │ │ +907 * iterator. │ │ │ │ +908 * @param __pos A const_iterator into the %forward_list. │ │ │ │ +909 * @param __args Arguments. │ │ │ │ +910 * @return An iterator that points to the inserted data. │ │ │ │ +911 * │ │ │ │ +912 * This function will insert an object of type T constructed │ │ │ │ +913 * with T(std::forward(args)...) after the specified │ │ │ │ +914 * location. Due to the nature of a %forward_list this operation can │ │ │ │ +915 * be done in constant time, and does not invalidate iterators │ │ │ │ +916 * and references. │ │ │ │ +917 */ │ │ │ │ +918 template │ │ │ │ +919 _i_t_e_r_a_t_o_r │ │ │ │ +_9_2_0 _e_m_p_l_a_c_e___a_f_t_e_r(_c_o_n_s_t___i_t_e_r_a_t_o_r _____p_o_s, ___A_r_g_s&&... _____a_r_g_s) │ │ │ │ +921 { return _i_t_e_r_a_t_o_r(this->_M_insert_after(_____p_o_s, │ │ │ │ +922 _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(_____a_r_g_s)...)); } │ │ │ │ +923 │ │ │ │ +924 /** │ │ │ │ +925 * @brief Inserts given value into %forward_list after specified │ │ │ │ +926 * iterator. │ │ │ │ +927 * @param __pos An iterator into the %forward_list. │ │ │ │ +928 * @param __val Data to be inserted. │ │ │ │ +929 * @return An iterator that points to the inserted data. │ │ │ │ +930 * │ │ │ │ +931 * This function will insert a copy of the given value after │ │ │ │ +932 * the specified location. Due to the nature of a %forward_list this │ │ │ │ +933 * operation can be done in constant time, and does not │ │ │ │ +934 * invalidate iterators and references. │ │ │ │ +935 */ │ │ │ │ +936 _i_t_e_r_a_t_o_r │ │ │ │ +_9_3_7 _i_n_s_e_r_t___a_f_t_e_r(_c_o_n_s_t___i_t_e_r_a_t_o_r _____p_o_s, const _Tp& __val) │ │ │ │ +938 { return _i_t_e_r_a_t_o_r(this->_M_insert_after(_____p_o_s, __val)); } │ │ │ │ +939 │ │ │ │ +940 /** │ │ │ │ +941 * │ │ │ │ +942 */ │ │ │ │ +943 _i_t_e_r_a_t_o_r │ │ │ │ +944 _i_n_s_e_r_t___a_f_t_e_r(const_iterator _____p_o_s, _Tp&& __val) │ │ │ │ +945 { return _i_t_e_r_a_t_o_r(this->_M_insert_after(_____p_o_s, _s_t_d_:_:_m_o_v_e(__val))); } │ │ │ │ +946 │ │ │ │ +947 /** │ │ │ │ +948 * @brief Inserts a number of copies of given data into the │ │ │ │ +949 * %forward_list. │ │ │ │ +950 * @param __pos An iterator into the %forward_list. │ │ │ │ +951 * @param __n Number of elements to be inserted. │ │ │ │ +952 * @param __val Data to be inserted. │ │ │ │ +953 * @return An iterator pointing to the last inserted copy of │ │ │ │ +954 * @a val or @a pos if @a n == 0. │ │ │ │ +955 * │ │ │ │ +956 * This function will insert a specified number of copies of the │ │ │ │ +957 * given data after the location specified by @a pos. │ │ │ │ +958 * │ │ │ │ +959 * This operation is linear in the number of elements inserted and │ │ │ │ +960 * does not invalidate iterators and references. │ │ │ │ +961 */ │ │ │ │ +962 iterator │ │ │ │ +963 _i_n_s_e_r_t___a_f_t_e_r(const_iterator __pos, size_type __n, const _Tp& __val); │ │ │ │ +964 │ │ │ │ +965 /** │ │ │ │ +966 * @brief Inserts a range into the %forward_list. │ │ │ │ +967 * @param __pos An iterator into the %forward_list. │ │ │ │ +968 * @param __first An input iterator. │ │ │ │ +969 * @param __last An input iterator. │ │ │ │ +970 * @return An iterator pointing to the last inserted element or │ │ │ │ +971 * @a __pos if @a __first == @a __last. │ │ │ │ +972 * │ │ │ │ +973 * This function will insert copies of the data in the range │ │ │ │ +974 * [@a __first,@a __last) into the %forward_list after the │ │ │ │ +975 * location specified by @a __pos. │ │ │ │ +976 * │ │ │ │ +977 * This operation is linear in the number of elements inserted and │ │ │ │ +978 * does not invalidate iterators and references. │ │ │ │ +979 */ │ │ │ │ +980 template> │ │ │ │ +982 iterator │ │ │ │ +983 _i_n_s_e_r_t___a_f_t_e_r(const_iterator __pos, │ │ │ │ +984 _InputIterator __first, _InputIterator __last); │ │ │ │ +985 │ │ │ │ +986 /** │ │ │ │ +987 * @brief Inserts the contents of an initializer_list into │ │ │ │ +988 * %forward_list after the specified iterator. │ │ │ │ +989 * @param __pos An iterator into the %forward_list. │ │ │ │ +990 * @param __il An initializer_list of value_type. │ │ │ │ +991 * @return An iterator pointing to the last inserted element │ │ │ │ +992 * or @a __pos if @a __il is empty. │ │ │ │ +993 * │ │ │ │ +994 * This function will insert copies of the data in the │ │ │ │ +995 * initializer_list @a __il into the %forward_list before the location │ │ │ │ +996 * specified by @a __pos. │ │ │ │ +997 * │ │ │ │ +998 * This operation is linear in the number of elements inserted and │ │ │ │ +999 * does not invalidate iterators and references. │ │ │ │ +1000 */ │ │ │ │ +1001 iterator │ │ │ │ +_1_0_0_2 _i_n_s_e_r_t___a_f_t_e_r(_c_o_n_s_t___i_t_e_r_a_t_o_r _____p_o_s, _s_t_d_:_:_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t_<___T_p_> _____i_l) │ │ │ │ +1003 { return _i_n_s_e_r_t___a_f_t_e_r(_____p_o_s, _____i_l.begin(), _____i_l.end()); } │ │ │ │ +1004 │ │ │ │ +1005 /** │ │ │ │ +1006 * @brief Removes the element pointed to by the iterator following │ │ │ │ +1007 * @c pos. │ │ │ │ +1008 * @param __pos Iterator pointing before element to be erased. │ │ │ │ +1009 * @return An iterator pointing to the element following the one │ │ │ │ +1010 * that was erased, or end() if no such element exists. │ │ │ │ +1011 * │ │ │ │ +1012 * This function will erase the element at the given position and │ │ │ │ +1013 * thus shorten the %forward_list by one. │ │ │ │ +1014 * │ │ │ │ +1015 * Due to the nature of a %forward_list this operation can be done │ │ │ │ +1016 * in constant time, and only invalidates iterators/references to │ │ │ │ +1017 * the element being removed. The user is also cautioned that │ │ │ │ +1018 * this function only erases the element, and that if the element │ │ │ │ +1019 * is itself a pointer, the pointed-to memory is not touched in │ │ │ │ +1020 * any way. Managing the pointer is the user's responsibility. │ │ │ │ +1021 */ │ │ │ │ +1022 _i_t_e_r_a_t_o_r │ │ │ │ +_1_0_2_3 _e_r_a_s_e___a_f_t_e_r(_c_o_n_s_t___i_t_e_r_a_t_o_r _____p_o_s) │ │ │ │ +1024 { return _i_t_e_r_a_t_o_r(this->_M_erase_after(const_cast<___N_o_d_e___b_a_s_e*> │ │ │ │ +1025 (_____p_o_s._M_node))); } │ │ │ │ +1026 │ │ │ │ +1027 /** │ │ │ │ +1028 * @brief Remove a range of elements. │ │ │ │ +1029 * @param __pos Iterator pointing before the first element to be │ │ │ │ +1030 * erased. │ │ │ │ +1031 * @param __last Iterator pointing to one past the last element to be │ │ │ │ +1032 * erased. │ │ │ │ +1033 * @return @ __last. │ │ │ │ +1034 * │ │ │ │ +1035 * This function will erase the elements in the range │ │ │ │ +1036 * @a (__pos,__last) and shorten the %forward_list accordingly. │ │ │ │ +1037 * │ │ │ │ +1038 * This operation is linear time in the size of the range and only │ │ │ │ +1039 * invalidates iterators/references to the element being removed. │ │ │ │ +1040 * The user is also cautioned that this function only erases the │ │ │ │ +1041 * elements, and that if the elements themselves are pointers, the │ │ │ │ +1042 * pointed-to memory is not touched in any way. Managing the pointer │ │ │ │ +1043 * is the user's responsibility. │ │ │ │ +1044 */ │ │ │ │ +1045 _i_t_e_r_a_t_o_r │ │ │ │ +_1_0_4_6 _e_r_a_s_e___a_f_t_e_r(_c_o_n_s_t___i_t_e_r_a_t_o_r _____p_o_s, _c_o_n_s_t___i_t_e_r_a_t_o_r __last) │ │ │ │ +1047 { return _i_t_e_r_a_t_o_r(this->_M_erase_after(const_cast<___N_o_d_e___b_a_s_e*> │ │ │ │ +1048 (_____p_o_s._M_node), │ │ │ │ +1049 const_cast<___N_o_d_e___b_a_s_e*> │ │ │ │ +1050 (__last._M_node))); } │ │ │ │ +1051 │ │ │ │ +1052 /** │ │ │ │ +1053 * @brief Swaps data with another %forward_list. │ │ │ │ +1054 * @param __list A %forward_list of the same element and allocator │ │ │ │ +1055 * types. │ │ │ │ +1056 * │ │ │ │ +1057 * This exchanges the elements between two lists in constant │ │ │ │ +1058 * time. Note that the global std::swap() function is │ │ │ │ +1059 * specialized such that std::swap(l1,l2) will feed to this │ │ │ │ +1060 * function. │ │ │ │ +1061 * │ │ │ │ +1062 * Whether the allocators are swapped depends on the allocator traits. │ │ │ │ +1063 */ │ │ │ │ +1064 void │ │ │ │ +_1_0_6_5 _s_w_a_p(_f_o_r_w_a_r_d___l_i_s_t& _____l_i_s_t) noexcept │ │ │ │ +1066 { │ │ │ │ +1067 _s_t_d_:_:_s_w_a_p(this->_M_impl._M_head._M_next, │ │ │ │ +1068 _____l_i_s_t._M_impl._M_head._M_next); │ │ │ │ +1069 _Node_alloc_traits::_S_on_swap(this->_M_get_Node_allocator(), │ │ │ │ +1070 _____l_i_s_t._M_get_Node_allocator()); │ │ │ │ +1071 } │ │ │ │ +1072 │ │ │ │ +1073 /** │ │ │ │ +1074 * @brief Resizes the %forward_list to the specified number of │ │ │ │ +1075 * elements. │ │ │ │ +1076 * @param __sz Number of elements the %forward_list should contain. │ │ │ │ +1077 * │ │ │ │ +1078 * This function will %resize the %forward_list to the specified │ │ │ │ +1079 * number of elements. If the number is smaller than the │ │ │ │ +1080 * %forward_list's current number of elements the %forward_list │ │ │ │ +1081 * is truncated, otherwise the %forward_list is extended and the │ │ │ │ +1082 * new elements are default constructed. │ │ │ │ +1083 */ │ │ │ │ +1084 void │ │ │ │ +1085 _r_e_s_i_z_e(size_type _____s_z); │ │ │ │ +1086 │ │ │ │ +1087 /** │ │ │ │ +1088 * @brief Resizes the %forward_list to the specified number of │ │ │ │ +1089 * elements. │ │ │ │ +1090 * @param __sz Number of elements the %forward_list should contain. │ │ │ │ +1091 * @param __val Data with which new elements should be populated. │ │ │ │ +1092 * │ │ │ │ +1093 * This function will %resize the %forward_list to the specified │ │ │ │ +1094 * number of elements. If the number is smaller than the │ │ │ │ +1095 * %forward_list's current number of elements the %forward_list │ │ │ │ +1096 * is truncated, otherwise the %forward_list is extended and new │ │ │ │ +1097 * elements are populated with given data. │ │ │ │ +1098 */ │ │ │ │ +1099 void │ │ │ │ +1100 _r_e_s_i_z_e(size_type _____s_z, const value_type& __val); │ │ │ │ +1101 │ │ │ │ +1102 /** │ │ │ │ +1103 * @brief Erases all the elements. │ │ │ │ +1104 * │ │ │ │ +1105 * Note that this function only erases │ │ │ │ +1106 * the elements, and that if the elements themselves are │ │ │ │ +1107 * pointers, the pointed-to memory is not touched in any way. │ │ │ │ +1108 * Managing the pointer is the user's responsibility. │ │ │ │ +1109 */ │ │ │ │ +1110 void │ │ │ │ +_1_1_1_1 _c_l_e_a_r() noexcept │ │ │ │ +1112 { this->_M_erase_after(&this->_M_impl._M_head, nullptr); } │ │ │ │ +1113 │ │ │ │ +1114 // 23.3.4.6 forward_list operations: │ │ │ │ +1115 │ │ │ │ +1116 /** │ │ │ │ +1117 * @brief Insert contents of another %forward_list. │ │ │ │ +1118 * @param __pos Iterator referencing the element to insert after. │ │ │ │ +1119 * @param __list Source list. │ │ │ │ +1120 * │ │ │ │ +1121 * The elements of @a list are inserted in constant time after │ │ │ │ +1122 * the element referenced by @a pos. @a list becomes an empty │ │ │ │ +1123 * list. │ │ │ │ +1124 * │ │ │ │ +1125 * Requires this != @a x. │ │ │ │ +1126 */ │ │ │ │ +1127 void │ │ │ │ +_1_1_2_8 _s_p_l_i_c_e___a_f_t_e_r(_c_o_n_s_t___i_t_e_r_a_t_o_r _____p_o_s, _f_o_r_w_a_r_d___l_i_s_t&& _____l_i_s_t) noexcept │ │ │ │ +1129 { │ │ │ │ +1130 if (!_____l_i_s_t.empty()) │ │ │ │ +1131 _M_splice_after(_____p_o_s, _____l_i_s_t.before_begin(), _____l_i_s_t.end()); │ │ │ │ +1132 } │ │ │ │ +1133 │ │ │ │ +1134 void │ │ │ │ +1135 _s_p_l_i_c_e___a_f_t_e_r(const_iterator _____p_o_s, _f_o_r_w_a_r_d___l_i_s_t& _____l_i_s_t) noexcept │ │ │ │ +1136 { _s_p_l_i_c_e___a_f_t_e_r(_____p_o_s, _s_t_d_:_:_m_o_v_e(_____l_i_s_t)); } │ │ │ │ +1137 │ │ │ │ +1138 /** │ │ │ │ +1139 * @brief Insert element from another %forward_list. │ │ │ │ +1140 * @param __pos Iterator referencing the element to insert after. │ │ │ │ +1141 * @param __list Source list. │ │ │ │ +1142 * @param __i Iterator referencing the element before the element │ │ │ │ +1143 * to move. │ │ │ │ +1144 * │ │ │ │ +1145 * Removes the element in list @a list referenced by @a i and │ │ │ │ +1146 * inserts it into the current list after @a pos. │ │ │ │ +1147 */ │ │ │ │ +1148 void │ │ │ │ +1149 _s_p_l_i_c_e___a_f_t_e_r(const_iterator __pos, _f_o_r_w_a_r_d___l_i_s_t&& __list, │ │ │ │ +1150 const_iterator __i) noexcept; │ │ │ │ +1151 │ │ │ │ +1152 void │ │ │ │ +1153 _s_p_l_i_c_e___a_f_t_e_r(const_iterator __pos, _f_o_r_w_a_r_d___l_i_s_t& __list, │ │ │ │ +1154 const_iterator __i) noexcept │ │ │ │ +1155 { _s_p_l_i_c_e___a_f_t_e_r(__pos, _s_t_d_:_:_m_o_v_e(__list), __i); } │ │ │ │ +1156 │ │ │ │ +1157 /** │ │ │ │ +1158 * @brief Insert range from another %forward_list. │ │ │ │ +1159 * @param __pos Iterator referencing the element to insert after. │ │ │ │ +1160 * @param __list Source list. │ │ │ │ +1161 * @param __before Iterator referencing before the start of range │ │ │ │ +1162 * in list. │ │ │ │ +1163 * @param __last Iterator referencing the end of range in list. │ │ │ │ +1164 * │ │ │ │ +1165 * Removes elements in the range (__before,__last) and inserts them │ │ │ │ +1166 * after @a __pos in constant time. │ │ │ │ +1167 * │ │ │ │ +1168 * Undefined if @a __pos is in (__before,__last). │ │ │ │ +1169 * @{ │ │ │ │ +1170 */ │ │ │ │ +1171 void │ │ │ │ +_1_1_7_2 _s_p_l_i_c_e___a_f_t_e_r(_c_o_n_s_t___i_t_e_r_a_t_o_r _____p_o_s, _f_o_r_w_a_r_d___l_i_s_t&&, │ │ │ │ +1173 _c_o_n_s_t___i_t_e_r_a_t_o_r _____b_e_f_o_r_e, _c_o_n_s_t___i_t_e_r_a_t_o_r __last) noexcept │ │ │ │ +1174 { _M_splice_after(_____p_o_s, _____b_e_f_o_r_e, __last); } │ │ │ │ +1175 │ │ │ │ +1176 void │ │ │ │ +_1_1_7_7 _s_p_l_i_c_e___a_f_t_e_r(_c_o_n_s_t___i_t_e_r_a_t_o_r _____p_o_s, _f_o_r_w_a_r_d___l_i_s_t&, │ │ │ │ +1178 _c_o_n_s_t___i_t_e_r_a_t_o_r _____b_e_f_o_r_e, _c_o_n_s_t___i_t_e_r_a_t_o_r __last) noexcept │ │ │ │ +1179 { _M_splice_after(_____p_o_s, _____b_e_f_o_r_e, __last); } │ │ │ │ +1180 /// @} │ │ │ │ +1181 │ │ │ │ +1182 private: │ │ │ │ +1183#if __cplusplus > 201703L │ │ │ │ +1184# define __cpp_lib_list_remove_return_type 201806L │ │ │ │ +1185 using __remove_return_type = size_type; │ │ │ │ +1186# define _GLIBCXX_FWDLIST_REMOVE_RETURN_TYPE_TAG \ │ │ │ │ +1187 __attribute__((__abi_tag__("__cxx20"))) │ │ │ │ +1188#else │ │ │ │ +1189 using __remove_return_type = _v_o_i_d; │ │ │ │ +1190# define _GLIBCXX_FWDLIST_REMOVE_RETURN_TYPE_TAG │ │ │ │ +1191#endif │ │ │ │ +1192 public: │ │ │ │ +1193 │ │ │ │ +1194 /** │ │ │ │ +1195 * @brief Remove all elements equal to value. │ │ │ │ +1196 * @param __val The value to remove. │ │ │ │ +1197 * │ │ │ │ +1198 * Removes every element in the list equal to @a __val. │ │ │ │ +1199 * Remaining elements stay in list order. Note that this │ │ │ │ +1200 * function only erases the elements, and that if the elements │ │ │ │ +1201 * themselves are pointers, the pointed-to memory is not │ │ │ │ +1202 * touched in any way. Managing the pointer is the user's │ │ │ │ +1203 * responsibility. │ │ │ │ +1204 */ │ │ │ │ +1205 _GLIBCXX_FWDLIST_REMOVE_RETURN_TYPE_TAG │ │ │ │ +1206 __remove_return_type │ │ │ │ +1207 _r_e_m_o_v_e(const _Tp& __val); │ │ │ │ +1208 │ │ │ │ +1209 /** │ │ │ │ +1210 * @brief Remove all elements satisfying a predicate. │ │ │ │ +1211 * @param __pred Unary predicate function or object. │ │ │ │ +1212 * │ │ │ │ +1213 * Removes every element in the list for which the predicate │ │ │ │ +1214 * returns true. Remaining elements stay in list order. Note │ │ │ │ +1215 * that this function only erases the elements, and that if the │ │ │ │ +1216 * elements themselves are pointers, the pointed-to memory is │ │ │ │ +1217 * not touched in any way. Managing the pointer is the user's │ │ │ │ +1218 * responsibility. │ │ │ │ +1219 */ │ │ │ │ +1220 template │ │ │ │ +1221 __remove_return_type │ │ │ │ +_1_2_2_2 _r_e_m_o_v_e___i_f(___P_r_e_d _____p_r_e_d); │ │ │ │ +1223 │ │ │ │ +1224 /** │ │ │ │ +1225 * @brief Remove consecutive duplicate elements. │ │ │ │ +1226 * │ │ │ │ +1227 * For each consecutive set of elements with the same value, │ │ │ │ +1228 * remove all but the first one. Remaining elements stay in │ │ │ │ +1229 * list order. Note that this function only erases the │ │ │ │ +1230 * elements, and that if the elements themselves are pointers, │ │ │ │ +1231 * the pointed-to memory is not touched in any way. Managing │ │ │ │ +1232 * the pointer is the user's responsibility. │ │ │ │ +1233 */ │ │ │ │ +1234 _GLIBCXX_FWDLIST_REMOVE_RETURN_TYPE_TAG │ │ │ │ +1235 __remove_return_type │ │ │ │ +_1_2_3_6 _u_n_i_q_u_e() │ │ │ │ +1237 { return _u_n_i_q_u_e(_s_t_d_:_:_e_q_u_a_l___t_o_<___T_p_>()); } │ │ │ │ +1238 │ │ │ │ +1239#undef _GLIBCXX_FWDLIST_REMOVE_RETURN_TYPE_TAG │ │ │ │ +1240 │ │ │ │ +1241 /** │ │ │ │ +1242 * @brief Remove consecutive elements satisfying a predicate. │ │ │ │ +1243 * @param __binary_pred Binary predicate function or object. │ │ │ │ +1244 * │ │ │ │ +1245 * For each consecutive set of elements [first,last) that │ │ │ │ +1246 * satisfy predicate(first,i) where i is an iterator in │ │ │ │ +1247 * [first,last), remove all but the first one. Remaining │ │ │ │ +1248 * elements stay in list order. Note that this function only │ │ │ │ +1249 * erases the elements, and that if the elements themselves are │ │ │ │ +1250 * pointers, the pointed-to memory is not touched in any way. │ │ │ │ +1251 * Managing the pointer is the user's responsibility. │ │ │ │ +1252 */ │ │ │ │ +1253 template │ │ │ │ +1254 __remove_return_type │ │ │ │ +_1_2_5_5 _u_n_i_q_u_e(___B_i_n_P_r_e_d _____b_i_n_a_r_y___p_r_e_d); │ │ │ │ +1256 │ │ │ │ +1257 /** │ │ │ │ +1258 * @brief Merge sorted lists. │ │ │ │ +1259 * @param __list Sorted list to merge. │ │ │ │ +1260 * │ │ │ │ +1261 * Assumes that both @a list and this list are sorted according to │ │ │ │ +1262 * operator<(). Merges elements of @a __list into this list in │ │ │ │ +1263 * sorted order, leaving @a __list empty when complete. Elements in │ │ │ │ +1264 * this list precede elements in @a __list that are equal. │ │ │ │ +1265 */ │ │ │ │ +1266 void │ │ │ │ +_1_2_6_7 _m_e_r_g_e(_f_o_r_w_a_r_d___l_i_s_t&& _____l_i_s_t) │ │ │ │ +1268 { _m_e_r_g_e(_s_t_d_:_:_m_o_v_e(_____l_i_s_t), _s_t_d_:_:_l_e_s_s_<___T_p_>()); } │ │ │ │ +1269 │ │ │ │ +1270 void │ │ │ │ +1271 _m_e_r_g_e(_f_o_r_w_a_r_d___l_i_s_t& _____l_i_s_t) │ │ │ │ +1272 { _m_e_r_g_e(_s_t_d_:_:_m_o_v_e(_____l_i_s_t)); } │ │ │ │ +1273 │ │ │ │ +1274 /** │ │ │ │ +1275 * @brief Merge sorted lists according to comparison function. │ │ │ │ +1276 * @param __list Sorted list to merge. │ │ │ │ +1277 * @param __comp Comparison function defining sort order. │ │ │ │ +1278 * │ │ │ │ +1279 * Assumes that both @a __list and this list are sorted according to │ │ │ │ +1280 * comp. Merges elements of @a __list into this list │ │ │ │ +1281 * in sorted order, leaving @a __list empty when complete. Elements │ │ │ │ +1282 * in this list precede elements in @a __list that are equivalent │ │ │ │ +1283 * according to comp(). │ │ │ │ +1284 */ │ │ │ │ +1285 template │ │ │ │ +1286 void │ │ │ │ +1287 _m_e_r_g_e(_f_o_r_w_a_r_d___l_i_s_t&& __list, _Comp __comp); │ │ │ │ +1288 │ │ │ │ +1289 template │ │ │ │ +1290 void │ │ │ │ +1291 _m_e_r_g_e(_f_o_r_w_a_r_d___l_i_s_t& __list, _Comp __comp) │ │ │ │ +1292 { _m_e_r_g_e(_s_t_d_:_:_m_o_v_e(__list), __comp); } │ │ │ │ +1293 │ │ │ │ +1294 /** │ │ │ │ +1295 * @brief Sort the elements of the list. │ │ │ │ +1296 * │ │ │ │ +1297 * Sorts the elements of this list in NlogN time. Equivalent │ │ │ │ +1298 * elements remain in list order. │ │ │ │ +1299 */ │ │ │ │ +1300 void │ │ │ │ +_1_3_0_1 _s_o_r_t() │ │ │ │ +1302 { _s_o_r_t(_s_t_d_:_:_l_e_s_s_<___T_p_>()); } │ │ │ │ +1303 │ │ │ │ +1304 /** │ │ │ │ +1305 * @brief Sort the forward_list using a comparison function. │ │ │ │ +1306 * │ │ │ │ +1307 * Sorts the elements of this list in NlogN time. Equivalent │ │ │ │ +1308 * elements remain in list order. │ │ │ │ +1309 */ │ │ │ │ +1310 template │ │ │ │ +1311 void │ │ │ │ +1312 _s_o_r_t(___C_o_m_p __comp); │ │ │ │ +1313 │ │ │ │ +1314 /** │ │ │ │ +1315 * @brief Reverse the elements in list. │ │ │ │ +1316 * │ │ │ │ +1317 * Reverse the order of elements in the list in linear time. │ │ │ │ +1318 */ │ │ │ │ +1319 void │ │ │ │ +_1_3_2_0 _r_e_v_e_r_s_e() noexcept │ │ │ │ +1321 { this->_M_impl._M_head._M_reverse_after(); } │ │ │ │ +1322 │ │ │ │ +1323 private: │ │ │ │ +1324 // Called by the range constructor to implement [23.3.4.2]/9 │ │ │ │ +1325 template │ │ │ │ +1326 void │ │ │ │ +1327 _M_range_initialize(___I_n_p_u_t_I_t_e_r_a_t_o_r __first, ___I_n_p_u_t_I_t_e_r_a_t_o_r __last); │ │ │ │ +1328 │ │ │ │ +1329 // Called by forward_list(n,v,a), and the range constructor when it │ │ │ │ +1330 // turns out to be the same thing. │ │ │ │ +1331 void │ │ │ │ +1332 _M_fill_initialize(size_type __n, const value_type& __value); │ │ │ │ +1333 │ │ │ │ +1334 // Called by splice_after and insert_after. │ │ │ │ +1335 _i_t_e_r_a_t_o_r │ │ │ │ +1336 _M_splice_after(const_iterator _____p_o_s, const_iterator _____b_e_f_o_r_e, │ │ │ │ +1337 const_iterator __last); │ │ │ │ +1338 │ │ │ │ +1339 // Called by forward_list(n). │ │ │ │ +1340 void │ │ │ │ +1341 _M_default_initialize(size_type __n); │ │ │ │ +1342 │ │ │ │ +1343 // Called by resize(sz). │ │ │ │ +1344 void │ │ │ │ +1345 _M_default_insert_after(const_iterator _____p_o_s, size_type __n); │ │ │ │ +1346 │ │ │ │ +1347 // Called by operator=(forward_list&&) │ │ │ │ +1348 void │ │ │ │ +1349 _M_move_assign(_f_o_r_w_a_r_d___l_i_s_t&& _____l_i_s_t, _t_r_u_e___t_y_p_e) noexcept │ │ │ │ +1350 { │ │ │ │ +1351 _c_l_e_a_r(); │ │ │ │ +1352 this->_M_impl._M_head._M_next = _____l_i_s_t._M_impl._M_head._M_next; │ │ │ │ +1353 _____l_i_s_t._M_impl._M_head._M_next = nullptr; │ │ │ │ +1354 _s_t_d_:_:_____a_l_l_o_c___o_n___m_o_v_e(this->_M_get_Node_allocator(), │ │ │ │ +1355 _____l_i_s_t._M_get_Node_allocator()); │ │ │ │ +1356 } │ │ │ │ +1357 │ │ │ │ +1358 // Called by operator=(forward_list&&) │ │ │ │ +1359 void │ │ │ │ +1360 _M_move_assign(_f_o_r_w_a_r_d___l_i_s_t&& __list, _f_a_l_s_e___t_y_p_e) │ │ │ │ +1361 { │ │ │ │ +1362 if (__list._M_get_Node_allocator() == this->_M_get_Node_allocator()) │ │ │ │ +1363 _M_move_assign(_s_t_d_:_:_m_o_v_e(__list), _t_r_u_e___t_y_p_e()); │ │ │ │ +1364 else │ │ │ │ +1365 // The rvalue's allocator cannot be moved, or is not equal, │ │ │ │ +1366 // so we need to individually move each element. │ │ │ │ +1367 this->_a_s_s_i_g_n(std::make_move_iterator(__list.begin()), │ │ │ │ +1368 std::make_move_iterator(__list.end())); │ │ │ │ +1369 } │ │ │ │ +1370 │ │ │ │ +1371 // Called by assign(_InputIterator, _InputIterator) if _Tp is │ │ │ │ +1372 // CopyAssignable. │ │ │ │ +1373 template │ │ │ │ +1374 void │ │ │ │ +1375 _M_assign(_InputIterator __first, _InputIterator __last, _t_r_u_e___t_y_p_e) │ │ │ │ +1376 { │ │ │ │ +1377 auto __prev = _b_e_f_o_r_e___b_e_g_i_n(); │ │ │ │ +1378 auto __curr = _b_e_g_i_n(); │ │ │ │ +1379 auto __end = _e_n_d(); │ │ │ │ +1380 while (__curr != __end && __first != __last) │ │ │ │ +1381 { │ │ │ │ +1382 *__curr = *__first; │ │ │ │ +1383 ++__prev; │ │ │ │ +1384 ++__curr; │ │ │ │ +1385 ++__first; │ │ │ │ +1386 } │ │ │ │ +1387 if (__first != __last) │ │ │ │ +1388 _i_n_s_e_r_t___a_f_t_e_r(__prev, __first, __last); │ │ │ │ +1389 else if (__curr != __end) │ │ │ │ +1390 _e_r_a_s_e___a_f_t_e_r(__prev, __end); │ │ │ │ +1391 } │ │ │ │ +1392 │ │ │ │ +1393 // Called by assign(_InputIterator, _InputIterator) if _Tp is not │ │ │ │ +1394 // CopyAssignable. │ │ │ │ +1395 template │ │ │ │ +1396 void │ │ │ │ +1397 _M_assign(_InputIterator __first, _InputIterator __last, _f_a_l_s_e___t_y_p_e) │ │ │ │ +1398 { │ │ │ │ +1399 _c_l_e_a_r(); │ │ │ │ +1400 _i_n_s_e_r_t___a_f_t_e_r(_c_b_e_f_o_r_e___b_e_g_i_n(), __first, __last); │ │ │ │ +1401 } │ │ │ │ +1402 │ │ │ │ +1403 // Called by assign(size_type, const _Tp&) if Tp is CopyAssignable │ │ │ │ +1404 void │ │ │ │ +1405 _M_assign_n(size_type __n, const _Tp& __val, _t_r_u_e___t_y_p_e) │ │ │ │ +1406 { │ │ │ │ +1407 auto __prev = _b_e_f_o_r_e___b_e_g_i_n(); │ │ │ │ +1408 auto __curr = _b_e_g_i_n(); │ │ │ │ +1409 auto __end = _e_n_d(); │ │ │ │ +1410 while (__curr != __end && __n > 0) │ │ │ │ +1411 { │ │ │ │ +1412 *__curr = __val; │ │ │ │ +1413 ++__prev; │ │ │ │ +1414 ++__curr; │ │ │ │ +1415 --__n; │ │ │ │ +1416 } │ │ │ │ +1417 if (__n > 0) │ │ │ │ +1418 _i_n_s_e_r_t___a_f_t_e_r(__prev, __n, __val); │ │ │ │ +1419 else if (__curr != __end) │ │ │ │ +1420 _e_r_a_s_e___a_f_t_e_r(__prev, __end); │ │ │ │ +1421 } │ │ │ │ +1422 │ │ │ │ +1423 // Called by assign(size_type, const _Tp&) if Tp is non-CopyAssignable │ │ │ │ +1424 void │ │ │ │ +1425 _M_assign_n(size_type __n, const _Tp& __val, _f_a_l_s_e___t_y_p_e) │ │ │ │ +1426 { │ │ │ │ +1427 _c_l_e_a_r(); │ │ │ │ +1428 _i_n_s_e_r_t___a_f_t_e_r(_c_b_e_f_o_r_e___b_e_g_i_n(), __n, __val); │ │ │ │ +1429 } │ │ │ │ +1430 }; │ │ │ │ +1431 │ │ │ │ +1432#if __cpp_deduction_guides >= 201606 │ │ │ │ +1433 template::value_type, │ │ │ │ +1435 typename _Allocator = allocator<_ValT>, │ │ │ │ +1436 typename = _RequireInputIter<_InputIterator>, │ │ │ │ +1437 typename = _RequireAllocator<_Allocator>> │ │ │ │ +1438 forward_list(_InputIterator, _InputIterator, _Allocator = _Allocator()) │ │ │ │ +1439 -> forward_list<_ValT, _Allocator>; │ │ │ │ +1440#endif │ │ │ │ +1441 │ │ │ │ +1442 /** │ │ │ │ +1443 * @brief Forward list equality comparison. │ │ │ │ +1444 * @param __lx A %forward_list │ │ │ │ +1445 * @param __ly A %forward_list of the same type as @a __lx. │ │ │ │ +1446 * @return True iff the elements of the forward lists are equal. │ │ │ │ +1447 * │ │ │ │ +1448 * This is an equivalence relation. It is linear in the number of │ │ │ │ +1449 * elements of the forward lists. Deques are considered equivalent │ │ │ │ +1450 * if corresponding elements compare equal. │ │ │ │ +1451 */ │ │ │ │ +1452 template │ │ │ │ +1453 [[__nodiscard__]] │ │ │ │ +1454 bool │ │ │ │ +1455 operator==(const forward_list<_Tp, _Alloc>& __lx, │ │ │ │ +1456 const forward_list<_Tp, _Alloc>& __ly); │ │ │ │ +1457 │ │ │ │ +1458#if __cpp_lib_three_way_comparison │ │ │ │ +1459 /** │ │ │ │ +1460 * @brief Forward list ordering relation. │ │ │ │ +1461 * @param __x A `forward_list`. │ │ │ │ +1462 * @param __y A `forward_list` of the same type as `__x`. │ │ │ │ +1463 * @return A value indicating whether `__x` is less than, equal to, │ │ │ │ +1464 * greater than, or incomparable with `__y`. │ │ │ │ +1465 * │ │ │ │ +1466 * See `std::lexicographical_compare_three_way()` for how the determination │ │ │ │ +1467 * is made. This operator is used to synthesize relational operators like │ │ │ │ +1468 * `<` and `>=` etc. │ │ │ │ +1469 */ │ │ │ │ +1470 template │ │ │ │ +1471 [[nodiscard]] │ │ │ │ +1472 inline __detail::__synth3way_t<_Tp> │ │ │ │ +1473 operator<=>(const forward_list<_Tp, _Alloc>& __x, │ │ │ │ +1474 const forward_list<_Tp, _Alloc>& __y) │ │ │ │ +1475 { │ │ │ │ +1476 return _s_t_d_:_:_l_e_x_i_c_o_g_r_a_p_h_i_c_a_l___c_o_m_p_a_r_e___t_h_r_e_e___w_a_y(__x.begin(), __x.end(), │ │ │ │ +1477 __y.begin(), __y.end(), │ │ │ │ +1478 __detail::__synth3way); │ │ │ │ +1479 } │ │ │ │ +1480#else │ │ │ │ +1481 /** │ │ │ │ +1482 * @brief Forward list ordering relation. │ │ │ │ +1483 * @param __lx A %forward_list. │ │ │ │ +1484 * @param __ly A %forward_list of the same type as @a __lx. │ │ │ │ +1485 * @return True iff @a __lx is lexicographically less than @a __ly. │ │ │ │ +1486 * │ │ │ │ +1487 * This is a total ordering relation. It is linear in the number of │ │ │ │ +1488 * elements of the forward lists. The elements must be comparable │ │ │ │ +1489 * with @c <. │ │ │ │ +1490 * │ │ │ │ +1491 * See std::lexicographical_compare() for how the determination is made. │ │ │ │ +1492 */ │ │ │ │ +1493 template │ │ │ │ +1494 [[__nodiscard__]] │ │ │ │ +_1_4_9_5 inline bool │ │ │ │ +1496 operator<(const _f_o_r_w_a_r_d___l_i_s_t_<___T_p_,_ ___A_l_l_o_c_>& _____l_x, │ │ │ │ +1497 const _f_o_r_w_a_r_d___l_i_s_t_<___T_p_,_ ___A_l_l_o_c_>& _____l_y) │ │ │ │ +1498 { return std::lexicographical_compare(_____l_x.cbegin(), _____l_x.cend(), │ │ │ │ +1499 _____l_y.cbegin(), _____l_y.cend()); } │ │ │ │ +1500 │ │ │ │ +1501 /// Based on operator== │ │ │ │ +1502 template │ │ │ │ +1503 [[__nodiscard__]] │ │ │ │ +1504 inline bool │ │ │ │ +_1_5_0_5 operator!=(const _f_o_r_w_a_r_d___l_i_s_t_<___T_p_,_ ___A_l_l_o_c_>& _____l_x, │ │ │ │ +1506 const _f_o_r_w_a_r_d___l_i_s_t_<___T_p_,_ ___A_l_l_o_c_>& _____l_y) │ │ │ │ +1507 { return !(_____l_x == _____l_y); } │ │ │ │ +1508 │ │ │ │ +1509 /// Based on operator< │ │ │ │ +1510 template │ │ │ │ +1511 [[__nodiscard__]] │ │ │ │ +1512 inline bool │ │ │ │ +_1_5_1_3 operator>(const _f_o_r_w_a_r_d___l_i_s_t_<___T_p_,_ ___A_l_l_o_c_>& _____l_x, │ │ │ │ +1514 const _f_o_r_w_a_r_d___l_i_s_t_<___T_p_,_ ___A_l_l_o_c_>& _____l_y) │ │ │ │ +1515 { return (_____l_y < _____l_x); } │ │ │ │ +1516 │ │ │ │ +1517 /// Based on operator< │ │ │ │ +1518 template │ │ │ │ +1519 [[__nodiscard__]] │ │ │ │ +1520 inline bool │ │ │ │ +_1_5_2_1 operator>=(const _f_o_r_w_a_r_d___l_i_s_t_<___T_p_,_ ___A_l_l_o_c_>& _____l_x, │ │ │ │ +1522 const _f_o_r_w_a_r_d___l_i_s_t_<___T_p_,_ ___A_l_l_o_c_>& _____l_y) │ │ │ │ +1523 { return !(_____l_x < _____l_y); } │ │ │ │ +1524 │ │ │ │ +1525 /// Based on operator< │ │ │ │ +1526 template │ │ │ │ +1527 [[__nodiscard__]] │ │ │ │ +_1_5_2_8 inline bool │ │ │ │ +1529 operator<=(const _f_o_r_w_a_r_d___l_i_s_t_<___T_p_,_ ___A_l_l_o_c_>& _____l_x, │ │ │ │ +1530 const _f_o_r_w_a_r_d___l_i_s_t_<___T_p_,_ ___A_l_l_o_c_>& _____l_y) │ │ │ │ +1531 { return !(_____l_y < _____l_x); } │ │ │ │ +1532#endif // three-way comparison │ │ │ │ +1533 │ │ │ │ +1534 /// See std::forward_list::swap(). │ │ │ │ +1535 template │ │ │ │ +1536 inline void │ │ │ │ +_1_5_3_7 _s_w_a_p(_f_o_r_w_a_r_d___l_i_s_t_<___T_p_,_ ___A_l_l_o_c_>& _____l_x, │ │ │ │ +1538 _f_o_r_w_a_r_d___l_i_s_t_<___T_p_,_ ___A_l_l_o_c_>& _____l_y) │ │ │ │ +1539 noexcept(noexcept(_____l_x.swap(_____l_y))) │ │ │ │ +1540 { _____l_x.swap(_____l_y); } │ │ │ │ +1541 │ │ │ │ +1542_GLIBCXX_END_NAMESPACE_CONTAINER │ │ │ │ +1543_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ +1544} // namespace std │ │ │ │ +1545 │ │ │ │ +1546#endif // _FORWARD_LIST_H │ │ │ │ +_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t │ │ │ │ +_s_t_l___f_u_n_c_t_i_o_n_._h │ │ │ │ +_s_t_l___i_t_e_r_a_t_o_r___b_a_s_e___t_y_p_e_s_._h │ │ │ │ +_a_l_l_o_c_a_t_o_r_._h │ │ │ │ +_s_t_l___a_l_g_o_b_a_s_e_._h │ │ │ │ +_a_l_i_g_n_e_d___b_u_f_f_e_r_._h │ │ │ │ +_s_t_d_:_:_t_r_u_e___t_y_p_e │ │ │ │ +integral_constant< bool, true > true_type │ │ │ │ +The type used as a compile-time boolean with true value. │ │ │ │ +DDeeffiinniittiioonn _t_y_p_e___t_r_a_i_t_s_:_8_2 │ │ │ │ +_s_t_d_:_:_f_a_l_s_e___t_y_p_e │ │ │ │ +integral_constant< bool, false > false_type │ │ │ │ +The type used as a compile-time boolean with false value. │ │ │ │ +DDeeffiinniittiioonn _t_y_p_e___t_r_a_i_t_s_:_8_5 │ │ │ │ _s_t_d_:_:_m_o_v_e │ │ │ │ constexpr std::remove_reference< _Tp >::type && move(_Tp &&__t) noexcept │ │ │ │ Convert a value to an rvalue. │ │ │ │ DDeeffiinniittiioonn _m_o_v_e_._h_:_1_0_4 │ │ │ │ -_s_t_d_:_:_p_i_e_c_e_w_i_s_e___c_o_n_s_t_r_u_c_t │ │ │ │ -constexpr piecewise_construct_t piecewise_construct │ │ │ │ -Tag for piecewise construction of std::pair objects. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___p_a_i_r_._h_:_8_3 │ │ │ │ -_s_t_d_:_:_f_o_r_w_a_r_d │ │ │ │ -constexpr _Tp && forward(typename std::remove_reference< _Tp >::type &__t) │ │ │ │ -noexcept │ │ │ │ -Forward an lvalue. │ │ │ │ -DDeeffiinniittiioonn _m_o_v_e_._h_:_7_7 │ │ │ │ +_s_t_d_:_:_s_w_a_p │ │ │ │ +void swap(any &__x, any &__y) noexcept │ │ │ │ +Exchange the states of two any objects. │ │ │ │ +DDeeffiinniittiioonn _a_n_y_:_4_2_9 │ │ │ │ _s_t_d │ │ │ │ ISO C++ entities toplevel namespace is std. │ │ │ │ +_s_t_d_:_:_i_n_t_e_g_r_a_l___c_o_n_s_t_a_n_t │ │ │ │ +integral_constant │ │ │ │ +DDeeffiinniittiioonn _t_y_p_e___t_r_a_i_t_s_:_6_3 │ │ │ │ +_s_t_d_:_:_i_s___s_a_m_e │ │ │ │ +is_same │ │ │ │ +DDeeffiinniittiioonn _t_y_p_e___t_r_a_i_t_s_:_1_4_3_5 │ │ │ │ +_s_t_d_:_:_i_s___n_o_t_h_r_o_w___d_e_f_a_u_l_t___c_o_n_s_t_r_u_c_t_i_b_l_e │ │ │ │ +is_nothrow_default_constructible │ │ │ │ +DDeeffiinniittiioonn _t_y_p_e___t_r_a_i_t_s_:_1_0_5_8 │ │ │ │ +_s_t_d_:_:_i_s___a_s_s_i_g_n_a_b_l_e │ │ │ │ +is_assignable │ │ │ │ +DDeeffiinniittiioonn _t_y_p_e___t_r_a_i_t_s_:_1_1_1_3 │ │ │ │ +_s_t_d_:_:___F_w_d___l_i_s_t___n_o_d_e___b_a_s_e │ │ │ │ +A helper basic node class for forward_list. This is just a linked list with │ │ │ │ +nothing inside it.... │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_5_5 │ │ │ │ +_s_t_d_:_:___F_w_d___l_i_s_t___n_o_d_e │ │ │ │ +A helper node class for forward_list. This is just a linked list with │ │ │ │ +uninitialized storage for a dat... │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_1_1_5 │ │ │ │ +_s_t_d_:_:___F_w_d___l_i_s_t___i_t_e_r_a_t_o_r │ │ │ │ +A forward_list::iterator. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_1_3_6 │ │ │ │ +_s_t_d_:_:___F_w_d___l_i_s_t___i_t_e_r_a_t_o_r_:_:_o_p_e_r_a_t_o_r_=_= │ │ │ │ +friend bool operator==(const _Self &__x, const _Self &__y) noexcept │ │ │ │ +Forward list iterator equality comparison. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_1_8_3 │ │ │ │ +_s_t_d_:_:___F_w_d___l_i_s_t___c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ +A forward_list::const_iterator. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_2_1_5 │ │ │ │ +_s_t_d_:_:___F_w_d___l_i_s_t___c_o_n_s_t___i_t_e_r_a_t_o_r_:_:_o_p_e_r_a_t_o_r_=_= │ │ │ │ +friend bool operator==(const _Self &__x, const _Self &__y) noexcept │ │ │ │ +Forward list const_iterator equality comparison. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_2_6_6 │ │ │ │ +_s_t_d_:_:___F_w_d___l_i_s_t___b_a_s_e │ │ │ │ +Base class for forward_list. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_2_9_6 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t │ │ │ │ +A standard container with linear time access to elements, and fixed time │ │ │ │ +insertion/deletion at any po... │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_4_3_4 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_u_n_i_q_u_e │ │ │ │ +__remove_return_type unique(_BinPred __binary_pred) │ │ │ │ +Remove consecutive elements satisfying a predicate. │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_b_e_g_i_n │ │ │ │ +iterator begin() noexcept │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_7_3_4 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_b_e_f_o_r_e___b_e_g_i_n │ │ │ │ +const_iterator before_begin() const noexcept │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_7_2_5 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_r_e_v_e_r_s_e │ │ │ │ +void reverse() noexcept │ │ │ │ +Reverse the elements in list. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_1_3_2_0 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_f_o_r_w_a_r_d___l_i_s_t │ │ │ │ +forward_list()=default │ │ │ │ +Creates a forward_list with no elements. │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_~_f_o_r_w_a_r_d___l_i_s_t │ │ │ │ +~forward_list() noexcept │ │ │ │ +The forward_list dtor. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_6_0_2 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_e_r_a_s_e___a_f_t_e_r │ │ │ │ +iterator erase_after(const_iterator __pos) │ │ │ │ +Removes the element pointed to by the iterator following pos. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_1_0_2_3 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_s_w_a_p │ │ │ │ +void swap(forward_list &__list) noexcept │ │ │ │ +Swaps data with another forward_list. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_1_0_6_5 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_f_r_o_n_t │ │ │ │ +const_reference front() const │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_8_3_4 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_m_e_r_g_e │ │ │ │ +void merge(forward_list &&__list) │ │ │ │ +Merge sorted lists. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_1_2_6_7 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_f_o_r_w_a_r_d___l_i_s_t │ │ │ │ +forward_list(const _Alloc &__al) noexcept │ │ │ │ +Creates a forward_list with no elements. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_4_7_6 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_s_o_r_t │ │ │ │ +void sort() │ │ │ │ +Sort the elements of the list. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_1_3_0_1 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_b_e_f_o_r_e___b_e_g_i_n │ │ │ │ +iterator before_begin() noexcept │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_7_1_5 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_f_o_r_w_a_r_d___l_i_s_t │ │ │ │ +forward_list(const forward_list &__list, const __type_identity_t< _Alloc > │ │ │ │ +&__al) │ │ │ │ +Copy constructor with allocator argument. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_4_8_5 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_e_m_p_l_a_c_e___a_f_t_e_r │ │ │ │ +iterator emplace_after(const_iterator __pos, _Args &&... __args) │ │ │ │ +Constructs object in forward_list after the specified iterator. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_9_2_0 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_f_o_r_w_a_r_d___l_i_s_t │ │ │ │ +forward_list(const forward_list &__list) │ │ │ │ +The forward_list copy constructor. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_5_7_0 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_i_n_s_e_r_t___a_f_t_e_r │ │ │ │ +iterator insert_after(const_iterator __pos, const _Tp &__val) │ │ │ │ +Inserts given value into forward_list after specified iterator. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_9_3_7 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ +forward_list & operator=(forward_list &&__list) noexcept(_Node_alloc_traits:: │ │ │ │ +_S_nothrow_move()) │ │ │ │ +The forward_list move assignment operator. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_6_3_0 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_r_e_s_i_z_e │ │ │ │ +void resize(size_type __sz) │ │ │ │ +Resizes the forward_list to the specified number of elements. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._t_c_c_:_1_8_2 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ +forward_list & operator=(const forward_list &__list) │ │ │ │ +The forward_list assignment operator. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._t_c_c_:_1_4_0 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_r_e_m_o_v_e___i_f │ │ │ │ +__remove_return_type remove_if(_Pred __pred) │ │ │ │ +Remove all elements satisfying a predicate. │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_e_n_d │ │ │ │ +iterator end() noexcept │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_7_5_4 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_f_o_r_w_a_r_d___l_i_s_t │ │ │ │ +forward_list(size_type __n, const _Tp &__value, const _Alloc &__al=_Alloc()) │ │ │ │ +Creates a forward_list with copies of an exemplar element. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_5_4_3 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_a_s_s_i_g_n │ │ │ │ +void assign(size_type __n, const _Tp &__val) │ │ │ │ +Assigns a given value to a forward_list. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_6_8_7 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_b_e_g_i_n │ │ │ │ +const_iterator begin() const noexcept │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_7_4_4 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_s_p_l_i_c_e___a_f_t_e_r │ │ │ │ +void splice_after(const_iterator __pos, forward_list &&__list) noexcept │ │ │ │ +Insert contents of another forward_list. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_1_1_2_8 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_c_b_e_f_o_r_e___b_e_g_i_n │ │ │ │ +const_iterator cbefore_begin() const noexcept │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_7_8_4 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ +forward_list & operator=(std::initializer_list< _Tp > __il) │ │ │ │ +The forward_list initializer list assignment operator. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_6_4_9 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_f_o_r_w_a_r_d___l_i_s_t │ │ │ │ +forward_list(std::initializer_list< _Tp > __il, const _Alloc &__al=_Alloc()) │ │ │ │ +Builds a forward_list from an initializer_list. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_5_9_4 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_e_m_p_l_a_c_e___f_r_o_n_t │ │ │ │ +reference emplace_front(_Args &&... __args) │ │ │ │ +Constructs object in forward_list at the front of the list. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_8_5_9 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_f_o_r_w_a_r_d___l_i_s_t │ │ │ │ +forward_list(size_type __n, const _Alloc &__al=_Alloc()) │ │ │ │ +Creates a forward_list with default constructed elements. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_5_3_0 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_i_n_s_e_r_t___a_f_t_e_r │ │ │ │ +iterator insert_after(const_iterator __pos, std::initializer_list< _Tp > __il) │ │ │ │ +Inserts the contents of an initializer_list into forward_list after the │ │ │ │ +specified iterator. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_1_0_0_2 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_e_n_d │ │ │ │ +const_iterator end() const noexcept │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_7_6_4 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_s_p_l_i_c_e___a_f_t_e_r │ │ │ │ +void splice_after(const_iterator __pos, forward_list &&, const_iterator │ │ │ │ +__before, const_iterator __last) noexcept │ │ │ │ +Insert range from another forward_list. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_1_1_7_2 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_f_r_o_n_t │ │ │ │ +reference front() │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_8_2_2 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_f_o_r_w_a_r_d___l_i_s_t │ │ │ │ +forward_list(forward_list &&__list, const __type_identity_t< _Alloc > &__al) │ │ │ │ +noexcept(_Node_alloc_traits::_S_always_equal()) │ │ │ │ +Move constructor with allocator argument. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_5_1_4 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_e_r_a_s_e___a_f_t_e_r │ │ │ │ +iterator erase_after(const_iterator __pos, const_iterator __last) │ │ │ │ +Remove a range of elements. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_1_0_4_6 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_u_n_i_q_u_e │ │ │ │ +__remove_return_type unique() │ │ │ │ +Remove consecutive duplicate elements. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_1_2_3_6 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_c_l_e_a_r │ │ │ │ +void clear() noexcept │ │ │ │ +Erases all the elements. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_1_1_1_1 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_r_e_m_o_v_e │ │ │ │ +__remove_return_type remove(const _Tp &__val) │ │ │ │ +Remove all elements equal to value. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._t_c_c_:_2_9_0 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_c_e_n_d │ │ │ │ +const_iterator cend() const noexcept │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_7_9_4 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_a_s_s_i_g_n │ │ │ │ +void assign(_InputIterator __first, _InputIterator __last) │ │ │ │ +Assigns a range to a forward_list. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_6_7_0 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_e_m_p_t_y │ │ │ │ +bool empty() const noexcept │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_8_0_3 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_g_e_t___a_l_l_o_c_a_t_o_r │ │ │ │ +allocator_type get_allocator() const noexcept │ │ │ │ +Get a copy of the memory allocation object. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_7_0_4 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_p_u_s_h___f_r_o_n_t │ │ │ │ +void push_front(const _Tp &__val) │ │ │ │ +Add data to the front of the forward_list. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_8_7_9 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_f_o_r_w_a_r_d___l_i_s_t │ │ │ │ +forward_list(forward_list &&)=default │ │ │ │ +The forward_list move constructor. │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_f_o_r_w_a_r_d___l_i_s_t │ │ │ │ +forward_list(_InputIterator __first, _InputIterator __last, const _Alloc │ │ │ │ +&__al=_Alloc()) │ │ │ │ +Builds a forward_list from a range. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_5_6_0 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_s_p_l_i_c_e___a_f_t_e_r │ │ │ │ +void splice_after(const_iterator __pos, forward_list &, const_iterator │ │ │ │ +__before, const_iterator __last) noexcept │ │ │ │ +Insert range from another forward_list. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_1_1_7_7 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_c_b_e_g_i_n │ │ │ │ +const_iterator cbegin() const noexcept │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_7_7_4 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_p_o_p___f_r_o_n_t │ │ │ │ +void pop_front() │ │ │ │ +Removes first element. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_9_0_2 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_a_s_s_i_g_n │ │ │ │ +void assign(std::initializer_list< _Tp > __il) │ │ │ │ +Assigns an initializer_list to a forward_list. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_6_9_9 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_m_a_x___s_i_z_e │ │ │ │ +size_type max_size() const noexcept │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_8_1_1 │ │ │ │ +_s_t_d_:_:_p_o_i_n_t_e_r___t_r_a_i_t_s │ │ │ │ +Uniform interface to all pointer-like types. │ │ │ │ +DDeeffiinniittiioonn _p_t_r___t_r_a_i_t_s_._h_:_1_8_2 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___i_t_e_r_a_t_o_r___t_a_g │ │ │ │ +Forward iterators support a superset of input iterator operations. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___i_t_e_r_a_t_o_r___b_a_s_e___t_y_p_e_s_._h_:_9_9 │ │ │ │ +_s_t_d_:_:_i_t_e_r_a_t_o_r │ │ │ │ +Common iterator class. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___i_t_e_r_a_t_o_r___b_a_s_e___t_y_p_e_s_._h_:_1_2_8 │ │ │ │ _s_t_d_:_:_a_u_t_o___p_t_r___r_e_f │ │ │ │ DDeeffiinniittiioonn _a_u_t_o___p_t_r_._h_:_4_9 │ │ │ │ +_____g_n_u___c_x_x_:_:_____a_l_l_o_c___t_r_a_i_t_s │ │ │ │ +Uniform interface to C++98 and C++11 allocators. │ │ │ │ +DDeeffiinniittiioonn _e_x_t_/_a_l_l_o_c___t_r_a_i_t_s_._h_:_5_2 │ │ │ │ +_____g_n_u___c_x_x_:_:_____a_l_l_o_c___t_r_a_i_t_s_:_:_a_l_l_o_c_a_t_e │ │ │ │ +static constexpr pointer allocate(_Alloc &__a, size_type __n) │ │ │ │ +Allocate memory. │ │ │ │ +DDeeffiinniittiioonn _b_i_t_s_/_a_l_l_o_c___t_r_a_i_t_s_._h_:_3_1_7 │ │ │ │ +_____g_n_u___c_x_x_:_:_____a_l_l_o_c___t_r_a_i_t_s_:_:_d_e_a_l_l_o_c_a_t_e │ │ │ │ +static constexpr void deallocate(_Alloc &__a, pointer __p, size_type __n) │ │ │ │ +Deallocate memory. │ │ │ │ +DDeeffiinniittiioonn _b_i_t_s_/_a_l_l_o_c___t_r_a_i_t_s_._h_:_3_4_4 │ │ │ │ +_____g_n_u___c_x_x_:_:_____a_l_l_o_c___t_r_a_i_t_s_:_:_m_a_x___s_i_z_e │ │ │ │ +static constexpr size_type max_size(const _Alloc &__a) noexcept │ │ │ │ +The maximum supported allocation size. │ │ │ │ +DDeeffiinniittiioonn _b_i_t_s_/_a_l_l_o_c___t_r_a_i_t_s_._h_:_3_8_9 │ │ │ │ +_a_l_l_o_c___t_r_a_i_t_s_._h │ │ │ │ +_s_t_l___i_t_e_r_a_t_o_r_._h │ │ │ │ * _b_i_t_s │ │ │ │ - * _u_s_e_s___a_l_l_o_c_a_t_o_r___a_r_g_s_._h │ │ │ │ + * _f_o_r_w_a_r_d___l_i_s_t_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-12-base/libstdc++/user/a00371_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: uses_allocator.h Source File │ │ │ +libstdc++: gslice_array.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -45,20 +45,20 @@ │ │ │ │ │ │
│ │ │
│ │ │ -
uses_allocator.h
│ │ │ +
gslice_array.h
│ │ │
│ │ │
│ │ │ -
1// Uses-allocator Construction -*- C++ -*-
│ │ │ +Go to the documentation of this file.
1// The template and inlines for the -*- C++ -*- gslice_array class.
│ │ │
2
│ │ │ -
3// Copyright (C) 2010-2022 Free Software Foundation, Inc.
│ │ │ +
3// Copyright (C) 1997-2022 Free Software Foundation, Inc.
│ │ │
4//
│ │ │
5// This file is part of the GNU ISO C++ Library. This library is free
│ │ │
6// software; you can redistribute it and/or modify it under the
│ │ │
7// terms of the GNU General Public License as published by the
│ │ │
8// Free Software Foundation; either version 3, or (at your option)
│ │ │
9// any later version.
│ │ │
10
│ │ │ @@ -71,199 +71,242 @@ │ │ │
17// permissions described in the GCC Runtime Library Exception, version
│ │ │
18// 3.1, as published by the Free Software Foundation.
│ │ │
19
│ │ │
20// You should have received a copy of the GNU General Public License and
│ │ │
21// a copy of the GCC Runtime Library Exception along with this program;
│ │ │
22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
│ │ │
23// <http://www.gnu.org/licenses/>.
│ │ │ -
24
│ │ │ -
25#ifndef _USES_ALLOCATOR_H
│ │ │ -
26#define _USES_ALLOCATOR_H 1
│ │ │ -
27
│ │ │ -
28#if __cplusplus < 201103L
│ │ │ -
29# include <bits/c++0x_warning.h>
│ │ │ -
30#else
│ │ │ +
24
│ │ │ +
25/** @file bits/gslice_array.h
│ │ │ +
26 * This is an internal header file, included by other library headers.
│ │ │ +
27 * Do not attempt to use it directly. @headername{valarray}
│ │ │ +
28 */
│ │ │ +
29
│ │ │ +
30// Written by Gabriel Dos Reis <Gabriel.Dos-Reis@DPTMaths.ENS-Cachan.Fr>
│ │ │
31
│ │ │ -
32#include <type_traits>
│ │ │ -
33#include <bits/move.h>
│ │ │ +
32#ifndef _GSLICE_ARRAY_H
│ │ │ +
33#define _GSLICE_ARRAY_H 1
│ │ │
34
│ │ │ -
35namespace std _GLIBCXX_VISIBILITY(default)
│ │ │ -
36{
│ │ │ -
37_GLIBCXX_BEGIN_NAMESPACE_VERSION
│ │ │ -
38/// @cond undocumented
│ │ │ -
39
│ │ │ -
40 // This is used for std::experimental::erased_type from Library Fundamentals.
│ │ │ -
41 struct __erased_type { };
│ │ │ -
42
│ │ │ -
43 // This also supports the "type-erased allocator" protocol from the
│ │ │ -
44 // Library Fundamentals TS, where allocator_type is erased_type.
│ │ │ -
45 // The second condition will always be false for types not using the TS.
│ │ │ -
46 template<typename _Alloc, typename _Tp>
│ │ │ -
47 using __is_erased_or_convertible
│ │ │ -
48 = __or_<is_convertible<_Alloc, _Tp>, is_same<_Tp, __erased_type>>;
│ │ │ -
49
│ │ │ -
50 /// [allocator.tag]
│ │ │ -
51 struct allocator_arg_t { explicit allocator_arg_t() = default; };
│ │ │ -
52
│ │ │ -
53 _GLIBCXX17_INLINE constexpr allocator_arg_t allocator_arg =
│ │ │ -
54 allocator_arg_t();
│ │ │ -
55
│ │ │ -
56 template<typename _Tp, typename _Alloc, typename = __void_t<>>
│ │ │ -
57 struct __uses_allocator_helper
│ │ │ -
58 : false_type { };
│ │ │ -
59
│ │ │ -
60 template<typename _Tp, typename _Alloc>
│ │ │ -
61 struct __uses_allocator_helper<_Tp, _Alloc,
│ │ │ -
62 __void_t<typename _Tp::allocator_type>>
│ │ │ -
63 : __is_erased_or_convertible<_Alloc, typename _Tp::allocator_type>::type
│ │ │ -
64 { };
│ │ │ -
65
│ │ │ -
66 /// [allocator.uses.trait]
│ │ │ -
67 template<typename _Tp, typename _Alloc>
│ │ │ -
68 struct uses_allocator
│ │ │ -
69 : __uses_allocator_helper<_Tp, _Alloc>::type
│ │ │ -
70 { };
│ │ │ -
71
│ │ │ -
72 struct __uses_alloc_base { };
│ │ │ -
73
│ │ │ -
74 struct __uses_alloc0 : __uses_alloc_base
│ │ │ -
75 {
│ │ │ -
76 struct _Sink { void _GLIBCXX20_CONSTEXPR operator=(const void*) { } } _M_a;
│ │ │ -
77 };
│ │ │ -
78
│ │ │ -
79 template<typename _Alloc>
│ │ │ -
80 struct __uses_alloc1 : __uses_alloc_base { const _Alloc* _M_a; };
│ │ │ -
81
│ │ │ -
82 template<typename _Alloc>
│ │ │ -
83 struct __uses_alloc2 : __uses_alloc_base { const _Alloc* _M_a; };
│ │ │ -
84
│ │ │ -
85 template<bool, typename _Tp, typename _Alloc, typename... _Args>
│ │ │ -
86 struct __uses_alloc;
│ │ │ -
87
│ │ │ -
88 template<typename _Tp, typename _Alloc, typename... _Args>
│ │ │ -
89 struct __uses_alloc<true, _Tp, _Alloc, _Args...>
│ │ │ -
90 : __conditional_t<
│ │ │ -
91 is_constructible<_Tp, allocator_arg_t, const _Alloc&, _Args...>::value,
│ │ │ -
92 __uses_alloc1<_Alloc>,
│ │ │ -
93 __uses_alloc2<_Alloc>>
│ │ │ -
94 {
│ │ │ -
95 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ -
96 // 2586. Wrong value category used in scoped_allocator_adaptor::construct
│ │ │ -
97 static_assert(__or_<
│ │ │ -
98 is_constructible<_Tp, allocator_arg_t, const _Alloc&, _Args...>,
│ │ │ -
99 is_constructible<_Tp, _Args..., const _Alloc&>>::value,
│ │ │ -
100 "construction with an allocator must be possible"
│ │ │ -
101 " if uses_allocator is true");
│ │ │ -
102 };
│ │ │ -
103
│ │ │ -
104 template<typename _Tp, typename _Alloc, typename... _Args>
│ │ │ -
105 struct __uses_alloc<false, _Tp, _Alloc, _Args...>
│ │ │ -
106 : __uses_alloc0 { };
│ │ │ -
107
│ │ │ -
108 template<typename _Tp, typename _Alloc, typename... _Args>
│ │ │ -
109 using __uses_alloc_t =
│ │ │ -
110 __uses_alloc<uses_allocator<_Tp, _Alloc>::value, _Tp, _Alloc, _Args...>;
│ │ │ -
111
│ │ │ -
112 template<typename _Tp, typename _Alloc, typename... _Args>
│ │ │ -
113 _GLIBCXX20_CONSTEXPR
│ │ │ -
114 inline __uses_alloc_t<_Tp, _Alloc, _Args...>
│ │ │ -
115 __use_alloc(const _Alloc& __a)
│ │ │ -
116 {
│ │ │ -
117 __uses_alloc_t<_Tp, _Alloc, _Args...> __ret;
│ │ │ -
118 __ret._M_a = std::__addressof(__a);
│ │ │ -
119 return __ret;
│ │ │ -
120 }
│ │ │ -
121
│ │ │ -
122 template<typename _Tp, typename _Alloc, typename... _Args>
│ │ │ -
123 void
│ │ │ -
124 __use_alloc(const _Alloc&&) = delete;
│ │ │ -
125
│ │ │ -
126#if __cplusplus > 201402L
│ │ │ -
127 template <typename _Tp, typename _Alloc>
│ │ │ -
128 inline constexpr bool uses_allocator_v =
│ │ │ -
129 uses_allocator<_Tp, _Alloc>::value;
│ │ │ -
130#endif // C++17
│ │ │ -
131
│ │ │ -
132 template<template<typename...> class _Predicate,
│ │ │ -
133 typename _Tp, typename _Alloc, typename... _Args>
│ │ │ -
134 struct __is_uses_allocator_predicate
│ │ │ -
135 : __conditional_t<uses_allocator<_Tp, _Alloc>::value,
│ │ │ -
136 __or_<_Predicate<_Tp, allocator_arg_t, _Alloc, _Args...>,
│ │ │ -
137 _Predicate<_Tp, _Args..., _Alloc>>,
│ │ │ -
138 _Predicate<_Tp, _Args...>> { };
│ │ │ +
35#pragma GCC system_header
│ │ │ +
36
│ │ │ +
37namespace std _GLIBCXX_VISIBILITY(default)
│ │ │ +
38{
│ │ │ +
39_GLIBCXX_BEGIN_NAMESPACE_VERSION
│ │ │ +
40
│ │ │ +
41 /**
│ │ │ +
42 * @addtogroup numeric_arrays
│ │ │ +
43 * @{
│ │ │ +
44 */
│ │ │ +
45
│ │ │ +
46 /**
│ │ │ +
47 * @brief Reference to multi-dimensional subset of an array.
│ │ │ +
48 *
│ │ │ +
49 * A gslice_array is a reference to the actual elements of an array
│ │ │ +
50 * specified by a gslice. The way to get a gslice_array is to call
│ │ │ +
51 * operator[](gslice) on a valarray. The returned gslice_array then
│ │ │ +
52 * permits carrying operations out on the referenced subset of elements in
│ │ │ +
53 * the original valarray. For example, operator+=(valarray) will add
│ │ │ +
54 * values to the subset of elements in the underlying valarray this
│ │ │ +
55 * gslice_array refers to.
│ │ │ +
56 *
│ │ │ +
57 * @param Tp Element type.
│ │ │ +
58 */
│ │ │ +
59 template<typename _Tp>
│ │ │ +
│ │ │ + │ │ │ +
61 {
│ │ │ +
62 public:
│ │ │ +
63 typedef _Tp value_type;
│ │ │ +
64
│ │ │ +
65 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ +
66 // 253. valarray helper functions are almost entirely useless
│ │ │ +
67
│ │ │ +
68 /// Copy constructor. Both slices refer to the same underlying array.
│ │ │ + │ │ │ +
70
│ │ │ +
71 /// Assignment operator. Assigns slice elements to corresponding
│ │ │ +
72 /// elements of @a a.
│ │ │ + │ │ │ +
74
│ │ │ +
75 /// Assign slice elements to corresponding elements of @a v.
│ │ │ +
76 void operator=(const valarray<_Tp>&) const;
│ │ │ +
77 /// Multiply slice elements by corresponding elements of @a v.
│ │ │ +
78 void operator*=(const valarray<_Tp>&) const;
│ │ │ +
79 /// Divide slice elements by corresponding elements of @a v.
│ │ │ +
80 void operator/=(const valarray<_Tp>&) const;
│ │ │ +
81 /// Modulo slice elements by corresponding elements of @a v.
│ │ │ +
82 void operator%=(const valarray<_Tp>&) const;
│ │ │ +
83 /// Add corresponding elements of @a v to slice elements.
│ │ │ +
84 void operator+=(const valarray<_Tp>&) const;
│ │ │ +
85 /// Subtract corresponding elements of @a v from slice elements.
│ │ │ +
86 void operator-=(const valarray<_Tp>&) const;
│ │ │ +
87 /// Logical xor slice elements with corresponding elements of @a v.
│ │ │ +
88 void operator^=(const valarray<_Tp>&) const;
│ │ │ +
89 /// Logical and slice elements with corresponding elements of @a v.
│ │ │ +
90 void operator&=(const valarray<_Tp>&) const;
│ │ │ +
91 /// Logical or slice elements with corresponding elements of @a v.
│ │ │ +
92 void operator|=(const valarray<_Tp>&) const;
│ │ │ +
93 /// Left shift slice elements by corresponding elements of @a v.
│ │ │ +
94 void operator<<=(const valarray<_Tp>&) const;
│ │ │ +
95 /// Right shift slice elements by corresponding elements of @a v.
│ │ │ +
96 void operator>>=(const valarray<_Tp>&) const;
│ │ │ +
97 /// Assign all slice elements to @a t.
│ │ │ +
98 void operator=(const _Tp&) const;
│ │ │ +
99
│ │ │ +
100 template<class _Dom>
│ │ │ +
101 void operator=(const _Expr<_Dom, _Tp>&) const;
│ │ │ +
102 template<class _Dom>
│ │ │ +
103 void operator*=(const _Expr<_Dom, _Tp>&) const;
│ │ │ +
104 template<class _Dom>
│ │ │ +
105 void operator/=(const _Expr<_Dom, _Tp>&) const;
│ │ │ +
106 template<class _Dom>
│ │ │ +
107 void operator%=(const _Expr<_Dom, _Tp>&) const;
│ │ │ +
108 template<class _Dom>
│ │ │ +
109 void operator+=(const _Expr<_Dom, _Tp>&) const;
│ │ │ +
110 template<class _Dom>
│ │ │ +
111 void operator-=(const _Expr<_Dom, _Tp>&) const;
│ │ │ +
112 template<class _Dom>
│ │ │ +
113 void operator^=(const _Expr<_Dom, _Tp>&) const;
│ │ │ +
114 template<class _Dom>
│ │ │ +
115 void operator&=(const _Expr<_Dom, _Tp>&) const;
│ │ │ +
116 template<class _Dom>
│ │ │ +
117 void operator|=(const _Expr<_Dom, _Tp>&) const;
│ │ │ +
118 template<class _Dom>
│ │ │ +
119 void operator<<=(const _Expr<_Dom, _Tp>&) const;
│ │ │ +
120 template<class _Dom>
│ │ │ +
121 void operator>>=(const _Expr<_Dom, _Tp>&) const;
│ │ │ +
122
│ │ │ +
123 private:
│ │ │ +
124 _Array<_Tp> _M_array;
│ │ │ +
125 const valarray<size_t>& _M_index;
│ │ │ +
126
│ │ │ +
127 friend class valarray<_Tp>;
│ │ │ +
128
│ │ │ + │ │ │ +
130
│ │ │ +
131#if __cplusplus < 201103L
│ │ │ +
132 // not implemented
│ │ │ +
133 gslice_array();
│ │ │ +
134#else
│ │ │ +
135 public:
│ │ │ +
136 gslice_array() = delete;
│ │ │ +
137#endif
│ │ │ +
138 };
│ │ │ +
│ │ │
139
│ │ │ -
140 template<typename _Tp, typename _Alloc, typename... _Args>
│ │ │ -
141 struct __is_uses_allocator_constructible
│ │ │ -
142 : __is_uses_allocator_predicate<is_constructible, _Tp, _Alloc, _Args...>
│ │ │ -
143 { };
│ │ │ -
144
│ │ │ -
145#if __cplusplus >= 201402L
│ │ │ -
146 template<typename _Tp, typename _Alloc, typename... _Args>
│ │ │ -
147 _GLIBCXX17_INLINE constexpr bool __is_uses_allocator_constructible_v =
│ │ │ -
148 __is_uses_allocator_constructible<_Tp, _Alloc, _Args...>::value;
│ │ │ -
149#endif // C++14
│ │ │ +
140 template<typename _Tp>
│ │ │ +
141 inline
│ │ │ + │ │ │ +
143 const valarray<size_t>& __i)
│ │ │ +
144 : _M_array(__a), _M_index(__i) {}
│ │ │ +
145
│ │ │ +
146 template<typename _Tp>
│ │ │ +
147 inline
│ │ │ +
148 gslice_array<_Tp>::gslice_array(const gslice_array<_Tp>& __a)
│ │ │ +
149 : _M_array(__a._M_array), _M_index(__a._M_index) {}
│ │ │
150
│ │ │ -
151 template<typename _Tp, typename _Alloc, typename... _Args>
│ │ │ -
152 struct __is_nothrow_uses_allocator_constructible
│ │ │ -
153 : __is_uses_allocator_predicate<is_nothrow_constructible,
│ │ │ -
154 _Tp, _Alloc, _Args...>
│ │ │ -
155 { };
│ │ │ -
156
│ │ │ -
157
│ │ │ -
158#if __cplusplus >= 201402L
│ │ │ -
159 template<typename _Tp, typename _Alloc, typename... _Args>
│ │ │ -
160 _GLIBCXX17_INLINE constexpr bool
│ │ │ -
161 __is_nothrow_uses_allocator_constructible_v =
│ │ │ -
162 __is_nothrow_uses_allocator_constructible<_Tp, _Alloc, _Args...>::value;
│ │ │ -
163#endif // C++14
│ │ │ -
164
│ │ │ -
165 template<typename _Tp, typename... _Args>
│ │ │ -
166 void __uses_allocator_construct_impl(__uses_alloc0 __a, _Tp* __ptr,
│ │ │ -
167 _Args&&... __args)
│ │ │ -
168 { ::new ((void*)__ptr) _Tp(std::forward<_Args>(__args)...); }
│ │ │ -
169
│ │ │ -
170 template<typename _Tp, typename _Alloc, typename... _Args>
│ │ │ -
171 void __uses_allocator_construct_impl(__uses_alloc1<_Alloc> __a, _Tp* __ptr,
│ │ │ -
172 _Args&&... __args)
│ │ │ -
173 {
│ │ │ -
174 ::new ((void*)__ptr) _Tp(allocator_arg, *__a._M_a,
│ │ │ -
175 std::forward<_Args>(__args)...);
│ │ │ -
176 }
│ │ │ -
177
│ │ │ -
178 template<typename _Tp, typename _Alloc, typename... _Args>
│ │ │ -
179 void __uses_allocator_construct_impl(__uses_alloc2<_Alloc> __a, _Tp* __ptr,
│ │ │ -
180 _Args&&... __args)
│ │ │ -
181 { ::new ((void*)__ptr) _Tp(std::forward<_Args>(__args)..., *__a._M_a); }
│ │ │ -
182
│ │ │ -
183 template<typename _Tp, typename _Alloc, typename... _Args>
│ │ │ -
184 void __uses_allocator_construct(const _Alloc& __a, _Tp* __ptr,
│ │ │ -
185 _Args&&... __args)
│ │ │ -
186 {
│ │ │ - │ │ │ - │ │ │ -
189 std::forward<_Args>(__args)...);
│ │ │ -
190 }
│ │ │ -
191
│ │ │ -
192/// @endcond
│ │ │ -
193_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ -
194} // namespace std
│ │ │ -
195
│ │ │ -
196#endif
│ │ │ -
197#endif
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
integral_constant< bool, false > false_type
The type used as a compile-time boolean with false value.
Definition type_traits:85
│ │ │ -
constexpr _Tp * __addressof(_Tp &__r) noexcept
Same as C++11 std::addressof.
Definition move.h:49
│ │ │ +
151 template<typename _Tp>
│ │ │ +
152 inline gslice_array<_Tp>&
│ │ │ +
153 gslice_array<_Tp>::operator=(const gslice_array<_Tp>& __a)
│ │ │ +
154 {
│ │ │ +
155 std::__valarray_copy(_Array<_Tp>(__a._M_array),
│ │ │ +
156 _Array<size_t>(__a._M_index), _M_index.size(),
│ │ │ +
157 _M_array, _Array<size_t>(_M_index));
│ │ │ +
158 return *this;
│ │ │ +
159 }
│ │ │ +
160
│ │ │ +
161 template<typename _Tp>
│ │ │ +
162 inline void
│ │ │ +
│ │ │ +
163 gslice_array<_Tp>::operator=(const _Tp& __t) const
│ │ │ +
164 {
│ │ │ +
165 std::__valarray_fill(_M_array, _Array<size_t>(_M_index),
│ │ │ +
166 _M_index.size(), __t);
│ │ │ +
167 }
│ │ │ +
│ │ │ +
168
│ │ │ +
169 template<typename _Tp>
│ │ │ +
170 inline void
│ │ │ +
│ │ │ + │ │ │ +
172 {
│ │ │ +
173 std::__valarray_copy(_Array<_Tp>(__v), __v.size(),
│ │ │ +
174 _M_array, _Array<size_t>(_M_index));
│ │ │ +
175 }
│ │ │ +
│ │ │ +
176
│ │ │ +
177 template<typename _Tp>
│ │ │ +
178 template<class _Dom>
│ │ │ +
179 inline void
│ │ │ + │ │ │ +
181 {
│ │ │ +
182 std::__valarray_copy (__e, _M_index.size(), _M_array,
│ │ │ +
183 _Array<size_t>(_M_index));
│ │ │ +
184 }
│ │ │ +
185
│ │ │ +
186 /// @cond undocumented
│ │ │ +
187#undef _DEFINE_VALARRAY_OPERATOR
│ │ │ +
188#define _DEFINE_VALARRAY_OPERATOR(_Op, _Name) \
│ │ │ +
189 template<typename _Tp> \
│ │ │ +
190 inline void \
│ │ │ +
191 gslice_array<_Tp>::operator _Op##=(const valarray<_Tp>& __v) const \
│ │ │ +
192 { \
│ │ │ +
193 _Array_augmented_##_Name(_M_array, _Array<size_t>(_M_index), \
│ │ │ +
194 _Array<_Tp>(__v), __v.size()); \
│ │ │ +
195 } \
│ │ │ +
196 \
│ │ │ +
197 template<typename _Tp> \
│ │ │ +
198 template<class _Dom> \
│ │ │ +
199 inline void \
│ │ │ +
200 gslice_array<_Tp>::operator _Op##= (const _Expr<_Dom, _Tp>& __e) const\
│ │ │ +
201 { \
│ │ │ +
202 _Array_augmented_##_Name(_M_array, _Array<size_t>(_M_index), __e,\
│ │ │ +
203 _M_index.size()); \
│ │ │ +
204 }
│ │ │ +
205
│ │ │ +
206_DEFINE_VALARRAY_OPERATOR(*, __multiplies)
│ │ │ +
207_DEFINE_VALARRAY_OPERATOR(/, __divides)
│ │ │ +
208_DEFINE_VALARRAY_OPERATOR(%, __modulus)
│ │ │ +
209_DEFINE_VALARRAY_OPERATOR(+, __plus)
│ │ │ +
210_DEFINE_VALARRAY_OPERATOR(-, __minus)
│ │ │ +
211_DEFINE_VALARRAY_OPERATOR(^, __bitwise_xor)
│ │ │ +
212_DEFINE_VALARRAY_OPERATOR(&, __bitwise_and)
│ │ │ +
213_DEFINE_VALARRAY_OPERATOR(|, __bitwise_or)
│ │ │ +
214_DEFINE_VALARRAY_OPERATOR(<<, __shift_left)
│ │ │ +
215_DEFINE_VALARRAY_OPERATOR(>>, __shift_right)
│ │ │ +
216
│ │ │ +
217#undef _DEFINE_VALARRAY_OPERATOR
│ │ │ +
218 /// @endcond
│ │ │ +
219
│ │ │ +
220 /// @} group numeric_arrays
│ │ │ +
221
│ │ │ +
222_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ +
223} // namespace
│ │ │ +
224
│ │ │ +
225#endif /* _GSLICE_ARRAY_H */
│ │ │
ISO C++ entities toplevel namespace is std.
│ │ │ - │ │ │ +
Smart array designed to support numeric processing.
Definition valarray:128
│ │ │ +
Reference to multi-dimensional subset of an array.
│ │ │ +
void operator<<=(const valarray< _Tp > &) const
Left shift slice elements by corresponding elements of v.
│ │ │ +
void operator/=(const valarray< _Tp > &) const
Divide slice elements by corresponding elements of v.
│ │ │ +
gslice_array & operator=(const gslice_array &)
Assignment operator. Assigns slice elements to corresponding elements of a.
│ │ │ +
void operator%=(const valarray< _Tp > &) const
Modulo slice elements by corresponding elements of v.
│ │ │ +
void operator>>=(const valarray< _Tp > &) const
Right shift slice elements by corresponding elements of v.
│ │ │ +
void operator*=(const valarray< _Tp > &) const
Multiply slice elements by corresponding elements of v.
│ │ │ +
void operator|=(const valarray< _Tp > &) const
Logical or slice elements with corresponding elements of v.
│ │ │ +
void operator^=(const valarray< _Tp > &) const
Logical xor slice elements with corresponding elements of v.
│ │ │ +
gslice_array(const gslice_array &)
Copy constructor. Both slices refer to the same underlying array.
│ │ │ +
void operator-=(const valarray< _Tp > &) const
Subtract corresponding elements of v from slice elements.
│ │ │ +
void operator+=(const valarray< _Tp > &) const
Add corresponding elements of v to slice elements.
│ │ │ +
void operator&=(const valarray< _Tp > &) const
Logical and slice elements with corresponding elements of v.
│ │ │ + │ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,12 +1,13 @@ │ │ │ │ libstdc++ │ │ │ │ -uses_allocator.h │ │ │ │ -1// Uses-allocator Construction -*- C++ -*- │ │ │ │ +gslice_array.h │ │ │ │ +_G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ +1// The template and inlines for the -*- C++ -*- gslice_array class. │ │ │ │ 2 │ │ │ │ -3// Copyright (C) 2010-2022 Free Software Foundation, Inc. │ │ │ │ +3// Copyright (C) 1997-2022 Free Software Foundation, Inc. │ │ │ │ 4// │ │ │ │ 5// This file is part of the GNU ISO C++ Library. This library is free │ │ │ │ 6// software; you can redistribute it and/or modify it under the │ │ │ │ 7// terms of the GNU General Public License as published by the │ │ │ │ 8// Free Software Foundation; either version 3, or (at your option) │ │ │ │ 9// any later version. │ │ │ │ 10 │ │ │ │ @@ -20,199 +21,257 @@ │ │ │ │ 18// 3.1, as published by the Free Software Foundation. │ │ │ │ 19 │ │ │ │ 20// You should have received a copy of the GNU General Public License and │ │ │ │ 21// a copy of the GCC Runtime Library Exception along with this program; │ │ │ │ 22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see │ │ │ │ 23// . │ │ │ │ 24 │ │ │ │ -25#ifndef _USES_ALLOCATOR_H │ │ │ │ -26#define _USES_ALLOCATOR_H 1 │ │ │ │ -27 │ │ │ │ -28#if __cplusplus < 201103L │ │ │ │ -29# include <_b_i_t_s_/_c_+_+_0_x___w_a_r_n_i_n_g_._h> │ │ │ │ -30#else │ │ │ │ +25/** @file bits/gslice_array.h │ │ │ │ +26 * This is an internal header file, included by other library headers. │ │ │ │ +27 * Do not attempt to use it directly. @headername{valarray} │ │ │ │ +28 */ │ │ │ │ +29 │ │ │ │ +30// Written by Gabriel Dos Reis │ │ │ │ 31 │ │ │ │ -32#include <_t_y_p_e___t_r_a_i_t_s> │ │ │ │ -33#include <_b_i_t_s_/_m_o_v_e_._h> │ │ │ │ +32#ifndef _GSLICE_ARRAY_H │ │ │ │ +33#define _GSLICE_ARRAY_H 1 │ │ │ │ 34 │ │ │ │ -35namespace _s_t_d _GLIBCXX_VISIBILITY(default) │ │ │ │ -36{ │ │ │ │ -37_GLIBCXX_BEGIN_NAMESPACE_VERSION │ │ │ │ -38/// @cond undocumented │ │ │ │ -39 │ │ │ │ -40 // This is used for std::experimental::erased_type from Library │ │ │ │ -Fundamentals. │ │ │ │ -41 struct __erased_type { }; │ │ │ │ -42 │ │ │ │ -43 // This also supports the "type-erased allocator" protocol from the │ │ │ │ -44 // Library Fundamentals TS, where allocator_type is erased_type. │ │ │ │ -45 // The second condition will always be false for types not using the TS. │ │ │ │ -46 template │ │ │ │ -47 using __is_erased_or_convertible │ │ │ │ -48 = __or_, is_same<_Tp, __erased_type>>; │ │ │ │ -49 │ │ │ │ -50 /// [allocator.tag] │ │ │ │ -51 struct allocator_arg_t { explicit allocator_arg_t() = default; }; │ │ │ │ -52 │ │ │ │ -53 _GLIBCXX17_INLINE constexpr allocator_arg_t allocator_arg = │ │ │ │ -54 allocator_arg_t(); │ │ │ │ -55 │ │ │ │ -56 template> │ │ │ │ -57 struct __uses_allocator_helper │ │ │ │ -58 : _f_a_l_s_e___t_y_p_e { }; │ │ │ │ -59 │ │ │ │ -60 template │ │ │ │ -61 struct __uses_allocator_helper<_Tp, _Alloc, │ │ │ │ -62 __void_t> │ │ │ │ -63 : __is_erased_or_convertible<_Alloc, typename _Tp::allocator_type>::type │ │ │ │ -64 { }; │ │ │ │ -65 │ │ │ │ -66 /// [allocator.uses.trait] │ │ │ │ -67 template │ │ │ │ -68 struct uses_allocator │ │ │ │ -69 : __uses_allocator_helper<_Tp, _Alloc>::type │ │ │ │ -70 { }; │ │ │ │ -71 │ │ │ │ -72 struct __uses_alloc_base { }; │ │ │ │ -73 │ │ │ │ -74 struct __uses_alloc0 : __uses_alloc_base │ │ │ │ -75 { │ │ │ │ -76 struct _Sink { void _GLIBCXX20_CONSTEXPR operator=(const void*) { } } _M_a; │ │ │ │ -77 }; │ │ │ │ -78 │ │ │ │ -79 template │ │ │ │ -80 struct __uses_alloc1 : __uses_alloc_base { const _Alloc* _M_a; }; │ │ │ │ -81 │ │ │ │ -82 template │ │ │ │ -83 struct __uses_alloc2 : __uses_alloc_base { const _Alloc* _M_a; }; │ │ │ │ -84 │ │ │ │ -85 template │ │ │ │ -86 struct __uses_alloc; │ │ │ │ -87 │ │ │ │ -88 template │ │ │ │ -89 struct __uses_alloc │ │ │ │ -90 : __conditional_t< │ │ │ │ -91 is_constructible<_Tp, allocator_arg_t, const _Alloc&, _Args...>::value, │ │ │ │ -92 __uses_alloc1<_Alloc>, │ │ │ │ -93 __uses_alloc2<_Alloc>> │ │ │ │ -94 { │ │ │ │ -95 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ -96 // 2586. Wrong value category used in scoped_allocator_adaptor::construct │ │ │ │ -97 static_assert(__or_< │ │ │ │ -98 is_constructible<_Tp, allocator_arg_t, const _Alloc&, _Args...>, │ │ │ │ -99 is_constructible<_Tp, _Args..., const _Alloc&>>::value, │ │ │ │ -100 "construction with an allocator must be possible" │ │ │ │ -101 " if uses_allocator is true"); │ │ │ │ -102 }; │ │ │ │ -103 │ │ │ │ -104 template │ │ │ │ -105 struct __uses_alloc │ │ │ │ -106 : __uses_alloc0 { }; │ │ │ │ -107 │ │ │ │ -108 template │ │ │ │ -109 using __uses_alloc_t = │ │ │ │ -110 __uses_alloc::value, _Tp, _Alloc, _Args...>; │ │ │ │ -111 │ │ │ │ -112 template │ │ │ │ -113 _GLIBCXX20_CONSTEXPR │ │ │ │ -114 inline __uses_alloc_t<_Tp, _Alloc, _Args...> │ │ │ │ -115 __use_alloc(const _Alloc& __a) │ │ │ │ -116 { │ │ │ │ -117 __uses_alloc_t<_Tp, _Alloc, _Args...> __ret; │ │ │ │ -118 __ret._M_a = _s_t_d_:_:_____a_d_d_r_e_s_s_o_f(__a); │ │ │ │ -119 return __ret; │ │ │ │ -120 } │ │ │ │ -121 │ │ │ │ -122 template │ │ │ │ -123 void │ │ │ │ -124 __use_alloc(const _Alloc&&) = delete; │ │ │ │ -125 │ │ │ │ -126#if __cplusplus > 201402L │ │ │ │ -127 template │ │ │ │ -128 inline constexpr bool uses_allocator_v = │ │ │ │ -129 uses_allocator<_Tp, _Alloc>::value; │ │ │ │ -130#endif // C++17 │ │ │ │ -131 │ │ │ │ -132 template class _Predicate, │ │ │ │ -133 typename _Tp, typename _Alloc, typename... _Args> │ │ │ │ -134 struct __is_uses_allocator_predicate │ │ │ │ -135 : __conditional_t::value, │ │ │ │ -136 __or_<_Predicate<_Tp, allocator_arg_t, _Alloc, _Args...>, │ │ │ │ -137 _Predicate<_Tp, _Args..., _Alloc>>, │ │ │ │ -138 _Predicate<_Tp, _Args...>> { }; │ │ │ │ +35#pragma GCC system_header │ │ │ │ +36 │ │ │ │ +37namespace _s_t_d _GLIBCXX_VISIBILITY(default) │ │ │ │ +38{ │ │ │ │ +39_GLIBCXX_BEGIN_NAMESPACE_VERSION │ │ │ │ +40 │ │ │ │ +41 /** │ │ │ │ +42 * @addtogroup numeric_arrays │ │ │ │ +43 * @{ │ │ │ │ +44 */ │ │ │ │ +45 │ │ │ │ +46 /** │ │ │ │ +47 * @brief Reference to multi-dimensional subset of an array. │ │ │ │ +48 * │ │ │ │ +49 * A gslice_array is a reference to the actual elements of an array │ │ │ │ +50 * specified by a gslice. The way to get a gslice_array is to call │ │ │ │ +51 * operator[](gslice) on a valarray. The returned gslice_array then │ │ │ │ +52 * permits carrying operations out on the referenced subset of elements in │ │ │ │ +53 * the original valarray. For example, operator+=(valarray) will add │ │ │ │ +54 * values to the subset of elements in the underlying valarray this │ │ │ │ +55 * gslice_array refers to. │ │ │ │ +56 * │ │ │ │ +57 * @param Tp Element type. │ │ │ │ +58 */ │ │ │ │ +59 template │ │ │ │ +_6_0 class _g_s_l_i_c_e___a_r_r_a_y │ │ │ │ +61 { │ │ │ │ +62 public: │ │ │ │ +63 typedef _Tp value_type; │ │ │ │ +64 │ │ │ │ +65 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ +66 // 253. valarray helper functions are almost entirely useless │ │ │ │ +67 │ │ │ │ +68 /// Copy constructor. Both slices refer to the same underlying array. │ │ │ │ +_6_9 _g_s_l_i_c_e___a_r_r_a_y(const _g_s_l_i_c_e___a_r_r_a_y&); │ │ │ │ +70 │ │ │ │ +71 /// Assignment operator. Assigns slice elements to corresponding │ │ │ │ +72 /// elements of @a a. │ │ │ │ +_7_3 _g_s_l_i_c_e___a_r_r_a_y& _o_p_e_r_a_t_o_r_=(const _g_s_l_i_c_e___a_r_r_a_y&); │ │ │ │ +74 │ │ │ │ +75 /// Assign slice elements to corresponding elements of @a v. │ │ │ │ +76 void _o_p_e_r_a_t_o_r_=(const _v_a_l_a_r_r_a_y_<___T_p_>&) const; │ │ │ │ +77 /// Multiply slice elements by corresponding elements of @a v. │ │ │ │ +_7_8 void _o_p_e_r_a_t_o_r_*_=(const _v_a_l_a_r_r_a_y_<___T_p_>&) const; │ │ │ │ +79 /// Divide slice elements by corresponding elements of @a v. │ │ │ │ +_8_0 void _o_p_e_r_a_t_o_r_/_=(const _v_a_l_a_r_r_a_y_<___T_p_>&) const; │ │ │ │ +81 /// Modulo slice elements by corresponding elements of @a v. │ │ │ │ +_8_2 void _o_p_e_r_a_t_o_r_%_=(const _v_a_l_a_r_r_a_y_<___T_p_>&) const; │ │ │ │ +83 /// Add corresponding elements of @a v to slice elements. │ │ │ │ +_8_4 void _o_p_e_r_a_t_o_r_+_=(const _v_a_l_a_r_r_a_y_<___T_p_>&) const; │ │ │ │ +85 /// Subtract corresponding elements of @a v from slice elements. │ │ │ │ +_8_6 void _o_p_e_r_a_t_o_r_-_=(const _v_a_l_a_r_r_a_y_<___T_p_>&) const; │ │ │ │ +87 /// Logical xor slice elements with corresponding elements of @a v. │ │ │ │ +_8_8 void _o_p_e_r_a_t_o_r_^_=(const _v_a_l_a_r_r_a_y_<___T_p_>&) const; │ │ │ │ +89 /// Logical and slice elements with corresponding elements of @a v. │ │ │ │ +_9_0 void _o_p_e_r_a_t_o_r_&_=(const _v_a_l_a_r_r_a_y_<___T_p_>&) const; │ │ │ │ +91 /// Logical or slice elements with corresponding elements of @a v. │ │ │ │ +_9_2 void _o_p_e_r_a_t_o_r_|_=(const _v_a_l_a_r_r_a_y_<___T_p_>&) const; │ │ │ │ +93 /// Left shift slice elements by corresponding elements of @a v. │ │ │ │ +_9_4 void _o_p_e_r_a_t_o_r_<_<_=(const _v_a_l_a_r_r_a_y_<___T_p_>&) const; │ │ │ │ +95 /// Right shift slice elements by corresponding elements of @a v. │ │ │ │ +_9_6 void _o_p_e_r_a_t_o_r_>_>_=(const _v_a_l_a_r_r_a_y_<___T_p_>&) const; │ │ │ │ +97 /// Assign all slice elements to @a t. │ │ │ │ +98 void _o_p_e_r_a_t_o_r_=(const _Tp&) const; │ │ │ │ +99 │ │ │ │ +100 template │ │ │ │ +101 void _o_p_e_r_a_t_o_r_=(const ___E_x_p_r_<___D_o_m_,_ ___T_p_>&) const; │ │ │ │ +102 template │ │ │ │ +103 void _o_p_e_r_a_t_o_r_*_=(const ___E_x_p_r_<___D_o_m_,_ ___T_p_>&) const; │ │ │ │ +104 template │ │ │ │ +105 void _o_p_e_r_a_t_o_r_/_=(const ___E_x_p_r_<___D_o_m_,_ ___T_p_>&) const; │ │ │ │ +106 template │ │ │ │ +107 void _o_p_e_r_a_t_o_r_%_=(const ___E_x_p_r_<___D_o_m_,_ ___T_p_>&) const; │ │ │ │ +108 template │ │ │ │ +109 void _o_p_e_r_a_t_o_r_+_=(const ___E_x_p_r_<___D_o_m_,_ ___T_p_>&) const; │ │ │ │ +110 template │ │ │ │ +111 void _o_p_e_r_a_t_o_r_-_=(const ___E_x_p_r_<___D_o_m_,_ ___T_p_>&) const; │ │ │ │ +112 template │ │ │ │ +113 void _o_p_e_r_a_t_o_r_^_=(const ___E_x_p_r_<___D_o_m_,_ ___T_p_>&) const; │ │ │ │ +114 template │ │ │ │ +115 void _o_p_e_r_a_t_o_r_&_=(const ___E_x_p_r_<___D_o_m_,_ ___T_p_>&) const; │ │ │ │ +116 template │ │ │ │ +117 void _o_p_e_r_a_t_o_r_|_=(const ___E_x_p_r_<___D_o_m_,_ ___T_p_>&) const; │ │ │ │ +118 template │ │ │ │ +119 void _o_p_e_r_a_t_o_r_<_<_=(const ___E_x_p_r_<___D_o_m_,_ ___T_p_>&) const; │ │ │ │ +120 template │ │ │ │ +121 void _o_p_e_r_a_t_o_r_>_>_=(const ___E_x_p_r_<___D_o_m_,_ ___T_p_>&) const; │ │ │ │ +122 │ │ │ │ +123 private: │ │ │ │ +124 ___A_r_r_a_y_<___T_p_> _M_array; │ │ │ │ +125 const _v_a_l_a_r_r_a_y_<_s_i_z_e___t_>& _M_index; │ │ │ │ +126 │ │ │ │ +127 friend class _v_a_l_a_r_r_a_y<_Tp>; │ │ │ │ +128 │ │ │ │ +129 _g_s_l_i_c_e___a_r_r_a_y(___A_r_r_a_y_<___T_p_>, const _v_a_l_a_r_r_a_y_<_s_i_z_e___t_>&); │ │ │ │ +130 │ │ │ │ +131#if __cplusplus < 201103L │ │ │ │ +132 // not implemented │ │ │ │ +133 _g_s_l_i_c_e___a_r_r_a_y(); │ │ │ │ +134#else │ │ │ │ +135 public: │ │ │ │ +136 _g_s_l_i_c_e___a_r_r_a_y() = delete; │ │ │ │ +137#endif │ │ │ │ +138 }; │ │ │ │ 139 │ │ │ │ -140 template │ │ │ │ -141 struct __is_uses_allocator_constructible │ │ │ │ -142 : __is_uses_allocator_predicate │ │ │ │ -143 { }; │ │ │ │ -144 │ │ │ │ -145#if __cplusplus >= 201402L │ │ │ │ -146 template │ │ │ │ -147 _GLIBCXX17_INLINE constexpr bool __is_uses_allocator_constructible_v = │ │ │ │ -148 __is_uses_allocator_constructible<_Tp, _Alloc, _Args...>::value; │ │ │ │ -149#endif // C++14 │ │ │ │ +140 template │ │ │ │ +141 inline │ │ │ │ +142 _g_s_l_i_c_e___a_r_r_a_y_<___T_p_>_:_:_g_s_l_i_c_e___a_r_r_a_y(___A_r_r_a_y_<___T_p_> __a, │ │ │ │ +143 const _v_a_l_a_r_r_a_y_<_s_i_z_e___t_>& __i) │ │ │ │ +144 : _M_array(__a), _M_index(__i) {} │ │ │ │ +145 │ │ │ │ +146 template │ │ │ │ +147 inline │ │ │ │ +148 gslice_array<_Tp>::gslice_array(const gslice_array<_Tp>& __a) │ │ │ │ +149 : _M_array(__a._M_array), _M_index(__a._M_index) {} │ │ │ │ 150 │ │ │ │ -151 template │ │ │ │ -152 struct __is_nothrow_uses_allocator_constructible │ │ │ │ -153 : __is_uses_allocator_predicate │ │ │ │ -155 { }; │ │ │ │ -156 │ │ │ │ -157 │ │ │ │ -158#if __cplusplus >= 201402L │ │ │ │ -159 template │ │ │ │ -160 _GLIBCXX17_INLINE constexpr bool │ │ │ │ -161 __is_nothrow_uses_allocator_constructible_v = │ │ │ │ -162 __is_nothrow_uses_allocator_constructible<_Tp, _Alloc, _Args...>::value; │ │ │ │ -163#endif // C++14 │ │ │ │ -164 │ │ │ │ -165 template │ │ │ │ -166 void __uses_allocator_construct_impl(__uses_alloc0 __a, _Tp* __ptr, │ │ │ │ -167 _Args&&... __args) │ │ │ │ -168 { ::new ((void*)__ptr) _Tp(_s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(__args)...); } │ │ │ │ -169 │ │ │ │ -170 template │ │ │ │ -171 void __uses_allocator_construct_impl(__uses_alloc1<_Alloc> __a, _Tp* __ptr, │ │ │ │ -172 _Args&&... __args) │ │ │ │ -173 { │ │ │ │ -174 ::new ((void*)__ptr) _Tp(allocator_arg, *__a._M_a, │ │ │ │ -175 _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(__args)...); │ │ │ │ -176 } │ │ │ │ -177 │ │ │ │ -178 template │ │ │ │ -179 void __uses_allocator_construct_impl(__uses_alloc2<_Alloc> __a, _Tp* __ptr, │ │ │ │ -180 _Args&&... __args) │ │ │ │ -181 { ::new ((void*)__ptr) _Tp(_s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(__args)..., *__a._M_a); } │ │ │ │ -182 │ │ │ │ -183 template │ │ │ │ -184 void __uses_allocator_construct(const _Alloc& __a, _Tp* __ptr, │ │ │ │ -185 _Args&&... __args) │ │ │ │ -186 { │ │ │ │ -187 _s_t_d_:_:_____u_s_e_s___a_l_l_o_c_a_t_o_r___c_o_n_s_t_r_u_c_t___i_m_p_l( │ │ │ │ -188 _s_t_d_:_:_____u_s_e___a_l_l_o_c_<___T_p_,_ ___A_l_l_o_c_,_ ___A_r_g_s_._._._>(__a), __ptr, │ │ │ │ -189 _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(__args)...); │ │ │ │ -190 } │ │ │ │ -191 │ │ │ │ -192/// @endcond │ │ │ │ -193_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ -194} // namespace std │ │ │ │ -195 │ │ │ │ -196#endif │ │ │ │ -197#endif │ │ │ │ -_t_y_p_e___t_r_a_i_t_s │ │ │ │ -_m_o_v_e_._h │ │ │ │ -_c_+_+_0_x___w_a_r_n_i_n_g_._h │ │ │ │ -_s_t_d_:_:_f_a_l_s_e___t_y_p_e │ │ │ │ -integral_constant< bool, false > false_type │ │ │ │ -The type used as a compile-time boolean with false value. │ │ │ │ -DDeeffiinniittiioonn _t_y_p_e___t_r_a_i_t_s_:_8_5 │ │ │ │ -_s_t_d_:_:_____a_d_d_r_e_s_s_o_f │ │ │ │ -constexpr _Tp * __addressof(_Tp &__r) noexcept │ │ │ │ -Same as C++11 std::addressof. │ │ │ │ -DDeeffiinniittiioonn _m_o_v_e_._h_:_4_9 │ │ │ │ +151 template │ │ │ │ +152 inline gslice_array<_Tp>& │ │ │ │ +153 _g_s_l_i_c_e___a_r_r_a_y_<___T_p_>_:_:_o_p_e_r_a_t_o_r_=(const gslice_array<_Tp>& __a) │ │ │ │ +154 { │ │ │ │ +155 std::__valarray_copy(_Array<_Tp>(__a._M_array), │ │ │ │ +156 _Array(__a._M_index), _M_index.size(), │ │ │ │ +157 _M_array, _Array(_M_index)); │ │ │ │ +158 return *this; │ │ │ │ +159 } │ │ │ │ +160 │ │ │ │ +161 template │ │ │ │ +162 inline void │ │ │ │ +_1_6_3 _g_s_l_i_c_e___a_r_r_a_y_<___T_p_>_:_:_o_p_e_r_a_t_o_r_=(const _Tp& __t) const │ │ │ │ +164 { │ │ │ │ +165 std::__valarray_fill(_M_array, ___A_r_r_a_y_<_s_i_z_e___t_>(_M_index), │ │ │ │ +166 _M_index.size(), __t); │ │ │ │ +167 } │ │ │ │ +168 │ │ │ │ +169 template │ │ │ │ +170 inline void │ │ │ │ +_1_7_1 _g_s_l_i_c_e___a_r_r_a_y_<___T_p_>_:_:_o_p_e_r_a_t_o_r_=(const _v_a_l_a_r_r_a_y_<___T_p_>& _____v) const │ │ │ │ +172 { │ │ │ │ +173 std::__valarray_copy(___A_r_r_a_y_<___T_p_>(_____v), _____v.size(), │ │ │ │ +174 _M_array, ___A_r_r_a_y_<_s_i_z_e___t_>(_M_index)); │ │ │ │ +175 } │ │ │ │ +176 │ │ │ │ +177 template │ │ │ │ +178 template │ │ │ │ +179 inline void │ │ │ │ +180 _g_s_l_i_c_e___a_r_r_a_y_<___T_p_>_:_:_o_p_e_r_a_t_o_r_=(const ___E_x_p_r_<___D_o_m_,_ ___T_p_>& __e) const │ │ │ │ +181 { │ │ │ │ +182 std::__valarray_copy (__e, _M_index.size(), _M_array, │ │ │ │ +183 ___A_r_r_a_y_<_s_i_z_e___t_>(_M_index)); │ │ │ │ +184 } │ │ │ │ +185 │ │ │ │ +186 /// @cond undocumented │ │ │ │ +187#undef _DEFINE_VALARRAY_OPERATOR │ │ │ │ +188#define _DEFINE_VALARRAY_OPERATOR(_Op, _Name) \ │ │ │ │ +189 template \ │ │ │ │ +190 inline void \ │ │ │ │ +191 gslice_array<_Tp>::operator _Op##=(const valarray<_Tp>& __v) const \ │ │ │ │ +192 { \ │ │ │ │ +193 _Array_augmented_##_Name(_M_array, _Array(_M_index), \ │ │ │ │ +194 _Array<_Tp>(__v), __v.size()); \ │ │ │ │ +195 } \ │ │ │ │ +196 \ │ │ │ │ +197 template \ │ │ │ │ +198 template \ │ │ │ │ +199 inline void \ │ │ │ │ +200 gslice_array<_Tp>::operator _Op##= (const _Expr<_Dom, _Tp>& __e) const\ │ │ │ │ +201 { \ │ │ │ │ +202 _Array_augmented_##_Name(_M_array, _Array(_M_index), __e,\ │ │ │ │ +203 _M_index.size()); \ │ │ │ │ +204 } │ │ │ │ +205 │ │ │ │ +206_DEFINE_VALARRAY_OPERATOR(*, __multiplies) │ │ │ │ +207_DEFINE_VALARRAY_OPERATOR(/, __divides) │ │ │ │ +208_DEFINE_VALARRAY_OPERATOR(%, __modulus) │ │ │ │ +209_DEFINE_VALARRAY_OPERATOR(+, __plus) │ │ │ │ +210_DEFINE_VALARRAY_OPERATOR(-, __minus) │ │ │ │ +211_DEFINE_VALARRAY_OPERATOR(^, __bitwise_xor) │ │ │ │ +212_DEFINE_VALARRAY_OPERATOR(&, __bitwise_and) │ │ │ │ +213_DEFINE_VALARRAY_OPERATOR(|, __bitwise_or) │ │ │ │ +214_DEFINE_VALARRAY_OPERATOR(<<, __shift_left) │ │ │ │ +215_DEFINE_VALARRAY_OPERATOR(>>, __shift_right) │ │ │ │ +216 │ │ │ │ +217#undef _DEFINE_VALARRAY_OPERATOR │ │ │ │ +218 /// @endcond │ │ │ │ +219 │ │ │ │ +220 /// @} group numeric_arrays │ │ │ │ +221 │ │ │ │ +222_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ +223} // namespace │ │ │ │ +224 │ │ │ │ +225#endif /* _GSLICE_ARRAY_H */ │ │ │ │ _s_t_d │ │ │ │ ISO C++ entities toplevel namespace is std. │ │ │ │ +_s_t_d_:_:_v_a_l_a_r_r_a_y │ │ │ │ +Smart array designed to support numeric processing. │ │ │ │ +DDeeffiinniittiioonn _v_a_l_a_r_r_a_y_:_1_2_8 │ │ │ │ +_s_t_d_:_:_g_s_l_i_c_e___a_r_r_a_y │ │ │ │ +Reference to multi-dimensional subset of an array. │ │ │ │ +DDeeffiinniittiioonn _g_s_l_i_c_e___a_r_r_a_y_._h_:_6_1 │ │ │ │ +_s_t_d_:_:_g_s_l_i_c_e___a_r_r_a_y_:_:_o_p_e_r_a_t_o_r_<_<_= │ │ │ │ +void operator<<=(const valarray< _Tp > &) const │ │ │ │ +Left shift slice elements by corresponding elements of v. │ │ │ │ +_s_t_d_:_:_g_s_l_i_c_e___a_r_r_a_y_:_:_o_p_e_r_a_t_o_r_/_= │ │ │ │ +void operator/=(const valarray< _Tp > &) const │ │ │ │ +Divide slice elements by corresponding elements of v. │ │ │ │ +_s_t_d_:_:_g_s_l_i_c_e___a_r_r_a_y_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ +gslice_array & operator=(const gslice_array &) │ │ │ │ +Assignment operator. Assigns slice elements to corresponding elements of a. │ │ │ │ +_s_t_d_:_:_g_s_l_i_c_e___a_r_r_a_y_:_:_o_p_e_r_a_t_o_r_%_= │ │ │ │ +void operator%=(const valarray< _Tp > &) const │ │ │ │ +Modulo slice elements by corresponding elements of v. │ │ │ │ +_s_t_d_:_:_g_s_l_i_c_e___a_r_r_a_y_:_:_o_p_e_r_a_t_o_r_>_>_= │ │ │ │ +void operator>>=(const valarray< _Tp > &) const │ │ │ │ +Right shift slice elements by corresponding elements of v. │ │ │ │ +_s_t_d_:_:_g_s_l_i_c_e___a_r_r_a_y_:_:_o_p_e_r_a_t_o_r_*_= │ │ │ │ +void operator*=(const valarray< _Tp > &) const │ │ │ │ +Multiply slice elements by corresponding elements of v. │ │ │ │ +_s_t_d_:_:_g_s_l_i_c_e___a_r_r_a_y_:_:_o_p_e_r_a_t_o_r_|_= │ │ │ │ +void operator|=(const valarray< _Tp > &) const │ │ │ │ +Logical or slice elements with corresponding elements of v. │ │ │ │ +_s_t_d_:_:_g_s_l_i_c_e___a_r_r_a_y_:_:_o_p_e_r_a_t_o_r_^_= │ │ │ │ +void operator^=(const valarray< _Tp > &) const │ │ │ │ +Logical xor slice elements with corresponding elements of v. │ │ │ │ +_s_t_d_:_:_g_s_l_i_c_e___a_r_r_a_y_:_:_g_s_l_i_c_e___a_r_r_a_y │ │ │ │ +gslice_array(const gslice_array &) │ │ │ │ +Copy constructor. Both slices refer to the same underlying array. │ │ │ │ +_s_t_d_:_:_g_s_l_i_c_e___a_r_r_a_y_:_:_o_p_e_r_a_t_o_r_-_= │ │ │ │ +void operator-=(const valarray< _Tp > &) const │ │ │ │ +Subtract corresponding elements of v from slice elements. │ │ │ │ +_s_t_d_:_:_g_s_l_i_c_e___a_r_r_a_y_:_:_o_p_e_r_a_t_o_r_+_= │ │ │ │ +void operator+=(const valarray< _Tp > &) const │ │ │ │ +Add corresponding elements of v to slice elements. │ │ │ │ +_s_t_d_:_:_g_s_l_i_c_e___a_r_r_a_y_:_:_o_p_e_r_a_t_o_r_&_= │ │ │ │ +void operator&=(const valarray< _Tp > &) const │ │ │ │ +Logical and slice elements with corresponding elements of v. │ │ │ │ _s_t_d_:_:_a_u_t_o___p_t_r___r_e_f │ │ │ │ DDeeffiinniittiioonn _a_u_t_o___p_t_r_._h_:_4_9 │ │ │ │ * _b_i_t_s │ │ │ │ - * uusseess__aallllooccaattoorr..hh │ │ │ │ + * _g_s_l_i_c_e___a_r_r_a_y_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-12-base/libstdc++/user/a00374.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: unordered_set.h File Reference │ │ │ +libstdc++: stream_iterator.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -47,121 +47,41 @@ │ │ │ $(document).ready(function(){initNavTree('a00374.html',''); initResizable(); }); │ │ │ /* @license-end */ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ Classes | │ │ │ -Namespaces | │ │ │ -Typedefs | │ │ │ -Functions
│ │ │ -
unordered_set.h File Reference
│ │ │ +Namespaces
│ │ │ +
stream_iterator.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ - │ │ │ + │ │ │ │ │ │ - │ │ │ + │ │ │ │ │ │

│ │ │ Classes

class  std::unordered_multiset< _Value, _Hash, _Pred, _Alloc >
class  std::istream_iterator< _Tp, _CharT, _Traits, _Dist >
 
class  std::unordered_set< _Value, _Hash, _Pred, _Alloc >
class  std::ostream_iterator< _Tp, _CharT, _Traits >
 
│ │ │ │ │ │ │ │ │ │ │ │ -

│ │ │ Namespaces

namespace  std
 
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -

│ │ │ -Typedefs

template<typename _Value , typename _Hash = hash<_Value>, typename _Pred = std::equal_to<_Value>, typename _Alloc = std::allocator<_Value>, typename _Tr = __umset_traits<__cache_default<_Value, _Hash>::value>>
using std::__umset_hashtable = _Hashtable< _Value, _Value, _Alloc, __detail::_Identity, _Pred, _Hash, __detail::_Mod_range_hashing, __detail::_Default_ranged_hash, __detail::_Prime_rehash_policy, _Tr >
 
template<bool _Cache>
using std::__umset_traits = __detail::_Hashtable_traits< _Cache, true, false >
 
template<typename _Value , typename _Hash = hash<_Value>, typename _Pred = std::equal_to<_Value>, typename _Alloc = std::allocator<_Value>, typename _Tr = __uset_traits<__cache_default<_Value, _Hash>::value>>
using std::__uset_hashtable = _Hashtable< _Value, _Value, _Alloc, __detail::_Identity, _Pred, _Hash, __detail::_Mod_range_hashing, __detail::_Default_ranged_hash, __detail::_Prime_rehash_policy, _Tr >
 
template<bool _Cache>
using std::__uset_traits = __detail::_Hashtable_traits< _Cache, true, true >
 
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │

│ │ │ -Functions

template<class _Value , class _Hash , class _Pred , class _Alloc >
bool std::operator== (const unordered_multiset< _Value, _Hash, _Pred, _Alloc > &__x, const unordered_multiset< _Value, _Hash, _Pred, _Alloc > &__y)
 
template<class _Value , class _Hash , class _Pred , class _Alloc >
bool std::operator== (const unordered_set< _Value, _Hash, _Pred, _Alloc > &__x, const unordered_set< _Value, _Hash, _Pred, _Alloc > &__y)
 
template<class _Value , class _Hash , class _Pred , class _Alloc >
void std::swap (unordered_multiset< _Value, _Hash, _Pred, _Alloc > &__x, unordered_multiset< _Value, _Hash, _Pred, _Alloc > &__y) noexcept(noexcept(__x.swap(__y)))
 
template<class _Value , class _Hash , class _Pred , class _Alloc >
void std::swap (unordered_set< _Value, _Hash, _Pred, _Alloc > &__x, unordered_set< _Value, _Hash, _Pred, _Alloc > &__y) noexcept(noexcept(__x.swap(__y)))
 
│ │ │ -template<typename _InputIterator , typename _Allocator , typename = _RequireInputIter<_InputIterator>, typename = _RequireAllocator<_Allocator>>
 std::unordered_multiset (_InputIterator, _InputIterator, unordered_multiset< int >::size_type, _Allocator) -> unordered_multiset< typename iterator_traits< _InputIterator >::value_type, hash< typename iterator_traits< _InputIterator >::value_type >, equal_to< typename iterator_traits< _InputIterator >::value_type >, _Allocator >
 
│ │ │ -template<typename _InputIterator , typename _Hash , typename _Allocator , typename = _RequireInputIter<_InputIterator>, typename = _RequireNotAllocatorOrIntegral<_Hash>, typename = _RequireAllocator<_Allocator>>
 std::unordered_multiset (_InputIterator, _InputIterator, unordered_multiset< int >::size_type, _Hash, _Allocator) -> unordered_multiset< typename iterator_traits< _InputIterator >::value_type, _Hash, equal_to< typename iterator_traits< _InputIterator >::value_type >, _Allocator >
 
│ │ │ -template<typename _InputIterator , typename _Hash = hash<typename iterator_traits<_InputIterator>::value_type>, typename _Pred = equal_to<typename iterator_traits<_InputIterator>::value_type>, typename _Allocator = allocator<typename iterator_traits<_InputIterator>::value_type>, typename = _RequireInputIter<_InputIterator>, typename = _RequireNotAllocatorOrIntegral<_Hash>, typename = _RequireNotAllocator<_Pred>, typename = _RequireAllocator<_Allocator>>
 std::unordered_multiset (_InputIterator, _InputIterator, unordered_multiset< int >::size_type={}, _Hash=_Hash(), _Pred=_Pred(), _Allocator=_Allocator()) -> unordered_multiset< typename iterator_traits< _InputIterator >::value_type, _Hash, _Pred, _Allocator >
 
│ │ │ -template<typename _Tp , typename _Allocator , typename = _RequireAllocator<_Allocator>>
 std::unordered_multiset (initializer_list< _Tp >, unordered_multiset< int >::size_type, _Allocator) -> unordered_multiset< _Tp, hash< _Tp >, equal_to< _Tp >, _Allocator >
 
│ │ │ -template<typename _Tp , typename _Hash , typename _Allocator , typename = _RequireNotAllocatorOrIntegral<_Hash>, typename = _RequireAllocator<_Allocator>>
 std::unordered_multiset (initializer_list< _Tp >, unordered_multiset< int >::size_type, _Hash, _Allocator) -> unordered_multiset< _Tp, _Hash, equal_to< _Tp >, _Allocator >
 
│ │ │ -template<typename _Tp , typename _Hash = hash<_Tp>, typename _Pred = equal_to<_Tp>, typename _Allocator = allocator<_Tp>, typename = _RequireNotAllocatorOrIntegral<_Hash>, typename = _RequireNotAllocator<_Pred>, typename = _RequireAllocator<_Allocator>>
 std::unordered_multiset (initializer_list< _Tp >, unordered_multiset< int >::size_type={}, _Hash=_Hash(), _Pred=_Pred(), _Allocator=_Allocator()) -> unordered_multiset< _Tp, _Hash, _Pred, _Allocator >
 
│ │ │ -template<typename _InputIterator , typename _Allocator , typename = _RequireInputIter<_InputIterator>, typename = _RequireAllocator<_Allocator>>
 std::unordered_set (_InputIterator, _InputIterator, unordered_set< int >::size_type, _Allocator) -> unordered_set< typename iterator_traits< _InputIterator >::value_type, hash< typename iterator_traits< _InputIterator >::value_type >, equal_to< typename iterator_traits< _InputIterator >::value_type >, _Allocator >
 
│ │ │ -template<typename _InputIterator , typename _Hash , typename _Allocator , typename = _RequireInputIter<_InputIterator>, typename = _RequireNotAllocatorOrIntegral<_Hash>, typename = _RequireAllocator<_Allocator>>
 std::unordered_set (_InputIterator, _InputIterator, unordered_set< int >::size_type, _Hash, _Allocator) -> unordered_set< typename iterator_traits< _InputIterator >::value_type, _Hash, equal_to< typename iterator_traits< _InputIterator >::value_type >, _Allocator >
 
│ │ │ -template<typename _InputIterator , typename _Hash = hash<typename iterator_traits<_InputIterator>::value_type>, typename _Pred = equal_to<typename iterator_traits<_InputIterator>::value_type>, typename _Allocator = allocator<typename iterator_traits<_InputIterator>::value_type>, typename = _RequireInputIter<_InputIterator>, typename = _RequireNotAllocatorOrIntegral<_Hash>, typename = _RequireNotAllocator<_Pred>, typename = _RequireAllocator<_Allocator>>
 std::unordered_set (_InputIterator, _InputIterator, unordered_set< int >::size_type={}, _Hash=_Hash(), _Pred=_Pred(), _Allocator=_Allocator()) -> unordered_set< typename iterator_traits< _InputIterator >::value_type, _Hash, _Pred, _Allocator >
 
│ │ │ -template<typename _Tp , typename _Allocator , typename = _RequireAllocator<_Allocator>>
 std::unordered_set (initializer_list< _Tp >, unordered_set< int >::size_type, _Allocator) -> unordered_set< _Tp, hash< _Tp >, equal_to< _Tp >, _Allocator >
 
│ │ │ -template<typename _Tp , typename _Hash , typename _Allocator , typename = _RequireNotAllocatorOrIntegral<_Hash>, typename = _RequireAllocator<_Allocator>>
 std::unordered_set (initializer_list< _Tp >, unordered_set< int >::size_type, _Hash, _Allocator) -> unordered_set< _Tp, _Hash, equal_to< _Tp >, _Allocator >
 
│ │ │ -template<typename _Tp , typename _Hash = hash<_Tp>, typename _Pred = equal_to<_Tp>, typename _Allocator = allocator<_Tp>, typename = _RequireNotAllocatorOrIntegral<_Hash>, typename = _RequireNotAllocator<_Pred>, typename = _RequireAllocator<_Allocator>>
 std::unordered_set (initializer_list< _Tp >, unordered_set< int >::size_type={}, _Hash=_Hash(), _Pred=_Pred(), _Allocator=_Allocator()) -> unordered_set< _Tp, _Hash, _Pred, _Allocator >
 
│ │ │

Detailed Description

│ │ │ -

This is an internal header file, included by other library headers. Do not attempt to use it directly. Instead, include <unordered_set>.

│ │ │ +

This is an internal header file, included by other library headers. Do not attempt to use it directly. Instead, include <iterator>.

│ │ │ │ │ │ -

Definition in file unordered_set.h.

│ │ │ +

Definition in file stream_iterator.h.

│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,160 +1,19 @@ │ │ │ │ libstdc++ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _T_y_p_e_d_e_f_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -unordered_set.h File Reference │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ +stream_iterator.h File Reference │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ CCllaasssseess │ │ │ │ -class   _s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_<_ ___V_a_l_u_e_,_ ___H_a_s_h_,_ ___P_r_e_d_,_ ___A_l_l_o_c_ _> │ │ │ │ +class   _s_t_d_:_:_i_s_t_r_e_a_m___i_t_e_r_a_t_o_r_<_ ___T_p_,_ ___C_h_a_r_T_,_ ___T_r_a_i_t_s_,_ ___D_i_s_t_ _> │ │ │ │   │ │ │ │ -class   _s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_<_ ___V_a_l_u_e_,_ ___H_a_s_h_,_ ___P_r_e_d_,_ ___A_l_l_o_c_ _> │ │ │ │ +class   _s_t_d_:_:_o_s_t_r_e_a_m___i_t_e_r_a_t_o_r_<_ ___T_p_,_ ___C_h_a_r_T_,_ ___T_r_a_i_t_s_ _> │ │ │ │   │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _s_t_d │ │ │ │   │ │ │ │ -TTyyppeeddeeffss │ │ │ │ -template<_t_y_p_e_n_a_m_e _Value , _t_y_p_e_n_a_m_e ___H_a_s_h = hash<_Value>, _t_y_p_e_n_a_m_e ___P_r_e_d = │ │ │ │ -std::equal_to<_Value>, _t_y_p_e_n_a_m_e _Alloc = std::allocator<_Value>, _t_y_p_e_n_a_m_e ___T_r = │ │ │ │ -__umset_traits<__cache_default<_Value, _Hash>::value>> │ │ │ │ -_u_s_i_n_g  _s_t_d_:_:_____u_m_s_e_t___h_a_s_h_t_a_b_l_e = _Hashtable< _Value, _Value, _Alloc, __detail:: │ │ │ │ - _Identity, ___P_r_e_d, ___H_a_s_h, __detail::_Mod_range_hashing, __detail:: │ │ │ │ - _Default_ranged_hash, __detail::_Prime_rehash_policy, ___T_r > │ │ │ │ -  │ │ │ │ -template │ │ │ │ -_u_s_i_n_g  _s_t_d_:_:_____u_m_s_e_t___t_r_a_i_t_s = __detail::_Hashtable_traits< ___C_a_c_h_e, _t_r_u_e, _f_a_l_s_e > │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Value , _t_y_p_e_n_a_m_e ___H_a_s_h = hash<_Value>, _t_y_p_e_n_a_m_e ___P_r_e_d = │ │ │ │ -std::equal_to<_Value>, _t_y_p_e_n_a_m_e _Alloc = std::allocator<_Value>, _t_y_p_e_n_a_m_e ___T_r = │ │ │ │ -__uset_traits<__cache_default<_Value, _Hash>::value>> │ │ │ │ -_u_s_i_n_g  _s_t_d_:_:_____u_s_e_t___h_a_s_h_t_a_b_l_e = _Hashtable< _Value, _Value, _Alloc, __detail:: │ │ │ │ - _Identity, ___P_r_e_d, ___H_a_s_h, __detail::_Mod_range_hashing, __detail:: │ │ │ │ - _Default_ranged_hash, __detail::_Prime_rehash_policy, ___T_r > │ │ │ │ -  │ │ │ │ -template │ │ │ │ -_u_s_i_n_g  _s_t_d_:_:_____u_s_e_t___t_r_a_i_t_s = __detail::_Hashtable_traits< ___C_a_c_h_e, _t_r_u_e, _t_r_u_e > │ │ │ │ -  │ │ │ │ -FFuunnccttiioonnss │ │ │ │ -template<_c_l_a_s_s _Value , _c_l_a_s_s ___H_a_s_h , _c_l_a_s_s ___P_r_e_d , _c_l_a_s_s _Alloc > │ │ │ │ -bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_=_= (const _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t< _Value, ___H_a_s_h, ___P_r_e_d, _Alloc > │ │ │ │ - &__x, const _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t< _Value, ___H_a_s_h, ___P_r_e_d, _Alloc > &__y) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s _Value , _c_l_a_s_s ___H_a_s_h , _c_l_a_s_s ___P_r_e_d , _c_l_a_s_s _Alloc > │ │ │ │ -bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_=_= (const _u_n_o_r_d_e_r_e_d___s_e_t< _Value, ___H_a_s_h, ___P_r_e_d, _Alloc > │ │ │ │ - &__x, const _u_n_o_r_d_e_r_e_d___s_e_t< _Value, ___H_a_s_h, ___P_r_e_d, _Alloc > &__y) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s _Value , _c_l_a_s_s ___H_a_s_h , _c_l_a_s_s ___P_r_e_d , _c_l_a_s_s _Alloc > │ │ │ │ -_v_o_i_d  _s_t_d_:_:_s_w_a_p (_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t< _Value, ___H_a_s_h, ___P_r_e_d, _Alloc > &__x, │ │ │ │ - _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t< _Value, ___H_a_s_h, ___P_r_e_d, _Alloc > &__y) noexcept │ │ │ │ - (noexcept(__x.swap(__y))) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s _Value , _c_l_a_s_s ___H_a_s_h , _c_l_a_s_s ___P_r_e_d , _c_l_a_s_s _Alloc > │ │ │ │ -_v_o_i_d  _s_t_d_:_:_s_w_a_p (_u_n_o_r_d_e_r_e_d___s_e_t< _Value, ___H_a_s_h, ___P_r_e_d, _Alloc > &__x, │ │ │ │ - _u_n_o_r_d_e_r_e_d___s_e_t< _Value, ___H_a_s_h, ___P_r_e_d, _Alloc > &__y) noexcept(noexcept │ │ │ │ - (__x.swap(__y))) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e ___I_n_p_u_t_I_t_e_r_a_t_o_r , _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r , _t_y_p_e_n_a_m_e = │ │ │ │ -_RequireInputIter<_InputIterator>, _t_y_p_e_n_a_m_e = _RequireAllocator<_Allocator>> │ │ │ │ -   ssttdd::::uunnoorrddeerreedd__mmuullttiisseett (___I_n_p_u_t_I_t_e_r_a_t_o_r, ___I_n_p_u_t_I_t_e_r_a_t_o_r, │ │ │ │ - _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t< int >::size_type, ___A_l_l_o_c_a_t_o_r) -> _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t< │ │ │ │ - _t_y_p_e_n_a_m_e _i_t_e_r_a_t_o_r___t_r_a_i_t_s< ___I_n_p_u_t_I_t_e_r_a_t_o_r >::value_type, _h_a_s_h< _t_y_p_e_n_a_m_e │ │ │ │ - _i_t_e_r_a_t_o_r___t_r_a_i_t_s< ___I_n_p_u_t_I_t_e_r_a_t_o_r >::value_type >, _e_q_u_a_l___t_o< _t_y_p_e_n_a_m_e │ │ │ │ - _i_t_e_r_a_t_o_r___t_r_a_i_t_s< ___I_n_p_u_t_I_t_e_r_a_t_o_r >::value_type >, ___A_l_l_o_c_a_t_o_r > │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e ___I_n_p_u_t_I_t_e_r_a_t_o_r , _t_y_p_e_n_a_m_e ___H_a_s_h , _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r , │ │ │ │ -_t_y_p_e_n_a_m_e = _RequireInputIter<_InputIterator>, _t_y_p_e_n_a_m_e = │ │ │ │ -_RequireNotAllocatorOrIntegral<_Hash>, _t_y_p_e_n_a_m_e = │ │ │ │ -_RequireAllocator<_Allocator>> │ │ │ │ -   ssttdd::::uunnoorrddeerreedd__mmuullttiisseett (___I_n_p_u_t_I_t_e_r_a_t_o_r, ___I_n_p_u_t_I_t_e_r_a_t_o_r, │ │ │ │ - _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t< int >::size_type, ___H_a_s_h, ___A_l_l_o_c_a_t_o_r) - │ │ │ │ - > _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t< _t_y_p_e_n_a_m_e _i_t_e_r_a_t_o_r___t_r_a_i_t_s< ___I_n_p_u_t_I_t_e_r_a_t_o_r >:: │ │ │ │ - value_type, ___H_a_s_h, _e_q_u_a_l___t_o< _t_y_p_e_n_a_m_e _i_t_e_r_a_t_o_r___t_r_a_i_t_s< ___I_n_p_u_t_I_t_e_r_a_t_o_r >:: │ │ │ │ - value_type >, ___A_l_l_o_c_a_t_o_r > │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e ___I_n_p_u_t_I_t_e_r_a_t_o_r , _t_y_p_e_n_a_m_e ___H_a_s_h = hash::value_type>, _t_y_p_e_n_a_m_e ___P_r_e_d = │ │ │ │ -equal_to::value_type>, _t_y_p_e_n_a_m_e │ │ │ │ -___A_l_l_o_c_a_t_o_r = allocator::value_type>, │ │ │ │ -_t_y_p_e_n_a_m_e = _RequireInputIter<_InputIterator>, _t_y_p_e_n_a_m_e = │ │ │ │ -_RequireNotAllocatorOrIntegral<_Hash>, _t_y_p_e_n_a_m_e = _RequireNotAllocator<_Pred>, │ │ │ │ -_t_y_p_e_n_a_m_e = _RequireAllocator<_Allocator>> │ │ │ │ -   ssttdd::::uunnoorrddeerreedd__mmuullttiisseett (___I_n_p_u_t_I_t_e_r_a_t_o_r, ___I_n_p_u_t_I_t_e_r_a_t_o_r, │ │ │ │ - _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t< int >::size_type={}, ___H_a_s_h=___H_a_s_h(), ___P_r_e_d=___P_r_e_d(), │ │ │ │ - ___A_l_l_o_c_a_t_o_r=___A_l_l_o_c_a_t_o_r()) -> _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t< _t_y_p_e_n_a_m_e _i_t_e_r_a_t_o_r___t_r_a_i_t_s< │ │ │ │ - ___I_n_p_u_t_I_t_e_r_a_t_o_r >::value_type, ___H_a_s_h, ___P_r_e_d, ___A_l_l_o_c_a_t_o_r > │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r , _t_y_p_e_n_a_m_e = │ │ │ │ -_RequireAllocator<_Allocator>> │ │ │ │ -   ssttdd::::uunnoorrddeerreedd__mmuullttiisseett (_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t< _Tp >, _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t< int │ │ │ │ - >::size_type, ___A_l_l_o_c_a_t_o_r) -> _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t< _Tp, _h_a_s_h< _Tp >, │ │ │ │ - _e_q_u_a_l___t_o< _Tp >, ___A_l_l_o_c_a_t_o_r > │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___H_a_s_h , _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r , _t_y_p_e_n_a_m_e = │ │ │ │ -_RequireNotAllocatorOrIntegral<_Hash>, _t_y_p_e_n_a_m_e = │ │ │ │ -_RequireAllocator<_Allocator>> │ │ │ │ -   ssttdd::::uunnoorrddeerreedd__mmuullttiisseett (_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t< _Tp >, _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t< int │ │ │ │ - >::size_type, ___H_a_s_h, ___A_l_l_o_c_a_t_o_r) -> _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t< _Tp, ___H_a_s_h, │ │ │ │ - _e_q_u_a_l___t_o< _Tp >, ___A_l_l_o_c_a_t_o_r > │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___H_a_s_h = hash<_Tp>, _t_y_p_e_n_a_m_e ___P_r_e_d = │ │ │ │ -equal_to<_Tp>, _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r = allocator<_Tp>, _t_y_p_e_n_a_m_e = │ │ │ │ -_RequireNotAllocatorOrIntegral<_Hash>, _t_y_p_e_n_a_m_e = _RequireNotAllocator<_Pred>, │ │ │ │ -_t_y_p_e_n_a_m_e = _RequireAllocator<_Allocator>> │ │ │ │ -   ssttdd::::uunnoorrddeerreedd__mmuullttiisseett (_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t< _Tp >, _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t< int │ │ │ │ - >::size_type={}, ___H_a_s_h=___H_a_s_h(), ___P_r_e_d=___P_r_e_d(), ___A_l_l_o_c_a_t_o_r=___A_l_l_o_c_a_t_o_r()) - │ │ │ │ - > _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t< _Tp, ___H_a_s_h, ___P_r_e_d, ___A_l_l_o_c_a_t_o_r > │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e ___I_n_p_u_t_I_t_e_r_a_t_o_r , _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r , _t_y_p_e_n_a_m_e = │ │ │ │ -_RequireInputIter<_InputIterator>, _t_y_p_e_n_a_m_e = _RequireAllocator<_Allocator>> │ │ │ │ -   ssttdd::::uunnoorrddeerreedd__sseett (___I_n_p_u_t_I_t_e_r_a_t_o_r, ___I_n_p_u_t_I_t_e_r_a_t_o_r, _u_n_o_r_d_e_r_e_d___s_e_t< int │ │ │ │ - >::size_type, ___A_l_l_o_c_a_t_o_r) -> _u_n_o_r_d_e_r_e_d___s_e_t< _t_y_p_e_n_a_m_e _i_t_e_r_a_t_o_r___t_r_a_i_t_s< │ │ │ │ - ___I_n_p_u_t_I_t_e_r_a_t_o_r >::value_type, _h_a_s_h< _t_y_p_e_n_a_m_e _i_t_e_r_a_t_o_r___t_r_a_i_t_s< │ │ │ │ - ___I_n_p_u_t_I_t_e_r_a_t_o_r >::value_type >, _e_q_u_a_l___t_o< _t_y_p_e_n_a_m_e _i_t_e_r_a_t_o_r___t_r_a_i_t_s< │ │ │ │ - ___I_n_p_u_t_I_t_e_r_a_t_o_r >::value_type >, ___A_l_l_o_c_a_t_o_r > │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e ___I_n_p_u_t_I_t_e_r_a_t_o_r , _t_y_p_e_n_a_m_e ___H_a_s_h , _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r , │ │ │ │ -_t_y_p_e_n_a_m_e = _RequireInputIter<_InputIterator>, _t_y_p_e_n_a_m_e = │ │ │ │ -_RequireNotAllocatorOrIntegral<_Hash>, _t_y_p_e_n_a_m_e = │ │ │ │ -_RequireAllocator<_Allocator>> │ │ │ │ -   ssttdd::::uunnoorrddeerreedd__sseett (___I_n_p_u_t_I_t_e_r_a_t_o_r, ___I_n_p_u_t_I_t_e_r_a_t_o_r, _u_n_o_r_d_e_r_e_d___s_e_t< int │ │ │ │ - >::size_type, ___H_a_s_h, ___A_l_l_o_c_a_t_o_r) -> _u_n_o_r_d_e_r_e_d___s_e_t< _t_y_p_e_n_a_m_e │ │ │ │ - _i_t_e_r_a_t_o_r___t_r_a_i_t_s< ___I_n_p_u_t_I_t_e_r_a_t_o_r >::value_type, ___H_a_s_h, _e_q_u_a_l___t_o< _t_y_p_e_n_a_m_e │ │ │ │ - _i_t_e_r_a_t_o_r___t_r_a_i_t_s< ___I_n_p_u_t_I_t_e_r_a_t_o_r >::value_type >, ___A_l_l_o_c_a_t_o_r > │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e ___I_n_p_u_t_I_t_e_r_a_t_o_r , _t_y_p_e_n_a_m_e ___H_a_s_h = hash::value_type>, _t_y_p_e_n_a_m_e ___P_r_e_d = │ │ │ │ -equal_to::value_type>, _t_y_p_e_n_a_m_e │ │ │ │ -___A_l_l_o_c_a_t_o_r = allocator::value_type>, │ │ │ │ -_t_y_p_e_n_a_m_e = _RequireInputIter<_InputIterator>, _t_y_p_e_n_a_m_e = │ │ │ │ -_RequireNotAllocatorOrIntegral<_Hash>, _t_y_p_e_n_a_m_e = _RequireNotAllocator<_Pred>, │ │ │ │ -_t_y_p_e_n_a_m_e = _RequireAllocator<_Allocator>> │ │ │ │ -   ssttdd::::uunnoorrddeerreedd__sseett (___I_n_p_u_t_I_t_e_r_a_t_o_r, ___I_n_p_u_t_I_t_e_r_a_t_o_r, _u_n_o_r_d_e_r_e_d___s_e_t< int │ │ │ │ - >::size_type={}, ___H_a_s_h=___H_a_s_h(), ___P_r_e_d=___P_r_e_d(), ___A_l_l_o_c_a_t_o_r=___A_l_l_o_c_a_t_o_r()) - │ │ │ │ - > _u_n_o_r_d_e_r_e_d___s_e_t< _t_y_p_e_n_a_m_e _i_t_e_r_a_t_o_r___t_r_a_i_t_s< ___I_n_p_u_t_I_t_e_r_a_t_o_r >::value_type, │ │ │ │ - ___H_a_s_h, ___P_r_e_d, ___A_l_l_o_c_a_t_o_r > │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r , _t_y_p_e_n_a_m_e = │ │ │ │ -_RequireAllocator<_Allocator>> │ │ │ │ -   ssttdd::::uunnoorrddeerreedd__sseett (_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t< _Tp >, _u_n_o_r_d_e_r_e_d___s_e_t< int >:: │ │ │ │ - size_type, ___A_l_l_o_c_a_t_o_r) -> _u_n_o_r_d_e_r_e_d___s_e_t< _Tp, _h_a_s_h< _Tp >, _e_q_u_a_l___t_o< _Tp │ │ │ │ - >, ___A_l_l_o_c_a_t_o_r > │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___H_a_s_h , _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r , _t_y_p_e_n_a_m_e = │ │ │ │ -_RequireNotAllocatorOrIntegral<_Hash>, _t_y_p_e_n_a_m_e = │ │ │ │ -_RequireAllocator<_Allocator>> │ │ │ │ -   ssttdd::::uunnoorrddeerreedd__sseett (_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t< _Tp >, _u_n_o_r_d_e_r_e_d___s_e_t< int >:: │ │ │ │ - size_type, ___H_a_s_h, ___A_l_l_o_c_a_t_o_r) -> _u_n_o_r_d_e_r_e_d___s_e_t< _Tp, ___H_a_s_h, _e_q_u_a_l___t_o< _Tp │ │ │ │ - >, ___A_l_l_o_c_a_t_o_r > │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___H_a_s_h = hash<_Tp>, _t_y_p_e_n_a_m_e ___P_r_e_d = │ │ │ │ -equal_to<_Tp>, _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r = allocator<_Tp>, _t_y_p_e_n_a_m_e = │ │ │ │ -_RequireNotAllocatorOrIntegral<_Hash>, _t_y_p_e_n_a_m_e = _RequireNotAllocator<_Pred>, │ │ │ │ -_t_y_p_e_n_a_m_e = _RequireAllocator<_Allocator>> │ │ │ │ -   ssttdd::::uunnoorrddeerreedd__sseett (_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t< _Tp >, _u_n_o_r_d_e_r_e_d___s_e_t< int >:: │ │ │ │ - size_type={}, ___H_a_s_h=___H_a_s_h(), ___P_r_e_d=___P_r_e_d(), ___A_l_l_o_c_a_t_o_r=___A_l_l_o_c_a_t_o_r()) - │ │ │ │ - > _u_n_o_r_d_e_r_e_d___s_e_t< _Tp, ___H_a_s_h, ___P_r_e_d, ___A_l_l_o_c_a_t_o_r > │ │ │ │ -  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ This is an internal header file, included by other library headers. Do not │ │ │ │ -attempt to use it directly. Instead, include . │ │ │ │ -Definition in file _u_n_o_r_d_e_r_e_d___s_e_t_._h. │ │ │ │ +attempt to use it directly. Instead, include . │ │ │ │ +Definition in file _s_t_r_e_a_m___i_t_e_r_a_t_o_r_._h. │ │ │ │ * _b_i_t_s │ │ │ │ - * _u_n_o_r_d_e_r_e_d___s_e_t_._h │ │ │ │ + * _s_t_r_e_a_m___i_t_e_r_a_t_o_r_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-12-base/libstdc++/user/a00374_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: unordered_set.h Source File │ │ │ +libstdc++: stream_iterator.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -45,20 +45,20 @@ │ │ │ │ │ │
│ │ │
│ │ │ -
unordered_set.h
│ │ │ +
stream_iterator.h
│ │ │
│ │ │
│ │ │ -Go to the documentation of this file.
1// unordered_set implementation -*- C++ -*-
│ │ │ +Go to the documentation of this file.
1// Stream iterators
│ │ │
2
│ │ │ -
3// Copyright (C) 2010-2022 Free Software Foundation, Inc.
│ │ │ +
3// Copyright (C) 2001-2022 Free Software Foundation, Inc.
│ │ │
4//
│ │ │
5// This file is part of the GNU ISO C++ Library. This library is free
│ │ │
6// software; you can redistribute it and/or modify it under the
│ │ │
7// terms of the GNU General Public License as published by the
│ │ │
8// Free Software Foundation; either version 3, or (at your option)
│ │ │
9// any later version.
│ │ │
10
│ │ │ @@ -72,2295 +72,303 @@ │ │ │
18// 3.1, as published by the Free Software Foundation.
│ │ │
19
│ │ │
20// You should have received a copy of the GNU General Public License and
│ │ │
21// a copy of the GCC Runtime Library Exception along with this program;
│ │ │
22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
│ │ │
23// <http://www.gnu.org/licenses/>.
│ │ │
24
│ │ │ -
25/** @file bits/unordered_set.h
│ │ │ +
25/** @file bits/stream_iterator.h
│ │ │
26 * This is an internal header file, included by other library headers.
│ │ │ -
27 * Do not attempt to use it directly. @headername{unordered_set}
│ │ │ +
27 * Do not attempt to use it directly. @headername{iterator}
│ │ │
28 */
│ │ │
29
│ │ │ -
30#ifndef _UNORDERED_SET_H
│ │ │ -
31#define _UNORDERED_SET_H
│ │ │ +
30#ifndef _STREAM_ITERATOR_H
│ │ │ +
31#define _STREAM_ITERATOR_H 1
│ │ │
32
│ │ │ -
33namespace std _GLIBCXX_VISIBILITY(default)
│ │ │ -
34{
│ │ │ -
35_GLIBCXX_BEGIN_NAMESPACE_VERSION
│ │ │ -
36_GLIBCXX_BEGIN_NAMESPACE_CONTAINER
│ │ │ -
37
│ │ │ -
38 /// Base types for unordered_set.
│ │ │ -
39 template<bool _Cache>
│ │ │ -
40 using __uset_traits = __detail::_Hashtable_traits<_Cache, true, true>;
│ │ │ -
41
│ │ │ -
42 template<typename _Value,
│ │ │ -
43 typename _Hash = hash<_Value>,
│ │ │ - │ │ │ -
45 typename _Alloc = std::allocator<_Value>,
│ │ │ - │ │ │ -
47 using __uset_hashtable = _Hashtable<_Value, _Value, _Alloc,
│ │ │ -
48 __detail::_Identity, _Pred, _Hash,
│ │ │ -
49 __detail::_Mod_range_hashing,
│ │ │ -
50 __detail::_Default_ranged_hash,
│ │ │ -
51 __detail::_Prime_rehash_policy, _Tr>;
│ │ │ -
52
│ │ │ -
53 /// Base types for unordered_multiset.
│ │ │ -
54 template<bool _Cache>
│ │ │ -
55 using __umset_traits = __detail::_Hashtable_traits<_Cache, true, false>;
│ │ │ -
56
│ │ │ -
57 template<typename _Value,
│ │ │ -
58 typename _Hash = hash<_Value>,
│ │ │ - │ │ │ -
60 typename _Alloc = std::allocator<_Value>,
│ │ │ - │ │ │ -
62 using __umset_hashtable = _Hashtable<_Value, _Value, _Alloc,
│ │ │ -
63 __detail::_Identity,
│ │ │ -
64 _Pred, _Hash,
│ │ │ -
65 __detail::_Mod_range_hashing,
│ │ │ -
66 __detail::_Default_ranged_hash,
│ │ │ -
67 __detail::_Prime_rehash_policy, _Tr>;
│ │ │ +
33#pragma GCC system_header
│ │ │ +
34
│ │ │ +
35#include <debug/debug.h>
│ │ │ +
36
│ │ │ +
37namespace std _GLIBCXX_VISIBILITY(default)
│ │ │ +
38{
│ │ │ +
39_GLIBCXX_BEGIN_NAMESPACE_VERSION
│ │ │ +
40
│ │ │ +
41 /**
│ │ │ +
42 * @addtogroup iterators
│ │ │ +
43 * @{
│ │ │ +
44 */
│ │ │ +
45
│ │ │ +
46// Ignore warnings about std::iterator.
│ │ │ +
47#pragma GCC diagnostic push
│ │ │ +
48#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
│ │ │ +
49
│ │ │ +
50 /// Provides input iterator semantics for streams.
│ │ │ +
51 template<typename _Tp, typename _CharT = char,
│ │ │ +
52 typename _Traits = char_traits<_CharT>, typename _Dist = ptrdiff_t>
│ │ │ +
│ │ │ + │ │ │ +
54 : public iterator<input_iterator_tag, _Tp, _Dist, const _Tp*, const _Tp&>
│ │ │ +
55 {
│ │ │ +
56 public:
│ │ │ +
57 typedef _CharT char_type;
│ │ │ +
58 typedef _Traits traits_type;
│ │ │ + │ │ │ +
60
│ │ │ +
61 private:
│ │ │ +
62 istream_type* _M_stream;
│ │ │ +
63 _Tp _M_value;
│ │ │ +
64 // This bool becomes false at end-of-stream. It should be sufficient to
│ │ │ +
65 // check _M_stream != nullptr instead, but historically we did not set
│ │ │ +
66 // _M_stream to null when reaching the end, so we need to keep this flag.
│ │ │ +
67 bool _M_ok;
│ │ │
68
│ │ │ -
69 template<class _Value, class _Hash, class _Pred, class _Alloc>
│ │ │ - │ │ │ -
71
│ │ │ -
72 /**
│ │ │ -
73 * @brief A standard container composed of unique keys (containing
│ │ │ -
74 * at most one of each key value) in which the elements' keys are
│ │ │ -
75 * the elements themselves.
│ │ │ -
76 *
│ │ │ -
77 * @ingroup unordered_associative_containers
│ │ │ -
78 * @headerfile unordered_set
│ │ │ -
79 * @since C++11
│ │ │ -
80 *
│ │ │ -
81 * @tparam _Value Type of key objects.
│ │ │ -
82 * @tparam _Hash Hashing function object type, defaults to hash<_Value>.
│ │ │ -
83
│ │ │ -
84 * @tparam _Pred Predicate function object type, defaults to
│ │ │ -
85 * equal_to<_Value>.
│ │ │ -
86 *
│ │ │ -
87 * @tparam _Alloc Allocator type, defaults to allocator<_Key>.
│ │ │ -
88 *
│ │ │ -
89 * Meets the requirements of a <a href="tables.html#65">container</a>, and
│ │ │ -
90 * <a href="tables.html#xx">unordered associative container</a>
│ │ │ -
91 *
│ │ │ -
92 * Base is _Hashtable, dispatched at compile time via template
│ │ │ -
93 * alias __uset_hashtable.
│ │ │ -
94 */
│ │ │ -
95 template<typename _Value,
│ │ │ -
96 typename _Hash = hash<_Value>,
│ │ │ -
97 typename _Pred = equal_to<_Value>,
│ │ │ -
98 typename _Alloc = allocator<_Value>>
│ │ │ -
│ │ │ - │ │ │ -
100 {
│ │ │ - │ │ │ -
102 _Hashtable _M_h;
│ │ │ -
103
│ │ │ -
104 public:
│ │ │ -
105 // typedefs:
│ │ │ -
106 ///@{
│ │ │ -
107 /// Public typedefs.
│ │ │ -
108 typedef typename _Hashtable::key_type key_type;
│ │ │ -
109 typedef typename _Hashtable::value_type value_type;
│ │ │ -
110 typedef typename _Hashtable::hasher hasher;
│ │ │ -
111 typedef typename _Hashtable::key_equal key_equal;
│ │ │ -
112 typedef typename _Hashtable::allocator_type allocator_type;
│ │ │ -
113 ///@}
│ │ │ -
114
│ │ │ -
115 ///@{
│ │ │ -
116 /// Iterator-related typedefs.
│ │ │ -
117 typedef typename _Hashtable::pointer pointer;
│ │ │ -
118 typedef typename _Hashtable::const_pointer const_pointer;
│ │ │ -
119 typedef typename _Hashtable::reference reference;
│ │ │ -
120 typedef typename _Hashtable::const_reference const_reference;
│ │ │ -
121 typedef typename _Hashtable::iterator iterator;
│ │ │ -
122 typedef typename _Hashtable::const_iterator const_iterator;
│ │ │ -
123 typedef typename _Hashtable::local_iterator local_iterator;
│ │ │ -
124 typedef typename _Hashtable::const_local_iterator const_local_iterator;
│ │ │ -
125 typedef typename _Hashtable::size_type size_type;
│ │ │ -
126 typedef typename _Hashtable::difference_type difference_type;
│ │ │ -
127 ///@}
│ │ │ -
128
│ │ │ -
129#if __cplusplus > 201402L
│ │ │ -
130 using node_type = typename _Hashtable::node_type;
│ │ │ -
131 using insert_return_type = typename _Hashtable::insert_return_type;
│ │ │ -
132#endif
│ │ │ -
133
│ │ │ -
134 // construct/destroy/copy
│ │ │ -
135
│ │ │ -
136 /// Default constructor.
│ │ │ -
137 unordered_set() = default;
│ │ │ -
138
│ │ │ -
139 /**
│ │ │ -
140 * @brief Default constructor creates no elements.
│ │ │ -
141 * @param __n Minimal initial number of buckets.
│ │ │ -
142 * @param __hf A hash functor.
│ │ │ -
143 * @param __eql A key equality functor.
│ │ │ -
144 * @param __a An allocator object.
│ │ │ -
145 */
│ │ │ -
146 explicit
│ │ │ -
│ │ │ - │ │ │ -
148 const hasher& __hf = hasher(),
│ │ │ -
149 const key_equal& __eql = key_equal(),
│ │ │ -
150 const allocator_type& __a = allocator_type())
│ │ │ -
151 : _M_h(__n, __hf, __eql, __a)
│ │ │ -
152 { }
│ │ │ -
│ │ │ +
69 public:
│ │ │ +
70 /// Construct end of input stream iterator.
│ │ │ +
│ │ │ + │ │ │ + │ │ │ +
73 : _M_stream(0), _M_value(), _M_ok(false) {}
│ │ │ +
│ │ │ +
74
│ │ │ +
75 /// Construct start of input stream iterator.
│ │ │ +
│ │ │ + │ │ │ +
77 : _M_stream(std::__addressof(__s)), _M_ok(true)
│ │ │ +
78 { _M_read(); }
│ │ │ +
│ │ │ +
79
│ │ │ + │ │ │ + │ │ │ + │ │ │ +
83 : _M_stream(__obj._M_stream), _M_value(__obj._M_value),
│ │ │ +
84 _M_ok(__obj._M_ok)
│ │ │ +
85 { }
│ │ │ +
86
│ │ │ +
87#if __cplusplus > 201703L && __cpp_lib_concepts
│ │ │ +
88 constexpr
│ │ │ +
89 istream_iterator(default_sentinel_t)
│ │ │ +
90 noexcept(is_nothrow_default_constructible_v<_Tp>)
│ │ │ +
91 : istream_iterator() { }
│ │ │ +
92#endif
│ │ │ +
93
│ │ │ +
94#if __cplusplus >= 201103L
│ │ │ +
95 istream_iterator& operator=(const istream_iterator&) = default;
│ │ │ +
96 ~istream_iterator() = default;
│ │ │ +
97#endif
│ │ │ +
98
│ │ │ +
99 _GLIBCXX_NODISCARD
│ │ │ +
100 const _Tp&
│ │ │ +
101 operator*() const _GLIBCXX_NOEXCEPT
│ │ │ +
102 {
│ │ │ +
103 __glibcxx_requires_cond(_M_ok,
│ │ │ +
104 _M_message(__gnu_debug::__msg_deref_istream)
│ │ │ +
105 ._M_iterator(*this));
│ │ │ +
106 return _M_value;
│ │ │ +
107 }
│ │ │ +
108
│ │ │ +
109 _GLIBCXX_NODISCARD
│ │ │ +
110 const _Tp*
│ │ │ +
111 operator->() const _GLIBCXX_NOEXCEPT
│ │ │ +
112 { return std::__addressof((operator*())); }
│ │ │ +
113
│ │ │ + │ │ │ +
115 operator++()
│ │ │ +
116 {
│ │ │ +
117 __glibcxx_requires_cond(_M_ok,
│ │ │ +
118 _M_message(__gnu_debug::__msg_inc_istream)
│ │ │ +
119 ._M_iterator(*this));
│ │ │ +
120 _M_read();
│ │ │ +
121 return *this;
│ │ │ +
122 }
│ │ │ +
123
│ │ │ + │ │ │ +
125 operator++(int)
│ │ │ +
126 {
│ │ │ +
127 __glibcxx_requires_cond(_M_ok,
│ │ │ +
128 _M_message(__gnu_debug::__msg_inc_istream)
│ │ │ +
129 ._M_iterator(*this));
│ │ │ +
130 istream_iterator __tmp = *this;
│ │ │ +
131 _M_read();
│ │ │ +
132 return __tmp;
│ │ │ +
133 }
│ │ │ +
134
│ │ │ +
135 private:
│ │ │ +
136 bool
│ │ │ +
137 _M_equal(const istream_iterator& __x) const _GLIBCXX_NOEXCEPT
│ │ │ +
138 {
│ │ │ +
139 // Ideally this would just return _M_stream == __x._M_stream,
│ │ │ +
140 // but code compiled with old versions never sets _M_stream to null.
│ │ │ +
141 return (_M_ok == __x._M_ok) && (!_M_ok || _M_stream == __x._M_stream);
│ │ │ +
142 }
│ │ │ +
143
│ │ │ +
144 void
│ │ │ +
145 _M_read()
│ │ │ +
146 {
│ │ │ +
147 if (_M_stream && !(*_M_stream >> _M_value))
│ │ │ +
148 {
│ │ │ +
149 _M_stream = 0;
│ │ │ +
150 _M_ok = false;
│ │ │ +
151 }
│ │ │ +
152 }
│ │ │
153
│ │ │ -
154 /**
│ │ │ -
155 * @brief Builds an %unordered_set from a range.
│ │ │ -
156 * @param __first An input iterator.
│ │ │ -
157 * @param __last An input iterator.
│ │ │ -
158 * @param __n Minimal initial number of buckets.
│ │ │ -
159 * @param __hf A hash functor.
│ │ │ -
160 * @param __eql A key equality functor.
│ │ │ -
161 * @param __a An allocator object.
│ │ │ -
162 *
│ │ │ -
163 * Create an %unordered_set consisting of copies of the elements from
│ │ │ -
164 * [__first,__last). This is linear in N (where N is
│ │ │ -
165 * distance(__first,__last)).
│ │ │ -
166 */
│ │ │ -
167 template<typename _InputIterator>
│ │ │ -
│ │ │ - │ │ │ -
169 size_type __n = 0,
│ │ │ -
170 const hasher& __hf = hasher(),
│ │ │ -
171 const key_equal& __eql = key_equal(),
│ │ │ -
172 const allocator_type& __a = allocator_type())
│ │ │ -
173 : _M_h(__first, __last, __n, __hf, __eql, __a)
│ │ │ -
174 { }
│ │ │ -
│ │ │ -
175
│ │ │ -
176 /// Copy constructor.
│ │ │ -
177 unordered_set(const unordered_set&) = default;
│ │ │ -
178
│ │ │ -
179 /// Move constructor.
│ │ │ - │ │ │ -
181
│ │ │ -
182 /**
│ │ │ -
183 * @brief Creates an %unordered_set with no elements.
│ │ │ -
184 * @param __a An allocator object.
│ │ │ -
185 */
│ │ │ -
186 explicit
│ │ │ -
│ │ │ - │ │ │ -
188 : _M_h(__a)
│ │ │ -
189 { }
│ │ │ -
│ │ │ -
190
│ │ │ -
191 /*
│ │ │ -
192 * @brief Copy constructor with allocator argument.
│ │ │ -
193 * @param __uset Input %unordered_set to copy.
│ │ │ -
194 * @param __a An allocator object.
│ │ │ -
195 */
│ │ │ - │ │ │ -
197 const allocator_type& __a)
│ │ │ -
198 : _M_h(__uset._M_h, __a)
│ │ │ -
199 { }
│ │ │ -
200
│ │ │ -
201 /*
│ │ │ -
202 * @brief Move constructor with allocator argument.
│ │ │ -
203 * @param __uset Input %unordered_set to move.
│ │ │ -
204 * @param __a An allocator object.
│ │ │ -
205 */
│ │ │ - │ │ │ -
207 const allocator_type& __a)
│ │ │ -
208 noexcept( noexcept(_Hashtable(std::move(__uset._M_h), __a)) )
│ │ │ -
209 : _M_h(std::move(__uset._M_h), __a)
│ │ │ -
210 { }
│ │ │ -
211
│ │ │ -
212 /**
│ │ │ -
213 * @brief Builds an %unordered_set from an initializer_list.
│ │ │ -
214 * @param __l An initializer_list.
│ │ │ -
215 * @param __n Minimal initial number of buckets.
│ │ │ -
216 * @param __hf A hash functor.
│ │ │ -
217 * @param __eql A key equality functor.
│ │ │ -
218 * @param __a An allocator object.
│ │ │ -
219 *
│ │ │ -
220 * Create an %unordered_set consisting of copies of the elements in the
│ │ │ -
221 * list. This is linear in N (where N is @a __l.size()).
│ │ │ -
222 */
│ │ │ -
│ │ │ - │ │ │ -
224 size_type __n = 0,
│ │ │ -
225 const hasher& __hf = hasher(),
│ │ │ -
226 const key_equal& __eql = key_equal(),
│ │ │ -
227 const allocator_type& __a = allocator_type())
│ │ │ -
228 : _M_h(__l, __n, __hf, __eql, __a)
│ │ │ -
229 { }
│ │ │ -
│ │ │ -
230
│ │ │ -
231 unordered_set(size_type __n, const allocator_type& __a)
│ │ │ -
232 : unordered_set(__n, hasher(), key_equal(), __a)
│ │ │ -
233 { }
│ │ │ -
234
│ │ │ -
235 unordered_set(size_type __n, const hasher& __hf,
│ │ │ -
236 const allocator_type& __a)
│ │ │ -
237 : unordered_set(__n, __hf, key_equal(), __a)
│ │ │ -
238 { }
│ │ │ -
239
│ │ │ -
240 template<typename _InputIterator>
│ │ │ -
241 unordered_set(_InputIterator __first, _InputIterator __last,
│ │ │ -
242 size_type __n,
│ │ │ -
243 const allocator_type& __a)
│ │ │ -
244 : unordered_set(__first, __last, __n, hasher(), key_equal(), __a)
│ │ │ -
245 { }
│ │ │ -
246
│ │ │ -
247 template<typename _InputIterator>
│ │ │ -
248 unordered_set(_InputIterator __first, _InputIterator __last,
│ │ │ -
249 size_type __n, const hasher& __hf,
│ │ │ -
250 const allocator_type& __a)
│ │ │ -
251 : unordered_set(__first, __last, __n, __hf, key_equal(), __a)
│ │ │ -
252 { }
│ │ │ -
253
│ │ │ -
254 unordered_set(initializer_list<value_type> __l,
│ │ │ -
255 size_type __n,
│ │ │ -
256 const allocator_type& __a)
│ │ │ -
257 : unordered_set(__l, __n, hasher(), key_equal(), __a)
│ │ │ -
258 { }
│ │ │ +
154 /// Return true if the iterators refer to the same stream,
│ │ │ +
155 /// or are both at end-of-stream.
│ │ │ +
156 _GLIBCXX_NODISCARD
│ │ │ +
157 friend bool
│ │ │ +
│ │ │ + │ │ │ + │ │ │ +
160 { return __x._M_equal(__y); }
│ │ │ +
│ │ │ +
161
│ │ │ +
162#if __cpp_impl_three_way_comparison < 201907L
│ │ │ +
163 /// Return true if the iterators refer to different streams,
│ │ │ +
164 /// or if one is at end-of-stream and the other is not.
│ │ │ +
165 _GLIBCXX_NODISCARD
│ │ │ +
166 friend bool
│ │ │ +
167 operator!=(const istream_iterator& __x, const istream_iterator& __y)
│ │ │ + │ │ │ +
169 { return !__x._M_equal(__y); }
│ │ │ +
170#endif
│ │ │ +
171
│ │ │ +
172#if __cplusplus > 201703L && __cpp_lib_concepts
│ │ │ +
173 [[nodiscard]]
│ │ │ +
174 friend bool
│ │ │ +
175 operator==(const istream_iterator& __i, default_sentinel_t) noexcept
│ │ │ +
176 { return !__i._M_stream; }
│ │ │ +
177#endif
│ │ │ +
178 };
│ │ │ +
│ │ │ +
179
│ │ │ +
180 /**
│ │ │ +
181 * @brief Provides output iterator semantics for streams.
│ │ │ +
182 *
│ │ │ +
183 * This class provides an iterator to write to an ostream. The type Tp is
│ │ │ +
184 * the only type written by this iterator and there must be an
│ │ │ +
185 * operator<<(Tp) defined.
│ │ │ +
186 *
│ │ │ +
187 * @tparam _Tp The type to write to the ostream.
│ │ │ +
188 * @tparam _CharT The ostream char_type.
│ │ │ +
189 * @tparam _Traits The ostream char_traits.
│ │ │ +
190 */
│ │ │ +
191 template<typename _Tp, typename _CharT = char,
│ │ │ +
192 typename _Traits = char_traits<_CharT> >
│ │ │ +
│ │ │ + │ │ │ +
194 : public iterator<output_iterator_tag, void, void, void, void>
│ │ │ +
195 {
│ │ │ +
196 public:
│ │ │ +
197 ///@{
│ │ │ +
198 /// Public typedef
│ │ │ +
199#if __cplusplus > 201703L
│ │ │ +
200 using difference_type = ptrdiff_t;
│ │ │ +
201#endif
│ │ │ +
202 typedef _CharT char_type;
│ │ │ +
203 typedef _Traits traits_type;
│ │ │ + │ │ │ +
205 ///@}
│ │ │ +
206
│ │ │ +
207 private:
│ │ │ +
208 ostream_type* _M_stream;
│ │ │ +
209 const _CharT* _M_string;
│ │ │ +
210
│ │ │ +
211 public:
│ │ │ +
212 /// Construct from an ostream.
│ │ │ +
│ │ │ + │ │ │ +
214 : _M_stream(std::__addressof(__s)), _M_string(0) {}
│ │ │ +
│ │ │ +
215
│ │ │ +
216 /**
│ │ │ +
217 * Construct from an ostream.
│ │ │ +
218 *
│ │ │ +
219 * The delimiter string @a c is written to the stream after every Tp
│ │ │ +
220 * written to the stream. The delimiter is not copied, and thus must
│ │ │ +
221 * not be destroyed while this iterator is in use.
│ │ │ +
222 *
│ │ │ +
223 * @param __s Underlying ostream to write to.
│ │ │ +
224 * @param __c CharT delimiter string to insert.
│ │ │ +
225 */
│ │ │ +
│ │ │ + │ │ │ +
227 : _M_stream(std::__addressof(__s)), _M_string(__c) { }
│ │ │ +
│ │ │ +
228
│ │ │ +
229 /// Copy constructor.
│ │ │ +
│ │ │ + │ │ │ +
231 : _M_stream(__obj._M_stream), _M_string(__obj._M_string) { }
│ │ │ +
│ │ │ +
232
│ │ │ +
233#if __cplusplus >= 201103L
│ │ │ +
234 ostream_iterator& operator=(const ostream_iterator&) = default;
│ │ │ +
235#endif
│ │ │ +
236
│ │ │ +
237 /// Writes @a value to underlying ostream using operator<<. If
│ │ │ +
238 /// constructed with delimiter string, writes delimiter to ostream.
│ │ │ + │ │ │ +
│ │ │ +
240 operator=(const _Tp& __value)
│ │ │ +
241 {
│ │ │ +
242 __glibcxx_requires_cond(_M_stream != 0,
│ │ │ +
243 _M_message(__gnu_debug::__msg_output_ostream)
│ │ │ +
244 ._M_iterator(*this));
│ │ │ +
245 *_M_stream << __value;
│ │ │ +
246 if (_M_string)
│ │ │ +
247 *_M_stream << _M_string;
│ │ │ +
248 return *this;
│ │ │ +
249 }
│ │ │ +
│ │ │ +
250
│ │ │ +
251 _GLIBCXX_NODISCARD
│ │ │ + │ │ │ +
253 operator*() _GLIBCXX_NOEXCEPT
│ │ │ +
254 { return *this; }
│ │ │ +
255
│ │ │ +
256 ostream_iterator&
│ │ │ +
257 operator++() _GLIBCXX_NOEXCEPT
│ │ │ +
258 { return *this; }
│ │ │
259
│ │ │ -
260 unordered_set(initializer_list<value_type> __l,
│ │ │ -
261 size_type __n, const hasher& __hf,
│ │ │ -
262 const allocator_type& __a)
│ │ │ -
263 : unordered_set(__l, __n, __hf, key_equal(), __a)
│ │ │ -
264 { }
│ │ │ -
265
│ │ │ -
266 /// Copy assignment operator.
│ │ │ - │ │ │ -
268 operator=(const unordered_set&) = default;
│ │ │ -
269
│ │ │ -
270 /// Move assignment operator.
│ │ │ - │ │ │ - │ │ │ -
273
│ │ │ -
274 /**
│ │ │ -
275 * @brief %Unordered_set list assignment operator.
│ │ │ -
276 * @param __l An initializer_list.
│ │ │ -
277 *
│ │ │ -
278 * This function fills an %unordered_set with copies of the elements in
│ │ │ -
279 * the initializer list @a __l.
│ │ │ -
280 *
│ │ │ -
281 * Note that the assignment completely changes the %unordered_set and
│ │ │ -
282 * that the resulting %unordered_set's size is the same as the number
│ │ │ -
283 * of elements assigned.
│ │ │ -
284 */
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
287 {
│ │ │ -
288 _M_h = __l;
│ │ │ -
289 return *this;
│ │ │ -
290 }
│ │ │ -
│ │ │ -
291
│ │ │ -
292 /// Returns the allocator object used by the %unordered_set.
│ │ │ - │ │ │ -
│ │ │ -
294 get_allocator() const noexcept
│ │ │ -
295 { return _M_h.get_allocator(); }
│ │ │ -
│ │ │ -
296
│ │ │ -
297 // size and capacity:
│ │ │ -
298
│ │ │ -
299 /// Returns true if the %unordered_set is empty.
│ │ │ -
300 _GLIBCXX_NODISCARD bool
│ │ │ -
│ │ │ -
301 empty() const noexcept
│ │ │ -
302 { return _M_h.empty(); }
│ │ │ -
│ │ │ -
303
│ │ │ -
304 /// Returns the size of the %unordered_set.
│ │ │ - │ │ │ -
│ │ │ -
306 size() const noexcept
│ │ │ -
307 { return _M_h.size(); }
│ │ │ -
│ │ │ -
308
│ │ │ -
309 /// Returns the maximum size of the %unordered_set.
│ │ │ - │ │ │ -
│ │ │ -
311 max_size() const noexcept
│ │ │ -
312 { return _M_h.max_size(); }
│ │ │ -
│ │ │ -
313
│ │ │ -
314 // iterators.
│ │ │ -
315
│ │ │ -
316 ///@{
│ │ │ -
317 /**
│ │ │ -
318 * Returns a read-only (constant) iterator that points to the first
│ │ │ -
319 * element in the %unordered_set.
│ │ │ -
320 */
│ │ │ - │ │ │ -
│ │ │ -
322 begin() noexcept
│ │ │ -
323 { return _M_h.begin(); }
│ │ │ -
│ │ │ -
324
│ │ │ - │ │ │ -
│ │ │ -
326 begin() const noexcept
│ │ │ -
327 { return _M_h.begin(); }
│ │ │ -
│ │ │ -
328 ///@}
│ │ │ -
329
│ │ │ -
330 ///@{
│ │ │ -
331 /**
│ │ │ -
332 * Returns a read-only (constant) iterator that points one past the last
│ │ │ -
333 * element in the %unordered_set.
│ │ │ -
334 */
│ │ │ - │ │ │ -
│ │ │ -
336 end() noexcept
│ │ │ -
337 { return _M_h.end(); }
│ │ │ -
│ │ │ -
338
│ │ │ - │ │ │ -
│ │ │ -
340 end() const noexcept
│ │ │ -
341 { return _M_h.end(); }
│ │ │ -
│ │ │ -
342 ///@}
│ │ │ -
343
│ │ │ -
344 /**
│ │ │ -
345 * Returns a read-only (constant) iterator that points to the first
│ │ │ -
346 * element in the %unordered_set.
│ │ │ -
347 */
│ │ │ - │ │ │ -
│ │ │ -
349 cbegin() const noexcept
│ │ │ -
350 { return _M_h.begin(); }
│ │ │ -
│ │ │ -
351
│ │ │ -
352 /**
│ │ │ -
353 * Returns a read-only (constant) iterator that points one past the last
│ │ │ -
354 * element in the %unordered_set.
│ │ │ -
355 */
│ │ │ - │ │ │ -
│ │ │ -
357 cend() const noexcept
│ │ │ -
358 { return _M_h.end(); }
│ │ │ -
│ │ │ -
359
│ │ │ -
360 // modifiers.
│ │ │ -
361
│ │ │ -
362 /**
│ │ │ -
363 * @brief Attempts to build and insert an element into the
│ │ │ -
364 * %unordered_set.
│ │ │ -
365 * @param __args Arguments used to generate an element.
│ │ │ -
366 * @return A pair, of which the first element is an iterator that points
│ │ │ -
367 * to the possibly inserted element, and the second is a bool
│ │ │ -
368 * that is true if the element was actually inserted.
│ │ │ -
369 *
│ │ │ -
370 * This function attempts to build and insert an element into the
│ │ │ -
371 * %unordered_set. An %unordered_set relies on unique keys and thus an
│ │ │ -
372 * element is only inserted if it is not already present in the
│ │ │ -
373 * %unordered_set.
│ │ │ -
374 *
│ │ │ -
375 * Insertion requires amortized constant time.
│ │ │ -
376 */
│ │ │ -
377 template<typename... _Args>
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
380 { return _M_h.emplace(std::forward<_Args>(__args)...); }
│ │ │ -
│ │ │ -
381
│ │ │ -
382 /**
│ │ │ -
383 * @brief Attempts to insert an element into the %unordered_set.
│ │ │ -
384 * @param __pos An iterator that serves as a hint as to where the
│ │ │ -
385 * element should be inserted.
│ │ │ -
386 * @param __args Arguments used to generate the element to be
│ │ │ -
387 * inserted.
│ │ │ -
388 * @return An iterator that points to the element with key equivalent to
│ │ │ -
389 * the one generated from @a __args (may or may not be the
│ │ │ -
390 * element itself).
│ │ │ -
391 *
│ │ │ -
392 * This function is not concerned about whether the insertion took place,
│ │ │ -
393 * and thus does not return a boolean like the single-argument emplace()
│ │ │ -
394 * does. Note that the first parameter is only a hint and can
│ │ │ -
395 * potentially improve the performance of the insertion process. A bad
│ │ │ -
396 * hint would cause no gains in efficiency.
│ │ │ -
397 *
│ │ │ -
398 * For more on @a hinting, see:
│ │ │ -
399 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/associative.html#containers.associative.insert_hints
│ │ │ -
400 *
│ │ │ -
401 * Insertion requires amortized constant time.
│ │ │ -
402 */
│ │ │ -
403 template<typename... _Args>
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
406 { return _M_h.emplace_hint(__pos, std::forward<_Args>(__args)...); }
│ │ │ -
│ │ │ -
407
│ │ │ -
408 ///@{
│ │ │ -
409 /**
│ │ │ -
410 * @brief Attempts to insert an element into the %unordered_set.
│ │ │ -
411 * @param __x Element to be inserted.
│ │ │ -
412 * @return A pair, of which the first element is an iterator that points
│ │ │ -
413 * to the possibly inserted element, and the second is a bool
│ │ │ -
414 * that is true if the element was actually inserted.
│ │ │ -
415 *
│ │ │ -
416 * This function attempts to insert an element into the %unordered_set.
│ │ │ -
417 * An %unordered_set relies on unique keys and thus an element is only
│ │ │ -
418 * inserted if it is not already present in the %unordered_set.
│ │ │ -
419 *
│ │ │ -
420 * Insertion requires amortized constant time.
│ │ │ -
421 */
│ │ │ - │ │ │ -
│ │ │ -
423 insert(const value_type& __x)
│ │ │ -
424 { return _M_h.insert(__x); }
│ │ │ -
│ │ │ -
425
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
428 { return _M_h.insert(std::move(__x)); }
│ │ │ -
│ │ │ -
429 ///@}
│ │ │ -
430
│ │ │ -
431 ///@{
│ │ │ -
432 /**
│ │ │ -
433 * @brief Attempts to insert an element into the %unordered_set.
│ │ │ -
434 * @param __hint An iterator that serves as a hint as to where the
│ │ │ -
435 * element should be inserted.
│ │ │ -
436 * @param __x Element to be inserted.
│ │ │ -
437 * @return An iterator that points to the element with key of
│ │ │ -
438 * @a __x (may or may not be the element passed in).
│ │ │ -
439 *
│ │ │ -
440 * This function is not concerned about whether the insertion took place,
│ │ │ -
441 * and thus does not return a boolean like the single-argument insert()
│ │ │ -
442 * does. Note that the first parameter is only a hint and can
│ │ │ -
443 * potentially improve the performance of the insertion process. A bad
│ │ │ -
444 * hint would cause no gains in efficiency.
│ │ │ -
445 *
│ │ │ -
446 * For more on @a hinting, see:
│ │ │ -
447 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/associative.html#containers.associative.insert_hints
│ │ │ -
448 *
│ │ │ -
449 * Insertion requires amortized constant.
│ │ │ -
450 */
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
453 { return _M_h.insert(__hint, __x); }
│ │ │ -
│ │ │ -
454
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
457 { return _M_h.insert(__hint, std::move(__x)); }
│ │ │ -
│ │ │ -
458 ///@}
│ │ │ -
459
│ │ │ -
460 /**
│ │ │ -
461 * @brief A template function that attempts to insert a range of
│ │ │ -
462 * elements.
│ │ │ -
463 * @param __first Iterator pointing to the start of the range to be
│ │ │ -
464 * inserted.
│ │ │ -
465 * @param __last Iterator pointing to the end of the range.
│ │ │ -
466 *
│ │ │ -
467 * Complexity similar to that of the range constructor.
│ │ │ -
468 */
│ │ │ -
469 template<typename _InputIterator>
│ │ │ -
470 void
│ │ │ -
│ │ │ - │ │ │ -
472 { _M_h.insert(__first, __last); }
│ │ │ -
│ │ │ -
473
│ │ │ -
474 /**
│ │ │ -
475 * @brief Attempts to insert a list of elements into the %unordered_set.
│ │ │ -
476 * @param __l A std::initializer_list<value_type> of elements
│ │ │ -
477 * to be inserted.
│ │ │ -
478 *
│ │ │ -
479 * Complexity similar to that of the range constructor.
│ │ │ -
480 */
│ │ │ -
481 void
│ │ │ -
│ │ │ - │ │ │ -
483 { _M_h.insert(__l); }
│ │ │ -
│ │ │ -
484
│ │ │ -
485#if __cplusplus > 201402L
│ │ │ -
486 /// Extract a node.
│ │ │ -
487 node_type
│ │ │ -
│ │ │ - │ │ │ -
489 {
│ │ │ -
490 __glibcxx_assert(__pos != end());
│ │ │ -
491 return _M_h.extract(__pos);
│ │ │ -
492 }
│ │ │ -
│ │ │ -
493
│ │ │ -
494 /// Extract a node.
│ │ │ -
495 node_type
│ │ │ -
│ │ │ - │ │ │ -
497 { return _M_h.extract(__key); }
│ │ │ -
│ │ │ -
498
│ │ │ -
499 /// Re-insert an extracted node.
│ │ │ -
500 insert_return_type
│ │ │ -
│ │ │ -
501 insert(node_type&& __nh)
│ │ │ -
502 { return _M_h._M_reinsert_node(std::move(__nh)); }
│ │ │ -
│ │ │ -
503
│ │ │ -
504 /// Re-insert an extracted node.
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
507 { return _M_h._M_reinsert_node(std::move(__nh)).position; }
│ │ │ -
│ │ │ -
508#endif // C++17
│ │ │ -
509
│ │ │ -
510 ///@{
│ │ │ -
511 /**
│ │ │ -
512 * @brief Erases an element from an %unordered_set.
│ │ │ -
513 * @param __position An iterator pointing to the element to be erased.
│ │ │ -
514 * @return An iterator pointing to the element immediately following
│ │ │ -
515 * @a __position prior to the element being erased. If no such
│ │ │ -
516 * element exists, end() is returned.
│ │ │ -
517 *
│ │ │ -
518 * This function erases an element, pointed to by the given iterator,
│ │ │ -
519 * from an %unordered_set. Note that this function only erases the
│ │ │ -
520 * element, and that if the element is itself a pointer, the pointed-to
│ │ │ -
521 * memory is not touched in any way. Managing the pointer is the user's
│ │ │ -
522 * responsibility.
│ │ │ -
523 */
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
526 { return _M_h.erase(__position); }
│ │ │ -
│ │ │ -
527
│ │ │ -
528 // LWG 2059.
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
531 { return _M_h.erase(__position); }
│ │ │ -
│ │ │ -
532 ///@}
│ │ │ -
533
│ │ │ -
534 /**
│ │ │ -
535 * @brief Erases elements according to the provided key.
│ │ │ -
536 * @param __x Key of element to be erased.
│ │ │ -
537 * @return The number of elements erased.
│ │ │ -
538 *
│ │ │ -
539 * This function erases all the elements located by the given key from
│ │ │ -
540 * an %unordered_set. For an %unordered_set the result of this function
│ │ │ -
541 * can only be 0 (not present) or 1 (present).
│ │ │ -
542 * Note that this function only erases the element, and that if
│ │ │ -
543 * the element is itself a pointer, the pointed-to memory is not touched
│ │ │ -
544 * in any way. Managing the pointer is the user's responsibility.
│ │ │ -
545 */
│ │ │ - │ │ │ -
│ │ │ -
547 erase(const key_type& __x)
│ │ │ -
548 { return _M_h.erase(__x); }
│ │ │ -
│ │ │ -
549
│ │ │ -
550 /**
│ │ │ -
551 * @brief Erases a [__first,__last) range of elements from an
│ │ │ -
552 * %unordered_set.
│ │ │ -
553 * @param __first Iterator pointing to the start of the range to be
│ │ │ -
554 * erased.
│ │ │ -
555 * @param __last Iterator pointing to the end of the range to
│ │ │ -
556 * be erased.
│ │ │ -
557 * @return The iterator @a __last.
│ │ │ -
558 *
│ │ │ -
559 * This function erases a sequence of elements from an %unordered_set.
│ │ │ -
560 * Note that this function only erases the element, and that if
│ │ │ -
561 * the element is itself a pointer, the pointed-to memory is not touched
│ │ │ -
562 * in any way. Managing the pointer is the user's responsibility.
│ │ │ -
563 */
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
566 { return _M_h.erase(__first, __last); }
│ │ │ -
│ │ │ -
567
│ │ │ -
568 /**
│ │ │ -
569 * Erases all elements in an %unordered_set. Note that this function only
│ │ │ -
570 * erases the elements, and that if the elements themselves are pointers,
│ │ │ -
571 * the pointed-to memory is not touched in any way. Managing the pointer
│ │ │ -
572 * is the user's responsibility.
│ │ │ -
573 */
│ │ │ -
574 void
│ │ │ -
│ │ │ -
575 clear() noexcept
│ │ │ -
576 { _M_h.clear(); }
│ │ │ -
│ │ │ -
577
│ │ │ -
578 /**
│ │ │ -
579 * @brief Swaps data with another %unordered_set.
│ │ │ -
580 * @param __x An %unordered_set of the same element and allocator
│ │ │ -
581 * types.
│ │ │ -
582 *
│ │ │ -
583 * This exchanges the elements between two sets in constant time.
│ │ │ -
584 * Note that the global std::swap() function is specialized such that
│ │ │ -
585 * std::swap(s1,s2) will feed to this function.
│ │ │ -
586 */
│ │ │ -
587 void
│ │ │ -
│ │ │ - │ │ │ -
589 noexcept( noexcept(_M_h.swap(__x._M_h)) )
│ │ │ -
590 { _M_h.swap(__x._M_h); }
│ │ │ -
│ │ │ -
591
│ │ │ -
592#if __cplusplus > 201402L
│ │ │ -
593 template<typename, typename, typename>
│ │ │ -
594 friend class std::_Hash_merge_helper;
│ │ │ -
595
│ │ │ -
596 template<typename _H2, typename _P2>
│ │ │ -
597 void
│ │ │ - │ │ │ -
599 {
│ │ │ - │ │ │ -
601 _M_h._M_merge_unique(_Merge_helper::_S_get_table(__source));
│ │ │ -
602 }
│ │ │ -
603
│ │ │ -
604 template<typename _H2, typename _P2>
│ │ │ -
605 void
│ │ │ -
606 merge(unordered_set<_Value, _H2, _P2, _Alloc>&& __source)
│ │ │ -
607 { merge(__source); }
│ │ │ -
608
│ │ │ -
609 template<typename _H2, typename _P2>
│ │ │ -
610 void
│ │ │ -
611 merge(unordered_multiset<_Value, _H2, _P2, _Alloc>& __source)
│ │ │ -
612 {
│ │ │ -
613 using _Merge_helper = _Hash_merge_helper<unordered_set, _H2, _P2>;
│ │ │ -
614 _M_h._M_merge_unique(_Merge_helper::_S_get_table(__source));
│ │ │ -
615 }
│ │ │ -
616
│ │ │ -
617 template<typename _H2, typename _P2>
│ │ │ -
618 void
│ │ │ -
619 merge(unordered_multiset<_Value, _H2, _P2, _Alloc>&& __source)
│ │ │ -
620 { merge(__source); }
│ │ │ -
621#endif // C++17
│ │ │ -
622
│ │ │ -
623 // observers.
│ │ │ -
624
│ │ │ -
625 /// Returns the hash functor object with which the %unordered_set was
│ │ │ -
626 /// constructed.
│ │ │ -
627 hasher
│ │ │ -
│ │ │ - │ │ │ -
629 { return _M_h.hash_function(); }
│ │ │ -
│ │ │ -
630
│ │ │ -
631 /// Returns the key comparison object with which the %unordered_set was
│ │ │ -
632 /// constructed.
│ │ │ - │ │ │ -
│ │ │ -
634 key_eq() const
│ │ │ -
635 { return _M_h.key_eq(); }
│ │ │ -
│ │ │ -
636
│ │ │ -
637 // lookup.
│ │ │ -
638
│ │ │ -
639 ///@{
│ │ │ -
640 /**
│ │ │ -
641 * @brief Tries to locate an element in an %unordered_set.
│ │ │ -
642 * @param __x Element to be located.
│ │ │ -
643 * @return Iterator pointing to sought-after element, or end() if not
│ │ │ -
644 * found.
│ │ │ -
645 *
│ │ │ -
646 * This function takes a key and tries to locate the element with which
│ │ │ -
647 * the key matches. If successful the function returns an iterator
│ │ │ -
648 * pointing to the sought after element. If unsuccessful it returns the
│ │ │ -
649 * past-the-end ( @c end() ) iterator.
│ │ │ -
650 */
│ │ │ - │ │ │ -
│ │ │ -
652 find(const key_type& __x)
│ │ │ -
653 { return _M_h.find(__x); }
│ │ │ -
│ │ │ -
654
│ │ │ -
655#if __cplusplus > 201703L
│ │ │ -
656 template<typename _Kt>
│ │ │ -
657 auto
│ │ │ -
│ │ │ -
658 find(const _Kt& __k)
│ │ │ -
659 -> decltype(_M_h._M_find_tr(__k))
│ │ │ -
660 { return _M_h._M_find_tr(__k); }
│ │ │ -
│ │ │ -
661#endif
│ │ │ -
662
│ │ │ - │ │ │ -
│ │ │ -
664 find(const key_type& __x) const
│ │ │ -
665 { return _M_h.find(__x); }
│ │ │ -
│ │ │ -
666
│ │ │ -
667#if __cplusplus > 201703L
│ │ │ -
668 template<typename _Kt>
│ │ │ -
669 auto
│ │ │ -
│ │ │ -
670 find(const _Kt& __k) const
│ │ │ -
671 -> decltype(_M_h._M_find_tr(__k))
│ │ │ -
672 { return _M_h._M_find_tr(__k); }
│ │ │ -
│ │ │ -
673#endif
│ │ │ -
674 ///@}
│ │ │ -
675
│ │ │ -
676 ///@{
│ │ │ -
677 /**
│ │ │ -
678 * @brief Finds the number of elements.
│ │ │ -
679 * @param __x Element to located.
│ │ │ -
680 * @return Number of elements with specified key.
│ │ │ -
681 *
│ │ │ -
682 * This function only makes sense for unordered_multisets; for
│ │ │ -
683 * unordered_set the result will either be 0 (not present) or 1
│ │ │ -
684 * (present).
│ │ │ -
685 */
│ │ │ - │ │ │ -
│ │ │ -
687 count(const key_type& __x) const
│ │ │ -
688 { return _M_h.count(__x); }
│ │ │ -
│ │ │ -
689
│ │ │ -
690#if __cplusplus > 201703L
│ │ │ -
691 template<typename _Kt>
│ │ │ -
692 auto
│ │ │ -
│ │ │ -
693 count(const _Kt& __k) const
│ │ │ -
694 -> decltype(_M_h._M_count_tr(__k))
│ │ │ -
695 { return _M_h._M_count_tr(__k); }
│ │ │ -
│ │ │ -
696#endif
│ │ │ -
697 ///@}
│ │ │ -
698
│ │ │ -
699#if __cplusplus > 201703L
│ │ │ -
700 ///@{
│ │ │ -
701 /**
│ │ │ -
702 * @brief Finds whether an element with the given key exists.
│ │ │ -
703 * @param __x Key of elements to be located.
│ │ │ -
704 * @return True if there is any element with the specified key.
│ │ │ -
705 */
│ │ │ -
706 bool
│ │ │ -
│ │ │ -
707 contains(const key_type& __x) const
│ │ │ -
708 { return _M_h.find(__x) != _M_h.end(); }
│ │ │ -
│ │ │ -
709
│ │ │ -
710 template<typename _Kt>
│ │ │ -
711 auto
│ │ │ -
│ │ │ -
712 contains(const _Kt& __k) const
│ │ │ -
713 -> decltype(_M_h._M_find_tr(__k), void(), true)
│ │ │ -
714 { return _M_h._M_find_tr(__k) != _M_h.end(); }
│ │ │ -
│ │ │ -
715 ///@}
│ │ │ -
716#endif
│ │ │ -
717
│ │ │ -
718 ///@{
│ │ │ -
719 /**
│ │ │ -
720 * @brief Finds a subsequence matching given key.
│ │ │ -
721 * @param __x Key to be located.
│ │ │ -
722 * @return Pair of iterators that possibly points to the subsequence
│ │ │ -
723 * matching given key.
│ │ │ -
724 *
│ │ │ -
725 * This function probably only makes sense for multisets.
│ │ │ -
726 */
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
729 { return _M_h.equal_range(__x); }
│ │ │ -
│ │ │ -
730
│ │ │ -
731#if __cplusplus > 201703L
│ │ │ -
732 template<typename _Kt>
│ │ │ -
733 auto
│ │ │ -
│ │ │ - │ │ │ -
735 -> decltype(_M_h._M_equal_range_tr(__k))
│ │ │ -
736 { return _M_h._M_equal_range_tr(__k); }
│ │ │ -
│ │ │ -
737#endif
│ │ │ -
738
│ │ │ - │ │ │ -
│ │ │ -
740 equal_range(const key_type& __x) const
│ │ │ -
741 { return _M_h.equal_range(__x); }
│ │ │ -
│ │ │ -
742
│ │ │ -
743#if __cplusplus > 201703L
│ │ │ -
744 template<typename _Kt>
│ │ │ -
745 auto
│ │ │ -
│ │ │ -
746 equal_range(const _Kt& __k) const
│ │ │ -
747 -> decltype(_M_h._M_equal_range_tr(__k))
│ │ │ -
748 { return _M_h._M_equal_range_tr(__k); }
│ │ │ -
│ │ │ -
749#endif
│ │ │ -
750 ///@}
│ │ │ -
751
│ │ │ -
752 // bucket interface.
│ │ │ -
753
│ │ │ -
754 /// Returns the number of buckets of the %unordered_set.
│ │ │ - │ │ │ -
│ │ │ -
756 bucket_count() const noexcept
│ │ │ -
757 { return _M_h.bucket_count(); }
│ │ │ -
│ │ │ -
758
│ │ │ -
759 /// Returns the maximum number of buckets of the %unordered_set.
│ │ │ - │ │ │ -
│ │ │ -
761 max_bucket_count() const noexcept
│ │ │ -
762 { return _M_h.max_bucket_count(); }
│ │ │ -
│ │ │ -
763
│ │ │ -
764 /*
│ │ │ -
765 * @brief Returns the number of elements in a given bucket.
│ │ │ -
766 * @param __n A bucket index.
│ │ │ -
767 * @return The number of elements in the bucket.
│ │ │ -
768 */
│ │ │ - │ │ │ -
770 bucket_size(size_type __n) const
│ │ │ -
771 { return _M_h.bucket_size(__n); }
│ │ │ -
772
│ │ │ -
773 /*
│ │ │ -
774 * @brief Returns the bucket index of a given element.
│ │ │ -
775 * @param __key A key instance.
│ │ │ -
776 * @return The key bucket index.
│ │ │ -
777 */
│ │ │ - │ │ │ -
779 bucket(const key_type& __key) const
│ │ │ -
780 { return _M_h.bucket(__key); }
│ │ │ -
781
│ │ │ -
782 ///@{
│ │ │ -
783 /**
│ │ │ -
784 * @brief Returns a read-only (constant) iterator pointing to the first
│ │ │ -
785 * bucket element.
│ │ │ -
786 * @param __n The bucket index.
│ │ │ -
787 * @return A read-only local iterator.
│ │ │ -
788 */
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
791 { return _M_h.begin(__n); }
│ │ │ -
│ │ │ -
792
│ │ │ - │ │ │ -
│ │ │ -
794 begin(size_type __n) const
│ │ │ -
795 { return _M_h.begin(__n); }
│ │ │ -
│ │ │ -
796
│ │ │ - │ │ │ -
│ │ │ -
798 cbegin(size_type __n) const
│ │ │ -
799 { return _M_h.cbegin(__n); }
│ │ │ -
│ │ │ -
800 ///@}
│ │ │ -
801
│ │ │ -
802 ///@{
│ │ │ -
803 /**
│ │ │ -
804 * @brief Returns a read-only (constant) iterator pointing to one past
│ │ │ -
805 * the last bucket elements.
│ │ │ -
806 * @param __n The bucket index.
│ │ │ -
807 * @return A read-only local iterator.
│ │ │ -
808 */
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
811 { return _M_h.end(__n); }
│ │ │ -
│ │ │ -
812
│ │ │ - │ │ │ -
│ │ │ -
814 end(size_type __n) const
│ │ │ -
815 { return _M_h.end(__n); }
│ │ │ -
│ │ │ -
816
│ │ │ - │ │ │ -
│ │ │ -
818 cend(size_type __n) const
│ │ │ -
819 { return _M_h.cend(__n); }
│ │ │ -
│ │ │ -
820 ///@}
│ │ │ -
821
│ │ │ -
822 // hash policy.
│ │ │ -
823
│ │ │ -
824 /// Returns the average number of elements per bucket.
│ │ │ -
825 float
│ │ │ -
│ │ │ -
826 load_factor() const noexcept
│ │ │ -
827 { return _M_h.load_factor(); }
│ │ │ -
│ │ │ -
828
│ │ │ -
829 /// Returns a positive number that the %unordered_set tries to keep the
│ │ │ -
830 /// load factor less than or equal to.
│ │ │ -
831 float
│ │ │ -
│ │ │ -
832 max_load_factor() const noexcept
│ │ │ -
833 { return _M_h.max_load_factor(); }
│ │ │ -
│ │ │ -
834
│ │ │ -
835 /**
│ │ │ -
836 * @brief Change the %unordered_set maximum load factor.
│ │ │ -
837 * @param __z The new maximum load factor.
│ │ │ -
838 */
│ │ │ -
839 void
│ │ │ -
│ │ │ - │ │ │ -
841 { _M_h.max_load_factor(__z); }
│ │ │ -
│ │ │ -
842
│ │ │ -
843 /**
│ │ │ -
844 * @brief May rehash the %unordered_set.
│ │ │ -
845 * @param __n The new number of buckets.
│ │ │ -
846 *
│ │ │ -
847 * Rehash will occur only if the new number of buckets respect the
│ │ │ -
848 * %unordered_set maximum load factor.
│ │ │ -
849 */
│ │ │ -
850 void
│ │ │ -
│ │ │ - │ │ │ -
852 { _M_h.rehash(__n); }
│ │ │ -
│ │ │ -
853
│ │ │ -
854 /**
│ │ │ -
855 * @brief Prepare the %unordered_set for a specified number of
│ │ │ -
856 * elements.
│ │ │ -
857 * @param __n Number of elements required.
│ │ │ -
858 *
│ │ │ -
859 * Same as rehash(ceil(n / max_load_factor())).
│ │ │ -
860 */
│ │ │ -
861 void
│ │ │ -
│ │ │ - │ │ │ -
863 { _M_h.reserve(__n); }
│ │ │ -
│ │ │ -
864
│ │ │ -
865 template<typename _Value1, typename _Hash1, typename _Pred1,
│ │ │ -
866 typename _Alloc1>
│ │ │ -
867 friend bool
│ │ │ - │ │ │ - │ │ │ -
870 };
│ │ │ -
│ │ │ -
871
│ │ │ -
872#if __cpp_deduction_guides >= 201606
│ │ │ -
873
│ │ │ -
874 template<typename _InputIterator,
│ │ │ -
875 typename _Hash =
│ │ │ -
876 hash<typename iterator_traits<_InputIterator>::value_type>,
│ │ │ -
877 typename _Pred =
│ │ │ -
878 equal_to<typename iterator_traits<_InputIterator>::value_type>,
│ │ │ -
879 typename _Allocator =
│ │ │ -
880 allocator<typename iterator_traits<_InputIterator>::value_type>,
│ │ │ -
881 typename = _RequireInputIter<_InputIterator>,
│ │ │ -
882 typename = _RequireNotAllocatorOrIntegral<_Hash>,
│ │ │ -
883 typename = _RequireNotAllocator<_Pred>,
│ │ │ -
884 typename = _RequireAllocator<_Allocator>>
│ │ │ -
885 unordered_set(_InputIterator, _InputIterator,
│ │ │ - │ │ │ -
887 _Hash = _Hash(), _Pred = _Pred(), _Allocator = _Allocator())
│ │ │ -
888 -> unordered_set<typename iterator_traits<_InputIterator>::value_type,
│ │ │ -
889 _Hash, _Pred, _Allocator>;
│ │ │ -
890
│ │ │ -
891 template<typename _Tp, typename _Hash = hash<_Tp>,
│ │ │ -
892 typename _Pred = equal_to<_Tp>,
│ │ │ -
893 typename _Allocator = allocator<_Tp>,
│ │ │ -
894 typename = _RequireNotAllocatorOrIntegral<_Hash>,
│ │ │ -
895 typename = _RequireNotAllocator<_Pred>,
│ │ │ -
896 typename = _RequireAllocator<_Allocator>>
│ │ │ -
897 unordered_set(initializer_list<_Tp>,
│ │ │ - │ │ │ -
899 _Hash = _Hash(), _Pred = _Pred(), _Allocator = _Allocator())
│ │ │ -
900 -> unordered_set<_Tp, _Hash, _Pred, _Allocator>;
│ │ │ -
901
│ │ │ -
902 template<typename _InputIterator, typename _Allocator,
│ │ │ -
903 typename = _RequireInputIter<_InputIterator>,
│ │ │ -
904 typename = _RequireAllocator<_Allocator>>
│ │ │ -
905 unordered_set(_InputIterator, _InputIterator,
│ │ │ - │ │ │ -
907 -> unordered_set<typename iterator_traits<_InputIterator>::value_type,
│ │ │ -
908 hash<
│ │ │ -
909 typename iterator_traits<_InputIterator>::value_type>,
│ │ │ -
910 equal_to<
│ │ │ -
911 typename iterator_traits<_InputIterator>::value_type>,
│ │ │ -
912 _Allocator>;
│ │ │ -
913
│ │ │ -
914 template<typename _InputIterator, typename _Hash, typename _Allocator,
│ │ │ -
915 typename = _RequireInputIter<_InputIterator>,
│ │ │ -
916 typename = _RequireNotAllocatorOrIntegral<_Hash>,
│ │ │ -
917 typename = _RequireAllocator<_Allocator>>
│ │ │ -
918 unordered_set(_InputIterator, _InputIterator,
│ │ │ - │ │ │ -
920 _Hash, _Allocator)
│ │ │ -
921 -> unordered_set<typename iterator_traits<_InputIterator>::value_type,
│ │ │ -
922 _Hash,
│ │ │ -
923 equal_to<
│ │ │ -
924 typename iterator_traits<_InputIterator>::value_type>,
│ │ │ -
925 _Allocator>;
│ │ │ -
926
│ │ │ -
927 template<typename _Tp, typename _Allocator,
│ │ │ -
928 typename = _RequireAllocator<_Allocator>>
│ │ │ -
929 unordered_set(initializer_list<_Tp>,
│ │ │ - │ │ │ -
931 -> unordered_set<_Tp, hash<_Tp>, equal_to<_Tp>, _Allocator>;
│ │ │ -
932
│ │ │ -
933 template<typename _Tp, typename _Hash, typename _Allocator,
│ │ │ -
934 typename = _RequireNotAllocatorOrIntegral<_Hash>,
│ │ │ -
935 typename = _RequireAllocator<_Allocator>>
│ │ │ -
936 unordered_set(initializer_list<_Tp>,
│ │ │ -
937 unordered_set<int>::size_type, _Hash, _Allocator)
│ │ │ -
938 -> unordered_set<_Tp, _Hash, equal_to<_Tp>, _Allocator>;
│ │ │ -
939
│ │ │ -
940#endif
│ │ │ -
941
│ │ │ -
942 /**
│ │ │ -
943 * @brief A standard container composed of equivalent keys
│ │ │ -
944 * (possibly containing multiple of each key value) in which the
│ │ │ -
945 * elements' keys are the elements themselves.
│ │ │ -
946 *
│ │ │ -
947 * @ingroup unordered_associative_containers
│ │ │ -
948 * @headerfile unordered_set
│ │ │ -
949 * @since C++11
│ │ │ -
950 *
│ │ │ -
951 * @tparam _Value Type of key objects.
│ │ │ -
952 * @tparam _Hash Hashing function object type, defaults to hash<_Value>.
│ │ │ -
953 * @tparam _Pred Predicate function object type, defaults
│ │ │ -
954 * to equal_to<_Value>.
│ │ │ -
955 * @tparam _Alloc Allocator type, defaults to allocator<_Key>.
│ │ │ -
956 *
│ │ │ -
957 * Meets the requirements of a <a href="tables.html#65">container</a>, and
│ │ │ -
958 * <a href="tables.html#xx">unordered associative container</a>
│ │ │ -
959 *
│ │ │ -
960 * Base is _Hashtable, dispatched at compile time via template
│ │ │ -
961 * alias __umset_hashtable.
│ │ │ -
962 */
│ │ │ -
963 template<typename _Value,
│ │ │ -
964 typename _Hash = hash<_Value>,
│ │ │ -
965 typename _Pred = equal_to<_Value>,
│ │ │ -
966 typename _Alloc = allocator<_Value>>
│ │ │ -
│ │ │ - │ │ │ -
968 {
│ │ │ - │ │ │ -
970 _Hashtable _M_h;
│ │ │ -
971
│ │ │ -
972 public:
│ │ │ -
973 // typedefs:
│ │ │ -
974 ///@{
│ │ │ -
975 /// Public typedefs.
│ │ │ -
976 typedef typename _Hashtable::key_type key_type;
│ │ │ -
977 typedef typename _Hashtable::value_type value_type;
│ │ │ -
978 typedef typename _Hashtable::hasher hasher;
│ │ │ -
979 typedef typename _Hashtable::key_equal key_equal;
│ │ │ -
980 typedef typename _Hashtable::allocator_type allocator_type;
│ │ │ -
981 ///@}
│ │ │ -
982
│ │ │ -
983 ///@{
│ │ │ -
984 /// Iterator-related typedefs.
│ │ │ -
985 typedef typename _Hashtable::pointer pointer;
│ │ │ -
986 typedef typename _Hashtable::const_pointer const_pointer;
│ │ │ -
987 typedef typename _Hashtable::reference reference;
│ │ │ -
988 typedef typename _Hashtable::const_reference const_reference;
│ │ │ -
989 typedef typename _Hashtable::iterator iterator;
│ │ │ -
990 typedef typename _Hashtable::const_iterator const_iterator;
│ │ │ -
991 typedef typename _Hashtable::local_iterator local_iterator;
│ │ │ -
992 typedef typename _Hashtable::const_local_iterator const_local_iterator;
│ │ │ -
993 typedef typename _Hashtable::size_type size_type;
│ │ │ -
994 typedef typename _Hashtable::difference_type difference_type;
│ │ │ -
995 ///@}
│ │ │ -
996
│ │ │ -
997#if __cplusplus > 201402L
│ │ │ -
998 using node_type = typename _Hashtable::node_type;
│ │ │ -
999#endif
│ │ │ -
1000
│ │ │ -
1001 // construct/destroy/copy
│ │ │ -
1002
│ │ │ -
1003 /// Default constructor.
│ │ │ - │ │ │ -
1005
│ │ │ -
1006 /**
│ │ │ -
1007 * @brief Default constructor creates no elements.
│ │ │ -
1008 * @param __n Minimal initial number of buckets.
│ │ │ -
1009 * @param __hf A hash functor.
│ │ │ -
1010 * @param __eql A key equality functor.
│ │ │ -
1011 * @param __a An allocator object.
│ │ │ -
1012 */
│ │ │ -
1013 explicit
│ │ │ -
│ │ │ - │ │ │ -
1015 const hasher& __hf = hasher(),
│ │ │ -
1016 const key_equal& __eql = key_equal(),
│ │ │ -
1017 const allocator_type& __a = allocator_type())
│ │ │ -
1018 : _M_h(__n, __hf, __eql, __a)
│ │ │ -
1019 { }
│ │ │ + │ │ │ +
261 operator++(int) _GLIBCXX_NOEXCEPT
│ │ │ +
262 { return *this; }
│ │ │ +
263 };
│ │ │
│ │ │ -
1020
│ │ │ -
1021 /**
│ │ │ -
1022 * @brief Builds an %unordered_multiset from a range.
│ │ │ -
1023 * @param __first An input iterator.
│ │ │ -
1024 * @param __last An input iterator.
│ │ │ -
1025 * @param __n Minimal initial number of buckets.
│ │ │ -
1026 * @param __hf A hash functor.
│ │ │ -
1027 * @param __eql A key equality functor.
│ │ │ -
1028 * @param __a An allocator object.
│ │ │ -
1029 *
│ │ │ -
1030 * Create an %unordered_multiset consisting of copies of the elements
│ │ │ -
1031 * from [__first,__last). This is linear in N (where N is
│ │ │ -
1032 * distance(__first,__last)).
│ │ │ -
1033 */
│ │ │ -
1034 template<typename _InputIterator>
│ │ │ -
│ │ │ - │ │ │ -
1036 size_type __n = 0,
│ │ │ -
1037 const hasher& __hf = hasher(),
│ │ │ -
1038 const key_equal& __eql = key_equal(),
│ │ │ -
1039 const allocator_type& __a = allocator_type())
│ │ │ -
1040 : _M_h(__first, __last, __n, __hf, __eql, __a)
│ │ │ -
1041 { }
│ │ │ -
│ │ │ -
1042
│ │ │ -
1043 /// Copy constructor.
│ │ │ - │ │ │ -
1045
│ │ │ -
1046 /// Move constructor.
│ │ │ - │ │ │ -
1048
│ │ │ -
1049 /**
│ │ │ -
1050 * @brief Builds an %unordered_multiset from an initializer_list.
│ │ │ -
1051 * @param __l An initializer_list.
│ │ │ -
1052 * @param __n Minimal initial number of buckets.
│ │ │ -
1053 * @param __hf A hash functor.
│ │ │ -
1054 * @param __eql A key equality functor.
│ │ │ -
1055 * @param __a An allocator object.
│ │ │ -
1056 *
│ │ │ -
1057 * Create an %unordered_multiset consisting of copies of the elements in
│ │ │ -
1058 * the list. This is linear in N (where N is @a __l.size()).
│ │ │ -
1059 */
│ │ │ -
│ │ │ - │ │ │ -
1061 size_type __n = 0,
│ │ │ -
1062 const hasher& __hf = hasher(),
│ │ │ -
1063 const key_equal& __eql = key_equal(),
│ │ │ -
1064 const allocator_type& __a = allocator_type())
│ │ │ -
1065 : _M_h(__l, __n, __hf, __eql, __a)
│ │ │ -
1066 { }
│ │ │ -
│ │ │ -
1067
│ │ │ -
1068 /// Copy assignment operator.
│ │ │ - │ │ │ - │ │ │ -
1071
│ │ │ -
1072 /// Move assignment operator.
│ │ │ - │ │ │ - │ │ │ -
1075
│ │ │ -
1076 /**
│ │ │ -
1077 * @brief Creates an %unordered_multiset with no elements.
│ │ │ -
1078 * @param __a An allocator object.
│ │ │ -
1079 */
│ │ │ -
1080 explicit
│ │ │ -
│ │ │ - │ │ │ -
1082 : _M_h(__a)
│ │ │ -
1083 { }
│ │ │ -
│ │ │ -
1084
│ │ │ -
1085 /*
│ │ │ -
1086 * @brief Copy constructor with allocator argument.
│ │ │ -
1087 * @param __uset Input %unordered_multiset to copy.
│ │ │ -
1088 * @param __a An allocator object.
│ │ │ -
1089 */
│ │ │ - │ │ │ -
1091 const allocator_type& __a)
│ │ │ -
1092 : _M_h(__umset._M_h, __a)
│ │ │ -
1093 { }
│ │ │ -
1094
│ │ │ -
1095 /*
│ │ │ -
1096 * @brief Move constructor with allocator argument.
│ │ │ -
1097 * @param __umset Input %unordered_multiset to move.
│ │ │ -
1098 * @param __a An allocator object.
│ │ │ -
1099 */
│ │ │ - │ │ │ -
1101 const allocator_type& __a)
│ │ │ -
1102 noexcept( noexcept(_Hashtable(std::move(__umset._M_h), __a)) )
│ │ │ -
1103 : _M_h(std::move(__umset._M_h), __a)
│ │ │ -
1104 { }
│ │ │ -
1105
│ │ │ - │ │ │ -
1107 : unordered_multiset(__n, hasher(), key_equal(), __a)
│ │ │ -
1108 { }
│ │ │ -
1109
│ │ │ -
1110 unordered_multiset(size_type __n, const hasher& __hf,
│ │ │ -
1111 const allocator_type& __a)
│ │ │ -
1112 : unordered_multiset(__n, __hf, key_equal(), __a)
│ │ │ -
1113 { }
│ │ │ -
1114
│ │ │ -
1115 template<typename _InputIterator>
│ │ │ -
1116 unordered_multiset(_InputIterator __first, _InputIterator __last,
│ │ │ -
1117 size_type __n,
│ │ │ -
1118 const allocator_type& __a)
│ │ │ -
1119 : unordered_multiset(__first, __last, __n, hasher(), key_equal(), __a)
│ │ │ -
1120 { }
│ │ │ -
1121
│ │ │ -
1122 template<typename _InputIterator>
│ │ │ -
1123 unordered_multiset(_InputIterator __first, _InputIterator __last,
│ │ │ -
1124 size_type __n, const hasher& __hf,
│ │ │ -
1125 const allocator_type& __a)
│ │ │ -
1126 : unordered_multiset(__first, __last, __n, __hf, key_equal(), __a)
│ │ │ -
1127 { }
│ │ │ -
1128
│ │ │ -
1129 unordered_multiset(initializer_list<value_type> __l,
│ │ │ -
1130 size_type __n,
│ │ │ -
1131 const allocator_type& __a)
│ │ │ -
1132 : unordered_multiset(__l, __n, hasher(), key_equal(), __a)
│ │ │ -
1133 { }
│ │ │ -
1134
│ │ │ -
1135 unordered_multiset(initializer_list<value_type> __l,
│ │ │ -
1136 size_type __n, const hasher& __hf,
│ │ │ -
1137 const allocator_type& __a)
│ │ │ -
1138 : unordered_multiset(__l, __n, __hf, key_equal(), __a)
│ │ │ -
1139 { }
│ │ │ -
1140
│ │ │ -
1141 /**
│ │ │ -
1142 * @brief %Unordered_multiset list assignment operator.
│ │ │ -
1143 * @param __l An initializer_list.
│ │ │ -
1144 *
│ │ │ -
1145 * This function fills an %unordered_multiset with copies of the elements
│ │ │ -
1146 * in the initializer list @a __l.
│ │ │ -
1147 *
│ │ │ -
1148 * Note that the assignment completely changes the %unordered_multiset
│ │ │ -
1149 * and that the resulting %unordered_multiset's size is the same as the
│ │ │ -
1150 * number of elements assigned.
│ │ │ -
1151 */
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
1154 {
│ │ │ -
1155 _M_h = __l;
│ │ │ -
1156 return *this;
│ │ │ -
1157 }
│ │ │ -
│ │ │ -
1158
│ │ │ -
1159 /// Returns the allocator object used by the %unordered_multiset.
│ │ │ - │ │ │ -
│ │ │ -
1161 get_allocator() const noexcept
│ │ │ -
1162 { return _M_h.get_allocator(); }
│ │ │ -
│ │ │ -
1163
│ │ │ -
1164 // size and capacity:
│ │ │ -
1165
│ │ │ -
1166 /// Returns true if the %unordered_multiset is empty.
│ │ │ -
1167 _GLIBCXX_NODISCARD bool
│ │ │ -
│ │ │ -
1168 empty() const noexcept
│ │ │ -
1169 { return _M_h.empty(); }
│ │ │ -
│ │ │ -
1170
│ │ │ -
1171 /// Returns the size of the %unordered_multiset.
│ │ │ -
1172 size_type
│ │ │ -
│ │ │ -
1173 size() const noexcept
│ │ │ -
1174 { return _M_h.size(); }
│ │ │ -
│ │ │ -
1175
│ │ │ -
1176 /// Returns the maximum size of the %unordered_multiset.
│ │ │ -
1177 size_type
│ │ │ -
│ │ │ -
1178 max_size() const noexcept
│ │ │ -
1179 { return _M_h.max_size(); }
│ │ │ -
│ │ │ -
1180
│ │ │ -
1181 // iterators.
│ │ │ -
1182
│ │ │ -
1183 ///@{
│ │ │ -
1184 /**
│ │ │ -
1185 * Returns a read-only (constant) iterator that points to the first
│ │ │ -
1186 * element in the %unordered_multiset.
│ │ │ -
1187 */
│ │ │ -
1188 iterator
│ │ │ -
│ │ │ -
1189 begin() noexcept
│ │ │ -
1190 { return _M_h.begin(); }
│ │ │ -
│ │ │ -
1191
│ │ │ - │ │ │ -
│ │ │ -
1193 begin() const noexcept
│ │ │ -
1194 { return _M_h.begin(); }
│ │ │ -
│ │ │ -
1195 ///@}
│ │ │ -
1196
│ │ │ -
1197 ///@{
│ │ │ -
1198 /**
│ │ │ -
1199 * Returns a read-only (constant) iterator that points one past the last
│ │ │ -
1200 * element in the %unordered_multiset.
│ │ │ -
1201 */
│ │ │ -
1202 iterator
│ │ │ -
│ │ │ -
1203 end() noexcept
│ │ │ -
1204 { return _M_h.end(); }
│ │ │ -
│ │ │ -
1205
│ │ │ - │ │ │ -
│ │ │ -
1207 end() const noexcept
│ │ │ -
1208 { return _M_h.end(); }
│ │ │ -
│ │ │ -
1209 ///@}
│ │ │ -
1210
│ │ │ -
1211 /**
│ │ │ -
1212 * Returns a read-only (constant) iterator that points to the first
│ │ │ -
1213 * element in the %unordered_multiset.
│ │ │ -
1214 */
│ │ │ - │ │ │ -
│ │ │ -
1216 cbegin() const noexcept
│ │ │ -
1217 { return _M_h.begin(); }
│ │ │ -
│ │ │ -
1218
│ │ │ -
1219 /**
│ │ │ -
1220 * Returns a read-only (constant) iterator that points one past the last
│ │ │ -
1221 * element in the %unordered_multiset.
│ │ │ -
1222 */
│ │ │ - │ │ │ -
│ │ │ -
1224 cend() const noexcept
│ │ │ -
1225 { return _M_h.end(); }
│ │ │ -
│ │ │ -
1226
│ │ │ -
1227 // modifiers.
│ │ │ -
1228
│ │ │ -
1229 /**
│ │ │ -
1230 * @brief Builds and insert an element into the %unordered_multiset.
│ │ │ -
1231 * @param __args Arguments used to generate an element.
│ │ │ -
1232 * @return An iterator that points to the inserted element.
│ │ │ -
1233 *
│ │ │ -
1234 * Insertion requires amortized constant time.
│ │ │ -
1235 */
│ │ │ -
1236 template<typename... _Args>
│ │ │ -
1237 iterator
│ │ │ -
│ │ │ - │ │ │ -
1239 { return _M_h.emplace(std::forward<_Args>(__args)...); }
│ │ │ -
│ │ │ -
1240
│ │ │ -
1241 /**
│ │ │ -
1242 * @brief Inserts an element into the %unordered_multiset.
│ │ │ -
1243 * @param __pos An iterator that serves as a hint as to where the
│ │ │ -
1244 * element should be inserted.
│ │ │ -
1245 * @param __args Arguments used to generate the element to be
│ │ │ -
1246 * inserted.
│ │ │ -
1247 * @return An iterator that points to the inserted element.
│ │ │ -
1248 *
│ │ │ -
1249 * Note that the first parameter is only a hint and can potentially
│ │ │ -
1250 * improve the performance of the insertion process. A bad hint would
│ │ │ -
1251 * cause no gains in efficiency.
│ │ │ -
1252 *
│ │ │ -
1253 * For more on @a hinting, see:
│ │ │ -
1254 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/associative.html#containers.associative.insert_hints
│ │ │ -
1255 *
│ │ │ -
1256 * Insertion requires amortized constant time.
│ │ │ -
1257 */
│ │ │ -
1258 template<typename... _Args>
│ │ │ -
1259 iterator
│ │ │ -
│ │ │ - │ │ │ -
1261 { return _M_h.emplace_hint(__pos, std::forward<_Args>(__args)...); }
│ │ │ -
│ │ │ -
1262
│ │ │ -
1263 ///@{
│ │ │ -
1264 /**
│ │ │ -
1265 * @brief Inserts an element into the %unordered_multiset.
│ │ │ -
1266 * @param __x Element to be inserted.
│ │ │ -
1267 * @return An iterator that points to the inserted element.
│ │ │ -
1268 *
│ │ │ -
1269 * Insertion requires amortized constant time.
│ │ │ -
1270 */
│ │ │ -
1271 iterator
│ │ │ -
│ │ │ -
1272 insert(const value_type& __x)
│ │ │ -
1273 { return _M_h.insert(__x); }
│ │ │ -
│ │ │ -
1274
│ │ │ -
1275 iterator
│ │ │ -
│ │ │ - │ │ │ -
1277 { return _M_h.insert(std::move(__x)); }
│ │ │ -
│ │ │ -
1278 ///@}
│ │ │ -
1279
│ │ │ -
1280 ///@{
│ │ │ -
1281 /**
│ │ │ -
1282 * @brief Inserts an element into the %unordered_multiset.
│ │ │ -
1283 * @param __hint An iterator that serves as a hint as to where the
│ │ │ -
1284 * element should be inserted.
│ │ │ -
1285 * @param __x Element to be inserted.
│ │ │ -
1286 * @return An iterator that points to the inserted element.
│ │ │ -
1287 *
│ │ │ -
1288 * Note that the first parameter is only a hint and can potentially
│ │ │ -
1289 * improve the performance of the insertion process. A bad hint would
│ │ │ -
1290 * cause no gains in efficiency.
│ │ │ -
1291 *
│ │ │ -
1292 * For more on @a hinting, see:
│ │ │ -
1293 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/associative.html#containers.associative.insert_hints
│ │ │ -
1294 *
│ │ │ -
1295 * Insertion requires amortized constant.
│ │ │ -
1296 */
│ │ │ -
1297 iterator
│ │ │ -
│ │ │ - │ │ │ -
1299 { return _M_h.insert(__hint, __x); }
│ │ │ -
│ │ │ -
1300
│ │ │ -
1301 iterator
│ │ │ -
│ │ │ - │ │ │ -
1303 { return _M_h.insert(__hint, std::move(__x)); }
│ │ │ -
│ │ │ -
1304 ///@}
│ │ │ -
1305
│ │ │ -
1306 /**
│ │ │ -
1307 * @brief A template function that inserts a range of elements.
│ │ │ -
1308 * @param __first Iterator pointing to the start of the range to be
│ │ │ -
1309 * inserted.
│ │ │ -
1310 * @param __last Iterator pointing to the end of the range.
│ │ │ -
1311 *
│ │ │ -
1312 * Complexity similar to that of the range constructor.
│ │ │ -
1313 */
│ │ │ -
1314 template<typename _InputIterator>
│ │ │ -
1315 void
│ │ │ -
│ │ │ - │ │ │ -
1317 { _M_h.insert(__first, __last); }
│ │ │ -
│ │ │ -
1318
│ │ │ -
1319 /**
│ │ │ -
1320 * @brief Inserts a list of elements into the %unordered_multiset.
│ │ │ -
1321 * @param __l A std::initializer_list<value_type> of elements to be
│ │ │ -
1322 * inserted.
│ │ │ -
1323 *
│ │ │ -
1324 * Complexity similar to that of the range constructor.
│ │ │ -
1325 */
│ │ │ -
1326 void
│ │ │ -
│ │ │ - │ │ │ -
1328 { _M_h.insert(__l); }
│ │ │ -
│ │ │ -
1329
│ │ │ -
1330#if __cplusplus > 201402L
│ │ │ -
1331 /// Extract a node.
│ │ │ -
1332 node_type
│ │ │ -
│ │ │ - │ │ │ -
1334 {
│ │ │ -
1335 __glibcxx_assert(__pos != end());
│ │ │ -
1336 return _M_h.extract(__pos);
│ │ │ -
1337 }
│ │ │ -
│ │ │ -
1338
│ │ │ -
1339 /// Extract a node.
│ │ │ -
1340 node_type
│ │ │ -
│ │ │ - │ │ │ -
1342 { return _M_h.extract(__key); }
│ │ │ -
│ │ │ -
1343
│ │ │ -
1344 /// Re-insert an extracted node.
│ │ │ -
1345 iterator
│ │ │ -
│ │ │ -
1346 insert(node_type&& __nh)
│ │ │ -
1347 { return _M_h._M_reinsert_node_multi(cend(), std::move(__nh)); }
│ │ │ -
│ │ │ -
1348
│ │ │ -
1349 /// Re-insert an extracted node.
│ │ │ -
1350 iterator
│ │ │ -
│ │ │ - │ │ │ -
1352 { return _M_h._M_reinsert_node_multi(__hint, std::move(__nh)); }
│ │ │ -
│ │ │ -
1353#endif // C++17
│ │ │ -
1354
│ │ │ -
1355 ///@{
│ │ │ -
1356 /**
│ │ │ -
1357 * @brief Erases an element from an %unordered_multiset.
│ │ │ -
1358 * @param __position An iterator pointing to the element to be erased.
│ │ │ -
1359 * @return An iterator pointing to the element immediately following
│ │ │ -
1360 * @a __position prior to the element being erased. If no such
│ │ │ -
1361 * element exists, end() is returned.
│ │ │ -
1362 *
│ │ │ -
1363 * This function erases an element, pointed to by the given iterator,
│ │ │ -
1364 * from an %unordered_multiset.
│ │ │ -
1365 *
│ │ │ -
1366 * Note that this function only erases the element, and that if the
│ │ │ -
1367 * element is itself a pointer, the pointed-to memory is not touched in
│ │ │ -
1368 * any way. Managing the pointer is the user's responsibility.
│ │ │ -
1369 */
│ │ │ -
1370 iterator
│ │ │ -
│ │ │ - │ │ │ -
1372 { return _M_h.erase(__position); }
│ │ │ -
│ │ │ -
1373
│ │ │ -
1374 // LWG 2059.
│ │ │ -
1375 iterator
│ │ │ -
│ │ │ - │ │ │ -
1377 { return _M_h.erase(__position); }
│ │ │ -
│ │ │ -
1378 ///@}
│ │ │ -
1379
│ │ │ -
1380
│ │ │ -
1381 /**
│ │ │ -
1382 * @brief Erases elements according to the provided key.
│ │ │ -
1383 * @param __x Key of element to be erased.
│ │ │ -
1384 * @return The number of elements erased.
│ │ │ -
1385 *
│ │ │ -
1386 * This function erases all the elements located by the given key from
│ │ │ -
1387 * an %unordered_multiset.
│ │ │ -
1388 *
│ │ │ -
1389 * Note that this function only erases the element, and that if the
│ │ │ -
1390 * element is itself a pointer, the pointed-to memory is not touched in
│ │ │ -
1391 * any way. Managing the pointer is the user's responsibility.
│ │ │ -
1392 */
│ │ │ -
1393 size_type
│ │ │ -
│ │ │ -
1394 erase(const key_type& __x)
│ │ │ -
1395 { return _M_h.erase(__x); }
│ │ │ -
│ │ │ -
1396
│ │ │ -
1397 /**
│ │ │ -
1398 * @brief Erases a [__first,__last) range of elements from an
│ │ │ -
1399 * %unordered_multiset.
│ │ │ -
1400 * @param __first Iterator pointing to the start of the range to be
│ │ │ -
1401 * erased.
│ │ │ -
1402 * @param __last Iterator pointing to the end of the range to
│ │ │ -
1403 * be erased.
│ │ │ -
1404 * @return The iterator @a __last.
│ │ │ -
1405 *
│ │ │ -
1406 * This function erases a sequence of elements from an
│ │ │ -
1407 * %unordered_multiset.
│ │ │ -
1408 *
│ │ │ -
1409 * Note that this function only erases the element, and that if
│ │ │ -
1410 * the element is itself a pointer, the pointed-to memory is not touched
│ │ │ -
1411 * in any way. Managing the pointer is the user's responsibility.
│ │ │ -
1412 */
│ │ │ -
1413 iterator
│ │ │ -
│ │ │ - │ │ │ -
1415 { return _M_h.erase(__first, __last); }
│ │ │ -
│ │ │ -
1416
│ │ │ -
1417 /**
│ │ │ -
1418 * Erases all elements in an %unordered_multiset.
│ │ │ -
1419 *
│ │ │ -
1420 * Note that this function only erases the elements, and that if the
│ │ │ -
1421 * elements themselves are pointers, the pointed-to memory is not touched
│ │ │ -
1422 * in any way. Managing the pointer is the user's responsibility.
│ │ │ -
1423 */
│ │ │ -
1424 void
│ │ │ -
│ │ │ -
1425 clear() noexcept
│ │ │ -
1426 { _M_h.clear(); }
│ │ │ -
│ │ │ -
1427
│ │ │ -
1428 /**
│ │ │ -
1429 * @brief Swaps data with another %unordered_multiset.
│ │ │ -
1430 * @param __x An %unordered_multiset of the same element and allocator
│ │ │ -
1431 * types.
│ │ │ -
1432 *
│ │ │ -
1433 * This exchanges the elements between two sets in constant time.
│ │ │ -
1434 * Note that the global std::swap() function is specialized such that
│ │ │ -
1435 * std::swap(s1,s2) will feed to this function.
│ │ │ -
1436 */
│ │ │ -
1437 void
│ │ │ -
│ │ │ - │ │ │ -
1439 noexcept( noexcept(_M_h.swap(__x._M_h)) )
│ │ │ -
1440 { _M_h.swap(__x._M_h); }
│ │ │ -
│ │ │ -
1441
│ │ │ -
1442#if __cplusplus > 201402L
│ │ │ -
1443 template<typename, typename, typename>
│ │ │ -
1444 friend class std::_Hash_merge_helper;
│ │ │ -
1445
│ │ │ -
1446 template<typename _H2, typename _P2>
│ │ │ -
1447 void
│ │ │ - │ │ │ -
1449 {
│ │ │ -
1450 using _Merge_helper
│ │ │ - │ │ │ -
1452 _M_h._M_merge_multi(_Merge_helper::_S_get_table(__source));
│ │ │ -
1453 }
│ │ │ -
1454
│ │ │ -
1455 template<typename _H2, typename _P2>
│ │ │ -
1456 void
│ │ │ -
1457 merge(unordered_multiset<_Value, _H2, _P2, _Alloc>&& __source)
│ │ │ -
1458 { merge(__source); }
│ │ │ -
1459
│ │ │ -
1460 template<typename _H2, typename _P2>
│ │ │ -
1461 void
│ │ │ -
1462 merge(unordered_set<_Value, _H2, _P2, _Alloc>& __source)
│ │ │ -
1463 {
│ │ │ -
1464 using _Merge_helper
│ │ │ -
1465 = _Hash_merge_helper<unordered_multiset, _H2, _P2>;
│ │ │ -
1466 _M_h._M_merge_multi(_Merge_helper::_S_get_table(__source));
│ │ │ -
1467 }
│ │ │ -
1468
│ │ │ -
1469 template<typename _H2, typename _P2>
│ │ │ -
1470 void
│ │ │ -
1471 merge(unordered_set<_Value, _H2, _P2, _Alloc>&& __source)
│ │ │ -
1472 { merge(__source); }
│ │ │ -
1473#endif // C++17
│ │ │ -
1474
│ │ │ -
1475 // observers.
│ │ │ -
1476
│ │ │ -
1477 /// Returns the hash functor object with which the %unordered_multiset
│ │ │ -
1478 /// was constructed.
│ │ │ -
1479 hasher
│ │ │ -
│ │ │ - │ │ │ -
1481 { return _M_h.hash_function(); }
│ │ │ -
│ │ │ -
1482
│ │ │ -
1483 /// Returns the key comparison object with which the %unordered_multiset
│ │ │ -
1484 /// was constructed.
│ │ │ -
1485 key_equal
│ │ │ -
│ │ │ -
1486 key_eq() const
│ │ │ -
1487 { return _M_h.key_eq(); }
│ │ │ -
│ │ │ -
1488
│ │ │ -
1489 // lookup.
│ │ │ -
1490
│ │ │ -
1491 ///@{
│ │ │ -
1492 /**
│ │ │ -
1493 * @brief Tries to locate an element in an %unordered_multiset.
│ │ │ -
1494 * @param __x Element to be located.
│ │ │ -
1495 * @return Iterator pointing to sought-after element, or end() if not
│ │ │ -
1496 * found.
│ │ │ -
1497 *
│ │ │ -
1498 * This function takes a key and tries to locate the element with which
│ │ │ -
1499 * the key matches. If successful the function returns an iterator
│ │ │ -
1500 * pointing to the sought after element. If unsuccessful it returns the
│ │ │ -
1501 * past-the-end ( @c end() ) iterator.
│ │ │ -
1502 */
│ │ │ -
1503 iterator
│ │ │ -
│ │ │ -
1504 find(const key_type& __x)
│ │ │ -
1505 { return _M_h.find(__x); }
│ │ │ -
│ │ │ -
1506
│ │ │ -
1507#if __cplusplus > 201703L
│ │ │ -
1508 template<typename _Kt>
│ │ │ -
1509 auto
│ │ │ -
│ │ │ -
1510 find(const _Kt& __x)
│ │ │ -
1511 -> decltype(_M_h._M_find_tr(__x))
│ │ │ -
1512 { return _M_h._M_find_tr(__x); }
│ │ │ -
│ │ │ -
1513#endif
│ │ │ -
1514
│ │ │ - │ │ │ -
│ │ │ -
1516 find(const key_type& __x) const
│ │ │ -
1517 { return _M_h.find(__x); }
│ │ │ -
│ │ │ -
1518
│ │ │ -
1519#if __cplusplus > 201703L
│ │ │ -
1520 template<typename _Kt>
│ │ │ -
1521 auto
│ │ │ -
│ │ │ -
1522 find(const _Kt& __x) const
│ │ │ -
1523 -> decltype(_M_h._M_find_tr(__x))
│ │ │ -
1524 { return _M_h._M_find_tr(__x); }
│ │ │ -
│ │ │ -
1525#endif
│ │ │ -
1526 ///@}
│ │ │ -
1527
│ │ │ -
1528 ///@{
│ │ │ -
1529 /**
│ │ │ -
1530 * @brief Finds the number of elements.
│ │ │ -
1531 * @param __x Element to located.
│ │ │ -
1532 * @return Number of elements with specified key.
│ │ │ -
1533 */
│ │ │ -
1534 size_type
│ │ │ -
│ │ │ -
1535 count(const key_type& __x) const
│ │ │ -
1536 { return _M_h.count(__x); }
│ │ │ -
│ │ │ -
1537
│ │ │ -
1538#if __cplusplus > 201703L
│ │ │ -
1539 template<typename _Kt>
│ │ │ -
1540 auto
│ │ │ -
│ │ │ -
1541 count(const _Kt& __x) const -> decltype(_M_h._M_count_tr(__x))
│ │ │ -
1542 { return _M_h._M_count_tr(__x); }
│ │ │ -
│ │ │ -
1543#endif
│ │ │ -
1544 ///@}
│ │ │ -
1545
│ │ │ -
1546#if __cplusplus > 201703L
│ │ │ -
1547 ///@{
│ │ │ -
1548 /**
│ │ │ -
1549 * @brief Finds whether an element with the given key exists.
│ │ │ -
1550 * @param __x Key of elements to be located.
│ │ │ -
1551 * @return True if there is any element with the specified key.
│ │ │ -
1552 */
│ │ │ -
1553 bool
│ │ │ -
│ │ │ -
1554 contains(const key_type& __x) const
│ │ │ -
1555 { return _M_h.find(__x) != _M_h.end(); }
│ │ │ -
│ │ │ -
1556
│ │ │ -
1557 template<typename _Kt>
│ │ │ -
1558 auto
│ │ │ -
│ │ │ -
1559 contains(const _Kt& __x) const
│ │ │ -
1560 -> decltype(_M_h._M_find_tr(__x), void(), true)
│ │ │ -
1561 { return _M_h._M_find_tr(__x) != _M_h.end(); }
│ │ │ -
│ │ │ -
1562 ///@}
│ │ │ -
1563#endif
│ │ │ -
1564
│ │ │ -
1565 ///@{
│ │ │ -
1566 /**
│ │ │ -
1567 * @brief Finds a subsequence matching given key.
│ │ │ -
1568 * @param __x Key to be located.
│ │ │ -
1569 * @return Pair of iterators that possibly points to the subsequence
│ │ │ -
1570 * matching given key.
│ │ │ -
1571 */
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
1574 { return _M_h.equal_range(__x); }
│ │ │ -
│ │ │ -
1575
│ │ │ -
1576#if __cplusplus > 201703L
│ │ │ -
1577 template<typename _Kt>
│ │ │ -
1578 auto
│ │ │ -
│ │ │ -
1579 equal_range(const _Kt& __x)
│ │ │ -
1580 -> decltype(_M_h._M_equal_range_tr(__x))
│ │ │ -
1581 { return _M_h._M_equal_range_tr(__x); }
│ │ │ -
│ │ │ -
1582#endif
│ │ │ -
1583
│ │ │ - │ │ │ -
│ │ │ -
1585 equal_range(const key_type& __x) const
│ │ │ -
1586 { return _M_h.equal_range(__x); }
│ │ │ -
│ │ │ -
1587
│ │ │ -
1588#if __cplusplus > 201703L
│ │ │ -
1589 template<typename _Kt>
│ │ │ -
1590 auto
│ │ │ -
│ │ │ -
1591 equal_range(const _Kt& __x) const
│ │ │ -
1592 -> decltype(_M_h._M_equal_range_tr(__x))
│ │ │ -
1593 { return _M_h._M_equal_range_tr(__x); }
│ │ │ -
│ │ │ -
1594#endif
│ │ │ -
1595 ///@}
│ │ │ -
1596
│ │ │ -
1597 // bucket interface.
│ │ │ -
1598
│ │ │ -
1599 /// Returns the number of buckets of the %unordered_multiset.
│ │ │ -
1600 size_type
│ │ │ -
│ │ │ -
1601 bucket_count() const noexcept
│ │ │ -
1602 { return _M_h.bucket_count(); }
│ │ │ -
│ │ │ -
1603
│ │ │ -
1604 /// Returns the maximum number of buckets of the %unordered_multiset.
│ │ │ -
1605 size_type
│ │ │ -
│ │ │ -
1606 max_bucket_count() const noexcept
│ │ │ -
1607 { return _M_h.max_bucket_count(); }
│ │ │ -
│ │ │ -
1608
│ │ │ -
1609 /*
│ │ │ -
1610 * @brief Returns the number of elements in a given bucket.
│ │ │ -
1611 * @param __n A bucket index.
│ │ │ -
1612 * @return The number of elements in the bucket.
│ │ │ -
1613 */
│ │ │ -
1614 size_type
│ │ │ -
1615 bucket_size(size_type __n) const
│ │ │ -
1616 { return _M_h.bucket_size(__n); }
│ │ │ -
1617
│ │ │ -
1618 /*
│ │ │ -
1619 * @brief Returns the bucket index of a given element.
│ │ │ -
1620 * @param __key A key instance.
│ │ │ -
1621 * @return The key bucket index.
│ │ │ -
1622 */
│ │ │ -
1623 size_type
│ │ │ -
1624 bucket(const key_type& __key) const
│ │ │ -
1625 { return _M_h.bucket(__key); }
│ │ │ -
1626
│ │ │ -
1627 ///@{
│ │ │ -
1628 /**
│ │ │ -
1629 * @brief Returns a read-only (constant) iterator pointing to the first
│ │ │ -
1630 * bucket element.
│ │ │ -
1631 * @param __n The bucket index.
│ │ │ -
1632 * @return A read-only local iterator.
│ │ │ -
1633 */
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
1636 { return _M_h.begin(__n); }
│ │ │ -
│ │ │ -
1637
│ │ │ - │ │ │ -
│ │ │ -
1639 begin(size_type __n) const
│ │ │ -
1640 { return _M_h.begin(__n); }
│ │ │ -
│ │ │ -
1641
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
1644 { return _M_h.cbegin(__n); }
│ │ │ -
│ │ │ -
1645 ///@}
│ │ │ -
1646
│ │ │ -
1647 ///@{
│ │ │ -
1648 /**
│ │ │ -
1649 * @brief Returns a read-only (constant) iterator pointing to one past
│ │ │ -
1650 * the last bucket elements.
│ │ │ -
1651 * @param __n The bucket index.
│ │ │ -
1652 * @return A read-only local iterator.
│ │ │ -
1653 */
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
1656 { return _M_h.end(__n); }
│ │ │ -
│ │ │ -
1657
│ │ │ - │ │ │ -
│ │ │ -
1659 end(size_type __n) const
│ │ │ -
1660 { return _M_h.end(__n); }
│ │ │ -
│ │ │ -
1661
│ │ │ - │ │ │ -
│ │ │ -
1663 cend(size_type __n) const
│ │ │ -
1664 { return _M_h.cend(__n); }
│ │ │ -
│ │ │ -
1665 ///@}
│ │ │ -
1666
│ │ │ -
1667 // hash policy.
│ │ │ -
1668
│ │ │ -
1669 /// Returns the average number of elements per bucket.
│ │ │ -
1670 float
│ │ │ -
│ │ │ -
1671 load_factor() const noexcept
│ │ │ -
1672 { return _M_h.load_factor(); }
│ │ │ -
│ │ │ -
1673
│ │ │ -
1674 /// Returns a positive number that the %unordered_multiset tries to keep the
│ │ │ -
1675 /// load factor less than or equal to.
│ │ │ -
1676 float
│ │ │ -
│ │ │ -
1677 max_load_factor() const noexcept
│ │ │ -
1678 { return _M_h.max_load_factor(); }
│ │ │ -
│ │ │ -
1679
│ │ │ -
1680 /**
│ │ │ -
1681 * @brief Change the %unordered_multiset maximum load factor.
│ │ │ -
1682 * @param __z The new maximum load factor.
│ │ │ -
1683 */
│ │ │ -
1684 void
│ │ │ -
│ │ │ - │ │ │ -
1686 { _M_h.max_load_factor(__z); }
│ │ │ -
│ │ │ -
1687
│ │ │ -
1688 /**
│ │ │ -
1689 * @brief May rehash the %unordered_multiset.
│ │ │ -
1690 * @param __n The new number of buckets.
│ │ │ -
1691 *
│ │ │ -
1692 * Rehash will occur only if the new number of buckets respect the
│ │ │ -
1693 * %unordered_multiset maximum load factor.
│ │ │ -
1694 */
│ │ │ -
1695 void
│ │ │ -
│ │ │ - │ │ │ -
1697 { _M_h.rehash(__n); }
│ │ │ -
│ │ │ -
1698
│ │ │ -
1699 /**
│ │ │ -
1700 * @brief Prepare the %unordered_multiset for a specified number of
│ │ │ -
1701 * elements.
│ │ │ -
1702 * @param __n Number of elements required.
│ │ │ -
1703 *
│ │ │ -
1704 * Same as rehash(ceil(n / max_load_factor())).
│ │ │ -
1705 */
│ │ │ -
1706 void
│ │ │ -
│ │ │ - │ │ │ -
1708 { _M_h.reserve(__n); }
│ │ │ -
│ │ │ -
1709
│ │ │ -
1710 template<typename _Value1, typename _Hash1, typename _Pred1,
│ │ │ -
1711 typename _Alloc1>
│ │ │ -
1712 friend bool
│ │ │ - │ │ │ - │ │ │ -
1715 };
│ │ │ -
│ │ │ -
1716
│ │ │ -
1717
│ │ │ -
1718#if __cpp_deduction_guides >= 201606
│ │ │ -
1719
│ │ │ -
1720 template<typename _InputIterator,
│ │ │ -
1721 typename _Hash =
│ │ │ -
1722 hash<typename iterator_traits<_InputIterator>::value_type>,
│ │ │ -
1723 typename _Pred =
│ │ │ -
1724 equal_to<typename iterator_traits<_InputIterator>::value_type>,
│ │ │ -
1725 typename _Allocator =
│ │ │ -
1726 allocator<typename iterator_traits<_InputIterator>::value_type>,
│ │ │ -
1727 typename = _RequireInputIter<_InputIterator>,
│ │ │ -
1728 typename = _RequireNotAllocatorOrIntegral<_Hash>,
│ │ │ -
1729 typename = _RequireNotAllocator<_Pred>,
│ │ │ -
1730 typename = _RequireAllocator<_Allocator>>
│ │ │ -
1731 unordered_multiset(_InputIterator, _InputIterator,
│ │ │ - │ │ │ -
1733 _Hash = _Hash(), _Pred = _Pred(),
│ │ │ -
1734 _Allocator = _Allocator())
│ │ │ -
1735 -> unordered_multiset<typename iterator_traits<_InputIterator>::value_type,
│ │ │ -
1736 _Hash, _Pred, _Allocator>;
│ │ │ -
1737
│ │ │ -
1738 template<typename _Tp, typename _Hash = hash<_Tp>,
│ │ │ -
1739 typename _Pred = equal_to<_Tp>,
│ │ │ -
1740 typename _Allocator = allocator<_Tp>,
│ │ │ -
1741 typename = _RequireNotAllocatorOrIntegral<_Hash>,
│ │ │ -
1742 typename = _RequireNotAllocator<_Pred>,
│ │ │ -
1743 typename = _RequireAllocator<_Allocator>>
│ │ │ -
1744 unordered_multiset(initializer_list<_Tp>,
│ │ │ - │ │ │ -
1746 _Hash = _Hash(), _Pred = _Pred(),
│ │ │ -
1747 _Allocator = _Allocator())
│ │ │ -
1748 -> unordered_multiset<_Tp, _Hash, _Pred, _Allocator>;
│ │ │ -
1749
│ │ │ -
1750 template<typename _InputIterator, typename _Allocator,
│ │ │ -
1751 typename = _RequireInputIter<_InputIterator>,
│ │ │ -
1752 typename = _RequireAllocator<_Allocator>>
│ │ │ -
1753 unordered_multiset(_InputIterator, _InputIterator,
│ │ │ - │ │ │ -
1755 -> unordered_multiset<typename iterator_traits<_InputIterator>::value_type,
│ │ │ -
1756 hash<typename
│ │ │ -
1757 iterator_traits<_InputIterator>::value_type>,
│ │ │ -
1758 equal_to<typename
│ │ │ -
1759 iterator_traits<_InputIterator>::value_type>,
│ │ │ -
1760 _Allocator>;
│ │ │ -
1761
│ │ │ -
1762 template<typename _InputIterator, typename _Hash, typename _Allocator,
│ │ │ -
1763 typename = _RequireInputIter<_InputIterator>,
│ │ │ -
1764 typename = _RequireNotAllocatorOrIntegral<_Hash>,
│ │ │ -
1765 typename = _RequireAllocator<_Allocator>>
│ │ │ -
1766 unordered_multiset(_InputIterator, _InputIterator,
│ │ │ - │ │ │ -
1768 _Hash, _Allocator)
│ │ │ -
1769 -> unordered_multiset<typename
│ │ │ -
1770 iterator_traits<_InputIterator>::value_type,
│ │ │ -
1771 _Hash,
│ │ │ -
1772 equal_to<
│ │ │ -
1773 typename
│ │ │ -
1774 iterator_traits<_InputIterator>::value_type>,
│ │ │ -
1775 _Allocator>;
│ │ │ -
1776
│ │ │ -
1777 template<typename _Tp, typename _Allocator,
│ │ │ -
1778 typename = _RequireAllocator<_Allocator>>
│ │ │ -
1779 unordered_multiset(initializer_list<_Tp>,
│ │ │ - │ │ │ -
1781 -> unordered_multiset<_Tp, hash<_Tp>, equal_to<_Tp>, _Allocator>;
│ │ │ -
1782
│ │ │ -
1783 template<typename _Tp, typename _Hash, typename _Allocator,
│ │ │ -
1784 typename = _RequireNotAllocatorOrIntegral<_Hash>,
│ │ │ -
1785 typename = _RequireAllocator<_Allocator>>
│ │ │ -
1786 unordered_multiset(initializer_list<_Tp>,
│ │ │ -
1787 unordered_multiset<int>::size_type, _Hash, _Allocator)
│ │ │ -
1788 -> unordered_multiset<_Tp, _Hash, equal_to<_Tp>, _Allocator>;
│ │ │ -
1789
│ │ │ -
1790#endif
│ │ │ -
1791
│ │ │ -
1792 template<class _Value, class _Hash, class _Pred, class _Alloc>
│ │ │ -
1793 inline void
│ │ │ -
1794 swap(unordered_set<_Value, _Hash, _Pred, _Alloc>& __x,
│ │ │ -
1795 unordered_set<_Value, _Hash, _Pred, _Alloc>& __y)
│ │ │ -
1796 noexcept(noexcept(__x.swap(__y)))
│ │ │ -
1797 { __x.swap(__y); }
│ │ │ -
1798
│ │ │ -
1799 template<class _Value, class _Hash, class _Pred, class _Alloc>
│ │ │ -
1800 inline void
│ │ │ -
1801 swap(unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x,
│ │ │ -
1802 unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __y)
│ │ │ -
1803 noexcept(noexcept(__x.swap(__y)))
│ │ │ -
1804 { __x.swap(__y); }
│ │ │ -
1805
│ │ │ -
1806 template<class _Value, class _Hash, class _Pred, class _Alloc>
│ │ │ -
1807 inline bool
│ │ │ -
1808 operator==(const unordered_set<_Value, _Hash, _Pred, _Alloc>& __x,
│ │ │ -
1809 const unordered_set<_Value, _Hash, _Pred, _Alloc>& __y)
│ │ │ -
1810 { return __x._M_h._M_equal(__y._M_h); }
│ │ │ -
1811
│ │ │ -
1812#if __cpp_impl_three_way_comparison < 201907L
│ │ │ -
1813 template<class _Value, class _Hash, class _Pred, class _Alloc>
│ │ │ -
1814 inline bool
│ │ │ -
1815 operator!=(const unordered_set<_Value, _Hash, _Pred, _Alloc>& __x,
│ │ │ -
1816 const unordered_set<_Value, _Hash, _Pred, _Alloc>& __y)
│ │ │ -
1817 { return !(__x == __y); }
│ │ │ -
1818#endif
│ │ │ -
1819
│ │ │ -
1820 template<class _Value, class _Hash, class _Pred, class _Alloc>
│ │ │ -
1821 inline bool
│ │ │ -
1822 operator==(const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x,
│ │ │ -
1823 const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __y)
│ │ │ -
1824 { return __x._M_h._M_equal(__y._M_h); }
│ │ │ -
1825
│ │ │ -
1826#if __cpp_impl_three_way_comparison < 201907L
│ │ │ -
1827 template<class _Value, class _Hash, class _Pred, class _Alloc>
│ │ │ -
1828 inline bool
│ │ │ -
1829 operator!=(const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x,
│ │ │ -
1830 const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __y)
│ │ │ -
1831 { return !(__x == __y); }
│ │ │ -
1832#endif
│ │ │ -
1833
│ │ │ -
1834_GLIBCXX_END_NAMESPACE_CONTAINER
│ │ │ -
1835
│ │ │ -
1836#if __cplusplus > 201402L
│ │ │ -
1837 // Allow std::unordered_set access to internals of compatible sets.
│ │ │ -
1838 template<typename _Val, typename _Hash1, typename _Eq1, typename _Alloc,
│ │ │ -
1839 typename _Hash2, typename _Eq2>
│ │ │ -
1840 struct _Hash_merge_helper<
│ │ │ -
1841 _GLIBCXX_STD_C::unordered_set<_Val, _Hash1, _Eq1, _Alloc>, _Hash2, _Eq2>
│ │ │ -
1842 {
│ │ │ -
1843 private:
│ │ │ -
1844 template<typename... _Tp>
│ │ │ -
1845 using unordered_set = _GLIBCXX_STD_C::unordered_set<_Tp...>;
│ │ │ -
1846 template<typename... _Tp>
│ │ │ -
1847 using unordered_multiset = _GLIBCXX_STD_C::unordered_multiset<_Tp...>;
│ │ │ -
1848
│ │ │ -
1849 friend unordered_set<_Val, _Hash1, _Eq1, _Alloc>;
│ │ │ -
1850
│ │ │ -
1851 static auto&
│ │ │ -
1852 _S_get_table(unordered_set<_Val, _Hash2, _Eq2, _Alloc>& __set)
│ │ │ -
1853 { return __set._M_h; }
│ │ │ -
1854
│ │ │ -
1855 static auto&
│ │ │ -
1856 _S_get_table(unordered_multiset<_Val, _Hash2, _Eq2, _Alloc>& __set)
│ │ │ -
1857 { return __set._M_h; }
│ │ │ -
1858 };
│ │ │ -
1859
│ │ │ -
1860 // Allow std::unordered_multiset access to internals of compatible sets.
│ │ │ -
1861 template<typename _Val, typename _Hash1, typename _Eq1, typename _Alloc,
│ │ │ -
1862 typename _Hash2, typename _Eq2>
│ │ │ -
1863 struct _Hash_merge_helper<
│ │ │ -
1864 _GLIBCXX_STD_C::unordered_multiset<_Val, _Hash1, _Eq1, _Alloc>,
│ │ │ -
1865 _Hash2, _Eq2>
│ │ │ -
1866 {
│ │ │ -
1867 private:
│ │ │ -
1868 template<typename... _Tp>
│ │ │ -
1869 using unordered_set = _GLIBCXX_STD_C::unordered_set<_Tp...>;
│ │ │ -
1870 template<typename... _Tp>
│ │ │ -
1871 using unordered_multiset = _GLIBCXX_STD_C::unordered_multiset<_Tp...>;
│ │ │ -
1872
│ │ │ -
1873 friend unordered_multiset<_Val, _Hash1, _Eq1, _Alloc>;
│ │ │ -
1874
│ │ │ -
1875 static auto&
│ │ │ -
1876 _S_get_table(unordered_set<_Val, _Hash2, _Eq2, _Alloc>& __set)
│ │ │ -
1877 { return __set._M_h; }
│ │ │ -
1878
│ │ │ -
1879 static auto&
│ │ │ -
1880 _S_get_table(unordered_multiset<_Val, _Hash2, _Eq2, _Alloc>& __set)
│ │ │ -
1881 { return __set._M_h; }
│ │ │ -
1882 };
│ │ │ -
1883#endif // C++17
│ │ │ -
1884
│ │ │ -
1885_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ -
1886} // namespace std
│ │ │ -
1887
│ │ │ -
1888#endif /* _UNORDERED_SET_H */
│ │ │ -
constexpr std::remove_reference< _Tp >::type && move(_Tp &&__t) noexcept
Convert a value to an rvalue.
Definition move.h:104
│ │ │ -
void swap(any &__x, any &__y) noexcept
Exchange the states of two any objects.
Definition any:429
│ │ │ +
264#pragma GCC diagnostic pop
│ │ │ +
265
│ │ │ +
266 /// @} group iterators
│ │ │ +
267
│ │ │ +
268_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ +
269} // namespace
│ │ │ +
270
│ │ │ +
271#endif
│ │ │ + │ │ │ +
constexpr _Tp * __addressof(_Tp &__r) noexcept
Same as C++11 std::addressof.
Definition move.h:49
│ │ │
ISO C++ entities toplevel namespace is std.
│ │ │ -
__detail::_Hashtable_traits< _Cache, true, true > __uset_traits
Base types for unordered_set.
│ │ │ -
__detail::_Hashtable_traits< _Cache, true, false > __umset_traits
Base types for unordered_multiset.
│ │ │ -
Common iterator class.
│ │ │ -
A standard container composed of equivalent keys (possibly containing multiple of each key value) in ...
│ │ │ -
auto find(const _Kt &__x) const -> decltype(_M_h._M_find_tr(__x))
Tries to locate an element in an unordered_multiset.
│ │ │ -
iterator begin() noexcept
│ │ │ -
auto find(const _Kt &__x) -> decltype(_M_h._M_find_tr(__x))
Tries to locate an element in an unordered_multiset.
│ │ │ -
iterator insert(const_iterator __hint, const value_type &__x)
Inserts an element into the unordered_multiset.
│ │ │ -
_Hashtable::difference_type difference_type
Iterator-related typedefs.
│ │ │ -
void insert(initializer_list< value_type > __l)
Inserts a list of elements into the unordered_multiset.
│ │ │ -
_Hashtable::pointer pointer
Iterator-related typedefs.
│ │ │ -
bool contains(const key_type &__x) const
Finds whether an element with the given key exists.
│ │ │ -
void rehash(size_type __n)
May rehash the unordered_multiset.
│ │ │ -
local_iterator begin(size_type __n)
Returns a read-only (constant) iterator pointing to the first bucket element.
│ │ │ -
size_type bucket_count() const noexcept
Returns the number of buckets of the unordered_multiset.
│ │ │ - │ │ │ -
float max_load_factor() const noexcept
Returns a positive number that the unordered_multiset tries to keep the load factor less than or equa...
│ │ │ -
bool empty() const noexcept
Returns true if the unordered_multiset is empty.
│ │ │ -
const_iterator cend() const noexcept
│ │ │ -
_Hashtable::local_iterator local_iterator
Iterator-related typedefs.
│ │ │ -
node_type extract(const key_type &__key)
Extract a node.
│ │ │ -
const_local_iterator begin(size_type __n) const
Returns a read-only (constant) iterator pointing to the first bucket element.
│ │ │ -
iterator emplace(_Args &&... __args)
Builds and insert an element into the unordered_multiset.
│ │ │ -
unordered_multiset(_InputIterator __first, _InputIterator __last, size_type __n=0, const hasher &__hf=hasher(), const key_equal &__eql=key_equal(), const allocator_type &__a=allocator_type())
Builds an unordered_multiset from a range.
│ │ │ -
_Hashtable::const_iterator const_iterator
Iterator-related typedefs.
│ │ │ -
unordered_multiset(const allocator_type &__a)
Creates an unordered_multiset with no elements.
│ │ │ -
_Hashtable::allocator_type allocator_type
Public typedefs.
│ │ │ -
const_local_iterator end(size_type __n) const
Returns a read-only (constant) iterator pointing to one past the last bucket elements.
│ │ │ -
iterator find(const key_type &__x)
Tries to locate an element in an unordered_multiset.
│ │ │ -
_Hashtable::value_type value_type
Public typedefs.
│ │ │ -
unordered_multiset & operator=(unordered_multiset &&)=default
Move assignment operator.
│ │ │ -
float load_factor() const noexcept
Returns the average number of elements per bucket.
│ │ │ -
unordered_multiset()=default
Default constructor.
│ │ │ -
iterator insert(const_iterator __hint, node_type &&__nh)
Re-insert an extracted node.
│ │ │ -
_Hashtable::size_type size_type
Iterator-related typedefs.
│ │ │ -
auto equal_range(const _Kt &__x) -> decltype(_M_h._M_equal_range_tr(__x))
Finds a subsequence matching given key.
│ │ │ -
_Hashtable::key_type key_type
Public typedefs.
│ │ │ -
unordered_multiset & operator=(const unordered_multiset &)=default
Copy assignment operator.
│ │ │ -
hasher hash_function() const
Returns the hash functor object with which the unordered_multiset was constructed.
│ │ │ -
unordered_multiset(initializer_list< value_type > __l, size_type __n=0, const hasher &__hf=hasher(), const key_equal &__eql=key_equal(), const allocator_type &__a=allocator_type())
Builds an unordered_multiset from an initializer_list.
│ │ │ -
auto contains(const _Kt &__x) const -> decltype(_M_h._M_find_tr(__x), void(), true)
Finds whether an element with the given key exists.
│ │ │ -
auto count(const _Kt &__x) const -> decltype(_M_h._M_count_tr(__x))
Finds the number of elements.
│ │ │ -
size_type count(const key_type &__x) const
Finds the number of elements.
│ │ │ -
iterator erase(const_iterator __position)
Erases an element from an unordered_multiset.
│ │ │ -
unordered_multiset(unordered_multiset &&)=default
Move constructor.
│ │ │ -
_Hashtable::reference reference
Iterator-related typedefs.
│ │ │ -
iterator end() noexcept
│ │ │ -
iterator emplace_hint(const_iterator __pos, _Args &&... __args)
Inserts an element into the unordered_multiset.
│ │ │ -
void swap(unordered_multiset &__x) noexcept(noexcept(_M_h.swap(__x._M_h)))
Swaps data with another unordered_multiset.
│ │ │ -
const_iterator begin() const noexcept
│ │ │ -
iterator erase(const_iterator __first, const_iterator __last)
Erases a [__first,__last) range of elements from an unordered_multiset.
│ │ │ -
const_iterator cbegin() const noexcept
│ │ │ -
void insert(_InputIterator __first, _InputIterator __last)
A template function that inserts a range of elements.
│ │ │ -
std::pair< const_iterator, const_iterator > equal_range(const key_type &__x) const
Finds a subsequence matching given key.
│ │ │ -
key_equal key_eq() const
Returns the key comparison object with which the unordered_multiset was constructed.
│ │ │ -
_Hashtable::const_pointer const_pointer
Iterator-related typedefs.
│ │ │ -
std::pair< iterator, iterator > equal_range(const key_type &__x)
Finds a subsequence matching given key.
│ │ │ -
iterator insert(value_type &&__x)
Inserts an element into the unordered_multiset.
│ │ │ -
iterator insert(const value_type &__x)
Inserts an element into the unordered_multiset.
│ │ │ -
const_iterator end() const noexcept
│ │ │ -
void reserve(size_type __n)
Prepare the unordered_multiset for a specified number of elements.
│ │ │ -
iterator insert(const_iterator __hint, value_type &&__x)
Inserts an element into the unordered_multiset.
│ │ │ -
_Hashtable::const_reference const_reference
Iterator-related typedefs.
│ │ │ -
iterator erase(iterator __position)
Erases an element from an unordered_multiset.
│ │ │ -
const_local_iterator cend(size_type __n) const
Returns a read-only (constant) iterator pointing to one past the last bucket elements.
│ │ │ -
size_type max_bucket_count() const noexcept
Returns the maximum number of buckets of the unordered_multiset.
│ │ │ -
iterator insert(node_type &&__nh)
Re-insert an extracted node.
│ │ │ -
_Hashtable::hasher hasher
Public typedefs.
│ │ │ -
unordered_multiset(size_type __n, const hasher &__hf=hasher(), const key_equal &__eql=key_equal(), const allocator_type &__a=allocator_type())
Default constructor creates no elements.
│ │ │ -
unordered_multiset & operator=(initializer_list< value_type > __l)
Unordered_multiset list assignment operator.
│ │ │ -
size_type size() const noexcept
Returns the size of the unordered_multiset.
│ │ │ -
_Hashtable::iterator iterator
Iterator-related typedefs.
│ │ │ -
local_iterator end(size_type __n)
Returns a read-only (constant) iterator pointing to one past the last bucket elements.
│ │ │ -
auto equal_range(const _Kt &__x) const -> decltype(_M_h._M_equal_range_tr(__x))
Finds a subsequence matching given key.
│ │ │ -
node_type extract(const_iterator __pos)
Extract a node.
│ │ │ -
size_type max_size() const noexcept
Returns the maximum size of the unordered_multiset.
│ │ │ -
const_local_iterator cbegin(size_type __n) const
Returns a read-only (constant) iterator pointing to the first bucket element.
│ │ │ -
unordered_multiset(const unordered_multiset &)=default
Copy constructor.
│ │ │ -
_Hashtable::const_local_iterator const_local_iterator
Iterator-related typedefs.
│ │ │ -
size_type erase(const key_type &__x)
Erases elements according to the provided key.
│ │ │ -
const_iterator find(const key_type &__x) const
Tries to locate an element in an unordered_multiset.
│ │ │ -
allocator_type get_allocator() const noexcept
Returns the allocator object used by the unordered_multiset.
│ │ │ -
_Hashtable::key_equal key_equal
Public typedefs.
│ │ │ -
void max_load_factor(float __z)
Change the unordered_multiset maximum load factor.
│ │ │ -
A standard container composed of unique keys (containing at most one of each key value) in which the ...
│ │ │ -
std::pair< iterator, bool > insert(const value_type &__x)
Attempts to insert an element into the unordered_set.
│ │ │ -
_Hashtable::iterator iterator
Iterator-related typedefs.
│ │ │ -
unordered_set(initializer_list< value_type > __l, size_type __n=0, const hasher &__hf=hasher(), const key_equal &__eql=key_equal(), const allocator_type &__a=allocator_type())
Builds an unordered_set from an initializer_list.
│ │ │ -
void max_load_factor(float __z)
Change the unordered_set maximum load factor.
│ │ │ -
_Hashtable::reference reference
Iterator-related typedefs.
│ │ │ -
const_local_iterator end(size_type __n) const
Returns a read-only (constant) iterator pointing to one past the last bucket elements.
│ │ │ -
_Hashtable::value_type value_type
Public typedefs.
│ │ │ -
const_iterator cend() const noexcept
│ │ │ -
auto find(const _Kt &__k) -> decltype(_M_h._M_find_tr(__k))
Tries to locate an element in an unordered_set.
│ │ │ -
const_iterator find(const key_type &__x) const
Tries to locate an element in an unordered_set.
│ │ │ -
_Hashtable::key_type key_type
Public typedefs.
│ │ │ -
size_type count(const key_type &__x) const
Finds the number of elements.
│ │ │ -
const_local_iterator begin(size_type __n) const
Returns a read-only (constant) iterator pointing to the first bucket element.
│ │ │ -
auto equal_range(const _Kt &__k) -> decltype(_M_h._M_equal_range_tr(__k))
Finds a subsequence matching given key.
│ │ │ -
const_local_iterator cbegin(size_type __n) const
Returns a read-only (constant) iterator pointing to the first bucket element.
│ │ │ -
auto count(const _Kt &__k) const -> decltype(_M_h._M_count_tr(__k))
Finds the number of elements.
│ │ │ -
const_iterator begin() const noexcept
│ │ │ -
_Hashtable::hasher hasher
Public typedefs.
│ │ │ -
_Hashtable::local_iterator local_iterator
Iterator-related typedefs.
│ │ │ -
insert_return_type insert(node_type &&__nh)
Re-insert an extracted node.
│ │ │ -
_Hashtable::size_type size_type
Iterator-related typedefs.
│ │ │ -
const_iterator cbegin() const noexcept
│ │ │ -
bool empty() const noexcept
Returns true if the unordered_set is empty.
│ │ │ -
unordered_set & operator=(initializer_list< value_type > __l)
Unordered_set list assignment operator.
│ │ │ -
iterator erase(iterator __position)
Erases an element from an unordered_set.
│ │ │ -
unordered_set(unordered_set &&)=default
Move constructor.
│ │ │ -
unordered_set(const allocator_type &__a)
Creates an unordered_set with no elements.
│ │ │ -
const_local_iterator cend(size_type __n) const
Returns a read-only (constant) iterator pointing to one past the last bucket elements.
│ │ │ -
auto contains(const _Kt &__k) const -> decltype(_M_h._M_find_tr(__k), void(), true)
Finds whether an element with the given key exists.
│ │ │ -
_Hashtable::const_pointer const_pointer
Iterator-related typedefs.
│ │ │ -
std::pair< const_iterator, const_iterator > equal_range(const key_type &__x) const
Finds a subsequence matching given key.
│ │ │ -
void swap(unordered_set &__x) noexcept(noexcept(_M_h.swap(__x._M_h)))
Swaps data with another unordered_set.
│ │ │ -
iterator insert(const_iterator __hint, const value_type &__x)
Attempts to insert an element into the unordered_set.
│ │ │ -
std::pair< iterator, bool > insert(value_type &&__x)
Attempts to insert an element into the unordered_set.
│ │ │ -
float load_factor() const noexcept
Returns the average number of elements per bucket.
│ │ │ -
void rehash(size_type __n)
May rehash the unordered_set.
│ │ │ -
local_iterator end(size_type __n)
Returns a read-only (constant) iterator pointing to one past the last bucket elements.
│ │ │ -
_Hashtable::key_equal key_equal
Public typedefs.
│ │ │ -
size_type size() const noexcept
Returns the size of the unordered_set.
│ │ │ -
iterator insert(const_iterator, node_type &&__nh)
Re-insert an extracted node.
│ │ │ -
_Hashtable::const_iterator const_iterator
Iterator-related typedefs.
│ │ │ -
_Hashtable::difference_type difference_type
Iterator-related typedefs.
│ │ │ -
_Hashtable::const_reference const_reference
Iterator-related typedefs.
│ │ │ -
hasher hash_function() const
Returns the hash functor object with which the unordered_set was constructed.
│ │ │ -
unordered_set(const unordered_set &)=default
Copy constructor.
│ │ │ -
std::pair< iterator, iterator > equal_range(const key_type &__x)
Finds a subsequence matching given key.
│ │ │ -
auto find(const _Kt &__k) const -> decltype(_M_h._M_find_tr(__k))
Tries to locate an element in an unordered_set.
│ │ │ -
iterator emplace_hint(const_iterator __pos, _Args &&... __args)
Attempts to insert an element into the unordered_set.
│ │ │ -
key_equal key_eq() const
Returns the key comparison object with which the unordered_set was constructed.
│ │ │ -
_Hashtable::allocator_type allocator_type
Public typedefs.
│ │ │ -
iterator insert(const_iterator __hint, value_type &&__x)
Attempts to insert an element into the unordered_set.
│ │ │ -
const_iterator end() const noexcept
│ │ │ -
iterator end() noexcept
│ │ │ -
node_type extract(const key_type &__key)
Extract a node.
│ │ │ -
local_iterator begin(size_type __n)
Returns a read-only (constant) iterator pointing to the first bucket element.
│ │ │ -
unordered_set()=default
Default constructor.
│ │ │ -
unordered_set & operator=(unordered_set &&)=default
Move assignment operator.
│ │ │ -
void insert(_InputIterator __first, _InputIterator __last)
A template function that attempts to insert a range of elements.
│ │ │ -
float max_load_factor() const noexcept
Returns a positive number that the unordered_set tries to keep the load factor less than or equal to.
│ │ │ -
bool contains(const key_type &__x) const
Finds whether an element with the given key exists.
│ │ │ -
std::pair< iterator, bool > emplace(_Args &&... __args)
Attempts to build and insert an element into the unordered_set.
│ │ │ -
unordered_set & operator=(const unordered_set &)=default
Copy assignment operator.
│ │ │ -
size_type erase(const key_type &__x)
Erases elements according to the provided key.
│ │ │ -
unordered_set(size_type __n, const hasher &__hf=hasher(), const key_equal &__eql=key_equal(), const allocator_type &__a=allocator_type())
Default constructor creates no elements.
│ │ │ -
iterator erase(const_iterator __first, const_iterator __last)
Erases a [__first,__last) range of elements from an unordered_set.
│ │ │ -
iterator erase(const_iterator __position)
Erases an element from an unordered_set.
│ │ │ -
allocator_type get_allocator() const noexcept
Returns the allocator object used by the unordered_set.
│ │ │ -
auto equal_range(const _Kt &__k) const -> decltype(_M_h._M_equal_range_tr(__k))
Finds a subsequence matching given key.
│ │ │ -
_Hashtable::const_local_iterator const_local_iterator
Iterator-related typedefs.
│ │ │ -
void clear() noexcept
│ │ │ -
void insert(initializer_list< value_type > __l)
Attempts to insert a list of elements into the unordered_set.
│ │ │ -
unordered_set(_InputIterator __first, _InputIterator __last, size_type __n=0, const hasher &__hf=hasher(), const key_equal &__eql=key_equal(), const allocator_type &__a=allocator_type())
Builds an unordered_set from a range.
│ │ │ -
size_type bucket_count() const noexcept
Returns the number of buckets of the unordered_set.
│ │ │ -
void reserve(size_type __n)
Prepare the unordered_set for a specified number of elements.
│ │ │ -
node_type extract(const_iterator __pos)
Extract a node.
│ │ │ -
_Hashtable::pointer pointer
Iterator-related typedefs.
│ │ │ -
iterator begin() noexcept
│ │ │ -
iterator find(const key_type &__x)
Tries to locate an element in an unordered_set.
│ │ │ -
size_type max_size() const noexcept
Returns the maximum size of the unordered_set.
│ │ │ -
size_type max_bucket_count() const noexcept
Returns the maximum number of buckets of the unordered_set.
│ │ │ - │ │ │ +
is_nothrow_default_constructible
Definition type_traits:1058
│ │ │ +
is_nothrow_copy_constructible
Definition type_traits:1081
│ │ │ +
Common iterator class.
│ │ │ +
Provides input iterator semantics for streams.
│ │ │ +
istream_iterator(istream_type &__s)
Construct start of input stream iterator.
│ │ │ +
constexpr istream_iterator() noexcept(/*conditional */)
Construct end of input stream iterator.
│ │ │ +
friend bool operator==(const istream_iterator &__x, const istream_iterator &__y) noexcept
Return true if the iterators refer to the same stream, or are both at end-of-stream.
│ │ │ +
Provides output iterator semantics for streams.
│ │ │ +
_CharT char_type
Public typedef.
│ │ │ +
ostream_iterator(ostream_type &__s) noexcept
Construct from an ostream.
│ │ │ +
ostream_iterator(ostream_type &__s, const _CharT *__c) noexcept
│ │ │ +
_Traits traits_type
Public typedef.
│ │ │ +
ostream_iterator & operator=(const _Tp &__value)
Writes value to underlying ostream using operator<<. If constructed with delimiter string,...
│ │ │ +
ptrdiff_t difference_type
Public typedef.
│ │ │ +
basic_ostream< _CharT, _Traits > ostream_type
Public typedef.
│ │ │ +
ostream_iterator(const ostream_iterator &__obj) noexcept
Copy constructor.
│ │ │ + │ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,13 +1,13 @@ │ │ │ │ libstdc++ │ │ │ │ -unordered_set.h │ │ │ │ +stream_iterator.h │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -1// unordered_set implementation -*- C++ -*- │ │ │ │ +1// Stream iterators │ │ │ │ 2 │ │ │ │ -3// Copyright (C) 2010-2022 Free Software Foundation, Inc. │ │ │ │ +3// Copyright (C) 2001-2022 Free Software Foundation, Inc. │ │ │ │ 4// │ │ │ │ 5// This file is part of the GNU ISO C++ Library. This library is free │ │ │ │ 6// software; you can redistribute it and/or modify it under the │ │ │ │ 7// terms of the GNU General Public License as published by the │ │ │ │ 8// Free Software Foundation; either version 3, or (at your option) │ │ │ │ 9// any later version. │ │ │ │ 10 │ │ │ │ @@ -21,2552 +21,327 @@ │ │ │ │ 18// 3.1, as published by the Free Software Foundation. │ │ │ │ 19 │ │ │ │ 20// You should have received a copy of the GNU General Public License and │ │ │ │ 21// a copy of the GCC Runtime Library Exception along with this program; │ │ │ │ 22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see │ │ │ │ 23// . │ │ │ │ 24 │ │ │ │ -25/** @file bits/unordered_set.h │ │ │ │ +25/** @file bits/stream_iterator.h │ │ │ │ 26 * This is an internal header file, included by other library headers. │ │ │ │ -27 * Do not attempt to use it directly. @headername{unordered_set} │ │ │ │ +27 * Do not attempt to use it directly. @headername{iterator} │ │ │ │ 28 */ │ │ │ │ 29 │ │ │ │ -30#ifndef _UNORDERED_SET_H │ │ │ │ -31#define _UNORDERED_SET_H │ │ │ │ +30#ifndef _STREAM_ITERATOR_H │ │ │ │ +31#define _STREAM_ITERATOR_H 1 │ │ │ │ 32 │ │ │ │ -33namespace _s_t_d _GLIBCXX_VISIBILITY(default) │ │ │ │ -34{ │ │ │ │ -35_GLIBCXX_BEGIN_NAMESPACE_VERSION │ │ │ │ -36_GLIBCXX_BEGIN_NAMESPACE_CONTAINER │ │ │ │ -37 │ │ │ │ -38 /// Base types for unordered_set. │ │ │ │ -39 template │ │ │ │ -_4_0 using _____u_s_e_t___t_r_a_i_t_s = __detail::_Hashtable_traits<_Cache, true, true>; │ │ │ │ -41 │ │ │ │ -42 template, │ │ │ │ -44 typename ___P_r_e_d = _s_t_d_:_:_e_q_u_a_l___t_o_<___V_a_l_u_e_>, │ │ │ │ -45 typename _Alloc = _s_t_d_:_:_a_l_l_o_c_a_t_o_r_<___V_a_l_u_e_>, │ │ │ │ -46 typename ___T_r = _____u_s_e_t___t_r_a_i_t_s_<_____c_a_c_h_e___d_e_f_a_u_l_t_<___V_a_l_u_e_,_ ___H_a_s_h_>_:_:_v_a_l_u_e>> │ │ │ │ -47 using _____u_s_e_t___h_a_s_h_t_a_b_l_e = _Hashtable<_Value, _Value, _Alloc, │ │ │ │ -48 __detail::_Identity, ___P_r_e_d, ___H_a_s_h, │ │ │ │ -49 __detail::_Mod_range_hashing, │ │ │ │ -50 __detail::_Default_ranged_hash, │ │ │ │ -51 __detail::_Prime_rehash_policy, ___T_r>; │ │ │ │ -52 │ │ │ │ -53 /// Base types for unordered_multiset. │ │ │ │ -54 template │ │ │ │ -_5_5 using _____u_m_s_e_t___t_r_a_i_t_s = __detail::_Hashtable_traits<_Cache, true, false>; │ │ │ │ -56 │ │ │ │ -57 template, │ │ │ │ -59 typename ___P_r_e_d = _s_t_d_:_:_e_q_u_a_l___t_o_<___V_a_l_u_e_>, │ │ │ │ -60 typename _Alloc = _s_t_d_:_:_a_l_l_o_c_a_t_o_r_<___V_a_l_u_e_>, │ │ │ │ -61 typename ___T_r = _____u_m_s_e_t___t_r_a_i_t_s_<_____c_a_c_h_e___d_e_f_a_u_l_t_<___V_a_l_u_e_,_ ___H_a_s_h_>_:_:_v_a_l_u_e>> │ │ │ │ -62 using _____u_m_s_e_t___h_a_s_h_t_a_b_l_e = _Hashtable<_Value, _Value, _Alloc, │ │ │ │ -63 __detail::_Identity, │ │ │ │ -64 ___P_r_e_d, ___H_a_s_h, │ │ │ │ -65 __detail::_Mod_range_hashing, │ │ │ │ -66 __detail::_Default_ranged_hash, │ │ │ │ -67 __detail::_Prime_rehash_policy, ___T_r>; │ │ │ │ +33#pragma GCC system_header │ │ │ │ +34 │ │ │ │ +35#include <_d_e_b_u_g_/_d_e_b_u_g_._h> │ │ │ │ +36 │ │ │ │ +37namespace _s_t_d _GLIBCXX_VISIBILITY(default) │ │ │ │ +38{ │ │ │ │ +39_GLIBCXX_BEGIN_NAMESPACE_VERSION │ │ │ │ +40 │ │ │ │ +41 /** │ │ │ │ +42 * @addtogroup iterators │ │ │ │ +43 * @{ │ │ │ │ +44 */ │ │ │ │ +45 │ │ │ │ +46// Ignore warnings about std::iterator. │ │ │ │ +47#pragma GCC diagnostic push │ │ │ │ +48#pragma GCC diagnostic ignored "-Wdeprecated-declarations" │ │ │ │ +49 │ │ │ │ +50 /// Provides input iterator semantics for streams. │ │ │ │ +51 template, typename _Dist = ptrdiff_t> │ │ │ │ +_5_3 class _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r │ │ │ │ +54 : public _i_t_e_r_a_t_o_r │ │ │ │ +55 { │ │ │ │ +56 public: │ │ │ │ +57 typedef _CharT char_type; │ │ │ │ +58 typedef _Traits traits_type; │ │ │ │ +59 typedef _b_a_s_i_c___i_s_t_r_e_a_m_<___C_h_a_r_T_,_ ___T_r_a_i_t_s_> _i_s_t_r_e_a_m___t_y_p_e; │ │ │ │ +60 │ │ │ │ +61 private: │ │ │ │ +62 _i_s_t_r_e_a_m___t_y_p_e* _M_stream; │ │ │ │ +63 _Tp _M_value; │ │ │ │ +64 // This bool becomes false at end-of-stream. It should be sufficient to │ │ │ │ +65 // check _M_stream != nullptr instead, but historically we did not set │ │ │ │ +66 // _M_stream to null when reaching the end, so we need to keep this flag. │ │ │ │ +67 bool _M_ok; │ │ │ │ 68 │ │ │ │ -69 template │ │ │ │ -70 class _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t; │ │ │ │ -71 │ │ │ │ -72 /** │ │ │ │ -73 * @brief A standard container composed of unique keys (containing │ │ │ │ -74 * at most one of each key value) in which the elements' keys are │ │ │ │ -75 * the elements themselves. │ │ │ │ -76 * │ │ │ │ -77 * @ingroup unordered_associative_containers │ │ │ │ -78 * @headerfile unordered_set │ │ │ │ -79 * @since C++11 │ │ │ │ -80 * │ │ │ │ -81 * @tparam _Value Type of key objects. │ │ │ │ -82 * @tparam _Hash Hashing function object type, defaults to hash<_Value>. │ │ │ │ -83 │ │ │ │ -84 * @tparam _Pred Predicate function object type, defaults to │ │ │ │ -85 * equal_to<_Value>. │ │ │ │ -86 * │ │ │ │ -87 * @tparam _Alloc Allocator type, defaults to allocator<_Key>. │ │ │ │ -88 * │ │ │ │ -89 * Meets the requirements of a container, and │ │ │ │ -90 * unordered associative container │ │ │ │ -91 * │ │ │ │ -92 * Base is _Hashtable, dispatched at compile time via template │ │ │ │ -93 * alias __uset_hashtable. │ │ │ │ -94 */ │ │ │ │ -95 template, │ │ │ │ -97 typename ___P_r_e_d = _e_q_u_a_l___t_o_<___V_a_l_u_e_>, │ │ │ │ -98 typename _Alloc = _a_l_l_o_c_a_t_o_r_<___V_a_l_u_e_>> │ │ │ │ -_9_9 class _u_n_o_r_d_e_r_e_d___s_e_t │ │ │ │ -100 { │ │ │ │ -101 typedef _____u_s_e_t___h_a_s_h_t_a_b_l_e_<___V_a_l_u_e_,_ ___H_a_s_h_,_ ___P_r_e_d_,_ ___A_l_l_o_c_> ___H_a_s_h_t_a_b_l_e; │ │ │ │ -102 ___H_a_s_h_t_a_b_l_e _M_h; │ │ │ │ -103 │ │ │ │ -104 public: │ │ │ │ -105 // typedefs: │ │ │ │ -106 ///@{ │ │ │ │ -107 /// Public typedefs. │ │ │ │ -_1_0_8 typedef typename _Hashtable::key_type _k_e_y___t_y_p_e; │ │ │ │ -_1_0_9 typedef typename _Hashtable::value_type _v_a_l_u_e___t_y_p_e; │ │ │ │ -_1_1_0 typedef typename _Hashtable::hasher _h_a_s_h_e_r; │ │ │ │ -_1_1_1 typedef typename _Hashtable::key_equal _k_e_y___e_q_u_a_l; │ │ │ │ -_1_1_2 typedef typename _Hashtable::allocator_type _a_l_l_o_c_a_t_o_r___t_y_p_e; │ │ │ │ -113 ///@} │ │ │ │ -114 │ │ │ │ -115 ///@{ │ │ │ │ -116 /// Iterator-related typedefs. │ │ │ │ -_1_1_7 typedef typename _Hashtable::pointer _p_o_i_n_t_e_r; │ │ │ │ -_1_1_8 typedef typename _Hashtable::const_pointer _c_o_n_s_t___p_o_i_n_t_e_r; │ │ │ │ -_1_1_9 typedef typename _Hashtable::reference _r_e_f_e_r_e_n_c_e; │ │ │ │ -_1_2_0 typedef typename _Hashtable::const_reference _c_o_n_s_t___r_e_f_e_r_e_n_c_e; │ │ │ │ -_1_2_1 typedef typename _Hashtable::iterator _i_t_e_r_a_t_o_r; │ │ │ │ -_1_2_2 typedef typename _Hashtable::const_iterator _c_o_n_s_t___i_t_e_r_a_t_o_r; │ │ │ │ -_1_2_3 typedef typename _Hashtable::local_iterator _l_o_c_a_l___i_t_e_r_a_t_o_r; │ │ │ │ -_1_2_4 typedef typename _Hashtable::const_local_iterator _c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r; │ │ │ │ -_1_2_5 typedef typename _Hashtable::size_type _s_i_z_e___t_y_p_e; │ │ │ │ -_1_2_6 typedef typename _Hashtable::difference_type _d_i_f_f_e_r_e_n_c_e___t_y_p_e; │ │ │ │ -127 ///@} │ │ │ │ -128 │ │ │ │ -129#if __cplusplus > 201402L │ │ │ │ -130 using node_type = typename _Hashtable::node_type; │ │ │ │ -131 using insert_return_type = typename _Hashtable::insert_return_type; │ │ │ │ -132#endif │ │ │ │ -133 │ │ │ │ -134 // construct/destroy/copy │ │ │ │ -135 │ │ │ │ -136 /// Default constructor. │ │ │ │ -_1_3_7 _u_n_o_r_d_e_r_e_d___s_e_t() = default; │ │ │ │ -138 │ │ │ │ -139 /** │ │ │ │ -140 * @brief Default constructor creates no elements. │ │ │ │ -141 * @param __n Minimal initial number of buckets. │ │ │ │ -142 * @param __hf A hash functor. │ │ │ │ -143 * @param __eql A key equality functor. │ │ │ │ -144 * @param __a An allocator object. │ │ │ │ -145 */ │ │ │ │ -146 explicit │ │ │ │ -_1_4_7 _u_n_o_r_d_e_r_e_d___s_e_t(_s_i_z_e___t_y_p_e __n, │ │ │ │ -148 const _h_a_s_h_e_r& _____h_f = _h_a_s_h_e_r(), │ │ │ │ -149 const _k_e_y___e_q_u_a_l& _____e_q_l = _k_e_y___e_q_u_a_l(), │ │ │ │ -150 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a = _a_l_l_o_c_a_t_o_r___t_y_p_e()) │ │ │ │ -151 : _M_h(__n, _____h_f, _____e_q_l, __a) │ │ │ │ -152 { } │ │ │ │ +69 public: │ │ │ │ +70 /// Construct end of input stream iterator. │ │ │ │ +_7_1 ___G_L_I_B_C_X_X___C_O_N_S_T_E_X_P_R _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r() │ │ │ │ +72 ___G_L_I_B_C_X_X___N_O_E_X_C_E_P_T___I_F(_i_s___n_o_t_h_r_o_w___d_e_f_a_u_l_t___c_o_n_s_t_r_u_c_t_i_b_l_e<_Tp>::value) │ │ │ │ +73 : _M_stream(0), _M_value(), _M_ok(_f_a_l_s_e) {} │ │ │ │ +74 │ │ │ │ +75 /// Construct start of input stream iterator. │ │ │ │ +_7_6 _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r(_i_s_t_r_e_a_m___t_y_p_e& _____s) │ │ │ │ +77 : _M_stream(_s_t_d::_____a_d_d_r_e_s_s_o_f(_____s)), _M_ok(_t_r_u_e) │ │ │ │ +78 { _M_read(); } │ │ │ │ +79 │ │ │ │ +80 ___G_L_I_B_C_X_X___C_O_N_S_T_E_X_P_R │ │ │ │ +81 _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r(const _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r& _____o_b_j) │ │ │ │ +82 ___G_L_I_B_C_X_X___N_O_E_X_C_E_P_T___I_F(_i_s___n_o_t_h_r_o_w___c_o_p_y___c_o_n_s_t_r_u_c_t_i_b_l_e_<___T_p_>_:_:_v_a_l_u_e) │ │ │ │ +83 : _M_stream(_____o_b_j._M_stream), _M_value(_____o_b_j._M_value), │ │ │ │ +84 _M_ok(_____o_b_j._M_ok) │ │ │ │ +85 { } │ │ │ │ +86 │ │ │ │ +87#if __cplusplus > 201703L && __cpp_lib_concepts │ │ │ │ +88 constexpr │ │ │ │ +89 _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r(default_sentinel_t) │ │ │ │ +90 noexcept(is_nothrow_default_constructible_v<_Tp>) │ │ │ │ +91 : _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r() { } │ │ │ │ +92#endif │ │ │ │ +93 │ │ │ │ +94#if __cplusplus >= 201103L │ │ │ │ +95 _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r& operator=(const _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r&) = default; │ │ │ │ +96 ~istream_iterator() = default; │ │ │ │ +97#endif │ │ │ │ +98 │ │ │ │ +99 _GLIBCXX_NODISCARD │ │ │ │ +100 const _Tp& │ │ │ │ +101 operator*() const _GLIBCXX_NOEXCEPT │ │ │ │ +102 { │ │ │ │ +103 __glibcxx_requires_cond(_M_ok, │ │ │ │ +104 _M_message(__gnu_debug::__msg_deref_istream) │ │ │ │ +105 ._M_iterator(*this)); │ │ │ │ +106 return _M_value; │ │ │ │ +107 } │ │ │ │ +108 │ │ │ │ +109 _GLIBCXX_NODISCARD │ │ │ │ +110 const _Tp* │ │ │ │ +111 operator->() const _GLIBCXX_NOEXCEPT │ │ │ │ +112 { return _s_t_d_:_:_____a_d_d_r_e_s_s_o_f((operator*())); } │ │ │ │ +113 │ │ │ │ +114 _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r& │ │ │ │ +115 operator++() │ │ │ │ +116 { │ │ │ │ +117 __glibcxx_requires_cond(_M_ok, │ │ │ │ +118 _M_message(__gnu_debug::__msg_inc_istream) │ │ │ │ +119 ._M_iterator(*this)); │ │ │ │ +120 _M_read(); │ │ │ │ +121 return *this; │ │ │ │ +122 } │ │ │ │ +123 │ │ │ │ +124 _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r │ │ │ │ +125 operator++(int) │ │ │ │ +126 { │ │ │ │ +127 __glibcxx_requires_cond(_M_ok, │ │ │ │ +128 _M_message(__gnu_debug::__msg_inc_istream) │ │ │ │ +129 ._M_iterator(*this)); │ │ │ │ +130 _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r __tmp = *this; │ │ │ │ +131 _M_read(); │ │ │ │ +132 return __tmp; │ │ │ │ +133 } │ │ │ │ +134 │ │ │ │ +135 private: │ │ │ │ +136 bool │ │ │ │ +137 _M_equal(const _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r& __x) const _GLIBCXX_NOEXCEPT │ │ │ │ +138 { │ │ │ │ +139 // Ideally this would just return _M_stream == __x._M_stream, │ │ │ │ +140 // but code compiled with old versions never sets _M_stream to null. │ │ │ │ +141 return (_M_ok == __x._M_ok) && (!_M_ok || _M_stream == __x._M_stream); │ │ │ │ +142 } │ │ │ │ +143 │ │ │ │ +144 void │ │ │ │ +145 _M_read() │ │ │ │ +146 { │ │ │ │ +147 if (_M_stream && !(*_M_stream >> _M_value)) │ │ │ │ +148 { │ │ │ │ +149 _M_stream = 0; │ │ │ │ +150 _M_ok = false; │ │ │ │ +151 } │ │ │ │ +152 } │ │ │ │ 153 │ │ │ │ -154 /** │ │ │ │ -155 * @brief Builds an %unordered_set from a range. │ │ │ │ -156 * @param __first An input iterator. │ │ │ │ -157 * @param __last An input iterator. │ │ │ │ -158 * @param __n Minimal initial number of buckets. │ │ │ │ -159 * @param __hf A hash functor. │ │ │ │ -160 * @param __eql A key equality functor. │ │ │ │ -161 * @param __a An allocator object. │ │ │ │ -162 * │ │ │ │ -163 * Create an %unordered_set consisting of copies of the elements from │ │ │ │ -164 * [__first,__last). This is linear in N (where N is │ │ │ │ -165 * distance(__first,__last)). │ │ │ │ -166 */ │ │ │ │ -167 template │ │ │ │ -_1_6_8 _u_n_o_r_d_e_r_e_d___s_e_t(___I_n_p_u_t_I_t_e_r_a_t_o_r __first, ___I_n_p_u_t_I_t_e_r_a_t_o_r __last, │ │ │ │ -169 _s_i_z_e___t_y_p_e __n = 0, │ │ │ │ -170 const _h_a_s_h_e_r& _____h_f = _h_a_s_h_e_r(), │ │ │ │ -171 const _k_e_y___e_q_u_a_l& _____e_q_l = _k_e_y___e_q_u_a_l(), │ │ │ │ -172 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a = _a_l_l_o_c_a_t_o_r___t_y_p_e()) │ │ │ │ -173 : _M_h(__first, __last, __n, _____h_f, _____e_q_l, __a) │ │ │ │ -174 { } │ │ │ │ -175 │ │ │ │ -176 /// Copy constructor. │ │ │ │ -_1_7_7 _u_n_o_r_d_e_r_e_d___s_e_t(const _u_n_o_r_d_e_r_e_d___s_e_t&) = default; │ │ │ │ -178 │ │ │ │ -179 /// Move constructor. │ │ │ │ -_1_8_0 _u_n_o_r_d_e_r_e_d___s_e_t(_u_n_o_r_d_e_r_e_d___s_e_t&&) = default; │ │ │ │ -181 │ │ │ │ -182 /** │ │ │ │ -183 * @brief Creates an %unordered_set with no elements. │ │ │ │ -184 * @param __a An allocator object. │ │ │ │ -185 */ │ │ │ │ -186 explicit │ │ │ │ -_1_8_7 _u_n_o_r_d_e_r_e_d___s_e_t(const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -188 : _M_h(__a) │ │ │ │ -189 { } │ │ │ │ -190 │ │ │ │ -191 /* │ │ │ │ -192 * @brief Copy constructor with allocator argument. │ │ │ │ -193 * @param __uset Input %unordered_set to copy. │ │ │ │ -194 * @param __a An allocator object. │ │ │ │ -195 */ │ │ │ │ -196 _u_n_o_r_d_e_r_e_d___s_e_t(const _u_n_o_r_d_e_r_e_d___s_e_t& _____u_s_e_t, │ │ │ │ -197 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -198 : _M_h(_____u_s_e_t._M_h, __a) │ │ │ │ -199 { } │ │ │ │ -200 │ │ │ │ -201 /* │ │ │ │ -202 * @brief Move constructor with allocator argument. │ │ │ │ -203 * @param __uset Input %unordered_set to move. │ │ │ │ -204 * @param __a An allocator object. │ │ │ │ -205 */ │ │ │ │ -206 _u_n_o_r_d_e_r_e_d___s_e_t(_u_n_o_r_d_e_r_e_d___s_e_t&& __uset, │ │ │ │ -207 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -208 noexcept( noexcept(_Hashtable(_s_t_d_:_:_m_o_v_e(__uset._M_h), __a)) ) │ │ │ │ -209 : _M_h(_s_t_d_:_:_m_o_v_e(__uset._M_h), __a) │ │ │ │ -210 { } │ │ │ │ -211 │ │ │ │ -212 /** │ │ │ │ -213 * @brief Builds an %unordered_set from an initializer_list. │ │ │ │ -214 * @param __l An initializer_list. │ │ │ │ -215 * @param __n Minimal initial number of buckets. │ │ │ │ -216 * @param __hf A hash functor. │ │ │ │ -217 * @param __eql A key equality functor. │ │ │ │ -218 * @param __a An allocator object. │ │ │ │ -219 * │ │ │ │ -220 * Create an %unordered_set consisting of copies of the elements in the │ │ │ │ -221 * list. This is linear in N (where N is @a __l.size()). │ │ │ │ -222 */ │ │ │ │ -_2_2_3 _u_n_o_r_d_e_r_e_d___s_e_t(_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t_<_v_a_l_u_e___t_y_p_e_> _____l, │ │ │ │ -224 _s_i_z_e___t_y_p_e __n = 0, │ │ │ │ -225 const _h_a_s_h_e_r& _____h_f = _h_a_s_h_e_r(), │ │ │ │ -226 const _k_e_y___e_q_u_a_l& _____e_q_l = _k_e_y___e_q_u_a_l(), │ │ │ │ -227 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a = _a_l_l_o_c_a_t_o_r___t_y_p_e()) │ │ │ │ -228 : _M_h(_____l, __n, _____h_f, _____e_q_l, __a) │ │ │ │ -229 { } │ │ │ │ -230 │ │ │ │ -231 _u_n_o_r_d_e_r_e_d___s_e_t(_s_i_z_e___t_y_p_e __n, const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -232 : _u_n_o_r_d_e_r_e_d___s_e_t(__n, _h_a_s_h_e_r(), _k_e_y___e_q_u_a_l(), __a) │ │ │ │ -233 { } │ │ │ │ -234 │ │ │ │ -235 _u_n_o_r_d_e_r_e_d___s_e_t(_s_i_z_e___t_y_p_e __n, const _h_a_s_h_e_r& __hf, │ │ │ │ -236 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -237 : _u_n_o_r_d_e_r_e_d___s_e_t(__n, __hf, _k_e_y___e_q_u_a_l(), __a) │ │ │ │ -238 { } │ │ │ │ -239 │ │ │ │ -240 template │ │ │ │ -241 _u_n_o_r_d_e_r_e_d___s_e_t(_InputIterator __first, _InputIterator __last, │ │ │ │ -242 _s_i_z_e___t_y_p_e __n, │ │ │ │ -243 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -244 : _u_n_o_r_d_e_r_e_d___s_e_t(__first, __last, __n, _h_a_s_h_e_r(), _k_e_y___e_q_u_a_l(), __a) │ │ │ │ -245 { } │ │ │ │ -246 │ │ │ │ -247 template │ │ │ │ -248 _u_n_o_r_d_e_r_e_d___s_e_t(_InputIterator __first, _InputIterator __last, │ │ │ │ -249 _s_i_z_e___t_y_p_e __n, const _h_a_s_h_e_r& __hf, │ │ │ │ -250 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -251 : _u_n_o_r_d_e_r_e_d___s_e_t(__first, __last, __n, __hf, _k_e_y___e_q_u_a_l(), __a) │ │ │ │ -252 { } │ │ │ │ -253 │ │ │ │ -254 _u_n_o_r_d_e_r_e_d___s_e_t(initializer_list __l, │ │ │ │ -255 _s_i_z_e___t_y_p_e __n, │ │ │ │ -256 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -257 : _u_n_o_r_d_e_r_e_d___s_e_t(__l, __n, _h_a_s_h_e_r(), _k_e_y___e_q_u_a_l(), __a) │ │ │ │ -258 { } │ │ │ │ +154 /// Return true if the iterators refer to the same stream, │ │ │ │ +155 /// or are both at end-of-stream. │ │ │ │ +156 _GLIBCXX_NODISCARD │ │ │ │ +157 friend bool │ │ │ │ +_1_5_8 _o_p_e_r_a_t_o_r_=_=(const _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r& __x, const _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r& __y) │ │ │ │ +159 ___G_L_I_B_C_X_X___N_O_E_X_C_E_P_T │ │ │ │ +160 { return __x._M_equal(__y); } │ │ │ │ +161 │ │ │ │ +162#if __cpp_impl_three_way_comparison < 201907L │ │ │ │ +163 /// Return true if the iterators refer to different streams, │ │ │ │ +164 /// or if one is at end-of-stream and the other is not. │ │ │ │ +165 _GLIBCXX_NODISCARD │ │ │ │ +166 friend bool │ │ │ │ +167 operator!=(const _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r& __x, const _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r& __y) │ │ │ │ +168 ___G_L_I_B_C_X_X___N_O_E_X_C_E_P_T │ │ │ │ +169 { return !__x._M_equal(__y); } │ │ │ │ +170#endif │ │ │ │ +171 │ │ │ │ +172#if __cplusplus > 201703L && __cpp_lib_concepts │ │ │ │ +173 [[nodiscard]] │ │ │ │ +174 friend bool │ │ │ │ +175 _o_p_e_r_a_t_o_r_=_=(const _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r& __i, default_sentinel_t) noexcept │ │ │ │ +176 { return !__i._M_stream; } │ │ │ │ +177#endif │ │ │ │ +178 }; │ │ │ │ +179 │ │ │ │ +180 /** │ │ │ │ +181 * @brief Provides output iterator semantics for streams. │ │ │ │ +182 * │ │ │ │ +183 * This class provides an iterator to write to an ostream. The type Tp is │ │ │ │ +184 * the only type written by this iterator and there must be an │ │ │ │ +185 * operator<<(Tp) defined. │ │ │ │ +186 * │ │ │ │ +187 * @tparam _Tp The type to write to the ostream. │ │ │ │ +188 * @tparam _CharT The ostream char_type. │ │ │ │ +189 * @tparam _Traits The ostream char_traits. │ │ │ │ +190 */ │ │ │ │ +191 template > │ │ │ │ +_1_9_3 class _o_s_t_r_e_a_m___i_t_e_r_a_t_o_r │ │ │ │ +194 : public _i_t_e_r_a_t_o_r │ │ │ │ +195 { │ │ │ │ +196 public: │ │ │ │ +197 ///@{ │ │ │ │ +198 /// Public typedef │ │ │ │ +199#if __cplusplus > 201703L │ │ │ │ +_2_0_0 using _d_i_f_f_e_r_e_n_c_e___t_y_p_e = ptrdiff_t; │ │ │ │ +201#endif │ │ │ │ +_2_0_2 typedef _CharT _c_h_a_r___t_y_p_e; │ │ │ │ +_2_0_3 typedef _Traits _t_r_a_i_t_s___t_y_p_e; │ │ │ │ +_2_0_4 typedef _b_a_s_i_c___o_s_t_r_e_a_m_<___C_h_a_r_T_,_ ___T_r_a_i_t_s_> _o_s_t_r_e_a_m___t_y_p_e; │ │ │ │ +205 ///@} │ │ │ │ +206 │ │ │ │ +207 private: │ │ │ │ +208 _o_s_t_r_e_a_m___t_y_p_e* _M_stream; │ │ │ │ +209 const _CharT* _M_string; │ │ │ │ +210 │ │ │ │ +211 public: │ │ │ │ +212 /// Construct from an ostream. │ │ │ │ +_2_1_3 _o_s_t_r_e_a_m___i_t_e_r_a_t_o_r(_o_s_t_r_e_a_m___t_y_p_e& _____s) ___G_L_I_B_C_X_X___N_O_E_X_C_E_P_T │ │ │ │ +214 : _M_stream(_s_t_d_:_:_____a_d_d_r_e_s_s_o_f(_____s)), _M_string(0) {} │ │ │ │ +215 │ │ │ │ +216 /** │ │ │ │ +217 * Construct from an ostream. │ │ │ │ +218 * │ │ │ │ +219 * The delimiter string @a c is written to the stream after every Tp │ │ │ │ +220 * written to the stream. The delimiter is not copied, and thus must │ │ │ │ +221 * not be destroyed while this iterator is in use. │ │ │ │ +222 * │ │ │ │ +223 * @param __s Underlying ostream to write to. │ │ │ │ +224 * @param __c CharT delimiter string to insert. │ │ │ │ +225 */ │ │ │ │ +_2_2_6 _o_s_t_r_e_a_m___i_t_e_r_a_t_o_r(_o_s_t_r_e_a_m___t_y_p_e& _____s, const _CharT* __c) ___G_L_I_B_C_X_X___N_O_E_X_C_E_P_T │ │ │ │ +227 : _M_stream(_s_t_d_:_:_____a_d_d_r_e_s_s_o_f(_____s)), _M_string(__c) { } │ │ │ │ +228 │ │ │ │ +229 /// Copy constructor. │ │ │ │ +_2_3_0 _o_s_t_r_e_a_m___i_t_e_r_a_t_o_r(const _o_s_t_r_e_a_m___i_t_e_r_a_t_o_r& _____o_b_j) ___G_L_I_B_C_X_X___N_O_E_X_C_E_P_T │ │ │ │ +231 : _M_stream(_____o_b_j._M_stream), _M_string(_____o_b_j._M_string) { } │ │ │ │ +232 │ │ │ │ +233#if __cplusplus >= 201103L │ │ │ │ +234 _o_s_t_r_e_a_m___i_t_e_r_a_t_o_r& operator=(const _o_s_t_r_e_a_m___i_t_e_r_a_t_o_r&) = default; │ │ │ │ +235#endif │ │ │ │ +236 │ │ │ │ +237 /// Writes @a value to underlying ostream using operator<<. If │ │ │ │ +238 /// constructed with delimiter string, writes delimiter to ostream. │ │ │ │ +239 _o_s_t_r_e_a_m___i_t_e_r_a_t_o_r& │ │ │ │ +_2_4_0 _o_p_e_r_a_t_o_r_=(const _Tp& __value) │ │ │ │ +241 { │ │ │ │ +242 __glibcxx_requires_cond(_M_stream != 0, │ │ │ │ +243 _M_message(__gnu_debug::__msg_output_ostream) │ │ │ │ +244 ._M_iterator(*this)); │ │ │ │ +245 *_M_stream << __value; │ │ │ │ +246 if (_M_string) │ │ │ │ +247 *_M_stream << _M_string; │ │ │ │ +248 return *this; │ │ │ │ +249 } │ │ │ │ +250 │ │ │ │ +251 _GLIBCXX_NODISCARD │ │ │ │ +252 _o_s_t_r_e_a_m___i_t_e_r_a_t_o_r& │ │ │ │ +253 operator*() ___G_L_I_B_C_X_X___N_O_E_X_C_E_P_T │ │ │ │ +254 { return *this; } │ │ │ │ +255 │ │ │ │ +256 ostream_iterator& │ │ │ │ +257 operator++() _GLIBCXX_NOEXCEPT │ │ │ │ +258 { return *this; } │ │ │ │ 259 │ │ │ │ -260 _u_n_o_r_d_e_r_e_d___s_e_t(initializer_list __l, │ │ │ │ -261 _s_i_z_e___t_y_p_e __n, const _h_a_s_h_e_r& __hf, │ │ │ │ -262 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -263 : _u_n_o_r_d_e_r_e_d___s_e_t(__l, __n, __hf, _k_e_y___e_q_u_a_l(), __a) │ │ │ │ -264 { } │ │ │ │ +260 _o_s_t_r_e_a_m___i_t_e_r_a_t_o_r& │ │ │ │ +261 operator++(int) _GLIBCXX_NOEXCEPT │ │ │ │ +262 { return *this; } │ │ │ │ +263 }; │ │ │ │ +264#pragma GCC diagnostic pop │ │ │ │ 265 │ │ │ │ -266 /// Copy assignment operator. │ │ │ │ -267 _u_n_o_r_d_e_r_e_d___s_e_t& │ │ │ │ -_2_6_8 _o_p_e_r_a_t_o_r_=(const _u_n_o_r_d_e_r_e_d___s_e_t&) = default; │ │ │ │ -269 │ │ │ │ -270 /// Move assignment operator. │ │ │ │ -271 _u_n_o_r_d_e_r_e_d___s_e_t& │ │ │ │ -_2_7_2 _o_p_e_r_a_t_o_r_=(_u_n_o_r_d_e_r_e_d___s_e_t&&) = default; │ │ │ │ -273 │ │ │ │ -274 /** │ │ │ │ -275 * @brief %Unordered_set list assignment operator. │ │ │ │ -276 * @param __l An initializer_list. │ │ │ │ -277 * │ │ │ │ -278 * This function fills an %unordered_set with copies of the elements in │ │ │ │ -279 * the initializer list @a __l. │ │ │ │ -280 * │ │ │ │ -281 * Note that the assignment completely changes the %unordered_set and │ │ │ │ -282 * that the resulting %unordered_set's size is the same as the number │ │ │ │ -283 * of elements assigned. │ │ │ │ -284 */ │ │ │ │ -285 _u_n_o_r_d_e_r_e_d___s_e_t& │ │ │ │ -_2_8_6 _o_p_e_r_a_t_o_r_=(_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t_<_v_a_l_u_e___t_y_p_e_> _____l) │ │ │ │ -287 { │ │ │ │ -288 _M_h = _____l; │ │ │ │ -289 return *this; │ │ │ │ -290 } │ │ │ │ -291 │ │ │ │ -292 /// Returns the allocator object used by the %unordered_set. │ │ │ │ -293 _a_l_l_o_c_a_t_o_r___t_y_p_e │ │ │ │ -_2_9_4 _g_e_t___a_l_l_o_c_a_t_o_r() const noexcept │ │ │ │ -295 { return _M_h.get_allocator(); } │ │ │ │ -296 │ │ │ │ -297 // size and capacity: │ │ │ │ -298 │ │ │ │ -299 /// Returns true if the %unordered_set is empty. │ │ │ │ -300 _GLIBCXX_NODISCARD bool │ │ │ │ -_3_0_1 _e_m_p_t_y() const noexcept │ │ │ │ -302 { return _M_h.empty(); } │ │ │ │ -303 │ │ │ │ -304 /// Returns the size of the %unordered_set. │ │ │ │ -305 _s_i_z_e___t_y_p_e │ │ │ │ -_3_0_6 _s_i_z_e() const noexcept │ │ │ │ -307 { return _M_h.size(); } │ │ │ │ -308 │ │ │ │ -309 /// Returns the maximum size of the %unordered_set. │ │ │ │ -310 _s_i_z_e___t_y_p_e │ │ │ │ -_3_1_1 _m_a_x___s_i_z_e() const noexcept │ │ │ │ -312 { return _M_h.max_size(); } │ │ │ │ -313 │ │ │ │ -314 // iterators. │ │ │ │ -315 │ │ │ │ -316 ///@{ │ │ │ │ -317 /** │ │ │ │ -318 * Returns a read-only (constant) iterator that points to the first │ │ │ │ -319 * element in the %unordered_set. │ │ │ │ -320 */ │ │ │ │ -321 _i_t_e_r_a_t_o_r │ │ │ │ -_3_2_2 _b_e_g_i_n() noexcept │ │ │ │ -323 { return _M_h.begin(); } │ │ │ │ -324 │ │ │ │ -325 _c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ -_3_2_6 _b_e_g_i_n() const noexcept │ │ │ │ -327 { return _M_h.begin(); } │ │ │ │ -328 ///@} │ │ │ │ -329 │ │ │ │ -330 ///@{ │ │ │ │ -331 /** │ │ │ │ -332 * Returns a read-only (constant) iterator that points one past the last │ │ │ │ -333 * element in the %unordered_set. │ │ │ │ -334 */ │ │ │ │ -335 _i_t_e_r_a_t_o_r │ │ │ │ -_3_3_6 _e_n_d() noexcept │ │ │ │ -337 { return _M_h.end(); } │ │ │ │ -338 │ │ │ │ -339 _c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ -_3_4_0 _e_n_d() const noexcept │ │ │ │ -341 { return _M_h.end(); } │ │ │ │ -342 ///@} │ │ │ │ -343 │ │ │ │ -344 /** │ │ │ │ -345 * Returns a read-only (constant) iterator that points to the first │ │ │ │ -346 * element in the %unordered_set. │ │ │ │ -347 */ │ │ │ │ -348 _c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ -_3_4_9 _c_b_e_g_i_n() const noexcept │ │ │ │ -350 { return _M_h.begin(); } │ │ │ │ -351 │ │ │ │ -352 /** │ │ │ │ -353 * Returns a read-only (constant) iterator that points one past the last │ │ │ │ -354 * element in the %unordered_set. │ │ │ │ -355 */ │ │ │ │ -356 _c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ -_3_5_7 _c_e_n_d() const noexcept │ │ │ │ -358 { return _M_h.end(); } │ │ │ │ -359 │ │ │ │ -360 // modifiers. │ │ │ │ -361 │ │ │ │ -362 /** │ │ │ │ -363 * @brief Attempts to build and insert an element into the │ │ │ │ -364 * %unordered_set. │ │ │ │ -365 * @param __args Arguments used to generate an element. │ │ │ │ -366 * @return A pair, of which the first element is an iterator that points │ │ │ │ -367 * to the possibly inserted element, and the second is a bool │ │ │ │ -368 * that is true if the element was actually inserted. │ │ │ │ -369 * │ │ │ │ -370 * This function attempts to build and insert an element into the │ │ │ │ -371 * %unordered_set. An %unordered_set relies on unique keys and thus an │ │ │ │ -372 * element is only inserted if it is not already present in the │ │ │ │ -373 * %unordered_set. │ │ │ │ -374 * │ │ │ │ -375 * Insertion requires amortized constant time. │ │ │ │ -376 */ │ │ │ │ -377 template │ │ │ │ -378 _s_t_d_:_:_p_a_i_r_<_i_t_e_r_a_t_o_r_,_ _b_o_o_l_> │ │ │ │ -_3_7_9 _e_m_p_l_a_c_e(___A_r_g_s&&... _____a_r_g_s) │ │ │ │ -380 { return _M_h.emplace(_s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(_____a_r_g_s)...); } │ │ │ │ -381 │ │ │ │ -382 /** │ │ │ │ -383 * @brief Attempts to insert an element into the %unordered_set. │ │ │ │ -384 * @param __pos An iterator that serves as a hint as to where the │ │ │ │ -385 * element should be inserted. │ │ │ │ -386 * @param __args Arguments used to generate the element to be │ │ │ │ -387 * inserted. │ │ │ │ -388 * @return An iterator that points to the element with key equivalent to │ │ │ │ -389 * the one generated from @a __args (may or may not be the │ │ │ │ -390 * element itself). │ │ │ │ -391 * │ │ │ │ -392 * This function is not concerned about whether the insertion took place, │ │ │ │ -393 * and thus does not return a boolean like the single-argument emplace() │ │ │ │ -394 * does. Note that the first parameter is only a hint and can │ │ │ │ -395 * potentially improve the performance of the insertion process. A bad │ │ │ │ -396 * hint would cause no gains in efficiency. │ │ │ │ -397 * │ │ │ │ -398 * For more on @a hinting, see: │ │ │ │ -399 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/ │ │ │ │ -associative.html#containers.associative.insert_hints │ │ │ │ -400 * │ │ │ │ -401 * Insertion requires amortized constant time. │ │ │ │ -402 */ │ │ │ │ -403 template │ │ │ │ -404 _i_t_e_r_a_t_o_r │ │ │ │ -_4_0_5 _e_m_p_l_a_c_e___h_i_n_t(_c_o_n_s_t___i_t_e_r_a_t_o_r _____p_o_s, ___A_r_g_s&&... _____a_r_g_s) │ │ │ │ -406 { return _M_h.emplace_hint(_____p_o_s, _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(_____a_r_g_s)...); } │ │ │ │ -407 │ │ │ │ -408 ///@{ │ │ │ │ -409 /** │ │ │ │ -410 * @brief Attempts to insert an element into the %unordered_set. │ │ │ │ -411 * @param __x Element to be inserted. │ │ │ │ -412 * @return A pair, of which the first element is an iterator that points │ │ │ │ -413 * to the possibly inserted element, and the second is a bool │ │ │ │ -414 * that is true if the element was actually inserted. │ │ │ │ -415 * │ │ │ │ -416 * This function attempts to insert an element into the %unordered_set. │ │ │ │ -417 * An %unordered_set relies on unique keys and thus an element is only │ │ │ │ -418 * inserted if it is not already present in the %unordered_set. │ │ │ │ -419 * │ │ │ │ -420 * Insertion requires amortized constant time. │ │ │ │ -421 */ │ │ │ │ -422 _s_t_d_:_:_p_a_i_r_<_i_t_e_r_a_t_o_r_,_ _b_o_o_l_> │ │ │ │ -_4_2_3 _i_n_s_e_r_t(const _v_a_l_u_e___t_y_p_e& __x) │ │ │ │ -424 { return _M_h.insert(__x); } │ │ │ │ -425 │ │ │ │ -426 _s_t_d_:_:_p_a_i_r_<_i_t_e_r_a_t_o_r_,_ _b_o_o_l_> │ │ │ │ -_4_2_7 _i_n_s_e_r_t(_v_a_l_u_e___t_y_p_e&& __x) │ │ │ │ -428 { return _M_h.insert(_s_t_d_:_:_m_o_v_e(__x)); } │ │ │ │ -429 ///@} │ │ │ │ -430 │ │ │ │ -431 ///@{ │ │ │ │ -432 /** │ │ │ │ -433 * @brief Attempts to insert an element into the %unordered_set. │ │ │ │ -434 * @param __hint An iterator that serves as a hint as to where the │ │ │ │ -435 * element should be inserted. │ │ │ │ -436 * @param __x Element to be inserted. │ │ │ │ -437 * @return An iterator that points to the element with key of │ │ │ │ -438 * @a __x (may or may not be the element passed in). │ │ │ │ -439 * │ │ │ │ -440 * This function is not concerned about whether the insertion took place, │ │ │ │ -441 * and thus does not return a boolean like the single-argument insert() │ │ │ │ -442 * does. Note that the first parameter is only a hint and can │ │ │ │ -443 * potentially improve the performance of the insertion process. A bad │ │ │ │ -444 * hint would cause no gains in efficiency. │ │ │ │ -445 * │ │ │ │ -446 * For more on @a hinting, see: │ │ │ │ -447 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/ │ │ │ │ -associative.html#containers.associative.insert_hints │ │ │ │ -448 * │ │ │ │ -449 * Insertion requires amortized constant. │ │ │ │ -450 */ │ │ │ │ -451 _i_t_e_r_a_t_o_r │ │ │ │ -_4_5_2 _i_n_s_e_r_t(_c_o_n_s_t___i_t_e_r_a_t_o_r _____h_i_n_t, const _v_a_l_u_e___t_y_p_e& __x) │ │ │ │ -453 { return _M_h.insert(_____h_i_n_t, __x); } │ │ │ │ -454 │ │ │ │ -455 _i_t_e_r_a_t_o_r │ │ │ │ -_4_5_6 _i_n_s_e_r_t(_c_o_n_s_t___i_t_e_r_a_t_o_r _____h_i_n_t, _v_a_l_u_e___t_y_p_e&& __x) │ │ │ │ -457 { return _M_h.insert(_____h_i_n_t, _s_t_d_:_:_m_o_v_e(__x)); } │ │ │ │ -458 ///@} │ │ │ │ -459 │ │ │ │ -460 /** │ │ │ │ -461 * @brief A template function that attempts to insert a range of │ │ │ │ -462 * elements. │ │ │ │ -463 * @param __first Iterator pointing to the start of the range to be │ │ │ │ -464 * inserted. │ │ │ │ -465 * @param __last Iterator pointing to the end of the range. │ │ │ │ -466 * │ │ │ │ -467 * Complexity similar to that of the range constructor. │ │ │ │ -468 */ │ │ │ │ -469 template │ │ │ │ -470 void │ │ │ │ -_4_7_1 _i_n_s_e_r_t(___I_n_p_u_t_I_t_e_r_a_t_o_r __first, ___I_n_p_u_t_I_t_e_r_a_t_o_r __last) │ │ │ │ -472 { _M_h.insert(__first, __last); } │ │ │ │ -473 │ │ │ │ -474 /** │ │ │ │ -475 * @brief Attempts to insert a list of elements into the %unordered_set. │ │ │ │ -476 * @param __l A std::initializer_list of elements │ │ │ │ -477 * to be inserted. │ │ │ │ -478 * │ │ │ │ -479 * Complexity similar to that of the range constructor. │ │ │ │ -480 */ │ │ │ │ -481 void │ │ │ │ -_4_8_2 _i_n_s_e_r_t(_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t_<_v_a_l_u_e___t_y_p_e_> _____l) │ │ │ │ -483 { _M_h.insert(_____l); } │ │ │ │ -484 │ │ │ │ -485#if __cplusplus > 201402L │ │ │ │ -486 /// Extract a node. │ │ │ │ -487 node_type │ │ │ │ -_4_8_8 _e_x_t_r_a_c_t(_c_o_n_s_t___i_t_e_r_a_t_o_r _____p_o_s) │ │ │ │ -489 { │ │ │ │ -490 __glibcxx_assert(_____p_o_s != _e_n_d()); │ │ │ │ -491 return _M_h.extract(_____p_o_s); │ │ │ │ -492 } │ │ │ │ -493 │ │ │ │ -494 /// Extract a node. │ │ │ │ -495 node_type │ │ │ │ -_4_9_6 _e_x_t_r_a_c_t(const _k_e_y___t_y_p_e& _____k_e_y) │ │ │ │ -497 { return _M_h.extract(_____k_e_y); } │ │ │ │ -498 │ │ │ │ -499 /// Re-insert an extracted node. │ │ │ │ -500 insert_return_type │ │ │ │ -_5_0_1 _i_n_s_e_r_t(node_type&& _____n_h) │ │ │ │ -502 { return _M_h._M_reinsert_node(_s_t_d_:_:_m_o_v_e(_____n_h)); } │ │ │ │ -503 │ │ │ │ -504 /// Re-insert an extracted node. │ │ │ │ -505 _i_t_e_r_a_t_o_r │ │ │ │ -_5_0_6 _i_n_s_e_r_t(_c_o_n_s_t___i_t_e_r_a_t_o_r, node_type&& _____n_h) │ │ │ │ -507 { return _M_h._M_reinsert_node(_s_t_d_:_:_m_o_v_e(_____n_h)).position; } │ │ │ │ -508#endif // C++17 │ │ │ │ -509 │ │ │ │ -510 ///@{ │ │ │ │ -511 /** │ │ │ │ -512 * @brief Erases an element from an %unordered_set. │ │ │ │ -513 * @param __position An iterator pointing to the element to be erased. │ │ │ │ -514 * @return An iterator pointing to the element immediately following │ │ │ │ -515 * @a __position prior to the element being erased. If no such │ │ │ │ -516 * element exists, end() is returned. │ │ │ │ -517 * │ │ │ │ -518 * This function erases an element, pointed to by the given iterator, │ │ │ │ -519 * from an %unordered_set. Note that this function only erases the │ │ │ │ -520 * element, and that if the element is itself a pointer, the pointed-to │ │ │ │ -521 * memory is not touched in any way. Managing the pointer is the user's │ │ │ │ -522 * responsibility. │ │ │ │ -523 */ │ │ │ │ -524 _i_t_e_r_a_t_o_r │ │ │ │ -_5_2_5 _e_r_a_s_e(_c_o_n_s_t___i_t_e_r_a_t_o_r _____p_o_s_i_t_i_o_n) │ │ │ │ -526 { return _M_h.erase(_____p_o_s_i_t_i_o_n); } │ │ │ │ -527 │ │ │ │ -528 // LWG 2059. │ │ │ │ -529 _i_t_e_r_a_t_o_r │ │ │ │ -_5_3_0 _e_r_a_s_e(_i_t_e_r_a_t_o_r _____p_o_s_i_t_i_o_n) │ │ │ │ -531 { return _M_h.erase(_____p_o_s_i_t_i_o_n); } │ │ │ │ -532 ///@} │ │ │ │ -533 │ │ │ │ -534 /** │ │ │ │ -535 * @brief Erases elements according to the provided key. │ │ │ │ -536 * @param __x Key of element to be erased. │ │ │ │ -537 * @return The number of elements erased. │ │ │ │ -538 * │ │ │ │ -539 * This function erases all the elements located by the given key from │ │ │ │ -540 * an %unordered_set. For an %unordered_set the result of this function │ │ │ │ -541 * can only be 0 (not present) or 1 (present). │ │ │ │ -542 * Note that this function only erases the element, and that if │ │ │ │ -543 * the element is itself a pointer, the pointed-to memory is not touched │ │ │ │ -544 * in any way. Managing the pointer is the user's responsibility. │ │ │ │ -545 */ │ │ │ │ -546 _s_i_z_e___t_y_p_e │ │ │ │ -_5_4_7 _e_r_a_s_e(const _k_e_y___t_y_p_e& __x) │ │ │ │ -548 { return _M_h.erase(__x); } │ │ │ │ -549 │ │ │ │ -550 /** │ │ │ │ -551 * @brief Erases a [__first,__last) range of elements from an │ │ │ │ -552 * %unordered_set. │ │ │ │ -553 * @param __first Iterator pointing to the start of the range to be │ │ │ │ -554 * erased. │ │ │ │ -555 * @param __last Iterator pointing to the end of the range to │ │ │ │ -556 * be erased. │ │ │ │ -557 * @return The iterator @a __last. │ │ │ │ -558 * │ │ │ │ -559 * This function erases a sequence of elements from an %unordered_set. │ │ │ │ -560 * Note that this function only erases the element, and that if │ │ │ │ -561 * the element is itself a pointer, the pointed-to memory is not touched │ │ │ │ -562 * in any way. Managing the pointer is the user's responsibility. │ │ │ │ -563 */ │ │ │ │ -564 _i_t_e_r_a_t_o_r │ │ │ │ -_5_6_5 _e_r_a_s_e(_c_o_n_s_t___i_t_e_r_a_t_o_r __first, _c_o_n_s_t___i_t_e_r_a_t_o_r __last) │ │ │ │ -566 { return _M_h.erase(__first, __last); } │ │ │ │ -567 │ │ │ │ -568 /** │ │ │ │ -569 * Erases all elements in an %unordered_set. Note that this function only │ │ │ │ -570 * erases the elements, and that if the elements themselves are pointers, │ │ │ │ -571 * the pointed-to memory is not touched in any way. Managing the pointer │ │ │ │ -572 * is the user's responsibility. │ │ │ │ -573 */ │ │ │ │ -574 void │ │ │ │ -_5_7_5 _c_l_e_a_r() noexcept │ │ │ │ -576 { _M_h.clear(); } │ │ │ │ -577 │ │ │ │ -578 /** │ │ │ │ -579 * @brief Swaps data with another %unordered_set. │ │ │ │ -580 * @param __x An %unordered_set of the same element and allocator │ │ │ │ -581 * types. │ │ │ │ -582 * │ │ │ │ -583 * This exchanges the elements between two sets in constant time. │ │ │ │ -584 * Note that the global std::swap() function is specialized such that │ │ │ │ -585 * std::swap(s1,s2) will feed to this function. │ │ │ │ -586 */ │ │ │ │ -587 void │ │ │ │ -_5_8_8 _s_w_a_p(_u_n_o_r_d_e_r_e_d___s_e_t& __x) │ │ │ │ -589 noexcept( noexcept(_M_h.swap(__x._M_h)) ) │ │ │ │ -590 { _M_h.swap(__x._M_h); } │ │ │ │ -591 │ │ │ │ -592#if __cplusplus > 201402L │ │ │ │ -593 template │ │ │ │ -594 friend class std::_Hash_merge_helper; │ │ │ │ -595 │ │ │ │ -596 template │ │ │ │ -597 void │ │ │ │ -598 merge(_u_n_o_r_d_e_r_e_d___s_e_t_<___V_a_l_u_e_,_ ___H_2_,_ ___P_2_,_ ___A_l_l_o_c_>& _____s_o_u_r_c_e) │ │ │ │ -599 { │ │ │ │ -600 using ___M_e_r_g_e___h_e_l_p_e_r = ___H_a_s_h___m_e_r_g_e___h_e_l_p_e_r_<_u_n_o_r_d_e_r_e_d___s_e_t_,_ ___H_2_,_ ___P_2_>; │ │ │ │ -601 _M_h._M_merge_unique(_Merge_helper::_S_get_table(_____s_o_u_r_c_e)); │ │ │ │ -602 } │ │ │ │ -603 │ │ │ │ -604 template │ │ │ │ -605 void │ │ │ │ -606 merge(unordered_set<_Value, _H2, _P2, _Alloc>&& __source) │ │ │ │ -607 { merge(__source); } │ │ │ │ -608 │ │ │ │ -609 template │ │ │ │ -610 void │ │ │ │ -611 merge(unordered_multiset<_Value, _H2, _P2, _Alloc>& __source) │ │ │ │ -612 { │ │ │ │ -613 using _Merge_helper = _Hash_merge_helper; │ │ │ │ -614 _M_h._M_merge_unique(_Merge_helper::_S_get_table(__source)); │ │ │ │ -615 } │ │ │ │ -616 │ │ │ │ -617 template │ │ │ │ -618 void │ │ │ │ -619 merge(unordered_multiset<_Value, _H2, _P2, _Alloc>&& __source) │ │ │ │ -620 { merge(__source); } │ │ │ │ -621#endif // C++17 │ │ │ │ -622 │ │ │ │ -623 // observers. │ │ │ │ -624 │ │ │ │ -625 /// Returns the hash functor object with which the %unordered_set was │ │ │ │ -626 /// constructed. │ │ │ │ -627 _h_a_s_h_e_r │ │ │ │ -_6_2_8 _h_a_s_h___f_u_n_c_t_i_o_n() const │ │ │ │ -629 { return _M_h.hash_function(); } │ │ │ │ -630 │ │ │ │ -631 /// Returns the key comparison object with which the %unordered_set was │ │ │ │ -632 /// constructed. │ │ │ │ -633 _k_e_y___e_q_u_a_l │ │ │ │ -_6_3_4 _k_e_y___e_q() const │ │ │ │ -635 { return _M_h.key_eq(); } │ │ │ │ -636 │ │ │ │ -637 // lookup. │ │ │ │ -638 │ │ │ │ -639 ///@{ │ │ │ │ -640 /** │ │ │ │ -641 * @brief Tries to locate an element in an %unordered_set. │ │ │ │ -642 * @param __x Element to be located. │ │ │ │ -643 * @return Iterator pointing to sought-after element, or end() if not │ │ │ │ -644 * found. │ │ │ │ -645 * │ │ │ │ -646 * This function takes a key and tries to locate the element with which │ │ │ │ -647 * the key matches. If successful the function returns an iterator │ │ │ │ -648 * pointing to the sought after element. If unsuccessful it returns the │ │ │ │ -649 * past-the-end ( @c end() ) iterator. │ │ │ │ -650 */ │ │ │ │ -651 _i_t_e_r_a_t_o_r │ │ │ │ -_6_5_2 _f_i_n_d(const _k_e_y___t_y_p_e& __x) │ │ │ │ -653 { return _M_h.find(__x); } │ │ │ │ -654 │ │ │ │ -655#if __cplusplus > 201703L │ │ │ │ -656 template │ │ │ │ -657 auto │ │ │ │ -_6_5_8 _f_i_n_d(const ___K_t& _____k) │ │ │ │ -659 -> decltype(_M_h._M_find_tr(_____k)) │ │ │ │ -660 { return _M_h._M_find_tr(_____k); } │ │ │ │ -661#endif │ │ │ │ -662 │ │ │ │ -663 _c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ -_6_6_4 _f_i_n_d(const _k_e_y___t_y_p_e& __x) const │ │ │ │ -665 { return _M_h.find(__x); } │ │ │ │ -666 │ │ │ │ -667#if __cplusplus > 201703L │ │ │ │ -668 template │ │ │ │ -669 auto │ │ │ │ -_6_7_0 _f_i_n_d(const ___K_t& _____k) const │ │ │ │ -671 -> decltype(_M_h._M_find_tr(_____k)) │ │ │ │ -672 { return _M_h._M_find_tr(_____k); } │ │ │ │ -673#endif │ │ │ │ -674 ///@} │ │ │ │ -675 │ │ │ │ -676 ///@{ │ │ │ │ -677 /** │ │ │ │ -678 * @brief Finds the number of elements. │ │ │ │ -679 * @param __x Element to located. │ │ │ │ -680 * @return Number of elements with specified key. │ │ │ │ -681 * │ │ │ │ -682 * This function only makes sense for unordered_multisets; for │ │ │ │ -683 * unordered_set the result will either be 0 (not present) or 1 │ │ │ │ -684 * (present). │ │ │ │ -685 */ │ │ │ │ -686 _s_i_z_e___t_y_p_e │ │ │ │ -_6_8_7 _c_o_u_n_t(const _k_e_y___t_y_p_e& __x) const │ │ │ │ -688 { return _M_h.count(__x); } │ │ │ │ -689 │ │ │ │ -690#if __cplusplus > 201703L │ │ │ │ -691 template │ │ │ │ -692 auto │ │ │ │ -_6_9_3 _c_o_u_n_t(const ___K_t& _____k) const │ │ │ │ -694 -> decltype(_M_h._M_count_tr(_____k)) │ │ │ │ -695 { return _M_h._M_count_tr(_____k); } │ │ │ │ -696#endif │ │ │ │ -697 ///@} │ │ │ │ -698 │ │ │ │ -699#if __cplusplus > 201703L │ │ │ │ -700 ///@{ │ │ │ │ -701 /** │ │ │ │ -702 * @brief Finds whether an element with the given key exists. │ │ │ │ -703 * @param __x Key of elements to be located. │ │ │ │ -704 * @return True if there is any element with the specified key. │ │ │ │ -705 */ │ │ │ │ -706 bool │ │ │ │ -_7_0_7 _c_o_n_t_a_i_n_s(const _k_e_y___t_y_p_e& __x) const │ │ │ │ -708 { return _M_h.find(__x) != _M_h.end(); } │ │ │ │ -709 │ │ │ │ -710 template │ │ │ │ -711 auto │ │ │ │ -_7_1_2 _c_o_n_t_a_i_n_s(const ___K_t& _____k) const │ │ │ │ -713 -> decltype(_M_h._M_find_tr(_____k), _v_o_i_d(), true) │ │ │ │ -714 { return _M_h._M_find_tr(_____k) != _M_h.end(); } │ │ │ │ -715 ///@} │ │ │ │ -716#endif │ │ │ │ -717 │ │ │ │ -718 ///@{ │ │ │ │ -719 /** │ │ │ │ -720 * @brief Finds a subsequence matching given key. │ │ │ │ -721 * @param __x Key to be located. │ │ │ │ -722 * @return Pair of iterators that possibly points to the subsequence │ │ │ │ -723 * matching given key. │ │ │ │ -724 * │ │ │ │ -725 * This function probably only makes sense for multisets. │ │ │ │ -726 */ │ │ │ │ -727 _s_t_d_:_:_p_a_i_r_<_i_t_e_r_a_t_o_r_,_ _i_t_e_r_a_t_o_r_> │ │ │ │ -_7_2_8 _e_q_u_a_l___r_a_n_g_e(const _k_e_y___t_y_p_e& __x) │ │ │ │ -729 { return _M_h.equal_range(__x); } │ │ │ │ -730 │ │ │ │ -731#if __cplusplus > 201703L │ │ │ │ -732 template │ │ │ │ -733 auto │ │ │ │ -_7_3_4 _e_q_u_a_l___r_a_n_g_e(const ___K_t& _____k) │ │ │ │ -735 -> decltype(_M_h._M_equal_range_tr(_____k)) │ │ │ │ -736 { return _M_h._M_equal_range_tr(_____k); } │ │ │ │ -737#endif │ │ │ │ -738 │ │ │ │ -739 _s_t_d_:_:_p_a_i_r_<_c_o_n_s_t___i_t_e_r_a_t_o_r_,_ _c_o_n_s_t___i_t_e_r_a_t_o_r_> │ │ │ │ -_7_4_0 _e_q_u_a_l___r_a_n_g_e(const _k_e_y___t_y_p_e& __x) const │ │ │ │ -741 { return _M_h.equal_range(__x); } │ │ │ │ -742 │ │ │ │ -743#if __cplusplus > 201703L │ │ │ │ -744 template │ │ │ │ -745 auto │ │ │ │ -_7_4_6 _e_q_u_a_l___r_a_n_g_e(const ___K_t& _____k) const │ │ │ │ -747 -> decltype(_M_h._M_equal_range_tr(_____k)) │ │ │ │ -748 { return _M_h._M_equal_range_tr(_____k); } │ │ │ │ -749#endif │ │ │ │ -750 ///@} │ │ │ │ -751 │ │ │ │ -752 // bucket interface. │ │ │ │ -753 │ │ │ │ -754 /// Returns the number of buckets of the %unordered_set. │ │ │ │ -755 _s_i_z_e___t_y_p_e │ │ │ │ -_7_5_6 _b_u_c_k_e_t___c_o_u_n_t() const noexcept │ │ │ │ -757 { return _M_h.bucket_count(); } │ │ │ │ -758 │ │ │ │ -759 /// Returns the maximum number of buckets of the %unordered_set. │ │ │ │ -760 _s_i_z_e___t_y_p_e │ │ │ │ -_7_6_1 _m_a_x___b_u_c_k_e_t___c_o_u_n_t() const noexcept │ │ │ │ -762 { return _M_h.max_bucket_count(); } │ │ │ │ -763 │ │ │ │ -764 /* │ │ │ │ -765 * @brief Returns the number of elements in a given bucket. │ │ │ │ -766 * @param __n A bucket index. │ │ │ │ -767 * @return The number of elements in the bucket. │ │ │ │ -768 */ │ │ │ │ -769 _s_i_z_e___t_y_p_e │ │ │ │ -770 bucket_size(_s_i_z_e___t_y_p_e __n) const │ │ │ │ -771 { return _M_h.bucket_size(__n); } │ │ │ │ -772 │ │ │ │ -773 /* │ │ │ │ -774 * @brief Returns the bucket index of a given element. │ │ │ │ -775 * @param __key A key instance. │ │ │ │ -776 * @return The key bucket index. │ │ │ │ -777 */ │ │ │ │ -778 _s_i_z_e___t_y_p_e │ │ │ │ -779 bucket(const _k_e_y___t_y_p_e& __key) const │ │ │ │ -780 { return _M_h.bucket(__key); } │ │ │ │ -781 │ │ │ │ -782 ///@{ │ │ │ │ -783 /** │ │ │ │ -784 * @brief Returns a read-only (constant) iterator pointing to the first │ │ │ │ -785 * bucket element. │ │ │ │ -786 * @param __n The bucket index. │ │ │ │ -787 * @return A read-only local iterator. │ │ │ │ -788 */ │ │ │ │ -789 _l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_7_9_0 _b_e_g_i_n(_s_i_z_e___t_y_p_e __n) │ │ │ │ -791 { return _M_h.begin(__n); } │ │ │ │ -792 │ │ │ │ -793 _c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_7_9_4 _b_e_g_i_n(_s_i_z_e___t_y_p_e __n) const │ │ │ │ -795 { return _M_h.begin(__n); } │ │ │ │ -796 │ │ │ │ -797 _c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_7_9_8 _c_b_e_g_i_n(_s_i_z_e___t_y_p_e __n) const │ │ │ │ -799 { return _M_h.cbegin(__n); } │ │ │ │ -800 ///@} │ │ │ │ -801 │ │ │ │ -802 ///@{ │ │ │ │ -803 /** │ │ │ │ -804 * @brief Returns a read-only (constant) iterator pointing to one past │ │ │ │ -805 * the last bucket elements. │ │ │ │ -806 * @param __n The bucket index. │ │ │ │ -807 * @return A read-only local iterator. │ │ │ │ -808 */ │ │ │ │ -809 _l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_8_1_0 _e_n_d(_s_i_z_e___t_y_p_e __n) │ │ │ │ -811 { return _M_h.end(__n); } │ │ │ │ -812 │ │ │ │ -813 _c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_8_1_4 _e_n_d(_s_i_z_e___t_y_p_e __n) const │ │ │ │ -815 { return _M_h.end(__n); } │ │ │ │ -816 │ │ │ │ -817 _c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_8_1_8 _c_e_n_d(_s_i_z_e___t_y_p_e __n) const │ │ │ │ -819 { return _M_h.cend(__n); } │ │ │ │ -820 ///@} │ │ │ │ -821 │ │ │ │ -822 // hash policy. │ │ │ │ -823 │ │ │ │ -824 /// Returns the average number of elements per bucket. │ │ │ │ -825 float │ │ │ │ -_8_2_6 _l_o_a_d___f_a_c_t_o_r() const noexcept │ │ │ │ -827 { return _M_h.load_factor(); } │ │ │ │ -828 │ │ │ │ -829 /// Returns a positive number that the %unordered_set tries to keep the │ │ │ │ -830 /// load factor less than or equal to. │ │ │ │ -831 float │ │ │ │ -_8_3_2 _m_a_x___l_o_a_d___f_a_c_t_o_r() const noexcept │ │ │ │ -833 { return _M_h.max_load_factor(); } │ │ │ │ -834 │ │ │ │ -835 /** │ │ │ │ -836 * @brief Change the %unordered_set maximum load factor. │ │ │ │ -837 * @param __z The new maximum load factor. │ │ │ │ -838 */ │ │ │ │ -839 void │ │ │ │ -_8_4_0 _m_a_x___l_o_a_d___f_a_c_t_o_r(float _____z) │ │ │ │ -841 { _M_h.max_load_factor(_____z); } │ │ │ │ -842 │ │ │ │ -843 /** │ │ │ │ -844 * @brief May rehash the %unordered_set. │ │ │ │ -845 * @param __n The new number of buckets. │ │ │ │ -846 * │ │ │ │ -847 * Rehash will occur only if the new number of buckets respect the │ │ │ │ -848 * %unordered_set maximum load factor. │ │ │ │ -849 */ │ │ │ │ -850 void │ │ │ │ -_8_5_1 _r_e_h_a_s_h(_s_i_z_e___t_y_p_e __n) │ │ │ │ -852 { _M_h.rehash(__n); } │ │ │ │ -853 │ │ │ │ -854 /** │ │ │ │ -855 * @brief Prepare the %unordered_set for a specified number of │ │ │ │ -856 * elements. │ │ │ │ -857 * @param __n Number of elements required. │ │ │ │ -858 * │ │ │ │ -859 * Same as rehash(ceil(n / max_load_factor())). │ │ │ │ -860 */ │ │ │ │ -861 void │ │ │ │ -_8_6_2 _r_e_s_e_r_v_e(_s_i_z_e___t_y_p_e __n) │ │ │ │ -863 { _M_h.reserve(__n); } │ │ │ │ -864 │ │ │ │ -865 template │ │ │ │ -867 friend bool │ │ │ │ -868 operator==(const _u_n_o_r_d_e_r_e_d___s_e_t_<___V_a_l_u_e_1_,_ ___H_a_s_h_1_,_ ___P_r_e_d_1_,_ ___A_l_l_o_c_1_>&, │ │ │ │ -869 const _u_n_o_r_d_e_r_e_d___s_e_t_<___V_a_l_u_e_1_,_ ___H_a_s_h_1_,_ ___P_r_e_d_1_,_ ___A_l_l_o_c_1_>&); │ │ │ │ -870 }; │ │ │ │ -871 │ │ │ │ -872#if __cpp_deduction_guides >= 201606 │ │ │ │ -873 │ │ │ │ -874 template::value_type>, │ │ │ │ -877 typename _Pred = │ │ │ │ -878 equal_to::value_type>, │ │ │ │ -879 typename _Allocator = │ │ │ │ -880 allocator::value_type>, │ │ │ │ -881 typename = _RequireInputIter<_InputIterator>, │ │ │ │ -882 typename = _RequireNotAllocatorOrIntegral<_Hash>, │ │ │ │ -883 typename = _RequireNotAllocator<_Pred>, │ │ │ │ -884 typename = _RequireAllocator<_Allocator>> │ │ │ │ -885 unordered_set(_InputIterator, _InputIterator, │ │ │ │ -886 _u_n_o_r_d_e_r_e_d___s_e_t_<_i_n_t_>_:_:_s_i_z_e___t_y_p_e = {}, │ │ │ │ -887 _Hash = _Hash(), _Pred = _Pred(), _Allocator = _Allocator()) │ │ │ │ -888 -> unordered_set::value_type, │ │ │ │ -889 _Hash, _Pred, _Allocator>; │ │ │ │ -890 │ │ │ │ -891 template, │ │ │ │ -892 typename _Pred = equal_to<_Tp>, │ │ │ │ -893 typename _Allocator = allocator<_Tp>, │ │ │ │ -894 typename = _RequireNotAllocatorOrIntegral<_Hash>, │ │ │ │ -895 typename = _RequireNotAllocator<_Pred>, │ │ │ │ -896 typename = _RequireAllocator<_Allocator>> │ │ │ │ -897 unordered_set(initializer_list<_Tp>, │ │ │ │ -898 _u_n_o_r_d_e_r_e_d___s_e_t_<_i_n_t_>_:_:_s_i_z_e___t_y_p_e = {}, │ │ │ │ -899 _Hash = _Hash(), _Pred = _Pred(), _Allocator = _Allocator()) │ │ │ │ -900 -> unordered_set<_Tp, _Hash, _Pred, _Allocator>; │ │ │ │ -901 │ │ │ │ -902 template, │ │ │ │ -904 typename = _RequireAllocator<_Allocator>> │ │ │ │ -905 unordered_set(_InputIterator, _InputIterator, │ │ │ │ -906 _u_n_o_r_d_e_r_e_d___s_e_t_<_i_n_t_>_:_:_s_i_z_e___t_y_p_e, _Allocator) │ │ │ │ -907 -> unordered_set::value_type, │ │ │ │ -908 hash< │ │ │ │ -909 typename iterator_traits<_InputIterator>::value_type>, │ │ │ │ -910 equal_to< │ │ │ │ -911 typename iterator_traits<_InputIterator>::value_type>, │ │ │ │ -912 _Allocator>; │ │ │ │ -913 │ │ │ │ -914 template, │ │ │ │ -916 typename = _RequireNotAllocatorOrIntegral<_Hash>, │ │ │ │ -917 typename = _RequireAllocator<_Allocator>> │ │ │ │ -918 unordered_set(_InputIterator, _InputIterator, │ │ │ │ -919 _u_n_o_r_d_e_r_e_d___s_e_t_<_i_n_t_>_:_:_s_i_z_e___t_y_p_e, │ │ │ │ -920 _Hash, _Allocator) │ │ │ │ -921 -> unordered_set::value_type, │ │ │ │ -922 _Hash, │ │ │ │ -923 equal_to< │ │ │ │ -924 typename iterator_traits<_InputIterator>::value_type>, │ │ │ │ -925 _Allocator>; │ │ │ │ -926 │ │ │ │ -927 template> │ │ │ │ -929 unordered_set(initializer_list<_Tp>, │ │ │ │ -930 _u_n_o_r_d_e_r_e_d___s_e_t_<_i_n_t_>_:_:_s_i_z_e___t_y_p_e, _Allocator) │ │ │ │ -931 -> unordered_set<_Tp, hash<_Tp>, equal_to<_Tp>, _Allocator>; │ │ │ │ -932 │ │ │ │ -933 template, │ │ │ │ -935 typename = _RequireAllocator<_Allocator>> │ │ │ │ -936 unordered_set(initializer_list<_Tp>, │ │ │ │ -937 _u_n_o_r_d_e_r_e_d___s_e_t_<_i_n_t_>_:_:_s_i_z_e___t_y_p_e, _Hash, _Allocator) │ │ │ │ -938 -> unordered_set<_Tp, _Hash, equal_to<_Tp>, _Allocator>; │ │ │ │ -939 │ │ │ │ -940#endif │ │ │ │ -941 │ │ │ │ -942 /** │ │ │ │ -943 * @brief A standard container composed of equivalent keys │ │ │ │ -944 * (possibly containing multiple of each key value) in which the │ │ │ │ -945 * elements' keys are the elements themselves. │ │ │ │ -946 * │ │ │ │ -947 * @ingroup unordered_associative_containers │ │ │ │ -948 * @headerfile unordered_set │ │ │ │ -949 * @since C++11 │ │ │ │ -950 * │ │ │ │ -951 * @tparam _Value Type of key objects. │ │ │ │ -952 * @tparam _Hash Hashing function object type, defaults to hash<_Value>. │ │ │ │ -953 * @tparam _Pred Predicate function object type, defaults │ │ │ │ -954 * to equal_to<_Value>. │ │ │ │ -955 * @tparam _Alloc Allocator type, defaults to allocator<_Key>. │ │ │ │ -956 * │ │ │ │ -957 * Meets the requirements of a container, and │ │ │ │ -958 * unordered associative container │ │ │ │ -959 * │ │ │ │ -960 * Base is _Hashtable, dispatched at compile time via template │ │ │ │ -961 * alias __umset_hashtable. │ │ │ │ -962 */ │ │ │ │ -963 template, │ │ │ │ -965 typename _Pred = equal_to<_Value>, │ │ │ │ -966 typename _Alloc = allocator<_Value>> │ │ │ │ -_9_6_7 class _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t │ │ │ │ -968 { │ │ │ │ -969 typedef _____u_m_s_e_t___h_a_s_h_t_a_b_l_e_<___V_a_l_u_e_,_ ___H_a_s_h_,_ ___P_r_e_d_,_ ___A_l_l_o_c_> ___H_a_s_h_t_a_b_l_e; │ │ │ │ -970 ___H_a_s_h_t_a_b_l_e _M_h; │ │ │ │ -971 │ │ │ │ -972 public: │ │ │ │ -973 // typedefs: │ │ │ │ -974 ///@{ │ │ │ │ -975 /// Public typedefs. │ │ │ │ -_9_7_6 typedef typename _Hashtable::key_type _k_e_y___t_y_p_e; │ │ │ │ -_9_7_7 typedef typename _Hashtable::value_type _v_a_l_u_e___t_y_p_e; │ │ │ │ -_9_7_8 typedef typename _Hashtable::hasher _h_a_s_h_e_r; │ │ │ │ -_9_7_9 typedef typename _Hashtable::key_equal _k_e_y___e_q_u_a_l; │ │ │ │ -_9_8_0 typedef typename _Hashtable::allocator_type _a_l_l_o_c_a_t_o_r___t_y_p_e; │ │ │ │ -981 ///@} │ │ │ │ -982 │ │ │ │ -983 ///@{ │ │ │ │ -984 /// Iterator-related typedefs. │ │ │ │ -_9_8_5 typedef typename _Hashtable::pointer _p_o_i_n_t_e_r; │ │ │ │ -_9_8_6 typedef typename _Hashtable::const_pointer _c_o_n_s_t___p_o_i_n_t_e_r; │ │ │ │ -_9_8_7 typedef typename _Hashtable::reference _r_e_f_e_r_e_n_c_e; │ │ │ │ -_9_8_8 typedef typename _Hashtable::const_reference _c_o_n_s_t___r_e_f_e_r_e_n_c_e; │ │ │ │ -_9_8_9 typedef typename _Hashtable::iterator _i_t_e_r_a_t_o_r; │ │ │ │ -_9_9_0 typedef typename _Hashtable::const_iterator _c_o_n_s_t___i_t_e_r_a_t_o_r; │ │ │ │ -_9_9_1 typedef typename _Hashtable::local_iterator _l_o_c_a_l___i_t_e_r_a_t_o_r; │ │ │ │ -_9_9_2 typedef typename _Hashtable::const_local_iterator _c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r; │ │ │ │ -_9_9_3 typedef typename _Hashtable::size_type _s_i_z_e___t_y_p_e; │ │ │ │ -_9_9_4 typedef typename _Hashtable::difference_type _d_i_f_f_e_r_e_n_c_e___t_y_p_e; │ │ │ │ -995 ///@} │ │ │ │ -996 │ │ │ │ -997#if __cplusplus > 201402L │ │ │ │ -998 using node_type = typename _Hashtable::node_type; │ │ │ │ -999#endif │ │ │ │ -1000 │ │ │ │ -1001 // construct/destroy/copy │ │ │ │ -1002 │ │ │ │ -1003 /// Default constructor. │ │ │ │ -_1_0_0_4 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t() = default; │ │ │ │ -1005 │ │ │ │ -1006 /** │ │ │ │ -1007 * @brief Default constructor creates no elements. │ │ │ │ -1008 * @param __n Minimal initial number of buckets. │ │ │ │ -1009 * @param __hf A hash functor. │ │ │ │ -1010 * @param __eql A key equality functor. │ │ │ │ -1011 * @param __a An allocator object. │ │ │ │ -1012 */ │ │ │ │ -1013 explicit │ │ │ │ -_1_0_1_4 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t(_s_i_z_e___t_y_p_e __n, │ │ │ │ -1015 const _h_a_s_h_e_r& _____h_f = _h_a_s_h_e_r(), │ │ │ │ -1016 const _k_e_y___e_q_u_a_l& _____e_q_l = _k_e_y___e_q_u_a_l(), │ │ │ │ -1017 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a = _a_l_l_o_c_a_t_o_r___t_y_p_e()) │ │ │ │ -1018 : _M_h(__n, _____h_f, _____e_q_l, __a) │ │ │ │ -1019 { } │ │ │ │ -1020 │ │ │ │ -1021 /** │ │ │ │ -1022 * @brief Builds an %unordered_multiset from a range. │ │ │ │ -1023 * @param __first An input iterator. │ │ │ │ -1024 * @param __last An input iterator. │ │ │ │ -1025 * @param __n Minimal initial number of buckets. │ │ │ │ -1026 * @param __hf A hash functor. │ │ │ │ -1027 * @param __eql A key equality functor. │ │ │ │ -1028 * @param __a An allocator object. │ │ │ │ -1029 * │ │ │ │ -1030 * Create an %unordered_multiset consisting of copies of the elements │ │ │ │ -1031 * from [__first,__last). This is linear in N (where N is │ │ │ │ -1032 * distance(__first,__last)). │ │ │ │ -1033 */ │ │ │ │ -1034 template │ │ │ │ -_1_0_3_5 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t(___I_n_p_u_t_I_t_e_r_a_t_o_r __first, ___I_n_p_u_t_I_t_e_r_a_t_o_r __last, │ │ │ │ -1036 _s_i_z_e___t_y_p_e __n = 0, │ │ │ │ -1037 const _h_a_s_h_e_r& _____h_f = _h_a_s_h_e_r(), │ │ │ │ -1038 const _k_e_y___e_q_u_a_l& _____e_q_l = _k_e_y___e_q_u_a_l(), │ │ │ │ -1039 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a = _a_l_l_o_c_a_t_o_r___t_y_p_e()) │ │ │ │ -1040 : _M_h(__first, __last, __n, _____h_f, _____e_q_l, __a) │ │ │ │ -1041 { } │ │ │ │ -1042 │ │ │ │ -1043 /// Copy constructor. │ │ │ │ -_1_0_4_4 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t(const _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t&) = default; │ │ │ │ -1045 │ │ │ │ -1046 /// Move constructor. │ │ │ │ -_1_0_4_7 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t(_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t&&) = default; │ │ │ │ -1048 │ │ │ │ -1049 /** │ │ │ │ -1050 * @brief Builds an %unordered_multiset from an initializer_list. │ │ │ │ -1051 * @param __l An initializer_list. │ │ │ │ -1052 * @param __n Minimal initial number of buckets. │ │ │ │ -1053 * @param __hf A hash functor. │ │ │ │ -1054 * @param __eql A key equality functor. │ │ │ │ -1055 * @param __a An allocator object. │ │ │ │ -1056 * │ │ │ │ -1057 * Create an %unordered_multiset consisting of copies of the elements in │ │ │ │ -1058 * the list. This is linear in N (where N is @a __l.size()). │ │ │ │ -1059 */ │ │ │ │ -_1_0_6_0 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t(_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t_<_v_a_l_u_e___t_y_p_e_> _____l, │ │ │ │ -1061 _s_i_z_e___t_y_p_e __n = 0, │ │ │ │ -1062 const _h_a_s_h_e_r& _____h_f = _h_a_s_h_e_r(), │ │ │ │ -1063 const _k_e_y___e_q_u_a_l& _____e_q_l = _k_e_y___e_q_u_a_l(), │ │ │ │ -1064 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a = _a_l_l_o_c_a_t_o_r___t_y_p_e()) │ │ │ │ -1065 : _M_h(_____l, __n, _____h_f, _____e_q_l, __a) │ │ │ │ -1066 { } │ │ │ │ -1067 │ │ │ │ -1068 /// Copy assignment operator. │ │ │ │ -1069 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t& │ │ │ │ -_1_0_7_0 _o_p_e_r_a_t_o_r_=(const _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t&) = default; │ │ │ │ -1071 │ │ │ │ -1072 /// Move assignment operator. │ │ │ │ -1073 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t& │ │ │ │ -_1_0_7_4 _o_p_e_r_a_t_o_r_=(_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t&&) = default; │ │ │ │ -1075 │ │ │ │ -1076 /** │ │ │ │ -1077 * @brief Creates an %unordered_multiset with no elements. │ │ │ │ -1078 * @param __a An allocator object. │ │ │ │ -1079 */ │ │ │ │ -1080 explicit │ │ │ │ -_1_0_8_1 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t(const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -1082 : _M_h(__a) │ │ │ │ -1083 { } │ │ │ │ -1084 │ │ │ │ -1085 /* │ │ │ │ -1086 * @brief Copy constructor with allocator argument. │ │ │ │ -1087 * @param __uset Input %unordered_multiset to copy. │ │ │ │ -1088 * @param __a An allocator object. │ │ │ │ -1089 */ │ │ │ │ -1090 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t(const _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t& _____u_m_s_e_t, │ │ │ │ -1091 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -1092 : _M_h(_____u_m_s_e_t._M_h, __a) │ │ │ │ -1093 { } │ │ │ │ -1094 │ │ │ │ -1095 /* │ │ │ │ -1096 * @brief Move constructor with allocator argument. │ │ │ │ -1097 * @param __umset Input %unordered_multiset to move. │ │ │ │ -1098 * @param __a An allocator object. │ │ │ │ -1099 */ │ │ │ │ -1100 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t(_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t&& __umset, │ │ │ │ -1101 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -1102 noexcept( noexcept(_Hashtable(_s_t_d_:_:_m_o_v_e(__umset._M_h), __a)) ) │ │ │ │ -1103 : _M_h(_s_t_d_:_:_m_o_v_e(__umset._M_h), __a) │ │ │ │ -1104 { } │ │ │ │ -1105 │ │ │ │ -1106 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t(_s_i_z_e___t_y_p_e __n, const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -1107 : _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t(__n, _h_a_s_h_e_r(), _k_e_y___e_q_u_a_l(), __a) │ │ │ │ -1108 { } │ │ │ │ -1109 │ │ │ │ -1110 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t(_s_i_z_e___t_y_p_e __n, const _h_a_s_h_e_r& __hf, │ │ │ │ -1111 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -1112 : _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t(__n, __hf, _k_e_y___e_q_u_a_l(), __a) │ │ │ │ -1113 { } │ │ │ │ -1114 │ │ │ │ -1115 template │ │ │ │ -1116 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t(_InputIterator __first, _InputIterator __last, │ │ │ │ -1117 _s_i_z_e___t_y_p_e __n, │ │ │ │ -1118 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -1119 : _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t(__first, __last, __n, _h_a_s_h_e_r(), _k_e_y___e_q_u_a_l(), __a) │ │ │ │ -1120 { } │ │ │ │ -1121 │ │ │ │ -1122 template │ │ │ │ -1123 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t(_InputIterator __first, _InputIterator __last, │ │ │ │ -1124 _s_i_z_e___t_y_p_e __n, const _h_a_s_h_e_r& __hf, │ │ │ │ -1125 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -1126 : _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t(__first, __last, __n, __hf, _k_e_y___e_q_u_a_l(), __a) │ │ │ │ -1127 { } │ │ │ │ -1128 │ │ │ │ -1129 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t(initializer_list __l, │ │ │ │ -1130 _s_i_z_e___t_y_p_e __n, │ │ │ │ -1131 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -1132 : _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t(__l, __n, _h_a_s_h_e_r(), _k_e_y___e_q_u_a_l(), __a) │ │ │ │ -1133 { } │ │ │ │ -1134 │ │ │ │ -1135 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t(initializer_list __l, │ │ │ │ -1136 _s_i_z_e___t_y_p_e __n, const _h_a_s_h_e_r& __hf, │ │ │ │ -1137 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -1138 : _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t(__l, __n, __hf, _k_e_y___e_q_u_a_l(), __a) │ │ │ │ -1139 { } │ │ │ │ -1140 │ │ │ │ -1141 /** │ │ │ │ -1142 * @brief %Unordered_multiset list assignment operator. │ │ │ │ -1143 * @param __l An initializer_list. │ │ │ │ -1144 * │ │ │ │ -1145 * This function fills an %unordered_multiset with copies of the elements │ │ │ │ -1146 * in the initializer list @a __l. │ │ │ │ -1147 * │ │ │ │ -1148 * Note that the assignment completely changes the %unordered_multiset │ │ │ │ -1149 * and that the resulting %unordered_multiset's size is the same as the │ │ │ │ -1150 * number of elements assigned. │ │ │ │ -1151 */ │ │ │ │ -1152 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t& │ │ │ │ -_1_1_5_3 _o_p_e_r_a_t_o_r_=(_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t_<_v_a_l_u_e___t_y_p_e_> _____l) │ │ │ │ -1154 { │ │ │ │ -1155 _M_h = _____l; │ │ │ │ -1156 return *this; │ │ │ │ -1157 } │ │ │ │ -1158 │ │ │ │ -1159 /// Returns the allocator object used by the %unordered_multiset. │ │ │ │ -1160 _a_l_l_o_c_a_t_o_r___t_y_p_e │ │ │ │ -_1_1_6_1 _g_e_t___a_l_l_o_c_a_t_o_r() const noexcept │ │ │ │ -1162 { return _M_h.get_allocator(); } │ │ │ │ -1163 │ │ │ │ -1164 // size and capacity: │ │ │ │ -1165 │ │ │ │ -1166 /// Returns true if the %unordered_multiset is empty. │ │ │ │ -1167 _GLIBCXX_NODISCARD bool │ │ │ │ -_1_1_6_8 _e_m_p_t_y() const noexcept │ │ │ │ -1169 { return _M_h.empty(); } │ │ │ │ -1170 │ │ │ │ -1171 /// Returns the size of the %unordered_multiset. │ │ │ │ -1172 _s_i_z_e___t_y_p_e │ │ │ │ -_1_1_7_3 _s_i_z_e() const noexcept │ │ │ │ -1174 { return _M_h.size(); } │ │ │ │ -1175 │ │ │ │ -1176 /// Returns the maximum size of the %unordered_multiset. │ │ │ │ -1177 _s_i_z_e___t_y_p_e │ │ │ │ -_1_1_7_8 _m_a_x___s_i_z_e() const noexcept │ │ │ │ -1179 { return _M_h.max_size(); } │ │ │ │ -1180 │ │ │ │ -1181 // iterators. │ │ │ │ -1182 │ │ │ │ -1183 ///@{ │ │ │ │ -1184 /** │ │ │ │ -1185 * Returns a read-only (constant) iterator that points to the first │ │ │ │ -1186 * element in the %unordered_multiset. │ │ │ │ -1187 */ │ │ │ │ -1188 _i_t_e_r_a_t_o_r │ │ │ │ -_1_1_8_9 _b_e_g_i_n() noexcept │ │ │ │ -1190 { return _M_h.begin(); } │ │ │ │ -1191 │ │ │ │ -1192 _c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ -_1_1_9_3 _b_e_g_i_n() const noexcept │ │ │ │ -1194 { return _M_h.begin(); } │ │ │ │ -1195 ///@} │ │ │ │ -1196 │ │ │ │ -1197 ///@{ │ │ │ │ -1198 /** │ │ │ │ -1199 * Returns a read-only (constant) iterator that points one past the last │ │ │ │ -1200 * element in the %unordered_multiset. │ │ │ │ -1201 */ │ │ │ │ -1202 _i_t_e_r_a_t_o_r │ │ │ │ -_1_2_0_3 _e_n_d() noexcept │ │ │ │ -1204 { return _M_h.end(); } │ │ │ │ -1205 │ │ │ │ -1206 _c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ -_1_2_0_7 _e_n_d() const noexcept │ │ │ │ -1208 { return _M_h.end(); } │ │ │ │ -1209 ///@} │ │ │ │ -1210 │ │ │ │ -1211 /** │ │ │ │ -1212 * Returns a read-only (constant) iterator that points to the first │ │ │ │ -1213 * element in the %unordered_multiset. │ │ │ │ -1214 */ │ │ │ │ -1215 _c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ -_1_2_1_6 _c_b_e_g_i_n() const noexcept │ │ │ │ -1217 { return _M_h.begin(); } │ │ │ │ -1218 │ │ │ │ -1219 /** │ │ │ │ -1220 * Returns a read-only (constant) iterator that points one past the last │ │ │ │ -1221 * element in the %unordered_multiset. │ │ │ │ -1222 */ │ │ │ │ -1223 _c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ -_1_2_2_4 _c_e_n_d() const noexcept │ │ │ │ -1225 { return _M_h.end(); } │ │ │ │ -1226 │ │ │ │ -1227 // modifiers. │ │ │ │ -1228 │ │ │ │ -1229 /** │ │ │ │ -1230 * @brief Builds and insert an element into the %unordered_multiset. │ │ │ │ -1231 * @param __args Arguments used to generate an element. │ │ │ │ -1232 * @return An iterator that points to the inserted element. │ │ │ │ -1233 * │ │ │ │ -1234 * Insertion requires amortized constant time. │ │ │ │ -1235 */ │ │ │ │ -1236 template │ │ │ │ -1237 _i_t_e_r_a_t_o_r │ │ │ │ -_1_2_3_8 _e_m_p_l_a_c_e(___A_r_g_s&&... _____a_r_g_s) │ │ │ │ -1239 { return _M_h.emplace(_s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(_____a_r_g_s)...); } │ │ │ │ -1240 │ │ │ │ -1241 /** │ │ │ │ -1242 * @brief Inserts an element into the %unordered_multiset. │ │ │ │ -1243 * @param __pos An iterator that serves as a hint as to where the │ │ │ │ -1244 * element should be inserted. │ │ │ │ -1245 * @param __args Arguments used to generate the element to be │ │ │ │ -1246 * inserted. │ │ │ │ -1247 * @return An iterator that points to the inserted element. │ │ │ │ -1248 * │ │ │ │ -1249 * Note that the first parameter is only a hint and can potentially │ │ │ │ -1250 * improve the performance of the insertion process. A bad hint would │ │ │ │ -1251 * cause no gains in efficiency. │ │ │ │ -1252 * │ │ │ │ -1253 * For more on @a hinting, see: │ │ │ │ -1254 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/ │ │ │ │ -associative.html#containers.associative.insert_hints │ │ │ │ -1255 * │ │ │ │ -1256 * Insertion requires amortized constant time. │ │ │ │ -1257 */ │ │ │ │ -1258 template │ │ │ │ -1259 _i_t_e_r_a_t_o_r │ │ │ │ -_1_2_6_0 _e_m_p_l_a_c_e___h_i_n_t(_c_o_n_s_t___i_t_e_r_a_t_o_r _____p_o_s, ___A_r_g_s&&... _____a_r_g_s) │ │ │ │ -1261 { return _M_h.emplace_hint(_____p_o_s, _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(_____a_r_g_s)...); } │ │ │ │ -1262 │ │ │ │ -1263 ///@{ │ │ │ │ -1264 /** │ │ │ │ -1265 * @brief Inserts an element into the %unordered_multiset. │ │ │ │ -1266 * @param __x Element to be inserted. │ │ │ │ -1267 * @return An iterator that points to the inserted element. │ │ │ │ -1268 * │ │ │ │ -1269 * Insertion requires amortized constant time. │ │ │ │ -1270 */ │ │ │ │ -1271 _i_t_e_r_a_t_o_r │ │ │ │ -_1_2_7_2 _i_n_s_e_r_t(const _v_a_l_u_e___t_y_p_e& __x) │ │ │ │ -1273 { return _M_h.insert(__x); } │ │ │ │ -1274 │ │ │ │ -1275 _i_t_e_r_a_t_o_r │ │ │ │ -_1_2_7_6 _i_n_s_e_r_t(_v_a_l_u_e___t_y_p_e&& __x) │ │ │ │ -1277 { return _M_h.insert(_s_t_d_:_:_m_o_v_e(__x)); } │ │ │ │ -1278 ///@} │ │ │ │ -1279 │ │ │ │ -1280 ///@{ │ │ │ │ -1281 /** │ │ │ │ -1282 * @brief Inserts an element into the %unordered_multiset. │ │ │ │ -1283 * @param __hint An iterator that serves as a hint as to where the │ │ │ │ -1284 * element should be inserted. │ │ │ │ -1285 * @param __x Element to be inserted. │ │ │ │ -1286 * @return An iterator that points to the inserted element. │ │ │ │ -1287 * │ │ │ │ -1288 * Note that the first parameter is only a hint and can potentially │ │ │ │ -1289 * improve the performance of the insertion process. A bad hint would │ │ │ │ -1290 * cause no gains in efficiency. │ │ │ │ -1291 * │ │ │ │ -1292 * For more on @a hinting, see: │ │ │ │ -1293 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/ │ │ │ │ -associative.html#containers.associative.insert_hints │ │ │ │ -1294 * │ │ │ │ -1295 * Insertion requires amortized constant. │ │ │ │ -1296 */ │ │ │ │ -1297 _i_t_e_r_a_t_o_r │ │ │ │ -_1_2_9_8 _i_n_s_e_r_t(_c_o_n_s_t___i_t_e_r_a_t_o_r _____h_i_n_t, const _v_a_l_u_e___t_y_p_e& __x) │ │ │ │ -1299 { return _M_h.insert(_____h_i_n_t, __x); } │ │ │ │ -1300 │ │ │ │ -1301 _i_t_e_r_a_t_o_r │ │ │ │ -_1_3_0_2 _i_n_s_e_r_t(_c_o_n_s_t___i_t_e_r_a_t_o_r _____h_i_n_t, _v_a_l_u_e___t_y_p_e&& __x) │ │ │ │ -1303 { return _M_h.insert(_____h_i_n_t, _s_t_d_:_:_m_o_v_e(__x)); } │ │ │ │ -1304 ///@} │ │ │ │ -1305 │ │ │ │ -1306 /** │ │ │ │ -1307 * @brief A template function that inserts a range of elements. │ │ │ │ -1308 * @param __first Iterator pointing to the start of the range to be │ │ │ │ -1309 * inserted. │ │ │ │ -1310 * @param __last Iterator pointing to the end of the range. │ │ │ │ -1311 * │ │ │ │ -1312 * Complexity similar to that of the range constructor. │ │ │ │ -1313 */ │ │ │ │ -1314 template │ │ │ │ -1315 void │ │ │ │ -_1_3_1_6 _i_n_s_e_r_t(___I_n_p_u_t_I_t_e_r_a_t_o_r __first, ___I_n_p_u_t_I_t_e_r_a_t_o_r __last) │ │ │ │ -1317 { _M_h.insert(__first, __last); } │ │ │ │ -1318 │ │ │ │ -1319 /** │ │ │ │ -1320 * @brief Inserts a list of elements into the %unordered_multiset. │ │ │ │ -1321 * @param __l A std::initializer_list of elements to be │ │ │ │ -1322 * inserted. │ │ │ │ -1323 * │ │ │ │ -1324 * Complexity similar to that of the range constructor. │ │ │ │ -1325 */ │ │ │ │ -1326 void │ │ │ │ -_1_3_2_7 _i_n_s_e_r_t(_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t_<_v_a_l_u_e___t_y_p_e_> _____l) │ │ │ │ -1328 { _M_h.insert(_____l); } │ │ │ │ -1329 │ │ │ │ -1330#if __cplusplus > 201402L │ │ │ │ -1331 /// Extract a node. │ │ │ │ -1332 node_type │ │ │ │ -_1_3_3_3 _e_x_t_r_a_c_t(_c_o_n_s_t___i_t_e_r_a_t_o_r _____p_o_s) │ │ │ │ -1334 { │ │ │ │ -1335 __glibcxx_assert(_____p_o_s != _e_n_d()); │ │ │ │ -1336 return _M_h.extract(_____p_o_s); │ │ │ │ -1337 } │ │ │ │ -1338 │ │ │ │ -1339 /// Extract a node. │ │ │ │ -1340 node_type │ │ │ │ -_1_3_4_1 _e_x_t_r_a_c_t(const _k_e_y___t_y_p_e& _____k_e_y) │ │ │ │ -1342 { return _M_h.extract(_____k_e_y); } │ │ │ │ -1343 │ │ │ │ -1344 /// Re-insert an extracted node. │ │ │ │ -1345 _i_t_e_r_a_t_o_r │ │ │ │ -_1_3_4_6 _i_n_s_e_r_t(node_type&& _____n_h) │ │ │ │ -1347 { return _M_h._M_reinsert_node_multi(_c_e_n_d(), _s_t_d_:_:_m_o_v_e(_____n_h)); } │ │ │ │ -1348 │ │ │ │ -1349 /// Re-insert an extracted node. │ │ │ │ -1350 _i_t_e_r_a_t_o_r │ │ │ │ -_1_3_5_1 _i_n_s_e_r_t(_c_o_n_s_t___i_t_e_r_a_t_o_r _____h_i_n_t, node_type&& _____n_h) │ │ │ │ -1352 { return _M_h._M_reinsert_node_multi(_____h_i_n_t, _s_t_d_:_:_m_o_v_e(_____n_h)); } │ │ │ │ -1353#endif // C++17 │ │ │ │ -1354 │ │ │ │ -1355 ///@{ │ │ │ │ -1356 /** │ │ │ │ -1357 * @brief Erases an element from an %unordered_multiset. │ │ │ │ -1358 * @param __position An iterator pointing to the element to be erased. │ │ │ │ -1359 * @return An iterator pointing to the element immediately following │ │ │ │ -1360 * @a __position prior to the element being erased. If no such │ │ │ │ -1361 * element exists, end() is returned. │ │ │ │ -1362 * │ │ │ │ -1363 * This function erases an element, pointed to by the given iterator, │ │ │ │ -1364 * from an %unordered_multiset. │ │ │ │ -1365 * │ │ │ │ -1366 * Note that this function only erases the element, and that if the │ │ │ │ -1367 * element is itself a pointer, the pointed-to memory is not touched in │ │ │ │ -1368 * any way. Managing the pointer is the user's responsibility. │ │ │ │ -1369 */ │ │ │ │ -1370 _i_t_e_r_a_t_o_r │ │ │ │ -_1_3_7_1 _e_r_a_s_e(_c_o_n_s_t___i_t_e_r_a_t_o_r _____p_o_s_i_t_i_o_n) │ │ │ │ -1372 { return _M_h.erase(_____p_o_s_i_t_i_o_n); } │ │ │ │ -1373 │ │ │ │ -1374 // LWG 2059. │ │ │ │ -1375 _i_t_e_r_a_t_o_r │ │ │ │ -_1_3_7_6 _e_r_a_s_e(_i_t_e_r_a_t_o_r _____p_o_s_i_t_i_o_n) │ │ │ │ -1377 { return _M_h.erase(_____p_o_s_i_t_i_o_n); } │ │ │ │ -1378 ///@} │ │ │ │ -1379 │ │ │ │ -1380 │ │ │ │ -1381 /** │ │ │ │ -1382 * @brief Erases elements according to the provided key. │ │ │ │ -1383 * @param __x Key of element to be erased. │ │ │ │ -1384 * @return The number of elements erased. │ │ │ │ -1385 * │ │ │ │ -1386 * This function erases all the elements located by the given key from │ │ │ │ -1387 * an %unordered_multiset. │ │ │ │ -1388 * │ │ │ │ -1389 * Note that this function only erases the element, and that if the │ │ │ │ -1390 * element is itself a pointer, the pointed-to memory is not touched in │ │ │ │ -1391 * any way. Managing the pointer is the user's responsibility. │ │ │ │ -1392 */ │ │ │ │ -1393 _s_i_z_e___t_y_p_e │ │ │ │ -_1_3_9_4 _e_r_a_s_e(const _k_e_y___t_y_p_e& __x) │ │ │ │ -1395 { return _M_h.erase(__x); } │ │ │ │ -1396 │ │ │ │ -1397 /** │ │ │ │ -1398 * @brief Erases a [__first,__last) range of elements from an │ │ │ │ -1399 * %unordered_multiset. │ │ │ │ -1400 * @param __first Iterator pointing to the start of the range to be │ │ │ │ -1401 * erased. │ │ │ │ -1402 * @param __last Iterator pointing to the end of the range to │ │ │ │ -1403 * be erased. │ │ │ │ -1404 * @return The iterator @a __last. │ │ │ │ -1405 * │ │ │ │ -1406 * This function erases a sequence of elements from an │ │ │ │ -1407 * %unordered_multiset. │ │ │ │ -1408 * │ │ │ │ -1409 * Note that this function only erases the element, and that if │ │ │ │ -1410 * the element is itself a pointer, the pointed-to memory is not touched │ │ │ │ -1411 * in any way. Managing the pointer is the user's responsibility. │ │ │ │ -1412 */ │ │ │ │ -1413 _i_t_e_r_a_t_o_r │ │ │ │ -_1_4_1_4 _e_r_a_s_e(_c_o_n_s_t___i_t_e_r_a_t_o_r __first, _c_o_n_s_t___i_t_e_r_a_t_o_r __last) │ │ │ │ -1415 { return _M_h.erase(__first, __last); } │ │ │ │ -1416 │ │ │ │ -1417 /** │ │ │ │ -1418 * Erases all elements in an %unordered_multiset. │ │ │ │ -1419 * │ │ │ │ -1420 * Note that this function only erases the elements, and that if the │ │ │ │ -1421 * elements themselves are pointers, the pointed-to memory is not touched │ │ │ │ -1422 * in any way. Managing the pointer is the user's responsibility. │ │ │ │ -1423 */ │ │ │ │ -1424 void │ │ │ │ -_1_4_2_5 _c_l_e_a_r() noexcept │ │ │ │ -1426 { _M_h.clear(); } │ │ │ │ -1427 │ │ │ │ -1428 /** │ │ │ │ -1429 * @brief Swaps data with another %unordered_multiset. │ │ │ │ -1430 * @param __x An %unordered_multiset of the same element and allocator │ │ │ │ -1431 * types. │ │ │ │ -1432 * │ │ │ │ -1433 * This exchanges the elements between two sets in constant time. │ │ │ │ -1434 * Note that the global std::swap() function is specialized such that │ │ │ │ -1435 * std::swap(s1,s2) will feed to this function. │ │ │ │ -1436 */ │ │ │ │ -1437 void │ │ │ │ -_1_4_3_8 _s_w_a_p(_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t& __x) │ │ │ │ -1439 noexcept( noexcept(_M_h.swap(__x._M_h)) ) │ │ │ │ -1440 { _M_h.swap(__x._M_h); } │ │ │ │ -1441 │ │ │ │ -1442#if __cplusplus > 201402L │ │ │ │ -1443 template │ │ │ │ -1444 friend class std::_Hash_merge_helper; │ │ │ │ -1445 │ │ │ │ -1446 template │ │ │ │ -1447 void │ │ │ │ -1448 merge(_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_<___V_a_l_u_e_,_ ___H_2_,_ ___P_2_,_ ___A_l_l_o_c_>& _____s_o_u_r_c_e) │ │ │ │ -1449 { │ │ │ │ -1450 using ___M_e_r_g_e___h_e_l_p_e_r │ │ │ │ -1451 = ___H_a_s_h___m_e_r_g_e___h_e_l_p_e_r_<_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_,_ ___H_2_,_ ___P_2_>; │ │ │ │ -1452 _M_h._M_merge_multi(_Merge_helper::_S_get_table(_____s_o_u_r_c_e)); │ │ │ │ -1453 } │ │ │ │ -1454 │ │ │ │ -1455 template │ │ │ │ -1456 void │ │ │ │ -1457 merge(unordered_multiset<_Value, _H2, _P2, _Alloc>&& __source) │ │ │ │ -1458 { merge(__source); } │ │ │ │ -1459 │ │ │ │ -1460 template │ │ │ │ -1461 void │ │ │ │ -1462 merge(unordered_set<_Value, _H2, _P2, _Alloc>& __source) │ │ │ │ -1463 { │ │ │ │ -1464 using _Merge_helper │ │ │ │ -1465 = _Hash_merge_helper; │ │ │ │ -1466 _M_h._M_merge_multi(_Merge_helper::_S_get_table(__source)); │ │ │ │ -1467 } │ │ │ │ -1468 │ │ │ │ -1469 template │ │ │ │ -1470 void │ │ │ │ -1471 merge(unordered_set<_Value, _H2, _P2, _Alloc>&& __source) │ │ │ │ -1472 { merge(__source); } │ │ │ │ -1473#endif // C++17 │ │ │ │ -1474 │ │ │ │ -1475 // observers. │ │ │ │ -1476 │ │ │ │ -1477 /// Returns the hash functor object with which the %unordered_multiset │ │ │ │ -1478 /// was constructed. │ │ │ │ -1479 _h_a_s_h_e_r │ │ │ │ -_1_4_8_0 _h_a_s_h___f_u_n_c_t_i_o_n() const │ │ │ │ -1481 { return _M_h.hash_function(); } │ │ │ │ -1482 │ │ │ │ -1483 /// Returns the key comparison object with which the %unordered_multiset │ │ │ │ -1484 /// was constructed. │ │ │ │ -1485 _k_e_y___e_q_u_a_l │ │ │ │ -_1_4_8_6 _k_e_y___e_q() const │ │ │ │ -1487 { return _M_h.key_eq(); } │ │ │ │ -1488 │ │ │ │ -1489 // lookup. │ │ │ │ -1490 │ │ │ │ -1491 ///@{ │ │ │ │ -1492 /** │ │ │ │ -1493 * @brief Tries to locate an element in an %unordered_multiset. │ │ │ │ -1494 * @param __x Element to be located. │ │ │ │ -1495 * @return Iterator pointing to sought-after element, or end() if not │ │ │ │ -1496 * found. │ │ │ │ -1497 * │ │ │ │ -1498 * This function takes a key and tries to locate the element with which │ │ │ │ -1499 * the key matches. If successful the function returns an iterator │ │ │ │ -1500 * pointing to the sought after element. If unsuccessful it returns the │ │ │ │ -1501 * past-the-end ( @c end() ) iterator. │ │ │ │ -1502 */ │ │ │ │ -1503 _i_t_e_r_a_t_o_r │ │ │ │ -_1_5_0_4 _f_i_n_d(const _k_e_y___t_y_p_e& __x) │ │ │ │ -1505 { return _M_h.find(__x); } │ │ │ │ -1506 │ │ │ │ -1507#if __cplusplus > 201703L │ │ │ │ -1508 template │ │ │ │ -1509 auto │ │ │ │ -_1_5_1_0 _f_i_n_d(const ___K_t& __x) │ │ │ │ -1511 -> decltype(_M_h._M_find_tr(__x)) │ │ │ │ -1512 { return _M_h._M_find_tr(__x); } │ │ │ │ -1513#endif │ │ │ │ -1514 │ │ │ │ -1515 _c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ -_1_5_1_6 _f_i_n_d(const _k_e_y___t_y_p_e& __x) const │ │ │ │ -1517 { return _M_h.find(__x); } │ │ │ │ -1518 │ │ │ │ -1519#if __cplusplus > 201703L │ │ │ │ -1520 template │ │ │ │ -1521 auto │ │ │ │ -_1_5_2_2 _f_i_n_d(const ___K_t& __x) const │ │ │ │ -1523 -> decltype(_M_h._M_find_tr(__x)) │ │ │ │ -1524 { return _M_h._M_find_tr(__x); } │ │ │ │ -1525#endif │ │ │ │ -1526 ///@} │ │ │ │ -1527 │ │ │ │ -1528 ///@{ │ │ │ │ -1529 /** │ │ │ │ -1530 * @brief Finds the number of elements. │ │ │ │ -1531 * @param __x Element to located. │ │ │ │ -1532 * @return Number of elements with specified key. │ │ │ │ -1533 */ │ │ │ │ -1534 _s_i_z_e___t_y_p_e │ │ │ │ -_1_5_3_5 _c_o_u_n_t(const _k_e_y___t_y_p_e& __x) const │ │ │ │ -1536 { return _M_h.count(__x); } │ │ │ │ -1537 │ │ │ │ -1538#if __cplusplus > 201703L │ │ │ │ -1539 template │ │ │ │ -1540 auto │ │ │ │ -_1_5_4_1 _c_o_u_n_t(const ___K_t& __x) const -> decltype(_M_h._M_count_tr(__x)) │ │ │ │ -1542 { return _M_h._M_count_tr(__x); } │ │ │ │ -1543#endif │ │ │ │ -1544 ///@} │ │ │ │ -1545 │ │ │ │ -1546#if __cplusplus > 201703L │ │ │ │ -1547 ///@{ │ │ │ │ -1548 /** │ │ │ │ -1549 * @brief Finds whether an element with the given key exists. │ │ │ │ -1550 * @param __x Key of elements to be located. │ │ │ │ -1551 * @return True if there is any element with the specified key. │ │ │ │ -1552 */ │ │ │ │ -1553 bool │ │ │ │ -_1_5_5_4 _c_o_n_t_a_i_n_s(const _k_e_y___t_y_p_e& __x) const │ │ │ │ -1555 { return _M_h.find(__x) != _M_h.end(); } │ │ │ │ -1556 │ │ │ │ -1557 template │ │ │ │ -1558 auto │ │ │ │ -_1_5_5_9 _c_o_n_t_a_i_n_s(const ___K_t& __x) const │ │ │ │ -1560 -> decltype(_M_h._M_find_tr(__x), _v_o_i_d(), true) │ │ │ │ -1561 { return _M_h._M_find_tr(__x) != _M_h.end(); } │ │ │ │ -1562 ///@} │ │ │ │ -1563#endif │ │ │ │ -1564 │ │ │ │ -1565 ///@{ │ │ │ │ -1566 /** │ │ │ │ -1567 * @brief Finds a subsequence matching given key. │ │ │ │ -1568 * @param __x Key to be located. │ │ │ │ -1569 * @return Pair of iterators that possibly points to the subsequence │ │ │ │ -1570 * matching given key. │ │ │ │ -1571 */ │ │ │ │ -1572 _s_t_d_:_:_p_a_i_r_<_i_t_e_r_a_t_o_r_,_ _i_t_e_r_a_t_o_r_> │ │ │ │ -_1_5_7_3 _e_q_u_a_l___r_a_n_g_e(const _k_e_y___t_y_p_e& __x) │ │ │ │ -1574 { return _M_h.equal_range(__x); } │ │ │ │ -1575 │ │ │ │ -1576#if __cplusplus > 201703L │ │ │ │ -1577 template │ │ │ │ -1578 auto │ │ │ │ -_1_5_7_9 _e_q_u_a_l___r_a_n_g_e(const ___K_t& __x) │ │ │ │ -1580 -> decltype(_M_h._M_equal_range_tr(__x)) │ │ │ │ -1581 { return _M_h._M_equal_range_tr(__x); } │ │ │ │ -1582#endif │ │ │ │ -1583 │ │ │ │ -1584 _s_t_d_:_:_p_a_i_r_<_c_o_n_s_t___i_t_e_r_a_t_o_r_,_ _c_o_n_s_t___i_t_e_r_a_t_o_r_> │ │ │ │ -_1_5_8_5 _e_q_u_a_l___r_a_n_g_e(const _k_e_y___t_y_p_e& __x) const │ │ │ │ -1586 { return _M_h.equal_range(__x); } │ │ │ │ -1587 │ │ │ │ -1588#if __cplusplus > 201703L │ │ │ │ -1589 template │ │ │ │ -1590 auto │ │ │ │ -_1_5_9_1 _e_q_u_a_l___r_a_n_g_e(const ___K_t& __x) const │ │ │ │ -1592 -> decltype(_M_h._M_equal_range_tr(__x)) │ │ │ │ -1593 { return _M_h._M_equal_range_tr(__x); } │ │ │ │ -1594#endif │ │ │ │ -1595 ///@} │ │ │ │ -1596 │ │ │ │ -1597 // bucket interface. │ │ │ │ -1598 │ │ │ │ -1599 /// Returns the number of buckets of the %unordered_multiset. │ │ │ │ -1600 _s_i_z_e___t_y_p_e │ │ │ │ -_1_6_0_1 _b_u_c_k_e_t___c_o_u_n_t() const noexcept │ │ │ │ -1602 { return _M_h.bucket_count(); } │ │ │ │ -1603 │ │ │ │ -1604 /// Returns the maximum number of buckets of the %unordered_multiset. │ │ │ │ -1605 _s_i_z_e___t_y_p_e │ │ │ │ -_1_6_0_6 _m_a_x___b_u_c_k_e_t___c_o_u_n_t() const noexcept │ │ │ │ -1607 { return _M_h.max_bucket_count(); } │ │ │ │ -1608 │ │ │ │ -1609 /* │ │ │ │ -1610 * @brief Returns the number of elements in a given bucket. │ │ │ │ -1611 * @param __n A bucket index. │ │ │ │ -1612 * @return The number of elements in the bucket. │ │ │ │ -1613 */ │ │ │ │ -1614 _s_i_z_e___t_y_p_e │ │ │ │ -1615 bucket_size(_s_i_z_e___t_y_p_e __n) const │ │ │ │ -1616 { return _M_h.bucket_size(__n); } │ │ │ │ -1617 │ │ │ │ -1618 /* │ │ │ │ -1619 * @brief Returns the bucket index of a given element. │ │ │ │ -1620 * @param __key A key instance. │ │ │ │ -1621 * @return The key bucket index. │ │ │ │ -1622 */ │ │ │ │ -1623 _s_i_z_e___t_y_p_e │ │ │ │ -1624 bucket(const _k_e_y___t_y_p_e& __key) const │ │ │ │ -1625 { return _M_h.bucket(__key); } │ │ │ │ -1626 │ │ │ │ -1627 ///@{ │ │ │ │ -1628 /** │ │ │ │ -1629 * @brief Returns a read-only (constant) iterator pointing to the first │ │ │ │ -1630 * bucket element. │ │ │ │ -1631 * @param __n The bucket index. │ │ │ │ -1632 * @return A read-only local iterator. │ │ │ │ -1633 */ │ │ │ │ -1634 _l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_1_6_3_5 _b_e_g_i_n(_s_i_z_e___t_y_p_e __n) │ │ │ │ -1636 { return _M_h.begin(__n); } │ │ │ │ -1637 │ │ │ │ -1638 _c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_1_6_3_9 _b_e_g_i_n(_s_i_z_e___t_y_p_e __n) const │ │ │ │ -1640 { return _M_h.begin(__n); } │ │ │ │ -1641 │ │ │ │ -1642 _c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_1_6_4_3 _c_b_e_g_i_n(_s_i_z_e___t_y_p_e __n) const │ │ │ │ -1644 { return _M_h.cbegin(__n); } │ │ │ │ -1645 ///@} │ │ │ │ -1646 │ │ │ │ -1647 ///@{ │ │ │ │ -1648 /** │ │ │ │ -1649 * @brief Returns a read-only (constant) iterator pointing to one past │ │ │ │ -1650 * the last bucket elements. │ │ │ │ -1651 * @param __n The bucket index. │ │ │ │ -1652 * @return A read-only local iterator. │ │ │ │ -1653 */ │ │ │ │ -1654 _l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_1_6_5_5 _e_n_d(_s_i_z_e___t_y_p_e __n) │ │ │ │ -1656 { return _M_h.end(__n); } │ │ │ │ -1657 │ │ │ │ -1658 _c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_1_6_5_9 _e_n_d(_s_i_z_e___t_y_p_e __n) const │ │ │ │ -1660 { return _M_h.end(__n); } │ │ │ │ -1661 │ │ │ │ -1662 _c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_1_6_6_3 _c_e_n_d(_s_i_z_e___t_y_p_e __n) const │ │ │ │ -1664 { return _M_h.cend(__n); } │ │ │ │ -1665 ///@} │ │ │ │ -1666 │ │ │ │ -1667 // hash policy. │ │ │ │ -1668 │ │ │ │ -1669 /// Returns the average number of elements per bucket. │ │ │ │ -1670 float │ │ │ │ -_1_6_7_1 _l_o_a_d___f_a_c_t_o_r() const noexcept │ │ │ │ -1672 { return _M_h.load_factor(); } │ │ │ │ -1673 │ │ │ │ -1674 /// Returns a positive number that the %unordered_multiset tries to keep │ │ │ │ -the │ │ │ │ -1675 /// load factor less than or equal to. │ │ │ │ -1676 float │ │ │ │ -_1_6_7_7 _m_a_x___l_o_a_d___f_a_c_t_o_r() const noexcept │ │ │ │ -1678 { return _M_h.max_load_factor(); } │ │ │ │ -1679 │ │ │ │ -1680 /** │ │ │ │ -1681 * @brief Change the %unordered_multiset maximum load factor. │ │ │ │ -1682 * @param __z The new maximum load factor. │ │ │ │ -1683 */ │ │ │ │ -1684 void │ │ │ │ -_1_6_8_5 _m_a_x___l_o_a_d___f_a_c_t_o_r(float _____z) │ │ │ │ -1686 { _M_h.max_load_factor(_____z); } │ │ │ │ -1687 │ │ │ │ -1688 /** │ │ │ │ -1689 * @brief May rehash the %unordered_multiset. │ │ │ │ -1690 * @param __n The new number of buckets. │ │ │ │ -1691 * │ │ │ │ -1692 * Rehash will occur only if the new number of buckets respect the │ │ │ │ -1693 * %unordered_multiset maximum load factor. │ │ │ │ -1694 */ │ │ │ │ -1695 void │ │ │ │ -_1_6_9_6 _r_e_h_a_s_h(_s_i_z_e___t_y_p_e __n) │ │ │ │ -1697 { _M_h.rehash(__n); } │ │ │ │ -1698 │ │ │ │ -1699 /** │ │ │ │ -1700 * @brief Prepare the %unordered_multiset for a specified number of │ │ │ │ -1701 * elements. │ │ │ │ -1702 * @param __n Number of elements required. │ │ │ │ -1703 * │ │ │ │ -1704 * Same as rehash(ceil(n / max_load_factor())). │ │ │ │ -1705 */ │ │ │ │ -1706 void │ │ │ │ -_1_7_0_7 _r_e_s_e_r_v_e(_s_i_z_e___t_y_p_e __n) │ │ │ │ -1708 { _M_h.reserve(__n); } │ │ │ │ -1709 │ │ │ │ -1710 template │ │ │ │ -1712 friend bool │ │ │ │ -1713 operator==(const _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_<___V_a_l_u_e_1_,_ ___H_a_s_h_1_,_ ___P_r_e_d_1_,_ ___A_l_l_o_c_1_>&, │ │ │ │ -1714 const _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_<___V_a_l_u_e_1_,_ ___H_a_s_h_1_,_ ___P_r_e_d_1_,_ ___A_l_l_o_c_1_>&); │ │ │ │ -1715 }; │ │ │ │ -1716 │ │ │ │ -1717 │ │ │ │ -1718#if __cpp_deduction_guides >= 201606 │ │ │ │ -1719 │ │ │ │ -1720 template::value_type>, │ │ │ │ -1723 typename _Pred = │ │ │ │ -1724 equal_to::value_type>, │ │ │ │ -1725 typename _Allocator = │ │ │ │ -1726 allocator::value_type>, │ │ │ │ -1727 typename = _RequireInputIter<_InputIterator>, │ │ │ │ -1728 typename = _RequireNotAllocatorOrIntegral<_Hash>, │ │ │ │ -1729 typename = _RequireNotAllocator<_Pred>, │ │ │ │ -1730 typename = _RequireAllocator<_Allocator>> │ │ │ │ -1731 unordered_multiset(_InputIterator, _InputIterator, │ │ │ │ -1732 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_<_i_n_t_>_:_:_s_i_z_e___t_y_p_e = {}, │ │ │ │ -1733 _Hash = _Hash(), _Pred = _Pred(), │ │ │ │ -1734 _Allocator = _Allocator()) │ │ │ │ -1735 -> unordered_multiset:: │ │ │ │ -value_type, │ │ │ │ -1736 _Hash, _Pred, _Allocator>; │ │ │ │ -1737 │ │ │ │ -1738 template, │ │ │ │ -1739 typename _Pred = equal_to<_Tp>, │ │ │ │ -1740 typename _Allocator = allocator<_Tp>, │ │ │ │ -1741 typename = _RequireNotAllocatorOrIntegral<_Hash>, │ │ │ │ -1742 typename = _RequireNotAllocator<_Pred>, │ │ │ │ -1743 typename = _RequireAllocator<_Allocator>> │ │ │ │ -1744 unordered_multiset(initializer_list<_Tp>, │ │ │ │ -1745 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_<_i_n_t_>_:_:_s_i_z_e___t_y_p_e = {}, │ │ │ │ -1746 _Hash = _Hash(), _Pred = _Pred(), │ │ │ │ -1747 _Allocator = _Allocator()) │ │ │ │ -1748 -> unordered_multiset<_Tp, _Hash, _Pred, _Allocator>; │ │ │ │ -1749 │ │ │ │ -1750 template, │ │ │ │ -1752 typename = _RequireAllocator<_Allocator>> │ │ │ │ -1753 unordered_multiset(_InputIterator, _InputIterator, │ │ │ │ -1754 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_<_i_n_t_>_:_:_s_i_z_e___t_y_p_e, _Allocator) │ │ │ │ -1755 -> unordered_multiset:: │ │ │ │ -value_type, │ │ │ │ -1756 hash::value_type>, │ │ │ │ -1758 equal_to::value_type>, │ │ │ │ -1760 _Allocator>; │ │ │ │ -1761 │ │ │ │ -1762 template, │ │ │ │ -1764 typename = _RequireNotAllocatorOrIntegral<_Hash>, │ │ │ │ -1765 typename = _RequireAllocator<_Allocator>> │ │ │ │ -1766 unordered_multiset(_InputIterator, _InputIterator, │ │ │ │ -1767 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_<_i_n_t_>_:_:_s_i_z_e___t_y_p_e, │ │ │ │ -1768 _Hash, _Allocator) │ │ │ │ -1769 -> unordered_multiset::value_type, │ │ │ │ -1771 _Hash, │ │ │ │ -1772 equal_to< │ │ │ │ -1773 typename │ │ │ │ -1774 iterator_traits<_InputIterator>::value_type>, │ │ │ │ -1775 _Allocator>; │ │ │ │ -1776 │ │ │ │ -1777 template> │ │ │ │ -1779 unordered_multiset(initializer_list<_Tp>, │ │ │ │ -1780 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_<_i_n_t_>_:_:_s_i_z_e___t_y_p_e, _Allocator) │ │ │ │ -1781 -> unordered_multiset<_Tp, hash<_Tp>, equal_to<_Tp>, _Allocator>; │ │ │ │ -1782 │ │ │ │ -1783 template, │ │ │ │ -1785 typename = _RequireAllocator<_Allocator>> │ │ │ │ -1786 unordered_multiset(initializer_list<_Tp>, │ │ │ │ -1787 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_<_i_n_t_>_:_:_s_i_z_e___t_y_p_e, _Hash, _Allocator) │ │ │ │ -1788 -> unordered_multiset<_Tp, _Hash, equal_to<_Tp>, _Allocator>; │ │ │ │ -1789 │ │ │ │ -1790#endif │ │ │ │ -1791 │ │ │ │ -1792 template │ │ │ │ -1793 inline void │ │ │ │ -1794 _s_w_a_p(unordered_set<_Value, _Hash, _Pred, _Alloc>& __x, │ │ │ │ -1795 unordered_set<_Value, _Hash, _Pred, _Alloc>& __y) │ │ │ │ -1796 noexcept(noexcept(__x.swap(__y))) │ │ │ │ -1797 { __x.swap(__y); } │ │ │ │ -1798 │ │ │ │ -1799 template │ │ │ │ -1800 inline void │ │ │ │ -1801 _s_w_a_p(unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x, │ │ │ │ -1802 unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __y) │ │ │ │ -1803 noexcept(noexcept(__x.swap(__y))) │ │ │ │ -1804 { __x.swap(__y); } │ │ │ │ -1805 │ │ │ │ -1806 template │ │ │ │ -1807 inline bool │ │ │ │ -1808 operator==(const unordered_set<_Value, _Hash, _Pred, _Alloc>& __x, │ │ │ │ -1809 const unordered_set<_Value, _Hash, _Pred, _Alloc>& __y) │ │ │ │ -1810 { return __x._M_h._M_equal(__y._M_h); } │ │ │ │ -1811 │ │ │ │ -1812#if __cpp_impl_three_way_comparison < 201907L │ │ │ │ -1813 template │ │ │ │ -1814 inline bool │ │ │ │ -1815 operator!=(const unordered_set<_Value, _Hash, _Pred, _Alloc>& __x, │ │ │ │ -1816 const unordered_set<_Value, _Hash, _Pred, _Alloc>& __y) │ │ │ │ -1817 { return !(__x == __y); } │ │ │ │ -1818#endif │ │ │ │ -1819 │ │ │ │ -1820 template │ │ │ │ -1821 inline bool │ │ │ │ -1822 operator==(const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x, │ │ │ │ -1823 const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __y) │ │ │ │ -1824 { return __x._M_h._M_equal(__y._M_h); } │ │ │ │ -1825 │ │ │ │ -1826#if __cpp_impl_three_way_comparison < 201907L │ │ │ │ -1827 template │ │ │ │ -1828 inline bool │ │ │ │ -1829 operator!=(const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x, │ │ │ │ -1830 const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __y) │ │ │ │ -1831 { return !(__x == __y); } │ │ │ │ -1832#endif │ │ │ │ -1833 │ │ │ │ -1834_GLIBCXX_END_NAMESPACE_CONTAINER │ │ │ │ -1835 │ │ │ │ -1836#if __cplusplus > 201402L │ │ │ │ -1837 // Allow std::unordered_set access to internals of compatible sets. │ │ │ │ -1838 template │ │ │ │ -1840 struct _Hash_merge_helper< │ │ │ │ -1841 _GLIBCXX_STD_C::unordered_set<_Val, _Hash1, _Eq1, _Alloc>, _Hash2, _Eq2> │ │ │ │ -1842 { │ │ │ │ -1843 private: │ │ │ │ -1844 template │ │ │ │ -1845 using unordered_set = _GLIBCXX_STD_C::unordered_set<_Tp...>; │ │ │ │ -1846 template │ │ │ │ -1847 using unordered_multiset = _GLIBCXX_STD_C::unordered_multiset<_Tp...>; │ │ │ │ -1848 │ │ │ │ -1849 friend unordered_set<_Val, _Hash1, _Eq1, _Alloc>; │ │ │ │ -1850 │ │ │ │ -1851 static auto& │ │ │ │ -1852 _S_get_table(unordered_set<_Val, _Hash2, _Eq2, _Alloc>& __set) │ │ │ │ -1853 { return __set._M_h; } │ │ │ │ -1854 │ │ │ │ -1855 static auto& │ │ │ │ -1856 _S_get_table(unordered_multiset<_Val, _Hash2, _Eq2, _Alloc>& __set) │ │ │ │ -1857 { return __set._M_h; } │ │ │ │ -1858 }; │ │ │ │ -1859 │ │ │ │ -1860 // Allow std::unordered_multiset access to internals of compatible sets. │ │ │ │ -1861 template │ │ │ │ -1863 struct _Hash_merge_helper< │ │ │ │ -1864 _GLIBCXX_STD_C::unordered_multiset<_Val, _Hash1, _Eq1, _Alloc>, │ │ │ │ -1865 _Hash2, _Eq2> │ │ │ │ -1866 { │ │ │ │ -1867 private: │ │ │ │ -1868 template │ │ │ │ -1869 using unordered_set = _GLIBCXX_STD_C::unordered_set<_Tp...>; │ │ │ │ -1870 template │ │ │ │ -1871 using unordered_multiset = _GLIBCXX_STD_C::unordered_multiset<_Tp...>; │ │ │ │ -1872 │ │ │ │ -1873 friend unordered_multiset<_Val, _Hash1, _Eq1, _Alloc>; │ │ │ │ -1874 │ │ │ │ -1875 static auto& │ │ │ │ -1876 _S_get_table(unordered_set<_Val, _Hash2, _Eq2, _Alloc>& __set) │ │ │ │ -1877 { return __set._M_h; } │ │ │ │ -1878 │ │ │ │ -1879 static auto& │ │ │ │ -1880 _S_get_table(unordered_multiset<_Val, _Hash2, _Eq2, _Alloc>& __set) │ │ │ │ -1881 { return __set._M_h; } │ │ │ │ -1882 }; │ │ │ │ -1883#endif // C++17 │ │ │ │ -1884 │ │ │ │ -1885_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ -1886} // namespace std │ │ │ │ -1887 │ │ │ │ -1888#endif /* _UNORDERED_SET_H */ │ │ │ │ -_s_t_d_:_:_m_o_v_e │ │ │ │ -constexpr std::remove_reference< _Tp >::type && move(_Tp &&__t) noexcept │ │ │ │ -Convert a value to an rvalue. │ │ │ │ -DDeeffiinniittiioonn _m_o_v_e_._h_:_1_0_4 │ │ │ │ -_s_t_d_:_:_s_w_a_p │ │ │ │ -void swap(any &__x, any &__y) noexcept │ │ │ │ -Exchange the states of two any objects. │ │ │ │ -DDeeffiinniittiioonn _a_n_y_:_4_2_9 │ │ │ │ +266 /// @} group iterators │ │ │ │ +267 │ │ │ │ +268_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ +269} // namespace │ │ │ │ +270 │ │ │ │ +271#endif │ │ │ │ +_d_e_b_u_g_._h │ │ │ │ +_s_t_d_:_:_____a_d_d_r_e_s_s_o_f │ │ │ │ +constexpr _Tp * __addressof(_Tp &__r) noexcept │ │ │ │ +Same as C++11 std::addressof. │ │ │ │ +DDeeffiinniittiioonn _m_o_v_e_._h_:_4_9 │ │ │ │ _s_t_d │ │ │ │ ISO C++ entities toplevel namespace is std. │ │ │ │ -_s_t_d_:_:_____u_s_e_t___t_r_a_i_t_s │ │ │ │ -__detail::_Hashtable_traits< _Cache, true, true > __uset_traits │ │ │ │ -Base types for unordered_set. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_4_0 │ │ │ │ -_s_t_d_:_:_____u_m_s_e_t___t_r_a_i_t_s │ │ │ │ -__detail::_Hashtable_traits< _Cache, true, false > __umset_traits │ │ │ │ -Base types for unordered_multiset. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_5_5 │ │ │ │ +_s_t_d_:_:_i_s___n_o_t_h_r_o_w___d_e_f_a_u_l_t___c_o_n_s_t_r_u_c_t_i_b_l_e │ │ │ │ +is_nothrow_default_constructible │ │ │ │ +DDeeffiinniittiioonn _t_y_p_e___t_r_a_i_t_s_:_1_0_5_8 │ │ │ │ +_s_t_d_:_:_i_s___n_o_t_h_r_o_w___c_o_p_y___c_o_n_s_t_r_u_c_t_i_b_l_e │ │ │ │ +is_nothrow_copy_constructible │ │ │ │ +DDeeffiinniittiioonn _t_y_p_e___t_r_a_i_t_s_:_1_0_8_1 │ │ │ │ _s_t_d_:_:_i_t_e_r_a_t_o_r │ │ │ │ Common iterator class. │ │ │ │ DDeeffiinniittiioonn _s_t_l___i_t_e_r_a_t_o_r___b_a_s_e___t_y_p_e_s_._h_:_1_2_8 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t │ │ │ │ -A standard container composed of equivalent keys (possibly containing multiple │ │ │ │ -of each key value) in ... │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_9_6_8 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_f_i_n_d │ │ │ │ -auto find(const _Kt &__x) const -> decltype(_M_h._M_find_tr(__x)) │ │ │ │ -Tries to locate an element in an unordered_multiset. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_5_2_2 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_b_e_g_i_n │ │ │ │ -iterator begin() noexcept │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_1_8_9 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_f_i_n_d │ │ │ │ -auto find(const _Kt &__x) -> decltype(_M_h._M_find_tr(__x)) │ │ │ │ -Tries to locate an element in an unordered_multiset. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_5_1_0 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_i_n_s_e_r_t │ │ │ │ -iterator insert(const_iterator __hint, const value_type &__x) │ │ │ │ -Inserts an element into the unordered_multiset. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_2_9_8 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_d_i_f_f_e_r_e_n_c_e___t_y_p_e │ │ │ │ -_Hashtable::difference_type difference_type │ │ │ │ -Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_9_9_4 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_i_n_s_e_r_t │ │ │ │ -void insert(initializer_list< value_type > __l) │ │ │ │ -Inserts a list of elements into the unordered_multiset. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_3_2_7 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_p_o_i_n_t_e_r │ │ │ │ -_Hashtable::pointer pointer │ │ │ │ -Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_9_8_5 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_c_o_n_t_a_i_n_s │ │ │ │ -bool contains(const key_type &__x) const │ │ │ │ -Finds whether an element with the given key exists. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_5_5_4 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_r_e_h_a_s_h │ │ │ │ -void rehash(size_type __n) │ │ │ │ -May rehash the unordered_multiset. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_6_9_6 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_b_e_g_i_n │ │ │ │ -local_iterator begin(size_type __n) │ │ │ │ -Returns a read-only (constant) iterator pointing to the first bucket element. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_6_3_5 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_b_u_c_k_e_t___c_o_u_n_t │ │ │ │ -size_type bucket_count() const noexcept │ │ │ │ -Returns the number of buckets of the unordered_multiset. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_6_0_1 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_c_l_e_a_r │ │ │ │ -void clear() noexcept │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_4_2_5 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_m_a_x___l_o_a_d___f_a_c_t_o_r │ │ │ │ -float max_load_factor() const noexcept │ │ │ │ -Returns a positive number that the unordered_multiset tries to keep the load │ │ │ │ -factor less than or equa... │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_6_7_7 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_e_m_p_t_y │ │ │ │ -bool empty() const noexcept │ │ │ │ -Returns true if the unordered_multiset is empty. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_1_6_8 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_c_e_n_d │ │ │ │ -const_iterator cend() const noexcept │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_2_2_4 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_Hashtable::local_iterator local_iterator │ │ │ │ -Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_9_9_1 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_e_x_t_r_a_c_t │ │ │ │ -node_type extract(const key_type &__key) │ │ │ │ -Extract a node. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_3_4_1 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_b_e_g_i_n │ │ │ │ -const_local_iterator begin(size_type __n) const │ │ │ │ -Returns a read-only (constant) iterator pointing to the first bucket element. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_6_3_9 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_e_m_p_l_a_c_e │ │ │ │ -iterator emplace(_Args &&... __args) │ │ │ │ -Builds and insert an element into the unordered_multiset. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_2_3_8 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t │ │ │ │ -unordered_multiset(_InputIterator __first, _InputIterator __last, size_type │ │ │ │ -__n=0, const hasher &__hf=hasher(), const key_equal &__eql=key_equal(), const │ │ │ │ -allocator_type &__a=allocator_type()) │ │ │ │ -Builds an unordered_multiset from a range. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_0_3_5 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ -_Hashtable::const_iterator const_iterator │ │ │ │ -Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_9_9_0 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t │ │ │ │ -unordered_multiset(const allocator_type &__a) │ │ │ │ -Creates an unordered_multiset with no elements. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_0_8_1 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_a_l_l_o_c_a_t_o_r___t_y_p_e │ │ │ │ -_Hashtable::allocator_type allocator_type │ │ │ │ -Public typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_9_8_0 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_e_n_d │ │ │ │ -const_local_iterator end(size_type __n) const │ │ │ │ -Returns a read-only (constant) iterator pointing to one past the last bucket │ │ │ │ -elements. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_6_5_9 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_f_i_n_d │ │ │ │ -iterator find(const key_type &__x) │ │ │ │ -Tries to locate an element in an unordered_multiset. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_5_0_4 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_v_a_l_u_e___t_y_p_e │ │ │ │ -_Hashtable::value_type value_type │ │ │ │ -Public typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_9_7_7 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ -unordered_multiset & operator=(unordered_multiset &&)=default │ │ │ │ -Move assignment operator. │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_l_o_a_d___f_a_c_t_o_r │ │ │ │ -float load_factor() const noexcept │ │ │ │ -Returns the average number of elements per bucket. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_6_7_1 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t │ │ │ │ -unordered_multiset()=default │ │ │ │ -Default constructor. │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_i_n_s_e_r_t │ │ │ │ -iterator insert(const_iterator __hint, node_type &&__nh) │ │ │ │ -Re-insert an extracted node. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_3_5_1 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_s_i_z_e___t_y_p_e │ │ │ │ -_Hashtable::size_type size_type │ │ │ │ -Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_9_9_3 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_e_q_u_a_l___r_a_n_g_e │ │ │ │ -auto equal_range(const _Kt &__x) -> decltype(_M_h._M_equal_range_tr(__x)) │ │ │ │ -Finds a subsequence matching given key. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_5_7_9 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_k_e_y___t_y_p_e │ │ │ │ -_Hashtable::key_type key_type │ │ │ │ -Public typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_9_7_6 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ -unordered_multiset & operator=(const unordered_multiset &)=default │ │ │ │ -Copy assignment operator. │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_h_a_s_h___f_u_n_c_t_i_o_n │ │ │ │ -hasher hash_function() const │ │ │ │ -Returns the hash functor object with which the unordered_multiset was │ │ │ │ -constructed. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_4_8_0 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t │ │ │ │ -unordered_multiset(initializer_list< value_type > __l, size_type __n=0, const │ │ │ │ -hasher &__hf=hasher(), const key_equal &__eql=key_equal(), const allocator_type │ │ │ │ -&__a=allocator_type()) │ │ │ │ -Builds an unordered_multiset from an initializer_list. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_0_6_0 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_c_o_n_t_a_i_n_s │ │ │ │ -auto contains(const _Kt &__x) const -> decltype(_M_h._M_find_tr(__x), void(), │ │ │ │ -true) │ │ │ │ -Finds whether an element with the given key exists. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_5_5_9 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_c_o_u_n_t │ │ │ │ -auto count(const _Kt &__x) const -> decltype(_M_h._M_count_tr(__x)) │ │ │ │ -Finds the number of elements. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_5_4_1 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_c_o_u_n_t │ │ │ │ -size_type count(const key_type &__x) const │ │ │ │ -Finds the number of elements. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_5_3_5 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_e_r_a_s_e │ │ │ │ -iterator erase(const_iterator __position) │ │ │ │ -Erases an element from an unordered_multiset. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_3_7_1 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t │ │ │ │ -unordered_multiset(unordered_multiset &&)=default │ │ │ │ -Move constructor. │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_r_e_f_e_r_e_n_c_e │ │ │ │ -_Hashtable::reference reference │ │ │ │ -Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_9_8_7 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_e_n_d │ │ │ │ -iterator end() noexcept │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_2_0_3 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_e_m_p_l_a_c_e___h_i_n_t │ │ │ │ -iterator emplace_hint(const_iterator __pos, _Args &&... __args) │ │ │ │ -Inserts an element into the unordered_multiset. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_2_6_0 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_s_w_a_p │ │ │ │ -void swap(unordered_multiset &__x) noexcept(noexcept(_M_h.swap(__x._M_h))) │ │ │ │ -Swaps data with another unordered_multiset. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_4_3_8 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_b_e_g_i_n │ │ │ │ -const_iterator begin() const noexcept │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_1_9_3 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_e_r_a_s_e │ │ │ │ -iterator erase(const_iterator __first, const_iterator __last) │ │ │ │ -Erases a [__first,__last) range of elements from an unordered_multiset. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_4_1_4 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_c_b_e_g_i_n │ │ │ │ -const_iterator cbegin() const noexcept │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_2_1_6 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_i_n_s_e_r_t │ │ │ │ -void insert(_InputIterator __first, _InputIterator __last) │ │ │ │ -A template function that inserts a range of elements. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_3_1_6 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_e_q_u_a_l___r_a_n_g_e │ │ │ │ -std::pair< const_iterator, const_iterator > equal_range(const key_type &__x) │ │ │ │ -const │ │ │ │ -Finds a subsequence matching given key. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_5_8_5 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_k_e_y___e_q │ │ │ │ -key_equal key_eq() const │ │ │ │ -Returns the key comparison object with which the unordered_multiset was │ │ │ │ -constructed. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_4_8_6 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_c_o_n_s_t___p_o_i_n_t_e_r │ │ │ │ -_Hashtable::const_pointer const_pointer │ │ │ │ -Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_9_8_6 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_e_q_u_a_l___r_a_n_g_e │ │ │ │ -std::pair< iterator, iterator > equal_range(const key_type &__x) │ │ │ │ -Finds a subsequence matching given key. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_5_7_3 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_i_n_s_e_r_t │ │ │ │ -iterator insert(value_type &&__x) │ │ │ │ -Inserts an element into the unordered_multiset. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_2_7_6 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_i_n_s_e_r_t │ │ │ │ -iterator insert(const value_type &__x) │ │ │ │ -Inserts an element into the unordered_multiset. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_2_7_2 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_e_n_d │ │ │ │ -const_iterator end() const noexcept │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_2_0_7 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_r_e_s_e_r_v_e │ │ │ │ -void reserve(size_type __n) │ │ │ │ -Prepare the unordered_multiset for a specified number of elements. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_7_0_7 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_i_n_s_e_r_t │ │ │ │ -iterator insert(const_iterator __hint, value_type &&__x) │ │ │ │ -Inserts an element into the unordered_multiset. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_3_0_2 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_c_o_n_s_t___r_e_f_e_r_e_n_c_e │ │ │ │ -_Hashtable::const_reference const_reference │ │ │ │ -Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_9_8_8 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_e_r_a_s_e │ │ │ │ -iterator erase(iterator __position) │ │ │ │ -Erases an element from an unordered_multiset. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_3_7_6 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_c_e_n_d │ │ │ │ -const_local_iterator cend(size_type __n) const │ │ │ │ -Returns a read-only (constant) iterator pointing to one past the last bucket │ │ │ │ -elements. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_6_6_3 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_m_a_x___b_u_c_k_e_t___c_o_u_n_t │ │ │ │ -size_type max_bucket_count() const noexcept │ │ │ │ -Returns the maximum number of buckets of the unordered_multiset. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_6_0_6 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_i_n_s_e_r_t │ │ │ │ -iterator insert(node_type &&__nh) │ │ │ │ -Re-insert an extracted node. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_3_4_6 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_h_a_s_h_e_r │ │ │ │ -_Hashtable::hasher hasher │ │ │ │ -Public typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_9_7_8 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t │ │ │ │ -unordered_multiset(size_type __n, const hasher &__hf=hasher(), const key_equal │ │ │ │ -&__eql=key_equal(), const allocator_type &__a=allocator_type()) │ │ │ │ -Default constructor creates no elements. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_0_1_4 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ -unordered_multiset & operator=(initializer_list< value_type > __l) │ │ │ │ -Unordered_multiset list assignment operator. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_1_5_3 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_s_i_z_e │ │ │ │ -size_type size() const noexcept │ │ │ │ -Returns the size of the unordered_multiset. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_1_7_3 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_i_t_e_r_a_t_o_r │ │ │ │ -_Hashtable::iterator iterator │ │ │ │ -Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_9_8_9 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_e_n_d │ │ │ │ -local_iterator end(size_type __n) │ │ │ │ -Returns a read-only (constant) iterator pointing to one past the last bucket │ │ │ │ -elements. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_6_5_5 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_e_q_u_a_l___r_a_n_g_e │ │ │ │ -auto equal_range(const _Kt &__x) const -> decltype(_M_h._M_equal_range_tr(__x)) │ │ │ │ -Finds a subsequence matching given key. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_5_9_1 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_e_x_t_r_a_c_t │ │ │ │ -node_type extract(const_iterator __pos) │ │ │ │ -Extract a node. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_3_3_3 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_m_a_x___s_i_z_e │ │ │ │ -size_type max_size() const noexcept │ │ │ │ -Returns the maximum size of the unordered_multiset. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_1_7_8 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_c_b_e_g_i_n │ │ │ │ -const_local_iterator cbegin(size_type __n) const │ │ │ │ -Returns a read-only (constant) iterator pointing to the first bucket element. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_6_4_3 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t │ │ │ │ -unordered_multiset(const unordered_multiset &)=default │ │ │ │ +_s_t_d_:_:_i_s_t_r_e_a_m___i_t_e_r_a_t_o_r │ │ │ │ +Provides input iterator semantics for streams. │ │ │ │ +DDeeffiinniittiioonn _s_t_r_e_a_m___i_t_e_r_a_t_o_r_._h_:_5_5 │ │ │ │ +_s_t_d_:_:_i_s_t_r_e_a_m___i_t_e_r_a_t_o_r_:_:_i_s_t_r_e_a_m___i_t_e_r_a_t_o_r │ │ │ │ +istream_iterator(istream_type &__s) │ │ │ │ +Construct start of input stream iterator. │ │ │ │ +DDeeffiinniittiioonn _s_t_r_e_a_m___i_t_e_r_a_t_o_r_._h_:_7_6 │ │ │ │ +_s_t_d_:_:_i_s_t_r_e_a_m___i_t_e_r_a_t_o_r_:_:_i_s_t_r_e_a_m___i_t_e_r_a_t_o_r │ │ │ │ +constexpr istream_iterator() noexcept(/*conditional */) │ │ │ │ +Construct end of input stream iterator. │ │ │ │ +DDeeffiinniittiioonn _s_t_r_e_a_m___i_t_e_r_a_t_o_r_._h_:_7_1 │ │ │ │ +_s_t_d_:_:_i_s_t_r_e_a_m___i_t_e_r_a_t_o_r_:_:_o_p_e_r_a_t_o_r_=_= │ │ │ │ +friend bool operator==(const istream_iterator &__x, const istream_iterator │ │ │ │ +&__y) noexcept │ │ │ │ +Return true if the iterators refer to the same stream, or are both at end-of- │ │ │ │ +stream. │ │ │ │ +DDeeffiinniittiioonn _s_t_r_e_a_m___i_t_e_r_a_t_o_r_._h_:_1_5_8 │ │ │ │ +_s_t_d_:_:_o_s_t_r_e_a_m___i_t_e_r_a_t_o_r │ │ │ │ +Provides output iterator semantics for streams. │ │ │ │ +DDeeffiinniittiioonn _s_t_r_e_a_m___i_t_e_r_a_t_o_r_._h_:_1_9_5 │ │ │ │ +_s_t_d_:_:_o_s_t_r_e_a_m___i_t_e_r_a_t_o_r_:_:_c_h_a_r___t_y_p_e │ │ │ │ +_CharT char_type │ │ │ │ +Public typedef. │ │ │ │ +DDeeffiinniittiioonn _s_t_r_e_a_m___i_t_e_r_a_t_o_r_._h_:_2_0_2 │ │ │ │ +_s_t_d_:_:_o_s_t_r_e_a_m___i_t_e_r_a_t_o_r_:_:_o_s_t_r_e_a_m___i_t_e_r_a_t_o_r │ │ │ │ +ostream_iterator(ostream_type &__s) noexcept │ │ │ │ +Construct from an ostream. │ │ │ │ +DDeeffiinniittiioonn _s_t_r_e_a_m___i_t_e_r_a_t_o_r_._h_:_2_1_3 │ │ │ │ +_s_t_d_:_:_o_s_t_r_e_a_m___i_t_e_r_a_t_o_r_:_:_o_s_t_r_e_a_m___i_t_e_r_a_t_o_r │ │ │ │ +ostream_iterator(ostream_type &__s, const _CharT *__c) noexcept │ │ │ │ +DDeeffiinniittiioonn _s_t_r_e_a_m___i_t_e_r_a_t_o_r_._h_:_2_2_6 │ │ │ │ +_s_t_d_:_:_o_s_t_r_e_a_m___i_t_e_r_a_t_o_r_:_:_t_r_a_i_t_s___t_y_p_e │ │ │ │ +_Traits traits_type │ │ │ │ +Public typedef. │ │ │ │ +DDeeffiinniittiioonn _s_t_r_e_a_m___i_t_e_r_a_t_o_r_._h_:_2_0_3 │ │ │ │ +_s_t_d_:_:_o_s_t_r_e_a_m___i_t_e_r_a_t_o_r_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ +ostream_iterator & operator=(const _Tp &__value) │ │ │ │ +Writes value to underlying ostream using operator<<. If constructed with │ │ │ │ +delimiter string,... │ │ │ │ +DDeeffiinniittiioonn _s_t_r_e_a_m___i_t_e_r_a_t_o_r_._h_:_2_4_0 │ │ │ │ +_s_t_d_:_:_o_s_t_r_e_a_m___i_t_e_r_a_t_o_r_:_:_d_i_f_f_e_r_e_n_c_e___t_y_p_e │ │ │ │ +ptrdiff_t difference_type │ │ │ │ +Public typedef. │ │ │ │ +DDeeffiinniittiioonn _s_t_r_e_a_m___i_t_e_r_a_t_o_r_._h_:_2_0_0 │ │ │ │ +_s_t_d_:_:_o_s_t_r_e_a_m___i_t_e_r_a_t_o_r_:_:_o_s_t_r_e_a_m___t_y_p_e │ │ │ │ +basic_ostream< _CharT, _Traits > ostream_type │ │ │ │ +Public typedef. │ │ │ │ +DDeeffiinniittiioonn _s_t_r_e_a_m___i_t_e_r_a_t_o_r_._h_:_2_0_4 │ │ │ │ +_s_t_d_:_:_o_s_t_r_e_a_m___i_t_e_r_a_t_o_r_:_:_o_s_t_r_e_a_m___i_t_e_r_a_t_o_r │ │ │ │ +ostream_iterator(const ostream_iterator &__obj) noexcept │ │ │ │ Copy constructor. │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_Hashtable::const_local_iterator const_local_iterator │ │ │ │ -Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_9_9_2 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_e_r_a_s_e │ │ │ │ -size_type erase(const key_type &__x) │ │ │ │ -Erases elements according to the provided key. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_3_9_4 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_f_i_n_d │ │ │ │ -const_iterator find(const key_type &__x) const │ │ │ │ -Tries to locate an element in an unordered_multiset. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_5_1_6 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_g_e_t___a_l_l_o_c_a_t_o_r │ │ │ │ -allocator_type get_allocator() const noexcept │ │ │ │ -Returns the allocator object used by the unordered_multiset. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_1_6_1 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_k_e_y___e_q_u_a_l │ │ │ │ -_Hashtable::key_equal key_equal │ │ │ │ -Public typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_9_7_9 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_m_a_x___l_o_a_d___f_a_c_t_o_r │ │ │ │ -void max_load_factor(float __z) │ │ │ │ -Change the unordered_multiset maximum load factor. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_6_8_5 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t │ │ │ │ -A standard container composed of unique keys (containing at most one of each │ │ │ │ -key value) in which the ... │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_0_0 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_i_n_s_e_r_t │ │ │ │ -std::pair< iterator, bool > insert(const value_type &__x) │ │ │ │ -Attempts to insert an element into the unordered_set. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_4_2_3 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_i_t_e_r_a_t_o_r │ │ │ │ -_Hashtable::iterator iterator │ │ │ │ -Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_2_1 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_u_n_o_r_d_e_r_e_d___s_e_t │ │ │ │ -unordered_set(initializer_list< value_type > __l, size_type __n=0, const hasher │ │ │ │ -&__hf=hasher(), const key_equal &__eql=key_equal(), const allocator_type │ │ │ │ -&__a=allocator_type()) │ │ │ │ -Builds an unordered_set from an initializer_list. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_2_2_3 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_m_a_x___l_o_a_d___f_a_c_t_o_r │ │ │ │ -void max_load_factor(float __z) │ │ │ │ -Change the unordered_set maximum load factor. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_8_4_0 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_r_e_f_e_r_e_n_c_e │ │ │ │ -_Hashtable::reference reference │ │ │ │ -Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_1_9 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_e_n_d │ │ │ │ -const_local_iterator end(size_type __n) const │ │ │ │ -Returns a read-only (constant) iterator pointing to one past the last bucket │ │ │ │ -elements. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_8_1_4 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_v_a_l_u_e___t_y_p_e │ │ │ │ -_Hashtable::value_type value_type │ │ │ │ -Public typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_0_9 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_c_e_n_d │ │ │ │ -const_iterator cend() const noexcept │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_3_5_7 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_f_i_n_d │ │ │ │ -auto find(const _Kt &__k) -> decltype(_M_h._M_find_tr(__k)) │ │ │ │ -Tries to locate an element in an unordered_set. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_6_5_8 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_f_i_n_d │ │ │ │ -const_iterator find(const key_type &__x) const │ │ │ │ -Tries to locate an element in an unordered_set. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_6_6_4 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_k_e_y___t_y_p_e │ │ │ │ -_Hashtable::key_type key_type │ │ │ │ -Public typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_0_8 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_c_o_u_n_t │ │ │ │ -size_type count(const key_type &__x) const │ │ │ │ -Finds the number of elements. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_6_8_7 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_b_e_g_i_n │ │ │ │ -const_local_iterator begin(size_type __n) const │ │ │ │ -Returns a read-only (constant) iterator pointing to the first bucket element. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_7_9_4 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_e_q_u_a_l___r_a_n_g_e │ │ │ │ -auto equal_range(const _Kt &__k) -> decltype(_M_h._M_equal_range_tr(__k)) │ │ │ │ -Finds a subsequence matching given key. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_7_3_4 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_c_b_e_g_i_n │ │ │ │ -const_local_iterator cbegin(size_type __n) const │ │ │ │ -Returns a read-only (constant) iterator pointing to the first bucket element. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_7_9_8 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_c_o_u_n_t │ │ │ │ -auto count(const _Kt &__k) const -> decltype(_M_h._M_count_tr(__k)) │ │ │ │ -Finds the number of elements. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_6_9_3 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_b_e_g_i_n │ │ │ │ -const_iterator begin() const noexcept │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_3_2_6 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_h_a_s_h_e_r │ │ │ │ -_Hashtable::hasher hasher │ │ │ │ -Public typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_1_0 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_Hashtable::local_iterator local_iterator │ │ │ │ -Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_2_3 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_i_n_s_e_r_t │ │ │ │ -insert_return_type insert(node_type &&__nh) │ │ │ │ -Re-insert an extracted node. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_5_0_1 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_s_i_z_e___t_y_p_e │ │ │ │ -_Hashtable::size_type size_type │ │ │ │ -Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_2_5 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_c_b_e_g_i_n │ │ │ │ -const_iterator cbegin() const noexcept │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_3_4_9 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_e_m_p_t_y │ │ │ │ -bool empty() const noexcept │ │ │ │ -Returns true if the unordered_set is empty. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_3_0_1 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ -unordered_set & operator=(initializer_list< value_type > __l) │ │ │ │ -Unordered_set list assignment operator. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_2_8_6 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_e_r_a_s_e │ │ │ │ -iterator erase(iterator __position) │ │ │ │ -Erases an element from an unordered_set. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_5_3_0 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_u_n_o_r_d_e_r_e_d___s_e_t │ │ │ │ -unordered_set(unordered_set &&)=default │ │ │ │ -Move constructor. │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_u_n_o_r_d_e_r_e_d___s_e_t │ │ │ │ -unordered_set(const allocator_type &__a) │ │ │ │ -Creates an unordered_set with no elements. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_8_7 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_c_e_n_d │ │ │ │ -const_local_iterator cend(size_type __n) const │ │ │ │ -Returns a read-only (constant) iterator pointing to one past the last bucket │ │ │ │ -elements. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_8_1_8 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_c_o_n_t_a_i_n_s │ │ │ │ -auto contains(const _Kt &__k) const -> decltype(_M_h._M_find_tr(__k), void(), │ │ │ │ -true) │ │ │ │ -Finds whether an element with the given key exists. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_7_1_2 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_c_o_n_s_t___p_o_i_n_t_e_r │ │ │ │ -_Hashtable::const_pointer const_pointer │ │ │ │ -Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_1_8 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_e_q_u_a_l___r_a_n_g_e │ │ │ │ -std::pair< const_iterator, const_iterator > equal_range(const key_type &__x) │ │ │ │ -const │ │ │ │ -Finds a subsequence matching given key. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_7_4_0 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_s_w_a_p │ │ │ │ -void swap(unordered_set &__x) noexcept(noexcept(_M_h.swap(__x._M_h))) │ │ │ │ -Swaps data with another unordered_set. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_5_8_8 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_i_n_s_e_r_t │ │ │ │ -iterator insert(const_iterator __hint, const value_type &__x) │ │ │ │ -Attempts to insert an element into the unordered_set. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_4_5_2 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_i_n_s_e_r_t │ │ │ │ -std::pair< iterator, bool > insert(value_type &&__x) │ │ │ │ -Attempts to insert an element into the unordered_set. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_4_2_7 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_l_o_a_d___f_a_c_t_o_r │ │ │ │ -float load_factor() const noexcept │ │ │ │ -Returns the average number of elements per bucket. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_8_2_6 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_r_e_h_a_s_h │ │ │ │ -void rehash(size_type __n) │ │ │ │ -May rehash the unordered_set. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_8_5_1 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_e_n_d │ │ │ │ -local_iterator end(size_type __n) │ │ │ │ -Returns a read-only (constant) iterator pointing to one past the last bucket │ │ │ │ -elements. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_8_1_0 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_k_e_y___e_q_u_a_l │ │ │ │ -_Hashtable::key_equal key_equal │ │ │ │ -Public typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_1_1 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_s_i_z_e │ │ │ │ -size_type size() const noexcept │ │ │ │ -Returns the size of the unordered_set. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_3_0_6 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_i_n_s_e_r_t │ │ │ │ -iterator insert(const_iterator, node_type &&__nh) │ │ │ │ -Re-insert an extracted node. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_5_0_6 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ -_Hashtable::const_iterator const_iterator │ │ │ │ -Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_2_2 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_d_i_f_f_e_r_e_n_c_e___t_y_p_e │ │ │ │ -_Hashtable::difference_type difference_type │ │ │ │ -Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_2_6 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_c_o_n_s_t___r_e_f_e_r_e_n_c_e │ │ │ │ -_Hashtable::const_reference const_reference │ │ │ │ -Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_2_0 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_h_a_s_h___f_u_n_c_t_i_o_n │ │ │ │ -hasher hash_function() const │ │ │ │ -Returns the hash functor object with which the unordered_set was constructed. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_6_2_8 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_u_n_o_r_d_e_r_e_d___s_e_t │ │ │ │ -unordered_set(const unordered_set &)=default │ │ │ │ -Copy constructor. │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_e_q_u_a_l___r_a_n_g_e │ │ │ │ -std::pair< iterator, iterator > equal_range(const key_type &__x) │ │ │ │ -Finds a subsequence matching given key. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_7_2_8 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_f_i_n_d │ │ │ │ -auto find(const _Kt &__k) const -> decltype(_M_h._M_find_tr(__k)) │ │ │ │ -Tries to locate an element in an unordered_set. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_6_7_0 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_e_m_p_l_a_c_e___h_i_n_t │ │ │ │ -iterator emplace_hint(const_iterator __pos, _Args &&... __args) │ │ │ │ -Attempts to insert an element into the unordered_set. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_4_0_5 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_k_e_y___e_q │ │ │ │ -key_equal key_eq() const │ │ │ │ -Returns the key comparison object with which the unordered_set was constructed. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_6_3_4 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_a_l_l_o_c_a_t_o_r___t_y_p_e │ │ │ │ -_Hashtable::allocator_type allocator_type │ │ │ │ -Public typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_1_2 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_i_n_s_e_r_t │ │ │ │ -iterator insert(const_iterator __hint, value_type &&__x) │ │ │ │ -Attempts to insert an element into the unordered_set. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_4_5_6 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_e_n_d │ │ │ │ -const_iterator end() const noexcept │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_3_4_0 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_e_n_d │ │ │ │ -iterator end() noexcept │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_3_3_6 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_e_x_t_r_a_c_t │ │ │ │ -node_type extract(const key_type &__key) │ │ │ │ -Extract a node. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_4_9_6 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_b_e_g_i_n │ │ │ │ -local_iterator begin(size_type __n) │ │ │ │ -Returns a read-only (constant) iterator pointing to the first bucket element. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_7_9_0 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_u_n_o_r_d_e_r_e_d___s_e_t │ │ │ │ -unordered_set()=default │ │ │ │ -Default constructor. │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ -unordered_set & operator=(unordered_set &&)=default │ │ │ │ -Move assignment operator. │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_i_n_s_e_r_t │ │ │ │ -void insert(_InputIterator __first, _InputIterator __last) │ │ │ │ -A template function that attempts to insert a range of elements. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_4_7_1 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_m_a_x___l_o_a_d___f_a_c_t_o_r │ │ │ │ -float max_load_factor() const noexcept │ │ │ │ -Returns a positive number that the unordered_set tries to keep the load factor │ │ │ │ -less than or equal to. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_8_3_2 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_c_o_n_t_a_i_n_s │ │ │ │ -bool contains(const key_type &__x) const │ │ │ │ -Finds whether an element with the given key exists. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_7_0_7 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_e_m_p_l_a_c_e │ │ │ │ -std::pair< iterator, bool > emplace(_Args &&... __args) │ │ │ │ -Attempts to build and insert an element into the unordered_set. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_3_7_9 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ -unordered_set & operator=(const unordered_set &)=default │ │ │ │ -Copy assignment operator. │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_e_r_a_s_e │ │ │ │ -size_type erase(const key_type &__x) │ │ │ │ -Erases elements according to the provided key. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_5_4_7 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_u_n_o_r_d_e_r_e_d___s_e_t │ │ │ │ -unordered_set(size_type __n, const hasher &__hf=hasher(), const key_equal │ │ │ │ -&__eql=key_equal(), const allocator_type &__a=allocator_type()) │ │ │ │ -Default constructor creates no elements. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_4_7 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_e_r_a_s_e │ │ │ │ -iterator erase(const_iterator __first, const_iterator __last) │ │ │ │ -Erases a [__first,__last) range of elements from an unordered_set. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_5_6_5 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_e_r_a_s_e │ │ │ │ -iterator erase(const_iterator __position) │ │ │ │ -Erases an element from an unordered_set. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_5_2_5 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_g_e_t___a_l_l_o_c_a_t_o_r │ │ │ │ -allocator_type get_allocator() const noexcept │ │ │ │ -Returns the allocator object used by the unordered_set. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_2_9_4 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_e_q_u_a_l___r_a_n_g_e │ │ │ │ -auto equal_range(const _Kt &__k) const -> decltype(_M_h._M_equal_range_tr(__k)) │ │ │ │ -Finds a subsequence matching given key. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_7_4_6 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_Hashtable::const_local_iterator const_local_iterator │ │ │ │ -Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_2_4 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_c_l_e_a_r │ │ │ │ -void clear() noexcept │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_5_7_5 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_i_n_s_e_r_t │ │ │ │ -void insert(initializer_list< value_type > __l) │ │ │ │ -Attempts to insert a list of elements into the unordered_set. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_4_8_2 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_u_n_o_r_d_e_r_e_d___s_e_t │ │ │ │ -unordered_set(_InputIterator __first, _InputIterator __last, size_type __n=0, │ │ │ │ -const hasher &__hf=hasher(), const key_equal &__eql=key_equal(), const │ │ │ │ -allocator_type &__a=allocator_type()) │ │ │ │ -Builds an unordered_set from a range. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_6_8 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_b_u_c_k_e_t___c_o_u_n_t │ │ │ │ -size_type bucket_count() const noexcept │ │ │ │ -Returns the number of buckets of the unordered_set. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_7_5_6 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_r_e_s_e_r_v_e │ │ │ │ -void reserve(size_type __n) │ │ │ │ -Prepare the unordered_set for a specified number of elements. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_8_6_2 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_e_x_t_r_a_c_t │ │ │ │ -node_type extract(const_iterator __pos) │ │ │ │ -Extract a node. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_4_8_8 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_p_o_i_n_t_e_r │ │ │ │ -_Hashtable::pointer pointer │ │ │ │ -Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_1_7 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_b_e_g_i_n │ │ │ │ -iterator begin() noexcept │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_3_2_2 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_f_i_n_d │ │ │ │ -iterator find(const key_type &__x) │ │ │ │ -Tries to locate an element in an unordered_set. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_6_5_2 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_m_a_x___s_i_z_e │ │ │ │ -size_type max_size() const noexcept │ │ │ │ -Returns the maximum size of the unordered_set. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_3_1_1 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_m_a_x___b_u_c_k_e_t___c_o_u_n_t │ │ │ │ -size_type max_bucket_count() const noexcept │ │ │ │ -Returns the maximum number of buckets of the unordered_set. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_7_6_1 │ │ │ │ +DDeeffiinniittiioonn _s_t_r_e_a_m___i_t_e_r_a_t_o_r_._h_:_2_3_0 │ │ │ │ _s_t_d_:_:_a_u_t_o___p_t_r___r_e_f │ │ │ │ DDeeffiinniittiioonn _a_u_t_o___p_t_r_._h_:_4_9 │ │ │ │ * _b_i_t_s │ │ │ │ - * _u_n_o_r_d_e_r_e_d___s_e_t_._h │ │ │ │ + * _s_t_r_e_a_m___i_t_e_r_a_t_o_r_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-12-base/libstdc++/user/a00377.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: unordered_map.h File Reference │ │ │ +libstdc++: std_mutex.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -48,159 +48,56 @@ │ │ │ /* @license-end */ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces | │ │ │ -Macros | │ │ │ -Typedefs | │ │ │ -Functions
│ │ │ -
unordered_map.h File Reference
│ │ │ +Variables
│ │ │ +
std_mutex.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ - │ │ │ + │ │ │ │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ │ │ │

│ │ │ Classes

class  std::unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc >
struct  std::adopt_lock_t
 
class  std::unordered_multimap< _Key, _Tp, _Hash, _Pred, _Alloc >
struct  std::defer_lock_t
 
class  std::lock_guard< _Mutex >
 
class  std::mutex
 
struct  std::try_to_lock_t
 
│ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Namespaces

namespace  std
 
│ │ │ - │ │ │ - │ │ │ - │ │ │ -

│ │ │ -Macros

#define __cpp_lib_unordered_map_try_emplace
 
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -

│ │ │ -Typedefs

template<typename _Key , typename _Tp , typename _Hash = hash<_Key>, typename _Pred = std::equal_to<_Key>, typename _Alloc = std::allocator<std::pair<const _Key, _Tp> >, typename _Tr = __umap_traits<__cache_default<_Key, _Hash>::value>>
using std::__umap_hashtable = _Hashtable< _Key, std::pair< const _Key, _Tp >, _Alloc, __detail::_Select1st, _Pred, _Hash, __detail::_Mod_range_hashing, __detail::_Default_ranged_hash, __detail::_Prime_rehash_policy, _Tr >
 
template<bool _Cache>
using std::__umap_traits = __detail::_Hashtable_traits< _Cache, false, true >
 
template<typename _Key , typename _Tp , typename _Hash = hash<_Key>, typename _Pred = std::equal_to<_Key>, typename _Alloc = std::allocator<std::pair<const _Key, _Tp> >, typename _Tr = __ummap_traits<__cache_default<_Key, _Hash>::value>>
using std::__ummap_hashtable = _Hashtable< _Key, std::pair< const _Key, _Tp >, _Alloc, __detail::_Select1st, _Pred, _Hash, __detail::_Mod_range_hashing, __detail::_Default_ranged_hash, __detail::_Prime_rehash_policy, _Tr >
 
template<bool _Cache>
using std::__ummap_traits = __detail::_Hashtable_traits< _Cache, false, false >
 
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ -Functions

template<class _Key , class _Tp , class _Hash , class _Pred , class _Alloc >
bool std::operator== (const unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc > &__x, const unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc > &__y)
 
template<class _Key , class _Tp , class _Hash , class _Pred , class _Alloc >
bool std::operator== (const unordered_multimap< _Key, _Tp, _Hash, _Pred, _Alloc > &__x, const unordered_multimap< _Key, _Tp, _Hash, _Pred, _Alloc > &__y)
 
template<class _Key , class _Tp , class _Hash , class _Pred , class _Alloc >
void std::swap (unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc > &__x, unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc > &__y) noexcept(noexcept(__x.swap(__y)))
 
template<class _Key , class _Tp , class _Hash , class _Pred , class _Alloc >
void std::swap (unordered_multimap< _Key, _Tp, _Hash, _Pred, _Alloc > &__x, unordered_multimap< _Key, _Tp, _Hash, _Pred, _Alloc > &__y) noexcept(noexcept(__x.swap(__y)))
 
│ │ │ -template<typename _InputIterator , typename _Allocator , typename = _RequireInputIter<_InputIterator>, typename = _RequireAllocator<_Allocator>>
 std::unordered_map (_InputIterator, _InputIterator, _Allocator) -> unordered_map< __iter_key_t< _InputIterator >, __iter_val_t< _InputIterator >, hash< __iter_key_t< _InputIterator > >, equal_to< __iter_key_t< _InputIterator > >, _Allocator >
 
│ │ │ -template<typename _InputIterator , typename _Allocator , typename = _RequireInputIter<_InputIterator>, typename = _RequireAllocator<_Allocator>>
 std::unordered_map (_InputIterator, _InputIterator, typename unordered_map< int, int >::size_type, _Allocator) -> unordered_map< __iter_key_t< _InputIterator >, __iter_val_t< _InputIterator >, hash< __iter_key_t< _InputIterator > >, equal_to< __iter_key_t< _InputIterator > >, _Allocator >
 
│ │ │ -template<typename _InputIterator , typename _Hash , typename _Allocator , typename = _RequireInputIter<_InputIterator>, typename = _RequireNotAllocatorOrIntegral<_Hash>, typename = _RequireAllocator<_Allocator>>
 std::unordered_map (_InputIterator, _InputIterator, typename unordered_map< int, int >::size_type, _Hash, _Allocator) -> unordered_map< __iter_key_t< _InputIterator >, __iter_val_t< _InputIterator >, _Hash, equal_to< __iter_key_t< _InputIterator > >, _Allocator >
 
│ │ │ -template<typename _InputIterator , typename _Hash = hash<__iter_key_t<_InputIterator>>, typename _Pred = equal_to<__iter_key_t<_InputIterator>>, typename _Allocator = allocator<__iter_to_alloc_t<_InputIterator>>, typename = _RequireInputIter<_InputIterator>, typename = _RequireNotAllocatorOrIntegral<_Hash>, typename = _RequireNotAllocator<_Pred>, typename = _RequireAllocator<_Allocator>>
 std::unordered_map (_InputIterator, _InputIterator, typename unordered_map< int, int >::size_type={}, _Hash=_Hash(), _Pred=_Pred(), _Allocator=_Allocator()) -> unordered_map< __iter_key_t< _InputIterator >, __iter_val_t< _InputIterator >, _Hash, _Pred, _Allocator >
 
│ │ │ -template<typename _Key , typename _Tp , typename _Allocator , typename = _RequireAllocator<_Allocator>>
 std::unordered_map (initializer_list< pair< _Key, _Tp > >, _Allocator) -> unordered_map< _Key, _Tp, hash< _Key >, equal_to< _Key >, _Allocator >
 
│ │ │ -template<typename _Key , typename _Tp , typename _Allocator , typename = _RequireAllocator<_Allocator>>
 std::unordered_map (initializer_list< pair< _Key, _Tp > >, typename unordered_map< int, int >::size_type, _Allocator) -> unordered_map< _Key, _Tp, hash< _Key >, equal_to< _Key >, _Allocator >
 
│ │ │ -template<typename _Key , typename _Tp , typename _Hash , typename _Allocator , typename = _RequireNotAllocatorOrIntegral<_Hash>, typename = _RequireAllocator<_Allocator>>
 std::unordered_map (initializer_list< pair< _Key, _Tp > >, typename unordered_map< int, int >::size_type, _Hash, _Allocator) -> unordered_map< _Key, _Tp, _Hash, equal_to< _Key >, _Allocator >
 
│ │ │ -template<typename _Key , typename _Tp , typename _Hash = hash<_Key>, typename _Pred = equal_to<_Key>, typename _Allocator = allocator<pair<const _Key, _Tp>>, typename = _RequireNotAllocatorOrIntegral<_Hash>, typename = _RequireNotAllocator<_Pred>, typename = _RequireAllocator<_Allocator>>
 std::unordered_map (initializer_list< pair< _Key, _Tp > >, typename unordered_map< int, int >::size_type={}, _Hash=_Hash(), _Pred=_Pred(), _Allocator=_Allocator()) -> unordered_map< _Key, _Tp, _Hash, _Pred, _Allocator >
 
│ │ │ -template<typename _InputIterator , typename _Allocator , typename = _RequireInputIter<_InputIterator>, typename = _RequireAllocator<_Allocator>>
 std::unordered_multimap (_InputIterator, _InputIterator, _Allocator) -> unordered_multimap< __iter_key_t< _InputIterator >, __iter_val_t< _InputIterator >, hash< __iter_key_t< _InputIterator > >, equal_to< __iter_key_t< _InputIterator > >, _Allocator >
 
│ │ │ -template<typename _InputIterator , typename _Allocator , typename = _RequireInputIter<_InputIterator>, typename = _RequireAllocator<_Allocator>>
 std::unordered_multimap (_InputIterator, _InputIterator, unordered_multimap< int, int >::size_type, _Allocator) -> unordered_multimap< __iter_key_t< _InputIterator >, __iter_val_t< _InputIterator >, hash< __iter_key_t< _InputIterator > >, equal_to< __iter_key_t< _InputIterator > >, _Allocator >
 
│ │ │ -template<typename _InputIterator , typename _Hash , typename _Allocator , typename = _RequireInputIter<_InputIterator>, typename = _RequireNotAllocatorOrIntegral<_Hash>, typename = _RequireAllocator<_Allocator>>
 std::unordered_multimap (_InputIterator, _InputIterator, unordered_multimap< int, int >::size_type, _Hash, _Allocator) -> unordered_multimap< __iter_key_t< _InputIterator >, __iter_val_t< _InputIterator >, _Hash, equal_to< __iter_key_t< _InputIterator > >, _Allocator >
 
│ │ │ -template<typename _InputIterator , typename _Hash = hash<__iter_key_t<_InputIterator>>, typename _Pred = equal_to<__iter_key_t<_InputIterator>>, typename _Allocator = allocator<__iter_to_alloc_t<_InputIterator>>, typename = _RequireInputIter<_InputIterator>, typename = _RequireNotAllocatorOrIntegral<_Hash>, typename = _RequireNotAllocator<_Pred>, typename = _RequireAllocator<_Allocator>>
 std::unordered_multimap (_InputIterator, _InputIterator, unordered_multimap< int, int >::size_type={}, _Hash=_Hash(), _Pred=_Pred(), _Allocator=_Allocator()) -> unordered_multimap< __iter_key_t< _InputIterator >, __iter_val_t< _InputIterator >, _Hash, _Pred, _Allocator >
 
│ │ │ -template<typename _Key , typename _Tp , typename _Allocator , typename = _RequireAllocator<_Allocator>>
 std::unordered_multimap (initializer_list< pair< _Key, _Tp > >, _Allocator) -> unordered_multimap< _Key, _Tp, hash< _Key >, equal_to< _Key >, _Allocator >
 
│ │ │ -template<typename _Key , typename _Tp , typename _Allocator , typename = _RequireAllocator<_Allocator>>
 std::unordered_multimap (initializer_list< pair< _Key, _Tp > >, unordered_multimap< int, int >::size_type, _Allocator) -> unordered_multimap< _Key, _Tp, hash< _Key >, equal_to< _Key >, _Allocator >
 
│ │ │ -template<typename _Key , typename _Tp , typename _Hash , typename _Allocator , typename = _RequireNotAllocatorOrIntegral<_Hash>, typename = _RequireAllocator<_Allocator>>
 std::unordered_multimap (initializer_list< pair< _Key, _Tp > >, unordered_multimap< int, int >::size_type, _Hash, _Allocator) -> unordered_multimap< _Key, _Tp, _Hash, equal_to< _Key >, _Allocator >
 
│ │ │ -template<typename _Key , typename _Tp , typename _Hash = hash<_Key>, typename _Pred = equal_to<_Key>, typename _Allocator = allocator<pair<const _Key, _Tp>>, typename = _RequireNotAllocatorOrIntegral<_Hash>, typename = _RequireNotAllocator<_Pred>, typename = _RequireAllocator<_Allocator>>
 std::unordered_multimap (initializer_list< pair< _Key, _Tp > >, unordered_multimap< int, int >::size_type={}, _Hash=_Hash(), _Pred=_Pred(), _Allocator=_Allocator()) -> unordered_multimap< _Key, _Tp, _Hash, _Pred, _Allocator >
 

│ │ │ +Variables

constexpr adopt_lock_t std::adopt_lock
 
constexpr defer_lock_t std::defer_lock
 
constexpr try_to_lock_t std::try_to_lock
 
│ │ │

Detailed Description

│ │ │ -

This is an internal header file, included by other library headers. Do not attempt to use it directly. Instead, include <unordered_map>.

│ │ │ +

This is an internal header file, included by other library headers. Do not attempt to use it directly. Instead, include <mutex>.

│ │ │ │ │ │ -

Definition in file unordered_map.h.

│ │ │ -

Macro Definition Documentation

│ │ │ - │ │ │ -

◆ __cpp_lib_unordered_map_try_emplace

│ │ │ - │ │ │ -
│ │ │ -
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
#define __cpp_lib_unordered_map_try_emplace
│ │ │ -
│ │ │ - │ │ │ -

Definition at line 448 of file unordered_map.h.

│ │ │ - │ │ │ -
│ │ │ -
│ │ │ -
│ │ │ +

Definition in file std_mutex.h.

│ │ │ +
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,203 +1,32 @@ │ │ │ │ libstdc++ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _M_a_c_r_o_s | _T_y_p_e_d_e_f_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -unordered_map.h File Reference │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _V_a_r_i_a_b_l_e_s │ │ │ │ +std_mutex.h File Reference │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ CCllaasssseess │ │ │ │ -class   _s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_<_ ___K_e_y_,_ ___T_p_,_ ___H_a_s_h_,_ ___P_r_e_d_,_ ___A_l_l_o_c_ _> │ │ │ │ +struct   _s_t_d_:_:_a_d_o_p_t___l_o_c_k___t │ │ │ │   │ │ │ │ -class   _s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_<_ ___K_e_y_,_ ___T_p_,_ ___H_a_s_h_,_ ___P_r_e_d_,_ ___A_l_l_o_c_ _> │ │ │ │ +struct   _s_t_d_:_:_d_e_f_e_r___l_o_c_k___t │ │ │ │ +  │ │ │ │ + class   _s_t_d_:_:_l_o_c_k___g_u_a_r_d_<_ ___M_u_t_e_x_ _> │ │ │ │ +  │ │ │ │ + class   _s_t_d_:_:_m_u_t_e_x │ │ │ │ +  │ │ │ │ +struct   _s_t_d_:_:_t_r_y___t_o___l_o_c_k___t │ │ │ │   │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _s_t_d │ │ │ │   │ │ │ │ -MMaaccrrooss │ │ │ │ -#define  _____c_p_p___l_i_b___u_n_o_r_d_e_r_e_d___m_a_p___t_r_y___e_m_p_l_a_c_e │ │ │ │ +VVaarriiaabblleess │ │ │ │ + constexpr _a_d_o_p_t___l_o_c_k___t  _s_t_d_:_:_a_d_o_p_t___l_o_c_k │ │ │ │ +  │ │ │ │ + constexpr _d_e_f_e_r___l_o_c_k___t  _s_t_d_:_:_d_e_f_e_r___l_o_c_k │ │ │ │   │ │ │ │ -TTyyppeeddeeffss │ │ │ │ -template<_t_y_p_e_n_a_m_e ___K_e_y , _t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___H_a_s_h = hash<_Key>, _t_y_p_e_n_a_m_e │ │ │ │ -___P_r_e_d = std::equal_to<_Key>, _t_y_p_e_n_a_m_e _Alloc = std::allocator >, _t_y_p_e_n_a_m_e ___T_r = __umap_traits<__cache_default<_Key, _Hash>:: │ │ │ │ -value>> │ │ │ │ -_u_s_i_n_g  _s_t_d_:_:_____u_m_a_p___h_a_s_h_t_a_b_l_e = _Hashtable< ___K_e_y, _s_t_d_:_:_p_a_i_r< const ___K_e_y, _Tp >, │ │ │ │ - _Alloc, __detail::_Select1st, ___P_r_e_d, ___H_a_s_h, __detail:: │ │ │ │ - _Mod_range_hashing, __detail::_Default_ranged_hash, __detail:: │ │ │ │ - _Prime_rehash_policy, ___T_r > │ │ │ │ -  │ │ │ │ -template │ │ │ │ -_u_s_i_n_g  _s_t_d_:_:_____u_m_a_p___t_r_a_i_t_s = __detail::_Hashtable_traits< ___C_a_c_h_e, _f_a_l_s_e, _t_r_u_e > │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e ___K_e_y , _t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___H_a_s_h = hash<_Key>, _t_y_p_e_n_a_m_e │ │ │ │ -___P_r_e_d = std::equal_to<_Key>, _t_y_p_e_n_a_m_e _Alloc = std::allocator >, _t_y_p_e_n_a_m_e ___T_r = __ummap_traits<__cache_default<_Key, _Hash>:: │ │ │ │ -value>> │ │ │ │ -_u_s_i_n_g  _s_t_d_:_:_____u_m_m_a_p___h_a_s_h_t_a_b_l_e = _Hashtable< ___K_e_y, _s_t_d_:_:_p_a_i_r< const ___K_e_y, _Tp >, │ │ │ │ - _Alloc, __detail::_Select1st, ___P_r_e_d, ___H_a_s_h, __detail:: │ │ │ │ - _Mod_range_hashing, __detail::_Default_ranged_hash, __detail:: │ │ │ │ - _Prime_rehash_policy, ___T_r > │ │ │ │ -  │ │ │ │ -template │ │ │ │ -_u_s_i_n_g  _s_t_d_:_:_____u_m_m_a_p___t_r_a_i_t_s = __detail::_Hashtable_traits< ___C_a_c_h_e, _f_a_l_s_e, _f_a_l_s_e │ │ │ │ - > │ │ │ │ -  │ │ │ │ -FFuunnccttiioonnss │ │ │ │ -template<_c_l_a_s_s ___K_e_y , _c_l_a_s_s _Tp , _c_l_a_s_s ___H_a_s_h , _c_l_a_s_s ___P_r_e_d , _c_l_a_s_s _Alloc > │ │ │ │ -bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_=_= (const _u_n_o_r_d_e_r_e_d___m_a_p< ___K_e_y, _Tp, ___H_a_s_h, ___P_r_e_d, _Alloc > │ │ │ │ - &__x, const _u_n_o_r_d_e_r_e_d___m_a_p< ___K_e_y, _Tp, ___H_a_s_h, ___P_r_e_d, _Alloc > &__y) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___K_e_y , _c_l_a_s_s _Tp , _c_l_a_s_s ___H_a_s_h , _c_l_a_s_s ___P_r_e_d , _c_l_a_s_s _Alloc > │ │ │ │ -bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_=_= (const _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p< ___K_e_y, _Tp, ___H_a_s_h, ___P_r_e_d, │ │ │ │ - _Alloc > &__x, const _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p< ___K_e_y, _Tp, ___H_a_s_h, ___P_r_e_d, _Alloc │ │ │ │ - > &__y) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___K_e_y , _c_l_a_s_s _Tp , _c_l_a_s_s ___H_a_s_h , _c_l_a_s_s ___P_r_e_d , _c_l_a_s_s _Alloc > │ │ │ │ -_v_o_i_d  _s_t_d_:_:_s_w_a_p (_u_n_o_r_d_e_r_e_d___m_a_p< ___K_e_y, _Tp, ___H_a_s_h, ___P_r_e_d, _Alloc > &__x, │ │ │ │ - _u_n_o_r_d_e_r_e_d___m_a_p< ___K_e_y, _Tp, ___H_a_s_h, ___P_r_e_d, _Alloc > &__y) noexcept(noexcept │ │ │ │ - (__x.swap(__y))) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___K_e_y , _c_l_a_s_s _Tp , _c_l_a_s_s ___H_a_s_h , _c_l_a_s_s ___P_r_e_d , _c_l_a_s_s _Alloc > │ │ │ │ -_v_o_i_d  _s_t_d_:_:_s_w_a_p (_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p< ___K_e_y, _Tp, ___H_a_s_h, ___P_r_e_d, _Alloc > &__x, │ │ │ │ - _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p< ___K_e_y, _Tp, ___H_a_s_h, ___P_r_e_d, _Alloc > &__y) noexcept │ │ │ │ - (noexcept(__x.swap(__y))) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e ___I_n_p_u_t_I_t_e_r_a_t_o_r , _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r , _t_y_p_e_n_a_m_e = │ │ │ │ -_RequireInputIter<_InputIterator>, _t_y_p_e_n_a_m_e = _RequireAllocator<_Allocator>> │ │ │ │ -   ssttdd::::uunnoorrddeerreedd__mmaapp (___I_n_p_u_t_I_t_e_r_a_t_o_r, ___I_n_p_u_t_I_t_e_r_a_t_o_r, ___A_l_l_o_c_a_t_o_r) - │ │ │ │ - > _u_n_o_r_d_e_r_e_d___m_a_p< _____i_t_e_r___k_e_y___t< ___I_n_p_u_t_I_t_e_r_a_t_o_r >, __iter_val_t< │ │ │ │ - ___I_n_p_u_t_I_t_e_r_a_t_o_r >, _h_a_s_h< _____i_t_e_r___k_e_y___t< ___I_n_p_u_t_I_t_e_r_a_t_o_r > >, _e_q_u_a_l___t_o< │ │ │ │ - _____i_t_e_r___k_e_y___t< ___I_n_p_u_t_I_t_e_r_a_t_o_r > >, ___A_l_l_o_c_a_t_o_r > │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e ___I_n_p_u_t_I_t_e_r_a_t_o_r , _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r , _t_y_p_e_n_a_m_e = │ │ │ │ -_RequireInputIter<_InputIterator>, _t_y_p_e_n_a_m_e = _RequireAllocator<_Allocator>> │ │ │ │ -   ssttdd::::uunnoorrddeerreedd__mmaapp (___I_n_p_u_t_I_t_e_r_a_t_o_r, ___I_n_p_u_t_I_t_e_r_a_t_o_r, _t_y_p_e_n_a_m_e │ │ │ │ - _u_n_o_r_d_e_r_e_d___m_a_p< int, int >::size_type, ___A_l_l_o_c_a_t_o_r) -> _u_n_o_r_d_e_r_e_d___m_a_p< │ │ │ │ - _____i_t_e_r___k_e_y___t< ___I_n_p_u_t_I_t_e_r_a_t_o_r >, __iter_val_t< ___I_n_p_u_t_I_t_e_r_a_t_o_r >, _h_a_s_h< │ │ │ │ - _____i_t_e_r___k_e_y___t< ___I_n_p_u_t_I_t_e_r_a_t_o_r > >, _e_q_u_a_l___t_o< _____i_t_e_r___k_e_y___t< ___I_n_p_u_t_I_t_e_r_a_t_o_r │ │ │ │ - > >, ___A_l_l_o_c_a_t_o_r > │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e ___I_n_p_u_t_I_t_e_r_a_t_o_r , _t_y_p_e_n_a_m_e ___H_a_s_h , _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r , │ │ │ │ -_t_y_p_e_n_a_m_e = _RequireInputIter<_InputIterator>, _t_y_p_e_n_a_m_e = │ │ │ │ -_RequireNotAllocatorOrIntegral<_Hash>, _t_y_p_e_n_a_m_e = │ │ │ │ -_RequireAllocator<_Allocator>> │ │ │ │ -   ssttdd::::uunnoorrddeerreedd__mmaapp (___I_n_p_u_t_I_t_e_r_a_t_o_r, ___I_n_p_u_t_I_t_e_r_a_t_o_r, _t_y_p_e_n_a_m_e │ │ │ │ - _u_n_o_r_d_e_r_e_d___m_a_p< int, int >::size_type, ___H_a_s_h, ___A_l_l_o_c_a_t_o_r) - │ │ │ │ - > _u_n_o_r_d_e_r_e_d___m_a_p< _____i_t_e_r___k_e_y___t< ___I_n_p_u_t_I_t_e_r_a_t_o_r >, __iter_val_t< │ │ │ │ - ___I_n_p_u_t_I_t_e_r_a_t_o_r >, ___H_a_s_h, _e_q_u_a_l___t_o< _____i_t_e_r___k_e_y___t< ___I_n_p_u_t_I_t_e_r_a_t_o_r > >, │ │ │ │ - ___A_l_l_o_c_a_t_o_r > │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e ___I_n_p_u_t_I_t_e_r_a_t_o_r , _t_y_p_e_n_a_m_e ___H_a_s_h = │ │ │ │ -hash<__iter_key_t<_InputIterator>>, _t_y_p_e_n_a_m_e ___P_r_e_d = │ │ │ │ -equal_to<__iter_key_t<_InputIterator>>, _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r = │ │ │ │ -allocator<__iter_to_alloc_t<_InputIterator>>, _t_y_p_e_n_a_m_e = │ │ │ │ -_RequireInputIter<_InputIterator>, _t_y_p_e_n_a_m_e = │ │ │ │ -_RequireNotAllocatorOrIntegral<_Hash>, _t_y_p_e_n_a_m_e = _RequireNotAllocator<_Pred>, │ │ │ │ -_t_y_p_e_n_a_m_e = _RequireAllocator<_Allocator>> │ │ │ │ -   ssttdd::::uunnoorrddeerreedd__mmaapp (___I_n_p_u_t_I_t_e_r_a_t_o_r, ___I_n_p_u_t_I_t_e_r_a_t_o_r, _t_y_p_e_n_a_m_e │ │ │ │ - _u_n_o_r_d_e_r_e_d___m_a_p< int, int >::size_type={}, ___H_a_s_h=___H_a_s_h(), ___P_r_e_d=___P_r_e_d(), │ │ │ │ - ___A_l_l_o_c_a_t_o_r=___A_l_l_o_c_a_t_o_r()) -> _u_n_o_r_d_e_r_e_d___m_a_p< _____i_t_e_r___k_e_y___t< ___I_n_p_u_t_I_t_e_r_a_t_o_r │ │ │ │ - >, __iter_val_t< ___I_n_p_u_t_I_t_e_r_a_t_o_r >, ___H_a_s_h, ___P_r_e_d, ___A_l_l_o_c_a_t_o_r > │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e ___K_e_y , _t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r , _t_y_p_e_n_a_m_e = │ │ │ │ -_RequireAllocator<_Allocator>> │ │ │ │ -   ssttdd::::uunnoorrddeerreedd__mmaapp (_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t< _p_a_i_r< ___K_e_y, _Tp > >, ___A_l_l_o_c_a_t_o_r) - │ │ │ │ - > _u_n_o_r_d_e_r_e_d___m_a_p< ___K_e_y, _Tp, _h_a_s_h< ___K_e_y >, _e_q_u_a_l___t_o< ___K_e_y >, ___A_l_l_o_c_a_t_o_r > │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e ___K_e_y , _t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r , _t_y_p_e_n_a_m_e = │ │ │ │ -_RequireAllocator<_Allocator>> │ │ │ │ -   ssttdd::::uunnoorrddeerreedd__mmaapp (_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t< _p_a_i_r< ___K_e_y, _Tp > >, _t_y_p_e_n_a_m_e │ │ │ │ - _u_n_o_r_d_e_r_e_d___m_a_p< int, int >::size_type, ___A_l_l_o_c_a_t_o_r) -> _u_n_o_r_d_e_r_e_d___m_a_p< ___K_e_y, │ │ │ │ - _Tp, _h_a_s_h< ___K_e_y >, _e_q_u_a_l___t_o< ___K_e_y >, ___A_l_l_o_c_a_t_o_r > │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e ___K_e_y , _t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___H_a_s_h , _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r , │ │ │ │ -_t_y_p_e_n_a_m_e = _RequireNotAllocatorOrIntegral<_Hash>, _t_y_p_e_n_a_m_e = │ │ │ │ -_RequireAllocator<_Allocator>> │ │ │ │ -   ssttdd::::uunnoorrddeerreedd__mmaapp (_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t< _p_a_i_r< ___K_e_y, _Tp > >, _t_y_p_e_n_a_m_e │ │ │ │ - _u_n_o_r_d_e_r_e_d___m_a_p< int, int >::size_type, ___H_a_s_h, ___A_l_l_o_c_a_t_o_r) - │ │ │ │ - > _u_n_o_r_d_e_r_e_d___m_a_p< ___K_e_y, _Tp, ___H_a_s_h, _e_q_u_a_l___t_o< ___K_e_y >, ___A_l_l_o_c_a_t_o_r > │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e ___K_e_y , _t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___H_a_s_h = hash<_Key>, _t_y_p_e_n_a_m_e │ │ │ │ -___P_r_e_d = equal_to<_Key>, _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r = allocator>, │ │ │ │ -_t_y_p_e_n_a_m_e = _RequireNotAllocatorOrIntegral<_Hash>, _t_y_p_e_n_a_m_e = │ │ │ │ -_RequireNotAllocator<_Pred>, _t_y_p_e_n_a_m_e = _RequireAllocator<_Allocator>> │ │ │ │ -   ssttdd::::uunnoorrddeerreedd__mmaapp (_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t< _p_a_i_r< ___K_e_y, _Tp > >, _t_y_p_e_n_a_m_e │ │ │ │ - _u_n_o_r_d_e_r_e_d___m_a_p< int, int >::size_type={}, ___H_a_s_h=___H_a_s_h(), ___P_r_e_d=___P_r_e_d(), │ │ │ │ - ___A_l_l_o_c_a_t_o_r=___A_l_l_o_c_a_t_o_r()) -> _u_n_o_r_d_e_r_e_d___m_a_p< ___K_e_y, _Tp, ___H_a_s_h, ___P_r_e_d, │ │ │ │ - ___A_l_l_o_c_a_t_o_r > │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e ___I_n_p_u_t_I_t_e_r_a_t_o_r , _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r , _t_y_p_e_n_a_m_e = │ │ │ │ -_RequireInputIter<_InputIterator>, _t_y_p_e_n_a_m_e = _RequireAllocator<_Allocator>> │ │ │ │ -   ssttdd::::uunnoorrddeerreedd__mmuullttiimmaapp (___I_n_p_u_t_I_t_e_r_a_t_o_r, ___I_n_p_u_t_I_t_e_r_a_t_o_r, ___A_l_l_o_c_a_t_o_r) - │ │ │ │ - > _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p< _____i_t_e_r___k_e_y___t< ___I_n_p_u_t_I_t_e_r_a_t_o_r >, __iter_val_t< │ │ │ │ - ___I_n_p_u_t_I_t_e_r_a_t_o_r >, _h_a_s_h< _____i_t_e_r___k_e_y___t< ___I_n_p_u_t_I_t_e_r_a_t_o_r > >, _e_q_u_a_l___t_o< │ │ │ │ - _____i_t_e_r___k_e_y___t< ___I_n_p_u_t_I_t_e_r_a_t_o_r > >, ___A_l_l_o_c_a_t_o_r > │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e ___I_n_p_u_t_I_t_e_r_a_t_o_r , _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r , _t_y_p_e_n_a_m_e = │ │ │ │ -_RequireInputIter<_InputIterator>, _t_y_p_e_n_a_m_e = _RequireAllocator<_Allocator>> │ │ │ │ -   ssttdd::::uunnoorrddeerreedd__mmuullttiimmaapp (___I_n_p_u_t_I_t_e_r_a_t_o_r, ___I_n_p_u_t_I_t_e_r_a_t_o_r, │ │ │ │ - _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p< int, int >::size_type, ___A_l_l_o_c_a_t_o_r) - │ │ │ │ - > _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p< _____i_t_e_r___k_e_y___t< ___I_n_p_u_t_I_t_e_r_a_t_o_r >, __iter_val_t< │ │ │ │ - ___I_n_p_u_t_I_t_e_r_a_t_o_r >, _h_a_s_h< _____i_t_e_r___k_e_y___t< ___I_n_p_u_t_I_t_e_r_a_t_o_r > >, _e_q_u_a_l___t_o< │ │ │ │ - _____i_t_e_r___k_e_y___t< ___I_n_p_u_t_I_t_e_r_a_t_o_r > >, ___A_l_l_o_c_a_t_o_r > │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e ___I_n_p_u_t_I_t_e_r_a_t_o_r , _t_y_p_e_n_a_m_e ___H_a_s_h , _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r , │ │ │ │ -_t_y_p_e_n_a_m_e = _RequireInputIter<_InputIterator>, _t_y_p_e_n_a_m_e = │ │ │ │ -_RequireNotAllocatorOrIntegral<_Hash>, _t_y_p_e_n_a_m_e = │ │ │ │ -_RequireAllocator<_Allocator>> │ │ │ │ -   ssttdd::::uunnoorrddeerreedd__mmuullttiimmaapp (___I_n_p_u_t_I_t_e_r_a_t_o_r, ___I_n_p_u_t_I_t_e_r_a_t_o_r, │ │ │ │ - _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p< int, int >::size_type, ___H_a_s_h, ___A_l_l_o_c_a_t_o_r) - │ │ │ │ - > _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p< _____i_t_e_r___k_e_y___t< ___I_n_p_u_t_I_t_e_r_a_t_o_r >, __iter_val_t< │ │ │ │ - ___I_n_p_u_t_I_t_e_r_a_t_o_r >, ___H_a_s_h, _e_q_u_a_l___t_o< _____i_t_e_r___k_e_y___t< ___I_n_p_u_t_I_t_e_r_a_t_o_r > >, │ │ │ │ - ___A_l_l_o_c_a_t_o_r > │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e ___I_n_p_u_t_I_t_e_r_a_t_o_r , _t_y_p_e_n_a_m_e ___H_a_s_h = │ │ │ │ -hash<__iter_key_t<_InputIterator>>, _t_y_p_e_n_a_m_e ___P_r_e_d = │ │ │ │ -equal_to<__iter_key_t<_InputIterator>>, _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r = │ │ │ │ -allocator<__iter_to_alloc_t<_InputIterator>>, _t_y_p_e_n_a_m_e = │ │ │ │ -_RequireInputIter<_InputIterator>, _t_y_p_e_n_a_m_e = │ │ │ │ -_RequireNotAllocatorOrIntegral<_Hash>, _t_y_p_e_n_a_m_e = _RequireNotAllocator<_Pred>, │ │ │ │ -_t_y_p_e_n_a_m_e = _RequireAllocator<_Allocator>> │ │ │ │ -   ssttdd::::uunnoorrddeerreedd__mmuullttiimmaapp (___I_n_p_u_t_I_t_e_r_a_t_o_r, ___I_n_p_u_t_I_t_e_r_a_t_o_r, │ │ │ │ - _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p< int, int >::size_type={}, ___H_a_s_h=___H_a_s_h(), ___P_r_e_d=___P_r_e_d │ │ │ │ - (), ___A_l_l_o_c_a_t_o_r=___A_l_l_o_c_a_t_o_r()) -> _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p< _____i_t_e_r___k_e_y___t< │ │ │ │ - ___I_n_p_u_t_I_t_e_r_a_t_o_r >, __iter_val_t< ___I_n_p_u_t_I_t_e_r_a_t_o_r >, ___H_a_s_h, ___P_r_e_d, │ │ │ │ - ___A_l_l_o_c_a_t_o_r > │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e ___K_e_y , _t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r , _t_y_p_e_n_a_m_e = │ │ │ │ -_RequireAllocator<_Allocator>> │ │ │ │ -   ssttdd::::uunnoorrddeerreedd__mmuullttiimmaapp (_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t< _p_a_i_r< ___K_e_y, _Tp > >, │ │ │ │ - ___A_l_l_o_c_a_t_o_r) -> _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p< ___K_e_y, _Tp, _h_a_s_h< ___K_e_y >, _e_q_u_a_l___t_o< │ │ │ │ - ___K_e_y >, ___A_l_l_o_c_a_t_o_r > │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e ___K_e_y , _t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r , _t_y_p_e_n_a_m_e = │ │ │ │ -_RequireAllocator<_Allocator>> │ │ │ │ -   ssttdd::::uunnoorrddeerreedd__mmuullttiimmaapp (_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t< _p_a_i_r< ___K_e_y, _Tp > >, │ │ │ │ - _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p< int, int >::size_type, ___A_l_l_o_c_a_t_o_r) - │ │ │ │ - > _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p< ___K_e_y, _Tp, _h_a_s_h< ___K_e_y >, _e_q_u_a_l___t_o< ___K_e_y >, │ │ │ │ - ___A_l_l_o_c_a_t_o_r > │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e ___K_e_y , _t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___H_a_s_h , _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r , │ │ │ │ -_t_y_p_e_n_a_m_e = _RequireNotAllocatorOrIntegral<_Hash>, _t_y_p_e_n_a_m_e = │ │ │ │ -_RequireAllocator<_Allocator>> │ │ │ │ -   ssttdd::::uunnoorrddeerreedd__mmuullttiimmaapp (_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t< _p_a_i_r< ___K_e_y, _Tp > >, │ │ │ │ - _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p< int, int >::size_type, ___H_a_s_h, ___A_l_l_o_c_a_t_o_r) - │ │ │ │ - > _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p< ___K_e_y, _Tp, ___H_a_s_h, _e_q_u_a_l___t_o< ___K_e_y >, ___A_l_l_o_c_a_t_o_r > │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e ___K_e_y , _t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___H_a_s_h = hash<_Key>, _t_y_p_e_n_a_m_e │ │ │ │ -___P_r_e_d = equal_to<_Key>, _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r = allocator>, │ │ │ │ -_t_y_p_e_n_a_m_e = _RequireNotAllocatorOrIntegral<_Hash>, _t_y_p_e_n_a_m_e = │ │ │ │ -_RequireNotAllocator<_Pred>, _t_y_p_e_n_a_m_e = _RequireAllocator<_Allocator>> │ │ │ │ -   ssttdd::::uunnoorrddeerreedd__mmuullttiimmaapp (_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t< _p_a_i_r< ___K_e_y, _Tp > >, │ │ │ │ - _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p< int, int >::size_type={}, ___H_a_s_h=___H_a_s_h(), ___P_r_e_d=___P_r_e_d │ │ │ │ - (), ___A_l_l_o_c_a_t_o_r=___A_l_l_o_c_a_t_o_r()) -> _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p< ___K_e_y, _Tp, ___H_a_s_h, │ │ │ │ - ___P_r_e_d, ___A_l_l_o_c_a_t_o_r > │ │ │ │ +constexpr _t_r_y___t_o___l_o_c_k___t  _s_t_d_:_:_t_r_y___t_o___l_o_c_k │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ This is an internal header file, included by other library headers. Do not │ │ │ │ -attempt to use it directly. Instead, include . │ │ │ │ -Definition in file _u_n_o_r_d_e_r_e_d___m_a_p_._h. │ │ │ │ -********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ -********** _?◆_? ____ccpppp__lliibb__uunnoorrddeerreedd__mmaapp__ttrryy__eemmppllaaccee ********** │ │ │ │ -#define __cpp_lib_unordered_map_try_emplace │ │ │ │ -Definition at line _4_4_8 of file _u_n_o_r_d_e_r_e_d___m_a_p_._h. │ │ │ │ +attempt to use it directly. Instead, include . │ │ │ │ +Definition in file _s_t_d___m_u_t_e_x_._h. │ │ │ │ * _b_i_t_s │ │ │ │ - * _u_n_o_r_d_e_r_e_d___m_a_p_._h │ │ │ │ + * _s_t_d___m_u_t_e_x_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-12-base/libstdc++/user/a00377.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,4 +1,5 @@ │ │ │ │ var a00377 = [ │ │ │ │ - ["__umap_traits", "a00377.html#a84b02064179c0ef21d0189a7bf15803b", null], │ │ │ │ - ["__ummap_traits", "a00377.html#a1a55f2ace43a0a61a859367d227d245f", null] │ │ │ │ + ["adopt_lock", "a00377.html#gad21e19f3b9b1166718c228219723e130", null], │ │ │ │ + ["defer_lock", "a00377.html#gaef1e52b34e2d2d6e3850bbd28ff7546a", null], │ │ │ │ + ["try_to_lock", "a00377.html#ga845da3c3459b8dc4c6f690039b797dfc", null] │ │ │ │ ]; │ │ ├── ./usr/share/doc/gcc-12-base/libstdc++/user/a00377_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: unordered_map.h Source File │ │ │ +libstdc++: std_mutex.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -45,20 +45,20 @@ │ │ │ │ │ │
│ │ │
│ │ │ -
unordered_map.h
│ │ │ +
std_mutex.h
│ │ │
│ │ │
│ │ │ -Go to the documentation of this file.
1// unordered_map implementation -*- C++ -*-
│ │ │ +Go to the documentation of this file.
1// std::mutex implementation -*- C++ -*-
│ │ │
2
│ │ │ -
3// Copyright (C) 2010-2022 Free Software Foundation, Inc.
│ │ │ +
3// Copyright (C) 2003-2022 Free Software Foundation, Inc.
│ │ │
4//
│ │ │
5// This file is part of the GNU ISO C++ Library. This library is free
│ │ │
6// software; you can redistribute it and/or modify it under the
│ │ │
7// terms of the GNU General Public License as published by the
│ │ │
8// Free Software Foundation; either version 3, or (at your option)
│ │ │
9// any later version.
│ │ │
10
│ │ │ @@ -72,2664 +72,278 @@ │ │ │
18// 3.1, as published by the Free Software Foundation.
│ │ │
19
│ │ │
20// You should have received a copy of the GNU General Public License and
│ │ │
21// a copy of the GCC Runtime Library Exception along with this program;
│ │ │
22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
│ │ │
23// <http://www.gnu.org/licenses/>.
│ │ │
24
│ │ │ -
25/** @file bits/unordered_map.h
│ │ │ +
25/** @file bits/std_mutex.h
│ │ │
26 * This is an internal header file, included by other library headers.
│ │ │ -
27 * Do not attempt to use it directly. @headername{unordered_map}
│ │ │ +
27 * Do not attempt to use it directly. @headername{mutex}
│ │ │
28 */
│ │ │
29
│ │ │ -
30#ifndef _UNORDERED_MAP_H
│ │ │ -
31#define _UNORDERED_MAP_H
│ │ │ +
30#ifndef _GLIBCXX_MUTEX_H
│ │ │ +
31#define _GLIBCXX_MUTEX_H 1
│ │ │
32
│ │ │ -
33namespace std _GLIBCXX_VISIBILITY(default)
│ │ │ -
34{
│ │ │ -
35_GLIBCXX_BEGIN_NAMESPACE_VERSION
│ │ │ -
36_GLIBCXX_BEGIN_NAMESPACE_CONTAINER
│ │ │ -
37
│ │ │ -
38 /// Base types for unordered_map.
│ │ │ -
39 template<bool _Cache>
│ │ │ -
40 using __umap_traits = __detail::_Hashtable_traits<_Cache, false, true>;
│ │ │ -
41
│ │ │ -
42 template<typename _Key,
│ │ │ -
43 typename _Tp,
│ │ │ -
44 typename _Hash = hash<_Key>,
│ │ │ -
45 typename _Pred = std::equal_to<_Key>,
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
49 _Alloc, __detail::_Select1st,
│ │ │ -
50 _Pred, _Hash,
│ │ │ -
51 __detail::_Mod_range_hashing,
│ │ │ -
52 __detail::_Default_ranged_hash,
│ │ │ -
53 __detail::_Prime_rehash_policy, _Tr>;
│ │ │ -
54
│ │ │ -
55 /// Base types for unordered_multimap.
│ │ │ -
56 template<bool _Cache>
│ │ │ -
57 using __ummap_traits = __detail::_Hashtable_traits<_Cache, false, false>;
│ │ │ -
58
│ │ │ -
59 template<typename _Key,
│ │ │ -
60 typename _Tp,
│ │ │ -
61 typename _Hash = hash<_Key>,
│ │ │ -
62 typename _Pred = std::equal_to<_Key>,
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
66 _Alloc, __detail::_Select1st,
│ │ │ -
67 _Pred, _Hash,
│ │ │ -
68 __detail::_Mod_range_hashing,
│ │ │ -
69 __detail::_Default_ranged_hash,
│ │ │ -
70 __detail::_Prime_rehash_policy, _Tr>;
│ │ │ -
71
│ │ │ -
72 template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
│ │ │ - │ │ │ -
74
│ │ │ -
75 /**
│ │ │ -
76 * @brief A standard container composed of unique keys (containing
│ │ │ -
77 * at most one of each key value) that associates values of another type
│ │ │ -
78 * with the keys.
│ │ │ -
79 *
│ │ │ -
80 * @ingroup unordered_associative_containers
│ │ │ -
81 * @headerfile unordered_map
│ │ │ -
82 * @since C++11
│ │ │ -
83 *
│ │ │ -
84 * @tparam _Key Type of key objects.
│ │ │ -
85 * @tparam _Tp Type of mapped objects.
│ │ │ -
86 * @tparam _Hash Hashing function object type, defaults to hash<_Value>.
│ │ │ -
87 * @tparam _Pred Predicate function object type, defaults
│ │ │ -
88 * to equal_to<_Value>.
│ │ │ -
89 * @tparam _Alloc Allocator type, defaults to
│ │ │ -
90 * std::allocator<std::pair<const _Key, _Tp>>.
│ │ │ -
91 *
│ │ │ -
92 * Meets the requirements of a <a href="tables.html#65">container</a>, and
│ │ │ -
93 * <a href="tables.html#xx">unordered associative container</a>
│ │ │ -
94 *
│ │ │ -
95 * The resulting value type of the container is std::pair<const _Key, _Tp>.
│ │ │ -
96 *
│ │ │ -
97 * Base is _Hashtable, dispatched at compile time via template
│ │ │ -
98 * alias __umap_hashtable.
│ │ │ -
99 */
│ │ │ -
100 template<typename _Key, typename _Tp,
│ │ │ -
101 typename _Hash = hash<_Key>,
│ │ │ -
102 typename _Pred = equal_to<_Key>,
│ │ │ -
103 typename _Alloc = allocator<std::pair<const _Key, _Tp>>>
│ │ │ -
│ │ │ - │ │ │ -
105 {
│ │ │ - │ │ │ -
107 _Hashtable _M_h;
│ │ │ -
108
│ │ │ -
109 public:
│ │ │ -
110 // typedefs:
│ │ │ -
111 ///@{
│ │ │ -
112 /// Public typedefs.
│ │ │ -
113 typedef typename _Hashtable::key_type key_type;
│ │ │ -
114 typedef typename _Hashtable::value_type value_type;
│ │ │ -
115 typedef typename _Hashtable::mapped_type mapped_type;
│ │ │ -
116 typedef typename _Hashtable::hasher hasher;
│ │ │ -
117 typedef typename _Hashtable::key_equal key_equal;
│ │ │ -
118 typedef typename _Hashtable::allocator_type allocator_type;
│ │ │ -
119 ///@}
│ │ │ -
120
│ │ │ -
121 ///@{
│ │ │ -
122 /// Iterator-related typedefs.
│ │ │ -
123 typedef typename _Hashtable::pointer pointer;
│ │ │ -
124 typedef typename _Hashtable::const_pointer const_pointer;
│ │ │ -
125 typedef typename _Hashtable::reference reference;
│ │ │ -
126 typedef typename _Hashtable::const_reference const_reference;
│ │ │ -
127 typedef typename _Hashtable::iterator iterator;
│ │ │ -
128 typedef typename _Hashtable::const_iterator const_iterator;
│ │ │ -
129 typedef typename _Hashtable::local_iterator local_iterator;
│ │ │ -
130 typedef typename _Hashtable::const_local_iterator const_local_iterator;
│ │ │ -
131 typedef typename _Hashtable::size_type size_type;
│ │ │ -
132 typedef typename _Hashtable::difference_type difference_type;
│ │ │ -
133 ///@}
│ │ │ -
134
│ │ │ -
135#if __cplusplus > 201402L
│ │ │ -
136 using node_type = typename _Hashtable::node_type;
│ │ │ -
137 using insert_return_type = typename _Hashtable::insert_return_type;
│ │ │ -
138#endif
│ │ │ -
139
│ │ │ -
140 //construct/destroy/copy
│ │ │ -
141
│ │ │ -
142 /// Default constructor.
│ │ │ -
143 unordered_map() = default;
│ │ │ -
144
│ │ │ -
145 /**
│ │ │ -
146 * @brief Default constructor creates no elements.
│ │ │ -
147 * @param __n Minimal initial number of buckets.
│ │ │ -
148 * @param __hf A hash functor.
│ │ │ -
149 * @param __eql A key equality functor.
│ │ │ -
150 * @param __a An allocator object.
│ │ │ -
151 */
│ │ │ -
152 explicit
│ │ │ -
│ │ │ - │ │ │ -
154 const hasher& __hf = hasher(),
│ │ │ -
155 const key_equal& __eql = key_equal(),
│ │ │ -
156 const allocator_type& __a = allocator_type())
│ │ │ -
157 : _M_h(__n, __hf, __eql, __a)
│ │ │ -
158 { }
│ │ │ -
│ │ │ -
159
│ │ │ -
160 /**
│ │ │ -
161 * @brief Builds an %unordered_map from a range.
│ │ │ -
162 * @param __first An input iterator.
│ │ │ -
163 * @param __last An input iterator.
│ │ │ -
164 * @param __n Minimal initial number of buckets.
│ │ │ -
165 * @param __hf A hash functor.
│ │ │ -
166 * @param __eql A key equality functor.
│ │ │ -
167 * @param __a An allocator object.
│ │ │ -
168 *
│ │ │ -
169 * Create an %unordered_map consisting of copies of the elements from
│ │ │ -
170 * [__first,__last). This is linear in N (where N is
│ │ │ -
171 * distance(__first,__last)).
│ │ │ -
172 */
│ │ │ -
173 template<typename _InputIterator>
│ │ │ -
│ │ │ - │ │ │ -
175 size_type __n = 0,
│ │ │ -
176 const hasher& __hf = hasher(),
│ │ │ -
177 const key_equal& __eql = key_equal(),
│ │ │ -
178 const allocator_type& __a = allocator_type())
│ │ │ -
179 : _M_h(__first, __last, __n, __hf, __eql, __a)
│ │ │ -
180 { }
│ │ │ -
│ │ │ -
181
│ │ │ -
182 /// Copy constructor.
│ │ │ -
183 unordered_map(const unordered_map&) = default;
│ │ │ -
184
│ │ │ -
185 /// Move constructor.
│ │ │ - │ │ │ -
187
│ │ │ -
188 /**
│ │ │ -
189 * @brief Creates an %unordered_map with no elements.
│ │ │ -
190 * @param __a An allocator object.
│ │ │ -
191 */
│ │ │ -
192 explicit
│ │ │ -
│ │ │ - │ │ │ -
194 : _M_h(__a)
│ │ │ -
195 { }
│ │ │ -
│ │ │ -
196
│ │ │ -
197 /*
│ │ │ -
198 * @brief Copy constructor with allocator argument.
│ │ │ -
199 * @param __uset Input %unordered_map to copy.
│ │ │ -
200 * @param __a An allocator object.
│ │ │ -
201 */
│ │ │ - │ │ │ -
203 const allocator_type& __a)
│ │ │ -
204 : _M_h(__umap._M_h, __a)
│ │ │ -
205 { }
│ │ │ -
206
│ │ │ -
207 /*
│ │ │ -
208 * @brief Move constructor with allocator argument.
│ │ │ -
209 * @param __uset Input %unordered_map to move.
│ │ │ -
210 * @param __a An allocator object.
│ │ │ -
211 */
│ │ │ - │ │ │ -
213 const allocator_type& __a)
│ │ │ -
214 noexcept( noexcept(_Hashtable(std::move(__umap._M_h), __a)) )
│ │ │ -
215 : _M_h(std::move(__umap._M_h), __a)
│ │ │ -
216 { }
│ │ │ -
217
│ │ │ -
218 /**
│ │ │ -
219 * @brief Builds an %unordered_map from an initializer_list.
│ │ │ -
220 * @param __l An initializer_list.
│ │ │ -
221 * @param __n Minimal initial number of buckets.
│ │ │ -
222 * @param __hf A hash functor.
│ │ │ -
223 * @param __eql A key equality functor.
│ │ │ -
224 * @param __a An allocator object.
│ │ │ -
225 *
│ │ │ -
226 * Create an %unordered_map consisting of copies of the elements in the
│ │ │ -
227 * list. This is linear in N (where N is @a __l.size()).
│ │ │ -
228 */
│ │ │ -
│ │ │ - │ │ │ -
230 size_type __n = 0,
│ │ │ -
231 const hasher& __hf = hasher(),
│ │ │ -
232 const key_equal& __eql = key_equal(),
│ │ │ -
233 const allocator_type& __a = allocator_type())
│ │ │ -
234 : _M_h(__l, __n, __hf, __eql, __a)
│ │ │ -
235 { }
│ │ │ -
│ │ │ -
236
│ │ │ -
237 unordered_map(size_type __n, const allocator_type& __a)
│ │ │ -
238 : unordered_map(__n, hasher(), key_equal(), __a)
│ │ │ -
239 { }
│ │ │ -
240
│ │ │ -
241 unordered_map(size_type __n, const hasher& __hf,
│ │ │ -
242 const allocator_type& __a)
│ │ │ -
243 : unordered_map(__n, __hf, key_equal(), __a)
│ │ │ -
244 { }
│ │ │ -
245
│ │ │ -
246 template<typename _InputIterator>
│ │ │ -
247 unordered_map(_InputIterator __first, _InputIterator __last,
│ │ │ -
248 size_type __n,
│ │ │ -
249 const allocator_type& __a)
│ │ │ -
250 : unordered_map(__first, __last, __n, hasher(), key_equal(), __a)
│ │ │ -
251 { }
│ │ │ +
33#pragma GCC system_header
│ │ │ +
34
│ │ │ +
35#if __cplusplus < 201103L
│ │ │ +
36# include <bits/c++0x_warning.h>
│ │ │ +
37#else
│ │ │ +
38
│ │ │ +
39#include <system_error>
│ │ │ +
40#include <bits/functexcept.h>
│ │ │ +
41#include <bits/gthr.h>
│ │ │ +
42
│ │ │ +
43namespace std _GLIBCXX_VISIBILITY(default)
│ │ │ +
44{
│ │ │ +
45_GLIBCXX_BEGIN_NAMESPACE_VERSION
│ │ │ +
46
│ │ │ +
47 /**
│ │ │ +
48 * @defgroup mutexes Mutexes
│ │ │ +
49 * @ingroup concurrency
│ │ │ +
50 *
│ │ │ +
51 * Classes for mutex support.
│ │ │ +
52 * @{
│ │ │ +
53 */
│ │ │ +
54
│ │ │ +
55#ifdef _GLIBCXX_HAS_GTHREADS
│ │ │ +
56 /// @cond undocumented
│ │ │ +
57
│ │ │ +
58 // Common base class for std::mutex and std::timed_mutex
│ │ │ +
59 class __mutex_base
│ │ │ +
60 {
│ │ │ +
61 protected:
│ │ │ +
62 typedef __gthread_mutex_t __native_type;
│ │ │ +
63
│ │ │ +
64#ifdef __GTHREAD_MUTEX_INIT
│ │ │ +
65 __native_type _M_mutex = __GTHREAD_MUTEX_INIT;
│ │ │ +
66
│ │ │ +
67 constexpr __mutex_base() noexcept = default;
│ │ │ +
68#else
│ │ │ +
69 __native_type _M_mutex;
│ │ │ +
70
│ │ │ +
71 __mutex_base() noexcept
│ │ │ +
72 {
│ │ │ +
73 // XXX EAGAIN, ENOMEM, EPERM, EBUSY(may), EINVAL(may)
│ │ │ +
74 __GTHREAD_MUTEX_INIT_FUNCTION(&_M_mutex);
│ │ │ +
75 }
│ │ │ +
76
│ │ │ +
77 ~__mutex_base() noexcept { __gthread_mutex_destroy(&_M_mutex); }
│ │ │ +
78#endif
│ │ │ +
79
│ │ │ +
80 __mutex_base(const __mutex_base&) = delete;
│ │ │ +
81 __mutex_base& operator=(const __mutex_base&) = delete;
│ │ │ +
82 };
│ │ │ +
83 /// @endcond
│ │ │ +
84
│ │ │ +
85 /** The standard mutex type.
│ │ │ +
86 *
│ │ │ +
87 * A simple, non-recursive, non-timed mutex.
│ │ │ +
88 *
│ │ │ +
89 * Do not call `lock()` and `unlock()` directly, use a scoped lock type
│ │ │ +
90 * such as `std::unique_lock`, `std::lock_guard`, or (since C++17)
│ │ │ +
91 * `std::scoped_lock`.
│ │ │ +
92 *
│ │ │ +
93 * @headerfile mutex
│ │ │ +
94 * @since C++11
│ │ │ +
95 */
│ │ │ +
│ │ │ +
96 class mutex : private __mutex_base
│ │ │ +
97 {
│ │ │ +
98 public:
│ │ │ + │ │ │ +
100
│ │ │ +
101#ifdef __GTHREAD_MUTEX_INIT
│ │ │ +
102 constexpr
│ │ │ +
103#endif
│ │ │ +
104 mutex() noexcept = default;
│ │ │ +
105 ~mutex() = default;
│ │ │ +
106
│ │ │ +
107 mutex(const mutex&) = delete;
│ │ │ +
108 mutex& operator=(const mutex&) = delete;
│ │ │ +
109
│ │ │ +
110 void
│ │ │ +
111 lock()
│ │ │ +
112 {
│ │ │ +
113 int __e = __gthread_mutex_lock(&_M_mutex);
│ │ │ +
114
│ │ │ +
115 // EINVAL, EAGAIN, EBUSY, EINVAL, EDEADLK(may)
│ │ │ +
116 if (__e)
│ │ │ +
117 __throw_system_error(__e);
│ │ │ +
118 }
│ │ │ +
119
│ │ │ +
120 bool
│ │ │ +
121 try_lock() noexcept
│ │ │ +
122 {
│ │ │ +
123 // XXX EINVAL, EAGAIN, EBUSY
│ │ │ +
124 return !__gthread_mutex_trylock(&_M_mutex);
│ │ │ +
125 }
│ │ │ +
126
│ │ │ +
127 void
│ │ │ +
128 unlock()
│ │ │ +
129 {
│ │ │ +
130 // XXX EINVAL, EAGAIN, EPERM
│ │ │ +
131 __gthread_mutex_unlock(&_M_mutex);
│ │ │ +
132 }
│ │ │ +
133
│ │ │ + │ │ │ +
135 native_handle() noexcept
│ │ │ +
136 { return &_M_mutex; }
│ │ │ +
137 };
│ │ │ +
│ │ │ +
138
│ │ │ +
139 /// @cond undocumented
│ │ │ +
140
│ │ │ +
141 // Implementation details for std::condition_variable
│ │ │ +
142 class __condvar
│ │ │ +
143 {
│ │ │ +
144 using timespec = __gthread_time_t;
│ │ │ +
145
│ │ │ +
146 public:
│ │ │ +
147 __condvar() noexcept
│ │ │ +
148 {
│ │ │ +
149#ifndef __GTHREAD_COND_INIT
│ │ │ + │ │ │ +
151#endif
│ │ │ +
152 }
│ │ │ +
153
│ │ │ +
154 ~__condvar()
│ │ │ +
155 {
│ │ │ +
156 int __e __attribute__((__unused__)) = __gthread_cond_destroy(&_M_cond);
│ │ │ +
157 __glibcxx_assert(__e != EBUSY); // threads are still blocked
│ │ │ +
158 }
│ │ │ +
159
│ │ │ +
160 __condvar(const __condvar&) = delete;
│ │ │ +
161 __condvar& operator=(const __condvar&) = delete;
│ │ │ +
162
│ │ │ +
163 __gthread_cond_t* native_handle() noexcept { return &_M_cond; }
│ │ │ +
164
│ │ │ +
165 // Expects: Calling thread has locked __m.
│ │ │ +
166 void
│ │ │ +
167 wait(mutex& __m)
│ │ │ +
168 {
│ │ │ +
169 int __e __attribute__((__unused__))
│ │ │ +
170 = __gthread_cond_wait(&_M_cond, __m.native_handle());
│ │ │ +
171 __glibcxx_assert(__e == 0);
│ │ │ +
172 }
│ │ │ +
173
│ │ │ +
174 void
│ │ │ +
175 wait_until(mutex& __m, timespec& __abs_time)
│ │ │ +
176 {
│ │ │ +
177 __gthread_cond_timedwait(&_M_cond, __m.native_handle(), &__abs_time);
│ │ │ +
178 }
│ │ │ +
179
│ │ │ +
180#ifdef _GLIBCXX_USE_PTHREAD_COND_CLOCKWAIT
│ │ │ +
181 void
│ │ │ +
182 wait_until(mutex& __m, clockid_t __clock, timespec& __abs_time)
│ │ │ +
183 {
│ │ │ +
184 pthread_cond_clockwait(&_M_cond, __m.native_handle(), __clock,
│ │ │ +
185 &__abs_time);
│ │ │ +
186 }
│ │ │ +
187#endif
│ │ │ +
188
│ │ │ +
189 void
│ │ │ +
190 notify_one() noexcept
│ │ │ +
191 {
│ │ │ +
192 int __e __attribute__((__unused__)) = __gthread_cond_signal(&_M_cond);
│ │ │ +
193 __glibcxx_assert(__e == 0);
│ │ │ +
194 }
│ │ │ +
195
│ │ │ +
196 void
│ │ │ +
197 notify_all() noexcept
│ │ │ +
198 {
│ │ │ +
199 int __e __attribute__((__unused__)) = __gthread_cond_broadcast(&_M_cond);
│ │ │ +
200 __glibcxx_assert(__e == 0);
│ │ │ +
201 }
│ │ │ +
202
│ │ │ +
203 protected:
│ │ │ +
204#ifdef __GTHREAD_COND_INIT
│ │ │ +
205 __gthread_cond_t _M_cond = __GTHREAD_COND_INIT;
│ │ │ +
206#else
│ │ │ +
207 __gthread_cond_t _M_cond;
│ │ │ +
208#endif
│ │ │ +
209 };
│ │ │ +
210 /// @endcond
│ │ │ +
211
│ │ │ +
212#endif // _GLIBCXX_HAS_GTHREADS
│ │ │ +
213
│ │ │ +
214 /// Do not acquire ownership of the mutex.
│ │ │ +
215 struct defer_lock_t { explicit defer_lock_t() = default; };
│ │ │ +
216
│ │ │ +
217 /// Try to acquire ownership of the mutex without blocking.
│ │ │ +
218 struct try_to_lock_t { explicit try_to_lock_t() = default; };
│ │ │ +
219
│ │ │ +
220 /// Assume the calling thread has already obtained mutex ownership
│ │ │ +
221 /// and manage it.
│ │ │ +
222 struct adopt_lock_t { explicit adopt_lock_t() = default; };
│ │ │ +
223
│ │ │ +
224 /// Tag used to prevent a scoped lock from acquiring ownership of a mutex.
│ │ │ + │ │ │ +
226
│ │ │ +
227 /// Tag used to prevent a scoped lock from blocking if a mutex is locked.
│ │ │ + │ │ │ +
229
│ │ │ +
230 /// Tag used to make a scoped lock take ownership of a locked mutex.
│ │ │ + │ │ │ +
232
│ │ │ +
233 /** @brief A simple scoped lock type.
│ │ │ +
234 *
│ │ │ +
235 * A lock_guard controls mutex ownership within a scope, releasing
│ │ │ +
236 * ownership in the destructor.
│ │ │ +
237 *
│ │ │ +
238 * @headerfile mutex
│ │ │ +
239 * @since C++11
│ │ │ +
240 */
│ │ │ +
241 template<typename _Mutex>
│ │ │ +
│ │ │ + │ │ │ +
243 {
│ │ │ +
244 public:
│ │ │ +
245 typedef _Mutex mutex_type;
│ │ │ +
246
│ │ │ +
247 explicit lock_guard(mutex_type& __m) : _M_device(__m)
│ │ │ +
248 { _M_device.lock(); }
│ │ │ +
249
│ │ │ +
250 lock_guard(mutex_type& __m, adopt_lock_t) noexcept : _M_device(__m)
│ │ │ +
251 { } // calling thread owns mutex
│ │ │
252
│ │ │ -
253 template<typename _InputIterator>
│ │ │ -
254 unordered_map(_InputIterator __first, _InputIterator __last,
│ │ │ -
255 size_type __n, const hasher& __hf,
│ │ │ -
256 const allocator_type& __a)
│ │ │ -
257 : unordered_map(__first, __last, __n, __hf, key_equal(), __a)
│ │ │ -
258 { }
│ │ │ -
259
│ │ │ -
260 unordered_map(initializer_list<value_type> __l,
│ │ │ -
261 size_type __n,
│ │ │ -
262 const allocator_type& __a)
│ │ │ -
263 : unordered_map(__l, __n, hasher(), key_equal(), __a)
│ │ │ -
264 { }
│ │ │ -
265
│ │ │ -
266 unordered_map(initializer_list<value_type> __l,
│ │ │ -
267 size_type __n, const hasher& __hf,
│ │ │ -
268 const allocator_type& __a)
│ │ │ -
269 : unordered_map(__l, __n, __hf, key_equal(), __a)
│ │ │ -
270 { }
│ │ │ -
271
│ │ │ -
272 /// Copy assignment operator.
│ │ │ - │ │ │ -
274 operator=(const unordered_map&) = default;
│ │ │ -
275
│ │ │ -
276 /// Move assignment operator.
│ │ │ - │ │ │ - │ │ │ -
279
│ │ │ -
280 /**
│ │ │ -
281 * @brief %Unordered_map list assignment operator.
│ │ │ -
282 * @param __l An initializer_list.
│ │ │ -
283 *
│ │ │ -
284 * This function fills an %unordered_map with copies of the elements in
│ │ │ -
285 * the initializer list @a __l.
│ │ │ -
286 *
│ │ │ -
287 * Note that the assignment completely changes the %unordered_map and
│ │ │ -
288 * that the resulting %unordered_map's size is the same as the number
│ │ │ -
289 * of elements assigned.
│ │ │ -
290 */
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
293 {
│ │ │ -
294 _M_h = __l;
│ │ │ -
295 return *this;
│ │ │ -
296 }
│ │ │ -
│ │ │ -
297
│ │ │ -
298 /// Returns the allocator object used by the %unordered_map.
│ │ │ - │ │ │ -
│ │ │ -
300 get_allocator() const noexcept
│ │ │ -
301 { return _M_h.get_allocator(); }
│ │ │ -
│ │ │ -
302
│ │ │ -
303 // size and capacity:
│ │ │ -
304
│ │ │ -
305 /// Returns true if the %unordered_map is empty.
│ │ │ -
306 _GLIBCXX_NODISCARD bool
│ │ │ -
│ │ │ -
307 empty() const noexcept
│ │ │ -
308 { return _M_h.empty(); }
│ │ │ -
│ │ │ -
309
│ │ │ -
310 /// Returns the size of the %unordered_map.
│ │ │ - │ │ │ -
│ │ │ -
312 size() const noexcept
│ │ │ -
313 { return _M_h.size(); }
│ │ │ -
│ │ │ -
314
│ │ │ -
315 /// Returns the maximum size of the %unordered_map.
│ │ │ - │ │ │ -
│ │ │ -
317 max_size() const noexcept
│ │ │ -
318 { return _M_h.max_size(); }
│ │ │ -
│ │ │ -
319
│ │ │ -
320 // iterators.
│ │ │ -
321
│ │ │ -
322 /**
│ │ │ -
323 * Returns a read/write iterator that points to the first element in the
│ │ │ -
324 * %unordered_map.
│ │ │ -
325 */
│ │ │ - │ │ │ -
│ │ │ -
327 begin() noexcept
│ │ │ -
328 { return _M_h.begin(); }
│ │ │ -
│ │ │ -
329
│ │ │ -
330 ///@{
│ │ │ -
331 /**
│ │ │ -
332 * Returns a read-only (constant) iterator that points to the first
│ │ │ -
333 * element in the %unordered_map.
│ │ │ -
334 */
│ │ │ - │ │ │ -
│ │ │ -
336 begin() const noexcept
│ │ │ -
337 { return _M_h.begin(); }
│ │ │ -
│ │ │ -
338
│ │ │ - │ │ │ -
│ │ │ -
340 cbegin() const noexcept
│ │ │ -
341 { return _M_h.begin(); }
│ │ │ -
│ │ │ -
342 ///@}
│ │ │ -
343
│ │ │ -
344 /**
│ │ │ -
345 * Returns a read/write iterator that points one past the last element in
│ │ │ -
346 * the %unordered_map.
│ │ │ -
347 */
│ │ │ - │ │ │ -
│ │ │ -
349 end() noexcept
│ │ │ -
350 { return _M_h.end(); }
│ │ │ -
│ │ │ -
351
│ │ │ -
352 ///@{
│ │ │ -
353 /**
│ │ │ -
354 * Returns a read-only (constant) iterator that points one past the last
│ │ │ -
355 * element in the %unordered_map.
│ │ │ -
356 */
│ │ │ - │ │ │ -
│ │ │ -
358 end() const noexcept
│ │ │ -
359 { return _M_h.end(); }
│ │ │ -
│ │ │ -
360
│ │ │ - │ │ │ -
│ │ │ -
362 cend() const noexcept
│ │ │ -
363 { return _M_h.end(); }
│ │ │ -
│ │ │ -
364 ///@}
│ │ │ -
365
│ │ │ -
366 // modifiers.
│ │ │ -
367
│ │ │ -
368 /**
│ │ │ -
369 * @brief Attempts to build and insert a std::pair into the
│ │ │ -
370 * %unordered_map.
│ │ │ -
371 *
│ │ │ -
372 * @param __args Arguments used to generate a new pair instance (see
│ │ │ -
373 * std::piecewise_contruct for passing arguments to each
│ │ │ -
374 * part of the pair constructor).
│ │ │ -
375 *
│ │ │ -
376 * @return A pair, of which the first element is an iterator that points
│ │ │ -
377 * to the possibly inserted pair, and the second is a bool that
│ │ │ -
378 * is true if the pair was actually inserted.
│ │ │ -
379 *
│ │ │ -
380 * This function attempts to build and insert a (key, value) %pair into
│ │ │ -
381 * the %unordered_map.
│ │ │ -
382 * An %unordered_map relies on unique keys and thus a %pair is only
│ │ │ -
383 * inserted if its first element (the key) is not already present in the
│ │ │ -
384 * %unordered_map.
│ │ │ -
385 *
│ │ │ -
386 * Insertion requires amortized constant time.
│ │ │ -
387 */
│ │ │ -
388 template<typename... _Args>
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
391 { return _M_h.emplace(std::forward<_Args>(__args)...); }
│ │ │ -
│ │ │ -
392
│ │ │ -
393 /**
│ │ │ -
394 * @brief Attempts to build and insert a std::pair into the
│ │ │ -
395 * %unordered_map.
│ │ │ -
396 *
│ │ │ -
397 * @param __pos An iterator that serves as a hint as to where the pair
│ │ │ -
398 * should be inserted.
│ │ │ -
399 * @param __args Arguments used to generate a new pair instance (see
│ │ │ -
400 * std::piecewise_contruct for passing arguments to each
│ │ │ -
401 * part of the pair constructor).
│ │ │ -
402 * @return An iterator that points to the element with key of the
│ │ │ -
403 * std::pair built from @a __args (may or may not be that
│ │ │ -
404 * std::pair).
│ │ │ -
405 *
│ │ │ -
406 * This function is not concerned about whether the insertion took place,
│ │ │ -
407 * and thus does not return a boolean like the single-argument emplace()
│ │ │ -
408 * does.
│ │ │ -
409 * Note that the first parameter is only a hint and can potentially
│ │ │ -
410 * improve the performance of the insertion process. A bad hint would
│ │ │ -
411 * cause no gains in efficiency.
│ │ │ -
412 *
│ │ │ -
413 * See
│ │ │ -
414 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/associative.html#containers.associative.insert_hints
│ │ │ -
415 * for more on @a hinting.
│ │ │ -
416 *
│ │ │ -
417 * Insertion requires amortized constant time.
│ │ │ -
418 */
│ │ │ -
419 template<typename... _Args>
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
422 { return _M_h.emplace_hint(__pos, std::forward<_Args>(__args)...); }
│ │ │ -
│ │ │ -
423
│ │ │ -
424#if __cplusplus > 201402L
│ │ │ -
425 /// Extract a node.
│ │ │ -
426 node_type
│ │ │ -
│ │ │ - │ │ │ -
428 {
│ │ │ -
429 __glibcxx_assert(__pos != end());
│ │ │ -
430 return _M_h.extract(__pos);
│ │ │ -
431 }
│ │ │ -
│ │ │ -
432
│ │ │ -
433 /// Extract a node.
│ │ │ -
434 node_type
│ │ │ -
│ │ │ - │ │ │ -
436 { return _M_h.extract(__key); }
│ │ │ -
│ │ │ -
437
│ │ │ -
438 /// Re-insert an extracted node.
│ │ │ -
439 insert_return_type
│ │ │ -
│ │ │ -
440 insert(node_type&& __nh)
│ │ │ -
441 { return _M_h._M_reinsert_node(std::move(__nh)); }
│ │ │ -
│ │ │ -
442
│ │ │ -
443 /// Re-insert an extracted node.
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
446 { return _M_h._M_reinsert_node(std::move(__nh)).position; }
│ │ │ -
│ │ │ -
447
│ │ │ -
448#define __cpp_lib_unordered_map_try_emplace 201411L
│ │ │ -
449 /**
│ │ │ -
450 * @brief Attempts to build and insert a std::pair into the
│ │ │ -
451 * %unordered_map.
│ │ │ -
452 *
│ │ │ -
453 * @param __k Key to use for finding a possibly existing pair in
│ │ │ -
454 * the unordered_map.
│ │ │ -
455 * @param __args Arguments used to generate the .second for a
│ │ │ -
456 * new pair instance.
│ │ │ -
457 *
│ │ │ -
458 * @return A pair, of which the first element is an iterator that points
│ │ │ -
459 * to the possibly inserted pair, and the second is a bool that
│ │ │ -
460 * is true if the pair was actually inserted.
│ │ │ -
461 *
│ │ │ -
462 * This function attempts to build and insert a (key, value) %pair into
│ │ │ -
463 * the %unordered_map.
│ │ │ -
464 * An %unordered_map relies on unique keys and thus a %pair is only
│ │ │ -
465 * inserted if its first element (the key) is not already present in the
│ │ │ -
466 * %unordered_map.
│ │ │ -
467 * If a %pair is not inserted, this function has no effect.
│ │ │ -
468 *
│ │ │ -
469 * Insertion requires amortized constant time.
│ │ │ -
470 */
│ │ │ -
471 template <typename... _Args>
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
474 {
│ │ │ -
475 return _M_h.try_emplace(cend(), __k, std::forward<_Args>(__args)...);
│ │ │ -
476 }
│ │ │ -
│ │ │ -
477
│ │ │ -
478 // move-capable overload
│ │ │ -
479 template <typename... _Args>
│ │ │ - │ │ │ - │ │ │ -
482 {
│ │ │ -
483 return _M_h.try_emplace(cend(), std::move(__k),
│ │ │ - │ │ │ -
485 }
│ │ │ -
486
│ │ │ -
487 /**
│ │ │ -
488 * @brief Attempts to build and insert a std::pair into the
│ │ │ -
489 * %unordered_map.
│ │ │ -
490 *
│ │ │ -
491 * @param __hint An iterator that serves as a hint as to where the pair
│ │ │ -
492 * should be inserted.
│ │ │ -
493 * @param __k Key to use for finding a possibly existing pair in
│ │ │ -
494 * the unordered_map.
│ │ │ -
495 * @param __args Arguments used to generate the .second for a
│ │ │ -
496 * new pair instance.
│ │ │ -
497 * @return An iterator that points to the element with key of the
│ │ │ -
498 * std::pair built from @a __args (may or may not be that
│ │ │ -
499 * std::pair).
│ │ │ -
500 *
│ │ │ -
501 * This function is not concerned about whether the insertion took place,
│ │ │ -
502 * and thus does not return a boolean like the single-argument emplace()
│ │ │ -
503 * does. However, if insertion did not take place,
│ │ │ -
504 * this function has no effect.
│ │ │ -
505 * Note that the first parameter is only a hint and can potentially
│ │ │ -
506 * improve the performance of the insertion process. A bad hint would
│ │ │ -
507 * cause no gains in efficiency.
│ │ │ -
508 *
│ │ │ -
509 * See
│ │ │ -
510 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/associative.html#containers.associative.insert_hints
│ │ │ -
511 * for more on @a hinting.
│ │ │ -
512 *
│ │ │ -
513 * Insertion requires amortized constant time.
│ │ │ -
514 */
│ │ │ -
515 template <typename... _Args>
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
518 _Args&&... __args)
│ │ │ -
519 {
│ │ │ -
520 return _M_h.try_emplace(__hint, __k,
│ │ │ -
521 std::forward<_Args>(__args)...).first;
│ │ │ -
522 }
│ │ │ -
│ │ │ -
523
│ │ │ -
524 // move-capable overload
│ │ │ -
525 template <typename... _Args>
│ │ │ - │ │ │ - │ │ │ -
528 {
│ │ │ -
529 return _M_h.try_emplace(__hint, std::move(__k),
│ │ │ -
530 std::forward<_Args>(__args)...).first;
│ │ │ -
531 }
│ │ │ -
532#endif // C++17
│ │ │ -
533
│ │ │ -
534 ///@{
│ │ │ -
535 /**
│ │ │ -
536 * @brief Attempts to insert a std::pair into the %unordered_map.
│ │ │ -
537
│ │ │ -
538 * @param __x Pair to be inserted (see std::make_pair for easy
│ │ │ -
539 * creation of pairs).
│ │ │ -
540 *
│ │ │ -
541 * @return A pair, of which the first element is an iterator that
│ │ │ -
542 * points to the possibly inserted pair, and the second is
│ │ │ -
543 * a bool that is true if the pair was actually inserted.
│ │ │ -
544 *
│ │ │ -
545 * This function attempts to insert a (key, value) %pair into the
│ │ │ -
546 * %unordered_map. An %unordered_map relies on unique keys and thus a
│ │ │ -
547 * %pair is only inserted if its first element (the key) is not already
│ │ │ -
548 * present in the %unordered_map.
│ │ │ -
549 *
│ │ │ -
550 * Insertion requires amortized constant time.
│ │ │ -
551 */
│ │ │ - │ │ │ -
│ │ │ -
553 insert(const value_type& __x)
│ │ │ -
554 { return _M_h.insert(__x); }
│ │ │ -
│ │ │ -
555
│ │ │ -
556 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ -
557 // 2354. Unnecessary copying when inserting into maps with braced-init
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
560 { return _M_h.insert(std::move(__x)); }
│ │ │ -
│ │ │ -
561
│ │ │ -
562 template<typename _Pair>
│ │ │ - │ │ │ - │ │ │ -
│ │ │ - │ │ │ -
566 { return _M_h.emplace(std::forward<_Pair>(__x)); }
│ │ │ -
│ │ │ -
567 ///@}
│ │ │ -
568
│ │ │ -
569 ///@{
│ │ │ -
570 /**
│ │ │ -
571 * @brief Attempts to insert a std::pair into the %unordered_map.
│ │ │ -
572 * @param __hint An iterator that serves as a hint as to where the
│ │ │ -
573 * pair should be inserted.
│ │ │ -
574 * @param __x Pair to be inserted (see std::make_pair for easy creation
│ │ │ -
575 * of pairs).
│ │ │ -
576 * @return An iterator that points to the element with key of
│ │ │ -
577 * @a __x (may or may not be the %pair passed in).
│ │ │ -
578 *
│ │ │ -
579 * This function is not concerned about whether the insertion took place,
│ │ │ -
580 * and thus does not return a boolean like the single-argument insert()
│ │ │ -
581 * does. Note that the first parameter is only a hint and can
│ │ │ -
582 * potentially improve the performance of the insertion process. A bad
│ │ │ -
583 * hint would cause no gains in efficiency.
│ │ │ -
584 *
│ │ │ -
585 * See
│ │ │ -
586 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/associative.html#containers.associative.insert_hints
│ │ │ -
587 * for more on @a hinting.
│ │ │ -
588 *
│ │ │ -
589 * Insertion requires amortized constant time.
│ │ │ -
590 */
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
593 { return _M_h.insert(__hint, __x); }
│ │ │ -
│ │ │ -
594
│ │ │ -
595 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ -
596 // 2354. Unnecessary copying when inserting into maps with braced-init
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
599 { return _M_h.insert(__hint, std::move(__x)); }
│ │ │ -
│ │ │ -
600
│ │ │ -
601 template<typename _Pair>
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
604 { return _M_h.emplace_hint(__hint, std::forward<_Pair>(__x)); }
│ │ │ -
│ │ │ -
605 ///@}
│ │ │ -
606
│ │ │ -
607 /**
│ │ │ -
608 * @brief A template function that attempts to insert a range of
│ │ │ -
609 * elements.
│ │ │ -
610 * @param __first Iterator pointing to the start of the range to be
│ │ │ -
611 * inserted.
│ │ │ -
612 * @param __last Iterator pointing to the end of the range.
│ │ │ -
613 *
│ │ │ -
614 * Complexity similar to that of the range constructor.
│ │ │ -
615 */
│ │ │ -
616 template<typename _InputIterator>
│ │ │ -
617 void
│ │ │ -
│ │ │ - │ │ │ -
619 { _M_h.insert(__first, __last); }
│ │ │ -
│ │ │ -
620
│ │ │ -
621 /**
│ │ │ -
622 * @brief Attempts to insert a list of elements into the %unordered_map.
│ │ │ -
623 * @param __l A std::initializer_list<value_type> of elements
│ │ │ -
624 * to be inserted.
│ │ │ -
625 *
│ │ │ -
626 * Complexity similar to that of the range constructor.
│ │ │ -
627 */
│ │ │ -
628 void
│ │ │ -
│ │ │ - │ │ │ -
630 { _M_h.insert(__l); }
│ │ │ -
│ │ │ -
631
│ │ │ -
632
│ │ │ -
633#if __cplusplus > 201402L
│ │ │ -
634 /**
│ │ │ -
635 * @brief Attempts to insert a std::pair into the %unordered_map.
│ │ │ -
636 * @param __k Key to use for finding a possibly existing pair in
│ │ │ -
637 * the map.
│ │ │ -
638 * @param __obj Argument used to generate the .second for a pair
│ │ │ -
639 * instance.
│ │ │ -
640 *
│ │ │ -
641 * @return A pair, of which the first element is an iterator that
│ │ │ -
642 * points to the possibly inserted pair, and the second is
│ │ │ -
643 * a bool that is true if the pair was actually inserted.
│ │ │ -
644 *
│ │ │ -
645 * This function attempts to insert a (key, value) %pair into the
│ │ │ -
646 * %unordered_map. An %unordered_map relies on unique keys and thus a
│ │ │ -
647 * %pair is only inserted if its first element (the key) is not already
│ │ │ -
648 * present in the %unordered_map.
│ │ │ -
649 * If the %pair was already in the %unordered_map, the .second of
│ │ │ -
650 * the %pair is assigned from __obj.
│ │ │ -
651 *
│ │ │ -
652 * Insertion requires amortized constant time.
│ │ │ -
653 */
│ │ │ -
654 template <typename _Obj>
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
657 {
│ │ │ -
658 auto __ret = _M_h.try_emplace(cend(), __k,
│ │ │ - │ │ │ -
660 if (!__ret.second)
│ │ │ -
661 __ret.first->second = std::forward<_Obj>(__obj);
│ │ │ -
662 return __ret;
│ │ │ -
663 }
│ │ │ -
│ │ │ -
664
│ │ │ -
665 // move-capable overload
│ │ │ -
666 template <typename _Obj>
│ │ │ - │ │ │ - │ │ │ -
669 {
│ │ │ -
670 auto __ret = _M_h.try_emplace(cend(), std::move(__k),
│ │ │ - │ │ │ -
672 if (!__ret.second)
│ │ │ -
673 __ret.first->second = std::forward<_Obj>(__obj);
│ │ │ -
674 return __ret;
│ │ │ -
675 }
│ │ │ -
676
│ │ │ -
677 /**
│ │ │ -
678 * @brief Attempts to insert a std::pair into the %unordered_map.
│ │ │ -
679 * @param __hint An iterator that serves as a hint as to where the
│ │ │ -
680 * pair should be inserted.
│ │ │ -
681 * @param __k Key to use for finding a possibly existing pair in
│ │ │ -
682 * the unordered_map.
│ │ │ -
683 * @param __obj Argument used to generate the .second for a pair
│ │ │ -
684 * instance.
│ │ │ -
685 * @return An iterator that points to the element with key of
│ │ │ -
686 * @a __x (may or may not be the %pair passed in).
│ │ │ -
687 *
│ │ │ -
688 * This function is not concerned about whether the insertion took place,
│ │ │ -
689 * and thus does not return a boolean like the single-argument insert()
│ │ │ -
690 * does.
│ │ │ -
691 * If the %pair was already in the %unordered map, the .second of
│ │ │ -
692 * the %pair is assigned from __obj.
│ │ │ -
693 * Note that the first parameter is only a hint and can
│ │ │ -
694 * potentially improve the performance of the insertion process. A bad
│ │ │ -
695 * hint would cause no gains in efficiency.
│ │ │ -
696 *
│ │ │ -
697 * See
│ │ │ -
698 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/associative.html#containers.associative.insert_hints
│ │ │ -
699 * for more on @a hinting.
│ │ │ -
700 *
│ │ │ -
701 * Insertion requires amortized constant time.
│ │ │ -
702 */
│ │ │ -
703 template <typename _Obj>
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
706 _Obj&& __obj)
│ │ │ -
707 {
│ │ │ -
708 auto __ret = _M_h.try_emplace(__hint, __k, std::forward<_Obj>(__obj));
│ │ │ -
709 if (!__ret.second)
│ │ │ -
710 __ret.first->second = std::forward<_Obj>(__obj);
│ │ │ -
711 return __ret.first;
│ │ │ -
712 }
│ │ │ -
│ │ │ -
713
│ │ │ -
714 // move-capable overload
│ │ │ -
715 template <typename _Obj>
│ │ │ - │ │ │ - │ │ │ -
718 {
│ │ │ -
719 auto __ret = _M_h.try_emplace(__hint, std::move(__k),
│ │ │ - │ │ │ -
721 if (!__ret.second)
│ │ │ -
722 __ret.first->second = std::forward<_Obj>(__obj);
│ │ │ -
723 return __ret.first;
│ │ │ -
724 }
│ │ │ -
725#endif
│ │ │ -
726
│ │ │ -
727 ///@{
│ │ │ -
728 /**
│ │ │ -
729 * @brief Erases an element from an %unordered_map.
│ │ │ -
730 * @param __position An iterator pointing to the element to be erased.
│ │ │ -
731 * @return An iterator pointing to the element immediately following
│ │ │ -
732 * @a __position prior to the element being erased. If no such
│ │ │ -
733 * element exists, end() is returned.
│ │ │ -
734 *
│ │ │ -
735 * This function erases an element, pointed to by the given iterator,
│ │ │ -
736 * from an %unordered_map.
│ │ │ -
737 * Note that this function only erases the element, and that if the
│ │ │ -
738 * element is itself a pointer, the pointed-to memory is not touched in
│ │ │ -
739 * any way. Managing the pointer is the user's responsibility.
│ │ │ -
740 */
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
743 { return _M_h.erase(__position); }
│ │ │ -
│ │ │ -
744
│ │ │ -
745 // LWG 2059.
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
748 { return _M_h.erase(__position); }
│ │ │ -
│ │ │ -
749 ///@}
│ │ │ -
750
│ │ │ -
751 /**
│ │ │ -
752 * @brief Erases elements according to the provided key.
│ │ │ -
753 * @param __x Key of element to be erased.
│ │ │ -
754 * @return The number of elements erased.
│ │ │ -
755 *
│ │ │ -
756 * This function erases all the elements located by the given key from
│ │ │ -
757 * an %unordered_map. For an %unordered_map the result of this function
│ │ │ -
758 * can only be 0 (not present) or 1 (present).
│ │ │ -
759 * Note that this function only erases the element, and that if the
│ │ │ -
760 * element is itself a pointer, the pointed-to memory is not touched in
│ │ │ -
761 * any way. Managing the pointer is the user's responsibility.
│ │ │ -
762 */
│ │ │ - │ │ │ -
│ │ │ -
764 erase(const key_type& __x)
│ │ │ -
765 { return _M_h.erase(__x); }
│ │ │ -
│ │ │ -
766
│ │ │ -
767 /**
│ │ │ -
768 * @brief Erases a [__first,__last) range of elements from an
│ │ │ -
769 * %unordered_map.
│ │ │ -
770 * @param __first Iterator pointing to the start of the range to be
│ │ │ -
771 * erased.
│ │ │ -
772 * @param __last Iterator pointing to the end of the range to
│ │ │ -
773 * be erased.
│ │ │ -
774 * @return The iterator @a __last.
│ │ │ -
775 *
│ │ │ -
776 * This function erases a sequence of elements from an %unordered_map.
│ │ │ -
777 * Note that this function only erases the elements, and that if
│ │ │ -
778 * the element is itself a pointer, the pointed-to memory is not touched
│ │ │ -
779 * in any way. Managing the pointer is the user's responsibility.
│ │ │ -
780 */
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
783 { return _M_h.erase(__first, __last); }
│ │ │ -
│ │ │ -
784
│ │ │ -
785 /**
│ │ │ -
786 * Erases all elements in an %unordered_map.
│ │ │ -
787 * Note that this function only erases the elements, and that if the
│ │ │ -
788 * elements themselves are pointers, the pointed-to memory is not touched
│ │ │ -
789 * in any way. Managing the pointer is the user's responsibility.
│ │ │ -
790 */
│ │ │ -
791 void
│ │ │ -
│ │ │ -
792 clear() noexcept
│ │ │ -
793 { _M_h.clear(); }
│ │ │ -
│ │ │ -
794
│ │ │ -
795 /**
│ │ │ -
796 * @brief Swaps data with another %unordered_map.
│ │ │ -
797 * @param __x An %unordered_map of the same element and allocator
│ │ │ -
798 * types.
│ │ │ -
799 *
│ │ │ -
800 * This exchanges the elements between two %unordered_map in constant
│ │ │ -
801 * time.
│ │ │ -
802 * Note that the global std::swap() function is specialized such that
│ │ │ -
803 * std::swap(m1,m2) will feed to this function.
│ │ │ -
804 */
│ │ │ -
805 void
│ │ │ -
│ │ │ - │ │ │ -
807 noexcept( noexcept(_M_h.swap(__x._M_h)) )
│ │ │ -
808 { _M_h.swap(__x._M_h); }
│ │ │ -
│ │ │ -
809
│ │ │ -
810#if __cplusplus > 201402L
│ │ │ -
811 template<typename, typename, typename>
│ │ │ -
812 friend class std::_Hash_merge_helper;
│ │ │ -
813
│ │ │ -
814 template<typename _H2, typename _P2>
│ │ │ -
815 void
│ │ │ - │ │ │ -
817 {
│ │ │ - │ │ │ -
819 _M_h._M_merge_unique(_Merge_helper::_S_get_table(__source));
│ │ │ -
820 }
│ │ │ -
821
│ │ │ -
822 template<typename _H2, typename _P2>
│ │ │ -
823 void
│ │ │ -
824 merge(unordered_map<_Key, _Tp, _H2, _P2, _Alloc>&& __source)
│ │ │ -
825 { merge(__source); }
│ │ │ -
826
│ │ │ -
827 template<typename _H2, typename _P2>
│ │ │ -
828 void
│ │ │ -
829 merge(unordered_multimap<_Key, _Tp, _H2, _P2, _Alloc>& __source)
│ │ │ -
830 {
│ │ │ -
831 using _Merge_helper = _Hash_merge_helper<unordered_map, _H2, _P2>;
│ │ │ -
832 _M_h._M_merge_unique(_Merge_helper::_S_get_table(__source));
│ │ │ -
833 }
│ │ │ -
834
│ │ │ -
835 template<typename _H2, typename _P2>
│ │ │ -
836 void
│ │ │ -
837 merge(unordered_multimap<_Key, _Tp, _H2, _P2, _Alloc>&& __source)
│ │ │ -
838 { merge(__source); }
│ │ │ -
839#endif // C++17
│ │ │ -
840
│ │ │ -
841 // observers.
│ │ │ -
842
│ │ │ -
843 /// Returns the hash functor object with which the %unordered_map was
│ │ │ -
844 /// constructed.
│ │ │ -
845 hasher
│ │ │ -
│ │ │ - │ │ │ -
847 { return _M_h.hash_function(); }
│ │ │ -
│ │ │ -
848
│ │ │ -
849 /// Returns the key comparison object with which the %unordered_map was
│ │ │ -
850 /// constructed.
│ │ │ - │ │ │ -
│ │ │ -
852 key_eq() const
│ │ │ -
853 { return _M_h.key_eq(); }
│ │ │ -
│ │ │ -
854
│ │ │ -
855 // lookup.
│ │ │ -
856
│ │ │ -
857 ///@{
│ │ │ -
858 /**
│ │ │ -
859 * @brief Tries to locate an element in an %unordered_map.
│ │ │ -
860 * @param __x Key to be located.
│ │ │ -
861 * @return Iterator pointing to sought-after element, or end() if not
│ │ │ -
862 * found.
│ │ │ -
863 *
│ │ │ -
864 * This function takes a key and tries to locate the element with which
│ │ │ -
865 * the key matches. If successful the function returns an iterator
│ │ │ -
866 * pointing to the sought after element. If unsuccessful it returns the
│ │ │ -
867 * past-the-end ( @c end() ) iterator.
│ │ │ -
868 */
│ │ │ - │ │ │ -
│ │ │ -
870 find(const key_type& __x)
│ │ │ -
871 { return _M_h.find(__x); }
│ │ │ -
│ │ │ -
872
│ │ │ -
873#if __cplusplus > 201703L
│ │ │ -
874 template<typename _Kt>
│ │ │ -
875 auto
│ │ │ -
│ │ │ -
876 find(const _Kt& __x) -> decltype(_M_h._M_find_tr(__x))
│ │ │ -
877 { return _M_h._M_find_tr(__x); }
│ │ │ -
│ │ │ -
878#endif
│ │ │ -
879
│ │ │ - │ │ │ -
│ │ │ -
881 find(const key_type& __x) const
│ │ │ -
882 { return _M_h.find(__x); }
│ │ │ -
│ │ │ -
883
│ │ │ -
884#if __cplusplus > 201703L
│ │ │ -
885 template<typename _Kt>
│ │ │ -
886 auto
│ │ │ -
│ │ │ -
887 find(const _Kt& __x) const -> decltype(_M_h._M_find_tr(__x))
│ │ │ -
888 { return _M_h._M_find_tr(__x); }
│ │ │ -
│ │ │ -
889#endif
│ │ │ -
890 ///@}
│ │ │ -
891
│ │ │ -
892 ///@{
│ │ │ -
893 /**
│ │ │ -
894 * @brief Finds the number of elements.
│ │ │ -
895 * @param __x Key to count.
│ │ │ -
896 * @return Number of elements with specified key.
│ │ │ -
897 *
│ │ │ -
898 * This function only makes sense for %unordered_multimap; for
│ │ │ -
899 * %unordered_map the result will either be 0 (not present) or 1
│ │ │ -
900 * (present).
│ │ │ -
901 */
│ │ │ - │ │ │ -
│ │ │ -
903 count(const key_type& __x) const
│ │ │ -
904 { return _M_h.count(__x); }
│ │ │ -
│ │ │ -
905
│ │ │ -
906#if __cplusplus > 201703L
│ │ │ -
907 template<typename _Kt>
│ │ │ -
908 auto
│ │ │ -
│ │ │ -
909 count(const _Kt& __x) const -> decltype(_M_h._M_count_tr(__x))
│ │ │ -
910 { return _M_h._M_count_tr(__x); }
│ │ │ -
│ │ │ -
911#endif
│ │ │ -
912 ///@}
│ │ │ -
913
│ │ │ -
914#if __cplusplus > 201703L
│ │ │ -
915 ///@{
│ │ │ -
916 /**
│ │ │ -
917 * @brief Finds whether an element with the given key exists.
│ │ │ -
918 * @param __x Key of elements to be located.
│ │ │ -
919 * @return True if there is any element with the specified key.
│ │ │ -
920 */
│ │ │ -
921 bool
│ │ │ -
│ │ │ -
922 contains(const key_type& __x) const
│ │ │ -
923 { return _M_h.find(__x) != _M_h.end(); }
│ │ │ -
│ │ │ -
924
│ │ │ -
925 template<typename _Kt>
│ │ │ -
926 auto
│ │ │ -
│ │ │ -
927 contains(const _Kt& __x) const
│ │ │ -
928 -> decltype(_M_h._M_find_tr(__x), void(), true)
│ │ │ -
929 { return _M_h._M_find_tr(__x) != _M_h.end(); }
│ │ │ -
│ │ │ -
930 ///@}
│ │ │ -
931#endif
│ │ │ -
932
│ │ │ -
933 ///@{
│ │ │ -
934 /**
│ │ │ -
935 * @brief Finds a subsequence matching given key.
│ │ │ -
936 * @param __x Key to be located.
│ │ │ -
937 * @return Pair of iterators that possibly points to the subsequence
│ │ │ -
938 * matching given key.
│ │ │ -
939 *
│ │ │ -
940 * This function probably only makes sense for %unordered_multimap.
│ │ │ -
941 */
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
944 { return _M_h.equal_range(__x); }
│ │ │ -
│ │ │ -
945
│ │ │ -
946#if __cplusplus > 201703L
│ │ │ -
947 template<typename _Kt>
│ │ │ -
948 auto
│ │ │ -
│ │ │ -
949 equal_range(const _Kt& __x)
│ │ │ -
950 -> decltype(_M_h._M_equal_range_tr(__x))
│ │ │ -
951 { return _M_h._M_equal_range_tr(__x); }
│ │ │ -
│ │ │ -
952#endif
│ │ │ -
953
│ │ │ - │ │ │ -
│ │ │ -
955 equal_range(const key_type& __x) const
│ │ │ -
956 { return _M_h.equal_range(__x); }
│ │ │ -
│ │ │ -
957
│ │ │ -
958#if __cplusplus > 201703L
│ │ │ -
959 template<typename _Kt>
│ │ │ -
960 auto
│ │ │ -
│ │ │ -
961 equal_range(const _Kt& __x) const
│ │ │ -
962 -> decltype(_M_h._M_equal_range_tr(__x))
│ │ │ -
963 { return _M_h._M_equal_range_tr(__x); }
│ │ │ -
│ │ │ -
964#endif
│ │ │ -
965 ///@}
│ │ │ -
966
│ │ │ -
967 ///@{
│ │ │ -
968 /**
│ │ │ -
969 * @brief Subscript ( @c [] ) access to %unordered_map data.
│ │ │ -
970 * @param __k The key for which data should be retrieved.
│ │ │ -
971 * @return A reference to the data of the (key,data) %pair.
│ │ │ -
972 *
│ │ │ -
973 * Allows for easy lookup with the subscript ( @c [] )operator. Returns
│ │ │ -
974 * data associated with the key specified in subscript. If the key does
│ │ │ -
975 * not exist, a pair with that key is created using default values, which
│ │ │ -
976 * is then returned.
│ │ │ -
977 *
│ │ │ -
978 * Lookup requires constant time.
│ │ │ -
979 */
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
982 { return _M_h[__k]; }
│ │ │ -
│ │ │ -
983
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
986 { return _M_h[std::move(__k)]; }
│ │ │ -
│ │ │ -
987 ///@}
│ │ │ -
988
│ │ │ -
989 ///@{
│ │ │ -
990 /**
│ │ │ -
991 * @brief Access to %unordered_map data.
│ │ │ -
992 * @param __k The key for which data should be retrieved.
│ │ │ -
993 * @return A reference to the data whose key is equal to @a __k, if
│ │ │ -
994 * such a data is present in the %unordered_map.
│ │ │ -
995 * @throw std::out_of_range If no such data is present.
│ │ │ -
996 */
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
999 { return _M_h.at(__k); }
│ │ │ -
│ │ │ -
1000
│ │ │ -
1001 const mapped_type&
│ │ │ -
│ │ │ -
1002 at(const key_type& __k) const
│ │ │ -
1003 { return _M_h.at(__k); }
│ │ │ -
│ │ │ -
1004 ///@}
│ │ │ -
1005
│ │ │ -
1006 // bucket interface.
│ │ │ -
1007
│ │ │ -
1008 /// Returns the number of buckets of the %unordered_map.
│ │ │ -
1009 size_type
│ │ │ -
│ │ │ -
1010 bucket_count() const noexcept
│ │ │ -
1011 { return _M_h.bucket_count(); }
│ │ │ -
│ │ │ -
1012
│ │ │ -
1013 /// Returns the maximum number of buckets of the %unordered_map.
│ │ │ -
1014 size_type
│ │ │ -
│ │ │ -
1015 max_bucket_count() const noexcept
│ │ │ -
1016 { return _M_h.max_bucket_count(); }
│ │ │ -
│ │ │ -
1017
│ │ │ -
1018 /*
│ │ │ -
1019 * @brief Returns the number of elements in a given bucket.
│ │ │ -
1020 * @param __n A bucket index.
│ │ │ -
1021 * @return The number of elements in the bucket.
│ │ │ -
1022 */
│ │ │ -
1023 size_type
│ │ │ -
1024 bucket_size(size_type __n) const
│ │ │ -
1025 { return _M_h.bucket_size(__n); }
│ │ │ -
1026
│ │ │ -
1027 /*
│ │ │ -
1028 * @brief Returns the bucket index of a given element.
│ │ │ -
1029 * @param __key A key instance.
│ │ │ -
1030 * @return The key bucket index.
│ │ │ -
1031 */
│ │ │ -
1032 size_type
│ │ │ -
1033 bucket(const key_type& __key) const
│ │ │ -
1034 { return _M_h.bucket(__key); }
│ │ │ -
1035
│ │ │ -
1036 /**
│ │ │ -
1037 * @brief Returns a read/write iterator pointing to the first bucket
│ │ │ -
1038 * element.
│ │ │ -
1039 * @param __n The bucket index.
│ │ │ -
1040 * @return A read/write local iterator.
│ │ │ -
1041 */
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
1044 { return _M_h.begin(__n); }
│ │ │ -
│ │ │ -
1045
│ │ │ -
1046 ///@{
│ │ │ -
1047 /**
│ │ │ -
1048 * @brief Returns a read-only (constant) iterator pointing to the first
│ │ │ -
1049 * bucket element.
│ │ │ -
1050 * @param __n The bucket index.
│ │ │ -
1051 * @return A read-only local iterator.
│ │ │ -
1052 */
│ │ │ - │ │ │ -
│ │ │ -
1054 begin(size_type __n) const
│ │ │ -
1055 { return _M_h.begin(__n); }
│ │ │ -
│ │ │ -
1056
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
1059 { return _M_h.cbegin(__n); }
│ │ │ -
│ │ │ -
1060 ///@}
│ │ │ -
1061
│ │ │ -
1062 /**
│ │ │ -
1063 * @brief Returns a read/write iterator pointing to one past the last
│ │ │ -
1064 * bucket elements.
│ │ │ -
1065 * @param __n The bucket index.
│ │ │ -
1066 * @return A read/write local iterator.
│ │ │ -
1067 */
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
1070 { return _M_h.end(__n); }
│ │ │ -
│ │ │ -
1071
│ │ │ -
1072 ///@{
│ │ │ -
1073 /**
│ │ │ -
1074 * @brief Returns a read-only (constant) iterator pointing to one past
│ │ │ -
1075 * the last bucket elements.
│ │ │ -
1076 * @param __n The bucket index.
│ │ │ -
1077 * @return A read-only local iterator.
│ │ │ -
1078 */
│ │ │ - │ │ │ -
│ │ │ -
1080 end(size_type __n) const
│ │ │ -
1081 { return _M_h.end(__n); }
│ │ │ -
│ │ │ -
1082
│ │ │ - │ │ │ -
│ │ │ -
1084 cend(size_type __n) const
│ │ │ -
1085 { return _M_h.cend(__n); }
│ │ │ -
│ │ │ -
1086 ///@}
│ │ │ -
1087
│ │ │ -
1088 // hash policy.
│ │ │ -
1089
│ │ │ -
1090 /// Returns the average number of elements per bucket.
│ │ │ -
1091 float
│ │ │ -
│ │ │ -
1092 load_factor() const noexcept
│ │ │ -
1093 { return _M_h.load_factor(); }
│ │ │ -
│ │ │ -
1094
│ │ │ -
1095 /// Returns a positive number that the %unordered_map tries to keep the
│ │ │ -
1096 /// load factor less than or equal to.
│ │ │ -
1097 float
│ │ │ -
│ │ │ -
1098 max_load_factor() const noexcept
│ │ │ -
1099 { return _M_h.max_load_factor(); }
│ │ │ -
│ │ │ -
1100
│ │ │ -
1101 /**
│ │ │ -
1102 * @brief Change the %unordered_map maximum load factor.
│ │ │ -
1103 * @param __z The new maximum load factor.
│ │ │ -
1104 */
│ │ │ -
1105 void
│ │ │ -
│ │ │ - │ │ │ -
1107 { _M_h.max_load_factor(__z); }
│ │ │ -
│ │ │ -
1108
│ │ │ -
1109 /**
│ │ │ -
1110 * @brief May rehash the %unordered_map.
│ │ │ -
1111 * @param __n The new number of buckets.
│ │ │ -
1112 *
│ │ │ -
1113 * Rehash will occur only if the new number of buckets respect the
│ │ │ -
1114 * %unordered_map maximum load factor.
│ │ │ -
1115 */
│ │ │ -
1116 void
│ │ │ -
│ │ │ - │ │ │ -
1118 { _M_h.rehash(__n); }
│ │ │ -
│ │ │ -
1119
│ │ │ -
1120 /**
│ │ │ -
1121 * @brief Prepare the %unordered_map for a specified number of
│ │ │ -
1122 * elements.
│ │ │ -
1123 * @param __n Number of elements required.
│ │ │ -
1124 *
│ │ │ -
1125 * Same as rehash(ceil(n / max_load_factor())).
│ │ │ -
1126 */
│ │ │ -
1127 void
│ │ │ -
│ │ │ - │ │ │ -
1129 { _M_h.reserve(__n); }
│ │ │ -
│ │ │ -
1130
│ │ │ -
1131 template<typename _Key1, typename _Tp1, typename _Hash1, typename _Pred1,
│ │ │ -
1132 typename _Alloc1>
│ │ │ -
1133 friend bool
│ │ │ - │ │ │ - │ │ │ -
1136 };
│ │ │ -
│ │ │ -
1137
│ │ │ -
1138#if __cpp_deduction_guides >= 201606
│ │ │ -
1139
│ │ │ -
1140 template<typename _InputIterator,
│ │ │ -
1141 typename _Hash = hash<__iter_key_t<_InputIterator>>,
│ │ │ -
1142 typename _Pred = equal_to<__iter_key_t<_InputIterator>>,
│ │ │ -
1143 typename _Allocator = allocator<__iter_to_alloc_t<_InputIterator>>,
│ │ │ -
1144 typename = _RequireInputIter<_InputIterator>,
│ │ │ -
1145 typename = _RequireNotAllocatorOrIntegral<_Hash>,
│ │ │ -
1146 typename = _RequireNotAllocator<_Pred>,
│ │ │ -
1147 typename = _RequireAllocator<_Allocator>>
│ │ │ -
1148 unordered_map(_InputIterator, _InputIterator,
│ │ │ - │ │ │ -
1150 _Hash = _Hash(), _Pred = _Pred(), _Allocator = _Allocator())
│ │ │ -
1151 -> unordered_map<__iter_key_t<_InputIterator>,
│ │ │ -
1152 __iter_val_t<_InputIterator>,
│ │ │ -
1153 _Hash, _Pred, _Allocator>;
│ │ │ -
1154
│ │ │ -
1155 template<typename _Key, typename _Tp, typename _Hash = hash<_Key>,
│ │ │ -
1156 typename _Pred = equal_to<_Key>,
│ │ │ -
1157 typename _Allocator = allocator<pair<const _Key, _Tp>>,
│ │ │ -
1158 typename = _RequireNotAllocatorOrIntegral<_Hash>,
│ │ │ -
1159 typename = _RequireNotAllocator<_Pred>,
│ │ │ -
1160 typename = _RequireAllocator<_Allocator>>
│ │ │ -
1161 unordered_map(initializer_list<pair<_Key, _Tp>>,
│ │ │ - │ │ │ -
1163 _Hash = _Hash(), _Pred = _Pred(), _Allocator = _Allocator())
│ │ │ -
1164 -> unordered_map<_Key, _Tp, _Hash, _Pred, _Allocator>;
│ │ │ -
1165
│ │ │ -
1166 template<typename _InputIterator, typename _Allocator,
│ │ │ -
1167 typename = _RequireInputIter<_InputIterator>,
│ │ │ -
1168 typename = _RequireAllocator<_Allocator>>
│ │ │ -
1169 unordered_map(_InputIterator, _InputIterator,
│ │ │ -
1170 typename unordered_map<int, int>::size_type, _Allocator)
│ │ │ -
1171 -> unordered_map<__iter_key_t<_InputIterator>,
│ │ │ -
1172 __iter_val_t<_InputIterator>,
│ │ │ -
1173 hash<__iter_key_t<_InputIterator>>,
│ │ │ -
1174 equal_to<__iter_key_t<_InputIterator>>,
│ │ │ -
1175 _Allocator>;
│ │ │ -
1176
│ │ │ -
1177 template<typename _InputIterator, typename _Allocator,
│ │ │ -
1178 typename = _RequireInputIter<_InputIterator>,
│ │ │ -
1179 typename = _RequireAllocator<_Allocator>>
│ │ │ -
1180 unordered_map(_InputIterator, _InputIterator, _Allocator)
│ │ │ -
1181 -> unordered_map<__iter_key_t<_InputIterator>,
│ │ │ -
1182 __iter_val_t<_InputIterator>,
│ │ │ -
1183 hash<__iter_key_t<_InputIterator>>,
│ │ │ -
1184 equal_to<__iter_key_t<_InputIterator>>,
│ │ │ -
1185 _Allocator>;
│ │ │ -
1186
│ │ │ -
1187 template<typename _InputIterator, typename _Hash, typename _Allocator,
│ │ │ -
1188 typename = _RequireInputIter<_InputIterator>,
│ │ │ -
1189 typename = _RequireNotAllocatorOrIntegral<_Hash>,
│ │ │ -
1190 typename = _RequireAllocator<_Allocator>>
│ │ │ -
1191 unordered_map(_InputIterator, _InputIterator,
│ │ │ - │ │ │ -
1193 _Hash, _Allocator)
│ │ │ -
1194 -> unordered_map<__iter_key_t<_InputIterator>,
│ │ │ -
1195 __iter_val_t<_InputIterator>, _Hash,
│ │ │ -
1196 equal_to<__iter_key_t<_InputIterator>>, _Allocator>;
│ │ │ -
1197
│ │ │ -
1198 template<typename _Key, typename _Tp, typename _Allocator,
│ │ │ -
1199 typename = _RequireAllocator<_Allocator>>
│ │ │ -
1200 unordered_map(initializer_list<pair<_Key, _Tp>>,
│ │ │ - │ │ │ -
1202 _Allocator)
│ │ │ -
1203 -> unordered_map<_Key, _Tp, hash<_Key>, equal_to<_Key>, _Allocator>;
│ │ │ -
1204
│ │ │ -
1205 template<typename _Key, typename _Tp, typename _Allocator,
│ │ │ -
1206 typename = _RequireAllocator<_Allocator>>
│ │ │ -
1207 unordered_map(initializer_list<pair<_Key, _Tp>>, _Allocator)
│ │ │ -
1208 -> unordered_map<_Key, _Tp, hash<_Key>, equal_to<_Key>, _Allocator>;
│ │ │ -
1209
│ │ │ -
1210 template<typename _Key, typename _Tp, typename _Hash, typename _Allocator,
│ │ │ -
1211 typename = _RequireNotAllocatorOrIntegral<_Hash>,
│ │ │ -
1212 typename = _RequireAllocator<_Allocator>>
│ │ │ -
1213 unordered_map(initializer_list<pair<_Key, _Tp>>,
│ │ │ - │ │ │ -
1215 _Hash, _Allocator)
│ │ │ -
1216 -> unordered_map<_Key, _Tp, _Hash, equal_to<_Key>, _Allocator>;
│ │ │ -
1217
│ │ │ -
1218#endif
│ │ │ -
1219
│ │ │ -
1220 /**
│ │ │ -
1221 * @brief A standard container composed of equivalent keys
│ │ │ -
1222 * (possibly containing multiple of each key value) that associates
│ │ │ -
1223 * values of another type with the keys.
│ │ │ -
1224 *
│ │ │ -
1225 * @ingroup unordered_associative_containers
│ │ │ -
1226 * @headerfile unordered_map
│ │ │ -
1227 * @since C++11
│ │ │ -
1228 *
│ │ │ -
1229 * @tparam _Key Type of key objects.
│ │ │ -
1230 * @tparam _Tp Type of mapped objects.
│ │ │ -
1231 * @tparam _Hash Hashing function object type, defaults to hash<_Value>.
│ │ │ -
1232 * @tparam _Pred Predicate function object type, defaults
│ │ │ -
1233 * to equal_to<_Value>.
│ │ │ -
1234 * @tparam _Alloc Allocator type, defaults to
│ │ │ -
1235 * std::allocator<std::pair<const _Key, _Tp>>.
│ │ │ -
1236 *
│ │ │ -
1237 * Meets the requirements of a <a href="tables.html#65">container</a>, and
│ │ │ -
1238 * <a href="tables.html#xx">unordered associative container</a>
│ │ │ -
1239 *
│ │ │ -
1240 * The resulting value type of the container is std::pair<const _Key, _Tp>.
│ │ │ -
1241 *
│ │ │ -
1242 * Base is _Hashtable, dispatched at compile time via template
│ │ │ -
1243 * alias __ummap_hashtable.
│ │ │ -
1244 */
│ │ │ -
1245 template<typename _Key, typename _Tp,
│ │ │ -
1246 typename _Hash = hash<_Key>,
│ │ │ -
1247 typename _Pred = equal_to<_Key>,
│ │ │ -
1248 typename _Alloc = allocator<std::pair<const _Key, _Tp>>>
│ │ │ -
│ │ │ - │ │ │ -
1250 {
│ │ │ - │ │ │ -
1252 _Hashtable _M_h;
│ │ │ -
1253
│ │ │ -
1254 public:
│ │ │ -
1255 // typedefs:
│ │ │ -
1256 ///@{
│ │ │ -
1257 /// Public typedefs.
│ │ │ -
1258 typedef typename _Hashtable::key_type key_type;
│ │ │ -
1259 typedef typename _Hashtable::value_type value_type;
│ │ │ -
1260 typedef typename _Hashtable::mapped_type mapped_type;
│ │ │ -
1261 typedef typename _Hashtable::hasher hasher;
│ │ │ -
1262 typedef typename _Hashtable::key_equal key_equal;
│ │ │ -
1263 typedef typename _Hashtable::allocator_type allocator_type;
│ │ │ -
1264 ///@}
│ │ │ -
1265
│ │ │ -
1266 ///@{
│ │ │ -
1267 /// Iterator-related typedefs.
│ │ │ -
1268 typedef typename _Hashtable::pointer pointer;
│ │ │ -
1269 typedef typename _Hashtable::const_pointer const_pointer;
│ │ │ -
1270 typedef typename _Hashtable::reference reference;
│ │ │ -
1271 typedef typename _Hashtable::const_reference const_reference;
│ │ │ -
1272 typedef typename _Hashtable::iterator iterator;
│ │ │ -
1273 typedef typename _Hashtable::const_iterator const_iterator;
│ │ │ -
1274 typedef typename _Hashtable::local_iterator local_iterator;
│ │ │ -
1275 typedef typename _Hashtable::const_local_iterator const_local_iterator;
│ │ │ -
1276 typedef typename _Hashtable::size_type size_type;
│ │ │ -
1277 typedef typename _Hashtable::difference_type difference_type;
│ │ │ -
1278 ///@}
│ │ │ -
1279
│ │ │ -
1280#if __cplusplus > 201402L
│ │ │ -
1281 using node_type = typename _Hashtable::node_type;
│ │ │ -
1282#endif
│ │ │ -
1283
│ │ │ -
1284 //construct/destroy/copy
│ │ │ -
1285
│ │ │ -
1286 /// Default constructor.
│ │ │ - │ │ │ -
1288
│ │ │ -
1289 /**
│ │ │ -
1290 * @brief Default constructor creates no elements.
│ │ │ -
1291 * @param __n Mnimal initial number of buckets.
│ │ │ -
1292 * @param __hf A hash functor.
│ │ │ -
1293 * @param __eql A key equality functor.
│ │ │ -
1294 * @param __a An allocator object.
│ │ │ -
1295 */
│ │ │ -
1296 explicit
│ │ │ -
│ │ │ - │ │ │ -
1298 const hasher& __hf = hasher(),
│ │ │ -
1299 const key_equal& __eql = key_equal(),
│ │ │ -
1300 const allocator_type& __a = allocator_type())
│ │ │ -
1301 : _M_h(__n, __hf, __eql, __a)
│ │ │ -
1302 { }
│ │ │ -
│ │ │ -
1303
│ │ │ -
1304 /**
│ │ │ -
1305 * @brief Builds an %unordered_multimap from a range.
│ │ │ -
1306 * @param __first An input iterator.
│ │ │ -
1307 * @param __last An input iterator.
│ │ │ -
1308 * @param __n Minimal initial number of buckets.
│ │ │ -
1309 * @param __hf A hash functor.
│ │ │ -
1310 * @param __eql A key equality functor.
│ │ │ -
1311 * @param __a An allocator object.
│ │ │ -
1312 *
│ │ │ -
1313 * Create an %unordered_multimap consisting of copies of the elements
│ │ │ -
1314 * from [__first,__last). This is linear in N (where N is
│ │ │ -
1315 * distance(__first,__last)).
│ │ │ -
1316 */
│ │ │ -
1317 template<typename _InputIterator>
│ │ │ -
│ │ │ - │ │ │ -
1319 size_type __n = 0,
│ │ │ -
1320 const hasher& __hf = hasher(),
│ │ │ -
1321 const key_equal& __eql = key_equal(),
│ │ │ -
1322 const allocator_type& __a = allocator_type())
│ │ │ -
1323 : _M_h(__first, __last, __n, __hf, __eql, __a)
│ │ │ -
1324 { }
│ │ │ -
│ │ │ -
1325
│ │ │ -
1326 /// Copy constructor.
│ │ │ - │ │ │ -
1328
│ │ │ -
1329 /// Move constructor.
│ │ │ - │ │ │ -
1331
│ │ │ -
1332 /**
│ │ │ -
1333 * @brief Creates an %unordered_multimap with no elements.
│ │ │ -
1334 * @param __a An allocator object.
│ │ │ -
1335 */
│ │ │ -
1336 explicit
│ │ │ -
│ │ │ - │ │ │ -
1338 : _M_h(__a)
│ │ │ -
1339 { }
│ │ │ -
│ │ │ -
1340
│ │ │ -
1341 /*
│ │ │ -
1342 * @brief Copy constructor with allocator argument.
│ │ │ -
1343 * @param __uset Input %unordered_multimap to copy.
│ │ │ -
1344 * @param __a An allocator object.
│ │ │ -
1345 */
│ │ │ - │ │ │ -
1347 const allocator_type& __a)
│ │ │ -
1348 : _M_h(__ummap._M_h, __a)
│ │ │ -
1349 { }
│ │ │ -
1350
│ │ │ -
1351 /*
│ │ │ -
1352 * @brief Move constructor with allocator argument.
│ │ │ -
1353 * @param __uset Input %unordered_multimap to move.
│ │ │ -
1354 * @param __a An allocator object.
│ │ │ -
1355 */
│ │ │ - │ │ │ -
1357 const allocator_type& __a)
│ │ │ -
1358 noexcept( noexcept(_Hashtable(std::move(__ummap._M_h), __a)) )
│ │ │ -
1359 : _M_h(std::move(__ummap._M_h), __a)
│ │ │ -
1360 { }
│ │ │ -
1361
│ │ │ -
1362 /**
│ │ │ -
1363 * @brief Builds an %unordered_multimap from an initializer_list.
│ │ │ -
1364 * @param __l An initializer_list.
│ │ │ -
1365 * @param __n Minimal initial number of buckets.
│ │ │ -
1366 * @param __hf A hash functor.
│ │ │ -
1367 * @param __eql A key equality functor.
│ │ │ -
1368 * @param __a An allocator object.
│ │ │ -
1369 *
│ │ │ -
1370 * Create an %unordered_multimap consisting of copies of the elements in
│ │ │ -
1371 * the list. This is linear in N (where N is @a __l.size()).
│ │ │ -
1372 */
│ │ │ -
│ │ │ - │ │ │ -
1374 size_type __n = 0,
│ │ │ -
1375 const hasher& __hf = hasher(),
│ │ │ -
1376 const key_equal& __eql = key_equal(),
│ │ │ -
1377 const allocator_type& __a = allocator_type())
│ │ │ -
1378 : _M_h(__l, __n, __hf, __eql, __a)
│ │ │ -
1379 { }
│ │ │ -
│ │ │ -
1380
│ │ │ - │ │ │ -
1382 : unordered_multimap(__n, hasher(), key_equal(), __a)
│ │ │ -
1383 { }
│ │ │ -
1384
│ │ │ -
1385 unordered_multimap(size_type __n, const hasher& __hf,
│ │ │ -
1386 const allocator_type& __a)
│ │ │ -
1387 : unordered_multimap(__n, __hf, key_equal(), __a)
│ │ │ -
1388 { }
│ │ │ -
1389
│ │ │ -
1390 template<typename _InputIterator>
│ │ │ -
1391 unordered_multimap(_InputIterator __first, _InputIterator __last,
│ │ │ -
1392 size_type __n,
│ │ │ -
1393 const allocator_type& __a)
│ │ │ -
1394 : unordered_multimap(__first, __last, __n, hasher(), key_equal(), __a)
│ │ │ -
1395 { }
│ │ │ -
1396
│ │ │ -
1397 template<typename _InputIterator>
│ │ │ -
1398 unordered_multimap(_InputIterator __first, _InputIterator __last,
│ │ │ -
1399 size_type __n, const hasher& __hf,
│ │ │ -
1400 const allocator_type& __a)
│ │ │ -
1401 : unordered_multimap(__first, __last, __n, __hf, key_equal(), __a)
│ │ │ -
1402 { }
│ │ │ -
1403
│ │ │ -
1404 unordered_multimap(initializer_list<value_type> __l,
│ │ │ -
1405 size_type __n,
│ │ │ -
1406 const allocator_type& __a)
│ │ │ -
1407 : unordered_multimap(__l, __n, hasher(), key_equal(), __a)
│ │ │ -
1408 { }
│ │ │ -
1409
│ │ │ -
1410 unordered_multimap(initializer_list<value_type> __l,
│ │ │ -
1411 size_type __n, const hasher& __hf,
│ │ │ -
1412 const allocator_type& __a)
│ │ │ -
1413 : unordered_multimap(__l, __n, __hf, key_equal(), __a)
│ │ │ -
1414 { }
│ │ │ -
1415
│ │ │ -
1416 /// Copy assignment operator.
│ │ │ - │ │ │ - │ │ │ -
1419
│ │ │ -
1420 /// Move assignment operator.
│ │ │ - │ │ │ - │ │ │ -
1423
│ │ │ -
1424 /**
│ │ │ -
1425 * @brief %Unordered_multimap list assignment operator.
│ │ │ -
1426 * @param __l An initializer_list.
│ │ │ -
1427 *
│ │ │ -
1428 * This function fills an %unordered_multimap with copies of the
│ │ │ -
1429 * elements in the initializer list @a __l.
│ │ │ -
1430 *
│ │ │ -
1431 * Note that the assignment completely changes the %unordered_multimap
│ │ │ -
1432 * and that the resulting %unordered_multimap's size is the same as the
│ │ │ -
1433 * number of elements assigned.
│ │ │ -
1434 */
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
1437 {
│ │ │ -
1438 _M_h = __l;
│ │ │ -
1439 return *this;
│ │ │ -
1440 }
│ │ │ -
│ │ │ -
1441
│ │ │ -
1442 /// Returns the allocator object used by the %unordered_multimap.
│ │ │ - │ │ │ -
│ │ │ -
1444 get_allocator() const noexcept
│ │ │ -
1445 { return _M_h.get_allocator(); }
│ │ │ -
│ │ │ -
1446
│ │ │ -
1447 // size and capacity:
│ │ │ -
1448
│ │ │ -
1449 /// Returns true if the %unordered_multimap is empty.
│ │ │ -
1450 _GLIBCXX_NODISCARD bool
│ │ │ -
│ │ │ -
1451 empty() const noexcept
│ │ │ -
1452 { return _M_h.empty(); }
│ │ │ -
│ │ │ -
1453
│ │ │ -
1454 /// Returns the size of the %unordered_multimap.
│ │ │ -
1455 size_type
│ │ │ -
│ │ │ -
1456 size() const noexcept
│ │ │ -
1457 { return _M_h.size(); }
│ │ │ -
│ │ │ -
1458
│ │ │ -
1459 /// Returns the maximum size of the %unordered_multimap.
│ │ │ -
1460 size_type
│ │ │ -
│ │ │ -
1461 max_size() const noexcept
│ │ │ -
1462 { return _M_h.max_size(); }
│ │ │ -
│ │ │ -
1463
│ │ │ -
1464 // iterators.
│ │ │ -
1465
│ │ │ -
1466 /**
│ │ │ -
1467 * Returns a read/write iterator that points to the first element in the
│ │ │ -
1468 * %unordered_multimap.
│ │ │ -
1469 */
│ │ │ -
1470 iterator
│ │ │ -
│ │ │ -
1471 begin() noexcept
│ │ │ -
1472 { return _M_h.begin(); }
│ │ │ -
│ │ │ -
1473
│ │ │ -
1474 ///@{
│ │ │ -
1475 /**
│ │ │ -
1476 * Returns a read-only (constant) iterator that points to the first
│ │ │ -
1477 * element in the %unordered_multimap.
│ │ │ -
1478 */
│ │ │ - │ │ │ -
│ │ │ -
1480 begin() const noexcept
│ │ │ -
1481 { return _M_h.begin(); }
│ │ │ -
│ │ │ -
1482
│ │ │ - │ │ │ -
│ │ │ -
1484 cbegin() const noexcept
│ │ │ -
1485 { return _M_h.begin(); }
│ │ │ -
│ │ │ -
1486 ///@}
│ │ │ -
1487
│ │ │ -
1488 /**
│ │ │ -
1489 * Returns a read/write iterator that points one past the last element in
│ │ │ -
1490 * the %unordered_multimap.
│ │ │ -
1491 */
│ │ │ -
1492 iterator
│ │ │ -
│ │ │ -
1493 end() noexcept
│ │ │ -
1494 { return _M_h.end(); }
│ │ │ -
│ │ │ -
1495
│ │ │ -
1496 ///@{
│ │ │ -
1497 /**
│ │ │ -
1498 * Returns a read-only (constant) iterator that points one past the last
│ │ │ -
1499 * element in the %unordered_multimap.
│ │ │ -
1500 */
│ │ │ - │ │ │ -
│ │ │ -
1502 end() const noexcept
│ │ │ -
1503 { return _M_h.end(); }
│ │ │ -
│ │ │ -
1504
│ │ │ - │ │ │ -
│ │ │ -
1506 cend() const noexcept
│ │ │ -
1507 { return _M_h.end(); }
│ │ │ -
│ │ │ -
1508 ///@}
│ │ │ -
1509
│ │ │ -
1510 // modifiers.
│ │ │ -
1511
│ │ │ -
1512 /**
│ │ │ -
1513 * @brief Attempts to build and insert a std::pair into the
│ │ │ -
1514 * %unordered_multimap.
│ │ │ -
1515 *
│ │ │ -
1516 * @param __args Arguments used to generate a new pair instance (see
│ │ │ -
1517 * std::piecewise_contruct for passing arguments to each
│ │ │ -
1518 * part of the pair constructor).
│ │ │ -
1519 *
│ │ │ -
1520 * @return An iterator that points to the inserted pair.
│ │ │ -
1521 *
│ │ │ -
1522 * This function attempts to build and insert a (key, value) %pair into
│ │ │ -
1523 * the %unordered_multimap.
│ │ │ -
1524 *
│ │ │ -
1525 * Insertion requires amortized constant time.
│ │ │ -
1526 */
│ │ │ -
1527 template<typename... _Args>
│ │ │ -
1528 iterator
│ │ │ -
│ │ │ - │ │ │ -
1530 { return _M_h.emplace(std::forward<_Args>(__args)...); }
│ │ │ -
│ │ │ -
1531
│ │ │ -
1532 /**
│ │ │ -
1533 * @brief Attempts to build and insert a std::pair into the
│ │ │ -
1534 * %unordered_multimap.
│ │ │ -
1535 *
│ │ │ -
1536 * @param __pos An iterator that serves as a hint as to where the pair
│ │ │ -
1537 * should be inserted.
│ │ │ -
1538 * @param __args Arguments used to generate a new pair instance (see
│ │ │ -
1539 * std::piecewise_contruct for passing arguments to each
│ │ │ -
1540 * part of the pair constructor).
│ │ │ -
1541 * @return An iterator that points to the element with key of the
│ │ │ -
1542 * std::pair built from @a __args.
│ │ │ -
1543 *
│ │ │ -
1544 * Note that the first parameter is only a hint and can potentially
│ │ │ -
1545 * improve the performance of the insertion process. A bad hint would
│ │ │ -
1546 * cause no gains in efficiency.
│ │ │ -
1547 *
│ │ │ -
1548 * See
│ │ │ -
1549 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/associative.html#containers.associative.insert_hints
│ │ │ -
1550 * for more on @a hinting.
│ │ │ -
1551 *
│ │ │ -
1552 * Insertion requires amortized constant time.
│ │ │ -
1553 */
│ │ │ -
1554 template<typename... _Args>
│ │ │ -
1555 iterator
│ │ │ -
│ │ │ - │ │ │ -
1557 { return _M_h.emplace_hint(__pos, std::forward<_Args>(__args)...); }
│ │ │ -
│ │ │ -
1558
│ │ │ -
1559 ///@{
│ │ │ -
1560 /**
│ │ │ -
1561 * @brief Inserts a std::pair into the %unordered_multimap.
│ │ │ -
1562 * @param __x Pair to be inserted (see std::make_pair for easy
│ │ │ -
1563 * creation of pairs).
│ │ │ -
1564 *
│ │ │ -
1565 * @return An iterator that points to the inserted pair.
│ │ │ -
1566 *
│ │ │ -
1567 * Insertion requires amortized constant time.
│ │ │ -
1568 */
│ │ │ -
1569 iterator
│ │ │ -
│ │ │ -
1570 insert(const value_type& __x)
│ │ │ -
1571 { return _M_h.insert(__x); }
│ │ │ -
│ │ │ -
1572
│ │ │ -
1573 iterator
│ │ │ -
│ │ │ - │ │ │ -
1575 { return _M_h.insert(std::move(__x)); }
│ │ │ -
│ │ │ -
1576
│ │ │ -
1577 template<typename _Pair>
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
1580 { return _M_h.emplace(std::forward<_Pair>(__x)); }
│ │ │ -
│ │ │ -
1581 ///@}
│ │ │ -
1582
│ │ │ -
1583 ///@{
│ │ │ -
1584 /**
│ │ │ -
1585 * @brief Inserts a std::pair into the %unordered_multimap.
│ │ │ -
1586 * @param __hint An iterator that serves as a hint as to where the
│ │ │ -
1587 * pair should be inserted.
│ │ │ -
1588 * @param __x Pair to be inserted (see std::make_pair for easy creation
│ │ │ -
1589 * of pairs).
│ │ │ -
1590 * @return An iterator that points to the element with key of
│ │ │ -
1591 * @a __x (may or may not be the %pair passed in).
│ │ │ -
1592 *
│ │ │ -
1593 * Note that the first parameter is only a hint and can potentially
│ │ │ -
1594 * improve the performance of the insertion process. A bad hint would
│ │ │ -
1595 * cause no gains in efficiency.
│ │ │ -
1596 *
│ │ │ -
1597 * See
│ │ │ -
1598 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/associative.html#containers.associative.insert_hints
│ │ │ -
1599 * for more on @a hinting.
│ │ │ -
1600 *
│ │ │ -
1601 * Insertion requires amortized constant time.
│ │ │ -
1602 */
│ │ │ -
1603 iterator
│ │ │ -
│ │ │ - │ │ │ -
1605 { return _M_h.insert(__hint, __x); }
│ │ │ -
│ │ │ -
1606
│ │ │ -
1607 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ -
1608 // 2354. Unnecessary copying when inserting into maps with braced-init
│ │ │ -
1609 iterator
│ │ │ -
│ │ │ - │ │ │ -
1611 { return _M_h.insert(__hint, std::move(__x)); }
│ │ │ -
│ │ │ -
1612
│ │ │ -
1613 template<typename _Pair>
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
1616 { return _M_h.emplace_hint(__hint, std::forward<_Pair>(__x)); }
│ │ │ -
│ │ │ -
1617 ///@}
│ │ │ -
1618
│ │ │ -
1619 /**
│ │ │ -
1620 * @brief A template function that attempts to insert a range of
│ │ │ -
1621 * elements.
│ │ │ -
1622 * @param __first Iterator pointing to the start of the range to be
│ │ │ -
1623 * inserted.
│ │ │ -
1624 * @param __last Iterator pointing to the end of the range.
│ │ │ -
1625 *
│ │ │ -
1626 * Complexity similar to that of the range constructor.
│ │ │ -
1627 */
│ │ │ -
1628 template<typename _InputIterator>
│ │ │ -
1629 void
│ │ │ -
│ │ │ - │ │ │ -
1631 { _M_h.insert(__first, __last); }
│ │ │ -
│ │ │ -
1632
│ │ │ -
1633 /**
│ │ │ -
1634 * @brief Attempts to insert a list of elements into the
│ │ │ -
1635 * %unordered_multimap.
│ │ │ -
1636 * @param __l A std::initializer_list<value_type> of elements
│ │ │ -
1637 * to be inserted.
│ │ │ -
1638 *
│ │ │ -
1639 * Complexity similar to that of the range constructor.
│ │ │ -
1640 */
│ │ │ -
1641 void
│ │ │ -
│ │ │ - │ │ │ -
1643 { _M_h.insert(__l); }
│ │ │ -
│ │ │ -
1644
│ │ │ -
1645#if __cplusplus > 201402L
│ │ │ -
1646 /// Extract a node.
│ │ │ -
1647 node_type
│ │ │ -
│ │ │ - │ │ │ -
1649 {
│ │ │ -
1650 __glibcxx_assert(__pos != end());
│ │ │ -
1651 return _M_h.extract(__pos);
│ │ │ -
1652 }
│ │ │ -
│ │ │ -
1653
│ │ │ -
1654 /// Extract a node.
│ │ │ -
1655 node_type
│ │ │ -
│ │ │ - │ │ │ -
1657 { return _M_h.extract(__key); }
│ │ │ -
│ │ │ -
1658
│ │ │ -
1659 /// Re-insert an extracted node.
│ │ │ -
1660 iterator
│ │ │ -
│ │ │ -
1661 insert(node_type&& __nh)
│ │ │ -
1662 { return _M_h._M_reinsert_node_multi(cend(), std::move(__nh)); }
│ │ │ -
│ │ │ -
1663
│ │ │ -
1664 /// Re-insert an extracted node.
│ │ │ -
1665 iterator
│ │ │ -
│ │ │ - │ │ │ -
1667 { return _M_h._M_reinsert_node_multi(__hint, std::move(__nh)); }
│ │ │ -
│ │ │ -
1668#endif // C++17
│ │ │ -
1669
│ │ │ -
1670 ///@{
│ │ │ -
1671 /**
│ │ │ -
1672 * @brief Erases an element from an %unordered_multimap.
│ │ │ -
1673 * @param __position An iterator pointing to the element to be erased.
│ │ │ -
1674 * @return An iterator pointing to the element immediately following
│ │ │ -
1675 * @a __position prior to the element being erased. If no such
│ │ │ -
1676 * element exists, end() is returned.
│ │ │ -
1677 *
│ │ │ -
1678 * This function erases an element, pointed to by the given iterator,
│ │ │ -
1679 * from an %unordered_multimap.
│ │ │ -
1680 * Note that this function only erases the element, and that if the
│ │ │ -
1681 * element is itself a pointer, the pointed-to memory is not touched in
│ │ │ -
1682 * any way. Managing the pointer is the user's responsibility.
│ │ │ -
1683 */
│ │ │ -
1684 iterator
│ │ │ -
│ │ │ - │ │ │ -
1686 { return _M_h.erase(__position); }
│ │ │ -
│ │ │ -
1687
│ │ │ -
1688 // LWG 2059.
│ │ │ -
1689 iterator
│ │ │ -
│ │ │ - │ │ │ -
1691 { return _M_h.erase(__position); }
│ │ │ -
│ │ │ -
1692 ///@}
│ │ │ -
1693
│ │ │ -
1694 /**
│ │ │ -
1695 * @brief Erases elements according to the provided key.
│ │ │ -
1696 * @param __x Key of elements to be erased.
│ │ │ -
1697 * @return The number of elements erased.
│ │ │ -
1698 *
│ │ │ -
1699 * This function erases all the elements located by the given key from
│ │ │ -
1700 * an %unordered_multimap.
│ │ │ -
1701 * Note that this function only erases the element, and that if the
│ │ │ -
1702 * element is itself a pointer, the pointed-to memory is not touched in
│ │ │ -
1703 * any way. Managing the pointer is the user's responsibility.
│ │ │ -
1704 */
│ │ │ -
1705 size_type
│ │ │ -
│ │ │ -
1706 erase(const key_type& __x)
│ │ │ -
1707 { return _M_h.erase(__x); }
│ │ │ -
│ │ │ -
1708
│ │ │ -
1709 /**
│ │ │ -
1710 * @brief Erases a [__first,__last) range of elements from an
│ │ │ -
1711 * %unordered_multimap.
│ │ │ -
1712 * @param __first Iterator pointing to the start of the range to be
│ │ │ -
1713 * erased.
│ │ │ -
1714 * @param __last Iterator pointing to the end of the range to
│ │ │ -
1715 * be erased.
│ │ │ -
1716 * @return The iterator @a __last.
│ │ │ -
1717 *
│ │ │ -
1718 * This function erases a sequence of elements from an
│ │ │ -
1719 * %unordered_multimap.
│ │ │ -
1720 * Note that this function only erases the elements, and that if
│ │ │ -
1721 * the element is itself a pointer, the pointed-to memory is not touched
│ │ │ -
1722 * in any way. Managing the pointer is the user's responsibility.
│ │ │ -
1723 */
│ │ │ -
1724 iterator
│ │ │ -
│ │ │ - │ │ │ -
1726 { return _M_h.erase(__first, __last); }
│ │ │ -
│ │ │ -
1727
│ │ │ -
1728 /**
│ │ │ -
1729 * Erases all elements in an %unordered_multimap.
│ │ │ -
1730 * Note that this function only erases the elements, and that if the
│ │ │ -
1731 * elements themselves are pointers, the pointed-to memory is not touched
│ │ │ -
1732 * in any way. Managing the pointer is the user's responsibility.
│ │ │ -
1733 */
│ │ │ -
1734 void
│ │ │ -
│ │ │ -
1735 clear() noexcept
│ │ │ -
1736 { _M_h.clear(); }
│ │ │ -
│ │ │ -
1737
│ │ │ -
1738 /**
│ │ │ -
1739 * @brief Swaps data with another %unordered_multimap.
│ │ │ -
1740 * @param __x An %unordered_multimap of the same element and allocator
│ │ │ -
1741 * types.
│ │ │ -
1742 *
│ │ │ -
1743 * This exchanges the elements between two %unordered_multimap in
│ │ │ -
1744 * constant time.
│ │ │ -
1745 * Note that the global std::swap() function is specialized such that
│ │ │ -
1746 * std::swap(m1,m2) will feed to this function.
│ │ │ -
1747 */
│ │ │ -
1748 void
│ │ │ -
│ │ │ - │ │ │ -
1750 noexcept( noexcept(_M_h.swap(__x._M_h)) )
│ │ │ -
1751 { _M_h.swap(__x._M_h); }
│ │ │ -
│ │ │ -
1752
│ │ │ -
1753#if __cplusplus > 201402L
│ │ │ -
1754 template<typename, typename, typename>
│ │ │ -
1755 friend class std::_Hash_merge_helper;
│ │ │ -
1756
│ │ │ -
1757 template<typename _H2, typename _P2>
│ │ │ -
1758 void
│ │ │ - │ │ │ -
1760 {
│ │ │ -
1761 using _Merge_helper
│ │ │ - │ │ │ -
1763 _M_h._M_merge_multi(_Merge_helper::_S_get_table(__source));
│ │ │ -
1764 }
│ │ │ -
1765
│ │ │ -
1766 template<typename _H2, typename _P2>
│ │ │ -
1767 void
│ │ │ -
1768 merge(unordered_multimap<_Key, _Tp, _H2, _P2, _Alloc>&& __source)
│ │ │ -
1769 { merge(__source); }
│ │ │ -
1770
│ │ │ -
1771 template<typename _H2, typename _P2>
│ │ │ -
1772 void
│ │ │ -
1773 merge(unordered_map<_Key, _Tp, _H2, _P2, _Alloc>& __source)
│ │ │ -
1774 {
│ │ │ -
1775 using _Merge_helper
│ │ │ -
1776 = _Hash_merge_helper<unordered_multimap, _H2, _P2>;
│ │ │ -
1777 _M_h._M_merge_multi(_Merge_helper::_S_get_table(__source));
│ │ │ -
1778 }
│ │ │ -
1779
│ │ │ -
1780 template<typename _H2, typename _P2>
│ │ │ -
1781 void
│ │ │ -
1782 merge(unordered_map<_Key, _Tp, _H2, _P2, _Alloc>&& __source)
│ │ │ -
1783 { merge(__source); }
│ │ │ -
1784#endif // C++17
│ │ │ -
1785
│ │ │ -
1786 // observers.
│ │ │ -
1787
│ │ │ -
1788 /// Returns the hash functor object with which the %unordered_multimap
│ │ │ -
1789 /// was constructed.
│ │ │ -
1790 hasher
│ │ │ -
│ │ │ - │ │ │ -
1792 { return _M_h.hash_function(); }
│ │ │ -
│ │ │ -
1793
│ │ │ -
1794 /// Returns the key comparison object with which the %unordered_multimap
│ │ │ -
1795 /// was constructed.
│ │ │ -
1796 key_equal
│ │ │ -
│ │ │ -
1797 key_eq() const
│ │ │ -
1798 { return _M_h.key_eq(); }
│ │ │ -
│ │ │ -
1799
│ │ │ -
1800 // lookup.
│ │ │ -
1801
│ │ │ -
1802 ///@{
│ │ │ -
1803 /**
│ │ │ -
1804 * @brief Tries to locate an element in an %unordered_multimap.
│ │ │ -
1805 * @param __x Key to be located.
│ │ │ -
1806 * @return Iterator pointing to sought-after element, or end() if not
│ │ │ -
1807 * found.
│ │ │ -
1808 *
│ │ │ -
1809 * This function takes a key and tries to locate the element with which
│ │ │ -
1810 * the key matches. If successful the function returns an iterator
│ │ │ -
1811 * pointing to the sought after element. If unsuccessful it returns the
│ │ │ -
1812 * past-the-end ( @c end() ) iterator.
│ │ │ -
1813 */
│ │ │ -
1814 iterator
│ │ │ -
│ │ │ -
1815 find(const key_type& __x)
│ │ │ -
1816 { return _M_h.find(__x); }
│ │ │ -
│ │ │ -
1817
│ │ │ -
1818#if __cplusplus > 201703L
│ │ │ -
1819 template<typename _Kt>
│ │ │ -
1820 auto
│ │ │ -
│ │ │ -
1821 find(const _Kt& __x) -> decltype(_M_h._M_find_tr(__x))
│ │ │ -
1822 { return _M_h._M_find_tr(__x); }
│ │ │ -
│ │ │ -
1823#endif
│ │ │ -
1824
│ │ │ - │ │ │ -
│ │ │ -
1826 find(const key_type& __x) const
│ │ │ -
1827 { return _M_h.find(__x); }
│ │ │ -
│ │ │ -
1828
│ │ │ -
1829#if __cplusplus > 201703L
│ │ │ -
1830 template<typename _Kt>
│ │ │ -
1831 auto
│ │ │ -
│ │ │ -
1832 find(const _Kt& __x) const -> decltype(_M_h._M_find_tr(__x))
│ │ │ -
1833 { return _M_h._M_find_tr(__x); }
│ │ │ -
│ │ │ -
1834#endif
│ │ │ -
1835 ///@}
│ │ │ -
1836
│ │ │ -
1837 ///@{
│ │ │ -
1838 /**
│ │ │ -
1839 * @brief Finds the number of elements.
│ │ │ -
1840 * @param __x Key to count.
│ │ │ -
1841 * @return Number of elements with specified key.
│ │ │ -
1842 */
│ │ │ -
1843 size_type
│ │ │ -
│ │ │ -
1844 count(const key_type& __x) const
│ │ │ -
1845 { return _M_h.count(__x); }
│ │ │ -
│ │ │ -
1846
│ │ │ -
1847#if __cplusplus > 201703L
│ │ │ -
1848 template<typename _Kt>
│ │ │ -
1849 auto
│ │ │ -
│ │ │ -
1850 count(const _Kt& __x) const -> decltype(_M_h._M_count_tr(__x))
│ │ │ -
1851 { return _M_h._M_count_tr(__x); }
│ │ │ -
│ │ │ -
1852#endif
│ │ │ -
1853 ///@}
│ │ │ -
1854
│ │ │ -
1855#if __cplusplus > 201703L
│ │ │ -
1856 ///@{
│ │ │ -
1857 /**
│ │ │ -
1858 * @brief Finds whether an element with the given key exists.
│ │ │ -
1859 * @param __x Key of elements to be located.
│ │ │ -
1860 * @return True if there is any element with the specified key.
│ │ │ -
1861 */
│ │ │ -
1862 bool
│ │ │ -
│ │ │ -
1863 contains(const key_type& __x) const
│ │ │ -
1864 { return _M_h.find(__x) != _M_h.end(); }
│ │ │ -
│ │ │ -
1865
│ │ │ -
1866 template<typename _Kt>
│ │ │ -
1867 auto
│ │ │ -
│ │ │ -
1868 contains(const _Kt& __x) const
│ │ │ -
1869 -> decltype(_M_h._M_find_tr(__x), void(), true)
│ │ │ -
1870 { return _M_h._M_find_tr(__x) != _M_h.end(); }
│ │ │ -
│ │ │ -
1871 ///@}
│ │ │ -
1872#endif
│ │ │ -
1873
│ │ │ -
1874 ///@{
│ │ │ -
1875 /**
│ │ │ -
1876 * @brief Finds a subsequence matching given key.
│ │ │ -
1877 * @param __x Key to be located.
│ │ │ -
1878 * @return Pair of iterators that possibly points to the subsequence
│ │ │ -
1879 * matching given key.
│ │ │ -
1880 */
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
1883 { return _M_h.equal_range(__x); }
│ │ │ -
│ │ │ -
1884
│ │ │ -
1885#if __cplusplus > 201703L
│ │ │ -
1886 template<typename _Kt>
│ │ │ -
1887 auto
│ │ │ -
│ │ │ -
1888 equal_range(const _Kt& __x)
│ │ │ -
1889 -> decltype(_M_h._M_equal_range_tr(__x))
│ │ │ -
1890 { return _M_h._M_equal_range_tr(__x); }
│ │ │ -
│ │ │ -
1891#endif
│ │ │ -
1892
│ │ │ - │ │ │ -
│ │ │ -
1894 equal_range(const key_type& __x) const
│ │ │ -
1895 { return _M_h.equal_range(__x); }
│ │ │ -
│ │ │ -
1896
│ │ │ -
1897#if __cplusplus > 201703L
│ │ │ -
1898 template<typename _Kt>
│ │ │ -
1899 auto
│ │ │ -
│ │ │ -
1900 equal_range(const _Kt& __x) const
│ │ │ -
1901 -> decltype(_M_h._M_equal_range_tr(__x))
│ │ │ -
1902 { return _M_h._M_equal_range_tr(__x); }
│ │ │ -
│ │ │ -
1903#endif
│ │ │ -
1904 ///@}
│ │ │ -
1905
│ │ │ -
1906 // bucket interface.
│ │ │ -
1907
│ │ │ -
1908 /// Returns the number of buckets of the %unordered_multimap.
│ │ │ -
1909 size_type
│ │ │ -
│ │ │ -
1910 bucket_count() const noexcept
│ │ │ -
1911 { return _M_h.bucket_count(); }
│ │ │ -
│ │ │ -
1912
│ │ │ -
1913 /// Returns the maximum number of buckets of the %unordered_multimap.
│ │ │ -
1914 size_type
│ │ │ -
│ │ │ -
1915 max_bucket_count() const noexcept
│ │ │ -
1916 { return _M_h.max_bucket_count(); }
│ │ │ -
│ │ │ -
1917
│ │ │ -
1918 /*
│ │ │ -
1919 * @brief Returns the number of elements in a given bucket.
│ │ │ -
1920 * @param __n A bucket index.
│ │ │ -
1921 * @return The number of elements in the bucket.
│ │ │ -
1922 */
│ │ │ -
1923 size_type
│ │ │ -
1924 bucket_size(size_type __n) const
│ │ │ -
1925 { return _M_h.bucket_size(__n); }
│ │ │ -
1926
│ │ │ -
1927 /*
│ │ │ -
1928 * @brief Returns the bucket index of a given element.
│ │ │ -
1929 * @param __key A key instance.
│ │ │ -
1930 * @return The key bucket index.
│ │ │ -
1931 */
│ │ │ -
1932 size_type
│ │ │ -
1933 bucket(const key_type& __key) const
│ │ │ -
1934 { return _M_h.bucket(__key); }
│ │ │ -
1935
│ │ │ -
1936 /**
│ │ │ -
1937 * @brief Returns a read/write iterator pointing to the first bucket
│ │ │ -
1938 * element.
│ │ │ -
1939 * @param __n The bucket index.
│ │ │ -
1940 * @return A read/write local iterator.
│ │ │ -
1941 */
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
1944 { return _M_h.begin(__n); }
│ │ │ -
│ │ │ -
1945
│ │ │ -
1946 ///@{
│ │ │ -
1947 /**
│ │ │ -
1948 * @brief Returns a read-only (constant) iterator pointing to the first
│ │ │ -
1949 * bucket element.
│ │ │ -
1950 * @param __n The bucket index.
│ │ │ -
1951 * @return A read-only local iterator.
│ │ │ -
1952 */
│ │ │ - │ │ │ -
│ │ │ -
1954 begin(size_type __n) const
│ │ │ -
1955 { return _M_h.begin(__n); }
│ │ │ -
│ │ │ -
1956
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
1959 { return _M_h.cbegin(__n); }
│ │ │ -
│ │ │ -
1960 ///@}
│ │ │ -
1961
│ │ │ -
1962 /**
│ │ │ -
1963 * @brief Returns a read/write iterator pointing to one past the last
│ │ │ -
1964 * bucket elements.
│ │ │ -
1965 * @param __n The bucket index.
│ │ │ -
1966 * @return A read/write local iterator.
│ │ │ -
1967 */
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
1970 { return _M_h.end(__n); }
│ │ │ -
│ │ │ -
1971
│ │ │ -
1972 ///@{
│ │ │ -
1973 /**
│ │ │ -
1974 * @brief Returns a read-only (constant) iterator pointing to one past
│ │ │ -
1975 * the last bucket elements.
│ │ │ -
1976 * @param __n The bucket index.
│ │ │ -
1977 * @return A read-only local iterator.
│ │ │ -
1978 */
│ │ │ - │ │ │ -
│ │ │ -
1980 end(size_type __n) const
│ │ │ -
1981 { return _M_h.end(__n); }
│ │ │ -
│ │ │ -
1982
│ │ │ - │ │ │ -
│ │ │ -
1984 cend(size_type __n) const
│ │ │ -
1985 { return _M_h.cend(__n); }
│ │ │ -
│ │ │ -
1986 ///@}
│ │ │ -
1987
│ │ │ -
1988 // hash policy.
│ │ │ -
1989
│ │ │ -
1990 /// Returns the average number of elements per bucket.
│ │ │ -
1991 float
│ │ │ -
│ │ │ -
1992 load_factor() const noexcept
│ │ │ -
1993 { return _M_h.load_factor(); }
│ │ │ -
│ │ │ -
1994
│ │ │ -
1995 /// Returns a positive number that the %unordered_multimap tries to keep
│ │ │ -
1996 /// the load factor less than or equal to.
│ │ │ -
1997 float
│ │ │ -
│ │ │ -
1998 max_load_factor() const noexcept
│ │ │ -
1999 { return _M_h.max_load_factor(); }
│ │ │ -
│ │ │ -
2000
│ │ │ -
2001 /**
│ │ │ -
2002 * @brief Change the %unordered_multimap maximum load factor.
│ │ │ -
2003 * @param __z The new maximum load factor.
│ │ │ -
2004 */
│ │ │ -
2005 void
│ │ │ -
│ │ │ - │ │ │ -
2007 { _M_h.max_load_factor(__z); }
│ │ │ -
│ │ │ -
2008
│ │ │ -
2009 /**
│ │ │ -
2010 * @brief May rehash the %unordered_multimap.
│ │ │ -
2011 * @param __n The new number of buckets.
│ │ │ -
2012 *
│ │ │ -
2013 * Rehash will occur only if the new number of buckets respect the
│ │ │ -
2014 * %unordered_multimap maximum load factor.
│ │ │ -
2015 */
│ │ │ -
2016 void
│ │ │ -
│ │ │ - │ │ │ -
2018 { _M_h.rehash(__n); }
│ │ │ -
│ │ │ -
2019
│ │ │ -
2020 /**
│ │ │ -
2021 * @brief Prepare the %unordered_multimap for a specified number of
│ │ │ -
2022 * elements.
│ │ │ -
2023 * @param __n Number of elements required.
│ │ │ -
2024 *
│ │ │ -
2025 * Same as rehash(ceil(n / max_load_factor())).
│ │ │ -
2026 */
│ │ │ -
2027 void
│ │ │ -
│ │ │ - │ │ │ -
2029 { _M_h.reserve(__n); }
│ │ │ -
│ │ │ -
2030
│ │ │ -
2031 template<typename _Key1, typename _Tp1, typename _Hash1, typename _Pred1,
│ │ │ -
2032 typename _Alloc1>
│ │ │ -
2033 friend bool
│ │ │ -
2034 operator==(const unordered_multimap<_Key1, _Tp1,
│ │ │ -
2035 _Hash1, _Pred1, _Alloc1>&,
│ │ │ - │ │ │ -
2037 _Hash1, _Pred1, _Alloc1>&);
│ │ │ -
2038 };
│ │ │ -
│ │ │ -
2039
│ │ │ -
2040#if __cpp_deduction_guides >= 201606
│ │ │ -
2041
│ │ │ -
2042 template<typename _InputIterator,
│ │ │ -
2043 typename _Hash = hash<__iter_key_t<_InputIterator>>,
│ │ │ -
2044 typename _Pred = equal_to<__iter_key_t<_InputIterator>>,
│ │ │ -
2045 typename _Allocator = allocator<__iter_to_alloc_t<_InputIterator>>,
│ │ │ -
2046 typename = _RequireInputIter<_InputIterator>,
│ │ │ -
2047 typename = _RequireNotAllocatorOrIntegral<_Hash>,
│ │ │ -
2048 typename = _RequireNotAllocator<_Pred>,
│ │ │ -
2049 typename = _RequireAllocator<_Allocator>>
│ │ │ -
2050 unordered_multimap(_InputIterator, _InputIterator,
│ │ │ - │ │ │ -
2052 _Hash = _Hash(), _Pred = _Pred(),
│ │ │ -
2053 _Allocator = _Allocator())
│ │ │ -
2054 -> unordered_multimap<__iter_key_t<_InputIterator>,
│ │ │ -
2055 __iter_val_t<_InputIterator>, _Hash, _Pred,
│ │ │ -
2056 _Allocator>;
│ │ │ -
2057
│ │ │ -
2058 template<typename _Key, typename _Tp, typename _Hash = hash<_Key>,
│ │ │ -
2059 typename _Pred = equal_to<_Key>,
│ │ │ -
2060 typename _Allocator = allocator<pair<const _Key, _Tp>>,
│ │ │ -
2061 typename = _RequireNotAllocatorOrIntegral<_Hash>,
│ │ │ -
2062 typename = _RequireNotAllocator<_Pred>,
│ │ │ -
2063 typename = _RequireAllocator<_Allocator>>
│ │ │ -
2064 unordered_multimap(initializer_list<pair<_Key, _Tp>>,
│ │ │ - │ │ │ -
2066 _Hash = _Hash(), _Pred = _Pred(),
│ │ │ -
2067 _Allocator = _Allocator())
│ │ │ -
2068 -> unordered_multimap<_Key, _Tp, _Hash, _Pred, _Allocator>;
│ │ │ -
2069
│ │ │ -
2070 template<typename _InputIterator, typename _Allocator,
│ │ │ -
2071 typename = _RequireInputIter<_InputIterator>,
│ │ │ -
2072 typename = _RequireAllocator<_Allocator>>
│ │ │ -
2073 unordered_multimap(_InputIterator, _InputIterator,
│ │ │ - │ │ │ -
2075 -> unordered_multimap<__iter_key_t<_InputIterator>,
│ │ │ -
2076 __iter_val_t<_InputIterator>,
│ │ │ -
2077 hash<__iter_key_t<_InputIterator>>,
│ │ │ -
2078 equal_to<__iter_key_t<_InputIterator>>, _Allocator>;
│ │ │ -
2079
│ │ │ -
2080 template<typename _InputIterator, typename _Allocator,
│ │ │ -
2081 typename = _RequireInputIter<_InputIterator>,
│ │ │ -
2082 typename = _RequireAllocator<_Allocator>>
│ │ │ -
2083 unordered_multimap(_InputIterator, _InputIterator, _Allocator)
│ │ │ -
2084 -> unordered_multimap<__iter_key_t<_InputIterator>,
│ │ │ -
2085 __iter_val_t<_InputIterator>,
│ │ │ -
2086 hash<__iter_key_t<_InputIterator>>,
│ │ │ -
2087 equal_to<__iter_key_t<_InputIterator>>, _Allocator>;
│ │ │ -
2088
│ │ │ -
2089 template<typename _InputIterator, typename _Hash, typename _Allocator,
│ │ │ -
2090 typename = _RequireInputIter<_InputIterator>,
│ │ │ -
2091 typename = _RequireNotAllocatorOrIntegral<_Hash>,
│ │ │ -
2092 typename = _RequireAllocator<_Allocator>>
│ │ │ -
2093 unordered_multimap(_InputIterator, _InputIterator,
│ │ │ - │ │ │ -
2095 _Allocator)
│ │ │ -
2096 -> unordered_multimap<__iter_key_t<_InputIterator>,
│ │ │ -
2097 __iter_val_t<_InputIterator>, _Hash,
│ │ │ -
2098 equal_to<__iter_key_t<_InputIterator>>, _Allocator>;
│ │ │ -
2099
│ │ │ -
2100 template<typename _Key, typename _Tp, typename _Allocator,
│ │ │ -
2101 typename = _RequireAllocator<_Allocator>>
│ │ │ -
2102 unordered_multimap(initializer_list<pair<_Key, _Tp>>,
│ │ │ - │ │ │ -
2104 _Allocator)
│ │ │ -
2105 -> unordered_multimap<_Key, _Tp, hash<_Key>, equal_to<_Key>, _Allocator>;
│ │ │ -
2106
│ │ │ -
2107 template<typename _Key, typename _Tp, typename _Allocator,
│ │ │ -
2108 typename = _RequireAllocator<_Allocator>>
│ │ │ -
2109 unordered_multimap(initializer_list<pair<_Key, _Tp>>, _Allocator)
│ │ │ -
2110 -> unordered_multimap<_Key, _Tp, hash<_Key>, equal_to<_Key>, _Allocator>;
│ │ │ -
2111
│ │ │ -
2112 template<typename _Key, typename _Tp, typename _Hash, typename _Allocator,
│ │ │ -
2113 typename = _RequireNotAllocatorOrIntegral<_Hash>,
│ │ │ -
2114 typename = _RequireAllocator<_Allocator>>
│ │ │ -
2115 unordered_multimap(initializer_list<pair<_Key, _Tp>>,
│ │ │ - │ │ │ -
2117 _Hash, _Allocator)
│ │ │ -
2118 -> unordered_multimap<_Key, _Tp, _Hash, equal_to<_Key>, _Allocator>;
│ │ │ -
2119
│ │ │ -
2120#endif
│ │ │ -
2121
│ │ │ -
2122 template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
│ │ │ -
2123 inline void
│ │ │ -
2124 swap(unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
│ │ │ -
2125 unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
│ │ │ -
2126 noexcept(noexcept(__x.swap(__y)))
│ │ │ -
2127 { __x.swap(__y); }
│ │ │ -
2128
│ │ │ -
2129 template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
│ │ │ -
2130 inline void
│ │ │ -
2131 swap(unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
│ │ │ -
2132 unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
│ │ │ -
2133 noexcept(noexcept(__x.swap(__y)))
│ │ │ -
2134 { __x.swap(__y); }
│ │ │ -
2135
│ │ │ -
2136 template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
│ │ │ -
2137 inline bool
│ │ │ -
2138 operator==(const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
│ │ │ -
2139 const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
│ │ │ -
2140 { return __x._M_h._M_equal(__y._M_h); }
│ │ │ -
2141
│ │ │ -
2142#if __cpp_impl_three_way_comparison < 201907L
│ │ │ -
2143 template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
│ │ │ -
2144 inline bool
│ │ │ -
2145 operator!=(const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
│ │ │ -
2146 const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
│ │ │ -
2147 { return !(__x == __y); }
│ │ │ -
2148#endif
│ │ │ -
2149
│ │ │ -
2150 template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
│ │ │ -
2151 inline bool
│ │ │ -
2152 operator==(const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
│ │ │ -
2153 const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
│ │ │ -
2154 { return __x._M_h._M_equal(__y._M_h); }
│ │ │ -
2155
│ │ │ -
2156#if __cpp_impl_three_way_comparison < 201907L
│ │ │ -
2157 template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
│ │ │ -
2158 inline bool
│ │ │ -
2159 operator!=(const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
│ │ │ -
2160 const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
│ │ │ -
2161 { return !(__x == __y); }
│ │ │ -
2162#endif
│ │ │ -
2163
│ │ │ -
2164_GLIBCXX_END_NAMESPACE_CONTAINER
│ │ │ -
2165
│ │ │ -
2166#if __cplusplus > 201402L
│ │ │ -
2167 // Allow std::unordered_map access to internals of compatible maps.
│ │ │ -
2168 template<typename _Key, typename _Val, typename _Hash1, typename _Eq1,
│ │ │ -
2169 typename _Alloc, typename _Hash2, typename _Eq2>
│ │ │ -
2170 struct _Hash_merge_helper<
│ │ │ -
2171 _GLIBCXX_STD_C::unordered_map<_Key, _Val, _Hash1, _Eq1, _Alloc>,
│ │ │ -
2172 _Hash2, _Eq2>
│ │ │ -
2173 {
│ │ │ -
2174 private:
│ │ │ -
2175 template<typename... _Tp>
│ │ │ -
2176 using unordered_map = _GLIBCXX_STD_C::unordered_map<_Tp...>;
│ │ │ -
2177 template<typename... _Tp>
│ │ │ -
2178 using unordered_multimap = _GLIBCXX_STD_C::unordered_multimap<_Tp...>;
│ │ │ -
2179
│ │ │ -
2180 friend unordered_map<_Key, _Val, _Hash1, _Eq1, _Alloc>;
│ │ │ -
2181
│ │ │ -
2182 static auto&
│ │ │ -
2183 _S_get_table(unordered_map<_Key, _Val, _Hash2, _Eq2, _Alloc>& __map)
│ │ │ -
2184 { return __map._M_h; }
│ │ │ -
2185
│ │ │ -
2186 static auto&
│ │ │ -
2187 _S_get_table(unordered_multimap<_Key, _Val, _Hash2, _Eq2, _Alloc>& __map)
│ │ │ -
2188 { return __map._M_h; }
│ │ │ -
2189 };
│ │ │ -
2190
│ │ │ -
2191 // Allow std::unordered_multimap access to internals of compatible maps.
│ │ │ -
2192 template<typename _Key, typename _Val, typename _Hash1, typename _Eq1,
│ │ │ -
2193 typename _Alloc, typename _Hash2, typename _Eq2>
│ │ │ -
2194 struct _Hash_merge_helper<
│ │ │ -
2195 _GLIBCXX_STD_C::unordered_multimap<_Key, _Val, _Hash1, _Eq1, _Alloc>,
│ │ │ -
2196 _Hash2, _Eq2>
│ │ │ -
2197 {
│ │ │ -
2198 private:
│ │ │ -
2199 template<typename... _Tp>
│ │ │ -
2200 using unordered_map = _GLIBCXX_STD_C::unordered_map<_Tp...>;
│ │ │ -
2201 template<typename... _Tp>
│ │ │ -
2202 using unordered_multimap = _GLIBCXX_STD_C::unordered_multimap<_Tp...>;
│ │ │ -
2203
│ │ │ -
2204 friend unordered_multimap<_Key, _Val, _Hash1, _Eq1, _Alloc>;
│ │ │ -
2205
│ │ │ -
2206 static auto&
│ │ │ -
2207 _S_get_table(unordered_map<_Key, _Val, _Hash2, _Eq2, _Alloc>& __map)
│ │ │ -
2208 { return __map._M_h; }
│ │ │ -
2209
│ │ │ -
2210 static auto&
│ │ │ -
2211 _S_get_table(unordered_multimap<_Key, _Val, _Hash2, _Eq2, _Alloc>& __map)
│ │ │ -
2212 { return __map._M_h; }
│ │ │ -
2213 };
│ │ │ -
2214#endif // C++17
│ │ │ -
2215
│ │ │ -
2216_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ -
2217} // namespace std
│ │ │ -
2218
│ │ │ -
2219#endif /* _UNORDERED_MAP_H */
│ │ │ -
constexpr std::remove_reference< _Tp >::type && move(_Tp &&__t) noexcept
Convert a value to an rvalue.
Definition move.h:104
│ │ │ -
void swap(any &__x, any &__y) noexcept
Exchange the states of two any objects.
Definition any:429
│ │ │ + │ │ │ +
254 { _M_device.unlock(); }
│ │ │ +
255
│ │ │ +
256 lock_guard(const lock_guard&) = delete;
│ │ │ +
257 lock_guard& operator=(const lock_guard&) = delete;
│ │ │ +
258
│ │ │ +
259 private:
│ │ │ +
260 mutex_type& _M_device;
│ │ │ +
261 };
│ │ │ +
│ │ │ +
262
│ │ │ +
263 /// @} group mutexes
│ │ │ +
264_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ +
265} // namespace
│ │ │ +
266#endif // C++11
│ │ │ +
267#endif // _GLIBCXX_MUTEX_H
│ │ │ + │ │ │ + │ │ │ + │ │ │ +
constexpr try_to_lock_t try_to_lock
Tag used to prevent a scoped lock from blocking if a mutex is locked.
Definition std_mutex.h:228
│ │ │ +
constexpr adopt_lock_t adopt_lock
Tag used to make a scoped lock take ownership of a locked mutex.
Definition std_mutex.h:231
│ │ │ +
constexpr defer_lock_t defer_lock
Tag used to prevent a scoped lock from acquiring ownership of a mutex.
Definition std_mutex.h:225
│ │ │
ISO C++ entities toplevel namespace is std.
│ │ │ -
__detail::_Hashtable_traits< _Cache, false, false > __ummap_traits
Base types for unordered_multimap.
│ │ │ -
__detail::_Hashtable_traits< _Cache, false, true > __umap_traits
Base types for unordered_map.
│ │ │ -
Common iterator class.
│ │ │ -
A standard container composed of equivalent keys (possibly containing multiple of each key value) tha...
│ │ │ -
float load_factor() const noexcept
Returns the average number of elements per bucket.
│ │ │ -
_Hashtable::reference reference
Iterator-related typedefs.
│ │ │ -
iterator erase(iterator __position)
Erases an element from an unordered_multimap.
│ │ │ -
const_iterator end() const noexcept
│ │ │ -
size_type erase(const key_type &__x)
Erases elements according to the provided key.
│ │ │ -
std::pair< iterator, iterator > equal_range(const key_type &__x)
Finds a subsequence matching given key.
│ │ │ -
size_type bucket_count() const noexcept
Returns the number of buckets of the unordered_multimap.
│ │ │ -
_Hashtable::iterator iterator
Iterator-related typedefs.
│ │ │ -
size_type max_bucket_count() const noexcept
Returns the maximum number of buckets of the unordered_multimap.
│ │ │ -
iterator begin() noexcept
│ │ │ -
const_iterator begin() const noexcept
│ │ │ -
hasher hash_function() const
Returns the hash functor object with which the unordered_multimap was constructed.
│ │ │ -
iterator insert(const_iterator __hint, node_type &&__nh)
Re-insert an extracted node.
│ │ │ -
__enable_if_t< is_constructible< value_type, _Pair && >::value, iterator > insert(const_iterator __hint, _Pair &&__x)
Inserts a std::pair into the unordered_multimap.
│ │ │ -
unordered_multimap & operator=(const unordered_multimap &)=default
Copy assignment operator.
│ │ │ -
key_equal key_eq() const
Returns the key comparison object with which the unordered_multimap was constructed.
│ │ │ -
size_type count(const key_type &__x) const
Finds the number of elements.
│ │ │ -
const_iterator find(const key_type &__x) const
Tries to locate an element in an unordered_multimap.
│ │ │ -
_Hashtable::mapped_type mapped_type
Public typedefs.
│ │ │ -
auto find(const _Kt &__x) -> decltype(_M_h._M_find_tr(__x))
Tries to locate an element in an unordered_multimap.
│ │ │ -
local_iterator end(size_type __n)
Returns a read/write iterator pointing to one past the last bucket elements.
│ │ │ -
void insert(_InputIterator __first, _InputIterator __last)
A template function that attempts to insert a range of elements.
│ │ │ -
unordered_multimap & operator=(initializer_list< value_type > __l)
Unordered_multimap list assignment operator.
│ │ │ -
unordered_multimap(size_type __n, const hasher &__hf=hasher(), const key_equal &__eql=key_equal(), const allocator_type &__a=allocator_type())
Default constructor creates no elements.
│ │ │ -
_Hashtable::value_type value_type
Public typedefs.
│ │ │ -
iterator emplace(_Args &&... __args)
Attempts to build and insert a std::pair into the unordered_multimap.
│ │ │ -
node_type extract(const key_type &__key)
Extract a node.
│ │ │ -
bool contains(const key_type &__x) const
Finds whether an element with the given key exists.
│ │ │ -
_Hashtable::const_reference const_reference
Iterator-related typedefs.
│ │ │ -
iterator insert(node_type &&__nh)
Re-insert an extracted node.
│ │ │ -
iterator erase(const_iterator __position)
Erases an element from an unordered_multimap.
│ │ │ -
iterator end() noexcept
│ │ │ -
local_iterator begin(size_type __n)
Returns a read/write iterator pointing to the first bucket element.
│ │ │ -
float max_load_factor() const noexcept
Returns a positive number that the unordered_multimap tries to keep the load factor less than or equa...
│ │ │ -
unordered_multimap()=default
Default constructor.
│ │ │ -
iterator insert(value_type &&__x)
Inserts a std::pair into the unordered_multimap.
│ │ │ -
iterator insert(const value_type &__x)
Inserts a std::pair into the unordered_multimap.
│ │ │ -
unordered_multimap & operator=(unordered_multimap &&)=default
Move assignment operator.
│ │ │ -
_Hashtable::hasher hasher
Public typedefs.
│ │ │ -
_Hashtable::local_iterator local_iterator
Iterator-related typedefs.
│ │ │ -
void reserve(size_type __n)
Prepare the unordered_multimap for a specified number of elements.
│ │ │ -
std::pair< const_iterator, const_iterator > equal_range(const key_type &__x) const
Finds a subsequence matching given key.
│ │ │ -
unordered_multimap(_InputIterator __first, _InputIterator __last, size_type __n=0, const hasher &__hf=hasher(), const key_equal &__eql=key_equal(), const allocator_type &__a=allocator_type())
Builds an unordered_multimap from a range.
│ │ │ - │ │ │ -
iterator find(const key_type &__x)
Tries to locate an element in an unordered_multimap.
│ │ │ -
unordered_multimap(initializer_list< value_type > __l, size_type __n=0, const hasher &__hf=hasher(), const key_equal &__eql=key_equal(), const allocator_type &__a=allocator_type())
Builds an unordered_multimap from an initializer_list.
│ │ │ -
auto count(const _Kt &__x) const -> decltype(_M_h._M_count_tr(__x))
Finds the number of elements.
│ │ │ -
iterator erase(const_iterator __first, const_iterator __last)
Erases a [__first,__last) range of elements from an unordered_multimap.
│ │ │ -
const_local_iterator end(size_type __n) const
Returns a read-only (constant) iterator pointing to one past the last bucket elements.
│ │ │ -
_Hashtable::pointer pointer
Iterator-related typedefs.
│ │ │ -
_Hashtable::allocator_type allocator_type
Public typedefs.
│ │ │ -
const_local_iterator begin(size_type __n) const
Returns a read-only (constant) iterator pointing to the first bucket element.
│ │ │ -
auto find(const _Kt &__x) const -> decltype(_M_h._M_find_tr(__x))
Tries to locate an element in an unordered_multimap.
│ │ │ -
_Hashtable::const_local_iterator const_local_iterator
Iterator-related typedefs.
│ │ │ -
unordered_multimap(unordered_multimap &&)=default
Move constructor.
│ │ │ -
unordered_multimap(const allocator_type &__a)
Creates an unordered_multimap with no elements.
│ │ │ -
_Hashtable::difference_type difference_type
Iterator-related typedefs.
│ │ │ -
_Hashtable::size_type size_type
Iterator-related typedefs.
│ │ │ -
_Hashtable::const_pointer const_pointer
Iterator-related typedefs.
│ │ │ -
__enable_if_t< is_constructible< value_type, _Pair && >::value, iterator > insert(_Pair &&__x)
Inserts a std::pair into the unordered_multimap.
│ │ │ -
auto contains(const _Kt &__x) const -> decltype(_M_h._M_find_tr(__x), void(), true)
Finds whether an element with the given key exists.
│ │ │ -
void swap(unordered_multimap &__x) noexcept(noexcept(_M_h.swap(__x._M_h)))
Swaps data with another unordered_multimap.
│ │ │ -
void rehash(size_type __n)
May rehash the unordered_multimap.
│ │ │ -
_Hashtable::const_iterator const_iterator
Iterator-related typedefs.
│ │ │ -
void insert(initializer_list< value_type > __l)
Attempts to insert a list of elements into the unordered_multimap.
│ │ │ -
const_iterator cend() const noexcept
│ │ │ -
size_type max_size() const noexcept
Returns the maximum size of the unordered_multimap.
│ │ │ -
const_local_iterator cbegin(size_type __n) const
Returns a read-only (constant) iterator pointing to the first bucket element.
│ │ │ -
bool empty() const noexcept
Returns true if the unordered_multimap is empty.
│ │ │ -
const_iterator cbegin() const noexcept
│ │ │ -
_Hashtable::key_type key_type
Public typedefs.
│ │ │ -
node_type extract(const_iterator __pos)
Extract a node.
│ │ │ -
const_local_iterator cend(size_type __n) const
Returns a read-only (constant) iterator pointing to one past the last bucket elements.
│ │ │ -
iterator insert(const_iterator __hint, const value_type &__x)
Inserts a std::pair into the unordered_multimap.
│ │ │ -
size_type size() const noexcept
Returns the size of the unordered_multimap.
│ │ │ -
unordered_multimap(const unordered_multimap &)=default
Copy constructor.
│ │ │ -
iterator emplace_hint(const_iterator __pos, _Args &&... __args)
Attempts to build and insert a std::pair into the unordered_multimap.
│ │ │ -
iterator insert(const_iterator __hint, value_type &&__x)
Inserts a std::pair into the unordered_multimap.
│ │ │ -
auto equal_range(const _Kt &__x) -> decltype(_M_h._M_equal_range_tr(__x))
Finds a subsequence matching given key.
│ │ │ -
_Hashtable::key_equal key_equal
Public typedefs.
│ │ │ -
allocator_type get_allocator() const noexcept
Returns the allocator object used by the unordered_multimap.
│ │ │ -
void max_load_factor(float __z)
Change the unordered_multimap maximum load factor.
│ │ │ -
auto equal_range(const _Kt &__x) const -> decltype(_M_h._M_equal_range_tr(__x))
Finds a subsequence matching given key.
│ │ │ -
A standard container composed of unique keys (containing at most one of each key value) that associat...
│ │ │ -
iterator insert(const_iterator __hint, value_type &&__x)
Attempts to insert a std::pair into the unordered_map.
│ │ │ -
_Hashtable::iterator iterator
Iterator-related typedefs.
│ │ │ -
void max_load_factor(float __z)
Change the unordered_map maximum load factor.
│ │ │ -
const mapped_type & at(const key_type &__k) const
Access to unordered_map data.
│ │ │ -
bool contains(const key_type &__x) const
Finds whether an element with the given key exists.
│ │ │ -
node_type extract(const key_type &__key)
Extract a node.
│ │ │ -
void insert(_InputIterator __first, _InputIterator __last)
A template function that attempts to insert a range of elements.
│ │ │ -
allocator_type get_allocator() const noexcept
Returns the allocator object used by the unordered_map.
│ │ │ -
auto find(const _Kt &__x) -> decltype(_M_h._M_find_tr(__x))
Tries to locate an element in an unordered_map.
│ │ │ -
unordered_map & operator=(initializer_list< value_type > __l)
Unordered_map list assignment operator.
│ │ │ -
_Hashtable::const_pointer const_pointer
Iterator-related typedefs.
│ │ │ -
auto find(const _Kt &__x) const -> decltype(_M_h._M_find_tr(__x))
Tries to locate an element in an unordered_map.
│ │ │ -
void insert(initializer_list< value_type > __l)
Attempts to insert a list of elements into the unordered_map.
│ │ │ -
__enable_if_t< is_constructible< value_type, _Pair && >::value, iterator > insert(const_iterator __hint, _Pair &&__x)
Attempts to insert a std::pair into the unordered_map.
│ │ │ -
std::pair< iterator, iterator > equal_range(const key_type &__x)
Finds a subsequence matching given key.
│ │ │ -
mapped_type & at(const key_type &__k)
Access to unordered_map data.
│ │ │ -
iterator erase(const_iterator __first, const_iterator __last)
Erases a [__first,__last) range of elements from an unordered_map.
│ │ │ -
iterator try_emplace(const_iterator __hint, const key_type &__k, _Args &&... __args)
Attempts to build and insert a std::pair into the unordered_map.
│ │ │ -
node_type extract(const_iterator __pos)
Extract a node.
│ │ │ -
std::pair< iterator, bool > insert(const value_type &__x)
Attempts to insert a std::pair into the unordered_map.
│ │ │ -
void reserve(size_type __n)
Prepare the unordered_map for a specified number of elements.
│ │ │ -
const_local_iterator cbegin(size_type __n) const
Returns a read-only (constant) iterator pointing to the first bucket element.
│ │ │ -
std::pair< const_iterator, const_iterator > equal_range(const key_type &__x) const
Finds a subsequence matching given key.
│ │ │ -
iterator insert(const_iterator, node_type &&__nh)
Re-insert an extracted node.
│ │ │ -
_Hashtable::reference reference
Iterator-related typedefs.
│ │ │ -
iterator insert(const_iterator __hint, const value_type &__x)
Attempts to insert a std::pair into the unordered_map.
│ │ │ -
iterator end() noexcept
│ │ │ -
_Hashtable::allocator_type allocator_type
Public typedefs.
│ │ │ -
unordered_map(const unordered_map &)=default
Copy constructor.
│ │ │ -
size_type count(const key_type &__x) const
Finds the number of elements.
│ │ │ -
bool empty() const noexcept
Returns true if the unordered_map is empty.
│ │ │ -
size_type erase(const key_type &__x)
Erases elements according to the provided key.
│ │ │ -
const_iterator find(const key_type &__x) const
Tries to locate an element in an unordered_map.
│ │ │ -
unordered_map(unordered_map &&)=default
Move constructor.
│ │ │ -
const_local_iterator end(size_type __n) const
Returns a read-only (constant) iterator pointing to one past the last bucket elements.
│ │ │ -
auto equal_range(const _Kt &__x) -> decltype(_M_h._M_equal_range_tr(__x))
Finds a subsequence matching given key.
│ │ │ -
auto contains(const _Kt &__x) const -> decltype(_M_h._M_find_tr(__x), void(), true)
Finds whether an element with the given key exists.
│ │ │ -
size_type max_size() const noexcept
Returns the maximum size of the unordered_map.
│ │ │ -
const_iterator end() const noexcept
│ │ │ -
unordered_map()=default
Default constructor.
│ │ │ -
_Hashtable::mapped_type mapped_type
Public typedefs.
│ │ │ -
unordered_map & operator=(unordered_map &&)=default
Move assignment operator.
│ │ │ -
const_local_iterator begin(size_type __n) const
Returns a read-only (constant) iterator pointing to the first bucket element.
│ │ │ -
unordered_map(size_type __n, const hasher &__hf=hasher(), const key_equal &__eql=key_equal(), const allocator_type &__a=allocator_type())
Default constructor creates no elements.
│ │ │ -
std::pair< iterator, bool > emplace(_Args &&... __args)
Attempts to build and insert a std::pair into the unordered_map.
│ │ │ -
const_local_iterator cend(size_type __n) const
Returns a read-only (constant) iterator pointing to one past the last bucket elements.
│ │ │ -
size_type size() const noexcept
Returns the size of the unordered_map.
│ │ │ -
__enable_if_t< is_constructible< value_type, _Pair && >::value, pair< iterator, bool > > insert(_Pair &&__x)
Attempts to insert a std::pair into the unordered_map.
│ │ │ -
mapped_type & operator[](key_type &&__k)
Subscript ( [] ) access to unordered_map data.
│ │ │ -
std::pair< iterator, bool > insert(value_type &&__x)
Attempts to insert a std::pair into the unordered_map.
│ │ │ -
_Hashtable::hasher hasher
Public typedefs.
│ │ │ -
pair< iterator, bool > insert_or_assign(const key_type &__k, _Obj &&__obj)
Attempts to insert a std::pair into the unordered_map.
│ │ │ -
unordered_map(_InputIterator __first, _InputIterator __last, size_type __n=0, const hasher &__hf=hasher(), const key_equal &__eql=key_equal(), const allocator_type &__a=allocator_type())
Builds an unordered_map from a range.
│ │ │ -
void clear() noexcept
│ │ │ -
mapped_type & operator[](const key_type &__k)
Subscript ( [] ) access to unordered_map data.
│ │ │ -
pair< iterator, bool > try_emplace(const key_type &__k, _Args &&... __args)
Attempts to build and insert a std::pair into the unordered_map.
│ │ │ -
const_iterator begin() const noexcept
│ │ │ -
key_equal key_eq() const
Returns the key comparison object with which the unordered_map was constructed.
│ │ │ -
_Hashtable::const_reference const_reference
Iterator-related typedefs.
│ │ │ -
_Hashtable::key_equal key_equal
Public typedefs.
│ │ │ -
_Hashtable::local_iterator local_iterator
Iterator-related typedefs.
│ │ │ -
iterator erase(iterator __position)
Erases an element from an unordered_map.
│ │ │ -
const_iterator cend() const noexcept
│ │ │ -
local_iterator end(size_type __n)
Returns a read/write iterator pointing to one past the last bucket elements.
│ │ │ -
_Hashtable::pointer pointer
Iterator-related typedefs.
│ │ │ -
iterator insert_or_assign(const_iterator __hint, const key_type &__k, _Obj &&__obj)
Attempts to insert a std::pair into the unordered_map.
│ │ │ -
unordered_map(const allocator_type &__a)
Creates an unordered_map with no elements.
│ │ │ -
_Hashtable::key_type key_type
Public typedefs.
│ │ │ -
size_type bucket_count() const noexcept
Returns the number of buckets of the unordered_map.
│ │ │ -
iterator begin() noexcept
│ │ │ -
hasher hash_function() const
Returns the hash functor object with which the unordered_map was constructed.
│ │ │ -
auto equal_range(const _Kt &__x) const -> decltype(_M_h._M_equal_range_tr(__x))
Finds a subsequence matching given key.
│ │ │ -
unordered_map(initializer_list< value_type > __l, size_type __n=0, const hasher &__hf=hasher(), const key_equal &__eql=key_equal(), const allocator_type &__a=allocator_type())
Builds an unordered_map from an initializer_list.
│ │ │ -
_Hashtable::const_iterator const_iterator
Iterator-related typedefs.
│ │ │ -
_Hashtable::size_type size_type
Iterator-related typedefs.
│ │ │ -
iterator find(const key_type &__x)
Tries to locate an element in an unordered_map.
│ │ │ -
float load_factor() const noexcept
Returns the average number of elements per bucket.
│ │ │ -
iterator erase(const_iterator __position)
Erases an element from an unordered_map.
│ │ │ -
void swap(unordered_map &__x) noexcept(noexcept(_M_h.swap(__x._M_h)))
Swaps data with another unordered_map.
│ │ │ -
local_iterator begin(size_type __n)
Returns a read/write iterator pointing to the first bucket element.
│ │ │ -
float max_load_factor() const noexcept
Returns a positive number that the unordered_map tries to keep the load factor less than or equal to.
│ │ │ -
unordered_map & operator=(const unordered_map &)=default
Copy assignment operator.
│ │ │ -
_Hashtable::difference_type difference_type
Iterator-related typedefs.
│ │ │ -
auto count(const _Kt &__x) const -> decltype(_M_h._M_count_tr(__x))
Finds the number of elements.
│ │ │ -
_Hashtable::const_local_iterator const_local_iterator
Iterator-related typedefs.
│ │ │ -
size_type max_bucket_count() const noexcept
Returns the maximum number of buckets of the unordered_map.
│ │ │ -
iterator emplace_hint(const_iterator __pos, _Args &&... __args)
Attempts to build and insert a std::pair into the unordered_map.
│ │ │ -
insert_return_type insert(node_type &&__nh)
Re-insert an extracted node.
│ │ │ -
_Hashtable::value_type value_type
Public typedefs.
│ │ │ -
void rehash(size_type __n)
May rehash the unordered_map.
│ │ │ -
const_iterator cbegin() const noexcept
│ │ │ - │ │ │ + │ │ │ +
Do not acquire ownership of the mutex.
Definition std_mutex.h:215
│ │ │ +
Try to acquire ownership of the mutex without blocking.
Definition std_mutex.h:218
│ │ │ +
Assume the calling thread has already obtained mutex ownership and manage it.
Definition std_mutex.h:222
│ │ │ +
A simple scoped lock type.
Definition std_mutex.h:243
│ │ │ + │ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,13 +1,13 @@ │ │ │ │ libstdc++ │ │ │ │ -unordered_map.h │ │ │ │ +std_mutex.h │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -1// unordered_map implementation -*- C++ -*- │ │ │ │ +1// std::mutex implementation -*- C++ -*- │ │ │ │ 2 │ │ │ │ -3// Copyright (C) 2010-2022 Free Software Foundation, Inc. │ │ │ │ +3// Copyright (C) 2003-2022 Free Software Foundation, Inc. │ │ │ │ 4// │ │ │ │ 5// This file is part of the GNU ISO C++ Library. This library is free │ │ │ │ 6// software; you can redistribute it and/or modify it under the │ │ │ │ 7// terms of the GNU General Public License as published by the │ │ │ │ 8// Free Software Foundation; either version 3, or (at your option) │ │ │ │ 9// any later version. │ │ │ │ 10 │ │ │ │ @@ -21,2942 +21,286 @@ │ │ │ │ 18// 3.1, as published by the Free Software Foundation. │ │ │ │ 19 │ │ │ │ 20// You should have received a copy of the GNU General Public License and │ │ │ │ 21// a copy of the GCC Runtime Library Exception along with this program; │ │ │ │ 22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see │ │ │ │ 23// . │ │ │ │ 24 │ │ │ │ -25/** @file bits/unordered_map.h │ │ │ │ +25/** @file bits/std_mutex.h │ │ │ │ 26 * This is an internal header file, included by other library headers. │ │ │ │ -27 * Do not attempt to use it directly. @headername{unordered_map} │ │ │ │ +27 * Do not attempt to use it directly. @headername{mutex} │ │ │ │ 28 */ │ │ │ │ 29 │ │ │ │ -30#ifndef _UNORDERED_MAP_H │ │ │ │ -31#define _UNORDERED_MAP_H │ │ │ │ +30#ifndef _GLIBCXX_MUTEX_H │ │ │ │ +31#define _GLIBCXX_MUTEX_H 1 │ │ │ │ 32 │ │ │ │ -33namespace _s_t_d _GLIBCXX_VISIBILITY(default) │ │ │ │ -34{ │ │ │ │ -35_GLIBCXX_BEGIN_NAMESPACE_VERSION │ │ │ │ -36_GLIBCXX_BEGIN_NAMESPACE_CONTAINER │ │ │ │ -37 │ │ │ │ -38 /// Base types for unordered_map. │ │ │ │ -39 template │ │ │ │ -_4_0 using _____u_m_a_p___t_r_a_i_t_s = __detail::_Hashtable_traits<_Cache, false, true>; │ │ │ │ -41 │ │ │ │ -42 template, │ │ │ │ -45 typename ___P_r_e_d = _s_t_d_:_:_e_q_u_a_l___t_o_<___K_e_y_>, │ │ │ │ -46 typename _Alloc = _s_t_d_:_:_a_l_l_o_c_a_t_o_r_<_s_t_d_:_:_p_a_i_r_<_c_o_n_s_t_ ___K_e_y_,_ ___T_p_> >, │ │ │ │ -47 typename ___T_r = _____u_m_a_p___t_r_a_i_t_s_<_____c_a_c_h_e___d_e_f_a_u_l_t_<___K_e_y_,_ ___H_a_s_h_>_:_:_v_a_l_u_e>> │ │ │ │ -48 using _____u_m_a_p___h_a_s_h_t_a_b_l_e = ___H_a_s_h_t_a_b_l_e_<___K_e_y_,_ _s_t_d_:_:_p_a_i_r_<_c_o_n_s_t_ ___K_e_y_,_ ___T_p_>, │ │ │ │ -49 _Alloc, __detail::_Select1st, │ │ │ │ -50 ___P_r_e_d, ___H_a_s_h, │ │ │ │ -51 __detail::_Mod_range_hashing, │ │ │ │ -52 __detail::_Default_ranged_hash, │ │ │ │ -53 __detail::_Prime_rehash_policy, ___T_r>; │ │ │ │ +33#pragma GCC system_header │ │ │ │ +34 │ │ │ │ +35#if __cplusplus < 201103L │ │ │ │ +36# include <_b_i_t_s_/_c_+_+_0_x___w_a_r_n_i_n_g_._h> │ │ │ │ +37#else │ │ │ │ +38 │ │ │ │ +39#include <_s_y_s_t_e_m___e_r_r_o_r> │ │ │ │ +40#include <_b_i_t_s_/_f_u_n_c_t_e_x_c_e_p_t_._h> │ │ │ │ +41#include │ │ │ │ +42 │ │ │ │ +43namespace _s_t_d _GLIBCXX_VISIBILITY(default) │ │ │ │ +44{ │ │ │ │ +45_GLIBCXX_BEGIN_NAMESPACE_VERSION │ │ │ │ +46 │ │ │ │ +47 /** │ │ │ │ +48 * @defgroup mutexes Mutexes │ │ │ │ +49 * @ingroup concurrency │ │ │ │ +50 * │ │ │ │ +51 * Classes for mutex support. │ │ │ │ +52 * @{ │ │ │ │ +53 */ │ │ │ │ 54 │ │ │ │ -55 /// Base types for unordered_multimap. │ │ │ │ -56 template │ │ │ │ -_5_7 using _____u_m_m_a_p___t_r_a_i_t_s = __detail::_Hashtable_traits<_Cache, false, false>; │ │ │ │ -58 │ │ │ │ -59 template, │ │ │ │ -62 typename ___P_r_e_d = _s_t_d_:_:_e_q_u_a_l___t_o_<___K_e_y_>, │ │ │ │ -63 typename _Alloc = _s_t_d_:_:_a_l_l_o_c_a_t_o_r_<_s_t_d_:_:_p_a_i_r_<_c_o_n_s_t_ ___K_e_y_,_ ___T_p_> >, │ │ │ │ -64 typename ___T_r = _____u_m_m_a_p___t_r_a_i_t_s_<_____c_a_c_h_e___d_e_f_a_u_l_t_<___K_e_y_,_ ___H_a_s_h_>_:_:_v_a_l_u_e>> │ │ │ │ -65 using _____u_m_m_a_p___h_a_s_h_t_a_b_l_e = ___H_a_s_h_t_a_b_l_e_<___K_e_y_,_ _s_t_d_:_:_p_a_i_r_<_c_o_n_s_t_ ___K_e_y_,_ ___T_p_>, │ │ │ │ -66 _Alloc, __detail::_Select1st, │ │ │ │ -67 ___P_r_e_d, ___H_a_s_h, │ │ │ │ -68 __detail::_Mod_range_hashing, │ │ │ │ -69 __detail::_Default_ranged_hash, │ │ │ │ -70 __detail::_Prime_rehash_policy, ___T_r>; │ │ │ │ -71 │ │ │ │ -72 template │ │ │ │ -73 class _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p; │ │ │ │ -74 │ │ │ │ -75 /** │ │ │ │ -76 * @brief A standard container composed of unique keys (containing │ │ │ │ -77 * at most one of each key value) that associates values of another type │ │ │ │ -78 * with the keys. │ │ │ │ -79 * │ │ │ │ -80 * @ingroup unordered_associative_containers │ │ │ │ -81 * @headerfile unordered_map │ │ │ │ -82 * @since C++11 │ │ │ │ -83 * │ │ │ │ -84 * @tparam _Key Type of key objects. │ │ │ │ -85 * @tparam _Tp Type of mapped objects. │ │ │ │ -86 * @tparam _Hash Hashing function object type, defaults to hash<_Value>. │ │ │ │ -87 * @tparam _Pred Predicate function object type, defaults │ │ │ │ -88 * to equal_to<_Value>. │ │ │ │ -89 * @tparam _Alloc Allocator type, defaults to │ │ │ │ -90 * std::allocator>. │ │ │ │ -91 * │ │ │ │ -92 * Meets the requirements of a container, and │ │ │ │ -93 * unordered associative container │ │ │ │ -94 * │ │ │ │ -95 * The resulting value type of the container is std::pair. │ │ │ │ -96 * │ │ │ │ -97 * Base is _Hashtable, dispatched at compile time via template │ │ │ │ -98 * alias __umap_hashtable. │ │ │ │ -99 */ │ │ │ │ -100 template, │ │ │ │ -102 typename ___P_r_e_d = _e_q_u_a_l___t_o_<___K_e_y_>, │ │ │ │ -103 typename _Alloc = _a_l_l_o_c_a_t_o_r_<_s_t_d_:_:_p_a_i_r_<_c_o_n_s_t_ ___K_e_y_,_ ___T_p_>>> │ │ │ │ -_1_0_4 class _u_n_o_r_d_e_r_e_d___m_a_p │ │ │ │ -105 { │ │ │ │ -106 typedef _____u_m_a_p___h_a_s_h_t_a_b_l_e_<___K_e_y_,_ ___T_p_,_ ___H_a_s_h_,_ ___P_r_e_d_,_ ___A_l_l_o_c_> ___H_a_s_h_t_a_b_l_e; │ │ │ │ -107 ___H_a_s_h_t_a_b_l_e _M_h; │ │ │ │ -108 │ │ │ │ -109 public: │ │ │ │ -110 // typedefs: │ │ │ │ -111 ///@{ │ │ │ │ -112 /// Public typedefs. │ │ │ │ -_1_1_3 typedef typename _Hashtable::key_type _k_e_y___t_y_p_e; │ │ │ │ -_1_1_4 typedef typename _Hashtable::value_type _v_a_l_u_e___t_y_p_e; │ │ │ │ -_1_1_5 typedef typename _Hashtable::mapped_type _m_a_p_p_e_d___t_y_p_e; │ │ │ │ -_1_1_6 typedef typename _Hashtable::hasher _h_a_s_h_e_r; │ │ │ │ -_1_1_7 typedef typename _Hashtable::key_equal _k_e_y___e_q_u_a_l; │ │ │ │ -_1_1_8 typedef typename _Hashtable::allocator_type _a_l_l_o_c_a_t_o_r___t_y_p_e; │ │ │ │ -119 ///@} │ │ │ │ -120 │ │ │ │ -121 ///@{ │ │ │ │ -122 /// Iterator-related typedefs. │ │ │ │ -_1_2_3 typedef typename _Hashtable::pointer _p_o_i_n_t_e_r; │ │ │ │ -_1_2_4 typedef typename _Hashtable::const_pointer _c_o_n_s_t___p_o_i_n_t_e_r; │ │ │ │ -_1_2_5 typedef typename _Hashtable::reference _r_e_f_e_r_e_n_c_e; │ │ │ │ -_1_2_6 typedef typename _Hashtable::const_reference _c_o_n_s_t___r_e_f_e_r_e_n_c_e; │ │ │ │ -_1_2_7 typedef typename _Hashtable::iterator _i_t_e_r_a_t_o_r; │ │ │ │ -_1_2_8 typedef typename _Hashtable::const_iterator _c_o_n_s_t___i_t_e_r_a_t_o_r; │ │ │ │ -_1_2_9 typedef typename _Hashtable::local_iterator _l_o_c_a_l___i_t_e_r_a_t_o_r; │ │ │ │ -_1_3_0 typedef typename _Hashtable::const_local_iterator _c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r; │ │ │ │ -_1_3_1 typedef typename _Hashtable::size_type _s_i_z_e___t_y_p_e; │ │ │ │ -_1_3_2 typedef typename _Hashtable::difference_type _d_i_f_f_e_r_e_n_c_e___t_y_p_e; │ │ │ │ -133 ///@} │ │ │ │ -134 │ │ │ │ -135#if __cplusplus > 201402L │ │ │ │ -136 using node_type = typename _Hashtable::node_type; │ │ │ │ -137 using insert_return_type = typename _Hashtable::insert_return_type; │ │ │ │ -138#endif │ │ │ │ -139 │ │ │ │ -140 //construct/destroy/copy │ │ │ │ -141 │ │ │ │ -142 /// Default constructor. │ │ │ │ -_1_4_3 _u_n_o_r_d_e_r_e_d___m_a_p() = default; │ │ │ │ -144 │ │ │ │ -145 /** │ │ │ │ -146 * @brief Default constructor creates no elements. │ │ │ │ -147 * @param __n Minimal initial number of buckets. │ │ │ │ -148 * @param __hf A hash functor. │ │ │ │ -149 * @param __eql A key equality functor. │ │ │ │ -150 * @param __a An allocator object. │ │ │ │ -151 */ │ │ │ │ -152 explicit │ │ │ │ -_1_5_3 _u_n_o_r_d_e_r_e_d___m_a_p(_s_i_z_e___t_y_p_e __n, │ │ │ │ -154 const _h_a_s_h_e_r& _____h_f = _h_a_s_h_e_r(), │ │ │ │ -155 const _k_e_y___e_q_u_a_l& _____e_q_l = _k_e_y___e_q_u_a_l(), │ │ │ │ -156 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a = _a_l_l_o_c_a_t_o_r___t_y_p_e()) │ │ │ │ -157 : _M_h(__n, _____h_f, _____e_q_l, __a) │ │ │ │ -158 { } │ │ │ │ +55#ifdef _GLIBCXX_HAS_GTHREADS │ │ │ │ +56 /// @cond undocumented │ │ │ │ +57 │ │ │ │ +58 // Common base class for std::mutex and std::timed_mutex │ │ │ │ +59 class __mutex_base │ │ │ │ +60 { │ │ │ │ +61 protected: │ │ │ │ +62 typedef __gthread_mutex_t __native_type; │ │ │ │ +63 │ │ │ │ +64#ifdef __GTHREAD_MUTEX_INIT │ │ │ │ +65 __native_type _M_mutex = __GTHREAD_MUTEX_INIT; │ │ │ │ +66 │ │ │ │ +67 constexpr __mutex_base() noexcept = default; │ │ │ │ +68#else │ │ │ │ +69 __native_type _M_mutex; │ │ │ │ +70 │ │ │ │ +71 __mutex_base() noexcept │ │ │ │ +72 { │ │ │ │ +73 // XXX EAGAIN, ENOMEM, EPERM, EBUSY(may), EINVAL(may) │ │ │ │ +74 __GTHREAD_MUTEX_INIT_FUNCTION(&_M_mutex); │ │ │ │ +75 } │ │ │ │ +76 │ │ │ │ +77 ~__mutex_base() noexcept { __gthread_mutex_destroy(&_M_mutex); } │ │ │ │ +78#endif │ │ │ │ +79 │ │ │ │ +80 __mutex_base(const __mutex_base&) = delete; │ │ │ │ +81 __mutex_base& operator=(const __mutex_base&) = delete; │ │ │ │ +82 }; │ │ │ │ +83 /// @endcond │ │ │ │ +84 │ │ │ │ +85 /** The standard mutex type. │ │ │ │ +86 * │ │ │ │ +87 * A simple, non-recursive, non-timed mutex. │ │ │ │ +88 * │ │ │ │ +89 * Do not call `lock()` and `unlock()` directly, use a scoped lock type │ │ │ │ +90 * such as `std::unique_lock`, `std::lock_guard`, or (since C++17) │ │ │ │ +91 * `std::scoped_lock`. │ │ │ │ +92 * │ │ │ │ +93 * @headerfile mutex │ │ │ │ +94 * @since C++11 │ │ │ │ +95 */ │ │ │ │ +_9_6 class _m_u_t_e_x : private __mutex_base │ │ │ │ +97 { │ │ │ │ +98 public: │ │ │ │ +99 typedef _____n_a_t_i_v_e___t_y_p_e* _n_a_t_i_v_e___h_a_n_d_l_e___t_y_p_e; │ │ │ │ +100 │ │ │ │ +101#ifdef __GTHREAD_MUTEX_INIT │ │ │ │ +102 constexpr │ │ │ │ +103#endif │ │ │ │ +104 _m_u_t_e_x() noexcept = default; │ │ │ │ +105 _~_m_u_t_e_x() = default; │ │ │ │ +106 │ │ │ │ +107 _m_u_t_e_x(const _m_u_t_e_x&) = delete; │ │ │ │ +108 _m_u_t_e_x& operator=(const _m_u_t_e_x&) = delete; │ │ │ │ +109 │ │ │ │ +110 void │ │ │ │ +111 lock() │ │ │ │ +112 { │ │ │ │ +113 int __e = __gthread_mutex_lock(&_M_mutex); │ │ │ │ +114 │ │ │ │ +115 // EINVAL, EAGAIN, EBUSY, EINVAL, EDEADLK(may) │ │ │ │ +116 if (__e) │ │ │ │ +117 __throw_system_error(__e); │ │ │ │ +118 } │ │ │ │ +119 │ │ │ │ +120 bool │ │ │ │ +121 try_lock() noexcept │ │ │ │ +122 { │ │ │ │ +123 // XXX EINVAL, EAGAIN, EBUSY │ │ │ │ +124 return !__gthread_mutex_trylock(&_M_mutex); │ │ │ │ +125 } │ │ │ │ +126 │ │ │ │ +127 void │ │ │ │ +128 unlock() │ │ │ │ +129 { │ │ │ │ +130 // XXX EINVAL, EAGAIN, EPERM │ │ │ │ +131 __gthread_mutex_unlock(&_M_mutex); │ │ │ │ +132 } │ │ │ │ +133 │ │ │ │ +134 _n_a_t_i_v_e___h_a_n_d_l_e___t_y_p_e │ │ │ │ +135 native_handle() noexcept │ │ │ │ +136 { return &_M_mutex; } │ │ │ │ +137 }; │ │ │ │ +138 │ │ │ │ +139 /// @cond undocumented │ │ │ │ +140 │ │ │ │ +141 // Implementation details for std::condition_variable │ │ │ │ +142 class __condvar │ │ │ │ +143 { │ │ │ │ +144 using _t_i_m_e_s_p_e_c = __gthread_time_t; │ │ │ │ +145 │ │ │ │ +146 public: │ │ │ │ +147 __condvar() noexcept │ │ │ │ +148 { │ │ │ │ +149#ifndef __GTHREAD_COND_INIT │ │ │ │ +150 _____G_T_H_R_E_A_D___C_O_N_D___I_N_I_T___F_U_N_C_T_I_O_N(&_M_cond); │ │ │ │ +151#endif │ │ │ │ +152 } │ │ │ │ +153 │ │ │ │ +154 ~__condvar() │ │ │ │ +155 { │ │ │ │ +156 int __e __attribute__((__unused__)) = __gthread_cond_destroy(&_M_cond); │ │ │ │ +157 __glibcxx_assert(__e != EBUSY); // threads are still blocked │ │ │ │ +158 } │ │ │ │ 159 │ │ │ │ -160 /** │ │ │ │ -161 * @brief Builds an %unordered_map from a range. │ │ │ │ -162 * @param __first An input iterator. │ │ │ │ -163 * @param __last An input iterator. │ │ │ │ -164 * @param __n Minimal initial number of buckets. │ │ │ │ -165 * @param __hf A hash functor. │ │ │ │ -166 * @param __eql A key equality functor. │ │ │ │ -167 * @param __a An allocator object. │ │ │ │ -168 * │ │ │ │ -169 * Create an %unordered_map consisting of copies of the elements from │ │ │ │ -170 * [__first,__last). This is linear in N (where N is │ │ │ │ -171 * distance(__first,__last)). │ │ │ │ -172 */ │ │ │ │ -173 template │ │ │ │ -_1_7_4 _u_n_o_r_d_e_r_e_d___m_a_p(___I_n_p_u_t_I_t_e_r_a_t_o_r __first, ___I_n_p_u_t_I_t_e_r_a_t_o_r __last, │ │ │ │ -175 _s_i_z_e___t_y_p_e __n = 0, │ │ │ │ -176 const _h_a_s_h_e_r& _____h_f = _h_a_s_h_e_r(), │ │ │ │ -177 const _k_e_y___e_q_u_a_l& _____e_q_l = _k_e_y___e_q_u_a_l(), │ │ │ │ -178 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a = _a_l_l_o_c_a_t_o_r___t_y_p_e()) │ │ │ │ -179 : _M_h(__first, __last, __n, _____h_f, _____e_q_l, __a) │ │ │ │ -180 { } │ │ │ │ -181 │ │ │ │ -182 /// Copy constructor. │ │ │ │ -_1_8_3 _u_n_o_r_d_e_r_e_d___m_a_p(const _u_n_o_r_d_e_r_e_d___m_a_p&) = default; │ │ │ │ -184 │ │ │ │ -185 /// Move constructor. │ │ │ │ -_1_8_6 _u_n_o_r_d_e_r_e_d___m_a_p(_u_n_o_r_d_e_r_e_d___m_a_p&&) = default; │ │ │ │ -187 │ │ │ │ -188 /** │ │ │ │ -189 * @brief Creates an %unordered_map with no elements. │ │ │ │ -190 * @param __a An allocator object. │ │ │ │ -191 */ │ │ │ │ -192 explicit │ │ │ │ -_1_9_3 _u_n_o_r_d_e_r_e_d___m_a_p(const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -194 : _M_h(__a) │ │ │ │ -195 { } │ │ │ │ -196 │ │ │ │ -197 /* │ │ │ │ -198 * @brief Copy constructor with allocator argument. │ │ │ │ -199 * @param __uset Input %unordered_map to copy. │ │ │ │ -200 * @param __a An allocator object. │ │ │ │ -201 */ │ │ │ │ -202 _u_n_o_r_d_e_r_e_d___m_a_p(const _u_n_o_r_d_e_r_e_d___m_a_p& _____u_m_a_p, │ │ │ │ -203 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -204 : _M_h(_____u_m_a_p._M_h, __a) │ │ │ │ -205 { } │ │ │ │ -206 │ │ │ │ -207 /* │ │ │ │ -208 * @brief Move constructor with allocator argument. │ │ │ │ -209 * @param __uset Input %unordered_map to move. │ │ │ │ -210 * @param __a An allocator object. │ │ │ │ -211 */ │ │ │ │ -212 _u_n_o_r_d_e_r_e_d___m_a_p(_u_n_o_r_d_e_r_e_d___m_a_p&& __umap, │ │ │ │ -213 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -214 noexcept( noexcept(_Hashtable(_s_t_d_:_:_m_o_v_e(__umap._M_h), __a)) ) │ │ │ │ -215 : _M_h(_s_t_d_:_:_m_o_v_e(__umap._M_h), __a) │ │ │ │ -216 { } │ │ │ │ -217 │ │ │ │ -218 /** │ │ │ │ -219 * @brief Builds an %unordered_map from an initializer_list. │ │ │ │ -220 * @param __l An initializer_list. │ │ │ │ -221 * @param __n Minimal initial number of buckets. │ │ │ │ -222 * @param __hf A hash functor. │ │ │ │ -223 * @param __eql A key equality functor. │ │ │ │ -224 * @param __a An allocator object. │ │ │ │ -225 * │ │ │ │ -226 * Create an %unordered_map consisting of copies of the elements in the │ │ │ │ -227 * list. This is linear in N (where N is @a __l.size()). │ │ │ │ -228 */ │ │ │ │ -_2_2_9 _u_n_o_r_d_e_r_e_d___m_a_p(_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t_<_v_a_l_u_e___t_y_p_e_> _____l, │ │ │ │ -230 _s_i_z_e___t_y_p_e __n = 0, │ │ │ │ -231 const _h_a_s_h_e_r& _____h_f = _h_a_s_h_e_r(), │ │ │ │ -232 const _k_e_y___e_q_u_a_l& _____e_q_l = _k_e_y___e_q_u_a_l(), │ │ │ │ -233 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a = _a_l_l_o_c_a_t_o_r___t_y_p_e()) │ │ │ │ -234 : _M_h(_____l, __n, _____h_f, _____e_q_l, __a) │ │ │ │ -235 { } │ │ │ │ -236 │ │ │ │ -237 _u_n_o_r_d_e_r_e_d___m_a_p(_s_i_z_e___t_y_p_e __n, const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -238 : _u_n_o_r_d_e_r_e_d___m_a_p(__n, _h_a_s_h_e_r(), _k_e_y___e_q_u_a_l(), __a) │ │ │ │ -239 { } │ │ │ │ -240 │ │ │ │ -241 _u_n_o_r_d_e_r_e_d___m_a_p(_s_i_z_e___t_y_p_e __n, const _h_a_s_h_e_r& __hf, │ │ │ │ -242 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -243 : _u_n_o_r_d_e_r_e_d___m_a_p(__n, __hf, _k_e_y___e_q_u_a_l(), __a) │ │ │ │ -244 { } │ │ │ │ -245 │ │ │ │ -246 template │ │ │ │ -247 _u_n_o_r_d_e_r_e_d___m_a_p(_InputIterator __first, _InputIterator __last, │ │ │ │ -248 _s_i_z_e___t_y_p_e __n, │ │ │ │ -249 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -250 : _u_n_o_r_d_e_r_e_d___m_a_p(__first, __last, __n, _h_a_s_h_e_r(), _k_e_y___e_q_u_a_l(), __a) │ │ │ │ -251 { } │ │ │ │ +160 __condvar(const __condvar&) = delete; │ │ │ │ +161 __condvar& operator=(const __condvar&) = delete; │ │ │ │ +162 │ │ │ │ +163 __gthread_cond_t* native_handle() noexcept { return &_M_cond; } │ │ │ │ +164 │ │ │ │ +165 // Expects: Calling thread has locked __m. │ │ │ │ +166 void │ │ │ │ +167 wait(mutex& __m) │ │ │ │ +168 { │ │ │ │ +169 int __e __attribute__((__unused__)) │ │ │ │ +170 = __gthread_cond_wait(&_M_cond, __m.native_handle()); │ │ │ │ +171 __glibcxx_assert(__e == 0); │ │ │ │ +172 } │ │ │ │ +173 │ │ │ │ +174 void │ │ │ │ +175 wait_until(mutex& __m, timespec& __abs_time) │ │ │ │ +176 { │ │ │ │ +177 __gthread_cond_timedwait(&_M_cond, __m.native_handle(), &__abs_time); │ │ │ │ +178 } │ │ │ │ +179 │ │ │ │ +180#ifdef _GLIBCXX_USE_PTHREAD_COND_CLOCKWAIT │ │ │ │ +181 void │ │ │ │ +182 wait_until(mutex& __m, clockid_t __clock, timespec& __abs_time) │ │ │ │ +183 { │ │ │ │ +184 pthread_cond_clockwait(&_M_cond, __m.native_handle(), __clock, │ │ │ │ +185 &__abs_time); │ │ │ │ +186 } │ │ │ │ +187#endif │ │ │ │ +188 │ │ │ │ +189 void │ │ │ │ +190 notify_one() noexcept │ │ │ │ +191 { │ │ │ │ +192 int __e __attribute__((__unused__)) = __gthread_cond_signal(&_M_cond); │ │ │ │ +193 __glibcxx_assert(__e == 0); │ │ │ │ +194 } │ │ │ │ +195 │ │ │ │ +196 void │ │ │ │ +197 notify_all() noexcept │ │ │ │ +198 { │ │ │ │ +199 int __e __attribute__((__unused__)) = __gthread_cond_broadcast(&_M_cond); │ │ │ │ +200 __glibcxx_assert(__e == 0); │ │ │ │ +201 } │ │ │ │ +202 │ │ │ │ +203 protected: │ │ │ │ +204#ifdef __GTHREAD_COND_INIT │ │ │ │ +205 __gthread_cond_t _M_cond = __GTHREAD_COND_INIT; │ │ │ │ +206#else │ │ │ │ +207 __gthread_cond_t _M_cond; │ │ │ │ +208#endif │ │ │ │ +209 }; │ │ │ │ +210 /// @endcond │ │ │ │ +211 │ │ │ │ +212#endif // _GLIBCXX_HAS_GTHREADS │ │ │ │ +213 │ │ │ │ +214 /// Do not acquire ownership of the mutex. │ │ │ │ +_2_1_5 struct _d_e_f_e_r___l_o_c_k___t { explicit _d_e_f_e_r___l_o_c_k___t() = default; }; │ │ │ │ +216 │ │ │ │ +217 /// Try to acquire ownership of the mutex without blocking. │ │ │ │ +_2_1_8 struct _t_r_y___t_o___l_o_c_k___t { explicit _t_r_y___t_o___l_o_c_k___t() = default; }; │ │ │ │ +219 │ │ │ │ +220 /// Assume the calling thread has already obtained mutex ownership │ │ │ │ +221 /// and manage it. │ │ │ │ +_2_2_2 struct _a_d_o_p_t___l_o_c_k___t { explicit _a_d_o_p_t___l_o_c_k___t() = default; }; │ │ │ │ +223 │ │ │ │ +224 /// Tag used to prevent a scoped lock from acquiring ownership of a mutex. │ │ │ │ +_2_2_5 ___G_L_I_B_C_X_X_1_7___I_N_L_I_N_E constexpr _d_e_f_e_r___l_o_c_k___t _d_e_f_e_r___l_o_c_k { }; │ │ │ │ +226 │ │ │ │ +227 /// Tag used to prevent a scoped lock from blocking if a mutex is locked. │ │ │ │ +_2_2_8 ___G_L_I_B_C_X_X_1_7___I_N_L_I_N_E constexpr _t_r_y___t_o___l_o_c_k___t _t_r_y___t_o___l_o_c_k { }; │ │ │ │ +229 │ │ │ │ +230 /// Tag used to make a scoped lock take ownership of a locked mutex. │ │ │ │ +_2_3_1 ___G_L_I_B_C_X_X_1_7___I_N_L_I_N_E constexpr _a_d_o_p_t___l_o_c_k___t _a_d_o_p_t___l_o_c_k { }; │ │ │ │ +232 │ │ │ │ +233 /** @brief A simple scoped lock type. │ │ │ │ +234 * │ │ │ │ +235 * A lock_guard controls mutex ownership within a scope, releasing │ │ │ │ +236 * ownership in the destructor. │ │ │ │ +237 * │ │ │ │ +238 * @headerfile mutex │ │ │ │ +239 * @since C++11 │ │ │ │ +240 */ │ │ │ │ +241 template │ │ │ │ +_2_4_2 class _l_o_c_k___g_u_a_r_d │ │ │ │ +243 { │ │ │ │ +244 public: │ │ │ │ +245 typedef ___M_u_t_e_x mutex_type; │ │ │ │ +246 │ │ │ │ +247 explicit _l_o_c_k___g_u_a_r_d(mutex_type& _____m) : _M_device(_____m) │ │ │ │ +248 { _M_device.lock(); } │ │ │ │ +249 │ │ │ │ +250 _l_o_c_k___g_u_a_r_d(mutex_type& _____m, _a_d_o_p_t___l_o_c_k___t) noexcept : _M_device(_____m) │ │ │ │ +251 { } // calling thread owns mutex │ │ │ │ 252 │ │ │ │ -253 template │ │ │ │ -254 _u_n_o_r_d_e_r_e_d___m_a_p(_InputIterator __first, _InputIterator __last, │ │ │ │ -255 _s_i_z_e___t_y_p_e __n, const _h_a_s_h_e_r& __hf, │ │ │ │ -256 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -257 : _u_n_o_r_d_e_r_e_d___m_a_p(__first, __last, __n, __hf, _k_e_y___e_q_u_a_l(), __a) │ │ │ │ -258 { } │ │ │ │ -259 │ │ │ │ -260 _u_n_o_r_d_e_r_e_d___m_a_p(initializer_list __l, │ │ │ │ -261 _s_i_z_e___t_y_p_e __n, │ │ │ │ -262 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -263 : _u_n_o_r_d_e_r_e_d___m_a_p(__l, __n, _h_a_s_h_e_r(), _k_e_y___e_q_u_a_l(), __a) │ │ │ │ -264 { } │ │ │ │ -265 │ │ │ │ -266 _u_n_o_r_d_e_r_e_d___m_a_p(initializer_list __l, │ │ │ │ -267 _s_i_z_e___t_y_p_e __n, const _h_a_s_h_e_r& __hf, │ │ │ │ -268 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -269 : _u_n_o_r_d_e_r_e_d___m_a_p(__l, __n, __hf, _k_e_y___e_q_u_a_l(), __a) │ │ │ │ -270 { } │ │ │ │ -271 │ │ │ │ -272 /// Copy assignment operator. │ │ │ │ -273 _u_n_o_r_d_e_r_e_d___m_a_p& │ │ │ │ -_2_7_4 _o_p_e_r_a_t_o_r_=(const _u_n_o_r_d_e_r_e_d___m_a_p&) = default; │ │ │ │ -275 │ │ │ │ -276 /// Move assignment operator. │ │ │ │ -277 _u_n_o_r_d_e_r_e_d___m_a_p& │ │ │ │ -_2_7_8 _o_p_e_r_a_t_o_r_=(_u_n_o_r_d_e_r_e_d___m_a_p&&) = default; │ │ │ │ -279 │ │ │ │ -280 /** │ │ │ │ -281 * @brief %Unordered_map list assignment operator. │ │ │ │ -282 * @param __l An initializer_list. │ │ │ │ -283 * │ │ │ │ -284 * This function fills an %unordered_map with copies of the elements in │ │ │ │ -285 * the initializer list @a __l. │ │ │ │ -286 * │ │ │ │ -287 * Note that the assignment completely changes the %unordered_map and │ │ │ │ -288 * that the resulting %unordered_map's size is the same as the number │ │ │ │ -289 * of elements assigned. │ │ │ │ -290 */ │ │ │ │ -291 _u_n_o_r_d_e_r_e_d___m_a_p& │ │ │ │ -_2_9_2 _o_p_e_r_a_t_o_r_=(_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t_<_v_a_l_u_e___t_y_p_e_> _____l) │ │ │ │ -293 { │ │ │ │ -294 _M_h = _____l; │ │ │ │ -295 return *this; │ │ │ │ -296 } │ │ │ │ -297 │ │ │ │ -298 /// Returns the allocator object used by the %unordered_map. │ │ │ │ -299 _a_l_l_o_c_a_t_o_r___t_y_p_e │ │ │ │ -_3_0_0 _g_e_t___a_l_l_o_c_a_t_o_r() const noexcept │ │ │ │ -301 { return _M_h.get_allocator(); } │ │ │ │ -302 │ │ │ │ -303 // size and capacity: │ │ │ │ -304 │ │ │ │ -305 /// Returns true if the %unordered_map is empty. │ │ │ │ -306 _GLIBCXX_NODISCARD bool │ │ │ │ -_3_0_7 _e_m_p_t_y() const noexcept │ │ │ │ -308 { return _M_h.empty(); } │ │ │ │ -309 │ │ │ │ -310 /// Returns the size of the %unordered_map. │ │ │ │ -311 _s_i_z_e___t_y_p_e │ │ │ │ -_3_1_2 _s_i_z_e() const noexcept │ │ │ │ -313 { return _M_h.size(); } │ │ │ │ -314 │ │ │ │ -315 /// Returns the maximum size of the %unordered_map. │ │ │ │ -316 _s_i_z_e___t_y_p_e │ │ │ │ -_3_1_7 _m_a_x___s_i_z_e() const noexcept │ │ │ │ -318 { return _M_h.max_size(); } │ │ │ │ -319 │ │ │ │ -320 // iterators. │ │ │ │ -321 │ │ │ │ -322 /** │ │ │ │ -323 * Returns a read/write iterator that points to the first element in the │ │ │ │ -324 * %unordered_map. │ │ │ │ -325 */ │ │ │ │ -326 _i_t_e_r_a_t_o_r │ │ │ │ -_3_2_7 _b_e_g_i_n() noexcept │ │ │ │ -328 { return _M_h.begin(); } │ │ │ │ -329 │ │ │ │ -330 ///@{ │ │ │ │ -331 /** │ │ │ │ -332 * Returns a read-only (constant) iterator that points to the first │ │ │ │ -333 * element in the %unordered_map. │ │ │ │ -334 */ │ │ │ │ -335 _c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ -_3_3_6 _b_e_g_i_n() const noexcept │ │ │ │ -337 { return _M_h.begin(); } │ │ │ │ -338 │ │ │ │ -339 _c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ -_3_4_0 _c_b_e_g_i_n() const noexcept │ │ │ │ -341 { return _M_h.begin(); } │ │ │ │ -342 ///@} │ │ │ │ -343 │ │ │ │ -344 /** │ │ │ │ -345 * Returns a read/write iterator that points one past the last element in │ │ │ │ -346 * the %unordered_map. │ │ │ │ -347 */ │ │ │ │ -348 _i_t_e_r_a_t_o_r │ │ │ │ -_3_4_9 _e_n_d() noexcept │ │ │ │ -350 { return _M_h.end(); } │ │ │ │ -351 │ │ │ │ -352 ///@{ │ │ │ │ -353 /** │ │ │ │ -354 * Returns a read-only (constant) iterator that points one past the last │ │ │ │ -355 * element in the %unordered_map. │ │ │ │ -356 */ │ │ │ │ -357 _c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ -_3_5_8 _e_n_d() const noexcept │ │ │ │ -359 { return _M_h.end(); } │ │ │ │ -360 │ │ │ │ -361 _c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ -_3_6_2 _c_e_n_d() const noexcept │ │ │ │ -363 { return _M_h.end(); } │ │ │ │ -364 ///@} │ │ │ │ -365 │ │ │ │ -366 // modifiers. │ │ │ │ -367 │ │ │ │ -368 /** │ │ │ │ -369 * @brief Attempts to build and insert a std::pair into the │ │ │ │ -370 * %unordered_map. │ │ │ │ -371 * │ │ │ │ -372 * @param __args Arguments used to generate a new pair instance (see │ │ │ │ -373 * std::piecewise_contruct for passing arguments to each │ │ │ │ -374 * part of the pair constructor). │ │ │ │ -375 * │ │ │ │ -376 * @return A pair, of which the first element is an iterator that points │ │ │ │ -377 * to the possibly inserted pair, and the second is a bool that │ │ │ │ -378 * is true if the pair was actually inserted. │ │ │ │ -379 * │ │ │ │ -380 * This function attempts to build and insert a (key, value) %pair into │ │ │ │ -381 * the %unordered_map. │ │ │ │ -382 * An %unordered_map relies on unique keys and thus a %pair is only │ │ │ │ -383 * inserted if its first element (the key) is not already present in the │ │ │ │ -384 * %unordered_map. │ │ │ │ -385 * │ │ │ │ -386 * Insertion requires amortized constant time. │ │ │ │ -387 */ │ │ │ │ -388 template │ │ │ │ -389 _s_t_d_:_:_p_a_i_r_<_i_t_e_r_a_t_o_r_,_ _b_o_o_l_> │ │ │ │ -_3_9_0 _e_m_p_l_a_c_e(___A_r_g_s&&... _____a_r_g_s) │ │ │ │ -391 { return _M_h.emplace(_s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(_____a_r_g_s)...); } │ │ │ │ -392 │ │ │ │ -393 /** │ │ │ │ -394 * @brief Attempts to build and insert a std::pair into the │ │ │ │ -395 * %unordered_map. │ │ │ │ -396 * │ │ │ │ -397 * @param __pos An iterator that serves as a hint as to where the pair │ │ │ │ -398 * should be inserted. │ │ │ │ -399 * @param __args Arguments used to generate a new pair instance (see │ │ │ │ -400 * std::piecewise_contruct for passing arguments to each │ │ │ │ -401 * part of the pair constructor). │ │ │ │ -402 * @return An iterator that points to the element with key of the │ │ │ │ -403 * std::pair built from @a __args (may or may not be that │ │ │ │ -404 * std::pair). │ │ │ │ -405 * │ │ │ │ -406 * This function is not concerned about whether the insertion took place, │ │ │ │ -407 * and thus does not return a boolean like the single-argument emplace() │ │ │ │ -408 * does. │ │ │ │ -409 * Note that the first parameter is only a hint and can potentially │ │ │ │ -410 * improve the performance of the insertion process. A bad hint would │ │ │ │ -411 * cause no gains in efficiency. │ │ │ │ -412 * │ │ │ │ -413 * See │ │ │ │ -414 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/ │ │ │ │ -associative.html#containers.associative.insert_hints │ │ │ │ -415 * for more on @a hinting. │ │ │ │ -416 * │ │ │ │ -417 * Insertion requires amortized constant time. │ │ │ │ -418 */ │ │ │ │ -419 template │ │ │ │ -420 _i_t_e_r_a_t_o_r │ │ │ │ -_4_2_1 _e_m_p_l_a_c_e___h_i_n_t(_c_o_n_s_t___i_t_e_r_a_t_o_r _____p_o_s, ___A_r_g_s&&... _____a_r_g_s) │ │ │ │ -422 { return _M_h.emplace_hint(_____p_o_s, _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(_____a_r_g_s)...); } │ │ │ │ -423 │ │ │ │ -424#if __cplusplus > 201402L │ │ │ │ -425 /// Extract a node. │ │ │ │ -426 node_type │ │ │ │ -_4_2_7 _e_x_t_r_a_c_t(_c_o_n_s_t___i_t_e_r_a_t_o_r _____p_o_s) │ │ │ │ -428 { │ │ │ │ -429 __glibcxx_assert(_____p_o_s != _e_n_d()); │ │ │ │ -430 return _M_h.extract(_____p_o_s); │ │ │ │ -431 } │ │ │ │ -432 │ │ │ │ -433 /// Extract a node. │ │ │ │ -434 node_type │ │ │ │ -_4_3_5 _e_x_t_r_a_c_t(const _k_e_y___t_y_p_e& _____k_e_y) │ │ │ │ -436 { return _M_h.extract(_____k_e_y); } │ │ │ │ -437 │ │ │ │ -438 /// Re-insert an extracted node. │ │ │ │ -439 insert_return_type │ │ │ │ -_4_4_0 _i_n_s_e_r_t(node_type&& _____n_h) │ │ │ │ -441 { return _M_h._M_reinsert_node(_s_t_d_:_:_m_o_v_e(_____n_h)); } │ │ │ │ -442 │ │ │ │ -443 /// Re-insert an extracted node. │ │ │ │ -444 _i_t_e_r_a_t_o_r │ │ │ │ -_4_4_5 _i_n_s_e_r_t(_c_o_n_s_t___i_t_e_r_a_t_o_r, node_type&& _____n_h) │ │ │ │ -446 { return _M_h._M_reinsert_node(_s_t_d_:_:_m_o_v_e(_____n_h)).position; } │ │ │ │ -447 │ │ │ │ -448#define __cpp_lib_unordered_map_try_emplace 201411L │ │ │ │ -449 /** │ │ │ │ -450 * @brief Attempts to build and insert a std::pair into the │ │ │ │ -451 * %unordered_map. │ │ │ │ -452 * │ │ │ │ -453 * @param __k Key to use for finding a possibly existing pair in │ │ │ │ -454 * the unordered_map. │ │ │ │ -455 * @param __args Arguments used to generate the .second for a │ │ │ │ -456 * new pair instance. │ │ │ │ -457 * │ │ │ │ -458 * @return A pair, of which the first element is an iterator that points │ │ │ │ -459 * to the possibly inserted pair, and the second is a bool that │ │ │ │ -460 * is true if the pair was actually inserted. │ │ │ │ -461 * │ │ │ │ -462 * This function attempts to build and insert a (key, value) %pair into │ │ │ │ -463 * the %unordered_map. │ │ │ │ -464 * An %unordered_map relies on unique keys and thus a %pair is only │ │ │ │ -465 * inserted if its first element (the key) is not already present in the │ │ │ │ -466 * %unordered_map. │ │ │ │ -467 * If a %pair is not inserted, this function has no effect. │ │ │ │ -468 * │ │ │ │ -469 * Insertion requires amortized constant time. │ │ │ │ -470 */ │ │ │ │ -471 template │ │ │ │ -472 _p_a_i_r_<_i_t_e_r_a_t_o_r_,_ _b_o_o_l_> │ │ │ │ -_4_7_3 _t_r_y___e_m_p_l_a_c_e(const _k_e_y___t_y_p_e& _____k, ___A_r_g_s&&... _____a_r_g_s) │ │ │ │ -474 { │ │ │ │ -475 return _M_h.try_emplace(_c_e_n_d(), _____k, _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(_____a_r_g_s)...); │ │ │ │ -476 } │ │ │ │ -477 │ │ │ │ -478 // move-capable overload │ │ │ │ -479 template │ │ │ │ -480 _p_a_i_r_<_i_t_e_r_a_t_o_r_,_ _b_o_o_l_> │ │ │ │ -481 _t_r_y___e_m_p_l_a_c_e(_k_e_y___t_y_p_e&& _____k, ___A_r_g_s&&... _____a_r_g_s) │ │ │ │ -482 { │ │ │ │ -483 return _M_h.try_emplace(_c_e_n_d(), _s_t_d_:_:_m_o_v_e(_____k), │ │ │ │ -484 _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(_____a_r_g_s)...); │ │ │ │ -485 } │ │ │ │ -486 │ │ │ │ -487 /** │ │ │ │ -488 * @brief Attempts to build and insert a std::pair into the │ │ │ │ -489 * %unordered_map. │ │ │ │ -490 * │ │ │ │ -491 * @param __hint An iterator that serves as a hint as to where the pair │ │ │ │ -492 * should be inserted. │ │ │ │ -493 * @param __k Key to use for finding a possibly existing pair in │ │ │ │ -494 * the unordered_map. │ │ │ │ -495 * @param __args Arguments used to generate the .second for a │ │ │ │ -496 * new pair instance. │ │ │ │ -497 * @return An iterator that points to the element with key of the │ │ │ │ -498 * std::pair built from @a __args (may or may not be that │ │ │ │ -499 * std::pair). │ │ │ │ -500 * │ │ │ │ -501 * This function is not concerned about whether the insertion took place, │ │ │ │ -502 * and thus does not return a boolean like the single-argument emplace() │ │ │ │ -503 * does. However, if insertion did not take place, │ │ │ │ -504 * this function has no effect. │ │ │ │ -505 * Note that the first parameter is only a hint and can potentially │ │ │ │ -506 * improve the performance of the insertion process. A bad hint would │ │ │ │ -507 * cause no gains in efficiency. │ │ │ │ -508 * │ │ │ │ -509 * See │ │ │ │ -510 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/ │ │ │ │ -associative.html#containers.associative.insert_hints │ │ │ │ -511 * for more on @a hinting. │ │ │ │ -512 * │ │ │ │ -513 * Insertion requires amortized constant time. │ │ │ │ -514 */ │ │ │ │ -515 template │ │ │ │ -516 _i_t_e_r_a_t_o_r │ │ │ │ -_5_1_7 _t_r_y___e_m_p_l_a_c_e(_c_o_n_s_t___i_t_e_r_a_t_o_r _____h_i_n_t, const _k_e_y___t_y_p_e& _____k, │ │ │ │ -518 ___A_r_g_s&&... _____a_r_g_s) │ │ │ │ -519 { │ │ │ │ -520 return _M_h.try_emplace(_____h_i_n_t, _____k, │ │ │ │ -521 _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(_____a_r_g_s)...).first; │ │ │ │ -522 } │ │ │ │ -523 │ │ │ │ -524 // move-capable overload │ │ │ │ -525 template │ │ │ │ -526 _i_t_e_r_a_t_o_r │ │ │ │ -527 _t_r_y___e_m_p_l_a_c_e(_c_o_n_s_t___i_t_e_r_a_t_o_r _____h_i_n_t, _k_e_y___t_y_p_e&& _____k, ___A_r_g_s&&... _____a_r_g_s) │ │ │ │ -528 { │ │ │ │ -529 return _M_h.try_emplace(_____h_i_n_t, _s_t_d_:_:_m_o_v_e(_____k), │ │ │ │ -530 _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(_____a_r_g_s)...).first; │ │ │ │ -531 } │ │ │ │ -532#endif // C++17 │ │ │ │ -533 │ │ │ │ -534 ///@{ │ │ │ │ -535 /** │ │ │ │ -536 * @brief Attempts to insert a std::pair into the %unordered_map. │ │ │ │ -537 │ │ │ │ -538 * @param __x Pair to be inserted (see std::make_pair for easy │ │ │ │ -539 * creation of pairs). │ │ │ │ -540 * │ │ │ │ -541 * @return A pair, of which the first element is an iterator that │ │ │ │ -542 * points to the possibly inserted pair, and the second is │ │ │ │ -543 * a bool that is true if the pair was actually inserted. │ │ │ │ -544 * │ │ │ │ -545 * This function attempts to insert a (key, value) %pair into the │ │ │ │ -546 * %unordered_map. An %unordered_map relies on unique keys and thus a │ │ │ │ -547 * %pair is only inserted if its first element (the key) is not already │ │ │ │ -548 * present in the %unordered_map. │ │ │ │ -549 * │ │ │ │ -550 * Insertion requires amortized constant time. │ │ │ │ -551 */ │ │ │ │ -552 _s_t_d_:_:_p_a_i_r_<_i_t_e_r_a_t_o_r_,_ _b_o_o_l_> │ │ │ │ -_5_5_3 _i_n_s_e_r_t(const _v_a_l_u_e___t_y_p_e& __x) │ │ │ │ -554 { return _M_h.insert(__x); } │ │ │ │ -555 │ │ │ │ -556 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ -557 // 2354. Unnecessary copying when inserting into maps with braced-init │ │ │ │ -558 _s_t_d_:_:_p_a_i_r_<_i_t_e_r_a_t_o_r_,_ _b_o_o_l_> │ │ │ │ -_5_5_9 _i_n_s_e_r_t(_v_a_l_u_e___t_y_p_e&& __x) │ │ │ │ -560 { return _M_h.insert(_s_t_d_:_:_m_o_v_e(__x)); } │ │ │ │ -561 │ │ │ │ -562 template │ │ │ │ -563 _____e_n_a_b_l_e___i_f___t_<_i_s___c_o_n_s_t_r_u_c_t_i_b_l_e_<_v_a_l_u_e___t_y_p_e_,_ ___P_a_i_r_&_&_>_:_:_v_a_l_u_e, │ │ │ │ -564 _p_a_i_r_<_i_t_e_r_a_t_o_r_,_ _b_o_o_l_>> │ │ │ │ -_5_6_5 _i_n_s_e_r_t(___P_a_i_r&& __x) │ │ │ │ -566 { return _M_h.emplace(_s_t_d_:_:_f_o_r_w_a_r_d_<___P_a_i_r_>(__x)); } │ │ │ │ -567 ///@} │ │ │ │ -568 │ │ │ │ -569 ///@{ │ │ │ │ -570 /** │ │ │ │ -571 * @brief Attempts to insert a std::pair into the %unordered_map. │ │ │ │ -572 * @param __hint An iterator that serves as a hint as to where the │ │ │ │ -573 * pair should be inserted. │ │ │ │ -574 * @param __x Pair to be inserted (see std::make_pair for easy creation │ │ │ │ -575 * of pairs). │ │ │ │ -576 * @return An iterator that points to the element with key of │ │ │ │ -577 * @a __x (may or may not be the %pair passed in). │ │ │ │ -578 * │ │ │ │ -579 * This function is not concerned about whether the insertion took place, │ │ │ │ -580 * and thus does not return a boolean like the single-argument insert() │ │ │ │ -581 * does. Note that the first parameter is only a hint and can │ │ │ │ -582 * potentially improve the performance of the insertion process. A bad │ │ │ │ -583 * hint would cause no gains in efficiency. │ │ │ │ -584 * │ │ │ │ -585 * See │ │ │ │ -586 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/ │ │ │ │ -associative.html#containers.associative.insert_hints │ │ │ │ -587 * for more on @a hinting. │ │ │ │ -588 * │ │ │ │ -589 * Insertion requires amortized constant time. │ │ │ │ -590 */ │ │ │ │ -591 _i_t_e_r_a_t_o_r │ │ │ │ -_5_9_2 _i_n_s_e_r_t(_c_o_n_s_t___i_t_e_r_a_t_o_r _____h_i_n_t, const _v_a_l_u_e___t_y_p_e& __x) │ │ │ │ -593 { return _M_h.insert(_____h_i_n_t, __x); } │ │ │ │ -594 │ │ │ │ -595 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ -596 // 2354. Unnecessary copying when inserting into maps with braced-init │ │ │ │ -597 _i_t_e_r_a_t_o_r │ │ │ │ -_5_9_8 _i_n_s_e_r_t(_c_o_n_s_t___i_t_e_r_a_t_o_r _____h_i_n_t, _v_a_l_u_e___t_y_p_e&& __x) │ │ │ │ -599 { return _M_h.insert(_____h_i_n_t, _s_t_d_:_:_m_o_v_e(__x)); } │ │ │ │ -600 │ │ │ │ -601 template │ │ │ │ -602 _____e_n_a_b_l_e___i_f___t_<_i_s___c_o_n_s_t_r_u_c_t_i_b_l_e_<_v_a_l_u_e___t_y_p_e_,_ ___P_a_i_r_&_&_>_:_:_v_a_l_u_e, _i_t_e_r_a_t_o_r> │ │ │ │ -_6_0_3 _i_n_s_e_r_t(_c_o_n_s_t___i_t_e_r_a_t_o_r _____h_i_n_t, ___P_a_i_r&& __x) │ │ │ │ -604 { return _M_h.emplace_hint(_____h_i_n_t, _s_t_d_:_:_f_o_r_w_a_r_d_<___P_a_i_r_>(__x)); } │ │ │ │ -605 ///@} │ │ │ │ -606 │ │ │ │ -607 /** │ │ │ │ -608 * @brief A template function that attempts to insert a range of │ │ │ │ -609 * elements. │ │ │ │ -610 * @param __first Iterator pointing to the start of the range to be │ │ │ │ -611 * inserted. │ │ │ │ -612 * @param __last Iterator pointing to the end of the range. │ │ │ │ -613 * │ │ │ │ -614 * Complexity similar to that of the range constructor. │ │ │ │ -615 */ │ │ │ │ -616 template │ │ │ │ -617 void │ │ │ │ -_6_1_8 _i_n_s_e_r_t(___I_n_p_u_t_I_t_e_r_a_t_o_r __first, ___I_n_p_u_t_I_t_e_r_a_t_o_r __last) │ │ │ │ -619 { _M_h.insert(__first, __last); } │ │ │ │ -620 │ │ │ │ -621 /** │ │ │ │ -622 * @brief Attempts to insert a list of elements into the %unordered_map. │ │ │ │ -623 * @param __l A std::initializer_list of elements │ │ │ │ -624 * to be inserted. │ │ │ │ -625 * │ │ │ │ -626 * Complexity similar to that of the range constructor. │ │ │ │ -627 */ │ │ │ │ -628 void │ │ │ │ -_6_2_9 _i_n_s_e_r_t(_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t_<_v_a_l_u_e___t_y_p_e_> _____l) │ │ │ │ -630 { _M_h.insert(_____l); } │ │ │ │ -631 │ │ │ │ -632 │ │ │ │ -633#if __cplusplus > 201402L │ │ │ │ -634 /** │ │ │ │ -635 * @brief Attempts to insert a std::pair into the %unordered_map. │ │ │ │ -636 * @param __k Key to use for finding a possibly existing pair in │ │ │ │ -637 * the map. │ │ │ │ -638 * @param __obj Argument used to generate the .second for a pair │ │ │ │ -639 * instance. │ │ │ │ -640 * │ │ │ │ -641 * @return A pair, of which the first element is an iterator that │ │ │ │ -642 * points to the possibly inserted pair, and the second is │ │ │ │ -643 * a bool that is true if the pair was actually inserted. │ │ │ │ -644 * │ │ │ │ -645 * This function attempts to insert a (key, value) %pair into the │ │ │ │ -646 * %unordered_map. An %unordered_map relies on unique keys and thus a │ │ │ │ -647 * %pair is only inserted if its first element (the key) is not already │ │ │ │ -648 * present in the %unordered_map. │ │ │ │ -649 * If the %pair was already in the %unordered_map, the .second of │ │ │ │ -650 * the %pair is assigned from __obj. │ │ │ │ -651 * │ │ │ │ -652 * Insertion requires amortized constant time. │ │ │ │ -653 */ │ │ │ │ -654 template │ │ │ │ -655 _p_a_i_r_<_i_t_e_r_a_t_o_r_,_ _b_o_o_l_> │ │ │ │ -_6_5_6 _i_n_s_e_r_t___o_r___a_s_s_i_g_n(const _k_e_y___t_y_p_e& _____k, _Obj&& _____o_b_j) │ │ │ │ -657 { │ │ │ │ -658 auto _____r_e_t = _M_h.try_emplace(_c_e_n_d(), _____k, │ │ │ │ -659 _s_t_d_:_:_f_o_r_w_a_r_d_<___O_b_j_>(_____o_b_j)); │ │ │ │ -660 if (!_____r_e_t.second) │ │ │ │ -661 _____r_e_t.first->second = _s_t_d_:_:_f_o_r_w_a_r_d_<___O_b_j_>(_____o_b_j); │ │ │ │ -662 return _____r_e_t; │ │ │ │ -663 } │ │ │ │ -664 │ │ │ │ -665 // move-capable overload │ │ │ │ -666 template │ │ │ │ -667 _p_a_i_r_<_i_t_e_r_a_t_o_r_,_ _b_o_o_l_> │ │ │ │ -668 _i_n_s_e_r_t___o_r___a_s_s_i_g_n(_k_e_y___t_y_p_e&& _____k, _Obj&& _____o_b_j) │ │ │ │ -669 { │ │ │ │ -670 auto _____r_e_t = _M_h.try_emplace(_c_e_n_d(), _s_t_d_:_:_m_o_v_e(_____k), │ │ │ │ -671 _s_t_d_:_:_f_o_r_w_a_r_d_<___O_b_j_>(_____o_b_j)); │ │ │ │ -672 if (!_____r_e_t.second) │ │ │ │ -673 _____r_e_t.first->second = _s_t_d_:_:_f_o_r_w_a_r_d_<___O_b_j_>(_____o_b_j); │ │ │ │ -674 return _____r_e_t; │ │ │ │ -675 } │ │ │ │ -676 │ │ │ │ -677 /** │ │ │ │ -678 * @brief Attempts to insert a std::pair into the %unordered_map. │ │ │ │ -679 * @param __hint An iterator that serves as a hint as to where the │ │ │ │ -680 * pair should be inserted. │ │ │ │ -681 * @param __k Key to use for finding a possibly existing pair in │ │ │ │ -682 * the unordered_map. │ │ │ │ -683 * @param __obj Argument used to generate the .second for a pair │ │ │ │ -684 * instance. │ │ │ │ -685 * @return An iterator that points to the element with key of │ │ │ │ -686 * @a __x (may or may not be the %pair passed in). │ │ │ │ -687 * │ │ │ │ -688 * This function is not concerned about whether the insertion took place, │ │ │ │ -689 * and thus does not return a boolean like the single-argument insert() │ │ │ │ -690 * does. │ │ │ │ -691 * If the %pair was already in the %unordered map, the .second of │ │ │ │ -692 * the %pair is assigned from __obj. │ │ │ │ -693 * Note that the first parameter is only a hint and can │ │ │ │ -694 * potentially improve the performance of the insertion process. A bad │ │ │ │ -695 * hint would cause no gains in efficiency. │ │ │ │ -696 * │ │ │ │ -697 * See │ │ │ │ -698 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/ │ │ │ │ -associative.html#containers.associative.insert_hints │ │ │ │ -699 * for more on @a hinting. │ │ │ │ -700 * │ │ │ │ -701 * Insertion requires amortized constant time. │ │ │ │ -702 */ │ │ │ │ -703 template │ │ │ │ -704 _i_t_e_r_a_t_o_r │ │ │ │ -_7_0_5 _i_n_s_e_r_t___o_r___a_s_s_i_g_n(_c_o_n_s_t___i_t_e_r_a_t_o_r _____h_i_n_t, const _k_e_y___t_y_p_e& _____k, │ │ │ │ -706 _Obj&& _____o_b_j) │ │ │ │ -707 { │ │ │ │ -708 auto _____r_e_t = _M_h.try_emplace(_____h_i_n_t, _____k, _s_t_d_:_:_f_o_r_w_a_r_d_<___O_b_j_>(_____o_b_j)); │ │ │ │ -709 if (!_____r_e_t.second) │ │ │ │ -710 _____r_e_t.first->second = _s_t_d_:_:_f_o_r_w_a_r_d_<___O_b_j_>(_____o_b_j); │ │ │ │ -711 return _____r_e_t.first; │ │ │ │ -712 } │ │ │ │ -713 │ │ │ │ -714 // move-capable overload │ │ │ │ -715 template │ │ │ │ -716 _i_t_e_r_a_t_o_r │ │ │ │ -717 _i_n_s_e_r_t___o_r___a_s_s_i_g_n(_c_o_n_s_t___i_t_e_r_a_t_o_r _____h_i_n_t, _k_e_y___t_y_p_e&& _____k, _Obj&& _____o_b_j) │ │ │ │ -718 { │ │ │ │ -719 auto _____r_e_t = _M_h.try_emplace(_____h_i_n_t, _s_t_d_:_:_m_o_v_e(_____k), │ │ │ │ -720 _s_t_d_:_:_f_o_r_w_a_r_d_<___O_b_j_>(_____o_b_j)); │ │ │ │ -721 if (!_____r_e_t.second) │ │ │ │ -722 _____r_e_t.first->second = _s_t_d_:_:_f_o_r_w_a_r_d_<___O_b_j_>(_____o_b_j); │ │ │ │ -723 return _____r_e_t.first; │ │ │ │ -724 } │ │ │ │ -725#endif │ │ │ │ -726 │ │ │ │ -727 ///@{ │ │ │ │ -728 /** │ │ │ │ -729 * @brief Erases an element from an %unordered_map. │ │ │ │ -730 * @param __position An iterator pointing to the element to be erased. │ │ │ │ -731 * @return An iterator pointing to the element immediately following │ │ │ │ -732 * @a __position prior to the element being erased. If no such │ │ │ │ -733 * element exists, end() is returned. │ │ │ │ -734 * │ │ │ │ -735 * This function erases an element, pointed to by the given iterator, │ │ │ │ -736 * from an %unordered_map. │ │ │ │ -737 * Note that this function only erases the element, and that if the │ │ │ │ -738 * element is itself a pointer, the pointed-to memory is not touched in │ │ │ │ -739 * any way. Managing the pointer is the user's responsibility. │ │ │ │ -740 */ │ │ │ │ -741 _i_t_e_r_a_t_o_r │ │ │ │ -_7_4_2 _e_r_a_s_e(_c_o_n_s_t___i_t_e_r_a_t_o_r _____p_o_s_i_t_i_o_n) │ │ │ │ -743 { return _M_h.erase(_____p_o_s_i_t_i_o_n); } │ │ │ │ -744 │ │ │ │ -745 // LWG 2059. │ │ │ │ -746 _i_t_e_r_a_t_o_r │ │ │ │ -_7_4_7 _e_r_a_s_e(_i_t_e_r_a_t_o_r _____p_o_s_i_t_i_o_n) │ │ │ │ -748 { return _M_h.erase(_____p_o_s_i_t_i_o_n); } │ │ │ │ -749 ///@} │ │ │ │ -750 │ │ │ │ -751 /** │ │ │ │ -752 * @brief Erases elements according to the provided key. │ │ │ │ -753 * @param __x Key of element to be erased. │ │ │ │ -754 * @return The number of elements erased. │ │ │ │ -755 * │ │ │ │ -756 * This function erases all the elements located by the given key from │ │ │ │ -757 * an %unordered_map. For an %unordered_map the result of this function │ │ │ │ -758 * can only be 0 (not present) or 1 (present). │ │ │ │ -759 * Note that this function only erases the element, and that if the │ │ │ │ -760 * element is itself a pointer, the pointed-to memory is not touched in │ │ │ │ -761 * any way. Managing the pointer is the user's responsibility. │ │ │ │ -762 */ │ │ │ │ -763 _s_i_z_e___t_y_p_e │ │ │ │ -_7_6_4 _e_r_a_s_e(const _k_e_y___t_y_p_e& __x) │ │ │ │ -765 { return _M_h.erase(__x); } │ │ │ │ -766 │ │ │ │ -767 /** │ │ │ │ -768 * @brief Erases a [__first,__last) range of elements from an │ │ │ │ -769 * %unordered_map. │ │ │ │ -770 * @param __first Iterator pointing to the start of the range to be │ │ │ │ -771 * erased. │ │ │ │ -772 * @param __last Iterator pointing to the end of the range to │ │ │ │ -773 * be erased. │ │ │ │ -774 * @return The iterator @a __last. │ │ │ │ -775 * │ │ │ │ -776 * This function erases a sequence of elements from an %unordered_map. │ │ │ │ -777 * Note that this function only erases the elements, and that if │ │ │ │ -778 * the element is itself a pointer, the pointed-to memory is not touched │ │ │ │ -779 * in any way. Managing the pointer is the user's responsibility. │ │ │ │ -780 */ │ │ │ │ -781 _i_t_e_r_a_t_o_r │ │ │ │ -_7_8_2 _e_r_a_s_e(_c_o_n_s_t___i_t_e_r_a_t_o_r __first, _c_o_n_s_t___i_t_e_r_a_t_o_r __last) │ │ │ │ -783 { return _M_h.erase(__first, __last); } │ │ │ │ -784 │ │ │ │ -785 /** │ │ │ │ -786 * Erases all elements in an %unordered_map. │ │ │ │ -787 * Note that this function only erases the elements, and that if the │ │ │ │ -788 * elements themselves are pointers, the pointed-to memory is not touched │ │ │ │ -789 * in any way. Managing the pointer is the user's responsibility. │ │ │ │ -790 */ │ │ │ │ -791 void │ │ │ │ -_7_9_2 _c_l_e_a_r() noexcept │ │ │ │ -793 { _M_h.clear(); } │ │ │ │ -794 │ │ │ │ -795 /** │ │ │ │ -796 * @brief Swaps data with another %unordered_map. │ │ │ │ -797 * @param __x An %unordered_map of the same element and allocator │ │ │ │ -798 * types. │ │ │ │ -799 * │ │ │ │ -800 * This exchanges the elements between two %unordered_map in constant │ │ │ │ -801 * time. │ │ │ │ -802 * Note that the global std::swap() function is specialized such that │ │ │ │ -803 * std::swap(m1,m2) will feed to this function. │ │ │ │ -804 */ │ │ │ │ -805 void │ │ │ │ -_8_0_6 _s_w_a_p(_u_n_o_r_d_e_r_e_d___m_a_p& __x) │ │ │ │ -807 noexcept( noexcept(_M_h.swap(__x._M_h)) ) │ │ │ │ -808 { _M_h.swap(__x._M_h); } │ │ │ │ -809 │ │ │ │ -810#if __cplusplus > 201402L │ │ │ │ -811 template │ │ │ │ -812 friend class std::_Hash_merge_helper; │ │ │ │ -813 │ │ │ │ -814 template │ │ │ │ -815 void │ │ │ │ -816 merge(_u_n_o_r_d_e_r_e_d___m_a_p_<___K_e_y_,_ ___T_p_,_ ___H_2_,_ ___P_2_,_ ___A_l_l_o_c_>& _____s_o_u_r_c_e) │ │ │ │ -817 { │ │ │ │ -818 using ___M_e_r_g_e___h_e_l_p_e_r = ___H_a_s_h___m_e_r_g_e___h_e_l_p_e_r_<_u_n_o_r_d_e_r_e_d___m_a_p_,_ ___H_2_,_ ___P_2_>; │ │ │ │ -819 _M_h._M_merge_unique(_Merge_helper::_S_get_table(_____s_o_u_r_c_e)); │ │ │ │ -820 } │ │ │ │ -821 │ │ │ │ -822 template │ │ │ │ -823 void │ │ │ │ -824 merge(unordered_map<_Key, _Tp, _H2, _P2, _Alloc>&& __source) │ │ │ │ -825 { merge(__source); } │ │ │ │ -826 │ │ │ │ -827 template │ │ │ │ -828 void │ │ │ │ -829 merge(unordered_multimap<_Key, _Tp, _H2, _P2, _Alloc>& __source) │ │ │ │ -830 { │ │ │ │ -831 using _Merge_helper = _Hash_merge_helper; │ │ │ │ -832 _M_h._M_merge_unique(_Merge_helper::_S_get_table(__source)); │ │ │ │ -833 } │ │ │ │ -834 │ │ │ │ -835 template │ │ │ │ -836 void │ │ │ │ -837 merge(unordered_multimap<_Key, _Tp, _H2, _P2, _Alloc>&& __source) │ │ │ │ -838 { merge(__source); } │ │ │ │ -839#endif // C++17 │ │ │ │ -840 │ │ │ │ -841 // observers. │ │ │ │ -842 │ │ │ │ -843 /// Returns the hash functor object with which the %unordered_map was │ │ │ │ -844 /// constructed. │ │ │ │ -845 _h_a_s_h_e_r │ │ │ │ -_8_4_6 _h_a_s_h___f_u_n_c_t_i_o_n() const │ │ │ │ -847 { return _M_h.hash_function(); } │ │ │ │ -848 │ │ │ │ -849 /// Returns the key comparison object with which the %unordered_map was │ │ │ │ -850 /// constructed. │ │ │ │ -851 _k_e_y___e_q_u_a_l │ │ │ │ -_8_5_2 _k_e_y___e_q() const │ │ │ │ -853 { return _M_h.key_eq(); } │ │ │ │ -854 │ │ │ │ -855 // lookup. │ │ │ │ -856 │ │ │ │ -857 ///@{ │ │ │ │ -858 /** │ │ │ │ -859 * @brief Tries to locate an element in an %unordered_map. │ │ │ │ -860 * @param __x Key to be located. │ │ │ │ -861 * @return Iterator pointing to sought-after element, or end() if not │ │ │ │ -862 * found. │ │ │ │ -863 * │ │ │ │ -864 * This function takes a key and tries to locate the element with which │ │ │ │ -865 * the key matches. If successful the function returns an iterator │ │ │ │ -866 * pointing to the sought after element. If unsuccessful it returns the │ │ │ │ -867 * past-the-end ( @c end() ) iterator. │ │ │ │ -868 */ │ │ │ │ -869 _i_t_e_r_a_t_o_r │ │ │ │ -_8_7_0 _f_i_n_d(const _k_e_y___t_y_p_e& __x) │ │ │ │ -871 { return _M_h.find(__x); } │ │ │ │ -872 │ │ │ │ -873#if __cplusplus > 201703L │ │ │ │ -874 template │ │ │ │ -875 auto │ │ │ │ -_8_7_6 _f_i_n_d(const ___K_t& __x) -> decltype(_M_h._M_find_tr(__x)) │ │ │ │ -877 { return _M_h._M_find_tr(__x); } │ │ │ │ -878#endif │ │ │ │ -879 │ │ │ │ -880 _c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ -_8_8_1 _f_i_n_d(const _k_e_y___t_y_p_e& __x) const │ │ │ │ -882 { return _M_h.find(__x); } │ │ │ │ -883 │ │ │ │ -884#if __cplusplus > 201703L │ │ │ │ -885 template │ │ │ │ -886 auto │ │ │ │ -_8_8_7 _f_i_n_d(const ___K_t& __x) const -> decltype(_M_h._M_find_tr(__x)) │ │ │ │ -888 { return _M_h._M_find_tr(__x); } │ │ │ │ -889#endif │ │ │ │ -890 ///@} │ │ │ │ -891 │ │ │ │ -892 ///@{ │ │ │ │ -893 /** │ │ │ │ -894 * @brief Finds the number of elements. │ │ │ │ -895 * @param __x Key to count. │ │ │ │ -896 * @return Number of elements with specified key. │ │ │ │ -897 * │ │ │ │ -898 * This function only makes sense for %unordered_multimap; for │ │ │ │ -899 * %unordered_map the result will either be 0 (not present) or 1 │ │ │ │ -900 * (present). │ │ │ │ -901 */ │ │ │ │ -902 _s_i_z_e___t_y_p_e │ │ │ │ -_9_0_3 _c_o_u_n_t(const _k_e_y___t_y_p_e& __x) const │ │ │ │ -904 { return _M_h.count(__x); } │ │ │ │ -905 │ │ │ │ -906#if __cplusplus > 201703L │ │ │ │ -907 template │ │ │ │ -908 auto │ │ │ │ -_9_0_9 _c_o_u_n_t(const ___K_t& __x) const -> decltype(_M_h._M_count_tr(__x)) │ │ │ │ -910 { return _M_h._M_count_tr(__x); } │ │ │ │ -911#endif │ │ │ │ -912 ///@} │ │ │ │ -913 │ │ │ │ -914#if __cplusplus > 201703L │ │ │ │ -915 ///@{ │ │ │ │ -916 /** │ │ │ │ -917 * @brief Finds whether an element with the given key exists. │ │ │ │ -918 * @param __x Key of elements to be located. │ │ │ │ -919 * @return True if there is any element with the specified key. │ │ │ │ -920 */ │ │ │ │ -921 bool │ │ │ │ -_9_2_2 _c_o_n_t_a_i_n_s(const _k_e_y___t_y_p_e& __x) const │ │ │ │ -923 { return _M_h.find(__x) != _M_h.end(); } │ │ │ │ -924 │ │ │ │ -925 template │ │ │ │ -926 auto │ │ │ │ -_9_2_7 _c_o_n_t_a_i_n_s(const ___K_t& __x) const │ │ │ │ -928 -> decltype(_M_h._M_find_tr(__x), _v_o_i_d(), true) │ │ │ │ -929 { return _M_h._M_find_tr(__x) != _M_h.end(); } │ │ │ │ -930 ///@} │ │ │ │ -931#endif │ │ │ │ -932 │ │ │ │ -933 ///@{ │ │ │ │ -934 /** │ │ │ │ -935 * @brief Finds a subsequence matching given key. │ │ │ │ -936 * @param __x Key to be located. │ │ │ │ -937 * @return Pair of iterators that possibly points to the subsequence │ │ │ │ -938 * matching given key. │ │ │ │ -939 * │ │ │ │ -940 * This function probably only makes sense for %unordered_multimap. │ │ │ │ -941 */ │ │ │ │ -942 _s_t_d_:_:_p_a_i_r_<_i_t_e_r_a_t_o_r_,_ _i_t_e_r_a_t_o_r_> │ │ │ │ -_9_4_3 _e_q_u_a_l___r_a_n_g_e(const _k_e_y___t_y_p_e& __x) │ │ │ │ -944 { return _M_h.equal_range(__x); } │ │ │ │ -945 │ │ │ │ -946#if __cplusplus > 201703L │ │ │ │ -947 template │ │ │ │ -948 auto │ │ │ │ -_9_4_9 _e_q_u_a_l___r_a_n_g_e(const ___K_t& __x) │ │ │ │ -950 -> decltype(_M_h._M_equal_range_tr(__x)) │ │ │ │ -951 { return _M_h._M_equal_range_tr(__x); } │ │ │ │ -952#endif │ │ │ │ -953 │ │ │ │ -954 _s_t_d_:_:_p_a_i_r_<_c_o_n_s_t___i_t_e_r_a_t_o_r_,_ _c_o_n_s_t___i_t_e_r_a_t_o_r_> │ │ │ │ -_9_5_5 _e_q_u_a_l___r_a_n_g_e(const _k_e_y___t_y_p_e& __x) const │ │ │ │ -956 { return _M_h.equal_range(__x); } │ │ │ │ -957 │ │ │ │ -958#if __cplusplus > 201703L │ │ │ │ -959 template │ │ │ │ -960 auto │ │ │ │ -_9_6_1 _e_q_u_a_l___r_a_n_g_e(const ___K_t& __x) const │ │ │ │ -962 -> decltype(_M_h._M_equal_range_tr(__x)) │ │ │ │ -963 { return _M_h._M_equal_range_tr(__x); } │ │ │ │ -964#endif │ │ │ │ -965 ///@} │ │ │ │ -966 │ │ │ │ -967 ///@{ │ │ │ │ -968 /** │ │ │ │ -969 * @brief Subscript ( @c [] ) access to %unordered_map data. │ │ │ │ -970 * @param __k The key for which data should be retrieved. │ │ │ │ -971 * @return A reference to the data of the (key,data) %pair. │ │ │ │ -972 * │ │ │ │ -973 * Allows for easy lookup with the subscript ( @c [] )operator. Returns │ │ │ │ -974 * data associated with the key specified in subscript. If the key does │ │ │ │ -975 * not exist, a pair with that key is created using default values, which │ │ │ │ -976 * is then returned. │ │ │ │ -977 * │ │ │ │ -978 * Lookup requires constant time. │ │ │ │ -979 */ │ │ │ │ -980 _m_a_p_p_e_d___t_y_p_e& │ │ │ │ -_9_8_1 _o_p_e_r_a_t_o_r_[_](const _k_e_y___t_y_p_e& _____k) │ │ │ │ -982 { return _M_h[_____k]; } │ │ │ │ -983 │ │ │ │ -984 _m_a_p_p_e_d___t_y_p_e& │ │ │ │ -_9_8_5 _o_p_e_r_a_t_o_r_[_](_k_e_y___t_y_p_e&& _____k) │ │ │ │ -986 { return _M_h[_s_t_d_:_:_m_o_v_e(_____k)]; } │ │ │ │ -987 ///@} │ │ │ │ -988 │ │ │ │ -989 ///@{ │ │ │ │ -990 /** │ │ │ │ -991 * @brief Access to %unordered_map data. │ │ │ │ -992 * @param __k The key for which data should be retrieved. │ │ │ │ -993 * @return A reference to the data whose key is equal to @a __k, if │ │ │ │ -994 * such a data is present in the %unordered_map. │ │ │ │ -995 * @throw std::out_of_range If no such data is present. │ │ │ │ -996 */ │ │ │ │ -997 _m_a_p_p_e_d___t_y_p_e& │ │ │ │ -_9_9_8 _a_t(const _k_e_y___t_y_p_e& _____k) │ │ │ │ -999 { return _M_h.at(_____k); } │ │ │ │ -1000 │ │ │ │ -1001 const _m_a_p_p_e_d___t_y_p_e& │ │ │ │ -_1_0_0_2 _a_t(const _k_e_y___t_y_p_e& _____k) const │ │ │ │ -1003 { return _M_h.at(_____k); } │ │ │ │ -1004 ///@} │ │ │ │ -1005 │ │ │ │ -1006 // bucket interface. │ │ │ │ -1007 │ │ │ │ -1008 /// Returns the number of buckets of the %unordered_map. │ │ │ │ -1009 _s_i_z_e___t_y_p_e │ │ │ │ -_1_0_1_0 _b_u_c_k_e_t___c_o_u_n_t() const noexcept │ │ │ │ -1011 { return _M_h.bucket_count(); } │ │ │ │ -1012 │ │ │ │ -1013 /// Returns the maximum number of buckets of the %unordered_map. │ │ │ │ -1014 _s_i_z_e___t_y_p_e │ │ │ │ -_1_0_1_5 _m_a_x___b_u_c_k_e_t___c_o_u_n_t() const noexcept │ │ │ │ -1016 { return _M_h.max_bucket_count(); } │ │ │ │ -1017 │ │ │ │ -1018 /* │ │ │ │ -1019 * @brief Returns the number of elements in a given bucket. │ │ │ │ -1020 * @param __n A bucket index. │ │ │ │ -1021 * @return The number of elements in the bucket. │ │ │ │ -1022 */ │ │ │ │ -1023 _s_i_z_e___t_y_p_e │ │ │ │ -1024 bucket_size(_s_i_z_e___t_y_p_e __n) const │ │ │ │ -1025 { return _M_h.bucket_size(__n); } │ │ │ │ -1026 │ │ │ │ -1027 /* │ │ │ │ -1028 * @brief Returns the bucket index of a given element. │ │ │ │ -1029 * @param __key A key instance. │ │ │ │ -1030 * @return The key bucket index. │ │ │ │ -1031 */ │ │ │ │ -1032 _s_i_z_e___t_y_p_e │ │ │ │ -1033 bucket(const _k_e_y___t_y_p_e& __key) const │ │ │ │ -1034 { return _M_h.bucket(__key); } │ │ │ │ -1035 │ │ │ │ -1036 /** │ │ │ │ -1037 * @brief Returns a read/write iterator pointing to the first bucket │ │ │ │ -1038 * element. │ │ │ │ -1039 * @param __n The bucket index. │ │ │ │ -1040 * @return A read/write local iterator. │ │ │ │ -1041 */ │ │ │ │ -1042 _l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_1_0_4_3 _b_e_g_i_n(_s_i_z_e___t_y_p_e __n) │ │ │ │ -1044 { return _M_h.begin(__n); } │ │ │ │ -1045 │ │ │ │ -1046 ///@{ │ │ │ │ -1047 /** │ │ │ │ -1048 * @brief Returns a read-only (constant) iterator pointing to the first │ │ │ │ -1049 * bucket element. │ │ │ │ -1050 * @param __n The bucket index. │ │ │ │ -1051 * @return A read-only local iterator. │ │ │ │ -1052 */ │ │ │ │ -1053 _c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_1_0_5_4 _b_e_g_i_n(_s_i_z_e___t_y_p_e __n) const │ │ │ │ -1055 { return _M_h.begin(__n); } │ │ │ │ -1056 │ │ │ │ -1057 _c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_1_0_5_8 _c_b_e_g_i_n(_s_i_z_e___t_y_p_e __n) const │ │ │ │ -1059 { return _M_h.cbegin(__n); } │ │ │ │ -1060 ///@} │ │ │ │ -1061 │ │ │ │ -1062 /** │ │ │ │ -1063 * @brief Returns a read/write iterator pointing to one past the last │ │ │ │ -1064 * bucket elements. │ │ │ │ -1065 * @param __n The bucket index. │ │ │ │ -1066 * @return A read/write local iterator. │ │ │ │ -1067 */ │ │ │ │ -1068 _l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_1_0_6_9 _e_n_d(_s_i_z_e___t_y_p_e __n) │ │ │ │ -1070 { return _M_h.end(__n); } │ │ │ │ -1071 │ │ │ │ -1072 ///@{ │ │ │ │ -1073 /** │ │ │ │ -1074 * @brief Returns a read-only (constant) iterator pointing to one past │ │ │ │ -1075 * the last bucket elements. │ │ │ │ -1076 * @param __n The bucket index. │ │ │ │ -1077 * @return A read-only local iterator. │ │ │ │ -1078 */ │ │ │ │ -1079 _c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_1_0_8_0 _e_n_d(_s_i_z_e___t_y_p_e __n) const │ │ │ │ -1081 { return _M_h.end(__n); } │ │ │ │ -1082 │ │ │ │ -1083 _c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_1_0_8_4 _c_e_n_d(_s_i_z_e___t_y_p_e __n) const │ │ │ │ -1085 { return _M_h.cend(__n); } │ │ │ │ -1086 ///@} │ │ │ │ -1087 │ │ │ │ -1088 // hash policy. │ │ │ │ -1089 │ │ │ │ -1090 /// Returns the average number of elements per bucket. │ │ │ │ -1091 float │ │ │ │ -_1_0_9_2 _l_o_a_d___f_a_c_t_o_r() const noexcept │ │ │ │ -1093 { return _M_h.load_factor(); } │ │ │ │ -1094 │ │ │ │ -1095 /// Returns a positive number that the %unordered_map tries to keep the │ │ │ │ -1096 /// load factor less than or equal to. │ │ │ │ -1097 float │ │ │ │ -_1_0_9_8 _m_a_x___l_o_a_d___f_a_c_t_o_r() const noexcept │ │ │ │ -1099 { return _M_h.max_load_factor(); } │ │ │ │ -1100 │ │ │ │ -1101 /** │ │ │ │ -1102 * @brief Change the %unordered_map maximum load factor. │ │ │ │ -1103 * @param __z The new maximum load factor. │ │ │ │ -1104 */ │ │ │ │ -1105 void │ │ │ │ -_1_1_0_6 _m_a_x___l_o_a_d___f_a_c_t_o_r(float _____z) │ │ │ │ -1107 { _M_h.max_load_factor(_____z); } │ │ │ │ -1108 │ │ │ │ -1109 /** │ │ │ │ -1110 * @brief May rehash the %unordered_map. │ │ │ │ -1111 * @param __n The new number of buckets. │ │ │ │ -1112 * │ │ │ │ -1113 * Rehash will occur only if the new number of buckets respect the │ │ │ │ -1114 * %unordered_map maximum load factor. │ │ │ │ -1115 */ │ │ │ │ -1116 void │ │ │ │ -_1_1_1_7 _r_e_h_a_s_h(_s_i_z_e___t_y_p_e __n) │ │ │ │ -1118 { _M_h.rehash(__n); } │ │ │ │ -1119 │ │ │ │ -1120 /** │ │ │ │ -1121 * @brief Prepare the %unordered_map for a specified number of │ │ │ │ -1122 * elements. │ │ │ │ -1123 * @param __n Number of elements required. │ │ │ │ -1124 * │ │ │ │ -1125 * Same as rehash(ceil(n / max_load_factor())). │ │ │ │ -1126 */ │ │ │ │ -1127 void │ │ │ │ -_1_1_2_8 _r_e_s_e_r_v_e(_s_i_z_e___t_y_p_e __n) │ │ │ │ -1129 { _M_h.reserve(__n); } │ │ │ │ -1130 │ │ │ │ -1131 template │ │ │ │ -1133 friend bool │ │ │ │ -1134 operator==(const _u_n_o_r_d_e_r_e_d___m_a_p_<___K_e_y_1_,_ ___T_p_1_,_ ___H_a_s_h_1_,_ ___P_r_e_d_1_,_ ___A_l_l_o_c_1_>&, │ │ │ │ -1135 const _u_n_o_r_d_e_r_e_d___m_a_p_<___K_e_y_1_,_ ___T_p_1_,_ ___H_a_s_h_1_,_ ___P_r_e_d_1_,_ ___A_l_l_o_c_1_>&); │ │ │ │ -1136 }; │ │ │ │ -1137 │ │ │ │ -1138#if __cpp_deduction_guides >= 201606 │ │ │ │ -1139 │ │ │ │ -1140 template>, │ │ │ │ -1142 typename _Pred = equal_to<__iter_key_t<_InputIterator>>, │ │ │ │ -1143 typename _Allocator = allocator<__iter_to_alloc_t<_InputIterator>>, │ │ │ │ -1144 typename = _RequireInputIter<_InputIterator>, │ │ │ │ -1145 typename = _RequireNotAllocatorOrIntegral<_Hash>, │ │ │ │ -1146 typename = _RequireNotAllocator<_Pred>, │ │ │ │ -1147 typename = _RequireAllocator<_Allocator>> │ │ │ │ -1148 unordered_map(_InputIterator, _InputIterator, │ │ │ │ -1149 typename _u_n_o_r_d_e_r_e_d___m_a_p_<_i_n_t_,_ _i_n_t_>_:_:_s_i_z_e___t_y_p_e = {}, │ │ │ │ -1150 _Hash = _Hash(), _Pred = _Pred(), _Allocator = _Allocator()) │ │ │ │ -1151 -> unordered_map<__iter_key_t<_InputIterator>, │ │ │ │ -1152 __iter_val_t<_InputIterator>, │ │ │ │ -1153 _Hash, _Pred, _Allocator>; │ │ │ │ -1154 │ │ │ │ -1155 template, │ │ │ │ -1156 typename _Pred = equal_to<_Key>, │ │ │ │ -1157 typename _Allocator = allocator>, │ │ │ │ -1158 typename = _RequireNotAllocatorOrIntegral<_Hash>, │ │ │ │ -1159 typename = _RequireNotAllocator<_Pred>, │ │ │ │ -1160 typename = _RequireAllocator<_Allocator>> │ │ │ │ -1161 unordered_map(initializer_list>, │ │ │ │ -1162 typename _u_n_o_r_d_e_r_e_d___m_a_p_<_i_n_t_,_ _i_n_t_>_:_:_s_i_z_e___t_y_p_e = {}, │ │ │ │ -1163 _Hash = _Hash(), _Pred = _Pred(), _Allocator = _Allocator()) │ │ │ │ -1164 -> unordered_map<_Key, _Tp, _Hash, _Pred, _Allocator>; │ │ │ │ -1165 │ │ │ │ -1166 template, │ │ │ │ -1168 typename = _RequireAllocator<_Allocator>> │ │ │ │ -1169 unordered_map(_InputIterator, _InputIterator, │ │ │ │ -1170 typename _u_n_o_r_d_e_r_e_d___m_a_p_<_i_n_t_,_ _i_n_t_>_:_:_s_i_z_e___t_y_p_e, _Allocator) │ │ │ │ -1171 -> unordered_map<__iter_key_t<_InputIterator>, │ │ │ │ -1172 __iter_val_t<_InputIterator>, │ │ │ │ -1173 hash<__iter_key_t<_InputIterator>>, │ │ │ │ -1174 equal_to<__iter_key_t<_InputIterator>>, │ │ │ │ -1175 _Allocator>; │ │ │ │ -1176 │ │ │ │ -1177 template, │ │ │ │ -1179 typename = _RequireAllocator<_Allocator>> │ │ │ │ -1180 unordered_map(_InputIterator, _InputIterator, _Allocator) │ │ │ │ -1181 -> unordered_map<__iter_key_t<_InputIterator>, │ │ │ │ -1182 __iter_val_t<_InputIterator>, │ │ │ │ -1183 hash<__iter_key_t<_InputIterator>>, │ │ │ │ -1184 equal_to<__iter_key_t<_InputIterator>>, │ │ │ │ -1185 _Allocator>; │ │ │ │ -1186 │ │ │ │ -1187 template, │ │ │ │ -1189 typename = _RequireNotAllocatorOrIntegral<_Hash>, │ │ │ │ -1190 typename = _RequireAllocator<_Allocator>> │ │ │ │ -1191 unordered_map(_InputIterator, _InputIterator, │ │ │ │ -1192 typename _u_n_o_r_d_e_r_e_d___m_a_p_<_i_n_t_,_ _i_n_t_>_:_:_s_i_z_e___t_y_p_e, │ │ │ │ -1193 _Hash, _Allocator) │ │ │ │ -1194 -> unordered_map<__iter_key_t<_InputIterator>, │ │ │ │ -1195 __iter_val_t<_InputIterator>, _Hash, │ │ │ │ -1196 equal_to<__iter_key_t<_InputIterator>>, _Allocator>; │ │ │ │ -1197 │ │ │ │ -1198 template> │ │ │ │ -1200 unordered_map(initializer_list>, │ │ │ │ -1201 typename _u_n_o_r_d_e_r_e_d___m_a_p_<_i_n_t_,_ _i_n_t_>_:_:_s_i_z_e___t_y_p_e, │ │ │ │ -1202 _Allocator) │ │ │ │ -1203 -> unordered_map<_Key, _Tp, hash<_Key>, equal_to<_Key>, _Allocator>; │ │ │ │ -1204 │ │ │ │ -1205 template> │ │ │ │ -1207 unordered_map(initializer_list>, _Allocator) │ │ │ │ -1208 -> unordered_map<_Key, _Tp, hash<_Key>, equal_to<_Key>, _Allocator>; │ │ │ │ -1209 │ │ │ │ -1210 template, │ │ │ │ -1212 typename = _RequireAllocator<_Allocator>> │ │ │ │ -1213 unordered_map(initializer_list>, │ │ │ │ -1214 typename _u_n_o_r_d_e_r_e_d___m_a_p_<_i_n_t_,_ _i_n_t_>_:_:_s_i_z_e___t_y_p_e, │ │ │ │ -1215 _Hash, _Allocator) │ │ │ │ -1216 -> unordered_map<_Key, _Tp, _Hash, equal_to<_Key>, _Allocator>; │ │ │ │ -1217 │ │ │ │ -1218#endif │ │ │ │ -1219 │ │ │ │ -1220 /** │ │ │ │ -1221 * @brief A standard container composed of equivalent keys │ │ │ │ -1222 * (possibly containing multiple of each key value) that associates │ │ │ │ -1223 * values of another type with the keys. │ │ │ │ -1224 * │ │ │ │ -1225 * @ingroup unordered_associative_containers │ │ │ │ -1226 * @headerfile unordered_map │ │ │ │ -1227 * @since C++11 │ │ │ │ -1228 * │ │ │ │ -1229 * @tparam _Key Type of key objects. │ │ │ │ -1230 * @tparam _Tp Type of mapped objects. │ │ │ │ -1231 * @tparam _Hash Hashing function object type, defaults to hash<_Value>. │ │ │ │ -1232 * @tparam _Pred Predicate function object type, defaults │ │ │ │ -1233 * to equal_to<_Value>. │ │ │ │ -1234 * @tparam _Alloc Allocator type, defaults to │ │ │ │ -1235 * std::allocator>. │ │ │ │ -1236 * │ │ │ │ -1237 * Meets the requirements of a container, and │ │ │ │ -1238 * unordered associative container │ │ │ │ -1239 * │ │ │ │ -1240 * The resulting value type of the container is std::pair. │ │ │ │ -1241 * │ │ │ │ -1242 * Base is _Hashtable, dispatched at compile time via template │ │ │ │ -1243 * alias __ummap_hashtable. │ │ │ │ -1244 */ │ │ │ │ -1245 template, │ │ │ │ -1247 typename _Pred = equal_to<_Key>, │ │ │ │ -1248 typename _Alloc = allocator>> │ │ │ │ -_1_2_4_9 class _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p │ │ │ │ -1250 { │ │ │ │ -1251 typedef _____u_m_m_a_p___h_a_s_h_t_a_b_l_e_<___K_e_y_,_ ___T_p_,_ ___H_a_s_h_,_ ___P_r_e_d_,_ ___A_l_l_o_c_> ___H_a_s_h_t_a_b_l_e; │ │ │ │ -1252 ___H_a_s_h_t_a_b_l_e _M_h; │ │ │ │ -1253 │ │ │ │ -1254 public: │ │ │ │ -1255 // typedefs: │ │ │ │ -1256 ///@{ │ │ │ │ -1257 /// Public typedefs. │ │ │ │ -_1_2_5_8 typedef typename _Hashtable::key_type _k_e_y___t_y_p_e; │ │ │ │ -_1_2_5_9 typedef typename _Hashtable::value_type _v_a_l_u_e___t_y_p_e; │ │ │ │ -_1_2_6_0 typedef typename _Hashtable::mapped_type _m_a_p_p_e_d___t_y_p_e; │ │ │ │ -_1_2_6_1 typedef typename _Hashtable::hasher _h_a_s_h_e_r; │ │ │ │ -_1_2_6_2 typedef typename _Hashtable::key_equal _k_e_y___e_q_u_a_l; │ │ │ │ -_1_2_6_3 typedef typename _Hashtable::allocator_type _a_l_l_o_c_a_t_o_r___t_y_p_e; │ │ │ │ -1264 ///@} │ │ │ │ -1265 │ │ │ │ -1266 ///@{ │ │ │ │ -1267 /// Iterator-related typedefs. │ │ │ │ -_1_2_6_8 typedef typename _Hashtable::pointer _p_o_i_n_t_e_r; │ │ │ │ -_1_2_6_9 typedef typename _Hashtable::const_pointer _c_o_n_s_t___p_o_i_n_t_e_r; │ │ │ │ -_1_2_7_0 typedef typename _Hashtable::reference _r_e_f_e_r_e_n_c_e; │ │ │ │ -_1_2_7_1 typedef typename _Hashtable::const_reference _c_o_n_s_t___r_e_f_e_r_e_n_c_e; │ │ │ │ -_1_2_7_2 typedef typename _Hashtable::iterator _i_t_e_r_a_t_o_r; │ │ │ │ -_1_2_7_3 typedef typename _Hashtable::const_iterator _c_o_n_s_t___i_t_e_r_a_t_o_r; │ │ │ │ -_1_2_7_4 typedef typename _Hashtable::local_iterator _l_o_c_a_l___i_t_e_r_a_t_o_r; │ │ │ │ -_1_2_7_5 typedef typename _Hashtable::const_local_iterator _c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r; │ │ │ │ -_1_2_7_6 typedef typename _Hashtable::size_type _s_i_z_e___t_y_p_e; │ │ │ │ -_1_2_7_7 typedef typename _Hashtable::difference_type _d_i_f_f_e_r_e_n_c_e___t_y_p_e; │ │ │ │ -1278 ///@} │ │ │ │ -1279 │ │ │ │ -1280#if __cplusplus > 201402L │ │ │ │ -1281 using node_type = typename _Hashtable::node_type; │ │ │ │ -1282#endif │ │ │ │ -1283 │ │ │ │ -1284 //construct/destroy/copy │ │ │ │ -1285 │ │ │ │ -1286 /// Default constructor. │ │ │ │ -_1_2_8_7 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p() = default; │ │ │ │ -1288 │ │ │ │ -1289 /** │ │ │ │ -1290 * @brief Default constructor creates no elements. │ │ │ │ -1291 * @param __n Mnimal initial number of buckets. │ │ │ │ -1292 * @param __hf A hash functor. │ │ │ │ -1293 * @param __eql A key equality functor. │ │ │ │ -1294 * @param __a An allocator object. │ │ │ │ -1295 */ │ │ │ │ -1296 explicit │ │ │ │ -_1_2_9_7 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p(_s_i_z_e___t_y_p_e __n, │ │ │ │ -1298 const _h_a_s_h_e_r& _____h_f = _h_a_s_h_e_r(), │ │ │ │ -1299 const _k_e_y___e_q_u_a_l& _____e_q_l = _k_e_y___e_q_u_a_l(), │ │ │ │ -1300 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a = _a_l_l_o_c_a_t_o_r___t_y_p_e()) │ │ │ │ -1301 : _M_h(__n, _____h_f, _____e_q_l, __a) │ │ │ │ -1302 { } │ │ │ │ -1303 │ │ │ │ -1304 /** │ │ │ │ -1305 * @brief Builds an %unordered_multimap from a range. │ │ │ │ -1306 * @param __first An input iterator. │ │ │ │ -1307 * @param __last An input iterator. │ │ │ │ -1308 * @param __n Minimal initial number of buckets. │ │ │ │ -1309 * @param __hf A hash functor. │ │ │ │ -1310 * @param __eql A key equality functor. │ │ │ │ -1311 * @param __a An allocator object. │ │ │ │ -1312 * │ │ │ │ -1313 * Create an %unordered_multimap consisting of copies of the elements │ │ │ │ -1314 * from [__first,__last). This is linear in N (where N is │ │ │ │ -1315 * distance(__first,__last)). │ │ │ │ -1316 */ │ │ │ │ -1317 template │ │ │ │ -_1_3_1_8 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p(___I_n_p_u_t_I_t_e_r_a_t_o_r __first, ___I_n_p_u_t_I_t_e_r_a_t_o_r __last, │ │ │ │ -1319 _s_i_z_e___t_y_p_e __n = 0, │ │ │ │ -1320 const _h_a_s_h_e_r& _____h_f = _h_a_s_h_e_r(), │ │ │ │ -1321 const _k_e_y___e_q_u_a_l& _____e_q_l = _k_e_y___e_q_u_a_l(), │ │ │ │ -1322 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a = _a_l_l_o_c_a_t_o_r___t_y_p_e()) │ │ │ │ -1323 : _M_h(__first, __last, __n, _____h_f, _____e_q_l, __a) │ │ │ │ -1324 { } │ │ │ │ -1325 │ │ │ │ -1326 /// Copy constructor. │ │ │ │ -_1_3_2_7 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p(const _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p&) = default; │ │ │ │ -1328 │ │ │ │ -1329 /// Move constructor. │ │ │ │ -_1_3_3_0 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p(_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p&&) = default; │ │ │ │ -1331 │ │ │ │ -1332 /** │ │ │ │ -1333 * @brief Creates an %unordered_multimap with no elements. │ │ │ │ -1334 * @param __a An allocator object. │ │ │ │ -1335 */ │ │ │ │ -1336 explicit │ │ │ │ -_1_3_3_7 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p(const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -1338 : _M_h(__a) │ │ │ │ -1339 { } │ │ │ │ -1340 │ │ │ │ -1341 /* │ │ │ │ -1342 * @brief Copy constructor with allocator argument. │ │ │ │ -1343 * @param __uset Input %unordered_multimap to copy. │ │ │ │ -1344 * @param __a An allocator object. │ │ │ │ -1345 */ │ │ │ │ -1346 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p(const _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p& _____u_m_m_a_p, │ │ │ │ -1347 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -1348 : _M_h(_____u_m_m_a_p._M_h, __a) │ │ │ │ -1349 { } │ │ │ │ -1350 │ │ │ │ -1351 /* │ │ │ │ -1352 * @brief Move constructor with allocator argument. │ │ │ │ -1353 * @param __uset Input %unordered_multimap to move. │ │ │ │ -1354 * @param __a An allocator object. │ │ │ │ -1355 */ │ │ │ │ -1356 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p(_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p&& __ummap, │ │ │ │ -1357 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -1358 noexcept( noexcept(_Hashtable(_s_t_d_:_:_m_o_v_e(__ummap._M_h), __a)) ) │ │ │ │ -1359 : _M_h(_s_t_d_:_:_m_o_v_e(__ummap._M_h), __a) │ │ │ │ -1360 { } │ │ │ │ -1361 │ │ │ │ -1362 /** │ │ │ │ -1363 * @brief Builds an %unordered_multimap from an initializer_list. │ │ │ │ -1364 * @param __l An initializer_list. │ │ │ │ -1365 * @param __n Minimal initial number of buckets. │ │ │ │ -1366 * @param __hf A hash functor. │ │ │ │ -1367 * @param __eql A key equality functor. │ │ │ │ -1368 * @param __a An allocator object. │ │ │ │ -1369 * │ │ │ │ -1370 * Create an %unordered_multimap consisting of copies of the elements in │ │ │ │ -1371 * the list. This is linear in N (where N is @a __l.size()). │ │ │ │ -1372 */ │ │ │ │ -_1_3_7_3 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p(_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t_<_v_a_l_u_e___t_y_p_e_> _____l, │ │ │ │ -1374 _s_i_z_e___t_y_p_e __n = 0, │ │ │ │ -1375 const _h_a_s_h_e_r& _____h_f = _h_a_s_h_e_r(), │ │ │ │ -1376 const _k_e_y___e_q_u_a_l& _____e_q_l = _k_e_y___e_q_u_a_l(), │ │ │ │ -1377 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a = _a_l_l_o_c_a_t_o_r___t_y_p_e()) │ │ │ │ -1378 : _M_h(_____l, __n, _____h_f, _____e_q_l, __a) │ │ │ │ -1379 { } │ │ │ │ -1380 │ │ │ │ -1381 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p(_s_i_z_e___t_y_p_e __n, const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -1382 : _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p(__n, _h_a_s_h_e_r(), _k_e_y___e_q_u_a_l(), __a) │ │ │ │ -1383 { } │ │ │ │ -1384 │ │ │ │ -1385 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p(_s_i_z_e___t_y_p_e __n, const _h_a_s_h_e_r& __hf, │ │ │ │ -1386 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -1387 : _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p(__n, __hf, _k_e_y___e_q_u_a_l(), __a) │ │ │ │ -1388 { } │ │ │ │ -1389 │ │ │ │ -1390 template │ │ │ │ -1391 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p(_InputIterator __first, _InputIterator __last, │ │ │ │ -1392 _s_i_z_e___t_y_p_e __n, │ │ │ │ -1393 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -1394 : _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p(__first, __last, __n, _h_a_s_h_e_r(), _k_e_y___e_q_u_a_l(), __a) │ │ │ │ -1395 { } │ │ │ │ -1396 │ │ │ │ -1397 template │ │ │ │ -1398 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p(_InputIterator __first, _InputIterator __last, │ │ │ │ -1399 _s_i_z_e___t_y_p_e __n, const _h_a_s_h_e_r& __hf, │ │ │ │ -1400 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -1401 : _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p(__first, __last, __n, __hf, _k_e_y___e_q_u_a_l(), __a) │ │ │ │ -1402 { } │ │ │ │ -1403 │ │ │ │ -1404 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p(initializer_list __l, │ │ │ │ -1405 _s_i_z_e___t_y_p_e __n, │ │ │ │ -1406 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -1407 : _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p(__l, __n, _h_a_s_h_e_r(), _k_e_y___e_q_u_a_l(), __a) │ │ │ │ -1408 { } │ │ │ │ -1409 │ │ │ │ -1410 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p(initializer_list __l, │ │ │ │ -1411 _s_i_z_e___t_y_p_e __n, const _h_a_s_h_e_r& __hf, │ │ │ │ -1412 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -1413 : _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p(__l, __n, __hf, _k_e_y___e_q_u_a_l(), __a) │ │ │ │ -1414 { } │ │ │ │ -1415 │ │ │ │ -1416 /// Copy assignment operator. │ │ │ │ -1417 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p& │ │ │ │ -_1_4_1_8 _o_p_e_r_a_t_o_r_=(const _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p&) = default; │ │ │ │ -1419 │ │ │ │ -1420 /// Move assignment operator. │ │ │ │ -1421 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p& │ │ │ │ -_1_4_2_2 _o_p_e_r_a_t_o_r_=(_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p&&) = default; │ │ │ │ -1423 │ │ │ │ -1424 /** │ │ │ │ -1425 * @brief %Unordered_multimap list assignment operator. │ │ │ │ -1426 * @param __l An initializer_list. │ │ │ │ -1427 * │ │ │ │ -1428 * This function fills an %unordered_multimap with copies of the │ │ │ │ -1429 * elements in the initializer list @a __l. │ │ │ │ -1430 * │ │ │ │ -1431 * Note that the assignment completely changes the %unordered_multimap │ │ │ │ -1432 * and that the resulting %unordered_multimap's size is the same as the │ │ │ │ -1433 * number of elements assigned. │ │ │ │ -1434 */ │ │ │ │ -1435 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p& │ │ │ │ -_1_4_3_6 _o_p_e_r_a_t_o_r_=(_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t_<_v_a_l_u_e___t_y_p_e_> _____l) │ │ │ │ -1437 { │ │ │ │ -1438 _M_h = _____l; │ │ │ │ -1439 return *this; │ │ │ │ -1440 } │ │ │ │ -1441 │ │ │ │ -1442 /// Returns the allocator object used by the %unordered_multimap. │ │ │ │ -1443 _a_l_l_o_c_a_t_o_r___t_y_p_e │ │ │ │ -_1_4_4_4 _g_e_t___a_l_l_o_c_a_t_o_r() const noexcept │ │ │ │ -1445 { return _M_h.get_allocator(); } │ │ │ │ -1446 │ │ │ │ -1447 // size and capacity: │ │ │ │ -1448 │ │ │ │ -1449 /// Returns true if the %unordered_multimap is empty. │ │ │ │ -1450 _GLIBCXX_NODISCARD bool │ │ │ │ -_1_4_5_1 _e_m_p_t_y() const noexcept │ │ │ │ -1452 { return _M_h.empty(); } │ │ │ │ -1453 │ │ │ │ -1454 /// Returns the size of the %unordered_multimap. │ │ │ │ -1455 _s_i_z_e___t_y_p_e │ │ │ │ -_1_4_5_6 _s_i_z_e() const noexcept │ │ │ │ -1457 { return _M_h.size(); } │ │ │ │ -1458 │ │ │ │ -1459 /// Returns the maximum size of the %unordered_multimap. │ │ │ │ -1460 _s_i_z_e___t_y_p_e │ │ │ │ -_1_4_6_1 _m_a_x___s_i_z_e() const noexcept │ │ │ │ -1462 { return _M_h.max_size(); } │ │ │ │ -1463 │ │ │ │ -1464 // iterators. │ │ │ │ -1465 │ │ │ │ -1466 /** │ │ │ │ -1467 * Returns a read/write iterator that points to the first element in the │ │ │ │ -1468 * %unordered_multimap. │ │ │ │ -1469 */ │ │ │ │ -1470 _i_t_e_r_a_t_o_r │ │ │ │ -_1_4_7_1 _b_e_g_i_n() noexcept │ │ │ │ -1472 { return _M_h.begin(); } │ │ │ │ -1473 │ │ │ │ -1474 ///@{ │ │ │ │ -1475 /** │ │ │ │ -1476 * Returns a read-only (constant) iterator that points to the first │ │ │ │ -1477 * element in the %unordered_multimap. │ │ │ │ -1478 */ │ │ │ │ -1479 _c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ -_1_4_8_0 _b_e_g_i_n() const noexcept │ │ │ │ -1481 { return _M_h.begin(); } │ │ │ │ -1482 │ │ │ │ -1483 _c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ -_1_4_8_4 _c_b_e_g_i_n() const noexcept │ │ │ │ -1485 { return _M_h.begin(); } │ │ │ │ -1486 ///@} │ │ │ │ -1487 │ │ │ │ -1488 /** │ │ │ │ -1489 * Returns a read/write iterator that points one past the last element in │ │ │ │ -1490 * the %unordered_multimap. │ │ │ │ -1491 */ │ │ │ │ -1492 _i_t_e_r_a_t_o_r │ │ │ │ -_1_4_9_3 _e_n_d() noexcept │ │ │ │ -1494 { return _M_h.end(); } │ │ │ │ -1495 │ │ │ │ -1496 ///@{ │ │ │ │ -1497 /** │ │ │ │ -1498 * Returns a read-only (constant) iterator that points one past the last │ │ │ │ -1499 * element in the %unordered_multimap. │ │ │ │ -1500 */ │ │ │ │ -1501 _c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ -_1_5_0_2 _e_n_d() const noexcept │ │ │ │ -1503 { return _M_h.end(); } │ │ │ │ -1504 │ │ │ │ -1505 _c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ -_1_5_0_6 _c_e_n_d() const noexcept │ │ │ │ -1507 { return _M_h.end(); } │ │ │ │ -1508 ///@} │ │ │ │ -1509 │ │ │ │ -1510 // modifiers. │ │ │ │ -1511 │ │ │ │ -1512 /** │ │ │ │ -1513 * @brief Attempts to build and insert a std::pair into the │ │ │ │ -1514 * %unordered_multimap. │ │ │ │ -1515 * │ │ │ │ -1516 * @param __args Arguments used to generate a new pair instance (see │ │ │ │ -1517 * std::piecewise_contruct for passing arguments to each │ │ │ │ -1518 * part of the pair constructor). │ │ │ │ -1519 * │ │ │ │ -1520 * @return An iterator that points to the inserted pair. │ │ │ │ -1521 * │ │ │ │ -1522 * This function attempts to build and insert a (key, value) %pair into │ │ │ │ -1523 * the %unordered_multimap. │ │ │ │ -1524 * │ │ │ │ -1525 * Insertion requires amortized constant time. │ │ │ │ -1526 */ │ │ │ │ -1527 template │ │ │ │ -1528 _i_t_e_r_a_t_o_r │ │ │ │ -_1_5_2_9 _e_m_p_l_a_c_e(___A_r_g_s&&... _____a_r_g_s) │ │ │ │ -1530 { return _M_h.emplace(_s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(_____a_r_g_s)...); } │ │ │ │ -1531 │ │ │ │ -1532 /** │ │ │ │ -1533 * @brief Attempts to build and insert a std::pair into the │ │ │ │ -1534 * %unordered_multimap. │ │ │ │ -1535 * │ │ │ │ -1536 * @param __pos An iterator that serves as a hint as to where the pair │ │ │ │ -1537 * should be inserted. │ │ │ │ -1538 * @param __args Arguments used to generate a new pair instance (see │ │ │ │ -1539 * std::piecewise_contruct for passing arguments to each │ │ │ │ -1540 * part of the pair constructor). │ │ │ │ -1541 * @return An iterator that points to the element with key of the │ │ │ │ -1542 * std::pair built from @a __args. │ │ │ │ -1543 * │ │ │ │ -1544 * Note that the first parameter is only a hint and can potentially │ │ │ │ -1545 * improve the performance of the insertion process. A bad hint would │ │ │ │ -1546 * cause no gains in efficiency. │ │ │ │ -1547 * │ │ │ │ -1548 * See │ │ │ │ -1549 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/ │ │ │ │ -associative.html#containers.associative.insert_hints │ │ │ │ -1550 * for more on @a hinting. │ │ │ │ -1551 * │ │ │ │ -1552 * Insertion requires amortized constant time. │ │ │ │ -1553 */ │ │ │ │ -1554 template │ │ │ │ -1555 _i_t_e_r_a_t_o_r │ │ │ │ -_1_5_5_6 _e_m_p_l_a_c_e___h_i_n_t(_c_o_n_s_t___i_t_e_r_a_t_o_r _____p_o_s, ___A_r_g_s&&... _____a_r_g_s) │ │ │ │ -1557 { return _M_h.emplace_hint(_____p_o_s, _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(_____a_r_g_s)...); } │ │ │ │ -1558 │ │ │ │ -1559 ///@{ │ │ │ │ -1560 /** │ │ │ │ -1561 * @brief Inserts a std::pair into the %unordered_multimap. │ │ │ │ -1562 * @param __x Pair to be inserted (see std::make_pair for easy │ │ │ │ -1563 * creation of pairs). │ │ │ │ -1564 * │ │ │ │ -1565 * @return An iterator that points to the inserted pair. │ │ │ │ -1566 * │ │ │ │ -1567 * Insertion requires amortized constant time. │ │ │ │ -1568 */ │ │ │ │ -1569 _i_t_e_r_a_t_o_r │ │ │ │ -_1_5_7_0 _i_n_s_e_r_t(const _v_a_l_u_e___t_y_p_e& __x) │ │ │ │ -1571 { return _M_h.insert(__x); } │ │ │ │ -1572 │ │ │ │ -1573 _i_t_e_r_a_t_o_r │ │ │ │ -_1_5_7_4 _i_n_s_e_r_t(_v_a_l_u_e___t_y_p_e&& __x) │ │ │ │ -1575 { return _M_h.insert(_s_t_d_:_:_m_o_v_e(__x)); } │ │ │ │ -1576 │ │ │ │ -1577 template │ │ │ │ -1578 _____e_n_a_b_l_e___i_f___t_<_i_s___c_o_n_s_t_r_u_c_t_i_b_l_e_<_v_a_l_u_e___t_y_p_e_,_ ___P_a_i_r_&_&_>_:_:_v_a_l_u_e, _i_t_e_r_a_t_o_r> │ │ │ │ -_1_5_7_9 _i_n_s_e_r_t(___P_a_i_r&& __x) │ │ │ │ -1580 { return _M_h.emplace(_s_t_d_:_:_f_o_r_w_a_r_d_<___P_a_i_r_>(__x)); } │ │ │ │ -1581 ///@} │ │ │ │ -1582 │ │ │ │ -1583 ///@{ │ │ │ │ -1584 /** │ │ │ │ -1585 * @brief Inserts a std::pair into the %unordered_multimap. │ │ │ │ -1586 * @param __hint An iterator that serves as a hint as to where the │ │ │ │ -1587 * pair should be inserted. │ │ │ │ -1588 * @param __x Pair to be inserted (see std::make_pair for easy creation │ │ │ │ -1589 * of pairs). │ │ │ │ -1590 * @return An iterator that points to the element with key of │ │ │ │ -1591 * @a __x (may or may not be the %pair passed in). │ │ │ │ -1592 * │ │ │ │ -1593 * Note that the first parameter is only a hint and can potentially │ │ │ │ -1594 * improve the performance of the insertion process. A bad hint would │ │ │ │ -1595 * cause no gains in efficiency. │ │ │ │ -1596 * │ │ │ │ -1597 * See │ │ │ │ -1598 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/ │ │ │ │ -associative.html#containers.associative.insert_hints │ │ │ │ -1599 * for more on @a hinting. │ │ │ │ -1600 * │ │ │ │ -1601 * Insertion requires amortized constant time. │ │ │ │ -1602 */ │ │ │ │ -1603 _i_t_e_r_a_t_o_r │ │ │ │ -_1_6_0_4 _i_n_s_e_r_t(_c_o_n_s_t___i_t_e_r_a_t_o_r _____h_i_n_t, const _v_a_l_u_e___t_y_p_e& __x) │ │ │ │ -1605 { return _M_h.insert(_____h_i_n_t, __x); } │ │ │ │ -1606 │ │ │ │ -1607 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ -1608 // 2354. Unnecessary copying when inserting into maps with braced-init │ │ │ │ -1609 _i_t_e_r_a_t_o_r │ │ │ │ -_1_6_1_0 _i_n_s_e_r_t(_c_o_n_s_t___i_t_e_r_a_t_o_r _____h_i_n_t, _v_a_l_u_e___t_y_p_e&& __x) │ │ │ │ -1611 { return _M_h.insert(_____h_i_n_t, _s_t_d_:_:_m_o_v_e(__x)); } │ │ │ │ -1612 │ │ │ │ -1613 template │ │ │ │ -1614 _____e_n_a_b_l_e___i_f___t_<_i_s___c_o_n_s_t_r_u_c_t_i_b_l_e_<_v_a_l_u_e___t_y_p_e_,_ ___P_a_i_r_&_&_>_:_:_v_a_l_u_e, _i_t_e_r_a_t_o_r> │ │ │ │ -_1_6_1_5 _i_n_s_e_r_t(_c_o_n_s_t___i_t_e_r_a_t_o_r _____h_i_n_t, ___P_a_i_r&& __x) │ │ │ │ -1616 { return _M_h.emplace_hint(_____h_i_n_t, _s_t_d_:_:_f_o_r_w_a_r_d_<___P_a_i_r_>(__x)); } │ │ │ │ -1617 ///@} │ │ │ │ -1618 │ │ │ │ -1619 /** │ │ │ │ -1620 * @brief A template function that attempts to insert a range of │ │ │ │ -1621 * elements. │ │ │ │ -1622 * @param __first Iterator pointing to the start of the range to be │ │ │ │ -1623 * inserted. │ │ │ │ -1624 * @param __last Iterator pointing to the end of the range. │ │ │ │ -1625 * │ │ │ │ -1626 * Complexity similar to that of the range constructor. │ │ │ │ -1627 */ │ │ │ │ -1628 template │ │ │ │ -1629 void │ │ │ │ -_1_6_3_0 _i_n_s_e_r_t(___I_n_p_u_t_I_t_e_r_a_t_o_r __first, ___I_n_p_u_t_I_t_e_r_a_t_o_r __last) │ │ │ │ -1631 { _M_h.insert(__first, __last); } │ │ │ │ -1632 │ │ │ │ -1633 /** │ │ │ │ -1634 * @brief Attempts to insert a list of elements into the │ │ │ │ -1635 * %unordered_multimap. │ │ │ │ -1636 * @param __l A std::initializer_list of elements │ │ │ │ -1637 * to be inserted. │ │ │ │ -1638 * │ │ │ │ -1639 * Complexity similar to that of the range constructor. │ │ │ │ -1640 */ │ │ │ │ -1641 void │ │ │ │ -_1_6_4_2 _i_n_s_e_r_t(_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t_<_v_a_l_u_e___t_y_p_e_> _____l) │ │ │ │ -1643 { _M_h.insert(_____l); } │ │ │ │ -1644 │ │ │ │ -1645#if __cplusplus > 201402L │ │ │ │ -1646 /// Extract a node. │ │ │ │ -1647 node_type │ │ │ │ -_1_6_4_8 _e_x_t_r_a_c_t(_c_o_n_s_t___i_t_e_r_a_t_o_r _____p_o_s) │ │ │ │ -1649 { │ │ │ │ -1650 __glibcxx_assert(_____p_o_s != _e_n_d()); │ │ │ │ -1651 return _M_h.extract(_____p_o_s); │ │ │ │ -1652 } │ │ │ │ -1653 │ │ │ │ -1654 /// Extract a node. │ │ │ │ -1655 node_type │ │ │ │ -_1_6_5_6 _e_x_t_r_a_c_t(const _k_e_y___t_y_p_e& _____k_e_y) │ │ │ │ -1657 { return _M_h.extract(_____k_e_y); } │ │ │ │ -1658 │ │ │ │ -1659 /// Re-insert an extracted node. │ │ │ │ -1660 _i_t_e_r_a_t_o_r │ │ │ │ -_1_6_6_1 _i_n_s_e_r_t(node_type&& _____n_h) │ │ │ │ -1662 { return _M_h._M_reinsert_node_multi(_c_e_n_d(), _s_t_d_:_:_m_o_v_e(_____n_h)); } │ │ │ │ -1663 │ │ │ │ -1664 /// Re-insert an extracted node. │ │ │ │ -1665 _i_t_e_r_a_t_o_r │ │ │ │ -_1_6_6_6 _i_n_s_e_r_t(_c_o_n_s_t___i_t_e_r_a_t_o_r _____h_i_n_t, node_type&& _____n_h) │ │ │ │ -1667 { return _M_h._M_reinsert_node_multi(_____h_i_n_t, _s_t_d_:_:_m_o_v_e(_____n_h)); } │ │ │ │ -1668#endif // C++17 │ │ │ │ -1669 │ │ │ │ -1670 ///@{ │ │ │ │ -1671 /** │ │ │ │ -1672 * @brief Erases an element from an %unordered_multimap. │ │ │ │ -1673 * @param __position An iterator pointing to the element to be erased. │ │ │ │ -1674 * @return An iterator pointing to the element immediately following │ │ │ │ -1675 * @a __position prior to the element being erased. If no such │ │ │ │ -1676 * element exists, end() is returned. │ │ │ │ -1677 * │ │ │ │ -1678 * This function erases an element, pointed to by the given iterator, │ │ │ │ -1679 * from an %unordered_multimap. │ │ │ │ -1680 * Note that this function only erases the element, and that if the │ │ │ │ -1681 * element is itself a pointer, the pointed-to memory is not touched in │ │ │ │ -1682 * any way. Managing the pointer is the user's responsibility. │ │ │ │ -1683 */ │ │ │ │ -1684 _i_t_e_r_a_t_o_r │ │ │ │ -_1_6_8_5 _e_r_a_s_e(_c_o_n_s_t___i_t_e_r_a_t_o_r _____p_o_s_i_t_i_o_n) │ │ │ │ -1686 { return _M_h.erase(_____p_o_s_i_t_i_o_n); } │ │ │ │ -1687 │ │ │ │ -1688 // LWG 2059. │ │ │ │ -1689 _i_t_e_r_a_t_o_r │ │ │ │ -_1_6_9_0 _e_r_a_s_e(_i_t_e_r_a_t_o_r _____p_o_s_i_t_i_o_n) │ │ │ │ -1691 { return _M_h.erase(_____p_o_s_i_t_i_o_n); } │ │ │ │ -1692 ///@} │ │ │ │ -1693 │ │ │ │ -1694 /** │ │ │ │ -1695 * @brief Erases elements according to the provided key. │ │ │ │ -1696 * @param __x Key of elements to be erased. │ │ │ │ -1697 * @return The number of elements erased. │ │ │ │ -1698 * │ │ │ │ -1699 * This function erases all the elements located by the given key from │ │ │ │ -1700 * an %unordered_multimap. │ │ │ │ -1701 * Note that this function only erases the element, and that if the │ │ │ │ -1702 * element is itself a pointer, the pointed-to memory is not touched in │ │ │ │ -1703 * any way. Managing the pointer is the user's responsibility. │ │ │ │ -1704 */ │ │ │ │ -1705 _s_i_z_e___t_y_p_e │ │ │ │ -_1_7_0_6 _e_r_a_s_e(const _k_e_y___t_y_p_e& __x) │ │ │ │ -1707 { return _M_h.erase(__x); } │ │ │ │ -1708 │ │ │ │ -1709 /** │ │ │ │ -1710 * @brief Erases a [__first,__last) range of elements from an │ │ │ │ -1711 * %unordered_multimap. │ │ │ │ -1712 * @param __first Iterator pointing to the start of the range to be │ │ │ │ -1713 * erased. │ │ │ │ -1714 * @param __last Iterator pointing to the end of the range to │ │ │ │ -1715 * be erased. │ │ │ │ -1716 * @return The iterator @a __last. │ │ │ │ -1717 * │ │ │ │ -1718 * This function erases a sequence of elements from an │ │ │ │ -1719 * %unordered_multimap. │ │ │ │ -1720 * Note that this function only erases the elements, and that if │ │ │ │ -1721 * the element is itself a pointer, the pointed-to memory is not touched │ │ │ │ -1722 * in any way. Managing the pointer is the user's responsibility. │ │ │ │ -1723 */ │ │ │ │ -1724 _i_t_e_r_a_t_o_r │ │ │ │ -_1_7_2_5 _e_r_a_s_e(_c_o_n_s_t___i_t_e_r_a_t_o_r __first, _c_o_n_s_t___i_t_e_r_a_t_o_r __last) │ │ │ │ -1726 { return _M_h.erase(__first, __last); } │ │ │ │ -1727 │ │ │ │ -1728 /** │ │ │ │ -1729 * Erases all elements in an %unordered_multimap. │ │ │ │ -1730 * Note that this function only erases the elements, and that if the │ │ │ │ -1731 * elements themselves are pointers, the pointed-to memory is not touched │ │ │ │ -1732 * in any way. Managing the pointer is the user's responsibility. │ │ │ │ -1733 */ │ │ │ │ -1734 void │ │ │ │ -_1_7_3_5 _c_l_e_a_r() noexcept │ │ │ │ -1736 { _M_h.clear(); } │ │ │ │ -1737 │ │ │ │ -1738 /** │ │ │ │ -1739 * @brief Swaps data with another %unordered_multimap. │ │ │ │ -1740 * @param __x An %unordered_multimap of the same element and allocator │ │ │ │ -1741 * types. │ │ │ │ -1742 * │ │ │ │ -1743 * This exchanges the elements between two %unordered_multimap in │ │ │ │ -1744 * constant time. │ │ │ │ -1745 * Note that the global std::swap() function is specialized such that │ │ │ │ -1746 * std::swap(m1,m2) will feed to this function. │ │ │ │ -1747 */ │ │ │ │ -1748 void │ │ │ │ -_1_7_4_9 _s_w_a_p(_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p& __x) │ │ │ │ -1750 noexcept( noexcept(_M_h.swap(__x._M_h)) ) │ │ │ │ -1751 { _M_h.swap(__x._M_h); } │ │ │ │ -1752 │ │ │ │ -1753#if __cplusplus > 201402L │ │ │ │ -1754 template │ │ │ │ -1755 friend class std::_Hash_merge_helper; │ │ │ │ -1756 │ │ │ │ -1757 template │ │ │ │ -1758 void │ │ │ │ -1759 merge(_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_<___K_e_y_,_ ___T_p_,_ ___H_2_,_ ___P_2_,_ ___A_l_l_o_c_>& _____s_o_u_r_c_e) │ │ │ │ -1760 { │ │ │ │ -1761 using ___M_e_r_g_e___h_e_l_p_e_r │ │ │ │ -1762 = ___H_a_s_h___m_e_r_g_e___h_e_l_p_e_r_<_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_,_ ___H_2_,_ ___P_2_>; │ │ │ │ -1763 _M_h._M_merge_multi(_Merge_helper::_S_get_table(_____s_o_u_r_c_e)); │ │ │ │ -1764 } │ │ │ │ -1765 │ │ │ │ -1766 template │ │ │ │ -1767 void │ │ │ │ -1768 merge(unordered_multimap<_Key, _Tp, _H2, _P2, _Alloc>&& __source) │ │ │ │ -1769 { merge(__source); } │ │ │ │ -1770 │ │ │ │ -1771 template │ │ │ │ -1772 void │ │ │ │ -1773 merge(unordered_map<_Key, _Tp, _H2, _P2, _Alloc>& __source) │ │ │ │ -1774 { │ │ │ │ -1775 using _Merge_helper │ │ │ │ -1776 = _Hash_merge_helper; │ │ │ │ -1777 _M_h._M_merge_multi(_Merge_helper::_S_get_table(__source)); │ │ │ │ -1778 } │ │ │ │ -1779 │ │ │ │ -1780 template │ │ │ │ -1781 void │ │ │ │ -1782 merge(unordered_map<_Key, _Tp, _H2, _P2, _Alloc>&& __source) │ │ │ │ -1783 { merge(__source); } │ │ │ │ -1784#endif // C++17 │ │ │ │ -1785 │ │ │ │ -1786 // observers. │ │ │ │ -1787 │ │ │ │ -1788 /// Returns the hash functor object with which the %unordered_multimap │ │ │ │ -1789 /// was constructed. │ │ │ │ -1790 _h_a_s_h_e_r │ │ │ │ -_1_7_9_1 _h_a_s_h___f_u_n_c_t_i_o_n() const │ │ │ │ -1792 { return _M_h.hash_function(); } │ │ │ │ -1793 │ │ │ │ -1794 /// Returns the key comparison object with which the %unordered_multimap │ │ │ │ -1795 /// was constructed. │ │ │ │ -1796 _k_e_y___e_q_u_a_l │ │ │ │ -_1_7_9_7 _k_e_y___e_q() const │ │ │ │ -1798 { return _M_h.key_eq(); } │ │ │ │ -1799 │ │ │ │ -1800 // lookup. │ │ │ │ -1801 │ │ │ │ -1802 ///@{ │ │ │ │ -1803 /** │ │ │ │ -1804 * @brief Tries to locate an element in an %unordered_multimap. │ │ │ │ -1805 * @param __x Key to be located. │ │ │ │ -1806 * @return Iterator pointing to sought-after element, or end() if not │ │ │ │ -1807 * found. │ │ │ │ -1808 * │ │ │ │ -1809 * This function takes a key and tries to locate the element with which │ │ │ │ -1810 * the key matches. If successful the function returns an iterator │ │ │ │ -1811 * pointing to the sought after element. If unsuccessful it returns the │ │ │ │ -1812 * past-the-end ( @c end() ) iterator. │ │ │ │ -1813 */ │ │ │ │ -1814 _i_t_e_r_a_t_o_r │ │ │ │ -_1_8_1_5 _f_i_n_d(const _k_e_y___t_y_p_e& __x) │ │ │ │ -1816 { return _M_h.find(__x); } │ │ │ │ -1817 │ │ │ │ -1818#if __cplusplus > 201703L │ │ │ │ -1819 template │ │ │ │ -1820 auto │ │ │ │ -_1_8_2_1 _f_i_n_d(const ___K_t& __x) -> decltype(_M_h._M_find_tr(__x)) │ │ │ │ -1822 { return _M_h._M_find_tr(__x); } │ │ │ │ -1823#endif │ │ │ │ -1824 │ │ │ │ -1825 _c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ -_1_8_2_6 _f_i_n_d(const _k_e_y___t_y_p_e& __x) const │ │ │ │ -1827 { return _M_h.find(__x); } │ │ │ │ -1828 │ │ │ │ -1829#if __cplusplus > 201703L │ │ │ │ -1830 template │ │ │ │ -1831 auto │ │ │ │ -_1_8_3_2 _f_i_n_d(const ___K_t& __x) const -> decltype(_M_h._M_find_tr(__x)) │ │ │ │ -1833 { return _M_h._M_find_tr(__x); } │ │ │ │ -1834#endif │ │ │ │ -1835 ///@} │ │ │ │ -1836 │ │ │ │ -1837 ///@{ │ │ │ │ -1838 /** │ │ │ │ -1839 * @brief Finds the number of elements. │ │ │ │ -1840 * @param __x Key to count. │ │ │ │ -1841 * @return Number of elements with specified key. │ │ │ │ -1842 */ │ │ │ │ -1843 _s_i_z_e___t_y_p_e │ │ │ │ -_1_8_4_4 _c_o_u_n_t(const _k_e_y___t_y_p_e& __x) const │ │ │ │ -1845 { return _M_h.count(__x); } │ │ │ │ -1846 │ │ │ │ -1847#if __cplusplus > 201703L │ │ │ │ -1848 template │ │ │ │ -1849 auto │ │ │ │ -_1_8_5_0 _c_o_u_n_t(const ___K_t& __x) const -> decltype(_M_h._M_count_tr(__x)) │ │ │ │ -1851 { return _M_h._M_count_tr(__x); } │ │ │ │ -1852#endif │ │ │ │ -1853 ///@} │ │ │ │ -1854 │ │ │ │ -1855#if __cplusplus > 201703L │ │ │ │ -1856 ///@{ │ │ │ │ -1857 /** │ │ │ │ -1858 * @brief Finds whether an element with the given key exists. │ │ │ │ -1859 * @param __x Key of elements to be located. │ │ │ │ -1860 * @return True if there is any element with the specified key. │ │ │ │ -1861 */ │ │ │ │ -1862 bool │ │ │ │ -_1_8_6_3 _c_o_n_t_a_i_n_s(const _k_e_y___t_y_p_e& __x) const │ │ │ │ -1864 { return _M_h.find(__x) != _M_h.end(); } │ │ │ │ -1865 │ │ │ │ -1866 template │ │ │ │ -1867 auto │ │ │ │ -_1_8_6_8 _c_o_n_t_a_i_n_s(const ___K_t& __x) const │ │ │ │ -1869 -> decltype(_M_h._M_find_tr(__x), _v_o_i_d(), true) │ │ │ │ -1870 { return _M_h._M_find_tr(__x) != _M_h.end(); } │ │ │ │ -1871 ///@} │ │ │ │ -1872#endif │ │ │ │ -1873 │ │ │ │ -1874 ///@{ │ │ │ │ -1875 /** │ │ │ │ -1876 * @brief Finds a subsequence matching given key. │ │ │ │ -1877 * @param __x Key to be located. │ │ │ │ -1878 * @return Pair of iterators that possibly points to the subsequence │ │ │ │ -1879 * matching given key. │ │ │ │ -1880 */ │ │ │ │ -1881 _s_t_d_:_:_p_a_i_r_<_i_t_e_r_a_t_o_r_,_ _i_t_e_r_a_t_o_r_> │ │ │ │ -_1_8_8_2 _e_q_u_a_l___r_a_n_g_e(const _k_e_y___t_y_p_e& __x) │ │ │ │ -1883 { return _M_h.equal_range(__x); } │ │ │ │ -1884 │ │ │ │ -1885#if __cplusplus > 201703L │ │ │ │ -1886 template │ │ │ │ -1887 auto │ │ │ │ -_1_8_8_8 _e_q_u_a_l___r_a_n_g_e(const ___K_t& __x) │ │ │ │ -1889 -> decltype(_M_h._M_equal_range_tr(__x)) │ │ │ │ -1890 { return _M_h._M_equal_range_tr(__x); } │ │ │ │ -1891#endif │ │ │ │ -1892 │ │ │ │ -1893 _s_t_d_:_:_p_a_i_r_<_c_o_n_s_t___i_t_e_r_a_t_o_r_,_ _c_o_n_s_t___i_t_e_r_a_t_o_r_> │ │ │ │ -_1_8_9_4 _e_q_u_a_l___r_a_n_g_e(const _k_e_y___t_y_p_e& __x) const │ │ │ │ -1895 { return _M_h.equal_range(__x); } │ │ │ │ -1896 │ │ │ │ -1897#if __cplusplus > 201703L │ │ │ │ -1898 template │ │ │ │ -1899 auto │ │ │ │ -_1_9_0_0 _e_q_u_a_l___r_a_n_g_e(const ___K_t& __x) const │ │ │ │ -1901 -> decltype(_M_h._M_equal_range_tr(__x)) │ │ │ │ -1902 { return _M_h._M_equal_range_tr(__x); } │ │ │ │ -1903#endif │ │ │ │ -1904 ///@} │ │ │ │ -1905 │ │ │ │ -1906 // bucket interface. │ │ │ │ -1907 │ │ │ │ -1908 /// Returns the number of buckets of the %unordered_multimap. │ │ │ │ -1909 _s_i_z_e___t_y_p_e │ │ │ │ -_1_9_1_0 _b_u_c_k_e_t___c_o_u_n_t() const noexcept │ │ │ │ -1911 { return _M_h.bucket_count(); } │ │ │ │ -1912 │ │ │ │ -1913 /// Returns the maximum number of buckets of the %unordered_multimap. │ │ │ │ -1914 _s_i_z_e___t_y_p_e │ │ │ │ -_1_9_1_5 _m_a_x___b_u_c_k_e_t___c_o_u_n_t() const noexcept │ │ │ │ -1916 { return _M_h.max_bucket_count(); } │ │ │ │ -1917 │ │ │ │ -1918 /* │ │ │ │ -1919 * @brief Returns the number of elements in a given bucket. │ │ │ │ -1920 * @param __n A bucket index. │ │ │ │ -1921 * @return The number of elements in the bucket. │ │ │ │ -1922 */ │ │ │ │ -1923 _s_i_z_e___t_y_p_e │ │ │ │ -1924 bucket_size(_s_i_z_e___t_y_p_e __n) const │ │ │ │ -1925 { return _M_h.bucket_size(__n); } │ │ │ │ -1926 │ │ │ │ -1927 /* │ │ │ │ -1928 * @brief Returns the bucket index of a given element. │ │ │ │ -1929 * @param __key A key instance. │ │ │ │ -1930 * @return The key bucket index. │ │ │ │ -1931 */ │ │ │ │ -1932 _s_i_z_e___t_y_p_e │ │ │ │ -1933 bucket(const _k_e_y___t_y_p_e& __key) const │ │ │ │ -1934 { return _M_h.bucket(__key); } │ │ │ │ -1935 │ │ │ │ -1936 /** │ │ │ │ -1937 * @brief Returns a read/write iterator pointing to the first bucket │ │ │ │ -1938 * element. │ │ │ │ -1939 * @param __n The bucket index. │ │ │ │ -1940 * @return A read/write local iterator. │ │ │ │ -1941 */ │ │ │ │ -1942 _l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_1_9_4_3 _b_e_g_i_n(_s_i_z_e___t_y_p_e __n) │ │ │ │ -1944 { return _M_h.begin(__n); } │ │ │ │ -1945 │ │ │ │ -1946 ///@{ │ │ │ │ -1947 /** │ │ │ │ -1948 * @brief Returns a read-only (constant) iterator pointing to the first │ │ │ │ -1949 * bucket element. │ │ │ │ -1950 * @param __n The bucket index. │ │ │ │ -1951 * @return A read-only local iterator. │ │ │ │ -1952 */ │ │ │ │ -1953 _c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_1_9_5_4 _b_e_g_i_n(_s_i_z_e___t_y_p_e __n) const │ │ │ │ -1955 { return _M_h.begin(__n); } │ │ │ │ -1956 │ │ │ │ -1957 _c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_1_9_5_8 _c_b_e_g_i_n(_s_i_z_e___t_y_p_e __n) const │ │ │ │ -1959 { return _M_h.cbegin(__n); } │ │ │ │ -1960 ///@} │ │ │ │ -1961 │ │ │ │ -1962 /** │ │ │ │ -1963 * @brief Returns a read/write iterator pointing to one past the last │ │ │ │ -1964 * bucket elements. │ │ │ │ -1965 * @param __n The bucket index. │ │ │ │ -1966 * @return A read/write local iterator. │ │ │ │ -1967 */ │ │ │ │ -1968 _l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_1_9_6_9 _e_n_d(_s_i_z_e___t_y_p_e __n) │ │ │ │ -1970 { return _M_h.end(__n); } │ │ │ │ -1971 │ │ │ │ -1972 ///@{ │ │ │ │ -1973 /** │ │ │ │ -1974 * @brief Returns a read-only (constant) iterator pointing to one past │ │ │ │ -1975 * the last bucket elements. │ │ │ │ -1976 * @param __n The bucket index. │ │ │ │ -1977 * @return A read-only local iterator. │ │ │ │ -1978 */ │ │ │ │ -1979 _c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_1_9_8_0 _e_n_d(_s_i_z_e___t_y_p_e __n) const │ │ │ │ -1981 { return _M_h.end(__n); } │ │ │ │ -1982 │ │ │ │ -1983 _c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_1_9_8_4 _c_e_n_d(_s_i_z_e___t_y_p_e __n) const │ │ │ │ -1985 { return _M_h.cend(__n); } │ │ │ │ -1986 ///@} │ │ │ │ -1987 │ │ │ │ -1988 // hash policy. │ │ │ │ -1989 │ │ │ │ -1990 /// Returns the average number of elements per bucket. │ │ │ │ -1991 float │ │ │ │ -_1_9_9_2 _l_o_a_d___f_a_c_t_o_r() const noexcept │ │ │ │ -1993 { return _M_h.load_factor(); } │ │ │ │ -1994 │ │ │ │ -1995 /// Returns a positive number that the %unordered_multimap tries to keep │ │ │ │ -1996 /// the load factor less than or equal to. │ │ │ │ -1997 float │ │ │ │ -_1_9_9_8 _m_a_x___l_o_a_d___f_a_c_t_o_r() const noexcept │ │ │ │ -1999 { return _M_h.max_load_factor(); } │ │ │ │ -2000 │ │ │ │ -2001 /** │ │ │ │ -2002 * @brief Change the %unordered_multimap maximum load factor. │ │ │ │ -2003 * @param __z The new maximum load factor. │ │ │ │ -2004 */ │ │ │ │ -2005 void │ │ │ │ -_2_0_0_6 _m_a_x___l_o_a_d___f_a_c_t_o_r(float _____z) │ │ │ │ -2007 { _M_h.max_load_factor(_____z); } │ │ │ │ -2008 │ │ │ │ -2009 /** │ │ │ │ -2010 * @brief May rehash the %unordered_multimap. │ │ │ │ -2011 * @param __n The new number of buckets. │ │ │ │ -2012 * │ │ │ │ -2013 * Rehash will occur only if the new number of buckets respect the │ │ │ │ -2014 * %unordered_multimap maximum load factor. │ │ │ │ -2015 */ │ │ │ │ -2016 void │ │ │ │ -_2_0_1_7 _r_e_h_a_s_h(_s_i_z_e___t_y_p_e __n) │ │ │ │ -2018 { _M_h.rehash(__n); } │ │ │ │ -2019 │ │ │ │ -2020 /** │ │ │ │ -2021 * @brief Prepare the %unordered_multimap for a specified number of │ │ │ │ -2022 * elements. │ │ │ │ -2023 * @param __n Number of elements required. │ │ │ │ -2024 * │ │ │ │ -2025 * Same as rehash(ceil(n / max_load_factor())). │ │ │ │ -2026 */ │ │ │ │ -2027 void │ │ │ │ -_2_0_2_8 _r_e_s_e_r_v_e(_s_i_z_e___t_y_p_e __n) │ │ │ │ -2029 { _M_h.reserve(__n); } │ │ │ │ -2030 │ │ │ │ -2031 template │ │ │ │ -2033 friend bool │ │ │ │ -2034 operator==(const _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p<___K_e_y_1, ___T_p_1, │ │ │ │ -2035 ___H_a_s_h_1, ___P_r_e_d_1, _Alloc1>&, │ │ │ │ -2036 const _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p<___K_e_y_1, ___T_p_1, │ │ │ │ -2037 ___H_a_s_h_1, ___P_r_e_d_1, _Alloc1>&); │ │ │ │ -2038 }; │ │ │ │ -2039 │ │ │ │ -2040#if __cpp_deduction_guides >= 201606 │ │ │ │ -2041 │ │ │ │ -2042 template>, │ │ │ │ -2044 typename _Pred = equal_to<__iter_key_t<_InputIterator>>, │ │ │ │ -2045 typename _Allocator = allocator<__iter_to_alloc_t<_InputIterator>>, │ │ │ │ -2046 typename = _RequireInputIter<_InputIterator>, │ │ │ │ -2047 typename = _RequireNotAllocatorOrIntegral<_Hash>, │ │ │ │ -2048 typename = _RequireNotAllocator<_Pred>, │ │ │ │ -2049 typename = _RequireAllocator<_Allocator>> │ │ │ │ -2050 unordered_multimap(_InputIterator, _InputIterator, │ │ │ │ -2051 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_<_i_n_t_,_ _i_n_t_>_:_:_s_i_z_e___t_y_p_e = {}, │ │ │ │ -2052 _Hash = _Hash(), _Pred = _Pred(), │ │ │ │ -2053 _Allocator = _Allocator()) │ │ │ │ -2054 -> unordered_multimap<__iter_key_t<_InputIterator>, │ │ │ │ -2055 __iter_val_t<_InputIterator>, _Hash, _Pred, │ │ │ │ -2056 _Allocator>; │ │ │ │ -2057 │ │ │ │ -2058 template, │ │ │ │ -2059 typename _Pred = equal_to<_Key>, │ │ │ │ -2060 typename _Allocator = allocator>, │ │ │ │ -2061 typename = _RequireNotAllocatorOrIntegral<_Hash>, │ │ │ │ -2062 typename = _RequireNotAllocator<_Pred>, │ │ │ │ -2063 typename = _RequireAllocator<_Allocator>> │ │ │ │ -2064 unordered_multimap(initializer_list>, │ │ │ │ -2065 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_<_i_n_t_,_ _i_n_t_>_:_:_s_i_z_e___t_y_p_e = {}, │ │ │ │ -2066 _Hash = _Hash(), _Pred = _Pred(), │ │ │ │ -2067 _Allocator = _Allocator()) │ │ │ │ -2068 -> unordered_multimap<_Key, _Tp, _Hash, _Pred, _Allocator>; │ │ │ │ -2069 │ │ │ │ -2070 template, │ │ │ │ -2072 typename = _RequireAllocator<_Allocator>> │ │ │ │ -2073 unordered_multimap(_InputIterator, _InputIterator, │ │ │ │ -2074 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_<_i_n_t_,_ _i_n_t_>_:_:_s_i_z_e___t_y_p_e, _Allocator) │ │ │ │ -2075 -> unordered_multimap<__iter_key_t<_InputIterator>, │ │ │ │ -2076 __iter_val_t<_InputIterator>, │ │ │ │ -2077 hash<__iter_key_t<_InputIterator>>, │ │ │ │ -2078 equal_to<__iter_key_t<_InputIterator>>, _Allocator>; │ │ │ │ -2079 │ │ │ │ -2080 template, │ │ │ │ -2082 typename = _RequireAllocator<_Allocator>> │ │ │ │ -2083 unordered_multimap(_InputIterator, _InputIterator, _Allocator) │ │ │ │ -2084 -> unordered_multimap<__iter_key_t<_InputIterator>, │ │ │ │ -2085 __iter_val_t<_InputIterator>, │ │ │ │ -2086 hash<__iter_key_t<_InputIterator>>, │ │ │ │ -2087 equal_to<__iter_key_t<_InputIterator>>, _Allocator>; │ │ │ │ -2088 │ │ │ │ -2089 template, │ │ │ │ -2091 typename = _RequireNotAllocatorOrIntegral<_Hash>, │ │ │ │ -2092 typename = _RequireAllocator<_Allocator>> │ │ │ │ -2093 unordered_multimap(_InputIterator, _InputIterator, │ │ │ │ -2094 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_<_i_n_t_,_ _i_n_t_>_:_:_s_i_z_e___t_y_p_e, _Hash, │ │ │ │ -2095 _Allocator) │ │ │ │ -2096 -> unordered_multimap<__iter_key_t<_InputIterator>, │ │ │ │ -2097 __iter_val_t<_InputIterator>, _Hash, │ │ │ │ -2098 equal_to<__iter_key_t<_InputIterator>>, _Allocator>; │ │ │ │ -2099 │ │ │ │ -2100 template> │ │ │ │ -2102 unordered_multimap(initializer_list>, │ │ │ │ -2103 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_<_i_n_t_,_ _i_n_t_>_:_:_s_i_z_e___t_y_p_e, │ │ │ │ -2104 _Allocator) │ │ │ │ -2105 -> unordered_multimap<_Key, _Tp, hash<_Key>, equal_to<_Key>, _Allocator>; │ │ │ │ -2106 │ │ │ │ -2107 template> │ │ │ │ -2109 unordered_multimap(initializer_list>, _Allocator) │ │ │ │ -2110 -> unordered_multimap<_Key, _Tp, hash<_Key>, equal_to<_Key>, _Allocator>; │ │ │ │ -2111 │ │ │ │ -2112 template, │ │ │ │ -2114 typename = _RequireAllocator<_Allocator>> │ │ │ │ -2115 unordered_multimap(initializer_list>, │ │ │ │ -2116 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_<_i_n_t_,_ _i_n_t_>_:_:_s_i_z_e___t_y_p_e, │ │ │ │ -2117 _Hash, _Allocator) │ │ │ │ -2118 -> unordered_multimap<_Key, _Tp, _Hash, equal_to<_Key>, _Allocator>; │ │ │ │ -2119 │ │ │ │ -2120#endif │ │ │ │ -2121 │ │ │ │ -2122 template │ │ │ │ -2123 inline void │ │ │ │ -2124 _s_w_a_p(unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, │ │ │ │ -2125 unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) │ │ │ │ -2126 noexcept(noexcept(__x.swap(__y))) │ │ │ │ -2127 { __x.swap(__y); } │ │ │ │ -2128 │ │ │ │ -2129 template │ │ │ │ -2130 inline void │ │ │ │ -2131 _s_w_a_p(unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, │ │ │ │ -2132 unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) │ │ │ │ -2133 noexcept(noexcept(__x.swap(__y))) │ │ │ │ -2134 { __x.swap(__y); } │ │ │ │ -2135 │ │ │ │ -2136 template │ │ │ │ -2137 inline bool │ │ │ │ -2138 operator==(const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, │ │ │ │ -2139 const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) │ │ │ │ -2140 { return __x._M_h._M_equal(__y._M_h); } │ │ │ │ -2141 │ │ │ │ -2142#if __cpp_impl_three_way_comparison < 201907L │ │ │ │ -2143 template │ │ │ │ -2144 inline bool │ │ │ │ -2145 operator!=(const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, │ │ │ │ -2146 const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) │ │ │ │ -2147 { return !(__x == __y); } │ │ │ │ -2148#endif │ │ │ │ -2149 │ │ │ │ -2150 template │ │ │ │ -2151 inline bool │ │ │ │ -2152 operator==(const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, │ │ │ │ -2153 const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) │ │ │ │ -2154 { return __x._M_h._M_equal(__y._M_h); } │ │ │ │ -2155 │ │ │ │ -2156#if __cpp_impl_three_way_comparison < 201907L │ │ │ │ -2157 template │ │ │ │ -2158 inline bool │ │ │ │ -2159 operator!=(const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, │ │ │ │ -2160 const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) │ │ │ │ -2161 { return !(__x == __y); } │ │ │ │ -2162#endif │ │ │ │ -2163 │ │ │ │ -2164_GLIBCXX_END_NAMESPACE_CONTAINER │ │ │ │ -2165 │ │ │ │ -2166#if __cplusplus > 201402L │ │ │ │ -2167 // Allow std::unordered_map access to internals of compatible maps. │ │ │ │ -2168 template │ │ │ │ -2170 struct _Hash_merge_helper< │ │ │ │ -2171 _GLIBCXX_STD_C::unordered_map<_Key, _Val, _Hash1, _Eq1, _Alloc>, │ │ │ │ -2172 _Hash2, _Eq2> │ │ │ │ -2173 { │ │ │ │ -2174 private: │ │ │ │ -2175 template │ │ │ │ -2176 using unordered_map = _GLIBCXX_STD_C::unordered_map<_Tp...>; │ │ │ │ -2177 template │ │ │ │ -2178 using unordered_multimap = _GLIBCXX_STD_C::unordered_multimap<_Tp...>; │ │ │ │ -2179 │ │ │ │ -2180 friend unordered_map<_Key, _Val, _Hash1, _Eq1, _Alloc>; │ │ │ │ -2181 │ │ │ │ -2182 static auto& │ │ │ │ -2183 _S_get_table(unordered_map<_Key, _Val, _Hash2, _Eq2, _Alloc>& __map) │ │ │ │ -2184 { return __map._M_h; } │ │ │ │ -2185 │ │ │ │ -2186 static auto& │ │ │ │ -2187 _S_get_table(unordered_multimap<_Key, _Val, _Hash2, _Eq2, _Alloc>& __map) │ │ │ │ -2188 { return __map._M_h; } │ │ │ │ -2189 }; │ │ │ │ -2190 │ │ │ │ -2191 // Allow std::unordered_multimap access to internals of compatible maps. │ │ │ │ -2192 template │ │ │ │ -2194 struct _Hash_merge_helper< │ │ │ │ -2195 _GLIBCXX_STD_C::unordered_multimap<_Key, _Val, _Hash1, _Eq1, _Alloc>, │ │ │ │ -2196 _Hash2, _Eq2> │ │ │ │ -2197 { │ │ │ │ -2198 private: │ │ │ │ -2199 template │ │ │ │ -2200 using unordered_map = _GLIBCXX_STD_C::unordered_map<_Tp...>; │ │ │ │ -2201 template │ │ │ │ -2202 using unordered_multimap = _GLIBCXX_STD_C::unordered_multimap<_Tp...>; │ │ │ │ -2203 │ │ │ │ -2204 friend unordered_multimap<_Key, _Val, _Hash1, _Eq1, _Alloc>; │ │ │ │ -2205 │ │ │ │ -2206 static auto& │ │ │ │ -2207 _S_get_table(unordered_map<_Key, _Val, _Hash2, _Eq2, _Alloc>& __map) │ │ │ │ -2208 { return __map._M_h; } │ │ │ │ -2209 │ │ │ │ -2210 static auto& │ │ │ │ -2211 _S_get_table(unordered_multimap<_Key, _Val, _Hash2, _Eq2, _Alloc>& __map) │ │ │ │ -2212 { return __map._M_h; } │ │ │ │ -2213 }; │ │ │ │ -2214#endif // C++17 │ │ │ │ -2215 │ │ │ │ -2216_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ -2217} // namespace std │ │ │ │ -2218 │ │ │ │ -2219#endif /* _UNORDERED_MAP_H */ │ │ │ │ -_s_t_d_:_:_m_o_v_e │ │ │ │ -constexpr std::remove_reference< _Tp >::type && move(_Tp &&__t) noexcept │ │ │ │ -Convert a value to an rvalue. │ │ │ │ -DDeeffiinniittiioonn _m_o_v_e_._h_:_1_0_4 │ │ │ │ -_s_t_d_:_:_s_w_a_p │ │ │ │ -void swap(any &__x, any &__y) noexcept │ │ │ │ -Exchange the states of two any objects. │ │ │ │ -DDeeffiinniittiioonn _a_n_y_:_4_2_9 │ │ │ │ +253 _~_l_o_c_k___g_u_a_r_d() │ │ │ │ +254 { _M_device.unlock(); } │ │ │ │ +255 │ │ │ │ +256 _l_o_c_k___g_u_a_r_d(const _l_o_c_k___g_u_a_r_d&) = delete; │ │ │ │ +257 _l_o_c_k___g_u_a_r_d& operator=(const _l_o_c_k___g_u_a_r_d&) = delete; │ │ │ │ +258 │ │ │ │ +259 private: │ │ │ │ +260 mutex_type& _M_device; │ │ │ │ +261 }; │ │ │ │ +262 │ │ │ │ +263 /// @} group mutexes │ │ │ │ +264_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ +265} // namespace │ │ │ │ +266#endif // C++11 │ │ │ │ +267#endif // _GLIBCXX_MUTEX_H │ │ │ │ +_s_y_s_t_e_m___e_r_r_o_r │ │ │ │ +_c_+_+_0_x___w_a_r_n_i_n_g_._h │ │ │ │ +_f_u_n_c_t_e_x_c_e_p_t_._h │ │ │ │ +_s_t_d_:_:_t_r_y___t_o___l_o_c_k │ │ │ │ +constexpr try_to_lock_t try_to_lock │ │ │ │ +Tag used to prevent a scoped lock from blocking if a mutex is locked. │ │ │ │ +DDeeffiinniittiioonn _s_t_d___m_u_t_e_x_._h_:_2_2_8 │ │ │ │ +_s_t_d_:_:_a_d_o_p_t___l_o_c_k │ │ │ │ +constexpr adopt_lock_t adopt_lock │ │ │ │ +Tag used to make a scoped lock take ownership of a locked mutex. │ │ │ │ +DDeeffiinniittiioonn _s_t_d___m_u_t_e_x_._h_:_2_3_1 │ │ │ │ +_s_t_d_:_:_d_e_f_e_r___l_o_c_k │ │ │ │ +constexpr defer_lock_t defer_lock │ │ │ │ +Tag used to prevent a scoped lock from acquiring ownership of a mutex. │ │ │ │ +DDeeffiinniittiioonn _s_t_d___m_u_t_e_x_._h_:_2_2_5 │ │ │ │ _s_t_d │ │ │ │ ISO C++ entities toplevel namespace is std. │ │ │ │ -_s_t_d_:_:_____u_m_m_a_p___t_r_a_i_t_s │ │ │ │ -__detail::_Hashtable_traits< _Cache, false, false > __ummap_traits │ │ │ │ -Base types for unordered_multimap. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_5_7 │ │ │ │ -_s_t_d_:_:_____u_m_a_p___t_r_a_i_t_s │ │ │ │ -__detail::_Hashtable_traits< _Cache, false, true > __umap_traits │ │ │ │ -Base types for unordered_map. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_4_0 │ │ │ │ -_s_t_d_:_:_i_t_e_r_a_t_o_r │ │ │ │ -Common iterator class. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___i_t_e_r_a_t_o_r___b_a_s_e___t_y_p_e_s_._h_:_1_2_8 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p │ │ │ │ -A standard container composed of equivalent keys (possibly containing multiple │ │ │ │ -of each key value) tha... │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_5_0 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_l_o_a_d___f_a_c_t_o_r │ │ │ │ -float load_factor() const noexcept │ │ │ │ -Returns the average number of elements per bucket. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_9_9_2 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_r_e_f_e_r_e_n_c_e │ │ │ │ -_Hashtable::reference reference │ │ │ │ -Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_7_0 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_e_r_a_s_e │ │ │ │ -iterator erase(iterator __position) │ │ │ │ -Erases an element from an unordered_multimap. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_6_9_0 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_e_n_d │ │ │ │ -const_iterator end() const noexcept │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_5_0_2 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_e_r_a_s_e │ │ │ │ -size_type erase(const key_type &__x) │ │ │ │ -Erases elements according to the provided key. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_7_0_6 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_e_q_u_a_l___r_a_n_g_e │ │ │ │ -std::pair< iterator, iterator > equal_range(const key_type &__x) │ │ │ │ -Finds a subsequence matching given key. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_8_8_2 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_b_u_c_k_e_t___c_o_u_n_t │ │ │ │ -size_type bucket_count() const noexcept │ │ │ │ -Returns the number of buckets of the unordered_multimap. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_9_1_0 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_i_t_e_r_a_t_o_r │ │ │ │ -_Hashtable::iterator iterator │ │ │ │ -Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_7_2 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_m_a_x___b_u_c_k_e_t___c_o_u_n_t │ │ │ │ -size_type max_bucket_count() const noexcept │ │ │ │ -Returns the maximum number of buckets of the unordered_multimap. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_9_1_5 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_b_e_g_i_n │ │ │ │ -iterator begin() noexcept │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_4_7_1 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_b_e_g_i_n │ │ │ │ -const_iterator begin() const noexcept │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_4_8_0 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_h_a_s_h___f_u_n_c_t_i_o_n │ │ │ │ -hasher hash_function() const │ │ │ │ -Returns the hash functor object with which the unordered_multimap was │ │ │ │ -constructed. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_7_9_1 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_i_n_s_e_r_t │ │ │ │ -iterator insert(const_iterator __hint, node_type &&__nh) │ │ │ │ -Re-insert an extracted node. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_6_6_6 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_i_n_s_e_r_t │ │ │ │ -__enable_if_t< is_constructible< value_type, _Pair && >::value, iterator > │ │ │ │ -insert(const_iterator __hint, _Pair &&__x) │ │ │ │ -Inserts a std::pair into the unordered_multimap. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_6_1_5 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ -unordered_multimap & operator=(const unordered_multimap &)=default │ │ │ │ -Copy assignment operator. │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_k_e_y___e_q │ │ │ │ -key_equal key_eq() const │ │ │ │ -Returns the key comparison object with which the unordered_multimap was │ │ │ │ -constructed. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_7_9_7 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_c_o_u_n_t │ │ │ │ -size_type count(const key_type &__x) const │ │ │ │ -Finds the number of elements. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_8_4_4 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_f_i_n_d │ │ │ │ -const_iterator find(const key_type &__x) const │ │ │ │ -Tries to locate an element in an unordered_multimap. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_8_2_6 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_m_a_p_p_e_d___t_y_p_e │ │ │ │ -_Hashtable::mapped_type mapped_type │ │ │ │ -Public typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_6_0 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_f_i_n_d │ │ │ │ -auto find(const _Kt &__x) -> decltype(_M_h._M_find_tr(__x)) │ │ │ │ -Tries to locate an element in an unordered_multimap. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_8_2_1 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_e_n_d │ │ │ │ -local_iterator end(size_type __n) │ │ │ │ -Returns a read/write iterator pointing to one past the last bucket elements. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_9_6_9 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_i_n_s_e_r_t │ │ │ │ -void insert(_InputIterator __first, _InputIterator __last) │ │ │ │ -A template function that attempts to insert a range of elements. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_6_3_0 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ -unordered_multimap & operator=(initializer_list< value_type > __l) │ │ │ │ -Unordered_multimap list assignment operator. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_4_3_6 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p │ │ │ │ -unordered_multimap(size_type __n, const hasher &__hf=hasher(), const key_equal │ │ │ │ -&__eql=key_equal(), const allocator_type &__a=allocator_type()) │ │ │ │ -Default constructor creates no elements. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_9_7 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_v_a_l_u_e___t_y_p_e │ │ │ │ -_Hashtable::value_type value_type │ │ │ │ -Public typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_5_9 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_e_m_p_l_a_c_e │ │ │ │ -iterator emplace(_Args &&... __args) │ │ │ │ -Attempts to build and insert a std::pair into the unordered_multimap. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_5_2_9 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_e_x_t_r_a_c_t │ │ │ │ -node_type extract(const key_type &__key) │ │ │ │ -Extract a node. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_6_5_6 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_c_o_n_t_a_i_n_s │ │ │ │ -bool contains(const key_type &__x) const │ │ │ │ -Finds whether an element with the given key exists. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_8_6_3 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_c_o_n_s_t___r_e_f_e_r_e_n_c_e │ │ │ │ -_Hashtable::const_reference const_reference │ │ │ │ -Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_7_1 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_i_n_s_e_r_t │ │ │ │ -iterator insert(node_type &&__nh) │ │ │ │ -Re-insert an extracted node. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_6_6_1 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_e_r_a_s_e │ │ │ │ -iterator erase(const_iterator __position) │ │ │ │ -Erases an element from an unordered_multimap. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_6_8_5 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_e_n_d │ │ │ │ -iterator end() noexcept │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_4_9_3 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_b_e_g_i_n │ │ │ │ -local_iterator begin(size_type __n) │ │ │ │ -Returns a read/write iterator pointing to the first bucket element. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_9_4_3 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_m_a_x___l_o_a_d___f_a_c_t_o_r │ │ │ │ -float max_load_factor() const noexcept │ │ │ │ -Returns a positive number that the unordered_multimap tries to keep the load │ │ │ │ -factor less than or equa... │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_9_9_8 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p │ │ │ │ -unordered_multimap()=default │ │ │ │ -Default constructor. │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_i_n_s_e_r_t │ │ │ │ -iterator insert(value_type &&__x) │ │ │ │ -Inserts a std::pair into the unordered_multimap. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_5_7_4 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_i_n_s_e_r_t │ │ │ │ -iterator insert(const value_type &__x) │ │ │ │ -Inserts a std::pair into the unordered_multimap. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_5_7_0 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ -unordered_multimap & operator=(unordered_multimap &&)=default │ │ │ │ -Move assignment operator. │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_h_a_s_h_e_r │ │ │ │ -_Hashtable::hasher hasher │ │ │ │ -Public typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_6_1 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_Hashtable::local_iterator local_iterator │ │ │ │ -Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_7_4 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_r_e_s_e_r_v_e │ │ │ │ -void reserve(size_type __n) │ │ │ │ -Prepare the unordered_multimap for a specified number of elements. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_2_0_2_8 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_e_q_u_a_l___r_a_n_g_e │ │ │ │ -std::pair< const_iterator, const_iterator > equal_range(const key_type &__x) │ │ │ │ -const │ │ │ │ -Finds a subsequence matching given key. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_8_9_4 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p │ │ │ │ -unordered_multimap(_InputIterator __first, _InputIterator __last, size_type │ │ │ │ -__n=0, const hasher &__hf=hasher(), const key_equal &__eql=key_equal(), const │ │ │ │ -allocator_type &__a=allocator_type()) │ │ │ │ -Builds an unordered_multimap from a range. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_3_1_8 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_c_l_e_a_r │ │ │ │ -void clear() noexcept │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_7_3_5 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_f_i_n_d │ │ │ │ -iterator find(const key_type &__x) │ │ │ │ -Tries to locate an element in an unordered_multimap. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_8_1_5 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p │ │ │ │ -unordered_multimap(initializer_list< value_type > __l, size_type __n=0, const │ │ │ │ -hasher &__hf=hasher(), const key_equal &__eql=key_equal(), const allocator_type │ │ │ │ -&__a=allocator_type()) │ │ │ │ -Builds an unordered_multimap from an initializer_list. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_3_7_3 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_c_o_u_n_t │ │ │ │ -auto count(const _Kt &__x) const -> decltype(_M_h._M_count_tr(__x)) │ │ │ │ -Finds the number of elements. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_8_5_0 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_e_r_a_s_e │ │ │ │ -iterator erase(const_iterator __first, const_iterator __last) │ │ │ │ -Erases a [__first,__last) range of elements from an unordered_multimap. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_7_2_5 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_e_n_d │ │ │ │ -const_local_iterator end(size_type __n) const │ │ │ │ -Returns a read-only (constant) iterator pointing to one past the last bucket │ │ │ │ -elements. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_9_8_0 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_p_o_i_n_t_e_r │ │ │ │ -_Hashtable::pointer pointer │ │ │ │ -Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_6_8 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_a_l_l_o_c_a_t_o_r___t_y_p_e │ │ │ │ -_Hashtable::allocator_type allocator_type │ │ │ │ -Public typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_6_3 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_b_e_g_i_n │ │ │ │ -const_local_iterator begin(size_type __n) const │ │ │ │ -Returns a read-only (constant) iterator pointing to the first bucket element. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_9_5_4 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_f_i_n_d │ │ │ │ -auto find(const _Kt &__x) const -> decltype(_M_h._M_find_tr(__x)) │ │ │ │ -Tries to locate an element in an unordered_multimap. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_8_3_2 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_Hashtable::const_local_iterator const_local_iterator │ │ │ │ -Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_7_5 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p │ │ │ │ -unordered_multimap(unordered_multimap &&)=default │ │ │ │ -Move constructor. │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p │ │ │ │ -unordered_multimap(const allocator_type &__a) │ │ │ │ -Creates an unordered_multimap with no elements. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_3_3_7 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_d_i_f_f_e_r_e_n_c_e___t_y_p_e │ │ │ │ -_Hashtable::difference_type difference_type │ │ │ │ -Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_7_7 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_s_i_z_e___t_y_p_e │ │ │ │ -_Hashtable::size_type size_type │ │ │ │ -Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_7_6 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_c_o_n_s_t___p_o_i_n_t_e_r │ │ │ │ -_Hashtable::const_pointer const_pointer │ │ │ │ -Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_6_9 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_i_n_s_e_r_t │ │ │ │ -__enable_if_t< is_constructible< value_type, _Pair && >::value, iterator > │ │ │ │ -insert(_Pair &&__x) │ │ │ │ -Inserts a std::pair into the unordered_multimap. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_5_7_9 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_c_o_n_t_a_i_n_s │ │ │ │ -auto contains(const _Kt &__x) const -> decltype(_M_h._M_find_tr(__x), void(), │ │ │ │ -true) │ │ │ │ -Finds whether an element with the given key exists. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_8_6_8 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_s_w_a_p │ │ │ │ -void swap(unordered_multimap &__x) noexcept(noexcept(_M_h.swap(__x._M_h))) │ │ │ │ -Swaps data with another unordered_multimap. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_7_4_9 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_r_e_h_a_s_h │ │ │ │ -void rehash(size_type __n) │ │ │ │ -May rehash the unordered_multimap. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_2_0_1_7 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ -_Hashtable::const_iterator const_iterator │ │ │ │ -Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_7_3 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_i_n_s_e_r_t │ │ │ │ -void insert(initializer_list< value_type > __l) │ │ │ │ -Attempts to insert a list of elements into the unordered_multimap. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_6_4_2 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_c_e_n_d │ │ │ │ -const_iterator cend() const noexcept │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_5_0_6 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_m_a_x___s_i_z_e │ │ │ │ -size_type max_size() const noexcept │ │ │ │ -Returns the maximum size of the unordered_multimap. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_4_6_1 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_c_b_e_g_i_n │ │ │ │ -const_local_iterator cbegin(size_type __n) const │ │ │ │ -Returns a read-only (constant) iterator pointing to the first bucket element. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_9_5_8 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_e_m_p_t_y │ │ │ │ -bool empty() const noexcept │ │ │ │ -Returns true if the unordered_multimap is empty. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_4_5_1 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_c_b_e_g_i_n │ │ │ │ -const_iterator cbegin() const noexcept │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_4_8_4 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_k_e_y___t_y_p_e │ │ │ │ -_Hashtable::key_type key_type │ │ │ │ -Public typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_5_8 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_e_x_t_r_a_c_t │ │ │ │ -node_type extract(const_iterator __pos) │ │ │ │ -Extract a node. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_6_4_8 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_c_e_n_d │ │ │ │ -const_local_iterator cend(size_type __n) const │ │ │ │ -Returns a read-only (constant) iterator pointing to one past the last bucket │ │ │ │ -elements. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_9_8_4 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_i_n_s_e_r_t │ │ │ │ -iterator insert(const_iterator __hint, const value_type &__x) │ │ │ │ -Inserts a std::pair into the unordered_multimap. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_6_0_4 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_s_i_z_e │ │ │ │ -size_type size() const noexcept │ │ │ │ -Returns the size of the unordered_multimap. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_4_5_6 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p │ │ │ │ -unordered_multimap(const unordered_multimap &)=default │ │ │ │ -Copy constructor. │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_e_m_p_l_a_c_e___h_i_n_t │ │ │ │ -iterator emplace_hint(const_iterator __pos, _Args &&... __args) │ │ │ │ -Attempts to build and insert a std::pair into the unordered_multimap. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_5_5_6 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_i_n_s_e_r_t │ │ │ │ -iterator insert(const_iterator __hint, value_type &&__x) │ │ │ │ -Inserts a std::pair into the unordered_multimap. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_6_1_0 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_e_q_u_a_l___r_a_n_g_e │ │ │ │ -auto equal_range(const _Kt &__x) -> decltype(_M_h._M_equal_range_tr(__x)) │ │ │ │ -Finds a subsequence matching given key. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_8_8_8 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_k_e_y___e_q_u_a_l │ │ │ │ -_Hashtable::key_equal key_equal │ │ │ │ -Public typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_6_2 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_g_e_t___a_l_l_o_c_a_t_o_r │ │ │ │ -allocator_type get_allocator() const noexcept │ │ │ │ -Returns the allocator object used by the unordered_multimap. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_4_4_4 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_m_a_x___l_o_a_d___f_a_c_t_o_r │ │ │ │ -void max_load_factor(float __z) │ │ │ │ -Change the unordered_multimap maximum load factor. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_2_0_0_6 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_e_q_u_a_l___r_a_n_g_e │ │ │ │ -auto equal_range(const _Kt &__x) const -> decltype(_M_h._M_equal_range_tr(__x)) │ │ │ │ -Finds a subsequence matching given key. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_9_0_0 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p │ │ │ │ -A standard container composed of unique keys (containing at most one of each │ │ │ │ -key value) that associat... │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_0_5 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_i_n_s_e_r_t │ │ │ │ -iterator insert(const_iterator __hint, value_type &&__x) │ │ │ │ -Attempts to insert a std::pair into the unordered_map. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_5_9_8 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_i_t_e_r_a_t_o_r │ │ │ │ -_Hashtable::iterator iterator │ │ │ │ -Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_7 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_m_a_x___l_o_a_d___f_a_c_t_o_r │ │ │ │ -void max_load_factor(float __z) │ │ │ │ -Change the unordered_map maximum load factor. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_1_0_6 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_a_t │ │ │ │ -const mapped_type & at(const key_type &__k) const │ │ │ │ -Access to unordered_map data. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_0_0_2 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_c_o_n_t_a_i_n_s │ │ │ │ -bool contains(const key_type &__x) const │ │ │ │ -Finds whether an element with the given key exists. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_9_2_2 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_e_x_t_r_a_c_t │ │ │ │ -node_type extract(const key_type &__key) │ │ │ │ -Extract a node. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_4_3_5 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_i_n_s_e_r_t │ │ │ │ -void insert(_InputIterator __first, _InputIterator __last) │ │ │ │ -A template function that attempts to insert a range of elements. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_6_1_8 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_g_e_t___a_l_l_o_c_a_t_o_r │ │ │ │ -allocator_type get_allocator() const noexcept │ │ │ │ -Returns the allocator object used by the unordered_map. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_3_0_0 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_f_i_n_d │ │ │ │ -auto find(const _Kt &__x) -> decltype(_M_h._M_find_tr(__x)) │ │ │ │ -Tries to locate an element in an unordered_map. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_8_7_6 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ -unordered_map & operator=(initializer_list< value_type > __l) │ │ │ │ -Unordered_map list assignment operator. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_2_9_2 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_c_o_n_s_t___p_o_i_n_t_e_r │ │ │ │ -_Hashtable::const_pointer const_pointer │ │ │ │ -Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_4 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_f_i_n_d │ │ │ │ -auto find(const _Kt &__x) const -> decltype(_M_h._M_find_tr(__x)) │ │ │ │ -Tries to locate an element in an unordered_map. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_8_8_7 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_i_n_s_e_r_t │ │ │ │ -void insert(initializer_list< value_type > __l) │ │ │ │ -Attempts to insert a list of elements into the unordered_map. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_6_2_9 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_i_n_s_e_r_t │ │ │ │ -__enable_if_t< is_constructible< value_type, _Pair && >::value, iterator > │ │ │ │ -insert(const_iterator __hint, _Pair &&__x) │ │ │ │ -Attempts to insert a std::pair into the unordered_map. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_6_0_3 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_e_q_u_a_l___r_a_n_g_e │ │ │ │ -std::pair< iterator, iterator > equal_range(const key_type &__x) │ │ │ │ -Finds a subsequence matching given key. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_9_4_3 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_a_t │ │ │ │ -mapped_type & at(const key_type &__k) │ │ │ │ -Access to unordered_map data. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_9_9_8 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_e_r_a_s_e │ │ │ │ -iterator erase(const_iterator __first, const_iterator __last) │ │ │ │ -Erases a [__first,__last) range of elements from an unordered_map. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_7_8_2 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_t_r_y___e_m_p_l_a_c_e │ │ │ │ -iterator try_emplace(const_iterator __hint, const key_type &__k, _Args &&... │ │ │ │ -__args) │ │ │ │ -Attempts to build and insert a std::pair into the unordered_map. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_5_1_7 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_e_x_t_r_a_c_t │ │ │ │ -node_type extract(const_iterator __pos) │ │ │ │ -Extract a node. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_4_2_7 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_i_n_s_e_r_t │ │ │ │ -std::pair< iterator, bool > insert(const value_type &__x) │ │ │ │ -Attempts to insert a std::pair into the unordered_map. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_5_5_3 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_r_e_s_e_r_v_e │ │ │ │ -void reserve(size_type __n) │ │ │ │ -Prepare the unordered_map for a specified number of elements. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_1_2_8 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_c_b_e_g_i_n │ │ │ │ -const_local_iterator cbegin(size_type __n) const │ │ │ │ -Returns a read-only (constant) iterator pointing to the first bucket element. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_0_5_8 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_e_q_u_a_l___r_a_n_g_e │ │ │ │ -std::pair< const_iterator, const_iterator > equal_range(const key_type &__x) │ │ │ │ -const │ │ │ │ -Finds a subsequence matching given key. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_9_5_5 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_i_n_s_e_r_t │ │ │ │ -iterator insert(const_iterator, node_type &&__nh) │ │ │ │ -Re-insert an extracted node. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_4_4_5 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_r_e_f_e_r_e_n_c_e │ │ │ │ -_Hashtable::reference reference │ │ │ │ -Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_5 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_i_n_s_e_r_t │ │ │ │ -iterator insert(const_iterator __hint, const value_type &__x) │ │ │ │ -Attempts to insert a std::pair into the unordered_map. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_5_9_2 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_e_n_d │ │ │ │ -iterator end() noexcept │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_3_4_9 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_a_l_l_o_c_a_t_o_r___t_y_p_e │ │ │ │ -_Hashtable::allocator_type allocator_type │ │ │ │ -Public typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_1_8 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_u_n_o_r_d_e_r_e_d___m_a_p │ │ │ │ -unordered_map(const unordered_map &)=default │ │ │ │ -Copy constructor. │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_c_o_u_n_t │ │ │ │ -size_type count(const key_type &__x) const │ │ │ │ -Finds the number of elements. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_9_0_3 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_e_m_p_t_y │ │ │ │ -bool empty() const noexcept │ │ │ │ -Returns true if the unordered_map is empty. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_3_0_7 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_e_r_a_s_e │ │ │ │ -size_type erase(const key_type &__x) │ │ │ │ -Erases elements according to the provided key. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_7_6_4 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_f_i_n_d │ │ │ │ -const_iterator find(const key_type &__x) const │ │ │ │ -Tries to locate an element in an unordered_map. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_8_8_1 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_u_n_o_r_d_e_r_e_d___m_a_p │ │ │ │ -unordered_map(unordered_map &&)=default │ │ │ │ -Move constructor. │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_e_n_d │ │ │ │ -const_local_iterator end(size_type __n) const │ │ │ │ -Returns a read-only (constant) iterator pointing to one past the last bucket │ │ │ │ -elements. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_0_8_0 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_e_q_u_a_l___r_a_n_g_e │ │ │ │ -auto equal_range(const _Kt &__x) -> decltype(_M_h._M_equal_range_tr(__x)) │ │ │ │ -Finds a subsequence matching given key. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_9_4_9 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_c_o_n_t_a_i_n_s │ │ │ │ -auto contains(const _Kt &__x) const -> decltype(_M_h._M_find_tr(__x), void(), │ │ │ │ -true) │ │ │ │ -Finds whether an element with the given key exists. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_9_2_7 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_m_a_x___s_i_z_e │ │ │ │ -size_type max_size() const noexcept │ │ │ │ -Returns the maximum size of the unordered_map. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_3_1_7 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_e_n_d │ │ │ │ -const_iterator end() const noexcept │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_3_5_8 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_u_n_o_r_d_e_r_e_d___m_a_p │ │ │ │ -unordered_map()=default │ │ │ │ -Default constructor. │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_m_a_p_p_e_d___t_y_p_e │ │ │ │ -_Hashtable::mapped_type mapped_type │ │ │ │ -Public typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_1_5 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ -unordered_map & operator=(unordered_map &&)=default │ │ │ │ -Move assignment operator. │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_b_e_g_i_n │ │ │ │ -const_local_iterator begin(size_type __n) const │ │ │ │ -Returns a read-only (constant) iterator pointing to the first bucket element. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_0_5_4 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_u_n_o_r_d_e_r_e_d___m_a_p │ │ │ │ -unordered_map(size_type __n, const hasher &__hf=hasher(), const key_equal │ │ │ │ -&__eql=key_equal(), const allocator_type &__a=allocator_type()) │ │ │ │ -Default constructor creates no elements. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_5_3 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_e_m_p_l_a_c_e │ │ │ │ -std::pair< iterator, bool > emplace(_Args &&... __args) │ │ │ │ -Attempts to build and insert a std::pair into the unordered_map. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_3_9_0 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_c_e_n_d │ │ │ │ -const_local_iterator cend(size_type __n) const │ │ │ │ -Returns a read-only (constant) iterator pointing to one past the last bucket │ │ │ │ -elements. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_0_8_4 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_s_i_z_e │ │ │ │ -size_type size() const noexcept │ │ │ │ -Returns the size of the unordered_map. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_3_1_2 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_i_n_s_e_r_t │ │ │ │ -__enable_if_t< is_constructible< value_type, _Pair && >::value, pair< iterator, │ │ │ │ -bool > > insert(_Pair &&__x) │ │ │ │ -Attempts to insert a std::pair into the unordered_map. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_5_6_5 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_o_p_e_r_a_t_o_r_[_] │ │ │ │ -mapped_type & operator[](key_type &&__k) │ │ │ │ -Subscript ( [] ) access to unordered_map data. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_9_8_5 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_i_n_s_e_r_t │ │ │ │ -std::pair< iterator, bool > insert(value_type &&__x) │ │ │ │ -Attempts to insert a std::pair into the unordered_map. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_5_5_9 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_h_a_s_h_e_r │ │ │ │ -_Hashtable::hasher hasher │ │ │ │ -Public typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_1_6 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_i_n_s_e_r_t___o_r___a_s_s_i_g_n │ │ │ │ -pair< iterator, bool > insert_or_assign(const key_type &__k, _Obj &&__obj) │ │ │ │ -Attempts to insert a std::pair into the unordered_map. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_6_5_6 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_u_n_o_r_d_e_r_e_d___m_a_p │ │ │ │ -unordered_map(_InputIterator __first, _InputIterator __last, size_type __n=0, │ │ │ │ -const hasher &__hf=hasher(), const key_equal &__eql=key_equal(), const │ │ │ │ -allocator_type &__a=allocator_type()) │ │ │ │ -Builds an unordered_map from a range. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_7_4 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_c_l_e_a_r │ │ │ │ -void clear() noexcept │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_7_9_2 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_o_p_e_r_a_t_o_r_[_] │ │ │ │ -mapped_type & operator[](const key_type &__k) │ │ │ │ -Subscript ( [] ) access to unordered_map data. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_9_8_1 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_t_r_y___e_m_p_l_a_c_e │ │ │ │ -pair< iterator, bool > try_emplace(const key_type &__k, _Args &&... __args) │ │ │ │ -Attempts to build and insert a std::pair into the unordered_map. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_4_7_3 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_b_e_g_i_n │ │ │ │ -const_iterator begin() const noexcept │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_3_3_6 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_k_e_y___e_q │ │ │ │ -key_equal key_eq() const │ │ │ │ -Returns the key comparison object with which the unordered_map was constructed. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_8_5_2 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_c_o_n_s_t___r_e_f_e_r_e_n_c_e │ │ │ │ -_Hashtable::const_reference const_reference │ │ │ │ -Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_6 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_k_e_y___e_q_u_a_l │ │ │ │ -_Hashtable::key_equal key_equal │ │ │ │ -Public typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_1_7 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_Hashtable::local_iterator local_iterator │ │ │ │ -Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_9 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_e_r_a_s_e │ │ │ │ -iterator erase(iterator __position) │ │ │ │ -Erases an element from an unordered_map. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_7_4_7 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_c_e_n_d │ │ │ │ -const_iterator cend() const noexcept │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_3_6_2 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_e_n_d │ │ │ │ -local_iterator end(size_type __n) │ │ │ │ -Returns a read/write iterator pointing to one past the last bucket elements. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_0_6_9 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_p_o_i_n_t_e_r │ │ │ │ -_Hashtable::pointer pointer │ │ │ │ -Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_3 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_i_n_s_e_r_t___o_r___a_s_s_i_g_n │ │ │ │ -iterator insert_or_assign(const_iterator __hint, const key_type &__k, _Obj │ │ │ │ -&&__obj) │ │ │ │ -Attempts to insert a std::pair into the unordered_map. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_7_0_5 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_u_n_o_r_d_e_r_e_d___m_a_p │ │ │ │ -unordered_map(const allocator_type &__a) │ │ │ │ -Creates an unordered_map with no elements. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_9_3 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_k_e_y___t_y_p_e │ │ │ │ -_Hashtable::key_type key_type │ │ │ │ -Public typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_1_3 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_b_u_c_k_e_t___c_o_u_n_t │ │ │ │ -size_type bucket_count() const noexcept │ │ │ │ -Returns the number of buckets of the unordered_map. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_0_1_0 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_b_e_g_i_n │ │ │ │ -iterator begin() noexcept │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_3_2_7 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_h_a_s_h___f_u_n_c_t_i_o_n │ │ │ │ -hasher hash_function() const │ │ │ │ -Returns the hash functor object with which the unordered_map was constructed. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_8_4_6 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_e_q_u_a_l___r_a_n_g_e │ │ │ │ -auto equal_range(const _Kt &__x) const -> decltype(_M_h._M_equal_range_tr(__x)) │ │ │ │ -Finds a subsequence matching given key. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_9_6_1 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_u_n_o_r_d_e_r_e_d___m_a_p │ │ │ │ -unordered_map(initializer_list< value_type > __l, size_type __n=0, const hasher │ │ │ │ -&__hf=hasher(), const key_equal &__eql=key_equal(), const allocator_type │ │ │ │ -&__a=allocator_type()) │ │ │ │ -Builds an unordered_map from an initializer_list. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_2_2_9 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ -_Hashtable::const_iterator const_iterator │ │ │ │ -Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_8 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_s_i_z_e___t_y_p_e │ │ │ │ -_Hashtable::size_type size_type │ │ │ │ -Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_3_1 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_f_i_n_d │ │ │ │ -iterator find(const key_type &__x) │ │ │ │ -Tries to locate an element in an unordered_map. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_8_7_0 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_l_o_a_d___f_a_c_t_o_r │ │ │ │ -float load_factor() const noexcept │ │ │ │ -Returns the average number of elements per bucket. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_0_9_2 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_e_r_a_s_e │ │ │ │ -iterator erase(const_iterator __position) │ │ │ │ -Erases an element from an unordered_map. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_7_4_2 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_s_w_a_p │ │ │ │ -void swap(unordered_map &__x) noexcept(noexcept(_M_h.swap(__x._M_h))) │ │ │ │ -Swaps data with another unordered_map. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_8_0_6 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_b_e_g_i_n │ │ │ │ -local_iterator begin(size_type __n) │ │ │ │ -Returns a read/write iterator pointing to the first bucket element. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_0_4_3 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_m_a_x___l_o_a_d___f_a_c_t_o_r │ │ │ │ -float max_load_factor() const noexcept │ │ │ │ -Returns a positive number that the unordered_map tries to keep the load factor │ │ │ │ -less than or equal to. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_0_9_8 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ -unordered_map & operator=(const unordered_map &)=default │ │ │ │ -Copy assignment operator. │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_d_i_f_f_e_r_e_n_c_e___t_y_p_e │ │ │ │ -_Hashtable::difference_type difference_type │ │ │ │ -Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_3_2 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_c_o_u_n_t │ │ │ │ -auto count(const _Kt &__x) const -> decltype(_M_h._M_count_tr(__x)) │ │ │ │ -Finds the number of elements. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_9_0_9 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_Hashtable::const_local_iterator const_local_iterator │ │ │ │ -Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_3_0 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_m_a_x___b_u_c_k_e_t___c_o_u_n_t │ │ │ │ -size_type max_bucket_count() const noexcept │ │ │ │ -Returns the maximum number of buckets of the unordered_map. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_0_1_5 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_e_m_p_l_a_c_e___h_i_n_t │ │ │ │ -iterator emplace_hint(const_iterator __pos, _Args &&... __args) │ │ │ │ -Attempts to build and insert a std::pair into the unordered_map. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_4_2_1 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_i_n_s_e_r_t │ │ │ │ -insert_return_type insert(node_type &&__nh) │ │ │ │ -Re-insert an extracted node. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_4_4_0 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_v_a_l_u_e___t_y_p_e │ │ │ │ -_Hashtable::value_type value_type │ │ │ │ -Public typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_1_4 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_r_e_h_a_s_h │ │ │ │ -void rehash(size_type __n) │ │ │ │ -May rehash the unordered_map. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_1_1_7 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_c_b_e_g_i_n │ │ │ │ -const_iterator cbegin() const noexcept │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_3_4_0 │ │ │ │ +_s_t_d_:_:_m_u_t_e_x │ │ │ │ +DDeeffiinniittiioonn _s_t_d___m_u_t_e_x_._h_:_9_7 │ │ │ │ +_s_t_d_:_:_d_e_f_e_r___l_o_c_k___t │ │ │ │ +Do not acquire ownership of the mutex. │ │ │ │ +DDeeffiinniittiioonn _s_t_d___m_u_t_e_x_._h_:_2_1_5 │ │ │ │ +_s_t_d_:_:_t_r_y___t_o___l_o_c_k___t │ │ │ │ +Try to acquire ownership of the mutex without blocking. │ │ │ │ +DDeeffiinniittiioonn _s_t_d___m_u_t_e_x_._h_:_2_1_8 │ │ │ │ +_s_t_d_:_:_a_d_o_p_t___l_o_c_k___t │ │ │ │ +Assume the calling thread has already obtained mutex ownership and manage it. │ │ │ │ +DDeeffiinniittiioonn _s_t_d___m_u_t_e_x_._h_:_2_2_2 │ │ │ │ +_s_t_d_:_:_l_o_c_k___g_u_a_r_d │ │ │ │ +A simple scoped lock type. │ │ │ │ +DDeeffiinniittiioonn _s_t_d___m_u_t_e_x_._h_:_2_4_3 │ │ │ │ _s_t_d_:_:_a_u_t_o___p_t_r___r_e_f │ │ │ │ DDeeffiinniittiioonn _a_u_t_o___p_t_r_._h_:_4_9 │ │ │ │ * _b_i_t_s │ │ │ │ - * _u_n_o_r_d_e_r_e_d___m_a_p_._h │ │ │ │ + * _s_t_d___m_u_t_e_x_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-12-base/libstdc++/user/a00380.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: unique_ptr.h File Reference │ │ │ +libstdc++: fstream.tcc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -46,118 +46,57 @@ │ │ │ /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */ │ │ │ $(document).ready(function(){initNavTree('a00380.html',''); initResizable(); }); │ │ │ /* @license-end */ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -Classes | │ │ │ Namespaces | │ │ │ -Macros | │ │ │ -Functions
│ │ │ -
unique_ptr.h File Reference
│ │ │ +Macros
│ │ │ +
fstream.tcc File Reference
│ │ │
│ │ │
│ │ │ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -

│ │ │ -Classes

struct  std::default_delete< _Tp >
 
struct  std::default_delete< _Tp[]>
 
struct  std::hash< unique_ptr< _Tp, _Dp > >
 
class  std::unique_ptr< _Tp, _Dp >
 
class  std::unique_ptr< _Tp[], _Dp >
 
│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ - │ │ │

│ │ │ Namespaces

namespace  std
 
namespace  std::__detail
 
│ │ │ │ │ │ - │ │ │ - │ │ │ -

│ │ │ Macros

#define __cpp_lib_make_unique
 
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │

│ │ │ -Functions

template<typename _Tp , typename _Dp , typename _Up , typename _Ep >
bool std::operator!= (const unique_ptr< _Tp, _Dp > &__x, const unique_ptr< _Up, _Ep > &__y)
 
template<typename _Tp , typename _Dp >
bool std::operator!= (const unique_ptr< _Tp, _Dp > &__x, nullptr_t) noexcept
 
template<typename _Tp , typename _Dp >
bool std::operator!= (nullptr_t, const unique_ptr< _Tp, _Dp > &__x) noexcept
 
template<typename _Tp , typename _Dp , typename _Up , typename _Ep >
constexpr bool std::operator< (const unique_ptr< _Tp, _Dp > &__x, const unique_ptr< _Up, _Ep > &__y)
 
template<typename _Tp , typename _Dp >
constexpr bool std::operator< (const unique_ptr< _Tp, _Dp > &__x, nullptr_t)
 
template<typename _Tp , typename _Dp >
constexpr bool std::operator< (nullptr_t, const unique_ptr< _Tp, _Dp > &__x)
 
template<typename _Tp , typename _Dp , typename _Up , typename _Ep >
constexpr bool std::operator<= (const unique_ptr< _Tp, _Dp > &__x, const unique_ptr< _Up, _Ep > &__y)
 
template<typename _Tp , typename _Dp >
constexpr bool std::operator<= (const unique_ptr< _Tp, _Dp > &__x, nullptr_t)
 
template<typename _Tp , typename _Dp >
constexpr bool std::operator<= (nullptr_t, const unique_ptr< _Tp, _Dp > &__x)
 
template<typename _Tp , typename _Dp , typename _Up , typename _Ep >
constexpr bool std::operator== (const unique_ptr< _Tp, _Dp > &__x, const unique_ptr< _Up, _Ep > &__y)
 
template<typename _Tp , typename _Dp >
constexpr bool std::operator== (const unique_ptr< _Tp, _Dp > &__x, nullptr_t) noexcept
 
template<typename _Tp , typename _Dp >
bool std::operator== (nullptr_t, const unique_ptr< _Tp, _Dp > &__x) noexcept
 
template<typename _Tp , typename _Dp , typename _Up , typename _Ep >
constexpr bool std::operator> (const unique_ptr< _Tp, _Dp > &__x, const unique_ptr< _Up, _Ep > &__y)
 
template<typename _Tp , typename _Dp >
constexpr bool std::operator> (const unique_ptr< _Tp, _Dp > &__x, nullptr_t)
 
template<typename _Tp , typename _Dp >
constexpr bool std::operator> (nullptr_t, const unique_ptr< _Tp, _Dp > &__x)
 
template<typename _Tp , typename _Dp , typename _Up , typename _Ep >
constexpr bool std::operator>= (const unique_ptr< _Tp, _Dp > &__x, const unique_ptr< _Up, _Ep > &__y)
 
template<typename _Tp , typename _Dp >
constexpr bool std::operator>= (const unique_ptr< _Tp, _Dp > &__x, nullptr_t)
 
template<typename _Tp , typename _Dp >
bool std::operator>= (nullptr_t, const unique_ptr< _Tp, _Dp > &__x)
 
│ │ │ -template<typename _Tp , typename _Dp >
enable_if<!__is_swappable< _Dp >::value >::type std::swap (unique_ptr< _Tp, _Dp > &, unique_ptr< _Tp, _Dp > &)=delete
 
#define _FSTREAM_TCC
 
│ │ │

Detailed Description

│ │ │ -

This is an internal header file, included by other library headers. Do not attempt to use it directly. Instead, include <memory>.

│ │ │ +

This is an internal header file, included by other library headers. Do not attempt to use it directly. Instead, include <fstream>.

│ │ │ + │ │ │ +

Definition in file fstream.tcc.

│ │ │ +

Macro Definition Documentation

│ │ │ + │ │ │ +

◆ _FSTREAM_TCC

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
#define _FSTREAM_TCC
│ │ │ +
│ │ │ │ │ │ -

Definition in file unique_ptr.h.

│ │ │ -
│ │ │ +

Definition at line 35 of file fstream.tcc.

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ +
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,113 +1,21 @@ │ │ │ │ libstdc++ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _M_a_c_r_o_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -unique_ptr.h File Reference │ │ │ │ +_N_a_m_e_s_p_a_c_e_s | _M_a_c_r_o_s │ │ │ │ +fstream.tcc File Reference │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -CCllaasssseess │ │ │ │ -struct   _s_t_d_:_:_d_e_f_a_u_l_t___d_e_l_e_t_e_<_ ___T_p_ _> │ │ │ │ -  │ │ │ │ -struct   _s_t_d_:_:_d_e_f_a_u_l_t___d_e_l_e_t_e_<_ ___T_p_[_]_> │ │ │ │ -  │ │ │ │ -struct   _s_t_d_:_:_h_a_s_h_<_ _u_n_i_q_u_e___p_t_r_<_ ___T_p_,_ ___D_p_ _>_ _> │ │ │ │ -  │ │ │ │ - class   _s_t_d_:_:_u_n_i_q_u_e___p_t_r_<_ ___T_p_,_ ___D_p_ _> │ │ │ │ -  │ │ │ │ - class   _s_t_d_:_:_u_n_i_q_u_e___p_t_r_<_ ___T_p_[_]_,_ ___D_p_ _> │ │ │ │ -  │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _s_t_d │ │ │ │   │ │ │ │ -namespace   _s_t_d_:_:_____d_e_t_a_i_l │ │ │ │ -  │ │ │ │ MMaaccrrooss │ │ │ │ -#define  _____c_p_p___l_i_b___m_a_k_e___u_n_i_q_u_e │ │ │ │ -  │ │ │ │ -FFuunnccttiioonnss │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___D_p , _t_y_p_e_n_a_m_e _Up , _t_y_p_e_n_a_m_e ___E_p > │ │ │ │ - bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_!_= (const _u_n_i_q_u_e___p_t_r< _Tp, │ │ │ │ - ___D_p > &__x, const _u_n_i_q_u_e___p_t_r< _Up, ___E_p │ │ │ │ - > &__y) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___D_p > │ │ │ │ - bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_!_= (const _u_n_i_q_u_e___p_t_r< _Tp, │ │ │ │ - ___D_p > &__x, nullptr_t) noexcept │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___D_p > │ │ │ │ - bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_!_= (nullptr_t, const │ │ │ │ - _u_n_i_q_u_e___p_t_r< _Tp, ___D_p > &__x) noexcept │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___D_p , _t_y_p_e_n_a_m_e _Up , _t_y_p_e_n_a_m_e ___E_p > │ │ │ │ - constexpr bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_< (const _u_n_i_q_u_e___p_t_r< _Tp, │ │ │ │ - ___D_p > &__x, const _u_n_i_q_u_e___p_t_r< _Up, ___E_p │ │ │ │ - > &__y) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___D_p > │ │ │ │ - constexpr bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_< (const _u_n_i_q_u_e___p_t_r< _Tp, │ │ │ │ - ___D_p > &__x, nullptr_t) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___D_p > │ │ │ │ - constexpr bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_< (nullptr_t, const │ │ │ │ - _u_n_i_q_u_e___p_t_r< _Tp, ___D_p > &__x) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___D_p , _t_y_p_e_n_a_m_e _Up , _t_y_p_e_n_a_m_e ___E_p > │ │ │ │ - constexpr bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_<_= (const _u_n_i_q_u_e___p_t_r< _Tp, │ │ │ │ - ___D_p > &__x, const _u_n_i_q_u_e___p_t_r< _Up, ___E_p │ │ │ │ - > &__y) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___D_p > │ │ │ │ - constexpr bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_<_= (const _u_n_i_q_u_e___p_t_r< _Tp, │ │ │ │ - ___D_p > &__x, nullptr_t) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___D_p > │ │ │ │ - constexpr bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_<_= (nullptr_t, const │ │ │ │ - _u_n_i_q_u_e___p_t_r< _Tp, ___D_p > &__x) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___D_p , _t_y_p_e_n_a_m_e _Up , _t_y_p_e_n_a_m_e ___E_p > │ │ │ │ - constexpr bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_=_= (const _u_n_i_q_u_e___p_t_r< _Tp, │ │ │ │ - ___D_p > &__x, const _u_n_i_q_u_e___p_t_r< _Up, ___E_p │ │ │ │ - > &__y) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___D_p > │ │ │ │ - constexpr bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_=_= (const _u_n_i_q_u_e___p_t_r< _Tp, │ │ │ │ - ___D_p > &__x, nullptr_t) noexcept │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___D_p > │ │ │ │ - bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_=_= (nullptr_t, const │ │ │ │ - _u_n_i_q_u_e___p_t_r< _Tp, ___D_p > &__x) noexcept │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___D_p , _t_y_p_e_n_a_m_e _Up , _t_y_p_e_n_a_m_e ___E_p > │ │ │ │ - constexpr bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_> (const _u_n_i_q_u_e___p_t_r< _Tp, │ │ │ │ - ___D_p > &__x, const _u_n_i_q_u_e___p_t_r< _Up, ___E_p │ │ │ │ - > &__y) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___D_p > │ │ │ │ - constexpr bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_> (const _u_n_i_q_u_e___p_t_r< _Tp, │ │ │ │ - ___D_p > &__x, nullptr_t) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___D_p > │ │ │ │ - constexpr bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_> (nullptr_t, const │ │ │ │ - _u_n_i_q_u_e___p_t_r< _Tp, ___D_p > &__x) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___D_p , _t_y_p_e_n_a_m_e _Up , _t_y_p_e_n_a_m_e ___E_p > │ │ │ │ - constexpr bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_>_= (const _u_n_i_q_u_e___p_t_r< _Tp, │ │ │ │ - ___D_p > &__x, const _u_n_i_q_u_e___p_t_r< _Up, ___E_p │ │ │ │ - > &__y) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___D_p > │ │ │ │ - constexpr bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_>_= (const _u_n_i_q_u_e___p_t_r< _Tp, │ │ │ │ - ___D_p > &__x, nullptr_t) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___D_p > │ │ │ │ - bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_>_= (nullptr_t, const │ │ │ │ - _u_n_i_q_u_e___p_t_r< _Tp, ___D_p > &__x) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___D_p > │ │ │ │ -_e_n_a_b_l_e___i_f::value ssttdd::::sswwaapp (_u_n_i_q_u_e___p_t_r< _Tp, ___D_p > &, │ │ │ │ - >::type  _u_n_i_q_u_e___p_t_r< _Tp, ___D_p > &)=_d_e_l_e_t_e │ │ │ │ +#define  ___F_S_T_R_E_A_M___T_C_C │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ This is an internal header file, included by other library headers. Do not │ │ │ │ -attempt to use it directly. Instead, include . │ │ │ │ -Definition in file _u_n_i_q_u_e___p_t_r_._h. │ │ │ │ +attempt to use it directly. Instead, include . │ │ │ │ +Definition in file _f_s_t_r_e_a_m_._t_c_c. │ │ │ │ +********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ +********** _?◆_? __FFSSTTRREEAAMM__TTCCCC ********** │ │ │ │ +#define _FSTREAM_TCC │ │ │ │ +Definition at line _3_5 of file _f_s_t_r_e_a_m_._t_c_c. │ │ │ │ * _b_i_t_s │ │ │ │ - * _u_n_i_q_u_e___p_t_r_._h │ │ │ │ + * _f_s_t_r_e_a_m_._t_c_c │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-12-base/libstdc++/user/a00380_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: unique_ptr.h Source File │ │ │ +libstdc++: fstream.tcc Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -45,20 +45,20 @@ │ │ │ │ │ │
│ │ │
│ │ │ -
unique_ptr.h
│ │ │ +
fstream.tcc
│ │ │
│ │ │
│ │ │ -Go to the documentation of this file.
1// unique_ptr implementation -*- C++ -*-
│ │ │ +Go to the documentation of this file.
1// File based streams -*- C++ -*-
│ │ │
2
│ │ │ -
3// Copyright (C) 2008-2022 Free Software Foundation, Inc.
│ │ │ +
3// Copyright (C) 1997-2022 Free Software Foundation, Inc.
│ │ │
4//
│ │ │
5// This file is part of the GNU ISO C++ Library. This library is free
│ │ │
6// software; you can redistribute it and/or modify it under the
│ │ │
7// terms of the GNU General Public License as published by the
│ │ │
8// Free Software Foundation; either version 3, or (at your option)
│ │ │
9// any later version.
│ │ │
10
│ │ │ @@ -72,1364 +72,1189 @@ │ │ │
18// 3.1, as published by the Free Software Foundation.
│ │ │
19
│ │ │
20// You should have received a copy of the GNU General Public License and
│ │ │
21// a copy of the GCC Runtime Library Exception along with this program;
│ │ │
22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
│ │ │
23// <http://www.gnu.org/licenses/>.
│ │ │
24
│ │ │ -
25/** @file bits/unique_ptr.h
│ │ │ +
25/** @file bits/fstream.tcc
│ │ │
26 * This is an internal header file, included by other library headers.
│ │ │ -
27 * Do not attempt to use it directly. @headername{memory}
│ │ │ +
27 * Do not attempt to use it directly. @headername{fstream}
│ │ │
28 */
│ │ │
29
│ │ │ -
30#ifndef _UNIQUE_PTR_H
│ │ │ -
31#define _UNIQUE_PTR_H 1
│ │ │ -
32
│ │ │ -
33#include <bits/c++config.h>
│ │ │ -
34#include <debug/assertions.h>
│ │ │ -
35#include <type_traits>
│ │ │ -
36#include <tuple>
│ │ │ -
37#include <bits/stl_function.h>
│ │ │ - │ │ │ -
39#if __cplusplus > 201703L
│ │ │ -
40# include <compare>
│ │ │ -
41# include <ostream>
│ │ │ -
42#endif
│ │ │ -
43
│ │ │ -
44#if __cplusplus > 202002L && __cpp_constexpr_dynamic_alloc
│ │ │ -
45# if __cpp_lib_constexpr_memory < 202202L
│ │ │ -
46// Defined with older value in bits/ptr_traits.h for C++20
│ │ │ -
47# undef __cpp_lib_constexpr_memory
│ │ │ -
48# define __cpp_lib_constexpr_memory 202202L
│ │ │ -
49# endif
│ │ │ -
50#endif
│ │ │ -
51
│ │ │ -
52namespace std _GLIBCXX_VISIBILITY(default)
│ │ │ -
53{
│ │ │ -
54_GLIBCXX_BEGIN_NAMESPACE_VERSION
│ │ │ -
55
│ │ │ -
56 /**
│ │ │ -
57 * @addtogroup pointer_abstractions
│ │ │ -
58 * @{
│ │ │ -
59 */
│ │ │ +
30//
│ │ │ +
31// ISO C++ 14882: 27.8 File-based streams
│ │ │ +
32//
│ │ │ +
33
│ │ │ +
34#ifndef _FSTREAM_TCC
│ │ │ +
35#define _FSTREAM_TCC 1
│ │ │ +
36
│ │ │ +
37#pragma GCC system_header
│ │ │ +
38
│ │ │ +
39#include <bits/cxxabi_forced.h>
│ │ │ +
40#include <bits/move.h> // for swap
│ │ │ +
41#include <cerrno>
│ │ │ +
42
│ │ │ +
43namespace std _GLIBCXX_VISIBILITY(default)
│ │ │ +
44{
│ │ │ +
45_GLIBCXX_BEGIN_NAMESPACE_VERSION
│ │ │ +
46
│ │ │ +
47 template<typename _CharT, typename _Traits>
│ │ │ +
48 void
│ │ │ +
49 basic_filebuf<_CharT, _Traits>::
│ │ │ +
50 _M_allocate_internal_buffer()
│ │ │ +
51 {
│ │ │ +
52 // Allocate internal buffer only if one doesn't already exist
│ │ │ +
53 // (either allocated or provided by the user via setbuf).
│ │ │ +
54 if (!_M_buf_allocated && !_M_buf)
│ │ │ +
55 {
│ │ │ +
56 _M_buf = new char_type[_M_buf_size];
│ │ │ +
57 _M_buf_allocated = true;
│ │ │ +
58 }
│ │ │ +
59 }
│ │ │
60
│ │ │ -
61#if _GLIBCXX_USE_DEPRECATED
│ │ │ -
62#pragma GCC diagnostic push
│ │ │ -
63#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
│ │ │ -
64 template<typename> class auto_ptr;
│ │ │ -
65#pragma GCC diagnostic pop
│ │ │ -
66#endif
│ │ │ -
67
│ │ │ -
68 /** Primary template of default_delete, used by unique_ptr for single objects
│ │ │ -
69 *
│ │ │ -
70 * @headerfile memory
│ │ │ -
71 * @since C++11
│ │ │ -
72 */
│ │ │ -
73 template<typename _Tp>
│ │ │ -
│ │ │ - │ │ │ -
75 {
│ │ │ -
76 /// Default constructor
│ │ │ -
77 constexpr default_delete() noexcept = default;
│ │ │ -
78
│ │ │ -
79 /** @brief Converting constructor.
│ │ │ -
80 *
│ │ │ -
81 * Allows conversion from a deleter for objects of another type, `_Up`,
│ │ │ -
82 * only if `_Up*` is convertible to `_Tp*`.
│ │ │ -
83 */
│ │ │ - │ │ │ -
85 typename = _Require<is_convertible<_Up*, _Tp*>>>
│ │ │ - │ │ │ -
87 default_delete(const default_delete<_Up>&) noexcept { }
│ │ │ -
88
│ │ │ -
89 /// Calls `delete __ptr`
│ │ │ - │ │ │ -
91 void
│ │ │ -
│ │ │ -
92 operator()(_Tp* __ptr) const
│ │ │ -
93 {
│ │ │ -
94 static_assert(!is_void<_Tp>::value,
│ │ │ -
95 "can't delete pointer to incomplete type");
│ │ │ -
96 static_assert(sizeof(_Tp)>0,
│ │ │ -
97 "can't delete pointer to incomplete type");
│ │ │ -
98 delete __ptr;
│ │ │ -
99 }
│ │ │ -
│ │ │ -
100 };
│ │ │ -
│ │ │ -
101
│ │ │ -
102 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ -
103 // DR 740 - omit specialization for array objects with a compile time length
│ │ │ -
104
│ │ │ -
105 /** Specialization of default_delete for arrays, used by `unique_ptr<T[]>`
│ │ │ -
106 *
│ │ │ -
107 * @headerfile memory
│ │ │ -
108 * @since C++11
│ │ │ -
109 */
│ │ │ -
110 template<typename _Tp>
│ │ │ -
│ │ │ -
111 struct default_delete<_Tp[]>
│ │ │ -
112 {
│ │ │ -
113 public:
│ │ │ -
114 /// Default constructor
│ │ │ -
115 constexpr default_delete() noexcept = default;
│ │ │ -
116
│ │ │ -
117 /** @brief Converting constructor.
│ │ │ -
118 *
│ │ │ -
119 * Allows conversion from a deleter for arrays of another type, such as
│ │ │ -
120 * a const-qualified version of `_Tp`.
│ │ │ -
121 *
│ │ │ -
122 * Conversions from types derived from `_Tp` are not allowed because
│ │ │ -
123 * it is undefined to `delete[]` an array of derived types through a
│ │ │ -
124 * pointer to the base type.
│ │ │ -
125 */
│ │ │ -
126 template<typename _Up,
│ │ │ -
127 typename = _Require<is_convertible<_Up(*)[], _Tp(*)[]>>>
│ │ │ - │ │ │ -
129 default_delete(const default_delete<_Up[]>&) noexcept { }
│ │ │ -
130
│ │ │ -
131 /// Calls `delete[] __ptr`
│ │ │ -
132 template<typename _Up>
│ │ │ - │ │ │ -
134 typename enable_if<is_convertible<_Up(*)[], _Tp(*)[]>::value>::type
│ │ │ -
│ │ │ -
135 operator()(_Up* __ptr) const
│ │ │ -
136 {
│ │ │ -
137 static_assert(sizeof(_Tp)>0,
│ │ │ -
138 "can't delete pointer to incomplete type");
│ │ │ -
139 delete [] __ptr;
│ │ │ -
140 }
│ │ │ -
│ │ │ -
141 };
│ │ │ -
│ │ │ -
142
│ │ │ -
143 /// @cond undocumented
│ │ │ -
144
│ │ │ -
145 // Manages the pointer and deleter of a unique_ptr
│ │ │ -
146 template <typename _Tp, typename _Dp>
│ │ │ -
147 class __uniq_ptr_impl
│ │ │ -
148 {
│ │ │ -
149 template <typename _Up, typename _Ep, typename = void>
│ │ │ -
150 struct _Ptr
│ │ │ -
151 {
│ │ │ -
152 using type = _Up*;
│ │ │ -
153 };
│ │ │ -
154
│ │ │ -
155 template <typename _Up, typename _Ep>
│ │ │ -
156 struct
│ │ │ -
157 _Ptr<_Up, _Ep, __void_t<typename remove_reference<_Ep>::type::pointer>>
│ │ │ -
158 {
│ │ │ -
159 using type = typename remove_reference<_Ep>::type::pointer;
│ │ │ -
160 };
│ │ │ -
161
│ │ │ -
162 public:
│ │ │ -
163 using _DeleterConstraint = enable_if<
│ │ │ -
164 __and_<__not_<is_pointer<_Dp>>,
│ │ │ -
165 is_default_constructible<_Dp>>::value>;
│ │ │ -
166
│ │ │ -
167 using pointer = typename _Ptr<_Tp, _Dp>::type;
│ │ │ -
168
│ │ │ -
169 static_assert( !is_rvalue_reference<_Dp>::value,
│ │ │ -
170 "unique_ptr's deleter type must be a function object type"
│ │ │ -
171 " or an lvalue reference type" );
│ │ │ -
172
│ │ │ -
173 __uniq_ptr_impl() = default;
│ │ │ -
174 _GLIBCXX23_CONSTEXPR
│ │ │ -
175 __uniq_ptr_impl(pointer __p) : _M_t() { _M_ptr() = __p; }
│ │ │ +
61 template<typename _CharT, typename _Traits>
│ │ │ +
62 void
│ │ │ +
63 basic_filebuf<_CharT, _Traits>::
│ │ │ +
64 _M_destroy_internal_buffer() throw()
│ │ │ +
65 {
│ │ │ +
66 if (_M_buf_allocated)
│ │ │ +
67 {
│ │ │ +
68 delete [] _M_buf;
│ │ │ +
69 _M_buf = 0;
│ │ │ +
70 _M_buf_allocated = false;
│ │ │ +
71 }
│ │ │ +
72 delete [] _M_ext_buf;
│ │ │ +
73 _M_ext_buf = 0;
│ │ │ +
74 _M_ext_buf_size = 0;
│ │ │ +
75 _M_ext_next = 0;
│ │ │ +
76 _M_ext_end = 0;
│ │ │ +
77 }
│ │ │ +
78
│ │ │ +
79 template<typename _CharT, typename _Traits>
│ │ │ +
│ │ │ + │ │ │ +
81 basic_filebuf() : __streambuf_type(), _M_lock(), _M_file(&_M_lock),
│ │ │ +
82 _M_mode(ios_base::openmode(0)), _M_state_beg(), _M_state_cur(),
│ │ │ +
83 _M_state_last(), _M_buf(0), _M_buf_size(_GLIBCXX_BUFSIZ),
│ │ │ +
84 _M_buf_allocated(false), _M_reading(false), _M_writing(false), _M_pback(),
│ │ │ +
85 _M_pback_cur_save(0), _M_pback_end_save(0), _M_pback_init(false),
│ │ │ +
86 _M_codecvt(0), _M_ext_buf(0), _M_ext_buf_size(0), _M_ext_next(0),
│ │ │ +
87 _M_ext_end(0)
│ │ │ +
88 {
│ │ │ + │ │ │ +
90 _M_codecvt = &use_facet<__codecvt_type>(this->_M_buf_locale);
│ │ │ +
91 }
│ │ │ +
│ │ │ +
92
│ │ │ +
93#if __cplusplus >= 201103L
│ │ │ +
94 template<typename _CharT, typename _Traits>
│ │ │ + │ │ │ + │ │ │ +
97 : __streambuf_type(__rhs),
│ │ │ +
98 _M_lock(), _M_file(std::move(__rhs._M_file), &_M_lock),
│ │ │ +
99 _M_mode(std::__exchange(__rhs._M_mode, ios_base::openmode(0))),
│ │ │ +
100 _M_state_beg(std::move(__rhs._M_state_beg)),
│ │ │ +
101 _M_state_cur(std::move(__rhs._M_state_cur)),
│ │ │ +
102 _M_state_last(std::move(__rhs._M_state_last)),
│ │ │ +
103 _M_buf(std::__exchange(__rhs._M_buf, nullptr)),
│ │ │ +
104 _M_buf_size(std::__exchange(__rhs._M_buf_size, 1)),
│ │ │ +
105 _M_buf_allocated(std::__exchange(__rhs._M_buf_allocated, false)),
│ │ │ +
106 _M_reading(std::__exchange(__rhs._M_reading, false)),
│ │ │ +
107 _M_writing(std::__exchange(__rhs._M_writing, false)),
│ │ │ +
108 _M_pback(__rhs._M_pback),
│ │ │ +
109 _M_pback_cur_save(std::__exchange(__rhs._M_pback_cur_save, nullptr)),
│ │ │ +
110 _M_pback_end_save(std::__exchange(__rhs._M_pback_end_save, nullptr)),
│ │ │ +
111 _M_pback_init(std::__exchange(__rhs._M_pback_init, false)),
│ │ │ +
112 _M_codecvt(__rhs._M_codecvt),
│ │ │ +
113 _M_ext_buf(std::__exchange(__rhs._M_ext_buf, nullptr)),
│ │ │ +
114 _M_ext_buf_size(std::__exchange(__rhs._M_ext_buf_size, 0)),
│ │ │ +
115 _M_ext_next(std::__exchange(__rhs._M_ext_next, nullptr)),
│ │ │ +
116 _M_ext_end(std::__exchange(__rhs._M_ext_end, nullptr))
│ │ │ +
117 {
│ │ │ +
118 __rhs._M_set_buffer(-1);
│ │ │ +
119 __rhs._M_state_last = __rhs._M_state_cur = __rhs._M_state_beg;
│ │ │ +
120 }
│ │ │ +
121
│ │ │ +
122 template<typename _CharT, typename _Traits>
│ │ │ +
123 basic_filebuf<_CharT, _Traits>&
│ │ │ +
124 basic_filebuf<_CharT, _Traits>::
│ │ │ +
125 operator=(basic_filebuf&& __rhs)
│ │ │ +
126 {
│ │ │ +
127 this->close();
│ │ │ +
128 __streambuf_type::operator=(__rhs);
│ │ │ +
129 _M_file.swap(__rhs._M_file);
│ │ │ +
130 _M_mode = std::__exchange(__rhs._M_mode, ios_base::openmode(0));
│ │ │ +
131 _M_state_beg = std::move(__rhs._M_state_beg);
│ │ │ +
132 _M_state_cur = std::move(__rhs._M_state_cur);
│ │ │ +
133 _M_state_last = std::move(__rhs._M_state_last);
│ │ │ +
134 _M_buf = std::__exchange(__rhs._M_buf, nullptr);
│ │ │ +
135 _M_buf_size = std::__exchange(__rhs._M_buf_size, 1);
│ │ │ +
136 _M_buf_allocated = std::__exchange(__rhs._M_buf_allocated, false);
│ │ │ +
137 _M_ext_buf = std::__exchange(__rhs._M_ext_buf, nullptr);
│ │ │ +
138 _M_ext_buf_size = std::__exchange(__rhs._M_ext_buf_size, 0);
│ │ │ +
139 _M_ext_next = std::__exchange(__rhs._M_ext_next, nullptr);
│ │ │ +
140 _M_ext_end = std::__exchange(__rhs._M_ext_end, nullptr);
│ │ │ +
141 _M_reading = std::__exchange(__rhs._M_reading, false);
│ │ │ +
142 _M_writing = std::__exchange(__rhs._M_writing, false);
│ │ │ +
143 _M_pback_cur_save = std::__exchange(__rhs._M_pback_cur_save, nullptr);
│ │ │ +
144 _M_pback_end_save = std::__exchange(__rhs._M_pback_end_save, nullptr);
│ │ │ +
145 _M_pback_init = std::__exchange(__rhs._M_pback_init, false);
│ │ │ +
146 __rhs._M_set_buffer(-1);
│ │ │ +
147 __rhs._M_state_last = __rhs._M_state_cur = __rhs._M_state_beg;
│ │ │ +
148 return *this;
│ │ │ +
149 }
│ │ │ +
150
│ │ │ +
151 template<typename _CharT, typename _Traits>
│ │ │ +
152 void
│ │ │ +
153 basic_filebuf<_CharT, _Traits>::
│ │ │ +
154 swap(basic_filebuf& __rhs)
│ │ │ +
155 {
│ │ │ +
156 __streambuf_type::swap(__rhs);
│ │ │ +
157 _M_file.swap(__rhs._M_file);
│ │ │ +
158 std::swap(_M_mode, __rhs._M_mode);
│ │ │ +
159 std::swap(_M_state_beg, __rhs._M_state_beg);
│ │ │ +
160 std::swap(_M_state_cur, __rhs._M_state_cur);
│ │ │ +
161 std::swap(_M_state_last, __rhs._M_state_last);
│ │ │ +
162 std::swap(_M_buf, __rhs._M_buf);
│ │ │ +
163 std::swap(_M_buf_size, __rhs._M_buf_size);
│ │ │ +
164 std::swap(_M_buf_allocated, __rhs._M_buf_allocated);
│ │ │ +
165 std::swap(_M_ext_buf, __rhs._M_ext_buf);
│ │ │ +
166 std::swap(_M_ext_buf_size, __rhs._M_ext_buf_size);
│ │ │ +
167 std::swap(_M_ext_next, __rhs._M_ext_next);
│ │ │ +
168 std::swap(_M_ext_end, __rhs._M_ext_end);
│ │ │ +
169 std::swap(_M_reading, __rhs._M_reading);
│ │ │ +
170 std::swap(_M_writing, __rhs._M_writing);
│ │ │ +
171 std::swap(_M_pback_cur_save, __rhs._M_pback_cur_save);
│ │ │ +
172 std::swap(_M_pback_end_save, __rhs._M_pback_end_save);
│ │ │ +
173 std::swap(_M_pback_init, __rhs._M_pback_init);
│ │ │ +
174 }
│ │ │ +
175#endif
│ │ │
176
│ │ │ -
177 template<typename _Del>
│ │ │ -
178 _GLIBCXX23_CONSTEXPR
│ │ │ -
179 __uniq_ptr_impl(pointer __p, _Del&& __d)
│ │ │ -
180 : _M_t(__p, std::forward<_Del>(__d)) { }
│ │ │ -
181
│ │ │ -
182 _GLIBCXX23_CONSTEXPR
│ │ │ -
183 __uniq_ptr_impl(__uniq_ptr_impl&& __u) noexcept
│ │ │ -
184 : _M_t(std::move(__u._M_t))
│ │ │ -
185 { __u._M_ptr() = nullptr; }
│ │ │ -
186
│ │ │ -
187 _GLIBCXX23_CONSTEXPR
│ │ │ -
188 __uniq_ptr_impl& operator=(__uniq_ptr_impl&& __u) noexcept
│ │ │ -
189 {
│ │ │ -
190 reset(__u.release());
│ │ │ -
191 _M_deleter() = std::forward<_Dp>(__u._M_deleter());
│ │ │ -
192 return *this;
│ │ │ -
193 }
│ │ │ -
194
│ │ │ -
195 _GLIBCXX23_CONSTEXPR
│ │ │ -
196 pointer& _M_ptr() noexcept { return std::get<0>(_M_t); }
│ │ │ -
197 _GLIBCXX23_CONSTEXPR
│ │ │ -
198 pointer _M_ptr() const noexcept { return std::get<0>(_M_t); }
│ │ │ -
199 _GLIBCXX23_CONSTEXPR
│ │ │ -
200 _Dp& _M_deleter() noexcept { return std::get<1>(_M_t); }
│ │ │ -
201 _GLIBCXX23_CONSTEXPR
│ │ │ -
202 const _Dp& _M_deleter() const noexcept { return std::get<1>(_M_t); }
│ │ │ -
203
│ │ │ -
204 _GLIBCXX23_CONSTEXPR
│ │ │ -
205 void reset(pointer __p) noexcept
│ │ │ -
206 {
│ │ │ -
207 const pointer __old_p = _M_ptr();
│ │ │ -
208 _M_ptr() = __p;
│ │ │ -
209 if (__old_p)
│ │ │ -
210 _M_deleter()(__old_p);
│ │ │ -
211 }
│ │ │ -
212
│ │ │ -
213 _GLIBCXX23_CONSTEXPR
│ │ │ -
214 pointer release() noexcept
│ │ │ -
215 {
│ │ │ -
216 pointer __p = _M_ptr();
│ │ │ -
217 _M_ptr() = nullptr;
│ │ │ -
218 return __p;
│ │ │ -
219 }
│ │ │ -
220
│ │ │ -
221 _GLIBCXX23_CONSTEXPR
│ │ │ -
222 void
│ │ │ -
223 swap(__uniq_ptr_impl& __rhs) noexcept
│ │ │ -
224 {
│ │ │ -
225 using std::swap;
│ │ │ -
226 swap(this->_M_ptr(), __rhs._M_ptr());
│ │ │ -
227 swap(this->_M_deleter(), __rhs._M_deleter());
│ │ │ -
228 }
│ │ │ -
229
│ │ │ -
230 private:
│ │ │ -
231 tuple<pointer, _Dp> _M_t;
│ │ │ -
232 };
│ │ │ +
177 template<typename _CharT, typename _Traits>
│ │ │ +
178 typename basic_filebuf<_CharT, _Traits>::__filebuf_type*
│ │ │ +
│ │ │ + │ │ │ +
180 open(const char* __s, ios_base::openmode __mode)
│ │ │ +
181 {
│ │ │ + │ │ │ +
183 if (!this->is_open())
│ │ │ +
184 {
│ │ │ +
185 _M_file.open(__s, __mode);
│ │ │ +
186 if (this->is_open())
│ │ │ +
187 {
│ │ │ +
188 _M_allocate_internal_buffer();
│ │ │ +
189 _M_mode = __mode;
│ │ │ +
190
│ │ │ +
191 // Setup initial buffer to 'uncommitted' mode.
│ │ │ +
192 _M_reading = false;
│ │ │ +
193 _M_writing = false;
│ │ │ +
194 _M_set_buffer(-1);
│ │ │ +
195
│ │ │ +
196 // Reset to initial state.
│ │ │ +
197 _M_state_last = _M_state_cur = _M_state_beg;
│ │ │ +
198
│ │ │ +
199 // 27.8.1.3,4
│ │ │ +
200 if ((__mode & ios_base::ate)
│ │ │ +
201 && this->seekoff(0, ios_base::end, __mode)
│ │ │ +
202 == pos_type(off_type(-1)))
│ │ │ +
203 this->close();
│ │ │ +
204 else
│ │ │ +
205 __ret = this;
│ │ │ +
206 }
│ │ │ +
207 }
│ │ │ +
208 return __ret;
│ │ │ +
209 }
│ │ │ +
│ │ │ +
210
│ │ │ +
211#if _GLIBCXX_HAVE__WFOPEN && _GLIBCXX_USE_WCHAR_T
│ │ │ +
212 template<typename _CharT, typename _Traits>
│ │ │ + │ │ │ + │ │ │ +
215 open(const wchar_t* __s, ios_base::openmode __mode)
│ │ │ +
216 {
│ │ │ +
217 __filebuf_type *__ret = 0;
│ │ │ +
218 if (!this->is_open())
│ │ │ +
219 {
│ │ │ +
220 _M_file.open(__s, __mode);
│ │ │ +
221 if (this->is_open())
│ │ │ +
222 {
│ │ │ +
223 _M_allocate_internal_buffer();
│ │ │ +
224 _M_mode = __mode;
│ │ │ +
225
│ │ │ +
226 // Setup initial buffer to 'uncommitted' mode.
│ │ │ +
227 _M_reading = false;
│ │ │ +
228 _M_writing = false;
│ │ │ +
229 _M_set_buffer(-1);
│ │ │ +
230
│ │ │ +
231 // Reset to initial state.
│ │ │ +
232 _M_state_last = _M_state_cur = _M_state_beg;
│ │ │
233
│ │ │ -
234 // Defines move construction + assignment as either defaulted or deleted.
│ │ │ -
235 template <typename _Tp, typename _Dp,
│ │ │ -
236 bool = is_move_constructible<_Dp>::value,
│ │ │ -
237 bool = is_move_assignable<_Dp>::value>
│ │ │ -
238 struct __uniq_ptr_data : __uniq_ptr_impl<_Tp, _Dp>
│ │ │ -
239 {
│ │ │ -
240 using __uniq_ptr_impl<_Tp, _Dp>::__uniq_ptr_impl;
│ │ │ -
241 __uniq_ptr_data(__uniq_ptr_data&&) = default;
│ │ │ -
242 __uniq_ptr_data& operator=(__uniq_ptr_data&&) = default;
│ │ │ -
243 };
│ │ │ -
244
│ │ │ -
245 template <typename _Tp, typename _Dp>
│ │ │ -
246 struct __uniq_ptr_data<_Tp, _Dp, true, false> : __uniq_ptr_impl<_Tp, _Dp>
│ │ │ -
247 {
│ │ │ -
248 using __uniq_ptr_impl<_Tp, _Dp>::__uniq_ptr_impl;
│ │ │ -
249 __uniq_ptr_data(__uniq_ptr_data&&) = default;
│ │ │ -
250 __uniq_ptr_data& operator=(__uniq_ptr_data&&) = delete;
│ │ │ -
251 };
│ │ │ -
252
│ │ │ -
253 template <typename _Tp, typename _Dp>
│ │ │ -
254 struct __uniq_ptr_data<_Tp, _Dp, false, true> : __uniq_ptr_impl<_Tp, _Dp>
│ │ │ -
255 {
│ │ │ -
256 using __uniq_ptr_impl<_Tp, _Dp>::__uniq_ptr_impl;
│ │ │ -
257 __uniq_ptr_data(__uniq_ptr_data&&) = delete;
│ │ │ -
258 __uniq_ptr_data& operator=(__uniq_ptr_data&&) = default;
│ │ │ -
259 };
│ │ │ -
260
│ │ │ -
261 template <typename _Tp, typename _Dp>
│ │ │ -
262 struct __uniq_ptr_data<_Tp, _Dp, false, false> : __uniq_ptr_impl<_Tp, _Dp>
│ │ │ -
263 {
│ │ │ -
264 using __uniq_ptr_impl<_Tp, _Dp>::__uniq_ptr_impl;
│ │ │ -
265 __uniq_ptr_data(__uniq_ptr_data&&) = delete;
│ │ │ -
266 __uniq_ptr_data& operator=(__uniq_ptr_data&&) = delete;
│ │ │ -
267 };
│ │ │ -
268 /// @endcond
│ │ │ -
269
│ │ │ -
270 // 20.7.1.2 unique_ptr for single objects.
│ │ │ -
271
│ │ │ -
272 /// A move-only smart pointer that manages unique ownership of a resource.
│ │ │ -
273 /// @headerfile memory
│ │ │ -
274 /// @since C++11
│ │ │ -
275 template <typename _Tp, typename _Dp = default_delete<_Tp>>
│ │ │ -
│ │ │ - │ │ │ -
277 {
│ │ │ -
278 template <typename _Up>
│ │ │ -
279 using _DeleterConstraint =
│ │ │ - │ │ │ -
281
│ │ │ - │ │ │ -
283
│ │ │ -
284 public:
│ │ │ -
285 using pointer = typename __uniq_ptr_impl<_Tp, _Dp>::pointer;
│ │ │ -
286 using element_type = _Tp;
│ │ │ -
287 using deleter_type = _Dp;
│ │ │ +
234 // 27.8.1.3,4
│ │ │ +
235 if ((__mode & ios_base::ate)
│ │ │ +
236 && this->seekoff(0, ios_base::end, __mode)
│ │ │ +
237 == pos_type(off_type(-1)))
│ │ │ +
238 this->close();
│ │ │ +
239 else
│ │ │ +
│ │ │ +
240 __ret = this;
│ │ │ +
241 }
│ │ │ +
242 }
│ │ │ +
243 return __ret;
│ │ │ +
244 }
│ │ │ +
245#endif // HAVE__WFOPEN && USE_WCHAR_T
│ │ │ +
246
│ │ │ +
247 template<typename _CharT, typename _Traits>
│ │ │ +
248 typename basic_filebuf<_CharT, _Traits>::__filebuf_type*
│ │ │ +
│ │ │ + │ │ │ +
250 close()
│ │ │ +
251 {
│ │ │ +
252 if (!this->is_open())
│ │ │ +
253 return 0;
│ │ │ +
254
│ │ │ +
255 bool __testfail = false;
│ │ │ +
256 {
│ │ │ +
257 // NB: Do this here so that re-opened filebufs will be cool...
│ │ │ +
258 struct __close_sentry
│ │ │ +
259 {
│ │ │ + │ │ │ + │ │ │ + │ │ │ +
263 {
│ │ │ +
264 __fb->_M_mode = ios_base::openmode(0);
│ │ │ +
265 __fb->_M_pback_init = false;
│ │ │ +
266 __fb->_M_destroy_internal_buffer();
│ │ │ +
267 __fb->_M_reading = false;
│ │ │ +
268 __fb->_M_writing = false;
│ │ │ +
269 __fb->_M_set_buffer(-1);
│ │ │ +
270 __fb->_M_state_last = __fb->_M_state_cur = __fb->_M_state_beg;
│ │ │ +
271 }
│ │ │ +
272 } __cs (this);
│ │ │ +
273
│ │ │ +
274 __try
│ │ │ +
275 {
│ │ │ +
276 if (!_M_terminate_output())
│ │ │ +
277 __testfail = true;
│ │ │ +
278 }
│ │ │ +
279 __catch(...)
│ │ │ +
280 {
│ │ │ +
281 _M_file.close();
│ │ │ +
282 __throw_exception_again;
│ │ │ +
283 }
│ │ │ +
284 }
│ │ │ +
285
│ │ │ +
286 if (!_M_file.close())
│ │ │ +
287 __testfail = true;
│ │ │
288
│ │ │ -
289 private:
│ │ │ -
290 // helper template for detecting a safe conversion from another
│ │ │ -
291 // unique_ptr
│ │ │ -
292 template<typename _Up, typename _Ep>
│ │ │ -
293 using __safe_conversion_up = __and_<
│ │ │ - │ │ │ - │ │ │ -
296 >;
│ │ │ -
297
│ │ │ -
298 public:
│ │ │ -
299 // Constructors.
│ │ │ -
300
│ │ │ -
301 /// Default constructor, creates a unique_ptr that owns nothing.
│ │ │ -
302 template<typename _Del = _Dp, typename = _DeleterConstraint<_Del>>
│ │ │ -
│ │ │ -
303 constexpr unique_ptr() noexcept
│ │ │ -
304 : _M_t()
│ │ │ -
305 { }
│ │ │ -
│ │ │ -
306
│ │ │ -
307 /** Takes ownership of a pointer.
│ │ │ -
308 *
│ │ │ -
309 * @param __p A pointer to an object of @c element_type
│ │ │ -
310 *
│ │ │ -
311 * The deleter will be value-initialized.
│ │ │ -
312 */
│ │ │ -
313 template<typename _Del = _Dp, typename = _DeleterConstraint<_Del>>
│ │ │ - │ │ │ -
315 explicit
│ │ │ -
│ │ │ -
316 unique_ptr(pointer __p) noexcept
│ │ │ -
317 : _M_t(__p)
│ │ │ -
318 { }
│ │ │ -
│ │ │ -
319
│ │ │ -
320 /** Takes ownership of a pointer.
│ │ │ -
321 *
│ │ │ -
322 * @param __p A pointer to an object of @c element_type
│ │ │ -
323 * @param __d A reference to a deleter.
│ │ │ -
324 *
│ │ │ -
325 * The deleter will be initialized with @p __d
│ │ │ -
326 */
│ │ │ -
327 template<typename _Del = deleter_type,
│ │ │ - │ │ │ - │ │ │ -
│ │ │ -
330 unique_ptr(pointer __p, const deleter_type& __d) noexcept
│ │ │ -
331 : _M_t(__p, __d) { }
│ │ │ -
│ │ │ -
332
│ │ │ -
333 /** Takes ownership of a pointer.
│ │ │ -
334 *
│ │ │ -
335 * @param __p A pointer to an object of @c element_type
│ │ │ -
336 * @param __d An rvalue reference to a (non-reference) deleter.
│ │ │ -
337 *
│ │ │ -
338 * The deleter will be initialized with @p std::move(__d)
│ │ │ -
339 */
│ │ │ -
340 template<typename _Del = deleter_type,
│ │ │ - │ │ │ - │ │ │ -
│ │ │ -
343 unique_ptr(pointer __p,
│ │ │ - │ │ │ -
345 _Del&&> __d) noexcept
│ │ │ -
346 : _M_t(__p, std::move(__d))
│ │ │ -
347 { }
│ │ │ -
│ │ │ -
348
│ │ │ -
349 template<typename _Del = deleter_type,
│ │ │ -
350 typename _DelUnref = typename remove_reference<_Del>::type>
│ │ │ - │ │ │ -
352 unique_ptr(pointer,
│ │ │ - │ │ │ -
354 _DelUnref&&>) = delete;
│ │ │ -
355
│ │ │ -
356 /// Creates a unique_ptr that owns nothing.
│ │ │ -
357 template<typename _Del = _Dp, typename = _DeleterConstraint<_Del>>
│ │ │ -
│ │ │ -
358 constexpr unique_ptr(nullptr_t) noexcept
│ │ │ -
359 : _M_t()
│ │ │ -
360 { }
│ │ │ -
│ │ │ -
361
│ │ │ -
362 // Move constructors.
│ │ │ -
363
│ │ │ -
364 /// Move constructor.
│ │ │ -
365 unique_ptr(unique_ptr&&) = default;
│ │ │ -
366
│ │ │ -
367 /** @brief Converting constructor from another type
│ │ │ -
368 *
│ │ │ -
369 * Requires that the pointer owned by @p __u is convertible to the
│ │ │ -
370 * type of pointer owned by this object, @p __u does not own an array,
│ │ │ -
371 * and @p __u has a compatible deleter type.
│ │ │ -
372 */
│ │ │ -
373 template<typename _Up, typename _Ep, typename = _Require<
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
│ │ │ - │ │ │ -
380 : _M_t(__u.release(), std::forward<_Ep>(__u.get_deleter()))
│ │ │ -
381 { }
│ │ │ -
│ │ │ -
382
│ │ │ -
383#if _GLIBCXX_USE_DEPRECATED
│ │ │ -
384#pragma GCC diagnostic push
│ │ │ -
385#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
│ │ │ -
386 /// Converting constructor from @c auto_ptr
│ │ │ -
387 template<typename _Up, typename = _Require<
│ │ │ - │ │ │ -
389 unique_ptr(auto_ptr<_Up>&& __u) noexcept;
│ │ │ -
390#pragma GCC diagnostic pop
│ │ │ -
391#endif
│ │ │ -
392
│ │ │ -
393 /// Destructor, invokes the deleter if the stored pointer is not null.
│ │ │ -
394#if __cplusplus > 202002L && __cpp_constexpr_dynamic_alloc
│ │ │ -
395 constexpr
│ │ │ -
396#endif
│ │ │ -
│ │ │ -
397 ~unique_ptr() noexcept
│ │ │ -
398 {
│ │ │ - │ │ │ -
400 "unique_ptr's deleter must be invocable with a pointer");
│ │ │ -
401 auto& __ptr = _M_t._M_ptr();
│ │ │ -
402 if (__ptr != nullptr)
│ │ │ - │ │ │ -
404 __ptr = pointer();
│ │ │ -
405 }
│ │ │ -
│ │ │ -
406
│ │ │ -
407 // Assignment.
│ │ │ -
408
│ │ │ -
409 /** @brief Move assignment operator.
│ │ │ -
410 *
│ │ │ -
411 * Invokes the deleter if this object owns a pointer.
│ │ │ -
412 */
│ │ │ - │ │ │ -
414
│ │ │ -
415 /** @brief Assignment from another type.
│ │ │ -
416 *
│ │ │ -
417 * @param __u The object to transfer ownership from, which owns a
│ │ │ -
418 * convertible pointer to a non-array object.
│ │ │ -
419 *
│ │ │ -
420 * Invokes the deleter if this object owns a pointer.
│ │ │ -
421 */
│ │ │ -
422 template<typename _Up, typename _Ep>
│ │ │ - │ │ │ -
424 typename enable_if< __and_<
│ │ │ - │ │ │ - │ │ │ -
427 >::value,
│ │ │ -
428 unique_ptr&>::type
│ │ │ -
│ │ │ - │ │ │ -
430 {
│ │ │ -
431 reset(__u.release());
│ │ │ -
432 get_deleter() = std::forward<_Ep>(__u.get_deleter());
│ │ │ -
433 return *this;
│ │ │ -
434 }
│ │ │ -
│ │ │ -
435
│ │ │ -
436 /// Reset the %unique_ptr to empty, invoking the deleter if necessary.
│ │ │ - │ │ │ - │ │ │ +
289 if (__testfail)
│ │ │ +
290 return 0;
│ │ │ +
291 else
│ │ │ +
292 return this;
│ │ │ +
293 }
│ │ │ +
│ │ │ +
294
│ │ │ +
295 template<typename _CharT, typename _Traits>
│ │ │ + │ │ │ +
│ │ │ + │ │ │ + │ │ │ +
299 {
│ │ │ +
300 streamsize __ret = -1;
│ │ │ +
301 const bool __testin = _M_mode & ios_base::in;
│ │ │ +
302 if (__testin && this->is_open())
│ │ │ +
303 {
│ │ │ +
304 // For a stateful encoding (-1) the pending sequence might be just
│ │ │ +
305 // shift and unshift prefixes with no actual character.
│ │ │ +
306 __ret = this->egptr() - this->gptr();
│ │ │ +
307
│ │ │ +
308#if _GLIBCXX_HAVE_DOS_BASED_FILESYSTEM
│ │ │ +
309 // About this workaround, see libstdc++/20806.
│ │ │ +
310 const bool __testbinary = _M_mode & ios_base::binary;
│ │ │ +
311 if (__check_facet(_M_codecvt).encoding() >= 0
│ │ │ +
312 && __testbinary)
│ │ │ +
313#else
│ │ │ +
314 if (__check_facet(_M_codecvt).encoding() >= 0)
│ │ │ +
│ │ │ +
315#endif
│ │ │ +
316 __ret += _M_file.showmanyc() / _M_codecvt->max_length();
│ │ │ +
317 }
│ │ │ +
318 return __ret;
│ │ │ +
319 }
│ │ │ +
320
│ │ │ +
321 template<typename _CharT, typename _Traits>
│ │ │ +
322 typename basic_filebuf<_CharT, _Traits>::int_type
│ │ │ +
│ │ │ + │ │ │ + │ │ │ +
325 {
│ │ │ +
326 int_type __ret = traits_type::eof();
│ │ │ +
327 const bool __testin = _M_mode & ios_base::in;
│ │ │ +
328 if (__testin)
│ │ │ +
329 {
│ │ │ +
330 if (_M_writing)
│ │ │ +
331 {
│ │ │ +
332 if (overflow() == traits_type::eof())
│ │ │ +
333 return __ret;
│ │ │ +
334 _M_set_buffer(-1);
│ │ │ +
335 _M_writing = false;
│ │ │ +
336 }
│ │ │ +
337 // Check for pback madness, and if so switch back to the
│ │ │ +
338 // normal buffers and jet outta here before expensive
│ │ │ +
339 // fileops happen...
│ │ │ +
340 _M_destroy_pback();
│ │ │ +
341
│ │ │ +
342 if (this->gptr() < this->egptr())
│ │ │ +
343 return traits_type::to_int_type(*this->gptr());
│ │ │ +
344
│ │ │ +
345 // Get and convert input sequence.
│ │ │ +
346 const size_t __buflen = _M_buf_size > 1 ? _M_buf_size - 1 : 1;
│ │ │ +
347
│ │ │ +
348 // Will be set to true if ::read() returns 0 indicating EOF.
│ │ │ +
349 bool __got_eof = false;
│ │ │ +
350 // Number of internal characters produced.
│ │ │ +
351 streamsize __ilen = 0;
│ │ │ +
352 codecvt_base::result __r = codecvt_base::ok;
│ │ │ +
353 if (__check_facet(_M_codecvt).always_noconv())
│ │ │ +
354 {
│ │ │ +
355 __ilen = _M_file.xsgetn(reinterpret_cast<char*>(this->eback()),
│ │ │ +
356 __buflen);
│ │ │ +
357 if (__ilen == 0)
│ │ │ +
358 __got_eof = true;
│ │ │ +
359 }
│ │ │ +
360 else
│ │ │ +
361 {
│ │ │ +
362 // Worst-case number of external bytes.
│ │ │ +
363 // XXX Not done encoding() == -1.
│ │ │ +
364 const int __enc = _M_codecvt->encoding();
│ │ │ +
365 streamsize __blen; // Minimum buffer size.
│ │ │ +
│ │ │ +
366 streamsize __rlen; // Number of chars to read.
│ │ │ +
367 if (__enc > 0)
│ │ │ + │ │ │ +
369 else
│ │ │ +
370 {
│ │ │ +
371 __blen = __buflen + _M_codecvt->max_length() - 1;
│ │ │ + │ │ │ +
373 }
│ │ │ +
374 const streamsize __remainder = _M_ext_end - _M_ext_next;
│ │ │ + │ │ │ +
376
│ │ │ +
│ │ │ +
377 // An imbue in 'read' mode implies first converting the external
│ │ │ +
378 // chars already present.
│ │ │ +
379 if (_M_reading && this->egptr() == this->eback() && __remainder)
│ │ │ +
380 __rlen = 0;
│ │ │ +
381
│ │ │ +
382 // Allocate buffer if necessary and move unconverted
│ │ │ +
383 // bytes to front.
│ │ │ +
384 if (_M_ext_buf_size < __blen)
│ │ │ +
│ │ │ + │ │ │ +
386 char* __buf = new char[__blen];
│ │ │ +
387 if (__remainder)
│ │ │ +
│ │ │ + │ │ │ +
389
│ │ │ +
390 delete [] _M_ext_buf;
│ │ │ +
391 _M_ext_buf = __buf;
│ │ │ +
392 _M_ext_buf_size = __blen;
│ │ │ +
393 }
│ │ │ +
394 else if (__remainder)
│ │ │ +
395 __builtin_memmove(_M_ext_buf, _M_ext_next, __remainder);
│ │ │ +
396
│ │ │ +
397 _M_ext_next = _M_ext_buf;
│ │ │ +
│ │ │ +
398 _M_ext_end = _M_ext_buf + __remainder;
│ │ │ +
399 _M_state_last = _M_state_cur;
│ │ │ +
400
│ │ │ +
401 do
│ │ │ +
402 {
│ │ │ +
403 if (__rlen > 0)
│ │ │ +
404 {
│ │ │ +
405 // Sanity check!
│ │ │ +
406 // This may fail if the return value of
│ │ │ +
407 // codecvt::max_length() is bogus.
│ │ │ +
408 if (_M_ext_end - _M_ext_buf + __rlen > _M_ext_buf_size)
│ │ │ +
409 {
│ │ │ +
410 __throw_ios_failure(__N("basic_filebuf::underflow "
│ │ │ +
411 "codecvt::max_length() "
│ │ │ +
412 "is not valid"));
│ │ │ +
413 }
│ │ │ +
414 streamsize __elen = _M_file.xsgetn(_M_ext_end, __rlen);
│ │ │ +
415 if (__elen == 0)
│ │ │ +
416 __got_eof = true;
│ │ │ +
417 else if (__elen == -1)
│ │ │ +
│ │ │ +
418 break;
│ │ │ +
419 _M_ext_end += __elen;
│ │ │ +
420 }
│ │ │ +
│ │ │ + │ │ │ +
422 char_type* __iend = this->eback();
│ │ │ +
423 if (_M_ext_next < _M_ext_end)
│ │ │ +
424 __r = _M_codecvt->in(_M_state_cur, _M_ext_next,
│ │ │ +
│ │ │ +
425 _M_ext_end, _M_ext_next,
│ │ │ +
426 this->eback(),
│ │ │ +
427 this->eback() + __buflen, __iend);
│ │ │ +
428 if (__r == codecvt_base::noconv)
│ │ │ +
429 {
│ │ │ +
430 size_t __avail = _M_ext_end - _M_ext_buf;
│ │ │ + │ │ │ +
432 traits_type::copy(this->eback(),
│ │ │ +
433 reinterpret_cast<char_type*>
│ │ │ +
434 (_M_ext_buf), __ilen);
│ │ │ +
435 _M_ext_next = _M_ext_buf + __ilen;
│ │ │ +
│ │ │ + │ │ │ +
437 else
│ │ │ +
438 __ilen = __iend - this->eback();
│ │ │
│ │ │ -
439 operator=(nullptr_t) noexcept
│ │ │ -
440 {
│ │ │ -
441 reset();
│ │ │ -
442 return *this;
│ │ │ -
443 }
│ │ │ -
│ │ │ -
444
│ │ │ -
445 // Observers.
│ │ │ -
446
│ │ │ -
447 /// Dereference the stored pointer.
│ │ │ - │ │ │ -
449 typename add_lvalue_reference<element_type>::type
│ │ │ -
│ │ │ -
450 operator*() const noexcept(noexcept(*std::declval<pointer>()))
│ │ │ -
451 {
│ │ │ -
452 __glibcxx_assert(get() != pointer());
│ │ │ -
453 return *get();
│ │ │ -
454 }
│ │ │ -
│ │ │ -
455
│ │ │ -
456 /// Return the stored pointer.
│ │ │ - │ │ │ -
458 pointer
│ │ │ -
│ │ │ -
459 operator->() const noexcept
│ │ │ -
460 {
│ │ │ -
461 _GLIBCXX_DEBUG_PEDASSERT(get() != pointer());
│ │ │ -
462 return get();
│ │ │ -
463 }
│ │ │ -
│ │ │ -
464
│ │ │ -
465 /// Return the stored pointer.
│ │ │ - │ │ │ -
467 pointer
│ │ │ -
│ │ │ -
468 get() const noexcept
│ │ │ -
469 { return _M_t._M_ptr(); }
│ │ │ -
│ │ │ -
470
│ │ │ -
471 /// Return a reference to the stored deleter.
│ │ │ - │ │ │ -
473 deleter_type&
│ │ │ -
│ │ │ -
474 get_deleter() noexcept
│ │ │ -
475 { return _M_t._M_deleter(); }
│ │ │ -
│ │ │ -
476
│ │ │ -
477 /// Return a reference to the stored deleter.
│ │ │ - │ │ │ -
479 const deleter_type&
│ │ │ -
│ │ │ -
480 get_deleter() const noexcept
│ │ │ -
481 { return _M_t._M_deleter(); }
│ │ │ -
│ │ │ -
482
│ │ │ -
483 /// Return @c true if the stored pointer is not null.
│ │ │ - │ │ │ -
│ │ │ -
485 explicit operator bool() const noexcept
│ │ │ -
486 { return get() == pointer() ? false : true; }
│ │ │ -
│ │ │ -
487
│ │ │ -
488 // Modifiers.
│ │ │ -
489
│ │ │ -
490 /// Release ownership of any stored pointer.
│ │ │ - │ │ │ -
492 pointer
│ │ │ -
│ │ │ -
493 release() noexcept
│ │ │ -
494 { return _M_t.release(); }
│ │ │ -
│ │ │ -
495
│ │ │ -
496 /** @brief Replace the stored pointer.
│ │ │ -
497 *
│ │ │ -
498 * @param __p The new pointer to store.
│ │ │ -
499 *
│ │ │ -
500 * The deleter will be invoked if a pointer is already owned.
│ │ │ -
501 */
│ │ │ - │ │ │ -
503 void
│ │ │ -
│ │ │ -
504 reset(pointer __p = pointer()) noexcept
│ │ │ -
505 {
│ │ │ - │ │ │ -
507 "unique_ptr's deleter must be invocable with a pointer");
│ │ │ -
508 _M_t.reset(std::move(__p));
│ │ │ -
509 }
│ │ │ -
│ │ │ -
510
│ │ │ -
511 /// Exchange the pointer and deleter with another object.
│ │ │ - │ │ │ -
513 void
│ │ │ -
│ │ │ -
514 swap(unique_ptr& __u) noexcept
│ │ │ -
515 {
│ │ │ -
516 static_assert(__is_swappable<_Dp>::value, "deleter must be swappable");
│ │ │ -
517 _M_t.swap(__u._M_t);
│ │ │ -
518 }
│ │ │ -
│ │ │ -
519
│ │ │ -
520 // Disable copy from lvalue.
│ │ │ -
521 unique_ptr(const unique_ptr&) = delete;
│ │ │ -
522 unique_ptr& operator=(const unique_ptr&) = delete;
│ │ │ -
523 };
│ │ │ -
│ │ │ -
524
│ │ │ -
525 // 20.7.1.3 unique_ptr for array objects with a runtime length
│ │ │ -
526 // [unique.ptr.runtime]
│ │ │ -
527 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ -
528 // DR 740 - omit specialization for array objects with a compile time length
│ │ │ -
529
│ │ │ -
530 /// A move-only smart pointer that manages unique ownership of an array.
│ │ │ -
531 /// @headerfile memory
│ │ │ -
532 /// @since C++11
│ │ │ -
533 template<typename _Tp, typename _Dp>
│ │ │ -
│ │ │ -
534 class unique_ptr<_Tp[], _Dp>
│ │ │ -
535 {
│ │ │ -
536 template <typename _Up>
│ │ │ -
537 using _DeleterConstraint =
│ │ │ - │ │ │ -
539
│ │ │ - │ │ │ -
541
│ │ │ -
542 template<typename _Up>
│ │ │ -
543 using __remove_cv = typename remove_cv<_Up>::type;
│ │ │ -
544
│ │ │ -
545 // like is_base_of<_Tp, _Up> but false if unqualified types are the same
│ │ │ -
546 template<typename _Up>
│ │ │ -
547 using __is_derived_Tp
│ │ │ - │ │ │ - │ │ │ -
550
│ │ │ -
551 public:
│ │ │ -
552 using pointer = typename __uniq_ptr_impl<_Tp, _Dp>::pointer;
│ │ │ -
553 using element_type = _Tp;
│ │ │ -
554 using deleter_type = _Dp;
│ │ │ -
555
│ │ │ -
556 // helper template for detecting a safe conversion from another
│ │ │ -
557 // unique_ptr
│ │ │ -
558 template<typename _Up, typename _Ep,
│ │ │ -
559 typename _UPtr = unique_ptr<_Up, _Ep>,
│ │ │ -
560 typename _UP_pointer = typename _UPtr::pointer,
│ │ │ -
561 typename _UP_element_type = typename _UPtr::element_type>
│ │ │ -
562 using __safe_conversion_up = __and_<
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
566 is_convertible<_UP_element_type(*)[], element_type(*)[]>
│ │ │ -
567 >;
│ │ │ -
568
│ │ │ -
569 // helper template for detecting a safe conversion from a raw pointer
│ │ │ -
570 template<typename _Up>
│ │ │ -
571 using __safe_conversion_raw = __and_<
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
577 typename remove_pointer<_Up>::type(*)[],
│ │ │ -
578 element_type(*)[]>
│ │ │ -
579 >
│ │ │ -
580 >
│ │ │ -
581 >;
│ │ │ -
582
│ │ │ -
583 // Constructors.
│ │ │ -
584
│ │ │ -
585 /// Default constructor, creates a unique_ptr that owns nothing.
│ │ │ -
586 template<typename _Del = _Dp, typename = _DeleterConstraint<_Del>>
│ │ │ -
│ │ │ -
587 constexpr unique_ptr() noexcept
│ │ │ -
588 : _M_t()
│ │ │ -
589 { }
│ │ │ -
│ │ │ -
590
│ │ │ -
591 /** Takes ownership of a pointer.
│ │ │ -
592 *
│ │ │ -
593 * @param __p A pointer to an array of a type safely convertible
│ │ │ -
594 * to an array of @c element_type
│ │ │ -
595 *
│ │ │ -
596 * The deleter will be value-initialized.
│ │ │ -
597 */
│ │ │ -
598 template<typename _Up,
│ │ │ -
599 typename _Vp = _Dp,
│ │ │ -
600 typename = _DeleterConstraint<_Vp>,
│ │ │ -
601 typename = typename enable_if<
│ │ │ -
602 __safe_conversion_raw<_Up>::value, bool>::type>
│ │ │ - │ │ │ -
604 explicit
│ │ │ -
│ │ │ -
605 unique_ptr(_Up __p) noexcept
│ │ │ -
606 : _M_t(__p)
│ │ │ -
607 { }
│ │ │ -
│ │ │ -
608
│ │ │ -
609 /** Takes ownership of a pointer.
│ │ │ -
610 *
│ │ │ -
611 * @param __p A pointer to an array of a type safely convertible
│ │ │ -
612 * to an array of @c element_type
│ │ │ -
613 * @param __d A reference to a deleter.
│ │ │ -
614 *
│ │ │ -
615 * The deleter will be initialized with @p __d
│ │ │ -
616 */
│ │ │ -
617 template<typename _Up, typename _Del = deleter_type,
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
│ │ │ -
621 unique_ptr(_Up __p, const deleter_type& __d) noexcept
│ │ │ -
622 : _M_t(__p, __d) { }
│ │ │ -
│ │ │ -
623
│ │ │ -
624 /** Takes ownership of a pointer.
│ │ │ -
625 *
│ │ │ -
626 * @param __p A pointer to an array of a type safely convertible
│ │ │ -
627 * to an array of @c element_type
│ │ │ -
628 * @param __d A reference to a deleter.
│ │ │ -
629 *
│ │ │ -
630 * The deleter will be initialized with @p std::move(__d)
│ │ │ -
631 */
│ │ │ -
632 template<typename _Up, typename _Del = deleter_type,
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
│ │ │ -
636 unique_ptr(_Up __p,
│ │ │ - │ │ │ -
638 _Del&&> __d) noexcept
│ │ │ -
639 : _M_t(std::move(__p), std::move(__d))
│ │ │ -
640 { }
│ │ │ -
│ │ │ -
641
│ │ │ -
642 template<typename _Up, typename _Del = deleter_type,
│ │ │ -
643 typename _DelUnref = typename remove_reference<_Del>::type,
│ │ │ - │ │ │ -
645 unique_ptr(_Up,
│ │ │ - │ │ │ -
647 _DelUnref&&>) = delete;
│ │ │ -
648
│ │ │ -
649 /// Move constructor.
│ │ │ -
650 unique_ptr(unique_ptr&&) = default;
│ │ │ -
651
│ │ │ -
652 /// Creates a unique_ptr that owns nothing.
│ │ │ -
653 template<typename _Del = _Dp, typename = _DeleterConstraint<_Del>>
│ │ │ -
│ │ │ -
654 constexpr unique_ptr(nullptr_t) noexcept
│ │ │ -
655 : _M_t()
│ │ │ -
656 { }
│ │ │ -
│ │ │ -
657
│ │ │ -
658 template<typename _Up, typename _Ep, typename = _Require<
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
665 : _M_t(__u.release(), std::forward<_Ep>(__u.get_deleter()))
│ │ │ -
666 { }
│ │ │ -
667
│ │ │ -
668 /// Destructor, invokes the deleter if the stored pointer is not null.
│ │ │ -
669#if __cplusplus > 202002L && __cpp_constexpr_dynamic_alloc
│ │ │ -
670 constexpr
│ │ │ -
671#endif
│ │ │ -
│ │ │ - │ │ │ -
673 {
│ │ │ -
674 auto& __ptr = _M_t._M_ptr();
│ │ │ -
675 if (__ptr != nullptr)
│ │ │ - │ │ │ -
677 __ptr = pointer();
│ │ │ -
678 }
│ │ │ -
│ │ │ -
679
│ │ │ -
680 // Assignment.
│ │ │ -
681
│ │ │ -
682 /** @brief Move assignment operator.
│ │ │ -
683 *
│ │ │ -
684 * Invokes the deleter if this object owns a pointer.
│ │ │ -
685 */
│ │ │ - │ │ │ -
687 operator=(unique_ptr&&) = default;
│ │ │ -
688
│ │ │ -
689 /** @brief Assignment from another type.
│ │ │ -
690 *
│ │ │ -
691 * @param __u The object to transfer ownership from, which owns a
│ │ │ -
692 * convertible pointer to an array object.
│ │ │ -
693 *
│ │ │ -
694 * Invokes the deleter if this object owns a pointer.
│ │ │ -
695 */
│ │ │ -
696 template<typename _Up, typename _Ep>
│ │ │ - │ │ │ -
698 typename
│ │ │ - │ │ │ - │ │ │ -
701 >::value,
│ │ │ -
702 unique_ptr&>::type
│ │ │ -
│ │ │ - │ │ │ -
704 {
│ │ │ -
705 reset(__u.release());
│ │ │ -
706 get_deleter() = std::forward<_Ep>(__u.get_deleter());
│ │ │ -
707 return *this;
│ │ │ -
708 }
│ │ │ -
│ │ │ -
709
│ │ │ -
710 /// Reset the %unique_ptr to empty, invoking the deleter if necessary.
│ │ │ - │ │ │ - │ │ │ -
│ │ │ - │ │ │ -
714 {
│ │ │ -
715 reset();
│ │ │ -
716 return *this;
│ │ │ -
717 }
│ │ │ -
│ │ │ -
718
│ │ │ -
719 // Observers.
│ │ │ -
720
│ │ │ -
721 /// Access an element of owned array.
│ │ │ - │ │ │ -
723 typename std::add_lvalue_reference<element_type>::type
│ │ │ -
│ │ │ -
724 operator[](size_t __i) const
│ │ │ -
725 {
│ │ │ -
726 __glibcxx_assert(get() != pointer());
│ │ │ -
727 return get()[__i];
│ │ │ -
728 }
│ │ │ -
│ │ │ -
729
│ │ │ -
730 /// Return the stored pointer.
│ │ │ - │ │ │ -
732 pointer
│ │ │ -
│ │ │ -
733 get() const noexcept
│ │ │ -
734 { return _M_t._M_ptr(); }
│ │ │ -
│ │ │ -
735
│ │ │ -
736 /// Return a reference to the stored deleter.
│ │ │ - │ │ │ -
738 deleter_type&
│ │ │ -
│ │ │ -
739 get_deleter() noexcept
│ │ │ -
740 { return _M_t._M_deleter(); }
│ │ │ -
│ │ │ -
741
│ │ │ -
742 /// Return a reference to the stored deleter.
│ │ │ - │ │ │ -
744 const deleter_type&
│ │ │ -
│ │ │ -
745 get_deleter() const noexcept
│ │ │ -
746 { return _M_t._M_deleter(); }
│ │ │ -
│ │ │ -
747
│ │ │ -
748 /// Return @c true if the stored pointer is not null.
│ │ │ - │ │ │ -
│ │ │ -
750 explicit operator bool() const noexcept
│ │ │ -
751 { return get() == pointer() ? false : true; }
│ │ │ + │ │ │ +
440 // _M_codecvt->in may return error while __ilen > 0: this is
│ │ │ +
441 // ok, and actually occurs in case of mixed encodings (e.g.,
│ │ │ +
│ │ │ +
442 // XML files).
│ │ │ +
443 if (__r == codecvt_base::error)
│ │ │ +
444 break;
│ │ │ +
│ │ │ + │ │ │ +
446 __rlen = 1;
│ │ │ +
447 }
│ │ │ +
448 while (__ilen == 0 && !__got_eof);
│ │ │ +
449 }
│ │ │ +
450
│ │ │ +
451 if (__ilen > 0)
│ │ │ +
452 {
│ │ │ +
453 _M_set_buffer(__ilen);
│ │ │ +
454 _M_reading = true;
│ │ │ +
455 __ret = traits_type::to_int_type(*this->gptr());
│ │ │ +
456 }
│ │ │ +
457 else if (__got_eof)
│ │ │ +
458 {
│ │ │ +
459 // If the actual end of file is reached, set 'uncommitted'
│ │ │ +
460 // mode, thus allowing an immediate write without an
│ │ │ +
461 // intervening seek.
│ │ │ +
462 _M_set_buffer(-1);
│ │ │ +
463 _M_reading = false;
│ │ │ +
464 // However, reaching it while looping on partial means that
│ │ │ +
465 // the file has got an incomplete character.
│ │ │ +
466 if (__r == codecvt_base::partial)
│ │ │ +
467 __throw_ios_failure(__N("basic_filebuf::underflow "
│ │ │ +
468 "incomplete character in file"));
│ │ │ +
469 }
│ │ │ +
470 else if (__r == codecvt_base::error)
│ │ │ +
471 __throw_ios_failure(__N("basic_filebuf::underflow "
│ │ │ +
472 "invalid byte sequence in file"));
│ │ │ +
473 else
│ │ │ +
474 __throw_ios_failure(__N("basic_filebuf::underflow "
│ │ │ +
475 "error reading the file"), errno);
│ │ │ +
476 }
│ │ │ +
477 return __ret;
│ │ │ +
478 }
│ │ │ +
479
│ │ │ +
480 template<typename _CharT, typename _Traits>
│ │ │ +
481 typename basic_filebuf<_CharT, _Traits>::int_type
│ │ │ +
│ │ │ + │ │ │ +
483 pbackfail(int_type __i)
│ │ │ +
484 {
│ │ │ +
485 int_type __ret = traits_type::eof();
│ │ │ +
486 const bool __testin = _M_mode & ios_base::in;
│ │ │ +
487 if (__testin)
│ │ │ +
488 {
│ │ │ +
489 if (_M_writing)
│ │ │ +
490 {
│ │ │ +
491 if (overflow() == traits_type::eof())
│ │ │ +
492 return __ret;
│ │ │ +
493 _M_set_buffer(-1);
│ │ │ +
494 _M_writing = false;
│ │ │ +
495 }
│ │ │ +
496 // Remember whether the pback buffer is active, otherwise below
│ │ │ +
497 // we may try to store in it a second char (libstdc++/9761).
│ │ │ +
498 const bool __testpb = _M_pback_init;
│ │ │ +
499 const bool __testeof = traits_type::eq_int_type(__i, __ret);
│ │ │ +
500 int_type __tmp;
│ │ │ +
501 if (this->eback() < this->gptr())
│ │ │ +
502 {
│ │ │ +
503 this->gbump(-1);
│ │ │ +
504 __tmp = traits_type::to_int_type(*this->gptr());
│ │ │ +
505 }
│ │ │ +
506 else if (this->seekoff(-1, ios_base::cur) != pos_type(off_type(-1)))
│ │ │ +
507 {
│ │ │ +
508 __tmp = this->underflow();
│ │ │ +
509 if (traits_type::eq_int_type(__tmp, __ret))
│ │ │ +
510 return __ret;
│ │ │ +
511 }
│ │ │ +
512 else
│ │ │ +
513 {
│ │ │ +
514 // At the beginning of the buffer, need to make a
│ │ │ +
515 // putback position available. But the seek may fail
│ │ │ +
516 // (f.i., at the beginning of a file, see
│ │ │ +
517 // libstdc++/9439) and in that case we return
│ │ │ +
518 // traits_type::eof().
│ │ │ +
519 return __ret;
│ │ │ +
520 }
│ │ │ +
521
│ │ │ +
522 // Try to put back __i into input sequence in one of three ways.
│ │ │ +
523 // Order these tests done in is unspecified by the standard.
│ │ │ +
524 if (!__testeof && traits_type::eq_int_type(__i, __tmp))
│ │ │ +
525 __ret = __i;
│ │ │ +
526 else if (__testeof)
│ │ │ +
527 __ret = traits_type::not_eof(__i);
│ │ │ +
528 else if (!__testpb)
│ │ │ +
529 {
│ │ │ +
530 _M_create_pback();
│ │ │ +
531 _M_reading = true;
│ │ │ +
532 *this->gptr() = traits_type::to_char_type(__i);
│ │ │ +
533 __ret = __i;
│ │ │ +
534 }
│ │ │ +
535 }
│ │ │ +
536 return __ret;
│ │ │ +
537 }
│ │ │ +
│ │ │ +
538
│ │ │ +
539 template<typename _CharT, typename _Traits>
│ │ │ +
540 typename basic_filebuf<_CharT, _Traits>::int_type
│ │ │ +
│ │ │ + │ │ │ +
542 overflow(int_type __c)
│ │ │ +
543 {
│ │ │ +
544 int_type __ret = traits_type::eof();
│ │ │ +
545 const bool __testeof = traits_type::eq_int_type(__c, __ret);
│ │ │ +
546 const bool __testout = (_M_mode & ios_base::out
│ │ │ +
547 || _M_mode & ios_base::app);
│ │ │ +
548 if (__testout)
│ │ │ +
549 {
│ │ │ +
550 if (_M_reading)
│ │ │ +
551 {
│ │ │ +
552 _M_destroy_pback();
│ │ │ +
553 const int __gptr_off = _M_get_ext_pos(_M_state_last);
│ │ │ +
554 if (_M_seek(__gptr_off, ios_base::cur, _M_state_last)
│ │ │ +
555 == pos_type(off_type(-1)))
│ │ │ +
556 return __ret;
│ │ │ +
557 }
│ │ │ +
558 if (this->pbase() < this->pptr())
│ │ │ +
559 {
│ │ │ +
560 // If appropriate, append the overflow char.
│ │ │ +
561 if (!__testeof)
│ │ │ +
562 {
│ │ │ +
563 *this->pptr() = traits_type::to_char_type(__c);
│ │ │ +
564 this->pbump(1);
│ │ │ +
565 }
│ │ │ +
566
│ │ │ +
567 // Convert pending sequence to external representation,
│ │ │ +
568 // and output.
│ │ │ +
569 if (_M_convert_to_external(this->pbase(),
│ │ │ +
570 this->pptr() - this->pbase()))
│ │ │ +
571 {
│ │ │ +
572 _M_set_buffer(0);
│ │ │ +
573 __ret = traits_type::not_eof(__c);
│ │ │ +
574 }
│ │ │ +
575 }
│ │ │ +
576 else if (_M_buf_size > 1)
│ │ │ +
577 {
│ │ │ +
578 // Overflow in 'uncommitted' mode: set _M_writing, set
│ │ │ +
579 // the buffer to the initial 'write' mode, and put __c
│ │ │ +
580 // into the buffer.
│ │ │ +
581 _M_set_buffer(0);
│ │ │ +
582 _M_writing = true;
│ │ │ +
583 if (!__testeof)
│ │ │ +
584 {
│ │ │ +
585 *this->pptr() = traits_type::to_char_type(__c);
│ │ │ +
586 this->pbump(1);
│ │ │ +
587 }
│ │ │ +
588 __ret = traits_type::not_eof(__c);
│ │ │ +
589 }
│ │ │ +
590 else
│ │ │ +
591 {
│ │ │ +
592 // Unbuffered.
│ │ │ +
593 char_type __conv = traits_type::to_char_type(__c);
│ │ │ +
594 if (__testeof || _M_convert_to_external(&__conv, 1))
│ │ │ +
595 {
│ │ │ +
596 _M_writing = true;
│ │ │ +
597 __ret = traits_type::not_eof(__c);
│ │ │ +
598 }
│ │ │ +
599 }
│ │ │ +
600 }
│ │ │ +
601 return __ret;
│ │ │ +
602 }
│ │ │ +
│ │ │ +
603
│ │ │ +
604 template<typename _CharT, typename _Traits>
│ │ │ +
605 bool
│ │ │ + │ │ │ + │ │ │ +
608 {
│ │ │ +
609 // Sizes of external and pending output.
│ │ │ + │ │ │ + │ │ │ +
612 if (__check_facet(_M_codecvt).always_noconv())
│ │ │ +
613 {
│ │ │ +
614 __elen = _M_file.xsputn(reinterpret_cast<char*>(__ibuf), __ilen);
│ │ │ +
615 __plen = __ilen;
│ │ │ +
616 }
│ │ │ +
617 else
│ │ │ +
618 {
│ │ │ +
619 // Worst-case number of external bytes needed.
│ │ │ +
620 // XXX Not done encoding() == -1.
│ │ │ +
621 streamsize __blen = __ilen * _M_codecvt->max_length();
│ │ │ +
622 char* __buf = static_cast<char*>(__builtin_alloca(__blen));
│ │ │ +
623
│ │ │ +
624 char* __bend;
│ │ │ +
625 const char_type* __iend;
│ │ │ +
626 codecvt_base::result __r;
│ │ │ +
627 __r = _M_codecvt->out(_M_state_cur, __ibuf, __ibuf + __ilen,
│ │ │ +
628 __iend, __buf, __buf + __blen, __bend);
│ │ │ +
629
│ │ │ +
630 if (__r == codecvt_base::ok || __r == codecvt_base::partial)
│ │ │ +
631 __blen = __bend - __buf;
│ │ │ +
632 else if (__r == codecvt_base::noconv)
│ │ │ +
633 {
│ │ │ +
634 // Same as the always_noconv case above.
│ │ │ +
635 __buf = reinterpret_cast<char*>(__ibuf);
│ │ │ +
636 __blen = __ilen;
│ │ │ +
637 }
│ │ │ +
638 else
│ │ │ +
639 __throw_ios_failure(__N("basic_filebuf::_M_convert_to_external "
│ │ │ +
640 "conversion error"));
│ │ │ +
641
│ │ │ +
642 __elen = _M_file.xsputn(__buf, __blen);
│ │ │ +
643 __plen = __blen;
│ │ │ +
644
│ │ │ +
645 // Try once more for partial conversions.
│ │ │ +
646 if (__r == codecvt_base::partial && __elen == __plen)
│ │ │ +
647 {
│ │ │ +
648 const char_type* __iresume = __iend;
│ │ │ +
649 streamsize __rlen = this->pptr() - __iend;
│ │ │ +
650 __r = _M_codecvt->out(_M_state_cur, __iresume,
│ │ │ +
651 __iresume + __rlen, __iend, __buf,
│ │ │ +
652 __buf + __blen, __bend);
│ │ │ +
653 if (__r != codecvt_base::error)
│ │ │ +
654 {
│ │ │ +
655 __rlen = __bend - __buf;
│ │ │ +
656 __elen = _M_file.xsputn(__buf, __rlen);
│ │ │ +
657 __plen = __rlen;
│ │ │ +
658 }
│ │ │ +
659 else
│ │ │ +
660 __throw_ios_failure(__N("basic_filebuf::_M_convert_to_external "
│ │ │ +
661 "conversion error"));
│ │ │ +
662 }
│ │ │ +
663 }
│ │ │ +
664 return __elen == __plen;
│ │ │ +
665 }
│ │ │ +
666
│ │ │ +
667 template<typename _CharT, typename _Traits>
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
670 xsgetn(_CharT* __s, streamsize __n)
│ │ │ +
671 {
│ │ │ +
672 // Clear out pback buffer before going on to the real deal...
│ │ │ +
673 streamsize __ret = 0;
│ │ │ +
674 if (_M_pback_init)
│ │ │ +
675 {
│ │ │ +
676 if (__n > 0 && this->gptr() == this->eback())
│ │ │ +
677 {
│ │ │ +
678 *__s++ = *this->gptr(); // emulate non-underflowing sbumpc
│ │ │ +
679 this->gbump(1);
│ │ │ +
680 __ret = 1;
│ │ │ +
681 --__n;
│ │ │ +
682 }
│ │ │ +
683 _M_destroy_pback();
│ │ │ +
684 }
│ │ │ +
685 else if (_M_writing)
│ │ │ +
686 {
│ │ │ +
687 if (overflow() == traits_type::eof())
│ │ │ +
688 return __ret;
│ │ │ +
689 _M_set_buffer(-1);
│ │ │ +
690 _M_writing = false;
│ │ │ +
691 }
│ │ │ +
692
│ │ │ +
693 // Optimization in the always_noconv() case, to be generalized in the
│ │ │ +
694 // future: when __n > __buflen we read directly instead of using the
│ │ │ +
695 // buffer repeatedly.
│ │ │ +
696 const bool __testin = _M_mode & ios_base::in;
│ │ │ +
697 const streamsize __buflen = _M_buf_size > 1 ? _M_buf_size - 1 : 1;
│ │ │ +
698
│ │ │ +
699 if (__n > __buflen && __check_facet(_M_codecvt).always_noconv()
│ │ │ +
700 && __testin)
│ │ │ +
701 {
│ │ │ +
702 // First, copy the chars already present in the buffer.
│ │ │ +
703 const streamsize __avail = this->egptr() - this->gptr();
│ │ │ +
704 if (__avail != 0)
│ │ │ +
705 {
│ │ │ +
706 traits_type::copy(__s, this->gptr(), __avail);
│ │ │ +
707 __s += __avail;
│ │ │ +
708 this->setg(this->eback(), this->gptr() + __avail, this->egptr());
│ │ │ +
709 __ret += __avail;
│ │ │ +
710 __n -= __avail;
│ │ │ +
711 }
│ │ │ +
712
│ │ │ +
713 // Need to loop in case of short reads (relatively common
│ │ │ +
714 // with pipes).
│ │ │ + │ │ │ +
716 for (;;)
│ │ │ +
717 {
│ │ │ +
718 __len = _M_file.xsgetn(reinterpret_cast<char*>(__s), __n);
│ │ │ +
719 if (__len == -1)
│ │ │ +
720 __throw_ios_failure(__N("basic_filebuf::xsgetn "
│ │ │ +
721 "error reading the file"), errno);
│ │ │ +
722 if (__len == 0)
│ │ │ +
723 break;
│ │ │ +
724
│ │ │ +
725 __n -= __len;
│ │ │ +
726 __ret += __len;
│ │ │ +
727 if (__n == 0)
│ │ │ +
728 break;
│ │ │ +
729
│ │ │ +
730 __s += __len;
│ │ │ +
731 }
│ │ │ +
732
│ │ │ +
733 if (__n == 0)
│ │ │ +
734 {
│ │ │ +
735 // Set _M_reading. Buffer is already in initial 'read' mode.
│ │ │ +
736 _M_reading = true;
│ │ │ +
737 }
│ │ │ +
738 else if (__len == 0)
│ │ │ +
739 {
│ │ │ +
740 // If end of file is reached, set 'uncommitted'
│ │ │ +
741 // mode, thus allowing an immediate write without
│ │ │ +
742 // an intervening seek.
│ │ │ +
743 _M_set_buffer(-1);
│ │ │ +
744 _M_reading = false;
│ │ │ +
745 }
│ │ │ +
746 }
│ │ │ +
747 else
│ │ │ +
748 __ret += __streambuf_type::xsgetn(__s, __n);
│ │ │ +
749
│ │ │ +
750 return __ret;
│ │ │ +
751 }
│ │ │
│ │ │
752
│ │ │ -
753 // Modifiers.
│ │ │ -
754
│ │ │ -
755 /// Release ownership of any stored pointer.
│ │ │ - │ │ │ -
757 pointer
│ │ │ -
│ │ │ -
758 release() noexcept
│ │ │ -
759 { return _M_t.release(); }
│ │ │ -
│ │ │ -
760
│ │ │ -
761 /** @brief Replace the stored pointer.
│ │ │ -
762 *
│ │ │ -
763 * @param __p The new pointer to store.
│ │ │ -
764 *
│ │ │ -
765 * The deleter will be invoked if a pointer is already owned.
│ │ │ -
766 */
│ │ │ -
767 template <typename _Up,
│ │ │ -
768 typename = _Require<
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
773 typename remove_pointer<_Up>::type(*)[],
│ │ │ -
774 element_type(*)[]
│ │ │ -
775 >
│ │ │ -
776 >
│ │ │ -
777 >
│ │ │ -
778 >>
│ │ │ - │ │ │ -
780 void
│ │ │ -
│ │ │ -
781 reset(_Up __p) noexcept
│ │ │ -
782 { _M_t.reset(std::move(__p)); }
│ │ │ -
│ │ │ -
783
│ │ │ - │ │ │ -
785 void reset(nullptr_t = nullptr) noexcept
│ │ │ -
786 { reset(pointer()); }
│ │ │ -
787
│ │ │ -
788 /// Exchange the pointer and deleter with another object.
│ │ │ -
789 _GLIBCXX23_CONSTEXPR
│ │ │ -
790 void
│ │ │ -
│ │ │ -
791 swap(unique_ptr& __u) noexcept
│ │ │ -
792 {
│ │ │ -
793 static_assert(__is_swappable<_Dp>::value, "deleter must be swappable");
│ │ │ -
794 _M_t.swap(__u._M_t);
│ │ │ -
795 }
│ │ │ -
│ │ │ -
796
│ │ │ -
797 // Disable copy from lvalue.
│ │ │ -
798 unique_ptr(const unique_ptr&) = delete;
│ │ │ -
799 unique_ptr& operator=(const unique_ptr&) = delete;
│ │ │ -
800 };
│ │ │ -
│ │ │ -
801
│ │ │ -
802 /// @{
│ │ │ -
803 /// @relates unique_ptr
│ │ │ -
804
│ │ │ -
805 /// Swap overload for unique_ptr
│ │ │ -
806 template<typename _Tp, typename _Dp>
│ │ │ -
807 inline
│ │ │ -
808#if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11
│ │ │ -
809 // Constrained free swap overload, see p0185r1
│ │ │ -
810 _GLIBCXX23_CONSTEXPR
│ │ │ -
811 typename enable_if<__is_swappable<_Dp>::value>::type
│ │ │ -
812#else
│ │ │ -
813 void
│ │ │ -
814#endif
│ │ │ -
│ │ │ - │ │ │ -
816 unique_ptr<_Tp, _Dp>& __y) noexcept
│ │ │ -
817 { __x.swap(__y); }
│ │ │ -
│ │ │ -
818
│ │ │ -
819#if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11
│ │ │ -
820 template<typename _Tp, typename _Dp>
│ │ │ - │ │ │ - │ │ │ -
823 unique_ptr<_Tp, _Dp>&) = delete;
│ │ │ -
824#endif
│ │ │ -
825
│ │ │ -
826 /// Equality operator for unique_ptr objects, compares the owned pointers
│ │ │ -
827 template<typename _Tp, typename _Dp,
│ │ │ -
828 typename _Up, typename _Ep>
│ │ │ -
829 _GLIBCXX_NODISCARD _GLIBCXX23_CONSTEXPR
│ │ │ -
830 inline bool
│ │ │ -
│ │ │ -
831 operator==(const unique_ptr<_Tp, _Dp>& __x,
│ │ │ -
832 const unique_ptr<_Up, _Ep>& __y)
│ │ │ -
833 { return __x.get() == __y.get(); }
│ │ │ -
│ │ │ -
834
│ │ │ -
835 /// unique_ptr comparison with nullptr
│ │ │ -
836 template<typename _Tp, typename _Dp>
│ │ │ -
837 _GLIBCXX_NODISCARD _GLIBCXX23_CONSTEXPR
│ │ │ -
838 inline bool
│ │ │ -
│ │ │ -
839 operator==(const unique_ptr<_Tp, _Dp>& __x, nullptr_t) noexcept
│ │ │ -
840 { return !__x; }
│ │ │ -
│ │ │ -
841
│ │ │ -
842#ifndef __cpp_lib_three_way_comparison
│ │ │ -
843 /// unique_ptr comparison with nullptr
│ │ │ -
844 template<typename _Tp, typename _Dp>
│ │ │ -
845 _GLIBCXX_NODISCARD
│ │ │ -
846 inline bool
│ │ │ -
│ │ │ -
847 operator==(nullptr_t, const unique_ptr<_Tp, _Dp>& __x) noexcept
│ │ │ -
848 { return !__x; }
│ │ │ -
│ │ │ -
849
│ │ │ -
850 /// Inequality operator for unique_ptr objects, compares the owned pointers
│ │ │ -
851 template<typename _Tp, typename _Dp,
│ │ │ -
852 typename _Up, typename _Ep>
│ │ │ -
853 _GLIBCXX_NODISCARD
│ │ │ -
854 inline bool
│ │ │ -
│ │ │ -
855 operator!=(const unique_ptr<_Tp, _Dp>& __x,
│ │ │ -
856 const unique_ptr<_Up, _Ep>& __y)
│ │ │ -
857 { return __x.get() != __y.get(); }
│ │ │ -
│ │ │ -
858
│ │ │ -
859 /// unique_ptr comparison with nullptr
│ │ │ -
860 template<typename _Tp, typename _Dp>
│ │ │ -
861 _GLIBCXX_NODISCARD
│ │ │ -
862 inline bool
│ │ │ -
│ │ │ -
863 operator!=(const unique_ptr<_Tp, _Dp>& __x, nullptr_t) noexcept
│ │ │ -
864 { return (bool)__x; }
│ │ │ -
│ │ │ -
865
│ │ │ -
866 /// unique_ptr comparison with nullptr
│ │ │ -
867 template<typename _Tp, typename _Dp>
│ │ │ -
868 _GLIBCXX_NODISCARD
│ │ │ -
869 inline bool
│ │ │ -
│ │ │ -
870 operator!=(nullptr_t, const unique_ptr<_Tp, _Dp>& __x) noexcept
│ │ │ -
871 { return (bool)__x; }
│ │ │ -
│ │ │ -
872#endif // three way comparison
│ │ │ -
873
│ │ │ -
874 /// Relational operator for unique_ptr objects, compares the owned pointers
│ │ │ -
875 template<typename _Tp, typename _Dp,
│ │ │ -
876 typename _Up, typename _Ep>
│ │ │ -
877 _GLIBCXX_NODISCARD _GLIBCXX23_CONSTEXPR
│ │ │ -
│ │ │ -
878 inline bool
│ │ │ -
879 operator<(const unique_ptr<_Tp, _Dp>& __x,
│ │ │ -
880 const unique_ptr<_Up, _Ep>& __y)
│ │ │ -
881 {
│ │ │ -
882 typedef typename
│ │ │ - │ │ │ -
884 typename unique_ptr<_Up, _Ep>::pointer>::type _CT;
│ │ │ -
885 return std::less<_CT>()(__x.get(), __y.get());
│ │ │ -
886 }
│ │ │ -
│ │ │ -
887
│ │ │ -
888 /// unique_ptr comparison with nullptr
│ │ │ -
889 template<typename _Tp, typename _Dp>
│ │ │ -
890 _GLIBCXX_NODISCARD _GLIBCXX23_CONSTEXPR
│ │ │ -
│ │ │ -
891 inline bool
│ │ │ -
892 operator<(const unique_ptr<_Tp, _Dp>& __x, nullptr_t)
│ │ │ -
893 {
│ │ │ - │ │ │ -
895 nullptr);
│ │ │ -
896 }
│ │ │ -
│ │ │ -
897
│ │ │ -
898 /// unique_ptr comparison with nullptr
│ │ │ -
899 template<typename _Tp, typename _Dp>
│ │ │ -
900 _GLIBCXX_NODISCARD _GLIBCXX23_CONSTEXPR
│ │ │ -
│ │ │ -
901 inline bool
│ │ │ -
902 operator<(nullptr_t, const unique_ptr<_Tp, _Dp>& __x)
│ │ │ -
903 {
│ │ │ - │ │ │ -
905 __x.get());
│ │ │ -
906 }
│ │ │ -
│ │ │ -
907
│ │ │ -
908 /// Relational operator for unique_ptr objects, compares the owned pointers
│ │ │ -
909 template<typename _Tp, typename _Dp,
│ │ │ -
910 typename _Up, typename _Ep>
│ │ │ -
911 _GLIBCXX_NODISCARD _GLIBCXX23_CONSTEXPR
│ │ │ -
│ │ │ -
912 inline bool
│ │ │ -
913 operator<=(const unique_ptr<_Tp, _Dp>& __x,
│ │ │ -
914 const unique_ptr<_Up, _Ep>& __y)
│ │ │ -
915 { return !(__y < __x); }
│ │ │ -
│ │ │ -
916
│ │ │ -
917 /// unique_ptr comparison with nullptr
│ │ │ -
918 template<typename _Tp, typename _Dp>
│ │ │ -
919 _GLIBCXX_NODISCARD _GLIBCXX23_CONSTEXPR
│ │ │ -
│ │ │ -
920 inline bool
│ │ │ -
921 operator<=(const unique_ptr<_Tp, _Dp>& __x, nullptr_t)
│ │ │ -
922 { return !(nullptr < __x); }
│ │ │ -
│ │ │ -
923
│ │ │ -
924 /// unique_ptr comparison with nullptr
│ │ │ -
925 template<typename _Tp, typename _Dp>
│ │ │ -
926 _GLIBCXX_NODISCARD _GLIBCXX23_CONSTEXPR
│ │ │ -
│ │ │ -
927 inline bool
│ │ │ -
928 operator<=(nullptr_t, const unique_ptr<_Tp, _Dp>& __x)
│ │ │ -
929 { return !(__x < nullptr); }
│ │ │ -
│ │ │ -
930
│ │ │ -
931 /// Relational operator for unique_ptr objects, compares the owned pointers
│ │ │ -
932 template<typename _Tp, typename _Dp,
│ │ │ -
933 typename _Up, typename _Ep>
│ │ │ -
934 _GLIBCXX_NODISCARD _GLIBCXX23_CONSTEXPR
│ │ │ -
935 inline bool
│ │ │ -
│ │ │ -
936 operator>(const unique_ptr<_Tp, _Dp>& __x,
│ │ │ -
937 const unique_ptr<_Up, _Ep>& __y)
│ │ │ -
938 { return (__y < __x); }
│ │ │ -
│ │ │ -
939
│ │ │ -
940 /// unique_ptr comparison with nullptr
│ │ │ -
941 template<typename _Tp, typename _Dp>
│ │ │ -
942 _GLIBCXX_NODISCARD _GLIBCXX23_CONSTEXPR
│ │ │ -
943 inline bool
│ │ │ -
│ │ │ -
944 operator>(const unique_ptr<_Tp, _Dp>& __x, nullptr_t)
│ │ │ -
945 {
│ │ │ - │ │ │ -
947 __x.get());
│ │ │ -
948 }
│ │ │ -
│ │ │ -
949
│ │ │ -
950 /// unique_ptr comparison with nullptr
│ │ │ -
951 template<typename _Tp, typename _Dp>
│ │ │ -
952 _GLIBCXX_NODISCARD _GLIBCXX23_CONSTEXPR
│ │ │ -
953 inline bool
│ │ │ -
│ │ │ -
954 operator>(nullptr_t, const unique_ptr<_Tp, _Dp>& __x)
│ │ │ -
955 {
│ │ │ - │ │ │ -
957 nullptr);
│ │ │ -
958 }
│ │ │ -
│ │ │ -
959
│ │ │ -
960 /// Relational operator for unique_ptr objects, compares the owned pointers
│ │ │ -
961 template<typename _Tp, typename _Dp,
│ │ │ -
962 typename _Up, typename _Ep>
│ │ │ -
963 _GLIBCXX_NODISCARD _GLIBCXX23_CONSTEXPR
│ │ │ -
964 inline bool
│ │ │ -
│ │ │ -
965 operator>=(const unique_ptr<_Tp, _Dp>& __x,
│ │ │ -
966 const unique_ptr<_Up, _Ep>& __y)
│ │ │ -
967 { return !(__x < __y); }
│ │ │ -
│ │ │ -
968
│ │ │ -
969 /// unique_ptr comparison with nullptr
│ │ │ -
970 template<typename _Tp, typename _Dp>
│ │ │ -
971 _GLIBCXX_NODISCARD _GLIBCXX23_CONSTEXPR
│ │ │ -
972 inline bool
│ │ │ -
│ │ │ -
973 operator>=(const unique_ptr<_Tp, _Dp>& __x, nullptr_t)
│ │ │ -
974 { return !(__x < nullptr); }
│ │ │ -
│ │ │ -
975
│ │ │ -
976 /// unique_ptr comparison with nullptr
│ │ │ -
977 template<typename _Tp, typename _Dp>
│ │ │ -
978 _GLIBCXX_NODISCARD inline bool
│ │ │ -
│ │ │ -
979 operator>=(nullptr_t, const unique_ptr<_Tp, _Dp>& __x)
│ │ │ -
980 { return !(nullptr < __x); }
│ │ │ -
│ │ │ -
981
│ │ │ -
982#ifdef __cpp_lib_three_way_comparison
│ │ │ -
983 template<typename _Tp, typename _Dp, typename _Up, typename _Ep>
│ │ │ -
984 requires three_way_comparable_with<typename unique_ptr<_Tp, _Dp>::pointer,
│ │ │ -
985 typename unique_ptr<_Up, _Ep>::pointer>
│ │ │ -
986 _GLIBCXX23_CONSTEXPR
│ │ │ -
987 inline
│ │ │ -
988 compare_three_way_result_t<typename unique_ptr<_Tp, _Dp>::pointer,
│ │ │ -
989 typename unique_ptr<_Up, _Ep>::pointer>
│ │ │ -
990 operator<=>(const unique_ptr<_Tp, _Dp>& __x,
│ │ │ -
991 const unique_ptr<_Up, _Ep>& __y)
│ │ │ -
992 { return compare_three_way()(__x.get(), __y.get()); }
│ │ │ -
993
│ │ │ -
994 template<typename _Tp, typename _Dp>
│ │ │ -
995 requires three_way_comparable<typename unique_ptr<_Tp, _Dp>::pointer>
│ │ │ -
996 _GLIBCXX23_CONSTEXPR
│ │ │ -
997 inline
│ │ │ -
998 compare_three_way_result_t<typename unique_ptr<_Tp, _Dp>::pointer>
│ │ │ -
999 operator<=>(const unique_ptr<_Tp, _Dp>& __x, nullptr_t)
│ │ │ -
1000 {
│ │ │ -
1001 using pointer = typename unique_ptr<_Tp, _Dp>::pointer;
│ │ │ -
1002 return compare_three_way()(__x.get(), static_cast<pointer>(nullptr));
│ │ │ -
1003 }
│ │ │ -
1004#endif
│ │ │ -
1005 /// @} relates unique_ptr
│ │ │ -
1006
│ │ │ -
1007 /// @cond undocumented
│ │ │ -
1008 template<typename _Up, typename _Ptr = typename _Up::pointer,
│ │ │ -
1009 bool = __poison_hash<_Ptr>::__enable_hash_call>
│ │ │ -
1010 struct __uniq_ptr_hash
│ │ │ -
1011#if ! _GLIBCXX_INLINE_VERSION
│ │ │ -
1012 : private __poison_hash<_Ptr>
│ │ │ -
1013#endif
│ │ │ +
753 template<typename _CharT, typename _Traits>
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
756 xsputn(const _CharT* __s, streamsize __n)
│ │ │ +
757 {
│ │ │ +
758 streamsize __ret = 0;
│ │ │ +
759 // Optimization in the always_noconv() case, to be generalized in the
│ │ │ +
760 // future: when __n is sufficiently large we write directly instead of
│ │ │ +
761 // using the buffer.
│ │ │ +
762 const bool __testout = (_M_mode & ios_base::out
│ │ │ +
763 || _M_mode & ios_base::app);
│ │ │ +
764 if (__check_facet(_M_codecvt).always_noconv()
│ │ │ +
765 && __testout && !_M_reading)
│ │ │ +
766 {
│ │ │ +
767 // Measurement would reveal the best choice.
│ │ │ +
768 const streamsize __chunk = 1ul << 10;
│ │ │ +
769 streamsize __bufavail = this->epptr() - this->pptr();
│ │ │ +
770
│ │ │ +
771 // Don't mistake 'uncommitted' mode buffered with unbuffered.
│ │ │ +
772 if (!_M_writing && _M_buf_size > 1)
│ │ │ +
773 __bufavail = _M_buf_size - 1;
│ │ │ +
774
│ │ │ + │ │ │ +
776 if (__n >= __limit)
│ │ │ +
777 {
│ │ │ +
778 const streamsize __buffill = this->pptr() - this->pbase();
│ │ │ +
779 const char* __buf = reinterpret_cast<const char*>(this->pbase());
│ │ │ +
780 __ret = _M_file.xsputn_2(__buf, __buffill,
│ │ │ +
781 reinterpret_cast<const char*>(__s),
│ │ │ +
782 __n);
│ │ │ +
783 if (__ret == __buffill + __n)
│ │ │ +
784 {
│ │ │ +
785 _M_set_buffer(0);
│ │ │ +
786 _M_writing = true;
│ │ │ +
787 }
│ │ │ +
788 if (__ret > __buffill)
│ │ │ +
789 __ret -= __buffill;
│ │ │ +
790 else
│ │ │ +
791 __ret = 0;
│ │ │ +
792 }
│ │ │ +
793 else
│ │ │ +
794 __ret = __streambuf_type::xsputn(__s, __n);
│ │ │ +
795 }
│ │ │ +
796 else
│ │ │ +
797 __ret = __streambuf_type::xsputn(__s, __n);
│ │ │ +
798 return __ret;
│ │ │ +
799 }
│ │ │ +
│ │ │ +
│ │ │ +
800
│ │ │ +
801 template<typename _CharT, typename _Traits>
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
804 setbuf(char_type* __s, streamsize __n)
│ │ │ +
805 {
│ │ │ +
806 if (!this->is_open())
│ │ │ +
807 {
│ │ │ +
808 if (__s == 0 && __n == 0)
│ │ │ +
809 _M_buf_size = 1;
│ │ │ +
810 else if (__s && __n > 0)
│ │ │ +
811 {
│ │ │ +
812 // This is implementation-defined behavior, and assumes that
│ │ │ +
813 // an external char_type array of length __n exists and has
│ │ │ +
814 // been pre-allocated. If this is not the case, things will
│ │ │ +
815 // quickly blow up. When __n > 1, __n - 1 positions will be
│ │ │ +
816 // used for the get area, __n - 1 for the put area and 1
│ │ │ +
817 // position to host the overflow char of a full put area.
│ │ │ +
818 // When __n == 1, 1 position will be used for the get area
│ │ │ +
819 // and 0 for the put area, as in the unbuffered case above.
│ │ │ +
820 _M_buf = __s;
│ │ │ +
821 _M_buf_size = __n;
│ │ │ +
822 }
│ │ │ +
823 }
│ │ │ +
824 return this;
│ │ │ +
825 }
│ │ │ +
│ │ │ +
826
│ │ │ +
827
│ │ │ +
828 // According to 27.8.1.4 p11 - 13, seekoff should ignore the last
│ │ │ +
829 // argument (of type openmode).
│ │ │ +
830 template<typename _CharT, typename _Traits>
│ │ │ +
831 typename basic_filebuf<_CharT, _Traits>::pos_type
│ │ │ +
│ │ │ + │ │ │ +
833 seekoff(off_type __off, ios_base::seekdir __way, ios_base::openmode)
│ │ │ +
834 {
│ │ │ +
835 int __width = 0;
│ │ │ +
836 if (_M_codecvt)
│ │ │ +
837 __width = _M_codecvt->encoding();
│ │ │ +
838 if (__width < 0)
│ │ │ +
839 __width = 0;
│ │ │ +
840
│ │ │ +
841 pos_type __ret = pos_type(off_type(-1));
│ │ │ +
842 const bool __testfail = __off != 0 && __width <= 0;
│ │ │ +
843 if (this->is_open() && !__testfail)
│ │ │ +
844 {
│ │ │ +
845 // tellg and tellp queries do not affect any state, unless
│ │ │ +
846 // ! always_noconv and the put sequence is not empty.
│ │ │ +
847 // In that case, determining the position requires converting the
│ │ │ +
848 // put sequence. That doesn't use ext_buf, so requires a flush.
│ │ │ +
849 bool __no_movement = __way == ios_base::cur && __off == 0
│ │ │ +
850 && (!_M_writing || _M_codecvt->always_noconv());
│ │ │ +
851
│ │ │ +
852 // Ditch any pback buffers to avoid confusion.
│ │ │ +
853 if (!__no_movement)
│ │ │ +
854 _M_destroy_pback();
│ │ │ +
855
│ │ │ +
856 // Correct state at destination. Note that this is the correct
│ │ │ +
857 // state for the current position during output, because
│ │ │ +
858 // codecvt::unshift() returns the state to the initial state.
│ │ │ +
859 // This is also the correct state at the end of the file because
│ │ │ +
860 // an unshift sequence should have been written at the end.
│ │ │ +
861 __state_type __state = _M_state_beg;
│ │ │ +
862 off_type __computed_off = __off * __width;
│ │ │ +
863 if (_M_reading && __way == ios_base::cur)
│ │ │ +
864 {
│ │ │ +
865 __state = _M_state_last;
│ │ │ +
866 __computed_off += _M_get_ext_pos(__state);
│ │ │ +
867 }
│ │ │ +
868 if (!__no_movement)
│ │ │ +
869 __ret = _M_seek(__computed_off, __way, __state);
│ │ │ +
870 else
│ │ │ +
871 {
│ │ │ +
872 if (_M_writing)
│ │ │ +
873 __computed_off = this->pptr() - this->pbase();
│ │ │ +
874
│ │ │ +
875 off_type __file_off = _M_file.seekoff(0, ios_base::cur);
│ │ │ +
876 if (__file_off != off_type(-1))
│ │ │ +
877 {
│ │ │ + │ │ │ +
879 __ret.state(__state);
│ │ │ +
880 }
│ │ │ +
881 }
│ │ │ +
882 }
│ │ │ +
883 return __ret;
│ │ │ +
884 }
│ │ │ +
│ │ │ +
885
│ │ │ +
886 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ +
887 // 171. Strange seekpos() semantics due to joint position
│ │ │ +
888 // According to the resolution of DR 171, seekpos should ignore the last
│ │ │ +
889 // argument (of type openmode).
│ │ │ +
890 template<typename _CharT, typename _Traits>
│ │ │ +
891 typename basic_filebuf<_CharT, _Traits>::pos_type
│ │ │ +
│ │ │ + │ │ │ +
893 seekpos(pos_type __pos, ios_base::openmode)
│ │ │ +
894 {
│ │ │ +
895 pos_type __ret = pos_type(off_type(-1));
│ │ │ +
896 if (this->is_open())
│ │ │ +
897 {
│ │ │ +
898 // Ditch any pback buffers to avoid confusion.
│ │ │ +
899 _M_destroy_pback();
│ │ │ +
900 __ret = _M_seek(off_type(__pos), ios_base::beg, __pos.state());
│ │ │ +
901 }
│ │ │ +
902 return __ret;
│ │ │ +
903 }
│ │ │ +
│ │ │ +
904
│ │ │ +
905 template<typename _CharT, typename _Traits>
│ │ │ +
906 typename basic_filebuf<_CharT, _Traits>::pos_type
│ │ │ + │ │ │ +
908 _M_seek(off_type __off, ios_base::seekdir __way, __state_type __state)
│ │ │ +
909 {
│ │ │ +
910 pos_type __ret = pos_type(off_type(-1));
│ │ │ +
911 if (_M_terminate_output())
│ │ │ +
912 {
│ │ │ +
913 off_type __file_off = _M_file.seekoff(__off, __way);
│ │ │ +
914 if (__file_off != off_type(-1))
│ │ │ +
915 {
│ │ │ +
916 _M_reading = false;
│ │ │ +
917 _M_writing = false;
│ │ │ +
918 _M_ext_next = _M_ext_end = _M_ext_buf;
│ │ │ +
919 _M_set_buffer(-1);
│ │ │ +
920 _M_state_cur = __state;
│ │ │ + │ │ │ +
922 __ret.state(_M_state_cur);
│ │ │ +
923 }
│ │ │ +
924 }
│ │ │ +
925 return __ret;
│ │ │ +
926 }
│ │ │ +
927
│ │ │ +
928 // Returns the distance from the end of the ext buffer to the point
│ │ │ +
929 // corresponding to gptr(). This is a negative value. Updates __state
│ │ │ +
930 // from eback() correspondence to gptr().
│ │ │ +
931 template<typename _CharT, typename _Traits>
│ │ │ +
932 int basic_filebuf<_CharT, _Traits>::
│ │ │ +
933 _M_get_ext_pos(__state_type& __state)
│ │ │ +
934 {
│ │ │ +
935 if (_M_codecvt->always_noconv())
│ │ │ +
936 return this->gptr() - this->egptr();
│ │ │ +
937 else
│ │ │ +
938 {
│ │ │ +
939 // Calculate offset from _M_ext_buf that corresponds to
│ │ │ +
940 // gptr(). Precondition: __state == _M_state_last, which
│ │ │ +
941 // corresponds to eback().
│ │ │ +
942 const int __gptr_off =
│ │ │ +
943 _M_codecvt->length(__state, _M_ext_buf, _M_ext_next,
│ │ │ +
944 this->gptr() - this->eback());
│ │ │ +
945 return _M_ext_buf + __gptr_off - _M_ext_end;
│ │ │ +
946 }
│ │ │ +
947 }
│ │ │ +
948
│ │ │ +
949 template<typename _CharT, typename _Traits>
│ │ │ +
950 bool
│ │ │ +
951 basic_filebuf<_CharT, _Traits>::
│ │ │ +
952 _M_terminate_output()
│ │ │ +
953 {
│ │ │ +
954 // Part one: update the output sequence.
│ │ │ +
955 bool __testvalid = true;
│ │ │ +
956 if (this->pbase() < this->pptr())
│ │ │ +
957 {
│ │ │ +
958 const int_type __tmp = this->overflow();
│ │ │ +
959 if (traits_type::eq_int_type(__tmp, traits_type::eof()))
│ │ │ +
960 __testvalid = false;
│ │ │ +
961 }
│ │ │ +
962
│ │ │ +
963 // Part two: output unshift sequence.
│ │ │ +
964 if (_M_writing && !__check_facet(_M_codecvt).always_noconv()
│ │ │ +
965 && __testvalid)
│ │ │ +
966 {
│ │ │ +
967 // Note: this value is arbitrary, since there is no way to
│ │ │ +
968 // get the length of the unshift sequence from codecvt,
│ │ │ +
969 // without calling unshift.
│ │ │ +
970 const size_t __blen = 128;
│ │ │ +
971 char __buf[__blen];
│ │ │ +
972 codecvt_base::result __r;
│ │ │ +
973 streamsize __ilen = 0;
│ │ │ +
974
│ │ │ +
975 do
│ │ │ +
976 {
│ │ │ +
977 char* __next;
│ │ │ +
978 __r = _M_codecvt->unshift(_M_state_cur, __buf,
│ │ │ +
979 __buf + __blen, __next);
│ │ │ +
980 if (__r == codecvt_base::error)
│ │ │ +
981 __testvalid = false;
│ │ │ +
982 else if (__r == codecvt_base::ok ||
│ │ │ +
983 __r == codecvt_base::partial)
│ │ │ +
984 {
│ │ │ +
985 __ilen = __next - __buf;
│ │ │ +
986 if (__ilen > 0)
│ │ │ +
987 {
│ │ │ +
988 const streamsize __elen = _M_file.xsputn(__buf, __ilen);
│ │ │ +
989 if (__elen != __ilen)
│ │ │ +
990 __testvalid = false;
│ │ │ +
991 }
│ │ │ +
992 }
│ │ │ +
993 }
│ │ │ +
994 while (__r == codecvt_base::partial && __ilen > 0 && __testvalid);
│ │ │ +
995
│ │ │ +
996 if (__testvalid)
│ │ │ +
997 {
│ │ │ +
998 // This second call to overflow() is required by the standard,
│ │ │ +
999 // but it's not clear why it's needed, since the output buffer
│ │ │ +
1000 // should be empty by this point (it should have been emptied
│ │ │ +
1001 // in the first call to overflow()).
│ │ │ +
1002 const int_type __tmp = this->overflow();
│ │ │ +
1003 if (traits_type::eq_int_type(__tmp, traits_type::eof()))
│ │ │ +
1004 __testvalid = false;
│ │ │ +
1005 }
│ │ │ +
1006 }
│ │ │ +
1007 return __testvalid;
│ │ │ +
1008 }
│ │ │ +
1009
│ │ │ +
1010 template<typename _CharT, typename _Traits>
│ │ │ +
1011 int
│ │ │ +
│ │ │ + │ │ │ +
1013 sync()
│ │ │
1014 {
│ │ │ -
1015 size_t
│ │ │ -
1016 operator()(const _Up& __u) const
│ │ │ -
1017 noexcept(noexcept(std::declval<hash<_Ptr>>()(std::declval<_Ptr>())))
│ │ │ -
1018 { return hash<_Ptr>()(__u.get()); }
│ │ │ -
1019 };
│ │ │ -
1020
│ │ │ -
1021 template<typename _Up, typename _Ptr>
│ │ │ -
1022 struct __uniq_ptr_hash<_Up, _Ptr, false>
│ │ │ -
1023 : private __poison_hash<_Ptr>
│ │ │ -
1024 { };
│ │ │ -
1025 /// @endcond
│ │ │ -
1026
│ │ │ -
1027 /// std::hash specialization for unique_ptr.
│ │ │ -
1028 template<typename _Tp, typename _Dp>
│ │ │ -
│ │ │ -
1029 struct hash<unique_ptr<_Tp, _Dp>>
│ │ │ -
1030 : public __hash_base<size_t, unique_ptr<_Tp, _Dp>>,
│ │ │ -
1031 public __uniq_ptr_hash<unique_ptr<_Tp, _Dp>>
│ │ │ -
1032 { };
│ │ │ -
│ │ │ +
1015 // Make sure that the internal buffer resyncs its idea of
│ │ │ +
1016 // the file position with the external file.
│ │ │ +
1017 int __ret = 0;
│ │ │ +
1018 if (this->pbase() < this->pptr())
│ │ │ +
1019 {
│ │ │ +
1020 const int_type __tmp = this->overflow();
│ │ │ +
1021 if (traits_type::eq_int_type(__tmp, traits_type::eof()))
│ │ │ +
1022 __ret = -1;
│ │ │ +
1023 }
│ │ │ +
1024 return __ret;
│ │ │ +
1025 }
│ │ │ +
│ │ │ +
1026
│ │ │ +
1027 template<typename _CharT, typename _Traits>
│ │ │ +
1028 void
│ │ │ +
│ │ │ + │ │ │ +
1030 imbue(const locale& __loc)
│ │ │ +
1031 {
│ │ │ +
1032 bool __testvalid = true;
│ │ │
1033
│ │ │ -
1034#if __cplusplus >= 201402L
│ │ │ -
1035#define __cpp_lib_make_unique 201304L
│ │ │ -
1036
│ │ │ -
1037 /// @cond undocumented
│ │ │ -
1038namespace __detail
│ │ │ -
1039{
│ │ │ -
1040 template<typename _Tp>
│ │ │ -
1041 struct _MakeUniq
│ │ │ -
1042 { typedef unique_ptr<_Tp> __single_object; };
│ │ │ -
1043
│ │ │ -
1044 template<typename _Tp>
│ │ │ -
1045 struct _MakeUniq<_Tp[]>
│ │ │ -
1046 { typedef unique_ptr<_Tp[]> __array; };
│ │ │ -
1047
│ │ │ -
1048 template<typename _Tp, size_t _Bound>
│ │ │ -
1049 struct _MakeUniq<_Tp[_Bound]>
│ │ │ -
1050 { struct __invalid_type { }; };
│ │ │ -
1051
│ │ │ -
1052 template<typename _Tp>
│ │ │ -
1053 using __unique_ptr_t = typename _MakeUniq<_Tp>::__single_object;
│ │ │ -
1054 template<typename _Tp>
│ │ │ -
1055 using __unique_ptr_array_t = typename _MakeUniq<_Tp>::__array;
│ │ │ -
1056 template<typename _Tp>
│ │ │ -
1057 using __invalid_make_unique_t = typename _MakeUniq<_Tp>::__invalid_type;
│ │ │ -
1058}
│ │ │ -
1059 /// @endcond
│ │ │ -
1060
│ │ │ -
1061 /** Create an object owned by a `unique_ptr`.
│ │ │ -
1062 * @tparam _Tp A non-array object type.
│ │ │ -
1063 * @param __args Constructor arguments for the new object.
│ │ │ -
1064 * @returns A `unique_ptr<_Tp>` that owns the new object.
│ │ │ -
1065 * @since C++14
│ │ │ -
1066 * @relates unique_ptr
│ │ │ -
1067 */
│ │ │ -
1068 template<typename _Tp, typename... _Args>
│ │ │ -
1069 _GLIBCXX23_CONSTEXPR
│ │ │ -
1070 inline __detail::__unique_ptr_t<_Tp>
│ │ │ -
│ │ │ - │ │ │ -
1072 { return unique_ptr<_Tp>(new _Tp(std::forward<_Args>(__args)...)); }
│ │ │ -
│ │ │ -
1073
│ │ │ -
1074 /** Create an array owned by a `unique_ptr`.
│ │ │ -
1075 * @tparam _Tp An array type of unknown bound, such as `U[]`.
│ │ │ -
1076 * @param __num The number of elements of type `U` in the new array.
│ │ │ -
1077 * @returns A `unique_ptr<U[]>` that owns the new array.
│ │ │ -
1078 * @since C++14
│ │ │ -
1079 * @relates unique_ptr
│ │ │ -
1080 *
│ │ │ -
1081 * The array elements are value-initialized.
│ │ │ -
1082 */
│ │ │ -
1083 template<typename _Tp>
│ │ │ - │ │ │ -
1085 inline __detail::__unique_ptr_array_t<_Tp>
│ │ │ -
│ │ │ - │ │ │ -
1087 { return unique_ptr<_Tp>(new remove_extent_t<_Tp>[__num]()); }
│ │ │ -
│ │ │ -
1088
│ │ │ -
1089 /** Disable std::make_unique for arrays of known bound.
│ │ │ -
1090 * @tparam _Tp An array type of known bound, such as `U[N]`.
│ │ │ -
1091 * @since C++14
│ │ │ -
1092 * @relates unique_ptr
│ │ │ -
1093 */
│ │ │ -
1094 template<typename _Tp, typename... _Args>
│ │ │ -
1095 __detail::__invalid_make_unique_t<_Tp>
│ │ │ -
1096 make_unique(_Args&&...) = delete;
│ │ │ -
1097
│ │ │ -
1098#if __cplusplus > 201703L
│ │ │ -
1099 /** Create a default-initialied object owned by a `unique_ptr`.
│ │ │ -
1100 * @tparam _Tp A non-array object type.
│ │ │ -
1101 * @returns A `unique_ptr<_Tp>` that owns the new object.
│ │ │ -
1102 * @since C++20
│ │ │ -
1103 * @relates unique_ptr
│ │ │ -
1104 */
│ │ │ -
1105 template<typename _Tp>
│ │ │ - │ │ │ -
1107 inline __detail::__unique_ptr_t<_Tp>
│ │ │ -
│ │ │ - │ │ │ -
1109 { return unique_ptr<_Tp>(new _Tp); }
│ │ │ -
│ │ │ -
1110
│ │ │ -
1111 /** Create a default-initialized array owned by a `unique_ptr`.
│ │ │ -
1112 * @tparam _Tp An array type of unknown bound, such as `U[]`.
│ │ │ -
1113 * @param __num The number of elements of type `U` in the new array.
│ │ │ -
1114 * @returns A `unique_ptr<U[]>` that owns the new array.
│ │ │ -
1115 * @since C++20
│ │ │ -
1116 * @relates unique_ptr
│ │ │ -
1117 */
│ │ │ -
1118 template<typename _Tp>
│ │ │ - │ │ │ -
1120 inline __detail::__unique_ptr_array_t<_Tp>
│ │ │ -
│ │ │ - │ │ │ - │ │ │ -
│ │ │ -
1123
│ │ │ -
1124 /** Disable std::make_unique_for_overwrite for arrays of known bound.
│ │ │ -
1125 * @tparam _Tp An array type of known bound, such as `U[N]`.
│ │ │ -
1126 * @since C++20
│ │ │ -
1127 * @relates unique_ptr
│ │ │ -
1128 */
│ │ │ -
1129 template<typename _Tp, typename... _Args>
│ │ │ -
1130 __detail::__invalid_make_unique_t<_Tp>
│ │ │ - │ │ │ -
1132#endif // C++20
│ │ │ -
1133
│ │ │ -
1134#endif // C++14
│ │ │ -
1135
│ │ │ -
1136#if __cplusplus > 201703L && __cpp_concepts
│ │ │ -
1137 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ -
1138 // 2948. unique_ptr does not define operator<< for stream output
│ │ │ -
1139 /// Stream output operator for unique_ptr
│ │ │ -
1140 /// @relates unique_ptr
│ │ │ -
1141 /// @since C++20
│ │ │ -
1142 template<typename _CharT, typename _Traits, typename _Tp, typename _Dp>
│ │ │ - │ │ │ - │ │ │ -
1145 const unique_ptr<_Tp, _Dp>& __p)
│ │ │ -
1146 requires requires { __os << __p.get(); }
│ │ │ -
1147 {
│ │ │ -
1148 __os << __p.get();
│ │ │ -
1149 return __os;
│ │ │ -
1150 }
│ │ │ -
1151#endif // C++20
│ │ │ -
1152
│ │ │ -
1153 /// @} group pointer_abstractions
│ │ │ -
1154
│ │ │ -
1155#if __cplusplus >= 201703L
│ │ │ -
1156 namespace __detail::__variant
│ │ │ -
1157 {
│ │ │ -
1158 template<typename> struct _Never_valueless_alt; // see <variant>
│ │ │ -
1159
│ │ │ -
1160 // Provide the strong exception-safety guarantee when emplacing a
│ │ │ -
1161 // unique_ptr into a variant.
│ │ │ -
1162 template<typename _Tp, typename _Del>
│ │ │ -
1163 struct _Never_valueless_alt<std::unique_ptr<_Tp, _Del>>
│ │ │ - │ │ │ -
1165 { };
│ │ │ -
1166 } // namespace __detail::__variant
│ │ │ -
1167#endif // C++17
│ │ │ -
1168
│ │ │ -
1169_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ -
1170} // namespace
│ │ │ -
1171
│ │ │ -
1172#endif /* _UNIQUE_PTR_H */
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
__detail::__invalid_make_unique_t< _Tp > make_unique_for_overwrite(_Args &&...)=delete
│ │ │ -
constexpr __detail::__unique_ptr_array_t< _Tp > make_unique_for_overwrite(size_t __num)
│ │ │ -
constexpr __detail::__unique_ptr_array_t< _Tp > make_unique(size_t __num)
│ │ │ -
constexpr enable_if< __is_swappable< _Dp >::value >::type swap(unique_ptr< _Tp, _Dp > &__x, unique_ptr< _Tp, _Dp > &__y) noexcept
Definition unique_ptr.h:815
│ │ │ -
__detail::__invalid_make_unique_t< _Tp > make_unique(_Args &&...)=delete
│ │ │ -
constexpr __detail::__unique_ptr_t< _Tp > make_unique_for_overwrite()
│ │ │ -
constexpr __detail::__unique_ptr_t< _Tp > make_unique(_Args &&... __args)
│ │ │ -
auto declval() noexcept -> decltype(__declval< _Tp >(0))
Definition type_traits:2387
│ │ │ -
constexpr std::remove_reference< _Tp >::type && move(_Tp &&__t) noexcept
Convert a value to an rvalue.
Definition move.h:104
│ │ │ +
1034 const __codecvt_type* _M_codecvt_tmp = 0;
│ │ │ + │ │ │ + │ │ │ +
1037
│ │ │ +
1038 if (this->is_open())
│ │ │ +
1039 {
│ │ │ +
1040 // encoding() == -1 is ok only at the beginning.
│ │ │ +
1041 if ((_M_reading || _M_writing)
│ │ │ +
1042 && __check_facet(_M_codecvt).encoding() == -1)
│ │ │ +
1043 __testvalid = false;
│ │ │ +
1044 else
│ │ │ +
1045 {
│ │ │ +
1046 if (_M_reading)
│ │ │ +
1047 {
│ │ │ +
1048 if (__check_facet(_M_codecvt).always_noconv())
│ │ │ +
1049 {
│ │ │ +
1050 if (_M_codecvt_tmp
│ │ │ +
1051 && !__check_facet(_M_codecvt_tmp).always_noconv())
│ │ │ +
1052 __testvalid = this->seekoff(0, ios_base::cur, _M_mode)
│ │ │ +
1053 != pos_type(off_type(-1));
│ │ │ +
1054 }
│ │ │ +
1055 else
│ │ │ +
1056 {
│ │ │ +
1057 // External position corresponding to gptr().
│ │ │ +
1058 _M_ext_next = _M_ext_buf
│ │ │ +
1059 + _M_codecvt->length(_M_state_last, _M_ext_buf,
│ │ │ +
1060 _M_ext_next,
│ │ │ +
1061 this->gptr() - this->eback());
│ │ │ +
1062 const streamsize __remainder = _M_ext_end - _M_ext_next;
│ │ │ +
1063 if (__remainder)
│ │ │ +
1064 __builtin_memmove(_M_ext_buf, _M_ext_next, __remainder);
│ │ │ +
1065
│ │ │ +
1066 _M_ext_next = _M_ext_buf;
│ │ │ +
1067 _M_ext_end = _M_ext_buf + __remainder;
│ │ │ +
1068 _M_set_buffer(-1);
│ │ │ +
1069 _M_state_last = _M_state_cur = _M_state_beg;
│ │ │ +
1070 }
│ │ │ +
1071 }
│ │ │ +
1072 else if (_M_writing && (__testvalid = _M_terminate_output()))
│ │ │ +
1073 _M_set_buffer(-1);
│ │ │ +
1074 }
│ │ │ +
1075 }
│ │ │ +
1076
│ │ │ +
1077 if (__testvalid)
│ │ │ +
1078 _M_codecvt = _M_codecvt_tmp;
│ │ │ +
1079 else
│ │ │ +
1080 _M_codecvt = 0;
│ │ │ +
1081 }
│ │ │ +
│ │ │ +
1082
│ │ │ +
1083 // Inhibit implicit instantiations for required instantiations,
│ │ │ +
1084 // which are defined via explicit instantiations elsewhere.
│ │ │ +
1085#if _GLIBCXX_EXTERN_TEMPLATE
│ │ │ +
1086 extern template class basic_filebuf<char>;
│ │ │ +
1087 extern template class basic_ifstream<char>;
│ │ │ +
1088 extern template class basic_ofstream<char>;
│ │ │ +
1089 extern template class basic_fstream<char>;
│ │ │ +
1090
│ │ │ +
1091#ifdef _GLIBCXX_USE_WCHAR_T
│ │ │ +
1092 extern template class basic_filebuf<wchar_t>;
│ │ │ +
1093 extern template class basic_ifstream<wchar_t>;
│ │ │ +
1094 extern template class basic_ofstream<wchar_t>;
│ │ │ +
1095 extern template class basic_fstream<wchar_t>;
│ │ │ +
1096#endif
│ │ │ +
1097#endif
│ │ │ +
1098
│ │ │ +
1099_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ +
1100} // namespace std
│ │ │ +
1101
│ │ │ +
1102#endif
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ +
constexpr std::remove_reference< _Tp >::type && move(_Tp &&__t) noexcept
Convert a value to an rvalue.
Definition move.h:104
│ │ │
void swap(any &__x, any &__y) noexcept
Exchange the states of two any objects.
Definition any:429
│ │ │ -
constexpr _Tp && forward(typename std::remove_reference< _Tp >::type &__t) noexcept
Forward an lvalue.
Definition move.h:77
│ │ │ +
constexpr const _Tp & min(const _Tp &, const _Tp &)
This does what you think it does.
│ │ │
ISO C++ entities toplevel namespace is std.
│ │ │ -
std::basic_ostream< _CharT, _Traits > & operator<<(std::basic_ostream< _CharT, _Traits > &__os, const bitset< _Nb > &__x)
Global I/O operators for bitsets.
Definition bitset:1543
│ │ │ -
Primary class template hash.
│ │ │ -
integral_constant
Definition type_traits:63
│ │ │ -
is_void
Definition type_traits:287
│ │ │ -
is_lvalue_reference
Definition type_traits:477
│ │ │ -
is_convertible
Definition type_traits:1484
│ │ │ -
Define a member typedef type only if a boolean constant is true.
Definition type_traits:2223
│ │ │ - │ │ │ -
constexpr void operator()(_Tp *__ptr) const
Calls delete __ptr
Definition unique_ptr.h:92
│ │ │ -
constexpr default_delete() noexcept=default
Default constructor.
│ │ │ -
constexpr enable_if< is_convertible< _Up(*)[], _Tp(*)[]>::value >::type operator()(_Up *__ptr) const
Calls delete[] __ptr
Definition unique_ptr.h:135
│ │ │ -
constexpr default_delete() noexcept=default
Default constructor.
│ │ │ -
A move-only smart pointer that manages unique ownership of a resource.
Definition unique_ptr.h:277
│ │ │ -
constexpr pointer operator->() const noexcept
Return the stored pointer.
Definition unique_ptr.h:459
│ │ │ -
constexpr unique_ptr & operator=(nullptr_t) noexcept
Reset the unique_ptr to empty, invoking the deleter if necessary.
Definition unique_ptr.h:439
│ │ │ -
constexpr unique_ptr(pointer __p) noexcept
Definition unique_ptr.h:316
│ │ │ -
constexpr unique_ptr() noexcept
Default constructor, creates a unique_ptr that owns nothing.
Definition unique_ptr.h:303
│ │ │ -
constexpr unique_ptr(pointer __p, const deleter_type &__d) noexcept
Definition unique_ptr.h:330
│ │ │ -
unique_ptr(unique_ptr &&)=default
Move constructor.
│ │ │ -
unique_ptr & operator=(unique_ptr &&)=default
Move assignment operator.
│ │ │ -
constexpr void reset(pointer __p=pointer()) noexcept
Replace the stored pointer.
Definition unique_ptr.h:504
│ │ │ -
constexpr enable_if< __and_< __safe_conversion_up< _Up, _Ep >, is_assignable< deleter_type &, _Ep && > >::value, unique_ptr & >::type operator=(unique_ptr< _Up, _Ep > &&__u) noexcept
Assignment from another type.
Definition unique_ptr.h:429
│ │ │ -
~unique_ptr() noexcept
Destructor, invokes the deleter if the stored pointer is not null.
Definition unique_ptr.h:397
│ │ │ -
constexpr unique_ptr(unique_ptr< _Up, _Ep > &&__u) noexcept
Converting constructor from another type.
Definition unique_ptr.h:379
│ │ │ -
constexpr deleter_type & get_deleter() noexcept
Return a reference to the stored deleter.
Definition unique_ptr.h:474
│ │ │ -
constexpr add_lvalue_reference< element_type >::type operator*() const noexcept(noexcept(*std::declval< pointer >()))
Dereference the stored pointer.
Definition unique_ptr.h:450
│ │ │ -
constexpr void swap(unique_ptr &__u) noexcept
Exchange the pointer and deleter with another object.
Definition unique_ptr.h:514
│ │ │ -
constexpr pointer get() const noexcept
Return the stored pointer.
Definition unique_ptr.h:468
│ │ │ -
constexpr unique_ptr(pointer __p, __enable_if_t<!is_lvalue_reference< _Del >::value, _Del && > __d) noexcept
Definition unique_ptr.h:343
│ │ │ -
constexpr pointer release() noexcept
Release ownership of any stored pointer.
Definition unique_ptr.h:493
│ │ │ -
constexpr unique_ptr(nullptr_t) noexcept
Creates a unique_ptr that owns nothing.
Definition unique_ptr.h:358
│ │ │ -
constexpr const deleter_type & get_deleter() const noexcept
Return a reference to the stored deleter.
Definition unique_ptr.h:480
│ │ │ -
constexpr deleter_type & get_deleter() noexcept
Return a reference to the stored deleter.
Definition unique_ptr.h:739
│ │ │ -
constexpr pointer release() noexcept
Release ownership of any stored pointer.
Definition unique_ptr.h:758
│ │ │ -
constexpr unique_ptr(nullptr_t) noexcept
Creates a unique_ptr that owns nothing.
Definition unique_ptr.h:654
│ │ │ -
constexpr void swap(unique_ptr &__u) noexcept
Exchange the pointer and deleter with another object.
Definition unique_ptr.h:791
│ │ │ -
constexpr const deleter_type & get_deleter() const noexcept
Return a reference to the stored deleter.
Definition unique_ptr.h:745
│ │ │ -
constexpr unique_ptr & operator=(nullptr_t) noexcept
Reset the unique_ptr to empty, invoking the deleter if necessary.
Definition unique_ptr.h:713
│ │ │ -
constexpr unique_ptr() noexcept
Default constructor, creates a unique_ptr that owns nothing.
Definition unique_ptr.h:587
│ │ │ -
constexpr void reset(_Up __p) noexcept
Replace the stored pointer.
Definition unique_ptr.h:781
│ │ │ -
constexpr pointer get() const noexcept
Return the stored pointer.
Definition unique_ptr.h:733
│ │ │ -
constexpr unique_ptr(_Up __p, __enable_if_t<!is_lvalue_reference< _Del >::value, _Del && > __d) noexcept
Definition unique_ptr.h:636
│ │ │ -
constexpr enable_if< __and_< __safe_conversion_up< _Up, _Ep >, is_assignable< deleter_type &, _Ep && > >::value, unique_ptr & >::type operator=(unique_ptr< _Up, _Ep > &&__u) noexcept
Assignment from another type.
Definition unique_ptr.h:703
│ │ │ -
constexpr unique_ptr(_Up __p) noexcept
Definition unique_ptr.h:605
│ │ │ -
unique_ptr & operator=(unique_ptr &&)=default
Move assignment operator.
│ │ │ -
unique_ptr(unique_ptr &&)=default
Move constructor.
│ │ │ -
constexpr unique_ptr(_Up __p, const deleter_type &__d) noexcept
Definition unique_ptr.h:621
│ │ │ -
~unique_ptr()
Destructor, invokes the deleter if the stored pointer is not null.
Definition unique_ptr.h:672
│ │ │ -
constexpr std::add_lvalue_reference< element_type >::type operator[](size_t __i) const
Access an element of owned array.
Definition unique_ptr.h:724
│ │ │ - │ │ │ +
ptrdiff_t streamsize
Integral type for I/O operation counts and buffer sizes.
Definition postypes.h:68
│ │ │ +
The actual work of input and output (for files).
Definition fstream:86
│ │ │ +
virtual pos_type seekoff(off_type __off, ios_base::seekdir __way, ios_base::openmode __mode=ios_base::in|ios_base::out)
Alters the stream positions.
Definition fstream.tcc:833
│ │ │ +
virtual int_type underflow()
Fetches more data from the controlled sequence.
Definition fstream.tcc:324
│ │ │ +
virtual streamsize showmanyc()
Investigating the data available.
Definition fstream.tcc:298
│ │ │ +
virtual void imbue(const locale &__loc)
Changes translations.
Definition fstream.tcc:1030
│ │ │ +
virtual streamsize xsgetn(char_type *__s, streamsize __n)
Multiple character extraction.
Definition fstream.tcc:670
│ │ │ +
__filebuf_type * close()
Closes the currently associated file.
Definition fstream.tcc:250
│ │ │ +
virtual pos_type seekpos(pos_type __pos, ios_base::openmode __mode=ios_base::in|ios_base::out)
Alters the stream positions.
Definition fstream.tcc:893
│ │ │ +
virtual int_type pbackfail(int_type __c=_Traits::eof())
Tries to back up the input sequence.
Definition fstream.tcc:483
│ │ │ +
virtual streamsize xsputn(const char_type *__s, streamsize __n)
Multiple character insertion.
Definition fstream.tcc:756
│ │ │ +
virtual int_type overflow(int_type __c=_Traits::eof())
Consumes data from the buffer; writes to the controlled sequence.
Definition fstream.tcc:542
│ │ │ +
__filebuf_type * open(const char *__s, ios_base::openmode __mode)
Opens an external file.
Definition fstream.tcc:180
│ │ │ +
basic_filebuf()
Does not open any files.
Definition fstream.tcc:81
│ │ │ +
virtual int sync()
Synchronizes the buffer arrays with the controlled sequences.
Definition fstream.tcc:1013
│ │ │ +
virtual __streambuf_type * setbuf(char_type *__s, streamsize __n)
Manipulates the buffer.
Definition fstream.tcc:804
│ │ │ + │ │ │ +
locale _M_buf_locale
Current locale setting.
Definition streambuf:197
│ │ │ +
The base of the I/O class hierarchy.
Definition ios_base.h:234
│ │ │ +
static const seekdir cur
Request a seek relative to the current position within the sequence.
Definition ios_base.h:498
│ │ │ +
static const seekdir beg
Request a seek relative to the beginning of the stream.
Definition ios_base.h:495
│ │ │ +
static const seekdir end
Request a seek relative to the current end of the sequence.
Definition ios_base.h:501
│ │ │ +
static const openmode in
Open for input. Default for ifstream and fstream.
Definition ios_base.h:466
│ │ │ +
static const openmode out
Open for output. Default for ofstream and fstream.
Definition ios_base.h:469
│ │ │ +
static const openmode binary
Perform input and output in binary mode (as opposed to text mode). This is probably not what you thin...
Definition ios_base.h:463
│ │ │ +
_Ios_Openmode openmode
This is a bitmask type.
Definition ios_base.h:452
│ │ │ +
static const openmode app
Seek to end before each write.
Definition ios_base.h:455
│ │ │ +
static const openmode ate
Open and seek to end immediately after opening.
Definition ios_base.h:458
│ │ │ +
Container class for localization functionality.
│ │ │ + │ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,13 +1,13 @@ │ │ │ │ libstdc++ │ │ │ │ -unique_ptr.h │ │ │ │ +fstream.tcc │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -1// unique_ptr implementation -*- C++ -*- │ │ │ │ +1// File based streams -*- C++ -*- │ │ │ │ 2 │ │ │ │ -3// Copyright (C) 2008-2022 Free Software Foundation, Inc. │ │ │ │ +3// Copyright (C) 1997-2022 Free Software Foundation, Inc. │ │ │ │ 4// │ │ │ │ 5// This file is part of the GNU ISO C++ Library. This library is free │ │ │ │ 6// software; you can redistribute it and/or modify it under the │ │ │ │ 7// terms of the GNU General Public License as published by the │ │ │ │ 8// Free Software Foundation; either version 3, or (at your option) │ │ │ │ 9// any later version. │ │ │ │ 10 │ │ │ │ @@ -21,1396 +21,1220 @@ │ │ │ │ 18// 3.1, as published by the Free Software Foundation. │ │ │ │ 19 │ │ │ │ 20// You should have received a copy of the GNU General Public License and │ │ │ │ 21// a copy of the GCC Runtime Library Exception along with this program; │ │ │ │ 22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see │ │ │ │ 23// . │ │ │ │ 24 │ │ │ │ -25/** @file bits/unique_ptr.h │ │ │ │ +25/** @file bits/fstream.tcc │ │ │ │ 26 * This is an internal header file, included by other library headers. │ │ │ │ -27 * Do not attempt to use it directly. @headername{memory} │ │ │ │ +27 * Do not attempt to use it directly. @headername{fstream} │ │ │ │ 28 */ │ │ │ │ 29 │ │ │ │ -30#ifndef _UNIQUE_PTR_H │ │ │ │ -31#define _UNIQUE_PTR_H 1 │ │ │ │ -32 │ │ │ │ -33#include <_b_i_t_s_/_c_+_+_c_o_n_f_i_g_._h> │ │ │ │ -34#include <_d_e_b_u_g_/_a_s_s_e_r_t_i_o_n_s_._h> │ │ │ │ -35#include <_t_y_p_e___t_r_a_i_t_s> │ │ │ │ -36#include <_t_u_p_l_e> │ │ │ │ -37#include <_b_i_t_s_/_s_t_l___f_u_n_c_t_i_o_n_._h> │ │ │ │ -38#include <_b_i_t_s_/_f_u_n_c_t_i_o_n_a_l___h_a_s_h_._h> │ │ │ │ -39#if __cplusplus > 201703L │ │ │ │ -40# include <_c_o_m_p_a_r_e> │ │ │ │ -41# include <_o_s_t_r_e_a_m> │ │ │ │ -42#endif │ │ │ │ -43 │ │ │ │ -44#if __cplusplus > 202002L && __cpp_constexpr_dynamic_alloc │ │ │ │ -45# if __cpp_lib_constexpr_memory < 202202L │ │ │ │ -46// Defined with older value in bits/ptr_traits.h for C++20 │ │ │ │ -47# undef __cpp_lib_constexpr_memory │ │ │ │ -48# define __cpp_lib_constexpr_memory 202202L │ │ │ │ -49# endif │ │ │ │ -50#endif │ │ │ │ -51 │ │ │ │ -52namespace _s_t_d _GLIBCXX_VISIBILITY(default) │ │ │ │ -53{ │ │ │ │ -54_GLIBCXX_BEGIN_NAMESPACE_VERSION │ │ │ │ -55 │ │ │ │ -56 /** │ │ │ │ -57 * @addtogroup pointer_abstractions │ │ │ │ -58 * @{ │ │ │ │ -59 */ │ │ │ │ +30// │ │ │ │ +31// ISO C++ 14882: 27.8 File-based streams │ │ │ │ +32// │ │ │ │ +33 │ │ │ │ +34#ifndef _FSTREAM_TCC │ │ │ │ +35#define _FSTREAM_TCC 1 │ │ │ │ +36 │ │ │ │ +37#pragma GCC system_header │ │ │ │ +38 │ │ │ │ +39#include <_b_i_t_s_/_c_x_x_a_b_i___f_o_r_c_e_d_._h> │ │ │ │ +40#include <_b_i_t_s_/_m_o_v_e_._h> // for swap │ │ │ │ +41#include <_c_e_r_r_n_o> │ │ │ │ +42 │ │ │ │ +43namespace _s_t_d _GLIBCXX_VISIBILITY(default) │ │ │ │ +44{ │ │ │ │ +45_GLIBCXX_BEGIN_NAMESPACE_VERSION │ │ │ │ +46 │ │ │ │ +47 template │ │ │ │ +48 void │ │ │ │ +49 basic_filebuf<_CharT, _Traits>:: │ │ │ │ +50 _M_allocate_internal_buffer() │ │ │ │ +51 { │ │ │ │ +52 // Allocate internal buffer only if one doesn't already exist │ │ │ │ +53 // (either allocated or provided by the user via setbuf). │ │ │ │ +54 if (!_M_buf_allocated && !_M_buf) │ │ │ │ +55 { │ │ │ │ +56 _M_buf = new char_type[_M_buf_size]; │ │ │ │ +57 _M_buf_allocated = true; │ │ │ │ +58 } │ │ │ │ +59 } │ │ │ │ 60 │ │ │ │ -61#if _GLIBCXX_USE_DEPRECATED │ │ │ │ -62#pragma GCC diagnostic push │ │ │ │ -63#pragma GCC diagnostic ignored "-Wdeprecated-declarations" │ │ │ │ -64 template class auto_ptr; │ │ │ │ -65#pragma GCC diagnostic pop │ │ │ │ -66#endif │ │ │ │ -67 │ │ │ │ -68 /** Primary template of default_delete, used by unique_ptr for single │ │ │ │ -objects │ │ │ │ -69 * │ │ │ │ -70 * @headerfile memory │ │ │ │ -71 * @since C++11 │ │ │ │ -72 */ │ │ │ │ -73 template │ │ │ │ -_7_4 struct _d_e_f_a_u_l_t___d_e_l_e_t_e │ │ │ │ -75 { │ │ │ │ -76 /// Default constructor │ │ │ │ -_7_7 constexpr _d_e_f_a_u_l_t___d_e_l_e_t_e() noexcept = _d_e_f_a_u_l_t; │ │ │ │ +61 template │ │ │ │ +62 void │ │ │ │ +63 basic_filebuf<_CharT, _Traits>:: │ │ │ │ +64 _M_destroy_internal_buffer() throw() │ │ │ │ +65 { │ │ │ │ +66 if (_M_buf_allocated) │ │ │ │ +67 { │ │ │ │ +68 delete [] _M_buf; │ │ │ │ +69 _M_buf = 0; │ │ │ │ +70 _M_buf_allocated = false; │ │ │ │ +71 } │ │ │ │ +72 delete [] _M_ext_buf; │ │ │ │ +73 _M_ext_buf = 0; │ │ │ │ +74 _M_ext_buf_size = 0; │ │ │ │ +75 _M_ext_next = 0; │ │ │ │ +76 _M_ext_end = 0; │ │ │ │ +77 } │ │ │ │ 78 │ │ │ │ -79 /** @brief Converting constructor. │ │ │ │ -80 * │ │ │ │ -81 * Allows conversion from a deleter for objects of another type, `_Up`, │ │ │ │ -82 * only if `_Up*` is convertible to `_Tp*`. │ │ │ │ -83 */ │ │ │ │ -84 _t_e_m_p_l_a_t_e<_t_y_p_e_n_a_m_e _Up, │ │ │ │ -85 _t_y_p_e_n_a_m_e = ___R_e_q_u_i_r_e<_i_s___c_o_n_v_e_r_t_i_b_l_e<_Up*, _Tp*>>> │ │ │ │ -86 ___G_L_I_B_C_X_X_2_3___C_O_N_S_T_E_X_P_R │ │ │ │ -_8_7 _d_e_f_a_u_l_t___d_e_l_e_t_e(const _d_e_f_a_u_l_t___d_e_l_e_t_e<_Up>&) noexcept { } │ │ │ │ -88 │ │ │ │ -89 /// Calls `delete __ptr` │ │ │ │ -90 ___G_L_I_B_C_X_X_2_3___C_O_N_S_T_E_X_P_R │ │ │ │ -91 void │ │ │ │ -_9_2 _o_p_e_r_a_t_o_r_(_)(_Tp* _____p_t_r) const │ │ │ │ -93 { │ │ │ │ -94 static_assert(!_i_s___v_o_i_d_<___T_p_>_:_:_v_a_l_u_e, │ │ │ │ -95 "can't delete pointer to incomplete type"); │ │ │ │ -96 static_assert(sizeof(_Tp)>0, │ │ │ │ -97 "can't delete pointer to incomplete type"); │ │ │ │ -98 delete _____p_t_r; │ │ │ │ -99 } │ │ │ │ -100 }; │ │ │ │ -101 │ │ │ │ -102 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ -103 // DR 740 - omit specialization for array objects with a compile time │ │ │ │ -length │ │ │ │ -104 │ │ │ │ -105 /** Specialization of default_delete for arrays, used by `unique_ptr` │ │ │ │ -106 * │ │ │ │ -107 * @headerfile memory │ │ │ │ -108 * @since C++11 │ │ │ │ -109 */ │ │ │ │ -110 template │ │ │ │ -_1_1_1 struct _d_e_f_a_u_l_t___d_e_l_e_t_e<_Tp[]> │ │ │ │ -112 { │ │ │ │ -113 public: │ │ │ │ -114 /// Default constructor │ │ │ │ -_1_1_5 constexpr _d_e_f_a_u_l_t___d_e_l_e_t_e() noexcept = _d_e_f_a_u_l_t; │ │ │ │ -116 │ │ │ │ -117 /** @brief Converting constructor. │ │ │ │ -118 * │ │ │ │ -119 * Allows conversion from a deleter for arrays of another type, such as │ │ │ │ -120 * a const-qualified version of `_Tp`. │ │ │ │ -121 * │ │ │ │ -122 * Conversions from types derived from `_Tp` are not allowed because │ │ │ │ -123 * it is undefined to `delete[]` an array of derived types through a │ │ │ │ -124 * pointer to the base type. │ │ │ │ -125 */ │ │ │ │ -126 _t_e_m_p_l_a_t_e<_t_y_p_e_n_a_m_e _Up, │ │ │ │ -127 _t_y_p_e_n_a_m_e = ___R_e_q_u_i_r_e<_i_s___c_o_n_v_e_r_t_i_b_l_e<_Up(*)[], _Tp(*)[]>>> │ │ │ │ -128 ___G_L_I_B_C_X_X_2_3___C_O_N_S_T_E_X_P_R │ │ │ │ -_1_2_9 _d_e_f_a_u_l_t___d_e_l_e_t_e(const _d_e_f_a_u_l_t___d_e_l_e_t_e<_Up[]>&) noexcept { } │ │ │ │ -130 │ │ │ │ -131 /// Calls `delete[] __ptr` │ │ │ │ -132 template │ │ │ │ -133 ___G_L_I_B_C_X_X_2_3___C_O_N_S_T_E_X_P_R │ │ │ │ -134 typename _e_n_a_b_l_e___i_f<_i_s___c_o_n_v_e_r_t_i_b_l_e<_Up(*)[], _Tp(*)[]>::value>::type │ │ │ │ -_1_3_5 _o_p_e_r_a_t_o_r_(_)(_Up* _____p_t_r) const │ │ │ │ -136 { │ │ │ │ -137 static_assert(sizeof(_Tp)>0, │ │ │ │ -138 "can't delete pointer to incomplete type"); │ │ │ │ -139 delete [] _____p_t_r; │ │ │ │ -140 } │ │ │ │ -141 }; │ │ │ │ -142 │ │ │ │ -143 /// @cond undocumented │ │ │ │ -144 │ │ │ │ -145 // Manages the pointer and deleter of a unique_ptr │ │ │ │ -146 template │ │ │ │ -147 class __uniq_ptr_impl │ │ │ │ -148 { │ │ │ │ -149 template │ │ │ │ -150 struct _Ptr │ │ │ │ -151 { │ │ │ │ -152 using type = _Up*; │ │ │ │ -153 }; │ │ │ │ -154 │ │ │ │ -155 template │ │ │ │ -156 struct │ │ │ │ -157 _Ptr<_Up, _Ep, __void_t::type::pointer>> │ │ │ │ -158 { │ │ │ │ -159 using type = typename remove_reference<_Ep>::type::pointer; │ │ │ │ -160 }; │ │ │ │ -161 │ │ │ │ -162 public: │ │ │ │ -163 using _DeleterConstraint = enable_if< │ │ │ │ -164 __and_<__not_>, │ │ │ │ -165 is_default_constructible<_Dp>>::value>; │ │ │ │ -166 │ │ │ │ -167 using pointer = typename _Ptr<_Tp, _Dp>::type; │ │ │ │ -168 │ │ │ │ -169 static_assert( !is_rvalue_reference<_Dp>::value, │ │ │ │ -170 "unique_ptr's deleter type must be a function object type" │ │ │ │ -171 " or an lvalue reference type" ); │ │ │ │ -172 │ │ │ │ -173 __uniq_ptr_impl() = default; │ │ │ │ -174 _GLIBCXX23_CONSTEXPR │ │ │ │ -175 __uniq_ptr_impl(pointer __p) : _M_t() { _M_ptr() = __p; } │ │ │ │ +79 template │ │ │ │ +_8_0 _b_a_s_i_c___f_i_l_e_b_u_f_<___C_h_a_r_T_,_ ___T_r_a_i_t_s_>_:_: │ │ │ │ +81_ _b_a_s_i_c___f_i_l_e_b_u_f() : _____s_t_r_e_a_m_b_u_f___t_y_p_e(), _M_lock(), _M_file(&_M_lock), │ │ │ │ +82 _M_mode(_i_o_s___b_a_s_e::openmode(0)), _M_state_beg(), _M_state_cur(), │ │ │ │ +83 _M_state_last(), _M_buf(0), _M_buf_size(_GLIBCXX_BUFSIZ), │ │ │ │ +84 _M_buf_allocated(_f_a_l_s_e), _M_reading(_f_a_l_s_e), _M_writing(_f_a_l_s_e), _M_pback(), │ │ │ │ +85 _M_pback_cur_save(0), _M_pback_end_save(0), _M_pback_init(_f_a_l_s_e), │ │ │ │ +86 _M_codecvt(0), _M_ext_buf(0), _M_ext_buf_size(0), _M_ext_next(0), │ │ │ │ +87 _M_ext_end(0) │ │ │ │ +88 { │ │ │ │ +89 if (_h_a_s___f_a_c_e_t_<_____c_o_d_e_c_v_t___t_y_p_e_>(this->___M___b_u_f___l_o_c_a_l_e)) │ │ │ │ +90 _M_codecvt = &_u_s_e___f_a_c_e_t_<_____c_o_d_e_c_v_t___t_y_p_e_>(this->___M___b_u_f___l_o_c_a_l_e); │ │ │ │ +91 } │ │ │ │ +92 │ │ │ │ +93#if __cplusplus >= 201103L │ │ │ │ +94 template │ │ │ │ +95 _b_a_s_i_c___f_i_l_e_b_u_f_<___C_h_a_r_T_,_ ___T_r_a_i_t_s_>_:_: │ │ │ │ +96_ _b_a_s_i_c___f_i_l_e_b_u_f(_b_a_s_i_c___f_i_l_e_b_u_f&& _____r_h_s) │ │ │ │ +97 : __streambuf_type(_____r_h_s), │ │ │ │ +98 _M_lock(), _M_file(_s_t_d::_m_o_v_e(_____r_h_s._M_file), &_M_lock), │ │ │ │ +99 _M_mode(_s_t_d::__exchange(_____r_h_s._M_mode, _i_o_s___b_a_s_e::openmode(0))), │ │ │ │ +100 _M_state_beg(_s_t_d::_m_o_v_e(_____r_h_s._M_state_beg)), │ │ │ │ +101 _M_state_cur(_s_t_d::_m_o_v_e(_____r_h_s._M_state_cur)), │ │ │ │ +102 _M_state_last(_s_t_d::_m_o_v_e(_____r_h_s._M_state_last)), │ │ │ │ +103 _M_buf(_s_t_d::__exchange(_____r_h_s._M_buf, _n_u_l_l_p_t_r)), │ │ │ │ +104 _M_buf_size(_s_t_d::__exchange(_____r_h_s._M_buf_size, 1)), │ │ │ │ +105 _M_buf_allocated(_s_t_d::__exchange(_____r_h_s._M_buf_allocated, _f_a_l_s_e)), │ │ │ │ +106 _M_reading(_s_t_d::__exchange(_____r_h_s._M_reading, _f_a_l_s_e)), │ │ │ │ +107 _M_writing(_s_t_d::__exchange(_____r_h_s._M_writing, _f_a_l_s_e)), │ │ │ │ +108 _M_pback(_____r_h_s._M_pback), │ │ │ │ +109 _M_pback_cur_save(_s_t_d::__exchange(_____r_h_s._M_pback_cur_save, _n_u_l_l_p_t_r)), │ │ │ │ +110 _M_pback_end_save(_s_t_d::__exchange(_____r_h_s._M_pback_end_save, _n_u_l_l_p_t_r)), │ │ │ │ +111 _M_pback_init(_s_t_d::__exchange(_____r_h_s._M_pback_init, _f_a_l_s_e)), │ │ │ │ +112 _M_codecvt(_____r_h_s._M_codecvt), │ │ │ │ +113 _M_ext_buf(_s_t_d::__exchange(_____r_h_s._M_ext_buf, _n_u_l_l_p_t_r)), │ │ │ │ +114 _M_ext_buf_size(_s_t_d::__exchange(_____r_h_s._M_ext_buf_size, 0)), │ │ │ │ +115 _M_ext_next(_s_t_d::__exchange(_____r_h_s._M_ext_next, _n_u_l_l_p_t_r)), │ │ │ │ +116 _M_ext_end(_s_t_d::__exchange(_____r_h_s._M_ext_end, _n_u_l_l_p_t_r)) │ │ │ │ +117 { │ │ │ │ +118 _____r_h_s._M_set_buffer(-1); │ │ │ │ +119 _____r_h_s._M_state_last = _____r_h_s._M_state_cur = _____r_h_s._M_state_beg; │ │ │ │ +120 } │ │ │ │ +121 │ │ │ │ +122 template │ │ │ │ +123 basic_filebuf<_CharT, _Traits>& │ │ │ │ +124 basic_filebuf<_CharT, _Traits>:: │ │ │ │ +125 operator=(basic_filebuf&& __rhs) │ │ │ │ +126 { │ │ │ │ +127 this->close(); │ │ │ │ +128 __streambuf_type::operator=(__rhs); │ │ │ │ +129 _M_file.swap(__rhs._M_file); │ │ │ │ +130 _M_mode = std::__exchange(__rhs._M_mode, _i_o_s___b_a_s_e_:_:_o_p_e_n_m_o_d_e(0)); │ │ │ │ +131 _M_state_beg = _s_t_d_:_:_m_o_v_e(__rhs._M_state_beg); │ │ │ │ +132 _M_state_cur = _s_t_d_:_:_m_o_v_e(__rhs._M_state_cur); │ │ │ │ +133 _M_state_last = _s_t_d_:_:_m_o_v_e(__rhs._M_state_last); │ │ │ │ +134 _M_buf = std::__exchange(__rhs._M_buf, nullptr); │ │ │ │ +135 _M_buf_size = std::__exchange(__rhs._M_buf_size, 1); │ │ │ │ +136 _M_buf_allocated = std::__exchange(__rhs._M_buf_allocated, false); │ │ │ │ +137 _M_ext_buf = std::__exchange(__rhs._M_ext_buf, nullptr); │ │ │ │ +138 _M_ext_buf_size = std::__exchange(__rhs._M_ext_buf_size, 0); │ │ │ │ +139 _M_ext_next = std::__exchange(__rhs._M_ext_next, nullptr); │ │ │ │ +140 _M_ext_end = std::__exchange(__rhs._M_ext_end, nullptr); │ │ │ │ +141 _M_reading = std::__exchange(__rhs._M_reading, false); │ │ │ │ +142 _M_writing = std::__exchange(__rhs._M_writing, false); │ │ │ │ +143 _M_pback_cur_save = std::__exchange(__rhs._M_pback_cur_save, nullptr); │ │ │ │ +144 _M_pback_end_save = std::__exchange(__rhs._M_pback_end_save, nullptr); │ │ │ │ +145 _M_pback_init = std::__exchange(__rhs._M_pback_init, false); │ │ │ │ +146 __rhs._M_set_buffer(-1); │ │ │ │ +147 __rhs._M_state_last = __rhs._M_state_cur = __rhs._M_state_beg; │ │ │ │ +148 return *this; │ │ │ │ +149 } │ │ │ │ +150 │ │ │ │ +151 template │ │ │ │ +152 void │ │ │ │ +153 basic_filebuf<_CharT, _Traits>:: │ │ │ │ +154 swap(basic_filebuf& __rhs) │ │ │ │ +155 { │ │ │ │ +156 __streambuf_type::swap(__rhs); │ │ │ │ +157 _M_file.swap(__rhs._M_file); │ │ │ │ +158 _s_t_d_:_:_s_w_a_p(_M_mode, __rhs._M_mode); │ │ │ │ +159 _s_t_d_:_:_s_w_a_p(_M_state_beg, __rhs._M_state_beg); │ │ │ │ +160 _s_t_d_:_:_s_w_a_p(_M_state_cur, __rhs._M_state_cur); │ │ │ │ +161 _s_t_d_:_:_s_w_a_p(_M_state_last, __rhs._M_state_last); │ │ │ │ +162 _s_t_d_:_:_s_w_a_p(_M_buf, __rhs._M_buf); │ │ │ │ +163 _s_t_d_:_:_s_w_a_p(_M_buf_size, __rhs._M_buf_size); │ │ │ │ +164 _s_t_d_:_:_s_w_a_p(_M_buf_allocated, __rhs._M_buf_allocated); │ │ │ │ +165 _s_t_d_:_:_s_w_a_p(_M_ext_buf, __rhs._M_ext_buf); │ │ │ │ +166 _s_t_d_:_:_s_w_a_p(_M_ext_buf_size, __rhs._M_ext_buf_size); │ │ │ │ +167 _s_t_d_:_:_s_w_a_p(_M_ext_next, __rhs._M_ext_next); │ │ │ │ +168 _s_t_d_:_:_s_w_a_p(_M_ext_end, __rhs._M_ext_end); │ │ │ │ +169 _s_t_d_:_:_s_w_a_p(_M_reading, __rhs._M_reading); │ │ │ │ +170 _s_t_d_:_:_s_w_a_p(_M_writing, __rhs._M_writing); │ │ │ │ +171 _s_t_d_:_:_s_w_a_p(_M_pback_cur_save, __rhs._M_pback_cur_save); │ │ │ │ +172 _s_t_d_:_:_s_w_a_p(_M_pback_end_save, __rhs._M_pback_end_save); │ │ │ │ +173 _s_t_d_:_:_s_w_a_p(_M_pback_init, __rhs._M_pback_init); │ │ │ │ +174 } │ │ │ │ +175#endif │ │ │ │ 176 │ │ │ │ -177 template │ │ │ │ -178 _GLIBCXX23_CONSTEXPR │ │ │ │ -179 __uniq_ptr_impl(pointer __p, _Del&& __d) │ │ │ │ -180 : _M_t(__p, _s_t_d::_f_o_r_w_a_r_d<_Del>(__d)) { } │ │ │ │ -181 │ │ │ │ -182 _GLIBCXX23_CONSTEXPR │ │ │ │ -183 __uniq_ptr_impl(__uniq_ptr_impl&& __u) noexcept │ │ │ │ -184 : _M_t(_s_t_d_:_:_m_o_v_e(__u._M_t)) │ │ │ │ -185 { __u._M_ptr() = nullptr; } │ │ │ │ -186 │ │ │ │ -187 _GLIBCXX23_CONSTEXPR │ │ │ │ -188 __uniq_ptr_impl& operator=(__uniq_ptr_impl&& __u) noexcept │ │ │ │ -189 { │ │ │ │ -190 reset(__u.release()); │ │ │ │ -191 _M_deleter() = _s_t_d_:_:_f_o_r_w_a_r_d_<___D_p_>(__u._M_deleter()); │ │ │ │ -192 return *this; │ │ │ │ -193 } │ │ │ │ -194 │ │ │ │ -195 _GLIBCXX23_CONSTEXPR │ │ │ │ -196 pointer& _M_ptr() noexcept { return _s_t_d_:_:_g_e_t_<_0_>(_M_t); } │ │ │ │ -197 _GLIBCXX23_CONSTEXPR │ │ │ │ -198 pointer _M_ptr() const noexcept { return _s_t_d_:_:_g_e_t_<_0_>(_M_t); } │ │ │ │ -199 _GLIBCXX23_CONSTEXPR │ │ │ │ -200 _Dp& _M_deleter() noexcept { return _s_t_d_:_:_g_e_t_<_1_>(_M_t); } │ │ │ │ -201 _GLIBCXX23_CONSTEXPR │ │ │ │ -202 const _Dp& _M_deleter() const noexcept { return _s_t_d_:_:_g_e_t_<_1_>(_M_t); } │ │ │ │ -203 │ │ │ │ -204 _GLIBCXX23_CONSTEXPR │ │ │ │ -205 void reset(pointer __p) noexcept │ │ │ │ -206 { │ │ │ │ -207 const pointer __old_p = _M_ptr(); │ │ │ │ -208 _M_ptr() = __p; │ │ │ │ -209 if (__old_p) │ │ │ │ -210 _M_deleter()(__old_p); │ │ │ │ -211 } │ │ │ │ -212 │ │ │ │ -213 _GLIBCXX23_CONSTEXPR │ │ │ │ -214 pointer release() noexcept │ │ │ │ -215 { │ │ │ │ -216 pointer __p = _M_ptr(); │ │ │ │ -217 _M_ptr() = nullptr; │ │ │ │ -218 return __p; │ │ │ │ -219 } │ │ │ │ -220 │ │ │ │ -221 _GLIBCXX23_CONSTEXPR │ │ │ │ -222 void │ │ │ │ -223 _s_w_a_p(__uniq_ptr_impl& __rhs) noexcept │ │ │ │ -224 { │ │ │ │ -225 using _s_t_d_:_:_s_w_a_p; │ │ │ │ -226 _s_w_a_p(this->_M_ptr(), __rhs._M_ptr()); │ │ │ │ -227 _s_w_a_p(this->_M_deleter(), __rhs._M_deleter()); │ │ │ │ -228 } │ │ │ │ -229 │ │ │ │ -230 private: │ │ │ │ -231 tuple _M_t; │ │ │ │ -232 }; │ │ │ │ +177 template │ │ │ │ +178 typename basic_filebuf<_CharT, _Traits>::__filebuf_type* │ │ │ │ +_1_7_9 _b_a_s_i_c___f_i_l_e_b_u_f_<___C_h_a_r_T_,_ ___T_r_a_i_t_s_>_:_: │ │ │ │ +180_ _o_p_e_n(const char* _____s, ios_base::openmode _____m_o_d_e) │ │ │ │ +181 { │ │ │ │ +182 _____f_i_l_e_b_u_f___t_y_p_e *_____r_e_t = 0; │ │ │ │ +183 if (!this->is_open()) │ │ │ │ +184 { │ │ │ │ +185 _M_file.open(_____s, _____m_o_d_e); │ │ │ │ +186 if (this->is_open()) │ │ │ │ +187 { │ │ │ │ +188 _M_allocate_internal_buffer(); │ │ │ │ +189 _M_mode = _____m_o_d_e; │ │ │ │ +190 │ │ │ │ +191 // Setup initial buffer to 'uncommitted' mode. │ │ │ │ +192 _M_reading = false; │ │ │ │ +193 _M_writing = false; │ │ │ │ +194 _M_set_buffer(-1); │ │ │ │ +195 │ │ │ │ +196 // Reset to initial state. │ │ │ │ +197 _M_state_last = _M_state_cur = _M_state_beg; │ │ │ │ +198 │ │ │ │ +199 // 27.8.1.3,4 │ │ │ │ +200 if ((_____m_o_d_e & _i_o_s___b_a_s_e_:_:_a_t_e) │ │ │ │ +201 && this->seekoff(0, _i_o_s___b_a_s_e_:_:_e_n_d, _____m_o_d_e) │ │ │ │ +202 == pos_type(off_type(-1))) │ │ │ │ +203 this->close(); │ │ │ │ +204 else │ │ │ │ +205 _____r_e_t = this; │ │ │ │ +206 } │ │ │ │ +207 } │ │ │ │ +208 return _____r_e_t; │ │ │ │ +209 } │ │ │ │ +210 │ │ │ │ +211#if _GLIBCXX_HAVE__WFOPEN && _GLIBCXX_USE_WCHAR_T │ │ │ │ +212 template │ │ │ │ +213 _b_a_s_i_c___f_i_l_e_b_u_f_<___C_h_a_r_T_,_ ___T_r_a_i_t_s_>* │ │ │ │ +214 _b_a_s_i_c___f_i_l_e_b_u_f_<___C_h_a_r_T_,_ ___T_r_a_i_t_s_>_:_: │ │ │ │ +215_ _o_p_e_n(const wchar_t* _____s, ios_base::openmode _____m_o_d_e) │ │ │ │ +216 { │ │ │ │ +217 __filebuf_type *_____r_e_t = 0; │ │ │ │ +218 if (!this->is_open()) │ │ │ │ +219 { │ │ │ │ +220 _M_file.open(_____s, _____m_o_d_e); │ │ │ │ +221 if (this->is_open()) │ │ │ │ +222 { │ │ │ │ +223 _M_allocate_internal_buffer(); │ │ │ │ +224 _M_mode = _____m_o_d_e; │ │ │ │ +225 │ │ │ │ +226 // Setup initial buffer to 'uncommitted' mode. │ │ │ │ +227 _M_reading = false; │ │ │ │ +228 _M_writing = false; │ │ │ │ +229 _M_set_buffer(-1); │ │ │ │ +230 │ │ │ │ +231 // Reset to initial state. │ │ │ │ +232 _M_state_last = _M_state_cur = _M_state_beg; │ │ │ │ 233 │ │ │ │ -234 // Defines move construction + assignment as either defaulted or deleted. │ │ │ │ -235 template ::value, │ │ │ │ -237 bool = is_move_assignable<_Dp>::value> │ │ │ │ -238 struct __uniq_ptr_data : __uniq_ptr_impl<_Tp, _Dp> │ │ │ │ -239 { │ │ │ │ -240 using __uniq_ptr_impl<_Tp, _Dp>::__uniq_ptr_impl; │ │ │ │ -241 __uniq_ptr_data(__uniq_ptr_data&&) = default; │ │ │ │ -242 __uniq_ptr_data& operator=(__uniq_ptr_data&&) = default; │ │ │ │ -243 }; │ │ │ │ -244 │ │ │ │ -245 template │ │ │ │ -246 struct __uniq_ptr_data<_Tp, _Dp, true, false> : __uniq_ptr_impl<_Tp, _Dp> │ │ │ │ -247 { │ │ │ │ -248 using __uniq_ptr_impl<_Tp, _Dp>::__uniq_ptr_impl; │ │ │ │ -249 __uniq_ptr_data(__uniq_ptr_data&&) = default; │ │ │ │ -250 __uniq_ptr_data& operator=(__uniq_ptr_data&&) = delete; │ │ │ │ -251 }; │ │ │ │ -252 │ │ │ │ -253 template │ │ │ │ -254 struct __uniq_ptr_data<_Tp, _Dp, false, true> : __uniq_ptr_impl<_Tp, _Dp> │ │ │ │ -255 { │ │ │ │ -256 using __uniq_ptr_impl<_Tp, _Dp>::__uniq_ptr_impl; │ │ │ │ -257 __uniq_ptr_data(__uniq_ptr_data&&) = delete; │ │ │ │ -258 __uniq_ptr_data& operator=(__uniq_ptr_data&&) = default; │ │ │ │ -259 }; │ │ │ │ -260 │ │ │ │ -261 template │ │ │ │ -262 struct __uniq_ptr_data<_Tp, _Dp, false, false> : __uniq_ptr_impl<_Tp, _Dp> │ │ │ │ +234 // 27.8.1.3,4 │ │ │ │ +235 if ((_____m_o_d_e & _i_o_s___b_a_s_e_:_:_a_t_e) │ │ │ │ +236 && this->seekoff(0, _i_o_s___b_a_s_e_:_:_e_n_d, _____m_o_d_e) │ │ │ │ +237 == pos_type(off_type(-1))) │ │ │ │ +238 this->close(); │ │ │ │ +239 else │ │ │ │ +_2_4_0 _____r_e_t = this; │ │ │ │ +241 } │ │ │ │ +242 } │ │ │ │ +243 return __ret; │ │ │ │ +244 } │ │ │ │ +245#endif // HAVE__WFOPEN && USE_WCHAR_T │ │ │ │ +246 │ │ │ │ +247 template │ │ │ │ +248 typename basic_filebuf<_CharT, _Traits>::__filebuf_type* │ │ │ │ +_2_4_9 _b_a_s_i_c___f_i_l_e_b_u_f_<___C_h_a_r_T_,_ ___T_r_a_i_t_s_>_:_: │ │ │ │ +250_ _c_l_o_s_e() │ │ │ │ +251 { │ │ │ │ +252 if (!this->is_open()) │ │ │ │ +253 return 0; │ │ │ │ +254 │ │ │ │ +255 bool _____t_e_s_t_f_a_i_l = false; │ │ │ │ +256 { │ │ │ │ +257 // NB: Do this here so that re-opened filebufs will be cool... │ │ │ │ +258 struct _____c_l_o_s_e___s_e_n_t_r_y │ │ │ │ +259 { │ │ │ │ +260 _b_a_s_i_c___f_i_l_e_b_u_f *_____f_b; │ │ │ │ +261 _____c_l_o_s_e___s_e_n_t_r_y (_b_a_s_i_c___f_i_l_e_b_u_f *_____f_b_i): _____f_b(_____f_b_i) { } │ │ │ │ +262 _~_____c_l_o_s_e___s_e_n_t_r_y () │ │ │ │ 263 { │ │ │ │ -264 using __uniq_ptr_impl<_Tp, _Dp>::__uniq_ptr_impl; │ │ │ │ -265 __uniq_ptr_data(__uniq_ptr_data&&) = delete; │ │ │ │ -266 __uniq_ptr_data& operator=(__uniq_ptr_data&&) = delete; │ │ │ │ -267 }; │ │ │ │ -268 /// @endcond │ │ │ │ -269 │ │ │ │ -270 // 20.7.1.2 unique_ptr for single objects. │ │ │ │ -271 │ │ │ │ -272 /// A move-only smart pointer that manages unique ownership of a resource. │ │ │ │ -273 /// @headerfile memory │ │ │ │ -274 /// @since C++11 │ │ │ │ -275 template > │ │ │ │ -_2_7_6 class _u_n_i_q_u_e___p_t_r │ │ │ │ -277 { │ │ │ │ -278 template │ │ │ │ -279 using _DeleterConstraint = │ │ │ │ -280 typename _____u_n_i_q___p_t_r___i_m_p_l_<___T_p_,_ ___U_p_>_:_:___D_e_l_e_t_e_r_C_o_n_s_t_r_a_i_n_t_:_:_t_y_p_e; │ │ │ │ -281 │ │ │ │ -282 _____u_n_i_q___p_t_r___d_a_t_a_<___T_p_,_ ___D_p_> _M_t; │ │ │ │ -283 │ │ │ │ -284 public: │ │ │ │ -285 using pointer = typename _____u_n_i_q___p_t_r___i_m_p_l_<___T_p_,_ ___D_p_>_:_:_p_o_i_n_t_e_r; │ │ │ │ -286 using element_type = _Tp; │ │ │ │ -287 using _d_e_l_e_t_e_r___t_y_p_e = ___D_p; │ │ │ │ +264 _____f_b->_M_mode = _i_o_s___b_a_s_e_:_:_o_p_e_n_m_o_d_e(0); │ │ │ │ +265 _____f_b->_M_pback_init = false; │ │ │ │ +266 _____f_b->_M_destroy_internal_buffer(); │ │ │ │ +267 _____f_b->_M_reading = false; │ │ │ │ +268 _____f_b->_M_writing = false; │ │ │ │ +269 _____f_b->_M_set_buffer(-1); │ │ │ │ +270 _____f_b->_M_state_last = _____f_b->_M_state_cur = _____f_b->_M_state_beg; │ │ │ │ +271 } │ │ │ │ +272 } _____c_s (this); │ │ │ │ +273 │ │ │ │ +274 __try │ │ │ │ +275 { │ │ │ │ +276 if (!_M_terminate_output()) │ │ │ │ +277 _____t_e_s_t_f_a_i_l = true; │ │ │ │ +278 } │ │ │ │ +279 __catch(...) │ │ │ │ +280 { │ │ │ │ +281 _M_file.close(); │ │ │ │ +282 __throw_exception_again; │ │ │ │ +283 } │ │ │ │ +284 } │ │ │ │ +285 │ │ │ │ +286 if (!_M_file.close()) │ │ │ │ +287 _____t_e_s_t_f_a_i_l = true; │ │ │ │ 288 │ │ │ │ -289 private: │ │ │ │ -290 // helper template for detecting a safe conversion from another │ │ │ │ -291 // unique_ptr │ │ │ │ -292 template │ │ │ │ -293 using _____s_a_f_e___c_o_n_v_e_r_s_i_o_n___u_p = __and_< │ │ │ │ -294 _i_s___c_o_n_v_e_r_t_i_b_l_e_<_t_y_p_e_n_a_m_e_ _u_n_i_q_u_e___p_t_r_<___U_p_,_ ___E_p_>_:_:_p_o_i_n_t_e_r, pointer>, │ │ │ │ -295 _____n_o_t___<_i_s___a_r_r_a_y_<___U_p_>> │ │ │ │ -296 >; │ │ │ │ -297 │ │ │ │ -298 public: │ │ │ │ -299 // Constructors. │ │ │ │ -300 │ │ │ │ -301 /// Default constructor, creates a unique_ptr that owns nothing. │ │ │ │ -302 template> │ │ │ │ -_3_0_3 constexpr _u_n_i_q_u_e___p_t_r() noexcept │ │ │ │ -304 : _M_t() │ │ │ │ -305 { } │ │ │ │ -306 │ │ │ │ -307 /** Takes ownership of a pointer. │ │ │ │ -308 * │ │ │ │ -309 * @param __p A pointer to an object of @c element_type │ │ │ │ -310 * │ │ │ │ -311 * The deleter will be value-initialized. │ │ │ │ -312 */ │ │ │ │ -313 template> │ │ │ │ -314 ___G_L_I_B_C_X_X_2_3___C_O_N_S_T_E_X_P_R │ │ │ │ -315 explicit │ │ │ │ -_3_1_6 _u_n_i_q_u_e___p_t_r(pointer __p) noexcept │ │ │ │ -317 : _M_t(__p) │ │ │ │ -318 { } │ │ │ │ -319 │ │ │ │ -320 /** Takes ownership of a pointer. │ │ │ │ -321 * │ │ │ │ -322 * @param __p A pointer to an object of @c element_type │ │ │ │ -323 * @param __d A reference to a deleter. │ │ │ │ -324 * │ │ │ │ -325 * The deleter will be initialized with @p __d │ │ │ │ -326 */ │ │ │ │ -327 template>> │ │ │ │ -329 ___G_L_I_B_C_X_X_2_3___C_O_N_S_T_E_X_P_R │ │ │ │ -_3_3_0 _u_n_i_q_u_e___p_t_r(pointer __p, const _d_e_l_e_t_e_r___t_y_p_e& __d) noexcept │ │ │ │ -331 : _M_t(__p, __d) { } │ │ │ │ -332 │ │ │ │ -333 /** Takes ownership of a pointer. │ │ │ │ -334 * │ │ │ │ -335 * @param __p A pointer to an object of @c element_type │ │ │ │ -336 * @param __d An rvalue reference to a (non-reference) deleter. │ │ │ │ -337 * │ │ │ │ -338 * The deleter will be initialized with @p std::move(__d) │ │ │ │ -339 */ │ │ │ │ -340 template>> │ │ │ │ -342 ___G_L_I_B_C_X_X_2_3___C_O_N_S_T_E_X_P_R │ │ │ │ -_3_4_3 _u_n_i_q_u_e___p_t_r(pointer __p, │ │ │ │ -344 _____e_n_a_b_l_e___i_f___t_:_:_v_a_l_u_e, │ │ │ │ -345 ___D_e_l&&> __d) noexcept │ │ │ │ -346 : _M_t(__p, _s_t_d_:_:_m_o_v_e(__d)) │ │ │ │ -347 { } │ │ │ │ -348 │ │ │ │ -349 template::type> │ │ │ │ -351 ___G_L_I_B_C_X_X_2_3___C_O_N_S_T_E_X_P_R │ │ │ │ -352 _u_n_i_q_u_e___p_t_r(pointer, │ │ │ │ -353 _____e_n_a_b_l_e___i_f___t<_i_s___l_v_a_l_u_e___r_e_f_e_r_e_n_c_e_<___D_e_l_>_:_:_v_a_l_u_e, │ │ │ │ -354 ___D_e_l_U_n_r_e_f&&>) = delete; │ │ │ │ -355 │ │ │ │ -356 /// Creates a unique_ptr that owns nothing. │ │ │ │ -357 template> │ │ │ │ -_3_5_8 constexpr _u_n_i_q_u_e___p_t_r(nullptr_t) noexcept │ │ │ │ -359 : _M_t() │ │ │ │ -360 { } │ │ │ │ -361 │ │ │ │ -362 // Move constructors. │ │ │ │ -363 │ │ │ │ -364 /// Move constructor. │ │ │ │ -_3_6_5 _u_n_i_q_u_e___p_t_r(_u_n_i_q_u_e___p_t_r&&) = default; │ │ │ │ -366 │ │ │ │ -367 /** @brief Converting constructor from another type │ │ │ │ -368 * │ │ │ │ -369 * Requires that the pointer owned by @p __u is convertible to the │ │ │ │ -370 * type of pointer owned by this object, @p __u does not own an array, │ │ │ │ -371 * and @p __u has a compatible deleter type. │ │ │ │ -372 */ │ │ │ │ -373 template, │ │ │ │ -375 _____c_o_n_d_i_t_i_o_n_a_l___t_<_i_s___r_e_f_e_r_e_n_c_e_<___D_p_>_:_:_v_a_l_u_e, │ │ │ │ -376 _i_s___s_a_m_e_<___E_p_,_ ___D_p_>, │ │ │ │ -377 _i_s___c_o_n_v_e_r_t_i_b_l_e_<___E_p_,_ ___D_p_>>>> │ │ │ │ -378 ___G_L_I_B_C_X_X_2_3___C_O_N_S_T_E_X_P_R │ │ │ │ -_3_7_9 _u_n_i_q_u_e___p_t_r(_u_n_i_q_u_e___p_t_r_<___U_p_,_ ___E_p_>&& _____u) noexcept │ │ │ │ -380 : _M_t(_____u.release(), _s_t_d_:_:_f_o_r_w_a_r_d_<___E_p_>(_____u.get_deleter())) │ │ │ │ -381 { } │ │ │ │ -382 │ │ │ │ -383#if _GLIBCXX_USE_DEPRECATED │ │ │ │ -384#pragma GCC diagnostic push │ │ │ │ -385#pragma GCC diagnostic ignored "-Wdeprecated-declarations" │ │ │ │ -386 /// Converting constructor from @c auto_ptr │ │ │ │ -387 template, _i_s___s_a_m_e_<___D_p_,_ _d_e_f_a_u_l_t___d_e_l_e_t_e_<___T_p_>>>> │ │ │ │ -389 _u_n_i_q_u_e___p_t_r(_a_u_t_o___p_t_r_<___U_p_>&& _____u) noexcept; │ │ │ │ -390#pragma GCC diagnostic pop │ │ │ │ -391#endif │ │ │ │ -392 │ │ │ │ -393 /// Destructor, invokes the deleter if the stored pointer is not null. │ │ │ │ -394#if __cplusplus > 202002L && __cpp_constexpr_dynamic_alloc │ │ │ │ -395 constexpr │ │ │ │ -396#endif │ │ │ │ -_3_9_7 _~_u_n_i_q_u_e___p_t_r() noexcept │ │ │ │ -398 { │ │ │ │ -399 static_assert(_____i_s___i_n_v_o_c_a_b_l_e_<_d_e_l_e_t_e_r___t_y_p_e_&_,_ _p_o_i_n_t_e_r_>_:_:_v_a_l_u_e, │ │ │ │ -400 "unique_ptr's deleter must be invocable with a pointer"); │ │ │ │ -401 auto& _____p_t_r = _M_t._M_ptr(); │ │ │ │ -402 if (_____p_t_r != nullptr) │ │ │ │ -403 _g_e_t___d_e_l_e_t_e_r()(_s_t_d_:_:_m_o_v_e(_____p_t_r)); │ │ │ │ -404 _____p_t_r = pointer(); │ │ │ │ -405 } │ │ │ │ -406 │ │ │ │ -407 // Assignment. │ │ │ │ -408 │ │ │ │ -409 /** @brief Move assignment operator. │ │ │ │ -410 * │ │ │ │ -411 * Invokes the deleter if this object owns a pointer. │ │ │ │ -412 */ │ │ │ │ -_4_1_3 _u_n_i_q_u_e___p_t_r& _o_p_e_r_a_t_o_r_=(_u_n_i_q_u_e___p_t_r&&) = default; │ │ │ │ -414 │ │ │ │ -415 /** @brief Assignment from another type. │ │ │ │ -416 * │ │ │ │ -417 * @param __u The object to transfer ownership from, which owns a │ │ │ │ -418 * convertible pointer to a non-array object. │ │ │ │ -419 * │ │ │ │ -420 * Invokes the deleter if this object owns a pointer. │ │ │ │ -421 */ │ │ │ │ -422 template │ │ │ │ -423 ___G_L_I_B_C_X_X_2_3___C_O_N_S_T_E_X_P_R │ │ │ │ -424 typename _e_n_a_b_l_e___i_f< __and_< │ │ │ │ -425 _____s_a_f_e___c_o_n_v_e_r_s_i_o_n___u_p_<___U_p_,_ ___E_p_>, │ │ │ │ -426 _i_s___a_s_s_i_g_n_a_b_l_e_<_d_e_l_e_t_e_r___t_y_p_e_&_,_ ___E_p_&_&_> │ │ │ │ -427 >::value, │ │ │ │ -428 _u_n_i_q_u_e___p_t_r&>::type │ │ │ │ -_4_2_9 _o_p_e_r_a_t_o_r_=(_u_n_i_q_u_e___p_t_r_<___U_p_,_ ___E_p_>&& _____u) noexcept │ │ │ │ -430 { │ │ │ │ -431 _r_e_s_e_t(_____u.release()); │ │ │ │ -432 _g_e_t___d_e_l_e_t_e_r() = _s_t_d_:_:_f_o_r_w_a_r_d_<___E_p_>(_____u.get_deleter()); │ │ │ │ -433 return *this; │ │ │ │ -434 } │ │ │ │ -435 │ │ │ │ -436 /// Reset the %unique_ptr to empty, invoking the deleter if necessary. │ │ │ │ -437 ___G_L_I_B_C_X_X_2_3___C_O_N_S_T_E_X_P_R │ │ │ │ -438 _u_n_i_q_u_e___p_t_r& │ │ │ │ -_4_3_9 _o_p_e_r_a_t_o_r_=(nullptr_t) noexcept │ │ │ │ -440 { │ │ │ │ -441 _r_e_s_e_t(); │ │ │ │ -442 return *this; │ │ │ │ -443 } │ │ │ │ -444 │ │ │ │ -445 // Observers. │ │ │ │ -446 │ │ │ │ -447 /// Dereference the stored pointer. │ │ │ │ -448 ___G_L_I_B_C_X_X_2_3___C_O_N_S_T_E_X_P_R │ │ │ │ -449 typename add_lvalue_reference::type │ │ │ │ -_4_5_0 _o_p_e_r_a_t_o_r_*() const noexcept(noexcept(*_s_t_d::_d_e_c_l_v_a_l())) │ │ │ │ -451 { │ │ │ │ -452 __glibcxx_assert(_g_e_t() != pointer()); │ │ │ │ -453 return *_g_e_t(); │ │ │ │ -454 } │ │ │ │ -455 │ │ │ │ -456 /// Return the stored pointer. │ │ │ │ -457 ___G_L_I_B_C_X_X_2_3___C_O_N_S_T_E_X_P_R │ │ │ │ -458 pointer │ │ │ │ -_4_5_9 _o_p_e_r_a_t_o_r_-_>() const noexcept │ │ │ │ -460 { │ │ │ │ -461 _GLIBCXX_DEBUG_PEDASSERT(_g_e_t() != pointer()); │ │ │ │ -462 return _g_e_t(); │ │ │ │ -463 } │ │ │ │ -464 │ │ │ │ -465 /// Return the stored pointer. │ │ │ │ -466 ___G_L_I_B_C_X_X_2_3___C_O_N_S_T_E_X_P_R │ │ │ │ -467 pointer │ │ │ │ -_4_6_8 _g_e_t() const noexcept │ │ │ │ -469 { return _M_t._M_ptr(); } │ │ │ │ -470 │ │ │ │ -471 /// Return a reference to the stored deleter. │ │ │ │ -472 ___G_L_I_B_C_X_X_2_3___C_O_N_S_T_E_X_P_R │ │ │ │ -473 deleter_type& │ │ │ │ -_4_7_4 _g_e_t___d_e_l_e_t_e_r() noexcept │ │ │ │ -475 { return _M_t._M_deleter(); } │ │ │ │ -476 │ │ │ │ -477 /// Return a reference to the stored deleter. │ │ │ │ -478 ___G_L_I_B_C_X_X_2_3___C_O_N_S_T_E_X_P_R │ │ │ │ -479 const deleter_type& │ │ │ │ -_4_8_0 _g_e_t___d_e_l_e_t_e_r() const noexcept │ │ │ │ -481 { return _M_t._M_deleter(); } │ │ │ │ -482 │ │ │ │ -483 /// Return @c true if the stored pointer is not null. │ │ │ │ -484 ___G_L_I_B_C_X_X_2_3___C_O_N_S_T_E_X_P_R │ │ │ │ -_4_8_5 explicit operator bool() const noexcept │ │ │ │ -486 { return _g_e_t() == pointer() ? _f_a_l_s_e : true; } │ │ │ │ -487 │ │ │ │ -488 // Modifiers. │ │ │ │ -489 │ │ │ │ -490 /// Release ownership of any stored pointer. │ │ │ │ -491 ___G_L_I_B_C_X_X_2_3___C_O_N_S_T_E_X_P_R │ │ │ │ -492 pointer │ │ │ │ -_4_9_3 _r_e_l_e_a_s_e() noexcept │ │ │ │ -494 { return _M_t.release(); } │ │ │ │ -495 │ │ │ │ -496 /** @brief Replace the stored pointer. │ │ │ │ -497 * │ │ │ │ -498 * @param __p The new pointer to store. │ │ │ │ -499 * │ │ │ │ -500 * The deleter will be invoked if a pointer is already owned. │ │ │ │ -501 */ │ │ │ │ -502 ___G_L_I_B_C_X_X_2_3___C_O_N_S_T_E_X_P_R │ │ │ │ -503 void │ │ │ │ -_5_0_4 _r_e_s_e_t(pointer __p = pointer()) noexcept │ │ │ │ -505 { │ │ │ │ -506 static_assert(_____i_s___i_n_v_o_c_a_b_l_e_<_d_e_l_e_t_e_r___t_y_p_e_&_,_ _p_o_i_n_t_e_r_>_:_:_v_a_l_u_e, │ │ │ │ -507 "unique_ptr's deleter must be invocable with a pointer"); │ │ │ │ -508 _M_t.reset(_s_t_d_:_:_m_o_v_e(__p)); │ │ │ │ -509 } │ │ │ │ -510 │ │ │ │ -511 /// Exchange the pointer and deleter with another object. │ │ │ │ -512 ___G_L_I_B_C_X_X_2_3___C_O_N_S_T_E_X_P_R │ │ │ │ -513 void │ │ │ │ -_5_1_4 _s_w_a_p(_u_n_i_q_u_e___p_t_r& _____u) noexcept │ │ │ │ -515 { │ │ │ │ -516 static_assert(_____i_s___s_w_a_p_p_a_b_l_e_<___D_p_>_:_:_v_a_l_u_e, "deleter must be swappable"); │ │ │ │ -517 _M_t.swap(_____u._M_t); │ │ │ │ -518 } │ │ │ │ -519 │ │ │ │ -520 // Disable copy from lvalue. │ │ │ │ -521 _u_n_i_q_u_e___p_t_r(const _u_n_i_q_u_e___p_t_r&) = delete; │ │ │ │ -522 _u_n_i_q_u_e___p_t_r& _o_p_e_r_a_t_o_r_=(const _u_n_i_q_u_e___p_t_r&) = delete; │ │ │ │ -523 }; │ │ │ │ -524 │ │ │ │ -525 // 20.7.1.3 unique_ptr for array objects with a runtime length │ │ │ │ -526 // [unique.ptr.runtime] │ │ │ │ -527 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ -528 // DR 740 - omit specialization for array objects with a compile time │ │ │ │ -length │ │ │ │ -529 │ │ │ │ -530 /// A move-only smart pointer that manages unique ownership of an array. │ │ │ │ -531 /// @headerfile memory │ │ │ │ -532 /// @since C++11 │ │ │ │ -533 template │ │ │ │ -_5_3_4 class _u_n_i_q_u_e___p_t_r<_Tp[], ___D_p> │ │ │ │ -535 { │ │ │ │ -536 template │ │ │ │ -537 using _DeleterConstraint = │ │ │ │ -538 typename _____u_n_i_q___p_t_r___i_m_p_l_<___T_p_,_ ___U_p_>_:_:___D_e_l_e_t_e_r_C_o_n_s_t_r_a_i_n_t_:_:_t_y_p_e; │ │ │ │ -539 │ │ │ │ -540 _____u_n_i_q___p_t_r___d_a_t_a_<___T_p_,_ ___D_p_> _M_t; │ │ │ │ -541 │ │ │ │ -542 template │ │ │ │ -543 using __remove_cv = typename remove_cv<_Up>::type; │ │ │ │ -544 │ │ │ │ -545 // like is_base_of<_Tp, _Up> but false if unqualified types are the same │ │ │ │ -546 template │ │ │ │ -547 using _____i_s___d_e_r_i_v_e_d___T_p │ │ │ │ -548 = _____a_n_d___<_ _i_s___b_a_s_e___o_f_<___T_p_,_ ___U_p_>, │ │ │ │ -549 _____n_o_t___<_i_s___s_a_m_e_<_____r_e_m_o_v_e___c_v_<___T_p_>, _____r_e_m_o_v_e___c_v_<___U_p_>>> >; │ │ │ │ -550 │ │ │ │ -551 public: │ │ │ │ -552 using pointer = typename _____u_n_i_q___p_t_r___i_m_p_l_<___T_p_,_ ___D_p_>_:_:_p_o_i_n_t_e_r; │ │ │ │ -553 using element_type = _Tp; │ │ │ │ -554 using _d_e_l_e_t_e_r___t_y_p_e = ___D_p; │ │ │ │ -555 │ │ │ │ -556 // helper template for detecting a safe conversion from another │ │ │ │ -557 // unique_ptr │ │ │ │ -558 template, │ │ │ │ -560 typename ___U_P___p_o_i_n_t_e_r = typename _UPtr::pointer, │ │ │ │ -561 typename ___U_P___e_l_e_m_e_n_t___t_y_p_e = typename _UPtr::element_type> │ │ │ │ -562 using _____s_a_f_e___c_o_n_v_e_r_s_i_o_n___u_p = __and_< │ │ │ │ -563 _i_s___a_r_r_a_y_<___U_p_>, │ │ │ │ -564 _i_s___s_a_m_e_<_p_o_i_n_t_e_r_,_ _e_l_e_m_e_n_t___t_y_p_e_*_>, │ │ │ │ -565 _i_s___s_a_m_e_<___U_P___p_o_i_n_t_e_r_,_ ___U_P___e_l_e_m_e_n_t___t_y_p_e_*_>, │ │ │ │ -566 _i_s___c_o_n_v_e_r_t_i_b_l_e<___U_P___e_l_e_m_e_n_t___t_y_p_e(*)[], element_type(*)[]> │ │ │ │ -567 >; │ │ │ │ -568 │ │ │ │ -569 // helper template for detecting a safe conversion from a raw pointer │ │ │ │ -570 template │ │ │ │ -571 using _____s_a_f_e___c_o_n_v_e_r_s_i_o_n___r_a_w = __and_< │ │ │ │ -572 _____o_r___<_____o_r___<_i_s___s_a_m_e_<___U_p_,_ _p_o_i_n_t_e_r_>, │ │ │ │ -573 _i_s___s_a_m_e_<___U_p_,_ _n_u_l_l_p_t_r___t_>>, │ │ │ │ -574 _____a_n_d___<_i_s___p_o_i_n_t_e_r_<___U_p_>, │ │ │ │ -575 _i_s___s_a_m_e_<_p_o_i_n_t_e_r_,_ _e_l_e_m_e_n_t___t_y_p_e_*_>, │ │ │ │ -576 _i_s___c_o_n_v_e_r_t_i_b_l_e< │ │ │ │ -577 typename remove_pointer<_Up>::type(*)[], │ │ │ │ -578 element_type(*)[]> │ │ │ │ -579 > │ │ │ │ -580 > │ │ │ │ -581 >; │ │ │ │ -582 │ │ │ │ -583 // Constructors. │ │ │ │ -584 │ │ │ │ -585 /// Default constructor, creates a unique_ptr that owns nothing. │ │ │ │ -586 template> │ │ │ │ -_5_8_7 constexpr _u_n_i_q_u_e___p_t_r() noexcept │ │ │ │ -588 : _M_t() │ │ │ │ -589 { } │ │ │ │ -590 │ │ │ │ -591 /** Takes ownership of a pointer. │ │ │ │ -592 * │ │ │ │ -593 * @param __p A pointer to an array of a type safely convertible │ │ │ │ -594 * to an array of @c element_type │ │ │ │ -595 * │ │ │ │ -596 * The deleter will be value-initialized. │ │ │ │ -597 */ │ │ │ │ -598 template, │ │ │ │ -601 typename = typename _e_n_a_b_l_e___i_f< │ │ │ │ -602 __safe_conversion_raw<_Up>::value, bool>::type> │ │ │ │ -603 ___G_L_I_B_C_X_X_2_3___C_O_N_S_T_E_X_P_R │ │ │ │ -604 explicit │ │ │ │ -_6_0_5 _u_n_i_q_u_e___p_t_r(_Up __p) noexcept │ │ │ │ -606 : _M_t(__p) │ │ │ │ -607 { } │ │ │ │ -608 │ │ │ │ -609 /** Takes ownership of a pointer. │ │ │ │ -610 * │ │ │ │ -611 * @param __p A pointer to an array of a type safely convertible │ │ │ │ -612 * to an array of @c element_type │ │ │ │ -613 * @param __d A reference to a deleter. │ │ │ │ -614 * │ │ │ │ -615 * The deleter will be initialized with @p __d │ │ │ │ -616 */ │ │ │ │ -617 template, │ │ │ │ -619 _i_s___c_o_p_y___c_o_n_s_t_r_u_c_t_i_b_l_e_<___D_e_l_>>> │ │ │ │ -620 ___G_L_I_B_C_X_X_2_3___C_O_N_S_T_E_X_P_R │ │ │ │ -_6_2_1 _u_n_i_q_u_e___p_t_r(_Up __p, const _d_e_l_e_t_e_r___t_y_p_e& __d) noexcept │ │ │ │ -622 : _M_t(__p, __d) { } │ │ │ │ +289 if (_____t_e_s_t_f_a_i_l) │ │ │ │ +290 return 0; │ │ │ │ +291 else │ │ │ │ +292 return this; │ │ │ │ +293 } │ │ │ │ +294 │ │ │ │ +295 template │ │ │ │ +296 _s_t_r_e_a_m_s_i_z_e │ │ │ │ +_2_9_7 _b_a_s_i_c___f_i_l_e_b_u_f_<___C_h_a_r_T_,_ ___T_r_a_i_t_s_>_:_: │ │ │ │ +298_ _s_h_o_w_m_a_n_y_c() │ │ │ │ +299 { │ │ │ │ +300 _s_t_r_e_a_m_s_i_z_e _____r_e_t = -1; │ │ │ │ +301 const bool _____t_e_s_t_i_n = _M_mode & _i_o_s___b_a_s_e_:_:_i_n; │ │ │ │ +302 if (_____t_e_s_t_i_n && this->is_open()) │ │ │ │ +303 { │ │ │ │ +304 // For a stateful encoding (-1) the pending sequence might be just │ │ │ │ +305 // shift and unshift prefixes with no actual character. │ │ │ │ +306 _____r_e_t = this->egptr() - this->gptr(); │ │ │ │ +307 │ │ │ │ +308#if _GLIBCXX_HAVE_DOS_BASED_FILESYSTEM │ │ │ │ +309 // About this workaround, see libstdc++/20806. │ │ │ │ +310 const bool _____t_e_s_t_b_i_n_a_r_y = _M_mode & _i_o_s___b_a_s_e_:_:_b_i_n_a_r_y; │ │ │ │ +311 if (__check_facet(_M_codecvt).encoding() >= 0 │ │ │ │ +312 && _____t_e_s_t_b_i_n_a_r_y) │ │ │ │ +313#else │ │ │ │ +314 if (__check_facet(_M_codecvt).encoding() >= 0) │ │ │ │ +_3_1_5#endif │ │ │ │ +316 _____r_e_t += _M_file.showmanyc() / _M_codecvt->max_length(); │ │ │ │ +317 } │ │ │ │ +318 return _____r_e_t; │ │ │ │ +319 } │ │ │ │ +320 │ │ │ │ +321 template │ │ │ │ +322 typename basic_filebuf<_CharT, _Traits>::int_type │ │ │ │ +_3_2_3 _b_a_s_i_c___f_i_l_e_b_u_f_<___C_h_a_r_T_,_ ___T_r_a_i_t_s_>_:_: │ │ │ │ +324_ _u_n_d_e_r_f_l_o_w() │ │ │ │ +325 { │ │ │ │ +326 int_type _____r_e_t = traits_type::eof(); │ │ │ │ +327 const bool _____t_e_s_t_i_n = _M_mode & _i_o_s___b_a_s_e_:_:_i_n; │ │ │ │ +328 if (_____t_e_s_t_i_n) │ │ │ │ +329 { │ │ │ │ +330 if (_M_writing) │ │ │ │ +331 { │ │ │ │ +332 if (overflow() == traits_type::eof()) │ │ │ │ +333 return _____r_e_t; │ │ │ │ +334 _M_set_buffer(-1); │ │ │ │ +335 _M_writing = false; │ │ │ │ +336 } │ │ │ │ +337 // Check for pback madness, and if so switch back to the │ │ │ │ +338 // normal buffers and jet outta here before expensive │ │ │ │ +339 // fileops happen... │ │ │ │ +340 _M_destroy_pback(); │ │ │ │ +341 │ │ │ │ +342 if (this->gptr() < this->egptr()) │ │ │ │ +343 return traits_type::to_int_type(*this->gptr()); │ │ │ │ +344 │ │ │ │ +345 // Get and convert input sequence. │ │ │ │ +346 const size_t _____b_u_f_l_e_n = _M_buf_size > 1 ? _M_buf_size - 1 : 1; │ │ │ │ +347 │ │ │ │ +348 // Will be set to true if ::read() returns 0 indicating EOF. │ │ │ │ +349 bool _____g_o_t___e_o_f = false; │ │ │ │ +350 // Number of internal characters produced. │ │ │ │ +351 _s_t_r_e_a_m_s_i_z_e _____i_l_e_n = 0; │ │ │ │ +352 codecvt_base::result __r = codecvt_base::ok; │ │ │ │ +353 if (__check_facet(_M_codecvt).always_noconv()) │ │ │ │ +354 { │ │ │ │ +355 _____i_l_e_n = _M_file.xsgetn(reinterpret_cast(this->eback()), │ │ │ │ +356 _____b_u_f_l_e_n); │ │ │ │ +357 if (_____i_l_e_n == 0) │ │ │ │ +358 _____g_o_t___e_o_f = true; │ │ │ │ +359 } │ │ │ │ +360 else │ │ │ │ +361 { │ │ │ │ +362 // Worst-case number of external bytes. │ │ │ │ +363 // XXX Not done encoding() == -1. │ │ │ │ +364 const int _____e_n_c = _M_codecvt->encoding(); │ │ │ │ +365 _s_t_r_e_a_m_s_i_z_e _____b_l_e_n; // Minimum buffer size. │ │ │ │ +_3_6_6 _s_t_r_e_a_m_s_i_z_e _____r_l_e_n; // Number of chars to read. │ │ │ │ +367 if (_____e_n_c > 0) │ │ │ │ +368 _____b_l_e_n = _____r_l_e_n = _____b_u_f_l_e_n * _____e_n_c; │ │ │ │ +369 else │ │ │ │ +370 { │ │ │ │ +371 _____b_l_e_n = _____b_u_f_l_e_n + _M_codecvt->max_length() - 1; │ │ │ │ +372 _____r_l_e_n = _____b_u_f_l_e_n; │ │ │ │ +373 } │ │ │ │ +374 const _s_t_r_e_a_m_s_i_z_e _____r_e_m_a_i_n_d_e_r = _M_ext_end - _M_ext_next; │ │ │ │ +375 _____r_l_e_n = _____r_l_e_n > _____r_e_m_a_i_n_d_e_r ? _____r_l_e_n - _____r_e_m_a_i_n_d_e_r : 0; │ │ │ │ +376 │ │ │ │ +_3_7_7 // An imbue in 'read' mode implies first converting the external │ │ │ │ +378 // chars already present. │ │ │ │ +379 if (_M_reading && this->egptr() == this->eback() && _____r_e_m_a_i_n_d_e_r) │ │ │ │ +380 _____r_l_e_n = 0; │ │ │ │ +381 │ │ │ │ +382 // Allocate buffer if necessary and move unconverted │ │ │ │ +383 // bytes to front. │ │ │ │ +384 if (_M_ext_buf_size < _____b_l_e_n) │ │ │ │ +_3_8_5 { │ │ │ │ +386 char* _____b_u_f = new char[_____b_l_e_n]; │ │ │ │ +387 if (_____r_e_m_a_i_n_d_e_r) │ │ │ │ +_3_8_8 _____b_u_i_l_t_i_n___m_e_m_c_p_y(_____b_u_f, _M_ext_next, _____r_e_m_a_i_n_d_e_r); │ │ │ │ +389 │ │ │ │ +390 delete [] _M_ext_buf; │ │ │ │ +391 _M_ext_buf = _____b_u_f; │ │ │ │ +392 _M_ext_buf_size = _____b_l_e_n; │ │ │ │ +393 } │ │ │ │ +394 else if (_____r_e_m_a_i_n_d_e_r) │ │ │ │ +395 _____b_u_i_l_t_i_n___m_e_m_m_o_v_e(_M_ext_buf, _M_ext_next, _____r_e_m_a_i_n_d_e_r); │ │ │ │ +396 │ │ │ │ +397 _M_ext_next = _M_ext_buf; │ │ │ │ +_3_9_8 _M_ext_end = _M_ext_buf + _____r_e_m_a_i_n_d_e_r; │ │ │ │ +399 _M_state_last = _M_state_cur; │ │ │ │ +400 │ │ │ │ +401 do │ │ │ │ +402 { │ │ │ │ +403 if (_____r_l_e_n > 0) │ │ │ │ +404 { │ │ │ │ +405 // Sanity check! │ │ │ │ +406 // This may fail if the return value of │ │ │ │ +407 // codecvt::max_length() is bogus. │ │ │ │ +408 if (_M_ext_end - _M_ext_buf + _____r_l_e_n > _M_ext_buf_size) │ │ │ │ +409 { │ │ │ │ +410 __throw_ios_failure(__N("basic_filebuf::underflow " │ │ │ │ +411 "codecvt::max_length() " │ │ │ │ +412 "is not valid")); │ │ │ │ +413 } │ │ │ │ +414 _s_t_r_e_a_m_s_i_z_e _____e_l_e_n = _M_file.xsgetn(_M_ext_end, _____r_l_e_n); │ │ │ │ +415 if (_____e_l_e_n == 0) │ │ │ │ +416 _____g_o_t___e_o_f = true; │ │ │ │ +417 else if (_____e_l_e_n == -1) │ │ │ │ +_4_1_8 break; │ │ │ │ +419 _M_ext_end += _____e_l_e_n; │ │ │ │ +420 } │ │ │ │ +_4_2_1 │ │ │ │ +422 char_type* _____i_e_n_d = this->eback(); │ │ │ │ +423 if (_M_ext_next < _M_ext_end) │ │ │ │ +424 __r = _M_codecvt->in(_M_state_cur, _M_ext_next, │ │ │ │ +_4_2_5 _M_ext_end, _M_ext_next, │ │ │ │ +426 this->eback(), │ │ │ │ +427 this->eback() + _____b_u_f_l_e_n, _____i_e_n_d); │ │ │ │ +428 if (__r == codecvt_base::noconv) │ │ │ │ +429 { │ │ │ │ +430 size_t _____a_v_a_i_l = _M_ext_end - _M_ext_buf; │ │ │ │ +431 _____i_l_e_n = _s_t_d_:_:_m_i_n(_____a_v_a_i_l, _____b_u_f_l_e_n); │ │ │ │ +432 traits_type::copy(this->eback(), │ │ │ │ +433 reinterpret_cast │ │ │ │ +434 (_M_ext_buf), _____i_l_e_n); │ │ │ │ +435 _M_ext_next = _M_ext_buf + _____i_l_e_n; │ │ │ │ +_4_3_6 } │ │ │ │ +437 else │ │ │ │ +438 _____i_l_e_n = _____i_e_n_d - this->eback(); │ │ │ │ +_4_3_9 │ │ │ │ +440 // _M_codecvt->in may return error while __ilen > 0: this is │ │ │ │ +441 // ok, and actually occurs in case of mixed encodings (e.g., │ │ │ │ +_4_4_2 // XML files). │ │ │ │ +443 if (__r == codecvt_base::error) │ │ │ │ +444 break; │ │ │ │ +_4_4_5 │ │ │ │ +446 _____r_l_e_n = 1; │ │ │ │ +447 } │ │ │ │ +448 while (_____i_l_e_n == 0 && !_____g_o_t___e_o_f); │ │ │ │ +449 } │ │ │ │ +450 │ │ │ │ +451 if (__ilen > 0) │ │ │ │ +452 { │ │ │ │ +453 _M_set_buffer(__ilen); │ │ │ │ +454 _M_reading = true; │ │ │ │ +455 __ret = traits_type::to_int_type(*this->gptr()); │ │ │ │ +456 } │ │ │ │ +457 else if (__got_eof) │ │ │ │ +458 { │ │ │ │ +459 // If the actual end of file is reached, set 'uncommitted' │ │ │ │ +460 // mode, thus allowing an immediate write without an │ │ │ │ +461 // intervening seek. │ │ │ │ +462 _M_set_buffer(-1); │ │ │ │ +463 _M_reading = false; │ │ │ │ +464 // However, reaching it while looping on partial means that │ │ │ │ +465 // the file has got an incomplete character. │ │ │ │ +466 if (__r == codecvt_base::partial) │ │ │ │ +467 __throw_ios_failure(__N("basic_filebuf::underflow " │ │ │ │ +468 "incomplete character in file")); │ │ │ │ +469 } │ │ │ │ +470 else if (__r == codecvt_base::error) │ │ │ │ +471 __throw_ios_failure(__N("basic_filebuf::underflow " │ │ │ │ +472 "invalid byte sequence in file")); │ │ │ │ +473 else │ │ │ │ +474 __throw_ios_failure(__N("basic_filebuf::underflow " │ │ │ │ +475 "error reading the file"), errno); │ │ │ │ +476 } │ │ │ │ +477 return __ret; │ │ │ │ +478 } │ │ │ │ +479 │ │ │ │ +480 template │ │ │ │ +481 typename basic_filebuf<_CharT, _Traits>::int_type │ │ │ │ +_4_8_2 _b_a_s_i_c___f_i_l_e_b_u_f_<___C_h_a_r_T_,_ ___T_r_a_i_t_s_>_:_: │ │ │ │ +483_ _p_b_a_c_k_f_a_i_l(int_type __i) │ │ │ │ +484 { │ │ │ │ +485 int_type _____r_e_t = traits_type::eof(); │ │ │ │ +486 const bool _____t_e_s_t_i_n = _M_mode & _i_o_s___b_a_s_e_:_:_i_n; │ │ │ │ +487 if (_____t_e_s_t_i_n) │ │ │ │ +488 { │ │ │ │ +489 if (_M_writing) │ │ │ │ +490 { │ │ │ │ +491 if (overflow() == traits_type::eof()) │ │ │ │ +492 return _____r_e_t; │ │ │ │ +493 _M_set_buffer(-1); │ │ │ │ +494 _M_writing = false; │ │ │ │ +495 } │ │ │ │ +496 // Remember whether the pback buffer is active, otherwise below │ │ │ │ +497 // we may try to store in it a second char (libstdc++/9761). │ │ │ │ +498 const bool _____t_e_s_t_p_b = _M_pback_init; │ │ │ │ +499 const bool _____t_e_s_t_e_o_f = traits_type::eq_int_type(__i, _____r_e_t); │ │ │ │ +500 int_type _____t_m_p; │ │ │ │ +501 if (this->eback() < this->gptr()) │ │ │ │ +502 { │ │ │ │ +503 this->gbump(-1); │ │ │ │ +504 _____t_m_p = traits_type::to_int_type(*this->gptr()); │ │ │ │ +505 } │ │ │ │ +506 else if (this->seekoff(-1, _i_o_s___b_a_s_e_:_:_c_u_r) != pos_type(off_type(-1))) │ │ │ │ +507 { │ │ │ │ +508 _____t_m_p = this->underflow(); │ │ │ │ +509 if (traits_type::eq_int_type(_____t_m_p, _____r_e_t)) │ │ │ │ +510 return _____r_e_t; │ │ │ │ +511 } │ │ │ │ +512 else │ │ │ │ +513 { │ │ │ │ +514 // At the beginning of the buffer, need to make a │ │ │ │ +515 // putback position available. But the seek may fail │ │ │ │ +516 // (f.i., at the beginning of a file, see │ │ │ │ +517 // libstdc++/9439) and in that case we return │ │ │ │ +518 // traits_type::eof(). │ │ │ │ +519 return _____r_e_t; │ │ │ │ +520 } │ │ │ │ +521 │ │ │ │ +522 // Try to put back __i into input sequence in one of three ways. │ │ │ │ +523 // Order these tests done in is unspecified by the standard. │ │ │ │ +524 if (!_____t_e_s_t_e_o_f && traits_type::eq_int_type(__i, _____t_m_p)) │ │ │ │ +525 _____r_e_t = __i; │ │ │ │ +526 else if (_____t_e_s_t_e_o_f) │ │ │ │ +527 _____r_e_t = traits_type::not_eof(__i); │ │ │ │ +528 else if (!_____t_e_s_t_p_b) │ │ │ │ +529 { │ │ │ │ +530 _M_create_pback(); │ │ │ │ +531 _M_reading = true; │ │ │ │ +532 *this->gptr() = traits_type::to_char_type(__i); │ │ │ │ +533 _____r_e_t = __i; │ │ │ │ +534 } │ │ │ │ +535 } │ │ │ │ +536 return _____r_e_t; │ │ │ │ +537 } │ │ │ │ +538 │ │ │ │ +539 template │ │ │ │ +540 typename basic_filebuf<_CharT, _Traits>::int_type │ │ │ │ +_5_4_1 _b_a_s_i_c___f_i_l_e_b_u_f_<___C_h_a_r_T_,_ ___T_r_a_i_t_s_>_:_: │ │ │ │ +542_ _o_v_e_r_f_l_o_w(int_type __c) │ │ │ │ +543 { │ │ │ │ +544 int_type _____r_e_t = traits_type::eof(); │ │ │ │ +545 const bool _____t_e_s_t_e_o_f = traits_type::eq_int_type(__c, _____r_e_t); │ │ │ │ +546 const bool _____t_e_s_t_o_u_t = (_M_mode & _i_o_s___b_a_s_e_:_:_o_u_t │ │ │ │ +547 || _M_mode & _i_o_s___b_a_s_e_:_:_a_p_p); │ │ │ │ +548 if (_____t_e_s_t_o_u_t) │ │ │ │ +549 { │ │ │ │ +550 if (_M_reading) │ │ │ │ +551 { │ │ │ │ +552 _M_destroy_pback(); │ │ │ │ +553 const int _____g_p_t_r___o_f_f = _M_get_ext_pos(_M_state_last); │ │ │ │ +554 if (_M_seek(_____g_p_t_r___o_f_f, _i_o_s___b_a_s_e_:_:_c_u_r, _M_state_last) │ │ │ │ +555 == pos_type(off_type(-1))) │ │ │ │ +556 return _____r_e_t; │ │ │ │ +557 } │ │ │ │ +558 if (this->pbase() < this->pptr()) │ │ │ │ +559 { │ │ │ │ +560 // If appropriate, append the overflow char. │ │ │ │ +561 if (!_____t_e_s_t_e_o_f) │ │ │ │ +562 { │ │ │ │ +563 *this->pptr() = traits_type::to_char_type(__c); │ │ │ │ +564 this->pbump(1); │ │ │ │ +565 } │ │ │ │ +566 │ │ │ │ +567 // Convert pending sequence to external representation, │ │ │ │ +568 // and output. │ │ │ │ +569 if (_M_convert_to_external(this->pbase(), │ │ │ │ +570 this->pptr() - this->pbase())) │ │ │ │ +571 { │ │ │ │ +572 _M_set_buffer(0); │ │ │ │ +573 _____r_e_t = traits_type::not_eof(__c); │ │ │ │ +574 } │ │ │ │ +575 } │ │ │ │ +576 else if (_M_buf_size > 1) │ │ │ │ +577 { │ │ │ │ +578 // Overflow in 'uncommitted' mode: set _M_writing, set │ │ │ │ +579 // the buffer to the initial 'write' mode, and put __c │ │ │ │ +580 // into the buffer. │ │ │ │ +581 _M_set_buffer(0); │ │ │ │ +582 _M_writing = true; │ │ │ │ +583 if (!_____t_e_s_t_e_o_f) │ │ │ │ +584 { │ │ │ │ +585 *this->pptr() = traits_type::to_char_type(__c); │ │ │ │ +586 this->pbump(1); │ │ │ │ +587 } │ │ │ │ +588 _____r_e_t = traits_type::not_eof(__c); │ │ │ │ +589 } │ │ │ │ +590 else │ │ │ │ +591 { │ │ │ │ +592 // Unbuffered. │ │ │ │ +593 char_type _____c_o_n_v = traits_type::to_char_type(__c); │ │ │ │ +594 if (_____t_e_s_t_e_o_f || _M_convert_to_external(&_____c_o_n_v, 1)) │ │ │ │ +595 { │ │ │ │ +596 _M_writing = true; │ │ │ │ +597 _____r_e_t = traits_type::not_eof(__c); │ │ │ │ +598 } │ │ │ │ +599 } │ │ │ │ +600 } │ │ │ │ +601 return _____r_e_t; │ │ │ │ +602 } │ │ │ │ +603 │ │ │ │ +604 template │ │ │ │ +605 bool │ │ │ │ +606 _b_a_s_i_c___f_i_l_e_b_u_f_<___C_h_a_r_T_,_ ___T_r_a_i_t_s_>_:_: │ │ │ │ +607_ ___M___c_o_n_v_e_r_t___t_o___e_x_t_e_r_n_a_l(_CharT* _____i_b_u_f, _s_t_r_e_a_m_s_i_z_e _____i_l_e_n) │ │ │ │ +608 { │ │ │ │ +609 // Sizes of external and pending output. │ │ │ │ +610 _s_t_r_e_a_m_s_i_z_e _____e_l_e_n; │ │ │ │ +611 _s_t_r_e_a_m_s_i_z_e _____p_l_e_n; │ │ │ │ +612 if (__check_facet(_M_codecvt).always_noconv()) │ │ │ │ +613 { │ │ │ │ +614 _____e_l_e_n = _M_file.xsputn(reinterpret_cast(_____i_b_u_f), _____i_l_e_n); │ │ │ │ +615 _____p_l_e_n = _____i_l_e_n; │ │ │ │ +616 } │ │ │ │ +617 else │ │ │ │ +618 { │ │ │ │ +619 // Worst-case number of external bytes needed. │ │ │ │ +620 // XXX Not done encoding() == -1. │ │ │ │ +621 _s_t_r_e_a_m_s_i_z_e __blen = __ilen * _M_codecvt->max_length(); │ │ │ │ +622 char* __buf = static_cast(__builtin_alloca(__blen)); │ │ │ │ 623 │ │ │ │ -624 /** Takes ownership of a pointer. │ │ │ │ -625 * │ │ │ │ -626 * @param __p A pointer to an array of a type safely convertible │ │ │ │ -627 * to an array of @c element_type │ │ │ │ -628 * @param __d A reference to a deleter. │ │ │ │ -629 * │ │ │ │ -630 * The deleter will be initialized with @p std::move(__d) │ │ │ │ -631 */ │ │ │ │ -632 template, │ │ │ │ -634 _i_s___m_o_v_e___c_o_n_s_t_r_u_c_t_i_b_l_e_<___D_e_l_>>> │ │ │ │ -635 ___G_L_I_B_C_X_X_2_3___C_O_N_S_T_E_X_P_R │ │ │ │ -_6_3_6 _u_n_i_q_u_e___p_t_r(_Up __p, │ │ │ │ -637 _____e_n_a_b_l_e___i_f___t_:_:_v_a_l_u_e, │ │ │ │ -638 ___D_e_l&&> __d) noexcept │ │ │ │ -639 : _M_t(_s_t_d_:_:_m_o_v_e(__p), _s_t_d_:_:_m_o_v_e(__d)) │ │ │ │ -640 { } │ │ │ │ +624 char* __bend; │ │ │ │ +625 const char_type* __iend; │ │ │ │ +626 codecvt_base::result __r; │ │ │ │ +627 __r = _M_codecvt->out(_M_state_cur, __ibuf, __ibuf + __ilen, │ │ │ │ +628 __iend, __buf, __buf + __blen, __bend); │ │ │ │ +629 │ │ │ │ +630 if (__r == codecvt_base::ok || __r == codecvt_base::partial) │ │ │ │ +631 __blen = __bend - __buf; │ │ │ │ +632 else if (__r == codecvt_base::noconv) │ │ │ │ +633 { │ │ │ │ +634 // Same as the always_noconv case above. │ │ │ │ +635 __buf = reinterpret_cast(__ibuf); │ │ │ │ +636 __blen = __ilen; │ │ │ │ +637 } │ │ │ │ +638 else │ │ │ │ +639 __throw_ios_failure(__N("basic_filebuf::_M_convert_to_external " │ │ │ │ +640 "conversion error")); │ │ │ │ 641 │ │ │ │ -642 template::type, │ │ │ │ -644 typename = ___R_e_q_u_i_r_e_<_____s_a_f_e___c_o_n_v_e_r_s_i_o_n___r_a_w_<___U_p_>>> │ │ │ │ -645 _u_n_i_q_u_e___p_t_r(_Up, │ │ │ │ -646 _____e_n_a_b_l_e___i_f___t<_i_s___l_v_a_l_u_e___r_e_f_e_r_e_n_c_e_<___D_e_l_>_:_:_v_a_l_u_e, │ │ │ │ -647 ___D_e_l_U_n_r_e_f&&>) = delete; │ │ │ │ -648 │ │ │ │ -649 /// Move constructor. │ │ │ │ -_6_5_0 _u_n_i_q_u_e___p_t_r(_u_n_i_q_u_e___p_t_r&&) = default; │ │ │ │ -651 │ │ │ │ -652 /// Creates a unique_ptr that owns nothing. │ │ │ │ -653 template> │ │ │ │ -_6_5_4 constexpr _u_n_i_q_u_e___p_t_r(_n_u_l_l_p_t_r___t) noexcept │ │ │ │ -655 : _M_t() │ │ │ │ -656 { } │ │ │ │ -657 │ │ │ │ -658 template, │ │ │ │ -660 _____c_o_n_d_i_t_i_o_n_a_l___t_<_i_s___r_e_f_e_r_e_n_c_e_<___D_p_>_:_:_v_a_l_u_e, │ │ │ │ -661 _i_s___s_a_m_e_<___E_p_,_ ___D_p_>, │ │ │ │ -662 _i_s___c_o_n_v_e_r_t_i_b_l_e_<___E_p_,_ ___D_p_>>>> │ │ │ │ -663 ___G_L_I_B_C_X_X_2_3___C_O_N_S_T_E_X_P_R │ │ │ │ -664 _u_n_i_q_u_e___p_t_r(_u_n_i_q_u_e___p_t_r_<___U_p_,_ ___E_p_>&& _____u) noexcept │ │ │ │ -665 : _M_t(_____u.release(), _s_t_d_:_:_f_o_r_w_a_r_d_<___E_p_>(_____u.get_deleter())) │ │ │ │ -666 { } │ │ │ │ -667 │ │ │ │ -668 /// Destructor, invokes the deleter if the stored pointer is not null. │ │ │ │ -669#if __cplusplus > 202002L && __cpp_constexpr_dynamic_alloc │ │ │ │ -670 constexpr │ │ │ │ -671#endif │ │ │ │ -_6_7_2 _~_u_n_i_q_u_e___p_t_r() │ │ │ │ -673 { │ │ │ │ -674 auto& _____p_t_r = _M_t._M_ptr(); │ │ │ │ -675 if (_____p_t_r != nullptr) │ │ │ │ -676 _g_e_t___d_e_l_e_t_e_r()(_____p_t_r); │ │ │ │ -677 _____p_t_r = pointer(); │ │ │ │ -678 } │ │ │ │ -679 │ │ │ │ -680 // Assignment. │ │ │ │ -681 │ │ │ │ -682 /** @brief Move assignment operator. │ │ │ │ -683 * │ │ │ │ -684 * Invokes the deleter if this object owns a pointer. │ │ │ │ -685 */ │ │ │ │ -686 _u_n_i_q_u_e___p_t_r& │ │ │ │ -_6_8_7 _o_p_e_r_a_t_o_r_=(_u_n_i_q_u_e___p_t_r&&) = default; │ │ │ │ -688 │ │ │ │ -689 /** @brief Assignment from another type. │ │ │ │ -690 * │ │ │ │ -691 * @param __u The object to transfer ownership from, which owns a │ │ │ │ -692 * convertible pointer to an array object. │ │ │ │ -693 * │ │ │ │ -694 * Invokes the deleter if this object owns a pointer. │ │ │ │ -695 */ │ │ │ │ -696 template │ │ │ │ -697 ___G_L_I_B_C_X_X_2_3___C_O_N_S_T_E_X_P_R │ │ │ │ -698 typename │ │ │ │ -699 _e_n_a_b_l_e___i_f_<_____a_n_d___<_____s_a_f_e___c_o_n_v_e_r_s_i_o_n___u_p_<___U_p_,_ ___E_p_>, │ │ │ │ -700 _i_s___a_s_s_i_g_n_a_b_l_e_<_d_e_l_e_t_e_r___t_y_p_e_&_,_ ___E_p_&_&_> │ │ │ │ -701 >::value, │ │ │ │ -702 _u_n_i_q_u_e___p_t_r&>::type │ │ │ │ -_7_0_3 _o_p_e_r_a_t_o_r_=(_u_n_i_q_u_e___p_t_r_<___U_p_,_ ___E_p_>&& _____u) noexcept │ │ │ │ -704 { │ │ │ │ -705 _r_e_s_e_t(_____u.release()); │ │ │ │ -706 _g_e_t___d_e_l_e_t_e_r() = _s_t_d_:_:_f_o_r_w_a_r_d_<___E_p_>(_____u.get_deleter()); │ │ │ │ -707 return *this; │ │ │ │ -708 } │ │ │ │ -709 │ │ │ │ -710 /// Reset the %unique_ptr to empty, invoking the deleter if necessary. │ │ │ │ -711 ___G_L_I_B_C_X_X_2_3___C_O_N_S_T_E_X_P_R │ │ │ │ -712 _u_n_i_q_u_e___p_t_r& │ │ │ │ -_7_1_3 _o_p_e_r_a_t_o_r_=(_n_u_l_l_p_t_r___t) noexcept │ │ │ │ -714 { │ │ │ │ -715 _r_e_s_e_t(); │ │ │ │ -716 return *this; │ │ │ │ -717 } │ │ │ │ -718 │ │ │ │ -719 // Observers. │ │ │ │ -720 │ │ │ │ -721 /// Access an element of owned array. │ │ │ │ -722 ___G_L_I_B_C_X_X_2_3___C_O_N_S_T_E_X_P_R │ │ │ │ -723 typename std::add_lvalue_reference::type │ │ │ │ -_7_2_4 _o_p_e_r_a_t_o_r_[_](size_t __i) const │ │ │ │ -725 { │ │ │ │ -726 __glibcxx_assert(_g_e_t() != pointer()); │ │ │ │ -727 return _g_e_t()[__i]; │ │ │ │ -728 } │ │ │ │ +642 __elen = _M_file.xsputn(__buf, __blen); │ │ │ │ +643 __plen = __blen; │ │ │ │ +644 │ │ │ │ +645 // Try once more for partial conversions. │ │ │ │ +646 if (__r == codecvt_base::partial && __elen == __plen) │ │ │ │ +647 { │ │ │ │ +648 const char_type* __iresume = __iend; │ │ │ │ +649 _s_t_r_e_a_m_s_i_z_e __rlen = this->pptr() - __iend; │ │ │ │ +650 __r = _M_codecvt->out(_M_state_cur, __iresume, │ │ │ │ +651 __iresume + __rlen, __iend, __buf, │ │ │ │ +652 __buf + __blen, __bend); │ │ │ │ +653 if (__r != codecvt_base::error) │ │ │ │ +654 { │ │ │ │ +655 __rlen = __bend - __buf; │ │ │ │ +656 __elen = _M_file.xsputn(__buf, __rlen); │ │ │ │ +657 __plen = __rlen; │ │ │ │ +658 } │ │ │ │ +659 else │ │ │ │ +660 __throw_ios_failure(__N("basic_filebuf::_M_convert_to_external " │ │ │ │ +661 "conversion error")); │ │ │ │ +662 } │ │ │ │ +663 } │ │ │ │ +664 return __elen == __plen; │ │ │ │ +665 } │ │ │ │ +666 │ │ │ │ +667 template │ │ │ │ +668 _s_t_r_e_a_m_s_i_z_e │ │ │ │ +_6_6_9 _b_a_s_i_c___f_i_l_e_b_u_f_<___C_h_a_r_T_,_ ___T_r_a_i_t_s_>_:_: │ │ │ │ +670_ _x_s_g_e_t_n(_CharT* _____s, _s_t_r_e_a_m_s_i_z_e __n) │ │ │ │ +671 { │ │ │ │ +672 // Clear out pback buffer before going on to the real deal... │ │ │ │ +673 _s_t_r_e_a_m_s_i_z_e _____r_e_t = 0; │ │ │ │ +674 if (_M_pback_init) │ │ │ │ +675 { │ │ │ │ +676 if (__n > 0 && this->gptr() == this->eback()) │ │ │ │ +677 { │ │ │ │ +678 *_____s++ = *this->gptr(); // emulate non-underflowing sbumpc │ │ │ │ +679 this->gbump(1); │ │ │ │ +680 _____r_e_t = 1; │ │ │ │ +681 --__n; │ │ │ │ +682 } │ │ │ │ +683 _M_destroy_pback(); │ │ │ │ +684 } │ │ │ │ +685 else if (_M_writing) │ │ │ │ +686 { │ │ │ │ +687 if (overflow() == traits_type::eof()) │ │ │ │ +688 return _____r_e_t; │ │ │ │ +689 _M_set_buffer(-1); │ │ │ │ +690 _M_writing = false; │ │ │ │ +691 } │ │ │ │ +692 │ │ │ │ +693 // Optimization in the always_noconv() case, to be generalized in the │ │ │ │ +694 // future: when __n > __buflen we read directly instead of using the │ │ │ │ +695 // buffer repeatedly. │ │ │ │ +696 const bool _____t_e_s_t_i_n = _M_mode & _i_o_s___b_a_s_e_:_:_i_n; │ │ │ │ +697 const _s_t_r_e_a_m_s_i_z_e _____b_u_f_l_e_n = _M_buf_size > 1 ? _M_buf_size - 1 : 1; │ │ │ │ +698 │ │ │ │ +699 if (__n > _____b_u_f_l_e_n && __check_facet(_M_codecvt).always_noconv() │ │ │ │ +700 && _____t_e_s_t_i_n) │ │ │ │ +701 { │ │ │ │ +702 // First, copy the chars already present in the buffer. │ │ │ │ +703 const _s_t_r_e_a_m_s_i_z_e _____a_v_a_i_l = this->egptr() - this->gptr(); │ │ │ │ +704 if (_____a_v_a_i_l != 0) │ │ │ │ +705 { │ │ │ │ +706 traits_type::copy(_____s, this->gptr(), _____a_v_a_i_l); │ │ │ │ +707 _____s += _____a_v_a_i_l; │ │ │ │ +708 this->setg(this->eback(), this->gptr() + _____a_v_a_i_l, this->egptr()); │ │ │ │ +709 _____r_e_t += _____a_v_a_i_l; │ │ │ │ +710 __n -= _____a_v_a_i_l; │ │ │ │ +711 } │ │ │ │ +712 │ │ │ │ +713 // Need to loop in case of short reads (relatively common │ │ │ │ +714 // with pipes). │ │ │ │ +715 _s_t_r_e_a_m_s_i_z_e _____l_e_n; │ │ │ │ +716 for (;;) │ │ │ │ +717 { │ │ │ │ +718 _____l_e_n = _M_file.xsgetn(reinterpret_cast(_____s), __n); │ │ │ │ +719 if (_____l_e_n == -1) │ │ │ │ +720 __throw_ios_failure(__N("basic_filebuf::xsgetn " │ │ │ │ +721 "error reading the file"), errno); │ │ │ │ +722 if (_____l_e_n == 0) │ │ │ │ +723 break; │ │ │ │ +724 │ │ │ │ +725 __n -= _____l_e_n; │ │ │ │ +726 _____r_e_t += _____l_e_n; │ │ │ │ +727 if (__n == 0) │ │ │ │ +728 break; │ │ │ │ 729 │ │ │ │ -730 /// Return the stored pointer. │ │ │ │ -731 ___G_L_I_B_C_X_X_2_3___C_O_N_S_T_E_X_P_R │ │ │ │ -732 pointer │ │ │ │ -_7_3_3 _g_e_t() const noexcept │ │ │ │ -734 { return _M_t._M_ptr(); } │ │ │ │ -735 │ │ │ │ -736 /// Return a reference to the stored deleter. │ │ │ │ -737 ___G_L_I_B_C_X_X_2_3___C_O_N_S_T_E_X_P_R │ │ │ │ -738 deleter_type& │ │ │ │ -_7_3_9 _g_e_t___d_e_l_e_t_e_r() noexcept │ │ │ │ -740 { return _M_t._M_deleter(); } │ │ │ │ -741 │ │ │ │ -742 /// Return a reference to the stored deleter. │ │ │ │ -743 ___G_L_I_B_C_X_X_2_3___C_O_N_S_T_E_X_P_R │ │ │ │ -744 const deleter_type& │ │ │ │ -_7_4_5 _g_e_t___d_e_l_e_t_e_r() const noexcept │ │ │ │ -746 { return _M_t._M_deleter(); } │ │ │ │ -747 │ │ │ │ -748 /// Return @c true if the stored pointer is not null. │ │ │ │ -749 ___G_L_I_B_C_X_X_2_3___C_O_N_S_T_E_X_P_R │ │ │ │ -_7_5_0 explicit operator bool() const noexcept │ │ │ │ -751 { return _g_e_t() == pointer() ? _f_a_l_s_e : true; } │ │ │ │ +730 _____s += _____l_e_n; │ │ │ │ +731 } │ │ │ │ +732 │ │ │ │ +733 if (__n == 0) │ │ │ │ +734 { │ │ │ │ +735 // Set _M_reading. Buffer is already in initial 'read' mode. │ │ │ │ +736 _M_reading = true; │ │ │ │ +737 } │ │ │ │ +738 else if (_____l_e_n == 0) │ │ │ │ +739 { │ │ │ │ +740 // If end of file is reached, set 'uncommitted' │ │ │ │ +741 // mode, thus allowing an immediate write without │ │ │ │ +742 // an intervening seek. │ │ │ │ +743 _M_set_buffer(-1); │ │ │ │ +744 _M_reading = false; │ │ │ │ +745 } │ │ │ │ +746 } │ │ │ │ +747 else │ │ │ │ +748 _____r_e_t += __streambuf_type::xsgetn(_____s, __n); │ │ │ │ +749 │ │ │ │ +750 return _____r_e_t; │ │ │ │ +751 } │ │ │ │ 752 │ │ │ │ -753 // Modifiers. │ │ │ │ -754 │ │ │ │ -755 /// Release ownership of any stored pointer. │ │ │ │ -756 ___G_L_I_B_C_X_X_2_3___C_O_N_S_T_E_X_P_R │ │ │ │ -757 pointer │ │ │ │ -_7_5_8 _r_e_l_e_a_s_e() noexcept │ │ │ │ -759 { return _M_t.release(); } │ │ │ │ -760 │ │ │ │ -761 /** @brief Replace the stored pointer. │ │ │ │ -762 * │ │ │ │ -763 * @param __p The new pointer to store. │ │ │ │ -764 * │ │ │ │ -765 * The deleter will be invoked if a pointer is already owned. │ │ │ │ -766 */ │ │ │ │ -767 template , │ │ │ │ -770 _____a_n_d___<_i_s___s_a_m_e_<_p_o_i_n_t_e_r_,_ _e_l_e_m_e_n_t___t_y_p_e_*_>, │ │ │ │ -771 _i_s___p_o_i_n_t_e_r_<___U_p_>, │ │ │ │ -772 _i_s___c_o_n_v_e_r_t_i_b_l_e< │ │ │ │ -773 typename remove_pointer<_Up>::type(*)[], │ │ │ │ -774 element_type(*)[] │ │ │ │ -775 > │ │ │ │ -776 > │ │ │ │ -777 > │ │ │ │ -778 >> │ │ │ │ -779 ___G_L_I_B_C_X_X_2_3___C_O_N_S_T_E_X_P_R │ │ │ │ -780 void │ │ │ │ -_7_8_1 _r_e_s_e_t(_Up __p) noexcept │ │ │ │ -782 { _M_t.reset(_s_t_d_:_:_m_o_v_e(__p)); } │ │ │ │ -783 │ │ │ │ -784 ___G_L_I_B_C_X_X_2_3___C_O_N_S_T_E_X_P_R │ │ │ │ -785 void _r_e_s_e_t(nullptr_t = nullptr) noexcept │ │ │ │ -786 { _r_e_s_e_t(pointer()); } │ │ │ │ -787 │ │ │ │ -788 /// Exchange the pointer and deleter with another object. │ │ │ │ -789 _GLIBCXX23_CONSTEXPR │ │ │ │ -790 void │ │ │ │ -_7_9_1 _s_w_a_p(_u_n_i_q_u_e___p_t_r& _____u) noexcept │ │ │ │ -792 { │ │ │ │ -793 static_assert(_____i_s___s_w_a_p_p_a_b_l_e_<___D_p_>_:_:_v_a_l_u_e, "deleter must be swappable"); │ │ │ │ -794 _M_t.swap(_____u._M_t); │ │ │ │ +753 template │ │ │ │ +754 _s_t_r_e_a_m_s_i_z_e │ │ │ │ +_7_5_5 _b_a_s_i_c___f_i_l_e_b_u_f_<___C_h_a_r_T_,_ ___T_r_a_i_t_s_>_:_: │ │ │ │ +756_ _x_s_p_u_t_n(const _CharT* _____s, _s_t_r_e_a_m_s_i_z_e __n) │ │ │ │ +757 { │ │ │ │ +758 _s_t_r_e_a_m_s_i_z_e _____r_e_t = 0; │ │ │ │ +759 // Optimization in the always_noconv() case, to be generalized in the │ │ │ │ +760 // future: when __n is sufficiently large we write directly instead of │ │ │ │ +761 // using the buffer. │ │ │ │ +762 const bool _____t_e_s_t_o_u_t = (_M_mode & _i_o_s___b_a_s_e_:_:_o_u_t │ │ │ │ +763 || _M_mode & _i_o_s___b_a_s_e_:_:_a_p_p); │ │ │ │ +764 if (__check_facet(_M_codecvt).always_noconv() │ │ │ │ +765 && _____t_e_s_t_o_u_t && !_M_reading) │ │ │ │ +766 { │ │ │ │ +767 // Measurement would reveal the best choice. │ │ │ │ +768 const _s_t_r_e_a_m_s_i_z_e _____c_h_u_n_k = 1ul << 10; │ │ │ │ +769 _s_t_r_e_a_m_s_i_z_e _____b_u_f_a_v_a_i_l = this->epptr() - this->pptr(); │ │ │ │ +770 │ │ │ │ +771 // Don't mistake 'uncommitted' mode buffered with unbuffered. │ │ │ │ +772 if (!_M_writing && _M_buf_size > 1) │ │ │ │ +773 _____b_u_f_a_v_a_i_l = _M_buf_size - 1; │ │ │ │ +774 │ │ │ │ +775 const _s_t_r_e_a_m_s_i_z_e _____l_i_m_i_t = _s_t_d_:_:_m_i_n(_____c_h_u_n_k, _____b_u_f_a_v_a_i_l); │ │ │ │ +776 if (__n >= _____l_i_m_i_t) │ │ │ │ +777 { │ │ │ │ +778 const _s_t_r_e_a_m_s_i_z_e _____b_u_f_f_i_l_l = this->pptr() - this->pbase(); │ │ │ │ +779 const char* _____b_u_f = reinterpret_cast(this->pbase()); │ │ │ │ +780 _____r_e_t = _M_file.xsputn_2(_____b_u_f, _____b_u_f_f_i_l_l, │ │ │ │ +781 reinterpret_cast(_____s), │ │ │ │ +782 __n); │ │ │ │ +783 if (_____r_e_t == _____b_u_f_f_i_l_l + __n) │ │ │ │ +784 { │ │ │ │ +785 _M_set_buffer(0); │ │ │ │ +786 _M_writing = true; │ │ │ │ +787 } │ │ │ │ +788 if (_____r_e_t > _____b_u_f_f_i_l_l) │ │ │ │ +789 _____r_e_t -= _____b_u_f_f_i_l_l; │ │ │ │ +790 else │ │ │ │ +791 _____r_e_t = 0; │ │ │ │ +792 } │ │ │ │ +793 else │ │ │ │ +794 _____r_e_t = __streambuf_type::xsputn(_____s, __n); │ │ │ │ 795 } │ │ │ │ -796 │ │ │ │ -797 // Disable copy from lvalue. │ │ │ │ -798 _u_n_i_q_u_e___p_t_r(const _u_n_i_q_u_e___p_t_r&) = delete; │ │ │ │ -799 _u_n_i_q_u_e___p_t_r& _o_p_e_r_a_t_o_r_=(const _u_n_i_q_u_e___p_t_r&) = delete; │ │ │ │ -800 }; │ │ │ │ -801 │ │ │ │ -802 /// @{ │ │ │ │ -803 /// @relates unique_ptr │ │ │ │ -804 │ │ │ │ -805 /// Swap overload for unique_ptr │ │ │ │ -806 template │ │ │ │ -807 inline │ │ │ │ -808#if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11 │ │ │ │ -809 // Constrained free swap overload, see p0185r1 │ │ │ │ -810 _GLIBCXX23_CONSTEXPR │ │ │ │ -811 typename enable_if<__is_swappable<_Dp>::value>::type │ │ │ │ -812#else │ │ │ │ -813 void │ │ │ │ -814#endif │ │ │ │ -_8_1_5 _s_w_a_p(_u_n_i_q_u_e___p_t_r_<___T_p_,_ ___D_p_>& __x, │ │ │ │ -816 _u_n_i_q_u_e___p_t_r_<___T_p_,_ ___D_p_>& __y) noexcept │ │ │ │ -817 { __x.swap(__y); } │ │ │ │ -818 │ │ │ │ -819#if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11 │ │ │ │ -820 template │ │ │ │ -821 typename _e_n_a_b_l_e___i_f_<_!_____i_s___s_w_a_p_p_a_b_l_e_<___D_p_>_:_:_v_a_l_u_e>::type │ │ │ │ -822 _s_w_a_p(_u_n_i_q_u_e___p_t_r_<___T_p_,_ ___D_p_>&, │ │ │ │ -823 _u_n_i_q_u_e___p_t_r_<___T_p_,_ ___D_p_>&) = delete; │ │ │ │ -824#endif │ │ │ │ -825 │ │ │ │ -826 /// Equality operator for unique_ptr objects, compares the owned pointers │ │ │ │ -827 template │ │ │ │ -829 _GLIBCXX_NODISCARD ___G_L_I_B_C_X_X_2_3___C_O_N_S_T_E_X_P_R │ │ │ │ -830 inline bool │ │ │ │ -_8_3_1 operator==(const _u_n_i_q_u_e___p_t_r_<___T_p_,_ ___D_p_>& __x, │ │ │ │ -832 const _u_n_i_q_u_e___p_t_r_<___U_p_,_ ___E_p_>& __y) │ │ │ │ -833 { return __x.get() == __y.get(); } │ │ │ │ -834 │ │ │ │ -835 /// unique_ptr comparison with nullptr │ │ │ │ -836 template │ │ │ │ -837 _GLIBCXX_NODISCARD _GLIBCXX23_CONSTEXPR │ │ │ │ -838 inline bool │ │ │ │ -_8_3_9 operator==(const _u_n_i_q_u_e___p_t_r_<___T_p_,_ ___D_p_>& __x, nullptr_t) noexcept │ │ │ │ -840 { return !__x; } │ │ │ │ -841 │ │ │ │ -842#ifndef __cpp_lib_three_way_comparison │ │ │ │ -843 /// unique_ptr comparison with nullptr │ │ │ │ -844 template │ │ │ │ -845 _GLIBCXX_NODISCARD │ │ │ │ -846 inline bool │ │ │ │ -_8_4_7 operator==(nullptr_t, const _u_n_i_q_u_e___p_t_r_<___T_p_,_ ___D_p_>& __x) noexcept │ │ │ │ -848 { return !__x; } │ │ │ │ -849 │ │ │ │ -850 /// Inequality operator for unique_ptr objects, compares the owned pointers │ │ │ │ -851 template │ │ │ │ -853 _GLIBCXX_NODISCARD │ │ │ │ -854 inline bool │ │ │ │ -_8_5_5 operator!=(const _u_n_i_q_u_e___p_t_r_<___T_p_,_ ___D_p_>& __x, │ │ │ │ -856 const _u_n_i_q_u_e___p_t_r_<___U_p_,_ ___E_p_>& __y) │ │ │ │ -857 { return __x.get() != __y.get(); } │ │ │ │ -858 │ │ │ │ -859 /// unique_ptr comparison with nullptr │ │ │ │ -860 template │ │ │ │ -861 _GLIBCXX_NODISCARD │ │ │ │ -862 inline bool │ │ │ │ -_8_6_3 operator!=(const _u_n_i_q_u_e___p_t_r_<___T_p_,_ ___D_p_>& __x, nullptr_t) noexcept │ │ │ │ -864 { return (bool)__x; } │ │ │ │ -865 │ │ │ │ -866 /// unique_ptr comparison with nullptr │ │ │ │ -867 template │ │ │ │ -868 _GLIBCXX_NODISCARD │ │ │ │ -869 inline bool │ │ │ │ -_8_7_0 operator!=(nullptr_t, const _u_n_i_q_u_e___p_t_r_<___T_p_,_ ___D_p_>& __x) noexcept │ │ │ │ -871 { return (bool)__x; } │ │ │ │ -872#endif // three way comparison │ │ │ │ -873 │ │ │ │ -874 /// Relational operator for unique_ptr objects, compares the owned pointers │ │ │ │ -875 template │ │ │ │ -877 _GLIBCXX_NODISCARD _GLIBCXX23_CONSTEXPR │ │ │ │ -_8_7_8 inline bool │ │ │ │ -879 operator<(const _u_n_i_q_u_e___p_t_r_<___T_p_,_ ___D_p_>& __x, │ │ │ │ -880 const _u_n_i_q_u_e___p_t_r_<___U_p_,_ ___E_p_>& __y) │ │ │ │ -881 { │ │ │ │ -882 typedef typename │ │ │ │ -883 _s_t_d_:_:_c_o_m_m_o_n___t_y_p_e_<_t_y_p_e_n_a_m_e_ _u_n_i_q_u_e___p_t_r_<___T_p_,_ ___D_p_>_:_:_p_o_i_n_t_e_r, │ │ │ │ -884 typename unique_ptr<_Up, _Ep>::pointer>::type ___C_T; │ │ │ │ -885 return _s_t_d_:_:_l_e_s_s_<___C_T_>()(__x.get(), __y.get()); │ │ │ │ -886 } │ │ │ │ -887 │ │ │ │ -888 /// unique_ptr comparison with nullptr │ │ │ │ -889 template │ │ │ │ -890 _GLIBCXX_NODISCARD _GLIBCXX23_CONSTEXPR │ │ │ │ -_8_9_1 inline bool │ │ │ │ -892 operator<(const _u_n_i_q_u_e___p_t_r_<___T_p_,_ ___D_p_>& __x, nullptr_t) │ │ │ │ -893 { │ │ │ │ -894 return _s_t_d_:_:_l_e_s_s_<_t_y_p_e_n_a_m_e_ _u_n_i_q_u_e___p_t_r_<___T_p_,_ ___D_p_>_:_:_p_o_i_n_t_e_r>()(__x.get(), │ │ │ │ -895 nullptr); │ │ │ │ -896 } │ │ │ │ -897 │ │ │ │ -898 /// unique_ptr comparison with nullptr │ │ │ │ -899 template │ │ │ │ -900 _GLIBCXX_NODISCARD _GLIBCXX23_CONSTEXPR │ │ │ │ -_9_0_1 inline bool │ │ │ │ -902 operator<(nullptr_t, const _u_n_i_q_u_e___p_t_r_<___T_p_,_ ___D_p_>& __x) │ │ │ │ -903 { │ │ │ │ -904 return _s_t_d_:_:_l_e_s_s_<_t_y_p_e_n_a_m_e_ _u_n_i_q_u_e___p_t_r_<___T_p_,_ ___D_p_>_:_:_p_o_i_n_t_e_r>()(nullptr, │ │ │ │ -905 __x.get()); │ │ │ │ -906 } │ │ │ │ -907 │ │ │ │ -908 /// Relational operator for unique_ptr objects, compares the owned pointers │ │ │ │ -909 template │ │ │ │ -911 _GLIBCXX_NODISCARD _GLIBCXX23_CONSTEXPR │ │ │ │ -_9_1_2 inline bool │ │ │ │ -913 operator<=(const _u_n_i_q_u_e___p_t_r_<___T_p_,_ ___D_p_>& __x, │ │ │ │ -914 const _u_n_i_q_u_e___p_t_r_<___U_p_,_ ___E_p_>& __y) │ │ │ │ -915 { return !(__y < __x); } │ │ │ │ -916 │ │ │ │ -917 /// unique_ptr comparison with nullptr │ │ │ │ -918 template │ │ │ │ -919 _GLIBCXX_NODISCARD _GLIBCXX23_CONSTEXPR │ │ │ │ -_9_2_0 inline bool │ │ │ │ -921 operator<=(const _u_n_i_q_u_e___p_t_r_<___T_p_,_ ___D_p_>& __x, nullptr_t) │ │ │ │ -922 { return !(nullptr < __x); } │ │ │ │ -923 │ │ │ │ -924 /// unique_ptr comparison with nullptr │ │ │ │ -925 template │ │ │ │ -926 _GLIBCXX_NODISCARD _GLIBCXX23_CONSTEXPR │ │ │ │ -_9_2_7 inline bool │ │ │ │ -928 operator<=(nullptr_t, const _u_n_i_q_u_e___p_t_r_<___T_p_,_ ___D_p_>& __x) │ │ │ │ -929 { return !(__x < nullptr); } │ │ │ │ -930 │ │ │ │ -931 /// Relational operator for unique_ptr objects, compares the owned pointers │ │ │ │ -932 template │ │ │ │ -934 _GLIBCXX_NODISCARD _GLIBCXX23_CONSTEXPR │ │ │ │ -935 inline bool │ │ │ │ -_9_3_6 operator>(const _u_n_i_q_u_e___p_t_r_<___T_p_,_ ___D_p_>& __x, │ │ │ │ -937 const _u_n_i_q_u_e___p_t_r_<___U_p_,_ ___E_p_>& __y) │ │ │ │ -938 { return (__y < __x); } │ │ │ │ -939 │ │ │ │ -940 /// unique_ptr comparison with nullptr │ │ │ │ -941 template │ │ │ │ -942 _GLIBCXX_NODISCARD _GLIBCXX23_CONSTEXPR │ │ │ │ -943 inline bool │ │ │ │ -_9_4_4 operator>(const _u_n_i_q_u_e___p_t_r_<___T_p_,_ ___D_p_>& __x, nullptr_t) │ │ │ │ -945 { │ │ │ │ -946 return _s_t_d_:_:_l_e_s_s_<_t_y_p_e_n_a_m_e_ _u_n_i_q_u_e___p_t_r_<___T_p_,_ ___D_p_>_:_:_p_o_i_n_t_e_r>()(nullptr, │ │ │ │ -947 __x.get()); │ │ │ │ -948 } │ │ │ │ -949 │ │ │ │ -950 /// unique_ptr comparison with nullptr │ │ │ │ -951 template │ │ │ │ -952 _GLIBCXX_NODISCARD _GLIBCXX23_CONSTEXPR │ │ │ │ -953 inline bool │ │ │ │ -_9_5_4 operator>(nullptr_t, const _u_n_i_q_u_e___p_t_r_<___T_p_,_ ___D_p_>& __x) │ │ │ │ -955 { │ │ │ │ -956 return _s_t_d_:_:_l_e_s_s_<_t_y_p_e_n_a_m_e_ _u_n_i_q_u_e___p_t_r_<___T_p_,_ ___D_p_>_:_:_p_o_i_n_t_e_r>()(__x.get(), │ │ │ │ -957 nullptr); │ │ │ │ -958 } │ │ │ │ -959 │ │ │ │ -960 /// Relational operator for unique_ptr objects, compares the owned pointers │ │ │ │ -961 template │ │ │ │ -963 _GLIBCXX_NODISCARD _GLIBCXX23_CONSTEXPR │ │ │ │ -964 inline bool │ │ │ │ -_9_6_5 operator>=(const _u_n_i_q_u_e___p_t_r_<___T_p_,_ ___D_p_>& __x, │ │ │ │ -966 const _u_n_i_q_u_e___p_t_r_<___U_p_,_ ___E_p_>& __y) │ │ │ │ -967 { return !(__x < __y); } │ │ │ │ -968 │ │ │ │ -969 /// unique_ptr comparison with nullptr │ │ │ │ -970 template │ │ │ │ -971 _GLIBCXX_NODISCARD _GLIBCXX23_CONSTEXPR │ │ │ │ -972 inline bool │ │ │ │ -_9_7_3 operator>=(const _u_n_i_q_u_e___p_t_r_<___T_p_,_ ___D_p_>& __x, nullptr_t) │ │ │ │ -974 { return !(__x < nullptr); } │ │ │ │ -975 │ │ │ │ -976 /// unique_ptr comparison with nullptr │ │ │ │ -977 template │ │ │ │ -978 _GLIBCXX_NODISCARD inline bool │ │ │ │ -_9_7_9 operator>=(nullptr_t, const _u_n_i_q_u_e___p_t_r_<___T_p_,_ ___D_p_>& __x) │ │ │ │ -980 { return !(nullptr < __x); } │ │ │ │ -981 │ │ │ │ -982#ifdef __cpp_lib_three_way_comparison │ │ │ │ -983 template │ │ │ │ -984 requires three_way_comparable_with::pointer, │ │ │ │ -985 typename unique_ptr<_Up, _Ep>::pointer> │ │ │ │ -986 _GLIBCXX23_CONSTEXPR │ │ │ │ -987 inline │ │ │ │ -988 compare_three_way_result_t::pointer, │ │ │ │ -989 typename unique_ptr<_Up, _Ep>::pointer> │ │ │ │ -990 operator<=>(const unique_ptr<_Tp, _Dp>& __x, │ │ │ │ -991 const unique_ptr<_Up, _Ep>& __y) │ │ │ │ -992 { return compare_three_way()(__x.get(), __y.get()); } │ │ │ │ -993 │ │ │ │ -994 template │ │ │ │ -995 requires three_way_comparable::pointer> │ │ │ │ -996 _GLIBCXX23_CONSTEXPR │ │ │ │ -997 inline │ │ │ │ -998 compare_three_way_result_t::pointer> │ │ │ │ -999 operator<=>(const unique_ptr<_Tp, _Dp>& __x, nullptr_t) │ │ │ │ -1000 { │ │ │ │ -1001 using pointer = typename unique_ptr<_Tp, _Dp>::pointer; │ │ │ │ -1002 return compare_three_way()(__x.get(), static_cast(nullptr)); │ │ │ │ -1003 } │ │ │ │ -1004#endif │ │ │ │ -1005 /// @} relates unique_ptr │ │ │ │ -1006 │ │ │ │ -1007 /// @cond undocumented │ │ │ │ -1008 template::__enable_hash_call> │ │ │ │ -1010 struct __uniq_ptr_hash │ │ │ │ -1011#if ! _GLIBCXX_INLINE_VERSION │ │ │ │ -1012 : private __poison_hash<_Ptr> │ │ │ │ -1013#endif │ │ │ │ +796 else │ │ │ │ +797 _____r_e_t = __streambuf_type::xsputn(_____s, __n); │ │ │ │ +798 return _____r_e_t; │ │ │ │ +799 } │ │ │ │ +800 │ │ │ │ +801 template │ │ │ │ +802 typename _b_a_s_i_c___f_i_l_e_b_u_f_<___C_h_a_r_T_,_ ___T_r_a_i_t_s_>_:_:_____s_t_r_e_a_m_b_u_f___t_y_p_e* │ │ │ │ +_8_0_3 _b_a_s_i_c___f_i_l_e_b_u_f_<___C_h_a_r_T_,_ ___T_r_a_i_t_s_>_:_: │ │ │ │ +804_ _s_e_t_b_u_f(char_type* _____s, _s_t_r_e_a_m_s_i_z_e __n) │ │ │ │ +805 { │ │ │ │ +806 if (!this->is_open()) │ │ │ │ +807 { │ │ │ │ +808 if (_____s == 0 && __n == 0) │ │ │ │ +809 _M_buf_size = 1; │ │ │ │ +810 else if (_____s && __n > 0) │ │ │ │ +811 { │ │ │ │ +812 // This is implementation-defined behavior, and assumes that │ │ │ │ +813 // an external char_type array of length __n exists and has │ │ │ │ +814 // been pre-allocated. If this is not the case, things will │ │ │ │ +815 // quickly blow up. When __n > 1, __n - 1 positions will be │ │ │ │ +816 // used for the get area, __n - 1 for the put area and 1 │ │ │ │ +817 // position to host the overflow char of a full put area. │ │ │ │ +818 // When __n == 1, 1 position will be used for the get area │ │ │ │ +819 // and 0 for the put area, as in the unbuffered case above. │ │ │ │ +820 _M_buf = _____s; │ │ │ │ +821 _M_buf_size = __n; │ │ │ │ +822 } │ │ │ │ +823 } │ │ │ │ +824 return this; │ │ │ │ +825 } │ │ │ │ +826 │ │ │ │ +827 │ │ │ │ +828 // According to 27.8.1.4 p11 - 13, seekoff should ignore the last │ │ │ │ +829 // argument (of type openmode). │ │ │ │ +830 template │ │ │ │ +831 typename basic_filebuf<_CharT, _Traits>::pos_type │ │ │ │ +_8_3_2 _b_a_s_i_c___f_i_l_e_b_u_f_<___C_h_a_r_T_,_ ___T_r_a_i_t_s_>_:_: │ │ │ │ +833_ _s_e_e_k_o_f_f(off_type _____o_f_f, ios_base::seekdir _____w_a_y, ios_base::openmode) │ │ │ │ +834 { │ │ │ │ +835 int __width = 0; │ │ │ │ +836 if (_M_codecvt) │ │ │ │ +837 __width = _M_codecvt->encoding(); │ │ │ │ +838 if (__width < 0) │ │ │ │ +839 __width = 0; │ │ │ │ +840 │ │ │ │ +841 pos_type _____r_e_t = pos_type(off_type(-1)); │ │ │ │ +842 const bool _____t_e_s_t_f_a_i_l = _____o_f_f != 0 && __width <= 0; │ │ │ │ +843 if (this->is_open() && !_____t_e_s_t_f_a_i_l) │ │ │ │ +844 { │ │ │ │ +845 // tellg and tellp queries do not affect any state, unless │ │ │ │ +846 // ! always_noconv and the put sequence is not empty. │ │ │ │ +847 // In that case, determining the position requires converting the │ │ │ │ +848 // put sequence. That doesn't use ext_buf, so requires a flush. │ │ │ │ +849 bool _____n_o___m_o_v_e_m_e_n_t = _____w_a_y == _i_o_s___b_a_s_e_:_:_c_u_r && _____o_f_f == 0 │ │ │ │ +850 && (!_M_writing || _M_codecvt->always_noconv()); │ │ │ │ +851 │ │ │ │ +852 // Ditch any pback buffers to avoid confusion. │ │ │ │ +853 if (!_____n_o___m_o_v_e_m_e_n_t) │ │ │ │ +854 _M_destroy_pback(); │ │ │ │ +855 │ │ │ │ +856 // Correct state at destination. Note that this is the correct │ │ │ │ +857 // state for the current position during output, because │ │ │ │ +858 // codecvt::unshift() returns the state to the initial state. │ │ │ │ +859 // This is also the correct state at the end of the file because │ │ │ │ +860 // an unshift sequence should have been written at the end. │ │ │ │ +861 __state_type _____s_t_a_t_e = _M_state_beg; │ │ │ │ +862 off_type _____c_o_m_p_u_t_e_d___o_f_f = _____o_f_f * __width; │ │ │ │ +863 if (_M_reading && _____w_a_y == _i_o_s___b_a_s_e_:_:_c_u_r) │ │ │ │ +864 { │ │ │ │ +865 _____s_t_a_t_e = _M_state_last; │ │ │ │ +866 _____c_o_m_p_u_t_e_d___o_f_f += _M_get_ext_pos(_____s_t_a_t_e); │ │ │ │ +867 } │ │ │ │ +868 if (!_____n_o___m_o_v_e_m_e_n_t) │ │ │ │ +869 _____r_e_t = _M_seek(_____c_o_m_p_u_t_e_d___o_f_f, _____w_a_y, _____s_t_a_t_e); │ │ │ │ +870 else │ │ │ │ +871 { │ │ │ │ +872 if (_M_writing) │ │ │ │ +873 _____c_o_m_p_u_t_e_d___o_f_f = this->pptr() - this->pbase(); │ │ │ │ +874 │ │ │ │ +875 off_type _____f_i_l_e___o_f_f = _M_file.seekoff(0, _i_o_s___b_a_s_e_:_:_c_u_r); │ │ │ │ +876 if (_____f_i_l_e___o_f_f != off_type(-1)) │ │ │ │ +877 { │ │ │ │ +878 _____r_e_t = _____f_i_l_e___o_f_f + _____c_o_m_p_u_t_e_d___o_f_f; │ │ │ │ +879 _____r_e_t.state(_____s_t_a_t_e); │ │ │ │ +880 } │ │ │ │ +881 } │ │ │ │ +882 } │ │ │ │ +883 return _____r_e_t; │ │ │ │ +884 } │ │ │ │ +885 │ │ │ │ +886 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ +887 // 171. Strange seekpos() semantics due to joint position │ │ │ │ +888 // According to the resolution of DR 171, seekpos should ignore the last │ │ │ │ +889 // argument (of type openmode). │ │ │ │ +890 template │ │ │ │ +891 typename basic_filebuf<_CharT, _Traits>::pos_type │ │ │ │ +_8_9_2 _b_a_s_i_c___f_i_l_e_b_u_f_<___C_h_a_r_T_,_ ___T_r_a_i_t_s_>_:_: │ │ │ │ +893_ _s_e_e_k_p_o_s(pos_type _____p_o_s, ios_base::openmode) │ │ │ │ +894 { │ │ │ │ +895 pos_type _____r_e_t = pos_type(off_type(-1)); │ │ │ │ +896 if (this->is_open()) │ │ │ │ +897 { │ │ │ │ +898 // Ditch any pback buffers to avoid confusion. │ │ │ │ +899 _M_destroy_pback(); │ │ │ │ +900 _____r_e_t = _M_seek(off_type(_____p_o_s), _i_o_s___b_a_s_e_:_:_b_e_g, _____p_o_s.state()); │ │ │ │ +901 } │ │ │ │ +902 return _____r_e_t; │ │ │ │ +903 } │ │ │ │ +904 │ │ │ │ +905 template │ │ │ │ +906 typename basic_filebuf<_CharT, _Traits>::pos_type │ │ │ │ +907 _b_a_s_i_c___f_i_l_e_b_u_f_<___C_h_a_r_T_,_ ___T_r_a_i_t_s_>_:_: │ │ │ │ +908_ ___M___s_e_e_k(off_type _____o_f_f, ios_base::seekdir _____w_a_y, __state_type _____s_t_a_t_e) │ │ │ │ +909 { │ │ │ │ +910 pos_type _____r_e_t = pos_type(off_type(-1)); │ │ │ │ +911 if (_M_terminate_output()) │ │ │ │ +912 { │ │ │ │ +913 off_type _____f_i_l_e___o_f_f = _M_file.seekoff(_____o_f_f, _____w_a_y); │ │ │ │ +914 if (_____f_i_l_e___o_f_f != off_type(-1)) │ │ │ │ +915 { │ │ │ │ +916 _M_reading = false; │ │ │ │ +917 _M_writing = false; │ │ │ │ +918 _M_ext_next = _M_ext_end = _M_ext_buf; │ │ │ │ +919 _M_set_buffer(-1); │ │ │ │ +920 _M_state_cur = _____s_t_a_t_e; │ │ │ │ +921 _____r_e_t = _____f_i_l_e___o_f_f; │ │ │ │ +922 _____r_e_t.state(_M_state_cur); │ │ │ │ +923 } │ │ │ │ +924 } │ │ │ │ +925 return __ret; │ │ │ │ +926 } │ │ │ │ +927 │ │ │ │ +928 // Returns the distance from the end of the ext buffer to the point │ │ │ │ +929 // corresponding to gptr(). This is a negative value. Updates __state │ │ │ │ +930 // from eback() correspondence to gptr(). │ │ │ │ +931 template │ │ │ │ +932 int basic_filebuf<_CharT, _Traits>:: │ │ │ │ +933 _M_get_ext_pos(__state_type& __state) │ │ │ │ +934 { │ │ │ │ +935 if (_M_codecvt->always_noconv()) │ │ │ │ +936 return this->gptr() - this->egptr(); │ │ │ │ +937 else │ │ │ │ +938 { │ │ │ │ +939 // Calculate offset from _M_ext_buf that corresponds to │ │ │ │ +940 // gptr(). Precondition: __state == _M_state_last, which │ │ │ │ +941 // corresponds to eback(). │ │ │ │ +942 const int __gptr_off = │ │ │ │ +943 _M_codecvt->length(__state, _M_ext_buf, _M_ext_next, │ │ │ │ +944 this->gptr() - this->eback()); │ │ │ │ +945 return _M_ext_buf + __gptr_off - _M_ext_end; │ │ │ │ +946 } │ │ │ │ +947 } │ │ │ │ +948 │ │ │ │ +949 template │ │ │ │ +950 bool │ │ │ │ +951 basic_filebuf<_CharT, _Traits>:: │ │ │ │ +952 _M_terminate_output() │ │ │ │ +953 { │ │ │ │ +954 // Part one: update the output sequence. │ │ │ │ +955 bool __testvalid = true; │ │ │ │ +956 if (this->pbase() < this->pptr()) │ │ │ │ +957 { │ │ │ │ +958 const int_type __tmp = this->overflow(); │ │ │ │ +959 if (traits_type::eq_int_type(__tmp, traits_type::eof())) │ │ │ │ +960 __testvalid = false; │ │ │ │ +961 } │ │ │ │ +962 │ │ │ │ +963 // Part two: output unshift sequence. │ │ │ │ +964 if (_M_writing && !__check_facet(_M_codecvt).always_noconv() │ │ │ │ +965 && __testvalid) │ │ │ │ +966 { │ │ │ │ +967 // Note: this value is arbitrary, since there is no way to │ │ │ │ +968 // get the length of the unshift sequence from codecvt, │ │ │ │ +969 // without calling unshift. │ │ │ │ +970 const size_t __blen = 128; │ │ │ │ +971 char __buf[__blen]; │ │ │ │ +972 codecvt_base::result __r; │ │ │ │ +973 _s_t_r_e_a_m_s_i_z_e __ilen = 0; │ │ │ │ +974 │ │ │ │ +975 do │ │ │ │ +976 { │ │ │ │ +977 char* __next; │ │ │ │ +978 __r = _M_codecvt->unshift(_M_state_cur, __buf, │ │ │ │ +979 __buf + __blen, __next); │ │ │ │ +980 if (__r == codecvt_base::error) │ │ │ │ +981 __testvalid = false; │ │ │ │ +982 else if (__r == codecvt_base::ok || │ │ │ │ +983 __r == codecvt_base::partial) │ │ │ │ +984 { │ │ │ │ +985 __ilen = __next - __buf; │ │ │ │ +986 if (__ilen > 0) │ │ │ │ +987 { │ │ │ │ +988 const _s_t_r_e_a_m_s_i_z_e __elen = _M_file.xsputn(__buf, __ilen); │ │ │ │ +989 if (__elen != __ilen) │ │ │ │ +990 __testvalid = false; │ │ │ │ +991 } │ │ │ │ +992 } │ │ │ │ +993 } │ │ │ │ +994 while (__r == codecvt_base::partial && __ilen > 0 && __testvalid); │ │ │ │ +995 │ │ │ │ +996 if (__testvalid) │ │ │ │ +997 { │ │ │ │ +998 // This second call to overflow() is required by the standard, │ │ │ │ +999 // but it's not clear why it's needed, since the output buffer │ │ │ │ +1000 // should be empty by this point (it should have been emptied │ │ │ │ +1001 // in the first call to overflow()). │ │ │ │ +1002 const int_type __tmp = this->overflow(); │ │ │ │ +1003 if (traits_type::eq_int_type(__tmp, traits_type::eof())) │ │ │ │ +1004 __testvalid = false; │ │ │ │ +1005 } │ │ │ │ +1006 } │ │ │ │ +1007 return __testvalid; │ │ │ │ +1008 } │ │ │ │ +1009 │ │ │ │ +1010 template │ │ │ │ +1011 int │ │ │ │ +_1_0_1_2 _b_a_s_i_c___f_i_l_e_b_u_f_<___C_h_a_r_T_,_ ___T_r_a_i_t_s_>_:_: │ │ │ │ +1013_ _s_y_n_c() │ │ │ │ 1014 { │ │ │ │ -1015 size_t │ │ │ │ -1016 operator()(const _Up& __u) const │ │ │ │ -1017 noexcept(noexcept(_s_t_d_:_:_d_e_c_l_v_a_l_<_h_a_s_h_<___P_t_r_>>()(_s_t_d_:_:_d_e_c_l_v_a_l_<___P_t_r_>()))) │ │ │ │ -1018 { return hash<_Ptr>()(__u.get()); } │ │ │ │ -1019 }; │ │ │ │ -1020 │ │ │ │ -1021 template │ │ │ │ -1022 struct __uniq_ptr_hash<_Up, _Ptr, false> │ │ │ │ -1023 : private __poison_hash<_Ptr> │ │ │ │ -1024 { }; │ │ │ │ -1025 /// @endcond │ │ │ │ +1015 // Make sure that the internal buffer resyncs its idea of │ │ │ │ +1016 // the file position with the external file. │ │ │ │ +1017 int _____r_e_t = 0; │ │ │ │ +1018 if (this->pbase() < this->pptr()) │ │ │ │ +1019 { │ │ │ │ +1020 const int_type _____t_m_p = this->overflow(); │ │ │ │ +1021 if (traits_type::eq_int_type(_____t_m_p, traits_type::eof())) │ │ │ │ +1022 _____r_e_t = -1; │ │ │ │ +1023 } │ │ │ │ +1024 return _____r_e_t; │ │ │ │ +1025 } │ │ │ │ 1026 │ │ │ │ -1027 /// std::hash specialization for unique_ptr. │ │ │ │ -1028 template │ │ │ │ -_1_0_2_9 struct _h_a_s_h<_u_n_i_q_u_e___p_t_r<_Tp, ___D_p>> │ │ │ │ -1030 : public __hash_base>, │ │ │ │ -1031 public __uniq_ptr_hash> │ │ │ │ -1032 { }; │ │ │ │ +1027 template │ │ │ │ +1028 void │ │ │ │ +_1_0_2_9 _b_a_s_i_c___f_i_l_e_b_u_f_<___C_h_a_r_T_,_ ___T_r_a_i_t_s_>_:_: │ │ │ │ +1030_ _i_m_b_u_e(const _l_o_c_a_l_e& _____l_o_c) │ │ │ │ +1031 { │ │ │ │ +1032 bool _____t_e_s_t_v_a_l_i_d = true; │ │ │ │ 1033 │ │ │ │ -1034#if __cplusplus >= 201402L │ │ │ │ -1035#define __cpp_lib_make_unique 201304L │ │ │ │ -1036 │ │ │ │ -1037 /// @cond undocumented │ │ │ │ -1038namespace __detail │ │ │ │ -1039{ │ │ │ │ -1040 template │ │ │ │ -1041 struct ___M_a_k_e_U_n_i_q │ │ │ │ -1042 { typedef _u_n_i_q_u_e___p_t_r_<___T_p_> _____s_i_n_g_l_e___o_b_j_e_c_t; }; │ │ │ │ -1043 │ │ │ │ -1044 template │ │ │ │ -1045 struct _MakeUniq<_Tp[]> │ │ │ │ -1046 { typedef unique_ptr<_Tp[]> __array; }; │ │ │ │ -1047 │ │ │ │ -1048 template │ │ │ │ -1049 struct _MakeUniq<_Tp[_Bound]> │ │ │ │ -1050 { struct __invalid_type { }; }; │ │ │ │ -1051 │ │ │ │ -1052 template │ │ │ │ -1053 using __unique_ptr_t = typename _MakeUniq<_Tp>::__single_object; │ │ │ │ -1054 template │ │ │ │ -1055 using __unique_ptr_array_t = typename _MakeUniq<_Tp>::__array; │ │ │ │ -1056 template │ │ │ │ -1057 using __invalid_make_unique_t = typename _MakeUniq<_Tp>::__invalid_type; │ │ │ │ -1058} │ │ │ │ -1059 /// @endcond │ │ │ │ -1060 │ │ │ │ -1061 /** Create an object owned by a `unique_ptr`. │ │ │ │ -1062 * @tparam _Tp A non-array object type. │ │ │ │ -1063 * @param __args Constructor arguments for the new object. │ │ │ │ -1064 * @returns A `unique_ptr<_Tp>` that owns the new object. │ │ │ │ -1065 * @since C++14 │ │ │ │ -1066 * @relates unique_ptr │ │ │ │ -1067 */ │ │ │ │ -1068 template │ │ │ │ -1069 _GLIBCXX23_CONSTEXPR │ │ │ │ -1070 inline __detail::__unique_ptr_t<_Tp> │ │ │ │ -_1_0_7_1 _m_a_k_e___u_n_i_q_u_e(___A_r_g_s&&... _____a_r_g_s) │ │ │ │ -1072 { return _u_n_i_q_u_e___p_t_r_<___T_p_>(new _Tp(_s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(_____a_r_g_s)...)); } │ │ │ │ -1073 │ │ │ │ -1074 /** Create an array owned by a `unique_ptr`. │ │ │ │ -1075 * @tparam _Tp An array type of unknown bound, such as `U[]`. │ │ │ │ -1076 * @param __num The number of elements of type `U` in the new array. │ │ │ │ -1077 * @returns A `unique_ptr` that owns the new array. │ │ │ │ -1078 * @since C++14 │ │ │ │ -1079 * @relates unique_ptr │ │ │ │ -1080 * │ │ │ │ -1081 * The array elements are value-initialized. │ │ │ │ -1082 */ │ │ │ │ -1083 template │ │ │ │ -1084 ___G_L_I_B_C_X_X_2_3___C_O_N_S_T_E_X_P_R │ │ │ │ -1085 inline __detail::__unique_ptr_array_t<_Tp> │ │ │ │ -_1_0_8_6 _m_a_k_e___u_n_i_q_u_e(size_t _____n_u_m) │ │ │ │ -1087 { return _u_n_i_q_u_e___p_t_r_<___T_p_>(new _r_e_m_o_v_e___e_x_t_e_n_t___t_<___T_p_>[_____n_u_m]()); } │ │ │ │ -1088 │ │ │ │ -1089 /** Disable std::make_unique for arrays of known bound. │ │ │ │ -1090 * @tparam _Tp An array type of known bound, such as `U[N]`. │ │ │ │ -1091 * @since C++14 │ │ │ │ -1092 * @relates unique_ptr │ │ │ │ -1093 */ │ │ │ │ -1094 template │ │ │ │ -1095 __detail::__invalid_make_unique_t<_Tp> │ │ │ │ -_1_0_9_6 _m_a_k_e___u_n_i_q_u_e(___A_r_g_s&&...) = delete; │ │ │ │ -1097 │ │ │ │ -1098#if __cplusplus > 201703L │ │ │ │ -1099 /** Create a default-initialied object owned by a `unique_ptr`. │ │ │ │ -1100 * @tparam _Tp A non-array object type. │ │ │ │ -1101 * @returns A `unique_ptr<_Tp>` that owns the new object. │ │ │ │ -1102 * @since C++20 │ │ │ │ -1103 * @relates unique_ptr │ │ │ │ -1104 */ │ │ │ │ -1105 template │ │ │ │ -1106 ___G_L_I_B_C_X_X_2_3___C_O_N_S_T_E_X_P_R │ │ │ │ -1107 inline __detail::__unique_ptr_t<_Tp> │ │ │ │ -_1_1_0_8 _m_a_k_e___u_n_i_q_u_e___f_o_r___o_v_e_r_w_r_i_t_e() │ │ │ │ -1109 { return _u_n_i_q_u_e___p_t_r_<___T_p_>(new _Tp); } │ │ │ │ -1110 │ │ │ │ -1111 /** Create a default-initialized array owned by a `unique_ptr`. │ │ │ │ -1112 * @tparam _Tp An array type of unknown bound, such as `U[]`. │ │ │ │ -1113 * @param __num The number of elements of type `U` in the new array. │ │ │ │ -1114 * @returns A `unique_ptr` that owns the new array. │ │ │ │ -1115 * @since C++20 │ │ │ │ -1116 * @relates unique_ptr │ │ │ │ -1117 */ │ │ │ │ -1118 template │ │ │ │ -1119 ___G_L_I_B_C_X_X_2_3___C_O_N_S_T_E_X_P_R │ │ │ │ -1120 inline __detail::__unique_ptr_array_t<_Tp> │ │ │ │ -_1_1_2_1 _m_a_k_e___u_n_i_q_u_e___f_o_r___o_v_e_r_w_r_i_t_e(size_t _____n_u_m) │ │ │ │ -1122 { return _u_n_i_q_u_e___p_t_r_<___T_p_>(new _r_e_m_o_v_e___e_x_t_e_n_t___t_<___T_p_>[_____n_u_m]); } │ │ │ │ -1123 │ │ │ │ -1124 /** Disable std::make_unique_for_overwrite for arrays of known bound. │ │ │ │ -1125 * @tparam _Tp An array type of known bound, such as `U[N]`. │ │ │ │ -1126 * @since C++20 │ │ │ │ -1127 * @relates unique_ptr │ │ │ │ -1128 */ │ │ │ │ -1129 template │ │ │ │ -1130 __detail::__invalid_make_unique_t<_Tp> │ │ │ │ -_1_1_3_1 _m_a_k_e___u_n_i_q_u_e___f_o_r___o_v_e_r_w_r_i_t_e(___A_r_g_s&&...) = delete; │ │ │ │ -1132#endif // C++20 │ │ │ │ -1133 │ │ │ │ -1134#endif // C++14 │ │ │ │ -1135 │ │ │ │ -1136#if __cplusplus > 201703L && __cpp_concepts │ │ │ │ -1137 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ -1138 // 2948. unique_ptr does not define operator<< for stream output │ │ │ │ -1139 /// Stream output operator for unique_ptr │ │ │ │ -1140 /// @relates unique_ptr │ │ │ │ -1141 /// @since C++20 │ │ │ │ -1142 template │ │ │ │ -1143 inline _b_a_s_i_c___o_s_t_r_e_a_m_<___C_h_a_r_T_,_ ___T_r_a_i_t_s_>& │ │ │ │ -1144 _o_p_e_r_a_t_o_r_<_<(_b_a_s_i_c___o_s_t_r_e_a_m_<___C_h_a_r_T_,_ ___T_r_a_i_t_s_>& _____o_s, │ │ │ │ -1145 const _u_n_i_q_u_e___p_t_r_<___T_p_,_ ___D_p_>& __p) │ │ │ │ -1146 requires requires { _____o_s << __p.get(); } │ │ │ │ -1147 { │ │ │ │ -1148 _____o_s << __p.get(); │ │ │ │ -1149 return _____o_s; │ │ │ │ -1150 } │ │ │ │ -1151#endif // C++20 │ │ │ │ -1152 │ │ │ │ -1153 /// @} group pointer_abstractions │ │ │ │ -1154 │ │ │ │ -1155#if __cplusplus >= 201703L │ │ │ │ -1156 namespace __detail::__variant │ │ │ │ -1157 { │ │ │ │ -1158 template struct _Never_valueless_alt; // see │ │ │ │ -1159 │ │ │ │ -1160 // Provide the strong exception-safety guarantee when emplacing a │ │ │ │ -1161 // unique_ptr into a variant. │ │ │ │ -1162 template │ │ │ │ -1163 struct _Never_valueless_alt<_s_t_d::unique_ptr<_Tp, _Del>> │ │ │ │ -1164 : _s_t_d_:_:_t_r_u_e___t_y_p_e │ │ │ │ -1165 { }; │ │ │ │ -1166 } // namespace __detail::__variant │ │ │ │ -1167#endif // C++17 │ │ │ │ -1168 │ │ │ │ -1169_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ -1170} // namespace │ │ │ │ -1171 │ │ │ │ -1172#endif /* _UNIQUE_PTR_H */ │ │ │ │ -_c_o_m_p_a_r_e │ │ │ │ -_o_s_t_r_e_a_m │ │ │ │ -_t_u_p_l_e │ │ │ │ -_t_y_p_e___t_r_a_i_t_s │ │ │ │ -_s_t_l___f_u_n_c_t_i_o_n_._h │ │ │ │ -_f_u_n_c_t_i_o_n_a_l___h_a_s_h_._h │ │ │ │ -_c_+_+_c_o_n_f_i_g_._h │ │ │ │ -_a_s_s_e_r_t_i_o_n_s_._h │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___p_t_r_:_:_m_a_k_e___u_n_i_q_u_e___f_o_r___o_v_e_r_w_r_i_t_e │ │ │ │ -__detail::__invalid_make_unique_t< _Tp > make_unique_for_overwrite(_Args │ │ │ │ -&&...)=delete │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___p_t_r_:_:_m_a_k_e___u_n_i_q_u_e___f_o_r___o_v_e_r_w_r_i_t_e │ │ │ │ -constexpr __detail::__unique_ptr_array_t< _Tp > make_unique_for_overwrite │ │ │ │ -(size_t __num) │ │ │ │ -DDeeffiinniittiioonn _u_n_i_q_u_e___p_t_r_._h_:_1_1_2_1 │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___p_t_r_:_:_m_a_k_e___u_n_i_q_u_e │ │ │ │ -constexpr __detail::__unique_ptr_array_t< _Tp > make_unique(size_t __num) │ │ │ │ -DDeeffiinniittiioonn _u_n_i_q_u_e___p_t_r_._h_:_1_0_8_6 │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___p_t_r_:_:_s_w_a_p │ │ │ │ -constexpr enable_if< __is_swappable< _Dp >::value >::type swap(unique_ptr< _Tp, │ │ │ │ -_Dp > &__x, unique_ptr< _Tp, _Dp > &__y) noexcept │ │ │ │ -DDeeffiinniittiioonn _u_n_i_q_u_e___p_t_r_._h_:_8_1_5 │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___p_t_r_:_:_m_a_k_e___u_n_i_q_u_e │ │ │ │ -__detail::__invalid_make_unique_t< _Tp > make_unique(_Args &&...)=delete │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___p_t_r_:_:_m_a_k_e___u_n_i_q_u_e___f_o_r___o_v_e_r_w_r_i_t_e │ │ │ │ -constexpr __detail::__unique_ptr_t< _Tp > make_unique_for_overwrite() │ │ │ │ -DDeeffiinniittiioonn _u_n_i_q_u_e___p_t_r_._h_:_1_1_0_8 │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___p_t_r_:_:_m_a_k_e___u_n_i_q_u_e │ │ │ │ -constexpr __detail::__unique_ptr_t< _Tp > make_unique(_Args &&... __args) │ │ │ │ -DDeeffiinniittiioonn _u_n_i_q_u_e___p_t_r_._h_:_1_0_7_1 │ │ │ │ -_s_t_d_:_:_d_e_c_l_v_a_l │ │ │ │ -auto declval() noexcept -> decltype(__declval< _Tp >(0)) │ │ │ │ -DDeeffiinniittiioonn _t_y_p_e___t_r_a_i_t_s_:_2_3_8_7 │ │ │ │ +1034 const _____c_o_d_e_c_v_t___t_y_p_e* ___M___c_o_d_e_c_v_t___t_m_p = 0; │ │ │ │ +1035 if (_____b_u_i_l_t_i_n___e_x_p_e_c_t(_h_a_s___f_a_c_e_t_<_____c_o_d_e_c_v_t___t_y_p_e_>(_____l_o_c), true)) │ │ │ │ +1036 ___M___c_o_d_e_c_v_t___t_m_p = &_u_s_e___f_a_c_e_t_<_____c_o_d_e_c_v_t___t_y_p_e_>(_____l_o_c); │ │ │ │ +1037 │ │ │ │ +1038 if (this->is_open()) │ │ │ │ +1039 { │ │ │ │ +1040 // encoding() == -1 is ok only at the beginning. │ │ │ │ +1041 if ((_M_reading || _M_writing) │ │ │ │ +1042 && __check_facet(_M_codecvt).encoding() == -1) │ │ │ │ +1043 _____t_e_s_t_v_a_l_i_d = false; │ │ │ │ +1044 else │ │ │ │ +1045 { │ │ │ │ +1046 if (_M_reading) │ │ │ │ +1047 { │ │ │ │ +1048 if (__check_facet(_M_codecvt).always_noconv()) │ │ │ │ +1049 { │ │ │ │ +1050 if (___M___c_o_d_e_c_v_t___t_m_p │ │ │ │ +1051 && !__check_facet(___M___c_o_d_e_c_v_t___t_m_p).always_noconv()) │ │ │ │ +1052 _____t_e_s_t_v_a_l_i_d = this->seekoff(0, _i_o_s___b_a_s_e_:_:_c_u_r, _M_mode) │ │ │ │ +1053 != pos_type(off_type(-1)); │ │ │ │ +1054 } │ │ │ │ +1055 else │ │ │ │ +1056 { │ │ │ │ +1057 // External position corresponding to gptr(). │ │ │ │ +1058 _M_ext_next = _M_ext_buf │ │ │ │ +1059 + _M_codecvt->length(_M_state_last, _M_ext_buf, │ │ │ │ +1060 _M_ext_next, │ │ │ │ +1061 this->gptr() - this->eback()); │ │ │ │ +1062 const _s_t_r_e_a_m_s_i_z_e _____r_e_m_a_i_n_d_e_r = _M_ext_end - _M_ext_next; │ │ │ │ +1063 if (_____r_e_m_a_i_n_d_e_r) │ │ │ │ +1064 _____b_u_i_l_t_i_n___m_e_m_m_o_v_e(_M_ext_buf, _M_ext_next, _____r_e_m_a_i_n_d_e_r); │ │ │ │ +1065 │ │ │ │ +1066 _M_ext_next = _M_ext_buf; │ │ │ │ +1067 _M_ext_end = _M_ext_buf + _____r_e_m_a_i_n_d_e_r; │ │ │ │ +1068 _M_set_buffer(-1); │ │ │ │ +1069 _M_state_last = _M_state_cur = _M_state_beg; │ │ │ │ +1070 } │ │ │ │ +1071 } │ │ │ │ +1072 else if (_M_writing && (_____t_e_s_t_v_a_l_i_d = _M_terminate_output())) │ │ │ │ +1073 _M_set_buffer(-1); │ │ │ │ +1074 } │ │ │ │ +1075 } │ │ │ │ +1076 │ │ │ │ +1077 if (_____t_e_s_t_v_a_l_i_d) │ │ │ │ +1078 _M_codecvt = ___M___c_o_d_e_c_v_t___t_m_p; │ │ │ │ +1079 else │ │ │ │ +1080 _M_codecvt = 0; │ │ │ │ +1081 } │ │ │ │ +1082 │ │ │ │ +1083 // Inhibit implicit instantiations for required instantiations, │ │ │ │ +1084 // which are defined via explicit instantiations elsewhere. │ │ │ │ +1085#if _GLIBCXX_EXTERN_TEMPLATE │ │ │ │ +1086 extern template class _b_a_s_i_c___f_i_l_e_b_u_f_<_c_h_a_r_>; │ │ │ │ +1087 extern template class _b_a_s_i_c___i_f_s_t_r_e_a_m_<_c_h_a_r_>; │ │ │ │ +1088 extern template class _b_a_s_i_c___o_f_s_t_r_e_a_m_<_c_h_a_r_>; │ │ │ │ +1089 extern template class _b_a_s_i_c___f_s_t_r_e_a_m_<_c_h_a_r_>; │ │ │ │ +1090 │ │ │ │ +1091#ifdef _GLIBCXX_USE_WCHAR_T │ │ │ │ +1092 extern template class _b_a_s_i_c___f_i_l_e_b_u_f_<_w_c_h_a_r___t_>; │ │ │ │ +1093 extern template class _b_a_s_i_c___i_f_s_t_r_e_a_m_<_w_c_h_a_r___t_>; │ │ │ │ +1094 extern template class _b_a_s_i_c___o_f_s_t_r_e_a_m_<_w_c_h_a_r___t_>; │ │ │ │ +1095 extern template class _b_a_s_i_c___f_s_t_r_e_a_m_<_w_c_h_a_r___t_>; │ │ │ │ +1096#endif │ │ │ │ +1097#endif │ │ │ │ +1098 │ │ │ │ +1099_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ +1100} // namespace std │ │ │ │ +1101 │ │ │ │ +1102#endif │ │ │ │ +_c_e_r_r_n_o │ │ │ │ +_m_o_v_e_._h │ │ │ │ +_c_x_x_a_b_i___f_o_r_c_e_d_._h │ │ │ │ _s_t_d_:_:_m_o_v_e │ │ │ │ constexpr std::remove_reference< _Tp >::type && move(_Tp &&__t) noexcept │ │ │ │ Convert a value to an rvalue. │ │ │ │ DDeeffiinniittiioonn _m_o_v_e_._h_:_1_0_4 │ │ │ │ _s_t_d_:_:_s_w_a_p │ │ │ │ void swap(any &__x, any &__y) noexcept │ │ │ │ Exchange the states of two any objects. │ │ │ │ DDeeffiinniittiioonn _a_n_y_:_4_2_9 │ │ │ │ -_s_t_d_:_:_f_o_r_w_a_r_d │ │ │ │ -constexpr _Tp && forward(typename std::remove_reference< _Tp >::type &__t) │ │ │ │ -noexcept │ │ │ │ -Forward an lvalue. │ │ │ │ -DDeeffiinniittiioonn _m_o_v_e_._h_:_7_7 │ │ │ │ +_s_t_d_:_:_m_i_n │ │ │ │ +constexpr const _Tp & min(const _Tp &, const _Tp &) │ │ │ │ +This does what you think it does. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___a_l_g_o_b_a_s_e_._h_:_2_3_0 │ │ │ │ _s_t_d │ │ │ │ ISO C++ entities toplevel namespace is std. │ │ │ │ -_s_t_d_:_:_o_p_e_r_a_t_o_r_<_< │ │ │ │ -std::basic_ostream< _CharT, _Traits > & operator<<(std::basic_ostream< _CharT, │ │ │ │ -_Traits > &__os, const bitset< _Nb > &__x) │ │ │ │ -Global I/O operators for bitsets. │ │ │ │ -DDeeffiinniittiioonn _b_i_t_s_e_t_:_1_5_4_3 │ │ │ │ -_s_t_d_:_:_h_a_s_h │ │ │ │ -Primary class template hash. │ │ │ │ -DDeeffiinniittiioonn _f_u_n_c_t_i_o_n_a_l___h_a_s_h_._h_:_1_0_3 │ │ │ │ -_s_t_d_:_:_i_n_t_e_g_r_a_l___c_o_n_s_t_a_n_t │ │ │ │ -integral_constant │ │ │ │ -DDeeffiinniittiioonn _t_y_p_e___t_r_a_i_t_s_:_6_3 │ │ │ │ -_s_t_d_:_:_i_s___v_o_i_d │ │ │ │ -is_void │ │ │ │ -DDeeffiinniittiioonn _t_y_p_e___t_r_a_i_t_s_:_2_8_7 │ │ │ │ -_s_t_d_:_:_i_s___l_v_a_l_u_e___r_e_f_e_r_e_n_c_e │ │ │ │ -is_lvalue_reference │ │ │ │ -DDeeffiinniittiioonn _t_y_p_e___t_r_a_i_t_s_:_4_7_7 │ │ │ │ -_s_t_d_:_:_i_s___c_o_n_v_e_r_t_i_b_l_e │ │ │ │ -is_convertible │ │ │ │ -DDeeffiinniittiioonn _t_y_p_e___t_r_a_i_t_s_:_1_4_8_4 │ │ │ │ -_s_t_d_:_:_e_n_a_b_l_e___i_f │ │ │ │ -Define a member typedef type only if a boolean constant is true. │ │ │ │ -DDeeffiinniittiioonn _t_y_p_e___t_r_a_i_t_s_:_2_2_2_3 │ │ │ │ -_s_t_d_:_:_d_e_f_a_u_l_t___d_e_l_e_t_e │ │ │ │ -DDeeffiinniittiioonn _u_n_i_q_u_e___p_t_r_._h_:_7_5 │ │ │ │ -_s_t_d_:_:_d_e_f_a_u_l_t___d_e_l_e_t_e_:_:_o_p_e_r_a_t_o_r_(_) │ │ │ │ -constexpr void operator()(_Tp *__ptr) const │ │ │ │ -Calls delete __ptr │ │ │ │ -DDeeffiinniittiioonn _u_n_i_q_u_e___p_t_r_._h_:_9_2 │ │ │ │ -_s_t_d_:_:_d_e_f_a_u_l_t___d_e_l_e_t_e_:_:_d_e_f_a_u_l_t___d_e_l_e_t_e │ │ │ │ -constexpr default_delete() noexcept=default │ │ │ │ -Default constructor. │ │ │ │ -_s_t_d_:_:_d_e_f_a_u_l_t___d_e_l_e_t_e_<_ ___T_p_[_]_>_:_:_o_p_e_r_a_t_o_r_(_) │ │ │ │ -constexpr enable_if< is_convertible< _Up(*)[], _Tp(*)[]>::value >::type │ │ │ │ -operator()(_Up *__ptr) const │ │ │ │ -Calls delete[] __ptr │ │ │ │ -DDeeffiinniittiioonn _u_n_i_q_u_e___p_t_r_._h_:_1_3_5 │ │ │ │ -_s_t_d_:_:_d_e_f_a_u_l_t___d_e_l_e_t_e_<_ ___T_p_[_]_>_:_:_d_e_f_a_u_l_t___d_e_l_e_t_e │ │ │ │ -constexpr default_delete() noexcept=default │ │ │ │ -Default constructor. │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___p_t_r │ │ │ │ -A move-only smart pointer that manages unique ownership of a resource. │ │ │ │ -DDeeffiinniittiioonn _u_n_i_q_u_e___p_t_r_._h_:_2_7_7 │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___p_t_r_:_:_o_p_e_r_a_t_o_r_-_> │ │ │ │ -constexpr pointer operator->() const noexcept │ │ │ │ -Return the stored pointer. │ │ │ │ -DDeeffiinniittiioonn _u_n_i_q_u_e___p_t_r_._h_:_4_5_9 │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___p_t_r_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ -constexpr unique_ptr & operator=(nullptr_t) noexcept │ │ │ │ -Reset the unique_ptr to empty, invoking the deleter if necessary. │ │ │ │ -DDeeffiinniittiioonn _u_n_i_q_u_e___p_t_r_._h_:_4_3_9 │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___p_t_r_:_:_u_n_i_q_u_e___p_t_r │ │ │ │ -constexpr unique_ptr(pointer __p) noexcept │ │ │ │ -DDeeffiinniittiioonn _u_n_i_q_u_e___p_t_r_._h_:_3_1_6 │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___p_t_r_:_:_u_n_i_q_u_e___p_t_r │ │ │ │ -constexpr unique_ptr() noexcept │ │ │ │ -Default constructor, creates a unique_ptr that owns nothing. │ │ │ │ -DDeeffiinniittiioonn _u_n_i_q_u_e___p_t_r_._h_:_3_0_3 │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___p_t_r_:_:_u_n_i_q_u_e___p_t_r │ │ │ │ -constexpr unique_ptr(pointer __p, const deleter_type &__d) noexcept │ │ │ │ -DDeeffiinniittiioonn _u_n_i_q_u_e___p_t_r_._h_:_3_3_0 │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___p_t_r_:_:_u_n_i_q_u_e___p_t_r │ │ │ │ -unique_ptr(unique_ptr &&)=default │ │ │ │ -Move constructor. │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___p_t_r_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ -unique_ptr & operator=(unique_ptr &&)=default │ │ │ │ -Move assignment operator. │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___p_t_r_:_:_r_e_s_e_t │ │ │ │ -constexpr void reset(pointer __p=pointer()) noexcept │ │ │ │ -Replace the stored pointer. │ │ │ │ -DDeeffiinniittiioonn _u_n_i_q_u_e___p_t_r_._h_:_5_0_4 │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___p_t_r_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ -constexpr enable_if< __and_< __safe_conversion_up< _Up, _Ep >, is_assignable< │ │ │ │ -deleter_type &, _Ep && > >::value, unique_ptr & >::type operator=(unique_ptr< │ │ │ │ -_Up, _Ep > &&__u) noexcept │ │ │ │ -Assignment from another type. │ │ │ │ -DDeeffiinniittiioonn _u_n_i_q_u_e___p_t_r_._h_:_4_2_9 │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___p_t_r_:_:_~_u_n_i_q_u_e___p_t_r │ │ │ │ -~unique_ptr() noexcept │ │ │ │ -Destructor, invokes the deleter if the stored pointer is not null. │ │ │ │ -DDeeffiinniittiioonn _u_n_i_q_u_e___p_t_r_._h_:_3_9_7 │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___p_t_r_:_:_u_n_i_q_u_e___p_t_r │ │ │ │ -constexpr unique_ptr(unique_ptr< _Up, _Ep > &&__u) noexcept │ │ │ │ -Converting constructor from another type. │ │ │ │ -DDeeffiinniittiioonn _u_n_i_q_u_e___p_t_r_._h_:_3_7_9 │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___p_t_r_:_:_g_e_t___d_e_l_e_t_e_r │ │ │ │ -constexpr deleter_type & get_deleter() noexcept │ │ │ │ -Return a reference to the stored deleter. │ │ │ │ -DDeeffiinniittiioonn _u_n_i_q_u_e___p_t_r_._h_:_4_7_4 │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___p_t_r_:_:_o_p_e_r_a_t_o_r_* │ │ │ │ -constexpr add_lvalue_reference< element_type >::type operator*() const noexcept │ │ │ │ -(noexcept(*std::declval< pointer >())) │ │ │ │ -Dereference the stored pointer. │ │ │ │ -DDeeffiinniittiioonn _u_n_i_q_u_e___p_t_r_._h_:_4_5_0 │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___p_t_r_:_:_s_w_a_p │ │ │ │ -constexpr void swap(unique_ptr &__u) noexcept │ │ │ │ -Exchange the pointer and deleter with another object. │ │ │ │ -DDeeffiinniittiioonn _u_n_i_q_u_e___p_t_r_._h_:_5_1_4 │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___p_t_r_:_:_g_e_t │ │ │ │ -constexpr pointer get() const noexcept │ │ │ │ -Return the stored pointer. │ │ │ │ -DDeeffiinniittiioonn _u_n_i_q_u_e___p_t_r_._h_:_4_6_8 │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___p_t_r_:_:_u_n_i_q_u_e___p_t_r │ │ │ │ -constexpr unique_ptr(pointer __p, __enable_if_t:: │ │ │ │ -value, _Del && > __d) noexcept │ │ │ │ -DDeeffiinniittiioonn _u_n_i_q_u_e___p_t_r_._h_:_3_4_3 │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___p_t_r_:_:_r_e_l_e_a_s_e │ │ │ │ -constexpr pointer release() noexcept │ │ │ │ -Release ownership of any stored pointer. │ │ │ │ -DDeeffiinniittiioonn _u_n_i_q_u_e___p_t_r_._h_:_4_9_3 │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___p_t_r_:_:_u_n_i_q_u_e___p_t_r │ │ │ │ -constexpr unique_ptr(nullptr_t) noexcept │ │ │ │ -Creates a unique_ptr that owns nothing. │ │ │ │ -DDeeffiinniittiioonn _u_n_i_q_u_e___p_t_r_._h_:_3_5_8 │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___p_t_r_:_:_g_e_t___d_e_l_e_t_e_r │ │ │ │ -constexpr const deleter_type & get_deleter() const noexcept │ │ │ │ -Return a reference to the stored deleter. │ │ │ │ -DDeeffiinniittiioonn _u_n_i_q_u_e___p_t_r_._h_:_4_8_0 │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___p_t_r_<_ ___T_p_[_]_,_ ___D_p_ _>_:_:_g_e_t___d_e_l_e_t_e_r │ │ │ │ -constexpr deleter_type & get_deleter() noexcept │ │ │ │ -Return a reference to the stored deleter. │ │ │ │ -DDeeffiinniittiioonn _u_n_i_q_u_e___p_t_r_._h_:_7_3_9 │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___p_t_r_<_ ___T_p_[_]_,_ ___D_p_ _>_:_:_r_e_l_e_a_s_e │ │ │ │ -constexpr pointer release() noexcept │ │ │ │ -Release ownership of any stored pointer. │ │ │ │ -DDeeffiinniittiioonn _u_n_i_q_u_e___p_t_r_._h_:_7_5_8 │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___p_t_r_<_ ___T_p_[_]_,_ ___D_p_ _>_:_:_u_n_i_q_u_e___p_t_r │ │ │ │ -constexpr unique_ptr(nullptr_t) noexcept │ │ │ │ -Creates a unique_ptr that owns nothing. │ │ │ │ -DDeeffiinniittiioonn _u_n_i_q_u_e___p_t_r_._h_:_6_5_4 │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___p_t_r_<_ ___T_p_[_]_,_ ___D_p_ _>_:_:_s_w_a_p │ │ │ │ -constexpr void swap(unique_ptr &__u) noexcept │ │ │ │ -Exchange the pointer and deleter with another object. │ │ │ │ -DDeeffiinniittiioonn _u_n_i_q_u_e___p_t_r_._h_:_7_9_1 │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___p_t_r_<_ ___T_p_[_]_,_ ___D_p_ _>_:_:_g_e_t___d_e_l_e_t_e_r │ │ │ │ -constexpr const deleter_type & get_deleter() const noexcept │ │ │ │ -Return a reference to the stored deleter. │ │ │ │ -DDeeffiinniittiioonn _u_n_i_q_u_e___p_t_r_._h_:_7_4_5 │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___p_t_r_<_ ___T_p_[_]_,_ ___D_p_ _>_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ -constexpr unique_ptr & operator=(nullptr_t) noexcept │ │ │ │ -Reset the unique_ptr to empty, invoking the deleter if necessary. │ │ │ │ -DDeeffiinniittiioonn _u_n_i_q_u_e___p_t_r_._h_:_7_1_3 │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___p_t_r_<_ ___T_p_[_]_,_ ___D_p_ _>_:_:_u_n_i_q_u_e___p_t_r │ │ │ │ -constexpr unique_ptr() noexcept │ │ │ │ -Default constructor, creates a unique_ptr that owns nothing. │ │ │ │ -DDeeffiinniittiioonn _u_n_i_q_u_e___p_t_r_._h_:_5_8_7 │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___p_t_r_<_ ___T_p_[_]_,_ ___D_p_ _>_:_:_r_e_s_e_t │ │ │ │ -constexpr void reset(_Up __p) noexcept │ │ │ │ -Replace the stored pointer. │ │ │ │ -DDeeffiinniittiioonn _u_n_i_q_u_e___p_t_r_._h_:_7_8_1 │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___p_t_r_<_ ___T_p_[_]_,_ ___D_p_ _>_:_:_g_e_t │ │ │ │ -constexpr pointer get() const noexcept │ │ │ │ -Return the stored pointer. │ │ │ │ -DDeeffiinniittiioonn _u_n_i_q_u_e___p_t_r_._h_:_7_3_3 │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___p_t_r_<_ ___T_p_[_]_,_ ___D_p_ _>_:_:_u_n_i_q_u_e___p_t_r │ │ │ │ -constexpr unique_ptr(_Up __p, __enable_if_t:: │ │ │ │ -value, _Del && > __d) noexcept │ │ │ │ -DDeeffiinniittiioonn _u_n_i_q_u_e___p_t_r_._h_:_6_3_6 │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___p_t_r_<_ ___T_p_[_]_,_ ___D_p_ _>_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ -constexpr enable_if< __and_< __safe_conversion_up< _Up, _Ep >, is_assignable< │ │ │ │ -deleter_type &, _Ep && > >::value, unique_ptr & >::type operator=(unique_ptr< │ │ │ │ -_Up, _Ep > &&__u) noexcept │ │ │ │ -Assignment from another type. │ │ │ │ -DDeeffiinniittiioonn _u_n_i_q_u_e___p_t_r_._h_:_7_0_3 │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___p_t_r_<_ ___T_p_[_]_,_ ___D_p_ _>_:_:_u_n_i_q_u_e___p_t_r │ │ │ │ -constexpr unique_ptr(_Up __p) noexcept │ │ │ │ -DDeeffiinniittiioonn _u_n_i_q_u_e___p_t_r_._h_:_6_0_5 │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___p_t_r_<_ ___T_p_[_]_,_ ___D_p_ _>_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ -unique_ptr & operator=(unique_ptr &&)=default │ │ │ │ -Move assignment operator. │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___p_t_r_<_ ___T_p_[_]_,_ ___D_p_ _>_:_:_u_n_i_q_u_e___p_t_r │ │ │ │ -unique_ptr(unique_ptr &&)=default │ │ │ │ -Move constructor. │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___p_t_r_<_ ___T_p_[_]_,_ ___D_p_ _>_:_:_u_n_i_q_u_e___p_t_r │ │ │ │ -constexpr unique_ptr(_Up __p, const deleter_type &__d) noexcept │ │ │ │ -DDeeffiinniittiioonn _u_n_i_q_u_e___p_t_r_._h_:_6_2_1 │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___p_t_r_<_ ___T_p_[_]_,_ ___D_p_ _>_:_:_~_u_n_i_q_u_e___p_t_r │ │ │ │ -~unique_ptr() │ │ │ │ -Destructor, invokes the deleter if the stored pointer is not null. │ │ │ │ -DDeeffiinniittiioonn _u_n_i_q_u_e___p_t_r_._h_:_6_7_2 │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___p_t_r_<_ ___T_p_[_]_,_ ___D_p_ _>_:_:_o_p_e_r_a_t_o_r_[_] │ │ │ │ -constexpr std::add_lvalue_reference< element_type >::type operator[](size_t │ │ │ │ -__i) const │ │ │ │ -Access an element of owned array. │ │ │ │ -DDeeffiinniittiioonn _u_n_i_q_u_e___p_t_r_._h_:_7_2_4 │ │ │ │ +_s_t_d_:_:_s_t_r_e_a_m_s_i_z_e │ │ │ │ +ptrdiff_t streamsize │ │ │ │ +Integral type for I/O operation counts and buffer sizes. │ │ │ │ +DDeeffiinniittiioonn _p_o_s_t_y_p_e_s_._h_:_6_8 │ │ │ │ +_s_t_d_:_:_b_a_s_i_c___f_i_l_e_b_u_f │ │ │ │ +The actual work of input and output (for files). │ │ │ │ +DDeeffiinniittiioonn _f_s_t_r_e_a_m_:_8_6 │ │ │ │ +_s_t_d_:_:_b_a_s_i_c___f_i_l_e_b_u_f_:_:_s_e_e_k_o_f_f │ │ │ │ +virtual pos_type seekoff(off_type __off, ios_base::seekdir __way, ios_base:: │ │ │ │ +openmode __mode=ios_base::in|ios_base::out) │ │ │ │ +Alters the stream positions. │ │ │ │ +DDeeffiinniittiioonn _f_s_t_r_e_a_m_._t_c_c_:_8_3_3 │ │ │ │ +_s_t_d_:_:_b_a_s_i_c___f_i_l_e_b_u_f_:_:_u_n_d_e_r_f_l_o_w │ │ │ │ +virtual int_type underflow() │ │ │ │ +Fetches more data from the controlled sequence. │ │ │ │ +DDeeffiinniittiioonn _f_s_t_r_e_a_m_._t_c_c_:_3_2_4 │ │ │ │ +_s_t_d_:_:_b_a_s_i_c___f_i_l_e_b_u_f_:_:_s_h_o_w_m_a_n_y_c │ │ │ │ +virtual streamsize showmanyc() │ │ │ │ +Investigating the data available. │ │ │ │ +DDeeffiinniittiioonn _f_s_t_r_e_a_m_._t_c_c_:_2_9_8 │ │ │ │ +_s_t_d_:_:_b_a_s_i_c___f_i_l_e_b_u_f_:_:_i_m_b_u_e │ │ │ │ +virtual void imbue(const locale &__loc) │ │ │ │ +Changes translations. │ │ │ │ +DDeeffiinniittiioonn _f_s_t_r_e_a_m_._t_c_c_:_1_0_3_0 │ │ │ │ +_s_t_d_:_:_b_a_s_i_c___f_i_l_e_b_u_f_:_:_x_s_g_e_t_n │ │ │ │ +virtual streamsize xsgetn(char_type *__s, streamsize __n) │ │ │ │ +Multiple character extraction. │ │ │ │ +DDeeffiinniittiioonn _f_s_t_r_e_a_m_._t_c_c_:_6_7_0 │ │ │ │ +_s_t_d_:_:_b_a_s_i_c___f_i_l_e_b_u_f_:_:_c_l_o_s_e │ │ │ │ +__filebuf_type * close() │ │ │ │ +Closes the currently associated file. │ │ │ │ +DDeeffiinniittiioonn _f_s_t_r_e_a_m_._t_c_c_:_2_5_0 │ │ │ │ +_s_t_d_:_:_b_a_s_i_c___f_i_l_e_b_u_f_:_:_s_e_e_k_p_o_s │ │ │ │ +virtual pos_type seekpos(pos_type __pos, ios_base::openmode __mode=ios_base:: │ │ │ │ +in|ios_base::out) │ │ │ │ +Alters the stream positions. │ │ │ │ +DDeeffiinniittiioonn _f_s_t_r_e_a_m_._t_c_c_:_8_9_3 │ │ │ │ +_s_t_d_:_:_b_a_s_i_c___f_i_l_e_b_u_f_:_:_p_b_a_c_k_f_a_i_l │ │ │ │ +virtual int_type pbackfail(int_type __c=_Traits::eof()) │ │ │ │ +Tries to back up the input sequence. │ │ │ │ +DDeeffiinniittiioonn _f_s_t_r_e_a_m_._t_c_c_:_4_8_3 │ │ │ │ +_s_t_d_:_:_b_a_s_i_c___f_i_l_e_b_u_f_:_:_x_s_p_u_t_n │ │ │ │ +virtual streamsize xsputn(const char_type *__s, streamsize __n) │ │ │ │ +Multiple character insertion. │ │ │ │ +DDeeffiinniittiioonn _f_s_t_r_e_a_m_._t_c_c_:_7_5_6 │ │ │ │ +_s_t_d_:_:_b_a_s_i_c___f_i_l_e_b_u_f_:_:_o_v_e_r_f_l_o_w │ │ │ │ +virtual int_type overflow(int_type __c=_Traits::eof()) │ │ │ │ +Consumes data from the buffer; writes to the controlled sequence. │ │ │ │ +DDeeffiinniittiioonn _f_s_t_r_e_a_m_._t_c_c_:_5_4_2 │ │ │ │ +_s_t_d_:_:_b_a_s_i_c___f_i_l_e_b_u_f_:_:_o_p_e_n │ │ │ │ +__filebuf_type * open(const char *__s, ios_base::openmode __mode) │ │ │ │ +Opens an external file. │ │ │ │ +DDeeffiinniittiioonn _f_s_t_r_e_a_m_._t_c_c_:_1_8_0 │ │ │ │ +_s_t_d_:_:_b_a_s_i_c___f_i_l_e_b_u_f_:_:_b_a_s_i_c___f_i_l_e_b_u_f │ │ │ │ +basic_filebuf() │ │ │ │ +Does not open any files. │ │ │ │ +DDeeffiinniittiioonn _f_s_t_r_e_a_m_._t_c_c_:_8_1 │ │ │ │ +_s_t_d_:_:_b_a_s_i_c___f_i_l_e_b_u_f_:_:_s_y_n_c │ │ │ │ +virtual int sync() │ │ │ │ +Synchronizes the buffer arrays with the controlled sequences. │ │ │ │ +DDeeffiinniittiioonn _f_s_t_r_e_a_m_._t_c_c_:_1_0_1_3 │ │ │ │ +_s_t_d_:_:_b_a_s_i_c___f_i_l_e_b_u_f_:_:_s_e_t_b_u_f │ │ │ │ +virtual __streambuf_type * setbuf(char_type *__s, streamsize __n) │ │ │ │ +Manipulates the buffer. │ │ │ │ +DDeeffiinniittiioonn _f_s_t_r_e_a_m_._t_c_c_:_8_0_4 │ │ │ │ +_s_t_d_:_:_b_a_s_i_c___s_t_r_e_a_m_b_u_f_<_ _c_h_a_r___t_y_p_e_,_ _t_r_a_i_t_s___t_y_p_e_ _> │ │ │ │ +_s_t_d_:_:_b_a_s_i_c___s_t_r_e_a_m_b_u_f_:_:___M___b_u_f___l_o_c_a_l_e │ │ │ │ +locale _M_buf_locale │ │ │ │ +Current locale setting. │ │ │ │ +DDeeffiinniittiioonn _s_t_r_e_a_m_b_u_f_:_1_9_7 │ │ │ │ +_s_t_d_:_:_i_o_s___b_a_s_e │ │ │ │ +The base of the I/O class hierarchy. │ │ │ │ +DDeeffiinniittiioonn _i_o_s___b_a_s_e_._h_:_2_3_4 │ │ │ │ +_s_t_d_:_:_i_o_s___b_a_s_e_:_:_c_u_r │ │ │ │ +static const seekdir cur │ │ │ │ +Request a seek relative to the current position within the sequence. │ │ │ │ +DDeeffiinniittiioonn _i_o_s___b_a_s_e_._h_:_4_9_8 │ │ │ │ +_s_t_d_:_:_i_o_s___b_a_s_e_:_:_b_e_g │ │ │ │ +static const seekdir beg │ │ │ │ +Request a seek relative to the beginning of the stream. │ │ │ │ +DDeeffiinniittiioonn _i_o_s___b_a_s_e_._h_:_4_9_5 │ │ │ │ +_s_t_d_:_:_i_o_s___b_a_s_e_:_:_e_n_d │ │ │ │ +static const seekdir end │ │ │ │ +Request a seek relative to the current end of the sequence. │ │ │ │ +DDeeffiinniittiioonn _i_o_s___b_a_s_e_._h_:_5_0_1 │ │ │ │ +_s_t_d_:_:_i_o_s___b_a_s_e_:_:_i_n │ │ │ │ +static const openmode in │ │ │ │ +Open for input. Default for ifstream and fstream. │ │ │ │ +DDeeffiinniittiioonn _i_o_s___b_a_s_e_._h_:_4_6_6 │ │ │ │ +_s_t_d_:_:_i_o_s___b_a_s_e_:_:_o_u_t │ │ │ │ +static const openmode out │ │ │ │ +Open for output. Default for ofstream and fstream. │ │ │ │ +DDeeffiinniittiioonn _i_o_s___b_a_s_e_._h_:_4_6_9 │ │ │ │ +_s_t_d_:_:_i_o_s___b_a_s_e_:_:_b_i_n_a_r_y │ │ │ │ +static const openmode binary │ │ │ │ +Perform input and output in binary mode (as opposed to text mode). This is │ │ │ │ +probably not what you thin... │ │ │ │ +DDeeffiinniittiioonn _i_o_s___b_a_s_e_._h_:_4_6_3 │ │ │ │ +_s_t_d_:_:_i_o_s___b_a_s_e_:_:_o_p_e_n_m_o_d_e │ │ │ │ +_Ios_Openmode openmode │ │ │ │ +This is a bitmask type. │ │ │ │ +DDeeffiinniittiioonn _i_o_s___b_a_s_e_._h_:_4_5_2 │ │ │ │ +_s_t_d_:_:_i_o_s___b_a_s_e_:_:_a_p_p │ │ │ │ +static const openmode app │ │ │ │ +Seek to end before each write. │ │ │ │ +DDeeffiinniittiioonn _i_o_s___b_a_s_e_._h_:_4_5_5 │ │ │ │ +_s_t_d_:_:_i_o_s___b_a_s_e_:_:_a_t_e │ │ │ │ +static const openmode ate │ │ │ │ +Open and seek to end immediately after opening. │ │ │ │ +DDeeffiinniittiioonn _i_o_s___b_a_s_e_._h_:_4_5_8 │ │ │ │ +_s_t_d_:_:_l_o_c_a_l_e │ │ │ │ +Container class for localization functionality. │ │ │ │ +DDeeffiinniittiioonn _l_o_c_a_l_e___c_l_a_s_s_e_s_._h_:_6_3 │ │ │ │ _s_t_d_:_:_a_u_t_o___p_t_r___r_e_f │ │ │ │ DDeeffiinniittiioonn _a_u_t_o___p_t_r_._h_:_4_9 │ │ │ │ * _b_i_t_s │ │ │ │ - * _u_n_i_q_u_e___p_t_r_._h │ │ │ │ + * _f_s_t_r_e_a_m_._t_c_c │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-12-base/libstdc++/user/a00383.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: unique_lock.h File Reference │ │ │ +libstdc++: atomic_lockfree_defines.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -46,40 +46,52 @@ │ │ │ /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */ │ │ │ $(document).ready(function(){initNavTree('a00383.html',''); initResizable(); }); │ │ │ /* @license-end */ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -Classes | │ │ │ -Namespaces
│ │ │ -
unique_lock.h File Reference
│ │ │ +Macros
│ │ │ +
atomic_lockfree_defines.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ -

│ │ │ -Classes

class  std::unique_lock< _Mutex >
 
│ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ -Namespaces

namespace  std
 

│ │ │ +Macros

#define ATOMIC_BOOL_LOCK_FREE
 
#define ATOMIC_CHAR16_T_LOCK_FREE
 
#define ATOMIC_CHAR32_T_LOCK_FREE
 
#define ATOMIC_CHAR_LOCK_FREE
 
#define ATOMIC_INT_LOCK_FREE
 
#define ATOMIC_LLONG_LOCK_FREE
 
#define ATOMIC_LONG_LOCK_FREE
 
#define ATOMIC_POINTER_LOCK_FREE
 
#define ATOMIC_SHORT_LOCK_FREE
 
#define ATOMIC_WCHAR_T_LOCK_FREE
 
│ │ │

Detailed Description

│ │ │ -

This is an internal header file, included by other library headers. Do not attempt to use it directly. Instead, include <mutex>.

│ │ │ +

This is an internal header file, included by other library headers. Do not attempt to use it directly. Instead, include <atomic>.

│ │ │ │ │ │ -

Definition in file unique_lock.h.

│ │ │ +

Definition in file atomic_lockfree_defines.h.

│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,17 +1,32 @@ │ │ │ │ libstdc++ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ -unique_lock.h File Reference │ │ │ │ +_M_a_c_r_o_s │ │ │ │ +atomic_lockfree_defines.h File Reference │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -CCllaasssseess │ │ │ │ -class   _s_t_d_:_:_u_n_i_q_u_e___l_o_c_k_<_ ___M_u_t_e_x_ _> │ │ │ │ +MMaaccrrooss │ │ │ │ +#define  _A_T_O_M_I_C___B_O_O_L___L_O_C_K___F_R_E_E │ │ │ │   │ │ │ │ -NNaammeessppaacceess │ │ │ │ -namespace   _s_t_d │ │ │ │ +#define  _A_T_O_M_I_C___C_H_A_R_1_6___T___L_O_C_K___F_R_E_E │ │ │ │ +  │ │ │ │ +#define  _A_T_O_M_I_C___C_H_A_R_3_2___T___L_O_C_K___F_R_E_E │ │ │ │ +  │ │ │ │ +#define  _A_T_O_M_I_C___C_H_A_R___L_O_C_K___F_R_E_E │ │ │ │ +  │ │ │ │ +#define  _A_T_O_M_I_C___I_N_T___L_O_C_K___F_R_E_E │ │ │ │ +  │ │ │ │ +#define  _A_T_O_M_I_C___L_L_O_N_G___L_O_C_K___F_R_E_E │ │ │ │ +  │ │ │ │ +#define  _A_T_O_M_I_C___L_O_N_G___L_O_C_K___F_R_E_E │ │ │ │ +  │ │ │ │ +#define  _A_T_O_M_I_C___P_O_I_N_T_E_R___L_O_C_K___F_R_E_E │ │ │ │ +  │ │ │ │ +#define  _A_T_O_M_I_C___S_H_O_R_T___L_O_C_K___F_R_E_E │ │ │ │ +  │ │ │ │ +#define  _A_T_O_M_I_C___W_C_H_A_R___T___L_O_C_K___F_R_E_E │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ This is an internal header file, included by other library headers. Do not │ │ │ │ -attempt to use it directly. Instead, include . │ │ │ │ -Definition in file _u_n_i_q_u_e___l_o_c_k_._h. │ │ │ │ +attempt to use it directly. Instead, include . │ │ │ │ +Definition in file _a_t_o_m_i_c___l_o_c_k_f_r_e_e___d_e_f_i_n_e_s_._h. │ │ │ │ * _b_i_t_s │ │ │ │ - * _u_n_i_q_u_e___l_o_c_k_._h │ │ │ │ + * _a_t_o_m_i_c___l_o_c_k_f_r_e_e___d_e_f_i_n_e_s_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-12-base/libstdc++/user/a00383_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: unique_lock.h Source File │ │ │ +libstdc++: atomic_lockfree_defines.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -45,18 +45,18 @@ │ │ │ │ │ │
│ │ │
│ │ │ -
unique_lock.h
│ │ │ +
atomic_lockfree_defines.h
│ │ │
│ │ │
│ │ │ -Go to the documentation of this file.
1// std::unique_lock implementation -*- C++ -*-
│ │ │ +Go to the documentation of this file.
1// -*- C++ -*- header.
│ │ │
2
│ │ │
3// Copyright (C) 2008-2022 Free Software Foundation, Inc.
│ │ │
4//
│ │ │
5// This file is part of the GNU ISO C++ Library. This library is free
│ │ │
6// software; you can redistribute it and/or modify it under the
│ │ │
7// terms of the GNU General Public License as published by the
│ │ │
8// Free Software Foundation; either version 3, or (at your option)
│ │ │ @@ -72,260 +72,60 @@ │ │ │
18// 3.1, as published by the Free Software Foundation.
│ │ │
19
│ │ │
20// You should have received a copy of the GNU General Public License and
│ │ │
21// a copy of the GCC Runtime Library Exception along with this program;
│ │ │
22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
│ │ │
23// <http://www.gnu.org/licenses/>.
│ │ │
24
│ │ │ -
25/** @file bits/unique_lock.h
│ │ │ +
25/** @file bits/atomic_lockfree_defines.h
│ │ │
26 * This is an internal header file, included by other library headers.
│ │ │ -
27 * Do not attempt to use it directly. @headername{mutex}
│ │ │ +
27 * Do not attempt to use it directly. @headername{atomic}
│ │ │
28 */
│ │ │
29
│ │ │ -
30#ifndef _GLIBCXX_UNIQUE_LOCK_H
│ │ │ -
31#define _GLIBCXX_UNIQUE_LOCK_H 1
│ │ │ +
30#ifndef _GLIBCXX_ATOMIC_LOCK_FREE_H
│ │ │ +
31#define _GLIBCXX_ATOMIC_LOCK_FREE_H 1
│ │ │
32
│ │ │
33#pragma GCC system_header
│ │ │ -
34
│ │ │ -
35#if __cplusplus < 201103L
│ │ │ -
36# include <bits/c++0x_warning.h>
│ │ │ -
37#else
│ │ │ -
38
│ │ │ -
39#include <bits/chrono.h>
│ │ │ -
40#include <bits/move.h> // for std::swap
│ │ │ -
41#include <bits/std_mutex.h> // for std::defer_lock_t
│ │ │ -
42
│ │ │ -
43namespace std _GLIBCXX_VISIBILITY(default)
│ │ │ -
44{
│ │ │ -
45_GLIBCXX_BEGIN_NAMESPACE_VERSION
│ │ │ -
46
│ │ │ -
47 /** @brief A movable scoped lock type.
│ │ │ -
48 *
│ │ │ -
49 * A unique_lock controls mutex ownership within a scope. Ownership of the
│ │ │ -
50 * mutex can be delayed until after construction and can be transferred
│ │ │ -
51 * to another unique_lock by move construction or move assignment. If a
│ │ │ -
52 * mutex lock is owned when the destructor runs ownership will be released.
│ │ │ -
53 *
│ │ │ -
54 * @headerfile mutex
│ │ │ -
55 * @ingroup mutexes
│ │ │ -
56 * @since C++11
│ │ │ -
57 */
│ │ │ -
58 template<typename _Mutex>
│ │ │ -
│ │ │ - │ │ │ -
60 {
│ │ │ -
61 public:
│ │ │ -
62 typedef _Mutex mutex_type;
│ │ │ -
63
│ │ │ -
64 unique_lock() noexcept
│ │ │ -
65 : _M_device(0), _M_owns(false)
│ │ │ -
66 { }
│ │ │ -
67
│ │ │ -
68 explicit unique_lock(mutex_type& __m)
│ │ │ -
69 : _M_device(std::__addressof(__m)), _M_owns(false)
│ │ │ -
70 {
│ │ │ -
71 lock();
│ │ │ -
72 _M_owns = true;
│ │ │ -
73 }
│ │ │ -
74
│ │ │ -
75 unique_lock(mutex_type& __m, defer_lock_t) noexcept
│ │ │ -
76 : _M_device(std::__addressof(__m)), _M_owns(false)
│ │ │ -
77 { }
│ │ │ -
78
│ │ │ -
79 unique_lock(mutex_type& __m, try_to_lock_t)
│ │ │ -
80 : _M_device(std::__addressof(__m)), _M_owns(_M_device->try_lock())
│ │ │ -
81 { }
│ │ │ -
82
│ │ │ -
83 unique_lock(mutex_type& __m, adopt_lock_t) noexcept
│ │ │ -
84 : _M_device(std::__addressof(__m)), _M_owns(true)
│ │ │ -
85 {
│ │ │ -
86 // XXX calling thread owns mutex
│ │ │ -
87 }
│ │ │ -
88
│ │ │ -
89 template<typename _Clock, typename _Duration>
│ │ │ -
90 unique_lock(mutex_type& __m,
│ │ │ - │ │ │ -
92 : _M_device(std::__addressof(__m)),
│ │ │ -
93 _M_owns(_M_device->try_lock_until(__atime))
│ │ │ -
94 { }
│ │ │ -
95
│ │ │ -
96 template<typename _Rep, typename _Period>
│ │ │ -
97 unique_lock(mutex_type& __m,
│ │ │ - │ │ │ -
99 : _M_device(std::__addressof(__m)),
│ │ │ -
100 _M_owns(_M_device->try_lock_for(__rtime))
│ │ │ -
101 { }
│ │ │ -
102
│ │ │ - │ │ │ -
104 {
│ │ │ -
105 if (_M_owns)
│ │ │ -
106 unlock();
│ │ │ -
107 }
│ │ │ -
108
│ │ │ -
109 unique_lock(const unique_lock&) = delete;
│ │ │ -
110 unique_lock& operator=(const unique_lock&) = delete;
│ │ │ -
111
│ │ │ -
112 unique_lock(unique_lock&& __u) noexcept
│ │ │ -
113 : _M_device(__u._M_device), _M_owns(__u._M_owns)
│ │ │ -
114 {
│ │ │ -
115 __u._M_device = 0;
│ │ │ -
116 __u._M_owns = false;
│ │ │ -
117 }
│ │ │ -
118
│ │ │ -
119 unique_lock& operator=(unique_lock&& __u) noexcept
│ │ │ -
120 {
│ │ │ -
121 if(_M_owns)
│ │ │ -
122 unlock();
│ │ │ -
123
│ │ │ -
124 unique_lock(std::move(__u)).swap(*this);
│ │ │ -
125
│ │ │ -
126 __u._M_device = 0;
│ │ │ -
127 __u._M_owns = false;
│ │ │ -
128
│ │ │ -
129 return *this;
│ │ │ -
130 }
│ │ │ -
131
│ │ │ -
132 void
│ │ │ -
133 lock()
│ │ │ -
134 {
│ │ │ -
135 if (!_M_device)
│ │ │ -
136 __throw_system_error(int(errc::operation_not_permitted));
│ │ │ -
137 else if (_M_owns)
│ │ │ -
138 __throw_system_error(int(errc::resource_deadlock_would_occur));
│ │ │ -
139 else
│ │ │ -
140 {
│ │ │ -
141 _M_device->lock();
│ │ │ -
142 _M_owns = true;
│ │ │ -
143 }
│ │ │ -
144 }
│ │ │ -
145
│ │ │ -
146 bool
│ │ │ -
147 try_lock()
│ │ │ -
148 {
│ │ │ -
149 if (!_M_device)
│ │ │ -
150 __throw_system_error(int(errc::operation_not_permitted));
│ │ │ -
151 else if (_M_owns)
│ │ │ -
152 __throw_system_error(int(errc::resource_deadlock_would_occur));
│ │ │ -
153 else
│ │ │ -
154 {
│ │ │ -
155 _M_owns = _M_device->try_lock();
│ │ │ -
156 return _M_owns;
│ │ │ -
157 }
│ │ │ -
158 }
│ │ │ -
159
│ │ │ -
160 template<typename _Clock, typename _Duration>
│ │ │ -
161 bool
│ │ │ - │ │ │ -
163 {
│ │ │ -
164 if (!_M_device)
│ │ │ -
165 __throw_system_error(int(errc::operation_not_permitted));
│ │ │ -
166 else if (_M_owns)
│ │ │ -
167 __throw_system_error(int(errc::resource_deadlock_would_occur));
│ │ │ -
168 else
│ │ │ -
169 {
│ │ │ -
170 _M_owns = _M_device->try_lock_until(__atime);
│ │ │ -
171 return _M_owns;
│ │ │ -
172 }
│ │ │ -
173 }
│ │ │ -
174
│ │ │ -
175 template<typename _Rep, typename _Period>
│ │ │ -
176 bool
│ │ │ -
177 try_lock_for(const chrono::duration<_Rep, _Period>& __rtime)
│ │ │ -
178 {
│ │ │ -
179 if (!_M_device)
│ │ │ -
180 __throw_system_error(int(errc::operation_not_permitted));
│ │ │ -
181 else if (_M_owns)
│ │ │ -
182 __throw_system_error(int(errc::resource_deadlock_would_occur));
│ │ │ -
183 else
│ │ │ -
184 {
│ │ │ -
185 _M_owns = _M_device->try_lock_for(__rtime);
│ │ │ -
186 return _M_owns;
│ │ │ -
187 }
│ │ │ -
188 }
│ │ │ -
189
│ │ │ -
190 void
│ │ │ -
191 unlock()
│ │ │ -
192 {
│ │ │ -
193 if (!_M_owns)
│ │ │ -
194 __throw_system_error(int(errc::operation_not_permitted));
│ │ │ -
195 else if (_M_device)
│ │ │ -
196 {
│ │ │ -
197 _M_device->unlock();
│ │ │ -
198 _M_owns = false;
│ │ │ -
199 }
│ │ │ -
200 }
│ │ │ -
201
│ │ │ -
202 void
│ │ │ -
203 swap(unique_lock& __u) noexcept
│ │ │ -
204 {
│ │ │ -
205 std::swap(_M_device, __u._M_device);
│ │ │ -
206 std::swap(_M_owns, __u._M_owns);
│ │ │ -
207 }
│ │ │ -
208
│ │ │ -
209 mutex_type*
│ │ │ -
210 release() noexcept
│ │ │ -
211 {
│ │ │ -
212 mutex_type* __ret = _M_device;
│ │ │ -
213 _M_device = 0;
│ │ │ -
214 _M_owns = false;
│ │ │ -
215 return __ret;
│ │ │ -
216 }
│ │ │ -
217
│ │ │ -
218 bool
│ │ │ -
219 owns_lock() const noexcept
│ │ │ -
220 { return _M_owns; }
│ │ │ -
221
│ │ │ -
222 explicit operator bool() const noexcept
│ │ │ -
223 { return owns_lock(); }
│ │ │ -
224
│ │ │ -
225 mutex_type*
│ │ │ -
226 mutex() const noexcept
│ │ │ -
227 { return _M_device; }
│ │ │ -
228
│ │ │ -
229 private:
│ │ │ -
230 mutex_type* _M_device;
│ │ │ -
231 bool _M_owns;
│ │ │ -
232 };
│ │ │ -
│ │ │ -
233
│ │ │ -
234 /// Swap overload for unique_lock objects.
│ │ │ -
235 /// @relates unique_lock
│ │ │ -
236 template<typename _Mutex>
│ │ │ -
237 inline void
│ │ │ -
│ │ │ - │ │ │ -
239 { __x.swap(__y); }
│ │ │ -
│ │ │ -
240
│ │ │ -
241_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ -
242} // namespace
│ │ │ -
243
│ │ │ -
244#endif // C++11
│ │ │ -
245#endif // _GLIBCXX_UNIQUE_LOCK_H
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
constexpr std::remove_reference< _Tp >::type && move(_Tp &&__t) noexcept
Convert a value to an rvalue.
Definition move.h:104
│ │ │ -
void swap(any &__x, any &__y) noexcept
Exchange the states of two any objects.
Definition any:429
│ │ │ -
constexpr _Tp * __addressof(_Tp &__r) noexcept
Same as C++11 std::addressof.
Definition move.h:49
│ │ │ -
ISO C++ entities toplevel namespace is std.
│ │ │ -
chrono::duration represents a distance between two points in time
Definition chrono.h:488
│ │ │ -
chrono::time_point represents a point in time as measured by a clock
Definition chrono.h:901
│ │ │ - │ │ │ -
Do not acquire ownership of the mutex.
Definition std_mutex.h:215
│ │ │ -
Try to acquire ownership of the mutex without blocking.
Definition std_mutex.h:218
│ │ │ -
Assume the calling thread has already obtained mutex ownership and manage it.
Definition std_mutex.h:222
│ │ │ -
A movable scoped lock type.
Definition unique_lock.h:60
│ │ │ -
void swap(unique_lock< _Mutex > &__x, unique_lock< _Mutex > &__y) noexcept
Swap overload for unique_lock objects.
│ │ │ - │ │ │ +
34
│ │ │ +
35/**
│ │ │ +
36 * @addtogroup atomics
│ │ │ +
37 * @{
│ │ │ +
38 */
│ │ │ +
39
│ │ │ +
40/**
│ │ │ +
41 * Lock-free property.
│ │ │ +
42 *
│ │ │ +
43 * 0 indicates that the types are never lock-free.
│ │ │ +
44 * 1 indicates that the types are sometimes lock-free.
│ │ │ +
45 * 2 indicates that the types are always lock-free.
│ │ │ +
46 */
│ │ │ +
47
│ │ │ +
48#if __cplusplus >= 201103L
│ │ │ +
49#define ATOMIC_BOOL_LOCK_FREE __GCC_ATOMIC_BOOL_LOCK_FREE
│ │ │ +
50#define ATOMIC_CHAR_LOCK_FREE __GCC_ATOMIC_CHAR_LOCK_FREE
│ │ │ +
51#define ATOMIC_WCHAR_T_LOCK_FREE __GCC_ATOMIC_WCHAR_T_LOCK_FREE
│ │ │ +
52#ifdef _GLIBCXX_USE_CHAR8_T
│ │ │ +
53#define ATOMIC_CHAR8_T_LOCK_FREE __GCC_ATOMIC_CHAR8_T_LOCK_FREE
│ │ │ +
54#endif
│ │ │ +
55#define ATOMIC_CHAR16_T_LOCK_FREE __GCC_ATOMIC_CHAR16_T_LOCK_FREE
│ │ │ +
56#define ATOMIC_CHAR32_T_LOCK_FREE __GCC_ATOMIC_CHAR32_T_LOCK_FREE
│ │ │ +
57#define ATOMIC_SHORT_LOCK_FREE __GCC_ATOMIC_SHORT_LOCK_FREE
│ │ │ +
58#define ATOMIC_INT_LOCK_FREE __GCC_ATOMIC_INT_LOCK_FREE
│ │ │ +
59#define ATOMIC_LONG_LOCK_FREE __GCC_ATOMIC_LONG_LOCK_FREE
│ │ │ +
60#define ATOMIC_LLONG_LOCK_FREE __GCC_ATOMIC_LLONG_LOCK_FREE
│ │ │ +
61#define ATOMIC_POINTER_LOCK_FREE __GCC_ATOMIC_POINTER_LOCK_FREE
│ │ │ +
62#endif
│ │ │ +
63
│ │ │ +
64/// @} group atomics
│ │ │ +
65
│ │ │ +
66#endif
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,11 +1,11 @@ │ │ │ │ libstdc++ │ │ │ │ -unique_lock.h │ │ │ │ +atomic_lockfree_defines.h │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -1// std::unique_lock implementation -*- C++ -*- │ │ │ │ +1// -*- C++ -*- header. │ │ │ │ 2 │ │ │ │ 3// Copyright (C) 2008-2022 Free Software Foundation, Inc. │ │ │ │ 4// │ │ │ │ 5// This file is part of the GNU ISO C++ Library. This library is free │ │ │ │ 6// software; you can redistribute it and/or modify it under the │ │ │ │ 7// terms of the GNU General Public License as published by the │ │ │ │ 8// Free Software Foundation; either version 3, or (at your option) │ │ │ │ @@ -21,275 +21,52 @@ │ │ │ │ 18// 3.1, as published by the Free Software Foundation. │ │ │ │ 19 │ │ │ │ 20// You should have received a copy of the GNU General Public License and │ │ │ │ 21// a copy of the GCC Runtime Library Exception along with this program; │ │ │ │ 22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see │ │ │ │ 23// . │ │ │ │ 24 │ │ │ │ -25/** @file bits/unique_lock.h │ │ │ │ +25/** @file bits/atomic_lockfree_defines.h │ │ │ │ 26 * This is an internal header file, included by other library headers. │ │ │ │ -27 * Do not attempt to use it directly. @headername{mutex} │ │ │ │ +27 * Do not attempt to use it directly. @headername{atomic} │ │ │ │ 28 */ │ │ │ │ 29 │ │ │ │ -30#ifndef _GLIBCXX_UNIQUE_LOCK_H │ │ │ │ -31#define _GLIBCXX_UNIQUE_LOCK_H 1 │ │ │ │ +30#ifndef _GLIBCXX_ATOMIC_LOCK_FREE_H │ │ │ │ +31#define _GLIBCXX_ATOMIC_LOCK_FREE_H 1 │ │ │ │ 32 │ │ │ │ 33#pragma GCC system_header │ │ │ │ 34 │ │ │ │ -35#if __cplusplus < 201103L │ │ │ │ -36# include <_b_i_t_s_/_c_+_+_0_x___w_a_r_n_i_n_g_._h> │ │ │ │ -37#else │ │ │ │ -38 │ │ │ │ -39#include <_b_i_t_s_/_c_h_r_o_n_o_._h> │ │ │ │ -40#include <_b_i_t_s_/_m_o_v_e_._h> // for std::swap │ │ │ │ -41#include <_b_i_t_s_/_s_t_d___m_u_t_e_x_._h> // for std::defer_lock_t │ │ │ │ -42 │ │ │ │ -43namespace _s_t_d _GLIBCXX_VISIBILITY(default) │ │ │ │ -44{ │ │ │ │ -45_GLIBCXX_BEGIN_NAMESPACE_VERSION │ │ │ │ -46 │ │ │ │ -47 /** @brief A movable scoped lock type. │ │ │ │ -48 * │ │ │ │ -49 * A unique_lock controls mutex ownership within a scope. Ownership of the │ │ │ │ -50 * mutex can be delayed until after construction and can be transferred │ │ │ │ -51 * to another unique_lock by move construction or move assignment. If a │ │ │ │ -52 * mutex lock is owned when the destructor runs ownership will be released. │ │ │ │ -53 * │ │ │ │ -54 * @headerfile mutex │ │ │ │ -55 * @ingroup mutexes │ │ │ │ -56 * @since C++11 │ │ │ │ -57 */ │ │ │ │ -58 template │ │ │ │ -_5_9 class _u_n_i_q_u_e___l_o_c_k │ │ │ │ -60 { │ │ │ │ -61 public: │ │ │ │ -62 typedef ___M_u_t_e_x mutex_type; │ │ │ │ +35/** │ │ │ │ +36 * @addtogroup atomics │ │ │ │ +37 * @{ │ │ │ │ +38 */ │ │ │ │ +39 │ │ │ │ +40/** │ │ │ │ +41 * Lock-free property. │ │ │ │ +42 * │ │ │ │ +43 * 0 indicates that the types are never lock-free. │ │ │ │ +44 * 1 indicates that the types are sometimes lock-free. │ │ │ │ +45 * 2 indicates that the types are always lock-free. │ │ │ │ +46 */ │ │ │ │ +47 │ │ │ │ +48#if __cplusplus >= 201103L │ │ │ │ +_4_9#define ATOMIC_BOOL_LOCK_FREE __GCC_ATOMIC_BOOL_LOCK_FREE │ │ │ │ +50#define ATOMIC_CHAR_LOCK_FREE __GCC_ATOMIC_CHAR_LOCK_FREE │ │ │ │ +51#define ATOMIC_WCHAR_T_LOCK_FREE __GCC_ATOMIC_WCHAR_T_LOCK_FREE │ │ │ │ +52#ifdef _GLIBCXX_USE_CHAR8_T │ │ │ │ +53#define ATOMIC_CHAR8_T_LOCK_FREE __GCC_ATOMIC_CHAR8_T_LOCK_FREE │ │ │ │ +54#endif │ │ │ │ +55#define ATOMIC_CHAR16_T_LOCK_FREE __GCC_ATOMIC_CHAR16_T_LOCK_FREE │ │ │ │ +56#define ATOMIC_CHAR32_T_LOCK_FREE __GCC_ATOMIC_CHAR32_T_LOCK_FREE │ │ │ │ +57#define ATOMIC_SHORT_LOCK_FREE __GCC_ATOMIC_SHORT_LOCK_FREE │ │ │ │ +58#define ATOMIC_INT_LOCK_FREE __GCC_ATOMIC_INT_LOCK_FREE │ │ │ │ +59#define ATOMIC_LONG_LOCK_FREE __GCC_ATOMIC_LONG_LOCK_FREE │ │ │ │ +60#define ATOMIC_LLONG_LOCK_FREE __GCC_ATOMIC_LLONG_LOCK_FREE │ │ │ │ +61#define ATOMIC_POINTER_LOCK_FREE __GCC_ATOMIC_POINTER_LOCK_FREE │ │ │ │ +62#endif │ │ │ │ 63 │ │ │ │ -64 _u_n_i_q_u_e___l_o_c_k() noexcept │ │ │ │ -65 : _M_device(0), _M_owns(false) │ │ │ │ -66 { } │ │ │ │ -67 │ │ │ │ -68 explicit _u_n_i_q_u_e___l_o_c_k(mutex_type& _____m) │ │ │ │ -69 : _M_device(_s_t_d_:_:_____a_d_d_r_e_s_s_o_f(_____m)), _M_owns(false) │ │ │ │ -70 { │ │ │ │ -71 lock(); │ │ │ │ -72 _M_owns = true; │ │ │ │ -73 } │ │ │ │ -74 │ │ │ │ -75 _u_n_i_q_u_e___l_o_c_k(mutex_type& _____m, _d_e_f_e_r___l_o_c_k___t) noexcept │ │ │ │ -76 : _M_device(_s_t_d_:_:_____a_d_d_r_e_s_s_o_f(_____m)), _M_owns(false) │ │ │ │ -77 { } │ │ │ │ -78 │ │ │ │ -79 _u_n_i_q_u_e___l_o_c_k(mutex_type& _____m, _t_r_y___t_o___l_o_c_k___t) │ │ │ │ -80 : _M_device(_s_t_d_:_:_____a_d_d_r_e_s_s_o_f(_____m)), _M_owns(_M_device->try_lock()) │ │ │ │ -81 { } │ │ │ │ -82 │ │ │ │ -83 _u_n_i_q_u_e___l_o_c_k(mutex_type& _____m, _a_d_o_p_t___l_o_c_k___t) noexcept │ │ │ │ -84 : _M_device(_s_t_d_:_:_____a_d_d_r_e_s_s_o_f(_____m)), _M_owns(true) │ │ │ │ -85 { │ │ │ │ -86 // XXX calling thread owns mutex │ │ │ │ -87 } │ │ │ │ -88 │ │ │ │ -89 template │ │ │ │ -90 _u_n_i_q_u_e___l_o_c_k(mutex_type& _____m, │ │ │ │ -91 const _c_h_r_o_n_o_:_:_t_i_m_e___p_o_i_n_t_<___C_l_o_c_k_,_ ___D_u_r_a_t_i_o_n_>& _____a_t_i_m_e) │ │ │ │ -92 : _M_device(_s_t_d_:_:_____a_d_d_r_e_s_s_o_f(_____m)), │ │ │ │ -93 _M_owns(_M_device->try_lock_until(_____a_t_i_m_e)) │ │ │ │ -94 { } │ │ │ │ -95 │ │ │ │ -96 template │ │ │ │ -97 _u_n_i_q_u_e___l_o_c_k(mutex_type& _____m, │ │ │ │ -98 const _c_h_r_o_n_o_:_:_d_u_r_a_t_i_o_n_<___R_e_p_,_ ___P_e_r_i_o_d_>& _____r_t_i_m_e) │ │ │ │ -99 : _M_device(_s_t_d_:_:_____a_d_d_r_e_s_s_o_f(_____m)), │ │ │ │ -100 _M_owns(_M_device->try_lock_for(_____r_t_i_m_e)) │ │ │ │ -101 { } │ │ │ │ -102 │ │ │ │ -103 _~_u_n_i_q_u_e___l_o_c_k() │ │ │ │ -104 { │ │ │ │ -105 if (_M_owns) │ │ │ │ -106 unlock(); │ │ │ │ -107 } │ │ │ │ -108 │ │ │ │ -109 _u_n_i_q_u_e___l_o_c_k(const _u_n_i_q_u_e___l_o_c_k&) = delete; │ │ │ │ -110 _u_n_i_q_u_e___l_o_c_k& operator=(const _u_n_i_q_u_e___l_o_c_k&) = delete; │ │ │ │ -111 │ │ │ │ -112 _u_n_i_q_u_e___l_o_c_k(_u_n_i_q_u_e___l_o_c_k&& _____u) noexcept │ │ │ │ -113 : _M_device(_____u._M_device), _M_owns(_____u._M_owns) │ │ │ │ -114 { │ │ │ │ -115 _____u._M_device = 0; │ │ │ │ -116 _____u._M_owns = false; │ │ │ │ -117 } │ │ │ │ -118 │ │ │ │ -119 _u_n_i_q_u_e___l_o_c_k& operator=(_u_n_i_q_u_e___l_o_c_k&& _____u) noexcept │ │ │ │ -120 { │ │ │ │ -121 if(_M_owns) │ │ │ │ -122 unlock(); │ │ │ │ -123 │ │ │ │ -124 _u_n_i_q_u_e___l_o_c_k(_s_t_d_:_:_m_o_v_e(_____u)).swap(*this); │ │ │ │ -125 │ │ │ │ -126 _____u._M_device = 0; │ │ │ │ -127 _____u._M_owns = false; │ │ │ │ -128 │ │ │ │ -129 return *this; │ │ │ │ -130 } │ │ │ │ -131 │ │ │ │ -132 void │ │ │ │ -133 lock() │ │ │ │ -134 { │ │ │ │ -135 if (!_M_device) │ │ │ │ -136 __throw_system_error(int(errc::operation_not_permitted)); │ │ │ │ -137 else if (_M_owns) │ │ │ │ -138 __throw_system_error(int(errc::resource_deadlock_would_occur)); │ │ │ │ -139 else │ │ │ │ -140 { │ │ │ │ -141 _M_device->lock(); │ │ │ │ -142 _M_owns = true; │ │ │ │ -143 } │ │ │ │ -144 } │ │ │ │ -145 │ │ │ │ -146 bool │ │ │ │ -147 try_lock() │ │ │ │ -148 { │ │ │ │ -149 if (!_M_device) │ │ │ │ -150 __throw_system_error(int(errc::operation_not_permitted)); │ │ │ │ -151 else if (_M_owns) │ │ │ │ -152 __throw_system_error(int(errc::resource_deadlock_would_occur)); │ │ │ │ -153 else │ │ │ │ -154 { │ │ │ │ -155 _M_owns = _M_device->try_lock(); │ │ │ │ -156 return _M_owns; │ │ │ │ -157 } │ │ │ │ -158 } │ │ │ │ -159 │ │ │ │ -160 template │ │ │ │ -161 bool │ │ │ │ -162 try_lock_until(const _c_h_r_o_n_o_:_:_t_i_m_e___p_o_i_n_t_<___C_l_o_c_k_,_ ___D_u_r_a_t_i_o_n_>& _____a_t_i_m_e) │ │ │ │ -163 { │ │ │ │ -164 if (!_M_device) │ │ │ │ -165 __throw_system_error(int(errc::operation_not_permitted)); │ │ │ │ -166 else if (_M_owns) │ │ │ │ -167 __throw_system_error(int(errc::resource_deadlock_would_occur)); │ │ │ │ -168 else │ │ │ │ -169 { │ │ │ │ -170 _M_owns = _M_device->try_lock_until(_____a_t_i_m_e); │ │ │ │ -171 return _M_owns; │ │ │ │ -172 } │ │ │ │ -173 } │ │ │ │ -174 │ │ │ │ -175 template │ │ │ │ -176 bool │ │ │ │ -177 try_lock_for(const _c_h_r_o_n_o_:_:_d_u_r_a_t_i_o_n_<___R_e_p_,_ ___P_e_r_i_o_d_>& _____r_t_i_m_e) │ │ │ │ -178 { │ │ │ │ -179 if (!_M_device) │ │ │ │ -180 __throw_system_error(int(errc::operation_not_permitted)); │ │ │ │ -181 else if (_M_owns) │ │ │ │ -182 __throw_system_error(int(errc::resource_deadlock_would_occur)); │ │ │ │ -183 else │ │ │ │ -184 { │ │ │ │ -185 _M_owns = _M_device->try_lock_for(_____r_t_i_m_e); │ │ │ │ -186 return _M_owns; │ │ │ │ -187 } │ │ │ │ -188 } │ │ │ │ -189 │ │ │ │ -190 void │ │ │ │ -191 unlock() │ │ │ │ -192 { │ │ │ │ -193 if (!_M_owns) │ │ │ │ -194 __throw_system_error(int(errc::operation_not_permitted)); │ │ │ │ -195 else if (_M_device) │ │ │ │ -196 { │ │ │ │ -197 _M_device->unlock(); │ │ │ │ -198 _M_owns = false; │ │ │ │ -199 } │ │ │ │ -200 } │ │ │ │ -201 │ │ │ │ -202 void │ │ │ │ -203 swap(_u_n_i_q_u_e___l_o_c_k& _____u) noexcept │ │ │ │ -204 { │ │ │ │ -205 _s_t_d_:_:_s_w_a_p(_M_device, _____u._M_device); │ │ │ │ -206 _s_t_d_:_:_s_w_a_p(_M_owns, _____u._M_owns); │ │ │ │ -207 } │ │ │ │ -208 │ │ │ │ -209 mutex_type* │ │ │ │ -210 release() noexcept │ │ │ │ -211 { │ │ │ │ -212 mutex_type* _____r_e_t = _M_device; │ │ │ │ -213 _M_device = 0; │ │ │ │ -214 _M_owns = false; │ │ │ │ -215 return _____r_e_t; │ │ │ │ -216 } │ │ │ │ -217 │ │ │ │ -218 bool │ │ │ │ -219 owns_lock() const noexcept │ │ │ │ -220 { return _M_owns; } │ │ │ │ -221 │ │ │ │ -222 explicit operator bool() const noexcept │ │ │ │ -223 { return owns_lock(); } │ │ │ │ -224 │ │ │ │ -225 mutex_type* │ │ │ │ -226 _m_u_t_e_x() const noexcept │ │ │ │ -227 { return _M_device; } │ │ │ │ -228 │ │ │ │ -229 private: │ │ │ │ -230 mutex_type* _M_device; │ │ │ │ -231 bool _M_owns; │ │ │ │ -232 }; │ │ │ │ -233 │ │ │ │ -234 /// Swap overload for unique_lock objects. │ │ │ │ -235 /// @relates unique_lock │ │ │ │ -236 template │ │ │ │ -237 inline void │ │ │ │ -_2_3_8 _s_w_a_p(_u_n_i_q_u_e___l_o_c_k_<___M_u_t_e_x_>& __x, _u_n_i_q_u_e___l_o_c_k_<___M_u_t_e_x_>& __y) noexcept │ │ │ │ -239 { __x.swap(__y); } │ │ │ │ -240 │ │ │ │ -241_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ -242} // namespace │ │ │ │ -243 │ │ │ │ -244#endif // C++11 │ │ │ │ -245#endif // _GLIBCXX_UNIQUE_LOCK_H │ │ │ │ -_s_t_d___m_u_t_e_x_._h │ │ │ │ -_m_o_v_e_._h │ │ │ │ -_c_h_r_o_n_o_._h │ │ │ │ -_c_+_+_0_x___w_a_r_n_i_n_g_._h │ │ │ │ -_s_t_d_:_:_m_o_v_e │ │ │ │ -constexpr std::remove_reference< _Tp >::type && move(_Tp &&__t) noexcept │ │ │ │ -Convert a value to an rvalue. │ │ │ │ -DDeeffiinniittiioonn _m_o_v_e_._h_:_1_0_4 │ │ │ │ -_s_t_d_:_:_s_w_a_p │ │ │ │ -void swap(any &__x, any &__y) noexcept │ │ │ │ -Exchange the states of two any objects. │ │ │ │ -DDeeffiinniittiioonn _a_n_y_:_4_2_9 │ │ │ │ -_s_t_d_:_:_____a_d_d_r_e_s_s_o_f │ │ │ │ -constexpr _Tp * __addressof(_Tp &__r) noexcept │ │ │ │ -Same as C++11 std::addressof. │ │ │ │ -DDeeffiinniittiioonn _m_o_v_e_._h_:_4_9 │ │ │ │ -_s_t_d │ │ │ │ -ISO C++ entities toplevel namespace is std. │ │ │ │ -_s_t_d_:_:_c_h_r_o_n_o_:_:_d_u_r_a_t_i_o_n │ │ │ │ -chrono::duration represents a distance between two points in time │ │ │ │ -DDeeffiinniittiioonn _c_h_r_o_n_o_._h_:_4_8_8 │ │ │ │ -_s_t_d_:_:_c_h_r_o_n_o_:_:_t_i_m_e___p_o_i_n_t │ │ │ │ -chrono::time_point represents a point in time as measured by a clock │ │ │ │ -DDeeffiinniittiioonn _c_h_r_o_n_o_._h_:_9_0_1 │ │ │ │ -_s_t_d_:_:_m_u_t_e_x │ │ │ │ -DDeeffiinniittiioonn _s_t_d___m_u_t_e_x_._h_:_9_7 │ │ │ │ -_s_t_d_:_:_d_e_f_e_r___l_o_c_k___t │ │ │ │ -Do not acquire ownership of the mutex. │ │ │ │ -DDeeffiinniittiioonn _s_t_d___m_u_t_e_x_._h_:_2_1_5 │ │ │ │ -_s_t_d_:_:_t_r_y___t_o___l_o_c_k___t │ │ │ │ -Try to acquire ownership of the mutex without blocking. │ │ │ │ -DDeeffiinniittiioonn _s_t_d___m_u_t_e_x_._h_:_2_1_8 │ │ │ │ -_s_t_d_:_:_a_d_o_p_t___l_o_c_k___t │ │ │ │ -Assume the calling thread has already obtained mutex ownership and manage it. │ │ │ │ -DDeeffiinniittiioonn _s_t_d___m_u_t_e_x_._h_:_2_2_2 │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___l_o_c_k │ │ │ │ -A movable scoped lock type. │ │ │ │ -DDeeffiinniittiioonn _u_n_i_q_u_e___l_o_c_k_._h_:_6_0 │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___l_o_c_k_:_:_s_w_a_p │ │ │ │ -void swap(unique_lock< _Mutex > &__x, unique_lock< _Mutex > &__y) noexcept │ │ │ │ -Swap overload for unique_lock objects. │ │ │ │ -DDeeffiinniittiioonn _u_n_i_q_u_e___l_o_c_k_._h_:_2_3_8 │ │ │ │ -_s_t_d_:_:_a_u_t_o___p_t_r___r_e_f │ │ │ │ -DDeeffiinniittiioonn _a_u_t_o___p_t_r_._h_:_4_9 │ │ │ │ +64/// @} group atomics │ │ │ │ +65 │ │ │ │ +66#endif │ │ │ │ * _b_i_t_s │ │ │ │ - * _u_n_i_q_u_e___l_o_c_k_._h │ │ │ │ + * _a_t_o_m_i_c___l_o_c_k_f_r_e_e___d_e_f_i_n_e_s_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-12-base/libstdc++/user/a00386.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: uniform_int_dist.h File Reference │ │ │ +libstdc++: shared_ptr_atomic.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -46,57 +46,317 @@ │ │ │ /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */ │ │ │ $(document).ready(function(){initNavTree('a00386.html',''); initResizable(); }); │ │ │ /* @license-end */ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -Classes | │ │ │ Namespaces | │ │ │ -Concepts | │ │ │ -Functions
│ │ │ -
uniform_int_dist.h File Reference
│ │ │ +Macros | │ │ │ +Variables
│ │ │ +
shared_ptr_atomic.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -

│ │ │ -Classes

struct  std::uniform_int_distribution< _IntType >::param_type
 
class  std::uniform_int_distribution< _IntType >
 
│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ - │ │ │

│ │ │ Namespaces

namespace  std
 
namespace  std::__detail
 
│ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ -Concepts

concept  std::uniform_random_bit_generator
 

│ │ │ +Macros

#define __cpp_lib_atomic_shared_ptr
 
#define _GLIBCXX_TSAN_MUTEX_DESTROY(X)
 
#define _GLIBCXX_TSAN_MUTEX_LOCKED(X)
 
#define _GLIBCXX_TSAN_MUTEX_POST_SIGNAL(X)
 
#define _GLIBCXX_TSAN_MUTEX_POST_UNLOCK(X)
 
#define _GLIBCXX_TSAN_MUTEX_PRE_SIGNAL(X)
 
#define _GLIBCXX_TSAN_MUTEX_PRE_UNLOCK(X)
 
#define _GLIBCXX_TSAN_MUTEX_TRY_LOCK(X)
 
#define _GLIBCXX_TSAN_MUTEX_TRY_LOCK_FAILED(X)
 
│ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +

│ │ │ Functions

template<typename _Tp >
constexpr bool std::__detail::_Power_of_2 (_Tp __x)
 
template<typename _Tp , _Lock_policy _Lp>
bool std::atomic_is_lock_free (const __shared_ptr< _Tp, _Lp > *__p)
 
template<typename _Tp >
bool std::atomic_is_lock_free (const shared_ptr< _Tp > *__p)
 
template<typename _Tp , _Lock_policy _Lp>
__shared_ptr< _Tp, _Lpstd::atomic_load (const __shared_ptr< _Tp, _Lp > *__p)
 
template<typename _Tp >
shared_ptr< _Tp > std::atomic_load (const shared_ptr< _Tp > *__p)
 
template<typename _Tp , _Lock_policy _Lp>
__shared_ptr< _Tp, _Lpstd::atomic_load_explicit (const __shared_ptr< _Tp, _Lp > *__p, memory_order)
 
template<typename _Tp >
shared_ptr< _Tp > std::atomic_load_explicit (const shared_ptr< _Tp > *__p, memory_order)
 
template<typename _Tp , _Lock_policy _Lp>
void std::atomic_store (__shared_ptr< _Tp, _Lp > *__p, __shared_ptr< _Tp, _Lp > __r)
 
template<typename _Tp >
void std::atomic_store (shared_ptr< _Tp > *__p, shared_ptr< _Tp > __r)
 
template<typename _Tp , _Lock_policy _Lp>
void std::atomic_store_explicit (__shared_ptr< _Tp, _Lp > *__p, __shared_ptr< _Tp, _Lp > __r, memory_order)
 
template<typename _Tp >
void std::atomic_store_explicit (shared_ptr< _Tp > *__p, shared_ptr< _Tp > __r, memory_order)
 
template<typename _Tp , _Lock_policy _Lp>
__shared_ptr< _Tp, _Lpstd::atomic_exchange (__shared_ptr< _Tp, _Lp > *__p, __shared_ptr< _Tp, _Lp > __r)
 
template<typename _Tp >
shared_ptr< _Tp > std::atomic_exchange (shared_ptr< _Tp > *__p, shared_ptr< _Tp > __r)
 
template<typename _Tp , _Lock_policy _Lp>
__shared_ptr< _Tp, _Lpstd::atomic_exchange_explicit (__shared_ptr< _Tp, _Lp > *__p, __shared_ptr< _Tp, _Lp > __r, memory_order)
 
template<typename _Tp >
shared_ptr< _Tp > std::atomic_exchange_explicit (shared_ptr< _Tp > *__p, shared_ptr< _Tp > __r, memory_order)
 
template<typename _Tp , _Lock_policy _Lp>
bool std::atomic_compare_exchange_strong (__shared_ptr< _Tp, _Lp > *__p, __shared_ptr< _Tp, _Lp > *__v, __shared_ptr< _Tp, _Lp > __w)
 
template<typename _Tp >
bool std::atomic_compare_exchange_strong (shared_ptr< _Tp > *__p, shared_ptr< _Tp > *__v, shared_ptr< _Tp > __w)
 
template<typename _Tp , _Lock_policy _Lp>
bool std::atomic_compare_exchange_strong_explicit (__shared_ptr< _Tp, _Lp > *__p, __shared_ptr< _Tp, _Lp > *__v, __shared_ptr< _Tp, _Lp > __w, memory_order, memory_order)
 
template<typename _Tp >
bool std::atomic_compare_exchange_strong_explicit (shared_ptr< _Tp > *__p, shared_ptr< _Tp > *__v, shared_ptr< _Tp > __w, memory_order, memory_order)
 
template<typename _Tp , _Lock_policy _Lp>
bool std::atomic_compare_exchange_weak (__shared_ptr< _Tp, _Lp > *__p, __shared_ptr< _Tp, _Lp > *__v, __shared_ptr< _Tp, _Lp > __w)
 
template<typename _Tp >
bool std::atomic_compare_exchange_weak (shared_ptr< _Tp > *__p, shared_ptr< _Tp > *__v, shared_ptr< _Tp > __w)
 
template<typename _Tp , _Lock_policy _Lp>
bool std::atomic_compare_exchange_weak_explicit (__shared_ptr< _Tp, _Lp > *__p, __shared_ptr< _Tp, _Lp > *__v, __shared_ptr< _Tp, _Lp > __w, memory_order __success, memory_order __failure)
 
template<typename _Tp >
bool std::atomic_compare_exchange_weak_explicit (shared_ptr< _Tp > *__p, shared_ptr< _Tp > *__v, shared_ptr< _Tp > __w, memory_order __success, memory_order __failure)
 
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ +Variables

template<typename _Up >
static constexpr bool std::__is_shared_ptr
 
template<typename _Up >
static constexpr bool std::__is_shared_ptr< shared_ptr< _Up > >
 
│ │ │

Detailed Description

│ │ │ -

This is an internal header file, included by other library headers. Do not attempt to use it directly. Instead, include <random>.

│ │ │ +

This is an internal header file, included by other library headers. Do not attempt to use it directly. Instead, include <memory>.

│ │ │ + │ │ │ +

Definition in file shared_ptr_atomic.h.

│ │ │ +

Macro Definition Documentation

│ │ │ + │ │ │ +

◆ __cpp_lib_atomic_shared_ptr

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
#define __cpp_lib_atomic_shared_ptr
│ │ │ +
│ │ │ + │ │ │ +

Definition at line 359 of file shared_ptr_atomic.h.

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ +

◆ _GLIBCXX_TSAN_MUTEX_DESTROY

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
#define _GLIBCXX_TSAN_MUTEX_DESTROY( X)
│ │ │ +
│ │ │ │ │ │ -

Definition in file uniform_int_dist.h.

│ │ │ -
│ │ │ +

Definition at line 51 of file shared_ptr_atomic.h.

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ +

◆ _GLIBCXX_TSAN_MUTEX_LOCKED

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
#define _GLIBCXX_TSAN_MUTEX_LOCKED( X)
│ │ │ +
│ │ │ + │ │ │ +

Definition at line 54 of file shared_ptr_atomic.h.

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ +

◆ _GLIBCXX_TSAN_MUTEX_POST_SIGNAL

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
#define _GLIBCXX_TSAN_MUTEX_POST_SIGNAL( X)
│ │ │ +
│ │ │ + │ │ │ +

Definition at line 58 of file shared_ptr_atomic.h.

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ +

◆ _GLIBCXX_TSAN_MUTEX_POST_UNLOCK

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
#define _GLIBCXX_TSAN_MUTEX_POST_UNLOCK( X)
│ │ │ +
│ │ │ + │ │ │ +

Definition at line 56 of file shared_ptr_atomic.h.

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ +

◆ _GLIBCXX_TSAN_MUTEX_PRE_SIGNAL

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
#define _GLIBCXX_TSAN_MUTEX_PRE_SIGNAL( X)
│ │ │ +
│ │ │ + │ │ │ +

Definition at line 57 of file shared_ptr_atomic.h.

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ +

◆ _GLIBCXX_TSAN_MUTEX_PRE_UNLOCK

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
#define _GLIBCXX_TSAN_MUTEX_PRE_UNLOCK( X)
│ │ │ +
│ │ │ + │ │ │ +

Definition at line 55 of file shared_ptr_atomic.h.

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ +

◆ _GLIBCXX_TSAN_MUTEX_TRY_LOCK

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
#define _GLIBCXX_TSAN_MUTEX_TRY_LOCK( X)
│ │ │ +
│ │ │ + │ │ │ +

Definition at line 52 of file shared_ptr_atomic.h.

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ +

◆ _GLIBCXX_TSAN_MUTEX_TRY_LOCK_FAILED

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
#define _GLIBCXX_TSAN_MUTEX_TRY_LOCK_FAILED( X)
│ │ │ +
│ │ │ + │ │ │ +

Definition at line 53 of file shared_ptr_atomic.h.

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ +
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,28 +1,166 @@ │ │ │ │ libstdc++ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _C_o_n_c_e_p_t_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -uniform_int_dist.h File Reference │ │ │ │ +_N_a_m_e_s_p_a_c_e_s | _M_a_c_r_o_s | _V_a_r_i_a_b_l_e_s │ │ │ │ +shared_ptr_atomic.h File Reference │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -CCllaasssseess │ │ │ │ -struct   _s_t_d_:_:_u_n_i_f_o_r_m___i_n_t___d_i_s_t_r_i_b_u_t_i_o_n_<_ ___I_n_t_T_y_p_e_ _>_:_:_p_a_r_a_m___t_y_p_e │ │ │ │ -  │ │ │ │ - class   _s_t_d_:_:_u_n_i_f_o_r_m___i_n_t___d_i_s_t_r_i_b_u_t_i_o_n_<_ ___I_n_t_T_y_p_e_ _> │ │ │ │ -  │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _s_t_d │ │ │ │   │ │ │ │ -namespace   _s_t_d_:_:_____d_e_t_a_i_l │ │ │ │ +MMaaccrrooss │ │ │ │ +#define  _____c_p_p___l_i_b___a_t_o_m_i_c___s_h_a_r_e_d___p_t_r │ │ │ │ +  │ │ │ │ +#define  ___G_L_I_B_C_X_X___T_S_A_N___M_U_T_E_X___D_E_S_T_R_O_Y(X) │ │ │ │ +  │ │ │ │ +#define  ___G_L_I_B_C_X_X___T_S_A_N___M_U_T_E_X___L_O_C_K_E_D(X) │ │ │ │ +  │ │ │ │ +#define  ___G_L_I_B_C_X_X___T_S_A_N___M_U_T_E_X___P_O_S_T___S_I_G_N_A_L(X) │ │ │ │   │ │ │ │ -CCoonncceeppttss │ │ │ │ -concept   _s_t_d_:_:_u_n_i_f_o_r_m___r_a_n_d_o_m___b_i_t___g_e_n_e_r_a_t_o_r │ │ │ │ +#define  ___G_L_I_B_C_X_X___T_S_A_N___M_U_T_E_X___P_O_S_T___U_N_L_O_C_K(X) │ │ │ │ +  │ │ │ │ +#define  ___G_L_I_B_C_X_X___T_S_A_N___M_U_T_E_X___P_R_E___S_I_G_N_A_L(X) │ │ │ │ +  │ │ │ │ +#define  ___G_L_I_B_C_X_X___T_S_A_N___M_U_T_E_X___P_R_E___U_N_L_O_C_K(X) │ │ │ │ +  │ │ │ │ +#define  ___G_L_I_B_C_X_X___T_S_A_N___M_U_T_E_X___T_R_Y___L_O_C_K(X) │ │ │ │ +  │ │ │ │ +#define  ___G_L_I_B_C_X_X___T_S_A_N___M_U_T_E_X___T_R_Y___L_O_C_K___F_A_I_L_E_D(X) │ │ │ │   │ │ │ │ FFuunnccttiioonnss │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _Lock_policy _Lp> │ │ │ │ + bool  _s_t_d_:_:_a_t_o_m_i_c___i_s___l_o_c_k___f_r_e_e (const __shared_ptr< _Tp, │ │ │ │ + ___L_p > *__p) │ │ │ │ +  │ │ │ │ template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ -constexpr bool  _s_t_d_:_:_____d_e_t_a_i_l_:_:___P_o_w_e_r___o_f___2 (_Tp __x) │ │ │ │ + bool  _s_t_d_:_:_a_t_o_m_i_c___i_s___l_o_c_k___f_r_e_e (const _s_h_a_r_e_d___p_t_r< _Tp > │ │ │ │ + *__p) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _Lock_policy _Lp> │ │ │ │ +__shared_ptr< _Tp, ___L_p >  _s_t_d_:_:_a_t_o_m_i_c___l_o_a_d (const __shared_ptr< _Tp, ___L_p > │ │ │ │ + *__p) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ + _s_h_a_r_e_d___p_t_r< _Tp >  _s_t_d_:_:_a_t_o_m_i_c___l_o_a_d (const _s_h_a_r_e_d___p_t_r< _Tp > *__p) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _Lock_policy _Lp> │ │ │ │ +__shared_ptr< _Tp, ___L_p >  _s_t_d_:_:_a_t_o_m_i_c___l_o_a_d___e_x_p_l_i_c_i_t (const __shared_ptr< _Tp, │ │ │ │ + ___L_p > *__p, _m_e_m_o_r_y___o_r_d_e_r) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ + _s_h_a_r_e_d___p_t_r< _Tp >  _s_t_d_:_:_a_t_o_m_i_c___l_o_a_d___e_x_p_l_i_c_i_t (const _s_h_a_r_e_d___p_t_r< _Tp > │ │ │ │ + *__p, _m_e_m_o_r_y___o_r_d_e_r) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _Lock_policy _Lp> │ │ │ │ + _v_o_i_d  _s_t_d_:_:_a_t_o_m_i_c___s_t_o_r_e (__shared_ptr< _Tp, ___L_p > *__p, │ │ │ │ + __shared_ptr< _Tp, ___L_p > __r) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ + _v_o_i_d  _s_t_d_:_:_a_t_o_m_i_c___s_t_o_r_e (_s_h_a_r_e_d___p_t_r< _Tp > *__p, │ │ │ │ + _s_h_a_r_e_d___p_t_r< _Tp > __r) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _Lock_policy _Lp> │ │ │ │ + _v_o_i_d  _s_t_d_:_:_a_t_o_m_i_c___s_t_o_r_e___e_x_p_l_i_c_i_t (__shared_ptr< _Tp, ___L_p > │ │ │ │ + *__p, __shared_ptr< _Tp, ___L_p > __r, _m_e_m_o_r_y___o_r_d_e_r) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ + _v_o_i_d  _s_t_d_:_:_a_t_o_m_i_c___s_t_o_r_e___e_x_p_l_i_c_i_t (_s_h_a_r_e_d___p_t_r< _Tp > *__p, │ │ │ │ + _s_h_a_r_e_d___p_t_r< _Tp > __r, _m_e_m_o_r_y___o_r_d_e_r) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _Lock_policy _Lp> │ │ │ │ +__shared_ptr< _Tp, ___L_p >  _s_t_d_:_:_a_t_o_m_i_c___e_x_c_h_a_n_g_e (__shared_ptr< _Tp, ___L_p > *__p, │ │ │ │ + __shared_ptr< _Tp, ___L_p > __r) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ + _s_h_a_r_e_d___p_t_r< _Tp >  _s_t_d_:_:_a_t_o_m_i_c___e_x_c_h_a_n_g_e (_s_h_a_r_e_d___p_t_r< _Tp > *__p, │ │ │ │ + _s_h_a_r_e_d___p_t_r< _Tp > __r) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _Lock_policy _Lp> │ │ │ │ +__shared_ptr< _Tp, ___L_p >  _s_t_d_:_:_a_t_o_m_i_c___e_x_c_h_a_n_g_e___e_x_p_l_i_c_i_t (__shared_ptr< _Tp, ___L_p │ │ │ │ + > *__p, __shared_ptr< _Tp, ___L_p > __r, _m_e_m_o_r_y___o_r_d_e_r) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ + _s_h_a_r_e_d___p_t_r< _Tp >  _s_t_d_:_:_a_t_o_m_i_c___e_x_c_h_a_n_g_e___e_x_p_l_i_c_i_t (_s_h_a_r_e_d___p_t_r< _Tp > │ │ │ │ + *__p, _s_h_a_r_e_d___p_t_r< _Tp > __r, _m_e_m_o_r_y___o_r_d_e_r) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _Lock_policy _Lp> │ │ │ │ + bool  _s_t_d_:_:_a_t_o_m_i_c___c_o_m_p_a_r_e___e_x_c_h_a_n_g_e___s_t_r_o_n_g (__shared_ptr< │ │ │ │ + _Tp, ___L_p > *__p, __shared_ptr< _Tp, ___L_p > *_____v, │ │ │ │ + __shared_ptr< _Tp, ___L_p > _____w) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ + bool  _s_t_d_:_:_a_t_o_m_i_c___c_o_m_p_a_r_e___e_x_c_h_a_n_g_e___s_t_r_o_n_g (_s_h_a_r_e_d___p_t_r< _Tp │ │ │ │ + > *__p, _s_h_a_r_e_d___p_t_r< _Tp > *_____v, _s_h_a_r_e_d___p_t_r< _Tp > │ │ │ │ + _____w) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _Lock_policy _Lp> │ │ │ │ + bool  _s_t_d_:_:_a_t_o_m_i_c___c_o_m_p_a_r_e___e_x_c_h_a_n_g_e___s_t_r_o_n_g___e_x_p_l_i_c_i_t │ │ │ │ + (__shared_ptr< _Tp, ___L_p > *__p, __shared_ptr< _Tp, │ │ │ │ + ___L_p > *_____v, __shared_ptr< _Tp, ___L_p > _____w, │ │ │ │ + _m_e_m_o_r_y___o_r_d_e_r, _m_e_m_o_r_y___o_r_d_e_r) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ + bool  _s_t_d_:_:_a_t_o_m_i_c___c_o_m_p_a_r_e___e_x_c_h_a_n_g_e___s_t_r_o_n_g___e_x_p_l_i_c_i_t │ │ │ │ + (_s_h_a_r_e_d___p_t_r< _Tp > *__p, _s_h_a_r_e_d___p_t_r< _Tp > *_____v, │ │ │ │ + _s_h_a_r_e_d___p_t_r< _Tp > _____w, _m_e_m_o_r_y___o_r_d_e_r, _m_e_m_o_r_y___o_r_d_e_r) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _Lock_policy _Lp> │ │ │ │ + bool  _s_t_d_:_:_a_t_o_m_i_c___c_o_m_p_a_r_e___e_x_c_h_a_n_g_e___w_e_a_k (__shared_ptr< _Tp, │ │ │ │ + ___L_p > *__p, __shared_ptr< _Tp, ___L_p > *_____v, │ │ │ │ + __shared_ptr< _Tp, ___L_p > _____w) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ + bool  _s_t_d_:_:_a_t_o_m_i_c___c_o_m_p_a_r_e___e_x_c_h_a_n_g_e___w_e_a_k (_s_h_a_r_e_d___p_t_r< _Tp > │ │ │ │ + *__p, _s_h_a_r_e_d___p_t_r< _Tp > *_____v, _s_h_a_r_e_d___p_t_r< _Tp > _____w) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _Lock_policy _Lp> │ │ │ │ + bool  _s_t_d_:_:_a_t_o_m_i_c___c_o_m_p_a_r_e___e_x_c_h_a_n_g_e___w_e_a_k___e_x_p_l_i_c_i_t │ │ │ │ + (__shared_ptr< _Tp, ___L_p > *__p, __shared_ptr< _Tp, │ │ │ │ + ___L_p > *_____v, __shared_ptr< _Tp, ___L_p > _____w, │ │ │ │ + _m_e_m_o_r_y___o_r_d_e_r _____s_u_c_c_e_s_s, _m_e_m_o_r_y___o_r_d_e_r _____f_a_i_l_u_r_e) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ + bool  _s_t_d_:_:_a_t_o_m_i_c___c_o_m_p_a_r_e___e_x_c_h_a_n_g_e___w_e_a_k___e_x_p_l_i_c_i_t │ │ │ │ + (_s_h_a_r_e_d___p_t_r< _Tp > *__p, _s_h_a_r_e_d___p_t_r< _Tp > *_____v, │ │ │ │ + _s_h_a_r_e_d___p_t_r< _Tp > _____w, _m_e_m_o_r_y___o_r_d_e_r _____s_u_c_c_e_s_s, │ │ │ │ + _m_e_m_o_r_y___o_r_d_e_r _____f_a_i_l_u_r_e) │ │ │ │ +  │ │ │ │ +VVaarriiaabblleess │ │ │ │ +template<_t_y_p_e_n_a_m_e _Up > │ │ │ │ +_s_t_a_t_i_c constexpr bool  _s_t_d_:_:_____i_s___s_h_a_r_e_d___p_t_r │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Up > │ │ │ │ +_s_t_a_t_i_c constexpr bool  _s_t_d_:_:_____i_s___s_h_a_r_e_d___p_t_r_<_ _s_h_a_r_e_d___p_t_r_<_ ___U_p_ _>_ _> │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ This is an internal header file, included by other library headers. Do not │ │ │ │ -attempt to use it directly. Instead, include . │ │ │ │ -Definition in file _u_n_i_f_o_r_m___i_n_t___d_i_s_t_._h. │ │ │ │ +attempt to use it directly. Instead, include . │ │ │ │ +Definition in file _s_h_a_r_e_d___p_t_r___a_t_o_m_i_c_._h. │ │ │ │ +********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ +********** _?◆_? ____ccpppp__lliibb__aattoommiicc__sshhaarreedd__ppttrr ********** │ │ │ │ +#define __cpp_lib_atomic_shared_ptr │ │ │ │ +Definition at line _3_5_9 of file _s_h_a_r_e_d___p_t_r___a_t_o_m_i_c_._h. │ │ │ │ +********** _?◆_? __GGLLIIBBCCXXXX__TTSSAANN__MMUUTTEEXX__DDEESSTTRROOYY ********** │ │ │ │ +#define _GLIBCXX_TSAN_MUTEX_DESTROY (   X ) │ │ │ │ +Definition at line _5_1 of file _s_h_a_r_e_d___p_t_r___a_t_o_m_i_c_._h. │ │ │ │ +********** _?◆_? __GGLLIIBBCCXXXX__TTSSAANN__MMUUTTEEXX__LLOOCCKKEEDD ********** │ │ │ │ +#define _GLIBCXX_TSAN_MUTEX_LOCKED (   X ) │ │ │ │ +Definition at line _5_4 of file _s_h_a_r_e_d___p_t_r___a_t_o_m_i_c_._h. │ │ │ │ +********** _?◆_? __GGLLIIBBCCXXXX__TTSSAANN__MMUUTTEEXX__PPOOSSTT__SSIIGGNNAALL ********** │ │ │ │ +#define _GLIBCXX_TSAN_MUTEX_POST_SIGNAL (   X ) │ │ │ │ +Definition at line _5_8 of file _s_h_a_r_e_d___p_t_r___a_t_o_m_i_c_._h. │ │ │ │ +********** _?◆_? __GGLLIIBBCCXXXX__TTSSAANN__MMUUTTEEXX__PPOOSSTT__UUNNLLOOCCKK ********** │ │ │ │ +#define _GLIBCXX_TSAN_MUTEX_POST_UNLOCK (   X ) │ │ │ │ +Definition at line _5_6 of file _s_h_a_r_e_d___p_t_r___a_t_o_m_i_c_._h. │ │ │ │ +********** _?◆_? __GGLLIIBBCCXXXX__TTSSAANN__MMUUTTEEXX__PPRREE__SSIIGGNNAALL ********** │ │ │ │ +#define _GLIBCXX_TSAN_MUTEX_PRE_SIGNAL (   X ) │ │ │ │ +Definition at line _5_7 of file _s_h_a_r_e_d___p_t_r___a_t_o_m_i_c_._h. │ │ │ │ +********** _?◆_? __GGLLIIBBCCXXXX__TTSSAANN__MMUUTTEEXX__PPRREE__UUNNLLOOCCKK ********** │ │ │ │ +#define _GLIBCXX_TSAN_MUTEX_PRE_UNLOCK (   X ) │ │ │ │ +Definition at line _5_5 of file _s_h_a_r_e_d___p_t_r___a_t_o_m_i_c_._h. │ │ │ │ +********** _?◆_? __GGLLIIBBCCXXXX__TTSSAANN__MMUUTTEEXX__TTRRYY__LLOOCCKK ********** │ │ │ │ +#define _GLIBCXX_TSAN_MUTEX_TRY_LOCK (   X ) │ │ │ │ +Definition at line _5_2 of file _s_h_a_r_e_d___p_t_r___a_t_o_m_i_c_._h. │ │ │ │ +********** _?◆_? __GGLLIIBBCCXXXX__TTSSAANN__MMUUTTEEXX__TTRRYY__LLOOCCKK__FFAAIILLEEDD ********** │ │ │ │ +#define _GLIBCXX_TSAN_MUTEX_TRY_LOCK_FAILED (   X ) │ │ │ │ +Definition at line _5_3 of file _s_h_a_r_e_d___p_t_r___a_t_o_m_i_c_._h. │ │ │ │ * _b_i_t_s │ │ │ │ - * _u_n_i_f_o_r_m___i_n_t___d_i_s_t_._h │ │ │ │ + * _s_h_a_r_e_d___p_t_r___a_t_o_m_i_c_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-12-base/libstdc++/user/a00386.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,5 +1,24 @@ │ │ │ │ var a00386 = [ │ │ │ │ - ["std::uniform_int_distribution< _IntType >::param_type", "a08592.html", null], │ │ │ │ - ["std::uniform_int_distribution< _IntType >", "a08588.html", "a08588"], │ │ │ │ - ["std::uniform_random_bit_generator", "a13650.html", null] │ │ │ │ + ["atomic_compare_exchange_strong", "a00386.html#ga7f9e658275d4a2cdbf1b6a00d02adcc7", null], │ │ │ │ + ["atomic_compare_exchange_strong", "a00386.html#ga8b4c27092fe0543d16aa24679ab64f35", null], │ │ │ │ + ["atomic_compare_exchange_strong_explicit", "a00386.html#ga8ac0b3f7aae34919ebc25fc54ff6b9c8", null], │ │ │ │ + ["atomic_compare_exchange_strong_explicit", "a00386.html#ga7b812df2cdd0c01f09d65168d22418c9", null], │ │ │ │ + ["atomic_compare_exchange_weak", "a00386.html#ga6860aafd01c4daf71cca0efe5193437f", null], │ │ │ │ + ["atomic_compare_exchange_weak", "a00386.html#ga6aa9828191cf7749c72581e719dde0b0", null], │ │ │ │ + ["atomic_compare_exchange_weak_explicit", "a00386.html#ga31df9efdf79235d0f8e112d245deb431", null], │ │ │ │ + ["atomic_compare_exchange_weak_explicit", "a00386.html#ga8ddc9b0002afbe0001718de9c8ca931e", null], │ │ │ │ + ["atomic_exchange", "a00386.html#ga781c3166a763da6704a757e45235d36f", null], │ │ │ │ + ["atomic_exchange", "a00386.html#ga2030e82e43a4017cbaa802974790bb25", null], │ │ │ │ + ["atomic_exchange_explicit", "a00386.html#ga94196a5199df82a0b4a6add046eb8579", null], │ │ │ │ + ["atomic_exchange_explicit", "a00386.html#ga0e5af6dda768cd829095adcd266e1f68", null], │ │ │ │ + ["atomic_is_lock_free", "a00386.html#ga26f0b2f2e5e143c43b9ac86853cdb495", null], │ │ │ │ + ["atomic_is_lock_free", "a00386.html#ga5fe925503fa03a8132ab6ac8c3d05017", null], │ │ │ │ + ["atomic_load", "a00386.html#gaa0e8444bce044d4c703faa284d5be31b", null], │ │ │ │ + ["atomic_load", "a00386.html#ga862acb9abfac21160395d3892d0fcda4", null], │ │ │ │ + ["atomic_load_explicit", "a00386.html#ga63bd95c47d868e1749c1934fe0f16283", null], │ │ │ │ + ["atomic_load_explicit", "a00386.html#ga15d2346b1ab42f5bd88978eb4f2eb5d5", null], │ │ │ │ + ["atomic_store", "a00386.html#gaf607a58027ea400e7688daa2832c67ef", null], │ │ │ │ + ["atomic_store", "a00386.html#gaad7c9077082544dc2454ef66eb252cad", null], │ │ │ │ + ["atomic_store_explicit", "a00386.html#ga4fb42f2c743388ba4dcf24abf0cc2701", null], │ │ │ │ + ["atomic_store_explicit", "a00386.html#gac459811f24dfa61ca04dff98c59b0433", null] │ │ │ │ ]; │ │ ├── ./usr/share/doc/gcc-12-base/libstdc++/user/a00386_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: uniform_int_dist.h Source File │ │ │ +libstdc++: shared_ptr_atomic.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -45,20 +45,20 @@ │ │ │ │ │ │
│ │ │
│ │ │ -
uniform_int_dist.h
│ │ │ +
shared_ptr_atomic.h
│ │ │
│ │ │
│ │ │ -Go to the documentation of this file.
1// Class template uniform_int_distribution -*- C++ -*-
│ │ │ +Go to the documentation of this file.
1// shared_ptr atomic access -*- C++ -*-
│ │ │
2
│ │ │ -
3// Copyright (C) 2009-2022 Free Software Foundation, Inc.
│ │ │ +
3// Copyright (C) 2014-2022 Free Software Foundation, Inc.
│ │ │
4//
│ │ │
5// This file is part of the GNU ISO C++ Library. This library is free
│ │ │
6// software; you can redistribute it and/or modify it under the
│ │ │
7// terms of the GNU General Public License as published by the
│ │ │
8// Free Software Foundation; either version 3, or (at your option)
│ │ │
9// any later version.
│ │ │
10
│ │ │ @@ -72,495 +72,898 @@ │ │ │
18// 3.1, as published by the Free Software Foundation.
│ │ │
19
│ │ │
20// You should have received a copy of the GNU General Public License and
│ │ │
21// a copy of the GCC Runtime Library Exception along with this program;
│ │ │
22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
│ │ │
23// <http://www.gnu.org/licenses/>.
│ │ │
24
│ │ │ -
25/**
│ │ │ -
26 * @file bits/uniform_int_dist.h
│ │ │ -
27 * This is an internal header file, included by other library headers.
│ │ │ -
28 * Do not attempt to use it directly. @headername{random}
│ │ │ -
29 */
│ │ │ -
30
│ │ │ -
31#ifndef _GLIBCXX_BITS_UNIFORM_INT_DIST_H
│ │ │ -
32#define _GLIBCXX_BITS_UNIFORM_INT_DIST_H
│ │ │ -
33
│ │ │ -
34#include <type_traits>
│ │ │ -
35#include <ext/numeric_traits.h>
│ │ │ -
36#if __cplusplus > 201703L
│ │ │ -
37# include <concepts>
│ │ │ -
38#endif
│ │ │ -
39#include <bits/concept_check.h> // __glibcxx_function_requires
│ │ │ -
40
│ │ │ -
41namespace std _GLIBCXX_VISIBILITY(default)
│ │ │ -
42{
│ │ │ -
43_GLIBCXX_BEGIN_NAMESPACE_VERSION
│ │ │ -
44
│ │ │ -
45#ifdef __cpp_lib_concepts
│ │ │ -
46 /// Requirements for a uniform random bit generator.
│ │ │ -
47 template<typename _Gen>
│ │ │ -
│ │ │ - │ │ │ -
49 = invocable<_Gen&> && unsigned_integral<invoke_result_t<_Gen&>>
│ │ │ -
50 && requires
│ │ │ -
51 {
│ │ │ -
52 { _Gen::min() } -> same_as<invoke_result_t<_Gen&>>;
│ │ │ -
53 { _Gen::max() } -> same_as<invoke_result_t<_Gen&>>;
│ │ │ -
54 requires bool_constant<(_Gen::min() < _Gen::max())>::value;
│ │ │ -
55 };
│ │ │ -
│ │ │ -
56#endif
│ │ │ -
57
│ │ │ -
58 namespace __detail
│ │ │ -
59 {
│ │ │ -
60 // Determine whether number is a power of two.
│ │ │ -
61 // This is true for zero, which is OK because we want _Power_of_2(n+1)
│ │ │ -
62 // to be true if n==numeric_limits<_Tp>::max() and so n+1 wraps around.
│ │ │ -
63 template<typename _Tp>
│ │ │ -
64 constexpr bool
│ │ │ -
65 _Power_of_2(_Tp __x)
│ │ │ -
66 {
│ │ │ -
67 return ((__x - 1) & __x) == 0;
│ │ │ -
68 }
│ │ │ -
69 }
│ │ │ +
25/** @file bits/shared_ptr_atomic.h
│ │ │ +
26 * This is an internal header file, included by other library headers.
│ │ │ +
27 * Do not attempt to use it directly. @headername{memory}
│ │ │ +
28 */
│ │ │ +
29
│ │ │ +
30#ifndef _SHARED_PTR_ATOMIC_H
│ │ │ +
31#define _SHARED_PTR_ATOMIC_H 1
│ │ │ +
32
│ │ │ +
33#include <bits/atomic_base.h>
│ │ │ +
34
│ │ │ +
35// Annotations for the custom locking in atomic<shared_ptr<T>>.
│ │ │ +
36#if defined _GLIBCXX_TSAN && __has_include(<sanitizer/tsan_interface.h>)
│ │ │ +
37#include <sanitizer/tsan_interface.h>
│ │ │ +
38#define _GLIBCXX_TSAN_MUTEX_DESTROY(X) \
│ │ │ +
39 __tsan_mutex_destroy(X, __tsan_mutex_not_static)
│ │ │ +
40#define _GLIBCXX_TSAN_MUTEX_TRY_LOCK(X) \
│ │ │ +
41 __tsan_mutex_pre_lock(X, __tsan_mutex_not_static|__tsan_mutex_try_lock)
│ │ │ +
42#define _GLIBCXX_TSAN_MUTEX_TRY_LOCK_FAILED(X) __tsan_mutex_post_lock(X, \
│ │ │ +
43 __tsan_mutex_not_static|__tsan_mutex_try_lock_failed, 0)
│ │ │ +
44#define _GLIBCXX_TSAN_MUTEX_LOCKED(X) \
│ │ │ +
45 __tsan_mutex_post_lock(X, __tsan_mutex_not_static, 0)
│ │ │ +
46#define _GLIBCXX_TSAN_MUTEX_PRE_UNLOCK(X) __tsan_mutex_pre_unlock(X, 0)
│ │ │ +
47#define _GLIBCXX_TSAN_MUTEX_POST_UNLOCK(X) __tsan_mutex_post_unlock(X, 0)
│ │ │ +
48#define _GLIBCXX_TSAN_MUTEX_PRE_SIGNAL(X) __tsan_mutex_pre_signal(X, 0)
│ │ │ +
49#define _GLIBCXX_TSAN_MUTEX_POST_SIGNAL(X) __tsan_mutex_post_signal(X, 0)
│ │ │ +
50#else
│ │ │ +
51#define _GLIBCXX_TSAN_MUTEX_DESTROY(X)
│ │ │ +
52#define _GLIBCXX_TSAN_MUTEX_TRY_LOCK(X)
│ │ │ +
53#define _GLIBCXX_TSAN_MUTEX_TRY_LOCK_FAILED(X)
│ │ │ +
54#define _GLIBCXX_TSAN_MUTEX_LOCKED(X)
│ │ │ +
55#define _GLIBCXX_TSAN_MUTEX_PRE_UNLOCK(X)
│ │ │ +
56#define _GLIBCXX_TSAN_MUTEX_POST_UNLOCK(X)
│ │ │ +
57#define _GLIBCXX_TSAN_MUTEX_PRE_SIGNAL(X)
│ │ │ +
58#define _GLIBCXX_TSAN_MUTEX_POST_SIGNAL(X)
│ │ │ +
59#endif
│ │ │ +
60
│ │ │ +
61namespace std _GLIBCXX_VISIBILITY(default)
│ │ │ +
62{
│ │ │ +
63_GLIBCXX_BEGIN_NAMESPACE_VERSION
│ │ │ +
64
│ │ │ +
65 /**
│ │ │ +
66 * @addtogroup pointer_abstractions
│ │ │ +
67 * @relates shared_ptr
│ │ │ +
68 * @{
│ │ │ +
69 */
│ │ │
70
│ │ │ -
71 /**
│ │ │ -
72 * @brief Uniform discrete distribution for random numbers.
│ │ │ -
73 * A discrete random distribution on the range @f$[min, max]@f$ with equal
│ │ │ -
74 * probability throughout the range.
│ │ │ -
75 */
│ │ │ -
76 template<typename _IntType = int>
│ │ │ -
│ │ │ - │ │ │ -
78 {
│ │ │ - │ │ │ -
80 "template argument must be an integral type");
│ │ │ -
81
│ │ │ -
82 public:
│ │ │ -
83 /** The type of the range of the distribution. */
│ │ │ -
84 typedef _IntType result_type;
│ │ │ -
85 /** Parameter type. */
│ │ │ -
│ │ │ - │ │ │ -
87 {
│ │ │ - │ │ │ -
89
│ │ │ -
90 param_type() : param_type(0) { }
│ │ │ -
91
│ │ │ -
92 explicit
│ │ │ -
93 param_type(_IntType __a,
│ │ │ - │ │ │ -
95 : _M_a(__a), _M_b(__b)
│ │ │ -
96 {
│ │ │ -
97 __glibcxx_assert(_M_a <= _M_b);
│ │ │ -
98 }
│ │ │ -
99
│ │ │ - │ │ │ -
101 a() const
│ │ │ -
102 { return _M_a; }
│ │ │ -
103
│ │ │ - │ │ │ -
105 b() const
│ │ │ -
106 { return _M_b; }
│ │ │ -
107
│ │ │ -
108 friend bool
│ │ │ -
109 operator==(const param_type& __p1, const param_type& __p2)
│ │ │ -
110 { return __p1._M_a == __p2._M_a && __p1._M_b == __p2._M_b; }
│ │ │ -
111
│ │ │ -
112 friend bool
│ │ │ -
113 operator!=(const param_type& __p1, const param_type& __p2)
│ │ │ -
114 { return !(__p1 == __p2); }
│ │ │ -
115
│ │ │ -
116 private:
│ │ │ -
117 _IntType _M_a;
│ │ │ -
118 _IntType _M_b;
│ │ │ -
119 };
│ │ │ -
│ │ │ -
120
│ │ │ -
121 public:
│ │ │ -
122 /**
│ │ │ -
123 * @brief Constructs a uniform distribution object.
│ │ │ -
124 */
│ │ │ - │ │ │ -
126
│ │ │ -
127 /**
│ │ │ -
128 * @brief Constructs a uniform distribution object.
│ │ │ -
129 */
│ │ │ -
130 explicit
│ │ │ -
│ │ │ - │ │ │ -
132 _IntType __b
│ │ │ - │ │ │ -
134 : _M_param(__a, __b)
│ │ │ -
135 { }
│ │ │ -
│ │ │ -
136
│ │ │ -
137 explicit
│ │ │ -
138 uniform_int_distribution(const param_type& __p)
│ │ │ -
139 : _M_param(__p)
│ │ │ -
140 { }
│ │ │ -
141
│ │ │ -
142 /**
│ │ │ -
143 * @brief Resets the distribution state.
│ │ │ -
144 *
│ │ │ -
145 * Does nothing for the uniform integer distribution.
│ │ │ -
146 */
│ │ │ -
147 void
│ │ │ -
148 reset() { }
│ │ │ -
149
│ │ │ - │ │ │ -
151 a() const
│ │ │ -
152 { return _M_param.a(); }
│ │ │ -
153
│ │ │ - │ │ │ -
155 b() const
│ │ │ -
156 { return _M_param.b(); }
│ │ │ -
157
│ │ │ -
158 /**
│ │ │ -
159 * @brief Returns the parameter set of the distribution.
│ │ │ -
160 */
│ │ │ -
161 param_type
│ │ │ -
│ │ │ -
162 param() const
│ │ │ -
163 { return _M_param; }
│ │ │ -
│ │ │ -
164
│ │ │ -
165 /**
│ │ │ -
166 * @brief Sets the parameter set of the distribution.
│ │ │ -
167 * @param __param The new parameter set of the distribution.
│ │ │ -
168 */
│ │ │ -
169 void
│ │ │ -
│ │ │ - │ │ │ -
171 { _M_param = __param; }
│ │ │ -
│ │ │ -
172
│ │ │ -
173 /**
│ │ │ -
174 * @brief Returns the inclusive lower bound of the distribution range.
│ │ │ -
175 */
│ │ │ - │ │ │ -
│ │ │ -
177 min() const
│ │ │ -
178 { return this->a(); }
│ │ │ -
│ │ │ -
179
│ │ │ -
180 /**
│ │ │ -
181 * @brief Returns the inclusive upper bound of the distribution range.
│ │ │ -
182 */
│ │ │ - │ │ │ -
│ │ │ -
184 max() const
│ │ │ -
185 { return this->b(); }
│ │ │ -
│ │ │ -
186
│ │ │ -
187 /**
│ │ │ -
188 * @brief Generating functions.
│ │ │ -
189 */
│ │ │ -
190 template<typename _UniformRandomBitGenerator>
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
193 { return this->operator()(__urng, _M_param); }
│ │ │ -
│ │ │ -
194
│ │ │ -
195 template<typename _UniformRandomBitGenerator>
│ │ │ - │ │ │ - │ │ │ -
198 const param_type& __p);
│ │ │ -
199
│ │ │ -
200 template<typename _ForwardIterator,
│ │ │ - │ │ │ -
202 void
│ │ │ -
203 __generate(_ForwardIterator __f, _ForwardIterator __t,
│ │ │ - │ │ │ -
205 { this->__generate(__f, __t, __urng, _M_param); }
│ │ │ -
206
│ │ │ -
207 template<typename _ForwardIterator,
│ │ │ -
208 typename _UniformRandomBitGenerator>
│ │ │ -
209 void
│ │ │ -
210 __generate(_ForwardIterator __f, _ForwardIterator __t,
│ │ │ -
211 _UniformRandomBitGenerator& __urng,
│ │ │ -
212 const param_type& __p)
│ │ │ -
213 { this->__generate_impl(__f, __t, __urng, __p); }
│ │ │ -
214
│ │ │ -
215 template<typename _UniformRandomBitGenerator>
│ │ │ -
216 void
│ │ │ -
217 __generate(result_type* __f, result_type* __t,
│ │ │ -
218 _UniformRandomBitGenerator& __urng,
│ │ │ -
219 const param_type& __p)
│ │ │ -
220 { this->__generate_impl(__f, __t, __urng, __p); }
│ │ │ -
221
│ │ │ -
222 /**
│ │ │ -
223 * @brief Return true if two uniform integer distributions have
│ │ │ -
224 * the same parameters.
│ │ │ -
225 */
│ │ │ -
226 friend bool
│ │ │ -
│ │ │ - │ │ │ - │ │ │ -
229 { return __d1._M_param == __d2._M_param; }
│ │ │ -
│ │ │ -
230
│ │ │ -
231 private:
│ │ │ -
232 template<typename _ForwardIterator,
│ │ │ - │ │ │ -
234 void
│ │ │ -
235 __generate_impl(_ForwardIterator __f, _ForwardIterator __t,
│ │ │ - │ │ │ -
237 const param_type& __p);
│ │ │ -
238
│ │ │ -
239 param_type _M_param;
│ │ │ -
240
│ │ │ -
241 // Lemire's nearly divisionless algorithm.
│ │ │ -
242 // Returns an unbiased random number from __g downscaled to [0,__range)
│ │ │ -
243 // using an unsigned type _Wp twice as wide as unsigned type _Up.
│ │ │ -
244 template<typename _Wp, typename _Urbg, typename _Up>
│ │ │ -
245 static _Up
│ │ │ -
246 _S_nd(_Urbg& __g, _Up __range)
│ │ │ -
247 {
│ │ │ - │ │ │ - │ │ │ -
250 static_assert(!_Up_traits::__is_signed, "U must be unsigned");
│ │ │ -
251 static_assert(!_Wp_traits::__is_signed, "W must be unsigned");
│ │ │ -
252 static_assert(_Wp_traits::__digits == (2 * _Up_traits::__digits),
│ │ │ -
253 "W must be twice as wide as U");
│ │ │ -
254
│ │ │ -
255 // reference: Fast Random Integer Generation in an Interval
│ │ │ -
256 // ACM Transactions on Modeling and Computer Simulation 29 (1), 2019
│ │ │ -
257 // https://arxiv.org/abs/1805.10941
│ │ │ -
258 _Wp __product = _Wp(__g()) * _Wp(__range);
│ │ │ -
259 _Up __low = _Up(__product);
│ │ │ -
260 if (__low < __range)
│ │ │ -
261 {
│ │ │ -
262 _Up __threshold = -__range % __range;
│ │ │ -
263 while (__low < __threshold)
│ │ │ -
264 {
│ │ │ -
265 __product = _Wp(__g()) * _Wp(__range);
│ │ │ -
266 __low = _Up(__product);
│ │ │ -
267 }
│ │ │ -
268 }
│ │ │ -
269 return __product >> _Up_traits::__digits;
│ │ │ -
270 }
│ │ │ -
271 };
│ │ │ -
│ │ │ -
272
│ │ │ -
273 template<typename _IntType>
│ │ │ -
274 template<typename _UniformRandomBitGenerator>
│ │ │ - │ │ │ - │ │ │ -
277 operator()(_UniformRandomBitGenerator& __urng,
│ │ │ -
278 const param_type& __param)
│ │ │ -
279 {
│ │ │ -
280 typedef typename _UniformRandomBitGenerator::result_type _Gresult_type;
│ │ │ -
281 typedef typename make_unsigned<result_type>::type __utype;
│ │ │ -
282 typedef typename common_type<_Gresult_type, __utype>::type __uctype;
│ │ │ -
283
│ │ │ -
284 constexpr __uctype __urngmin = _UniformRandomBitGenerator::min();
│ │ │ -
285 constexpr __uctype __urngmax = _UniformRandomBitGenerator::max();
│ │ │ -
286 static_assert( __urngmin < __urngmax,
│ │ │ -
287 "Uniform random bit generator must define min() < max()");
│ │ │ -
288 constexpr __uctype __urngrange = __urngmax - __urngmin;
│ │ │ -
289
│ │ │ -
290 const __uctype __urange
│ │ │ -
291 = __uctype(__param.b()) - __uctype(__param.a());
│ │ │ -
292
│ │ │ -
293 __uctype __ret;
│ │ │ -
294 if (__urngrange > __urange)
│ │ │ -
295 {
│ │ │ -
296 // downscaling
│ │ │ -
297
│ │ │ -
298 const __uctype __uerange = __urange + 1; // __urange can be zero
│ │ │ -
299
│ │ │ -
300#if defined __UINT64_TYPE__ && defined __UINT32_TYPE__
│ │ │ -
301#if __SIZEOF_INT128__
│ │ │ -
302 if _GLIBCXX17_CONSTEXPR (__urngrange == __UINT64_MAX__)
│ │ │ -
303 {
│ │ │ -
304 // __urng produces values that use exactly 64-bits,
│ │ │ -
305 // so use 128-bit integers to downscale to desired range.
│ │ │ -
306 __UINT64_TYPE__ __u64erange = __uerange;
│ │ │ -
307 __ret = __extension__ _S_nd<unsigned __int128>(__urng,
│ │ │ -
308 __u64erange);
│ │ │ -
309 }
│ │ │ -
310 else
│ │ │ -
311#endif
│ │ │ -
312 if _GLIBCXX17_CONSTEXPR (__urngrange == __UINT32_MAX__)
│ │ │ -
313 {
│ │ │ -
314 // __urng produces values that use exactly 32-bits,
│ │ │ -
315 // so use 64-bit integers to downscale to desired range.
│ │ │ -
316 __UINT32_TYPE__ __u32erange = __uerange;
│ │ │ -
317 __ret = _S_nd<__UINT64_TYPE__>(__urng, __u32erange);
│ │ │ -
318 }
│ │ │ -
319 else
│ │ │ -
320#endif
│ │ │ -
321 {
│ │ │ -
322 // fallback case (2 divisions)
│ │ │ -
323 const __uctype __scaling = __urngrange / __uerange;
│ │ │ -
324 const __uctype __past = __uerange * __scaling;
│ │ │ -
325 do
│ │ │ -
326 __ret = __uctype(__urng()) - __urngmin;
│ │ │ -
327 while (__ret >= __past);
│ │ │ -
328 __ret /= __scaling;
│ │ │ -
329 }
│ │ │ -
330 }
│ │ │ -
331 else if (__urngrange < __urange)
│ │ │ -
332 {
│ │ │ -
333 // upscaling
│ │ │ -
334 /*
│ │ │ -
335 Note that every value in [0, urange]
│ │ │ -
336 can be written uniquely as
│ │ │ -
337
│ │ │ -
338 (urngrange + 1) * high + low
│ │ │ -
339
│ │ │ -
340 where
│ │ │ -
341
│ │ │ -
342 high in [0, urange / (urngrange + 1)]
│ │ │ -
343
│ │ │ -
344 and
│ │ │ -
345
│ │ │ -
346 low in [0, urngrange].
│ │ │ -
347 */
│ │ │ -
348 __uctype __tmp; // wraparound control
│ │ │ -
349 do
│ │ │ -
350 {
│ │ │ -
351 const __uctype __uerngrange = __urngrange + 1;
│ │ │ -
352 __tmp = (__uerngrange * operator()
│ │ │ -
353 (__urng, param_type(0, __urange / __uerngrange)));
│ │ │ -
354 __ret = __tmp + (__uctype(__urng()) - __urngmin);
│ │ │ -
355 }
│ │ │ -
356 while (__ret > __urange || __ret < __tmp);
│ │ │ -
357 }
│ │ │ -
358 else
│ │ │ -
359 __ret = __uctype(__urng()) - __urngmin;
│ │ │ -
360
│ │ │ -
361 return __ret + __param.a();
│ │ │ -
362 }
│ │ │ -
363
│ │ │ -
364
│ │ │ -
365 template<typename _IntType>
│ │ │ -
366 template<typename _ForwardIterator,
│ │ │ -
367 typename _UniformRandomBitGenerator>
│ │ │ -
368 void
│ │ │ -
369 uniform_int_distribution<_IntType>::
│ │ │ -
370 __generate_impl(_ForwardIterator __f, _ForwardIterator __t,
│ │ │ -
371 _UniformRandomBitGenerator& __urng,
│ │ │ -
372 const param_type& __param)
│ │ │ -
373 {
│ │ │ -
374 __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
│ │ │ -
375 typedef typename _UniformRandomBitGenerator::result_type _Gresult_type;
│ │ │ -
376 typedef typename make_unsigned<result_type>::type __utype;
│ │ │ -
377 typedef typename common_type<_Gresult_type, __utype>::type __uctype;
│ │ │ +
71 /// @cond undocumented
│ │ │ +
72
│ │ │ +
73 struct _Sp_locker
│ │ │ +
74 {
│ │ │ +
75 _Sp_locker(const _Sp_locker&) = delete;
│ │ │ +
76 _Sp_locker& operator=(const _Sp_locker&) = delete;
│ │ │ +
77
│ │ │ +
78#ifdef __GTHREADS
│ │ │ +
79 explicit
│ │ │ +
80 _Sp_locker(const void*) noexcept;
│ │ │ +
81 _Sp_locker(const void*, const void*) noexcept;
│ │ │ +
82 ~_Sp_locker();
│ │ │ +
83
│ │ │ +
84 private:
│ │ │ +
85 unsigned char _M_key1;
│ │ │ +
86 unsigned char _M_key2;
│ │ │ +
87#else
│ │ │ +
88 explicit _Sp_locker(const void*, const void* = nullptr) { }
│ │ │ +
89#endif
│ │ │ +
90 };
│ │ │ +
91
│ │ │ +
92 /// @endcond
│ │ │ +
93
│ │ │ +
94 /**
│ │ │ +
95 * @brief Report whether shared_ptr atomic operations are lock-free.
│ │ │ +
96 * @param __p A non-null pointer to a shared_ptr object.
│ │ │ +
97 * @return True if atomic access to @c *__p is lock-free, false otherwise.
│ │ │ +
98 * @{
│ │ │ +
99 */
│ │ │ +
100 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
101 inline bool
│ │ │ +
│ │ │ +
102 atomic_is_lock_free(const __shared_ptr<_Tp, _Lp>* __p)
│ │ │ +
103 {
│ │ │ +
104#ifdef __GTHREADS
│ │ │ +
105 return __gthread_active_p() == 0;
│ │ │ +
106#else
│ │ │ +
107 return true;
│ │ │ +
108#endif
│ │ │ +
109 }
│ │ │ +
│ │ │ +
110
│ │ │ +
111 template<typename _Tp>
│ │ │ +
112 inline bool
│ │ │ +
│ │ │ +
113 atomic_is_lock_free(const shared_ptr<_Tp>* __p)
│ │ │ + │ │ │ +
│ │ │ +
115
│ │ │ +
116 /// @}
│ │ │ +
117
│ │ │ +
118 /**
│ │ │ +
119 * @brief Atomic load for shared_ptr objects.
│ │ │ +
120 * @param __p A non-null pointer to a shared_ptr object.
│ │ │ +
121 * @return @c *__p
│ │ │ +
122 *
│ │ │ +
123 * The memory order shall not be `memory_order_release` or
│ │ │ +
124 * `memory_order_acq_rel`.
│ │ │ +
125 * @{
│ │ │ +
126 */
│ │ │ +
127 template<typename _Tp>
│ │ │ +
128 inline shared_ptr<_Tp>
│ │ │ +
│ │ │ +
129 atomic_load_explicit(const shared_ptr<_Tp>* __p, memory_order)
│ │ │ +
130 {
│ │ │ +
131 _Sp_locker __lock{__p};
│ │ │ +
132 return *__p;
│ │ │ +
133 }
│ │ │ +
│ │ │ +
134
│ │ │ +
135 template<typename _Tp>
│ │ │ +
136 inline shared_ptr<_Tp>
│ │ │ +
│ │ │ +
137 atomic_load(const shared_ptr<_Tp>* __p)
│ │ │ +
138 { return std::atomic_load_explicit(__p, memory_order_seq_cst); }
│ │ │ +
│ │ │ +
139
│ │ │ +
140 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
141 inline __shared_ptr<_Tp, _Lp>
│ │ │ +
│ │ │ +
142 atomic_load_explicit(const __shared_ptr<_Tp, _Lp>* __p, memory_order)
│ │ │ +
143 {
│ │ │ +
144 _Sp_locker __lock{__p};
│ │ │ +
145 return *__p;
│ │ │ +
146 }
│ │ │ +
│ │ │ +
147
│ │ │ +
148 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
149 inline __shared_ptr<_Tp, _Lp>
│ │ │ +
│ │ │ +
150 atomic_load(const __shared_ptr<_Tp, _Lp>* __p)
│ │ │ +
151 { return std::atomic_load_explicit(__p, memory_order_seq_cst); }
│ │ │ +
│ │ │ +
152 /// @}
│ │ │ +
153
│ │ │ +
154 /**
│ │ │ +
155 * @brief Atomic store for shared_ptr objects.
│ │ │ +
156 * @param __p A non-null pointer to a shared_ptr object.
│ │ │ +
157 * @param __r The value to store.
│ │ │ +
158 *
│ │ │ +
159 * The memory order shall not be `memory_order_acquire` or
│ │ │ +
160 * `memory_order_acq_rel`.
│ │ │ +
161 * @{
│ │ │ +
162 */
│ │ │ +
163 template<typename _Tp>
│ │ │ +
164 inline void
│ │ │ +
│ │ │ +
165 atomic_store_explicit(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r,
│ │ │ + │ │ │ +
167 {
│ │ │ +
168 _Sp_locker __lock{__p};
│ │ │ +
169 __p->swap(__r); // use swap so that **__p not destroyed while lock held
│ │ │ +
170 }
│ │ │ +
│ │ │ +
171
│ │ │ +
172 template<typename _Tp>
│ │ │ +
173 inline void
│ │ │ +
│ │ │ +
174 atomic_store(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r)
│ │ │ +
175 { std::atomic_store_explicit(__p, std::move(__r), memory_order_seq_cst); }
│ │ │ +
│ │ │ +
176
│ │ │ +
177 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
178 inline void
│ │ │ +
│ │ │ +
179 atomic_store_explicit(__shared_ptr<_Tp, _Lp>* __p,
│ │ │ + │ │ │ + │ │ │ +
182 {
│ │ │ +
183 _Sp_locker __lock{__p};
│ │ │ +
184 __p->swap(__r); // use swap so that **__p not destroyed while lock held
│ │ │ +
185 }
│ │ │ +
│ │ │ +
186
│ │ │ +
187 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
188 inline void
│ │ │ +
│ │ │ + │ │ │ +
190 { std::atomic_store_explicit(__p, std::move(__r), memory_order_seq_cst); }
│ │ │ +
│ │ │ +
191 /// @}
│ │ │ +
192
│ │ │ +
193 /**
│ │ │ +
194 * @brief Atomic exchange for shared_ptr objects.
│ │ │ +
195 * @param __p A non-null pointer to a shared_ptr object.
│ │ │ +
196 * @param __r New value to store in `*__p`.
│ │ │ +
197 * @return The original value of `*__p`
│ │ │ +
198 * @{
│ │ │ +
199 */
│ │ │ +
200 template<typename _Tp>
│ │ │ +
201 inline shared_ptr<_Tp>
│ │ │ +
│ │ │ +
202 atomic_exchange_explicit(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r,
│ │ │ + │ │ │ +
204 {
│ │ │ +
205 _Sp_locker __lock{__p};
│ │ │ +
206 __p->swap(__r);
│ │ │ +
207 return __r;
│ │ │ +
208 }
│ │ │ +
│ │ │ +
209
│ │ │ +
210 template<typename _Tp>
│ │ │ +
211 inline shared_ptr<_Tp>
│ │ │ +
│ │ │ +
212 atomic_exchange(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r)
│ │ │ +
213 {
│ │ │ +
214 return std::atomic_exchange_explicit(__p, std::move(__r),
│ │ │ +
215 memory_order_seq_cst);
│ │ │ +
216 }
│ │ │ +
│ │ │ +
217
│ │ │ +
218 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
219 inline __shared_ptr<_Tp, _Lp>
│ │ │ +
│ │ │ +
220 atomic_exchange_explicit(__shared_ptr<_Tp, _Lp>* __p,
│ │ │ + │ │ │ + │ │ │ +
223 {
│ │ │ +
224 _Sp_locker __lock{__p};
│ │ │ +
225 __p->swap(__r);
│ │ │ +
226 return __r;
│ │ │ +
227 }
│ │ │ +
│ │ │ +
228
│ │ │ +
229 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
230 inline __shared_ptr<_Tp, _Lp>
│ │ │ +
│ │ │ + │ │ │ +
232 {
│ │ │ +
233 return std::atomic_exchange_explicit(__p, std::move(__r),
│ │ │ +
234 memory_order_seq_cst);
│ │ │ +
235 }
│ │ │ +
│ │ │ +
236 /// @}
│ │ │ +
237
│ │ │ +
238 /**
│ │ │ +
239 * @brief Atomic compare-and-swap for shared_ptr objects.
│ │ │ +
240 * @param __p A non-null pointer to a shared_ptr object.
│ │ │ +
241 * @param __v A non-null pointer to a shared_ptr object.
│ │ │ +
242 * @param __w A non-null pointer to a shared_ptr object.
│ │ │ +
243 * @return True if `*__p` was equivalent to `*__v`, false otherwise.
│ │ │ +
244 *
│ │ │ +
245 * The memory order for failure shall not be `memory_order_release` or
│ │ │ +
246 * `memory_order_acq_rel`.
│ │ │ +
247 * @{
│ │ │ +
248 */
│ │ │ +
249 template<typename _Tp>
│ │ │ +
250 bool
│ │ │ +
│ │ │ +
251 atomic_compare_exchange_strong_explicit(shared_ptr<_Tp>* __p,
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
256 {
│ │ │ +
257 shared_ptr<_Tp> __x; // goes out of scope after __lock
│ │ │ +
258 _Sp_locker __lock{__p, __v};
│ │ │ + │ │ │ +
260 if (*__p == *__v && !__less(*__p, *__v) && !__less(*__v, *__p))
│ │ │ +
261 {
│ │ │ +
262 __x = std::move(*__p);
│ │ │ +
263 *__p = std::move(__w);
│ │ │ +
264 return true;
│ │ │ +
265 }
│ │ │ +
266 __x = std::move(*__v);
│ │ │ +
267 *__v = *__p;
│ │ │ +
268 return false;
│ │ │ +
269 }
│ │ │ +
│ │ │ +
270
│ │ │ +
271 template<typename _Tp>
│ │ │ +
272 inline bool
│ │ │ +
│ │ │ +
273 atomic_compare_exchange_strong(shared_ptr<_Tp>* __p, shared_ptr<_Tp>* __v,
│ │ │ + │ │ │ +
275 {
│ │ │ +
276 return std::atomic_compare_exchange_strong_explicit(__p, __v,
│ │ │ +
277 std::move(__w), memory_order_seq_cst, memory_order_seq_cst);
│ │ │ +
278 }
│ │ │ +
│ │ │ +
279
│ │ │ +
280 template<typename _Tp>
│ │ │ +
281 inline bool
│ │ │ +
│ │ │ +
282 atomic_compare_exchange_weak_explicit(shared_ptr<_Tp>* __p,
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
287 {
│ │ │ +
288 return std::atomic_compare_exchange_strong_explicit(__p, __v,
│ │ │ + │ │ │ +
290 }
│ │ │ +
│ │ │ +
291
│ │ │ +
292 template<typename _Tp>
│ │ │ +
293 inline bool
│ │ │ +
│ │ │ +
294 atomic_compare_exchange_weak(shared_ptr<_Tp>* __p, shared_ptr<_Tp>* __v,
│ │ │ + │ │ │ +
296 {
│ │ │ +
297 return std::atomic_compare_exchange_weak_explicit(__p, __v,
│ │ │ +
298 std::move(__w), memory_order_seq_cst, memory_order_seq_cst);
│ │ │ +
299 }
│ │ │ +
│ │ │ +
300
│ │ │ +
301 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
302 bool
│ │ │ +
│ │ │ +
303 atomic_compare_exchange_strong_explicit(__shared_ptr<_Tp, _Lp>* __p,
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
308 {
│ │ │ +
309 __shared_ptr<_Tp, _Lp> __x; // goes out of scope after __lock
│ │ │ +
310 _Sp_locker __lock{__p, __v};
│ │ │ + │ │ │ +
312 if (*__p == *__v && !__less(*__p, *__v) && !__less(*__v, *__p))
│ │ │ +
313 {
│ │ │ +
314 __x = std::move(*__p);
│ │ │ +
315 *__p = std::move(__w);
│ │ │ +
316 return true;
│ │ │ +
317 }
│ │ │ +
318 __x = std::move(*__v);
│ │ │ +
319 *__v = *__p;
│ │ │ +
320 return false;
│ │ │ +
321 }
│ │ │ +
│ │ │ +
322
│ │ │ +
323 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
324 inline bool
│ │ │ +
│ │ │ +
325 atomic_compare_exchange_strong(__shared_ptr<_Tp, _Lp>* __p,
│ │ │ + │ │ │ + │ │ │ +
328 {
│ │ │ +
329 return std::atomic_compare_exchange_strong_explicit(__p, __v,
│ │ │ +
330 std::move(__w), memory_order_seq_cst, memory_order_seq_cst);
│ │ │ +
331 }
│ │ │ +
│ │ │ +
332
│ │ │ +
333 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
334 inline bool
│ │ │ +
│ │ │ +
335 atomic_compare_exchange_weak_explicit(__shared_ptr<_Tp, _Lp>* __p,
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
340 {
│ │ │ +
341 return std::atomic_compare_exchange_strong_explicit(__p, __v,
│ │ │ + │ │ │ +
343 }
│ │ │ +
│ │ │ +
344
│ │ │ +
345 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
346 inline bool
│ │ │ +
│ │ │ +
347 atomic_compare_exchange_weak(__shared_ptr<_Tp, _Lp>* __p,
│ │ │ + │ │ │ + │ │ │ +
350 {
│ │ │ +
351 return std::atomic_compare_exchange_weak_explicit(__p, __v,
│ │ │ +
352 std::move(__w), memory_order_seq_cst, memory_order_seq_cst);
│ │ │ +
353 }
│ │ │ +
│ │ │ +
354 /// @}
│ │ │ +
355
│ │ │ +
356 /// @} group pointer_abstractions
│ │ │ +
357
│ │ │ +
358#if __cplusplus >= 202002L
│ │ │ +
359# define __cpp_lib_atomic_shared_ptr 201711L
│ │ │ +
360 template<typename _Tp>
│ │ │ +
361 struct atomic;
│ │ │ +
362
│ │ │ +
363 /**
│ │ │ +
364 * @addtogroup pointer_abstractions
│ │ │ +
365 * @relates shared_ptr
│ │ │ +
366 * @{
│ │ │ +
367 */
│ │ │ +
368
│ │ │ +
369 template<typename _Up>
│ │ │ +
370 static constexpr bool __is_shared_ptr = false;
│ │ │ +
371 template<typename _Up>
│ │ │ +
372 static constexpr bool __is_shared_ptr<shared_ptr<_Up>> = true;
│ │ │ +
373
│ │ │ +
374 template<typename _Tp>
│ │ │ +
375 class _Sp_atomic
│ │ │ +
376 {
│ │ │ +
377 using value_type = _Tp;
│ │ │
378
│ │ │ -
379 static_assert( __urng.min() < __urng.max(),
│ │ │ -
380 "Uniform random bit generator must define min() < max()");
│ │ │ -
381
│ │ │ -
382 constexpr __uctype __urngmin = __urng.min();
│ │ │ -
383 constexpr __uctype __urngmax = __urng.max();
│ │ │ -
384 constexpr __uctype __urngrange = __urngmax - __urngmin;
│ │ │ -
385 const __uctype __urange
│ │ │ -
386 = __uctype(__param.b()) - __uctype(__param.a());
│ │ │ +
379 friend struct atomic<_Tp>;
│ │ │ +
380
│ │ │ +
381 // An atomic version of __shared_count<> and __weak_count<>.
│ │ │ +
382 // Stores a _Sp_counted_base<>* but uses the LSB as a lock.
│ │ │ +
383 struct _Atomic_count
│ │ │ +
384 {
│ │ │ +
385 // Either __shared_count<> or __weak_count<>
│ │ │ +
386 using __count_type = decltype(_Tp::_M_refcount);
│ │ │
387
│ │ │ -
388 __uctype __ret;
│ │ │ -
389
│ │ │ -
390 if (__urngrange > __urange)
│ │ │ -
391 {
│ │ │ -
392 if (__detail::_Power_of_2(__urngrange + 1)
│ │ │ -
393 && __detail::_Power_of_2(__urange + 1))
│ │ │ -
394 {
│ │ │ -
395 while (__f != __t)
│ │ │ -
396 {
│ │ │ -
397 __ret = __uctype(__urng()) - __urngmin;
│ │ │ -
398 *__f++ = (__ret & __urange) + __param.a();
│ │ │ -
399 }
│ │ │ -
400 }
│ │ │ -
401 else
│ │ │ -
402 {
│ │ │ -
403 // downscaling
│ │ │ -
404 const __uctype __uerange = __urange + 1; // __urange can be zero
│ │ │ -
405 const __uctype __scaling = __urngrange / __uerange;
│ │ │ -
406 const __uctype __past = __uerange * __scaling;
│ │ │ -
407 while (__f != __t)
│ │ │ -
408 {
│ │ │ -
409 do
│ │ │ -
410 __ret = __uctype(__urng()) - __urngmin;
│ │ │ -
411 while (__ret >= __past);
│ │ │ -
412 *__f++ = __ret / __scaling + __param.a();
│ │ │ -
413 }
│ │ │ -
414 }
│ │ │ -
415 }
│ │ │ -
416 else if (__urngrange < __urange)
│ │ │ -
417 {
│ │ │ -
418 // upscaling
│ │ │ -
419 /*
│ │ │ -
420 Note that every value in [0, urange]
│ │ │ -
421 can be written uniquely as
│ │ │ -
422
│ │ │ -
423 (urngrange + 1) * high + low
│ │ │ -
424
│ │ │ -
425 where
│ │ │ -
426
│ │ │ -
427 high in [0, urange / (urngrange + 1)]
│ │ │ -
428
│ │ │ -
429 and
│ │ │ -
430
│ │ │ -
431 low in [0, urngrange].
│ │ │ -
432 */
│ │ │ -
433 __uctype __tmp; // wraparound control
│ │ │ -
434 while (__f != __t)
│ │ │ -
435 {
│ │ │ -
436 do
│ │ │ -
437 {
│ │ │ -
438 constexpr __uctype __uerngrange = __urngrange + 1;
│ │ │ -
439 __tmp = (__uerngrange * operator()
│ │ │ -
440 (__urng, param_type(0, __urange / __uerngrange)));
│ │ │ -
441 __ret = __tmp + (__uctype(__urng()) - __urngmin);
│ │ │ -
442 }
│ │ │ -
443 while (__ret > __urange || __ret < __tmp);
│ │ │ -
444 *__f++ = __ret;
│ │ │ -
445 }
│ │ │ -
446 }
│ │ │ -
447 else
│ │ │ -
448 while (__f != __t)
│ │ │ -
449 *__f++ = __uctype(__urng()) - __urngmin + __param.a();
│ │ │ -
450 }
│ │ │ -
451
│ │ │ -
452 // operator!= and operator<< and operator>> are defined in <bits/random.h>
│ │ │ +
388 // _Sp_counted_base<>*
│ │ │ +
389 using pointer = decltype(__count_type::_M_pi);
│ │ │ +
390
│ │ │ +
391 // Ensure we can use the LSB as the lock bit.
│ │ │ +
392 static_assert(alignof(remove_pointer_t<pointer>) > 1);
│ │ │ +
393
│ │ │ +
394 constexpr _Atomic_count() noexcept = default;
│ │ │ +
395
│ │ │ +
396 explicit
│ │ │ +
397 _Atomic_count(__count_type&& __c) noexcept
│ │ │ +
398 : _M_val(reinterpret_cast<uintptr_t>(__c._M_pi))
│ │ │ +
399 {
│ │ │ +
400 __c._M_pi = nullptr;
│ │ │ +
401 }
│ │ │ +
402
│ │ │ +
403 ~_Atomic_count()
│ │ │ +
404 {
│ │ │ +
405 auto __val = _M_val.load(memory_order_relaxed);
│ │ │ +
406 _GLIBCXX_TSAN_MUTEX_DESTROY(&_M_val);
│ │ │ +
407 __glibcxx_assert(!(__val & _S_lock_bit));
│ │ │ +
408 if (auto __pi = reinterpret_cast<pointer>(__val))
│ │ │ +
409 {
│ │ │ +
410 if constexpr (__is_shared_ptr<_Tp>)
│ │ │ +
411 __pi->_M_release();
│ │ │ +
412 else
│ │ │ +
413 __pi->_M_weak_release();
│ │ │ +
414 }
│ │ │ +
415 }
│ │ │ +
416
│ │ │ +
417 _Atomic_count(const _Atomic_count&) = delete;
│ │ │ +
418 _Atomic_count& operator=(const _Atomic_count&) = delete;
│ │ │ +
419
│ │ │ +
420 // Precondition: Caller does not hold lock!
│ │ │ +
421 // Returns the raw pointer value without the lock bit set.
│ │ │ +
422 pointer
│ │ │ +
423 lock(memory_order __o) const noexcept
│ │ │ +
424 {
│ │ │ +
425 // To acquire the lock we flip the LSB from 0 to 1.
│ │ │ +
426
│ │ │ +
427 auto __current = _M_val.load(memory_order_relaxed);
│ │ │ +
428 while (__current & _S_lock_bit)
│ │ │ +
429 {
│ │ │ +
430#if __cpp_lib_atomic_wait
│ │ │ +
431 __detail::__thread_relax();
│ │ │ +
432#endif
│ │ │ +
433 __current = _M_val.load(memory_order_relaxed);
│ │ │ +
434 }
│ │ │ +
435
│ │ │ +
436 _GLIBCXX_TSAN_MUTEX_TRY_LOCK(&_M_val);
│ │ │ +
437
│ │ │ +
438 while (!_M_val.compare_exchange_strong(__current,
│ │ │ +
439 __current | _S_lock_bit,
│ │ │ +
440 __o,
│ │ │ +
441 memory_order_relaxed))
│ │ │ +
442 {
│ │ │ +
443 _GLIBCXX_TSAN_MUTEX_TRY_LOCK_FAILED(&_M_val);
│ │ │ +
444#if __cpp_lib_atomic_wait
│ │ │ +
445 __detail::__thread_relax();
│ │ │ +
446#endif
│ │ │ +
447 __current = __current & ~_S_lock_bit;
│ │ │ +
448 _GLIBCXX_TSAN_MUTEX_TRY_LOCK(&_M_val);
│ │ │ +
449 }
│ │ │ +
450 _GLIBCXX_TSAN_MUTEX_LOCKED(&_M_val);
│ │ │ +
451 return reinterpret_cast<pointer>(__current);
│ │ │ +
452 }
│ │ │
453
│ │ │ -
454_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ -
455} // namespace std
│ │ │ -
456
│ │ │ -
457#endif
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
integral_constant< bool, __v > bool_constant
Alias template for compile-time boolean constant types.
Definition type_traits:98
│ │ │ +
454 // Precondition: caller holds lock!
│ │ │ +
455 void
│ │ │ +
456 unlock(memory_order __o) const noexcept
│ │ │ +
457 {
│ │ │ +
458 _GLIBCXX_TSAN_MUTEX_PRE_UNLOCK(&_M_val);
│ │ │ +
459 _M_val.fetch_sub(1, __o);
│ │ │ +
460 _GLIBCXX_TSAN_MUTEX_POST_UNLOCK(&_M_val);
│ │ │ +
461 }
│ │ │ +
462
│ │ │ +
463 // Swaps the values of *this and __c, and unlocks *this.
│ │ │ +
464 // Precondition: caller holds lock!
│ │ │ +
465 void
│ │ │ +
466 _M_swap_unlock(__count_type& __c, memory_order __o) noexcept
│ │ │ +
467 {
│ │ │ +
468 if (__o != memory_order_seq_cst)
│ │ │ +
469 __o = memory_order_release;
│ │ │ +
470 auto __x = reinterpret_cast<uintptr_t>(__c._M_pi);
│ │ │ +
471 _GLIBCXX_TSAN_MUTEX_PRE_UNLOCK(&_M_val);
│ │ │ +
472 __x = _M_val.exchange(__x, __o);
│ │ │ +
473 _GLIBCXX_TSAN_MUTEX_POST_UNLOCK(&_M_val);
│ │ │ +
474 __c._M_pi = reinterpret_cast<pointer>(__x & ~_S_lock_bit);
│ │ │ +
475 }
│ │ │ +
476
│ │ │ +
477#if __cpp_lib_atomic_wait
│ │ │ +
478 // Precondition: caller holds lock!
│ │ │ +
479 void
│ │ │ +
480 _M_wait_unlock(memory_order __o) const noexcept
│ │ │ +
481 {
│ │ │ +
482 _GLIBCXX_TSAN_MUTEX_PRE_UNLOCK(&_M_val);
│ │ │ +
483 auto __v = _M_val.fetch_sub(1, memory_order_relaxed);
│ │ │ +
484 _GLIBCXX_TSAN_MUTEX_POST_UNLOCK(&_M_val);
│ │ │ +
485 _M_val.wait(__v & ~_S_lock_bit, __o);
│ │ │ +
486 }
│ │ │ +
487
│ │ │ +
488 void
│ │ │ +
489 notify_one() noexcept
│ │ │ +
490 {
│ │ │ +
491 _GLIBCXX_TSAN_MUTEX_PRE_SIGNAL(&_M_val);
│ │ │ +
492 _M_val.notify_one();
│ │ │ +
493 _GLIBCXX_TSAN_MUTEX_POST_SIGNAL(&_M_val);
│ │ │ +
494 }
│ │ │ +
495
│ │ │ +
496 void
│ │ │ +
497 notify_all() noexcept
│ │ │ +
498 {
│ │ │ +
499 _GLIBCXX_TSAN_MUTEX_PRE_SIGNAL(&_M_val);
│ │ │ +
500 _M_val.notify_all();
│ │ │ +
501 _GLIBCXX_TSAN_MUTEX_POST_SIGNAL(&_M_val);
│ │ │ +
502 }
│ │ │ +
503#endif
│ │ │ +
504
│ │ │ +
505 private:
│ │ │ +
506 mutable __atomic_base<uintptr_t> _M_val{0};
│ │ │ +
507 static constexpr uintptr_t _S_lock_bit{1};
│ │ │ +
508 };
│ │ │ +
509
│ │ │ +
510 typename _Tp::element_type* _M_ptr = nullptr;
│ │ │ +
511 _Atomic_count _M_refcount;
│ │ │ +
512
│ │ │ +
513 static typename _Atomic_count::pointer
│ │ │ +
514 _S_add_ref(typename _Atomic_count::pointer __p)
│ │ │ +
515 {
│ │ │ +
516 if (__p)
│ │ │ +
517 {
│ │ │ +
518 if constexpr (__is_shared_ptr<_Tp>)
│ │ │ +
519 __p->_M_add_ref_copy();
│ │ │ +
520 else
│ │ │ +
521 __p->_M_weak_add_ref();
│ │ │ +
522 }
│ │ │ +
523 return __p;
│ │ │ +
524 }
│ │ │ +
525
│ │ │ +
526 constexpr _Sp_atomic() noexcept = default;
│ │ │ +
527
│ │ │ +
528 explicit
│ │ │ +
529 _Sp_atomic(value_type __r) noexcept
│ │ │ +
530 : _M_ptr(__r._M_ptr), _M_refcount(std::move(__r._M_refcount))
│ │ │ +
531 { }
│ │ │ +
532
│ │ │ +
533 ~_Sp_atomic() = default;
│ │ │ +
534
│ │ │ +
535 _Sp_atomic(const _Sp_atomic&) = delete;
│ │ │ +
536 void operator=(const _Sp_atomic&) = delete;
│ │ │ +
537
│ │ │ +
538 value_type
│ │ │ +
539 load(memory_order __o) const noexcept
│ │ │ +
540 {
│ │ │ +
541 __glibcxx_assert(__o != memory_order_release
│ │ │ +
542 && __o != memory_order_acq_rel);
│ │ │ +
543 // Ensure that the correct value of _M_ptr is visible after locking.,
│ │ │ +
544 // by upgrading relaxed or consume to acquire.
│ │ │ +
545 if (__o != memory_order_seq_cst)
│ │ │ +
546 __o = memory_order_acquire;
│ │ │ +
547
│ │ │ +
548 value_type __ret;
│ │ │ +
549 auto __pi = _M_refcount.lock(__o);
│ │ │ +
550 __ret._M_ptr = _M_ptr;
│ │ │ +
551 __ret._M_refcount._M_pi = _S_add_ref(__pi);
│ │ │ +
552 _M_refcount.unlock(memory_order_relaxed);
│ │ │ +
553 return __ret;
│ │ │ +
554 }
│ │ │ +
555
│ │ │ +
556 void
│ │ │ +
557 swap(value_type& __r, memory_order __o) noexcept
│ │ │ +
558 {
│ │ │ +
559 _M_refcount.lock(memory_order_acquire);
│ │ │ +
560 std::swap(_M_ptr, __r._M_ptr);
│ │ │ +
561 _M_refcount._M_swap_unlock(__r._M_refcount, __o);
│ │ │ +
562 }
│ │ │ +
563
│ │ │ +
564 bool
│ │ │ +
565 compare_exchange_strong(value_type& __expected, value_type __desired,
│ │ │ +
566 memory_order __o, memory_order __o2) noexcept
│ │ │ +
567 {
│ │ │ +
568 bool __result = true;
│ │ │ +
569 auto __pi = _M_refcount.lock(memory_order_acquire);
│ │ │ +
570 if (_M_ptr == __expected._M_ptr
│ │ │ +
571 && __pi == __expected._M_refcount._M_pi)
│ │ │ +
572 {
│ │ │ +
573 _M_ptr = __desired._M_ptr;
│ │ │ +
574 _M_refcount._M_swap_unlock(__desired._M_refcount, __o);
│ │ │ +
575 }
│ │ │ +
576 else
│ │ │ +
577 {
│ │ │ +
578 _Tp __sink = std::move(__expected);
│ │ │ +
579 __expected._M_ptr = _M_ptr;
│ │ │ +
580 __expected._M_refcount._M_pi = _S_add_ref(__pi);
│ │ │ +
581 _M_refcount.unlock(__o2);
│ │ │ +
582 __result = false;
│ │ │ +
583 }
│ │ │ +
584 return __result;
│ │ │ +
585 }
│ │ │ +
586
│ │ │ +
587#if __cpp_lib_atomic_wait
│ │ │ +
588 void
│ │ │ +
589 wait(value_type __old, memory_order __o) const noexcept
│ │ │ +
590 {
│ │ │ +
591 auto __pi = _M_refcount.lock(memory_order_acquire);
│ │ │ +
592 if (_M_ptr == __old._M_ptr && __pi == __old._M_refcount._M_pi)
│ │ │ +
593 _M_refcount._M_wait_unlock(__o);
│ │ │ +
594 else
│ │ │ +
595 _M_refcount.unlock(memory_order_relaxed);
│ │ │ +
596 }
│ │ │ +
597
│ │ │ +
598 void
│ │ │ +
599 notify_one() noexcept
│ │ │ +
600 {
│ │ │ +
601 _M_refcount.notify_one();
│ │ │ +
602 }
│ │ │ +
603
│ │ │ +
604 void
│ │ │ +
605 notify_all() noexcept
│ │ │ +
606 {
│ │ │ +
607 _M_refcount.notify_all();
│ │ │ +
608 }
│ │ │ +
609#endif
│ │ │ +
610 };
│ │ │ +
611
│ │ │ +
612 template<typename _Tp>
│ │ │ +
613 struct atomic<shared_ptr<_Tp>>
│ │ │ +
614 {
│ │ │ +
615 public:
│ │ │ +
616 using value_type = shared_ptr<_Tp>;
│ │ │ +
617
│ │ │ +
618 static constexpr bool is_always_lock_free = false;
│ │ │ +
619
│ │ │ +
620 bool
│ │ │ +
621 is_lock_free() const noexcept
│ │ │ +
622 { return false; }
│ │ │ +
623
│ │ │ +
624 constexpr atomic() noexcept = default;
│ │ │ +
625
│ │ │ +
626 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ +
627 // 3661. constinit atomic<shared_ptr<T>> a(nullptr); should work
│ │ │ +
628 constexpr atomic(nullptr_t) noexcept : atomic() { }
│ │ │ +
629
│ │ │ +
630 atomic(shared_ptr<_Tp> __r) noexcept
│ │ │ +
631 : _M_impl(std::move(__r))
│ │ │ +
632 { }
│ │ │ +
633
│ │ │ +
634 atomic(const atomic&) = delete;
│ │ │ +
635 void operator=(const atomic&) = delete;
│ │ │ +
636
│ │ │ +
637 shared_ptr<_Tp>
│ │ │ +
638 load(memory_order __o = memory_order_seq_cst) const noexcept
│ │ │ +
639 { return _M_impl.load(__o); }
│ │ │ +
640
│ │ │ +
641 operator shared_ptr<_Tp>() const noexcept
│ │ │ +
642 { return _M_impl.load(memory_order_seq_cst); }
│ │ │ +
643
│ │ │ +
644 void
│ │ │ +
645 store(shared_ptr<_Tp> __desired,
│ │ │ +
646 memory_order __o = memory_order_seq_cst) noexcept
│ │ │ +
647 { _M_impl.swap(__desired, __o); }
│ │ │ +
648
│ │ │ +
649 void
│ │ │ +
650 operator=(shared_ptr<_Tp> __desired) noexcept
│ │ │ +
651 { _M_impl.swap(__desired, memory_order_seq_cst); }
│ │ │ +
652
│ │ │ +
653 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ +
654 // 3893. LWG 3661 broke atomic<shared_ptr<T>> a; a = nullptr;
│ │ │ +
655 void
│ │ │ +
656 operator=(nullptr_t) noexcept
│ │ │ +
657 { store(nullptr); }
│ │ │ +
658
│ │ │ +
659 shared_ptr<_Tp>
│ │ │ +
660 exchange(shared_ptr<_Tp> __desired,
│ │ │ +
661 memory_order __o = memory_order_seq_cst) noexcept
│ │ │ +
662 {
│ │ │ +
663 _M_impl.swap(__desired, __o);
│ │ │ +
664 return __desired;
│ │ │ +
665 }
│ │ │ +
666
│ │ │ +
667 bool
│ │ │ +
668 compare_exchange_strong(shared_ptr<_Tp>& __expected,
│ │ │ +
669 shared_ptr<_Tp> __desired,
│ │ │ +
670 memory_order __o, memory_order __o2) noexcept
│ │ │ +
671 {
│ │ │ +
672 return _M_impl.compare_exchange_strong(__expected, __desired, __o, __o2);
│ │ │ +
673 }
│ │ │ +
674
│ │ │ +
675 bool
│ │ │ +
676 compare_exchange_strong(value_type& __expected, value_type __desired,
│ │ │ +
677 memory_order __o = memory_order_seq_cst) noexcept
│ │ │ +
678 {
│ │ │ +
679 memory_order __o2;
│ │ │ +
680 switch (__o)
│ │ │ +
681 {
│ │ │ +
682 case memory_order_acq_rel:
│ │ │ +
683 __o2 = memory_order_acquire;
│ │ │ +
684 break;
│ │ │ +
685 case memory_order_release:
│ │ │ +
686 __o2 = memory_order_relaxed;
│ │ │ +
687 break;
│ │ │ +
688 default:
│ │ │ +
689 __o2 = __o;
│ │ │ +
690 }
│ │ │ +
691 return compare_exchange_strong(__expected, std::move(__desired),
│ │ │ +
692 __o, __o2);
│ │ │ +
693 }
│ │ │ +
694
│ │ │ +
695 bool
│ │ │ +
696 compare_exchange_weak(value_type& __expected, value_type __desired,
│ │ │ +
697 memory_order __o, memory_order __o2) noexcept
│ │ │ +
698 {
│ │ │ +
699 return compare_exchange_strong(__expected, std::move(__desired),
│ │ │ +
700 __o, __o2);
│ │ │ +
701 }
│ │ │ +
702
│ │ │ +
703 bool
│ │ │ +
704 compare_exchange_weak(value_type& __expected, value_type __desired,
│ │ │ +
705 memory_order __o = memory_order_seq_cst) noexcept
│ │ │ +
706 {
│ │ │ +
707 return compare_exchange_strong(__expected, std::move(__desired), __o);
│ │ │ +
708 }
│ │ │ +
709
│ │ │ +
710#if __cpp_lib_atomic_wait
│ │ │ +
711 void
│ │ │ +
712 wait(value_type __old,
│ │ │ +
713 memory_order __o = memory_order_seq_cst) const noexcept
│ │ │ +
714 {
│ │ │ +
715 _M_impl.wait(std::move(__old), __o);
│ │ │ +
716 }
│ │ │ +
717
│ │ │ +
718 void
│ │ │ +
719 notify_one() noexcept
│ │ │ +
720 {
│ │ │ +
721 _M_impl.notify_one();
│ │ │ +
722 }
│ │ │ +
723
│ │ │ +
724 void
│ │ │ +
725 notify_all() noexcept
│ │ │ +
726 {
│ │ │ +
727 _M_impl.notify_all();
│ │ │ +
728 }
│ │ │ +
729#endif
│ │ │ +
730
│ │ │ +
731 private:
│ │ │ +
732 _Sp_atomic<shared_ptr<_Tp>> _M_impl;
│ │ │ +
733 };
│ │ │ +
734
│ │ │ +
735 template<typename _Tp>
│ │ │ +
736 struct atomic<weak_ptr<_Tp>>
│ │ │ +
737 {
│ │ │ +
738 public:
│ │ │ +
739 using value_type = weak_ptr<_Tp>;
│ │ │ +
740
│ │ │ +
741 static constexpr bool is_always_lock_free = false;
│ │ │ +
742
│ │ │ +
743 bool
│ │ │ +
744 is_lock_free() const noexcept
│ │ │ +
745 { return false; }
│ │ │ +
746
│ │ │ +
747 constexpr atomic() noexcept = default;
│ │ │ +
748
│ │ │ +
749 atomic(weak_ptr<_Tp> __r) noexcept
│ │ │ +
750 : _M_impl(move(__r))
│ │ │ +
751 { }
│ │ │ +
752
│ │ │ +
753 atomic(const atomic&) = delete;
│ │ │ +
754 void operator=(const atomic&) = delete;
│ │ │ +
755
│ │ │ +
756 weak_ptr<_Tp>
│ │ │ +
757 load(memory_order __o = memory_order_seq_cst) const noexcept
│ │ │ +
758 { return _M_impl.load(__o); }
│ │ │ +
759
│ │ │ +
760 operator weak_ptr<_Tp>() const noexcept
│ │ │ +
761 { return _M_impl.load(memory_order_seq_cst); }
│ │ │ +
762
│ │ │ +
763 void
│ │ │ +
764 store(weak_ptr<_Tp> __desired,
│ │ │ +
765 memory_order __o = memory_order_seq_cst) noexcept
│ │ │ +
766 { _M_impl.swap(__desired, __o); }
│ │ │ +
767
│ │ │ +
768 void
│ │ │ +
769 operator=(weak_ptr<_Tp> __desired) noexcept
│ │ │ +
770 { _M_impl.swap(__desired, memory_order_seq_cst); }
│ │ │ +
771
│ │ │ +
772 weak_ptr<_Tp>
│ │ │ +
773 exchange(weak_ptr<_Tp> __desired,
│ │ │ +
774 memory_order __o = memory_order_seq_cst) noexcept
│ │ │ +
775 {
│ │ │ +
776 _M_impl.swap(__desired, __o);
│ │ │ +
777 return __desired;
│ │ │ +
778 }
│ │ │ +
779
│ │ │ +
780 bool
│ │ │ +
781 compare_exchange_strong(weak_ptr<_Tp>& __expected,
│ │ │ +
782 weak_ptr<_Tp> __desired,
│ │ │ +
783 memory_order __o, memory_order __o2) noexcept
│ │ │ +
784 {
│ │ │ +
785 return _M_impl.compare_exchange_strong(__expected, __desired, __o, __o2);
│ │ │ +
786 }
│ │ │ +
787
│ │ │ +
788 bool
│ │ │ +
789 compare_exchange_strong(value_type& __expected, value_type __desired,
│ │ │ +
790 memory_order __o = memory_order_seq_cst) noexcept
│ │ │ +
791 {
│ │ │ +
792 memory_order __o2;
│ │ │ +
793 switch (__o)
│ │ │ +
794 {
│ │ │ +
795 case memory_order_acq_rel:
│ │ │ +
796 __o2 = memory_order_acquire;
│ │ │ +
797 break;
│ │ │ +
798 case memory_order_release:
│ │ │ +
799 __o2 = memory_order_relaxed;
│ │ │ +
800 break;
│ │ │ +
801 default:
│ │ │ +
802 __o2 = __o;
│ │ │ +
803 }
│ │ │ +
804 return compare_exchange_strong(__expected, std::move(__desired),
│ │ │ +
805 __o, __o2);
│ │ │ +
806 }
│ │ │ +
807
│ │ │ +
808 bool
│ │ │ +
809 compare_exchange_weak(value_type& __expected, value_type __desired,
│ │ │ +
810 memory_order __o, memory_order __o2) noexcept
│ │ │ +
811 {
│ │ │ +
812 return compare_exchange_strong(__expected, std::move(__desired),
│ │ │ +
813 __o, __o2);
│ │ │ +
814 }
│ │ │ +
815
│ │ │ +
816 bool
│ │ │ +
817 compare_exchange_weak(value_type& __expected, value_type __desired,
│ │ │ +
818 memory_order __o = memory_order_seq_cst) noexcept
│ │ │ +
819 {
│ │ │ +
820 return compare_exchange_strong(__expected, std::move(__desired), __o);
│ │ │ +
821 }
│ │ │ +
822
│ │ │ +
823#if __cpp_lib_atomic_wait
│ │ │ +
824 void
│ │ │ +
825 wait(value_type __old,
│ │ │ +
826 memory_order __o = memory_order_seq_cst) const noexcept
│ │ │ +
827 {
│ │ │ +
828 _M_impl.wait(std::move(__old), __o);
│ │ │ +
829 }
│ │ │ +
830
│ │ │ +
831 void
│ │ │ +
832 notify_one() noexcept
│ │ │ +
833 {
│ │ │ +
834 _M_impl.notify_one();
│ │ │ +
835 }
│ │ │ +
836
│ │ │ +
837 void
│ │ │ +
838 notify_all() noexcept
│ │ │ +
839 {
│ │ │ +
840 _M_impl.notify_all();
│ │ │ +
841 }
│ │ │ +
842#endif
│ │ │ +
843
│ │ │ +
844 private:
│ │ │ +
845 _Sp_atomic<weak_ptr<_Tp>> _M_impl;
│ │ │ +
846 };
│ │ │ +
847 /// @} group pointer_abstractions
│ │ │ +
848#endif // C++20
│ │ │ +
849
│ │ │ +
850_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ +
851} // namespace
│ │ │ +
852
│ │ │ +
853#endif // _SHARED_PTR_ATOMIC_H
│ │ │ + │ │ │ +
constexpr std::remove_reference< _Tp >::type && move(_Tp &&__t) noexcept
Convert a value to an rvalue.
Definition move.h:104
│ │ │ +
void swap(any &__x, any &__y) noexcept
Exchange the states of two any objects.
Definition any:429
│ │ │ +
memory_order
Enumeration for memory_order.
Definition atomic_base.h:62
│ │ │ +
void lock(_L1 &__l1, _L2 &__l2, _L3 &... __l3)
Generic lock.
Definition mutex:677
│ │ │
ISO C++ entities toplevel namespace is std.
│ │ │ -
__numeric_traits_integer< _Tp > __int_traits
Convenience alias for __numeric_traits<integer-type>.
│ │ │ -
is_integral
Definition type_traits:415
│ │ │ -
Uniform discrete distribution for random numbers. A discrete random distribution on the range with e...
│ │ │ -
void reset()
Resets the distribution state.
│ │ │ -
uniform_int_distribution()
Constructs a uniform distribution object.
│ │ │ -
void param(const param_type &__param)
Sets the parameter set of the distribution.
│ │ │ -
result_type min() const
Returns the inclusive lower bound of the distribution range.
│ │ │ - │ │ │ -
friend bool operator==(const uniform_int_distribution &__d1, const uniform_int_distribution &__d2)
Return true if two uniform integer distributions have the same parameters.
│ │ │ -
result_type max() const
Returns the inclusive upper bound of the distribution range.
│ │ │ -
result_type operator()(_UniformRandomBitGenerator &__urng)
Generating functions.
│ │ │ -
uniform_int_distribution(_IntType __a, _IntType __b=__gnu_cxx::__int_traits< _IntType >::__max)
Constructs a uniform distribution object.
│ │ │ -
param_type param() const
Returns the parameter set of the distribution.
│ │ │ - │ │ │ - │ │ │ -
[concept.same], concept same_as
Definition concepts:63
│ │ │ -
[concept.invocable], concept invocable
Definition concepts:336
│ │ │ -
Requirements for a uniform random bit generator.
│ │ │ - │ │ │ + │ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,13 +1,13 @@ │ │ │ │ libstdc++ │ │ │ │ -uniform_int_dist.h │ │ │ │ +shared_ptr_atomic.h │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -1// Class template uniform_int_distribution -*- C++ -*- │ │ │ │ +1// shared_ptr atomic access -*- C++ -*- │ │ │ │ 2 │ │ │ │ -3// Copyright (C) 2009-2022 Free Software Foundation, Inc. │ │ │ │ +3// Copyright (C) 2014-2022 Free Software Foundation, Inc. │ │ │ │ 4// │ │ │ │ 5// This file is part of the GNU ISO C++ Library. This library is free │ │ │ │ 6// software; you can redistribute it and/or modify it under the │ │ │ │ 7// terms of the GNU General Public License as published by the │ │ │ │ 8// Free Software Foundation; either version 3, or (at your option) │ │ │ │ 9// any later version. │ │ │ │ 10 │ │ │ │ @@ -21,518 +21,860 @@ │ │ │ │ 18// 3.1, as published by the Free Software Foundation. │ │ │ │ 19 │ │ │ │ 20// You should have received a copy of the GNU General Public License and │ │ │ │ 21// a copy of the GCC Runtime Library Exception along with this program; │ │ │ │ 22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see │ │ │ │ 23// . │ │ │ │ 24 │ │ │ │ -25/** │ │ │ │ -26 * @file bits/uniform_int_dist.h │ │ │ │ -27 * This is an internal header file, included by other library headers. │ │ │ │ -28 * Do not attempt to use it directly. @headername{random} │ │ │ │ -29 */ │ │ │ │ -30 │ │ │ │ -31#ifndef _GLIBCXX_BITS_UNIFORM_INT_DIST_H │ │ │ │ -32#define _GLIBCXX_BITS_UNIFORM_INT_DIST_H │ │ │ │ -33 │ │ │ │ -34#include <_t_y_p_e___t_r_a_i_t_s> │ │ │ │ -35#include <_e_x_t_/_n_u_m_e_r_i_c___t_r_a_i_t_s_._h> │ │ │ │ -36#if __cplusplus > 201703L │ │ │ │ -37# include <_c_o_n_c_e_p_t_s> │ │ │ │ -38#endif │ │ │ │ -39#include <_b_i_t_s_/_c_o_n_c_e_p_t___c_h_e_c_k_._h> // __glibcxx_function_requires │ │ │ │ -40 │ │ │ │ -41namespace _s_t_d _GLIBCXX_VISIBILITY(default) │ │ │ │ -42{ │ │ │ │ -43_GLIBCXX_BEGIN_NAMESPACE_VERSION │ │ │ │ -44 │ │ │ │ -45#ifdef __cpp_lib_concepts │ │ │ │ -46 /// Requirements for a uniform random bit generator. │ │ │ │ -47 template │ │ │ │ -_4_8 concept _u_n_i_f_o_r_m___r_a_n_d_o_m___b_i_t___g_e_n_e_r_a_t_o_r │ │ │ │ -49 = _i_n_v_o_c_a_b_l_e_<___G_e_n_&_> && unsigned_integral> │ │ │ │ -50 && requires │ │ │ │ -51 { │ │ │ │ -52 { _Gen::min() } -> _s_a_m_e___a_s_<_i_n_v_o_k_e___r_e_s_u_l_t___t_<___G_e_n_&_>>; │ │ │ │ -53 { _Gen::max() } -> _s_a_m_e___a_s_<_i_n_v_o_k_e___r_e_s_u_l_t___t_<___G_e_n_&_>>; │ │ │ │ -54 requires _b_o_o_l___c_o_n_s_t_a_n_t<(_Gen::min() < _Gen::max())>::value; │ │ │ │ -55 }; │ │ │ │ -56#endif │ │ │ │ -57 │ │ │ │ -58 namespace __detail │ │ │ │ -59 { │ │ │ │ -60 // Determine whether number is a power of two. │ │ │ │ -61 // This is true for zero, which is OK because we want _Power_of_2(n+1) │ │ │ │ -62 // to be true if n==numeric_limits<_Tp>::max() and so n+1 wraps around. │ │ │ │ -63 template │ │ │ │ -64 constexpr bool │ │ │ │ -65 _Power_of_2(_Tp __x) │ │ │ │ -66 { │ │ │ │ -67 return ((__x - 1) & __x) == 0; │ │ │ │ -68 } │ │ │ │ -69 } │ │ │ │ +25/** @file bits/shared_ptr_atomic.h │ │ │ │ +26 * This is an internal header file, included by other library headers. │ │ │ │ +27 * Do not attempt to use it directly. @headername{memory} │ │ │ │ +28 */ │ │ │ │ +29 │ │ │ │ +30#ifndef _SHARED_PTR_ATOMIC_H │ │ │ │ +31#define _SHARED_PTR_ATOMIC_H 1 │ │ │ │ +32 │ │ │ │ +33#include <_b_i_t_s_/_a_t_o_m_i_c___b_a_s_e_._h> │ │ │ │ +34 │ │ │ │ +35// Annotations for the custom locking in atomic>. │ │ │ │ +36#if defined _GLIBCXX_TSAN && __has_include() │ │ │ │ +37#include │ │ │ │ +38#define _GLIBCXX_TSAN_MUTEX_DESTROY(X) \ │ │ │ │ +39 __tsan_mutex_destroy(X, __tsan_mutex_not_static) │ │ │ │ +40#define _GLIBCXX_TSAN_MUTEX_TRY_LOCK(X) \ │ │ │ │ +41 __tsan_mutex_pre_lock(X, __tsan_mutex_not_static|__tsan_mutex_try_lock) │ │ │ │ +42#define _GLIBCXX_TSAN_MUTEX_TRY_LOCK_FAILED(X) __tsan_mutex_post_lock(X, \ │ │ │ │ +43 __tsan_mutex_not_static|__tsan_mutex_try_lock_failed, 0) │ │ │ │ +44#define _GLIBCXX_TSAN_MUTEX_LOCKED(X) \ │ │ │ │ +45 __tsan_mutex_post_lock(X, __tsan_mutex_not_static, 0) │ │ │ │ +46#define _GLIBCXX_TSAN_MUTEX_PRE_UNLOCK(X) __tsan_mutex_pre_unlock(X, 0) │ │ │ │ +47#define _GLIBCXX_TSAN_MUTEX_POST_UNLOCK(X) __tsan_mutex_post_unlock(X, 0) │ │ │ │ +48#define _GLIBCXX_TSAN_MUTEX_PRE_SIGNAL(X) __tsan_mutex_pre_signal(X, 0) │ │ │ │ +49#define _GLIBCXX_TSAN_MUTEX_POST_SIGNAL(X) __tsan_mutex_post_signal(X, 0) │ │ │ │ +50#else │ │ │ │ +51#define _GLIBCXX_TSAN_MUTEX_DESTROY(X) │ │ │ │ +52#define _GLIBCXX_TSAN_MUTEX_TRY_LOCK(X) │ │ │ │ +53#define _GLIBCXX_TSAN_MUTEX_TRY_LOCK_FAILED(X) │ │ │ │ +54#define _GLIBCXX_TSAN_MUTEX_LOCKED(X) │ │ │ │ +55#define _GLIBCXX_TSAN_MUTEX_PRE_UNLOCK(X) │ │ │ │ +56#define _GLIBCXX_TSAN_MUTEX_POST_UNLOCK(X) │ │ │ │ +57#define _GLIBCXX_TSAN_MUTEX_PRE_SIGNAL(X) │ │ │ │ +58#define _GLIBCXX_TSAN_MUTEX_POST_SIGNAL(X) │ │ │ │ +59#endif │ │ │ │ +60 │ │ │ │ +61namespace _s_t_d _GLIBCXX_VISIBILITY(default) │ │ │ │ +62{ │ │ │ │ +63_GLIBCXX_BEGIN_NAMESPACE_VERSION │ │ │ │ +64 │ │ │ │ +65 /** │ │ │ │ +66 * @addtogroup pointer_abstractions │ │ │ │ +67 * @relates shared_ptr │ │ │ │ +68 * @{ │ │ │ │ +69 */ │ │ │ │ 70 │ │ │ │ -71 /** │ │ │ │ -72 * @brief Uniform discrete distribution for random numbers. │ │ │ │ -73 * A discrete random distribution on the range @f$[min, max]@f$ with equal │ │ │ │ -74 * probability throughout the range. │ │ │ │ -75 */ │ │ │ │ -76 template │ │ │ │ -_7_7 class _u_n_i_f_o_r_m___i_n_t___d_i_s_t_r_i_b_u_t_i_o_n │ │ │ │ -78 { │ │ │ │ -79 static_assert(_s_t_d_:_:_i_s___i_n_t_e_g_r_a_l_<___I_n_t_T_y_p_e_>_:_:_v_a_l_u_e, │ │ │ │ -80 "template argument must be an integral type"); │ │ │ │ -81 │ │ │ │ -82 public: │ │ │ │ -83 /** The type of the range of the distribution. */ │ │ │ │ -_8_4 typedef _IntType _r_e_s_u_l_t___t_y_p_e; │ │ │ │ -85 /** Parameter type. */ │ │ │ │ -_8_6 struct _p_a_r_a_m___t_y_p_e │ │ │ │ -87 { │ │ │ │ -88 typedef _u_n_i_f_o_r_m___i_n_t___d_i_s_t_r_i_b_u_t_i_o_n_<___I_n_t_T_y_p_e_> _d_i_s_t_r_i_b_u_t_i_o_n___t_y_p_e; │ │ │ │ -89 │ │ │ │ -90 _p_a_r_a_m___t_y_p_e() : _p_a_r_a_m___t_y_p_e(0) { } │ │ │ │ +71 /// @cond undocumented │ │ │ │ +72 │ │ │ │ +73 struct _Sp_locker │ │ │ │ +74 { │ │ │ │ +75 _Sp_locker(const _Sp_locker&) = delete; │ │ │ │ +76 _Sp_locker& operator=(const _Sp_locker&) = delete; │ │ │ │ +77 │ │ │ │ +78#ifdef __GTHREADS │ │ │ │ +79 explicit │ │ │ │ +80 _Sp_locker(const void*) noexcept; │ │ │ │ +81 _Sp_locker(const void*, const void*) noexcept; │ │ │ │ +82 ~_Sp_locker(); │ │ │ │ +83 │ │ │ │ +84 private: │ │ │ │ +85 unsigned char _M_key1; │ │ │ │ +86 unsigned char _M_key2; │ │ │ │ +87#else │ │ │ │ +88 explicit _Sp_locker(const void*, const void* = nullptr) { } │ │ │ │ +89#endif │ │ │ │ +90 }; │ │ │ │ 91 │ │ │ │ -92 explicit │ │ │ │ -93 _p_a_r_a_m___t_y_p_e(_IntType __a, │ │ │ │ -94 _IntType __b = _____g_n_u___c_x_x_:_:_____i_n_t___t_r_a_i_t_s_<___I_n_t_T_y_p_e_>_:_:_____m_a_x) │ │ │ │ -95 : _M_a(__a), _M_b(__b) │ │ │ │ -96 { │ │ │ │ -97 __glibcxx_assert(_M_a <= _M_b); │ │ │ │ -98 } │ │ │ │ -99 │ │ │ │ -100 _r_e_s_u_l_t___t_y_p_e │ │ │ │ -101 a() const │ │ │ │ -102 { return _M_a; } │ │ │ │ -103 │ │ │ │ -104 _r_e_s_u_l_t___t_y_p_e │ │ │ │ -105 b() const │ │ │ │ -106 { return _M_b; } │ │ │ │ -107 │ │ │ │ -108 friend bool │ │ │ │ -109 operator==(const _p_a_r_a_m___t_y_p_e& _____p_1, const _p_a_r_a_m___t_y_p_e& _____p_2) │ │ │ │ -110 { return _____p_1._M_a == _____p_2._M_a && _____p_1._M_b == _____p_2._M_b; } │ │ │ │ -111 │ │ │ │ -112 friend bool │ │ │ │ -113 operator!=(const _p_a_r_a_m___t_y_p_e& _____p_1, const _p_a_r_a_m___t_y_p_e& _____p_2) │ │ │ │ -114 { return !(_____p_1 == _____p_2); } │ │ │ │ +92 /// @endcond │ │ │ │ +93 │ │ │ │ +94 /** │ │ │ │ +95 * @brief Report whether shared_ptr atomic operations are lock-free. │ │ │ │ +96 * @param __p A non-null pointer to a shared_ptr object. │ │ │ │ +97 * @return True if atomic access to @c *__p is lock-free, false otherwise. │ │ │ │ +98 * @{ │ │ │ │ +99 */ │ │ │ │ +100 template │ │ │ │ +101 inline bool │ │ │ │ +_1_0_2 atomic_is_lock_free(const _____s_h_a_r_e_d___p_t_r_<___T_p_,_ ___L_p_>* __p) │ │ │ │ +103 { │ │ │ │ +104#ifdef __GTHREADS │ │ │ │ +105 return __gthread_active_p() == 0; │ │ │ │ +106#else │ │ │ │ +107 return true; │ │ │ │ +108#endif │ │ │ │ +109 } │ │ │ │ +110 │ │ │ │ +111 template │ │ │ │ +112 inline bool │ │ │ │ +_1_1_3 atomic_is_lock_free(const _s_h_a_r_e_d___p_t_r_<___T_p_>* __p) │ │ │ │ +114 { return _s_t_d_:_:_a_t_o_m_i_c___i_s___l_o_c_k___f_r_e_e_<___T_p_,_ _____d_e_f_a_u_l_t___l_o_c_k___p_o_l_i_c_y_>(__p); } │ │ │ │ 115 │ │ │ │ -116 private: │ │ │ │ -117 _IntType _M_a; │ │ │ │ -118 _IntType _M_b; │ │ │ │ -119 }; │ │ │ │ -120 │ │ │ │ -121 public: │ │ │ │ -122 /** │ │ │ │ -123 * @brief Constructs a uniform distribution object. │ │ │ │ -124 */ │ │ │ │ -_1_2_5 _u_n_i_f_o_r_m___i_n_t___d_i_s_t_r_i_b_u_t_i_o_n() : _u_n_i_f_o_r_m___i_n_t___d_i_s_t_r_i_b_u_t_i_o_n(0) { } │ │ │ │ -126 │ │ │ │ -127 /** │ │ │ │ -128 * @brief Constructs a uniform distribution object. │ │ │ │ -129 */ │ │ │ │ -130 explicit │ │ │ │ -_1_3_1 _u_n_i_f_o_r_m___i_n_t___d_i_s_t_r_i_b_u_t_i_o_n(_IntType __a, │ │ │ │ -132 _IntType __b │ │ │ │ -133 = _____g_n_u___c_x_x_:_:_____i_n_t___t_r_a_i_t_s_<___I_n_t_T_y_p_e_>_:_:_____m_a_x) │ │ │ │ -134 : _M_param(__a, __b) │ │ │ │ -135 { } │ │ │ │ -136 │ │ │ │ -137 explicit │ │ │ │ -138 _u_n_i_f_o_r_m___i_n_t___d_i_s_t_r_i_b_u_t_i_o_n(const param_type& __p) │ │ │ │ -139 : _M_param(__p) │ │ │ │ -140 { } │ │ │ │ -141 │ │ │ │ -142 /** │ │ │ │ -143 * @brief Resets the distribution state. │ │ │ │ -144 * │ │ │ │ -145 * Does nothing for the uniform integer distribution. │ │ │ │ -146 */ │ │ │ │ -147 void │ │ │ │ -_1_4_8 _r_e_s_e_t() { } │ │ │ │ -149 │ │ │ │ -150 _r_e_s_u_l_t___t_y_p_e │ │ │ │ -151 a() const │ │ │ │ -152 { return _M_param.a(); } │ │ │ │ +116 /// @} │ │ │ │ +117 │ │ │ │ +118 /** │ │ │ │ +119 * @brief Atomic load for shared_ptr objects. │ │ │ │ +120 * @param __p A non-null pointer to a shared_ptr object. │ │ │ │ +121 * @return @c *__p │ │ │ │ +122 * │ │ │ │ +123 * The memory order shall not be `memory_order_release` or │ │ │ │ +124 * `memory_order_acq_rel`. │ │ │ │ +125 * @{ │ │ │ │ +126 */ │ │ │ │ +127 template │ │ │ │ +128 inline shared_ptr<_Tp> │ │ │ │ +_1_2_9 atomic_load_explicit(const _s_h_a_r_e_d___p_t_r_<___T_p_>* __p, _m_e_m_o_r_y___o_r_d_e_r) │ │ │ │ +130 { │ │ │ │ +131 ___S_p___l_o_c_k_e_r _____l_o_c_k{__p}; │ │ │ │ +132 return *__p; │ │ │ │ +133 } │ │ │ │ +134 │ │ │ │ +135 template │ │ │ │ +136 inline shared_ptr<_Tp> │ │ │ │ +_1_3_7 atomic_load(const _s_h_a_r_e_d___p_t_r_<___T_p_>* __p) │ │ │ │ +138 { return std::atomic_load_explicit(__p, memory_order_seq_cst); } │ │ │ │ +139 │ │ │ │ +140 template │ │ │ │ +141 inline __shared_ptr<_Tp, _Lp> │ │ │ │ +_1_4_2 atomic_load_explicit(const _____s_h_a_r_e_d___p_t_r_<___T_p_,_ ___L_p_>* __p, _m_e_m_o_r_y___o_r_d_e_r) │ │ │ │ +143 { │ │ │ │ +144 ___S_p___l_o_c_k_e_r _____l_o_c_k{__p}; │ │ │ │ +145 return *__p; │ │ │ │ +146 } │ │ │ │ +147 │ │ │ │ +148 template │ │ │ │ +149 inline __shared_ptr<_Tp, _Lp> │ │ │ │ +_1_5_0 atomic_load(const _____s_h_a_r_e_d___p_t_r_<___T_p_,_ ___L_p_>* __p) │ │ │ │ +151 { return std::atomic_load_explicit(__p, memory_order_seq_cst); } │ │ │ │ +152 /// @} │ │ │ │ 153 │ │ │ │ -154 _r_e_s_u_l_t___t_y_p_e │ │ │ │ -155 b() const │ │ │ │ -156 { return _M_param.b(); } │ │ │ │ -157 │ │ │ │ -158 /** │ │ │ │ -159 * @brief Returns the parameter set of the distribution. │ │ │ │ -160 */ │ │ │ │ -161 param_type │ │ │ │ -_1_6_2 _p_a_r_a_m() const │ │ │ │ -163 { return _M_param; } │ │ │ │ -164 │ │ │ │ -165 /** │ │ │ │ -166 * @brief Sets the parameter set of the distribution. │ │ │ │ -167 * @param __param The new parameter set of the distribution. │ │ │ │ -168 */ │ │ │ │ -169 void │ │ │ │ -_1_7_0 _p_a_r_a_m(const _p_a_r_a_m___t_y_p_e& _____p_a_r_a_m) │ │ │ │ -171 { _M_param = _____p_a_r_a_m; } │ │ │ │ -172 │ │ │ │ -173 /** │ │ │ │ -174 * @brief Returns the inclusive lower bound of the distribution range. │ │ │ │ -175 */ │ │ │ │ -176 _r_e_s_u_l_t___t_y_p_e │ │ │ │ -_1_7_7 _m_i_n() const │ │ │ │ -178 { return this->a(); } │ │ │ │ -179 │ │ │ │ -180 /** │ │ │ │ -181 * @brief Returns the inclusive upper bound of the distribution range. │ │ │ │ -182 */ │ │ │ │ -183 _r_e_s_u_l_t___t_y_p_e │ │ │ │ -_1_8_4 _m_a_x() const │ │ │ │ -185 { return this->b(); } │ │ │ │ +154 /** │ │ │ │ +155 * @brief Atomic store for shared_ptr objects. │ │ │ │ +156 * @param __p A non-null pointer to a shared_ptr object. │ │ │ │ +157 * @param __r The value to store. │ │ │ │ +158 * │ │ │ │ +159 * The memory order shall not be `memory_order_acquire` or │ │ │ │ +160 * `memory_order_acq_rel`. │ │ │ │ +161 * @{ │ │ │ │ +162 */ │ │ │ │ +163 template │ │ │ │ +164 inline void │ │ │ │ +_1_6_5 atomic_store_explicit(_s_h_a_r_e_d___p_t_r_<___T_p_>* __p, _s_h_a_r_e_d___p_t_r_<___T_p_> __r, │ │ │ │ +166 _m_e_m_o_r_y___o_r_d_e_r) │ │ │ │ +167 { │ │ │ │ +168 ___S_p___l_o_c_k_e_r _____l_o_c_k{__p}; │ │ │ │ +169 __p->swap(__r); // use swap so that **__p not destroyed while lock held │ │ │ │ +170 } │ │ │ │ +171 │ │ │ │ +172 template │ │ │ │ +173 inline void │ │ │ │ +_1_7_4 atomic_store(_s_h_a_r_e_d___p_t_r_<___T_p_>* __p, _s_h_a_r_e_d___p_t_r_<___T_p_> __r) │ │ │ │ +175 { std::atomic_store_explicit(__p, _s_t_d_:_:_m_o_v_e(__r), memory_order_seq_cst); } │ │ │ │ +176 │ │ │ │ +177 template │ │ │ │ +178 inline void │ │ │ │ +_1_7_9 atomic_store_explicit(_____s_h_a_r_e_d___p_t_r_<___T_p_,_ ___L_p_>* __p, │ │ │ │ +180 _____s_h_a_r_e_d___p_t_r_<___T_p_,_ ___L_p_> __r, │ │ │ │ +181 _m_e_m_o_r_y___o_r_d_e_r) │ │ │ │ +182 { │ │ │ │ +183 ___S_p___l_o_c_k_e_r _____l_o_c_k{__p}; │ │ │ │ +184 __p->swap(__r); // use swap so that **__p not destroyed while lock held │ │ │ │ +185 } │ │ │ │ 186 │ │ │ │ -187 /** │ │ │ │ -188 * @brief Generating functions. │ │ │ │ -189 */ │ │ │ │ -190 template │ │ │ │ -191 _r_e_s_u_l_t___t_y_p_e │ │ │ │ -_1_9_2 _o_p_e_r_a_t_o_r_(_)(___U_n_i_f_o_r_m_R_a_n_d_o_m_B_i_t_G_e_n_e_r_a_t_o_r& _____u_r_n_g) │ │ │ │ -193 { return this->_o_p_e_r_a_t_o_r_(_)(__urng, _M_param); } │ │ │ │ -194 │ │ │ │ -195 template │ │ │ │ -196 _r_e_s_u_l_t___t_y_p_e │ │ │ │ -197 _o_p_e_r_a_t_o_r_(_)(___U_n_i_f_o_r_m_R_a_n_d_o_m_B_i_t_G_e_n_e_r_a_t_o_r& _____u_r_n_g, │ │ │ │ -198 const param_type& __p); │ │ │ │ -199 │ │ │ │ -200 template │ │ │ │ -202 void │ │ │ │ -203 __generate(___F_o_r_w_a_r_d_I_t_e_r_a_t_o_r __f, ___F_o_r_w_a_r_d_I_t_e_r_a_t_o_r __t, │ │ │ │ -204 ___U_n_i_f_o_r_m_R_a_n_d_o_m_B_i_t_G_e_n_e_r_a_t_o_r& _____u_r_n_g) │ │ │ │ -205 { this->__generate(__f, __t, _____u_r_n_g, _M_param); } │ │ │ │ -206 │ │ │ │ -207 template │ │ │ │ -209 void │ │ │ │ -210 __generate(_ForwardIterator __f, _ForwardIterator __t, │ │ │ │ -211 _UniformRandomBitGenerator& __urng, │ │ │ │ -212 const param_type& __p) │ │ │ │ -213 { this->__generate_impl(__f, __t, __urng, __p); } │ │ │ │ -214 │ │ │ │ -215 template │ │ │ │ -216 void │ │ │ │ -217 __generate(_r_e_s_u_l_t___t_y_p_e* __f, _r_e_s_u_l_t___t_y_p_e* __t, │ │ │ │ -218 _UniformRandomBitGenerator& __urng, │ │ │ │ -219 const param_type& __p) │ │ │ │ -220 { this->__generate_impl(__f, __t, __urng, __p); } │ │ │ │ -221 │ │ │ │ -222 /** │ │ │ │ -223 * @brief Return true if two uniform integer distributions have │ │ │ │ -224 * the same parameters. │ │ │ │ -225 */ │ │ │ │ -226 friend bool │ │ │ │ -_2_2_7 _o_p_e_r_a_t_o_r_=_=(const _u_n_i_f_o_r_m___i_n_t___d_i_s_t_r_i_b_u_t_i_o_n& _____d_1, │ │ │ │ -228 const _u_n_i_f_o_r_m___i_n_t___d_i_s_t_r_i_b_u_t_i_o_n& _____d_2) │ │ │ │ -229 { return _____d_1._M_param == _____d_2._M_param; } │ │ │ │ -230 │ │ │ │ -231 private: │ │ │ │ -232 template │ │ │ │ -234 void │ │ │ │ -235 __generate_impl(___F_o_r_w_a_r_d_I_t_e_r_a_t_o_r __f, ___F_o_r_w_a_r_d_I_t_e_r_a_t_o_r __t, │ │ │ │ -236 ___U_n_i_f_o_r_m_R_a_n_d_o_m_B_i_t_G_e_n_e_r_a_t_o_r& _____u_r_n_g, │ │ │ │ -237 const param_type& __p); │ │ │ │ -238 │ │ │ │ -239 param_type _M_param; │ │ │ │ -240 │ │ │ │ -241 // Lemire's nearly divisionless algorithm. │ │ │ │ -242 // Returns an unbiased random number from __g downscaled to [0,__range) │ │ │ │ -243 // using an unsigned type _Wp twice as wide as unsigned type _Up. │ │ │ │ -244 template │ │ │ │ -245 static _Up │ │ │ │ -246 _S_nd(___U_r_b_g& _____g, _Up _____r_a_n_g_e) │ │ │ │ -247 { │ │ │ │ -248 using ___U_p___t_r_a_i_t_s = _____g_n_u___c_x_x_:_:_____i_n_t___t_r_a_i_t_s_<___U_p_>; │ │ │ │ -249 using ___W_p___t_r_a_i_t_s = _____g_n_u___c_x_x_:_:_____i_n_t___t_r_a_i_t_s_<___W_p_>; │ │ │ │ -250 static_assert(!_Up_traits::__is_signed, "U must be unsigned"); │ │ │ │ -251 static_assert(!_Wp_traits::__is_signed, "W must be unsigned"); │ │ │ │ -252 static_assert(_Wp_traits::__digits == (2 * _Up_traits::__digits), │ │ │ │ -253 "W must be twice as wide as U"); │ │ │ │ -254 │ │ │ │ -255 // reference: Fast Random Integer Generation in an Interval │ │ │ │ -256 // ACM Transactions on Modeling and Computer Simulation 29 (1), 2019 │ │ │ │ -257 // https://arxiv.org/abs/1805.10941 │ │ │ │ -258 ___W_p _____p_r_o_d_u_c_t = ___W_p(_____g()) * ___W_p(_____r_a_n_g_e); │ │ │ │ -259 _Up _____l_o_w = _Up(_____p_r_o_d_u_c_t); │ │ │ │ -260 if (_____l_o_w < _____r_a_n_g_e) │ │ │ │ +187 template │ │ │ │ +188 inline void │ │ │ │ +_1_8_9 atomic_store(_____s_h_a_r_e_d___p_t_r_<___T_p_,_ ___L_p_>* __p, _____s_h_a_r_e_d___p_t_r_<___T_p_,_ ___L_p_> __r) │ │ │ │ +190 { std::atomic_store_explicit(__p, _s_t_d_:_:_m_o_v_e(__r), memory_order_seq_cst); } │ │ │ │ +191 /// @} │ │ │ │ +192 │ │ │ │ +193 /** │ │ │ │ +194 * @brief Atomic exchange for shared_ptr objects. │ │ │ │ +195 * @param __p A non-null pointer to a shared_ptr object. │ │ │ │ +196 * @param __r New value to store in `*__p`. │ │ │ │ +197 * @return The original value of `*__p` │ │ │ │ +198 * @{ │ │ │ │ +199 */ │ │ │ │ +200 template │ │ │ │ +201 inline shared_ptr<_Tp> │ │ │ │ +_2_0_2 atomic_exchange_explicit(_s_h_a_r_e_d___p_t_r_<___T_p_>* __p, _s_h_a_r_e_d___p_t_r_<___T_p_> __r, │ │ │ │ +203 _m_e_m_o_r_y___o_r_d_e_r) │ │ │ │ +204 { │ │ │ │ +205 ___S_p___l_o_c_k_e_r _____l_o_c_k{__p}; │ │ │ │ +206 __p->swap(__r); │ │ │ │ +207 return __r; │ │ │ │ +208 } │ │ │ │ +209 │ │ │ │ +210 template │ │ │ │ +211 inline shared_ptr<_Tp> │ │ │ │ +_2_1_2 atomic_exchange(_s_h_a_r_e_d___p_t_r_<___T_p_>* __p, _s_h_a_r_e_d___p_t_r_<___T_p_> __r) │ │ │ │ +213 { │ │ │ │ +214 return std::atomic_exchange_explicit(__p, _s_t_d_:_:_m_o_v_e(__r), │ │ │ │ +215 memory_order_seq_cst); │ │ │ │ +216 } │ │ │ │ +217 │ │ │ │ +218 template │ │ │ │ +219 inline __shared_ptr<_Tp, _Lp> │ │ │ │ +_2_2_0 atomic_exchange_explicit(_____s_h_a_r_e_d___p_t_r_<___T_p_,_ ___L_p_>* __p, │ │ │ │ +221 _____s_h_a_r_e_d___p_t_r_<___T_p_,_ ___L_p_> __r, │ │ │ │ +222 _m_e_m_o_r_y___o_r_d_e_r) │ │ │ │ +223 { │ │ │ │ +224 ___S_p___l_o_c_k_e_r _____l_o_c_k{__p}; │ │ │ │ +225 __p->swap(__r); │ │ │ │ +226 return __r; │ │ │ │ +227 } │ │ │ │ +228 │ │ │ │ +229 template │ │ │ │ +230 inline __shared_ptr<_Tp, _Lp> │ │ │ │ +_2_3_1 atomic_exchange(_____s_h_a_r_e_d___p_t_r_<___T_p_,_ ___L_p_>* __p, _____s_h_a_r_e_d___p_t_r_<___T_p_,_ ___L_p_> __r) │ │ │ │ +232 { │ │ │ │ +233 return std::atomic_exchange_explicit(__p, _s_t_d_:_:_m_o_v_e(__r), │ │ │ │ +234 memory_order_seq_cst); │ │ │ │ +235 } │ │ │ │ +236 /// @} │ │ │ │ +237 │ │ │ │ +238 /** │ │ │ │ +239 * @brief Atomic compare-and-swap for shared_ptr objects. │ │ │ │ +240 * @param __p A non-null pointer to a shared_ptr object. │ │ │ │ +241 * @param __v A non-null pointer to a shared_ptr object. │ │ │ │ +242 * @param __w A non-null pointer to a shared_ptr object. │ │ │ │ +243 * @return True if `*__p` was equivalent to `*__v`, false otherwise. │ │ │ │ +244 * │ │ │ │ +245 * The memory order for failure shall not be `memory_order_release` or │ │ │ │ +246 * `memory_order_acq_rel`. │ │ │ │ +247 * @{ │ │ │ │ +248 */ │ │ │ │ +249 template │ │ │ │ +250 bool │ │ │ │ +_2_5_1 atomic_compare_exchange_strong_explicit(_s_h_a_r_e_d___p_t_r_<___T_p_>* __p, │ │ │ │ +252 _s_h_a_r_e_d___p_t_r_<___T_p_>* _____v, │ │ │ │ +253 _s_h_a_r_e_d___p_t_r_<___T_p_> _____w, │ │ │ │ +254 _m_e_m_o_r_y___o_r_d_e_r, │ │ │ │ +255 _m_e_m_o_r_y___o_r_d_e_r) │ │ │ │ +256 { │ │ │ │ +257 _s_h_a_r_e_d___p_t_r_<___T_p_> __x; // goes out of scope after __lock │ │ │ │ +258 ___S_p___l_o_c_k_e_r _____l_o_c_k{__p, _____v}; │ │ │ │ +259 _o_w_n_e_r___l_e_s_s_<_s_h_a_r_e_d___p_t_r_<___T_p_>> __less; │ │ │ │ +260 if (*__p == *_____v && !__less(*__p, *_____v) && !__less(*_____v, *__p)) │ │ │ │ 261 { │ │ │ │ -262 _Up _____t_h_r_e_s_h_o_l_d = -_____r_a_n_g_e % _____r_a_n_g_e; │ │ │ │ -263 while (_____l_o_w < _____t_h_r_e_s_h_o_l_d) │ │ │ │ -264 { │ │ │ │ -265 _____p_r_o_d_u_c_t = ___W_p(_____g()) * ___W_p(_____r_a_n_g_e); │ │ │ │ -266 _____l_o_w = _Up(_____p_r_o_d_u_c_t); │ │ │ │ -267 } │ │ │ │ -268 } │ │ │ │ -269 return __product >> _Up_traits::__digits; │ │ │ │ -270 } │ │ │ │ -271 }; │ │ │ │ -272 │ │ │ │ -273 template │ │ │ │ -274 template │ │ │ │ -275 typename _u_n_i_f_o_r_m___i_n_t___d_i_s_t_r_i_b_u_t_i_o_n_<___I_n_t_T_y_p_e_>_:_:_r_e_s_u_l_t___t_y_p_e │ │ │ │ -276 _u_n_i_f_o_r_m___i_n_t___d_i_s_t_r_i_b_u_t_i_o_n_<___I_n_t_T_y_p_e_>_:_: │ │ │ │ -277_ _o_p_e_r_a_t_o_r_(_)(_UniformRandomBitGenerator& __urng, │ │ │ │ -278 const param_type& __param) │ │ │ │ -279 { │ │ │ │ -280 typedef typename _UniformRandomBitGenerator::result_type _Gresult_type; │ │ │ │ -281 typedef typename make_unsigned::type __utype; │ │ │ │ -282 typedef typename common_type<_Gresult_type, __utype>::type __uctype; │ │ │ │ -283 │ │ │ │ -284 constexpr __uctype __urngmin = _UniformRandomBitGenerator::min(); │ │ │ │ -285 constexpr __uctype __urngmax = _UniformRandomBitGenerator::max(); │ │ │ │ -286 static_assert( __urngmin < __urngmax, │ │ │ │ -287 "Uniform random bit generator must define min() < max()"); │ │ │ │ -288 constexpr __uctype __urngrange = __urngmax - __urngmin; │ │ │ │ -289 │ │ │ │ -290 const __uctype __urange │ │ │ │ -291 = __uctype(__param.b()) - __uctype(__param.a()); │ │ │ │ -292 │ │ │ │ -293 __uctype __ret; │ │ │ │ -294 if (__urngrange > __urange) │ │ │ │ -295 { │ │ │ │ -296 // downscaling │ │ │ │ -297 │ │ │ │ -298 const __uctype __uerange = __urange + 1; // __urange can be zero │ │ │ │ -299 │ │ │ │ -300#if defined __UINT64_TYPE__ && defined __UINT32_TYPE__ │ │ │ │ -301#if __SIZEOF_INT128__ │ │ │ │ -302 if _GLIBCXX17_CONSTEXPR (__urngrange == __UINT64_MAX__) │ │ │ │ -303 { │ │ │ │ -304 // __urng produces values that use exactly 64-bits, │ │ │ │ -305 // so use 128-bit integers to downscale to desired range. │ │ │ │ -306 __UINT64_TYPE__ __u64erange = __uerange; │ │ │ │ -307 __ret = __extension__ _S_nd(__urng, │ │ │ │ -308 __u64erange); │ │ │ │ -309 } │ │ │ │ -310 else │ │ │ │ -311#endif │ │ │ │ -312 if _GLIBCXX17_CONSTEXPR (__urngrange == __UINT32_MAX__) │ │ │ │ +262 __x = _s_t_d_:_:_m_o_v_e(*__p); │ │ │ │ +263 *__p = _s_t_d_:_:_m_o_v_e(_____w); │ │ │ │ +264 return true; │ │ │ │ +265 } │ │ │ │ +266 __x = _s_t_d_:_:_m_o_v_e(*_____v); │ │ │ │ +267 *_____v = *__p; │ │ │ │ +268 return false; │ │ │ │ +269 } │ │ │ │ +270 │ │ │ │ +271 template │ │ │ │ +272 inline bool │ │ │ │ +_2_7_3 atomic_compare_exchange_strong(_s_h_a_r_e_d___p_t_r_<___T_p_>* __p, _s_h_a_r_e_d___p_t_r_<___T_p_>* _____v, │ │ │ │ +274 _s_h_a_r_e_d___p_t_r_<___T_p_> _____w) │ │ │ │ +275 { │ │ │ │ +276 return std::atomic_compare_exchange_strong_explicit(__p, _____v, │ │ │ │ +277 _s_t_d_:_:_m_o_v_e(_____w), memory_order_seq_cst, memory_order_seq_cst); │ │ │ │ +278 } │ │ │ │ +279 │ │ │ │ +280 template │ │ │ │ +281 inline bool │ │ │ │ +_2_8_2 atomic_compare_exchange_weak_explicit(_s_h_a_r_e_d___p_t_r_<___T_p_>* __p, │ │ │ │ +283 _s_h_a_r_e_d___p_t_r_<___T_p_>* _____v, │ │ │ │ +284 _s_h_a_r_e_d___p_t_r_<___T_p_> _____w, │ │ │ │ +285 _m_e_m_o_r_y___o_r_d_e_r _____s_u_c_c_e_s_s, │ │ │ │ +286 _m_e_m_o_r_y___o_r_d_e_r _____f_a_i_l_u_r_e) │ │ │ │ +287 { │ │ │ │ +288 return std::atomic_compare_exchange_strong_explicit(__p, _____v, │ │ │ │ +289 _s_t_d_:_:_m_o_v_e(_____w), _____s_u_c_c_e_s_s, _____f_a_i_l_u_r_e); │ │ │ │ +290 } │ │ │ │ +291 │ │ │ │ +292 template │ │ │ │ +293 inline bool │ │ │ │ +_2_9_4 atomic_compare_exchange_weak(_s_h_a_r_e_d___p_t_r_<___T_p_>* __p, _s_h_a_r_e_d___p_t_r_<___T_p_>* _____v, │ │ │ │ +295 _s_h_a_r_e_d___p_t_r_<___T_p_> _____w) │ │ │ │ +296 { │ │ │ │ +297 return std::atomic_compare_exchange_weak_explicit(__p, _____v, │ │ │ │ +298 _s_t_d_:_:_m_o_v_e(_____w), memory_order_seq_cst, memory_order_seq_cst); │ │ │ │ +299 } │ │ │ │ +300 │ │ │ │ +301 template │ │ │ │ +302 bool │ │ │ │ +_3_0_3 atomic_compare_exchange_strong_explicit(_____s_h_a_r_e_d___p_t_r_<___T_p_,_ ___L_p_>* __p, │ │ │ │ +304 _____s_h_a_r_e_d___p_t_r_<___T_p_,_ ___L_p_>* _____v, │ │ │ │ +305 _____s_h_a_r_e_d___p_t_r_<___T_p_,_ ___L_p_> _____w, │ │ │ │ +306 _m_e_m_o_r_y___o_r_d_e_r, │ │ │ │ +307 _m_e_m_o_r_y___o_r_d_e_r) │ │ │ │ +308 { │ │ │ │ +309 _____s_h_a_r_e_d___p_t_r_<___T_p_,_ ___L_p_> __x; // goes out of scope after __lock │ │ │ │ +310 ___S_p___l_o_c_k_e_r _____l_o_c_k{__p, _____v}; │ │ │ │ +311 _o_w_n_e_r___l_e_s_s_<_____s_h_a_r_e_d___p_t_r_<___T_p_,_ ___L_p_>> __less; │ │ │ │ +312 if (*__p == *_____v && !__less(*__p, *_____v) && !__less(*_____v, *__p)) │ │ │ │ 313 { │ │ │ │ -314 // __urng produces values that use exactly 32-bits, │ │ │ │ -315 // so use 64-bit integers to downscale to desired range. │ │ │ │ -316 __UINT32_TYPE__ __u32erange = __uerange; │ │ │ │ -317 __ret = _S_nd<__UINT64_TYPE__>(__urng, __u32erange); │ │ │ │ -318 } │ │ │ │ -319 else │ │ │ │ -320#endif │ │ │ │ -321 { │ │ │ │ -322 // fallback case (2 divisions) │ │ │ │ -323 const __uctype __scaling = __urngrange / __uerange; │ │ │ │ -324 const __uctype __past = __uerange * __scaling; │ │ │ │ -325 do │ │ │ │ -326 __ret = __uctype(__urng()) - __urngmin; │ │ │ │ -327 while (__ret >= __past); │ │ │ │ -328 __ret /= __scaling; │ │ │ │ -329 } │ │ │ │ -330 } │ │ │ │ -331 else if (__urngrange < __urange) │ │ │ │ -332 { │ │ │ │ -333 // upscaling │ │ │ │ -334 /* │ │ │ │ -335 Note that every value in [0, urange] │ │ │ │ -336 can be written uniquely as │ │ │ │ -337 │ │ │ │ -338 (urngrange + 1) * high + low │ │ │ │ -339 │ │ │ │ -340 where │ │ │ │ -341 │ │ │ │ -342 high in [0, urange / (urngrange + 1)] │ │ │ │ -343 │ │ │ │ -344 and │ │ │ │ -345 │ │ │ │ -346 low in [0, urngrange]. │ │ │ │ -347 */ │ │ │ │ -348 __uctype __tmp; // wraparound control │ │ │ │ -349 do │ │ │ │ +314 __x = _s_t_d_:_:_m_o_v_e(*__p); │ │ │ │ +315 *__p = _s_t_d_:_:_m_o_v_e(_____w); │ │ │ │ +316 return true; │ │ │ │ +317 } │ │ │ │ +318 __x = _s_t_d_:_:_m_o_v_e(*_____v); │ │ │ │ +319 *_____v = *__p; │ │ │ │ +320 return false; │ │ │ │ +321 } │ │ │ │ +322 │ │ │ │ +323 template │ │ │ │ +324 inline bool │ │ │ │ +_3_2_5 atomic_compare_exchange_strong(_____s_h_a_r_e_d___p_t_r_<___T_p_,_ ___L_p_>* __p, │ │ │ │ +326 _____s_h_a_r_e_d___p_t_r_<___T_p_,_ ___L_p_>* _____v, │ │ │ │ +327 _____s_h_a_r_e_d___p_t_r_<___T_p_,_ ___L_p_> _____w) │ │ │ │ +328 { │ │ │ │ +329 return std::atomic_compare_exchange_strong_explicit(__p, _____v, │ │ │ │ +330 _s_t_d_:_:_m_o_v_e(_____w), memory_order_seq_cst, memory_order_seq_cst); │ │ │ │ +331 } │ │ │ │ +332 │ │ │ │ +333 template │ │ │ │ +334 inline bool │ │ │ │ +_3_3_5 atomic_compare_exchange_weak_explicit(_____s_h_a_r_e_d___p_t_r_<___T_p_,_ ___L_p_>* __p, │ │ │ │ +336 _____s_h_a_r_e_d___p_t_r_<___T_p_,_ ___L_p_>* _____v, │ │ │ │ +337 _____s_h_a_r_e_d___p_t_r_<___T_p_,_ ___L_p_> _____w, │ │ │ │ +338 _m_e_m_o_r_y___o_r_d_e_r _____s_u_c_c_e_s_s, │ │ │ │ +339 _m_e_m_o_r_y___o_r_d_e_r _____f_a_i_l_u_r_e) │ │ │ │ +340 { │ │ │ │ +341 return std::atomic_compare_exchange_strong_explicit(__p, _____v, │ │ │ │ +342 _s_t_d_:_:_m_o_v_e(_____w), _____s_u_c_c_e_s_s, _____f_a_i_l_u_r_e); │ │ │ │ +343 } │ │ │ │ +344 │ │ │ │ +345 template │ │ │ │ +346 inline bool │ │ │ │ +_3_4_7 atomic_compare_exchange_weak(_____s_h_a_r_e_d___p_t_r_<___T_p_,_ ___L_p_>* __p, │ │ │ │ +348 _____s_h_a_r_e_d___p_t_r_<___T_p_,_ ___L_p_>* _____v, │ │ │ │ +349 _____s_h_a_r_e_d___p_t_r_<___T_p_,_ ___L_p_> _____w) │ │ │ │ 350 { │ │ │ │ -351 const __uctype __uerngrange = __urngrange + 1; │ │ │ │ -352 __tmp = (__uerngrange * operator() │ │ │ │ -353 (__urng, param_type(0, __urange / __uerngrange))); │ │ │ │ -354 __ret = __tmp + (__uctype(__urng()) - __urngmin); │ │ │ │ -355 } │ │ │ │ -356 while (__ret > __urange || __ret < __tmp); │ │ │ │ -357 } │ │ │ │ -358 else │ │ │ │ -359 __ret = __uctype(__urng()) - __urngmin; │ │ │ │ -360 │ │ │ │ -361 return __ret + __param.a(); │ │ │ │ -362 } │ │ │ │ -363 │ │ │ │ -364 │ │ │ │ -365 template │ │ │ │ -366 template │ │ │ │ -368 void │ │ │ │ -369 uniform_int_distribution<_IntType>:: │ │ │ │ -370 __generate_impl(_ForwardIterator __f, _ForwardIterator __t, │ │ │ │ -371 _UniformRandomBitGenerator& __urng, │ │ │ │ -372 const param_type& __param) │ │ │ │ -373 { │ │ │ │ -374 __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>) │ │ │ │ -375 typedef typename _UniformRandomBitGenerator::result_type _Gresult_type; │ │ │ │ -376 typedef typename make_unsigned::type __utype; │ │ │ │ -377 typedef typename common_type<_Gresult_type, __utype>::type __uctype; │ │ │ │ +351 return std::atomic_compare_exchange_weak_explicit(__p, _____v, │ │ │ │ +352 _s_t_d_:_:_m_o_v_e(_____w), memory_order_seq_cst, memory_order_seq_cst); │ │ │ │ +353 } │ │ │ │ +354 /// @} │ │ │ │ +355 │ │ │ │ +356 /// @} group pointer_abstractions │ │ │ │ +357 │ │ │ │ +358#if __cplusplus >= 202002L │ │ │ │ +359# define __cpp_lib_atomic_shared_ptr 201711L │ │ │ │ +360 template │ │ │ │ +361 struct atomic; │ │ │ │ +362 │ │ │ │ +363 /** │ │ │ │ +364 * @addtogroup pointer_abstractions │ │ │ │ +365 * @relates shared_ptr │ │ │ │ +366 * @{ │ │ │ │ +367 */ │ │ │ │ +368 │ │ │ │ +369 template │ │ │ │ +370 static constexpr bool __is_shared_ptr = false; │ │ │ │ +371 template │ │ │ │ +372 static constexpr bool __is_shared_ptr> = true; │ │ │ │ +373 │ │ │ │ +374 template │ │ │ │ +375 class _Sp_atomic │ │ │ │ +376 { │ │ │ │ +377 using value_type = _Tp; │ │ │ │ 378 │ │ │ │ -379 static_assert( __urng.min() < __urng.max(), │ │ │ │ -380 "Uniform random bit generator must define min() < max()"); │ │ │ │ -381 │ │ │ │ -382 constexpr __uctype __urngmin = __urng.min(); │ │ │ │ -383 constexpr __uctype __urngmax = __urng.max(); │ │ │ │ -384 constexpr __uctype __urngrange = __urngmax - __urngmin; │ │ │ │ -385 const __uctype __urange │ │ │ │ -386 = __uctype(__param.b()) - __uctype(__param.a()); │ │ │ │ +379 friend struct atomic<_Tp>; │ │ │ │ +380 │ │ │ │ +381 // An atomic version of __shared_count<> and __weak_count<>. │ │ │ │ +382 // Stores a _Sp_counted_base<>* but uses the LSB as a lock. │ │ │ │ +383 struct _Atomic_count │ │ │ │ +384 { │ │ │ │ +385 // Either __shared_count<> or __weak_count<> │ │ │ │ +386 using __count_type = decltype(_Tp::_M_refcount); │ │ │ │ 387 │ │ │ │ -388 __uctype __ret; │ │ │ │ -389 │ │ │ │ -390 if (__urngrange > __urange) │ │ │ │ -391 { │ │ │ │ -392 if (__detail::_Power_of_2(__urngrange + 1) │ │ │ │ -393 && __detail::_Power_of_2(__urange + 1)) │ │ │ │ -394 { │ │ │ │ -395 while (__f != __t) │ │ │ │ -396 { │ │ │ │ -397 __ret = __uctype(__urng()) - __urngmin; │ │ │ │ -398 *__f++ = (__ret & __urange) + __param.a(); │ │ │ │ -399 } │ │ │ │ -400 } │ │ │ │ -401 else │ │ │ │ -402 { │ │ │ │ -403 // downscaling │ │ │ │ -404 const __uctype __uerange = __urange + 1; // __urange can be zero │ │ │ │ -405 const __uctype __scaling = __urngrange / __uerange; │ │ │ │ -406 const __uctype __past = __uerange * __scaling; │ │ │ │ -407 while (__f != __t) │ │ │ │ -408 { │ │ │ │ -409 do │ │ │ │ -410 __ret = __uctype(__urng()) - __urngmin; │ │ │ │ -411 while (__ret >= __past); │ │ │ │ -412 *__f++ = __ret / __scaling + __param.a(); │ │ │ │ -413 } │ │ │ │ +388 // _Sp_counted_base<>* │ │ │ │ +389 using pointer = decltype(__count_type::_M_pi); │ │ │ │ +390 │ │ │ │ +391 // Ensure we can use the LSB as the lock bit. │ │ │ │ +392 static_assert(alignof(remove_pointer_t) > 1); │ │ │ │ +393 │ │ │ │ +394 constexpr _Atomic_count() noexcept = default; │ │ │ │ +395 │ │ │ │ +396 explicit │ │ │ │ +397 _Atomic_count(__count_type&& __c) noexcept │ │ │ │ +398 : _M_val(reinterpret_cast(__c._M_pi)) │ │ │ │ +399 { │ │ │ │ +400 __c._M_pi = nullptr; │ │ │ │ +401 } │ │ │ │ +402 │ │ │ │ +403 ~_Atomic_count() │ │ │ │ +404 { │ │ │ │ +405 auto __val = _M_val.load(memory_order_relaxed); │ │ │ │ +406 _GLIBCXX_TSAN_MUTEX_DESTROY(&_M_val); │ │ │ │ +407 __glibcxx_assert(!(__val & _S_lock_bit)); │ │ │ │ +408 if (auto __pi = reinterpret_cast(__val)) │ │ │ │ +409 { │ │ │ │ +410 if constexpr (__is_shared_ptr<_Tp>) │ │ │ │ +411 __pi->_M_release(); │ │ │ │ +412 else │ │ │ │ +413 __pi->_M_weak_release(); │ │ │ │ 414 } │ │ │ │ 415 } │ │ │ │ -416 else if (__urngrange < __urange) │ │ │ │ -417 { │ │ │ │ -418 // upscaling │ │ │ │ -419 /* │ │ │ │ -420 Note that every value in [0, urange] │ │ │ │ -421 can be written uniquely as │ │ │ │ -422 │ │ │ │ -423 (urngrange + 1) * high + low │ │ │ │ -424 │ │ │ │ -425 where │ │ │ │ +416 │ │ │ │ +417 _Atomic_count(const _Atomic_count&) = delete; │ │ │ │ +418 _Atomic_count& operator=(const _Atomic_count&) = delete; │ │ │ │ +419 │ │ │ │ +420 // Precondition: Caller does not hold lock! │ │ │ │ +421 // Returns the raw pointer value without the lock bit set. │ │ │ │ +422 pointer │ │ │ │ +423 _l_o_c_k(_m_e_m_o_r_y___o_r_d_e_r __o) const noexcept │ │ │ │ +424 { │ │ │ │ +425 // To acquire the lock we flip the LSB from 0 to 1. │ │ │ │ 426 │ │ │ │ -427 high in [0, urange / (urngrange + 1)] │ │ │ │ -428 │ │ │ │ -429 and │ │ │ │ -430 │ │ │ │ -431 low in [0, urngrange]. │ │ │ │ -432 */ │ │ │ │ -433 __uctype __tmp; // wraparound control │ │ │ │ -434 while (__f != __t) │ │ │ │ -435 { │ │ │ │ -436 do │ │ │ │ -437 { │ │ │ │ -438 constexpr __uctype __uerngrange = __urngrange + 1; │ │ │ │ -439 __tmp = (__uerngrange * operator() │ │ │ │ -440 (__urng, param_type(0, __urange / __uerngrange))); │ │ │ │ -441 __ret = __tmp + (__uctype(__urng()) - __urngmin); │ │ │ │ -442 } │ │ │ │ -443 while (__ret > __urange || __ret < __tmp); │ │ │ │ -444 *__f++ = __ret; │ │ │ │ -445 } │ │ │ │ -446 } │ │ │ │ -447 else │ │ │ │ -448 while (__f != __t) │ │ │ │ -449 *__f++ = __uctype(__urng()) - __urngmin + __param.a(); │ │ │ │ -450 } │ │ │ │ -451 │ │ │ │ -452 // operator!= and operator<< and operator>> are defined in │ │ │ │ +427 auto __current = _M_val.load(memory_order_relaxed); │ │ │ │ +428 while (__current & _S_lock_bit) │ │ │ │ +429 { │ │ │ │ +430#if __cpp_lib_atomic_wait │ │ │ │ +431 __detail::__thread_relax(); │ │ │ │ +432#endif │ │ │ │ +433 __current = _M_val.load(memory_order_relaxed); │ │ │ │ +434 } │ │ │ │ +435 │ │ │ │ +436 _GLIBCXX_TSAN_MUTEX_TRY_LOCK(&_M_val); │ │ │ │ +437 │ │ │ │ +438 while (!_M_val.compare_exchange_strong(__current, │ │ │ │ +439 __current | _S_lock_bit, │ │ │ │ +440 __o, │ │ │ │ +441 memory_order_relaxed)) │ │ │ │ +442 { │ │ │ │ +443 _GLIBCXX_TSAN_MUTEX_TRY_LOCK_FAILED(&_M_val); │ │ │ │ +444#if __cpp_lib_atomic_wait │ │ │ │ +445 __detail::__thread_relax(); │ │ │ │ +446#endif │ │ │ │ +447 __current = __current & ~_S_lock_bit; │ │ │ │ +448 _GLIBCXX_TSAN_MUTEX_TRY_LOCK(&_M_val); │ │ │ │ +449 } │ │ │ │ +450 _GLIBCXX_TSAN_MUTEX_LOCKED(&_M_val); │ │ │ │ +451 return reinterpret_cast(__current); │ │ │ │ +452 } │ │ │ │ 453 │ │ │ │ -454_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ -455} // namespace std │ │ │ │ -456 │ │ │ │ -457#endif │ │ │ │ -_c_o_n_c_e_p_t_s │ │ │ │ -_t_y_p_e___t_r_a_i_t_s │ │ │ │ -_c_o_n_c_e_p_t___c_h_e_c_k_._h │ │ │ │ -_s_t_d_:_:_b_o_o_l___c_o_n_s_t_a_n_t │ │ │ │ -integral_constant< bool, __v > bool_constant │ │ │ │ -Alias template for compile-time boolean constant types. │ │ │ │ -DDeeffiinniittiioonn _t_y_p_e___t_r_a_i_t_s_:_9_8 │ │ │ │ +454 // Precondition: caller holds lock! │ │ │ │ +455 void │ │ │ │ +456 unlock(_m_e_m_o_r_y___o_r_d_e_r __o) const noexcept │ │ │ │ +457 { │ │ │ │ +458 _GLIBCXX_TSAN_MUTEX_PRE_UNLOCK(&_M_val); │ │ │ │ +459 _M_val.fetch_sub(1, __o); │ │ │ │ +460 _GLIBCXX_TSAN_MUTEX_POST_UNLOCK(&_M_val); │ │ │ │ +461 } │ │ │ │ +462 │ │ │ │ +463 // Swaps the values of *this and __c, and unlocks *this. │ │ │ │ +464 // Precondition: caller holds lock! │ │ │ │ +465 void │ │ │ │ +466 _M_swap_unlock(__count_type& __c, _m_e_m_o_r_y___o_r_d_e_r __o) noexcept │ │ │ │ +467 { │ │ │ │ +468 if (__o != memory_order_seq_cst) │ │ │ │ +469 __o = memory_order_release; │ │ │ │ +470 auto __x = reinterpret_cast(__c._M_pi); │ │ │ │ +471 _GLIBCXX_TSAN_MUTEX_PRE_UNLOCK(&_M_val); │ │ │ │ +472 __x = _M_val.exchange(__x, __o); │ │ │ │ +473 _GLIBCXX_TSAN_MUTEX_POST_UNLOCK(&_M_val); │ │ │ │ +474 __c._M_pi = reinterpret_cast(__x & ~_S_lock_bit); │ │ │ │ +475 } │ │ │ │ +476 │ │ │ │ +477#if __cpp_lib_atomic_wait │ │ │ │ +478 // Precondition: caller holds lock! │ │ │ │ +479 void │ │ │ │ +480 _M_wait_unlock(_m_e_m_o_r_y___o_r_d_e_r __o) const noexcept │ │ │ │ +481 { │ │ │ │ +482 _GLIBCXX_TSAN_MUTEX_PRE_UNLOCK(&_M_val); │ │ │ │ +483 auto __v = _M_val.fetch_sub(1, memory_order_relaxed); │ │ │ │ +484 _GLIBCXX_TSAN_MUTEX_POST_UNLOCK(&_M_val); │ │ │ │ +485 _M_val.wait(__v & ~_S_lock_bit, __o); │ │ │ │ +486 } │ │ │ │ +487 │ │ │ │ +488 void │ │ │ │ +489 notify_one() noexcept │ │ │ │ +490 { │ │ │ │ +491 _GLIBCXX_TSAN_MUTEX_PRE_SIGNAL(&_M_val); │ │ │ │ +492 _M_val.notify_one(); │ │ │ │ +493 _GLIBCXX_TSAN_MUTEX_POST_SIGNAL(&_M_val); │ │ │ │ +494 } │ │ │ │ +495 │ │ │ │ +496 void │ │ │ │ +497 notify_all() noexcept │ │ │ │ +498 { │ │ │ │ +499 _GLIBCXX_TSAN_MUTEX_PRE_SIGNAL(&_M_val); │ │ │ │ +500 _M_val.notify_all(); │ │ │ │ +501 _GLIBCXX_TSAN_MUTEX_POST_SIGNAL(&_M_val); │ │ │ │ +502 } │ │ │ │ +503#endif │ │ │ │ +504 │ │ │ │ +505 private: │ │ │ │ +506 mutable __atomic_base _M_val{0}; │ │ │ │ +507 static constexpr uintptr_t _S_lock_bit{1}; │ │ │ │ +508 }; │ │ │ │ +509 │ │ │ │ +510 typename _Tp::element_type* _M_ptr = nullptr; │ │ │ │ +511 _Atomic_count _M_refcount; │ │ │ │ +512 │ │ │ │ +513 static typename _Atomic_count::pointer │ │ │ │ +514 _S_add_ref(typename _Atomic_count::pointer __p) │ │ │ │ +515 { │ │ │ │ +516 if (__p) │ │ │ │ +517 { │ │ │ │ +518 if constexpr (__is_shared_ptr<_Tp>) │ │ │ │ +519 __p->_M_add_ref_copy(); │ │ │ │ +520 else │ │ │ │ +521 __p->_M_weak_add_ref(); │ │ │ │ +522 } │ │ │ │ +523 return __p; │ │ │ │ +524 } │ │ │ │ +525 │ │ │ │ +526 constexpr _Sp_atomic() noexcept = default; │ │ │ │ +527 │ │ │ │ +528 explicit │ │ │ │ +529 _Sp_atomic(value_type __r) noexcept │ │ │ │ +530 : _M_ptr(__r._M_ptr), _M_refcount(_s_t_d::_m_o_v_e(__r._M_refcount)) │ │ │ │ +531 { } │ │ │ │ +532 │ │ │ │ +533 ~_Sp_atomic() = default; │ │ │ │ +534 │ │ │ │ +535 _Sp_atomic(const _Sp_atomic&) = delete; │ │ │ │ +536 void operator=(const _Sp_atomic&) = delete; │ │ │ │ +537 │ │ │ │ +538 value_type │ │ │ │ +539 load(_m_e_m_o_r_y___o_r_d_e_r __o) const noexcept │ │ │ │ +540 { │ │ │ │ +541 __glibcxx_assert(__o != memory_order_release │ │ │ │ +542 && __o != memory_order_acq_rel); │ │ │ │ +543 // Ensure that the correct value of _M_ptr is visible after locking., │ │ │ │ +544 // by upgrading relaxed or consume to acquire. │ │ │ │ +545 if (__o != memory_order_seq_cst) │ │ │ │ +546 __o = memory_order_acquire; │ │ │ │ +547 │ │ │ │ +548 value_type __ret; │ │ │ │ +549 auto __pi = _M_refcount.lock(__o); │ │ │ │ +550 __ret._M_ptr = _M_ptr; │ │ │ │ +551 __ret._M_refcount._M_pi = _S_add_ref(__pi); │ │ │ │ +552 _M_refcount.unlock(memory_order_relaxed); │ │ │ │ +553 return __ret; │ │ │ │ +554 } │ │ │ │ +555 │ │ │ │ +556 void │ │ │ │ +557 swap(value_type& __r, _m_e_m_o_r_y___o_r_d_e_r __o) noexcept │ │ │ │ +558 { │ │ │ │ +559 _M_refcount.lock(memory_order_acquire); │ │ │ │ +560 _s_t_d_:_:_s_w_a_p(_M_ptr, __r._M_ptr); │ │ │ │ +561 _M_refcount._M_swap_unlock(__r._M_refcount, __o); │ │ │ │ +562 } │ │ │ │ +563 │ │ │ │ +564 bool │ │ │ │ +565 compare_exchange_strong(value_type& __expected, value_type __desired, │ │ │ │ +566 _m_e_m_o_r_y___o_r_d_e_r __o, _m_e_m_o_r_y___o_r_d_e_r __o2) noexcept │ │ │ │ +567 { │ │ │ │ +568 bool __result = true; │ │ │ │ +569 auto __pi = _M_refcount.lock(memory_order_acquire); │ │ │ │ +570 if (_M_ptr == __expected._M_ptr │ │ │ │ +571 && __pi == __expected._M_refcount._M_pi) │ │ │ │ +572 { │ │ │ │ +573 _M_ptr = __desired._M_ptr; │ │ │ │ +574 _M_refcount._M_swap_unlock(__desired._M_refcount, __o); │ │ │ │ +575 } │ │ │ │ +576 else │ │ │ │ +577 { │ │ │ │ +578 _Tp __sink = _s_t_d_:_:_m_o_v_e(__expected); │ │ │ │ +579 __expected._M_ptr = _M_ptr; │ │ │ │ +580 __expected._M_refcount._M_pi = _S_add_ref(__pi); │ │ │ │ +581 _M_refcount.unlock(__o2); │ │ │ │ +582 __result = false; │ │ │ │ +583 } │ │ │ │ +584 return __result; │ │ │ │ +585 } │ │ │ │ +586 │ │ │ │ +587#if __cpp_lib_atomic_wait │ │ │ │ +588 void │ │ │ │ +589 wait(value_type __old, _m_e_m_o_r_y___o_r_d_e_r __o) const noexcept │ │ │ │ +590 { │ │ │ │ +591 auto __pi = _M_refcount.lock(memory_order_acquire); │ │ │ │ +592 if (_M_ptr == __old._M_ptr && __pi == __old._M_refcount._M_pi) │ │ │ │ +593 _M_refcount._M_wait_unlock(__o); │ │ │ │ +594 else │ │ │ │ +595 _M_refcount.unlock(memory_order_relaxed); │ │ │ │ +596 } │ │ │ │ +597 │ │ │ │ +598 void │ │ │ │ +599 notify_one() noexcept │ │ │ │ +600 { │ │ │ │ +601 _M_refcount.notify_one(); │ │ │ │ +602 } │ │ │ │ +603 │ │ │ │ +604 void │ │ │ │ +605 notify_all() noexcept │ │ │ │ +606 { │ │ │ │ +607 _M_refcount.notify_all(); │ │ │ │ +608 } │ │ │ │ +609#endif │ │ │ │ +610 }; │ │ │ │ +611 │ │ │ │ +612 template │ │ │ │ +613 struct atomic> │ │ │ │ +614 { │ │ │ │ +615 public: │ │ │ │ +616 using value_type = shared_ptr<_Tp>; │ │ │ │ +617 │ │ │ │ +618 static constexpr bool is_always_lock_free = false; │ │ │ │ +619 │ │ │ │ +620 bool │ │ │ │ +621 is_lock_free() const noexcept │ │ │ │ +622 { return false; } │ │ │ │ +623 │ │ │ │ +624 constexpr atomic() noexcept = default; │ │ │ │ +625 │ │ │ │ +626 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ +627 // 3661. constinit atomic> a(nullptr); should work │ │ │ │ +628 constexpr atomic(nullptr_t) noexcept : atomic() { } │ │ │ │ +629 │ │ │ │ +630 atomic(shared_ptr<_Tp> __r) noexcept │ │ │ │ +631 : _M_impl(_s_t_d_:_:_m_o_v_e(__r)) │ │ │ │ +632 { } │ │ │ │ +633 │ │ │ │ +634 atomic(const atomic&) = delete; │ │ │ │ +635 void operator=(const atomic&) = delete; │ │ │ │ +636 │ │ │ │ +637 shared_ptr<_Tp> │ │ │ │ +638 load(_m_e_m_o_r_y___o_r_d_e_r __o = memory_order_seq_cst) const noexcept │ │ │ │ +639 { return _M_impl.load(__o); } │ │ │ │ +640 │ │ │ │ +641 operator shared_ptr<_Tp>() const noexcept │ │ │ │ +642 { return _M_impl.load(memory_order_seq_cst); } │ │ │ │ +643 │ │ │ │ +644 void │ │ │ │ +645 store(shared_ptr<_Tp> __desired, │ │ │ │ +646 _m_e_m_o_r_y___o_r_d_e_r __o = memory_order_seq_cst) noexcept │ │ │ │ +647 { _M_impl.swap(__desired, __o); } │ │ │ │ +648 │ │ │ │ +649 void │ │ │ │ +650 operator=(shared_ptr<_Tp> __desired) noexcept │ │ │ │ +651 { _M_impl.swap(__desired, memory_order_seq_cst); } │ │ │ │ +652 │ │ │ │ +653 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ +654 // 3893. LWG 3661 broke atomic> a; a = nullptr; │ │ │ │ +655 void │ │ │ │ +656 operator=(nullptr_t) noexcept │ │ │ │ +657 { store(nullptr); } │ │ │ │ +658 │ │ │ │ +659 shared_ptr<_Tp> │ │ │ │ +660 exchange(shared_ptr<_Tp> __desired, │ │ │ │ +661 _m_e_m_o_r_y___o_r_d_e_r __o = memory_order_seq_cst) noexcept │ │ │ │ +662 { │ │ │ │ +663 _M_impl.swap(__desired, __o); │ │ │ │ +664 return __desired; │ │ │ │ +665 } │ │ │ │ +666 │ │ │ │ +667 bool │ │ │ │ +668 compare_exchange_strong(shared_ptr<_Tp>& __expected, │ │ │ │ +669 shared_ptr<_Tp> __desired, │ │ │ │ +670 _m_e_m_o_r_y___o_r_d_e_r __o, _m_e_m_o_r_y___o_r_d_e_r __o2) noexcept │ │ │ │ +671 { │ │ │ │ +672 return _M_impl.compare_exchange_strong(__expected, __desired, __o, __o2); │ │ │ │ +673 } │ │ │ │ +674 │ │ │ │ +675 bool │ │ │ │ +676 compare_exchange_strong(value_type& __expected, value_type __desired, │ │ │ │ +677 _m_e_m_o_r_y___o_r_d_e_r __o = memory_order_seq_cst) noexcept │ │ │ │ +678 { │ │ │ │ +679 _m_e_m_o_r_y___o_r_d_e_r __o2; │ │ │ │ +680 switch (__o) │ │ │ │ +681 { │ │ │ │ +682 case memory_order_acq_rel: │ │ │ │ +683 __o2 = memory_order_acquire; │ │ │ │ +684 break; │ │ │ │ +685 case memory_order_release: │ │ │ │ +686 __o2 = memory_order_relaxed; │ │ │ │ +687 break; │ │ │ │ +688 default: │ │ │ │ +689 __o2 = __o; │ │ │ │ +690 } │ │ │ │ +691 return compare_exchange_strong(__expected, _s_t_d_:_:_m_o_v_e(__desired), │ │ │ │ +692 __o, __o2); │ │ │ │ +693 } │ │ │ │ +694 │ │ │ │ +695 bool │ │ │ │ +696 compare_exchange_weak(value_type& __expected, value_type __desired, │ │ │ │ +697 _m_e_m_o_r_y___o_r_d_e_r __o, _m_e_m_o_r_y___o_r_d_e_r __o2) noexcept │ │ │ │ +698 { │ │ │ │ +699 return compare_exchange_strong(__expected, _s_t_d_:_:_m_o_v_e(__desired), │ │ │ │ +700 __o, __o2); │ │ │ │ +701 } │ │ │ │ +702 │ │ │ │ +703 bool │ │ │ │ +704 compare_exchange_weak(value_type& __expected, value_type __desired, │ │ │ │ +705 _m_e_m_o_r_y___o_r_d_e_r __o = memory_order_seq_cst) noexcept │ │ │ │ +706 { │ │ │ │ +707 return compare_exchange_strong(__expected, _s_t_d_:_:_m_o_v_e(__desired), __o); │ │ │ │ +708 } │ │ │ │ +709 │ │ │ │ +710#if __cpp_lib_atomic_wait │ │ │ │ +711 void │ │ │ │ +712 wait(value_type __old, │ │ │ │ +713 _m_e_m_o_r_y___o_r_d_e_r __o = memory_order_seq_cst) const noexcept │ │ │ │ +714 { │ │ │ │ +715 _M_impl.wait(_s_t_d_:_:_m_o_v_e(__old), __o); │ │ │ │ +716 } │ │ │ │ +717 │ │ │ │ +718 void │ │ │ │ +719 notify_one() noexcept │ │ │ │ +720 { │ │ │ │ +721 _M_impl.notify_one(); │ │ │ │ +722 } │ │ │ │ +723 │ │ │ │ +724 void │ │ │ │ +725 notify_all() noexcept │ │ │ │ +726 { │ │ │ │ +727 _M_impl.notify_all(); │ │ │ │ +728 } │ │ │ │ +729#endif │ │ │ │ +730 │ │ │ │ +731 private: │ │ │ │ +732 _Sp_atomic> _M_impl; │ │ │ │ +733 }; │ │ │ │ +734 │ │ │ │ +735 template │ │ │ │ +736 struct atomic> │ │ │ │ +737 { │ │ │ │ +738 public: │ │ │ │ +739 using value_type = weak_ptr<_Tp>; │ │ │ │ +740 │ │ │ │ +741 static constexpr bool is_always_lock_free = false; │ │ │ │ +742 │ │ │ │ +743 bool │ │ │ │ +744 is_lock_free() const noexcept │ │ │ │ +745 { return false; } │ │ │ │ +746 │ │ │ │ +747 constexpr atomic() noexcept = default; │ │ │ │ +748 │ │ │ │ +749 atomic(weak_ptr<_Tp> __r) noexcept │ │ │ │ +750 : _M_impl(_m_o_v_e(__r)) │ │ │ │ +751 { } │ │ │ │ +752 │ │ │ │ +753 atomic(const atomic&) = delete; │ │ │ │ +754 void operator=(const atomic&) = delete; │ │ │ │ +755 │ │ │ │ +756 weak_ptr<_Tp> │ │ │ │ +757 load(_m_e_m_o_r_y___o_r_d_e_r __o = memory_order_seq_cst) const noexcept │ │ │ │ +758 { return _M_impl.load(__o); } │ │ │ │ +759 │ │ │ │ +760 operator weak_ptr<_Tp>() const noexcept │ │ │ │ +761 { return _M_impl.load(memory_order_seq_cst); } │ │ │ │ +762 │ │ │ │ +763 void │ │ │ │ +764 store(weak_ptr<_Tp> __desired, │ │ │ │ +765 _m_e_m_o_r_y___o_r_d_e_r __o = memory_order_seq_cst) noexcept │ │ │ │ +766 { _M_impl.swap(__desired, __o); } │ │ │ │ +767 │ │ │ │ +768 void │ │ │ │ +769 operator=(weak_ptr<_Tp> __desired) noexcept │ │ │ │ +770 { _M_impl.swap(__desired, memory_order_seq_cst); } │ │ │ │ +771 │ │ │ │ +772 weak_ptr<_Tp> │ │ │ │ +773 exchange(weak_ptr<_Tp> __desired, │ │ │ │ +774 _m_e_m_o_r_y___o_r_d_e_r __o = memory_order_seq_cst) noexcept │ │ │ │ +775 { │ │ │ │ +776 _M_impl.swap(__desired, __o); │ │ │ │ +777 return __desired; │ │ │ │ +778 } │ │ │ │ +779 │ │ │ │ +780 bool │ │ │ │ +781 compare_exchange_strong(weak_ptr<_Tp>& __expected, │ │ │ │ +782 weak_ptr<_Tp> __desired, │ │ │ │ +783 _m_e_m_o_r_y___o_r_d_e_r __o, _m_e_m_o_r_y___o_r_d_e_r __o2) noexcept │ │ │ │ +784 { │ │ │ │ +785 return _M_impl.compare_exchange_strong(__expected, __desired, __o, __o2); │ │ │ │ +786 } │ │ │ │ +787 │ │ │ │ +788 bool │ │ │ │ +789 compare_exchange_strong(value_type& __expected, value_type __desired, │ │ │ │ +790 _m_e_m_o_r_y___o_r_d_e_r __o = memory_order_seq_cst) noexcept │ │ │ │ +791 { │ │ │ │ +792 _m_e_m_o_r_y___o_r_d_e_r __o2; │ │ │ │ +793 switch (__o) │ │ │ │ +794 { │ │ │ │ +795 case memory_order_acq_rel: │ │ │ │ +796 __o2 = memory_order_acquire; │ │ │ │ +797 break; │ │ │ │ +798 case memory_order_release: │ │ │ │ +799 __o2 = memory_order_relaxed; │ │ │ │ +800 break; │ │ │ │ +801 default: │ │ │ │ +802 __o2 = __o; │ │ │ │ +803 } │ │ │ │ +804 return compare_exchange_strong(__expected, _s_t_d_:_:_m_o_v_e(__desired), │ │ │ │ +805 __o, __o2); │ │ │ │ +806 } │ │ │ │ +807 │ │ │ │ +808 bool │ │ │ │ +809 compare_exchange_weak(value_type& __expected, value_type __desired, │ │ │ │ +810 _m_e_m_o_r_y___o_r_d_e_r __o, _m_e_m_o_r_y___o_r_d_e_r __o2) noexcept │ │ │ │ +811 { │ │ │ │ +812 return compare_exchange_strong(__expected, _s_t_d_:_:_m_o_v_e(__desired), │ │ │ │ +813 __o, __o2); │ │ │ │ +814 } │ │ │ │ +815 │ │ │ │ +816 bool │ │ │ │ +817 compare_exchange_weak(value_type& __expected, value_type __desired, │ │ │ │ +818 _m_e_m_o_r_y___o_r_d_e_r __o = memory_order_seq_cst) noexcept │ │ │ │ +819 { │ │ │ │ +820 return compare_exchange_strong(__expected, _s_t_d_:_:_m_o_v_e(__desired), __o); │ │ │ │ +821 } │ │ │ │ +822 │ │ │ │ +823#if __cpp_lib_atomic_wait │ │ │ │ +824 void │ │ │ │ +825 wait(value_type __old, │ │ │ │ +826 _m_e_m_o_r_y___o_r_d_e_r __o = memory_order_seq_cst) const noexcept │ │ │ │ +827 { │ │ │ │ +828 _M_impl.wait(_s_t_d_:_:_m_o_v_e(__old), __o); │ │ │ │ +829 } │ │ │ │ +830 │ │ │ │ +831 void │ │ │ │ +832 notify_one() noexcept │ │ │ │ +833 { │ │ │ │ +834 _M_impl.notify_one(); │ │ │ │ +835 } │ │ │ │ +836 │ │ │ │ +837 void │ │ │ │ +838 notify_all() noexcept │ │ │ │ +839 { │ │ │ │ +840 _M_impl.notify_all(); │ │ │ │ +841 } │ │ │ │ +842#endif │ │ │ │ +843 │ │ │ │ +844 private: │ │ │ │ +845 _Sp_atomic> _M_impl; │ │ │ │ +846 }; │ │ │ │ +847 /// @} group pointer_abstractions │ │ │ │ +848#endif // C++20 │ │ │ │ +849 │ │ │ │ +850_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ +851} // namespace │ │ │ │ +852 │ │ │ │ +853#endif // _SHARED_PTR_ATOMIC_H │ │ │ │ +_a_t_o_m_i_c___b_a_s_e_._h │ │ │ │ +_s_t_d_:_:_m_o_v_e │ │ │ │ +constexpr std::remove_reference< _Tp >::type && move(_Tp &&__t) noexcept │ │ │ │ +Convert a value to an rvalue. │ │ │ │ +DDeeffiinniittiioonn _m_o_v_e_._h_:_1_0_4 │ │ │ │ +_s_t_d_:_:_s_w_a_p │ │ │ │ +void swap(any &__x, any &__y) noexcept │ │ │ │ +Exchange the states of two any objects. │ │ │ │ +DDeeffiinniittiioonn _a_n_y_:_4_2_9 │ │ │ │ +_s_t_d_:_:_m_e_m_o_r_y___o_r_d_e_r │ │ │ │ +memory_order │ │ │ │ +Enumeration for memory_order. │ │ │ │ +DDeeffiinniittiioonn _a_t_o_m_i_c___b_a_s_e_._h_:_6_2 │ │ │ │ +_s_t_d_:_:_l_o_c_k │ │ │ │ +void lock(_L1 &__l1, _L2 &__l2, _L3 &... __l3) │ │ │ │ +Generic lock. │ │ │ │ +DDeeffiinniittiioonn _m_u_t_e_x_:_6_7_7 │ │ │ │ _s_t_d │ │ │ │ ISO C++ entities toplevel namespace is std. │ │ │ │ -_____g_n_u___c_x_x_:_:_____i_n_t___t_r_a_i_t_s │ │ │ │ -__numeric_traits_integer< _Tp > __int_traits │ │ │ │ -Convenience alias for __numeric_traits. │ │ │ │ -DDeeffiinniittiioonn _e_x_t_/_n_u_m_e_r_i_c___t_r_a_i_t_s_._h_:_1_3_8 │ │ │ │ -_s_t_d_:_:_i_s___i_n_t_e_g_r_a_l │ │ │ │ -is_integral │ │ │ │ -DDeeffiinniittiioonn _t_y_p_e___t_r_a_i_t_s_:_4_1_5 │ │ │ │ -_s_t_d_:_:_u_n_i_f_o_r_m___i_n_t___d_i_s_t_r_i_b_u_t_i_o_n │ │ │ │ -Uniform discrete distribution for random numbers. A discrete random │ │ │ │ -distribution on the range with e... │ │ │ │ -DDeeffiinniittiioonn _u_n_i_f_o_r_m___i_n_t___d_i_s_t_._h_:_7_8 │ │ │ │ -_s_t_d_:_:_u_n_i_f_o_r_m___i_n_t___d_i_s_t_r_i_b_u_t_i_o_n_:_:_r_e_s_e_t │ │ │ │ -void reset() │ │ │ │ -Resets the distribution state. │ │ │ │ -DDeeffiinniittiioonn _u_n_i_f_o_r_m___i_n_t___d_i_s_t_._h_:_1_4_8 │ │ │ │ -_s_t_d_:_:_u_n_i_f_o_r_m___i_n_t___d_i_s_t_r_i_b_u_t_i_o_n_:_:_u_n_i_f_o_r_m___i_n_t___d_i_s_t_r_i_b_u_t_i_o_n │ │ │ │ -uniform_int_distribution() │ │ │ │ -Constructs a uniform distribution object. │ │ │ │ -DDeeffiinniittiioonn _u_n_i_f_o_r_m___i_n_t___d_i_s_t_._h_:_1_2_5 │ │ │ │ -_s_t_d_:_:_u_n_i_f_o_r_m___i_n_t___d_i_s_t_r_i_b_u_t_i_o_n_:_:_p_a_r_a_m │ │ │ │ -void param(const param_type &__param) │ │ │ │ -Sets the parameter set of the distribution. │ │ │ │ -DDeeffiinniittiioonn _u_n_i_f_o_r_m___i_n_t___d_i_s_t_._h_:_1_7_0 │ │ │ │ -_s_t_d_:_:_u_n_i_f_o_r_m___i_n_t___d_i_s_t_r_i_b_u_t_i_o_n_:_:_m_i_n │ │ │ │ -result_type min() const │ │ │ │ -Returns the inclusive lower bound of the distribution range. │ │ │ │ -DDeeffiinniittiioonn _u_n_i_f_o_r_m___i_n_t___d_i_s_t_._h_:_1_7_7 │ │ │ │ -_s_t_d_:_:_u_n_i_f_o_r_m___i_n_t___d_i_s_t_r_i_b_u_t_i_o_n_:_:_r_e_s_u_l_t___t_y_p_e │ │ │ │ -_IntType result_type │ │ │ │ -DDeeffiinniittiioonn _u_n_i_f_o_r_m___i_n_t___d_i_s_t_._h_:_8_4 │ │ │ │ -_s_t_d_:_:_u_n_i_f_o_r_m___i_n_t___d_i_s_t_r_i_b_u_t_i_o_n_:_:_o_p_e_r_a_t_o_r_=_= │ │ │ │ -friend bool operator==(const uniform_int_distribution &__d1, const │ │ │ │ -uniform_int_distribution &__d2) │ │ │ │ -Return true if two uniform integer distributions have the same parameters. │ │ │ │ -DDeeffiinniittiioonn _u_n_i_f_o_r_m___i_n_t___d_i_s_t_._h_:_2_2_7 │ │ │ │ -_s_t_d_:_:_u_n_i_f_o_r_m___i_n_t___d_i_s_t_r_i_b_u_t_i_o_n_:_:_m_a_x │ │ │ │ -result_type max() const │ │ │ │ -Returns the inclusive upper bound of the distribution range. │ │ │ │ -DDeeffiinniittiioonn _u_n_i_f_o_r_m___i_n_t___d_i_s_t_._h_:_1_8_4 │ │ │ │ -_s_t_d_:_:_u_n_i_f_o_r_m___i_n_t___d_i_s_t_r_i_b_u_t_i_o_n_:_:_o_p_e_r_a_t_o_r_(_) │ │ │ │ -result_type operator()(_UniformRandomBitGenerator &__urng) │ │ │ │ -Generating functions. │ │ │ │ -DDeeffiinniittiioonn _u_n_i_f_o_r_m___i_n_t___d_i_s_t_._h_:_1_9_2 │ │ │ │ -_s_t_d_:_:_u_n_i_f_o_r_m___i_n_t___d_i_s_t_r_i_b_u_t_i_o_n_:_:_u_n_i_f_o_r_m___i_n_t___d_i_s_t_r_i_b_u_t_i_o_n │ │ │ │ -uniform_int_distribution(_IntType __a, _IntType __b=__gnu_cxx::__int_traits< │ │ │ │ -_IntType >::__max) │ │ │ │ -Constructs a uniform distribution object. │ │ │ │ -DDeeffiinniittiioonn _u_n_i_f_o_r_m___i_n_t___d_i_s_t_._h_:_1_3_1 │ │ │ │ -_s_t_d_:_:_u_n_i_f_o_r_m___i_n_t___d_i_s_t_r_i_b_u_t_i_o_n_:_:_p_a_r_a_m │ │ │ │ -param_type param() const │ │ │ │ -Returns the parameter set of the distribution. │ │ │ │ -DDeeffiinniittiioonn _u_n_i_f_o_r_m___i_n_t___d_i_s_t_._h_:_1_6_2 │ │ │ │ -_s_t_d_:_:_u_n_i_f_o_r_m___i_n_t___d_i_s_t_r_i_b_u_t_i_o_n_:_:_p_a_r_a_m___t_y_p_e │ │ │ │ -DDeeffiinniittiioonn _u_n_i_f_o_r_m___i_n_t___d_i_s_t_._h_:_8_7 │ │ │ │ _s_t_d_:_:_a_u_t_o___p_t_r___r_e_f │ │ │ │ DDeeffiinniittiioonn _a_u_t_o___p_t_r_._h_:_4_9 │ │ │ │ -_s_t_d_:_:_s_a_m_e___a_s │ │ │ │ -[concept.same], concept same_as │ │ │ │ -DDeeffiinniittiioonn _c_o_n_c_e_p_t_s_:_6_3 │ │ │ │ -_s_t_d_:_:_i_n_v_o_c_a_b_l_e │ │ │ │ -[concept.invocable], concept invocable │ │ │ │ -DDeeffiinniittiioonn _c_o_n_c_e_p_t_s_:_3_3_6 │ │ │ │ -_s_t_d_:_:_u_n_i_f_o_r_m___r_a_n_d_o_m___b_i_t___g_e_n_e_r_a_t_o_r │ │ │ │ -Requirements for a uniform random bit generator. │ │ │ │ -DDeeffiinniittiioonn _u_n_i_f_o_r_m___i_n_t___d_i_s_t_._h_:_4_9 │ │ │ │ -_n_u_m_e_r_i_c___t_r_a_i_t_s_._h │ │ │ │ * _b_i_t_s │ │ │ │ - * _u_n_i_f_o_r_m___i_n_t___d_i_s_t_._h │ │ │ │ + * _s_h_a_r_e_d___p_t_r___a_t_o_m_i_c_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-12-base/libstdc++/user/a00389.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: this_thread_sleep.h File Reference │ │ │ +libstdc++: shared_ptr_base.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -46,46 +46,171 @@ │ │ │ /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */ │ │ │ $(document).ready(function(){initNavTree('a00389.html',''); initResizable(); }); │ │ │ /* @license-end */ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ +Classes | │ │ │ Namespaces | │ │ │ +Macros | │ │ │ Functions
│ │ │ -
this_thread_sleep.h File Reference
│ │ │ +
shared_ptr_base.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +

│ │ │ +Classes

struct  std::_Sp_ebo_helper< _Nm, _Tp, false >
 
struct  std::_Sp_ebo_helper< _Nm, _Tp, true >
 
class  std::bad_weak_ptr
 
struct  std::hash< __shared_ptr< _Tp, _Lp > >
 
│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ - │ │ │ +

│ │ │ Namespaces

namespace  std
 
namespace  std::this_thread
 
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ +Macros

#define __cpp_lib_shared_ptr_arrays
 
#define __cpp_lib_smart_ptr_for_overwrite
 
│ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ Functions

template<typename _Rep , typename _Period >
void std::this_thread::sleep_for (const chrono::duration< _Rep, _Period > &__rtime)
 
template<typename _Clock , typename _Duration >
void std::this_thread::sleep_until (const chrono::time_point< _Clock, _Duration > &__atime)
 
template<typename _Tp , _Lock_policy _Lp = __default_lock_policy, typename _Alloc , typename... _Args>
__shared_ptr< _Tp, _Lpstd::__allocate_shared (const _Alloc &__a, _Args &&... __args)
 
template<typename _Tp , _Lock_policy _Lp = __default_lock_policy, typename... _Args>
__shared_ptr< _Tp, _Lpstd::__make_shared (_Args &&... __args)
 
void std::__throw_bad_weak_ptr ()
 
template<typename _Tp , typename _Tp1 , _Lock_policy _Lp>
__shared_ptr< _Tp, _Lpstd::const_pointer_cast (const __shared_ptr< _Tp1, _Lp > &__r) noexcept
 
template<typename _Tp , typename _Tp1 , _Lock_policy _Lp>
__shared_ptr< _Tp, _Lpstd::dynamic_pointer_cast (const __shared_ptr< _Tp1, _Lp > &__r) noexcept
 
template<typename _Tp , _Lock_policy _Lp>
bool std::operator!= (const __shared_ptr< _Tp, _Lp > &__a, nullptr_t) noexcept
 
template<typename _Tp1 , typename _Tp2 , _Lock_policy _Lp>
bool std::operator!= (const __shared_ptr< _Tp1, _Lp > &__a, const __shared_ptr< _Tp2, _Lp > &__b) noexcept
 
template<typename _Tp , _Lock_policy _Lp>
bool std::operator!= (nullptr_t, const __shared_ptr< _Tp, _Lp > &__a) noexcept
 
template<typename _Tp , typename _Up , _Lock_policy _Lp>
bool std::operator< (const __shared_ptr< _Tp, _Lp > &__a, const __shared_ptr< _Up, _Lp > &__b) noexcept
 
template<typename _Tp , _Lock_policy _Lp>
bool std::operator< (const __shared_ptr< _Tp, _Lp > &__a, nullptr_t) noexcept
 
template<typename _Tp , _Lock_policy _Lp>
bool std::operator< (nullptr_t, const __shared_ptr< _Tp, _Lp > &__a) noexcept
 
template<typename _Tp , _Lock_policy _Lp>
bool std::operator<= (const __shared_ptr< _Tp, _Lp > &__a, nullptr_t) noexcept
 
template<typename _Tp1 , typename _Tp2 , _Lock_policy _Lp>
bool std::operator<= (const __shared_ptr< _Tp1, _Lp > &__a, const __shared_ptr< _Tp2, _Lp > &__b) noexcept
 
template<typename _Tp , _Lock_policy _Lp>
bool std::operator<= (nullptr_t, const __shared_ptr< _Tp, _Lp > &__a) noexcept
 
template<typename _Tp , _Lock_policy _Lp>
bool std::operator== (const __shared_ptr< _Tp, _Lp > &__a, nullptr_t) noexcept
 
template<typename _Tp1 , typename _Tp2 , _Lock_policy _Lp>
bool std::operator== (const __shared_ptr< _Tp1, _Lp > &__a, const __shared_ptr< _Tp2, _Lp > &__b) noexcept
 
template<typename _Tp , _Lock_policy _Lp>
bool std::operator== (nullptr_t, const __shared_ptr< _Tp, _Lp > &__a) noexcept
 
template<typename _Tp , _Lock_policy _Lp>
bool std::operator> (const __shared_ptr< _Tp, _Lp > &__a, nullptr_t) noexcept
 
template<typename _Tp1 , typename _Tp2 , _Lock_policy _Lp>
bool std::operator> (const __shared_ptr< _Tp1, _Lp > &__a, const __shared_ptr< _Tp2, _Lp > &__b) noexcept
 
template<typename _Tp , _Lock_policy _Lp>
bool std::operator> (nullptr_t, const __shared_ptr< _Tp, _Lp > &__a) noexcept
 
template<typename _Tp , _Lock_policy _Lp>
bool std::operator>= (const __shared_ptr< _Tp, _Lp > &__a, nullptr_t) noexcept
 
template<typename _Tp1 , typename _Tp2 , _Lock_policy _Lp>
bool std::operator>= (const __shared_ptr< _Tp1, _Lp > &__a, const __shared_ptr< _Tp2, _Lp > &__b) noexcept
 
template<typename _Tp , _Lock_policy _Lp>
bool std::operator>= (nullptr_t, const __shared_ptr< _Tp, _Lp > &__a) noexcept
 
template<typename _Tp , typename _Tp1 , _Lock_policy _Lp>
__shared_ptr< _Tp, _Lpstd::reinterpret_pointer_cast (const __shared_ptr< _Tp1, _Lp > &__r) noexcept
 
template<typename _Tp , typename _Tp1 , _Lock_policy _Lp>
__shared_ptr< _Tp, _Lpstd::static_pointer_cast (const __shared_ptr< _Tp1, _Lp > &__r) noexcept
 
template<typename _Tp , _Lock_policy _Lp>
void std::swap (__shared_ptr< _Tp, _Lp > &__a, __shared_ptr< _Tp, _Lp > &__b) noexcept
 
template<typename _Tp , _Lock_policy _Lp>
void std::swap (__weak_ptr< _Tp, _Lp > &__a, __weak_ptr< _Tp, _Lp > &__b) noexcept
 
│ │ │

Detailed Description

│ │ │ -

This is an internal header file, included by other library headers. Do not attempt to use it directly. Instead, include <thread>.

│ │ │ +

This is an internal header file, included by other library headers. Do not attempt to use it directly. Instead, include <memory>.

│ │ │ + │ │ │ +

Definition in file shared_ptr_base.h.

│ │ │ +

Macro Definition Documentation

│ │ │ + │ │ │ +

◆ __cpp_lib_shared_ptr_arrays

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
#define __cpp_lib_shared_ptr_arrays
│ │ │ +
│ │ │ │ │ │ -

Definition in file this_thread_sleep.h.

│ │ │ -
│ │ │ +

Definition at line 720 of file shared_ptr_base.h.

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ +

◆ __cpp_lib_smart_ptr_for_overwrite

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
#define __cpp_lib_smart_ptr_for_overwrite
│ │ │ +
│ │ │ + │ │ │ +

Definition at line 656 of file shared_ptr_base.h.

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ +
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,25 +1,143 @@ │ │ │ │ libstdc++ │ │ │ │ -_N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -this_thread_sleep.h File Reference │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _M_a_c_r_o_s | _F_u_n_c_t_i_o_n_s │ │ │ │ +shared_ptr_base.h File Reference │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ +CCllaasssseess │ │ │ │ +struct   _s_t_d_:_:___S_p___e_b_o___h_e_l_p_e_r_<_ ___N_m_,_ ___T_p_,_ _f_a_l_s_e_ _> │ │ │ │ +  │ │ │ │ +struct   _s_t_d_:_:___S_p___e_b_o___h_e_l_p_e_r_<_ ___N_m_,_ ___T_p_,_ _t_r_u_e_ _> │ │ │ │ +  │ │ │ │ + class   _s_t_d_:_:_b_a_d___w_e_a_k___p_t_r │ │ │ │ +  │ │ │ │ +struct   _s_t_d_:_:_h_a_s_h_<_ _____s_h_a_r_e_d___p_t_r_<_ ___T_p_,_ ___L_p_ _>_ _> │ │ │ │ +  │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _s_t_d │ │ │ │   │ │ │ │ -namespace   _s_t_d_:_:_t_h_i_s___t_h_r_e_a_d │ │ │ │ +MMaaccrrooss │ │ │ │ +#define  _____c_p_p___l_i_b___s_h_a_r_e_d___p_t_r___a_r_r_a_y_s │ │ │ │ +  │ │ │ │ +#define  _____c_p_p___l_i_b___s_m_a_r_t___p_t_r___f_o_r___o_v_e_r_w_r_i_t_e │ │ │ │   │ │ │ │ FFuunnccttiioonnss │ │ │ │ -template<_t_y_p_e_n_a_m_e _Rep , _t_y_p_e_n_a_m_e ___P_e_r_i_o_d > │ │ │ │ -_v_o_i_d  _s_t_d_:_:_t_h_i_s___t_h_r_e_a_d_:_:_s_l_e_e_p___f_o_r (const _c_h_r_o_n_o_:_:_d_u_r_a_t_i_o_n< _Rep, ___P_e_r_i_o_d > │ │ │ │ - &_____r_t_i_m_e) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e ___C_l_o_c_k , _t_y_p_e_n_a_m_e ___D_u_r_a_t_i_o_n > │ │ │ │ -_v_o_i_d  _s_t_d_:_:_t_h_i_s___t_h_r_e_a_d_:_:_s_l_e_e_p___u_n_t_i_l (const _c_h_r_o_n_o_:_:_t_i_m_e___p_o_i_n_t< ___C_l_o_c_k, │ │ │ │ - ___D_u_r_a_t_i_o_n > &_____a_t_i_m_e) │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _Lock_policy _Lp = __default_lock_policy, _t_y_p_e_n_a_m_e │ │ │ │ +_Alloc , typename... _Args> │ │ │ │ +__shared_ptr< _Tp, ___L_p >  _s_t_d_:_:_____a_l_l_o_c_a_t_e___s_h_a_r_e_d (const _Alloc &__a, ___A_r_g_s │ │ │ │ + &&... _____a_r_g_s) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _Lock_policy _Lp = __default_lock_policy, typename... │ │ │ │ +_Args> │ │ │ │ +__shared_ptr< _Tp, ___L_p >  _s_t_d_:_:_____m_a_k_e___s_h_a_r_e_d (___A_r_g_s &&... _____a_r_g_s) │ │ │ │ +  │ │ │ │ + _v_o_i_d  _s_t_d_:_:_____t_h_r_o_w___b_a_d___w_e_a_k___p_t_r () │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___T_p_1 , _Lock_policy _Lp> │ │ │ │ +__shared_ptr< _Tp, ___L_p >  _s_t_d_:_:_c_o_n_s_t___p_o_i_n_t_e_r___c_a_s_t (const __shared_ptr< ___T_p_1, │ │ │ │ + ___L_p > &__r) noexcept │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___T_p_1 , _Lock_policy _Lp> │ │ │ │ +__shared_ptr< _Tp, ___L_p >  _s_t_d_:_:_d_y_n_a_m_i_c___p_o_i_n_t_e_r___c_a_s_t (const __shared_ptr< ___T_p_1, │ │ │ │ + ___L_p > &__r) noexcept │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _Lock_policy _Lp> │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_!_= (const __shared_ptr< _Tp, ___L_p > &__a, │ │ │ │ + nullptr_t) noexcept │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___T_p_1 , _t_y_p_e_n_a_m_e _Tp2 , _Lock_policy _Lp> │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_!_= (const __shared_ptr< ___T_p_1, ___L_p > │ │ │ │ + &__a, const __shared_ptr< _Tp2, ___L_p > &__b) noexcept │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _Lock_policy _Lp> │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_!_= (nullptr_t, const __shared_ptr< _Tp, │ │ │ │ + ___L_p > &__a) noexcept │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e _Up , _Lock_policy _Lp> │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_< (const __shared_ptr< _Tp, ___L_p > &__a, │ │ │ │ + const __shared_ptr< _Up, ___L_p > &__b) noexcept │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _Lock_policy _Lp> │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_< (const __shared_ptr< _Tp, ___L_p > &__a, │ │ │ │ + nullptr_t) noexcept │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _Lock_policy _Lp> │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_< (nullptr_t, const __shared_ptr< _Tp, │ │ │ │ + ___L_p > &__a) noexcept │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _Lock_policy _Lp> │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_<_= (const __shared_ptr< _Tp, ___L_p > &__a, │ │ │ │ + nullptr_t) noexcept │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___T_p_1 , _t_y_p_e_n_a_m_e _Tp2 , _Lock_policy _Lp> │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_<_= (const __shared_ptr< ___T_p_1, ___L_p > │ │ │ │ + &__a, const __shared_ptr< _Tp2, ___L_p > &__b) noexcept │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _Lock_policy _Lp> │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_<_= (nullptr_t, const __shared_ptr< _Tp, │ │ │ │ + ___L_p > &__a) noexcept │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _Lock_policy _Lp> │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_=_= (const __shared_ptr< _Tp, ___L_p > &__a, │ │ │ │ + nullptr_t) noexcept │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___T_p_1 , _t_y_p_e_n_a_m_e _Tp2 , _Lock_policy _Lp> │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_=_= (const __shared_ptr< ___T_p_1, ___L_p > │ │ │ │ + &__a, const __shared_ptr< _Tp2, ___L_p > &__b) noexcept │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _Lock_policy _Lp> │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_=_= (nullptr_t, const __shared_ptr< _Tp, │ │ │ │ + ___L_p > &__a) noexcept │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _Lock_policy _Lp> │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_> (const __shared_ptr< _Tp, ___L_p > &__a, │ │ │ │ + nullptr_t) noexcept │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___T_p_1 , _t_y_p_e_n_a_m_e _Tp2 , _Lock_policy _Lp> │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_> (const __shared_ptr< ___T_p_1, ___L_p > &__a, │ │ │ │ + const __shared_ptr< _Tp2, ___L_p > &__b) noexcept │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _Lock_policy _Lp> │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_> (nullptr_t, const __shared_ptr< _Tp, │ │ │ │ + ___L_p > &__a) noexcept │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _Lock_policy _Lp> │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_>_= (const __shared_ptr< _Tp, ___L_p > &__a, │ │ │ │ + nullptr_t) noexcept │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___T_p_1 , _t_y_p_e_n_a_m_e _Tp2 , _Lock_policy _Lp> │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_>_= (const __shared_ptr< ___T_p_1, ___L_p > │ │ │ │ + &__a, const __shared_ptr< _Tp2, ___L_p > &__b) noexcept │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _Lock_policy _Lp> │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_>_= (nullptr_t, const __shared_ptr< _Tp, │ │ │ │ + ___L_p > &__a) noexcept │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___T_p_1 , _Lock_policy _Lp> │ │ │ │ +__shared_ptr< _Tp, ___L_p >  _s_t_d_:_:_r_e_i_n_t_e_r_p_r_e_t___p_o_i_n_t_e_r___c_a_s_t (const __shared_ptr< │ │ │ │ + ___T_p_1, ___L_p > &__r) noexcept │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___T_p_1 , _Lock_policy _Lp> │ │ │ │ +__shared_ptr< _Tp, ___L_p >  _s_t_d_:_:_s_t_a_t_i_c___p_o_i_n_t_e_r___c_a_s_t (const __shared_ptr< ___T_p_1, │ │ │ │ + ___L_p > &__r) noexcept │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _Lock_policy _Lp> │ │ │ │ + _v_o_i_d  _s_t_d_:_:_s_w_a_p (__shared_ptr< _Tp, ___L_p > &__a, │ │ │ │ + __shared_ptr< _Tp, ___L_p > &__b) noexcept │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _Lock_policy _Lp> │ │ │ │ + _v_o_i_d  _s_t_d_:_:_s_w_a_p (__weak_ptr< _Tp, ___L_p > &__a, __weak_ptr< │ │ │ │ + _Tp, ___L_p > &__b) noexcept │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ This is an internal header file, included by other library headers. Do not │ │ │ │ -attempt to use it directly. Instead, include . │ │ │ │ -Definition in file _t_h_i_s___t_h_r_e_a_d___s_l_e_e_p_._h. │ │ │ │ +attempt to use it directly. Instead, include . │ │ │ │ +Definition in file _s_h_a_r_e_d___p_t_r___b_a_s_e_._h. │ │ │ │ +********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ +********** _?◆_? ____ccpppp__lliibb__sshhaarreedd__ppttrr__aarrrraayyss ********** │ │ │ │ +#define __cpp_lib_shared_ptr_arrays │ │ │ │ +Definition at line _7_2_0 of file _s_h_a_r_e_d___p_t_r___b_a_s_e_._h. │ │ │ │ +********** _?◆_? ____ccpppp__lliibb__ssmmaarrtt__ppttrr__ffoorr__oovveerrwwrriittee ********** │ │ │ │ +#define __cpp_lib_smart_ptr_for_overwrite │ │ │ │ +Definition at line _6_5_6 of file _s_h_a_r_e_d___p_t_r___b_a_s_e_._h. │ │ │ │ * _b_i_t_s │ │ │ │ - * _t_h_i_s___t_h_r_e_a_d___s_l_e_e_p_._h │ │ │ │ + * _s_h_a_r_e_d___p_t_r___b_a_s_e_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-12-base/libstdc++/user/a00389.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,4 +1,8 @@ │ │ │ │ var a00389 = [ │ │ │ │ - ["sleep_for", "a00389.html#a7ddb6a2d48e0bb2cace6dd67c4c38596", null], │ │ │ │ - ["sleep_until", "a00389.html#a277096a2cdd1fc66b7569f457b731bfb", null] │ │ │ │ + ["std::_Sp_ebo_helper< _Nm, _Tp, false >", "a07464.html", null], │ │ │ │ + ["std::_Sp_ebo_helper< _Nm, _Tp, true >", "a07460.html", null], │ │ │ │ + ["std::hash< __shared_ptr< _Tp, _Lp > >", "a07616.html", null], │ │ │ │ + ["const_pointer_cast", "a00389.html#adb18eb46e1822ef9603a6c3e8e852bf7", null], │ │ │ │ + ["dynamic_pointer_cast", "a00389.html#a571f41a06af9b30a36822738fe0ab992", null], │ │ │ │ + ["static_pointer_cast", "a00389.html#aabfc33012523ee37216271c6256af371", null] │ │ │ │ ]; │ │ ├── ./usr/share/doc/gcc-12-base/libstdc++/user/a00389_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: this_thread_sleep.h Source File │ │ │ +libstdc++: shared_ptr_base.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -45,20 +45,20 @@ │ │ │ │ │ │
│ │ │
│ │ │ -
this_thread_sleep.h
│ │ │ +
shared_ptr_base.h
│ │ │
│ │ │
│ │ │ -Go to the documentation of this file.
1// std::this_thread::sleep_for/until declarations -*- C++ -*-
│ │ │ +Go to the documentation of this file.
1// shared_ptr and weak_ptr implementation details -*- C++ -*-
│ │ │
2
│ │ │ -
3// Copyright (C) 2008-2022 Free Software Foundation, Inc.
│ │ │ +
3// Copyright (C) 2007-2022 Free Software Foundation, Inc.
│ │ │
4//
│ │ │
5// This file is part of the GNU ISO C++ Library. This library is free
│ │ │
6// software; you can redistribute it and/or modify it under the
│ │ │
7// terms of the GNU General Public License as published by the
│ │ │
8// Free Software Foundation; either version 3, or (at your option)
│ │ │
9// any later version.
│ │ │
10
│ │ │ @@ -71,126 +71,2309 @@ │ │ │
17// permissions described in the GCC Runtime Library Exception, version
│ │ │
18// 3.1, as published by the Free Software Foundation.
│ │ │
19
│ │ │
20// You should have received a copy of the GNU General Public License and
│ │ │
21// a copy of the GCC Runtime Library Exception along with this program;
│ │ │
22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
│ │ │
23// <http://www.gnu.org/licenses/>.
│ │ │ -
24
│ │ │ -
25/** @file bits/this_thread_sleep.h
│ │ │ -
26 * This is an internal header file, included by other library headers.
│ │ │ -
27 * Do not attempt to use it directly. @headername{thread}
│ │ │ -
28 */
│ │ │ +
24
│ │ │ +
25// GCC Note: Based on files from version 1.32.0 of the Boost library.
│ │ │ +
26
│ │ │ +
27// shared_count.hpp
│ │ │ +
28// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd.
│ │ │
29
│ │ │ -
30#ifndef _GLIBCXX_THIS_THREAD_SLEEP_H
│ │ │ -
31#define _GLIBCXX_THIS_THREAD_SLEEP_H 1
│ │ │ -
32
│ │ │ -
33#pragma GCC system_header
│ │ │ -
34
│ │ │ -
35#if __cplusplus >= 201103L
│ │ │ -
36#include <bits/chrono.h> // std::chrono::*
│ │ │ -
37
│ │ │ -
38#ifdef _GLIBCXX_USE_NANOSLEEP
│ │ │ -
39# include <cerrno> // errno, EINTR
│ │ │ -
40# include <time.h> // nanosleep
│ │ │ -
41#endif
│ │ │ -
42
│ │ │ -
43namespace std _GLIBCXX_VISIBILITY(default)
│ │ │ -
44{
│ │ │ -
45_GLIBCXX_BEGIN_NAMESPACE_VERSION
│ │ │ -
46
│ │ │ -
47 /** @addtogroup threads
│ │ │ -
48 * @{
│ │ │ -
49 */
│ │ │ -
50
│ │ │ -
51 /** @namespace std::this_thread
│ │ │ -
52 * @brief ISO C++ 2011 namespace for interacting with the current thread
│ │ │ -
53 *
│ │ │ -
54 * C++11 30.3.2 [thread.thread.this] Namespace this_thread.
│ │ │ -
55 */
│ │ │ -
56 namespace this_thread
│ │ │ -
57 {
│ │ │ -
58#ifndef _GLIBCXX_NO_SLEEP
│ │ │ -
59
│ │ │ -
60#ifndef _GLIBCXX_USE_NANOSLEEP
│ │ │ -
61 void
│ │ │ - │ │ │ -
63#endif
│ │ │ -
64
│ │ │ -
65 /// this_thread::sleep_for
│ │ │ -
66 template<typename _Rep, typename _Period>
│ │ │ -
67 inline void
│ │ │ -
│ │ │ - │ │ │ -
69 {
│ │ │ -
70 if (__rtime <= __rtime.zero())
│ │ │ -
71 return;
│ │ │ -
72 auto __s = chrono::duration_cast<chrono::seconds>(__rtime);
│ │ │ -
73 auto __ns = chrono::duration_cast<chrono::nanoseconds>(__rtime - __s);
│ │ │ -
74#ifdef _GLIBCXX_USE_NANOSLEEP
│ │ │ -
75 struct ::timespec __ts =
│ │ │ -
76 {
│ │ │ -
77 static_cast<std::time_t>(__s.count()),
│ │ │ -
78 static_cast<long>(__ns.count())
│ │ │ -
79 };
│ │ │ -
80 while (::nanosleep(&__ts, &__ts) == -1 && errno == EINTR)
│ │ │ -
81 { }
│ │ │ -
82#else
│ │ │ - │ │ │ -
84#endif
│ │ │ -
85 }
│ │ │ -
│ │ │ -
86
│ │ │ -
87 /// this_thread::sleep_until
│ │ │ -
88 template<typename _Clock, typename _Duration>
│ │ │ -
89 inline void
│ │ │ -
│ │ │ - │ │ │ -
91 {
│ │ │ -
92#if __cplusplus > 201703L
│ │ │ -
93 static_assert(chrono::is_clock_v<_Clock>);
│ │ │ -
94#endif
│ │ │ -
95 auto __now = _Clock::now();
│ │ │ -
96 if (_Clock::is_steady)
│ │ │ -
97 {
│ │ │ -
98 if (__now < __atime)
│ │ │ - │ │ │ -
100 return;
│ │ │ -
101 }
│ │ │ -
102 while (__now < __atime)
│ │ │ -
103 {
│ │ │ - │ │ │ -
105 __now = _Clock::now();
│ │ │ -
106 }
│ │ │ -
107 }
│ │ │ -
│ │ │ -
108#endif // ! NO_SLEEP
│ │ │ -
109 } // namespace this_thread
│ │ │ -
110
│ │ │ -
111 /// @}
│ │ │ -
112
│ │ │ -
113_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ -
114} // namespace
│ │ │ -
115#endif // C++11
│ │ │ -
116
│ │ │ -
117#endif // _GLIBCXX_THIS_THREAD_SLEEP_H
│ │ │ - │ │ │ - │ │ │ -
duration< int64_t > seconds
seconds
Definition chrono.h:875
│ │ │ -
duration< int64_t, nano > nanoseconds
nanoseconds
Definition chrono.h:866
│ │ │ +
30// shared_ptr.hpp
│ │ │ +
31// Copyright (C) 1998, 1999 Greg Colvin and Beman Dawes.
│ │ │ +
32// Copyright (C) 2001, 2002, 2003 Peter Dimov
│ │ │ +
33
│ │ │ +
34// weak_ptr.hpp
│ │ │ +
35// Copyright (C) 2001, 2002, 2003 Peter Dimov
│ │ │ +
36
│ │ │ +
37// enable_shared_from_this.hpp
│ │ │ +
38// Copyright (C) 2002 Peter Dimov
│ │ │ +
39
│ │ │ +
40// Distributed under the Boost Software License, Version 1.0. (See
│ │ │ +
41// accompanying file LICENSE_1_0.txt or copy at
│ │ │ +
42// http://www.boost.org/LICENSE_1_0.txt)
│ │ │ +
43
│ │ │ +
44/** @file bits/shared_ptr_base.h
│ │ │ +
45 * This is an internal header file, included by other library headers.
│ │ │ +
46 * Do not attempt to use it directly. @headername{memory}
│ │ │ +
47 */
│ │ │ +
48
│ │ │ +
49#ifndef _SHARED_PTR_BASE_H
│ │ │ +
50#define _SHARED_PTR_BASE_H 1
│ │ │ +
51
│ │ │ +
52#include <typeinfo>
│ │ │ +
53#include <bits/allocated_ptr.h>
│ │ │ +
54#include <bits/allocator.h>
│ │ │ + │ │ │ + │ │ │ +
57#include <bits/refwrap.h>
│ │ │ +
58#include <bits/stl_function.h> // std::less
│ │ │ +
59#include <bits/unique_ptr.h>
│ │ │ +
60#include <ext/aligned_buffer.h>
│ │ │ +
61#include <ext/atomicity.h>
│ │ │ +
62#include <ext/concurrence.h>
│ │ │ +
63#if __cplusplus >= 202002L
│ │ │ +
64# include <bit> // __bit_floor
│ │ │ +
65# include <compare>
│ │ │ +
66# include <bits/align.h> // std::align
│ │ │ + │ │ │ +
68#endif
│ │ │ +
69
│ │ │ +
70namespace std _GLIBCXX_VISIBILITY(default)
│ │ │ +
71{
│ │ │ +
72_GLIBCXX_BEGIN_NAMESPACE_VERSION
│ │ │ +
73
│ │ │ +
74#if _GLIBCXX_USE_DEPRECATED
│ │ │ +
75#pragma GCC diagnostic push
│ │ │ +
76#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
│ │ │ +
77 template<typename> class auto_ptr;
│ │ │ +
78#pragma GCC diagnostic pop
│ │ │ +
79#endif
│ │ │ +
80
│ │ │ +
81 /**
│ │ │ +
82 * @brief Exception possibly thrown by @c shared_ptr.
│ │ │ +
83 * @ingroup exceptions
│ │ │ +
84 */
│ │ │ +
│ │ │ + │ │ │ +
86 {
│ │ │ +
87 public:
│ │ │ +
88 virtual char const* what() const noexcept;
│ │ │ +
89
│ │ │ +
90 virtual ~bad_weak_ptr() noexcept;
│ │ │ +
91 };
│ │ │ +
│ │ │ +
92
│ │ │ +
93 // Substitute for bad_weak_ptr object in the case of -fno-exceptions.
│ │ │ +
94 inline void
│ │ │ +
95 __throw_bad_weak_ptr()
│ │ │ +
96 { _GLIBCXX_THROW_OR_ABORT(bad_weak_ptr()); }
│ │ │ +
97
│ │ │ +
98 using __gnu_cxx::_Lock_policy;
│ │ │ +
99 using __gnu_cxx::__default_lock_policy;
│ │ │ +
100 using __gnu_cxx::_S_single;
│ │ │ +
101 using __gnu_cxx::_S_mutex;
│ │ │ +
102 using __gnu_cxx::_S_atomic;
│ │ │ +
103
│ │ │ +
104 // Empty helper class except when the template argument is _S_mutex.
│ │ │ +
105 template<_Lock_policy _Lp>
│ │ │ +
106 class _Mutex_base
│ │ │ +
107 {
│ │ │ +
108 protected:
│ │ │ +
109 // The atomic policy uses fully-fenced builtins, single doesn't care.
│ │ │ +
110 enum { _S_need_barriers = 0 };
│ │ │ +
111 };
│ │ │ +
112
│ │ │ +
113 template<>
│ │ │ +
114 class _Mutex_base<_S_mutex>
│ │ │ +
115 : public __gnu_cxx::__mutex
│ │ │ +
116 {
│ │ │ +
117 protected:
│ │ │ +
118 // This policy is used when atomic builtins are not available.
│ │ │ +
119 // The replacement atomic operations might not have the necessary
│ │ │ +
120 // memory barriers.
│ │ │ +
121 enum { _S_need_barriers = 1 };
│ │ │ +
122 };
│ │ │ +
123
│ │ │ +
124 template<_Lock_policy _Lp = __default_lock_policy>
│ │ │ +
125 class _Sp_counted_base
│ │ │ +
126 : public _Mutex_base<_Lp>
│ │ │ +
127 {
│ │ │ +
128 public:
│ │ │ +
129 _Sp_counted_base() noexcept
│ │ │ +
130 : _M_use_count(1), _M_weak_count(1) { }
│ │ │ +
131
│ │ │ +
132 virtual
│ │ │ +
133 ~_Sp_counted_base() noexcept
│ │ │ +
134 { }
│ │ │ +
135
│ │ │ +
136 // Called when _M_use_count drops to zero, to release the resources
│ │ │ +
137 // managed by *this.
│ │ │ +
138 virtual void
│ │ │ +
139 _M_dispose() noexcept = 0;
│ │ │ +
140
│ │ │ +
141 // Called when _M_weak_count drops to zero.
│ │ │ +
142 virtual void
│ │ │ +
143 _M_destroy() noexcept
│ │ │ +
144 { delete this; }
│ │ │ +
145
│ │ │ +
146 virtual void*
│ │ │ +
147 _M_get_deleter(const std::type_info&) noexcept = 0;
│ │ │ +
148
│ │ │ +
149 // Increment the use count (used when the count is greater than zero).
│ │ │ +
150 void
│ │ │ +
151 _M_add_ref_copy()
│ │ │ +
152 { __gnu_cxx::__atomic_add_dispatch(&_M_use_count, 1); }
│ │ │ +
153
│ │ │ +
154 // Increment the use count if it is non-zero, throw otherwise.
│ │ │ +
155 void
│ │ │ +
156 _M_add_ref_lock()
│ │ │ +
157 {
│ │ │ +
158 if (!_M_add_ref_lock_nothrow())
│ │ │ +
159 __throw_bad_weak_ptr();
│ │ │ +
160 }
│ │ │ +
161
│ │ │ +
162 // Increment the use count if it is non-zero.
│ │ │ +
163 bool
│ │ │ +
164 _M_add_ref_lock_nothrow() noexcept;
│ │ │ +
165
│ │ │ +
166 // Decrement the use count.
│ │ │ +
167 void
│ │ │ +
168 _M_release() noexcept;
│ │ │ +
169
│ │ │ +
170 // Called by _M_release() when the use count reaches zero.
│ │ │ +
171 void
│ │ │ +
172 _M_release_last_use() noexcept
│ │ │ +
173 {
│ │ │ +
174 _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER(&_M_use_count);
│ │ │ +
175 _M_dispose();
│ │ │ +
176 // There must be a memory barrier between dispose() and destroy()
│ │ │ +
177 // to ensure that the effects of dispose() are observed in the
│ │ │ +
178 // thread that runs destroy().
│ │ │ +
179 // See http://gcc.gnu.org/ml/libstdc++/2005-11/msg00136.html
│ │ │ +
180 if (_Mutex_base<_Lp>::_S_need_barriers)
│ │ │ +
181 {
│ │ │ +
182 __atomic_thread_fence (__ATOMIC_ACQ_REL);
│ │ │ +
183 }
│ │ │ +
184
│ │ │ +
185 // Be race-detector-friendly. For more info see bits/c++config.
│ │ │ +
186 _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE(&_M_weak_count);
│ │ │ +
187 if (__gnu_cxx::__exchange_and_add_dispatch(&_M_weak_count,
│ │ │ +
188 -1) == 1)
│ │ │ +
189 {
│ │ │ +
190 _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER(&_M_weak_count);
│ │ │ +
191 _M_destroy();
│ │ │ +
192 }
│ │ │ +
193 }
│ │ │ +
194
│ │ │ +
195 // As above, but 'noinline' to reduce code size on the cold path.
│ │ │ +
196 __attribute__((__noinline__))
│ │ │ +
197 void
│ │ │ +
198 _M_release_last_use_cold() noexcept
│ │ │ +
199 { _M_release_last_use(); }
│ │ │ +
200
│ │ │ +
201 // Increment the weak count.
│ │ │ +
202 void
│ │ │ +
203 _M_weak_add_ref() noexcept
│ │ │ +
204 { __gnu_cxx::__atomic_add_dispatch(&_M_weak_count, 1); }
│ │ │ +
205
│ │ │ +
206 // Decrement the weak count.
│ │ │ +
207 void
│ │ │ +
208 _M_weak_release() noexcept
│ │ │ +
209 {
│ │ │ +
210 // Be race-detector-friendly. For more info see bits/c++config.
│ │ │ +
211 _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE(&_M_weak_count);
│ │ │ +
212 if (__gnu_cxx::__exchange_and_add_dispatch(&_M_weak_count, -1) == 1)
│ │ │ +
213 {
│ │ │ +
214 _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER(&_M_weak_count);
│ │ │ +
215 if (_Mutex_base<_Lp>::_S_need_barriers)
│ │ │ +
216 {
│ │ │ +
217 // See _M_release(),
│ │ │ +
218 // destroy() must observe results of dispose()
│ │ │ +
219 __atomic_thread_fence (__ATOMIC_ACQ_REL);
│ │ │ +
220 }
│ │ │ +
221 _M_destroy();
│ │ │ +
222 }
│ │ │ +
223 }
│ │ │ +
224
│ │ │ +
225 long
│ │ │ +
226 _M_get_use_count() const noexcept
│ │ │ +
227 {
│ │ │ +
228 // No memory barrier is used here so there is no synchronization
│ │ │ +
229 // with other threads.
│ │ │ +
230 return __atomic_load_n(&_M_use_count, __ATOMIC_RELAXED);
│ │ │ +
231 }
│ │ │ +
232
│ │ │ +
233 private:
│ │ │ +
234 _Sp_counted_base(_Sp_counted_base const&) = delete;
│ │ │ +
235 _Sp_counted_base& operator=(_Sp_counted_base const&) = delete;
│ │ │ +
236
│ │ │ +
237 _Atomic_word _M_use_count; // #shared
│ │ │ +
238 _Atomic_word _M_weak_count; // #weak + (#shared != 0)
│ │ │ +
239 };
│ │ │ +
240
│ │ │ +
241 template<>
│ │ │ +
242 inline bool
│ │ │ +
243 _Sp_counted_base<_S_single>::
│ │ │ +
244 _M_add_ref_lock_nothrow() noexcept
│ │ │ +
245 {
│ │ │ +
246 if (_M_use_count == 0)
│ │ │ +
247 return false;
│ │ │ +
248 ++_M_use_count;
│ │ │ +
249 return true;
│ │ │ +
250 }
│ │ │ +
251
│ │ │ +
252 template<>
│ │ │ +
253 inline bool
│ │ │ +
254 _Sp_counted_base<_S_mutex>::
│ │ │ +
255 _M_add_ref_lock_nothrow() noexcept
│ │ │ +
256 {
│ │ │ +
257 __gnu_cxx::__scoped_lock sentry(*this);
│ │ │ +
258 if (__gnu_cxx::__exchange_and_add_dispatch(&_M_use_count, 1) == 0)
│ │ │ +
259 {
│ │ │ +
260 _M_use_count = 0;
│ │ │ +
261 return false;
│ │ │ +
262 }
│ │ │ +
263 return true;
│ │ │ +
264 }
│ │ │ +
265
│ │ │ +
266 template<>
│ │ │ +
267 inline bool
│ │ │ +
268 _Sp_counted_base<_S_atomic>::
│ │ │ +
269 _M_add_ref_lock_nothrow() noexcept
│ │ │ +
270 {
│ │ │ +
271 // Perform lock-free add-if-not-zero operation.
│ │ │ +
272 _Atomic_word __count = _M_get_use_count();
│ │ │ +
273 do
│ │ │ +
274 {
│ │ │ +
275 if (__count == 0)
│ │ │ +
276 return false;
│ │ │ +
277 // Replace the current counter value with the old value + 1, as
│ │ │ +
278 // long as it's not changed meanwhile.
│ │ │ +
279 }
│ │ │ +
280 while (!__atomic_compare_exchange_n(&_M_use_count, &__count, __count + 1,
│ │ │ +
281 true, __ATOMIC_ACQ_REL,
│ │ │ +
282 __ATOMIC_RELAXED));
│ │ │ +
283 return true;
│ │ │ +
284 }
│ │ │ +
285
│ │ │ +
286 template<>
│ │ │ +
287 inline void
│ │ │ +
288 _Sp_counted_base<_S_single>::_M_add_ref_copy()
│ │ │ +
289 { ++_M_use_count; }
│ │ │ +
290
│ │ │ +
291 template<>
│ │ │ +
292 inline void
│ │ │ +
293 _Sp_counted_base<_S_single>::_M_release() noexcept
│ │ │ +
294 {
│ │ │ +
295 if (--_M_use_count == 0)
│ │ │ +
296 {
│ │ │ +
297 _M_dispose();
│ │ │ +
298 if (--_M_weak_count == 0)
│ │ │ +
299 _M_destroy();
│ │ │ +
300 }
│ │ │ +
301 }
│ │ │ +
302
│ │ │ +
303 template<>
│ │ │ +
304 inline void
│ │ │ +
305 _Sp_counted_base<_S_mutex>::_M_release() noexcept
│ │ │ +
306 {
│ │ │ +
307 // Be race-detector-friendly. For more info see bits/c++config.
│ │ │ +
308 _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE(&_M_use_count);
│ │ │ +
309 if (__gnu_cxx::__exchange_and_add_dispatch(&_M_use_count, -1) == 1)
│ │ │ +
310 {
│ │ │ +
311 _M_release_last_use();
│ │ │ +
312 }
│ │ │ +
313 }
│ │ │ +
314
│ │ │ +
315 template<>
│ │ │ +
316 inline void
│ │ │ +
317 _Sp_counted_base<_S_atomic>::_M_release() noexcept
│ │ │ +
318 {
│ │ │ +
319 _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE(&_M_use_count);
│ │ │ +
320#if ! _GLIBCXX_TSAN
│ │ │ +
321 constexpr bool __lock_free
│ │ │ +
322 = __atomic_always_lock_free(sizeof(long long), 0)
│ │ │ +
323 && __atomic_always_lock_free(sizeof(_Atomic_word), 0);
│ │ │ +
324 constexpr bool __double_word
│ │ │ +
325 = sizeof(long long) == 2 * sizeof(_Atomic_word);
│ │ │ +
326 // The ref-count members follow the vptr, so are aligned to
│ │ │ +
327 // alignof(void*).
│ │ │ +
328 constexpr bool __aligned = __alignof(long long) <= alignof(void*);
│ │ │ +
329 if _GLIBCXX17_CONSTEXPR (__lock_free && __double_word && __aligned)
│ │ │ +
330 {
│ │ │ +
331 constexpr int __wordbits = __CHAR_BIT__ * sizeof(_Atomic_word);
│ │ │ +
332 constexpr int __shiftbits = __double_word ? __wordbits : 0;
│ │ │ +
333 constexpr long long __unique_ref = 1LL + (1LL << __shiftbits);
│ │ │ +
334 auto __both_counts = reinterpret_cast<long long*>(&_M_use_count);
│ │ │ +
335
│ │ │ +
336 _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE(&_M_weak_count);
│ │ │ +
337 if (__atomic_load_n(__both_counts, __ATOMIC_ACQUIRE) == __unique_ref)
│ │ │ +
338 {
│ │ │ +
339 // Both counts are 1, so there are no weak references and
│ │ │ +
340 // we are releasing the last strong reference. No other
│ │ │ +
341 // threads can observe the effects of this _M_release()
│ │ │ +
342 // call (e.g. calling use_count()) without a data race.
│ │ │ +
343 _M_weak_count = _M_use_count = 0;
│ │ │ +
344 _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER(&_M_use_count);
│ │ │ +
345 _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER(&_M_weak_count);
│ │ │ +
346 _M_dispose();
│ │ │ +
347 _M_destroy();
│ │ │ +
348 return;
│ │ │ +
349 }
│ │ │ +
350 if (__gnu_cxx::__exchange_and_add_dispatch(&_M_use_count, -1) == 1)
│ │ │ +
351 [[__unlikely__]]
│ │ │ +
352 {
│ │ │ +
353 _M_release_last_use_cold();
│ │ │ +
354 return;
│ │ │ +
355 }
│ │ │ +
356 }
│ │ │ +
357 else
│ │ │ +
358#endif
│ │ │ +
359 if (__gnu_cxx::__exchange_and_add_dispatch(&_M_use_count, -1) == 1)
│ │ │ +
360 {
│ │ │ +
361 _M_release_last_use();
│ │ │ +
362 }
│ │ │ +
363 }
│ │ │ +
364
│ │ │ +
365 template<>
│ │ │ +
366 inline void
│ │ │ +
367 _Sp_counted_base<_S_single>::_M_weak_add_ref() noexcept
│ │ │ +
368 { ++_M_weak_count; }
│ │ │ +
369
│ │ │ +
370 template<>
│ │ │ +
371 inline void
│ │ │ +
372 _Sp_counted_base<_S_single>::_M_weak_release() noexcept
│ │ │ +
373 {
│ │ │ +
374 if (--_M_weak_count == 0)
│ │ │ +
375 _M_destroy();
│ │ │ +
376 }
│ │ │ +
377
│ │ │ +
378 template<>
│ │ │ +
379 inline long
│ │ │ +
380 _Sp_counted_base<_S_single>::_M_get_use_count() const noexcept
│ │ │ +
381 { return _M_use_count; }
│ │ │ +
382
│ │ │ +
383
│ │ │ +
384 // Forward declarations.
│ │ │ +
385 template<typename _Tp, _Lock_policy _Lp = __default_lock_policy>
│ │ │ +
386 class __shared_ptr;
│ │ │ +
387
│ │ │ +
388 template<typename _Tp, _Lock_policy _Lp = __default_lock_policy>
│ │ │ +
389 class __weak_ptr;
│ │ │ +
390
│ │ │ +
391 template<typename _Tp, _Lock_policy _Lp = __default_lock_policy>
│ │ │ +
392 class __enable_shared_from_this;
│ │ │ +
393
│ │ │ +
394 template<typename _Tp>
│ │ │ +
395 class shared_ptr;
│ │ │ +
396
│ │ │ +
397 template<typename _Tp>
│ │ │ +
398 class weak_ptr;
│ │ │ +
399
│ │ │ +
400 template<typename _Tp>
│ │ │ +
401 struct owner_less;
│ │ │ +
402
│ │ │ +
403 template<typename _Tp>
│ │ │ +
404 class enable_shared_from_this;
│ │ │ +
405
│ │ │ +
406 template<_Lock_policy _Lp = __default_lock_policy>
│ │ │ +
407 class __weak_count;
│ │ │ +
408
│ │ │ +
409 template<_Lock_policy _Lp = __default_lock_policy>
│ │ │ +
410 class __shared_count;
│ │ │ +
411
│ │ │ +
412#if __cplusplus >= 202002L
│ │ │ +
413 template<typename>
│ │ │ +
414 class _Sp_atomic;
│ │ │ +
415#endif
│ │ │ +
416
│ │ │ +
417 // Counted ptr with no deleter or allocator support
│ │ │ +
418 template<typename _Ptr, _Lock_policy _Lp>
│ │ │ +
419 class _Sp_counted_ptr final : public _Sp_counted_base<_Lp>
│ │ │ +
420 {
│ │ │ +
421 public:
│ │ │ +
422 explicit
│ │ │ +
423 _Sp_counted_ptr(_Ptr __p) noexcept
│ │ │ +
424 : _M_ptr(__p) { }
│ │ │ +
425
│ │ │ +
426 virtual void
│ │ │ +
427 _M_dispose() noexcept
│ │ │ +
428 { delete _M_ptr; }
│ │ │ +
429
│ │ │ +
430 virtual void
│ │ │ +
431 _M_destroy() noexcept
│ │ │ +
432 { delete this; }
│ │ │ +
433
│ │ │ +
434 virtual void*
│ │ │ +
435 _M_get_deleter(const std::type_info&) noexcept
│ │ │ +
436 { return nullptr; }
│ │ │ +
437
│ │ │ +
438 _Sp_counted_ptr(const _Sp_counted_ptr&) = delete;
│ │ │ +
439 _Sp_counted_ptr& operator=(const _Sp_counted_ptr&) = delete;
│ │ │ +
440
│ │ │ +
441 private:
│ │ │ +
442 _Ptr _M_ptr;
│ │ │ +
443 };
│ │ │ +
444
│ │ │ +
445 template<>
│ │ │ +
446 inline void
│ │ │ +
447 _Sp_counted_ptr<nullptr_t, _S_single>::_M_dispose() noexcept { }
│ │ │ +
448
│ │ │ +
449 template<>
│ │ │ +
450 inline void
│ │ │ +
451 _Sp_counted_ptr<nullptr_t, _S_mutex>::_M_dispose() noexcept { }
│ │ │ +
452
│ │ │ +
453 template<>
│ │ │ +
454 inline void
│ │ │ +
455 _Sp_counted_ptr<nullptr_t, _S_atomic>::_M_dispose() noexcept { }
│ │ │ +
456
│ │ │ +
457 // FIXME: once __has_cpp_attribute(__no_unique_address__)) is true for
│ │ │ +
458 // all supported compilers we can greatly simplify _Sp_ebo_helper.
│ │ │ +
459 // N.B. unconditionally applying the attribute could change layout for
│ │ │ +
460 // final types, which currently cannot use EBO so have a unique address.
│ │ │ +
461
│ │ │ +
462 template<int _Nm, typename _Tp,
│ │ │ +
463 bool __use_ebo = !__is_final(_Tp) && __is_empty(_Tp)>
│ │ │ +
464 struct _Sp_ebo_helper;
│ │ │ +
465
│ │ │ +
466 /// Specialization using EBO.
│ │ │ +
467 template<int _Nm, typename _Tp>
│ │ │ +
│ │ │ +
468 struct _Sp_ebo_helper<_Nm, _Tp, true> : private _Tp
│ │ │ +
469 {
│ │ │ +
470 explicit _Sp_ebo_helper(const _Tp& __tp) : _Tp(__tp) { }
│ │ │ +
471 explicit _Sp_ebo_helper(_Tp&& __tp) : _Tp(std::move(__tp)) { }
│ │ │ +
472
│ │ │ +
473 static _Tp&
│ │ │ +
474 _S_get(_Sp_ebo_helper& __eboh) { return static_cast<_Tp&>(__eboh); }
│ │ │ +
475 };
│ │ │ +
│ │ │ +
476
│ │ │ +
477 /// Specialization not using EBO.
│ │ │ +
478 template<int _Nm, typename _Tp>
│ │ │ +
│ │ │ +
479 struct _Sp_ebo_helper<_Nm, _Tp, false>
│ │ │ +
480 {
│ │ │ +
481 explicit _Sp_ebo_helper(const _Tp& __tp) : _M_tp(__tp) { }
│ │ │ +
482 explicit _Sp_ebo_helper(_Tp&& __tp) : _M_tp(std::move(__tp)) { }
│ │ │ +
483
│ │ │ +
484 static _Tp&
│ │ │ +
485 _S_get(_Sp_ebo_helper& __eboh)
│ │ │ +
486 { return __eboh._M_tp; }
│ │ │ +
487
│ │ │ +
488 private:
│ │ │ +
489 _Tp _M_tp;
│ │ │ +
490 };
│ │ │ +
│ │ │ +
491
│ │ │ +
492 // Support for custom deleter and/or allocator
│ │ │ +
493 template<typename _Ptr, typename _Deleter, typename _Alloc, _Lock_policy _Lp>
│ │ │ +
494 class _Sp_counted_deleter final : public _Sp_counted_base<_Lp>
│ │ │ +
495 {
│ │ │ +
496 class _Impl : _Sp_ebo_helper<0, _Deleter>, _Sp_ebo_helper<1, _Alloc>
│ │ │ +
497 {
│ │ │ +
498 typedef _Sp_ebo_helper<0, _Deleter> _Del_base;
│ │ │ +
499 typedef _Sp_ebo_helper<1, _Alloc> _Alloc_base;
│ │ │ +
500
│ │ │ +
501 public:
│ │ │ +
502 _Impl(_Ptr __p, _Deleter __d, const _Alloc& __a) noexcept
│ │ │ +
503 : _Del_base(std::move(__d)), _Alloc_base(__a), _M_ptr(__p)
│ │ │ +
504 { }
│ │ │ +
505
│ │ │ +
506 _Deleter& _M_del() noexcept { return _Del_base::_S_get(*this); }
│ │ │ +
507 _Alloc& _M_alloc() noexcept { return _Alloc_base::_S_get(*this); }
│ │ │ +
508
│ │ │ +
509 _Ptr _M_ptr;
│ │ │ +
510 };
│ │ │ +
511
│ │ │ +
512 public:
│ │ │ +
513 using __allocator_type = __alloc_rebind<_Alloc, _Sp_counted_deleter>;
│ │ │ +
514
│ │ │ +
515 // __d(__p) must not throw.
│ │ │ +
516 _Sp_counted_deleter(_Ptr __p, _Deleter __d) noexcept
│ │ │ +
517 : _M_impl(__p, std::move(__d), _Alloc()) { }
│ │ │ +
518
│ │ │ +
519 // __d(__p) must not throw.
│ │ │ +
520 _Sp_counted_deleter(_Ptr __p, _Deleter __d, const _Alloc& __a) noexcept
│ │ │ +
521 : _M_impl(__p, std::move(__d), __a) { }
│ │ │ +
522
│ │ │ +
523 ~_Sp_counted_deleter() noexcept { }
│ │ │ +
524
│ │ │ +
525 virtual void
│ │ │ +
526 _M_dispose() noexcept
│ │ │ +
527 { _M_impl._M_del()(_M_impl._M_ptr); }
│ │ │ +
528
│ │ │ +
529 virtual void
│ │ │ +
530 _M_destroy() noexcept
│ │ │ +
531 {
│ │ │ +
532 __allocator_type __a(_M_impl._M_alloc());
│ │ │ +
533 __allocated_ptr<__allocator_type> __guard_ptr{ __a, this };
│ │ │ +
534 this->~_Sp_counted_deleter();
│ │ │ +
535 }
│ │ │ +
536
│ │ │ +
537 virtual void*
│ │ │ +
538 _M_get_deleter(const type_info& __ti [[__gnu__::__unused__]]) noexcept
│ │ │ +
539 {
│ │ │ +
540#if __cpp_rtti
│ │ │ +
541 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ +
542 // 2400. shared_ptr's get_deleter() should use addressof()
│ │ │ +
543 return __ti == typeid(_Deleter)
│ │ │ +
544 ? std::__addressof(_M_impl._M_del())
│ │ │ +
545 : nullptr;
│ │ │ +
546#else
│ │ │ +
547 return nullptr;
│ │ │ +
548#endif
│ │ │ +
549 }
│ │ │ +
550
│ │ │ +
551 private:
│ │ │ +
552 _Impl _M_impl;
│ │ │ +
553 };
│ │ │ +
554
│ │ │ +
555 // helpers for make_shared / allocate_shared
│ │ │ +
556
│ │ │ +
557 struct _Sp_make_shared_tag
│ │ │ +
558 {
│ │ │ +
559 private:
│ │ │ +
560 template<typename _Tp, typename _Alloc, _Lock_policy _Lp>
│ │ │ +
561 friend class _Sp_counted_ptr_inplace;
│ │ │ +
562
│ │ │ +
563 static const type_info&
│ │ │ +
564 _S_ti() noexcept _GLIBCXX_VISIBILITY(default)
│ │ │ +
565 {
│ │ │ +
566 alignas(type_info) static constexpr char __tag[sizeof(type_info)] = { };
│ │ │ +
567 return reinterpret_cast<const type_info&>(__tag);
│ │ │ +
568 }
│ │ │ +
569
│ │ │ +
570 static bool _S_eq(const type_info&) noexcept;
│ │ │ +
571 };
│ │ │ +
572
│ │ │ +
573 template<typename _Alloc>
│ │ │ +
574 struct _Sp_alloc_shared_tag
│ │ │ +
575 {
│ │ │ +
576 const _Alloc& _M_a;
│ │ │ +
577 };
│ │ │ +
578
│ │ │ +
579 template<typename _Tp, typename _Alloc, _Lock_policy _Lp>
│ │ │ +
580 class _Sp_counted_ptr_inplace final : public _Sp_counted_base<_Lp>
│ │ │ +
581 {
│ │ │ +
582 class _Impl : _Sp_ebo_helper<0, _Alloc>
│ │ │ +
583 {
│ │ │ +
584 typedef _Sp_ebo_helper<0, _Alloc> _A_base;
│ │ │ +
585
│ │ │ +
586 public:
│ │ │ +
587 explicit _Impl(_Alloc __a) noexcept : _A_base(__a) { }
│ │ │ +
588
│ │ │ +
589 _Alloc& _M_alloc() noexcept { return _A_base::_S_get(*this); }
│ │ │ +
590
│ │ │ +
591 __gnu_cxx::__aligned_buffer<_Tp> _M_storage;
│ │ │ +
592 };
│ │ │ +
593
│ │ │ +
594 public:
│ │ │ +
595 using __allocator_type = __alloc_rebind<_Alloc, _Sp_counted_ptr_inplace>;
│ │ │ +
596
│ │ │ +
597 // Alloc parameter is not a reference so doesn't alias anything in __args
│ │ │ +
598 template<typename... _Args>
│ │ │ +
599 _Sp_counted_ptr_inplace(_Alloc __a, _Args&&... __args)
│ │ │ +
600 : _M_impl(__a)
│ │ │ +
601 {
│ │ │ +
602 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ +
603 // 2070. allocate_shared should use allocator_traits<A>::construct
│ │ │ +
604 allocator_traits<_Alloc>::construct(__a, _M_ptr(),
│ │ │ +
605 std::forward<_Args>(__args)...); // might throw
│ │ │ +
606 }
│ │ │ +
607
│ │ │ +
608 ~_Sp_counted_ptr_inplace() noexcept { }
│ │ │ +
609
│ │ │ +
610 virtual void
│ │ │ +
611 _M_dispose() noexcept
│ │ │ +
612 {
│ │ │ +
613 allocator_traits<_Alloc>::destroy(_M_impl._M_alloc(), _M_ptr());
│ │ │ +
614 }
│ │ │ +
615
│ │ │ +
616 // Override because the allocator needs to know the dynamic type
│ │ │ +
617 virtual void
│ │ │ +
618 _M_destroy() noexcept
│ │ │ +
619 {
│ │ │ +
620 __allocator_type __a(_M_impl._M_alloc());
│ │ │ +
621 __allocated_ptr<__allocator_type> __guard_ptr{ __a, this };
│ │ │ +
622 this->~_Sp_counted_ptr_inplace();
│ │ │ +
623 }
│ │ │ +
624
│ │ │ +
625 private:
│ │ │ +
626 friend class __shared_count<_Lp>; // To be able to call _M_ptr().
│ │ │ +
627
│ │ │ +
628 // No longer used, but code compiled against old libstdc++ headers
│ │ │ +
629 // might still call it from __shared_ptr ctor to get the pointer out.
│ │ │ +
630 virtual void*
│ │ │ +
631 _M_get_deleter(const std::type_info& __ti) noexcept override
│ │ │ +
632 {
│ │ │ +
633 auto __ptr = const_cast<typename remove_cv<_Tp>::type*>(_M_ptr());
│ │ │ +
634 // Check for the fake type_info first, so we don't try to access it
│ │ │ +
635 // as a real type_info object. Otherwise, check if it's the real
│ │ │ +
636 // type_info for this class. With RTTI enabled we can check directly,
│ │ │ +
637 // or call a library function to do it.
│ │ │ +
638 if (&__ti == &_Sp_make_shared_tag::_S_ti()
│ │ │ +
639 ||
│ │ │ +
640#if __cpp_rtti
│ │ │ +
641 __ti == typeid(_Sp_make_shared_tag)
│ │ │ +
642#else
│ │ │ +
643 _Sp_make_shared_tag::_S_eq(__ti)
│ │ │ +
644#endif
│ │ │ +
645 )
│ │ │ +
646 return __ptr;
│ │ │ +
647 return nullptr;
│ │ │ +
648 }
│ │ │ +
649
│ │ │ +
650 _Tp* _M_ptr() noexcept { return _M_impl._M_storage._M_ptr(); }
│ │ │ +
651
│ │ │ +
652 _Impl _M_impl;
│ │ │ +
653 };
│ │ │ +
654
│ │ │ +
655#if __cplusplus >= 202002L
│ │ │ +
656# define __cpp_lib_smart_ptr_for_overwrite 202002L
│ │ │ +
657 struct _Sp_overwrite_tag { };
│ │ │ +
658
│ │ │ +
659 // Partial specialization used for make_shared_for_overwrite<non-array>().
│ │ │ +
660 // This partial specialization is used when the allocator's value type
│ │ │ +
661 // is the special _Sp_overwrite_tag type.
│ │ │ +
662#if __cpp_concepts
│ │ │ +
663 template<typename _Tp, typename _Alloc, _Lock_policy _Lp>
│ │ │ +
664 requires is_same_v<typename _Alloc::value_type, _Sp_overwrite_tag>
│ │ │ +
665 class _Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp> final
│ │ │ +
666#else
│ │ │ +
667 template<typename _Tp, template<typename> class _Alloc, _Lock_policy _Lp>
│ │ │ +
668 class _Sp_counted_ptr_inplace<_Tp, _Alloc<_Sp_overwrite_tag>, _Lp> final
│ │ │ +
669#endif
│ │ │ +
670 : public _Sp_counted_base<_Lp>
│ │ │ +
671 {
│ │ │ +
672 [[no_unique_address]] _Alloc _M_alloc;
│ │ │ +
673
│ │ │ +
674 union {
│ │ │ +
675 _Tp _M_obj;
│ │ │ +
676 char _M_unused;
│ │ │ +
677 };
│ │ │ +
678
│ │ │ +
679 friend class __shared_count<_Lp>; // To be able to call _M_ptr().
│ │ │ +
680
│ │ │ +
681 _Tp* _M_ptr() noexcept { return std::__addressof(_M_obj); }
│ │ │ +
682
│ │ │ +
683 public:
│ │ │ +
684 using __allocator_type = __alloc_rebind<_Alloc, _Sp_counted_ptr_inplace>;
│ │ │ +
685
│ │ │ +
686 _Sp_counted_ptr_inplace(const _Alloc& __a)
│ │ │ +
687 : _M_alloc(__a)
│ │ │ +
688 {
│ │ │ +
689 ::new((void*)_M_ptr()) _Tp; // default-initialized, for overwrite.
│ │ │ +
690 }
│ │ │ +
691
│ │ │ +
692 ~_Sp_counted_ptr_inplace() noexcept { }
│ │ │ +
693
│ │ │ +
694 virtual void
│ │ │ +
695 _M_dispose() noexcept
│ │ │ +
696 {
│ │ │ +
697 _M_obj.~_Tp();
│ │ │ +
698 }
│ │ │ +
699
│ │ │ +
700 // Override because the allocator needs to know the dynamic type
│ │ │ +
701 virtual void
│ │ │ +
702 _M_destroy() noexcept
│ │ │ +
703 {
│ │ │ +
704 using pointer = typename allocator_traits<__allocator_type>::pointer;
│ │ │ +
705 __allocator_type __a(_M_alloc);
│ │ │ +
706 auto __p = pointer_traits<pointer>::pointer_to(*this);
│ │ │ +
707 __allocated_ptr<__allocator_type> __guard_ptr{ __a, __p };
│ │ │ +
708 this->~_Sp_counted_ptr_inplace();
│ │ │ +
709 }
│ │ │ +
710
│ │ │ +
711 void*
│ │ │ +
712 _M_get_deleter(const std::type_info&) noexcept override
│ │ │ +
713 { return nullptr; }
│ │ │ +
714 };
│ │ │ +
715#endif // C++20
│ │ │ +
716
│ │ │ +
717#if __cplusplus <= 201703L
│ │ │ +
718# define __cpp_lib_shared_ptr_arrays 201611L
│ │ │ +
719#else
│ │ │ +
720# define __cpp_lib_shared_ptr_arrays 201707L
│ │ │ +
721
│ │ │ +
722 struct _Sp_overwrite_tag;
│ │ │ +
723
│ │ │ +
724 // For make_shared<T[]>, make_shared<T[N]>, allocate_shared<T[]> etc.
│ │ │ +
725 template<typename _Alloc>
│ │ │ +
726 struct _Sp_counted_array_base
│ │ │ +
727 {
│ │ │ +
728 [[no_unique_address]] _Alloc _M_alloc{};
│ │ │ +
729 size_t _M_n = 0;
│ │ │ +
730 bool _M_overwrite = false;
│ │ │ +
731
│ │ │ +
732 typename allocator_traits<_Alloc>::pointer
│ │ │ +
733 _M_alloc_array(size_t __tail)
│ │ │ +
734 {
│ │ │ +
735 return allocator_traits<_Alloc>::allocate(_M_alloc, _M_n + __tail);
│ │ │ +
736 }
│ │ │ +
737
│ │ │ +
738 void
│ │ │ +
739 _M_dealloc_array(typename allocator_traits<_Alloc>::pointer __p,
│ │ │ +
740 size_t __tail)
│ │ │ +
741 {
│ │ │ +
742 allocator_traits<_Alloc>::deallocate(_M_alloc, __p, _M_n + __tail);
│ │ │ +
743 }
│ │ │ +
744
│ │ │ +
745 // Init the array elements
│ │ │ +
746 template<typename _Init>
│ │ │ +
747 void
│ │ │ +
748 _M_init(typename allocator_traits<_Alloc>::value_type* __p,
│ │ │ +
749 _Init __init)
│ │ │ +
750 {
│ │ │ +
751 using _Tp = remove_pointer_t<_Init>;
│ │ │ +
752 using _Up = typename allocator_traits<_Alloc>::value_type;
│ │ │ +
753
│ │ │ +
754 if constexpr (is_same_v<_Init, _Sp_overwrite_tag>)
│ │ │ +
755 {
│ │ │ + │ │ │ +
757 _M_overwrite = true;
│ │ │ +
758 }
│ │ │ +
759 else if (__init == nullptr)
│ │ │ +
760 std::__uninitialized_default_n_a(__p, _M_n, _M_alloc);
│ │ │ +
761 else if constexpr (!is_array_v<_Tp>)
│ │ │ +
762 std::__uninitialized_fill_n_a(__p, _M_n, *__init, _M_alloc);
│ │ │ +
763 else
│ │ │ +
764 {
│ │ │ +
765#pragma GCC diagnostic push
│ │ │ +
766#pragma GCC diagnostic ignored "-Wunused-local-typedefs"
│ │ │ +
767 struct _Iter
│ │ │ +
768 {
│ │ │ +
769 using value_type = _Up;
│ │ │ +
770 using difference_type = ptrdiff_t;
│ │ │ +
771 using pointer = const _Up*;
│ │ │ +
772 using reference = const _Up&;
│ │ │ +
773 using iterator_category = forward_iterator_tag;
│ │ │ +
774
│ │ │ +
775 const _Up* _M_p;
│ │ │ +
776 size_t _M_len;
│ │ │ +
777 size_t _M_pos;
│ │ │ +
778
│ │ │ +
779 _Iter& operator++() { ++_M_pos; return *this; }
│ │ │ +
780 _Iter operator++(int) { auto __i(*this); ++_M_pos; return __i; }
│ │ │ +
781
│ │ │ +
782 reference operator*() const { return _M_p[_M_pos % _M_len]; }
│ │ │ +
783 pointer operator->() const { return _M_p + (_M_pos % _M_len); }
│ │ │ +
784
│ │ │ +
785 bool operator==(const _Iter& __i) const
│ │ │ +
786 { return _M_pos == __i._M_pos; }
│ │ │ +
787 };
│ │ │ +
788#pragma GCC diagnostic pop
│ │ │ +
789
│ │ │ +
790 _Iter __first{_S_first_elem(__init), sizeof(_Tp) / sizeof(_Up)};
│ │ │ +
791 _Iter __last = __first;
│ │ │ +
792 __last._M_pos = _M_n;
│ │ │ +
793 std::__uninitialized_copy_a(__first, __last, __p, _M_alloc);
│ │ │ +
794 }
│ │ │ +
795 }
│ │ │ +
796
│ │ │ +
797 protected:
│ │ │ +
798 // Destroy the array elements
│ │ │ +
799 void
│ │ │ +
800 _M_dispose_array(typename allocator_traits<_Alloc>::value_type* __p)
│ │ │ +
801 {
│ │ │ +
802 if (_M_overwrite)
│ │ │ +
803 std::destroy_n(__p, _M_n);
│ │ │ +
804 else
│ │ │ +
805 {
│ │ │ +
806 size_t __n = _M_n;
│ │ │ +
807 while (__n--)
│ │ │ +
808 allocator_traits<_Alloc>::destroy(_M_alloc, __p + __n);
│ │ │ +
809 }
│ │ │ +
810 }
│ │ │ +
811
│ │ │ +
812 private:
│ │ │ +
813 template<typename _Tp>
│ │ │ +
814 static _Tp*
│ │ │ +
815 _S_first_elem(_Tp* __p) { return __p; }
│ │ │ +
816
│ │ │ +
817 template<typename _Tp, size_t _Nm>
│ │ │ +
818 static auto
│ │ │ +
819 _S_first_elem(_Tp (*__p)[_Nm]) { return _S_first_elem(*__p); }
│ │ │ +
820 };
│ │ │ +
821
│ │ │ +
822 // Control block for make_shared<T[]>, make_shared<T[N]> etc. that will be
│ │ │ +
823 // placed into unused memory at the end of the array.
│ │ │ +
824 template<typename _Alloc, _Lock_policy _Lp>
│ │ │ +
825 class _Sp_counted_array final
│ │ │ +
826 : public _Sp_counted_base<_Lp>, _Sp_counted_array_base<_Alloc>
│ │ │ +
827 {
│ │ │ +
828 using pointer = typename allocator_traits<_Alloc>::pointer;
│ │ │ +
829
│ │ │ +
830 pointer _M_alloc_ptr;
│ │ │ +
831
│ │ │ +
832 auto _M_ptr() const noexcept { return std::to_address(_M_alloc_ptr); }
│ │ │ +
833
│ │ │ +
834 friend class __shared_count<_Lp>; // To be able to call _M_ptr().
│ │ │ +
835
│ │ │ +
836 public:
│ │ │ +
837 _Sp_counted_array(const _Sp_counted_array_base<_Alloc>& __a,
│ │ │ +
838 pointer __p) noexcept
│ │ │ +
839 : _Sp_counted_array_base<_Alloc>(__a), _M_alloc_ptr(__p)
│ │ │ +
840 { }
│ │ │ +
841
│ │ │ +
842 ~_Sp_counted_array() = default;
│ │ │ +
843
│ │ │ +
844 virtual void
│ │ │ +
845 _M_dispose() noexcept
│ │ │ +
846 {
│ │ │ +
847 if (this->_M_n)
│ │ │ +
848 this->_M_dispose_array(_M_ptr());
│ │ │ +
849 }
│ │ │ +
850
│ │ │ +
851 // Override because the allocator needs to know the dynamic type
│ │ │ +
852 virtual void
│ │ │ +
853 _M_destroy() noexcept
│ │ │ +
854 {
│ │ │ +
855 _Sp_counted_array_base<_Alloc> __a = *this;
│ │ │ +
856 pointer __p = _M_alloc_ptr;
│ │ │ +
857 this->~_Sp_counted_array();
│ │ │ +
858 __a._M_dealloc_array(__p, _S_tail());
│ │ │ +
859 }
│ │ │ +
860
│ │ │ +
861 // Returns the number of additional array elements that must be
│ │ │ +
862 // allocated in order to store a _Sp_counted_array at the end.
│ │ │ +
863 static constexpr size_t
│ │ │ +
864 _S_tail()
│ │ │ +
865 {
│ │ │ +
866 // The array elemenent type.
│ │ │ +
867 using _Tp = typename allocator_traits<_Alloc>::value_type;
│ │ │ +
868
│ │ │ +
869 // The space needed to store a _Sp_counted_array object.
│ │ │ +
870 size_t __bytes = sizeof(_Sp_counted_array);
│ │ │ +
871
│ │ │ +
872 // Add any padding needed for manual alignment within the buffer.
│ │ │ +
873 if constexpr (alignof(_Tp) < alignof(_Sp_counted_array))
│ │ │ +
874 __bytes += alignof(_Sp_counted_array) - alignof(_Tp);
│ │ │ +
875
│ │ │ +
876 return (__bytes + sizeof(_Tp) - 1) / sizeof(_Tp);
│ │ │ +
877 }
│ │ │ +
878
│ │ │ +
879 void*
│ │ │ +
880 _M_get_deleter(const std::type_info&) noexcept override
│ │ │ +
881 { return nullptr; }
│ │ │ +
882 };
│ │ │ +
883#endif // C++20
│ │ │ +
884
│ │ │ +
885 // The default deleter for shared_ptr<T[]> and shared_ptr<T[N]>.
│ │ │ +
886 struct __sp_array_delete
│ │ │ +
887 {
│ │ │ +
888 template<typename _Yp>
│ │ │ +
889 void operator()(_Yp* __p) const { delete[] __p; }
│ │ │ +
890 };
│ │ │ +
891
│ │ │ +
892 template<_Lock_policy _Lp>
│ │ │ +
893 class __shared_count
│ │ │ +
894 {
│ │ │ +
895 // Prevent _Sp_alloc_shared_tag from matching the shared_ptr(P, D) ctor.
│ │ │ +
896 template<typename _Tp>
│ │ │ +
897 struct __not_alloc_shared_tag { using type = void; };
│ │ │ +
898
│ │ │ +
899 template<typename _Tp>
│ │ │ +
900 struct __not_alloc_shared_tag<_Sp_alloc_shared_tag<_Tp>> { };
│ │ │ +
901
│ │ │ +
902#if __cpp_lib_shared_ptr_arrays >= 201707L
│ │ │ +
903 template<typename _Alloc>
│ │ │ +
904 struct __not_alloc_shared_tag<_Sp_counted_array_base<_Alloc>> { };
│ │ │ +
905#endif
│ │ │ +
906
│ │ │ +
907 public:
│ │ │ +
908 constexpr __shared_count() noexcept : _M_pi(0)
│ │ │ +
909 { }
│ │ │ +
910
│ │ │ +
911 template<typename _Ptr>
│ │ │ +
912 explicit
│ │ │ +
913 __shared_count(_Ptr __p) : _M_pi(0)
│ │ │ +
914 {
│ │ │ +
915 __try
│ │ │ +
916 {
│ │ │ +
917 _M_pi = new _Sp_counted_ptr<_Ptr, _Lp>(__p);
│ │ │ +
918 }
│ │ │ +
919 __catch(...)
│ │ │ +
920 {
│ │ │ +
921 delete __p;
│ │ │ +
922 __throw_exception_again;
│ │ │ +
923 }
│ │ │ +
924 }
│ │ │ +
925
│ │ │ +
926 template<typename _Ptr>
│ │ │ +
927 __shared_count(_Ptr __p, /* is_array = */ false_type)
│ │ │ +
928 : __shared_count(__p)
│ │ │ +
929 { }
│ │ │ +
930
│ │ │ +
931 template<typename _Ptr>
│ │ │ +
932 __shared_count(_Ptr __p, /* is_array = */ true_type)
│ │ │ +
933 : __shared_count(__p, __sp_array_delete{}, allocator<void>())
│ │ │ +
934 { }
│ │ │ +
935
│ │ │ +
936 template<typename _Ptr, typename _Deleter,
│ │ │ +
937 typename = typename __not_alloc_shared_tag<_Deleter>::type>
│ │ │ +
938 __shared_count(_Ptr __p, _Deleter __d)
│ │ │ +
939 : __shared_count(__p, std::move(__d), allocator<void>())
│ │ │ +
940 { }
│ │ │ +
941
│ │ │ +
942 template<typename _Ptr, typename _Deleter, typename _Alloc,
│ │ │ +
943 typename = typename __not_alloc_shared_tag<_Deleter>::type>
│ │ │ +
944 __shared_count(_Ptr __p, _Deleter __d, _Alloc __a) : _M_pi(0)
│ │ │ +
945 {
│ │ │ +
946 typedef _Sp_counted_deleter<_Ptr, _Deleter, _Alloc, _Lp> _Sp_cd_type;
│ │ │ +
947 __try
│ │ │ +
948 {
│ │ │ +
949 typename _Sp_cd_type::__allocator_type __a2(__a);
│ │ │ +
950 auto __guard = std::__allocate_guarded(__a2);
│ │ │ +
951 _Sp_cd_type* __mem = __guard.get();
│ │ │ +
952 ::new (__mem) _Sp_cd_type(__p, std::move(__d), std::move(__a));
│ │ │ +
953 _M_pi = __mem;
│ │ │ +
954 __guard = nullptr;
│ │ │ +
955 }
│ │ │ +
956 __catch(...)
│ │ │ +
957 {
│ │ │ +
958 __d(__p); // Call _Deleter on __p.
│ │ │ +
959 __throw_exception_again;
│ │ │ +
960 }
│ │ │ +
961 }
│ │ │ +
962
│ │ │ +
963 template<typename _Tp, typename _Alloc, typename... _Args>
│ │ │ +
964 __shared_count(_Tp*& __p, _Sp_alloc_shared_tag<_Alloc> __a,
│ │ │ +
965 _Args&&... __args)
│ │ │ +
966 {
│ │ │ +
967 typedef _Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp> _Sp_cp_type;
│ │ │ +
968 typename _Sp_cp_type::__allocator_type __a2(__a._M_a);
│ │ │ +
969 auto __guard = std::__allocate_guarded(__a2);
│ │ │ +
970 _Sp_cp_type* __mem = __guard.get();
│ │ │ +
971 auto __pi = ::new (__mem)
│ │ │ +
972 _Sp_cp_type(__a._M_a, std::forward<_Args>(__args)...);
│ │ │ +
973 __guard = nullptr;
│ │ │ +
974 _M_pi = __pi;
│ │ │ +
975 __p = __pi->_M_ptr();
│ │ │ +
976 }
│ │ │ +
977
│ │ │ +
978#if __cpp_lib_shared_ptr_arrays >= 201707L
│ │ │ +
979 template<typename _Tp, typename _Alloc, typename _Init>
│ │ │ +
980 __shared_count(_Tp*& __p, const _Sp_counted_array_base<_Alloc>& __a,
│ │ │ +
981 _Init __init)
│ │ │ +
982 {
│ │ │ +
983 using _Up = remove_all_extents_t<_Tp>;
│ │ │ +
984 static_assert(is_same_v<_Up, typename _Alloc::value_type>);
│ │ │ +
985
│ │ │ +
986 using _Sp_ca_type = _Sp_counted_array<_Alloc, _Lp>;
│ │ │ +
987 const size_t __tail = _Sp_ca_type::_S_tail();
│ │ │ +
988
│ │ │ +
989 struct _Guarded_ptr : _Sp_counted_array_base<_Alloc>
│ │ │ +
990 {
│ │ │ +
991 typename allocator_traits<_Alloc>::pointer _M_ptr;
│ │ │ +
992
│ │ │ +
993 _Guarded_ptr(_Sp_counted_array_base<_Alloc> __a)
│ │ │ +
994 : _Sp_counted_array_base<_Alloc>(__a),
│ │ │ +
995 _M_ptr(this->_M_alloc_array(_Sp_ca_type::_S_tail()))
│ │ │ +
996 { }
│ │ │ +
997
│ │ │ +
998 ~_Guarded_ptr()
│ │ │ +
999 {
│ │ │ +
1000 if (_M_ptr)
│ │ │ +
1001 this->_M_dealloc_array(_M_ptr, _Sp_ca_type::_S_tail());
│ │ │ +
1002 }
│ │ │ +
1003 };
│ │ │ +
1004
│ │ │ +
1005 _Guarded_ptr __guard{__a};
│ │ │ +
1006 _Up* const __raw = std::to_address(__guard._M_ptr);
│ │ │ +
1007 __guard._M_init(__raw, __init); // might throw
│ │ │ +
1008
│ │ │ +
1009 void* __c = __raw + __a._M_n;
│ │ │ +
1010 if constexpr (alignof(_Up) < alignof(_Sp_ca_type))
│ │ │ +
1011 {
│ │ │ +
1012 size_t __space = sizeof(_Up) * __tail;
│ │ │ +
1013 __c = std::align(alignof(_Sp_ca_type), sizeof(_Sp_ca_type),
│ │ │ +
1014 __c, __space);
│ │ │ +
1015 }
│ │ │ +
1016 auto __pi = ::new(__c) _Sp_ca_type(__guard, __guard._M_ptr);
│ │ │ +
1017 __guard._M_ptr = nullptr;
│ │ │ +
1018 _M_pi = __pi;
│ │ │ +
1019 __p = reinterpret_cast<_Tp*>(__raw);
│ │ │ +
1020 }
│ │ │ +
1021#endif
│ │ │ +
1022
│ │ │ +
1023#if _GLIBCXX_USE_DEPRECATED
│ │ │ +
1024#pragma GCC diagnostic push
│ │ │ +
1025#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
│ │ │ +
1026 // Special case for auto_ptr<_Tp> to provide the strong guarantee.
│ │ │ +
1027 template<typename _Tp>
│ │ │ +
1028 explicit
│ │ │ +
1029 __shared_count(std::auto_ptr<_Tp>&& __r);
│ │ │ +
1030#pragma GCC diagnostic pop
│ │ │ +
1031#endif
│ │ │ +
1032
│ │ │ +
1033 // Special case for unique_ptr<_Tp,_Del> to provide the strong guarantee.
│ │ │ +
1034 template<typename _Tp, typename _Del>
│ │ │ +
1035 explicit
│ │ │ +
1036 __shared_count(std::unique_ptr<_Tp, _Del>&& __r) : _M_pi(0)
│ │ │ +
1037 {
│ │ │ +
1038 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ +
1039 // 2415. Inconsistency between unique_ptr and shared_ptr
│ │ │ +
1040 if (__r.get() == nullptr)
│ │ │ +
1041 return;
│ │ │ +
1042
│ │ │ +
1043 using _Ptr = typename unique_ptr<_Tp, _Del>::pointer;
│ │ │ +
1044 using _Del2 = __conditional_t<is_reference<_Del>::value,
│ │ │ +
1045 reference_wrapper<typename remove_reference<_Del>::type>,
│ │ │ +
1046 _Del>;
│ │ │ +
1047 using _Sp_cd_type
│ │ │ +
1048 = _Sp_counted_deleter<_Ptr, _Del2, allocator<void>, _Lp>;
│ │ │ +
1049 using _Alloc = allocator<_Sp_cd_type>;
│ │ │ +
1050 using _Alloc_traits = allocator_traits<_Alloc>;
│ │ │ +
1051 _Alloc __a;
│ │ │ +
1052 _Sp_cd_type* __mem = _Alloc_traits::allocate(__a, 1);
│ │ │ +
1053 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ +
1054 // 3548. shared_ptr construction from unique_ptr should move
│ │ │ +
1055 // (not copy) the deleter
│ │ │ +
1056 _Alloc_traits::construct(__a, __mem, __r.release(),
│ │ │ +
1057 std::forward<_Del>(__r.get_deleter()));
│ │ │ +
1058 _M_pi = __mem;
│ │ │ +
1059 }
│ │ │ +
1060
│ │ │ +
1061 // Throw bad_weak_ptr when __r._M_get_use_count() == 0.
│ │ │ +
1062 explicit __shared_count(const __weak_count<_Lp>& __r);
│ │ │ +
1063
│ │ │ +
1064 // Does not throw if __r._M_get_use_count() == 0, caller must check.
│ │ │ +
1065 explicit
│ │ │ +
1066 __shared_count(const __weak_count<_Lp>& __r, std::nothrow_t) noexcept;
│ │ │ +
1067
│ │ │ +
1068 ~__shared_count() noexcept
│ │ │ +
1069 {
│ │ │ +
1070 if (_M_pi != nullptr)
│ │ │ +
1071 _M_pi->_M_release();
│ │ │ +
1072 }
│ │ │ +
1073
│ │ │ +
1074 __shared_count(const __shared_count& __r) noexcept
│ │ │ +
1075 : _M_pi(__r._M_pi)
│ │ │ +
1076 {
│ │ │ +
1077 if (_M_pi != nullptr)
│ │ │ +
1078 _M_pi->_M_add_ref_copy();
│ │ │ +
1079 }
│ │ │ +
1080
│ │ │ +
1081 __shared_count&
│ │ │ +
1082 operator=(const __shared_count& __r) noexcept
│ │ │ +
1083 {
│ │ │ +
1084 _Sp_counted_base<_Lp>* __tmp = __r._M_pi;
│ │ │ +
1085 if (__tmp != _M_pi)
│ │ │ +
1086 {
│ │ │ +
1087 if (__tmp != nullptr)
│ │ │ +
1088 __tmp->_M_add_ref_copy();
│ │ │ +
1089 if (_M_pi != nullptr)
│ │ │ +
1090 _M_pi->_M_release();
│ │ │ +
1091 _M_pi = __tmp;
│ │ │ +
1092 }
│ │ │ +
1093 return *this;
│ │ │ +
1094 }
│ │ │ +
1095
│ │ │ +
1096 void
│ │ │ +
1097 _M_swap(__shared_count& __r) noexcept
│ │ │ +
1098 {
│ │ │ +
1099 _Sp_counted_base<_Lp>* __tmp = __r._M_pi;
│ │ │ +
1100 __r._M_pi = _M_pi;
│ │ │ +
1101 _M_pi = __tmp;
│ │ │ +
1102 }
│ │ │ +
1103
│ │ │ +
1104 long
│ │ │ +
1105 _M_get_use_count() const noexcept
│ │ │ +
1106 { return _M_pi ? _M_pi->_M_get_use_count() : 0; }
│ │ │ +
1107
│ │ │ +
1108 bool
│ │ │ +
1109 _M_unique() const noexcept
│ │ │ +
1110 { return this->_M_get_use_count() == 1; }
│ │ │ +
1111
│ │ │ +
1112 void*
│ │ │ +
1113 _M_get_deleter(const std::type_info& __ti) const noexcept
│ │ │ +
1114 { return _M_pi ? _M_pi->_M_get_deleter(__ti) : nullptr; }
│ │ │ +
1115
│ │ │ +
1116 bool
│ │ │ +
1117 _M_less(const __shared_count& __rhs) const noexcept
│ │ │ +
1118 { return std::less<_Sp_counted_base<_Lp>*>()(this->_M_pi, __rhs._M_pi); }
│ │ │ +
1119
│ │ │ +
1120 bool
│ │ │ +
1121 _M_less(const __weak_count<_Lp>& __rhs) const noexcept
│ │ │ +
1122 { return std::less<_Sp_counted_base<_Lp>*>()(this->_M_pi, __rhs._M_pi); }
│ │ │ +
1123
│ │ │ +
1124 // Friend function injected into enclosing namespace and found by ADL
│ │ │ +
1125 friend inline bool
│ │ │ +
1126 operator==(const __shared_count& __a, const __shared_count& __b) noexcept
│ │ │ +
1127 { return __a._M_pi == __b._M_pi; }
│ │ │ +
1128
│ │ │ +
1129 private:
│ │ │ +
1130 friend class __weak_count<_Lp>;
│ │ │ +
1131#if __cplusplus >= 202002L
│ │ │ +
1132 template<typename> friend class _Sp_atomic;
│ │ │ +
1133#endif
│ │ │ +
1134
│ │ │ +
1135 _Sp_counted_base<_Lp>* _M_pi;
│ │ │ +
1136 };
│ │ │ +
1137
│ │ │ +
1138
│ │ │ +
1139 template<_Lock_policy _Lp>
│ │ │ +
1140 class __weak_count
│ │ │ +
1141 {
│ │ │ +
1142 public:
│ │ │ +
1143 constexpr __weak_count() noexcept : _M_pi(nullptr)
│ │ │ +
1144 { }
│ │ │ +
1145
│ │ │ +
1146 __weak_count(const __shared_count<_Lp>& __r) noexcept
│ │ │ +
1147 : _M_pi(__r._M_pi)
│ │ │ +
1148 {
│ │ │ +
1149 if (_M_pi != nullptr)
│ │ │ +
1150 _M_pi->_M_weak_add_ref();
│ │ │ +
1151 }
│ │ │ +
1152
│ │ │ +
1153 __weak_count(const __weak_count& __r) noexcept
│ │ │ +
1154 : _M_pi(__r._M_pi)
│ │ │ +
1155 {
│ │ │ +
1156 if (_M_pi != nullptr)
│ │ │ +
1157 _M_pi->_M_weak_add_ref();
│ │ │ +
1158 }
│ │ │ +
1159
│ │ │ +
1160 __weak_count(__weak_count&& __r) noexcept
│ │ │ +
1161 : _M_pi(__r._M_pi)
│ │ │ +
1162 { __r._M_pi = nullptr; }
│ │ │ +
1163
│ │ │ +
1164 ~__weak_count() noexcept
│ │ │ +
1165 {
│ │ │ +
1166 if (_M_pi != nullptr)
│ │ │ +
1167 _M_pi->_M_weak_release();
│ │ │ +
1168 }
│ │ │ +
1169
│ │ │ +
1170 __weak_count&
│ │ │ +
1171 operator=(const __shared_count<_Lp>& __r) noexcept
│ │ │ +
1172 {
│ │ │ +
1173 _Sp_counted_base<_Lp>* __tmp = __r._M_pi;
│ │ │ +
1174 if (__tmp != nullptr)
│ │ │ +
1175 __tmp->_M_weak_add_ref();
│ │ │ +
1176 if (_M_pi != nullptr)
│ │ │ +
1177 _M_pi->_M_weak_release();
│ │ │ +
1178 _M_pi = __tmp;
│ │ │ +
1179 return *this;
│ │ │ +
1180 }
│ │ │ +
1181
│ │ │ +
1182 __weak_count&
│ │ │ +
1183 operator=(const __weak_count& __r) noexcept
│ │ │ +
1184 {
│ │ │ +
1185 _Sp_counted_base<_Lp>* __tmp = __r._M_pi;
│ │ │ +
1186 if (__tmp != nullptr)
│ │ │ +
1187 __tmp->_M_weak_add_ref();
│ │ │ +
1188 if (_M_pi != nullptr)
│ │ │ +
1189 _M_pi->_M_weak_release();
│ │ │ +
1190 _M_pi = __tmp;
│ │ │ +
1191 return *this;
│ │ │ +
1192 }
│ │ │ +
1193
│ │ │ +
1194 __weak_count&
│ │ │ +
1195 operator=(__weak_count&& __r) noexcept
│ │ │ +
1196 {
│ │ │ +
1197 if (_M_pi != nullptr)
│ │ │ +
1198 _M_pi->_M_weak_release();
│ │ │ +
1199 _M_pi = __r._M_pi;
│ │ │ +
1200 __r._M_pi = nullptr;
│ │ │ +
1201 return *this;
│ │ │ +
1202 }
│ │ │ +
1203
│ │ │ +
1204 void
│ │ │ +
1205 _M_swap(__weak_count& __r) noexcept
│ │ │ +
1206 {
│ │ │ +
1207 _Sp_counted_base<_Lp>* __tmp = __r._M_pi;
│ │ │ +
1208 __r._M_pi = _M_pi;
│ │ │ +
1209 _M_pi = __tmp;
│ │ │ +
1210 }
│ │ │ +
1211
│ │ │ +
1212 long
│ │ │ +
1213 _M_get_use_count() const noexcept
│ │ │ +
1214 { return _M_pi != nullptr ? _M_pi->_M_get_use_count() : 0; }
│ │ │ +
1215
│ │ │ +
1216 bool
│ │ │ +
1217 _M_less(const __weak_count& __rhs) const noexcept
│ │ │ +
1218 { return std::less<_Sp_counted_base<_Lp>*>()(this->_M_pi, __rhs._M_pi); }
│ │ │ +
1219
│ │ │ +
1220 bool
│ │ │ +
1221 _M_less(const __shared_count<_Lp>& __rhs) const noexcept
│ │ │ +
1222 { return std::less<_Sp_counted_base<_Lp>*>()(this->_M_pi, __rhs._M_pi); }
│ │ │ +
1223
│ │ │ +
1224 // Friend function injected into enclosing namespace and found by ADL
│ │ │ +
1225 friend inline bool
│ │ │ +
1226 operator==(const __weak_count& __a, const __weak_count& __b) noexcept
│ │ │ +
1227 { return __a._M_pi == __b._M_pi; }
│ │ │ +
1228
│ │ │ +
1229 private:
│ │ │ +
1230 friend class __shared_count<_Lp>;
│ │ │ +
1231#if __cplusplus >= 202002L
│ │ │ +
1232 template<typename> friend class _Sp_atomic;
│ │ │ +
1233#endif
│ │ │ +
1234
│ │ │ +
1235 _Sp_counted_base<_Lp>* _M_pi;
│ │ │ +
1236 };
│ │ │ +
1237
│ │ │ +
1238 // Now that __weak_count is defined we can define this constructor:
│ │ │ +
1239 template<_Lock_policy _Lp>
│ │ │ +
1240 inline
│ │ │ +
1241 __shared_count<_Lp>::__shared_count(const __weak_count<_Lp>& __r)
│ │ │ +
1242 : _M_pi(__r._M_pi)
│ │ │ +
1243 {
│ │ │ +
1244 if (_M_pi == nullptr || !_M_pi->_M_add_ref_lock_nothrow())
│ │ │ +
1245 __throw_bad_weak_ptr();
│ │ │ +
1246 }
│ │ │ +
1247
│ │ │ +
1248 // Now that __weak_count is defined we can define this constructor:
│ │ │ +
1249 template<_Lock_policy _Lp>
│ │ │ +
1250 inline
│ │ │ +
1251 __shared_count<_Lp>::
│ │ │ +
1252 __shared_count(const __weak_count<_Lp>& __r, std::nothrow_t) noexcept
│ │ │ +
1253 : _M_pi(__r._M_pi)
│ │ │ +
1254 {
│ │ │ +
1255 if (_M_pi && !_M_pi->_M_add_ref_lock_nothrow())
│ │ │ +
1256 _M_pi = nullptr;
│ │ │ +
1257 }
│ │ │ +
1258
│ │ │ +
1259 // Helper traits for shared_ptr of array:
│ │ │ +
1260
│ │ │ +
1261 // A pointer type Y* is said to be compatible with a pointer type T* when
│ │ │ +
1262 // either Y* is convertible to T* or Y is U[N] and T is U cv [].
│ │ │ +
1263 template<typename _Yp_ptr, typename _Tp_ptr>
│ │ │ +
1264 struct __sp_compatible_with
│ │ │ +
1265 : false_type
│ │ │ +
1266 { };
│ │ │ +
1267
│ │ │ +
1268 template<typename _Yp, typename _Tp>
│ │ │ +
1269 struct __sp_compatible_with<_Yp*, _Tp*>
│ │ │ +
1270 : is_convertible<_Yp*, _Tp*>::type
│ │ │ +
1271 { };
│ │ │ +
1272
│ │ │ +
1273 template<typename _Up, size_t _Nm>
│ │ │ +
1274 struct __sp_compatible_with<_Up(*)[_Nm], _Up(*)[]>
│ │ │ +
1275 : true_type
│ │ │ +
1276 { };
│ │ │ +
1277
│ │ │ +
1278 template<typename _Up, size_t _Nm>
│ │ │ +
1279 struct __sp_compatible_with<_Up(*)[_Nm], const _Up(*)[]>
│ │ │ +
1280 : true_type
│ │ │ +
1281 { };
│ │ │ +
1282
│ │ │ +
1283 template<typename _Up, size_t _Nm>
│ │ │ +
1284 struct __sp_compatible_with<_Up(*)[_Nm], volatile _Up(*)[]>
│ │ │ +
1285 : true_type
│ │ │ +
1286 { };
│ │ │ +
1287
│ │ │ +
1288 template<typename _Up, size_t _Nm>
│ │ │ +
1289 struct __sp_compatible_with<_Up(*)[_Nm], const volatile _Up(*)[]>
│ │ │ +
1290 : true_type
│ │ │ +
1291 { };
│ │ │ +
1292
│ │ │ +
1293 // Test conversion from Y(*)[N] to U(*)[N] without forming invalid type Y[N].
│ │ │ +
1294 template<typename _Up, size_t _Nm, typename _Yp, typename = void>
│ │ │ +
1295 struct __sp_is_constructible_arrN
│ │ │ +
1296 : false_type
│ │ │ +
1297 { };
│ │ │ +
1298
│ │ │ +
1299 template<typename _Up, size_t _Nm, typename _Yp>
│ │ │ +
1300 struct __sp_is_constructible_arrN<_Up, _Nm, _Yp, __void_t<_Yp[_Nm]>>
│ │ │ +
1301 : is_convertible<_Yp(*)[_Nm], _Up(*)[_Nm]>::type
│ │ │ +
1302 { };
│ │ │ +
1303
│ │ │ +
1304 // Test conversion from Y(*)[] to U(*)[] without forming invalid type Y[].
│ │ │ +
1305 template<typename _Up, typename _Yp, typename = void>
│ │ │ +
1306 struct __sp_is_constructible_arr
│ │ │ +
1307 : false_type
│ │ │ +
1308 { };
│ │ │ +
1309
│ │ │ +
1310 template<typename _Up, typename _Yp>
│ │ │ +
1311 struct __sp_is_constructible_arr<_Up, _Yp, __void_t<_Yp[]>>
│ │ │ +
1312 : is_convertible<_Yp(*)[], _Up(*)[]>::type
│ │ │ +
1313 { };
│ │ │ +
1314
│ │ │ +
1315 // Trait to check if shared_ptr<T> can be constructed from Y*.
│ │ │ +
1316 template<typename _Tp, typename _Yp>
│ │ │ +
1317 struct __sp_is_constructible;
│ │ │ +
1318
│ │ │ +
1319 // When T is U[N], Y(*)[N] shall be convertible to T*;
│ │ │ +
1320 template<typename _Up, size_t _Nm, typename _Yp>
│ │ │ +
1321 struct __sp_is_constructible<_Up[_Nm], _Yp>
│ │ │ +
1322 : __sp_is_constructible_arrN<_Up, _Nm, _Yp>::type
│ │ │ +
1323 { };
│ │ │ +
1324
│ │ │ +
1325 // when T is U[], Y(*)[] shall be convertible to T*;
│ │ │ +
1326 template<typename _Up, typename _Yp>
│ │ │ +
1327 struct __sp_is_constructible<_Up[], _Yp>
│ │ │ +
1328 : __sp_is_constructible_arr<_Up, _Yp>::type
│ │ │ +
1329 { };
│ │ │ +
1330
│ │ │ +
1331 // otherwise, Y* shall be convertible to T*.
│ │ │ +
1332 template<typename _Tp, typename _Yp>
│ │ │ +
1333 struct __sp_is_constructible
│ │ │ +
1334 : is_convertible<_Yp*, _Tp*>::type
│ │ │ +
1335 { };
│ │ │ +
1336
│ │ │ +
1337
│ │ │ +
1338 // Define operator* and operator-> for shared_ptr<T>.
│ │ │ +
1339 template<typename _Tp, _Lock_policy _Lp,
│ │ │ +
1340 bool = is_array<_Tp>::value, bool = is_void<_Tp>::value>
│ │ │ +
1341 class __shared_ptr_access
│ │ │ +
1342 {
│ │ │ +
1343 public:
│ │ │ +
1344 using element_type = _Tp;
│ │ │ +
1345
│ │ │ +
1346 element_type&
│ │ │ +
1347 operator*() const noexcept
│ │ │ +
1348 {
│ │ │ +
1349 __glibcxx_assert(_M_get() != nullptr);
│ │ │ +
1350 return *_M_get();
│ │ │ +
1351 }
│ │ │ +
1352
│ │ │ +
1353 element_type*
│ │ │ +
1354 operator->() const noexcept
│ │ │ +
1355 {
│ │ │ +
1356 _GLIBCXX_DEBUG_PEDASSERT(_M_get() != nullptr);
│ │ │ +
1357 return _M_get();
│ │ │ +
1358 }
│ │ │ +
1359
│ │ │ +
1360 private:
│ │ │ +
1361 element_type*
│ │ │ +
1362 _M_get() const noexcept
│ │ │ +
1363 { return static_cast<const __shared_ptr<_Tp, _Lp>*>(this)->get(); }
│ │ │ +
1364 };
│ │ │ +
1365
│ │ │ +
1366 // Define operator-> for shared_ptr<cv void>.
│ │ │ +
1367 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
1368 class __shared_ptr_access<_Tp, _Lp, false, true>
│ │ │ +
1369 {
│ │ │ +
1370 public:
│ │ │ +
1371 using element_type = _Tp;
│ │ │ +
1372
│ │ │ +
1373 element_type*
│ │ │ +
1374 operator->() const noexcept
│ │ │ +
1375 {
│ │ │ +
1376 auto __ptr = static_cast<const __shared_ptr<_Tp, _Lp>*>(this)->get();
│ │ │ +
1377 _GLIBCXX_DEBUG_PEDASSERT(__ptr != nullptr);
│ │ │ +
1378 return __ptr;
│ │ │ +
1379 }
│ │ │ +
1380 };
│ │ │ +
1381
│ │ │ +
1382 // Define operator[] for shared_ptr<T[]> and shared_ptr<T[N]>.
│ │ │ +
1383 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
1384 class __shared_ptr_access<_Tp, _Lp, true, false>
│ │ │ +
1385 {
│ │ │ +
1386 public:
│ │ │ +
1387 using element_type = typename remove_extent<_Tp>::type;
│ │ │ +
1388
│ │ │ +
1389#if __cplusplus <= 201402L
│ │ │ +
1390 [[__deprecated__("shared_ptr<T[]>::operator* is absent from C++17")]]
│ │ │ +
1391 element_type&
│ │ │ +
1392 operator*() const noexcept
│ │ │ +
1393 {
│ │ │ +
1394 __glibcxx_assert(_M_get() != nullptr);
│ │ │ +
1395 return *_M_get();
│ │ │ +
1396 }
│ │ │ +
1397
│ │ │ +
1398 [[__deprecated__("shared_ptr<T[]>::operator-> is absent from C++17")]]
│ │ │ +
1399 element_type*
│ │ │ +
1400 operator->() const noexcept
│ │ │ +
1401 {
│ │ │ +
1402 _GLIBCXX_DEBUG_PEDASSERT(_M_get() != nullptr);
│ │ │ +
1403 return _M_get();
│ │ │ +
1404 }
│ │ │ +
1405#endif
│ │ │ +
1406
│ │ │ +
1407 element_type&
│ │ │ +
1408 operator[](ptrdiff_t __i) const noexcept
│ │ │ +
1409 {
│ │ │ +
1410 __glibcxx_assert(_M_get() != nullptr);
│ │ │ +
1411 __glibcxx_assert(!extent<_Tp>::value || __i < extent<_Tp>::value);
│ │ │ +
1412 return _M_get()[__i];
│ │ │ +
1413 }
│ │ │ +
1414
│ │ │ +
1415 private:
│ │ │ +
1416 element_type*
│ │ │ +
1417 _M_get() const noexcept
│ │ │ +
1418 { return static_cast<const __shared_ptr<_Tp, _Lp>*>(this)->get(); }
│ │ │ +
1419 };
│ │ │ +
1420
│ │ │ +
1421 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
1422 class __shared_ptr
│ │ │ +
1423 : public __shared_ptr_access<_Tp, _Lp>
│ │ │ +
1424 {
│ │ │ +
1425 public:
│ │ │ +
1426 using element_type = typename remove_extent<_Tp>::type;
│ │ │ +
1427
│ │ │ +
1428 private:
│ │ │ +
1429 // Constraint for taking ownership of a pointer of type _Yp*:
│ │ │ +
1430 template<typename _Yp>
│ │ │ +
1431 using _SafeConv
│ │ │ +
1432 = typename enable_if<__sp_is_constructible<_Tp, _Yp>::value>::type;
│ │ │ +
1433
│ │ │ +
1434 // Constraint for construction from shared_ptr and weak_ptr:
│ │ │ +
1435 template<typename _Yp, typename _Res = void>
│ │ │ +
1436 using _Compatible = typename
│ │ │ +
1437 enable_if<__sp_compatible_with<_Yp*, _Tp*>::value, _Res>::type;
│ │ │ +
1438
│ │ │ +
1439 // Constraint for assignment from shared_ptr and weak_ptr:
│ │ │ +
1440 template<typename _Yp>
│ │ │ +
1441 using _Assignable = _Compatible<_Yp, __shared_ptr&>;
│ │ │ +
1442
│ │ │ +
1443 // Constraint for construction from unique_ptr:
│ │ │ +
1444 template<typename _Yp, typename _Del, typename _Res = void,
│ │ │ +
1445 typename _Ptr = typename unique_ptr<_Yp, _Del>::pointer>
│ │ │ +
1446 using _UniqCompatible = __enable_if_t<__and_<
│ │ │ +
1447 __sp_compatible_with<_Yp*, _Tp*>,
│ │ │ +
1448 is_convertible<_Ptr, element_type*>,
│ │ │ +
1449 is_move_constructible<_Del>
│ │ │ +
1450 >::value, _Res>;
│ │ │ +
1451
│ │ │ +
1452 // Constraint for assignment from unique_ptr:
│ │ │ +
1453 template<typename _Yp, typename _Del>
│ │ │ +
1454 using _UniqAssignable = _UniqCompatible<_Yp, _Del, __shared_ptr&>;
│ │ │ +
1455
│ │ │ +
1456 public:
│ │ │ +
1457
│ │ │ +
1458#if __cplusplus > 201402L
│ │ │ +
1459 using weak_type = __weak_ptr<_Tp, _Lp>;
│ │ │ +
1460#endif
│ │ │ +
1461
│ │ │ +
1462 constexpr __shared_ptr() noexcept
│ │ │ +
1463 : _M_ptr(0), _M_refcount()
│ │ │ +
1464 { }
│ │ │ +
1465
│ │ │ +
1466 template<typename _Yp, typename = _SafeConv<_Yp>>
│ │ │ +
1467 explicit
│ │ │ +
1468 __shared_ptr(_Yp* __p)
│ │ │ +
1469 : _M_ptr(__p), _M_refcount(__p, typename is_array<_Tp>::type())
│ │ │ +
1470 {
│ │ │ +
1471 static_assert( !is_void<_Yp>::value, "incomplete type" );
│ │ │ +
1472 static_assert( sizeof(_Yp) > 0, "incomplete type" );
│ │ │ +
1473 _M_enable_shared_from_this_with(__p);
│ │ │ +
1474 }
│ │ │ +
1475
│ │ │ +
1476 template<typename _Yp, typename _Deleter, typename = _SafeConv<_Yp>>
│ │ │ +
1477 __shared_ptr(_Yp* __p, _Deleter __d)
│ │ │ +
1478 : _M_ptr(__p), _M_refcount(__p, std::move(__d))
│ │ │ +
1479 {
│ │ │ +
1480 static_assert(__is_invocable<_Deleter&, _Yp*&>::value,
│ │ │ +
1481 "deleter expression d(p) is well-formed");
│ │ │ +
1482 _M_enable_shared_from_this_with(__p);
│ │ │ +
1483 }
│ │ │ +
1484
│ │ │ +
1485 template<typename _Yp, typename _Deleter, typename _Alloc,
│ │ │ +
1486 typename = _SafeConv<_Yp>>
│ │ │ +
1487 __shared_ptr(_Yp* __p, _Deleter __d, _Alloc __a)
│ │ │ +
1488 : _M_ptr(__p), _M_refcount(__p, std::move(__d), std::move(__a))
│ │ │ +
1489 {
│ │ │ +
1490 static_assert(__is_invocable<_Deleter&, _Yp*&>::value,
│ │ │ +
1491 "deleter expression d(p) is well-formed");
│ │ │ +
1492 _M_enable_shared_from_this_with(__p);
│ │ │ +
1493 }
│ │ │ +
1494
│ │ │ +
1495 template<typename _Deleter>
│ │ │ +
1496 __shared_ptr(nullptr_t __p, _Deleter __d)
│ │ │ +
1497 : _M_ptr(0), _M_refcount(__p, std::move(__d))
│ │ │ +
1498 { }
│ │ │ +
1499
│ │ │ +
1500 template<typename _Deleter, typename _Alloc>
│ │ │ +
1501 __shared_ptr(nullptr_t __p, _Deleter __d, _Alloc __a)
│ │ │ +
1502 : _M_ptr(0), _M_refcount(__p, std::move(__d), std::move(__a))
│ │ │ +
1503 { }
│ │ │ +
1504
│ │ │ +
1505 // Aliasing constructor
│ │ │ +
1506 template<typename _Yp>
│ │ │ +
1507 __shared_ptr(const __shared_ptr<_Yp, _Lp>& __r,
│ │ │ +
1508 element_type* __p) noexcept
│ │ │ +
1509 : _M_ptr(__p), _M_refcount(__r._M_refcount) // never throws
│ │ │ +
1510 { }
│ │ │ +
1511
│ │ │ +
1512 // Aliasing constructor
│ │ │ +
1513 template<typename _Yp>
│ │ │ +
1514 __shared_ptr(__shared_ptr<_Yp, _Lp>&& __r,
│ │ │ +
1515 element_type* __p) noexcept
│ │ │ +
1516 : _M_ptr(__p), _M_refcount()
│ │ │ +
1517 {
│ │ │ +
1518 _M_refcount._M_swap(__r._M_refcount);
│ │ │ +
1519 __r._M_ptr = nullptr;
│ │ │ +
1520 }
│ │ │ +
1521
│ │ │ +
1522 __shared_ptr(const __shared_ptr&) noexcept = default;
│ │ │ +
1523 __shared_ptr& operator=(const __shared_ptr&) noexcept = default;
│ │ │ +
1524 ~__shared_ptr() = default;
│ │ │ +
1525
│ │ │ +
1526 template<typename _Yp, typename = _Compatible<_Yp>>
│ │ │ +
1527 __shared_ptr(const __shared_ptr<_Yp, _Lp>& __r) noexcept
│ │ │ +
1528 : _M_ptr(__r._M_ptr), _M_refcount(__r._M_refcount)
│ │ │ +
1529 { }
│ │ │ +
1530
│ │ │ +
1531 __shared_ptr(__shared_ptr&& __r) noexcept
│ │ │ +
1532 : _M_ptr(__r._M_ptr), _M_refcount()
│ │ │ +
1533 {
│ │ │ +
1534 _M_refcount._M_swap(__r._M_refcount);
│ │ │ +
1535 __r._M_ptr = nullptr;
│ │ │ +
1536 }
│ │ │ +
1537
│ │ │ +
1538 template<typename _Yp, typename = _Compatible<_Yp>>
│ │ │ +
1539 __shared_ptr(__shared_ptr<_Yp, _Lp>&& __r) noexcept
│ │ │ +
1540 : _M_ptr(__r._M_ptr), _M_refcount()
│ │ │ +
1541 {
│ │ │ +
1542 _M_refcount._M_swap(__r._M_refcount);
│ │ │ +
1543 __r._M_ptr = nullptr;
│ │ │ +
1544 }
│ │ │ +
1545
│ │ │ +
1546 template<typename _Yp, typename = _Compatible<_Yp>>
│ │ │ +
1547 explicit __shared_ptr(const __weak_ptr<_Yp, _Lp>& __r)
│ │ │ +
1548 : _M_refcount(__r._M_refcount) // may throw
│ │ │ +
1549 {
│ │ │ +
1550 // It is now safe to copy __r._M_ptr, as
│ │ │ +
1551 // _M_refcount(__r._M_refcount) did not throw.
│ │ │ +
1552 _M_ptr = __r._M_ptr;
│ │ │ +
1553 }
│ │ │ +
1554
│ │ │ +
1555 // If an exception is thrown this constructor has no effect.
│ │ │ +
1556 template<typename _Yp, typename _Del,
│ │ │ +
1557 typename = _UniqCompatible<_Yp, _Del>>
│ │ │ +
1558 __shared_ptr(unique_ptr<_Yp, _Del>&& __r)
│ │ │ +
1559 : _M_ptr(__r.get()), _M_refcount()
│ │ │ +
1560 {
│ │ │ +
1561 auto __raw = __to_address(__r.get());
│ │ │ +
1562 _M_refcount = __shared_count<_Lp>(std::move(__r));
│ │ │ +
1563 _M_enable_shared_from_this_with(__raw);
│ │ │ +
1564 }
│ │ │ +
1565
│ │ │ +
1566#if __cplusplus <= 201402L && _GLIBCXX_USE_DEPRECATED
│ │ │ +
1567 protected:
│ │ │ +
1568 // If an exception is thrown this constructor has no effect.
│ │ │ +
1569 template<typename _Tp1, typename _Del,
│ │ │ +
1570 typename enable_if<__and_<
│ │ │ +
1571 __not_<is_array<_Tp>>, is_array<_Tp1>,
│ │ │ +
1572 is_convertible<typename unique_ptr<_Tp1, _Del>::pointer, _Tp*>
│ │ │ +
1573 >::value, bool>::type = true>
│ │ │ +
1574 __shared_ptr(unique_ptr<_Tp1, _Del>&& __r, __sp_array_delete)
│ │ │ +
1575 : _M_ptr(__r.get()), _M_refcount()
│ │ │ +
1576 {
│ │ │ +
1577 auto __raw = __to_address(__r.get());
│ │ │ +
1578 _M_refcount = __shared_count<_Lp>(std::move(__r));
│ │ │ +
1579 _M_enable_shared_from_this_with(__raw);
│ │ │ +
1580 }
│ │ │ +
1581 public:
│ │ │ +
1582#endif
│ │ │ +
1583
│ │ │ +
1584#if _GLIBCXX_USE_DEPRECATED
│ │ │ +
1585#pragma GCC diagnostic push
│ │ │ +
1586#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
│ │ │ +
1587 // Postcondition: use_count() == 1 and __r.get() == 0
│ │ │ +
1588 template<typename _Yp, typename = _Compatible<_Yp>>
│ │ │ +
1589 __shared_ptr(auto_ptr<_Yp>&& __r);
│ │ │ +
1590#pragma GCC diagnostic pop
│ │ │ +
1591#endif
│ │ │ +
1592
│ │ │ +
1593 constexpr __shared_ptr(nullptr_t) noexcept : __shared_ptr() { }
│ │ │ +
1594
│ │ │ +
1595 template<typename _Yp>
│ │ │ +
1596 _Assignable<_Yp>
│ │ │ +
1597 operator=(const __shared_ptr<_Yp, _Lp>& __r) noexcept
│ │ │ +
1598 {
│ │ │ +
1599 _M_ptr = __r._M_ptr;
│ │ │ +
1600 _M_refcount = __r._M_refcount; // __shared_count::op= doesn't throw
│ │ │ +
1601 return *this;
│ │ │ +
1602 }
│ │ │ +
1603
│ │ │ +
1604#if _GLIBCXX_USE_DEPRECATED
│ │ │ +
1605#pragma GCC diagnostic push
│ │ │ +
1606#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
│ │ │ +
1607 template<typename _Yp>
│ │ │ +
1608 _Assignable<_Yp>
│ │ │ +
1609 operator=(auto_ptr<_Yp>&& __r)
│ │ │ +
1610 {
│ │ │ +
1611 __shared_ptr(std::move(__r)).swap(*this);
│ │ │ +
1612 return *this;
│ │ │ +
1613 }
│ │ │ +
1614#pragma GCC diagnostic pop
│ │ │ +
1615#endif
│ │ │ +
1616
│ │ │ +
1617 __shared_ptr&
│ │ │ +
1618 operator=(__shared_ptr&& __r) noexcept
│ │ │ +
1619 {
│ │ │ +
1620 __shared_ptr(std::move(__r)).swap(*this);
│ │ │ +
1621 return *this;
│ │ │ +
1622 }
│ │ │ +
1623
│ │ │ +
1624 template<class _Yp>
│ │ │ +
1625 _Assignable<_Yp>
│ │ │ +
1626 operator=(__shared_ptr<_Yp, _Lp>&& __r) noexcept
│ │ │ +
1627 {
│ │ │ +
1628 __shared_ptr(std::move(__r)).swap(*this);
│ │ │ +
1629 return *this;
│ │ │ +
1630 }
│ │ │ +
1631
│ │ │ +
1632 template<typename _Yp, typename _Del>
│ │ │ +
1633 _UniqAssignable<_Yp, _Del>
│ │ │ +
1634 operator=(unique_ptr<_Yp, _Del>&& __r)
│ │ │ +
1635 {
│ │ │ +
1636 __shared_ptr(std::move(__r)).swap(*this);
│ │ │ +
1637 return *this;
│ │ │ +
1638 }
│ │ │ +
1639
│ │ │ +
1640 void
│ │ │ +
1641 reset() noexcept
│ │ │ +
1642 { __shared_ptr().swap(*this); }
│ │ │ +
1643
│ │ │ +
1644 template<typename _Yp>
│ │ │ +
1645 _SafeConv<_Yp>
│ │ │ +
1646 reset(_Yp* __p) // _Yp must be complete.
│ │ │ +
1647 {
│ │ │ +
1648 // Catch self-reset errors.
│ │ │ +
1649 __glibcxx_assert(__p == nullptr || __p != _M_ptr);
│ │ │ +
1650 __shared_ptr(__p).swap(*this);
│ │ │ +
1651 }
│ │ │ +
1652
│ │ │ +
1653 template<typename _Yp, typename _Deleter>
│ │ │ +
1654 _SafeConv<_Yp>
│ │ │ +
1655 reset(_Yp* __p, _Deleter __d)
│ │ │ +
1656 { __shared_ptr(__p, std::move(__d)).swap(*this); }
│ │ │ +
1657
│ │ │ +
1658 template<typename _Yp, typename _Deleter, typename _Alloc>
│ │ │ +
1659 _SafeConv<_Yp>
│ │ │ +
1660 reset(_Yp* __p, _Deleter __d, _Alloc __a)
│ │ │ +
1661 { __shared_ptr(__p, std::move(__d), std::move(__a)).swap(*this); }
│ │ │ +
1662
│ │ │ +
1663 /// Return the stored pointer.
│ │ │ +
1664 element_type*
│ │ │ +
1665 get() const noexcept
│ │ │ +
1666 { return _M_ptr; }
│ │ │ +
1667
│ │ │ +
1668 /// Return true if the stored pointer is not null.
│ │ │ +
1669#if __cplusplus >= 202002L
│ │ │ +
1670 [[__gnu__::__always_inline__]]
│ │ │ +
1671#endif
│ │ │ +
1672 explicit operator bool() const noexcept
│ │ │ +
1673 { return _M_ptr != nullptr; }
│ │ │ +
1674
│ │ │ +
1675 /// Return true if use_count() == 1.
│ │ │ +
1676 bool
│ │ │ +
1677 unique() const noexcept
│ │ │ +
1678 { return _M_refcount._M_unique(); }
│ │ │ +
1679
│ │ │ +
1680 /// If *this owns a pointer, return the number of owners, otherwise zero.
│ │ │ +
1681 long
│ │ │ +
1682 use_count() const noexcept
│ │ │ +
1683 { return _M_refcount._M_get_use_count(); }
│ │ │ +
1684
│ │ │ +
1685 /// Exchange both the owned pointer and the stored pointer.
│ │ │ +
1686 void
│ │ │ +
1687 swap(__shared_ptr<_Tp, _Lp>& __other) noexcept
│ │ │ +
1688 {
│ │ │ +
1689 std::swap(_M_ptr, __other._M_ptr);
│ │ │ +
1690 _M_refcount._M_swap(__other._M_refcount);
│ │ │ +
1691 }
│ │ │ +
1692
│ │ │ +
1693 /** @brief Define an ordering based on ownership.
│ │ │ +
1694 *
│ │ │ +
1695 * This function defines a strict weak ordering between two shared_ptr
│ │ │ +
1696 * or weak_ptr objects, such that one object is less than the other
│ │ │ +
1697 * unless they share ownership of the same pointer, or are both empty.
│ │ │ +
1698 * @{
│ │ │ +
1699 */
│ │ │ +
1700 template<typename _Tp1>
│ │ │ +
1701 bool
│ │ │ +
1702 owner_before(__shared_ptr<_Tp1, _Lp> const& __rhs) const noexcept
│ │ │ +
1703 { return _M_refcount._M_less(__rhs._M_refcount); }
│ │ │ +
1704
│ │ │ +
1705 template<typename _Tp1>
│ │ │ +
1706 bool
│ │ │ +
1707 owner_before(__weak_ptr<_Tp1, _Lp> const& __rhs) const noexcept
│ │ │ +
1708 { return _M_refcount._M_less(__rhs._M_refcount); }
│ │ │ +
1709 /// @}
│ │ │ +
1710
│ │ │ +
1711 protected:
│ │ │ +
1712 // This constructor is non-standard, it is used by allocate_shared.
│ │ │ +
1713 template<typename _Alloc, typename... _Args>
│ │ │ +
1714 __shared_ptr(_Sp_alloc_shared_tag<_Alloc> __tag, _Args&&... __args)
│ │ │ +
1715 : _M_ptr(), _M_refcount(_M_ptr, __tag, std::forward<_Args>(__args)...)
│ │ │ +
1716 { _M_enable_shared_from_this_with(_M_ptr); }
│ │ │ +
1717
│ │ │ +
1718 template<typename _Tp1, _Lock_policy _Lp1, typename _Alloc,
│ │ │ +
1719 typename... _Args>
│ │ │ +
1720 friend __shared_ptr<_Tp1, _Lp1>
│ │ │ +
1721 __allocate_shared(const _Alloc& __a, _Args&&... __args);
│ │ │ +
1722
│ │ │ +
1723#if __cpp_lib_shared_ptr_arrays >= 201707L
│ │ │ +
1724 // This constructor is non-standard, it is used by allocate_shared<T[]>.
│ │ │ +
1725 template<typename _Alloc, typename _Init = const remove_extent_t<_Tp>*>
│ │ │ +
1726 __shared_ptr(const _Sp_counted_array_base<_Alloc>& __a,
│ │ │ +
1727 _Init __init = nullptr)
│ │ │ +
1728 : _M_ptr(), _M_refcount(_M_ptr, __a, __init)
│ │ │ +
1729 { }
│ │ │ +
1730#endif
│ │ │ +
1731
│ │ │ +
1732 // This constructor is used by __weak_ptr::lock() and
│ │ │ +
1733 // shared_ptr::shared_ptr(const weak_ptr&, std::nothrow_t).
│ │ │ +
1734 __shared_ptr(const __weak_ptr<_Tp, _Lp>& __r, std::nothrow_t) noexcept
│ │ │ +
1735 : _M_refcount(__r._M_refcount, std::nothrow)
│ │ │ +
1736 {
│ │ │ +
1737 _M_ptr = _M_refcount._M_get_use_count() ? __r._M_ptr : nullptr;
│ │ │ +
1738 }
│ │ │ +
1739
│ │ │ +
1740 friend class __weak_ptr<_Tp, _Lp>;
│ │ │ +
1741
│ │ │ +
1742 private:
│ │ │ +
1743
│ │ │ +
1744 template<typename _Yp>
│ │ │ +
1745 using __esft_base_t = decltype(__enable_shared_from_this_base(
│ │ │ +
1746 std::declval<const __shared_count<_Lp>&>(),
│ │ │ + │ │ │ +
1748
│ │ │ +
1749 // Detect an accessible and unambiguous enable_shared_from_this base.
│ │ │ +
1750 template<typename _Yp, typename = void>
│ │ │ +
1751 struct __has_esft_base
│ │ │ +
1752 : false_type { };
│ │ │ +
1753
│ │ │ +
1754 template<typename _Yp>
│ │ │ +
1755 struct __has_esft_base<_Yp, __void_t<__esft_base_t<_Yp>>>
│ │ │ +
1756 : __not_<is_array<_Tp>> { }; // No enable shared_from_this for arrays
│ │ │ +
1757
│ │ │ +
1758 template<typename _Yp, typename _Yp2 = typename remove_cv<_Yp>::type>
│ │ │ +
1759 typename enable_if<__has_esft_base<_Yp2>::value>::type
│ │ │ +
1760 _M_enable_shared_from_this_with(_Yp* __p) noexcept
│ │ │ +
1761 {
│ │ │ +
1762 if (auto __base = __enable_shared_from_this_base(_M_refcount, __p))
│ │ │ +
1763 __base->_M_weak_assign(const_cast<_Yp2*>(__p), _M_refcount);
│ │ │ +
1764 }
│ │ │ +
1765
│ │ │ +
1766 template<typename _Yp, typename _Yp2 = typename remove_cv<_Yp>::type>
│ │ │ +
1767 typename enable_if<!__has_esft_base<_Yp2>::value>::type
│ │ │ +
1768 _M_enable_shared_from_this_with(_Yp*) noexcept
│ │ │ +
1769 { }
│ │ │ +
1770
│ │ │ +
1771 void*
│ │ │ +
1772 _M_get_deleter(const std::type_info& __ti) const noexcept
│ │ │ +
1773 { return _M_refcount._M_get_deleter(__ti); }
│ │ │ +
1774
│ │ │ +
1775 template<typename _Tp1, _Lock_policy _Lp1> friend class __shared_ptr;
│ │ │ +
1776 template<typename _Tp1, _Lock_policy _Lp1> friend class __weak_ptr;
│ │ │ +
1777
│ │ │ +
1778 template<typename _Del, typename _Tp1, _Lock_policy _Lp1>
│ │ │ +
1779 friend _Del* get_deleter(const __shared_ptr<_Tp1, _Lp1>&) noexcept;
│ │ │ +
1780
│ │ │ +
1781 template<typename _Del, typename _Tp1>
│ │ │ +
1782 friend _Del* get_deleter(const shared_ptr<_Tp1>&) noexcept;
│ │ │ +
1783
│ │ │ +
1784#if __cplusplus >= 202002L
│ │ │ +
1785 friend _Sp_atomic<shared_ptr<_Tp>>;
│ │ │ +
1786#endif
│ │ │ +
1787
│ │ │ +
1788 element_type* _M_ptr; // Contained pointer.
│ │ │ +
1789 __shared_count<_Lp> _M_refcount; // Reference counter.
│ │ │ +
1790 };
│ │ │ +
1791
│ │ │ +
1792
│ │ │ +
1793 // 20.7.2.2.7 shared_ptr comparisons
│ │ │ +
1794 template<typename _Tp1, typename _Tp2, _Lock_policy _Lp>
│ │ │ +
1795 inline bool
│ │ │ +
1796 operator==(const __shared_ptr<_Tp1, _Lp>& __a,
│ │ │ +
1797 const __shared_ptr<_Tp2, _Lp>& __b) noexcept
│ │ │ +
1798 { return __a.get() == __b.get(); }
│ │ │ +
1799
│ │ │ +
1800 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
1801 inline bool
│ │ │ +
1802 operator==(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept
│ │ │ +
1803 { return !__a; }
│ │ │ +
1804
│ │ │ +
1805#ifdef __cpp_lib_three_way_comparison
│ │ │ +
1806 template<typename _Tp, typename _Up, _Lock_policy _Lp>
│ │ │ +
1807 inline strong_ordering
│ │ │ +
1808 operator<=>(const __shared_ptr<_Tp, _Lp>& __a,
│ │ │ +
1809 const __shared_ptr<_Up, _Lp>& __b) noexcept
│ │ │ +
1810 { return compare_three_way()(__a.get(), __b.get()); }
│ │ │ +
1811
│ │ │ +
1812 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
1813 inline strong_ordering
│ │ │ +
1814 operator<=>(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept
│ │ │ +
1815 {
│ │ │ +
1816 using pointer = typename __shared_ptr<_Tp, _Lp>::element_type*;
│ │ │ +
1817 return compare_three_way()(__a.get(), static_cast<pointer>(nullptr));
│ │ │ +
1818 }
│ │ │ +
1819#else
│ │ │ +
1820 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
1821 inline bool
│ │ │ +
1822 operator==(nullptr_t, const __shared_ptr<_Tp, _Lp>& __a) noexcept
│ │ │ +
1823 { return !__a; }
│ │ │ +
1824
│ │ │ +
1825 template<typename _Tp1, typename _Tp2, _Lock_policy _Lp>
│ │ │ +
1826 inline bool
│ │ │ +
1827 operator!=(const __shared_ptr<_Tp1, _Lp>& __a,
│ │ │ +
1828 const __shared_ptr<_Tp2, _Lp>& __b) noexcept
│ │ │ +
1829 { return __a.get() != __b.get(); }
│ │ │ +
1830
│ │ │ +
1831 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
1832 inline bool
│ │ │ +
1833 operator!=(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept
│ │ │ +
1834 { return (bool)__a; }
│ │ │ +
1835
│ │ │ +
1836 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
1837 inline bool
│ │ │ +
1838 operator!=(nullptr_t, const __shared_ptr<_Tp, _Lp>& __a) noexcept
│ │ │ +
1839 { return (bool)__a; }
│ │ │ +
1840
│ │ │ +
1841 template<typename _Tp, typename _Up, _Lock_policy _Lp>
│ │ │ +
1842 inline bool
│ │ │ +
1843 operator<(const __shared_ptr<_Tp, _Lp>& __a,
│ │ │ +
1844 const __shared_ptr<_Up, _Lp>& __b) noexcept
│ │ │ +
1845 {
│ │ │ +
1846 using _Tp_elt = typename __shared_ptr<_Tp, _Lp>::element_type;
│ │ │ +
1847 using _Up_elt = typename __shared_ptr<_Up, _Lp>::element_type;
│ │ │ +
1848 using _Vp = typename common_type<_Tp_elt*, _Up_elt*>::type;
│ │ │ +
1849 return less<_Vp>()(__a.get(), __b.get());
│ │ │ +
1850 }
│ │ │ +
1851
│ │ │ +
1852 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
1853 inline bool
│ │ │ +
1854 operator<(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept
│ │ │ +
1855 {
│ │ │ +
1856 using _Tp_elt = typename __shared_ptr<_Tp, _Lp>::element_type;
│ │ │ +
1857 return less<_Tp_elt*>()(__a.get(), nullptr);
│ │ │ +
1858 }
│ │ │ +
1859
│ │ │ +
1860 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
1861 inline bool
│ │ │ +
1862 operator<(nullptr_t, const __shared_ptr<_Tp, _Lp>& __a) noexcept
│ │ │ +
1863 {
│ │ │ +
1864 using _Tp_elt = typename __shared_ptr<_Tp, _Lp>::element_type;
│ │ │ +
1865 return less<_Tp_elt*>()(nullptr, __a.get());
│ │ │ +
1866 }
│ │ │ +
1867
│ │ │ +
1868 template<typename _Tp1, typename _Tp2, _Lock_policy _Lp>
│ │ │ +
1869 inline bool
│ │ │ +
1870 operator<=(const __shared_ptr<_Tp1, _Lp>& __a,
│ │ │ +
1871 const __shared_ptr<_Tp2, _Lp>& __b) noexcept
│ │ │ +
1872 { return !(__b < __a); }
│ │ │ +
1873
│ │ │ +
1874 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
1875 inline bool
│ │ │ +
1876 operator<=(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept
│ │ │ +
1877 { return !(nullptr < __a); }
│ │ │ +
1878
│ │ │ +
1879 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
1880 inline bool
│ │ │ +
1881 operator<=(nullptr_t, const __shared_ptr<_Tp, _Lp>& __a) noexcept
│ │ │ +
1882 { return !(__a < nullptr); }
│ │ │ +
1883
│ │ │ +
1884 template<typename _Tp1, typename _Tp2, _Lock_policy _Lp>
│ │ │ +
1885 inline bool
│ │ │ +
1886 operator>(const __shared_ptr<_Tp1, _Lp>& __a,
│ │ │ +
1887 const __shared_ptr<_Tp2, _Lp>& __b) noexcept
│ │ │ +
1888 { return (__b < __a); }
│ │ │ +
1889
│ │ │ +
1890 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
1891 inline bool
│ │ │ +
1892 operator>(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept
│ │ │ +
1893 { return nullptr < __a; }
│ │ │ +
1894
│ │ │ +
1895 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
1896 inline bool
│ │ │ +
1897 operator>(nullptr_t, const __shared_ptr<_Tp, _Lp>& __a) noexcept
│ │ │ +
1898 { return __a < nullptr; }
│ │ │ +
1899
│ │ │ +
1900 template<typename _Tp1, typename _Tp2, _Lock_policy _Lp>
│ │ │ +
1901 inline bool
│ │ │ +
1902 operator>=(const __shared_ptr<_Tp1, _Lp>& __a,
│ │ │ +
1903 const __shared_ptr<_Tp2, _Lp>& __b) noexcept
│ │ │ +
1904 { return !(__a < __b); }
│ │ │ +
1905
│ │ │ +
1906 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
1907 inline bool
│ │ │ +
1908 operator>=(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept
│ │ │ +
1909 { return !(__a < nullptr); }
│ │ │ +
1910
│ │ │ +
1911 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
1912 inline bool
│ │ │ +
1913 operator>=(nullptr_t, const __shared_ptr<_Tp, _Lp>& __a) noexcept
│ │ │ +
1914 { return !(nullptr < __a); }
│ │ │ +
1915#endif // three-way comparison
│ │ │ +
1916
│ │ │ +
1917 // 20.7.2.2.8 shared_ptr specialized algorithms.
│ │ │ +
1918 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
1919 inline void
│ │ │ +
1920 swap(__shared_ptr<_Tp, _Lp>& __a, __shared_ptr<_Tp, _Lp>& __b) noexcept
│ │ │ +
1921 { __a.swap(__b); }
│ │ │ +
1922
│ │ │ +
1923 // 20.7.2.2.9 shared_ptr casts
│ │ │ +
1924
│ │ │ +
1925 // The seemingly equivalent code:
│ │ │ +
1926 // shared_ptr<_Tp, _Lp>(static_cast<_Tp*>(__r.get()))
│ │ │ +
1927 // will eventually result in undefined behaviour, attempting to
│ │ │ +
1928 // delete the same object twice.
│ │ │ +
1929 /// static_pointer_cast
│ │ │ +
1930 template<typename _Tp, typename _Tp1, _Lock_policy _Lp>
│ │ │ +
1931 inline __shared_ptr<_Tp, _Lp>
│ │ │ +
│ │ │ + │ │ │ +
1933 {
│ │ │ + │ │ │ +
1935 return _Sp(__r, static_cast<typename _Sp::element_type*>(__r.get()));
│ │ │ +
1936 }
│ │ │ +
│ │ │ +
1937
│ │ │ +
1938 // The seemingly equivalent code:
│ │ │ +
1939 // shared_ptr<_Tp, _Lp>(const_cast<_Tp*>(__r.get()))
│ │ │ +
1940 // will eventually result in undefined behaviour, attempting to
│ │ │ +
1941 // delete the same object twice.
│ │ │ +
1942 /// const_pointer_cast
│ │ │ +
1943 template<typename _Tp, typename _Tp1, _Lock_policy _Lp>
│ │ │ +
1944 inline __shared_ptr<_Tp, _Lp>
│ │ │ +
│ │ │ + │ │ │ +
1946 {
│ │ │ + │ │ │ +
1948 return _Sp(__r, const_cast<typename _Sp::element_type*>(__r.get()));
│ │ │ +
1949 }
│ │ │ +
│ │ │ +
1950
│ │ │ +
1951 // The seemingly equivalent code:
│ │ │ +
1952 // shared_ptr<_Tp, _Lp>(dynamic_cast<_Tp*>(__r.get()))
│ │ │ +
1953 // will eventually result in undefined behaviour, attempting to
│ │ │ +
1954 // delete the same object twice.
│ │ │ +
1955 /// dynamic_pointer_cast
│ │ │ +
1956 template<typename _Tp, typename _Tp1, _Lock_policy _Lp>
│ │ │ +
1957 inline __shared_ptr<_Tp, _Lp>
│ │ │ +
│ │ │ + │ │ │ +
1959 {
│ │ │ + │ │ │ +
1961 if (auto* __p = dynamic_cast<typename _Sp::element_type*>(__r.get()))
│ │ │ +
1962 return _Sp(__r, __p);
│ │ │ +
1963 return _Sp();
│ │ │ +
1964 }
│ │ │ +
│ │ │ +
1965
│ │ │ +
1966#if __cplusplus > 201402L
│ │ │ +
1967 template<typename _Tp, typename _Tp1, _Lock_policy _Lp>
│ │ │ +
1968 inline __shared_ptr<_Tp, _Lp>
│ │ │ +
1969 reinterpret_pointer_cast(const __shared_ptr<_Tp1, _Lp>& __r) noexcept
│ │ │ +
1970 {
│ │ │ +
1971 using _Sp = __shared_ptr<_Tp, _Lp>;
│ │ │ +
1972 return _Sp(__r, reinterpret_cast<typename _Sp::element_type*>(__r.get()));
│ │ │ +
1973 }
│ │ │ +
1974#endif
│ │ │ +
1975
│ │ │ +
1976 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
1977 class __weak_ptr
│ │ │ +
1978 {
│ │ │ +
1979 template<typename _Yp, typename _Res = void>
│ │ │ +
1980 using _Compatible = typename
│ │ │ +
1981 enable_if<__sp_compatible_with<_Yp*, _Tp*>::value, _Res>::type;
│ │ │ +
1982
│ │ │ +
1983 // Constraint for assignment from shared_ptr and weak_ptr:
│ │ │ +
1984 template<typename _Yp>
│ │ │ +
1985 using _Assignable = _Compatible<_Yp, __weak_ptr&>;
│ │ │ +
1986
│ │ │ +
1987 public:
│ │ │ +
1988 using element_type = typename remove_extent<_Tp>::type;
│ │ │ +
1989
│ │ │ +
1990 constexpr __weak_ptr() noexcept
│ │ │ +
1991 : _M_ptr(nullptr), _M_refcount()
│ │ │ +
1992 { }
│ │ │ +
1993
│ │ │ +
1994 __weak_ptr(const __weak_ptr&) noexcept = default;
│ │ │ +
1995
│ │ │ +
1996 ~__weak_ptr() = default;
│ │ │ +
1997
│ │ │ +
1998 // The "obvious" converting constructor implementation:
│ │ │ +
1999 //
│ │ │ +
2000 // template<typename _Tp1>
│ │ │ +
2001 // __weak_ptr(const __weak_ptr<_Tp1, _Lp>& __r)
│ │ │ +
2002 // : _M_ptr(__r._M_ptr), _M_refcount(__r._M_refcount) // never throws
│ │ │ +
2003 // { }
│ │ │ +
2004 //
│ │ │ +
2005 // has a serious problem.
│ │ │ +
2006 //
│ │ │ +
2007 // __r._M_ptr may already have been invalidated. The _M_ptr(__r._M_ptr)
│ │ │ +
2008 // conversion may require access to *__r._M_ptr (virtual inheritance).
│ │ │ +
2009 //
│ │ │ +
2010 // It is not possible to avoid spurious access violations since
│ │ │ +
2011 // in multithreaded programs __r._M_ptr may be invalidated at any point.
│ │ │ +
2012 template<typename _Yp, typename = _Compatible<_Yp>>
│ │ │ +
2013 __weak_ptr(const __weak_ptr<_Yp, _Lp>& __r) noexcept
│ │ │ +
2014 : _M_refcount(__r._M_refcount)
│ │ │ +
2015 { _M_ptr = __r.lock().get(); }
│ │ │ +
2016
│ │ │ +
2017 template<typename _Yp, typename = _Compatible<_Yp>>
│ │ │ +
2018 __weak_ptr(const __shared_ptr<_Yp, _Lp>& __r) noexcept
│ │ │ +
2019 : _M_ptr(__r._M_ptr), _M_refcount(__r._M_refcount)
│ │ │ +
2020 { }
│ │ │ +
2021
│ │ │ +
2022 __weak_ptr(__weak_ptr&& __r) noexcept
│ │ │ +
2023 : _M_ptr(__r._M_ptr), _M_refcount(std::move(__r._M_refcount))
│ │ │ +
2024 { __r._M_ptr = nullptr; }
│ │ │ +
2025
│ │ │ +
2026 template<typename _Yp, typename = _Compatible<_Yp>>
│ │ │ +
2027 __weak_ptr(__weak_ptr<_Yp, _Lp>&& __r) noexcept
│ │ │ +
2028 : _M_ptr(__r.lock().get()), _M_refcount(std::move(__r._M_refcount))
│ │ │ +
2029 { __r._M_ptr = nullptr; }
│ │ │ +
2030
│ │ │ +
2031 __weak_ptr&
│ │ │ +
2032 operator=(const __weak_ptr& __r) noexcept = default;
│ │ │ +
2033
│ │ │ +
2034 template<typename _Yp>
│ │ │ +
2035 _Assignable<_Yp>
│ │ │ +
2036 operator=(const __weak_ptr<_Yp, _Lp>& __r) noexcept
│ │ │ +
2037 {
│ │ │ +
2038 _M_ptr = __r.lock().get();
│ │ │ +
2039 _M_refcount = __r._M_refcount;
│ │ │ +
2040 return *this;
│ │ │ +
2041 }
│ │ │ +
2042
│ │ │ +
2043 template<typename _Yp>
│ │ │ +
2044 _Assignable<_Yp>
│ │ │ +
2045 operator=(const __shared_ptr<_Yp, _Lp>& __r) noexcept
│ │ │ +
2046 {
│ │ │ +
2047 _M_ptr = __r._M_ptr;
│ │ │ +
2048 _M_refcount = __r._M_refcount;
│ │ │ +
2049 return *this;
│ │ │ +
2050 }
│ │ │ +
2051
│ │ │ +
2052 __weak_ptr&
│ │ │ +
2053 operator=(__weak_ptr&& __r) noexcept
│ │ │ +
2054 {
│ │ │ +
2055 __weak_ptr(std::move(__r)).swap(*this);
│ │ │ +
2056 return *this;
│ │ │ +
2057 }
│ │ │ +
2058
│ │ │ +
2059 template<typename _Yp>
│ │ │ +
2060 _Assignable<_Yp>
│ │ │ +
2061 operator=(__weak_ptr<_Yp, _Lp>&& __r) noexcept
│ │ │ +
2062 {
│ │ │ +
2063 _M_ptr = __r.lock().get();
│ │ │ +
2064 _M_refcount = std::move(__r._M_refcount);
│ │ │ +
2065 __r._M_ptr = nullptr;
│ │ │ +
2066 return *this;
│ │ │ +
2067 }
│ │ │ +
2068
│ │ │ +
2069 __shared_ptr<_Tp, _Lp>
│ │ │ +
2070 lock() const noexcept
│ │ │ +
2071 { return __shared_ptr<element_type, _Lp>(*this, std::nothrow); }
│ │ │ +
2072
│ │ │ +
2073 long
│ │ │ +
2074 use_count() const noexcept
│ │ │ +
2075 { return _M_refcount._M_get_use_count(); }
│ │ │ +
2076
│ │ │ +
2077 bool
│ │ │ +
2078 expired() const noexcept
│ │ │ +
2079 { return _M_refcount._M_get_use_count() == 0; }
│ │ │ +
2080
│ │ │ +
2081 template<typename _Tp1>
│ │ │ +
2082 bool
│ │ │ +
2083 owner_before(const __shared_ptr<_Tp1, _Lp>& __rhs) const noexcept
│ │ │ +
2084 { return _M_refcount._M_less(__rhs._M_refcount); }
│ │ │ +
2085
│ │ │ +
2086 template<typename _Tp1>
│ │ │ +
2087 bool
│ │ │ +
2088 owner_before(const __weak_ptr<_Tp1, _Lp>& __rhs) const noexcept
│ │ │ +
2089 { return _M_refcount._M_less(__rhs._M_refcount); }
│ │ │ +
2090
│ │ │ +
2091 void
│ │ │ +
2092 reset() noexcept
│ │ │ +
2093 { __weak_ptr().swap(*this); }
│ │ │ +
2094
│ │ │ +
2095 void
│ │ │ +
2096 swap(__weak_ptr& __s) noexcept
│ │ │ +
2097 {
│ │ │ +
2098 std::swap(_M_ptr, __s._M_ptr);
│ │ │ +
2099 _M_refcount._M_swap(__s._M_refcount);
│ │ │ +
2100 }
│ │ │ +
2101
│ │ │ +
2102 private:
│ │ │ +
2103 // Used by __enable_shared_from_this.
│ │ │ +
2104 void
│ │ │ +
2105 _M_assign(_Tp* __ptr, const __shared_count<_Lp>& __refcount) noexcept
│ │ │ +
2106 {
│ │ │ +
2107 if (use_count() == 0)
│ │ │ +
2108 {
│ │ │ +
2109 _M_ptr = __ptr;
│ │ │ +
2110 _M_refcount = __refcount;
│ │ │ +
2111 }
│ │ │ +
2112 }
│ │ │ +
2113
│ │ │ +
2114 template<typename _Tp1, _Lock_policy _Lp1> friend class __shared_ptr;
│ │ │ +
2115 template<typename _Tp1, _Lock_policy _Lp1> friend class __weak_ptr;
│ │ │ +
2116 friend class __enable_shared_from_this<_Tp, _Lp>;
│ │ │ +
2117 friend class enable_shared_from_this<_Tp>;
│ │ │ +
2118#if __cplusplus >= 202002L
│ │ │ +
2119 friend _Sp_atomic<weak_ptr<_Tp>>;
│ │ │ +
2120#endif
│ │ │ +
2121
│ │ │ +
2122 element_type* _M_ptr; // Contained pointer.
│ │ │ +
2123 __weak_count<_Lp> _M_refcount; // Reference counter.
│ │ │ +
2124 };
│ │ │ +
2125
│ │ │ +
2126 // 20.7.2.3.6 weak_ptr specialized algorithms.
│ │ │ +
2127 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
2128 inline void
│ │ │ +
2129 swap(__weak_ptr<_Tp, _Lp>& __a, __weak_ptr<_Tp, _Lp>& __b) noexcept
│ │ │ +
2130 { __a.swap(__b); }
│ │ │ +
2131
│ │ │ +
2132#pragma GCC diagnostic push
│ │ │ +
2133#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
│ │ │ +
2134 template<typename _Tp, typename _Tp1>
│ │ │ +
2135 struct _Sp_owner_less : public binary_function<_Tp, _Tp, bool>
│ │ │ +
2136 {
│ │ │ +
2137 bool
│ │ │ +
2138 operator()(const _Tp& __lhs, const _Tp& __rhs) const noexcept
│ │ │ +
2139 { return __lhs.owner_before(__rhs); }
│ │ │ +
2140
│ │ │ +
2141 bool
│ │ │ +
2142 operator()(const _Tp& __lhs, const _Tp1& __rhs) const noexcept
│ │ │ +
2143 { return __lhs.owner_before(__rhs); }
│ │ │ +
2144
│ │ │ +
2145 bool
│ │ │ +
2146 operator()(const _Tp1& __lhs, const _Tp& __rhs) const noexcept
│ │ │ +
2147 { return __lhs.owner_before(__rhs); }
│ │ │ +
2148 };
│ │ │ +
2149#pragma GCC diagnostic pop
│ │ │ +
2150
│ │ │ +
2151 template<>
│ │ │ +
2152 struct _Sp_owner_less<void, void>
│ │ │ +
2153 {
│ │ │ +
2154 template<typename _Tp, typename _Up>
│ │ │ +
2155 auto
│ │ │ +
2156 operator()(const _Tp& __lhs, const _Up& __rhs) const noexcept
│ │ │ +
2157 -> decltype(__lhs.owner_before(__rhs))
│ │ │ +
2158 { return __lhs.owner_before(__rhs); }
│ │ │ +
2159
│ │ │ +
2160 using is_transparent = void;
│ │ │ +
2161 };
│ │ │ +
2162
│ │ │ +
2163 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
2164 struct owner_less<__shared_ptr<_Tp, _Lp>>
│ │ │ +
2165 : public _Sp_owner_less<__shared_ptr<_Tp, _Lp>, __weak_ptr<_Tp, _Lp>>
│ │ │ +
2166 { };
│ │ │ +
2167
│ │ │ +
2168 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
2169 struct owner_less<__weak_ptr<_Tp, _Lp>>
│ │ │ +
2170 : public _Sp_owner_less<__weak_ptr<_Tp, _Lp>, __shared_ptr<_Tp, _Lp>>
│ │ │ +
2171 { };
│ │ │ +
2172
│ │ │ +
2173
│ │ │ +
2174 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
2175 class __enable_shared_from_this
│ │ │ +
2176 {
│ │ │ +
2177 protected:
│ │ │ +
2178 constexpr __enable_shared_from_this() noexcept { }
│ │ │ +
2179
│ │ │ +
2180 __enable_shared_from_this(const __enable_shared_from_this&) noexcept { }
│ │ │ +
2181
│ │ │ +
2182 __enable_shared_from_this&
│ │ │ +
2183 operator=(const __enable_shared_from_this&) noexcept
│ │ │ +
2184 { return *this; }
│ │ │ +
2185
│ │ │ +
2186 ~__enable_shared_from_this() { }
│ │ │ +
2187
│ │ │ +
2188 public:
│ │ │ +
2189 __shared_ptr<_Tp, _Lp>
│ │ │ +
2190 shared_from_this()
│ │ │ +
2191 { return __shared_ptr<_Tp, _Lp>(this->_M_weak_this); }
│ │ │ +
2192
│ │ │ +
2193 __shared_ptr<const _Tp, _Lp>
│ │ │ +
2194 shared_from_this() const
│ │ │ +
2195 { return __shared_ptr<const _Tp, _Lp>(this->_M_weak_this); }
│ │ │ +
2196
│ │ │ +
2197#if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11
│ │ │ +
2198 __weak_ptr<_Tp, _Lp>
│ │ │ +
2199 weak_from_this() noexcept
│ │ │ +
2200 { return this->_M_weak_this; }
│ │ │ +
2201
│ │ │ +
2202 __weak_ptr<const _Tp, _Lp>
│ │ │ +
2203 weak_from_this() const noexcept
│ │ │ +
2204 { return this->_M_weak_this; }
│ │ │ +
2205#endif
│ │ │ +
2206
│ │ │ +
2207 private:
│ │ │ +
2208 template<typename _Tp1>
│ │ │ +
2209 void
│ │ │ +
2210 _M_weak_assign(_Tp1* __p, const __shared_count<_Lp>& __n) const noexcept
│ │ │ +
2211 { _M_weak_this._M_assign(__p, __n); }
│ │ │ +
2212
│ │ │ +
2213 friend const __enable_shared_from_this*
│ │ │ +
2214 __enable_shared_from_this_base(const __shared_count<_Lp>&,
│ │ │ +
2215 const __enable_shared_from_this* __p)
│ │ │ +
2216 { return __p; }
│ │ │ +
2217
│ │ │ +
2218 template<typename, _Lock_policy>
│ │ │ +
2219 friend class __shared_ptr;
│ │ │ +
2220
│ │ │ +
2221 mutable __weak_ptr<_Tp, _Lp> _M_weak_this;
│ │ │ +
2222 };
│ │ │ +
2223
│ │ │ +
2224 template<typename _Tp, _Lock_policy _Lp = __default_lock_policy,
│ │ │ +
2225 typename _Alloc, typename... _Args>
│ │ │ +
2226 inline __shared_ptr<_Tp, _Lp>
│ │ │ +
2227 __allocate_shared(const _Alloc& __a, _Args&&... __args)
│ │ │ +
2228 {
│ │ │ +
2229 static_assert(!is_array<_Tp>::value, "make_shared<T[]> not supported");
│ │ │ +
2230
│ │ │ +
2231 return __shared_ptr<_Tp, _Lp>(_Sp_alloc_shared_tag<_Alloc>{__a},
│ │ │ +
2232 std::forward<_Args>(__args)...);
│ │ │ +
2233 }
│ │ │ +
2234
│ │ │ +
2235 template<typename _Tp, _Lock_policy _Lp = __default_lock_policy,
│ │ │ +
2236 typename... _Args>
│ │ │ +
2237 inline __shared_ptr<_Tp, _Lp>
│ │ │ +
2238 __make_shared(_Args&&... __args)
│ │ │ +
2239 {
│ │ │ +
2240 typedef typename std::remove_const<_Tp>::type _Tp_nc;
│ │ │ + │ │ │ +
2242 std::forward<_Args>(__args)...);
│ │ │ +
2243 }
│ │ │ +
2244
│ │ │ +
2245 /// std::hash specialization for __shared_ptr.
│ │ │ +
2246 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
│ │ │ +
2247 struct hash<__shared_ptr<_Tp, _Lp>>
│ │ │ +
2248 : public __hash_base<size_t, __shared_ptr<_Tp, _Lp>>
│ │ │ +
2249 {
│ │ │ +
2250 size_t
│ │ │ +
2251 operator()(const __shared_ptr<_Tp, _Lp>& __s) const noexcept
│ │ │ +
2252 {
│ │ │ + │ │ │ +
2254 __s.get());
│ │ │ +
2255 }
│ │ │ +
2256 };
│ │ │ +
│ │ │ +
2257
│ │ │ +
2258_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ +
2259} // namespace
│ │ │ +
2260
│ │ │ +
2261#endif // _SHARED_PTR_BASE_H
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
constexpr complex< _Tp > operator*(const complex< _Tp > &__x, const complex< _Tp > &__y)
Return new complex value x times y.
Definition complex:392
│ │ │ +
_ForwardIterator uninitialized_default_construct_n(_ForwardIterator __first, _Size __count)
Default-initializes objects in the range [first,first+count).
│ │ │ +
void * align(size_t __align, size_t __size, void *&__ptr, size_t &__space) noexcept
Fit aligned storage in buffer.
Definition align.h:62
│ │ │ +
constexpr _Tp * to_address(_Tp *__ptr) noexcept
Obtain address referenced by a pointer to an object.
Definition ptr_traits.h:247
│ │ │ +
integral_constant< bool, true > true_type
The type used as a compile-time boolean with true value.
Definition type_traits:82
│ │ │ +
integral_constant< bool, false > false_type
The type used as a compile-time boolean with false value.
Definition type_traits:85
│ │ │ +
auto declval() noexcept -> decltype(__declval< _Tp >(0))
Definition type_traits:2387
│ │ │ +
constexpr std::remove_reference< _Tp >::type && move(_Tp &&__t) noexcept
Convert a value to an rvalue.
Definition move.h:104
│ │ │ +
void swap(any &__x, any &__y) noexcept
Exchange the states of two any objects.
Definition any:429
│ │ │ +
constexpr _Tp * __addressof(_Tp &__r) noexcept
Same as C++11 std::addressof.
Definition move.h:49
│ │ │ +
constexpr _Tp && forward(typename std::remove_reference< _Tp >::type &__t) noexcept
Forward an lvalue.
Definition move.h:77
│ │ │ +
void lock(_L1 &__l1, _L2 &__l2, _L3 &... __l3)
Generic lock.
Definition mutex:677
│ │ │
ISO C++ entities toplevel namespace is std.
│ │ │ -
void sleep_until(const chrono::time_point< _Clock, _Duration > &__atime)
this_thread::sleep_until
│ │ │ -
void sleep_for(const chrono::duration< _Rep, _Period > &__rtime)
this_thread::sleep_for
│ │ │ -
chrono::duration represents a distance between two points in time
Definition chrono.h:488
│ │ │ -
chrono::time_point represents a point in time as measured by a clock
Definition chrono.h:901
│ │ │ - │ │ │ +
__shared_ptr< _Tp, _Lp > dynamic_pointer_cast(const __shared_ptr< _Tp1, _Lp > &__r) noexcept
dynamic_pointer_cast
│ │ │ +
__shared_ptr< _Tp, _Lp > static_pointer_cast(const __shared_ptr< _Tp1, _Lp > &__r) noexcept
static_pointer_cast
│ │ │ +
__shared_ptr< _Tp, _Lp > const_pointer_cast(const __shared_ptr< _Tp1, _Lp > &__r) noexcept
const_pointer_cast
│ │ │ +
constexpr _Iterator __base(_Iterator __it)
│ │ │ +
Part of RTTI.
Definition typeinfo:93
│ │ │ +
Primary class template hash.
│ │ │ +
Base class for all library exceptions.
Definition exception.h:62
│ │ │ +
Exception possibly thrown by shared_ptr.
│ │ │ +
virtual char const * what() const noexcept
│ │ │ + │ │ │ +
Scoped lock idiom.
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,13 +1,13 @@ │ │ │ │ libstdc++ │ │ │ │ -this_thread_sleep.h │ │ │ │ +shared_ptr_base.h │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -1// std::this_thread::sleep_for/until declarations -*- C++ -*- │ │ │ │ +1// shared_ptr and weak_ptr implementation details -*- C++ -*- │ │ │ │ 2 │ │ │ │ -3// Copyright (C) 2008-2022 Free Software Foundation, Inc. │ │ │ │ +3// Copyright (C) 2007-2022 Free Software Foundation, Inc. │ │ │ │ 4// │ │ │ │ 5// This file is part of the GNU ISO C++ Library. This library is free │ │ │ │ 6// software; you can redistribute it and/or modify it under the │ │ │ │ 7// terms of the GNU General Public License as published by the │ │ │ │ 8// Free Software Foundation; either version 3, or (at your option) │ │ │ │ 9// any later version. │ │ │ │ 10 │ │ │ │ @@ -21,131 +21,2354 @@ │ │ │ │ 18// 3.1, as published by the Free Software Foundation. │ │ │ │ 19 │ │ │ │ 20// You should have received a copy of the GNU General Public License and │ │ │ │ 21// a copy of the GCC Runtime Library Exception along with this program; │ │ │ │ 22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see │ │ │ │ 23// . │ │ │ │ 24 │ │ │ │ -25/** @file bits/this_thread_sleep.h │ │ │ │ -26 * This is an internal header file, included by other library headers. │ │ │ │ -27 * Do not attempt to use it directly. @headername{thread} │ │ │ │ -28 */ │ │ │ │ +25// GCC Note: Based on files from version 1.32.0 of the Boost library. │ │ │ │ +26 │ │ │ │ +27// shared_count.hpp │ │ │ │ +28// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd. │ │ │ │ 29 │ │ │ │ -30#ifndef _GLIBCXX_THIS_THREAD_SLEEP_H │ │ │ │ -31#define _GLIBCXX_THIS_THREAD_SLEEP_H 1 │ │ │ │ -32 │ │ │ │ -33#pragma GCC system_header │ │ │ │ -34 │ │ │ │ -35#if __cplusplus >= 201103L │ │ │ │ -36#include <_b_i_t_s_/_c_h_r_o_n_o_._h> // std::chrono::* │ │ │ │ -37 │ │ │ │ -38#ifdef _GLIBCXX_USE_NANOSLEEP │ │ │ │ -39# include <_c_e_r_r_n_o> // errno, EINTR │ │ │ │ -40# include // nanosleep │ │ │ │ -41#endif │ │ │ │ -42 │ │ │ │ -43namespace _s_t_d _GLIBCXX_VISIBILITY(default) │ │ │ │ -44{ │ │ │ │ -45_GLIBCXX_BEGIN_NAMESPACE_VERSION │ │ │ │ -46 │ │ │ │ -47 /** @addtogroup threads │ │ │ │ -48 * @{ │ │ │ │ -49 */ │ │ │ │ -50 │ │ │ │ -51 /** @namespace std::this_thread │ │ │ │ -52 * @brief ISO C++ 2011 namespace for interacting with the current thread │ │ │ │ -53 * │ │ │ │ -54 * C++11 30.3.2 [thread.thread.this] Namespace this_thread. │ │ │ │ -55 */ │ │ │ │ -56 namespace this_thread │ │ │ │ -57 { │ │ │ │ -58#ifndef _GLIBCXX_NO_SLEEP │ │ │ │ -59 │ │ │ │ -60#ifndef _GLIBCXX_USE_NANOSLEEP │ │ │ │ -61 void │ │ │ │ -62 __sleep_for(_c_h_r_o_n_o_:_:_s_e_c_o_n_d_s, _c_h_r_o_n_o_:_:_n_a_n_o_s_e_c_o_n_d_s); │ │ │ │ -63#endif │ │ │ │ -64 │ │ │ │ -65 /// this_thread::sleep_for │ │ │ │ -66 template │ │ │ │ -67 inline void │ │ │ │ -_6_8 _s_l_e_e_p___f_o_r(const _c_h_r_o_n_o_:_:_d_u_r_a_t_i_o_n_<___R_e_p_,_ ___P_e_r_i_o_d_>& _____r_t_i_m_e) │ │ │ │ -69 { │ │ │ │ -70 if (_____r_t_i_m_e <= _____r_t_i_m_e.zero()) │ │ │ │ -71 return; │ │ │ │ -72 auto _____s = chrono::duration_cast(_____r_t_i_m_e); │ │ │ │ -73 auto _____n_s = chrono::duration_cast(_____r_t_i_m_e - _____s); │ │ │ │ -74#ifdef _GLIBCXX_USE_NANOSLEEP │ │ │ │ -75 struct ::timespec _____t_s = │ │ │ │ -76 { │ │ │ │ -77 static_cast<_s_t_d_:_:_t_i_m_e___t>(_____s.count()), │ │ │ │ -78 static_cast(_____n_s.count()) │ │ │ │ -79 }; │ │ │ │ -80 while (::nanosleep(&_____t_s, &_____t_s) == -1 && errno == _E_I_N_T_R) │ │ │ │ -81 { } │ │ │ │ -82#else │ │ │ │ -83 _____s_l_e_e_p___f_o_r(_____s, _____n_s); │ │ │ │ -84#endif │ │ │ │ -85 } │ │ │ │ -86 │ │ │ │ -87 /// this_thread::sleep_until │ │ │ │ -88 template │ │ │ │ -89 inline void │ │ │ │ -_9_0 _s_l_e_e_p___u_n_t_i_l(const _c_h_r_o_n_o_:_:_t_i_m_e___p_o_i_n_t_<___C_l_o_c_k_,_ ___D_u_r_a_t_i_o_n_>& _____a_t_i_m_e) │ │ │ │ -91 { │ │ │ │ -92#if __cplusplus > 201703L │ │ │ │ -93 static_assert(chrono::is_clock_v<_Clock>); │ │ │ │ -94#endif │ │ │ │ -95 auto _____n_o_w = _Clock::now(); │ │ │ │ -96 if (_Clock::is_steady) │ │ │ │ -97 { │ │ │ │ -98 if (_____n_o_w < _____a_t_i_m_e) │ │ │ │ -99 _s_l_e_e_p___f_o_r(_____a_t_i_m_e - _____n_o_w); │ │ │ │ -100 return; │ │ │ │ -101 } │ │ │ │ -102 while (_____n_o_w < _____a_t_i_m_e) │ │ │ │ -103 { │ │ │ │ -104 _s_l_e_e_p___f_o_r(_____a_t_i_m_e - _____n_o_w); │ │ │ │ -105 _____n_o_w = _Clock::now(); │ │ │ │ -106 } │ │ │ │ -107 } │ │ │ │ -108#endif // ! NO_SLEEP │ │ │ │ -109 } // namespace this_thread │ │ │ │ -110 │ │ │ │ -111 /// @} │ │ │ │ +30// shared_ptr.hpp │ │ │ │ +31// Copyright (C) 1998, 1999 Greg Colvin and Beman Dawes. │ │ │ │ +32// Copyright (C) 2001, 2002, 2003 Peter Dimov │ │ │ │ +33 │ │ │ │ +34// weak_ptr.hpp │ │ │ │ +35// Copyright (C) 2001, 2002, 2003 Peter Dimov │ │ │ │ +36 │ │ │ │ +37// enable_shared_from_this.hpp │ │ │ │ +38// Copyright (C) 2002 Peter Dimov │ │ │ │ +39 │ │ │ │ +40// Distributed under the Boost Software License, Version 1.0. (See │ │ │ │ +41// accompanying file LICENSE_1_0.txt or copy at │ │ │ │ +42// http://www.boost.org/LICENSE_1_0.txt) │ │ │ │ +43 │ │ │ │ +44/** @file bits/shared_ptr_base.h │ │ │ │ +45 * This is an internal header file, included by other library headers. │ │ │ │ +46 * Do not attempt to use it directly. @headername{memory} │ │ │ │ +47 */ │ │ │ │ +48 │ │ │ │ +49#ifndef _SHARED_PTR_BASE_H │ │ │ │ +50#define _SHARED_PTR_BASE_H 1 │ │ │ │ +51 │ │ │ │ +52#include <_t_y_p_e_i_n_f_o> │ │ │ │ +53#include <_b_i_t_s_/_a_l_l_o_c_a_t_e_d___p_t_r_._h> │ │ │ │ +54#include <_b_i_t_s_/_a_l_l_o_c_a_t_o_r_._h> │ │ │ │ +55#include <_b_i_t_s_/_e_x_c_e_p_t_i_o_n___d_e_f_i_n_e_s_._h> │ │ │ │ +56#include <_b_i_t_s_/_f_u_n_c_t_i_o_n_a_l___h_a_s_h_._h> │ │ │ │ +57#include <_b_i_t_s_/_r_e_f_w_r_a_p_._h> │ │ │ │ +58#include <_b_i_t_s_/_s_t_l___f_u_n_c_t_i_o_n_._h> // std::less │ │ │ │ +59#include <_b_i_t_s_/_u_n_i_q_u_e___p_t_r_._h> │ │ │ │ +60#include <_e_x_t_/_a_l_i_g_n_e_d___b_u_f_f_e_r_._h> │ │ │ │ +61#include <_e_x_t_/_a_t_o_m_i_c_i_t_y_._h> │ │ │ │ +62#include <_e_x_t_/_c_o_n_c_u_r_r_e_n_c_e_._h> │ │ │ │ +63#if __cplusplus >= 202002L │ │ │ │ +64# include <_b_i_t> // __bit_floor │ │ │ │ +65# include <_c_o_m_p_a_r_e> │ │ │ │ +66# include <_b_i_t_s_/_a_l_i_g_n_._h> // std::align │ │ │ │ +67# include <_b_i_t_s_/_s_t_l___u_n_i_n_i_t_i_a_l_i_z_e_d_._h> │ │ │ │ +68#endif │ │ │ │ +69 │ │ │ │ +70namespace _s_t_d _GLIBCXX_VISIBILITY(default) │ │ │ │ +71{ │ │ │ │ +72_GLIBCXX_BEGIN_NAMESPACE_VERSION │ │ │ │ +73 │ │ │ │ +74#if _GLIBCXX_USE_DEPRECATED │ │ │ │ +75#pragma GCC diagnostic push │ │ │ │ +76#pragma GCC diagnostic ignored "-Wdeprecated-declarations" │ │ │ │ +77 template class auto_ptr; │ │ │ │ +78#pragma GCC diagnostic pop │ │ │ │ +79#endif │ │ │ │ +80 │ │ │ │ +81 /** │ │ │ │ +82 * @brief Exception possibly thrown by @c shared_ptr. │ │ │ │ +83 * @ingroup exceptions │ │ │ │ +84 */ │ │ │ │ +_8_5 class _b_a_d___w_e_a_k___p_t_r : public _s_t_d_:_:_e_x_c_e_p_t_i_o_n │ │ │ │ +86 { │ │ │ │ +87 public: │ │ │ │ +_8_8 virtual char const* _w_h_a_t() const noexcept; │ │ │ │ +89 │ │ │ │ +90 _v_i_r_t_u_a_l ~_b_a_d___w_e_a_k___p_t_r() noexcept; │ │ │ │ +91 }; │ │ │ │ +92 │ │ │ │ +93 // Substitute for bad_weak_ptr object in the case of -fno-exceptions. │ │ │ │ +94 _i_n_l_i_n_e void │ │ │ │ +95 __throw_bad_weak_ptr() │ │ │ │ +96 { _GLIBCXX_THROW_OR_ABORT(_b_a_d___w_e_a_k___p_t_r()); } │ │ │ │ +97 │ │ │ │ +98 using __gnu_cxx::_Lock_policy; │ │ │ │ +99 using __gnu_cxx::__default_lock_policy; │ │ │ │ +100 using __gnu_cxx::_S_single; │ │ │ │ +101 using __gnu_cxx::_S_mutex; │ │ │ │ +102 using __gnu_cxx::_S_atomic; │ │ │ │ +103 │ │ │ │ +104 // Empty helper class except when the template argument is _S_mutex. │ │ │ │ +105 template<_Lock_policy _Lp> │ │ │ │ +106 class _Mutex_base │ │ │ │ +107 { │ │ │ │ +108 protected: │ │ │ │ +109 // The atomic policy uses fully-fenced builtins, single doesn't care. │ │ │ │ +110 enum { _S_need_barriers = 0 }; │ │ │ │ +111 }; │ │ │ │ 112 │ │ │ │ -113_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ -114} // namespace │ │ │ │ -115#endif // C++11 │ │ │ │ -116 │ │ │ │ -117#endif // _GLIBCXX_THIS_THREAD_SLEEP_H │ │ │ │ -_c_e_r_r_n_o │ │ │ │ -_c_h_r_o_n_o_._h │ │ │ │ -_s_t_d_:_:_c_h_r_o_n_o_:_:_s_e_c_o_n_d_s │ │ │ │ -duration< int64_t > seconds │ │ │ │ -seconds │ │ │ │ -DDeeffiinniittiioonn _c_h_r_o_n_o_._h_:_8_7_5 │ │ │ │ -_s_t_d_:_:_c_h_r_o_n_o_:_:_n_a_n_o_s_e_c_o_n_d_s │ │ │ │ -duration< int64_t, nano > nanoseconds │ │ │ │ -nanoseconds │ │ │ │ -DDeeffiinniittiioonn _c_h_r_o_n_o_._h_:_8_6_6 │ │ │ │ +113 template<> │ │ │ │ +114 class _Mutex_base<_S_mutex> │ │ │ │ +115 : public __gnu_cxx::__mutex │ │ │ │ +116 { │ │ │ │ +117 protected: │ │ │ │ +118 // This policy is used when atomic builtins are not available. │ │ │ │ +119 // The replacement atomic operations might not have the necessary │ │ │ │ +120 // memory barriers. │ │ │ │ +121 enum { _S_need_barriers = 1 }; │ │ │ │ +122 }; │ │ │ │ +123 │ │ │ │ +124 template<_Lock_policy _Lp = __default_lock_policy> │ │ │ │ +125 class _Sp_counted_base │ │ │ │ +126 : public _Mutex_base<_Lp> │ │ │ │ +127 { │ │ │ │ +128 public: │ │ │ │ +129 _Sp_counted_base() noexcept │ │ │ │ +130 : _M_use_count(1), _M_weak_count(1) { } │ │ │ │ +131 │ │ │ │ +132 virtual │ │ │ │ +133 ~_Sp_counted_base() noexcept │ │ │ │ +134 { } │ │ │ │ +135 │ │ │ │ +136 // Called when _M_use_count drops to zero, to release the resources │ │ │ │ +137 // managed by *this. │ │ │ │ +138 virtual void │ │ │ │ +139 _M_dispose() noexcept = 0; │ │ │ │ +140 │ │ │ │ +141 // Called when _M_weak_count drops to zero. │ │ │ │ +142 virtual void │ │ │ │ +143 _M_destroy() noexcept │ │ │ │ +144 { delete this; } │ │ │ │ +145 │ │ │ │ +146 virtual void* │ │ │ │ +147 _M_get_deleter(const _s_t_d_:_:_t_y_p_e___i_n_f_o&) noexcept = 0; │ │ │ │ +148 │ │ │ │ +149 // Increment the use count (used when the count is greater than zero). │ │ │ │ +150 void │ │ │ │ +151 _M_add_ref_copy() │ │ │ │ +152 { __gnu_cxx::__atomic_add_dispatch(&_M_use_count, 1); } │ │ │ │ +153 │ │ │ │ +154 // Increment the use count if it is non-zero, throw otherwise. │ │ │ │ +155 void │ │ │ │ +156 _M_add_ref_lock() │ │ │ │ +157 { │ │ │ │ +158 if (!_M_add_ref_lock_nothrow()) │ │ │ │ +159 __throw_bad_weak_ptr(); │ │ │ │ +160 } │ │ │ │ +161 │ │ │ │ +162 // Increment the use count if it is non-zero. │ │ │ │ +163 bool │ │ │ │ +164 _M_add_ref_lock_nothrow() noexcept; │ │ │ │ +165 │ │ │ │ +166 // Decrement the use count. │ │ │ │ +167 void │ │ │ │ +168 _M_release() noexcept; │ │ │ │ +169 │ │ │ │ +170 // Called by _M_release() when the use count reaches zero. │ │ │ │ +171 void │ │ │ │ +172 _M_release_last_use() noexcept │ │ │ │ +173 { │ │ │ │ +174 _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER(&_M_use_count); │ │ │ │ +175 _M_dispose(); │ │ │ │ +176 // There must be a memory barrier between dispose() and destroy() │ │ │ │ +177 // to ensure that the effects of dispose() are observed in the │ │ │ │ +178 // thread that runs destroy(). │ │ │ │ +179 // See http://gcc.gnu.org/ml/libstdc++/2005-11/msg00136.html │ │ │ │ +180 if (_Mutex_base<_Lp>::_S_need_barriers) │ │ │ │ +181 { │ │ │ │ +182 __atomic_thread_fence (__ATOMIC_ACQ_REL); │ │ │ │ +183 } │ │ │ │ +184 │ │ │ │ +185 // Be race-detector-friendly. For more info see bits/c++config. │ │ │ │ +186 _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE(&_M_weak_count); │ │ │ │ +187 if (__gnu_cxx::__exchange_and_add_dispatch(&_M_weak_count, │ │ │ │ +188 -1) == 1) │ │ │ │ +189 { │ │ │ │ +190 _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER(&_M_weak_count); │ │ │ │ +191 _M_destroy(); │ │ │ │ +192 } │ │ │ │ +193 } │ │ │ │ +194 │ │ │ │ +195 // As above, but 'noinline' to reduce code size on the cold path. │ │ │ │ +196 __attribute__((__noinline__)) │ │ │ │ +197 void │ │ │ │ +198 _M_release_last_use_cold() noexcept │ │ │ │ +199 { _M_release_last_use(); } │ │ │ │ +200 │ │ │ │ +201 // Increment the weak count. │ │ │ │ +202 void │ │ │ │ +203 _M_weak_add_ref() noexcept │ │ │ │ +204 { __gnu_cxx::__atomic_add_dispatch(&_M_weak_count, 1); } │ │ │ │ +205 │ │ │ │ +206 // Decrement the weak count. │ │ │ │ +207 void │ │ │ │ +208 _M_weak_release() noexcept │ │ │ │ +209 { │ │ │ │ +210 // Be race-detector-friendly. For more info see bits/c++config. │ │ │ │ +211 _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE(&_M_weak_count); │ │ │ │ +212 if (__gnu_cxx::__exchange_and_add_dispatch(&_M_weak_count, -1) == 1) │ │ │ │ +213 { │ │ │ │ +214 _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER(&_M_weak_count); │ │ │ │ +215 if (_Mutex_base<_Lp>::_S_need_barriers) │ │ │ │ +216 { │ │ │ │ +217 // See _M_release(), │ │ │ │ +218 // destroy() must observe results of dispose() │ │ │ │ +219 __atomic_thread_fence (__ATOMIC_ACQ_REL); │ │ │ │ +220 } │ │ │ │ +221 _M_destroy(); │ │ │ │ +222 } │ │ │ │ +223 } │ │ │ │ +224 │ │ │ │ +225 long │ │ │ │ +226 _M_get_use_count() const noexcept │ │ │ │ +227 { │ │ │ │ +228 // No memory barrier is used here so there is no synchronization │ │ │ │ +229 // with other threads. │ │ │ │ +230 return __atomic_load_n(&_M_use_count, __ATOMIC_RELAXED); │ │ │ │ +231 } │ │ │ │ +232 │ │ │ │ +233 private: │ │ │ │ +234 _Sp_counted_base(_Sp_counted_base const&) = delete; │ │ │ │ +235 _Sp_counted_base& operator=(_Sp_counted_base const&) = delete; │ │ │ │ +236 │ │ │ │ +237 _Atomic_word _M_use_count; // #shared │ │ │ │ +238 _Atomic_word _M_weak_count; // #weak + (#shared != 0) │ │ │ │ +239 }; │ │ │ │ +240 │ │ │ │ +241 template<> │ │ │ │ +242 inline bool │ │ │ │ +243 _Sp_counted_base<_S_single>:: │ │ │ │ +244 _M_add_ref_lock_nothrow() noexcept │ │ │ │ +245 { │ │ │ │ +246 if (_M_use_count == 0) │ │ │ │ +247 return false; │ │ │ │ +248 ++_M_use_count; │ │ │ │ +249 return true; │ │ │ │ +250 } │ │ │ │ +251 │ │ │ │ +252 template<> │ │ │ │ +253 inline bool │ │ │ │ +254 _Sp_counted_base<_S_mutex>:: │ │ │ │ +255 _M_add_ref_lock_nothrow() noexcept │ │ │ │ +256 { │ │ │ │ +257 _____g_n_u___c_x_x_:_:_____s_c_o_p_e_d___l_o_c_k sentry(*this); │ │ │ │ +258 if (__gnu_cxx::__exchange_and_add_dispatch(&_M_use_count, 1) == 0) │ │ │ │ +259 { │ │ │ │ +260 _M_use_count = 0; │ │ │ │ +261 return false; │ │ │ │ +262 } │ │ │ │ +263 return true; │ │ │ │ +264 } │ │ │ │ +265 │ │ │ │ +266 template<> │ │ │ │ +267 inline bool │ │ │ │ +268 _Sp_counted_base<_S_atomic>:: │ │ │ │ +269 _M_add_ref_lock_nothrow() noexcept │ │ │ │ +270 { │ │ │ │ +271 // Perform lock-free add-if-not-zero operation. │ │ │ │ +272 _Atomic_word __count = _M_get_use_count(); │ │ │ │ +273 do │ │ │ │ +274 { │ │ │ │ +275 if (__count == 0) │ │ │ │ +276 return false; │ │ │ │ +277 // Replace the current counter value with the old value + 1, as │ │ │ │ +278 // long as it's not changed meanwhile. │ │ │ │ +279 } │ │ │ │ +280 while (!__atomic_compare_exchange_n(&_M_use_count, &__count, __count + 1, │ │ │ │ +281 true, __ATOMIC_ACQ_REL, │ │ │ │ +282 __ATOMIC_RELAXED)); │ │ │ │ +283 return true; │ │ │ │ +284 } │ │ │ │ +285 │ │ │ │ +286 template<> │ │ │ │ +287 inline void │ │ │ │ +288 _Sp_counted_base<_S_single>::_M_add_ref_copy() │ │ │ │ +289 { ++_M_use_count; } │ │ │ │ +290 │ │ │ │ +291 template<> │ │ │ │ +292 inline void │ │ │ │ +293 _Sp_counted_base<_S_single>::_M_release() noexcept │ │ │ │ +294 { │ │ │ │ +295 if (--_M_use_count == 0) │ │ │ │ +296 { │ │ │ │ +297 _M_dispose(); │ │ │ │ +298 if (--_M_weak_count == 0) │ │ │ │ +299 _M_destroy(); │ │ │ │ +300 } │ │ │ │ +301 } │ │ │ │ +302 │ │ │ │ +303 template<> │ │ │ │ +304 inline void │ │ │ │ +305 _Sp_counted_base<_S_mutex>::_M_release() noexcept │ │ │ │ +306 { │ │ │ │ +307 // Be race-detector-friendly. For more info see bits/c++config. │ │ │ │ +308 _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE(&_M_use_count); │ │ │ │ +309 if (__gnu_cxx::__exchange_and_add_dispatch(&_M_use_count, -1) == 1) │ │ │ │ +310 { │ │ │ │ +311 _M_release_last_use(); │ │ │ │ +312 } │ │ │ │ +313 } │ │ │ │ +314 │ │ │ │ +315 template<> │ │ │ │ +316 inline void │ │ │ │ +317 _Sp_counted_base<_S_atomic>::_M_release() noexcept │ │ │ │ +318 { │ │ │ │ +319 _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE(&_M_use_count); │ │ │ │ +320#if ! _GLIBCXX_TSAN │ │ │ │ +321 constexpr bool __lock_free │ │ │ │ +322 = __atomic_always_lock_free(sizeof(long long), 0) │ │ │ │ +323 && __atomic_always_lock_free(sizeof(_Atomic_word), 0); │ │ │ │ +324 constexpr bool __double_word │ │ │ │ +325 = sizeof(long long) == 2 * sizeof(_Atomic_word); │ │ │ │ +326 // The ref-count members follow the vptr, so are aligned to │ │ │ │ +327 // alignof(void*). │ │ │ │ +328 constexpr bool __aligned = __alignof(long long) <= alignof(void*); │ │ │ │ +329 if _GLIBCXX17_CONSTEXPR (__lock_free && __double_word && __aligned) │ │ │ │ +330 { │ │ │ │ +331 constexpr int __wordbits = __CHAR_BIT__ * sizeof(_Atomic_word); │ │ │ │ +332 constexpr int __shiftbits = __double_word ? __wordbits : 0; │ │ │ │ +333 constexpr long long __unique_ref = 1LL + (1LL << __shiftbits); │ │ │ │ +334 auto __both_counts = reinterpret_cast(&_M_use_count); │ │ │ │ +335 │ │ │ │ +336 _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE(&_M_weak_count); │ │ │ │ +337 if (__atomic_load_n(__both_counts, __ATOMIC_ACQUIRE) == __unique_ref) │ │ │ │ +338 { │ │ │ │ +339 // Both counts are 1, so there are no weak references and │ │ │ │ +340 // we are releasing the last strong reference. No other │ │ │ │ +341 // threads can observe the effects of this _M_release() │ │ │ │ +342 // call (e.g. calling use_count()) without a data race. │ │ │ │ +343 _M_weak_count = _M_use_count = 0; │ │ │ │ +344 _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER(&_M_use_count); │ │ │ │ +345 _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER(&_M_weak_count); │ │ │ │ +346 _M_dispose(); │ │ │ │ +347 _M_destroy(); │ │ │ │ +348 return; │ │ │ │ +349 } │ │ │ │ +350 if (__gnu_cxx::__exchange_and_add_dispatch(&_M_use_count, -1) == 1) │ │ │ │ +351 [[__unlikely__]] │ │ │ │ +352 { │ │ │ │ +353 _M_release_last_use_cold(); │ │ │ │ +354 return; │ │ │ │ +355 } │ │ │ │ +356 } │ │ │ │ +357 else │ │ │ │ +358#endif │ │ │ │ +359 if (__gnu_cxx::__exchange_and_add_dispatch(&_M_use_count, -1) == 1) │ │ │ │ +360 { │ │ │ │ +361 _M_release_last_use(); │ │ │ │ +362 } │ │ │ │ +363 } │ │ │ │ +364 │ │ │ │ +365 template<> │ │ │ │ +366 inline void │ │ │ │ +367 _Sp_counted_base<_S_single>::_M_weak_add_ref() noexcept │ │ │ │ +368 { ++_M_weak_count; } │ │ │ │ +369 │ │ │ │ +370 template<> │ │ │ │ +371 inline void │ │ │ │ +372 _Sp_counted_base<_S_single>::_M_weak_release() noexcept │ │ │ │ +373 { │ │ │ │ +374 if (--_M_weak_count == 0) │ │ │ │ +375 _M_destroy(); │ │ │ │ +376 } │ │ │ │ +377 │ │ │ │ +378 template<> │ │ │ │ +379 inline long │ │ │ │ +380 _Sp_counted_base<_S_single>::_M_get_use_count() const noexcept │ │ │ │ +381 { return _M_use_count; } │ │ │ │ +382 │ │ │ │ +383 │ │ │ │ +384 // Forward declarations. │ │ │ │ +385 template │ │ │ │ +386 class __shared_ptr; │ │ │ │ +387 │ │ │ │ +388 template │ │ │ │ +389 class __weak_ptr; │ │ │ │ +390 │ │ │ │ +391 template │ │ │ │ +392 class __enable_shared_from_this; │ │ │ │ +393 │ │ │ │ +394 template │ │ │ │ +395 class shared_ptr; │ │ │ │ +396 │ │ │ │ +397 template │ │ │ │ +398 class weak_ptr; │ │ │ │ +399 │ │ │ │ +400 template │ │ │ │ +401 struct owner_less; │ │ │ │ +402 │ │ │ │ +403 template │ │ │ │ +404 class enable_shared_from_this; │ │ │ │ +405 │ │ │ │ +406 template<_Lock_policy _Lp = __default_lock_policy> │ │ │ │ +407 class __weak_count; │ │ │ │ +408 │ │ │ │ +409 template<_Lock_policy _Lp = __default_lock_policy> │ │ │ │ +410 class __shared_count; │ │ │ │ +411 │ │ │ │ +412#if __cplusplus >= 202002L │ │ │ │ +413 template │ │ │ │ +414 class _Sp_atomic; │ │ │ │ +415#endif │ │ │ │ +416 │ │ │ │ +417 // Counted ptr with no deleter or allocator support │ │ │ │ +418 template │ │ │ │ +419 class _Sp_counted_ptr final : public _Sp_counted_base<_Lp> │ │ │ │ +420 { │ │ │ │ +421 public: │ │ │ │ +422 explicit │ │ │ │ +423 _Sp_counted_ptr(_Ptr __p) noexcept │ │ │ │ +424 : _M_ptr(__p) { } │ │ │ │ +425 │ │ │ │ +426 virtual void │ │ │ │ +427 _M_dispose() noexcept │ │ │ │ +428 { delete _M_ptr; } │ │ │ │ +429 │ │ │ │ +430 virtual void │ │ │ │ +431 _M_destroy() noexcept │ │ │ │ +432 { delete this; } │ │ │ │ +433 │ │ │ │ +434 virtual void* │ │ │ │ +435 _M_get_deleter(const _s_t_d_:_:_t_y_p_e___i_n_f_o&) noexcept │ │ │ │ +436 { return nullptr; } │ │ │ │ +437 │ │ │ │ +438 _Sp_counted_ptr(const _Sp_counted_ptr&) = delete; │ │ │ │ +439 _Sp_counted_ptr& operator=(const _Sp_counted_ptr&) = delete; │ │ │ │ +440 │ │ │ │ +441 private: │ │ │ │ +442 _Ptr _M_ptr; │ │ │ │ +443 }; │ │ │ │ +444 │ │ │ │ +445 template<> │ │ │ │ +446 inline void │ │ │ │ +447 _Sp_counted_ptr::_M_dispose() noexcept { } │ │ │ │ +448 │ │ │ │ +449 template<> │ │ │ │ +450 inline void │ │ │ │ +451 _Sp_counted_ptr::_M_dispose() noexcept { } │ │ │ │ +452 │ │ │ │ +453 template<> │ │ │ │ +454 inline void │ │ │ │ +455 _Sp_counted_ptr::_M_dispose() noexcept { } │ │ │ │ +456 │ │ │ │ +457 // FIXME: once __has_cpp_attribute(__no_unique_address__)) is true for │ │ │ │ +458 // all supported compilers we can greatly simplify _Sp_ebo_helper. │ │ │ │ +459 // N.B. unconditionally applying the attribute could change layout for │ │ │ │ +460 // final types, which currently cannot use EBO so have a unique address. │ │ │ │ +461 │ │ │ │ +462 template │ │ │ │ +464 struct _Sp_ebo_helper; │ │ │ │ +465 │ │ │ │ +466 /// Specialization using EBO. │ │ │ │ +467 template │ │ │ │ +_4_6_8 struct _Sp_ebo_helper<___N_m, _Tp, _t_r_u_e> : private _Tp │ │ │ │ +469 { │ │ │ │ +470 explicit _Sp_ebo_helper(const _Tp& _____t_p) : _Tp(_____t_p) { } │ │ │ │ +471 explicit _Sp_ebo_helper(_Tp&& _____t_p) : _Tp(_s_t_d_:_:_m_o_v_e(_____t_p)) { } │ │ │ │ +472 │ │ │ │ +473 static _Tp& │ │ │ │ +474 _S_get(_Sp_ebo_helper& _____e_b_o_h) { return static_cast<_Tp&>(_____e_b_o_h); } │ │ │ │ +475 }; │ │ │ │ +476 │ │ │ │ +477 /// Specialization not using EBO. │ │ │ │ +478 template │ │ │ │ +_4_7_9 struct _Sp_ebo_helper<___N_m, _Tp, _f_a_l_s_e> │ │ │ │ +480 { │ │ │ │ +481 explicit _Sp_ebo_helper(const _Tp& _____t_p) : _M_tp(_____t_p) { } │ │ │ │ +482 explicit _Sp_ebo_helper(_Tp&& _____t_p) : _M_tp(_s_t_d_:_:_m_o_v_e(_____t_p)) { } │ │ │ │ +483 │ │ │ │ +484 static _Tp& │ │ │ │ +485 _S_get(_Sp_ebo_helper& _____e_b_o_h) │ │ │ │ +486 { return _____e_b_o_h._M_tp; } │ │ │ │ +487 │ │ │ │ +488 private: │ │ │ │ +489 _Tp _M_tp; │ │ │ │ +490 }; │ │ │ │ +491 │ │ │ │ +492 // Support for custom deleter and/or allocator │ │ │ │ +493 template │ │ │ │ +494 class _Sp_counted_deleter _f_i_n_a_l : public _Sp_counted_base<_Lp> │ │ │ │ +495 { │ │ │ │ +496 class _Impl : _Sp_ebo_helper<0, _Deleter>, _Sp_ebo_helper<1, _Alloc> │ │ │ │ +497 { │ │ │ │ +498 typedef ___S_p___e_b_o___h_e_l_p_e_r_<_0_,_ ___D_e_l_e_t_e_r_> _Del_base; │ │ │ │ +499 typedef ___S_p___e_b_o___h_e_l_p_e_r_<_1_,_ ___A_l_l_o_c_> _Alloc_base; │ │ │ │ +500 │ │ │ │ +501 public: │ │ │ │ +502 _Impl(_Ptr __p, ___D_e_l_e_t_e_r __d, const _Alloc& __a) noexcept │ │ │ │ +503 : _Del_base(_s_t_d_:_:_m_o_v_e(__d)), _Alloc_base(__a), _M_ptr(__p) │ │ │ │ +504 { } │ │ │ │ +505 │ │ │ │ +506 _Deleter& _M_del() noexcept { return _Del_base::_S_get(*this); } │ │ │ │ +507 _Alloc& _M_alloc() noexcept { return _Alloc_base::_S_get(*this); } │ │ │ │ +508 │ │ │ │ +509 _Ptr _M_ptr; │ │ │ │ +510 }; │ │ │ │ +511 │ │ │ │ +512 public: │ │ │ │ +513 using __allocator_type = __alloc_rebind<_Alloc, _Sp_counted_deleter>; │ │ │ │ +514 │ │ │ │ +515 // __d(__p) must not throw. │ │ │ │ +516 _Sp_counted_deleter(_Ptr __p, _Deleter __d) noexcept │ │ │ │ +517 : _M_impl(__p, _s_t_d_:_:_m_o_v_e(__d), _Alloc()) { } │ │ │ │ +518 │ │ │ │ +519 // __d(__p) must not throw. │ │ │ │ +520 _Sp_counted_deleter(_Ptr __p, _Deleter __d, const _Alloc& __a) noexcept │ │ │ │ +521 : _M_impl(__p, _s_t_d_:_:_m_o_v_e(__d), __a) { } │ │ │ │ +522 │ │ │ │ +523 ~_Sp_counted_deleter() noexcept { } │ │ │ │ +524 │ │ │ │ +525 virtual void │ │ │ │ +526 _M_dispose() noexcept │ │ │ │ +527 { _M_impl._M_del()(_M_impl._M_ptr); } │ │ │ │ +528 │ │ │ │ +529 virtual void │ │ │ │ +530 _M_destroy() noexcept │ │ │ │ +531 { │ │ │ │ +532 __allocator_type __a(_M_impl._M_alloc()); │ │ │ │ +533 __allocated_ptr<__allocator_type> __guard_ptr{ __a, this }; │ │ │ │ +534 this->~_Sp_counted_deleter(); │ │ │ │ +535 } │ │ │ │ +536 │ │ │ │ +537 virtual void* │ │ │ │ +538 _M_get_deleter(const type_info& __ti [[__gnu__::__unused__]]) noexcept │ │ │ │ +539 { │ │ │ │ +540#if __cpp_rtti │ │ │ │ +541 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ +542 // 2400. shared_ptr's get_deleter() should use addressof() │ │ │ │ +543 return __ti == typeid(_Deleter) │ │ │ │ +544 ? _s_t_d_:_:_____a_d_d_r_e_s_s_o_f(_M_impl._M_del()) │ │ │ │ +545 : nullptr; │ │ │ │ +546#else │ │ │ │ +547 return nullptr; │ │ │ │ +548#endif │ │ │ │ +549 } │ │ │ │ +550 │ │ │ │ +551 private: │ │ │ │ +552 _Impl _M_impl; │ │ │ │ +553 }; │ │ │ │ +554 │ │ │ │ +555 // helpers for make_shared / allocate_shared │ │ │ │ +556 │ │ │ │ +557 struct _Sp_make_shared_tag │ │ │ │ +558 { │ │ │ │ +559 private: │ │ │ │ +560 template │ │ │ │ +561 friend class _Sp_counted_ptr_inplace; │ │ │ │ +562 │ │ │ │ +563 static const type_info& │ │ │ │ +564 _S_ti() noexcept _GLIBCXX_VISIBILITY(default) │ │ │ │ +565 { │ │ │ │ +566 alignas(type_info) static constexpr char __tag[sizeof(type_info)] = { }; │ │ │ │ +567 return reinterpret_cast(__tag); │ │ │ │ +568 } │ │ │ │ +569 │ │ │ │ +570 static bool _S_eq(const type_info&) noexcept; │ │ │ │ +571 }; │ │ │ │ +572 │ │ │ │ +573 template │ │ │ │ +574 struct _Sp_alloc_shared_tag │ │ │ │ +575 { │ │ │ │ +576 const _Alloc& _M_a; │ │ │ │ +577 }; │ │ │ │ +578 │ │ │ │ +579 template │ │ │ │ +580 class _Sp_counted_ptr_inplace final : public _Sp_counted_base<_Lp> │ │ │ │ +581 { │ │ │ │ +582 class _Impl : _Sp_ebo_helper<0, _Alloc> │ │ │ │ +583 { │ │ │ │ +584 typedef _Sp_ebo_helper<0, _Alloc> _A_base; │ │ │ │ +585 │ │ │ │ +586 public: │ │ │ │ +587 explicit _Impl(_Alloc __a) noexcept : _A_base(__a) { } │ │ │ │ +588 │ │ │ │ +589 _Alloc& _M_alloc() noexcept { return _A_base::_S_get(*this); } │ │ │ │ +590 │ │ │ │ +591 __gnu_cxx::__aligned_buffer<_Tp> _M_storage; │ │ │ │ +592 }; │ │ │ │ +593 │ │ │ │ +594 public: │ │ │ │ +595 using __allocator_type = __alloc_rebind<_Alloc, _Sp_counted_ptr_inplace>; │ │ │ │ +596 │ │ │ │ +597 // Alloc parameter is not a reference so doesn't alias anything in __args │ │ │ │ +598 template │ │ │ │ +599 _Sp_counted_ptr_inplace(_Alloc __a, _Args&&... __args) │ │ │ │ +600 : _M_impl(__a) │ │ │ │ +601 { │ │ │ │ +602 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ +603 // 2070. allocate_shared should use allocator_traits::construct │ │ │ │ +604 allocator_traits<_Alloc>::construct(__a, _M_ptr(), │ │ │ │ +605 _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(__args)...); // might throw │ │ │ │ +606 } │ │ │ │ +607 │ │ │ │ +608 ~_Sp_counted_ptr_inplace() noexcept { } │ │ │ │ +609 │ │ │ │ +610 virtual void │ │ │ │ +611 _M_dispose() noexcept │ │ │ │ +612 { │ │ │ │ +613 allocator_traits<_Alloc>::destroy(_M_impl._M_alloc(), _M_ptr()); │ │ │ │ +614 } │ │ │ │ +615 │ │ │ │ +616 // Override because the allocator needs to know the dynamic type │ │ │ │ +617 virtual void │ │ │ │ +618 _M_destroy() noexcept │ │ │ │ +619 { │ │ │ │ +620 __allocator_type __a(_M_impl._M_alloc()); │ │ │ │ +621 __allocated_ptr<__allocator_type> __guard_ptr{ __a, this }; │ │ │ │ +622 this->~_Sp_counted_ptr_inplace(); │ │ │ │ +623 } │ │ │ │ +624 │ │ │ │ +625 private: │ │ │ │ +626 friend class __shared_count<_Lp>; // To be able to call _M_ptr(). │ │ │ │ +627 │ │ │ │ +628 // No longer used, but code compiled against old libstdc++ headers │ │ │ │ +629 // might still call it from __shared_ptr ctor to get the pointer out. │ │ │ │ +630 virtual void* │ │ │ │ +631 _M_get_deleter(const _s_t_d_:_:_t_y_p_e___i_n_f_o& __ti) noexcept override │ │ │ │ +632 { │ │ │ │ +633 auto __ptr = const_cast::type*>(_M_ptr()); │ │ │ │ +634 // Check for the fake type_info first, so we don't try to access it │ │ │ │ +635 // as a real type_info object. Otherwise, check if it's the real │ │ │ │ +636 // type_info for this class. With RTTI enabled we can check directly, │ │ │ │ +637 // or call a library function to do it. │ │ │ │ +638 if (&__ti == &_Sp_make_shared_tag::_S_ti() │ │ │ │ +639 || │ │ │ │ +640#if __cpp_rtti │ │ │ │ +641 __ti == typeid(_Sp_make_shared_tag) │ │ │ │ +642#else │ │ │ │ +643 _Sp_make_shared_tag::_S_eq(__ti) │ │ │ │ +644#endif │ │ │ │ +645 ) │ │ │ │ +646 return __ptr; │ │ │ │ +647 return nullptr; │ │ │ │ +648 } │ │ │ │ +649 │ │ │ │ +650 _Tp* _M_ptr() noexcept { return _M_impl._M_storage._M_ptr(); } │ │ │ │ +651 │ │ │ │ +652 _Impl _M_impl; │ │ │ │ +653 }; │ │ │ │ +654 │ │ │ │ +655#if __cplusplus >= 202002L │ │ │ │ +656# define __cpp_lib_smart_ptr_for_overwrite 202002L │ │ │ │ +657 struct _Sp_overwrite_tag { }; │ │ │ │ +658 │ │ │ │ +659 // Partial specialization used for make_shared_for_overwrite(). │ │ │ │ +660 // This partial specialization is used when the allocator's value type │ │ │ │ +661 // is the special _Sp_overwrite_tag type. │ │ │ │ +662#if __cpp_concepts │ │ │ │ +663 template │ │ │ │ +664 requires is_same_v │ │ │ │ +665 class _Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp> final │ │ │ │ +666#else │ │ │ │ +667 template class _Alloc, _Lock_policy _Lp> │ │ │ │ +668 class _Sp_counted_ptr_inplace<_Tp, _Alloc<_Sp_overwrite_tag>, _Lp> final │ │ │ │ +669#endif │ │ │ │ +670 : public _Sp_counted_base<_Lp> │ │ │ │ +671 { │ │ │ │ +672 [[no_unique_address]] _Alloc _M_alloc; │ │ │ │ +673 │ │ │ │ +674 union { │ │ │ │ +675 _Tp _M_obj; │ │ │ │ +676 char _M_unused; │ │ │ │ +677 }; │ │ │ │ +678 │ │ │ │ +679 friend class __shared_count<_Lp>; // To be able to call _M_ptr(). │ │ │ │ +680 │ │ │ │ +681 _Tp* _M_ptr() noexcept { return _s_t_d_:_:_____a_d_d_r_e_s_s_o_f(_M_obj); } │ │ │ │ +682 │ │ │ │ +683 public: │ │ │ │ +684 using __allocator_type = __alloc_rebind<_Alloc, _Sp_counted_ptr_inplace>; │ │ │ │ +685 │ │ │ │ +686 _Sp_counted_ptr_inplace(const _Alloc& __a) │ │ │ │ +687 : _M_alloc(__a) │ │ │ │ +688 { │ │ │ │ +689 ::new((void*)_M_ptr()) _Tp; // default-initialized, for overwrite. │ │ │ │ +690 } │ │ │ │ +691 │ │ │ │ +692 ~_Sp_counted_ptr_inplace() noexcept { } │ │ │ │ +693 │ │ │ │ +694 virtual void │ │ │ │ +695 _M_dispose() noexcept │ │ │ │ +696 { │ │ │ │ +697 _M_obj.~_Tp(); │ │ │ │ +698 } │ │ │ │ +699 │ │ │ │ +700 // Override because the allocator needs to know the dynamic type │ │ │ │ +701 virtual void │ │ │ │ +702 _M_destroy() noexcept │ │ │ │ +703 { │ │ │ │ +704 using pointer = typename allocator_traits<__allocator_type>::pointer; │ │ │ │ +705 __allocator_type __a(_M_alloc); │ │ │ │ +706 auto __p = pointer_traits::pointer_to(*this); │ │ │ │ +707 __allocated_ptr<__allocator_type> __guard_ptr{ __a, __p }; │ │ │ │ +708 this->~_Sp_counted_ptr_inplace(); │ │ │ │ +709 } │ │ │ │ +710 │ │ │ │ +711 void* │ │ │ │ +712 _M_get_deleter(const _s_t_d_:_:_t_y_p_e___i_n_f_o&) noexcept override │ │ │ │ +713 { return nullptr; } │ │ │ │ +714 }; │ │ │ │ +715#endif // C++20 │ │ │ │ +716 │ │ │ │ +717#if __cplusplus <= 201703L │ │ │ │ +718# define __cpp_lib_shared_ptr_arrays 201611L │ │ │ │ +719#else │ │ │ │ +720# define __cpp_lib_shared_ptr_arrays 201707L │ │ │ │ +721 │ │ │ │ +722 struct _Sp_overwrite_tag; │ │ │ │ +723 │ │ │ │ +724 // For make_shared, make_shared, allocate_shared etc. │ │ │ │ +725 template │ │ │ │ +726 struct _Sp_counted_array_base │ │ │ │ +727 { │ │ │ │ +728 [[no_unique_address]] _Alloc _M_alloc{}; │ │ │ │ +729 size_t _M_n = 0; │ │ │ │ +730 bool _M_overwrite = false; │ │ │ │ +731 │ │ │ │ +732 typename allocator_traits<_Alloc>::pointer │ │ │ │ +733 _M_alloc_array(size_t __tail) │ │ │ │ +734 { │ │ │ │ +735 return allocator_traits<_Alloc>::allocate(_M_alloc, _M_n + __tail); │ │ │ │ +736 } │ │ │ │ +737 │ │ │ │ +738 void │ │ │ │ +739 _M_dealloc_array(typename allocator_traits<_Alloc>::pointer __p, │ │ │ │ +740 size_t __tail) │ │ │ │ +741 { │ │ │ │ +742 allocator_traits<_Alloc>::deallocate(_M_alloc, __p, _M_n + __tail); │ │ │ │ +743 } │ │ │ │ +744 │ │ │ │ +745 // Init the array elements │ │ │ │ +746 template │ │ │ │ +747 void │ │ │ │ +748 _M_init(typename allocator_traits<_Alloc>::value_type* __p, │ │ │ │ +749 _Init __init) │ │ │ │ +750 { │ │ │ │ +751 using _Tp = remove_pointer_t<_Init>; │ │ │ │ +752 using _Up = typename allocator_traits<_Alloc>::value_type; │ │ │ │ +753 │ │ │ │ +754 if constexpr (is_same_v<_Init, _Sp_overwrite_tag>) │ │ │ │ +755 { │ │ │ │ +756 _s_t_d_:_:_u_n_i_n_i_t_i_a_l_i_z_e_d___d_e_f_a_u_l_t___c_o_n_s_t_r_u_c_t___n(__p, _M_n); │ │ │ │ +757 _M_overwrite = true; │ │ │ │ +758 } │ │ │ │ +759 else if (__init == nullptr) │ │ │ │ +760 _s_t_d_:_:_____u_n_i_n_i_t_i_a_l_i_z_e_d___d_e_f_a_u_l_t___n___a(__p, _M_n, _M_alloc); │ │ │ │ +761 else if constexpr (!is_array_v<_Tp>) │ │ │ │ +762 _s_t_d_:_:_____u_n_i_n_i_t_i_a_l_i_z_e_d___f_i_l_l___n___a(__p, _M_n, *__init, _M_alloc); │ │ │ │ +763 else │ │ │ │ +764 { │ │ │ │ +765#pragma GCC diagnostic push │ │ │ │ +766#pragma GCC diagnostic ignored "-Wunused-local-typedefs" │ │ │ │ +767 struct _Iter │ │ │ │ +768 { │ │ │ │ +769 using value_type = _Up; │ │ │ │ +770 using difference_type = ptrdiff_t; │ │ │ │ +771 using pointer = const _Up*; │ │ │ │ +772 using reference = const _Up&; │ │ │ │ +773 using iterator_category = forward_iterator_tag; │ │ │ │ +774 │ │ │ │ +775 const _Up* _M_p; │ │ │ │ +776 size_t _M_len; │ │ │ │ +777 size_t _M_pos; │ │ │ │ +778 │ │ │ │ +779 _Iter& operator++() { ++_M_pos; return *this; } │ │ │ │ +780 _Iter operator++(int) { auto __i(*this); ++_M_pos; return __i; } │ │ │ │ +781 │ │ │ │ +782 reference _o_p_e_r_a_t_o_r_*() const { return _M_p[_M_pos % _M_len]; } │ │ │ │ +783 pointer operator->() const { return _M_p + (_M_pos % _M_len); } │ │ │ │ +784 │ │ │ │ +785 bool operator==(const _Iter& __i) const │ │ │ │ +786 { return _M_pos == __i._M_pos; } │ │ │ │ +787 }; │ │ │ │ +788#pragma GCC diagnostic pop │ │ │ │ +789 │ │ │ │ +790 _Iter __first{_S_first_elem(__init), sizeof(_Tp) / sizeof(_Up)}; │ │ │ │ +791 _Iter __last = __first; │ │ │ │ +792 __last._M_pos = _M_n; │ │ │ │ +793 _s_t_d_:_:_____u_n_i_n_i_t_i_a_l_i_z_e_d___c_o_p_y___a(__first, __last, __p, _M_alloc); │ │ │ │ +794 } │ │ │ │ +795 } │ │ │ │ +796 │ │ │ │ +797 protected: │ │ │ │ +798 // Destroy the array elements │ │ │ │ +799 void │ │ │ │ +800 _M_dispose_array(typename allocator_traits<_Alloc>::value_type* __p) │ │ │ │ +801 { │ │ │ │ +802 if (_M_overwrite) │ │ │ │ +803 std::destroy_n(__p, _M_n); │ │ │ │ +804 else │ │ │ │ +805 { │ │ │ │ +806 size_t __n = _M_n; │ │ │ │ +807 while (__n--) │ │ │ │ +808 allocator_traits<_Alloc>::destroy(_M_alloc, __p + __n); │ │ │ │ +809 } │ │ │ │ +810 } │ │ │ │ +811 │ │ │ │ +812 private: │ │ │ │ +813 template │ │ │ │ +814 static _Tp* │ │ │ │ +815 _S_first_elem(_Tp* __p) { return __p; } │ │ │ │ +816 │ │ │ │ +817 template │ │ │ │ +818 static auto │ │ │ │ +819 _S_first_elem(_Tp (*__p)[_Nm]) { return _S_first_elem(*__p); } │ │ │ │ +820 }; │ │ │ │ +821 │ │ │ │ +822 // Control block for make_shared, make_shared etc. that will be │ │ │ │ +823 // placed into unused memory at the end of the array. │ │ │ │ +824 template │ │ │ │ +825 class _Sp_counted_array final │ │ │ │ +826 : public _Sp_counted_base<_Lp>, _Sp_counted_array_base<_Alloc> │ │ │ │ +827 { │ │ │ │ +828 using pointer = typename allocator_traits<_Alloc>::pointer; │ │ │ │ +829 │ │ │ │ +830 pointer _M_alloc_ptr; │ │ │ │ +831 │ │ │ │ +832 auto _M_ptr() const noexcept { return _s_t_d_:_:_t_o___a_d_d_r_e_s_s(_M_alloc_ptr); } │ │ │ │ +833 │ │ │ │ +834 friend class __shared_count<_Lp>; // To be able to call _M_ptr(). │ │ │ │ +835 │ │ │ │ +836 public: │ │ │ │ +837 _Sp_counted_array(const _Sp_counted_array_base<_Alloc>& __a, │ │ │ │ +838 pointer __p) noexcept │ │ │ │ +839 : _Sp_counted_array_base<_Alloc>(__a), _M_alloc_ptr(__p) │ │ │ │ +840 { } │ │ │ │ +841 │ │ │ │ +842 ~_Sp_counted_array() = default; │ │ │ │ +843 │ │ │ │ +844 virtual void │ │ │ │ +845 _M_dispose() noexcept │ │ │ │ +846 { │ │ │ │ +847 if (this->_M_n) │ │ │ │ +848 this->_M_dispose_array(_M_ptr()); │ │ │ │ +849 } │ │ │ │ +850 │ │ │ │ +851 // Override because the allocator needs to know the dynamic type │ │ │ │ +852 virtual void │ │ │ │ +853 _M_destroy() noexcept │ │ │ │ +854 { │ │ │ │ +855 _Sp_counted_array_base<_Alloc> __a = *this; │ │ │ │ +856 pointer __p = _M_alloc_ptr; │ │ │ │ +857 this->~_Sp_counted_array(); │ │ │ │ +858 __a._M_dealloc_array(__p, _S_tail()); │ │ │ │ +859 } │ │ │ │ +860 │ │ │ │ +861 // Returns the number of additional array elements that must be │ │ │ │ +862 // allocated in order to store a _Sp_counted_array at the end. │ │ │ │ +863 static constexpr size_t │ │ │ │ +864 _S_tail() │ │ │ │ +865 { │ │ │ │ +866 // The array elemenent type. │ │ │ │ +867 using _Tp = typename allocator_traits<_Alloc>::value_type; │ │ │ │ +868 │ │ │ │ +869 // The space needed to store a _Sp_counted_array object. │ │ │ │ +870 size_t __bytes = sizeof(_Sp_counted_array); │ │ │ │ +871 │ │ │ │ +872 // Add any padding needed for manual alignment within the buffer. │ │ │ │ +873 if constexpr (alignof(_Tp) < alignof(_Sp_counted_array)) │ │ │ │ +874 __bytes += alignof(_Sp_counted_array) - alignof(_Tp); │ │ │ │ +875 │ │ │ │ +876 return (__bytes + sizeof(_Tp) - 1) / sizeof(_Tp); │ │ │ │ +877 } │ │ │ │ +878 │ │ │ │ +879 void* │ │ │ │ +880 _M_get_deleter(const _s_t_d_:_:_t_y_p_e___i_n_f_o&) noexcept override │ │ │ │ +881 { return nullptr; } │ │ │ │ +882 }; │ │ │ │ +883#endif // C++20 │ │ │ │ +884 │ │ │ │ +885 // The default deleter for shared_ptr and shared_ptr. │ │ │ │ +886 struct __sp_array_delete │ │ │ │ +887 { │ │ │ │ +888 template │ │ │ │ +889 void operator()(_Yp* __p) const { delete[] __p; } │ │ │ │ +890 }; │ │ │ │ +891 │ │ │ │ +892 template<_Lock_policy _Lp> │ │ │ │ +893 class __shared_count │ │ │ │ +894 { │ │ │ │ +895 // Prevent _Sp_alloc_shared_tag from matching the shared_ptr(P, D) ctor. │ │ │ │ +896 template │ │ │ │ +897 struct __not_alloc_shared_tag { using type = void; }; │ │ │ │ +898 │ │ │ │ +899 template │ │ │ │ +900 struct __not_alloc_shared_tag<_Sp_alloc_shared_tag<_Tp>> { }; │ │ │ │ +901 │ │ │ │ +902#if __cpp_lib_shared_ptr_arrays >= 201707L │ │ │ │ +903 template │ │ │ │ +904 struct __not_alloc_shared_tag<_Sp_counted_array_base<_Alloc>> { }; │ │ │ │ +905#endif │ │ │ │ +906 │ │ │ │ +907 public: │ │ │ │ +908 constexpr __shared_count() noexcept : _M_pi(0) │ │ │ │ +909 { } │ │ │ │ +910 │ │ │ │ +911 template │ │ │ │ +912 explicit │ │ │ │ +913 __shared_count(_Ptr __p) : _M_pi(0) │ │ │ │ +914 { │ │ │ │ +915 __try │ │ │ │ +916 { │ │ │ │ +917 _M_pi = new _Sp_counted_ptr<_Ptr, _Lp>(__p); │ │ │ │ +918 } │ │ │ │ +919 __catch(...) │ │ │ │ +920 { │ │ │ │ +921 delete __p; │ │ │ │ +922 __throw_exception_again; │ │ │ │ +923 } │ │ │ │ +924 } │ │ │ │ +925 │ │ │ │ +926 template │ │ │ │ +927 __shared_count(_Ptr __p, /* is_array = */ false_type) │ │ │ │ +928 : __shared_count(__p) │ │ │ │ +929 { } │ │ │ │ +930 │ │ │ │ +931 template │ │ │ │ +932 __shared_count(_Ptr __p, /* is_array = */ true_type) │ │ │ │ +933 : __shared_count(__p, __sp_array_delete{}, allocator()) │ │ │ │ +934 { } │ │ │ │ +935 │ │ │ │ +936 template::type> │ │ │ │ +938 __shared_count(_Ptr __p, _Deleter __d) │ │ │ │ +939 : __shared_count(__p, _s_t_d::move(__d), allocator()) │ │ │ │ +940 { } │ │ │ │ +941 │ │ │ │ +942 template::type> │ │ │ │ +944 __shared_count(_Ptr __p, _Deleter __d, _Alloc __a) : _M_pi(0) │ │ │ │ +945 { │ │ │ │ +946 typedef _Sp_counted_deleter<_Ptr, _Deleter, _Alloc, _Lp> _Sp_cd_type; │ │ │ │ +947 __try │ │ │ │ +948 { │ │ │ │ +949 typename _Sp_cd_type::__allocator_type __a2(__a); │ │ │ │ +950 auto __guard = _s_t_d_:_:_____a_l_l_o_c_a_t_e___g_u_a_r_d_e_d(__a2); │ │ │ │ +951 _Sp_cd_type* __mem = __guard.get(); │ │ │ │ +952 ::new (__mem) _Sp_cd_type(__p, _s_t_d_:_:_m_o_v_e(__d), _s_t_d_:_:_m_o_v_e(__a)); │ │ │ │ +953 _M_pi = __mem; │ │ │ │ +954 __guard = nullptr; │ │ │ │ +955 } │ │ │ │ +956 __catch(...) │ │ │ │ +957 { │ │ │ │ +958 __d(__p); // Call _Deleter on __p. │ │ │ │ +959 __throw_exception_again; │ │ │ │ +960 } │ │ │ │ +961 } │ │ │ │ +962 │ │ │ │ +963 template │ │ │ │ +964 __shared_count(_Tp*& __p, _Sp_alloc_shared_tag<_Alloc> __a, │ │ │ │ +965 _Args&&... __args) │ │ │ │ +966 { │ │ │ │ +967 typedef _Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp> _Sp_cp_type; │ │ │ │ +968 typename _Sp_cp_type::__allocator_type __a2(__a._M_a); │ │ │ │ +969 auto __guard = _s_t_d_:_:_____a_l_l_o_c_a_t_e___g_u_a_r_d_e_d(__a2); │ │ │ │ +970 _Sp_cp_type* __mem = __guard.get(); │ │ │ │ +971 auto __pi = ::new (__mem) │ │ │ │ +972 _Sp_cp_type(__a._M_a, _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(__args)...); │ │ │ │ +973 __guard = nullptr; │ │ │ │ +974 _M_pi = __pi; │ │ │ │ +975 __p = __pi->_M_ptr(); │ │ │ │ +976 } │ │ │ │ +977 │ │ │ │ +978#if __cpp_lib_shared_ptr_arrays >= 201707L │ │ │ │ +979 template │ │ │ │ +980 __shared_count(_Tp*& __p, const _Sp_counted_array_base<_Alloc>& __a, │ │ │ │ +981 _Init __init) │ │ │ │ +982 { │ │ │ │ +983 using _Up = remove_all_extents_t<_Tp>; │ │ │ │ +984 static_assert(is_same_v<_Up, typename _Alloc::value_type>); │ │ │ │ +985 │ │ │ │ +986 using _Sp_ca_type = _Sp_counted_array<_Alloc, _Lp>; │ │ │ │ +987 const size_t __tail = _Sp_ca_type::_S_tail(); │ │ │ │ +988 │ │ │ │ +989 struct _Guarded_ptr : _Sp_counted_array_base<_Alloc> │ │ │ │ +990 { │ │ │ │ +991 typename allocator_traits<_Alloc>::pointer _M_ptr; │ │ │ │ +992 │ │ │ │ +993 _Guarded_ptr(_Sp_counted_array_base<_Alloc> __a) │ │ │ │ +994 : _Sp_counted_array_base<_Alloc>(__a), │ │ │ │ +995 _M_ptr(this->_M_alloc_array(_Sp_ca_type::_S_tail())) │ │ │ │ +996 { } │ │ │ │ +997 │ │ │ │ +998 ~_Guarded_ptr() │ │ │ │ +999 { │ │ │ │ +1000 if (_M_ptr) │ │ │ │ +1001 this->_M_dealloc_array(_M_ptr, _Sp_ca_type::_S_tail()); │ │ │ │ +1002 } │ │ │ │ +1003 }; │ │ │ │ +1004 │ │ │ │ +1005 _Guarded_ptr __guard{__a}; │ │ │ │ +1006 _Up* const __raw = _s_t_d_:_:_t_o___a_d_d_r_e_s_s(__guard._M_ptr); │ │ │ │ +1007 __guard._M_init(__raw, __init); // might throw │ │ │ │ +1008 │ │ │ │ +1009 void* __c = __raw + __a._M_n; │ │ │ │ +1010 if constexpr (alignof(_Up) < alignof(_Sp_ca_type)) │ │ │ │ +1011 { │ │ │ │ +1012 size_t __space = sizeof(_Up) * __tail; │ │ │ │ +1013 __c = _s_t_d_:_:_a_l_i_g_n(alignof(_Sp_ca_type), sizeof(_Sp_ca_type), │ │ │ │ +1014 __c, __space); │ │ │ │ +1015 } │ │ │ │ +1016 auto __pi = ::new(__c) _Sp_ca_type(__guard, __guard._M_ptr); │ │ │ │ +1017 __guard._M_ptr = nullptr; │ │ │ │ +1018 _M_pi = __pi; │ │ │ │ +1019 __p = reinterpret_cast<_Tp*>(__raw); │ │ │ │ +1020 } │ │ │ │ +1021#endif │ │ │ │ +1022 │ │ │ │ +1023#if _GLIBCXX_USE_DEPRECATED │ │ │ │ +1024#pragma GCC diagnostic push │ │ │ │ +1025#pragma GCC diagnostic ignored "-Wdeprecated-declarations" │ │ │ │ +1026 // Special case for auto_ptr<_Tp> to provide the strong guarantee. │ │ │ │ +1027 template │ │ │ │ +1028 explicit │ │ │ │ +1029 __shared_count(_s_t_d_:_:_a_u_t_o___p_t_r_<___T_p_>&& __r); │ │ │ │ +1030#pragma GCC diagnostic pop │ │ │ │ +1031#endif │ │ │ │ +1032 │ │ │ │ +1033 // Special case for unique_ptr<_Tp,_Del> to provide the strong guarantee. │ │ │ │ +1034 template │ │ │ │ +1035 explicit │ │ │ │ +1036 __shared_count(_s_t_d_:_:_u_n_i_q_u_e___p_t_r_<___T_p_,_ ___D_e_l_>&& __r) : _M_pi(0) │ │ │ │ +1037 { │ │ │ │ +1038 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ +1039 // 2415. Inconsistency between unique_ptr and shared_ptr │ │ │ │ +1040 if (__r.get() == nullptr) │ │ │ │ +1041 return; │ │ │ │ +1042 │ │ │ │ +1043 using _Ptr = typename unique_ptr<_Tp, _Del>::pointer; │ │ │ │ +1044 using _Del2 = __conditional_t::value, │ │ │ │ +1045 reference_wrapper::type>, │ │ │ │ +1046 _Del>; │ │ │ │ +1047 using _Sp_cd_type │ │ │ │ +1048 = _Sp_counted_deleter<_Ptr, _Del2, allocator, _Lp>; │ │ │ │ +1049 using _Alloc = allocator<_Sp_cd_type>; │ │ │ │ +1050 using _Alloc_traits = allocator_traits<_Alloc>; │ │ │ │ +1051 _Alloc __a; │ │ │ │ +1052 _Sp_cd_type* __mem = _Alloc_traits::allocate(__a, 1); │ │ │ │ +1053 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ +1054 // 3548. shared_ptr construction from unique_ptr should move │ │ │ │ +1055 // (not copy) the deleter │ │ │ │ +1056 _Alloc_traits::construct(__a, __mem, __r.release(), │ │ │ │ +1057 _s_t_d_:_:_f_o_r_w_a_r_d_<___D_e_l_>(__r.get_deleter())); │ │ │ │ +1058 _M_pi = __mem; │ │ │ │ +1059 } │ │ │ │ +1060 │ │ │ │ +1061 // Throw bad_weak_ptr when __r._M_get_use_count() == 0. │ │ │ │ +1062 explicit __shared_count(const __weak_count<_Lp>& __r); │ │ │ │ +1063 │ │ │ │ +1064 // Does not throw if __r._M_get_use_count() == 0, caller must check. │ │ │ │ +1065 explicit │ │ │ │ +1066 __shared_count(const __weak_count<_Lp>& __r, std::nothrow_t) noexcept; │ │ │ │ +1067 │ │ │ │ +1068 ~__shared_count() noexcept │ │ │ │ +1069 { │ │ │ │ +1070 if (_M_pi != nullptr) │ │ │ │ +1071 _M_pi->_M_release(); │ │ │ │ +1072 } │ │ │ │ +1073 │ │ │ │ +1074 __shared_count(const __shared_count& __r) noexcept │ │ │ │ +1075 : _M_pi(__r._M_pi) │ │ │ │ +1076 { │ │ │ │ +1077 if (_M_pi != nullptr) │ │ │ │ +1078 _M_pi->_M_add_ref_copy(); │ │ │ │ +1079 } │ │ │ │ +1080 │ │ │ │ +1081 __shared_count& │ │ │ │ +1082 operator=(const __shared_count& __r) noexcept │ │ │ │ +1083 { │ │ │ │ +1084 _Sp_counted_base<_Lp>* __tmp = __r._M_pi; │ │ │ │ +1085 if (__tmp != _M_pi) │ │ │ │ +1086 { │ │ │ │ +1087 if (__tmp != nullptr) │ │ │ │ +1088 __tmp->_M_add_ref_copy(); │ │ │ │ +1089 if (_M_pi != nullptr) │ │ │ │ +1090 _M_pi->_M_release(); │ │ │ │ +1091 _M_pi = __tmp; │ │ │ │ +1092 } │ │ │ │ +1093 return *this; │ │ │ │ +1094 } │ │ │ │ +1095 │ │ │ │ +1096 void │ │ │ │ +1097 _M_swap(__shared_count& __r) noexcept │ │ │ │ +1098 { │ │ │ │ +1099 _Sp_counted_base<_Lp>* __tmp = __r._M_pi; │ │ │ │ +1100 __r._M_pi = _M_pi; │ │ │ │ +1101 _M_pi = __tmp; │ │ │ │ +1102 } │ │ │ │ +1103 │ │ │ │ +1104 long │ │ │ │ +1105 _M_get_use_count() const noexcept │ │ │ │ +1106 { return _M_pi ? _M_pi->_M_get_use_count() : 0; } │ │ │ │ +1107 │ │ │ │ +1108 bool │ │ │ │ +1109 _M_unique() const noexcept │ │ │ │ +1110 { return this->_M_get_use_count() == 1; } │ │ │ │ +1111 │ │ │ │ +1112 void* │ │ │ │ +1113 _M_get_deleter(const _s_t_d_:_:_t_y_p_e___i_n_f_o& __ti) const noexcept │ │ │ │ +1114 { return _M_pi ? _M_pi->_M_get_deleter(__ti) : nullptr; } │ │ │ │ +1115 │ │ │ │ +1116 bool │ │ │ │ +1117 _M_less(const __shared_count& __rhs) const noexcept │ │ │ │ +1118 { return _s_t_d_:_:_l_e_s_s_<___S_p___c_o_u_n_t_e_d___b_a_s_e_<___L_p_>*>()(this->_M_pi, __rhs._M_pi); } │ │ │ │ +1119 │ │ │ │ +1120 bool │ │ │ │ +1121 _M_less(const __weak_count<_Lp>& __rhs) const noexcept │ │ │ │ +1122 { return _s_t_d_:_:_l_e_s_s_<___S_p___c_o_u_n_t_e_d___b_a_s_e_<___L_p_>*>()(this->_M_pi, __rhs._M_pi); } │ │ │ │ +1123 │ │ │ │ +1124 // Friend function injected into enclosing namespace and found by ADL │ │ │ │ +1125 friend inline bool │ │ │ │ +1126 operator==(const __shared_count& __a, const __shared_count& __b) noexcept │ │ │ │ +1127 { return __a._M_pi == __b._M_pi; } │ │ │ │ +1128 │ │ │ │ +1129 private: │ │ │ │ +1130 friend class __weak_count<_Lp>; │ │ │ │ +1131#if __cplusplus >= 202002L │ │ │ │ +1132 template friend class _Sp_atomic; │ │ │ │ +1133#endif │ │ │ │ +1134 │ │ │ │ +1135 _Sp_counted_base<_Lp>* _M_pi; │ │ │ │ +1136 }; │ │ │ │ +1137 │ │ │ │ +1138 │ │ │ │ +1139 template<_Lock_policy _Lp> │ │ │ │ +1140 class __weak_count │ │ │ │ +1141 { │ │ │ │ +1142 public: │ │ │ │ +1143 constexpr __weak_count() noexcept : _M_pi(nullptr) │ │ │ │ +1144 { } │ │ │ │ +1145 │ │ │ │ +1146 __weak_count(const __shared_count<_Lp>& __r) noexcept │ │ │ │ +1147 : _M_pi(__r._M_pi) │ │ │ │ +1148 { │ │ │ │ +1149 if (_M_pi != nullptr) │ │ │ │ +1150 _M_pi->_M_weak_add_ref(); │ │ │ │ +1151 } │ │ │ │ +1152 │ │ │ │ +1153 __weak_count(const __weak_count& __r) noexcept │ │ │ │ +1154 : _M_pi(__r._M_pi) │ │ │ │ +1155 { │ │ │ │ +1156 if (_M_pi != nullptr) │ │ │ │ +1157 _M_pi->_M_weak_add_ref(); │ │ │ │ +1158 } │ │ │ │ +1159 │ │ │ │ +1160 __weak_count(__weak_count&& __r) noexcept │ │ │ │ +1161 : _M_pi(__r._M_pi) │ │ │ │ +1162 { __r._M_pi = nullptr; } │ │ │ │ +1163 │ │ │ │ +1164 ~__weak_count() noexcept │ │ │ │ +1165 { │ │ │ │ +1166 if (_M_pi != nullptr) │ │ │ │ +1167 _M_pi->_M_weak_release(); │ │ │ │ +1168 } │ │ │ │ +1169 │ │ │ │ +1170 __weak_count& │ │ │ │ +1171 operator=(const __shared_count<_Lp>& __r) noexcept │ │ │ │ +1172 { │ │ │ │ +1173 _Sp_counted_base<_Lp>* __tmp = __r._M_pi; │ │ │ │ +1174 if (__tmp != nullptr) │ │ │ │ +1175 __tmp->_M_weak_add_ref(); │ │ │ │ +1176 if (_M_pi != nullptr) │ │ │ │ +1177 _M_pi->_M_weak_release(); │ │ │ │ +1178 _M_pi = __tmp; │ │ │ │ +1179 return *this; │ │ │ │ +1180 } │ │ │ │ +1181 │ │ │ │ +1182 __weak_count& │ │ │ │ +1183 operator=(const __weak_count& __r) noexcept │ │ │ │ +1184 { │ │ │ │ +1185 _Sp_counted_base<_Lp>* __tmp = __r._M_pi; │ │ │ │ +1186 if (__tmp != nullptr) │ │ │ │ +1187 __tmp->_M_weak_add_ref(); │ │ │ │ +1188 if (_M_pi != nullptr) │ │ │ │ +1189 _M_pi->_M_weak_release(); │ │ │ │ +1190 _M_pi = __tmp; │ │ │ │ +1191 return *this; │ │ │ │ +1192 } │ │ │ │ +1193 │ │ │ │ +1194 __weak_count& │ │ │ │ +1195 operator=(__weak_count&& __r) noexcept │ │ │ │ +1196 { │ │ │ │ +1197 if (_M_pi != nullptr) │ │ │ │ +1198 _M_pi->_M_weak_release(); │ │ │ │ +1199 _M_pi = __r._M_pi; │ │ │ │ +1200 __r._M_pi = nullptr; │ │ │ │ +1201 return *this; │ │ │ │ +1202 } │ │ │ │ +1203 │ │ │ │ +1204 void │ │ │ │ +1205 _M_swap(__weak_count& __r) noexcept │ │ │ │ +1206 { │ │ │ │ +1207 _Sp_counted_base<_Lp>* __tmp = __r._M_pi; │ │ │ │ +1208 __r._M_pi = _M_pi; │ │ │ │ +1209 _M_pi = __tmp; │ │ │ │ +1210 } │ │ │ │ +1211 │ │ │ │ +1212 long │ │ │ │ +1213 _M_get_use_count() const noexcept │ │ │ │ +1214 { return _M_pi != nullptr ? _M_pi->_M_get_use_count() : 0; } │ │ │ │ +1215 │ │ │ │ +1216 bool │ │ │ │ +1217 _M_less(const __weak_count& __rhs) const noexcept │ │ │ │ +1218 { return _s_t_d_:_:_l_e_s_s_<___S_p___c_o_u_n_t_e_d___b_a_s_e_<___L_p_>*>()(this->_M_pi, __rhs._M_pi); } │ │ │ │ +1219 │ │ │ │ +1220 bool │ │ │ │ +1221 _M_less(const __shared_count<_Lp>& __rhs) const noexcept │ │ │ │ +1222 { return _s_t_d_:_:_l_e_s_s_<___S_p___c_o_u_n_t_e_d___b_a_s_e_<___L_p_>*>()(this->_M_pi, __rhs._M_pi); } │ │ │ │ +1223 │ │ │ │ +1224 // Friend function injected into enclosing namespace and found by ADL │ │ │ │ +1225 friend inline bool │ │ │ │ +1226 operator==(const __weak_count& __a, const __weak_count& __b) noexcept │ │ │ │ +1227 { return __a._M_pi == __b._M_pi; } │ │ │ │ +1228 │ │ │ │ +1229 private: │ │ │ │ +1230 friend class __shared_count<_Lp>; │ │ │ │ +1231#if __cplusplus >= 202002L │ │ │ │ +1232 template friend class _Sp_atomic; │ │ │ │ +1233#endif │ │ │ │ +1234 │ │ │ │ +1235 _Sp_counted_base<_Lp>* _M_pi; │ │ │ │ +1236 }; │ │ │ │ +1237 │ │ │ │ +1238 // Now that __weak_count is defined we can define this constructor: │ │ │ │ +1239 template<_Lock_policy _Lp> │ │ │ │ +1240 inline │ │ │ │ +1241 __shared_count<_Lp>::__shared_count(const __weak_count<_Lp>& __r) │ │ │ │ +1242 : _M_pi(__r._M_pi) │ │ │ │ +1243 { │ │ │ │ +1244 if (_M_pi == nullptr || !_M_pi->_M_add_ref_lock_nothrow()) │ │ │ │ +1245 __throw_bad_weak_ptr(); │ │ │ │ +1246 } │ │ │ │ +1247 │ │ │ │ +1248 // Now that __weak_count is defined we can define this constructor: │ │ │ │ +1249 template<_Lock_policy _Lp> │ │ │ │ +1250 inline │ │ │ │ +1251 __shared_count<_Lp>:: │ │ │ │ +1252 __shared_count(const __weak_count<_Lp>& __r, std::nothrow_t) noexcept │ │ │ │ +1253 : _M_pi(__r._M_pi) │ │ │ │ +1254 { │ │ │ │ +1255 if (_M_pi && !_M_pi->_M_add_ref_lock_nothrow()) │ │ │ │ +1256 _M_pi = nullptr; │ │ │ │ +1257 } │ │ │ │ +1258 │ │ │ │ +1259 // Helper traits for shared_ptr of array: │ │ │ │ +1260 │ │ │ │ +1261 // A pointer type Y* is said to be compatible with a pointer type T* when │ │ │ │ +1262 // either Y* is convertible to T* or Y is U[N] and T is U cv []. │ │ │ │ +1263 template │ │ │ │ +1264 struct __sp_compatible_with │ │ │ │ +1265 : _f_a_l_s_e___t_y_p_e │ │ │ │ +1266 { }; │ │ │ │ +1267 │ │ │ │ +1268 template │ │ │ │ +1269 struct __sp_compatible_with<_Yp*, _Tp*> │ │ │ │ +1270 : is_convertible<_Yp*, _Tp*>::type │ │ │ │ +1271 { }; │ │ │ │ +1272 │ │ │ │ +1273 template │ │ │ │ +1274 struct __sp_compatible_with<_Up(*)[_Nm], _Up(*)[]> │ │ │ │ +1275 : _t_r_u_e___t_y_p_e │ │ │ │ +1276 { }; │ │ │ │ +1277 │ │ │ │ +1278 template │ │ │ │ +1279 struct __sp_compatible_with<_Up(*)[_Nm], const _Up(*)[]> │ │ │ │ +1280 : _t_r_u_e___t_y_p_e │ │ │ │ +1281 { }; │ │ │ │ +1282 │ │ │ │ +1283 template │ │ │ │ +1284 struct __sp_compatible_with<_Up(*)[_Nm], volatile _Up(*)[]> │ │ │ │ +1285 : _t_r_u_e___t_y_p_e │ │ │ │ +1286 { }; │ │ │ │ +1287 │ │ │ │ +1288 template │ │ │ │ +1289 struct __sp_compatible_with<_Up(*)[_Nm], const volatile _Up(*)[]> │ │ │ │ +1290 : _t_r_u_e___t_y_p_e │ │ │ │ +1291 { }; │ │ │ │ +1292 │ │ │ │ +1293 // Test conversion from Y(*)[N] to U(*)[N] without forming invalid type Y │ │ │ │ +[N]. │ │ │ │ +1294 template │ │ │ │ +1295 struct __sp_is_constructible_arrN │ │ │ │ +1296 : _f_a_l_s_e___t_y_p_e │ │ │ │ +1297 { }; │ │ │ │ +1298 │ │ │ │ +1299 template │ │ │ │ +1300 struct __sp_is_constructible_arrN<_Up, _Nm, _Yp, __void_t<_Yp[_Nm]>> │ │ │ │ +1301 : is_convertible<_Yp(*)[_Nm], _Up(*)[_Nm]>::type │ │ │ │ +1302 { }; │ │ │ │ +1303 │ │ │ │ +1304 // Test conversion from Y(*)[] to U(*)[] without forming invalid type Y[]. │ │ │ │ +1305 template │ │ │ │ +1306 struct __sp_is_constructible_arr │ │ │ │ +1307 : _f_a_l_s_e___t_y_p_e │ │ │ │ +1308 { }; │ │ │ │ +1309 │ │ │ │ +1310 template │ │ │ │ +1311 struct __sp_is_constructible_arr<_Up, _Yp, __void_t<_Yp[]>> │ │ │ │ +1312 : is_convertible<_Yp(*)[], _Up(*)[]>::type │ │ │ │ +1313 { }; │ │ │ │ +1314 │ │ │ │ +1315 // Trait to check if shared_ptr can be constructed from Y*. │ │ │ │ +1316 template │ │ │ │ +1317 struct __sp_is_constructible; │ │ │ │ +1318 │ │ │ │ +1319 // When T is U[N], Y(*)[N] shall be convertible to T*; │ │ │ │ +1320 template │ │ │ │ +1321 struct __sp_is_constructible<_Up[_Nm], _Yp> │ │ │ │ +1322 : __sp_is_constructible_arrN<_Up, _Nm, _Yp>::type │ │ │ │ +1323 { }; │ │ │ │ +1324 │ │ │ │ +1325 // when T is U[], Y(*)[] shall be convertible to T*; │ │ │ │ +1326 template │ │ │ │ +1327 struct __sp_is_constructible<_Up[], _Yp> │ │ │ │ +1328 : __sp_is_constructible_arr<_Up, _Yp>::type │ │ │ │ +1329 { }; │ │ │ │ +1330 │ │ │ │ +1331 // otherwise, Y* shall be convertible to T*. │ │ │ │ +1332 template │ │ │ │ +1333 struct __sp_is_constructible │ │ │ │ +1334 : is_convertible<_Yp*, _Tp*>::type │ │ │ │ +1335 { }; │ │ │ │ +1336 │ │ │ │ +1337 │ │ │ │ +1338 // Define operator* and operator-> for shared_ptr. │ │ │ │ +1339 template::value, bool = is_void<_Tp>::value> │ │ │ │ +1341 class __shared_ptr_access │ │ │ │ +1342 { │ │ │ │ +1343 public: │ │ │ │ +1344 using element_type = _Tp; │ │ │ │ +1345 │ │ │ │ +1346 element_type& │ │ │ │ +1347 _o_p_e_r_a_t_o_r_*() const noexcept │ │ │ │ +1348 { │ │ │ │ +1349 __glibcxx_assert(_M_get() != nullptr); │ │ │ │ +1350 return *_M_get(); │ │ │ │ +1351 } │ │ │ │ +1352 │ │ │ │ +1353 element_type* │ │ │ │ +1354 operator->() const noexcept │ │ │ │ +1355 { │ │ │ │ +1356 _GLIBCXX_DEBUG_PEDASSERT(_M_get() != nullptr); │ │ │ │ +1357 return _M_get(); │ │ │ │ +1358 } │ │ │ │ +1359 │ │ │ │ +1360 private: │ │ │ │ +1361 element_type* │ │ │ │ +1362 _M_get() const noexcept │ │ │ │ +1363 { return static_cast*>(this)->get(); } │ │ │ │ +1364 }; │ │ │ │ +1365 │ │ │ │ +1366 // Define operator-> for shared_ptr. │ │ │ │ +1367 template │ │ │ │ +1368 class __shared_ptr_access<_Tp, _Lp, false, true> │ │ │ │ +1369 { │ │ │ │ +1370 public: │ │ │ │ +1371 using element_type = _Tp; │ │ │ │ +1372 │ │ │ │ +1373 element_type* │ │ │ │ +1374 operator->() const noexcept │ │ │ │ +1375 { │ │ │ │ +1376 auto __ptr = static_cast*>(this)->get(); │ │ │ │ +1377 _GLIBCXX_DEBUG_PEDASSERT(__ptr != nullptr); │ │ │ │ +1378 return __ptr; │ │ │ │ +1379 } │ │ │ │ +1380 }; │ │ │ │ +1381 │ │ │ │ +1382 // Define operator[] for shared_ptr and shared_ptr. │ │ │ │ +1383 template │ │ │ │ +1384 class __shared_ptr_access<_Tp, _Lp, true, false> │ │ │ │ +1385 { │ │ │ │ +1386 public: │ │ │ │ +1387 using element_type = typename remove_extent<_Tp>::type; │ │ │ │ +1388 │ │ │ │ +1389#if __cplusplus <= 201402L │ │ │ │ +1390 [[__deprecated__("shared_ptr::operator* is absent from C++17")]] │ │ │ │ +1391 element_type& │ │ │ │ +1392 _o_p_e_r_a_t_o_r_*() const noexcept │ │ │ │ +1393 { │ │ │ │ +1394 __glibcxx_assert(_M_get() != nullptr); │ │ │ │ +1395 return *_M_get(); │ │ │ │ +1396 } │ │ │ │ +1397 │ │ │ │ +1398 [[__deprecated__("shared_ptr::operator-> is absent from C++17")]] │ │ │ │ +1399 element_type* │ │ │ │ +1400 operator->() const noexcept │ │ │ │ +1401 { │ │ │ │ +1402 _GLIBCXX_DEBUG_PEDASSERT(_M_get() != nullptr); │ │ │ │ +1403 return _M_get(); │ │ │ │ +1404 } │ │ │ │ +1405#endif │ │ │ │ +1406 │ │ │ │ +1407 element_type& │ │ │ │ +1408 operator[](ptrdiff_t __i) const noexcept │ │ │ │ +1409 { │ │ │ │ +1410 __glibcxx_assert(_M_get() != nullptr); │ │ │ │ +1411 __glibcxx_assert(!extent<_Tp>::value || __i < extent<_Tp>::value); │ │ │ │ +1412 return _M_get()[__i]; │ │ │ │ +1413 } │ │ │ │ +1414 │ │ │ │ +1415 private: │ │ │ │ +1416 element_type* │ │ │ │ +1417 _M_get() const noexcept │ │ │ │ +1418 { return static_cast*>(this)->get(); } │ │ │ │ +1419 }; │ │ │ │ +1420 │ │ │ │ +1421 template │ │ │ │ +1422 class __shared_ptr │ │ │ │ +1423 : public __shared_ptr_access<_Tp, _Lp> │ │ │ │ +1424 { │ │ │ │ +1425 public: │ │ │ │ +1426 using element_type = typename remove_extent<_Tp>::type; │ │ │ │ +1427 │ │ │ │ +1428 private: │ │ │ │ +1429 // Constraint for taking ownership of a pointer of type _Yp*: │ │ │ │ +1430 template │ │ │ │ +1431 using _SafeConv │ │ │ │ +1432 = typename enable_if<__sp_is_constructible<_Tp, _Yp>::value>::type; │ │ │ │ +1433 │ │ │ │ +1434 // Constraint for construction from shared_ptr and weak_ptr: │ │ │ │ +1435 template │ │ │ │ +1436 using _Compatible = typename │ │ │ │ +1437 enable_if<__sp_compatible_with<_Yp*, _Tp*>::value, _Res>::type; │ │ │ │ +1438 │ │ │ │ +1439 // Constraint for assignment from shared_ptr and weak_ptr: │ │ │ │ +1440 template │ │ │ │ +1441 using _Assignable = _Compatible<_Yp, __shared_ptr&>; │ │ │ │ +1442 │ │ │ │ +1443 // Constraint for construction from unique_ptr: │ │ │ │ +1444 template::pointer> │ │ │ │ +1446 using _UniqCompatible = __enable_if_t<__and_< │ │ │ │ +1447 __sp_compatible_with<_Yp*, _Tp*>, │ │ │ │ +1448 is_convertible<_Ptr, element_type*>, │ │ │ │ +1449 is_move_constructible<_Del> │ │ │ │ +1450 >::value, _Res>; │ │ │ │ +1451 │ │ │ │ +1452 // Constraint for assignment from unique_ptr: │ │ │ │ +1453 template │ │ │ │ +1454 using _UniqAssignable = _UniqCompatible<_Yp, _Del, __shared_ptr&>; │ │ │ │ +1455 │ │ │ │ +1456 public: │ │ │ │ +1457 │ │ │ │ +1458#if __cplusplus > 201402L │ │ │ │ +1459 using weak_type = __weak_ptr<_Tp, _Lp>; │ │ │ │ +1460#endif │ │ │ │ +1461 │ │ │ │ +1462 constexpr __shared_ptr() noexcept │ │ │ │ +1463 : _M_ptr(0), _M_refcount() │ │ │ │ +1464 { } │ │ │ │ +1465 │ │ │ │ +1466 template> │ │ │ │ +1467 explicit │ │ │ │ +1468 __shared_ptr(_Yp* __p) │ │ │ │ +1469 : _M_ptr(__p), _M_refcount(__p, typename is_array<_Tp>::type()) │ │ │ │ +1470 { │ │ │ │ +1471 static_assert( !is_void<_Yp>::value, "incomplete type" ); │ │ │ │ +1472 static_assert( sizeof(_Yp) > 0, "incomplete type" ); │ │ │ │ +1473 _M_enable_shared_from_this_with(__p); │ │ │ │ +1474 } │ │ │ │ +1475 │ │ │ │ +1476 template> │ │ │ │ +1477 __shared_ptr(_Yp* __p, _Deleter __d) │ │ │ │ +1478 : _M_ptr(__p), _M_refcount(__p, _s_t_d::_m_o_v_e(__d)) │ │ │ │ +1479 { │ │ │ │ +1480 static_assert(__is_invocable<_Deleter&, _Yp*&>::value, │ │ │ │ +1481 "deleter expression d(p) is well-formed"); │ │ │ │ +1482 _M_enable_shared_from_this_with(__p); │ │ │ │ +1483 } │ │ │ │ +1484 │ │ │ │ +1485 template> │ │ │ │ +1487 __shared_ptr(_Yp* __p, _Deleter __d, _Alloc __a) │ │ │ │ +1488 : _M_ptr(__p), _M_refcount(__p, _s_t_d::_m_o_v_e(__d), _s_t_d::_m_o_v_e(__a)) │ │ │ │ +1489 { │ │ │ │ +1490 static_assert(__is_invocable<_Deleter&, _Yp*&>::value, │ │ │ │ +1491 "deleter expression d(p) is well-formed"); │ │ │ │ +1492 _M_enable_shared_from_this_with(__p); │ │ │ │ +1493 } │ │ │ │ +1494 │ │ │ │ +1495 template │ │ │ │ +1496 __shared_ptr(nullptr_t __p, _Deleter __d) │ │ │ │ +1497 : _M_ptr(0), _M_refcount(__p, _s_t_d::_m_o_v_e(__d)) │ │ │ │ +1498 { } │ │ │ │ +1499 │ │ │ │ +1500 template │ │ │ │ +1501 __shared_ptr(nullptr_t __p, _Deleter __d, _Alloc __a) │ │ │ │ +1502 : _M_ptr(0), _M_refcount(__p, _s_t_d::_m_o_v_e(__d), _s_t_d::_m_o_v_e(__a)) │ │ │ │ +1503 { } │ │ │ │ +1504 │ │ │ │ +1505 // Aliasing constructor │ │ │ │ +1506 template │ │ │ │ +1507 __shared_ptr(const __shared_ptr<_Yp, _Lp>& __r, │ │ │ │ +1508 element_type* __p) noexcept │ │ │ │ +1509 : _M_ptr(__p), _M_refcount(__r._M_refcount) // never throws │ │ │ │ +1510 { } │ │ │ │ +1511 │ │ │ │ +1512 // Aliasing constructor │ │ │ │ +1513 template │ │ │ │ +1514 __shared_ptr(__shared_ptr<_Yp, _Lp>&& __r, │ │ │ │ +1515 element_type* __p) noexcept │ │ │ │ +1516 : _M_ptr(__p), _M_refcount() │ │ │ │ +1517 { │ │ │ │ +1518 _M_refcount._M_swap(__r._M_refcount); │ │ │ │ +1519 __r._M_ptr = nullptr; │ │ │ │ +1520 } │ │ │ │ +1521 │ │ │ │ +1522 __shared_ptr(const __shared_ptr&) noexcept = default; │ │ │ │ +1523 __shared_ptr& operator=(const __shared_ptr&) noexcept = default; │ │ │ │ +1524 ~__shared_ptr() = default; │ │ │ │ +1525 │ │ │ │ +1526 template> │ │ │ │ +1527 __shared_ptr(const __shared_ptr<_Yp, _Lp>& __r) noexcept │ │ │ │ +1528 : _M_ptr(__r._M_ptr), _M_refcount(__r._M_refcount) │ │ │ │ +1529 { } │ │ │ │ +1530 │ │ │ │ +1531 __shared_ptr(__shared_ptr&& __r) noexcept │ │ │ │ +1532 : _M_ptr(__r._M_ptr), _M_refcount() │ │ │ │ +1533 { │ │ │ │ +1534 _M_refcount._M_swap(__r._M_refcount); │ │ │ │ +1535 __r._M_ptr = nullptr; │ │ │ │ +1536 } │ │ │ │ +1537 │ │ │ │ +1538 template> │ │ │ │ +1539 __shared_ptr(__shared_ptr<_Yp, _Lp>&& __r) noexcept │ │ │ │ +1540 : _M_ptr(__r._M_ptr), _M_refcount() │ │ │ │ +1541 { │ │ │ │ +1542 _M_refcount._M_swap(__r._M_refcount); │ │ │ │ +1543 __r._M_ptr = nullptr; │ │ │ │ +1544 } │ │ │ │ +1545 │ │ │ │ +1546 template> │ │ │ │ +1547 explicit __shared_ptr(const __weak_ptr<_Yp, _Lp>& __r) │ │ │ │ +1548 : _M_refcount(__r._M_refcount) // may throw │ │ │ │ +1549 { │ │ │ │ +1550 // It is now safe to copy __r._M_ptr, as │ │ │ │ +1551 // _M_refcount(__r._M_refcount) did not throw. │ │ │ │ +1552 _M_ptr = __r._M_ptr; │ │ │ │ +1553 } │ │ │ │ +1554 │ │ │ │ +1555 // If an exception is thrown this constructor has no effect. │ │ │ │ +1556 template> │ │ │ │ +1558 __shared_ptr(unique_ptr<_Yp, _Del>&& __r) │ │ │ │ +1559 : _M_ptr(__r.get()), _M_refcount() │ │ │ │ +1560 { │ │ │ │ +1561 auto __raw = __to_address(__r.get()); │ │ │ │ +1562 _M_refcount = __shared_count<_Lp>(_s_t_d_:_:_m_o_v_e(__r)); │ │ │ │ +1563 _M_enable_shared_from_this_with(__raw); │ │ │ │ +1564 } │ │ │ │ +1565 │ │ │ │ +1566#if __cplusplus <= 201402L && _GLIBCXX_USE_DEPRECATED │ │ │ │ +1567 protected: │ │ │ │ +1568 // If an exception is thrown this constructor has no effect. │ │ │ │ +1569 template>, is_array<_Tp1>, │ │ │ │ +1572 is_convertible::pointer, _Tp*> │ │ │ │ +1573 >::value, bool>::type = true> │ │ │ │ +1574 __shared_ptr(unique_ptr<_Tp1, _Del>&& __r, __sp_array_delete) │ │ │ │ +1575 : _M_ptr(__r.get()), _M_refcount() │ │ │ │ +1576 { │ │ │ │ +1577 auto __raw = __to_address(__r.get()); │ │ │ │ +1578 _M_refcount = __shared_count<_Lp>(_s_t_d_:_:_m_o_v_e(__r)); │ │ │ │ +1579 _M_enable_shared_from_this_with(__raw); │ │ │ │ +1580 } │ │ │ │ +1581 public: │ │ │ │ +1582#endif │ │ │ │ +1583 │ │ │ │ +1584#if _GLIBCXX_USE_DEPRECATED │ │ │ │ +1585#pragma GCC diagnostic push │ │ │ │ +1586#pragma GCC diagnostic ignored "-Wdeprecated-declarations" │ │ │ │ +1587 // Postcondition: use_count() == 1 and __r.get() == 0 │ │ │ │ +1588 template> │ │ │ │ +1589 __shared_ptr(auto_ptr<_Yp>&& __r); │ │ │ │ +1590#pragma GCC diagnostic pop │ │ │ │ +1591#endif │ │ │ │ +1592 │ │ │ │ +1593 constexpr __shared_ptr(nullptr_t) noexcept : __shared_ptr() { } │ │ │ │ +1594 │ │ │ │ +1595 template │ │ │ │ +1596 _Assignable<_Yp> │ │ │ │ +1597 operator=(const __shared_ptr<_Yp, _Lp>& __r) noexcept │ │ │ │ +1598 { │ │ │ │ +1599 _M_ptr = __r._M_ptr; │ │ │ │ +1600 _M_refcount = __r._M_refcount; // __shared_count::op= doesn't throw │ │ │ │ +1601 return *this; │ │ │ │ +1602 } │ │ │ │ +1603 │ │ │ │ +1604#if _GLIBCXX_USE_DEPRECATED │ │ │ │ +1605#pragma GCC diagnostic push │ │ │ │ +1606#pragma GCC diagnostic ignored "-Wdeprecated-declarations" │ │ │ │ +1607 template │ │ │ │ +1608 _Assignable<_Yp> │ │ │ │ +1609 operator=(auto_ptr<_Yp>&& __r) │ │ │ │ +1610 { │ │ │ │ +1611 __shared_ptr(_s_t_d_:_:_m_o_v_e(__r)).swap(*this); │ │ │ │ +1612 return *this; │ │ │ │ +1613 } │ │ │ │ +1614#pragma GCC diagnostic pop │ │ │ │ +1615#endif │ │ │ │ +1616 │ │ │ │ +1617 __shared_ptr& │ │ │ │ +1618 operator=(__shared_ptr&& __r) noexcept │ │ │ │ +1619 { │ │ │ │ +1620 __shared_ptr(_s_t_d_:_:_m_o_v_e(__r)).swap(*this); │ │ │ │ +1621 return *this; │ │ │ │ +1622 } │ │ │ │ +1623 │ │ │ │ +1624 template │ │ │ │ +1625 _Assignable<_Yp> │ │ │ │ +1626 operator=(__shared_ptr<_Yp, _Lp>&& __r) noexcept │ │ │ │ +1627 { │ │ │ │ +1628 __shared_ptr(_s_t_d_:_:_m_o_v_e(__r)).swap(*this); │ │ │ │ +1629 return *this; │ │ │ │ +1630 } │ │ │ │ +1631 │ │ │ │ +1632 template │ │ │ │ +1633 _UniqAssignable<_Yp, _Del> │ │ │ │ +1634 operator=(unique_ptr<_Yp, _Del>&& __r) │ │ │ │ +1635 { │ │ │ │ +1636 __shared_ptr(_s_t_d_:_:_m_o_v_e(__r)).swap(*this); │ │ │ │ +1637 return *this; │ │ │ │ +1638 } │ │ │ │ +1639 │ │ │ │ +1640 void │ │ │ │ +1641 reset() noexcept │ │ │ │ +1642 { __shared_ptr().swap(*this); } │ │ │ │ +1643 │ │ │ │ +1644 template │ │ │ │ +1645 _SafeConv<_Yp> │ │ │ │ +1646 reset(_Yp* __p) // _Yp must be complete. │ │ │ │ +1647 { │ │ │ │ +1648 // Catch self-reset errors. │ │ │ │ +1649 __glibcxx_assert(__p == nullptr || __p != _M_ptr); │ │ │ │ +1650 __shared_ptr(__p).swap(*this); │ │ │ │ +1651 } │ │ │ │ +1652 │ │ │ │ +1653 template │ │ │ │ +1654 _SafeConv<_Yp> │ │ │ │ +1655 reset(_Yp* __p, _Deleter __d) │ │ │ │ +1656 { __shared_ptr(__p, _s_t_d_:_:_m_o_v_e(__d)).swap(*this); } │ │ │ │ +1657 │ │ │ │ +1658 template │ │ │ │ +1659 _SafeConv<_Yp> │ │ │ │ +1660 reset(_Yp* __p, _Deleter __d, _Alloc __a) │ │ │ │ +1661 { __shared_ptr(__p, _s_t_d_:_:_m_o_v_e(__d), _s_t_d_:_:_m_o_v_e(__a)).swap(*this); } │ │ │ │ +1662 │ │ │ │ +1663 /// Return the stored pointer. │ │ │ │ +1664 element_type* │ │ │ │ +1665 get() const noexcept │ │ │ │ +1666 { return _M_ptr; } │ │ │ │ +1667 │ │ │ │ +1668 /// Return true if the stored pointer is not null. │ │ │ │ +1669#if __cplusplus >= 202002L │ │ │ │ +1670 [[__gnu__::__always_inline__]] │ │ │ │ +1671#endif │ │ │ │ +1672 explicit operator bool() const noexcept │ │ │ │ +1673 { return _M_ptr != nullptr; } │ │ │ │ +1674 │ │ │ │ +1675 /// Return true if use_count() == 1. │ │ │ │ +1676 bool │ │ │ │ +1677 unique() const noexcept │ │ │ │ +1678 { return _M_refcount._M_unique(); } │ │ │ │ +1679 │ │ │ │ +1680 /// If *this owns a pointer, return the number of owners, otherwise zero. │ │ │ │ +1681 long │ │ │ │ +1682 use_count() const noexcept │ │ │ │ +1683 { return _M_refcount._M_get_use_count(); } │ │ │ │ +1684 │ │ │ │ +1685 /// Exchange both the owned pointer and the stored pointer. │ │ │ │ +1686 void │ │ │ │ +1687 swap(__shared_ptr<_Tp, _Lp>& __other) noexcept │ │ │ │ +1688 { │ │ │ │ +1689 _s_t_d_:_:_s_w_a_p(_M_ptr, __other._M_ptr); │ │ │ │ +1690 _M_refcount._M_swap(__other._M_refcount); │ │ │ │ +1691 } │ │ │ │ +1692 │ │ │ │ +1693 /** @brief Define an ordering based on ownership. │ │ │ │ +1694 * │ │ │ │ +1695 * This function defines a strict weak ordering between two shared_ptr │ │ │ │ +1696 * or weak_ptr objects, such that one object is less than the other │ │ │ │ +1697 * unless they share ownership of the same pointer, or are both empty. │ │ │ │ +1698 * @{ │ │ │ │ +1699 */ │ │ │ │ +1700 template │ │ │ │ +1701 bool │ │ │ │ +1702 owner_before(__shared_ptr<_Tp1, _Lp> const& __rhs) const noexcept │ │ │ │ +1703 { return _M_refcount._M_less(__rhs._M_refcount); } │ │ │ │ +1704 │ │ │ │ +1705 template │ │ │ │ +1706 bool │ │ │ │ +1707 owner_before(__weak_ptr<_Tp1, _Lp> const& __rhs) const noexcept │ │ │ │ +1708 { return _M_refcount._M_less(__rhs._M_refcount); } │ │ │ │ +1709 /// @} │ │ │ │ +1710 │ │ │ │ +1711 protected: │ │ │ │ +1712 // This constructor is non-standard, it is used by allocate_shared. │ │ │ │ +1713 template │ │ │ │ +1714 __shared_ptr(_Sp_alloc_shared_tag<_Alloc> __tag, _Args&&... __args) │ │ │ │ +1715 : _M_ptr(), _M_refcount(_M_ptr, __tag, _s_t_d::_f_o_r_w_a_r_d<_Args>(__args)...) │ │ │ │ +1716 { _M_enable_shared_from_this_with(_M_ptr); } │ │ │ │ +1717 │ │ │ │ +1718 template │ │ │ │ +1720 friend __shared_ptr<_Tp1, _Lp1> │ │ │ │ +1721 __allocate_shared(const _Alloc& __a, _Args&&... __args); │ │ │ │ +1722 │ │ │ │ +1723#if __cpp_lib_shared_ptr_arrays >= 201707L │ │ │ │ +1724 // This constructor is non-standard, it is used by allocate_shared. │ │ │ │ +1725 template*> │ │ │ │ +1726 __shared_ptr(const _Sp_counted_array_base<_Alloc>& __a, │ │ │ │ +1727 _Init __init = nullptr) │ │ │ │ +1728 : _M_ptr(), _M_refcount(_M_ptr, __a, __init) │ │ │ │ +1729 { } │ │ │ │ +1730#endif │ │ │ │ +1731 │ │ │ │ +1732 // This constructor is used by __weak_ptr::lock() and │ │ │ │ +1733 // shared_ptr::shared_ptr(const weak_ptr&, std::nothrow_t). │ │ │ │ +1734 __shared_ptr(const __weak_ptr<_Tp, _Lp>& __r, std::nothrow_t) noexcept │ │ │ │ +1735 : _M_refcount(__r._M_refcount, std::nothrow) │ │ │ │ +1736 { │ │ │ │ +1737 _M_ptr = _M_refcount._M_get_use_count() ? __r._M_ptr : nullptr; │ │ │ │ +1738 } │ │ │ │ +1739 │ │ │ │ +1740 friend class __weak_ptr<_Tp, _Lp>; │ │ │ │ +1741 │ │ │ │ +1742 private: │ │ │ │ +1743 │ │ │ │ +1744 template │ │ │ │ +1745 using __esft_base_t = decltype(__enable_shared_from_this_base( │ │ │ │ +1746 _s_t_d_:_:_d_e_c_l_v_a_l&>(), │ │ │ │ +1747 _s_t_d_:_:_d_e_c_l_v_a_l_<___Y_p_*_>())); │ │ │ │ +1748 │ │ │ │ +1749 // Detect an accessible and unambiguous enable_shared_from_this base. │ │ │ │ +1750 template │ │ │ │ +1751 struct __has_esft_base │ │ │ │ +1752 : _f_a_l_s_e___t_y_p_e { }; │ │ │ │ +1753 │ │ │ │ +1754 template │ │ │ │ +1755 struct __has_esft_base<_Yp, __void_t<__esft_base_t<_Yp>>> │ │ │ │ +1756 : __not_> { }; // No enable shared_from_this for arrays │ │ │ │ +1757 │ │ │ │ +1758 template::type> │ │ │ │ +1759 typename enable_if<__has_esft_base<_Yp2>::value>::type │ │ │ │ +1760 _M_enable_shared_from_this_with(_Yp* __p) noexcept │ │ │ │ +1761 { │ │ │ │ +1762 if (auto __base = __enable_shared_from_this_base(_M_refcount, __p)) │ │ │ │ +1763 _____b_a_s_e->_M_weak_assign(const_cast<_Yp2*>(__p), _M_refcount); │ │ │ │ +1764 } │ │ │ │ +1765 │ │ │ │ +1766 template::type> │ │ │ │ +1767 typename enable_if::value>::type │ │ │ │ +1768 _M_enable_shared_from_this_with(_Yp*) noexcept │ │ │ │ +1769 { } │ │ │ │ +1770 │ │ │ │ +1771 void* │ │ │ │ +1772 _M_get_deleter(const _s_t_d_:_:_t_y_p_e___i_n_f_o& __ti) const noexcept │ │ │ │ +1773 { return _M_refcount._M_get_deleter(__ti); } │ │ │ │ +1774 │ │ │ │ +1775 template friend class __shared_ptr; │ │ │ │ +1776 template friend class __weak_ptr; │ │ │ │ +1777 │ │ │ │ +1778 template │ │ │ │ +1779 friend _Del* get_deleter(const __shared_ptr<_Tp1, _Lp1>&) noexcept; │ │ │ │ +1780 │ │ │ │ +1781 template │ │ │ │ +1782 friend _Del* get_deleter(const shared_ptr<_Tp1>&) noexcept; │ │ │ │ +1783 │ │ │ │ +1784#if __cplusplus >= 202002L │ │ │ │ +1785 friend _Sp_atomic>; │ │ │ │ +1786#endif │ │ │ │ +1787 │ │ │ │ +1788 element_type* _M_ptr; // Contained pointer. │ │ │ │ +1789 __shared_count<_Lp> _M_refcount; // Reference counter. │ │ │ │ +1790 }; │ │ │ │ +1791 │ │ │ │ +1792 │ │ │ │ +1793 // 20.7.2.2.7 shared_ptr comparisons │ │ │ │ +1794 template │ │ │ │ +1795 inline bool │ │ │ │ +1796 operator==(const __shared_ptr<_Tp1, _Lp>& __a, │ │ │ │ +1797 const __shared_ptr<_Tp2, _Lp>& __b) noexcept │ │ │ │ +1798 { return __a.get() == __b.get(); } │ │ │ │ +1799 │ │ │ │ +1800 template │ │ │ │ +1801 inline bool │ │ │ │ +1802 operator==(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept │ │ │ │ +1803 { return !__a; } │ │ │ │ +1804 │ │ │ │ +1805#ifdef __cpp_lib_three_way_comparison │ │ │ │ +1806 template │ │ │ │ +1807 inline strong_ordering │ │ │ │ +1808 operator<=>(const __shared_ptr<_Tp, _Lp>& __a, │ │ │ │ +1809 const __shared_ptr<_Up, _Lp>& __b) noexcept │ │ │ │ +1810 { return compare_three_way()(__a.get(), __b.get()); } │ │ │ │ +1811 │ │ │ │ +1812 template │ │ │ │ +1813 inline strong_ordering │ │ │ │ +1814 operator<=>(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept │ │ │ │ +1815 { │ │ │ │ +1816 using pointer = typename __shared_ptr<_Tp, _Lp>::element_type*; │ │ │ │ +1817 return compare_three_way()(__a.get(), static_cast(nullptr)); │ │ │ │ +1818 } │ │ │ │ +1819#else │ │ │ │ +1820 template │ │ │ │ +1821 inline bool │ │ │ │ +1822 operator==(nullptr_t, const __shared_ptr<_Tp, _Lp>& __a) noexcept │ │ │ │ +1823 { return !__a; } │ │ │ │ +1824 │ │ │ │ +1825 template │ │ │ │ +1826 inline bool │ │ │ │ +1827 operator!=(const __shared_ptr<_Tp1, _Lp>& __a, │ │ │ │ +1828 const __shared_ptr<_Tp2, _Lp>& __b) noexcept │ │ │ │ +1829 { return __a.get() != __b.get(); } │ │ │ │ +1830 │ │ │ │ +1831 template │ │ │ │ +1832 inline bool │ │ │ │ +1833 operator!=(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept │ │ │ │ +1834 { return (bool)__a; } │ │ │ │ +1835 │ │ │ │ +1836 template │ │ │ │ +1837 inline bool │ │ │ │ +1838 operator!=(nullptr_t, const __shared_ptr<_Tp, _Lp>& __a) noexcept │ │ │ │ +1839 { return (bool)__a; } │ │ │ │ +1840 │ │ │ │ +1841 template │ │ │ │ +1842 inline bool │ │ │ │ +1843 operator<(const __shared_ptr<_Tp, _Lp>& __a, │ │ │ │ +1844 const __shared_ptr<_Up, _Lp>& __b) noexcept │ │ │ │ +1845 { │ │ │ │ +1846 using _Tp_elt = typename __shared_ptr<_Tp, _Lp>::element_type; │ │ │ │ +1847 using _Up_elt = typename __shared_ptr<_Up, _Lp>::element_type; │ │ │ │ +1848 using _Vp = typename common_type<_Tp_elt*, _Up_elt*>::type; │ │ │ │ +1849 return less<_Vp>()(__a.get(), __b.get()); │ │ │ │ +1850 } │ │ │ │ +1851 │ │ │ │ +1852 template │ │ │ │ +1853 inline bool │ │ │ │ +1854 operator<(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept │ │ │ │ +1855 { │ │ │ │ +1856 using _Tp_elt = typename __shared_ptr<_Tp, _Lp>::element_type; │ │ │ │ +1857 return less<_Tp_elt*>()(__a.get(), nullptr); │ │ │ │ +1858 } │ │ │ │ +1859 │ │ │ │ +1860 template │ │ │ │ +1861 inline bool │ │ │ │ +1862 operator<(nullptr_t, const __shared_ptr<_Tp, _Lp>& __a) noexcept │ │ │ │ +1863 { │ │ │ │ +1864 using _Tp_elt = typename __shared_ptr<_Tp, _Lp>::element_type; │ │ │ │ +1865 return less<_Tp_elt*>()(nullptr, __a.get()); │ │ │ │ +1866 } │ │ │ │ +1867 │ │ │ │ +1868 template │ │ │ │ +1869 inline bool │ │ │ │ +1870 operator<=(const __shared_ptr<_Tp1, _Lp>& __a, │ │ │ │ +1871 const __shared_ptr<_Tp2, _Lp>& __b) noexcept │ │ │ │ +1872 { return !(__b < __a); } │ │ │ │ +1873 │ │ │ │ +1874 template │ │ │ │ +1875 inline bool │ │ │ │ +1876 operator<=(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept │ │ │ │ +1877 { return !(nullptr < __a); } │ │ │ │ +1878 │ │ │ │ +1879 template │ │ │ │ +1880 inline bool │ │ │ │ +1881 operator<=(nullptr_t, const __shared_ptr<_Tp, _Lp>& __a) noexcept │ │ │ │ +1882 { return !(__a < nullptr); } │ │ │ │ +1883 │ │ │ │ +1884 template │ │ │ │ +1885 inline bool │ │ │ │ +1886 operator>(const __shared_ptr<_Tp1, _Lp>& __a, │ │ │ │ +1887 const __shared_ptr<_Tp2, _Lp>& __b) noexcept │ │ │ │ +1888 { return (__b < __a); } │ │ │ │ +1889 │ │ │ │ +1890 template │ │ │ │ +1891 inline bool │ │ │ │ +1892 operator>(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept │ │ │ │ +1893 { return nullptr < __a; } │ │ │ │ +1894 │ │ │ │ +1895 template │ │ │ │ +1896 inline bool │ │ │ │ +1897 operator>(nullptr_t, const __shared_ptr<_Tp, _Lp>& __a) noexcept │ │ │ │ +1898 { return __a < nullptr; } │ │ │ │ +1899 │ │ │ │ +1900 template │ │ │ │ +1901 inline bool │ │ │ │ +1902 operator>=(const __shared_ptr<_Tp1, _Lp>& __a, │ │ │ │ +1903 const __shared_ptr<_Tp2, _Lp>& __b) noexcept │ │ │ │ +1904 { return !(__a < __b); } │ │ │ │ +1905 │ │ │ │ +1906 template │ │ │ │ +1907 inline bool │ │ │ │ +1908 operator>=(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept │ │ │ │ +1909 { return !(__a < nullptr); } │ │ │ │ +1910 │ │ │ │ +1911 template │ │ │ │ +1912 inline bool │ │ │ │ +1913 operator>=(nullptr_t, const __shared_ptr<_Tp, _Lp>& __a) noexcept │ │ │ │ +1914 { return !(nullptr < __a); } │ │ │ │ +1915#endif // three-way comparison │ │ │ │ +1916 │ │ │ │ +1917 // 20.7.2.2.8 shared_ptr specialized algorithms. │ │ │ │ +1918 template │ │ │ │ +1919 inline void │ │ │ │ +1920 _s_w_a_p(__shared_ptr<_Tp, _Lp>& __a, __shared_ptr<_Tp, _Lp>& __b) noexcept │ │ │ │ +1921 { __a.swap(__b); } │ │ │ │ +1922 │ │ │ │ +1923 // 20.7.2.2.9 shared_ptr casts │ │ │ │ +1924 │ │ │ │ +1925 // The seemingly equivalent code: │ │ │ │ +1926 // shared_ptr<_Tp, _Lp>(static_cast<_Tp*>(__r.get())) │ │ │ │ +1927 // will eventually result in undefined behaviour, attempting to │ │ │ │ +1928 // delete the same object twice. │ │ │ │ +1929 /// static_pointer_cast │ │ │ │ +1930 template │ │ │ │ +1931 inline __shared_ptr<_Tp, _Lp> │ │ │ │ +_1_9_3_2 _s_t_a_t_i_c___p_o_i_n_t_e_r___c_a_s_t(const _____s_h_a_r_e_d___p_t_r_<___T_p_1_,_ ___L_p_>& __r) noexcept │ │ │ │ +1933 { │ │ │ │ +1934 using ___S_p = _____s_h_a_r_e_d___p_t_r_<___T_p_,_ ___L_p_>; │ │ │ │ +1935 return ___S_p(__r, static_cast<_t_y_p_e_n_a_m_e _Sp::element_type*>(__r.get())); │ │ │ │ +1936 } │ │ │ │ +1937 │ │ │ │ +1938 // The seemingly equivalent code: │ │ │ │ +1939 // shared_ptr<_Tp, _Lp>(const_cast<_Tp*>(__r.get())) │ │ │ │ +1940 // will eventually result in undefined behaviour, attempting to │ │ │ │ +1941 // delete the same object twice. │ │ │ │ +1942 /// const_pointer_cast │ │ │ │ +1943 template │ │ │ │ +1944 inline __shared_ptr<_Tp, _Lp> │ │ │ │ +_1_9_4_5 _c_o_n_s_t___p_o_i_n_t_e_r___c_a_s_t(const _____s_h_a_r_e_d___p_t_r_<___T_p_1_,_ ___L_p_>& __r) noexcept │ │ │ │ +1946 { │ │ │ │ +1947 using ___S_p = _____s_h_a_r_e_d___p_t_r_<___T_p_,_ ___L_p_>; │ │ │ │ +1948 return ___S_p(__r, const_cast<_t_y_p_e_n_a_m_e _Sp::element_type*>(__r.get())); │ │ │ │ +1949 } │ │ │ │ +1950 │ │ │ │ +1951 // The seemingly equivalent code: │ │ │ │ +1952 // shared_ptr<_Tp, _Lp>(dynamic_cast<_Tp*>(__r.get())) │ │ │ │ +1953 // will eventually result in undefined behaviour, attempting to │ │ │ │ +1954 // delete the same object twice. │ │ │ │ +1955 /// dynamic_pointer_cast │ │ │ │ +1956 template │ │ │ │ +1957 inline __shared_ptr<_Tp, _Lp> │ │ │ │ +_1_9_5_8 _d_y_n_a_m_i_c___p_o_i_n_t_e_r___c_a_s_t(const _____s_h_a_r_e_d___p_t_r_<___T_p_1_,_ ___L_p_>& __r) noexcept │ │ │ │ +1959 { │ │ │ │ +1960 using ___S_p = _____s_h_a_r_e_d___p_t_r_<___T_p_,_ ___L_p_>; │ │ │ │ +1961 if (auto* __p = dynamic_cast<_t_y_p_e_n_a_m_e _Sp::element_type*>(__r.get())) │ │ │ │ +1962 return ___S_p(__r, __p); │ │ │ │ +1963 return ___S_p(); │ │ │ │ +1964 } │ │ │ │ +1965 │ │ │ │ +1966#if __cplusplus > 201402L │ │ │ │ +1967 template │ │ │ │ +1968 inline __shared_ptr<_Tp, _Lp> │ │ │ │ +1969 reinterpret_pointer_cast(const __shared_ptr<_Tp1, _Lp>& __r) noexcept │ │ │ │ +1970 { │ │ │ │ +1971 using _Sp = __shared_ptr<_Tp, _Lp>; │ │ │ │ +1972 return _Sp(__r, reinterpret_cast(__r.get())); │ │ │ │ +1973 } │ │ │ │ +1974#endif │ │ │ │ +1975 │ │ │ │ +1976 template │ │ │ │ +1977 class __weak_ptr │ │ │ │ +1978 { │ │ │ │ +1979 template │ │ │ │ +1980 using _Compatible = typename │ │ │ │ +1981 enable_if<__sp_compatible_with<_Yp*, _Tp*>::value, _Res>::type; │ │ │ │ +1982 │ │ │ │ +1983 // Constraint for assignment from shared_ptr and weak_ptr: │ │ │ │ +1984 template │ │ │ │ +1985 using _Assignable = _Compatible<_Yp, __weak_ptr&>; │ │ │ │ +1986 │ │ │ │ +1987 public: │ │ │ │ +1988 using element_type = typename remove_extent<_Tp>::type; │ │ │ │ +1989 │ │ │ │ +1990 constexpr __weak_ptr() noexcept │ │ │ │ +1991 : _M_ptr(nullptr), _M_refcount() │ │ │ │ +1992 { } │ │ │ │ +1993 │ │ │ │ +1994 __weak_ptr(const __weak_ptr&) noexcept = default; │ │ │ │ +1995 │ │ │ │ +1996 ~__weak_ptr() = default; │ │ │ │ +1997 │ │ │ │ +1998 // The "obvious" converting constructor implementation: │ │ │ │ +1999 // │ │ │ │ +2000 // template │ │ │ │ +2001 // __weak_ptr(const __weak_ptr<_Tp1, _Lp>& __r) │ │ │ │ +2002 // : _M_ptr(__r._M_ptr), _M_refcount(__r._M_refcount) // never throws │ │ │ │ +2003 // { } │ │ │ │ +2004 // │ │ │ │ +2005 // has a serious problem. │ │ │ │ +2006 // │ │ │ │ +2007 // __r._M_ptr may already have been invalidated. The _M_ptr(__r._M_ptr) │ │ │ │ +2008 // conversion may require access to *__r._M_ptr (virtual inheritance). │ │ │ │ +2009 // │ │ │ │ +2010 // It is not possible to avoid spurious access violations since │ │ │ │ +2011 // in multithreaded programs __r._M_ptr may be invalidated at any point. │ │ │ │ +2012 template> │ │ │ │ +2013 __weak_ptr(const __weak_ptr<_Yp, _Lp>& __r) noexcept │ │ │ │ +2014 : _M_refcount(__r._M_refcount) │ │ │ │ +2015 { _M_ptr = __r.lock().get(); } │ │ │ │ +2016 │ │ │ │ +2017 template> │ │ │ │ +2018 __weak_ptr(const __shared_ptr<_Yp, _Lp>& __r) noexcept │ │ │ │ +2019 : _M_ptr(__r._M_ptr), _M_refcount(__r._M_refcount) │ │ │ │ +2020 { } │ │ │ │ +2021 │ │ │ │ +2022 __weak_ptr(__weak_ptr&& __r) noexcept │ │ │ │ +2023 : _M_ptr(__r._M_ptr), _M_refcount(_s_t_d_:_:_m_o_v_e(__r._M_refcount)) │ │ │ │ +2024 { __r._M_ptr = nullptr; } │ │ │ │ +2025 │ │ │ │ +2026 template> │ │ │ │ +2027 __weak_ptr(__weak_ptr<_Yp, _Lp>&& __r) noexcept │ │ │ │ +2028 : _M_ptr(__r.lock().get()), _M_refcount(_s_t_d_:_:_m_o_v_e(__r._M_refcount)) │ │ │ │ +2029 { __r._M_ptr = nullptr; } │ │ │ │ +2030 │ │ │ │ +2031 __weak_ptr& │ │ │ │ +2032 operator=(const __weak_ptr& __r) noexcept = default; │ │ │ │ +2033 │ │ │ │ +2034 template │ │ │ │ +2035 _Assignable<_Yp> │ │ │ │ +2036 operator=(const __weak_ptr<_Yp, _Lp>& __r) noexcept │ │ │ │ +2037 { │ │ │ │ +2038 _M_ptr = __r.lock().get(); │ │ │ │ +2039 _M_refcount = __r._M_refcount; │ │ │ │ +2040 return *this; │ │ │ │ +2041 } │ │ │ │ +2042 │ │ │ │ +2043 template │ │ │ │ +2044 _Assignable<_Yp> │ │ │ │ +2045 operator=(const __shared_ptr<_Yp, _Lp>& __r) noexcept │ │ │ │ +2046 { │ │ │ │ +2047 _M_ptr = __r._M_ptr; │ │ │ │ +2048 _M_refcount = __r._M_refcount; │ │ │ │ +2049 return *this; │ │ │ │ +2050 } │ │ │ │ +2051 │ │ │ │ +2052 __weak_ptr& │ │ │ │ +2053 operator=(__weak_ptr&& __r) noexcept │ │ │ │ +2054 { │ │ │ │ +2055 __weak_ptr(_s_t_d_:_:_m_o_v_e(__r)).swap(*this); │ │ │ │ +2056 return *this; │ │ │ │ +2057 } │ │ │ │ +2058 │ │ │ │ +2059 template │ │ │ │ +2060 _Assignable<_Yp> │ │ │ │ +2061 operator=(__weak_ptr<_Yp, _Lp>&& __r) noexcept │ │ │ │ +2062 { │ │ │ │ +2063 _M_ptr = __r.lock().get(); │ │ │ │ +2064 _M_refcount = _s_t_d_:_:_m_o_v_e(__r._M_refcount); │ │ │ │ +2065 __r._M_ptr = nullptr; │ │ │ │ +2066 return *this; │ │ │ │ +2067 } │ │ │ │ +2068 │ │ │ │ +2069 __shared_ptr<_Tp, _Lp> │ │ │ │ +2070 _l_o_c_k() const noexcept │ │ │ │ +2071 { return __shared_ptr(*this, std::nothrow); } │ │ │ │ +2072 │ │ │ │ +2073 long │ │ │ │ +2074 use_count() const noexcept │ │ │ │ +2075 { return _M_refcount._M_get_use_count(); } │ │ │ │ +2076 │ │ │ │ +2077 bool │ │ │ │ +2078 expired() const noexcept │ │ │ │ +2079 { return _M_refcount._M_get_use_count() == 0; } │ │ │ │ +2080 │ │ │ │ +2081 template │ │ │ │ +2082 bool │ │ │ │ +2083 owner_before(const __shared_ptr<_Tp1, _Lp>& __rhs) const noexcept │ │ │ │ +2084 { return _M_refcount._M_less(__rhs._M_refcount); } │ │ │ │ +2085 │ │ │ │ +2086 template │ │ │ │ +2087 bool │ │ │ │ +2088 owner_before(const __weak_ptr<_Tp1, _Lp>& __rhs) const noexcept │ │ │ │ +2089 { return _M_refcount._M_less(__rhs._M_refcount); } │ │ │ │ +2090 │ │ │ │ +2091 void │ │ │ │ +2092 reset() noexcept │ │ │ │ +2093 { __weak_ptr().swap(*this); } │ │ │ │ +2094 │ │ │ │ +2095 void │ │ │ │ +2096 swap(__weak_ptr& __s) noexcept │ │ │ │ +2097 { │ │ │ │ +2098 _s_t_d_:_:_s_w_a_p(_M_ptr, __s._M_ptr); │ │ │ │ +2099 _M_refcount._M_swap(__s._M_refcount); │ │ │ │ +2100 } │ │ │ │ +2101 │ │ │ │ +2102 private: │ │ │ │ +2103 // Used by __enable_shared_from_this. │ │ │ │ +2104 void │ │ │ │ +2105 _M_assign(_Tp* __ptr, const __shared_count<_Lp>& __refcount) noexcept │ │ │ │ +2106 { │ │ │ │ +2107 if (use_count() == 0) │ │ │ │ +2108 { │ │ │ │ +2109 _M_ptr = __ptr; │ │ │ │ +2110 _M_refcount = __refcount; │ │ │ │ +2111 } │ │ │ │ +2112 } │ │ │ │ +2113 │ │ │ │ +2114 template friend class __shared_ptr; │ │ │ │ +2115 template friend class __weak_ptr; │ │ │ │ +2116 friend class __enable_shared_from_this<_Tp, _Lp>; │ │ │ │ +2117 friend class enable_shared_from_this<_Tp>; │ │ │ │ +2118#if __cplusplus >= 202002L │ │ │ │ +2119 friend _Sp_atomic>; │ │ │ │ +2120#endif │ │ │ │ +2121 │ │ │ │ +2122 element_type* _M_ptr; // Contained pointer. │ │ │ │ +2123 __weak_count<_Lp> _M_refcount; // Reference counter. │ │ │ │ +2124 }; │ │ │ │ +2125 │ │ │ │ +2126 // 20.7.2.3.6 weak_ptr specialized algorithms. │ │ │ │ +2127 template │ │ │ │ +2128 inline void │ │ │ │ +2129 _s_w_a_p(__weak_ptr<_Tp, _Lp>& __a, __weak_ptr<_Tp, _Lp>& __b) noexcept │ │ │ │ +2130 { __a.swap(__b); } │ │ │ │ +2131 │ │ │ │ +2132#pragma GCC diagnostic push │ │ │ │ +2133#pragma GCC diagnostic ignored "-Wdeprecated-declarations" │ │ │ │ +2134 template │ │ │ │ +2135 struct _Sp_owner_less : public binary_function<_Tp, _Tp, bool> │ │ │ │ +2136 { │ │ │ │ +2137 bool │ │ │ │ +2138 operator()(const _Tp& __lhs, const _Tp& __rhs) const noexcept │ │ │ │ +2139 { return __lhs.owner_before(__rhs); } │ │ │ │ +2140 │ │ │ │ +2141 bool │ │ │ │ +2142 operator()(const _Tp& __lhs, const _Tp1& __rhs) const noexcept │ │ │ │ +2143 { return __lhs.owner_before(__rhs); } │ │ │ │ +2144 │ │ │ │ +2145 bool │ │ │ │ +2146 operator()(const _Tp1& __lhs, const _Tp& __rhs) const noexcept │ │ │ │ +2147 { return __lhs.owner_before(__rhs); } │ │ │ │ +2148 }; │ │ │ │ +2149#pragma GCC diagnostic pop │ │ │ │ +2150 │ │ │ │ +2151 template<> │ │ │ │ +2152 struct _Sp_owner_less │ │ │ │ +2153 { │ │ │ │ +2154 template │ │ │ │ +2155 auto │ │ │ │ +2156 operator()(const _Tp& __lhs, const _Up& __rhs) const noexcept │ │ │ │ +2157 -> decltype(__lhs.owner_before(__rhs)) │ │ │ │ +2158 { return __lhs.owner_before(__rhs); } │ │ │ │ +2159 │ │ │ │ +2160 using is_transparent = void; │ │ │ │ +2161 }; │ │ │ │ +2162 │ │ │ │ +2163 template │ │ │ │ +2164 struct owner_less<__shared_ptr<_Tp, _Lp>> │ │ │ │ +2165 : public _Sp_owner_less<__shared_ptr<_Tp, _Lp>, __weak_ptr<_Tp, _Lp>> │ │ │ │ +2166 { }; │ │ │ │ +2167 │ │ │ │ +2168 template │ │ │ │ +2169 struct owner_less<__weak_ptr<_Tp, _Lp>> │ │ │ │ +2170 : public _Sp_owner_less<__weak_ptr<_Tp, _Lp>, __shared_ptr<_Tp, _Lp>> │ │ │ │ +2171 { }; │ │ │ │ +2172 │ │ │ │ +2173 │ │ │ │ +2174 template │ │ │ │ +2175 class __enable_shared_from_this │ │ │ │ +2176 { │ │ │ │ +2177 protected: │ │ │ │ +2178 constexpr __enable_shared_from_this() noexcept { } │ │ │ │ +2179 │ │ │ │ +2180 __enable_shared_from_this(const __enable_shared_from_this&) noexcept { } │ │ │ │ +2181 │ │ │ │ +2182 __enable_shared_from_this& │ │ │ │ +2183 operator=(const __enable_shared_from_this&) noexcept │ │ │ │ +2184 { return *this; } │ │ │ │ +2185 │ │ │ │ +2186 ~__enable_shared_from_this() { } │ │ │ │ +2187 │ │ │ │ +2188 public: │ │ │ │ +2189 __shared_ptr<_Tp, _Lp> │ │ │ │ +2190 shared_from_this() │ │ │ │ +2191 { return __shared_ptr<_Tp, _Lp>(this->_M_weak_this); } │ │ │ │ +2192 │ │ │ │ +2193 __shared_ptr │ │ │ │ +2194 shared_from_this() const │ │ │ │ +2195 { return __shared_ptr(this->_M_weak_this); } │ │ │ │ +2196 │ │ │ │ +2197#if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11 │ │ │ │ +2198 __weak_ptr<_Tp, _Lp> │ │ │ │ +2199 weak_from_this() noexcept │ │ │ │ +2200 { return this->_M_weak_this; } │ │ │ │ +2201 │ │ │ │ +2202 __weak_ptr │ │ │ │ +2203 weak_from_this() const noexcept │ │ │ │ +2204 { return this->_M_weak_this; } │ │ │ │ +2205#endif │ │ │ │ +2206 │ │ │ │ +2207 private: │ │ │ │ +2208 template │ │ │ │ +2209 void │ │ │ │ +2210 _M_weak_assign(_Tp1* __p, const __shared_count<_Lp>& __n) const noexcept │ │ │ │ +2211 { _M_weak_this._M_assign(__p, __n); } │ │ │ │ +2212 │ │ │ │ +2213 friend const __enable_shared_from_this* │ │ │ │ +2214 __enable_shared_from_this_base(const __shared_count<_Lp>&, │ │ │ │ +2215 const __enable_shared_from_this* __p) │ │ │ │ +2216 { return __p; } │ │ │ │ +2217 │ │ │ │ +2218 template │ │ │ │ +2219 friend class __shared_ptr; │ │ │ │ +2220 │ │ │ │ +2221 mutable __weak_ptr<_Tp, _Lp> _M_weak_this; │ │ │ │ +2222 }; │ │ │ │ +2223 │ │ │ │ +2224 template │ │ │ │ +2226 inline __shared_ptr<_Tp, _Lp> │ │ │ │ +2227 __allocate_shared(const _Alloc& __a, _Args&&... __args) │ │ │ │ +2228 { │ │ │ │ +2229 static_assert(!is_array<_Tp>::value, "make_shared not supported"); │ │ │ │ +2230 │ │ │ │ +2231 return __shared_ptr<_Tp, _Lp>(_Sp_alloc_shared_tag<_Alloc>{__a}, │ │ │ │ +2232 _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(__args)...); │ │ │ │ +2233 } │ │ │ │ +2234 │ │ │ │ +2235 template │ │ │ │ +2237 inline __shared_ptr<_Tp, _Lp> │ │ │ │ +2238 __make_shared(_Args&&... __args) │ │ │ │ +2239 { │ │ │ │ +2240 typedef typename std::remove_const<_Tp>::type _Tp_nc; │ │ │ │ +2241 return _s_t_d_:_:_____a_l_l_o_c_a_t_e___s_h_a_r_e_d_<___T_p_,_ ___L_p_>(_s_t_d_:_:_a_l_l_o_c_a_t_o_r_<___T_p___n_c_>(), │ │ │ │ +2242 _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(__args)...); │ │ │ │ +2243 } │ │ │ │ +2244 │ │ │ │ +2245 /// std::hash specialization for __shared_ptr. │ │ │ │ +2246 template │ │ │ │ +_2_2_4_7 struct _h_a_s_h<__shared_ptr<_Tp, ___L_p>> │ │ │ │ +2248 : public __hash_base> │ │ │ │ +2249 { │ │ │ │ +2250 size_t │ │ │ │ +2251 operator()(const _____s_h_a_r_e_d___p_t_r_<___T_p_,_ ___L_p_>& _____s) const noexcept │ │ │ │ +2252 { │ │ │ │ +2253 return _h_a_s_h_<_t_y_p_e_n_a_m_e_ _____s_h_a_r_e_d___p_t_r_<___T_p_,_ ___L_p_>_:_:_e_l_e_m_e_n_t___t_y_p_e*>()( │ │ │ │ +2254 _____s.get()); │ │ │ │ +2255 } │ │ │ │ +2256 }; │ │ │ │ +2257 │ │ │ │ +2258_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ +2259} // namespace │ │ │ │ +2260 │ │ │ │ +2261#endif // _SHARED_PTR_BASE_H │ │ │ │ +_c_o_m_p_a_r_e │ │ │ │ +_t_y_p_e_i_n_f_o │ │ │ │ +_b_i_t │ │ │ │ +_f_u_n_c_t_i_o_n_a_l___h_a_s_h_._h │ │ │ │ +_s_t_l___u_n_i_n_i_t_i_a_l_i_z_e_d_._h │ │ │ │ +_s_t_l___f_u_n_c_t_i_o_n_._h │ │ │ │ +_a_l_i_g_n_._h │ │ │ │ +_a_l_l_o_c_a_t_o_r_._h │ │ │ │ +_r_e_f_w_r_a_p_._h │ │ │ │ +_a_l_l_o_c_a_t_e_d___p_t_r_._h │ │ │ │ +_e_x_c_e_p_t_i_o_n___d_e_f_i_n_e_s_._h │ │ │ │ +_u_n_i_q_u_e___p_t_r_._h │ │ │ │ +_c_o_n_c_u_r_r_e_n_c_e_._h │ │ │ │ +_a_l_i_g_n_e_d___b_u_f_f_e_r_._h │ │ │ │ +_a_t_o_m_i_c_i_t_y_._h │ │ │ │ +_s_t_d_:_:_o_p_e_r_a_t_o_r_* │ │ │ │ +constexpr complex< _Tp > operator*(const complex< _Tp > &__x, const complex< │ │ │ │ +_Tp > &__y) │ │ │ │ +Return new complex value x times y. │ │ │ │ +DDeeffiinniittiioonn _c_o_m_p_l_e_x_:_3_9_2 │ │ │ │ +_s_t_d_:_:_u_n_i_n_i_t_i_a_l_i_z_e_d___d_e_f_a_u_l_t___c_o_n_s_t_r_u_c_t___n │ │ │ │ +_ForwardIterator uninitialized_default_construct_n(_ForwardIterator __first, │ │ │ │ +_Size __count) │ │ │ │ +Default-initializes objects in the range [first,first+count). │ │ │ │ +DDeeffiinniittiioonn _s_t_l___u_n_i_n_i_t_i_a_l_i_z_e_d_._h_:_9_8_5 │ │ │ │ +_s_t_d_:_:_a_l_i_g_n │ │ │ │ +void * align(size_t __align, size_t __size, void *&__ptr, size_t &__space) │ │ │ │ +noexcept │ │ │ │ +Fit aligned storage in buffer. │ │ │ │ +DDeeffiinniittiioonn _a_l_i_g_n_._h_:_6_2 │ │ │ │ +_s_t_d_:_:_t_o___a_d_d_r_e_s_s │ │ │ │ +constexpr _Tp * to_address(_Tp *__ptr) noexcept │ │ │ │ +Obtain address referenced by a pointer to an object. │ │ │ │ +DDeeffiinniittiioonn _p_t_r___t_r_a_i_t_s_._h_:_2_4_7 │ │ │ │ +_s_t_d_:_:_t_r_u_e___t_y_p_e │ │ │ │ +integral_constant< bool, true > true_type │ │ │ │ +The type used as a compile-time boolean with true value. │ │ │ │ +DDeeffiinniittiioonn _t_y_p_e___t_r_a_i_t_s_:_8_2 │ │ │ │ +_s_t_d_:_:_f_a_l_s_e___t_y_p_e │ │ │ │ +integral_constant< bool, false > false_type │ │ │ │ +The type used as a compile-time boolean with false value. │ │ │ │ +DDeeffiinniittiioonn _t_y_p_e___t_r_a_i_t_s_:_8_5 │ │ │ │ +_s_t_d_:_:_d_e_c_l_v_a_l │ │ │ │ +auto declval() noexcept -> decltype(__declval< _Tp >(0)) │ │ │ │ +DDeeffiinniittiioonn _t_y_p_e___t_r_a_i_t_s_:_2_3_8_7 │ │ │ │ +_s_t_d_:_:_m_o_v_e │ │ │ │ +constexpr std::remove_reference< _Tp >::type && move(_Tp &&__t) noexcept │ │ │ │ +Convert a value to an rvalue. │ │ │ │ +DDeeffiinniittiioonn _m_o_v_e_._h_:_1_0_4 │ │ │ │ +_s_t_d_:_:_s_w_a_p │ │ │ │ +void swap(any &__x, any &__y) noexcept │ │ │ │ +Exchange the states of two any objects. │ │ │ │ +DDeeffiinniittiioonn _a_n_y_:_4_2_9 │ │ │ │ +_s_t_d_:_:_____a_d_d_r_e_s_s_o_f │ │ │ │ +constexpr _Tp * __addressof(_Tp &__r) noexcept │ │ │ │ +Same as C++11 std::addressof. │ │ │ │ +DDeeffiinniittiioonn _m_o_v_e_._h_:_4_9 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d │ │ │ │ +constexpr _Tp && forward(typename std::remove_reference< _Tp >::type &__t) │ │ │ │ +noexcept │ │ │ │ +Forward an lvalue. │ │ │ │ +DDeeffiinniittiioonn _m_o_v_e_._h_:_7_7 │ │ │ │ +_s_t_d_:_:_l_o_c_k │ │ │ │ +void lock(_L1 &__l1, _L2 &__l2, _L3 &... __l3) │ │ │ │ +Generic lock. │ │ │ │ +DDeeffiinniittiioonn _m_u_t_e_x_:_6_7_7 │ │ │ │ _s_t_d │ │ │ │ ISO C++ entities toplevel namespace is std. │ │ │ │ -_s_t_d_:_:_t_h_i_s___t_h_r_e_a_d_:_:_s_l_e_e_p___u_n_t_i_l │ │ │ │ -void sleep_until(const chrono::time_point< _Clock, _Duration > &__atime) │ │ │ │ -this_thread::sleep_until │ │ │ │ -DDeeffiinniittiioonn _t_h_i_s___t_h_r_e_a_d___s_l_e_e_p_._h_:_9_0 │ │ │ │ -_s_t_d_:_:_t_h_i_s___t_h_r_e_a_d_:_:_s_l_e_e_p___f_o_r │ │ │ │ -void sleep_for(const chrono::duration< _Rep, _Period > &__rtime) │ │ │ │ -this_thread::sleep_for │ │ │ │ -DDeeffiinniittiioonn _t_h_i_s___t_h_r_e_a_d___s_l_e_e_p_._h_:_6_8 │ │ │ │ -_s_t_d_:_:_c_h_r_o_n_o_:_:_d_u_r_a_t_i_o_n │ │ │ │ -chrono::duration represents a distance between two points in time │ │ │ │ -DDeeffiinniittiioonn _c_h_r_o_n_o_._h_:_4_8_8 │ │ │ │ -_s_t_d_:_:_c_h_r_o_n_o_:_:_t_i_m_e___p_o_i_n_t │ │ │ │ -chrono::time_point represents a point in time as measured by a clock │ │ │ │ -DDeeffiinniittiioonn _c_h_r_o_n_o_._h_:_9_0_1 │ │ │ │ +_s_t_d_:_:_d_y_n_a_m_i_c___p_o_i_n_t_e_r___c_a_s_t │ │ │ │ +__shared_ptr< _Tp, _Lp > dynamic_pointer_cast(const __shared_ptr< _Tp1, _Lp > │ │ │ │ +&__r) noexcept │ │ │ │ +dynamic_pointer_cast │ │ │ │ +DDeeffiinniittiioonn _s_h_a_r_e_d___p_t_r___b_a_s_e_._h_:_1_9_5_8 │ │ │ │ +_s_t_d_:_:_s_t_a_t_i_c___p_o_i_n_t_e_r___c_a_s_t │ │ │ │ +__shared_ptr< _Tp, _Lp > static_pointer_cast(const __shared_ptr< _Tp1, _Lp > │ │ │ │ +&__r) noexcept │ │ │ │ +static_pointer_cast │ │ │ │ +DDeeffiinniittiioonn _s_h_a_r_e_d___p_t_r___b_a_s_e_._h_:_1_9_3_2 │ │ │ │ +_s_t_d_:_:_c_o_n_s_t___p_o_i_n_t_e_r___c_a_s_t │ │ │ │ +__shared_ptr< _Tp, _Lp > const_pointer_cast(const __shared_ptr< _Tp1, _Lp > │ │ │ │ +&__r) noexcept │ │ │ │ +const_pointer_cast │ │ │ │ +DDeeffiinniittiioonn _s_h_a_r_e_d___p_t_r___b_a_s_e_._h_:_1_9_4_5 │ │ │ │ +_____g_n_u___d_e_b_u_g_:_:_____b_a_s_e │ │ │ │ +constexpr _Iterator __base(_Iterator __it) │ │ │ │ +DDeeffiinniittiioonn _h_e_l_p_e_r___f_u_n_c_t_i_o_n_s_._h_:_3_1_6 │ │ │ │ +_s_t_d_:_:_t_y_p_e___i_n_f_o │ │ │ │ +Part of RTTI. │ │ │ │ +DDeeffiinniittiioonn _t_y_p_e_i_n_f_o_:_9_3 │ │ │ │ +_s_t_d_:_:_h_a_s_h │ │ │ │ +Primary class template hash. │ │ │ │ +DDeeffiinniittiioonn _f_u_n_c_t_i_o_n_a_l___h_a_s_h_._h_:_1_0_3 │ │ │ │ +_s_t_d_:_:_e_x_c_e_p_t_i_o_n │ │ │ │ +Base class for all library exceptions. │ │ │ │ +DDeeffiinniittiioonn _e_x_c_e_p_t_i_o_n_._h_:_6_2 │ │ │ │ +_s_t_d_:_:_b_a_d___w_e_a_k___p_t_r │ │ │ │ +Exception possibly thrown by shared_ptr. │ │ │ │ +DDeeffiinniittiioonn _s_h_a_r_e_d___p_t_r___b_a_s_e_._h_:_8_6 │ │ │ │ +_s_t_d_:_:_b_a_d___w_e_a_k___p_t_r_:_:_w_h_a_t │ │ │ │ +virtual char const * what() const noexcept │ │ │ │ _s_t_d_:_:_a_u_t_o___p_t_r___r_e_f │ │ │ │ DDeeffiinniittiioonn _a_u_t_o___p_t_r_._h_:_4_9 │ │ │ │ +_____g_n_u___c_x_x_:_:_____s_c_o_p_e_d___l_o_c_k │ │ │ │ +Scoped lock idiom. │ │ │ │ +DDeeffiinniittiioonn _c_o_n_c_u_r_r_e_n_c_e_._h_:_2_2_9 │ │ │ │ * _b_i_t_s │ │ │ │ - * _t_h_i_s___t_h_r_e_a_d___s_l_e_e_p_._h │ │ │ │ + * _s_h_a_r_e_d___p_t_r___b_a_s_e_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-12-base/libstdc++/user/a00395.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: stringfwd.h File Reference │ │ │ +libstdc++: vector.tcc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -47,45 +47,56 @@ │ │ │ $(document).ready(function(){initNavTree('a00395.html',''); initResizable(); }); │ │ │ /* @license-end */ │ │ │ │ │ │
│ │ │
│ │ │ │ │ │ -
stringfwd.h File Reference
│ │ │ +Macros
│ │ │ +
vector.tcc File Reference
│ │ │
│ │ │
│ │ │ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Namespaces

namespace  std
 
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ -Typedefs

typedef basic_string< char > std::string
 
typedef basic_string< char16_tstd::u16string
 
typedef basic_string< char32_tstd::u32string
 
typedef basic_string< wchar_t > std::wstring
 

│ │ │ +Macros

#define _VECTOR_TCC
 
│ │ │

Detailed Description

│ │ │ -

This is an internal header file, included by other library headers. Do not attempt to use it directly. Instead, include <string>.

│ │ │ +

This is an internal header file, included by other library headers. Do not attempt to use it directly. Instead, include <vector>.

│ │ │ │ │ │ -

Definition in file stringfwd.h.

│ │ │ -
│ │ │ +

Definition in file vector.tcc.

│ │ │ +

Macro Definition Documentation

│ │ │ + │ │ │ +

◆ _VECTOR_TCC

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
#define _VECTOR_TCC
│ │ │ +
│ │ │ + │ │ │ +

Definition at line 57 of file vector.tcc.

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ +
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,23 +1,21 @@ │ │ │ │ libstdc++ │ │ │ │ -_N_a_m_e_s_p_a_c_e_s | _T_y_p_e_d_e_f_s │ │ │ │ -stringfwd.h File Reference │ │ │ │ +_N_a_m_e_s_p_a_c_e_s | _M_a_c_r_o_s │ │ │ │ +vector.tcc File Reference │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _s_t_d │ │ │ │   │ │ │ │ -TTyyppeeddeeffss │ │ │ │ - _t_y_p_e_d_e_f _b_a_s_i_c___s_t_r_i_n_g< char >  _s_t_d_:_:_s_t_r_i_n_g │ │ │ │ -  │ │ │ │ -_t_y_p_e_d_e_f _b_a_s_i_c___s_t_r_i_n_g< _c_h_a_r_1_6___t >  _s_t_d_:_:_u_1_6_s_t_r_i_n_g │ │ │ │ -  │ │ │ │ -_t_y_p_e_d_e_f _b_a_s_i_c___s_t_r_i_n_g< _c_h_a_r_3_2___t >  _s_t_d_:_:_u_3_2_s_t_r_i_n_g │ │ │ │ -  │ │ │ │ - _t_y_p_e_d_e_f _b_a_s_i_c___s_t_r_i_n_g< wchar_t >  _s_t_d_:_:_w_s_t_r_i_n_g │ │ │ │ +MMaaccrrooss │ │ │ │ +#define  ___V_E_C_T_O_R___T_C_C │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ This is an internal header file, included by other library headers. Do not │ │ │ │ -attempt to use it directly. Instead, include . │ │ │ │ -Definition in file _s_t_r_i_n_g_f_w_d_._h. │ │ │ │ +attempt to use it directly. Instead, include . │ │ │ │ +Definition in file _v_e_c_t_o_r_._t_c_c. │ │ │ │ +********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ +********** _?◆_? __VVEECCTTOORR__TTCCCC ********** │ │ │ │ +#define _VECTOR_TCC │ │ │ │ +Definition at line _5_7 of file _v_e_c_t_o_r_._t_c_c. │ │ │ │ * _b_i_t_s │ │ │ │ - * _s_t_r_i_n_g_f_w_d_._h │ │ │ │ + * _v_e_c_t_o_r_._t_c_c │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-12-base/libstdc++/user/a00395_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: stringfwd.h Source File │ │ │ +libstdc++: vector.tcc Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -45,18 +45,18 @@ │ │ │ │ │ │
│ │ │
│ │ │ -
stringfwd.h
│ │ │ +
vector.tcc
│ │ │
│ │ │
│ │ │ -Go to the documentation of this file.
1// <string> Forward declarations -*- C++ -*-
│ │ │ +Go to the documentation of this file.
1// Vector implementation (out of line) -*- C++ -*-
│ │ │
2
│ │ │
3// Copyright (C) 2001-2022 Free Software Foundation, Inc.
│ │ │
4//
│ │ │
5// This file is part of the GNU ISO C++ Library. This library is free
│ │ │
6// software; you can redistribute it and/or modify it under the
│ │ │
7// terms of the GNU General Public License as published by the
│ │ │
8// Free Software Foundation; either version 3, or (at your option)
│ │ │ @@ -71,103 +71,1067 @@ │ │ │
17// permissions described in the GCC Runtime Library Exception, version
│ │ │
18// 3.1, as published by the Free Software Foundation.
│ │ │
19
│ │ │
20// You should have received a copy of the GNU General Public License and
│ │ │
21// a copy of the GCC Runtime Library Exception along with this program;
│ │ │
22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
│ │ │
23// <http://www.gnu.org/licenses/>.
│ │ │ -
24
│ │ │ -
25/** @file bits/stringfwd.h
│ │ │ -
26 * This is an internal header file, included by other library headers.
│ │ │ -
27 * Do not attempt to use it directly. @headername{string}
│ │ │ -
28 */
│ │ │ -
29
│ │ │ -
30//
│ │ │ -
31// ISO C++ 14882: 21 Strings library
│ │ │ -
32//
│ │ │ -
33
│ │ │ -
34#ifndef _STRINGFWD_H
│ │ │ -
35#define _STRINGFWD_H 1
│ │ │ -
36
│ │ │ -
37#pragma GCC system_header
│ │ │ -
38
│ │ │ -
39#include <bits/c++config.h>
│ │ │ -
40#include <bits/memoryfwd.h>
│ │ │ -
41
│ │ │ -
42namespace std _GLIBCXX_VISIBILITY(default)
│ │ │ -
43{
│ │ │ -
44_GLIBCXX_BEGIN_NAMESPACE_VERSION
│ │ │ -
45
│ │ │ -
46 /**
│ │ │ -
47 * @defgroup strings Strings
│ │ │ -
48 *
│ │ │ -
49 * @{
│ │ │ -
50 */
│ │ │ -
51
│ │ │ -
52 template<class _CharT>
│ │ │ -
53 struct char_traits;
│ │ │ -
54
│ │ │ -
55 template<> struct char_traits<char>;
│ │ │ -
56
│ │ │ -
57 template<> struct char_traits<wchar_t>;
│ │ │ +
24
│ │ │ +
25/*
│ │ │ +
26 *
│ │ │ +
27 * Copyright (c) 1994
│ │ │ +
28 * Hewlett-Packard Company
│ │ │ +
29 *
│ │ │ +
30 * Permission to use, copy, modify, distribute and sell this software
│ │ │ +
31 * and its documentation for any purpose is hereby granted without fee,
│ │ │ +
32 * provided that the above copyright notice appear in all copies and
│ │ │ +
33 * that both that copyright notice and this permission notice appear
│ │ │ +
34 * in supporting documentation. Hewlett-Packard Company makes no
│ │ │ +
35 * representations about the suitability of this software for any
│ │ │ +
36 * purpose. It is provided "as is" without express or implied warranty.
│ │ │ +
37 *
│ │ │ +
38 *
│ │ │ +
39 * Copyright (c) 1996
│ │ │ +
40 * Silicon Graphics Computer Systems, Inc.
│ │ │ +
41 *
│ │ │ +
42 * Permission to use, copy, modify, distribute and sell this software
│ │ │ +
43 * and its documentation for any purpose is hereby granted without fee,
│ │ │ +
44 * provided that the above copyright notice appear in all copies and
│ │ │ +
45 * that both that copyright notice and this permission notice appear
│ │ │ +
46 * in supporting documentation. Silicon Graphics makes no
│ │ │ +
47 * representations about the suitability of this software for any
│ │ │ +
48 * purpose. It is provided "as is" without express or implied warranty.
│ │ │ +
49 */
│ │ │ +
50
│ │ │ +
51/** @file bits/vector.tcc
│ │ │ +
52 * This is an internal header file, included by other library headers.
│ │ │ +
53 * Do not attempt to use it directly. @headername{vector}
│ │ │ +
54 */
│ │ │ +
55
│ │ │ +
56#ifndef _VECTOR_TCC
│ │ │ +
57#define _VECTOR_TCC 1
│ │ │
58
│ │ │ -
59#ifdef _GLIBCXX_USE_CHAR8_T
│ │ │ -
60 template<> struct char_traits<char8_t>;
│ │ │ -
61#endif
│ │ │ -
62
│ │ │ -
63#if __cplusplus >= 201103L
│ │ │ -
64 template<> struct char_traits<char16_t>;
│ │ │ -
65 template<> struct char_traits<char32_t>;
│ │ │ -
66#endif
│ │ │ -
67
│ │ │ -
68_GLIBCXX_BEGIN_NAMESPACE_CXX11
│ │ │ -
69
│ │ │ -
70 template<typename _CharT, typename _Traits = char_traits<_CharT>,
│ │ │ -
71 typename _Alloc = allocator<_CharT> >
│ │ │ -
72 class basic_string;
│ │ │ -
73
│ │ │ -
74_GLIBCXX_END_NAMESPACE_CXX11
│ │ │ -
75
│ │ │ -
76 /// A string of @c char
│ │ │ - │ │ │ -
78
│ │ │ -
79 /// A string of @c wchar_t
│ │ │ - │ │ │ -
81
│ │ │ -
82#ifdef _GLIBCXX_USE_CHAR8_T
│ │ │ -
83 /// A string of @c char8_t
│ │ │ -
84 typedef basic_string<char8_t> u8string;
│ │ │ -
85#endif
│ │ │ -
86
│ │ │ -
87#if __cplusplus >= 201103L
│ │ │ -
88 /// A string of @c char16_t
│ │ │ - │ │ │ -
90
│ │ │ -
91 /// A string of @c char32_t
│ │ │ - │ │ │ -
93#endif
│ │ │ -
94
│ │ │ -
95 /** @} */
│ │ │ -
96
│ │ │ -
97_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ -
98} // namespace std
│ │ │ -
99
│ │ │ -
100#endif // _STRINGFWD_H
│ │ │ - │ │ │ - │ │ │ -
basic_string< char > string
A string of char.
Definition stringfwd.h:77
│ │ │ -
basic_string< char32_t > u32string
A string of char32_t.
Definition stringfwd.h:92
│ │ │ -
basic_string< char16_t > u16string
A string of char16_t.
Definition stringfwd.h:89
│ │ │ -
basic_string< wchar_t > wstring
A string of wchar_t.
Definition stringfwd.h:80
│ │ │ +
59namespace std _GLIBCXX_VISIBILITY(default)
│ │ │ +
60{
│ │ │ +
61_GLIBCXX_BEGIN_NAMESPACE_VERSION
│ │ │ +
62_GLIBCXX_BEGIN_NAMESPACE_CONTAINER
│ │ │ +
63
│ │ │ +
64 template<typename _Tp, typename _Alloc>
│ │ │ +
65 _GLIBCXX20_CONSTEXPR
│ │ │ +
66 void
│ │ │ +
│ │ │ + │ │ │ +
68 reserve(size_type __n)
│ │ │ +
69 {
│ │ │ +
70 if (__n > this->max_size())
│ │ │ +
71 __throw_length_error(__N("vector::reserve"));
│ │ │ +
72 if (this->capacity() < __n)
│ │ │ +
73 {
│ │ │ +
74 const size_type __old_size = size();
│ │ │ +
75 pointer __tmp;
│ │ │ +
76#if __cplusplus >= 201103L
│ │ │ +
77 if _GLIBCXX17_CONSTEXPR (_S_use_relocate())
│ │ │ +
78 {
│ │ │ +
79 __tmp = this->_M_allocate(__n);
│ │ │ +
80 _S_relocate(this->_M_impl._M_start, this->_M_impl._M_finish,
│ │ │ +
81 __tmp, _M_get_Tp_allocator());
│ │ │ +
82 }
│ │ │ +
83 else
│ │ │ +
84#endif
│ │ │ +
85 {
│ │ │ +
86 __tmp = _M_allocate_and_copy(__n,
│ │ │ +
87 _GLIBCXX_MAKE_MOVE_IF_NOEXCEPT_ITERATOR(this->_M_impl._M_start),
│ │ │ +
88 _GLIBCXX_MAKE_MOVE_IF_NOEXCEPT_ITERATOR(this->_M_impl._M_finish));
│ │ │ +
89 std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
│ │ │ +
90 _M_get_Tp_allocator());
│ │ │ +
91 }
│ │ │ +
92 _GLIBCXX_ASAN_ANNOTATE_REINIT;
│ │ │ +
93 _M_deallocate(this->_M_impl._M_start,
│ │ │ +
94 this->_M_impl._M_end_of_storage
│ │ │ +
95 - this->_M_impl._M_start);
│ │ │ +
96 this->_M_impl._M_start = __tmp;
│ │ │ +
97 this->_M_impl._M_finish = __tmp + __old_size;
│ │ │ +
98 this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n;
│ │ │ +
99 }
│ │ │ +
100 }
│ │ │ +
│ │ │ +
101
│ │ │ +
102#if __cplusplus >= 201103L
│ │ │ +
103 template<typename _Tp, typename _Alloc>
│ │ │ +
104 template<typename... _Args>
│ │ │ +
105#if __cplusplus > 201402L
│ │ │ + │ │ │ +
107 typename vector<_Tp, _Alloc>::reference
│ │ │ +
108#else
│ │ │ +
109 void
│ │ │ +
110#endif
│ │ │ + │ │ │ + │ │ │ +
113 {
│ │ │ +
114 if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage)
│ │ │ +
115 {
│ │ │ +
116 _GLIBCXX_ASAN_ANNOTATE_GROW(1);
│ │ │ +
117 _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish,
│ │ │ + │ │ │ +
119 ++this->_M_impl._M_finish;
│ │ │ +
120 _GLIBCXX_ASAN_ANNOTATE_GREW(1);
│ │ │ +
121 }
│ │ │ +
122 else
│ │ │ +
123 _M_realloc_insert(end(), std::forward<_Args>(__args)...);
│ │ │ +
124#if __cplusplus > 201402L
│ │ │ +
125 return back();
│ │ │ +
126#endif
│ │ │ +
127 }
│ │ │ +
128#endif
│ │ │ +
129
│ │ │ +
130 template<typename _Tp, typename _Alloc>
│ │ │ +
131 _GLIBCXX20_CONSTEXPR
│ │ │ +
132 typename vector<_Tp, _Alloc>::iterator
│ │ │ +
│ │ │ + │ │ │ +
134#if __cplusplus >= 201103L
│ │ │ +
135 insert(const_iterator __position, const value_type& __x)
│ │ │ +
136#else
│ │ │ +
137 insert(iterator __position, const value_type& __x)
│ │ │ +
138#endif
│ │ │ +
139 {
│ │ │ +
140 const size_type __n = __position - begin();
│ │ │ +
141 if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage)
│ │ │ +
142 if (__position == end())
│ │ │ +
143 {
│ │ │ +
144 _GLIBCXX_ASAN_ANNOTATE_GROW(1);
│ │ │ +
145 _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish,
│ │ │ +
146 __x);
│ │ │ +
147 ++this->_M_impl._M_finish;
│ │ │ +
148 _GLIBCXX_ASAN_ANNOTATE_GREW(1);
│ │ │ +
149 }
│ │ │ +
150 else
│ │ │ +
151 {
│ │ │ +
152#if __cplusplus >= 201103L
│ │ │ +
153 const auto __pos = begin() + (__position - cbegin());
│ │ │ +
154 // __x could be an existing element of this vector, so make a
│ │ │ +
155 // copy of it before _M_insert_aux moves elements around.
│ │ │ +
156 _Temporary_value __x_copy(this, __x);
│ │ │ +
157 _M_insert_aux(__pos, std::move(__x_copy._M_val()));
│ │ │ +
158#else
│ │ │ +
159 _M_insert_aux(__position, __x);
│ │ │ +
160#endif
│ │ │ +
161 }
│ │ │ +
162 else
│ │ │ +
163#if __cplusplus >= 201103L
│ │ │ +
164 _M_realloc_insert(begin() + (__position - cbegin()), __x);
│ │ │ +
165#else
│ │ │ +
166 _M_realloc_insert(__position, __x);
│ │ │ +
167#endif
│ │ │ +
168
│ │ │ +
169 return iterator(this->_M_impl._M_start + __n);
│ │ │ +
170 }
│ │ │ +
│ │ │ +
171
│ │ │ +
172 template<typename _Tp, typename _Alloc>
│ │ │ + │ │ │ +
174 typename vector<_Tp, _Alloc>::iterator
│ │ │ + │ │ │ + │ │ │ +
177 {
│ │ │ +
178 if (__position + 1 != end())
│ │ │ +
179 _GLIBCXX_MOVE3(__position + 1, end(), __position);
│ │ │ +
180 --this->_M_impl._M_finish;
│ │ │ +
181 _Alloc_traits::destroy(this->_M_impl, this->_M_impl._M_finish);
│ │ │ +
182 _GLIBCXX_ASAN_ANNOTATE_SHRINK(1);
│ │ │ +
183 return __position;
│ │ │ +
184 }
│ │ │ +
185
│ │ │ +
186 template<typename _Tp, typename _Alloc>
│ │ │ +
187 _GLIBCXX20_CONSTEXPR
│ │ │ +
188 typename vector<_Tp, _Alloc>::iterator
│ │ │ +
189 vector<_Tp, _Alloc>::
│ │ │ +
190 _M_erase(iterator __first, iterator __last)
│ │ │ +
191 {
│ │ │ +
192 if (__first != __last)
│ │ │ +
193 {
│ │ │ +
194 if (__last != end())
│ │ │ +
195 _GLIBCXX_MOVE3(__last, end(), __first);
│ │ │ +
196 _M_erase_at_end(__first.base() + (end() - __last));
│ │ │ +
197 }
│ │ │ +
198 return __first;
│ │ │ +
199 }
│ │ │ +
200
│ │ │ +
201 template<typename _Tp, typename _Alloc>
│ │ │ +
202 _GLIBCXX20_CONSTEXPR
│ │ │ +
203 vector<_Tp, _Alloc>&
│ │ │ + │ │ │ +
205 operator=(const vector<_Tp, _Alloc>& __x)
│ │ │ +
206 {
│ │ │ +
207 if (std::__addressof(__x) != this)
│ │ │ +
208 {
│ │ │ +
209 _GLIBCXX_ASAN_ANNOTATE_REINIT;
│ │ │ +
210#if __cplusplus >= 201103L
│ │ │ +
211 if (_Alloc_traits::_S_propagate_on_copy_assign())
│ │ │ +
212 {
│ │ │ +
213 if (!_Alloc_traits::_S_always_equal()
│ │ │ +
214 && _M_get_Tp_allocator() != __x._M_get_Tp_allocator())
│ │ │ +
215 {
│ │ │ +
216 // replacement allocator cannot free existing storage
│ │ │ +
217 this->clear();
│ │ │ +
218 _M_deallocate(this->_M_impl._M_start,
│ │ │ +
219 this->_M_impl._M_end_of_storage
│ │ │ +
220 - this->_M_impl._M_start);
│ │ │ +
221 this->_M_impl._M_start = nullptr;
│ │ │ +
222 this->_M_impl._M_finish = nullptr;
│ │ │ +
223 this->_M_impl._M_end_of_storage = nullptr;
│ │ │ +
224 }
│ │ │ +
225 std::__alloc_on_copy(_M_get_Tp_allocator(),
│ │ │ +
226 __x._M_get_Tp_allocator());
│ │ │ +
227 }
│ │ │ +
228#endif
│ │ │ +
229 const size_type __xlen = __x.size();
│ │ │ +
230 if (__xlen > capacity())
│ │ │ +
231 {
│ │ │ +
232 pointer __tmp = _M_allocate_and_copy(__xlen, __x.begin(),
│ │ │ +
233 __x.end());
│ │ │ +
234 std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
│ │ │ +
235 _M_get_Tp_allocator());
│ │ │ +
236 _M_deallocate(this->_M_impl._M_start,
│ │ │ +
237 this->_M_impl._M_end_of_storage
│ │ │ +
238 - this->_M_impl._M_start);
│ │ │ +
239 this->_M_impl._M_start = __tmp;
│ │ │ +
240 this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __xlen;
│ │ │ +
241 }
│ │ │ +
242 else if (size() >= __xlen)
│ │ │ +
243 {
│ │ │ +
244 std::_Destroy(std::copy(__x.begin(), __x.end(), begin()),
│ │ │ +
245 end(), _M_get_Tp_allocator());
│ │ │ +
246 }
│ │ │ +
247 else
│ │ │ +
248 {
│ │ │ +
249 std::copy(__x._M_impl._M_start, __x._M_impl._M_start + size(),
│ │ │ +
250 this->_M_impl._M_start);
│ │ │ +
251 std::__uninitialized_copy_a(__x._M_impl._M_start + size(),
│ │ │ +
252 __x._M_impl._M_finish,
│ │ │ +
253 this->_M_impl._M_finish,
│ │ │ +
254 _M_get_Tp_allocator());
│ │ │ +
255 }
│ │ │ +
256 this->_M_impl._M_finish = this->_M_impl._M_start + __xlen;
│ │ │ +
257 }
│ │ │ +
258 return *this;
│ │ │ +
259 }
│ │ │ +
260
│ │ │ +
261 template<typename _Tp, typename _Alloc>
│ │ │ +
262 _GLIBCXX20_CONSTEXPR
│ │ │ +
263 void
│ │ │ +
264 vector<_Tp, _Alloc>::
│ │ │ +
265 _M_fill_assign(size_t __n, const value_type& __val)
│ │ │ +
266 {
│ │ │ +
267 if (__n > capacity())
│ │ │ +
268 {
│ │ │ +
269 vector __tmp(__n, __val, _M_get_Tp_allocator());
│ │ │ +
270 __tmp._M_impl._M_swap_data(this->_M_impl);
│ │ │ +
271 }
│ │ │ +
272 else if (__n > size())
│ │ │ +
273 {
│ │ │ +
274 std::fill(begin(), end(), __val);
│ │ │ +
275 const size_type __add = __n - size();
│ │ │ +
276 _GLIBCXX_ASAN_ANNOTATE_GROW(__add);
│ │ │ +
277 this->_M_impl._M_finish =
│ │ │ +
278 std::__uninitialized_fill_n_a(this->_M_impl._M_finish,
│ │ │ +
279 __add, __val, _M_get_Tp_allocator());
│ │ │ +
280 _GLIBCXX_ASAN_ANNOTATE_GREW(__add);
│ │ │ +
281 }
│ │ │ +
282 else
│ │ │ +
283 _M_erase_at_end(std::fill_n(this->_M_impl._M_start, __n, __val));
│ │ │ +
284 }
│ │ │ +
285
│ │ │ +
286 template<typename _Tp, typename _Alloc>
│ │ │ +
287 template<typename _InputIterator>
│ │ │ +
288 _GLIBCXX20_CONSTEXPR
│ │ │ +
289 void
│ │ │ +
290 vector<_Tp, _Alloc>::
│ │ │ +
291 _M_assign_aux(_InputIterator __first, _InputIterator __last,
│ │ │ + │ │ │ +
293 {
│ │ │ +
294 pointer __cur(this->_M_impl._M_start);
│ │ │ +
295 for (; __first != __last && __cur != this->_M_impl._M_finish;
│ │ │ +
296 ++__cur, (void)++__first)
│ │ │ +
297 *__cur = *__first;
│ │ │ +
298 if (__first == __last)
│ │ │ +
299 _M_erase_at_end(__cur);
│ │ │ +
300 else
│ │ │ +
301 _M_range_insert(end(), __first, __last,
│ │ │ +
302 std::__iterator_category(__first));
│ │ │ +
303 }
│ │ │ +
304
│ │ │ +
305 template<typename _Tp, typename _Alloc>
│ │ │ +
306 template<typename _ForwardIterator>
│ │ │ +
307 _GLIBCXX20_CONSTEXPR
│ │ │ +
308 void
│ │ │ +
309 vector<_Tp, _Alloc>::
│ │ │ +
310 _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last,
│ │ │ + │ │ │ +
312 {
│ │ │ +
313 const size_type __len = std::distance(__first, __last);
│ │ │ +
314
│ │ │ +
315 if (__len > capacity())
│ │ │ +
316 {
│ │ │ +
317 _S_check_init_len(__len, _M_get_Tp_allocator());
│ │ │ +
318 pointer __tmp(_M_allocate_and_copy(__len, __first, __last));
│ │ │ +
319 std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
│ │ │ +
320 _M_get_Tp_allocator());
│ │ │ +
321 _GLIBCXX_ASAN_ANNOTATE_REINIT;
│ │ │ +
322 _M_deallocate(this->_M_impl._M_start,
│ │ │ +
323 this->_M_impl._M_end_of_storage
│ │ │ +
324 - this->_M_impl._M_start);
│ │ │ +
325 this->_M_impl._M_start = __tmp;
│ │ │ +
326 this->_M_impl._M_finish = this->_M_impl._M_start + __len;
│ │ │ +
327 this->_M_impl._M_end_of_storage = this->_M_impl._M_finish;
│ │ │ +
328 }
│ │ │ +
329 else if (size() >= __len)
│ │ │ +
330 _M_erase_at_end(std::copy(__first, __last, this->_M_impl._M_start));
│ │ │ +
331 else
│ │ │ +
332 {
│ │ │ +
333 _ForwardIterator __mid = __first;
│ │ │ +
334 std::advance(__mid, size());
│ │ │ +
335 std::copy(__first, __mid, this->_M_impl._M_start);
│ │ │ +
336 const size_type __attribute__((__unused__)) __n = __len - size();
│ │ │ +
337 _GLIBCXX_ASAN_ANNOTATE_GROW(__n);
│ │ │ +
338 this->_M_impl._M_finish =
│ │ │ +
339 std::__uninitialized_copy_a(__mid, __last,
│ │ │ +
340 this->_M_impl._M_finish,
│ │ │ +
341 _M_get_Tp_allocator());
│ │ │ +
342 _GLIBCXX_ASAN_ANNOTATE_GREW(__n);
│ │ │ +
343 }
│ │ │ +
344 }
│ │ │ +
345
│ │ │ +
346#if __cplusplus >= 201103L
│ │ │ +
347 template<typename _Tp, typename _Alloc>
│ │ │ +
348 _GLIBCXX20_CONSTEXPR
│ │ │ +
349 auto
│ │ │ +
350 vector<_Tp, _Alloc>::
│ │ │ +
351 _M_insert_rval(const_iterator __position, value_type&& __v) -> iterator
│ │ │ +
352 {
│ │ │ +
353 const auto __n = __position - cbegin();
│ │ │ +
354 if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage)
│ │ │ +
355 if (__position == cend())
│ │ │ +
356 {
│ │ │ +
357 _GLIBCXX_ASAN_ANNOTATE_GROW(1);
│ │ │ +
358 _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish,
│ │ │ +
359 std::move(__v));
│ │ │ +
360 ++this->_M_impl._M_finish;
│ │ │ +
361 _GLIBCXX_ASAN_ANNOTATE_GREW(1);
│ │ │ +
362 }
│ │ │ +
363 else
│ │ │ +
364 _M_insert_aux(begin() + __n, std::move(__v));
│ │ │ +
365 else
│ │ │ +
366 _M_realloc_insert(begin() + __n, std::move(__v));
│ │ │ +
367
│ │ │ +
368 return iterator(this->_M_impl._M_start + __n);
│ │ │ +
369 }
│ │ │ +
370
│ │ │ +
371 template<typename _Tp, typename _Alloc>
│ │ │ +
372 template<typename... _Args>
│ │ │ +
373 _GLIBCXX20_CONSTEXPR
│ │ │ +
374 auto
│ │ │ +
375 vector<_Tp, _Alloc>::
│ │ │ +
376 _M_emplace_aux(const_iterator __position, _Args&&... __args)
│ │ │ +
377 -> iterator
│ │ │ +
378 {
│ │ │ +
379 const auto __n = __position - cbegin();
│ │ │ +
380 if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage)
│ │ │ +
381 if (__position == cend())
│ │ │ +
382 {
│ │ │ +
383 _GLIBCXX_ASAN_ANNOTATE_GROW(1);
│ │ │ +
384 _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish,
│ │ │ +
385 std::forward<_Args>(__args)...);
│ │ │ +
386 ++this->_M_impl._M_finish;
│ │ │ +
387 _GLIBCXX_ASAN_ANNOTATE_GREW(1);
│ │ │ +
388 }
│ │ │ +
389 else
│ │ │ +
390 {
│ │ │ +
391 // We need to construct a temporary because something in __args...
│ │ │ +
392 // could alias one of the elements of the container and so we
│ │ │ +
393 // need to use it before _M_insert_aux moves elements around.
│ │ │ +
394 _Temporary_value __tmp(this, std::forward<_Args>(__args)...);
│ │ │ +
395 _M_insert_aux(begin() + __n, std::move(__tmp._M_val()));
│ │ │ +
396 }
│ │ │ +
397 else
│ │ │ +
398 _M_realloc_insert(begin() + __n, std::forward<_Args>(__args)...);
│ │ │ +
399
│ │ │ +
400 return iterator(this->_M_impl._M_start + __n);
│ │ │ +
401 }
│ │ │ +
402
│ │ │ +
403 template<typename _Tp, typename _Alloc>
│ │ │ +
404 template<typename _Arg>
│ │ │ +
405 _GLIBCXX20_CONSTEXPR
│ │ │ +
406 void
│ │ │ +
407 vector<_Tp, _Alloc>::
│ │ │ +
408 _M_insert_aux(iterator __position, _Arg&& __arg)
│ │ │ +
409#else
│ │ │ +
410 template<typename _Tp, typename _Alloc>
│ │ │ +
411 void
│ │ │ +
412 vector<_Tp, _Alloc>::
│ │ │ +
413 _M_insert_aux(iterator __position, const _Tp& __x)
│ │ │ +
414#endif
│ │ │ +
415 {
│ │ │ +
416 _GLIBCXX_ASAN_ANNOTATE_GROW(1);
│ │ │ +
417 _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish,
│ │ │ +
418 _GLIBCXX_MOVE(*(this->_M_impl._M_finish - 1)));
│ │ │ +
419 ++this->_M_impl._M_finish;
│ │ │ +
420 _GLIBCXX_ASAN_ANNOTATE_GREW(1);
│ │ │ +
421#if __cplusplus < 201103L
│ │ │ +
422 _Tp __x_copy = __x;
│ │ │ +
423#endif
│ │ │ +
424 _GLIBCXX_MOVE_BACKWARD3(__position.base(),
│ │ │ +
425 this->_M_impl._M_finish - 2,
│ │ │ +
426 this->_M_impl._M_finish - 1);
│ │ │ +
427#if __cplusplus < 201103L
│ │ │ +
428 *__position = __x_copy;
│ │ │ +
429#else
│ │ │ +
430 *__position = std::forward<_Arg>(__arg);
│ │ │ +
431#endif
│ │ │ +
432 }
│ │ │ +
433
│ │ │ +
434#if __cplusplus >= 201103L
│ │ │ +
435 template<typename _Tp, typename _Alloc>
│ │ │ +
436 template<typename... _Args>
│ │ │ +
437 _GLIBCXX20_CONSTEXPR
│ │ │ +
438 void
│ │ │ +
439 vector<_Tp, _Alloc>::
│ │ │ +
440 _M_realloc_insert(iterator __position, _Args&&... __args)
│ │ │ +
441#else
│ │ │ +
442 template<typename _Tp, typename _Alloc>
│ │ │ +
443 void
│ │ │ +
444 vector<_Tp, _Alloc>::
│ │ │ +
445 _M_realloc_insert(iterator __position, const _Tp& __x)
│ │ │ +
446#endif
│ │ │ +
447 {
│ │ │ +
448 const size_type __len =
│ │ │ +
449 _M_check_len(size_type(1), "vector::_M_realloc_insert");
│ │ │ +
450 pointer __old_start = this->_M_impl._M_start;
│ │ │ +
451 pointer __old_finish = this->_M_impl._M_finish;
│ │ │ +
452 const size_type __elems_before = __position - begin();
│ │ │ +
453 pointer __new_start(this->_M_allocate(__len));
│ │ │ +
454 pointer __new_finish(__new_start);
│ │ │ +
455 __try
│ │ │ +
456 {
│ │ │ +
457 // The order of the three operations is dictated by the C++11
│ │ │ +
458 // case, where the moves could alter a new element belonging
│ │ │ +
459 // to the existing vector. This is an issue only for callers
│ │ │ +
460 // taking the element by lvalue ref (see last bullet of C++11
│ │ │ +
461 // [res.on.arguments]).
│ │ │ +
462 _Alloc_traits::construct(this->_M_impl,
│ │ │ +
463 __new_start + __elems_before,
│ │ │ +
464#if __cplusplus >= 201103L
│ │ │ +
465 std::forward<_Args>(__args)...);
│ │ │ +
466#else
│ │ │ +
467 __x);
│ │ │ +
468#endif
│ │ │ +
469 __new_finish = pointer();
│ │ │ +
470
│ │ │ +
471#if __cplusplus >= 201103L
│ │ │ +
472 if _GLIBCXX17_CONSTEXPR (_S_use_relocate())
│ │ │ +
473 {
│ │ │ +
474 __new_finish = _S_relocate(__old_start, __position.base(),
│ │ │ +
475 __new_start, _M_get_Tp_allocator());
│ │ │ +
476
│ │ │ +
477 ++__new_finish;
│ │ │ +
478
│ │ │ +
479 __new_finish = _S_relocate(__position.base(), __old_finish,
│ │ │ +
480 __new_finish, _M_get_Tp_allocator());
│ │ │ +
481 }
│ │ │ +
482 else
│ │ │ +
483#endif
│ │ │ +
484 {
│ │ │ +
485 __new_finish
│ │ │ + │ │ │ +
487 (__old_start, __position.base(),
│ │ │ +
488 __new_start, _M_get_Tp_allocator());
│ │ │ +
489
│ │ │ +
490 ++__new_finish;
│ │ │ +
491
│ │ │ +
492 __new_finish
│ │ │ + │ │ │ +
494 (__position.base(), __old_finish,
│ │ │ +
495 __new_finish, _M_get_Tp_allocator());
│ │ │ +
496 }
│ │ │ +
497 }
│ │ │ +
498 __catch(...)
│ │ │ +
499 {
│ │ │ +
500 if (!__new_finish)
│ │ │ +
501 _Alloc_traits::destroy(this->_M_impl,
│ │ │ +
502 __new_start + __elems_before);
│ │ │ +
503 else
│ │ │ +
504 std::_Destroy(__new_start, __new_finish, _M_get_Tp_allocator());
│ │ │ +
505 _M_deallocate(__new_start, __len);
│ │ │ +
506 __throw_exception_again;
│ │ │ +
507 }
│ │ │ +
508#if __cplusplus >= 201103L
│ │ │ +
509 if _GLIBCXX17_CONSTEXPR (!_S_use_relocate())
│ │ │ +
510#endif
│ │ │ +
511 std::_Destroy(__old_start, __old_finish, _M_get_Tp_allocator());
│ │ │ +
512 _GLIBCXX_ASAN_ANNOTATE_REINIT;
│ │ │ +
513 _M_deallocate(__old_start,
│ │ │ +
514 this->_M_impl._M_end_of_storage - __old_start);
│ │ │ +
515 this->_M_impl._M_start = __new_start;
│ │ │ +
516 this->_M_impl._M_finish = __new_finish;
│ │ │ +
517 this->_M_impl._M_end_of_storage = __new_start + __len;
│ │ │ +
518 }
│ │ │ +
519
│ │ │ +
520 template<typename _Tp, typename _Alloc>
│ │ │ +
521 _GLIBCXX20_CONSTEXPR
│ │ │ +
522 void
│ │ │ +
523 vector<_Tp, _Alloc>::
│ │ │ +
524 _M_fill_insert(iterator __position, size_type __n, const value_type& __x)
│ │ │ +
525 {
│ │ │ +
526 if (__n != 0)
│ │ │ +
527 {
│ │ │ +
528 if (size_type(this->_M_impl._M_end_of_storage
│ │ │ +
529 - this->_M_impl._M_finish) >= __n)
│ │ │ +
530 {
│ │ │ +
531#if __cplusplus < 201103L
│ │ │ +
532 value_type __x_copy = __x;
│ │ │ +
533#else
│ │ │ +
534 _Temporary_value __tmp(this, __x);
│ │ │ +
535 value_type& __x_copy = __tmp._M_val();
│ │ │ +
536#endif
│ │ │ +
537 const size_type __elems_after = end() - __position;
│ │ │ +
538 pointer __old_finish(this->_M_impl._M_finish);
│ │ │ +
539 if (__elems_after > __n)
│ │ │ +
540 {
│ │ │ +
541 _GLIBCXX_ASAN_ANNOTATE_GROW(__n);
│ │ │ +
542 std::__uninitialized_move_a(__old_finish - __n,
│ │ │ +
543 __old_finish,
│ │ │ +
544 __old_finish,
│ │ │ +
545 _M_get_Tp_allocator());
│ │ │ +
546 this->_M_impl._M_finish += __n;
│ │ │ +
547 _GLIBCXX_ASAN_ANNOTATE_GREW(__n);
│ │ │ +
548 _GLIBCXX_MOVE_BACKWARD3(__position.base(),
│ │ │ +
549 __old_finish - __n, __old_finish);
│ │ │ +
550 std::fill(__position.base(), __position.base() + __n,
│ │ │ +
551 __x_copy);
│ │ │ +
552 }
│ │ │ +
553 else
│ │ │ +
554 {
│ │ │ +
555 _GLIBCXX_ASAN_ANNOTATE_GROW(__n);
│ │ │ +
556 this->_M_impl._M_finish =
│ │ │ + │ │ │ +
558 __n - __elems_after,
│ │ │ +
559 __x_copy,
│ │ │ +
560 _M_get_Tp_allocator());
│ │ │ +
561 _GLIBCXX_ASAN_ANNOTATE_GREW(__n - __elems_after);
│ │ │ +
562 std::__uninitialized_move_a(__position.base(), __old_finish,
│ │ │ +
563 this->_M_impl._M_finish,
│ │ │ +
564 _M_get_Tp_allocator());
│ │ │ +
565 this->_M_impl._M_finish += __elems_after;
│ │ │ +
566 _GLIBCXX_ASAN_ANNOTATE_GREW(__elems_after);
│ │ │ +
567 std::fill(__position.base(), __old_finish, __x_copy);
│ │ │ +
568 }
│ │ │ +
569 }
│ │ │ +
570 else
│ │ │ +
571 {
│ │ │ +
572 // Make local copies of these members because the compiler thinks
│ │ │ +
573 // the allocator can alter them if 'this' is globally reachable.
│ │ │ +
574 pointer __old_start = this->_M_impl._M_start;
│ │ │ +
575 pointer __old_finish = this->_M_impl._M_finish;
│ │ │ +
576 const pointer __pos = __position.base();
│ │ │ +
577
│ │ │ +
578 const size_type __len =
│ │ │ +
579 _M_check_len(__n, "vector::_M_fill_insert");
│ │ │ +
580 const size_type __elems_before = __pos - __old_start;
│ │ │ +
581 pointer __new_start(this->_M_allocate(__len));
│ │ │ +
582 pointer __new_finish(__new_start);
│ │ │ +
583 __try
│ │ │ +
584 {
│ │ │ +
585 // See _M_realloc_insert above.
│ │ │ +
586 std::__uninitialized_fill_n_a(__new_start + __elems_before,
│ │ │ +
587 __n, __x,
│ │ │ +
588 _M_get_Tp_allocator());
│ │ │ +
589 __new_finish = pointer();
│ │ │ +
590
│ │ │ +
591 __new_finish
│ │ │ + │ │ │ +
593 (__old_start, __pos, __new_start, _M_get_Tp_allocator());
│ │ │ +
594
│ │ │ +
595 __new_finish += __n;
│ │ │ +
596
│ │ │ +
597 __new_finish
│ │ │ + │ │ │ +
599 (__pos, __old_finish, __new_finish, _M_get_Tp_allocator());
│ │ │ +
600 }
│ │ │ +
601 __catch(...)
│ │ │ +
602 {
│ │ │ +
603 if (!__new_finish)
│ │ │ +
604 std::_Destroy(__new_start + __elems_before,
│ │ │ +
605 __new_start + __elems_before + __n,
│ │ │ +
606 _M_get_Tp_allocator());
│ │ │ +
607 else
│ │ │ +
608 std::_Destroy(__new_start, __new_finish,
│ │ │ +
609 _M_get_Tp_allocator());
│ │ │ +
610 _M_deallocate(__new_start, __len);
│ │ │ +
611 __throw_exception_again;
│ │ │ +
612 }
│ │ │ +
613 std::_Destroy(__old_start, __old_finish, _M_get_Tp_allocator());
│ │ │ +
614 _GLIBCXX_ASAN_ANNOTATE_REINIT;
│ │ │ +
615 _M_deallocate(__old_start,
│ │ │ +
616 this->_M_impl._M_end_of_storage - __old_start);
│ │ │ +
617 this->_M_impl._M_start = __new_start;
│ │ │ +
618 this->_M_impl._M_finish = __new_finish;
│ │ │ +
619 this->_M_impl._M_end_of_storage = __new_start + __len;
│ │ │ +
620 }
│ │ │ +
621 }
│ │ │ +
622 }
│ │ │ +
623
│ │ │ +
624#if __cplusplus >= 201103L
│ │ │ +
625 template<typename _Tp, typename _Alloc>
│ │ │ +
626 _GLIBCXX20_CONSTEXPR
│ │ │ +
627 void
│ │ │ +
628 vector<_Tp, _Alloc>::
│ │ │ +
629 _M_default_append(size_type __n)
│ │ │ +
630 {
│ │ │ +
631 if (__n != 0)
│ │ │ +
632 {
│ │ │ +
633 const size_type __size = size();
│ │ │ +
634 size_type __navail = size_type(this->_M_impl._M_end_of_storage
│ │ │ +
635 - this->_M_impl._M_finish);
│ │ │ +
636
│ │ │ +
637 if (__size > max_size() || __navail > max_size() - __size)
│ │ │ +
638 __builtin_unreachable();
│ │ │ +
639
│ │ │ +
640 if (__navail >= __n)
│ │ │ +
641 {
│ │ │ +
642 _GLIBCXX_ASAN_ANNOTATE_GROW(__n);
│ │ │ +
643 this->_M_impl._M_finish =
│ │ │ +
644 std::__uninitialized_default_n_a(this->_M_impl._M_finish,
│ │ │ +
645 __n, _M_get_Tp_allocator());
│ │ │ +
646 _GLIBCXX_ASAN_ANNOTATE_GREW(__n);
│ │ │ +
647 }
│ │ │ +
648 else
│ │ │ +
649 {
│ │ │ +
650 // Make local copies of these members because the compiler thinks
│ │ │ +
651 // the allocator can alter them if 'this' is globally reachable.
│ │ │ +
652 pointer __old_start = this->_M_impl._M_start;
│ │ │ +
653 pointer __old_finish = this->_M_impl._M_finish;
│ │ │ +
654
│ │ │ +
655 const size_type __len =
│ │ │ +
656 _M_check_len(__n, "vector::_M_default_append");
│ │ │ +
657 pointer __new_start(this->_M_allocate(__len));
│ │ │ +
658 if _GLIBCXX17_CONSTEXPR (_S_use_relocate())
│ │ │ +
659 {
│ │ │ +
660 __try
│ │ │ +
661 {
│ │ │ +
662 std::__uninitialized_default_n_a(__new_start + __size,
│ │ │ +
663 __n, _M_get_Tp_allocator());
│ │ │ +
664 }
│ │ │ +
665 __catch(...)
│ │ │ +
666 {
│ │ │ +
667 _M_deallocate(__new_start, __len);
│ │ │ +
668 __throw_exception_again;
│ │ │ +
669 }
│ │ │ +
670 _S_relocate(__old_start, __old_finish,
│ │ │ +
671 __new_start, _M_get_Tp_allocator());
│ │ │ +
672 }
│ │ │ +
673 else
│ │ │ +
674 {
│ │ │ +
675 pointer __destroy_from = pointer();
│ │ │ +
676 __try
│ │ │ +
677 {
│ │ │ +
678 std::__uninitialized_default_n_a(__new_start + __size,
│ │ │ +
679 __n, _M_get_Tp_allocator());
│ │ │ +
680 __destroy_from = __new_start + __size;
│ │ │ + │ │ │ +
682 __old_start, __old_finish,
│ │ │ +
683 __new_start, _M_get_Tp_allocator());
│ │ │ +
684 }
│ │ │ +
685 __catch(...)
│ │ │ +
686 {
│ │ │ +
687 if (__destroy_from)
│ │ │ +
688 std::_Destroy(__destroy_from, __destroy_from + __n,
│ │ │ +
689 _M_get_Tp_allocator());
│ │ │ +
690 _M_deallocate(__new_start, __len);
│ │ │ +
691 __throw_exception_again;
│ │ │ +
692 }
│ │ │ +
693 std::_Destroy(__old_start, __old_finish,
│ │ │ +
694 _M_get_Tp_allocator());
│ │ │ +
695 }
│ │ │ +
696 _GLIBCXX_ASAN_ANNOTATE_REINIT;
│ │ │ +
697 _M_deallocate(__old_start,
│ │ │ +
698 this->_M_impl._M_end_of_storage - __old_start);
│ │ │ +
699 this->_M_impl._M_start = __new_start;
│ │ │ +
700 this->_M_impl._M_finish = __new_start + __size + __n;
│ │ │ +
701 this->_M_impl._M_end_of_storage = __new_start + __len;
│ │ │ +
702 }
│ │ │ +
703 }
│ │ │ +
704 }
│ │ │ +
705
│ │ │ +
706 template<typename _Tp, typename _Alloc>
│ │ │ +
707 _GLIBCXX20_CONSTEXPR
│ │ │ +
708 bool
│ │ │ +
709 vector<_Tp, _Alloc>::
│ │ │ +
710 _M_shrink_to_fit()
│ │ │ +
711 {
│ │ │ +
712 if (capacity() == size())
│ │ │ +
713 return false;
│ │ │ +
714 _GLIBCXX_ASAN_ANNOTATE_REINIT;
│ │ │ + │ │ │ +
716 }
│ │ │ +
717#endif
│ │ │ +
718
│ │ │ +
719 template<typename _Tp, typename _Alloc>
│ │ │ +
720 template<typename _InputIterator>
│ │ │ +
721 _GLIBCXX20_CONSTEXPR
│ │ │ +
722 void
│ │ │ +
723 vector<_Tp, _Alloc>::
│ │ │ +
724 _M_range_insert(iterator __pos, _InputIterator __first,
│ │ │ +
725 _InputIterator __last, std::input_iterator_tag)
│ │ │ +
726 {
│ │ │ +
727 if (__pos == end())
│ │ │ +
728 {
│ │ │ +
729 for (; __first != __last; ++__first)
│ │ │ +
730 insert(end(), *__first);
│ │ │ +
731 }
│ │ │ +
732 else if (__first != __last)
│ │ │ +
733 {
│ │ │ +
734 vector __tmp(__first, __last, _M_get_Tp_allocator());
│ │ │ +
735 insert(__pos,
│ │ │ +
736 _GLIBCXX_MAKE_MOVE_ITERATOR(__tmp.begin()),
│ │ │ +
737 _GLIBCXX_MAKE_MOVE_ITERATOR(__tmp.end()));
│ │ │ +
738 }
│ │ │ +
739 }
│ │ │ +
740
│ │ │ +
741 template<typename _Tp, typename _Alloc>
│ │ │ +
742 template<typename _ForwardIterator>
│ │ │ +
743 _GLIBCXX20_CONSTEXPR
│ │ │ +
744 void
│ │ │ +
745 vector<_Tp, _Alloc>::
│ │ │ +
746 _M_range_insert(iterator __position, _ForwardIterator __first,
│ │ │ +
747 _ForwardIterator __last, std::forward_iterator_tag)
│ │ │ +
748 {
│ │ │ +
749 if (__first != __last)
│ │ │ +
750 {
│ │ │ +
751 const size_type __n = std::distance(__first, __last);
│ │ │ +
752 if (size_type(this->_M_impl._M_end_of_storage
│ │ │ +
753 - this->_M_impl._M_finish) >= __n)
│ │ │ +
754 {
│ │ │ +
755 const size_type __elems_after = end() - __position;
│ │ │ +
756 pointer __old_finish(this->_M_impl._M_finish);
│ │ │ +
757 if (__elems_after > __n)
│ │ │ +
758 {
│ │ │ +
759 _GLIBCXX_ASAN_ANNOTATE_GROW(__n);
│ │ │ +
760 std::__uninitialized_move_a(this->_M_impl._M_finish - __n,
│ │ │ +
761 this->_M_impl._M_finish,
│ │ │ +
762 this->_M_impl._M_finish,
│ │ │ +
763 _M_get_Tp_allocator());
│ │ │ +
764 this->_M_impl._M_finish += __n;
│ │ │ +
765 _GLIBCXX_ASAN_ANNOTATE_GREW(__n);
│ │ │ +
766 _GLIBCXX_MOVE_BACKWARD3(__position.base(),
│ │ │ +
767 __old_finish - __n, __old_finish);
│ │ │ +
768 std::copy(__first, __last, __position);
│ │ │ +
769 }
│ │ │ +
770 else
│ │ │ +
771 {
│ │ │ +
772 _ForwardIterator __mid = __first;
│ │ │ +
773 std::advance(__mid, __elems_after);
│ │ │ +
774 _GLIBCXX_ASAN_ANNOTATE_GROW(__n);
│ │ │ +
775 std::__uninitialized_copy_a(__mid, __last,
│ │ │ +
776 this->_M_impl._M_finish,
│ │ │ +
777 _M_get_Tp_allocator());
│ │ │ +
778 this->_M_impl._M_finish += __n - __elems_after;
│ │ │ +
779 _GLIBCXX_ASAN_ANNOTATE_GREW(__n - __elems_after);
│ │ │ +
780 std::__uninitialized_move_a(__position.base(),
│ │ │ +
781 __old_finish,
│ │ │ +
782 this->_M_impl._M_finish,
│ │ │ +
783 _M_get_Tp_allocator());
│ │ │ +
784 this->_M_impl._M_finish += __elems_after;
│ │ │ +
785 _GLIBCXX_ASAN_ANNOTATE_GREW(__elems_after);
│ │ │ +
786 std::copy(__first, __mid, __position);
│ │ │ +
787 }
│ │ │ +
788 }
│ │ │ +
789 else
│ │ │ +
790 {
│ │ │ +
791 // Make local copies of these members because the compiler
│ │ │ +
792 // thinks the allocator can alter them if 'this' is globally
│ │ │ +
793 // reachable.
│ │ │ +
794 pointer __old_start = this->_M_impl._M_start;
│ │ │ +
795 pointer __old_finish = this->_M_impl._M_finish;
│ │ │ +
796 if ((__old_finish - __old_start) < 0)
│ │ │ +
797 __builtin_unreachable();
│ │ │ +
798
│ │ │ +
799 const size_type __len =
│ │ │ +
800 _M_check_len(__n, "vector::_M_range_insert");
│ │ │ +
801 pointer __new_start(this->_M_allocate(__len));
│ │ │ +
802 pointer __new_finish(__new_start);
│ │ │ +
803 __try
│ │ │ +
804 {
│ │ │ +
805 __new_finish
│ │ │ + │ │ │ +
807 (__old_start, __position.base(),
│ │ │ +
808 __new_start, _M_get_Tp_allocator());
│ │ │ +
809 __new_finish
│ │ │ +
810 = std::__uninitialized_copy_a(__first, __last,
│ │ │ +
811 __new_finish,
│ │ │ +
812 _M_get_Tp_allocator());
│ │ │ +
813 __new_finish
│ │ │ + │ │ │ +
815 (__position.base(), __old_finish,
│ │ │ +
816 __new_finish, _M_get_Tp_allocator());
│ │ │ +
817 }
│ │ │ +
818 __catch(...)
│ │ │ +
819 {
│ │ │ +
820 std::_Destroy(__new_start, __new_finish,
│ │ │ +
821 _M_get_Tp_allocator());
│ │ │ +
822 _M_deallocate(__new_start, __len);
│ │ │ +
823 __throw_exception_again;
│ │ │ +
824 }
│ │ │ +
825 std::_Destroy(__old_start, __old_finish,
│ │ │ +
826 _M_get_Tp_allocator());
│ │ │ +
827 _GLIBCXX_ASAN_ANNOTATE_REINIT;
│ │ │ +
828 _M_deallocate(__old_start,
│ │ │ +
829 this->_M_impl._M_end_of_storage - __old_start);
│ │ │ +
830 this->_M_impl._M_start = __new_start;
│ │ │ +
831 this->_M_impl._M_finish = __new_finish;
│ │ │ +
832 this->_M_impl._M_end_of_storage = __new_start + __len;
│ │ │ +
833 }
│ │ │ +
834 }
│ │ │ +
835 }
│ │ │ +
836
│ │ │ +
837
│ │ │ +
838 // vector<bool>
│ │ │ +
839 template<typename _Alloc>
│ │ │ +
840 _GLIBCXX20_CONSTEXPR
│ │ │ +
841 void
│ │ │ +
842 vector<bool, _Alloc>::
│ │ │ +
843 _M_reallocate(size_type __n)
│ │ │ +
844 {
│ │ │ +
845 _Bit_pointer __q = this->_M_allocate(__n);
│ │ │ +
846 iterator __start(std::__addressof(*__q), 0);
│ │ │ +
847 iterator __finish(_M_copy_aligned(begin(), end(), __start));
│ │ │ +
848 this->_M_deallocate();
│ │ │ +
849 this->_M_impl._M_start = __start;
│ │ │ +
850 this->_M_impl._M_finish = __finish;
│ │ │ +
851 this->_M_impl._M_end_of_storage = __q + _S_nword(__n);
│ │ │ +
852 }
│ │ │ +
853
│ │ │ +
854 template<typename _Alloc>
│ │ │ +
855 _GLIBCXX20_CONSTEXPR
│ │ │ +
856 void
│ │ │ +
857 vector<bool, _Alloc>::
│ │ │ +
858 _M_fill_insert(iterator __position, size_type __n, bool __x)
│ │ │ +
859 {
│ │ │ +
860 if (__n == 0)
│ │ │ +
861 return;
│ │ │ +
862 if (capacity() - size() >= __n)
│ │ │ +
863 {
│ │ │ +
864 std::copy_backward(__position, end(),
│ │ │ +
865 this->_M_impl._M_finish + difference_type(__n));
│ │ │ +
866 std::fill(__position, __position + difference_type(__n), __x);
│ │ │ +
867 this->_M_impl._M_finish += difference_type(__n);
│ │ │ +
868 }
│ │ │ +
869 else
│ │ │ +
870 {
│ │ │ +
871 const size_type __len =
│ │ │ +
872 _M_check_len(__n, "vector<bool>::_M_fill_insert");
│ │ │ +
873 _Bit_pointer __q = this->_M_allocate(__len);
│ │ │ +
874 iterator __start(std::__addressof(*__q), 0);
│ │ │ +
875 iterator __i = _M_copy_aligned(begin(), __position, __start);
│ │ │ +
876 std::fill(__i, __i + difference_type(__n), __x);
│ │ │ +
877 iterator __finish = std::copy(__position, end(),
│ │ │ +
878 __i + difference_type(__n));
│ │ │ +
879 this->_M_deallocate();
│ │ │ +
880 this->_M_impl._M_end_of_storage = __q + _S_nword(__len);
│ │ │ +
881 this->_M_impl._M_start = __start;
│ │ │ +
882 this->_M_impl._M_finish = __finish;
│ │ │ +
883 }
│ │ │ +
884 }
│ │ │ +
885
│ │ │ +
886 template<typename _Alloc>
│ │ │ +
887 template<typename _ForwardIterator>
│ │ │ +
888 _GLIBCXX20_CONSTEXPR
│ │ │ +
889 void
│ │ │ +
890 vector<bool, _Alloc>::
│ │ │ +
891 _M_insert_range(iterator __position, _ForwardIterator __first,
│ │ │ +
892 _ForwardIterator __last, std::forward_iterator_tag)
│ │ │ +
893 {
│ │ │ +
894 if (__first != __last)
│ │ │ +
895 {
│ │ │ +
896 size_type __n = std::distance(__first, __last);
│ │ │ +
897 if (capacity() - size() >= __n)
│ │ │ +
898 {
│ │ │ +
899 std::copy_backward(__position, end(),
│ │ │ +
900 this->_M_impl._M_finish
│ │ │ +
901 + difference_type(__n));
│ │ │ +
902 std::copy(__first, __last, __position);
│ │ │ +
903 this->_M_impl._M_finish += difference_type(__n);
│ │ │ +
904 }
│ │ │ +
905 else
│ │ │ +
906 {
│ │ │ +
907 const size_type __len =
│ │ │ +
908 _M_check_len(__n, "vector<bool>::_M_insert_range");
│ │ │ +
909 _Bit_pointer __q = this->_M_allocate(__len);
│ │ │ +
910 iterator __start(std::__addressof(*__q), 0);
│ │ │ +
911 iterator __i = _M_copy_aligned(begin(), __position, __start);
│ │ │ +
912 __i = std::copy(__first, __last, __i);
│ │ │ +
913 iterator __finish = std::copy(__position, end(), __i);
│ │ │ +
914 this->_M_deallocate();
│ │ │ +
915 this->_M_impl._M_end_of_storage = __q + _S_nword(__len);
│ │ │ +
916 this->_M_impl._M_start = __start;
│ │ │ +
917 this->_M_impl._M_finish = __finish;
│ │ │ +
918 }
│ │ │ +
919 }
│ │ │ +
920 }
│ │ │ +
921
│ │ │ +
922 template<typename _Alloc>
│ │ │ +
923 _GLIBCXX20_CONSTEXPR
│ │ │ +
924 void
│ │ │ +
925 vector<bool, _Alloc>::
│ │ │ +
926 _M_insert_aux(iterator __position, bool __x)
│ │ │ +
927 {
│ │ │ +
928 if (this->_M_impl._M_finish._M_p != this->_M_impl._M_end_addr())
│ │ │ +
929 {
│ │ │ +
930 std::copy_backward(__position, this->_M_impl._M_finish,
│ │ │ +
931 this->_M_impl._M_finish + 1);
│ │ │ +
932 *__position = __x;
│ │ │ +
933 ++this->_M_impl._M_finish;
│ │ │ +
934 }
│ │ │ +
935 else
│ │ │ +
936 {
│ │ │ +
937 const size_type __len =
│ │ │ +
938 _M_check_len(size_type(1), "vector<bool>::_M_insert_aux");
│ │ │ +
939 _Bit_pointer __q = this->_M_allocate(__len);
│ │ │ +
940 iterator __start(std::__addressof(*__q), 0);
│ │ │ +
941 iterator __i = _M_copy_aligned(begin(), __position, __start);
│ │ │ +
942 *__i++ = __x;
│ │ │ +
943 iterator __finish = std::copy(__position, end(), __i);
│ │ │ +
944 this->_M_deallocate();
│ │ │ +
945 this->_M_impl._M_end_of_storage = __q + _S_nword(__len);
│ │ │ +
946 this->_M_impl._M_start = __start;
│ │ │ +
947 this->_M_impl._M_finish = __finish;
│ │ │ +
948 }
│ │ │ +
949 }
│ │ │ +
950
│ │ │ +
951 template<typename _Alloc>
│ │ │ +
952 _GLIBCXX20_CONSTEXPR
│ │ │ +
953 typename vector<bool, _Alloc>::iterator
│ │ │ +
954 vector<bool, _Alloc>::
│ │ │ +
955 _M_erase(iterator __position)
│ │ │ +
956 {
│ │ │ +
957 if (__position + 1 != end())
│ │ │ +
958 std::copy(__position + 1, end(), __position);
│ │ │ +
959 --this->_M_impl._M_finish;
│ │ │ +
960 return __position;
│ │ │ +
961 }
│ │ │ +
962
│ │ │ +
963 template<typename _Alloc>
│ │ │ +
964 _GLIBCXX20_CONSTEXPR
│ │ │ +
965 typename vector<bool, _Alloc>::iterator
│ │ │ +
966 vector<bool, _Alloc>::
│ │ │ +
967 _M_erase(iterator __first, iterator __last)
│ │ │ +
968 {
│ │ │ +
969 if (__first != __last)
│ │ │ +
970 _M_erase_at_end(std::copy(__last, end(), __first));
│ │ │ +
971 return __first;
│ │ │ +
972 }
│ │ │ +
973
│ │ │ +
974#if __cplusplus >= 201103L
│ │ │ +
975 template<typename _Alloc>
│ │ │ +
976 _GLIBCXX20_CONSTEXPR
│ │ │ +
977 bool
│ │ │ +
978 vector<bool, _Alloc>::
│ │ │ +
979 _M_shrink_to_fit()
│ │ │ +
980 {
│ │ │ +
981 if (capacity() - size() < int(_S_word_bit))
│ │ │ +
982 return false;
│ │ │ +
983 __try
│ │ │ +
984 {
│ │ │ +
985 if (size_type __n = size())
│ │ │ +
986 _M_reallocate(__n);
│ │ │ +
987 else
│ │ │ +
988 {
│ │ │ +
989 this->_M_deallocate();
│ │ │ +
990 this->_M_impl._M_reset();
│ │ │ +
991 }
│ │ │ +
992 return true;
│ │ │ +
993 }
│ │ │ +
994 __catch(...)
│ │ │ +
995 { return false; }
│ │ │ +
996 }
│ │ │ +
997#endif
│ │ │ +
998
│ │ │ +
999_GLIBCXX_END_NAMESPACE_CONTAINER
│ │ │ +
1000_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ +
1001} // namespace std
│ │ │ +
1002
│ │ │ +
1003#if __cplusplus >= 201103L
│ │ │ +
1004
│ │ │ +
1005namespace std _GLIBCXX_VISIBILITY(default)
│ │ │ +
1006{
│ │ │ +
1007_GLIBCXX_BEGIN_NAMESPACE_VERSION
│ │ │ +
1008
│ │ │ +
1009 template<typename _Alloc>
│ │ │ +
1010 size_t
│ │ │ +
1011 hash<_GLIBCXX_STD_C::vector<bool, _Alloc>>::
│ │ │ +
1012 operator()(const _GLIBCXX_STD_C::vector<bool, _Alloc>& __b) const noexcept
│ │ │ +
1013 {
│ │ │ +
1014 size_t __hash = 0;
│ │ │ +
1015 const size_t __words = __b.size() / _S_word_bit;
│ │ │ +
1016 if (__words)
│ │ │ +
1017 {
│ │ │ +
1018 const size_t __clength = __words * sizeof(_Bit_type);
│ │ │ +
1019 __hash = std::_Hash_impl::hash(__b._M_impl._M_start._M_p, __clength);
│ │ │ +
1020 }
│ │ │ +
1021
│ │ │ +
1022 const size_t __extrabits = __b.size() % _S_word_bit;
│ │ │ +
1023 if (__extrabits)
│ │ │ +
1024 {
│ │ │ +
1025 _Bit_type __hiword = *__b._M_impl._M_finish._M_p;
│ │ │ +
1026 __hiword &= ~((~static_cast<_Bit_type>(0)) << __extrabits);
│ │ │ +
1027
│ │ │ +
1028 const size_t __clength
│ │ │ +
1029 = (__extrabits + __CHAR_BIT__ - 1) / __CHAR_BIT__;
│ │ │ +
1030 if (__words)
│ │ │ +
1031 __hash = std::_Hash_impl::hash(&__hiword, __clength, __hash);
│ │ │ +
1032 else
│ │ │ +
1033 __hash = std::_Hash_impl::hash(&__hiword, __clength);
│ │ │ +
1034 }
│ │ │ +
1035
│ │ │ +
1036 return __hash;
│ │ │ +
1037 }
│ │ │ +
1038
│ │ │ +
1039_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ +
1040} // namespace std
│ │ │ +
1041
│ │ │ +
1042#endif // C++11
│ │ │ +
1043
│ │ │ +
1044#undef _GLIBCXX_ASAN_ANNOTATE_REINIT
│ │ │ +
1045#undef _GLIBCXX_ASAN_ANNOTATE_GROW
│ │ │ +
1046#undef _GLIBCXX_ASAN_ANNOTATE_GREW
│ │ │ +
1047#undef _GLIBCXX_ASAN_ANNOTATE_SHRINK
│ │ │ +
1048
│ │ │ +
1049#endif /* _VECTOR_TCC */
│ │ │ +
constexpr std::remove_reference< _Tp >::type && move(_Tp &&__t) noexcept
Convert a value to an rvalue.
Definition move.h:104
│ │ │ +
constexpr _Tp * __addressof(_Tp &__r) noexcept
Same as C++11 std::addressof.
Definition move.h:49
│ │ │ +
_Tp * end(valarray< _Tp > &__va) noexcept
Return an iterator pointing to one past the last element of the valarray.
Definition valarray:1245
│ │ │ +
_Tp * begin(valarray< _Tp > &__va) noexcept
Return an iterator pointing to the first element of the valarray.
Definition valarray:1223
│ │ │ +
constexpr iterator_traits< _Iter >::iterator_category __iterator_category(const _Iter &)
│ │ │
ISO C++ entities toplevel namespace is std.
│ │ │ - │ │ │ +
constexpr iterator_traits< _InputIterator >::difference_type distance(_InputIterator __first, _InputIterator __last)
A generalization of pointer arithmetic.
│ │ │ +
constexpr auto cend(const _Container &__cont) noexcept(noexcept(std::end(__cont))) -> decltype(std::end(__cont))
Return an iterator pointing to one past the last element of the const container.
│ │ │ +
constexpr auto size(const _Container &__cont) noexcept(noexcept(__cont.size())) -> decltype(__cont.size())
Return the size of a container.
│ │ │ +
constexpr void advance(_InputIterator &__i, _Distance __n)
A generalization of pointer arithmetic.
│ │ │ +
constexpr auto cbegin(const _Container &__cont) noexcept(noexcept(std::begin(__cont))) -> decltype(std::begin(__cont))
Return an iterator pointing to the first element of the const container.
│ │ │ +
constexpr void _Destroy(_ForwardIterator __first, _ForwardIterator __last)
│ │ │ +
Marking input iterators.
│ │ │ +
Forward iterators support a superset of input iterator operations.
│ │ │ +
Common iterator class.
│ │ │ +
A standard container which offers fixed time access to individual elements in any order.
Definition stl_vector.h:429
│ │ │ +
constexpr vector & operator=(const vector &__x)
Vector assignment operator.
│ │ │ +
constexpr void reserve(size_type __n)
Attempt to preallocate enough memory for specified number of elements.
Definition vector.tcc:68
│ │ │ + │ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,11 +1,11 @@ │ │ │ │ libstdc++ │ │ │ │ -stringfwd.h │ │ │ │ +vector.tcc │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -1// Forward declarations -*- C++ -*- │ │ │ │ +1// Vector implementation (out of line) -*- C++ -*- │ │ │ │ 2 │ │ │ │ 3// Copyright (C) 2001-2022 Free Software Foundation, Inc. │ │ │ │ 4// │ │ │ │ 5// This file is part of the GNU ISO C++ Library. This library is free │ │ │ │ 6// software; you can redistribute it and/or modify it under the │ │ │ │ 7// terms of the GNU General Public License as published by the │ │ │ │ 8// Free Software Foundation; either version 3, or (at your option) │ │ │ │ @@ -21,108 +21,1107 @@ │ │ │ │ 18// 3.1, as published by the Free Software Foundation. │ │ │ │ 19 │ │ │ │ 20// You should have received a copy of the GNU General Public License and │ │ │ │ 21// a copy of the GCC Runtime Library Exception along with this program; │ │ │ │ 22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see │ │ │ │ 23// . │ │ │ │ 24 │ │ │ │ -25/** @file bits/stringfwd.h │ │ │ │ -26 * This is an internal header file, included by other library headers. │ │ │ │ -27 * Do not attempt to use it directly. @headername{string} │ │ │ │ -28 */ │ │ │ │ -29 │ │ │ │ -30// │ │ │ │ -31// ISO C++ 14882: 21 Strings library │ │ │ │ -32// │ │ │ │ -33 │ │ │ │ -34#ifndef _STRINGFWD_H │ │ │ │ -35#define _STRINGFWD_H 1 │ │ │ │ -36 │ │ │ │ -37#pragma GCC system_header │ │ │ │ -38 │ │ │ │ -39#include <_b_i_t_s_/_c_+_+_c_o_n_f_i_g_._h> │ │ │ │ -40#include <_b_i_t_s_/_m_e_m_o_r_y_f_w_d_._h> │ │ │ │ -41 │ │ │ │ -42namespace _s_t_d _GLIBCXX_VISIBILITY(default) │ │ │ │ -43{ │ │ │ │ -44_GLIBCXX_BEGIN_NAMESPACE_VERSION │ │ │ │ -45 │ │ │ │ -46 /** │ │ │ │ -47 * @defgroup strings Strings │ │ │ │ -48 * │ │ │ │ -49 * @{ │ │ │ │ -50 */ │ │ │ │ -51 │ │ │ │ -52 template │ │ │ │ -53 struct char_traits; │ │ │ │ -54 │ │ │ │ -55 template<> struct char_traits; │ │ │ │ -56 │ │ │ │ -57 template<> struct char_traits; │ │ │ │ +25/* │ │ │ │ +26 * │ │ │ │ +27 * Copyright (c) 1994 │ │ │ │ +28 * Hewlett-Packard Company │ │ │ │ +29 * │ │ │ │ +30 * Permission to use, copy, modify, distribute and sell this software │ │ │ │ +31 * and its documentation for any purpose is hereby granted without fee, │ │ │ │ +32 * provided that the above copyright notice appear in all copies and │ │ │ │ +33 * that both that copyright notice and this permission notice appear │ │ │ │ +34 * in supporting documentation. Hewlett-Packard Company makes no │ │ │ │ +35 * representations about the suitability of this software for any │ │ │ │ +36 * purpose. It is provided "as is" without express or implied warranty. │ │ │ │ +37 * │ │ │ │ +38 * │ │ │ │ +39 * Copyright (c) 1996 │ │ │ │ +40 * Silicon Graphics Computer Systems, Inc. │ │ │ │ +41 * │ │ │ │ +42 * Permission to use, copy, modify, distribute and sell this software │ │ │ │ +43 * and its documentation for any purpose is hereby granted without fee, │ │ │ │ +44 * provided that the above copyright notice appear in all copies and │ │ │ │ +45 * that both that copyright notice and this permission notice appear │ │ │ │ +46 * in supporting documentation. Silicon Graphics makes no │ │ │ │ +47 * representations about the suitability of this software for any │ │ │ │ +48 * purpose. It is provided "as is" without express or implied warranty. │ │ │ │ +49 */ │ │ │ │ +50 │ │ │ │ +51/** @file bits/vector.tcc │ │ │ │ +52 * This is an internal header file, included by other library headers. │ │ │ │ +53 * Do not attempt to use it directly. @headername{vector} │ │ │ │ +54 */ │ │ │ │ +55 │ │ │ │ +56#ifndef _VECTOR_TCC │ │ │ │ +57#define _VECTOR_TCC 1 │ │ │ │ 58 │ │ │ │ -59#ifdef _GLIBCXX_USE_CHAR8_T │ │ │ │ -60 template<> struct char_traits; │ │ │ │ -61#endif │ │ │ │ -62 │ │ │ │ -63#if __cplusplus >= 201103L │ │ │ │ -64 template<> struct char_traits; │ │ │ │ -65 template<> struct char_traits; │ │ │ │ -66#endif │ │ │ │ -67 │ │ │ │ -68_GLIBCXX_BEGIN_NAMESPACE_CXX11 │ │ │ │ -69 │ │ │ │ -70 template, │ │ │ │ -71 typename _Alloc = allocator<_CharT> > │ │ │ │ -72 class basic_string; │ │ │ │ -73 │ │ │ │ -74_GLIBCXX_END_NAMESPACE_CXX11 │ │ │ │ -75 │ │ │ │ -76 /// A string of @c char │ │ │ │ -_7_7 typedef _b_a_s_i_c___s_t_r_i_n_g_<_c_h_a_r_> _s_t_r_i_n_g; │ │ │ │ -78 │ │ │ │ -79 /// A string of @c wchar_t │ │ │ │ -_8_0 typedef _b_a_s_i_c___s_t_r_i_n_g_<_w_c_h_a_r___t_> _w_s_t_r_i_n_g; │ │ │ │ -81 │ │ │ │ -82#ifdef _GLIBCXX_USE_CHAR8_T │ │ │ │ -83 /// A string of @c char8_t │ │ │ │ -84 typedef _b_a_s_i_c___s_t_r_i_n_g_<_c_h_a_r_8___t_> u8string; │ │ │ │ -85#endif │ │ │ │ -86 │ │ │ │ -87#if __cplusplus >= 201103L │ │ │ │ -88 /// A string of @c char16_t │ │ │ │ -_8_9 typedef _b_a_s_i_c___s_t_r_i_n_g_<_c_h_a_r_1_6___t_> _u_1_6_s_t_r_i_n_g; │ │ │ │ -90 │ │ │ │ -91 /// A string of @c char32_t │ │ │ │ -_9_2 typedef _b_a_s_i_c___s_t_r_i_n_g_<_c_h_a_r_3_2___t_> _u_3_2_s_t_r_i_n_g; │ │ │ │ -93#endif │ │ │ │ -94 │ │ │ │ -95 /** @} */ │ │ │ │ -96 │ │ │ │ -97_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ -98} // namespace std │ │ │ │ -99 │ │ │ │ -100#endif // _STRINGFWD_H │ │ │ │ -_m_e_m_o_r_y_f_w_d_._h │ │ │ │ -_c_+_+_c_o_n_f_i_g_._h │ │ │ │ -_s_t_d_:_:_s_t_r_i_n_g │ │ │ │ -basic_string< char > string │ │ │ │ -A string of char. │ │ │ │ -DDeeffiinniittiioonn _s_t_r_i_n_g_f_w_d_._h_:_7_7 │ │ │ │ -_s_t_d_:_:_u_3_2_s_t_r_i_n_g │ │ │ │ -basic_string< char32_t > u32string │ │ │ │ -A string of char32_t. │ │ │ │ -DDeeffiinniittiioonn _s_t_r_i_n_g_f_w_d_._h_:_9_2 │ │ │ │ -_s_t_d_:_:_u_1_6_s_t_r_i_n_g │ │ │ │ -basic_string< char16_t > u16string │ │ │ │ -A string of char16_t. │ │ │ │ -DDeeffiinniittiioonn _s_t_r_i_n_g_f_w_d_._h_:_8_9 │ │ │ │ -_s_t_d_:_:_w_s_t_r_i_n_g │ │ │ │ -basic_string< wchar_t > wstring │ │ │ │ -A string of wchar_t. │ │ │ │ -DDeeffiinniittiioonn _s_t_r_i_n_g_f_w_d_._h_:_8_0 │ │ │ │ +59namespace _s_t_d _GLIBCXX_VISIBILITY(default) │ │ │ │ +60{ │ │ │ │ +61_GLIBCXX_BEGIN_NAMESPACE_VERSION │ │ │ │ +62_GLIBCXX_BEGIN_NAMESPACE_CONTAINER │ │ │ │ +63 │ │ │ │ +64 template │ │ │ │ +65 _GLIBCXX20_CONSTEXPR │ │ │ │ +66 void │ │ │ │ +_6_7 _v_e_c_t_o_r_<___T_p_,_ ___A_l_l_o_c_>_:_: │ │ │ │ +68_ _r_e_s_e_r_v_e(size_type __n) │ │ │ │ +69 { │ │ │ │ +70 if (__n > this->max_size()) │ │ │ │ +71 __throw_length_error(__N("vector::reserve")); │ │ │ │ +72 if (this->capacity() < __n) │ │ │ │ +73 { │ │ │ │ +74 const size_type _____o_l_d___s_i_z_e = _s_i_z_e(); │ │ │ │ +75 pointer _____t_m_p; │ │ │ │ +76#if __cplusplus >= 201103L │ │ │ │ +77 if ___G_L_I_B_C_X_X_1_7___C_O_N_S_T_E_X_P_R (_S_use_relocate()) │ │ │ │ +78 { │ │ │ │ +79 _____t_m_p = this->_M_allocate(__n); │ │ │ │ +80 _S_relocate(this->_M_impl._M_start, _t_h_i_s->_M_impl._M_finish, │ │ │ │ +81 _____t_m_p, _M_get_Tp_allocator()); │ │ │ │ +82 } │ │ │ │ +83 else │ │ │ │ +84#endif │ │ │ │ +85 { │ │ │ │ +86 _____t_m_p = _M_allocate_and_copy(__n, │ │ │ │ +87 _GLIBCXX_MAKE_MOVE_IF_NOEXCEPT_ITERATOR(this->_M_impl._M_start), │ │ │ │ +88 _GLIBCXX_MAKE_MOVE_IF_NOEXCEPT_ITERATOR(this->_M_impl._M_finish)); │ │ │ │ +89 _s_t_d_:_:___D_e_s_t_r_o_y(this->_M_impl._M_start, _t_h_i_s->_M_impl._M_finish, │ │ │ │ +90 _M_get_Tp_allocator()); │ │ │ │ +91 } │ │ │ │ +92 _GLIBCXX_ASAN_ANNOTATE_REINIT; │ │ │ │ +93 _M_deallocate(this->_M_impl._M_start, │ │ │ │ +94 _t_h_i_s->_M_impl._M_end_of_storage │ │ │ │ +95 - _t_h_i_s->_M_impl._M_start); │ │ │ │ +96 this->_M_impl._M_start = _____t_m_p; │ │ │ │ +97 this->_M_impl._M_finish = _____t_m_p + _____o_l_d___s_i_z_e; │ │ │ │ +98 this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n; │ │ │ │ +99 } │ │ │ │ +100 } │ │ │ │ +101 │ │ │ │ +102#if __cplusplus >= 201103L │ │ │ │ +103 template │ │ │ │ +104 template │ │ │ │ +105#if __cplusplus > 201402L │ │ │ │ +106 ___G_L_I_B_C_X_X_2_0___C_O_N_S_T_E_X_P_R │ │ │ │ +107 typename vector<_Tp, _Alloc>::reference │ │ │ │ +108#else │ │ │ │ +109 void │ │ │ │ +110#endif │ │ │ │ +111 _v_e_c_t_o_r_<___T_p_,_ ___A_l_l_o_c_>_:_: │ │ │ │ +112_ _e_m_p_l_a_c_e___b_a_c_k(___A_r_g_s&&... _____a_r_g_s) │ │ │ │ +113 { │ │ │ │ +114 if (this->_M_impl._M_finish != _t_h_i_s->_M_impl._M_end_of_storage) │ │ │ │ +115 { │ │ │ │ +116 _GLIBCXX_ASAN_ANNOTATE_GROW(1); │ │ │ │ +117 _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, │ │ │ │ +118 _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(_____a_r_g_s)...); │ │ │ │ +119 ++this->_M_impl._M_finish; │ │ │ │ +120 _GLIBCXX_ASAN_ANNOTATE_GREW(1); │ │ │ │ +121 } │ │ │ │ +122 else │ │ │ │ +123 _M_realloc_insert(_e_n_d(), _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(__args)...); │ │ │ │ +124#if __cplusplus > 201402L │ │ │ │ +125 return back(); │ │ │ │ +126#endif │ │ │ │ +127 } │ │ │ │ +128#endif │ │ │ │ +129 │ │ │ │ +130 template │ │ │ │ +131 _GLIBCXX20_CONSTEXPR │ │ │ │ +132 typename vector<_Tp, _Alloc>::iterator │ │ │ │ +_1_3_3 _v_e_c_t_o_r_<___T_p_,_ ___A_l_l_o_c_>:: │ │ │ │ +134#if __cplusplus >= 201103L │ │ │ │ +135 insert(const_iterator _____p_o_s_i_t_i_o_n, const value_type& __x) │ │ │ │ +136#else │ │ │ │ +137 insert(iterator _____p_o_s_i_t_i_o_n, const value_type& __x) │ │ │ │ +138#endif │ │ │ │ +139 { │ │ │ │ +140 const size_type __n = _____p_o_s_i_t_i_o_n - _b_e_g_i_n(); │ │ │ │ +141 if (this->_M_impl._M_finish != _t_h_i_s->_M_impl._M_end_of_storage) │ │ │ │ +142 if (_____p_o_s_i_t_i_o_n == _e_n_d()) │ │ │ │ +143 { │ │ │ │ +144 _GLIBCXX_ASAN_ANNOTATE_GROW(1); │ │ │ │ +145 _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, │ │ │ │ +146 __x); │ │ │ │ +147 ++this->_M_impl._M_finish; │ │ │ │ +148 _GLIBCXX_ASAN_ANNOTATE_GREW(1); │ │ │ │ +149 } │ │ │ │ +150 else │ │ │ │ +151 { │ │ │ │ +152#if __cplusplus >= 201103L │ │ │ │ +153 const auto _____p_o_s = _b_e_g_i_n() + (_____p_o_s_i_t_i_o_n - _c_b_e_g_i_n()); │ │ │ │ +154 // __x could be an existing element of this vector, so make a │ │ │ │ +155 // copy of it before _M_insert_aux moves elements around. │ │ │ │ +156 _Temporary_value _____x___c_o_p_y(this, __x); │ │ │ │ +157 _M_insert_aux(_____p_o_s, _s_t_d_:_:_m_o_v_e(_____x___c_o_p_y._M_val())); │ │ │ │ +158#else │ │ │ │ +159 _M_insert_aux(_____p_o_s_i_t_i_o_n, __x); │ │ │ │ +160#endif │ │ │ │ +161 } │ │ │ │ +162 else │ │ │ │ +163#if __cplusplus >= 201103L │ │ │ │ +164 _M_realloc_insert(_b_e_g_i_n() + (_____p_o_s_i_t_i_o_n - _c_b_e_g_i_n()), __x); │ │ │ │ +165#else │ │ │ │ +166 _M_realloc_insert(_____p_o_s_i_t_i_o_n, __x); │ │ │ │ +167#endif │ │ │ │ +168 │ │ │ │ +169 return iterator(this->_M_impl._M_start + __n); │ │ │ │ +170 } │ │ │ │ +171 │ │ │ │ +172 template │ │ │ │ +173 ___G_L_I_B_C_X_X_2_0___C_O_N_S_T_E_X_P_R │ │ │ │ +174 typename vector<_Tp, _Alloc>::iterator │ │ │ │ +175 _v_e_c_t_o_r_<___T_p_,_ ___A_l_l_o_c_>_:_: │ │ │ │ +176_ ___M___e_r_a_s_e(_i_t_e_r_a_t_o_r _____p_o_s_i_t_i_o_n) │ │ │ │ +177 { │ │ │ │ +178 if (_____p_o_s_i_t_i_o_n + 1 != _e_n_d()) │ │ │ │ +179 _GLIBCXX_MOVE3(_____p_o_s_i_t_i_o_n + 1, _e_n_d(), _____p_o_s_i_t_i_o_n); │ │ │ │ +180 --this->_M_impl._M_finish; │ │ │ │ +181 _Alloc_traits::destroy(this->_M_impl, this->_M_impl._M_finish); │ │ │ │ +182 _GLIBCXX_ASAN_ANNOTATE_SHRINK(1); │ │ │ │ +183 return _____p_o_s_i_t_i_o_n; │ │ │ │ +184 } │ │ │ │ +185 │ │ │ │ +186 template │ │ │ │ +187 _GLIBCXX20_CONSTEXPR │ │ │ │ +188 typename vector<_Tp, _Alloc>::iterator │ │ │ │ +189 vector<_Tp, _Alloc>:: │ │ │ │ +190 _M_erase(iterator __first, iterator __last) │ │ │ │ +191 { │ │ │ │ +192 if (__first != __last) │ │ │ │ +193 { │ │ │ │ +194 if (__last != _e_n_d()) │ │ │ │ +195 _GLIBCXX_MOVE3(__last, _e_n_d(), __first); │ │ │ │ +196 _M_erase_at_end(__first.base() + (_e_n_d() - __last)); │ │ │ │ +197 } │ │ │ │ +198 return __first; │ │ │ │ +199 } │ │ │ │ +200 │ │ │ │ +201 template │ │ │ │ +202 _GLIBCXX20_CONSTEXPR │ │ │ │ +203 vector<_Tp, _Alloc>& │ │ │ │ +204 _v_e_c_t_o_r_<___T_p_,_ ___A_l_l_o_c_>_:_: │ │ │ │ +205_ _o_p_e_r_a_t_o_r_=(const vector<_Tp, _Alloc>& __x) │ │ │ │ +206 { │ │ │ │ +207 if (_s_t_d_:_:_____a_d_d_r_e_s_s_o_f(__x) != this) │ │ │ │ +208 { │ │ │ │ +209 _GLIBCXX_ASAN_ANNOTATE_REINIT; │ │ │ │ +210#if __cplusplus >= 201103L │ │ │ │ +211 if (_Alloc_traits::_S_propagate_on_copy_assign()) │ │ │ │ +212 { │ │ │ │ +213 if (!_Alloc_traits::_S_always_equal() │ │ │ │ +214 && _M_get_Tp_allocator() != __x._M_get_Tp_allocator()) │ │ │ │ +215 { │ │ │ │ +216 // replacement allocator cannot free existing storage │ │ │ │ +217 this->clear(); │ │ │ │ +218 _M_deallocate(this->_M_impl._M_start, │ │ │ │ +219 this->_M_impl._M_end_of_storage │ │ │ │ +220 - this->_M_impl._M_start); │ │ │ │ +221 this->_M_impl._M_start = nullptr; │ │ │ │ +222 this->_M_impl._M_finish = nullptr; │ │ │ │ +223 this->_M_impl._M_end_of_storage = nullptr; │ │ │ │ +224 } │ │ │ │ +225 _s_t_d_:_:_____a_l_l_o_c___o_n___c_o_p_y(_M_get_Tp_allocator(), │ │ │ │ +226 __x._M_get_Tp_allocator()); │ │ │ │ +227 } │ │ │ │ +228#endif │ │ │ │ +229 const size_type __xlen = __x.size(); │ │ │ │ +230 if (__xlen > capacity()) │ │ │ │ +231 { │ │ │ │ +232 pointer __tmp = _M_allocate_and_copy(__xlen, __x.begin(), │ │ │ │ +233 __x.end()); │ │ │ │ +234 _s_t_d_:_:___D_e_s_t_r_o_y(this->_M_impl._M_start, this->_M_impl._M_finish, │ │ │ │ +235 _M_get_Tp_allocator()); │ │ │ │ +236 _M_deallocate(this->_M_impl._M_start, │ │ │ │ +237 this->_M_impl._M_end_of_storage │ │ │ │ +238 - this->_M_impl._M_start); │ │ │ │ +239 this->_M_impl._M_start = __tmp; │ │ │ │ +240 this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __xlen; │ │ │ │ +241 } │ │ │ │ +242 else if (_s_i_z_e() >= __xlen) │ │ │ │ +243 { │ │ │ │ +244 _s_t_d_:_:___D_e_s_t_r_o_y(std::copy(__x.begin(), __x.end(), _b_e_g_i_n()), │ │ │ │ +245 _e_n_d(), _M_get_Tp_allocator()); │ │ │ │ +246 } │ │ │ │ +247 else │ │ │ │ +248 { │ │ │ │ +249 std::copy(__x._M_impl._M_start, __x._M_impl._M_start + _s_i_z_e(), │ │ │ │ +250 this->_M_impl._M_start); │ │ │ │ +251 _s_t_d_:_:_____u_n_i_n_i_t_i_a_l_i_z_e_d___c_o_p_y___a(__x._M_impl._M_start + _s_i_z_e(), │ │ │ │ +252 __x._M_impl._M_finish, │ │ │ │ +253 this->_M_impl._M_finish, │ │ │ │ +254 _M_get_Tp_allocator()); │ │ │ │ +255 } │ │ │ │ +256 this->_M_impl._M_finish = this->_M_impl._M_start + __xlen; │ │ │ │ +257 } │ │ │ │ +258 return *this; │ │ │ │ +259 } │ │ │ │ +260 │ │ │ │ +261 template │ │ │ │ +262 _GLIBCXX20_CONSTEXPR │ │ │ │ +263 void │ │ │ │ +264 vector<_Tp, _Alloc>:: │ │ │ │ +265 _M_fill_assign(size_t __n, const value_type& __val) │ │ │ │ +266 { │ │ │ │ +267 if (__n > capacity()) │ │ │ │ +268 { │ │ │ │ +269 vector __tmp(__n, __val, _M_get_Tp_allocator()); │ │ │ │ +270 __tmp._M_impl._M_swap_data(this->_M_impl); │ │ │ │ +271 } │ │ │ │ +272 else if (__n > _s_i_z_e()) │ │ │ │ +273 { │ │ │ │ +274 std::fill(_b_e_g_i_n(), _e_n_d(), __val); │ │ │ │ +275 const size_type __add = __n - _s_i_z_e(); │ │ │ │ +276 _GLIBCXX_ASAN_ANNOTATE_GROW(__add); │ │ │ │ +277 this->_M_impl._M_finish = │ │ │ │ +278 _s_t_d_:_:_____u_n_i_n_i_t_i_a_l_i_z_e_d___f_i_l_l___n___a(this->_M_impl._M_finish, │ │ │ │ +279 __add, __val, _M_get_Tp_allocator()); │ │ │ │ +280 _GLIBCXX_ASAN_ANNOTATE_GREW(__add); │ │ │ │ +281 } │ │ │ │ +282 else │ │ │ │ +283 _M_erase_at_end(std::fill_n(this->_M_impl._M_start, __n, __val)); │ │ │ │ +284 } │ │ │ │ +285 │ │ │ │ +286 template │ │ │ │ +287 template │ │ │ │ +288 _GLIBCXX20_CONSTEXPR │ │ │ │ +289 void │ │ │ │ +290 vector<_Tp, _Alloc>:: │ │ │ │ +291 _M_assign_aux(_InputIterator __first, _InputIterator __last, │ │ │ │ +292 _s_t_d_:_:_i_n_p_u_t___i_t_e_r_a_t_o_r___t_a_g) │ │ │ │ +293 { │ │ │ │ +294 pointer __cur(this->_M_impl._M_start); │ │ │ │ +295 for (; __first != __last && __cur != this->_M_impl._M_finish; │ │ │ │ +296 ++__cur, (void)++__first) │ │ │ │ +297 *__cur = *__first; │ │ │ │ +298 if (__first == __last) │ │ │ │ +299 _M_erase_at_end(__cur); │ │ │ │ +300 else │ │ │ │ +301 _M_range_insert(_e_n_d(), __first, __last, │ │ │ │ +302 _s_t_d_:_:_____i_t_e_r_a_t_o_r___c_a_t_e_g_o_r_y(__first)); │ │ │ │ +303 } │ │ │ │ +304 │ │ │ │ +305 template │ │ │ │ +306 template │ │ │ │ +307 _GLIBCXX20_CONSTEXPR │ │ │ │ +308 void │ │ │ │ +309 vector<_Tp, _Alloc>:: │ │ │ │ +310 _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, │ │ │ │ +311 _s_t_d_:_:_f_o_r_w_a_r_d___i_t_e_r_a_t_o_r___t_a_g) │ │ │ │ +312 { │ │ │ │ +313 const size_type __len = _s_t_d_:_:_d_i_s_t_a_n_c_e(__first, __last); │ │ │ │ +314 │ │ │ │ +315 if (__len > capacity()) │ │ │ │ +316 { │ │ │ │ +317 _S_check_init_len(__len, _M_get_Tp_allocator()); │ │ │ │ +318 pointer __tmp(_M_allocate_and_copy(__len, __first, __last)); │ │ │ │ +319 _s_t_d_:_:___D_e_s_t_r_o_y(this->_M_impl._M_start, this->_M_impl._M_finish, │ │ │ │ +320 _M_get_Tp_allocator()); │ │ │ │ +321 _GLIBCXX_ASAN_ANNOTATE_REINIT; │ │ │ │ +322 _M_deallocate(this->_M_impl._M_start, │ │ │ │ +323 this->_M_impl._M_end_of_storage │ │ │ │ +324 - this->_M_impl._M_start); │ │ │ │ +325 this->_M_impl._M_start = __tmp; │ │ │ │ +326 this->_M_impl._M_finish = this->_M_impl._M_start + __len; │ │ │ │ +327 this->_M_impl._M_end_of_storage = this->_M_impl._M_finish; │ │ │ │ +328 } │ │ │ │ +329 else if (_s_i_z_e() >= __len) │ │ │ │ +330 _M_erase_at_end(std::copy(__first, __last, this->_M_impl._M_start)); │ │ │ │ +331 else │ │ │ │ +332 { │ │ │ │ +333 _ForwardIterator __mid = __first; │ │ │ │ +334 _s_t_d_:_:_a_d_v_a_n_c_e(__mid, _s_i_z_e()); │ │ │ │ +335 std::copy(__first, __mid, this->_M_impl._M_start); │ │ │ │ +336 const size_type __attribute__((__unused__)) __n = __len - _s_i_z_e(); │ │ │ │ +337 _GLIBCXX_ASAN_ANNOTATE_GROW(__n); │ │ │ │ +338 this->_M_impl._M_finish = │ │ │ │ +339 _s_t_d_:_:_____u_n_i_n_i_t_i_a_l_i_z_e_d___c_o_p_y___a(__mid, __last, │ │ │ │ +340 this->_M_impl._M_finish, │ │ │ │ +341 _M_get_Tp_allocator()); │ │ │ │ +342 _GLIBCXX_ASAN_ANNOTATE_GREW(__n); │ │ │ │ +343 } │ │ │ │ +344 } │ │ │ │ +345 │ │ │ │ +346#if __cplusplus >= 201103L │ │ │ │ +347 template │ │ │ │ +348 _GLIBCXX20_CONSTEXPR │ │ │ │ +349 auto │ │ │ │ +350 vector<_Tp, _Alloc>:: │ │ │ │ +351 _M_insert_rval(const_iterator __position, value_type&& __v) -> iterator │ │ │ │ +352 { │ │ │ │ +353 const auto __n = __position - _c_b_e_g_i_n(); │ │ │ │ +354 if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage) │ │ │ │ +355 if (__position == _c_e_n_d()) │ │ │ │ +356 { │ │ │ │ +357 _GLIBCXX_ASAN_ANNOTATE_GROW(1); │ │ │ │ +358 _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, │ │ │ │ +359 _s_t_d_:_:_m_o_v_e(__v)); │ │ │ │ +360 ++this->_M_impl._M_finish; │ │ │ │ +361 _GLIBCXX_ASAN_ANNOTATE_GREW(1); │ │ │ │ +362 } │ │ │ │ +363 else │ │ │ │ +364 _M_insert_aux(_b_e_g_i_n() + __n, _s_t_d_:_:_m_o_v_e(__v)); │ │ │ │ +365 else │ │ │ │ +366 _M_realloc_insert(_b_e_g_i_n() + __n, _s_t_d_:_:_m_o_v_e(__v)); │ │ │ │ +367 │ │ │ │ +368 return iterator(this->_M_impl._M_start + __n); │ │ │ │ +369 } │ │ │ │ +370 │ │ │ │ +371 template │ │ │ │ +372 template │ │ │ │ +373 _GLIBCXX20_CONSTEXPR │ │ │ │ +374 auto │ │ │ │ +375 vector<_Tp, _Alloc>:: │ │ │ │ +376 _M_emplace_aux(const_iterator __position, _Args&&... __args) │ │ │ │ +377 -> iterator │ │ │ │ +378 { │ │ │ │ +379 const auto __n = __position - _c_b_e_g_i_n(); │ │ │ │ +380 if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage) │ │ │ │ +381 if (__position == _c_e_n_d()) │ │ │ │ +382 { │ │ │ │ +383 _GLIBCXX_ASAN_ANNOTATE_GROW(1); │ │ │ │ +384 _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, │ │ │ │ +385 _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(__args)...); │ │ │ │ +386 ++this->_M_impl._M_finish; │ │ │ │ +387 _GLIBCXX_ASAN_ANNOTATE_GREW(1); │ │ │ │ +388 } │ │ │ │ +389 else │ │ │ │ +390 { │ │ │ │ +391 // We need to construct a temporary because something in __args... │ │ │ │ +392 // could alias one of the elements of the container and so we │ │ │ │ +393 // need to use it before _M_insert_aux moves elements around. │ │ │ │ +394 _Temporary_value __tmp(this, _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(__args)...); │ │ │ │ +395 _M_insert_aux(_b_e_g_i_n() + __n, _s_t_d_:_:_m_o_v_e(__tmp._M_val())); │ │ │ │ +396 } │ │ │ │ +397 else │ │ │ │ +398 _M_realloc_insert(_b_e_g_i_n() + __n, _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(__args)...); │ │ │ │ +399 │ │ │ │ +400 return iterator(this->_M_impl._M_start + __n); │ │ │ │ +401 } │ │ │ │ +402 │ │ │ │ +403 template │ │ │ │ +404 template │ │ │ │ +405 _GLIBCXX20_CONSTEXPR │ │ │ │ +406 void │ │ │ │ +407 vector<_Tp, _Alloc>:: │ │ │ │ +408 _M_insert_aux(iterator __position, _Arg&& __arg) │ │ │ │ +409#else │ │ │ │ +410 template │ │ │ │ +411 void │ │ │ │ +412 vector<_Tp, _Alloc>:: │ │ │ │ +413 _M_insert_aux(iterator __position, const _Tp& __x) │ │ │ │ +414#endif │ │ │ │ +415 { │ │ │ │ +416 _GLIBCXX_ASAN_ANNOTATE_GROW(1); │ │ │ │ +417 _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, │ │ │ │ +418 _GLIBCXX_MOVE(*(this->_M_impl._M_finish - 1))); │ │ │ │ +419 ++this->_M_impl._M_finish; │ │ │ │ +420 _GLIBCXX_ASAN_ANNOTATE_GREW(1); │ │ │ │ +421#if __cplusplus < 201103L │ │ │ │ +422 _Tp __x_copy = __x; │ │ │ │ +423#endif │ │ │ │ +424 _GLIBCXX_MOVE_BACKWARD3(__position.base(), │ │ │ │ +425 this->_M_impl._M_finish - 2, │ │ │ │ +426 this->_M_impl._M_finish - 1); │ │ │ │ +427#if __cplusplus < 201103L │ │ │ │ +428 *__position = __x_copy; │ │ │ │ +429#else │ │ │ │ +430 *__position = _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_>(__arg); │ │ │ │ +431#endif │ │ │ │ +432 } │ │ │ │ +433 │ │ │ │ +434#if __cplusplus >= 201103L │ │ │ │ +435 template │ │ │ │ +436 template │ │ │ │ +437 _GLIBCXX20_CONSTEXPR │ │ │ │ +438 void │ │ │ │ +439 vector<_Tp, _Alloc>:: │ │ │ │ +440 _M_realloc_insert(iterator __position, _Args&&... __args) │ │ │ │ +441#else │ │ │ │ +442 template │ │ │ │ +443 void │ │ │ │ +444 vector<_Tp, _Alloc>:: │ │ │ │ +445 _M_realloc_insert(iterator __position, const _Tp& __x) │ │ │ │ +446#endif │ │ │ │ +447 { │ │ │ │ +448 const size_type __len = │ │ │ │ +449 _M_check_len(size_type(1), "vector::_M_realloc_insert"); │ │ │ │ +450 pointer __old_start = this->_M_impl._M_start; │ │ │ │ +451 pointer __old_finish = this->_M_impl._M_finish; │ │ │ │ +452 const size_type __elems_before = __position - _b_e_g_i_n(); │ │ │ │ +453 pointer __new_start(this->_M_allocate(__len)); │ │ │ │ +454 pointer __new_finish(__new_start); │ │ │ │ +455 __try │ │ │ │ +456 { │ │ │ │ +457 // The order of the three operations is dictated by the C++11 │ │ │ │ +458 // case, where the moves could alter a new element belonging │ │ │ │ +459 // to the existing vector. This is an issue only for callers │ │ │ │ +460 // taking the element by lvalue ref (see last bullet of C++11 │ │ │ │ +461 // [res.on.arguments]). │ │ │ │ +462 _Alloc_traits::construct(this->_M_impl, │ │ │ │ +463 __new_start + __elems_before, │ │ │ │ +464#if __cplusplus >= 201103L │ │ │ │ +465 _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(__args)...); │ │ │ │ +466#else │ │ │ │ +467 __x); │ │ │ │ +468#endif │ │ │ │ +469 __new_finish = pointer(); │ │ │ │ +470 │ │ │ │ +471#if __cplusplus >= 201103L │ │ │ │ +472 if _GLIBCXX17_CONSTEXPR (_S_use_relocate()) │ │ │ │ +473 { │ │ │ │ +474 __new_finish = _S_relocate(__old_start, __position.base(), │ │ │ │ +475 __new_start, _M_get_Tp_allocator()); │ │ │ │ +476 │ │ │ │ +477 ++__new_finish; │ │ │ │ +478 │ │ │ │ +479 __new_finish = _S_relocate(__position.base(), __old_finish, │ │ │ │ +480 __new_finish, _M_get_Tp_allocator()); │ │ │ │ +481 } │ │ │ │ +482 else │ │ │ │ +483#endif │ │ │ │ +484 { │ │ │ │ +485 __new_finish │ │ │ │ +486 = _s_t_d_:_:_____u_n_i_n_i_t_i_a_l_i_z_e_d___m_o_v_e___i_f___n_o_e_x_c_e_p_t___a │ │ │ │ +487 (__old_start, __position.base(), │ │ │ │ +488 __new_start, _M_get_Tp_allocator()); │ │ │ │ +489 │ │ │ │ +490 ++__new_finish; │ │ │ │ +491 │ │ │ │ +492 __new_finish │ │ │ │ +493 = _s_t_d_:_:_____u_n_i_n_i_t_i_a_l_i_z_e_d___m_o_v_e___i_f___n_o_e_x_c_e_p_t___a │ │ │ │ +494 (__position.base(), __old_finish, │ │ │ │ +495 __new_finish, _M_get_Tp_allocator()); │ │ │ │ +496 } │ │ │ │ +497 } │ │ │ │ +498 __catch(...) │ │ │ │ +499 { │ │ │ │ +500 if (!__new_finish) │ │ │ │ +501 _Alloc_traits::destroy(this->_M_impl, │ │ │ │ +502 __new_start + __elems_before); │ │ │ │ +503 else │ │ │ │ +504 _s_t_d_:_:___D_e_s_t_r_o_y(__new_start, __new_finish, _M_get_Tp_allocator()); │ │ │ │ +505 _M_deallocate(__new_start, __len); │ │ │ │ +506 __throw_exception_again; │ │ │ │ +507 } │ │ │ │ +508#if __cplusplus >= 201103L │ │ │ │ +509 if _GLIBCXX17_CONSTEXPR (!_S_use_relocate()) │ │ │ │ +510#endif │ │ │ │ +511 _s_t_d_:_:___D_e_s_t_r_o_y(__old_start, __old_finish, _M_get_Tp_allocator()); │ │ │ │ +512 _GLIBCXX_ASAN_ANNOTATE_REINIT; │ │ │ │ +513 _M_deallocate(__old_start, │ │ │ │ +514 this->_M_impl._M_end_of_storage - __old_start); │ │ │ │ +515 this->_M_impl._M_start = __new_start; │ │ │ │ +516 this->_M_impl._M_finish = __new_finish; │ │ │ │ +517 this->_M_impl._M_end_of_storage = __new_start + __len; │ │ │ │ +518 } │ │ │ │ +519 │ │ │ │ +520 template │ │ │ │ +521 _GLIBCXX20_CONSTEXPR │ │ │ │ +522 void │ │ │ │ +523 vector<_Tp, _Alloc>:: │ │ │ │ +524 _M_fill_insert(iterator __position, size_type __n, const value_type& __x) │ │ │ │ +525 { │ │ │ │ +526 if (__n != 0) │ │ │ │ +527 { │ │ │ │ +528 if (size_type(this->_M_impl._M_end_of_storage │ │ │ │ +529 - this->_M_impl._M_finish) >= __n) │ │ │ │ +530 { │ │ │ │ +531#if __cplusplus < 201103L │ │ │ │ +532 value_type __x_copy = __x; │ │ │ │ +533#else │ │ │ │ +534 _Temporary_value __tmp(this, __x); │ │ │ │ +535 value_type& __x_copy = __tmp._M_val(); │ │ │ │ +536#endif │ │ │ │ +537 const size_type __elems_after = _e_n_d() - __position; │ │ │ │ +538 pointer __old_finish(this->_M_impl._M_finish); │ │ │ │ +539 if (__elems_after > __n) │ │ │ │ +540 { │ │ │ │ +541 _GLIBCXX_ASAN_ANNOTATE_GROW(__n); │ │ │ │ +542 _s_t_d_:_:_____u_n_i_n_i_t_i_a_l_i_z_e_d___m_o_v_e___a(__old_finish - __n, │ │ │ │ +543 __old_finish, │ │ │ │ +544 __old_finish, │ │ │ │ +545 _M_get_Tp_allocator()); │ │ │ │ +546 this->_M_impl._M_finish += __n; │ │ │ │ +547 _GLIBCXX_ASAN_ANNOTATE_GREW(__n); │ │ │ │ +548 _GLIBCXX_MOVE_BACKWARD3(__position.base(), │ │ │ │ +549 __old_finish - __n, __old_finish); │ │ │ │ +550 std::fill(__position.base(), __position.base() + __n, │ │ │ │ +551 __x_copy); │ │ │ │ +552 } │ │ │ │ +553 else │ │ │ │ +554 { │ │ │ │ +555 _GLIBCXX_ASAN_ANNOTATE_GROW(__n); │ │ │ │ +556 this->_M_impl._M_finish = │ │ │ │ +557 _s_t_d_:_:_____u_n_i_n_i_t_i_a_l_i_z_e_d___f_i_l_l___n___a(__old_finish, │ │ │ │ +558 __n - __elems_after, │ │ │ │ +559 __x_copy, │ │ │ │ +560 _M_get_Tp_allocator()); │ │ │ │ +561 _GLIBCXX_ASAN_ANNOTATE_GREW(__n - __elems_after); │ │ │ │ +562 _s_t_d_:_:_____u_n_i_n_i_t_i_a_l_i_z_e_d___m_o_v_e___a(__position.base(), __old_finish, │ │ │ │ +563 this->_M_impl._M_finish, │ │ │ │ +564 _M_get_Tp_allocator()); │ │ │ │ +565 this->_M_impl._M_finish += __elems_after; │ │ │ │ +566 _GLIBCXX_ASAN_ANNOTATE_GREW(__elems_after); │ │ │ │ +567 std::fill(__position.base(), __old_finish, __x_copy); │ │ │ │ +568 } │ │ │ │ +569 } │ │ │ │ +570 else │ │ │ │ +571 { │ │ │ │ +572 // Make local copies of these members because the compiler thinks │ │ │ │ +573 // the allocator can alter them if 'this' is globally reachable. │ │ │ │ +574 pointer __old_start = this->_M_impl._M_start; │ │ │ │ +575 pointer __old_finish = this->_M_impl._M_finish; │ │ │ │ +576 const pointer __pos = __position.base(); │ │ │ │ +577 │ │ │ │ +578 const size_type __len = │ │ │ │ +579 _M_check_len(__n, "vector::_M_fill_insert"); │ │ │ │ +580 const size_type __elems_before = __pos - __old_start; │ │ │ │ +581 pointer __new_start(this->_M_allocate(__len)); │ │ │ │ +582 pointer __new_finish(__new_start); │ │ │ │ +583 __try │ │ │ │ +584 { │ │ │ │ +585 // See _M_realloc_insert above. │ │ │ │ +586 _s_t_d_:_:_____u_n_i_n_i_t_i_a_l_i_z_e_d___f_i_l_l___n___a(__new_start + __elems_before, │ │ │ │ +587 __n, __x, │ │ │ │ +588 _M_get_Tp_allocator()); │ │ │ │ +589 __new_finish = pointer(); │ │ │ │ +590 │ │ │ │ +591 __new_finish │ │ │ │ +592 = _s_t_d_:_:_____u_n_i_n_i_t_i_a_l_i_z_e_d___m_o_v_e___i_f___n_o_e_x_c_e_p_t___a │ │ │ │ +593 (__old_start, __pos, __new_start, _M_get_Tp_allocator()); │ │ │ │ +594 │ │ │ │ +595 __new_finish += __n; │ │ │ │ +596 │ │ │ │ +597 __new_finish │ │ │ │ +598 = _s_t_d_:_:_____u_n_i_n_i_t_i_a_l_i_z_e_d___m_o_v_e___i_f___n_o_e_x_c_e_p_t___a │ │ │ │ +599 (__pos, __old_finish, __new_finish, _M_get_Tp_allocator()); │ │ │ │ +600 } │ │ │ │ +601 __catch(...) │ │ │ │ +602 { │ │ │ │ +603 if (!__new_finish) │ │ │ │ +604 _s_t_d_:_:___D_e_s_t_r_o_y(__new_start + __elems_before, │ │ │ │ +605 __new_start + __elems_before + __n, │ │ │ │ +606 _M_get_Tp_allocator()); │ │ │ │ +607 else │ │ │ │ +608 _s_t_d_:_:___D_e_s_t_r_o_y(__new_start, __new_finish, │ │ │ │ +609 _M_get_Tp_allocator()); │ │ │ │ +610 _M_deallocate(__new_start, __len); │ │ │ │ +611 __throw_exception_again; │ │ │ │ +612 } │ │ │ │ +613 _s_t_d_:_:___D_e_s_t_r_o_y(__old_start, __old_finish, _M_get_Tp_allocator()); │ │ │ │ +614 _GLIBCXX_ASAN_ANNOTATE_REINIT; │ │ │ │ +615 _M_deallocate(__old_start, │ │ │ │ +616 this->_M_impl._M_end_of_storage - __old_start); │ │ │ │ +617 this->_M_impl._M_start = __new_start; │ │ │ │ +618 this->_M_impl._M_finish = __new_finish; │ │ │ │ +619 this->_M_impl._M_end_of_storage = __new_start + __len; │ │ │ │ +620 } │ │ │ │ +621 } │ │ │ │ +622 } │ │ │ │ +623 │ │ │ │ +624#if __cplusplus >= 201103L │ │ │ │ +625 template │ │ │ │ +626 _GLIBCXX20_CONSTEXPR │ │ │ │ +627 void │ │ │ │ +628 vector<_Tp, _Alloc>:: │ │ │ │ +629 _M_default_append(size_type __n) │ │ │ │ +630 { │ │ │ │ +631 if (__n != 0) │ │ │ │ +632 { │ │ │ │ +633 const size_type __size = _s_i_z_e(); │ │ │ │ +634 size_type __navail = size_type(this->_M_impl._M_end_of_storage │ │ │ │ +635 - this->_M_impl._M_finish); │ │ │ │ +636 │ │ │ │ +637 if (__size > max_size() || __navail > max_size() - __size) │ │ │ │ +638 __builtin_unreachable(); │ │ │ │ +639 │ │ │ │ +640 if (__navail >= __n) │ │ │ │ +641 { │ │ │ │ +642 _GLIBCXX_ASAN_ANNOTATE_GROW(__n); │ │ │ │ +643 this->_M_impl._M_finish = │ │ │ │ +644 _s_t_d_:_:_____u_n_i_n_i_t_i_a_l_i_z_e_d___d_e_f_a_u_l_t___n___a(this->_M_impl._M_finish, │ │ │ │ +645 __n, _M_get_Tp_allocator()); │ │ │ │ +646 _GLIBCXX_ASAN_ANNOTATE_GREW(__n); │ │ │ │ +647 } │ │ │ │ +648 else │ │ │ │ +649 { │ │ │ │ +650 // Make local copies of these members because the compiler thinks │ │ │ │ +651 // the allocator can alter them if 'this' is globally reachable. │ │ │ │ +652 pointer __old_start = this->_M_impl._M_start; │ │ │ │ +653 pointer __old_finish = this->_M_impl._M_finish; │ │ │ │ +654 │ │ │ │ +655 const size_type __len = │ │ │ │ +656 _M_check_len(__n, "vector::_M_default_append"); │ │ │ │ +657 pointer __new_start(this->_M_allocate(__len)); │ │ │ │ +658 if _GLIBCXX17_CONSTEXPR (_S_use_relocate()) │ │ │ │ +659 { │ │ │ │ +660 __try │ │ │ │ +661 { │ │ │ │ +662 _s_t_d_:_:_____u_n_i_n_i_t_i_a_l_i_z_e_d___d_e_f_a_u_l_t___n___a(__new_start + __size, │ │ │ │ +663 __n, _M_get_Tp_allocator()); │ │ │ │ +664 } │ │ │ │ +665 __catch(...) │ │ │ │ +666 { │ │ │ │ +667 _M_deallocate(__new_start, __len); │ │ │ │ +668 __throw_exception_again; │ │ │ │ +669 } │ │ │ │ +670 _S_relocate(__old_start, __old_finish, │ │ │ │ +671 __new_start, _M_get_Tp_allocator()); │ │ │ │ +672 } │ │ │ │ +673 else │ │ │ │ +674 { │ │ │ │ +675 pointer __destroy_from = pointer(); │ │ │ │ +676 __try │ │ │ │ +677 { │ │ │ │ +678 _s_t_d_:_:_____u_n_i_n_i_t_i_a_l_i_z_e_d___d_e_f_a_u_l_t___n___a(__new_start + __size, │ │ │ │ +679 __n, _M_get_Tp_allocator()); │ │ │ │ +680 __destroy_from = __new_start + __size; │ │ │ │ +681 _s_t_d_:_:_____u_n_i_n_i_t_i_a_l_i_z_e_d___m_o_v_e___i_f___n_o_e_x_c_e_p_t___a( │ │ │ │ +682 __old_start, __old_finish, │ │ │ │ +683 __new_start, _M_get_Tp_allocator()); │ │ │ │ +684 } │ │ │ │ +685 __catch(...) │ │ │ │ +686 { │ │ │ │ +687 if (__destroy_from) │ │ │ │ +688 _s_t_d_:_:___D_e_s_t_r_o_y(__destroy_from, __destroy_from + __n, │ │ │ │ +689 _M_get_Tp_allocator()); │ │ │ │ +690 _M_deallocate(__new_start, __len); │ │ │ │ +691 __throw_exception_again; │ │ │ │ +692 } │ │ │ │ +693 _s_t_d_:_:___D_e_s_t_r_o_y(__old_start, __old_finish, │ │ │ │ +694 _M_get_Tp_allocator()); │ │ │ │ +695 } │ │ │ │ +696 _GLIBCXX_ASAN_ANNOTATE_REINIT; │ │ │ │ +697 _M_deallocate(__old_start, │ │ │ │ +698 this->_M_impl._M_end_of_storage - __old_start); │ │ │ │ +699 this->_M_impl._M_start = __new_start; │ │ │ │ +700 this->_M_impl._M_finish = __new_start + __size + __n; │ │ │ │ +701 this->_M_impl._M_end_of_storage = __new_start + __len; │ │ │ │ +702 } │ │ │ │ +703 } │ │ │ │ +704 } │ │ │ │ +705 │ │ │ │ +706 template │ │ │ │ +707 _GLIBCXX20_CONSTEXPR │ │ │ │ +708 bool │ │ │ │ +709 vector<_Tp, _Alloc>:: │ │ │ │ +710 _M_shrink_to_fit() │ │ │ │ +711 { │ │ │ │ +712 if (capacity() == _s_i_z_e()) │ │ │ │ +713 return false; │ │ │ │ +714 _GLIBCXX_ASAN_ANNOTATE_REINIT; │ │ │ │ +715 return _s_t_d_:_:_____s_h_r_i_n_k___t_o___f_i_t___a_u_x_<_v_e_c_t_o_r_>_:_:___S___d_o___i_t(*this); │ │ │ │ +716 } │ │ │ │ +717#endif │ │ │ │ +718 │ │ │ │ +719 template │ │ │ │ +720 template │ │ │ │ +721 _GLIBCXX20_CONSTEXPR │ │ │ │ +722 void │ │ │ │ +723 vector<_Tp, _Alloc>:: │ │ │ │ +724 _M_range_insert(iterator __pos, _InputIterator __first, │ │ │ │ +725 _InputIterator __last, _s_t_d_:_:_i_n_p_u_t___i_t_e_r_a_t_o_r___t_a_g) │ │ │ │ +726 { │ │ │ │ +727 if (__pos == _e_n_d()) │ │ │ │ +728 { │ │ │ │ +729 for (; __first != __last; ++__first) │ │ │ │ +730 insert(_e_n_d(), *__first); │ │ │ │ +731 } │ │ │ │ +732 else if (__first != __last) │ │ │ │ +733 { │ │ │ │ +734 vector __tmp(__first, __last, _M_get_Tp_allocator()); │ │ │ │ +735 insert(__pos, │ │ │ │ +736 _GLIBCXX_MAKE_MOVE_ITERATOR(__tmp.begin()), │ │ │ │ +737 _GLIBCXX_MAKE_MOVE_ITERATOR(__tmp.end())); │ │ │ │ +738 } │ │ │ │ +739 } │ │ │ │ +740 │ │ │ │ +741 template │ │ │ │ +742 template │ │ │ │ +743 _GLIBCXX20_CONSTEXPR │ │ │ │ +744 void │ │ │ │ +745 vector<_Tp, _Alloc>:: │ │ │ │ +746 _M_range_insert(iterator __position, _ForwardIterator __first, │ │ │ │ +747 _ForwardIterator __last, _s_t_d_:_:_f_o_r_w_a_r_d___i_t_e_r_a_t_o_r___t_a_g) │ │ │ │ +748 { │ │ │ │ +749 if (__first != __last) │ │ │ │ +750 { │ │ │ │ +751 const size_type __n = _s_t_d_:_:_d_i_s_t_a_n_c_e(__first, __last); │ │ │ │ +752 if (size_type(this->_M_impl._M_end_of_storage │ │ │ │ +753 - this->_M_impl._M_finish) >= __n) │ │ │ │ +754 { │ │ │ │ +755 const size_type __elems_after = _e_n_d() - __position; │ │ │ │ +756 pointer __old_finish(this->_M_impl._M_finish); │ │ │ │ +757 if (__elems_after > __n) │ │ │ │ +758 { │ │ │ │ +759 _GLIBCXX_ASAN_ANNOTATE_GROW(__n); │ │ │ │ +760 _s_t_d_:_:_____u_n_i_n_i_t_i_a_l_i_z_e_d___m_o_v_e___a(this->_M_impl._M_finish - __n, │ │ │ │ +761 this->_M_impl._M_finish, │ │ │ │ +762 this->_M_impl._M_finish, │ │ │ │ +763 _M_get_Tp_allocator()); │ │ │ │ +764 this->_M_impl._M_finish += __n; │ │ │ │ +765 _GLIBCXX_ASAN_ANNOTATE_GREW(__n); │ │ │ │ +766 _GLIBCXX_MOVE_BACKWARD3(__position.base(), │ │ │ │ +767 __old_finish - __n, __old_finish); │ │ │ │ +768 std::copy(__first, __last, __position); │ │ │ │ +769 } │ │ │ │ +770 else │ │ │ │ +771 { │ │ │ │ +772 _ForwardIterator __mid = __first; │ │ │ │ +773 _s_t_d_:_:_a_d_v_a_n_c_e(__mid, __elems_after); │ │ │ │ +774 _GLIBCXX_ASAN_ANNOTATE_GROW(__n); │ │ │ │ +775 _s_t_d_:_:_____u_n_i_n_i_t_i_a_l_i_z_e_d___c_o_p_y___a(__mid, __last, │ │ │ │ +776 this->_M_impl._M_finish, │ │ │ │ +777 _M_get_Tp_allocator()); │ │ │ │ +778 this->_M_impl._M_finish += __n - __elems_after; │ │ │ │ +779 _GLIBCXX_ASAN_ANNOTATE_GREW(__n - __elems_after); │ │ │ │ +780 _s_t_d_:_:_____u_n_i_n_i_t_i_a_l_i_z_e_d___m_o_v_e___a(__position.base(), │ │ │ │ +781 __old_finish, │ │ │ │ +782 this->_M_impl._M_finish, │ │ │ │ +783 _M_get_Tp_allocator()); │ │ │ │ +784 this->_M_impl._M_finish += __elems_after; │ │ │ │ +785 _GLIBCXX_ASAN_ANNOTATE_GREW(__elems_after); │ │ │ │ +786 std::copy(__first, __mid, __position); │ │ │ │ +787 } │ │ │ │ +788 } │ │ │ │ +789 else │ │ │ │ +790 { │ │ │ │ +791 // Make local copies of these members because the compiler │ │ │ │ +792 // thinks the allocator can alter them if 'this' is globally │ │ │ │ +793 // reachable. │ │ │ │ +794 pointer __old_start = this->_M_impl._M_start; │ │ │ │ +795 pointer __old_finish = this->_M_impl._M_finish; │ │ │ │ +796 if ((__old_finish - __old_start) < 0) │ │ │ │ +797 __builtin_unreachable(); │ │ │ │ +798 │ │ │ │ +799 const size_type __len = │ │ │ │ +800 _M_check_len(__n, "vector::_M_range_insert"); │ │ │ │ +801 pointer __new_start(this->_M_allocate(__len)); │ │ │ │ +802 pointer __new_finish(__new_start); │ │ │ │ +803 __try │ │ │ │ +804 { │ │ │ │ +805 __new_finish │ │ │ │ +806 = _s_t_d_:_:_____u_n_i_n_i_t_i_a_l_i_z_e_d___m_o_v_e___i_f___n_o_e_x_c_e_p_t___a │ │ │ │ +807 (__old_start, __position.base(), │ │ │ │ +808 __new_start, _M_get_Tp_allocator()); │ │ │ │ +809 __new_finish │ │ │ │ +810 = _s_t_d_:_:_____u_n_i_n_i_t_i_a_l_i_z_e_d___c_o_p_y___a(__first, __last, │ │ │ │ +811 __new_finish, │ │ │ │ +812 _M_get_Tp_allocator()); │ │ │ │ +813 __new_finish │ │ │ │ +814 = _s_t_d_:_:_____u_n_i_n_i_t_i_a_l_i_z_e_d___m_o_v_e___i_f___n_o_e_x_c_e_p_t___a │ │ │ │ +815 (__position.base(), __old_finish, │ │ │ │ +816 __new_finish, _M_get_Tp_allocator()); │ │ │ │ +817 } │ │ │ │ +818 __catch(...) │ │ │ │ +819 { │ │ │ │ +820 _s_t_d_:_:___D_e_s_t_r_o_y(__new_start, __new_finish, │ │ │ │ +821 _M_get_Tp_allocator()); │ │ │ │ +822 _M_deallocate(__new_start, __len); │ │ │ │ +823 __throw_exception_again; │ │ │ │ +824 } │ │ │ │ +825 _s_t_d_:_:___D_e_s_t_r_o_y(__old_start, __old_finish, │ │ │ │ +826 _M_get_Tp_allocator()); │ │ │ │ +827 _GLIBCXX_ASAN_ANNOTATE_REINIT; │ │ │ │ +828 _M_deallocate(__old_start, │ │ │ │ +829 this->_M_impl._M_end_of_storage - __old_start); │ │ │ │ +830 this->_M_impl._M_start = __new_start; │ │ │ │ +831 this->_M_impl._M_finish = __new_finish; │ │ │ │ +832 this->_M_impl._M_end_of_storage = __new_start + __len; │ │ │ │ +833 } │ │ │ │ +834 } │ │ │ │ +835 } │ │ │ │ +836 │ │ │ │ +837 │ │ │ │ +838 // vector │ │ │ │ +839 template │ │ │ │ +840 _GLIBCXX20_CONSTEXPR │ │ │ │ +841 void │ │ │ │ +842 vector:: │ │ │ │ +843 _M_reallocate(size_type __n) │ │ │ │ +844 { │ │ │ │ +845 _Bit_pointer __q = this->_M_allocate(__n); │ │ │ │ +846 iterator __start(_s_t_d_:_:_____a_d_d_r_e_s_s_o_f(*__q), 0); │ │ │ │ +847 iterator __finish(_M_copy_aligned(_b_e_g_i_n(), _e_n_d(), __start)); │ │ │ │ +848 this->_M_deallocate(); │ │ │ │ +849 this->_M_impl._M_start = __start; │ │ │ │ +850 this->_M_impl._M_finish = __finish; │ │ │ │ +851 this->_M_impl._M_end_of_storage = __q + _S_nword(__n); │ │ │ │ +852 } │ │ │ │ +853 │ │ │ │ +854 template │ │ │ │ +855 _GLIBCXX20_CONSTEXPR │ │ │ │ +856 void │ │ │ │ +857 vector:: │ │ │ │ +858 _M_fill_insert(iterator __position, size_type __n, bool __x) │ │ │ │ +859 { │ │ │ │ +860 if (__n == 0) │ │ │ │ +861 return; │ │ │ │ +862 if (capacity() - _s_i_z_e() >= __n) │ │ │ │ +863 { │ │ │ │ +864 std::copy_backward(__position, _e_n_d(), │ │ │ │ +865 this->_M_impl._M_finish + difference_type(__n)); │ │ │ │ +866 std::fill(__position, __position + difference_type(__n), __x); │ │ │ │ +867 this->_M_impl._M_finish += difference_type(__n); │ │ │ │ +868 } │ │ │ │ +869 else │ │ │ │ +870 { │ │ │ │ +871 const size_type __len = │ │ │ │ +872 _M_check_len(__n, "vector::_M_fill_insert"); │ │ │ │ +873 _Bit_pointer __q = this->_M_allocate(__len); │ │ │ │ +874 iterator __start(_s_t_d_:_:_____a_d_d_r_e_s_s_o_f(*__q), 0); │ │ │ │ +875 iterator __i = _M_copy_aligned(_b_e_g_i_n(), __position, __start); │ │ │ │ +876 std::fill(__i, __i + difference_type(__n), __x); │ │ │ │ +877 iterator __finish = std::copy(__position, _e_n_d(), │ │ │ │ +878 __i + difference_type(__n)); │ │ │ │ +879 this->_M_deallocate(); │ │ │ │ +880 this->_M_impl._M_end_of_storage = __q + _S_nword(__len); │ │ │ │ +881 this->_M_impl._M_start = __start; │ │ │ │ +882 this->_M_impl._M_finish = __finish; │ │ │ │ +883 } │ │ │ │ +884 } │ │ │ │ +885 │ │ │ │ +886 template │ │ │ │ +887 template │ │ │ │ +888 _GLIBCXX20_CONSTEXPR │ │ │ │ +889 void │ │ │ │ +890 vector:: │ │ │ │ +891 _M_insert_range(iterator __position, _ForwardIterator __first, │ │ │ │ +892 _ForwardIterator __last, _s_t_d_:_:_f_o_r_w_a_r_d___i_t_e_r_a_t_o_r___t_a_g) │ │ │ │ +893 { │ │ │ │ +894 if (__first != __last) │ │ │ │ +895 { │ │ │ │ +896 size_type __n = _s_t_d_:_:_d_i_s_t_a_n_c_e(__first, __last); │ │ │ │ +897 if (capacity() - _s_i_z_e() >= __n) │ │ │ │ +898 { │ │ │ │ +899 std::copy_backward(__position, _e_n_d(), │ │ │ │ +900 this->_M_impl._M_finish │ │ │ │ +901 + difference_type(__n)); │ │ │ │ +902 std::copy(__first, __last, __position); │ │ │ │ +903 this->_M_impl._M_finish += difference_type(__n); │ │ │ │ +904 } │ │ │ │ +905 else │ │ │ │ +906 { │ │ │ │ +907 const size_type __len = │ │ │ │ +908 _M_check_len(__n, "vector::_M_insert_range"); │ │ │ │ +909 _Bit_pointer __q = this->_M_allocate(__len); │ │ │ │ +910 iterator __start(_s_t_d_:_:_____a_d_d_r_e_s_s_o_f(*__q), 0); │ │ │ │ +911 iterator __i = _M_copy_aligned(_b_e_g_i_n(), __position, __start); │ │ │ │ +912 __i = std::copy(__first, __last, __i); │ │ │ │ +913 iterator __finish = std::copy(__position, _e_n_d(), __i); │ │ │ │ +914 this->_M_deallocate(); │ │ │ │ +915 this->_M_impl._M_end_of_storage = __q + _S_nword(__len); │ │ │ │ +916 this->_M_impl._M_start = __start; │ │ │ │ +917 this->_M_impl._M_finish = __finish; │ │ │ │ +918 } │ │ │ │ +919 } │ │ │ │ +920 } │ │ │ │ +921 │ │ │ │ +922 template │ │ │ │ +923 _GLIBCXX20_CONSTEXPR │ │ │ │ +924 void │ │ │ │ +925 vector:: │ │ │ │ +926 _M_insert_aux(iterator __position, bool __x) │ │ │ │ +927 { │ │ │ │ +928 if (this->_M_impl._M_finish._M_p != this->_M_impl._M_end_addr()) │ │ │ │ +929 { │ │ │ │ +930 std::copy_backward(__position, this->_M_impl._M_finish, │ │ │ │ +931 this->_M_impl._M_finish + 1); │ │ │ │ +932 *__position = __x; │ │ │ │ +933 ++this->_M_impl._M_finish; │ │ │ │ +934 } │ │ │ │ +935 else │ │ │ │ +936 { │ │ │ │ +937 const size_type __len = │ │ │ │ +938 _M_check_len(size_type(1), "vector::_M_insert_aux"); │ │ │ │ +939 _Bit_pointer __q = this->_M_allocate(__len); │ │ │ │ +940 iterator __start(_s_t_d_:_:_____a_d_d_r_e_s_s_o_f(*__q), 0); │ │ │ │ +941 iterator __i = _M_copy_aligned(_b_e_g_i_n(), __position, __start); │ │ │ │ +942 *__i++ = __x; │ │ │ │ +943 iterator __finish = std::copy(__position, _e_n_d(), __i); │ │ │ │ +944 this->_M_deallocate(); │ │ │ │ +945 this->_M_impl._M_end_of_storage = __q + _S_nword(__len); │ │ │ │ +946 this->_M_impl._M_start = __start; │ │ │ │ +947 this->_M_impl._M_finish = __finish; │ │ │ │ +948 } │ │ │ │ +949 } │ │ │ │ +950 │ │ │ │ +951 template │ │ │ │ +952 _GLIBCXX20_CONSTEXPR │ │ │ │ +953 typename vector::iterator │ │ │ │ +954 vector:: │ │ │ │ +955 _M_erase(iterator __position) │ │ │ │ +956 { │ │ │ │ +957 if (__position + 1 != _e_n_d()) │ │ │ │ +958 std::copy(__position + 1, _e_n_d(), __position); │ │ │ │ +959 --this->_M_impl._M_finish; │ │ │ │ +960 return __position; │ │ │ │ +961 } │ │ │ │ +962 │ │ │ │ +963 template │ │ │ │ +964 _GLIBCXX20_CONSTEXPR │ │ │ │ +965 typename vector::iterator │ │ │ │ +966 vector:: │ │ │ │ +967 _M_erase(iterator __first, iterator __last) │ │ │ │ +968 { │ │ │ │ +969 if (__first != __last) │ │ │ │ +970 _M_erase_at_end(std::copy(__last, _e_n_d(), __first)); │ │ │ │ +971 return __first; │ │ │ │ +972 } │ │ │ │ +973 │ │ │ │ +974#if __cplusplus >= 201103L │ │ │ │ +975 template │ │ │ │ +976 _GLIBCXX20_CONSTEXPR │ │ │ │ +977 bool │ │ │ │ +978 vector:: │ │ │ │ +979 _M_shrink_to_fit() │ │ │ │ +980 { │ │ │ │ +981 if (capacity() - _s_i_z_e() < int(_S_word_bit)) │ │ │ │ +982 return false; │ │ │ │ +983 __try │ │ │ │ +984 { │ │ │ │ +985 if (size_type __n = _s_i_z_e()) │ │ │ │ +986 _M_reallocate(__n); │ │ │ │ +987 else │ │ │ │ +988 { │ │ │ │ +989 this->_M_deallocate(); │ │ │ │ +990 this->_M_impl._M_reset(); │ │ │ │ +991 } │ │ │ │ +992 return true; │ │ │ │ +993 } │ │ │ │ +994 __catch(...) │ │ │ │ +995 { return false; } │ │ │ │ +996 } │ │ │ │ +997#endif │ │ │ │ +998 │ │ │ │ +999_GLIBCXX_END_NAMESPACE_CONTAINER │ │ │ │ +1000_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ +1001} // namespace std │ │ │ │ +1002 │ │ │ │ +1003#if __cplusplus >= 201103L │ │ │ │ +1004 │ │ │ │ +1005namespace _s_t_d _GLIBCXX_VISIBILITY(default) │ │ │ │ +1006{ │ │ │ │ +1007_GLIBCXX_BEGIN_NAMESPACE_VERSION │ │ │ │ +1008 │ │ │ │ +1009 template │ │ │ │ +1010 size_t │ │ │ │ +1011 hash<_GLIBCXX_STD_C::vector>:: │ │ │ │ +1012 operator()(const _GLIBCXX_STD_C::vector& __b) const noexcept │ │ │ │ +1013 { │ │ │ │ +1014 size_t __hash = 0; │ │ │ │ +1015 const size_t __words = __b.size() / _S_word_bit; │ │ │ │ +1016 if (__words) │ │ │ │ +1017 { │ │ │ │ +1018 const size_t __clength = __words * sizeof(_Bit_type); │ │ │ │ +1019 __hash = std::_Hash_impl::hash(__b._M_impl._M_start._M_p, __clength); │ │ │ │ +1020 } │ │ │ │ +1021 │ │ │ │ +1022 const size_t __extrabits = __b.size() % _S_word_bit; │ │ │ │ +1023 if (__extrabits) │ │ │ │ +1024 { │ │ │ │ +1025 _Bit_type __hiword = *__b._M_impl._M_finish._M_p; │ │ │ │ +1026 __hiword &= ~((~static_cast<_Bit_type>(0)) << __extrabits); │ │ │ │ +1027 │ │ │ │ +1028 const size_t __clength │ │ │ │ +1029 = (__extrabits + __CHAR_BIT__ - 1) / __CHAR_BIT__; │ │ │ │ +1030 if (__words) │ │ │ │ +1031 __hash = std::_Hash_impl::hash(&__hiword, __clength, __hash); │ │ │ │ +1032 else │ │ │ │ +1033 __hash = std::_Hash_impl::hash(&__hiword, __clength); │ │ │ │ +1034 } │ │ │ │ +1035 │ │ │ │ +1036 return __hash; │ │ │ │ +1037 } │ │ │ │ +1038 │ │ │ │ +1039_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ +1040} // namespace std │ │ │ │ +1041 │ │ │ │ +1042#endif // C++11 │ │ │ │ +1043 │ │ │ │ +1044#undef _GLIBCXX_ASAN_ANNOTATE_REINIT │ │ │ │ +1045#undef _GLIBCXX_ASAN_ANNOTATE_GROW │ │ │ │ +1046#undef _GLIBCXX_ASAN_ANNOTATE_GREW │ │ │ │ +1047#undef _GLIBCXX_ASAN_ANNOTATE_SHRINK │ │ │ │ +1048 │ │ │ │ +1049#endif /* _VECTOR_TCC */ │ │ │ │ +_s_t_d_:_:_m_o_v_e │ │ │ │ +constexpr std::remove_reference< _Tp >::type && move(_Tp &&__t) noexcept │ │ │ │ +Convert a value to an rvalue. │ │ │ │ +DDeeffiinniittiioonn _m_o_v_e_._h_:_1_0_4 │ │ │ │ +_s_t_d_:_:_____a_d_d_r_e_s_s_o_f │ │ │ │ +constexpr _Tp * __addressof(_Tp &__r) noexcept │ │ │ │ +Same as C++11 std::addressof. │ │ │ │ +DDeeffiinniittiioonn _m_o_v_e_._h_:_4_9 │ │ │ │ +_s_t_d_:_:_e_n_d │ │ │ │ +_Tp * end(valarray< _Tp > &__va) noexcept │ │ │ │ +Return an iterator pointing to one past the last element of the valarray. │ │ │ │ +DDeeffiinniittiioonn _v_a_l_a_r_r_a_y_:_1_2_4_5 │ │ │ │ +_s_t_d_:_:_b_e_g_i_n │ │ │ │ +_Tp * begin(valarray< _Tp > &__va) noexcept │ │ │ │ +Return an iterator pointing to the first element of the valarray. │ │ │ │ +DDeeffiinniittiioonn _v_a_l_a_r_r_a_y_:_1_2_2_3 │ │ │ │ +_s_t_d_:_:_____i_t_e_r_a_t_o_r___c_a_t_e_g_o_r_y │ │ │ │ +constexpr iterator_traits< _Iter >::iterator_category __iterator_category(const │ │ │ │ +_Iter &) │ │ │ │ +DDeeffiinniittiioonn _s_t_l___i_t_e_r_a_t_o_r___b_a_s_e___t_y_p_e_s_._h_:_2_3_8 │ │ │ │ _s_t_d │ │ │ │ ISO C++ entities toplevel namespace is std. │ │ │ │ +_s_t_d_:_:_d_i_s_t_a_n_c_e │ │ │ │ +constexpr iterator_traits< _InputIterator >::difference_type distance │ │ │ │ +(_InputIterator __first, _InputIterator __last) │ │ │ │ +A generalization of pointer arithmetic. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___i_t_e_r_a_t_o_r___b_a_s_e___f_u_n_c_s_._h_:_1_4_7 │ │ │ │ +_s_t_d_:_:_c_e_n_d │ │ │ │ +constexpr auto cend(const _Container &__cont) noexcept(noexcept(std::end │ │ │ │ +(__cont))) -> decltype(std::end(__cont)) │ │ │ │ +Return an iterator pointing to one past the last element of the const │ │ │ │ +container. │ │ │ │ +DDeeffiinniittiioonn _r_a_n_g_e___a_c_c_e_s_s_._h_:_1_3_8 │ │ │ │ +_s_t_d_:_:_s_i_z_e │ │ │ │ +constexpr auto size(const _Container &__cont) noexcept(noexcept(__cont.size())) │ │ │ │ +-> decltype(__cont.size()) │ │ │ │ +Return the size of a container. │ │ │ │ +DDeeffiinniittiioonn _r_a_n_g_e___a_c_c_e_s_s_._h_:_2_6_4 │ │ │ │ +_s_t_d_:_:_a_d_v_a_n_c_e │ │ │ │ +constexpr void advance(_InputIterator &__i, _Distance __n) │ │ │ │ +A generalization of pointer arithmetic. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___i_t_e_r_a_t_o_r___b_a_s_e___f_u_n_c_s_._h_:_2_1_8 │ │ │ │ +_s_t_d_:_:_c_b_e_g_i_n │ │ │ │ +constexpr auto cbegin(const _Container &__cont) noexcept(noexcept(std::begin │ │ │ │ +(__cont))) -> decltype(std::begin(__cont)) │ │ │ │ +Return an iterator pointing to the first element of the const container. │ │ │ │ +DDeeffiinniittiioonn _r_a_n_g_e___a_c_c_e_s_s_._h_:_1_2_6 │ │ │ │ +_s_t_d_:_:___D_e_s_t_r_o_y │ │ │ │ +constexpr void _Destroy(_ForwardIterator __first, _ForwardIterator __last) │ │ │ │ +DDeeffiinniittiioonn _s_t_l___c_o_n_s_t_r_u_c_t_._h_:_1_8_2 │ │ │ │ +_s_t_d_:_:_i_n_p_u_t___i_t_e_r_a_t_o_r___t_a_g │ │ │ │ +Marking input iterators. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___i_t_e_r_a_t_o_r___b_a_s_e___t_y_p_e_s_._h_:_9_3 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___i_t_e_r_a_t_o_r___t_a_g │ │ │ │ +Forward iterators support a superset of input iterator operations. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___i_t_e_r_a_t_o_r___b_a_s_e___t_y_p_e_s_._h_:_9_9 │ │ │ │ +_s_t_d_:_:_i_t_e_r_a_t_o_r │ │ │ │ +Common iterator class. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___i_t_e_r_a_t_o_r___b_a_s_e___t_y_p_e_s_._h_:_1_2_8 │ │ │ │ +_s_t_d_:_:_v_e_c_t_o_r │ │ │ │ +A standard container which offers fixed time access to individual elements in │ │ │ │ +any order. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_4_2_9 │ │ │ │ +_s_t_d_:_:_v_e_c_t_o_r_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ +constexpr vector & operator=(const vector &__x) │ │ │ │ +Vector assignment operator. │ │ │ │ +_s_t_d_:_:_v_e_c_t_o_r_:_:_r_e_s_e_r_v_e │ │ │ │ +constexpr void reserve(size_type __n) │ │ │ │ +Attempt to preallocate enough memory for specified number of elements. │ │ │ │ +DDeeffiinniittiioonn _v_e_c_t_o_r_._t_c_c_:_6_8 │ │ │ │ _s_t_d_:_:_a_u_t_o___p_t_r___r_e_f │ │ │ │ DDeeffiinniittiioonn _a_u_t_o___p_t_r_._h_:_4_9 │ │ │ │ * _b_i_t_s │ │ │ │ - * _s_t_r_i_n_g_f_w_d_._h │ │ │ │ + * _v_e_c_t_o_r_._t_c_c │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-12-base/libstdc++/user/a00398.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: streambuf.tcc File Reference │ │ │ +libstdc++: atomic_wait.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -48,65 +48,108 @@ │ │ │ /* @license-end */ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ Namespaces | │ │ │ Macros | │ │ │ -Functions
│ │ │ -
streambuf.tcc File Reference
│ │ │ +Typedefs | │ │ │ +Functions | │ │ │ +Variables
│ │ │ +
atomic_wait.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ + │ │ │

│ │ │ Namespaces

namespace  std
 
namespace  std::__detail
 
│ │ │ │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ +

│ │ │ Macros

#define _STREAMBUF_TCC
 
#define __cpp_lib_atomic_wait
 
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ +Typedefs

using std::__detail::__bare_wait = __waiter< std::false_type >
 
using std::__detail::__enters_wait = __waiter< std::true_type >
 
using std::__detail::__platform_wait_t = uint64_t
 
│ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +

│ │ │ Functions

template<typename _CharT , typename _Traits >
streamsize std::__copy_streambufs (basic_streambuf< _CharT, _Traits > *__sbin, basic_streambuf< _CharT, _Traits > *__sbout)
 
template<typename _CharT , typename _Traits >
streamsize std::__copy_streambufs_eof (basic_streambuf< _CharT, _Traits > *, basic_streambuf< _CharT, _Traits > *, bool &)
 
template<typename _Tp >
bool std::__detail::__atomic_compare (const _Tp &__a, const _Tp &__b)
 
template<typename _Tp >
void std::__atomic_notify_address (const _Tp *__addr, bool __all) noexcept
 
void std::__atomic_notify_address_bare (const __detail::__platform_wait_t *__addr, bool __all) noexcept
 
template<typename _Pred , typename _Spin = __default_spin_policy>
bool std::__detail::__atomic_spin (_Pred &__pred, _Spin __spin=_Spin{ }) noexcept
 
template<typename _Tp , typename _Pred >
void std::__atomic_wait_address (const _Tp *__addr, _Pred __pred) noexcept
 
template<typename _Pred >
void std::__atomic_wait_address_bare (const __detail::__platform_wait_t *__addr, _Pred __pred) noexcept
 
template<typename _Tp , typename _ValFn >
void std::__atomic_wait_address_v (const _Tp *__addr, _Tp __old, _ValFn __vfn) noexcept
 
void std::__detail::__thread_relax () noexcept
 
void std::__detail::__thread_yield () noexcept
 
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ +Variables

constexpr auto std::__detail::__atomic_spin_count
 
constexpr auto std::__detail::__atomic_spin_count_relax
 
constexpr size_t std::__detail::__platform_wait_alignment
 
template<typename _Tp >
constexpr bool std::__platform_wait_uses_type
 
│ │ │

Detailed Description

│ │ │ -

This is an internal header file, included by other library headers. Do not attempt to use it directly. Instead, include <streambuf>.

│ │ │ +

This is an internal header file, included by other library headers. Do not attempt to use it directly. Instead, include <atomic>.

│ │ │ │ │ │ -

Definition in file streambuf.tcc.

│ │ │ +

Definition in file atomic_wait.h.

│ │ │

Macro Definition Documentation

│ │ │ - │ │ │ -

◆ _STREAMBUF_TCC

│ │ │ + │ │ │ +

◆ __cpp_lib_atomic_wait

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │ │ │ │ - │ │ │ + │ │ │ │ │ │
#define _STREAMBUF_TCC#define __cpp_lib_atomic_wait
│ │ │
│ │ │ │ │ │ -

Definition at line 35 of file streambuf.tcc.

│ │ │ +

Definition at line 51 of file atomic_wait.h.

│ │ │ │ │ │
│ │ │
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,30 +1,69 @@ │ │ │ │ libstdc++ │ │ │ │ -_N_a_m_e_s_p_a_c_e_s | _M_a_c_r_o_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -streambuf.tcc File Reference │ │ │ │ +_N_a_m_e_s_p_a_c_e_s | _M_a_c_r_o_s | _T_y_p_e_d_e_f_s | _F_u_n_c_t_i_o_n_s | _V_a_r_i_a_b_l_e_s │ │ │ │ +atomic_wait.h File Reference │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _s_t_d │ │ │ │   │ │ │ │ +namespace   _s_t_d_:_:_____d_e_t_a_i_l │ │ │ │ +  │ │ │ │ MMaaccrrooss │ │ │ │ -#define  ___S_T_R_E_A_M_B_U_F___T_C_C │ │ │ │ +#define  _____c_p_p___l_i_b___a_t_o_m_i_c___w_a_i_t │ │ │ │ +  │ │ │ │ +TTyyppeeddeeffss │ │ │ │ +_u_s_i_n_g  _s_t_d_:_:_____d_e_t_a_i_l_:_:_____b_a_r_e___w_a_i_t = __waiter< _s_t_d_:_:_f_a_l_s_e___t_y_p_e > │ │ │ │ +  │ │ │ │ +_u_s_i_n_g  _s_t_d_:_:_____d_e_t_a_i_l_:_:_____e_n_t_e_r_s___w_a_i_t = __waiter< _s_t_d_:_:_t_r_u_e___t_y_p_e > │ │ │ │ +  │ │ │ │ +_u_s_i_n_g  _s_t_d_:_:_____d_e_t_a_i_l_:_:_____p_l_a_t_f_o_r_m___w_a_i_t___t = uint64_t │ │ │ │   │ │ │ │ FFuunnccttiioonnss │ │ │ │ -template<_t_y_p_e_n_a_m_e _CharT , _t_y_p_e_n_a_m_e _Traits > │ │ │ │ -_s_t_r_e_a_m_s_i_z_e  _s_t_d_:_:_____c_o_p_y___s_t_r_e_a_m_b_u_f_s (_b_a_s_i_c___s_t_r_e_a_m_b_u_f< _CharT, _Traits > *_____s_b_i_n, │ │ │ │ - _b_a_s_i_c___s_t_r_e_a_m_b_u_f< _CharT, _Traits > *_____s_b_o_u_t) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _CharT , _t_y_p_e_n_a_m_e _Traits > │ │ │ │ -_s_t_r_e_a_m_s_i_z_e  _s_t_d_:_:_____c_o_p_y___s_t_r_e_a_m_b_u_f_s___e_o_f (_b_a_s_i_c___s_t_r_e_a_m_b_u_f< _CharT, _Traits > *, │ │ │ │ - _b_a_s_i_c___s_t_r_e_a_m_b_u_f< _CharT, _Traits > *, bool &) │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ +bool  _s_t_d_:_:_____d_e_t_a_i_l_:_:_____a_t_o_m_i_c___c_o_m_p_a_r_e (const _Tp &__a, const _Tp &__b) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ +_v_o_i_d  _s_t_d_:_:_____a_t_o_m_i_c___n_o_t_i_f_y___a_d_d_r_e_s_s (const _Tp *_____a_d_d_r, bool _____a_l_l) noexcept │ │ │ │ +  │ │ │ │ +_v_o_i_d  _s_t_d_:_:_____a_t_o_m_i_c___n_o_t_i_f_y___a_d_d_r_e_s_s___b_a_r_e (const __detail::__platform_wait_t │ │ │ │ + *_____a_d_d_r, bool _____a_l_l) noexcept │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___P_r_e_d , _t_y_p_e_n_a_m_e ___S_p_i_n = __default_spin_policy> │ │ │ │ +bool  _s_t_d_:_:_____d_e_t_a_i_l_:_:_____a_t_o_m_i_c___s_p_i_n (___P_r_e_d &_____p_r_e_d, ___S_p_i_n _____s_p_i_n=___S_p_i_n{ }) │ │ │ │ + noexcept │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___P_r_e_d > │ │ │ │ +_v_o_i_d  _s_t_d_:_:_____a_t_o_m_i_c___w_a_i_t___a_d_d_r_e_s_s (const _Tp *_____a_d_d_r, ___P_r_e_d _____p_r_e_d) noexcept │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___P_r_e_d > │ │ │ │ +_v_o_i_d  _s_t_d_:_:_____a_t_o_m_i_c___w_a_i_t___a_d_d_r_e_s_s___b_a_r_e (const __detail::__platform_wait_t │ │ │ │ + *_____a_d_d_r, ___P_r_e_d _____p_r_e_d) noexcept │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___V_a_l_F_n > │ │ │ │ +_v_o_i_d  _s_t_d_:_:_____a_t_o_m_i_c___w_a_i_t___a_d_d_r_e_s_s___v (const _Tp *_____a_d_d_r, _Tp _____o_l_d, ___V_a_l_F_n _____v_f_n) │ │ │ │ + noexcept │ │ │ │ +  │ │ │ │ +_v_o_i_d  _s_t_d_:_:_____d_e_t_a_i_l_:_:_____t_h_r_e_a_d___r_e_l_a_x () noexcept │ │ │ │ +  │ │ │ │ +_v_o_i_d  _s_t_d_:_:_____d_e_t_a_i_l_:_:_____t_h_r_e_a_d___y_i_e_l_d () noexcept │ │ │ │ +  │ │ │ │ +VVaarriiaabblleess │ │ │ │ + constexpr _a_u_t_o  _s_t_d_:_:_____d_e_t_a_i_l_:_:_____a_t_o_m_i_c___s_p_i_n___c_o_u_n_t │ │ │ │ +  │ │ │ │ + constexpr _a_u_t_o  _s_t_d_:_:_____d_e_t_a_i_l_:_:_____a_t_o_m_i_c___s_p_i_n___c_o_u_n_t___r_e_l_a_x │ │ │ │ +  │ │ │ │ +constexpr size_t  _s_t_d_:_:_____d_e_t_a_i_l_:_:_____p_l_a_t_f_o_r_m___w_a_i_t___a_l_i_g_n_m_e_n_t │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ + constexpr bool  _s_t_d_:_:_____p_l_a_t_f_o_r_m___w_a_i_t___u_s_e_s___t_y_p_e │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ This is an internal header file, included by other library headers. Do not │ │ │ │ -attempt to use it directly. Instead, include . │ │ │ │ -Definition in file _s_t_r_e_a_m_b_u_f_._t_c_c. │ │ │ │ +attempt to use it directly. Instead, include . │ │ │ │ +Definition in file _a_t_o_m_i_c___w_a_i_t_._h. │ │ │ │ ********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ -********** _?◆_? __SSTTRREEAAMMBBUUFF__TTCCCC ********** │ │ │ │ -#define _STREAMBUF_TCC │ │ │ │ -Definition at line _3_5 of file _s_t_r_e_a_m_b_u_f_._t_c_c. │ │ │ │ +********** _?◆_? ____ccpppp__lliibb__aattoommiicc__wwaaiitt ********** │ │ │ │ +#define __cpp_lib_atomic_wait │ │ │ │ +Definition at line _5_1 of file _a_t_o_m_i_c___w_a_i_t_._h. │ │ │ │ * _b_i_t_s │ │ │ │ - * _s_t_r_e_a_m_b_u_f_._t_c_c │ │ │ │ + * _a_t_o_m_i_c___w_a_i_t_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-12-base/libstdc++/user/a00398_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: streambuf.tcc Source File │ │ │ +libstdc++: atomic_wait.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -45,20 +45,20 @@ │ │ │ │ │ │
│ │ │
│ │ │ -
streambuf.tcc
│ │ │ +
atomic_wait.h
│ │ │
│ │ │
│ │ │ -Go to the documentation of this file.
1// Stream buffer classes -*- C++ -*-
│ │ │ +Go to the documentation of this file.
1// -*- C++ -*- header.
│ │ │
2
│ │ │ -
3// Copyright (C) 1997-2022 Free Software Foundation, Inc.
│ │ │ +
3// Copyright (C) 2020-2022 Free Software Foundation, Inc.
│ │ │
4//
│ │ │
5// This file is part of the GNU ISO C++ Library. This library is free
│ │ │
6// software; you can redistribute it and/or modify it under the
│ │ │
7// terms of the GNU General Public License as published by the
│ │ │
8// Free Software Foundation; either version 3, or (at your option)
│ │ │
9// any later version.
│ │ │
10
│ │ │ @@ -72,175 +72,477 @@ │ │ │
18// 3.1, as published by the Free Software Foundation.
│ │ │
19
│ │ │
20// You should have received a copy of the GNU General Public License and
│ │ │
21// a copy of the GCC Runtime Library Exception along with this program;
│ │ │
22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
│ │ │
23// <http://www.gnu.org/licenses/>.
│ │ │
24
│ │ │ -
25/** @file bits/streambuf.tcc
│ │ │ +
25/** @file bits/atomic_wait.h
│ │ │
26 * This is an internal header file, included by other library headers.
│ │ │ -
27 * Do not attempt to use it directly. @headername{streambuf}
│ │ │ +
27 * Do not attempt to use it directly. @headername{atomic}
│ │ │
28 */
│ │ │
29
│ │ │ -
30//
│ │ │ -
31// ISO C++ 14882: 27.5 Stream buffers
│ │ │ -
32//
│ │ │ -
33
│ │ │ -
34#ifndef _STREAMBUF_TCC
│ │ │ -
35#define _STREAMBUF_TCC 1
│ │ │ -
36
│ │ │ -
37#pragma GCC system_header
│ │ │ -
38
│ │ │ -
39namespace std _GLIBCXX_VISIBILITY(default)
│ │ │ -
40{
│ │ │ -
41_GLIBCXX_BEGIN_NAMESPACE_VERSION
│ │ │ -
42
│ │ │ -
43 template<typename _CharT, typename _Traits>
│ │ │ - │ │ │ -
│ │ │ - │ │ │ - │ │ │ -
47 {
│ │ │ -
48 streamsize __ret = 0;
│ │ │ -
49 while (__ret < __n)
│ │ │ -
50 {
│ │ │ -
51 const streamsize __buf_len = this->egptr() - this->gptr();
│ │ │ -
52 if (__buf_len)
│ │ │ -
53 {
│ │ │ -
54 const streamsize __remaining = __n - __ret;
│ │ │ - │ │ │ -
56 traits_type::copy(__s, this->gptr(), __len);
│ │ │ -
57 __ret += __len;
│ │ │ -
58 __s += __len;
│ │ │ -
59 this->__safe_gbump(__len);
│ │ │ -
60 }
│ │ │ -
61
│ │ │ -
62 if (__ret < __n)
│ │ │ -
63 {
│ │ │ -
64 const int_type __c = this->uflow();
│ │ │ -
65 if (!traits_type::eq_int_type(__c, traits_type::eof()))
│ │ │ -
66 {
│ │ │ -
67 traits_type::assign(*__s++, traits_type::to_char_type(__c));
│ │ │ -
68 ++__ret;
│ │ │ -
69 }
│ │ │ -
70 else
│ │ │ -
71 break;
│ │ │ -
72 }
│ │ │ -
73 }
│ │ │ -
74 return __ret;
│ │ │ -
75 }
│ │ │ -
│ │ │ -
76
│ │ │ -
77 template<typename _CharT, typename _Traits>
│ │ │ - │ │ │ -
│ │ │ - │ │ │ - │ │ │ -
81 {
│ │ │ -
82 streamsize __ret = 0;
│ │ │ -
83 while (__ret < __n)
│ │ │ -
84 {
│ │ │ -
85 const streamsize __buf_len = this->epptr() - this->pptr();
│ │ │ -
86 if (__buf_len)
│ │ │ -
87 {
│ │ │ -
88 const streamsize __remaining = __n - __ret;
│ │ │ - │ │ │ -
90 traits_type::copy(this->pptr(), __s, __len);
│ │ │ -
91 __ret += __len;
│ │ │ -
92 __s += __len;
│ │ │ -
93 this->__safe_pbump(__len);
│ │ │ -
94 }
│ │ │ -
95
│ │ │ -
96 if (__ret < __n)
│ │ │ -
97 {
│ │ │ -
98 int_type __c = this->overflow(traits_type::to_int_type(*__s));
│ │ │ -
99 if (!traits_type::eq_int_type(__c, traits_type::eof()))
│ │ │ -
100 {
│ │ │ -
101 ++__ret;
│ │ │ -
102 ++__s;
│ │ │ -
103 }
│ │ │ -
104 else
│ │ │ -
105 break;
│ │ │ -
106 }
│ │ │ -
107 }
│ │ │ -
108 return __ret;
│ │ │ -
109 }
│ │ │ -
│ │ │ -
110
│ │ │ -
111 // Conceivably, this could be used to implement buffer-to-buffer
│ │ │ -
112 // copies, if this was ever desired in an un-ambiguous way by the
│ │ │ -
113 // standard.
│ │ │ -
114 template<typename _CharT, typename _Traits>
│ │ │ - │ │ │ -
116 __copy_streambufs_eof(basic_streambuf<_CharT, _Traits>* __sbin,
│ │ │ - │ │ │ -
118 bool& __ineof)
│ │ │ -
119 {
│ │ │ -
120 streamsize __ret = 0;
│ │ │ -
121 __ineof = true;
│ │ │ -
122 typename _Traits::int_type __c = __sbin->sgetc();
│ │ │ -
123 while (!_Traits::eq_int_type(__c, _Traits::eof()))
│ │ │ -
124 {
│ │ │ -
125 __c = __sbout->sputc(_Traits::to_char_type(__c));
│ │ │ -
126 if (_Traits::eq_int_type(__c, _Traits::eof()))
│ │ │ -
127 {
│ │ │ -
128 __ineof = false;
│ │ │ -
129 break;
│ │ │ -
130 }
│ │ │ -
131 ++__ret;
│ │ │ -
132 __c = __sbin->snextc();
│ │ │ -
133 }
│ │ │ -
134 return __ret;
│ │ │ -
135 }
│ │ │ -
136
│ │ │ -
137 template<typename _CharT, typename _Traits>
│ │ │ -
138 inline streamsize
│ │ │ -
139 __copy_streambufs(basic_streambuf<_CharT, _Traits>* __sbin,
│ │ │ -
140 basic_streambuf<_CharT, _Traits>* __sbout)
│ │ │ -
141 {
│ │ │ -
142 bool __ineof;
│ │ │ -
143 return __copy_streambufs_eof(__sbin, __sbout, __ineof);
│ │ │ -
144 }
│ │ │ -
145
│ │ │ -
146 // Inhibit implicit instantiations for required instantiations,
│ │ │ -
147 // which are defined via explicit instantiations elsewhere.
│ │ │ -
148#if _GLIBCXX_EXTERN_TEMPLATE
│ │ │ -
149 extern template class basic_streambuf<char>;
│ │ │ -
150
│ │ │ -
151 extern template
│ │ │ - │ │ │ -
153 __copy_streambufs(basic_streambuf<char>*,
│ │ │ -
154 basic_streambuf<char>*);
│ │ │ -
155
│ │ │ -
156#ifdef _GLIBCXX_USE_WCHAR_T
│ │ │ -
157 extern template class basic_streambuf<wchar_t>;
│ │ │ -
158
│ │ │ -
159 extern template
│ │ │ - │ │ │ -
161 __copy_streambufs(basic_streambuf<wchar_t>*,
│ │ │ -
162 basic_streambuf<wchar_t>*);
│ │ │ -
163#endif
│ │ │ -
164#endif
│ │ │ -
165
│ │ │ -
166_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ -
167} // namespace std
│ │ │ -
168
│ │ │ -
169#endif
│ │ │ -
constexpr const _Tp & min(const _Tp &, const _Tp &)
This does what you think it does.
│ │ │ +
30#ifndef _GLIBCXX_ATOMIC_WAIT_H
│ │ │ +
31#define _GLIBCXX_ATOMIC_WAIT_H 1
│ │ │ +
32
│ │ │ +
33#pragma GCC system_header
│ │ │ +
34
│ │ │ +
35#include <bits/c++config.h>
│ │ │ +
36#if defined _GLIBCXX_HAS_GTHREADS || defined _GLIBCXX_HAVE_LINUX_FUTEX
│ │ │ + │ │ │ +
38#include <bits/gthr.h>
│ │ │ +
39#include <ext/numeric_traits.h>
│ │ │ +
40
│ │ │ +
41#ifdef _GLIBCXX_HAVE_LINUX_FUTEX
│ │ │ +
42# include <cerrno>
│ │ │ +
43# include <climits>
│ │ │ +
44# include <unistd.h>
│ │ │ +
45# include <syscall.h>
│ │ │ +
46# include <bits/functexcept.h>
│ │ │ +
47#endif
│ │ │ +
48
│ │ │ +
49# include <bits/std_mutex.h> // std::mutex, std::__condvar
│ │ │ +
50
│ │ │ +
51#define __cpp_lib_atomic_wait 201907L
│ │ │ +
52
│ │ │ +
53namespace std _GLIBCXX_VISIBILITY(default)
│ │ │ +
54{
│ │ │ +
55_GLIBCXX_BEGIN_NAMESPACE_VERSION
│ │ │ +
56 namespace __detail
│ │ │ +
57 {
│ │ │ +
58#ifdef _GLIBCXX_HAVE_LINUX_FUTEX
│ │ │ +
59#define _GLIBCXX_HAVE_PLATFORM_WAIT 1
│ │ │ +
60 using __platform_wait_t = int;
│ │ │ +
61 inline constexpr size_t __platform_wait_alignment = 4;
│ │ │ +
62#else
│ │ │ +
63// define _GLIBCX_HAVE_PLATFORM_WAIT and implement __platform_wait()
│ │ │ +
64// and __platform_notify() if there is a more efficient primitive supported
│ │ │ +
65// by the platform (e.g. __ulock_wait()/__ulock_wake()) which is better than
│ │ │ +
66// a mutex/condvar based wait.
│ │ │ +
67 using __platform_wait_t = uint64_t;
│ │ │ +
68 inline constexpr size_t __platform_wait_alignment
│ │ │ +
69 = __alignof__(__platform_wait_t);
│ │ │ +
70#endif
│ │ │ +
71 } // namespace __detail
│ │ │ +
72
│ │ │ +
73 template<typename _Tp>
│ │ │ +
74 inline constexpr bool __platform_wait_uses_type
│ │ │ +
75#ifdef _GLIBCXX_HAVE_PLATFORM_WAIT
│ │ │ +
76 = is_scalar_v<_Tp>
│ │ │ +
77 && ((sizeof(_Tp) == sizeof(__detail::__platform_wait_t))
│ │ │ +
78 && (alignof(_Tp*) >= __detail::__platform_wait_alignment));
│ │ │ +
79#else
│ │ │ +
80 = false;
│ │ │ +
81#endif
│ │ │ +
82
│ │ │ +
83 namespace __detail
│ │ │ +
84 {
│ │ │ +
85#ifdef _GLIBCXX_HAVE_LINUX_FUTEX
│ │ │ +
86 enum class __futex_wait_flags : int
│ │ │ +
87 {
│ │ │ +
88#ifdef _GLIBCXX_HAVE_LINUX_FUTEX_PRIVATE
│ │ │ +
89 __private_flag = 128,
│ │ │ +
90#else
│ │ │ +
91 __private_flag = 0,
│ │ │ +
92#endif
│ │ │ +
93 __wait = 0,
│ │ │ +
94 __wake = 1,
│ │ │ +
95 __wait_bitset = 9,
│ │ │ +
96 __wake_bitset = 10,
│ │ │ +
97 __wait_private = __wait | __private_flag,
│ │ │ +
98 __wake_private = __wake | __private_flag,
│ │ │ +
99 __wait_bitset_private = __wait_bitset | __private_flag,
│ │ │ +
100 __wake_bitset_private = __wake_bitset | __private_flag,
│ │ │ +
101 __bitset_match_any = -1
│ │ │ +
102 };
│ │ │ +
103
│ │ │ +
104 template<typename _Tp>
│ │ │ +
105 void
│ │ │ +
106 __platform_wait(const _Tp* __addr, __platform_wait_t __val) noexcept
│ │ │ +
107 {
│ │ │ +
108 auto __e = syscall (SYS_futex, static_cast<const void*>(__addr),
│ │ │ +
109 static_cast<int>(__futex_wait_flags::__wait_private),
│ │ │ +
110 __val, nullptr);
│ │ │ +
111 if (!__e || errno == EAGAIN)
│ │ │ +
112 return;
│ │ │ +
113 if (errno != EINTR)
│ │ │ +
114 __throw_system_error(errno);
│ │ │ +
115 }
│ │ │ +
116
│ │ │ +
117 template<typename _Tp>
│ │ │ +
118 void
│ │ │ +
119 __platform_notify(const _Tp* __addr, bool __all) noexcept
│ │ │ +
120 {
│ │ │ +
121 syscall (SYS_futex, static_cast<const void*>(__addr),
│ │ │ +
122 static_cast<int>(__futex_wait_flags::__wake_private),
│ │ │ +
123 __all ? INT_MAX : 1);
│ │ │ +
124 }
│ │ │ +
125#endif
│ │ │ +
126
│ │ │ +
127 inline void
│ │ │ +
128 __thread_yield() noexcept
│ │ │ +
129 {
│ │ │ +
130#if defined _GLIBCXX_HAS_GTHREADS && defined _GLIBCXX_USE_SCHED_YIELD
│ │ │ +
131 __gthread_yield();
│ │ │ +
132#endif
│ │ │ +
133 }
│ │ │ +
134
│ │ │ +
135 inline void
│ │ │ +
136 __thread_relax() noexcept
│ │ │ +
137 {
│ │ │ +
138#if defined __i386__ || defined __x86_64__
│ │ │ +
139 __builtin_ia32_pause();
│ │ │ +
140#else
│ │ │ +
141 __thread_yield();
│ │ │ +
142#endif
│ │ │ +
143 }
│ │ │ +
144
│ │ │ +
145 inline constexpr auto __atomic_spin_count_relax = 12;
│ │ │ +
146 inline constexpr auto __atomic_spin_count = 16;
│ │ │ +
147
│ │ │ +
148 struct __default_spin_policy
│ │ │ +
149 {
│ │ │ +
150 bool
│ │ │ +
151 operator()() const noexcept
│ │ │ +
152 { return false; }
│ │ │ +
153 };
│ │ │ +
154
│ │ │ +
155 template<typename _Pred,
│ │ │ +
156 typename _Spin = __default_spin_policy>
│ │ │ +
157 bool
│ │ │ +
158 __atomic_spin(_Pred& __pred, _Spin __spin = _Spin{ }) noexcept
│ │ │ +
159 {
│ │ │ +
160 for (auto __i = 0; __i < __atomic_spin_count; ++__i)
│ │ │ +
161 {
│ │ │ +
162 if (__pred())
│ │ │ +
163 return true;
│ │ │ +
164
│ │ │ +
165 if (__i < __atomic_spin_count_relax)
│ │ │ +
166 __detail::__thread_relax();
│ │ │ +
167 else
│ │ │ +
168 __detail::__thread_yield();
│ │ │ +
169 }
│ │ │ +
170
│ │ │ +
171 while (__spin())
│ │ │ +
172 {
│ │ │ +
173 if (__pred())
│ │ │ +
174 return true;
│ │ │ +
175 }
│ │ │ +
176
│ │ │ +
177 return false;
│ │ │ +
178 }
│ │ │ +
179
│ │ │ +
180 // return true if equal
│ │ │ +
181 template<typename _Tp>
│ │ │ +
182 bool __atomic_compare(const _Tp& __a, const _Tp& __b)
│ │ │ +
183 {
│ │ │ +
184 // TODO make this do the correct padding bit ignoring comparison
│ │ │ +
185 return __builtin_memcmp(&__a, &__b, sizeof(_Tp)) == 0;
│ │ │ +
186 }
│ │ │ +
187
│ │ │ +
188 struct __waiter_pool_base
│ │ │ +
189 {
│ │ │ +
190 // Don't use std::hardware_destructive_interference_size here because we
│ │ │ +
191 // don't want the layout of library types to depend on compiler options.
│ │ │ +
192 static constexpr auto _S_align = 64;
│ │ │ +
193
│ │ │ +
194 alignas(_S_align) __platform_wait_t _M_wait = 0;
│ │ │ +
195
│ │ │ +
196#ifndef _GLIBCXX_HAVE_PLATFORM_WAIT
│ │ │ +
197 mutex _M_mtx;
│ │ │ +
198#endif
│ │ │ +
199
│ │ │ +
200 alignas(_S_align) __platform_wait_t _M_ver = 0;
│ │ │ +
201
│ │ │ +
202#ifndef _GLIBCXX_HAVE_PLATFORM_WAIT
│ │ │ +
203 __condvar _M_cv;
│ │ │ +
204#endif
│ │ │ +
205 __waiter_pool_base() = default;
│ │ │ +
206
│ │ │ +
207 void
│ │ │ +
208 _M_enter_wait() noexcept
│ │ │ +
209 { __atomic_fetch_add(&_M_wait, 1, __ATOMIC_SEQ_CST); }
│ │ │ +
210
│ │ │ +
211 void
│ │ │ +
212 _M_leave_wait() noexcept
│ │ │ +
213 { __atomic_fetch_sub(&_M_wait, 1, __ATOMIC_RELEASE); }
│ │ │ +
214
│ │ │ +
215 bool
│ │ │ +
216 _M_waiting() const noexcept
│ │ │ +
217 {
│ │ │ +
218 __platform_wait_t __res;
│ │ │ +
219 __atomic_load(&_M_wait, &__res, __ATOMIC_SEQ_CST);
│ │ │ +
220 return __res != 0;
│ │ │ +
221 }
│ │ │ +
222
│ │ │ +
223 void
│ │ │ +
224 _M_notify(__platform_wait_t* __addr, [[maybe_unused]] bool __all,
│ │ │ +
225 bool __bare) noexcept
│ │ │ +
226 {
│ │ │ +
227#ifdef _GLIBCXX_HAVE_PLATFORM_WAIT
│ │ │ +
228 if (__addr == &_M_ver)
│ │ │ +
229 {
│ │ │ +
230 __atomic_fetch_add(__addr, 1, __ATOMIC_SEQ_CST);
│ │ │ +
231 __all = true;
│ │ │ +
232 }
│ │ │ +
233
│ │ │ +
234 if (__bare || _M_waiting())
│ │ │ +
235 __platform_notify(__addr, __all);
│ │ │ +
236#else
│ │ │ +
237 {
│ │ │ +
238 lock_guard<mutex> __l(_M_mtx);
│ │ │ +
239 __atomic_fetch_add(__addr, 1, __ATOMIC_RELAXED);
│ │ │ +
240 }
│ │ │ +
241 if (__bare || _M_waiting())
│ │ │ +
242 _M_cv.notify_all();
│ │ │ +
243#endif
│ │ │ +
244 }
│ │ │ +
245
│ │ │ +
246 static __waiter_pool_base&
│ │ │ +
247 _S_for(const void* __addr) noexcept
│ │ │ +
248 {
│ │ │ +
249 constexpr uintptr_t __ct = 16;
│ │ │ +
250 static __waiter_pool_base __w[__ct];
│ │ │ +
251 auto __key = (uintptr_t(__addr) >> 2) % __ct;
│ │ │ +
252 return __w[__key];
│ │ │ +
253 }
│ │ │ +
254 };
│ │ │ +
255
│ │ │ +
256 struct __waiter_pool : __waiter_pool_base
│ │ │ +
257 {
│ │ │ +
258 void
│ │ │ +
259 _M_do_wait(const __platform_wait_t* __addr, __platform_wait_t __old) noexcept
│ │ │ +
260 {
│ │ │ +
261#ifdef _GLIBCXX_HAVE_PLATFORM_WAIT
│ │ │ +
262 __platform_wait(__addr, __old);
│ │ │ +
263#else
│ │ │ +
264 __platform_wait_t __val;
│ │ │ +
265 __atomic_load(__addr, &__val, __ATOMIC_SEQ_CST);
│ │ │ +
266 if (__val == __old)
│ │ │ +
267 {
│ │ │ +
268 lock_guard<mutex> __l(_M_mtx);
│ │ │ +
269 __atomic_load(__addr, &__val, __ATOMIC_RELAXED);
│ │ │ +
270 if (__val == __old)
│ │ │ +
271 _M_cv.wait(_M_mtx);
│ │ │ +
272 }
│ │ │ +
273#endif // __GLIBCXX_HAVE_PLATFORM_WAIT
│ │ │ +
274 }
│ │ │ +
275 };
│ │ │ +
276
│ │ │ +
277 template<typename _Tp>
│ │ │ +
278 struct __waiter_base
│ │ │ +
279 {
│ │ │ +
280 using __waiter_type = _Tp;
│ │ │ +
281
│ │ │ +
282 __waiter_type& _M_w;
│ │ │ +
283 __platform_wait_t* _M_addr;
│ │ │ +
284
│ │ │ +
285 template<typename _Up>
│ │ │ +
286 static __platform_wait_t*
│ │ │ +
287 _S_wait_addr(const _Up* __a, __platform_wait_t* __b)
│ │ │ +
288 {
│ │ │ +
289 if constexpr (__platform_wait_uses_type<_Up>)
│ │ │ +
290 return reinterpret_cast<__platform_wait_t*>(const_cast<_Up*>(__a));
│ │ │ +
291 else
│ │ │ +
292 return __b;
│ │ │ +
293 }
│ │ │ +
294
│ │ │ +
295 static __waiter_type&
│ │ │ +
296 _S_for(const void* __addr) noexcept
│ │ │ +
297 {
│ │ │ +
298 static_assert(sizeof(__waiter_type) == sizeof(__waiter_pool_base));
│ │ │ +
299 auto& res = __waiter_pool_base::_S_for(__addr);
│ │ │ +
300 return reinterpret_cast<__waiter_type&>(res);
│ │ │ +
301 }
│ │ │ +
302
│ │ │ +
303 template<typename _Up>
│ │ │ +
304 explicit __waiter_base(const _Up* __addr) noexcept
│ │ │ +
305 : _M_w(_S_for(__addr))
│ │ │ +
306 , _M_addr(_S_wait_addr(__addr, &_M_w._M_ver))
│ │ │ +
307 { }
│ │ │ +
308
│ │ │ +
309 void
│ │ │ +
310 _M_notify(bool __all, bool __bare = false) noexcept
│ │ │ +
311 { _M_w._M_notify(_M_addr, __all, __bare); }
│ │ │ +
312
│ │ │ +
313 template<typename _Up, typename _ValFn,
│ │ │ +
314 typename _Spin = __default_spin_policy>
│ │ │ +
315 static bool
│ │ │ +
316 _S_do_spin_v(__platform_wait_t* __addr,
│ │ │ +
317 const _Up& __old, _ValFn __vfn,
│ │ │ +
318 __platform_wait_t& __val,
│ │ │ +
319 _Spin __spin = _Spin{ })
│ │ │ +
320 {
│ │ │ +
321 auto const __pred = [=]
│ │ │ +
322 { return !__detail::__atomic_compare(__old, __vfn()); };
│ │ │ +
323
│ │ │ +
324 if constexpr (__platform_wait_uses_type<_Up>)
│ │ │ +
325 {
│ │ │ +
326 __builtin_memcpy(&__val, &__old, sizeof(__val));
│ │ │ +
327 }
│ │ │ +
328 else
│ │ │ +
329 {
│ │ │ +
330 __atomic_load(__addr, &__val, __ATOMIC_ACQUIRE);
│ │ │ +
331 }
│ │ │ +
332 return __atomic_spin(__pred, __spin);
│ │ │ +
333 }
│ │ │ +
334
│ │ │ +
335 template<typename _Up, typename _ValFn,
│ │ │ +
336 typename _Spin = __default_spin_policy>
│ │ │ +
337 bool
│ │ │ +
338 _M_do_spin_v(const _Up& __old, _ValFn __vfn,
│ │ │ +
339 __platform_wait_t& __val,
│ │ │ +
340 _Spin __spin = _Spin{ })
│ │ │ +
341 { return _S_do_spin_v(_M_addr, __old, __vfn, __val, __spin); }
│ │ │ +
342
│ │ │ +
343 template<typename _Pred,
│ │ │ +
344 typename _Spin = __default_spin_policy>
│ │ │ +
345 static bool
│ │ │ +
346 _S_do_spin(const __platform_wait_t* __addr,
│ │ │ +
347 _Pred __pred,
│ │ │ +
348 __platform_wait_t& __val,
│ │ │ +
349 _Spin __spin = _Spin{ })
│ │ │ +
350 {
│ │ │ +
351 __atomic_load(__addr, &__val, __ATOMIC_ACQUIRE);
│ │ │ +
352 return __atomic_spin(__pred, __spin);
│ │ │ +
353 }
│ │ │ +
354
│ │ │ +
355 template<typename _Pred,
│ │ │ +
356 typename _Spin = __default_spin_policy>
│ │ │ +
357 bool
│ │ │ +
358 _M_do_spin(_Pred __pred, __platform_wait_t& __val,
│ │ │ +
359 _Spin __spin = _Spin{ })
│ │ │ +
360 { return _S_do_spin(_M_addr, __pred, __val, __spin); }
│ │ │ +
361 };
│ │ │ +
362
│ │ │ +
363 template<typename _EntersWait>
│ │ │ +
364 struct __waiter : __waiter_base<__waiter_pool>
│ │ │ +
365 {
│ │ │ +
366 using __base_type = __waiter_base<__waiter_pool>;
│ │ │ +
367
│ │ │ +
368 template<typename _Tp>
│ │ │ +
369 explicit __waiter(const _Tp* __addr) noexcept
│ │ │ +
370 : __base_type(__addr)
│ │ │ +
371 {
│ │ │ +
372 if constexpr (_EntersWait::value)
│ │ │ +
373 _M_w._M_enter_wait();
│ │ │ +
374 }
│ │ │ +
375
│ │ │ +
376 ~__waiter()
│ │ │ +
377 {
│ │ │ +
378 if constexpr (_EntersWait::value)
│ │ │ +
379 _M_w._M_leave_wait();
│ │ │ +
380 }
│ │ │ +
381
│ │ │ +
382 template<typename _Tp, typename _ValFn>
│ │ │ +
383 void
│ │ │ +
384 _M_do_wait_v(_Tp __old, _ValFn __vfn)
│ │ │ +
385 {
│ │ │ +
386 do
│ │ │ +
387 {
│ │ │ +
388 __platform_wait_t __val;
│ │ │ +
389 if (__base_type::_M_do_spin_v(__old, __vfn, __val))
│ │ │ +
390 return;
│ │ │ +
391 __base_type::_M_w._M_do_wait(__base_type::_M_addr, __val);
│ │ │ +
392 }
│ │ │ +
393 while (__detail::__atomic_compare(__old, __vfn()));
│ │ │ +
394 }
│ │ │ +
395
│ │ │ +
396 template<typename _Pred>
│ │ │ +
397 void
│ │ │ +
398 _M_do_wait(_Pred __pred) noexcept
│ │ │ +
399 {
│ │ │ +
400 do
│ │ │ +
401 {
│ │ │ +
402 __platform_wait_t __val;
│ │ │ +
403 if (__base_type::_M_do_spin(__pred, __val))
│ │ │ +
404 return;
│ │ │ +
405 __base_type::_M_w._M_do_wait(__base_type::_M_addr, __val);
│ │ │ +
406 }
│ │ │ +
407 while (!__pred());
│ │ │ +
408 }
│ │ │ +
409 };
│ │ │ +
410
│ │ │ +
411 using __enters_wait = __waiter<std::true_type>;
│ │ │ +
412 using __bare_wait = __waiter<std::false_type>;
│ │ │ +
413 } // namespace __detail
│ │ │ +
414
│ │ │ +
415 template<typename _Tp, typename _ValFn>
│ │ │ +
416 void
│ │ │ +
417 __atomic_wait_address_v(const _Tp* __addr, _Tp __old,
│ │ │ +
418 _ValFn __vfn) noexcept
│ │ │ +
419 {
│ │ │ +
420 __detail::__enters_wait __w(__addr);
│ │ │ +
421 __w._M_do_wait_v(__old, __vfn);
│ │ │ +
422 }
│ │ │ +
423
│ │ │ +
424 template<typename _Tp, typename _Pred>
│ │ │ +
425 void
│ │ │ +
426 __atomic_wait_address(const _Tp* __addr, _Pred __pred) noexcept
│ │ │ +
427 {
│ │ │ +
428 __detail::__enters_wait __w(__addr);
│ │ │ +
429 __w._M_do_wait(__pred);
│ │ │ +
430 }
│ │ │ +
431
│ │ │ +
432 // This call is to be used by atomic types which track contention externally
│ │ │ +
433 template<typename _Pred>
│ │ │ +
434 void
│ │ │ +
435 __atomic_wait_address_bare(const __detail::__platform_wait_t* __addr,
│ │ │ +
436 _Pred __pred) noexcept
│ │ │ +
437 {
│ │ │ +
438#ifdef _GLIBCXX_HAVE_PLATFORM_WAIT
│ │ │ +
439 do
│ │ │ +
440 {
│ │ │ +
441 __detail::__platform_wait_t __val;
│ │ │ +
442 if (__detail::__bare_wait::_S_do_spin(__addr, __pred, __val))
│ │ │ +
443 return;
│ │ │ +
444 __detail::__platform_wait(__addr, __val);
│ │ │ +
445 }
│ │ │ +
446 while (!__pred());
│ │ │ +
447#else // !_GLIBCXX_HAVE_PLATFORM_WAIT
│ │ │ +
448 __detail::__bare_wait __w(__addr);
│ │ │ +
449 __w._M_do_wait(__pred);
│ │ │ +
450#endif
│ │ │ +
451 }
│ │ │ +
452
│ │ │ +
453 template<typename _Tp>
│ │ │ +
454 void
│ │ │ +
455 __atomic_notify_address(const _Tp* __addr, bool __all) noexcept
│ │ │ +
456 {
│ │ │ +
457 __detail::__bare_wait __w(__addr);
│ │ │ +
458 __w._M_notify(__all);
│ │ │ +
459 }
│ │ │ +
460
│ │ │ +
461 // This call is to be used by atomic types which track contention externally
│ │ │ +
462 inline void
│ │ │ +
463 __atomic_notify_address_bare(const __detail::__platform_wait_t* __addr,
│ │ │ +
464 bool __all) noexcept
│ │ │ +
465 {
│ │ │ +
466#ifdef _GLIBCXX_HAVE_PLATFORM_WAIT
│ │ │ +
467 __detail::__platform_notify(__addr, __all);
│ │ │ +
468#else
│ │ │ +
469 __detail::__bare_wait __w(__addr);
│ │ │ +
470 __w._M_notify(__all, true);
│ │ │ +
471#endif
│ │ │ +
472 }
│ │ │ +
473_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ +
474} // namespace std
│ │ │ +
475#endif // GTHREADS || LINUX_FUTEX
│ │ │ +
476#endif // _GLIBCXX_ATOMIC_WAIT_H
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │
ISO C++ entities toplevel namespace is std.
│ │ │ -
ptrdiff_t streamsize
Integral type for I/O operation counts and buffer sizes.
Definition postypes.h:68
│ │ │ -
traits_type::int_type int_type
Definition streambuf:133
│ │ │ -
virtual streamsize xsputn(const char_type *__s, streamsize __n)
Multiple character insertion.
Definition streambuf.tcc:80
│ │ │ - │ │ │ -
virtual streamsize xsgetn(char_type *__s, streamsize __n)
Multiple character extraction.
Definition streambuf.tcc:46
│ │ │ - │ │ │ + │ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,13 +1,13 @@ │ │ │ │ libstdc++ │ │ │ │ -streambuf.tcc │ │ │ │ +atomic_wait.h │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -1// Stream buffer classes -*- C++ -*- │ │ │ │ +1// -*- C++ -*- header. │ │ │ │ 2 │ │ │ │ -3// Copyright (C) 1997-2022 Free Software Foundation, Inc. │ │ │ │ +3// Copyright (C) 2020-2022 Free Software Foundation, Inc. │ │ │ │ 4// │ │ │ │ 5// This file is part of the GNU ISO C++ Library. This library is free │ │ │ │ 6// software; you can redistribute it and/or modify it under the │ │ │ │ 7// terms of the GNU General Public License as published by the │ │ │ │ 8// Free Software Foundation; either version 3, or (at your option) │ │ │ │ 9// any later version. │ │ │ │ 10 │ │ │ │ @@ -21,181 +21,473 @@ │ │ │ │ 18// 3.1, as published by the Free Software Foundation. │ │ │ │ 19 │ │ │ │ 20// You should have received a copy of the GNU General Public License and │ │ │ │ 21// a copy of the GCC Runtime Library Exception along with this program; │ │ │ │ 22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see │ │ │ │ 23// . │ │ │ │ 24 │ │ │ │ -25/** @file bits/streambuf.tcc │ │ │ │ +25/** @file bits/atomic_wait.h │ │ │ │ 26 * This is an internal header file, included by other library headers. │ │ │ │ -27 * Do not attempt to use it directly. @headername{streambuf} │ │ │ │ +27 * Do not attempt to use it directly. @headername{atomic} │ │ │ │ 28 */ │ │ │ │ 29 │ │ │ │ -30// │ │ │ │ -31// ISO C++ 14882: 27.5 Stream buffers │ │ │ │ -32// │ │ │ │ -33 │ │ │ │ -34#ifndef _STREAMBUF_TCC │ │ │ │ -35#define _STREAMBUF_TCC 1 │ │ │ │ -36 │ │ │ │ -37#pragma GCC system_header │ │ │ │ -38 │ │ │ │ -39namespace _s_t_d _GLIBCXX_VISIBILITY(default) │ │ │ │ -40{ │ │ │ │ -41_GLIBCXX_BEGIN_NAMESPACE_VERSION │ │ │ │ -42 │ │ │ │ -43 template │ │ │ │ -44 _s_t_r_e_a_m_s_i_z_e │ │ │ │ -_4_5 _b_a_s_i_c___s_t_r_e_a_m_b_u_f_<___C_h_a_r_T_,_ ___T_r_a_i_t_s_>_:_: │ │ │ │ -46_ _x_s_g_e_t_n(_c_h_a_r___t_y_p_e* _____s, _s_t_r_e_a_m_s_i_z_e __n) │ │ │ │ -47 { │ │ │ │ -48 _s_t_r_e_a_m_s_i_z_e _____r_e_t = 0; │ │ │ │ -49 while (_____r_e_t < __n) │ │ │ │ -50 { │ │ │ │ -51 const _s_t_r_e_a_m_s_i_z_e _____b_u_f___l_e_n = this->egptr() - this->gptr(); │ │ │ │ -52 if (_____b_u_f___l_e_n) │ │ │ │ -53 { │ │ │ │ -54 const _s_t_r_e_a_m_s_i_z_e _____r_e_m_a_i_n_i_n_g = __n - _____r_e_t; │ │ │ │ -55 const _s_t_r_e_a_m_s_i_z_e _____l_e_n = _s_t_d_:_:_m_i_n(_____b_u_f___l_e_n, _____r_e_m_a_i_n_i_n_g); │ │ │ │ -56 traits_type::copy(_____s, this->gptr(), _____l_e_n); │ │ │ │ -57 _____r_e_t += _____l_e_n; │ │ │ │ -58 _____s += _____l_e_n; │ │ │ │ -59 this->__safe_gbump(_____l_e_n); │ │ │ │ -60 } │ │ │ │ -61 │ │ │ │ -62 if (_____r_e_t < __n) │ │ │ │ -63 { │ │ │ │ -64 const _i_n_t___t_y_p_e __c = this->uflow(); │ │ │ │ -65 if (!traits_type::eq_int_type(__c, traits_type::eof())) │ │ │ │ -66 { │ │ │ │ -67 traits_type::assign(*_____s++, traits_type::to_char_type(__c)); │ │ │ │ -68 ++_____r_e_t; │ │ │ │ -69 } │ │ │ │ -70 else │ │ │ │ -71 break; │ │ │ │ -72 } │ │ │ │ -73 } │ │ │ │ -74 return _____r_e_t; │ │ │ │ -75 } │ │ │ │ -76 │ │ │ │ -77 template │ │ │ │ -78 _s_t_r_e_a_m_s_i_z_e │ │ │ │ -_7_9 _b_a_s_i_c___s_t_r_e_a_m_b_u_f_<___C_h_a_r_T_,_ ___T_r_a_i_t_s_>_:_: │ │ │ │ -80_ _x_s_p_u_t_n(const _c_h_a_r___t_y_p_e* _____s, _s_t_r_e_a_m_s_i_z_e __n) │ │ │ │ -81 { │ │ │ │ -82 _s_t_r_e_a_m_s_i_z_e _____r_e_t = 0; │ │ │ │ -83 while (_____r_e_t < __n) │ │ │ │ +30#ifndef _GLIBCXX_ATOMIC_WAIT_H │ │ │ │ +31#define _GLIBCXX_ATOMIC_WAIT_H 1 │ │ │ │ +32 │ │ │ │ +33#pragma GCC system_header │ │ │ │ +34 │ │ │ │ +35#include <_b_i_t_s_/_c_+_+_c_o_n_f_i_g_._h> │ │ │ │ +36#if defined _GLIBCXX_HAS_GTHREADS || defined _GLIBCXX_HAVE_LINUX_FUTEX │ │ │ │ +37#include <_b_i_t_s_/_f_u_n_c_t_i_o_n_a_l___h_a_s_h_._h> │ │ │ │ +38#include │ │ │ │ +39#include <_e_x_t_/_n_u_m_e_r_i_c___t_r_a_i_t_s_._h> │ │ │ │ +40 │ │ │ │ +41#ifdef _GLIBCXX_HAVE_LINUX_FUTEX │ │ │ │ +42# include <_c_e_r_r_n_o> │ │ │ │ +43# include │ │ │ │ +44# include │ │ │ │ +45# include │ │ │ │ +46# include <_b_i_t_s_/_f_u_n_c_t_e_x_c_e_p_t_._h> │ │ │ │ +47#endif │ │ │ │ +48 │ │ │ │ +49# include <_b_i_t_s_/_s_t_d___m_u_t_e_x_._h> // std::mutex, std::__condvar │ │ │ │ +50 │ │ │ │ +51#define __cpp_lib_atomic_wait 201907L │ │ │ │ +52 │ │ │ │ +53namespace _s_t_d _GLIBCXX_VISIBILITY(default) │ │ │ │ +54{ │ │ │ │ +55_GLIBCXX_BEGIN_NAMESPACE_VERSION │ │ │ │ +56 namespace __detail │ │ │ │ +57 { │ │ │ │ +58#ifdef _GLIBCXX_HAVE_LINUX_FUTEX │ │ │ │ +59#define _GLIBCXX_HAVE_PLATFORM_WAIT 1 │ │ │ │ +60 using __platform_wait_t = int; │ │ │ │ +61 inline constexpr size_t __platform_wait_alignment = 4; │ │ │ │ +62#else │ │ │ │ +63// define _GLIBCX_HAVE_PLATFORM_WAIT and implement __platform_wait() │ │ │ │ +64// and __platform_notify() if there is a more efficient primitive supported │ │ │ │ +65// by the platform (e.g. __ulock_wait()/__ulock_wake()) which is better than │ │ │ │ +66// a mutex/condvar based wait. │ │ │ │ +67 using __platform_wait_t = uint64_t; │ │ │ │ +68 inline constexpr size_t __platform_wait_alignment │ │ │ │ +69 = __alignof__(__platform_wait_t); │ │ │ │ +70#endif │ │ │ │ +71 } // namespace __detail │ │ │ │ +72 │ │ │ │ +73 template │ │ │ │ +74 inline constexpr bool __platform_wait_uses_type │ │ │ │ +75#ifdef _GLIBCXX_HAVE_PLATFORM_WAIT │ │ │ │ +76 = is_scalar_v<_Tp> │ │ │ │ +77 && ((sizeof(_Tp) == sizeof(__detail::__platform_wait_t)) │ │ │ │ +78 && (alignof(_Tp*) >= __detail::__platform_wait_alignment)); │ │ │ │ +79#else │ │ │ │ +80 = false; │ │ │ │ +81#endif │ │ │ │ +82 │ │ │ │ +83 namespace __detail │ │ │ │ 84 { │ │ │ │ -85 const _s_t_r_e_a_m_s_i_z_e _____b_u_f___l_e_n = this->epptr() - this->pptr(); │ │ │ │ -86 if (_____b_u_f___l_e_n) │ │ │ │ +85#ifdef _GLIBCXX_HAVE_LINUX_FUTEX │ │ │ │ +86 enum class __futex_wait_flags : int │ │ │ │ 87 { │ │ │ │ -88 const _s_t_r_e_a_m_s_i_z_e _____r_e_m_a_i_n_i_n_g = __n - _____r_e_t; │ │ │ │ -89 const _s_t_r_e_a_m_s_i_z_e _____l_e_n = _s_t_d_:_:_m_i_n(_____b_u_f___l_e_n, _____r_e_m_a_i_n_i_n_g); │ │ │ │ -90 traits_type::copy(this->pptr(), _____s, _____l_e_n); │ │ │ │ -91 _____r_e_t += _____l_e_n; │ │ │ │ -92 _____s += _____l_e_n; │ │ │ │ -93 this->__safe_pbump(_____l_e_n); │ │ │ │ -94 } │ │ │ │ -95 │ │ │ │ -96 if (_____r_e_t < __n) │ │ │ │ -97 { │ │ │ │ -98 _i_n_t___t_y_p_e __c = this->overflow(traits_type::to_int_type(*_____s)); │ │ │ │ -99 if (!traits_type::eq_int_type(__c, traits_type::eof())) │ │ │ │ -100 { │ │ │ │ -101 ++_____r_e_t; │ │ │ │ -102 ++_____s; │ │ │ │ -103 } │ │ │ │ -104 else │ │ │ │ -105 break; │ │ │ │ -106 } │ │ │ │ -107 } │ │ │ │ -108 return _____r_e_t; │ │ │ │ -109 } │ │ │ │ -110 │ │ │ │ -111 // Conceivably, this could be used to implement buffer-to-buffer │ │ │ │ -112 // copies, if this was ever desired in an un-ambiguous way by the │ │ │ │ -113 // standard. │ │ │ │ -114 template │ │ │ │ -115 _s_t_r_e_a_m_s_i_z_e │ │ │ │ -116 __copy_streambufs_eof(_b_a_s_i_c___s_t_r_e_a_m_b_u_f_<___C_h_a_r_T_,_ ___T_r_a_i_t_s_>* _____s_b_i_n, │ │ │ │ -117 _b_a_s_i_c___s_t_r_e_a_m_b_u_f_<___C_h_a_r_T_,_ ___T_r_a_i_t_s_>* _____s_b_o_u_t, │ │ │ │ -118 bool& _____i_n_e_o_f) │ │ │ │ -119 { │ │ │ │ -120 _s_t_r_e_a_m_s_i_z_e _____r_e_t = 0; │ │ │ │ -121 _____i_n_e_o_f = true; │ │ │ │ -122 typename _Traits::int_type __c = _____s_b_i_n->sgetc(); │ │ │ │ -123 while (!_Traits::eq_int_type(__c, _Traits::eof())) │ │ │ │ -124 { │ │ │ │ -125 __c = _____s_b_o_u_t->sputc(_Traits::to_char_type(__c)); │ │ │ │ -126 if (_Traits::eq_int_type(__c, _Traits::eof())) │ │ │ │ -127 { │ │ │ │ -128 _____i_n_e_o_f = false; │ │ │ │ -129 break; │ │ │ │ -130 } │ │ │ │ -131 ++__ret; │ │ │ │ -132 __c = __sbin->snextc(); │ │ │ │ +88#ifdef _GLIBCXX_HAVE_LINUX_FUTEX_PRIVATE │ │ │ │ +89 __private_flag = 128, │ │ │ │ +90#else │ │ │ │ +91 __private_flag = 0, │ │ │ │ +92#endif │ │ │ │ +93 __wait = 0, │ │ │ │ +94 __wake = 1, │ │ │ │ +95 __wait_bitset = 9, │ │ │ │ +96 __wake_bitset = 10, │ │ │ │ +97 __wait_private = __wait | __private_flag, │ │ │ │ +98 __wake_private = __wake | __private_flag, │ │ │ │ +99 __wait_bitset_private = __wait_bitset | __private_flag, │ │ │ │ +100 __wake_bitset_private = __wake_bitset | __private_flag, │ │ │ │ +101 __bitset_match_any = -1 │ │ │ │ +102 }; │ │ │ │ +103 │ │ │ │ +104 template │ │ │ │ +105 void │ │ │ │ +106 __platform_wait(const _Tp* __addr, __platform_wait_t __val) noexcept │ │ │ │ +107 { │ │ │ │ +108 auto __e = syscall (SYS_futex, static_cast(__addr), │ │ │ │ +109 static_cast(__futex_wait_flags::__wait_private), │ │ │ │ +110 __val, nullptr); │ │ │ │ +111 if (!__e || errno == EAGAIN) │ │ │ │ +112 return; │ │ │ │ +113 if (errno != EINTR) │ │ │ │ +114 __throw_system_error(errno); │ │ │ │ +115 } │ │ │ │ +116 │ │ │ │ +117 template │ │ │ │ +118 void │ │ │ │ +119 __platform_notify(const _Tp* __addr, bool __all) noexcept │ │ │ │ +120 { │ │ │ │ +121 syscall (SYS_futex, static_cast(__addr), │ │ │ │ +122 static_cast(__futex_wait_flags::__wake_private), │ │ │ │ +123 __all ? INT_MAX : 1); │ │ │ │ +124 } │ │ │ │ +125#endif │ │ │ │ +126 │ │ │ │ +127 inline void │ │ │ │ +128 __thread_yield() noexcept │ │ │ │ +129 { │ │ │ │ +130#if defined _GLIBCXX_HAS_GTHREADS && defined _GLIBCXX_USE_SCHED_YIELD │ │ │ │ +131 __gthread_yield(); │ │ │ │ +132#endif │ │ │ │ 133 } │ │ │ │ -134 return __ret; │ │ │ │ -135 } │ │ │ │ -136 │ │ │ │ -137 template │ │ │ │ -138 inline _s_t_r_e_a_m_s_i_z_e │ │ │ │ -139 __copy_streambufs(basic_streambuf<_CharT, _Traits>* __sbin, │ │ │ │ -140 basic_streambuf<_CharT, _Traits>* __sbout) │ │ │ │ -141 { │ │ │ │ -142 bool __ineof; │ │ │ │ -143 return __copy_streambufs_eof(__sbin, __sbout, __ineof); │ │ │ │ -144 } │ │ │ │ -145 │ │ │ │ -146 // Inhibit implicit instantiations for required instantiations, │ │ │ │ -147 // which are defined via explicit instantiations elsewhere. │ │ │ │ -148#if _GLIBCXX_EXTERN_TEMPLATE │ │ │ │ -149 extern template class basic_streambuf; │ │ │ │ -150 │ │ │ │ -151 extern template │ │ │ │ -152 _s_t_r_e_a_m_s_i_z_e │ │ │ │ -153 __copy_streambufs(basic_streambuf*, │ │ │ │ -154 basic_streambuf*); │ │ │ │ -155 │ │ │ │ -156#ifdef _GLIBCXX_USE_WCHAR_T │ │ │ │ -157 extern template class basic_streambuf; │ │ │ │ -158 │ │ │ │ -159 extern template │ │ │ │ -160 _s_t_r_e_a_m_s_i_z_e │ │ │ │ -161 __copy_streambufs(basic_streambuf*, │ │ │ │ -162 basic_streambuf*); │ │ │ │ -163#endif │ │ │ │ -164#endif │ │ │ │ -165 │ │ │ │ -166_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ -167} // namespace std │ │ │ │ -168 │ │ │ │ -169#endif │ │ │ │ -_s_t_d_:_:_m_i_n │ │ │ │ -constexpr const _Tp & min(const _Tp &, const _Tp &) │ │ │ │ -This does what you think it does. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___a_l_g_o_b_a_s_e_._h_:_2_3_0 │ │ │ │ +134 │ │ │ │ +135 inline void │ │ │ │ +136 __thread_relax() noexcept │ │ │ │ +137 { │ │ │ │ +138#if defined __i386__ || defined __x86_64__ │ │ │ │ +139 __builtin_ia32_pause(); │ │ │ │ +140#else │ │ │ │ +141 __thread_yield(); │ │ │ │ +142#endif │ │ │ │ +143 } │ │ │ │ +144 │ │ │ │ +145 inline constexpr auto __atomic_spin_count_relax = 12; │ │ │ │ +146 inline constexpr auto __atomic_spin_count = 16; │ │ │ │ +147 │ │ │ │ +148 struct __default_spin_policy │ │ │ │ +149 { │ │ │ │ +150 bool │ │ │ │ +151 operator()() const noexcept │ │ │ │ +152 { return false; } │ │ │ │ +153 }; │ │ │ │ +154 │ │ │ │ +155 template │ │ │ │ +157 bool │ │ │ │ +158 __atomic_spin(_Pred& __pred, _Spin __spin = _Spin{ }) noexcept │ │ │ │ +159 { │ │ │ │ +160 for (auto __i = 0; __i < __atomic_spin_count; ++__i) │ │ │ │ +161 { │ │ │ │ +162 if (__pred()) │ │ │ │ +163 return true; │ │ │ │ +164 │ │ │ │ +165 if (__i < __atomic_spin_count_relax) │ │ │ │ +166 __detail::__thread_relax(); │ │ │ │ +167 else │ │ │ │ +168 __detail::__thread_yield(); │ │ │ │ +169 } │ │ │ │ +170 │ │ │ │ +171 while (__spin()) │ │ │ │ +172 { │ │ │ │ +173 if (__pred()) │ │ │ │ +174 return true; │ │ │ │ +175 } │ │ │ │ +176 │ │ │ │ +177 return false; │ │ │ │ +178 } │ │ │ │ +179 │ │ │ │ +180 // return true if equal │ │ │ │ +181 template │ │ │ │ +182 bool __atomic_compare(const _Tp& __a, const _Tp& __b) │ │ │ │ +183 { │ │ │ │ +184 // TODO make this do the correct padding bit ignoring comparison │ │ │ │ +185 return __builtin_memcmp(&__a, &__b, sizeof(_Tp)) == 0; │ │ │ │ +186 } │ │ │ │ +187 │ │ │ │ +188 struct __waiter_pool_base │ │ │ │ +189 { │ │ │ │ +190 // Don't use std::hardware_destructive_interference_size here because we │ │ │ │ +191 // don't want the layout of library types to depend on compiler options. │ │ │ │ +192 static constexpr auto _S_align = 64; │ │ │ │ +193 │ │ │ │ +194 alignas(_S_align) __platform_wait_t _M_wait = 0; │ │ │ │ +195 │ │ │ │ +196#ifndef _GLIBCXX_HAVE_PLATFORM_WAIT │ │ │ │ +197 mutex _M_mtx; │ │ │ │ +198#endif │ │ │ │ +199 │ │ │ │ +200 alignas(_S_align) __platform_wait_t _M_ver = 0; │ │ │ │ +201 │ │ │ │ +202#ifndef _GLIBCXX_HAVE_PLATFORM_WAIT │ │ │ │ +203 __condvar _M_cv; │ │ │ │ +204#endif │ │ │ │ +205 __waiter_pool_base() = default; │ │ │ │ +206 │ │ │ │ +207 void │ │ │ │ +208 _M_enter_wait() noexcept │ │ │ │ +209 { __atomic_fetch_add(&_M_wait, 1, __ATOMIC_SEQ_CST); } │ │ │ │ +210 │ │ │ │ +211 void │ │ │ │ +212 _M_leave_wait() noexcept │ │ │ │ +213 { __atomic_fetch_sub(&_M_wait, 1, __ATOMIC_RELEASE); } │ │ │ │ +214 │ │ │ │ +215 bool │ │ │ │ +216 _M_waiting() const noexcept │ │ │ │ +217 { │ │ │ │ +218 __platform_wait_t __res; │ │ │ │ +219 __atomic_load(&_M_wait, &__res, __ATOMIC_SEQ_CST); │ │ │ │ +220 return __res != 0; │ │ │ │ +221 } │ │ │ │ +222 │ │ │ │ +223 void │ │ │ │ +224 _M_notify(__platform_wait_t* __addr, [[maybe_unused]] bool __all, │ │ │ │ +225 bool __bare) noexcept │ │ │ │ +226 { │ │ │ │ +227#ifdef _GLIBCXX_HAVE_PLATFORM_WAIT │ │ │ │ +228 if (__addr == &_M_ver) │ │ │ │ +229 { │ │ │ │ +230 __atomic_fetch_add(__addr, 1, __ATOMIC_SEQ_CST); │ │ │ │ +231 __all = true; │ │ │ │ +232 } │ │ │ │ +233 │ │ │ │ +234 if (__bare || _M_waiting()) │ │ │ │ +235 __platform_notify(__addr, __all); │ │ │ │ +236#else │ │ │ │ +237 { │ │ │ │ +238 lock_guard __l(_M_mtx); │ │ │ │ +239 __atomic_fetch_add(__addr, 1, __ATOMIC_RELAXED); │ │ │ │ +240 } │ │ │ │ +241 if (__bare || _M_waiting()) │ │ │ │ +242 _M_cv.notify_all(); │ │ │ │ +243#endif │ │ │ │ +244 } │ │ │ │ +245 │ │ │ │ +246 static __waiter_pool_base& │ │ │ │ +247 _S_for(const void* __addr) noexcept │ │ │ │ +248 { │ │ │ │ +249 constexpr uintptr_t __ct = 16; │ │ │ │ +250 static __waiter_pool_base __w[__ct]; │ │ │ │ +251 auto __key = (uintptr_t(__addr) >> 2) % __ct; │ │ │ │ +252 return __w[__key]; │ │ │ │ +253 } │ │ │ │ +254 }; │ │ │ │ +255 │ │ │ │ +256 struct __waiter_pool : __waiter_pool_base │ │ │ │ +257 { │ │ │ │ +258 void │ │ │ │ +259 _M_do_wait(const __platform_wait_t* __addr, __platform_wait_t __old) │ │ │ │ +noexcept │ │ │ │ +260 { │ │ │ │ +261#ifdef _GLIBCXX_HAVE_PLATFORM_WAIT │ │ │ │ +262 __platform_wait(__addr, __old); │ │ │ │ +263#else │ │ │ │ +264 __platform_wait_t __val; │ │ │ │ +265 __atomic_load(__addr, &__val, __ATOMIC_SEQ_CST); │ │ │ │ +266 if (__val == __old) │ │ │ │ +267 { │ │ │ │ +268 lock_guard __l(_M_mtx); │ │ │ │ +269 __atomic_load(__addr, &__val, __ATOMIC_RELAXED); │ │ │ │ +270 if (__val == __old) │ │ │ │ +271 _M_cv.wait(_M_mtx); │ │ │ │ +272 } │ │ │ │ +273#endif // __GLIBCXX_HAVE_PLATFORM_WAIT │ │ │ │ +274 } │ │ │ │ +275 }; │ │ │ │ +276 │ │ │ │ +277 template │ │ │ │ +278 struct __waiter_base │ │ │ │ +279 { │ │ │ │ +280 using __waiter_type = _Tp; │ │ │ │ +281 │ │ │ │ +282 __waiter_type& _M_w; │ │ │ │ +283 __platform_wait_t* _M_addr; │ │ │ │ +284 │ │ │ │ +285 template │ │ │ │ +286 static __platform_wait_t* │ │ │ │ +287 _S_wait_addr(const _Up* __a, __platform_wait_t* __b) │ │ │ │ +288 { │ │ │ │ +289 if constexpr (__platform_wait_uses_type<_Up>) │ │ │ │ +290 return reinterpret_cast<__platform_wait_t*>(const_cast<_Up*>(__a)); │ │ │ │ +291 else │ │ │ │ +292 return __b; │ │ │ │ +293 } │ │ │ │ +294 │ │ │ │ +295 static __waiter_type& │ │ │ │ +296 _S_for(const void* __addr) noexcept │ │ │ │ +297 { │ │ │ │ +298 static_assert(sizeof(__waiter_type) == sizeof(__waiter_pool_base)); │ │ │ │ +299 auto& res = __waiter_pool_base::_S_for(__addr); │ │ │ │ +300 return reinterpret_cast<__waiter_type&>(res); │ │ │ │ +301 } │ │ │ │ +302 │ │ │ │ +303 template │ │ │ │ +304 explicit __waiter_base(const _Up* __addr) noexcept │ │ │ │ +305 : _M_w(_S_for(__addr)) │ │ │ │ +306 , _M_addr(_S_wait_addr(__addr, &_M_w._M_ver)) │ │ │ │ +307 { } │ │ │ │ +308 │ │ │ │ +309 void │ │ │ │ +310 _M_notify(bool __all, bool __bare = false) noexcept │ │ │ │ +311 { _M_w._M_notify(_M_addr, __all, __bare); } │ │ │ │ +312 │ │ │ │ +313 template │ │ │ │ +315 static bool │ │ │ │ +316 _S_do_spin_v(__platform_wait_t* __addr, │ │ │ │ +317 const _Up& __old, _ValFn __vfn, │ │ │ │ +318 __platform_wait_t& __val, │ │ │ │ +319 _Spin __spin = _Spin{ }) │ │ │ │ +320 { │ │ │ │ +321 auto const __pred = [=] │ │ │ │ +322 { return !__detail::__atomic_compare(__old, __vfn()); }; │ │ │ │ +323 │ │ │ │ +324 if constexpr (__platform_wait_uses_type<_Up>) │ │ │ │ +325 { │ │ │ │ +326 __builtin_memcpy(&__val, &__old, sizeof(__val)); │ │ │ │ +327 } │ │ │ │ +328 else │ │ │ │ +329 { │ │ │ │ +330 __atomic_load(__addr, &__val, __ATOMIC_ACQUIRE); │ │ │ │ +331 } │ │ │ │ +332 return __atomic_spin(__pred, __spin); │ │ │ │ +333 } │ │ │ │ +334 │ │ │ │ +335 template │ │ │ │ +337 bool │ │ │ │ +338 _M_do_spin_v(const _Up& __old, _ValFn __vfn, │ │ │ │ +339 __platform_wait_t& __val, │ │ │ │ +340 _Spin __spin = _Spin{ }) │ │ │ │ +341 { return _S_do_spin_v(_M_addr, __old, __vfn, __val, __spin); } │ │ │ │ +342 │ │ │ │ +343 template │ │ │ │ +345 static bool │ │ │ │ +346 _S_do_spin(const __platform_wait_t* __addr, │ │ │ │ +347 _Pred __pred, │ │ │ │ +348 __platform_wait_t& __val, │ │ │ │ +349 _Spin __spin = _Spin{ }) │ │ │ │ +350 { │ │ │ │ +351 __atomic_load(__addr, &__val, __ATOMIC_ACQUIRE); │ │ │ │ +352 return __atomic_spin(__pred, __spin); │ │ │ │ +353 } │ │ │ │ +354 │ │ │ │ +355 template │ │ │ │ +357 bool │ │ │ │ +358 _M_do_spin(_Pred __pred, __platform_wait_t& __val, │ │ │ │ +359 _Spin __spin = _Spin{ }) │ │ │ │ +360 { return _S_do_spin(_M_addr, __pred, __val, __spin); } │ │ │ │ +361 }; │ │ │ │ +362 │ │ │ │ +363 template │ │ │ │ +364 struct __waiter : __waiter_base<__waiter_pool> │ │ │ │ +365 { │ │ │ │ +366 using __base_type = __waiter_base<__waiter_pool>; │ │ │ │ +367 │ │ │ │ +368 template │ │ │ │ +369 explicit __waiter(const _Tp* __addr) noexcept │ │ │ │ +370 : __base_type(__addr) │ │ │ │ +371 { │ │ │ │ +372 if constexpr (_EntersWait::value) │ │ │ │ +373 _M_w._M_enter_wait(); │ │ │ │ +374 } │ │ │ │ +375 │ │ │ │ +376 ~__waiter() │ │ │ │ +377 { │ │ │ │ +378 if constexpr (_EntersWait::value) │ │ │ │ +379 _M_w._M_leave_wait(); │ │ │ │ +380 } │ │ │ │ +381 │ │ │ │ +382 template │ │ │ │ +383 void │ │ │ │ +384 _M_do_wait_v(_Tp __old, _ValFn __vfn) │ │ │ │ +385 { │ │ │ │ +386 do │ │ │ │ +387 { │ │ │ │ +388 __platform_wait_t __val; │ │ │ │ +389 if (__base_type::_M_do_spin_v(__old, __vfn, __val)) │ │ │ │ +390 return; │ │ │ │ +391 __base_type::_M_w._M_do_wait(__base_type::_M_addr, __val); │ │ │ │ +392 } │ │ │ │ +393 while (__detail::__atomic_compare(__old, __vfn())); │ │ │ │ +394 } │ │ │ │ +395 │ │ │ │ +396 template │ │ │ │ +397 void │ │ │ │ +398 _M_do_wait(_Pred __pred) noexcept │ │ │ │ +399 { │ │ │ │ +400 do │ │ │ │ +401 { │ │ │ │ +402 __platform_wait_t __val; │ │ │ │ +403 if (__base_type::_M_do_spin(__pred, __val)) │ │ │ │ +404 return; │ │ │ │ +405 __base_type::_M_w._M_do_wait(__base_type::_M_addr, __val); │ │ │ │ +406 } │ │ │ │ +407 while (!__pred()); │ │ │ │ +408 } │ │ │ │ +409 }; │ │ │ │ +410 │ │ │ │ +411 using __enters_wait = __waiter; │ │ │ │ +412 using __bare_wait = __waiter; │ │ │ │ +413 } // namespace __detail │ │ │ │ +414 │ │ │ │ +415 template │ │ │ │ +416 void │ │ │ │ +417 __atomic_wait_address_v(const _Tp* __addr, _Tp __old, │ │ │ │ +418 _ValFn __vfn) noexcept │ │ │ │ +419 { │ │ │ │ +420 __detail::__enters_wait __w(__addr); │ │ │ │ +421 __w._M_do_wait_v(__old, __vfn); │ │ │ │ +422 } │ │ │ │ +423 │ │ │ │ +424 template │ │ │ │ +425 void │ │ │ │ +426 __atomic_wait_address(const _Tp* __addr, _Pred __pred) noexcept │ │ │ │ +427 { │ │ │ │ +428 __detail::__enters_wait __w(__addr); │ │ │ │ +429 __w._M_do_wait(__pred); │ │ │ │ +430 } │ │ │ │ +431 │ │ │ │ +432 // This call is to be used by atomic types which track contention │ │ │ │ +externally │ │ │ │ +433 template │ │ │ │ +434 void │ │ │ │ +435 __atomic_wait_address_bare(const __detail::__platform_wait_t* __addr, │ │ │ │ +436 _Pred __pred) noexcept │ │ │ │ +437 { │ │ │ │ +438#ifdef _GLIBCXX_HAVE_PLATFORM_WAIT │ │ │ │ +439 do │ │ │ │ +440 { │ │ │ │ +441 __detail::__platform_wait_t __val; │ │ │ │ +442 if (__detail::__bare_wait::_S_do_spin(__addr, __pred, __val)) │ │ │ │ +443 return; │ │ │ │ +444 __detail::__platform_wait(__addr, __val); │ │ │ │ +445 } │ │ │ │ +446 while (!__pred()); │ │ │ │ +447#else // !_GLIBCXX_HAVE_PLATFORM_WAIT │ │ │ │ +448 __detail::__bare_wait __w(__addr); │ │ │ │ +449 __w._M_do_wait(__pred); │ │ │ │ +450#endif │ │ │ │ +451 } │ │ │ │ +452 │ │ │ │ +453 template │ │ │ │ +454 void │ │ │ │ +455 __atomic_notify_address(const _Tp* __addr, bool __all) noexcept │ │ │ │ +456 { │ │ │ │ +457 __detail::__bare_wait __w(__addr); │ │ │ │ +458 __w._M_notify(__all); │ │ │ │ +459 } │ │ │ │ +460 │ │ │ │ +461 // This call is to be used by atomic types which track contention │ │ │ │ +externally │ │ │ │ +462 inline void │ │ │ │ +463 __atomic_notify_address_bare(const __detail::__platform_wait_t* __addr, │ │ │ │ +464 bool __all) noexcept │ │ │ │ +465 { │ │ │ │ +466#ifdef _GLIBCXX_HAVE_PLATFORM_WAIT │ │ │ │ +467 __detail::__platform_notify(__addr, __all); │ │ │ │ +468#else │ │ │ │ +469 __detail::__bare_wait __w(__addr); │ │ │ │ +470 __w._M_notify(__all, true); │ │ │ │ +471#endif │ │ │ │ +472 } │ │ │ │ +473_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ +474} // namespace std │ │ │ │ +475#endif // GTHREADS || LINUX_FUTEX │ │ │ │ +476#endif // _GLIBCXX_ATOMIC_WAIT_H │ │ │ │ +_c_e_r_r_n_o │ │ │ │ +_s_t_d___m_u_t_e_x_._h │ │ │ │ +_f_u_n_c_t_i_o_n_a_l___h_a_s_h_._h │ │ │ │ +_f_u_n_c_t_e_x_c_e_p_t_._h │ │ │ │ +_c_+_+_c_o_n_f_i_g_._h │ │ │ │ _s_t_d │ │ │ │ ISO C++ entities toplevel namespace is std. │ │ │ │ -_s_t_d_:_:_s_t_r_e_a_m_s_i_z_e │ │ │ │ -ptrdiff_t streamsize │ │ │ │ -Integral type for I/O operation counts and buffer sizes. │ │ │ │ -DDeeffiinniittiioonn _p_o_s_t_y_p_e_s_._h_:_6_8 │ │ │ │ -_s_t_d_:_:_b_a_s_i_c___s_t_r_e_a_m_b_u_f_:_:_i_n_t___t_y_p_e │ │ │ │ -traits_type::int_type int_type │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m_b_u_f_:_1_3_3 │ │ │ │ -_s_t_d_:_:_b_a_s_i_c___s_t_r_e_a_m_b_u_f_:_:_x_s_p_u_t_n │ │ │ │ -virtual streamsize xsputn(const char_type *__s, streamsize __n) │ │ │ │ -Multiple character insertion. │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m_b_u_f_._t_c_c_:_8_0 │ │ │ │ -_s_t_d_:_:_b_a_s_i_c___s_t_r_e_a_m_b_u_f_:_:_c_h_a_r___t_y_p_e │ │ │ │ -_CharT char_type │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m_b_u_f_:_1_3_1 │ │ │ │ -_s_t_d_:_:_b_a_s_i_c___s_t_r_e_a_m_b_u_f_:_:_x_s_g_e_t_n │ │ │ │ -virtual streamsize xsgetn(char_type *__s, streamsize __n) │ │ │ │ -Multiple character extraction. │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m_b_u_f_._t_c_c_:_4_6 │ │ │ │ -_s_t_d_:_:_a_u_t_o___p_t_r___r_e_f │ │ │ │ -DDeeffiinniittiioonn _a_u_t_o___p_t_r_._h_:_4_9 │ │ │ │ +_n_u_m_e_r_i_c___t_r_a_i_t_s_._h │ │ │ │ * _b_i_t_s │ │ │ │ - * _s_t_r_e_a_m_b_u_f_._t_c_c │ │ │ │ + * _a_t_o_m_i_c___w_a_i_t_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-12-base/libstdc++/user/a00401.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: streambuf_iterator.h File Reference │ │ │ +libstdc++: concept_check.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -46,70 +46,219 @@ │ │ │ /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */ │ │ │ $(document).ready(function(){initNavTree('a00401.html',''); initResizable(); }); │ │ │ /* @license-end */ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -Classes | │ │ │ -Namespaces | │ │ │ -Functions
│ │ │ -
streambuf_iterator.h File Reference
│ │ │ +Macros
│ │ │ +
concept_check.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -

│ │ │ -Classes

class  std::istreambuf_iterator< _CharT, _Traits >
 
class  std::ostreambuf_iterator< _CharT, _Traits >
 
│ │ │ - │ │ │ - │ │ │ - │ │ │ -

│ │ │ -Namespaces

namespace  std
 
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ -Functions

template<bool _IsMove, typename _CharT >
__gnu_cxx::__enable_if< __is_char< _CharT >::__value, ostreambuf_iterator< _CharT > >::__type std::__copy_move_a2 (_CharT *__first, _CharT *__last, ostreambuf_iterator< _CharT > __result)
 
template<bool _IsMove, typename _CharT >
__gnu_cxx::__enable_if< __is_char< _CharT >::__value, ostreambuf_iterator< _CharT > >::__type std::__copy_move_a2 (const _CharT *__first, const _CharT *__last, ostreambuf_iterator< _CharT > __result)
 
template<bool _IsMove, typename _CharT >
__gnu_cxx::__enable_if< __is_char< _CharT >::__value, _CharT * >::__type std::__copy_move_a2 (istreambuf_iterator< _CharT > __first, istreambuf_iterator< _CharT > __last, _CharT *__result)
 
template<typename _CharT , typename _Size >
__gnu_cxx::__enable_if< __is_char< _CharT >::__value, _CharT * >::__type std::__copy_n_a (istreambuf_iterator< _CharT > __it, _Size __n, _CharT *__result, bool __strict)
 
template<typename _CharT , typename _Distance >
__gnu_cxx::__enable_if< __is_char< _CharT >::__value, void >::__type std::advance (istreambuf_iterator< _CharT > &__i, _Distance __n)
 
template<typename _CharT >
__gnu_cxx::__enable_if< __is_char< _CharT >::__value, ostreambuf_iterator< _CharT > >::__type std::copy (istreambuf_iterator< _CharT > __first, istreambuf_iterator< _CharT > __last, ostreambuf_iterator< _CharT > __result)
 
template<typename _CharT >
__gnu_cxx::__enable_if< __is_char< _CharT >::__value, istreambuf_iterator< _CharT > >::__type std::find (istreambuf_iterator< _CharT > __first, istreambuf_iterator< _CharT > __last, const _CharT &__val)
 
template<typename _CharT , typename _Traits >
bool std::operator== (const istreambuf_iterator< _CharT, _Traits > &__a, const istreambuf_iterator< _CharT, _Traits > &__b)
 

│ │ │ +Macros

#define __glibcxx_class_requires(_a, _b)
 
#define __glibcxx_class_requires2(_a, _b, _c)
 
#define __glibcxx_class_requires3(_a, _b, _c, _d)
 
#define __glibcxx_class_requires4(_a, _b, _c, _d, _e)
 
#define __glibcxx_function_requires(...)
 
│ │ │

Detailed Description

│ │ │

This is an internal header file, included by other library headers. Do not attempt to use it directly. Instead, include <iterator>.

│ │ │ │ │ │ -

Definition in file streambuf_iterator.h.

│ │ │ -
│ │ │ +

Definition in file concept_check.h.

│ │ │ +

Macro Definition Documentation

│ │ │ + │ │ │ +

◆ __glibcxx_class_requires

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
#define __glibcxx_class_requires( _a,
 _b 
)
│ │ │ +
│ │ │ + │ │ │ +

Definition at line 49 of file concept_check.h.

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ +

◆ __glibcxx_class_requires2

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
#define __glibcxx_class_requires2( _a,
 _b,
 _c 
)
│ │ │ +
│ │ │ + │ │ │ +

Definition at line 50 of file concept_check.h.

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ +

◆ __glibcxx_class_requires3

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
#define __glibcxx_class_requires3( _a,
 _b,
 _c,
 _d 
)
│ │ │ +
│ │ │ + │ │ │ +

Definition at line 51 of file concept_check.h.

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ +

◆ __glibcxx_class_requires4

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
#define __glibcxx_class_requires4( _a,
 _b,
 _c,
 _d,
 _e 
)
│ │ │ +
│ │ │ + │ │ │ +

Definition at line 52 of file concept_check.h.

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ +

◆ __glibcxx_function_requires

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
#define __glibcxx_function_requires( ...)
│ │ │ +
│ │ │ + │ │ │ +

Definition at line 48 of file concept_check.h.

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ +
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,62 +1,52 @@ │ │ │ │ libstdc++ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -streambuf_iterator.h File Reference │ │ │ │ +_M_a_c_r_o_s │ │ │ │ +concept_check.h File Reference │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -CCllaasssseess │ │ │ │ -class   _s_t_d_:_:_i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_<_ ___C_h_a_r_T_,_ ___T_r_a_i_t_s_ _> │ │ │ │ +MMaaccrrooss │ │ │ │ +#define  _____g_l_i_b_c_x_x___c_l_a_s_s___r_e_q_u_i_r_e_s(_a, _b) │ │ │ │   │ │ │ │ -class   _s_t_d_:_:_o_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_<_ ___C_h_a_r_T_,_ ___T_r_a_i_t_s_ _> │ │ │ │ +#define  _____g_l_i_b_c_x_x___c_l_a_s_s___r_e_q_u_i_r_e_s_2(_a, _b, _c) │ │ │ │   │ │ │ │ -NNaammeessppaacceess │ │ │ │ -namespace   _s_t_d │ │ │ │ +#define  _____g_l_i_b_c_x_x___c_l_a_s_s___r_e_q_u_i_r_e_s_3(_a, _b, _c, _d) │ │ │ │   │ │ │ │ -FFuunnccttiioonnss │ │ │ │ -template │ │ │ │ - __gnu_cxx::__enable_if< __is_char< _s_t_d_:_:_____c_o_p_y___m_o_v_e___a_2 (_CharT *__first, │ │ │ │ -_CharT >::__value, _o_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r< _CharT *__last, _o_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r< │ │ │ │ - _CharT > >::__type  _CharT > __result) │ │ │ │ +#define  _____g_l_i_b_c_x_x___c_l_a_s_s___r_e_q_u_i_r_e_s_4(_a, _b, _c, _d, _e) │ │ │ │   │ │ │ │ -template │ │ │ │ - __gnu_cxx::__enable_if< __is_char< _s_t_d_:_:_____c_o_p_y___m_o_v_e___a_2 (const _CharT │ │ │ │ -_CharT >::__value, _o_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r< *__first, const _CharT *__last, │ │ │ │ - _CharT > >::__type  _o_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r< _CharT > __result) │ │ │ │ -  │ │ │ │ -template │ │ │ │ - __gnu_cxx::__enable_if< __is_char< _s_t_d_:_:_____c_o_p_y___m_o_v_e___a_2 │ │ │ │ - _CharT >::__value, _CharT * >::__type  (_i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r< _CharT > __first, │ │ │ │ - _i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r< _CharT > __last, │ │ │ │ - _CharT *__result) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _CharT , _t_y_p_e_n_a_m_e _Size > │ │ │ │ - __gnu_cxx::__enable_if< __is_char< _s_t_d_:_:_____c_o_p_y___n___a (_i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r< │ │ │ │ - _CharT >::__value, _CharT * >::__type  _CharT > _____i_t, _Size __n, _CharT │ │ │ │ - *__result, bool _____s_t_r_i_c_t) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _CharT , _t_y_p_e_n_a_m_e ___D_i_s_t_a_n_c_e > │ │ │ │ - __gnu_cxx::__enable_if< __is_char< _s_t_d_:_:_a_d_v_a_n_c_e (_i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r< │ │ │ │ - _CharT >::__value, _v_o_i_d >::__type  _CharT > &__i, ___D_i_s_t_a_n_c_e __n) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _CharT > │ │ │ │ - __gnu_cxx::__enable_if< __is_char< _s_t_d_:_:_c_o_p_y (_i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r< _CharT │ │ │ │ -_CharT >::__value, _o_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r< > __first, _i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r< _CharT │ │ │ │ - _CharT > >::__type  > __last, _o_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r< _CharT > │ │ │ │ - __result) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _CharT > │ │ │ │ - __gnu_cxx::__enable_if< __is_char< _s_t_d_:_:_f_i_n_d (_i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r< _CharT │ │ │ │ -_CharT >::__value, _i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r< > __first, _i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r< _CharT │ │ │ │ - _CharT > >::__type  > __last, const _CharT &__val) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _CharT , _t_y_p_e_n_a_m_e _Traits > │ │ │ │ - bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_=_= (const │ │ │ │ - _i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r< _CharT, _Traits > │ │ │ │ - &__a, const _i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r< │ │ │ │ - _CharT, _Traits > &__b) │ │ │ │ +#define  _____g_l_i_b_c_x_x___f_u_n_c_t_i_o_n___r_e_q_u_i_r_e_s(...) │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ This is an internal header file, included by other library headers. Do not │ │ │ │ attempt to use it directly. Instead, include . │ │ │ │ -Definition in file _s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_._h. │ │ │ │ +Definition in file _c_o_n_c_e_p_t___c_h_e_c_k_._h. │ │ │ │ +********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ +********** _?◆_? ____gglliibbccxxxx__ccllaassss__rreeqquuiirreess ********** │ │ │ │ +#define __glibcxx_class_requires (   _a, │ │ │ │ +   _b  │ │ │ │ + ) │ │ │ │ +Definition at line _4_9 of file _c_o_n_c_e_p_t___c_h_e_c_k_._h. │ │ │ │ +********** _?◆_? ____gglliibbccxxxx__ccllaassss__rreeqquuiirreess22 ********** │ │ │ │ +#define __glibcxx_class_requires2 (   _a, │ │ │ │ +   _b, │ │ │ │ +   _c  │ │ │ │ + ) │ │ │ │ +Definition at line _5_0 of file _c_o_n_c_e_p_t___c_h_e_c_k_._h. │ │ │ │ +********** _?◆_? ____gglliibbccxxxx__ccllaassss__rreeqquuiirreess33 ********** │ │ │ │ +#define __glibcxx_class_requires3 (   _a, │ │ │ │ +   _b, │ │ │ │ +   _c, │ │ │ │ +   _d  │ │ │ │ + ) │ │ │ │ +Definition at line _5_1 of file _c_o_n_c_e_p_t___c_h_e_c_k_._h. │ │ │ │ +********** _?◆_? ____gglliibbccxxxx__ccllaassss__rreeqquuiirreess44 ********** │ │ │ │ +#define __glibcxx_class_requires4 (   _a, │ │ │ │ +   _b, │ │ │ │ +   _c, │ │ │ │ +   _d, │ │ │ │ +   _e  │ │ │ │ + ) │ │ │ │ +Definition at line _5_2 of file _c_o_n_c_e_p_t___c_h_e_c_k_._h. │ │ │ │ +********** _?◆_? ____gglliibbccxxxx__ffuunnccttiioonn__rreeqquuiirreess ********** │ │ │ │ +#define __glibcxx_function_requires (   ...... ) │ │ │ │ +Definition at line _4_8 of file _c_o_n_c_e_p_t___c_h_e_c_k_._h. │ │ │ │ * _b_i_t_s │ │ │ │ - * _s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_._h │ │ │ │ + * _c_o_n_c_e_p_t___c_h_e_c_k_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-12-base/libstdc++/user/a00401_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: streambuf_iterator.h Source File │ │ │ +libstdc++: concept_check.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -45,20 +45,20 @@ │ │ │ │ │ │
│ │ │
│ │ │ -
streambuf_iterator.h
│ │ │ +
concept_check.h
│ │ │
│ │ │
│ │ │ -Go to the documentation of this file.
1// Streambuf iterators
│ │ │ +Go to the documentation of this file.
1// Concept-checking control -*- C++ -*-
│ │ │
2
│ │ │ -
3// Copyright (C) 1997-2022 Free Software Foundation, Inc.
│ │ │ +
3// Copyright (C) 2001-2022 Free Software Foundation, Inc.
│ │ │
4//
│ │ │
5// This file is part of the GNU ISO C++ Library. This library is free
│ │ │
6// software; you can redistribute it and/or modify it under the
│ │ │
7// terms of the GNU General Public License as published by the
│ │ │
8// Free Software Foundation; either version 3, or (at your option)
│ │ │
9// any later version.
│ │ │
10
│ │ │ @@ -72,580 +72,77 @@ │ │ │
18// 3.1, as published by the Free Software Foundation.
│ │ │
19
│ │ │
20// You should have received a copy of the GNU General Public License and
│ │ │
21// a copy of the GCC Runtime Library Exception along with this program;
│ │ │
22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
│ │ │
23// <http://www.gnu.org/licenses/>.
│ │ │
24
│ │ │ -
25/** @file bits/streambuf_iterator.h
│ │ │ +
25/** @file bits/concept_check.h
│ │ │
26 * This is an internal header file, included by other library headers.
│ │ │
27 * Do not attempt to use it directly. @headername{iterator}
│ │ │
28 */
│ │ │
29
│ │ │ -
30#ifndef _STREAMBUF_ITERATOR_H
│ │ │ -
31#define _STREAMBUF_ITERATOR_H 1
│ │ │ +
30#ifndef _CONCEPT_CHECK_H
│ │ │ +
31#define _CONCEPT_CHECK_H 1
│ │ │
32
│ │ │
33#pragma GCC system_header
│ │ │
34
│ │ │ -
35#include <streambuf>
│ │ │ -
36#include <debug/debug.h>
│ │ │ -
37
│ │ │ -
38namespace std _GLIBCXX_VISIBILITY(default)
│ │ │ -
39{
│ │ │ -
40_GLIBCXX_BEGIN_NAMESPACE_VERSION
│ │ │ -
41
│ │ │ -
42 /**
│ │ │ -
43 * @addtogroup iterators
│ │ │ -
44 * @{
│ │ │ -
45 */
│ │ │ -
46
│ │ │ -
47// Ignore warnings about std::iterator.
│ │ │ -
48#pragma GCC diagnostic push
│ │ │ -
49#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
│ │ │ -
50 // 24.5.3 Template class istreambuf_iterator
│ │ │ -
51 /// Provides input iterator semantics for streambufs.
│ │ │ -
52 template<typename _CharT, typename _Traits>
│ │ │ -
│ │ │ - │ │ │ -
54 : public iterator<input_iterator_tag, _CharT, typename _Traits::off_type,
│ │ │ -
55 _CharT*, _CharT>
│ │ │ -
56 {
│ │ │ -
57 public:
│ │ │ -
58 // Types:
│ │ │ -
59 ///@{
│ │ │ -
60 /// Public typedefs
│ │ │ -
61#if __cplusplus < 201103L
│ │ │ -
62 typedef _CharT& reference; // Changed to _CharT by LWG 445
│ │ │ -
63#elif __cplusplus > 201703L
│ │ │ -
64 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ -
65 // 3188. istreambuf_iterator::pointer should not be unspecified
│ │ │ -
66 using pointer = void;
│ │ │ -
67#endif
│ │ │ -
68
│ │ │ -
69 typedef _CharT char_type;
│ │ │ -
70 typedef _Traits traits_type;
│ │ │ -
71 typedef typename _Traits::int_type int_type;
│ │ │ - │ │ │ - │ │ │ -
74 ///@}
│ │ │ -
75
│ │ │ -
76 template<typename _CharT2>
│ │ │ -
77 friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value,
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
81
│ │ │ -
82 template<bool _IsMove, typename _CharT2>
│ │ │ -
83 friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value,
│ │ │ -
84 _CharT2*>::__type
│ │ │ -
85 __copy_move_a2(istreambuf_iterator<_CharT2>,
│ │ │ - │ │ │ -
87
│ │ │ -
88 template<typename _CharT2, typename _Size>
│ │ │ -
89 friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value,
│ │ │ -
90 _CharT2*>::__type
│ │ │ -
91 __copy_n_a(istreambuf_iterator<_CharT2>, _Size, _CharT2*, bool);
│ │ │ -
92
│ │ │ -
93 template<typename _CharT2>
│ │ │ -
94 friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value,
│ │ │ - │ │ │ - │ │ │ -
97 const _CharT2&);
│ │ │ -
98
│ │ │ -
99 template<typename _CharT2, typename _Distance>
│ │ │ -
100 friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value,
│ │ │ -
101 void>::__type
│ │ │ - │ │ │ -
103
│ │ │ -
104 private:
│ │ │ -
105 // 24.5.3 istreambuf_iterator
│ │ │ -
106 // p 1
│ │ │ -
107 // If the end of stream is reached (streambuf_type::sgetc()
│ │ │ -
108 // returns traits_type::eof()), the iterator becomes equal to
│ │ │ -
109 // the "end of stream" iterator value.
│ │ │ -
110 // NB: This implementation assumes the "end of stream" value
│ │ │ -
111 // is EOF, or -1.
│ │ │ -
112 mutable streambuf_type* _M_sbuf;
│ │ │ -
113 int_type _M_c;
│ │ │ -
114
│ │ │ -
115 public:
│ │ │ -
116 /// Construct end of input stream iterator.
│ │ │ -
│ │ │ - │ │ │ -
118 : _M_sbuf(0), _M_c(traits_type::eof()) { }
│ │ │ -
│ │ │ -
119
│ │ │ -
120#if __cplusplus > 201703L && __cpp_lib_concepts
│ │ │ -
121 constexpr istreambuf_iterator(default_sentinel_t) noexcept
│ │ │ -
122 : istreambuf_iterator() { }
│ │ │ -
123#endif
│ │ │ -
124
│ │ │ -
125#if __cplusplus >= 201103L
│ │ │ -
126 istreambuf_iterator(const istreambuf_iterator&) noexcept = default;
│ │ │ -
127
│ │ │ -
128 ~istreambuf_iterator() = default;
│ │ │ -
129#endif
│ │ │ -
130
│ │ │ -
131 /// Construct start of input stream iterator.
│ │ │ -
│ │ │ - │ │ │ -
133 : _M_sbuf(__s.rdbuf()), _M_c(traits_type::eof()) { }
│ │ │ -
│ │ │ -
134
│ │ │ -
135 /// Construct start of streambuf iterator.
│ │ │ -
│ │ │ - │ │ │ -
137 : _M_sbuf(__s), _M_c(traits_type::eof()) { }
│ │ │ -
│ │ │ -
138
│ │ │ -
139#if __cplusplus >= 201103L
│ │ │ - │ │ │ -
141 operator=(const istreambuf_iterator&) noexcept = default;
│ │ │ -
142#endif
│ │ │ -
143
│ │ │ -
144 /// Return the current character pointed to by iterator. This returns
│ │ │ -
145 /// streambuf.sgetc(). It cannot be assigned. NB: The result of
│ │ │ -
146 /// operator*() on an end of stream is undefined.
│ │ │ -
147 _GLIBCXX_NODISCARD
│ │ │ - │ │ │ -
│ │ │ -
149 operator*() const
│ │ │ -
150 {
│ │ │ -
151 int_type __c = _M_get();
│ │ │ -
152
│ │ │ -
153#ifdef _GLIBCXX_DEBUG_PEDANTIC
│ │ │ -
154 // Dereferencing a past-the-end istreambuf_iterator is a
│ │ │ -
155 // libstdc++ extension
│ │ │ -
156 __glibcxx_requires_cond(!_S_is_eof(__c),
│ │ │ -
157 _M_message(__gnu_debug::__msg_deref_istreambuf)
│ │ │ -
158 ._M_iterator(*this));
│ │ │ -
159#endif
│ │ │ -
160 return traits_type::to_char_type(__c);
│ │ │ -
161 }
│ │ │ -
│ │ │ -
162
│ │ │ -
163 /// Advance the iterator. Calls streambuf.sbumpc().
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
166 {
│ │ │ -
167 __glibcxx_requires_cond(_M_sbuf &&
│ │ │ -
168 (!_S_is_eof(_M_c) || !_S_is_eof(_M_sbuf->sgetc())),
│ │ │ -
169 _M_message(__gnu_debug::__msg_inc_istreambuf)
│ │ │ -
170 ._M_iterator(*this));
│ │ │ -
171
│ │ │ -
172 _M_sbuf->sbumpc();
│ │ │ -
173 _M_c = traits_type::eof();
│ │ │ -
174 return *this;
│ │ │ -
175 }
│ │ │ -
│ │ │ -
176
│ │ │ -
177 /// Advance the iterator. Calls streambuf.sbumpc().
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
180 {
│ │ │ -
181 __glibcxx_requires_cond(_M_sbuf &&
│ │ │ -
182 (!_S_is_eof(_M_c) || !_S_is_eof(_M_sbuf->sgetc())),
│ │ │ -
183 _M_message(__gnu_debug::__msg_inc_istreambuf)
│ │ │ -
184 ._M_iterator(*this));
│ │ │ -
185
│ │ │ - │ │ │ -
187 __old._M_c = _M_sbuf->sbumpc();
│ │ │ -
188 _M_c = traits_type::eof();
│ │ │ -
189 return __old;
│ │ │ -
190 }
│ │ │ -
│ │ │ -
191
│ │ │ -
192 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ -
193 // 110 istreambuf_iterator::equal not const
│ │ │ -
194 // NB: there is also number 111 (NAD) relevant to this function.
│ │ │ -
195 /// Return true both iterators are end or both are not end.
│ │ │ -
196 _GLIBCXX_NODISCARD
│ │ │ -
197 bool
│ │ │ -
│ │ │ -
198 equal(const istreambuf_iterator& __b) const
│ │ │ -
199 { return _M_at_eof() == __b._M_at_eof(); }
│ │ │ -
│ │ │ -
200
│ │ │ -
201 private:
│ │ │ - │ │ │ -
203 _M_get() const
│ │ │ -
204 {
│ │ │ -
205 int_type __ret = _M_c;
│ │ │ -
206 if (_M_sbuf && _S_is_eof(__ret) && _S_is_eof(__ret = _M_sbuf->sgetc()))
│ │ │ -
207 _M_sbuf = 0;
│ │ │ -
208 return __ret;
│ │ │ -
209 }
│ │ │ -
210
│ │ │ -
211 bool
│ │ │ -
212 _M_at_eof() const
│ │ │ -
213 { return _S_is_eof(_M_get()); }
│ │ │ -
214
│ │ │ -
215 static bool
│ │ │ -
216 _S_is_eof(int_type __c)
│ │ │ -
217 {
│ │ │ -
218 const int_type __eof = traits_type::eof();
│ │ │ -
219 return traits_type::eq_int_type(__c, __eof);
│ │ │ -
220 }
│ │ │ -
221
│ │ │ -
222#if __cplusplus > 201703L && __cpp_lib_concepts
│ │ │ -
223 [[nodiscard]]
│ │ │ -
224 friend bool
│ │ │ -
225 operator==(const istreambuf_iterator& __i, default_sentinel_t __s)
│ │ │ -
226 { return __i._M_at_eof(); }
│ │ │ -
227#endif
│ │ │ -
228 };
│ │ │ -
│ │ │ -
229
│ │ │ -
230 template<typename _CharT, typename _Traits>
│ │ │ -
231 _GLIBCXX_NODISCARD
│ │ │ -
232 inline bool
│ │ │ -
233 operator==(const istreambuf_iterator<_CharT, _Traits>& __a,
│ │ │ -
234 const istreambuf_iterator<_CharT, _Traits>& __b)
│ │ │ -
235 { return __a.equal(__b); }
│ │ │ -
236
│ │ │ -
237#if __cpp_impl_three_way_comparison < 201907L
│ │ │ -
238 template<typename _CharT, typename _Traits>
│ │ │ -
239 _GLIBCXX_NODISCARD
│ │ │ -
240 inline bool
│ │ │ -
241 operator!=(const istreambuf_iterator<_CharT, _Traits>& __a,
│ │ │ -
242 const istreambuf_iterator<_CharT, _Traits>& __b)
│ │ │ -
243 { return !__a.equal(__b); }
│ │ │ -
244#endif
│ │ │ -
245
│ │ │ -
246 /// Provides output iterator semantics for streambufs.
│ │ │ -
247 template<typename _CharT, typename _Traits>
│ │ │ -
│ │ │ - │ │ │ -
249 : public iterator<output_iterator_tag, void, void, void, void>
│ │ │ -
250 {
│ │ │ -
251 public:
│ │ │ -
252 // Types:
│ │ │ -
253 ///@{
│ │ │ -
254 /// Public typedefs
│ │ │ -
255#if __cplusplus > 201703L
│ │ │ -
256 using difference_type = ptrdiff_t;
│ │ │ -
257#endif
│ │ │ -
258 typedef _CharT char_type;
│ │ │ -
259 typedef _Traits traits_type;
│ │ │ - │ │ │ - │ │ │ -
262 ///@}
│ │ │ -
263
│ │ │ -
264 template<typename _CharT2>
│ │ │ -
265 friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value,
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
269
│ │ │ -
270 private:
│ │ │ -
271 streambuf_type* _M_sbuf;
│ │ │ -
272 bool _M_failed;
│ │ │ -
273
│ │ │ -
274 public:
│ │ │ -
275
│ │ │ -
276#if __cplusplus > 201703L
│ │ │ -
277 constexpr
│ │ │ -
278 ostreambuf_iterator() noexcept
│ │ │ -
279 : _M_sbuf(nullptr), _M_failed(true) { }
│ │ │ -
280#endif
│ │ │ -
281
│ │ │ -
282 /// Construct output iterator from ostream.
│ │ │ -
│ │ │ - │ │ │ -
284 : _M_sbuf(__s.rdbuf()), _M_failed(!_M_sbuf) { }
│ │ │ -
│ │ │ -
285
│ │ │ -
286 /// Construct output iterator from streambuf.
│ │ │ -
│ │ │ - │ │ │ -
288 : _M_sbuf(__s), _M_failed(!_M_sbuf) { }
│ │ │ -
│ │ │ -
289
│ │ │ -
290 /// Write character to streambuf. Calls streambuf.sputc().
│ │ │ - │ │ │ -
│ │ │ -
292 operator=(_CharT __c)
│ │ │ -
293 {
│ │ │ -
294 if (!_M_failed &&
│ │ │ -
295 _Traits::eq_int_type(_M_sbuf->sputc(__c), _Traits::eof()))
│ │ │ -
296 _M_failed = true;
│ │ │ -
297 return *this;
│ │ │ -
298 }
│ │ │ -
│ │ │ -
299
│ │ │ -
300 /// Return *this.
│ │ │ -
301 _GLIBCXX_NODISCARD
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
304 { return *this; }
│ │ │ -
│ │ │ -
305
│ │ │ -
306 /// Return *this.
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
309 { return *this; }
│ │ │ -
│ │ │ -
310
│ │ │ -
311 /// Return *this.
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
314 { return *this; }
│ │ │ -
│ │ │ -
315
│ │ │ -
316 /// Return true if previous operator=() failed.
│ │ │ -
317 _GLIBCXX_NODISCARD
│ │ │ -
318 bool
│ │ │ -
│ │ │ - │ │ │ -
320 { return _M_failed; }
│ │ │ -
│ │ │ -
321
│ │ │ - │ │ │ -
323 _M_put(const _CharT* __ws, streamsize __len)
│ │ │ -
324 {
│ │ │ -
325 if (__builtin_expect(!_M_failed, true)
│ │ │ -
326 && __builtin_expect(this->_M_sbuf->sputn(__ws, __len) != __len,
│ │ │ -
327 false))
│ │ │ -
328 _M_failed = true;
│ │ │ -
329 return *this;
│ │ │ -
330 }
│ │ │ -
331 };
│ │ │ -
│ │ │ -
332#pragma GCC diagnostic pop
│ │ │ -
333
│ │ │ -
334 // Overloads for streambuf iterators.
│ │ │ -
335 template<typename _CharT>
│ │ │ -
336 typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
│ │ │ -
337 ostreambuf_iterator<_CharT> >::__type
│ │ │ -
338 copy(istreambuf_iterator<_CharT> __first,
│ │ │ -
339 istreambuf_iterator<_CharT> __last,
│ │ │ -
340 ostreambuf_iterator<_CharT> __result)
│ │ │ -
341 {
│ │ │ -
342 if (__first._M_sbuf && !__last._M_sbuf && !__result._M_failed)
│ │ │ -
343 {
│ │ │ -
344 bool __ineof;
│ │ │ -
345 __copy_streambufs_eof(__first._M_sbuf, __result._M_sbuf, __ineof);
│ │ │ -
346 if (!__ineof)
│ │ │ -
347 __result._M_failed = true;
│ │ │ -
348 }
│ │ │ -
349 return __result;
│ │ │ -
350 }
│ │ │ -
351
│ │ │ -
352 template<bool _IsMove, typename _CharT>
│ │ │ -
353 typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
│ │ │ -
354 ostreambuf_iterator<_CharT> >::__type
│ │ │ -
355 __copy_move_a2(_CharT* __first, _CharT* __last,
│ │ │ -
356 ostreambuf_iterator<_CharT> __result)
│ │ │ -
357 {
│ │ │ -
358 const streamsize __num = __last - __first;
│ │ │ -
359 if (__num > 0)
│ │ │ -
360 __result._M_put(__first, __num);
│ │ │ -
361 return __result;
│ │ │ -
362 }
│ │ │ -
363
│ │ │ -
364 template<bool _IsMove, typename _CharT>
│ │ │ -
365 typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
│ │ │ -
366 ostreambuf_iterator<_CharT> >::__type
│ │ │ -
367 __copy_move_a2(const _CharT* __first, const _CharT* __last,
│ │ │ -
368 ostreambuf_iterator<_CharT> __result)
│ │ │ -
369 {
│ │ │ -
370 const streamsize __num = __last - __first;
│ │ │ -
371 if (__num > 0)
│ │ │ -
372 __result._M_put(__first, __num);
│ │ │ -
373 return __result;
│ │ │ -
374 }
│ │ │ -
375
│ │ │ -
376 template<bool _IsMove, typename _CharT>
│ │ │ -
377 typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
│ │ │ -
378 _CharT*>::__type
│ │ │ -
379 __copy_move_a2(istreambuf_iterator<_CharT> __first,
│ │ │ -
380 istreambuf_iterator<_CharT> __last, _CharT* __result)
│ │ │ -
381 {
│ │ │ -
382 typedef istreambuf_iterator<_CharT> __is_iterator_type;
│ │ │ -
383 typedef typename __is_iterator_type::traits_type traits_type;
│ │ │ -
384 typedef typename __is_iterator_type::streambuf_type streambuf_type;
│ │ │ -
385 typedef typename traits_type::int_type int_type;
│ │ │ -
386
│ │ │ -
387 if (__first._M_sbuf && !__last._M_sbuf)
│ │ │ -
388 {
│ │ │ -
389 streambuf_type* __sb = __first._M_sbuf;
│ │ │ -
390 int_type __c = __sb->sgetc();
│ │ │ -
391 while (!traits_type::eq_int_type(__c, traits_type::eof()))
│ │ │ -
392 {
│ │ │ -
393 const streamsize __n = __sb->egptr() - __sb->gptr();
│ │ │ -
394 if (__n > 1)
│ │ │ -
395 {
│ │ │ -
396 traits_type::copy(__result, __sb->gptr(), __n);
│ │ │ -
397 __sb->__safe_gbump(__n);
│ │ │ -
398 __result += __n;
│ │ │ -
399 __c = __sb->underflow();
│ │ │ -
400 }
│ │ │ -
401 else
│ │ │ -
402 {
│ │ │ -
403 *__result++ = traits_type::to_char_type(__c);
│ │ │ -
404 __c = __sb->snextc();
│ │ │ -
405 }
│ │ │ -
406 }
│ │ │ -
407 }
│ │ │ -
408 return __result;
│ │ │ -
409 }
│ │ │ -
410
│ │ │ -
411 template<typename _CharT, typename _Size>
│ │ │ -
412 typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
│ │ │ -
413 _CharT*>::__type
│ │ │ -
414 __copy_n_a(istreambuf_iterator<_CharT> __it, _Size __n, _CharT* __result,
│ │ │ -
415 bool __strict __attribute__((__unused__)))
│ │ │ -
416 {
│ │ │ -
417 if (__n == 0)
│ │ │ -
418 return __result;
│ │ │ -
419
│ │ │ -
420 __glibcxx_requires_cond(__it._M_sbuf,
│ │ │ -
421 _M_message(__gnu_debug::__msg_inc_istreambuf)
│ │ │ -
422 ._M_iterator(__it));
│ │ │ -
423 _CharT* __beg = __result;
│ │ │ -
424 __result += __it._M_sbuf->sgetn(__beg, __n);
│ │ │ -
425 __glibcxx_requires_cond(!__strict || __result - __beg == __n,
│ │ │ -
426 _M_message(__gnu_debug::__msg_inc_istreambuf)
│ │ │ -
427 ._M_iterator(__it));
│ │ │ -
428 return __result;
│ │ │ -
429 }
│ │ │ -
430
│ │ │ -
431 template<typename _CharT>
│ │ │ -
432 typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
│ │ │ -
433 istreambuf_iterator<_CharT> >::__type
│ │ │ -
434 find(istreambuf_iterator<_CharT> __first,
│ │ │ -
435 istreambuf_iterator<_CharT> __last, const _CharT& __val)
│ │ │ -
436 {
│ │ │ -
437 typedef istreambuf_iterator<_CharT> __is_iterator_type;
│ │ │ -
438 typedef typename __is_iterator_type::traits_type traits_type;
│ │ │ -
439 typedef typename __is_iterator_type::streambuf_type streambuf_type;
│ │ │ -
440 typedef typename traits_type::int_type int_type;
│ │ │ -
441 const int_type __eof = traits_type::eof();
│ │ │ -
442
│ │ │ -
443 if (__first._M_sbuf && !__last._M_sbuf)
│ │ │ -
444 {
│ │ │ -
445 const int_type __ival = traits_type::to_int_type(__val);
│ │ │ -
446 streambuf_type* __sb = __first._M_sbuf;
│ │ │ -
447 int_type __c = __sb->sgetc();
│ │ │ -
448 while (!traits_type::eq_int_type(__c, __eof)
│ │ │ -
449 && !traits_type::eq_int_type(__c, __ival))
│ │ │ -
450 {
│ │ │ -
451 streamsize __n = __sb->egptr() - __sb->gptr();
│ │ │ -
452 if (__n > 1)
│ │ │ -
453 {
│ │ │ -
454 const _CharT* __p = traits_type::find(__sb->gptr(),
│ │ │ -
455 __n, __val);
│ │ │ -
456 if (__p)
│ │ │ -
457 __n = __p - __sb->gptr();
│ │ │ -
458 __sb->__safe_gbump(__n);
│ │ │ -
459 __c = __sb->sgetc();
│ │ │ -
460 }
│ │ │ -
461 else
│ │ │ -
462 __c = __sb->snextc();
│ │ │ -
463 }
│ │ │ -
464
│ │ │ -
465 __first._M_c = __eof;
│ │ │ -
466 }
│ │ │ -
467
│ │ │ -
468 return __first;
│ │ │ -
469 }
│ │ │ -
470
│ │ │ -
471 template<typename _CharT, typename _Distance>
│ │ │ -
472 typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
│ │ │ -
473 void>::__type
│ │ │ -
474 advance(istreambuf_iterator<_CharT>& __i, _Distance __n)
│ │ │ -
475 {
│ │ │ -
476 if (__n == 0)
│ │ │ -
477 return;
│ │ │ -
478
│ │ │ -
479 __glibcxx_assert(__n > 0);
│ │ │ -
480 __glibcxx_requires_cond(!__i._M_at_eof(),
│ │ │ -
481 _M_message(__gnu_debug::__msg_inc_istreambuf)
│ │ │ -
482 ._M_iterator(__i));
│ │ │ -
483
│ │ │ -
484 typedef istreambuf_iterator<_CharT> __is_iterator_type;
│ │ │ -
485 typedef typename __is_iterator_type::traits_type traits_type;
│ │ │ -
486 typedef typename __is_iterator_type::streambuf_type streambuf_type;
│ │ │ -
487 typedef typename traits_type::int_type int_type;
│ │ │ -
488 const int_type __eof = traits_type::eof();
│ │ │ -
489
│ │ │ -
490 streambuf_type* __sb = __i._M_sbuf;
│ │ │ -
491 while (__n > 0)
│ │ │ -
492 {
│ │ │ -
493 streamsize __size = __sb->egptr() - __sb->gptr();
│ │ │ -
494 if (__size > __n)
│ │ │ -
495 {
│ │ │ -
496 __sb->__safe_gbump(__n);
│ │ │ -
497 break;
│ │ │ -
498 }
│ │ │ -
499
│ │ │ -
500 __sb->__safe_gbump(__size);
│ │ │ -
501 __n -= __size;
│ │ │ -
502 if (traits_type::eq_int_type(__sb->underflow(), __eof))
│ │ │ -
503 {
│ │ │ -
504 __glibcxx_requires_cond(__n == 0,
│ │ │ -
505 _M_message(__gnu_debug::__msg_inc_istreambuf)
│ │ │ -
506 ._M_iterator(__i));
│ │ │ -
507 break;
│ │ │ -
508 }
│ │ │ -
509 }
│ │ │ -
510
│ │ │ -
511 __i._M_c = __eof;
│ │ │ -
512 }
│ │ │ -
513
│ │ │ -
514/// @} group iterators
│ │ │ -
515
│ │ │ -
516_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ -
517} // namespace
│ │ │ -
518
│ │ │ -
519#endif
│ │ │ - │ │ │ - │ │ │ -
ISO C++ entities toplevel namespace is std.
│ │ │ -
ptrdiff_t streamsize
Integral type for I/O operation counts and buffer sizes.
Definition postypes.h:68
│ │ │ -
constexpr void advance(_InputIterator &__i, _Distance __n)
A generalization of pointer arithmetic.
│ │ │ -
Provides input iterator semantics for streambufs.
│ │ │ -
basic_streambuf< _CharT, _Traits > streambuf_type
Public typedefs.
│ │ │ -
constexpr istreambuf_iterator() noexcept
Construct end of input stream iterator.
│ │ │ -
basic_istream< _CharT, _Traits > istream_type
Public typedefs.
│ │ │ -
char_type operator*() const
Return the current character pointed to by iterator. This returns streambuf.sgetc()....
│ │ │ -
bool equal(const istreambuf_iterator &__b) const
Return true both iterators are end or both are not end.
│ │ │ -
istreambuf_iterator & operator++()
Advance the iterator. Calls streambuf.sbumpc().
│ │ │ -
_Traits traits_type
Public typedefs.
│ │ │ -
istreambuf_iterator(istream_type &__s) noexcept
Construct start of input stream iterator.
│ │ │ -
istreambuf_iterator operator++(int)
Advance the iterator. Calls streambuf.sbumpc().
│ │ │ -
_CharT char_type
Public typedefs.
│ │ │ -
istreambuf_iterator(streambuf_type *__s) noexcept
Construct start of streambuf iterator.
│ │ │ -
_Traits::int_type int_type
Public typedefs.
│ │ │ -
Provides output iterator semantics for streambufs.
│ │ │ -
ostreambuf_iterator & operator++(int)
Return *this.
│ │ │ -
ptrdiff_t difference_type
Public typedefs.
│ │ │ -
ostreambuf_iterator & operator++()
Return *this.
│ │ │ -
bool failed() const noexcept
Return true if previous operator=() failed.
│ │ │ -
_Traits traits_type
Public typedefs.
│ │ │ -
ostreambuf_iterator & operator=(_CharT __c)
Write character to streambuf. Calls streambuf.sputc().
│ │ │ -
ostreambuf_iterator & operator*()
Return *this.
│ │ │ -
basic_ostream< _CharT, _Traits > ostream_type
Public typedefs.
│ │ │ -
basic_streambuf< _CharT, _Traits > streambuf_type
Public typedefs.
│ │ │ -
ostreambuf_iterator(ostream_type &__s) noexcept
Construct output iterator from ostream.
│ │ │ -
_CharT char_type
Public typedefs.
│ │ │ -
ostreambuf_iterator(streambuf_type *__s) noexcept
Construct output iterator from streambuf.
│ │ │ - │ │ │ -
Common iterator class.
│ │ │ - │ │ │ - │ │ │ +
35#include <bits/c++config.h>
│ │ │ +
36
│ │ │ +
37// All places in libstdc++-v3 where these are used, or /might/ be used, or
│ │ │ +
38// don't need to be used, or perhaps /should/ be used, are commented with
│ │ │ +
39// "concept requirements" (and maybe some more text). So grep like crazy
│ │ │ +
40// if you're looking for additional places to use these.
│ │ │ +
41
│ │ │ +
42// Concept-checking code is off by default unless users turn it on via
│ │ │ +
43// configure options or editing c++config.h.
│ │ │ +
44// It is not supported for freestanding implementations.
│ │ │ +
45
│ │ │ +
46#if !defined(_GLIBCXX_CONCEPT_CHECKS) || !_GLIBCXX_HOSTED
│ │ │ +
47
│ │ │ +
48#define __glibcxx_function_requires(...)
│ │ │ +
49#define __glibcxx_class_requires(_a,_b)
│ │ │ +
50#define __glibcxx_class_requires2(_a,_b,_c)
│ │ │ +
51#define __glibcxx_class_requires3(_a,_b,_c,_d)
│ │ │ +
52#define __glibcxx_class_requires4(_a,_b,_c,_d,_e)
│ │ │ +
53
│ │ │ +
54#else // the checks are on
│ │ │ +
55
│ │ │ + │ │ │ +
57
│ │ │ +
58// Note that the obvious and elegant approach of
│ │ │ +
59//
│ │ │ +
60//#define glibcxx_function_requires(C) debug::function_requires< debug::C >()
│ │ │ +
61//
│ │ │ +
62// won't work due to concept templates with more than one parameter, e.g.,
│ │ │ +
63// BinaryPredicateConcept. The preprocessor tries to split things up on
│ │ │ +
64// the commas in the template argument list. We can't use an inner pair of
│ │ │ +
65// parenthesis to hide the commas, because "debug::(Temp<Foo,Bar>)" isn't
│ │ │ +
66// a valid instantiation pattern. Thus, we steal a feature from C99.
│ │ │ +
67
│ │ │ +
68#define __glibcxx_function_requires(...) \
│ │ │ +
69 __gnu_cxx::__function_requires< __gnu_cxx::__VA_ARGS__ >();
│ │ │ +
70#define __glibcxx_class_requires(_a,_C) \
│ │ │ +
71 _GLIBCXX_CLASS_REQUIRES(_a, __gnu_cxx, _C);
│ │ │ +
72#define __glibcxx_class_requires2(_a,_b,_C) \
│ │ │ +
73 _GLIBCXX_CLASS_REQUIRES2(_a, _b, __gnu_cxx, _C);
│ │ │ +
74#define __glibcxx_class_requires3(_a,_b,_c,_C) \
│ │ │ +
75 _GLIBCXX_CLASS_REQUIRES3(_a, _b, _c, __gnu_cxx, _C);
│ │ │ +
76#define __glibcxx_class_requires4(_a,_b,_c,_d,_C) \
│ │ │ +
77 _GLIBCXX_CLASS_REQUIRES4(_a, _b, _c, _d, __gnu_cxx, _C);
│ │ │ +
78
│ │ │ +
79#endif // enable/disable
│ │ │ +
80
│ │ │ +
81#endif // _GLIBCXX_CONCEPT_CHECK
│ │ │ + │ │ │ + │ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,13 +1,13 @@ │ │ │ │ libstdc++ │ │ │ │ -streambuf_iterator.h │ │ │ │ +concept_check.h │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -1// Streambuf iterators │ │ │ │ +1// Concept-checking control -*- C++ -*- │ │ │ │ 2 │ │ │ │ -3// Copyright (C) 1997-2022 Free Software Foundation, Inc. │ │ │ │ +3// Copyright (C) 2001-2022 Free Software Foundation, Inc. │ │ │ │ 4// │ │ │ │ 5// This file is part of the GNU ISO C++ Library. This library is free │ │ │ │ 6// software; you can redistribute it and/or modify it under the │ │ │ │ 7// terms of the GNU General Public License as published by the │ │ │ │ 8// Free Software Foundation; either version 3, or (at your option) │ │ │ │ 9// any later version. │ │ │ │ 10 │ │ │ │ @@ -21,632 +21,69 @@ │ │ │ │ 18// 3.1, as published by the Free Software Foundation. │ │ │ │ 19 │ │ │ │ 20// You should have received a copy of the GNU General Public License and │ │ │ │ 21// a copy of the GCC Runtime Library Exception along with this program; │ │ │ │ 22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see │ │ │ │ 23// . │ │ │ │ 24 │ │ │ │ -25/** @file bits/streambuf_iterator.h │ │ │ │ +25/** @file bits/concept_check.h │ │ │ │ 26 * This is an internal header file, included by other library headers. │ │ │ │ 27 * Do not attempt to use it directly. @headername{iterator} │ │ │ │ 28 */ │ │ │ │ 29 │ │ │ │ -30#ifndef _STREAMBUF_ITERATOR_H │ │ │ │ -31#define _STREAMBUF_ITERATOR_H 1 │ │ │ │ +30#ifndef _CONCEPT_CHECK_H │ │ │ │ +31#define _CONCEPT_CHECK_H 1 │ │ │ │ 32 │ │ │ │ 33#pragma GCC system_header │ │ │ │ 34 │ │ │ │ -35#include <_s_t_r_e_a_m_b_u_f> │ │ │ │ -36#include <_d_e_b_u_g_/_d_e_b_u_g_._h> │ │ │ │ -37 │ │ │ │ -38namespace _s_t_d _GLIBCXX_VISIBILITY(default) │ │ │ │ -39{ │ │ │ │ -40_GLIBCXX_BEGIN_NAMESPACE_VERSION │ │ │ │ +35#include <_b_i_t_s_/_c_+_+_c_o_n_f_i_g_._h> │ │ │ │ +36 │ │ │ │ +37// All places in libstdc++-v3 where these are used, or /might/ be used, or │ │ │ │ +38// don't need to be used, or perhaps /should/ be used, are commented with │ │ │ │ +39// "concept requirements" (and maybe some more text). So grep like crazy │ │ │ │ +40// if you're looking for additional places to use these. │ │ │ │ 41 │ │ │ │ -42 /** │ │ │ │ -43 * @addtogroup iterators │ │ │ │ -44 * @{ │ │ │ │ -45 */ │ │ │ │ -46 │ │ │ │ -47// Ignore warnings about std::iterator. │ │ │ │ -48#pragma GCC diagnostic push │ │ │ │ -49#pragma GCC diagnostic ignored "-Wdeprecated-declarations" │ │ │ │ -50 // 24.5.3 Template class istreambuf_iterator │ │ │ │ -51 /// Provides input iterator semantics for streambufs. │ │ │ │ -52 template │ │ │ │ -_5_3 class _i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r │ │ │ │ -54 : public _i_t_e_r_a_t_o_r │ │ │ │ -56 { │ │ │ │ -57 public: │ │ │ │ -58 // Types: │ │ │ │ -59 ///@{ │ │ │ │ -60 /// Public typedefs │ │ │ │ -61#if __cplusplus < 201103L │ │ │ │ -62 typedef _CharT& _r_e_f_e_r_e_n_c_e; // Changed to _CharT by LWG 445 │ │ │ │ -63#elif __cplusplus > 201703L │ │ │ │ -64 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ -65 // 3188. istreambuf_iterator::pointer should not be unspecified │ │ │ │ -_6_6 using _p_o_i_n_t_e_r = _v_o_i_d; │ │ │ │ -67#endif │ │ │ │ -68 │ │ │ │ -_6_9 typedef _CharT _c_h_a_r___t_y_p_e; │ │ │ │ -_7_0 typedef _Traits _t_r_a_i_t_s___t_y_p_e; │ │ │ │ -_7_1 typedef typename _Traits::int_type _i_n_t___t_y_p_e; │ │ │ │ -_7_2 typedef _b_a_s_i_c___s_t_r_e_a_m_b_u_f_<___C_h_a_r_T_,_ ___T_r_a_i_t_s_> _s_t_r_e_a_m_b_u_f___t_y_p_e; │ │ │ │ -_7_3 typedef _b_a_s_i_c___i_s_t_r_e_a_m_<___C_h_a_r_T_,_ ___T_r_a_i_t_s_> _i_s_t_r_e_a_m___t_y_p_e; │ │ │ │ -74 ///@} │ │ │ │ -75 │ │ │ │ -76 template │ │ │ │ -77 friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, │ │ │ │ -78 _o_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_<___C_h_a_r_T_2_> >::__type │ │ │ │ -79 copy(_i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_<___C_h_a_r_T_2_>, _i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_<___C_h_a_r_T_2_>, │ │ │ │ -80 _o_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_<___C_h_a_r_T_2_>); │ │ │ │ -81 │ │ │ │ -82 template │ │ │ │ -83 friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, │ │ │ │ -84 ___C_h_a_r_T_2*>::__type │ │ │ │ -85 __copy_move_a2(_i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_<___C_h_a_r_T_2_>, │ │ │ │ -86 _i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_<___C_h_a_r_T_2_>, ___C_h_a_r_T_2*); │ │ │ │ -87 │ │ │ │ -88 template │ │ │ │ -89 friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, │ │ │ │ -90 ___C_h_a_r_T_2*>::__type │ │ │ │ -91 __copy_n_a(_i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_<___C_h_a_r_T_2_>, _Size, ___C_h_a_r_T_2*, bool); │ │ │ │ -92 │ │ │ │ -93 template │ │ │ │ -94 friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, │ │ │ │ -95 _i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_<___C_h_a_r_T_2_> >::__type │ │ │ │ -96 find(_i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_<___C_h_a_r_T_2_>, _i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_<___C_h_a_r_T_2_>, │ │ │ │ -97 const ___C_h_a_r_T_2&); │ │ │ │ -98 │ │ │ │ -99 template │ │ │ │ -100 friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, │ │ │ │ -101 void>::__type │ │ │ │ -102 advance(_i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_<___C_h_a_r_T_2_>&, ___D_i_s_t_a_n_c_e); │ │ │ │ -103 │ │ │ │ -104 private: │ │ │ │ -105 // 24.5.3 istreambuf_iterator │ │ │ │ -106 // p 1 │ │ │ │ -107 // If the end of stream is reached (streambuf_type::sgetc() │ │ │ │ -108 // returns traits_type::eof()), the iterator becomes equal to │ │ │ │ -109 // the "end of stream" iterator value. │ │ │ │ -110 // NB: This implementation assumes the "end of stream" value │ │ │ │ -111 // is EOF, or -1. │ │ │ │ -112 mutable _s_t_r_e_a_m_b_u_f___t_y_p_e* _M_sbuf; │ │ │ │ -113 _i_n_t___t_y_p_e _M_c; │ │ │ │ -114 │ │ │ │ -115 public: │ │ │ │ -116 /// Construct end of input stream iterator. │ │ │ │ -_1_1_7 ___G_L_I_B_C_X_X___C_O_N_S_T_E_X_P_R _i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r() ___G_L_I_B_C_X_X___U_S_E___N_O_E_X_C_E_P_T │ │ │ │ -118 : _M_sbuf(0), _M_c(_t_r_a_i_t_s___t_y_p_e::eof()) { } │ │ │ │ -119 │ │ │ │ -120#if __cplusplus > 201703L && __cpp_lib_concepts │ │ │ │ -121 constexpr _i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r(_d_e_f_a_u_l_t___s_e_n_t_i_n_e_l___t) noexcept │ │ │ │ -122 : _i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r() { } │ │ │ │ -123#endif │ │ │ │ -124 │ │ │ │ -125#if __cplusplus >= 201103L │ │ │ │ -126 _i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r(const _i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r&) noexcept = default; │ │ │ │ -127 │ │ │ │ -128 ~istreambuf_iterator() = default; │ │ │ │ -129#endif │ │ │ │ -130 │ │ │ │ -131 /// Construct start of input stream iterator. │ │ │ │ -_1_3_2 _i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r(_i_s_t_r_e_a_m___t_y_p_e& _____s) ___G_L_I_B_C_X_X___U_S_E___N_O_E_X_C_E_P_T │ │ │ │ -133 : _M_sbuf(_____s.rdbuf()), _M_c(traits_type::eof()) { } │ │ │ │ -134 │ │ │ │ -135 /// Construct start of streambuf iterator. │ │ │ │ -_1_3_6 _i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r(_s_t_r_e_a_m_b_u_f___t_y_p_e* _____s) ___G_L_I_B_C_X_X___U_S_E___N_O_E_X_C_E_P_T │ │ │ │ -137 : _M_sbuf(_____s), _M_c(traits_type::eof()) { } │ │ │ │ -138 │ │ │ │ -139#if __cplusplus >= 201103L │ │ │ │ -140 _i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r& │ │ │ │ -141 operator=(const _i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r&) noexcept = default; │ │ │ │ -142#endif │ │ │ │ -143 │ │ │ │ -144 /// Return the current character pointed to by iterator. This returns │ │ │ │ -145 /// streambuf.sgetc(). It cannot be assigned. NB: The result of │ │ │ │ -146 /// operator*() on an end of stream is undefined. │ │ │ │ -147 _GLIBCXX_NODISCARD │ │ │ │ -148 _c_h_a_r___t_y_p_e │ │ │ │ -_1_4_9 _o_p_e_r_a_t_o_r_*() const │ │ │ │ -150 { │ │ │ │ -151 _i_n_t___t_y_p_e __c = _M_get(); │ │ │ │ -152 │ │ │ │ -153#ifdef _GLIBCXX_DEBUG_PEDANTIC │ │ │ │ -154 // Dereferencing a past-the-end istreambuf_iterator is a │ │ │ │ -155 // libstdc++ extension │ │ │ │ -156 __glibcxx_requires_cond(!_S_is_eof(__c), │ │ │ │ -157 _M_message(__gnu_debug::__msg_deref_istreambuf) │ │ │ │ -158 ._M_iterator(*this)); │ │ │ │ -159#endif │ │ │ │ -160 return traits_type::to_char_type(__c); │ │ │ │ -161 } │ │ │ │ -162 │ │ │ │ -163 /// Advance the iterator. Calls streambuf.sbumpc(). │ │ │ │ -164 _i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r& │ │ │ │ -_1_6_5 _o_p_e_r_a_t_o_r_+_+() │ │ │ │ -166 { │ │ │ │ -167 __glibcxx_requires_cond(_M_sbuf && │ │ │ │ -168 (!_S_is_eof(_M_c) || !_S_is_eof(_M_sbuf->sgetc())), │ │ │ │ -169 _M_message(__gnu_debug::__msg_inc_istreambuf) │ │ │ │ -170 ._M_iterator(*this)); │ │ │ │ -171 │ │ │ │ -172 _M_sbuf->sbumpc(); │ │ │ │ -173 _M_c = traits_type::eof(); │ │ │ │ -174 return *this; │ │ │ │ -175 } │ │ │ │ -176 │ │ │ │ -177 /// Advance the iterator. Calls streambuf.sbumpc(). │ │ │ │ -178 _i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r │ │ │ │ -_1_7_9 _o_p_e_r_a_t_o_r_+_+(int) │ │ │ │ -180 { │ │ │ │ -181 __glibcxx_requires_cond(_M_sbuf && │ │ │ │ -182 (!_S_is_eof(_M_c) || !_S_is_eof(_M_sbuf->sgetc())), │ │ │ │ -183 _M_message(__gnu_debug::__msg_inc_istreambuf) │ │ │ │ -184 ._M_iterator(*this)); │ │ │ │ -185 │ │ │ │ -186 _i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r _____o_l_d = *this; │ │ │ │ -187 _____o_l_d._M_c = _M_sbuf->sbumpc(); │ │ │ │ -188 _M_c = traits_type::eof(); │ │ │ │ -189 return _____o_l_d; │ │ │ │ -190 } │ │ │ │ -191 │ │ │ │ -192 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ -193 // 110 istreambuf_iterator::equal not const │ │ │ │ -194 // NB: there is also number 111 (NAD) relevant to this function. │ │ │ │ -195 /// Return true both iterators are end or both are not end. │ │ │ │ -196 _GLIBCXX_NODISCARD │ │ │ │ -197 bool │ │ │ │ -_1_9_8 _e_q_u_a_l(const _i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r& __b) const │ │ │ │ -199 { return _M_at_eof() == __b._M_at_eof(); } │ │ │ │ -200 │ │ │ │ -201 private: │ │ │ │ -202 _i_n_t___t_y_p_e │ │ │ │ -203 _M_get() const │ │ │ │ -204 { │ │ │ │ -205 _i_n_t___t_y_p_e _____r_e_t = _M_c; │ │ │ │ -206 if (_M_sbuf && _S_is_eof(_____r_e_t) && _S_is_eof(_____r_e_t = _M_sbuf->sgetc())) │ │ │ │ -207 _M_sbuf = 0; │ │ │ │ -208 return _____r_e_t; │ │ │ │ -209 } │ │ │ │ -210 │ │ │ │ -211 bool │ │ │ │ -212 _M_at_eof() const │ │ │ │ -213 { return _S_is_eof(_M_get()); } │ │ │ │ -214 │ │ │ │ -215 static bool │ │ │ │ -216 _S_is_eof(_i_n_t___t_y_p_e __c) │ │ │ │ -217 { │ │ │ │ -218 const _i_n_t___t_y_p_e __eof = traits_type::eof(); │ │ │ │ -219 return traits_type::eq_int_type(__c, __eof); │ │ │ │ -220 } │ │ │ │ -221 │ │ │ │ -222#if __cplusplus > 201703L && __cpp_lib_concepts │ │ │ │ -223 [[nodiscard]] │ │ │ │ -224 friend bool │ │ │ │ -225 operator==(const _i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r& __i, default_sentinel_t __s) │ │ │ │ -226 { return __i._M_at_eof(); } │ │ │ │ -227#endif │ │ │ │ -228 }; │ │ │ │ -229 │ │ │ │ -230 template │ │ │ │ -231 _GLIBCXX_NODISCARD │ │ │ │ -232 inline bool │ │ │ │ -233 operator==(const istreambuf_iterator<_CharT, _Traits>& __a, │ │ │ │ -234 const istreambuf_iterator<_CharT, _Traits>& __b) │ │ │ │ -235 { return __a.equal(__b); } │ │ │ │ -236 │ │ │ │ -237#if __cpp_impl_three_way_comparison < 201907L │ │ │ │ -238 template │ │ │ │ -239 _GLIBCXX_NODISCARD │ │ │ │ -240 inline bool │ │ │ │ -241 operator!=(const istreambuf_iterator<_CharT, _Traits>& __a, │ │ │ │ -242 const istreambuf_iterator<_CharT, _Traits>& __b) │ │ │ │ -243 { return !__a.equal(__b); } │ │ │ │ -244#endif │ │ │ │ -245 │ │ │ │ -246 /// Provides output iterator semantics for streambufs. │ │ │ │ -247 template │ │ │ │ -_2_4_8 class _o_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r │ │ │ │ -249 : public _i_t_e_r_a_t_o_r │ │ │ │ -250 { │ │ │ │ -251 public: │ │ │ │ -252 // Types: │ │ │ │ -253 ///@{ │ │ │ │ -254 /// Public typedefs │ │ │ │ -255#if __cplusplus > 201703L │ │ │ │ -_2_5_6 using _d_i_f_f_e_r_e_n_c_e___t_y_p_e = ptrdiff_t; │ │ │ │ -257#endif │ │ │ │ -_2_5_8 typedef _CharT _c_h_a_r___t_y_p_e; │ │ │ │ -_2_5_9 typedef _Traits _t_r_a_i_t_s___t_y_p_e; │ │ │ │ -_2_6_0 typedef _b_a_s_i_c___s_t_r_e_a_m_b_u_f_<___C_h_a_r_T_,_ ___T_r_a_i_t_s_> _s_t_r_e_a_m_b_u_f___t_y_p_e; │ │ │ │ -_2_6_1 typedef _b_a_s_i_c___o_s_t_r_e_a_m_<___C_h_a_r_T_,_ ___T_r_a_i_t_s_> _o_s_t_r_e_a_m___t_y_p_e; │ │ │ │ -262 ///@} │ │ │ │ -263 │ │ │ │ -264 template │ │ │ │ -265 friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, │ │ │ │ -266 _o_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_<___C_h_a_r_T_2_> >::__type │ │ │ │ -267 copy(_i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_<___C_h_a_r_T_2_>, _i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_<___C_h_a_r_T_2_>, │ │ │ │ -268 _o_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_<___C_h_a_r_T_2_>); │ │ │ │ -269 │ │ │ │ -270 private: │ │ │ │ -271 _s_t_r_e_a_m_b_u_f___t_y_p_e* _M_sbuf; │ │ │ │ -272 bool _M_failed; │ │ │ │ -273 │ │ │ │ -274 public: │ │ │ │ -275 │ │ │ │ -276#if __cplusplus > 201703L │ │ │ │ -277 constexpr │ │ │ │ -278 _o_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r() noexcept │ │ │ │ -279 : _M_sbuf(nullptr), _M_failed(_t_r_u_e) { } │ │ │ │ -280#endif │ │ │ │ -281 │ │ │ │ -282 /// Construct output iterator from ostream. │ │ │ │ -_2_8_3 _o_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r(_o_s_t_r_e_a_m___t_y_p_e& _____s) ___G_L_I_B_C_X_X___U_S_E___N_O_E_X_C_E_P_T │ │ │ │ -284 : _M_sbuf(_____s.rdbuf()), _M_failed(!_M_sbuf) { } │ │ │ │ -285 │ │ │ │ -286 /// Construct output iterator from streambuf. │ │ │ │ -_2_8_7 _o_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r(_s_t_r_e_a_m_b_u_f___t_y_p_e* _____s) ___G_L_I_B_C_X_X___U_S_E___N_O_E_X_C_E_P_T │ │ │ │ -288 : _M_sbuf(_____s), _M_failed(!_M_sbuf) { } │ │ │ │ -289 │ │ │ │ -290 /// Write character to streambuf. Calls streambuf.sputc(). │ │ │ │ -291 _o_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r& │ │ │ │ -_2_9_2 _o_p_e_r_a_t_o_r_=(_CharT __c) │ │ │ │ -293 { │ │ │ │ -294 if (!_M_failed && │ │ │ │ -295 _Traits::eq_int_type(_M_sbuf->sputc(__c), _Traits::eof())) │ │ │ │ -296 _M_failed = true; │ │ │ │ -297 return *this; │ │ │ │ -298 } │ │ │ │ -299 │ │ │ │ -300 /// Return *this. │ │ │ │ -301 _GLIBCXX_NODISCARD │ │ │ │ -302 _o_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r& │ │ │ │ -_3_0_3 _o_p_e_r_a_t_o_r_*() │ │ │ │ -304 { return *this; } │ │ │ │ -305 │ │ │ │ -306 /// Return *this. │ │ │ │ -307 _o_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r& │ │ │ │ -_3_0_8 _o_p_e_r_a_t_o_r_+_+(int) │ │ │ │ -309 { return *this; } │ │ │ │ -310 │ │ │ │ -311 /// Return *this. │ │ │ │ -312 _o_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r& │ │ │ │ -_3_1_3 _o_p_e_r_a_t_o_r_+_+() │ │ │ │ -314 { return *this; } │ │ │ │ -315 │ │ │ │ -316 /// Return true if previous operator=() failed. │ │ │ │ -317 _GLIBCXX_NODISCARD │ │ │ │ -318 bool │ │ │ │ -_3_1_9 _f_a_i_l_e_d() const ___G_L_I_B_C_X_X___U_S_E___N_O_E_X_C_E_P_T │ │ │ │ -320 { return _M_failed; } │ │ │ │ -321 │ │ │ │ -322 _o_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r& │ │ │ │ -323 _M_put(const _CharT* _____w_s, _s_t_r_e_a_m_s_i_z_e _____l_e_n) │ │ │ │ -324 { │ │ │ │ -325 if (_____b_u_i_l_t_i_n___e_x_p_e_c_t(!_M_failed, true) │ │ │ │ -326 && _____b_u_i_l_t_i_n___e_x_p_e_c_t(this->_M_sbuf->sputn(_____w_s, _____l_e_n) != _____l_e_n, │ │ │ │ -327 false)) │ │ │ │ -328 _M_failed = true; │ │ │ │ -329 return *this; │ │ │ │ -330 } │ │ │ │ -331 }; │ │ │ │ -332#pragma GCC diagnostic pop │ │ │ │ -333 │ │ │ │ -334 // Overloads for streambuf iterators. │ │ │ │ -335 template │ │ │ │ -336 typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, │ │ │ │ -337 ostreambuf_iterator<_CharT> >::__type │ │ │ │ -338 copy(istreambuf_iterator<_CharT> __first, │ │ │ │ -339 istreambuf_iterator<_CharT> __last, │ │ │ │ -340 ostreambuf_iterator<_CharT> __result) │ │ │ │ -341 { │ │ │ │ -342 if (__first._M_sbuf && !__last._M_sbuf && !__result._M_failed) │ │ │ │ -343 { │ │ │ │ -344 bool __ineof; │ │ │ │ -345 __copy_streambufs_eof(__first._M_sbuf, __result._M_sbuf, __ineof); │ │ │ │ -346 if (!__ineof) │ │ │ │ -347 __result._M_failed = true; │ │ │ │ -348 } │ │ │ │ -349 return __result; │ │ │ │ -350 } │ │ │ │ -351 │ │ │ │ -352 template │ │ │ │ -353 typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, │ │ │ │ -354 ostreambuf_iterator<_CharT> >::__type │ │ │ │ -355 __copy_move_a2(_CharT* __first, _CharT* __last, │ │ │ │ -356 ostreambuf_iterator<_CharT> __result) │ │ │ │ -357 { │ │ │ │ -358 const _s_t_r_e_a_m_s_i_z_e __num = __last - __first; │ │ │ │ -359 if (__num > 0) │ │ │ │ -360 __result._M_put(__first, __num); │ │ │ │ -361 return __result; │ │ │ │ -362 } │ │ │ │ -363 │ │ │ │ -364 template │ │ │ │ -365 typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, │ │ │ │ -366 ostreambuf_iterator<_CharT> >::__type │ │ │ │ -367 __copy_move_a2(const _CharT* __first, const _CharT* __last, │ │ │ │ -368 ostreambuf_iterator<_CharT> __result) │ │ │ │ -369 { │ │ │ │ -370 const _s_t_r_e_a_m_s_i_z_e __num = __last - __first; │ │ │ │ -371 if (__num > 0) │ │ │ │ -372 __result._M_put(__first, __num); │ │ │ │ -373 return __result; │ │ │ │ -374 } │ │ │ │ -375 │ │ │ │ -376 template │ │ │ │ -377 typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, │ │ │ │ -378 _CharT*>::__type │ │ │ │ -379 __copy_move_a2(istreambuf_iterator<_CharT> __first, │ │ │ │ -380 istreambuf_iterator<_CharT> __last, _CharT* __result) │ │ │ │ -381 { │ │ │ │ -382 typedef istreambuf_iterator<_CharT> __is_iterator_type; │ │ │ │ -383 typedef typename __is_iterator_type::traits_type traits_type; │ │ │ │ -384 typedef typename __is_iterator_type::streambuf_type streambuf_type; │ │ │ │ -385 typedef typename traits_type::int_type int_type; │ │ │ │ -386 │ │ │ │ -387 if (__first._M_sbuf && !__last._M_sbuf) │ │ │ │ -388 { │ │ │ │ -389 streambuf_type* __sb = __first._M_sbuf; │ │ │ │ -390 int_type __c = __sb->sgetc(); │ │ │ │ -391 while (!traits_type::eq_int_type(__c, traits_type::eof())) │ │ │ │ -392 { │ │ │ │ -393 const _s_t_r_e_a_m_s_i_z_e __n = __sb->egptr() - __sb->gptr(); │ │ │ │ -394 if (__n > 1) │ │ │ │ -395 { │ │ │ │ -396 traits_type::copy(__result, __sb->gptr(), __n); │ │ │ │ -397 __sb->__safe_gbump(__n); │ │ │ │ -398 __result += __n; │ │ │ │ -399 __c = __sb->underflow(); │ │ │ │ -400 } │ │ │ │ -401 else │ │ │ │ -402 { │ │ │ │ -403 *__result++ = traits_type::to_char_type(__c); │ │ │ │ -404 __c = __sb->snextc(); │ │ │ │ -405 } │ │ │ │ -406 } │ │ │ │ -407 } │ │ │ │ -408 return __result; │ │ │ │ -409 } │ │ │ │ -410 │ │ │ │ -411 template │ │ │ │ -412 typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, │ │ │ │ -413 _CharT*>::__type │ │ │ │ -414 __copy_n_a(istreambuf_iterator<_CharT> __it, _Size __n, _CharT* __result, │ │ │ │ -415 bool __strict __attribute__((__unused__))) │ │ │ │ -416 { │ │ │ │ -417 if (__n == 0) │ │ │ │ -418 return __result; │ │ │ │ -419 │ │ │ │ -420 __glibcxx_requires_cond(__it._M_sbuf, │ │ │ │ -421 _M_message(__gnu_debug::__msg_inc_istreambuf) │ │ │ │ -422 ._M_iterator(__it)); │ │ │ │ -423 _CharT* __beg = __result; │ │ │ │ -424 __result += __it._M_sbuf->sgetn(__beg, __n); │ │ │ │ -425 __glibcxx_requires_cond(!__strict || __result - __beg == __n, │ │ │ │ -426 _M_message(__gnu_debug::__msg_inc_istreambuf) │ │ │ │ -427 ._M_iterator(__it)); │ │ │ │ -428 return __result; │ │ │ │ -429 } │ │ │ │ -430 │ │ │ │ -431 template │ │ │ │ -432 typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, │ │ │ │ -433 istreambuf_iterator<_CharT> >::__type │ │ │ │ -434 find(istreambuf_iterator<_CharT> __first, │ │ │ │ -435 istreambuf_iterator<_CharT> __last, const _CharT& __val) │ │ │ │ -436 { │ │ │ │ -437 typedef istreambuf_iterator<_CharT> __is_iterator_type; │ │ │ │ -438 typedef typename __is_iterator_type::traits_type traits_type; │ │ │ │ -439 typedef typename __is_iterator_type::streambuf_type streambuf_type; │ │ │ │ -440 typedef typename traits_type::int_type int_type; │ │ │ │ -441 const int_type __eof = traits_type::eof(); │ │ │ │ -442 │ │ │ │ -443 if (__first._M_sbuf && !__last._M_sbuf) │ │ │ │ -444 { │ │ │ │ -445 const int_type __ival = traits_type::to_int_type(__val); │ │ │ │ -446 streambuf_type* __sb = __first._M_sbuf; │ │ │ │ -447 int_type __c = __sb->sgetc(); │ │ │ │ -448 while (!traits_type::eq_int_type(__c, __eof) │ │ │ │ -449 && !traits_type::eq_int_type(__c, __ival)) │ │ │ │ -450 { │ │ │ │ -451 _s_t_r_e_a_m_s_i_z_e __n = __sb->egptr() - __sb->gptr(); │ │ │ │ -452 if (__n > 1) │ │ │ │ -453 { │ │ │ │ -454 const _CharT* __p = traits_type::find(__sb->gptr(), │ │ │ │ -455 __n, __val); │ │ │ │ -456 if (__p) │ │ │ │ -457 __n = __p - __sb->gptr(); │ │ │ │ -458 __sb->__safe_gbump(__n); │ │ │ │ -459 __c = __sb->sgetc(); │ │ │ │ -460 } │ │ │ │ -461 else │ │ │ │ -462 __c = __sb->snextc(); │ │ │ │ -463 } │ │ │ │ -464 │ │ │ │ -465 __first._M_c = __eof; │ │ │ │ -466 } │ │ │ │ -467 │ │ │ │ -468 return __first; │ │ │ │ -469 } │ │ │ │ -470 │ │ │ │ -471 template │ │ │ │ -472 typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, │ │ │ │ -473 void>::__type │ │ │ │ -474 _a_d_v_a_n_c_e(istreambuf_iterator<_CharT>& __i, _Distance __n) │ │ │ │ -475 { │ │ │ │ -476 if (__n == 0) │ │ │ │ -477 return; │ │ │ │ -478 │ │ │ │ -479 __glibcxx_assert(__n > 0); │ │ │ │ -480 __glibcxx_requires_cond(!__i._M_at_eof(), │ │ │ │ -481 _M_message(__gnu_debug::__msg_inc_istreambuf) │ │ │ │ -482 ._M_iterator(__i)); │ │ │ │ -483 │ │ │ │ -484 typedef istreambuf_iterator<_CharT> __is_iterator_type; │ │ │ │ -485 typedef typename __is_iterator_type::traits_type traits_type; │ │ │ │ -486 typedef typename __is_iterator_type::streambuf_type streambuf_type; │ │ │ │ -487 typedef typename traits_type::int_type int_type; │ │ │ │ -488 const int_type __eof = traits_type::eof(); │ │ │ │ -489 │ │ │ │ -490 streambuf_type* __sb = __i._M_sbuf; │ │ │ │ -491 while (__n > 0) │ │ │ │ -492 { │ │ │ │ -493 _s_t_r_e_a_m_s_i_z_e __size = __sb->egptr() - __sb->gptr(); │ │ │ │ -494 if (__size > __n) │ │ │ │ -495 { │ │ │ │ -496 __sb->__safe_gbump(__n); │ │ │ │ -497 break; │ │ │ │ -498 } │ │ │ │ -499 │ │ │ │ -500 __sb->__safe_gbump(__size); │ │ │ │ -501 __n -= __size; │ │ │ │ -502 if (traits_type::eq_int_type(__sb->underflow(), __eof)) │ │ │ │ -503 { │ │ │ │ -504 __glibcxx_requires_cond(__n == 0, │ │ │ │ -505 _M_message(__gnu_debug::__msg_inc_istreambuf) │ │ │ │ -506 ._M_iterator(__i)); │ │ │ │ -507 break; │ │ │ │ -508 } │ │ │ │ -509 } │ │ │ │ -510 │ │ │ │ -511 __i._M_c = __eof; │ │ │ │ -512 } │ │ │ │ -513 │ │ │ │ -514/// @} group iterators │ │ │ │ -515 │ │ │ │ -516_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ -517} // namespace │ │ │ │ -518 │ │ │ │ -519#endif │ │ │ │ -_s_t_r_e_a_m_b_u_f │ │ │ │ -_d_e_b_u_g_._h │ │ │ │ -_s_t_d │ │ │ │ -ISO C++ entities toplevel namespace is std. │ │ │ │ -_s_t_d_:_:_s_t_r_e_a_m_s_i_z_e │ │ │ │ -ptrdiff_t streamsize │ │ │ │ -Integral type for I/O operation counts and buffer sizes. │ │ │ │ -DDeeffiinniittiioonn _p_o_s_t_y_p_e_s_._h_:_6_8 │ │ │ │ -_s_t_d_:_:_a_d_v_a_n_c_e │ │ │ │ -constexpr void advance(_InputIterator &__i, _Distance __n) │ │ │ │ -A generalization of pointer arithmetic. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___i_t_e_r_a_t_o_r___b_a_s_e___f_u_n_c_s_._h_:_2_1_8 │ │ │ │ -_s_t_d_:_:_i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r │ │ │ │ -Provides input iterator semantics for streambufs. │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_._h_:_5_6 │ │ │ │ -_s_t_d_:_:_i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_:_:_s_t_r_e_a_m_b_u_f___t_y_p_e │ │ │ │ -basic_streambuf< _CharT, _Traits > streambuf_type │ │ │ │ -Public typedefs. │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_._h_:_7_2 │ │ │ │ -_s_t_d_:_:_i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_:_:_i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r │ │ │ │ -constexpr istreambuf_iterator() noexcept │ │ │ │ -Construct end of input stream iterator. │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_._h_:_1_1_7 │ │ │ │ -_s_t_d_:_:_i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_:_:_i_s_t_r_e_a_m___t_y_p_e │ │ │ │ -basic_istream< _CharT, _Traits > istream_type │ │ │ │ -Public typedefs. │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_._h_:_7_3 │ │ │ │ -_s_t_d_:_:_i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_:_:_o_p_e_r_a_t_o_r_* │ │ │ │ -char_type operator*() const │ │ │ │ -Return the current character pointed to by iterator. This returns │ │ │ │ -streambuf.sgetc().... │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_._h_:_1_4_9 │ │ │ │ -_s_t_d_:_:_i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_:_:_e_q_u_a_l │ │ │ │ -bool equal(const istreambuf_iterator &__b) const │ │ │ │ -Return true both iterators are end or both are not end. │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_._h_:_1_9_8 │ │ │ │ -_s_t_d_:_:_i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_:_:_o_p_e_r_a_t_o_r_+_+ │ │ │ │ -istreambuf_iterator & operator++() │ │ │ │ -Advance the iterator. Calls streambuf.sbumpc(). │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_._h_:_1_6_5 │ │ │ │ -_s_t_d_:_:_i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_:_:_t_r_a_i_t_s___t_y_p_e │ │ │ │ -_Traits traits_type │ │ │ │ -Public typedefs. │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_._h_:_7_0 │ │ │ │ -_s_t_d_:_:_i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_:_:_i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r │ │ │ │ -istreambuf_iterator(istream_type &__s) noexcept │ │ │ │ -Construct start of input stream iterator. │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_._h_:_1_3_2 │ │ │ │ -_s_t_d_:_:_i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_:_:_o_p_e_r_a_t_o_r_+_+ │ │ │ │ -istreambuf_iterator operator++(int) │ │ │ │ -Advance the iterator. Calls streambuf.sbumpc(). │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_._h_:_1_7_9 │ │ │ │ -_s_t_d_:_:_i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_:_:_c_h_a_r___t_y_p_e │ │ │ │ -_CharT char_type │ │ │ │ -Public typedefs. │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_._h_:_6_9 │ │ │ │ -_s_t_d_:_:_i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_:_:_i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r │ │ │ │ -istreambuf_iterator(streambuf_type *__s) noexcept │ │ │ │ -Construct start of streambuf iterator. │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_._h_:_1_3_6 │ │ │ │ -_s_t_d_:_:_i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_:_:_i_n_t___t_y_p_e │ │ │ │ -_Traits::int_type int_type │ │ │ │ -Public typedefs. │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_._h_:_7_1 │ │ │ │ -_s_t_d_:_:_o_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r │ │ │ │ -Provides output iterator semantics for streambufs. │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_._h_:_2_5_0 │ │ │ │ -_s_t_d_:_:_o_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_:_:_o_p_e_r_a_t_o_r_+_+ │ │ │ │ -ostreambuf_iterator & operator++(int) │ │ │ │ -Return *this. │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_._h_:_3_0_8 │ │ │ │ -_s_t_d_:_:_o_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_:_:_d_i_f_f_e_r_e_n_c_e___t_y_p_e │ │ │ │ -ptrdiff_t difference_type │ │ │ │ -Public typedefs. │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_._h_:_2_5_6 │ │ │ │ -_s_t_d_:_:_o_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_:_:_o_p_e_r_a_t_o_r_+_+ │ │ │ │ -ostreambuf_iterator & operator++() │ │ │ │ -Return *this. │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_._h_:_3_1_3 │ │ │ │ -_s_t_d_:_:_o_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_:_:_f_a_i_l_e_d │ │ │ │ -bool failed() const noexcept │ │ │ │ -Return true if previous operator=() failed. │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_._h_:_3_1_9 │ │ │ │ -_s_t_d_:_:_o_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_:_:_t_r_a_i_t_s___t_y_p_e │ │ │ │ -_Traits traits_type │ │ │ │ -Public typedefs. │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_._h_:_2_5_9 │ │ │ │ -_s_t_d_:_:_o_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ -ostreambuf_iterator & operator=(_CharT __c) │ │ │ │ -Write character to streambuf. Calls streambuf.sputc(). │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_._h_:_2_9_2 │ │ │ │ -_s_t_d_:_:_o_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_:_:_o_p_e_r_a_t_o_r_* │ │ │ │ -ostreambuf_iterator & operator*() │ │ │ │ -Return *this. │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_._h_:_3_0_3 │ │ │ │ -_s_t_d_:_:_o_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_:_:_o_s_t_r_e_a_m___t_y_p_e │ │ │ │ -basic_ostream< _CharT, _Traits > ostream_type │ │ │ │ -Public typedefs. │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_._h_:_2_6_1 │ │ │ │ -_s_t_d_:_:_o_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_:_:_s_t_r_e_a_m_b_u_f___t_y_p_e │ │ │ │ -basic_streambuf< _CharT, _Traits > streambuf_type │ │ │ │ -Public typedefs. │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_._h_:_2_6_0 │ │ │ │ -_s_t_d_:_:_o_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_:_:_o_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r │ │ │ │ -ostreambuf_iterator(ostream_type &__s) noexcept │ │ │ │ -Construct output iterator from ostream. │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_._h_:_2_8_3 │ │ │ │ -_s_t_d_:_:_o_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_:_:_c_h_a_r___t_y_p_e │ │ │ │ -_CharT char_type │ │ │ │ -Public typedefs. │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_._h_:_2_5_8 │ │ │ │ -_s_t_d_:_:_o_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_:_:_o_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r │ │ │ │ -ostreambuf_iterator(streambuf_type *__s) noexcept │ │ │ │ -Construct output iterator from streambuf. │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_._h_:_2_8_7 │ │ │ │ -_s_t_d_:_:_d_e_f_a_u_l_t___s_e_n_t_i_n_e_l___t │ │ │ │ -DDeeffiinniittiioonn _i_t_e_r_a_t_o_r___c_o_n_c_e_p_t_s_._h_:_5_8 │ │ │ │ -_s_t_d_:_:_i_t_e_r_a_t_o_r │ │ │ │ -Common iterator class. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___i_t_e_r_a_t_o_r___b_a_s_e___t_y_p_e_s_._h_:_1_2_8 │ │ │ │ -_s_t_d_:_:_i_t_e_r_a_t_o_r_<_ _i_n_p_u_t___i_t_e_r_a_t_o_r___t_a_g_,_ ___C_h_a_r_T_,_ ___T_r_a_i_t_s_:_:_o_f_f___t_y_p_e_,_ ___C_h_a_r_T_ _*_,_ ___C_h_a_r_T │ │ │ │ -_>_:_:_r_e_f_e_r_e_n_c_e │ │ │ │ -_CharT reference │ │ │ │ -This type represents a reference-to-value_type. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___i_t_e_r_a_t_o_r___b_a_s_e___t_y_p_e_s_._h_:_1_3_8 │ │ │ │ -_s_t_d_:_:_a_u_t_o___p_t_r___r_e_f │ │ │ │ -DDeeffiinniittiioonn _a_u_t_o___p_t_r_._h_:_4_9 │ │ │ │ +42// Concept-checking code is off by default unless users turn it on via │ │ │ │ +43// configure options or editing c++config.h. │ │ │ │ +44// It is not supported for freestanding implementations. │ │ │ │ +45 │ │ │ │ +46#if !defined(_GLIBCXX_CONCEPT_CHECKS) || !_GLIBCXX_HOSTED │ │ │ │ +47 │ │ │ │ +48#define __glibcxx_function_requires(...) │ │ │ │ +49#define __glibcxx_class_requires(_a,_b) │ │ │ │ +50#define __glibcxx_class_requires2(_a,_b,_c) │ │ │ │ +51#define __glibcxx_class_requires3(_a,_b,_c,_d) │ │ │ │ +52#define __glibcxx_class_requires4(_a,_b,_c,_d,_e) │ │ │ │ +53 │ │ │ │ +54#else // the checks are on │ │ │ │ +55 │ │ │ │ +56#include <_b_i_t_s_/_b_o_o_s_t___c_o_n_c_e_p_t___c_h_e_c_k_._h> │ │ │ │ +57 │ │ │ │ +58// Note that the obvious and elegant approach of │ │ │ │ +59// │ │ │ │ +60//#define glibcxx_function_requires(C) debug::function_requires< debug::C >() │ │ │ │ +61// │ │ │ │ +62// won't work due to concept templates with more than one parameter, e.g., │ │ │ │ +63// BinaryPredicateConcept. The preprocessor tries to split things up on │ │ │ │ +64// the commas in the template argument list. We can't use an inner pair of │ │ │ │ +65// parenthesis to hide the commas, because "debug::(Temp)" isn't │ │ │ │ +66// a valid instantiation pattern. Thus, we steal a feature from C99. │ │ │ │ +67 │ │ │ │ +68#define __glibcxx_function_requires(...) \ │ │ │ │ +69 __gnu_cxx::__function_requires< __gnu_cxx::__VA_ARGS__ >(); │ │ │ │ +70#define __glibcxx_class_requires(_a,_C) \ │ │ │ │ +71 _GLIBCXX_CLASS_REQUIRES(_a, __gnu_cxx, _C); │ │ │ │ +72#define __glibcxx_class_requires2(_a,_b,_C) \ │ │ │ │ +73 _GLIBCXX_CLASS_REQUIRES2(_a, _b, __gnu_cxx, _C); │ │ │ │ +74#define __glibcxx_class_requires3(_a,_b,_c,_C) \ │ │ │ │ +75 _GLIBCXX_CLASS_REQUIRES3(_a, _b, _c, __gnu_cxx, _C); │ │ │ │ +76#define __glibcxx_class_requires4(_a,_b,_c,_d,_C) \ │ │ │ │ +77 _GLIBCXX_CLASS_REQUIRES4(_a, _b, _c, _d, __gnu_cxx, _C); │ │ │ │ +78 │ │ │ │ +79#endif // enable/disable │ │ │ │ +80 │ │ │ │ +81#endif // _GLIBCXX_CONCEPT_CHECK │ │ │ │ +_b_o_o_s_t___c_o_n_c_e_p_t___c_h_e_c_k_._h │ │ │ │ +_c_+_+_c_o_n_f_i_g_._h │ │ │ │ * _b_i_t_s │ │ │ │ - * _s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_._h │ │ │ │ + * _c_o_n_c_e_p_t___c_h_e_c_k_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-12-base/libstdc++/user/a00404.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: stream_iterator.h File Reference │ │ │ +libstdc++: sstream.tcc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -46,42 +46,57 @@ │ │ │ /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */ │ │ │ $(document).ready(function(){initNavTree('a00404.html',''); initResizable(); }); │ │ │ /* @license-end */ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -Classes | │ │ │ -Namespaces
│ │ │ -
stream_iterator.h File Reference
│ │ │ +Namespaces | │ │ │ +Macros
│ │ │ +
sstream.tcc File Reference
│ │ │
│ │ │
│ │ │ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -

│ │ │ -Classes

class  std::istream_iterator< _Tp, _CharT, _Traits, _Dist >
 
class  std::ostream_iterator< _Tp, _CharT, _Traits >
 
│ │ │ │ │ │ │ │ │ │ │ │ +

│ │ │ Namespaces

namespace  std
 
│ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ +Macros

#define _SSTREAM_TCC
 
│ │ │

Detailed Description

│ │ │ -

This is an internal header file, included by other library headers. Do not attempt to use it directly. Instead, include <iterator>.

│ │ │ +

This is an internal header file, included by other library headers. Do not attempt to use it directly. Instead, include <sstream>.

│ │ │ + │ │ │ +

Definition in file sstream.tcc.

│ │ │ +

Macro Definition Documentation

│ │ │ + │ │ │ +

◆ _SSTREAM_TCC

│ │ │ │ │ │ -

Definition in file stream_iterator.h.

│ │ │ -
│ │ │ +
│ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
#define _SSTREAM_TCC
│ │ │ +
│ │ │ + │ │ │ +

Definition at line 35 of file sstream.tcc.

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ +
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,19 +1,21 @@ │ │ │ │ libstdc++ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ -stream_iterator.h File Reference │ │ │ │ +_N_a_m_e_s_p_a_c_e_s | _M_a_c_r_o_s │ │ │ │ +sstream.tcc File Reference │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -CCllaasssseess │ │ │ │ -class   _s_t_d_:_:_i_s_t_r_e_a_m___i_t_e_r_a_t_o_r_<_ ___T_p_,_ ___C_h_a_r_T_,_ ___T_r_a_i_t_s_,_ ___D_i_s_t_ _> │ │ │ │ -  │ │ │ │ -class   _s_t_d_:_:_o_s_t_r_e_a_m___i_t_e_r_a_t_o_r_<_ ___T_p_,_ ___C_h_a_r_T_,_ ___T_r_a_i_t_s_ _> │ │ │ │ -  │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _s_t_d │ │ │ │   │ │ │ │ +MMaaccrrooss │ │ │ │ +#define  ___S_S_T_R_E_A_M___T_C_C │ │ │ │ +  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ This is an internal header file, included by other library headers. Do not │ │ │ │ -attempt to use it directly. Instead, include . │ │ │ │ -Definition in file _s_t_r_e_a_m___i_t_e_r_a_t_o_r_._h. │ │ │ │ +attempt to use it directly. Instead, include . │ │ │ │ +Definition in file _s_s_t_r_e_a_m_._t_c_c. │ │ │ │ +********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ +********** _?◆_? __SSSSTTRREEAAMM__TTCCCC ********** │ │ │ │ +#define _SSTREAM_TCC │ │ │ │ +Definition at line _3_5 of file _s_s_t_r_e_a_m_._t_c_c. │ │ │ │ * _b_i_t_s │ │ │ │ - * _s_t_r_e_a_m___i_t_e_r_a_t_o_r_._h │ │ │ │ + * _s_s_t_r_e_a_m_._t_c_c │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-12-base/libstdc++/user/a00404_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: stream_iterator.h Source File │ │ │ +libstdc++: sstream.tcc Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -45,20 +45,20 @@ │ │ │ │ │ │
│ │ │
│ │ │ -
stream_iterator.h
│ │ │ +
sstream.tcc
│ │ │
│ │ │
│ │ │ -Go to the documentation of this file.
1// Stream iterators
│ │ │ +Go to the documentation of this file.
1// String based streams -*- C++ -*-
│ │ │
2
│ │ │ -
3// Copyright (C) 2001-2022 Free Software Foundation, Inc.
│ │ │ +
3// Copyright (C) 1997-2022 Free Software Foundation, Inc.
│ │ │
4//
│ │ │
5// This file is part of the GNU ISO C++ Library. This library is free
│ │ │
6// software; you can redistribute it and/or modify it under the
│ │ │
7// terms of the GNU General Public License as published by the
│ │ │
8// Free Software Foundation; either version 3, or (at your option)
│ │ │
9// any later version.
│ │ │
10
│ │ │ @@ -72,303 +72,326 @@ │ │ │
18// 3.1, as published by the Free Software Foundation.
│ │ │
19
│ │ │
20// You should have received a copy of the GNU General Public License and
│ │ │
21// a copy of the GCC Runtime Library Exception along with this program;
│ │ │
22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
│ │ │
23// <http://www.gnu.org/licenses/>.
│ │ │
24
│ │ │ -
25/** @file bits/stream_iterator.h
│ │ │ +
25/** @file bits/sstream.tcc
│ │ │
26 * This is an internal header file, included by other library headers.
│ │ │ -
27 * Do not attempt to use it directly. @headername{iterator}
│ │ │ +
27 * Do not attempt to use it directly. @headername{sstream}
│ │ │
28 */
│ │ │
29
│ │ │ -
30#ifndef _STREAM_ITERATOR_H
│ │ │ -
31#define _STREAM_ITERATOR_H 1
│ │ │ -
32
│ │ │ -
33#pragma GCC system_header
│ │ │ -
34
│ │ │ -
35#include <debug/debug.h>
│ │ │ +
30//
│ │ │ +
31// ISO C++ 14882: 27.7 String-based streams
│ │ │ +
32//
│ │ │ +
33
│ │ │ +
34#ifndef _SSTREAM_TCC
│ │ │ +
35#define _SSTREAM_TCC 1
│ │ │
36
│ │ │ -
37namespace std _GLIBCXX_VISIBILITY(default)
│ │ │ -
38{
│ │ │ -
39_GLIBCXX_BEGIN_NAMESPACE_VERSION
│ │ │ -
40
│ │ │ -
41 /**
│ │ │ -
42 * @addtogroup iterators
│ │ │ -
43 * @{
│ │ │ -
44 */
│ │ │ -
45
│ │ │ -
46// Ignore warnings about std::iterator.
│ │ │ -
47#pragma GCC diagnostic push
│ │ │ -
48#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
│ │ │ -
49
│ │ │ -
50 /// Provides input iterator semantics for streams.
│ │ │ -
51 template<typename _Tp, typename _CharT = char,
│ │ │ -
52 typename _Traits = char_traits<_CharT>, typename _Dist = ptrdiff_t>
│ │ │ -
│ │ │ - │ │ │ -
54 : public iterator<input_iterator_tag, _Tp, _Dist, const _Tp*, const _Tp&>
│ │ │ -
55 {
│ │ │ -
56 public:
│ │ │ -
57 typedef _CharT char_type;
│ │ │ -
58 typedef _Traits traits_type;
│ │ │ - │ │ │ -
60
│ │ │ -
61 private:
│ │ │ -
62 istream_type* _M_stream;
│ │ │ -
63 _Tp _M_value;
│ │ │ -
64 // This bool becomes false at end-of-stream. It should be sufficient to
│ │ │ -
65 // check _M_stream != nullptr instead, but historically we did not set
│ │ │ -
66 // _M_stream to null when reaching the end, so we need to keep this flag.
│ │ │ -
67 bool _M_ok;
│ │ │ -
68
│ │ │ -
69 public:
│ │ │ -
70 /// Construct end of input stream iterator.
│ │ │ -
│ │ │ - │ │ │ - │ │ │ -
73 : _M_stream(0), _M_value(), _M_ok(false) {}
│ │ │ -
│ │ │ -
74
│ │ │ -
75 /// Construct start of input stream iterator.
│ │ │ -
│ │ │ - │ │ │ -
77 : _M_stream(std::__addressof(__s)), _M_ok(true)
│ │ │ -
78 { _M_read(); }
│ │ │ -
│ │ │ -
79
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
83 : _M_stream(__obj._M_stream), _M_value(__obj._M_value),
│ │ │ -
84 _M_ok(__obj._M_ok)
│ │ │ -
85 { }
│ │ │ -
86
│ │ │ -
87#if __cplusplus > 201703L && __cpp_lib_concepts
│ │ │ -
88 constexpr
│ │ │ -
89 istream_iterator(default_sentinel_t)
│ │ │ -
90 noexcept(is_nothrow_default_constructible_v<_Tp>)
│ │ │ -
91 : istream_iterator() { }
│ │ │ -
92#endif
│ │ │ -
93
│ │ │ -
94#if __cplusplus >= 201103L
│ │ │ -
95 istream_iterator& operator=(const istream_iterator&) = default;
│ │ │ -
96 ~istream_iterator() = default;
│ │ │ -
97#endif
│ │ │ -
98
│ │ │ -
99 _GLIBCXX_NODISCARD
│ │ │ -
100 const _Tp&
│ │ │ -
101 operator*() const _GLIBCXX_NOEXCEPT
│ │ │ -
102 {
│ │ │ -
103 __glibcxx_requires_cond(_M_ok,
│ │ │ -
104 _M_message(__gnu_debug::__msg_deref_istream)
│ │ │ -
105 ._M_iterator(*this));
│ │ │ -
106 return _M_value;
│ │ │ -
107 }
│ │ │ -
108
│ │ │ -
109 _GLIBCXX_NODISCARD
│ │ │ -
110 const _Tp*
│ │ │ -
111 operator->() const _GLIBCXX_NOEXCEPT
│ │ │ -
112 { return std::__addressof((operator*())); }
│ │ │ -
113
│ │ │ - │ │ │ -
115 operator++()
│ │ │ -
116 {
│ │ │ -
117 __glibcxx_requires_cond(_M_ok,
│ │ │ -
118 _M_message(__gnu_debug::__msg_inc_istream)
│ │ │ -
119 ._M_iterator(*this));
│ │ │ -
120 _M_read();
│ │ │ -
121 return *this;
│ │ │ -
122 }
│ │ │ -
123
│ │ │ - │ │ │ -
125 operator++(int)
│ │ │ -
126 {
│ │ │ -
127 __glibcxx_requires_cond(_M_ok,
│ │ │ -
128 _M_message(__gnu_debug::__msg_inc_istream)
│ │ │ -
129 ._M_iterator(*this));
│ │ │ -
130 istream_iterator __tmp = *this;
│ │ │ -
131 _M_read();
│ │ │ -
132 return __tmp;
│ │ │ -
133 }
│ │ │ -
134
│ │ │ -
135 private:
│ │ │ -
136 bool
│ │ │ -
137 _M_equal(const istream_iterator& __x) const _GLIBCXX_NOEXCEPT
│ │ │ -
138 {
│ │ │ -
139 // Ideally this would just return _M_stream == __x._M_stream,
│ │ │ -
140 // but code compiled with old versions never sets _M_stream to null.
│ │ │ -
141 return (_M_ok == __x._M_ok) && (!_M_ok || _M_stream == __x._M_stream);
│ │ │ -
142 }
│ │ │ -
143
│ │ │ -
144 void
│ │ │ -
145 _M_read()
│ │ │ -
146 {
│ │ │ -
147 if (_M_stream && !(*_M_stream >> _M_value))
│ │ │ -
148 {
│ │ │ -
149 _M_stream = 0;
│ │ │ -
150 _M_ok = false;
│ │ │ -
151 }
│ │ │ -
152 }
│ │ │ -
153
│ │ │ -
154 /// Return true if the iterators refer to the same stream,
│ │ │ -
155 /// or are both at end-of-stream.
│ │ │ -
156 _GLIBCXX_NODISCARD
│ │ │ -
157 friend bool
│ │ │ -
│ │ │ - │ │ │ - │ │ │ -
160 { return __x._M_equal(__y); }
│ │ │ -
│ │ │ -
161
│ │ │ -
162#if __cpp_impl_three_way_comparison < 201907L
│ │ │ -
163 /// Return true if the iterators refer to different streams,
│ │ │ -
164 /// or if one is at end-of-stream and the other is not.
│ │ │ -
165 _GLIBCXX_NODISCARD
│ │ │ -
166 friend bool
│ │ │ -
167 operator!=(const istream_iterator& __x, const istream_iterator& __y)
│ │ │ - │ │ │ -
169 { return !__x._M_equal(__y); }
│ │ │ -
170#endif
│ │ │ -
171
│ │ │ -
172#if __cplusplus > 201703L && __cpp_lib_concepts
│ │ │ -
173 [[nodiscard]]
│ │ │ -
174 friend bool
│ │ │ -
175 operator==(const istream_iterator& __i, default_sentinel_t) noexcept
│ │ │ -
176 { return !__i._M_stream; }
│ │ │ -
177#endif
│ │ │ -
178 };
│ │ │ -
│ │ │ -
179
│ │ │ -
180 /**
│ │ │ -
181 * @brief Provides output iterator semantics for streams.
│ │ │ -
182 *
│ │ │ -
183 * This class provides an iterator to write to an ostream. The type Tp is
│ │ │ -
184 * the only type written by this iterator and there must be an
│ │ │ -
185 * operator<<(Tp) defined.
│ │ │ -
186 *
│ │ │ -
187 * @tparam _Tp The type to write to the ostream.
│ │ │ -
188 * @tparam _CharT The ostream char_type.
│ │ │ -
189 * @tparam _Traits The ostream char_traits.
│ │ │ -
190 */
│ │ │ -
191 template<typename _Tp, typename _CharT = char,
│ │ │ -
192 typename _Traits = char_traits<_CharT> >
│ │ │ -
│ │ │ - │ │ │ -
194 : public iterator<output_iterator_tag, void, void, void, void>
│ │ │ -
195 {
│ │ │ -
196 public:
│ │ │ -
197 ///@{
│ │ │ -
198 /// Public typedef
│ │ │ -
199#if __cplusplus > 201703L
│ │ │ -
200 using difference_type = ptrdiff_t;
│ │ │ -
201#endif
│ │ │ -
202 typedef _CharT char_type;
│ │ │ -
203 typedef _Traits traits_type;
│ │ │ - │ │ │ -
205 ///@}
│ │ │ -
206
│ │ │ -
207 private:
│ │ │ -
208 ostream_type* _M_stream;
│ │ │ -
209 const _CharT* _M_string;
│ │ │ -
210
│ │ │ -
211 public:
│ │ │ -
212 /// Construct from an ostream.
│ │ │ -
│ │ │ - │ │ │ -
214 : _M_stream(std::__addressof(__s)), _M_string(0) {}
│ │ │ -
│ │ │ -
215
│ │ │ -
216 /**
│ │ │ -
217 * Construct from an ostream.
│ │ │ -
218 *
│ │ │ -
219 * The delimiter string @a c is written to the stream after every Tp
│ │ │ -
220 * written to the stream. The delimiter is not copied, and thus must
│ │ │ -
221 * not be destroyed while this iterator is in use.
│ │ │ -
222 *
│ │ │ -
223 * @param __s Underlying ostream to write to.
│ │ │ -
224 * @param __c CharT delimiter string to insert.
│ │ │ -
225 */
│ │ │ -
│ │ │ - │ │ │ -
227 : _M_stream(std::__addressof(__s)), _M_string(__c) { }
│ │ │ -
│ │ │ -
228
│ │ │ -
229 /// Copy constructor.
│ │ │ -
│ │ │ - │ │ │ -
231 : _M_stream(__obj._M_stream), _M_string(__obj._M_string) { }
│ │ │ -
│ │ │ -
232
│ │ │ -
233#if __cplusplus >= 201103L
│ │ │ -
234 ostream_iterator& operator=(const ostream_iterator&) = default;
│ │ │ -
235#endif
│ │ │ -
236
│ │ │ -
237 /// Writes @a value to underlying ostream using operator<<. If
│ │ │ -
238 /// constructed with delimiter string, writes delimiter to ostream.
│ │ │ - │ │ │ -
│ │ │ -
240 operator=(const _Tp& __value)
│ │ │ -
241 {
│ │ │ -
242 __glibcxx_requires_cond(_M_stream != 0,
│ │ │ -
243 _M_message(__gnu_debug::__msg_output_ostream)
│ │ │ -
244 ._M_iterator(*this));
│ │ │ -
245 *_M_stream << __value;
│ │ │ -
246 if (_M_string)
│ │ │ -
247 *_M_stream << _M_string;
│ │ │ -
248 return *this;
│ │ │ -
249 }
│ │ │ -
│ │ │ -
250
│ │ │ -
251 _GLIBCXX_NODISCARD
│ │ │ - │ │ │ -
253 operator*() _GLIBCXX_NOEXCEPT
│ │ │ -
254 { return *this; }
│ │ │ -
255
│ │ │ -
256 ostream_iterator&
│ │ │ -
257 operator++() _GLIBCXX_NOEXCEPT
│ │ │ -
258 { return *this; }
│ │ │ -
259
│ │ │ - │ │ │ -
261 operator++(int) _GLIBCXX_NOEXCEPT
│ │ │ -
262 { return *this; }
│ │ │ -
263 };
│ │ │ -
│ │ │ -
264#pragma GCC diagnostic pop
│ │ │ -
265
│ │ │ -
266 /// @} group iterators
│ │ │ -
267
│ │ │ -
268_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ -
269} // namespace
│ │ │ -
270
│ │ │ -
271#endif
│ │ │ - │ │ │ -
constexpr _Tp * __addressof(_Tp &__r) noexcept
Same as C++11 std::addressof.
Definition move.h:49
│ │ │ +
37#pragma GCC system_header
│ │ │ +
38
│ │ │ +
39namespace std _GLIBCXX_VISIBILITY(default)
│ │ │ +
40{
│ │ │ +
41_GLIBCXX_BEGIN_NAMESPACE_VERSION
│ │ │ +
42
│ │ │ +
43 template <class _CharT, class _Traits, class _Alloc>
│ │ │ +
44 typename basic_stringbuf<_CharT, _Traits, _Alloc>::int_type
│ │ │ +
│ │ │ + │ │ │ +
46 pbackfail(int_type __c)
│ │ │ +
47 {
│ │ │ +
48 int_type __ret = traits_type::eof();
│ │ │ +
49 if (this->eback() < this->gptr())
│ │ │ +
50 {
│ │ │ +
51 // Try to put back __c into input sequence in one of three ways.
│ │ │ +
52 // Order these tests done in is unspecified by the standard.
│ │ │ +
53 const bool __testeof = traits_type::eq_int_type(__c, __ret);
│ │ │ +
54 if (!__testeof)
│ │ │ +
55 {
│ │ │ +
56 const bool __testeq = traits_type::eq(traits_type::
│ │ │ +
57 to_char_type(__c),
│ │ │ +
58 this->gptr()[-1]);
│ │ │ +
59 const bool __testout = this->_M_mode & ios_base::out;
│ │ │ +
60 if (__testeq || __testout)
│ │ │ +
61 {
│ │ │ +
62 this->gbump(-1);
│ │ │ +
63 if (!__testeq)
│ │ │ +
64 *this->gptr() = traits_type::to_char_type(__c);
│ │ │ +
65 __ret = __c;
│ │ │ +
66 }
│ │ │ +
67 }
│ │ │ +
68 else
│ │ │ +
69 {
│ │ │ +
70 this->gbump(-1);
│ │ │ +
71 __ret = traits_type::not_eof(__c);
│ │ │ +
72 }
│ │ │ +
73 }
│ │ │ +
74 return __ret;
│ │ │ +
75 }
│ │ │ +
│ │ │ +
76
│ │ │ +
77 template <class _CharT, class _Traits, class _Alloc>
│ │ │ +
78 typename basic_stringbuf<_CharT, _Traits, _Alloc>::int_type
│ │ │ +
│ │ │ + │ │ │ +
80 overflow(int_type __c)
│ │ │ +
81 {
│ │ │ +
82 const bool __testout = this->_M_mode & ios_base::out;
│ │ │ +
83 if (__builtin_expect(!__testout, false))
│ │ │ +
84 return traits_type::eof();
│ │ │ +
85
│ │ │ +
86 const bool __testeof = traits_type::eq_int_type(__c, traits_type::eof());
│ │ │ +
87 if (__builtin_expect(__testeof, false))
│ │ │ +
88 return traits_type::not_eof(__c);
│ │ │ +
89
│ │ │ +
90 const __size_type __capacity = _M_string.capacity();
│ │ │ +
91
│ │ │ +
92#if _GLIBCXX_USE_CXX11_ABI
│ │ │ +
93 if (size_t(this->epptr() - this->pbase()) < __capacity)
│ │ │ +
94 {
│ │ │ +
95 // There is additional capacity in _M_string that can be used.
│ │ │ +
96 char_type* __base = const_cast<char_type*>(_M_string.data());
│ │ │ +
97 _M_pbump(__base, __base + __capacity, this->pptr() - this->pbase());
│ │ │ +
98 if (_M_mode & ios_base::in)
│ │ │ +
99 {
│ │ │ +
100 const __size_type __nget = this->gptr() - this->eback();
│ │ │ +
101 const __size_type __eget = this->egptr() - this->eback();
│ │ │ +
102 this->setg(__base, __base + __nget, __base + __eget + 1);
│ │ │ +
103 }
│ │ │ +
104 *this->pptr() = traits_type::to_char_type(__c);
│ │ │ +
105 this->pbump(1);
│ │ │ +
106 return __c;
│ │ │ +
107 }
│ │ │ +
108#endif
│ │ │ +
109
│ │ │ +
110 const __size_type __max_size = _M_string.max_size();
│ │ │ +
111 const bool __testput = this->pptr() < this->epptr();
│ │ │ + │ │ │ +
113 return traits_type::eof();
│ │ │ +
114
│ │ │ +
115 // Try to append __c into output sequence in one of two ways.
│ │ │ +
116 // Order these tests done in is unspecified by the standard.
│ │ │ +
117 const char_type __conv = traits_type::to_char_type(__c);
│ │ │ +
118 if (!__testput)
│ │ │ +
119 {
│ │ │ +
120 // NB: Start ostringstream buffers at 512 chars. This is an
│ │ │ +
121 // experimental value (pronounced "arbitrary" in some of the
│ │ │ +
122 // hipper English-speaking countries), and can be changed to
│ │ │ +
123 // suit particular needs.
│ │ │ +
124 //
│ │ │ +
125 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ +
126 // 169. Bad efficiency of overflow() mandated
│ │ │ +
127 // 432. stringbuf::overflow() makes only one write position
│ │ │ +
128 // available
│ │ │ +
129 const __size_type __opt_len = std::max(__size_type(2 * __capacity),
│ │ │ +
130 __size_type(512));
│ │ │ +
131 const __size_type __len = std::min(__opt_len, __max_size);
│ │ │ +
132 __string_type __tmp(_M_string.get_allocator());
│ │ │ +
133 __tmp.reserve(__len);
│ │ │ +
134 if (this->pbase())
│ │ │ +
135 __tmp.assign(this->pbase(), this->epptr() - this->pbase());
│ │ │ +
136 __tmp.push_back(__conv);
│ │ │ +
137 _M_string.swap(__tmp);
│ │ │ +
138 _M_sync(const_cast<char_type*>(_M_string.data()),
│ │ │ +
139 this->gptr() - this->eback(), this->pptr() - this->pbase());
│ │ │ +
140 }
│ │ │ +
141 else
│ │ │ +
142 *this->pptr() = __conv;
│ │ │ +
143 this->pbump(1);
│ │ │ +
144 return __c;
│ │ │ +
145 }
│ │ │ +
│ │ │ +
146
│ │ │ +
147 template <class _CharT, class _Traits, class _Alloc>
│ │ │ +
148 typename basic_stringbuf<_CharT, _Traits, _Alloc>::int_type
│ │ │ +
│ │ │ + │ │ │ + │ │ │ +
151 {
│ │ │ +
152 int_type __ret = traits_type::eof();
│ │ │ +
153 const bool __testin = this->_M_mode & ios_base::in;
│ │ │ +
154 if (__testin)
│ │ │ +
155 {
│ │ │ +
156 // Update egptr() to match the actual string end.
│ │ │ +
157 _M_update_egptr();
│ │ │ +
158
│ │ │ +
159 if (this->gptr() < this->egptr())
│ │ │ +
160 __ret = traits_type::to_int_type(*this->gptr());
│ │ │ +
161 }
│ │ │ +
162 return __ret;
│ │ │ +
163 }
│ │ │ +
│ │ │ +
164
│ │ │ +
165 template <class _CharT, class _Traits, class _Alloc>
│ │ │ +
166 typename basic_stringbuf<_CharT, _Traits, _Alloc>::pos_type
│ │ │ +
│ │ │ + │ │ │ +
168 seekoff(off_type __off, ios_base::seekdir __way, ios_base::openmode __mode)
│ │ │ +
169 {
│ │ │ +
170 pos_type __ret = pos_type(off_type(-1));
│ │ │ +
171 bool __testin = (ios_base::in & this->_M_mode & __mode) != 0;
│ │ │ +
172 bool __testout = (ios_base::out & this->_M_mode & __mode) != 0;
│ │ │ +
173 const bool __testboth = __testin && __testout && __way != ios_base::cur;
│ │ │ + │ │ │ + │ │ │ +
176
│ │ │ +
177 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ +
178 // 453. basic_stringbuf::seekoff need not always fail for an empty stream.
│ │ │ +
179 const char_type* __beg = __testin ? this->eback() : this->pbase();
│ │ │ +
180 if ((__beg || !__off) && (__testin || __testout || __testboth))
│ │ │ +
181 {
│ │ │ +
182 _M_update_egptr();
│ │ │ +
183
│ │ │ +
184 off_type __newoffi = __off;
│ │ │ +
185 off_type __newoffo = __newoffi;
│ │ │ +
186 if (__way == ios_base::cur)
│ │ │ +
187 {
│ │ │ +
188 __newoffi += this->gptr() - __beg;
│ │ │ +
189 __newoffo += this->pptr() - __beg;
│ │ │ +
190 }
│ │ │ +
191 else if (__way == ios_base::end)
│ │ │ +
192 __newoffo = __newoffi += this->egptr() - __beg;
│ │ │ +
193
│ │ │ +
194 if ((__testin || __testboth)
│ │ │ +
195 && __newoffi >= 0
│ │ │ +
196 && this->egptr() - __beg >= __newoffi)
│ │ │ +
197 {
│ │ │ +
198 this->setg(this->eback(), this->eback() + __newoffi,
│ │ │ +
199 this->egptr());
│ │ │ +
200 __ret = pos_type(__newoffi);
│ │ │ +
201 }
│ │ │ +
202 if ((__testout || __testboth)
│ │ │ +
203 && __newoffo >= 0
│ │ │ +
204 && this->egptr() - __beg >= __newoffo)
│ │ │ +
205 {
│ │ │ +
206 _M_pbump(this->pbase(), this->epptr(), __newoffo);
│ │ │ +
207 __ret = pos_type(__newoffo);
│ │ │ +
208 }
│ │ │ +
209 }
│ │ │ +
210 return __ret;
│ │ │ +
211 }
│ │ │ +
│ │ │ +
212
│ │ │ +
213 template <class _CharT, class _Traits, class _Alloc>
│ │ │ +
214 typename basic_stringbuf<_CharT, _Traits, _Alloc>::pos_type
│ │ │ +
│ │ │ + │ │ │ +
216 seekpos(pos_type __sp, ios_base::openmode __mode)
│ │ │ +
217 {
│ │ │ +
218 pos_type __ret = pos_type(off_type(-1));
│ │ │ +
219 const bool __testin = (ios_base::in & this->_M_mode & __mode) != 0;
│ │ │ +
220 const bool __testout = (ios_base::out & this->_M_mode & __mode) != 0;
│ │ │ +
221
│ │ │ +
222 const char_type* __beg = __testin ? this->eback() : this->pbase();
│ │ │ +
223 if ((__beg || !off_type(__sp)) && (__testin || __testout))
│ │ │ +
224 {
│ │ │ +
225 _M_update_egptr();
│ │ │ +
226
│ │ │ +
227 const off_type __pos(__sp);
│ │ │ +
228 const bool __testpos = (0 <= __pos
│ │ │ +
229 && __pos <= this->egptr() - __beg);
│ │ │ +
230 if (__testpos)
│ │ │ +
231 {
│ │ │ +
232 if (__testin)
│ │ │ +
233 this->setg(this->eback(), this->eback() + __pos,
│ │ │ +
234 this->egptr());
│ │ │ +
235 if (__testout)
│ │ │ +
236 _M_pbump(this->pbase(), this->epptr(), __pos);
│ │ │ +
237 __ret = __sp;
│ │ │ +
238 }
│ │ │ +
239 }
│ │ │ +
240 return __ret;
│ │ │ +
241 }
│ │ │ +
│ │ │ +
242
│ │ │ +
243 template <class _CharT, class _Traits, class _Alloc>
│ │ │ +
244 void
│ │ │ + │ │ │ +
246 _M_sync(char_type* __base, __size_type __i, __size_type __o)
│ │ │ +
247 {
│ │ │ +
248 const bool __testin = _M_mode & ios_base::in;
│ │ │ +
249 const bool __testout = _M_mode & ios_base::out;
│ │ │ +
250 char_type* __endg = __base + _M_string.size();
│ │ │ +
251 char_type* __endp = __base + _M_string.capacity();
│ │ │ +
252
│ │ │ +
253 if (__base != _M_string.data())
│ │ │ +
254 {
│ │ │ +
255 // setbuf: __i == size of buffer area (_M_string.size() == 0).
│ │ │ +
256 __endg += __i;
│ │ │ +
257 __i = 0;
│ │ │ +
258 __endp = __endg;
│ │ │ +
259 }
│ │ │ +
260
│ │ │ +
261 if (__testin)
│ │ │ +
262 this->setg(__base, __base + __i, __endg);
│ │ │ +
263 if (__testout)
│ │ │ +
264 {
│ │ │ +
265 _M_pbump(__base, __endp, __o);
│ │ │ +
266 // egptr() always tracks the string end. When !__testin,
│ │ │ +
267 // for the correct functioning of the streambuf inlines
│ │ │ +
268 // the other get area pointers are identical.
│ │ │ +
269 if (!__testin)
│ │ │ +
270 this->setg(__endg, __endg, __endg);
│ │ │ +
271 }
│ │ │ +
272 }
│ │ │ +
273
│ │ │ +
274 template <class _CharT, class _Traits, class _Alloc>
│ │ │ +
275 void
│ │ │ +
276 basic_stringbuf<_CharT, _Traits, _Alloc>::
│ │ │ +
277 _M_pbump(char_type* __pbeg, char_type* __pend, off_type __off)
│ │ │ +
278 {
│ │ │ +
279 this->setp(__pbeg, __pend);
│ │ │ +
280 while (__off > __gnu_cxx::__numeric_traits<int>::__max)
│ │ │ +
281 {
│ │ │ +
282 this->pbump(__gnu_cxx::__numeric_traits<int>::__max);
│ │ │ +
283 __off -= __gnu_cxx::__numeric_traits<int>::__max;
│ │ │ +
284 }
│ │ │ +
285 this->pbump(__off);
│ │ │ +
286 }
│ │ │ +
287
│ │ │ +
288 // Inhibit implicit instantiations for required instantiations,
│ │ │ +
289 // which are defined via explicit instantiations elsewhere.
│ │ │ +
290#if _GLIBCXX_EXTERN_TEMPLATE
│ │ │ +
291 extern template class basic_stringbuf<char>;
│ │ │ +
292 extern template class basic_istringstream<char>;
│ │ │ +
293 extern template class basic_ostringstream<char>;
│ │ │ +
294 extern template class basic_stringstream<char>;
│ │ │ +
295
│ │ │ +
296#ifdef _GLIBCXX_USE_WCHAR_T
│ │ │ +
297 extern template class basic_stringbuf<wchar_t>;
│ │ │ +
298 extern template class basic_istringstream<wchar_t>;
│ │ │ +
299 extern template class basic_ostringstream<wchar_t>;
│ │ │ +
300 extern template class basic_stringstream<wchar_t>;
│ │ │ +
301#endif
│ │ │ +
302#endif
│ │ │ +
303
│ │ │ +
304_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ +
305} // namespace std
│ │ │ +
306
│ │ │ +
307#endif
│ │ │ +
constexpr const _Tp & max(const _Tp &, const _Tp &)
This does what you think it does.
│ │ │ +
constexpr const _Tp & min(const _Tp &, const _Tp &)
This does what you think it does.
│ │ │
ISO C++ entities toplevel namespace is std.
│ │ │ -
is_nothrow_default_constructible
Definition type_traits:1058
│ │ │ -
is_nothrow_copy_constructible
Definition type_traits:1081
│ │ │ -
Common iterator class.
│ │ │ -
Provides input iterator semantics for streams.
│ │ │ -
istream_iterator(istream_type &__s)
Construct start of input stream iterator.
│ │ │ -
constexpr istream_iterator() noexcept(/*conditional */)
Construct end of input stream iterator.
│ │ │ -
friend bool operator==(const istream_iterator &__x, const istream_iterator &__y) noexcept
Return true if the iterators refer to the same stream, or are both at end-of-stream.
│ │ │ -
Provides output iterator semantics for streams.
│ │ │ -
_CharT char_type
Public typedef.
│ │ │ -
ostream_iterator(ostream_type &__s) noexcept
Construct from an ostream.
│ │ │ -
ostream_iterator(ostream_type &__s, const _CharT *__c) noexcept
│ │ │ -
_Traits traits_type
Public typedef.
│ │ │ -
ostream_iterator & operator=(const _Tp &__value)
Writes value to underlying ostream using operator<<. If constructed with delimiter string,...
│ │ │ -
ptrdiff_t difference_type
Public typedef.
│ │ │ -
basic_ostream< _CharT, _Traits > ostream_type
Public typedef.
│ │ │ -
ostream_iterator(const ostream_iterator &__obj) noexcept
Copy constructor.
│ │ │ - │ │ │ +
The actual work of input and output (for std::string).
Definition sstream:78
│ │ │ +
virtual int_type underflow()
Fetches more data from the controlled sequence.
Definition sstream.tcc:150
│ │ │ +
virtual pos_type seekpos(pos_type __sp, ios_base::openmode __mode=ios_base::in|ios_base::out)
Alters the stream positions.
Definition sstream.tcc:216
│ │ │ +
virtual pos_type seekoff(off_type __off, ios_base::seekdir __way, ios_base::openmode __mode=ios_base::in|ios_base::out)
Alters the stream positions.
Definition sstream.tcc:168
│ │ │ +
virtual int_type overflow(int_type __c=traits_type::eof())
Consumes data from the buffer; writes to the controlled sequence.
Definition sstream.tcc:80
│ │ │ +
virtual int_type pbackfail(int_type __c=traits_type::eof())
Tries to back up the input sequence.
Definition sstream.tcc:46
│ │ │ + │ │ │ +
static const seekdir cur
Request a seek relative to the current position within the sequence.
Definition ios_base.h:498
│ │ │ +
static const seekdir end
Request a seek relative to the current end of the sequence.
Definition ios_base.h:501
│ │ │ +
static const openmode in
Open for input. Default for ifstream and fstream.
Definition ios_base.h:466
│ │ │ +
static const openmode out
Open for output. Default for ofstream and fstream.
Definition ios_base.h:469
│ │ │ + │ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,13 +1,13 @@ │ │ │ │ libstdc++ │ │ │ │ -stream_iterator.h │ │ │ │ +sstream.tcc │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -1// Stream iterators │ │ │ │ +1// String based streams -*- C++ -*- │ │ │ │ 2 │ │ │ │ -3// Copyright (C) 2001-2022 Free Software Foundation, Inc. │ │ │ │ +3// Copyright (C) 1997-2022 Free Software Foundation, Inc. │ │ │ │ 4// │ │ │ │ 5// This file is part of the GNU ISO C++ Library. This library is free │ │ │ │ 6// software; you can redistribute it and/or modify it under the │ │ │ │ 7// terms of the GNU General Public License as published by the │ │ │ │ 8// Free Software Foundation; either version 3, or (at your option) │ │ │ │ 9// any later version. │ │ │ │ 10 │ │ │ │ @@ -21,327 +21,347 @@ │ │ │ │ 18// 3.1, as published by the Free Software Foundation. │ │ │ │ 19 │ │ │ │ 20// You should have received a copy of the GNU General Public License and │ │ │ │ 21// a copy of the GCC Runtime Library Exception along with this program; │ │ │ │ 22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see │ │ │ │ 23// . │ │ │ │ 24 │ │ │ │ -25/** @file bits/stream_iterator.h │ │ │ │ +25/** @file bits/sstream.tcc │ │ │ │ 26 * This is an internal header file, included by other library headers. │ │ │ │ -27 * Do not attempt to use it directly. @headername{iterator} │ │ │ │ +27 * Do not attempt to use it directly. @headername{sstream} │ │ │ │ 28 */ │ │ │ │ 29 │ │ │ │ -30#ifndef _STREAM_ITERATOR_H │ │ │ │ -31#define _STREAM_ITERATOR_H 1 │ │ │ │ -32 │ │ │ │ -33#pragma GCC system_header │ │ │ │ -34 │ │ │ │ -35#include <_d_e_b_u_g_/_d_e_b_u_g_._h> │ │ │ │ +30// │ │ │ │ +31// ISO C++ 14882: 27.7 String-based streams │ │ │ │ +32// │ │ │ │ +33 │ │ │ │ +34#ifndef _SSTREAM_TCC │ │ │ │ +35#define _SSTREAM_TCC 1 │ │ │ │ 36 │ │ │ │ -37namespace _s_t_d _GLIBCXX_VISIBILITY(default) │ │ │ │ -38{ │ │ │ │ -39_GLIBCXX_BEGIN_NAMESPACE_VERSION │ │ │ │ -40 │ │ │ │ -41 /** │ │ │ │ -42 * @addtogroup iterators │ │ │ │ -43 * @{ │ │ │ │ -44 */ │ │ │ │ -45 │ │ │ │ -46// Ignore warnings about std::iterator. │ │ │ │ -47#pragma GCC diagnostic push │ │ │ │ -48#pragma GCC diagnostic ignored "-Wdeprecated-declarations" │ │ │ │ -49 │ │ │ │ -50 /// Provides input iterator semantics for streams. │ │ │ │ -51 template, typename _Dist = ptrdiff_t> │ │ │ │ -_5_3 class _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r │ │ │ │ -54 : public _i_t_e_r_a_t_o_r │ │ │ │ +37#pragma GCC system_header │ │ │ │ +38 │ │ │ │ +39namespace _s_t_d _GLIBCXX_VISIBILITY(default) │ │ │ │ +40{ │ │ │ │ +41_GLIBCXX_BEGIN_NAMESPACE_VERSION │ │ │ │ +42 │ │ │ │ +43 template │ │ │ │ +44 typename basic_stringbuf<_CharT, _Traits, _Alloc>::int_type │ │ │ │ +_4_5 _b_a_s_i_c___s_t_r_i_n_g_b_u_f_<___C_h_a_r_T_,_ ___T_r_a_i_t_s_,_ ___A_l_l_o_c_>_:_: │ │ │ │ +46_ _p_b_a_c_k_f_a_i_l(int_type __c) │ │ │ │ +47 { │ │ │ │ +48 int_type _____r_e_t = traits_type::eof(); │ │ │ │ +49 if (this->eback() < this->gptr()) │ │ │ │ +50 { │ │ │ │ +51 // Try to put back __c into input sequence in one of three ways. │ │ │ │ +52 // Order these tests done in is unspecified by the standard. │ │ │ │ +53 const bool _____t_e_s_t_e_o_f = traits_type::eq_int_type(__c, _____r_e_t); │ │ │ │ +54 if (!_____t_e_s_t_e_o_f) │ │ │ │ 55 { │ │ │ │ -56 public: │ │ │ │ -57 typedef _CharT char_type; │ │ │ │ -58 typedef _Traits traits_type; │ │ │ │ -59 typedef _b_a_s_i_c___i_s_t_r_e_a_m_<___C_h_a_r_T_,_ ___T_r_a_i_t_s_> _i_s_t_r_e_a_m___t_y_p_e; │ │ │ │ -60 │ │ │ │ -61 private: │ │ │ │ -62 _i_s_t_r_e_a_m___t_y_p_e* _M_stream; │ │ │ │ -63 _Tp _M_value; │ │ │ │ -64 // This bool becomes false at end-of-stream. It should be sufficient to │ │ │ │ -65 // check _M_stream != nullptr instead, but historically we did not set │ │ │ │ -66 // _M_stream to null when reaching the end, so we need to keep this flag. │ │ │ │ -67 bool _M_ok; │ │ │ │ -68 │ │ │ │ -69 public: │ │ │ │ -70 /// Construct end of input stream iterator. │ │ │ │ -_7_1 ___G_L_I_B_C_X_X___C_O_N_S_T_E_X_P_R _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r() │ │ │ │ -72 ___G_L_I_B_C_X_X___N_O_E_X_C_E_P_T___I_F(_i_s___n_o_t_h_r_o_w___d_e_f_a_u_l_t___c_o_n_s_t_r_u_c_t_i_b_l_e<_Tp>::value) │ │ │ │ -73 : _M_stream(0), _M_value(), _M_ok(_f_a_l_s_e) {} │ │ │ │ -74 │ │ │ │ -75 /// Construct start of input stream iterator. │ │ │ │ -_7_6 _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r(_i_s_t_r_e_a_m___t_y_p_e& _____s) │ │ │ │ -77 : _M_stream(_s_t_d::_____a_d_d_r_e_s_s_o_f(_____s)), _M_ok(_t_r_u_e) │ │ │ │ -78 { _M_read(); } │ │ │ │ -79 │ │ │ │ -80 ___G_L_I_B_C_X_X___C_O_N_S_T_E_X_P_R │ │ │ │ -81 _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r(const _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r& _____o_b_j) │ │ │ │ -82 ___G_L_I_B_C_X_X___N_O_E_X_C_E_P_T___I_F(_i_s___n_o_t_h_r_o_w___c_o_p_y___c_o_n_s_t_r_u_c_t_i_b_l_e_<___T_p_>_:_:_v_a_l_u_e) │ │ │ │ -83 : _M_stream(_____o_b_j._M_stream), _M_value(_____o_b_j._M_value), │ │ │ │ -84 _M_ok(_____o_b_j._M_ok) │ │ │ │ -85 { } │ │ │ │ -86 │ │ │ │ -87#if __cplusplus > 201703L && __cpp_lib_concepts │ │ │ │ -88 constexpr │ │ │ │ -89 _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r(default_sentinel_t) │ │ │ │ -90 noexcept(is_nothrow_default_constructible_v<_Tp>) │ │ │ │ -91 : _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r() { } │ │ │ │ -92#endif │ │ │ │ -93 │ │ │ │ -94#if __cplusplus >= 201103L │ │ │ │ -95 _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r& operator=(const _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r&) = default; │ │ │ │ -96 ~istream_iterator() = default; │ │ │ │ -97#endif │ │ │ │ -98 │ │ │ │ -99 _GLIBCXX_NODISCARD │ │ │ │ -100 const _Tp& │ │ │ │ -101 operator*() const _GLIBCXX_NOEXCEPT │ │ │ │ -102 { │ │ │ │ -103 __glibcxx_requires_cond(_M_ok, │ │ │ │ -104 _M_message(__gnu_debug::__msg_deref_istream) │ │ │ │ -105 ._M_iterator(*this)); │ │ │ │ -106 return _M_value; │ │ │ │ +56 const bool _____t_e_s_t_e_q = traits_type::eq(traits_type:: │ │ │ │ +57 to_char_type(__c), │ │ │ │ +58 this->gptr()[-1]); │ │ │ │ +59 const bool _____t_e_s_t_o_u_t = this->_M_mode & _i_o_s___b_a_s_e_:_:_o_u_t; │ │ │ │ +60 if (_____t_e_s_t_e_q || _____t_e_s_t_o_u_t) │ │ │ │ +61 { │ │ │ │ +62 this->gbump(-1); │ │ │ │ +63 if (!_____t_e_s_t_e_q) │ │ │ │ +64 *this->gptr() = traits_type::to_char_type(__c); │ │ │ │ +65 _____r_e_t = __c; │ │ │ │ +66 } │ │ │ │ +67 } │ │ │ │ +68 else │ │ │ │ +69 { │ │ │ │ +70 this->gbump(-1); │ │ │ │ +71 _____r_e_t = traits_type::not_eof(__c); │ │ │ │ +72 } │ │ │ │ +73 } │ │ │ │ +74 return _____r_e_t; │ │ │ │ +75 } │ │ │ │ +76 │ │ │ │ +77 template │ │ │ │ +78 typename basic_stringbuf<_CharT, _Traits, _Alloc>::int_type │ │ │ │ +_7_9 _b_a_s_i_c___s_t_r_i_n_g_b_u_f_<___C_h_a_r_T_,_ ___T_r_a_i_t_s_,_ ___A_l_l_o_c_>_:_: │ │ │ │ +80_ _o_v_e_r_f_l_o_w(int_type __c) │ │ │ │ +81 { │ │ │ │ +82 const bool _____t_e_s_t_o_u_t = this->_M_mode & _i_o_s___b_a_s_e_:_:_o_u_t; │ │ │ │ +83 if (_____b_u_i_l_t_i_n___e_x_p_e_c_t(!_____t_e_s_t_o_u_t, false)) │ │ │ │ +84 return traits_type::eof(); │ │ │ │ +85 │ │ │ │ +86 const bool _____t_e_s_t_e_o_f = traits_type::eq_int_type(__c, traits_type::eof()); │ │ │ │ +87 if (_____b_u_i_l_t_i_n___e_x_p_e_c_t(_____t_e_s_t_e_o_f, false)) │ │ │ │ +88 return traits_type::not_eof(__c); │ │ │ │ +89 │ │ │ │ +90 const __size_type _____c_a_p_a_c_i_t_y = _M_string.capacity(); │ │ │ │ +91 │ │ │ │ +92#if _GLIBCXX_USE_CXX11_ABI │ │ │ │ +93 if (size_t(this->epptr() - this->pbase()) < _____c_a_p_a_c_i_t_y) │ │ │ │ +94 { │ │ │ │ +95 // There is additional capacity in _M_string that can be used. │ │ │ │ +96 char_type* __base = const_cast(_M_string.data()); │ │ │ │ +97 _M_pbump(__base, __base + _____c_a_p_a_c_i_t_y, this->pptr() - this->pbase()); │ │ │ │ +98 if (_M_mode & _i_o_s___b_a_s_e_:_:_i_n) │ │ │ │ +99 { │ │ │ │ +100 const __size_type _____n_g_e_t = this->gptr() - this->eback(); │ │ │ │ +101 const __size_type _____e_g_e_t = this->egptr() - this->eback(); │ │ │ │ +102 this->setg(__base, __base + _____n_g_e_t, __base + _____e_g_e_t + 1); │ │ │ │ +103 } │ │ │ │ +104 *this->pptr() = traits_type::to_char_type(__c); │ │ │ │ +105 this->pbump(1); │ │ │ │ +106 return __c; │ │ │ │ 107 } │ │ │ │ -108 │ │ │ │ -109 _GLIBCXX_NODISCARD │ │ │ │ -110 const _Tp* │ │ │ │ -111 operator->() const _GLIBCXX_NOEXCEPT │ │ │ │ -112 { return _s_t_d_:_:_____a_d_d_r_e_s_s_o_f((operator*())); } │ │ │ │ -113 │ │ │ │ -114 _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r& │ │ │ │ -115 operator++() │ │ │ │ -116 { │ │ │ │ -117 __glibcxx_requires_cond(_M_ok, │ │ │ │ -118 _M_message(__gnu_debug::__msg_inc_istream) │ │ │ │ -119 ._M_iterator(*this)); │ │ │ │ -120 _M_read(); │ │ │ │ -121 return *this; │ │ │ │ -122 } │ │ │ │ -123 │ │ │ │ -124 _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r │ │ │ │ -125 operator++(int) │ │ │ │ -126 { │ │ │ │ -127 __glibcxx_requires_cond(_M_ok, │ │ │ │ -128 _M_message(__gnu_debug::__msg_inc_istream) │ │ │ │ -129 ._M_iterator(*this)); │ │ │ │ -130 _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r __tmp = *this; │ │ │ │ -131 _M_read(); │ │ │ │ -132 return __tmp; │ │ │ │ -133 } │ │ │ │ -134 │ │ │ │ -135 private: │ │ │ │ -136 bool │ │ │ │ -137 _M_equal(const _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r& __x) const _GLIBCXX_NOEXCEPT │ │ │ │ -138 { │ │ │ │ -139 // Ideally this would just return _M_stream == __x._M_stream, │ │ │ │ -140 // but code compiled with old versions never sets _M_stream to null. │ │ │ │ -141 return (_M_ok == __x._M_ok) && (!_M_ok || _M_stream == __x._M_stream); │ │ │ │ -142 } │ │ │ │ -143 │ │ │ │ -144 void │ │ │ │ -145 _M_read() │ │ │ │ -146 { │ │ │ │ -147 if (_M_stream && !(*_M_stream >> _M_value)) │ │ │ │ -148 { │ │ │ │ -149 _M_stream = 0; │ │ │ │ -150 _M_ok = false; │ │ │ │ -151 } │ │ │ │ -152 } │ │ │ │ -153 │ │ │ │ -154 /// Return true if the iterators refer to the same stream, │ │ │ │ -155 /// or are both at end-of-stream. │ │ │ │ -156 _GLIBCXX_NODISCARD │ │ │ │ -157 friend bool │ │ │ │ -_1_5_8 _o_p_e_r_a_t_o_r_=_=(const _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r& __x, const _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r& __y) │ │ │ │ -159 ___G_L_I_B_C_X_X___N_O_E_X_C_E_P_T │ │ │ │ -160 { return __x._M_equal(__y); } │ │ │ │ -161 │ │ │ │ -162#if __cpp_impl_three_way_comparison < 201907L │ │ │ │ -163 /// Return true if the iterators refer to different streams, │ │ │ │ -164 /// or if one is at end-of-stream and the other is not. │ │ │ │ -165 _GLIBCXX_NODISCARD │ │ │ │ -166 friend bool │ │ │ │ -167 operator!=(const _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r& __x, const _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r& __y) │ │ │ │ -168 ___G_L_I_B_C_X_X___N_O_E_X_C_E_P_T │ │ │ │ -169 { return !__x._M_equal(__y); } │ │ │ │ -170#endif │ │ │ │ -171 │ │ │ │ -172#if __cplusplus > 201703L && __cpp_lib_concepts │ │ │ │ -173 [[nodiscard]] │ │ │ │ -174 friend bool │ │ │ │ -175 _o_p_e_r_a_t_o_r_=_=(const _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r& __i, default_sentinel_t) noexcept │ │ │ │ -176 { return !__i._M_stream; } │ │ │ │ -177#endif │ │ │ │ -178 }; │ │ │ │ -179 │ │ │ │ -180 /** │ │ │ │ -181 * @brief Provides output iterator semantics for streams. │ │ │ │ -182 * │ │ │ │ -183 * This class provides an iterator to write to an ostream. The type Tp is │ │ │ │ -184 * the only type written by this iterator and there must be an │ │ │ │ -185 * operator<<(Tp) defined. │ │ │ │ -186 * │ │ │ │ -187 * @tparam _Tp The type to write to the ostream. │ │ │ │ -188 * @tparam _CharT The ostream char_type. │ │ │ │ -189 * @tparam _Traits The ostream char_traits. │ │ │ │ -190 */ │ │ │ │ -191 template > │ │ │ │ -_1_9_3 class _o_s_t_r_e_a_m___i_t_e_r_a_t_o_r │ │ │ │ -194 : public _i_t_e_r_a_t_o_r │ │ │ │ -195 { │ │ │ │ -196 public: │ │ │ │ -197 ///@{ │ │ │ │ -198 /// Public typedef │ │ │ │ -199#if __cplusplus > 201703L │ │ │ │ -_2_0_0 using _d_i_f_f_e_r_e_n_c_e___t_y_p_e = ptrdiff_t; │ │ │ │ -201#endif │ │ │ │ -_2_0_2 typedef _CharT _c_h_a_r___t_y_p_e; │ │ │ │ -_2_0_3 typedef _Traits _t_r_a_i_t_s___t_y_p_e; │ │ │ │ -_2_0_4 typedef _b_a_s_i_c___o_s_t_r_e_a_m_<___C_h_a_r_T_,_ ___T_r_a_i_t_s_> _o_s_t_r_e_a_m___t_y_p_e; │ │ │ │ -205 ///@} │ │ │ │ -206 │ │ │ │ -207 private: │ │ │ │ -208 _o_s_t_r_e_a_m___t_y_p_e* _M_stream; │ │ │ │ -209 const _CharT* _M_string; │ │ │ │ -210 │ │ │ │ -211 public: │ │ │ │ -212 /// Construct from an ostream. │ │ │ │ -_2_1_3 _o_s_t_r_e_a_m___i_t_e_r_a_t_o_r(_o_s_t_r_e_a_m___t_y_p_e& _____s) ___G_L_I_B_C_X_X___N_O_E_X_C_E_P_T │ │ │ │ -214 : _M_stream(_s_t_d_:_:_____a_d_d_r_e_s_s_o_f(_____s)), _M_string(0) {} │ │ │ │ -215 │ │ │ │ -216 /** │ │ │ │ -217 * Construct from an ostream. │ │ │ │ -218 * │ │ │ │ -219 * The delimiter string @a c is written to the stream after every Tp │ │ │ │ -220 * written to the stream. The delimiter is not copied, and thus must │ │ │ │ -221 * not be destroyed while this iterator is in use. │ │ │ │ -222 * │ │ │ │ -223 * @param __s Underlying ostream to write to. │ │ │ │ -224 * @param __c CharT delimiter string to insert. │ │ │ │ -225 */ │ │ │ │ -_2_2_6 _o_s_t_r_e_a_m___i_t_e_r_a_t_o_r(_o_s_t_r_e_a_m___t_y_p_e& _____s, const _CharT* __c) ___G_L_I_B_C_X_X___N_O_E_X_C_E_P_T │ │ │ │ -227 : _M_stream(_s_t_d_:_:_____a_d_d_r_e_s_s_o_f(_____s)), _M_string(__c) { } │ │ │ │ -228 │ │ │ │ -229 /// Copy constructor. │ │ │ │ -_2_3_0 _o_s_t_r_e_a_m___i_t_e_r_a_t_o_r(const _o_s_t_r_e_a_m___i_t_e_r_a_t_o_r& _____o_b_j) ___G_L_I_B_C_X_X___N_O_E_X_C_E_P_T │ │ │ │ -231 : _M_stream(_____o_b_j._M_stream), _M_string(_____o_b_j._M_string) { } │ │ │ │ -232 │ │ │ │ -233#if __cplusplus >= 201103L │ │ │ │ -234 _o_s_t_r_e_a_m___i_t_e_r_a_t_o_r& operator=(const _o_s_t_r_e_a_m___i_t_e_r_a_t_o_r&) = default; │ │ │ │ -235#endif │ │ │ │ -236 │ │ │ │ -237 /// Writes @a value to underlying ostream using operator<<. If │ │ │ │ -238 /// constructed with delimiter string, writes delimiter to ostream. │ │ │ │ -239 _o_s_t_r_e_a_m___i_t_e_r_a_t_o_r& │ │ │ │ -_2_4_0 _o_p_e_r_a_t_o_r_=(const _Tp& __value) │ │ │ │ -241 { │ │ │ │ -242 __glibcxx_requires_cond(_M_stream != 0, │ │ │ │ -243 _M_message(__gnu_debug::__msg_output_ostream) │ │ │ │ -244 ._M_iterator(*this)); │ │ │ │ -245 *_M_stream << __value; │ │ │ │ -246 if (_M_string) │ │ │ │ -247 *_M_stream << _M_string; │ │ │ │ -248 return *this; │ │ │ │ -249 } │ │ │ │ -250 │ │ │ │ -251 _GLIBCXX_NODISCARD │ │ │ │ -252 _o_s_t_r_e_a_m___i_t_e_r_a_t_o_r& │ │ │ │ -253 operator*() ___G_L_I_B_C_X_X___N_O_E_X_C_E_P_T │ │ │ │ -254 { return *this; } │ │ │ │ -255 │ │ │ │ -256 ostream_iterator& │ │ │ │ -257 operator++() _GLIBCXX_NOEXCEPT │ │ │ │ -258 { return *this; } │ │ │ │ -259 │ │ │ │ -260 _o_s_t_r_e_a_m___i_t_e_r_a_t_o_r& │ │ │ │ -261 operator++(int) _GLIBCXX_NOEXCEPT │ │ │ │ -262 { return *this; } │ │ │ │ -263 }; │ │ │ │ -264#pragma GCC diagnostic pop │ │ │ │ -265 │ │ │ │ -266 /// @} group iterators │ │ │ │ -267 │ │ │ │ -268_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ -269} // namespace │ │ │ │ -270 │ │ │ │ -271#endif │ │ │ │ -_d_e_b_u_g_._h │ │ │ │ -_s_t_d_:_:_____a_d_d_r_e_s_s_o_f │ │ │ │ -constexpr _Tp * __addressof(_Tp &__r) noexcept │ │ │ │ -Same as C++11 std::addressof. │ │ │ │ -DDeeffiinniittiioonn _m_o_v_e_._h_:_4_9 │ │ │ │ +108#endif │ │ │ │ +109 │ │ │ │ +110 const __size_type _____m_a_x___s_i_z_e = _M_string.max_size(); │ │ │ │ +111 const bool _____t_e_s_t_p_u_t = this->pptr() < this->epptr(); │ │ │ │ +112 if (_____b_u_i_l_t_i_n___e_x_p_e_c_t(!_____t_e_s_t_p_u_t && _____c_a_p_a_c_i_t_y == _____m_a_x___s_i_z_e, false)) │ │ │ │ +113 return traits_type::eof(); │ │ │ │ +114 │ │ │ │ +115 // Try to append __c into output sequence in one of two ways. │ │ │ │ +116 // Order these tests done in is unspecified by the standard. │ │ │ │ +117 const char_type _____c_o_n_v = traits_type::to_char_type(__c); │ │ │ │ +118 if (!_____t_e_s_t_p_u_t) │ │ │ │ +119 { │ │ │ │ +120 // NB: Start ostringstream buffers at 512 chars. This is an │ │ │ │ +121 // experimental value (pronounced "arbitrary" in some of the │ │ │ │ +122 // hipper English-speaking countries), and can be changed to │ │ │ │ +123 // suit particular needs. │ │ │ │ +124 // │ │ │ │ +125 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ +126 // 169. Bad efficiency of overflow() mandated │ │ │ │ +127 // 432. stringbuf::overflow() makes only one write position │ │ │ │ +128 // available │ │ │ │ +129 const __size_type _____o_p_t___l_e_n = _s_t_d_:_:_m_a_x(__size_type(2 * _____c_a_p_a_c_i_t_y), │ │ │ │ +130 __size_type(512)); │ │ │ │ +131 const __size_type _____l_e_n = _s_t_d_:_:_m_i_n(_____o_p_t___l_e_n, _____m_a_x___s_i_z_e); │ │ │ │ +132 _____s_t_r_i_n_g___t_y_p_e _____t_m_p(_M_string.get_allocator()); │ │ │ │ +133 _____t_m_p.reserve(_____l_e_n); │ │ │ │ +134 if (this->pbase()) │ │ │ │ +135 _____t_m_p.assign(this->pbase(), this->epptr() - this->pbase()); │ │ │ │ +136 _____t_m_p.push_back(_____c_o_n_v); │ │ │ │ +137 _M_string.swap(_____t_m_p); │ │ │ │ +138 _M_sync(const_cast(_M_string.data()), │ │ │ │ +139 _t_h_i_s->gptr() - _t_h_i_s->eback(), _t_h_i_s->pptr() - _t_h_i_s->pbase()); │ │ │ │ +140 } │ │ │ │ +141 else │ │ │ │ +142 *this->pptr() = _____c_o_n_v; │ │ │ │ +143 this->pbump(1); │ │ │ │ +144 return __c; │ │ │ │ +145 } │ │ │ │ +146 │ │ │ │ +147 template │ │ │ │ +148 typename basic_stringbuf<_CharT, _Traits, _Alloc>::int_type │ │ │ │ +_1_4_9 _b_a_s_i_c___s_t_r_i_n_g_b_u_f_<___C_h_a_r_T_,_ ___T_r_a_i_t_s_,_ ___A_l_l_o_c_>_:_: │ │ │ │ +150_ _u_n_d_e_r_f_l_o_w() │ │ │ │ +151 { │ │ │ │ +152 int_type _____r_e_t = traits_type::eof(); │ │ │ │ +153 const bool _____t_e_s_t_i_n = this->_M_mode & _i_o_s___b_a_s_e_:_:_i_n; │ │ │ │ +154 if (_____t_e_s_t_i_n) │ │ │ │ +155 { │ │ │ │ +156 // Update egptr() to match the actual string end. │ │ │ │ +157 _M_update_egptr(); │ │ │ │ +158 │ │ │ │ +159 if (this->gptr() < this->egptr()) │ │ │ │ +160 _____r_e_t = traits_type::to_int_type(*this->gptr()); │ │ │ │ +161 } │ │ │ │ +162 return _____r_e_t; │ │ │ │ +163 } │ │ │ │ +164 │ │ │ │ +165 template │ │ │ │ +166 typename basic_stringbuf<_CharT, _Traits, _Alloc>::pos_type │ │ │ │ +_1_6_7 _b_a_s_i_c___s_t_r_i_n_g_b_u_f_<___C_h_a_r_T_,_ ___T_r_a_i_t_s_,_ ___A_l_l_o_c_>_:_: │ │ │ │ +168_ _s_e_e_k_o_f_f(off_type _____o_f_f, ios_base::seekdir _____w_a_y, ios_base::openmode _____m_o_d_e) │ │ │ │ +169 { │ │ │ │ +170 pos_type _____r_e_t = pos_type(off_type(-1)); │ │ │ │ +171 bool _____t_e_s_t_i_n = (_i_o_s___b_a_s_e_:_:_i_n & this->_M_mode & _____m_o_d_e) != 0; │ │ │ │ +172 bool _____t_e_s_t_o_u_t = (_i_o_s___b_a_s_e_:_:_o_u_t & this->_M_mode & _____m_o_d_e) != 0; │ │ │ │ +173 const bool _____t_e_s_t_b_o_t_h = _____t_e_s_t_i_n && _____t_e_s_t_o_u_t && _____w_a_y != _i_o_s___b_a_s_e_:_:_c_u_r; │ │ │ │ +174 _____t_e_s_t_i_n &= !(_____m_o_d_e & _i_o_s___b_a_s_e_:_:_o_u_t); │ │ │ │ +175 _____t_e_s_t_o_u_t &= !(_____m_o_d_e & _i_o_s___b_a_s_e_:_:_i_n); │ │ │ │ +176 │ │ │ │ +177 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ +178 // 453. basic_stringbuf::seekoff need not always fail for an empty stream. │ │ │ │ +179 const char_type* _____b_e_g = _____t_e_s_t_i_n ? this->eback() : this->pbase(); │ │ │ │ +180 if ((_____b_e_g || !_____o_f_f) && (_____t_e_s_t_i_n || _____t_e_s_t_o_u_t || _____t_e_s_t_b_o_t_h)) │ │ │ │ +181 { │ │ │ │ +182 _M_update_egptr(); │ │ │ │ +183 │ │ │ │ +184 off_type _____n_e_w_o_f_f_i = _____o_f_f; │ │ │ │ +185 off_type _____n_e_w_o_f_f_o = _____n_e_w_o_f_f_i; │ │ │ │ +186 if (_____w_a_y == _i_o_s___b_a_s_e_:_:_c_u_r) │ │ │ │ +187 { │ │ │ │ +188 _____n_e_w_o_f_f_i += this->gptr() - _____b_e_g; │ │ │ │ +189 _____n_e_w_o_f_f_o += this->pptr() - _____b_e_g; │ │ │ │ +190 } │ │ │ │ +191 else if (_____w_a_y == _i_o_s___b_a_s_e_:_:_e_n_d) │ │ │ │ +192 _____n_e_w_o_f_f_o = _____n_e_w_o_f_f_i += this->egptr() - _____b_e_g; │ │ │ │ +193 │ │ │ │ +194 if ((_____t_e_s_t_i_n || _____t_e_s_t_b_o_t_h) │ │ │ │ +195 && _____n_e_w_o_f_f_i >= 0 │ │ │ │ +196 && this->egptr() - _____b_e_g >= _____n_e_w_o_f_f_i) │ │ │ │ +197 { │ │ │ │ +198 this->setg(this->eback(), this->eback() + _____n_e_w_o_f_f_i, │ │ │ │ +199 this->egptr()); │ │ │ │ +200 _____r_e_t = pos_type(_____n_e_w_o_f_f_i); │ │ │ │ +201 } │ │ │ │ +202 if ((_____t_e_s_t_o_u_t || _____t_e_s_t_b_o_t_h) │ │ │ │ +203 && _____n_e_w_o_f_f_o >= 0 │ │ │ │ +204 && this->egptr() - _____b_e_g >= _____n_e_w_o_f_f_o) │ │ │ │ +205 { │ │ │ │ +206 _M_pbump(this->pbase(), this->epptr(), _____n_e_w_o_f_f_o); │ │ │ │ +207 _____r_e_t = pos_type(_____n_e_w_o_f_f_o); │ │ │ │ +208 } │ │ │ │ +209 } │ │ │ │ +210 return _____r_e_t; │ │ │ │ +211 } │ │ │ │ +212 │ │ │ │ +213 template │ │ │ │ +214 typename basic_stringbuf<_CharT, _Traits, _Alloc>::pos_type │ │ │ │ +_2_1_5 _b_a_s_i_c___s_t_r_i_n_g_b_u_f_<___C_h_a_r_T_,_ ___T_r_a_i_t_s_,_ ___A_l_l_o_c_>_:_: │ │ │ │ +216_ _s_e_e_k_p_o_s(pos_type _____s_p, ios_base::openmode _____m_o_d_e) │ │ │ │ +217 { │ │ │ │ +218 pos_type _____r_e_t = pos_type(off_type(-1)); │ │ │ │ +219 const bool _____t_e_s_t_i_n = (_i_o_s___b_a_s_e_:_:_i_n & this->_M_mode & _____m_o_d_e) != 0; │ │ │ │ +220 const bool _____t_e_s_t_o_u_t = (_i_o_s___b_a_s_e_:_:_o_u_t & this->_M_mode & _____m_o_d_e) != 0; │ │ │ │ +221 │ │ │ │ +222 const char_type* _____b_e_g = _____t_e_s_t_i_n ? this->eback() : this->pbase(); │ │ │ │ +223 if ((_____b_e_g || !off_type(_____s_p)) && (_____t_e_s_t_i_n || _____t_e_s_t_o_u_t)) │ │ │ │ +224 { │ │ │ │ +225 _M_update_egptr(); │ │ │ │ +226 │ │ │ │ +227 const off_type _____p_o_s(_____s_p); │ │ │ │ +228 const bool _____t_e_s_t_p_o_s = (0 <= _____p_o_s │ │ │ │ +229 && _____p_o_s <= this->egptr() - _____b_e_g); │ │ │ │ +230 if (_____t_e_s_t_p_o_s) │ │ │ │ +231 { │ │ │ │ +232 if (_____t_e_s_t_i_n) │ │ │ │ +233 this->setg(this->eback(), this->eback() + _____p_o_s, │ │ │ │ +234 this->egptr()); │ │ │ │ +235 if (_____t_e_s_t_o_u_t) │ │ │ │ +236 _M_pbump(this->pbase(), this->epptr(), _____p_o_s); │ │ │ │ +237 _____r_e_t = _____s_p; │ │ │ │ +238 } │ │ │ │ +239 } │ │ │ │ +240 return _____r_e_t; │ │ │ │ +241 } │ │ │ │ +242 │ │ │ │ +243 template │ │ │ │ +244 void │ │ │ │ +245 _b_a_s_i_c___s_t_r_i_n_g_b_u_f_<___C_h_a_r_T_,_ ___T_r_a_i_t_s_,_ ___A_l_l_o_c_>_:_: │ │ │ │ +246_ ___M___s_y_n_c(char_type* __base, __size_type __i, __size_type _____o) │ │ │ │ +247 { │ │ │ │ +248 const bool _____t_e_s_t_i_n = _M_mode & _i_o_s___b_a_s_e_:_:_i_n; │ │ │ │ +249 const bool _____t_e_s_t_o_u_t = _M_mode & _i_o_s___b_a_s_e_:_:_o_u_t; │ │ │ │ +250 char_type* _____e_n_d_g = __base + _M_string.size(); │ │ │ │ +251 char_type* _____e_n_d_p = __base + _M_string.capacity(); │ │ │ │ +252 │ │ │ │ +253 if (__base != _M_string.data()) │ │ │ │ +254 { │ │ │ │ +255 // setbuf: __i == size of buffer area (_M_string.size() == 0). │ │ │ │ +256 _____e_n_d_g += __i; │ │ │ │ +257 __i = 0; │ │ │ │ +258 _____e_n_d_p = _____e_n_d_g; │ │ │ │ +259 } │ │ │ │ +260 │ │ │ │ +261 if (__testin) │ │ │ │ +262 this->setg(__base, __base + __i, __endg); │ │ │ │ +263 if (__testout) │ │ │ │ +264 { │ │ │ │ +265 _M_pbump(__base, __endp, __o); │ │ │ │ +266 // egptr() always tracks the string end. When !__testin, │ │ │ │ +267 // for the correct functioning of the streambuf inlines │ │ │ │ +268 // the other get area pointers are identical. │ │ │ │ +269 if (!__testin) │ │ │ │ +270 this->setg(__endg, __endg, __endg); │ │ │ │ +271 } │ │ │ │ +272 } │ │ │ │ +273 │ │ │ │ +274 template │ │ │ │ +275 void │ │ │ │ +276 basic_stringbuf<_CharT, _Traits, _Alloc>:: │ │ │ │ +277 _M_pbump(char_type* __pbeg, char_type* __pend, off_type __off) │ │ │ │ +278 { │ │ │ │ +279 this->setp(__pbeg, __pend); │ │ │ │ +280 while (__off > __gnu_cxx::__numeric_traits::__max) │ │ │ │ +281 { │ │ │ │ +282 this->pbump(__gnu_cxx::__numeric_traits::__max); │ │ │ │ +283 __off -= __gnu_cxx::__numeric_traits::__max; │ │ │ │ +284 } │ │ │ │ +285 this->pbump(__off); │ │ │ │ +286 } │ │ │ │ +287 │ │ │ │ +288 // Inhibit implicit instantiations for required instantiations, │ │ │ │ +289 // which are defined via explicit instantiations elsewhere. │ │ │ │ +290#if _GLIBCXX_EXTERN_TEMPLATE │ │ │ │ +291 extern template class basic_stringbuf; │ │ │ │ +292 extern template class basic_istringstream; │ │ │ │ +293 extern template class basic_ostringstream; │ │ │ │ +294 extern template class basic_stringstream; │ │ │ │ +295 │ │ │ │ +296#ifdef _GLIBCXX_USE_WCHAR_T │ │ │ │ +297 extern template class basic_stringbuf; │ │ │ │ +298 extern template class basic_istringstream; │ │ │ │ +299 extern template class basic_ostringstream; │ │ │ │ +300 extern template class basic_stringstream; │ │ │ │ +301#endif │ │ │ │ +302#endif │ │ │ │ +303 │ │ │ │ +304_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ +305} // namespace std │ │ │ │ +306 │ │ │ │ +307#endif │ │ │ │ +_s_t_d_:_:_m_a_x │ │ │ │ +constexpr const _Tp & max(const _Tp &, const _Tp &) │ │ │ │ +This does what you think it does. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___a_l_g_o_b_a_s_e_._h_:_2_5_4 │ │ │ │ +_s_t_d_:_:_m_i_n │ │ │ │ +constexpr const _Tp & min(const _Tp &, const _Tp &) │ │ │ │ +This does what you think it does. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___a_l_g_o_b_a_s_e_._h_:_2_3_0 │ │ │ │ _s_t_d │ │ │ │ ISO C++ entities toplevel namespace is std. │ │ │ │ -_s_t_d_:_:_i_s___n_o_t_h_r_o_w___d_e_f_a_u_l_t___c_o_n_s_t_r_u_c_t_i_b_l_e │ │ │ │ -is_nothrow_default_constructible │ │ │ │ -DDeeffiinniittiioonn _t_y_p_e___t_r_a_i_t_s_:_1_0_5_8 │ │ │ │ -_s_t_d_:_:_i_s___n_o_t_h_r_o_w___c_o_p_y___c_o_n_s_t_r_u_c_t_i_b_l_e │ │ │ │ -is_nothrow_copy_constructible │ │ │ │ -DDeeffiinniittiioonn _t_y_p_e___t_r_a_i_t_s_:_1_0_8_1 │ │ │ │ -_s_t_d_:_:_i_t_e_r_a_t_o_r │ │ │ │ -Common iterator class. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___i_t_e_r_a_t_o_r___b_a_s_e___t_y_p_e_s_._h_:_1_2_8 │ │ │ │ -_s_t_d_:_:_i_s_t_r_e_a_m___i_t_e_r_a_t_o_r │ │ │ │ -Provides input iterator semantics for streams. │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m___i_t_e_r_a_t_o_r_._h_:_5_5 │ │ │ │ -_s_t_d_:_:_i_s_t_r_e_a_m___i_t_e_r_a_t_o_r_:_:_i_s_t_r_e_a_m___i_t_e_r_a_t_o_r │ │ │ │ -istream_iterator(istream_type &__s) │ │ │ │ -Construct start of input stream iterator. │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m___i_t_e_r_a_t_o_r_._h_:_7_6 │ │ │ │ -_s_t_d_:_:_i_s_t_r_e_a_m___i_t_e_r_a_t_o_r_:_:_i_s_t_r_e_a_m___i_t_e_r_a_t_o_r │ │ │ │ -constexpr istream_iterator() noexcept(/*conditional */) │ │ │ │ -Construct end of input stream iterator. │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m___i_t_e_r_a_t_o_r_._h_:_7_1 │ │ │ │ -_s_t_d_:_:_i_s_t_r_e_a_m___i_t_e_r_a_t_o_r_:_:_o_p_e_r_a_t_o_r_=_= │ │ │ │ -friend bool operator==(const istream_iterator &__x, const istream_iterator │ │ │ │ -&__y) noexcept │ │ │ │ -Return true if the iterators refer to the same stream, or are both at end-of- │ │ │ │ -stream. │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m___i_t_e_r_a_t_o_r_._h_:_1_5_8 │ │ │ │ -_s_t_d_:_:_o_s_t_r_e_a_m___i_t_e_r_a_t_o_r │ │ │ │ -Provides output iterator semantics for streams. │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m___i_t_e_r_a_t_o_r_._h_:_1_9_5 │ │ │ │ -_s_t_d_:_:_o_s_t_r_e_a_m___i_t_e_r_a_t_o_r_:_:_c_h_a_r___t_y_p_e │ │ │ │ -_CharT char_type │ │ │ │ -Public typedef. │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m___i_t_e_r_a_t_o_r_._h_:_2_0_2 │ │ │ │ -_s_t_d_:_:_o_s_t_r_e_a_m___i_t_e_r_a_t_o_r_:_:_o_s_t_r_e_a_m___i_t_e_r_a_t_o_r │ │ │ │ -ostream_iterator(ostream_type &__s) noexcept │ │ │ │ -Construct from an ostream. │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m___i_t_e_r_a_t_o_r_._h_:_2_1_3 │ │ │ │ -_s_t_d_:_:_o_s_t_r_e_a_m___i_t_e_r_a_t_o_r_:_:_o_s_t_r_e_a_m___i_t_e_r_a_t_o_r │ │ │ │ -ostream_iterator(ostream_type &__s, const _CharT *__c) noexcept │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m___i_t_e_r_a_t_o_r_._h_:_2_2_6 │ │ │ │ -_s_t_d_:_:_o_s_t_r_e_a_m___i_t_e_r_a_t_o_r_:_:_t_r_a_i_t_s___t_y_p_e │ │ │ │ -_Traits traits_type │ │ │ │ -Public typedef. │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m___i_t_e_r_a_t_o_r_._h_:_2_0_3 │ │ │ │ -_s_t_d_:_:_o_s_t_r_e_a_m___i_t_e_r_a_t_o_r_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ -ostream_iterator & operator=(const _Tp &__value) │ │ │ │ -Writes value to underlying ostream using operator<<. If constructed with │ │ │ │ -delimiter string,... │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m___i_t_e_r_a_t_o_r_._h_:_2_4_0 │ │ │ │ -_s_t_d_:_:_o_s_t_r_e_a_m___i_t_e_r_a_t_o_r_:_:_d_i_f_f_e_r_e_n_c_e___t_y_p_e │ │ │ │ -ptrdiff_t difference_type │ │ │ │ -Public typedef. │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m___i_t_e_r_a_t_o_r_._h_:_2_0_0 │ │ │ │ -_s_t_d_:_:_o_s_t_r_e_a_m___i_t_e_r_a_t_o_r_:_:_o_s_t_r_e_a_m___t_y_p_e │ │ │ │ -basic_ostream< _CharT, _Traits > ostream_type │ │ │ │ -Public typedef. │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m___i_t_e_r_a_t_o_r_._h_:_2_0_4 │ │ │ │ -_s_t_d_:_:_o_s_t_r_e_a_m___i_t_e_r_a_t_o_r_:_:_o_s_t_r_e_a_m___i_t_e_r_a_t_o_r │ │ │ │ -ostream_iterator(const ostream_iterator &__obj) noexcept │ │ │ │ -Copy constructor. │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m___i_t_e_r_a_t_o_r_._h_:_2_3_0 │ │ │ │ +_s_t_d_:_:_b_a_s_i_c___s_t_r_i_n_g_b_u_f │ │ │ │ +The actual work of input and output (for std::string). │ │ │ │ +DDeeffiinniittiioonn _s_s_t_r_e_a_m_:_7_8 │ │ │ │ +_s_t_d_:_:_b_a_s_i_c___s_t_r_i_n_g_b_u_f_:_:_u_n_d_e_r_f_l_o_w │ │ │ │ +virtual int_type underflow() │ │ │ │ +Fetches more data from the controlled sequence. │ │ │ │ +DDeeffiinniittiioonn _s_s_t_r_e_a_m_._t_c_c_:_1_5_0 │ │ │ │ +_s_t_d_:_:_b_a_s_i_c___s_t_r_i_n_g_b_u_f_:_:_s_e_e_k_p_o_s │ │ │ │ +virtual pos_type seekpos(pos_type __sp, ios_base::openmode __mode=ios_base:: │ │ │ │ +in|ios_base::out) │ │ │ │ +Alters the stream positions. │ │ │ │ +DDeeffiinniittiioonn _s_s_t_r_e_a_m_._t_c_c_:_2_1_6 │ │ │ │ +_s_t_d_:_:_b_a_s_i_c___s_t_r_i_n_g_b_u_f_:_:_s_e_e_k_o_f_f │ │ │ │ +virtual pos_type seekoff(off_type __off, ios_base::seekdir __way, ios_base:: │ │ │ │ +openmode __mode=ios_base::in|ios_base::out) │ │ │ │ +Alters the stream positions. │ │ │ │ +DDeeffiinniittiioonn _s_s_t_r_e_a_m_._t_c_c_:_1_6_8 │ │ │ │ +_s_t_d_:_:_b_a_s_i_c___s_t_r_i_n_g_b_u_f_:_:_o_v_e_r_f_l_o_w │ │ │ │ +virtual int_type overflow(int_type __c=traits_type::eof()) │ │ │ │ +Consumes data from the buffer; writes to the controlled sequence. │ │ │ │ +DDeeffiinniittiioonn _s_s_t_r_e_a_m_._t_c_c_:_8_0 │ │ │ │ +_s_t_d_:_:_b_a_s_i_c___s_t_r_i_n_g_b_u_f_:_:_p_b_a_c_k_f_a_i_l │ │ │ │ +virtual int_type pbackfail(int_type __c=traits_type::eof()) │ │ │ │ +Tries to back up the input sequence. │ │ │ │ +DDeeffiinniittiioonn _s_s_t_r_e_a_m_._t_c_c_:_4_6 │ │ │ │ +_s_t_d_:_:_b_a_s_i_c___s_t_r_i_n_g_<_ _c_h_a_r___t_y_p_e_,_ ___T_r_a_i_t_s_,_ ___A_l_l_o_c_ _> │ │ │ │ +_s_t_d_:_:_i_o_s___b_a_s_e_:_:_c_u_r │ │ │ │ +static const seekdir cur │ │ │ │ +Request a seek relative to the current position within the sequence. │ │ │ │ +DDeeffiinniittiioonn _i_o_s___b_a_s_e_._h_:_4_9_8 │ │ │ │ +_s_t_d_:_:_i_o_s___b_a_s_e_:_:_e_n_d │ │ │ │ +static const seekdir end │ │ │ │ +Request a seek relative to the current end of the sequence. │ │ │ │ +DDeeffiinniittiioonn _i_o_s___b_a_s_e_._h_:_5_0_1 │ │ │ │ +_s_t_d_:_:_i_o_s___b_a_s_e_:_:_i_n │ │ │ │ +static const openmode in │ │ │ │ +Open for input. Default for ifstream and fstream. │ │ │ │ +DDeeffiinniittiioonn _i_o_s___b_a_s_e_._h_:_4_6_6 │ │ │ │ +_s_t_d_:_:_i_o_s___b_a_s_e_:_:_o_u_t │ │ │ │ +static const openmode out │ │ │ │ +Open for output. Default for ofstream and fstream. │ │ │ │ +DDeeffiinniittiioonn _i_o_s___b_a_s_e_._h_:_4_6_9 │ │ │ │ _s_t_d_:_:_a_u_t_o___p_t_r___r_e_f │ │ │ │ DDeeffiinniittiioonn _a_u_t_o___p_t_r_._h_:_4_9 │ │ │ │ * _b_i_t_s │ │ │ │ - * _s_t_r_e_a_m___i_t_e_r_a_t_o_r_._h │ │ │ │ + * _s_s_t_r_e_a_m_._t_c_c │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-12-base/libstdc++/user/a00407_source.html │ │ │ @@ -106,26 +106,26 @@ │ │ │
52 * This is an internal header file, included by other library headers.
│ │ │
53 * Do not attempt to use it directly. @headername{vector}
│ │ │
54 */
│ │ │
55
│ │ │
56#ifndef _STL_VECTOR_H
│ │ │
57#define _STL_VECTOR_H 1
│ │ │
58
│ │ │ - │ │ │ -
60#include <bits/functexcept.h>
│ │ │ -
61#include <bits/concept_check.h>
│ │ │ + │ │ │ +
60#include <bits/functexcept.h>
│ │ │ +
61#include <bits/concept_check.h>
│ │ │
62#if __cplusplus >= 201103L
│ │ │
63#include <initializer_list>
│ │ │
64#endif
│ │ │
65#if __cplusplus >= 202002L
│ │ │
66# include <compare>
│ │ │
67#define __cpp_lib_constexpr_vector 201907L
│ │ │
68#endif
│ │ │
69
│ │ │ -
70#include <debug/assertions.h>
│ │ │ +
70#include <debug/assertions.h>
│ │ │
71
│ │ │
72#if _GLIBCXX_SANITIZE_STD_ALLOCATOR && _GLIBCXX_SANITIZE_VECTOR
│ │ │
73extern "C" void
│ │ │
74__sanitizer_annotate_contiguous_container(const void*, const void*,
│ │ │
75 const void*, const void*);
│ │ │
76#endif
│ │ │
77
│ │ │ @@ -2317,44 +2317,44 @@ │ │ │
2133} // namespace std
│ │ │
2134
│ │ │
2135#endif /* _STL_VECTOR_H */
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │
integral_constant< bool, true > true_type
The type used as a compile-time boolean with true value.
Definition type_traits:82
│ │ │
integral_constant< bool, false > false_type
The type used as a compile-time boolean with false value.
Definition type_traits:85
│ │ │
constexpr bool is_constant_evaluated() noexcept
Returns true only when called during constant evaluation.
Definition type_traits:3541
│ │ │ -
constexpr std::remove_reference< _Tp >::type && move(_Tp &&__t) noexcept
Convert a value to an rvalue.
Definition move.h:104
│ │ │ +
constexpr std::remove_reference< _Tp >::type && move(_Tp &&__t) noexcept
Convert a value to an rvalue.
Definition move.h:104
│ │ │
void swap(any &__x, any &__y) noexcept
Exchange the states of two any objects.
Definition any:429
│ │ │ -
constexpr _Tp * __addressof(_Tp &__r) noexcept
Same as C++11 std::addressof.
Definition move.h:49
│ │ │ -
constexpr const _Tp & max(const _Tp &, const _Tp &)
This does what you think it does.
│ │ │ -
constexpr const _Tp & min(const _Tp &, const _Tp &)
This does what you think it does.
│ │ │ -
constexpr iterator_traits< _Iter >::iterator_category __iterator_category(const _Iter &)
│ │ │ +
constexpr _Tp * __addressof(_Tp &__r) noexcept
Same as C++11 std::addressof.
Definition move.h:49
│ │ │ +
constexpr const _Tp & max(const _Tp &, const _Tp &)
This does what you think it does.
│ │ │ +
constexpr const _Tp & min(const _Tp &, const _Tp &)
This does what you think it does.
│ │ │ +
constexpr iterator_traits< _Iter >::iterator_category __iterator_category(const _Iter &)
│ │ │
ISO C++ entities toplevel namespace is std.
│ │ │ -
constexpr iterator_traits< _InputIterator >::difference_type distance(_InputIterator __first, _InputIterator __last)
A generalization of pointer arithmetic.
│ │ │ -
constexpr void _Destroy(_ForwardIterator __first, _ForwardIterator __last)
│ │ │ +
constexpr iterator_traits< _InputIterator >::difference_type distance(_InputIterator __first, _InputIterator __last)
A generalization of pointer arithmetic.
│ │ │ +
constexpr void _Destroy(_ForwardIterator __first, _ForwardIterator __last)
│ │ │
integral_constant
Definition type_traits:63
│ │ │ │ │ │
is_nothrow_default_constructible
Definition type_traits:1058
│ │ │
is_nothrow_move_assignable
Definition type_traits:1210
│ │ │
typename __detected_or_t< is_empty< _Alloc >, __equal, _Alloc >::type is_always_equal
Whether all instances of the allocator type compare equal.
│ │ │ -
The standard allocator, as per C++03 [20.4.1].
Definition allocator.h:130
│ │ │ +
The standard allocator, as per C++03 [20.4.1].
Definition allocator.h:130
│ │ │ │ │ │ -
Marking input iterators.
│ │ │ -
Forward iterators support a superset of input iterator operations.
│ │ │ -
Random-access iterators support a superset of bidirectional iterator operations.
│ │ │ -
Common iterator class.
│ │ │ +
Marking input iterators.
│ │ │ +
Forward iterators support a superset of input iterator operations.
│ │ │ +
Random-access iterators support a superset of bidirectional iterator operations.
│ │ │ +
Common iterator class.
│ │ │
See bits/stl_deque.h's _Deque_base for an explanation.
Definition stl_vector.h:86
│ │ │
A standard container which offers fixed time access to individual elements in any order.
Definition stl_vector.h:429
│ │ │ -
constexpr iterator insert(const_iterator __position, const value_type &__x)
Inserts given value into vector before specified iterator.
Definition vector.tcc:135
│ │ │ +
constexpr iterator insert(const_iterator __position, const value_type &__x)
Inserts given value into vector before specified iterator.
Definition vector.tcc:135
│ │ │
constexpr void push_back(const value_type &__x)
Add data to the end of the vector.
│ │ │
constexpr void resize(size_type __new_size, const value_type &__x)
Resizes the vector to the specified number of elements.
│ │ │
constexpr vector & operator=(initializer_list< value_type > __l)
Vector list assignment operator.
Definition stl_vector.h:788
│ │ │
constexpr reverse_iterator rbegin() noexcept
Definition stl_vector.h:913
│ │ │
constexpr iterator end() noexcept
Definition stl_vector.h:893
│ │ │
constexpr vector(const vector &__x)
Vector copy constructor.
Definition stl_vector.h:601
│ │ │
vector()=default
Creates a vector with no elements.
│ │ │ @@ -2374,15 +2374,15 @@ │ │ │
constexpr _Tp * data() noexcept
│ │ │
constexpr vector(size_type __n, const allocator_type &__a=allocator_type())
Creates a vector with default constructed elements.
Definition stl_vector.h:556
│ │ │
constexpr const_reference front() const noexcept
│ │ │
constexpr vector & operator=(const vector &__x)
Vector assignment operator.
│ │ │
constexpr void pop_back() noexcept
Removes last element.
│ │ │
constexpr vector & operator=(vector &&__x) noexcept(_Alloc_traits::_S_nothrow_move())
Vector move assignment operator.
Definition stl_vector.h:766
│ │ │
constexpr const_reference back() const noexcept
│ │ │ -
constexpr void reserve(size_type __n)
Attempt to preallocate enough memory for specified number of elements.
Definition vector.tcc:68
│ │ │ +
constexpr void reserve(size_type __n)
Attempt to preallocate enough memory for specified number of elements.
Definition vector.tcc:68
│ │ │
constexpr reference at(size_type __n)
Provides access to the data contained in the vector.
│ │ │
constexpr void resize(size_type __new_size)
Resizes the vector to the specified number of elements.
│ │ │
constexpr void _M_range_check(size_type __n) const
Safety check used only from at().
│ │ │
constexpr reference front() noexcept
│ │ │
constexpr iterator insert(const_iterator __position, size_type __n, const value_type &__x)
Inserts a number of copies of given data into the vector.
│ │ │
constexpr const_reference operator[](size_type __n) const noexcept
Subscript access to the data contained in the vector.
│ │ │
constexpr vector(const allocator_type &__a) noexcept
Creates a vector with no elements.
Definition stl_vector.h:542
│ │ │ @@ -2406,15 +2406,15 @@ │ │ │
constexpr vector(size_type __n, const value_type &__value, const allocator_type &__a=allocator_type())
Creates a vector with copies of an exemplar element.
Definition stl_vector.h:569
│ │ │
constexpr reference back() noexcept
│ │ │
constexpr const_reverse_iterator crend() const noexcept
Definition stl_vector.h:984
│ │ │
constexpr const_iterator cend() const noexcept
Definition stl_vector.h:964
│ │ │
constexpr reference operator[](size_type __n) noexcept
Subscript access to the data contained in the vector.
│ │ │
constexpr void shrink_to_fit()
│ │ │
constexpr size_type max_size() const noexcept
Definition stl_vector.h:998
│ │ │ - │ │ │ + │ │ │
Uniform interface to C++98 and C++11 allocators.
│ │ │
static constexpr size_type max_size(const _Tp_alloc_type &__a) noexcept
The maximum supported allocation size.
│ │ │ │ │ │ │ │ │ │ │ │