--- /srv/rebuilderd/tmp/rebuilderd4ABKEH/inputs/libstdc++-11-doc_11.5.0-9_all.deb +++ /srv/rebuilderd/tmp/rebuilderd4ABKEH/out/libstdc++-11-doc_11.5.0-9_all.deb ├── file list │ @@ -1,3 +1,3 @@ │ -rw-r--r-- 0 0 0 4 2026-02-24 09:32:12.000000 debian-binary │ --rw-r--r-- 0 0 0 184300 2026-02-24 09:32:12.000000 control.tar.xz │ --rw-r--r-- 0 0 0 9956532 2026-02-24 09:32:12.000000 data.tar.xz │ +-rw-r--r-- 0 0 0 185316 2026-02-24 09:32:12.000000 control.tar.xz │ +-rw-r--r-- 0 0 0 9981764 2026-02-24 09:32:12.000000 data.tar.xz ├── control.tar.xz │ ├── control.tar │ │ ├── ./md5sums │ │ │ ├── ./md5sums │ │ │ │┄ Files differ │ │ │ ├── line order │ │ │ │ @@ -191,17 +191,17 @@ │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/_formulas.log │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/_formulas.tex.gz │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/_formulas_dark.log │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/_formulas_dark.tex.gz │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00002.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00002_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00005.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a00005.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00005_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00008.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a00008.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00008_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00011.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00011_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00014.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00014_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00017_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00020_source.html │ │ │ │ @@ -437,366 +437,368 @@ │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00311.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00311_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00314.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00314_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00317.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00317_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00320.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a00320.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00320_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00323.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a00323.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00323_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00326.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00326.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00326_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00329.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00329_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00332.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a00332.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00332_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00335.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00335_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00338.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00338_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00341.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a00341.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00341_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00344.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a00344.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00344_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00347.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00347_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00350.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a00350.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00350_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00353.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a00353.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00353_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00356.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a00356.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00356_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00359.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00359_source.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a00362.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00362_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00365.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00365.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00365_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00368.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a00368.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00368_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00371.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00371.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00371_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00374.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a00374.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00374_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00377.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00377.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00377_source.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a00380.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a00380.js │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a00380_source.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a00383.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a00383_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00386.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a00386.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00386_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00389.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00389_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00392.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00392_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00395.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a00395.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00395_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00398.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00398.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00398_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00401.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00401.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00401_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00404.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a00404.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00404_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00407.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00407.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00407_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00410.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00410.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00410_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00413.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00413.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00413_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00416.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00416.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00416_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00419.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a00419.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00419_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00422.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00422.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00422_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00425.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a00425.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00425_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00428.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a00428.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00428_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00431.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a00431.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00431_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00434.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00434.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00434_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00437.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a00437.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00437_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00440.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a00440.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00440_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00443.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a00443.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00443_source.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a00446.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a00446.js │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a00446_source.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a00449.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a00449_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00452.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a00452.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00452_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00455.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00455.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00455_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00458.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a00458.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00458_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00461.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a00461.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00461_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00464.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00464.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00464_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00467.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00467.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00467_source.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a00470.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a00470.js │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a00470_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00473.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00473.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00473_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00476.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00476.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00476_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00479.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00479.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00479_source.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a00482.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a00482_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00485.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00485_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00488.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a00488.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00488_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00491.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00491_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00494.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00494.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00494_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00497.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a00497.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00497_source.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a00500.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a00500_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00503.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a00503.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00503_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00506.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a00506.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00506_source.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a00509.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a00509_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00512.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a00512.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00512_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00515.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00515_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00518.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a00518.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00518_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00521.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a00521.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00521_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00524.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00524_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00527.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00527_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00530.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a00530.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00530_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00533.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a00533.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00533_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00536.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a00536.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00536_source.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a00539.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a00539.js │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a00539_source.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a00542.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a00542_source.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a00545.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a00545_source.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a00548.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a00548_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00551.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00551_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00554.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a00554.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00554_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00557.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a00557.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00557_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00560.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00560_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00563.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a00563.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00563_source.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a00566.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a00566_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00569.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00569.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00569_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00572.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a00572.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00572_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00575.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00575.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00575_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00578.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00578_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00581.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a00581.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00581_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00584.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00584_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00587.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a00587.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00587_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00590.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00590.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00590_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00593.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00593_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00596.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00596.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00596_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00599.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a00599.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00599_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00602.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a00602.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00602_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00605.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a00605.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00605_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00608.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a00608.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00608_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00611.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a00611.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00611_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00614.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a00614.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00614_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00617.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a00617.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00617_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00620.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00620.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00620_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00623.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00623_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00626.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a00626.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00626_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00629.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a00629.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00629_source.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a00632.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a00632_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00635.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00635_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00638.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a00638.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00638_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00641.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00641.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00641_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00644.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00644.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00644_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00647.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00647_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00650.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a00650.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00650_source.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a00653.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a00653_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00656.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a00656.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00656_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00659.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a00659.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00659_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00662.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a00662.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00662_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00665.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00665_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00668.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00668_source.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a00671.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a00671_source.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a00674.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a00674.js │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a00674_source.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a00677.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a00677.js │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a00677_source.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a00680.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a00680_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00683.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00683.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00683_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00686.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00686.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00686_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00689.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a00689.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00689_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00692.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a00692.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00692_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00695.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00695_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00698.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00698_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00701.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00701_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00704.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00704.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00704_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00707.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00707_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00710.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a00710.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00710_source.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a00713.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00713_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00716.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a00716.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00716_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00719.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a00719.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00719_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00722.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00722.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00722_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00725.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a00725.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00725_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00728.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00728_source.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a00731.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a00731_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00734.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00734_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00737.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a00737.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00737_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00740.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a00740.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00740_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00743.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00743_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00746.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00746_source.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a00749.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a00749.js │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a00749_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00752.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a00752.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00752_source.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a00755.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a00755.js │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a00755_source.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a00758.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00758_source.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a00761.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a00761.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00761_source.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a00764.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00764_source.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a00767.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00767_source.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a00770.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00770_source.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a00773.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00773_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00776.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00776_source.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a00779.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00779_source.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a00785.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a00782.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a00782_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00785_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00788.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00788_source.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a00791.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a00791_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00794.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a00794.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00794_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00797.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00797_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00800.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00800_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00803.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00803_source.html │ │ │ │ @@ -805,23 +807,21 @@ │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00809.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00809_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00812.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00812_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00815.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00815_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00818.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a00818.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00818_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00821.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00821_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00824.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00824_source.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a00827.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00827_source.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a00830.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a00830.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00830_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00833.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00833_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00836.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00836.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00836_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00839.html │ │ │ │ @@ -836,66 +836,66 @@ │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00848_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00851.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00851_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00854.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00854.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00854_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00857.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a00857.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00857_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00860.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00860.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00860_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00863.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00863.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00863_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00866.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a00866.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00866_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00869.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a00869.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00869_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00872.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a00872.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00872_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00875.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00875.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00875_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00878.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00878_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00881.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00881.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00881_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00884.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a00884.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00884_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00887.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00887.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00887_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00890.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00890.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00890_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00893.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00893.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00893_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00896.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a00896.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00896_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00899.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00899.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00899_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00902.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a00902.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00902_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00905.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a00905.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00905_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00908.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00908.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00908_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00911.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a00911.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00911_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00914.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a00914.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00914_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00917.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00917_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00920.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00920_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00923.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00923_source.html │ │ │ │ @@ -914,48 +914,48 @@ │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00938.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00938.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00938_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00941.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00941.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00941_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00944.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a00944.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00944_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00947.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a00947.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00947_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00950.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00950.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00950_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00953.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00953.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00953_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00956.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00956.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00956_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00959.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a00959.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00959_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00962.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a00962.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00962_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00965.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00965.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00965_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00968.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a00968.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00968_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00971.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00971.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00971_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00974.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00974.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00974_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00977.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00977.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00977_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00980.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a00980.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00980_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00983.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00983.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00983_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00986.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00986.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00986_source.html │ │ │ │ @@ -968,15 +968,14 @@ │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00995.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00995.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00995_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00998.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00998.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a00998_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01001.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a01001.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01001_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01004.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01004.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01004_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01007.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01007.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01007_source.html │ │ │ │ @@ -992,66 +991,66 @@ │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01019.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01019.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01019_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01022.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01022.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01022_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01025.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a01025.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01025_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01028.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a01028.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01028_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01031.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01031.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01031_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01034.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01034.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01034_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01037.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a01037.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01037_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01040.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01040.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01040_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01043.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a01043.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01043_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01046.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a01046.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01046_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01049.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01049.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01049_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01052.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01052.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01052_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01055.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01055.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01055_source.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a01058_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01061_source.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a01064.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01064_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01067_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01070_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01073_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01076_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01079_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01082_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01085_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01088_source.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a01094.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a01091_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01094_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01097.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01097_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01100.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01100_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01103.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01103_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01106.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01106_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01109.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a01109.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01109_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01112.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01112.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01112_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01115.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01115_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01118.html │ │ │ │ @@ -1064,135 +1063,136 @@ │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01124_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01127.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01127.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01127_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01130.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01130_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01133.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a01133.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01133_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01136.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01136.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01136_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01139.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01139.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01139_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01142.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a01142.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01142_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01145.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a01145.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01145_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01148.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a01148.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01148_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01151.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01151_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01154.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a01154.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01154_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01157.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a01157.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01157_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01160.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a01160.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01160_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01163.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a01163.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01163_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01166.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01166_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01169.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a01169.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01169_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01172.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a01172.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01172_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01175.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01175.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01175_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01178.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01178.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01178_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01181.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a01181.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01181_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01184.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01184_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01187.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a01187.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01187_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01190.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01190.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01190_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01193.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01193.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01193_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01196.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01196_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01199.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a01199.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01199_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01202.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01202.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01202_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01205.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a01205.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01205_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01208.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a01208.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01208_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01211.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01211_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01214.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01214_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01217.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a01217.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01217_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01220.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01220.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01220_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01223.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a01223.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01223_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01226.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01226_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01229.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01229.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01229_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01232.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01232.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01232_source.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a01241.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a01241.js │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a01241_source.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a01262.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a01262.js │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a01262_source.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a01265.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a01265.js │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a01265_source.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a01280.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a01280_source.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a01238.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a01238.js │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a01238_source.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a01247.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a01247.js │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a01247_source.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a01253.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a01253_source.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a01271.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a01271.js │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a01271_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01283.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01283_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01286.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01286.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01286_source.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a01298.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a01298.js │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a01298_source.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a01304.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a01304_source.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a01295.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a01295_source.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a01301.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a01301.js │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a01301_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01307.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01307.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01307_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01310.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01310.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01310_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01313.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01313_source.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a01325.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a01325_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01340.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01340_source.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a01358.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a01358.js │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a01358_source.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a01361.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a01361_source.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a01349.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a01349.js │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a01349_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01364.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01364_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01367.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01367.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01367_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01370.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01370.js │ │ │ │ @@ -1209,46 +1209,46 @@ │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01385.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01385.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01385_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01388.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01388.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01388_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01391.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a01391.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01391_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01394.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a01394.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01394_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01397.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01397.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01397_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01400.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01400_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01403.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a01403.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01403_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01406.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01406.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01406_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01409.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01409.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01409_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01412.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a01412.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01412_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01415.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a01415.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01415_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01418.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a01418.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01418_source.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a01424.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a01424.js │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a01424_source.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a01421.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a01421.js │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a01421_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01427.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a01427.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01427_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01430.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a01430.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01430_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01433.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01433.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01433_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01436.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01436.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01436_source.html │ │ │ │ @@ -1258,44 +1258,44 @@ │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01442_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01445.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01445_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01448.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01448.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01448_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01451.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a01451.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01451_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01454.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a01454.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01454_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01457.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01457_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01460.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01460_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01463.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01463_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01466.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a01466.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01466_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01469.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a01469.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01469_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01472.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01472.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01472_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01475.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01475.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01475_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01478.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01478.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01478_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01481.html │ │ │ │ +usr/share/doc/gcc-11-base/libstdc++/user/a01481.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01481_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01484.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01484_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01487.html │ │ │ │ -usr/share/doc/gcc-11-base/libstdc++/user/a01487.js │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01487_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01490.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01490_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01493.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01493_source.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01496.html │ │ │ │ usr/share/doc/gcc-11-base/libstdc++/user/a01496_source.html ├── data.tar.xz │ ├── data.tar │ │ ├── file list │ │ │ @@ -196,25 +196,25 @@ │ │ │ -rw-r--r-- 0 root (0) root (0) 6686 2024-07-19 05:52:47.000000 ./usr/share/doc/gcc-11-base/libstdc++/manual/using_namespaces.html │ │ │ -rw-r--r-- 0 root (0) root (0) 5620 2024-07-19 05:52:47.000000 ./usr/share/doc/gcc-11-base/libstdc++/manual/utilities.html │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/ │ │ │ -rw-r--r-- 0 root (0) root (0) 2955 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/_formulas.log │ │ │ -rw-r--r-- 0 root (0) root (0) 2076 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/_formulas.tex.gz │ │ │ -rw-r--r-- 0 root (0) root (0) 2953 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/_formulas_dark.log │ │ │ -rw-r--r-- 0 root (0) root (0) 2091 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/_formulas_dark.tex.gz │ │ │ --rw-r--r-- 0 root (0) root (0) 4262 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00002.html │ │ │ --rw-r--r-- 0 root (0) root (0) 15606 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00002_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 40554 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00005.html │ │ │ --rw-r--r-- 0 root (0) root (0) 1146 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00005.js │ │ │ --rw-r--r-- 0 root (0) root (0) 67756 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00005_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4317 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00008.html │ │ │ --rw-r--r-- 0 root (0) root (0) 9089 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00008_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3064 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00011.html │ │ │ --rw-r--r-- 0 root (0) root (0) 14321 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00011_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4325 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00014.html │ │ │ --rw-r--r-- 0 root (0) root (0) 10051 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00014_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3064 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00002.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 14321 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00002_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4325 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00005.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 10051 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00005_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 40554 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00008.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 1146 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00008.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 67756 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00008_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4262 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00011.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 15606 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00011_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4317 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00014.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9089 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00014_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 9055 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00017_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 31288 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00020_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 3805 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00023.html │ │ │ -rw-r--r-- 0 root (0) root (0) 155238 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00023_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 23016 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00026.html │ │ │ -rw-r--r-- 0 root (0) root (0) 109 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00026.js │ │ │ -rw-r--r-- 0 root (0) root (0) 112431 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00026_source.html │ │ │ @@ -444,890 +444,890 @@ │ │ │ -rw-r--r-- 0 root (0) root (0) 14990 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00308_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 6931 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00311.html │ │ │ -rw-r--r-- 0 root (0) root (0) 47491 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00311_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 4680 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00314.html │ │ │ -rw-r--r-- 0 root (0) root (0) 14224 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00314_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 5075 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00317.html │ │ │ -rw-r--r-- 0 root (0) root (0) 18634 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00317_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5230 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00320.html │ │ │ --rw-r--r-- 0 root (0) root (0) 196 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00320.js │ │ │ --rw-r--r-- 0 root (0) root (0) 33962 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00320_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4558 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00323.html │ │ │ --rw-r--r-- 0 root (0) root (0) 11985 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00323_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7900 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00326.html │ │ │ --rw-r--r-- 0 root (0) root (0) 444 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00326.js │ │ │ --rw-r--r-- 0 root (0) root (0) 47480 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00326_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6454 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00329.html │ │ │ --rw-r--r-- 0 root (0) root (0) 9528 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00329_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4003 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00332.html │ │ │ --rw-r--r-- 0 root (0) root (0) 16172 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00332_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7230 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00335.html │ │ │ --rw-r--r-- 0 root (0) root (0) 14671 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00335_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3727 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00338.html │ │ │ --rw-r--r-- 0 root (0) root (0) 11904 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00338_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6594 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00341.html │ │ │ --rw-r--r-- 0 root (0) root (0) 105 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00341.js │ │ │ --rw-r--r-- 0 root (0) root (0) 12926 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00341_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4828 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00344.html │ │ │ --rw-r--r-- 0 root (0) root (0) 174253 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00344_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 105712 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00347.html │ │ │ --rw-r--r-- 0 root (0) root (0) 94588 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00347_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3875 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00350.html │ │ │ --rw-r--r-- 0 root (0) root (0) 121161 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00350_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 11118 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00353.html │ │ │ --rw-r--r-- 0 root (0) root (0) 37833 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00353_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 88034 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00356.html │ │ │ --rw-r--r-- 0 root (0) root (0) 111874 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00356_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3257 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00359.html │ │ │ --rw-r--r-- 0 root (0) root (0) 41975 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00359_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 37121 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00362_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 11037 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00365.html │ │ │ --rw-r--r-- 0 root (0) root (0) 187 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00365.js │ │ │ --rw-r--r-- 0 root (0) root (0) 414965 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00365_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 12541 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00368.html │ │ │ --rw-r--r-- 0 root (0) root (0) 187 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00368.js │ │ │ --rw-r--r-- 0 root (0) root (0) 485218 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00368_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6284 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00371.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3875 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00320.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 121161 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00320_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8754 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00323.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 506 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00323.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 75197 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00323_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 10669 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00326.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 783 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00326.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 69542 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00326_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3840 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00329.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 116599 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00329_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 25041 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00332.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4289 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00332.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 100947 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00332_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 17323 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00335.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 119231 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00335_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 11118 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00338.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 37833 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00338_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4109 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00341.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 41683 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00341_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 36262 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00344.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6354 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00344.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 269567 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00344_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7230 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00347.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 14671 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00347_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 10029 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00350.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 506 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00350.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 143254 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00350_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 12541 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00353.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 187 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00353.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 485218 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00353_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 10714 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00356.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 929 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00356.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 293073 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00356_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4110 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00359.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 51135 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00359_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4625 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00362.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 53700 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00362_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6353 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00365.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 266 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00365.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 40505 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00365_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4837 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00368.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 217828 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00368_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6594 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00371.html │ │ │ -rw-r--r-- 0 root (0) root (0) 105 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00371.js │ │ │ --rw-r--r-- 0 root (0) root (0) 216445 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00371_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4109 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00374.html │ │ │ --rw-r--r-- 0 root (0) root (0) 41683 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00374_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5488 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00377.html │ │ │ --rw-r--r-- 0 root (0) root (0) 192 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00377.js │ │ │ --rw-r--r-- 0 root (0) root (0) 80636 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00377_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5230 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00380.html │ │ │ --rw-r--r-- 0 root (0) root (0) 206 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00380.js │ │ │ --rw-r--r-- 0 root (0) root (0) 24779 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00380_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5282 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00386.html │ │ │ --rw-r--r-- 0 root (0) root (0) 339 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00386.js │ │ │ --rw-r--r-- 0 root (0) root (0) 21313 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00386_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6514 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00389.html │ │ │ --rw-r--r-- 0 root (0) root (0) 37982 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00389_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 11196 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00392.html │ │ │ --rw-r--r-- 0 root (0) root (0) 102917 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00392_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4625 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00395.html │ │ │ --rw-r--r-- 0 root (0) root (0) 53700 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00395_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 14348 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00398.html │ │ │ --rw-r--r-- 0 root (0) root (0) 653 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00398.js │ │ │ --rw-r--r-- 0 root (0) root (0) 361413 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00398_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 10019 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00401.html │ │ │ --rw-r--r-- 0 root (0) root (0) 984 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00401.js │ │ │ --rw-r--r-- 0 root (0) root (0) 179662 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00401_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 9096 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00404.html │ │ │ --rw-r--r-- 0 root (0) root (0) 389944 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00404_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6676 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00407.html │ │ │ --rw-r--r-- 0 root (0) root (0) 293 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00407.js │ │ │ --rw-r--r-- 0 root (0) root (0) 54275 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00407_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8754 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00410.html │ │ │ --rw-r--r-- 0 root (0) root (0) 506 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00410.js │ │ │ --rw-r--r-- 0 root (0) root (0) 75197 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00410_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8464 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00413.html │ │ │ --rw-r--r-- 0 root (0) root (0) 582 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00413.js │ │ │ --rw-r--r-- 0 root (0) root (0) 235082 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00413_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6563 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00416.html │ │ │ --rw-r--r-- 0 root (0) root (0) 379 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00416.js │ │ │ --rw-r--r-- 0 root (0) root (0) 26590 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00416_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4231 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00419.html │ │ │ --rw-r--r-- 0 root (0) root (0) 108 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00419.js │ │ │ --rw-r--r-- 0 root (0) root (0) 22579 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00419_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 10029 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00422.html │ │ │ --rw-r--r-- 0 root (0) root (0) 506 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00422.js │ │ │ --rw-r--r-- 0 root (0) root (0) 143254 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00422_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5780 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00425.html │ │ │ --rw-r--r-- 0 root (0) root (0) 190 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00425.js │ │ │ --rw-r--r-- 0 root (0) root (0) 127551 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00425_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 10669 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00428.html │ │ │ --rw-r--r-- 0 root (0) root (0) 783 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00428.js │ │ │ --rw-r--r-- 0 root (0) root (0) 69542 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00428_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8569 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00431.html │ │ │ --rw-r--r-- 0 root (0) root (0) 582 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00431.js │ │ │ --rw-r--r-- 0 root (0) root (0) 220731 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00431_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8764 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00434.html │ │ │ --rw-r--r-- 0 root (0) root (0) 582 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00434.js │ │ │ --rw-r--r-- 0 root (0) root (0) 251995 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00434_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 9929 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00437.html │ │ │ --rw-r--r-- 0 root (0) root (0) 582 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00437.js │ │ │ --rw-r--r-- 0 root (0) root (0) 314645 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00437_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 11083 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00440.html │ │ │ --rw-r--r-- 0 root (0) root (0) 976 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00440.js │ │ │ --rw-r--r-- 0 root (0) root (0) 391533 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00440_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8716 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00443.html │ │ │ --rw-r--r-- 0 root (0) root (0) 108 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00443.js │ │ │ --rw-r--r-- 0 root (0) root (0) 53680 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00443_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 9628 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00446.html │ │ │ --rw-r--r-- 0 root (0) root (0) 175 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00446.js │ │ │ --rw-r--r-- 0 root (0) root (0) 42612 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00446_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 16252 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00452.html │ │ │ --rw-r--r-- 0 root (0) root (0) 1002 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00452.js │ │ │ --rw-r--r-- 0 root (0) root (0) 92211 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00452_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 25225 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00455.html │ │ │ --rw-r--r-- 0 root (0) root (0) 330 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00455.js │ │ │ --rw-r--r-- 0 root (0) root (0) 264033 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00455_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 11195 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00458.html │ │ │ --rw-r--r-- 0 root (0) root (0) 828 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00458.js │ │ │ --rw-r--r-- 0 root (0) root (0) 425401 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00458_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7810 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00461.html │ │ │ --rw-r--r-- 0 root (0) root (0) 340 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00461.js │ │ │ --rw-r--r-- 0 root (0) root (0) 49621 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00461_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7364 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00464.html │ │ │ --rw-r--r-- 0 root (0) root (0) 97 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00464.js │ │ │ --rw-r--r-- 0 root (0) root (0) 231488 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00464_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 74835 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00467.html │ │ │ --rw-r--r-- 0 root (0) root (0) 2205 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00467.js │ │ │ --rw-r--r-- 0 root (0) root (0) 363330 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00467_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 118176 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00470.html │ │ │ --rw-r--r-- 0 root (0) root (0) 11717 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00470.js │ │ │ --rw-r--r-- 0 root (0) root (0) 955455 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00470_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6519 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00473.html │ │ │ --rw-r--r-- 0 root (0) root (0) 197 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00473.js │ │ │ --rw-r--r-- 0 root (0) root (0) 60351 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00473_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6353 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00476.html │ │ │ --rw-r--r-- 0 root (0) root (0) 266 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00476.js │ │ │ --rw-r--r-- 0 root (0) root (0) 40505 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00476_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8674 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00479.html │ │ │ --rw-r--r-- 0 root (0) root (0) 546 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00479.js │ │ │ --rw-r--r-- 0 root (0) root (0) 138102 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00479_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6884 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00482.html │ │ │ --rw-r--r-- 0 root (0) root (0) 20851 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00482_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4837 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00485.html │ │ │ --rw-r--r-- 0 root (0) root (0) 69237 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00485_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 36262 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00488.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6354 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00488.js │ │ │ --rw-r--r-- 0 root (0) root (0) 269567 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00488_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 12926 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00371_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 17478 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00374.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 1950 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00374.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 61193 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00374_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 22282 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00377.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 524 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00377.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 295338 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00377_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4828 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00383.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 174253 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00383_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 12246 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00386.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 72616 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00386_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 11092 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00389.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 15813 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00389_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4837 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00392.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 69237 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00392_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 14348 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00395.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 653 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00395.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 361413 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00395_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 57012 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00398.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4008 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00398.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 1170688 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00398_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6128 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00401.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 180 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00401.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 59830 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00401_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4231 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00404.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 108 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00404.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 22579 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00404_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 13825 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00407.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 662 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00407.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 44570 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00407_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 40028 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00410.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 2686 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00410.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 1262951 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00410_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 13166 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00413.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 274 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00413.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 295994 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00413_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 11083 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00416.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 976 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00416.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 391533 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00416_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5054 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00419.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 20189 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00419_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8464 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00422.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 582 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00422.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 235082 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00422_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5861 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00425.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 25617 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00425_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3627 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00428.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 45579 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00428_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4932 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00431.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 290544 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00431_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8996 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00434.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 473 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00434.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 161553 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00434_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3872 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00437.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 91480 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00437_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 105712 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00440.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 94588 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00440_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 88034 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00443.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 111874 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00443_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4871 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00449.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 95438 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00449_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6652 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00452.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 70995 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00452_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6719 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00455.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 98 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00455.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 90314 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00455_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 10025 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00458.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 50776 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00458_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3604 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00461.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 16200 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00461_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8196 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00464.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 106 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00464.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 62173 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00464_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7364 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00467.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 97 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00467.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 231488 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00467_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 10019 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00473.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 984 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00473.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 179662 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00473_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5282 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00476.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 339 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00476.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 21313 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00476_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5780 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00479.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 190 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00479.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 127551 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00479_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3244 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00485.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 104221 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00485_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3225 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00488.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 155255 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00488_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 4327 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00491.html │ │ │ -rw-r--r-- 0 root (0) root (0) 64975 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00491_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 22282 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00494.html │ │ │ --rw-r--r-- 0 root (0) root (0) 524 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00494.js │ │ │ --rw-r--r-- 0 root (0) root (0) 295338 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00494_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 17478 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00497.html │ │ │ --rw-r--r-- 0 root (0) root (0) 1950 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00497.js │ │ │ --rw-r--r-- 0 root (0) root (0) 61193 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00497_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3627 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00503.html │ │ │ --rw-r--r-- 0 root (0) root (0) 45579 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00503_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3876 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00506.html │ │ │ --rw-r--r-- 0 root (0) root (0) 95626 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00506_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4543 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00509.html │ │ │ --rw-r--r-- 0 root (0) root (0) 53915 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00509_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5512 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00512.html │ │ │ --rw-r--r-- 0 root (0) root (0) 99685 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00512_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4871 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00515.html │ │ │ --rw-r--r-- 0 root (0) root (0) 95438 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00515_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3880 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00518.html │ │ │ --rw-r--r-- 0 root (0) root (0) 47169 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00518_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8196 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00521.html │ │ │ --rw-r--r-- 0 root (0) root (0) 106 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00521.js │ │ │ --rw-r--r-- 0 root (0) root (0) 62173 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00521_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3872 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00524.html │ │ │ --rw-r--r-- 0 root (0) root (0) 91480 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00524_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4399 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00527.html │ │ │ --rw-r--r-- 0 root (0) root (0) 47270 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00527_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 11922 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00530.html │ │ │ --rw-r--r-- 0 root (0) root (0) 1432 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00530.js │ │ │ --rw-r--r-- 0 root (0) root (0) 38424 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00530_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 25041 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00533.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4289 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00533.js │ │ │ --rw-r--r-- 0 root (0) root (0) 100947 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00533_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3840 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00536.html │ │ │ --rw-r--r-- 0 root (0) root (0) 116599 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00536_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 37186 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00539.html │ │ │ --rw-r--r-- 0 root (0) root (0) 2915 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00539.js │ │ │ --rw-r--r-- 0 root (0) root (0) 630953 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00539_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4107 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00542.html │ │ │ --rw-r--r-- 0 root (0) root (0) 75007 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00542_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3225 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00545.html │ │ │ --rw-r--r-- 0 root (0) root (0) 109448 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00545_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3261 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00548.html │ │ │ --rw-r--r-- 0 root (0) root (0) 97745 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00548_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3225 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00551.html │ │ │ --rw-r--r-- 0 root (0) root (0) 35096 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00551_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3225 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00554.html │ │ │ --rw-r--r-- 0 root (0) root (0) 155255 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00554_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3228 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00557.html │ │ │ --rw-r--r-- 0 root (0) root (0) 602389 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00557_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3244 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00560.html │ │ │ --rw-r--r-- 0 root (0) root (0) 104221 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00560_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 21890 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00563.html │ │ │ --rw-r--r-- 0 root (0) root (0) 2393 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00563.js │ │ │ --rw-r--r-- 0 root (0) root (0) 73015 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00563_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 57012 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00569.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4008 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00569.js │ │ │ --rw-r--r-- 0 root (0) root (0) 1170688 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00569_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7022 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00572.html │ │ │ --rw-r--r-- 0 root (0) root (0) 379 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00572.js │ │ │ --rw-r--r-- 0 root (0) root (0) 38076 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00572_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7228 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00575.html │ │ │ --rw-r--r-- 0 root (0) root (0) 100 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00575.js │ │ │ --rw-r--r-- 0 root (0) root (0) 44101 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00575_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 34459 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00578.html │ │ │ --rw-r--r-- 0 root (0) root (0) 58233 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00578_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7746 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00581.html │ │ │ --rw-r--r-- 0 root (0) root (0) 655 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00581.js │ │ │ --rw-r--r-- 0 root (0) root (0) 52190 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00581_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6251 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00584.html │ │ │ --rw-r--r-- 0 root (0) root (0) 47625 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00584_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5861 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00587.html │ │ │ --rw-r--r-- 0 root (0) root (0) 25617 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00587_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5782 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00590.html │ │ │ --rw-r--r-- 0 root (0) root (0) 98 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00590.js │ │ │ --rw-r--r-- 0 root (0) root (0) 98045 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00590_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6652 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00593.html │ │ │ --rw-r--r-- 0 root (0) root (0) 70995 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00593_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 13825 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00596.html │ │ │ --rw-r--r-- 0 root (0) root (0) 662 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00596.js │ │ │ --rw-r--r-- 0 root (0) root (0) 44570 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00596_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3604 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00599.html │ │ │ --rw-r--r-- 0 root (0) root (0) 16200 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00599_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3235 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00602.html │ │ │ --rw-r--r-- 0 root (0) root (0) 142362 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00602_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4096 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00605.html │ │ │ --rw-r--r-- 0 root (0) root (0) 49281 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00605_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 12069 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00608.html │ │ │ --rw-r--r-- 0 root (0) root (0) 1287 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00608.js │ │ │ --rw-r--r-- 0 root (0) root (0) 53476 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00608_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4932 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00611.html │ │ │ --rw-r--r-- 0 root (0) root (0) 290544 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00611_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 14248 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00614.html │ │ │ --rw-r--r-- 0 root (0) root (0) 336 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00614.js │ │ │ --rw-r--r-- 0 root (0) root (0) 387296 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00614_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6760 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00617.html │ │ │ --rw-r--r-- 0 root (0) root (0) 248163 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00617_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 24818 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00620.html │ │ │ --rw-r--r-- 0 root (0) root (0) 1413 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00620.js │ │ │ --rw-r--r-- 0 root (0) root (0) 559980 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00620_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 10051 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00623.html │ │ │ --rw-r--r-- 0 root (0) root (0) 125870 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00623_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6128 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00626.html │ │ │ --rw-r--r-- 0 root (0) root (0) 180 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00626.js │ │ │ --rw-r--r-- 0 root (0) root (0) 59830 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00626_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5840 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00629.html │ │ │ --rw-r--r-- 0 root (0) root (0) 153 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00629.js │ │ │ --rw-r--r-- 0 root (0) root (0) 164348 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00629_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5886 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00632.html │ │ │ --rw-r--r-- 0 root (0) root (0) 121354 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00632_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3251 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00635.html │ │ │ --rw-r--r-- 0 root (0) root (0) 167153 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00635_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7046 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00638.html │ │ │ --rw-r--r-- 0 root (0) root (0) 172 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00638.js │ │ │ --rw-r--r-- 0 root (0) root (0) 219407 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00638_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 25533 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00641.html │ │ │ --rw-r--r-- 0 root (0) root (0) 2008 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00641.js │ │ │ --rw-r--r-- 0 root (0) root (0) 227758 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00641_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8770 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00644.html │ │ │ --rw-r--r-- 0 root (0) root (0) 97 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00644.js │ │ │ --rw-r--r-- 0 root (0) root (0) 32872 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00644_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4124 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00647.html │ │ │ --rw-r--r-- 0 root (0) root (0) 49375 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00647_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3664 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00650.html │ │ │ --rw-r--r-- 0 root (0) root (0) 307818 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00650_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4110 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00656.html │ │ │ --rw-r--r-- 0 root (0) root (0) 51135 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00656_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4017 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00659.html │ │ │ --rw-r--r-- 0 root (0) root (0) 35910 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00659_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 10025 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00662.html │ │ │ --rw-r--r-- 0 root (0) root (0) 50776 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00662_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 10778 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00665.html │ │ │ --rw-r--r-- 0 root (0) root (0) 20173 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00665_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4837 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00668.html │ │ │ --rw-r--r-- 0 root (0) root (0) 217828 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00668_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6719 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00683.html │ │ │ --rw-r--r-- 0 root (0) root (0) 98 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00683.js │ │ │ --rw-r--r-- 0 root (0) root (0) 90314 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00683_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 10714 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00686.html │ │ │ --rw-r--r-- 0 root (0) root (0) 929 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00686.js │ │ │ --rw-r--r-- 0 root (0) root (0) 293073 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00686_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4550 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00689.html │ │ │ --rw-r--r-- 0 root (0) root (0) 13634 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00689_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3623 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00692.html │ │ │ --rw-r--r-- 0 root (0) root (0) 48430 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00692_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 19764 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00695.html │ │ │ --rw-r--r-- 0 root (0) root (0) 232808 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00695_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5710 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00698.html │ │ │ --rw-r--r-- 0 root (0) root (0) 83624 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00698_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 11092 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00701.html │ │ │ --rw-r--r-- 0 root (0) root (0) 15813 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00701_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7435 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00704.html │ │ │ --rw-r--r-- 0 root (0) root (0) 592 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00704.js │ │ │ --rw-r--r-- 0 root (0) root (0) 137947 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00704_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5054 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00707.html │ │ │ --rw-r--r-- 0 root (0) root (0) 20189 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00707_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8996 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00710.html │ │ │ --rw-r--r-- 0 root (0) root (0) 473 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00710.js │ │ │ --rw-r--r-- 0 root (0) root (0) 161553 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00710_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3233 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00713.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8404 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00713_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 17323 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00716.html │ │ │ --rw-r--r-- 0 root (0) root (0) 119231 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00716_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8757 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00719.html │ │ │ --rw-r--r-- 0 root (0) root (0) 339 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00719.js │ │ │ --rw-r--r-- 0 root (0) root (0) 298810 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00719_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 40028 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00722.html │ │ │ --rw-r--r-- 0 root (0) root (0) 2686 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00722.js │ │ │ --rw-r--r-- 0 root (0) root (0) 1262951 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00722_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4849 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00725.html │ │ │ --rw-r--r-- 0 root (0) root (0) 44238 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00725_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4805 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00728.html │ │ │ --rw-r--r-- 0 root (0) root (0) 109182 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00728_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 12246 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00731.html │ │ │ --rw-r--r-- 0 root (0) root (0) 72616 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00731_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 25533 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00494.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 2008 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00494.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 227758 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00494_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4017 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00497.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 35910 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00497_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6884 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00500.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 20851 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00500_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 16252 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00503.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 1002 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00503.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 92211 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00503_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 25225 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00506.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 330 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00506.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 264033 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00506_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4159 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00512.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 94 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00512.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 21164 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00512_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4003 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00515.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 16172 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00515_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 11037 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00518.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 187 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00518.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 414965 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00518_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3233 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00521.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8404 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00521_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4543 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00524.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 53915 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00524_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3251 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00527.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 167153 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00527_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6251 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00530.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 47625 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00530_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 19764 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00533.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 232808 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00533_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5782 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00536.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 98 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00536.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 98045 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00536_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6760 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00551.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 248163 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00551_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5230 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00554.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 196 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00554.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 33962 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00554_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8716 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00557.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 108 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00557.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 53680 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00557_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9096 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00560.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 389944 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00560_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6514 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00563.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 37982 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00563_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4849 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00566.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 44238 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00566_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7228 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00569.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 100 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00569.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 44101 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00569_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 34459 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00572.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 58233 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00572_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5840 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00575.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 153 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00575.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 164348 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00575_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3235 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00578.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 142362 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00578_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4096 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00581.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 49281 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00581_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5512 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00584.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 99685 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00584_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8757 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00587.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 339 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00587.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 298810 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00587_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 11195 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00590.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 828 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00590.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 425401 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00590_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 10778 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00593.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 20173 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00593_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8764 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00596.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 582 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00596.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 251995 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00596_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7746 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00599.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 655 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00599.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 52190 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00599_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6563 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00602.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 379 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00602.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 26590 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00602_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9929 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00605.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 582 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00605.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 314645 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00605_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4805 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00608.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 109182 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00608_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7435 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00611.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 592 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00611.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 137947 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00611_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3261 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00614.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 97745 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00614_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 14248 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00617.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 336 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00617.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 387296 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00617_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 37186 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00620.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 2915 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00620.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 630953 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00620_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4399 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00623.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 47270 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00623_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4558 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00626.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 11985 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00626_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4124 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00629.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 49375 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00629_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3225 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00635.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 35096 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00635_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3225 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00638.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 109448 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00638_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7810 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00641.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 340 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00641.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 49621 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00641_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5230 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00644.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 206 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00644.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 24779 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00644_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3583 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00647.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 62745 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00647_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7900 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00650.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 444 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00650.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 47480 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00650_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7120 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00653.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 56496 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00653_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7022 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00656.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 379 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00656.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 38076 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00656_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 24818 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00659.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 1413 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00659.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 559980 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00659_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9628 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00662.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 175 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00662.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 42612 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00662_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5710 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00665.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 83624 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00665_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3880 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00668.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 47169 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00668_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4550 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00671.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 13634 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00671_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 118176 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00674.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 11717 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00674.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 955455 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00674_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 11922 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00677.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 1432 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00677.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 38424 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00677_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4107 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00680.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 75007 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00680_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 74835 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00683.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 2205 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00683.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 363330 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00683_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8770 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00686.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 97 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00686.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 32872 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00686_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6676 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00689.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 293 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00689.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 54275 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00689_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5488 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00692.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 192 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00692.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 80636 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00692_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3620 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00695.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 20305 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00695_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3727 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00698.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 11904 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00698_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 11196 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00701.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 102917 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00701_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8569 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00704.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 582 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00704.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 220731 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00704_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3228 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00707.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 602389 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00707_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3876 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00710.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 95626 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00710_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 37121 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00713_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7046 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00716.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 172 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00716.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 219407 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00716_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5886 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00719.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 121354 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00719_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 21890 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00722.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 2393 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00722.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 73015 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00722_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8674 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00725.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 546 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00725.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 138102 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00725_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3623 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00728.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 48430 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00728_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 11701 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00734.html │ │ │ -rw-r--r-- 0 root (0) root (0) 76133 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00734_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3583 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00737.html │ │ │ --rw-r--r-- 0 root (0) root (0) 62745 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00737_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 13166 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00740.html │ │ │ --rw-r--r-- 0 root (0) root (0) 274 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00740.js │ │ │ --rw-r--r-- 0 root (0) root (0) 295994 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00740_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7120 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00743.html │ │ │ --rw-r--r-- 0 root (0) root (0) 56496 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00743_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3620 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00746.html │ │ │ --rw-r--r-- 0 root (0) root (0) 20305 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00746_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4159 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00752.html │ │ │ --rw-r--r-- 0 root (0) root (0) 94 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00752.js │ │ │ --rw-r--r-- 0 root (0) root (0) 21164 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00752_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 128473 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00758_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 128467 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00761_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 43725 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00764_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 26689 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00767_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 272658 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00770.html │ │ │ --rw-r--r-- 0 root (0) root (0) 319793 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00770_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 2780 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00773_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3664 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00776.html │ │ │ --rw-r--r-- 0 root (0) root (0) 15709 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00776_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3680 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00779.html │ │ │ --rw-r--r-- 0 root (0) root (0) 28946 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00779_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4218 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00785.html │ │ │ --rw-r--r-- 0 root (0) root (0) 21440 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00785_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6927 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00788.html │ │ │ --rw-r--r-- 0 root (0) root (0) 19536 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00788_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4456 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00791.html │ │ │ --rw-r--r-- 0 root (0) root (0) 10214 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00791_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4316 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00794.html │ │ │ --rw-r--r-- 0 root (0) root (0) 105 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00794.js │ │ │ --rw-r--r-- 0 root (0) root (0) 13683 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00794_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3653 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00797.html │ │ │ --rw-r--r-- 0 root (0) root (0) 24711 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00797_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3656 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00800.html │ │ │ --rw-r--r-- 0 root (0) root (0) 36175 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00800_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3174 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00803.html │ │ │ --rw-r--r-- 0 root (0) root (0) 21507 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00803_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3186 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00806.html │ │ │ --rw-r--r-- 0 root (0) root (0) 13206 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00806_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3174 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00809.html │ │ │ --rw-r--r-- 0 root (0) root (0) 38926 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00809_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6246 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00812.html │ │ │ --rw-r--r-- 0 root (0) root (0) 28105 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00812_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3273 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00815.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7801 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00815_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 13213 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00818.html │ │ │ --rw-r--r-- 0 root (0) root (0) 11659 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00818_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6643 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00821.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8779 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00821_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5471 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00824.html │ │ │ --rw-r--r-- 0 root (0) root (0) 14922 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00824_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3664 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00827.html │ │ │ --rw-r--r-- 0 root (0) root (0) 17266 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00827_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4096 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00830.html │ │ │ --rw-r--r-- 0 root (0) root (0) 64 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00830.js │ │ │ --rw-r--r-- 0 root (0) root (0) 13626 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00830_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 12069 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00737.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 1287 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00737.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 53476 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00737_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 10051 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00740.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 125870 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00740_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3257 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00743.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 41975 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00743_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6454 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00746.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9528 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00746_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6519 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00749.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 197 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00749.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 60351 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00749_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3664 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00752.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 307818 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00752_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6284 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00755.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 105 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00755.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 216445 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00755_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3174 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00758.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 21507 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00758_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4096 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00761.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 64 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00761.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 13626 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00761_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6246 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00764.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 28105 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00764_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3273 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00767.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7801 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00767_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 26689 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00770_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4456 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00773.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 10214 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00773_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3186 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00776.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 13206 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00776_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 128473 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00779_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3174 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00782.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 38926 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00782_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 43725 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00785_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6643 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00788.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8779 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00788_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3664 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00794.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 15709 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00794_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 13213 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00797.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 11659 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00797_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4218 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00800.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 21440 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00800_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5471 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00803.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 14922 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00803_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3653 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00806.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 24711 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00806_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6927 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00809.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 19536 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00809_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3680 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00812.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 28946 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00812_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 272658 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00815.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 319793 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00815_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4316 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00818.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 105 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00818.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 13683 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00818_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3664 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00821.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 17266 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00821_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3656 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00824.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 36175 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00824_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 128467 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00827_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 2780 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00830_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 4658 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00833.html │ │ │ -rw-r--r-- 0 root (0) root (0) 27314 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00833_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5748 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00836.html │ │ │ --rw-r--r-- 0 root (0) root (0) 176 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00836.js │ │ │ --rw-r--r-- 0 root (0) root (0) 34434 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00836_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4388 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00836.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 143 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00836.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 64673 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00836_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 3249 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00839.html │ │ │ -rw-r--r-- 0 root (0) root (0) 12431 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00839_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4388 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00842.html │ │ │ --rw-r--r-- 0 root (0) root (0) 143 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00842.js │ │ │ --rw-r--r-- 0 root (0) root (0) 64673 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00842_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5748 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00842.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 176 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00842.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 34434 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00842_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 11617 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00845.html │ │ │ -rw-r--r-- 0 root (0) root (0) 221 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00845.js │ │ │ -rw-r--r-- 0 root (0) root (0) 100571 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00845_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 10597 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00848.html │ │ │ -rw-r--r-- 0 root (0) root (0) 97566 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00848_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 4264 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00851.html │ │ │ -rw-r--r-- 0 root (0) root (0) 47020 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00851_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8848 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00854.html │ │ │ --rw-r--r-- 0 root (0) root (0) 102 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00854.js │ │ │ --rw-r--r-- 0 root (0) root (0) 114742 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00854_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4979 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00857.html │ │ │ --rw-r--r-- 0 root (0) root (0) 23012 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00857_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4225 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00860.html │ │ │ --rw-r--r-- 0 root (0) root (0) 111 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00860.js │ │ │ --rw-r--r-- 0 root (0) root (0) 21752 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00860_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4492 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00863.html │ │ │ --rw-r--r-- 0 root (0) root (0) 171 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00863.js │ │ │ --rw-r--r-- 0 root (0) root (0) 40316 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00863_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4891 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00866.html │ │ │ --rw-r--r-- 0 root (0) root (0) 33345 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00866_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5569 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00869.html │ │ │ --rw-r--r-- 0 root (0) root (0) 411 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00869.js │ │ │ --rw-r--r-- 0 root (0) root (0) 30474 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00869_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4939 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00872.html │ │ │ --rw-r--r-- 0 root (0) root (0) 19675 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00872_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8091 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00875.html │ │ │ --rw-r--r-- 0 root (0) root (0) 209 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00875.js │ │ │ --rw-r--r-- 0 root (0) root (0) 96633 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00875_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 16948 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00878.html │ │ │ --rw-r--r-- 0 root (0) root (0) 93079 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00878_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5569 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00854.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 411 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00854.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 30474 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00854_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8859 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00857.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 75 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00857.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 91016 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00857_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4328 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00860.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 144 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00860.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 22355 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00860_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9152 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00863.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 112 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00863.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 119871 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00863_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 67095 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00866.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 1364 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00866.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 88664 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00866_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4891 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00869.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 33345 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00869_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8091 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00872.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 209 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00872.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 96633 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00872_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4492 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00875.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 171 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00875.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 40316 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00875_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4939 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00878.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 19675 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00878_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 15359 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00881.html │ │ │ -rw-r--r-- 0 root (0) root (0) 378 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00881.js │ │ │ -rw-r--r-- 0 root (0) root (0) 187053 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00881_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4328 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00884.html │ │ │ --rw-r--r-- 0 root (0) root (0) 144 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00884.js │ │ │ --rw-r--r-- 0 root (0) root (0) 22355 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00884_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4972 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00887.html │ │ │ --rw-r--r-- 0 root (0) root (0) 254 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00887.js │ │ │ --rw-r--r-- 0 root (0) root (0) 63027 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00887_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8953 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00890.html │ │ │ --rw-r--r-- 0 root (0) root (0) 107 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00890.js │ │ │ --rw-r--r-- 0 root (0) root (0) 113002 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00890_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 9152 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00893.html │ │ │ --rw-r--r-- 0 root (0) root (0) 112 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00893.js │ │ │ --rw-r--r-- 0 root (0) root (0) 119871 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00893_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 9047 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00896.html │ │ │ --rw-r--r-- 0 root (0) root (0) 107 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00896.js │ │ │ --rw-r--r-- 0 root (0) root (0) 138558 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00896_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 67095 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00899.html │ │ │ --rw-r--r-- 0 root (0) root (0) 1364 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00899.js │ │ │ --rw-r--r-- 0 root (0) root (0) 88664 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00899_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 18555 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00902.html │ │ │ --rw-r--r-- 0 root (0) root (0) 864 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00902.js │ │ │ --rw-r--r-- 0 root (0) root (0) 62869 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00902_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 22260 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00905.html │ │ │ --rw-r--r-- 0 root (0) root (0) 222 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00905.js │ │ │ --rw-r--r-- 0 root (0) root (0) 81456 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00905_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8859 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00908.html │ │ │ --rw-r--r-- 0 root (0) root (0) 75 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00908.js │ │ │ --rw-r--r-- 0 root (0) root (0) 91016 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00908_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 35024 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00911.html │ │ │ --rw-r--r-- 0 root (0) root (0) 26348 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00911_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 10315 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00914.html │ │ │ --rw-r--r-- 0 root (0) root (0) 13280 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00914_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 10315 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00884.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 13280 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00884_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8848 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00887.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 102 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00887.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 114742 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00887_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 22260 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00890.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 222 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00890.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 81456 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00890_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4225 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00893.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 111 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00893.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 21752 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00893_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4979 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00896.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 23012 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00896_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4972 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00899.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 254 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00899.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 63027 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00899_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 16948 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00902.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 93079 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00902_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 35024 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00905.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 26348 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00905_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8953 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00908.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 107 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00908.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 113002 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00908_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 18555 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00911.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 864 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00911.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 62869 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00911_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9047 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00914.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 107 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00914.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 138558 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00914_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 5491 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00917.html │ │ │ -rw-r--r-- 0 root (0) root (0) 17090 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00917_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 43877 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00920.html │ │ │ -rw-r--r-- 0 root (0) root (0) 437842 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00920_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 12695 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00923.html │ │ │ -rw-r--r-- 0 root (0) root (0) 163774 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00923_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6626 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00926.html │ │ │ --rw-r--r-- 0 root (0) root (0) 225 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00926.js │ │ │ --rw-r--r-- 0 root (0) root (0) 59053 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00926_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5006 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00929.html │ │ │ --rw-r--r-- 0 root (0) root (0) 226 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00929.js │ │ │ --rw-r--r-- 0 root (0) root (0) 34472 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00929_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 9288 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00932.html │ │ │ --rw-r--r-- 0 root (0) root (0) 2007 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00932.js │ │ │ --rw-r--r-- 0 root (0) root (0) 34130 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00932_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 9426 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00935.html │ │ │ --rw-r--r-- 0 root (0) root (0) 1255 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00935.js │ │ │ --rw-r--r-- 0 root (0) root (0) 40311 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00935_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8887 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00938.html │ │ │ --rw-r--r-- 0 root (0) root (0) 702 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00938.js │ │ │ --rw-r--r-- 0 root (0) root (0) 49982 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00938_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8549 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00941.html │ │ │ --rw-r--r-- 0 root (0) root (0) 172 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00941.js │ │ │ --rw-r--r-- 0 root (0) root (0) 89443 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00941_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7713 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00944.html │ │ │ --rw-r--r-- 0 root (0) root (0) 81169 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00944_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4980 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00947.html │ │ │ --rw-r--r-- 0 root (0) root (0) 213 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00947.js │ │ │ --rw-r--r-- 0 root (0) root (0) 32509 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00947_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8989 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00950.html │ │ │ --rw-r--r-- 0 root (0) root (0) 960 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00950.js │ │ │ --rw-r--r-- 0 root (0) root (0) 114914 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00950_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4148 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00953.html │ │ │ --rw-r--r-- 0 root (0) root (0) 82 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00953.js │ │ │ --rw-r--r-- 0 root (0) root (0) 25793 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00953_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6067 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00956.html │ │ │ --rw-r--r-- 0 root (0) root (0) 334 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00956.js │ │ │ --rw-r--r-- 0 root (0) root (0) 35952 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00956_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5516 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00959.html │ │ │ --rw-r--r-- 0 root (0) root (0) 199 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00959.js │ │ │ --rw-r--r-- 0 root (0) root (0) 35476 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00959_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7140 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00962.html │ │ │ --rw-r--r-- 0 root (0) root (0) 414 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00962.js │ │ │ --rw-r--r-- 0 root (0) root (0) 79372 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00962_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5919 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00965.html │ │ │ --rw-r--r-- 0 root (0) root (0) 347 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00965.js │ │ │ --rw-r--r-- 0 root (0) root (0) 44702 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00965_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3218 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00968.html │ │ │ --rw-r--r-- 0 root (0) root (0) 10413 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00968_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4611 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00971.html │ │ │ --rw-r--r-- 0 root (0) root (0) 135 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00971.js │ │ │ --rw-r--r-- 0 root (0) root (0) 27105 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00971_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4678 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00974.html │ │ │ --rw-r--r-- 0 root (0) root (0) 148 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00974.js │ │ │ --rw-r--r-- 0 root (0) root (0) 23163 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00974_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4620 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00977.html │ │ │ --rw-r--r-- 0 root (0) root (0) 141 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00977.js │ │ │ --rw-r--r-- 0 root (0) root (0) 23275 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00977_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 23761 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00980.html │ │ │ --rw-r--r-- 0 root (0) root (0) 36680 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00980_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8229 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00983.html │ │ │ --rw-r--r-- 0 root (0) root (0) 868 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00983.js │ │ │ --rw-r--r-- 0 root (0) root (0) 99043 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00983_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 36470 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00986.html │ │ │ --rw-r--r-- 0 root (0) root (0) 2794 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00986.js │ │ │ --rw-r--r-- 0 root (0) root (0) 358167 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00986_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7658 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00989.html │ │ │ --rw-r--r-- 0 root (0) root (0) 415 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00989.js │ │ │ --rw-r--r-- 0 root (0) root (0) 111081 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00989_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7472 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00992.html │ │ │ --rw-r--r-- 0 root (0) root (0) 535 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00992.js │ │ │ --rw-r--r-- 0 root (0) root (0) 49347 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00992_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 9847 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00995.html │ │ │ --rw-r--r-- 0 root (0) root (0) 1395 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00995.js │ │ │ --rw-r--r-- 0 root (0) root (0) 173158 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00995_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5721 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00998.html │ │ │ --rw-r--r-- 0 root (0) root (0) 306 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00998.js │ │ │ --rw-r--r-- 0 root (0) root (0) 34177 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00998_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4854 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01001.html │ │ │ --rw-r--r-- 0 root (0) root (0) 260 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01001.js │ │ │ --rw-r--r-- 0 root (0) root (0) 34177 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01001_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 11266 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01004.html │ │ │ --rw-r--r-- 0 root (0) root (0) 1666 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01004.js │ │ │ --rw-r--r-- 0 root (0) root (0) 76650 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01004_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4881 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01007.html │ │ │ --rw-r--r-- 0 root (0) root (0) 132 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01007.js │ │ │ --rw-r--r-- 0 root (0) root (0) 24149 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01007_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5642 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01010.html │ │ │ --rw-r--r-- 0 root (0) root (0) 405 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01010.js │ │ │ --rw-r--r-- 0 root (0) root (0) 43378 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01010_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6728 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01013.html │ │ │ --rw-r--r-- 0 root (0) root (0) 408 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01013.js │ │ │ --rw-r--r-- 0 root (0) root (0) 75128 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01013_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 13480 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01016.html │ │ │ --rw-r--r-- 0 root (0) root (0) 849 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01016.js │ │ │ --rw-r--r-- 0 root (0) root (0) 19493 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01016_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 13480 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00926.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 849 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00926.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 19493 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00926_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8887 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00929.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 702 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00929.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 49982 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00929_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5516 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00932.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 199 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00932.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 35476 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00932_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4620 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00935.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 141 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00935.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 23275 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00935_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 115350 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00938.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 188 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00938.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 383089 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00938_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9288 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00941.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 2007 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00941.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 34130 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00941_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8989 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00944.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 960 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00944.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 114914 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00944_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7713 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00947.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 81169 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00947_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4881 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00950.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 132 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00950.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 24149 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00950_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9847 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00953.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 1395 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00953.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 173158 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00953_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 13528 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00956.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 575 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00956.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 15178 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00956_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 23761 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00959.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 36680 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00959_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 22759 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00962.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 81482 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00962_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 14097 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00965.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 1578 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00965.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 83140 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00965_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 11266 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00968.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 1666 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00968.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 76650 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00968_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8229 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00971.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 868 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00971.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 99043 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00971_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5006 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00974.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 226 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00974.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 34472 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00974_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4355 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00977.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 110 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00977.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 14423 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00977_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9426 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00980.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 1255 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00980.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 40311 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00980_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4980 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00983.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 213 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00983.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 32509 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00983_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6067 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00986.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 334 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00986.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 35952 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00986_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5721 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00989.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 306 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00989.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 34177 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00989_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4148 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00992.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 82 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00992.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 25793 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00992_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8549 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00995.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 172 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00995.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 89443 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00995_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6626 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00998.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 225 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00998.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 59053 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a00998_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3218 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01001.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 10413 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01001_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4854 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01004.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 260 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01004.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 34177 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01004_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7140 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01007.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 414 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01007.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 79372 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01007_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4678 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01010.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 148 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01010.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 23163 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01010_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7472 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01013.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 535 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01013.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 49347 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01013_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7661 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01016.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 506 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01016.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 97544 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01016_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 5144 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01019.html │ │ │ -rw-r--r-- 0 root (0) root (0) 218 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01019.js │ │ │ -rw-r--r-- 0 root (0) root (0) 18591 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01019_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 13528 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01022.html │ │ │ --rw-r--r-- 0 root (0) root (0) 575 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01022.js │ │ │ --rw-r--r-- 0 root (0) root (0) 15178 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01022_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4355 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01025.html │ │ │ --rw-r--r-- 0 root (0) root (0) 110 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01025.js │ │ │ --rw-r--r-- 0 root (0) root (0) 14423 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01025_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3261 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01028.html │ │ │ --rw-r--r-- 0 root (0) root (0) 9629 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01028_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 14097 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01031.html │ │ │ --rw-r--r-- 0 root (0) root (0) 1578 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01031.js │ │ │ --rw-r--r-- 0 root (0) root (0) 83140 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01031_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7661 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01034.html │ │ │ --rw-r--r-- 0 root (0) root (0) 506 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01034.js │ │ │ --rw-r--r-- 0 root (0) root (0) 97544 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01034_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 22759 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01037.html │ │ │ --rw-r--r-- 0 root (0) root (0) 81482 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01037_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 115350 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01040.html │ │ │ --rw-r--r-- 0 root (0) root (0) 188 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01040.js │ │ │ --rw-r--r-- 0 root (0) root (0) 383089 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01040_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6125 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01043.html │ │ │ --rw-r--r-- 0 root (0) root (0) 104 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01043.js │ │ │ --rw-r--r-- 0 root (0) root (0) 54323 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01043_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4999 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01046.html │ │ │ --rw-r--r-- 0 root (0) root (0) 44364 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01046_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5919 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01022.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 347 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01022.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 44702 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01022_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3261 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01025.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9629 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01025_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4611 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01028.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 135 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01028.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 27105 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01028_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5642 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01031.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 405 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01031.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 43378 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01031_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7658 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01034.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 415 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01034.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 111081 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01034_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6728 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01037.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 408 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01037.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 75128 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01037_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 36470 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01040.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 2794 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01040.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 358167 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01040_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4999 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01043.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 44364 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01043_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6125 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01046.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 104 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01046.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 54323 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01046_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 15669 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01049.html │ │ │ -rw-r--r-- 0 root (0) root (0) 71 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01049.js │ │ │ -rw-r--r-- 0 root (0) root (0) 57731 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01049_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 13118 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01052.html │ │ │ -rw-r--r-- 0 root (0) root (0) 803 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01052.js │ │ │ -rw-r--r-- 0 root (0) root (0) 240684 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01052_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 204309 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01055.html │ │ │ -rw-r--r-- 0 root (0) root (0) 119 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01055.js │ │ │ -rw-r--r-- 0 root (0) root (0) 90938 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01055_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 364458 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01058_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 935977 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01061_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 144405 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01064_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 26963 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01067_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 87479 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01070_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 253525 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01073_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 342198 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01076_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 50123 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01079_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 61394 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01082_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 503785 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01085_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 862447 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01088_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3236 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01094.html │ │ │ --rw-r--r-- 0 root (0) root (0) 13547 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01094_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 862447 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01061_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3236 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01064.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 13547 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01064_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 364458 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01067_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 144405 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01070_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 61394 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01073_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 87479 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01076_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 935977 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01079_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 26963 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01082_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 342198 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01085_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 503785 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01088_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 253525 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01091_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 50123 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01094_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 21222 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01097.html │ │ │ -rw-r--r-- 0 root (0) root (0) 99220 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01097_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 4688 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01100.html │ │ │ -rw-r--r-- 0 root (0) root (0) 16166 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01100_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3652 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01103.html │ │ │ --rw-r--r-- 0 root (0) root (0) 31650 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01103_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8956 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01106.html │ │ │ --rw-r--r-- 0 root (0) root (0) 17798 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01106_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 11698 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01109.html │ │ │ --rw-r--r-- 0 root (0) root (0) 612 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01109.js │ │ │ --rw-r--r-- 0 root (0) root (0) 138889 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01109_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 33313 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01112.html │ │ │ --rw-r--r-- 0 root (0) root (0) 2728 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01112.js │ │ │ --rw-r--r-- 0 root (0) root (0) 590236 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01112_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3664 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01115.html │ │ │ --rw-r--r-- 0 root (0) root (0) 84108 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01115_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5111 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01118.html │ │ │ --rw-r--r-- 0 root (0) root (0) 109 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01118.js │ │ │ --rw-r--r-- 0 root (0) root (0) 115465 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01118_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5019 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01121.html │ │ │ --rw-r--r-- 0 root (0) root (0) 36198 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01121_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 68198 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01124.html │ │ │ --rw-r--r-- 0 root (0) root (0) 119 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01124.js │ │ │ --rw-r--r-- 0 root (0) root (0) 85792 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01124_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 16874 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01127.html │ │ │ --rw-r--r-- 0 root (0) root (0) 1237 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01127.js │ │ │ --rw-r--r-- 0 root (0) root (0) 166435 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01127_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5040 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01130.html │ │ │ --rw-r--r-- 0 root (0) root (0) 23196 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01130_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8505 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01133.html │ │ │ --rw-r--r-- 0 root (0) root (0) 255069 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01133_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6476 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01136.html │ │ │ --rw-r--r-- 0 root (0) root (0) 77 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01136.js │ │ │ --rw-r--r-- 0 root (0) root (0) 51497 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01136_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 25776 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01139.html │ │ │ --rw-r--r-- 0 root (0) root (0) 558 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01139.js │ │ │ --rw-r--r-- 0 root (0) root (0) 106811 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01139_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6342 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01142.html │ │ │ --rw-r--r-- 0 root (0) root (0) 202 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01142.js │ │ │ --rw-r--r-- 0 root (0) root (0) 34406 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01142_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4096 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01145.html │ │ │ --rw-r--r-- 0 root (0) root (0) 37302 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01145_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 9479 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01148.html │ │ │ --rw-r--r-- 0 root (0) root (0) 459 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01148.js │ │ │ --rw-r--r-- 0 root (0) root (0) 125676 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01148_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4117 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01151.html │ │ │ --rw-r--r-- 0 root (0) root (0) 37496 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01151_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4183 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01154.html │ │ │ --rw-r--r-- 0 root (0) root (0) 61412 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01154_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4144 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01157.html │ │ │ --rw-r--r-- 0 root (0) root (0) 36795 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01157_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5154 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01160.html │ │ │ --rw-r--r-- 0 root (0) root (0) 36148 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01160_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4091 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01163.html │ │ │ --rw-r--r-- 0 root (0) root (0) 91 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01163.js │ │ │ --rw-r--r-- 0 root (0) root (0) 13710 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01163_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4119 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01166.html │ │ │ --rw-r--r-- 0 root (0) root (0) 33473 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01166_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5912 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01169.html │ │ │ --rw-r--r-- 0 root (0) root (0) 73 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01169.js │ │ │ --rw-r--r-- 0 root (0) root (0) 46592 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01169_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6833 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01172.html │ │ │ --rw-r--r-- 0 root (0) root (0) 299 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01172.js │ │ │ --rw-r--r-- 0 root (0) root (0) 86332 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01172_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8414 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01175.html │ │ │ --rw-r--r-- 0 root (0) root (0) 282 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01175.js │ │ │ --rw-r--r-- 0 root (0) root (0) 24177 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01175_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 14089 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01178.html │ │ │ --rw-r--r-- 0 root (0) root (0) 900 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01178.js │ │ │ --rw-r--r-- 0 root (0) root (0) 186019 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01178_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8454 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01181.html │ │ │ --rw-r--r-- 0 root (0) root (0) 21236 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01181_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3575 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01184.html │ │ │ --rw-r--r-- 0 root (0) root (0) 21970 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01184_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 12267 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01187.html │ │ │ --rw-r--r-- 0 root (0) root (0) 400 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01187.js │ │ │ --rw-r--r-- 0 root (0) root (0) 74705 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01187_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7405 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01190.html │ │ │ --rw-r--r-- 0 root (0) root (0) 143 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01190.js │ │ │ --rw-r--r-- 0 root (0) root (0) 30987 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01190_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 17610 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01193.html │ │ │ --rw-r--r-- 0 root (0) root (0) 128 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01193.js │ │ │ --rw-r--r-- 0 root (0) root (0) 88696 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01193_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4217 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01196.html │ │ │ --rw-r--r-- 0 root (0) root (0) 31418 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01196_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4608 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01199.html │ │ │ --rw-r--r-- 0 root (0) root (0) 197 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01199.js │ │ │ --rw-r--r-- 0 root (0) root (0) 32033 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01199_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 29002 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01202.html │ │ │ --rw-r--r-- 0 root (0) root (0) 935 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01202.js │ │ │ --rw-r--r-- 0 root (0) root (0) 129506 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01202_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6385 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01205.html │ │ │ --rw-r--r-- 0 root (0) root (0) 19193 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01205_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 10689 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01208.html │ │ │ --rw-r--r-- 0 root (0) root (0) 168821 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01208_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7677 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01211.html │ │ │ --rw-r--r-- 0 root (0) root (0) 26738 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01211_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8956 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01103.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 17798 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01103_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4096 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01106.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 37302 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01106_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4119 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01109.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 33473 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01109_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5912 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01112.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 73 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01112.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 46592 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01112_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4117 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01115.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 37496 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01115_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 33313 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01118.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 2728 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01118.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 590236 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01118_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3652 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01121.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 31650 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01121_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6833 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01124.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 299 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01124.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 86332 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01124_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6476 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01127.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 77 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01127.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 51497 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01127_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3575 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01130.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 21970 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01130_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 14089 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01133.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 900 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01133.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 186019 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01133_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6342 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01136.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 202 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01136.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 34406 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01136_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 68198 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01139.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 119 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01139.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 85792 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01139_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5154 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01142.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 36148 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01142_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4091 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01145.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 91 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01145.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 13710 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01145_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4144 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01148.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 36795 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01148_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8454 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01151.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 21236 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01151_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 16874 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01154.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 1237 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01154.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 166435 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01154_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5111 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01157.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 109 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01157.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 115465 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01157_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9479 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01160.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 459 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01160.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 125676 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01160_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3664 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01163.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 84108 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01163_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5040 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01166.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 23196 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01166_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4183 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01169.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 61412 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01169_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8505 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01172.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 255069 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01172_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 25776 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01175.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 558 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01175.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 106811 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01175_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8414 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01178.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 282 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01178.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 24177 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01178_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 11698 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01181.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 612 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01181.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 138889 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01181_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5019 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01184.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 36198 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01184_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 10689 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01187.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 168821 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01187_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4608 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01190.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 197 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01190.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 32033 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01190_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 29002 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01193.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 935 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01193.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 129506 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01193_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6385 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01196.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 19193 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01196_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4217 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01199.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 31418 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01199_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 12267 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01202.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 400 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01202.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 74705 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01202_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 17610 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01205.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 128 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01205.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 88696 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01205_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7405 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01208.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 143 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01208.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 30987 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01208_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3224 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01211.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 55854 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01211_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 9703 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01214.html │ │ │ -rw-r--r-- 0 root (0) root (0) 40703 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01214_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3219 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01217.html │ │ │ --rw-r--r-- 0 root (0) root (0) 30968 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01217_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 10191 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01220.html │ │ │ --rw-r--r-- 0 root (0) root (0) 702 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01220.js │ │ │ --rw-r--r-- 0 root (0) root (0) 39028 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01220_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 9403 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01223.html │ │ │ --rw-r--r-- 0 root (0) root (0) 573 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01223.js │ │ │ --rw-r--r-- 0 root (0) root (0) 30715 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01223_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3224 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01226.html │ │ │ --rw-r--r-- 0 root (0) root (0) 55854 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01226_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 25198 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01229.html │ │ │ --rw-r--r-- 0 root (0) root (0) 1907 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01229.js │ │ │ --rw-r--r-- 0 root (0) root (0) 79317 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01229_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5973 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01232.html │ │ │ --rw-r--r-- 0 root (0) root (0) 104 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01232.js │ │ │ --rw-r--r-- 0 root (0) root (0) 16372 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01232_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5828 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01241.html │ │ │ --rw-r--r-- 0 root (0) root (0) 95 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01241.js │ │ │ --rw-r--r-- 0 root (0) root (0) 39607 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01241_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4776 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01262.html │ │ │ --rw-r--r-- 0 root (0) root (0) 211 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01262.js │ │ │ --rw-r--r-- 0 root (0) root (0) 17107 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01262_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5269 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01265.html │ │ │ --rw-r--r-- 0 root (0) root (0) 326 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01265.js │ │ │ --rw-r--r-- 0 root (0) root (0) 17815 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01265_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 15549 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01280.html │ │ │ --rw-r--r-- 0 root (0) root (0) 55868 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01280_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5973 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01217.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 104 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01217.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 16372 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01217_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 25198 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01220.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 1907 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01220.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 79317 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01220_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3219 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01223.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 30968 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01223_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7677 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01226.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 26738 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01226_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 10191 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01229.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 702 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01229.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 39028 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01229_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9403 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01232.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 573 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01232.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 30715 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01232_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4776 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01238.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 211 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01238.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 17107 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01238_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5828 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01247.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 95 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01247.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 39607 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01247_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 15549 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01253.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 55868 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01253_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5269 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01271.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 326 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01271.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 17815 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01271_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 6521 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01283.html │ │ │ -rw-r--r-- 0 root (0) root (0) 21610 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01283_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 10154 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01286.html │ │ │ -rw-r--r-- 0 root (0) root (0) 123 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01286.js │ │ │ -rw-r--r-- 0 root (0) root (0) 36282 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01286_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 9569 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01298.html │ │ │ --rw-r--r-- 0 root (0) root (0) 396 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01298.js │ │ │ --rw-r--r-- 0 root (0) root (0) 56351 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01298_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 12024 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01304.html │ │ │ --rw-r--r-- 0 root (0) root (0) 73755 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01304_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4370 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01307.html │ │ │ --rw-r--r-- 0 root (0) root (0) 118 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01307.js │ │ │ --rw-r--r-- 0 root (0) root (0) 14159 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01307_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4808 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01310.html │ │ │ --rw-r--r-- 0 root (0) root (0) 223 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01310.js │ │ │ --rw-r--r-- 0 root (0) root (0) 23710 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01310_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3307 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01313.html │ │ │ --rw-r--r-- 0 root (0) root (0) 12692 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01313_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3320 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01340.html │ │ │ --rw-r--r-- 0 root (0) root (0) 15830 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01340_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4368 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01358.html │ │ │ --rw-r--r-- 0 root (0) root (0) 104 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01358.js │ │ │ --rw-r--r-- 0 root (0) root (0) 16691 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01358_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3309 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01361.html │ │ │ --rw-r--r-- 0 root (0) root (0) 16157 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01361_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 19519 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01364.html │ │ │ --rw-r--r-- 0 root (0) root (0) 115591 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01364_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4808 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01367.html │ │ │ --rw-r--r-- 0 root (0) root (0) 211 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01367.js │ │ │ --rw-r--r-- 0 root (0) root (0) 21432 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01367_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4246 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01370.html │ │ │ --rw-r--r-- 0 root (0) root (0) 100 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01370.js │ │ │ --rw-r--r-- 0 root (0) root (0) 14606 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01370_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 12024 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01295.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 73755 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01295_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9569 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01301.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 396 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01301.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 56351 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01301_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4808 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01307.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 223 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01307.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 23710 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01307_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4370 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01310.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 118 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01310.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 14159 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01310_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3320 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01313.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 15830 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01313_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3307 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01325.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 12692 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01325_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 19519 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01340.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 115591 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01340_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4368 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01349.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 104 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01349.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 16691 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01349_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3309 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01364.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 16157 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01364_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4246 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01367.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 100 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01367.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 14606 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01367_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4808 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01370.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 211 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01370.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 21432 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01370_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 3326 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01373.html │ │ │ -rw-r--r-- 0 root (0) root (0) 14861 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01373_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 17838 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01376.html │ │ │ --rw-r--r-- 0 root (0) root (0) 117267 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01376_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3381 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01379.html │ │ │ --rw-r--r-- 0 root (0) root (0) 10192 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01379_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4205 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01382.html │ │ │ --rw-r--r-- 0 root (0) root (0) 85 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01382.js │ │ │ --rw-r--r-- 0 root (0) root (0) 17821 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01382_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4222 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01385.html │ │ │ --rw-r--r-- 0 root (0) root (0) 83 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01385.js │ │ │ --rw-r--r-- 0 root (0) root (0) 14541 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01385_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4214 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01388.html │ │ │ --rw-r--r-- 0 root (0) root (0) 86 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01388.js │ │ │ --rw-r--r-- 0 root (0) root (0) 17052 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01388_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4169 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01391.html │ │ │ --rw-r--r-- 0 root (0) root (0) 80 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01391.js │ │ │ --rw-r--r-- 0 root (0) root (0) 15527 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01391_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 9830 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01394.html │ │ │ --rw-r--r-- 0 root (0) root (0) 408 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01394.js │ │ │ --rw-r--r-- 0 root (0) root (0) 52725 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01394_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 13992 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01397.html │ │ │ --rw-r--r-- 0 root (0) root (0) 490 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01397.js │ │ │ --rw-r--r-- 0 root (0) root (0) 56505 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01397_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3293 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01400.html │ │ │ --rw-r--r-- 0 root (0) root (0) 11050 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01400_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4241 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01403.html │ │ │ --rw-r--r-- 0 root (0) root (0) 98 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01403.js │ │ │ --rw-r--r-- 0 root (0) root (0) 12556 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01403_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4332 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01406.html │ │ │ --rw-r--r-- 0 root (0) root (0) 111 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01406.js │ │ │ --rw-r--r-- 0 root (0) root (0) 14843 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01406_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3381 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01376.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 10192 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01376_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 17838 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01379.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 117267 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01379_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4169 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01382.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 80 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01382.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 15527 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01382_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 13992 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01385.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 490 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01385.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 56505 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01385_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4332 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01388.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 111 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01388.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 14843 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01388_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3281 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01391.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 11034 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01391_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3325 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01394.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 11698 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01394_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4241 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01397.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 98 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01397.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 12556 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01397_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3329 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01400.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 11711 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01400_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3293 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01403.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 11050 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01403_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4214 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01406.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 86 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01406.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 17052 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01406_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 7651 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01409.html │ │ │ -rw-r--r-- 0 root (0) root (0) 112 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01409.js │ │ │ -rw-r--r-- 0 root (0) root (0) 19008 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01409_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3281 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01412.html │ │ │ --rw-r--r-- 0 root (0) root (0) 11034 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01412_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3325 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01415.html │ │ │ --rw-r--r-- 0 root (0) root (0) 11698 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01415_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3329 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01418.html │ │ │ --rw-r--r-- 0 root (0) root (0) 11711 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01418_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 10648 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01424.html │ │ │ --rw-r--r-- 0 root (0) root (0) 148 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01424.js │ │ │ --rw-r--r-- 0 root (0) root (0) 49347 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01424_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 17478 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01427.html │ │ │ --rw-r--r-- 0 root (0) root (0) 126 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01427.js │ │ │ --rw-r--r-- 0 root (0) root (0) 59658 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01427_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3721 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01430.html │ │ │ --rw-r--r-- 0 root (0) root (0) 12021 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01430_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4222 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01412.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 83 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01412.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 14541 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01412_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9830 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01415.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 408 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01415.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 52725 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01415_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4205 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01418.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 85 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01418.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 17821 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01418_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 10648 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01421.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 148 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01421.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 49347 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01421_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3721 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01427.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 12021 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01427_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 17478 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01430.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 126 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01430.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 59658 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01430_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 4237 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01433.html │ │ │ -rw-r--r-- 0 root (0) root (0) 85 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01433.js │ │ │ -rw-r--r-- 0 root (0) root (0) 18072 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01433_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 4749 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01436.html │ │ │ -rw-r--r-- 0 root (0) root (0) 201 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01436.js │ │ │ -rw-r--r-- 0 root (0) root (0) 17302 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01436_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 13834 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01439.html │ │ │ -rw-r--r-- 0 root (0) root (0) 91361 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01439_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 8733 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01442.html │ │ │ -rw-r--r-- 0 root (0) root (0) 32019 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01442_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3272 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01445.html │ │ │ --rw-r--r-- 0 root (0) root (0) 11382 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01445_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3267 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01445.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 37311 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01445_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 8453 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01448.html │ │ │ -rw-r--r-- 0 root (0) root (0) 124 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01448.js │ │ │ -rw-r--r-- 0 root (0) root (0) 34961 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01448_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3267 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01451.html │ │ │ --rw-r--r-- 0 root (0) root (0) 37311 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01451_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 18139 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01454.html │ │ │ --rw-r--r-- 0 root (0) root (0) 1483 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01454.js │ │ │ --rw-r--r-- 0 root (0) root (0) 215696 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01454_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 18139 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01451.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 1483 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01451.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 215696 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01451_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3272 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01454.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 11382 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01454_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 15923 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01457.html │ │ │ -rw-r--r-- 0 root (0) root (0) 101344 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01457_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 3291 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01460.html │ │ │ -rw-r--r-- 0 root (0) root (0) 68682 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01460_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 10416 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01463.html │ │ │ -rw-r--r-- 0 root (0) root (0) 42474 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01463_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4208 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01466.html │ │ │ --rw-r--r-- 0 root (0) root (0) 94 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01466.js │ │ │ --rw-r--r-- 0 root (0) root (0) 39369 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01466_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7470 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01469.html │ │ │ --rw-r--r-- 0 root (0) root (0) 30164 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01469_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4202 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01472.html │ │ │ --rw-r--r-- 0 root (0) root (0) 83 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01472.js │ │ │ --rw-r--r-- 0 root (0) root (0) 17711 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01472_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4232 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01475.html │ │ │ --rw-r--r-- 0 root (0) root (0) 86 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01475.js │ │ │ --rw-r--r-- 0 root (0) root (0) 34021 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01475_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4227 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01478.html │ │ │ --rw-r--r-- 0 root (0) root (0) 85 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01478.js │ │ │ --rw-r--r-- 0 root (0) root (0) 31583 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01478_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3337 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01481.html │ │ │ --rw-r--r-- 0 root (0) root (0) 35496 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01481_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3322 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01484.html │ │ │ --rw-r--r-- 0 root (0) root (0) 27954 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01484_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4513 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01487.html │ │ │ --rw-r--r-- 0 root (0) root (0) 134 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01487.js │ │ │ --rw-r--r-- 0 root (0) root (0) 17923 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01487_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7470 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01466.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 30164 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01466_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4208 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01469.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 94 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01469.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 39369 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01469_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4227 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01472.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 85 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01472.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 31583 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01472_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4202 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01475.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 83 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01475.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 17711 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01475_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4232 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01478.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 86 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01478.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 34021 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01478_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4513 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01481.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 134 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01481.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 17923 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01481_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3337 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01484.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 35496 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01484_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3322 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01487.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 27954 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01487_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 3350 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01490.html │ │ │ -rw-r--r-- 0 root (0) root (0) 46899 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01490_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3346 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01493.html │ │ │ --rw-r--r-- 0 root (0) root (0) 16222 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01493_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3398 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01496.html │ │ │ --rw-r--r-- 0 root (0) root (0) 33547 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01496_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 10464 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01499.html │ │ │ --rw-r--r-- 0 root (0) root (0) 47331 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01499_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3272 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01502.html │ │ │ --rw-r--r-- 0 root (0) root (0) 39775 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01502_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3398 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01493.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 33547 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01493_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3346 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01496.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 16222 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01496_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3272 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01499.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 39775 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01499_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 10464 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01502.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 47331 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01502_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 12496 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01505.html │ │ │ -rw-r--r-- 0 root (0) root (0) 52933 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01505_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 4443 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01508.html │ │ │ -rw-r--r-- 0 root (0) root (0) 136 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01508.js │ │ │ -rw-r--r-- 0 root (0) root (0) 12844 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01508_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6584 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01517.html │ │ │ --rw-r--r-- 0 root (0) root (0) 132 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01517.js │ │ │ --rw-r--r-- 0 root (0) root (0) 34848 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01517_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4424 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01517.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 135 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01517.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 14229 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01517_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 3386 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01520.html │ │ │ -rw-r--r-- 0 root (0) root (0) 16873 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01520_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4424 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01523.html │ │ │ --rw-r--r-- 0 root (0) root (0) 135 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01523.js │ │ │ --rw-r--r-- 0 root (0) root (0) 14229 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01523_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6584 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01523.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 132 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01523.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 34848 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01523_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 4248 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01526.html │ │ │ -rw-r--r-- 0 root (0) root (0) 90 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01526.js │ │ │ -rw-r--r-- 0 root (0) root (0) 17767 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01526_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 3343 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01529.html │ │ │ -rw-r--r-- 0 root (0) root (0) 26867 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01529_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 3447 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01532.html │ │ │ -rw-r--r-- 0 root (0) root (0) 22876 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/a01532_source.html │ │ │ @@ -8419,28 +8419,28 @@ │ │ │ -rw-r--r-- 0 root (0) root (0) 9802 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/namespacemembers_vars.html │ │ │ -rw-r--r-- 0 root (0) root (0) 5195 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/namespacemembers_w.html │ │ │ -rw-r--r-- 0 root (0) root (0) 2632 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/namespacemembers_y.html │ │ │ -rw-r--r-- 0 root (0) root (0) 12982 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/namespaces.html │ │ │ -rw-r--r-- 0 root (0) root (0) 632 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/namespaces_dup.js │ │ │ -rw-r--r-- 0 root (0) root (0) 5658 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/navtree.css │ │ │ -rw-r--r-- 0 root (0) root (0) 33741 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/navtree.js │ │ │ --rw-r--r-- 0 root (0) root (0) 5217 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/navtreedata.js │ │ │ --rw-r--r-- 0 root (0) root (0) 7585 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/navtreeindex0.js │ │ │ --rw-r--r-- 0 root (0) root (0) 7513 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/navtreeindex1.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 5224 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/navtreedata.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 7562 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/navtreeindex0.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 7530 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/navtreeindex1.js │ │ │ -rw-r--r-- 0 root (0) root (0) 12947 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/navtreeindex10.js │ │ │ -rw-r--r-- 0 root (0) root (0) 14781 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/navtreeindex11.js │ │ │ -rw-r--r-- 0 root (0) root (0) 13948 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/navtreeindex12.js │ │ │ -rw-r--r-- 0 root (0) root (0) 14472 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/navtreeindex13.js │ │ │ -rw-r--r-- 0 root (0) root (0) 14972 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/navtreeindex14.js │ │ │ -rw-r--r-- 0 root (0) root (0) 14975 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/navtreeindex15.js │ │ │ -rw-r--r-- 0 root (0) root (0) 15092 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/navtreeindex16.js │ │ │ -rw-r--r-- 0 root (0) root (0) 15613 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/navtreeindex17.js │ │ │ -rw-r--r-- 0 root (0) root (0) 15800 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/navtreeindex18.js │ │ │ -rw-r--r-- 0 root (0) root (0) 15971 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/navtreeindex19.js │ │ │ --rw-r--r-- 0 root (0) root (0) 8588 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/navtreeindex2.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 8594 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/navtreeindex2.js │ │ │ -rw-r--r-- 0 root (0) root (0) 15365 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/navtreeindex20.js │ │ │ -rw-r--r-- 0 root (0) root (0) 8525 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/navtreeindex21.js │ │ │ -rw-r--r-- 0 root (0) root (0) 14981 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/navtreeindex22.js │ │ │ -rw-r--r-- 0 root (0) root (0) 14750 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/navtreeindex23.js │ │ │ -rw-r--r-- 0 root (0) root (0) 13472 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/navtreeindex24.js │ │ │ -rw-r--r-- 0 root (0) root (0) 14973 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/navtreeindex25.js │ │ │ -rw-r--r-- 0 root (0) root (0) 15204 2026-02-24 09:32:12.000000 ./usr/share/doc/gcc-11-base/libstdc++/user/navtreeindex26.js │ │ ├── ./usr/share/doc/gcc-11-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 2026.2.24) 24 FEB 2026 10:30 │ │ │ +This is pdfTeX, Version 3.141592653-2.6-1.40.28 (TeX Live 2025/Debian) (preloaded format=latex 2026.2.24) 24 FEB 2026 16:10 │ │ │ entering extended mode │ │ │ restricted \write18 enabled. │ │ │ %&-line parsing enabled. │ │ │ **_formulas │ │ │ (./_formulas.tex │ │ │ LaTeX2e <2025-11-01> │ │ │ L3 programming layer <2026-01-19> │ │ ├── ./usr/share/doc/gcc-11-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 2026.2.24) 24 FEB 2026 10:30 │ │ │ +This is pdfTeX, Version 3.141592653-2.6-1.40.28 (TeX Live 2025/Debian) (preloaded format=latex 2026.2.24) 24 FEB 2026 16:10 │ │ │ entering extended mode │ │ │ restricted \write18 enabled. │ │ │ %&-line parsing enabled. │ │ │ **_formulas_dark │ │ │ (./_formulas_dark.tex │ │ │ LaTeX2e <2025-11-01> │ │ │ L3 programming layer <2026-01-19> │ │ ├── ./usr/share/doc/gcc-11-base/libstdc++/user/a00002.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: stdlib.h File Reference │ │ │ +libstdc++: fenv.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -48,45 +48,35 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
stdlib.h File Reference
│ │ │ +
fenv.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │

Go to the source code of this file.

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

│ │ │ -Functions

│ │ │ -void abort (void) throw ()
│ │ │ -int atexit (void(*)(void)) throw ()
│ │ │ -void exit (int) throw ()
│ │ │

Detailed Description

│ │ │

This is a Standard C++ Library header.

│ │ │ │ │ │ -

Definition in file stdlib.h.

│ │ │ +

Definition in file fenv.h.

│ │ │
│ │ │
│ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,12 +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_. │ │ │ │ -FFuunnccttiioonnss │ │ │ │ -void  aabboorrtt (void) throw () │ │ │ │ - int  aatteexxiitt (void(*)(void)) throw () │ │ │ │ -void  eexxiitt (int) throw () │ │ │ │ ********** 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.15.0 │ │ ├── ./usr/share/doc/gcc-11-base/libstdc++/user/a00002_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: stdlib.h Source File │ │ │ +libstdc++: fenv.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -48,20 +48,20 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
stdlib.h
│ │ │ +
fenv.h
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1// -*- C++ -*- compatibility header.
│ │ │
2
│ │ │ -
3// Copyright (C) 2002-2021 Free Software Foundation, Inc.
│ │ │ +
3// Copyright (C) 2007-2021 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
│ │ │ @@ -75,83 +75,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// <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
│ │ │ -
43 using std::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-2021 Free Software Foundation, Inc. │ │ │ │ +3// Copyright (C) 2007-2021 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,76 +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 std::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 _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 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 │ │ │ │ -_c_s_t_d_l_i_b │ │ │ │ -_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_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.15.0 │ │ ├── ./usr/share/doc/gcc-11-base/libstdc++/user/a00005.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: math.h File Reference │ │ │ +libstdc++: complex.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -48,773 +48,42 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
math.h File Reference
│ │ │ +
complex.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │

Go to the source code of this file.

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

│ │ │ -Functions

template<typename _Tp>
_Tp abs (const complex< _Tp > &)
template<typename _Tp>
std::complex< _Tp > acos (const std::complex< _Tp > &__z)
template<typename _Tp>
std::complex< _Tp > asin (const std::complex< _Tp > &__z)
template<typename _Tp>
std::complex< _Tp > atan (const std::complex< _Tp > &__z)
constexpr float atan2 (float __y, float __x)
constexpr float ceil (float __x)
template<typename _Tp>
complex< _Tp > cos (const complex< _Tp > &)
template<typename _Tp>
complex< _Tp > cosh (const complex< _Tp > &)
template<typename _Tp>
complex< _Tp > exp (const complex< _Tp > &)
template<typename _Tp>
_Tp fabs (const std::complex< _Tp > &__z)
constexpr float floor (float __x)
constexpr float fmod (float __x, float __y)
float frexp (float __x, int *__exp)
constexpr float ldexp (float __x, int __exp)
template<typename _Tp>
complex< _Tp > log (const complex< _Tp > &)
template<typename _Tp>
complex< _Tp > log10 (const complex< _Tp > &)
float modf (float __x, float *__iptr)
template<typename _Tp>
complex< _Tp > pow (const complex< _Tp > &, int)
template<typename _Tp>
complex< _Tp > sin (const complex< _Tp > &)
template<typename _Tp>
complex< _Tp > sinh (const complex< _Tp > &)
template<typename _Tp>
complex< _Tp > sqrt (const complex< _Tp > &)
template<typename _Tp>
complex< _Tp > tan (const complex< _Tp > &)
template<typename _Tp>
complex< _Tp > tanh (const complex< _Tp > &)

│ │ │ +Macros

#define _GLIBCXX_COMPLEX_H
│ │ │

Detailed Description

│ │ │

This is a Standard C++ Library header.

│ │ │ │ │ │ -

Definition in file math.h.

│ │ │ -

Function Documentation

│ │ │ - │ │ │ -

◆ abs()

│ │ │ +

Definition in file complex.h.

│ │ │ +

Macro Definition Documentation

│ │ │ + │ │ │ +

◆ _GLIBCXX_COMPLEX_H

│ │ │ │ │ │
│ │ │
│ │ │ -
│ │ │ -template<typename _Tp>
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
│ │ │ │ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ │ │ │
_Tp std::abs (const complex< _Tp > & __z)#define _GLIBCXX_COMPLEX_H
│ │ │ -
│ │ │ -inline
│ │ │ -
│ │ │ - │ │ │ -

Return magnitude of z.

│ │ │ - │ │ │ -

Definition at line 630 of file complex.

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

◆ acos()

│ │ │ - │ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -template<typename _Tp>
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
std::complex< _Tp > std::acos (const std::complex< _Tp > & __z)
│ │ │ -
│ │ │ -inline
│ │ │ -
│ │ │ - │ │ │ -

acos(__z) [8.1.2].

│ │ │ - │ │ │ -

Definition at line 1638 of file complex.

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

◆ asin()

│ │ │ - │ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -template<typename _Tp>
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
std::complex< _Tp > std::asin (const std::complex< _Tp > & __z)
│ │ │ -
│ │ │ -inline
│ │ │ -
│ │ │ - │ │ │ -

asin(__z) [8.1.3].

│ │ │ - │ │ │ -

Definition at line 1674 of file complex.

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

◆ atan()

│ │ │ - │ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -template<typename _Tp>
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
std::complex< _Tp > std::atan (const std::complex< _Tp > & __z)
│ │ │ -
│ │ │ -inline
│ │ │ -
│ │ │ - │ │ │ -

atan(__z) [8.1.4].

│ │ │ - │ │ │ -

Definition at line 1718 of file complex.

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

◆ atan2()

│ │ │ - │ │ │ -
│ │ │ -
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
float std::atan2 (float __y,
float __x )
│ │ │ -
│ │ │ -inlineconstexpr
│ │ │ -
│ │ │ - │ │ │ -

Definition at line 144 of file cmath.

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

◆ ceil()

│ │ │ - │ │ │ -
│ │ │ -
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
float std::ceil (float __x)
│ │ │ -
│ │ │ -inlineconstexpr
│ │ │ -
│ │ │ - │ │ │ -

Definition at line 165 of file cmath.

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

◆ cos()

│ │ │ - │ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -template<typename _Tp>
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
complex< _Tp > std::cos (const complex< _Tp > & __z)
│ │ │ -
│ │ │ -inline
│ │ │ -
│ │ │ - │ │ │ -

Return complex cosine of z.

│ │ │ - │ │ │ -

Definition at line 741 of file complex.

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

◆ cosh()

│ │ │ - │ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -template<typename _Tp>
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
complex< _Tp > std::cosh (const complex< _Tp > & __z)
│ │ │ -
│ │ │ -inline
│ │ │ -
│ │ │ - │ │ │ -

Return complex hyperbolic cosine of z.

│ │ │ - │ │ │ -

Definition at line 771 of file complex.

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

◆ exp()

│ │ │ - │ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -template<typename _Tp>
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
complex< _Tp > std::exp (const complex< _Tp > & __z)
│ │ │ -
│ │ │ -inline
│ │ │ -
│ │ │ - │ │ │ -

Return complex base e exponential of z.

│ │ │ - │ │ │ -

Definition at line 797 of file complex.

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

◆ fabs()

│ │ │ - │ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -template<typename _Tp>
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
_Tp std::fabs (const std::complex< _Tp > & __z)
│ │ │ -
│ │ │ -inline
│ │ │ -
│ │ │ - │ │ │ -

fabs(__z) [8.1.8].

│ │ │ - │ │ │ -

Definition at line 1846 of file complex.

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

◆ floor()

│ │ │ - │ │ │ -
│ │ │ -
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
float std::floor (float __x)
│ │ │ -
│ │ │ -inlineconstexpr
│ │ │ -
│ │ │ - │ │ │ -

Definition at line 260 of file cmath.

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

◆ fmod()

│ │ │ - │ │ │ -
│ │ │ -
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
float std::fmod (float __x,
float __y )
│ │ │ -
│ │ │ -inlineconstexpr
│ │ │ -
│ │ │ - │ │ │ -

Definition at line 279 of file cmath.

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

◆ frexp()

│ │ │ - │ │ │ -
│ │ │ -
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
float std::frexp (float __x,
int * __exp )
│ │ │ -
│ │ │ -inline
│ │ │
│ │ │ │ │ │ -

Definition at line 300 of file cmath.

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

◆ ldexp()

│ │ │ - │ │ │ -
│ │ │ -
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
float std::ldexp (float __x,
int __exp )
│ │ │ -
│ │ │ -inlineconstexpr
│ │ │ -
│ │ │ - │ │ │ -

Definition at line 319 of file cmath.

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

◆ log()

│ │ │ - │ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -template<typename _Tp>
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
complex< _Tp > std::log (const complex< _Tp > & __z)
│ │ │ -
│ │ │ -inline
│ │ │ -
│ │ │ - │ │ │ -

Return complex natural logarithm of z.

│ │ │ - │ │ │ -

Definition at line 824 of file complex.

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

◆ log10()

│ │ │ - │ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -template<typename _Tp>
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
complex< _Tp > std::log10 (const complex< _Tp > & __z)
│ │ │ -
│ │ │ -inline
│ │ │ -
│ │ │ - │ │ │ -

Return complex base 10 logarithm of z.

│ │ │ - │ │ │ -

Definition at line 829 of file complex.

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

◆ modf()

│ │ │ - │ │ │ -
│ │ │ -
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
float std::modf (float __x,
float * __iptr )
│ │ │ -
│ │ │ -inline
│ │ │ -
│ │ │ - │ │ │ -

Definition at line 376 of file cmath.

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

◆ pow()

│ │ │ - │ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -template<typename _Tp>
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
complex< _Tp > std::pow (const complex< _Tp > & __z,
int __n )
│ │ │ -
│ │ │ -inline
│ │ │ -
│ │ │ - │ │ │ -

Return x to the y'th power.

│ │ │ - │ │ │ -

Definition at line 1019 of file complex.

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

◆ sin()

│ │ │ - │ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -template<typename _Tp>
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
complex< _Tp > std::sin (const complex< _Tp > & __z)
│ │ │ -
│ │ │ -inline
│ │ │ -
│ │ │ - │ │ │ -

Return complex sine of z.

│ │ │ - │ │ │ -

Definition at line 859 of file complex.

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

◆ sinh()

│ │ │ - │ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -template<typename _Tp>
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
complex< _Tp > std::sinh (const complex< _Tp > & __z)
│ │ │ -
│ │ │ -inline
│ │ │ -
│ │ │ - │ │ │ -

Return complex hyperbolic sine of z.

│ │ │ - │ │ │ -

Definition at line 889 of file complex.

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

◆ sqrt()

│ │ │ - │ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -template<typename _Tp>
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
complex< _Tp > std::sqrt (const complex< _Tp > & __z)
│ │ │ -
│ │ │ -inline
│ │ │ -
│ │ │ - │ │ │ -

Return complex square root of z.

│ │ │ - │ │ │ -

Definition at line 933 of file complex.

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

◆ tan()

│ │ │ - │ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -template<typename _Tp>
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
complex< _Tp > std::tan (const complex< _Tp > & __z)
│ │ │ -
│ │ │ -inline
│ │ │ -
│ │ │ - │ │ │ -

Return complex tangent of z.

│ │ │ - │ │ │ -

Definition at line 960 of file complex.

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

◆ tanh()

│ │ │ - │ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -template<typename _Tp>
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
complex< _Tp > std::tanh (const complex< _Tp > & __z)
│ │ │ -
│ │ │ -inline
│ │ │ -
│ │ │ - │ │ │ -

Return complex hyperbolic tangent of z.

│ │ │ - │ │ │ -

Definition at line 988 of file complex.

│ │ │ +

Definition at line 46 of file complex.h.

│ │ │ │ │ │
│ │ │
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,173 +1,14 @@ │ │ │ │ libstdc++ │ │ │ │ -math.h File Reference │ │ │ │ +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_. │ │ │ │ -FFuunnccttiioonnss │ │ │ │ -template │ │ │ │ - _Tp  _a_b_s (const complex< _Tp > &) │ │ │ │ -template │ │ │ │ -_s_t_d_:_:_c_o_m_p_l_e_x< _Tp >  _a_c_o_s (const _s_t_d_:_:_c_o_m_p_l_e_x< _Tp > &__z) │ │ │ │ -template │ │ │ │ -_s_t_d_:_:_c_o_m_p_l_e_x< _Tp >  _a_s_i_n (const _s_t_d_:_:_c_o_m_p_l_e_x< _Tp > &__z) │ │ │ │ -template │ │ │ │ -_s_t_d_:_:_c_o_m_p_l_e_x< _Tp >  _a_t_a_n (const _s_t_d_:_:_c_o_m_p_l_e_x< _Tp > &__z) │ │ │ │ - constexpr float  _a_t_a_n_2 (float __y, float __x) │ │ │ │ - constexpr float  _c_e_i_l (float __x) │ │ │ │ -template │ │ │ │ - complex< _Tp >  _c_o_s (const complex< _Tp > &) │ │ │ │ -template │ │ │ │ - complex< _Tp >  _c_o_s_h (const complex< _Tp > &) │ │ │ │ -template │ │ │ │ - complex< _Tp >  _e_x_p (const complex< _Tp > &) │ │ │ │ -template │ │ │ │ - _Tp  _f_a_b_s (const _s_t_d_:_:_c_o_m_p_l_e_x< _Tp > &__z) │ │ │ │ - constexpr float  _f_l_o_o_r (float __x) │ │ │ │ - constexpr float  _f_m_o_d (float __x, float __y) │ │ │ │ - float  _f_r_e_x_p (float __x, int *__exp) │ │ │ │ - constexpr float  _l_d_e_x_p (float __x, int __exp) │ │ │ │ -template │ │ │ │ - complex< _Tp >  _l_o_g (const complex< _Tp > &) │ │ │ │ -template │ │ │ │ - complex< _Tp >  _l_o_g_1_0 (const complex< _Tp > &) │ │ │ │ - float  _m_o_d_f (float __x, float *__iptr) │ │ │ │ -template │ │ │ │ - complex< _Tp >  _p_o_w (const complex< _Tp > &, int) │ │ │ │ -template │ │ │ │ - complex< _Tp >  _s_i_n (const complex< _Tp > &) │ │ │ │ -template │ │ │ │ - complex< _Tp >  _s_i_n_h (const complex< _Tp > &) │ │ │ │ -template │ │ │ │ - complex< _Tp >  _s_q_r_t (const complex< _Tp > &) │ │ │ │ -template │ │ │ │ - complex< _Tp >  _t_a_n (const complex< _Tp > &) │ │ │ │ -template │ │ │ │ - complex< _Tp >  _t_a_n_h (const complex< _Tp > &) │ │ │ │ +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 _m_a_t_h_._h. │ │ │ │ -********** FFuunnccttiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ -********** _?◆_? aabbss(()) ********** │ │ │ │ -template │ │ │ │ -_Tp _s_t_d_:_:_a_b_s ( const complex< _Tp > ____zz ) inline │ │ │ │ - & │ │ │ │ -Return magnitude of zz. │ │ │ │ -Definition at line _6_3_0 of file _c_o_m_p_l_e_x. │ │ │ │ -********** _?◆_? aaccooss(()) ********** │ │ │ │ -template │ │ │ │ -_s_t_d_:_:_c_o_m_p_l_e_x< _Tp > _s_t_d_:_: ( const _s_t_d_:_:_c_o_m_p_l_e_x< _Tp > & ____zz ) inline │ │ │ │ -_a_c_o_s │ │ │ │ -acos(__z) [8.1.2]. │ │ │ │ -Definition at line _1_6_3_8 of file _c_o_m_p_l_e_x. │ │ │ │ -********** _?◆_? aassiinn(()) ********** │ │ │ │ -template │ │ │ │ -_s_t_d_:_:_c_o_m_p_l_e_x< _Tp > _s_t_d_:_: ( const _s_t_d_:_:_c_o_m_p_l_e_x< _Tp > & ____zz ) inline │ │ │ │ -_a_s_i_n │ │ │ │ -asin(__z) [8.1.3]. │ │ │ │ -Definition at line _1_6_7_4 of file _c_o_m_p_l_e_x. │ │ │ │ -********** _?◆_? aattaann(()) ********** │ │ │ │ -template │ │ │ │ -_s_t_d_:_:_c_o_m_p_l_e_x< _Tp > _s_t_d_:_: ( const _s_t_d_:_:_c_o_m_p_l_e_x< _Tp > & ____zz ) inline │ │ │ │ -_a_t_a_n │ │ │ │ -atan(__z) [8.1.4]. │ │ │ │ -Definition at line _1_7_1_8 of file _c_o_m_p_l_e_x. │ │ │ │ -********** _?◆_? aattaann22(()) ********** │ │ │ │ -float std::atan2 ( float ____yy, inlineconstexpr │ │ │ │ - float ____xx ) │ │ │ │ -Definition at line _1_4_4 of file _c_m_a_t_h. │ │ │ │ -********** _?◆_? cceeiill(()) ********** │ │ │ │ -float std:: ( float ____xx ) inlineconstexpr │ │ │ │ -ceil │ │ │ │ -Definition at line _1_6_5 of file _c_m_a_t_h. │ │ │ │ -********** _?◆_? ccooss(()) ********** │ │ │ │ -template │ │ │ │ -complex< _Tp > _s_t_d_:_: ( const complex< _Tp > & ____zz ) inline │ │ │ │ -_c_o_s │ │ │ │ -Return complex cosine of zz. │ │ │ │ -Definition at line _7_4_1 of file _c_o_m_p_l_e_x. │ │ │ │ -********** _?◆_? ccoosshh(()) ********** │ │ │ │ -template │ │ │ │ -complex< _Tp > _s_t_d_:_: ( const complex< _Tp > & ____zz ) inline │ │ │ │ -_c_o_s_h │ │ │ │ -Return complex hyperbolic cosine of zz. │ │ │ │ -Definition at line _7_7_1 of file _c_o_m_p_l_e_x. │ │ │ │ -********** _?◆_? eexxpp(()) ********** │ │ │ │ -template │ │ │ │ -complex< _Tp > _s_t_d_:_: ( const complex< _Tp > & ____zz ) inline │ │ │ │ -_e_x_p │ │ │ │ -Return complex base e exponential of zz. │ │ │ │ -Definition at line _7_9_7 of file _c_o_m_p_l_e_x. │ │ │ │ -********** _?◆_? ffaabbss(()) ********** │ │ │ │ -template │ │ │ │ -_Tp _s_t_d_:_:_f_a_b_s ( const _s_t_d_:_:_c_o_m_p_l_e_x< _Tp > ____zz ) inline │ │ │ │ - & │ │ │ │ -fabs(__z) [8.1.8]. │ │ │ │ -Definition at line _1_8_4_6 of file _c_o_m_p_l_e_x. │ │ │ │ -********** _?◆_? fflloooorr(()) ********** │ │ │ │ -float std:: ( float ____xx ) inlineconstexpr │ │ │ │ -floor │ │ │ │ -Definition at line _2_6_0 of file _c_m_a_t_h. │ │ │ │ -********** _?◆_? ffmmoodd(()) ********** │ │ │ │ -float std::fmod ( float ____xx, inlineconstexpr │ │ │ │ - float ____yy ) │ │ │ │ -Definition at line _2_7_9 of file _c_m_a_t_h. │ │ │ │ -********** _?◆_? ffrreexxpp(()) ********** │ │ │ │ -float std::frexp ( float ____xx, inline │ │ │ │ - int * ____eexxpp ) │ │ │ │ -Definition at line _3_0_0 of file _c_m_a_t_h. │ │ │ │ -********** _?◆_? llddeexxpp(()) ********** │ │ │ │ -float std::ldexp ( float ____xx, inlineconstexpr │ │ │ │ - int ____eexxpp ) │ │ │ │ -Definition at line _3_1_9 of file _c_m_a_t_h. │ │ │ │ -********** _?◆_? lloogg(()) ********** │ │ │ │ -template │ │ │ │ -complex< _Tp > _s_t_d_:_: ( const complex< _Tp > & ____zz ) inline │ │ │ │ -_l_o_g │ │ │ │ -Return complex natural logarithm of zz. │ │ │ │ -Definition at line _8_2_4 of file _c_o_m_p_l_e_x. │ │ │ │ -********** _?◆_? lloogg1100(()) ********** │ │ │ │ -template │ │ │ │ -complex< _Tp > _s_t_d_:_: ( const complex< _Tp > & ____zz ) inline │ │ │ │ -_l_o_g_1_0 │ │ │ │ -Return complex base 10 logarithm of zz. │ │ │ │ -Definition at line _8_2_9 of file _c_o_m_p_l_e_x. │ │ │ │ -********** _?◆_? mmooddff(()) ********** │ │ │ │ -float std::modf ( float ____xx, inline │ │ │ │ - float * ____iippttrr ) │ │ │ │ -Definition at line _3_7_6 of file _c_m_a_t_h. │ │ │ │ -********** _?◆_? ppooww(()) ********** │ │ │ │ -template │ │ │ │ -complex< _Tp > _s_t_d_:_:_p_o_w ( const complex< _Tp > & ____zz, inline │ │ │ │ - int ____nn ) │ │ │ │ -Return xx to the yy''tthh power. │ │ │ │ -Definition at line _1_0_1_9 of file _c_o_m_p_l_e_x. │ │ │ │ -********** _?◆_? ssiinn(()) ********** │ │ │ │ -template │ │ │ │ -complex< _Tp > _s_t_d_:_: ( const complex< _Tp > & ____zz ) inline │ │ │ │ -_s_i_n │ │ │ │ -Return complex sine of zz. │ │ │ │ -Definition at line _8_5_9 of file _c_o_m_p_l_e_x. │ │ │ │ -********** _?◆_? ssiinnhh(()) ********** │ │ │ │ -template │ │ │ │ -complex< _Tp > _s_t_d_:_: ( const complex< _Tp > & ____zz ) inline │ │ │ │ -_s_i_n_h │ │ │ │ -Return complex hyperbolic sine of zz. │ │ │ │ -Definition at line _8_8_9 of file _c_o_m_p_l_e_x. │ │ │ │ -********** _?◆_? ssqqrrtt(()) ********** │ │ │ │ -template │ │ │ │ -complex< _Tp > _s_t_d_:_: ( const complex< _Tp > & ____zz ) inline │ │ │ │ -_s_q_r_t │ │ │ │ -Return complex square root of zz. │ │ │ │ -Definition at line _9_3_3 of file _c_o_m_p_l_e_x. │ │ │ │ -********** _?◆_? ttaann(()) ********** │ │ │ │ -template │ │ │ │ -complex< _Tp > _s_t_d_:_: ( const complex< _Tp > & ____zz ) inline │ │ │ │ -_t_a_n │ │ │ │ -Return complex tangent of zz. │ │ │ │ -Definition at line _9_6_0 of file _c_o_m_p_l_e_x. │ │ │ │ -********** _?◆_? ttaannhh(()) ********** │ │ │ │ -template │ │ │ │ -complex< _Tp > _s_t_d_:_: ( const complex< _Tp > & ____zz ) inline │ │ │ │ -_t_a_n_h │ │ │ │ -Return complex hyperbolic tangent of zz. │ │ │ │ -Definition at line _9_8_8 of file _c_o_m_p_l_e_x. │ │ │ │ - * _m_a_t_h_._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.15.0 │ │ ├── ./usr/share/doc/gcc-11-base/libstdc++/user/a00005_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: math.h Source File │ │ │ +libstdc++: complex.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -48,20 +48,20 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
math.h
│ │ │ +
complex.h
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1// -*- C++ -*- compatibility header.
│ │ │
2
│ │ │ -
3// Copyright (C) 2002-2021 Free Software Foundation, Inc.
│ │ │ +
3// Copyright (C) 2007-2021 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
│ │ │ @@ -75,265 +75,45 @@ │ │ │
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 math.h
│ │ │ +
25/** @file complex.h
│ │ │
26 * This is a Standard C++ Library header.
│ │ │
27 */
│ │ │
28
│ │ │ -
29#if !defined __cplusplus || defined _GLIBCXX_INCLUDE_NEXT_C_HEADERS
│ │ │ -
30# include_next <math.h>
│ │ │ -
31#else
│ │ │ -
32
│ │ │ -
33#ifndef _GLIBCXX_MATH_H
│ │ │ -
34#define _GLIBCXX_MATH_H 1
│ │ │ -
35
│ │ │ -
36# include <cmath>
│ │ │ -
37
│ │ │ -
38using std::abs;
│ │ │ -
39using std::acos;
│ │ │ -
40using std::asin;
│ │ │ -
41using std::atan;
│ │ │ -
42using std::atan2;
│ │ │ -
43using std::cos;
│ │ │ -
44using std::sin;
│ │ │ -
45using std::tan;
│ │ │ -
46using std::cosh;
│ │ │ -
47using std::sinh;
│ │ │ -
48using std::tanh;
│ │ │ -
49using std::exp;
│ │ │ -
50using std::frexp;
│ │ │ -
51using std::ldexp;
│ │ │ -
52using std::log;
│ │ │ -
53using std::log10;
│ │ │ -
54using std::modf;
│ │ │ -
55using std::pow;
│ │ │ -
56using std::sqrt;
│ │ │ -
57using std::ceil;
│ │ │ -
58using std::fabs;
│ │ │ -
59using std::floor;
│ │ │ -
60using std::fmod;
│ │ │ -
61
│ │ │ -
62#if _GLIBCXX_USE_C99_MATH
│ │ │ -
63using std::fpclassify;
│ │ │ -
64using std::isfinite;
│ │ │ -
65using std::isinf;
│ │ │ -
66using std::isnan;
│ │ │ -
67using std::isnormal;
│ │ │ -
68using std::signbit;
│ │ │ -
69using std::isgreater;
│ │ │ -
70using std::isgreaterequal;
│ │ │ -
71using std::isless;
│ │ │ -
72using std::islessequal;
│ │ │ -
73using std::islessgreater;
│ │ │ -
74using std::isunordered;
│ │ │ -
75#endif
│ │ │ -
76
│ │ │ -
77#if __cplusplus >= 201103L && defined(_GLIBCXX_USE_C99_MATH_TR1)
│ │ │ -
78using std::acosh;
│ │ │ -
79using std::asinh;
│ │ │ -
80using std::atanh;
│ │ │ -
81using std::cbrt;
│ │ │ -
82using std::copysign;
│ │ │ -
83using std::erf;
│ │ │ -
84using std::erfc;
│ │ │ -
85using std::exp2;
│ │ │ -
86using std::expm1;
│ │ │ -
87using std::fdim;
│ │ │ -
88using std::fma;
│ │ │ -
89using std::fmax;
│ │ │ -
90using std::fmin;
│ │ │ -
91using std::hypot;
│ │ │ -
92using std::ilogb;
│ │ │ -
93using std::lgamma;
│ │ │ -
94using std::llrint;
│ │ │ -
95using std::llround;
│ │ │ -
96using std::log1p;
│ │ │ -
97using std::log2;
│ │ │ -
98using std::logb;
│ │ │ -
99using std::lrint;
│ │ │ -
100using std::lround;
│ │ │ -
101using std::nearbyint;
│ │ │ -
102using std::nextafter;
│ │ │ -
103using std::nexttoward;
│ │ │ -
104using std::remainder;
│ │ │ -
105using std::remquo;
│ │ │ -
106using std::rint;
│ │ │ -
107using std::round;
│ │ │ -
108using std::scalbln;
│ │ │ -
109using std::scalbn;
│ │ │ -
110using std::tgamma;
│ │ │ -
111using std::trunc;
│ │ │ -
112#endif // C++11 && _GLIBCXX_USE_C99_MATH_TR1
│ │ │ -
113
│ │ │ -
114// The mathematical special functions are only added to the global namespace
│ │ │ -
115// by IS 29124, but not by C++17.
│ │ │ -
116#if __cplusplus >= 201103L && __STDCPP_WANT_MATH_SPEC_FUNCS__ != 0
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
123using std::betaf;
│ │ │ -
124using std::betal;
│ │ │ -
125using std::beta;
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
146using std::cyl_neumann;
│ │ │ -
147using std::ellint_1f;
│ │ │ -
148using std::ellint_1l;
│ │ │ -
149using std::ellint_1;
│ │ │ -
150using std::ellint_2f;
│ │ │ -
151using std::ellint_2l;
│ │ │ -
152using std::ellint_2;
│ │ │ -
153using std::ellint_3f;
│ │ │ -
154using std::ellint_3l;
│ │ │ -
155using std::ellint_3;
│ │ │ -
156using std::expintf;
│ │ │ -
157using std::expintl;
│ │ │ -
158using std::expint;
│ │ │ -
159using std::hermitef;
│ │ │ -
160using std::hermitel;
│ │ │ -
161using std::hermite;
│ │ │ -
162using std::laguerref;
│ │ │ -
163using std::laguerrel;
│ │ │ -
164using std::laguerre;
│ │ │ -
165using std::legendref;
│ │ │ -
166using std::legendrel;
│ │ │ -
167using std::legendre;
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
171using std::sph_besself;
│ │ │ -
172using std::sph_bessell;
│ │ │ -
173using std::sph_bessel;
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
179using std::sph_neumann;
│ │ │ -
180#endif // _GLIBCXX_USE_STD_SPEC_FUNCS
│ │ │ -
181
│ │ │ -
182#if __cplusplus > 201703L
│ │ │ -
183using std::lerp;
│ │ │ -
184#endif // C++20
│ │ │ -
185
│ │ │ -
186#endif // _GLIBCXX_MATH_H
│ │ │ -
187#endif // __cplusplus
│ │ │ - │ │ │ -
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
│ │ │ -
__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
│ │ │ -
_Tp fabs(const std::complex< _Tp > &)
fabs(__z) [8.1.8].
Definition complex:1846
│ │ │ -
std::complex< _Tp > asinh(const std::complex< _Tp > &)
asinh(__z) [8.1.6].
Definition complex:1793
│ │ │ -
std::complex< _Tp > atan(const std::complex< _Tp > &)
atan(__z) [8.1.4].
Definition complex:1718
│ │ │ -
std::complex< _Tp > atanh(const std::complex< _Tp > &)
atanh(__z) [8.1.7].
Definition complex:1837
│ │ │ -
std::complex< _Tp > acosh(const std::complex< _Tp > &)
acosh(__z) [8.1.5].
Definition complex:1754
│ │ │ -
std::complex< _Tp > acos(const std::complex< _Tp > &)
acos(__z) [8.1.2].
Definition complex:1638
│ │ │ -
std::complex< _Tp > asin(const std::complex< _Tp > &)
asin(__z) [8.1.3].
Definition complex:1674
│ │ │ +
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
│ │ │ + │ │ │ + │ │ │
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,13 +1,13 @@ │ │ │ │ libstdc++ │ │ │ │ -math.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. │ │ │ │ 2 │ │ │ │ -3// Copyright (C) 2002-2021 Free Software Foundation, Inc. │ │ │ │ +3// Copyright (C) 2007-2021 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,453 +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 math.h │ │ │ │ +25/** @file complex.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_MATH_H │ │ │ │ -34#define _GLIBCXX_MATH_H 1 │ │ │ │ -35 │ │ │ │ -36# include <_c_m_a_t_h> │ │ │ │ -37 │ │ │ │ -38using _s_t_d_:_:_a_b_s; │ │ │ │ -39using _s_t_d_:_:_a_c_o_s; │ │ │ │ -40using _s_t_d_:_:_a_s_i_n; │ │ │ │ -41using _s_t_d_:_:_a_t_a_n; │ │ │ │ -42using std::atan2; │ │ │ │ -43using _s_t_d_:_:_c_o_s; │ │ │ │ -44using _s_t_d_:_:_s_i_n; │ │ │ │ -45using _s_t_d_:_:_t_a_n; │ │ │ │ -46using _s_t_d_:_:_c_o_s_h; │ │ │ │ -47using _s_t_d_:_:_s_i_n_h; │ │ │ │ -48using _s_t_d_:_:_t_a_n_h; │ │ │ │ -49using _s_t_d_:_:_e_x_p; │ │ │ │ -50using std::frexp; │ │ │ │ -51using std::ldexp; │ │ │ │ -52using _s_t_d_:_:_l_o_g; │ │ │ │ -53using _s_t_d_:_:_l_o_g_1_0; │ │ │ │ -54using std::modf; │ │ │ │ -55using _s_t_d_:_:_p_o_w; │ │ │ │ -56using _s_t_d_:_:_s_q_r_t; │ │ │ │ -57using std::ceil; │ │ │ │ -58using _s_t_d_:_:_f_a_b_s; │ │ │ │ -59using std::floor; │ │ │ │ -60using std::fmod; │ │ │ │ -61 │ │ │ │ -62#if _GLIBCXX_USE_C99_MATH │ │ │ │ -63using std::fpclassify; │ │ │ │ -64using std::isfinite; │ │ │ │ -65using std::isinf; │ │ │ │ -66using std::isnan; │ │ │ │ -67using std::isnormal; │ │ │ │ -68using std::signbit; │ │ │ │ -69using std::isgreater; │ │ │ │ -70using std::isgreaterequal; │ │ │ │ -71using std::isless; │ │ │ │ -72using std::islessequal; │ │ │ │ -73using std::islessgreater; │ │ │ │ -74using std::isunordered; │ │ │ │ -75#endif │ │ │ │ -76 │ │ │ │ -77#if __cplusplus >= 201103L && defined(_GLIBCXX_USE_C99_MATH_TR1) │ │ │ │ -78using _s_t_d_:_:_a_c_o_s_h; │ │ │ │ -79using _s_t_d_:_:_a_s_i_n_h; │ │ │ │ -80using _s_t_d_:_:_a_t_a_n_h; │ │ │ │ -81using std::cbrt; │ │ │ │ -82using std::copysign; │ │ │ │ -83using std::erf; │ │ │ │ -84using std::erfc; │ │ │ │ -85using std::exp2; │ │ │ │ -86using std::expm1; │ │ │ │ -87using std::fdim; │ │ │ │ -88using std::fma; │ │ │ │ -89using std::fmax; │ │ │ │ -90using std::fmin; │ │ │ │ -91using std::hypot; │ │ │ │ -92using std::ilogb; │ │ │ │ -93using std::lgamma; │ │ │ │ -94using std::llrint; │ │ │ │ -95using std::llround; │ │ │ │ -96using std::log1p; │ │ │ │ -97using std::log2; │ │ │ │ -98using std::logb; │ │ │ │ -99using std::lrint; │ │ │ │ -100using std::lround; │ │ │ │ -101using std::nearbyint; │ │ │ │ -102using std::nextafter; │ │ │ │ -103using std::nexttoward; │ │ │ │ -104using std::remainder; │ │ │ │ -105using std::remquo; │ │ │ │ -106using std::rint; │ │ │ │ -107using std::round; │ │ │ │ -108using std::scalbln; │ │ │ │ -109using std::scalbn; │ │ │ │ -110using std::tgamma; │ │ │ │ -111using std::trunc; │ │ │ │ -112#endif // C++11 && _GLIBCXX_USE_C99_MATH_TR1 │ │ │ │ -113 │ │ │ │ -114// The mathematical special functions are only added to the global namespace │ │ │ │ -115// by IS 29124, but not by C++17. │ │ │ │ -116#if __cplusplus >= 201103L && __STDCPP_WANT_MATH_SPEC_FUNCS__ != 0 │ │ │ │ -117using _s_t_d_:_:_a_s_s_o_c___l_a_g_u_e_r_r_e_f; │ │ │ │ -118using _s_t_d_:_:_a_s_s_o_c___l_a_g_u_e_r_r_e_l; │ │ │ │ -119using _s_t_d_:_:_a_s_s_o_c___l_a_g_u_e_r_r_e; │ │ │ │ -120using _s_t_d_:_:_a_s_s_o_c___l_e_g_e_n_d_r_e_f; │ │ │ │ -121using _s_t_d_:_:_a_s_s_o_c___l_e_g_e_n_d_r_e_l; │ │ │ │ -122using _s_t_d_:_:_a_s_s_o_c___l_e_g_e_n_d_r_e; │ │ │ │ -123using _s_t_d_:_:_b_e_t_a_f; │ │ │ │ -124using _s_t_d_:_:_b_e_t_a_l; │ │ │ │ -125using _s_t_d_:_:_b_e_t_a; │ │ │ │ -126using _s_t_d_:_:_c_o_m_p___e_l_l_i_n_t___1_f; │ │ │ │ -127using _s_t_d_:_:_c_o_m_p___e_l_l_i_n_t___1_l; │ │ │ │ -128using _s_t_d_:_:_c_o_m_p___e_l_l_i_n_t___1; │ │ │ │ -129using _s_t_d_:_:_c_o_m_p___e_l_l_i_n_t___2_f; │ │ │ │ -130using _s_t_d_:_:_c_o_m_p___e_l_l_i_n_t___2_l; │ │ │ │ -131using _s_t_d_:_:_c_o_m_p___e_l_l_i_n_t___2; │ │ │ │ -132using _s_t_d_:_:_c_o_m_p___e_l_l_i_n_t___3_f; │ │ │ │ -133using _s_t_d_:_:_c_o_m_p___e_l_l_i_n_t___3_l; │ │ │ │ -134using _s_t_d_:_:_c_o_m_p___e_l_l_i_n_t___3; │ │ │ │ -135using _s_t_d_:_:_c_y_l___b_e_s_s_e_l___i_f; │ │ │ │ -136using _s_t_d_:_:_c_y_l___b_e_s_s_e_l___i_l; │ │ │ │ -137using _s_t_d_:_:_c_y_l___b_e_s_s_e_l___i; │ │ │ │ -138using _s_t_d_:_:_c_y_l___b_e_s_s_e_l___j_f; │ │ │ │ -139using _s_t_d_:_:_c_y_l___b_e_s_s_e_l___j_l; │ │ │ │ -140using _s_t_d_:_:_c_y_l___b_e_s_s_e_l___j; │ │ │ │ -141using _s_t_d_:_:_c_y_l___b_e_s_s_e_l___k_f; │ │ │ │ -142using _s_t_d_:_:_c_y_l___b_e_s_s_e_l___k_l; │ │ │ │ -143using _s_t_d_:_:_c_y_l___b_e_s_s_e_l___k; │ │ │ │ -144using _s_t_d_:_:_c_y_l___n_e_u_m_a_n_n_f; │ │ │ │ -145using _s_t_d_:_:_c_y_l___n_e_u_m_a_n_n_l; │ │ │ │ -146using _s_t_d_:_:_c_y_l___n_e_u_m_a_n_n; │ │ │ │ -147using _s_t_d_:_:_e_l_l_i_n_t___1_f; │ │ │ │ -148using _s_t_d_:_:_e_l_l_i_n_t___1_l; │ │ │ │ -149using _s_t_d_:_:_e_l_l_i_n_t___1; │ │ │ │ -150using _s_t_d_:_:_e_l_l_i_n_t___2_f; │ │ │ │ -151using _s_t_d_:_:_e_l_l_i_n_t___2_l; │ │ │ │ -152using _s_t_d_:_:_e_l_l_i_n_t___2; │ │ │ │ -153using _s_t_d_:_:_e_l_l_i_n_t___3_f; │ │ │ │ -154using _s_t_d_:_:_e_l_l_i_n_t___3_l; │ │ │ │ -155using _s_t_d_:_:_e_l_l_i_n_t___3; │ │ │ │ -156using _s_t_d_:_:_e_x_p_i_n_t_f; │ │ │ │ -157using _s_t_d_:_:_e_x_p_i_n_t_l; │ │ │ │ -158using _s_t_d_:_:_e_x_p_i_n_t; │ │ │ │ -159using _s_t_d_:_:_h_e_r_m_i_t_e_f; │ │ │ │ -160using _s_t_d_:_:_h_e_r_m_i_t_e_l; │ │ │ │ -161using _s_t_d_:_:_h_e_r_m_i_t_e; │ │ │ │ -162using _s_t_d_:_:_l_a_g_u_e_r_r_e_f; │ │ │ │ -163using _s_t_d_:_:_l_a_g_u_e_r_r_e_l; │ │ │ │ -164using _s_t_d_:_:_l_a_g_u_e_r_r_e; │ │ │ │ -165using _s_t_d_:_:_l_e_g_e_n_d_r_e_f; │ │ │ │ -166using _s_t_d_:_:_l_e_g_e_n_d_r_e_l; │ │ │ │ -167using _s_t_d_:_:_l_e_g_e_n_d_r_e; │ │ │ │ -168using _s_t_d_:_:_r_i_e_m_a_n_n___z_e_t_a_f; │ │ │ │ -169using _s_t_d_:_:_r_i_e_m_a_n_n___z_e_t_a_l; │ │ │ │ -170using _s_t_d_:_:_r_i_e_m_a_n_n___z_e_t_a; │ │ │ │ -171using _s_t_d_:_:_s_p_h___b_e_s_s_e_l_f; │ │ │ │ -172using _s_t_d_:_:_s_p_h___b_e_s_s_e_l_l; │ │ │ │ -173using _s_t_d_:_:_s_p_h___b_e_s_s_e_l; │ │ │ │ -174using _s_t_d_:_:_s_p_h___l_e_g_e_n_d_r_e_f; │ │ │ │ -175using _s_t_d_:_:_s_p_h___l_e_g_e_n_d_r_e_l; │ │ │ │ -176using _s_t_d_:_:_s_p_h___l_e_g_e_n_d_r_e; │ │ │ │ -177using _s_t_d_:_:_s_p_h___n_e_u_m_a_n_n_f; │ │ │ │ -178using _s_t_d_:_:_s_p_h___n_e_u_m_a_n_n_l; │ │ │ │ -179using _s_t_d_:_:_s_p_h___n_e_u_m_a_n_n; │ │ │ │ -180#endif // _GLIBCXX_USE_STD_SPEC_FUNCS │ │ │ │ -181 │ │ │ │ -182#if __cplusplus > 201703L │ │ │ │ -183using std::lerp; │ │ │ │ -184#endif // C++20 │ │ │ │ -185 │ │ │ │ -186#endif // _GLIBCXX_MATH_H │ │ │ │ -187#endif // __cplusplus │ │ │ │ -_c_m_a_t_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_:_:_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 │ │ │ │ -_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 │ │ │ │ -_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 │ │ │ │ -_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 │ │ │ │ -_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 │ │ │ │ -_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___3 │ │ │ │ -__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 . │ │ │ │ -DDeeffiinniittiioonn _s_p_e_c_f_u_n_._h_:_8_3_0 │ │ │ │ -_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 │ │ │ │ -_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 │ │ │ │ -_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 │ │ │ │ -_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 │ │ │ │ -_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 │ │ │ │ -_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 │ │ │ │ -_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_:_:_f_a_b_s │ │ │ │ -_Tp fabs(const std::complex< _Tp > &) │ │ │ │ -fabs(__z) [8.1.8]. │ │ │ │ -DDeeffiinniittiioonn _c_o_m_p_l_e_x_:_1_8_4_6 │ │ │ │ -_s_t_d_:_:_a_s_i_n_h │ │ │ │ -std::complex< _Tp > asinh(const std::complex< _Tp > &) │ │ │ │ -asinh(__z) [8.1.6]. │ │ │ │ -DDeeffiinniittiioonn _c_o_m_p_l_e_x_:_1_7_9_3 │ │ │ │ -_s_t_d_:_:_a_t_a_n │ │ │ │ -std::complex< _Tp > atan(const std::complex< _Tp > &) │ │ │ │ -atan(__z) [8.1.4]. │ │ │ │ -DDeeffiinniittiioonn _c_o_m_p_l_e_x_:_1_7_1_8 │ │ │ │ -_s_t_d_:_:_a_t_a_n_h │ │ │ │ -std::complex< _Tp > atanh(const std::complex< _Tp > &) │ │ │ │ -atanh(__z) [8.1.7]. │ │ │ │ -DDeeffiinniittiioonn _c_o_m_p_l_e_x_:_1_8_3_7 │ │ │ │ -_s_t_d_:_:_a_c_o_s_h │ │ │ │ -std::complex< _Tp > acosh(const std::complex< _Tp > &) │ │ │ │ -acosh(__z) [8.1.5]. │ │ │ │ -DDeeffiinniittiioonn _c_o_m_p_l_e_x_:_1_7_5_4 │ │ │ │ -_s_t_d_:_:_a_c_o_s │ │ │ │ -std::complex< _Tp > acos(const std::complex< _Tp > &) │ │ │ │ -acos(__z) [8.1.2]. │ │ │ │ -DDeeffiinniittiioonn _c_o_m_p_l_e_x_:_1_6_3_8 │ │ │ │ -_s_t_d_:_:_a_s_i_n │ │ │ │ -std::complex< _Tp > asin(const std::complex< _Tp > &) │ │ │ │ -asin(__z) [8.1.3]. │ │ │ │ -DDeeffiinniittiioonn _c_o_m_p_l_e_x_:_1_6_7_4 │ │ │ │ - * _m_a_t_h_._h │ │ │ │ +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_m_p_l_e_x │ │ │ │ +_c_+_+_c_o_n_f_i_g_._h │ │ │ │ + * _c_o_m_p_l_e_x_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.15.0 │ │ ├── ./usr/share/doc/gcc-11-base/libstdc++/user/a00008.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: tgmath.h File Reference │ │ │ +libstdc++: math.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -48,42 +48,773 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
tgmath.h File Reference
│ │ │ +
math.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │

Go to the source code of this file.

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

│ │ │ -Macros

#define _GLIBCXX_TGMATH_H

│ │ │ +Functions

template<typename _Tp>
_Tp abs (const complex< _Tp > &)
template<typename _Tp>
std::complex< _Tp > acos (const std::complex< _Tp > &__z)
template<typename _Tp>
std::complex< _Tp > asin (const std::complex< _Tp > &__z)
template<typename _Tp>
std::complex< _Tp > atan (const std::complex< _Tp > &__z)
constexpr float atan2 (float __y, float __x)
constexpr float ceil (float __x)
template<typename _Tp>
complex< _Tp > cos (const complex< _Tp > &)
template<typename _Tp>
complex< _Tp > cosh (const complex< _Tp > &)
template<typename _Tp>
complex< _Tp > exp (const complex< _Tp > &)
template<typename _Tp>
_Tp fabs (const std::complex< _Tp > &__z)
constexpr float floor (float __x)
constexpr float fmod (float __x, float __y)
float frexp (float __x, int *__exp)
constexpr float ldexp (float __x, int __exp)
template<typename _Tp>
complex< _Tp > log (const complex< _Tp > &)
template<typename _Tp>
complex< _Tp > log10 (const complex< _Tp > &)
float modf (float __x, float *__iptr)
template<typename _Tp>
complex< _Tp > pow (const complex< _Tp > &, int)
template<typename _Tp>
complex< _Tp > sin (const complex< _Tp > &)
template<typename _Tp>
complex< _Tp > sinh (const complex< _Tp > &)
template<typename _Tp>
complex< _Tp > sqrt (const complex< _Tp > &)
template<typename _Tp>
complex< _Tp > tan (const complex< _Tp > &)
template<typename _Tp>
complex< _Tp > tanh (const complex< _Tp > &)
│ │ │

Detailed Description

│ │ │

This is a Standard C++ Library header.

│ │ │ │ │ │ -

Definition in file tgmath.h.

│ │ │ -

Macro Definition Documentation

│ │ │ - │ │ │ -

◆ _GLIBCXX_TGMATH_H

│ │ │ +

Definition in file math.h.

│ │ │ +

Function Documentation

│ │ │ + │ │ │ +

◆ abs()

│ │ │ │ │ │
│ │ │
│ │ │ +
│ │ │ +template<typename _Tp>
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
│ │ │ │ │ │ │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ │ │ │
#define _GLIBCXX_TGMATH_H_Tp std::abs (const complex< _Tp > & __z)
│ │ │ +
│ │ │ +inline
│ │ │ +
│ │ │ + │ │ │ +

Return magnitude of z.

│ │ │ + │ │ │ +

Definition at line 630 of file complex.

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

◆ acos()

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +template<typename _Tp>
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
std::complex< _Tp > std::acos (const std::complex< _Tp > & __z)
│ │ │ +
│ │ │ +inline
│ │ │ +
│ │ │ + │ │ │ +

acos(__z) [8.1.2].

│ │ │ + │ │ │ +

Definition at line 1638 of file complex.

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

◆ asin()

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +template<typename _Tp>
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
std::complex< _Tp > std::asin (const std::complex< _Tp > & __z)
│ │ │ +
│ │ │ +inline
│ │ │ +
│ │ │ + │ │ │ +

asin(__z) [8.1.3].

│ │ │ + │ │ │ +

Definition at line 1674 of file complex.

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

◆ atan()

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +template<typename _Tp>
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
std::complex< _Tp > std::atan (const std::complex< _Tp > & __z)
│ │ │ +
│ │ │ +inline
│ │ │ +
│ │ │ + │ │ │ +

atan(__z) [8.1.4].

│ │ │ + │ │ │ +

Definition at line 1718 of file complex.

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

◆ atan2()

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
float std::atan2 (float __y,
float __x )
│ │ │ +
│ │ │ +inlineconstexpr
│ │ │ +
│ │ │ + │ │ │ +

Definition at line 144 of file cmath.

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

◆ ceil()

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
float std::ceil (float __x)
│ │ │ +
│ │ │ +inlineconstexpr
│ │ │ +
│ │ │ + │ │ │ +

Definition at line 165 of file cmath.

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

◆ cos()

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +template<typename _Tp>
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
complex< _Tp > std::cos (const complex< _Tp > & __z)
│ │ │ +
│ │ │ +inline
│ │ │ +
│ │ │ + │ │ │ +

Return complex cosine of z.

│ │ │ + │ │ │ +

Definition at line 741 of file complex.

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

◆ cosh()

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +template<typename _Tp>
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
complex< _Tp > std::cosh (const complex< _Tp > & __z)
│ │ │ +
│ │ │ +inline
│ │ │ +
│ │ │ + │ │ │ +

Return complex hyperbolic cosine of z.

│ │ │ + │ │ │ +

Definition at line 771 of file complex.

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

◆ exp()

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +template<typename _Tp>
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
complex< _Tp > std::exp (const complex< _Tp > & __z)
│ │ │ +
│ │ │ +inline
│ │ │ +
│ │ │ + │ │ │ +

Return complex base e exponential of z.

│ │ │ + │ │ │ +

Definition at line 797 of file complex.

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

◆ fabs()

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +template<typename _Tp>
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
_Tp std::fabs (const std::complex< _Tp > & __z)
│ │ │ +
│ │ │ +inline
│ │ │ +
│ │ │ + │ │ │ +

fabs(__z) [8.1.8].

│ │ │ + │ │ │ +

Definition at line 1846 of file complex.

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

◆ floor()

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
float std::floor (float __x)
│ │ │ +
│ │ │ +inlineconstexpr
│ │ │ +
│ │ │ + │ │ │ +

Definition at line 260 of file cmath.

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

◆ fmod()

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
float std::fmod (float __x,
float __y )
│ │ │ +
│ │ │ +inlineconstexpr
│ │ │ +
│ │ │ + │ │ │ +

Definition at line 279 of file cmath.

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

◆ frexp()

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
float std::frexp (float __x,
int * __exp )
│ │ │ +
│ │ │ +inline
│ │ │
│ │ │ │ │ │ -

Definition at line 40 of file tgmath.h.

│ │ │ +

Definition at line 300 of file cmath.

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

◆ ldexp()

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
float std::ldexp (float __x,
int __exp )
│ │ │ +
│ │ │ +inlineconstexpr
│ │ │ +
│ │ │ + │ │ │ +

Definition at line 319 of file cmath.

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

◆ log()

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +template<typename _Tp>
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
complex< _Tp > std::log (const complex< _Tp > & __z)
│ │ │ +
│ │ │ +inline
│ │ │ +
│ │ │ + │ │ │ +

Return complex natural logarithm of z.

│ │ │ + │ │ │ +

Definition at line 824 of file complex.

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

◆ log10()

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +template<typename _Tp>
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
complex< _Tp > std::log10 (const complex< _Tp > & __z)
│ │ │ +
│ │ │ +inline
│ │ │ +
│ │ │ + │ │ │ +

Return complex base 10 logarithm of z.

│ │ │ + │ │ │ +

Definition at line 829 of file complex.

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

◆ modf()

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
float std::modf (float __x,
float * __iptr )
│ │ │ +
│ │ │ +inline
│ │ │ +
│ │ │ + │ │ │ +

Definition at line 376 of file cmath.

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

◆ pow()

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +template<typename _Tp>
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
complex< _Tp > std::pow (const complex< _Tp > & __z,
int __n )
│ │ │ +
│ │ │ +inline
│ │ │ +
│ │ │ + │ │ │ +

Return x to the y'th power.

│ │ │ + │ │ │ +

Definition at line 1019 of file complex.

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

◆ sin()

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +template<typename _Tp>
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
complex< _Tp > std::sin (const complex< _Tp > & __z)
│ │ │ +
│ │ │ +inline
│ │ │ +
│ │ │ + │ │ │ +

Return complex sine of z.

│ │ │ + │ │ │ +

Definition at line 859 of file complex.

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

◆ sinh()

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +template<typename _Tp>
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
complex< _Tp > std::sinh (const complex< _Tp > & __z)
│ │ │ +
│ │ │ +inline
│ │ │ +
│ │ │ + │ │ │ +

Return complex hyperbolic sine of z.

│ │ │ + │ │ │ +

Definition at line 889 of file complex.

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

◆ sqrt()

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +template<typename _Tp>
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
complex< _Tp > std::sqrt (const complex< _Tp > & __z)
│ │ │ +
│ │ │ +inline
│ │ │ +
│ │ │ + │ │ │ +

Return complex square root of z.

│ │ │ + │ │ │ +

Definition at line 933 of file complex.

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

◆ tan()

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +template<typename _Tp>
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
complex< _Tp > std::tan (const complex< _Tp > & __z)
│ │ │ +
│ │ │ +inline
│ │ │ +
│ │ │ + │ │ │ +

Return complex tangent of z.

│ │ │ + │ │ │ +

Definition at line 960 of file complex.

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

◆ tanh()

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +template<typename _Tp>
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
complex< _Tp > std::tanh (const complex< _Tp > & __z)
│ │ │ +
│ │ │ +inline
│ │ │ +
│ │ │ + │ │ │ +

Return complex hyperbolic tangent of z.

│ │ │ + │ │ │ +

Definition at line 988 of file complex.

│ │ │ │ │ │
│ │ │
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,14 +1,173 @@ │ │ │ │ libstdc++ │ │ │ │ -tgmath.h File Reference │ │ │ │ +math.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 │ │ │ │ +FFuunnccttiioonnss │ │ │ │ +template │ │ │ │ + _Tp  _a_b_s (const complex< _Tp > &) │ │ │ │ +template │ │ │ │ +_s_t_d_:_:_c_o_m_p_l_e_x< _Tp >  _a_c_o_s (const _s_t_d_:_:_c_o_m_p_l_e_x< _Tp > &__z) │ │ │ │ +template │ │ │ │ +_s_t_d_:_:_c_o_m_p_l_e_x< _Tp >  _a_s_i_n (const _s_t_d_:_:_c_o_m_p_l_e_x< _Tp > &__z) │ │ │ │ +template │ │ │ │ +_s_t_d_:_:_c_o_m_p_l_e_x< _Tp >  _a_t_a_n (const _s_t_d_:_:_c_o_m_p_l_e_x< _Tp > &__z) │ │ │ │ + constexpr float  _a_t_a_n_2 (float __y, float __x) │ │ │ │ + constexpr float  _c_e_i_l (float __x) │ │ │ │ +template │ │ │ │ + complex< _Tp >  _c_o_s (const complex< _Tp > &) │ │ │ │ +template │ │ │ │ + complex< _Tp >  _c_o_s_h (const complex< _Tp > &) │ │ │ │ +template │ │ │ │ + complex< _Tp >  _e_x_p (const complex< _Tp > &) │ │ │ │ +template │ │ │ │ + _Tp  _f_a_b_s (const _s_t_d_:_:_c_o_m_p_l_e_x< _Tp > &__z) │ │ │ │ + constexpr float  _f_l_o_o_r (float __x) │ │ │ │ + constexpr float  _f_m_o_d (float __x, float __y) │ │ │ │ + float  _f_r_e_x_p (float __x, int *__exp) │ │ │ │ + constexpr float  _l_d_e_x_p (float __x, int __exp) │ │ │ │ +template │ │ │ │ + complex< _Tp >  _l_o_g (const complex< _Tp > &) │ │ │ │ +template │ │ │ │ + complex< _Tp >  _l_o_g_1_0 (const complex< _Tp > &) │ │ │ │ + float  _m_o_d_f (float __x, float *__iptr) │ │ │ │ +template │ │ │ │ + complex< _Tp >  _p_o_w (const complex< _Tp > &, int) │ │ │ │ +template │ │ │ │ + complex< _Tp >  _s_i_n (const complex< _Tp > &) │ │ │ │ +template │ │ │ │ + complex< _Tp >  _s_i_n_h (const complex< _Tp > &) │ │ │ │ +template │ │ │ │ + complex< _Tp >  _s_q_r_t (const complex< _Tp > &) │ │ │ │ +template │ │ │ │ + complex< _Tp >  _t_a_n (const complex< _Tp > &) │ │ │ │ +template │ │ │ │ + complex< _Tp >  _t_a_n_h (const complex< _Tp > &) │ │ │ │ ********** 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 _m_a_t_h_._h. │ │ │ │ +********** FFuunnccttiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ +********** _?◆_? aabbss(()) ********** │ │ │ │ +template │ │ │ │ +_Tp _s_t_d_:_:_a_b_s ( const complex< _Tp > ____zz ) inline │ │ │ │ + & │ │ │ │ +Return magnitude of zz. │ │ │ │ +Definition at line _6_3_0 of file _c_o_m_p_l_e_x. │ │ │ │ +********** _?◆_? aaccooss(()) ********** │ │ │ │ +template │ │ │ │ +_s_t_d_:_:_c_o_m_p_l_e_x< _Tp > _s_t_d_:_: ( const _s_t_d_:_:_c_o_m_p_l_e_x< _Tp > & ____zz ) inline │ │ │ │ +_a_c_o_s │ │ │ │ +acos(__z) [8.1.2]. │ │ │ │ +Definition at line _1_6_3_8 of file _c_o_m_p_l_e_x. │ │ │ │ +********** _?◆_? aassiinn(()) ********** │ │ │ │ +template │ │ │ │ +_s_t_d_:_:_c_o_m_p_l_e_x< _Tp > _s_t_d_:_: ( const _s_t_d_:_:_c_o_m_p_l_e_x< _Tp > & ____zz ) inline │ │ │ │ +_a_s_i_n │ │ │ │ +asin(__z) [8.1.3]. │ │ │ │ +Definition at line _1_6_7_4 of file _c_o_m_p_l_e_x. │ │ │ │ +********** _?◆_? aattaann(()) ********** │ │ │ │ +template │ │ │ │ +_s_t_d_:_:_c_o_m_p_l_e_x< _Tp > _s_t_d_:_: ( const _s_t_d_:_:_c_o_m_p_l_e_x< _Tp > & ____zz ) inline │ │ │ │ +_a_t_a_n │ │ │ │ +atan(__z) [8.1.4]. │ │ │ │ +Definition at line _1_7_1_8 of file _c_o_m_p_l_e_x. │ │ │ │ +********** _?◆_? aattaann22(()) ********** │ │ │ │ +float std::atan2 ( float ____yy, inlineconstexpr │ │ │ │ + float ____xx ) │ │ │ │ +Definition at line _1_4_4 of file _c_m_a_t_h. │ │ │ │ +********** _?◆_? cceeiill(()) ********** │ │ │ │ +float std:: ( float ____xx ) inlineconstexpr │ │ │ │ +ceil │ │ │ │ +Definition at line _1_6_5 of file _c_m_a_t_h. │ │ │ │ +********** _?◆_? ccooss(()) ********** │ │ │ │ +template │ │ │ │ +complex< _Tp > _s_t_d_:_: ( const complex< _Tp > & ____zz ) inline │ │ │ │ +_c_o_s │ │ │ │ +Return complex cosine of zz. │ │ │ │ +Definition at line _7_4_1 of file _c_o_m_p_l_e_x. │ │ │ │ +********** _?◆_? ccoosshh(()) ********** │ │ │ │ +template │ │ │ │ +complex< _Tp > _s_t_d_:_: ( const complex< _Tp > & ____zz ) inline │ │ │ │ +_c_o_s_h │ │ │ │ +Return complex hyperbolic cosine of zz. │ │ │ │ +Definition at line _7_7_1 of file _c_o_m_p_l_e_x. │ │ │ │ +********** _?◆_? eexxpp(()) ********** │ │ │ │ +template │ │ │ │ +complex< _Tp > _s_t_d_:_: ( const complex< _Tp > & ____zz ) inline │ │ │ │ +_e_x_p │ │ │ │ +Return complex base e exponential of zz. │ │ │ │ +Definition at line _7_9_7 of file _c_o_m_p_l_e_x. │ │ │ │ +********** _?◆_? ffaabbss(()) ********** │ │ │ │ +template │ │ │ │ +_Tp _s_t_d_:_:_f_a_b_s ( const _s_t_d_:_:_c_o_m_p_l_e_x< _Tp > ____zz ) inline │ │ │ │ + & │ │ │ │ +fabs(__z) [8.1.8]. │ │ │ │ +Definition at line _1_8_4_6 of file _c_o_m_p_l_e_x. │ │ │ │ +********** _?◆_? fflloooorr(()) ********** │ │ │ │ +float std:: ( float ____xx ) inlineconstexpr │ │ │ │ +floor │ │ │ │ +Definition at line _2_6_0 of file _c_m_a_t_h. │ │ │ │ +********** _?◆_? ffmmoodd(()) ********** │ │ │ │ +float std::fmod ( float ____xx, inlineconstexpr │ │ │ │ + float ____yy ) │ │ │ │ +Definition at line _2_7_9 of file _c_m_a_t_h. │ │ │ │ +********** _?◆_? ffrreexxpp(()) ********** │ │ │ │ +float std::frexp ( float ____xx, inline │ │ │ │ + int * ____eexxpp ) │ │ │ │ +Definition at line _3_0_0 of file _c_m_a_t_h. │ │ │ │ +********** _?◆_? llddeexxpp(()) ********** │ │ │ │ +float std::ldexp ( float ____xx, inlineconstexpr │ │ │ │ + int ____eexxpp ) │ │ │ │ +Definition at line _3_1_9 of file _c_m_a_t_h. │ │ │ │ +********** _?◆_? lloogg(()) ********** │ │ │ │ +template │ │ │ │ +complex< _Tp > _s_t_d_:_: ( const complex< _Tp > & ____zz ) inline │ │ │ │ +_l_o_g │ │ │ │ +Return complex natural logarithm of zz. │ │ │ │ +Definition at line _8_2_4 of file _c_o_m_p_l_e_x. │ │ │ │ +********** _?◆_? lloogg1100(()) ********** │ │ │ │ +template │ │ │ │ +complex< _Tp > _s_t_d_:_: ( const complex< _Tp > & ____zz ) inline │ │ │ │ +_l_o_g_1_0 │ │ │ │ +Return complex base 10 logarithm of zz. │ │ │ │ +Definition at line _8_2_9 of file _c_o_m_p_l_e_x. │ │ │ │ +********** _?◆_? mmooddff(()) ********** │ │ │ │ +float std::modf ( float ____xx, inline │ │ │ │ + float * ____iippttrr ) │ │ │ │ +Definition at line _3_7_6 of file _c_m_a_t_h. │ │ │ │ +********** _?◆_? ppooww(()) ********** │ │ │ │ +template │ │ │ │ +complex< _Tp > _s_t_d_:_:_p_o_w ( const complex< _Tp > & ____zz, inline │ │ │ │ + int ____nn ) │ │ │ │ +Return xx to the yy''tthh power. │ │ │ │ +Definition at line _1_0_1_9 of file _c_o_m_p_l_e_x. │ │ │ │ +********** _?◆_? ssiinn(()) ********** │ │ │ │ +template │ │ │ │ +complex< _Tp > _s_t_d_:_: ( const complex< _Tp > & ____zz ) inline │ │ │ │ +_s_i_n │ │ │ │ +Return complex sine of zz. │ │ │ │ +Definition at line _8_5_9 of file _c_o_m_p_l_e_x. │ │ │ │ +********** _?◆_? ssiinnhh(()) ********** │ │ │ │ +template │ │ │ │ +complex< _Tp > _s_t_d_:_: ( const complex< _Tp > & ____zz ) inline │ │ │ │ +_s_i_n_h │ │ │ │ +Return complex hyperbolic sine of zz. │ │ │ │ +Definition at line _8_8_9 of file _c_o_m_p_l_e_x. │ │ │ │ +********** _?◆_? ssqqrrtt(()) ********** │ │ │ │ +template │ │ │ │ +complex< _Tp > _s_t_d_:_: ( const complex< _Tp > & ____zz ) inline │ │ │ │ +_s_q_r_t │ │ │ │ +Return complex square root of zz. │ │ │ │ +Definition at line _9_3_3 of file _c_o_m_p_l_e_x. │ │ │ │ +********** _?◆_? ttaann(()) ********** │ │ │ │ +template │ │ │ │ +complex< _Tp > _s_t_d_:_: ( const complex< _Tp > & ____zz ) inline │ │ │ │ +_t_a_n │ │ │ │ +Return complex tangent of zz. │ │ │ │ +Definition at line _9_6_0 of file _c_o_m_p_l_e_x. │ │ │ │ +********** _?◆_? ttaannhh(()) ********** │ │ │ │ +template │ │ │ │ +complex< _Tp > _s_t_d_:_: ( const complex< _Tp > & ____zz ) inline │ │ │ │ +_t_a_n_h │ │ │ │ +Return complex hyperbolic tangent of zz. │ │ │ │ +Definition at line _9_8_8 of file _c_o_m_p_l_e_x. │ │ │ │ + * _m_a_t_h_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.15.0 │ │ ├── ./usr/share/doc/gcc-11-base/libstdc++/user/a00008_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: tgmath.h Source File │ │ │ +libstdc++: math.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -48,20 +48,20 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
tgmath.h
│ │ │ +
math.h
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1// -*- C++ -*- compatibility header.
│ │ │
2
│ │ │ -
3// Copyright (C) 2007-2021 Free Software Foundation, Inc.
│ │ │ +
3// Copyright (C) 2002-2021 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
│ │ │ @@ -75,39 +75,265 @@ │ │ │
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 math.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 <math.h>
│ │ │ +
31#else
│ │ │ +
32
│ │ │ +
33#ifndef _GLIBCXX_MATH_H
│ │ │ +
34#define _GLIBCXX_MATH_H 1
│ │ │ +
35
│ │ │ +
36# include <cmath>
│ │ │ +
37
│ │ │ +
38using std::abs;
│ │ │ +
39using std::acos;
│ │ │ +
40using std::asin;
│ │ │ +
41using std::atan;
│ │ │ +
42using std::atan2;
│ │ │ +
43using std::cos;
│ │ │ +
44using std::sin;
│ │ │ +
45using std::tan;
│ │ │ +
46using std::cosh;
│ │ │ +
47using std::sinh;
│ │ │ +
48using std::tanh;
│ │ │ +
49using std::exp;
│ │ │ +
50using std::frexp;
│ │ │ +
51using std::ldexp;
│ │ │ +
52using std::log;
│ │ │ +
53using std::log10;
│ │ │ +
54using std::modf;
│ │ │ +
55using std::pow;
│ │ │ +
56using std::sqrt;
│ │ │ +
57using std::ceil;
│ │ │ +
58using std::fabs;
│ │ │ +
59using std::floor;
│ │ │ +
60using std::fmod;
│ │ │ +
61
│ │ │ +
62#if _GLIBCXX_USE_C99_MATH
│ │ │ +
63using std::fpclassify;
│ │ │ +
64using std::isfinite;
│ │ │ +
65using std::isinf;
│ │ │ +
66using std::isnan;
│ │ │ +
67using std::isnormal;
│ │ │ +
68using std::signbit;
│ │ │ +
69using std::isgreater;
│ │ │ +
70using std::isgreaterequal;
│ │ │ +
71using std::isless;
│ │ │ +
72using std::islessequal;
│ │ │ +
73using std::islessgreater;
│ │ │ +
74using std::isunordered;
│ │ │ +
75#endif
│ │ │ +
76
│ │ │ +
77#if __cplusplus >= 201103L && defined(_GLIBCXX_USE_C99_MATH_TR1)
│ │ │ +
78using std::acosh;
│ │ │ +
79using std::asinh;
│ │ │ +
80using std::atanh;
│ │ │ +
81using std::cbrt;
│ │ │ +
82using std::copysign;
│ │ │ +
83using std::erf;
│ │ │ +
84using std::erfc;
│ │ │ +
85using std::exp2;
│ │ │ +
86using std::expm1;
│ │ │ +
87using std::fdim;
│ │ │ +
88using std::fma;
│ │ │ +
89using std::fmax;
│ │ │ +
90using std::fmin;
│ │ │ +
91using std::hypot;
│ │ │ +
92using std::ilogb;
│ │ │ +
93using std::lgamma;
│ │ │ +
94using std::llrint;
│ │ │ +
95using std::llround;
│ │ │ +
96using std::log1p;
│ │ │ +
97using std::log2;
│ │ │ +
98using std::logb;
│ │ │ +
99using std::lrint;
│ │ │ +
100using std::lround;
│ │ │ +
101using std::nearbyint;
│ │ │ +
102using std::nextafter;
│ │ │ +
103using std::nexttoward;
│ │ │ +
104using std::remainder;
│ │ │ +
105using std::remquo;
│ │ │ +
106using std::rint;
│ │ │ +
107using std::round;
│ │ │ +
108using std::scalbln;
│ │ │ +
109using std::scalbn;
│ │ │ +
110using std::tgamma;
│ │ │ +
111using std::trunc;
│ │ │ +
112#endif // C++11 && _GLIBCXX_USE_C99_MATH_TR1
│ │ │ +
113
│ │ │ +
114// The mathematical special functions are only added to the global namespace
│ │ │ +
115// by IS 29124, but not by C++17.
│ │ │ +
116#if __cplusplus >= 201103L && __STDCPP_WANT_MATH_SPEC_FUNCS__ != 0
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
123using std::betaf;
│ │ │ +
124using std::betal;
│ │ │ +
125using std::beta;
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
146using std::cyl_neumann;
│ │ │ +
147using std::ellint_1f;
│ │ │ +
148using std::ellint_1l;
│ │ │ +
149using std::ellint_1;
│ │ │ +
150using std::ellint_2f;
│ │ │ +
151using std::ellint_2l;
│ │ │ +
152using std::ellint_2;
│ │ │ +
153using std::ellint_3f;
│ │ │ +
154using std::ellint_3l;
│ │ │ +
155using std::ellint_3;
│ │ │ +
156using std::expintf;
│ │ │ +
157using std::expintl;
│ │ │ +
158using std::expint;
│ │ │ +
159using std::hermitef;
│ │ │ +
160using std::hermitel;
│ │ │ +
161using std::hermite;
│ │ │ +
162using std::laguerref;
│ │ │ +
163using std::laguerrel;
│ │ │ +
164using std::laguerre;
│ │ │ +
165using std::legendref;
│ │ │ +
166using std::legendrel;
│ │ │ +
167using std::legendre;
│ │ │ + │ │ │ + │ │ │ + │ │ │ +
171using std::sph_besself;
│ │ │ +
172using std::sph_bessell;
│ │ │ +
173using std::sph_bessel;
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
179using std::sph_neumann;
│ │ │ +
180#endif // _GLIBCXX_USE_STD_SPEC_FUNCS
│ │ │ +
181
│ │ │ +
182#if __cplusplus > 201703L
│ │ │ +
183using std::lerp;
│ │ │ +
184#endif // C++20
│ │ │ +
185
│ │ │ +
186#endif // _GLIBCXX_MATH_H
│ │ │ +
187#endif // __cplusplus
│ │ │ + │ │ │ +
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
│ │ │ +
__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
│ │ │ +
_Tp fabs(const std::complex< _Tp > &)
fabs(__z) [8.1.8].
Definition complex:1846
│ │ │ +
std::complex< _Tp > asinh(const std::complex< _Tp > &)
asinh(__z) [8.1.6].
Definition complex:1793
│ │ │ +
std::complex< _Tp > atan(const std::complex< _Tp > &)
atan(__z) [8.1.4].
Definition complex:1718
│ │ │ +
std::complex< _Tp > atanh(const std::complex< _Tp > &)
atanh(__z) [8.1.7].
Definition complex:1837
│ │ │ +
std::complex< _Tp > acosh(const std::complex< _Tp > &)
acosh(__z) [8.1.5].
Definition complex:1754
│ │ │ +
std::complex< _Tp > acos(const std::complex< _Tp > &)
acos(__z) [8.1.2].
Definition complex:1638
│ │ │ +
std::complex< _Tp > asin(const std::complex< _Tp > &)
asin(__z) [8.1.3].
Definition complex:1674
│ │ │
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,13 +1,13 @@ │ │ │ │ libstdc++ │ │ │ │ -tgmath.h │ │ │ │ +math.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-2021 Free Software Foundation, Inc. │ │ │ │ +3// Copyright (C) 2002-2021 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,453 @@ │ │ │ │ 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 math.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_t_g_m_a_t_h │ │ │ │ -_c_+_+_c_o_n_f_i_g_._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_MATH_H │ │ │ │ +34#define _GLIBCXX_MATH_H 1 │ │ │ │ +35 │ │ │ │ +36# include <_c_m_a_t_h> │ │ │ │ +37 │ │ │ │ +38using _s_t_d_:_:_a_b_s; │ │ │ │ +39using _s_t_d_:_:_a_c_o_s; │ │ │ │ +40using _s_t_d_:_:_a_s_i_n; │ │ │ │ +41using _s_t_d_:_:_a_t_a_n; │ │ │ │ +42using std::atan2; │ │ │ │ +43using _s_t_d_:_:_c_o_s; │ │ │ │ +44using _s_t_d_:_:_s_i_n; │ │ │ │ +45using _s_t_d_:_:_t_a_n; │ │ │ │ +46using _s_t_d_:_:_c_o_s_h; │ │ │ │ +47using _s_t_d_:_:_s_i_n_h; │ │ │ │ +48using _s_t_d_:_:_t_a_n_h; │ │ │ │ +49using _s_t_d_:_:_e_x_p; │ │ │ │ +50using std::frexp; │ │ │ │ +51using std::ldexp; │ │ │ │ +52using _s_t_d_:_:_l_o_g; │ │ │ │ +53using _s_t_d_:_:_l_o_g_1_0; │ │ │ │ +54using std::modf; │ │ │ │ +55using _s_t_d_:_:_p_o_w; │ │ │ │ +56using _s_t_d_:_:_s_q_r_t; │ │ │ │ +57using std::ceil; │ │ │ │ +58using _s_t_d_:_:_f_a_b_s; │ │ │ │ +59using std::floor; │ │ │ │ +60using std::fmod; │ │ │ │ +61 │ │ │ │ +62#if _GLIBCXX_USE_C99_MATH │ │ │ │ +63using std::fpclassify; │ │ │ │ +64using std::isfinite; │ │ │ │ +65using std::isinf; │ │ │ │ +66using std::isnan; │ │ │ │ +67using std::isnormal; │ │ │ │ +68using std::signbit; │ │ │ │ +69using std::isgreater; │ │ │ │ +70using std::isgreaterequal; │ │ │ │ +71using std::isless; │ │ │ │ +72using std::islessequal; │ │ │ │ +73using std::islessgreater; │ │ │ │ +74using std::isunordered; │ │ │ │ +75#endif │ │ │ │ +76 │ │ │ │ +77#if __cplusplus >= 201103L && defined(_GLIBCXX_USE_C99_MATH_TR1) │ │ │ │ +78using _s_t_d_:_:_a_c_o_s_h; │ │ │ │ +79using _s_t_d_:_:_a_s_i_n_h; │ │ │ │ +80using _s_t_d_:_:_a_t_a_n_h; │ │ │ │ +81using std::cbrt; │ │ │ │ +82using std::copysign; │ │ │ │ +83using std::erf; │ │ │ │ +84using std::erfc; │ │ │ │ +85using std::exp2; │ │ │ │ +86using std::expm1; │ │ │ │ +87using std::fdim; │ │ │ │ +88using std::fma; │ │ │ │ +89using std::fmax; │ │ │ │ +90using std::fmin; │ │ │ │ +91using std::hypot; │ │ │ │ +92using std::ilogb; │ │ │ │ +93using std::lgamma; │ │ │ │ +94using std::llrint; │ │ │ │ +95using std::llround; │ │ │ │ +96using std::log1p; │ │ │ │ +97using std::log2; │ │ │ │ +98using std::logb; │ │ │ │ +99using std::lrint; │ │ │ │ +100using std::lround; │ │ │ │ +101using std::nearbyint; │ │ │ │ +102using std::nextafter; │ │ │ │ +103using std::nexttoward; │ │ │ │ +104using std::remainder; │ │ │ │ +105using std::remquo; │ │ │ │ +106using std::rint; │ │ │ │ +107using std::round; │ │ │ │ +108using std::scalbln; │ │ │ │ +109using std::scalbn; │ │ │ │ +110using std::tgamma; │ │ │ │ +111using std::trunc; │ │ │ │ +112#endif // C++11 && _GLIBCXX_USE_C99_MATH_TR1 │ │ │ │ +113 │ │ │ │ +114// The mathematical special functions are only added to the global namespace │ │ │ │ +115// by IS 29124, but not by C++17. │ │ │ │ +116#if __cplusplus >= 201103L && __STDCPP_WANT_MATH_SPEC_FUNCS__ != 0 │ │ │ │ +117using _s_t_d_:_:_a_s_s_o_c___l_a_g_u_e_r_r_e_f; │ │ │ │ +118using _s_t_d_:_:_a_s_s_o_c___l_a_g_u_e_r_r_e_l; │ │ │ │ +119using _s_t_d_:_:_a_s_s_o_c___l_a_g_u_e_r_r_e; │ │ │ │ +120using _s_t_d_:_:_a_s_s_o_c___l_e_g_e_n_d_r_e_f; │ │ │ │ +121using _s_t_d_:_:_a_s_s_o_c___l_e_g_e_n_d_r_e_l; │ │ │ │ +122using _s_t_d_:_:_a_s_s_o_c___l_e_g_e_n_d_r_e; │ │ │ │ +123using _s_t_d_:_:_b_e_t_a_f; │ │ │ │ +124using _s_t_d_:_:_b_e_t_a_l; │ │ │ │ +125using _s_t_d_:_:_b_e_t_a; │ │ │ │ +126using _s_t_d_:_:_c_o_m_p___e_l_l_i_n_t___1_f; │ │ │ │ +127using _s_t_d_:_:_c_o_m_p___e_l_l_i_n_t___1_l; │ │ │ │ +128using _s_t_d_:_:_c_o_m_p___e_l_l_i_n_t___1; │ │ │ │ +129using _s_t_d_:_:_c_o_m_p___e_l_l_i_n_t___2_f; │ │ │ │ +130using _s_t_d_:_:_c_o_m_p___e_l_l_i_n_t___2_l; │ │ │ │ +131using _s_t_d_:_:_c_o_m_p___e_l_l_i_n_t___2; │ │ │ │ +132using _s_t_d_:_:_c_o_m_p___e_l_l_i_n_t___3_f; │ │ │ │ +133using _s_t_d_:_:_c_o_m_p___e_l_l_i_n_t___3_l; │ │ │ │ +134using _s_t_d_:_:_c_o_m_p___e_l_l_i_n_t___3; │ │ │ │ +135using _s_t_d_:_:_c_y_l___b_e_s_s_e_l___i_f; │ │ │ │ +136using _s_t_d_:_:_c_y_l___b_e_s_s_e_l___i_l; │ │ │ │ +137using _s_t_d_:_:_c_y_l___b_e_s_s_e_l___i; │ │ │ │ +138using _s_t_d_:_:_c_y_l___b_e_s_s_e_l___j_f; │ │ │ │ +139using _s_t_d_:_:_c_y_l___b_e_s_s_e_l___j_l; │ │ │ │ +140using _s_t_d_:_:_c_y_l___b_e_s_s_e_l___j; │ │ │ │ +141using _s_t_d_:_:_c_y_l___b_e_s_s_e_l___k_f; │ │ │ │ +142using _s_t_d_:_:_c_y_l___b_e_s_s_e_l___k_l; │ │ │ │ +143using _s_t_d_:_:_c_y_l___b_e_s_s_e_l___k; │ │ │ │ +144using _s_t_d_:_:_c_y_l___n_e_u_m_a_n_n_f; │ │ │ │ +145using _s_t_d_:_:_c_y_l___n_e_u_m_a_n_n_l; │ │ │ │ +146using _s_t_d_:_:_c_y_l___n_e_u_m_a_n_n; │ │ │ │ +147using _s_t_d_:_:_e_l_l_i_n_t___1_f; │ │ │ │ +148using _s_t_d_:_:_e_l_l_i_n_t___1_l; │ │ │ │ +149using _s_t_d_:_:_e_l_l_i_n_t___1; │ │ │ │ +150using _s_t_d_:_:_e_l_l_i_n_t___2_f; │ │ │ │ +151using _s_t_d_:_:_e_l_l_i_n_t___2_l; │ │ │ │ +152using _s_t_d_:_:_e_l_l_i_n_t___2; │ │ │ │ +153using _s_t_d_:_:_e_l_l_i_n_t___3_f; │ │ │ │ +154using _s_t_d_:_:_e_l_l_i_n_t___3_l; │ │ │ │ +155using _s_t_d_:_:_e_l_l_i_n_t___3; │ │ │ │ +156using _s_t_d_:_:_e_x_p_i_n_t_f; │ │ │ │ +157using _s_t_d_:_:_e_x_p_i_n_t_l; │ │ │ │ +158using _s_t_d_:_:_e_x_p_i_n_t; │ │ │ │ +159using _s_t_d_:_:_h_e_r_m_i_t_e_f; │ │ │ │ +160using _s_t_d_:_:_h_e_r_m_i_t_e_l; │ │ │ │ +161using _s_t_d_:_:_h_e_r_m_i_t_e; │ │ │ │ +162using _s_t_d_:_:_l_a_g_u_e_r_r_e_f; │ │ │ │ +163using _s_t_d_:_:_l_a_g_u_e_r_r_e_l; │ │ │ │ +164using _s_t_d_:_:_l_a_g_u_e_r_r_e; │ │ │ │ +165using _s_t_d_:_:_l_e_g_e_n_d_r_e_f; │ │ │ │ +166using _s_t_d_:_:_l_e_g_e_n_d_r_e_l; │ │ │ │ +167using _s_t_d_:_:_l_e_g_e_n_d_r_e; │ │ │ │ +168using _s_t_d_:_:_r_i_e_m_a_n_n___z_e_t_a_f; │ │ │ │ +169using _s_t_d_:_:_r_i_e_m_a_n_n___z_e_t_a_l; │ │ │ │ +170using _s_t_d_:_:_r_i_e_m_a_n_n___z_e_t_a; │ │ │ │ +171using _s_t_d_:_:_s_p_h___b_e_s_s_e_l_f; │ │ │ │ +172using _s_t_d_:_:_s_p_h___b_e_s_s_e_l_l; │ │ │ │ +173using _s_t_d_:_:_s_p_h___b_e_s_s_e_l; │ │ │ │ +174using _s_t_d_:_:_s_p_h___l_e_g_e_n_d_r_e_f; │ │ │ │ +175using _s_t_d_:_:_s_p_h___l_e_g_e_n_d_r_e_l; │ │ │ │ +176using _s_t_d_:_:_s_p_h___l_e_g_e_n_d_r_e; │ │ │ │ +177using _s_t_d_:_:_s_p_h___n_e_u_m_a_n_n_f; │ │ │ │ +178using _s_t_d_:_:_s_p_h___n_e_u_m_a_n_n_l; │ │ │ │ +179using _s_t_d_:_:_s_p_h___n_e_u_m_a_n_n; │ │ │ │ +180#endif // _GLIBCXX_USE_STD_SPEC_FUNCS │ │ │ │ +181 │ │ │ │ +182#if __cplusplus > 201703L │ │ │ │ +183using std::lerp; │ │ │ │ +184#endif // C++20 │ │ │ │ +185 │ │ │ │ +186#endif // _GLIBCXX_MATH_H │ │ │ │ +187#endif // __cplusplus │ │ │ │ +_c_m_a_t_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_:_:_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 │ │ │ │ +_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 │ │ │ │ +_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 │ │ │ │ +_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 │ │ │ │ +_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 │ │ │ │ +_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___3 │ │ │ │ +__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 . │ │ │ │ +DDeeffiinniittiioonn _s_p_e_c_f_u_n_._h_:_8_3_0 │ │ │ │ +_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 │ │ │ │ +_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 │ │ │ │ +_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 │ │ │ │ +_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 │ │ │ │ +_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 │ │ │ │ +_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 │ │ │ │ +_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_:_:_f_a_b_s │ │ │ │ +_Tp fabs(const std::complex< _Tp > &) │ │ │ │ +fabs(__z) [8.1.8]. │ │ │ │ +DDeeffiinniittiioonn _c_o_m_p_l_e_x_:_1_8_4_6 │ │ │ │ +_s_t_d_:_:_a_s_i_n_h │ │ │ │ +std::complex< _Tp > asinh(const std::complex< _Tp > &) │ │ │ │ +asinh(__z) [8.1.6]. │ │ │ │ +DDeeffiinniittiioonn _c_o_m_p_l_e_x_:_1_7_9_3 │ │ │ │ +_s_t_d_:_:_a_t_a_n │ │ │ │ +std::complex< _Tp > atan(const std::complex< _Tp > &) │ │ │ │ +atan(__z) [8.1.4]. │ │ │ │ +DDeeffiinniittiioonn _c_o_m_p_l_e_x_:_1_7_1_8 │ │ │ │ +_s_t_d_:_:_a_t_a_n_h │ │ │ │ +std::complex< _Tp > atanh(const std::complex< _Tp > &) │ │ │ │ +atanh(__z) [8.1.7]. │ │ │ │ +DDeeffiinniittiioonn _c_o_m_p_l_e_x_:_1_8_3_7 │ │ │ │ +_s_t_d_:_:_a_c_o_s_h │ │ │ │ +std::complex< _Tp > acosh(const std::complex< _Tp > &) │ │ │ │ +acosh(__z) [8.1.5]. │ │ │ │ +DDeeffiinniittiioonn _c_o_m_p_l_e_x_:_1_7_5_4 │ │ │ │ +_s_t_d_:_:_a_c_o_s │ │ │ │ +std::complex< _Tp > acos(const std::complex< _Tp > &) │ │ │ │ +acos(__z) [8.1.2]. │ │ │ │ +DDeeffiinniittiioonn _c_o_m_p_l_e_x_:_1_6_3_8 │ │ │ │ +_s_t_d_:_:_a_s_i_n │ │ │ │ +std::complex< _Tp > asin(const std::complex< _Tp > &) │ │ │ │ +asin(__z) [8.1.3]. │ │ │ │ +DDeeffiinniittiioonn _c_o_m_p_l_e_x_:_1_6_7_4 │ │ │ │ + * _m_a_t_h_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.15.0 │ │ ├── ./usr/share/doc/gcc-11-base/libstdc++/user/a00011.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: fenv.h File Reference │ │ │ +libstdc++: stdlib.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -48,35 +48,45 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
fenv.h File Reference
│ │ │ +
stdlib.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │

Go to the source code of this file.

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

│ │ │ +Functions

│ │ │ +void abort (void) throw ()
│ │ │ +int atexit (void(*)(void)) throw ()
│ │ │ +void exit (int) throw ()
│ │ │

Detailed Description

│ │ │

This is a Standard C++ Library header.

│ │ │ │ │ │ -

Definition in file fenv.h.

│ │ │ +

Definition in file stdlib.h.

│ │ │
│ │ │
│ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,8 +1,12 @@ │ │ │ │ libstdc++ │ │ │ │ -fenv.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_. │ │ │ │ +FFuunnccttiioonnss │ │ │ │ +void  aabboorrtt (void) throw () │ │ │ │ + int  aatteexxiitt (void(*)(void)) throw () │ │ │ │ +void  eexxiitt (int) throw () │ │ │ │ ********** 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 _s_t_d_l_i_b_._h. │ │ │ │ + * _s_t_d_l_i_b_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.15.0 │ │ ├── ./usr/share/doc/gcc-11-base/libstdc++/user/a00011_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: fenv.h Source File │ │ │ +libstdc++: stdlib.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -48,20 +48,20 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
fenv.h
│ │ │ +
stdlib.h
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1// -*- C++ -*- compatibility header.
│ │ │
2
│ │ │ -
3// Copyright (C) 2007-2021 Free Software Foundation, Inc.
│ │ │ +
3// Copyright (C) 2002-2021 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
│ │ │ @@ -75,78 +75,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 fenv.h
│ │ │ +
25/** @file stdlib.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>
│ │ │ -
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.
│ │ │ +
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
│ │ │ +
43 using std::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++ │ │ │ │ -fenv.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-2021 Free Software Foundation, Inc. │ │ │ │ +3// Copyright (C) 2002-2021 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,69 +21,76 @@ │ │ │ │ 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 stdlib.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 │ │ │ │ -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 │ │ │ │ +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 std::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 _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 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 │ │ │ │ +_c_s_t_d_l_i_b │ │ │ │ +_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_l_i_b_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.15.0 │ │ ├── ./usr/share/doc/gcc-11-base/libstdc++/user/a00014.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: complex.h File Reference │ │ │ +libstdc++: tgmath.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -48,42 +48,42 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
complex.h File Reference
│ │ │ +
tgmath.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │

Go to the source code of this file.

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

│ │ │ Macros

#define _GLIBCXX_COMPLEX_H
#define _GLIBCXX_TGMATH_H
│ │ │

Detailed Description

│ │ │

This is a Standard C++ Library header.

│ │ │ │ │ │ -

Definition in file complex.h.

│ │ │ +

Definition in file tgmath.h.

│ │ │

Macro Definition Documentation

│ │ │ - │ │ │ -

◆ _GLIBCXX_COMPLEX_H

│ │ │ + │ │ │ +

◆ _GLIBCXX_TGMATH_H

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │ │ │ │ - │ │ │ + │ │ │ │ │ │
#define _GLIBCXX_COMPLEX_H#define _GLIBCXX_TGMATH_H
│ │ │
│ │ │ │ │ │ -

Definition at line 46 of file complex.h.

│ │ │ +

Definition at line 40 of file tgmath.h.

│ │ │ │ │ │
│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,14 +1,14 @@ │ │ │ │ libstdc++ │ │ │ │ -complex.h File Reference │ │ │ │ +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___C_O_M_P_L_E_X___H │ │ │ │ +#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 _c_o_m_p_l_e_x_._h. │ │ │ │ +Definition in file _t_g_m_a_t_h_._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 │ │ │ │ +********** _?◆_? __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.15.0 │ │ ├── ./usr/share/doc/gcc-11-base/libstdc++/user/a00014_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: complex.h Source File │ │ │ +libstdc++: tgmath.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -48,15 +48,15 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
complex.h
│ │ │ +
tgmath.h
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1// -*- C++ -*- compatibility header.
│ │ │
2
│ │ │
3// Copyright (C) 2007-2021 Free Software Foundation, Inc.
│ │ │
4//
│ │ │
5// This file is part of the GNU ISO C++ Library. This library is free
│ │ │ @@ -75,45 +75,39 @@ │ │ │
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
│ │ │ +
25/** @file tgmath.h
│ │ │
26 * This is a Standard C++ Library header.
│ │ │
27 */
│ │ │
28
│ │ │ -
29#include <bits/c++config.h>
│ │ │ +
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
│ │ │ - │ │ │ - │ │ │ +
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
│ │ │ + │ │ │ + │ │ │
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,9 +1,9 @@ │ │ │ │ libstdc++ │ │ │ │ -complex.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-2021 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,35 +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 complex.h │ │ │ │ +25/** @file tgmath.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_m_p_l_e_x │ │ │ │ +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_t_g_m_a_t_h │ │ │ │ _c_+_+_c_o_n_f_i_g_._h │ │ │ │ - * _c_o_m_p_l_e_x_._h │ │ │ │ + * _t_g_m_a_t_h_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.15.0 │ │ ├── ./usr/share/doc/gcc-11-base/libstdc++/user/a00026_source.html │ │ │ @@ -99,18 +99,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
│ │ │ @@ -770,22 +770,22 @@ │ │ │
711#endif // __cplusplus
│ │ │
712
│ │ │
713#pragma GCC visibility pop
│ │ │
714
│ │ │
715#endif // __CXXABI_H
│ │ │
char * __cxa_demangle(const char *__mangled_name, char *__output_buffer, size_t *__length, int *__status)
Demangling routine. ABI-mandated entry point in the C++ runtime library for demangling.
│ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │
GNU extensions for public use.
│ │ │
The cross-vendor C++ Application Binary Interface. A namespace alias to __cxxabiv1,...
│ │ │ -
constexpr _Iterator __base(_Iterator __it)
│ │ │ -
Base class for all library exceptions.
Definition exception.h:62
│ │ │ +
constexpr _Iterator __base(_Iterator __it)
│ │ │ +
Base class for all library exceptions.
Definition exception.h:62
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/gcc-11-base/libstdc++/user/a00035_source.html │ │ │ @@ -90,16 +90,16 @@ │ │ │
33 */
│ │ │
34
│ │ │
35#ifndef _NEW
│ │ │
36#define _NEW
│ │ │
37
│ │ │
38#pragma GCC system_header
│ │ │
39
│ │ │ -
40#include <bits/c++config.h>
│ │ │ -
41#include <bits/exception.h>
│ │ │ +
40#include <bits/c++config.h>
│ │ │ +
41#include <bits/exception.h>
│ │ │
42
│ │ │
43#pragma GCC visibility push(default)
│ │ │
44
│ │ │
45extern "C++" {
│ │ │
46
│ │ │
47namespace std
│ │ │
48{
│ │ │ @@ -285,16 +285,16 @@ │ │ │
226# define __cpp_lib_destroying_delete 201806L
│ │ │
227#endif
│ │ │
228#endif // C++20
│ │ │
229
│ │ │
230#pragma GCC visibility pop
│ │ │
231
│ │ │
232#endif
│ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │
ISO C++ entities toplevel namespace is std.
│ │ │
new_handler set_new_handler(new_handler)
Takes a replacement handler as the argument, returns the previous handler.
│ │ │
new_handler get_new_handler() noexcept
Return the current new handler.
│ │ │
void(* new_handler)()
Definition new:103
│ │ │
Exception possibly thrown by new.
Definition new:56
│ │ │
virtual const char * what() const
│ │ │ │ │ ├── ./usr/share/doc/gcc-11-base/libstdc++/user/a00038_source.html │ │ │ @@ -84,17 +84,17 @@ │ │ │
27 */
│ │ │
28
│ │ │
29#ifndef _TYPEINFO
│ │ │
30#define _TYPEINFO
│ │ │
31
│ │ │
32#pragma GCC system_header
│ │ │
33
│ │ │ -
34#include <bits/exception.h>
│ │ │ +
34#include <bits/exception.h>
│ │ │
35#if __cplusplus >= 201103L
│ │ │ -
36#include <bits/hash_bytes.h>
│ │ │ +
36#include <bits/hash_bytes.h>
│ │ │
37#endif
│ │ │
38
│ │ │
39#pragma GCC visibility push(default)
│ │ │
40
│ │ │
41extern "C++" {
│ │ │
42
│ │ │
43namespace __cxxabiv1
│ │ │ @@ -284,16 +284,16 @@ │ │ │
219} // namespace std
│ │ │
220
│ │ │
221} // extern "C++"
│ │ │
222
│ │ │
223#pragma GCC visibility pop
│ │ │
224
│ │ │
225#endif
│ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │
ISO C++ entities toplevel namespace is std.
│ │ │
Part of RTTI.
Definition typeinfo:89
│ │ │
const char * name() const noexcept
Definition typeinfo:99
│ │ │
virtual ~type_info()
│ │ │
virtual const char * what() const noexcept
│ │ │
virtual const char * what() const noexcept
│ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -222,16 +222,16 @@ │ │ │ │ 219} // namespace std │ │ │ │ 220 │ │ │ │ 221} // extern "C++" │ │ │ │ 222 │ │ │ │ 223#pragma GCC visibility pop │ │ │ │ 224 │ │ │ │ 225#endif │ │ │ │ -_h_a_s_h___b_y_t_e_s_._h │ │ │ │ _e_x_c_e_p_t_i_o_n_._h │ │ │ │ +_h_a_s_h___b_y_t_e_s_._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_:_8_9 │ │ │ │ _s_t_d_:_:_t_y_p_e___i_n_f_o_:_:_n_a_m_e │ │ │ │ const char * name() const noexcept │ │ ├── ./usr/share/doc/gcc-11-base/libstdc++/user/a00041_source.html │ │ │ @@ -111,18 +111,18 @@ │ │ │
54
│ │ │
55#ifndef _GLIBCXX_ALGORITHM
│ │ │
56#define _GLIBCXX_ALGORITHM 1
│ │ │
57
│ │ │
58#pragma GCC system_header
│ │ │
59
│ │ │
60#include <utility> // UK-300.
│ │ │ -
61#include <bits/stl_algobase.h>
│ │ │ -
62#include <bits/stl_algo.h>
│ │ │ +
61#include <bits/stl_algobase.h>
│ │ │ +
62#include <bits/stl_algo.h>
│ │ │
63#if __cplusplus > 201703L
│ │ │ -
64# include <bits/ranges_algo.h>
│ │ │ +
64# include <bits/ranges_algo.h>
│ │ │
65#endif
│ │ │
66
│ │ │
67#if __cplusplus > 201402L
│ │ │
68// Parallel STL algorithms
│ │ │
69# if _PSTL_EXECUTION_POLICIES_DEFINED
│ │ │
70// If <execution> has already been included, pull in implementations
│ │ │
71# include <pstl/glue_algorithm_impl.h>
│ │ │ @@ -138,17 +138,17 @@ │ │ │
81
│ │ │
82#ifdef _GLIBCXX_PARALLEL
│ │ │
83# include <parallel/algorithm>
│ │ │
84#endif
│ │ │
85
│ │ │
86#endif /* _GLIBCXX_ALGORITHM */
│ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1293#endif
│ │ │
1294
│ │ │
1295_GLIBCXX_END_NAMESPACE_VERSION
│ │ │
1296} // namespace
│ │ │
1297
│ │ │ -
1298#include <bits/fstream.tcc>
│ │ │ +
1298#include <bits/fstream.tcc>
│ │ │
1299
│ │ │
1300#endif /* _GLIBCXX_FSTREAM */
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │
typename enable_if< _Cond, _Tp >::type enable_if_t
Alias template for enable_if.
Definition type_traits:2577
│ │ │
auto declval() noexcept -> decltype(__declval< _Tp >(0))
Definition type_traits:2356
│ │ │ -
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:428
│ │ │ -
basic_string< char > string
A string of char.
Definition stringfwd.h:79
│ │ │ +
basic_string< char > string
A string of char.
Definition stringfwd.h:79
│ │ │
ISO C++ entities toplevel namespace is std.
│ │ │ -
ptrdiff_t streamsize
Integral type for I/O operation counts and buffer sizes.
Definition postypes.h:98
│ │ │ +
ptrdiff_t streamsize
Integral type for I/O operation counts and buffer sizes.
Definition postypes.h:98
│ │ │
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)
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │
virtual ~basic_filebuf()
The destructor closes the file first.
Definition fstream:251
│ │ │ @@ -1476,28 +1476,28 @@ │ │ │ │ │ │
_If_fs_path< _Path, __filebuf_type * > open(const _Path &__s, ios_base::openmode __mode)
Opens an external file.
Definition fstream:348
│ │ │
__filebuf_type * open(const std::string &__s, ios_base::openmode __mode)
Opens an external file.
Definition fstream:336
│ │ │
virtual void imbue(const locale &__loc)
│ │ │
virtual streamsize xsgetn(char_type *__s, streamsize __n)
│ │ │
bool is_open() const
Returns true if the external file is open.
Definition fstream:270
│ │ │ │ │ │ -
__filebuf_type * close()
Closes the currently associated file.
Definition fstream.tcc:250
│ │ │ +
__filebuf_type * close()
Closes the currently associated file.
Definition fstream.tcc:250
│ │ │ │ │ │ │ │ │
void _M_destroy_pback()
Definition fstream:221
│ │ │
virtual pos_type seekpos(pos_type __pos, ios_base::openmode __mode=ios_base::in|ios_base::out)
│ │ │ │ │ │
virtual int_type pbackfail(int_type __c=traits_type::eof())
│ │ │
virtual streamsize xsputn(const char_type *__s, streamsize __n)
│ │ │ │ │ │
virtual int_type overflow(int_type __c=traits_type::eof())
│ │ │
void _M_create_pback()
Definition fstream:204
│ │ │ │ │ │ -
__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
│ │ │ +
__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
│ │ │
void _M_set_buffer(streamsize __off)
Definition fstream:464
│ │ │ │ │ │ │ │ │
virtual __streambuf_type * setbuf(char_type *__s, streamsize __n)
│ │ │
Controlling input for files.
Definition fstream:498
│ │ │
basic_ifstream()
Default constructor.
Definition fstream:523
│ │ │
~basic_ifstream()
The destructor does nothing.
Definition fstream:604
│ │ │ @@ -1530,40 +1530,40 @@ │ │ │
basic_fstream(const std::string &__s, ios_base::openmode __mode=ios_base::in|ios_base::out)
Create an input/output file stream.
Definition fstream:1088
│ │ │
void open(const std::string &__s, ios_base::openmode __mode=ios_base::in|ios_base::out)
Opens an external file.
Definition fstream:1223
│ │ │
__filebuf_type * rdbuf() const
Accessing the underlying buffer.
Definition fstream:1156
│ │ │
bool is_open()
Wrapper to test for an open file.
Definition fstream:1164
│ │ │
void close()
Close the file.
Definition fstream:1258
│ │ │
basic_fstream(const char *__s, ios_base::openmode __mode=ios_base::in|ios_base::out)
Create an input/output file stream.
Definition fstream:1058
│ │ │
basic_fstream()
Default constructor.
Definition fstream:1048
│ │ │ -
Template class basic_ios, virtual base class for all stream classes.
Definition basic_ios.h:68
│ │ │ -
void clear(iostate __state=goodbit)
[Re]sets the error state.
Definition basic_ios.tcc:41
│ │ │ -
void setstate(iostate __state)
Sets additional flags in the error state.
Definition basic_ios.h:157
│ │ │ -
void init(basic_streambuf< _CharT, _Traits > *__sb)
All setup is performed here.
│ │ │ +
Template class basic_ios, virtual base class for all stream classes.
Definition basic_ios.h:68
│ │ │ +
void clear(iostate __state=goodbit)
[Re]sets the error state.
Definition basic_ios.tcc:41
│ │ │ +
void setstate(iostate __state)
Sets additional flags in the error state.
Definition basic_ios.h:157
│ │ │ +
void init(basic_streambuf< _CharT, _Traits > *__sb)
All setup is performed here.
│ │ │
void setg(char_type *__gbeg, char_type *__gnext, char_type *__gend)
Setting the three read area pointers.
Definition streambuf:514
│ │ │
char_type * eback() const
Access to the get area.
Definition streambuf:487
│ │ │
char_type * egptr() const
Access to the get area.
Definition streambuf:493
│ │ │
char_type * gptr() const
Access to the get area.
Definition streambuf:490
│ │ │
void setp(char_type *__pbeg, char_type *__pend)
Setting the three write area pointers.
Definition streambuf:560
│ │ │
basic_streambuf()
Base constructor.
Definition streambuf:468
│ │ │
basic_istream(__streambuf_type *__sb)
Base constructor.
Definition istream:93
│ │ │
basic_ostream(__streambuf_type *__sb)
Base constructor.
Definition ostream:84
│ │ │
basic_iostream(basic_streambuf< _CharT, _Traits > *__sb)
Constructor does nothing.
Definition istream:915
│ │ │ │ │ │
is_default_constructible
Definition type_traits:963
│ │ │
is_copy_constructible
Definition type_traits:986
│ │ │ -
const _CharT * c_str() const noexcept
Return const pointer to null-terminated contents.
│ │ │ -
Primary class template codecvt.
Definition codecvt.h:279
│ │ │ -
static const openmode in
Open for input. Default for ifstream and fstream.
Definition ios_base.h:461
│ │ │ -
static const openmode out
Open for output. Default for ofstream and fstream.
Definition ios_base.h:464
│ │ │ -
_Ios_Openmode openmode
This is a bitmask type.
Definition ios_base.h:447
│ │ │ -
static const openmode app
Seek to end before each write.
Definition ios_base.h:450
│ │ │ -
static const openmode trunc
Truncate an existing stream when opening. Default for ofstream.
Definition ios_base.h:467
│ │ │ -
static const iostate failbit
Indicates that an input operation failed to read the expected characters, or that an output operation...
Definition ios_base.h:428
│ │ │ -
Container class for localization functionality.
│ │ │ -
Class representing stream positions.
Definition postypes.h:113
│ │ │ +
const _CharT * c_str() const noexcept
Return const pointer to null-terminated contents.
│ │ │ +
Primary class template codecvt.
Definition codecvt.h:279
│ │ │ +
static const openmode in
Open for input. Default for ifstream and fstream.
Definition ios_base.h:461
│ │ │ +
static const openmode out
Open for output. Default for ofstream and fstream.
Definition ios_base.h:464
│ │ │ +
_Ios_Openmode openmode
This is a bitmask type.
Definition ios_base.h:447
│ │ │ +
static const openmode app
Seek to end before each write.
Definition ios_base.h:450
│ │ │ +
static const openmode trunc
Truncate an existing stream when opening. Default for ofstream.
Definition ios_base.h:467
│ │ │ +
static const iostate failbit
Indicates that an input operation failed to read the expected characters, or that an output operation...
Definition ios_base.h:428
│ │ │ +
Container class for localization functionality.
│ │ │ +
Class representing stream positions.
Definition postypes.h:113
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1011#endif // C++11
│ │ │
1012
│ │ │
1013_GLIBCXX_END_NAMESPACE_VERSION
│ │ │
1014} // namespace
│ │ │
1015
│ │ │ -
1016#include <bits/istream.tcc>
│ │ │ +
1016#include <bits/istream.tcc>
│ │ │
1017
│ │ │
1018#endif /* _GLIBCXX_ISTREAM */
│ │ │ │ │ │ │ │ │ - │ │ │ + │ │ │
basic_istream< char > istream
Base class for char input streams.
Definition iosfwd:138
│ │ │
auto declval() noexcept -> decltype(__declval< _Tp >(0))
Definition type_traits:2356
│ │ │ -
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:428
│ │ │ -
constexpr _Tp && forward(typename std::remove_reference< _Tp >::type &__t) noexcept
Forward an lvalue.
Definition move.h:77
│ │ │ +
constexpr _Tp && forward(typename std::remove_reference< _Tp >::type &__t) noexcept
Forward an lvalue.
Definition move.h:77
│ │ │
ISO C++ entities toplevel namespace is std.
│ │ │ -
ptrdiff_t streamsize
Integral type for I/O operation counts and buffer sizes.
Definition postypes.h:98
│ │ │ +
ptrdiff_t streamsize
Integral type for I/O operation counts and buffer sizes.
Definition postypes.h:98
│ │ │
std::basic_istream< _CharT, _Traits > & operator>>(std::basic_istream< _CharT, _Traits > &__is, bitset< _Nb > &__x)
Global I/O operators for bitsets.
Definition bitset:1472
│ │ │ -
basic_istream< _CharT, _Traits > & ws(basic_istream< _CharT, _Traits > &__is)
Quick and easy way to eat whitespace.
Definition istream.tcc:1053
│ │ │ -
void init(basic_streambuf< _CharT, _Traits > *__sb)
All setup is performed here.
│ │ │ -
char_type widen(char __c) const
Widens characters.
Definition basic_ios.h:449
│ │ │ -
basic_ios(basic_streambuf< _CharT, _Traits > *__sb)
Constructor performs initialization.
Definition basic_ios.h:270
│ │ │ +
basic_istream< _CharT, _Traits > & ws(basic_istream< _CharT, _Traits > &__is)
Quick and easy way to eat whitespace.
Definition istream.tcc:1053
│ │ │ +
void init(basic_streambuf< _CharT, _Traits > *__sb)
All setup is performed here.
│ │ │ +
char_type widen(char __c) const
Widens characters.
Definition basic_ios.h:449
│ │ │ +
basic_ios(basic_streambuf< _CharT, _Traits > *__sb)
Constructor performs initialization.
Definition basic_ios.h:270
│ │ │
The actual work of input and output (interface).
Definition streambuf:123
│ │ │
Template class basic_istream.
Definition istream:59
│ │ │
__istream_type & operator>>(void *&__p)
Basic arithmetic extractors.
Definition istream:235
│ │ │ -
__istream_type & seekg(pos_type)
Changing the current read position.
Definition istream.tcc:880
│ │ │ +
__istream_type & seekg(pos_type)
Changing the current read position.
Definition istream.tcc:880
│ │ │
streamsize gcount() const
Character counting.
Definition istream:269
│ │ │ -
int_type get()
Simple extraction.
Definition istream.tcc:244
│ │ │ -
streamsize readsome(char_type *__s, streamsize __n)
Extraction until the buffer is exhausted, but no more.
Definition istream.tcc:714
│ │ │ -
__istream_type & get(__streambuf_type &__sb, char_type __delim)
Extraction into another streambuf.
Definition istream.tcc:364
│ │ │ -
int_type peek()
Looking ahead in the stream.
Definition istream.tcc:655
│ │ │ -
__istream_type & ignore(streamsize __n, int_type __delim)
Discarding characters.
Definition istream.tcc:578
│ │ │ -
__istream_type & operator>>(__streambuf_type *__sb)
Extracting into another streambuf.
Definition istream.tcc:212
│ │ │ -
__istream_type & unget()
Unextracting the previous character.
Definition istream.tcc:781
│ │ │ -
pos_type tellg()
Getting the current read position.
Definition istream.tcc:852
│ │ │ -
__istream_type & operator>>(int &__n)
Integer arithmetic extractors.
Definition istream.tcc:167
│ │ │ +
int_type get()
Simple extraction.
Definition istream.tcc:244
│ │ │ +
streamsize readsome(char_type *__s, streamsize __n)
Extraction until the buffer is exhausted, but no more.
Definition istream.tcc:714
│ │ │ +
__istream_type & get(__streambuf_type &__sb, char_type __delim)
Extraction into another streambuf.
Definition istream.tcc:364
│ │ │ +
int_type peek()
Looking ahead in the stream.
Definition istream.tcc:655
│ │ │ +
__istream_type & ignore(streamsize __n, int_type __delim)
Discarding characters.
Definition istream.tcc:578
│ │ │ +
__istream_type & operator>>(__streambuf_type *__sb)
Extracting into another streambuf.
Definition istream.tcc:212
│ │ │ +
__istream_type & unget()
Unextracting the previous character.
Definition istream.tcc:781
│ │ │ +
pos_type tellg()
Getting the current read position.
Definition istream.tcc:852
│ │ │ +
__istream_type & operator>>(int &__n)
Integer arithmetic extractors.
Definition istream.tcc:167
│ │ │
__istream_type & get(__streambuf_type &__sb)
Extraction into another streambuf.
Definition istream:387
│ │ │ │ │ │
__istream_type & operator>>(double &__f)
Floating point arithmetic extractors.
Definition istream:218
│ │ │ -
__istream_type & ignore()
Simple extraction.
Definition istream.tcc:475
│ │ │ +
__istream_type & ignore()
Simple extraction.
Definition istream.tcc:475
│ │ │
__istream_type & operator>>(bool &__n)
Integer arithmetic extractors.
Definition istream:168
│ │ │
__istream_type & operator>>(long &__n)
Integer arithmetic extractors.
Definition istream:186
│ │ │ -
__istream_type & get(char_type &__c)
Simple extraction.
Definition istream.tcc:280
│ │ │ +
__istream_type & get(char_type &__c)
Simple extraction.
Definition istream.tcc:280
│ │ │
virtual ~basic_istream()
Base destructor.
Definition istream:103
│ │ │
__istream_type & getline(char_type *__s, streamsize __n)
String extraction.
Definition istream:427
│ │ │
__istream_type & operator>>(unsigned long long &__n)
Integer arithmetic extractors.
Definition istream:199
│ │ │
__istream_type & operator>>(float &__f)
Floating point arithmetic extractors.
Definition istream:214
│ │ │
__istream_type & operator>>(__ios_type &(*__pf)(__ios_type &))
Interface for manipulators.
Definition istream:124
│ │ │
__istream_type & operator>>(long long &__n)
Integer arithmetic extractors.
Definition istream:195
│ │ │
__istream_type & operator>>(unsigned long &__n)
Integer arithmetic extractors.
Definition istream:190
│ │ │ -
__istream_type & read(char_type *__s, streamsize __n)
Extraction without delimiters.
Definition istream.tcc:685
│ │ │ +
__istream_type & read(char_type *__s, streamsize __n)
Extraction without delimiters.
Definition istream.tcc:685
│ │ │
__istream_type & operator>>(unsigned int &__n)
Integer arithmetic extractors.
Definition istream:182
│ │ │
__istream_type & operator>>(unsigned short &__n)
Integer arithmetic extractors.
Definition istream:175
│ │ │ -
__istream_type & putback(char_type __c)
Unextracting a single character.
Definition istream.tcc:746
│ │ │ +
__istream_type & putback(char_type __c)
Unextracting a single character.
Definition istream.tcc:746
│ │ │
basic_istream(__streambuf_type *__sb)
Base constructor.
Definition istream:93
│ │ │ -
__istream_type & seekg(off_type, ios_base::seekdir)
Changing the current read position.
Definition istream.tcc:919
│ │ │ -
__istream_type & getline(char_type *__s, streamsize __n, char_type __delim)
String extraction.
Definition istream.tcc:415
│ │ │ -
__istream_type & get(char_type *__s, streamsize __n, char_type __delim)
Simple multiple-character extraction.
Definition istream.tcc:317
│ │ │ +
__istream_type & seekg(off_type, ios_base::seekdir)
Changing the current read position.
Definition istream.tcc:919
│ │ │ +
__istream_type & getline(char_type *__s, streamsize __n, char_type __delim)
String extraction.
Definition istream.tcc:415
│ │ │ +
__istream_type & get(char_type *__s, streamsize __n, char_type __delim)
Simple multiple-character extraction.
Definition istream.tcc:317
│ │ │
__istream_type & get(char_type *__s, streamsize __n)
Simple multiple-character extraction.
Definition istream:354
│ │ │
__istream_type & operator>>(ios_base &(*__pf)(ios_base &))
Interface for manipulators.
Definition istream:131
│ │ │
__istream_type & operator>>(long double &__f)
Floating point arithmetic extractors.
Definition istream:222
│ │ │
__istream_type & operator>>(__istream_type &(*__pf)(__istream_type &))
Interface for manipulators.
Definition istream:120
│ │ │ -
int sync()
Synchronizing the stream buffer.
Definition istream.tcc:816
│ │ │ -
__istream_type & operator>>(short &__n)
Integer arithmetic extractors.
Definition istream.tcc:122
│ │ │ -
__istream_type & ignore(streamsize __n)
Simple extraction.
Definition istream.tcc:508
│ │ │ +
int sync()
Synchronizing the stream buffer.
Definition istream.tcc:816
│ │ │ +
__istream_type & operator>>(short &__n)
Integer arithmetic extractors.
Definition istream.tcc:122
│ │ │ +
__istream_type & ignore(streamsize __n)
Simple extraction.
Definition istream.tcc:508
│ │ │
basic_ostream(__streambuf_type *__sb)
Base constructor.
Definition ostream:84
│ │ │
basic_iostream(basic_streambuf< _CharT, _Traits > *__sb)
Constructor does nothing.
Definition istream:915
│ │ │
virtual ~basic_iostream()
Destructor does nothing.
Definition istream:922
│ │ │ -
sentry(basic_istream< _CharT, _Traits > &__is, bool __noskipws=false)
The constructor performs all the work.
Definition istream.tcc:47
│ │ │ +
sentry(basic_istream< _CharT, _Traits > &__is, bool __noskipws=false)
The constructor performs all the work.
Definition istream.tcc:47
│ │ │
_Traits traits_type
Easy access to dependent types.
Definition istream:693
│ │ │ │ │ │ -
The base of the I/O class hierarchy.
Definition ios_base.h:229
│ │ │ -
static const iostate eofbit
Indicates that an input operation reached the end of an input sequence.
Definition ios_base.h:423
│ │ │ -
_Ios_Seekdir seekdir
This is an enumerated type.
Definition ios_base.h:479
│ │ │ -
static const iostate failbit
Indicates that an input operation failed to read the expected characters, or that an output operation...
Definition ios_base.h:428
│ │ │ -
Primary class template ctype facet.
│ │ │ -
Primary class template num_get.
│ │ │ +
The base of the I/O class hierarchy.
Definition ios_base.h:229
│ │ │ +
static const iostate eofbit
Indicates that an input operation reached the end of an input sequence.
Definition ios_base.h:423
│ │ │ +
_Ios_Seekdir seekdir
This is an enumerated type.
Definition ios_base.h:479
│ │ │ +
static const iostate failbit
Indicates that an input operation failed to read the expected characters, or that an output operation...
Definition ios_base.h:428
│ │ │ +
Primary class template ctype facet.
│ │ │ +
Primary class template num_get.
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1345,18 +1345,18 @@ │ │ │ │ 1340#endif // _GLIBCXX_OPTIONAL │ │ │ │ _c_o_m_p_a_r_e │ │ │ │ _e_x_c_e_p_t_i_o_n │ │ │ │ _i_n_i_t_i_a_l_i_z_e_r___l_i_s_t │ │ │ │ _n_e_w │ │ │ │ _t_y_p_e___t_r_a_i_t_s │ │ │ │ _u_t_i_l_i_t_y │ │ │ │ -_e_x_c_e_p_t_i_o_n___d_e_f_i_n_e_s_._h │ │ │ │ -_s_t_l___c_o_n_s_t_r_u_c_t_._h │ │ │ │ _f_u_n_c_t_i_o_n_a_l___h_a_s_h_._h │ │ │ │ +_s_t_l___c_o_n_s_t_r_u_c_t_._h │ │ │ │ _e_n_a_b_l_e___s_p_e_c_i_a_l___m_e_m_b_e_r_s_._h │ │ │ │ +_e_x_c_e_p_t_i_o_n___d_e_f_i_n_e_s_._h │ │ │ │ _s_t_d_:_:_i_s___n_o_t_h_r_o_w___s_w_a_p_p_a_b_l_e___v │ │ │ │ constexpr bool is_nothrow_swappable_v │ │ │ │ is_nothrow_swappable_v │ │ │ │ DDeeffiinniittiioonn _t_y_p_e___t_r_a_i_t_s_:_2_7_6_7 │ │ │ │ _s_t_d_:_:_i_s___s_w_a_p_p_a_b_l_e___v │ │ │ │ constexpr bool is_swappable_v │ │ │ │ is_swappable_v │ │ ├── ./usr/share/doc/gcc-11-base/libstdc++/user/a00149_source.html │ │ │ @@ -90,15 +90,15 @@ │ │ │
32
│ │ │
33#ifndef _GLIBCXX_OSTREAM
│ │ │
34#define _GLIBCXX_OSTREAM 1
│ │ │
35
│ │ │
36#pragma GCC system_header
│ │ │
37
│ │ │
38#include <ios>
│ │ │ -
39#include <bits/ostream_insert.h>
│ │ │ +
39#include <bits/ostream_insert.h>
│ │ │
40
│ │ │
41namespace std _GLIBCXX_VISIBILITY(default)
│ │ │
42{
│ │ │
43_GLIBCXX_BEGIN_NAMESPACE_VERSION
│ │ │
44
│ │ │
45 /**
│ │ │
46 * @brief Template class basic_ostream.
│ │ │ @@ -927,55 +927,55 @@ │ │ │
822#endif // C++20
│ │ │
823
│ │ │
824#endif // C++11
│ │ │
825
│ │ │
826_GLIBCXX_END_NAMESPACE_VERSION
│ │ │
827} // namespace std
│ │ │
828
│ │ │ -
829#include <bits/ostream.tcc>
│ │ │ +
829#include <bits/ostream.tcc>
│ │ │
830
│ │ │
831#endif /* _GLIBCXX_OSTREAM */
│ │ │ │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │
auto declval() noexcept -> decltype(__declval< _Tp >(0))
Definition type_traits:2356
│ │ │ -
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
│ │ │
ISO C++ entities toplevel namespace is std.
│ │ │ -
ptrdiff_t streamsize
Integral type for I/O operation counts and buffer sizes.
Definition postypes.h:98
│ │ │ +
ptrdiff_t streamsize
Integral type for I/O operation counts and buffer sizes.
Definition postypes.h:98
│ │ │
basic_ostream< _CharT, _Traits > & ends(basic_ostream< _CharT, _Traits > &__os)
Write a null character into the output sequence.
Definition ostream:696
│ │ │
basic_ostream< _CharT, _Traits > & endl(basic_ostream< _CharT, _Traits > &__os)
Write a newline and flush the stream.
Definition ostream:684
│ │ │
basic_ostream< _CharT, _Traits > & flush(basic_ostream< _CharT, _Traits > &__os)
Flushes the output stream.
Definition ostream:706
│ │ │
std::basic_ostream< _CharT, _Traits > & operator<<(std::basic_ostream< _CharT, _Traits > &__os, const bitset< _Nb > &__x)
Global I/O operators for bitsets.
Definition bitset:1540
│ │ │ -
void setstate(iostate __state)
Sets additional flags in the error state.
Definition basic_ios.h:157
│ │ │ -
void init(basic_streambuf< _CharT, _Traits > *__sb)
All setup is performed here.
│ │ │ -
char_type widen(char __c) const
Widens characters.
Definition basic_ios.h:449
│ │ │ -
basic_streambuf< _CharT, _Traits > * rdbuf() const
Accessing the underlying buffer.
Definition basic_ios.h:321
│ │ │ -
basic_ios(basic_streambuf< _CharT, _Traits > *__sb)
Constructor performs initialization.
Definition basic_ios.h:270
│ │ │ +
void setstate(iostate __state)
Sets additional flags in the error state.
Definition basic_ios.h:157
│ │ │ +
void init(basic_streambuf< _CharT, _Traits > *__sb)
All setup is performed here.
│ │ │ +
char_type widen(char __c) const
Widens characters.
Definition basic_ios.h:449
│ │ │ +
basic_streambuf< _CharT, _Traits > * rdbuf() const
Accessing the underlying buffer.
Definition basic_ios.h:321
│ │ │ +
basic_ios(basic_streambuf< _CharT, _Traits > *__sb)
Constructor performs initialization.
Definition basic_ios.h:270
│ │ │
The actual work of input and output (interface).
Definition streambuf:123
│ │ │
Template class basic_ostream.
Definition ostream:59
│ │ │ -
__ostream_type & write(const char_type *__s, streamsize __n)
Character string insertion.
Definition ostream.tcc:183
│ │ │ -
pos_type tellp()
Getting the current write position.
Definition ostream.tcc:237
│ │ │ -
__ostream_type & seekp(off_type, ios_base::seekdir)
Changing the current write position.
Definition ostream.tcc:290
│ │ │ -
__ostream_type & put(char_type __c)
Simple insertion.
Definition ostream.tcc:149
│ │ │ +
__ostream_type & write(const char_type *__s, streamsize __n)
Character string insertion.
Definition ostream.tcc:183
│ │ │ +
pos_type tellp()
Getting the current write position.
Definition ostream.tcc:237
│ │ │ +
__ostream_type & seekp(off_type, ios_base::seekdir)
Changing the current write position.
Definition ostream.tcc:290
│ │ │ +
__ostream_type & put(char_type __c)
Simple insertion.
Definition ostream.tcc:149
│ │ │
basic_ostream(__streambuf_type *__sb)
Base constructor.
Definition ostream:84
│ │ │ -
__ostream_type & flush()
Synchronizing the stream buffer.
Definition ostream.tcc:211
│ │ │ -
__ostream_type & seekp(pos_type)
Changing the current write position.
Definition ostream.tcc:258
│ │ │ +
__ostream_type & flush()
Synchronizing the stream buffer.
Definition ostream.tcc:211
│ │ │ +
__ostream_type & seekp(pos_type)
Changing the current write position.
Definition ostream.tcc:258
│ │ │
void _M_write(const char_type *__s, streamsize __n)
Core write functionality, without sentry.
Definition ostream:324
│ │ │
virtual ~basic_ostream()
Base destructor.
Definition ostream:93
│ │ │
__ostream_type & operator<<(__ostream_type &(*__pf)(__ostream_type &))
Interface for manipulators.
Definition ostream:108
│ │ │
Template class basic_iostream.
Definition istream:893
│ │ │
~sentry()
Possibly flushes the stream.
Definition ostream:469
│ │ │ -
sentry(basic_ostream< _CharT, _Traits > &__os)
The constructor performs preparatory work.
Definition ostream.tcc:47
│ │ │ +
sentry(basic_ostream< _CharT, _Traits > &__os)
The constructor performs preparatory work.
Definition ostream.tcc:47
│ │ │
is_convertible
Definition type_traits:1458
│ │ │ -
The base of the I/O class hierarchy.
Definition ios_base.h:229
│ │ │ -
static const fmtflags unitbuf
Flushes output after each output operation.
Definition ios_base.h:389
│ │ │ -
static const iostate badbit
Indicates a loss of integrity in an input or output sequence (such as an irrecoverable read error fro...
Definition ios_base.h:420
│ │ │ -
_Ios_Seekdir seekdir
This is an enumerated type.
Definition ios_base.h:479
│ │ │ -
Primary class template ctype facet.
│ │ │ -
Primary class template num_put.
│ │ │ +
The base of the I/O class hierarchy.
Definition ios_base.h:229
│ │ │ +
static const fmtflags unitbuf
Flushes output after each output operation.
Definition ios_base.h:389
│ │ │ +
static const iostate badbit
Indicates a loss of integrity in an input or output sequence (such as an irrecoverable read error fro...
Definition ios_base.h:420
│ │ │ +
_Ios_Seekdir seekdir
This is an enumerated type.
Definition ios_base.h:479
│ │ │ +
Primary class template ctype facet.
│ │ │ +
Primary class template num_put.
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/gcc-11-base/libstdc++/user/a00185_source.html │ │ │ @@ -1340,29 +1340,29 @@ │ │ │
1211
│ │ │
1212_GLIBCXX_END_NAMESPACE_CXX11
│ │ │
1213_GLIBCXX_END_NAMESPACE_VERSION
│ │ │
1214} // namespace
│ │ │
1215
│ │ │
1216#undef _GLIBCXX_LVAL_REF_QUAL
│ │ │
1217
│ │ │ -
1218#include <bits/sstream.tcc>
│ │ │ +
1218#include <bits/sstream.tcc>
│ │ │
1219
│ │ │
1220#endif /* _GLIBCXX_SSTREAM */
│ │ │ │ │ │ │ │ │ - │ │ │ -
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:428
│ │ │ -
constexpr _Tp * __addressof(_Tp &__r) noexcept
Same as C++11 std::addressof.
Definition move.h:49
│ │ │ +
constexpr _Tp * __addressof(_Tp &__r) noexcept
Same as C++11 std::addressof.
Definition move.h:49
│ │ │
ISO C++ entities toplevel namespace is std.
│ │ │ -
ptrdiff_t streamsize
Integral type for I/O operation counts and buffer sizes.
Definition postypes.h:98
│ │ │ -
constexpr auto size(const _Container &__cont) noexcept(noexcept(__cont.size())) -> decltype(__cont.size())
Return the size of a container.
│ │ │ -
constexpr auto data(_Container &__cont) noexcept(noexcept(__cont.data())) -> decltype(__cont.data())
Return the data pointer of a container.
│ │ │ -
constexpr _Iterator __base(_Iterator __it)
│ │ │ -
void init(basic_streambuf< _CharT, _Traits > *__sb)
All setup is performed here.
│ │ │ +
ptrdiff_t streamsize
Integral type for I/O operation counts and buffer sizes.
Definition postypes.h:98
│ │ │ +
constexpr auto size(const _Container &__cont) noexcept(noexcept(__cont.size())) -> decltype(__cont.size())
Return the size of a container.
│ │ │ +
constexpr auto data(_Container &__cont) noexcept(noexcept(__cont.data())) -> decltype(__cont.data())
Return the data pointer of a container.
│ │ │ +
constexpr _Iterator __base(_Iterator __it)
│ │ │ +
void init(basic_streambuf< _CharT, _Traits > *__sb)
All setup is performed here.
│ │ │
char_type * pptr() const
Access to the put area.
Definition streambuf:537
│ │ │ │ │ │
void setg(char_type *__gbeg, char_type *__gnext, char_type *__gend)
Setting the three read area pointers.
Definition streambuf:514
│ │ │
char_type * eback() const
Access to the get area.
Definition streambuf:487
│ │ │
char_type * egptr() const
Access to the get area.
Definition streambuf:493
│ │ │
char_type * gptr() const
Access to the get area.
Definition streambuf:490
│ │ │
locale pubimbue(const locale &__loc)
Entry point for imbue().
Definition streambuf:214
│ │ │ @@ -1370,21 +1370,21 @@ │ │ │
traits_type::off_type off_type
Definition streambuf:135
│ │ │
basic_streambuf()
Base constructor.
Definition streambuf:468
│ │ │
basic_istream(__streambuf_type *__sb)
Base constructor.
Definition istream:93
│ │ │
basic_ostream(__streambuf_type *__sb)
Base constructor.
Definition ostream:84
│ │ │
basic_iostream(basic_streambuf< _CharT, _Traits > *__sb)
Constructor does nothing.
Definition istream:915
│ │ │
The actual work of input and output (for std::string).
Definition sstream:73
│ │ │
virtual streamsize showmanyc()
Investigating the data available.
Definition sstream:335
│ │ │ -
virtual int_type underflow()
Fetches more data from the controlled sequence.
Definition sstream.tcc:150
│ │ │ +
virtual int_type underflow()
Fetches more data from the controlled sequence.
Definition sstream.tcc:150
│ │ │
__string_type str() const
Copying out the string buffer.
Definition sstream:241
│ │ │ -
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 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
│ │ │
basic_stringbuf()
Starts with an empty string buffer.
Definition sstream:113
│ │ │ -
virtual int_type pbackfail(int_type __c=traits_type::eof())
Tries to back up the input sequence.
Definition sstream.tcc:46
│ │ │ +
virtual int_type pbackfail(int_type __c=traits_type::eof())
Tries to back up the input sequence.
Definition sstream.tcc:46
│ │ │
virtual __streambuf_type * setbuf(char_type *__s, streamsize __n)
Manipulates the buffer.
Definition sstream:367
│ │ │
ios_base::openmode _M_mode
Definition sstream:99
│ │ │
Controlling input for std::string.
Definition sstream:538
│ │ │
void str(const __string_type &__s)
Setting a new buffer.
Definition sstream:723
│ │ │
__stringbuf_type * rdbuf() const
Accessing the underlying buffer.
Definition sstream:688
│ │ │
~basic_istringstream()
The destructor does nothing.
Definition sstream:616
│ │ │
__string_type str() const
Copying out the string buffer.
Definition sstream:696
│ │ │ @@ -1406,25 +1406,25 @@ │ │ │
basic_stringstream()
Default constructor starts with an empty string buffer.
Definition sstream:1012
│ │ │
void str(const __string_type &__s)
Setting a new buffer.
Definition sstream:1163
│ │ │
__stringbuf_type * rdbuf() const
Accessing the underlying buffer.
Definition sstream:1128
│ │ │
basic_stringstream(ios_base::openmode __m)
Starts with an empty string buffer.
Definition sstream:1027
│ │ │
Uniform interface to all allocator types.
│ │ │
__detected_or_t< false_type, __pocs, _Alloc > propagate_on_container_swap
How the allocator is propagated on swap.
│ │ │
__detected_or_t< typename is_empty< _Alloc >::type, __equal, _Alloc > is_always_equal
Whether all instances of the allocator type compare equal.
│ │ │ -
Managing sequences of characters and character-like objects.
│ │ │ -
const _CharT * data() const noexcept
Return const pointer to contents.
│ │ │ -
basic_string & assign(const basic_string &__str)
Set value to contents of another string.
│ │ │ -
size_type size() const noexcept
Returns the number of characters in the string, not including any null-termination.
│ │ │ -
The base of the I/O class hierarchy.
Definition ios_base.h:229
│ │ │ -
static const openmode in
Open for input. Default for ifstream and fstream.
Definition ios_base.h:461
│ │ │ -
static const openmode out
Open for output. Default for ofstream and fstream.
Definition ios_base.h:464
│ │ │ -
_Ios_Openmode openmode
This is a bitmask type.
Definition ios_base.h:447
│ │ │ -
static const openmode app
Seek to end before each write.
Definition ios_base.h:450
│ │ │ -
_Ios_Seekdir seekdir
This is an enumerated type.
Definition ios_base.h:479
│ │ │ -
static const openmode ate
Open and seek to end immediately after opening.
Definition ios_base.h:453
│ │ │ +
Managing sequences of characters and character-like objects.
│ │ │ +
const _CharT * data() const noexcept
Return const pointer to contents.
│ │ │ +
basic_string & assign(const basic_string &__str)
Set value to contents of another string.
│ │ │ +
size_type size() const noexcept
Returns the number of characters in the string, not including any null-termination.
│ │ │ +
The base of the I/O class hierarchy.
Definition ios_base.h:229
│ │ │ +
static const openmode in
Open for input. Default for ifstream and fstream.
Definition ios_base.h:461
│ │ │ +
static const openmode out
Open for output. Default for ofstream and fstream.
Definition ios_base.h:464
│ │ │ +
_Ios_Openmode openmode
This is a bitmask type.
Definition ios_base.h:447
│ │ │ +
static const openmode app
Seek to end before each write.
Definition ios_base.h:450
│ │ │ +
_Ios_Seekdir seekdir
This is an enumerated type.
Definition ios_base.h:479
│ │ │ +
static const openmode ate
Open and seek to end immediately after opening.
Definition ios_base.h:453
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -819,19 +819,19 @@ │ │ │ │ 814 │ │ │ │ 815#include <_b_i_t_s_/_s_t_r_i_n_g___v_i_e_w_._t_c_c> │ │ │ │ 816 │ │ │ │ 817#endif // __cplusplus <= 201402L │ │ │ │ 818 │ │ │ │ 819#endif // _GLIBCXX_EXPERIMENTAL_STRING_VIEW │ │ │ │ _i_o_s_f_w_d │ │ │ │ -_r_a_n_g_e_s___b_a_s_e_._h │ │ │ │ -_r_a_n_g_e___a_c_c_e_s_s_._h │ │ │ │ _o_s_t_r_e_a_m___i_n_s_e_r_t_._h │ │ │ │ -_f_u_n_c_t_i_o_n_a_l___h_a_s_h_._h │ │ │ │ _c_h_a_r___t_r_a_i_t_s_._h │ │ │ │ +_f_u_n_c_t_i_o_n_a_l___h_a_s_h_._h │ │ │ │ +_r_a_n_g_e_s___b_a_s_e_._h │ │ │ │ +_r_a_n_g_e___a_c_c_e_s_s_._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_6 │ │ │ │ _s_t_d_:_:_m_i_n │ │ │ │ constexpr const _Tp & min(const _Tp &, const _Tp &) │ │ │ │ This does what you think it does. │ │ ├── ./usr/share/doc/gcc-11-base/libstdc++/user/a00206_source.html │ │ │ @@ -84,28 +84,28 @@ │ │ │
27 */
│ │ │
28
│ │ │
29#ifndef _GLIBCXX_SYNCSTREAM
│ │ │
30#define _GLIBCXX_SYNCSTREAM 1
│ │ │
31
│ │ │
32#if __cplusplus > 201703L
│ │ │
33
│ │ │ -
34#include <bits/c++config.h>
│ │ │ +
34#include <bits/c++config.h>
│ │ │
35#if _GLIBCXX_USE_CXX11_ABI
│ │ │
36
│ │ │
37#define __cpp_lib_syncbuf 201803L
│ │ │
38
│ │ │
39#pragma GCC system_header
│ │ │
40
│ │ │
41#include <sstream>
│ │ │
42
│ │ │
43#include <bits/alloc_traits.h>
│ │ │ -
44#include <bits/allocator.h>
│ │ │ -
45#include <bits/functexcept.h>
│ │ │ - │ │ │ -
47#include <bits/std_mutex.h>
│ │ │ +
44#include <bits/allocator.h>
│ │ │ +
45#include <bits/functexcept.h>
│ │ │ + │ │ │ +
47#include <bits/std_mutex.h>
│ │ │
48
│ │ │
49namespace std _GLIBCXX_VISIBILITY(default)
│ │ │
50{
│ │ │
51_GLIBCXX_BEGIN_NAMESPACE_VERSION
│ │ │
52
│ │ │
53 template<typename _CharT, typename _Traits, typename _Alloc>
│ │ │
54 class basic_syncbuf : public __syncbuf_base<_CharT, _Traits>
│ │ │ @@ -369,25 +369,25 @@ │ │ │
312 using wosyncstream = basic_osyncstream<wchar_t>;
│ │ │
313_GLIBCXX_END_NAMESPACE_VERSION
│ │ │
314} // namespace std
│ │ │
315#endif // _GLIBCXX_USE_CXX11_ABI
│ │ │
316#endif // C++2a
│ │ │
317#endif /* _GLIBCXX_SYNCSTREAM */
│ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
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:428
│ │ │ -
constexpr _Tp * __addressof(_Tp &__r) noexcept
Same as C++11 std::addressof.
Definition move.h:49
│ │ │ +
constexpr _Tp * __addressof(_Tp &__r) noexcept
Same as C++11 std::addressof.
Definition move.h:49
│ │ │
void lock(_L1 &__l1, _L2 &__l2, _L3 &... __l3)
Generic lock.
Definition mutex:591
│ │ │
ISO C++ entities toplevel namespace is std.
│ │ │ -
ptrdiff_t streamsize
Integral type for I/O operation counts and buffer sizes.
Definition postypes.h:98
│ │ │ +
ptrdiff_t streamsize
Integral type for I/O operation counts and buffer sizes.
Definition postypes.h:98
│ │ │
Template class basic_ostream.
Definition ostream:59
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
482
│ │ │
483_GLIBCXX_END_NAMESPACE_VERSION
│ │ │
484} // namespace
│ │ │
485
│ │ │ -
486#include <bits/functional_hash.h>
│ │ │ +
486#include <bits/functional_hash.h>
│ │ │
487
│ │ │
488namespace std _GLIBCXX_VISIBILITY(default)
│ │ │
489{
│ │ │
490_GLIBCXX_BEGIN_NAMESPACE_VERSION
│ │ │
491
│ │ │
492#ifndef _GLIBCXX_COMPATIBILITY_CXX0X
│ │ │
493 // DR 1182.
│ │ │ @@ -601,38 +601,38 @@ │ │ │
528
│ │ │
529#endif // C++11
│ │ │
530
│ │ │
531#endif // _GLIBCXX_SYSTEM_ERROR
│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │
const error_category & system_category() noexcept
Error category for other error codes defined by the OS.
│ │ │
bool operator<(const error_condition &__lhs, const error_condition &__rhs) noexcept
Define an ordering for error_condition objects.
Definition system_error:398
│ │ │
error_condition make_error_condition(errc __e) noexcept
Create an error_condition representing a standard errc condition.
Definition system_error:355
│ │ │
const error_category & generic_category() noexcept
Error category for errno error codes.
│ │ │
integral_constant< bool, true > true_type
The type used as a compile-time boolean with true value.
Definition type_traits:83
│ │ │
integral_constant< bool, false > false_type
The type used as a compile-time boolean with false value.
Definition type_traits:86
│ │ │
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:1540
│ │ │
One of two subclasses of exception.
Definition stdexcept:220
│ │ │
runtime_error(const string &__arg) _GLIBCXX_TXN_SAFE
│ │ │ -
Primary class template hash.
│ │ │ +
Primary class template hash.
│ │ │
is_error_code_enum
Definition system_error:60
│ │ │
is_error_condition_enum
Definition system_error:64
│ │ │ │ │ │ │ │ │ │ │ │
An exception type that includes an error_code value.
Definition system_error:447
│ │ │ │ │ │
Define a member typedef type only if a boolean constant is true.
Definition type_traits:2192
│ │ │ -
One of the comparison functors.
│ │ │ +
One of the comparison functors.
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │
typename remove_reference< _Tp >::type remove_reference_t
Alias template for remove_reference.
Definition type_traits:1637
│ │ │
integral_constant< bool, true > true_type
The type used as a compile-time boolean with true value.
Definition type_traits:83
│ │ │
integral_constant< bool, false > false_type
The type used as a compile-time boolean with false value.
Definition type_traits:86
│ │ │
constexpr auto tuple_cat(_Tpls &&... __tpls) -> typename __tuple_cat_result< _Tpls... >::__type
tuple_cat
Definition tuple:1745
│ │ │
constexpr tuple< _Elements &&... > forward_as_tuple(_Elements &&... __args) noexcept
std::forward_as_tuple
Definition tuple:1630
│ │ │ -
constexpr std::remove_reference< _Tp >::type && move(_Tp &&__t) noexcept
Convert a value to an rvalue.
Definition move.h:104
│ │ │ -
constexpr __invoke_result< _Callable, _Args... >::type __invoke(_Callable &&__fn, _Args &&... __args) noexcept(__is_nothrow_invocable< _Callable, _Args... >::value)
Invoke a callable object.
Definition invoke.h:90
│ │ │ +
constexpr std::remove_reference< _Tp >::type && move(_Tp &&__t) noexcept
Convert a value to an rvalue.
Definition move.h:104
│ │ │ +
constexpr __invoke_result< _Callable, _Args... >::type __invoke(_Callable &&__fn, _Args &&... __args) noexcept(__is_nothrow_invocable< _Callable, _Args... >::value)
Invoke a callable object.
Definition invoke.h:90
│ │ │
constexpr tuple< _Elements &... > tie(_Elements &... __args) noexcept
tie
Definition tuple:1759
│ │ │
void swap(any &__x, any &__y) noexcept
Exchange the states of two any objects.
Definition any:428
│ │ │ -
constexpr _Tp && forward(typename std::remove_reference< _Tp >::type &__t) noexcept
Forward an lvalue.
Definition move.h:77
│ │ │ +
constexpr _Tp && forward(typename std::remove_reference< _Tp >::type &__t) noexcept
Forward an lvalue.
Definition move.h:77
│ │ │
ISO C++ entities toplevel namespace is std.
│ │ │
make_integer_sequence< size_t, _Num > make_index_sequence
Alias template make_index_sequence.
Definition utility:339
│ │ │
integer_sequence< size_t, _Idx... > index_sequence
Alias template index_sequence.
Definition utility:335
│ │ │
make_index_sequence< sizeof...(_Types)> index_sequence_for
Alias template index_sequence_for.
Definition utility:343
│ │ │
tuple_size
Definition array:433
│ │ │
tuple_element
Definition array:442
│ │ │
Primary class template, tuple.
Definition tuple:609
│ │ │ @@ -2035,18 +2035,18 @@ │ │ │
is_empty
Definition type_traits:757
│ │ │
is_nothrow_constructible
Definition type_traits:1024
│ │ │
is_nothrow_default_constructible
Definition type_traits:1033
│ │ │
is_assignable
Definition type_traits:1088
│ │ │
is_nothrow_assignable
Definition type_traits:1142
│ │ │ │ │ │
Define a member typedef type only if a boolean constant is true.
Definition type_traits:2192
│ │ │ -
Declare uses_allocator so it can be specialized in <queue> etc.
Definition memoryfwd.h:72
│ │ │ -
Tag type for piecewise construction of std::pair objects.
Definition stl_pair.h:80
│ │ │ -
Struct holding two objects of arbitrary type.
Definition stl_pair.h:213
│ │ │ -
constexpr pair()
Definition stl_pair.h:232
│ │ │ +
Declare uses_allocator so it can be specialized in <queue> etc.
Definition memoryfwd.h:72
│ │ │ +
Tag type for piecewise construction of std::pair objects.
Definition stl_pair.h:80
│ │ │ +
Struct holding two objects of arbitrary type.
Definition stl_pair.h:213
│ │ │ +
constexpr pair()
Definition stl_pair.h:232
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -101,21 +101,21 @@ │ │ │ │ 98 │ │ │ │ 99#endif // C++11 │ │ │ │ 100 │ │ │ │ 101#endif // _GLIBCXX_UNORDERED_MAP │ │ │ │ _i_n_i_t_i_a_l_i_z_e_r___l_i_s_t │ │ │ │ _t_y_p_e___t_r_a_i_t_s │ │ │ │ _u_n_o_r_d_e_r_e_d___m_a_p_._h │ │ │ │ +_f_u_n_c_t_i_o_n_a_l___h_a_s_h_._h │ │ │ │ _s_t_l___p_a_i_r_._h │ │ │ │ _s_t_l___f_u_n_c_t_i_o_n_._h │ │ │ │ -_r_a_n_g_e___a_c_c_e_s_s_._h │ │ │ │ -_f_u_n_c_t_i_o_n_a_l___h_a_s_h_._h │ │ │ │ -_e_r_a_s_e___i_f_._h │ │ │ │ _c_+_+_0_x___w_a_r_n_i_n_g_._h │ │ │ │ _a_l_l_o_c_a_t_o_r_._h │ │ │ │ +_e_r_a_s_e___i_f_._h │ │ │ │ +_r_a_n_g_e___a_c_c_e_s_s_._h │ │ │ │ _a_l_i_g_n_e_d___b_u_f_f_e_r_._h │ │ │ │ _s_t_d │ │ │ │ ISO C++ entities toplevel namespace is std. │ │ │ │ _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_4_6 │ │ ├── ./usr/share/doc/gcc-11-base/libstdc++/user/a00227_source.html │ │ │ @@ -85,29 +85,29 @@ │ │ │
28
│ │ │
29#ifndef _GLIBCXX_UNORDERED_SET
│ │ │
30#define _GLIBCXX_UNORDERED_SET 1
│ │ │
31
│ │ │
32#pragma GCC system_header
│ │ │
33
│ │ │
34#if __cplusplus < 201103L
│ │ │ -
35# include <bits/c++0x_warning.h>
│ │ │ +
35# include <bits/c++0x_warning.h>
│ │ │
36#else
│ │ │
37
│ │ │
38#include <type_traits>
│ │ │
39#include <initializer_list>
│ │ │ -
40#include <bits/allocator.h>
│ │ │ +
40#include <bits/allocator.h>
│ │ │
41#include <ext/alloc_traits.h>
│ │ │ -
42#include <ext/aligned_buffer.h>
│ │ │ -
43#include <bits/stl_pair.h>
│ │ │ -
44#include <bits/stl_function.h> // equal_to, _Identity, _Select1st
│ │ │ - │ │ │ +
42#include <ext/aligned_buffer.h>
│ │ │ +
43#include <bits/stl_pair.h>
│ │ │ +
44#include <bits/stl_function.h> // equal_to, _Identity, _Select1st
│ │ │ + │ │ │
46#include <bits/hashtable.h>
│ │ │ -
47#include <bits/unordered_set.h>
│ │ │ -
48#include <bits/range_access.h>
│ │ │ -
49#include <bits/erase_if.h>
│ │ │ +
47#include <bits/unordered_set.h>
│ │ │ +
48#include <bits/range_access.h>
│ │ │ +
49#include <bits/erase_if.h>
│ │ │
50
│ │ │
51#ifdef _GLIBCXX_DEBUG
│ │ │
52# include <debug/unordered_set>
│ │ │
53#endif
│ │ │
54
│ │ │
55#if __cplusplus >= 201703L
│ │ │
56namespace std _GLIBCXX_VISIBILITY(default)
│ │ │ @@ -153,28 +153,28 @@ │ │ │
96#endif // C++20
│ │ │
97
│ │ │
98#endif // C++11
│ │ │
99
│ │ │
100#endif // _GLIBCXX_UNORDERED_SET
│ │ │ │ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │
ISO C++ entities toplevel namespace is std.
│ │ │ -
A standard container composed of equivalent keys (possibly containing multiple of each key value) in ...
│ │ │ -
_Hashtable::size_type size_type
Iterator-related typedefs.
│ │ │ -
A standard container composed of unique keys (containing at most one of each key value) in which the ...
│ │ │ -
_Hashtable::size_type size_type
Iterator-related typedefs.
│ │ │ +
A standard container composed of equivalent keys (possibly containing multiple of each key value) in ...
│ │ │ +
_Hashtable::size_type size_type
Iterator-related typedefs.
│ │ │ +
A standard container composed of unique keys (containing at most one of each key value) in which the ...
│ │ │ +
_Hashtable::size_type size_type
Iterator-related typedefs.
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -99,22 +99,22 @@ │ │ │ │ 96#endif // C++20 │ │ │ │ 97 │ │ │ │ 98#endif // C++11 │ │ │ │ 99 │ │ │ │ 100#endif // _GLIBCXX_UNORDERED_SET │ │ │ │ _i_n_i_t_i_a_l_i_z_e_r___l_i_s_t │ │ │ │ _t_y_p_e___t_r_a_i_t_s │ │ │ │ -_u_n_o_r_d_e_r_e_d___s_e_t_._h │ │ │ │ +_f_u_n_c_t_i_o_n_a_l___h_a_s_h_._h │ │ │ │ _s_t_l___p_a_i_r_._h │ │ │ │ _s_t_l___f_u_n_c_t_i_o_n_._h │ │ │ │ -_r_a_n_g_e___a_c_c_e_s_s_._h │ │ │ │ -_f_u_n_c_t_i_o_n_a_l___h_a_s_h_._h │ │ │ │ -_e_r_a_s_e___i_f_._h │ │ │ │ +_u_n_o_r_d_e_r_e_d___s_e_t_._h │ │ │ │ _c_+_+_0_x___w_a_r_n_i_n_g_._h │ │ │ │ _a_l_l_o_c_a_t_o_r_._h │ │ │ │ +_e_r_a_s_e___i_f_._h │ │ │ │ +_r_a_n_g_e___a_c_c_e_s_s_._h │ │ │ │ _a_l_i_g_n_e_d___b_u_f_f_e_r_._h │ │ │ │ _s_t_d │ │ │ │ ISO C++ entities toplevel namespace is std. │ │ │ │ _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_4 │ │ ├── ./usr/share/doc/gcc-11-base/libstdc++/user/a00230_source.html │ │ │ @@ -118,22 +118,22 @@ │ │ │
61 * @defgroup utilities Utilities
│ │ │
62 *
│ │ │
63 * Components deemed generally useful. Includes pair, tuple,
│ │ │
64 * forward/move helpers, ratio, function object, metaprogramming and
│ │ │
65 * type traits, time, date, and memory functions.
│ │ │
66 */
│ │ │
67
│ │ │ -
68#include <bits/c++config.h>
│ │ │ -
69#include <bits/stl_relops.h>
│ │ │ -
70#include <bits/stl_pair.h>
│ │ │ +
68#include <bits/c++config.h>
│ │ │ +
69#include <bits/stl_relops.h>
│ │ │ +
70#include <bits/stl_pair.h>
│ │ │
71
│ │ │
72#if __cplusplus >= 201103L
│ │ │
73
│ │ │
74#include <type_traits>
│ │ │ -
75#include <bits/move.h>
│ │ │ +
75#include <bits/move.h>
│ │ │
76#include <initializer_list>
│ │ │
77
│ │ │
78#if __cplusplus > 201703L
│ │ │
79#include <ext/numeric_traits.h>
│ │ │
80#endif
│ │ │
81
│ │ │
82namespace std _GLIBCXX_VISIBILITY(default)
│ │ │ @@ -546,38 +546,38 @@ │ │ │
477} // namespace
│ │ │
478
│ │ │
479#endif
│ │ │
480
│ │ │
481#endif /* _GLIBCXX_UTILITY */
│ │ │ │ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │
typename add_const< _Tp >::type add_const_t
Alias template for add_const.
Definition type_traits:1580
│ │ │
integral_constant< bool, __v > bool_constant
Alias template for compile-time boolean constant types.
Definition type_traits:99
│ │ │
typename underlying_type< _Tp >::type underlying_type_t
Alias template for underlying_type.
Definition type_traits:2589
│ │ │
integral_constant< bool, true > true_type
The type used as a compile-time boolean with true value.
Definition type_traits:83
│ │ │
typename make_unsigned< _Tp >::type make_unsigned_t
Alias template for make_unsigned.
Definition type_traits:1972
│ │ │ -
constexpr std::remove_reference< _Tp >::type && move(_Tp &&__t) noexcept
Convert a value to an rvalue.
Definition move.h:104
│ │ │ -
constexpr _Tp && forward(typename std::remove_reference< _Tp >::type &__t) noexcept
Forward an lvalue.
Definition move.h:77
│ │ │ +
constexpr std::remove_reference< _Tp >::type && move(_Tp &&__t) noexcept
Convert a value to an rvalue.
Definition move.h:104
│ │ │ +
constexpr _Tp && forward(typename std::remove_reference< _Tp >::type &__t) noexcept
Forward an lvalue.
Definition move.h:77
│ │ │
ISO C++ entities toplevel namespace is std.
│ │ │
make_integer_sequence< size_t, _Num > make_index_sequence
Alias template make_index_sequence.
Definition utility:339
│ │ │
constexpr _Tp exchange(_Tp &__obj, _Up &&__new_val)
Assign __new_val to __obj and return its previous value.
Definition utility:291
│ │ │
integer_sequence< size_t, _Idx... > index_sequence
Alias template index_sequence.
Definition utility:335
│ │ │
integer_sequence< _Tp, __integer_pack(_Tp(_Num))... > make_integer_sequence
Alias template make_integer_sequence.
Definition utility:330
│ │ │
make_index_sequence< sizeof...(_Types)> index_sequence_for
Alias template index_sequence_for.
Definition utility:343
│ │ │
__numeric_traits_integer< _Tp > __int_traits
Convenience alias for __numeric_traits<integer-type>.
│ │ │
tuple_size
Definition array:433
│ │ │
tuple_element
Definition array:442
│ │ │
integral_constant
Definition type_traits:66
│ │ │
Define a member typedef type only if a boolean constant is true.
Definition type_traits:2192
│ │ │
Class template integer_sequence.
Definition utility:323
│ │ │ -
Struct holding two objects of arbitrary type.
Definition stl_pair.h:213
│ │ │ +
Struct holding two objects of arbitrary type.
Definition stl_pair.h:213
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
597
│ │ │
598 /// @} group numeric_arrays
│ │ │
599
│ │ │
600_GLIBCXX_END_NAMESPACE_VERSION
│ │ │
601} // namespace
│ │ │
602
│ │ │ -
603#include <bits/valarray_after.h>
│ │ │ +
603#include <bits/valarray_after.h>
│ │ │
604#include <bits/slice_array.h>
│ │ │ -
605#include <bits/gslice.h>
│ │ │ -
606#include <bits/gslice_array.h>
│ │ │ -
607#include <bits/mask_array.h>
│ │ │ -
608#include <bits/indirect_array.h>
│ │ │ +
605#include <bits/gslice.h>
│ │ │ +
606#include <bits/gslice_array.h>
│ │ │ +
607#include <bits/mask_array.h>
│ │ │ +
608#include <bits/indirect_array.h>
│ │ │
609
│ │ │
610namespace std _GLIBCXX_VISIBILITY(default)
│ │ │
611{
│ │ │
612_GLIBCXX_BEGIN_NAMESPACE_VERSION
│ │ │
613
│ │ │
614 /**
│ │ │
615 * @addtogroup numeric_arrays
│ │ │ @@ -1427,26 +1427,26 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │
void swap(any &__x, any &__y) noexcept
Exchange the states of two any objects.
Definition any:428
│ │ │ -
constexpr _Tp * __addressof(_Tp &__r) noexcept
Same as C++11 std::addressof.
Definition move.h:49
│ │ │ +
constexpr _Tp * __addressof(_Tp &__r) noexcept
Same as C++11 std::addressof.
Definition move.h:49
│ │ │
_Tp & operator[](size_t __i)
Definition valarray:592
│ │ │
size_t size() const
Return the number of elements in array.
Definition valarray:937
│ │ │
_Tp min() const
Return the minimum element using operator<().
Definition valarray:1049
│ │ │
_Tp max() const
Return the maximum element using operator<().
Definition valarray:1057
│ │ │
valarray< _Tp > cshift(int __n) const
Return a rotated array.
Definition valarray:991
│ │ │
void swap(valarray< _Tp > &__v) noexcept
Swap.
Definition valarray:928
│ │ │
_Expr< _ValFunClos< _ValArray, _Tp >, _Tp > apply(_Tp func(_Tp)) const
Apply a function to the array.
Definition valarray:1065
│ │ │ @@ -1454,15 +1454,15 @@ │ │ │
void resize(size_t __size, _Tp __c=_Tp())
Resize array.
Definition valarray:1032
│ │ │
_Tp sum() const
Return the sum of all elements in the array.
Definition valarray:942
│ │ │
_Tp * end(valarray< _Tp > &__va) noexcept
Return an iterator pointing to one past the last element of the valarray.
Definition valarray:1239
│ │ │
valarray< _Tp > shift(int __n) const
Return a shifted array.
Definition valarray:950
│ │ │
_Tp * begin(valarray< _Tp > &__va) noexcept
Return an iterator pointing to the first element of the valarray.
Definition valarray:1217
│ │ │
valarray< _Tp > & operator=(const valarray< _Tp > &__v)
Assign elements to an array.
Definition valarray:724
│ │ │
ISO C++ entities toplevel namespace is std.
│ │ │ -
constexpr auto size(const _Container &__cont) noexcept(noexcept(__cont.size())) -> decltype(__cont.size())
Return the size of a container.
│ │ │ +
constexpr auto size(const _Container &__cont) noexcept(noexcept(__cont.size())) -> decltype(__cont.size())
Return the size of a container.
│ │ │
Implementation details not part of the namespace std interface.
│ │ │
initializer_list
│ │ │
Smart array designed to support numeric processing.
Definition valarray:128
│ │ │
valarray< _Tp > & operator^=(const _Tp &)
Set each element e of array to e ^ t.
│ │ │
valarray< _Tp > & operator/=(const _Tp &)
Divide each element of array by t.
│ │ │
valarray(const _Tp *__restrict__, size_t)
Construct an array initialized to the first n elements of t.
│ │ │
valarray< _Tp > & operator|=(const valarray< _Tp > &)
Logical or corresponding elements of v with elements of array.
│ │ │ @@ -1483,18 +1483,18 @@ │ │ │
valarray< _Tp > & operator&=(const valarray< _Tp > &)
Logical and corresponding elements of v with elements of array.
│ │ │
valarray< _Tp > & operator*=(const valarray< _Tp > &)
Multiply elements of array by corresponding elements of v.
│ │ │
_UnaryOp< __negate >::_Rt operator-() const
Return a new valarray by applying unary - to each element.
│ │ │
valarray< _Tp > & operator%=(const valarray< _Tp > &)
Modulo elements of array by corresponding elements of v.
│ │ │
valarray< _Tp > & operator&=(const _Tp &)
Set each element e of array to e & t.
│ │ │
valarray< _Tp > & operator|=(const _Tp &)
Set each element e of array to e | t.
│ │ │
Reference to one-dimensional subset of an array.
│ │ │ -
Reference to multi-dimensional subset of an array.
│ │ │ -
Reference to selected subset of an array.
Definition mask_array.h:63
│ │ │ -
Reference to arbitrary subset of an array.
│ │ │ -
Class defining multi-dimensional subset of an array.
Definition gslice.h:65
│ │ │ +
Reference to multi-dimensional subset of an array.
│ │ │ +
Reference to selected subset of an array.
Definition mask_array.h:63
│ │ │ +
Reference to arbitrary subset of an array.
│ │ │ +
Class defining multi-dimensional subset of an array.
Definition gslice.h:65
│ │ │
Class defining one-dimensional subset of an array.
Definition slice_array.h:60
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
nested_exception.h File Reference
│ │ │ +
valarray_before.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │

Go to the source code of this file.

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

│ │ │ -Classes

class  std::nested_exception
│ │ │ │ │ │ │ │ │ -

│ │ │ Namespaces

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

│ │ │ -Functions

template<typename _Ex>
void std::rethrow_if_nested (const _Ex &__ex)
template<typename _Tp>
void std::throw_with_nested (_Tp &&__t)
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 <exception>.

│ │ │ +

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

│ │ │ │ │ │ -

Definition in file nested_exception.h.

│ │ │ +

Definition in file valarray_before.h.

│ │ │
│ │ │
│ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,19 +1,13 @@ │ │ │ │ libstdc++ │ │ │ │ -nested_exception.h File Reference │ │ │ │ +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_. │ │ │ │ -CCllaasssseess │ │ │ │ -class   _s_t_d_:_:_n_e_s_t_e_d___e_x_c_e_p_t_i_o_n │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _s_t_d │ │ │ │ -FFuunnccttiioonnss │ │ │ │ -template │ │ │ │ -void  _s_t_d_:_:_r_e_t_h_r_o_w___i_f___n_e_s_t_e_d (const _Ex &__ex) │ │ │ │ -template │ │ │ │ -void  _s_t_d_:_:_t_h_r_o_w___w_i_t_h___n_e_s_t_e_d (_Tp &&__t) │ │ │ │ +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 _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 _v_a_l_a_r_r_a_y___b_e_f_o_r_e_._h. │ │ │ │ * bbiittss │ │ │ │ - * _n_e_s_t_e_d___e_x_c_e_p_t_i_o_n_._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.15.0 │ │ ├── ./usr/share/doc/gcc-11-base/libstdc++/user/a00320_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: nested_exception.h Source File │ │ │ +libstdc++: valarray_before.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -48,20 +48,20 @@ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
nested_exception.h
│ │ │ +
valarray_before.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// The template and inlines for the -*- C++ -*- internal _Meta class.
│ │ │
2
│ │ │ -
3// Copyright (C) 2009-2021 Free Software Foundation, Inc.
│ │ │ +
3// Copyright (C) 1997-2021 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
│ │ │ @@ -75,188 +75,771 @@ │ │ │
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 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{exception}
│ │ │ +
27 * Do not attempt to use it directly. @headername{valarray}
│ │ │
28 */
│ │ │
29
│ │ │ -
30#ifndef _GLIBCXX_NESTED_EXCEPTION_H
│ │ │ -
31#define _GLIBCXX_NESTED_EXCEPTION_H 1
│ │ │ -
32
│ │ │ -
33#pragma GCC visibility push(default)
│ │ │ +
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#if __cplusplus < 201103L
│ │ │ -
36# include <bits/c++0x_warning.h>
│ │ │ -
37#else
│ │ │ +
35#pragma GCC system_header
│ │ │ +
36
│ │ │ +
37#include <bits/slice_array.h>
│ │ │
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.
│ │ │ -
│ │ │ -
52 class nested_exception
│ │ │ -
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;
│ │ │ +
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 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 }
│ │ │ +
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 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;
│ │ │ -
121 using _CopyConstructible
│ │ │ -
122 = __and_<is_copy_constructible<_Up>, is_move_constructible<_Up>>;
│ │ │ -
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)>,
│ │ │ -
126 __not_<is_base_of<nested_exception, _Up>>>;
│ │ │ -
127 std::__throw_with_nested_impl(std::forward<_Tp>(__t), __nest{});
│ │ │ -
128 }
│ │ │ -
│ │ │ -
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;
│ │ │ +
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 // 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 { }
│ │ │ -
153
│ │ │ -
154 /// @endcond
│ │ │ -
155
│ │ │ -
156 /// If @p __ex is derived from nested_exception, @p __ex.rethrow_nested().
│ │ │ -
157 template<typename _Ex>
│ │ │ -
158 inline void
│ │ │ -
│ │ │ -
159 rethrow_if_nested(const _Ex& __ex)
│ │ │ -
160 { std::__rethrow_if_nested_impl(std::__addressof(__ex)); }
│ │ │ -
│ │ │ -
161
│ │ │ -
162 /// @} group exceptions
│ │ │ -
163} // namespace std
│ │ │ +
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} // extern "C++"
│ │ │ -
166
│ │ │ -
167#endif // C++11
│ │ │ -
168
│ │ │ -
169#pragma GCC visibility pop
│ │ │ -
170
│ │ │ -
171#endif // _GLIBCXX_NESTED_EXCEPTION_H
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
integral_constant< bool, true > true_type
The type used as a compile-time boolean with true value.
Definition type_traits:83
│ │ │ -
integral_constant< bool, false > false_type
The type used as a compile-time boolean with false value.
Definition type_traits:86
│ │ │ -
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
│ │ │ -
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...
│ │ │ +
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.
│ │ │ -
is_move_constructible
Definition type_traits:1009
│ │ │ -
An opaque pointer to an arbitrary exception.
│ │ │ -
Exception class with exception_ptr data member.
│ │ │ +
std::complex< _Tp > atan(const std::complex< _Tp > &)
atan(__z) [8.1.4].
Definition complex:1718
│ │ │ +
std::complex< _Tp > acos(const std::complex< _Tp > &)
acos(__z) [8.1.2].
Definition complex:1638
│ │ │ +
std::complex< _Tp > asin(const std::complex< _Tp > &)
asin(__z) [8.1.3].
Definition complex:1674
│ │ │ +
Implementation details not part of the namespace std interface.
│ │ │
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,13 +1,13 @@ │ │ │ │ libstdc++ │ │ │ │ -nested_exception.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// Nested Exception support header (nested_exception class) for -*- C++ -*- │ │ │ │ +1// The template and inlines for the -*- C++ -*- internal _Meta class. │ │ │ │ 2 │ │ │ │ -3// Copyright (C) 2009-2021 Free Software Foundation, Inc. │ │ │ │ +3// Copyright (C) 1997-2021 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,204 +21,810 @@ │ │ │ │ 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 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{exception} │ │ │ │ +27 * Do not attempt to use it directly. @headername{valarray} │ │ │ │ 28 */ │ │ │ │ 29 │ │ │ │ -30#ifndef _GLIBCXX_NESTED_EXCEPTION_H │ │ │ │ -31#define _GLIBCXX_NESTED_EXCEPTION_H 1 │ │ │ │ -32 │ │ │ │ -33#pragma GCC visibility push(default) │ │ │ │ +30// Written by Gabriel Dos Reis │ │ │ │ +31 │ │ │ │ +32#ifndef _VALARRAY_BEFORE_H │ │ │ │ +33#define _VALARRAY_BEFORE_H 1 │ │ │ │ 34 │ │ │ │ -35#if __cplusplus < 201103L │ │ │ │ -36# include <_b_i_t_s_/_c_+_+_0_x___w_a_r_n_i_n_g_._h> │ │ │ │ -37#else │ │ │ │ +35#pragma GCC system_header │ │ │ │ +36 │ │ │ │ +37#include <_b_i_t_s_/_s_l_i_c_e___a_r_r_a_y_._h> │ │ │ │ 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 */ │ │ │ │ -50 │ │ │ │ -51 /// Exception class with exception_ptr data member. │ │ │ │ -_5_2 class nested_exception │ │ │ │ -53 { │ │ │ │ -54 _e_x_c_e_p_t_i_o_n___p_t_r _M_ptr; │ │ │ │ -55 │ │ │ │ -56 public: │ │ │ │ -57 nested_exception() noexcept : _M_ptr(_c_u_r_r_e_n_t___e_x_c_e_p_t_i_o_n()) { } │ │ │ │ -58 │ │ │ │ -59 nested_exception(const nested_exception&) noexcept = default; │ │ │ │ -60 │ │ │ │ -61 nested_exception& operator=(const nested_exception&) noexcept = default; │ │ │ │ +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 virtual ~nested_exception() noexcept; │ │ │ │ -64 │ │ │ │ -65 [[noreturn]] │ │ │ │ -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 │ │ │ │ -80 │ │ │ │ -81 template │ │ │ │ -82 struct _Nested_exception : public _Except, public _n_e_s_t_e_d___e_x_c_e_p_t_i_o_n │ │ │ │ -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 │ │ │ │ -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 } │ │ │ │ +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 _a_c_o_s(__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 _a_s_i_n(__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 _CopyConstructible │ │ │ │ -122 = __and_, _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 __nest = __and_, __bool_constant, │ │ │ │ -126 __not_>>; │ │ │ │ -127 std::__throw_with_nested_impl(_s_t_d_:_:_f_o_r_w_a_r_d_<___T_p_>(__t), __nest{}); │ │ │ │ -128 } │ │ │ │ -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; │ │ │ │ +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 _a_t_a_n(__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 // 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 { } │ │ │ │ +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 /// @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 _Ex& __ex) │ │ │ │ -160 { std::__rethrow_if_nested_impl(_s_t_d_:_:_____a_d_d_r_e_s_s_o_f(__ex)); } │ │ │ │ -161 │ │ │ │ -162 /// @} group exceptions │ │ │ │ -163} // namespace std │ │ │ │ +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} // 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 │ │ │ │ -_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_3 │ │ │ │ -_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_6 │ │ │ │ -_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_:_:_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 │ │ │ │ +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 _____d_e_t_a_i_l │ │ │ │ +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. │ │ │ │ -_s_t_d_:_:_i_s___m_o_v_e___c_o_n_s_t_r_u_c_t_i_b_l_e │ │ │ │ -is_move_constructible │ │ │ │ -DDeeffiinniittiioonn _t_y_p_e___t_r_a_i_t_s_:_1_0_0_9 │ │ │ │ -_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_:_:_a_t_a_n │ │ │ │ +std::complex< _Tp > atan(const std::complex< _Tp > &) │ │ │ │ +atan(__z) [8.1.4]. │ │ │ │ +DDeeffiinniittiioonn _c_o_m_p_l_e_x_:_1_7_1_8 │ │ │ │ +_s_t_d_:_:_a_c_o_s │ │ │ │ +std::complex< _Tp > acos(const std::complex< _Tp > &) │ │ │ │ +acos(__z) [8.1.2]. │ │ │ │ +DDeeffiinniittiioonn _c_o_m_p_l_e_x_:_1_6_3_8 │ │ │ │ +_s_t_d_:_:_a_s_i_n │ │ │ │ +std::complex< _Tp > asin(const std::complex< _Tp > &) │ │ │ │ +asin(__z) [8.1.3]. │ │ │ │ +DDeeffiinniittiioonn _c_o_m_p_l_e_x_:_1_6_7_4 │ │ │ │ +_s_t_d_:_:_____d_e_t_a_i_l │ │ │ │ +Implementation details not part of the namespace std interface. │ │ │ │ * bbiittss │ │ │ │ - * _n_e_s_t_e_d___e_x_c_e_p_t_i_o_n_._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.15.0 │ │ ├── ./usr/share/doc/gcc-11-base/libstdc++/user/a00323.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: hash_bytes.h File Reference │ │ │ +libstdc++: stl_stack.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -48,47 +48,61 @@ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
hash_bytes.h File Reference
│ │ │ +
stl_stack.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │

Go to the source code of this file.

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

│ │ │ +Classes

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

│ │ │ 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)
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 _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 <functional>.

│ │ │ +

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

│ │ │ │ │ │ -

Definition in file hash_bytes.h.

│ │ │ +

Definition in file stl_stack.h.

│ │ │
│ │ │
│ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,15 +1,37 @@ │ │ │ │ libstdc++ │ │ │ │ -hash_bytes.h File Reference │ │ │ │ +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_:_:_s_t_a_c_k_<_ ___T_p_,_ ___S_e_q_u_e_n_c_e_ _> │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _s_t_d │ │ │ │ FFuunnccttiioonnss │ │ │ │ -size_t  ssttdd::::__FFnnvv__hhaasshh__bbyytteess (const void *__ptr, size_t __len, size_t __seed) │ │ │ │ -size_t  ssttdd::::__HHaasshh__bbyytteess (const void *__ptr, size_t __len, size_t __seed) │ │ │ │ +template │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_!_= (const _s_t_a_c_k< _Tp, _Seq │ │ │ │ + > &__x, const _s_t_a_c_k< _Tp, _Seq > &__y) │ │ │ │ +template │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_< (const _s_t_a_c_k< _Tp, _Seq > │ │ │ │ + &__x, const _s_t_a_c_k< _Tp, _Seq > &__y) │ │ │ │ +template │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_<_= (const _s_t_a_c_k< _Tp, _Seq │ │ │ │ + > &__x, const _s_t_a_c_k< _Tp, _Seq > &__y) │ │ │ │ +template │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_=_= (const _s_t_a_c_k< _Tp, _Seq │ │ │ │ + > &__x, const _s_t_a_c_k< _Tp, _Seq > &__y) │ │ │ │ +template │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_> (const _s_t_a_c_k< _Tp, _Seq > │ │ │ │ + &__x, const _s_t_a_c_k< _Tp, _Seq > &__y) │ │ │ │ +template │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_>_= (const _s_t_a_c_k< _Tp, _Seq │ │ │ │ + > &__x, const _s_t_a_c_k< _Tp, _Seq > &__y) │ │ │ │ +template │ │ │ │ +_e_n_a_b_l_e___i_f< __is_swappable< _Seq >:: _s_t_d_:_:_s_w_a_p (_s_t_a_c_k< _Tp, _Seq > &__x, │ │ │ │ + value >_:_:_t_y_p_e  _s_t_a_c_k< _Tp, _Seq > &__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 _h_a_s_h___b_y_t_e_s_._h. │ │ │ │ +attempt to use it directly. Instead, include . │ │ │ │ +Definition in file _s_t_l___s_t_a_c_k_._h. │ │ │ │ * bbiittss │ │ │ │ - * _h_a_s_h___b_y_t_e_s_._h │ │ │ │ + * _s_t_l___s_t_a_c_k_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.15.0 │ │ ├── ./usr/share/doc/gcc-11-base/libstdc++/user/a00323_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: hash_bytes.h Source File │ │ │ +libstdc++: stl_stack.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -48,20 +48,20 @@ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
hash_bytes.h
│ │ │ +
stl_stack.h
│ │ │
│ │ │
│ │ │ -Go to the documentation of this file.
1// Declarations for hash functions. -*- C++ -*-
│ │ │ +Go to the documentation of this file.
1// Stack implementation -*- C++ -*-
│ │ │
2
│ │ │ -
3// Copyright (C) 2010-2021 Free Software Foundation, Inc.
│ │ │ +
3// Copyright (C) 2001-2021 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
│ │ │ @@ -74,57 +74,435 @@ │ │ │
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/hash_bytes.h
│ │ │ -
26 * This is an internal header file, included by other library headers.
│ │ │ -
27 * Do not attempt to use it directly. @headername{functional}
│ │ │ -
28 */
│ │ │ -
29
│ │ │ -
30#ifndef _HASH_BYTES_H
│ │ │ -
31#define _HASH_BYTES_H 1
│ │ │ -
32
│ │ │ -
33#pragma GCC system_header
│ │ │ -
34
│ │ │ -
35#include <bits/c++config.h>
│ │ │ -
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);
│ │ │ +
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_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ -
57} // namespace
│ │ │ +
56#ifndef _STL_STACK_H
│ │ │ +
57#define _STL_STACK_H 1
│ │ │
58
│ │ │ -
59#endif
│ │ │ - │ │ │ +
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 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>
│ │ │ +
121 friend compare_three_way_result_t<_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
│ │ │ +
134 static_assert(is_same<_Tp, typename _Sequence::value_type>::value,
│ │ │ +
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 explicit
│ │ │ +
170 stack(_Sequence&& __c)
│ │ │ +
171 : c(std::move(__c)) { }
│ │ │ +
172
│ │ │ +
173 template<typename _Alloc, typename _Requires = _Uses<_Alloc>>
│ │ │ +
174 explicit
│ │ │ +
175 stack(const _Alloc& __a)
│ │ │ +
176 : c(__a) { }
│ │ │ +
177
│ │ │ +
178 template<typename _Alloc, typename _Requires = _Uses<_Alloc>>
│ │ │ +
179 stack(const _Sequence& __c, const _Alloc& __a)
│ │ │ +
180 : c(__c, __a) { }
│ │ │ +
181
│ │ │ +
182 template<typename _Alloc, typename _Requires = _Uses<_Alloc>>
│ │ │ +
183 stack(_Sequence&& __c, const _Alloc& __a)
│ │ │ +
184 : c(std::move(__c), __a) { }
│ │ │ +
185
│ │ │ +
186 template<typename _Alloc, typename _Requires = _Uses<_Alloc>>
│ │ │ +
187 stack(const stack& __q, const _Alloc& __a)
│ │ │ +
188 : c(__q.c, __a) { }
│ │ │ +
189
│ │ │ +
190 template<typename _Alloc, typename _Requires = _Uses<_Alloc>>
│ │ │ +
191 stack(stack&& __q, const _Alloc& __a)
│ │ │ +
192 : c(std::move(__q.c), __a) { }
│ │ │ +
193#endif
│ │ │ +
194
│ │ │ +
195 /**
│ │ │ +
196 * Returns true if the %stack is empty.
│ │ │ +
197 */
│ │ │ +
198 _GLIBCXX_NODISCARD bool
│ │ │ +
│ │ │ +
199 empty() const
│ │ │ +
200 { return c.empty(); }
│ │ │ +
│ │ │ +
201
│ │ │ +
202 /** Returns the number of elements in the %stack. */
│ │ │ + │ │ │ +
│ │ │ +
204 size() const
│ │ │ +
205 { return c.size(); }
│ │ │ +
│ │ │ +
206
│ │ │ +
207 /**
│ │ │ +
208 * Returns a read/write reference to the data at the first
│ │ │ +
209 * element of the %stack.
│ │ │ +
210 */
│ │ │ +
211 reference
│ │ │ +
│ │ │ + │ │ │ +
213 {
│ │ │ +
214 __glibcxx_requires_nonempty();
│ │ │ +
215 return c.back();
│ │ │ +
216 }
│ │ │ +
│ │ │ +
217
│ │ │ +
218 /**
│ │ │ +
219 * Returns a read-only (constant) reference to the data at the first
│ │ │ +
220 * element of the %stack.
│ │ │ +
221 */
│ │ │ +
222 const_reference
│ │ │ +
│ │ │ +
223 top() const
│ │ │ +
224 {
│ │ │ +
225 __glibcxx_requires_nonempty();
│ │ │ +
226 return c.back();
│ │ │ +
227 }
│ │ │ +
│ │ │ +
228
│ │ │ +
229 /**
│ │ │ +
230 * @brief Add data to the top of the %stack.
│ │ │ +
231 * @param __x Data to be added.
│ │ │ +
232 *
│ │ │ +
233 * This is a typical %stack operation. The function creates an
│ │ │ +
234 * element at the top of the %stack and assigns the given data
│ │ │ +
235 * to it. The time complexity of the operation depends on the
│ │ │ +
236 * underlying sequence.
│ │ │ +
237 */
│ │ │ +
238 void
│ │ │ +
│ │ │ +
239 push(const value_type& __x)
│ │ │ +
240 { c.push_back(__x); }
│ │ │ +
│ │ │ +
241
│ │ │ +
242#if __cplusplus >= 201103L
│ │ │ +
243 void
│ │ │ +
244 push(value_type&& __x)
│ │ │ +
245 { c.push_back(std::move(__x)); }
│ │ │ +
246
│ │ │ +
247#if __cplusplus > 201402L
│ │ │ +
248 template<typename... _Args>
│ │ │ +
249 decltype(auto)
│ │ │ +
250 emplace(_Args&&... __args)
│ │ │ +
251 { return c.emplace_back(std::forward<_Args>(__args)...); }
│ │ │ +
252#else
│ │ │ +
253 template<typename... _Args>
│ │ │ +
254 void
│ │ │ +
255 emplace(_Args&&... __args)
│ │ │ +
256 { c.emplace_back(std::forward<_Args>(__args)...); }
│ │ │ +
257#endif
│ │ │ +
258#endif
│ │ │ +
259
│ │ │ +
260 /**
│ │ │ +
261 * @brief Removes first element.
│ │ │ +
262 *
│ │ │ +
263 * This is a typical %stack operation. It shrinks the %stack
│ │ │ +
264 * by one. The time complexity of the operation depends on the
│ │ │ +
265 * underlying sequence.
│ │ │ +
266 *
│ │ │ +
267 * Note that no data is returned, and if the first element's
│ │ │ +
268 * data is needed, it should be retrieved before pop() is
│ │ │ +
269 * called.
│ │ │ +
270 */
│ │ │ +
271 void
│ │ │ +
│ │ │ + │ │ │ +
273 {
│ │ │ +
274 __glibcxx_requires_nonempty();
│ │ │ +
275 c.pop_back();
│ │ │ +
276 }
│ │ │ +
│ │ │ +
277
│ │ │ +
278#if __cplusplus >= 201103L
│ │ │ +
279 void
│ │ │ +
280 swap(stack& __s)
│ │ │ +
281#if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11
│ │ │ +
282 noexcept(__is_nothrow_swappable<_Sequence>::value)
│ │ │ +
283#else
│ │ │ +
284 noexcept(__is_nothrow_swappable<_Tp>::value)
│ │ │ +
285#endif
│ │ │ +
286 {
│ │ │ +
287 using std::swap;
│ │ │ +
288 swap(c, __s.c);
│ │ │ +
289 }
│ │ │ +
290#endif // __cplusplus >= 201103L
│ │ │ +
291 };
│ │ │ +
│ │ │ +
292
│ │ │ +
293#if __cpp_deduction_guides >= 201606
│ │ │ +
294 template<typename _Container,
│ │ │ +
295 typename = _RequireNotAllocator<_Container>>
│ │ │ + │ │ │ +
297
│ │ │ +
298 template<typename _Container, typename _Allocator,
│ │ │ +
299 typename = _RequireNotAllocator<_Container>,
│ │ │ +
300 typename = _RequireAllocator<_Allocator>>
│ │ │ +
301 stack(_Container, _Allocator)
│ │ │ + │ │ │ +
303#endif
│ │ │ +
304
│ │ │ +
305 /**
│ │ │ +
306 * @brief Stack equality comparison.
│ │ │ +
307 * @param __x A %stack.
│ │ │ +
308 * @param __y A %stack of the same type as @a __x.
│ │ │ +
309 * @return True iff the size and elements of the stacks are equal.
│ │ │ +
310 *
│ │ │ +
311 * This is an equivalence relation. Complexity and semantics
│ │ │ +
312 * depend on the underlying sequence type, but the expected rules
│ │ │ +
313 * are: this relation is linear in the size of the sequences, and
│ │ │ +
314 * stacks are considered equivalent if their sequences compare
│ │ │ +
315 * equal.
│ │ │ +
316 */
│ │ │ +
317 template<typename _Tp, typename _Seq>
│ │ │ +
318 inline bool
│ │ │ +
│ │ │ +
319 operator==(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y)
│ │ │ +
320 { return __x.c == __y.c; }
│ │ │ +
│ │ │ +
321
│ │ │ +
322 /**
│ │ │ +
323 * @brief Stack ordering relation.
│ │ │ +
324 * @param __x A %stack.
│ │ │ +
325 * @param __y A %stack of the same type as @a x.
│ │ │ +
326 * @return True iff @a x is lexicographically less than @a __y.
│ │ │ +
327 *
│ │ │ +
328 * This is an total ordering relation. Complexity and semantics
│ │ │ +
329 * depend on the underlying sequence type, but the expected rules
│ │ │ +
330 * are: this relation is linear in the size of the sequences, the
│ │ │ +
331 * elements must be comparable with @c <, and
│ │ │ +
332 * std::lexicographical_compare() is usually used to make the
│ │ │ +
333 * determination.
│ │ │ +
334 */
│ │ │ +
335 template<typename _Tp, typename _Seq>
│ │ │ +
│ │ │ +
336 inline bool
│ │ │ +
337 operator<(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y)
│ │ │ +
338 { return __x.c < __y.c; }
│ │ │ +
│ │ │ +
339
│ │ │ +
340 /// Based on operator==
│ │ │ +
341 template<typename _Tp, typename _Seq>
│ │ │ +
342 inline bool
│ │ │ +
│ │ │ +
343 operator!=(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y)
│ │ │ +
344 { return !(__x == __y); }
│ │ │ +
│ │ │ +
345
│ │ │ +
346 /// Based on operator<
│ │ │ +
347 template<typename _Tp, typename _Seq>
│ │ │ +
348 inline bool
│ │ │ +
│ │ │ +
349 operator>(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y)
│ │ │ +
350 { return __y < __x; }
│ │ │ +
│ │ │ +
351
│ │ │ +
352 /// Based on operator<
│ │ │ +
353 template<typename _Tp, typename _Seq>
│ │ │ +
│ │ │ +
354 inline bool
│ │ │ +
355 operator<=(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y)
│ │ │ +
356 { return !(__y < __x); }
│ │ │ +
│ │ │ +
357
│ │ │ +
358 /// Based on operator<
│ │ │ +
359 template<typename _Tp, typename _Seq>
│ │ │ +
360 inline bool
│ │ │ +
│ │ │ +
361 operator>=(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y)
│ │ │ +
362 { return !(__x < __y); }
│ │ │ +
│ │ │ +
363
│ │ │ +
364#if __cpp_lib_three_way_comparison
│ │ │ +
365 template<typename _Tp, three_way_comparable _Seq>
│ │ │ +
366 inline compare_three_way_result_t<_Seq>
│ │ │ +
367 operator<=>(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y)
│ │ │ +
368 { return __x.c <=> __y.c; }
│ │ │ +
369#endif
│ │ │ +
370
│ │ │ +
371#if __cplusplus >= 201103L
│ │ │ +
372 template<typename _Tp, typename _Seq>
│ │ │ +
373 inline
│ │ │ +
374#if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11
│ │ │ +
375 // Constrained free swap overload, see p0185r1
│ │ │ + │ │ │ +
377#else
│ │ │ +
378 void
│ │ │ +
379#endif
│ │ │ + │ │ │ +
381 noexcept(noexcept(__x.swap(__y)))
│ │ │ +
382 { __x.swap(__y); }
│ │ │ +
383
│ │ │ +
384 template<typename _Tp, typename _Seq, typename _Alloc>
│ │ │ +
385 struct uses_allocator<stack<_Tp, _Seq>, _Alloc>
│ │ │ +
386 : public uses_allocator<_Seq, _Alloc>::type { };
│ │ │ +
387#endif // __cplusplus >= 201103L
│ │ │ +
388
│ │ │ +
389_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ +
390} // namespace
│ │ │ +
391
│ │ │ +
392#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:428
│ │ │ +
constexpr _Tp && forward(typename std::remove_reference< _Tp >::type &__t) noexcept
Forward an lvalue.
Definition move.h:77
│ │ │
ISO C++ entities toplevel namespace is std.
│ │ │ + │ │ │ +
Define a member typedef type only if a boolean constant is true.
Definition type_traits:2192
│ │ │ + │ │ │ + │ │ │ +
Declare uses_allocator so it can be specialized in <queue> etc.
Definition memoryfwd.h:72
│ │ │ +
A standard container giving FILO behavior.
Definition stl_stack.h:100
│ │ │ +
void pop()
Removes first element.
Definition stl_stack.h:272
│ │ │ +
size_type size() const
Definition stl_stack.h:204
│ │ │ +
void push(const value_type &__x)
Add data to the top of the stack.
Definition stl_stack.h:239
│ │ │ +
bool empty() const
Definition stl_stack.h:199
│ │ │ +
const_reference top() const
Definition stl_stack.h:223
│ │ │ +
stack()
Default constructor creates no elements.
Definition stl_stack.h:162
│ │ │ +
reference top()
Definition stl_stack.h:212
│ │ │
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,13 +1,13 @@ │ │ │ │ libstdc++ │ │ │ │ -hash_bytes.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// Declarations for hash functions. -*- C++ -*- │ │ │ │ +1// Stack implementation -*- C++ -*- │ │ │ │ 2 │ │ │ │ -3// Copyright (C) 2010-2021 Free Software Foundation, Inc. │ │ │ │ +3// Copyright (C) 2001-2021 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,431 @@ │ │ │ │ 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 │ │ │ │ -26 * This is an internal header file, included by other library headers. │ │ │ │ -27 * Do not attempt to use it directly. @headername{functional} │ │ │ │ -28 */ │ │ │ │ -29 │ │ │ │ -30#ifndef _HASH_BYTES_H │ │ │ │ -31#define _HASH_BYTES_H 1 │ │ │ │ -32 │ │ │ │ -33#pragma GCC system_header │ │ │ │ -34 │ │ │ │ -35#include <_b_i_t_s_/_c_+_+_c_o_n_f_i_g_._h> │ │ │ │ -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); │ │ │ │ +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_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ -57} // namespace │ │ │ │ +56#ifndef _STL_STACK_H │ │ │ │ +57#define _STL_STACK_H 1 │ │ │ │ 58 │ │ │ │ -59#endif │ │ │ │ -_c_+_+_c_o_n_f_i_g_._h │ │ │ │ +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 _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 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 compare_three_way_result_t<_Seq1> │ │ │ │ +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>_:_:_t_y_p_e; │ │ │ │ +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(is_same<_Tp, typename _Sequence::value_type>::value, │ │ │ │ +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>_:_:_t_y_p_e> │ │ │ │ +_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 explicit │ │ │ │ +170 _s_t_a_c_k(_Sequence&& __c) │ │ │ │ +171 : c(_s_t_d::_m_o_v_e(__c)) { } │ │ │ │ +172 │ │ │ │ +173 template> │ │ │ │ +174 explicit │ │ │ │ +175 _s_t_a_c_k(const _Alloc& __a) │ │ │ │ +176 : c(__a) { } │ │ │ │ +177 │ │ │ │ +178 template> │ │ │ │ +179 _s_t_a_c_k(const _Sequence& __c, const _Alloc& __a) │ │ │ │ +180 : c(__c, __a) { } │ │ │ │ +181 │ │ │ │ +182 template> │ │ │ │ +183 _s_t_a_c_k(_Sequence&& __c, const _Alloc& __a) │ │ │ │ +184 : c(std::_m_o_v_e(__c), __a) { } │ │ │ │ +185 │ │ │ │ +186 template> │ │ │ │ +187 _s_t_a_c_k(const _s_t_a_c_k& __q, const _Alloc& __a) │ │ │ │ +188 : c(__q.c, __a) { } │ │ │ │ +189 │ │ │ │ +190 template> │ │ │ │ +191 _s_t_a_c_k(_s_t_a_c_k&& __q, const _Alloc& __a) │ │ │ │ +192 : c(std::_m_o_v_e(__q.c), __a) { } │ │ │ │ +193#endif │ │ │ │ +194 │ │ │ │ +195 /** │ │ │ │ +196 * Returns true if the %stack is empty. │ │ │ │ +197 */ │ │ │ │ +198 _GLIBCXX_NODISCARD bool │ │ │ │ +_1_9_9 _e_m_p_t_y() const │ │ │ │ +200 { return c.empty(); } │ │ │ │ +201 │ │ │ │ +202 /** Returns the number of elements in the %stack. */ │ │ │ │ +203 _s_i_z_e___t_y_p_e │ │ │ │ +_2_0_4 _s_i_z_e() const │ │ │ │ +205 { return c.size(); } │ │ │ │ +206 │ │ │ │ +207 /** │ │ │ │ +208 * Returns a read/write reference to the data at the first │ │ │ │ +209 * element of the %stack. │ │ │ │ +210 */ │ │ │ │ +211 reference │ │ │ │ +_2_1_2 _t_o_p() │ │ │ │ +213 { │ │ │ │ +214 __glibcxx_requires_nonempty(); │ │ │ │ +215 return c.back(); │ │ │ │ +216 } │ │ │ │ +217 │ │ │ │ +218 /** │ │ │ │ +219 * Returns a read-only (constant) reference to the data at the first │ │ │ │ +220 * element of the %stack. │ │ │ │ +221 */ │ │ │ │ +222 const_reference │ │ │ │ +_2_2_3 _t_o_p() const │ │ │ │ +224 { │ │ │ │ +225 __glibcxx_requires_nonempty(); │ │ │ │ +226 return c.back(); │ │ │ │ +227 } │ │ │ │ +228 │ │ │ │ +229 /** │ │ │ │ +230 * @brief Add data to the top of the %stack. │ │ │ │ +231 * @param __x Data to be added. │ │ │ │ +232 * │ │ │ │ +233 * This is a typical %stack operation. The function creates an │ │ │ │ +234 * element at the top of the %stack and assigns the given data │ │ │ │ +235 * to it. The time complexity of the operation depends on the │ │ │ │ +236 * underlying sequence. │ │ │ │ +237 */ │ │ │ │ +238 void │ │ │ │ +_2_3_9 _p_u_s_h(const value_type& __x) │ │ │ │ +240 { c.push_back(__x); } │ │ │ │ +241 │ │ │ │ +242#if __cplusplus >= 201103L │ │ │ │ +243 void │ │ │ │ +244 _p_u_s_h(_v_a_l_u_e___t_y_p_e&& __x) │ │ │ │ +245 { c.push_back(_s_t_d_:_:_m_o_v_e(__x)); } │ │ │ │ +246 │ │ │ │ +247#if __cplusplus > 201402L │ │ │ │ +248 template │ │ │ │ +249 decltype(auto) │ │ │ │ +250 emplace(_Args&&... __args) │ │ │ │ +251 { return c.emplace_back(_s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(__args)...); } │ │ │ │ +252#else │ │ │ │ +253 template │ │ │ │ +254 void │ │ │ │ +255 emplace(_Args&&... __args) │ │ │ │ +256 { c.emplace_back(_s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(__args)...); } │ │ │ │ +257#endif │ │ │ │ +258#endif │ │ │ │ +259 │ │ │ │ +260 /** │ │ │ │ +261 * @brief Removes first element. │ │ │ │ +262 * │ │ │ │ +263 * This is a typical %stack operation. It shrinks the %stack │ │ │ │ +264 * by one. The time complexity of the operation depends on the │ │ │ │ +265 * underlying sequence. │ │ │ │ +266 * │ │ │ │ +267 * Note that no data is returned, and if the first element's │ │ │ │ +268 * data is needed, it should be retrieved before pop() is │ │ │ │ +269 * called. │ │ │ │ +270 */ │ │ │ │ +271 void │ │ │ │ +_2_7_2 _p_o_p() │ │ │ │ +273 { │ │ │ │ +274 __glibcxx_requires_nonempty(); │ │ │ │ +275 c.pop_back(); │ │ │ │ +276 } │ │ │ │ +277 │ │ │ │ +278#if __cplusplus >= 201103L │ │ │ │ +279 void │ │ │ │ +280 _s_w_a_p(_s_t_a_c_k& __s) │ │ │ │ +281#if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11 │ │ │ │ +282 noexcept(__is_nothrow_swappable<_Sequence>::value) │ │ │ │ +283#else │ │ │ │ +284 noexcept(__is_nothrow_swappable<_Tp>::value) │ │ │ │ +285#endif │ │ │ │ +286 { │ │ │ │ +287 using _s_t_d_:_:_s_w_a_p; │ │ │ │ +288 _s_w_a_p(c, __s.c); │ │ │ │ +289 } │ │ │ │ +290#endif // __cplusplus >= 201103L │ │ │ │ +291 }; │ │ │ │ +292 │ │ │ │ +293#if __cpp_deduction_guides >= 201606 │ │ │ │ +294 template> │ │ │ │ +296 _s_t_a_c_k(_Container) -> _s_t_a_c_k_<_t_y_p_e_n_a_m_e_ ___C_o_n_t_a_i_n_e_r_:_:_v_a_l_u_e___t_y_p_e_,_ ___C_o_n_t_a_i_n_e_r_>; │ │ │ │ +297 │ │ │ │ +298 template, │ │ │ │ +300 typename = _RequireAllocator<_Allocator>> │ │ │ │ +301 _s_t_a_c_k(_Container, _Allocator) │ │ │ │ +302 -> _s_t_a_c_k_<_t_y_p_e_n_a_m_e_ ___C_o_n_t_a_i_n_e_r_:_:_v_a_l_u_e___t_y_p_e_,_ ___C_o_n_t_a_i_n_e_r_>; │ │ │ │ +303#endif │ │ │ │ +304 │ │ │ │ +305 /** │ │ │ │ +306 * @brief Stack equality comparison. │ │ │ │ +307 * @param __x A %stack. │ │ │ │ +308 * @param __y A %stack of the same type as @a __x. │ │ │ │ +309 * @return True iff the size and elements of the stacks are equal. │ │ │ │ +310 * │ │ │ │ +311 * This is an equivalence relation. Complexity and semantics │ │ │ │ +312 * depend on the underlying sequence type, but the expected rules │ │ │ │ +313 * are: this relation is linear in the size of the sequences, and │ │ │ │ +314 * stacks are considered equivalent if their sequences compare │ │ │ │ +315 * equal. │ │ │ │ +316 */ │ │ │ │ +317 template │ │ │ │ +318 inline bool │ │ │ │ +_3_1_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) │ │ │ │ +320 { return __x.c == __y.c; } │ │ │ │ +321 │ │ │ │ +322 /** │ │ │ │ +323 * @brief Stack ordering relation. │ │ │ │ +324 * @param __x A %stack. │ │ │ │ +325 * @param __y A %stack of the same type as @a x. │ │ │ │ +326 * @return True iff @a x is lexicographically less than @a __y. │ │ │ │ +327 * │ │ │ │ +328 * This is an total ordering relation. Complexity and semantics │ │ │ │ +329 * depend on the underlying sequence type, but the expected rules │ │ │ │ +330 * are: this relation is linear in the size of the sequences, the │ │ │ │ +331 * elements must be comparable with @c <, and │ │ │ │ +332 * std::lexicographical_compare() is usually used to make the │ │ │ │ +333 * determination. │ │ │ │ +334 */ │ │ │ │ +335 template │ │ │ │ +_3_3_6 inline bool │ │ │ │ +337 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) │ │ │ │ +338 { return __x.c < __y.c; } │ │ │ │ +339 │ │ │ │ +340 /// Based on operator== │ │ │ │ +341 template │ │ │ │ +342 inline bool │ │ │ │ +_3_4_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) │ │ │ │ +344 { return !(__x == __y); } │ │ │ │ +345 │ │ │ │ +346 /// Based on operator< │ │ │ │ +347 template │ │ │ │ +348 inline bool │ │ │ │ +_3_4_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) │ │ │ │ +350 { return __y < __x; } │ │ │ │ +351 │ │ │ │ +352 /// Based on operator< │ │ │ │ +353 template │ │ │ │ +_3_5_4 inline bool │ │ │ │ +355 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) │ │ │ │ +356 { return !(__y < __x); } │ │ │ │ +357 │ │ │ │ +358 /// Based on operator< │ │ │ │ +359 template │ │ │ │ +360 inline bool │ │ │ │ +_3_6_1 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) │ │ │ │ +362 { return !(__x < __y); } │ │ │ │ +363 │ │ │ │ +364#if __cpp_lib_three_way_comparison │ │ │ │ +365 template │ │ │ │ +366 inline compare_three_way_result_t<_Seq> │ │ │ │ +367 operator<=>(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y) │ │ │ │ +368 { return __x.c <=> __y.c; } │ │ │ │ +369#endif │ │ │ │ +370 │ │ │ │ +371#if __cplusplus >= 201103L │ │ │ │ +372 template │ │ │ │ +373 inline │ │ │ │ +374#if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11 │ │ │ │ +375 // Constrained free swap overload, see p0185r1 │ │ │ │ +376 typename _e_n_a_b_l_e___i_f_<_____i_s___s_w_a_p_p_a_b_l_e_<___S_e_q_>_:_:_v_a_l_u_e>::type │ │ │ │ +377#else │ │ │ │ +378 void │ │ │ │ +379#endif │ │ │ │ +380 _s_w_a_p(_s_t_a_c_k_<___T_p_,_ ___S_e_q_>& __x, _s_t_a_c_k_<___T_p_,_ ___S_e_q_>& __y) │ │ │ │ +381 noexcept(noexcept(__x.swap(__y))) │ │ │ │ +382 { __x.swap(__y); } │ │ │ │ +383 │ │ │ │ +384 template │ │ │ │ +385 struct _u_s_e_s___a_l_l_o_c_a_t_o_r<_s_t_a_c_k<_Tp, _Seq>, _Alloc> │ │ │ │ +386 : public _u_s_e_s___a_l_l_o_c_a_t_o_r<_Seq, _Alloc>::type { }; │ │ │ │ +387#endif // __cplusplus >= 201103L │ │ │ │ +388 │ │ │ │ +389_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ +390} // namespace │ │ │ │ +391 │ │ │ │ +392#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_8 │ │ │ │ +_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 │ │ │ │ ISO C++ entities toplevel namespace is std. │ │ │ │ +_s_t_d_:_:_t_y_p_e │ │ │ │ +_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_1_9_2 │ │ │ │ +_s_t_d_:_:_s_i_z_e___t_y_p_e │ │ │ │ +_s_t_d_:_:_v_a_l_u_e___t_y_p_e │ │ │ │ +_s_t_d_:_:_u_s_e_s___a_l_l_o_c_a_t_o_r │ │ │ │ +Declare uses_allocator so it can be specialized in etc. │ │ │ │ +DDeeffiinniittiioonn _m_e_m_o_r_y_f_w_d_._h_:_7_2 │ │ │ │ +_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_7_2 │ │ │ │ +_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_0_4 │ │ │ │ +_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_3_9 │ │ │ │ +_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_:_1_9_9 │ │ │ │ +_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_2_3 │ │ │ │ +_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_1_2 │ │ │ │ * bbiittss │ │ │ │ - * _h_a_s_h___b_y_t_e_s_._h │ │ │ │ + * _s_t_l___s_t_a_c_k_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.15.0 │ │ ├── ./usr/share/doc/gcc-11-base/libstdc++/user/a00326.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: exception_ptr.h File Reference │ │ │ +libstdc++: stl_numeric.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -48,75 +48,70 @@ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
exception_ptr.h File Reference
│ │ │ +
stl_numeric.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │

Go to the source code of this file.

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

│ │ │ -Classes

class  std::__exception_ptr::exception_ptr
class  std::exception_ptr
│ │ │ │ │ │ │ │ │

│ │ │ Namespaces

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

│ │ │ +Macros

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

│ │ │ Functions

exception_ptr std::current_exception () noexcept
template<typename _Ex>
exception_ptr std::make_exception_ptr (_Ex __ex) noexcept
void std::__exception_ptr::rethrow_exception (exception_ptr)
void std::rethrow_exception (exception_ptr)
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_ptr.h.

│ │ │ +

Definition in file stl_numeric.h.

│ │ │

Macro Definition Documentation

│ │ │ - │ │ │ -

◆ _GLIBCXX_EH_PTR_USED

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

Definition at line 49 of file exception_ptr.h.

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

Function Documentation

│ │ │ - │ │ │ -

◆ rethrow_exception()

│ │ │ + │ │ │ +

◆ _GLIBCXX_MOVE_IF_20

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │ │ │ │ - │ │ │ + │ │ │ │ │ │ - │ │ │ + │ │ │ │ │ │ │ │ │
void std::rethrow_exception #define _GLIBCXX_MOVE_IF_20(exception_ptr ) _E)
│ │ │
│ │ │ │ │ │ -

Throw the object pointed to by the exception_ptr.

│ │ │ +

Definition at line 114 of file stl_numeric.h.

│ │ │ │ │ │
│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,29 +1,55 @@ │ │ │ │ libstdc++ │ │ │ │ -exception_ptr.h File Reference │ │ │ │ +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_. │ │ │ │ -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_:_:_e_x_c_e_p_t_i_o_n___p_t_r │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _s_t_d │ │ │ │ +MMaaccrrooss │ │ │ │ +#define  ___G_L_I_B_C_X_X___M_O_V_E___I_F___2_0(_E) │ │ │ │ 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 │ │ │ │ -_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 (_Ex __ex) noexcept │ │ │ │ - void  _s_t_d_:_:_____e_x_c_e_p_t_i_o_n___p_t_r_:_:_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) │ │ │ │ - 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) │ │ │ │ +template │ │ │ │ + constexpr _Tp  _s_t_d_:_:_a_c_c_u_m_u_l_a_t_e (_InputIterator __first, │ │ │ │ + _InputIterator __last, _Tp __init) │ │ │ │ +template │ │ │ │ + constexpr _Tp  _s_t_d_:_:_a_c_c_u_m_u_l_a_t_e (_InputIterator __first, │ │ │ │ + _InputIterator __last, _Tp __init, _BinaryOperation │ │ │ │ + __binary_op) │ │ │ │ +template │ │ │ │ +constexpr _OutputIterator  _s_t_d_:_:_a_d_j_a_c_e_n_t___d_i_f_f_e_r_e_n_c_e (_InputIterator __first, │ │ │ │ + _InputIterator __last, _OutputIterator __result) │ │ │ │ +template │ │ │ │ +constexpr _OutputIterator  _s_t_d_:_:_a_d_j_a_c_e_n_t___d_i_f_f_e_r_e_n_c_e (_InputIterator __first, │ │ │ │ + _InputIterator __last, _OutputIterator __result, │ │ │ │ + _BinaryOperation __binary_op) │ │ │ │ +template │ │ │ │ + constexpr _Tp  _s_t_d_:_:_i_n_n_e_r___p_r_o_d_u_c_t (_InputIterator1 __first1, │ │ │ │ + _InputIterator1 __last1, _InputIterator2 __first2, │ │ │ │ + _Tp __init) │ │ │ │ +template │ │ │ │ + constexpr _Tp  _s_t_d_:_:_i_n_n_e_r___p_r_o_d_u_c_t (_InputIterator1 __first1, │ │ │ │ + _InputIterator1 __last1, _InputIterator2 __first2, │ │ │ │ + _Tp __init, _BinaryOperation1 __binary_op1, │ │ │ │ + _BinaryOperation2 __binary_op2) │ │ │ │ +template │ │ │ │ + constexpr void  _s_t_d_:_:_i_o_t_a (_ForwardIterator __first, │ │ │ │ + _ForwardIterator __last, _Tp __value) │ │ │ │ +template │ │ │ │ +constexpr _OutputIterator  _s_t_d_:_:_p_a_r_t_i_a_l___s_u_m (_InputIterator __first, │ │ │ │ + _InputIterator __last, _OutputIterator __result) │ │ │ │ +template │ │ │ │ +constexpr _OutputIterator  _s_t_d_:_:_p_a_r_t_i_a_l___s_u_m (_InputIterator __first, │ │ │ │ + _InputIterator __last, _OutputIterator __result, │ │ │ │ + _BinaryOperation __binary_op) │ │ │ │ ********** 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. │ │ │ │ +attempt to use it directly. Instead, include . │ │ │ │ +Definition in file _s_t_l___n_u_m_e_r_i_c_._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. │ │ │ │ -********** FFuunnccttiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ -********** _?◆_? rreetthhrrooww__eexxcceeppttiioonn(()) ********** │ │ │ │ -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 ) │ │ │ │ -Throw the object pointed to by the exception_ptr. │ │ │ │ +********** _?◆_? __GGLLIIBBCCXXXX__MMOOVVEE__IIFF__2200 ********** │ │ │ │ +#define _GLIBCXX_MOVE_IF_20 ( __EE ) │ │ │ │ +Definition at line _1_1_4 of file _s_t_l___n_u_m_e_r_i_c_._h. │ │ │ │ * bbiittss │ │ │ │ - * _e_x_c_e_p_t_i_o_n___p_t_r_._h │ │ │ │ + * _s_t_l___n_u_m_e_r_i_c_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.15.0 │ │ ├── ./usr/share/doc/gcc-11-base/libstdc++/user/a00326.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,7 +1,11 @@ │ │ │ │ var a00326 = [ │ │ │ │ - ["std::exception_ptr", "a20892.html", null], │ │ │ │ - ["std::current_exception", "a01573.html#ga02cdcc517fefe661313437aa9356a28f", null], │ │ │ │ - ["std::make_exception_ptr", "a01573.html#ga200c1d3152b2fd43b206da6c031b9730", null], │ │ │ │ - ["std::__exception_ptr::rethrow_exception", "a00326.html#a3d868a099252fe5a49e09b53b2d403cc", null], │ │ │ │ - ["std::rethrow_exception", "a01573.html#ga3d868a099252fe5a49e09b53b2d403cc", null] │ │ │ │ + ["std::accumulate", "a01593.html#ga1ab9deae5b1fb5b1f44e11200e7ed692", null], │ │ │ │ + ["std::accumulate", "a01593.html#ga1a36d8691b0b4b72b32ea9ac57156c17", null], │ │ │ │ + ["std::adjacent_difference", "a01593.html#ga76306a74ff39e25f64d4edb438c09642", null], │ │ │ │ + ["std::adjacent_difference", "a01593.html#gad9f0dd3e246adea056b3591d776bd761", null], │ │ │ │ + ["std::inner_product", "a01593.html#gaee19c7558ac11a31ab3bb2dd390f4a82", null], │ │ │ │ + ["std::inner_product", "a01593.html#gaab0eef2f424aef434aa167c329ef4a24", null], │ │ │ │ + ["std::iota", "a01593.html#ga854ad160d17fe9e284d784acd491e69f", null], │ │ │ │ + ["std::partial_sum", "a01593.html#gad80570b71def65f6c121ab87d1a30a2f", null], │ │ │ │ + ["std::partial_sum", "a01593.html#ga12a68a0208860c08aeefe4101afb86de", null] │ │ │ │ ]; │ │ ├── ./usr/share/doc/gcc-11-base/libstdc++/user/a00326_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: exception_ptr.h Source File │ │ │ +libstdc++: stl_numeric.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -48,319 +48,463 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
exception_ptr.h
│ │ │ +
stl_numeric.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// Numeric functions implementation -*- C++ -*-
│ │ │
2
│ │ │ -
3// Copyright (C) 2008-2021 Free Software Foundation, Inc.
│ │ │ +
3// Copyright (C) 2001-2021 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 */
│ │ │ +
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_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 namespace __exception_ptr
│ │ │ -
64 {
│ │ │ -
65 class exception_ptr;
│ │ │ -
66 }
│ │ │ -
67
│ │ │ - │ │ │ -
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 */
│ │ │ -
74 exception_ptr current_exception() _GLIBCXX_USE_NOEXCEPT;
│ │ │ -
75
│ │ │ -
76 template<typename _Ex>
│ │ │ -
77 exception_ptr make_exception_ptr(_Ex) _GLIBCXX_USE_NOEXCEPT;
│ │ │ -
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 */
│ │ │ -
│ │ │ -
90 class exception_ptr
│ │ │ -
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
│ │ │ -
101 friend exception_ptr std::current_exception() _GLIBCXX_USE_NOEXCEPT;
│ │ │ -
102 friend void std::rethrow_exception(exception_ptr);
│ │ │ -
103 template<typename _Ex>
│ │ │ -
104 friend exception_ptr std::make_exception_ptr(_Ex) _GLIBCXX_USE_NOEXCEPT;
│ │ │ -
105
│ │ │ -
106 public:
│ │ │ -
107 exception_ptr() _GLIBCXX_USE_NOEXCEPT;
│ │ │ +
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<
│ │ │ +
92 _ForwardIterator>)
│ │ │ +
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 exception_ptr(const exception_ptr&) _GLIBCXX_USE_NOEXCEPT;
│ │ │ -
110
│ │ │ -
111#if __cplusplus >= 201103L
│ │ │ -
112 exception_ptr(nullptr_t) noexcept
│ │ │ -
113 : _M_exception_object(nullptr)
│ │ │ -
114 { }
│ │ │ -
115
│ │ │ -
116 exception_ptr(exception_ptr&& __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 void (exception_ptr::*__safe_bool)();
│ │ │ -
123
│ │ │ -
124 // For construction from nullptr or 0.
│ │ │ -
125 exception_ptr(__safe_bool) _GLIBCXX_USE_NOEXCEPT;
│ │ │ -
126#endif
│ │ │ -
127
│ │ │ -
128 exception_ptr&
│ │ │ -
129 operator=(const exception_ptr&) _GLIBCXX_USE_NOEXCEPT;
│ │ │ -
130
│ │ │ -
131#if __cplusplus >= 201103L
│ │ │ -
132 exception_ptr&
│ │ │ -
133 operator=(exception_ptr&& __o) noexcept
│ │ │ -
134 {
│ │ │ -
135 exception_ptr(static_cast<exception_ptr&&>(__o)).swap(*this);
│ │ │ -
136 return *this;
│ │ │ -
137 }
│ │ │ -
138#endif
│ │ │ +
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 ~exception_ptr() _GLIBCXX_USE_NOEXCEPT;
│ │ │ -
141
│ │ │ -
142 void
│ │ │ -
143 swap(exception_ptr&) _GLIBCXX_USE_NOEXCEPT;
│ │ │ -
144
│ │ │ -
145#ifdef _GLIBCXX_EH_PTR_COMPAT
│ │ │ -
146 // Retained for compatibility with CXXABI_1.3.
│ │ │ -
147 void _M_safe_bool_dummy() _GLIBCXX_USE_NOEXCEPT
│ │ │ -
148 __attribute__ ((__const__));
│ │ │ -
149 bool operator!() const _GLIBCXX_USE_NOEXCEPT
│ │ │ -
150 __attribute__ ((__pure__));
│ │ │ -
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)
│ │ │ -
166 _GLIBCXX_USE_NOEXCEPT
│ │ │ -
167 { return __x._M_exception_object == __y._M_exception_object; }
│ │ │ -
168
│ │ │ -
169 friend _GLIBCXX_EH_PTR_USED bool
│ │ │ -
170 operator!=(const exception_ptr& __x, const exception_ptr& __y)
│ │ │ -
171 _GLIBCXX_USE_NOEXCEPT
│ │ │ -
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
│ │ │ -
177 __attribute__ ((__pure__));
│ │ │ -
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)
│ │ │ -
189 _GLIBCXX_USE_NOEXCEPT
│ │ │ -
190 : _M_exception_object(__other._M_exception_object)
│ │ │ -
191 {
│ │ │ -
192 if (_M_exception_object)
│ │ │ -
193 _M_addref();
│ │ │ -
194 }
│ │ │ -
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 }
│ │ │ -
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); }
│ │ │ -
225
│ │ │ -
226 /// @cond undocumented
│ │ │ -
227 template<typename _Ex>
│ │ │ -
228 inline void
│ │ │ -
229 __dest_thunk(void* __x)
│ │ │ -
230 { static_cast<_Ex*>(__x)->~_Ex(); }
│ │ │ -
231 /// @endcond
│ │ │ +
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,
│ │ │ +
162 _BinaryOperation __binary_op)
│ │ │ +
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
│ │ │ +
│ │ │ +
190 inner_product(_InputIterator1 __first1, _InputIterator1 __last1,
│ │ │ +
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
│ │ │ +
│ │ │ +
223 inner_product(_InputIterator1 __first1, _InputIterator1 __last1,
│ │ │ +
224 _InputIterator2 __first2, _Tp __init,
│ │ │ +
225 _BinaryOperation1 __binary_op1,
│ │ │ +
226 _BinaryOperation2 __binary_op2)
│ │ │ +
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 } // namespace __exception_ptr
│ │ │ -
234
│ │ │ -
235 /// Obtain an exception_ptr pointing to a copy of the supplied object.
│ │ │ -
236 template<typename _Ex>
│ │ │ - │ │ │ -
│ │ │ -
238 make_exception_ptr(_Ex __ex) _GLIBCXX_USE_NOEXCEPT
│ │ │ -
239 {
│ │ │ -
240#if __cpp_exceptions && __cpp_rtti && !_GLIBCXX_HAVE_CDTOR_CALLABI \
│ │ │ -
241 && __cplusplus >= 201103L
│ │ │ -
242 using _Ex2 = typename remove_reference<_Ex>::type;
│ │ │ -
243 void* __e = __cxxabiv1::__cxa_allocate_exception(sizeof(_Ex));
│ │ │ -
244 (void) __cxxabiv1::__cxa_init_primary_exception(
│ │ │ -
245 __e, const_cast<std::type_info*>(&typeid(_Ex)),
│ │ │ -
246 __exception_ptr::__dest_thunk<_Ex2>);
│ │ │ -
247 try
│ │ │ -
248 {
│ │ │ -
249 ::new (__e) _Ex2(std::forward<_Ex>(__ex));
│ │ │ -
250 return exception_ptr(__e);
│ │ │ -
251 }
│ │ │ -
252 catch(...)
│ │ │ -
253 {
│ │ │ -
254 __cxxabiv1::__cxa_free_exception(__e);
│ │ │ -
255 return current_exception();
│ │ │ -
256 }
│ │ │ -
257#elif __cpp_exceptions
│ │ │ -
258 try
│ │ │ -
259 {
│ │ │ -
260 throw __ex;
│ │ │ -
261 }
│ │ │ -
262 catch(...)
│ │ │ -
263 {
│ │ │ -
264 return current_exception();
│ │ │ -
265 }
│ │ │ -
266#else // no RTTI and no exceptions
│ │ │ -
267 return exception_ptr();
│ │ │ -
268#endif
│ │ │ -
269 }
│ │ │ -
│ │ │ -
270
│ │ │ -
271#undef _GLIBCXX_EH_PTR_USED
│ │ │ -
272
│ │ │ -
273 /// @} group exceptions
│ │ │ -
274} // namespace std
│ │ │ -
275
│ │ │ -
276} // extern "C++"
│ │ │ -
277
│ │ │ -
278#pragma GCC visibility pop
│ │ │ -
279
│ │ │ -
280#endif
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
constexpr _Tp && forward(typename std::remove_reference< _Tp >::type &__t) noexcept
Forward an lvalue.
Definition move.h:77
│ │ │ -
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.
│ │ │ +
233 for (; __first1 != __last1; ++__first1, (void)++__first2)
│ │ │ +
234 __init = __binary_op1(_GLIBCXX_MOVE_IF_20(__init),
│ │ │ +
235 __binary_op2(*__first1, *__first2));
│ │ │ +
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
│ │ │ +
│ │ │ +
256 partial_sum(_InputIterator __first, _InputIterator __last,
│ │ │ +
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
│ │ │ +
│ │ │ +
298 partial_sum(_InputIterator __first, _InputIterator __last,
│ │ │ +
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 */
│ │ │ +
335 template<typename _InputIterator, typename _OutputIterator>
│ │ │ +
336 _GLIBCXX20_CONSTEXPR
│ │ │ +
337 _OutputIterator
│ │ │ +
│ │ │ +
338 adjacent_difference(_InputIterator __first,
│ │ │ +
339 _InputIterator __last, _OutputIterator __result)
│ │ │ +
340 {
│ │ │ +
341 typedef typename iterator_traits<_InputIterator>::value_type _ValueType;
│ │ │ +
342
│ │ │ +
343 // concept requirements
│ │ │ +
344 __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
│ │ │ +
345 __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
│ │ │ +
346 _ValueType>)
│ │ │ +
347 __glibcxx_requires_valid_range(__first, __last);
│ │ │ +
348
│ │ │ +
349 if (__first == __last)
│ │ │ +
350 return __result;
│ │ │ +
351 _ValueType __value = *__first;
│ │ │ +
352 *__result = __value;
│ │ │ +
353 while (++__first != __last)
│ │ │ +
354 {
│ │ │ +
355 _ValueType __tmp = *__first;
│ │ │ +
356 *++__result = __tmp - _GLIBCXX_MOVE_IF_20(__value);
│ │ │ +
357 __value = _GLIBCXX_MOVE(__tmp);
│ │ │ +
358 }
│ │ │ +
359 return ++__result;
│ │ │ +
360 }
│ │ │ +
│ │ │ +
361
│ │ │ +
362 /**
│ │ │ +
363 * @brief Return differences between adjacent values.
│ │ │ +
364 *
│ │ │ +
365 * Computes the difference between adjacent values in the range
│ │ │ +
366 * [__first,__last) using the function object @p __binary_op and writes the
│ │ │ +
367 * result to @p __result.
│ │ │ +
368 *
│ │ │ +
369 * @param __first Start of input range.
│ │ │ +
370 * @param __last End of input range.
│ │ │ +
371 * @param __result Output sum.
│ │ │ +
372 * @param __binary_op Function object.
│ │ │ +
373 * @return Iterator pointing just beyond the values written to result.
│ │ │ +
374 *
│ │ │ +
375 * _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ +
376 * DR 539. partial_sum and adjacent_difference should mention requirements
│ │ │ +
377 */
│ │ │ +
378 template<typename _InputIterator, typename _OutputIterator,
│ │ │ +
379 typename _BinaryOperation>
│ │ │ +
380 _GLIBCXX20_CONSTEXPR
│ │ │ +
381 _OutputIterator
│ │ │ +
│ │ │ +
382 adjacent_difference(_InputIterator __first, _InputIterator __last,
│ │ │ +
383 _OutputIterator __result, _BinaryOperation __binary_op)
│ │ │ +
384 {
│ │ │ +
385 typedef typename iterator_traits<_InputIterator>::value_type _ValueType;
│ │ │ +
386
│ │ │ +
387 // concept requirements
│ │ │ +
388 __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
│ │ │ +
389 __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
│ │ │ +
390 _ValueType>)
│ │ │ +
391 __glibcxx_requires_valid_range(__first, __last);
│ │ │ +
392
│ │ │ +
393 if (__first == __last)
│ │ │ +
394 return __result;
│ │ │ +
395 _ValueType __value = *__first;
│ │ │ +
396 *__result = __value;
│ │ │ +
397 while (++__first != __last)
│ │ │ +
398 {
│ │ │ +
399 _ValueType __tmp = *__first;
│ │ │ +
400 *++__result = __binary_op(__tmp, _GLIBCXX_MOVE_IF_20(__value));
│ │ │ +
401 __value = _GLIBCXX_MOVE(__tmp);
│ │ │ +
402 }
│ │ │ +
403 return ++__result;
│ │ │ +
404 }
│ │ │ +
│ │ │ +
405
│ │ │ +
406 /// @} group numeric_ops
│ │ │ +
407
│ │ │ +
408#undef _GLIBCXX_MOVE_IF_20
│ │ │ +
409
│ │ │ +
410_GLIBCXX_END_NAMESPACE_ALGO
│ │ │ +
411} // namespace std
│ │ │ +
412
│ │ │ +
413#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 void iota(_ForwardIterator __first, _ForwardIterator __last, _Tp __value)
Create a range of sequentially increasing values.
Definition stl_numeric.h:88
│ │ │ +
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.
│ │ │ -
Part of RTTI.
Definition typeinfo:89
│ │ │ -
An opaque pointer to an arbitrary exception.
│ │ │ +
Traits class for iterators.
│ │ │
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,315 +1,452 @@ │ │ │ │ libstdc++ │ │ │ │ -exception_ptr.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// Exception Handling support header (exception_ptr class) for -*- C++ -*- │ │ │ │ +1// Numeric functions implementation -*- C++ -*- │ │ │ │ 2 │ │ │ │ -3// Copyright (C) 2008-2021 Free Software Foundation, Inc. │ │ │ │ +3// Copyright (C) 2001-2021 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 _t_y_p_e___i_n_f_o; │ │ │ │ -57 │ │ │ │ -58 /** │ │ │ │ -59 * @addtogroup exceptions │ │ │ │ -60 * @{ │ │ │ │ -61 */ │ │ │ │ +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_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 namespace __exception_ptr │ │ │ │ -64 { │ │ │ │ -65 class _e_x_c_e_p_t_i_o_n___p_t_r; │ │ │ │ -66 } │ │ │ │ +63 │ │ │ │ +64namespace _s_t_d _GLIBCXX_VISIBILITY(default) │ │ │ │ +65{ │ │ │ │ +66_GLIBCXX_BEGIN_NAMESPACE_VERSION │ │ │ │ 67 │ │ │ │ -68 using _____e_x_c_e_p_t_i_o_n___p_t_r_:_:_e_x_c_e_p_t_i_o_n___p_t_r; │ │ │ │ -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() _GLIBCXX_USE_NOEXCEPT; │ │ │ │ -75 │ │ │ │ -76 template │ │ │ │ -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(_Ex) _GLIBCXX_USE_NOEXCEPT; │ │ │ │ -78 │ │ │ │ -79 /// Throw the object pointed to by the exception_ptr. │ │ │ │ -_8_0 void _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) __attribute__ ((__noreturn__)); │ │ │ │ -81 │ │ │ │ -82 namespace __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 exception_ptr │ │ │ │ -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 │ │ │ │ -101 friend exception_ptr _s_t_d_:_:_c_u_r_r_e_n_t___e_x_c_e_p_t_i_o_n() _GLIBCXX_USE_NOEXCEPT; │ │ │ │ -102 friend void _s_t_d_:_:_r_e_t_h_r_o_w___e_x_c_e_p_t_i_o_n(exception_ptr); │ │ │ │ -103 template │ │ │ │ -104 friend exception_ptr _s_t_d_:_:_m_a_k_e___e_x_c_e_p_t_i_o_n___p_t_r(_Ex) _GLIBCXX_USE_NOEXCEPT; │ │ │ │ -105 │ │ │ │ -106 public: │ │ │ │ -107 exception_ptr() _GLIBCXX_USE_NOEXCEPT; │ │ │ │ +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 _i_o_t_a(_ForwardIterator __first, _ForwardIterator __last, _Tp __value) │ │ │ │ +89 { │ │ │ │ +90 // concept requirements │ │ │ │ +91 __glibcxx_function_requires(_Mutable_ForwardIteratorConcept< │ │ │ │ +92 _ForwardIterator>) │ │ │ │ +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 exception_ptr(const exception_ptr&) _GLIBCXX_USE_NOEXCEPT; │ │ │ │ -110 │ │ │ │ -111#if __cplusplus >= 201103L │ │ │ │ -112 exception_ptr(nullptr_t) noexcept │ │ │ │ -113 : _M_exception_object(nullptr) │ │ │ │ -114 { } │ │ │ │ -115 │ │ │ │ -116 exception_ptr(exception_ptr&& __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 void (exception_ptr::*__safe_bool)(); │ │ │ │ -123 │ │ │ │ -124 // For construction from nullptr or 0. │ │ │ │ -125 exception_ptr(__safe_bool) _GLIBCXX_USE_NOEXCEPT; │ │ │ │ -126#endif │ │ │ │ -127 │ │ │ │ -128 exception_ptr& │ │ │ │ -129 operator=(const exception_ptr&) _GLIBCXX_USE_NOEXCEPT; │ │ │ │ -130 │ │ │ │ -131#if __cplusplus >= 201103L │ │ │ │ -132 exception_ptr& │ │ │ │ -133 operator=(exception_ptr&& __o) noexcept │ │ │ │ -134 { │ │ │ │ -135 exception_ptr(static_cast(__o)).swap(*this); │ │ │ │ -136 return *this; │ │ │ │ -137 } │ │ │ │ -138#endif │ │ │ │ +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(_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 ~exception_ptr() _GLIBCXX_USE_NOEXCEPT; │ │ │ │ -141 │ │ │ │ -142 void │ │ │ │ -143 swap(exception_ptr&) _GLIBCXX_USE_NOEXCEPT; │ │ │ │ +140 for (; __first != __last; ++__first) │ │ │ │ +141 __init = _GLIBCXX_MOVE_IF_20(__init) + *__first; │ │ │ │ +142 return __init; │ │ │ │ +143 } │ │ │ │ 144 │ │ │ │ -145#ifdef _GLIBCXX_EH_PTR_COMPAT │ │ │ │ -146 // Retained for compatibility with CXXABI_1.3. │ │ │ │ -147 void _M_safe_bool_dummy() _GLIBCXX_USE_NOEXCEPT │ │ │ │ -148 __attribute__ ((__const__)); │ │ │ │ -149 bool operator!() const _GLIBCXX_USE_NOEXCEPT │ │ │ │ -150 __attribute__ ((__pure__)); │ │ │ │ -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) │ │ │ │ -166 _GLIBCXX_USE_NOEXCEPT │ │ │ │ -167 { return __x._M_exception_object == __y._M_exception_object; } │ │ │ │ -168 │ │ │ │ -169 friend _GLIBCXX_EH_PTR_USED bool │ │ │ │ -170 operator!=(const exception_ptr& __x, const exception_ptr& __y) │ │ │ │ -171 _GLIBCXX_USE_NOEXCEPT │ │ │ │ -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 _GLIBCXX_USE_NOEXCEPT │ │ │ │ -177 __attribute__ ((__pure__)); │ │ │ │ -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 _e_x_c_e_p_t_i_o_n___p_t_r& __other) │ │ │ │ -189 _GLIBCXX_USE_NOEXCEPT │ │ │ │ -190 : _M_exception_object(__other._M_exception_object) │ │ │ │ -191 { │ │ │ │ -192 if (_M_exception_object) │ │ │ │ -193 _M_addref(); │ │ │ │ -194 } │ │ │ │ -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 } │ │ │ │ -203 │ │ │ │ -204 _GLIBCXX_EH_PTR_USED │ │ │ │ -205 inline _e_x_c_e_p_t_i_o_n___p_t_r& │ │ │ │ -206 exception_ptr::operator=(const _e_x_c_e_p_t_i_o_n___p_t_r& __other) │ │ │ │ -_GLIBCXX_USE_NOEXCEPT │ │ │ │ -207 { │ │ │ │ -208 _e_x_c_e_p_t_i_o_n___p_t_r(__other).swap(*this); │ │ │ │ -209 return *this; │ │ │ │ -210 } │ │ │ │ -211 │ │ │ │ -212 _GLIBCXX_EH_PTR_USED │ │ │ │ -213 inline void │ │ │ │ -214 exception_ptr::swap(_e_x_c_e_p_t_i_o_n___p_t_r &__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(_e_x_c_e_p_t_i_o_n___p_t_r& __lhs, _e_x_c_e_p_t_i_o_n___p_t_r& __rhs) │ │ │ │ -224 { __lhs.swap(__rhs); } │ │ │ │ -225 │ │ │ │ -226 /// @cond undocumented │ │ │ │ -227 template │ │ │ │ -228 inline void │ │ │ │ -229 __dest_thunk(void* __x) │ │ │ │ -230 { static_cast<_Ex*>(__x)->~_Ex(); } │ │ │ │ -231 /// @endcond │ │ │ │ +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(_InputIterator __first, _InputIterator __last, _Tp __init, │ │ │ │ +162 _BinaryOperation __binary_op) │ │ │ │ +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 │ │ │ │ +188 _GLIBCXX20_CONSTEXPR │ │ │ │ +189 inline _Tp │ │ │ │ +_1_9_0 _i_n_n_e_r___p_r_o_d_u_c_t(_InputIterator1 __first1, _InputIterator1 __last1, │ │ │ │ +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 │ │ │ │ +221 _GLIBCXX20_CONSTEXPR │ │ │ │ +222 inline _Tp │ │ │ │ +_2_2_3 _i_n_n_e_r___p_r_o_d_u_c_t(_InputIterator1 __first1, _InputIterator1 __last1, │ │ │ │ +224 _InputIterator2 __first2, _Tp __init, │ │ │ │ +225 _BinaryOperation1 __binary_op1, │ │ │ │ +226 _BinaryOperation2 __binary_op2) │ │ │ │ +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 } // namespace __exception_ptr │ │ │ │ -234 │ │ │ │ -235 /// Obtain an exception_ptr pointing to a copy of the supplied object. │ │ │ │ -236 template │ │ │ │ -237 _e_x_c_e_p_t_i_o_n___p_t_r │ │ │ │ -_2_3_8 _m_a_k_e___e_x_c_e_p_t_i_o_n___p_t_r(_Ex __ex) _GLIBCXX_USE_NOEXCEPT │ │ │ │ -239 { │ │ │ │ -240#if __cpp_exceptions && __cpp_rtti && !_GLIBCXX_HAVE_CDTOR_CALLABI \ │ │ │ │ -241 && __cplusplus >= 201103L │ │ │ │ -242 using _Ex2 = typename remove_reference<_Ex>::type; │ │ │ │ -243 void* __e = __cxxabiv1::__cxa_allocate_exception(sizeof(_Ex)); │ │ │ │ -244 (void) __cxxabiv1::__cxa_init_primary_exception( │ │ │ │ -245 __e, const_cast<_s_t_d_:_:_t_y_p_e___i_n_f_o*>(&typeid(_Ex)), │ │ │ │ -246 __exception_ptr::__dest_thunk<_Ex2>); │ │ │ │ -247 try │ │ │ │ -248 { │ │ │ │ -249 ::new (__e) _Ex2(_s_t_d_:_:_f_o_r_w_a_r_d_<___E_x_>(__ex)); │ │ │ │ -250 return _e_x_c_e_p_t_i_o_n___p_t_r(__e); │ │ │ │ -251 } │ │ │ │ -252 catch(...) │ │ │ │ -253 { │ │ │ │ -254 __cxxabiv1::__cxa_free_exception(__e); │ │ │ │ -255 return _c_u_r_r_e_n_t___e_x_c_e_p_t_i_o_n(); │ │ │ │ -256 } │ │ │ │ -257#elif __cpp_exceptions │ │ │ │ -258 try │ │ │ │ -259 { │ │ │ │ -260 throw __ex; │ │ │ │ -261 } │ │ │ │ -262 catch(...) │ │ │ │ -263 { │ │ │ │ -264 return _c_u_r_r_e_n_t___e_x_c_e_p_t_i_o_n(); │ │ │ │ -265 } │ │ │ │ -266#else // no RTTI and no exceptions │ │ │ │ -267 return _e_x_c_e_p_t_i_o_n___p_t_r(); │ │ │ │ -268#endif │ │ │ │ -269 } │ │ │ │ -270 │ │ │ │ -271#undef _GLIBCXX_EH_PTR_USED │ │ │ │ -272 │ │ │ │ -273 /// @} group exceptions │ │ │ │ -274} // namespace std │ │ │ │ -275 │ │ │ │ -276} // extern "C++" │ │ │ │ -277 │ │ │ │ -278#pragma GCC visibility pop │ │ │ │ -279 │ │ │ │ -280#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 │ │ │ │ +233 for (; __first1 != __last1; ++__first1, (void)++__first2) │ │ │ │ +234 __init = __binary_op1(_GLIBCXX_MOVE_IF_20(__init), │ │ │ │ +235 __binary_op2(*__first1, *__first2)); │ │ │ │ +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(_InputIterator __first, _InputIterator __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(_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 │ │ │ │ +296 _GLIBCXX20_CONSTEXPR │ │ │ │ +297 _OutputIterator │ │ │ │ +_2_9_8 _p_a_r_t_i_a_l___s_u_m(_InputIterator __first, _InputIterator __last, │ │ │ │ +299 _OutputIterator __result, _BinaryOperation __binary_op) │ │ │ │ +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(_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 */ │ │ │ │ +335 template │ │ │ │ +336 _GLIBCXX20_CONSTEXPR │ │ │ │ +337 _OutputIterator │ │ │ │ +_3_3_8 _a_d_j_a_c_e_n_t___d_i_f_f_e_r_e_n_c_e(_InputIterator __first, │ │ │ │ +339 _InputIterator __last, _OutputIterator __result) │ │ │ │ +340 { │ │ │ │ +341 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; │ │ │ │ +342 │ │ │ │ +343 // concept requirements │ │ │ │ +344 __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>) │ │ │ │ +345 __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator, │ │ │ │ +346 _ValueType>) │ │ │ │ +347 __glibcxx_requires_valid_range(__first, __last); │ │ │ │ +348 │ │ │ │ +349 if (__first == __last) │ │ │ │ +350 return __result; │ │ │ │ +351 _ValueType __value = *__first; │ │ │ │ +352 *__result = __value; │ │ │ │ +353 while (++__first != __last) │ │ │ │ +354 { │ │ │ │ +355 _ValueType __tmp = *__first; │ │ │ │ +356 *++__result = __tmp - _GLIBCXX_MOVE_IF_20(__value); │ │ │ │ +357 __value = _GLIBCXX_MOVE(__tmp); │ │ │ │ +358 } │ │ │ │ +359 return ++__result; │ │ │ │ +360 } │ │ │ │ +361 │ │ │ │ +362 /** │ │ │ │ +363 * @brief Return differences between adjacent values. │ │ │ │ +364 * │ │ │ │ +365 * Computes the difference between adjacent values in the range │ │ │ │ +366 * [__first,__last) using the function object @p __binary_op and writes the │ │ │ │ +367 * result to @p __result. │ │ │ │ +368 * │ │ │ │ +369 * @param __first Start of input range. │ │ │ │ +370 * @param __last End of input range. │ │ │ │ +371 * @param __result Output sum. │ │ │ │ +372 * @param __binary_op Function object. │ │ │ │ +373 * @return Iterator pointing just beyond the values written to result. │ │ │ │ +374 * │ │ │ │ +375 * _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ +376 * DR 539. partial_sum and adjacent_difference should mention requirements │ │ │ │ +377 */ │ │ │ │ +378 template │ │ │ │ +380 _GLIBCXX20_CONSTEXPR │ │ │ │ +381 _OutputIterator │ │ │ │ +_3_8_2 _a_d_j_a_c_e_n_t___d_i_f_f_e_r_e_n_c_e(_InputIterator __first, _InputIterator __last, │ │ │ │ +383 _OutputIterator __result, _BinaryOperation __binary_op) │ │ │ │ +384 { │ │ │ │ +385 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; │ │ │ │ +386 │ │ │ │ +387 // concept requirements │ │ │ │ +388 __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>) │ │ │ │ +389 __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator, │ │ │ │ +390 _ValueType>) │ │ │ │ +391 __glibcxx_requires_valid_range(__first, __last); │ │ │ │ +392 │ │ │ │ +393 if (__first == __last) │ │ │ │ +394 return __result; │ │ │ │ +395 _ValueType __value = *__first; │ │ │ │ +396 *__result = __value; │ │ │ │ +397 while (++__first != __last) │ │ │ │ +398 { │ │ │ │ +399 _ValueType __tmp = *__first; │ │ │ │ +400 *++__result = __binary_op(__tmp, _GLIBCXX_MOVE_IF_20(__value)); │ │ │ │ +401 __value = _GLIBCXX_MOVE(__tmp); │ │ │ │ +402 } │ │ │ │ +403 return ++__result; │ │ │ │ +404 } │ │ │ │ +405 │ │ │ │ +406 /// @} group numeric_ops │ │ │ │ +407 │ │ │ │ +408#undef _GLIBCXX_MOVE_IF_20 │ │ │ │ +409 │ │ │ │ +410_GLIBCXX_END_NAMESPACE_ALGO │ │ │ │ +411} // namespace std │ │ │ │ +412 │ │ │ │ +413#endif /* _STL_NUMERIC_H */ │ │ │ │ +_c_o_n_c_e_p_t___c_h_e_c_k_._h │ │ │ │ _m_o_v_e_._h │ │ │ │ -_c_+_+_c_o_n_f_i_g_._h │ │ │ │ -_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_:_:_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_3_8 │ │ │ │ -_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. │ │ │ │ +_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_8 │ │ │ │ +_s_t_d_:_:_i_o_t_a │ │ │ │ +constexpr void iota(_ForwardIterator __first, _ForwardIterator __last, _Tp │ │ │ │ +__value) │ │ │ │ +Create a range of sequentially increasing values. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___n_u_m_e_r_i_c_._h_:_8_8 │ │ │ │ +_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_:_:_t_y_p_e___i_n_f_o │ │ │ │ -Part of RTTI. │ │ │ │ -DDeeffiinniittiioonn _t_y_p_e_i_n_f_o_:_8_9 │ │ │ │ -_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_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 │ │ │ │ * bbiittss │ │ │ │ - * _e_x_c_e_p_t_i_o_n___p_t_r_._h │ │ │ │ + * _s_t_l___n_u_m_e_r_i_c_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.15.0 │ │ ├── ./usr/share/doc/gcc-11-base/libstdc++/user/a00329.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: exception_defines.h File Reference │ │ │ +libstdc++: regex.tcc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -48,94 +48,41 @@ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
exception_defines.h File Reference
│ │ │ +
regex.tcc File Reference
│ │ │
│ │ │
│ │ │ │ │ │

Go to the source code of this file.

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

│ │ │ -Macros

#define __catch(X)
#define __throw_exception_again
#define __try

│ │ │ +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. Instead, include <exception>.

│ │ │ +

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_defines.h.

│ │ │ -

Macro Definition Documentation

│ │ │ - │ │ │ -

◆ __catch

│ │ │ - │ │ │ -
│ │ │ -
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
#define __catch( X)
│ │ │ -
│ │ │ - │ │ │ -

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 in file regex.tcc.

│ │ │ +
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,24 +1,13 @@ │ │ │ │ libstdc++ │ │ │ │ -exception_defines.h File Reference │ │ │ │ +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_. │ │ │ │ -MMaaccrrooss │ │ │ │ -#define  _____c_a_t_c_h(X) │ │ │ │ -#define  _____t_h_r_o_w___e_x_c_e_p_t_i_o_n___a_g_a_i_n │ │ │ │ -#define  _____t_r_y │ │ │ │ +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. Instead, include . │ │ │ │ -Definition in file _e_x_c_e_p_t_i_o_n___d_e_f_i_n_e_s_._h. │ │ │ │ -********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ -********** _?◆_? ____ccaattcchh ********** │ │ │ │ -#define __catch ( XX ) │ │ │ │ -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. │ │ │ │ +attempt to use it directly. Instead, include . │ │ │ │ +Definition in file _r_e_g_e_x_._t_c_c. │ │ │ │ * bbiittss │ │ │ │ - * _e_x_c_e_p_t_i_o_n___d_e_f_i_n_e_s_._h │ │ │ │ + * _r_e_g_e_x_._t_c_c │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.15.0 │ │ ├── ./usr/share/doc/gcc-11-base/libstdc++/user/a00329_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: exception_defines.h Source File │ │ │ +libstdc++: regex.tcc Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -48,20 +48,20 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
exception_defines.h
│ │ │ +
regex.tcc
│ │ │
│ │ │
│ │ │ -Go to the documentation of this file.
1// -fno-exceptions Support -*- C++ -*-
│ │ │ +Go to the documentation of this file.
1// class template regex -*- C++ -*-
│ │ │
2
│ │ │ -
3// Copyright (C) 2001-2021 Free Software Foundation, Inc.
│ │ │ +
3// Copyright (C) 2013-2021 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
│ │ │ @@ -75,40 +75,699 @@ │ │ │
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
│ │ │ +
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. @headername{regex}
│ │ │ +
29 */
│ │ │ +
30
│ │ │ +
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 _RegexExecutorPolicy __policy,
│ │ │ +
48 bool __match_mode>
│ │ │ +
49 bool
│ │ │ +
50 __regex_algo_impl(_BiIter __s,
│ │ │ +
51 _BiIter __e,
│ │ │ +
52 match_results<_BiIter, _Alloc>& __m,
│ │ │ +
53 const basic_regex<_CharT, _TraitsT>& __re,
│ │ │ + │ │ │ +
55 {
│ │ │ +
56 if (__re._M_automaton == nullptr)
│ │ │ +
57 return false;
│ │ │ +
58
│ │ │ +
59 typename match_results<_BiIter, _Alloc>::_Base_type& __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 {
│ │ │ + │ │ │ +
69 __executor(__s, __e, __m, __re, __flags);
│ │ │ +
70 if (__match_mode)
│ │ │ +
71 __ret = __executor._M_match();
│ │ │ +
72 else
│ │ │ +
73 __ret = __executor._M_search();
│ │ │ +
74 }
│ │ │ +
75 else
│ │ │ +
76 {
│ │ │ + │ │ │ +
78 __executor(__s, __e, __m, __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() );
│ │ │ + │ │ │ +
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,
│ │ │ + │ │ │ +
466 const _Ch_type* __fmt, size_t __len,
│ │ │ + │ │ │ +
468 {
│ │ │ + │ │ │ +
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>
│ │ │ + │ │ │ + │ │ │ + │ │ │ +
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>
│ │ │ + │ │ │ + │ │ │ + │ │ │ +
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>
│ │ │ + │ │ │ + │ │ │ + │ │ │ +
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
│ │ │ + │ │ │ +
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
│ │ │ +
const _Facet & use_facet(const locale &__loc)
Return a facet.
│ │ │ +
_Out_iter __regex_replace(_Out_iter __out, _Bi_iter __first, _Bi_iter __last, const basic_regex< _Ch_type, _Rx_traits > &__e, const _Ch_type *__fmt, size_t __len, regex_constants::match_flag_type __flags)
Determines if there is a match between the regular expression e and all of the character sequence [fi...
│ │ │ +
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:2353
│ │ │ +
ISO C++ entities toplevel namespace is std.
│ │ │ +
ios_base & hex(ios_base &__base)
Calls base.setf(ios_base::hex, ios_base::basefield).
Definition ios_base.h:1054
│ │ │ +
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:1062
│ │ │ +
Implementation details not part of the namespace std interface.
│ │ │ +
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
│ │ │ +
Takes a regex and an input string and does the matching.
│ │ │ +
Describes aspects of a regular expression.
Definition regex.h:91
│ │ │ +
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.
│ │ │ +
Struct holding two objects of arbitrary type.
Definition stl_pair.h:213
│ │ │
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,13 +1,13 @@ │ │ │ │ libstdc++ │ │ │ │ -exception_defines.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// -fno-exceptions Support -*- C++ -*- │ │ │ │ +1// class template regex -*- C++ -*- │ │ │ │ 2 │ │ │ │ -3// Copyright (C) 2001-2021 Free Software Foundation, Inc. │ │ │ │ +3// Copyright (C) 2013-2021 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,31 +21,762 @@ │ │ │ │ 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 * @file bits/regex.tcc │ │ │ │ +27 * This is an internal header file, included by other library headers. │ │ │ │ +28 * Do not attempt to use it directly. @headername{regex} │ │ │ │ +29 */ │ │ │ │ +30 │ │ │ │ +31namespace _s_t_d _GLIBCXX_VISIBILITY(default) │ │ │ │ +32{ │ │ │ │ +33_GLIBCXX_BEGIN_NAMESPACE_VERSION │ │ │ │ +34 │ │ │ │ +35namespace _____d_e_t_a_i_l │ │ │ │ +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 │ │ │ │ +49 bool │ │ │ │ +50 __regex_algo_impl(_BiIter __s, │ │ │ │ +51 _BiIter __e, │ │ │ │ +52 match_results<_BiIter, _Alloc>& __m, │ │ │ │ +53 const basic_regex<_CharT, _TraitsT>& __re, │ │ │ │ +54 _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) │ │ │ │ +55 { │ │ │ │ +56 if (__re._M_automaton == nullptr) │ │ │ │ +57 return false; │ │ │ │ +58 │ │ │ │ +59 typename match_results<_BiIter, _Alloc>::_Base_type& __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 ___E_x_e_c_u_t_o_r_<___B_i_I_t_e_r_,_ ___A_l_l_o_c_,_ ___T_r_a_i_t_s_T_,_ _f_a_l_s_e_> │ │ │ │ +69 __executor(__s, __e, __m, __re, __flags); │ │ │ │ +70 if (__match_mode) │ │ │ │ +71 __ret = __executor._M_match(); │ │ │ │ +72 else │ │ │ │ +73 __ret = __executor._M_search(); │ │ │ │ +74 } │ │ │ │ +75 else │ │ │ │ +76 { │ │ │ │ +77 ___E_x_e_c_u_t_o_r_<___B_i_I_t_e_r_,_ ___A_l_l_o_c_,_ ___T_r_a_i_t_s_T_,_ _t_r_u_e_> │ │ │ │ +78 __executor(__s, __e, __m, __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 std::ctype __ctype_type; │ │ │ │ +128 const __ctype_type& __fctyp(_u_s_e___f_a_c_e_t_<_____c_t_y_p_e___t_y_p_e_>(_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 std::ctype __ctype_type; │ │ │ │ +284 const __ctype_type& __fctyp(_u_s_e___f_a_c_e_t_<_____c_t_y_p_e___t_y_p_e_>(_M_locale)); │ │ │ │ +285 │ │ │ │ +286 // Mappings from class name to class mask. │ │ │ │ +287 static const _p_a_i_r_<_c_o_n_s_t_ _c_h_a_r_*_,_ _c_h_a_r___c_l_a_s_s___t_y_p_e_> __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 std::ctype __ctype_type; │ │ │ │ +328 const __ctype_type& __fctyp(_u_s_e___f_a_c_e_t_<_____c_t_y_p_e___t_y_p_e_>(_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 std::basic_istringstream __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 _r_e_g_e_x___t_r_a_i_t_s_<_c_h_a_r___t_y_p_e_> __traits; │ │ │ │ +362 typedef std::ctype __ctype_type; │ │ │ │ +363 const __ctype_type& │ │ │ │ +364 __fctyp(_u_s_e___f_a_c_e_t_<_____c_t_y_p_e___t_y_p_e_>(__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 _____r_e_g_e_x___r_e_p_l_a_c_e(_Out_iter __out, _Bi_iter __first, _Bi_iter __last, │ │ │ │ +465 const _b_a_s_i_c___r_e_g_e_x_<___C_h___t_y_p_e_,_ ___R_x___t_r_a_i_t_s_>& __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 _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_> _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 _s_u_b___m_a_t_c_h_<___B_i___i_t_e_r_> __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 _r_e_g_e_x___i_t_e_r_a_t_o_r& __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 _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_>& │ │ │ │ +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 _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_>& │ │ │ │ +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 _r_e_g_e_x___t_o_k_e_n___i_t_e_r_a_t_o_r& __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 _r_e_g_e_x___t_o_k_e_n___i_t_e_r_a_t_o_r& __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 _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_>& │ │ │ │ +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 = _r_e_g_e_x___t_o_k_e_n___i_t_e_r_a_t_o_r(); │ │ │ │ +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 = _r_e_g_e_x___t_o_k_e_n___i_t_e_r_a_t_o_r(); │ │ │ │ +637 } │ │ │ │ +638 return *this; │ │ │ │ +639 } │ │ │ │ +640 │ │ │ │ +641 template │ │ │ │ +644 void │ │ │ │ +645 _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_>_:_: │ │ │ │ +646_ ___M___i_n_i_t(_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_:_:_u_s_e___f_a_c_e_t │ │ │ │ +const _Facet & use_facet(const locale &__loc) │ │ │ │ +Return a facet. │ │ │ │ +DDeeffiinniittiioonn _l_o_c_a_l_e___c_l_a_s_s_e_s_._t_c_c_:_1_3_2 │ │ │ │ +_s_t_d_:_:_____r_e_g_e_x___r_e_p_l_a_c_e │ │ │ │ +_Out_iter __regex_replace(_Out_iter __out, _Bi_iter __first, _Bi_iter __last, │ │ │ │ +const basic_regex< _Ch_type, _Rx_traits > &__e, const _Ch_type *__fmt, size_t │ │ │ │ +__len, regex_constants::match_flag_type __flags) │ │ │ │ +Determines if there is a match between the regular expression e and all of the │ │ │ │ +character sequence [fi... │ │ │ │ +_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_3_5_3 │ │ │ │ +_s_t_d │ │ │ │ +ISO C++ entities toplevel namespace is std. │ │ │ │ +_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_5_4 │ │ │ │ +_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_4_5 │ │ │ │ +_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_6_2 │ │ │ │ +_s_t_d_:_:_____d_e_t_a_i_l │ │ │ │ +Implementation details not part of the namespace std interface. │ │ │ │ +_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_9_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_8_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_2_7 │ │ │ │ +_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_7_3 │ │ │ │ +_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_3_6 │ │ │ │ +_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_7_4 │ │ │ │ +_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_2_1 │ │ │ │ +_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_8_2 │ │ │ │ +_s_t_d_:_:_b_a_s_i_c___r_e_g_e_x │ │ │ │ +DDeeffiinniittiioonn _r_e_g_e_x_._h_:_4_0_0 │ │ │ │ +_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_:_:_____d_e_t_a_i_l_:_:___E_x_e_c_u_t_o_r │ │ │ │ +Takes a regex and an input string and does the matching. │ │ │ │ +DDeeffiinniittiioonn _r_e_g_e_x___e_x_e_c_u_t_o_r_._h_:_5_3 │ │ │ │ +_s_t_d_:_:_r_e_g_e_x___t_r_a_i_t_s │ │ │ │ +Describes aspects of a regular expression. │ │ │ │ +DDeeffiinniittiioonn _r_e_g_e_x_._h_:_9_1 │ │ │ │ +_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_:_:_s_u_b___m_a_t_c_h │ │ │ │ +DDeeffiinniittiioonn _r_e_g_e_x_._h_:_8_9_2 │ │ │ │ +_s_t_d_:_:_r_e_g_e_x___i_t_e_r_a_t_o_r │ │ │ │ +DDeeffiinniittiioonn _r_e_g_e_x_._h_:_2_6_6_6 │ │ │ │ +_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 │ │ │ │ +DDeeffiinniittiioonn _r_e_g_e_x_._h_:_2_7_8_3 │ │ │ │ +_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_:_:_p_a_i_r │ │ │ │ +Struct holding two objects of arbitrary type. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___p_a_i_r_._h_:_2_1_3 │ │ │ │ * bbiittss │ │ │ │ - * _e_x_c_e_p_t_i_o_n___d_e_f_i_n_e_s_._h │ │ │ │ + * _r_e_g_e_x_._t_c_c │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.15.0 │ │ ├── ./usr/share/doc/gcc-11-base/libstdc++/user/a00332.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: exception.h File Reference │ │ │ +libstdc++: regex_constants.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -48,44 +48,125 @@ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
exception.h File Reference
│ │ │ +
regex_constants.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │

Go to the source code of this file.

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

│ │ │ -Classes

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

│ │ │ Namespaces

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

│ │ │ +5.1 Regular Expression Syntax Options

constexpr syntax_option_type std::regex_constants::__multiline
constexpr syntax_option_type std::regex_constants::__polynomial
enum  std::regex_constants::__syntax_option {
│ │ │ +  _S_icase │ │ │ +, _S_nosubs │ │ │ +, _S_optimize │ │ │ +, _S_collate │ │ │ +,
│ │ │ +  _S_ECMAScript │ │ │ +, _S_basic │ │ │ +, _S_extended │ │ │ +, _S_awk │ │ │ +,
│ │ │ +  _S_grep │ │ │ +, _S_egrep │ │ │ +, _S_polynomial │ │ │ +, _S_multiline │ │ │ +
│ │ │ + }
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)
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)
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)
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
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ +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.

│ │ │ +
enum  std::regex_constants::__match_flag {
│ │ │ +  _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::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
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)
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)
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)
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.

│ │ │ +

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 in file exception.h.

│ │ │ +

Definition in file regex_constants.h.

│ │ │
│ │ │
│ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,14 +1,92 @@ │ │ │ │ libstdc++ │ │ │ │ -exception.h File Reference │ │ │ │ +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_. │ │ │ │ -CCllaasssseess │ │ │ │ -class   _s_t_d_:_:_e_x_c_e_p_t_i_o_n │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _s_t_d │ │ │ │ +namespace   _s_t_d_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s │ │ │ │ +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 │ │ │ │ +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 │ │ │ │ + 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 { │ │ │ │ +   __SS__iiccaassee , __SS__nnoossuubbss , __SS__ooppttiimmiizzee , __SS__ccoollllaattee │ │ │ │ + , │ │ │ │ +   __SS__EECCMMAASSccrriipptt , __SS__bbaassiicc , __SS__eexxtteennddeedd , __SS__aawwkk │ │ │ │ + , │ │ │ │ +   __SS__ggrreepp , __SS__eeggrreepp , __SS__ppoollyynnoommiiaall , │ │ │ │ + __SS__mmuullttiilliinnee │ │ │ │ + } │ │ │ │ +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 │ │ │ │ +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) │ │ │ │ + _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) │ │ │ │ + _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) │ │ │ │ + _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 │ │ │ │ +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. │ │ │ │ + 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 { │ │ │ │ +   __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_:_:_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 │ │ │ │ +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) │ │ │ │ + _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) │ │ │ │ + _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) │ │ │ │ + _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 _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. │ │ │ │ * bbiittss │ │ │ │ - * _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.15.0 │ │ ├── ./usr/share/doc/gcc-11-base/libstdc++/user/a00332_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: exception.h Source File │ │ │ +libstdc++: regex_constants.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -48,114 +48,527 @@ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
exception.h
│ │ │ +
regex_constants.h
│ │ │
│ │ │
│ │ │ -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-2021 Free Software Foundation, Inc.
│ │ │ +
3// Copyright (C) 2010-2021 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
│ │ │ -
27 * This is an internal header file, included by other library headers.
│ │ │ -
28 * Do not attempt to use it directly.
│ │ │ -
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 */
│ │ │ -
│ │ │ -
61 class exception
│ │ │ -
62 {
│ │ │ -
63 public:
│ │ │ -
64 exception() _GLIBCXX_NOTHROW { }
│ │ │ -
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
│ │ │ - │ │ │ +
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 */
│ │ │ +
43
│ │ │ +
44/**
│ │ │ +
45 * @namespace std::regex_constants
│ │ │ +
46 * @brief ISO C++ 2011 namespace for options and flags used with std::regex
│ │ │ +
47 */
│ │ │ +
48namespace regex_constants
│ │ │ +
49{
│ │ │ +
50 /**
│ │ │ +
51 * @name 5.1 Regular Expression Syntax Options
│ │ │ +
52 */
│ │ │ +
53 ///@{
│ │ │ +
│ │ │ + │ │ │ +
55 {
│ │ │ +
56 _S_icase,
│ │ │ +
57 _S_nosubs,
│ │ │ +
58 _S_optimize,
│ │ │ +
59 _S_collate,
│ │ │ +
60 _S_ECMAScript,
│ │ │ +
61 _S_basic,
│ │ │ +
62 _S_extended,
│ │ │ +
63 _S_awk,
│ │ │ +
64 _S_grep,
│ │ │ +
65 _S_egrep,
│ │ │ +
66 _S_polynomial,
│ │ │ +
67 _S_multiline
│ │ │ +
68 };
│ │ │ +
│ │ │ +
69
│ │ │ +
70 /**
│ │ │ +
71 * @brief This is a bitmask type indicating how to interpret the regex.
│ │ │ +
72 *
│ │ │ +
73 * The @c syntax_option_type is implementation defined but it is valid to
│ │ │ +
74 * perform bitwise operations on these values and expect the right thing to
│ │ │ +
75 * happen.
│ │ │ +
76 *
│ │ │ +
77 * A valid value of type syntax_option_type shall have exactly one of the
│ │ │ +
78 * elements @c ECMAScript, @c basic, @c extended, @c awk, @c grep, @c egrep
│ │ │ +
79 * %set.
│ │ │ +
80 */
│ │ │ +
81 enum syntax_option_type : unsigned int { };
│ │ │ +
82
│ │ │ +
83 /**
│ │ │ +
84 * Specifies that the matching of regular expressions against a character
│ │ │ +
85 * sequence shall be performed without regard to case.
│ │ │ +
86 */
│ │ │ +
87 _GLIBCXX17_INLINE constexpr syntax_option_type icase =
│ │ │ +
88 static_cast<syntax_option_type>(1 << _S_icase);
│ │ │ +
89
│ │ │ +
90 /**
│ │ │ +
91 * Specifies that when a regular expression is matched against a character
│ │ │ +
92 * container sequence, no sub-expression matches are to be stored in the
│ │ │ +
93 * supplied match_results structure.
│ │ │ +
94 */
│ │ │ +
95 _GLIBCXX17_INLINE constexpr syntax_option_type nosubs =
│ │ │ +
96 static_cast<syntax_option_type>(1 << _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 */
│ │ │ +
104 _GLIBCXX17_INLINE constexpr syntax_option_type optimize =
│ │ │ +
105 static_cast<syntax_option_type>(1 << _S_optimize);
│ │ │ +
106
│ │ │ +
107 /**
│ │ │ +
108 * Specifies that character ranges of the form [a-b] should be locale
│ │ │ +
109 * sensitive.
│ │ │ +
110 */
│ │ │ +
111 _GLIBCXX17_INLINE constexpr syntax_option_type collate =
│ │ │ +
112 static_cast<syntax_option_type>(1 << _S_collate);
│ │ │ +
113
│ │ │ +
114 /**
│ │ │ +
115 * Specifies that the grammar recognized by the regular expression engine is
│ │ │ +
116 * that used by ECMAScript in ECMA-262 [Ecma International, ECMAScript
│ │ │ +
117 * Language Specification, Standard Ecma-262, third edition, 1999], as
│ │ │ +
118 * modified in section [28.13]. This grammar is similar to that defined
│ │ │ +
119 * in the PERL scripting language but extended with elements found in the
│ │ │ +
120 * POSIX regular expression grammar.
│ │ │ +
121 */
│ │ │ +
122 _GLIBCXX17_INLINE constexpr syntax_option_type ECMAScript =
│ │ │ +
123 static_cast<syntax_option_type>(1 << _S_ECMAScript);
│ │ │ +
124
│ │ │ +
125 /**
│ │ │ +
126 * Specifies that the grammar recognized by the regular expression engine is
│ │ │ +
127 * that used by POSIX basic regular expressions in IEEE Std 1003.1-2001,
│ │ │ +
128 * Portable Operating System Interface (POSIX), Base Definitions and
│ │ │ +
129 * Headers, Section 9, Regular Expressions [IEEE, Information Technology --
│ │ │ +
130 * Portable Operating System Interface (POSIX), IEEE Standard 1003.1-2001].
│ │ │ +
131 */
│ │ │ +
132 _GLIBCXX17_INLINE constexpr syntax_option_type basic =
│ │ │ +
133 static_cast<syntax_option_type>(1 << _S_basic);
│ │ │ +
134
│ │ │ +
135 /**
│ │ │ +
136 * Specifies that the grammar recognized by the regular expression engine is
│ │ │ +
137 * that used by POSIX extended regular expressions in IEEE Std 1003.1-2001,
│ │ │ +
138 * Portable Operating System Interface (POSIX), Base Definitions and
│ │ │ +
139 * Headers, Section 9, Regular Expressions.
│ │ │ +
140 */
│ │ │ +
141 _GLIBCXX17_INLINE constexpr syntax_option_type extended =
│ │ │ +
142 static_cast<syntax_option_type>(1 << _S_extended);
│ │ │ +
143
│ │ │ +
144 /**
│ │ │ +
145 * Specifies that the grammar recognized by the regular expression engine is
│ │ │ +
146 * that used by POSIX utility awk in IEEE Std 1003.1-2001. This option is
│ │ │ +
147 * identical to syntax_option_type extended, except that C-style escape
│ │ │ +
148 * sequences are supported. These sequences are:
│ │ │ +
149 * \\\\, \\a, \\b, \\f, \\n, \\r, \\t , \\v, \\&apos,, &apos,,
│ │ │ +
150 * and \\ddd (where ddd is one, two, or three octal digits).
│ │ │ +
151 */
│ │ │ +
152 _GLIBCXX17_INLINE constexpr syntax_option_type awk =
│ │ │ +
153 static_cast<syntax_option_type>(1 << _S_awk);
│ │ │ +
154
│ │ │ +
155 /**
│ │ │ +
156 * Specifies that the grammar recognized by the regular expression engine is
│ │ │ +
157 * that used by POSIX utility grep in IEEE Std 1003.1-2001. This option is
│ │ │ +
158 * identical to syntax_option_type basic, except that newlines are treated
│ │ │ +
159 * as whitespace.
│ │ │ +
160 */
│ │ │ +
161 _GLIBCXX17_INLINE constexpr syntax_option_type grep =
│ │ │ +
162 static_cast<syntax_option_type>(1 << _S_grep);
│ │ │ +
163
│ │ │ +
164 /**
│ │ │ +
165 * Specifies that the grammar recognized by the regular expression engine is
│ │ │ +
166 * that used by POSIX utility grep when given the -E option in
│ │ │ +
167 * IEEE Std 1003.1-2001. This option is identical to syntax_option_type
│ │ │ +
168 * extended, except that newlines are treated as whitespace.
│ │ │ +
169 */
│ │ │ +
170 _GLIBCXX17_INLINE constexpr syntax_option_type egrep =
│ │ │ +
171 static_cast<syntax_option_type>(1 << _S_egrep);
│ │ │ +
172
│ │ │ +
173#if __cplusplus >= 201703L || !defined __STRICT_ANSI__
│ │ │ +
174 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ +
175 // 2503. multiline option should be added to syntax_option_type
│ │ │ +
176 /**
│ │ │ +
177 * Specifies that the `^` anchor matches at the beginning of a line,
│ │ │ +
178 * and the `$` anchor matches at the end of a line, not only at the
│ │ │ +
179 * beginning/end of the input.
│ │ │ +
180 * Valid for the ECMAScript syntax, ignored otherwise.
│ │ │ +
181 * @since C++17
│ │ │ +
182 */
│ │ │ +
183 _GLIBCXX17_INLINE constexpr syntax_option_type multiline =
│ │ │ +
184 static_cast<syntax_option_type>(1 << _S_multiline);
│ │ │ +
185#endif
│ │ │ +
186
│ │ │ +
187 /// Extension: Equivalent to regex_constants::multiline for C++11 and C++14.
│ │ │ +
188 _GLIBCXX17_INLINE constexpr syntax_option_type __multiline =
│ │ │ +
189 static_cast<syntax_option_type>(1 << _S_multiline);
│ │ │ +
190
│ │ │ +
191 /**
│ │ │ +
192 * Extension: Ensure both space complexity of compiled regex and
│ │ │ +
193 * time complexity execution are not exponential.
│ │ │ +
194 * If specified in a regex with back-references, the exception
│ │ │ +
195 * regex_constants::error_complexity will be thrown.
│ │ │ +
196 */
│ │ │ +
197 _GLIBCXX17_INLINE constexpr syntax_option_type __polynomial =
│ │ │ +
198 static_cast<syntax_option_type>(1 << _S_polynomial);
│ │ │ +
199
│ │ │ +
200 constexpr inline syntax_option_type
│ │ │ +
│ │ │ + │ │ │ +
202 {
│ │ │ +
203 return (syntax_option_type)(static_cast<unsigned int>(__a)
│ │ │ +
204 & static_cast<unsigned int>(__b));
│ │ │ +
205 }
│ │ │ +
│ │ │ +
206
│ │ │ +
207 constexpr inline syntax_option_type
│ │ │ +
│ │ │ + │ │ │ +
209 {
│ │ │ +
210 return (syntax_option_type)(static_cast<unsigned int>(__a)
│ │ │ +
211 | static_cast<unsigned int>(__b));
│ │ │ +
212 }
│ │ │ +
│ │ │ +
213
│ │ │ +
214 constexpr inline syntax_option_type
│ │ │ +
│ │ │ + │ │ │ +
216 {
│ │ │ +
217 return (syntax_option_type)(static_cast<unsigned int>(__a)
│ │ │ +
218 ^ static_cast<unsigned int>(__b));
│ │ │ +
219 }
│ │ │ +
│ │ │ +
220
│ │ │ +
221 constexpr inline syntax_option_type
│ │ │ +
│ │ │ + │ │ │ +
223 { return (syntax_option_type)(~static_cast<unsigned int>(__a)); }
│ │ │ +
│ │ │ +
224
│ │ │ +
225 inline syntax_option_type&
│ │ │ +
│ │ │ + │ │ │ +
227 { return __a = __a & __b; }
│ │ │ +
│ │ │ +
228
│ │ │ +
229 inline syntax_option_type&
│ │ │ +
│ │ │ + │ │ │ +
231 { return __a = __a | __b; }
│ │ │ +
│ │ │ +
232
│ │ │ +
233 inline syntax_option_type&
│ │ │ +
│ │ │ + │ │ │ +
235 { return __a = __a ^ __b; }
│ │ │ +
│ │ │ +
236
│ │ │ +
237 ///@}
│ │ │ +
238
│ │ │ +
239 /**
│ │ │ +
240 * @name 5.2 Matching Rules
│ │ │ +
241 *
│ │ │ +
242 * Matching a regular expression against a sequence of characters [first,
│ │ │ +
243 * last) proceeds according to the rules of the grammar specified for the
│ │ │ +
244 * regular expression object, modified according to the effects listed
│ │ │ +
245 * below for any bitmask elements set.
│ │ │ +
246 *
│ │ │ +
247 */
│ │ │ +
248 ///@{
│ │ │ +
249
│ │ │ +
│ │ │ + │ │ │ +
251 {
│ │ │ +
252 _S_not_bol,
│ │ │ +
253 _S_not_eol,
│ │ │ +
254 _S_not_bow,
│ │ │ +
255 _S_not_eow,
│ │ │ +
256 _S_any,
│ │ │ +
257 _S_not_null,
│ │ │ +
258 _S_continuous,
│ │ │ +
259 _S_prev_avail,
│ │ │ +
260 _S_sed,
│ │ │ +
261 _S_no_copy,
│ │ │ +
262 _S_first_only,
│ │ │ +
263 _S_match_flag_last
│ │ │ +
264 };
│ │ │ +
│ │ │ +
265
│ │ │ +
266 /**
│ │ │ +
267 * @brief This is a bitmask type indicating regex matching rules.
│ │ │ +
268 *
│ │ │ +
269 * The @c match_flag_type is implementation defined but it is valid to
│ │ │ +
270 * perform bitwise operations on these values and expect the right thing to
│ │ │ +
271 * happen.
│ │ │ +
272 */
│ │ │ +
273 enum match_flag_type : unsigned int { };
│ │ │ +
274
│ │ │ +
275 /**
│ │ │ +
276 * The default matching rules.
│ │ │ +
277 */
│ │ │ +
278 _GLIBCXX17_INLINE constexpr match_flag_type match_default =
│ │ │ +
279 static_cast<match_flag_type>(0);
│ │ │ +
280
│ │ │ +
281 /**
│ │ │ +
282 * The first character in the sequence [first, last) is treated as though it
│ │ │ +
283 * is not at the beginning of a line, so the character (^) in the regular
│ │ │ +
284 * expression shall not match [first, first).
│ │ │ +
285 */
│ │ │ +
286 _GLIBCXX17_INLINE constexpr match_flag_type match_not_bol =
│ │ │ +
287 static_cast<match_flag_type>(1 << _S_not_bol);
│ │ │ +
288
│ │ │ +
289 /**
│ │ │ +
290 * The last character in the sequence [first, last) is treated as though it
│ │ │ +
291 * is not at the end of a line, so the character ($) in the regular
│ │ │ +
292 * expression shall not match [last, last).
│ │ │ +
293 */
│ │ │ +
294 _GLIBCXX17_INLINE constexpr match_flag_type match_not_eol =
│ │ │ +
295 static_cast<match_flag_type>(1 << _S_not_eol);
│ │ │ +
296
│ │ │ +
297 /**
│ │ │ +
298 * The expression \\b is not matched against the sub-sequence
│ │ │ +
299 * [first,first).
│ │ │ +
300 */
│ │ │ +
301 _GLIBCXX17_INLINE constexpr match_flag_type match_not_bow =
│ │ │ +
302 static_cast<match_flag_type>(1 << _S_not_bow);
│ │ │ +
303
│ │ │ +
304 /**
│ │ │ +
305 * The expression \\b should not be matched against the sub-sequence
│ │ │ +
306 * [last,last).
│ │ │ +
307 */
│ │ │ +
308 _GLIBCXX17_INLINE constexpr match_flag_type match_not_eow =
│ │ │ +
309 static_cast<match_flag_type>(1 << _S_not_eow);
│ │ │ +
310
│ │ │ +
311 /**
│ │ │ +
312 * If more than one match is possible then any match is an acceptable
│ │ │ +
313 * result.
│ │ │ +
314 */
│ │ │ +
315 _GLIBCXX17_INLINE constexpr match_flag_type match_any =
│ │ │ +
316 static_cast<match_flag_type>(1 << _S_any);
│ │ │ +
317
│ │ │ +
318 /**
│ │ │ +
319 * The expression does not match an empty sequence.
│ │ │ +
320 */
│ │ │ +
321 _GLIBCXX17_INLINE constexpr match_flag_type match_not_null =
│ │ │ +
322 static_cast<match_flag_type>(1 << _S_not_null);
│ │ │ +
323
│ │ │ +
324 /**
│ │ │ +
325 * The expression only matches a sub-sequence that begins at first .
│ │ │ +
326 */
│ │ │ +
327 _GLIBCXX17_INLINE constexpr match_flag_type match_continuous =
│ │ │ +
328 static_cast<match_flag_type>(1 << _S_continuous);
│ │ │ +
329
│ │ │ +
330 /**
│ │ │ +
331 * `--first` is a valid iterator position. When this flag is set then the
│ │ │ +
332 * flags `match_not_bol` and `match_not_bow` are ignored by the algorithms
│ │ │ +
333 * `regex_match`, `regex_search`, and `regex_replace`, and by the iterators
│ │ │ +
334 * `regex_iterator` and `regex_token_iterator`.
│ │ │ +
335 */
│ │ │ +
336 _GLIBCXX17_INLINE constexpr match_flag_type match_prev_avail =
│ │ │ +
337 static_cast<match_flag_type>(1 << _S_prev_avail);
│ │ │ +
338
│ │ │ +
339 /**
│ │ │ +
340 * When a regular expression match is to be replaced by a new string, the
│ │ │ +
341 * new string is constructed using the rules used by the ECMAScript replace
│ │ │ +
342 * function in ECMA- 262 [Ecma International, ECMAScript Language
│ │ │ +
343 * Specification, Standard Ecma-262, third edition, 1999], part 15.5.4.11
│ │ │ +
344 * String.prototype.replace. In addition, during search and replace
│ │ │ +
345 * operations all non-overlapping occurrences of the regular expression
│ │ │ +
346 * are located and replaced, and sections of the input that did not match
│ │ │ +
347 * the expression are copied unchanged to the output string.
│ │ │ +
348 *
│ │ │ +
349 * Format strings (from ECMA-262 [15.5.4.11]):
│ │ │ +
350 * @li $$ The dollar-sign itself ($)
│ │ │ +
351 * @li $& The matched substring.
│ │ │ +
352 * @li $` The portion of @a string that precedes the matched substring.
│ │ │ +
353 * This would be match_results::prefix().
│ │ │ +
354 * @li $' The portion of @a string that follows the matched substring.
│ │ │ +
355 * This would be match_results::suffix().
│ │ │ +
356 * @li $n The nth capture, where n is in [1,9] and $n is not followed by a
│ │ │ +
357 * decimal digit. If n <= match_results::size() and the nth capture
│ │ │ +
358 * is undefined, use the empty string instead. If n >
│ │ │ +
359 * match_results::size(), the result is implementation-defined.
│ │ │ +
360 * @li $nn The nnth capture, where nn is a two-digit decimal number on
│ │ │ +
361 * [01, 99]. If nn <= match_results::size() and the nth capture is
│ │ │ +
362 * undefined, use the empty string instead. If
│ │ │ +
363 * nn > match_results::size(), the result is implementation-defined.
│ │ │ +
364 */
│ │ │ +
365 _GLIBCXX17_INLINE constexpr match_flag_type format_default =
│ │ │ +
366 static_cast<match_flag_type>(0);
│ │ │ +
367
│ │ │ +
368 /**
│ │ │ +
369 * When a regular expression match is to be replaced by a new string, the
│ │ │ +
370 * new string is constructed using the rules used by the POSIX sed utility
│ │ │ +
371 * in IEEE Std 1003.1- 2001 [IEEE, Information Technology -- Portable
│ │ │ +
372 * Operating System Interface (POSIX), IEEE Standard 1003.1-2001].
│ │ │ +
373 */
│ │ │ +
374 _GLIBCXX17_INLINE constexpr match_flag_type format_sed =
│ │ │ +
375 static_cast<match_flag_type>(1 << _S_sed);
│ │ │ +
376
│ │ │ +
377 /**
│ │ │ +
378 * During a search and replace operation, sections of the character
│ │ │ +
379 * container sequence being searched that do not match the regular
│ │ │ +
380 * expression shall not be copied to the output string.
│ │ │ +
381 */
│ │ │ +
382 _GLIBCXX17_INLINE constexpr match_flag_type format_no_copy =
│ │ │ +
383 static_cast<match_flag_type>(1 << _S_no_copy);
│ │ │ +
384
│ │ │ +
385 /**
│ │ │ +
386 * When specified during a search and replace operation, only the first
│ │ │ +
387 * occurrence of the regular expression shall be replaced.
│ │ │ +
388 */
│ │ │ +
389 _GLIBCXX17_INLINE constexpr match_flag_type format_first_only =
│ │ │ +
390 static_cast<match_flag_type>(1 << _S_first_only);
│ │ │ +
391
│ │ │ +
392 constexpr inline match_flag_type
│ │ │ +
│ │ │ + │ │ │ +
394 {
│ │ │ +
395 return (match_flag_type)(static_cast<unsigned int>(__a)
│ │ │ +
396 & static_cast<unsigned int>(__b));
│ │ │ +
397 }
│ │ │ +
│ │ │ +
398
│ │ │ +
399 constexpr inline match_flag_type
│ │ │ +
│ │ │ + │ │ │ +
401 {
│ │ │ +
402 return (match_flag_type)(static_cast<unsigned int>(__a)
│ │ │ +
403 | static_cast<unsigned int>(__b));
│ │ │ +
404 }
│ │ │ +
│ │ │ +
405
│ │ │ +
406 constexpr inline match_flag_type
│ │ │ +
│ │ │ + │ │ │ +
408 {
│ │ │ +
409 return (match_flag_type)(static_cast<unsigned int>(__a)
│ │ │ +
410 ^ static_cast<unsigned int>(__b));
│ │ │ +
411 }
│ │ │ +
│ │ │ +
412
│ │ │ +
413 constexpr inline match_flag_type
│ │ │ +
│ │ │ + │ │ │ +
415 { return (match_flag_type)(~static_cast<unsigned int>(__a)); }
│ │ │ +
│ │ │ +
416
│ │ │ +
417 inline match_flag_type&
│ │ │ +
│ │ │ + │ │ │ +
419 { return __a = __a & __b; }
│ │ │ +
│ │ │ +
420
│ │ │ +
421 inline match_flag_type&
│ │ │ +
│ │ │ + │ │ │ +
423 { return __a = __a | __b; }
│ │ │ +
│ │ │ +
424
│ │ │ +
425 inline match_flag_type&
│ │ │ +
│ │ │ + │ │ │ +
427 { return __a = __a ^ __b; }
│ │ │ +
│ │ │ +
428
│ │ │ +
429 ///@}
│ │ │ +
430} // namespace regex_constants
│ │ │ +
431/// @} group regex
│ │ │ +
432
│ │ │ +
433_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ +
434} // namespace std
│ │ │ +
435
│ │ │
ISO C++ entities toplevel namespace is std.
│ │ │ -
virtual const char * what() const noexcept
│ │ │ +
ISO C++ 2011 namespace for options and flags used with std::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 collate
│ │ │ +
syntax_option_type & operator&=(syntax_option_type &__a, syntax_option_type __b)
This is a bitmask type indicating how to interpret the regex.
│ │ │ +
__match_flag
This is a bitmask type indicating regex matching rules.
│ │ │ +
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
│ │ │ +
__syntax_option
This is a bitmask type indicating how to interpret the regex.
│ │ │ +
constexpr match_flag_type match_default
│ │ │ +
constexpr match_flag_type format_first_only
│ │ │ +
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 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.
│ │ │ +
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 icase
│ │ │ +
constexpr syntax_option_type optimize
│ │ │ +
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 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
│ │ │
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,98 +1,572 @@ │ │ │ │ libstdc++ │ │ │ │ -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// Exception Handling support header for -*- C++ -*- │ │ │ │ +1// class template regex -*- C++ -*- │ │ │ │ 2 │ │ │ │ -3// Copyright (C) 2016-2021 Free Software Foundation, Inc. │ │ │ │ +3// Copyright (C) 2010-2021 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 │ │ │ │ -27 * This is an internal header file, included by other library headers. │ │ │ │ -28 * Do not attempt to use it directly. │ │ │ │ -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 exception │ │ │ │ -62 { │ │ │ │ -63 public: │ │ │ │ -64 exception() _GLIBCXX_NOTHROW { } │ │ │ │ -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* │ │ │ │ -_7_6 _w_h_a_t() const _GLIBCXX_TXN_SAFE_DYN _GLIBCXX_NOTHROW; │ │ │ │ -77 }; │ │ │ │ -78 │ │ │ │ -79 /// @} │ │ │ │ -80 │ │ │ │ -81} // namespace std │ │ │ │ +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 */ │ │ │ │ +43 │ │ │ │ +44/** │ │ │ │ +_4_5 * @namespace std::regex_constants │ │ │ │ +46 * @brief ISO C++ 2011 namespace for options and flags used with std::regex │ │ │ │ +47 */ │ │ │ │ +48namespace _r_e_g_e_x___c_o_n_s_t_a_n_t_s │ │ │ │ +49{ │ │ │ │ +50 /** │ │ │ │ +51 * @name 5.1 Regular Expression Syntax Options │ │ │ │ +52 */ │ │ │ │ +53 ///@{ │ │ │ │ +_5_4 enum _____s_y_n_t_a_x___o_p_t_i_o_n │ │ │ │ +55 { │ │ │ │ +56 _S_icase, │ │ │ │ +57 _S_nosubs, │ │ │ │ +58 _S_optimize, │ │ │ │ +59 _S_collate, │ │ │ │ +60 _S_ECMAScript, │ │ │ │ +61 _S_basic, │ │ │ │ +62 _S_extended, │ │ │ │ +63 _S_awk, │ │ │ │ +64 _S_grep, │ │ │ │ +65 _S_egrep, │ │ │ │ +66 _S_polynomial, │ │ │ │ +67 _S_multiline │ │ │ │ +68 }; │ │ │ │ +69 │ │ │ │ +70 /** │ │ │ │ +71 * @brief This is a bitmask type indicating how to interpret the regex. │ │ │ │ +72 * │ │ │ │ +73 * The @c syntax_option_type is implementation defined but it is valid to │ │ │ │ +74 * perform bitwise operations on these values and expect the right thing to │ │ │ │ +75 * happen. │ │ │ │ +76 * │ │ │ │ +77 * A valid value of type syntax_option_type shall have exactly one of the │ │ │ │ +78 * elements @c ECMAScript, @c basic, @c extended, @c awk, @c grep, @c egrep │ │ │ │ +79 * %set. │ │ │ │ +80 */ │ │ │ │ +_8_1 enum _s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e : unsigned int { }; │ │ │ │ 82 │ │ │ │ -83} │ │ │ │ -84 │ │ │ │ -85#pragma GCC visibility pop │ │ │ │ -86 │ │ │ │ -87#endif │ │ │ │ -_c_+_+_c_o_n_f_i_g_._h │ │ │ │ +83 /** │ │ │ │ +84 * Specifies that the matching of regular expressions against a character │ │ │ │ +85 * sequence shall be performed without regard to case. │ │ │ │ +86 */ │ │ │ │ +_8_7 _GLIBCXX17_INLINE constexpr _s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e _i_c_a_s_e = │ │ │ │ +88 static_cast<_s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e>(1 << _S_icase); │ │ │ │ +89 │ │ │ │ +90 /** │ │ │ │ +91 * Specifies that when a regular expression is matched against a character │ │ │ │ +92 * container sequence, no sub-expression matches are to be stored in the │ │ │ │ +93 * supplied match_results structure. │ │ │ │ +94 */ │ │ │ │ +_9_5 _GLIBCXX17_INLINE constexpr _s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e _n_o_s_u_b_s = │ │ │ │ +96 static_cast<_s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e>(1 << _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 _GLIBCXX17_INLINE 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 = │ │ │ │ +105 static_cast<_s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e>(1 << _S_optimize); │ │ │ │ +106 │ │ │ │ +107 /** │ │ │ │ +108 * Specifies that character ranges of the form [a-b] should be locale │ │ │ │ +109 * sensitive. │ │ │ │ +110 */ │ │ │ │ +_1_1_1 _GLIBCXX17_INLINE constexpr _s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e _c_o_l_l_a_t_e = │ │ │ │ +112 static_cast<_s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e>(1 << _S_collate); │ │ │ │ +113 │ │ │ │ +114 /** │ │ │ │ +115 * Specifies that the grammar recognized by the regular expression engine is │ │ │ │ +116 * that used by ECMAScript in ECMA-262 [Ecma International, ECMAScript │ │ │ │ +117 * Language Specification, Standard Ecma-262, third edition, 1999], as │ │ │ │ +118 * modified in section [28.13]. This grammar is similar to that defined │ │ │ │ +119 * in the PERL scripting language but extended with elements found in the │ │ │ │ +120 * POSIX regular expression grammar. │ │ │ │ +121 */ │ │ │ │ +_1_2_2 _GLIBCXX17_INLINE 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 = │ │ │ │ +123 static_cast<_s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e>(1 << _S_ECMAScript); │ │ │ │ +124 │ │ │ │ +125 /** │ │ │ │ +126 * Specifies that the grammar recognized by the regular expression engine is │ │ │ │ +127 * that used by POSIX basic regular expressions in IEEE Std 1003.1-2001, │ │ │ │ +128 * Portable Operating System Interface (POSIX), Base Definitions and │ │ │ │ +129 * Headers, Section 9, Regular Expressions [IEEE, Information Technology -- │ │ │ │ +130 * Portable Operating System Interface (POSIX), IEEE Standard 1003.1-2001]. │ │ │ │ +131 */ │ │ │ │ +_1_3_2 _GLIBCXX17_INLINE constexpr _s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e _b_a_s_i_c = │ │ │ │ +133 static_cast<_s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e>(1 << _S_basic); │ │ │ │ +134 │ │ │ │ +135 /** │ │ │ │ +136 * Specifies that the grammar recognized by the regular expression engine is │ │ │ │ +137 * that used by POSIX extended regular expressions in IEEE Std 1003.1-2001, │ │ │ │ +138 * Portable Operating System Interface (POSIX), Base Definitions and │ │ │ │ +139 * Headers, Section 9, Regular Expressions. │ │ │ │ +140 */ │ │ │ │ +_1_4_1 _GLIBCXX17_INLINE 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 = │ │ │ │ +142 static_cast<_s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e>(1 << _S_extended); │ │ │ │ +143 │ │ │ │ +144 /** │ │ │ │ +145 * Specifies that the grammar recognized by the regular expression engine is │ │ │ │ +146 * that used by POSIX utility awk in IEEE Std 1003.1-2001. This option is │ │ │ │ +147 * identical to syntax_option_type extended, except that C-style escape │ │ │ │ +148 * sequences are supported. These sequences are: │ │ │ │ +149 * \\\\, \\a, \\b, \\f, \\n, \\r, \\t , \\v, \\&apos,, &apos,, │ │ │ │ +150 * and \\ddd (where ddd is one, two, or three octal digits). │ │ │ │ +151 */ │ │ │ │ +_1_5_2 _GLIBCXX17_INLINE constexpr _s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e _a_w_k = │ │ │ │ +153 static_cast<_s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e>(1 << _S_awk); │ │ │ │ +154 │ │ │ │ +155 /** │ │ │ │ +156 * Specifies that the grammar recognized by the regular expression engine is │ │ │ │ +157 * that used by POSIX utility grep in IEEE Std 1003.1-2001. This option is │ │ │ │ +158 * identical to syntax_option_type basic, except that newlines are treated │ │ │ │ +159 * as whitespace. │ │ │ │ +160 */ │ │ │ │ +_1_6_1 _GLIBCXX17_INLINE constexpr _s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e _g_r_e_p = │ │ │ │ +162 static_cast<_s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e>(1 << _S_grep); │ │ │ │ +163 │ │ │ │ +164 /** │ │ │ │ +165 * Specifies that the grammar recognized by the regular expression engine is │ │ │ │ +166 * that used by POSIX utility grep when given the -E option in │ │ │ │ +167 * IEEE Std 1003.1-2001. This option is identical to syntax_option_type │ │ │ │ +168 * extended, except that newlines are treated as whitespace. │ │ │ │ +169 */ │ │ │ │ +_1_7_0 _GLIBCXX17_INLINE constexpr _s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e _e_g_r_e_p = │ │ │ │ +171 static_cast<_s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e>(1 << _S_egrep); │ │ │ │ +172 │ │ │ │ +173#if __cplusplus >= 201703L || !defined __STRICT_ANSI__ │ │ │ │ +174 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ +175 // 2503. multiline option should be added to syntax_option_type │ │ │ │ +176 /** │ │ │ │ +177 * Specifies that the `^` anchor matches at the beginning of a line, │ │ │ │ +178 * and the `$` anchor matches at the end of a line, not only at the │ │ │ │ +179 * beginning/end of the input. │ │ │ │ +180 * Valid for the ECMAScript syntax, ignored otherwise. │ │ │ │ +181 * @since C++17 │ │ │ │ +182 */ │ │ │ │ +_1_8_3 _GLIBCXX17_INLINE 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 = │ │ │ │ +184 static_cast<_s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e>(1 << _S_multiline); │ │ │ │ +185#endif │ │ │ │ +186 │ │ │ │ +187 /// Extension: Equivalent to regex_constants::multiline for C++11 and │ │ │ │ +C++14. │ │ │ │ +_1_8_8 _GLIBCXX17_INLINE 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 = │ │ │ │ +189 static_cast<_s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e>(1 << _S_multiline); │ │ │ │ +190 │ │ │ │ +191 /** │ │ │ │ +192 * Extension: Ensure both space complexity of compiled regex and │ │ │ │ +193 * time complexity execution are not exponential. │ │ │ │ +194 * If specified in a regex with back-references, the exception │ │ │ │ +195 * regex_constants::error_complexity will be thrown. │ │ │ │ +196 */ │ │ │ │ +_1_9_7 _GLIBCXX17_INLINE 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 = │ │ │ │ +198 static_cast<_s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e>(1 << _S_polynomial); │ │ │ │ +199 │ │ │ │ +200 constexpr inline _s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e │ │ │ │ +_2_0_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) │ │ │ │ +202 { │ │ │ │ +203 return (_s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e)(static_cast(__a) │ │ │ │ +204 & static_cast(__b)); │ │ │ │ +205 } │ │ │ │ +206 │ │ │ │ +207 constexpr inline syntax_option_type │ │ │ │ +_2_0_8 _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) │ │ │ │ +209 { │ │ │ │ +210 return (_s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e)(static_cast(__a) │ │ │ │ +211 | static_cast(__b)); │ │ │ │ +212 } │ │ │ │ +213 │ │ │ │ +214 constexpr inline syntax_option_type │ │ │ │ +_2_1_5 _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) │ │ │ │ +216 { │ │ │ │ +217 return (_s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e)(static_cast(__a) │ │ │ │ +218 ^ static_cast(__b)); │ │ │ │ +219 } │ │ │ │ +220 │ │ │ │ +221 constexpr inline syntax_option_type │ │ │ │ +_2_2_2 _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) │ │ │ │ +223 { return (_s_y_n_t_a_x___o_p_t_i_o_n___t_y_p_e)(~static_cast(__a)); } │ │ │ │ +224 │ │ │ │ +225 inline syntax_option_type& │ │ │ │ +_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 inline syntax_option_type& │ │ │ │ +_2_3_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) │ │ │ │ +231 { return __a = __a | __b; } │ │ │ │ +232 │ │ │ │ +233 inline syntax_option_type& │ │ │ │ +_2_3_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) │ │ │ │ +235 { return __a = __a ^ __b; } │ │ │ │ +236 │ │ │ │ +237 ///@} │ │ │ │ +238 │ │ │ │ +239 /** │ │ │ │ +240 * @name 5.2 Matching Rules │ │ │ │ +241 * │ │ │ │ +242 * Matching a regular expression against a sequence of characters [first, │ │ │ │ +243 * last) proceeds according to the rules of the grammar specified for the │ │ │ │ +244 * regular expression object, modified according to the effects listed │ │ │ │ +245 * below for any bitmask elements set. │ │ │ │ +246 * │ │ │ │ +247 */ │ │ │ │ +248 ///@{ │ │ │ │ +249 │ │ │ │ +_2_5_0 enum _____m_a_t_c_h___f_l_a_g │ │ │ │ +251 { │ │ │ │ +252 _S_not_bol, │ │ │ │ +253 _S_not_eol, │ │ │ │ +254 _S_not_bow, │ │ │ │ +255 _S_not_eow, │ │ │ │ +256 _S_any, │ │ │ │ +257 _S_not_null, │ │ │ │ +258 _S_continuous, │ │ │ │ +259 _S_prev_avail, │ │ │ │ +260 _S_sed, │ │ │ │ +261 _S_no_copy, │ │ │ │ +262 _S_first_only, │ │ │ │ +263 _S_match_flag_last │ │ │ │ +264 }; │ │ │ │ +265 │ │ │ │ +266 /** │ │ │ │ +267 * @brief This is a bitmask type indicating regex matching rules. │ │ │ │ +268 * │ │ │ │ +269 * The @c match_flag_type is implementation defined but it is valid to │ │ │ │ +270 * perform bitwise operations on these values and expect the right thing to │ │ │ │ +271 * happen. │ │ │ │ +272 */ │ │ │ │ +_2_7_3 enum _m_a_t_c_h___f_l_a_g___t_y_p_e : unsigned int { }; │ │ │ │ +274 │ │ │ │ +275 /** │ │ │ │ +276 * The default matching rules. │ │ │ │ +277 */ │ │ │ │ +_2_7_8 _GLIBCXX17_INLINE 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 = │ │ │ │ +279 static_cast<_m_a_t_c_h___f_l_a_g___t_y_p_e>(0); │ │ │ │ +280 │ │ │ │ +281 /** │ │ │ │ +282 * The first character in the sequence [first, last) is treated as though it │ │ │ │ +283 * is not at the beginning of a line, so the character (^) in the regular │ │ │ │ +284 * expression shall not match [first, first). │ │ │ │ +285 */ │ │ │ │ +_2_8_6 _GLIBCXX17_INLINE 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 = │ │ │ │ +287 static_cast<_m_a_t_c_h___f_l_a_g___t_y_p_e>(1 << _S_not_bol); │ │ │ │ +288 │ │ │ │ +289 /** │ │ │ │ +290 * The last character in the sequence [first, last) is treated as though it │ │ │ │ +291 * is not at the end of a line, so the character ($) in the regular │ │ │ │ +292 * expression shall not match [last, last). │ │ │ │ +293 */ │ │ │ │ +_2_9_4 _GLIBCXX17_INLINE 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 = │ │ │ │ +295 static_cast<_m_a_t_c_h___f_l_a_g___t_y_p_e>(1 << _S_not_eol); │ │ │ │ +296 │ │ │ │ +297 /** │ │ │ │ +298 * The expression \\b is not matched against the sub-sequence │ │ │ │ +299 * [first,first). │ │ │ │ +300 */ │ │ │ │ +_3_0_1 _GLIBCXX17_INLINE 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 = │ │ │ │ +302 static_cast<_m_a_t_c_h___f_l_a_g___t_y_p_e>(1 << _S_not_bow); │ │ │ │ +303 │ │ │ │ +304 /** │ │ │ │ +305 * The expression \\b should not be matched against the sub-sequence │ │ │ │ +306 * [last,last). │ │ │ │ +307 */ │ │ │ │ +_3_0_8 _GLIBCXX17_INLINE 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 = │ │ │ │ +309 static_cast<_m_a_t_c_h___f_l_a_g___t_y_p_e>(1 << _S_not_eow); │ │ │ │ +310 │ │ │ │ +311 /** │ │ │ │ +312 * If more than one match is possible then any match is an acceptable │ │ │ │ +313 * result. │ │ │ │ +314 */ │ │ │ │ +_3_1_5 _GLIBCXX17_INLINE constexpr _m_a_t_c_h___f_l_a_g___t_y_p_e _m_a_t_c_h___a_n_y = │ │ │ │ +316 static_cast<_m_a_t_c_h___f_l_a_g___t_y_p_e>(1 << _S_any); │ │ │ │ +317 │ │ │ │ +318 /** │ │ │ │ +319 * The expression does not match an empty sequence. │ │ │ │ +320 */ │ │ │ │ +_3_2_1 _GLIBCXX17_INLINE 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 = │ │ │ │ +322 static_cast<_m_a_t_c_h___f_l_a_g___t_y_p_e>(1 << _S_not_null); │ │ │ │ +323 │ │ │ │ +324 /** │ │ │ │ +325 * The expression only matches a sub-sequence that begins at first . │ │ │ │ +326 */ │ │ │ │ +_3_2_7 _GLIBCXX17_INLINE 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 = │ │ │ │ +328 static_cast<_m_a_t_c_h___f_l_a_g___t_y_p_e>(1 << _S_continuous); │ │ │ │ +329 │ │ │ │ +330 /** │ │ │ │ +331 * `--first` is a valid iterator position. When this flag is set then the │ │ │ │ +332 * flags `match_not_bol` and `match_not_bow` are ignored by the algorithms │ │ │ │ +333 * `regex_match`, `regex_search`, and `regex_replace`, and by the iterators │ │ │ │ +334 * `regex_iterator` and `regex_token_iterator`. │ │ │ │ +335 */ │ │ │ │ +_3_3_6 _GLIBCXX17_INLINE 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 = │ │ │ │ +337 static_cast<_m_a_t_c_h___f_l_a_g___t_y_p_e>(1 << _S_prev_avail); │ │ │ │ +338 │ │ │ │ +339 /** │ │ │ │ +340 * When a regular expression match is to be replaced by a new string, the │ │ │ │ +341 * new string is constructed using the rules used by the ECMAScript replace │ │ │ │ +342 * function in ECMA- 262 [Ecma International, ECMAScript Language │ │ │ │ +343 * Specification, Standard Ecma-262, third edition, 1999], part 15.5.4.11 │ │ │ │ +344 * String.prototype.replace. In addition, during search and replace │ │ │ │ +345 * operations all non-overlapping occurrences of the regular expression │ │ │ │ +346 * are located and replaced, and sections of the input that did not match │ │ │ │ +347 * the expression are copied unchanged to the output string. │ │ │ │ +348 * │ │ │ │ +349 * Format strings (from ECMA-262 [15.5.4.11]): │ │ │ │ +350 * @li $$ The dollar-sign itself ($) │ │ │ │ +351 * @li $& The matched substring. │ │ │ │ +352 * @li $` The portion of @a string that precedes the matched substring. │ │ │ │ +353 * This would be match_results::prefix(). │ │ │ │ +354 * @li $' The portion of @a string that follows the matched substring. │ │ │ │ +355 * This would be match_results::suffix(). │ │ │ │ +356 * @li $n The nth capture, where n is in [1,9] and $n is not followed by a │ │ │ │ +357 * decimal digit. If n <= match_results::size() and the nth capture │ │ │ │ +358 * is undefined, use the empty string instead. If n > │ │ │ │ +359 * match_results::size(), the result is implementation-defined. │ │ │ │ +360 * @li $nn The nnth capture, where nn is a two-digit decimal number on │ │ │ │ +361 * [01, 99]. If nn <= match_results::size() and the nth capture is │ │ │ │ +362 * undefined, use the empty string instead. If │ │ │ │ +363 * nn > match_results::size(), the result is implementation-defined. │ │ │ │ +364 */ │ │ │ │ +365 _GLIBCXX17_INLINE constexpr _m_a_t_c_h___f_l_a_g___t_y_p_e format_default = │ │ │ │ +366 static_cast<_m_a_t_c_h___f_l_a_g___t_y_p_e>(0); │ │ │ │ +367 │ │ │ │ +368 /** │ │ │ │ +369 * When a regular expression match is to be replaced by a new string, the │ │ │ │ +370 * new string is constructed using the rules used by the POSIX sed utility │ │ │ │ +371 * in IEEE Std 1003.1- 2001 [IEEE, Information Technology -- Portable │ │ │ │ +372 * Operating System Interface (POSIX), IEEE Standard 1003.1-2001]. │ │ │ │ +373 */ │ │ │ │ +_3_7_4 _GLIBCXX17_INLINE constexpr _m_a_t_c_h___f_l_a_g___t_y_p_e _f_o_r_m_a_t___s_e_d = │ │ │ │ +375 static_cast<_m_a_t_c_h___f_l_a_g___t_y_p_e>(1 << _S_sed); │ │ │ │ +376 │ │ │ │ +377 /** │ │ │ │ +378 * During a search and replace operation, sections of the character │ │ │ │ +379 * container sequence being searched that do not match the regular │ │ │ │ +380 * expression shall not be copied to the output string. │ │ │ │ +381 */ │ │ │ │ +_3_8_2 _GLIBCXX17_INLINE 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 = │ │ │ │ +383 static_cast<_m_a_t_c_h___f_l_a_g___t_y_p_e>(1 << _S_no_copy); │ │ │ │ +384 │ │ │ │ +385 /** │ │ │ │ +386 * When specified during a search and replace operation, only the first │ │ │ │ +387 * occurrence of the regular expression shall be replaced. │ │ │ │ +388 */ │ │ │ │ +_3_8_9 _GLIBCXX17_INLINE 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 = │ │ │ │ +390 static_cast<_m_a_t_c_h___f_l_a_g___t_y_p_e>(1 << _S_first_only); │ │ │ │ +391 │ │ │ │ +392 constexpr inline _m_a_t_c_h___f_l_a_g___t_y_p_e │ │ │ │ +_3_9_3 _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) │ │ │ │ +394 { │ │ │ │ +395 return (_m_a_t_c_h___f_l_a_g___t_y_p_e)(static_cast(__a) │ │ │ │ +396 & static_cast(__b)); │ │ │ │ +397 } │ │ │ │ +398 │ │ │ │ +399 constexpr inline match_flag_type │ │ │ │ +_4_0_0 _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) │ │ │ │ +401 { │ │ │ │ +402 return (_m_a_t_c_h___f_l_a_g___t_y_p_e)(static_cast(__a) │ │ │ │ +403 | static_cast(__b)); │ │ │ │ +404 } │ │ │ │ +405 │ │ │ │ +406 constexpr inline match_flag_type │ │ │ │ +_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 { │ │ │ │ +409 return (_m_a_t_c_h___f_l_a_g___t_y_p_e)(static_cast(__a) │ │ │ │ +410 ^ static_cast(__b)); │ │ │ │ +411 } │ │ │ │ +412 │ │ │ │ +413 constexpr inline match_flag_type │ │ │ │ +_4_1_4 _o_p_e_r_a_t_o_r_~(_m_a_t_c_h___f_l_a_g___t_y_p_e __a) │ │ │ │ +415 { return (_m_a_t_c_h___f_l_a_g___t_y_p_e)(~static_cast(__a)); } │ │ │ │ +416 │ │ │ │ +417 inline match_flag_type& │ │ │ │ +_4_1_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) │ │ │ │ +419 { return __a = __a & __b; } │ │ │ │ +420 │ │ │ │ +421 inline match_flag_type& │ │ │ │ +_4_2_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) │ │ │ │ +423 { return __a = __a | __b; } │ │ │ │ +424 │ │ │ │ +425 inline match_flag_type& │ │ │ │ +_4_2_6 _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) │ │ │ │ +427 { return __a = __a ^ __b; } │ │ │ │ +428 │ │ │ │ +429 ///@} │ │ │ │ +430} // namespace regex_constants │ │ │ │ +431/// @} group regex │ │ │ │ +432 │ │ │ │ +433_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ +434} // namespace std │ │ │ │ +435 │ │ │ │ _s_t_d │ │ │ │ ISO C++ entities toplevel namespace is std. │ │ │ │ -_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_:_:_r_e_g_e_x___c_o_n_s_t_a_n_t_s │ │ │ │ +ISO C++ 2011 namespace for options and flags used with std::regex. │ │ │ │ +_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_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_0_1 │ │ │ │ +_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 syntax_option_type collate │ │ │ │ +DDeeffiinniittiioonn _r_e_g_e_x___c_o_n_s_t_a_n_t_s_._h_:_1_1_1 │ │ │ │ +_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_&_= │ │ │ │ +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___f_l_a_g │ │ │ │ +__match_flag │ │ │ │ +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_1 │ │ │ │ +_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_:_3_0_1 │ │ │ │ +_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_8_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_2 │ │ │ │ +_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_1_5 │ │ │ │ +_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_7_0 │ │ │ │ +_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_:_8_1 │ │ │ │ +_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_8_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 │ │ │ │ +__syntax_option │ │ │ │ +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_:_5_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_7_8 │ │ │ │ +_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_8_9 │ │ │ │ +_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_^_= │ │ │ │ +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_3_4 │ │ │ │ +_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_5_2 │ │ │ │ +_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_8_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_2_7 │ │ │ │ +_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_4_1 │ │ │ │ +_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_5 │ │ │ │ +_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_3_2 │ │ │ │ +_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_9_4 │ │ │ │ +_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_7_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_|_= │ │ │ │ +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_3_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_7 │ │ │ │ +_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_:_:_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_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) │ │ │ │ +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_2 │ │ │ │ +_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_3_6 │ │ │ │ +_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_7_4 │ │ │ │ +_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_8 │ │ │ │ +_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_:_3_0_8 │ │ │ │ +_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_2_1 │ │ │ │ +_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_8_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_6_1 │ │ │ │ * bbiittss │ │ │ │ - * _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.15.0 │ │ ├── ./usr/share/doc/gcc-11-base/libstdc++/user/a00335.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: cxxabi_init_exception.h File Reference │ │ │ +libstdc++: boost_concept_check.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -48,72 +48,253 @@ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
cxxabi_init_exception.h File Reference
│ │ │ +
boost_concept_check.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │

Go to the source code of this file.

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

│ │ │ Namespaces

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

│ │ │ Macros

#define _GLIBCXX_CDTOR_CALLABI
#define _GLIBCXX_HAVE_CDTOR_CALLABI
#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

│ │ │ -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
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.

│ │ │ +

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

│ │ │ │ │ │ -

Definition in file cxxabi_init_exception.h.

│ │ │ +

Definition in file boost_concept_check.h.

│ │ │

Macro Definition Documentation

│ │ │ - │ │ │ -

◆ _GLIBCXX_CDTOR_CALLABI

│ │ │ + │ │ │ +

◆ _GLIBCXX_CLASS_REQUIRES

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

Definition at line 73 of file boost_concept_check.h.

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

◆ _GLIBCXX_CLASS_REQUIRES2

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

Definition at line 81 of file boost_concept_check.h.

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

◆ _GLIBCXX_CLASS_REQUIRES3

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

Definition at line 89 of file boost_concept_check.h.

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

◆ _GLIBCXX_CLASS_REQUIRES4

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

Definition at line 97 of file boost_concept_check.h.

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

◆ _GLIBCXX_DEFINE_BINARY_OPERATOR_CONSTRAINT

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

Definition at line 285 of file boost_concept_check.h.

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

◆ _GLIBCXX_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT

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

Definition at line 42 of file cxxabi_init_exception.h.

│ │ │ +

Definition at line 274 of file boost_concept_check.h.

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

◆ _GLIBCXX_HAVE_CDTOR_CALLABI

│ │ │ + │ │ │ +

◆ _IsUnused

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │ │ │ │ - │ │ │ + │ │ │ │ │ │
#define _GLIBCXX_HAVE_CDTOR_CALLABI#define _IsUnused
│ │ │
│ │ │ │ │ │ -

Definition at line 43 of file cxxabi_init_exception.h.

│ │ │ +

Definition at line 54 of file boost_concept_check.h.

│ │ │ │ │ │
│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,30 +1,68 @@ │ │ │ │ libstdc++ │ │ │ │ -cxxabi_init_exception.h File Reference │ │ │ │ +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_. │ │ │ │ NNaammeessppaacceess │ │ │ │ -namespace   _s_t_d │ │ │ │ +namespace   _____g_n_u___c_x_x │ │ │ │ MMaaccrrooss │ │ │ │ -#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 │ │ │ │ +#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 │ │ │ │ - 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 │ │ │ │ +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. │ │ │ │ -Definition in 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 _b_o_o_s_t___c_o_n_c_e_p_t___c_h_e_c_k_._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. │ │ │ │ +********** _?◆_? __GGLLIIBBCCXXXX__CCLLAASSSS__RREEQQUUIIRREESS ********** │ │ │ │ +#define _GLIBCXX_CLASS_REQUIRES ( __ttyyppee__vvaarr, │ │ │ │ + __nnss, │ │ │ │ + __ccoonncceepptt ) │ │ │ │ +Definition at line _7_3 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 ( __ttyyppee__vvaarr11, │ │ │ │ + __ttyyppee__vvaarr22, │ │ │ │ + __nnss, │ │ │ │ + __ccoonncceepptt ) │ │ │ │ +Definition at line _8_1 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 ( __ttyyppee__vvaarr11, │ │ │ │ + __ttyyppee__vvaarr22, │ │ │ │ + __ttyyppee__vvaarr33, │ │ │ │ + __nnss, │ │ │ │ + __ccoonncceepptt ) │ │ │ │ +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__RREEQQUUIIRREESS44 ********** │ │ │ │ +#define _GLIBCXX_CLASS_REQUIRES4 ( __ttyyppee__vvaarr11, │ │ │ │ + __ttyyppee__vvaarr22, │ │ │ │ + __ttyyppee__vvaarr33, │ │ │ │ + __ttyyppee__vvaarr44, │ │ │ │ + __nnss, │ │ │ │ + __ccoonncceepptt ) │ │ │ │ +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__DDEEFFIINNEE__BBIINNAARRYY__OOPPEERRAATTOORR__CCOONNSSTTRRAAIINNTT ********** │ │ │ │ +#define _GLIBCXX_DEFINE_BINARY_OPERATOR_CONSTRAINT ( __OOPP, │ │ │ │ + __NNAAMMEE ) │ │ │ │ +Definition at line _2_8_5 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 ( __OOPP, │ │ │ │ + __NNAAMMEE ) │ │ │ │ +Definition at line _2_7_4 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 _5_4 of file _b_o_o_s_t___c_o_n_c_e_p_t___c_h_e_c_k_._h. │ │ │ │ * bbiittss │ │ │ │ - * _c_x_x_a_b_i___i_n_i_t___e_x_c_e_p_t_i_o_n_._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.15.0 │ │ ├── ./usr/share/doc/gcc-11-base/libstdc++/user/a00335_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: cxxabi_init_exception.h Source File │ │ │ +libstdc++: boost_concept_check.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -48,105 +48,819 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
cxxabi_init_exception.h
│ │ │ +
boost_concept_check.h
│ │ │
│ │ │
│ │ │ -Go to the documentation of this file.
1// ABI Support -*- C++ -*-
│ │ │ +Go to the documentation of this file.
1// -*- C++ -*-
│ │ │
2
│ │ │ -
3// Copyright (C) 2016-2021 Free Software Foundation, Inc.
│ │ │ +
3// Copyright (C) 2004-2021 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;
│ │ │ +
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 __gnu_cxx _GLIBCXX_VISIBILITY(default)
│ │ │ +
48{
│ │ │ +
49_GLIBCXX_BEGIN_NAMESPACE_VERSION
│ │ │ +
50
│ │ │ +
51#pragma GCC diagnostic push
│ │ │ +
52#pragma GCC diagnostic ignored "-Wunused-local-typedefs"
│ │ │ +
53
│ │ │ +
54#define _IsUnused __attribute__ ((__unused__))
│ │ │ +
55
│ │ │ +
56// When the C-C code is in use, we would like this function to do as little
│ │ │ +
57// as possible at runtime, use as few resources as possible, and hopefully
│ │ │ +
58// be elided out of existence... hmmm.
│ │ │ +
59template <class _Concept>
│ │ │ +
60_GLIBCXX14_CONSTEXPR inline void __function_requires()
│ │ │ +
61{
│ │ │ +
62 void (_Concept::*__x)() _IsUnused = &_Concept::__constraints;
│ │ │ +
63}
│ │ │
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 *)) _GLIBCXX_NOTHROW;
│ │ │ -
72
│ │ │ -
73 }
│ │ │ -
74} // namespace __cxxabiv1
│ │ │ -
75
│ │ │ -
76#endif
│ │ │ -
77
│ │ │ -
78#pragma GCC visibility pop
│ │ │ -
79
│ │ │ -
80#endif // _CXXABI_INIT_EXCEPTION_H
│ │ │ - │ │ │ -
ISO C++ entities toplevel namespace is std.
│ │ │ -
Part of RTTI.
Definition typeinfo:89
│ │ │ +
65// No definition: if this is referenced, there's a problem with
│ │ │ +
66// the instantiating type not being one of the required integer types.
│ │ │ +
67// Unfortunately, this results in a link-time error, not a compile-time error.
│ │ │ +
68void __error_type_must_be_an_integer_type();
│ │ │ +
69void __error_type_must_be_an_unsigned_integer_type();
│ │ │ +
70void __error_type_must_be_a_signed_integer_type();
│ │ │ +
71
│ │ │ +
72// ??? Should the "concept_checking*" structs begin with more than _ ?
│ │ │ +
73#define _GLIBCXX_CLASS_REQUIRES(_type_var, _ns, _concept) \
│ │ │ +
74 typedef void (_ns::_concept <_type_var>::* _func##_type_var##_concept)(); \
│ │ │ +
75 template <_func##_type_var##_concept _Tp1> \
│ │ │ +
76 struct _concept_checking##_type_var##_concept { }; \
│ │ │ +
77 typedef _concept_checking##_type_var##_concept< \
│ │ │ +
78 &_ns::_concept <_type_var>::__constraints> \
│ │ │ +
79 _concept_checking_typedef##_type_var##_concept
│ │ │ +
80
│ │ │ +
81#define _GLIBCXX_CLASS_REQUIRES2(_type_var1, _type_var2, _ns, _concept) \
│ │ │ +
82 typedef void (_ns::_concept <_type_var1,_type_var2>::* _func##_type_var1##_type_var2##_concept)(); \
│ │ │ +
83 template <_func##_type_var1##_type_var2##_concept _Tp1> \
│ │ │ +
84 struct _concept_checking##_type_var1##_type_var2##_concept { }; \
│ │ │ +
85 typedef _concept_checking##_type_var1##_type_var2##_concept< \
│ │ │ +
86 &_ns::_concept <_type_var1,_type_var2>::__constraints> \
│ │ │ +
87 _concept_checking_typedef##_type_var1##_type_var2##_concept
│ │ │ +
88
│ │ │ +
89#define _GLIBCXX_CLASS_REQUIRES3(_type_var1, _type_var2, _type_var3, _ns, _concept) \
│ │ │ +
90 typedef void (_ns::_concept <_type_var1,_type_var2,_type_var3>::* _func##_type_var1##_type_var2##_type_var3##_concept)(); \
│ │ │ +
91 template <_func##_type_var1##_type_var2##_type_var3##_concept _Tp1> \
│ │ │ +
92 struct _concept_checking##_type_var1##_type_var2##_type_var3##_concept { }; \
│ │ │ +
93 typedef _concept_checking##_type_var1##_type_var2##_type_var3##_concept< \
│ │ │ +
94 &_ns::_concept <_type_var1,_type_var2,_type_var3>::__constraints> \
│ │ │ +
95 _concept_checking_typedef##_type_var1##_type_var2##_type_var3##_concept
│ │ │ +
96
│ │ │ +
97#define _GLIBCXX_CLASS_REQUIRES4(_type_var1, _type_var2, _type_var3, _type_var4, _ns, _concept) \
│ │ │ +
98 typedef void (_ns::_concept <_type_var1,_type_var2,_type_var3,_type_var4>::* _func##_type_var1##_type_var2##_type_var3##_type_var4##_concept)(); \
│ │ │ +
99 template <_func##_type_var1##_type_var2##_type_var3##_type_var4##_concept _Tp1> \
│ │ │ +
100 struct _concept_checking##_type_var1##_type_var2##_type_var3##_type_var4##_concept { }; \
│ │ │ +
101 typedef _concept_checking##_type_var1##_type_var2##_type_var3##_type_var4##_concept< \
│ │ │ +
102 &_ns::_concept <_type_var1,_type_var2,_type_var3,_type_var4>::__constraints> \
│ │ │ +
103 _concept_checking_typedef##_type_var1##_type_var2##_type_var3##_type_var4##_concept
│ │ │ +
104
│ │ │ +
105
│ │ │ +
106template <class _Tp1, class _Tp2>
│ │ │ +
107struct _Aux_require_same { };
│ │ │ +
108
│ │ │ +
109template <class _Tp>
│ │ │ +
110struct _Aux_require_same<_Tp,_Tp> { typedef _Tp _Type; };
│ │ │ +
111
│ │ │ +
112 template <class _Tp1, class _Tp2>
│ │ │ +
113 struct _SameTypeConcept
│ │ │ +
114 {
│ │ │ +
115 void __constraints() {
│ │ │ +
116 typedef typename _Aux_require_same<_Tp1, _Tp2>::_Type _Required;
│ │ │ +
117 }
│ │ │ +
118 };
│ │ │ +
119
│ │ │ +
120 template <class _Tp>
│ │ │ +
121 struct _IntegerConcept {
│ │ │ +
122 void __constraints() {
│ │ │ +
123 __error_type_must_be_an_integer_type();
│ │ │ +
124 }
│ │ │ +
125 };
│ │ │ +
126 template <> struct _IntegerConcept<short> { void __constraints() {} };
│ │ │ +
127 template <> struct _IntegerConcept<unsigned short> { void __constraints(){} };
│ │ │ +
128 template <> struct _IntegerConcept<int> { void __constraints() {} };
│ │ │ +
129 template <> struct _IntegerConcept<unsigned int> { void __constraints() {} };
│ │ │ +
130 template <> struct _IntegerConcept<long> { void __constraints() {} };
│ │ │ +
131 template <> struct _IntegerConcept<unsigned long> { void __constraints() {} };
│ │ │ +
132 template <> struct _IntegerConcept<long long> { void __constraints() {} };
│ │ │ +
133 template <> struct _IntegerConcept<unsigned long long>
│ │ │ +
134 { void __constraints() {} };
│ │ │ +
135
│ │ │ +
136 template <class _Tp>
│ │ │ +
137 struct _SignedIntegerConcept {
│ │ │ +
138 void __constraints() {
│ │ │ +
139 __error_type_must_be_a_signed_integer_type();
│ │ │ +
140 }
│ │ │ +
141 };
│ │ │ +
142 template <> struct _SignedIntegerConcept<short> { void __constraints() {} };
│ │ │ +
143 template <> struct _SignedIntegerConcept<int> { void __constraints() {} };
│ │ │ +
144 template <> struct _SignedIntegerConcept<long> { void __constraints() {} };
│ │ │ +
145 template <> struct _SignedIntegerConcept<long long> { void __constraints(){}};
│ │ │ +
146
│ │ │ +
147 template <class _Tp>
│ │ │ +
148 struct _UnsignedIntegerConcept {
│ │ │ +
149 void __constraints() {
│ │ │ +
150 __error_type_must_be_an_unsigned_integer_type();
│ │ │ +
151 }
│ │ │ +
152 };
│ │ │ +
153 template <> struct _UnsignedIntegerConcept<unsigned short>
│ │ │ +
154 { void __constraints() {} };
│ │ │ +
155 template <> struct _UnsignedIntegerConcept<unsigned int>
│ │ │ +
156 { void __constraints() {} };
│ │ │ +
157 template <> struct _UnsignedIntegerConcept<unsigned long>
│ │ │ +
158 { void __constraints() {} };
│ │ │ +
159 template <> struct _UnsignedIntegerConcept<unsigned long long>
│ │ │ +
160 { void __constraints() {} };
│ │ │ +
161
│ │ │ +
162 //===========================================================================
│ │ │ +
163 // Basic Concepts
│ │ │ +
164
│ │ │ +
165 template <class _Tp>
│ │ │ +
166 struct _DefaultConstructibleConcept
│ │ │ +
167 {
│ │ │ +
168 void __constraints() {
│ │ │ +
169 _Tp __a _IsUnused; // require default constructor
│ │ │ +
170 }
│ │ │ +
171 };
│ │ │ +
172
│ │ │ +
173 template <class _Tp>
│ │ │ +
174 struct _AssignableConcept
│ │ │ +
175 {
│ │ │ +
176 void __constraints() {
│ │ │ +
177 __a = __a; // require assignment operator
│ │ │ +
178 __const_constraints(__a);
│ │ │ +
179 }
│ │ │ +
180 void __const_constraints(const _Tp& __b) {
│ │ │ +
181 __a = __b; // const required for argument to assignment
│ │ │ +
182 }
│ │ │ +
183 _Tp __a;
│ │ │ +
184 // possibly should be "Tp* a;" and then dereference "a" in constraint
│ │ │ +
185 // functions? present way would require a default ctor, i think...
│ │ │ +
186 };
│ │ │ +
187
│ │ │ +
188 template <class _Tp>
│ │ │ +
189 struct _CopyConstructibleConcept
│ │ │ +
190 {
│ │ │ +
191 void __constraints() {
│ │ │ +
192 _Tp __a(__b); // require copy constructor
│ │ │ +
193 _Tp* __ptr _IsUnused = &__a; // require address of operator
│ │ │ +
194 __const_constraints(__a);
│ │ │ +
195 }
│ │ │ +
196 void __const_constraints(const _Tp& __a) {
│ │ │ +
197 _Tp __c _IsUnused(__a); // require const copy constructor
│ │ │ +
198 const _Tp* __ptr _IsUnused = &__a; // require const address of operator
│ │ │ +
199 }
│ │ │ +
200 _Tp __b;
│ │ │ +
201 };
│ │ │ +
202
│ │ │ +
203 // The SGI STL version of Assignable requires copy constructor and operator=
│ │ │ +
204 template <class _Tp>
│ │ │ +
205 struct _SGIAssignableConcept
│ │ │ +
206 {
│ │ │ +
207 void __constraints() {
│ │ │ +
208 _Tp __b _IsUnused(__a);
│ │ │ +
209 __a = __a; // require assignment operator
│ │ │ +
210 __const_constraints(__a);
│ │ │ +
211 }
│ │ │ +
212 void __const_constraints(const _Tp& __b) {
│ │ │ +
213 _Tp __c _IsUnused(__b);
│ │ │ +
214 __a = __b; // const required for argument to assignment
│ │ │ +
215 }
│ │ │ +
216 _Tp __a;
│ │ │ +
217 };
│ │ │ +
218
│ │ │ +
219 template <class _From, class _To>
│ │ │ +
220 struct _ConvertibleConcept
│ │ │ +
221 {
│ │ │ +
222 void __constraints() {
│ │ │ +
223 _To __y _IsUnused = __x;
│ │ │ +
224 }
│ │ │ +
225 _From __x;
│ │ │ +
226 };
│ │ │ +
227
│ │ │ +
228 // The C++ standard requirements for many concepts talk about return
│ │ │ +
229 // types that must be "convertible to bool". The problem with this
│ │ │ +
230 // requirement is that it leaves the door open for evil proxies that
│ │ │ +
231 // define things like operator|| with strange return types. Two
│ │ │ +
232 // possible solutions are:
│ │ │ +
233 // 1) require the return type to be exactly bool
│ │ │ +
234 // 2) stay with convertible to bool, and also
│ │ │ +
235 // specify stuff about all the logical operators.
│ │ │ +
236 // For now we just test for convertible to bool.
│ │ │ +
237 template <class _Tp>
│ │ │ +
238 void __aux_require_boolean_expr(const _Tp& __t) {
│ │ │ +
239 bool __x _IsUnused = __t;
│ │ │ +
240 }
│ │ │ +
241
│ │ │ +
242// FIXME
│ │ │ +
243 template <class _Tp>
│ │ │ +
244 struct _EqualityComparableConcept
│ │ │ +
245 {
│ │ │ +
246 void __constraints() {
│ │ │ +
247 __aux_require_boolean_expr(__a == __b);
│ │ │ +
248 }
│ │ │ +
249 _Tp __a, __b;
│ │ │ +
250 };
│ │ │ +
251
│ │ │ +
252 template <class _Tp>
│ │ │ +
253 struct _LessThanComparableConcept
│ │ │ +
254 {
│ │ │ +
255 void __constraints() {
│ │ │ +
256 __aux_require_boolean_expr(__a < __b);
│ │ │ +
257 }
│ │ │ +
258 _Tp __a, __b;
│ │ │ +
259 };
│ │ │ +
260
│ │ │ +
261 // This is equivalent to SGI STL's LessThanComparable.
│ │ │ +
262 template <class _Tp>
│ │ │ +
263 struct _ComparableConcept
│ │ │ +
264 {
│ │ │ +
265 void __constraints() {
│ │ │ +
266 __aux_require_boolean_expr(__a < __b);
│ │ │ +
267 __aux_require_boolean_expr(__a > __b);
│ │ │ +
268 __aux_require_boolean_expr(__a <= __b);
│ │ │ +
269 __aux_require_boolean_expr(__a >= __b);
│ │ │ +
270 }
│ │ │ +
271 _Tp __a, __b;
│ │ │ +
272 };
│ │ │ +
273
│ │ │ +
274#define _GLIBCXX_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(_OP,_NAME) \
│ │ │ +
275 template <class _First, class _Second> \
│ │ │ +
276 struct _NAME { \
│ │ │ +
277 void __constraints() { (void)__constraints_(); } \
│ │ │ +
278 bool __constraints_() { \
│ │ │ +
279 return __a _OP __b; \
│ │ │ +
280 } \
│ │ │ +
281 _First __a; \
│ │ │ +
282 _Second __b; \
│ │ │ +
283 }
│ │ │ +
284
│ │ │ +
285#define _GLIBCXX_DEFINE_BINARY_OPERATOR_CONSTRAINT(_OP,_NAME) \
│ │ │ +
286 template <class _Ret, class _First, class _Second> \
│ │ │ +
287 struct _NAME { \
│ │ │ +
288 void __constraints() { (void)__constraints_(); } \
│ │ │ +
289 _Ret __constraints_() { \
│ │ │ +
290 return __a _OP __b; \
│ │ │ +
291 } \
│ │ │ +
292 _First __a; \
│ │ │ +
293 _Second __b; \
│ │ │ +
294 }
│ │ │ +
295
│ │ │ +
296 _GLIBCXX_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(==, _EqualOpConcept);
│ │ │ +
297 _GLIBCXX_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(!=, _NotEqualOpConcept);
│ │ │ +
298 _GLIBCXX_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(<, _LessThanOpConcept);
│ │ │ +
299 _GLIBCXX_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(<=, _LessEqualOpConcept);
│ │ │ +
300 _GLIBCXX_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(>, _GreaterThanOpConcept);
│ │ │ +
301 _GLIBCXX_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(>=, _GreaterEqualOpConcept);
│ │ │ +
302
│ │ │ +
303 _GLIBCXX_DEFINE_BINARY_OPERATOR_CONSTRAINT(+, _PlusOpConcept);
│ │ │ +
304 _GLIBCXX_DEFINE_BINARY_OPERATOR_CONSTRAINT(*, _TimesOpConcept);
│ │ │ +
305 _GLIBCXX_DEFINE_BINARY_OPERATOR_CONSTRAINT(/, _DivideOpConcept);
│ │ │ +
306 _GLIBCXX_DEFINE_BINARY_OPERATOR_CONSTRAINT(-, _SubtractOpConcept);
│ │ │ +
307 _GLIBCXX_DEFINE_BINARY_OPERATOR_CONSTRAINT(%, _ModOpConcept);
│ │ │ +
308
│ │ │ +
309#undef _GLIBCXX_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT
│ │ │ +
310#undef _GLIBCXX_DEFINE_BINARY_OPERATOR_CONSTRAINT
│ │ │ +
311
│ │ │ +
312 //===========================================================================
│ │ │ +
313 // Function Object Concepts
│ │ │ +
314
│ │ │ +
315 template <class _Func, class _Return>
│ │ │ +
316 struct _GeneratorConcept
│ │ │ +
317 {
│ │ │ +
318 void __constraints() {
│ │ │ +
319 const _Return& __r _IsUnused = __f();// require operator() member function
│ │ │ +
320 }
│ │ │ +
321 _Func __f;
│ │ │ +
322 };
│ │ │ +
323
│ │ │ +
324
│ │ │ +
325 template <class _Func>
│ │ │ +
326 struct _GeneratorConcept<_Func,void>
│ │ │ +
327 {
│ │ │ +
328 void __constraints() {
│ │ │ +
329 __f(); // require operator() member function
│ │ │ +
330 }
│ │ │ +
331 _Func __f;
│ │ │ +
332 };
│ │ │ +
333
│ │ │ +
334 template <class _Func, class _Return, class _Arg>
│ │ │ +
335 struct _UnaryFunctionConcept
│ │ │ +
336 {
│ │ │ +
337 void __constraints() {
│ │ │ +
338 __r = __f(__arg); // require operator()
│ │ │ +
339 }
│ │ │ +
340 _Func __f;
│ │ │ +
341 _Arg __arg;
│ │ │ +
342 _Return __r;
│ │ │ +
343 };
│ │ │ +
344
│ │ │ +
345 template <class _Func, class _Arg>
│ │ │ +
346 struct _UnaryFunctionConcept<_Func, void, _Arg> {
│ │ │ +
347 void __constraints() {
│ │ │ +
348 __f(__arg); // require operator()
│ │ │ +
349 }
│ │ │ +
350 _Func __f;
│ │ │ +
351 _Arg __arg;
│ │ │ +
352 };
│ │ │ +
353
│ │ │ +
354 template <class _Func, class _Return, class _First, class _Second>
│ │ │ +
355 struct _BinaryFunctionConcept
│ │ │ +
356 {
│ │ │ +
357 void __constraints() {
│ │ │ +
358 __r = __f(__first, __second); // require operator()
│ │ │ +
359 }
│ │ │ +
360 _Func __f;
│ │ │ +
361 _First __first;
│ │ │ +
362 _Second __second;
│ │ │ +
363 _Return __r;
│ │ │ +
364 };
│ │ │ +
365
│ │ │ +
366 template <class _Func, class _First, class _Second>
│ │ │ +
367 struct _BinaryFunctionConcept<_Func, void, _First, _Second>
│ │ │ +
368 {
│ │ │ +
369 void __constraints() {
│ │ │ +
370 __f(__first, __second); // require operator()
│ │ │ +
371 }
│ │ │ +
372 _Func __f;
│ │ │ +
373 _First __first;
│ │ │ +
374 _Second __second;
│ │ │ +
375 };
│ │ │ +
376
│ │ │ +
377 template <class _Func, class _Arg>
│ │ │ +
378 struct _UnaryPredicateConcept
│ │ │ +
379 {
│ │ │ +
380 void __constraints() {
│ │ │ +
381 __aux_require_boolean_expr(__f(__arg)); // require op() returning bool
│ │ │ +
382 }
│ │ │ +
383 _Func __f;
│ │ │ +
384 _Arg __arg;
│ │ │ +
385 };
│ │ │ +
386
│ │ │ +
387 template <class _Func, class _First, class _Second>
│ │ │ +
388 struct _BinaryPredicateConcept
│ │ │ +
389 {
│ │ │ +
390 void __constraints() {
│ │ │ +
391 __aux_require_boolean_expr(__f(__a, __b)); // require op() returning bool
│ │ │ +
392 }
│ │ │ +
393 _Func __f;
│ │ │ +
394 _First __a;
│ │ │ +
395 _Second __b;
│ │ │ +
396 };
│ │ │ +
397
│ │ │ +
398 // use this when functor is used inside a container class like std::set
│ │ │ +
399 template <class _Func, class _First, class _Second>
│ │ │ +
400 struct _Const_BinaryPredicateConcept {
│ │ │ +
401 void __constraints() {
│ │ │ +
402 __const_constraints(__f);
│ │ │ +
403 }
│ │ │ +
404 void __const_constraints(const _Func& __fun) {
│ │ │ +
405 __function_requires<_BinaryPredicateConcept<_Func, _First, _Second> >();
│ │ │ +
406 // operator() must be a const member function
│ │ │ +
407 __aux_require_boolean_expr(__fun(__a, __b));
│ │ │ +
408 }
│ │ │ +
409 _Func __f;
│ │ │ +
410 _First __a;
│ │ │ +
411 _Second __b;
│ │ │ +
412 };
│ │ │ +
413
│ │ │ +
414 //===========================================================================
│ │ │ +
415 // Iterator Concepts
│ │ │ +
416
│ │ │ +
417 template <class _Tp>
│ │ │ +
418 struct _TrivialIteratorConcept
│ │ │ +
419 {
│ │ │ +
420 void __constraints() {
│ │ │ +
421// __function_requires< _DefaultConstructibleConcept<_Tp> >();
│ │ │ +
422 __function_requires< _AssignableConcept<_Tp> >();
│ │ │ +
423 __function_requires< _EqualityComparableConcept<_Tp> >();
│ │ │ +
424// typedef typename std::iterator_traits<_Tp>::value_type _V;
│ │ │ +
425 (void)*__i; // require dereference operator
│ │ │ +
426 }
│ │ │ +
427 _Tp __i;
│ │ │ +
428 };
│ │ │ +
429
│ │ │ +
430 template <class _Tp>
│ │ │ +
431 struct _Mutable_TrivialIteratorConcept
│ │ │ +
432 {
│ │ │ +
433 void __constraints() {
│ │ │ +
434 __function_requires< _TrivialIteratorConcept<_Tp> >();
│ │ │ +
435 *__i = *__j; // require dereference and assignment
│ │ │ +
436 }
│ │ │ +
437 _Tp __i, __j;
│ │ │ +
438 };
│ │ │ +
439
│ │ │ +
440 template <class _Tp>
│ │ │ +
441 struct _InputIteratorConcept
│ │ │ +
442 {
│ │ │ +
443 void __constraints() {
│ │ │ +
444 __function_requires< _TrivialIteratorConcept<_Tp> >();
│ │ │ +
445 // require iterator_traits typedef's
│ │ │ +
446 typedef typename std::iterator_traits<_Tp>::difference_type _Diff;
│ │ │ +
447// __function_requires< _SignedIntegerConcept<_Diff> >();
│ │ │ +
448 typedef typename std::iterator_traits<_Tp>::reference _Ref;
│ │ │ +
449 typedef typename std::iterator_traits<_Tp>::pointer _Pt;
│ │ │ +
450 typedef typename std::iterator_traits<_Tp>::iterator_category _Cat;
│ │ │ +
451 __function_requires< _ConvertibleConcept<
│ │ │ +
452 typename std::iterator_traits<_Tp>::iterator_category,
│ │ │ +
453 std::input_iterator_tag> >();
│ │ │ +
454 ++__i; // require preincrement operator
│ │ │ +
455 __i++; // require postincrement operator
│ │ │ +
456 }
│ │ │ +
457 _Tp __i;
│ │ │ +
458 };
│ │ │ +
459
│ │ │ +
460 template <class _Tp, class _ValueT>
│ │ │ +
461 struct _OutputIteratorConcept
│ │ │ +
462 {
│ │ │ +
463 void __constraints() {
│ │ │ +
464 __function_requires< _AssignableConcept<_Tp> >();
│ │ │ +
465 ++__i; // require preincrement operator
│ │ │ +
466 __i++; // require postincrement operator
│ │ │ +
467 *__i++ = __t; // require postincrement and assignment
│ │ │ +
468 }
│ │ │ +
469 _Tp __i;
│ │ │ +
470 _ValueT __t;
│ │ │ +
471 };
│ │ │ +
472
│ │ │ +
473 template <class _Tp>
│ │ │ +
474 struct _ForwardIteratorConcept
│ │ │ +
475 {
│ │ │ +
476 void __constraints() {
│ │ │ +
477 __function_requires< _InputIteratorConcept<_Tp> >();
│ │ │ +
478 __function_requires< _DefaultConstructibleConcept<_Tp> >();
│ │ │ +
479 __function_requires< _ConvertibleConcept<
│ │ │ +
480 typename std::iterator_traits<_Tp>::iterator_category,
│ │ │ +
481 std::forward_iterator_tag> >();
│ │ │ +
482 typedef typename std::iterator_traits<_Tp>::reference _Ref;
│ │ │ +
483 _Ref __r _IsUnused = *__i;
│ │ │ +
484 }
│ │ │ +
485 _Tp __i;
│ │ │ +
486 };
│ │ │ +
487
│ │ │ +
488 template <class _Tp>
│ │ │ +
489 struct _Mutable_ForwardIteratorConcept
│ │ │ +
490 {
│ │ │ +
491 void __constraints() {
│ │ │ +
492 __function_requires< _ForwardIteratorConcept<_Tp> >();
│ │ │ +
493 *__i++ = *__i; // require postincrement and assignment
│ │ │ +
494 }
│ │ │ +
495 _Tp __i;
│ │ │ +
496 };
│ │ │ +
497
│ │ │ +
498 template <class _Tp>
│ │ │ +
499 struct _BidirectionalIteratorConcept
│ │ │ +
500 {
│ │ │ +
501 void __constraints() {
│ │ │ +
502 __function_requires< _ForwardIteratorConcept<_Tp> >();
│ │ │ +
503 __function_requires< _ConvertibleConcept<
│ │ │ +
504 typename std::iterator_traits<_Tp>::iterator_category,
│ │ │ +
505 std::bidirectional_iterator_tag> >();
│ │ │ +
506 --__i; // require predecrement operator
│ │ │ +
507 __i--; // require postdecrement operator
│ │ │ +
508 }
│ │ │ +
509 _Tp __i;
│ │ │ +
510 };
│ │ │ +
511
│ │ │ +
512 template <class _Tp>
│ │ │ +
513 struct _Mutable_BidirectionalIteratorConcept
│ │ │ +
514 {
│ │ │ +
515 void __constraints() {
│ │ │ +
516 __function_requires< _BidirectionalIteratorConcept<_Tp> >();
│ │ │ +
517 __function_requires< _Mutable_ForwardIteratorConcept<_Tp> >();
│ │ │ +
518 *__i-- = *__i; // require postdecrement and assignment
│ │ │ +
519 }
│ │ │ +
520 _Tp __i;
│ │ │ +
521 };
│ │ │ +
522
│ │ │ +
523
│ │ │ +
524 template <class _Tp>
│ │ │ +
525 struct _RandomAccessIteratorConcept
│ │ │ +
526 {
│ │ │ +
527 void __constraints() {
│ │ │ +
528 __function_requires< _BidirectionalIteratorConcept<_Tp> >();
│ │ │ +
529 __function_requires< _ComparableConcept<_Tp> >();
│ │ │ +
530 __function_requires< _ConvertibleConcept<
│ │ │ +
531 typename std::iterator_traits<_Tp>::iterator_category,
│ │ │ +
532 std::random_access_iterator_tag> >();
│ │ │ +
533 // ??? We don't use _Ref, are we just checking for "referenceability"?
│ │ │ +
534 typedef typename std::iterator_traits<_Tp>::reference _Ref;
│ │ │ +
535
│ │ │ +
536 __i += __n; // require assignment addition operator
│ │ │ +
537 __i = __i + __n; __i = __n + __i; // require addition with difference type
│ │ │ +
538 __i -= __n; // require assignment subtraction op
│ │ │ +
539 __i = __i - __n; // require subtraction with
│ │ │ +
540 // difference type
│ │ │ +
541 __n = __i - __j; // require difference operator
│ │ │ +
542 (void)__i[__n]; // require element access operator
│ │ │ +
543 }
│ │ │ +
544 _Tp __a, __b;
│ │ │ +
545 _Tp __i, __j;
│ │ │ +
546 typename std::iterator_traits<_Tp>::difference_type __n;
│ │ │ +
547 };
│ │ │ +
548
│ │ │ +
549 template <class _Tp>
│ │ │ +
550 struct _Mutable_RandomAccessIteratorConcept
│ │ │ +
551 {
│ │ │ +
552 void __constraints() {
│ │ │ +
553 __function_requires< _RandomAccessIteratorConcept<_Tp> >();
│ │ │ +
554 __function_requires< _Mutable_BidirectionalIteratorConcept<_Tp> >();
│ │ │ +
555 __i[__n] = *__i; // require element access and assignment
│ │ │ +
556 }
│ │ │ +
557 _Tp __i;
│ │ │ +
558 typename std::iterator_traits<_Tp>::difference_type __n;
│ │ │ +
559 };
│ │ │ +
560
│ │ │ +
561 //===========================================================================
│ │ │ +
562 // Container Concepts
│ │ │ +
563
│ │ │ +
564 template <class _Container>
│ │ │ +
565 struct _ContainerConcept
│ │ │ +
566 {
│ │ │ +
567 typedef typename _Container::value_type _Value_type;
│ │ │ +
568 typedef typename _Container::difference_type _Difference_type;
│ │ │ +
569 typedef typename _Container::size_type _Size_type;
│ │ │ +
570 typedef typename _Container::const_reference _Const_reference;
│ │ │ +
571 typedef typename _Container::const_pointer _Const_pointer;
│ │ │ +
572 typedef typename _Container::const_iterator _Const_iterator;
│ │ │ +
573
│ │ │ +
574 void __constraints() {
│ │ │ +
575 __function_requires< _InputIteratorConcept<_Const_iterator> >();
│ │ │ +
576 __function_requires< _AssignableConcept<_Container> >();
│ │ │ +
577 const _Container __c;
│ │ │ +
578 __i = __c.begin();
│ │ │ +
579 __i = __c.end();
│ │ │ +
580 __n = __c.size();
│ │ │ +
581 __n = __c.max_size();
│ │ │ +
582 __b = __c.empty();
│ │ │ +
583 }
│ │ │ +
584 bool __b;
│ │ │ +
585 _Const_iterator __i;
│ │ │ +
586 _Size_type __n;
│ │ │ +
587 };
│ │ │ +
588
│ │ │ +
589 template <class _Container>
│ │ │ +
590 struct _Mutable_ContainerConcept
│ │ │ +
591 {
│ │ │ +
592 typedef typename _Container::value_type _Value_type;
│ │ │ +
593 typedef typename _Container::reference _Reference;
│ │ │ +
594 typedef typename _Container::iterator _Iterator;
│ │ │ +
595 typedef typename _Container::pointer _Pointer;
│ │ │ +
596
│ │ │ +
597 void __constraints() {
│ │ │ +
598 __function_requires< _ContainerConcept<_Container> >();
│ │ │ +
599 __function_requires< _AssignableConcept<_Value_type> >();
│ │ │ +
600 __function_requires< _InputIteratorConcept<_Iterator> >();
│ │ │ +
601
│ │ │ +
602 __i = __c.begin();
│ │ │ +
603 __i = __c.end();
│ │ │ +
604 __c.swap(__c2);
│ │ │ +
605 }
│ │ │ +
606 _Iterator __i;
│ │ │ +
607 _Container __c, __c2;
│ │ │ +
608 };
│ │ │ +
609
│ │ │ +
610 template <class _ForwardContainer>
│ │ │ +
611 struct _ForwardContainerConcept
│ │ │ +
612 {
│ │ │ +
613 void __constraints() {
│ │ │ +
614 __function_requires< _ContainerConcept<_ForwardContainer> >();
│ │ │ +
615 typedef typename _ForwardContainer::const_iterator _Const_iterator;
│ │ │ +
616 __function_requires< _ForwardIteratorConcept<_Const_iterator> >();
│ │ │ +
617 }
│ │ │ +
618 };
│ │ │ +
619
│ │ │ +
620 template <class _ForwardContainer>
│ │ │ +
621 struct _Mutable_ForwardContainerConcept
│ │ │ +
622 {
│ │ │ +
623 void __constraints() {
│ │ │ +
624 __function_requires< _ForwardContainerConcept<_ForwardContainer> >();
│ │ │ +
625 __function_requires< _Mutable_ContainerConcept<_ForwardContainer> >();
│ │ │ +
626 typedef typename _ForwardContainer::iterator _Iterator;
│ │ │ +
627 __function_requires< _Mutable_ForwardIteratorConcept<_Iterator> >();
│ │ │ +
628 }
│ │ │ +
629 };
│ │ │ +
630
│ │ │ +
631 template <class _ReversibleContainer>
│ │ │ +
632 struct _ReversibleContainerConcept
│ │ │ +
633 {
│ │ │ +
634 typedef typename _ReversibleContainer::const_iterator _Const_iterator;
│ │ │ +
635 typedef typename _ReversibleContainer::const_reverse_iterator
│ │ │ +
636 _Const_reverse_iterator;
│ │ │ +
637
│ │ │ +
638 void __constraints() {
│ │ │ +
639 __function_requires< _ForwardContainerConcept<_ReversibleContainer> >();
│ │ │ +
640 __function_requires< _BidirectionalIteratorConcept<_Const_iterator> >();
│ │ │ +
641 __function_requires<
│ │ │ +
642 _BidirectionalIteratorConcept<_Const_reverse_iterator> >();
│ │ │ +
643
│ │ │ +
644 const _ReversibleContainer __c;
│ │ │ +
645 _Const_reverse_iterator __i = __c.rbegin();
│ │ │ +
646 __i = __c.rend();
│ │ │ +
647 }
│ │ │ +
648 };
│ │ │ +
649
│ │ │ +
650 template <class _ReversibleContainer>
│ │ │ +
651 struct _Mutable_ReversibleContainerConcept
│ │ │ +
652 {
│ │ │ +
653 typedef typename _ReversibleContainer::iterator _Iterator;
│ │ │ +
654 typedef typename _ReversibleContainer::reverse_iterator _Reverse_iterator;
│ │ │ +
655
│ │ │ +
656 void __constraints() {
│ │ │ +
657 __function_requires<_ReversibleContainerConcept<_ReversibleContainer> >();
│ │ │ +
658 __function_requires<
│ │ │ +
659 _Mutable_ForwardContainerConcept<_ReversibleContainer> >();
│ │ │ +
660 __function_requires<_Mutable_BidirectionalIteratorConcept<_Iterator> >();
│ │ │ +
661 __function_requires<
│ │ │ +
662 _Mutable_BidirectionalIteratorConcept<_Reverse_iterator> >();
│ │ │ +
663
│ │ │ +
664 _Reverse_iterator __i = __c.rbegin();
│ │ │ +
665 __i = __c.rend();
│ │ │ +
666 }
│ │ │ +
667 _ReversibleContainer __c;
│ │ │ +
668 };
│ │ │ +
669
│ │ │ +
670 template <class _RandomAccessContainer>
│ │ │ +
671 struct _RandomAccessContainerConcept
│ │ │ +
672 {
│ │ │ +
673 typedef typename _RandomAccessContainer::size_type _Size_type;
│ │ │ +
674 typedef typename _RandomAccessContainer::const_reference _Const_reference;
│ │ │ +
675 typedef typename _RandomAccessContainer::const_iterator _Const_iterator;
│ │ │ +
676 typedef typename _RandomAccessContainer::const_reverse_iterator
│ │ │ +
677 _Const_reverse_iterator;
│ │ │ +
678
│ │ │ +
679 void __constraints() {
│ │ │ +
680 __function_requires<
│ │ │ +
681 _ReversibleContainerConcept<_RandomAccessContainer> >();
│ │ │ +
682 __function_requires< _RandomAccessIteratorConcept<_Const_iterator> >();
│ │ │ +
683 __function_requires<
│ │ │ +
684 _RandomAccessIteratorConcept<_Const_reverse_iterator> >();
│ │ │ +
685
│ │ │ +
686 const _RandomAccessContainer __c;
│ │ │ +
687 _Const_reference __r _IsUnused = __c[__n];
│ │ │ +
688 }
│ │ │ +
689 _Size_type __n;
│ │ │ +
690 };
│ │ │ +
691
│ │ │ +
692 template <class _RandomAccessContainer>
│ │ │ +
693 struct _Mutable_RandomAccessContainerConcept
│ │ │ +
694 {
│ │ │ +
695 typedef typename _RandomAccessContainer::size_type _Size_type;
│ │ │ +
696 typedef typename _RandomAccessContainer::reference _Reference;
│ │ │ +
697 typedef typename _RandomAccessContainer::iterator _Iterator;
│ │ │ +
698 typedef typename _RandomAccessContainer::reverse_iterator _Reverse_iterator;
│ │ │ +
699
│ │ │ +
700 void __constraints() {
│ │ │ +
701 __function_requires<
│ │ │ +
702 _RandomAccessContainerConcept<_RandomAccessContainer> >();
│ │ │ +
703 __function_requires<
│ │ │ +
704 _Mutable_ReversibleContainerConcept<_RandomAccessContainer> >();
│ │ │ +
705 __function_requires< _Mutable_RandomAccessIteratorConcept<_Iterator> >();
│ │ │ +
706 __function_requires<
│ │ │ +
707 _Mutable_RandomAccessIteratorConcept<_Reverse_iterator> >();
│ │ │ +
708
│ │ │ +
709 _Reference __r _IsUnused = __c[__i];
│ │ │ +
710 }
│ │ │ +
711 _Size_type __i;
│ │ │ +
712 _RandomAccessContainer __c;
│ │ │ +
713 };
│ │ │ +
714
│ │ │ +
715 // A Sequence is inherently mutable
│ │ │ +
716 template <class _Sequence>
│ │ │ +
717 struct _SequenceConcept
│ │ │ +
718 {
│ │ │ +
719 typedef typename _Sequence::reference _Reference;
│ │ │ +
720 typedef typename _Sequence::const_reference _Const_reference;
│ │ │ +
721
│ │ │ +
722 void __constraints() {
│ │ │ +
723 // Matt Austern's book puts DefaultConstructible here, the C++
│ │ │ +
724 // standard places it in Container
│ │ │ +
725 // function_requires< DefaultConstructible<Sequence> >();
│ │ │ +
726 __function_requires< _Mutable_ForwardContainerConcept<_Sequence> >();
│ │ │ +
727 __function_requires< _DefaultConstructibleConcept<_Sequence> >();
│ │ │ +
728
│ │ │ +
729 _Sequence
│ │ │ +
730 __c _IsUnused(__n, __t),
│ │ │ +
731 __c2 _IsUnused(__first, __last);
│ │ │ +
732
│ │ │ +
733 __c.insert(__p, __t);
│ │ │ +
734 __c.insert(__p, __n, __t);
│ │ │ +
735 __c.insert(__p, __first, __last);
│ │ │ +
736
│ │ │ +
737 __c.erase(__p);
│ │ │ +
738 __c.erase(__p, __q);
│ │ │ +
739
│ │ │ +
740 _Reference __r _IsUnused = __c.front();
│ │ │ +
741
│ │ │ +
742 __const_constraints(__c);
│ │ │ +
743 }
│ │ │ +
744 void __const_constraints(const _Sequence& __c) {
│ │ │ +
745 _Const_reference __r _IsUnused = __c.front();
│ │ │ +
746 }
│ │ │ +
747 typename _Sequence::value_type __t;
│ │ │ +
748 typename _Sequence::size_type __n;
│ │ │ +
749 typename _Sequence::value_type *__first, *__last;
│ │ │ +
750 typename _Sequence::iterator __p, __q;
│ │ │ +
751 };
│ │ │ +
752
│ │ │ +
753 template <class _FrontInsertionSequence>
│ │ │ +
754 struct _FrontInsertionSequenceConcept
│ │ │ +
755 {
│ │ │ +
756 void __constraints() {
│ │ │ +
757 __function_requires< _SequenceConcept<_FrontInsertionSequence> >();
│ │ │ +
758
│ │ │ +
759 __c.push_front(__t);
│ │ │ +
760 __c.pop_front();
│ │ │ +
761 }
│ │ │ +
762 _FrontInsertionSequence __c;
│ │ │ +
763 typename _FrontInsertionSequence::value_type __t;
│ │ │ +
764 };
│ │ │ +
765
│ │ │ +
766 template <class _BackInsertionSequence>
│ │ │ +
767 struct _BackInsertionSequenceConcept
│ │ │ +
768 {
│ │ │ +
769 typedef typename _BackInsertionSequence::reference _Reference;
│ │ │ +
770 typedef typename _BackInsertionSequence::const_reference _Const_reference;
│ │ │ +
771
│ │ │ +
772 void __constraints() {
│ │ │ +
773 __function_requires< _SequenceConcept<_BackInsertionSequence> >();
│ │ │ +
774
│ │ │ +
775 __c.push_back(__t);
│ │ │ +
776 __c.pop_back();
│ │ │ +
777 _Reference __r _IsUnused = __c.back();
│ │ │ +
778 }
│ │ │ +
779 void __const_constraints(const _BackInsertionSequence& __c) {
│ │ │ +
780 _Const_reference __r _IsUnused = __c.back();
│ │ │ +
781 };
│ │ │ +
782 _BackInsertionSequence __c;
│ │ │ +
783 typename _BackInsertionSequence::value_type __t;
│ │ │ +
784 };
│ │ │ +
785
│ │ │ +
786_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ +
787} // namespace
│ │ │ +
788
│ │ │ +
789#pragma GCC diagnostic pop
│ │ │ +
790#undef _IsUnused
│ │ │ +
791
│ │ │ +
792#endif // _GLIBCXX_BOOST_CONCEPT_CHECK
│ │ │ +
793
│ │ │ +
794
│ │ │ + │ │ │ + │ │ │ +
GNU extensions for public use.
│ │ │
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,92 +1,828 @@ │ │ │ │ libstdc++ │ │ │ │ -cxxabi_init_exception.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// ABI Support -*- C++ -*- │ │ │ │ +1// -*- C++ -*- │ │ │ │ 2 │ │ │ │ -3// Copyright (C) 2016-2021 Free Software Foundation, Inc. │ │ │ │ +3// Copyright (C) 2004-2021 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 _t_y_p_e___i_n_f_o; │ │ │ │ -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; │ │ │ │ +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 _____g_n_u___c_x_x _GLIBCXX_VISIBILITY(default) │ │ │ │ +48{ │ │ │ │ +49_GLIBCXX_BEGIN_NAMESPACE_VERSION │ │ │ │ +50 │ │ │ │ +51#pragma GCC diagnostic push │ │ │ │ +52#pragma GCC diagnostic ignored "-Wunused-local-typedefs" │ │ │ │ +53 │ │ │ │ +54#define _IsUnused __attribute__ ((__unused__)) │ │ │ │ +55 │ │ │ │ +56// When the C-C code is in use, we would like this function to do as little │ │ │ │ +57// as possible at runtime, use as few resources as possible, and hopefully │ │ │ │ +58// be elided out of existence... hmmm. │ │ │ │ +59template │ │ │ │ +60_GLIBCXX14_CONSTEXPR inline void __function_requires() │ │ │ │ +61{ │ │ │ │ +62 void (_Concept::*__x)() _IsUnused = &_Concept::__constraints; │ │ │ │ +63} │ │ │ │ 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 *)) _GLIBCXX_NOTHROW; │ │ │ │ -72 │ │ │ │ -73 } │ │ │ │ -74} // namespace __cxxabiv1 │ │ │ │ -75 │ │ │ │ -76#endif │ │ │ │ -77 │ │ │ │ -78#pragma GCC visibility pop │ │ │ │ -79 │ │ │ │ -80#endif // _CXXABI_INIT_EXCEPTION_H │ │ │ │ +65// No definition: if this is referenced, there's a problem with │ │ │ │ +66// the instantiating type not being one of the required integer types. │ │ │ │ +67// Unfortunately, this results in a link-time error, not a compile-time │ │ │ │ +error. │ │ │ │ +68void __error_type_must_be_an_integer_type(); │ │ │ │ +69void __error_type_must_be_an_unsigned_integer_type(); │ │ │ │ +70void __error_type_must_be_a_signed_integer_type(); │ │ │ │ +71 │ │ │ │ +72// ??? Should the "concept_checking*" structs begin with more than _ ? │ │ │ │ +73#define _GLIBCXX_CLASS_REQUIRES(_type_var, _ns, _concept) \ │ │ │ │ +74 typedef void (_ns::_concept <_type_var>::* _func##_type_var##_concept)(); \ │ │ │ │ +75 template <_func##_type_var##_concept _Tp1> \ │ │ │ │ +76 struct _concept_checking##_type_var##_concept { }; \ │ │ │ │ +77 typedef _concept_checking##_type_var##_concept< \ │ │ │ │ +78 &_ns::_concept <_type_var>::__constraints> \ │ │ │ │ +79 _concept_checking_typedef##_type_var##_concept │ │ │ │ +80 │ │ │ │ +81#define _GLIBCXX_CLASS_REQUIRES2(_type_var1, _type_var2, _ns, _concept) \ │ │ │ │ +82 typedef void (_ns::_concept <_type_var1,_type_var2>:: │ │ │ │ +* _func##_type_var1##_type_var2##_concept)(); \ │ │ │ │ +83 template <_func##_type_var1##_type_var2##_concept _Tp1> \ │ │ │ │ +84 struct _concept_checking##_type_var1##_type_var2##_concept { }; \ │ │ │ │ +85 typedef _concept_checking##_type_var1##_type_var2##_concept< \ │ │ │ │ +86 &_ns::_concept <_type_var1,_type_var2>::__constraints> \ │ │ │ │ +87 _concept_checking_typedef##_type_var1##_type_var2##_concept │ │ │ │ +88 │ │ │ │ +89#define _GLIBCXX_CLASS_REQUIRES3(_type_var1, _type_var2, _type_var3, _ns, │ │ │ │ +_concept) \ │ │ │ │ +90 typedef void (_ns::_concept <_type_var1,_type_var2,_type_var3>:: │ │ │ │ +* _func##_type_var1##_type_var2##_type_var3##_concept)(); \ │ │ │ │ +91 template <_func##_type_var1##_type_var2##_type_var3##_concept _Tp1> \ │ │ │ │ +92 struct _concept_checking##_type_var1##_type_var2##_type_var3##_concept { }; │ │ │ │ +\ │ │ │ │ +93 typedef _concept_checking##_type_var1##_type_var2##_type_var3##_concept< \ │ │ │ │ +94 &_ns::_concept <_type_var1,_type_var2,_type_var3>::__constraints> \ │ │ │ │ +95 _concept_checking_typedef##_type_var1##_type_var2##_type_var3##_concept │ │ │ │ +96 │ │ │ │ +97#define _GLIBCXX_CLASS_REQUIRES4(_type_var1, _type_var2, _type_var3, │ │ │ │ +_type_var4, _ns, _concept) \ │ │ │ │ +98 typedef void (_ns::_concept <_type_var1,_type_var2,_type_var3,_type_var4>:: │ │ │ │ +* _func##_type_var1##_type_var2##_type_var3##_type_var4##_concept)(); \ │ │ │ │ +99 template <_func##_type_var1##_type_var2##_type_var3##_type_var4##_concept │ │ │ │ +_Tp1> \ │ │ │ │ +100 struct │ │ │ │ +_concept_checking##_type_var1##_type_var2##_type_var3##_type_var4##_concept │ │ │ │ +{ }; \ │ │ │ │ +101 typedef │ │ │ │ +_concept_checking##_type_var1##_type_var2##_type_var3##_type_var4##_concept< \ │ │ │ │ +102 &_ns::_concept <_type_var1,_type_var2,_type_var3,_type_var4>:: │ │ │ │ +__constraints> \ │ │ │ │ +103 │ │ │ │ +_concept_checking_typedef##_type_var1##_type_var2##_type_var3##_type_var4##_concept │ │ │ │ +104 │ │ │ │ +105 │ │ │ │ +106template │ │ │ │ +107struct _Aux_require_same { }; │ │ │ │ +108 │ │ │ │ +109template │ │ │ │ +110struct _Aux_require_same<_Tp,_Tp> { typedef _Tp _Type; }; │ │ │ │ +111 │ │ │ │ +112 template │ │ │ │ +113 struct _SameTypeConcept │ │ │ │ +114 { │ │ │ │ +115 void __constraints() { │ │ │ │ +116 typedef typename _Aux_require_same<_Tp1, _Tp2>::_Type _Required; │ │ │ │ +117 } │ │ │ │ +118 }; │ │ │ │ +119 │ │ │ │ +120 template │ │ │ │ +121 struct _IntegerConcept { │ │ │ │ +122 void __constraints() { │ │ │ │ +123 __error_type_must_be_an_integer_type(); │ │ │ │ +124 } │ │ │ │ +125 }; │ │ │ │ +126 template <> struct _IntegerConcept { void __constraints() {} }; │ │ │ │ +127 template <> struct _IntegerConcept { void __constraints(){} │ │ │ │ +}; │ │ │ │ +128 template <> struct _IntegerConcept { void __constraints() {} }; │ │ │ │ +129 template <> struct _IntegerConcept { void __constraints() {} │ │ │ │ +}; │ │ │ │ +130 template <> struct _IntegerConcept { void __constraints() {} }; │ │ │ │ +131 template <> struct _IntegerConcept { void __constraints() {} │ │ │ │ +}; │ │ │ │ +132 template <> struct _IntegerConcept { void __constraints() {} }; │ │ │ │ +133 template <> struct _IntegerConcept │ │ │ │ +134 { void __constraints() {} }; │ │ │ │ +135 │ │ │ │ +136 template │ │ │ │ +137 struct _SignedIntegerConcept { │ │ │ │ +138 void __constraints() { │ │ │ │ +139 __error_type_must_be_a_signed_integer_type(); │ │ │ │ +140 } │ │ │ │ +141 }; │ │ │ │ +142 template <> struct _SignedIntegerConcept { void __constraints() {} │ │ │ │ +}; │ │ │ │ +143 template <> struct _SignedIntegerConcept { void __constraints() {} }; │ │ │ │ +144 template <> struct _SignedIntegerConcept { void __constraints() {} }; │ │ │ │ +145 template <> struct _SignedIntegerConcept { void __constraints() │ │ │ │ +{}}; │ │ │ │ +146 │ │ │ │ +147 template │ │ │ │ +148 struct _UnsignedIntegerConcept { │ │ │ │ +149 void __constraints() { │ │ │ │ +150 __error_type_must_be_an_unsigned_integer_type(); │ │ │ │ +151 } │ │ │ │ +152 }; │ │ │ │ +153 template <> struct _UnsignedIntegerConcept │ │ │ │ +154 { void __constraints() {} }; │ │ │ │ +155 template <> struct _UnsignedIntegerConcept │ │ │ │ +156 { void __constraints() {} }; │ │ │ │ +157 template <> struct _UnsignedIntegerConcept │ │ │ │ +158 { void __constraints() {} }; │ │ │ │ +159 template <> struct _UnsignedIntegerConcept │ │ │ │ +160 { void __constraints() {} }; │ │ │ │ +161 │ │ │ │ +162 // │ │ │ │ +=========================================================================== │ │ │ │ +163 // Basic Concepts │ │ │ │ +164 │ │ │ │ +165 template │ │ │ │ +166 struct _DefaultConstructibleConcept │ │ │ │ +167 { │ │ │ │ +168 void __constraints() { │ │ │ │ +169 _Tp __a _IsUnused; // require default constructor │ │ │ │ +170 } │ │ │ │ +171 }; │ │ │ │ +172 │ │ │ │ +173 template │ │ │ │ +174 struct _AssignableConcept │ │ │ │ +175 { │ │ │ │ +176 void __constraints() { │ │ │ │ +177 __a = __a; // require assignment operator │ │ │ │ +178 __const_constraints(__a); │ │ │ │ +179 } │ │ │ │ +180 void __const_constraints(const _Tp& __b) { │ │ │ │ +181 __a = __b; // const required for argument to assignment │ │ │ │ +182 } │ │ │ │ +183 _Tp __a; │ │ │ │ +184 // possibly should be "Tp* a;" and then dereference "a" in constraint │ │ │ │ +185 // functions? present way would require a default ctor, i think... │ │ │ │ +186 }; │ │ │ │ +187 │ │ │ │ +188 template │ │ │ │ +189 struct _CopyConstructibleConcept │ │ │ │ +190 { │ │ │ │ +191 void __constraints() { │ │ │ │ +192 _Tp __a(__b); // require copy constructor │ │ │ │ +193 _Tp* __ptr _IsUnused = &__a; // require address of operator │ │ │ │ +194 __const_constraints(__a); │ │ │ │ +195 } │ │ │ │ +196 void __const_constraints(const _Tp& __a) { │ │ │ │ +197 _Tp __c _IsUnused(__a); // require const copy constructor │ │ │ │ +198 const _Tp* __ptr _IsUnused = &__a; // require const address of operator │ │ │ │ +199 } │ │ │ │ +200 _Tp __b; │ │ │ │ +201 }; │ │ │ │ +202 │ │ │ │ +203 // The SGI STL version of Assignable requires copy constructor and │ │ │ │ +operator= │ │ │ │ +204 template │ │ │ │ +205 struct _SGIAssignableConcept │ │ │ │ +206 { │ │ │ │ +207 void __constraints() { │ │ │ │ +208 _Tp __b _IsUnused(__a); │ │ │ │ +209 __a = __a; // require assignment operator │ │ │ │ +210 __const_constraints(__a); │ │ │ │ +211 } │ │ │ │ +212 void __const_constraints(const _Tp& __b) { │ │ │ │ +213 _Tp __c _IsUnused(__b); │ │ │ │ +214 __a = __b; // const required for argument to assignment │ │ │ │ +215 } │ │ │ │ +216 _Tp __a; │ │ │ │ +217 }; │ │ │ │ +218 │ │ │ │ +219 template │ │ │ │ +220 struct _ConvertibleConcept │ │ │ │ +221 { │ │ │ │ +222 void __constraints() { │ │ │ │ +223 _To __y _IsUnused = __x; │ │ │ │ +224 } │ │ │ │ +225 _From __x; │ │ │ │ +226 }; │ │ │ │ +227 │ │ │ │ +228 // The C++ standard requirements for many concepts talk about return │ │ │ │ +229 // types that must be "convertible to bool". The problem with this │ │ │ │ +230 // requirement is that it leaves the door open for evil proxies that │ │ │ │ +231 // define things like operator|| with strange return types. Two │ │ │ │ +232 // possible solutions are: │ │ │ │ +233 // 1) require the return type to be exactly bool │ │ │ │ +234 // 2) stay with convertible to bool, and also │ │ │ │ +235 // specify stuff about all the logical operators. │ │ │ │ +236 // For now we just test for convertible to bool. │ │ │ │ +237 template │ │ │ │ +238 void __aux_require_boolean_expr(const _Tp& __t) { │ │ │ │ +239 bool __x _IsUnused = __t; │ │ │ │ +240 } │ │ │ │ +241 │ │ │ │ +242// FIXME │ │ │ │ +243 template │ │ │ │ +244 struct _EqualityComparableConcept │ │ │ │ +245 { │ │ │ │ +246 void __constraints() { │ │ │ │ +247 __aux_require_boolean_expr(__a == __b); │ │ │ │ +248 } │ │ │ │ +249 _Tp __a, __b; │ │ │ │ +250 }; │ │ │ │ +251 │ │ │ │ +252 template │ │ │ │ +253 struct _LessThanComparableConcept │ │ │ │ +254 { │ │ │ │ +255 void __constraints() { │ │ │ │ +256 __aux_require_boolean_expr(__a < __b); │ │ │ │ +257 } │ │ │ │ +258 _Tp __a, __b; │ │ │ │ +259 }; │ │ │ │ +260 │ │ │ │ +261 // This is equivalent to SGI STL's LessThanComparable. │ │ │ │ +262 template │ │ │ │ +263 struct _ComparableConcept │ │ │ │ +264 { │ │ │ │ +265 void __constraints() { │ │ │ │ +266 __aux_require_boolean_expr(__a < __b); │ │ │ │ +267 __aux_require_boolean_expr(__a > __b); │ │ │ │ +268 __aux_require_boolean_expr(__a <= __b); │ │ │ │ +269 __aux_require_boolean_expr(__a >= __b); │ │ │ │ +270 } │ │ │ │ +271 _Tp __a, __b; │ │ │ │ +272 }; │ │ │ │ +273 │ │ │ │ +274#define _GLIBCXX_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(_OP,_NAME) \ │ │ │ │ +275 template \ │ │ │ │ +276 struct _NAME { \ │ │ │ │ +277 void __constraints() { (void)__constraints_(); } \ │ │ │ │ +278 bool __constraints_() { \ │ │ │ │ +279 return __a _OP __b; \ │ │ │ │ +280 } \ │ │ │ │ +281 _First __a; \ │ │ │ │ +282 _Second __b; \ │ │ │ │ +283 } │ │ │ │ +284 │ │ │ │ +285#define _GLIBCXX_DEFINE_BINARY_OPERATOR_CONSTRAINT(_OP,_NAME) \ │ │ │ │ +286 template \ │ │ │ │ +287 struct _NAME { \ │ │ │ │ +288 void __constraints() { (void)__constraints_(); } \ │ │ │ │ +289 _Ret __constraints_() { \ │ │ │ │ +290 return __a _OP __b; \ │ │ │ │ +291 } \ │ │ │ │ +292 _First __a; \ │ │ │ │ +293 _Second __b; \ │ │ │ │ +294 } │ │ │ │ +295 │ │ │ │ +296 _GLIBCXX_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(==, _EqualOpConcept); │ │ │ │ +297 _GLIBCXX_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(!=, _NotEqualOpConcept); │ │ │ │ +298 _GLIBCXX_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(<, _LessThanOpConcept); │ │ │ │ +299 _GLIBCXX_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(<=, _LessEqualOpConcept); │ │ │ │ +300 _GLIBCXX_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(>, _GreaterThanOpConcept); │ │ │ │ +301 _GLIBCXX_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(>=, _GreaterEqualOpConcept); │ │ │ │ +302 │ │ │ │ +303 _GLIBCXX_DEFINE_BINARY_OPERATOR_CONSTRAINT(+, _PlusOpConcept); │ │ │ │ +304 _GLIBCXX_DEFINE_BINARY_OPERATOR_CONSTRAINT(*, _TimesOpConcept); │ │ │ │ +305 _GLIBCXX_DEFINE_BINARY_OPERATOR_CONSTRAINT(/, _DivideOpConcept); │ │ │ │ +306 _GLIBCXX_DEFINE_BINARY_OPERATOR_CONSTRAINT(-, _SubtractOpConcept); │ │ │ │ +307 _GLIBCXX_DEFINE_BINARY_OPERATOR_CONSTRAINT(%, _ModOpConcept); │ │ │ │ +308 │ │ │ │ +309#undef _GLIBCXX_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT │ │ │ │ +310#undef _GLIBCXX_DEFINE_BINARY_OPERATOR_CONSTRAINT │ │ │ │ +311 │ │ │ │ +312 // │ │ │ │ +=========================================================================== │ │ │ │ +313 // Function Object Concepts │ │ │ │ +314 │ │ │ │ +315 template │ │ │ │ +316 struct _GeneratorConcept │ │ │ │ +317 { │ │ │ │ +318 void __constraints() { │ │ │ │ +319 const _Return& __r _IsUnused = __f();// require operator() member function │ │ │ │ +320 } │ │ │ │ +321 _Func __f; │ │ │ │ +322 }; │ │ │ │ +323 │ │ │ │ +324 │ │ │ │ +325 template │ │ │ │ +326 struct _GeneratorConcept<_Func,void> │ │ │ │ +327 { │ │ │ │ +328 void __constraints() { │ │ │ │ +329 __f(); // require operator() member function │ │ │ │ +330 } │ │ │ │ +331 _Func __f; │ │ │ │ +332 }; │ │ │ │ +333 │ │ │ │ +334 template │ │ │ │ +335 struct _UnaryFunctionConcept │ │ │ │ +336 { │ │ │ │ +337 void __constraints() { │ │ │ │ +338 __r = __f(__arg); // require operator() │ │ │ │ +339 } │ │ │ │ +340 _Func __f; │ │ │ │ +341 _Arg __arg; │ │ │ │ +342 _Return __r; │ │ │ │ +343 }; │ │ │ │ +344 │ │ │ │ +345 template │ │ │ │ +346 struct _UnaryFunctionConcept<_Func, void, _Arg> { │ │ │ │ +347 void __constraints() { │ │ │ │ +348 __f(__arg); // require operator() │ │ │ │ +349 } │ │ │ │ +350 _Func __f; │ │ │ │ +351 _Arg __arg; │ │ │ │ +352 }; │ │ │ │ +353 │ │ │ │ +354 template │ │ │ │ +355 struct _BinaryFunctionConcept │ │ │ │ +356 { │ │ │ │ +357 void __constraints() { │ │ │ │ +358 __r = __f(__first, __second); // require operator() │ │ │ │ +359 } │ │ │ │ +360 _Func __f; │ │ │ │ +361 _First __first; │ │ │ │ +362 _Second __second; │ │ │ │ +363 _Return __r; │ │ │ │ +364 }; │ │ │ │ +365 │ │ │ │ +366 template │ │ │ │ +367 struct _BinaryFunctionConcept<_Func, void, _First, _Second> │ │ │ │ +368 { │ │ │ │ +369 void __constraints() { │ │ │ │ +370 __f(__first, __second); // require operator() │ │ │ │ +371 } │ │ │ │ +372 _Func __f; │ │ │ │ +373 _First __first; │ │ │ │ +374 _Second __second; │ │ │ │ +375 }; │ │ │ │ +376 │ │ │ │ +377 template │ │ │ │ +378 struct _UnaryPredicateConcept │ │ │ │ +379 { │ │ │ │ +380 void __constraints() { │ │ │ │ +381 __aux_require_boolean_expr(__f(__arg)); // require op() returning bool │ │ │ │ +382 } │ │ │ │ +383 _Func __f; │ │ │ │ +384 _Arg __arg; │ │ │ │ +385 }; │ │ │ │ +386 │ │ │ │ +387 template │ │ │ │ +388 struct _BinaryPredicateConcept │ │ │ │ +389 { │ │ │ │ +390 void __constraints() { │ │ │ │ +391 __aux_require_boolean_expr(__f(__a, __b)); // require op() returning bool │ │ │ │ +392 } │ │ │ │ +393 _Func __f; │ │ │ │ +394 _First __a; │ │ │ │ +395 _Second __b; │ │ │ │ +396 }; │ │ │ │ +397 │ │ │ │ +398 // use this when functor is used inside a container class like std::set │ │ │ │ +399 template │ │ │ │ +400 struct _Const_BinaryPredicateConcept { │ │ │ │ +401 void __constraints() { │ │ │ │ +402 __const_constraints(__f); │ │ │ │ +403 } │ │ │ │ +404 void __const_constraints(const _Func& __fun) { │ │ │ │ +405 __function_requires<_BinaryPredicateConcept<_Func, _First, _Second> >(); │ │ │ │ +406 // operator() must be a const member function │ │ │ │ +407 __aux_require_boolean_expr(__fun(__a, __b)); │ │ │ │ +408 } │ │ │ │ +409 _Func __f; │ │ │ │ +410 _First __a; │ │ │ │ +411 _Second __b; │ │ │ │ +412 }; │ │ │ │ +413 │ │ │ │ +414 // │ │ │ │ +=========================================================================== │ │ │ │ +415 // Iterator Concepts │ │ │ │ +416 │ │ │ │ +417 template │ │ │ │ +418 struct _TrivialIteratorConcept │ │ │ │ +419 { │ │ │ │ +420 void __constraints() { │ │ │ │ +421// __function_requires< _DefaultConstructibleConcept<_Tp> >(); │ │ │ │ +422 __function_requires< _AssignableConcept<_Tp> >(); │ │ │ │ +423 __function_requires< _EqualityComparableConcept<_Tp> >(); │ │ │ │ +424// typedef typename std::iterator_traits<_Tp>::value_type _V; │ │ │ │ +425 (void)*__i; // require dereference operator │ │ │ │ +426 } │ │ │ │ +427 _Tp __i; │ │ │ │ +428 }; │ │ │ │ +429 │ │ │ │ +430 template │ │ │ │ +431 struct _Mutable_TrivialIteratorConcept │ │ │ │ +432 { │ │ │ │ +433 void __constraints() { │ │ │ │ +434 __function_requires< _TrivialIteratorConcept<_Tp> >(); │ │ │ │ +435 *__i = *__j; // require dereference and assignment │ │ │ │ +436 } │ │ │ │ +437 _Tp __i, __j; │ │ │ │ +438 }; │ │ │ │ +439 │ │ │ │ +440 template │ │ │ │ +441 struct _InputIteratorConcept │ │ │ │ +442 { │ │ │ │ +443 void __constraints() { │ │ │ │ +444 __function_requires< _TrivialIteratorConcept<_Tp> >(); │ │ │ │ +445 // require iterator_traits typedef's │ │ │ │ +446 typedef typename std::iterator_traits<_Tp>::difference_type _Diff; │ │ │ │ +447// __function_requires< _SignedIntegerConcept<_Diff> >(); │ │ │ │ +448 typedef typename std::iterator_traits<_Tp>::reference _Ref; │ │ │ │ +449 typedef typename std::iterator_traits<_Tp>::pointer _Pt; │ │ │ │ +450 typedef typename std::iterator_traits<_Tp>::iterator_category _Cat; │ │ │ │ +451 __function_requires< _ConvertibleConcept< │ │ │ │ +452 typename std::iterator_traits<_Tp>::iterator_category, │ │ │ │ +453 std::input_iterator_tag> >(); │ │ │ │ +454 ++__i; // require preincrement operator │ │ │ │ +455 __i++; // require postincrement operator │ │ │ │ +456 } │ │ │ │ +457 _Tp __i; │ │ │ │ +458 }; │ │ │ │ +459 │ │ │ │ +460 template │ │ │ │ +461 struct _OutputIteratorConcept │ │ │ │ +462 { │ │ │ │ +463 void __constraints() { │ │ │ │ +464 __function_requires< _AssignableConcept<_Tp> >(); │ │ │ │ +465 ++__i; // require preincrement operator │ │ │ │ +466 __i++; // require postincrement operator │ │ │ │ +467 *__i++ = __t; // require postincrement and assignment │ │ │ │ +468 } │ │ │ │ +469 _Tp __i; │ │ │ │ +470 _ValueT __t; │ │ │ │ +471 }; │ │ │ │ +472 │ │ │ │ +473 template │ │ │ │ +474 struct _ForwardIteratorConcept │ │ │ │ +475 { │ │ │ │ +476 void __constraints() { │ │ │ │ +477 __function_requires< _InputIteratorConcept<_Tp> >(); │ │ │ │ +478 __function_requires< _DefaultConstructibleConcept<_Tp> >(); │ │ │ │ +479 __function_requires< _ConvertibleConcept< │ │ │ │ +480 typename std::iterator_traits<_Tp>::iterator_category, │ │ │ │ +481 std::forward_iterator_tag> >(); │ │ │ │ +482 typedef typename std::iterator_traits<_Tp>::reference _Ref; │ │ │ │ +483 _Ref __r _IsUnused = *__i; │ │ │ │ +484 } │ │ │ │ +485 _Tp __i; │ │ │ │ +486 }; │ │ │ │ +487 │ │ │ │ +488 template │ │ │ │ +489 struct _Mutable_ForwardIteratorConcept │ │ │ │ +490 { │ │ │ │ +491 void __constraints() { │ │ │ │ +492 __function_requires< _ForwardIteratorConcept<_Tp> >(); │ │ │ │ +493 *__i++ = *__i; // require postincrement and assignment │ │ │ │ +494 } │ │ │ │ +495 _Tp __i; │ │ │ │ +496 }; │ │ │ │ +497 │ │ │ │ +498 template │ │ │ │ +499 struct _BidirectionalIteratorConcept │ │ │ │ +500 { │ │ │ │ +501 void __constraints() { │ │ │ │ +502 __function_requires< _ForwardIteratorConcept<_Tp> >(); │ │ │ │ +503 __function_requires< _ConvertibleConcept< │ │ │ │ +504 typename std::iterator_traits<_Tp>::iterator_category, │ │ │ │ +505 std::bidirectional_iterator_tag> >(); │ │ │ │ +506 --__i; // require predecrement operator │ │ │ │ +507 __i--; // require postdecrement operator │ │ │ │ +508 } │ │ │ │ +509 _Tp __i; │ │ │ │ +510 }; │ │ │ │ +511 │ │ │ │ +512 template │ │ │ │ +513 struct _Mutable_BidirectionalIteratorConcept │ │ │ │ +514 { │ │ │ │ +515 void __constraints() { │ │ │ │ +516 __function_requires< _BidirectionalIteratorConcept<_Tp> >(); │ │ │ │ +517 __function_requires< _Mutable_ForwardIteratorConcept<_Tp> >(); │ │ │ │ +518 *__i-- = *__i; // require postdecrement and assignment │ │ │ │ +519 } │ │ │ │ +520 _Tp __i; │ │ │ │ +521 }; │ │ │ │ +522 │ │ │ │ +523 │ │ │ │ +524 template │ │ │ │ +525 struct _RandomAccessIteratorConcept │ │ │ │ +526 { │ │ │ │ +527 void __constraints() { │ │ │ │ +528 __function_requires< _BidirectionalIteratorConcept<_Tp> >(); │ │ │ │ +529 __function_requires< _ComparableConcept<_Tp> >(); │ │ │ │ +530 __function_requires< _ConvertibleConcept< │ │ │ │ +531 typename std::iterator_traits<_Tp>::iterator_category, │ │ │ │ +532 std::random_access_iterator_tag> >(); │ │ │ │ +533 // ??? We don't use _Ref, are we just checking for "referenceability"? │ │ │ │ +534 typedef typename std::iterator_traits<_Tp>::reference _Ref; │ │ │ │ +535 │ │ │ │ +536 __i += __n; // require assignment addition operator │ │ │ │ +537 __i = __i + __n; __i = __n + __i; // require addition with difference type │ │ │ │ +538 __i -= __n; // require assignment subtraction op │ │ │ │ +539 __i = __i - __n; // require subtraction with │ │ │ │ +540 // difference type │ │ │ │ +541 __n = __i - __j; // require difference operator │ │ │ │ +542 (void)__i[__n]; // require element access operator │ │ │ │ +543 } │ │ │ │ +544 _Tp __a, __b; │ │ │ │ +545 _Tp __i, __j; │ │ │ │ +546 typename std::iterator_traits<_Tp>::difference_type __n; │ │ │ │ +547 }; │ │ │ │ +548 │ │ │ │ +549 template │ │ │ │ +550 struct _Mutable_RandomAccessIteratorConcept │ │ │ │ +551 { │ │ │ │ +552 void __constraints() { │ │ │ │ +553 __function_requires< _RandomAccessIteratorConcept<_Tp> >(); │ │ │ │ +554 __function_requires< _Mutable_BidirectionalIteratorConcept<_Tp> >(); │ │ │ │ +555 __i[__n] = *__i; // require element access and assignment │ │ │ │ +556 } │ │ │ │ +557 _Tp __i; │ │ │ │ +558 typename std::iterator_traits<_Tp>::difference_type __n; │ │ │ │ +559 }; │ │ │ │ +560 │ │ │ │ +561 // │ │ │ │ +=========================================================================== │ │ │ │ +562 // Container Concepts │ │ │ │ +563 │ │ │ │ +564 template │ │ │ │ +565 struct _ContainerConcept │ │ │ │ +566 { │ │ │ │ +567 typedef typename _Container::value_type _Value_type; │ │ │ │ +568 typedef typename _Container::difference_type _Difference_type; │ │ │ │ +569 typedef typename _Container::size_type _Size_type; │ │ │ │ +570 typedef typename _Container::const_reference _Const_reference; │ │ │ │ +571 typedef typename _Container::const_pointer _Const_pointer; │ │ │ │ +572 typedef typename _Container::const_iterator _Const_iterator; │ │ │ │ +573 │ │ │ │ +574 void __constraints() { │ │ │ │ +575 __function_requires< _InputIteratorConcept<_Const_iterator> >(); │ │ │ │ +576 __function_requires< _AssignableConcept<_Container> >(); │ │ │ │ +577 const _Container __c; │ │ │ │ +578 __i = __c.begin(); │ │ │ │ +579 __i = __c.end(); │ │ │ │ +580 __n = __c.size(); │ │ │ │ +581 __n = __c.max_size(); │ │ │ │ +582 __b = __c.empty(); │ │ │ │ +583 } │ │ │ │ +584 bool __b; │ │ │ │ +585 _Const_iterator __i; │ │ │ │ +586 _Size_type __n; │ │ │ │ +587 }; │ │ │ │ +588 │ │ │ │ +589 template │ │ │ │ +590 struct _Mutable_ContainerConcept │ │ │ │ +591 { │ │ │ │ +592 typedef typename _Container::value_type _Value_type; │ │ │ │ +593 typedef typename _Container::reference _Reference; │ │ │ │ +594 typedef typename _Container::iterator _Iterator; │ │ │ │ +595 typedef typename _Container::pointer _Pointer; │ │ │ │ +596 │ │ │ │ +597 void __constraints() { │ │ │ │ +598 __function_requires< _ContainerConcept<_Container> >(); │ │ │ │ +599 __function_requires< _AssignableConcept<_Value_type> >(); │ │ │ │ +600 __function_requires< _InputIteratorConcept<_Iterator> >(); │ │ │ │ +601 │ │ │ │ +602 __i = __c.begin(); │ │ │ │ +603 __i = __c.end(); │ │ │ │ +604 __c.swap(__c2); │ │ │ │ +605 } │ │ │ │ +606 _Iterator __i; │ │ │ │ +607 _Container __c, __c2; │ │ │ │ +608 }; │ │ │ │ +609 │ │ │ │ +610 template │ │ │ │ +611 struct _ForwardContainerConcept │ │ │ │ +612 { │ │ │ │ +613 void __constraints() { │ │ │ │ +614 __function_requires< _ContainerConcept<_ForwardContainer> >(); │ │ │ │ +615 typedef typename _ForwardContainer::const_iterator _Const_iterator; │ │ │ │ +616 __function_requires< _ForwardIteratorConcept<_Const_iterator> >(); │ │ │ │ +617 } │ │ │ │ +618 }; │ │ │ │ +619 │ │ │ │ +620 template │ │ │ │ +621 struct _Mutable_ForwardContainerConcept │ │ │ │ +622 { │ │ │ │ +623 void __constraints() { │ │ │ │ +624 __function_requires< _ForwardContainerConcept<_ForwardContainer> >(); │ │ │ │ +625 __function_requires< _Mutable_ContainerConcept<_ForwardContainer> >(); │ │ │ │ +626 typedef typename _ForwardContainer::iterator _Iterator; │ │ │ │ +627 __function_requires< _Mutable_ForwardIteratorConcept<_Iterator> >(); │ │ │ │ +628 } │ │ │ │ +629 }; │ │ │ │ +630 │ │ │ │ +631 template │ │ │ │ +632 struct _ReversibleContainerConcept │ │ │ │ +633 { │ │ │ │ +634 typedef typename _ReversibleContainer::const_iterator _Const_iterator; │ │ │ │ +635 typedef typename _ReversibleContainer::const_reverse_iterator │ │ │ │ +636 _Const_reverse_iterator; │ │ │ │ +637 │ │ │ │ +638 void __constraints() { │ │ │ │ +639 __function_requires< _ForwardContainerConcept<_ReversibleContainer> >(); │ │ │ │ +640 __function_requires< _BidirectionalIteratorConcept<_Const_iterator> >(); │ │ │ │ +641 __function_requires< │ │ │ │ +642 _BidirectionalIteratorConcept<_Const_reverse_iterator> >(); │ │ │ │ +643 │ │ │ │ +644 const _ReversibleContainer __c; │ │ │ │ +645 _Const_reverse_iterator __i = __c.rbegin(); │ │ │ │ +646 __i = __c.rend(); │ │ │ │ +647 } │ │ │ │ +648 }; │ │ │ │ +649 │ │ │ │ +650 template │ │ │ │ +651 struct _Mutable_ReversibleContainerConcept │ │ │ │ +652 { │ │ │ │ +653 typedef typename _ReversibleContainer::iterator _Iterator; │ │ │ │ +654 typedef typename _ReversibleContainer::reverse_iterator _Reverse_iterator; │ │ │ │ +655 │ │ │ │ +656 void __constraints() { │ │ │ │ +657 __function_requires<_ReversibleContainerConcept<_ReversibleContainer> >(); │ │ │ │ +658 __function_requires< │ │ │ │ +659 _Mutable_ForwardContainerConcept<_ReversibleContainer> >(); │ │ │ │ +660 __function_requires<_Mutable_BidirectionalIteratorConcept<_Iterator> >(); │ │ │ │ +661 __function_requires< │ │ │ │ +662 _Mutable_BidirectionalIteratorConcept<_Reverse_iterator> >(); │ │ │ │ +663 │ │ │ │ +664 _Reverse_iterator __i = __c.rbegin(); │ │ │ │ +665 __i = __c.rend(); │ │ │ │ +666 } │ │ │ │ +667 _ReversibleContainer __c; │ │ │ │ +668 }; │ │ │ │ +669 │ │ │ │ +670 template │ │ │ │ +671 struct _RandomAccessContainerConcept │ │ │ │ +672 { │ │ │ │ +673 typedef typename _RandomAccessContainer::size_type _Size_type; │ │ │ │ +674 typedef typename _RandomAccessContainer::const_reference _Const_reference; │ │ │ │ +675 typedef typename _RandomAccessContainer::const_iterator _Const_iterator; │ │ │ │ +676 typedef typename _RandomAccessContainer::const_reverse_iterator │ │ │ │ +677 _Const_reverse_iterator; │ │ │ │ +678 │ │ │ │ +679 void __constraints() { │ │ │ │ +680 __function_requires< │ │ │ │ +681 _ReversibleContainerConcept<_RandomAccessContainer> >(); │ │ │ │ +682 __function_requires< _RandomAccessIteratorConcept<_Const_iterator> >(); │ │ │ │ +683 __function_requires< │ │ │ │ +684 _RandomAccessIteratorConcept<_Const_reverse_iterator> >(); │ │ │ │ +685 │ │ │ │ +686 const _RandomAccessContainer __c; │ │ │ │ +687 _Const_reference __r _IsUnused = __c[__n]; │ │ │ │ +688 } │ │ │ │ +689 _Size_type __n; │ │ │ │ +690 }; │ │ │ │ +691 │ │ │ │ +692 template │ │ │ │ +693 struct _Mutable_RandomAccessContainerConcept │ │ │ │ +694 { │ │ │ │ +695 typedef typename _RandomAccessContainer::size_type _Size_type; │ │ │ │ +696 typedef typename _RandomAccessContainer::reference _Reference; │ │ │ │ +697 typedef typename _RandomAccessContainer::iterator _Iterator; │ │ │ │ +698 typedef typename _RandomAccessContainer::reverse_iterator │ │ │ │ +_Reverse_iterator; │ │ │ │ +699 │ │ │ │ +700 void __constraints() { │ │ │ │ +701 __function_requires< │ │ │ │ +702 _RandomAccessContainerConcept<_RandomAccessContainer> >(); │ │ │ │ +703 __function_requires< │ │ │ │ +704 _Mutable_ReversibleContainerConcept<_RandomAccessContainer> >(); │ │ │ │ +705 __function_requires< _Mutable_RandomAccessIteratorConcept<_Iterator> >(); │ │ │ │ +706 __function_requires< │ │ │ │ +707 _Mutable_RandomAccessIteratorConcept<_Reverse_iterator> >(); │ │ │ │ +708 │ │ │ │ +709 _Reference __r _IsUnused = __c[__i]; │ │ │ │ +710 } │ │ │ │ +711 _Size_type __i; │ │ │ │ +712 _RandomAccessContainer __c; │ │ │ │ +713 }; │ │ │ │ +714 │ │ │ │ +715 // A Sequence is inherently mutable │ │ │ │ +716 template │ │ │ │ +717 struct _SequenceConcept │ │ │ │ +718 { │ │ │ │ +719 typedef typename _Sequence::reference _Reference; │ │ │ │ +720 typedef typename _Sequence::const_reference _Const_reference; │ │ │ │ +721 │ │ │ │ +722 void __constraints() { │ │ │ │ +723 // Matt Austern's book puts DefaultConstructible here, the C++ │ │ │ │ +724 // standard places it in Container │ │ │ │ +725 // function_requires< DefaultConstructible >(); │ │ │ │ +726 __function_requires< _Mutable_ForwardContainerConcept<_Sequence> >(); │ │ │ │ +727 __function_requires< _DefaultConstructibleConcept<_Sequence> >(); │ │ │ │ +728 │ │ │ │ +729 _Sequence │ │ │ │ +730 __c _IsUnused(__n, __t), │ │ │ │ +731 __c2 _IsUnused(__first, __last); │ │ │ │ +732 │ │ │ │ +733 __c.insert(__p, __t); │ │ │ │ +734 __c.insert(__p, __n, __t); │ │ │ │ +735 __c.insert(__p, __first, __last); │ │ │ │ +736 │ │ │ │ +737 __c.erase(__p); │ │ │ │ +738 __c.erase(__p, __q); │ │ │ │ +739 │ │ │ │ +740 _Reference __r _IsUnused = __c.front(); │ │ │ │ +741 │ │ │ │ +742 __const_constraints(__c); │ │ │ │ +743 } │ │ │ │ +744 void __const_constraints(const _Sequence& __c) { │ │ │ │ +745 _Const_reference __r _IsUnused = __c.front(); │ │ │ │ +746 } │ │ │ │ +747 typename _Sequence::value_type __t; │ │ │ │ +748 typename _Sequence::size_type __n; │ │ │ │ +749 typename _Sequence::value_type *__first, *__last; │ │ │ │ +750 typename _Sequence::iterator __p, __q; │ │ │ │ +751 }; │ │ │ │ +752 │ │ │ │ +753 template │ │ │ │ +754 struct _FrontInsertionSequenceConcept │ │ │ │ +755 { │ │ │ │ +756 void __constraints() { │ │ │ │ +757 __function_requires< _SequenceConcept<_FrontInsertionSequence> >(); │ │ │ │ +758 │ │ │ │ +759 __c.push_front(__t); │ │ │ │ +760 __c.pop_front(); │ │ │ │ +761 } │ │ │ │ +762 _FrontInsertionSequence __c; │ │ │ │ +763 typename _FrontInsertionSequence::value_type __t; │ │ │ │ +764 }; │ │ │ │ +765 │ │ │ │ +766 template │ │ │ │ +767 struct _BackInsertionSequenceConcept │ │ │ │ +768 { │ │ │ │ +769 typedef typename _BackInsertionSequence::reference _Reference; │ │ │ │ +770 typedef typename _BackInsertionSequence::const_reference _Const_reference; │ │ │ │ +771 │ │ │ │ +772 void __constraints() { │ │ │ │ +773 __function_requires< _SequenceConcept<_BackInsertionSequence> >(); │ │ │ │ +774 │ │ │ │ +775 __c.push_back(__t); │ │ │ │ +776 __c.pop_back(); │ │ │ │ +777 _Reference __r _IsUnused = __c.back(); │ │ │ │ +778 } │ │ │ │ +779 void __const_constraints(const _BackInsertionSequence& __c) { │ │ │ │ +780 _Const_reference __r _IsUnused = __c.back(); │ │ │ │ +781 }; │ │ │ │ +782 _BackInsertionSequence __c; │ │ │ │ +783 typename _BackInsertionSequence::value_type __t; │ │ │ │ +784 }; │ │ │ │ +785 │ │ │ │ +786_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ +787} // namespace │ │ │ │ +788 │ │ │ │ +789#pragma GCC diagnostic pop │ │ │ │ +790#undef _IsUnused │ │ │ │ +791 │ │ │ │ +792#endif // _GLIBCXX_BOOST_CONCEPT_CHECK │ │ │ │ +793 │ │ │ │ +794 │ │ │ │ +_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. │ │ │ │ -_s_t_d_:_:_t_y_p_e___i_n_f_o │ │ │ │ -Part of RTTI. │ │ │ │ -DDeeffiinniittiioonn _t_y_p_e_i_n_f_o_:_8_9 │ │ │ │ +_____g_n_u___c_x_x │ │ │ │ +GNU extensions for public use. │ │ │ │ * bbiittss │ │ │ │ - * _c_x_x_a_b_i___i_n_i_t___e_x_c_e_p_t_i_o_n_._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.15.0 │ │ ├── ./usr/share/doc/gcc-11-base/libstdc++/user/a00338.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: cxxabi_forced.h File Reference │ │ │ +libstdc++: valarray_array.tcc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -48,40 +48,86 @@ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
cxxabi_forced.h File Reference
│ │ │ +
valarray_array.tcc File Reference
│ │ │
│ │ │
│ │ │ │ │ │

Go to the source code of this file.

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

│ │ │ -Classes

class  __cxxabiv1::__forced_unwind

│ │ │ +Namespaces

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

│ │ │ +Macros

#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 <cxxabi.h>.

│ │ │ +

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

│ │ │ │ │ │ -

Definition in file cxxabi_forced.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,12 +1,52 @@ │ │ │ │ libstdc++ │ │ │ │ -cxxabi_forced.h File Reference │ │ │ │ +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_. │ │ │ │ -CCllaasssseess │ │ │ │ -class   _____c_x_x_a_b_i_v_1_:_:_____f_o_r_c_e_d___u_n_w_i_n_d │ │ │ │ +NNaammeessppaacceess │ │ │ │ +namespace   _s_t_d │ │ │ │ +MMaaccrrooss │ │ │ │ +#define  ___V_A_L_A_R_R_A_Y___A_R_R_A_Y___T_C_C │ │ │ │ +FFuunnccttiioonnss │ │ │ │ +template │ │ │ │ +void  _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 │ │ │ │ +void  _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 │ │ │ │ +void  _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 │ │ │ │ +void  _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 │ │ │ │ +void  _s_t_d_:_:_____v_a_l_a_r_r_a_y___c_o_p_y (const _Expr< _Dom, _Tp > &__e, size_t __n, _Array< │ │ │ │ + _Tp > __a) │ │ │ │ +template │ │ │ │ +void  _s_t_d_:_:_____v_a_l_a_r_r_a_y___c_o_p_y (const _Expr< _Dom, _Tp > &__e, size_t __n, _Array< │ │ │ │ + _Tp > __a, _Array< bool > __m) │ │ │ │ +template │ │ │ │ +void  _s_t_d_:_:_____v_a_l_a_r_r_a_y___c_o_p_y (const _Expr< _Dom, _Tp > &__e, size_t __n, _Array< │ │ │ │ + _Tp > __a, _Array< size_t > __i) │ │ │ │ +template │ │ │ │ +void  _s_t_d_:_:_____v_a_l_a_r_r_a_y___c_o_p_y (const _Expr< _Dom, _Tp > &__e, size_t __n, _Array< │ │ │ │ + _Tp > __a, size_t __s) │ │ │ │ +template │ │ │ │ +void  _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 │ │ │ │ +void  _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< _Dom, _Tp > &__e, size_t │ │ │ │ + __n, _Array< _Tp > __a) │ │ │ │ +template │ │ │ │ +void  _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 _c_x_x_a_b_i___f_o_r_c_e_d_._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. │ │ │ │ * bbiittss │ │ │ │ - * _c_x_x_a_b_i___f_o_r_c_e_d_._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.15.0 │ │ ├── ./usr/share/doc/gcc-11-base/libstdc++/user/a00338_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: cxxabi_forced.h Source File │ │ │ +libstdc++: valarray_array.tcc Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -48,85 +48,267 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
cxxabi_forced.h
│ │ │ +
valarray_array.tcc
│ │ │
│ │ │
│ │ │ -Go to the documentation of this file.
1// cxxabi.h subset for cancellation -*- C++ -*-
│ │ │ -
2
│ │ │ -
3// Copyright (C) 2007-2021 Free Software Foundation, Inc.
│ │ │ +Go to the documentation of this file.
1// The template and inlines for the -*- C++ -*- internal _Array helper class.
│ │ │ +
2
│ │ │ +
3// Copyright (C) 1997-2021 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 };
│ │ │ -
│ │ │ -
55}
│ │ │ -
56#endif // __cplusplus
│ │ │ -
57
│ │ │ -
58#pragma GCC visibility pop
│ │ │ -
59
│ │ │ -
60#endif // __CXXABI_FORCED_H
│ │ │ -
Thrown as part of forced unwinding.
│ │ │ +
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 */
│ │ │ +
ISO C++ entities toplevel namespace is std.
│ │ │
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,69 +1,252 @@ │ │ │ │ libstdc++ │ │ │ │ -cxxabi_forced.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// cxxabi.h subset for cancellation -*- C++ -*- │ │ │ │ +1// The template and inlines for the -*- C++ -*- internal _Array helper class. │ │ │ │ 2 │ │ │ │ -3// Copyright (C) 2007-2021 Free Software Foundation, Inc. │ │ │ │ +3// Copyright (C) 1997-2021 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 │ │ │ │ +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 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 }; │ │ │ │ -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 │ │ │ │ +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. │ │ │ │ * bbiittss │ │ │ │ - * _c_x_x_a_b_i___f_o_r_c_e_d_._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.15.0 │ │ ├── ./usr/share/doc/gcc-11-base/libstdc++/user/a00341.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: atomic_lockfree_defines.h File Reference │ │ │ +libstdc++: unique_lock.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -48,49 +48,44 @@ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
atomic_lockfree_defines.h File Reference
│ │ │ +
unique_lock.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │

Go to the source code of this file.

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

│ │ │ -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

│ │ │ +Classes

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

│ │ │ +Namespaces

namespace  std
│ │ │

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 <mutex>.

│ │ │ │ │ │ -

Definition in file atomic_lockfree_defines.h.

│ │ │ +

Definition in file unique_lock.h.

│ │ │
│ │ │
│ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,21 +1,14 @@ │ │ │ │ libstdc++ │ │ │ │ -atomic_lockfree_defines.h File Reference │ │ │ │ +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_. │ │ │ │ -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 │ │ │ │ -#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 │ │ │ │ +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 │ │ │ │ ********** 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 _u_n_i_q_u_e___l_o_c_k_._h. │ │ │ │ * bbiittss │ │ │ │ - * _a_t_o_m_i_c___l_o_c_k_f_r_e_e___d_e_f_i_n_e_s_._h │ │ │ │ + * _u_n_i_q_u_e___l_o_c_k_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.15.0 │ │ ├── ./usr/share/doc/gcc-11-base/libstdc++/user/a00341_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: atomic_lockfree_defines.h Source File │ │ │ +libstdc++: unique_lock.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -48,18 +48,18 @@ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
atomic_lockfree_defines.h
│ │ │ +
unique_lock.h
│ │ │
│ │ │
│ │ │ -Go to the documentation of this file.
1// -*- C++ -*- header.
│ │ │ +Go to the documentation of this file.
1// std::unique_lock implementation -*- C++ -*-
│ │ │
2
│ │ │
3// Copyright (C) 2008-2021 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)
│ │ │ @@ -75,61 +75,256 @@ │ │ │
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/unique_lock.h
│ │ │
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{mutex}
│ │ │
28 */
│ │ │
29
│ │ │ -
30#ifndef _GLIBCXX_ATOMIC_LOCK_FREE_H
│ │ │ -
31#define _GLIBCXX_ATOMIC_LOCK_FREE_H 1
│ │ │ +
30#ifndef _GLIBCXX_UNIQUE_LOCK_H
│ │ │ +
31#define _GLIBCXX_UNIQUE_LOCK_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
│ │ │ +
34
│ │ │ +
35#if __cplusplus < 201103L
│ │ │ +
36# include <bits/c++0x_warning.h>
│ │ │ +
37#else
│ │ │ +
38
│ │ │ +
39#include <chrono>
│ │ │ +
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 * @ingroup mutexes
│ │ │ +
55 */
│ │ │ +
56 template<typename _Mutex>
│ │ │ +
│ │ │ +
57 class unique_lock
│ │ │ +
58 {
│ │ │ +
59 public:
│ │ │ +
60 typedef _Mutex mutex_type;
│ │ │ +
61
│ │ │ +
62 unique_lock() noexcept
│ │ │ +
63 : _M_device(0), _M_owns(false)
│ │ │ +
64 { }
│ │ │
65
│ │ │ -
66#endif
│ │ │ +
66 explicit unique_lock(mutex_type& __m)
│ │ │ +
67 : _M_device(std::__addressof(__m)), _M_owns(false)
│ │ │ +
68 {
│ │ │ +
69 lock();
│ │ │ +
70 _M_owns = true;
│ │ │ +
71 }
│ │ │ +
72
│ │ │ +
73 unique_lock(mutex_type& __m, defer_lock_t) noexcept
│ │ │ +
74 : _M_device(std::__addressof(__m)), _M_owns(false)
│ │ │ +
75 { }
│ │ │ +
76
│ │ │ +
77 unique_lock(mutex_type& __m, try_to_lock_t)
│ │ │ +
78 : _M_device(std::__addressof(__m)), _M_owns(_M_device->try_lock())
│ │ │ +
79 { }
│ │ │ +
80
│ │ │ +
81 unique_lock(mutex_type& __m, adopt_lock_t) noexcept
│ │ │ +
82 : _M_device(std::__addressof(__m)), _M_owns(true)
│ │ │ +
83 {
│ │ │ +
84 // XXX calling thread owns mutex
│ │ │ +
85 }
│ │ │ +
86
│ │ │ +
87 template<typename _Clock, typename _Duration>
│ │ │ +
88 unique_lock(mutex_type& __m,
│ │ │ + │ │ │ +
90 : _M_device(std::__addressof(__m)),
│ │ │ +
91 _M_owns(_M_device->try_lock_until(__atime))
│ │ │ +
92 { }
│ │ │ +
93
│ │ │ +
94 template<typename _Rep, typename _Period>
│ │ │ +
95 unique_lock(mutex_type& __m,
│ │ │ + │ │ │ +
97 : _M_device(std::__addressof(__m)),
│ │ │ +
98 _M_owns(_M_device->try_lock_for(__rtime))
│ │ │ +
99 { }
│ │ │ +
100
│ │ │ +
101 ~unique_lock()
│ │ │ +
102 {
│ │ │ +
103 if (_M_owns)
│ │ │ +
104 unlock();
│ │ │ +
105 }
│ │ │ +
106
│ │ │ +
107 unique_lock(const unique_lock&) = delete;
│ │ │ +
108 unique_lock& operator=(const unique_lock&) = delete;
│ │ │ +
109
│ │ │ +
110 unique_lock(unique_lock&& __u) noexcept
│ │ │ +
111 : _M_device(__u._M_device), _M_owns(__u._M_owns)
│ │ │ +
112 {
│ │ │ +
113 __u._M_device = 0;
│ │ │ +
114 __u._M_owns = false;
│ │ │ +
115 }
│ │ │ +
116
│ │ │ +
117 unique_lock& operator=(unique_lock&& __u) noexcept
│ │ │ +
118 {
│ │ │ +
119 if(_M_owns)
│ │ │ +
120 unlock();
│ │ │ +
121
│ │ │ +
122 unique_lock(std::move(__u)).swap(*this);
│ │ │ +
123
│ │ │ +
124 __u._M_device = 0;
│ │ │ +
125 __u._M_owns = false;
│ │ │ +
126
│ │ │ +
127 return *this;
│ │ │ +
128 }
│ │ │ +
129
│ │ │ +
130 void
│ │ │ +
131 lock()
│ │ │ +
132 {
│ │ │ +
133 if (!_M_device)
│ │ │ +
134 __throw_system_error(int(errc::operation_not_permitted));
│ │ │ +
135 else if (_M_owns)
│ │ │ +
136 __throw_system_error(int(errc::resource_deadlock_would_occur));
│ │ │ +
137 else
│ │ │ +
138 {
│ │ │ +
139 _M_device->lock();
│ │ │ +
140 _M_owns = true;
│ │ │ +
141 }
│ │ │ +
142 }
│ │ │ +
143
│ │ │ +
144 bool
│ │ │ +
145 try_lock()
│ │ │ +
146 {
│ │ │ +
147 if (!_M_device)
│ │ │ +
148 __throw_system_error(int(errc::operation_not_permitted));
│ │ │ +
149 else if (_M_owns)
│ │ │ +
150 __throw_system_error(int(errc::resource_deadlock_would_occur));
│ │ │ +
151 else
│ │ │ +
152 {
│ │ │ +
153 _M_owns = _M_device->try_lock();
│ │ │ +
154 return _M_owns;
│ │ │ +
155 }
│ │ │ +
156 }
│ │ │ +
157
│ │ │ +
158 template<typename _Clock, typename _Duration>
│ │ │ +
159 bool
│ │ │ +
160 try_lock_until(const chrono::time_point<_Clock, _Duration>& __atime)
│ │ │ +
161 {
│ │ │ +
162 if (!_M_device)
│ │ │ +
163 __throw_system_error(int(errc::operation_not_permitted));
│ │ │ +
164 else if (_M_owns)
│ │ │ +
165 __throw_system_error(int(errc::resource_deadlock_would_occur));
│ │ │ +
166 else
│ │ │ +
167 {
│ │ │ +
168 _M_owns = _M_device->try_lock_until(__atime);
│ │ │ +
169 return _M_owns;
│ │ │ +
170 }
│ │ │ +
171 }
│ │ │ +
172
│ │ │ +
173 template<typename _Rep, typename _Period>
│ │ │ +
174 bool
│ │ │ +
175 try_lock_for(const chrono::duration<_Rep, _Period>& __rtime)
│ │ │ +
176 {
│ │ │ +
177 if (!_M_device)
│ │ │ +
178 __throw_system_error(int(errc::operation_not_permitted));
│ │ │ +
179 else if (_M_owns)
│ │ │ +
180 __throw_system_error(int(errc::resource_deadlock_would_occur));
│ │ │ +
181 else
│ │ │ +
182 {
│ │ │ +
183 _M_owns = _M_device->try_lock_for(__rtime);
│ │ │ +
184 return _M_owns;
│ │ │ +
185 }
│ │ │ +
186 }
│ │ │ +
187
│ │ │ +
188 void
│ │ │ +
189 unlock()
│ │ │ +
190 {
│ │ │ +
191 if (!_M_owns)
│ │ │ +
192 __throw_system_error(int(errc::operation_not_permitted));
│ │ │ +
193 else if (_M_device)
│ │ │ +
194 {
│ │ │ +
195 _M_device->unlock();
│ │ │ +
196 _M_owns = false;
│ │ │ +
197 }
│ │ │ +
198 }
│ │ │ +
199
│ │ │ +
200 void
│ │ │ +
201 swap(unique_lock& __u) noexcept
│ │ │ +
202 {
│ │ │ +
203 std::swap(_M_device, __u._M_device);
│ │ │ +
204 std::swap(_M_owns, __u._M_owns);
│ │ │ +
205 }
│ │ │ +
206
│ │ │ +
207 mutex_type*
│ │ │ +
208 release() noexcept
│ │ │ +
209 {
│ │ │ +
210 mutex_type* __ret = _M_device;
│ │ │ +
211 _M_device = 0;
│ │ │ +
212 _M_owns = false;
│ │ │ +
213 return __ret;
│ │ │ +
214 }
│ │ │ +
215
│ │ │ +
216 bool
│ │ │ +
217 owns_lock() const noexcept
│ │ │ +
218 { return _M_owns; }
│ │ │ +
219
│ │ │ +
220 explicit operator bool() const noexcept
│ │ │ +
221 { return owns_lock(); }
│ │ │ +
222
│ │ │ +
223 mutex_type*
│ │ │ +
224 mutex() const noexcept
│ │ │ +
225 { return _M_device; }
│ │ │ +
226
│ │ │ +
227 private:
│ │ │ +
228 mutex_type* _M_device;
│ │ │ +
229 bool _M_owns;
│ │ │ +
230 };
│ │ │ +
│ │ │ +
231
│ │ │ +
232 /// Swap overload for unique_lock objects.
│ │ │ +
233 /// @relates unique_lock
│ │ │ +
234 template<typename _Mutex>
│ │ │ +
235 inline void
│ │ │ +
│ │ │ +
236 swap(unique_lock<_Mutex>& __x, unique_lock<_Mutex>& __y) noexcept
│ │ │ +
237 { __x.swap(__y); }
│ │ │ +
│ │ │ +
238
│ │ │ +
239_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ +
240} // namespace
│ │ │ +
241
│ │ │ +
242#endif // C++11
│ │ │ +
243#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:428
│ │ │ +
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:460
│ │ │ +
chrono::time_point represents a point in time as measured by a clock
Definition chrono:873
│ │ │ +
Do not acquire ownership of the mutex.
Definition std_mutex.h:199
│ │ │ +
Try to acquire ownership of the mutex without blocking.
Definition std_mutex.h:202
│ │ │ +
Assume the calling thread has already obtained mutex ownership and manage it.
Definition std_mutex.h:206
│ │ │ +
void swap(unique_lock< _Mutex > &__x, unique_lock< _Mutex > &__y) noexcept
Swap overload for unique_lock objects.
│ │ │
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,11 +1,11 @@ │ │ │ │ libstdc++ │ │ │ │ -atomic_lockfree_defines.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// -*- C++ -*- header. │ │ │ │ +1// std::unique_lock implementation -*- C++ -*- │ │ │ │ 2 │ │ │ │ 3// Copyright (C) 2008-2021 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,52 +21,266 @@ │ │ │ │ 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/unique_lock.h │ │ │ │ 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{mutex} │ │ │ │ 28 */ │ │ │ │ 29 │ │ │ │ -30#ifndef _GLIBCXX_ATOMIC_LOCK_FREE_H │ │ │ │ -31#define _GLIBCXX_ATOMIC_LOCK_FREE_H 1 │ │ │ │ +30#ifndef _GLIBCXX_UNIQUE_LOCK_H │ │ │ │ +31#define _GLIBCXX_UNIQUE_LOCK_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 │ │ │ │ -_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 │ │ │ │ +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 <_c_h_r_o_n_o> │ │ │ │ +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 * @ingroup mutexes │ │ │ │ +55 */ │ │ │ │ +56 template │ │ │ │ +_5_7 class unique_lock │ │ │ │ +58 { │ │ │ │ +59 public: │ │ │ │ +60 typedef _Mutex mutex_type; │ │ │ │ +61 │ │ │ │ +62 unique_lock() noexcept │ │ │ │ +63 : _M_device(0), _M_owns(false) │ │ │ │ +64 { } │ │ │ │ 65 │ │ │ │ -66#endif │ │ │ │ +66 explicit unique_lock(mutex_type& __m) │ │ │ │ +67 : _M_device(_s_t_d_:_:_____a_d_d_r_e_s_s_o_f(__m)), _M_owns(false) │ │ │ │ +68 { │ │ │ │ +69 lock(); │ │ │ │ +70 _M_owns = true; │ │ │ │ +71 } │ │ │ │ +72 │ │ │ │ +73 unique_lock(mutex_type& __m, _d_e_f_e_r___l_o_c_k___t) noexcept │ │ │ │ +74 : _M_device(_s_t_d_:_:_____a_d_d_r_e_s_s_o_f(__m)), _M_owns(false) │ │ │ │ +75 { } │ │ │ │ +76 │ │ │ │ +77 unique_lock(mutex_type& __m, _t_r_y___t_o___l_o_c_k___t) │ │ │ │ +78 : _M_device(_s_t_d_:_:_____a_d_d_r_e_s_s_o_f(__m)), _M_owns(_M_device->try_lock()) │ │ │ │ +79 { } │ │ │ │ +80 │ │ │ │ +81 unique_lock(mutex_type& __m, _a_d_o_p_t___l_o_c_k___t) noexcept │ │ │ │ +82 : _M_device(_s_t_d_:_:_____a_d_d_r_e_s_s_o_f(__m)), _M_owns(true) │ │ │ │ +83 { │ │ │ │ +84 // XXX calling thread owns mutex │ │ │ │ +85 } │ │ │ │ +86 │ │ │ │ +87 template │ │ │ │ +88 unique_lock(mutex_type& __m, │ │ │ │ +89 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_>& __atime) │ │ │ │ +90 : _M_device(_s_t_d_:_:_____a_d_d_r_e_s_s_o_f(__m)), │ │ │ │ +91 _M_owns(_M_device->try_lock_until(__atime)) │ │ │ │ +92 { } │ │ │ │ +93 │ │ │ │ +94 template │ │ │ │ +95 unique_lock(mutex_type& __m, │ │ │ │ +96 const _c_h_r_o_n_o_:_:_d_u_r_a_t_i_o_n_<___R_e_p_,_ ___P_e_r_i_o_d_>& __rtime) │ │ │ │ +97 : _M_device(_s_t_d_:_:_____a_d_d_r_e_s_s_o_f(__m)), │ │ │ │ +98 _M_owns(_M_device->try_lock_for(__rtime)) │ │ │ │ +99 { } │ │ │ │ +100 │ │ │ │ +101 ~unique_lock() │ │ │ │ +102 { │ │ │ │ +103 if (_M_owns) │ │ │ │ +104 unlock(); │ │ │ │ +105 } │ │ │ │ +106 │ │ │ │ +107 unique_lock(const unique_lock&) = delete; │ │ │ │ +108 unique_lock& operator=(const unique_lock&) = delete; │ │ │ │ +109 │ │ │ │ +110 unique_lock(unique_lock&& __u) noexcept │ │ │ │ +111 : _M_device(__u._M_device), _M_owns(__u._M_owns) │ │ │ │ +112 { │ │ │ │ +113 __u._M_device = 0; │ │ │ │ +114 __u._M_owns = false; │ │ │ │ +115 } │ │ │ │ +116 │ │ │ │ +117 unique_lock& operator=(unique_lock&& __u) noexcept │ │ │ │ +118 { │ │ │ │ +119 if(_M_owns) │ │ │ │ +120 unlock(); │ │ │ │ +121 │ │ │ │ +122 unique_lock(_s_t_d_:_:_m_o_v_e(__u)).swap(*this); │ │ │ │ +123 │ │ │ │ +124 __u._M_device = 0; │ │ │ │ +125 __u._M_owns = false; │ │ │ │ +126 │ │ │ │ +127 return *this; │ │ │ │ +128 } │ │ │ │ +129 │ │ │ │ +130 void │ │ │ │ +131 lock() │ │ │ │ +132 { │ │ │ │ +133 if (!_M_device) │ │ │ │ +134 __throw_system_error(int(errc::operation_not_permitted)); │ │ │ │ +135 else if (_M_owns) │ │ │ │ +136 __throw_system_error(int(errc::resource_deadlock_would_occur)); │ │ │ │ +137 else │ │ │ │ +138 { │ │ │ │ +139 _M_device->lock(); │ │ │ │ +140 _M_owns = true; │ │ │ │ +141 } │ │ │ │ +142 } │ │ │ │ +143 │ │ │ │ +144 bool │ │ │ │ +145 try_lock() │ │ │ │ +146 { │ │ │ │ +147 if (!_M_device) │ │ │ │ +148 __throw_system_error(int(errc::operation_not_permitted)); │ │ │ │ +149 else if (_M_owns) │ │ │ │ +150 __throw_system_error(int(errc::resource_deadlock_would_occur)); │ │ │ │ +151 else │ │ │ │ +152 { │ │ │ │ +153 _M_owns = _M_device->try_lock(); │ │ │ │ +154 return _M_owns; │ │ │ │ +155 } │ │ │ │ +156 } │ │ │ │ +157 │ │ │ │ +158 template │ │ │ │ +159 bool │ │ │ │ +160 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_>& __atime) │ │ │ │ +161 { │ │ │ │ +162 if (!_M_device) │ │ │ │ +163 __throw_system_error(int(errc::operation_not_permitted)); │ │ │ │ +164 else if (_M_owns) │ │ │ │ +165 __throw_system_error(int(errc::resource_deadlock_would_occur)); │ │ │ │ +166 else │ │ │ │ +167 { │ │ │ │ +168 _M_owns = _M_device->try_lock_until(__atime); │ │ │ │ +169 return _M_owns; │ │ │ │ +170 } │ │ │ │ +171 } │ │ │ │ +172 │ │ │ │ +173 template │ │ │ │ +174 bool │ │ │ │ +175 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_>& __rtime) │ │ │ │ +176 { │ │ │ │ +177 if (!_M_device) │ │ │ │ +178 __throw_system_error(int(errc::operation_not_permitted)); │ │ │ │ +179 else if (_M_owns) │ │ │ │ +180 __throw_system_error(int(errc::resource_deadlock_would_occur)); │ │ │ │ +181 else │ │ │ │ +182 { │ │ │ │ +183 _M_owns = _M_device->try_lock_for(__rtime); │ │ │ │ +184 return _M_owns; │ │ │ │ +185 } │ │ │ │ +186 } │ │ │ │ +187 │ │ │ │ +188 void │ │ │ │ +189 unlock() │ │ │ │ +190 { │ │ │ │ +191 if (!_M_owns) │ │ │ │ +192 __throw_system_error(int(errc::operation_not_permitted)); │ │ │ │ +193 else if (_M_device) │ │ │ │ +194 { │ │ │ │ +195 _M_device->unlock(); │ │ │ │ +196 _M_owns = false; │ │ │ │ +197 } │ │ │ │ +198 } │ │ │ │ +199 │ │ │ │ +200 void │ │ │ │ +201 swap(unique_lock& __u) noexcept │ │ │ │ +202 { │ │ │ │ +203 _s_t_d_:_:_s_w_a_p(_M_device, __u._M_device); │ │ │ │ +204 _s_t_d_:_:_s_w_a_p(_M_owns, __u._M_owns); │ │ │ │ +205 } │ │ │ │ +206 │ │ │ │ +207 mutex_type* │ │ │ │ +208 release() noexcept │ │ │ │ +209 { │ │ │ │ +210 mutex_type* __ret = _M_device; │ │ │ │ +211 _M_device = 0; │ │ │ │ +212 _M_owns = false; │ │ │ │ +213 return __ret; │ │ │ │ +214 } │ │ │ │ +215 │ │ │ │ +216 bool │ │ │ │ +217 owns_lock() const noexcept │ │ │ │ +218 { return _M_owns; } │ │ │ │ +219 │ │ │ │ +220 explicit operator bool() const noexcept │ │ │ │ +221 { return owns_lock(); } │ │ │ │ +222 │ │ │ │ +223 mutex_type* │ │ │ │ +224 mutex() const noexcept │ │ │ │ +225 { return _M_device; } │ │ │ │ +226 │ │ │ │ +227 private: │ │ │ │ +228 mutex_type* _M_device; │ │ │ │ +229 bool _M_owns; │ │ │ │ +230 }; │ │ │ │ +231 │ │ │ │ +232 /// Swap overload for unique_lock objects. │ │ │ │ +233 /// @relates unique_lock │ │ │ │ +234 template │ │ │ │ +235 inline void │ │ │ │ +_2_3_6 _s_w_a_p(unique_lock<_Mutex>& __x, unique_lock<_Mutex>& __y) noexcept │ │ │ │ +237 { __x.swap(__y); } │ │ │ │ +238 │ │ │ │ +239_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ +240} // namespace │ │ │ │ +241 │ │ │ │ +242#endif // C++11 │ │ │ │ +243#endif // _GLIBCXX_UNIQUE_LOCK_H │ │ │ │ +_c_h_r_o_n_o │ │ │ │ +_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_8 │ │ │ │ +_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_:_4_6_0 │ │ │ │ +_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_:_8_7_3 │ │ │ │ +_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_:_1_9_9 │ │ │ │ +_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_0_2 │ │ │ │ +_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_0_6 │ │ │ │ +_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_6 │ │ │ │ * bbiittss │ │ │ │ - * _a_t_o_m_i_c___l_o_c_k_f_r_e_e___d_e_f_i_n_e_s_._h │ │ │ │ + * _u_n_i_q_u_e___l_o_c_k_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.15.0 │ │ ├── ./usr/share/doc/gcc-11-base/libstdc++/user/a00344.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: vector.tcc File Reference │ │ │ +libstdc++: specfun.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -48,46 +48,167 @@ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
vector.tcc File Reference
│ │ │ +
specfun.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │

Go to the source code of this file.

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

│ │ │ Namespaces

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

│ │ │ Macros

#define _VECTOR_TCC
#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 <vector>.

│ │ │ +

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

│ │ │ │ │ │ -

Definition in file vector.tcc.

│ │ │ +

Definition in file specfun.h.

│ │ │

Macro Definition Documentation

│ │ │ - │ │ │ -

◆ _VECTOR_TCC

│ │ │ + │ │ │ +

◆ __cpp_lib_math_special_functions

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

Definition at line 39 of file specfun.h.

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

◆ __STDCPP_MATH_SPEC_FUNCS__

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

Definition at line 57 of file vector.tcc.

│ │ │ +

Definition at line 37 of file specfun.h.

│ │ │ │ │ │
│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,18 +1,179 @@ │ │ │ │ libstdc++ │ │ │ │ -vector.tcc File Reference │ │ │ │ +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 │ │ │ │ MMaaccrrooss │ │ │ │ -#define  ___V_E_C_T_O_R___T_C_C │ │ │ │ +#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 │ │ │ │ + __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 │ │ │ │ + __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 │ │ │ │ + __gnu_cxx::__promote_2< _Tpa, _Tpb >:: │ │ │ │ + __type  _s_t_d_:_:_b_e_t_a (_Tpa __a, _Tpb __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 │ │ │ │ + __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 │ │ │ │ + __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 │ │ │ │ + __gnu_cxx::__promote_2< _Tp, _Tpn >:: │ │ │ │ + __type  _s_t_d_:_:_c_o_m_p___e_l_l_i_n_t___3 (_Tp __k, _Tpn __nu) │ │ │ │ + float  _s_t_d_:_:_c_o_m_p___e_l_l_i_n_t___3_f (float __k, float │ │ │ │ + __nu) │ │ │ │ + long double  _s_t_d_:_:_c_o_m_p___e_l_l_i_n_t___3_l (long double __k, │ │ │ │ + long double __nu) │ │ │ │ +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 │ │ │ │ + __gnu_cxx::__promote_2< _Tpnu, _Tp >:: │ │ │ │ + __type  _s_t_d_:_:_c_y_l___b_e_s_s_e_l___i (_Tpnu __nu, _Tp __x) │ │ │ │ + float  _s_t_d_:_:_c_y_l___b_e_s_s_e_l___i_f (float __nu, float │ │ │ │ + __x) │ │ │ │ + long double  _s_t_d_:_:_c_y_l___b_e_s_s_e_l___i_l (long double __nu, │ │ │ │ + long double __x) │ │ │ │ +template │ │ │ │ + __gnu_cxx::__promote_2< _Tpnu, _Tp >:: │ │ │ │ + __type  _s_t_d_:_:_c_y_l___b_e_s_s_e_l___j (_Tpnu __nu, _Tp __x) │ │ │ │ + float  _s_t_d_:_:_c_y_l___b_e_s_s_e_l___j_f (float __nu, float │ │ │ │ + __x) │ │ │ │ + long double  _s_t_d_:_:_c_y_l___b_e_s_s_e_l___j_l (long double __nu, │ │ │ │ + long double __x) │ │ │ │ +template │ │ │ │ + __gnu_cxx::__promote_2< _Tpnu, _Tp >:: │ │ │ │ + __type  _s_t_d_:_:_c_y_l___b_e_s_s_e_l___k (_Tpnu __nu, _Tp __x) │ │ │ │ + float  _s_t_d_:_:_c_y_l___b_e_s_s_e_l___k_f (float __nu, float │ │ │ │ + __x) │ │ │ │ + long double  _s_t_d_:_:_c_y_l___b_e_s_s_e_l___k_l (long double __nu, │ │ │ │ + long double __x) │ │ │ │ +template │ │ │ │ + __gnu_cxx::__promote_2< _Tpnu, _Tp >:: │ │ │ │ + __type  _s_t_d_:_:_c_y_l___n_e_u_m_a_n_n (_Tpnu __nu, _Tp __x) │ │ │ │ + float  _s_t_d_:_:_c_y_l___n_e_u_m_a_n_n_f (float __nu, float │ │ │ │ + __x) │ │ │ │ + long double  _s_t_d_:_:_c_y_l___n_e_u_m_a_n_n_l (long double __nu, │ │ │ │ + long double __x) │ │ │ │ +template │ │ │ │ + __gnu_cxx::__promote_2< _Tp, _Tpp >:: │ │ │ │ + __type  _s_t_d_:_:_e_l_l_i_n_t___1 (_Tp __k, _Tpp __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 │ │ │ │ + __gnu_cxx::__promote_2< _Tp, _Tpp >:: │ │ │ │ + __type  _s_t_d_:_:_e_l_l_i_n_t___2 (_Tp __k, _Tpp __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 │ │ │ │ +__gnu_cxx::__promote_3< _Tp, _Tpn, _Tpp _s_t_d_:_:_e_l_l_i_n_t___3 (_Tp __k, _Tpn __nu, _Tpp │ │ │ │ + >::__type  __phi) │ │ │ │ + float  _s_t_d_:_:_e_l_l_i_n_t___3_f (float __k, float __nu, │ │ │ │ + float __phi) │ │ │ │ + long double  _s_t_d_:_:_e_l_l_i_n_t___3_l (long double __k, long │ │ │ │ + double __nu, long double __phi) │ │ │ │ +template │ │ │ │ + __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 │ │ │ │ + __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 │ │ │ │ + __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 │ │ │ │ + __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 │ │ │ │ + __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 │ │ │ │ + __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 │ │ │ │ + __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 __theta) │ │ │ │ + float  _s_t_d_:_:_s_p_h___l_e_g_e_n_d_r_e_f (unsigned int __l, │ │ │ │ + unsigned int __m, float __theta) │ │ │ │ + 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 __theta) │ │ │ │ +template │ │ │ │ + __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_e_c_t_o_r_._t_c_c. │ │ │ │ +attempt to use it directly. Instead, include . │ │ │ │ +Definition in file _s_p_e_c_f_u_n_._h. │ │ │ │ ********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ -********** _?◆_? __VVEECCTTOORR__TTCCCC ********** │ │ │ │ -#define _VECTOR_TCC │ │ │ │ -Definition at line _5_7 of file _v_e_c_t_o_r_._t_c_c. │ │ │ │ +********** _?◆_? ____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. │ │ │ │ * bbiittss │ │ │ │ - * _v_e_c_t_o_r_._t_c_c │ │ │ │ + * _s_p_e_c_f_u_n_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.15.0 │ │ ├── ./usr/share/doc/gcc-11-base/libstdc++/user/a00344_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: vector.tcc Source File │ │ │ +libstdc++: specfun.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -48,20 +48,20 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
vector.tcc
│ │ │ +
specfun.h
│ │ │
│ │ │
│ │ │ -Go to the documentation of this file.
1// Vector implementation (out of line) -*- C++ -*-
│ │ │ +Go to the documentation of this file.
1// Mathematical Special Functions for -*- C++ -*-
│ │ │
2
│ │ │ -
3// Copyright (C) 2001-2021 Free Software Foundation, Inc.
│ │ │ +
3// Copyright (C) 2006-2021 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
│ │ │ @@ -74,1049 +74,1617 @@ │ │ │
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
│ │ │ -
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
│ │ │ -
59namespace std _GLIBCXX_VISIBILITY(default)
│ │ │ -
60{
│ │ │ -
61_GLIBCXX_BEGIN_NAMESPACE_VERSION
│ │ │ -
62_GLIBCXX_BEGIN_NAMESPACE_CONTAINER
│ │ │ -
63
│ │ │ -
64 template<typename _Tp, typename _Alloc>
│ │ │ -
65 void
│ │ │ -
│ │ │ - │ │ │ -
67 reserve(size_type __n)
│ │ │ -
68 {
│ │ │ -
69 if (__n > this->max_size())
│ │ │ -
70 __throw_length_error(__N("vector::reserve"));
│ │ │ -
71 if (this->capacity() < __n)
│ │ │ -
72 {
│ │ │ -
73 const size_type __old_size = size();
│ │ │ -
74 pointer __tmp;
│ │ │ -
75#if __cplusplus >= 201103L
│ │ │ -
76 if _GLIBCXX17_CONSTEXPR (_S_use_relocate())
│ │ │ -
77 {
│ │ │ -
78 __tmp = this->_M_allocate(__n);
│ │ │ -
79 _S_relocate(this->_M_impl._M_start, this->_M_impl._M_finish,
│ │ │ -
80 __tmp, _M_get_Tp_allocator());
│ │ │ -
81 }
│ │ │ -
82 else
│ │ │ -
83#endif
│ │ │ -
84 {
│ │ │ -
85 __tmp = _M_allocate_and_copy(__n,
│ │ │ -
86 _GLIBCXX_MAKE_MOVE_IF_NOEXCEPT_ITERATOR(this->_M_impl._M_start),
│ │ │ -
87 _GLIBCXX_MAKE_MOVE_IF_NOEXCEPT_ITERATOR(this->_M_impl._M_finish));
│ │ │ -
88 std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
│ │ │ -
89 _M_get_Tp_allocator());
│ │ │ -
90 }
│ │ │ -
91 _GLIBCXX_ASAN_ANNOTATE_REINIT;
│ │ │ -
92 _M_deallocate(this->_M_impl._M_start,
│ │ │ -
93 this->_M_impl._M_end_of_storage
│ │ │ -
94 - this->_M_impl._M_start);
│ │ │ -
95 this->_M_impl._M_start = __tmp;
│ │ │ -
96 this->_M_impl._M_finish = __tmp + __old_size;
│ │ │ -
97 this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n;
│ │ │ -
98 }
│ │ │ -
99 }
│ │ │ -
│ │ │ -
100
│ │ │ -
101#if __cplusplus >= 201103L
│ │ │ -
102 template<typename _Tp, typename _Alloc>
│ │ │ -
103 template<typename... _Args>
│ │ │ -
104#if __cplusplus > 201402L
│ │ │ -
105 typename vector<_Tp, _Alloc>::reference
│ │ │ -
106#else
│ │ │ -
107 void
│ │ │ -
108#endif
│ │ │ - │ │ │ -
110 emplace_back(_Args&&... __args)
│ │ │ -
111 {
│ │ │ -
112 if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage)
│ │ │ -
113 {
│ │ │ -
114 _GLIBCXX_ASAN_ANNOTATE_GROW(1);
│ │ │ -
115 _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish,
│ │ │ -
116 std::forward<_Args>(__args)...);
│ │ │ -
117 ++this->_M_impl._M_finish;
│ │ │ -
118 _GLIBCXX_ASAN_ANNOTATE_GREW(1);
│ │ │ -
119 }
│ │ │ -
120 else
│ │ │ -
121 _M_realloc_insert(end(), std::forward<_Args>(__args)...);
│ │ │ -
122#if __cplusplus > 201402L
│ │ │ -
123 return back();
│ │ │ -
124#endif
│ │ │ -
125 }
│ │ │ -
126#endif
│ │ │ -
127
│ │ │ -
128 template<typename _Tp, typename _Alloc>
│ │ │ -
129 typename vector<_Tp, _Alloc>::iterator
│ │ │ -
│ │ │ - │ │ │ -
131#if __cplusplus >= 201103L
│ │ │ -
132 insert(const_iterator __position, const value_type& __x)
│ │ │ -
133#else
│ │ │ -
134 insert(iterator __position, const value_type& __x)
│ │ │ -
135#endif
│ │ │ -
136 {
│ │ │ -
137 const size_type __n = __position - begin();
│ │ │ -
138 if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage)
│ │ │ -
139 if (__position == end())
│ │ │ -
140 {
│ │ │ -
141 _GLIBCXX_ASAN_ANNOTATE_GROW(1);
│ │ │ -
142 _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish,
│ │ │ -
143 __x);
│ │ │ -
144 ++this->_M_impl._M_finish;
│ │ │ -
145 _GLIBCXX_ASAN_ANNOTATE_GREW(1);
│ │ │ -
146 }
│ │ │ -
147 else
│ │ │ -
148 {
│ │ │ -
149#if __cplusplus >= 201103L
│ │ │ -
150 const auto __pos = begin() + (__position - cbegin());
│ │ │ -
151 // __x could be an existing element of this vector, so make a
│ │ │ -
152 // copy of it before _M_insert_aux moves elements around.
│ │ │ -
153 _Temporary_value __x_copy(this, __x);
│ │ │ -
154 _M_insert_aux(__pos, std::move(__x_copy._M_val()));
│ │ │ -
155#else
│ │ │ -
156 _M_insert_aux(__position, __x);
│ │ │ -
157#endif
│ │ │ -
158 }
│ │ │ -
159 else
│ │ │ -
160#if __cplusplus >= 201103L
│ │ │ -
161 _M_realloc_insert(begin() + (__position - cbegin()), __x);
│ │ │ -
162#else
│ │ │ -
163 _M_realloc_insert(__position, __x);
│ │ │ -
164#endif
│ │ │ -
165
│ │ │ -
166 return iterator(this->_M_impl._M_start + __n);
│ │ │ -
167 }
│ │ │ -
│ │ │ -
168
│ │ │ -
169 template<typename _Tp, typename _Alloc>
│ │ │ -
170 typename vector<_Tp, _Alloc>::iterator
│ │ │ - │ │ │ -
172 _M_erase(iterator __position)
│ │ │ -
173 {
│ │ │ -
174 if (__position + 1 != end())
│ │ │ -
175 _GLIBCXX_MOVE3(__position + 1, end(), __position);
│ │ │ -
176 --this->_M_impl._M_finish;
│ │ │ -
177 _Alloc_traits::destroy(this->_M_impl, this->_M_impl._M_finish);
│ │ │ -
178 _GLIBCXX_ASAN_ANNOTATE_SHRINK(1);
│ │ │ -
179 return __position;
│ │ │ -
180 }
│ │ │ -
181
│ │ │ -
182 template<typename _Tp, typename _Alloc>
│ │ │ -
183 typename vector<_Tp, _Alloc>::iterator
│ │ │ -
184 vector<_Tp, _Alloc>::
│ │ │ -
185 _M_erase(iterator __first, iterator __last)
│ │ │ -
186 {
│ │ │ -
187 if (__first != __last)
│ │ │ -
188 {
│ │ │ -
189 if (__last != end())
│ │ │ -
190 _GLIBCXX_MOVE3(__last, end(), __first);
│ │ │ -
191 _M_erase_at_end(__first.base() + (end() - __last));
│ │ │ -
192 }
│ │ │ -
193 return __first;
│ │ │ -
194 }
│ │ │ -
195
│ │ │ -
196 template<typename _Tp, typename _Alloc>
│ │ │ - │ │ │ -
│ │ │ - │ │ │ - │ │ │ -
200 {
│ │ │ -
201 if (&__x != this)
│ │ │ -
202 {
│ │ │ -
203 _GLIBCXX_ASAN_ANNOTATE_REINIT;
│ │ │ -
204#if __cplusplus >= 201103L
│ │ │ -
205 if (_Alloc_traits::_S_propagate_on_copy_assign())
│ │ │ -
206 {
│ │ │ -
207 if (!_Alloc_traits::_S_always_equal()
│ │ │ -
208 && _M_get_Tp_allocator() != __x._M_get_Tp_allocator())
│ │ │ -
209 {
│ │ │ -
210 // replacement allocator cannot free existing storage
│ │ │ -
211 this->clear();
│ │ │ -
212 _M_deallocate(this->_M_impl._M_start,
│ │ │ -
213 this->_M_impl._M_end_of_storage
│ │ │ -
214 - this->_M_impl._M_start);
│ │ │ -
215 this->_M_impl._M_start = nullptr;
│ │ │ -
216 this->_M_impl._M_finish = nullptr;
│ │ │ -
217 this->_M_impl._M_end_of_storage = nullptr;
│ │ │ -
218 }
│ │ │ -
219 std::__alloc_on_copy(_M_get_Tp_allocator(),
│ │ │ -
220 __x._M_get_Tp_allocator());
│ │ │ -
221 }
│ │ │ -
222#endif
│ │ │ -
223 const size_type __xlen = __x.size();
│ │ │ -
224 if (__xlen > capacity())
│ │ │ -
225 {
│ │ │ -
226 pointer __tmp = _M_allocate_and_copy(__xlen, __x.begin(),
│ │ │ -
227 __x.end());
│ │ │ -
228 std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
│ │ │ -
229 _M_get_Tp_allocator());
│ │ │ -
230 _M_deallocate(this->_M_impl._M_start,
│ │ │ -
231 this->_M_impl._M_end_of_storage
│ │ │ -
232 - this->_M_impl._M_start);
│ │ │ -
233 this->_M_impl._M_start = __tmp;
│ │ │ -
234 this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __xlen;
│ │ │ -
235 }
│ │ │ -
236 else if (size() >= __xlen)
│ │ │ -
237 {
│ │ │ -
238 std::_Destroy(std::copy(__x.begin(), __x.end(), begin()),
│ │ │ -
239 end(), _M_get_Tp_allocator());
│ │ │ -
240 }
│ │ │ -
241 else
│ │ │ -
242 {
│ │ │ -
243 std::copy(__x._M_impl._M_start, __x._M_impl._M_start + size(),
│ │ │ -
244 this->_M_impl._M_start);
│ │ │ -
245 std::__uninitialized_copy_a(__x._M_impl._M_start + size(),
│ │ │ -
246 __x._M_impl._M_finish,
│ │ │ -
247 this->_M_impl._M_finish,
│ │ │ -
248 _M_get_Tp_allocator());
│ │ │ -
249 }
│ │ │ -
250 this->_M_impl._M_finish = this->_M_impl._M_start + __xlen;
│ │ │ -
251 }
│ │ │ -
252 return *this;
│ │ │ -
253 }
│ │ │ -
│ │ │ -
254
│ │ │ -
255 template<typename _Tp, typename _Alloc>
│ │ │ -
256 void
│ │ │ - │ │ │ -
258 _M_fill_assign(size_t __n, const value_type& __val)
│ │ │ -
259 {
│ │ │ -
260 if (__n > capacity())
│ │ │ -
261 {
│ │ │ -
262 vector __tmp(__n, __val, _M_get_Tp_allocator());
│ │ │ -
263 __tmp._M_impl._M_swap_data(this->_M_impl);
│ │ │ -
264 }
│ │ │ -
265 else if (__n > size())
│ │ │ -
266 {
│ │ │ -
267 std::fill(begin(), end(), __val);
│ │ │ -
268 const size_type __add = __n - size();
│ │ │ -
269 _GLIBCXX_ASAN_ANNOTATE_GROW(__add);
│ │ │ -
270 this->_M_impl._M_finish =
│ │ │ -
271 std::__uninitialized_fill_n_a(this->_M_impl._M_finish,
│ │ │ -
272 __add, __val, _M_get_Tp_allocator());
│ │ │ -
273 _GLIBCXX_ASAN_ANNOTATE_GREW(__add);
│ │ │ -
274 }
│ │ │ -
275 else
│ │ │ -
276 _M_erase_at_end(std::fill_n(this->_M_impl._M_start, __n, __val));
│ │ │ -
277 }
│ │ │ +
24
│ │ │ +
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{cmath}
│ │ │ +
28 */
│ │ │ +
29
│ │ │ +
30#ifndef _GLIBCXX_BITS_SPECFUN_H
│ │ │ +
31#define _GLIBCXX_BITS_SPECFUN_H 1
│ │ │ +
32
│ │ │ +
33#pragma GCC visibility push(default)
│ │ │ +
34
│ │ │ +
35#include <bits/c++config.h>
│ │ │ +
36
│ │ │ +
37#define __STDCPP_MATH_SPEC_FUNCS__ 201003L
│ │ │ +
38
│ │ │ +
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 template<typename _Tp, typename _Alloc>
│ │ │ -
280 template<typename _InputIterator>
│ │ │ -
281 void
│ │ │ - │ │ │ -
283 _M_assign_aux(_InputIterator __first, _InputIterator __last,
│ │ │ -
284 std::input_iterator_tag)
│ │ │ -
285 {
│ │ │ -
286 pointer __cur(this->_M_impl._M_start);
│ │ │ -
287 for (; __first != __last && __cur != this->_M_impl._M_finish;
│ │ │ -
288 ++__cur, (void)++__first)
│ │ │ -
289 *__cur = *__first;
│ │ │ -
290 if (__first == __last)
│ │ │ -
291 _M_erase_at_end(__cur);
│ │ │ -
292 else
│ │ │ -
293 _M_range_insert(end(), __first, __last,
│ │ │ -
294 std::__iterator_category(__first));
│ │ │ -
295 }
│ │ │ -
296
│ │ │ -
297 template<typename _Tp, typename _Alloc>
│ │ │ -
298 template<typename _ForwardIterator>
│ │ │ -
299 void
│ │ │ - │ │ │ -
301 _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last,
│ │ │ -
302 std::forward_iterator_tag)
│ │ │ -
303 {
│ │ │ -
304 const size_type __len = std::distance(__first, __last);
│ │ │ -
305
│ │ │ -
306 if (__len > capacity())
│ │ │ -
307 {
│ │ │ -
308 _S_check_init_len(__len, _M_get_Tp_allocator());
│ │ │ -
309 pointer __tmp(_M_allocate_and_copy(__len, __first, __last));
│ │ │ -
310 std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
│ │ │ -
311 _M_get_Tp_allocator());
│ │ │ -
312 _GLIBCXX_ASAN_ANNOTATE_REINIT;
│ │ │ -
313 _M_deallocate(this->_M_impl._M_start,
│ │ │ -
314 this->_M_impl._M_end_of_storage
│ │ │ -
315 - this->_M_impl._M_start);
│ │ │ -
316 this->_M_impl._M_start = __tmp;
│ │ │ -
317 this->_M_impl._M_finish = this->_M_impl._M_start + __len;
│ │ │ -
318 this->_M_impl._M_end_of_storage = this->_M_impl._M_finish;
│ │ │ -
319 }
│ │ │ -
320 else if (size() >= __len)
│ │ │ -
321 _M_erase_at_end(std::copy(__first, __last, this->_M_impl._M_start));
│ │ │ -
322 else
│ │ │ -
323 {
│ │ │ -
324 _ForwardIterator __mid = __first;
│ │ │ -
325 std::advance(__mid, size());
│ │ │ -
326 std::copy(__first, __mid, this->_M_impl._M_start);
│ │ │ -
327 const size_type __attribute__((__unused__)) __n = __len - size();
│ │ │ -
328 _GLIBCXX_ASAN_ANNOTATE_GROW(__n);
│ │ │ -
329 this->_M_impl._M_finish =
│ │ │ -
330 std::__uninitialized_copy_a(__mid, __last,
│ │ │ -
331 this->_M_impl._M_finish,
│ │ │ -
332 _M_get_Tp_allocator());
│ │ │ -
333 _GLIBCXX_ASAN_ANNOTATE_GREW(__n);
│ │ │ -
334 }
│ │ │ -
335 }
│ │ │ -
336
│ │ │ -
337#if __cplusplus >= 201103L
│ │ │ -
338 template<typename _Tp, typename _Alloc>
│ │ │ -
339 auto
│ │ │ - │ │ │ -
341 _M_insert_rval(const_iterator __position, value_type&& __v) -> iterator
│ │ │ -
342 {
│ │ │ -
343 const auto __n = __position - cbegin();
│ │ │ -
344 if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage)
│ │ │ -
345 if (__position == cend())
│ │ │ -
346 {
│ │ │ -
347 _GLIBCXX_ASAN_ANNOTATE_GROW(1);
│ │ │ -
348 _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish,
│ │ │ -
349 std::move(__v));
│ │ │ -
350 ++this->_M_impl._M_finish;
│ │ │ -
351 _GLIBCXX_ASAN_ANNOTATE_GREW(1);
│ │ │ -
352 }
│ │ │ -
353 else
│ │ │ -
354 _M_insert_aux(begin() + __n, std::move(__v));
│ │ │ -
355 else
│ │ │ -
356 _M_realloc_insert(begin() + __n, std::move(__v));
│ │ │ -
357
│ │ │ -
358 return iterator(this->_M_impl._M_start + __n);
│ │ │ -
359 }
│ │ │ -
360
│ │ │ -
361 template<typename _Tp, typename _Alloc>
│ │ │ -
362 template<typename... _Args>
│ │ │ -
363 auto
│ │ │ - │ │ │ -
365 _M_emplace_aux(const_iterator __position, _Args&&... __args)
│ │ │ -
366 -> iterator
│ │ │ -
367 {
│ │ │ -
368 const auto __n = __position - cbegin();
│ │ │ -
369 if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage)
│ │ │ -
370 if (__position == cend())
│ │ │ -
371 {
│ │ │ -
372 _GLIBCXX_ASAN_ANNOTATE_GROW(1);
│ │ │ -
373 _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish,
│ │ │ -
374 std::forward<_Args>(__args)...);
│ │ │ -
375 ++this->_M_impl._M_finish;
│ │ │ -
376 _GLIBCXX_ASAN_ANNOTATE_GREW(1);
│ │ │ -
377 }
│ │ │ -
378 else
│ │ │ -
379 {
│ │ │ -
380 // We need to construct a temporary because something in __args...
│ │ │ -
381 // could alias one of the elements of the container and so we
│ │ │ -
382 // need to use it before _M_insert_aux moves elements around.
│ │ │ -
383 _Temporary_value __tmp(this, std::forward<_Args>(__args)...);
│ │ │ -
384 _M_insert_aux(begin() + __n, std::move(__tmp._M_val()));
│ │ │ -
385 }
│ │ │ -
386 else
│ │ │ -
387 _M_realloc_insert(begin() + __n, std::forward<_Args>(__args)...);
│ │ │ -
388
│ │ │ -
389 return iterator(this->_M_impl._M_start + __n);
│ │ │ -
390 }
│ │ │ -
391
│ │ │ -
392 template<typename _Tp, typename _Alloc>
│ │ │ -
393 template<typename _Arg>
│ │ │ -
394 void
│ │ │ - │ │ │ -
396 _M_insert_aux(iterator __position, _Arg&& __arg)
│ │ │ -
397#else
│ │ │ -
398 template<typename _Tp, typename _Alloc>
│ │ │ -
399 void
│ │ │ - │ │ │ -
401 _M_insert_aux(iterator __position, const _Tp& __x)
│ │ │ -
402#endif
│ │ │ -
403 {
│ │ │ -
404 _GLIBCXX_ASAN_ANNOTATE_GROW(1);
│ │ │ -
405 _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish,
│ │ │ -
406 _GLIBCXX_MOVE(*(this->_M_impl._M_finish - 1)));
│ │ │ -
407 ++this->_M_impl._M_finish;
│ │ │ -
408 _GLIBCXX_ASAN_ANNOTATE_GREW(1);
│ │ │ -
409#if __cplusplus < 201103L
│ │ │ -
410 _Tp __x_copy = __x;
│ │ │ -
411#endif
│ │ │ -
412 _GLIBCXX_MOVE_BACKWARD3(__position.base(),
│ │ │ -
413 this->_M_impl._M_finish - 2,
│ │ │ -
414 this->_M_impl._M_finish - 1);
│ │ │ -
415#if __cplusplus < 201103L
│ │ │ -
416 *__position = __x_copy;
│ │ │ -
417#else
│ │ │ -
418 *__position = std::forward<_Arg>(__arg);
│ │ │ -
419#endif
│ │ │ -
420 }
│ │ │ -
421
│ │ │ -
422#if __cplusplus >= 201103L
│ │ │ -
423 template<typename _Tp, typename _Alloc>
│ │ │ -
424 template<typename... _Args>
│ │ │ -
425 void
│ │ │ - │ │ │ -
427 _M_realloc_insert(iterator __position, _Args&&... __args)
│ │ │ -
428#else
│ │ │ -
429 template<typename _Tp, typename _Alloc>
│ │ │ -
430 void
│ │ │ - │ │ │ -
432 _M_realloc_insert(iterator __position, const _Tp& __x)
│ │ │ -
433#endif
│ │ │ -
434 {
│ │ │ -
435 const size_type __len =
│ │ │ -
436 _M_check_len(size_type(1), "vector::_M_realloc_insert");
│ │ │ -
437 pointer __old_start = this->_M_impl._M_start;
│ │ │ -
438 pointer __old_finish = this->_M_impl._M_finish;
│ │ │ -
439 const size_type __elems_before = __position - begin();
│ │ │ -
440 pointer __new_start(this->_M_allocate(__len));
│ │ │ -
441 pointer __new_finish(__new_start);
│ │ │ -
442 __try
│ │ │ -
443 {
│ │ │ -
444 // The order of the three operations is dictated by the C++11
│ │ │ -
445 // case, where the moves could alter a new element belonging
│ │ │ -
446 // to the existing vector. This is an issue only for callers
│ │ │ -
447 // taking the element by lvalue ref (see last bullet of C++11
│ │ │ -
448 // [res.on.arguments]).
│ │ │ -
449 _Alloc_traits::construct(this->_M_impl,
│ │ │ -
450 __new_start + __elems_before,
│ │ │ -
451#if __cplusplus >= 201103L
│ │ │ -
452 std::forward<_Args>(__args)...);
│ │ │ -
453#else
│ │ │ -
454 __x);
│ │ │ -
455#endif
│ │ │ -
456 __new_finish = pointer();
│ │ │ -
457
│ │ │ -
458#if __cplusplus >= 201103L
│ │ │ -
459 if _GLIBCXX17_CONSTEXPR (_S_use_relocate())
│ │ │ -
460 {
│ │ │ -
461 __new_finish = _S_relocate(__old_start, __position.base(),
│ │ │ -
462 __new_start, _M_get_Tp_allocator());
│ │ │ -
463
│ │ │ -
464 ++__new_finish;
│ │ │ -
465
│ │ │ -
466 __new_finish = _S_relocate(__position.base(), __old_finish,
│ │ │ -
467 __new_finish, _M_get_Tp_allocator());
│ │ │ -
468 }
│ │ │ -
469 else
│ │ │ -
470#endif
│ │ │ -
471 {
│ │ │ -
472 __new_finish
│ │ │ -
473 = std::__uninitialized_move_if_noexcept_a
│ │ │ -
474 (__old_start, __position.base(),
│ │ │ -
475 __new_start, _M_get_Tp_allocator());
│ │ │ -
476
│ │ │ -
477 ++__new_finish;
│ │ │ -
478
│ │ │ -
479 __new_finish
│ │ │ -
480 = std::__uninitialized_move_if_noexcept_a
│ │ │ -
481 (__position.base(), __old_finish,
│ │ │ -
482 __new_finish, _M_get_Tp_allocator());
│ │ │ -
483 }
│ │ │ -
484 }
│ │ │ -
485 __catch(...)
│ │ │ -
486 {
│ │ │ -
487 if (!__new_finish)
│ │ │ -
488 _Alloc_traits::destroy(this->_M_impl,
│ │ │ -
489 __new_start + __elems_before);
│ │ │ -
490 else
│ │ │ -
491 std::_Destroy(__new_start, __new_finish, _M_get_Tp_allocator());
│ │ │ -
492 _M_deallocate(__new_start, __len);
│ │ │ -
493 __throw_exception_again;
│ │ │ -
494 }
│ │ │ -
495#if __cplusplus >= 201103L
│ │ │ -
496 if _GLIBCXX17_CONSTEXPR (!_S_use_relocate())
│ │ │ -
497#endif
│ │ │ -
498 std::_Destroy(__old_start, __old_finish, _M_get_Tp_allocator());
│ │ │ -
499 _GLIBCXX_ASAN_ANNOTATE_REINIT;
│ │ │ -
500 _M_deallocate(__old_start,
│ │ │ -
501 this->_M_impl._M_end_of_storage - __old_start);
│ │ │ -
502 this->_M_impl._M_start = __new_start;
│ │ │ -
503 this->_M_impl._M_finish = __new_finish;
│ │ │ -
504 this->_M_impl._M_end_of_storage = __new_start + __len;
│ │ │ -
505 }
│ │ │ -
506
│ │ │ -
507 template<typename _Tp, typename _Alloc>
│ │ │ -
508 void
│ │ │ - │ │ │ -
510 _M_fill_insert(iterator __position, size_type __n, const value_type& __x)
│ │ │ -
511 {
│ │ │ -
512 if (__n != 0)
│ │ │ -
513 {
│ │ │ -
514 if (size_type(this->_M_impl._M_end_of_storage
│ │ │ -
515 - this->_M_impl._M_finish) >= __n)
│ │ │ -
516 {
│ │ │ -
517#if __cplusplus < 201103L
│ │ │ -
518 value_type __x_copy = __x;
│ │ │ -
519#else
│ │ │ -
520 _Temporary_value __tmp(this, __x);
│ │ │ -
521 value_type& __x_copy = __tmp._M_val();
│ │ │ -
522#endif
│ │ │ -
523 const size_type __elems_after = end() - __position;
│ │ │ -
524 pointer __old_finish(this->_M_impl._M_finish);
│ │ │ -
525 if (__elems_after > __n)
│ │ │ -
526 {
│ │ │ -
527 _GLIBCXX_ASAN_ANNOTATE_GROW(__n);
│ │ │ -
528 std::__uninitialized_move_a(this->_M_impl._M_finish - __n,
│ │ │ -
529 this->_M_impl._M_finish,
│ │ │ -
530 this->_M_impl._M_finish,
│ │ │ -
531 _M_get_Tp_allocator());
│ │ │ -
532 this->_M_impl._M_finish += __n;
│ │ │ -
533 _GLIBCXX_ASAN_ANNOTATE_GREW(__n);
│ │ │ -
534 _GLIBCXX_MOVE_BACKWARD3(__position.base(),
│ │ │ -
535 __old_finish - __n, __old_finish);
│ │ │ -
536 std::fill(__position.base(), __position.base() + __n,
│ │ │ -
537 __x_copy);
│ │ │ -
538 }
│ │ │ -
539 else
│ │ │ -
540 {
│ │ │ -
541 _GLIBCXX_ASAN_ANNOTATE_GROW(__n);
│ │ │ -
542 this->_M_impl._M_finish =
│ │ │ -
543 std::__uninitialized_fill_n_a(this->_M_impl._M_finish,
│ │ │ -
544 __n - __elems_after,
│ │ │ -
545 __x_copy,
│ │ │ -
546 _M_get_Tp_allocator());
│ │ │ -
547 _GLIBCXX_ASAN_ANNOTATE_GREW(__n - __elems_after);
│ │ │ -
548 std::__uninitialized_move_a(__position.base(), __old_finish,
│ │ │ -
549 this->_M_impl._M_finish,
│ │ │ -
550 _M_get_Tp_allocator());
│ │ │ -
551 this->_M_impl._M_finish += __elems_after;
│ │ │ -
552 _GLIBCXX_ASAN_ANNOTATE_GREW(__elems_after);
│ │ │ -
553 std::fill(__position.base(), __old_finish, __x_copy);
│ │ │ -
554 }
│ │ │ -
555 }
│ │ │ -
556 else
│ │ │ -
557 {
│ │ │ -
558 const size_type __len =
│ │ │ -
559 _M_check_len(__n, "vector::_M_fill_insert");
│ │ │ -
560 const size_type __elems_before = __position - begin();
│ │ │ -
561 pointer __new_start(this->_M_allocate(__len));
│ │ │ -
562 pointer __new_finish(__new_start);
│ │ │ -
563 __try
│ │ │ -
564 {
│ │ │ -
565 // See _M_realloc_insert above.
│ │ │ -
566 std::__uninitialized_fill_n_a(__new_start + __elems_before,
│ │ │ -
567 __n, __x,
│ │ │ -
568 _M_get_Tp_allocator());
│ │ │ -
569 __new_finish = pointer();
│ │ │ -
570
│ │ │ -
571 __new_finish
│ │ │ -
572 = std::__uninitialized_move_if_noexcept_a
│ │ │ -
573 (this->_M_impl._M_start, __position.base(),
│ │ │ -
574 __new_start, _M_get_Tp_allocator());
│ │ │ -
575
│ │ │ -
576 __new_finish += __n;
│ │ │ -
577
│ │ │ -
578 __new_finish
│ │ │ -
579 = std::__uninitialized_move_if_noexcept_a
│ │ │ -
580 (__position.base(), this->_M_impl._M_finish,
│ │ │ -
581 __new_finish, _M_get_Tp_allocator());
│ │ │ -
582 }
│ │ │ -
583 __catch(...)
│ │ │ -
584 {
│ │ │ -
585 if (!__new_finish)
│ │ │ -
586 std::_Destroy(__new_start + __elems_before,
│ │ │ -
587 __new_start + __elems_before + __n,
│ │ │ -
588 _M_get_Tp_allocator());
│ │ │ -
589 else
│ │ │ -
590 std::_Destroy(__new_start, __new_finish,
│ │ │ -
591 _M_get_Tp_allocator());
│ │ │ -
592 _M_deallocate(__new_start, __len);
│ │ │ -
593 __throw_exception_again;
│ │ │ -
594 }
│ │ │ -
595 std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
│ │ │ -
596 _M_get_Tp_allocator());
│ │ │ -
597 _GLIBCXX_ASAN_ANNOTATE_REINIT;
│ │ │ -
598 _M_deallocate(this->_M_impl._M_start,
│ │ │ -
599 this->_M_impl._M_end_of_storage
│ │ │ -
600 - this->_M_impl._M_start);
│ │ │ -
601 this->_M_impl._M_start = __new_start;
│ │ │ -
602 this->_M_impl._M_finish = __new_finish;
│ │ │ -
603 this->_M_impl._M_end_of_storage = __new_start + __len;
│ │ │ -
604 }
│ │ │ -
605 }
│ │ │ -
606 }
│ │ │ -
607
│ │ │ -
608#if __cplusplus >= 201103L
│ │ │ -
609 template<typename _Tp, typename _Alloc>
│ │ │ -
610 void
│ │ │ - │ │ │ - │ │ │ -
613 {
│ │ │ -
614 if (__n != 0)
│ │ │ -
615 {
│ │ │ -
616 const size_type __size = size();
│ │ │ -
617 size_type __navail = size_type(this->_M_impl._M_end_of_storage
│ │ │ -
618 - this->_M_impl._M_finish);
│ │ │ -
619
│ │ │ -
620 if (__size > max_size() || __navail > max_size() - __size)
│ │ │ -
621 __builtin_unreachable();
│ │ │ -
622
│ │ │ -
623 if (__navail >= __n)
│ │ │ -
624 {
│ │ │ -
625 _GLIBCXX_ASAN_ANNOTATE_GROW(__n);
│ │ │ -
626 this->_M_impl._M_finish =
│ │ │ -
627 std::__uninitialized_default_n_a(this->_M_impl._M_finish,
│ │ │ -
628 __n, _M_get_Tp_allocator());
│ │ │ -
629 _GLIBCXX_ASAN_ANNOTATE_GREW(__n);
│ │ │ -
630 }
│ │ │ -
631 else
│ │ │ -
632 {
│ │ │ -
633 const size_type __len =
│ │ │ -
634 _M_check_len(__n, "vector::_M_default_append");
│ │ │ -
635 pointer __new_start(this->_M_allocate(__len));
│ │ │ -
636 if _GLIBCXX17_CONSTEXPR (_S_use_relocate())
│ │ │ -
637 {
│ │ │ -
638 __try
│ │ │ -
639 {
│ │ │ -
640 std::__uninitialized_default_n_a(__new_start + __size,
│ │ │ -
641 __n, _M_get_Tp_allocator());
│ │ │ -
642 }
│ │ │ -
643 __catch(...)
│ │ │ -
644 {
│ │ │ -
645 _M_deallocate(__new_start, __len);
│ │ │ -
646 __throw_exception_again;
│ │ │ -
647 }
│ │ │ -
648 _S_relocate(this->_M_impl._M_start, this->_M_impl._M_finish,
│ │ │ -
649 __new_start, _M_get_Tp_allocator());
│ │ │ -
650 }
│ │ │ -
651 else
│ │ │ -
652 {
│ │ │ -
653 pointer __destroy_from = pointer();
│ │ │ -
654 __try
│ │ │ -
655 {
│ │ │ -
656 std::__uninitialized_default_n_a(__new_start + __size,
│ │ │ -
657 __n, _M_get_Tp_allocator());
│ │ │ -
658 __destroy_from = __new_start + __size;
│ │ │ -
659 std::__uninitialized_move_if_noexcept_a(
│ │ │ -
660 this->_M_impl._M_start, this->_M_impl._M_finish,
│ │ │ -
661 __new_start, _M_get_Tp_allocator());
│ │ │ -
662 }
│ │ │ -
663 __catch(...)
│ │ │ -
664 {
│ │ │ -
665 if (__destroy_from)
│ │ │ -
666 std::_Destroy(__destroy_from, __destroy_from + __n,
│ │ │ -
667 _M_get_Tp_allocator());
│ │ │ -
668 _M_deallocate(__new_start, __len);
│ │ │ -
669 __throw_exception_again;
│ │ │ -
670 }
│ │ │ -
671 std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
│ │ │ -
672 _M_get_Tp_allocator());
│ │ │ -
673 }
│ │ │ -
674 _GLIBCXX_ASAN_ANNOTATE_REINIT;
│ │ │ -
675 _M_deallocate(this->_M_impl._M_start,
│ │ │ -
676 this->_M_impl._M_end_of_storage
│ │ │ -
677 - this->_M_impl._M_start);
│ │ │ -
678 this->_M_impl._M_start = __new_start;
│ │ │ -
679 this->_M_impl._M_finish = __new_start + __size + __n;
│ │ │ -
680 this->_M_impl._M_end_of_storage = __new_start + __len;
│ │ │ -
681 }
│ │ │ -
682 }
│ │ │ -
683 }
│ │ │ -
684
│ │ │ -
685 template<typename _Tp, typename _Alloc>
│ │ │ -
686 bool
│ │ │ - │ │ │ - │ │ │ -
689 {
│ │ │ -
690 if (capacity() == size())
│ │ │ -
691 return false;
│ │ │ -
692 _GLIBCXX_ASAN_ANNOTATE_REINIT;
│ │ │ -
693 return std::__shrink_to_fit_aux<vector>::_S_do_it(*this);
│ │ │ -
694 }
│ │ │ -
│ │ │ -
695#endif
│ │ │ -
696
│ │ │ -
697 template<typename _Tp, typename _Alloc>
│ │ │ -
698 template<typename _InputIterator>
│ │ │ -
699 void
│ │ │ - │ │ │ -
701 _M_range_insert(iterator __pos, _InputIterator __first,
│ │ │ -
702 _InputIterator __last, std::input_iterator_tag)
│ │ │ -
703 {
│ │ │ -
704 if (__pos == end())
│ │ │ -
705 {
│ │ │ -
706 for (; __first != __last; ++__first)
│ │ │ -
707 insert(end(), *__first);
│ │ │ -
708 }
│ │ │ -
709 else if (__first != __last)
│ │ │ -
710 {
│ │ │ -
711 vector __tmp(__first, __last, _M_get_Tp_allocator());
│ │ │ -
712 insert(__pos,
│ │ │ -
713 _GLIBCXX_MAKE_MOVE_ITERATOR(__tmp.begin()),
│ │ │ -
714 _GLIBCXX_MAKE_MOVE_ITERATOR(__tmp.end()));
│ │ │ -
715 }
│ │ │ -
716 }
│ │ │ -
717
│ │ │ -
718 template<typename _Tp, typename _Alloc>
│ │ │ -
719 template<typename _ForwardIterator>
│ │ │ -
720 void
│ │ │ - │ │ │ -
722 _M_range_insert(iterator __position, _ForwardIterator __first,
│ │ │ -
723 _ForwardIterator __last, std::forward_iterator_tag)
│ │ │ -
724 {
│ │ │ -
725 if (__first != __last)
│ │ │ -
726 {
│ │ │ -
727 const size_type __n = std::distance(__first, __last);
│ │ │ -
728 if (size_type(this->_M_impl._M_end_of_storage
│ │ │ -
729 - this->_M_impl._M_finish) >= __n)
│ │ │ -
730 {
│ │ │ -
731 const size_type __elems_after = end() - __position;
│ │ │ -
732 pointer __old_finish(this->_M_impl._M_finish);
│ │ │ -
733 if (__elems_after > __n)
│ │ │ -
734 {
│ │ │ -
735 _GLIBCXX_ASAN_ANNOTATE_GROW(__n);
│ │ │ -
736 std::__uninitialized_move_a(this->_M_impl._M_finish - __n,
│ │ │ -
737 this->_M_impl._M_finish,
│ │ │ -
738 this->_M_impl._M_finish,
│ │ │ -
739 _M_get_Tp_allocator());
│ │ │ -
740 this->_M_impl._M_finish += __n;
│ │ │ -
741 _GLIBCXX_ASAN_ANNOTATE_GREW(__n);
│ │ │ -
742 _GLIBCXX_MOVE_BACKWARD3(__position.base(),
│ │ │ -
743 __old_finish - __n, __old_finish);
│ │ │ -
744 std::copy(__first, __last, __position);
│ │ │ -
745 }
│ │ │ -
746 else
│ │ │ -
747 {
│ │ │ -
748 _ForwardIterator __mid = __first;
│ │ │ -
749 std::advance(__mid, __elems_after);
│ │ │ -
750 _GLIBCXX_ASAN_ANNOTATE_GROW(__n);
│ │ │ -
751 std::__uninitialized_copy_a(__mid, __last,
│ │ │ -
752 this->_M_impl._M_finish,
│ │ │ -
753 _M_get_Tp_allocator());
│ │ │ -
754 this->_M_impl._M_finish += __n - __elems_after;
│ │ │ -
755 _GLIBCXX_ASAN_ANNOTATE_GREW(__n - __elems_after);
│ │ │ -
756 std::__uninitialized_move_a(__position.base(),
│ │ │ -
757 __old_finish,
│ │ │ -
758 this->_M_impl._M_finish,
│ │ │ -
759 _M_get_Tp_allocator());
│ │ │ -
760 this->_M_impl._M_finish += __elems_after;
│ │ │ -
761 _GLIBCXX_ASAN_ANNOTATE_GREW(__elems_after);
│ │ │ -
762 std::copy(__first, __mid, __position);
│ │ │ -
763 }
│ │ │ -
764 }
│ │ │ -
765 else
│ │ │ -
766 {
│ │ │ -
767 const size_type __len =
│ │ │ -
768 _M_check_len(__n, "vector::_M_range_insert");
│ │ │ -
769 pointer __new_start(this->_M_allocate(__len));
│ │ │ -
770 pointer __new_finish(__new_start);
│ │ │ -
771 __try
│ │ │ -
772 {
│ │ │ -
773 __new_finish
│ │ │ -
774 = std::__uninitialized_move_if_noexcept_a
│ │ │ -
775 (this->_M_impl._M_start, __position.base(),
│ │ │ -
776 __new_start, _M_get_Tp_allocator());
│ │ │ -
777 __new_finish
│ │ │ -
778 = std::__uninitialized_copy_a(__first, __last,
│ │ │ -
779 __new_finish,
│ │ │ -
780 _M_get_Tp_allocator());
│ │ │ -
781 __new_finish
│ │ │ -
782 = std::__uninitialized_move_if_noexcept_a
│ │ │ -
783 (__position.base(), this->_M_impl._M_finish,
│ │ │ -
784 __new_finish, _M_get_Tp_allocator());
│ │ │ -
785 }
│ │ │ -
786 __catch(...)
│ │ │ -
787 {
│ │ │ -
788 std::_Destroy(__new_start, __new_finish,
│ │ │ -
789 _M_get_Tp_allocator());
│ │ │ -
790 _M_deallocate(__new_start, __len);
│ │ │ -
791 __throw_exception_again;
│ │ │ -
792 }
│ │ │ -
793 std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
│ │ │ -
794 _M_get_Tp_allocator());
│ │ │ -
795 _GLIBCXX_ASAN_ANNOTATE_REINIT;
│ │ │ -
796 _M_deallocate(this->_M_impl._M_start,
│ │ │ -
797 this->_M_impl._M_end_of_storage
│ │ │ -
798 - this->_M_impl._M_start);
│ │ │ -
799 this->_M_impl._M_start = __new_start;
│ │ │ -
800 this->_M_impl._M_finish = __new_finish;
│ │ │ -
801 this->_M_impl._M_end_of_storage = __new_start + __len;
│ │ │ -
802 }
│ │ │ -
803 }
│ │ │ -
804 }
│ │ │ -
805
│ │ │ -
806
│ │ │ -
807 // vector<bool>
│ │ │ -
808 template<typename _Alloc>
│ │ │ -
809 void
│ │ │ - │ │ │ - │ │ │ -
812 {
│ │ │ -
813 _Bit_pointer __q = this->_M_allocate(__n);
│ │ │ -
814 iterator __start(std::__addressof(*__q), 0);
│ │ │ -
815 iterator __finish(_M_copy_aligned(begin(), end(), __start));
│ │ │ -
816 this->_M_deallocate();
│ │ │ -
817 this->_M_impl._M_start = __start;
│ │ │ -
818 this->_M_impl._M_finish = __finish;
│ │ │ -
819 this->_M_impl._M_end_of_storage = __q + _S_nword(__n);
│ │ │ -
820 }
│ │ │ -
821
│ │ │ -
822 template<typename _Alloc>
│ │ │ -
823 void
│ │ │ - │ │ │ -
825 _M_fill_insert(iterator __position, size_type __n, bool __x)
│ │ │ -
826 {
│ │ │ -
827 if (__n == 0)
│ │ │ -
828 return;
│ │ │ -
829 if (capacity() - size() >= __n)
│ │ │ -
830 {
│ │ │ -
831 std::copy_backward(__position, end(),
│ │ │ -
832 this->_M_impl._M_finish + difference_type(__n));
│ │ │ -
833 std::fill(__position, __position + difference_type(__n), __x);
│ │ │ -
834 this->_M_impl._M_finish += difference_type(__n);
│ │ │ -
835 }
│ │ │ -
836 else
│ │ │ -
837 {
│ │ │ -
838 const size_type __len =
│ │ │ -
839 _M_check_len(__n, "vector<bool>::_M_fill_insert");
│ │ │ -
840 _Bit_pointer __q = this->_M_allocate(__len);
│ │ │ -
841 iterator __start(std::__addressof(*__q), 0);
│ │ │ -
842 iterator __i = _M_copy_aligned(begin(), __position, __start);
│ │ │ -
843 std::fill(__i, __i + difference_type(__n), __x);
│ │ │ -
844 iterator __finish = std::copy(__position, end(),
│ │ │ -
845 __i + difference_type(__n));
│ │ │ -
846 this->_M_deallocate();
│ │ │ -
847 this->_M_impl._M_end_of_storage = __q + _S_nword(__len);
│ │ │ -
848 this->_M_impl._M_start = __start;
│ │ │ -
849 this->_M_impl._M_finish = __finish;
│ │ │ -
850 }
│ │ │ -
851 }
│ │ │ -
852
│ │ │ -
853 template<typename _Alloc>
│ │ │ -
854 template<typename _ForwardIterator>
│ │ │ -
855 void
│ │ │ - │ │ │ -
857 _M_insert_range(iterator __position, _ForwardIterator __first,
│ │ │ -
858 _ForwardIterator __last, std::forward_iterator_tag)
│ │ │ -
859 {
│ │ │ -
860 if (__first != __last)
│ │ │ -
861 {
│ │ │ -
862 size_type __n = std::distance(__first, __last);
│ │ │ -
863 if (capacity() - size() >= __n)
│ │ │ -
864 {
│ │ │ -
865 std::copy_backward(__position, end(),
│ │ │ -
866 this->_M_impl._M_finish
│ │ │ -
867 + difference_type(__n));
│ │ │ -
868 std::copy(__first, __last, __position);
│ │ │ -
869 this->_M_impl._M_finish += difference_type(__n);
│ │ │ -
870 }
│ │ │ -
871 else
│ │ │ -
872 {
│ │ │ -
873 const size_type __len =
│ │ │ -
874 _M_check_len(__n, "vector<bool>::_M_insert_range");
│ │ │ -
875 _Bit_pointer __q = this->_M_allocate(__len);
│ │ │ -
876 iterator __start(std::__addressof(*__q), 0);
│ │ │ -
877 iterator __i = _M_copy_aligned(begin(), __position, __start);
│ │ │ -
878 __i = std::copy(__first, __last, __i);
│ │ │ -
879 iterator __finish = std::copy(__position, end(), __i);
│ │ │ -
880 this->_M_deallocate();
│ │ │ -
881 this->_M_impl._M_end_of_storage = __q + _S_nword(__len);
│ │ │ -
882 this->_M_impl._M_start = __start;
│ │ │ -
883 this->_M_impl._M_finish = __finish;
│ │ │ -
884 }
│ │ │ -
885 }
│ │ │ -
886 }
│ │ │ -
887
│ │ │ -
888 template<typename _Alloc>
│ │ │ -
889 void
│ │ │ - │ │ │ -
891 _M_insert_aux(iterator __position, bool __x)
│ │ │ -
892 {
│ │ │ -
893 if (this->_M_impl._M_finish._M_p != this->_M_impl._M_end_addr())
│ │ │ -
894 {
│ │ │ -
895 std::copy_backward(__position, this->_M_impl._M_finish,
│ │ │ -
896 this->_M_impl._M_finish + 1);
│ │ │ -
897 *__position = __x;
│ │ │ -
898 ++this->_M_impl._M_finish;
│ │ │ -
899 }
│ │ │ -
900 else
│ │ │ -
901 {
│ │ │ -
902 const size_type __len =
│ │ │ -
903 _M_check_len(size_type(1), "vector<bool>::_M_insert_aux");
│ │ │ -
904 _Bit_pointer __q = this->_M_allocate(__len);
│ │ │ -
905 iterator __start(std::__addressof(*__q), 0);
│ │ │ -
906 iterator __i = _M_copy_aligned(begin(), __position, __start);
│ │ │ -
907 *__i++ = __x;
│ │ │ -
908 iterator __finish = std::copy(__position, end(), __i);
│ │ │ -
909 this->_M_deallocate();
│ │ │ -
910 this->_M_impl._M_end_of_storage = __q + _S_nword(__len);
│ │ │ -
911 this->_M_impl._M_start = __start;
│ │ │ -
912 this->_M_impl._M_finish = __finish;
│ │ │ -
913 }
│ │ │ -
914 }
│ │ │ -
915
│ │ │ -
916 template<typename _Alloc>
│ │ │ -
917 typename vector<bool, _Alloc>::iterator
│ │ │ - │ │ │ -
919 _M_erase(iterator __position)
│ │ │ -
920 {
│ │ │ -
921 if (__position + 1 != end())
│ │ │ -
922 std::copy(__position + 1, end(), __position);
│ │ │ -
923 --this->_M_impl._M_finish;
│ │ │ -
924 return __position;
│ │ │ -
925 }
│ │ │ -
926
│ │ │ -
927 template<typename _Alloc>
│ │ │ -
928 typename vector<bool, _Alloc>::iterator
│ │ │ - │ │ │ -
930 _M_erase(iterator __first, iterator __last)
│ │ │ -
931 {
│ │ │ -
932 if (__first != __last)
│ │ │ -
933 _M_erase_at_end(std::copy(__last, end(), __first));
│ │ │ -
934 return __first;
│ │ │ -
935 }
│ │ │ -
936
│ │ │ -
937#if __cplusplus >= 201103L
│ │ │ -
938 template<typename _Alloc>
│ │ │ -
939 bool
│ │ │ - │ │ │ - │ │ │ -
942 {
│ │ │ -
943 if (capacity() - size() < int(_S_word_bit))
│ │ │ -
944 return false;
│ │ │ -
945 __try
│ │ │ -
946 {
│ │ │ -
947 if (size_type __n = size())
│ │ │ -
948 _M_reallocate(__n);
│ │ │ -
949 else
│ │ │ -
950 {
│ │ │ -
951 this->_M_deallocate();
│ │ │ -
952 this->_M_impl._M_reset();
│ │ │ -
953 }
│ │ │ -
954 return true;
│ │ │ -
955 }
│ │ │ -
956 __catch(...)
│ │ │ -
957 { return false; }
│ │ │ -
958 }
│ │ │ -
959#endif
│ │ │ -
960
│ │ │ -
961_GLIBCXX_END_NAMESPACE_CONTAINER
│ │ │ -
962_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ -
963} // namespace std
│ │ │ -
964
│ │ │ -
965#if __cplusplus >= 201103L
│ │ │ -
966
│ │ │ -
967namespace std _GLIBCXX_VISIBILITY(default)
│ │ │ -
968{
│ │ │ -
969_GLIBCXX_BEGIN_NAMESPACE_VERSION
│ │ │ -
970
│ │ │ -
971 template<typename _Alloc>
│ │ │ -
972 size_t
│ │ │ - │ │ │ -
974 operator()(const _GLIBCXX_STD_C::vector<bool, _Alloc>& __b) const noexcept
│ │ │ -
975 {
│ │ │ -
976 size_t __hash = 0;
│ │ │ -
977 using _GLIBCXX_STD_C::_S_word_bit;
│ │ │ -
978 using _GLIBCXX_STD_C::_Bit_type;
│ │ │ -
979
│ │ │ -
980 const size_t __words = __b.size() / _S_word_bit;
│ │ │ -
981 if (__words)
│ │ │ -
982 {
│ │ │ -
983 const size_t __clength = __words * sizeof(_Bit_type);
│ │ │ -
984 __hash = std::_Hash_impl::hash(__b._M_impl._M_start._M_p, __clength);
│ │ │ -
985 }
│ │ │ -
986
│ │ │ -
987 const size_t __extrabits = __b.size() % _S_word_bit;
│ │ │ -
988 if (__extrabits)
│ │ │ -
989 {
│ │ │ -
990 _Bit_type __hiword = *__b._M_impl._M_finish._M_p;
│ │ │ -
991 __hiword &= ~((~static_cast<_Bit_type>(0)) << __extrabits);
│ │ │ -
992
│ │ │ -
993 const size_t __clength
│ │ │ -
994 = (__extrabits + __CHAR_BIT__ - 1) / __CHAR_BIT__;
│ │ │ -
995 if (__words)
│ │ │ -
996 __hash = std::_Hash_impl::hash(&__hiword, __clength, __hash);
│ │ │ -
997 else
│ │ │ -
998 __hash = std::_Hash_impl::hash(&__hiword, __clength);
│ │ │ -
999 }
│ │ │ -
1000
│ │ │ -
1001 return __hash;
│ │ │ -
1002 }
│ │ │ -
1003
│ │ │ -
1004_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ -
1005} // namespace std
│ │ │ -
1006
│ │ │ -
1007#endif // C++11
│ │ │ -
1008
│ │ │ -
1009#undef _GLIBCXX_ASAN_ANNOTATE_REINIT
│ │ │ -
1010#undef _GLIBCXX_ASAN_ANNOTATE_GROW
│ │ │ -
1011#undef _GLIBCXX_ASAN_ANNOTATE_GREW
│ │ │ -
1012#undef _GLIBCXX_ASAN_ANNOTATE_SHRINK
│ │ │ -
1013
│ │ │ -
1014#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
│ │ │ -
constexpr _Tp && forward(typename std::remove_reference< _Tp >::type &__t) noexcept
Forward an lvalue.
Definition move.h:77
│ │ │ -
_Tp * end(valarray< _Tp > &__va) noexcept
Return an iterator pointing to one past the last element of the valarray.
Definition valarray:1239
│ │ │ -
_Tp * begin(valarray< _Tp > &__va) noexcept
Return an iterator pointing to the first element of the valarray.
Definition valarray:1217
│ │ │ -
constexpr iterator_traits< _Iter >::iterator_category __iterator_category(const _Iter &)
│ │ │ +
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
│ │ │ +
│ │ │ +
358 comp_ellint_1f(float __k)
│ │ │ +
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 // 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
│ │ │ +
│ │ │ +
406 comp_ellint_2f(float __k)
│ │ │ +
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
│ │ │ +
│ │ │ +
489 comp_ellint_3(_Tp __k, _Tpn __nu)
│ │ │ +
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
│ │ │ +
│ │ │ +
535 cyl_bessel_i(_Tpnu __nu, _Tp __x)
│ │ │ +
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
│ │ │ +
│ │ │ +
581 cyl_bessel_j(_Tpnu __nu, _Tp __x)
│ │ │ +
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
│ │ │ +
│ │ │ +
633 cyl_bessel_k(_Tpnu __nu, _Tp __x)
│ │ │ +
634 {
│ │ │ +
635 typedef typename __gnu_cxx::__promote_2<_Tpnu, _Tp>::__type __type;
│ │ │ +
636 return __detail::__cyl_bessel_k<__type>(__nu, __x);
│ │ │ +
637 }
│ │ │ +
│ │ │ +
638
│ │ │ +
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
│ │ │ +
│ │ │ +
681 cyl_neumann(_Tpnu __nu, _Tp __x)
│ │ │ +
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
│ │ │ +
│ │ │ +
1022 riemann_zetaf(float __s)
│ │ │ +
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
│ │ │ +
__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 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.
│ │ │ -
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.
│ │ │ -
void _Destroy(_ForwardIterator __first, _ForwardIterator __last, _Allocator &__alloc)
│ │ │ -
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.
│ │ │ -
Primary class template hash.
│ │ │ - │ │ │ - │ │ │ -
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:390
│ │ │ -
vector()=default
Creates a vector with no elements.
│ │ │ -
pointer _M_allocate_and_copy(size_type __n, _ForwardIterator __first, _ForwardIterator __last)
│ │ │ -
void clear() noexcept
│ │ │ -
size_type max_size() const noexcept
Definition stl_vector.h:923
│ │ │ -
void reserve(size_type __n)
Attempt to preallocate enough memory for specified number of elements.
Definition vector.tcc:67
│ │ │ -
vector & operator=(const vector &__x)
Vector assignment operator.
Definition vector.tcc:199
│ │ │ -
iterator begin() noexcept
Definition stl_vector.h:811
│ │ │ -
iterator insert(const_iterator __position, const value_type &__x)
Inserts given value into vector before specified iterator.
Definition vector.tcc:132
│ │ │ -
iterator end() noexcept
Definition stl_vector.h:829
│ │ │ -
size_type size() const noexcept
Definition stl_vector.h:918
│ │ │ -
size_type capacity() const noexcept
Definition stl_vector.h:998
│ │ │ +
GNU extensions for public use.
│ │ │
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,13 +1,13 @@ │ │ │ │ libstdc++ │ │ │ │ -vector.tcc │ │ │ │ +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// Vector implementation (out of line) -*- C++ -*- │ │ │ │ +1// Mathematical Special Functions for -*- C++ -*- │ │ │ │ 2 │ │ │ │ -3// Copyright (C) 2001-2021 Free Software Foundation, Inc. │ │ │ │ +3// Copyright (C) 2006-2021 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,1111 +21,1655 @@ │ │ │ │ 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 │ │ │ │ -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 │ │ │ │ -59namespace _s_t_d _GLIBCXX_VISIBILITY(default) │ │ │ │ -60{ │ │ │ │ -61_GLIBCXX_BEGIN_NAMESPACE_VERSION │ │ │ │ -62_GLIBCXX_BEGIN_NAMESPACE_CONTAINER │ │ │ │ -63 │ │ │ │ -64 template │ │ │ │ -65 void │ │ │ │ -_6_6 _v_e_c_t_o_r_<___T_p_,_ ___A_l_l_o_c_>_:_: │ │ │ │ -67_ _r_e_s_e_r_v_e(size_type __n) │ │ │ │ -68 { │ │ │ │ -69 if (__n > this->_m_a_x___s_i_z_e()) │ │ │ │ -70 __throw_length_error(__N("vector::reserve")); │ │ │ │ -71 if (this->_c_a_p_a_c_i_t_y() < __n) │ │ │ │ -72 { │ │ │ │ -73 const size_type __old_size = _s_i_z_e(); │ │ │ │ -74 pointer __tmp; │ │ │ │ -75#if __cplusplus >= 201103L │ │ │ │ -76 if _GLIBCXX17_CONSTEXPR (_S_use_relocate()) │ │ │ │ -77 { │ │ │ │ -78 __tmp = this->_M_allocate(__n); │ │ │ │ -79 _S_relocate(this->_M_impl._M_start, this->_M_impl._M_finish, │ │ │ │ -80 __tmp, _M_get_Tp_allocator()); │ │ │ │ -81 } │ │ │ │ -82 else │ │ │ │ -83#endif │ │ │ │ -84 { │ │ │ │ -85 __tmp = ___M___a_l_l_o_c_a_t_e___a_n_d___c_o_p_y(__n, │ │ │ │ -86 _GLIBCXX_MAKE_MOVE_IF_NOEXCEPT_ITERATOR(this->_M_impl._M_start), │ │ │ │ -87 _GLIBCXX_MAKE_MOVE_IF_NOEXCEPT_ITERATOR(this->_M_impl._M_finish)); │ │ │ │ -88 _s_t_d_:_:___D_e_s_t_r_o_y(this->_M_impl._M_start, this->_M_impl._M_finish, │ │ │ │ -89 _M_get_Tp_allocator()); │ │ │ │ -90 } │ │ │ │ -91 _GLIBCXX_ASAN_ANNOTATE_REINIT; │ │ │ │ -92 _M_deallocate(this->_M_impl._M_start, │ │ │ │ -93 this->_M_impl._M_end_of_storage │ │ │ │ -94 - this->_M_impl._M_start); │ │ │ │ -95 this->_M_impl._M_start = __tmp; │ │ │ │ -96 this->_M_impl._M_finish = __tmp + __old_size; │ │ │ │ -97 this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n; │ │ │ │ -98 } │ │ │ │ -99 } │ │ │ │ -100 │ │ │ │ -101#if __cplusplus >= 201103L │ │ │ │ -102 template │ │ │ │ -103 template │ │ │ │ -104#if __cplusplus > 201402L │ │ │ │ -105 typename vector<_Tp, _Alloc>::reference │ │ │ │ -106#else │ │ │ │ -107 void │ │ │ │ -108#endif │ │ │ │ -109 _v_e_c_t_o_r_<___T_p_,_ ___A_l_l_o_c_>_:_: │ │ │ │ -110_ _e_m_p_l_a_c_e___b_a_c_k(_Args&&... __args) │ │ │ │ -111 { │ │ │ │ -112 if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage) │ │ │ │ -113 { │ │ │ │ -114 _GLIBCXX_ASAN_ANNOTATE_GROW(1); │ │ │ │ -115 _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, │ │ │ │ -116 _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(__args)...); │ │ │ │ -117 ++this->_M_impl._M_finish; │ │ │ │ -118 _GLIBCXX_ASAN_ANNOTATE_GREW(1); │ │ │ │ -119 } │ │ │ │ -120 else │ │ │ │ -121 _M_realloc_insert(_e_n_d(), _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(__args)...); │ │ │ │ -122#if __cplusplus > 201402L │ │ │ │ -123 return back(); │ │ │ │ -124#endif │ │ │ │ -125 } │ │ │ │ -126#endif │ │ │ │ -127 │ │ │ │ -128 template │ │ │ │ -129 typename vector<_Tp, _Alloc>::iterator │ │ │ │ -_1_3_0 _v_e_c_t_o_r_<___T_p_,_ ___A_l_l_o_c_>:: │ │ │ │ -131#if __cplusplus >= 201103L │ │ │ │ -132 _i_n_s_e_r_t(const_iterator __position, const value_type& __x) │ │ │ │ -133#else │ │ │ │ -134 _i_n_s_e_r_t(iterator __position, const value_type& __x) │ │ │ │ -135#endif │ │ │ │ -136 { │ │ │ │ -137 const size_type __n = __position - _b_e_g_i_n(); │ │ │ │ -138 if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage) │ │ │ │ -139 if (__position == _e_n_d()) │ │ │ │ -140 { │ │ │ │ -141 _GLIBCXX_ASAN_ANNOTATE_GROW(1); │ │ │ │ -142 _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, │ │ │ │ -143 __x); │ │ │ │ -144 ++this->_M_impl._M_finish; │ │ │ │ -145 _GLIBCXX_ASAN_ANNOTATE_GREW(1); │ │ │ │ -146 } │ │ │ │ -147 else │ │ │ │ -148 { │ │ │ │ -149#if __cplusplus >= 201103L │ │ │ │ -150 const auto __pos = _b_e_g_i_n() + (__position - _c_b_e_g_i_n()); │ │ │ │ -151 // __x could be an existing element of this vector, so make a │ │ │ │ -152 // copy of it before _M_insert_aux moves elements around. │ │ │ │ -153 _Temporary_value __x_copy(this, __x); │ │ │ │ -154 _M_insert_aux(__pos, _s_t_d_:_:_m_o_v_e(__x_copy._M_val())); │ │ │ │ -155#else │ │ │ │ -156 _M_insert_aux(__position, __x); │ │ │ │ -157#endif │ │ │ │ -158 } │ │ │ │ -159 else │ │ │ │ -160#if __cplusplus >= 201103L │ │ │ │ -161 _M_realloc_insert(_b_e_g_i_n() + (__position - _c_b_e_g_i_n()), __x); │ │ │ │ -162#else │ │ │ │ -163 _M_realloc_insert(__position, __x); │ │ │ │ -164#endif │ │ │ │ -165 │ │ │ │ -166 return iterator(this->_M_impl._M_start + __n); │ │ │ │ -167 } │ │ │ │ -168 │ │ │ │ -169 template │ │ │ │ -170 typename vector<_Tp, _Alloc>::iterator │ │ │ │ -171 _v_e_c_t_o_r_<___T_p_,_ ___A_l_l_o_c_>_:_: │ │ │ │ -172_ ___M___e_r_a_s_e(_i_t_e_r_a_t_o_r __position) │ │ │ │ -173 { │ │ │ │ -174 if (__position + 1 != _e_n_d()) │ │ │ │ -175 _GLIBCXX_MOVE3(__position + 1, _e_n_d(), __position); │ │ │ │ -176 --this->_M_impl._M_finish; │ │ │ │ -177 _Alloc_traits::destroy(this->_M_impl, this->_M_impl._M_finish); │ │ │ │ -178 _GLIBCXX_ASAN_ANNOTATE_SHRINK(1); │ │ │ │ -179 return __position; │ │ │ │ -180 } │ │ │ │ -181 │ │ │ │ -182 template │ │ │ │ -183 typename vector<_Tp, _Alloc>::iterator │ │ │ │ -184 vector<_Tp, _Alloc>:: │ │ │ │ -185 _M_erase(iterator __first, iterator __last) │ │ │ │ -186 { │ │ │ │ -187 if (__first != __last) │ │ │ │ -188 { │ │ │ │ -189 if (__last != _e_n_d()) │ │ │ │ -190 _GLIBCXX_MOVE3(__last, _e_n_d(), __first); │ │ │ │ -191 _M_erase_at_end(__first.base() + (_e_n_d() - __last)); │ │ │ │ -192 } │ │ │ │ -193 return __first; │ │ │ │ -194 } │ │ │ │ -195 │ │ │ │ -196 template │ │ │ │ -197 _v_e_c_t_o_r_<___T_p_,_ ___A_l_l_o_c_>& │ │ │ │ -_1_9_8 _v_e_c_t_o_r_<___T_p_,_ ___A_l_l_o_c_>_:_: │ │ │ │ -199_ _o_p_e_r_a_t_o_r_=(const _v_e_c_t_o_r_<___T_p_,_ ___A_l_l_o_c_>& __x) │ │ │ │ -200 { │ │ │ │ -201 if (&__x != this) │ │ │ │ -202 { │ │ │ │ -203 _GLIBCXX_ASAN_ANNOTATE_REINIT; │ │ │ │ -204#if __cplusplus >= 201103L │ │ │ │ -205 if (_Alloc_traits::_S_propagate_on_copy_assign()) │ │ │ │ -206 { │ │ │ │ -207 if (!_Alloc_traits::_S_always_equal() │ │ │ │ -208 && _M_get_Tp_allocator() != __x._M_get_Tp_allocator()) │ │ │ │ -209 { │ │ │ │ -210 // replacement allocator cannot free existing storage │ │ │ │ -211 this->_c_l_e_a_r(); │ │ │ │ -212 _M_deallocate(this->_M_impl._M_start, │ │ │ │ -213 this->_M_impl._M_end_of_storage │ │ │ │ -214 - this->_M_impl._M_start); │ │ │ │ -215 this->_M_impl._M_start = nullptr; │ │ │ │ -216 this->_M_impl._M_finish = nullptr; │ │ │ │ -217 this->_M_impl._M_end_of_storage = nullptr; │ │ │ │ -218 } │ │ │ │ -219 std::__alloc_on_copy(_M_get_Tp_allocator(), │ │ │ │ -220 __x._M_get_Tp_allocator()); │ │ │ │ -221 } │ │ │ │ -222#endif │ │ │ │ -223 const size_type __xlen = __x._s_i_z_e(); │ │ │ │ -224 if (__xlen > _c_a_p_a_c_i_t_y()) │ │ │ │ -225 { │ │ │ │ -226 pointer __tmp = ___M___a_l_l_o_c_a_t_e___a_n_d___c_o_p_y(__xlen, __x._b_e_g_i_n(), │ │ │ │ -227 __x._e_n_d()); │ │ │ │ -228 _s_t_d_:_:___D_e_s_t_r_o_y(this->_M_impl._M_start, this->_M_impl._M_finish, │ │ │ │ -229 _M_get_Tp_allocator()); │ │ │ │ -230 _M_deallocate(this->_M_impl._M_start, │ │ │ │ -231 this->_M_impl._M_end_of_storage │ │ │ │ -232 - this->_M_impl._M_start); │ │ │ │ -233 this->_M_impl._M_start = __tmp; │ │ │ │ -234 this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __xlen; │ │ │ │ -235 } │ │ │ │ -236 else if (_s_i_z_e() >= __xlen) │ │ │ │ -237 { │ │ │ │ -238 _s_t_d_:_:___D_e_s_t_r_o_y(std::copy(__x._b_e_g_i_n(), __x._e_n_d(), _b_e_g_i_n()), │ │ │ │ -239 _e_n_d(), _M_get_Tp_allocator()); │ │ │ │ -240 } │ │ │ │ -241 else │ │ │ │ -242 { │ │ │ │ -243 std::copy(__x._M_impl._M_start, __x._M_impl._M_start + _s_i_z_e(), │ │ │ │ -244 this->_M_impl._M_start); │ │ │ │ -245 std::__uninitialized_copy_a(__x._M_impl._M_start + _s_i_z_e(), │ │ │ │ -246 __x._M_impl._M_finish, │ │ │ │ -247 this->_M_impl._M_finish, │ │ │ │ -248 _M_get_Tp_allocator()); │ │ │ │ -249 } │ │ │ │ -250 this->_M_impl._M_finish = this->_M_impl._M_start + __xlen; │ │ │ │ -251 } │ │ │ │ -252 return *this; │ │ │ │ -253 } │ │ │ │ -254 │ │ │ │ -255 template │ │ │ │ -256 void │ │ │ │ -257 _v_e_c_t_o_r_<___T_p_,_ ___A_l_l_o_c_>_:_: │ │ │ │ -258_ ___M___f_i_l_l___a_s_s_i_g_n(size_t __n, const _v_a_l_u_e___t_y_p_e& __val) │ │ │ │ -259 { │ │ │ │ -260 if (__n > capacity()) │ │ │ │ -261 { │ │ │ │ -262 _v_e_c_t_o_r __tmp(__n, __val, _M_get_Tp_allocator()); │ │ │ │ -263 __tmp._M_impl._M_swap_data(this->_M_impl); │ │ │ │ -264 } │ │ │ │ -265 else if (__n > _s_i_z_e()) │ │ │ │ -266 { │ │ │ │ -267 std::fill(_b_e_g_i_n(), _e_n_d(), __val); │ │ │ │ -268 const size_type __add = __n - _s_i_z_e(); │ │ │ │ -269 _GLIBCXX_ASAN_ANNOTATE_GROW(__add); │ │ │ │ -270 this->_M_impl._M_finish = │ │ │ │ -271 std::__uninitialized_fill_n_a(this->_M_impl._M_finish, │ │ │ │ -272 __add, __val, _M_get_Tp_allocator()); │ │ │ │ -273 _GLIBCXX_ASAN_ANNOTATE_GREW(__add); │ │ │ │ -274 } │ │ │ │ -275 else │ │ │ │ -276 _M_erase_at_end(std::fill_n(this->_M_impl._M_start, __n, __val)); │ │ │ │ -277 } │ │ │ │ +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{cmath} │ │ │ │ +28 */ │ │ │ │ +29 │ │ │ │ +30#ifndef _GLIBCXX_BITS_SPECFUN_H │ │ │ │ +31#define _GLIBCXX_BITS_SPECFUN_H 1 │ │ │ │ +32 │ │ │ │ +33#pragma GCC visibility push(default) │ │ │ │ +34 │ │ │ │ +35#include <_b_i_t_s_/_c_+_+_c_o_n_f_i_g_._h> │ │ │ │ +36 │ │ │ │ +37#define __STDCPP_MATH_SPEC_FUNCS__ 201003L │ │ │ │ +38 │ │ │ │ +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 /** │ │ │ │ +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 template │ │ │ │ -280 template │ │ │ │ -281 void │ │ │ │ -282 _v_e_c_t_o_r_<___T_p_,_ ___A_l_l_o_c_>_:_: │ │ │ │ -283_ ___M___a_s_s_i_g_n___a_u_x(_InputIterator __first, _InputIterator __last, │ │ │ │ -284 std::input_iterator_tag) │ │ │ │ -285 { │ │ │ │ -286 pointer __cur(this->_M_impl._M_start); │ │ │ │ -287 for (; __first != __last && __cur != this->_M_impl._M_finish; │ │ │ │ -288 ++__cur, (void)++__first) │ │ │ │ -289 *__cur = *__first; │ │ │ │ -290 if (__first == __last) │ │ │ │ -291 _M_erase_at_end(__cur); │ │ │ │ -292 else │ │ │ │ -293 _M_range_insert(_e_n_d(), __first, __last, │ │ │ │ -294 _s_t_d_:_:_____i_t_e_r_a_t_o_r___c_a_t_e_g_o_r_y(__first)); │ │ │ │ -295 } │ │ │ │ -296 │ │ │ │ -297 template │ │ │ │ -298 template │ │ │ │ -299 void │ │ │ │ -300 _v_e_c_t_o_r_<___T_p_,_ ___A_l_l_o_c_>_:_: │ │ │ │ -301_ ___M___a_s_s_i_g_n___a_u_x(_ForwardIterator __first, _ForwardIterator __last, │ │ │ │ -302 std::forward_iterator_tag) │ │ │ │ -303 { │ │ │ │ -304 const _s_i_z_e___t_y_p_e __len = _s_t_d_:_:_d_i_s_t_a_n_c_e(__first, __last); │ │ │ │ +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 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 if (__len > capacity()) │ │ │ │ -307 { │ │ │ │ -308 _S_check_init_len(__len, _M_get_Tp_allocator()); │ │ │ │ -309 pointer __tmp(_M_allocate_and_copy(__len, __first, __last)); │ │ │ │ -310 _s_t_d_:_:___D_e_s_t_r_o_y(this->_M_impl._M_start, this->_M_impl._M_finish, │ │ │ │ -311 _M_get_Tp_allocator()); │ │ │ │ -312 _GLIBCXX_ASAN_ANNOTATE_REINIT; │ │ │ │ -313 _M_deallocate(this->_M_impl._M_start, │ │ │ │ -314 this->_M_impl._M_end_of_storage │ │ │ │ -315 - this->_M_impl._M_start); │ │ │ │ -316 this->_M_impl._M_start = __tmp; │ │ │ │ -317 this->_M_impl._M_finish = this->_M_impl._M_start + __len; │ │ │ │ -318 this->_M_impl._M_end_of_storage = this->_M_impl._M_finish; │ │ │ │ -319 } │ │ │ │ -320 else if (_s_i_z_e() >= __len) │ │ │ │ -321 _M_erase_at_end(std::copy(__first, __last, this->_M_impl._M_start)); │ │ │ │ -322 else │ │ │ │ -323 { │ │ │ │ -324 _ForwardIterator __mid = __first; │ │ │ │ -325 _s_t_d_:_:_a_d_v_a_n_c_e(__mid, _s_i_z_e()); │ │ │ │ -326 std::copy(__first, __mid, this->_M_impl._M_start); │ │ │ │ -327 const _s_i_z_e___t_y_p_e __attribute__((__unused__)) __n = __len - _s_i_z_e(); │ │ │ │ -328 _GLIBCXX_ASAN_ANNOTATE_GROW(__n); │ │ │ │ -329 this->_M_impl._M_finish = │ │ │ │ -330 std::__uninitialized_copy_a(__mid, __last, │ │ │ │ -331 this->_M_impl._M_finish, │ │ │ │ -332 _M_get_Tp_allocator()); │ │ │ │ -333 _GLIBCXX_ASAN_ANNOTATE_GREW(__n); │ │ │ │ -334 } │ │ │ │ -335 } │ │ │ │ -336 │ │ │ │ -337#if __cplusplus >= 201103L │ │ │ │ -338 template │ │ │ │ -339 auto │ │ │ │ -340 _v_e_c_t_o_r_<___T_p_,_ ___A_l_l_o_c_>_:_: │ │ │ │ -341_ ___M___i_n_s_e_r_t___r_v_a_l(const_iterator __position, _v_a_l_u_e___t_y_p_e&& __v) -> _i_t_e_r_a_t_o_r │ │ │ │ -342 { │ │ │ │ -343 const auto __n = __position - _c_b_e_g_i_n(); │ │ │ │ -344 if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage) │ │ │ │ -345 if (__position == _c_e_n_d()) │ │ │ │ -346 { │ │ │ │ -347 _GLIBCXX_ASAN_ANNOTATE_GROW(1); │ │ │ │ -348 _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, │ │ │ │ -349 _s_t_d_:_:_m_o_v_e(__v)); │ │ │ │ -350 ++this->_M_impl._M_finish; │ │ │ │ -351 _GLIBCXX_ASAN_ANNOTATE_GREW(1); │ │ │ │ -352 } │ │ │ │ -353 else │ │ │ │ -354 _M_insert_aux(_b_e_g_i_n() + __n, _s_t_d_:_:_m_o_v_e(__v)); │ │ │ │ -355 else │ │ │ │ -356 _M_realloc_insert(_b_e_g_i_n() + __n, _s_t_d_:_:_m_o_v_e(__v)); │ │ │ │ -357 │ │ │ │ -358 return _i_t_e_r_a_t_o_r(this->_M_impl._M_start + __n); │ │ │ │ -359 } │ │ │ │ +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(_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 │ │ │ │ +_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 template │ │ │ │ -363 auto │ │ │ │ -364 _v_e_c_t_o_r_<___T_p_,_ ___A_l_l_o_c_>_:_: │ │ │ │ -365_ ___M___e_m_p_l_a_c_e___a_u_x(const_iterator __position, _Args&&... __args) │ │ │ │ -366 -> _i_t_e_r_a_t_o_r │ │ │ │ -367 { │ │ │ │ -368 const auto __n = __position - _c_b_e_g_i_n(); │ │ │ │ -369 if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage) │ │ │ │ -370 if (__position == _c_e_n_d()) │ │ │ │ -371 { │ │ │ │ -372 _GLIBCXX_ASAN_ANNOTATE_GROW(1); │ │ │ │ -373 _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, │ │ │ │ -374 _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(__args)...); │ │ │ │ -375 ++this->_M_impl._M_finish; │ │ │ │ -376 _GLIBCXX_ASAN_ANNOTATE_GREW(1); │ │ │ │ -377 } │ │ │ │ -378 else │ │ │ │ -379 { │ │ │ │ -380 // We need to construct a temporary because something in __args... │ │ │ │ -381 // could alias one of the elements of the container and so we │ │ │ │ -382 // need to use it before _M_insert_aux moves elements around. │ │ │ │ -383 _Temporary_value __tmp(this, _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(__args)...); │ │ │ │ -384 _M_insert_aux(_b_e_g_i_n() + __n, _s_t_d_:_:_m_o_v_e(__tmp._M_val())); │ │ │ │ -385 } │ │ │ │ -386 else │ │ │ │ -387 _M_realloc_insert(_b_e_g_i_n() + __n, _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(__args)...); │ │ │ │ -388 │ │ │ │ -389 return _i_t_e_r_a_t_o_r(this->_M_impl._M_start + __n); │ │ │ │ -390 } │ │ │ │ -391 │ │ │ │ -392 template │ │ │ │ -393 template │ │ │ │ -394 void │ │ │ │ -395 _v_e_c_t_o_r_<___T_p_,_ ___A_l_l_o_c_>_:_: │ │ │ │ -396_ ___M___i_n_s_e_r_t___a_u_x(_i_t_e_r_a_t_o_r __position, _Arg&& __arg) │ │ │ │ -397#else │ │ │ │ -398 template │ │ │ │ -399 void │ │ │ │ -400 _v_e_c_t_o_r_<___T_p_,_ ___A_l_l_o_c_>_:_: │ │ │ │ -401_ ___M___i_n_s_e_r_t___a_u_x(_i_t_e_r_a_t_o_r __position, const _Tp& __x) │ │ │ │ -402#endif │ │ │ │ -403 { │ │ │ │ -404 _GLIBCXX_ASAN_ANNOTATE_GROW(1); │ │ │ │ -405 _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, │ │ │ │ -406 _GLIBCXX_MOVE(*(this->_M_impl._M_finish - 1))); │ │ │ │ -407 ++this->_M_impl._M_finish; │ │ │ │ -408 _GLIBCXX_ASAN_ANNOTATE_GREW(1); │ │ │ │ -409#if __cplusplus < 201103L │ │ │ │ -410 _Tp __x_copy = __x; │ │ │ │ -411#endif │ │ │ │ -412 _GLIBCXX_MOVE_BACKWARD3(__position.base(), │ │ │ │ -413 this->_M_impl._M_finish - 2, │ │ │ │ -414 this->_M_impl._M_finish - 1); │ │ │ │ -415#if __cplusplus < 201103L │ │ │ │ -416 *__position = __x_copy; │ │ │ │ -417#else │ │ │ │ -418 *__position = _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_>(__arg); │ │ │ │ -419#endif │ │ │ │ -420 } │ │ │ │ -421 │ │ │ │ -422#if __cplusplus >= 201103L │ │ │ │ -423 template │ │ │ │ -424 template │ │ │ │ -425 void │ │ │ │ -426 _v_e_c_t_o_r_<___T_p_,_ ___A_l_l_o_c_>_:_: │ │ │ │ -427_ ___M___r_e_a_l_l_o_c___i_n_s_e_r_t(_i_t_e_r_a_t_o_r __position, _Args&&... __args) │ │ │ │ -428#else │ │ │ │ -429 template │ │ │ │ -430 void │ │ │ │ -431 _v_e_c_t_o_r_<___T_p_,_ ___A_l_l_o_c_>_:_: │ │ │ │ -432_ ___M___r_e_a_l_l_o_c___i_n_s_e_r_t(_i_t_e_r_a_t_o_r __position, const _Tp& __x) │ │ │ │ -433#endif │ │ │ │ -434 { │ │ │ │ -435 const _s_i_z_e___t_y_p_e __len = │ │ │ │ -436 _M_check_len(_s_i_z_e___t_y_p_e(1), "vector::_M_realloc_insert"); │ │ │ │ -437 pointer __old_start = this->_M_impl._M_start; │ │ │ │ -438 pointer __old_finish = this->_M_impl._M_finish; │ │ │ │ -439 const _s_i_z_e___t_y_p_e __elems_before = __position - _b_e_g_i_n(); │ │ │ │ -440 pointer __new_start(this->_M_allocate(__len)); │ │ │ │ -441 pointer __new_finish(__new_start); │ │ │ │ -442 __try │ │ │ │ -443 { │ │ │ │ -444 // The order of the three operations is dictated by the C++11 │ │ │ │ -445 // case, where the moves could alter a new element belonging │ │ │ │ -446 // to the existing vector. This is an issue only for callers │ │ │ │ -447 // taking the element by lvalue ref (see last bullet of C++11 │ │ │ │ -448 // [res.on.arguments]). │ │ │ │ -449 _Alloc_traits::construct(this->_M_impl, │ │ │ │ -450 __new_start + __elems_before, │ │ │ │ -451#if __cplusplus >= 201103L │ │ │ │ -452 _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(__args)...); │ │ │ │ -453#else │ │ │ │ -454 __x); │ │ │ │ -455#endif │ │ │ │ -456 __new_finish = pointer(); │ │ │ │ -457 │ │ │ │ -458#if __cplusplus >= 201103L │ │ │ │ -459 if _GLIBCXX17_CONSTEXPR (_S_use_relocate()) │ │ │ │ -460 { │ │ │ │ -461 __new_finish = _S_relocate(__old_start, __position.base(), │ │ │ │ -462 __new_start, _M_get_Tp_allocator()); │ │ │ │ -463 │ │ │ │ -464 ++__new_finish; │ │ │ │ +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 // 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 │ │ │ │ +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 /** │ │ │ │ +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 __nu) │ │ │ │ +454 { return __detail::__comp_ellint_3(__k, __nu); } │ │ │ │ +455 │ │ │ │ +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 __nu) │ │ │ │ +464 { return __detail::__comp_ellint_3(__k, __nu); } │ │ │ │ 465 │ │ │ │ -466 __new_finish = _S_relocate(__position.base(), __old_finish, │ │ │ │ -467 __new_finish, _M_get_Tp_allocator()); │ │ │ │ -468 } │ │ │ │ -469 else │ │ │ │ -470#endif │ │ │ │ -471 { │ │ │ │ -472 __new_finish │ │ │ │ -473 = std::__uninitialized_move_if_noexcept_a │ │ │ │ -474 (__old_start, __position.base(), │ │ │ │ -475 __new_start, _M_get_Tp_allocator()); │ │ │ │ -476 │ │ │ │ -477 ++__new_finish; │ │ │ │ -478 │ │ │ │ -479 __new_finish │ │ │ │ -480 = std::__uninitialized_move_if_noexcept_a │ │ │ │ -481 (__position.base(), __old_finish, │ │ │ │ -482 __new_finish, _M_get_Tp_allocator()); │ │ │ │ -483 } │ │ │ │ -484 } │ │ │ │ -485 __catch(...) │ │ │ │ -486 { │ │ │ │ -487 if (!__new_finish) │ │ │ │ -488 _Alloc_traits::destroy(this->_M_impl, │ │ │ │ -489 __new_start + __elems_before); │ │ │ │ -490 else │ │ │ │ -491 _s_t_d_:_:___D_e_s_t_r_o_y(__new_start, __new_finish, _M_get_Tp_allocator()); │ │ │ │ -492 _M_deallocate(__new_start, __len); │ │ │ │ -493 __throw_exception_again; │ │ │ │ -494 } │ │ │ │ -495#if __cplusplus >= 201103L │ │ │ │ -496 if _GLIBCXX17_CONSTEXPR (!_S_use_relocate()) │ │ │ │ -497#endif │ │ │ │ -498 _s_t_d_:_:___D_e_s_t_r_o_y(__old_start, __old_finish, _M_get_Tp_allocator()); │ │ │ │ -499 _GLIBCXX_ASAN_ANNOTATE_REINIT; │ │ │ │ -500 _M_deallocate(__old_start, │ │ │ │ -501 this->_M_impl._M_end_of_storage - __old_start); │ │ │ │ -502 this->_M_impl._M_start = __new_start; │ │ │ │ -503 this->_M_impl._M_finish = __new_finish; │ │ │ │ -504 this->_M_impl._M_end_of_storage = __new_start + __len; │ │ │ │ -505 } │ │ │ │ +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, _Tpn __nu) │ │ │ │ +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 │ │ │ │ +_5_0_4 _c_y_l___b_e_s_s_e_l___i_f(float __nu, float __x) │ │ │ │ +505 { return __detail::__cyl_bessel_i(__nu, __x); } │ │ │ │ 506 │ │ │ │ -507 template │ │ │ │ -508 void │ │ │ │ -509 _v_e_c_t_o_r_<___T_p_,_ ___A_l_l_o_c_>_:_: │ │ │ │ -510_ ___M___f_i_l_l___i_n_s_e_r_t(_i_t_e_r_a_t_o_r __position, _s_i_z_e___t_y_p_e __n, const _v_a_l_u_e___t_y_p_e& __x) │ │ │ │ -511 { │ │ │ │ -512 if (__n != 0) │ │ │ │ -513 { │ │ │ │ -514 if (_s_i_z_e___t_y_p_e(this->_M_impl._M_end_of_storage │ │ │ │ -515 - this->_M_impl._M_finish) >= __n) │ │ │ │ -516 { │ │ │ │ -517#if __cplusplus < 201103L │ │ │ │ -518 _v_a_l_u_e___t_y_p_e __x_copy = __x; │ │ │ │ -519#else │ │ │ │ -520 _Temporary_value __tmp(this, __x); │ │ │ │ -521 _v_a_l_u_e___t_y_p_e& __x_copy = __tmp._M_val(); │ │ │ │ -522#endif │ │ │ │ -523 const _s_i_z_e___t_y_p_e __elems_after = _e_n_d() - __position; │ │ │ │ -524 pointer __old_finish(this->_M_impl._M_finish); │ │ │ │ -525 if (__elems_after > __n) │ │ │ │ -526 { │ │ │ │ -527 _GLIBCXX_ASAN_ANNOTATE_GROW(__n); │ │ │ │ -528 std::__uninitialized_move_a(this->_M_impl._M_finish - __n, │ │ │ │ -529 this->_M_impl._M_finish, │ │ │ │ -530 this->_M_impl._M_finish, │ │ │ │ -531 _M_get_Tp_allocator()); │ │ │ │ -532 this->_M_impl._M_finish += __n; │ │ │ │ -533 _GLIBCXX_ASAN_ANNOTATE_GREW(__n); │ │ │ │ -534 _GLIBCXX_MOVE_BACKWARD3(__position.base(), │ │ │ │ -535 __old_finish - __n, __old_finish); │ │ │ │ -536 std::fill(__position.base(), __position.base() + __n, │ │ │ │ -537 __x_copy); │ │ │ │ -538 } │ │ │ │ -539 else │ │ │ │ -540 { │ │ │ │ -541 _GLIBCXX_ASAN_ANNOTATE_GROW(__n); │ │ │ │ -542 this->_M_impl._M_finish = │ │ │ │ -543 std::__uninitialized_fill_n_a(this->_M_impl._M_finish, │ │ │ │ -544 __n - __elems_after, │ │ │ │ -545 __x_copy, │ │ │ │ -546 _M_get_Tp_allocator()); │ │ │ │ -547 _GLIBCXX_ASAN_ANNOTATE_GREW(__n - __elems_after); │ │ │ │ -548 std::__uninitialized_move_a(__position.base(), __old_finish, │ │ │ │ -549 this->_M_impl._M_finish, │ │ │ │ -550 _M_get_Tp_allocator()); │ │ │ │ -551 this->_M_impl._M_finish += __elems_after; │ │ │ │ -552 _GLIBCXX_ASAN_ANNOTATE_GREW(__elems_after); │ │ │ │ -553 std::fill(__position.base(), __old_finish, __x_copy); │ │ │ │ -554 } │ │ │ │ -555 } │ │ │ │ -556 else │ │ │ │ -557 { │ │ │ │ -558 const _s_i_z_e___t_y_p_e __len = │ │ │ │ -559 _M_check_len(__n, "vector::_M_fill_insert"); │ │ │ │ -560 const _s_i_z_e___t_y_p_e __elems_before = __position - _b_e_g_i_n(); │ │ │ │ -561 pointer __new_start(this->_M_allocate(__len)); │ │ │ │ -562 pointer __new_finish(__new_start); │ │ │ │ -563 __try │ │ │ │ -564 { │ │ │ │ -565 // See _M_realloc_insert above. │ │ │ │ -566 std::__uninitialized_fill_n_a(__new_start + __elems_before, │ │ │ │ -567 __n, __x, │ │ │ │ -568 _M_get_Tp_allocator()); │ │ │ │ -569 __new_finish = pointer(); │ │ │ │ -570 │ │ │ │ -571 __new_finish │ │ │ │ -572 = std::__uninitialized_move_if_noexcept_a │ │ │ │ -573 (this->_M_impl._M_start, __position.base(), │ │ │ │ -574 __new_start, _M_get_Tp_allocator()); │ │ │ │ -575 │ │ │ │ -576 __new_finish += __n; │ │ │ │ -577 │ │ │ │ -578 __new_finish │ │ │ │ -579 = std::__uninitialized_move_if_noexcept_a │ │ │ │ -580 (__position.base(), this->_M_impl._M_finish, │ │ │ │ -581 __new_finish, _M_get_Tp_allocator()); │ │ │ │ -582 } │ │ │ │ -583 __catch(...) │ │ │ │ -584 { │ │ │ │ -585 if (!__new_finish) │ │ │ │ -586 _s_t_d_:_:___D_e_s_t_r_o_y(__new_start + __elems_before, │ │ │ │ -587 __new_start + __elems_before + __n, │ │ │ │ -588 _M_get_Tp_allocator()); │ │ │ │ -589 else │ │ │ │ -590 _s_t_d_:_:___D_e_s_t_r_o_y(__new_start, __new_finish, │ │ │ │ -591 _M_get_Tp_allocator()); │ │ │ │ -592 _M_deallocate(__new_start, __len); │ │ │ │ -593 __throw_exception_again; │ │ │ │ -594 } │ │ │ │ -595 _s_t_d_:_:___D_e_s_t_r_o_y(this->_M_impl._M_start, this->_M_impl._M_finish, │ │ │ │ -596 _M_get_Tp_allocator()); │ │ │ │ -597 _GLIBCXX_ASAN_ANNOTATE_REINIT; │ │ │ │ -598 _M_deallocate(this->_M_impl._M_start, │ │ │ │ -599 this->_M_impl._M_end_of_storage │ │ │ │ -600 - this->_M_impl._M_start); │ │ │ │ -601 this->_M_impl._M_start = __new_start; │ │ │ │ -602 this->_M_impl._M_finish = __new_finish; │ │ │ │ -603 this->_M_impl._M_end_of_storage = __new_start + __len; │ │ │ │ -604 } │ │ │ │ -605 } │ │ │ │ -606 } │ │ │ │ -607 │ │ │ │ -608#if __cplusplus >= 201103L │ │ │ │ -609 template │ │ │ │ -610 void │ │ │ │ -611 _v_e_c_t_o_r_<___T_p_,_ ___A_l_l_o_c_>_:_: │ │ │ │ -612_ ___M___d_e_f_a_u_l_t___a_p_p_e_n_d(_s_i_z_e___t_y_p_e __n) │ │ │ │ -613 { │ │ │ │ -614 if (__n != 0) │ │ │ │ -615 { │ │ │ │ -616 const _s_i_z_e___t_y_p_e __size = _s_i_z_e(); │ │ │ │ -617 _s_i_z_e___t_y_p_e __navail = _s_i_z_e___t_y_p_e(this->_M_impl._M_end_of_storage │ │ │ │ -618 - this->_M_impl._M_finish); │ │ │ │ -619 │ │ │ │ -620 if (__size > max_size() || __navail > max_size() - __size) │ │ │ │ -621 __builtin_unreachable(); │ │ │ │ -622 │ │ │ │ -623 if (__navail >= __n) │ │ │ │ -624 { │ │ │ │ -625 _GLIBCXX_ASAN_ANNOTATE_GROW(__n); │ │ │ │ -626 this->_M_impl._M_finish = │ │ │ │ -627 std::__uninitialized_default_n_a(this->_M_impl._M_finish, │ │ │ │ -628 __n, _M_get_Tp_allocator()); │ │ │ │ -629 _GLIBCXX_ASAN_ANNOTATE_GREW(__n); │ │ │ │ -630 } │ │ │ │ -631 else │ │ │ │ -632 { │ │ │ │ -633 const _s_i_z_e___t_y_p_e __len = │ │ │ │ -634 _M_check_len(__n, "vector::_M_default_append"); │ │ │ │ -635 pointer __new_start(this->_M_allocate(__len)); │ │ │ │ -636 if _GLIBCXX17_CONSTEXPR (_S_use_relocate()) │ │ │ │ -637 { │ │ │ │ -638 __try │ │ │ │ -639 { │ │ │ │ -640 std::__uninitialized_default_n_a(__new_start + __size, │ │ │ │ -641 __n, _M_get_Tp_allocator()); │ │ │ │ -642 } │ │ │ │ -643 __catch(...) │ │ │ │ -644 { │ │ │ │ -645 _M_deallocate(__new_start, __len); │ │ │ │ -646 __throw_exception_again; │ │ │ │ -647 } │ │ │ │ -648 _S_relocate(this->_M_impl._M_start, this->_M_impl._M_finish, │ │ │ │ -649 __new_start, _M_get_Tp_allocator()); │ │ │ │ -650 } │ │ │ │ -651 else │ │ │ │ -652 { │ │ │ │ -653 pointer __destroy_from = pointer(); │ │ │ │ -654 __try │ │ │ │ -655 { │ │ │ │ -656 std::__uninitialized_default_n_a(__new_start + __size, │ │ │ │ -657 __n, _M_get_Tp_allocator()); │ │ │ │ -658 __destroy_from = __new_start + __size; │ │ │ │ -659 std::__uninitialized_move_if_noexcept_a( │ │ │ │ -660 this->_M_impl._M_start, this->_M_impl._M_finish, │ │ │ │ -661 __new_start, _M_get_Tp_allocator()); │ │ │ │ -662 } │ │ │ │ -663 __catch(...) │ │ │ │ -664 { │ │ │ │ -665 if (__destroy_from) │ │ │ │ -666 _s_t_d_:_:___D_e_s_t_r_o_y(__destroy_from, __destroy_from + __n, │ │ │ │ -667 _M_get_Tp_allocator()); │ │ │ │ -668 _M_deallocate(__new_start, __len); │ │ │ │ -669 __throw_exception_again; │ │ │ │ -670 } │ │ │ │ -671 _s_t_d_:_:___D_e_s_t_r_o_y(this->_M_impl._M_start, this->_M_impl._M_finish, │ │ │ │ -672 _M_get_Tp_allocator()); │ │ │ │ -673 } │ │ │ │ -674 _GLIBCXX_ASAN_ANNOTATE_REINIT; │ │ │ │ -675 _M_deallocate(this->_M_impl._M_start, │ │ │ │ -676 this->_M_impl._M_end_of_storage │ │ │ │ -677 - this->_M_impl._M_start); │ │ │ │ -678 this->_M_impl._M_start = __new_start; │ │ │ │ -679 this->_M_impl._M_finish = __new_start + __size + __n; │ │ │ │ -680 this->_M_impl._M_end_of_storage = __new_start + __len; │ │ │ │ -681 } │ │ │ │ -682 } │ │ │ │ -683 } │ │ │ │ -684 │ │ │ │ -685 template │ │ │ │ -686 bool │ │ │ │ -687 _v_e_c_t_o_r_<___T_p_,_ ___A_l_l_o_c_>_:_: │ │ │ │ -688_ ___M___s_h_r_i_n_k___t_o___f_i_t() │ │ │ │ -689 { │ │ │ │ -690 if (capacity() == _s_i_z_e()) │ │ │ │ -691 return false; │ │ │ │ -692 _GLIBCXX_ASAN_ANNOTATE_REINIT; │ │ │ │ -693 return std::__shrink_to_fit_aux::_S_do_it(*this); │ │ │ │ -694 } │ │ │ │ -_6_9_5#endif │ │ │ │ -696 │ │ │ │ -697 template │ │ │ │ -698 template │ │ │ │ -699 void │ │ │ │ -700 _v_e_c_t_o_r_<___T_p_,_ ___A_l_l_o_c_>_:_: │ │ │ │ -701_ ___M___r_a_n_g_e___i_n_s_e_r_t(iterator __pos, _InputIterator __first, │ │ │ │ -702 _InputIterator __last, _s_t_d_:_:_i_n_p_u_t___i_t_e_r_a_t_o_r___t_a_g) │ │ │ │ -703 { │ │ │ │ -704 if (__pos == _e_n_d()) │ │ │ │ -705 { │ │ │ │ -706 for (; __first != __last; ++__first) │ │ │ │ -707 _i_n_s_e_r_t(_e_n_d(), *__first); │ │ │ │ -708 } │ │ │ │ -709 else if (__first != __last) │ │ │ │ -710 { │ │ │ │ -711 _v_e_c_t_o_r __tmp(__first, __last, _M_get_Tp_allocator()); │ │ │ │ -712 _i_n_s_e_r_t(__pos, │ │ │ │ -713 _GLIBCXX_MAKE_MOVE_ITERATOR(__tmp._b_e_g_i_n()), │ │ │ │ -714 _GLIBCXX_MAKE_MOVE_ITERATOR(__tmp._e_n_d())); │ │ │ │ -715 } │ │ │ │ -716 } │ │ │ │ -717 │ │ │ │ -718 template │ │ │ │ -719 template │ │ │ │ -720 void │ │ │ │ -721 _v_e_c_t_o_r_<___T_p_,_ ___A_l_l_o_c_>_:_: │ │ │ │ -722_ ___M___r_a_n_g_e___i_n_s_e_r_t(_i_t_e_r_a_t_o_r __position, _ForwardIterator __first, │ │ │ │ -723 _ForwardIterator __last, _s_t_d_:_:_f_o_r_w_a_r_d___i_t_e_r_a_t_o_r___t_a_g) │ │ │ │ -724 { │ │ │ │ -725 if (__first != __last) │ │ │ │ -726 { │ │ │ │ -727 const _s_i_z_e___t_y_p_e __n = _s_t_d_:_:_d_i_s_t_a_n_c_e(__first, __last); │ │ │ │ -728 if (_s_i_z_e___t_y_p_e(this->_M_impl._M_end_of_storage │ │ │ │ -729 - this->_M_impl._M_finish) >= __n) │ │ │ │ +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 __nu, long double __x) │ │ │ │ +515 { return __detail::__cyl_bessel_i(__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, __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(_Tpnu __nu, _Tp __x) │ │ │ │ +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 │ │ │ │ +_5_5_0 _c_y_l___b_e_s_s_e_l___j_f(float __nu, float __x) │ │ │ │ +551 { return __detail::__cyl_bessel_j(__nu, __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 __nu, long double __x) │ │ │ │ +561 { return __detail::__cyl_bessel_j(__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, __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(_Tpnu __nu, _Tp __x) │ │ │ │ +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 │ │ │ │ +_5_9_6 _c_y_l___b_e_s_s_e_l___k_f(float __nu, float __x) │ │ │ │ +597 { return __detail::__cyl_bessel_k(__nu, __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 __nu, long double __x) │ │ │ │ +607 { return __detail::__cyl_bessel_k(__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, __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(_Tpnu __nu, _Tp __x) │ │ │ │ +634 { │ │ │ │ +635 typedef typename __gnu_cxx::__promote_2<_Tpnu, _Tp>::__type __type; │ │ │ │ +636 return __detail::__cyl_bessel_k<__type>(__nu, __x); │ │ │ │ +637 } │ │ │ │ +638 │ │ │ │ +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 __nu, float __x) │ │ │ │ +649 { return __detail::__cyl_neumann_n(__nu, __x); } │ │ │ │ +650 │ │ │ │ +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 __nu, long double __x) │ │ │ │ +659 { return __detail::__cyl_neumann_n(__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, __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(_Tpnu __nu, _Tp __x) │ │ │ │ +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 │ │ │ │ +_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, _Tpp __phi) │ │ │ │ 730 { │ │ │ │ -731 const _s_i_z_e___t_y_p_e __elems_after = _e_n_d() - __position; │ │ │ │ -732 pointer __old_finish(this->_M_impl._M_finish); │ │ │ │ -733 if (__elems_after > __n) │ │ │ │ -734 { │ │ │ │ -735 _GLIBCXX_ASAN_ANNOTATE_GROW(__n); │ │ │ │ -736 std::__uninitialized_move_a(this->_M_impl._M_finish - __n, │ │ │ │ -737 this->_M_impl._M_finish, │ │ │ │ -738 this->_M_impl._M_finish, │ │ │ │ -739 _M_get_Tp_allocator()); │ │ │ │ -740 this->_M_impl._M_finish += __n; │ │ │ │ -741 _GLIBCXX_ASAN_ANNOTATE_GREW(__n); │ │ │ │ -742 _GLIBCXX_MOVE_BACKWARD3(__position.base(), │ │ │ │ -743 __old_finish - __n, __old_finish); │ │ │ │ -744 std::copy(__first, __last, __position); │ │ │ │ -745 } │ │ │ │ -746 else │ │ │ │ -747 { │ │ │ │ -748 _ForwardIterator __mid = __first; │ │ │ │ -749 _s_t_d_:_:_a_d_v_a_n_c_e(__mid, __elems_after); │ │ │ │ -750 _GLIBCXX_ASAN_ANNOTATE_GROW(__n); │ │ │ │ -751 std::__uninitialized_copy_a(__mid, __last, │ │ │ │ -752 this->_M_impl._M_finish, │ │ │ │ -753 _M_get_Tp_allocator()); │ │ │ │ -754 this->_M_impl._M_finish += __n - __elems_after; │ │ │ │ -755 _GLIBCXX_ASAN_ANNOTATE_GREW(__n - __elems_after); │ │ │ │ -756 std::__uninitialized_move_a(__position.base(), │ │ │ │ -757 __old_finish, │ │ │ │ -758 this->_M_impl._M_finish, │ │ │ │ -759 _M_get_Tp_allocator()); │ │ │ │ -760 this->_M_impl._M_finish += __elems_after; │ │ │ │ -761 _GLIBCXX_ASAN_ANNOTATE_GREW(__elems_after); │ │ │ │ -762 std::copy(__first, __mid, __position); │ │ │ │ -763 } │ │ │ │ -764 } │ │ │ │ -765 else │ │ │ │ -766 { │ │ │ │ -767 const _s_i_z_e___t_y_p_e __len = │ │ │ │ -768 _M_check_len(__n, "vector::_M_range_insert"); │ │ │ │ -769 pointer __new_start(this->_M_allocate(__len)); │ │ │ │ -770 pointer __new_finish(__new_start); │ │ │ │ -771 __try │ │ │ │ -772 { │ │ │ │ -773 __new_finish │ │ │ │ -774 = std::__uninitialized_move_if_noexcept_a │ │ │ │ -775 (this->_M_impl._M_start, __position.base(), │ │ │ │ -776 __new_start, _M_get_Tp_allocator()); │ │ │ │ -777 __new_finish │ │ │ │ -778 = std::__uninitialized_copy_a(__first, __last, │ │ │ │ -779 __new_finish, │ │ │ │ -780 _M_get_Tp_allocator()); │ │ │ │ -781 __new_finish │ │ │ │ -782 = std::__uninitialized_move_if_noexcept_a │ │ │ │ -783 (__position.base(), this->_M_impl._M_finish, │ │ │ │ -784 __new_finish, _M_get_Tp_allocator()); │ │ │ │ -785 } │ │ │ │ -786 __catch(...) │ │ │ │ -787 { │ │ │ │ -788 _s_t_d_:_:___D_e_s_t_r_o_y(__new_start, __new_finish, │ │ │ │ -789 _M_get_Tp_allocator()); │ │ │ │ -790 _M_deallocate(__new_start, __len); │ │ │ │ -791 __throw_exception_again; │ │ │ │ -792 } │ │ │ │ -793 _s_t_d_:_:___D_e_s_t_r_o_y(this->_M_impl._M_start, this->_M_impl._M_finish, │ │ │ │ -794 _M_get_Tp_allocator()); │ │ │ │ -795 _GLIBCXX_ASAN_ANNOTATE_REINIT; │ │ │ │ -796 _M_deallocate(this->_M_impl._M_start, │ │ │ │ -797 this->_M_impl._M_end_of_storage │ │ │ │ -798 - this->_M_impl._M_start); │ │ │ │ -799 this->_M_impl._M_start = __new_start; │ │ │ │ -800 this->_M_impl._M_finish = __new_finish; │ │ │ │ -801 this->_M_impl._M_end_of_storage = __new_start + __len; │ │ │ │ -802 } │ │ │ │ -803 } │ │ │ │ -804 } │ │ │ │ -805 │ │ │ │ -806 │ │ │ │ -807 // vector │ │ │ │ -808 template │ │ │ │ -809 void │ │ │ │ -810 _v_e_c_t_o_r_<_b_o_o_l_,_ ___A_l_l_o_c_>_:_: │ │ │ │ -811_ ___M___r_e_a_l_l_o_c_a_t_e(_s_i_z_e___t_y_p_e __n) │ │ │ │ -812 { │ │ │ │ -813 _Bit_pointer __q = this->_M_allocate(__n); │ │ │ │ -814 _i_t_e_r_a_t_o_r __start(_s_t_d_:_:_____a_d_d_r_e_s_s_o_f(*__q), 0); │ │ │ │ -815 _i_t_e_r_a_t_o_r __finish(_M_copy_aligned(_b_e_g_i_n(), _e_n_d(), __start)); │ │ │ │ -816 this->_M_deallocate(); │ │ │ │ -817 this->_M_impl._M_start = __start; │ │ │ │ -818 this->_M_impl._M_finish = __finish; │ │ │ │ -819 this->_M_impl._M_end_of_storage = __q + _S_nword(__n); │ │ │ │ -820 } │ │ │ │ -821 │ │ │ │ -822 template │ │ │ │ -823 void │ │ │ │ -824 _v_e_c_t_o_r_<_b_o_o_l_,_ ___A_l_l_o_c_>_:_: │ │ │ │ -825_ ___M___f_i_l_l___i_n_s_e_r_t(_i_t_e_r_a_t_o_r __position, _s_i_z_e___t_y_p_e __n, bool __x) │ │ │ │ -826 { │ │ │ │ -827 if (__n == 0) │ │ │ │ -828 return; │ │ │ │ -829 if (capacity() - _s_i_z_e() >= __n) │ │ │ │ -830 { │ │ │ │ -831 std::copy_backward(__position, _e_n_d(), │ │ │ │ -832 this->_M_impl._M_finish + _d_i_f_f_e_r_e_n_c_e___t_y_p_e(__n)); │ │ │ │ -833 std::fill(__position, __position + _d_i_f_f_e_r_e_n_c_e___t_y_p_e(__n), __x); │ │ │ │ -834 this->_M_impl._M_finish += _d_i_f_f_e_r_e_n_c_e___t_y_p_e(__n); │ │ │ │ -835 } │ │ │ │ -836 else │ │ │ │ -837 { │ │ │ │ -838 const _s_i_z_e___t_y_p_e __len = │ │ │ │ -839 _M_check_len(__n, "vector::_M_fill_insert"); │ │ │ │ -840 _Bit_pointer __q = this->_M_allocate(__len); │ │ │ │ -841 _i_t_e_r_a_t_o_r __start(_s_t_d_:_:_____a_d_d_r_e_s_s_o_f(*__q), 0); │ │ │ │ -842 _i_t_e_r_a_t_o_r __i = _M_copy_aligned(_b_e_g_i_n(), __position, __start); │ │ │ │ -843 std::fill(__i, __i + _d_i_f_f_e_r_e_n_c_e___t_y_p_e(__n), __x); │ │ │ │ -844 _i_t_e_r_a_t_o_r __finish = std::copy(__position, _e_n_d(), │ │ │ │ -845 __i + _d_i_f_f_e_r_e_n_c_e___t_y_p_e(__n)); │ │ │ │ -846 this->_M_deallocate(); │ │ │ │ -847 this->_M_impl._M_end_of_storage = __q + _S_nword(__len); │ │ │ │ -848 this->_M_impl._M_start = __start; │ │ │ │ -849 this->_M_impl._M_finish = __finish; │ │ │ │ -850 } │ │ │ │ -851 } │ │ │ │ -852 │ │ │ │ -853 template │ │ │ │ -854 template │ │ │ │ -855 void │ │ │ │ -856 _v_e_c_t_o_r_<_b_o_o_l_,_ ___A_l_l_o_c_>_:_: │ │ │ │ -857_ ___M___i_n_s_e_r_t___r_a_n_g_e(_i_t_e_r_a_t_o_r __position, _ForwardIterator __first, │ │ │ │ -858 _ForwardIterator __last, std::forward_iterator_tag) │ │ │ │ -859 { │ │ │ │ -860 if (__first != __last) │ │ │ │ -861 { │ │ │ │ -862 _s_i_z_e___t_y_p_e __n = _s_t_d_:_:_d_i_s_t_a_n_c_e(__first, __last); │ │ │ │ -863 if (capacity() - _s_i_z_e() >= __n) │ │ │ │ -864 { │ │ │ │ -865 std::copy_backward(__position, _e_n_d(), │ │ │ │ -866 this->_M_impl._M_finish │ │ │ │ -867 + _d_i_f_f_e_r_e_n_c_e___t_y_p_e(__n)); │ │ │ │ -868 std::copy(__first, __last, __position); │ │ │ │ -869 this->_M_impl._M_finish += _d_i_f_f_e_r_e_n_c_e___t_y_p_e(__n); │ │ │ │ -870 } │ │ │ │ -871 else │ │ │ │ -872 { │ │ │ │ -873 const _s_i_z_e___t_y_p_e __len = │ │ │ │ -874 _M_check_len(__n, "vector::_M_insert_range"); │ │ │ │ -875 _Bit_pointer __q = this->_M_allocate(__len); │ │ │ │ -876 _i_t_e_r_a_t_o_r __start(_s_t_d_:_:_____a_d_d_r_e_s_s_o_f(*__q), 0); │ │ │ │ -877 _i_t_e_r_a_t_o_r __i = _M_copy_aligned(_b_e_g_i_n(), __position, __start); │ │ │ │ -878 __i = std::copy(__first, __last, __i); │ │ │ │ -879 _i_t_e_r_a_t_o_r __finish = std::copy(__position, _e_n_d(), __i); │ │ │ │ -880 this->_M_deallocate(); │ │ │ │ -881 this->_M_impl._M_end_of_storage = __q + _S_nword(__len); │ │ │ │ -882 this->_M_impl._M_start = __start; │ │ │ │ -883 this->_M_impl._M_finish = __finish; │ │ │ │ -884 } │ │ │ │ -885 } │ │ │ │ -886 } │ │ │ │ +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, _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 │ │ │ │ +_7_9_2 _e_l_l_i_n_t___3_f(float __k, float __nu, float __phi) │ │ │ │ +793 { return __detail::__ellint_3(__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 │ │ │ │ +_8_0_2 _e_l_l_i_n_t___3_l(long double __k, long double __nu, long double __phi) │ │ │ │ +803 { return __detail::__ellint_3(__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, 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 _e_l_l_i_n_t___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 │ │ │ │ +_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 template │ │ │ │ -889 void │ │ │ │ -890 _v_e_c_t_o_r_<_b_o_o_l_,_ ___A_l_l_o_c_>_:_: │ │ │ │ -891_ ___M___i_n_s_e_r_t___a_u_x(_i_t_e_r_a_t_o_r __position, bool __x) │ │ │ │ -892 { │ │ │ │ -893 if (this->_M_impl._M_finish._M_p != this->_M_impl._M_end_addr()) │ │ │ │ -894 { │ │ │ │ -895 std::copy_backward(__position, this->_M_impl._M_finish, │ │ │ │ -896 this->_M_impl._M_finish + 1); │ │ │ │ -897 *__position = __x; │ │ │ │ -898 ++this->_M_impl._M_finish; │ │ │ │ -899 } │ │ │ │ -900 else │ │ │ │ -901 { │ │ │ │ -902 const _s_i_z_e___t_y_p_e __len = │ │ │ │ -903 _M_check_len(_s_i_z_e___t_y_p_e(1), "vector::_M_insert_aux"); │ │ │ │ -904 _Bit_pointer __q = this->_M_allocate(__len); │ │ │ │ -905 _i_t_e_r_a_t_o_r __start(_s_t_d_:_:_____a_d_d_r_e_s_s_o_f(*__q), 0); │ │ │ │ -906 _i_t_e_r_a_t_o_r __i = _M_copy_aligned(_b_e_g_i_n(), __position, __start); │ │ │ │ -907 *__i++ = __x; │ │ │ │ -908 _i_t_e_r_a_t_o_r __finish = std::copy(__position, _e_n_d(), __i); │ │ │ │ -909 this->_M_deallocate(); │ │ │ │ -910 this->_M_impl._M_end_of_storage = __q + _S_nword(__len); │ │ │ │ -911 this->_M_impl._M_start = __start; │ │ │ │ -912 this->_M_impl._M_finish = __finish; │ │ │ │ -913 } │ │ │ │ -914 } │ │ │ │ -915 │ │ │ │ -916 template │ │ │ │ -917 typename vector::iterator │ │ │ │ -918 _v_e_c_t_o_r_<_b_o_o_l_,_ ___A_l_l_o_c_>_:_: │ │ │ │ -919_ ___M___e_r_a_s_e(_i_t_e_r_a_t_o_r __position) │ │ │ │ -920 { │ │ │ │ -921 if (__position + 1 != _e_n_d()) │ │ │ │ -922 std::copy(__position + 1, _e_n_d(), __position); │ │ │ │ -923 --this->_M_impl._M_finish; │ │ │ │ -924 return __position; │ │ │ │ -925 } │ │ │ │ -926 │ │ │ │ -927 template │ │ │ │ -928 typename vector::iterator │ │ │ │ -929 _v_e_c_t_o_r_<_b_o_o_l_,_ ___A_l_l_o_c_>_:_: │ │ │ │ -930_ ___M___e_r_a_s_e(_i_t_e_r_a_t_o_r __first, _i_t_e_r_a_t_o_r __last) │ │ │ │ -931 { │ │ │ │ -932 if (__first != __last) │ │ │ │ -933 _M_erase_at_end(std::copy(__last, _e_n_d(), __first)); │ │ │ │ -934 return __first; │ │ │ │ -935 } │ │ │ │ -936 │ │ │ │ -937#if __cplusplus >= 201103L │ │ │ │ -938 template │ │ │ │ -939 bool │ │ │ │ -940 _v_e_c_t_o_r_<_b_o_o_l_,_ ___A_l_l_o_c_>_:_: │ │ │ │ -941_ ___M___s_h_r_i_n_k___t_o___f_i_t() │ │ │ │ -942 { │ │ │ │ -943 if (capacity() - _s_i_z_e() < int(_S_word_bit)) │ │ │ │ -944 return false; │ │ │ │ -945 __try │ │ │ │ -946 { │ │ │ │ -947 if (_s_i_z_e___t_y_p_e __n = _s_i_z_e()) │ │ │ │ -948 _M_reallocate(__n); │ │ │ │ -949 else │ │ │ │ -950 { │ │ │ │ -951 this->_M_deallocate(); │ │ │ │ -952 this->_M_impl._M_reset(); │ │ │ │ -953 } │ │ │ │ -954 return true; │ │ │ │ -955 } │ │ │ │ -956 __catch(...) │ │ │ │ -957 { return false; } │ │ │ │ -958 } │ │ │ │ -959#endif │ │ │ │ -960 │ │ │ │ -961_GLIBCXX_END_NAMESPACE_CONTAINER │ │ │ │ -962_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ -963} // namespace std │ │ │ │ -964 │ │ │ │ -965#if __cplusplus >= 201103L │ │ │ │ -966 │ │ │ │ -967namespace _s_t_d _GLIBCXX_VISIBILITY(default) │ │ │ │ -968{ │ │ │ │ -969_GLIBCXX_BEGIN_NAMESPACE_VERSION │ │ │ │ -970 │ │ │ │ -971 template │ │ │ │ -972 size_t │ │ │ │ -973 _h_a_s_h_<___G_L_I_B_C_X_X___S_T_D___C_:_:_v_e_c_t_o_r_<_b_o_o_l_,_ ___A_l_l_o_c_>>:: │ │ │ │ -974 operator()(const _GLIBCXX_STD_C::vector& __b) const noexcept │ │ │ │ -975 { │ │ │ │ -976 size_t __hash = 0; │ │ │ │ -977 using _GLIBCXX_STD_C::_S_word_bit; │ │ │ │ -978 using _GLIBCXX_STD_C::_Bit_type; │ │ │ │ +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 const size_t __words = __b.size() / _S_word_bit; │ │ │ │ -981 if (__words) │ │ │ │ -982 { │ │ │ │ -983 const size_t __clength = __words * sizeof(_Bit_type); │ │ │ │ -984 __hash = std::_Hash_impl::hash(__b._M_impl._M_start._M_p, __clength); │ │ │ │ -985 } │ │ │ │ -986 │ │ │ │ -987 const size_t __extrabits = __b.size() % _S_word_bit; │ │ │ │ -988 if (__extrabits) │ │ │ │ -989 { │ │ │ │ -990 _Bit_type __hiword = *__b._M_impl._M_finish._M_p; │ │ │ │ -991 __hiword &= ~((~static_cast<_Bit_type>(0)) << __extrabits); │ │ │ │ -992 │ │ │ │ -993 const size_t __clength │ │ │ │ -994 = (__extrabits + __CHAR_BIT__ - 1) / __CHAR_BIT__; │ │ │ │ -995 if (__words) │ │ │ │ -996 __hash = std::_Hash_impl::hash(&__hiword, __clength, __hash); │ │ │ │ -997 else │ │ │ │ -998 __hash = std::_Hash_impl::hash(&__hiword, __clength); │ │ │ │ -999 } │ │ │ │ -1000 │ │ │ │ -1001 return __hash; │ │ │ │ -1002 } │ │ │ │ -1003 │ │ │ │ -1004_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ -1005} // namespace std │ │ │ │ -1006 │ │ │ │ -1007#endif // C++11 │ │ │ │ -1008 │ │ │ │ -1009#undef _GLIBCXX_ASAN_ANNOTATE_REINIT │ │ │ │ -1010#undef _GLIBCXX_ASAN_ANNOTATE_GROW │ │ │ │ -1011#undef _GLIBCXX_ASAN_ANNOTATE_GREW │ │ │ │ -1012#undef _GLIBCXX_ASAN_ANNOTATE_SHRINK │ │ │ │ -1013 │ │ │ │ -1014#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_:_:_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_:_:_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_3_9 │ │ │ │ -_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_1_7 │ │ │ │ -_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 │ │ │ │ +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 __theta) │ │ │ │ +1118 { return __detail::__sph_legendre(__l, __m, __theta); } │ │ │ │ +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 __theta) │ │ │ │ +1129 { return __detail::__sph_legendre(__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 __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 __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 │ │ │ │ +_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___3 │ │ │ │ +__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 . │ │ │ │ +DDeeffiinniittiioonn _s_p_e_c_f_u_n_._h_:_8_3_0 │ │ │ │ +_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. │ │ │ │ -_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_3_8 │ │ │ │ -_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_0 │ │ │ │ -_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_4_5 │ │ │ │ -_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_0_2 │ │ │ │ -_s_t_d_:_:___D_e_s_t_r_o_y │ │ │ │ -void _Destroy(_ForwardIterator __first, _ForwardIterator __last, _Allocator │ │ │ │ -&__alloc) │ │ │ │ -DDeeffiinniittiioonn _b_i_t_s_/_a_l_l_o_c___t_r_a_i_t_s_._h_:_8_2_9 │ │ │ │ -_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_1_9 │ │ │ │ -_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_:_:_s_i_z_e___t_y_p_e │ │ │ │ -_s_t_d_:_:_v_a_l_u_e___t_y_p_e │ │ │ │ -_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_:_3_9_0 │ │ │ │ -_s_t_d_:_:_v_e_c_t_o_r_:_:_v_e_c_t_o_r │ │ │ │ -vector()=default │ │ │ │ -Creates a vector with no elements. │ │ │ │ -_s_t_d_:_:_v_e_c_t_o_r_:_:___M___a_l_l_o_c_a_t_e___a_n_d___c_o_p_y │ │ │ │ -pointer _M_allocate_and_copy(size_type __n, _ForwardIterator __first, │ │ │ │ -_ForwardIterator __last) │ │ │ │ -DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_1_5_0_8 │ │ │ │ -_s_t_d_:_:_v_e_c_t_o_r_:_:_c_l_e_a_r │ │ │ │ -void clear() noexcept │ │ │ │ -DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_1_4_9_8 │ │ │ │ -_s_t_d_:_:_v_e_c_t_o_r_:_:_m_a_x___s_i_z_e │ │ │ │ -size_type max_size() const noexcept │ │ │ │ -DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_9_2_3 │ │ │ │ -_s_t_d_:_:_v_e_c_t_o_r_:_:_r_e_s_e_r_v_e │ │ │ │ -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_7 │ │ │ │ -_s_t_d_:_:_v_e_c_t_o_r_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ -vector & operator=(const vector &__x) │ │ │ │ -Vector assignment operator. │ │ │ │ -DDeeffiinniittiioonn _v_e_c_t_o_r_._t_c_c_:_1_9_9 │ │ │ │ -_s_t_d_:_:_v_e_c_t_o_r_:_:_b_e_g_i_n │ │ │ │ -iterator begin() noexcept │ │ │ │ -DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_8_1_1 │ │ │ │ -_s_t_d_:_:_v_e_c_t_o_r_:_:_i_n_s_e_r_t │ │ │ │ -iterator insert(const_iterator __position, const value_type &__x) │ │ │ │ -Inserts given value into vector before specified iterator. │ │ │ │ -DDeeffiinniittiioonn _v_e_c_t_o_r_._t_c_c_:_1_3_2 │ │ │ │ -_s_t_d_:_:_v_e_c_t_o_r_:_:_e_n_d │ │ │ │ -iterator end() noexcept │ │ │ │ -DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_8_2_9 │ │ │ │ -_s_t_d_:_:_v_e_c_t_o_r_:_:_s_i_z_e │ │ │ │ -size_type size() const noexcept │ │ │ │ -DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_9_1_8 │ │ │ │ -_s_t_d_:_:_v_e_c_t_o_r_:_:_c_a_p_a_c_i_t_y │ │ │ │ -size_type capacity() const noexcept │ │ │ │ -DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_9_9_8 │ │ │ │ +_____g_n_u___c_x_x │ │ │ │ +GNU extensions for public use. │ │ │ │ * bbiittss │ │ │ │ - * _v_e_c_t_o_r_._t_c_c │ │ │ │ + * _s_p_e_c_f_u_n_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.15.0 │ │ ├── ./usr/share/doc/gcc-11-base/libstdc++/user/a00347.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: valarray_after.h File Reference │ │ │ +libstdc++: cxxabi_init_exception.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -48,397 +48,72 @@ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
valarray_after.h File Reference
│ │ │ +
cxxabi_init_exception.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │

Go to the source code of this file.

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

│ │ │ 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)
#define _GLIBCXX_CDTOR_CALLABI
#define _GLIBCXX_HAVE_CDTOR_CALLABI
│ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ 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)
│ │ │ +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_after.h.

│ │ │ +

Definition in file cxxabi_init_exception.h.

│ │ │

Macro Definition Documentation

│ │ │ - │ │ │ -

◆ _DEFINE_EXPR_BINARY_FUNCTION

│ │ │ + │ │ │ +

◆ _GLIBCXX_CDTOR_CALLABI

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
#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 )#define _GLIBCXX_CDTOR_CALLABI
│ │ │
│ │ │ │ │ │ -

Definition at line 340 of file valarray_after.h.

│ │ │ +

Definition at line 42 of file cxxabi_init_exception.h.

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

◆ _DEFINE_EXPR_UNARY_FUNCTION

│ │ │ + │ │ │ +

◆ _GLIBCXX_HAVE_CDTOR_CALLABI

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
#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 )#define _GLIBCXX_HAVE_CDTOR_CALLABI
│ │ │
│ │ │ │ │ │ -

Definition at line 325 of file valarray_after.h.

│ │ │ +

Definition at line 43 of file cxxabi_init_exception.h.

│ │ │ │ │ │
│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,786 +1,30 @@ │ │ │ │ libstdc++ │ │ │ │ -valarray_after.h 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 │ │ │ │ -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) │ │ │ │ +#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 │ │ │ │ - _Expr< _UnClos< struct std::_Abs, │ │ │ │ - _Expr, _Dom >, typename _Dom:: _s_t_d_:_:_a_b_s (const _Expr< _Dom, typename │ │ │ │ - value_type >  _Dom::value_type > &__e) │ │ │ │ -template │ │ │ │ - _Expr< _UnClos< struct std::_Abs, │ │ │ │ - _ValArray, _Tp >, _Tp >  _s_t_d_:_:_a_b_s (const _v_a_l_a_r_r_a_y< _Tp > &__v) │ │ │ │ -template │ │ │ │ - _Expr< _UnClos< struct std::_Acos, │ │ │ │ - _Expr, _Dom >, typename _Dom:: _s_t_d_:_:_a_c_o_s (const _Expr< _Dom, typename │ │ │ │ - value_type >  _Dom::value_type > &__e) │ │ │ │ -template │ │ │ │ - _Expr< _UnClos< struct std::_Acos, │ │ │ │ - _ValArray, _Tp >, _Tp >  _s_t_d_:_:_a_c_o_s (const _v_a_l_a_r_r_a_y< _Tp > &__v) │ │ │ │ -template │ │ │ │ - _Expr< _UnClos< struct std::_Asin, │ │ │ │ - _Expr, _Dom >, typename _Dom:: _s_t_d_:_:_a_s_i_n (const _Expr< _Dom, typename │ │ │ │ - value_type >  _Dom::value_type > &__e) │ │ │ │ -template │ │ │ │ - _Expr< _UnClos< struct std::_Asin, │ │ │ │ - _ValArray, _Tp >, _Tp >  _s_t_d_:_:_a_s_i_n (const _v_a_l_a_r_r_a_y< _Tp > &__v) │ │ │ │ -template │ │ │ │ - _Expr< _UnClos< struct std::_Atan, │ │ │ │ - _Expr, _Dom >, typename _Dom:: _s_t_d_:_:_a_t_a_n (const _Expr< _Dom, typename │ │ │ │ - value_type >  _Dom::value_type > &__e) │ │ │ │ -template │ │ │ │ - _Expr< _UnClos< struct std::_Atan, │ │ │ │ - _ValArray, _Tp >, _Tp >  _s_t_d_:_:_a_t_a_n (const _v_a_l_a_r_r_a_y< _Tp > &__v) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std::_Atan2, │ │ │ │ -_Expr, _Constant, _Dom, typename _Dom:: _s_t_d_:_:_a_t_a_n_2 (const _Expr< _Dom, typename │ │ │ │ -value_type >, typename _Dom::value_type _Dom::value_type > &__e, const typename │ │ │ │ - >  _Dom::value_type &__t) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std::_Atan2, _s_t_d_:_:_a_t_a_n_2 (const _Expr< _Dom, typename │ │ │ │ -_Expr, _ValArray, _Dom, typename _Dom:: _Dom::value_type > &__e, const │ │ │ │ -value_type >, typename _Dom::value_type _v_a_l_a_r_r_a_y< typename _Dom::value_type > │ │ │ │ - >  &__v) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std::_Atan2, _s_t_d_:_:_a_t_a_n_2 (const _Expr< _Dom1, │ │ │ │ - _Expr, _Expr, _Dom1, _Dom2 >, typename typename _Dom1::value_type > &__e1, │ │ │ │ - _Dom1::value_type >  const _Expr< _Dom2, typename _Dom2:: │ │ │ │ - value_type > &__e2) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std::_Atan2, │ │ │ │ - _Constant, _Expr, typename _Dom:: _s_t_d_:_:_a_t_a_n_2 (const typename _Dom:: │ │ │ │ - value_type, _Dom >, typename _Dom:: value_type &__t, const _Expr< _Dom, │ │ │ │ - value_type >  typename _Dom::value_type > &__e) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std::_Atan2, _s_t_d_:_:_a_t_a_n_2 (const typename _v_a_l_a_r_r_a_y< │ │ │ │ - _Constant, _ValArray, _Tp, _Tp >, _Tp _Tp >_:_:_v_a_l_u_e___t_y_p_e &__t, const _v_a_l_a_r_r_a_y< │ │ │ │ - >  _Tp > &__v) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct 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 typename _v_a_l_a_r_r_a_y< _Tp >_:_: │ │ │ │ - >  _v_a_l_u_e___t_y_p_e &__t) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct 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 │ │ │ │ - _Expr< _BinClos< struct std::_Atan2, │ │ │ │ - _ValArray, _Expr, typename _Dom:: _s_t_d_:_:_a_t_a_n_2 (const _v_a_l_a_r_r_a_y< typename │ │ │ │ - value_type, _Dom >, typename _Dom:: _Dom::valarray > &__v, const _Expr< │ │ │ │ - value_type >  _Dom, typename _Dom::value_type > &__e) │ │ │ │ -template │ │ │ │ - _Expr< _UnClos< struct std::_Cos, │ │ │ │ - _Expr, _Dom >, typename _Dom:: _s_t_d_:_:_c_o_s (const _Expr< _Dom, typename │ │ │ │ - value_type >  _Dom::value_type > &__e) │ │ │ │ -template │ │ │ │ - _Expr< _UnClos< struct std::_Cos, │ │ │ │ - _ValArray, _Tp >, _Tp >  _s_t_d_:_:_c_o_s (const _v_a_l_a_r_r_a_y< _Tp > &__v) │ │ │ │ -template │ │ │ │ - _Expr< _UnClos< struct std::_Cosh, │ │ │ │ - _Expr, _Dom >, typename _Dom:: _s_t_d_:_:_c_o_s_h (const _Expr< _Dom, typename │ │ │ │ - value_type >  _Dom::value_type > &__e) │ │ │ │ -template │ │ │ │ - _Expr< _UnClos< struct std::_Cosh, │ │ │ │ - _ValArray, _Tp >, _Tp >  _s_t_d_:_:_c_o_s_h (const _v_a_l_a_r_r_a_y< _Tp > &__v) │ │ │ │ -template │ │ │ │ - _Expr< _UnClos< struct std::_Exp, │ │ │ │ - _Expr, _Dom >, typename _Dom:: _s_t_d_:_:_e_x_p (const _Expr< _Dom, typename │ │ │ │ - value_type >  _Dom::value_type > &__e) │ │ │ │ -template │ │ │ │ - _Expr< _UnClos< struct std::_Exp, │ │ │ │ - _ValArray, _Tp >, _Tp >  _s_t_d_:_:_e_x_p (const _v_a_l_a_r_r_a_y< _Tp > &__v) │ │ │ │ -template │ │ │ │ - _Expr< _UnClos< struct std::_Log, │ │ │ │ - _Expr, _Dom >, typename _Dom:: _s_t_d_:_:_l_o_g (const _Expr< _Dom, typename │ │ │ │ - value_type >  _Dom::value_type > &__e) │ │ │ │ -template │ │ │ │ - _Expr< _UnClos< struct std::_Log, │ │ │ │ - _ValArray, _Tp >, _Tp >  _s_t_d_:_:_l_o_g (const _v_a_l_a_r_r_a_y< _Tp > &__v) │ │ │ │ -template │ │ │ │ - _Expr< _UnClos< struct std::_Log10, │ │ │ │ - _Expr, _Dom >, typename _Dom:: _s_t_d_:_:_l_o_g_1_0 (const _Expr< _Dom, typename │ │ │ │ - value_type >  _Dom::value_type > &__e) │ │ │ │ -template │ │ │ │ - _Expr< _UnClos< struct 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 │ │ │ │ - _Expr< _BinClos< struct std:: │ │ │ │ -__not_equal_to, _Expr, _ValArray, _Dom, │ │ │ │ - typename _Dom::value_type >, typename _s_t_d_:_:_o_p_e_r_a_t_o_r_!_= (const _Expr< _Dom, │ │ │ │ - __fun< struct std::__not_equal_to, typename _Dom::value_type > &__e, const │ │ │ │ - typename _Dom::value_type >:: _v_a_l_a_r_r_a_y< typename _Dom::value_type > │ │ │ │ - result_type >  &__v) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std:: │ │ │ │ -__not_equal_to, _Expr, _Constant, _Dom, │ │ │ │ - typename _Dom::value_type >, typename │ │ │ │ - __fun< struct std::__not_equal_to, _s_t_d_:_:_o_p_e_r_a_t_o_r_!_= (const _Expr< _Dom, │ │ │ │ - typename _Dom::value_type >:: typename _Dom::value_type > &__v, const │ │ │ │ - result_type >  typename _Dom::value_type &__t) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std:: │ │ │ │ - __not_equal_to, _Expr, _Expr, _Dom1, _s_t_d_:_:_o_p_e_r_a_t_o_r_!_= (const _Expr< _Dom1, │ │ │ │ - _Dom2 >, typename __fun< struct std:: typename _Dom1::value_type > &__v, │ │ │ │ - __not_equal_to, typename _Dom1:: const _Expr< _Dom2, typename _Dom2:: │ │ │ │ - value_type >::result_type >  value_type > &__w) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std:: │ │ │ │ - __not_equal_to, _Constant, _Expr, │ │ │ │ - typename _Dom::value_type, _Dom >, │ │ │ │ - typename __fun< struct std:: _s_t_d_:_:_o_p_e_r_a_t_o_r_!_= (const typename _Dom:: │ │ │ │ - __not_equal_to, typename _Dom:: value_type &__t, const _Expr< _Dom, │ │ │ │ - value_type >::result_type >  typename _Dom::value_type > &__v) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std:: │ │ │ │ - __not_equal_to, _ValArray, _Expr, │ │ │ │ - typename _Dom::value_type, _Dom >, _s_t_d_:_:_o_p_e_r_a_t_o_r_!_= (const _v_a_l_a_r_r_a_y< │ │ │ │ - typename __fun< struct std:: typename _Dom::value_type > &__v, const │ │ │ │ - __not_equal_to, typename _Dom:: _Expr< _Dom, typename _Dom::value_type │ │ │ │ - value_type >::result_type >  > &__e) │ │ │ │ -template │ │ │ │ -_Expr< _BinClos< struct std::__modulus, │ │ │ │ -_Expr, _ValArray, _Dom, typename _Dom:: _s_t_d_:_:_o_p_e_r_a_t_o_r_% (const _Expr< _Dom, │ │ │ │ - value_type >, typename __fun< struct typename _Dom::value_type > &__e, const │ │ │ │ - std::__modulus, typename _Dom:: _v_a_l_a_r_r_a_y< typename _Dom::value_type > │ │ │ │ - value_type >::result_type >  &__v) │ │ │ │ -template │ │ │ │ -_Expr< _BinClos< struct std::__modulus, │ │ │ │ -_Expr, _Constant, _Dom, typename _Dom:: │ │ │ │ - value_type >, typename __fun< struct _s_t_d_:_:_o_p_e_r_a_t_o_r_% (const _Expr< _Dom, │ │ │ │ - std::__modulus, typename _Dom:: typename _Dom::value_type > &__v, const │ │ │ │ - value_type >::result_type >  typename _Dom::value_type &__t) │ │ │ │ -template │ │ │ │ -_Expr< _BinClos< struct std::__modulus, _s_t_d_:_:_o_p_e_r_a_t_o_r_% (const _Expr< _Dom1, │ │ │ │ - _Expr, _Expr, _Dom1, _Dom2 >, typename typename _Dom1::value_type > &__v, │ │ │ │ - __fun< struct std::__modulus, typename const _Expr< _Dom2, typename _Dom2:: │ │ │ │ - _Dom1::value_type >::result_type >  value_type > &__w) │ │ │ │ -template │ │ │ │ -_Expr< _BinClos< struct std::__modulus, │ │ │ │ - _Constant, _Expr, typename _Dom:: │ │ │ │ - value_type, _Dom >, typename __fun< _s_t_d_:_:_o_p_e_r_a_t_o_r_% (const typename _Dom:: │ │ │ │ - struct std::__modulus, typename _Dom:: value_type &__t, const _Expr< _Dom, │ │ │ │ - value_type >::result_type >  typename _Dom::value_type > &__v) │ │ │ │ -template │ │ │ │ -_Expr< _BinClos< struct std::__modulus, │ │ │ │ - _ValArray, _Expr, typename _Dom:: _s_t_d_:_:_o_p_e_r_a_t_o_r_% (const _v_a_l_a_r_r_a_y< │ │ │ │ - value_type, _Dom >, typename __fun< typename _Dom::value_type > &__v, const │ │ │ │ - struct std::__modulus, typename _Dom:: _Expr< _Dom, typename _Dom::value_type │ │ │ │ - value_type >::result_type >  > &__e) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std:: │ │ │ │ - __bitwise_and, _Expr, _ValArray, _Dom, │ │ │ │ - typename _Dom::value_type >, typename _s_t_d_:_:_o_p_e_r_a_t_o_r_& (const _Expr< _Dom, │ │ │ │ - __fun< struct std::__bitwise_and, typename _Dom::value_type > &__e, const │ │ │ │ - typename _Dom::value_type >:: _v_a_l_a_r_r_a_y< typename _Dom::value_type > │ │ │ │ - result_type >  &__v) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std:: │ │ │ │ - __bitwise_and, _Expr, _Constant, _Dom, │ │ │ │ - typename _Dom::value_type >, typename │ │ │ │ - __fun< struct std::__bitwise_and, _s_t_d_:_:_o_p_e_r_a_t_o_r_& (const _Expr< _Dom, │ │ │ │ - typename _Dom::value_type >:: typename _Dom::value_type > &__v, const │ │ │ │ - result_type >  typename _Dom::value_type &__t) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std:: │ │ │ │ - __bitwise_and, _Expr, _Expr, _Dom1, _s_t_d_:_:_o_p_e_r_a_t_o_r_& (const _Expr< _Dom1, │ │ │ │ - _Dom2 >, typename __fun< struct std:: typename _Dom1::value_type > &__v, │ │ │ │ - __bitwise_and, typename _Dom1:: const _Expr< _Dom2, typename _Dom2:: │ │ │ │ - value_type >::result_type >  value_type > &__w) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std:: │ │ │ │ - __bitwise_and, _Constant, _Expr, │ │ │ │ - typename _Dom::value_type, _Dom >, │ │ │ │ - typename __fun< struct std:: _s_t_d_:_:_o_p_e_r_a_t_o_r_& (const typename _Dom:: │ │ │ │ - __bitwise_and, typename _Dom:: value_type &__t, const _Expr< _Dom, │ │ │ │ - value_type >::result_type >  typename _Dom::value_type > &__v) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std:: │ │ │ │ - __bitwise_and, _ValArray, _Expr, │ │ │ │ - typename _Dom::value_type, _Dom >, _s_t_d_:_:_o_p_e_r_a_t_o_r_& (const _v_a_l_a_r_r_a_y< │ │ │ │ - typename __fun< struct std:: typename _Dom::value_type > &__v, const │ │ │ │ - __bitwise_and, typename _Dom:: _Expr< _Dom, typename _Dom::value_type │ │ │ │ - value_type >::result_type >  > &__e) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std:: │ │ │ │ - __logical_and, _Expr, _ValArray, _Dom, │ │ │ │ - typename _Dom::value_type >, typename _s_t_d_:_:_o_p_e_r_a_t_o_r_&_& (const _Expr< _Dom, │ │ │ │ - __fun< struct std::__logical_and, typename _Dom::value_type > &__e, const │ │ │ │ - typename _Dom::value_type >:: _v_a_l_a_r_r_a_y< typename _Dom::value_type > │ │ │ │ - result_type >  &__v) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std:: │ │ │ │ - __logical_and, _Expr, _Constant, _Dom, │ │ │ │ - typename _Dom::value_type >, typename │ │ │ │ - __fun< struct std::__logical_and, _s_t_d_:_:_o_p_e_r_a_t_o_r_&_& (const _Expr< _Dom, │ │ │ │ - typename _Dom::value_type >:: typename _Dom::value_type > &__v, const │ │ │ │ - result_type >  typename _Dom::value_type &__t) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std:: │ │ │ │ - __logical_and, _Expr, _Expr, _Dom1, _s_t_d_:_:_o_p_e_r_a_t_o_r_&_& (const _Expr< _Dom1, │ │ │ │ - _Dom2 >, typename __fun< struct std:: typename _Dom1::value_type > &__v, │ │ │ │ - __logical_and, typename _Dom1:: const _Expr< _Dom2, typename _Dom2:: │ │ │ │ - value_type >::result_type >  value_type > &__w) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std:: │ │ │ │ - __logical_and, _Constant, _Expr, │ │ │ │ - typename _Dom::value_type, _Dom >, │ │ │ │ - typename __fun< struct std:: _s_t_d_:_:_o_p_e_r_a_t_o_r_&_& (const typename _Dom:: │ │ │ │ - __logical_and, typename _Dom:: value_type &__t, const _Expr< _Dom, │ │ │ │ - value_type >::result_type >  typename _Dom::value_type > &__v) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std:: │ │ │ │ - __logical_and, _ValArray, _Expr, │ │ │ │ - typename _Dom::value_type, _Dom >, _s_t_d_:_:_o_p_e_r_a_t_o_r_&_& (const _v_a_l_a_r_r_a_y< │ │ │ │ - typename __fun< struct std:: typename _Dom::value_type > &__v, const │ │ │ │ - __logical_and, typename _Dom:: _Expr< _Dom, typename _Dom::value_type │ │ │ │ - value_type >::result_type >  > &__e) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std:: │ │ │ │ - __multiplies, _Expr, _ValArray, _Dom, │ │ │ │ - typename _Dom::value_type >, typename _s_t_d_:_:_o_p_e_r_a_t_o_r_* (const _Expr< _Dom, │ │ │ │ - __fun< struct std::__multiplies, typename _Dom::value_type > &__e, const │ │ │ │ - typename _Dom::value_type >:: _v_a_l_a_r_r_a_y< typename _Dom::value_type > │ │ │ │ - result_type >  &__v) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std:: │ │ │ │ - __multiplies, _Expr, _Constant, _Dom, │ │ │ │ - typename _Dom::value_type >, typename │ │ │ │ - __fun< struct std::__multiplies, _s_t_d_:_:_o_p_e_r_a_t_o_r_* (const _Expr< _Dom, │ │ │ │ - typename _Dom::value_type >:: typename _Dom::value_type > &__v, const │ │ │ │ - result_type >  typename _Dom::value_type &__t) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std:: │ │ │ │ - __multiplies, _Expr, _Expr, _Dom1, _s_t_d_:_:_o_p_e_r_a_t_o_r_* (const _Expr< _Dom1, │ │ │ │ - _Dom2 >, typename __fun< struct std:: typename _Dom1::value_type > &__v, │ │ │ │ - __multiplies, typename _Dom1:: const _Expr< _Dom2, typename _Dom2:: │ │ │ │ - value_type >::result_type >  value_type > &__w) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std:: │ │ │ │ - __multiplies, _Constant, _Expr, │ │ │ │ - typename _Dom::value_type, _Dom >, │ │ │ │ - typename __fun< struct std:: _s_t_d_:_:_o_p_e_r_a_t_o_r_* (const typename _Dom:: │ │ │ │ -__multiplies, typename _Dom::value_type value_type &__t, const _Expr< _Dom, │ │ │ │ - >::result_type >  typename _Dom::value_type > &__v) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std:: │ │ │ │ - __multiplies, _ValArray, _Expr, │ │ │ │ - typename _Dom::value_type, _Dom >, _s_t_d_:_:_o_p_e_r_a_t_o_r_* (const _v_a_l_a_r_r_a_y< │ │ │ │ - typename __fun< struct std:: typename _Dom::value_type > &__v, const │ │ │ │ -__multiplies, typename _Dom::value_type _Expr< _Dom, typename _Dom::value_type │ │ │ │ - >::result_type >  > &__e) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std::__plus, │ │ │ │ -_Expr, _ValArray, _Dom, typename _Dom:: _s_t_d_:_:_o_p_e_r_a_t_o_r_+ (const _Expr< _Dom, │ │ │ │ - value_type >, typename __fun< struct typename _Dom::value_type > &__e, const │ │ │ │ - std::__plus, typename _Dom::value_type _v_a_l_a_r_r_a_y< typename _Dom::value_type > │ │ │ │ - >::result_type >  &__v) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std::__plus, │ │ │ │ -_Expr, _Constant, _Dom, typename _Dom:: │ │ │ │ - value_type >, typename __fun< struct _s_t_d_:_:_o_p_e_r_a_t_o_r_+ (const _Expr< _Dom, │ │ │ │ - std::__plus, typename _Dom::value_type typename _Dom::value_type > &__v, const │ │ │ │ - >::result_type >  typename _Dom::value_type &__t) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std::__plus, _s_t_d_:_:_o_p_e_r_a_t_o_r_+ (const _Expr< _Dom1, │ │ │ │ - _Expr, _Expr, _Dom1, _Dom2 >, typename typename _Dom1::value_type > &__v, │ │ │ │ - __fun< struct std::__plus, typename const _Expr< _Dom2, typename _Dom2:: │ │ │ │ - _Dom1::value_type >::result_type >  value_type > &__w) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std::__plus, │ │ │ │ - _Constant, _Expr, typename _Dom:: │ │ │ │ - value_type, _Dom >, typename __fun< _s_t_d_:_:_o_p_e_r_a_t_o_r_+ (const typename _Dom:: │ │ │ │ - struct std::__plus, typename _Dom:: value_type &__t, const _Expr< _Dom, │ │ │ │ - value_type >::result_type >  typename _Dom::value_type > &__v) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std::__plus, │ │ │ │ - _ValArray, _Expr, typename _Dom:: _s_t_d_:_:_o_p_e_r_a_t_o_r_+ (const _v_a_l_a_r_r_a_y< │ │ │ │ - value_type, _Dom >, typename __fun< typename _Dom::value_type > &__v, const │ │ │ │ - struct std::__plus, typename _Dom:: _Expr< _Dom, typename _Dom::value_type │ │ │ │ - value_type >::result_type >  > &__e) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std::__minus, │ │ │ │ -_Expr, _ValArray, _Dom, typename _Dom:: _s_t_d_:_:_o_p_e_r_a_t_o_r_- (const _Expr< _Dom, │ │ │ │ - value_type >, typename __fun< struct typename _Dom::value_type > &__e, const │ │ │ │ -std::__minus, typename _Dom::value_type _v_a_l_a_r_r_a_y< typename _Dom::value_type > │ │ │ │ - >::result_type >  &__v) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std::__minus, │ │ │ │ -_Expr, _Constant, _Dom, typename _Dom:: │ │ │ │ - value_type >, typename __fun< struct _s_t_d_:_:_o_p_e_r_a_t_o_r_- (const _Expr< _Dom, │ │ │ │ -std::__minus, typename _Dom::value_type typename _Dom::value_type > &__v, const │ │ │ │ - >::result_type >  typename _Dom::value_type &__t) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std::__minus, _s_t_d_:_:_o_p_e_r_a_t_o_r_- (const _Expr< _Dom1, │ │ │ │ - _Expr, _Expr, _Dom1, _Dom2 >, typename typename _Dom1::value_type > &__v, │ │ │ │ - __fun< struct std::__minus, typename const _Expr< _Dom2, typename _Dom2:: │ │ │ │ - _Dom1::value_type >::result_type >  value_type > &__w) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std::__minus, │ │ │ │ - _Constant, _Expr, typename _Dom:: │ │ │ │ - value_type, _Dom >, typename __fun< _s_t_d_:_:_o_p_e_r_a_t_o_r_- (const typename _Dom:: │ │ │ │ - struct std::__minus, typename _Dom:: value_type &__t, const _Expr< _Dom, │ │ │ │ - value_type >::result_type >  typename _Dom::value_type > &__v) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std::__minus, │ │ │ │ - _ValArray, _Expr, typename _Dom:: _s_t_d_:_:_o_p_e_r_a_t_o_r_- (const _v_a_l_a_r_r_a_y< │ │ │ │ - value_type, _Dom >, typename __fun< typename _Dom::value_type > &__v, const │ │ │ │ - struct std::__minus, typename _Dom:: _Expr< _Dom, typename _Dom::value_type │ │ │ │ - value_type >::result_type >  > &__e) │ │ │ │ -template │ │ │ │ -_Expr< _BinClos< struct std::__divides, │ │ │ │ -_Expr, _ValArray, _Dom, typename _Dom:: _s_t_d_:_:_o_p_e_r_a_t_o_r_/ (const _Expr< _Dom, │ │ │ │ - value_type >, typename __fun< struct typename _Dom::value_type > &__e, const │ │ │ │ - std::__divides, typename _Dom:: _v_a_l_a_r_r_a_y< typename _Dom::value_type > │ │ │ │ - value_type >::result_type >  &__v) │ │ │ │ -template │ │ │ │ -_Expr< _BinClos< struct std::__divides, │ │ │ │ -_Expr, _Constant, _Dom, typename _Dom:: │ │ │ │ - value_type >, typename __fun< struct _s_t_d_:_:_o_p_e_r_a_t_o_r_/ (const _Expr< _Dom, │ │ │ │ - std::__divides, typename _Dom:: typename _Dom::value_type > &__v, const │ │ │ │ - value_type >::result_type >  typename _Dom::value_type &__t) │ │ │ │ -template │ │ │ │ -_Expr< _BinClos< struct std::__divides, _s_t_d_:_:_o_p_e_r_a_t_o_r_/ (const _Expr< _Dom1, │ │ │ │ - _Expr, _Expr, _Dom1, _Dom2 >, typename typename _Dom1::value_type > &__v, │ │ │ │ - __fun< struct std::__divides, typename const _Expr< _Dom2, typename _Dom2:: │ │ │ │ - _Dom1::value_type >::result_type >  value_type > &__w) │ │ │ │ -template │ │ │ │ -_Expr< _BinClos< struct std::__divides, │ │ │ │ - _Constant, _Expr, typename _Dom:: │ │ │ │ - value_type, _Dom >, typename __fun< _s_t_d_:_:_o_p_e_r_a_t_o_r_/ (const typename _Dom:: │ │ │ │ - struct std::__divides, typename _Dom:: value_type &__t, const _Expr< _Dom, │ │ │ │ - value_type >::result_type >  typename _Dom::value_type > &__v) │ │ │ │ -template │ │ │ │ -_Expr< _BinClos< struct std::__divides, │ │ │ │ - _ValArray, _Expr, typename _Dom:: _s_t_d_:_:_o_p_e_r_a_t_o_r_/ (const _v_a_l_a_r_r_a_y< │ │ │ │ - value_type, _Dom >, typename __fun< typename _Dom::value_type > &__v, const │ │ │ │ - struct std::__divides, typename _Dom:: _Expr< _Dom, typename _Dom::value_type │ │ │ │ - value_type >::result_type >  > &__e) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std::__less, │ │ │ │ -_Expr, _ValArray, _Dom, typename _Dom:: _s_t_d_:_:_o_p_e_r_a_t_o_r_< (const _Expr< _Dom, │ │ │ │ - value_type >, typename __fun< struct typename _Dom::value_type > &__e, const │ │ │ │ - std::__less, typename _Dom::value_type _v_a_l_a_r_r_a_y< typename _Dom::value_type > │ │ │ │ - >::result_type >  &__v) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std::__less, │ │ │ │ -_Expr, _Constant, _Dom, typename _Dom:: │ │ │ │ - value_type >, typename __fun< struct _s_t_d_:_:_o_p_e_r_a_t_o_r_< (const _Expr< _Dom, │ │ │ │ - std::__less, typename _Dom::value_type typename _Dom::value_type > &__v, const │ │ │ │ - >::result_type >  typename _Dom::value_type &__t) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std::__less, _s_t_d_:_:_o_p_e_r_a_t_o_r_< (const _Expr< _Dom1, │ │ │ │ - _Expr, _Expr, _Dom1, _Dom2 >, typename typename _Dom1::value_type > &__v, │ │ │ │ - __fun< struct std::__less, typename const _Expr< _Dom2, typename _Dom2:: │ │ │ │ - _Dom1::value_type >::result_type >  value_type > &__w) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std::__less, │ │ │ │ - _Constant, _Expr, typename _Dom:: │ │ │ │ - value_type, _Dom >, typename __fun< _s_t_d_:_:_o_p_e_r_a_t_o_r_< (const typename _Dom:: │ │ │ │ - struct std::__less, typename _Dom:: value_type &__t, const _Expr< _Dom, │ │ │ │ - value_type >::result_type >  typename _Dom::value_type > &__v) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std::__less, │ │ │ │ - _ValArray, _Expr, typename _Dom:: _s_t_d_:_:_o_p_e_r_a_t_o_r_< (const _v_a_l_a_r_r_a_y< │ │ │ │ - value_type, _Dom >, typename __fun< typename _Dom::value_type > &__v, const │ │ │ │ - struct std::__less, typename _Dom:: _Expr< _Dom, typename _Dom::value_type │ │ │ │ - value_type >::result_type >  > &__e) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std:: │ │ │ │ - __shift_left, _Expr, _ValArray, _Dom, │ │ │ │ - typename _Dom::value_type >, typename _s_t_d_:_:_o_p_e_r_a_t_o_r_<_< (const _Expr< _Dom, │ │ │ │ - __fun< struct std::__shift_left, typename _Dom::value_type > &__e, const │ │ │ │ - typename _Dom::value_type >:: _v_a_l_a_r_r_a_y< typename _Dom::value_type > │ │ │ │ - result_type >  &__v) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std:: │ │ │ │ - __shift_left, _Expr, _Constant, _Dom, │ │ │ │ - typename _Dom::value_type >, typename │ │ │ │ - __fun< struct std::__shift_left, _s_t_d_:_:_o_p_e_r_a_t_o_r_<_< (const _Expr< _Dom, │ │ │ │ - typename _Dom::value_type >:: typename _Dom::value_type > &__v, const │ │ │ │ - result_type >  typename _Dom::value_type &__t) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std:: │ │ │ │ - __shift_left, _Expr, _Expr, _Dom1, _s_t_d_:_:_o_p_e_r_a_t_o_r_<_< (const _Expr< _Dom1, │ │ │ │ - _Dom2 >, typename __fun< struct std:: typename _Dom1::value_type > &__v, │ │ │ │ - __shift_left, typename _Dom1:: const _Expr< _Dom2, typename _Dom2:: │ │ │ │ - value_type >::result_type >  value_type > &__w) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std:: │ │ │ │ - __shift_left, _Constant, _Expr, │ │ │ │ - typename _Dom::value_type, _Dom >, │ │ │ │ - typename __fun< struct std:: _s_t_d_:_:_o_p_e_r_a_t_o_r_<_< (const typename _Dom:: │ │ │ │ -__shift_left, typename _Dom::value_type value_type &__t, const _Expr< _Dom, │ │ │ │ - >::result_type >  typename _Dom::value_type > &__v) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std:: │ │ │ │ - __shift_left, _ValArray, _Expr, │ │ │ │ - typename _Dom::value_type, _Dom >, _s_t_d_:_:_o_p_e_r_a_t_o_r_<_< (const _v_a_l_a_r_r_a_y< │ │ │ │ - typename __fun< struct std:: typename _Dom::value_type > &__v, const │ │ │ │ -__shift_left, typename _Dom::value_type _Expr< _Dom, typename _Dom::value_type │ │ │ │ - >::result_type >  > &__e) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std:: │ │ │ │ - __less_equal, _Expr, _ValArray, _Dom, │ │ │ │ - typename _Dom::value_type >, typename _s_t_d_:_:_o_p_e_r_a_t_o_r_<_= (const _Expr< _Dom, │ │ │ │ - __fun< struct std::__less_equal, typename _Dom::value_type > &__e, const │ │ │ │ - typename _Dom::value_type >:: _v_a_l_a_r_r_a_y< typename _Dom::value_type > │ │ │ │ - result_type >  &__v) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std:: │ │ │ │ - __less_equal, _Expr, _Constant, _Dom, │ │ │ │ - typename _Dom::value_type >, typename │ │ │ │ - __fun< struct std::__less_equal, _s_t_d_:_:_o_p_e_r_a_t_o_r_<_= (const _Expr< _Dom, │ │ │ │ - typename _Dom::value_type >:: typename _Dom::value_type > &__v, const │ │ │ │ - result_type >  typename _Dom::value_type &__t) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std:: │ │ │ │ - __less_equal, _Expr, _Expr, _Dom1, _s_t_d_:_:_o_p_e_r_a_t_o_r_<_= (const _Expr< _Dom1, │ │ │ │ - _Dom2 >, typename __fun< struct std:: typename _Dom1::value_type > &__v, │ │ │ │ - __less_equal, typename _Dom1:: const _Expr< _Dom2, typename _Dom2:: │ │ │ │ - value_type >::result_type >  value_type > &__w) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std:: │ │ │ │ - __less_equal, _Constant, _Expr, │ │ │ │ - typename _Dom::value_type, _Dom >, │ │ │ │ - typename __fun< struct std:: _s_t_d_:_:_o_p_e_r_a_t_o_r_<_= (const typename _Dom:: │ │ │ │ -__less_equal, typename _Dom::value_type value_type &__t, const _Expr< _Dom, │ │ │ │ - >::result_type >  typename _Dom::value_type > &__v) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std:: │ │ │ │ - __less_equal, _ValArray, _Expr, │ │ │ │ - typename _Dom::value_type, _Dom >, _s_t_d_:_:_o_p_e_r_a_t_o_r_<_= (const _v_a_l_a_r_r_a_y< │ │ │ │ - typename __fun< struct std:: typename _Dom::value_type > &__v, const │ │ │ │ -__less_equal, typename _Dom::value_type _Expr< _Dom, typename _Dom::value_type │ │ │ │ - >::result_type >  > &__e) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std:: │ │ │ │ - __equal_to, _Expr, _ValArray, _Dom, _s_t_d_:_:_o_p_e_r_a_t_o_r_=_= (const _Expr< _Dom, │ │ │ │ - typename _Dom::value_type >, typename typename _Dom::value_type > &__e, const │ │ │ │ -__fun< struct std::__equal_to, typename _v_a_l_a_r_r_a_y< typename _Dom::value_type > │ │ │ │ - _Dom::value_type >::result_type >  &__v) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std:: │ │ │ │ - __equal_to, _Expr, _Constant, _Dom, │ │ │ │ - typename _Dom::value_type >, typename _s_t_d_:_:_o_p_e_r_a_t_o_r_=_= (const _Expr< _Dom, │ │ │ │ -__fun< struct std::__equal_to, typename typename _Dom::value_type > &__v, const │ │ │ │ - _Dom::value_type >::result_type >  typename _Dom::value_type &__t) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std:: │ │ │ │ - __equal_to, _Expr, _Expr, _Dom1, _Dom2 _s_t_d_:_:_o_p_e_r_a_t_o_r_=_= (const _Expr< _Dom1, │ │ │ │ - >, typename __fun< struct std:: typename _Dom1::value_type > &__v, │ │ │ │ - __equal_to, typename _Dom1::value_type const _Expr< _Dom2, typename _Dom2:: │ │ │ │ - >::result_type >  value_type > &__w) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std:: │ │ │ │ - __equal_to, _Constant, _Expr, typename │ │ │ │ - _Dom::value_type, _Dom >, typename _s_t_d_:_:_o_p_e_r_a_t_o_r_=_= (const typename _Dom:: │ │ │ │ -__fun< struct std::__equal_to, typename value_type &__t, const _Expr< _Dom, │ │ │ │ - _Dom::value_type >::result_type >  typename _Dom::value_type > &__v) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std:: │ │ │ │ - __equal_to, _ValArray, _Expr, typename _s_t_d_:_:_o_p_e_r_a_t_o_r_=_= (const _v_a_l_a_r_r_a_y< │ │ │ │ - _Dom::value_type, _Dom >, typename typename _Dom::value_type > &__v, const │ │ │ │ -__fun< struct std::__equal_to, typename _Expr< _Dom, typename _Dom::value_type │ │ │ │ - _Dom::value_type >::result_type >  > &__e) │ │ │ │ -template │ │ │ │ -_Expr< _BinClos< struct std::__greater, │ │ │ │ -_Expr, _ValArray, _Dom, typename _Dom:: _s_t_d_:_:_o_p_e_r_a_t_o_r_> (const _Expr< _Dom, │ │ │ │ - value_type >, typename __fun< struct typename _Dom::value_type > &__e, const │ │ │ │ - std::__greater, typename _Dom:: _v_a_l_a_r_r_a_y< typename _Dom::value_type > │ │ │ │ - value_type >::result_type >  &__v) │ │ │ │ -template │ │ │ │ -_Expr< _BinClos< struct std::__greater, │ │ │ │ -_Expr, _Constant, _Dom, typename _Dom:: │ │ │ │ - value_type >, typename __fun< struct _s_t_d_:_:_o_p_e_r_a_t_o_r_> (const _Expr< _Dom, │ │ │ │ - std::__greater, typename _Dom:: typename _Dom::value_type > &__v, const │ │ │ │ - value_type >::result_type >  typename _Dom::value_type &__t) │ │ │ │ -template │ │ │ │ -_Expr< _BinClos< struct std::__greater, _s_t_d_:_:_o_p_e_r_a_t_o_r_> (const _Expr< _Dom1, │ │ │ │ - _Expr, _Expr, _Dom1, _Dom2 >, typename typename _Dom1::value_type > &__v, │ │ │ │ - __fun< struct std::__greater, typename const _Expr< _Dom2, typename _Dom2:: │ │ │ │ - _Dom1::value_type >::result_type >  value_type > &__w) │ │ │ │ -template │ │ │ │ -_Expr< _BinClos< struct std::__greater, │ │ │ │ - _Constant, _Expr, typename _Dom:: │ │ │ │ - value_type, _Dom >, typename __fun< _s_t_d_:_:_o_p_e_r_a_t_o_r_> (const typename _Dom:: │ │ │ │ - struct std::__greater, typename _Dom:: value_type &__t, const _Expr< _Dom, │ │ │ │ - value_type >::result_type >  typename _Dom::value_type > &__v) │ │ │ │ -template │ │ │ │ -_Expr< _BinClos< struct std::__greater, │ │ │ │ - _ValArray, _Expr, typename _Dom:: _s_t_d_:_:_o_p_e_r_a_t_o_r_> (const _v_a_l_a_r_r_a_y< │ │ │ │ - value_type, _Dom >, typename __fun< typename _Dom::value_type > &__v, const │ │ │ │ - struct std::__greater, typename _Dom:: _Expr< _Dom, typename _Dom::value_type │ │ │ │ - value_type >::result_type >  > &__e) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std:: │ │ │ │ - __greater_equal, _Expr, _ValArray, │ │ │ │ - _Dom, typename _Dom::value_type >, _s_t_d_:_:_o_p_e_r_a_t_o_r_>_= (const _Expr< _Dom, │ │ │ │ - typename __fun< struct std:: typename _Dom::value_type > &__e, const │ │ │ │ - __greater_equal, typename _Dom:: _v_a_l_a_r_r_a_y< typename _Dom::value_type > │ │ │ │ - value_type >::result_type >  &__v) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std:: │ │ │ │ - __greater_equal, _Expr, _Constant, │ │ │ │ - _Dom, typename _Dom::value_type >, │ │ │ │ - typename __fun< struct std:: _s_t_d_:_:_o_p_e_r_a_t_o_r_>_= (const _Expr< _Dom, │ │ │ │ - __greater_equal, typename _Dom:: typename _Dom::value_type > &__v, const │ │ │ │ - value_type >::result_type >  typename _Dom::value_type &__t) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std:: │ │ │ │ - __greater_equal, _Expr, _Expr, _Dom1, _s_t_d_:_:_o_p_e_r_a_t_o_r_>_= (const _Expr< _Dom1, │ │ │ │ - _Dom2 >, typename __fun< struct std:: typename _Dom1::value_type > &__v, │ │ │ │ - __greater_equal, typename _Dom1:: const _Expr< _Dom2, typename _Dom2:: │ │ │ │ - value_type >::result_type >  value_type > &__w) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std:: │ │ │ │ - __greater_equal, _Constant, _Expr, │ │ │ │ - typename _Dom::value_type, _Dom >, │ │ │ │ - typename __fun< struct std:: _s_t_d_:_:_o_p_e_r_a_t_o_r_>_= (const typename _Dom:: │ │ │ │ - __greater_equal, typename _Dom:: value_type &__t, const _Expr< _Dom, │ │ │ │ - value_type >::result_type >  typename _Dom::value_type > &__v) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std:: │ │ │ │ - __greater_equal, _ValArray, _Expr, │ │ │ │ - typename _Dom::value_type, _Dom >, _s_t_d_:_:_o_p_e_r_a_t_o_r_>_= (const _v_a_l_a_r_r_a_y< │ │ │ │ - typename __fun< struct std:: typename _Dom::value_type > &__v, const │ │ │ │ - __greater_equal, typename _Dom:: _Expr< _Dom, typename _Dom::value_type │ │ │ │ - value_type >::result_type >  > &__e) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std:: │ │ │ │ - __shift_right, _Expr, _ValArray, _Dom, │ │ │ │ - typename _Dom::value_type >, typename _s_t_d_:_:_o_p_e_r_a_t_o_r_>_> (const _Expr< _Dom, │ │ │ │ - __fun< struct std::__shift_right, typename _Dom::value_type > &__e, const │ │ │ │ - typename _Dom::value_type >:: _v_a_l_a_r_r_a_y< typename _Dom::value_type > │ │ │ │ - result_type >  &__v) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std:: │ │ │ │ - __shift_right, _Expr, _Constant, _Dom, │ │ │ │ - typename _Dom::value_type >, typename │ │ │ │ - __fun< struct std::__shift_right, _s_t_d_:_:_o_p_e_r_a_t_o_r_>_> (const _Expr< _Dom, │ │ │ │ - typename _Dom::value_type >:: typename _Dom::value_type > &__v, const │ │ │ │ - result_type >  typename _Dom::value_type &__t) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std:: │ │ │ │ - __shift_right, _Expr, _Expr, _Dom1, _s_t_d_:_:_o_p_e_r_a_t_o_r_>_> (const _Expr< _Dom1, │ │ │ │ - _Dom2 >, typename __fun< struct std:: typename _Dom1::value_type > &__v, │ │ │ │ - __shift_right, typename _Dom1:: const _Expr< _Dom2, typename _Dom2:: │ │ │ │ - value_type >::result_type >  value_type > &__w) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std:: │ │ │ │ - __shift_right, _Constant, _Expr, │ │ │ │ - typename _Dom::value_type, _Dom >, │ │ │ │ - typename __fun< struct std:: _s_t_d_:_:_o_p_e_r_a_t_o_r_>_> (const typename _Dom:: │ │ │ │ - __shift_right, typename _Dom:: value_type &__t, const _Expr< _Dom, │ │ │ │ - value_type >::result_type >  typename _Dom::value_type > &__v) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std:: │ │ │ │ - __shift_right, _ValArray, _Expr, │ │ │ │ - typename _Dom::value_type, _Dom >, _s_t_d_:_:_o_p_e_r_a_t_o_r_>_> (const _v_a_l_a_r_r_a_y< │ │ │ │ - typename __fun< struct std:: typename _Dom::value_type > &__v, const │ │ │ │ - __shift_right, typename _Dom:: _Expr< _Dom, typename _Dom::value_type │ │ │ │ - value_type >::result_type >  > &__e) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std:: │ │ │ │ - __bitwise_xor, _Expr, _ValArray, _Dom, │ │ │ │ - typename _Dom::value_type >, typename _s_t_d_:_:_o_p_e_r_a_t_o_r_^ (const _Expr< _Dom, │ │ │ │ - __fun< struct std::__bitwise_xor, typename _Dom::value_type > &__e, const │ │ │ │ - typename _Dom::value_type >:: _v_a_l_a_r_r_a_y< typename _Dom::value_type > │ │ │ │ - result_type >  &__v) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std:: │ │ │ │ - __bitwise_xor, _Expr, _Constant, _Dom, │ │ │ │ - typename _Dom::value_type >, typename │ │ │ │ - __fun< struct std::__bitwise_xor, _s_t_d_:_:_o_p_e_r_a_t_o_r_^ (const _Expr< _Dom, │ │ │ │ - typename _Dom::value_type >:: typename _Dom::value_type > &__v, const │ │ │ │ - result_type >  typename _Dom::value_type &__t) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std:: │ │ │ │ - __bitwise_xor, _Expr, _Expr, _Dom1, _s_t_d_:_:_o_p_e_r_a_t_o_r_^ (const _Expr< _Dom1, │ │ │ │ - _Dom2 >, typename __fun< struct std:: typename _Dom1::value_type > &__v, │ │ │ │ - __bitwise_xor, typename _Dom1:: const _Expr< _Dom2, typename _Dom2:: │ │ │ │ - value_type >::result_type >  value_type > &__w) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std:: │ │ │ │ - __bitwise_xor, _Constant, _Expr, │ │ │ │ - typename _Dom::value_type, _Dom >, │ │ │ │ - typename __fun< struct std:: _s_t_d_:_:_o_p_e_r_a_t_o_r_^ (const typename _Dom:: │ │ │ │ - __bitwise_xor, typename _Dom:: value_type &__t, const _Expr< _Dom, │ │ │ │ - value_type >::result_type >  typename _Dom::value_type > &__v) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std:: │ │ │ │ - __bitwise_xor, _ValArray, _Expr, │ │ │ │ - typename _Dom::value_type, _Dom >, _s_t_d_:_:_o_p_e_r_a_t_o_r_^ (const _v_a_l_a_r_r_a_y< │ │ │ │ - typename __fun< struct std:: typename _Dom::value_type > &__v, const │ │ │ │ - __bitwise_xor, typename _Dom:: _Expr< _Dom, typename _Dom::value_type │ │ │ │ - value_type >::result_type >  > &__e) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std:: │ │ │ │ - __bitwise_or, _Expr, _ValArray, _Dom, │ │ │ │ - typename _Dom::value_type >, typename _s_t_d_:_:_o_p_e_r_a_t_o_r_| (const _Expr< _Dom, │ │ │ │ - __fun< struct std::__bitwise_or, typename _Dom::value_type > &__e, const │ │ │ │ - typename _Dom::value_type >:: _v_a_l_a_r_r_a_y< typename _Dom::value_type > │ │ │ │ - result_type >  &__v) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std:: │ │ │ │ - __bitwise_or, _Expr, _Constant, _Dom, │ │ │ │ - typename _Dom::value_type >, typename │ │ │ │ - __fun< struct std::__bitwise_or, _s_t_d_:_:_o_p_e_r_a_t_o_r_| (const _Expr< _Dom, │ │ │ │ - typename _Dom::value_type >:: typename _Dom::value_type > &__v, const │ │ │ │ - result_type >  typename _Dom::value_type &__t) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std:: │ │ │ │ - __bitwise_or, _Expr, _Expr, _Dom1, _s_t_d_:_:_o_p_e_r_a_t_o_r_| (const _Expr< _Dom1, │ │ │ │ - _Dom2 >, typename __fun< struct std:: typename _Dom1::value_type > &__v, │ │ │ │ - __bitwise_or, typename _Dom1:: const _Expr< _Dom2, typename _Dom2:: │ │ │ │ - value_type >::result_type >  value_type > &__w) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std:: │ │ │ │ - __bitwise_or, _Constant, _Expr, │ │ │ │ - typename _Dom::value_type, _Dom >, │ │ │ │ - typename __fun< struct std:: _s_t_d_:_:_o_p_e_r_a_t_o_r_| (const typename _Dom:: │ │ │ │ -__bitwise_or, typename _Dom::value_type value_type &__t, const _Expr< _Dom, │ │ │ │ - >::result_type >  typename _Dom::value_type > &__v) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std:: │ │ │ │ - __bitwise_or, _ValArray, _Expr, │ │ │ │ - typename _Dom::value_type, _Dom >, _s_t_d_:_:_o_p_e_r_a_t_o_r_| (const _v_a_l_a_r_r_a_y< │ │ │ │ - typename __fun< struct std:: typename _Dom::value_type > &__v, const │ │ │ │ -__bitwise_or, typename _Dom::value_type _Expr< _Dom, typename _Dom::value_type │ │ │ │ - >::result_type >  > &__e) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std:: │ │ │ │ - __logical_or, _Expr, _ValArray, _Dom, │ │ │ │ - typename _Dom::value_type >, typename _s_t_d_:_:_o_p_e_r_a_t_o_r_|_| (const _Expr< _Dom, │ │ │ │ - __fun< struct std::__logical_or, typename _Dom::value_type > &__e, const │ │ │ │ - typename _Dom::value_type >:: _v_a_l_a_r_r_a_y< typename _Dom::value_type > │ │ │ │ - result_type >  &__v) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std:: │ │ │ │ - __logical_or, _Expr, _Constant, _Dom, │ │ │ │ - typename _Dom::value_type >, typename │ │ │ │ - __fun< struct std::__logical_or, _s_t_d_:_:_o_p_e_r_a_t_o_r_|_| (const _Expr< _Dom, │ │ │ │ - typename _Dom::value_type >:: typename _Dom::value_type > &__v, const │ │ │ │ - result_type >  typename _Dom::value_type &__t) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std:: │ │ │ │ - __logical_or, _Expr, _Expr, _Dom1, _s_t_d_:_:_o_p_e_r_a_t_o_r_|_| (const _Expr< _Dom1, │ │ │ │ - _Dom2 >, typename __fun< struct std:: typename _Dom1::value_type > &__v, │ │ │ │ - __logical_or, typename _Dom1:: const _Expr< _Dom2, typename _Dom2:: │ │ │ │ - value_type >::result_type >  value_type > &__w) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std:: │ │ │ │ - __logical_or, _Constant, _Expr, │ │ │ │ - typename _Dom::value_type, _Dom >, │ │ │ │ - typename __fun< struct std:: _s_t_d_:_:_o_p_e_r_a_t_o_r_|_| (const typename _Dom:: │ │ │ │ -__logical_or, typename _Dom::value_type value_type &__t, const _Expr< _Dom, │ │ │ │ - >::result_type >  typename _Dom::value_type > &__v) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std:: │ │ │ │ - __logical_or, _ValArray, _Expr, │ │ │ │ - typename _Dom::value_type, _Dom >, _s_t_d_:_:_o_p_e_r_a_t_o_r_|_| (const _v_a_l_a_r_r_a_y< │ │ │ │ - typename __fun< struct std:: typename _Dom::value_type > &__v, const │ │ │ │ -__logical_or, typename _Dom::value_type _Expr< _Dom, typename _Dom::value_type │ │ │ │ - >::result_type >  > &__e) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std::_Pow, │ │ │ │ -_Expr, _Constant, _Dom, typename _Dom:: _s_t_d_:_:_p_o_w (const _Expr< _Dom, typename │ │ │ │ -value_type >, typename _Dom::value_type _Dom::value_type > &__e, const typename │ │ │ │ - >  _Dom::value_type &__t) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std::_Pow, _s_t_d_:_:_p_o_w (const _Expr< _Dom, typename │ │ │ │ -_Expr, _ValArray, _Dom, typename _Dom:: _Dom::value_type > &__e, const │ │ │ │ -value_type >, typename _Dom::value_type _v_a_l_a_r_r_a_y< typename _Dom::value_type > │ │ │ │ - >  &__v) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std::_Pow, _s_t_d_:_:_p_o_w (const _Expr< _Dom1, typename │ │ │ │ - _Expr, _Expr, _Dom1, _Dom2 >, typename _Dom1::value_type > &__e1, const _Expr< │ │ │ │ - _Dom1::value_type >  _Dom2, typename _Dom2::value_type > │ │ │ │ - &__e2) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std::_Pow, │ │ │ │ - _Constant, _Expr, typename _Dom:: _s_t_d_:_:_p_o_w (const typename _Dom:: │ │ │ │ - value_type, _Dom >, typename _Dom:: value_type &__t, const _Expr< _Dom, │ │ │ │ - value_type >  typename _Dom::value_type > &__e) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct std::_Pow, _s_t_d_:_:_p_o_w (const typename _v_a_l_a_r_r_a_y< _Tp │ │ │ │ - _Constant, _ValArray, _Tp, _Tp >, _Tp >_:_:_v_a_l_u_e___t_y_p_e &__t, const _v_a_l_a_r_r_a_y< _Tp │ │ │ │ - >  > &__v) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct 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 typename _v_a_l_a_r_r_a_y< _Tp >_:_: │ │ │ │ - >  _v_a_l_u_e___t_y_p_e &__t) │ │ │ │ -template │ │ │ │ - _Expr< _BinClos< struct 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 │ │ │ │ - _Expr< _BinClos< struct std::_Pow, │ │ │ │ - _ValArray, _Expr, typename _Dom:: _s_t_d_:_:_p_o_w (const _v_a_l_a_r_r_a_y< typename │ │ │ │ - value_type, _Dom >, typename _Dom:: _Dom::valarray > &__v, const _Expr< │ │ │ │ - value_type >  _Dom, typename _Dom::value_type > &__e) │ │ │ │ -template │ │ │ │ - _Expr< _UnClos< struct std::_Sin, │ │ │ │ - _Expr, _Dom >, typename _Dom:: _s_t_d_:_:_s_i_n (const _Expr< _Dom, typename │ │ │ │ - value_type >  _Dom::value_type > &__e) │ │ │ │ -template │ │ │ │ - _Expr< _UnClos< struct std::_Sin, │ │ │ │ - _ValArray, _Tp >, _Tp >  _s_t_d_:_:_s_i_n (const _v_a_l_a_r_r_a_y< _Tp > &__v) │ │ │ │ -template │ │ │ │ - _Expr< _UnClos< struct std::_Sinh, │ │ │ │ - _Expr, _Dom >, typename _Dom:: _s_t_d_:_:_s_i_n_h (const _Expr< _Dom, typename │ │ │ │ - value_type >  _Dom::value_type > &__e) │ │ │ │ -template │ │ │ │ - _Expr< _UnClos< struct std::_Sinh, │ │ │ │ - _ValArray, _Tp >, _Tp >  _s_t_d_:_:_s_i_n_h (const _v_a_l_a_r_r_a_y< _Tp > &__v) │ │ │ │ -template │ │ │ │ - _Expr< _UnClos< struct std::_Sqrt, │ │ │ │ - _Expr, _Dom >, typename _Dom:: _s_t_d_:_:_s_q_r_t (const _Expr< _Dom, typename │ │ │ │ - value_type >  _Dom::value_type > &__e) │ │ │ │ -template │ │ │ │ - _Expr< _UnClos< struct std::_Sqrt, │ │ │ │ - _ValArray, _Tp >, _Tp >  _s_t_d_:_:_s_q_r_t (const _v_a_l_a_r_r_a_y< _Tp > &__v) │ │ │ │ -template │ │ │ │ - _Expr< _UnClos< struct std::_Tan, │ │ │ │ - _Expr, _Dom >, typename _Dom:: _s_t_d_:_:_t_a_n (const _Expr< _Dom, typename │ │ │ │ - value_type >  _Dom::value_type > &__e) │ │ │ │ -template │ │ │ │ - _Expr< _UnClos< struct std::_Tan, │ │ │ │ - _ValArray, _Tp >, _Tp >  _s_t_d_:_:_t_a_n (const _v_a_l_a_r_r_a_y< _Tp > &__v) │ │ │ │ -template │ │ │ │ - _Expr< _UnClos< struct std::_Tanh, │ │ │ │ - _Expr, _Dom >, typename _Dom:: _s_t_d_:_:_t_a_n_h (const _Expr< _Dom, typename │ │ │ │ - value_type >  _Dom::value_type > &__e) │ │ │ │ -template │ │ │ │ - _Expr< _UnClos< struct std::_Tanh, │ │ │ │ - _ValArray, _Tp >, _Tp >  _s_t_d_:_:_t_a_n_h (const _v_a_l_a_r_r_a_y< _Tp > &__v) │ │ │ │ + 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_f_t_e_r_._h. │ │ │ │ +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 ********** │ │ │ │ -********** _?◆_? __DDEEFFIINNEE__EEXXPPRR__BBIINNAARRYY__FFUUNNCCTTIIOONN ********** │ │ │ │ -#define _DEFINE_EXPR_BINARY_FUNCTION ( __FFuunn, │ │ │ │ - __UUFFuunn ) │ │ │ │ -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 ( __OOpp, │ │ │ │ - __NNaammee ) │ │ │ │ -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 ( __NNaammee, │ │ │ │ - __UUNNaammee ) │ │ │ │ -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 ( __OOpp, │ │ │ │ - __NNaammee ) │ │ │ │ -Definition at line _3_2_5 of file _v_a_l_a_r_r_a_y___a_f_t_e_r_._h. │ │ │ │ +********** _?◆_? __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. │ │ │ │ * bbiittss │ │ │ │ - * _v_a_l_a_r_r_a_y___a_f_t_e_r_._h │ │ │ │ + * _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.15.0 │ │ ├── ./usr/share/doc/gcc-11-base/libstdc++/user/a00347_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: valarray_after.h Source File │ │ │ +libstdc++: cxxabi_init_exception.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -48,580 +48,105 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
valarray_after.h
│ │ │ +
cxxabi_init_exception.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// ABI Support -*- C++ -*-
│ │ │
2
│ │ │ -
3// Copyright (C) 1997-2021 Free Software Foundation, Inc.
│ │ │ +
3// Copyright (C) 2016-2021 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_after.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@cmla.ens-cachan.fr>
│ │ │ -
31
│ │ │ -
32#ifndef _VALARRAY_AFTER_H
│ │ │ -
33#define _VALARRAY_AFTER_H 1
│ │ │ -
34
│ │ │ -
35#pragma GCC system_header
│ │ │ -
36
│ │ │ -
37namespace std _GLIBCXX_VISIBILITY(default)
│ │ │ -
38{
│ │ │ -
39_GLIBCXX_BEGIN_NAMESPACE_VERSION
│ │ │ +
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
│ │ │ -
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 };
│ │ │ +
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 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 };
│ │ │ -
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(); }
│ │ │ -
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 }
│ │ │ -
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 */
│ │ │ +
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 *)) _GLIBCXX_NOTHROW;
│ │ │ +
72
│ │ │ +
73 }
│ │ │ +
74} // namespace __cxxabiv1
│ │ │ +
75
│ │ │ +
76#endif
│ │ │ +
77
│ │ │ +
78#pragma GCC visibility pop
│ │ │ +
79
│ │ │ +
80#endif // _CXXABI_INIT_EXCEPTION_H
│ │ │ + │ │ │
ISO C++ entities toplevel namespace is std.
│ │ │ -
Implementation details not part of the namespace std interface.
│ │ │ +
Part of RTTI.
Definition typeinfo:89
│ │ │
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,566 +1,92 @@ │ │ │ │ libstdc++ │ │ │ │ -valarray_after.h │ │ │ │ +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 _Meta class. │ │ │ │ +1// ABI Support -*- C++ -*- │ │ │ │ 2 │ │ │ │ -3// Copyright (C) 1997-2021 Free Software Foundation, Inc. │ │ │ │ +3// Copyright (C) 2016-2021 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_after.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_AFTER_H │ │ │ │ -33#define _VALARRAY_AFTER_H 1 │ │ │ │ -34 │ │ │ │ -35#pragma GCC system_header │ │ │ │ -36 │ │ │ │ -37namespace _s_t_d _GLIBCXX_VISIBILITY(default) │ │ │ │ -38{ │ │ │ │ -39_GLIBCXX_BEGIN_NAMESPACE_VERSION │ │ │ │ +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 │ │ │ │ -41namespace _____d_e_t_a_i_l │ │ │ │ -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) {} │ │ │ │ +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 _t_y_p_e___i_n_f_o; │ │ │ │ +53} │ │ │ │ 54 │ │ │ │ -55 value_type │ │ │ │ -56 operator[] (size_t __i) const │ │ │ │ -57 { return _M_expr[_M_index[__i]]; } │ │ │ │ +55namespace __cxxabiv1 │ │ │ │ +56{ │ │ │ │ +57 struct __cxa_refcounted_exception; │ │ │ │ 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 }; │ │ │ │ +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 template │ │ │ │ -69 class _GBase<_Array<_Tp> > │ │ │ │ -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> > │ │ │ │ -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 }; │ │ │ │ -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) {} │ │ │ │ -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(); } │ │ │ │ -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> │ │ │ │ -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 │ │ │ │ -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 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 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 } │ │ │ │ -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 */ │ │ │ │ +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 *)) _GLIBCXX_NOTHROW; │ │ │ │ +72 │ │ │ │ +73 } │ │ │ │ +74} // namespace __cxxabiv1 │ │ │ │ +75 │ │ │ │ +76#endif │ │ │ │ +77 │ │ │ │ +78#pragma GCC visibility pop │ │ │ │ +79 │ │ │ │ +80#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_:_:_____d_e_t_a_i_l │ │ │ │ -Implementation details not part of the namespace std interface. │ │ │ │ +_s_t_d_:_:_t_y_p_e___i_n_f_o │ │ │ │ +Part of RTTI. │ │ │ │ +DDeeffiinniittiioonn _t_y_p_e_i_n_f_o_:_8_9 │ │ │ │ * bbiittss │ │ │ │ - * _v_a_l_a_r_r_a_y___a_f_t_e_r_._h │ │ │ │ + * _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.15.0 │ │ ├── ./usr/share/doc/gcc-11-base/libstdc++/user/a00350.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: valarray_before.h File Reference │ │ │ +libstdc++: stl_queue.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -48,41 +48,64 @@ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
valarray_before.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
namespace  std::__detail
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ +Functions

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 _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>.

│ │ │ +

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

│ │ │ │ │ │ -

Definition in file valarray_before.h.

│ │ │ +

Definition in file stl_queue.h.

│ │ │
│ │ │
│ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,13 +1,44 @@ │ │ │ │ libstdc++ │ │ │ │ -valarray_before.h File Reference │ │ │ │ +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 │ │ │ │ -namespace   _s_t_d_:_:_____d_e_t_a_i_l │ │ │ │ +FFuunnccttiioonnss │ │ │ │ +template │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_!_= (const _q_u_e_u_e< _Tp, _Seq │ │ │ │ + > &__x, const _q_u_e_u_e< _Tp, _Seq > &__y) │ │ │ │ +template │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_< (const _q_u_e_u_e< _Tp, _Seq │ │ │ │ + > &__x, const _q_u_e_u_e< _Tp, _Seq > &__y) │ │ │ │ +template │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_<_= (const _q_u_e_u_e< _Tp, _Seq │ │ │ │ + > &__x, const _q_u_e_u_e< _Tp, _Seq > &__y) │ │ │ │ +template │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_=_= (const _q_u_e_u_e< _Tp, _Seq │ │ │ │ + > &__x, const _q_u_e_u_e< _Tp, _Seq > &__y) │ │ │ │ +template │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_> (const _q_u_e_u_e< _Tp, _Seq │ │ │ │ + > &__x, const _q_u_e_u_e< _Tp, _Seq > &__y) │ │ │ │ +template │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_>_= (const _q_u_e_u_e< _Tp, _Seq │ │ │ │ + > &__x, const _q_u_e_u_e< _Tp, _Seq > &__y) │ │ │ │ +template │ │ │ │ + _e_n_a_b_l_e___i_f< __and_< __is_swappable< _s_t_d_:_:_s_w_a_p (_p_r_i_o_r_i_t_y___q_u_e_u_e< _Tp, │ │ │ │ +_Sequence >, __is_swappable< _Compare > _Sequence, _Compare > &__x, │ │ │ │ + >::value >_:_:_t_y_p_e  _p_r_i_o_r_i_t_y___q_u_e_u_e< _Tp, _Sequence, │ │ │ │ + _Compare > &__y) noexcept(noexcept │ │ │ │ + (__x.swap(__y))) │ │ │ │ +template │ │ │ │ + _e_n_a_b_l_e___i_f< __is_swappable< _Seq >:: _s_t_d_:_:_s_w_a_p (_q_u_e_u_e< _Tp, _Seq > &__x, │ │ │ │ + value >_:_:_t_y_p_e  _q_u_e_u_e< _Tp, _Seq > &__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___b_e_f_o_r_e_._h. │ │ │ │ +attempt to use it directly. Instead, include . │ │ │ │ +Definition in file _s_t_l___q_u_e_u_e_._h. │ │ │ │ * bbiittss │ │ │ │ - * _v_a_l_a_r_r_a_y___b_e_f_o_r_e_._h │ │ │ │ + * _s_t_l___q_u_e_u_e_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.15.0 │ │ ├── ./usr/share/doc/gcc-11-base/libstdc++/user/a00350_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: valarray_before.h Source File │ │ │ +libstdc++: stl_queue.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -48,20 +48,20 @@ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
valarray_before.h
│ │ │ +
stl_queue.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// Queue implementation -*- C++ -*-
│ │ │
2
│ │ │ -
3// Copyright (C) 1997-2021 Free Software Foundation, Inc.
│ │ │ +
3// Copyright (C) 2001-2021 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
│ │ │ @@ -74,772 +74,830 @@ │ │ │
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_before.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@cmla.ens-cachan.fr>
│ │ │ -
31
│ │ │ -
32#ifndef _VALARRAY_BEFORE_H
│ │ │ -
33#define _VALARRAY_BEFORE_H 1
│ │ │ -
34
│ │ │ -
35#pragma GCC system_header
│ │ │ -
36
│ │ │ -
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 };
│ │ │ +
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
│ │ │ +
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>
│ │ │ +
119 friend compare_three_way_result_t<_Seq1>
│ │ │ +
120 operator<=>(const queue<_Tp1, _Seq1>&, const queue<_Tp1, _Seq1>&);
│ │ │ +
121#endif
│ │ │ +
122
│ │ │ +
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
│ │ │ +
132 static_assert(is_same<_Tp, typename _Sequence::value_type>::value,
│ │ │ +
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 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 };
│ │ │ +
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#endif
│ │ │ +
198
│ │ │ +
199 /**
│ │ │ +
200 * Returns true if the %queue is empty.
│ │ │ +
201 */
│ │ │ +
202 _GLIBCXX_NODISCARD bool
│ │ │ +
│ │ │ +
203 empty() const
│ │ │ +
204 { return c.empty(); }
│ │ │ +
│ │ │ +
205
│ │ │ +
206 /** Returns the number of elements in the %queue. */
│ │ │ + │ │ │ +
│ │ │ +
208 size() const
│ │ │ +
209 { return c.size(); }
│ │ │ +
│ │ │ +
210
│ │ │ +
211 /**
│ │ │ +
212 * Returns a read/write reference to the data at the first
│ │ │ +
213 * element of the %queue.
│ │ │ +
214 */
│ │ │ +
215 reference
│ │ │ +
│ │ │ + │ │ │ +
217 {
│ │ │ +
218 __glibcxx_requires_nonempty();
│ │ │ +
219 return c.front();
│ │ │ +
220 }
│ │ │ +
│ │ │ +
221
│ │ │ +
222 /**
│ │ │ +
223 * Returns a read-only (constant) reference to the data at the first
│ │ │ +
224 * element of the %queue.
│ │ │ +
225 */
│ │ │ +
226 const_reference
│ │ │ +
│ │ │ +
227 front() const
│ │ │ +
228 {
│ │ │ +
229 __glibcxx_requires_nonempty();
│ │ │ +
230 return c.front();
│ │ │ +
231 }
│ │ │ +
│ │ │ +
232
│ │ │ +
233 /**
│ │ │ +
234 * Returns a read/write reference to the data at the last
│ │ │ +
235 * element of the %queue.
│ │ │ +
236 */
│ │ │ +
237 reference
│ │ │ +
│ │ │ + │ │ │ +
239 {
│ │ │ +
240 __glibcxx_requires_nonempty();
│ │ │ +
241 return c.back();
│ │ │ +
242 }
│ │ │ +
│ │ │ +
243
│ │ │ +
244 /**
│ │ │ +
245 * Returns a read-only (constant) reference to the data at the last
│ │ │ +
246 * element of the %queue.
│ │ │ +
247 */
│ │ │ +
248 const_reference
│ │ │ +
│ │ │ +
249 back() const
│ │ │ +
250 {
│ │ │ +
251 __glibcxx_requires_nonempty();
│ │ │ +
252 return c.back();
│ │ │ +
253 }
│ │ │ +
│ │ │ +
254
│ │ │ +
255 /**
│ │ │ +
256 * @brief Add data to the end of the %queue.
│ │ │ +
257 * @param __x Data to be added.
│ │ │ +
258 *
│ │ │ +
259 * This is a typical %queue operation. The function creates an
│ │ │ +
260 * element at the end of the %queue and assigns the given data
│ │ │ +
261 * to it. The time complexity of the operation depends on the
│ │ │ +
262 * underlying sequence.
│ │ │ +
263 */
│ │ │ +
264 void
│ │ │ +
│ │ │ +
265 push(const value_type& __x)
│ │ │ +
266 { c.push_back(__x); }
│ │ │ +
│ │ │ +
267
│ │ │ +
268#if __cplusplus >= 201103L
│ │ │ +
269 void
│ │ │ +
270 push(value_type&& __x)
│ │ │ +
271 { c.push_back(std::move(__x)); }
│ │ │ +
272
│ │ │ +
273#if __cplusplus > 201402L
│ │ │ +
274 template<typename... _Args>
│ │ │ +
275 decltype(auto)
│ │ │ +
276 emplace(_Args&&... __args)
│ │ │ +
277 { return c.emplace_back(std::forward<_Args>(__args)...); }
│ │ │ +
278#else
│ │ │ +
279 template<typename... _Args>
│ │ │ +
280 void
│ │ │ +
281 emplace(_Args&&... __args)
│ │ │ +
282 { c.emplace_back(std::forward<_Args>(__args)...); }
│ │ │ +
283#endif
│ │ │ +
284#endif
│ │ │ +
285
│ │ │ +
286 /**
│ │ │ +
287 * @brief Removes first element.
│ │ │ +
288 *
│ │ │ +
289 * This is a typical %queue operation. It shrinks the %queue by one.
│ │ │ +
290 * The time complexity of the operation depends on the underlying
│ │ │ +
291 * sequence.
│ │ │ +
292 *
│ │ │ +
293 * Note that no data is returned, and if the first element's
│ │ │ +
294 * data is needed, it should be retrieved before pop() is
│ │ │ +
295 * called.
│ │ │ +
296 */
│ │ │ +
297 void
│ │ │ +
│ │ │ + │ │ │ +
299 {
│ │ │ +
300 __glibcxx_requires_nonempty();
│ │ │ +
301 c.pop_front();
│ │ │ +
302 }
│ │ │ +
│ │ │ +
303
│ │ │ +
304#if __cplusplus >= 201103L
│ │ │ +
305 void
│ │ │ +
306 swap(queue& __q)
│ │ │ +
307#if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11
│ │ │ +
308 noexcept(__is_nothrow_swappable<_Sequence>::value)
│ │ │ +
309#else
│ │ │ +
310 noexcept(__is_nothrow_swappable<_Tp>::value)
│ │ │ +
311#endif
│ │ │ +
312 {
│ │ │ +
313 using std::swap;
│ │ │ +
314 swap(c, __q.c);
│ │ │ +
315 }
│ │ │ +
316#endif // __cplusplus >= 201103L
│ │ │ +
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 };
│ │ │ +
319#if __cpp_deduction_guides >= 201606
│ │ │ +
320 template<typename _Container,
│ │ │ +
321 typename = _RequireNotAllocator<_Container>>
│ │ │ + │ │ │ +
323
│ │ │ +
324 template<typename _Container, typename _Allocator,
│ │ │ +
325 typename = _RequireNotAllocator<_Container>,
│ │ │ +
326 typename = _RequireAllocator<_Allocator>>
│ │ │ +
327 queue(_Container, _Allocator)
│ │ │ + │ │ │ +
329#endif
│ │ │ +
330
│ │ │ +
331 /**
│ │ │ +
332 * @brief Queue equality comparison.
│ │ │ +
333 * @param __x A %queue.
│ │ │ +
334 * @param __y A %queue of the same type as @a __x.
│ │ │ +
335 * @return True iff the size and elements of the queues are equal.
│ │ │ +
336 *
│ │ │ +
337 * This is an equivalence relation. Complexity and semantics depend on the
│ │ │ +
338 * underlying sequence type, but the expected rules are: this relation is
│ │ │ +
339 * linear in the size of the sequences, and queues are considered equivalent
│ │ │ +
340 * if their sequences compare equal.
│ │ │ +
341 */
│ │ │ +
342 template<typename _Tp, typename _Seq>
│ │ │ +
343 inline bool
│ │ │ +
│ │ │ +
344 operator==(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y)
│ │ │ +
345 { return __x.c == __y.c; }
│ │ │ +
│ │ │ +
346
│ │ │ +
347 /**
│ │ │ +
348 * @brief Queue ordering relation.
│ │ │ +
349 * @param __x A %queue.
│ │ │ +
350 * @param __y A %queue of the same type as @a x.
│ │ │ +
351 * @return True iff @a __x is lexicographically less than @a __y.
│ │ │ +
352 *
│ │ │ +
353 * This is an total ordering relation. Complexity and semantics
│ │ │ +
354 * depend on the underlying sequence type, but the expected rules
│ │ │ +
355 * are: this relation is linear in the size of the sequences, the
│ │ │ +
356 * elements must be comparable with @c <, and
│ │ │ +
357 * std::lexicographical_compare() is usually used to make the
│ │ │ +
358 * determination.
│ │ │ +
359 */
│ │ │ +
360 template<typename _Tp, typename _Seq>
│ │ │ +
│ │ │ +
361 inline bool
│ │ │ +
362 operator<(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y)
│ │ │ +
363 { return __x.c < __y.c; }
│ │ │ +
│ │ │ +
364
│ │ │ +
365 /// Based on operator==
│ │ │ +
366 template<typename _Tp, typename _Seq>
│ │ │ +
367 inline bool
│ │ │ +
│ │ │ +
368 operator!=(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y)
│ │ │ +
369 { return !(__x == __y); }
│ │ │ +
│ │ │ +
370
│ │ │ +
371 /// Based on operator<
│ │ │ +
372 template<typename _Tp, typename _Seq>
│ │ │ +
373 inline bool
│ │ │ +
│ │ │ +
374 operator>(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y)
│ │ │ +
375 { return __y < __x; }
│ │ │ +
│ │ │ +
376
│ │ │ +
377 /// Based on operator<
│ │ │ +
378 template<typename _Tp, typename _Seq>
│ │ │ +
│ │ │ +
379 inline bool
│ │ │ +
380 operator<=(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y)
│ │ │ +
381 { return !(__y < __x); }
│ │ │ +
│ │ │ +
382
│ │ │ +
383 /// Based on operator<
│ │ │ +
384 template<typename _Tp, typename _Seq>
│ │ │ +
385 inline bool
│ │ │ +
│ │ │ +
386 operator>=(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y)
│ │ │ +
387 { return !(__x < __y); }
│ │ │ +
│ │ │ +
388
│ │ │ +
389#if __cpp_lib_three_way_comparison
│ │ │ +
390 template<typename _Tp, three_way_comparable _Seq>
│ │ │ +
391 inline compare_three_way_result_t<_Seq>
│ │ │ +
392 operator<=>(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y)
│ │ │ +
393 { return __x.c <=> __y.c; }
│ │ │ +
394#endif
│ │ │ +
395
│ │ │ +
396#if __cplusplus >= 201103L
│ │ │ +
397 template<typename _Tp, typename _Seq>
│ │ │ +
398 inline
│ │ │ +
399#if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11
│ │ │ +
400 // Constrained free swap overload, see p0185r1
│ │ │ + │ │ │ +
402#else
│ │ │ +
403 void
│ │ │ +
404#endif
│ │ │ + │ │ │ +
406 noexcept(noexcept(__x.swap(__y)))
│ │ │ +
407 { __x.swap(__y); }
│ │ │
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 };
│ │ │ +
409 template<typename _Tp, typename _Seq, typename _Alloc>
│ │ │ +
410 struct uses_allocator<queue<_Tp, _Seq>, _Alloc>
│ │ │ +
411 : public uses_allocator<_Seq, _Alloc>::type { };
│ │ │ +
412#endif // __cplusplus >= 201103L
│ │ │ +
413
│ │ │ +
414 /**
│ │ │ +
415 * @brief A standard container automatically sorting its contents.
│ │ │ +
416 *
│ │ │ +
417 * @ingroup sequences
│ │ │ +
418 *
│ │ │ +
419 * @tparam _Tp Type of element.
│ │ │ +
420 * @tparam _Sequence Type of underlying sequence, defaults to vector<_Tp>.
│ │ │ +
421 * @tparam _Compare Comparison function object type, defaults to
│ │ │ +
422 * less<_Sequence::value_type>.
│ │ │ +
423 *
│ │ │ +
424 * This is not a true container, but an @e adaptor. It holds
│ │ │ +
425 * another container, and provides a wrapper interface to that
│ │ │ +
426 * container. The wrapper is what enforces priority-based sorting
│ │ │ +
427 * and %queue behavior. Very few of the standard container/sequence
│ │ │ +
428 * interface requirements are met (e.g., iterators).
│ │ │ +
429 *
│ │ │ +
430 * The second template parameter defines the type of the underlying
│ │ │ +
431 * sequence/container. It defaults to std::vector, but it can be
│ │ │ +
432 * any type that supports @c front(), @c push_back, @c pop_back,
│ │ │ +
433 * and random-access iterators, such as std::deque or an
│ │ │ +
434 * appropriate user-defined type.
│ │ │ +
435 *
│ │ │ +
436 * The third template parameter supplies the means of making
│ │ │ +
437 * priority comparisons. It defaults to @c less<value_type> but
│ │ │ +
438 * can be anything defining a strict weak ordering.
│ │ │ +
439 *
│ │ │ +
440 * Members not found in @a normal containers are @c container_type,
│ │ │ +
441 * which is a typedef for the second Sequence parameter, and @c
│ │ │ +
442 * push, @c pop, and @c top, which are standard %queue operations.
│ │ │ +
443 *
│ │ │ +
444 * @note No equality/comparison operators are provided for
│ │ │ +
445 * %priority_queue.
│ │ │ +
446 *
│ │ │ +
447 * @note Sorting of the elements takes place as they are added to,
│ │ │ +
448 * and removed from, the %priority_queue using the
│ │ │ +
449 * %priority_queue's member functions. If you access the elements
│ │ │ +
450 * by other means, and change their data such that the sorting
│ │ │ +
451 * order would be different, the %priority_queue will not re-sort
│ │ │ +
452 * the elements for you. (How could it know to do so?)
│ │ │ +
453 */
│ │ │ +
454 template<typename _Tp, typename _Sequence = vector<_Tp>,
│ │ │ +
455 typename _Compare = less<typename _Sequence::value_type> >
│ │ │ +
│ │ │ + │ │ │ +
457 {
│ │ │ +
458#ifdef _GLIBCXX_CONCEPT_CHECKS
│ │ │ +
459 // concept requirements
│ │ │ +
460 typedef typename _Sequence::value_type _Sequence_value_type;
│ │ │ +
461# if __cplusplus < 201103L
│ │ │ +
462 __glibcxx_class_requires(_Tp, _SGIAssignableConcept)
│ │ │ +
463# endif
│ │ │ +
464 __glibcxx_class_requires(_Sequence, _SequenceConcept)
│ │ │ +
465 __glibcxx_class_requires(_Sequence, _RandomAccessContainerConcept)
│ │ │ +
466 __glibcxx_class_requires2(_Tp, _Sequence_value_type, _SameTypeConcept)
│ │ │ +
467 __glibcxx_class_requires4(_Compare, bool, _Tp, _Tp,
│ │ │ +
468 _BinaryFunctionConcept)
│ │ │ +
469#endif
│ │ │ +
470
│ │ │ +
471#if __cplusplus >= 201103L
│ │ │ +
472 template<typename _Alloc>
│ │ │ +
473 using _Uses = typename
│ │ │ + │ │ │ +
475
│ │ │ +
476#if __cplusplus >= 201703L
│ │ │ +
477 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ +
478 // 2566. Requirements on the first template parameter of container
│ │ │ +
479 // adaptors
│ │ │ +
480 static_assert(is_same<_Tp, typename _Sequence::value_type>::value,
│ │ │ +
481 "value_type must be the same as the underlying container");
│ │ │ +
482#endif // C++17
│ │ │ +
483#endif // C++11
│ │ │ +
484
│ │ │ +
485 public:
│ │ │ +
486 typedef typename _Sequence::value_type value_type;
│ │ │ +
487 typedef typename _Sequence::reference reference;
│ │ │ +
488 typedef typename _Sequence::const_reference const_reference;
│ │ │ +
489 typedef typename _Sequence::size_type size_type;
│ │ │ +
490 typedef _Sequence container_type;
│ │ │ +
491 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ +
492 // DR 2684. priority_queue lacking comparator typedef
│ │ │ +
493 typedef _Compare value_compare;
│ │ │ +
494
│ │ │ +
495 protected:
│ │ │ +
496 // See queue::c for notes on these names.
│ │ │ +
497 _Sequence c;
│ │ │ +
498 _Compare comp;
│ │ │ +
499
│ │ │ +
500 public:
│ │ │ +
501 /**
│ │ │ +
502 * @brief Default constructor creates no elements.
│ │ │ +
503 */
│ │ │ +
504#if __cplusplus < 201103L
│ │ │ +
505 explicit
│ │ │ +
506 priority_queue(const _Compare& __x = _Compare(),
│ │ │ +
507 const _Sequence& __s = _Sequence())
│ │ │ +
508 : c(__s), comp(__x)
│ │ │ +
509 { std::make_heap(c.begin(), c.end(), comp); }
│ │ │ +
510#else
│ │ │ +
511 template<typename _Seq = _Sequence, typename _Requires = typename
│ │ │ + │ │ │ + │ │ │ +
│ │ │ + │ │ │ +
515 : c(), comp() { }
│ │ │ +
│ │ │ +
516
│ │ │ +
517 explicit
│ │ │ +
518 priority_queue(const _Compare& __x, const _Sequence& __s)
│ │ │ +
519 : c(__s), comp(__x)
│ │ │ +
520 { std::make_heap(c.begin(), c.end(), comp); }
│ │ │ +
521
│ │ │ +
522 explicit
│ │ │ +
523 priority_queue(const _Compare& __x, _Sequence&& __s = _Sequence())
│ │ │ +
524 : c(std::move(__s)), comp(__x)
│ │ │ +
525 { std::make_heap(c.begin(), c.end(), comp); }
│ │ │ +
526
│ │ │ +
527 template<typename _Alloc, typename _Requires = _Uses<_Alloc>>
│ │ │ +
528 explicit
│ │ │ +
529 priority_queue(const _Alloc& __a)
│ │ │ +
530 : c(__a), comp() { }
│ │ │
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;
│ │ │ +
532 template<typename _Alloc, typename _Requires = _Uses<_Alloc>>
│ │ │ +
533 priority_queue(const _Compare& __x, const _Alloc& __a)
│ │ │ +
534 : c(__a), comp(__x) { }
│ │ │ +
535
│ │ │ +
536 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ +
537 // 2537. Constructors [...] taking allocators should call make_heap
│ │ │ +
538 template<typename _Alloc, typename _Requires = _Uses<_Alloc>>
│ │ │ +
539 priority_queue(const _Compare& __x, const _Sequence& __c,
│ │ │ +
540 const _Alloc& __a)
│ │ │ +
541 : c(__c, __a), comp(__x)
│ │ │ +
542 { std::make_heap(c.begin(), c.end(), comp); }
│ │ │
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 };
│ │ │ +
544 template<typename _Alloc, typename _Requires = _Uses<_Alloc>>
│ │ │ +
545 priority_queue(const _Compare& __x, _Sequence&& __c, const _Alloc& __a)
│ │ │ +
546 : c(std::move(__c), __a), comp(__x)
│ │ │ +
547 { std::make_heap(c.begin(), c.end(), comp); }
│ │ │ +
548
│ │ │ +
549 template<typename _Alloc, typename _Requires = _Uses<_Alloc>>
│ │ │ +
550 priority_queue(const priority_queue& __q, const _Alloc& __a)
│ │ │ +
551 : c(__q.c, __a), comp(__q.comp) { }
│ │ │ +
552
│ │ │ +
553 template<typename _Alloc, typename _Requires = _Uses<_Alloc>>
│ │ │ +
554 priority_queue(priority_queue&& __q, const _Alloc& __a)
│ │ │ +
555 : c(std::move(__q.c), __a), comp(std::move(__q.comp)) { }
│ │ │ +
556#endif
│ │ │ +
557
│ │ │ +
558 /**
│ │ │ +
559 * @brief Builds a %queue from a range.
│ │ │ +
560 * @param __first An input iterator.
│ │ │ +
561 * @param __last An input iterator.
│ │ │ +
562 * @param __x A comparison functor describing a strict weak ordering.
│ │ │ +
563 * @param __s An initial sequence with which to start.
│ │ │ +
564 *
│ │ │ +
565 * Begins by copying @a __s, inserting a copy of the elements
│ │ │ +
566 * from @a [first,last) into the copy of @a __s, then ordering
│ │ │ +
567 * the copy according to @a __x.
│ │ │ +
568 *
│ │ │ +
569 * For more information on function objects, see the
│ │ │ +
570 * documentation on @link functors functor base
│ │ │ +
571 * classes@endlink.
│ │ │ +
572 */
│ │ │ +
573#if __cplusplus < 201103L
│ │ │ +
574 template<typename _InputIterator>
│ │ │ +
575 priority_queue(_InputIterator __first, _InputIterator __last,
│ │ │ +
576 const _Compare& __x = _Compare(),
│ │ │ +
577 const _Sequence& __s = _Sequence())
│ │ │ +
578 : c(__s), comp(__x)
│ │ │ +
579 {
│ │ │ +
580 __glibcxx_requires_valid_range(__first, __last);
│ │ │ +
581 c.insert(c.end(), __first, __last);
│ │ │ +
582 std::make_heap(c.begin(), c.end(), comp);
│ │ │ +
583 }
│ │ │ +
584#else
│ │ │ +
585 template<typename _InputIterator>
│ │ │ +
│ │ │ +
586 priority_queue(_InputIterator __first, _InputIterator __last,
│ │ │ +
587 const _Compare& __x,
│ │ │ +
588 const _Sequence& __s)
│ │ │ +
589 : c(__s), comp(__x)
│ │ │ +
590 {
│ │ │ +
591 __glibcxx_requires_valid_range(__first, __last);
│ │ │ +
592 c.insert(c.end(), __first, __last);
│ │ │ +
593 std::make_heap(c.begin(), c.end(), comp);
│ │ │ +
594 }
│ │ │ +
│ │ │ +
595
│ │ │ +
596 template<typename _InputIterator>
│ │ │ +
597 priority_queue(_InputIterator __first, _InputIterator __last,
│ │ │ +
598 const _Compare& __x = _Compare(),
│ │ │ +
599 _Sequence&& __s = _Sequence())
│ │ │ +
600 : c(std::move(__s)), comp(__x)
│ │ │ +
601 {
│ │ │ +
602 __glibcxx_requires_valid_range(__first, __last);
│ │ │ +
603 c.insert(c.end(), __first, __last);
│ │ │ +
604 std::make_heap(c.begin(), c.end(), comp);
│ │ │ +
605 }
│ │ │ +
606#endif
│ │ │ +
607
│ │ │ +
608 /**
│ │ │ +
609 * Returns true if the %queue is empty.
│ │ │ +
610 */
│ │ │ +
611 _GLIBCXX_NODISCARD bool
│ │ │ +
│ │ │ +
612 empty() const
│ │ │ +
613 { return c.empty(); }
│ │ │ +
│ │ │ +
614
│ │ │ +
615 /** Returns the number of elements in the %queue. */
│ │ │ + │ │ │ +
│ │ │ +
617 size() const
│ │ │ +
618 { return c.size(); }
│ │ │ +
│ │ │ +
619
│ │ │ +
620 /**
│ │ │ +
621 * Returns a read-only (constant) reference to the data at the first
│ │ │ +
622 * element of the %queue.
│ │ │ +
623 */
│ │ │ +
624 const_reference
│ │ │ +
│ │ │ +
625 top() const
│ │ │ +
626 {
│ │ │ +
627 __glibcxx_requires_nonempty();
│ │ │ +
628 return c.front();
│ │ │ +
629 }
│ │ │ +
│ │ │ +
630
│ │ │ +
631 /**
│ │ │ +
632 * @brief Add data to the %queue.
│ │ │ +
633 * @param __x Data to be added.
│ │ │ +
634 *
│ │ │ +
635 * This is a typical %queue operation.
│ │ │ +
636 * The time complexity of the operation depends on the underlying
│ │ │ +
637 * sequence.
│ │ │ +
638 */
│ │ │ +
639 void
│ │ │ +
│ │ │ +
640 push(const value_type& __x)
│ │ │ +
641 {
│ │ │ +
642 c.push_back(__x);
│ │ │ +
643 std::push_heap(c.begin(), c.end(), comp);
│ │ │ +
644 }
│ │ │ +
│ │ │ +
645
│ │ │ +
646#if __cplusplus >= 201103L
│ │ │ +
647 void
│ │ │ +
648 push(value_type&& __x)
│ │ │ +
649 {
│ │ │ +
650 c.push_back(std::move(__x));
│ │ │ +
651 std::push_heap(c.begin(), c.end(), comp);
│ │ │ +
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;
│ │ │ +
654 template<typename... _Args>
│ │ │ +
655 void
│ │ │ +
656 emplace(_Args&&... __args)
│ │ │ +
657 {
│ │ │ +
658 c.emplace_back(std::forward<_Args>(__args)...);
│ │ │ +
659 std::push_heap(c.begin(), c.end(), comp);
│ │ │ +
660 }
│ │ │ +
661#endif
│ │ │ +
662
│ │ │ +
663 /**
│ │ │ +
664 * @brief Removes first element.
│ │ │ +
665 *
│ │ │ +
666 * This is a typical %queue operation. It shrinks the %queue
│ │ │ +
667 * by one. The time complexity of the operation depends on the
│ │ │ +
668 * underlying sequence.
│ │ │ +
669 *
│ │ │ +
670 * Note that no data is returned, and if the first element's
│ │ │ +
671 * data is needed, it should be retrieved before pop() is
│ │ │ +
672 * called.
│ │ │ +
673 */
│ │ │ +
674 void
│ │ │ +
│ │ │ + │ │ │ +
676 {
│ │ │ +
677 __glibcxx_requires_nonempty();
│ │ │ +
678 std::pop_heap(c.begin(), c.end(), comp);
│ │ │ +
679 c.pop_back();
│ │ │ +
680 }
│ │ │ +
│ │ │
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 };
│ │ │ +
682#if __cplusplus >= 201103L
│ │ │ +
683 void
│ │ │ +
684 swap(priority_queue& __pq)
│ │ │ +
685 noexcept(__and_<
│ │ │ +
686#if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11
│ │ │ +
687 __is_nothrow_swappable<_Sequence>,
│ │ │ +
688#else
│ │ │ +
689 __is_nothrow_swappable<_Tp>,
│ │ │ +
690#endif
│ │ │ +
691 __is_nothrow_swappable<_Compare>
│ │ │ +
692 >::value)
│ │ │ +
693 {
│ │ │ +
694 using std::swap;
│ │ │ +
695 swap(c, __pq.c);
│ │ │ +
696 swap(comp, __pq.comp);
│ │ │ +
697 }
│ │ │ +
698#endif // __cplusplus >= 201103L
│ │ │ +
699 };
│ │ │ +
│ │ │ +
700
│ │ │ +
701#if __cpp_deduction_guides >= 201606
│ │ │ +
702 template<typename _Compare, typename _Container,
│ │ │ +
703 typename = _RequireNotAllocator<_Compare>,
│ │ │ +
704 typename = _RequireNotAllocator<_Container>>
│ │ │ +
705 priority_queue(_Compare, _Container)
│ │ │ + │ │ │ +
707
│ │ │ +
708 template<typename _InputIterator, typename _ValT
│ │ │ + │ │ │ +
710 typename _Compare = less<_ValT>,
│ │ │ +
711 typename _Container = vector<_ValT>,
│ │ │ +
712 typename = _RequireInputIter<_InputIterator>,
│ │ │ +
713 typename = _RequireNotAllocator<_Compare>,
│ │ │ +
714 typename = _RequireNotAllocator<_Container>>
│ │ │ +
715 priority_queue(_InputIterator, _InputIterator, _Compare = _Compare(),
│ │ │ +
716 _Container = _Container())
│ │ │ + │ │ │ +
718
│ │ │ +
719 template<typename _Compare, typename _Container, typename _Allocator,
│ │ │ +
720 typename = _RequireNotAllocator<_Compare>,
│ │ │ +
721 typename = _RequireNotAllocator<_Container>,
│ │ │ +
722 typename = _RequireAllocator<_Allocator>>
│ │ │ +
723 priority_queue(_Compare, _Container, _Allocator)
│ │ │ + │ │ │ +
725#endif
│ │ │ +
726
│ │ │ +
727 // No equality/comparison operators are provided for priority_queue.
│ │ │ +
728
│ │ │ +
729#if __cplusplus >= 201103L
│ │ │ +
730 template<typename _Tp, typename _Sequence, typename _Compare>
│ │ │ +
731 inline
│ │ │ +
732#if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11
│ │ │ +
733 // Constrained free swap overload, see p0185r1
│ │ │ + │ │ │ +
735 __is_swappable<_Compare>>::value>::type
│ │ │ +
736#else
│ │ │ +
737 void
│ │ │ +
738#endif
│ │ │ + │ │ │ + │ │ │ +
741 noexcept(noexcept(__x.swap(__y)))
│ │ │ +
742 { __x.swap(__y); }
│ │ │
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
│ │ │ +
744 template<typename _Tp, typename _Sequence, typename _Compare,
│ │ │ +
745 typename _Alloc>
│ │ │ +
746 struct uses_allocator<priority_queue<_Tp, _Sequence, _Compare>, _Alloc>
│ │ │ +
747 : public uses_allocator<_Sequence, _Alloc>::type { };
│ │ │ +
748#endif // __cplusplus >= 201103L
│ │ │ +
749
│ │ │ +
750_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ +
751} // namespace
│ │ │ +
752
│ │ │ +
753#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:428
│ │ │ +
constexpr _Tp && forward(typename std::remove_reference< _Tp >::type &__t) noexcept
Forward an lvalue.
Definition move.h:77
│ │ │
ISO C++ entities toplevel namespace is std.
│ │ │ -
std::complex< _Tp > atan(const std::complex< _Tp > &)
atan(__z) [8.1.4].
Definition complex:1718
│ │ │ -
std::complex< _Tp > acos(const std::complex< _Tp > &)
acos(__z) [8.1.2].
Definition complex:1638
│ │ │ -
std::complex< _Tp > asin(const std::complex< _Tp > &)
asin(__z) [8.1.3].
Definition complex:1674
│ │ │ -
Implementation details not part of the namespace std interface.
│ │ │ +
is_default_constructible
Definition type_traits:963
│ │ │ + │ │ │ +
Define a member typedef type only if a boolean constant is true.
Definition type_traits:2192
│ │ │ + │ │ │ + │ │ │ +
Declare uses_allocator so it can be specialized in <queue> etc.
Definition memoryfwd.h:72
│ │ │ +
One of the comparison functors.
│ │ │ +
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:265
│ │ │ +
_Sequence c
c is the underlying container.
Definition stl_queue.h:153
│ │ │ +
size_type size() const
Definition stl_queue.h:208
│ │ │ +
reference front()
Definition stl_queue.h:216
│ │ │ +
const_reference back() const
Definition stl_queue.h:249
│ │ │ +
void pop()
Removes first element.
Definition stl_queue.h:298
│ │ │ +
queue()
Default constructor creates no elements.
Definition stl_queue.h:166
│ │ │ +
const_reference front() const
Definition stl_queue.h:227
│ │ │ +
bool empty() const
Definition stl_queue.h:203
│ │ │ +
reference back()
Definition stl_queue.h:238
│ │ │ +
A standard container automatically sorting its contents.
Definition stl_queue.h:457
│ │ │ +
size_type size() const
Definition stl_queue.h:617
│ │ │ +
bool empty() const
Definition stl_queue.h:612
│ │ │ +
priority_queue(_InputIterator __first, _InputIterator __last, const _Compare &__x, const _Sequence &__s)
Builds a queue from a range.
Definition stl_queue.h:586
│ │ │ +
void pop()
Removes first element.
Definition stl_queue.h:675
│ │ │ +
const_reference top() const
Definition stl_queue.h:625
│ │ │ +
void push(const value_type &__x)
Add data to the queue.
Definition stl_queue.h:640
│ │ │ +
priority_queue()
Default constructor creates no elements.
Definition stl_queue.h:514
│ │ │ +
A standard container which offers fixed time access to individual elements in any order.
Definition stl_vector.h:390
│ │ │
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,13 +1,13 @@ │ │ │ │ libstdc++ │ │ │ │ -valarray_before.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 _Meta class. │ │ │ │ +1// Queue implementation -*- C++ -*- │ │ │ │ 2 │ │ │ │ -3// Copyright (C) 1997-2021 Free Software Foundation, Inc. │ │ │ │ +3// Copyright (C) 2001-2021 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,810 +21,841 @@ │ │ │ │ 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 │ │ │ │ -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_BEFORE_H │ │ │ │ -33#define _VALARRAY_BEFORE_H 1 │ │ │ │ -34 │ │ │ │ -35#pragma GCC system_header │ │ │ │ -36 │ │ │ │ -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 _a_c_o_s(__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 _a_s_i_n(__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 _a_t_a_n(__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 }; │ │ │ │ +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 │ │ │ │ +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 _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 │ │ │ │ +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 compare_three_way_result_t<_Seq1> │ │ │ │ +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#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>_:_:_t_y_p_e; │ │ │ │ +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(is_same<_Tp, typename _Sequence::value_type>::value, │ │ │ │ +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>_:_:_t_y_p_e> │ │ │ │ +_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 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 │ │ │ │ +186 template> │ │ │ │ +187 _q_u_e_u_e(_Sequence&& __c, const _Alloc& __a) │ │ │ │ +188 : _c(std::_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(std::_m_o_v_e(__q._c), __a) { } │ │ │ │ +197#endif │ │ │ │ +198 │ │ │ │ +199 /** │ │ │ │ +200 * Returns true if the %queue is empty. │ │ │ │ +201 */ │ │ │ │ +202 _GLIBCXX_NODISCARD bool │ │ │ │ +_2_0_3 _e_m_p_t_y() const │ │ │ │ +204 { return _c.empty(); } │ │ │ │ +205 │ │ │ │ +206 /** Returns the number of elements in the %queue. */ │ │ │ │ +207 _s_i_z_e___t_y_p_e │ │ │ │ +_2_0_8 _s_i_z_e() const │ │ │ │ +209 { return _c.size(); } │ │ │ │ +210 │ │ │ │ +211 /** │ │ │ │ +212 * Returns a read/write reference to the data at the first │ │ │ │ +213 * element of the %queue. │ │ │ │ +214 */ │ │ │ │ +215 reference │ │ │ │ +_2_1_6 _f_r_o_n_t() │ │ │ │ +217 { │ │ │ │ +218 __glibcxx_requires_nonempty(); │ │ │ │ +219 return _c.front(); │ │ │ │ +220 } │ │ │ │ +221 │ │ │ │ +222 /** │ │ │ │ +223 * Returns a read-only (constant) reference to the data at the first │ │ │ │ +224 * element of the %queue. │ │ │ │ +225 */ │ │ │ │ +226 const_reference │ │ │ │ +_2_2_7 _f_r_o_n_t() const │ │ │ │ +228 { │ │ │ │ +229 __glibcxx_requires_nonempty(); │ │ │ │ +230 return _c.front(); │ │ │ │ +231 } │ │ │ │ +232 │ │ │ │ +233 /** │ │ │ │ +234 * Returns a read/write reference to the data at the last │ │ │ │ +235 * element of the %queue. │ │ │ │ +236 */ │ │ │ │ +237 reference │ │ │ │ +_2_3_8 _b_a_c_k() │ │ │ │ +239 { │ │ │ │ +240 __glibcxx_requires_nonempty(); │ │ │ │ +241 return _c.back(); │ │ │ │ +242 } │ │ │ │ +243 │ │ │ │ +244 /** │ │ │ │ +245 * Returns a read-only (constant) reference to the data at the last │ │ │ │ +246 * element of the %queue. │ │ │ │ +247 */ │ │ │ │ +248 const_reference │ │ │ │ +_2_4_9 _b_a_c_k() const │ │ │ │ 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 │ │ │ │ +251 __glibcxx_requires_nonempty(); │ │ │ │ +252 return _c.back(); │ │ │ │ +253 } │ │ │ │ +254 │ │ │ │ +255 /** │ │ │ │ +256 * @brief Add data to the end of the %queue. │ │ │ │ +257 * @param __x Data to be added. │ │ │ │ +258 * │ │ │ │ +259 * This is a typical %queue operation. The function creates an │ │ │ │ +260 * element at the end of the %queue and assigns the given data │ │ │ │ +261 * to it. The time complexity of the operation depends on the │ │ │ │ +262 * underlying sequence. │ │ │ │ +263 */ │ │ │ │ +264 void │ │ │ │ +_2_6_5 _p_u_s_h(const value_type& __x) │ │ │ │ +266 { _c.push_back(__x); } │ │ │ │ +267 │ │ │ │ +268#if __cplusplus >= 201103L │ │ │ │ +269 void │ │ │ │ +270 _p_u_s_h(_v_a_l_u_e___t_y_p_e&& __x) │ │ │ │ +271 { _c.push_back(_s_t_d_:_:_m_o_v_e(__x)); } │ │ │ │ +272 │ │ │ │ +273#if __cplusplus > 201402L │ │ │ │ +274 template │ │ │ │ +275 decltype(auto) │ │ │ │ +276 emplace(_Args&&... __args) │ │ │ │ +277 { return _c.emplace_back(_s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(__args)...); } │ │ │ │ +278#else │ │ │ │ +279 template │ │ │ │ +280 void │ │ │ │ +281 emplace(_Args&&... __args) │ │ │ │ +282 { _c.emplace_back(_s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(__args)...); } │ │ │ │ +283#endif │ │ │ │ +284#endif │ │ │ │ +285 │ │ │ │ +286 /** │ │ │ │ +287 * @brief Removes first element. │ │ │ │ +288 * │ │ │ │ +289 * This is a typical %queue operation. It shrinks the %queue by one. │ │ │ │ +290 * The time complexity of the operation depends on the underlying │ │ │ │ +291 * sequence. │ │ │ │ +292 * │ │ │ │ +293 * Note that no data is returned, and if the first element's │ │ │ │ +294 * data is needed, it should be retrieved before pop() is │ │ │ │ +295 * called. │ │ │ │ +296 */ │ │ │ │ +297 void │ │ │ │ +_2_9_8 _p_o_p() │ │ │ │ 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; } │ │ │ │ +300 __glibcxx_requires_nonempty(); │ │ │ │ +301 _c.pop_front(); │ │ │ │ +302 } │ │ │ │ +303 │ │ │ │ +304#if __cplusplus >= 201103L │ │ │ │ +305 void │ │ │ │ +306 _s_w_a_p(_q_u_e_u_e& __q) │ │ │ │ +307#if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11 │ │ │ │ +308 noexcept(__is_nothrow_swappable<_Sequence>::value) │ │ │ │ +309#else │ │ │ │ +310 noexcept(__is_nothrow_swappable<_Tp>::value) │ │ │ │ +311#endif │ │ │ │ +312 { │ │ │ │ +313 using _s_t_d_:_:_s_w_a_p; │ │ │ │ +314 _s_w_a_p(_c, __q._c); │ │ │ │ +315 } │ │ │ │ +316#endif // __cplusplus >= 201103L │ │ │ │ 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 }; │ │ │ │ +319#if __cpp_deduction_guides >= 201606 │ │ │ │ +320 template> │ │ │ │ +322 _q_u_e_u_e(_Container) -> _q_u_e_u_e_<_t_y_p_e_n_a_m_e_ ___C_o_n_t_a_i_n_e_r_:_:_v_a_l_u_e___t_y_p_e_,_ ___C_o_n_t_a_i_n_e_r_>; │ │ │ │ +323 │ │ │ │ +324 template, │ │ │ │ +326 typename = _RequireAllocator<_Allocator>> │ │ │ │ +327 _q_u_e_u_e(_Container, _Allocator) │ │ │ │ +328 -> _q_u_e_u_e_<_t_y_p_e_n_a_m_e_ ___C_o_n_t_a_i_n_e_r_:_:_v_a_l_u_e___t_y_p_e_,_ ___C_o_n_t_a_i_n_e_r_>; │ │ │ │ +329#endif │ │ │ │ +330 │ │ │ │ +331 /** │ │ │ │ +332 * @brief Queue equality comparison. │ │ │ │ +333 * @param __x A %queue. │ │ │ │ +334 * @param __y A %queue of the same type as @a __x. │ │ │ │ +335 * @return True iff the size and elements of the queues are equal. │ │ │ │ +336 * │ │ │ │ +337 * This is an equivalence relation. Complexity and semantics depend on the │ │ │ │ +338 * underlying sequence type, but the expected rules are: this relation is │ │ │ │ +339 * linear in the size of the sequences, and queues are considered equivalent │ │ │ │ +340 * if their sequences compare equal. │ │ │ │ +341 */ │ │ │ │ +342 template │ │ │ │ +343 inline bool │ │ │ │ +_3_4_4 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) │ │ │ │ +345 { return __x._c == __y._c; } │ │ │ │ +346 │ │ │ │ +347 /** │ │ │ │ +348 * @brief Queue ordering relation. │ │ │ │ +349 * @param __x A %queue. │ │ │ │ +350 * @param __y A %queue of the same type as @a x. │ │ │ │ +351 * @return True iff @a __x is lexicographically less than @a __y. │ │ │ │ +352 * │ │ │ │ +353 * This is an total ordering relation. Complexity and semantics │ │ │ │ +354 * depend on the underlying sequence type, but the expected rules │ │ │ │ +355 * are: this relation is linear in the size of the sequences, the │ │ │ │ +356 * elements must be comparable with @c <, and │ │ │ │ +357 * std::lexicographical_compare() is usually used to make the │ │ │ │ +358 * determination. │ │ │ │ +359 */ │ │ │ │ +360 template │ │ │ │ +_3_6_1 inline bool │ │ │ │ +362 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) │ │ │ │ +363 { return __x._c < __y._c; } │ │ │ │ +364 │ │ │ │ +365 /// Based on operator== │ │ │ │ +366 template │ │ │ │ +367 inline bool │ │ │ │ +_3_6_8 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) │ │ │ │ +369 { return !(__x == __y); } │ │ │ │ +370 │ │ │ │ +371 /// Based on operator< │ │ │ │ +372 template │ │ │ │ +373 inline bool │ │ │ │ +_3_7_4 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) │ │ │ │ +375 { return __y < __x; } │ │ │ │ +376 │ │ │ │ +377 /// Based on operator< │ │ │ │ +378 template │ │ │ │ +_3_7_9 inline bool │ │ │ │ +380 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 !(__y < __x); } │ │ │ │ +382 │ │ │ │ +383 /// Based on operator< │ │ │ │ +384 template │ │ │ │ +385 inline bool │ │ │ │ +_3_8_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) │ │ │ │ +387 { return !(__x < __y); } │ │ │ │ +388 │ │ │ │ +389#if __cpp_lib_three_way_comparison │ │ │ │ +390 template │ │ │ │ +391 inline compare_three_way_result_t<_Seq> │ │ │ │ +392 operator<=>(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y) │ │ │ │ +393 { return __x._c <=> __y.c; } │ │ │ │ +394#endif │ │ │ │ +395 │ │ │ │ +396#if __cplusplus >= 201103L │ │ │ │ +397 template │ │ │ │ +398 inline │ │ │ │ +399#if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11 │ │ │ │ +400 // Constrained free swap overload, see p0185r1 │ │ │ │ +401 typename _e_n_a_b_l_e___i_f_<_____i_s___s_w_a_p_p_a_b_l_e_<___S_e_q_>_:_:_v_a_l_u_e>::type │ │ │ │ +402#else │ │ │ │ +403 void │ │ │ │ +404#endif │ │ │ │ +405 _s_w_a_p(_q_u_e_u_e_<___T_p_,_ ___S_e_q_>& __x, _q_u_e_u_e_<___T_p_,_ ___S_e_q_>& __y) │ │ │ │ +406 noexcept(noexcept(__x.swap(__y))) │ │ │ │ +407 { __x.swap(__y); } │ │ │ │ 408 │ │ │ │ -409namespace _____d_e_t_a_i_l │ │ │ │ -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 }; │ │ │ │ +409 template │ │ │ │ +410 struct _u_s_e_s___a_l_l_o_c_a_t_o_r<_q_u_e_u_e<_Tp, _Seq>, _Alloc> │ │ │ │ +411 : public _u_s_e_s___a_l_l_o_c_a_t_o_r<_Seq, _Alloc>::type { }; │ │ │ │ +412#endif // __cplusplus >= 201103L │ │ │ │ +413 │ │ │ │ +414 /** │ │ │ │ +415 * @brief A standard container automatically sorting its contents. │ │ │ │ +416 * │ │ │ │ +417 * @ingroup sequences │ │ │ │ +418 * │ │ │ │ +419 * @tparam _Tp Type of element. │ │ │ │ +420 * @tparam _Sequence Type of underlying sequence, defaults to vector<_Tp>. │ │ │ │ +421 * @tparam _Compare Comparison function object type, defaults to │ │ │ │ +422 * less<_Sequence::value_type>. │ │ │ │ +423 * │ │ │ │ +424 * This is not a true container, but an @e adaptor. It holds │ │ │ │ +425 * another container, and provides a wrapper interface to that │ │ │ │ +426 * container. The wrapper is what enforces priority-based sorting │ │ │ │ +427 * and %queue behavior. Very few of the standard container/sequence │ │ │ │ +428 * interface requirements are met (e.g., iterators). │ │ │ │ +429 * │ │ │ │ +430 * The second template parameter defines the type of the underlying │ │ │ │ +431 * sequence/container. It defaults to std::vector, but it can be │ │ │ │ +432 * any type that supports @c front(), @c push_back, @c pop_back, │ │ │ │ +433 * and random-access iterators, such as std::deque or an │ │ │ │ +434 * appropriate user-defined type. │ │ │ │ +435 * │ │ │ │ +436 * The third template parameter supplies the means of making │ │ │ │ +437 * priority comparisons. It defaults to @c less but │ │ │ │ +438 * can be anything defining a strict weak ordering. │ │ │ │ +439 * │ │ │ │ +440 * Members not found in @a normal containers are @c container_type, │ │ │ │ +441 * which is a typedef for the second Sequence parameter, and @c │ │ │ │ +442 * push, @c pop, and @c top, which are standard %queue operations. │ │ │ │ +443 * │ │ │ │ +444 * @note No equality/comparison operators are provided for │ │ │ │ +445 * %priority_queue. │ │ │ │ +446 * │ │ │ │ +447 * @note Sorting of the elements takes place as they are added to, │ │ │ │ +448 * and removed from, the %priority_queue using the │ │ │ │ +449 * %priority_queue's member functions. If you access the elements │ │ │ │ +450 * by other means, and change their data such that the sorting │ │ │ │ +451 * order would be different, the %priority_queue will not re-sort │ │ │ │ +452 * the elements for you. (How could it know to do so?) │ │ │ │ +453 */ │ │ │ │ +454 template, │ │ │ │ +455 typename _Compare = less > │ │ │ │ +_4_5_6 class _p_r_i_o_r_i_t_y___q_u_e_u_e │ │ │ │ +457 { │ │ │ │ +458#ifdef _GLIBCXX_CONCEPT_CHECKS │ │ │ │ +459 // concept requirements │ │ │ │ +460 typedef typename _Sequence::value_type _Sequence_value_type; │ │ │ │ +461# if __cplusplus < 201103L │ │ │ │ +462 __glibcxx_class_requires(_Tp, _SGIAssignableConcept) │ │ │ │ +463# endif │ │ │ │ +464 __glibcxx_class_requires(_Sequence, _SequenceConcept) │ │ │ │ +465 __glibcxx_class_requires(_Sequence, _RandomAccessContainerConcept) │ │ │ │ +466 __glibcxx_class_requires2(_Tp, _Sequence_value_type, _SameTypeConcept) │ │ │ │ +467 __glibcxx_class_requires4(_Compare, bool, _Tp, _Tp, │ │ │ │ +468 _BinaryFunctionConcept) │ │ │ │ +469#endif │ │ │ │ +470 │ │ │ │ +471#if __cplusplus >= 201103L │ │ │ │ +472 template │ │ │ │ +473 using _Uses = typename │ │ │ │ +474 _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>_:_:_t_y_p_e; │ │ │ │ +475 │ │ │ │ +476#if __cplusplus >= 201703L │ │ │ │ +477 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ +478 // 2566. Requirements on the first template parameter of container │ │ │ │ +479 // adaptors │ │ │ │ +480 static_assert(is_same<_Tp, typename _Sequence::value_type>::value, │ │ │ │ +481 "value_type must be the same as the underlying container"); │ │ │ │ +482#endif // C++17 │ │ │ │ +483#endif // C++11 │ │ │ │ +484 │ │ │ │ +485 public: │ │ │ │ +486 typedef typename _Sequence::value_type value_type; │ │ │ │ +487 typedef typename _Sequence::reference reference; │ │ │ │ +488 typedef typename _Sequence::const_reference const_reference; │ │ │ │ +489 typedef typename _Sequence::size_type size_type; │ │ │ │ +490 typedef _Sequence container_type; │ │ │ │ +491 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ +492 // DR 2684. priority_queue lacking comparator typedef │ │ │ │ +493 typedef _Compare value_compare; │ │ │ │ +494 │ │ │ │ +495 protected: │ │ │ │ +496 // See queue::c for notes on these names. │ │ │ │ +497 _Sequence c; │ │ │ │ +498 _Compare comp; │ │ │ │ +499 │ │ │ │ +500 public: │ │ │ │ +501 /** │ │ │ │ +502 * @brief Default constructor creates no elements. │ │ │ │ +503 */ │ │ │ │ +504#if __cplusplus < 201103L │ │ │ │ +505 explicit │ │ │ │ +506 _p_r_i_o_r_i_t_y___q_u_e_u_e(const _Compare& __x = _Compare(), │ │ │ │ +507 const _Sequence& __s = _Sequence()) │ │ │ │ +508 : c(__s), comp(__x) │ │ │ │ +509 { std::make_heap(c.begin(), c.end(), comp); } │ │ │ │ +510#else │ │ │ │ +511 template, │ │ │ │ +513 _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>_:_:_t_y_p_e> │ │ │ │ +_5_1_4 _p_r_i_o_r_i_t_y___q_u_e_u_e() │ │ │ │ +515 : c(), comp() { } │ │ │ │ +516 │ │ │ │ +517 explicit │ │ │ │ +518 _p_r_i_o_r_i_t_y___q_u_e_u_e(const _Compare& __x, const _Sequence& __s) │ │ │ │ +519 : c(__s), comp(__x) │ │ │ │ +520 { std::make_heap(c.begin(), c.end(), comp); } │ │ │ │ +521 │ │ │ │ +522 explicit │ │ │ │ +523 _p_r_i_o_r_i_t_y___q_u_e_u_e(const _Compare& __x, _Sequence&& __s = _Sequence()) │ │ │ │ +524 : c(_s_t_d::_m_o_v_e(__s)), comp(__x) │ │ │ │ +525 { std::make_heap(c.begin(), c.end(), comp); } │ │ │ │ +526 │ │ │ │ +527 template> │ │ │ │ +528 explicit │ │ │ │ +529 _p_r_i_o_r_i_t_y___q_u_e_u_e(const _Alloc& __a) │ │ │ │ +530 : c(__a), comp() { } │ │ │ │ 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; │ │ │ │ +532 template> │ │ │ │ +533 _p_r_i_o_r_i_t_y___q_u_e_u_e(const _Compare& __x, const _Alloc& __a) │ │ │ │ +534 : c(__a), comp(__x) { } │ │ │ │ +535 │ │ │ │ +536 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ +537 // 2537. Constructors [...] taking allocators should call make_heap │ │ │ │ +538 template> │ │ │ │ +539 _p_r_i_o_r_i_t_y___q_u_e_u_e(const _Compare& __x, const _Sequence& __c, │ │ │ │ +540 const _Alloc& __a) │ │ │ │ +541 : c(__c, __a), comp(__x) │ │ │ │ +542 { std::make_heap(c.begin(), c.end(), comp); } │ │ │ │ 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 │ │ │ │ +544 template> │ │ │ │ +545 _p_r_i_o_r_i_t_y___q_u_e_u_e(const _Compare& __x, _Sequence&& __c, const _Alloc& __a) │ │ │ │ +546 : c(std::_m_o_v_e(__c), __a), comp(__x) │ │ │ │ +547 { std::make_heap(c.begin(), c.end(), comp); } │ │ │ │ +548 │ │ │ │ +549 template> │ │ │ │ +550 _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) │ │ │ │ +551 : c(__q.c, __a), comp(__q.comp) { } │ │ │ │ +552 │ │ │ │ +553 template> │ │ │ │ +554 _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) │ │ │ │ +555 : c(std::_m_o_v_e(__q.c), __a), comp(std::_m_o_v_e(__q.comp)) { } │ │ │ │ +556#endif │ │ │ │ 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> │ │ │ │ +558 /** │ │ │ │ +559 * @brief Builds a %queue from a range. │ │ │ │ +560 * @param __first An input iterator. │ │ │ │ +561 * @param __last An input iterator. │ │ │ │ +562 * @param __x A comparison functor describing a strict weak ordering. │ │ │ │ +563 * @param __s An initial sequence with which to start. │ │ │ │ +564 * │ │ │ │ +565 * Begins by copying @a __s, inserting a copy of the elements │ │ │ │ +566 * from @a [first,last) into the copy of @a __s, then ordering │ │ │ │ +567 * the copy according to @a __x. │ │ │ │ +568 * │ │ │ │ +569 * For more information on function objects, see the │ │ │ │ +570 * documentation on @link functors functor base │ │ │ │ +571 * classes@endlink. │ │ │ │ +572 */ │ │ │ │ +573#if __cplusplus < 201103L │ │ │ │ +574 template │ │ │ │ +575 _p_r_i_o_r_i_t_y___q_u_e_u_e(_InputIterator __first, _InputIterator __last, │ │ │ │ +576 const _Compare& __x = _Compare(), │ │ │ │ +577 const _Sequence& __s = _Sequence()) │ │ │ │ +578 : c(__s), comp(__x) │ │ │ │ +579 { │ │ │ │ +580 __glibcxx_requires_valid_range(__first, __last); │ │ │ │ +581 c.insert(c.end(), __first, __last); │ │ │ │ +582 std::make_heap(c.begin(), c.end(), comp); │ │ │ │ +583 } │ │ │ │ +584#else │ │ │ │ +585 template │ │ │ │ +_5_8_6 _p_r_i_o_r_i_t_y___q_u_e_u_e(_InputIterator __first, _InputIterator __last, │ │ │ │ +587 const _Compare& __x, │ │ │ │ +588 const _Sequence& __s) │ │ │ │ +589 : c(__s), comp(__x) │ │ │ │ +590 { │ │ │ │ +591 __glibcxx_requires_valid_range(__first, __last); │ │ │ │ +592 c.insert(c.end(), __first, __last); │ │ │ │ +593 std::make_heap(c.begin(), c.end(), comp); │ │ │ │ +594 } │ │ │ │ +595 │ │ │ │ +596 template │ │ │ │ +597 _p_r_i_o_r_i_t_y___q_u_e_u_e(_InputIterator __first, _InputIterator __last, │ │ │ │ +598 const _Compare& __x = _Compare(), │ │ │ │ +599 _Sequence&& __s = _Sequence()) │ │ │ │ +600 : c(_s_t_d::_m_o_v_e(__s)), comp(__x) │ │ │ │ 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 }; │ │ │ │ +602 __glibcxx_requires_valid_range(__first, __last); │ │ │ │ +603 c.insert(c.end(), __first, __last); │ │ │ │ +604 std::make_heap(c.begin(), c.end(), comp); │ │ │ │ +605 } │ │ │ │ +606#endif │ │ │ │ 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; │ │ │ │ +608 /** │ │ │ │ +609 * Returns true if the %queue is empty. │ │ │ │ +610 */ │ │ │ │ +611 _GLIBCXX_NODISCARD bool │ │ │ │ +_6_1_2 _e_m_p_t_y() const │ │ │ │ +613 { return c.empty(); } │ │ │ │ 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 }; │ │ │ │ +615 /** Returns the number of elements in the %queue. */ │ │ │ │ +616 _s_i_z_e___t_y_p_e │ │ │ │ +_6_1_7 _s_i_z_e() const │ │ │ │ +618 { return c.size(); } │ │ │ │ +619 │ │ │ │ +620 /** │ │ │ │ +621 * Returns a read-only (constant) reference to the data at the first │ │ │ │ +622 * element of the %queue. │ │ │ │ +623 */ │ │ │ │ +624 const_reference │ │ │ │ +_6_2_5 _t_o_p() const │ │ │ │ +626 { │ │ │ │ +627 __glibcxx_requires_nonempty(); │ │ │ │ +628 return c.front(); │ │ │ │ +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 }; │ │ │ │ +631 /** │ │ │ │ +632 * @brief Add data to the %queue. │ │ │ │ +633 * @param __x Data to be added. │ │ │ │ +634 * │ │ │ │ +635 * This is a typical %queue operation. │ │ │ │ +636 * The time complexity of the operation depends on the underlying │ │ │ │ +637 * sequence. │ │ │ │ +638 */ │ │ │ │ +639 void │ │ │ │ +_6_4_0 _p_u_s_h(const value_type& __x) │ │ │ │ +641 { │ │ │ │ +642 c.push_back(__x); │ │ │ │ +643 std::push_heap(c.begin(), c.end(), comp); │ │ │ │ +644 } │ │ │ │ +645 │ │ │ │ +646#if __cplusplus >= 201103L │ │ │ │ +647 void │ │ │ │ +648 _p_u_s_h(_v_a_l_u_e___t_y_p_e&& __x) │ │ │ │ +649 { │ │ │ │ +650 c.push_back(_s_t_d_:_:_m_o_v_e(__x)); │ │ │ │ +651 std::push_heap(c.begin(), c.end(), comp); │ │ │ │ +652 } │ │ │ │ 653 │ │ │ │ -654 template │ │ │ │ -655 struct _BinClos<_Oper, _Constant, _Expr, typename _Dom::value_type, _Dom> │ │ │ │ -656 : _BinBase1<_Oper, _Dom> │ │ │ │ +654 template │ │ │ │ +655 void │ │ │ │ +656 emplace(_Args&&... __args) │ │ │ │ 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; │ │ │ │ +658 c.emplace_back(_s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(__args)...); │ │ │ │ +659 std::push_heap(c.begin(), c.end(), comp); │ │ │ │ +660 } │ │ │ │ +661#endif │ │ │ │ +662 │ │ │ │ +663 /** │ │ │ │ +664 * @brief Removes first element. │ │ │ │ +665 * │ │ │ │ +666 * This is a typical %queue operation. It shrinks the %queue │ │ │ │ +667 * by one. The time complexity of the operation depends on the │ │ │ │ +668 * underlying sequence. │ │ │ │ +669 * │ │ │ │ +670 * Note that no data is returned, and if the first element's │ │ │ │ +671 * data is needed, it should be retrieved before pop() is │ │ │ │ +672 * called. │ │ │ │ +673 */ │ │ │ │ +674 void │ │ │ │ +_6_7_5 _p_o_p() │ │ │ │ +676 { │ │ │ │ +677 __glibcxx_requires_nonempty(); │ │ │ │ +678 std::pop_heap(c.begin(), c.end(), comp); │ │ │ │ +679 c.pop_back(); │ │ │ │ +680 } │ │ │ │ 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 ()]; } │ │ │ │ +682#if __cplusplus >= 201103L │ │ │ │ +683 void │ │ │ │ +684 _s_w_a_p(_p_r_i_o_r_i_t_y___q_u_e_u_e& __pq) │ │ │ │ +685 noexcept(__and_< │ │ │ │ +686#if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11 │ │ │ │ +687 __is_nothrow_swappable<_Sequence>, │ │ │ │ +688#else │ │ │ │ +689 __is_nothrow_swappable<_Tp>, │ │ │ │ +690#endif │ │ │ │ +691 __is_nothrow_swappable<_Compare> │ │ │ │ +692 >::value) │ │ │ │ +693 { │ │ │ │ +694 using _s_t_d_:_:_s_w_a_p; │ │ │ │ +695 _s_w_a_p(c, __pq.c); │ │ │ │ +696 _s_w_a_p(comp, __pq.comp); │ │ │ │ +697 } │ │ │ │ +698#endif // __cplusplus >= 201103L │ │ │ │ +699 }; │ │ │ │ 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 }; │ │ │ │ +701#if __cpp_deduction_guides >= 201606 │ │ │ │ +702 template, │ │ │ │ +704 typename = _RequireNotAllocator<_Container>> │ │ │ │ +705 _p_r_i_o_r_i_t_y___q_u_e_u_e(_Compare, _Container) │ │ │ │ +706 -> _p_r_i_o_r_i_t_y___q_u_e_u_e_<_t_y_p_e_n_a_m_e_ ___C_o_n_t_a_i_n_e_r_:_:_v_a_l_u_e___t_y_p_e_,_ ___C_o_n_t_a_i_n_e_r_,_ ___C_o_m_p_a_r_e_>; │ │ │ │ +707 │ │ │ │ +708 template_:_:_v_a_l_u_e___t_y_p_e, │ │ │ │ +710 typename _Compare = _l_e_s_s_<___V_a_l_T_>, │ │ │ │ +711 typename _Container = _v_e_c_t_o_r_<___V_a_l_T_>, │ │ │ │ +712 typename = _RequireInputIter<_InputIterator>, │ │ │ │ +713 typename = _RequireNotAllocator<_Compare>, │ │ │ │ +714 typename = _RequireNotAllocator<_Container>> │ │ │ │ +715 _p_r_i_o_r_i_t_y___q_u_e_u_e(_InputIterator, _InputIterator, _Compare = _Compare(), │ │ │ │ +716 _Container = _Container()) │ │ │ │ +717 -> _p_r_i_o_r_i_t_y___q_u_e_u_e_<___V_a_l_T_,_ ___C_o_n_t_a_i_n_e_r_,_ ___C_o_m_p_a_r_e_>; │ │ │ │ +718 │ │ │ │ +719 template, │ │ │ │ +721 typename = _RequireNotAllocator<_Container>, │ │ │ │ +722 typename = _RequireAllocator<_Allocator>> │ │ │ │ +723 _p_r_i_o_r_i_t_y___q_u_e_u_e(_Compare, _Container, _Allocator) │ │ │ │ +724 -> _p_r_i_o_r_i_t_y___q_u_e_u_e_<_t_y_p_e_n_a_m_e_ ___C_o_n_t_a_i_n_e_r_:_:_v_a_l_u_e___t_y_p_e_,_ ___C_o_n_t_a_i_n_e_r_,_ ___C_o_m_p_a_r_e_>; │ │ │ │ +725#endif │ │ │ │ +726 │ │ │ │ +727 // No equality/comparison operators are provided for priority_queue. │ │ │ │ +728 │ │ │ │ +729#if __cplusplus >= 201103L │ │ │ │ +730 template │ │ │ │ +731 inline │ │ │ │ +732#if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11 │ │ │ │ +733 // Constrained free swap overload, see p0185r1 │ │ │ │ +734 typename _e_n_a_b_l_e___i_f_<_____a_n_d___<_____i_s___s_w_a_p_p_a_b_l_e_<___S_e_q_u_e_n_c_e_>, │ │ │ │ +735 __is_swappable<_Compare>>::value>::type │ │ │ │ +736#else │ │ │ │ +737 void │ │ │ │ +738#endif │ │ │ │ +739 _s_w_a_p(_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_>& __x, │ │ │ │ +740 _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_>& __y) │ │ │ │ +741 noexcept(noexcept(__x.swap(__y))) │ │ │ │ +742 { __x.swap(__y); } │ │ │ │ 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 │ │ │ │ +744 template │ │ │ │ +746 struct _u_s_e_s___a_l_l_o_c_a_t_o_r<_p_r_i_o_r_i_t_y___q_u_e_u_e<_Tp, _Sequence, _Compare>, _Alloc> │ │ │ │ +747 : public _u_s_e_s___a_l_l_o_c_a_t_o_r<_Sequence, _Alloc>::type { }; │ │ │ │ +748#endif // __cplusplus >= 201103L │ │ │ │ +749 │ │ │ │ +750_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ +751} // namespace │ │ │ │ +752 │ │ │ │ +753#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_8 │ │ │ │ +_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 │ │ │ │ ISO C++ entities toplevel namespace is std. │ │ │ │ -_s_t_d_:_:_a_t_a_n │ │ │ │ -std::complex< _Tp > atan(const std::complex< _Tp > &) │ │ │ │ -atan(__z) [8.1.4]. │ │ │ │ -DDeeffiinniittiioonn _c_o_m_p_l_e_x_:_1_7_1_8 │ │ │ │ -_s_t_d_:_:_a_c_o_s │ │ │ │ -std::complex< _Tp > acos(const std::complex< _Tp > &) │ │ │ │ -acos(__z) [8.1.2]. │ │ │ │ -DDeeffiinniittiioonn _c_o_m_p_l_e_x_:_1_6_3_8 │ │ │ │ -_s_t_d_:_:_a_s_i_n │ │ │ │ -std::complex< _Tp > asin(const std::complex< _Tp > &) │ │ │ │ -asin(__z) [8.1.3]. │ │ │ │ -DDeeffiinniittiioonn _c_o_m_p_l_e_x_:_1_6_7_4 │ │ │ │ -_s_t_d_:_:_____d_e_t_a_i_l │ │ │ │ -Implementation details not part of the namespace std interface. │ │ │ │ +_s_t_d_:_:_i_s___d_e_f_a_u_l_t___c_o_n_s_t_r_u_c_t_i_b_l_e │ │ │ │ +is_default_constructible │ │ │ │ +DDeeffiinniittiioonn _t_y_p_e___t_r_a_i_t_s_:_9_6_3 │ │ │ │ +_s_t_d_:_:_t_y_p_e │ │ │ │ +_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_1_9_2 │ │ │ │ +_s_t_d_:_:_s_i_z_e___t_y_p_e │ │ │ │ +_s_t_d_:_:_v_a_l_u_e___t_y_p_e │ │ │ │ +_s_t_d_:_:_u_s_e_s___a_l_l_o_c_a_t_o_r │ │ │ │ +Declare uses_allocator so it can be specialized in etc. │ │ │ │ +DDeeffiinniittiioonn _m_e_m_o_r_y_f_w_d_._h_:_7_2 │ │ │ │ +_s_t_d_:_:_l_e_s_s │ │ │ │ +One of the comparison functors. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___f_u_n_c_t_i_o_n_._h_:_3_9_6 │ │ │ │ +_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_6_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_0_8 │ │ │ │ +_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_1_6 │ │ │ │ +_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_4_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_:_2_9_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_2_7 │ │ │ │ +_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_0_3 │ │ │ │ +_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_3_8 │ │ │ │ +_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_5_7 │ │ │ │ +_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_:_6_1_7 │ │ │ │ +_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_:_6_1_2 │ │ │ │ +_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, const _Sequence &__s) │ │ │ │ +Builds a queue from a range. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___q_u_e_u_e_._h_:_5_8_6 │ │ │ │ +_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_:_6_7_5 │ │ │ │ +_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_:_6_2_5 │ │ │ │ +_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_:_6_4_0 │ │ │ │ +_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_1_4 │ │ │ │ +_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_:_3_9_0 │ │ │ │ * bbiittss │ │ │ │ - * _v_a_l_a_r_r_a_y___b_e_f_o_r_e_._h │ │ │ │ + * _s_t_l___q_u_e_u_e_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.15.0 │ │ ├── ./usr/share/doc/gcc-11-base/libstdc++/user/a00353.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: valarray_array.tcc File Reference │ │ │ +libstdc++: unordered_map.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -48,71 +48,77 @@ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
valarray_array.tcc File Reference
│ │ │ +
unordered_map.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │

Go to the source code of this file.

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

│ │ │ +Classes

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

│ │ │ Namespaces

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

│ │ │ Macros

#define _VALARRAY_ARRAY_TCC
#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
template<bool _Cache>
using std::__umap_traits
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
template<bool _Cache>
using std::__ummap_traits
│ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ 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)
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>
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)))
│ │ │

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 <unordered_map>.

│ │ │ │ │ │ -

Definition in file valarray_array.tcc.

│ │ │ +

Definition in file unordered_map.h.

│ │ │

Macro Definition Documentation

│ │ │ - │ │ │ -

◆ _VALARRAY_ARRAY_TCC

│ │ │ + │ │ │ +

◆ __cpp_lib_unordered_map_try_emplace

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │ │ │ │ - │ │ │ + │ │ │ │ │ │
#define _VALARRAY_ARRAY_TCC#define __cpp_lib_unordered_map_try_emplace
│ │ │
│ │ │ │ │ │ -

Definition at line 33 of file valarray_array.tcc.

│ │ │ +

Definition at line 446 of file unordered_map.h.

│ │ │ │ │ │
│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,52 +1,59 @@ │ │ │ │ libstdc++ │ │ │ │ -valarray_array.tcc File Reference │ │ │ │ +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 │ │ │ │ +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  ___V_A_L_A_R_R_A_Y___A_R_R_A_Y___T_C_C │ │ │ │ +#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, typename │ │ │ │ +_Pred = std::equal_to<_Key>, typename _Alloc = std::allocator >, typename _Tr = __umap_traits<__cache_default<_Key, _Hash>:: │ │ │ │ +value>> │ │ │ │ +using  _s_t_d_:_:_____u_m_a_p___h_a_s_h_t_a_b_l_e │ │ │ │ +template │ │ │ │ +using  _s_t_d_:_:_____u_m_a_p___t_r_a_i_t_s │ │ │ │ +template, typename │ │ │ │ +_Pred = std::equal_to<_Key>, typename _Alloc = std::allocator >, typename _Tr = __ummap_traits<__cache_default<_Key, _Hash>:: │ │ │ │ +value>> │ │ │ │ +using  _s_t_d_:_:_____u_m_m_a_p___h_a_s_h_t_a_b_l_e │ │ │ │ +template │ │ │ │ +using  _s_t_d_:_:_____u_m_m_a_p___t_r_a_i_t_s │ │ │ │ FFuunnccttiioonnss │ │ │ │ -template │ │ │ │ -void  _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 │ │ │ │ -void  _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 │ │ │ │ -void  _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 │ │ │ │ -void  _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 │ │ │ │ -void  _s_t_d_:_:_____v_a_l_a_r_r_a_y___c_o_p_y (const _Expr< _Dom, _Tp > &__e, size_t __n, _Array< │ │ │ │ - _Tp > __a) │ │ │ │ -template │ │ │ │ -void  _s_t_d_:_:_____v_a_l_a_r_r_a_y___c_o_p_y (const _Expr< _Dom, _Tp > &__e, size_t __n, _Array< │ │ │ │ - _Tp > __a, _Array< bool > __m) │ │ │ │ -template │ │ │ │ -void  _s_t_d_:_:_____v_a_l_a_r_r_a_y___c_o_p_y (const _Expr< _Dom, _Tp > &__e, size_t __n, _Array< │ │ │ │ - _Tp > __a, _Array< size_t > __i) │ │ │ │ -template │ │ │ │ -void  _s_t_d_:_:_____v_a_l_a_r_r_a_y___c_o_p_y (const _Expr< _Dom, _Tp > &__e, size_t __n, _Array< │ │ │ │ - _Tp > __a, size_t __s) │ │ │ │ -template │ │ │ │ -void  _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 │ │ │ │ -void  _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< _Dom, _Tp > &__e, size_t │ │ │ │ - __n, _Array< _Tp > __a) │ │ │ │ -template │ │ │ │ -void  _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) │ │ │ │ +template │ │ │ │ +bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_!_= (const unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc > │ │ │ │ + &__x, const unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc > &__y) │ │ │ │ +template │ │ │ │ +bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_!_= (const unordered_multimap< _Key, _Tp, _Hash, _Pred, │ │ │ │ + _Alloc > &__x, const unordered_multimap< _Key, _Tp, _Hash, _Pred, _Alloc │ │ │ │ + > &__y) │ │ │ │ +template │ │ │ │ +bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_=_= (const unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc > │ │ │ │ + &__x, const unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc > &__y) │ │ │ │ +template │ │ │ │ +bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_=_= (const unordered_multimap< _Key, _Tp, _Hash, _Pred, │ │ │ │ + _Alloc > &__x, const unordered_multimap< _Key, _Tp, _Hash, _Pred, _Alloc │ │ │ │ + > &__y) │ │ │ │ +template │ │ │ │ +void  _s_t_d_:_:_s_w_a_p (unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc > &__x, │ │ │ │ + unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc > &__y) noexcept(noexcept │ │ │ │ + (__x.swap(__y))) │ │ │ │ +template │ │ │ │ +void  _s_t_d_:_:_s_w_a_p (unordered_multimap< _Key, _Tp, _Hash, _Pred, _Alloc > &__x, │ │ │ │ + unordered_multimap< _Key, _Tp, _Hash, _Pred, _Alloc > &__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_._t_c_c. │ │ │ │ +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 ********** │ │ │ │ -********** _?◆_? __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. │ │ │ │ +********** _?◆_? ____ccpppp__lliibb__uunnoorrddeerreedd__mmaapp__ttrryy__eemmppllaaccee ********** │ │ │ │ +#define __cpp_lib_unordered_map_try_emplace │ │ │ │ +Definition at line _4_4_6 of file _u_n_o_r_d_e_r_e_d___m_a_p_._h. │ │ │ │ * bbiittss │ │ │ │ - * _v_a_l_a_r_r_a_y___a_r_r_a_y_._t_c_c │ │ │ │ + * _u_n_o_r_d_e_r_e_d___m_a_p_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.15.0 │ │ ├── ./usr/share/doc/gcc-11-base/libstdc++/user/a00353_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: valarray_array.tcc Source File │ │ │ +libstdc++: unordered_map.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -48,20 +48,20 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
valarray_array.tcc
│ │ │ +
unordered_map.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// unordered_map implementation -*- C++ -*-
│ │ │
2
│ │ │ -
3// Copyright (C) 1997-2021 Free Software Foundation, Inc.
│ │ │ +
3// Copyright (C) 2010-2021 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
│ │ │ @@ -75,240 +75,2626 @@ │ │ │
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
│ │ │ +
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{valarray}
│ │ │ +
27 * Do not attempt to use it directly. @headername{unordered_map}
│ │ │
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 }
│ │ │ +
30#ifndef _UNORDERED_MAP_H
│ │ │ +
31#define _UNORDERED_MAP_H
│ │ │ +
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>,
│ │ │ + │ │ │ + │ │ │ +
48 using __umap_hashtable = _Hashtable<_Key, std::pair<const _Key, _Tp>,
│ │ │ +
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>,
│ │ │ + │ │ │ + │ │ │ +
65 using __ummap_hashtable = _Hashtable<_Key, std::pair<const _Key, _Tp>,
│ │ │ +
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 *
│ │ │ +
82 * @tparam _Key Type of key objects.
│ │ │ +
83 * @tparam _Tp Type of mapped objects.
│ │ │ +
84 * @tparam _Hash Hashing function object type, defaults to hash<_Value>.
│ │ │ +
85 * @tparam _Pred Predicate function object type, defaults
│ │ │ +
86 * to equal_to<_Value>.
│ │ │ +
87 * @tparam _Alloc Allocator type, defaults to
│ │ │ +
88 * std::allocator<std::pair<const _Key, _Tp>>.
│ │ │ +
89 *
│ │ │ +
90 * Meets the requirements of a <a href="tables.html#65">container</a>, and
│ │ │ +
91 * <a href="tables.html#xx">unordered associative container</a>
│ │ │ +
92 *
│ │ │ +
93 * The resulting value type of the container is std::pair<const _Key, _Tp>.
│ │ │ +
94 *
│ │ │ +
95 * Base is _Hashtable, dispatched at compile time via template
│ │ │ +
96 * alias __umap_hashtable.
│ │ │ +
97 */
│ │ │ +
98 template<typename _Key, typename _Tp,
│ │ │ +
99 typename _Hash = hash<_Key>,
│ │ │ +
100 typename _Pred = equal_to<_Key>,
│ │ │ +
101 typename _Alloc = allocator<std::pair<const _Key, _Tp>>>
│ │ │ +
│ │ │ + │ │ │ +
103 {
│ │ │ +
104 typedef __umap_hashtable<_Key, _Tp, _Hash, _Pred, _Alloc> _Hashtable;
│ │ │ +
105 _Hashtable _M_h;
│ │ │
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 }
│ │ │ +
107 public:
│ │ │ +
108 // typedefs:
│ │ │ +
109 ///@{
│ │ │ +
110 /// Public typedefs.
│ │ │ +
111 typedef typename _Hashtable::key_type key_type;
│ │ │ +
112 typedef typename _Hashtable::value_type value_type;
│ │ │ +
113 typedef typename _Hashtable::mapped_type mapped_type;
│ │ │ +
114 typedef typename _Hashtable::hasher hasher;
│ │ │ +
115 typedef typename _Hashtable::key_equal key_equal;
│ │ │ +
116 typedef typename _Hashtable::allocator_type allocator_type;
│ │ │ +
117 ///@}
│ │ │ +
118
│ │ │ +
119 ///@{
│ │ │ +
120 /// Iterator-related typedefs.
│ │ │ +
121 typedef typename _Hashtable::pointer pointer;
│ │ │ +
122 typedef typename _Hashtable::const_pointer const_pointer;
│ │ │ +
123 typedef typename _Hashtable::reference reference;
│ │ │ +
124 typedef typename _Hashtable::const_reference const_reference;
│ │ │ +
125 typedef typename _Hashtable::iterator iterator;
│ │ │ +
126 typedef typename _Hashtable::const_iterator const_iterator;
│ │ │ +
127 typedef typename _Hashtable::local_iterator local_iterator;
│ │ │ +
128 typedef typename _Hashtable::const_local_iterator const_local_iterator;
│ │ │ +
129 typedef typename _Hashtable::size_type size_type;
│ │ │ +
130 typedef typename _Hashtable::difference_type difference_type;
│ │ │ +
131 ///@}
│ │ │ +
132
│ │ │ +
133#if __cplusplus > 201402L
│ │ │ +
134 using node_type = typename _Hashtable::node_type;
│ │ │ +
135 using insert_return_type = typename _Hashtable::insert_return_type;
│ │ │ +
136#endif
│ │ │
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
│ │ │ +
138 //construct/destroy/copy
│ │ │ +
139
│ │ │ +
140 /// Default constructor.
│ │ │ +
141 unordered_map() = default;
│ │ │ +
142
│ │ │ +
143 /**
│ │ │ +
144 * @brief Default constructor creates no elements.
│ │ │ +
145 * @param __n Minimal initial number of buckets.
│ │ │ +
146 * @param __hf A hash functor.
│ │ │ +
147 * @param __eql A key equality functor.
│ │ │ +
148 * @param __a An allocator object.
│ │ │ +
149 */
│ │ │ +
150 explicit
│ │ │ +
│ │ │ + │ │ │ +
152 const hasher& __hf = hasher(),
│ │ │ +
153 const key_equal& __eql = key_equal(),
│ │ │ +
154 const allocator_type& __a = allocator_type())
│ │ │ +
155 : _M_h(__n, __hf, __eql, __a)
│ │ │ +
156 { }
│ │ │ +
│ │ │ +
157
│ │ │ +
158 /**
│ │ │ +
159 * @brief Builds an %unordered_map from a range.
│ │ │ +
160 * @param __first An input iterator.
│ │ │ +
161 * @param __last An input iterator.
│ │ │ +
162 * @param __n Minimal initial number of buckets.
│ │ │ +
163 * @param __hf A hash functor.
│ │ │ +
164 * @param __eql A key equality functor.
│ │ │ +
165 * @param __a An allocator object.
│ │ │ +
166 *
│ │ │ +
167 * Create an %unordered_map consisting of copies of the elements from
│ │ │ +
168 * [__first,__last). This is linear in N (where N is
│ │ │ +
169 * distance(__first,__last)).
│ │ │ +
170 */
│ │ │ +
171 template<typename _InputIterator>
│ │ │ +
│ │ │ +
172 unordered_map(_InputIterator __first, _InputIterator __last,
│ │ │ +
173 size_type __n = 0,
│ │ │ +
174 const hasher& __hf = hasher(),
│ │ │ +
175 const key_equal& __eql = key_equal(),
│ │ │ +
176 const allocator_type& __a = allocator_type())
│ │ │ +
177 : _M_h(__first, __last, __n, __hf, __eql, __a)
│ │ │ +
178 { }
│ │ │ +
│ │ │ +
179
│ │ │ +
180 /// Copy constructor.
│ │ │ +
181 unordered_map(const unordered_map&) = default;
│ │ │ +
182
│ │ │ +
183 /// Move constructor.
│ │ │ + │ │ │ +
185
│ │ │ +
186 /**
│ │ │ +
187 * @brief Creates an %unordered_map with no elements.
│ │ │ +
188 * @param __a An allocator object.
│ │ │ +
189 */
│ │ │ +
190 explicit
│ │ │ +
│ │ │ + │ │ │ +
192 : _M_h(__a)
│ │ │ +
193 { }
│ │ │ +
│ │ │ +
194
│ │ │ +
195 /*
│ │ │ +
196 * @brief Copy constructor with allocator argument.
│ │ │ +
197 * @param __uset Input %unordered_map to copy.
│ │ │ +
198 * @param __a An allocator object.
│ │ │ +
199 */
│ │ │ +
200 unordered_map(const unordered_map& __umap,
│ │ │ +
201 const allocator_type& __a)
│ │ │ +
202 : _M_h(__umap._M_h, __a)
│ │ │ +
203 { }
│ │ │ +
204
│ │ │ +
205 /*
│ │ │ +
206 * @brief Move constructor with allocator argument.
│ │ │ +
207 * @param __uset Input %unordered_map to move.
│ │ │ +
208 * @param __a An allocator object.
│ │ │ +
209 */
│ │ │ +
210 unordered_map(unordered_map&& __umap,
│ │ │ +
211 const allocator_type& __a)
│ │ │ +
212 noexcept( noexcept(_Hashtable(std::move(__umap._M_h), __a)) )
│ │ │ +
213 : _M_h(std::move(__umap._M_h), __a)
│ │ │ +
214 { }
│ │ │ +
215
│ │ │ +
216 /**
│ │ │ +
217 * @brief Builds an %unordered_map from an initializer_list.
│ │ │ +
218 * @param __l An initializer_list.
│ │ │ +
219 * @param __n Minimal initial number of buckets.
│ │ │ +
220 * @param __hf A hash functor.
│ │ │ +
221 * @param __eql A key equality functor.
│ │ │ +
222 * @param __a An allocator object.
│ │ │ +
223 *
│ │ │ +
224 * Create an %unordered_map consisting of copies of the elements in the
│ │ │ +
225 * list. This is linear in N (where N is @a __l.size()).
│ │ │ +
226 */
│ │ │ +
│ │ │ + │ │ │ +
228 size_type __n = 0,
│ │ │ +
229 const hasher& __hf = hasher(),
│ │ │ +
230 const key_equal& __eql = key_equal(),
│ │ │ +
231 const allocator_type& __a = allocator_type())
│ │ │ +
232 : _M_h(__l, __n, __hf, __eql, __a)
│ │ │ +
233 { }
│ │ │ +
│ │ │ +
234
│ │ │ +
235 unordered_map(size_type __n, const allocator_type& __a)
│ │ │ +
236 : unordered_map(__n, hasher(), key_equal(), __a)
│ │ │ +
237 { }
│ │ │ +
238
│ │ │ +
239 unordered_map(size_type __n, const hasher& __hf,
│ │ │ +
240 const allocator_type& __a)
│ │ │ +
241 : unordered_map(__n, __hf, key_equal(), __a)
│ │ │ +
242 { }
│ │ │
243
│ │ │ -
244#endif /* _VALARRAY_ARRAY_TCC */
│ │ │ +
244 template<typename _InputIterator>
│ │ │ +
245 unordered_map(_InputIterator __first, _InputIterator __last,
│ │ │ +
246 size_type __n,
│ │ │ +
247 const allocator_type& __a)
│ │ │ +
248 : unordered_map(__first, __last, __n, hasher(), key_equal(), __a)
│ │ │ +
249 { }
│ │ │ +
250
│ │ │ +
251 template<typename _InputIterator>
│ │ │ +
252 unordered_map(_InputIterator __first, _InputIterator __last,
│ │ │ +
253 size_type __n, const hasher& __hf,
│ │ │ +
254 const allocator_type& __a)
│ │ │ +
255 : unordered_map(__first, __last, __n, __hf, key_equal(), __a)
│ │ │ +
256 { }
│ │ │ +
257
│ │ │ +
258 unordered_map(initializer_list<value_type> __l,
│ │ │ +
259 size_type __n,
│ │ │ +
260 const allocator_type& __a)
│ │ │ +
261 : unordered_map(__l, __n, hasher(), key_equal(), __a)
│ │ │ +
262 { }
│ │ │ +
263
│ │ │ +
264 unordered_map(initializer_list<value_type> __l,
│ │ │ +
265 size_type __n, const hasher& __hf,
│ │ │ +
266 const allocator_type& __a)
│ │ │ +
267 : unordered_map(__l, __n, __hf, key_equal(), __a)
│ │ │ +
268 { }
│ │ │ +
269
│ │ │ +
270 /// Copy assignment operator.
│ │ │ + │ │ │ +
272 operator=(const unordered_map&) = default;
│ │ │ +
273
│ │ │ +
274 /// Move assignment operator.
│ │ │ + │ │ │ + │ │ │ +
277
│ │ │ +
278 /**
│ │ │ +
279 * @brief %Unordered_map list assignment operator.
│ │ │ +
280 * @param __l An initializer_list.
│ │ │ +
281 *
│ │ │ +
282 * This function fills an %unordered_map with copies of the elements in
│ │ │ +
283 * the initializer list @a __l.
│ │ │ +
284 *
│ │ │ +
285 * Note that the assignment completely changes the %unordered_map and
│ │ │ +
286 * that the resulting %unordered_map's size is the same as the number
│ │ │ +
287 * of elements assigned.
│ │ │ +
288 */
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
291 {
│ │ │ +
292 _M_h = __l;
│ │ │ +
293 return *this;
│ │ │ +
294 }
│ │ │ +
│ │ │ +
295
│ │ │ +
296 /// Returns the allocator object used by the %unordered_map.
│ │ │ + │ │ │ +
│ │ │ +
298 get_allocator() const noexcept
│ │ │ +
299 { return _M_h.get_allocator(); }
│ │ │ +
│ │ │ +
300
│ │ │ +
301 // size and capacity:
│ │ │ +
302
│ │ │ +
303 /// Returns true if the %unordered_map is empty.
│ │ │ +
304 _GLIBCXX_NODISCARD bool
│ │ │ +
│ │ │ +
305 empty() const noexcept
│ │ │ +
306 { return _M_h.empty(); }
│ │ │ +
│ │ │ +
307
│ │ │ +
308 /// Returns the size of the %unordered_map.
│ │ │ + │ │ │ +
│ │ │ +
310 size() const noexcept
│ │ │ +
311 { return _M_h.size(); }
│ │ │ +
│ │ │ +
312
│ │ │ +
313 /// Returns the maximum size of the %unordered_map.
│ │ │ + │ │ │ +
│ │ │ +
315 max_size() const noexcept
│ │ │ +
316 { return _M_h.max_size(); }
│ │ │ +
│ │ │ +
317
│ │ │ +
318 // iterators.
│ │ │ +
319
│ │ │ +
320 /**
│ │ │ +
321 * Returns a read/write iterator that points to the first element in the
│ │ │ +
322 * %unordered_map.
│ │ │ +
323 */
│ │ │ + │ │ │ +
│ │ │ +
325 begin() noexcept
│ │ │ +
326 { return _M_h.begin(); }
│ │ │ +
│ │ │ +
327
│ │ │ +
328 ///@{
│ │ │ +
329 /**
│ │ │ +
330 * Returns a read-only (constant) iterator that points to the first
│ │ │ +
331 * element in the %unordered_map.
│ │ │ +
332 */
│ │ │ +
333 const_iterator
│ │ │ +
│ │ │ +
334 begin() const noexcept
│ │ │ +
335 { return _M_h.begin(); }
│ │ │ +
│ │ │ +
336
│ │ │ +
337 const_iterator
│ │ │ +
│ │ │ +
338 cbegin() const noexcept
│ │ │ +
339 { return _M_h.begin(); }
│ │ │ +
│ │ │ +
340 ///@}
│ │ │ +
341
│ │ │ +
342 /**
│ │ │ +
343 * Returns a read/write iterator that points one past the last element in
│ │ │ +
344 * the %unordered_map.
│ │ │ +
345 */
│ │ │ + │ │ │ +
│ │ │ +
347 end() noexcept
│ │ │ +
348 { return _M_h.end(); }
│ │ │ +
│ │ │ +
349
│ │ │ +
350 ///@{
│ │ │ +
351 /**
│ │ │ +
352 * Returns a read-only (constant) iterator that points one past the last
│ │ │ +
353 * element in the %unordered_map.
│ │ │ +
354 */
│ │ │ +
355 const_iterator
│ │ │ +
│ │ │ +
356 end() const noexcept
│ │ │ +
357 { return _M_h.end(); }
│ │ │ +
│ │ │ +
358
│ │ │ +
359 const_iterator
│ │ │ +
│ │ │ +
360 cend() const noexcept
│ │ │ +
361 { return _M_h.end(); }
│ │ │ +
│ │ │ +
362 ///@}
│ │ │ +
363
│ │ │ +
364 // modifiers.
│ │ │ +
365
│ │ │ +
366 /**
│ │ │ +
367 * @brief Attempts to build and insert a std::pair into the
│ │ │ +
368 * %unordered_map.
│ │ │ +
369 *
│ │ │ +
370 * @param __args Arguments used to generate a new pair instance (see
│ │ │ +
371 * std::piecewise_contruct for passing arguments to each
│ │ │ +
372 * part of the pair constructor).
│ │ │ +
373 *
│ │ │ +
374 * @return A pair, of which the first element is an iterator that points
│ │ │ +
375 * to the possibly inserted pair, and the second is a bool that
│ │ │ +
376 * is true if the pair was actually inserted.
│ │ │ +
377 *
│ │ │ +
378 * This function attempts to build and insert a (key, value) %pair into
│ │ │ +
379 * the %unordered_map.
│ │ │ +
380 * An %unordered_map relies on unique keys and thus a %pair is only
│ │ │ +
381 * inserted if its first element (the key) is not already present in the
│ │ │ +
382 * %unordered_map.
│ │ │ +
383 *
│ │ │ +
384 * Insertion requires amortized constant time.
│ │ │ +
385 */
│ │ │ +
386 template<typename... _Args>
│ │ │ + │ │ │ +
│ │ │ +
388 emplace(_Args&&... __args)
│ │ │ +
389 { return _M_h.emplace(std::forward<_Args>(__args)...); }
│ │ │ +
│ │ │ +
390
│ │ │ +
391 /**
│ │ │ +
392 * @brief Attempts to build and insert a std::pair into the
│ │ │ +
393 * %unordered_map.
│ │ │ +
394 *
│ │ │ +
395 * @param __pos An iterator that serves as a hint as to where the pair
│ │ │ +
396 * should be inserted.
│ │ │ +
397 * @param __args Arguments used to generate a new pair instance (see
│ │ │ +
398 * std::piecewise_contruct for passing arguments to each
│ │ │ +
399 * part of the pair constructor).
│ │ │ +
400 * @return An iterator that points to the element with key of the
│ │ │ +
401 * std::pair built from @a __args (may or may not be that
│ │ │ +
402 * std::pair).
│ │ │ +
403 *
│ │ │ +
404 * This function is not concerned about whether the insertion took place,
│ │ │ +
405 * and thus does not return a boolean like the single-argument emplace()
│ │ │ +
406 * does.
│ │ │ +
407 * Note that the first parameter is only a hint and can potentially
│ │ │ +
408 * improve the performance of the insertion process. A bad hint would
│ │ │ +
409 * cause no gains in efficiency.
│ │ │ +
410 *
│ │ │ +
411 * See
│ │ │ +
412 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/associative.html#containers.associative.insert_hints
│ │ │ +
413 * for more on @a hinting.
│ │ │ +
414 *
│ │ │ +
415 * Insertion requires amortized constant time.
│ │ │ +
416 */
│ │ │ +
417 template<typename... _Args>
│ │ │ + │ │ │ +
│ │ │ +
419 emplace_hint(const_iterator __pos, _Args&&... __args)
│ │ │ +
420 { return _M_h.emplace_hint(__pos, std::forward<_Args>(__args)...); }
│ │ │ +
│ │ │ +
421
│ │ │ +
422#if __cplusplus > 201402L
│ │ │ +
423 /// Extract a node.
│ │ │ +
424 node_type
│ │ │ +
│ │ │ + │ │ │ +
426 {
│ │ │ +
427 __glibcxx_assert(__pos != end());
│ │ │ +
428 return _M_h.extract(__pos);
│ │ │ +
429 }
│ │ │ +
│ │ │ +
430
│ │ │ +
431 /// Extract a node.
│ │ │ +
432 node_type
│ │ │ +
│ │ │ +
433 extract(const key_type& __key)
│ │ │ +
434 { return _M_h.extract(__key); }
│ │ │ +
│ │ │ +
435
│ │ │ +
436 /// Re-insert an extracted node.
│ │ │ +
437 insert_return_type
│ │ │ +
│ │ │ +
438 insert(node_type&& __nh)
│ │ │ +
439 { return _M_h._M_reinsert_node(std::move(__nh)); }
│ │ │ +
│ │ │ +
440
│ │ │ +
441 /// Re-insert an extracted node.
│ │ │ + │ │ │ +
│ │ │ +
443 insert(const_iterator, node_type&& __nh)
│ │ │ +
444 { return _M_h._M_reinsert_node(std::move(__nh)).position; }
│ │ │ +
│ │ │ +
445
│ │ │ +
446#define __cpp_lib_unordered_map_try_emplace 201411
│ │ │ +
447 /**
│ │ │ +
448 * @brief Attempts to build and insert a std::pair into the
│ │ │ +
449 * %unordered_map.
│ │ │ +
450 *
│ │ │ +
451 * @param __k Key to use for finding a possibly existing pair in
│ │ │ +
452 * the unordered_map.
│ │ │ +
453 * @param __args Arguments used to generate the .second for a
│ │ │ +
454 * new pair instance.
│ │ │ +
455 *
│ │ │ +
456 * @return A pair, of which the first element is an iterator that points
│ │ │ +
457 * to the possibly inserted pair, and the second is a bool that
│ │ │ +
458 * is true if the pair was actually inserted.
│ │ │ +
459 *
│ │ │ +
460 * This function attempts to build and insert a (key, value) %pair into
│ │ │ +
461 * the %unordered_map.
│ │ │ +
462 * An %unordered_map relies on unique keys and thus a %pair is only
│ │ │ +
463 * inserted if its first element (the key) is not already present in the
│ │ │ +
464 * %unordered_map.
│ │ │ +
465 * If a %pair is not inserted, this function has no effect.
│ │ │ +
466 *
│ │ │ +
467 * Insertion requires amortized constant time.
│ │ │ +
468 */
│ │ │ +
469 template <typename... _Args>
│ │ │ + │ │ │ +
│ │ │ +
471 try_emplace(const key_type& __k, _Args&&... __args)
│ │ │ +
472 {
│ │ │ +
473 return _M_h.try_emplace(cend(), __k, std::forward<_Args>(__args)...);
│ │ │ +
474 }
│ │ │ +
│ │ │ +
475
│ │ │ +
476 // move-capable overload
│ │ │ +
477 template <typename... _Args>
│ │ │ + │ │ │ +
479 try_emplace(key_type&& __k, _Args&&... __args)
│ │ │ +
480 {
│ │ │ +
481 return _M_h.try_emplace(cend(), std::move(__k),
│ │ │ +
482 std::forward<_Args>(__args)...);
│ │ │ +
483 }
│ │ │ +
484
│ │ │ +
485 /**
│ │ │ +
486 * @brief Attempts to build and insert a std::pair into the
│ │ │ +
487 * %unordered_map.
│ │ │ +
488 *
│ │ │ +
489 * @param __hint An iterator that serves as a hint as to where the pair
│ │ │ +
490 * should be inserted.
│ │ │ +
491 * @param __k Key to use for finding a possibly existing pair in
│ │ │ +
492 * the unordered_map.
│ │ │ +
493 * @param __args Arguments used to generate the .second for a
│ │ │ +
494 * new pair instance.
│ │ │ +
495 * @return An iterator that points to the element with key of the
│ │ │ +
496 * std::pair built from @a __args (may or may not be that
│ │ │ +
497 * std::pair).
│ │ │ +
498 *
│ │ │ +
499 * This function is not concerned about whether the insertion took place,
│ │ │ +
500 * and thus does not return a boolean like the single-argument emplace()
│ │ │ +
501 * does. However, if insertion did not take place,
│ │ │ +
502 * this function has no effect.
│ │ │ +
503 * Note that the first parameter is only a hint and can potentially
│ │ │ +
504 * improve the performance of the insertion process. A bad hint would
│ │ │ +
505 * cause no gains in efficiency.
│ │ │ +
506 *
│ │ │ +
507 * See
│ │ │ +
508 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/associative.html#containers.associative.insert_hints
│ │ │ +
509 * for more on @a hinting.
│ │ │ +
510 *
│ │ │ +
511 * Insertion requires amortized constant time.
│ │ │ +
512 */
│ │ │ +
513 template <typename... _Args>
│ │ │ +
514 iterator
│ │ │ +
│ │ │ + │ │ │ +
516 _Args&&... __args)
│ │ │ +
517 {
│ │ │ +
518 return _M_h.try_emplace(__hint, __k,
│ │ │ +
519 std::forward<_Args>(__args)...).first;
│ │ │ +
520 }
│ │ │ +
│ │ │ +
521
│ │ │ +
522 // move-capable overload
│ │ │ +
523 template <typename... _Args>
│ │ │ + │ │ │ +
525 try_emplace(const_iterator __hint, key_type&& __k, _Args&&... __args)
│ │ │ +
526 {
│ │ │ +
527 return _M_h.try_emplace(__hint, std::move(__k),
│ │ │ +
528 std::forward<_Args>(__args)...).first;
│ │ │ +
529 }
│ │ │ +
530#endif // C++17
│ │ │ +
531
│ │ │ +
532 ///@{
│ │ │ +
533 /**
│ │ │ +
534 * @brief Attempts to insert a std::pair into the %unordered_map.
│ │ │ +
535
│ │ │ +
536 * @param __x Pair to be inserted (see std::make_pair for easy
│ │ │ +
537 * creation of pairs).
│ │ │ +
538 *
│ │ │ +
539 * @return A pair, of which the first element is an iterator that
│ │ │ +
540 * points to the possibly inserted pair, and the second is
│ │ │ +
541 * a bool that is true if the pair was actually inserted.
│ │ │ +
542 *
│ │ │ +
543 * This function attempts to insert a (key, value) %pair into the
│ │ │ +
544 * %unordered_map. An %unordered_map relies on unique keys and thus a
│ │ │ +
545 * %pair is only inserted if its first element (the key) is not already
│ │ │ +
546 * present in the %unordered_map.
│ │ │ +
547 *
│ │ │ +
548 * Insertion requires amortized constant time.
│ │ │ +
549 */
│ │ │ + │ │ │ +
│ │ │ +
551 insert(const value_type& __x)
│ │ │ +
552 { return _M_h.insert(__x); }
│ │ │ +
│ │ │ +
553
│ │ │ +
554 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ +
555 // 2354. Unnecessary copying when inserting into maps with braced-init
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
558 { return _M_h.insert(std::move(__x)); }
│ │ │ +
│ │ │ +
559
│ │ │ +
560 template<typename _Pair>
│ │ │ +
561 __enable_if_t<is_constructible<value_type, _Pair&&>::value,
│ │ │ + │ │ │ +
│ │ │ +
563 insert(_Pair&& __x)
│ │ │ +
564 { return _M_h.emplace(std::forward<_Pair>(__x)); }
│ │ │ +
│ │ │ +
565 ///@}
│ │ │ +
566
│ │ │ +
567 ///@{
│ │ │ +
568 /**
│ │ │ +
569 * @brief Attempts to insert a std::pair into the %unordered_map.
│ │ │ +
570 * @param __hint An iterator that serves as a hint as to where the
│ │ │ +
571 * pair should be inserted.
│ │ │ +
572 * @param __x Pair to be inserted (see std::make_pair for easy creation
│ │ │ +
573 * of pairs).
│ │ │ +
574 * @return An iterator that points to the element with key of
│ │ │ +
575 * @a __x (may or may not be the %pair passed in).
│ │ │ +
576 *
│ │ │ +
577 * This function is not concerned about whether the insertion took place,
│ │ │ +
578 * and thus does not return a boolean like the single-argument insert()
│ │ │ +
579 * does. Note that the first parameter is only a hint and can
│ │ │ +
580 * potentially improve the performance of the insertion process. A bad
│ │ │ +
581 * hint would cause no gains in efficiency.
│ │ │ +
582 *
│ │ │ +
583 * See
│ │ │ +
584 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/associative.html#containers.associative.insert_hints
│ │ │ +
585 * for more on @a hinting.
│ │ │ +
586 *
│ │ │ +
587 * Insertion requires amortized constant time.
│ │ │ +
588 */
│ │ │ + │ │ │ +
│ │ │ +
590 insert(const_iterator __hint, const value_type& __x)
│ │ │ +
591 { return _M_h.insert(__hint, __x); }
│ │ │ +
│ │ │ +
592
│ │ │ +
593 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ +
594 // 2354. Unnecessary copying when inserting into maps with braced-init
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
597 { return _M_h.insert(__hint, std::move(__x)); }
│ │ │ +
│ │ │ +
598
│ │ │ +
599 template<typename _Pair>
│ │ │ +
600 __enable_if_t<is_constructible<value_type, _Pair&&>::value, iterator>
│ │ │ +
│ │ │ +
601 insert(const_iterator __hint, _Pair&& __x)
│ │ │ +
602 { return _M_h.emplace_hint(__hint, std::forward<_Pair>(__x)); }
│ │ │ +
│ │ │ +
603 ///@}
│ │ │ +
604
│ │ │ +
605 /**
│ │ │ +
606 * @brief A template function that attempts to insert a range of
│ │ │ +
607 * elements.
│ │ │ +
608 * @param __first Iterator pointing to the start of the range to be
│ │ │ +
609 * inserted.
│ │ │ +
610 * @param __last Iterator pointing to the end of the range.
│ │ │ +
611 *
│ │ │ +
612 * Complexity similar to that of the range constructor.
│ │ │ +
613 */
│ │ │ +
614 template<typename _InputIterator>
│ │ │ +
615 void
│ │ │ +
│ │ │ +
616 insert(_InputIterator __first, _InputIterator __last)
│ │ │ +
617 { _M_h.insert(__first, __last); }
│ │ │ +
│ │ │ +
618
│ │ │ +
619 /**
│ │ │ +
620 * @brief Attempts to insert a list of elements into the %unordered_map.
│ │ │ +
621 * @param __l A std::initializer_list<value_type> of elements
│ │ │ +
622 * to be inserted.
│ │ │ +
623 *
│ │ │ +
624 * Complexity similar to that of the range constructor.
│ │ │ +
625 */
│ │ │ +
626 void
│ │ │ +
│ │ │ + │ │ │ +
628 { _M_h.insert(__l); }
│ │ │ +
│ │ │ +
629
│ │ │ +
630
│ │ │ +
631#if __cplusplus > 201402L
│ │ │ +
632 /**
│ │ │ +
633 * @brief Attempts to insert a std::pair into the %unordered_map.
│ │ │ +
634 * @param __k Key to use for finding a possibly existing pair in
│ │ │ +
635 * the map.
│ │ │ +
636 * @param __obj Argument used to generate the .second for a pair
│ │ │ +
637 * instance.
│ │ │ +
638 *
│ │ │ +
639 * @return A pair, of which the first element is an iterator that
│ │ │ +
640 * points to the possibly inserted pair, and the second is
│ │ │ +
641 * a bool that is true if the pair was actually inserted.
│ │ │ +
642 *
│ │ │ +
643 * This function attempts to insert a (key, value) %pair into the
│ │ │ +
644 * %unordered_map. An %unordered_map relies on unique keys and thus a
│ │ │ +
645 * %pair is only inserted if its first element (the key) is not already
│ │ │ +
646 * present in the %unordered_map.
│ │ │ +
647 * If the %pair was already in the %unordered_map, the .second of
│ │ │ +
648 * the %pair is assigned from __obj.
│ │ │ +
649 *
│ │ │ +
650 * Insertion requires amortized constant time.
│ │ │ +
651 */
│ │ │ +
652 template <typename _Obj>
│ │ │ + │ │ │ +
│ │ │ +
654 insert_or_assign(const key_type& __k, _Obj&& __obj)
│ │ │ +
655 {
│ │ │ +
656 auto __ret = _M_h.try_emplace(cend(), __k,
│ │ │ +
657 std::forward<_Obj>(__obj));
│ │ │ +
658 if (!__ret.second)
│ │ │ +
659 __ret.first->second = std::forward<_Obj>(__obj);
│ │ │ +
660 return __ret;
│ │ │ +
661 }
│ │ │ +
│ │ │ +
662
│ │ │ +
663 // move-capable overload
│ │ │ +
664 template <typename _Obj>
│ │ │ + │ │ │ +
666 insert_or_assign(key_type&& __k, _Obj&& __obj)
│ │ │ +
667 {
│ │ │ +
668 auto __ret = _M_h.try_emplace(cend(), std::move(__k),
│ │ │ +
669 std::forward<_Obj>(__obj));
│ │ │ +
670 if (!__ret.second)
│ │ │ +
671 __ret.first->second = std::forward<_Obj>(__obj);
│ │ │ +
672 return __ret;
│ │ │ +
673 }
│ │ │ +
674
│ │ │ +
675 /**
│ │ │ +
676 * @brief Attempts to insert a std::pair into the %unordered_map.
│ │ │ +
677 * @param __hint An iterator that serves as a hint as to where the
│ │ │ +
678 * pair should be inserted.
│ │ │ +
679 * @param __k Key to use for finding a possibly existing pair in
│ │ │ +
680 * the unordered_map.
│ │ │ +
681 * @param __obj Argument used to generate the .second for a pair
│ │ │ +
682 * instance.
│ │ │ +
683 * @return An iterator that points to the element with key of
│ │ │ +
684 * @a __x (may or may not be the %pair passed in).
│ │ │ +
685 *
│ │ │ +
686 * This function is not concerned about whether the insertion took place,
│ │ │ +
687 * and thus does not return a boolean like the single-argument insert()
│ │ │ +
688 * does.
│ │ │ +
689 * If the %pair was already in the %unordered map, the .second of
│ │ │ +
690 * the %pair is assigned from __obj.
│ │ │ +
691 * Note that the first parameter is only a hint and can
│ │ │ +
692 * potentially improve the performance of the insertion process. A bad
│ │ │ +
693 * hint would cause no gains in efficiency.
│ │ │ +
694 *
│ │ │ +
695 * See
│ │ │ +
696 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/associative.html#containers.associative.insert_hints
│ │ │ +
697 * for more on @a hinting.
│ │ │ +
698 *
│ │ │ +
699 * Insertion requires amortized constant time.
│ │ │ +
700 */
│ │ │ +
701 template <typename _Obj>
│ │ │ +
702 iterator
│ │ │ +
│ │ │ + │ │ │ +
704 _Obj&& __obj)
│ │ │ +
705 {
│ │ │ +
706 auto __ret = _M_h.try_emplace(__hint, __k, std::forward<_Obj>(__obj));
│ │ │ +
707 if (!__ret.second)
│ │ │ +
708 __ret.first->second = std::forward<_Obj>(__obj);
│ │ │ +
709 return __ret.first;
│ │ │ +
710 }
│ │ │ +
│ │ │ +
711
│ │ │ +
712 // move-capable overload
│ │ │ +
713 template <typename _Obj>
│ │ │ + │ │ │ +
715 insert_or_assign(const_iterator __hint, key_type&& __k, _Obj&& __obj)
│ │ │ +
716 {
│ │ │ +
717 auto __ret = _M_h.try_emplace(__hint, std::move(__k),
│ │ │ +
718 std::forward<_Obj>(__obj));
│ │ │ +
719 if (!__ret.second)
│ │ │ +
720 __ret.first->second = std::forward<_Obj>(__obj);
│ │ │ +
721 return __ret.first;
│ │ │ +
722 }
│ │ │ +
723#endif
│ │ │ +
724
│ │ │ +
725 ///@{
│ │ │ +
726 /**
│ │ │ +
727 * @brief Erases an element from an %unordered_map.
│ │ │ +
728 * @param __position An iterator pointing to the element to be erased.
│ │ │ +
729 * @return An iterator pointing to the element immediately following
│ │ │ +
730 * @a __position prior to the element being erased. If no such
│ │ │ +
731 * element exists, end() is returned.
│ │ │ +
732 *
│ │ │ +
733 * This function erases an element, pointed to by the given iterator,
│ │ │ +
734 * from an %unordered_map.
│ │ │ +
735 * Note that this function only erases the element, and that if the
│ │ │ +
736 * element is itself a pointer, the pointed-to memory is not touched in
│ │ │ +
737 * any way. Managing the pointer is the user's responsibility.
│ │ │ +
738 */
│ │ │ +
739 iterator
│ │ │ +
│ │ │ + │ │ │ +
741 { return _M_h.erase(__position); }
│ │ │ +
│ │ │ +
742
│ │ │ +
743 // LWG 2059.
│ │ │ + │ │ │ +
│ │ │ +
745 erase(iterator __position)
│ │ │ +
746 { return _M_h.erase(__position); }
│ │ │ +
│ │ │ +
747 ///@}
│ │ │ +
748
│ │ │ +
749 /**
│ │ │ +
750 * @brief Erases elements according to the provided key.
│ │ │ +
751 * @param __x Key of element to be erased.
│ │ │ +
752 * @return The number of elements erased.
│ │ │ +
753 *
│ │ │ +
754 * This function erases all the elements located by the given key from
│ │ │ +
755 * an %unordered_map. For an %unordered_map the result of this function
│ │ │ +
756 * can only be 0 (not present) or 1 (present).
│ │ │ +
757 * Note that this function only erases the element, and that if the
│ │ │ +
758 * element is itself a pointer, the pointed-to memory is not touched in
│ │ │ +
759 * any way. Managing the pointer is the user's responsibility.
│ │ │ +
760 */
│ │ │ + │ │ │ +
│ │ │ +
762 erase(const key_type& __x)
│ │ │ +
763 { return _M_h.erase(__x); }
│ │ │ +
│ │ │ +
764
│ │ │ +
765 /**
│ │ │ +
766 * @brief Erases a [__first,__last) range of elements from an
│ │ │ +
767 * %unordered_map.
│ │ │ +
768 * @param __first Iterator pointing to the start of the range to be
│ │ │ +
769 * erased.
│ │ │ +
770 * @param __last Iterator pointing to the end of the range to
│ │ │ +
771 * be erased.
│ │ │ +
772 * @return The iterator @a __last.
│ │ │ +
773 *
│ │ │ +
774 * This function erases a sequence of elements from an %unordered_map.
│ │ │ +
775 * Note that this function only erases the elements, and that if
│ │ │ +
776 * the element is itself a pointer, the pointed-to memory is not touched
│ │ │ +
777 * in any way. Managing the pointer is the user's responsibility.
│ │ │ +
778 */
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
781 { return _M_h.erase(__first, __last); }
│ │ │ +
│ │ │ +
782
│ │ │ +
783 /**
│ │ │ +
784 * Erases all elements in an %unordered_map.
│ │ │ +
785 * Note that this function only erases the elements, and that if the
│ │ │ +
786 * elements themselves are pointers, the pointed-to memory is not touched
│ │ │ +
787 * in any way. Managing the pointer is the user's responsibility.
│ │ │ +
788 */
│ │ │ +
789 void
│ │ │ +
│ │ │ +
790 clear() noexcept
│ │ │ +
791 { _M_h.clear(); }
│ │ │ +
│ │ │ +
792
│ │ │ +
793 /**
│ │ │ +
794 * @brief Swaps data with another %unordered_map.
│ │ │ +
795 * @param __x An %unordered_map of the same element and allocator
│ │ │ +
796 * types.
│ │ │ +
797 *
│ │ │ +
798 * This exchanges the elements between two %unordered_map in constant
│ │ │ +
799 * time.
│ │ │ +
800 * Note that the global std::swap() function is specialized such that
│ │ │ +
801 * std::swap(m1,m2) will feed to this function.
│ │ │ +
802 */
│ │ │ +
803 void
│ │ │ +
│ │ │ + │ │ │ +
805 noexcept( noexcept(_M_h.swap(__x._M_h)) )
│ │ │ +
806 { _M_h.swap(__x._M_h); }
│ │ │ +
│ │ │ +
807
│ │ │ +
808#if __cplusplus > 201402L
│ │ │ +
809 template<typename, typename, typename>
│ │ │ +
810 friend class std::_Hash_merge_helper;
│ │ │ +
811
│ │ │ +
812 template<typename _H2, typename _P2>
│ │ │ +
813 void
│ │ │ + │ │ │ +
815 {
│ │ │ +
816 using _Merge_helper = _Hash_merge_helper<unordered_map, _H2, _P2>;
│ │ │ +
817 _M_h._M_merge_unique(_Merge_helper::_S_get_table(__source));
│ │ │ +
818 }
│ │ │ +
819
│ │ │ +
820 template<typename _H2, typename _P2>
│ │ │ +
821 void
│ │ │ +
822 merge(unordered_map<_Key, _Tp, _H2, _P2, _Alloc>&& __source)
│ │ │ +
823 { merge(__source); }
│ │ │ +
824
│ │ │ +
825 template<typename _H2, typename _P2>
│ │ │ +
826 void
│ │ │ +
827 merge(unordered_multimap<_Key, _Tp, _H2, _P2, _Alloc>& __source)
│ │ │ +
828 {
│ │ │ +
829 using _Merge_helper = _Hash_merge_helper<unordered_map, _H2, _P2>;
│ │ │ +
830 _M_h._M_merge_unique(_Merge_helper::_S_get_table(__source));
│ │ │ +
831 }
│ │ │ +
832
│ │ │ +
833 template<typename _H2, typename _P2>
│ │ │ +
834 void
│ │ │ +
835 merge(unordered_multimap<_Key, _Tp, _H2, _P2, _Alloc>&& __source)
│ │ │ +
836 { merge(__source); }
│ │ │ +
837#endif // C++17
│ │ │ +
838
│ │ │ +
839 // observers.
│ │ │ +
840
│ │ │ +
841 /// Returns the hash functor object with which the %unordered_map was
│ │ │ +
842 /// constructed.
│ │ │ +
843 hasher
│ │ │ +
│ │ │ + │ │ │ +
845 { return _M_h.hash_function(); }
│ │ │ +
│ │ │ +
846
│ │ │ +
847 /// Returns the key comparison object with which the %unordered_map was
│ │ │ +
848 /// constructed.
│ │ │ + │ │ │ +
│ │ │ +
850 key_eq() const
│ │ │ +
851 { return _M_h.key_eq(); }
│ │ │ +
│ │ │ +
852
│ │ │ +
853 // lookup.
│ │ │ +
854
│ │ │ +
855 ///@{
│ │ │ +
856 /**
│ │ │ +
857 * @brief Tries to locate an element in an %unordered_map.
│ │ │ +
858 * @param __x Key to be located.
│ │ │ +
859 * @return Iterator pointing to sought-after element, or end() if not
│ │ │ +
860 * found.
│ │ │ +
861 *
│ │ │ +
862 * This function takes a key and tries to locate the element with which
│ │ │ +
863 * the key matches. If successful the function returns an iterator
│ │ │ +
864 * pointing to the sought after element. If unsuccessful it returns the
│ │ │ +
865 * past-the-end ( @c end() ) iterator.
│ │ │ +
866 */
│ │ │ + │ │ │ +
│ │ │ +
868 find(const key_type& __x)
│ │ │ +
869 { return _M_h.find(__x); }
│ │ │ +
│ │ │ +
870
│ │ │ +
871#if __cplusplus > 201703L
│ │ │ +
872 template<typename _Kt>
│ │ │ +
873 auto
│ │ │ +
874 find(const _Kt& __x) -> decltype(_M_h._M_find_tr(__x))
│ │ │ +
875 { return _M_h._M_find_tr(__x); }
│ │ │ +
876#endif
│ │ │ +
877
│ │ │ +
878 const_iterator
│ │ │ +
│ │ │ +
879 find(const key_type& __x) const
│ │ │ +
880 { return _M_h.find(__x); }
│ │ │ +
│ │ │ +
881
│ │ │ +
882#if __cplusplus > 201703L
│ │ │ +
883 template<typename _Kt>
│ │ │ +
884 auto
│ │ │ +
885 find(const _Kt& __x) const -> decltype(_M_h._M_find_tr(__x))
│ │ │ +
886 { return _M_h._M_find_tr(__x); }
│ │ │ +
887#endif
│ │ │ +
888 ///@}
│ │ │ +
889
│ │ │ +
890 ///@{
│ │ │ +
891 /**
│ │ │ +
892 * @brief Finds the number of elements.
│ │ │ +
893 * @param __x Key to count.
│ │ │ +
894 * @return Number of elements with specified key.
│ │ │ +
895 *
│ │ │ +
896 * This function only makes sense for %unordered_multimap; for
│ │ │ +
897 * %unordered_map the result will either be 0 (not present) or 1
│ │ │ +
898 * (present).
│ │ │ +
899 */
│ │ │ +
900 size_type
│ │ │ +
│ │ │ +
901 count(const key_type& __x) const
│ │ │ +
902 { return _M_h.count(__x); }
│ │ │ +
│ │ │ +
903
│ │ │ +
904#if __cplusplus > 201703L
│ │ │ +
905 template<typename _Kt>
│ │ │ +
906 auto
│ │ │ +
907 count(const _Kt& __x) const -> decltype(_M_h._M_count_tr(__x))
│ │ │ +
908 { return _M_h._M_count_tr(__x); }
│ │ │ +
909#endif
│ │ │ +
910 ///@}
│ │ │ +
911
│ │ │ +
912#if __cplusplus > 201703L
│ │ │ +
913 ///@{
│ │ │ +
914 /**
│ │ │ +
915 * @brief Finds whether an element with the given key exists.
│ │ │ +
916 * @param __x Key of elements to be located.
│ │ │ +
917 * @return True if there is any element with the specified key.
│ │ │ +
918 */
│ │ │ +
919 bool
│ │ │ +
920 contains(const key_type& __x) const
│ │ │ +
921 { return _M_h.find(__x) != _M_h.end(); }
│ │ │ +
922
│ │ │ +
923 template<typename _Kt>
│ │ │ +
924 auto
│ │ │ +
925 contains(const _Kt& __x) const
│ │ │ +
926 -> decltype(_M_h._M_find_tr(__x), void(), true)
│ │ │ +
927 { return _M_h._M_find_tr(__x) != _M_h.end(); }
│ │ │ +
928 ///@}
│ │ │ +
929#endif
│ │ │ +
930
│ │ │ +
931 ///@{
│ │ │ +
932 /**
│ │ │ +
933 * @brief Finds a subsequence matching given key.
│ │ │ +
934 * @param __x Key to be located.
│ │ │ +
935 * @return Pair of iterators that possibly points to the subsequence
│ │ │ +
936 * matching given key.
│ │ │ +
937 *
│ │ │ +
938 * This function probably only makes sense for %unordered_multimap.
│ │ │ +
939 */
│ │ │ +
940 std::pair<iterator, iterator>
│ │ │ +
│ │ │ + │ │ │ +
942 { return _M_h.equal_range(__x); }
│ │ │ +
│ │ │ +
943
│ │ │ +
944#if __cplusplus > 201703L
│ │ │ +
945 template<typename _Kt>
│ │ │ +
946 auto
│ │ │ +
947 equal_range(const _Kt& __x)
│ │ │ +
948 -> decltype(_M_h._M_equal_range_tr(__x))
│ │ │ +
949 { return _M_h._M_equal_range_tr(__x); }
│ │ │ +
950#endif
│ │ │ +
951
│ │ │ + │ │ │ +
│ │ │ +
953 equal_range(const key_type& __x) const
│ │ │ +
954 { return _M_h.equal_range(__x); }
│ │ │ +
│ │ │ +
955
│ │ │ +
956#if __cplusplus > 201703L
│ │ │ +
957 template<typename _Kt>
│ │ │ +
958 auto
│ │ │ +
959 equal_range(const _Kt& __x) const
│ │ │ +
960 -> decltype(_M_h._M_equal_range_tr(__x))
│ │ │ +
961 { return _M_h._M_equal_range_tr(__x); }
│ │ │ +
962#endif
│ │ │ +
963 ///@}
│ │ │ +
964
│ │ │ +
965 ///@{
│ │ │ +
966 /**
│ │ │ +
967 * @brief Subscript ( @c [] ) access to %unordered_map data.
│ │ │ +
968 * @param __k The key for which data should be retrieved.
│ │ │ +
969 * @return A reference to the data of the (key,data) %pair.
│ │ │ +
970 *
│ │ │ +
971 * Allows for easy lookup with the subscript ( @c [] )operator. Returns
│ │ │ +
972 * data associated with the key specified in subscript. If the key does
│ │ │ +
973 * not exist, a pair with that key is created using default values, which
│ │ │ +
974 * is then returned.
│ │ │ +
975 *
│ │ │ +
976 * Lookup requires constant time.
│ │ │ +
977 */
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
980 { return _M_h[__k]; }
│ │ │ +
│ │ │ +
981
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
984 { return _M_h[std::move(__k)]; }
│ │ │ +
│ │ │ +
985 ///@}
│ │ │ +
986
│ │ │ +
987 ///@{
│ │ │ +
988 /**
│ │ │ +
989 * @brief Access to %unordered_map data.
│ │ │ +
990 * @param __k The key for which data should be retrieved.
│ │ │ +
991 * @return A reference to the data whose key is equal to @a __k, if
│ │ │ +
992 * such a data is present in the %unordered_map.
│ │ │ +
993 * @throw std::out_of_range If no such data is present.
│ │ │ +
994 */
│ │ │ + │ │ │ +
│ │ │ +
996 at(const key_type& __k)
│ │ │ +
997 { return _M_h.at(__k); }
│ │ │ +
│ │ │ +
998
│ │ │ +
999 const mapped_type&
│ │ │ +
│ │ │ +
1000 at(const key_type& __k) const
│ │ │ +
1001 { return _M_h.at(__k); }
│ │ │ +
│ │ │ +
1002 ///@}
│ │ │ +
1003
│ │ │ +
1004 // bucket interface.
│ │ │ +
1005
│ │ │ +
1006 /// Returns the number of buckets of the %unordered_map.
│ │ │ +
1007 size_type
│ │ │ +
│ │ │ +
1008 bucket_count() const noexcept
│ │ │ +
1009 { return _M_h.bucket_count(); }
│ │ │ +
│ │ │ +
1010
│ │ │ +
1011 /// Returns the maximum number of buckets of the %unordered_map.
│ │ │ +
1012 size_type
│ │ │ +
│ │ │ +
1013 max_bucket_count() const noexcept
│ │ │ +
1014 { return _M_h.max_bucket_count(); }
│ │ │ +
│ │ │ +
1015
│ │ │ +
1016 /*
│ │ │ +
1017 * @brief Returns the number of elements in a given bucket.
│ │ │ +
1018 * @param __n A bucket index.
│ │ │ +
1019 * @return The number of elements in the bucket.
│ │ │ +
1020 */
│ │ │ +
1021 size_type
│ │ │ +
1022 bucket_size(size_type __n) const
│ │ │ +
1023 { return _M_h.bucket_size(__n); }
│ │ │ +
1024
│ │ │ +
1025 /*
│ │ │ +
1026 * @brief Returns the bucket index of a given element.
│ │ │ +
1027 * @param __key A key instance.
│ │ │ +
1028 * @return The key bucket index.
│ │ │ +
1029 */
│ │ │ +
1030 size_type
│ │ │ +
1031 bucket(const key_type& __key) const
│ │ │ +
1032 { return _M_h.bucket(__key); }
│ │ │ +
1033
│ │ │ +
1034 /**
│ │ │ +
1035 * @brief Returns a read/write iterator pointing to the first bucket
│ │ │ +
1036 * element.
│ │ │ +
1037 * @param __n The bucket index.
│ │ │ +
1038 * @return A read/write local iterator.
│ │ │ +
1039 */
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
1042 { return _M_h.begin(__n); }
│ │ │ +
│ │ │ +
1043
│ │ │ +
1044 ///@{
│ │ │ +
1045 /**
│ │ │ +
1046 * @brief Returns a read-only (constant) iterator pointing to the first
│ │ │ +
1047 * bucket element.
│ │ │ +
1048 * @param __n The bucket index.
│ │ │ +
1049 * @return A read-only local iterator.
│ │ │ +
1050 */
│ │ │ + │ │ │ +
│ │ │ +
1052 begin(size_type __n) const
│ │ │ +
1053 { return _M_h.begin(__n); }
│ │ │ +
│ │ │ +
1054
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
1057 { return _M_h.cbegin(__n); }
│ │ │ +
│ │ │ +
1058 ///@}
│ │ │ +
1059
│ │ │ +
1060 /**
│ │ │ +
1061 * @brief Returns a read/write iterator pointing to one past the last
│ │ │ +
1062 * bucket elements.
│ │ │ +
1063 * @param __n The bucket index.
│ │ │ +
1064 * @return A read/write local iterator.
│ │ │ +
1065 */
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
1068 { return _M_h.end(__n); }
│ │ │ +
│ │ │ +
1069
│ │ │ +
1070 ///@{
│ │ │ +
1071 /**
│ │ │ +
1072 * @brief Returns a read-only (constant) iterator pointing to one past
│ │ │ +
1073 * the last bucket elements.
│ │ │ +
1074 * @param __n The bucket index.
│ │ │ +
1075 * @return A read-only local iterator.
│ │ │ +
1076 */
│ │ │ + │ │ │ +
│ │ │ +
1078 end(size_type __n) const
│ │ │ +
1079 { return _M_h.end(__n); }
│ │ │ +
│ │ │ +
1080
│ │ │ + │ │ │ +
│ │ │ +
1082 cend(size_type __n) const
│ │ │ +
1083 { return _M_h.cend(__n); }
│ │ │ +
│ │ │ +
1084 ///@}
│ │ │ +
1085
│ │ │ +
1086 // hash policy.
│ │ │ +
1087
│ │ │ +
1088 /// Returns the average number of elements per bucket.
│ │ │ +
1089 float
│ │ │ +
│ │ │ +
1090 load_factor() const noexcept
│ │ │ +
1091 { return _M_h.load_factor(); }
│ │ │ +
│ │ │ +
1092
│ │ │ +
1093 /// Returns a positive number that the %unordered_map tries to keep the
│ │ │ +
1094 /// load factor less than or equal to.
│ │ │ +
1095 float
│ │ │ +
│ │ │ +
1096 max_load_factor() const noexcept
│ │ │ +
1097 { return _M_h.max_load_factor(); }
│ │ │ +
│ │ │ +
1098
│ │ │ +
1099 /**
│ │ │ +
1100 * @brief Change the %unordered_map maximum load factor.
│ │ │ +
1101 * @param __z The new maximum load factor.
│ │ │ +
1102 */
│ │ │ +
1103 void
│ │ │ +
│ │ │ + │ │ │ +
1105 { _M_h.max_load_factor(__z); }
│ │ │ +
│ │ │ +
1106
│ │ │ +
1107 /**
│ │ │ +
1108 * @brief May rehash the %unordered_map.
│ │ │ +
1109 * @param __n The new number of buckets.
│ │ │ +
1110 *
│ │ │ +
1111 * Rehash will occur only if the new number of buckets respect the
│ │ │ +
1112 * %unordered_map maximum load factor.
│ │ │ +
1113 */
│ │ │ +
1114 void
│ │ │ +
│ │ │ + │ │ │ +
1116 { _M_h.rehash(__n); }
│ │ │ +
│ │ │ +
1117
│ │ │ +
1118 /**
│ │ │ +
1119 * @brief Prepare the %unordered_map for a specified number of
│ │ │ +
1120 * elements.
│ │ │ +
1121 * @param __n Number of elements required.
│ │ │ +
1122 *
│ │ │ +
1123 * Same as rehash(ceil(n / max_load_factor())).
│ │ │ +
1124 */
│ │ │ +
1125 void
│ │ │ +
│ │ │ + │ │ │ +
1127 { _M_h.reserve(__n); }
│ │ │ +
│ │ │ +
1128
│ │ │ +
1129 template<typename _Key1, typename _Tp1, typename _Hash1, typename _Pred1,
│ │ │ +
1130 typename _Alloc1>
│ │ │ +
1131 friend bool
│ │ │ + │ │ │ + │ │ │ +
1134 };
│ │ │ +
│ │ │ +
1135
│ │ │ +
1136#if __cpp_deduction_guides >= 201606
│ │ │ +
1137
│ │ │ +
1138 template<typename _InputIterator,
│ │ │ +
1139 typename _Hash = hash<__iter_key_t<_InputIterator>>,
│ │ │ +
1140 typename _Pred = equal_to<__iter_key_t<_InputIterator>>,
│ │ │ +
1141 typename _Allocator = allocator<__iter_to_alloc_t<_InputIterator>>,
│ │ │ +
1142 typename = _RequireInputIter<_InputIterator>,
│ │ │ +
1143 typename = _RequireNotAllocatorOrIntegral<_Hash>,
│ │ │ +
1144 typename = _RequireNotAllocator<_Pred>,
│ │ │ +
1145 typename = _RequireAllocator<_Allocator>>
│ │ │ +
1146 unordered_map(_InputIterator, _InputIterator,
│ │ │ +
1147 typename unordered_map<int, int>::size_type = {},
│ │ │ +
1148 _Hash = _Hash(), _Pred = _Pred(), _Allocator = _Allocator())
│ │ │ +
1149 -> unordered_map<__iter_key_t<_InputIterator>,
│ │ │ +
1150 __iter_val_t<_InputIterator>,
│ │ │ +
1151 _Hash, _Pred, _Allocator>;
│ │ │ +
1152
│ │ │ +
1153 template<typename _Key, typename _Tp, typename _Hash = hash<_Key>,
│ │ │ +
1154 typename _Pred = equal_to<_Key>,
│ │ │ +
1155 typename _Allocator = allocator<pair<const _Key, _Tp>>,
│ │ │ +
1156 typename = _RequireNotAllocatorOrIntegral<_Hash>,
│ │ │ +
1157 typename = _RequireNotAllocator<_Pred>,
│ │ │ +
1158 typename = _RequireAllocator<_Allocator>>
│ │ │ + │ │ │ + │ │ │ +
1161 _Hash = _Hash(), _Pred = _Pred(), _Allocator = _Allocator())
│ │ │ + │ │ │ +
1163
│ │ │ +
1164 template<typename _InputIterator, typename _Allocator,
│ │ │ +
1165 typename = _RequireInputIter<_InputIterator>,
│ │ │ +
1166 typename = _RequireAllocator<_Allocator>>
│ │ │ +
1167 unordered_map(_InputIterator, _InputIterator,
│ │ │ +
1168 typename unordered_map<int, int>::size_type, _Allocator)
│ │ │ + │ │ │ +
1170 __iter_val_t<_InputIterator>,
│ │ │ + │ │ │ + │ │ │ +
1173 _Allocator>;
│ │ │ +
1174
│ │ │ +
1175 template<typename _InputIterator, typename _Allocator,
│ │ │ +
1176 typename = _RequireInputIter<_InputIterator>,
│ │ │ +
1177 typename = _RequireAllocator<_Allocator>>
│ │ │ +
1178 unordered_map(_InputIterator, _InputIterator, _Allocator)
│ │ │ + │ │ │ +
1180 __iter_val_t<_InputIterator>,
│ │ │ + │ │ │ + │ │ │ +
1183 _Allocator>;
│ │ │ +
1184
│ │ │ +
1185 template<typename _InputIterator, typename _Hash, typename _Allocator,
│ │ │ +
1186 typename = _RequireInputIter<_InputIterator>,
│ │ │ +
1187 typename = _RequireNotAllocatorOrIntegral<_Hash>,
│ │ │ +
1188 typename = _RequireAllocator<_Allocator>>
│ │ │ +
1189 unordered_map(_InputIterator, _InputIterator,
│ │ │ + │ │ │ +
1191 _Hash, _Allocator)
│ │ │ + │ │ │ +
1193 __iter_val_t<_InputIterator>, _Hash,
│ │ │ + │ │ │ +
1195
│ │ │ +
1196 template<typename _Key, typename _Tp, typename _Allocator,
│ │ │ +
1197 typename = _RequireAllocator<_Allocator>>
│ │ │ + │ │ │ + │ │ │ +
1200 _Allocator)
│ │ │ + │ │ │ +
1202
│ │ │ +
1203 template<typename _Key, typename _Tp, typename _Allocator,
│ │ │ +
1204 typename = _RequireAllocator<_Allocator>>
│ │ │ + │ │ │ + │ │ │ +
1207
│ │ │ +
1208 template<typename _Key, typename _Tp, typename _Hash, typename _Allocator,
│ │ │ +
1209 typename = _RequireNotAllocatorOrIntegral<_Hash>,
│ │ │ +
1210 typename = _RequireAllocator<_Allocator>>
│ │ │ + │ │ │ + │ │ │ +
1213 _Hash, _Allocator)
│ │ │ + │ │ │ +
1215
│ │ │ +
1216#endif
│ │ │ +
1217
│ │ │ +
1218 /**
│ │ │ +
1219 * @brief A standard container composed of equivalent keys
│ │ │ +
1220 * (possibly containing multiple of each key value) that associates
│ │ │ +
1221 * values of another type with the keys.
│ │ │ +
1222 *
│ │ │ +
1223 * @ingroup unordered_associative_containers
│ │ │ +
1224 *
│ │ │ +
1225 * @tparam _Key Type of key objects.
│ │ │ +
1226 * @tparam _Tp Type of mapped objects.
│ │ │ +
1227 * @tparam _Hash Hashing function object type, defaults to hash<_Value>.
│ │ │ +
1228 * @tparam _Pred Predicate function object type, defaults
│ │ │ +
1229 * to equal_to<_Value>.
│ │ │ +
1230 * @tparam _Alloc Allocator type, defaults to
│ │ │ +
1231 * std::allocator<std::pair<const _Key, _Tp>>.
│ │ │ +
1232 *
│ │ │ +
1233 * Meets the requirements of a <a href="tables.html#65">container</a>, and
│ │ │ +
1234 * <a href="tables.html#xx">unordered associative container</a>
│ │ │ +
1235 *
│ │ │ +
1236 * The resulting value type of the container is std::pair<const _Key, _Tp>.
│ │ │ +
1237 *
│ │ │ +
1238 * Base is _Hashtable, dispatched at compile time via template
│ │ │ +
1239 * alias __ummap_hashtable.
│ │ │ +
1240 */
│ │ │ +
1241 template<typename _Key, typename _Tp,
│ │ │ +
1242 typename _Hash = hash<_Key>,
│ │ │ +
1243 typename _Pred = equal_to<_Key>,
│ │ │ +
1244 typename _Alloc = allocator<std::pair<const _Key, _Tp>>>
│ │ │ +
│ │ │ + │ │ │ +
1246 {
│ │ │ +
1247 typedef __ummap_hashtable<_Key, _Tp, _Hash, _Pred, _Alloc> _Hashtable;
│ │ │ +
1248 _Hashtable _M_h;
│ │ │ +
1249
│ │ │ +
1250 public:
│ │ │ +
1251 // typedefs:
│ │ │ +
1252 ///@{
│ │ │ +
1253 /// Public typedefs.
│ │ │ +
1254 typedef typename _Hashtable::key_type key_type;
│ │ │ +
1255 typedef typename _Hashtable::value_type value_type;
│ │ │ +
1256 typedef typename _Hashtable::mapped_type mapped_type;
│ │ │ +
1257 typedef typename _Hashtable::hasher hasher;
│ │ │ +
1258 typedef typename _Hashtable::key_equal key_equal;
│ │ │ +
1259 typedef typename _Hashtable::allocator_type allocator_type;
│ │ │ +
1260 ///@}
│ │ │ +
1261
│ │ │ +
1262 ///@{
│ │ │ +
1263 /// Iterator-related typedefs.
│ │ │ +
1264 typedef typename _Hashtable::pointer pointer;
│ │ │ +
1265 typedef typename _Hashtable::const_pointer const_pointer;
│ │ │ +
1266 typedef typename _Hashtable::reference reference;
│ │ │ +
1267 typedef typename _Hashtable::const_reference const_reference;
│ │ │ +
1268 typedef typename _Hashtable::iterator iterator;
│ │ │ +
1269 typedef typename _Hashtable::const_iterator const_iterator;
│ │ │ +
1270 typedef typename _Hashtable::local_iterator local_iterator;
│ │ │ +
1271 typedef typename _Hashtable::const_local_iterator const_local_iterator;
│ │ │ +
1272 typedef typename _Hashtable::size_type size_type;
│ │ │ +
1273 typedef typename _Hashtable::difference_type difference_type;
│ │ │ +
1274 ///@}
│ │ │ +
1275
│ │ │ +
1276#if __cplusplus > 201402L
│ │ │ +
1277 using node_type = typename _Hashtable::node_type;
│ │ │ +
1278#endif
│ │ │ +
1279
│ │ │ +
1280 //construct/destroy/copy
│ │ │ +
1281
│ │ │ +
1282 /// Default constructor.
│ │ │ + │ │ │ +
1284
│ │ │ +
1285 /**
│ │ │ +
1286 * @brief Default constructor creates no elements.
│ │ │ +
1287 * @param __n Mnimal initial number of buckets.
│ │ │ +
1288 * @param __hf A hash functor.
│ │ │ +
1289 * @param __eql A key equality functor.
│ │ │ +
1290 * @param __a An allocator object.
│ │ │ +
1291 */
│ │ │ +
1292 explicit
│ │ │ +
│ │ │ + │ │ │ +
1294 const hasher& __hf = hasher(),
│ │ │ +
1295 const key_equal& __eql = key_equal(),
│ │ │ +
1296 const allocator_type& __a = allocator_type())
│ │ │ +
1297 : _M_h(__n, __hf, __eql, __a)
│ │ │ +
1298 { }
│ │ │ +
│ │ │ +
1299
│ │ │ +
1300 /**
│ │ │ +
1301 * @brief Builds an %unordered_multimap from a range.
│ │ │ +
1302 * @param __first An input iterator.
│ │ │ +
1303 * @param __last An input iterator.
│ │ │ +
1304 * @param __n Minimal initial number of buckets.
│ │ │ +
1305 * @param __hf A hash functor.
│ │ │ +
1306 * @param __eql A key equality functor.
│ │ │ +
1307 * @param __a An allocator object.
│ │ │ +
1308 *
│ │ │ +
1309 * Create an %unordered_multimap consisting of copies of the elements
│ │ │ +
1310 * from [__first,__last). This is linear in N (where N is
│ │ │ +
1311 * distance(__first,__last)).
│ │ │ +
1312 */
│ │ │ +
1313 template<typename _InputIterator>
│ │ │ +
│ │ │ +
1314 unordered_multimap(_InputIterator __first, _InputIterator __last,
│ │ │ +
1315 size_type __n = 0,
│ │ │ +
1316 const hasher& __hf = hasher(),
│ │ │ +
1317 const key_equal& __eql = key_equal(),
│ │ │ +
1318 const allocator_type& __a = allocator_type())
│ │ │ +
1319 : _M_h(__first, __last, __n, __hf, __eql, __a)
│ │ │ +
1320 { }
│ │ │ +
│ │ │ +
1321
│ │ │ +
1322 /// Copy constructor.
│ │ │ + │ │ │ +
1324
│ │ │ +
1325 /// Move constructor.
│ │ │ + │ │ │ +
1327
│ │ │ +
1328 /**
│ │ │ +
1329 * @brief Creates an %unordered_multimap with no elements.
│ │ │ +
1330 * @param __a An allocator object.
│ │ │ +
1331 */
│ │ │ +
1332 explicit
│ │ │ +
│ │ │ + │ │ │ +
1334 : _M_h(__a)
│ │ │ +
1335 { }
│ │ │ +
│ │ │ +
1336
│ │ │ +
1337 /*
│ │ │ +
1338 * @brief Copy constructor with allocator argument.
│ │ │ +
1339 * @param __uset Input %unordered_multimap to copy.
│ │ │ +
1340 * @param __a An allocator object.
│ │ │ +
1341 */
│ │ │ + │ │ │ +
1343 const allocator_type& __a)
│ │ │ +
1344 : _M_h(__ummap._M_h, __a)
│ │ │ +
1345 { }
│ │ │ +
1346
│ │ │ +
1347 /*
│ │ │ +
1348 * @brief Move constructor with allocator argument.
│ │ │ +
1349 * @param __uset Input %unordered_multimap to move.
│ │ │ +
1350 * @param __a An allocator object.
│ │ │ +
1351 */
│ │ │ +
1352 unordered_multimap(unordered_multimap&& __ummap,
│ │ │ +
1353 const allocator_type& __a)
│ │ │ +
1354 noexcept( noexcept(_Hashtable(std::move(__ummap._M_h), __a)) )
│ │ │ +
1355 : _M_h(std::move(__ummap._M_h), __a)
│ │ │ +
1356 { }
│ │ │ +
1357
│ │ │ +
1358 /**
│ │ │ +
1359 * @brief Builds an %unordered_multimap from an initializer_list.
│ │ │ +
1360 * @param __l An initializer_list.
│ │ │ +
1361 * @param __n Minimal initial number of buckets.
│ │ │ +
1362 * @param __hf A hash functor.
│ │ │ +
1363 * @param __eql A key equality functor.
│ │ │ +
1364 * @param __a An allocator object.
│ │ │ +
1365 *
│ │ │ +
1366 * Create an %unordered_multimap consisting of copies of the elements in
│ │ │ +
1367 * the list. This is linear in N (where N is @a __l.size()).
│ │ │ +
1368 */
│ │ │ +
│ │ │ + │ │ │ +
1370 size_type __n = 0,
│ │ │ +
1371 const hasher& __hf = hasher(),
│ │ │ +
1372 const key_equal& __eql = key_equal(),
│ │ │ +
1373 const allocator_type& __a = allocator_type())
│ │ │ +
1374 : _M_h(__l, __n, __hf, __eql, __a)
│ │ │ +
1375 { }
│ │ │ +
│ │ │ +
1376
│ │ │ + │ │ │ +
1378 : unordered_multimap(__n, hasher(), key_equal(), __a)
│ │ │ +
1379 { }
│ │ │ +
1380
│ │ │ +
1381 unordered_multimap(size_type __n, const hasher& __hf,
│ │ │ +
1382 const allocator_type& __a)
│ │ │ +
1383 : unordered_multimap(__n, __hf, key_equal(), __a)
│ │ │ +
1384 { }
│ │ │ +
1385
│ │ │ +
1386 template<typename _InputIterator>
│ │ │ +
1387 unordered_multimap(_InputIterator __first, _InputIterator __last,
│ │ │ +
1388 size_type __n,
│ │ │ +
1389 const allocator_type& __a)
│ │ │ +
1390 : unordered_multimap(__first, __last, __n, hasher(), key_equal(), __a)
│ │ │ +
1391 { }
│ │ │ +
1392
│ │ │ +
1393 template<typename _InputIterator>
│ │ │ +
1394 unordered_multimap(_InputIterator __first, _InputIterator __last,
│ │ │ +
1395 size_type __n, const hasher& __hf,
│ │ │ +
1396 const allocator_type& __a)
│ │ │ +
1397 : unordered_multimap(__first, __last, __n, __hf, key_equal(), __a)
│ │ │ +
1398 { }
│ │ │ +
1399
│ │ │ +
1400 unordered_multimap(initializer_list<value_type> __l,
│ │ │ +
1401 size_type __n,
│ │ │ +
1402 const allocator_type& __a)
│ │ │ +
1403 : unordered_multimap(__l, __n, hasher(), key_equal(), __a)
│ │ │ +
1404 { }
│ │ │ +
1405
│ │ │ +
1406 unordered_multimap(initializer_list<value_type> __l,
│ │ │ +
1407 size_type __n, const hasher& __hf,
│ │ │ +
1408 const allocator_type& __a)
│ │ │ +
1409 : unordered_multimap(__l, __n, __hf, key_equal(), __a)
│ │ │ +
1410 { }
│ │ │ +
1411
│ │ │ +
1412 /// Copy assignment operator.
│ │ │ + │ │ │ + │ │ │ +
1415
│ │ │ +
1416 /// Move assignment operator.
│ │ │ + │ │ │ + │ │ │ +
1419
│ │ │ +
1420 /**
│ │ │ +
1421 * @brief %Unordered_multimap list assignment operator.
│ │ │ +
1422 * @param __l An initializer_list.
│ │ │ +
1423 *
│ │ │ +
1424 * This function fills an %unordered_multimap with copies of the
│ │ │ +
1425 * elements in the initializer list @a __l.
│ │ │ +
1426 *
│ │ │ +
1427 * Note that the assignment completely changes the %unordered_multimap
│ │ │ +
1428 * and that the resulting %unordered_multimap's size is the same as the
│ │ │ +
1429 * number of elements assigned.
│ │ │ +
1430 */
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
1433 {
│ │ │ +
1434 _M_h = __l;
│ │ │ +
1435 return *this;
│ │ │ +
1436 }
│ │ │ +
│ │ │ +
1437
│ │ │ +
1438 /// Returns the allocator object used by the %unordered_multimap.
│ │ │ + │ │ │ +
│ │ │ +
1440 get_allocator() const noexcept
│ │ │ +
1441 { return _M_h.get_allocator(); }
│ │ │ +
│ │ │ +
1442
│ │ │ +
1443 // size and capacity:
│ │ │ +
1444
│ │ │ +
1445 /// Returns true if the %unordered_multimap is empty.
│ │ │ +
1446 _GLIBCXX_NODISCARD bool
│ │ │ +
│ │ │ +
1447 empty() const noexcept
│ │ │ +
1448 { return _M_h.empty(); }
│ │ │ +
│ │ │ +
1449
│ │ │ +
1450 /// Returns the size of the %unordered_multimap.
│ │ │ +
1451 size_type
│ │ │ +
│ │ │ +
1452 size() const noexcept
│ │ │ +
1453 { return _M_h.size(); }
│ │ │ +
│ │ │ +
1454
│ │ │ +
1455 /// Returns the maximum size of the %unordered_multimap.
│ │ │ +
1456 size_type
│ │ │ +
│ │ │ +
1457 max_size() const noexcept
│ │ │ +
1458 { return _M_h.max_size(); }
│ │ │ +
│ │ │ +
1459
│ │ │ +
1460 // iterators.
│ │ │ +
1461
│ │ │ +
1462 /**
│ │ │ +
1463 * Returns a read/write iterator that points to the first element in the
│ │ │ +
1464 * %unordered_multimap.
│ │ │ +
1465 */
│ │ │ +
1466 iterator
│ │ │ +
│ │ │ +
1467 begin() noexcept
│ │ │ +
1468 { return _M_h.begin(); }
│ │ │ +
│ │ │ +
1469
│ │ │ +
1470 ///@{
│ │ │ +
1471 /**
│ │ │ +
1472 * Returns a read-only (constant) iterator that points to the first
│ │ │ +
1473 * element in the %unordered_multimap.
│ │ │ +
1474 */
│ │ │ +
1475 const_iterator
│ │ │ +
│ │ │ +
1476 begin() const noexcept
│ │ │ +
1477 { return _M_h.begin(); }
│ │ │ +
│ │ │ +
1478
│ │ │ +
1479 const_iterator
│ │ │ +
│ │ │ +
1480 cbegin() const noexcept
│ │ │ +
1481 { return _M_h.begin(); }
│ │ │ +
│ │ │ +
1482 ///@}
│ │ │ +
1483
│ │ │ +
1484 /**
│ │ │ +
1485 * Returns a read/write iterator that points one past the last element in
│ │ │ +
1486 * the %unordered_multimap.
│ │ │ +
1487 */
│ │ │ +
1488 iterator
│ │ │ +
│ │ │ +
1489 end() noexcept
│ │ │ +
1490 { return _M_h.end(); }
│ │ │ +
│ │ │ +
1491
│ │ │ +
1492 ///@{
│ │ │ +
1493 /**
│ │ │ +
1494 * Returns a read-only (constant) iterator that points one past the last
│ │ │ +
1495 * element in the %unordered_multimap.
│ │ │ +
1496 */
│ │ │ +
1497 const_iterator
│ │ │ +
│ │ │ +
1498 end() const noexcept
│ │ │ +
1499 { return _M_h.end(); }
│ │ │ +
│ │ │ +
1500
│ │ │ +
1501 const_iterator
│ │ │ +
│ │ │ +
1502 cend() const noexcept
│ │ │ +
1503 { return _M_h.end(); }
│ │ │ +
│ │ │ +
1504 ///@}
│ │ │ +
1505
│ │ │ +
1506 // modifiers.
│ │ │ +
1507
│ │ │ +
1508 /**
│ │ │ +
1509 * @brief Attempts to build and insert a std::pair into the
│ │ │ +
1510 * %unordered_multimap.
│ │ │ +
1511 *
│ │ │ +
1512 * @param __args Arguments used to generate a new pair instance (see
│ │ │ +
1513 * std::piecewise_contruct for passing arguments to each
│ │ │ +
1514 * part of the pair constructor).
│ │ │ +
1515 *
│ │ │ +
1516 * @return An iterator that points to the inserted pair.
│ │ │ +
1517 *
│ │ │ +
1518 * This function attempts to build and insert a (key, value) %pair into
│ │ │ +
1519 * the %unordered_multimap.
│ │ │ +
1520 *
│ │ │ +
1521 * Insertion requires amortized constant time.
│ │ │ +
1522 */
│ │ │ +
1523 template<typename... _Args>
│ │ │ +
1524 iterator
│ │ │ +
│ │ │ +
1525 emplace(_Args&&... __args)
│ │ │ +
1526 { return _M_h.emplace(std::forward<_Args>(__args)...); }
│ │ │ +
│ │ │ +
1527
│ │ │ +
1528 /**
│ │ │ +
1529 * @brief Attempts to build and insert a std::pair into the
│ │ │ +
1530 * %unordered_multimap.
│ │ │ +
1531 *
│ │ │ +
1532 * @param __pos An iterator that serves as a hint as to where the pair
│ │ │ +
1533 * should be inserted.
│ │ │ +
1534 * @param __args Arguments used to generate a new pair instance (see
│ │ │ +
1535 * std::piecewise_contruct for passing arguments to each
│ │ │ +
1536 * part of the pair constructor).
│ │ │ +
1537 * @return An iterator that points to the element with key of the
│ │ │ +
1538 * std::pair built from @a __args.
│ │ │ +
1539 *
│ │ │ +
1540 * Note that the first parameter is only a hint and can potentially
│ │ │ +
1541 * improve the performance of the insertion process. A bad hint would
│ │ │ +
1542 * cause no gains in efficiency.
│ │ │ +
1543 *
│ │ │ +
1544 * See
│ │ │ +
1545 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/associative.html#containers.associative.insert_hints
│ │ │ +
1546 * for more on @a hinting.
│ │ │ +
1547 *
│ │ │ +
1548 * Insertion requires amortized constant time.
│ │ │ +
1549 */
│ │ │ +
1550 template<typename... _Args>
│ │ │ +
1551 iterator
│ │ │ +
│ │ │ +
1552 emplace_hint(const_iterator __pos, _Args&&... __args)
│ │ │ +
1553 { return _M_h.emplace_hint(__pos, std::forward<_Args>(__args)...); }
│ │ │ +
│ │ │ +
1554
│ │ │ +
1555 ///@{
│ │ │ +
1556 /**
│ │ │ +
1557 * @brief Inserts a std::pair into the %unordered_multimap.
│ │ │ +
1558 * @param __x Pair to be inserted (see std::make_pair for easy
│ │ │ +
1559 * creation of pairs).
│ │ │ +
1560 *
│ │ │ +
1561 * @return An iterator that points to the inserted pair.
│ │ │ +
1562 *
│ │ │ +
1563 * Insertion requires amortized constant time.
│ │ │ +
1564 */
│ │ │ +
1565 iterator
│ │ │ +
│ │ │ +
1566 insert(const value_type& __x)
│ │ │ +
1567 { return _M_h.insert(__x); }
│ │ │ +
│ │ │ +
1568
│ │ │ +
1569 iterator
│ │ │ +
│ │ │ + │ │ │ +
1571 { return _M_h.insert(std::move(__x)); }
│ │ │ +
│ │ │ +
1572
│ │ │ +
1573 template<typename _Pair>
│ │ │ +
1574 __enable_if_t<is_constructible<value_type, _Pair&&>::value, iterator>
│ │ │ +
│ │ │ +
1575 insert(_Pair&& __x)
│ │ │ +
1576 { return _M_h.emplace(std::forward<_Pair>(__x)); }
│ │ │ +
│ │ │ +
1577 ///@}
│ │ │ +
1578
│ │ │ +
1579 ///@{
│ │ │ +
1580 /**
│ │ │ +
1581 * @brief Inserts a std::pair into the %unordered_multimap.
│ │ │ +
1582 * @param __hint An iterator that serves as a hint as to where the
│ │ │ +
1583 * pair should be inserted.
│ │ │ +
1584 * @param __x Pair to be inserted (see std::make_pair for easy creation
│ │ │ +
1585 * of pairs).
│ │ │ +
1586 * @return An iterator that points to the element with key of
│ │ │ +
1587 * @a __x (may or may not be the %pair passed in).
│ │ │ +
1588 *
│ │ │ +
1589 * Note that the first parameter is only a hint and can potentially
│ │ │ +
1590 * improve the performance of the insertion process. A bad hint would
│ │ │ +
1591 * cause no gains in efficiency.
│ │ │ +
1592 *
│ │ │ +
1593 * See
│ │ │ +
1594 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/associative.html#containers.associative.insert_hints
│ │ │ +
1595 * for more on @a hinting.
│ │ │ +
1596 *
│ │ │ +
1597 * Insertion requires amortized constant time.
│ │ │ +
1598 */
│ │ │ +
1599 iterator
│ │ │ +
│ │ │ + │ │ │ +
1601 { return _M_h.insert(__hint, __x); }
│ │ │ +
│ │ │ +
1602
│ │ │ +
1603 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ +
1604 // 2354. Unnecessary copying when inserting into maps with braced-init
│ │ │ +
1605 iterator
│ │ │ +
│ │ │ + │ │ │ +
1607 { return _M_h.insert(__hint, std::move(__x)); }
│ │ │ +
│ │ │ +
1608
│ │ │ +
1609 template<typename _Pair>
│ │ │ +
1610 __enable_if_t<is_constructible<value_type, _Pair&&>::value, iterator>
│ │ │ +
│ │ │ +
1611 insert(const_iterator __hint, _Pair&& __x)
│ │ │ +
1612 { return _M_h.emplace_hint(__hint, std::forward<_Pair>(__x)); }
│ │ │ +
│ │ │ +
1613 ///@}
│ │ │ +
1614
│ │ │ +
1615 /**
│ │ │ +
1616 * @brief A template function that attempts to insert a range of
│ │ │ +
1617 * elements.
│ │ │ +
1618 * @param __first Iterator pointing to the start of the range to be
│ │ │ +
1619 * inserted.
│ │ │ +
1620 * @param __last Iterator pointing to the end of the range.
│ │ │ +
1621 *
│ │ │ +
1622 * Complexity similar to that of the range constructor.
│ │ │ +
1623 */
│ │ │ +
1624 template<typename _InputIterator>
│ │ │ +
1625 void
│ │ │ +
│ │ │ +
1626 insert(_InputIterator __first, _InputIterator __last)
│ │ │ +
1627 { _M_h.insert(__first, __last); }
│ │ │ +
│ │ │ +
1628
│ │ │ +
1629 /**
│ │ │ +
1630 * @brief Attempts to insert a list of elements into the
│ │ │ +
1631 * %unordered_multimap.
│ │ │ +
1632 * @param __l A std::initializer_list<value_type> of elements
│ │ │ +
1633 * to be inserted.
│ │ │ +
1634 *
│ │ │ +
1635 * Complexity similar to that of the range constructor.
│ │ │ +
1636 */
│ │ │ +
1637 void
│ │ │ +
│ │ │ + │ │ │ +
1639 { _M_h.insert(__l); }
│ │ │ +
│ │ │ +
1640
│ │ │ +
1641#if __cplusplus > 201402L
│ │ │ +
1642 /// Extract a node.
│ │ │ +
1643 node_type
│ │ │ +
│ │ │ + │ │ │ +
1645 {
│ │ │ +
1646 __glibcxx_assert(__pos != end());
│ │ │ +
1647 return _M_h.extract(__pos);
│ │ │ +
1648 }
│ │ │ +
│ │ │ +
1649
│ │ │ +
1650 /// Extract a node.
│ │ │ +
1651 node_type
│ │ │ +
│ │ │ +
1652 extract(const key_type& __key)
│ │ │ +
1653 { return _M_h.extract(__key); }
│ │ │ +
│ │ │ +
1654
│ │ │ +
1655 /// Re-insert an extracted node.
│ │ │ +
1656 iterator
│ │ │ +
│ │ │ +
1657 insert(node_type&& __nh)
│ │ │ +
1658 { return _M_h._M_reinsert_node_multi(cend(), std::move(__nh)); }
│ │ │ +
│ │ │ +
1659
│ │ │ +
1660 /// Re-insert an extracted node.
│ │ │ +
1661 iterator
│ │ │ +
│ │ │ +
1662 insert(const_iterator __hint, node_type&& __nh)
│ │ │ +
1663 { return _M_h._M_reinsert_node_multi(__hint, std::move(__nh)); }
│ │ │ +
│ │ │ +
1664#endif // C++17
│ │ │ +
1665
│ │ │ +
1666 ///@{
│ │ │ +
1667 /**
│ │ │ +
1668 * @brief Erases an element from an %unordered_multimap.
│ │ │ +
1669 * @param __position An iterator pointing to the element to be erased.
│ │ │ +
1670 * @return An iterator pointing to the element immediately following
│ │ │ +
1671 * @a __position prior to the element being erased. If no such
│ │ │ +
1672 * element exists, end() is returned.
│ │ │ +
1673 *
│ │ │ +
1674 * This function erases an element, pointed to by the given iterator,
│ │ │ +
1675 * from an %unordered_multimap.
│ │ │ +
1676 * Note that this function only erases the element, and that if the
│ │ │ +
1677 * element is itself a pointer, the pointed-to memory is not touched in
│ │ │ +
1678 * any way. Managing the pointer is the user's responsibility.
│ │ │ +
1679 */
│ │ │ +
1680 iterator
│ │ │ +
│ │ │ + │ │ │ +
1682 { return _M_h.erase(__position); }
│ │ │ +
│ │ │ +
1683
│ │ │ +
1684 // LWG 2059.
│ │ │ +
1685 iterator
│ │ │ +
│ │ │ +
1686 erase(iterator __position)
│ │ │ +
1687 { return _M_h.erase(__position); }
│ │ │ +
│ │ │ +
1688 ///@}
│ │ │ +
1689
│ │ │ +
1690 /**
│ │ │ +
1691 * @brief Erases elements according to the provided key.
│ │ │ +
1692 * @param __x Key of elements to be erased.
│ │ │ +
1693 * @return The number of elements erased.
│ │ │ +
1694 *
│ │ │ +
1695 * This function erases all the elements located by the given key from
│ │ │ +
1696 * an %unordered_multimap.
│ │ │ +
1697 * Note that this function only erases the element, and that if the
│ │ │ +
1698 * element is itself a pointer, the pointed-to memory is not touched in
│ │ │ +
1699 * any way. Managing the pointer is the user's responsibility.
│ │ │ +
1700 */
│ │ │ +
1701 size_type
│ │ │ +
│ │ │ +
1702 erase(const key_type& __x)
│ │ │ +
1703 { return _M_h.erase(__x); }
│ │ │ +
│ │ │ +
1704
│ │ │ +
1705 /**
│ │ │ +
1706 * @brief Erases a [__first,__last) range of elements from an
│ │ │ +
1707 * %unordered_multimap.
│ │ │ +
1708 * @param __first Iterator pointing to the start of the range to be
│ │ │ +
1709 * erased.
│ │ │ +
1710 * @param __last Iterator pointing to the end of the range to
│ │ │ +
1711 * be erased.
│ │ │ +
1712 * @return The iterator @a __last.
│ │ │ +
1713 *
│ │ │ +
1714 * This function erases a sequence of elements from an
│ │ │ +
1715 * %unordered_multimap.
│ │ │ +
1716 * Note that this function only erases the elements, and that if
│ │ │ +
1717 * the element is itself a pointer, the pointed-to memory is not touched
│ │ │ +
1718 * in any way. Managing the pointer is the user's responsibility.
│ │ │ +
1719 */
│ │ │ +
1720 iterator
│ │ │ +
│ │ │ + │ │ │ +
1722 { return _M_h.erase(__first, __last); }
│ │ │ +
│ │ │ +
1723
│ │ │ +
1724 /**
│ │ │ +
1725 * Erases all elements in an %unordered_multimap.
│ │ │ +
1726 * Note that this function only erases the elements, and that if the
│ │ │ +
1727 * elements themselves are pointers, the pointed-to memory is not touched
│ │ │ +
1728 * in any way. Managing the pointer is the user's responsibility.
│ │ │ +
1729 */
│ │ │ +
1730 void
│ │ │ +
│ │ │ +
1731 clear() noexcept
│ │ │ +
1732 { _M_h.clear(); }
│ │ │ +
│ │ │ +
1733
│ │ │ +
1734 /**
│ │ │ +
1735 * @brief Swaps data with another %unordered_multimap.
│ │ │ +
1736 * @param __x An %unordered_multimap of the same element and allocator
│ │ │ +
1737 * types.
│ │ │ +
1738 *
│ │ │ +
1739 * This exchanges the elements between two %unordered_multimap in
│ │ │ +
1740 * constant time.
│ │ │ +
1741 * Note that the global std::swap() function is specialized such that
│ │ │ +
1742 * std::swap(m1,m2) will feed to this function.
│ │ │ +
1743 */
│ │ │ +
1744 void
│ │ │ +
│ │ │ + │ │ │ +
1746 noexcept( noexcept(_M_h.swap(__x._M_h)) )
│ │ │ +
1747 { _M_h.swap(__x._M_h); }
│ │ │ +
│ │ │ +
1748
│ │ │ +
1749#if __cplusplus > 201402L
│ │ │ +
1750 template<typename, typename, typename>
│ │ │ +
1751 friend class std::_Hash_merge_helper;
│ │ │ +
1752
│ │ │ +
1753 template<typename _H2, typename _P2>
│ │ │ +
1754 void
│ │ │ + │ │ │ +
1756 {
│ │ │ +
1757 using _Merge_helper
│ │ │ +
1758 = _Hash_merge_helper<unordered_multimap, _H2, _P2>;
│ │ │ +
1759 _M_h._M_merge_multi(_Merge_helper::_S_get_table(__source));
│ │ │ +
1760 }
│ │ │ +
1761
│ │ │ +
1762 template<typename _H2, typename _P2>
│ │ │ +
1763 void
│ │ │ +
1764 merge(unordered_multimap<_Key, _Tp, _H2, _P2, _Alloc>&& __source)
│ │ │ +
1765 { merge(__source); }
│ │ │ +
1766
│ │ │ +
1767 template<typename _H2, typename _P2>
│ │ │ +
1768 void
│ │ │ +
1769 merge(unordered_map<_Key, _Tp, _H2, _P2, _Alloc>& __source)
│ │ │ +
1770 {
│ │ │ +
1771 using _Merge_helper
│ │ │ +
1772 = _Hash_merge_helper<unordered_multimap, _H2, _P2>;
│ │ │ +
1773 _M_h._M_merge_multi(_Merge_helper::_S_get_table(__source));
│ │ │ +
1774 }
│ │ │ +
1775
│ │ │ +
1776 template<typename _H2, typename _P2>
│ │ │ +
1777 void
│ │ │ +
1778 merge(unordered_map<_Key, _Tp, _H2, _P2, _Alloc>&& __source)
│ │ │ +
1779 { merge(__source); }
│ │ │ +
1780#endif // C++17
│ │ │ +
1781
│ │ │ +
1782 // observers.
│ │ │ +
1783
│ │ │ +
1784 /// Returns the hash functor object with which the %unordered_multimap
│ │ │ +
1785 /// was constructed.
│ │ │ +
1786 hasher
│ │ │ +
│ │ │ + │ │ │ +
1788 { return _M_h.hash_function(); }
│ │ │ +
│ │ │ +
1789
│ │ │ +
1790 /// Returns the key comparison object with which the %unordered_multimap
│ │ │ +
1791 /// was constructed.
│ │ │ +
1792 key_equal
│ │ │ +
│ │ │ +
1793 key_eq() const
│ │ │ +
1794 { return _M_h.key_eq(); }
│ │ │ +
│ │ │ +
1795
│ │ │ +
1796 // lookup.
│ │ │ +
1797
│ │ │ +
1798 ///@{
│ │ │ +
1799 /**
│ │ │ +
1800 * @brief Tries to locate an element in an %unordered_multimap.
│ │ │ +
1801 * @param __x Key to be located.
│ │ │ +
1802 * @return Iterator pointing to sought-after element, or end() if not
│ │ │ +
1803 * found.
│ │ │ +
1804 *
│ │ │ +
1805 * This function takes a key and tries to locate the element with which
│ │ │ +
1806 * the key matches. If successful the function returns an iterator
│ │ │ +
1807 * pointing to the sought after element. If unsuccessful it returns the
│ │ │ +
1808 * past-the-end ( @c end() ) iterator.
│ │ │ +
1809 */
│ │ │ +
1810 iterator
│ │ │ +
│ │ │ +
1811 find(const key_type& __x)
│ │ │ +
1812 { return _M_h.find(__x); }
│ │ │ +
│ │ │ +
1813
│ │ │ +
1814#if __cplusplus > 201703L
│ │ │ +
1815 template<typename _Kt>
│ │ │ +
1816 auto
│ │ │ +
1817 find(const _Kt& __x) -> decltype(_M_h._M_find_tr(__x))
│ │ │ +
1818 { return _M_h._M_find_tr(__x); }
│ │ │ +
1819#endif
│ │ │ +
1820
│ │ │ +
1821 const_iterator
│ │ │ +
│ │ │ +
1822 find(const key_type& __x) const
│ │ │ +
1823 { return _M_h.find(__x); }
│ │ │ +
│ │ │ +
1824
│ │ │ +
1825#if __cplusplus > 201703L
│ │ │ +
1826 template<typename _Kt>
│ │ │ +
1827 auto
│ │ │ +
1828 find(const _Kt& __x) const -> decltype(_M_h._M_find_tr(__x))
│ │ │ +
1829 { return _M_h._M_find_tr(__x); }
│ │ │ +
1830#endif
│ │ │ +
1831 ///@}
│ │ │ +
1832
│ │ │ +
1833 ///@{
│ │ │ +
1834 /**
│ │ │ +
1835 * @brief Finds the number of elements.
│ │ │ +
1836 * @param __x Key to count.
│ │ │ +
1837 * @return Number of elements with specified key.
│ │ │ +
1838 */
│ │ │ +
1839 size_type
│ │ │ +
│ │ │ +
1840 count(const key_type& __x) const
│ │ │ +
1841 { return _M_h.count(__x); }
│ │ │ +
│ │ │ +
1842
│ │ │ +
1843#if __cplusplus > 201703L
│ │ │ +
1844 template<typename _Kt>
│ │ │ +
1845 auto
│ │ │ +
1846 count(const _Kt& __x) const -> decltype(_M_h._M_count_tr(__x))
│ │ │ +
1847 { return _M_h._M_count_tr(__x); }
│ │ │ +
1848#endif
│ │ │ +
1849 ///@}
│ │ │ +
1850
│ │ │ +
1851#if __cplusplus > 201703L
│ │ │ +
1852 ///@{
│ │ │ +
1853 /**
│ │ │ +
1854 * @brief Finds whether an element with the given key exists.
│ │ │ +
1855 * @param __x Key of elements to be located.
│ │ │ +
1856 * @return True if there is any element with the specified key.
│ │ │ +
1857 */
│ │ │ +
1858 bool
│ │ │ +
1859 contains(const key_type& __x) const
│ │ │ +
1860 { return _M_h.find(__x) != _M_h.end(); }
│ │ │ +
1861
│ │ │ +
1862 template<typename _Kt>
│ │ │ +
1863 auto
│ │ │ +
1864 contains(const _Kt& __x) const
│ │ │ +
1865 -> decltype(_M_h._M_find_tr(__x), void(), true)
│ │ │ +
1866 { return _M_h._M_find_tr(__x) != _M_h.end(); }
│ │ │ +
1867 ///@}
│ │ │ +
1868#endif
│ │ │ +
1869
│ │ │ +
1870 ///@{
│ │ │ +
1871 /**
│ │ │ +
1872 * @brief Finds a subsequence matching given key.
│ │ │ +
1873 * @param __x Key to be located.
│ │ │ +
1874 * @return Pair of iterators that possibly points to the subsequence
│ │ │ +
1875 * matching given key.
│ │ │ +
1876 */
│ │ │ +
1877 std::pair<iterator, iterator>
│ │ │ +
│ │ │ + │ │ │ +
1879 { return _M_h.equal_range(__x); }
│ │ │ +
│ │ │ +
1880
│ │ │ +
1881#if __cplusplus > 201703L
│ │ │ +
1882 template<typename _Kt>
│ │ │ +
1883 auto
│ │ │ +
1884 equal_range(const _Kt& __x)
│ │ │ +
1885 -> decltype(_M_h._M_equal_range_tr(__x))
│ │ │ +
1886 { return _M_h._M_equal_range_tr(__x); }
│ │ │ +
1887#endif
│ │ │ +
1888
│ │ │ + │ │ │ +
│ │ │ +
1890 equal_range(const key_type& __x) const
│ │ │ +
1891 { return _M_h.equal_range(__x); }
│ │ │ +
│ │ │ +
1892
│ │ │ +
1893#if __cplusplus > 201703L
│ │ │ +
1894 template<typename _Kt>
│ │ │ +
1895 auto
│ │ │ +
1896 equal_range(const _Kt& __x) const
│ │ │ +
1897 -> decltype(_M_h._M_equal_range_tr(__x))
│ │ │ +
1898 { return _M_h._M_equal_range_tr(__x); }
│ │ │ +
1899#endif
│ │ │ +
1900 ///@}
│ │ │ +
1901
│ │ │ +
1902 // bucket interface.
│ │ │ +
1903
│ │ │ +
1904 /// Returns the number of buckets of the %unordered_multimap.
│ │ │ +
1905 size_type
│ │ │ +
│ │ │ +
1906 bucket_count() const noexcept
│ │ │ +
1907 { return _M_h.bucket_count(); }
│ │ │ +
│ │ │ +
1908
│ │ │ +
1909 /// Returns the maximum number of buckets of the %unordered_multimap.
│ │ │ +
1910 size_type
│ │ │ +
│ │ │ +
1911 max_bucket_count() const noexcept
│ │ │ +
1912 { return _M_h.max_bucket_count(); }
│ │ │ +
│ │ │ +
1913
│ │ │ +
1914 /*
│ │ │ +
1915 * @brief Returns the number of elements in a given bucket.
│ │ │ +
1916 * @param __n A bucket index.
│ │ │ +
1917 * @return The number of elements in the bucket.
│ │ │ +
1918 */
│ │ │ +
1919 size_type
│ │ │ +
1920 bucket_size(size_type __n) const
│ │ │ +
1921 { return _M_h.bucket_size(__n); }
│ │ │ +
1922
│ │ │ +
1923 /*
│ │ │ +
1924 * @brief Returns the bucket index of a given element.
│ │ │ +
1925 * @param __key A key instance.
│ │ │ +
1926 * @return The key bucket index.
│ │ │ +
1927 */
│ │ │ +
1928 size_type
│ │ │ +
1929 bucket(const key_type& __key) const
│ │ │ +
1930 { return _M_h.bucket(__key); }
│ │ │ +
1931
│ │ │ +
1932 /**
│ │ │ +
1933 * @brief Returns a read/write iterator pointing to the first bucket
│ │ │ +
1934 * element.
│ │ │ +
1935 * @param __n The bucket index.
│ │ │ +
1936 * @return A read/write local iterator.
│ │ │ +
1937 */
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
1940 { return _M_h.begin(__n); }
│ │ │ +
│ │ │ +
1941
│ │ │ +
1942 ///@{
│ │ │ +
1943 /**
│ │ │ +
1944 * @brief Returns a read-only (constant) iterator pointing to the first
│ │ │ +
1945 * bucket element.
│ │ │ +
1946 * @param __n The bucket index.
│ │ │ +
1947 * @return A read-only local iterator.
│ │ │ +
1948 */
│ │ │ + │ │ │ +
│ │ │ +
1950 begin(size_type __n) const
│ │ │ +
1951 { return _M_h.begin(__n); }
│ │ │ +
│ │ │ +
1952
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
1955 { return _M_h.cbegin(__n); }
│ │ │ +
│ │ │ +
1956 ///@}
│ │ │ +
1957
│ │ │ +
1958 /**
│ │ │ +
1959 * @brief Returns a read/write iterator pointing to one past the last
│ │ │ +
1960 * bucket elements.
│ │ │ +
1961 * @param __n The bucket index.
│ │ │ +
1962 * @return A read/write local iterator.
│ │ │ +
1963 */
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
1966 { return _M_h.end(__n); }
│ │ │ +
│ │ │ +
1967
│ │ │ +
1968 ///@{
│ │ │ +
1969 /**
│ │ │ +
1970 * @brief Returns a read-only (constant) iterator pointing to one past
│ │ │ +
1971 * the last bucket elements.
│ │ │ +
1972 * @param __n The bucket index.
│ │ │ +
1973 * @return A read-only local iterator.
│ │ │ +
1974 */
│ │ │ + │ │ │ +
│ │ │ +
1976 end(size_type __n) const
│ │ │ +
1977 { return _M_h.end(__n); }
│ │ │ +
│ │ │ +
1978
│ │ │ + │ │ │ +
│ │ │ +
1980 cend(size_type __n) const
│ │ │ +
1981 { return _M_h.cend(__n); }
│ │ │ +
│ │ │ +
1982 ///@}
│ │ │ +
1983
│ │ │ +
1984 // hash policy.
│ │ │ +
1985
│ │ │ +
1986 /// Returns the average number of elements per bucket.
│ │ │ +
1987 float
│ │ │ +
│ │ │ +
1988 load_factor() const noexcept
│ │ │ +
1989 { return _M_h.load_factor(); }
│ │ │ +
│ │ │ +
1990
│ │ │ +
1991 /// Returns a positive number that the %unordered_multimap tries to keep
│ │ │ +
1992 /// the load factor less than or equal to.
│ │ │ +
1993 float
│ │ │ +
│ │ │ +
1994 max_load_factor() const noexcept
│ │ │ +
1995 { return _M_h.max_load_factor(); }
│ │ │ +
│ │ │ +
1996
│ │ │ +
1997 /**
│ │ │ +
1998 * @brief Change the %unordered_multimap maximum load factor.
│ │ │ +
1999 * @param __z The new maximum load factor.
│ │ │ +
2000 */
│ │ │ +
2001 void
│ │ │ +
│ │ │ + │ │ │ +
2003 { _M_h.max_load_factor(__z); }
│ │ │ +
│ │ │ +
2004
│ │ │ +
2005 /**
│ │ │ +
2006 * @brief May rehash the %unordered_multimap.
│ │ │ +
2007 * @param __n The new number of buckets.
│ │ │ +
2008 *
│ │ │ +
2009 * Rehash will occur only if the new number of buckets respect the
│ │ │ +
2010 * %unordered_multimap maximum load factor.
│ │ │ +
2011 */
│ │ │ +
2012 void
│ │ │ +
│ │ │ + │ │ │ +
2014 { _M_h.rehash(__n); }
│ │ │ +
│ │ │ +
2015
│ │ │ +
2016 /**
│ │ │ +
2017 * @brief Prepare the %unordered_multimap for a specified number of
│ │ │ +
2018 * elements.
│ │ │ +
2019 * @param __n Number of elements required.
│ │ │ +
2020 *
│ │ │ +
2021 * Same as rehash(ceil(n / max_load_factor())).
│ │ │ +
2022 */
│ │ │ +
2023 void
│ │ │ +
│ │ │ + │ │ │ +
2025 { _M_h.reserve(__n); }
│ │ │ +
│ │ │ +
2026
│ │ │ +
2027 template<typename _Key1, typename _Tp1, typename _Hash1, typename _Pred1,
│ │ │ +
2028 typename _Alloc1>
│ │ │ +
2029 friend bool
│ │ │ +
2030 operator==(const unordered_multimap<_Key1, _Tp1,
│ │ │ +
2031 _Hash1, _Pred1, _Alloc1>&,
│ │ │ +
2032 const unordered_multimap<_Key1, _Tp1,
│ │ │ +
2033 _Hash1, _Pred1, _Alloc1>&);
│ │ │ +
2034 };
│ │ │ +
│ │ │ +
2035
│ │ │ +
2036#if __cpp_deduction_guides >= 201606
│ │ │ +
2037
│ │ │ +
2038 template<typename _InputIterator,
│ │ │ +
2039 typename _Hash = hash<__iter_key_t<_InputIterator>>,
│ │ │ +
2040 typename _Pred = equal_to<__iter_key_t<_InputIterator>>,
│ │ │ +
2041 typename _Allocator = allocator<__iter_to_alloc_t<_InputIterator>>,
│ │ │ +
2042 typename = _RequireInputIter<_InputIterator>,
│ │ │ +
2043 typename = _RequireNotAllocatorOrIntegral<_Hash>,
│ │ │ +
2044 typename = _RequireNotAllocator<_Pred>,
│ │ │ +
2045 typename = _RequireAllocator<_Allocator>>
│ │ │ +
2046 unordered_multimap(_InputIterator, _InputIterator,
│ │ │ +
2047 unordered_multimap<int, int>::size_type = {},
│ │ │ +
2048 _Hash = _Hash(), _Pred = _Pred(),
│ │ │ +
2049 _Allocator = _Allocator())
│ │ │ +
2050 -> unordered_multimap<__iter_key_t<_InputIterator>,
│ │ │ +
2051 __iter_val_t<_InputIterator>, _Hash, _Pred,
│ │ │ +
2052 _Allocator>;
│ │ │ +
2053
│ │ │ +
2054 template<typename _Key, typename _Tp, typename _Hash = hash<_Key>,
│ │ │ +
2055 typename _Pred = equal_to<_Key>,
│ │ │ +
2056 typename _Allocator = allocator<pair<const _Key, _Tp>>,
│ │ │ +
2057 typename = _RequireNotAllocatorOrIntegral<_Hash>,
│ │ │ +
2058 typename = _RequireNotAllocator<_Pred>,
│ │ │ +
2059 typename = _RequireAllocator<_Allocator>>
│ │ │ + │ │ │ + │ │ │ +
2062 _Hash = _Hash(), _Pred = _Pred(),
│ │ │ +
2063 _Allocator = _Allocator())
│ │ │ + │ │ │ +
2065
│ │ │ +
2066 template<typename _InputIterator, typename _Allocator,
│ │ │ +
2067 typename = _RequireInputIter<_InputIterator>,
│ │ │ +
2068 typename = _RequireAllocator<_Allocator>>
│ │ │ +
2069 unordered_multimap(_InputIterator, _InputIterator,
│ │ │ + │ │ │ + │ │ │ +
2072 __iter_val_t<_InputIterator>,
│ │ │ + │ │ │ + │ │ │ +
2075
│ │ │ +
2076 template<typename _InputIterator, typename _Allocator,
│ │ │ +
2077 typename = _RequireInputIter<_InputIterator>,
│ │ │ +
2078 typename = _RequireAllocator<_Allocator>>
│ │ │ +
2079 unordered_multimap(_InputIterator, _InputIterator, _Allocator)
│ │ │ + │ │ │ +
2081 __iter_val_t<_InputIterator>,
│ │ │ + │ │ │ + │ │ │ +
2084
│ │ │ +
2085 template<typename _InputIterator, typename _Hash, typename _Allocator,
│ │ │ +
2086 typename = _RequireInputIter<_InputIterator>,
│ │ │ +
2087 typename = _RequireNotAllocatorOrIntegral<_Hash>,
│ │ │ +
2088 typename = _RequireAllocator<_Allocator>>
│ │ │ +
2089 unordered_multimap(_InputIterator, _InputIterator,
│ │ │ + │ │ │ +
2091 _Allocator)
│ │ │ + │ │ │ +
2093 __iter_val_t<_InputIterator>, _Hash,
│ │ │ + │ │ │ +
2095
│ │ │ +
2096 template<typename _Key, typename _Tp, typename _Allocator,
│ │ │ +
2097 typename = _RequireAllocator<_Allocator>>
│ │ │ + │ │ │ + │ │ │ +
2100 _Allocator)
│ │ │ + │ │ │ +
2102
│ │ │ +
2103 template<typename _Key, typename _Tp, typename _Allocator,
│ │ │ +
2104 typename = _RequireAllocator<_Allocator>>
│ │ │ + │ │ │ + │ │ │ +
2107
│ │ │ +
2108 template<typename _Key, typename _Tp, typename _Hash, typename _Allocator,
│ │ │ +
2109 typename = _RequireNotAllocatorOrIntegral<_Hash>,
│ │ │ +
2110 typename = _RequireAllocator<_Allocator>>
│ │ │ + │ │ │ + │ │ │ +
2113 _Hash, _Allocator)
│ │ │ + │ │ │ +
2115
│ │ │ +
2116#endif
│ │ │ +
2117
│ │ │ +
2118 template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
│ │ │ +
2119 inline void
│ │ │ + │ │ │ + │ │ │ +
2122 noexcept(noexcept(__x.swap(__y)))
│ │ │ +
2123 { __x.swap(__y); }
│ │ │ +
2124
│ │ │ +
2125 template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
│ │ │ +
2126 inline void
│ │ │ + │ │ │ + │ │ │ +
2129 noexcept(noexcept(__x.swap(__y)))
│ │ │ +
2130 { __x.swap(__y); }
│ │ │ +
2131
│ │ │ +
2132 template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
│ │ │ +
2133 inline bool
│ │ │ + │ │ │ + │ │ │ +
2136 { return __x._M_h._M_equal(__y._M_h); }
│ │ │ +
2137
│ │ │ +
2138#if __cpp_impl_three_way_comparison < 201907L
│ │ │ +
2139 template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
│ │ │ +
2140 inline bool
│ │ │ + │ │ │ + │ │ │ +
2143 { return !(__x == __y); }
│ │ │ +
2144#endif
│ │ │ +
2145
│ │ │ +
2146 template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
│ │ │ +
2147 inline bool
│ │ │ + │ │ │ + │ │ │ +
2150 { return __x._M_h._M_equal(__y._M_h); }
│ │ │ +
2151
│ │ │ +
2152#if __cpp_impl_three_way_comparison < 201907L
│ │ │ +
2153 template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
│ │ │ +
2154 inline bool
│ │ │ + │ │ │ + │ │ │ +
2157 { return !(__x == __y); }
│ │ │ +
2158#endif
│ │ │ +
2159
│ │ │ +
2160_GLIBCXX_END_NAMESPACE_CONTAINER
│ │ │ +
2161
│ │ │ +
2162#if __cplusplus > 201402L
│ │ │ +
2163 // Allow std::unordered_map access to internals of compatible maps.
│ │ │ +
2164 template<typename _Key, typename _Val, typename _Hash1, typename _Eq1,
│ │ │ +
2165 typename _Alloc, typename _Hash2, typename _Eq2>
│ │ │ +
2166 struct _Hash_merge_helper<
│ │ │ +
2167 _GLIBCXX_STD_C::unordered_map<_Key, _Val, _Hash1, _Eq1, _Alloc>,
│ │ │ +
2168 _Hash2, _Eq2>
│ │ │ +
2169 {
│ │ │ +
2170 private:
│ │ │ +
2171 template<typename... _Tp>
│ │ │ +
2172 using unordered_map = _GLIBCXX_STD_C::unordered_map<_Tp...>;
│ │ │ +
2173 template<typename... _Tp>
│ │ │ +
2174 using unordered_multimap = _GLIBCXX_STD_C::unordered_multimap<_Tp...>;
│ │ │ +
2175
│ │ │ +
2176 friend unordered_map<_Key, _Val, _Hash1, _Eq1, _Alloc>;
│ │ │ +
2177
│ │ │ +
2178 static auto&
│ │ │ +
2179 _S_get_table(unordered_map<_Key, _Val, _Hash2, _Eq2, _Alloc>& __map)
│ │ │ +
2180 { return __map._M_h; }
│ │ │ +
2181
│ │ │ +
2182 static auto&
│ │ │ +
2183 _S_get_table(unordered_multimap<_Key, _Val, _Hash2, _Eq2, _Alloc>& __map)
│ │ │ +
2184 { return __map._M_h; }
│ │ │ +
2185 };
│ │ │ +
2186
│ │ │ +
2187 // Allow std::unordered_multimap access to internals of compatible maps.
│ │ │ +
2188 template<typename _Key, typename _Val, typename _Hash1, typename _Eq1,
│ │ │ +
2189 typename _Alloc, typename _Hash2, typename _Eq2>
│ │ │ +
2190 struct _Hash_merge_helper<
│ │ │ +
2191 _GLIBCXX_STD_C::unordered_multimap<_Key, _Val, _Hash1, _Eq1, _Alloc>,
│ │ │ +
2192 _Hash2, _Eq2>
│ │ │ +
2193 {
│ │ │ +
2194 private:
│ │ │ +
2195 template<typename... _Tp>
│ │ │ +
2196 using unordered_map = _GLIBCXX_STD_C::unordered_map<_Tp...>;
│ │ │ +
2197 template<typename... _Tp>
│ │ │ +
2198 using unordered_multimap = _GLIBCXX_STD_C::unordered_multimap<_Tp...>;
│ │ │ +
2199
│ │ │ +
2200 friend unordered_multimap<_Key, _Val, _Hash1, _Eq1, _Alloc>;
│ │ │ +
2201
│ │ │ +
2202 static auto&
│ │ │ +
2203 _S_get_table(unordered_map<_Key, _Val, _Hash2, _Eq2, _Alloc>& __map)
│ │ │ +
2204 { return __map._M_h; }
│ │ │ +
2205
│ │ │ +
2206 static auto&
│ │ │ +
2207 _S_get_table(unordered_multimap<_Key, _Val, _Hash2, _Eq2, _Alloc>& __map)
│ │ │ +
2208 { return __map._M_h; }
│ │ │ +
2209 };
│ │ │ +
2210#endif // C++17
│ │ │ +
2211
│ │ │ +
2212_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ +
2213} // namespace std
│ │ │ +
2214
│ │ │ +
2215#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:428
│ │ │ +
constexpr _Tp && forward(typename std::remove_reference< _Tp >::type &__t) noexcept
Forward an lvalue.
Definition move.h:77
│ │ │
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.
│ │ │ +
initializer_list
│ │ │ +
Primary class template hash.
│ │ │ + │ │ │ +
The standard allocator, as per C++03 [20.4.1].
Definition allocator.h:125
│ │ │ +
One of the comparison functors.
│ │ │ +
Common iterator class.
│ │ │ +
Struct holding two objects of arbitrary type.
Definition stl_pair.h:213
│ │ │ +
_T1 first
The first member.
Definition stl_pair.h:217
│ │ │ +
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.
│ │ │ + │ │ │ +
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.
│ │ │ + │ │ │ +
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.
│ │ │ + │ │ │ +
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.
│ │ │ + │ │ │ +
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.
│ │ │ + │ │ │ +
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.
│ │ │ + │ │ │ + │ │ │ +
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.
│ │ │ +
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.
│ │ │ + │ │ │ + │ │ │ +
const_local_iterator begin(size_type __n) const
Returns a read-only (constant) iterator pointing to the first bucket element.
│ │ │ + │ │ │ +
unordered_multimap(unordered_multimap &&)=default
Move constructor.
│ │ │ +
unordered_multimap(const allocator_type &__a)
Creates an unordered_multimap with no elements.
│ │ │ + │ │ │ + │ │ │ + │ │ │ +
__enable_if_t< is_constructible< value_type, _Pair && >::value, iterator > insert(_Pair &&__x)
Inserts a std::pair into the unordered_multimap.
│ │ │ +
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.
│ │ │ + │ │ │ +
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
│ │ │ + │ │ │ +
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.
│ │ │ + │ │ │ +
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.
│ │ │ +
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.
│ │ │ + │ │ │ +
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.
│ │ │ +
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.
│ │ │ +
unordered_map & operator=(initializer_list< value_type > __l)
Unordered_map list assignment operator.
│ │ │ + │ │ │ +
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.
│ │ │ + │ │ │ +
iterator insert(const_iterator __hint, const value_type &__x)
Attempts to insert a std::pair into the unordered_map.
│ │ │ +
iterator end() noexcept
│ │ │ + │ │ │ +
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.
│ │ │ +
size_type max_size() const noexcept
Returns the maximum size of the unordered_map.
│ │ │ +
const_iterator end() const noexcept
│ │ │ +
unordered_map()=default
Default constructor.
│ │ │ + │ │ │ +
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.
│ │ │ + │ │ │ +
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.
│ │ │ + │ │ │ + │ │ │ + │ │ │ +
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.
│ │ │ + │ │ │ +
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.
│ │ │ + │ │ │ +
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.
│ │ │ +
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.
│ │ │ + │ │ │ + │ │ │ +
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.
│ │ │ + │ │ │ + │ │ │ +
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.
│ │ │ + │ │ │ +
void rehash(size_type __n)
May rehash the unordered_map.
│ │ │ +
const_iterator cbegin() const noexcept
│ │ │
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,13 +1,13 @@ │ │ │ │ libstdc++ │ │ │ │ -valarray_array.tcc │ │ │ │ +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// The template and inlines for the -*- C++ -*- internal _Array helper class. │ │ │ │ +1// unordered_map implementation -*- C++ -*- │ │ │ │ 2 │ │ │ │ -3// Copyright (C) 1997-2021 Free Software Foundation, Inc. │ │ │ │ +3// Copyright (C) 2010-2021 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,232 +21,2903 @@ │ │ │ │ 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 │ │ │ │ +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{valarray} │ │ │ │ +27 * Do not attempt to use it directly. @headername{unordered_map} │ │ │ │ 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 } │ │ │ │ +30#ifndef _UNORDERED_MAP_H │ │ │ │ +31#define _UNORDERED_MAP_H │ │ │ │ +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 _Pred = _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 _Tr = _____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 __umap_hashtable = _Hashtable<_Key, std::pair, │ │ │ │ +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 │ │ │ │ +_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 _Pred = _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 _Tr = _____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 __ummap_hashtable = _Hashtable<_Key, std::pair, │ │ │ │ +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 │ │ │ │ +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 * │ │ │ │ +82 * @tparam _Key Type of key objects. │ │ │ │ +83 * @tparam _Tp Type of mapped objects. │ │ │ │ +84 * @tparam _Hash Hashing function object type, defaults to hash<_Value>. │ │ │ │ +85 * @tparam _Pred Predicate function object type, defaults │ │ │ │ +86 * to equal_to<_Value>. │ │ │ │ +87 * @tparam _Alloc Allocator type, defaults to │ │ │ │ +88 * std::allocator>. │ │ │ │ +89 * │ │ │ │ +90 * Meets the requirements of a container, and │ │ │ │ +91 * unordered associative container │ │ │ │ +92 * │ │ │ │ +93 * The resulting value type of the container is std::pair. │ │ │ │ +94 * │ │ │ │ +95 * Base is _Hashtable, dispatched at compile time via template │ │ │ │ +96 * alias __umap_hashtable. │ │ │ │ +97 */ │ │ │ │ +98 template, │ │ │ │ +100 typename _Pred = _e_q_u_a_l___t_o_<___K_e_y_>, │ │ │ │ +101 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_2 class _u_n_o_r_d_e_r_e_d___m_a_p │ │ │ │ +103 { │ │ │ │ +104 typedef __umap_hashtable<_Key, _Tp, _Hash, _Pred, _Alloc> _Hashtable; │ │ │ │ +105 _Hashtable _M_h; │ │ │ │ 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 } │ │ │ │ +107 public: │ │ │ │ +108 // typedefs: │ │ │ │ +109 ///@{ │ │ │ │ +110 /// Public typedefs. │ │ │ │ +_1_1_1 typedef typename _Hashtable::key_type _k_e_y___t_y_p_e; │ │ │ │ +_1_1_2 typedef typename _Hashtable::value_type _v_a_l_u_e___t_y_p_e; │ │ │ │ +_1_1_3 typedef typename _Hashtable::mapped_type _m_a_p_p_e_d___t_y_p_e; │ │ │ │ +_1_1_4 typedef typename _Hashtable::hasher _h_a_s_h_e_r; │ │ │ │ +_1_1_5 typedef typename _Hashtable::key_equal _k_e_y___e_q_u_a_l; │ │ │ │ +_1_1_6 typedef typename _Hashtable::allocator_type _a_l_l_o_c_a_t_o_r___t_y_p_e; │ │ │ │ +117 ///@} │ │ │ │ +118 │ │ │ │ +119 ///@{ │ │ │ │ +120 /// Iterator-related typedefs. │ │ │ │ +_1_2_1 typedef typename _Hashtable::pointer _p_o_i_n_t_e_r; │ │ │ │ +_1_2_2 typedef typename _Hashtable::const_pointer _c_o_n_s_t___p_o_i_n_t_e_r; │ │ │ │ +_1_2_3 typedef typename _Hashtable::reference _r_e_f_e_r_e_n_c_e; │ │ │ │ +_1_2_4 typedef typename _Hashtable::const_reference _c_o_n_s_t___r_e_f_e_r_e_n_c_e; │ │ │ │ +_1_2_5 typedef typename _Hashtable::iterator _i_t_e_r_a_t_o_r; │ │ │ │ +_1_2_6 typedef typename _Hashtable::const_iterator _c_o_n_s_t___i_t_e_r_a_t_o_r; │ │ │ │ +_1_2_7 typedef typename _Hashtable::local_iterator _l_o_c_a_l___i_t_e_r_a_t_o_r; │ │ │ │ +_1_2_8 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_9 typedef typename _Hashtable::size_type _s_i_z_e___t_y_p_e; │ │ │ │ +_1_3_0 typedef typename _Hashtable::difference_type _d_i_f_f_e_r_e_n_c_e___t_y_p_e; │ │ │ │ +131 ///@} │ │ │ │ +132 │ │ │ │ +133#if __cplusplus > 201402L │ │ │ │ +134 using node_type = typename _Hashtable::node_type; │ │ │ │ +135 using insert_return_type = typename _Hashtable::insert_return_type; │ │ │ │ +136#endif │ │ │ │ 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 │ │ │ │ +138 //construct/destroy/copy │ │ │ │ +139 │ │ │ │ +140 /// Default constructor. │ │ │ │ +_1_4_1 _u_n_o_r_d_e_r_e_d___m_a_p() = default; │ │ │ │ +142 │ │ │ │ +143 /** │ │ │ │ +144 * @brief Default constructor creates no elements. │ │ │ │ +145 * @param __n Minimal initial number of buckets. │ │ │ │ +146 * @param __hf A hash functor. │ │ │ │ +147 * @param __eql A key equality functor. │ │ │ │ +148 * @param __a An allocator object. │ │ │ │ +149 */ │ │ │ │ +150 explicit │ │ │ │ +_1_5_1 _u_n_o_r_d_e_r_e_d___m_a_p(_s_i_z_e___t_y_p_e __n, │ │ │ │ +152 const _h_a_s_h_e_r& __hf = _h_a_s_h_e_r(), │ │ │ │ +153 const _k_e_y___e_q_u_a_l& __eql = _k_e_y___e_q_u_a_l(), │ │ │ │ +154 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()) │ │ │ │ +155 : _M_h(__n, __hf, __eql, __a) │ │ │ │ +156 { } │ │ │ │ +157 │ │ │ │ +158 /** │ │ │ │ +159 * @brief Builds an %unordered_map from a range. │ │ │ │ +160 * @param __first An input iterator. │ │ │ │ +161 * @param __last An input iterator. │ │ │ │ +162 * @param __n Minimal initial number of buckets. │ │ │ │ +163 * @param __hf A hash functor. │ │ │ │ +164 * @param __eql A key equality functor. │ │ │ │ +165 * @param __a An allocator object. │ │ │ │ +166 * │ │ │ │ +167 * Create an %unordered_map consisting of copies of the elements from │ │ │ │ +168 * [__first,__last). This is linear in N (where N is │ │ │ │ +169 * distance(__first,__last)). │ │ │ │ +170 */ │ │ │ │ +171 template │ │ │ │ +_1_7_2 _u_n_o_r_d_e_r_e_d___m_a_p(_InputIterator __first, _InputIterator __last, │ │ │ │ +173 _s_i_z_e___t_y_p_e __n = 0, │ │ │ │ +174 const _h_a_s_h_e_r& __hf = _h_a_s_h_e_r(), │ │ │ │ +175 const _k_e_y___e_q_u_a_l& __eql = _k_e_y___e_q_u_a_l(), │ │ │ │ +176 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()) │ │ │ │ +177 : _M_h(__first, __last, __n, __hf, __eql, __a) │ │ │ │ +178 { } │ │ │ │ +179 │ │ │ │ +180 /// Copy constructor. │ │ │ │ +_1_8_1 _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; │ │ │ │ +182 │ │ │ │ +183 /// Move constructor. │ │ │ │ +_1_8_4 _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; │ │ │ │ +185 │ │ │ │ +186 /** │ │ │ │ +187 * @brief Creates an %unordered_map with no elements. │ │ │ │ +188 * @param __a An allocator object. │ │ │ │ +189 */ │ │ │ │ +190 explicit │ │ │ │ +_1_9_1 _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) │ │ │ │ +192 : _M_h(__a) │ │ │ │ +193 { } │ │ │ │ +194 │ │ │ │ +195 /* │ │ │ │ +196 * @brief Copy constructor with allocator argument. │ │ │ │ +197 * @param __uset Input %unordered_map to copy. │ │ │ │ +198 * @param __a An allocator object. │ │ │ │ +199 */ │ │ │ │ +200 _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& __umap, │ │ │ │ +201 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ +202 : _M_h(__umap._M_h, __a) │ │ │ │ +203 { } │ │ │ │ +204 │ │ │ │ +205 /* │ │ │ │ +206 * @brief Move constructor with allocator argument. │ │ │ │ +207 * @param __uset Input %unordered_map to move. │ │ │ │ +208 * @param __a An allocator object. │ │ │ │ +209 */ │ │ │ │ +210 _u_n_o_r_d_e_r_e_d___m_a_p(unordered_map&& __umap, │ │ │ │ +211 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ +212 noexcept( noexcept(_Hashtable(_s_t_d_:_:_m_o_v_e(__umap._M_h), __a)) ) │ │ │ │ +213 : _M_h(_s_t_d::_m_o_v_e(__umap._M_h), __a) │ │ │ │ +214 { } │ │ │ │ +215 │ │ │ │ +216 /** │ │ │ │ +217 * @brief Builds an %unordered_map from an initializer_list. │ │ │ │ +218 * @param __l An initializer_list. │ │ │ │ +219 * @param __n Minimal initial number of buckets. │ │ │ │ +220 * @param __hf A hash functor. │ │ │ │ +221 * @param __eql A key equality functor. │ │ │ │ +222 * @param __a An allocator object. │ │ │ │ +223 * │ │ │ │ +224 * Create an %unordered_map consisting of copies of the elements in the │ │ │ │ +225 * list. This is linear in N (where N is @a __l.size()). │ │ │ │ +226 */ │ │ │ │ +_2_2_7 _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, │ │ │ │ +228 _s_i_z_e___t_y_p_e __n = 0, │ │ │ │ +229 const _h_a_s_h_e_r& __hf = _h_a_s_h_e_r(), │ │ │ │ +230 const _k_e_y___e_q_u_a_l& __eql = _k_e_y___e_q_u_a_l(), │ │ │ │ +231 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()) │ │ │ │ +232 : _M_h(__l, __n, __hf, __eql, __a) │ │ │ │ +233 { } │ │ │ │ +234 │ │ │ │ +235 _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) │ │ │ │ +236 : _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) │ │ │ │ +237 { } │ │ │ │ +238 │ │ │ │ +239 _u_n_o_r_d_e_r_e_d___m_a_p(size_type __n, const _h_a_s_h_e_r& __hf, │ │ │ │ +240 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ +241 : unordered_map(__n, __hf, _k_e_y___e_q_u_a_l(), __a) │ │ │ │ +242 { } │ │ │ │ 243 │ │ │ │ -244#endif /* _VALARRAY_ARRAY_TCC */ │ │ │ │ +244 template │ │ │ │ +245 _u_n_o_r_d_e_r_e_d___m_a_p(_InputIterator __first, _InputIterator __last, │ │ │ │ +246 _s_i_z_e___t_y_p_e __n, │ │ │ │ +247 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ +248 : _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) │ │ │ │ +249 { } │ │ │ │ +250 │ │ │ │ +251 template │ │ │ │ +252 _u_n_o_r_d_e_r_e_d___m_a_p(_InputIterator __first, _InputIterator __last, │ │ │ │ +253 _s_i_z_e___t_y_p_e __n, const _h_a_s_h_e_r& __hf, │ │ │ │ +254 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ +255 : _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) │ │ │ │ +256 { } │ │ │ │ +257 │ │ │ │ +258 _u_n_o_r_d_e_r_e_d___m_a_p(initializer_list __l, │ │ │ │ +259 _s_i_z_e___t_y_p_e __n, │ │ │ │ +260 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ +261 : _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) │ │ │ │ +262 { } │ │ │ │ +263 │ │ │ │ +264 _u_n_o_r_d_e_r_e_d___m_a_p(initializer_list __l, │ │ │ │ +265 _s_i_z_e___t_y_p_e __n, const _h_a_s_h_e_r& __hf, │ │ │ │ +266 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ +267 : _u_n_o_r_d_e_r_e_d___m_a_p(__l, __n, __hf, _k_e_y___e_q_u_a_l(), __a) │ │ │ │ +268 { } │ │ │ │ +269 │ │ │ │ +270 /// Copy assignment operator. │ │ │ │ +271 _u_n_o_r_d_e_r_e_d___m_a_p& │ │ │ │ +_2_7_2 _o_p_e_r_a_t_o_r_=(const _u_n_o_r_d_e_r_e_d___m_a_p&) = default; │ │ │ │ +273 │ │ │ │ +274 /// Move assignment operator. │ │ │ │ +275 _u_n_o_r_d_e_r_e_d___m_a_p& │ │ │ │ +_2_7_6 _o_p_e_r_a_t_o_r_=(_u_n_o_r_d_e_r_e_d___m_a_p&&) = default; │ │ │ │ +277 │ │ │ │ +278 /** │ │ │ │ +279 * @brief %Unordered_map list assignment operator. │ │ │ │ +280 * @param __l An initializer_list. │ │ │ │ +281 * │ │ │ │ +282 * This function fills an %unordered_map with copies of the elements in │ │ │ │ +283 * the initializer list @a __l. │ │ │ │ +284 * │ │ │ │ +285 * Note that the assignment completely changes the %unordered_map and │ │ │ │ +286 * that the resulting %unordered_map's size is the same as the number │ │ │ │ +287 * of elements assigned. │ │ │ │ +288 */ │ │ │ │ +289 _u_n_o_r_d_e_r_e_d___m_a_p& │ │ │ │ +_2_9_0 _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) │ │ │ │ +291 { │ │ │ │ +292 _M_h = __l; │ │ │ │ +293 return *this; │ │ │ │ +294 } │ │ │ │ +295 │ │ │ │ +296 /// Returns the allocator object used by the %unordered_map. │ │ │ │ +297 _a_l_l_o_c_a_t_o_r___t_y_p_e │ │ │ │ +_2_9_8 _g_e_t___a_l_l_o_c_a_t_o_r() const noexcept │ │ │ │ +299 { return _M_h.get_allocator(); } │ │ │ │ +300 │ │ │ │ +301 // size and capacity: │ │ │ │ +302 │ │ │ │ +303 /// Returns true if the %unordered_map is empty. │ │ │ │ +304 _GLIBCXX_NODISCARD bool │ │ │ │ +_3_0_5 _e_m_p_t_y() const noexcept │ │ │ │ +306 { return _M_h.empty(); } │ │ │ │ +307 │ │ │ │ +308 /// Returns the size of the %unordered_map. │ │ │ │ +309 _s_i_z_e___t_y_p_e │ │ │ │ +_3_1_0 _s_i_z_e() const noexcept │ │ │ │ +311 { return _M_h.size(); } │ │ │ │ +312 │ │ │ │ +313 /// Returns the maximum size of the %unordered_map. │ │ │ │ +314 _s_i_z_e___t_y_p_e │ │ │ │ +_3_1_5 _m_a_x___s_i_z_e() const noexcept │ │ │ │ +316 { return _M_h.max_size(); } │ │ │ │ +317 │ │ │ │ +318 // iterators. │ │ │ │ +319 │ │ │ │ +320 /** │ │ │ │ +321 * Returns a read/write iterator that points to the first element in the │ │ │ │ +322 * %unordered_map. │ │ │ │ +323 */ │ │ │ │ +324 _i_t_e_r_a_t_o_r │ │ │ │ +_3_2_5 _b_e_g_i_n() noexcept │ │ │ │ +326 { return _M_h.begin(); } │ │ │ │ +327 │ │ │ │ +328 ///@{ │ │ │ │ +329 /** │ │ │ │ +330 * Returns a read-only (constant) iterator that points to the first │ │ │ │ +331 * element in the %unordered_map. │ │ │ │ +332 */ │ │ │ │ +333 const_iterator │ │ │ │ +_3_3_4 _b_e_g_i_n() const noexcept │ │ │ │ +335 { return _M_h.begin(); } │ │ │ │ +336 │ │ │ │ +337 const_iterator │ │ │ │ +_3_3_8 _c_b_e_g_i_n() const noexcept │ │ │ │ +339 { return _M_h.begin(); } │ │ │ │ +340 ///@} │ │ │ │ +341 │ │ │ │ +342 /** │ │ │ │ +343 * Returns a read/write iterator that points one past the last element in │ │ │ │ +344 * the %unordered_map. │ │ │ │ +345 */ │ │ │ │ +346 _i_t_e_r_a_t_o_r │ │ │ │ +_3_4_7 _e_n_d() noexcept │ │ │ │ +348 { return _M_h.end(); } │ │ │ │ +349 │ │ │ │ +350 ///@{ │ │ │ │ +351 /** │ │ │ │ +352 * Returns a read-only (constant) iterator that points one past the last │ │ │ │ +353 * element in the %unordered_map. │ │ │ │ +354 */ │ │ │ │ +355 const_iterator │ │ │ │ +_3_5_6 _e_n_d() const noexcept │ │ │ │ +357 { return _M_h.end(); } │ │ │ │ +358 │ │ │ │ +359 const_iterator │ │ │ │ +_3_6_0 _c_e_n_d() const noexcept │ │ │ │ +361 { return _M_h.end(); } │ │ │ │ +362 ///@} │ │ │ │ +363 │ │ │ │ +364 // modifiers. │ │ │ │ +365 │ │ │ │ +366 /** │ │ │ │ +367 * @brief Attempts to build and insert a std::pair into the │ │ │ │ +368 * %unordered_map. │ │ │ │ +369 * │ │ │ │ +370 * @param __args Arguments used to generate a new pair instance (see │ │ │ │ +371 * std::piecewise_contruct for passing arguments to each │ │ │ │ +372 * part of the pair constructor). │ │ │ │ +373 * │ │ │ │ +374 * @return A pair, of which the first element is an iterator that points │ │ │ │ +375 * to the possibly inserted pair, and the second is a bool that │ │ │ │ +376 * is true if the pair was actually inserted. │ │ │ │ +377 * │ │ │ │ +378 * This function attempts to build and insert a (key, value) %pair into │ │ │ │ +379 * the %unordered_map. │ │ │ │ +380 * An %unordered_map relies on unique keys and thus a %pair is only │ │ │ │ +381 * inserted if its first element (the key) is not already present in the │ │ │ │ +382 * %unordered_map. │ │ │ │ +383 * │ │ │ │ +384 * Insertion requires amortized constant time. │ │ │ │ +385 */ │ │ │ │ +386 template │ │ │ │ +387 _s_t_d_:_:_p_a_i_r_<_i_t_e_r_a_t_o_r_,_ _b_o_o_l_> │ │ │ │ +_3_8_8 _e_m_p_l_a_c_e(_Args&&... __args) │ │ │ │ +389 { return _M_h.emplace(_s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(__args)...); } │ │ │ │ +390 │ │ │ │ +391 /** │ │ │ │ +392 * @brief Attempts to build and insert a std::pair into the │ │ │ │ +393 * %unordered_map. │ │ │ │ +394 * │ │ │ │ +395 * @param __pos An iterator that serves as a hint as to where the pair │ │ │ │ +396 * should be inserted. │ │ │ │ +397 * @param __args Arguments used to generate a new pair instance (see │ │ │ │ +398 * std::piecewise_contruct for passing arguments to each │ │ │ │ +399 * part of the pair constructor). │ │ │ │ +400 * @return An iterator that points to the element with key of the │ │ │ │ +401 * std::pair built from @a __args (may or may not be that │ │ │ │ +402 * std::pair). │ │ │ │ +403 * │ │ │ │ +404 * This function is not concerned about whether the insertion took place, │ │ │ │ +405 * and thus does not return a boolean like the single-argument emplace() │ │ │ │ +406 * does. │ │ │ │ +407 * Note that the first parameter is only a hint and can potentially │ │ │ │ +408 * improve the performance of the insertion process. A bad hint would │ │ │ │ +409 * cause no gains in efficiency. │ │ │ │ +410 * │ │ │ │ +411 * See │ │ │ │ +412 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/ │ │ │ │ +associative.html#containers.associative.insert_hints │ │ │ │ +413 * for more on @a hinting. │ │ │ │ +414 * │ │ │ │ +415 * Insertion requires amortized constant time. │ │ │ │ +416 */ │ │ │ │ +417 template │ │ │ │ +418 _i_t_e_r_a_t_o_r │ │ │ │ +_4_1_9 _e_m_p_l_a_c_e___h_i_n_t(_c_o_n_s_t___i_t_e_r_a_t_o_r __pos, _Args&&... __args) │ │ │ │ +420 { return _M_h.emplace_hint(__pos, _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(__args)...); } │ │ │ │ +421 │ │ │ │ +422#if __cplusplus > 201402L │ │ │ │ +423 /// Extract a node. │ │ │ │ +424 node_type │ │ │ │ +_4_2_5 _e_x_t_r_a_c_t(_c_o_n_s_t___i_t_e_r_a_t_o_r __pos) │ │ │ │ +426 { │ │ │ │ +427 __glibcxx_assert(__pos != _e_n_d()); │ │ │ │ +428 return _M_h.extract(__pos); │ │ │ │ +429 } │ │ │ │ +430 │ │ │ │ +431 /// Extract a node. │ │ │ │ +432 node_type │ │ │ │ +_4_3_3 _e_x_t_r_a_c_t(const _k_e_y___t_y_p_e& __key) │ │ │ │ +434 { return _M_h.extract(__key); } │ │ │ │ +435 │ │ │ │ +436 /// Re-insert an extracted node. │ │ │ │ +437 insert_return_type │ │ │ │ +_4_3_8 _i_n_s_e_r_t(node_type&& __nh) │ │ │ │ +439 { return _M_h._M_reinsert_node(_s_t_d_:_:_m_o_v_e(__nh)); } │ │ │ │ +440 │ │ │ │ +441 /// Re-insert an extracted node. │ │ │ │ +442 _i_t_e_r_a_t_o_r │ │ │ │ +_4_4_3 _i_n_s_e_r_t(_c_o_n_s_t___i_t_e_r_a_t_o_r, node_type&& __nh) │ │ │ │ +444 { return _M_h._M_reinsert_node(_s_t_d_:_:_m_o_v_e(__nh)).position; } │ │ │ │ +445 │ │ │ │ +446#define __cpp_lib_unordered_map_try_emplace 201411 │ │ │ │ +447 /** │ │ │ │ +448 * @brief Attempts to build and insert a std::pair into the │ │ │ │ +449 * %unordered_map. │ │ │ │ +450 * │ │ │ │ +451 * @param __k Key to use for finding a possibly existing pair in │ │ │ │ +452 * the unordered_map. │ │ │ │ +453 * @param __args Arguments used to generate the .second for a │ │ │ │ +454 * new pair instance. │ │ │ │ +455 * │ │ │ │ +456 * @return A pair, of which the first element is an iterator that points │ │ │ │ +457 * to the possibly inserted pair, and the second is a bool that │ │ │ │ +458 * is true if the pair was actually inserted. │ │ │ │ +459 * │ │ │ │ +460 * This function attempts to build and insert a (key, value) %pair into │ │ │ │ +461 * the %unordered_map. │ │ │ │ +462 * An %unordered_map relies on unique keys and thus a %pair is only │ │ │ │ +463 * inserted if its first element (the key) is not already present in the │ │ │ │ +464 * %unordered_map. │ │ │ │ +465 * If a %pair is not inserted, this function has no effect. │ │ │ │ +466 * │ │ │ │ +467 * Insertion requires amortized constant time. │ │ │ │ +468 */ │ │ │ │ +469 template │ │ │ │ +470 _p_a_i_r_<_i_t_e_r_a_t_o_r_,_ _b_o_o_l_> │ │ │ │ +_4_7_1 _t_r_y___e_m_p_l_a_c_e(const _k_e_y___t_y_p_e& __k, _Args&&... __args) │ │ │ │ +472 { │ │ │ │ +473 return _M_h.try_emplace(_c_e_n_d(), __k, _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(__args)...); │ │ │ │ +474 } │ │ │ │ +475 │ │ │ │ +476 // move-capable overload │ │ │ │ +477 template │ │ │ │ +478 _p_a_i_r_<_i_t_e_r_a_t_o_r_,_ _b_o_o_l_> │ │ │ │ +479 _t_r_y___e_m_p_l_a_c_e(_k_e_y___t_y_p_e&& __k, _Args&&... __args) │ │ │ │ +480 { │ │ │ │ +481 return _M_h.try_emplace(_c_e_n_d(), _s_t_d_:_:_m_o_v_e(__k), │ │ │ │ +482 _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(__args)...); │ │ │ │ +483 } │ │ │ │ +484 │ │ │ │ +485 /** │ │ │ │ +486 * @brief Attempts to build and insert a std::pair into the │ │ │ │ +487 * %unordered_map. │ │ │ │ +488 * │ │ │ │ +489 * @param __hint An iterator that serves as a hint as to where the pair │ │ │ │ +490 * should be inserted. │ │ │ │ +491 * @param __k Key to use for finding a possibly existing pair in │ │ │ │ +492 * the unordered_map. │ │ │ │ +493 * @param __args Arguments used to generate the .second for a │ │ │ │ +494 * new pair instance. │ │ │ │ +495 * @return An iterator that points to the element with key of the │ │ │ │ +496 * std::pair built from @a __args (may or may not be that │ │ │ │ +497 * std::pair). │ │ │ │ +498 * │ │ │ │ +499 * This function is not concerned about whether the insertion took place, │ │ │ │ +500 * and thus does not return a boolean like the single-argument emplace() │ │ │ │ +501 * does. However, if insertion did not take place, │ │ │ │ +502 * this function has no effect. │ │ │ │ +503 * Note that the first parameter is only a hint and can potentially │ │ │ │ +504 * improve the performance of the insertion process. A bad hint would │ │ │ │ +505 * cause no gains in efficiency. │ │ │ │ +506 * │ │ │ │ +507 * See │ │ │ │ +508 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/ │ │ │ │ +associative.html#containers.associative.insert_hints │ │ │ │ +509 * for more on @a hinting. │ │ │ │ +510 * │ │ │ │ +511 * Insertion requires amortized constant time. │ │ │ │ +512 */ │ │ │ │ +513 template │ │ │ │ +514 iterator │ │ │ │ +_5_1_5 _t_r_y___e_m_p_l_a_c_e(_c_o_n_s_t___i_t_e_r_a_t_o_r __hint, const _k_e_y___t_y_p_e& __k, │ │ │ │ +516 _Args&&... __args) │ │ │ │ +517 { │ │ │ │ +518 return _M_h.try_emplace(__hint, __k, │ │ │ │ +519 _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(__args)...).first; │ │ │ │ +520 } │ │ │ │ +521 │ │ │ │ +522 // move-capable overload │ │ │ │ +523 template │ │ │ │ +524 _i_t_e_r_a_t_o_r │ │ │ │ +525 _t_r_y___e_m_p_l_a_c_e(const_iterator __hint, _k_e_y___t_y_p_e&& __k, _Args&&... __args) │ │ │ │ +526 { │ │ │ │ +527 return _M_h.try_emplace(__hint, _s_t_d_:_:_m_o_v_e(__k), │ │ │ │ +528 _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(__args)...).first; │ │ │ │ +529 } │ │ │ │ +530#endif // C++17 │ │ │ │ +531 │ │ │ │ +532 ///@{ │ │ │ │ +533 /** │ │ │ │ +534 * @brief Attempts to insert a std::pair into the %unordered_map. │ │ │ │ +535 │ │ │ │ +536 * @param __x Pair to be inserted (see std::make_pair for easy │ │ │ │ +537 * creation of pairs). │ │ │ │ +538 * │ │ │ │ +539 * @return A pair, of which the first element is an iterator that │ │ │ │ +540 * points to the possibly inserted pair, and the second is │ │ │ │ +541 * a bool that is true if the pair was actually inserted. │ │ │ │ +542 * │ │ │ │ +543 * This function attempts to insert a (key, value) %pair into the │ │ │ │ +544 * %unordered_map. An %unordered_map relies on unique keys and thus a │ │ │ │ +545 * %pair is only inserted if its first element (the key) is not already │ │ │ │ +546 * present in the %unordered_map. │ │ │ │ +547 * │ │ │ │ +548 * Insertion requires amortized constant time. │ │ │ │ +549 */ │ │ │ │ +550 _s_t_d_:_:_p_a_i_r_<_i_t_e_r_a_t_o_r_,_ _b_o_o_l_> │ │ │ │ +_5_5_1 _i_n_s_e_r_t(const _v_a_l_u_e___t_y_p_e& __x) │ │ │ │ +552 { return _M_h.insert(__x); } │ │ │ │ +553 │ │ │ │ +554 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ +555 // 2354. Unnecessary copying when inserting into maps with braced-init │ │ │ │ +556 _s_t_d_:_:_p_a_i_r_<_i_t_e_r_a_t_o_r_,_ _b_o_o_l_> │ │ │ │ +_5_5_7 _i_n_s_e_r_t(_v_a_l_u_e___t_y_p_e&& __x) │ │ │ │ +558 { return _M_h.insert(_s_t_d_:_:_m_o_v_e(__x)); } │ │ │ │ +559 │ │ │ │ +560 template │ │ │ │ +561 __enable_if_t::value, │ │ │ │ +562 _p_a_i_r_<_i_t_e_r_a_t_o_r_,_ _b_o_o_l_>> │ │ │ │ +_5_6_3 _i_n_s_e_r_t(_Pair&& __x) │ │ │ │ +564 { return _M_h.emplace(_s_t_d_:_:_f_o_r_w_a_r_d_<___P_a_i_r_>(__x)); } │ │ │ │ +565 ///@} │ │ │ │ +566 │ │ │ │ +567 ///@{ │ │ │ │ +568 /** │ │ │ │ +569 * @brief Attempts to insert a std::pair into the %unordered_map. │ │ │ │ +570 * @param __hint An iterator that serves as a hint as to where the │ │ │ │ +571 * pair should be inserted. │ │ │ │ +572 * @param __x Pair to be inserted (see std::make_pair for easy creation │ │ │ │ +573 * of pairs). │ │ │ │ +574 * @return An iterator that points to the element with key of │ │ │ │ +575 * @a __x (may or may not be the %pair passed in). │ │ │ │ +576 * │ │ │ │ +577 * This function is not concerned about whether the insertion took place, │ │ │ │ +578 * and thus does not return a boolean like the single-argument insert() │ │ │ │ +579 * does. Note that the first parameter is only a hint and can │ │ │ │ +580 * potentially improve the performance of the insertion process. A bad │ │ │ │ +581 * hint would cause no gains in efficiency. │ │ │ │ +582 * │ │ │ │ +583 * See │ │ │ │ +584 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/ │ │ │ │ +associative.html#containers.associative.insert_hints │ │ │ │ +585 * for more on @a hinting. │ │ │ │ +586 * │ │ │ │ +587 * Insertion requires amortized constant time. │ │ │ │ +588 */ │ │ │ │ +589 _i_t_e_r_a_t_o_r │ │ │ │ +_5_9_0 _i_n_s_e_r_t(_c_o_n_s_t___i_t_e_r_a_t_o_r __hint, const _v_a_l_u_e___t_y_p_e& __x) │ │ │ │ +591 { return _M_h.insert(__hint, __x); } │ │ │ │ +592 │ │ │ │ +593 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ +594 // 2354. Unnecessary copying when inserting into maps with braced-init │ │ │ │ +595 _i_t_e_r_a_t_o_r │ │ │ │ +_5_9_6 _i_n_s_e_r_t(_c_o_n_s_t___i_t_e_r_a_t_o_r __hint, _v_a_l_u_e___t_y_p_e&& __x) │ │ │ │ +597 { return _M_h.insert(__hint, _s_t_d_:_:_m_o_v_e(__x)); } │ │ │ │ +598 │ │ │ │ +599 template │ │ │ │ +600 __enable_if_t::value, _i_t_e_r_a_t_o_r> │ │ │ │ +_6_0_1 _i_n_s_e_r_t(_c_o_n_s_t___i_t_e_r_a_t_o_r __hint, _Pair&& __x) │ │ │ │ +602 { return _M_h.emplace_hint(__hint, _s_t_d_:_:_f_o_r_w_a_r_d_<___P_a_i_r_>(__x)); } │ │ │ │ +603 ///@} │ │ │ │ +604 │ │ │ │ +605 /** │ │ │ │ +606 * @brief A template function that attempts to insert a range of │ │ │ │ +607 * elements. │ │ │ │ +608 * @param __first Iterator pointing to the start of the range to be │ │ │ │ +609 * inserted. │ │ │ │ +610 * @param __last Iterator pointing to the end of the range. │ │ │ │ +611 * │ │ │ │ +612 * Complexity similar to that of the range constructor. │ │ │ │ +613 */ │ │ │ │ +614 template │ │ │ │ +615 void │ │ │ │ +_6_1_6 _i_n_s_e_r_t(_InputIterator __first, _InputIterator __last) │ │ │ │ +617 { _M_h.insert(__first, __last); } │ │ │ │ +618 │ │ │ │ +619 /** │ │ │ │ +620 * @brief Attempts to insert a list of elements into the %unordered_map. │ │ │ │ +621 * @param __l A std::initializer_list of elements │ │ │ │ +622 * to be inserted. │ │ │ │ +623 * │ │ │ │ +624 * Complexity similar to that of the range constructor. │ │ │ │ +625 */ │ │ │ │ +626 void │ │ │ │ +_6_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) │ │ │ │ +628 { _M_h.insert(__l); } │ │ │ │ +629 │ │ │ │ +630 │ │ │ │ +631#if __cplusplus > 201402L │ │ │ │ +632 /** │ │ │ │ +633 * @brief Attempts to insert a std::pair into the %unordered_map. │ │ │ │ +634 * @param __k Key to use for finding a possibly existing pair in │ │ │ │ +635 * the map. │ │ │ │ +636 * @param __obj Argument used to generate the .second for a pair │ │ │ │ +637 * instance. │ │ │ │ +638 * │ │ │ │ +639 * @return A pair, of which the first element is an iterator that │ │ │ │ +640 * points to the possibly inserted pair, and the second is │ │ │ │ +641 * a bool that is true if the pair was actually inserted. │ │ │ │ +642 * │ │ │ │ +643 * This function attempts to insert a (key, value) %pair into the │ │ │ │ +644 * %unordered_map. An %unordered_map relies on unique keys and thus a │ │ │ │ +645 * %pair is only inserted if its first element (the key) is not already │ │ │ │ +646 * present in the %unordered_map. │ │ │ │ +647 * If the %pair was already in the %unordered_map, the .second of │ │ │ │ +648 * the %pair is assigned from __obj. │ │ │ │ +649 * │ │ │ │ +650 * Insertion requires amortized constant time. │ │ │ │ +651 */ │ │ │ │ +652 template │ │ │ │ +653 _p_a_i_r_<_i_t_e_r_a_t_o_r_,_ _b_o_o_l_> │ │ │ │ +_6_5_4 _i_n_s_e_r_t___o_r___a_s_s_i_g_n(const _k_e_y___t_y_p_e& __k, _Obj&& __obj) │ │ │ │ +655 { │ │ │ │ +656 auto __ret = _M_h.try_emplace(_c_e_n_d(), __k, │ │ │ │ +657 _s_t_d_:_:_f_o_r_w_a_r_d_<___O_b_j_>(__obj)); │ │ │ │ +658 if (!__ret.second) │ │ │ │ +659 __ret.first->second = _s_t_d_:_:_f_o_r_w_a_r_d_<___O_b_j_>(__obj); │ │ │ │ +660 return __ret; │ │ │ │ +661 } │ │ │ │ +662 │ │ │ │ +663 // move-capable overload │ │ │ │ +664 template │ │ │ │ +665 _p_a_i_r_<_i_t_e_r_a_t_o_r_,_ _b_o_o_l_> │ │ │ │ +666 _i_n_s_e_r_t___o_r___a_s_s_i_g_n(_k_e_y___t_y_p_e&& __k, _Obj&& __obj) │ │ │ │ +667 { │ │ │ │ +668 auto __ret = _M_h.try_emplace(_c_e_n_d(), _s_t_d_:_:_m_o_v_e(__k), │ │ │ │ +669 _s_t_d_:_:_f_o_r_w_a_r_d_<___O_b_j_>(__obj)); │ │ │ │ +670 if (!__ret.second) │ │ │ │ +671 __ret._f_i_r_s_t->second = _s_t_d_:_:_f_o_r_w_a_r_d_<___O_b_j_>(__obj); │ │ │ │ +672 return __ret; │ │ │ │ +673 } │ │ │ │ +674 │ │ │ │ +675 /** │ │ │ │ +676 * @brief Attempts to insert a std::pair into the %unordered_map. │ │ │ │ +677 * @param __hint An iterator that serves as a hint as to where the │ │ │ │ +678 * pair should be inserted. │ │ │ │ +679 * @param __k Key to use for finding a possibly existing pair in │ │ │ │ +680 * the unordered_map. │ │ │ │ +681 * @param __obj Argument used to generate the .second for a pair │ │ │ │ +682 * instance. │ │ │ │ +683 * @return An iterator that points to the element with key of │ │ │ │ +684 * @a __x (may or may not be the %pair passed in). │ │ │ │ +685 * │ │ │ │ +686 * This function is not concerned about whether the insertion took place, │ │ │ │ +687 * and thus does not return a boolean like the single-argument insert() │ │ │ │ +688 * does. │ │ │ │ +689 * If the %pair was already in the %unordered map, the .second of │ │ │ │ +690 * the %pair is assigned from __obj. │ │ │ │ +691 * Note that the first parameter is only a hint and can │ │ │ │ +692 * potentially improve the performance of the insertion process. A bad │ │ │ │ +693 * hint would cause no gains in efficiency. │ │ │ │ +694 * │ │ │ │ +695 * See │ │ │ │ +696 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/ │ │ │ │ +associative.html#containers.associative.insert_hints │ │ │ │ +697 * for more on @a hinting. │ │ │ │ +698 * │ │ │ │ +699 * Insertion requires amortized constant time. │ │ │ │ +700 */ │ │ │ │ +701 template │ │ │ │ +702 iterator │ │ │ │ +_7_0_3 _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 __hint, const _k_e_y___t_y_p_e& __k, │ │ │ │ +704 _Obj&& __obj) │ │ │ │ +705 { │ │ │ │ +706 auto __ret = _M_h.try_emplace(__hint, __k, _s_t_d_:_:_f_o_r_w_a_r_d_<___O_b_j_>(__obj)); │ │ │ │ +707 if (!__ret.second) │ │ │ │ +708 __ret.first->second = _s_t_d_:_:_f_o_r_w_a_r_d_<___O_b_j_>(__obj); │ │ │ │ +709 return __ret.first; │ │ │ │ +710 } │ │ │ │ +711 │ │ │ │ +712 // move-capable overload │ │ │ │ +713 template │ │ │ │ +714 _i_t_e_r_a_t_o_r │ │ │ │ +715 _i_n_s_e_r_t___o_r___a_s_s_i_g_n(const_iterator __hint, _k_e_y___t_y_p_e&& __k, _Obj&& __obj) │ │ │ │ +716 { │ │ │ │ +717 auto __ret = _M_h.try_emplace(__hint, _s_t_d_:_:_m_o_v_e(__k), │ │ │ │ +718 _s_t_d_:_:_f_o_r_w_a_r_d_<___O_b_j_>(__obj)); │ │ │ │ +719 if (!__ret.second) │ │ │ │ +720 __ret.first->second = _s_t_d_:_:_f_o_r_w_a_r_d_<___O_b_j_>(__obj); │ │ │ │ +721 return __ret.first; │ │ │ │ +722 } │ │ │ │ +723#endif │ │ │ │ +724 │ │ │ │ +725 ///@{ │ │ │ │ +726 /** │ │ │ │ +727 * @brief Erases an element from an %unordered_map. │ │ │ │ +728 * @param __position An iterator pointing to the element to be erased. │ │ │ │ +729 * @return An iterator pointing to the element immediately following │ │ │ │ +730 * @a __position prior to the element being erased. If no such │ │ │ │ +731 * element exists, end() is returned. │ │ │ │ +732 * │ │ │ │ +733 * This function erases an element, pointed to by the given iterator, │ │ │ │ +734 * from an %unordered_map. │ │ │ │ +735 * Note that this function only erases the element, and that if the │ │ │ │ +736 * element is itself a pointer, the pointed-to memory is not touched in │ │ │ │ +737 * any way. Managing the pointer is the user's responsibility. │ │ │ │ +738 */ │ │ │ │ +739 iterator │ │ │ │ +_7_4_0 _e_r_a_s_e(_c_o_n_s_t___i_t_e_r_a_t_o_r __position) │ │ │ │ +741 { return _M_h.erase(__position); } │ │ │ │ +742 │ │ │ │ +743 // LWG 2059. │ │ │ │ +744 _i_t_e_r_a_t_o_r │ │ │ │ +_7_4_5 _e_r_a_s_e(_i_t_e_r_a_t_o_r __position) │ │ │ │ +746 { return _M_h.erase(__position); } │ │ │ │ +747 ///@} │ │ │ │ +748 │ │ │ │ +749 /** │ │ │ │ +750 * @brief Erases elements according to the provided key. │ │ │ │ +751 * @param __x Key of element to be erased. │ │ │ │ +752 * @return The number of elements erased. │ │ │ │ +753 * │ │ │ │ +754 * This function erases all the elements located by the given key from │ │ │ │ +755 * an %unordered_map. For an %unordered_map the result of this function │ │ │ │ +756 * can only be 0 (not present) or 1 (present). │ │ │ │ +757 * Note that this function only erases the element, and that if the │ │ │ │ +758 * element is itself a pointer, the pointed-to memory is not touched in │ │ │ │ +759 * any way. Managing the pointer is the user's responsibility. │ │ │ │ +760 */ │ │ │ │ +761 _s_i_z_e___t_y_p_e │ │ │ │ +_7_6_2 _e_r_a_s_e(const _k_e_y___t_y_p_e& __x) │ │ │ │ +763 { return _M_h.erase(__x); } │ │ │ │ +764 │ │ │ │ +765 /** │ │ │ │ +766 * @brief Erases a [__first,__last) range of elements from an │ │ │ │ +767 * %unordered_map. │ │ │ │ +768 * @param __first Iterator pointing to the start of the range to be │ │ │ │ +769 * erased. │ │ │ │ +770 * @param __last Iterator pointing to the end of the range to │ │ │ │ +771 * be erased. │ │ │ │ +772 * @return The iterator @a __last. │ │ │ │ +773 * │ │ │ │ +774 * This function erases a sequence of elements from an %unordered_map. │ │ │ │ +775 * Note that this function only erases the elements, and that if │ │ │ │ +776 * the element is itself a pointer, the pointed-to memory is not touched │ │ │ │ +777 * in any way. Managing the pointer is the user's responsibility. │ │ │ │ +778 */ │ │ │ │ +779 _i_t_e_r_a_t_o_r │ │ │ │ +_7_8_0 _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) │ │ │ │ +781 { return _M_h.erase(__first, __last); } │ │ │ │ +782 │ │ │ │ +783 /** │ │ │ │ +784 * Erases all elements in an %unordered_map. │ │ │ │ +785 * Note that this function only erases the elements, and that if the │ │ │ │ +786 * elements themselves are pointers, the pointed-to memory is not touched │ │ │ │ +787 * in any way. Managing the pointer is the user's responsibility. │ │ │ │ +788 */ │ │ │ │ +789 void │ │ │ │ +_7_9_0 _c_l_e_a_r() noexcept │ │ │ │ +791 { _M_h.clear(); } │ │ │ │ +792 │ │ │ │ +793 /** │ │ │ │ +794 * @brief Swaps data with another %unordered_map. │ │ │ │ +795 * @param __x An %unordered_map of the same element and allocator │ │ │ │ +796 * types. │ │ │ │ +797 * │ │ │ │ +798 * This exchanges the elements between two %unordered_map in constant │ │ │ │ +799 * time. │ │ │ │ +800 * Note that the global std::swap() function is specialized such that │ │ │ │ +801 * std::swap(m1,m2) will feed to this function. │ │ │ │ +802 */ │ │ │ │ +803 void │ │ │ │ +_8_0_4 _s_w_a_p(_u_n_o_r_d_e_r_e_d___m_a_p& __x) │ │ │ │ +805 noexcept( noexcept(_M_h.swap(__x._M_h)) ) │ │ │ │ +806 { _M_h.swap(__x._M_h); } │ │ │ │ +807 │ │ │ │ +808#if __cplusplus > 201402L │ │ │ │ +809 template │ │ │ │ +810 friend class std::_Hash_merge_helper; │ │ │ │ +811 │ │ │ │ +812 template │ │ │ │ +813 void │ │ │ │ +814 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_>& __source) │ │ │ │ +815 { │ │ │ │ +816 using _Merge_helper = _Hash_merge_helper; │ │ │ │ +817 _M_h._M_merge_unique(_Merge_helper::_S_get_table(__source)); │ │ │ │ +818 } │ │ │ │ +819 │ │ │ │ +820 template │ │ │ │ +821 void │ │ │ │ +822 merge(unordered_map<_Key, _Tp, _H2, _P2, _Alloc>&& __source) │ │ │ │ +823 { merge(__source); } │ │ │ │ +824 │ │ │ │ +825 template │ │ │ │ +826 void │ │ │ │ +827 merge(unordered_multimap<_Key, _Tp, _H2, _P2, _Alloc>& __source) │ │ │ │ +828 { │ │ │ │ +829 using _Merge_helper = _Hash_merge_helper; │ │ │ │ +830 _M_h._M_merge_unique(_Merge_helper::_S_get_table(__source)); │ │ │ │ +831 } │ │ │ │ +832 │ │ │ │ +833 template │ │ │ │ +834 void │ │ │ │ +835 merge(unordered_multimap<_Key, _Tp, _H2, _P2, _Alloc>&& __source) │ │ │ │ +836 { merge(__source); } │ │ │ │ +837#endif // C++17 │ │ │ │ +838 │ │ │ │ +839 // observers. │ │ │ │ +840 │ │ │ │ +841 /// Returns the hash functor object with which the %unordered_map was │ │ │ │ +842 /// constructed. │ │ │ │ +843 _h_a_s_h_e_r │ │ │ │ +_8_4_4 _h_a_s_h___f_u_n_c_t_i_o_n() const │ │ │ │ +845 { return _M_h.hash_function(); } │ │ │ │ +846 │ │ │ │ +847 /// Returns the key comparison object with which the %unordered_map was │ │ │ │ +848 /// constructed. │ │ │ │ +849 _k_e_y___e_q_u_a_l │ │ │ │ +_8_5_0 _k_e_y___e_q() const │ │ │ │ +851 { return _M_h.key_eq(); } │ │ │ │ +852 │ │ │ │ +853 // lookup. │ │ │ │ +854 │ │ │ │ +855 ///@{ │ │ │ │ +856 /** │ │ │ │ +857 * @brief Tries to locate an element in an %unordered_map. │ │ │ │ +858 * @param __x Key to be located. │ │ │ │ +859 * @return Iterator pointing to sought-after element, or end() if not │ │ │ │ +860 * found. │ │ │ │ +861 * │ │ │ │ +862 * This function takes a key and tries to locate the element with which │ │ │ │ +863 * the key matches. If successful the function returns an iterator │ │ │ │ +864 * pointing to the sought after element. If unsuccessful it returns the │ │ │ │ +865 * past-the-end ( @c end() ) iterator. │ │ │ │ +866 */ │ │ │ │ +867 _i_t_e_r_a_t_o_r │ │ │ │ +_8_6_8 _f_i_n_d(const _k_e_y___t_y_p_e& __x) │ │ │ │ +869 { return _M_h.find(__x); } │ │ │ │ +870 │ │ │ │ +871#if __cplusplus > 201703L │ │ │ │ +872 template │ │ │ │ +873 auto │ │ │ │ +874 _f_i_n_d(const _Kt& __x) -> decltype(_M_h._M_find_tr(__x)) │ │ │ │ +875 { return _M_h._M_find_tr(__x); } │ │ │ │ +876#endif │ │ │ │ +877 │ │ │ │ +878 const_iterator │ │ │ │ +_8_7_9 _f_i_n_d(const _k_e_y___t_y_p_e& __x) const │ │ │ │ +880 { return _M_h.find(__x); } │ │ │ │ +881 │ │ │ │ +882#if __cplusplus > 201703L │ │ │ │ +883 template │ │ │ │ +884 auto │ │ │ │ +885 _f_i_n_d(const _Kt& __x) const -> decltype(_M_h._M_find_tr(__x)) │ │ │ │ +886 { return _M_h._M_find_tr(__x); } │ │ │ │ +887#endif │ │ │ │ +888 ///@} │ │ │ │ +889 │ │ │ │ +890 ///@{ │ │ │ │ +891 /** │ │ │ │ +892 * @brief Finds the number of elements. │ │ │ │ +893 * @param __x Key to count. │ │ │ │ +894 * @return Number of elements with specified key. │ │ │ │ +895 * │ │ │ │ +896 * This function only makes sense for %unordered_multimap; for │ │ │ │ +897 * %unordered_map the result will either be 0 (not present) or 1 │ │ │ │ +898 * (present). │ │ │ │ +899 */ │ │ │ │ +900 size_type │ │ │ │ +_9_0_1 _c_o_u_n_t(const _k_e_y___t_y_p_e& __x) const │ │ │ │ +902 { return _M_h.count(__x); } │ │ │ │ +903 │ │ │ │ +904#if __cplusplus > 201703L │ │ │ │ +905 template │ │ │ │ +906 auto │ │ │ │ +907 _c_o_u_n_t(const _Kt& __x) const -> decltype(_M_h._M_count_tr(__x)) │ │ │ │ +908 { return _M_h._M_count_tr(__x); } │ │ │ │ +909#endif │ │ │ │ +910 ///@} │ │ │ │ +911 │ │ │ │ +912#if __cplusplus > 201703L │ │ │ │ +913 ///@{ │ │ │ │ +914 /** │ │ │ │ +915 * @brief Finds whether an element with the given key exists. │ │ │ │ +916 * @param __x Key of elements to be located. │ │ │ │ +917 * @return True if there is any element with the specified key. │ │ │ │ +918 */ │ │ │ │ +919 bool │ │ │ │ +920 contains(const _k_e_y___t_y_p_e& __x) const │ │ │ │ +921 { return _M_h.find(__x) != _M_h.end(); } │ │ │ │ +922 │ │ │ │ +923 template │ │ │ │ +924 auto │ │ │ │ +925 contains(const _Kt& __x) const │ │ │ │ +926 -> decltype(_M_h._M_find_tr(__x), void(), true) │ │ │ │ +927 { return _M_h._M_find_tr(__x) != _M_h.end(); } │ │ │ │ +928 ///@} │ │ │ │ +929#endif │ │ │ │ +930 │ │ │ │ +931 ///@{ │ │ │ │ +932 /** │ │ │ │ +933 * @brief Finds a subsequence matching given key. │ │ │ │ +934 * @param __x Key to be located. │ │ │ │ +935 * @return Pair of iterators that possibly points to the subsequence │ │ │ │ +936 * matching given key. │ │ │ │ +937 * │ │ │ │ +938 * This function probably only makes sense for %unordered_multimap. │ │ │ │ +939 */ │ │ │ │ +940 std::pair │ │ │ │ +_9_4_1 _e_q_u_a_l___r_a_n_g_e(const _k_e_y___t_y_p_e& __x) │ │ │ │ +942 { return _M_h.equal_range(__x); } │ │ │ │ +943 │ │ │ │ +944#if __cplusplus > 201703L │ │ │ │ +945 template │ │ │ │ +946 auto │ │ │ │ +947 _e_q_u_a_l___r_a_n_g_e(const _Kt& __x) │ │ │ │ +948 -> decltype(_M_h._M_equal_range_tr(__x)) │ │ │ │ +949 { return _M_h._M_equal_range_tr(__x); } │ │ │ │ +950#endif │ │ │ │ +951 │ │ │ │ +952 _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_3 _e_q_u_a_l___r_a_n_g_e(const _k_e_y___t_y_p_e& __x) const │ │ │ │ +954 { return _M_h.equal_range(__x); } │ │ │ │ +955 │ │ │ │ +956#if __cplusplus > 201703L │ │ │ │ +957 template │ │ │ │ +958 auto │ │ │ │ +959 _e_q_u_a_l___r_a_n_g_e(const _Kt& __x) const │ │ │ │ +960 -> decltype(_M_h._M_equal_range_tr(__x)) │ │ │ │ +961 { return _M_h._M_equal_range_tr(__x); } │ │ │ │ +962#endif │ │ │ │ +963 ///@} │ │ │ │ +964 │ │ │ │ +965 ///@{ │ │ │ │ +966 /** │ │ │ │ +967 * @brief Subscript ( @c [] ) access to %unordered_map data. │ │ │ │ +968 * @param __k The key for which data should be retrieved. │ │ │ │ +969 * @return A reference to the data of the (key,data) %pair. │ │ │ │ +970 * │ │ │ │ +971 * Allows for easy lookup with the subscript ( @c [] )operator. Returns │ │ │ │ +972 * data associated with the key specified in subscript. If the key does │ │ │ │ +973 * not exist, a pair with that key is created using default values, which │ │ │ │ +974 * is then returned. │ │ │ │ +975 * │ │ │ │ +976 * Lookup requires constant time. │ │ │ │ +977 */ │ │ │ │ +978 _m_a_p_p_e_d___t_y_p_e& │ │ │ │ +_9_7_9 _o_p_e_r_a_t_o_r_[_](const _k_e_y___t_y_p_e& __k) │ │ │ │ +980 { return _M_h[__k]; } │ │ │ │ +981 │ │ │ │ +982 _m_a_p_p_e_d___t_y_p_e& │ │ │ │ +_9_8_3 _o_p_e_r_a_t_o_r_[_](_k_e_y___t_y_p_e&& __k) │ │ │ │ +984 { return _M_h[_s_t_d_:_:_m_o_v_e(__k)]; } │ │ │ │ +985 ///@} │ │ │ │ +986 │ │ │ │ +987 ///@{ │ │ │ │ +988 /** │ │ │ │ +989 * @brief Access to %unordered_map data. │ │ │ │ +990 * @param __k The key for which data should be retrieved. │ │ │ │ +991 * @return A reference to the data whose key is equal to @a __k, if │ │ │ │ +992 * such a data is present in the %unordered_map. │ │ │ │ +993 * @throw std::out_of_range If no such data is present. │ │ │ │ +994 */ │ │ │ │ +995 _m_a_p_p_e_d___t_y_p_e& │ │ │ │ +_9_9_6 _a_t(const _k_e_y___t_y_p_e& __k) │ │ │ │ +997 { return _M_h.at(__k); } │ │ │ │ +998 │ │ │ │ +999 const _m_a_p_p_e_d___t_y_p_e& │ │ │ │ +_1_0_0_0 _a_t(const _k_e_y___t_y_p_e& __k) const │ │ │ │ +1001 { return _M_h.at(__k); } │ │ │ │ +1002 ///@} │ │ │ │ +1003 │ │ │ │ +1004 // bucket interface. │ │ │ │ +1005 │ │ │ │ +1006 /// Returns the number of buckets of the %unordered_map. │ │ │ │ +1007 _s_i_z_e___t_y_p_e │ │ │ │ +_1_0_0_8 _b_u_c_k_e_t___c_o_u_n_t() const noexcept │ │ │ │ +1009 { return _M_h.bucket_count(); } │ │ │ │ +1010 │ │ │ │ +1011 /// Returns the maximum number of buckets of the %unordered_map. │ │ │ │ +1012 _s_i_z_e___t_y_p_e │ │ │ │ +_1_0_1_3 _m_a_x___b_u_c_k_e_t___c_o_u_n_t() const noexcept │ │ │ │ +1014 { return _M_h.max_bucket_count(); } │ │ │ │ +1015 │ │ │ │ +1016 /* │ │ │ │ +1017 * @brief Returns the number of elements in a given bucket. │ │ │ │ +1018 * @param __n A bucket index. │ │ │ │ +1019 * @return The number of elements in the bucket. │ │ │ │ +1020 */ │ │ │ │ +1021 _s_i_z_e___t_y_p_e │ │ │ │ +1022 bucket_size(_s_i_z_e___t_y_p_e __n) const │ │ │ │ +1023 { return _M_h.bucket_size(__n); } │ │ │ │ +1024 │ │ │ │ +1025 /* │ │ │ │ +1026 * @brief Returns the bucket index of a given element. │ │ │ │ +1027 * @param __key A key instance. │ │ │ │ +1028 * @return The key bucket index. │ │ │ │ +1029 */ │ │ │ │ +1030 size_type │ │ │ │ +1031 bucket(const _k_e_y___t_y_p_e& __key) const │ │ │ │ +1032 { return _M_h.bucket(__key); } │ │ │ │ +1033 │ │ │ │ +1034 /** │ │ │ │ +1035 * @brief Returns a read/write iterator pointing to the first bucket │ │ │ │ +1036 * element. │ │ │ │ +1037 * @param __n The bucket index. │ │ │ │ +1038 * @return A read/write local iterator. │ │ │ │ +1039 */ │ │ │ │ +1040 _l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ +_1_0_4_1 _b_e_g_i_n(_s_i_z_e___t_y_p_e __n) │ │ │ │ +1042 { return _M_h.begin(__n); } │ │ │ │ +1043 │ │ │ │ +1044 ///@{ │ │ │ │ +1045 /** │ │ │ │ +1046 * @brief Returns a read-only (constant) iterator pointing to the first │ │ │ │ +1047 * bucket element. │ │ │ │ +1048 * @param __n The bucket index. │ │ │ │ +1049 * @return A read-only local iterator. │ │ │ │ +1050 */ │ │ │ │ +1051 _c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ +_1_0_5_2 _b_e_g_i_n(_s_i_z_e___t_y_p_e __n) const │ │ │ │ +1053 { return _M_h.begin(__n); } │ │ │ │ +1054 │ │ │ │ +1055 _c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ +_1_0_5_6 _c_b_e_g_i_n(_s_i_z_e___t_y_p_e __n) const │ │ │ │ +1057 { return _M_h.cbegin(__n); } │ │ │ │ +1058 ///@} │ │ │ │ +1059 │ │ │ │ +1060 /** │ │ │ │ +1061 * @brief Returns a read/write iterator pointing to one past the last │ │ │ │ +1062 * bucket elements. │ │ │ │ +1063 * @param __n The bucket index. │ │ │ │ +1064 * @return A read/write local iterator. │ │ │ │ +1065 */ │ │ │ │ +1066 _l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ +_1_0_6_7 _e_n_d(_s_i_z_e___t_y_p_e __n) │ │ │ │ +1068 { return _M_h.end(__n); } │ │ │ │ +1069 │ │ │ │ +1070 ///@{ │ │ │ │ +1071 /** │ │ │ │ +1072 * @brief Returns a read-only (constant) iterator pointing to one past │ │ │ │ +1073 * the last bucket elements. │ │ │ │ +1074 * @param __n The bucket index. │ │ │ │ +1075 * @return A read-only local iterator. │ │ │ │ +1076 */ │ │ │ │ +1077 _c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ +_1_0_7_8 _e_n_d(_s_i_z_e___t_y_p_e __n) const │ │ │ │ +1079 { return _M_h.end(__n); } │ │ │ │ +1080 │ │ │ │ +1081 _c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ +_1_0_8_2 _c_e_n_d(_s_i_z_e___t_y_p_e __n) const │ │ │ │ +1083 { return _M_h.cend(__n); } │ │ │ │ +1084 ///@} │ │ │ │ +1085 │ │ │ │ +1086 // hash policy. │ │ │ │ +1087 │ │ │ │ +1088 /// Returns the average number of elements per bucket. │ │ │ │ +1089 float │ │ │ │ +_1_0_9_0 _l_o_a_d___f_a_c_t_o_r() const noexcept │ │ │ │ +1091 { return _M_h.load_factor(); } │ │ │ │ +1092 │ │ │ │ +1093 /// Returns a positive number that the %unordered_map tries to keep the │ │ │ │ +1094 /// load factor less than or equal to. │ │ │ │ +1095 float │ │ │ │ +_1_0_9_6 _m_a_x___l_o_a_d___f_a_c_t_o_r() const noexcept │ │ │ │ +1097 { return _M_h.max_load_factor(); } │ │ │ │ +1098 │ │ │ │ +1099 /** │ │ │ │ +1100 * @brief Change the %unordered_map maximum load factor. │ │ │ │ +1101 * @param __z The new maximum load factor. │ │ │ │ +1102 */ │ │ │ │ +1103 void │ │ │ │ +_1_1_0_4 _m_a_x___l_o_a_d___f_a_c_t_o_r(float __z) │ │ │ │ +1105 { _M_h.max_load_factor(__z); } │ │ │ │ +1106 │ │ │ │ +1107 /** │ │ │ │ +1108 * @brief May rehash the %unordered_map. │ │ │ │ +1109 * @param __n The new number of buckets. │ │ │ │ +1110 * │ │ │ │ +1111 * Rehash will occur only if the new number of buckets respect the │ │ │ │ +1112 * %unordered_map maximum load factor. │ │ │ │ +1113 */ │ │ │ │ +1114 void │ │ │ │ +_1_1_1_5 _r_e_h_a_s_h(_s_i_z_e___t_y_p_e __n) │ │ │ │ +1116 { _M_h.rehash(__n); } │ │ │ │ +1117 │ │ │ │ +1118 /** │ │ │ │ +1119 * @brief Prepare the %unordered_map for a specified number of │ │ │ │ +1120 * elements. │ │ │ │ +1121 * @param __n Number of elements required. │ │ │ │ +1122 * │ │ │ │ +1123 * Same as rehash(ceil(n / max_load_factor())). │ │ │ │ +1124 */ │ │ │ │ +1125 void │ │ │ │ +_1_1_2_6 _r_e_s_e_r_v_e(_s_i_z_e___t_y_p_e __n) │ │ │ │ +1127 { _M_h.reserve(__n); } │ │ │ │ +1128 │ │ │ │ +1129 template │ │ │ │ +1131 friend bool │ │ │ │ +1132 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_>&, │ │ │ │ +1133 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_>&); │ │ │ │ +1134 }; │ │ │ │ +1135 │ │ │ │ +1136#if __cpp_deduction_guides >= 201606 │ │ │ │ +1137 │ │ │ │ +1138 template>, │ │ │ │ +1140 typename _Pred = equal_to<__iter_key_t<_InputIterator>>, │ │ │ │ +1141 typename _Allocator = allocator<__iter_to_alloc_t<_InputIterator>>, │ │ │ │ +1142 typename = _RequireInputIter<_InputIterator>, │ │ │ │ +1143 typename = _RequireNotAllocatorOrIntegral<_Hash>, │ │ │ │ +1144 typename = _RequireNotAllocator<_Pred>, │ │ │ │ +1145 typename = _RequireAllocator<_Allocator>> │ │ │ │ +1146 unordered_map(_InputIterator, _InputIterator, │ │ │ │ +1147 typename unordered_map::size_type = {}, │ │ │ │ +1148 _Hash = _Hash(), _Pred = _Pred(), _Allocator = _Allocator()) │ │ │ │ +1149 -> _u_n_o_r_d_e_r_e_d___m_a_p<__iter_key_t<_InputIterator>, │ │ │ │ +1150 __iter_val_t<_InputIterator>, │ │ │ │ +1151 _Hash, _Pred, _Allocator>; │ │ │ │ +1152 │ │ │ │ +1153 template, │ │ │ │ +1154 typename _Pred = equal_to<_Key>, │ │ │ │ +1155 typename _Allocator = allocator>, │ │ │ │ +1156 typename = _RequireNotAllocatorOrIntegral<_Hash>, │ │ │ │ +1157 typename = _RequireNotAllocator<_Pred>, │ │ │ │ +1158 typename = _RequireAllocator<_Allocator>> │ │ │ │ +1159 _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<_p_a_i_r_<___K_e_y_,_ ___T_p_>>, │ │ │ │ +1160 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 = {}, │ │ │ │ +1161 _Hash = _Hash(), _Pred = _Pred(), _Allocator = _Allocator()) │ │ │ │ +1162 -> _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_a_t_o_r_>; │ │ │ │ +1163 │ │ │ │ +1164 template, │ │ │ │ +1166 typename = _RequireAllocator<_Allocator>> │ │ │ │ +1167 _u_n_o_r_d_e_r_e_d___m_a_p(_InputIterator, _InputIterator, │ │ │ │ +1168 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) │ │ │ │ +1169 -> _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_>, │ │ │ │ +1170 __iter_val_t<_InputIterator>, │ │ │ │ +1171 _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_>>, │ │ │ │ +1172 _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_>>, │ │ │ │ +1173 _Allocator>; │ │ │ │ +1174 │ │ │ │ +1175 template, │ │ │ │ +1177 typename = _RequireAllocator<_Allocator>> │ │ │ │ +1178 _u_n_o_r_d_e_r_e_d___m_a_p(_InputIterator, _InputIterator, _Allocator) │ │ │ │ +1179 -> _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_>, │ │ │ │ +1180 __iter_val_t<_InputIterator>, │ │ │ │ +1181 _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_>>, │ │ │ │ +1182 _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_>>, │ │ │ │ +1183 _Allocator>; │ │ │ │ +1184 │ │ │ │ +1185 template, │ │ │ │ +1187 typename = _RequireNotAllocatorOrIntegral<_Hash>, │ │ │ │ +1188 typename = _RequireAllocator<_Allocator>> │ │ │ │ +1189 _u_n_o_r_d_e_r_e_d___m_a_p(_InputIterator, _InputIterator, │ │ │ │ +1190 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, │ │ │ │ +1191 _Hash, _Allocator) │ │ │ │ +1192 -> _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_>, │ │ │ │ +1193 __iter_val_t<_InputIterator>, _Hash, │ │ │ │ +1194 _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_>>, _Allocator>; │ │ │ │ +1195 │ │ │ │ +1196 template> │ │ │ │ +1198 _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<_p_a_i_r_<___K_e_y_,_ ___T_p_>>, │ │ │ │ +1199 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, │ │ │ │ +1200 _Allocator) │ │ │ │ +1201 -> _u_n_o_r_d_e_r_e_d___m_a_p_<___K_e_y_,_ ___T_p_,_ _h_a_s_h_<___K_e_y_>, _e_q_u_a_l___t_o_<___K_e_y_>, _Allocator>; │ │ │ │ +1202 │ │ │ │ +1203 template> │ │ │ │ +1205 _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<_p_a_i_r_<___K_e_y_,_ ___T_p_>>, _Allocator) │ │ │ │ +1206 -> _u_n_o_r_d_e_r_e_d___m_a_p_<___K_e_y_,_ ___T_p_,_ _h_a_s_h_<___K_e_y_>, _e_q_u_a_l___t_o_<___K_e_y_>, _Allocator>; │ │ │ │ +1207 │ │ │ │ +1208 template, │ │ │ │ +1210 typename = _RequireAllocator<_Allocator>> │ │ │ │ +1211 _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<_p_a_i_r_<___K_e_y_,_ ___T_p_>>, │ │ │ │ +1212 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, │ │ │ │ +1213 _Hash, _Allocator) │ │ │ │ +1214 -> _u_n_o_r_d_e_r_e_d___m_a_p_<___K_e_y_,_ ___T_p_,_ ___H_a_s_h_,_ _e_q_u_a_l___t_o_<___K_e_y_>, _Allocator>; │ │ │ │ +1215 │ │ │ │ +1216#endif │ │ │ │ +1217 │ │ │ │ +1218 /** │ │ │ │ +1219 * @brief A standard container composed of equivalent keys │ │ │ │ +1220 * (possibly containing multiple of each key value) that associates │ │ │ │ +1221 * values of another type with the keys. │ │ │ │ +1222 * │ │ │ │ +1223 * @ingroup unordered_associative_containers │ │ │ │ +1224 * │ │ │ │ +1225 * @tparam _Key Type of key objects. │ │ │ │ +1226 * @tparam _Tp Type of mapped objects. │ │ │ │ +1227 * @tparam _Hash Hashing function object type, defaults to hash<_Value>. │ │ │ │ +1228 * @tparam _Pred Predicate function object type, defaults │ │ │ │ +1229 * to equal_to<_Value>. │ │ │ │ +1230 * @tparam _Alloc Allocator type, defaults to │ │ │ │ +1231 * std::allocator>. │ │ │ │ +1232 * │ │ │ │ +1233 * Meets the requirements of a container, and │ │ │ │ +1234 * unordered associative container │ │ │ │ +1235 * │ │ │ │ +1236 * The resulting value type of the container is std::pair. │ │ │ │ +1237 * │ │ │ │ +1238 * Base is _Hashtable, dispatched at compile time via template │ │ │ │ +1239 * alias __ummap_hashtable. │ │ │ │ +1240 */ │ │ │ │ +1241 template, │ │ │ │ +1243 typename _Pred = _e_q_u_a_l___t_o_<___K_e_y_>, │ │ │ │ +1244 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_2_4_5 class _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p │ │ │ │ +1246 { │ │ │ │ +1247 typedef __ummap_hashtable<_Key, _Tp, _Hash, _Pred, _Alloc> _Hashtable; │ │ │ │ +1248 _Hashtable _M_h; │ │ │ │ +1249 │ │ │ │ +1250 public: │ │ │ │ +1251 // typedefs: │ │ │ │ +1252 ///@{ │ │ │ │ +1253 /// Public typedefs. │ │ │ │ +_1_2_5_4 typedef typename _Hashtable::key_type _k_e_y___t_y_p_e; │ │ │ │ +_1_2_5_5 typedef typename _Hashtable::value_type _v_a_l_u_e___t_y_p_e; │ │ │ │ +_1_2_5_6 typedef typename _Hashtable::mapped_type _m_a_p_p_e_d___t_y_p_e; │ │ │ │ +_1_2_5_7 typedef typename _Hashtable::hasher _h_a_s_h_e_r; │ │ │ │ +_1_2_5_8 typedef typename _Hashtable::key_equal _k_e_y___e_q_u_a_l; │ │ │ │ +_1_2_5_9 typedef typename _Hashtable::allocator_type _a_l_l_o_c_a_t_o_r___t_y_p_e; │ │ │ │ +1260 ///@} │ │ │ │ +1261 │ │ │ │ +1262 ///@{ │ │ │ │ +1263 /// Iterator-related typedefs. │ │ │ │ +_1_2_6_4 typedef typename _Hashtable::pointer _p_o_i_n_t_e_r; │ │ │ │ +_1_2_6_5 typedef typename _Hashtable::const_pointer _c_o_n_s_t___p_o_i_n_t_e_r; │ │ │ │ +_1_2_6_6 typedef typename _Hashtable::reference _r_e_f_e_r_e_n_c_e; │ │ │ │ +_1_2_6_7 typedef typename _Hashtable::const_reference _c_o_n_s_t___r_e_f_e_r_e_n_c_e; │ │ │ │ +_1_2_6_8 typedef typename _Hashtable::iterator _i_t_e_r_a_t_o_r; │ │ │ │ +_1_2_6_9 typedef typename _Hashtable::const_iterator _c_o_n_s_t___i_t_e_r_a_t_o_r; │ │ │ │ +_1_2_7_0 typedef typename _Hashtable::local_iterator _l_o_c_a_l___i_t_e_r_a_t_o_r; │ │ │ │ +_1_2_7_1 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_2 typedef typename _Hashtable::size_type _s_i_z_e___t_y_p_e; │ │ │ │ +_1_2_7_3 typedef typename _Hashtable::difference_type _d_i_f_f_e_r_e_n_c_e___t_y_p_e; │ │ │ │ +1274 ///@} │ │ │ │ +1275 │ │ │ │ +1276#if __cplusplus > 201402L │ │ │ │ +1277 using node_type = typename _Hashtable::node_type; │ │ │ │ +1278#endif │ │ │ │ +1279 │ │ │ │ +1280 //construct/destroy/copy │ │ │ │ +1281 │ │ │ │ +1282 /// Default constructor. │ │ │ │ +_1_2_8_3 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p() = default; │ │ │ │ +1284 │ │ │ │ +1285 /** │ │ │ │ +1286 * @brief Default constructor creates no elements. │ │ │ │ +1287 * @param __n Mnimal initial number of buckets. │ │ │ │ +1288 * @param __hf A hash functor. │ │ │ │ +1289 * @param __eql A key equality functor. │ │ │ │ +1290 * @param __a An allocator object. │ │ │ │ +1291 */ │ │ │ │ +1292 explicit │ │ │ │ +_1_2_9_3 _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, │ │ │ │ +1294 const _h_a_s_h_e_r& __hf = _h_a_s_h_e_r(), │ │ │ │ +1295 const _k_e_y___e_q_u_a_l& __eql = _k_e_y___e_q_u_a_l(), │ │ │ │ +1296 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()) │ │ │ │ +1297 : _M_h(__n, __hf, __eql, __a) │ │ │ │ +1298 { } │ │ │ │ +1299 │ │ │ │ +1300 /** │ │ │ │ +1301 * @brief Builds an %unordered_multimap from a range. │ │ │ │ +1302 * @param __first An input iterator. │ │ │ │ +1303 * @param __last An input iterator. │ │ │ │ +1304 * @param __n Minimal initial number of buckets. │ │ │ │ +1305 * @param __hf A hash functor. │ │ │ │ +1306 * @param __eql A key equality functor. │ │ │ │ +1307 * @param __a An allocator object. │ │ │ │ +1308 * │ │ │ │ +1309 * Create an %unordered_multimap consisting of copies of the elements │ │ │ │ +1310 * from [__first,__last). This is linear in N (where N is │ │ │ │ +1311 * distance(__first,__last)). │ │ │ │ +1312 */ │ │ │ │ +1313 template │ │ │ │ +_1_3_1_4 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p(_InputIterator __first, _InputIterator __last, │ │ │ │ +1315 _s_i_z_e___t_y_p_e __n = 0, │ │ │ │ +1316 const _h_a_s_h_e_r& __hf = _h_a_s_h_e_r(), │ │ │ │ +1317 const _k_e_y___e_q_u_a_l& __eql = _k_e_y___e_q_u_a_l(), │ │ │ │ +1318 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()) │ │ │ │ +1319 : _M_h(__first, __last, __n, __hf, __eql, __a) │ │ │ │ +1320 { } │ │ │ │ +1321 │ │ │ │ +1322 /// Copy constructor. │ │ │ │ +_1_3_2_3 _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; │ │ │ │ +1324 │ │ │ │ +1325 /// Move constructor. │ │ │ │ +_1_3_2_6 _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; │ │ │ │ +1327 │ │ │ │ +1328 /** │ │ │ │ +1329 * @brief Creates an %unordered_multimap with no elements. │ │ │ │ +1330 * @param __a An allocator object. │ │ │ │ +1331 */ │ │ │ │ +1332 explicit │ │ │ │ +_1_3_3_3 _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) │ │ │ │ +1334 : _M_h(__a) │ │ │ │ +1335 { } │ │ │ │ +1336 │ │ │ │ +1337 /* │ │ │ │ +1338 * @brief Copy constructor with allocator argument. │ │ │ │ +1339 * @param __uset Input %unordered_multimap to copy. │ │ │ │ +1340 * @param __a An allocator object. │ │ │ │ +1341 */ │ │ │ │ +1342 _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& __ummap, │ │ │ │ +1343 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ +1344 : _M_h(__ummap._M_h, __a) │ │ │ │ +1345 { } │ │ │ │ +1346 │ │ │ │ +1347 /* │ │ │ │ +1348 * @brief Move constructor with allocator argument. │ │ │ │ +1349 * @param __uset Input %unordered_multimap to move. │ │ │ │ +1350 * @param __a An allocator object. │ │ │ │ +1351 */ │ │ │ │ +1352 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p(unordered_multimap&& __ummap, │ │ │ │ +1353 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ +1354 noexcept( noexcept(_Hashtable(_s_t_d_:_:_m_o_v_e(__ummap._M_h), __a)) ) │ │ │ │ +1355 : _M_h(_s_t_d::_m_o_v_e(__ummap._M_h), __a) │ │ │ │ +1356 { } │ │ │ │ +1357 │ │ │ │ +1358 /** │ │ │ │ +1359 * @brief Builds an %unordered_multimap from an initializer_list. │ │ │ │ +1360 * @param __l An initializer_list. │ │ │ │ +1361 * @param __n Minimal initial number of buckets. │ │ │ │ +1362 * @param __hf A hash functor. │ │ │ │ +1363 * @param __eql A key equality functor. │ │ │ │ +1364 * @param __a An allocator object. │ │ │ │ +1365 * │ │ │ │ +1366 * Create an %unordered_multimap consisting of copies of the elements in │ │ │ │ +1367 * the list. This is linear in N (where N is @a __l.size()). │ │ │ │ +1368 */ │ │ │ │ +_1_3_6_9 _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, │ │ │ │ +1370 _s_i_z_e___t_y_p_e __n = 0, │ │ │ │ +1371 const _h_a_s_h_e_r& __hf = _h_a_s_h_e_r(), │ │ │ │ +1372 const _k_e_y___e_q_u_a_l& __eql = _k_e_y___e_q_u_a_l(), │ │ │ │ +1373 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()) │ │ │ │ +1374 : _M_h(__l, __n, __hf, __eql, __a) │ │ │ │ +1375 { } │ │ │ │ +1376 │ │ │ │ +1377 _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) │ │ │ │ +1378 : _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) │ │ │ │ +1379 { } │ │ │ │ +1380 │ │ │ │ +1381 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p(size_type __n, const _h_a_s_h_e_r& __hf, │ │ │ │ +1382 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ +1383 : unordered_multimap(__n, __hf, _k_e_y___e_q_u_a_l(), __a) │ │ │ │ +1384 { } │ │ │ │ +1385 │ │ │ │ +1386 template │ │ │ │ +1387 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p(_InputIterator __first, _InputIterator __last, │ │ │ │ +1388 _s_i_z_e___t_y_p_e __n, │ │ │ │ +1389 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ +1390 : _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) │ │ │ │ +1391 { } │ │ │ │ +1392 │ │ │ │ +1393 template │ │ │ │ +1394 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p(_InputIterator __first, _InputIterator __last, │ │ │ │ +1395 _s_i_z_e___t_y_p_e __n, const _h_a_s_h_e_r& __hf, │ │ │ │ +1396 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ +1397 : _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) │ │ │ │ +1398 { } │ │ │ │ +1399 │ │ │ │ +1400 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p(initializer_list __l, │ │ │ │ +1401 _s_i_z_e___t_y_p_e __n, │ │ │ │ +1402 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ +1403 : _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) │ │ │ │ +1404 { } │ │ │ │ +1405 │ │ │ │ +1406 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p(initializer_list __l, │ │ │ │ +1407 _s_i_z_e___t_y_p_e __n, const _h_a_s_h_e_r& __hf, │ │ │ │ +1408 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ +1409 : _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) │ │ │ │ +1410 { } │ │ │ │ +1411 │ │ │ │ +1412 /// Copy assignment operator. │ │ │ │ +1413 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p& │ │ │ │ +_1_4_1_4 _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; │ │ │ │ +1415 │ │ │ │ +1416 /// Move 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_=(_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p&&) = default; │ │ │ │ +1419 │ │ │ │ +1420 /** │ │ │ │ +1421 * @brief %Unordered_multimap list assignment operator. │ │ │ │ +1422 * @param __l An initializer_list. │ │ │ │ +1423 * │ │ │ │ +1424 * This function fills an %unordered_multimap with copies of the │ │ │ │ +1425 * elements in the initializer list @a __l. │ │ │ │ +1426 * │ │ │ │ +1427 * Note that the assignment completely changes the %unordered_multimap │ │ │ │ +1428 * and that the resulting %unordered_multimap's size is the same as the │ │ │ │ +1429 * number of elements assigned. │ │ │ │ +1430 */ │ │ │ │ +1431 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p& │ │ │ │ +_1_4_3_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) │ │ │ │ +1433 { │ │ │ │ +1434 _M_h = __l; │ │ │ │ +1435 return *this; │ │ │ │ +1436 } │ │ │ │ +1437 │ │ │ │ +1438 /// Returns the allocator object used by the %unordered_multimap. │ │ │ │ +1439 _a_l_l_o_c_a_t_o_r___t_y_p_e │ │ │ │ +_1_4_4_0 _g_e_t___a_l_l_o_c_a_t_o_r() const noexcept │ │ │ │ +1441 { return _M_h.get_allocator(); } │ │ │ │ +1442 │ │ │ │ +1443 // size and capacity: │ │ │ │ +1444 │ │ │ │ +1445 /// Returns true if the %unordered_multimap is empty. │ │ │ │ +1446 _GLIBCXX_NODISCARD bool │ │ │ │ +_1_4_4_7 _e_m_p_t_y() const noexcept │ │ │ │ +1448 { return _M_h.empty(); } │ │ │ │ +1449 │ │ │ │ +1450 /// Returns the size of the %unordered_multimap. │ │ │ │ +1451 _s_i_z_e___t_y_p_e │ │ │ │ +_1_4_5_2 _s_i_z_e() const noexcept │ │ │ │ +1453 { return _M_h.size(); } │ │ │ │ +1454 │ │ │ │ +1455 /// Returns the maximum size of the %unordered_multimap. │ │ │ │ +1456 _s_i_z_e___t_y_p_e │ │ │ │ +_1_4_5_7 _m_a_x___s_i_z_e() const noexcept │ │ │ │ +1458 { return _M_h.max_size(); } │ │ │ │ +1459 │ │ │ │ +1460 // iterators. │ │ │ │ +1461 │ │ │ │ +1462 /** │ │ │ │ +1463 * Returns a read/write iterator that points to the first element in the │ │ │ │ +1464 * %unordered_multimap. │ │ │ │ +1465 */ │ │ │ │ +1466 _i_t_e_r_a_t_o_r │ │ │ │ +_1_4_6_7 _b_e_g_i_n() noexcept │ │ │ │ +1468 { return _M_h.begin(); } │ │ │ │ +1469 │ │ │ │ +1470 ///@{ │ │ │ │ +1471 /** │ │ │ │ +1472 * Returns a read-only (constant) iterator that points to the first │ │ │ │ +1473 * element in the %unordered_multimap. │ │ │ │ +1474 */ │ │ │ │ +1475 const_iterator │ │ │ │ +_1_4_7_6 _b_e_g_i_n() const noexcept │ │ │ │ +1477 { return _M_h.begin(); } │ │ │ │ +1478 │ │ │ │ +1479 const_iterator │ │ │ │ +_1_4_8_0 _c_b_e_g_i_n() const noexcept │ │ │ │ +1481 { return _M_h.begin(); } │ │ │ │ +1482 ///@} │ │ │ │ +1483 │ │ │ │ +1484 /** │ │ │ │ +1485 * Returns a read/write iterator that points one past the last element in │ │ │ │ +1486 * the %unordered_multimap. │ │ │ │ +1487 */ │ │ │ │ +1488 _i_t_e_r_a_t_o_r │ │ │ │ +_1_4_8_9 _e_n_d() noexcept │ │ │ │ +1490 { return _M_h.end(); } │ │ │ │ +1491 │ │ │ │ +1492 ///@{ │ │ │ │ +1493 /** │ │ │ │ +1494 * Returns a read-only (constant) iterator that points one past the last │ │ │ │ +1495 * element in the %unordered_multimap. │ │ │ │ +1496 */ │ │ │ │ +1497 const_iterator │ │ │ │ +_1_4_9_8 _e_n_d() const noexcept │ │ │ │ +1499 { return _M_h.end(); } │ │ │ │ +1500 │ │ │ │ +1501 const_iterator │ │ │ │ +_1_5_0_2 _c_e_n_d() const noexcept │ │ │ │ +1503 { return _M_h.end(); } │ │ │ │ +1504 ///@} │ │ │ │ +1505 │ │ │ │ +1506 // modifiers. │ │ │ │ +1507 │ │ │ │ +1508 /** │ │ │ │ +1509 * @brief Attempts to build and insert a std::pair into the │ │ │ │ +1510 * %unordered_multimap. │ │ │ │ +1511 * │ │ │ │ +1512 * @param __args Arguments used to generate a new pair instance (see │ │ │ │ +1513 * std::piecewise_contruct for passing arguments to each │ │ │ │ +1514 * part of the pair constructor). │ │ │ │ +1515 * │ │ │ │ +1516 * @return An iterator that points to the inserted pair. │ │ │ │ +1517 * │ │ │ │ +1518 * This function attempts to build and insert a (key, value) %pair into │ │ │ │ +1519 * the %unordered_multimap. │ │ │ │ +1520 * │ │ │ │ +1521 * Insertion requires amortized constant time. │ │ │ │ +1522 */ │ │ │ │ +1523 template │ │ │ │ +1524 _i_t_e_r_a_t_o_r │ │ │ │ +_1_5_2_5 _e_m_p_l_a_c_e(_Args&&... __args) │ │ │ │ +1526 { return _M_h.emplace(_s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(__args)...); } │ │ │ │ +1527 │ │ │ │ +1528 /** │ │ │ │ +1529 * @brief Attempts to build and insert a std::pair into the │ │ │ │ +1530 * %unordered_multimap. │ │ │ │ +1531 * │ │ │ │ +1532 * @param __pos An iterator that serves as a hint as to where the pair │ │ │ │ +1533 * should be inserted. │ │ │ │ +1534 * @param __args Arguments used to generate a new pair instance (see │ │ │ │ +1535 * std::piecewise_contruct for passing arguments to each │ │ │ │ +1536 * part of the pair constructor). │ │ │ │ +1537 * @return An iterator that points to the element with key of the │ │ │ │ +1538 * std::pair built from @a __args. │ │ │ │ +1539 * │ │ │ │ +1540 * Note that the first parameter is only a hint and can potentially │ │ │ │ +1541 * improve the performance of the insertion process. A bad hint would │ │ │ │ +1542 * cause no gains in efficiency. │ │ │ │ +1543 * │ │ │ │ +1544 * See │ │ │ │ +1545 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/ │ │ │ │ +associative.html#containers.associative.insert_hints │ │ │ │ +1546 * for more on @a hinting. │ │ │ │ +1547 * │ │ │ │ +1548 * Insertion requires amortized constant time. │ │ │ │ +1549 */ │ │ │ │ +1550 template │ │ │ │ +1551 _i_t_e_r_a_t_o_r │ │ │ │ +_1_5_5_2 _e_m_p_l_a_c_e___h_i_n_t(_c_o_n_s_t___i_t_e_r_a_t_o_r __pos, _Args&&... __args) │ │ │ │ +1553 { return _M_h.emplace_hint(__pos, _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(__args)...); } │ │ │ │ +1554 │ │ │ │ +1555 ///@{ │ │ │ │ +1556 /** │ │ │ │ +1557 * @brief Inserts a std::pair into the %unordered_multimap. │ │ │ │ +1558 * @param __x Pair to be inserted (see std::make_pair for easy │ │ │ │ +1559 * creation of pairs). │ │ │ │ +1560 * │ │ │ │ +1561 * @return An iterator that points to the inserted pair. │ │ │ │ +1562 * │ │ │ │ +1563 * Insertion requires amortized constant time. │ │ │ │ +1564 */ │ │ │ │ +1565 _i_t_e_r_a_t_o_r │ │ │ │ +_1_5_6_6 _i_n_s_e_r_t(const _v_a_l_u_e___t_y_p_e& __x) │ │ │ │ +1567 { return _M_h.insert(__x); } │ │ │ │ +1568 │ │ │ │ +1569 _i_t_e_r_a_t_o_r │ │ │ │ +_1_5_7_0 _i_n_s_e_r_t(_v_a_l_u_e___t_y_p_e&& __x) │ │ │ │ +1571 { return _M_h.insert(_s_t_d_:_:_m_o_v_e(__x)); } │ │ │ │ +1572 │ │ │ │ +1573 template │ │ │ │ +1574 __enable_if_t::value, _i_t_e_r_a_t_o_r> │ │ │ │ +_1_5_7_5 _i_n_s_e_r_t(_Pair&& __x) │ │ │ │ +1576 { return _M_h.emplace(_s_t_d_:_:_f_o_r_w_a_r_d_<___P_a_i_r_>(__x)); } │ │ │ │ +1577 ///@} │ │ │ │ +1578 │ │ │ │ +1579 ///@{ │ │ │ │ +1580 /** │ │ │ │ +1581 * @brief Inserts a std::pair into the %unordered_multimap. │ │ │ │ +1582 * @param __hint An iterator that serves as a hint as to where the │ │ │ │ +1583 * pair should be inserted. │ │ │ │ +1584 * @param __x Pair to be inserted (see std::make_pair for easy creation │ │ │ │ +1585 * of pairs). │ │ │ │ +1586 * @return An iterator that points to the element with key of │ │ │ │ +1587 * @a __x (may or may not be the %pair passed in). │ │ │ │ +1588 * │ │ │ │ +1589 * Note that the first parameter is only a hint and can potentially │ │ │ │ +1590 * improve the performance of the insertion process. A bad hint would │ │ │ │ +1591 * cause no gains in efficiency. │ │ │ │ +1592 * │ │ │ │ +1593 * See │ │ │ │ +1594 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/ │ │ │ │ +associative.html#containers.associative.insert_hints │ │ │ │ +1595 * for more on @a hinting. │ │ │ │ +1596 * │ │ │ │ +1597 * Insertion requires amortized constant time. │ │ │ │ +1598 */ │ │ │ │ +1599 _i_t_e_r_a_t_o_r │ │ │ │ +_1_6_0_0 _i_n_s_e_r_t(_c_o_n_s_t___i_t_e_r_a_t_o_r __hint, const _v_a_l_u_e___t_y_p_e& __x) │ │ │ │ +1601 { return _M_h.insert(__hint, __x); } │ │ │ │ +1602 │ │ │ │ +1603 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ +1604 // 2354. Unnecessary copying when inserting into maps with braced-init │ │ │ │ +1605 _i_t_e_r_a_t_o_r │ │ │ │ +_1_6_0_6 _i_n_s_e_r_t(_c_o_n_s_t___i_t_e_r_a_t_o_r __hint, _v_a_l_u_e___t_y_p_e&& __x) │ │ │ │ +1607 { return _M_h.insert(__hint, _s_t_d_:_:_m_o_v_e(__x)); } │ │ │ │ +1608 │ │ │ │ +1609 template │ │ │ │ +1610 __enable_if_t::value, _i_t_e_r_a_t_o_r> │ │ │ │ +_1_6_1_1 _i_n_s_e_r_t(_c_o_n_s_t___i_t_e_r_a_t_o_r __hint, _Pair&& __x) │ │ │ │ +1612 { return _M_h.emplace_hint(__hint, _s_t_d_:_:_f_o_r_w_a_r_d_<___P_a_i_r_>(__x)); } │ │ │ │ +1613 ///@} │ │ │ │ +1614 │ │ │ │ +1615 /** │ │ │ │ +1616 * @brief A template function that attempts to insert a range of │ │ │ │ +1617 * elements. │ │ │ │ +1618 * @param __first Iterator pointing to the start of the range to be │ │ │ │ +1619 * inserted. │ │ │ │ +1620 * @param __last Iterator pointing to the end of the range. │ │ │ │ +1621 * │ │ │ │ +1622 * Complexity similar to that of the range constructor. │ │ │ │ +1623 */ │ │ │ │ +1624 template │ │ │ │ +1625 void │ │ │ │ +_1_6_2_6 _i_n_s_e_r_t(_InputIterator __first, _InputIterator __last) │ │ │ │ +1627 { _M_h.insert(__first, __last); } │ │ │ │ +1628 │ │ │ │ +1629 /** │ │ │ │ +1630 * @brief Attempts to insert a list of elements into the │ │ │ │ +1631 * %unordered_multimap. │ │ │ │ +1632 * @param __l A std::initializer_list of elements │ │ │ │ +1633 * to be inserted. │ │ │ │ +1634 * │ │ │ │ +1635 * Complexity similar to that of the range constructor. │ │ │ │ +1636 */ │ │ │ │ +1637 void │ │ │ │ +_1_6_3_8 _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) │ │ │ │ +1639 { _M_h.insert(__l); } │ │ │ │ +1640 │ │ │ │ +1641#if __cplusplus > 201402L │ │ │ │ +1642 /// Extract a node. │ │ │ │ +1643 node_type │ │ │ │ +_1_6_4_4 _e_x_t_r_a_c_t(_c_o_n_s_t___i_t_e_r_a_t_o_r __pos) │ │ │ │ +1645 { │ │ │ │ +1646 __glibcxx_assert(__pos != _e_n_d()); │ │ │ │ +1647 return _M_h.extract(__pos); │ │ │ │ +1648 } │ │ │ │ +1649 │ │ │ │ +1650 /// Extract a node. │ │ │ │ +1651 node_type │ │ │ │ +_1_6_5_2 _e_x_t_r_a_c_t(const _k_e_y___t_y_p_e& __key) │ │ │ │ +1653 { return _M_h.extract(__key); } │ │ │ │ +1654 │ │ │ │ +1655 /// Re-insert an extracted node. │ │ │ │ +1656 _i_t_e_r_a_t_o_r │ │ │ │ +_1_6_5_7 _i_n_s_e_r_t(node_type&& __nh) │ │ │ │ +1658 { return _M_h._M_reinsert_node_multi(_c_e_n_d(), _s_t_d_:_:_m_o_v_e(__nh)); } │ │ │ │ +1659 │ │ │ │ +1660 /// Re-insert an extracted node. │ │ │ │ +1661 _i_t_e_r_a_t_o_r │ │ │ │ +_1_6_6_2 _i_n_s_e_r_t(_c_o_n_s_t___i_t_e_r_a_t_o_r __hint, node_type&& __nh) │ │ │ │ +1663 { return _M_h._M_reinsert_node_multi(__hint, _s_t_d_:_:_m_o_v_e(__nh)); } │ │ │ │ +1664#endif // C++17 │ │ │ │ +1665 │ │ │ │ +1666 ///@{ │ │ │ │ +1667 /** │ │ │ │ +1668 * @brief Erases an element from an %unordered_multimap. │ │ │ │ +1669 * @param __position An iterator pointing to the element to be erased. │ │ │ │ +1670 * @return An iterator pointing to the element immediately following │ │ │ │ +1671 * @a __position prior to the element being erased. If no such │ │ │ │ +1672 * element exists, end() is returned. │ │ │ │ +1673 * │ │ │ │ +1674 * This function erases an element, pointed to by the given iterator, │ │ │ │ +1675 * from an %unordered_multimap. │ │ │ │ +1676 * Note that this function only erases the element, and that if the │ │ │ │ +1677 * element is itself a pointer, the pointed-to memory is not touched in │ │ │ │ +1678 * any way. Managing the pointer is the user's responsibility. │ │ │ │ +1679 */ │ │ │ │ +1680 _i_t_e_r_a_t_o_r │ │ │ │ +_1_6_8_1 _e_r_a_s_e(_c_o_n_s_t___i_t_e_r_a_t_o_r __position) │ │ │ │ +1682 { return _M_h.erase(__position); } │ │ │ │ +1683 │ │ │ │ +1684 // LWG 2059. │ │ │ │ +1685 _i_t_e_r_a_t_o_r │ │ │ │ +_1_6_8_6 _e_r_a_s_e(_i_t_e_r_a_t_o_r __position) │ │ │ │ +1687 { return _M_h.erase(__position); } │ │ │ │ +1688 ///@} │ │ │ │ +1689 │ │ │ │ +1690 /** │ │ │ │ +1691 * @brief Erases elements according to the provided key. │ │ │ │ +1692 * @param __x Key of elements to be erased. │ │ │ │ +1693 * @return The number of elements erased. │ │ │ │ +1694 * │ │ │ │ +1695 * This function erases all the elements located by the given key from │ │ │ │ +1696 * an %unordered_multimap. │ │ │ │ +1697 * Note that this function only erases the element, and that if the │ │ │ │ +1698 * element is itself a pointer, the pointed-to memory is not touched in │ │ │ │ +1699 * any way. Managing the pointer is the user's responsibility. │ │ │ │ +1700 */ │ │ │ │ +1701 _s_i_z_e___t_y_p_e │ │ │ │ +_1_7_0_2 _e_r_a_s_e(const _k_e_y___t_y_p_e& __x) │ │ │ │ +1703 { return _M_h.erase(__x); } │ │ │ │ +1704 │ │ │ │ +1705 /** │ │ │ │ +1706 * @brief Erases a [__first,__last) range of elements from an │ │ │ │ +1707 * %unordered_multimap. │ │ │ │ +1708 * @param __first Iterator pointing to the start of the range to be │ │ │ │ +1709 * erased. │ │ │ │ +1710 * @param __last Iterator pointing to the end of the range to │ │ │ │ +1711 * be erased. │ │ │ │ +1712 * @return The iterator @a __last. │ │ │ │ +1713 * │ │ │ │ +1714 * This function erases a sequence of elements from an │ │ │ │ +1715 * %unordered_multimap. │ │ │ │ +1716 * Note that this function only erases the elements, and that if │ │ │ │ +1717 * the element is itself a pointer, the pointed-to memory is not touched │ │ │ │ +1718 * in any way. Managing the pointer is the user's responsibility. │ │ │ │ +1719 */ │ │ │ │ +1720 _i_t_e_r_a_t_o_r │ │ │ │ +_1_7_2_1 _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) │ │ │ │ +1722 { return _M_h.erase(__first, __last); } │ │ │ │ +1723 │ │ │ │ +1724 /** │ │ │ │ +1725 * Erases all elements in an %unordered_multimap. │ │ │ │ +1726 * Note that this function only erases the elements, and that if the │ │ │ │ +1727 * elements themselves are pointers, the pointed-to memory is not touched │ │ │ │ +1728 * in any way. Managing the pointer is the user's responsibility. │ │ │ │ +1729 */ │ │ │ │ +1730 void │ │ │ │ +_1_7_3_1 _c_l_e_a_r() noexcept │ │ │ │ +1732 { _M_h.clear(); } │ │ │ │ +1733 │ │ │ │ +1734 /** │ │ │ │ +1735 * @brief Swaps data with another %unordered_multimap. │ │ │ │ +1736 * @param __x An %unordered_multimap of the same element and allocator │ │ │ │ +1737 * types. │ │ │ │ +1738 * │ │ │ │ +1739 * This exchanges the elements between two %unordered_multimap in │ │ │ │ +1740 * constant time. │ │ │ │ +1741 * Note that the global std::swap() function is specialized such that │ │ │ │ +1742 * std::swap(m1,m2) will feed to this function. │ │ │ │ +1743 */ │ │ │ │ +1744 void │ │ │ │ +_1_7_4_5 _s_w_a_p(_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p& __x) │ │ │ │ +1746 noexcept( noexcept(_M_h.swap(__x._M_h)) ) │ │ │ │ +1747 { _M_h.swap(__x._M_h); } │ │ │ │ +1748 │ │ │ │ +1749#if __cplusplus > 201402L │ │ │ │ +1750 template │ │ │ │ +1751 friend class std::_Hash_merge_helper; │ │ │ │ +1752 │ │ │ │ +1753 template │ │ │ │ +1754 void │ │ │ │ +1755 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_>& __source) │ │ │ │ +1756 { │ │ │ │ +1757 using _Merge_helper │ │ │ │ +1758 = _Hash_merge_helper; │ │ │ │ +1759 _M_h._M_merge_multi(_Merge_helper::_S_get_table(__source)); │ │ │ │ +1760 } │ │ │ │ +1761 │ │ │ │ +1762 template │ │ │ │ +1763 void │ │ │ │ +1764 merge(unordered_multimap<_Key, _Tp, _H2, _P2, _Alloc>&& __source) │ │ │ │ +1765 { merge(__source); } │ │ │ │ +1766 │ │ │ │ +1767 template │ │ │ │ +1768 void │ │ │ │ +1769 merge(unordered_map<_Key, _Tp, _H2, _P2, _Alloc>& __source) │ │ │ │ +1770 { │ │ │ │ +1771 using _Merge_helper │ │ │ │ +1772 = _Hash_merge_helper; │ │ │ │ +1773 _M_h._M_merge_multi(_Merge_helper::_S_get_table(__source)); │ │ │ │ +1774 } │ │ │ │ +1775 │ │ │ │ +1776 template │ │ │ │ +1777 void │ │ │ │ +1778 merge(unordered_map<_Key, _Tp, _H2, _P2, _Alloc>&& __source) │ │ │ │ +1779 { merge(__source); } │ │ │ │ +1780#endif // C++17 │ │ │ │ +1781 │ │ │ │ +1782 // observers. │ │ │ │ +1783 │ │ │ │ +1784 /// Returns the hash functor object with which the %unordered_multimap │ │ │ │ +1785 /// was constructed. │ │ │ │ +1786 _h_a_s_h_e_r │ │ │ │ +_1_7_8_7 _h_a_s_h___f_u_n_c_t_i_o_n() const │ │ │ │ +1788 { return _M_h.hash_function(); } │ │ │ │ +1789 │ │ │ │ +1790 /// Returns the key comparison object with which the %unordered_multimap │ │ │ │ +1791 /// was constructed. │ │ │ │ +1792 _k_e_y___e_q_u_a_l │ │ │ │ +_1_7_9_3 _k_e_y___e_q() const │ │ │ │ +1794 { return _M_h.key_eq(); } │ │ │ │ +1795 │ │ │ │ +1796 // lookup. │ │ │ │ +1797 │ │ │ │ +1798 ///@{ │ │ │ │ +1799 /** │ │ │ │ +1800 * @brief Tries to locate an element in an %unordered_multimap. │ │ │ │ +1801 * @param __x Key to be located. │ │ │ │ +1802 * @return Iterator pointing to sought-after element, or end() if not │ │ │ │ +1803 * found. │ │ │ │ +1804 * │ │ │ │ +1805 * This function takes a key and tries to locate the element with which │ │ │ │ +1806 * the key matches. If successful the function returns an iterator │ │ │ │ +1807 * pointing to the sought after element. If unsuccessful it returns the │ │ │ │ +1808 * past-the-end ( @c end() ) iterator. │ │ │ │ +1809 */ │ │ │ │ +1810 _i_t_e_r_a_t_o_r │ │ │ │ +_1_8_1_1 _f_i_n_d(const _k_e_y___t_y_p_e& __x) │ │ │ │ +1812 { return _M_h.find(__x); } │ │ │ │ +1813 │ │ │ │ +1814#if __cplusplus > 201703L │ │ │ │ +1815 template │ │ │ │ +1816 auto │ │ │ │ +1817 _f_i_n_d(const _Kt& __x) -> decltype(_M_h._M_find_tr(__x)) │ │ │ │ +1818 { return _M_h._M_find_tr(__x); } │ │ │ │ +1819#endif │ │ │ │ +1820 │ │ │ │ +1821 const_iterator │ │ │ │ +_1_8_2_2 _f_i_n_d(const _k_e_y___t_y_p_e& __x) const │ │ │ │ +1823 { return _M_h.find(__x); } │ │ │ │ +1824 │ │ │ │ +1825#if __cplusplus > 201703L │ │ │ │ +1826 template │ │ │ │ +1827 auto │ │ │ │ +1828 _f_i_n_d(const _Kt& __x) const -> decltype(_M_h._M_find_tr(__x)) │ │ │ │ +1829 { return _M_h._M_find_tr(__x); } │ │ │ │ +1830#endif │ │ │ │ +1831 ///@} │ │ │ │ +1832 │ │ │ │ +1833 ///@{ │ │ │ │ +1834 /** │ │ │ │ +1835 * @brief Finds the number of elements. │ │ │ │ +1836 * @param __x Key to count. │ │ │ │ +1837 * @return Number of elements with specified key. │ │ │ │ +1838 */ │ │ │ │ +1839 size_type │ │ │ │ +_1_8_4_0 _c_o_u_n_t(const _k_e_y___t_y_p_e& __x) const │ │ │ │ +1841 { return _M_h.count(__x); } │ │ │ │ +1842 │ │ │ │ +1843#if __cplusplus > 201703L │ │ │ │ +1844 template │ │ │ │ +1845 auto │ │ │ │ +1846 _c_o_u_n_t(const _Kt& __x) const -> decltype(_M_h._M_count_tr(__x)) │ │ │ │ +1847 { return _M_h._M_count_tr(__x); } │ │ │ │ +1848#endif │ │ │ │ +1849 ///@} │ │ │ │ +1850 │ │ │ │ +1851#if __cplusplus > 201703L │ │ │ │ +1852 ///@{ │ │ │ │ +1853 /** │ │ │ │ +1854 * @brief Finds whether an element with the given key exists. │ │ │ │ +1855 * @param __x Key of elements to be located. │ │ │ │ +1856 * @return True if there is any element with the specified key. │ │ │ │ +1857 */ │ │ │ │ +1858 bool │ │ │ │ +1859 contains(const _k_e_y___t_y_p_e& __x) const │ │ │ │ +1860 { return _M_h.find(__x) != _M_h.end(); } │ │ │ │ +1861 │ │ │ │ +1862 template │ │ │ │ +1863 auto │ │ │ │ +1864 contains(const _Kt& __x) const │ │ │ │ +1865 -> decltype(_M_h._M_find_tr(__x), void(), true) │ │ │ │ +1866 { return _M_h._M_find_tr(__x) != _M_h.end(); } │ │ │ │ +1867 ///@} │ │ │ │ +1868#endif │ │ │ │ +1869 │ │ │ │ +1870 ///@{ │ │ │ │ +1871 /** │ │ │ │ +1872 * @brief Finds a subsequence matching given key. │ │ │ │ +1873 * @param __x Key to be located. │ │ │ │ +1874 * @return Pair of iterators that possibly points to the subsequence │ │ │ │ +1875 * matching given key. │ │ │ │ +1876 */ │ │ │ │ +1877 std::pair │ │ │ │ +_1_8_7_8 _e_q_u_a_l___r_a_n_g_e(const _k_e_y___t_y_p_e& __x) │ │ │ │ +1879 { return _M_h.equal_range(__x); } │ │ │ │ +1880 │ │ │ │ +1881#if __cplusplus > 201703L │ │ │ │ +1882 template │ │ │ │ +1883 auto │ │ │ │ +1884 _e_q_u_a_l___r_a_n_g_e(const _Kt& __x) │ │ │ │ +1885 -> decltype(_M_h._M_equal_range_tr(__x)) │ │ │ │ +1886 { return _M_h._M_equal_range_tr(__x); } │ │ │ │ +1887#endif │ │ │ │ +1888 │ │ │ │ +1889 _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_0 _e_q_u_a_l___r_a_n_g_e(const _k_e_y___t_y_p_e& __x) const │ │ │ │ +1891 { return _M_h.equal_range(__x); } │ │ │ │ +1892 │ │ │ │ +1893#if __cplusplus > 201703L │ │ │ │ +1894 template │ │ │ │ +1895 auto │ │ │ │ +1896 _e_q_u_a_l___r_a_n_g_e(const _Kt& __x) const │ │ │ │ +1897 -> decltype(_M_h._M_equal_range_tr(__x)) │ │ │ │ +1898 { return _M_h._M_equal_range_tr(__x); } │ │ │ │ +1899#endif │ │ │ │ +1900 ///@} │ │ │ │ +1901 │ │ │ │ +1902 // bucket interface. │ │ │ │ +1903 │ │ │ │ +1904 /// Returns the number of buckets of the %unordered_multimap. │ │ │ │ +1905 size_type │ │ │ │ +_1_9_0_6 _b_u_c_k_e_t___c_o_u_n_t() const noexcept │ │ │ │ +1907 { return _M_h.bucket_count(); } │ │ │ │ +1908 │ │ │ │ +1909 /// Returns the maximum number of buckets of the %unordered_multimap. │ │ │ │ +1910 _s_i_z_e___t_y_p_e │ │ │ │ +_1_9_1_1 _m_a_x___b_u_c_k_e_t___c_o_u_n_t() const noexcept │ │ │ │ +1912 { return _M_h.max_bucket_count(); } │ │ │ │ +1913 │ │ │ │ +1914 /* │ │ │ │ +1915 * @brief Returns the number of elements in a given bucket. │ │ │ │ +1916 * @param __n A bucket index. │ │ │ │ +1917 * @return The number of elements in the bucket. │ │ │ │ +1918 */ │ │ │ │ +1919 _s_i_z_e___t_y_p_e │ │ │ │ +1920 bucket_size(_s_i_z_e___t_y_p_e __n) const │ │ │ │ +1921 { return _M_h.bucket_size(__n); } │ │ │ │ +1922 │ │ │ │ +1923 /* │ │ │ │ +1924 * @brief Returns the bucket index of a given element. │ │ │ │ +1925 * @param __key A key instance. │ │ │ │ +1926 * @return The key bucket index. │ │ │ │ +1927 */ │ │ │ │ +1928 size_type │ │ │ │ +1929 bucket(const _k_e_y___t_y_p_e& __key) const │ │ │ │ +1930 { return _M_h.bucket(__key); } │ │ │ │ +1931 │ │ │ │ +1932 /** │ │ │ │ +1933 * @brief Returns a read/write iterator pointing to the first bucket │ │ │ │ +1934 * element. │ │ │ │ +1935 * @param __n The bucket index. │ │ │ │ +1936 * @return A read/write local iterator. │ │ │ │ +1937 */ │ │ │ │ +1938 _l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ +_1_9_3_9 _b_e_g_i_n(_s_i_z_e___t_y_p_e __n) │ │ │ │ +1940 { return _M_h.begin(__n); } │ │ │ │ +1941 │ │ │ │ +1942 ///@{ │ │ │ │ +1943 /** │ │ │ │ +1944 * @brief Returns a read-only (constant) iterator pointing to the first │ │ │ │ +1945 * bucket element. │ │ │ │ +1946 * @param __n The bucket index. │ │ │ │ +1947 * @return A read-only local iterator. │ │ │ │ +1948 */ │ │ │ │ +1949 _c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ +_1_9_5_0 _b_e_g_i_n(_s_i_z_e___t_y_p_e __n) const │ │ │ │ +1951 { return _M_h.begin(__n); } │ │ │ │ +1952 │ │ │ │ +1953 _c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ +_1_9_5_4 _c_b_e_g_i_n(_s_i_z_e___t_y_p_e __n) const │ │ │ │ +1955 { return _M_h.cbegin(__n); } │ │ │ │ +1956 ///@} │ │ │ │ +1957 │ │ │ │ +1958 /** │ │ │ │ +1959 * @brief Returns a read/write iterator pointing to one past the last │ │ │ │ +1960 * bucket elements. │ │ │ │ +1961 * @param __n The bucket index. │ │ │ │ +1962 * @return A read/write local iterator. │ │ │ │ +1963 */ │ │ │ │ +1964 _l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ +_1_9_6_5 _e_n_d(_s_i_z_e___t_y_p_e __n) │ │ │ │ +1966 { return _M_h.end(__n); } │ │ │ │ +1967 │ │ │ │ +1968 ///@{ │ │ │ │ +1969 /** │ │ │ │ +1970 * @brief Returns a read-only (constant) iterator pointing to one past │ │ │ │ +1971 * the last bucket elements. │ │ │ │ +1972 * @param __n The bucket index. │ │ │ │ +1973 * @return A read-only local iterator. │ │ │ │ +1974 */ │ │ │ │ +1975 _c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ +_1_9_7_6 _e_n_d(_s_i_z_e___t_y_p_e __n) const │ │ │ │ +1977 { return _M_h.end(__n); } │ │ │ │ +1978 │ │ │ │ +1979 _c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ +_1_9_8_0 _c_e_n_d(_s_i_z_e___t_y_p_e __n) const │ │ │ │ +1981 { return _M_h.cend(__n); } │ │ │ │ +1982 ///@} │ │ │ │ +1983 │ │ │ │ +1984 // hash policy. │ │ │ │ +1985 │ │ │ │ +1986 /// Returns the average number of elements per bucket. │ │ │ │ +1987 float │ │ │ │ +_1_9_8_8 _l_o_a_d___f_a_c_t_o_r() const noexcept │ │ │ │ +1989 { return _M_h.load_factor(); } │ │ │ │ +1990 │ │ │ │ +1991 /// Returns a positive number that the %unordered_multimap tries to keep │ │ │ │ +1992 /// the load factor less than or equal to. │ │ │ │ +1993 float │ │ │ │ +_1_9_9_4 _m_a_x___l_o_a_d___f_a_c_t_o_r() const noexcept │ │ │ │ +1995 { return _M_h.max_load_factor(); } │ │ │ │ +1996 │ │ │ │ +1997 /** │ │ │ │ +1998 * @brief Change the %unordered_multimap maximum load factor. │ │ │ │ +1999 * @param __z The new maximum load factor. │ │ │ │ +2000 */ │ │ │ │ +2001 void │ │ │ │ +_2_0_0_2 _m_a_x___l_o_a_d___f_a_c_t_o_r(float __z) │ │ │ │ +2003 { _M_h.max_load_factor(__z); } │ │ │ │ +2004 │ │ │ │ +2005 /** │ │ │ │ +2006 * @brief May rehash the %unordered_multimap. │ │ │ │ +2007 * @param __n The new number of buckets. │ │ │ │ +2008 * │ │ │ │ +2009 * Rehash will occur only if the new number of buckets respect the │ │ │ │ +2010 * %unordered_multimap maximum load factor. │ │ │ │ +2011 */ │ │ │ │ +2012 void │ │ │ │ +_2_0_1_3 _r_e_h_a_s_h(_s_i_z_e___t_y_p_e __n) │ │ │ │ +2014 { _M_h.rehash(__n); } │ │ │ │ +2015 │ │ │ │ +2016 /** │ │ │ │ +2017 * @brief Prepare the %unordered_multimap for a specified number of │ │ │ │ +2018 * elements. │ │ │ │ +2019 * @param __n Number of elements required. │ │ │ │ +2020 * │ │ │ │ +2021 * Same as rehash(ceil(n / max_load_factor())). │ │ │ │ +2022 */ │ │ │ │ +2023 void │ │ │ │ +_2_0_2_4 _r_e_s_e_r_v_e(_s_i_z_e___t_y_p_e __n) │ │ │ │ +2025 { _M_h.reserve(__n); } │ │ │ │ +2026 │ │ │ │ +2027 template │ │ │ │ +2029 friend bool │ │ │ │ +2030 operator==(const _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p<_Key1, _Tp1, │ │ │ │ +2031 _Hash1, _Pred1, _Alloc1>&, │ │ │ │ +2032 const _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p<_Key1, _Tp1, │ │ │ │ +2033 _Hash1, _Pred1, _Alloc1>&); │ │ │ │ +2034 }; │ │ │ │ +2035 │ │ │ │ +2036#if __cpp_deduction_guides >= 201606 │ │ │ │ +2037 │ │ │ │ +2038 template>, │ │ │ │ +2040 typename _Pred = equal_to<__iter_key_t<_InputIterator>>, │ │ │ │ +2041 typename _Allocator = allocator<__iter_to_alloc_t<_InputIterator>>, │ │ │ │ +2042 typename = _RequireInputIter<_InputIterator>, │ │ │ │ +2043 typename = _RequireNotAllocatorOrIntegral<_Hash>, │ │ │ │ +2044 typename = _RequireNotAllocator<_Pred>, │ │ │ │ +2045 typename = _RequireAllocator<_Allocator>> │ │ │ │ +2046 unordered_multimap(_InputIterator, _InputIterator, │ │ │ │ +2047 unordered_multimap::size_type = {}, │ │ │ │ +2048 _Hash = _Hash(), _Pred = _Pred(), │ │ │ │ +2049 _Allocator = _Allocator()) │ │ │ │ +2050 -> _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p<__iter_key_t<_InputIterator>, │ │ │ │ +2051 __iter_val_t<_InputIterator>, _Hash, _Pred, │ │ │ │ +2052 _Allocator>; │ │ │ │ +2053 │ │ │ │ +2054 template, │ │ │ │ +2055 typename _Pred = equal_to<_Key>, │ │ │ │ +2056 typename _Allocator = allocator>, │ │ │ │ +2057 typename = _RequireNotAllocatorOrIntegral<_Hash>, │ │ │ │ +2058 typename = _RequireNotAllocator<_Pred>, │ │ │ │ +2059 typename = _RequireAllocator<_Allocator>> │ │ │ │ +2060 _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<_p_a_i_r_<___K_e_y_,_ ___T_p_>>, │ │ │ │ +2061 _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 = {}, │ │ │ │ +2062 _Hash = _Hash(), _Pred = _Pred(), │ │ │ │ +2063 _Allocator = _Allocator()) │ │ │ │ +2064 -> _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_a_t_o_r_>; │ │ │ │ +2065 │ │ │ │ +2066 template, │ │ │ │ +2068 typename = _RequireAllocator<_Allocator>> │ │ │ │ +2069 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p(_InputIterator, _InputIterator, │ │ │ │ +2070 _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) │ │ │ │ +2071 -> _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_>, │ │ │ │ +2072 __iter_val_t<_InputIterator>, │ │ │ │ +2073 _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_>>, │ │ │ │ +2074 _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_>>, _Allocator>; │ │ │ │ +2075 │ │ │ │ +2076 template, │ │ │ │ +2078 typename = _RequireAllocator<_Allocator>> │ │ │ │ +2079 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p(_InputIterator, _InputIterator, _Allocator) │ │ │ │ +2080 -> _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_>, │ │ │ │ +2081 __iter_val_t<_InputIterator>, │ │ │ │ +2082 _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_>>, │ │ │ │ +2083 _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_>>, _Allocator>; │ │ │ │ +2084 │ │ │ │ +2085 template, │ │ │ │ +2087 typename = _RequireNotAllocatorOrIntegral<_Hash>, │ │ │ │ +2088 typename = _RequireAllocator<_Allocator>> │ │ │ │ +2089 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p(_InputIterator, _InputIterator, │ │ │ │ +2090 _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, │ │ │ │ +2091 _Allocator) │ │ │ │ +2092 -> _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_>, │ │ │ │ +2093 __iter_val_t<_InputIterator>, _Hash, │ │ │ │ +2094 _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_>>, _Allocator>; │ │ │ │ +2095 │ │ │ │ +2096 template> │ │ │ │ +2098 _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<_p_a_i_r_<___K_e_y_,_ ___T_p_>>, │ │ │ │ +2099 _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, │ │ │ │ +2100 _Allocator) │ │ │ │ +2101 -> _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_<___K_e_y_>, _e_q_u_a_l___t_o_<___K_e_y_>, _Allocator>; │ │ │ │ +2102 │ │ │ │ +2103 template> │ │ │ │ +2105 _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<_p_a_i_r_<___K_e_y_,_ ___T_p_>>, _Allocator) │ │ │ │ +2106 -> _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_<___K_e_y_>, _e_q_u_a_l___t_o_<___K_e_y_>, _Allocator>; │ │ │ │ +2107 │ │ │ │ +2108 template, │ │ │ │ +2110 typename = _RequireAllocator<_Allocator>> │ │ │ │ +2111 _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<_p_a_i_r_<___K_e_y_,_ ___T_p_>>, │ │ │ │ +2112 _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, │ │ │ │ +2113 _Hash, _Allocator) │ │ │ │ +2114 -> _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_,_ _e_q_u_a_l___t_o_<___K_e_y_>, _Allocator>; │ │ │ │ +2115 │ │ │ │ +2116#endif │ │ │ │ +2117 │ │ │ │ +2118 template │ │ │ │ +2119 inline void │ │ │ │ +2120 _s_w_a_p(_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_>& __x, │ │ │ │ +2121 _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_>& __y) │ │ │ │ +2122 noexcept(noexcept(__x.swap(__y))) │ │ │ │ +2123 { __x.swap(__y); } │ │ │ │ +2124 │ │ │ │ +2125 template │ │ │ │ +2126 inline void │ │ │ │ +2127 _s_w_a_p(_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_>& __x, │ │ │ │ +2128 _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_>& __y) │ │ │ │ +2129 noexcept(noexcept(__x.swap(__y))) │ │ │ │ +2130 { __x.swap(__y); } │ │ │ │ +2131 │ │ │ │ +2132 template │ │ │ │ +2133 inline bool │ │ │ │ +2134 operator==(const _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_>& __x, │ │ │ │ +2135 const _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_>& __y) │ │ │ │ +2136 { return __x._M_h._M_equal(__y._M_h); } │ │ │ │ +2137 │ │ │ │ +2138#if __cpp_impl_three_way_comparison < 201907L │ │ │ │ +2139 template │ │ │ │ +2140 inline bool │ │ │ │ +2141 operator!=(const _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_>& __x, │ │ │ │ +2142 const _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_>& __y) │ │ │ │ +2143 { return !(__x == __y); } │ │ │ │ +2144#endif │ │ │ │ +2145 │ │ │ │ +2146 template │ │ │ │ +2147 inline bool │ │ │ │ +2148 operator==(const _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_>& __x, │ │ │ │ +2149 const _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_>& __y) │ │ │ │ +2150 { return __x._M_h._M_equal(__y._M_h); } │ │ │ │ +2151 │ │ │ │ +2152#if __cpp_impl_three_way_comparison < 201907L │ │ │ │ +2153 template │ │ │ │ +2154 inline bool │ │ │ │ +2155 operator!=(const _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_>& __x, │ │ │ │ +2156 const _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_>& __y) │ │ │ │ +2157 { return !(__x == __y); } │ │ │ │ +2158#endif │ │ │ │ +2159 │ │ │ │ +2160_GLIBCXX_END_NAMESPACE_CONTAINER │ │ │ │ +2161 │ │ │ │ +2162#if __cplusplus > 201402L │ │ │ │ +2163 // Allow std::unordered_map access to internals of compatible maps. │ │ │ │ +2164 template │ │ │ │ +2166 struct _Hash_merge_helper< │ │ │ │ +2167 _GLIBCXX_STD_C::_u_n_o_r_d_e_r_e_d___m_a_p<_Key, _Val, _Hash1, _Eq1, _Alloc>, │ │ │ │ +2168 _Hash2, _Eq2> │ │ │ │ +2169 { │ │ │ │ +2170 private: │ │ │ │ +2171 template │ │ │ │ +2172 using unordered_map = _GLIBCXX_STD_C::unordered_map<_Tp...>; │ │ │ │ +2173 template │ │ │ │ +2174 using unordered_multimap = _GLIBCXX_STD_C::unordered_multimap<_Tp...>; │ │ │ │ +2175 │ │ │ │ +2176 friend unordered_map<_Key, _Val, _Hash1, _Eq1, _Alloc>; │ │ │ │ +2177 │ │ │ │ +2178 static auto& │ │ │ │ +2179 _S_get_table(unordered_map<_Key, _Val, _Hash2, _Eq2, _Alloc>& __map) │ │ │ │ +2180 { return __map._M_h; } │ │ │ │ +2181 │ │ │ │ +2182 static auto& │ │ │ │ +2183 _S_get_table(unordered_multimap<_Key, _Val, _Hash2, _Eq2, _Alloc>& __map) │ │ │ │ +2184 { return __map._M_h; } │ │ │ │ +2185 }; │ │ │ │ +2186 │ │ │ │ +2187 // Allow std::unordered_multimap access to internals of compatible maps. │ │ │ │ +2188 template │ │ │ │ +2190 struct _Hash_merge_helper< │ │ │ │ +2191 _GLIBCXX_STD_C::_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p<_Key, _Val, _Hash1, _Eq1, _Alloc>, │ │ │ │ +2192 _Hash2, _Eq2> │ │ │ │ +2193 { │ │ │ │ +2194 private: │ │ │ │ +2195 template │ │ │ │ +2196 using unordered_map = _GLIBCXX_STD_C::unordered_map<_Tp...>; │ │ │ │ +2197 template │ │ │ │ +2198 using unordered_multimap = _GLIBCXX_STD_C::unordered_multimap<_Tp...>; │ │ │ │ +2199 │ │ │ │ +2200 friend unordered_multimap<_Key, _Val, _Hash1, _Eq1, _Alloc>; │ │ │ │ +2201 │ │ │ │ +2202 static auto& │ │ │ │ +2203 _S_get_table(unordered_map<_Key, _Val, _Hash2, _Eq2, _Alloc>& __map) │ │ │ │ +2204 { return __map._M_h; } │ │ │ │ +2205 │ │ │ │ +2206 static auto& │ │ │ │ +2207 _S_get_table(unordered_multimap<_Key, _Val, _Hash2, _Eq2, _Alloc>& __map) │ │ │ │ +2208 { return __map._M_h; } │ │ │ │ +2209 }; │ │ │ │ +2210#endif // C++17 │ │ │ │ +2211 │ │ │ │ +2212_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ +2213} // namespace std │ │ │ │ +2214 │ │ │ │ +2215#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_8 │ │ │ │ +_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 │ │ │ │ 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_n_i_t_i_a_l_i_z_e_r___l_i_s_t │ │ │ │ +initializer_list │ │ │ │ +DDeeffiinniittiioonn _i_n_i_t_i_a_l_i_z_e_r___l_i_s_t_:_4_8 │ │ │ │ +_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_:_:_s_i_z_e___t_y_p_e │ │ │ │ +_s_t_d_:_:_a_l_l_o_c_a_t_o_r │ │ │ │ +The standard allocator, as per C++03 [20.4.1]. │ │ │ │ +DDeeffiinniittiioonn _a_l_l_o_c_a_t_o_r_._h_:_1_2_5 │ │ │ │ +_s_t_d_:_:_e_q_u_a_l___t_o │ │ │ │ +One of the comparison functors. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___f_u_n_c_t_i_o_n_._h_:_3_6_6 │ │ │ │ +_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_:_:_p_a_i_r │ │ │ │ +Struct holding two objects of arbitrary type. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___p_a_i_r_._h_:_2_1_3 │ │ │ │ +_s_t_d_:_:_p_a_i_r_:_:_f_i_r_s_t │ │ │ │ +_T1 first │ │ │ │ +The first member. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___p_a_i_r_._h_:_2_1_7 │ │ │ │ +_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_4_6 │ │ │ │ +_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_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_,_ ___T_p_,_ ___H_a_s_h_,_ ___P_r_e_d_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ _p_a_i_r_< │ │ │ │ +_c_o_n_s_t_ ___K_e_y_,_ ___T_p_ _>_ _>_ _>_:_:_r_e_f_e_r_e_n_c_e │ │ │ │ +_Hashtable::reference reference │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_6_6 │ │ │ │ +_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_8_6 │ │ │ │ +_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_4_9_8 │ │ │ │ +_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_2 │ │ │ │ +_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_7_8 │ │ │ │ +_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_0_6 │ │ │ │ +_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_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ _p_a_i_r_< │ │ │ │ +_c_o_n_s_t_ ___K_e_y_,_ ___T_p_ _>_ _>_ _>_:_:_i_t_e_r_a_t_o_r │ │ │ │ +_Hashtable::iterator iterator │ │ │ │ +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_:_:_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_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 │ │ │ │ +iterator begin() noexcept │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_4_6_7 │ │ │ │ +_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_7_6 │ │ │ │ +_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_8_7 │ │ │ │ +_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_2 │ │ │ │ +_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_1 │ │ │ │ +_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_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 │ │ │ │ +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_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 │ │ │ │ +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_2 │ │ │ │ +_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_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ _p_a_i_r_< │ │ │ │ +_c_o_n_s_t_ ___K_e_y_,_ ___T_p_ _>_ _>_ _>_:_:_m_a_p_p_e_d___t_y_p_e │ │ │ │ +_Hashtable::mapped_type mapped_type │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_5_6 │ │ │ │ +_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_5 │ │ │ │ +_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_2_6 │ │ │ │ +_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_2 │ │ │ │ +_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_3 │ │ │ │ +_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_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ _p_a_i_r_< │ │ │ │ +_c_o_n_s_t_ ___K_e_y_,_ ___T_p_ _>_ _>_ _>_:_:_v_a_l_u_e___t_y_p_e │ │ │ │ +_Hashtable::value_type value_type │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_5_5 │ │ │ │ +_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_5 │ │ │ │ +_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_2 │ │ │ │ +_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_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ _p_a_i_r_< │ │ │ │ +_c_o_n_s_t_ ___K_e_y_,_ ___T_p_ _>_ _>_ _>_:_:_c_o_n_s_t___r_e_f_e_r_e_n_c_e │ │ │ │ +_Hashtable::const_reference const_reference │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_6_7 │ │ │ │ +_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_5_7 │ │ │ │ +_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_1 │ │ │ │ +_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_8_9 │ │ │ │ +_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_3_9 │ │ │ │ +_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_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()=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_0 │ │ │ │ +_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_6_6 │ │ │ │ +_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_<_ ___K_e_y_,_ ___T_p_,_ ___H_a_s_h_,_ ___P_r_e_d_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ _p_a_i_r_< │ │ │ │ +_c_o_n_s_t_ ___K_e_y_,_ ___T_p_ _>_ _>_ _>_:_:_h_a_s_h_e_r │ │ │ │ +_Hashtable::hasher hasher │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_5_7 │ │ │ │ +_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_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ _p_a_i_r_< │ │ │ │ +_c_o_n_s_t_ ___K_e_y_,_ ___T_p_ _>_ _>_ _>_:_:_l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ +_Hashtable::local_iterator local_iterator │ │ │ │ +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_:_:_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_4 │ │ │ │ +_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_0 │ │ │ │ +_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_4 │ │ │ │ +_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_1 │ │ │ │ +_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_1 │ │ │ │ +_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_6_9 │ │ │ │ +_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_1 │ │ │ │ +_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_7_6 │ │ │ │ +_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_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ _p_a_i_r_< │ │ │ │ +_c_o_n_s_t_ ___K_e_y_,_ ___T_p_ _>_ _>_ _>_:_:_p_o_i_n_t_e_r │ │ │ │ +_Hashtable::pointer pointer │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_6_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_p_,_ ___H_a_s_h_,_ ___P_r_e_d_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ _p_a_i_r_< │ │ │ │ +_c_o_n_s_t_ ___K_e_y_,_ ___T_p_ _>_ _>_ _>_:_:_a_l_l_o_c_a_t_o_r___t_y_p_e │ │ │ │ +_Hashtable::allocator_type allocator_type │ │ │ │ +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_:_:_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_0 │ │ │ │ +_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_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ _p_a_i_r_< │ │ │ │ +_c_o_n_s_t_ ___K_e_y_,_ ___T_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 │ │ │ │ +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_:_:_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_3 │ │ │ │ +_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_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ _p_a_i_r_< │ │ │ │ +_c_o_n_s_t_ ___K_e_y_,_ ___T_p_ _>_ _>_ _>_:_:_d_i_f_f_e_r_e_n_c_e___t_y_p_e │ │ │ │ +_Hashtable::difference_type difference_type │ │ │ │ +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_<_ ___K_e_y_,_ ___T_p_,_ ___H_a_s_h_,_ ___P_r_e_d_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ _p_a_i_r_< │ │ │ │ +_c_o_n_s_t_ ___K_e_y_,_ ___T_p_ _>_ _>_ _>_:_:_s_i_z_e___t_y_p_e │ │ │ │ +_Hashtable::size_type size_type │ │ │ │ +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_<_ ___K_e_y_,_ ___T_p_,_ ___H_a_s_h_,_ ___P_r_e_d_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ _p_a_i_r_< │ │ │ │ +_c_o_n_s_t_ ___K_e_y_,_ ___T_p_ _>_ _>_ _>_:_:_c_o_n_s_t___p_o_i_n_t_e_r │ │ │ │ +_Hashtable::const_pointer const_pointer │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_6_5 │ │ │ │ +_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_5 │ │ │ │ +_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_5 │ │ │ │ +_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_3 │ │ │ │ +_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_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ _p_a_i_r_< │ │ │ │ +_c_o_n_s_t_ ___K_e_y_,_ ___T_p_ _>_ _>_ _>_:_:_c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ +_Hashtable::const_iterator const_iterator │ │ │ │ +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 │ │ │ │ +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_3_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_iterator cend() 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_:_:_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_5_7 │ │ │ │ +_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_4 │ │ │ │ +_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_4_7 │ │ │ │ +_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_0 │ │ │ │ +_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_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ _p_a_i_r_< │ │ │ │ +_c_o_n_s_t_ ___K_e_y_,_ ___T_p_ _>_ _>_ _>_:_:_k_e_y___t_y_p_e │ │ │ │ +_Hashtable::key_type key_type │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_5_4 │ │ │ │ +_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_4 │ │ │ │ +_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_0 │ │ │ │ +_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_0 │ │ │ │ +_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_2 │ │ │ │ +_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_2 │ │ │ │ +_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_0_6 │ │ │ │ +_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_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ _p_a_i_r_< │ │ │ │ +_c_o_n_s_t_ ___K_e_y_,_ ___T_p_ _>_ _>_ _>_:_:_k_e_y___e_q_u_a_l │ │ │ │ +_Hashtable::key_equal key_equal │ │ │ │ +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_:_:_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_0 │ │ │ │ +_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_2 │ │ │ │ +_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_3 │ │ │ │ +_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_6 │ │ │ │ +_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_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ _p_a_i_r_<_ _c_o_n_s_t │ │ │ │ +___K_e_y_,_ ___T_p_ _>_ _>_ _>_:_:_i_t_e_r_a_t_o_r │ │ │ │ +_Hashtable::iterator iterator │ │ │ │ +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_:_:_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_4 │ │ │ │ +_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_0 │ │ │ │ +_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_3 │ │ │ │ +_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_6 │ │ │ │ +_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_:_2_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=(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_0 │ │ │ │ +_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_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ _p_a_i_r_<_ _c_o_n_s_t │ │ │ │ +___K_e_y_,_ ___T_p_ _>_ _>_ _>_:_:_c_o_n_s_t___p_o_i_n_t_e_r │ │ │ │ +_Hashtable::const_pointer const_pointer │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_2 │ │ │ │ +_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_7 │ │ │ │ +_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_1 │ │ │ │ +_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_1 │ │ │ │ +_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_6 │ │ │ │ +_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_0 │ │ │ │ +_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_5 │ │ │ │ +_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_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(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_1 │ │ │ │ +_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_6 │ │ │ │ +_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_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 │ │ │ │ +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_3 │ │ │ │ +_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_3 │ │ │ │ +_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_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ _p_a_i_r_<_ _c_o_n_s_t │ │ │ │ +___K_e_y_,_ ___T_p_ _>_ _>_ _>_:_:_r_e_f_e_r_e_n_c_e │ │ │ │ +_Hashtable::reference reference │ │ │ │ +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 │ │ │ │ +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_0 │ │ │ │ +_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_7 │ │ │ │ +_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_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ _p_a_i_r_<_ _c_o_n_s_t │ │ │ │ +___K_e_y_,_ ___T_p_ _>_ _>_ _>_:_:_a_l_l_o_c_a_t_o_r___t_y_p_e │ │ │ │ +_Hashtable::allocator_type allocator_type │ │ │ │ +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_:_:_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_1 │ │ │ │ +_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_5 │ │ │ │ +_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_2 │ │ │ │ +_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_7_9 │ │ │ │ +_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_7_8 │ │ │ │ +_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_5 │ │ │ │ +_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_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()=default │ │ │ │ +Default constructor. │ │ │ │ +_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_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ _p_a_i_r_<_ _c_o_n_s_t │ │ │ │ +___K_e_y_,_ ___T_p_ _>_ _>_ _>_:_:_m_a_p_p_e_d___t_y_p_e │ │ │ │ +_Hashtable::mapped_type mapped_type │ │ │ │ +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_:_:_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_2 │ │ │ │ +_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_1 │ │ │ │ +_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_8_8 │ │ │ │ +_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_2 │ │ │ │ +_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_0 │ │ │ │ +_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_3 │ │ │ │ +_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_3 │ │ │ │ +_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_7 │ │ │ │ +_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_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ _p_a_i_r_<_ _c_o_n_s_t │ │ │ │ +___K_e_y_,_ ___T_p_ _>_ _>_ _>_:_:_h_a_s_h_e_r │ │ │ │ +_Hashtable::hasher hasher │ │ │ │ +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_:_:_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_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(_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_2 │ │ │ │ +_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_0 │ │ │ │ +_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_7_9 │ │ │ │ +_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_1 │ │ │ │ +_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_4 │ │ │ │ +_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_0 │ │ │ │ +_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_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ _p_a_i_r_<_ _c_o_n_s_t │ │ │ │ +___K_e_y_,_ ___T_p_ _>_ _>_ _>_:_:_c_o_n_s_t___r_e_f_e_r_e_n_c_e │ │ │ │ +_Hashtable::const_reference const_reference │ │ │ │ +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_<_ ___K_e_y_,_ ___T_p_,_ ___H_a_s_h_,_ ___P_r_e_d_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ _p_a_i_r_<_ _c_o_n_s_t │ │ │ │ +___K_e_y_,_ ___T_p_ _>_ _>_ _>_:_:_k_e_y___e_q_u_a_l │ │ │ │ +_Hashtable::key_equal key_equal │ │ │ │ +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_<_ ___K_e_y_,_ ___T_p_,_ ___H_a_s_h_,_ ___P_r_e_d_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ _p_a_i_r_<_ _c_o_n_s_t │ │ │ │ +___K_e_y_,_ ___T_p_ _>_ _>_ _>_:_:_l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ +_Hashtable::local_iterator local_iterator │ │ │ │ +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_:_:_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_5 │ │ │ │ +_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_0 │ │ │ │ +_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_7 │ │ │ │ +_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_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ _p_a_i_r_<_ _c_o_n_s_t │ │ │ │ +___K_e_y_,_ ___T_p_ _>_ _>_ _>_:_:_p_o_i_n_t_e_r │ │ │ │ +_Hashtable::pointer pointer │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_1 │ │ │ │ +_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_3 │ │ │ │ +_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_1 │ │ │ │ +_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_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ _p_a_i_r_<_ _c_o_n_s_t │ │ │ │ +___K_e_y_,_ ___T_p_ _>_ _>_ _>_:_:_k_e_y___t_y_p_e │ │ │ │ +_Hashtable::key_type key_type │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_1_1 │ │ │ │ +_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_0_8 │ │ │ │ +_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_5 │ │ │ │ +_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_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(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_7 │ │ │ │ +_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_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ _p_a_i_r_<_ _c_o_n_s_t │ │ │ │ +___K_e_y_,_ ___T_p_ _>_ _>_ _>_:_:_c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ +_Hashtable::const_iterator const_iterator │ │ │ │ +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_,_ ___T_p_,_ ___H_a_s_h_,_ ___P_r_e_d_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ _p_a_i_r_<_ _c_o_n_s_t │ │ │ │ +___K_e_y_,_ ___T_p_ _>_ _>_ _>_:_:_s_i_z_e___t_y_p_e │ │ │ │ +_Hashtable::size_type size_type │ │ │ │ +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_:_:_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_6_8 │ │ │ │ +_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_0 │ │ │ │ +_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_0 │ │ │ │ +_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_4 │ │ │ │ +_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_1 │ │ │ │ +_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_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=(const unordered_map &)=default │ │ │ │ +Copy assignment operator. │ │ │ │ +_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_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ _p_a_i_r_<_ _c_o_n_s_t │ │ │ │ +___K_e_y_,_ ___T_p_ _>_ _>_ _>_:_:_d_i_f_f_e_r_e_n_c_e___t_y_p_e │ │ │ │ +_Hashtable::difference_type difference_type │ │ │ │ +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_<_ ___K_e_y_,_ ___T_p_,_ ___H_a_s_h_,_ ___P_r_e_d_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ _p_a_i_r_<_ _c_o_n_s_t │ │ │ │ +___K_e_y_,_ ___T_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 │ │ │ │ +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_:_:_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_3 │ │ │ │ +_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_1_9 │ │ │ │ +_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_3_8 │ │ │ │ +_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_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ _p_a_i_r_<_ _c_o_n_s_t │ │ │ │ +___K_e_y_,_ ___T_p_ _>_ _>_ _>_:_:_v_a_l_u_e___t_y_p_e │ │ │ │ +_Hashtable::value_type value_type │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_1_2 │ │ │ │ +_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_5 │ │ │ │ +_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_3_8 │ │ │ │ * bbiittss │ │ │ │ - * _v_a_l_a_r_r_a_y___a_r_r_a_y_._t_c_c │ │ │ │ + * _u_n_o_r_d_e_r_e_d___m_a_p_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.15.0 │ │ ├── ./usr/share/doc/gcc-11-base/libstdc++/user/a00356.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: valarray_array.h File Reference │ │ │ +libstdc++: forward_list.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -48,361 +48,68 @@ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
valarray_array.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 _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 _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 <valarray>.

│ │ │ +

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 valarray_array.h.

│ │ │ +

Definition in file forward_list.h.

│ │ │

Macro Definition Documentation

│ │ │ - │ │ │ -

◆ _DEFINE_ARRAY_FUNCTION

│ │ │ + │ │ │ +

◆ _GLIBCXX_FWDLIST_REMOVE_RETURN_TYPE_TAG

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

Definition at line 511 of file valarray_array.h.

│ │ │ +

Definition at line 1165 of file forward_list.h.

│ │ │ │ │ │
│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,476 +1,45 @@ │ │ │ │ libstdc++ │ │ │ │ -valarray_array.h File Reference │ │ │ │ +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  ___D_E_F_I_N_E___A_R_R_A_Y___F_U_N_C_T_I_O_N(_Op, _Name) │ │ │ │ FFuunnccttiioonnss │ │ │ │ -template │ │ │ │ - void  _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 │ │ │ │ - void  _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 │ │ │ │ - void  _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 │ │ │ │ - void  _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 │ │ │ │ - void  _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 │ │ │ │ - void  _s_t_d_:_:_____v_a_l_a_r_r_a_y___c_o_p_y (_Array< _Tp > __a, size_t __n, size_t │ │ │ │ - __s1, _Array< _Tp > __b, size_t __s2) │ │ │ │ -template │ │ │ │ - void  _s_t_d_:_:_____v_a_l_a_r_r_a_y___c_o_p_y (_Array< _Tp > __src, size_t __n, _Array< │ │ │ │ - size_t > __i, _Array< _Tp > __dst, _Array< size_t > __j) │ │ │ │ -template │ │ │ │ - void  _s_t_d_:_:_____v_a_l_a_r_r_a_y___c_o_p_y (const _Tp *__restrict__ __a, _Tp │ │ │ │ - *__restrict__ __b, size_t __n, size_t __s) │ │ │ │ -template │ │ │ │ - void  _s_t_d_:_:_____v_a_l_a_r_r_a_y___c_o_p_y (const _Tp *__restrict__ __a, const │ │ │ │ - size_t *__restrict__ __i, _Tp *__restrict__ __b, size_t __n) │ │ │ │ -template │ │ │ │ - void  _s_t_d_:_:_____v_a_l_a_r_r_a_y___c_o_p_y (const _Tp *__restrict__ __a, size_t __n, │ │ │ │ - _Tp *__restrict__ __b) │ │ │ │ -template │ │ │ │ - void  _s_t_d_:_:_____v_a_l_a_r_r_a_y___c_o_p_y (const _Tp *__restrict__ __a, size_t __n, │ │ │ │ - _Tp *__restrict__ __b, const size_t *__restrict__ __i) │ │ │ │ -template │ │ │ │ - void  _s_t_d_:_:_____v_a_l_a_r_r_a_y___c_o_p_y (const _Tp *__restrict__ __a, size_t __n, │ │ │ │ - size_t __s, _Tp *__restrict__ __b) │ │ │ │ -template │ │ │ │ - void  _s_t_d_:_:_____v_a_l_a_r_r_a_y___c_o_p_y (const _Tp *__restrict__ __src, size_t │ │ │ │ - __n, const size_t *__restrict__ __i, _Tp *__restrict__ __dst, │ │ │ │ - const size_t *__restrict__ __j) │ │ │ │ -template │ │ │ │ - void  _s_t_d_:_:_____v_a_l_a_r_r_a_y___c_o_p_y (const _Tp *__restrict__ __src, size_t │ │ │ │ - __n, size_t __s1, _Tp *__restrict__ __dst, size_t __s2) │ │ │ │ -template │ │ │ │ - void  _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 │ │ │ │ - void  _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 │ │ │ │ - void  _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 *__restrict__ __o) │ │ │ │ -template │ │ │ │ - void  _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 *__restrict__ __a, │ │ │ │ - const size_t *__restrict__ __i, _Tp *__restrict__ __o, size_t │ │ │ │ - __n) │ │ │ │ -template │ │ │ │ - void  _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 *__restrict__ __a, │ │ │ │ - size_t __n, size_t __s, _Tp *__restrict__ __o) │ │ │ │ -template │ │ │ │ - void  _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 │ │ │ │ - void  _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 │ │ │ │ - void  _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 │ │ │ │ - void  _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 │ │ │ │ - void  _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 │ │ │ │ - void  _s_t_d_:_:_____v_a_l_a_r_r_a_y___f_i_l_l (_Tp *__restrict__ __a, const size_t │ │ │ │ - *__restrict__ __i, size_t __n, const _Tp &__t) │ │ │ │ -template │ │ │ │ - void  _s_t_d_:_:_____v_a_l_a_r_r_a_y___f_i_l_l (_Tp *__restrict__ __a, size_t __n, const │ │ │ │ - _Tp &__t) │ │ │ │ -template │ │ │ │ - void  _s_t_d_:_:_____v_a_l_a_r_r_a_y___f_i_l_l (_Tp *__restrict__ __a, size_t __n, │ │ │ │ - size_t __s, const _Tp &__t) │ │ │ │ -template │ │ │ │ - void  _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 │ │ │ │ - _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 │ │ │ │ -_Ta::value_type  _s_t_d_:_:_____v_a_l_a_r_r_a_y___m_a_x (const _Ta &__a) │ │ │ │ -template │ │ │ │ -_Ta::value_type  _s_t_d_:_:_____v_a_l_a_r_r_a_y___m_i_n (const _Ta &__a) │ │ │ │ - void  _s_t_d_:_:_____v_a_l_a_r_r_a_y___r_e_l_e_a_s_e___m_e_m_o_r_y (void *__p) │ │ │ │ -template │ │ │ │ - _Tp  _s_t_d_:_:_____v_a_l_a_r_r_a_y___s_u_m (const _Tp *__f, const _Tp *__l) │ │ │ │ -template │ │ │ │ - void  _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 │ │ │ │ - void  _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 │ │ │ │ - void  _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< _Dom, _Tp > &__e, size_t __n) │ │ │ │ -template │ │ │ │ - void  _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 │ │ │ │ - void  _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< _Dom, _Tp > &__e, size_t │ │ │ │ - __n) │ │ │ │ -template │ │ │ │ - void  _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< _Dom, _Tp > &__e, size_t __n) │ │ │ │ -template │ │ │ │ - void  _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 │ │ │ │ - void  _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 │ │ │ │ - void  _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 │ │ │ │ - void  _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 │ │ │ │ - void  _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 │ │ │ │ - void  _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< _Dom, _Tp > &__e, size_t __n) │ │ │ │ -template │ │ │ │ - void  _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 │ │ │ │ - void  _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 │ │ │ │ - void  _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< _Dom, _Tp > &__e, size_t __n) │ │ │ │ -template │ │ │ │ - void  _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 │ │ │ │ - void  _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< _Dom, _Tp > &__e, size_t __n) │ │ │ │ -template │ │ │ │ - void  _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< _Dom, _Tp > &__e, size_t __n) │ │ │ │ -template │ │ │ │ - void  _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 │ │ │ │ - void  _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 │ │ │ │ - void  _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 │ │ │ │ - void  _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 │ │ │ │ - void  _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 │ │ │ │ - void  _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< _Dom, _Tp > &__e, size_t __n) │ │ │ │ -template │ │ │ │ - void  _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 │ │ │ │ - void  _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 │ │ │ │ - void  _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< _Dom, _Tp > &__e, size_t __n) │ │ │ │ -template │ │ │ │ - void  _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 │ │ │ │ - void  _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< _Dom, _Tp > &__e, size_t │ │ │ │ - __n) │ │ │ │ -template │ │ │ │ - void  _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< _Dom, _Tp > &__e, size_t __n) │ │ │ │ -template │ │ │ │ - void  _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 │ │ │ │ - void  _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 │ │ │ │ - void  _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 │ │ │ │ - void  _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 │ │ │ │ - void  _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 │ │ │ │ - void  _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< _Dom, _Tp > &__e, size_t __n) │ │ │ │ -template │ │ │ │ - void  _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 │ │ │ │ - void  _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 │ │ │ │ - void  _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< _Dom, _Tp > &__e, size_t __n) │ │ │ │ -template │ │ │ │ - void  _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 │ │ │ │ - void  _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< _Dom, _Tp > &__e, size_t __n) │ │ │ │ -template │ │ │ │ - void  _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< _Dom, _Tp > &__e, size_t __n) │ │ │ │ -template │ │ │ │ - void  _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 │ │ │ │ - void  _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 │ │ │ │ - void  _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 │ │ │ │ - void  _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 │ │ │ │ - void  _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 │ │ │ │ - void  _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< _Dom, _Tp > &__e, size_t __n) │ │ │ │ -template │ │ │ │ - void  _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 │ │ │ │ - void  _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 │ │ │ │ - void  _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< _Dom, _Tp > &__e, size_t __n) │ │ │ │ -template │ │ │ │ - void  _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 │ │ │ │ - void  _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< _Dom, _Tp > &__e, size_t __n) │ │ │ │ -template │ │ │ │ - void  _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< │ │ │ │ - _Dom, _Tp > &__e, size_t __n) │ │ │ │ -template │ │ │ │ - void  _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 │ │ │ │ - void  _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 │ │ │ │ - void  _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 │ │ │ │ - void  _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 │ │ │ │ - void  _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 │ │ │ │ - void  _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< _Dom, _Tp > &__e, size_t __n) │ │ │ │ -template │ │ │ │ - void  _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 │ │ │ │ - void  _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 │ │ │ │ - void  _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< _Dom, _Tp > &__e, size_t __n) │ │ │ │ -template │ │ │ │ - void  _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 │ │ │ │ - void  _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< _Dom, _Tp > &__e, size_t __n) │ │ │ │ -template │ │ │ │ - void  _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< _Dom, _Tp > &__e, size_t __n) │ │ │ │ -template │ │ │ │ - void  _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 │ │ │ │ - void  _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 │ │ │ │ - void  _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 │ │ │ │ - void  _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 │ │ │ │ - void  _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 │ │ │ │ - void  _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< _Dom, _Tp > &__e, size_t __n) │ │ │ │ -template │ │ │ │ - void  _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 │ │ │ │ - void  _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 │ │ │ │ - void  _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< _Dom, _Tp > &__e, size_t __n) │ │ │ │ -template │ │ │ │ - void  _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 │ │ │ │ - void  _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< _Dom, _Tp > &__e, size_t __n) │ │ │ │ -template │ │ │ │ - void  _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< _Dom, _Tp > &__e, size_t __n) │ │ │ │ -template │ │ │ │ - void  _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 │ │ │ │ - void  _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 │ │ │ │ - void  _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 │ │ │ │ - void  _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 │ │ │ │ - void  _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 │ │ │ │ - void  _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< _Dom, _Tp > &__e, size_t __n) │ │ │ │ -template │ │ │ │ - void  _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 │ │ │ │ - void  _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 │ │ │ │ - void  _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< _Dom, _Tp > &__e, size_t __n) │ │ │ │ -template │ │ │ │ - void  _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 │ │ │ │ - void  _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< _Dom, _Tp > &__e, size_t __n) │ │ │ │ -template │ │ │ │ - void  _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< │ │ │ │ - _Dom, _Tp > &__e, size_t __n) │ │ │ │ -template │ │ │ │ - void  _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 │ │ │ │ - void  _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 │ │ │ │ - void  _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 │ │ │ │ - void  _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 │ │ │ │ - void  _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 │ │ │ │ - void  _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< _Dom, _Tp > &__e, size_t __n) │ │ │ │ -template │ │ │ │ - void  _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 │ │ │ │ - void  _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 │ │ │ │ - void  _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< _Dom, _Tp > &__e, size_t __n) │ │ │ │ -template │ │ │ │ - void  _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 │ │ │ │ - void  _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< _Dom, _Tp > &__e, size_t __n) │ │ │ │ -template │ │ │ │ - void  _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< _Dom, _Tp > &__e, size_t __n) │ │ │ │ -template │ │ │ │ - void  _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 │ │ │ │ - void  _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 │ │ │ │ - void  _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 │ │ │ │ - void  _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 │ │ │ │ - void  _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 │ │ │ │ - void  _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< _Dom, _Tp > &__e, size_t __n) │ │ │ │ -template │ │ │ │ - void  _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 │ │ │ │ - void  _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 │ │ │ │ - void  _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< _Dom, _Tp > &__e, size_t __n) │ │ │ │ -template │ │ │ │ - void  _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 │ │ │ │ - void  _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< _Dom, _Tp > &__e, size_t │ │ │ │ - __n) │ │ │ │ -template │ │ │ │ - void  _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< _Dom, _Tp > &__e, size_t __n) │ │ │ │ -template │ │ │ │ - void  _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 │ │ │ │ - void  _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 │ │ │ │ - void  _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 │ │ │ │ - void  _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 │ │ │ │ - void  _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 │ │ │ │ - void  _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< _Dom, _Tp > &__e, size_t __n) │ │ │ │ +template │ │ │ │ +bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_!_= (const forward_list< _Tp, _Alloc > &__lx, const │ │ │ │ + forward_list< _Tp, _Alloc > &__ly) │ │ │ │ +template │ │ │ │ +bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_< (const forward_list< _Tp, _Alloc > &__lx, const │ │ │ │ + forward_list< _Tp, _Alloc > &__ly) │ │ │ │ +template │ │ │ │ +bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_<_= (const forward_list< _Tp, _Alloc > &__lx, const │ │ │ │ + forward_list< _Tp, _Alloc > &__ly) │ │ │ │ +template │ │ │ │ +bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_=_= (const forward_list< _Tp, _Alloc > &__lx, const │ │ │ │ + forward_list< _Tp, _Alloc > &__ly) │ │ │ │ +template │ │ │ │ +bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_> (const forward_list< _Tp, _Alloc > &__lx, const │ │ │ │ + forward_list< _Tp, _Alloc > &__ly) │ │ │ │ +template │ │ │ │ +bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_>_= (const forward_list< _Tp, _Alloc > &__lx, const │ │ │ │ + forward_list< _Tp, _Alloc > &__ly) │ │ │ │ +template │ │ │ │ +void  _s_t_d_:_:_s_w_a_p (forward_list< _Tp, _Alloc > &__lx, forward_list< _Tp, _Alloc > │ │ │ │ + &__ly) noexcept(noexcept(__lx.swap(__ly))) │ │ │ │ ********** 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. │ │ │ │ +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 ********** │ │ │ │ -********** _?◆_? __DDEEFFIINNEE__AARRRRAAYY__FFUUNNCCTTIIOONN ********** │ │ │ │ -#define _DEFINE_ARRAY_FUNCTION ( __OOpp, │ │ │ │ - __NNaammee ) │ │ │ │ -Definition at line _5_1_1 of file _v_a_l_a_r_r_a_y___a_r_r_a_y_._h. │ │ │ │ +********** _?◆_? __GGLLIIBBCCXXXX__FFWWDDLLIISSTT__RREEMMOOVVEE__RREETTUURRNN__TTYYPPEE__TTAAGG ********** │ │ │ │ +#define _GLIBCXX_FWDLIST_REMOVE_RETURN_TYPE_TAG │ │ │ │ +Definition at line _1_1_6_5 of file _f_o_r_w_a_r_d___l_i_s_t_._h. │ │ │ │ * bbiittss │ │ │ │ - * _v_a_l_a_r_r_a_y___a_r_r_a_y_._h │ │ │ │ + * _f_o_r_w_a_r_d___l_i_s_t_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.15.0 │ │ ├── ./usr/share/doc/gcc-11-base/libstdc++/user/a00356_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: valarray_array.h Source File │ │ │ +libstdc++: forward_list.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -48,20 +48,20 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
valarray_array.h
│ │ │ +
forward_list.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// <forward_list.h> -*- C++ -*-
│ │ │
2
│ │ │ -
3// Copyright (C) 1997-2021 Free Software Foundation, Inc.
│ │ │ +
3// Copyright (C) 2008-2021 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
│ │ │ @@ -75,678 +75,1731 @@ │ │ │
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
│ │ │ +
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{valarray}
│ │ │ +
27 * Do not attempt to use it directly. @headername{forward_list}
│ │ │
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
│ │ │ +
30#ifndef _FORWARD_LIST_H
│ │ │ +
31#define _FORWARD_LIST_H 1
│ │ │ +
32
│ │ │ +
33#pragma GCC system_header
│ │ │
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); }
│ │ │ -
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)
│ │ │ +
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 /**
│ │ │ +
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 */
│ │ │ +
│ │ │ +
54 struct _Fwd_list_node_base
│ │ │ +
55 {
│ │ │ +
56 _Fwd_list_node_base() = default;
│ │ │ +
57 _Fwd_list_node_base(_Fwd_list_node_base&& __x) noexcept
│ │ │ +
58 : _M_next(__x._M_next)
│ │ │ +
59 { __x._M_next = nullptr; }
│ │ │ +
60
│ │ │ +
61 _Fwd_list_node_base(const _Fwd_list_node_base&) = delete;
│ │ │ +
62 _Fwd_list_node_base& operator=(const _Fwd_list_node_base&) = delete;
│ │ │ +
63
│ │ │ +
64 _Fwd_list_node_base&
│ │ │ +
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
│ │ │ +
74 _Fwd_list_node_base*
│ │ │ +
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 _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
│ │ │ +
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>
│ │ │ -
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 };
│ │ │ -
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
│ │ │ +
│ │ │ +
113 struct _Fwd_list_node
│ │ │ +
114 : public _Fwd_list_node_base
│ │ │ +
115 {
│ │ │ +
116 _Fwd_list_node() = default;
│ │ │ +
117
│ │ │ +
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>
│ │ │ +
│ │ │ +
135 struct _Fwd_list_iterator
│ │ │
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 }
│ │ │ -
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 }
│ │ │ +
137 typedef _Fwd_list_iterator<_Tp> _Self;
│ │ │ +
138 typedef _Fwd_list_node<_Tp> _Node;
│ │ │ +
139
│ │ │ +
140 typedef _Tp value_type;
│ │ │ +
141 typedef _Tp* pointer;
│ │ │ +
142 typedef _Tp& reference;
│ │ │ +
143 typedef ptrdiff_t difference_type;
│ │ │ +
144 typedef std::forward_iterator_tag iterator_category;
│ │ │ +
145
│ │ │ +
146 _Fwd_list_iterator() noexcept
│ │ │ +
147 : _M_node() { }
│ │ │ +
148
│ │ │ +
149 explicit
│ │ │ +
150 _Fwd_list_iterator(_Fwd_list_node_base* __n) noexcept
│ │ │ +
151 : _M_node(__n) { }
│ │ │ +
152
│ │ │ +
153 reference
│ │ │ +
154 operator*() const noexcept
│ │ │ +
155 { return *static_cast<_Node*>(this->_M_node)->_M_valptr(); }
│ │ │ +
156
│ │ │ +
157 pointer
│ │ │ +
158 operator->() const noexcept
│ │ │ +
159 { return static_cast<_Node*>(this->_M_node)->_M_valptr(); }
│ │ │ +
160
│ │ │ +
161 _Self&
│ │ │ +
162 operator++() noexcept
│ │ │ +
163 {
│ │ │ +
164 _M_node = _M_node->_M_next;
│ │ │ +
165 return *this;
│ │ │ +
166 }
│ │ │ +
167
│ │ │ +
168 _Self
│ │ │ +
169 operator++(int) noexcept
│ │ │ +
170 {
│ │ │ +
171 _Self __tmp(*this);
│ │ │ +
172 _M_node = _M_node->_M_next;
│ │ │ +
173 return __tmp;
│ │ │ +
174 }
│ │ │ +
175
│ │ │ +
176 /**
│ │ │ +
177 * @brief Forward list iterator equality comparison.
│ │ │ +
178 */
│ │ │ +
179 friend bool
│ │ │ +
│ │ │ +
180 operator==(const _Self& __x, const _Self& __y) noexcept
│ │ │ +
181 { return __x._M_node == __y._M_node; }
│ │ │ +
│ │ │ +
182
│ │ │ +
183#if __cpp_impl_three_way_comparison < 201907L
│ │ │ +
184 /**
│ │ │ +
185 * @brief Forward list iterator inequality comparison.
│ │ │ +
186 */
│ │ │ +
187 friend bool
│ │ │ +
│ │ │ +
188 operator!=(const _Self& __x, const _Self& __y) noexcept
│ │ │ +
189 { return __x._M_node != __y._M_node; }
│ │ │ +
│ │ │ +
190#endif
│ │ │ +
191
│ │ │ +
192 _Self
│ │ │ +
193 _M_next() const noexcept
│ │ │ +
194 {
│ │ │ +
195 if (_M_node)
│ │ │ +
196 return _Fwd_list_iterator(_M_node->_M_next);
│ │ │ +
197 else
│ │ │ +
198 return _Fwd_list_iterator(nullptr);
│ │ │ +
199 }
│ │ │
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++;
│ │ │ +
201 _Fwd_list_node_base* _M_node;
│ │ │ +
202 };
│ │ │ +
│ │ │ +
203
│ │ │ +
204 /**
│ │ │ +
205 * @brief A forward_list::const_iterator.
│ │ │ +
206 *
│ │ │ +
207 * All the functions are op overloads.
│ │ │ +
208 */
│ │ │ +
209 template<typename _Tp>
│ │ │ +
│ │ │ +
210 struct _Fwd_list_const_iterator
│ │ │ +
211 {
│ │ │ +
212 typedef _Fwd_list_const_iterator<_Tp> _Self;
│ │ │ +
213 typedef const _Fwd_list_node<_Tp> _Node;
│ │ │ +
214 typedef _Fwd_list_iterator<_Tp> iterator;
│ │ │ +
215
│ │ │ +
216 typedef _Tp value_type;
│ │ │ +
217 typedef const _Tp* pointer;
│ │ │ +
218 typedef const _Tp& reference;
│ │ │ +
219 typedef ptrdiff_t difference_type;
│ │ │ +
220 typedef std::forward_iterator_tag iterator_category;
│ │ │ +
221
│ │ │ +
222 _Fwd_list_const_iterator() noexcept
│ │ │ +
223 : _M_node() { }
│ │ │ +
224
│ │ │ +
225 explicit
│ │ │ +
226 _Fwd_list_const_iterator(const _Fwd_list_node_base* __n) noexcept
│ │ │ +
227 : _M_node(__n) { }
│ │ │ +
228
│ │ │ +
229 _Fwd_list_const_iterator(const iterator& __iter) noexcept
│ │ │ +
230 : _M_node(__iter._M_node) { }
│ │ │ +
231
│ │ │ +
232 reference
│ │ │ +
233 operator*() const noexcept
│ │ │ +
234 { return *static_cast<_Node*>(this->_M_node)->_M_valptr(); }
│ │ │ +
235
│ │ │ +
236 pointer
│ │ │ +
237 operator->() const noexcept
│ │ │ +
238 { return static_cast<_Node*>(this->_M_node)->_M_valptr(); }
│ │ │ +
239
│ │ │ +
240 _Self&
│ │ │ +
241 operator++() noexcept
│ │ │ +
242 {
│ │ │ +
243 _M_node = _M_node->_M_next;
│ │ │ +
244 return *this;
│ │ │ +
245 }
│ │ │ +
246
│ │ │ +
247 _Self
│ │ │ +
248 operator++(int) noexcept
│ │ │ +
249 {
│ │ │ +
250 _Self __tmp(*this);
│ │ │ +
251 _M_node = _M_node->_M_next;
│ │ │ +
252 return __tmp;
│ │ │
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 }
│ │ │ +
254
│ │ │ +
255 /**
│ │ │ +
256 * @brief Forward list const_iterator equality comparison.
│ │ │ +
257 */
│ │ │ +
258 friend bool
│ │ │ +
│ │ │ +
259 operator==(const _Self& __x, const _Self& __y) noexcept
│ │ │ +
260 { return __x._M_node == __y._M_node; }
│ │ │ +
│ │ │ +
261
│ │ │ +
262#if __cpp_impl_three_way_comparison < 201907L
│ │ │ +
263 /**
│ │ │ +
264 * @brief Forward list const_iterator inequality comparison.
│ │ │ +
265 */
│ │ │ +
266 friend bool
│ │ │ +
│ │ │ +
267 operator!=(const _Self& __x, const _Self& __y) noexcept
│ │ │ +
268 { return __x._M_node != __y._M_node; }
│ │ │ +
│ │ │ +
269#endif
│ │ │ +
270
│ │ │ +
271 _Self
│ │ │ +
272 _M_next() const noexcept
│ │ │ +
273 {
│ │ │ +
274 if (this->_M_node)
│ │ │ +
275 return _Fwd_list_const_iterator(_M_node->_M_next);
│ │ │ +
276 else
│ │ │ +
277 return _Fwd_list_const_iterator(nullptr);
│ │ │ +
278 }
│ │ │ +
279
│ │ │ +
280 const _Fwd_list_node_base* _M_node;
│ │ │ +
281 };
│ │ │ +
│ │ │ +
282
│ │ │ +
283 /**
│ │ │ +
284 * @brief Base class for %forward_list.
│ │ │ +
285 */
│ │ │ +
286 template<typename _Tp, typename _Alloc>
│ │ │ +
│ │ │ +
287 struct _Fwd_list_base
│ │ │ +
288 {
│ │ │ +
289 protected:
│ │ │ +
290 typedef __alloc_rebind<_Alloc, _Fwd_list_node<_Tp>> _Node_alloc_type;
│ │ │ +
291 typedef __gnu_cxx::__alloc_traits<_Node_alloc_type> _Node_alloc_traits;
│ │ │ +
292
│ │ │ +
293 struct _Fwd_list_impl
│ │ │ +
294 : public _Node_alloc_type
│ │ │ +
295 {
│ │ │ +
296 _Fwd_list_node_base _M_head;
│ │ │ +
297
│ │ │ +
298 _Fwd_list_impl()
│ │ │ + │ │ │ +
300 : _Node_alloc_type(), _M_head()
│ │ │ +
301 { }
│ │ │ +
302
│ │ │ +
303 _Fwd_list_impl(_Fwd_list_impl&&) = default;
│ │ │ +
304
│ │ │ +
305 _Fwd_list_impl(_Fwd_list_impl&& __fl, _Node_alloc_type&& __a)
│ │ │ +
306 : _Node_alloc_type(std::move(__a)), _M_head(std::move(__fl._M_head))
│ │ │ +
307 { }
│ │ │ +
308
│ │ │ +
309 _Fwd_list_impl(_Node_alloc_type&& __a)
│ │ │ +
310 : _Node_alloc_type(std::move(__a)), _M_head()
│ │ │ +
311 { }
│ │ │ +
312 };
│ │ │ +
313
│ │ │ +
314 _Fwd_list_impl _M_impl;
│ │ │ +
315
│ │ │ +
316 public:
│ │ │ +
317 typedef _Fwd_list_iterator<_Tp> iterator;
│ │ │ +
318 typedef _Fwd_list_const_iterator<_Tp> const_iterator;
│ │ │ +
319 typedef _Fwd_list_node<_Tp> _Node;
│ │ │ +
320
│ │ │ +
321 _Node_alloc_type&
│ │ │ +
322 _M_get_Node_allocator() noexcept
│ │ │ +
323 { return this->_M_impl; }
│ │ │ +
324
│ │ │ +
325 const _Node_alloc_type&
│ │ │ +
326 _M_get_Node_allocator() const noexcept
│ │ │ +
327 { return this->_M_impl; }
│ │ │ +
328
│ │ │ +
329 _Fwd_list_base() = default;
│ │ │ +
330
│ │ │ +
331 _Fwd_list_base(_Node_alloc_type&& __a)
│ │ │ +
332 : _M_impl(std::move(__a)) { }
│ │ │ +
333
│ │ │ +
334 // When allocators are always equal.
│ │ │ +
335 _Fwd_list_base(_Fwd_list_base&& __lst, _Node_alloc_type&& __a,
│ │ │ + │ │ │ +
337 : _M_impl(std::move(__lst._M_impl), std::move(__a))
│ │ │ +
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 }
│ │ │ +
340 // When allocators are not always equal.
│ │ │ +
341 _Fwd_list_base(_Fwd_list_base&& __lst, _Node_alloc_type&& __a);
│ │ │ +
342
│ │ │ +
343 _Fwd_list_base(_Fwd_list_base&&) = default;
│ │ │ +
344
│ │ │ +
345 ~_Fwd_list_base()
│ │ │ +
346 { _M_erase_after(&_M_impl._M_head, nullptr); }
│ │ │ +
347
│ │ │ +
348 protected:
│ │ │ +
349 _Node*
│ │ │ +
350 _M_get_node()
│ │ │ +
351 {
│ │ │ +
352 auto __ptr = _Node_alloc_traits::allocate(_M_get_Node_allocator(), 1);
│ │ │ +
353 return std::__to_address(__ptr);
│ │ │ +
354 }
│ │ │
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); }
│ │ │ -
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); }
│ │ │ +
356 template<typename... _Args>
│ │ │ +
357 _Node*
│ │ │ +
358 _M_create_node(_Args&&... __args)
│ │ │ +
359 {
│ │ │ +
360 _Node* __node = this->_M_get_node();
│ │ │ +
361 __try
│ │ │ +
362 {
│ │ │ +
363 ::new ((void*)__node) _Node;
│ │ │ +
364 _Node_alloc_traits::construct(_M_get_Node_allocator(),
│ │ │ +
365 __node->_M_valptr(),
│ │ │ +
366 std::forward<_Args>(__args)...);
│ │ │ +
367 }
│ │ │ +
368 __catch(...)
│ │ │ +
369 {
│ │ │ +
370 this->_M_put_node(__node);
│ │ │ +
371 __throw_exception_again;
│ │ │ +
372 }
│ │ │ +
373 return __node;
│ │ │ +
374 }
│ │ │ +
375
│ │ │ +
376 template<typename... _Args>
│ │ │ + │ │ │ +
378 _M_insert_after(const_iterator __pos, _Args&&... __args);
│ │ │ +
379
│ │ │ +
380 void
│ │ │ +
381 _M_put_node(_Node* __p)
│ │ │ +
382 {
│ │ │ +
383 typedef typename _Node_alloc_traits::pointer _Ptr;
│ │ │ +
384 auto __ptr = std::pointer_traits<_Ptr>::pointer_to(*__p);
│ │ │ +
385 _Node_alloc_traits::deallocate(_M_get_Node_allocator(), __ptr, 1);
│ │ │ +
386 }
│ │ │ +
387
│ │ │ + │ │ │ +
389 _M_erase_after(_Fwd_list_node_base* __pos);
│ │ │ +
390
│ │ │ + │ │ │ +
392 _M_erase_after(_Fwd_list_node_base* __pos,
│ │ │ +
393 _Fwd_list_node_base* __last);
│ │ │ +
394 };
│ │ │ +
│ │ │ +
395
│ │ │ +
396 /**
│ │ │ +
397 * @brief A standard container with linear time access to elements,
│ │ │ +
398 * and fixed time insertion/deletion at any point in the sequence.
│ │ │ +
399 *
│ │ │ +
400 * @ingroup sequences
│ │ │ +
401 *
│ │ │ +
402 * @tparam _Tp Type of element.
│ │ │ +
403 * @tparam _Alloc Allocator type, defaults to allocator<_Tp>.
│ │ │ +
404 *
│ │ │ +
405 * Meets the requirements of a <a href="tables.html#65">container</a>, a
│ │ │ +
406 * <a href="tables.html#67">sequence</a>, including the
│ │ │ +
407 * <a href="tables.html#68">optional sequence requirements</a> with the
│ │ │ +
408 * %exception of @c at and @c operator[].
│ │ │ +
409 *
│ │ │ +
410 * This is a @e singly @e linked %list. Traversal up the
│ │ │ +
411 * %list requires linear time, but adding and removing elements (or
│ │ │ +
412 * @e nodes) is done in constant time, regardless of where the
│ │ │ +
413 * change takes place. Unlike std::vector and std::deque,
│ │ │ +
414 * random-access iterators are not provided, so subscripting ( @c
│ │ │ +
415 * [] ) access is not allowed. For algorithms which only need
│ │ │ +
416 * sequential access, this lack makes no difference.
│ │ │ +
417 *
│ │ │ +
418 * Also unlike the other standard containers, std::forward_list provides
│ │ │ +
419 * specialized algorithms %unique to linked lists, such as
│ │ │ +
420 * splicing, sorting, and in-place reversal.
│ │ │ +
421 */
│ │ │ +
422 template<typename _Tp, typename _Alloc = allocator<_Tp>>
│ │ │ +
│ │ │ +
423 class forward_list : private _Fwd_list_base<_Tp, _Alloc>
│ │ │ +
424 {
│ │ │ +
425 static_assert(is_same<typename remove_cv<_Tp>::type, _Tp>::value,
│ │ │ +
426 "std::forward_list must have a non-const, non-volatile value_type");
│ │ │ +
427#if __cplusplus > 201703L || defined __STRICT_ANSI__
│ │ │ +
428 static_assert(is_same<typename _Alloc::value_type, _Tp>::value,
│ │ │ +
429 "std::forward_list must have the same value_type as its allocator");
│ │ │ +
430#endif
│ │ │ +
431
│ │ │ +
432 private:
│ │ │ +
433 typedef _Fwd_list_base<_Tp, _Alloc> _Base;
│ │ │ +
434 typedef _Fwd_list_node_base _Node_base;
│ │ │ +
435 typedef typename _Base::_Node _Node;
│ │ │ +
436 typedef typename _Base::_Node_alloc_type _Node_alloc_type;
│ │ │ +
437 typedef typename _Base::_Node_alloc_traits _Node_alloc_traits;
│ │ │ + │ │ │ +
439
│ │ │ +
440 public:
│ │ │ +
441 // types:
│ │ │ +
442 typedef _Tp value_type;
│ │ │ +
443 typedef typename _Alloc_traits::pointer pointer;
│ │ │ +
444 typedef typename _Alloc_traits::const_pointer const_pointer;
│ │ │ +
445 typedef value_type& reference;
│ │ │ +
446 typedef const value_type& const_reference;
│ │ │ +
447
│ │ │ +
448 typedef typename _Base::iterator iterator;
│ │ │ +
449 typedef typename _Base::const_iterator const_iterator;
│ │ │ +
450 typedef std::size_t size_type;
│ │ │ +
451 typedef std::ptrdiff_t difference_type;
│ │ │ +
452 typedef _Alloc allocator_type;
│ │ │ +
453
│ │ │ +
454 // 23.3.4.2 construct/copy/destroy:
│ │ │ +
455
│ │ │ +
456 /**
│ │ │ +
457 * @brief Creates a %forward_list with no elements.
│ │ │ +
458 */
│ │ │ +
459 forward_list() = default;
│ │ │ +
460
│ │ │ +
461 /**
│ │ │ +
462 * @brief Creates a %forward_list with no elements.
│ │ │ +
463 * @param __al An allocator object.
│ │ │ +
464 */
│ │ │ +
465 explicit
│ │ │ +
│ │ │ +
466 forward_list(const _Alloc& __al) noexcept
│ │ │ +
467 : _Base(_Node_alloc_type(__al))
│ │ │ +
468 { }
│ │ │ +
│ │ │ +
469
│ │ │ +
470 /**
│ │ │ +
471 * @brief Copy constructor with allocator argument.
│ │ │ +
472 * @param __list Input list to copy.
│ │ │ +
473 * @param __al An allocator object.
│ │ │ +
474 */
│ │ │ +
│ │ │ +
475 forward_list(const forward_list& __list, const _Alloc& __al)
│ │ │ +
476 : _Base(_Node_alloc_type(__al))
│ │ │ +
477 { _M_range_initialize(__list.begin(), __list.end()); }
│ │ │ +
│ │ │
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)
│ │ │ -
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 */
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ +
479 private:
│ │ │ +
480 forward_list(forward_list&& __list, _Node_alloc_type&& __al,
│ │ │ + │ │ │ +
482 : _Base(std::move(__list), std::move(__al))
│ │ │ +
483 {
│ │ │ +
484 // If __list is not empty it means its allocator is not equal to __a,
│ │ │ +
485 // so we need to move from each element individually.
│ │ │ + │ │ │ +
487 std::__make_move_if_noexcept_iterator(__list.begin()),
│ │ │ +
488 std::__make_move_if_noexcept_iterator(__list.end()));
│ │ │ +
489 }
│ │ │ +
490
│ │ │ +
491 forward_list(forward_list&& __list, _Node_alloc_type&& __al,
│ │ │ +
492 true_type)
│ │ │ +
493 noexcept
│ │ │ +
494 : _Base(std::move(__list), _Node_alloc_type(__al), true_type{})
│ │ │ +
495 { }
│ │ │ +
496
│ │ │ +
497 public:
│ │ │ +
498 /**
│ │ │ +
499 * @brief Move constructor with allocator argument.
│ │ │ +
500 * @param __list Input list to move.
│ │ │ +
501 * @param __al An allocator object.
│ │ │ +
502 */
│ │ │ +
│ │ │ +
503 forward_list(forward_list&& __list, const _Alloc& __al)
│ │ │ +
504 noexcept(_Node_alloc_traits::_S_always_equal())
│ │ │ +
505 : forward_list(std::move(__list), _Node_alloc_type(__al),
│ │ │ +
506 typename _Node_alloc_traits::is_always_equal{})
│ │ │ +
507 { }
│ │ │ +
│ │ │ +
508
│ │ │ +
509 /**
│ │ │ +
510 * @brief Creates a %forward_list with default constructed elements.
│ │ │ +
511 * @param __n The number of elements to initially create.
│ │ │ +
512 * @param __al An allocator object.
│ │ │ +
513 *
│ │ │ +
514 * This constructor creates the %forward_list with @a __n default
│ │ │ +
515 * constructed elements.
│ │ │ +
516 */
│ │ │ +
517 explicit
│ │ │ +
│ │ │ +
518 forward_list(size_type __n, const _Alloc& __al = _Alloc())
│ │ │ +
519 : _Base(_Node_alloc_type(__al))
│ │ │ +
520 { _M_default_initialize(__n); }
│ │ │ +
│ │ │ +
521
│ │ │ +
522 /**
│ │ │ +
523 * @brief Creates a %forward_list with copies of an exemplar element.
│ │ │ +
524 * @param __n The number of elements to initially create.
│ │ │ +
525 * @param __value An element to copy.
│ │ │ +
526 * @param __al An allocator object.
│ │ │ +
527 *
│ │ │ +
528 * This constructor fills the %forward_list with @a __n copies of
│ │ │ +
529 * @a __value.
│ │ │ +
530 */
│ │ │ +
│ │ │ +
531 forward_list(size_type __n, const _Tp& __value,
│ │ │ +
532 const _Alloc& __al = _Alloc())
│ │ │ +
533 : _Base(_Node_alloc_type(__al))
│ │ │ +
534 { _M_fill_initialize(__n, __value); }
│ │ │ +
│ │ │ +
535
│ │ │ +
536 /**
│ │ │ +
537 * @brief Builds a %forward_list from a range.
│ │ │ +
538 * @param __first An input iterator.
│ │ │ +
539 * @param __last An input iterator.
│ │ │ +
540 * @param __al An allocator object.
│ │ │ +
541 *
│ │ │ +
542 * Create a %forward_list consisting of copies of the elements from
│ │ │ +
543 * [@a __first,@a __last). This is linear in N (where N is
│ │ │ +
544 * distance(@a __first,@a __last)).
│ │ │ +
545 */
│ │ │ +
546 template<typename _InputIterator,
│ │ │ +
547 typename = std::_RequireInputIter<_InputIterator>>
│ │ │ +
│ │ │ +
548 forward_list(_InputIterator __first, _InputIterator __last,
│ │ │ +
549 const _Alloc& __al = _Alloc())
│ │ │ +
550 : _Base(_Node_alloc_type(__al))
│ │ │ +
551 { _M_range_initialize(__first, __last); }
│ │ │ +
│ │ │ +
552
│ │ │ +
553 /**
│ │ │ +
554 * @brief The %forward_list copy constructor.
│ │ │ +
555 * @param __list A %forward_list of identical element and allocator
│ │ │ +
556 * types.
│ │ │ +
557 */
│ │ │ +
│ │ │ + │ │ │ +
559 : _Base(_Node_alloc_traits::_S_select_on_copy(
│ │ │ +
560 __list._M_get_Node_allocator()))
│ │ │ +
561 { _M_range_initialize(__list.begin(), __list.end()); }
│ │ │ +
│ │ │ +
562
│ │ │ +
563 /**
│ │ │ +
564 * @brief The %forward_list move constructor.
│ │ │ +
565 * @param __list A %forward_list of identical element and allocator
│ │ │ +
566 * types.
│ │ │ +
567 *
│ │ │ +
568 * The newly-created %forward_list contains the exact contents of the
│ │ │ +
569 * moved instance. The contents of the moved instance are a valid, but
│ │ │ +
570 * unspecified %forward_list.
│ │ │ +
571 */
│ │ │ + │ │ │ +
573
│ │ │ +
574 /**
│ │ │ +
575 * @brief Builds a %forward_list from an initializer_list
│ │ │ +
576 * @param __il An initializer_list of value_type.
│ │ │ +
577 * @param __al An allocator object.
│ │ │ +
578 *
│ │ │ +
579 * Create a %forward_list consisting of copies of the elements
│ │ │ +
580 * in the initializer_list @a __il. This is linear in __il.size().
│ │ │ +
581 */
│ │ │ +
│ │ │ + │ │ │ +
583 const _Alloc& __al = _Alloc())
│ │ │ +
584 : _Base(_Node_alloc_type(__al))
│ │ │ +
585 { _M_range_initialize(__il.begin(), __il.end()); }
│ │ │ +
│ │ │ +
586
│ │ │ +
587 /**
│ │ │ +
588 * @brief The forward_list dtor.
│ │ │ +
589 */
│ │ │ +
│ │ │ +
590 ~forward_list() noexcept
│ │ │ +
591 { }
│ │ │ +
│ │ │ +
592
│ │ │ +
593 /**
│ │ │ +
594 * @brief The %forward_list assignment operator.
│ │ │ +
595 * @param __list A %forward_list of identical element and allocator
│ │ │ +
596 * types.
│ │ │ +
597 *
│ │ │ +
598 * All the elements of @a __list are copied.
│ │ │ +
599 *
│ │ │ +
600 * Whether the allocator is copied depends on the allocator traits.
│ │ │ +
601 */
│ │ │ + │ │ │ +
603 operator=(const forward_list& __list);
│ │ │ +
604
│ │ │ +
605 /**
│ │ │ +
606 * @brief The %forward_list move assignment operator.
│ │ │ +
607 * @param __list A %forward_list of identical element and allocator
│ │ │ +
608 * types.
│ │ │ +
609 *
│ │ │ +
610 * The contents of @a __list are moved into this %forward_list
│ │ │ +
611 * (without copying, if the allocators permit it).
│ │ │ +
612 *
│ │ │ +
613 * Afterwards @a __list is a valid, but unspecified %forward_list
│ │ │ +
614 *
│ │ │ +
615 * Whether the allocator is moved depends on the allocator traits.
│ │ │ +
616 */
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
619 noexcept(_Node_alloc_traits::_S_nothrow_move())
│ │ │ +
620 {
│ │ │ +
621 constexpr bool __move_storage =
│ │ │ +
622 _Node_alloc_traits::_S_propagate_on_move_assign()
│ │ │ +
623 || _Node_alloc_traits::_S_always_equal();
│ │ │ +
624 _M_move_assign(std::move(__list), __bool_constant<__move_storage>());
│ │ │ +
625 return *this;
│ │ │ +
626 }
│ │ │ +
│ │ │ +
627
│ │ │ +
628 /**
│ │ │ +
629 * @brief The %forward_list initializer list assignment operator.
│ │ │ +
630 * @param __il An initializer_list of value_type.
│ │ │ +
631 *
│ │ │ +
632 * Replace the contents of the %forward_list with copies of the
│ │ │ +
633 * elements in the initializer_list @a __il. This is linear in
│ │ │ +
634 * __il.size().
│ │ │ +
635 */
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
638 {
│ │ │ +
639 assign(__il);
│ │ │ +
640 return *this;
│ │ │ +
641 }
│ │ │ +
│ │ │ +
642
│ │ │ +
643 /**
│ │ │ +
644 * @brief Assigns a range to a %forward_list.
│ │ │ +
645 * @param __first An input iterator.
│ │ │ +
646 * @param __last An input iterator.
│ │ │ +
647 *
│ │ │ +
648 * This function fills a %forward_list with copies of the elements
│ │ │ +
649 * in the range [@a __first,@a __last).
│ │ │ +
650 *
│ │ │ +
651 * Note that the assignment completely changes the %forward_list and
│ │ │ +
652 * that the number of elements of the resulting %forward_list is the
│ │ │ +
653 * same as the number of elements assigned.
│ │ │ +
654 */
│ │ │ +
655 template<typename _InputIterator,
│ │ │ +
656 typename = std::_RequireInputIter<_InputIterator>>
│ │ │ +
657 void
│ │ │ +
│ │ │ +
658 assign(_InputIterator __first, _InputIterator __last)
│ │ │ +
659 {
│ │ │ +
660 typedef is_assignable<_Tp, decltype(*__first)> __assignable;
│ │ │ +
661 _M_assign(__first, __last, __assignable());
│ │ │ +
662 }
│ │ │ +
│ │ │ +
663
│ │ │ +
664 /**
│ │ │ +
665 * @brief Assigns a given value to a %forward_list.
│ │ │ +
666 * @param __n Number of elements to be assigned.
│ │ │ +
667 * @param __val Value to be assigned.
│ │ │ +
668 *
│ │ │ +
669 * This function fills a %forward_list with @a __n copies of the
│ │ │ +
670 * given value. Note that the assignment completely changes the
│ │ │ +
671 * %forward_list, and that the resulting %forward_list has __n
│ │ │ +
672 * elements.
│ │ │ +
673 */
│ │ │ +
674 void
│ │ │ +
│ │ │ +
675 assign(size_type __n, const _Tp& __val)
│ │ │ +
676 { _M_assign_n(__n, __val, is_copy_assignable<_Tp>()); }
│ │ │ +
│ │ │ +
677
│ │ │ +
678 /**
│ │ │ +
679 * @brief Assigns an initializer_list to a %forward_list.
│ │ │ +
680 * @param __il An initializer_list of value_type.
│ │ │ +
681 *
│ │ │ +
682 * Replace the contents of the %forward_list with copies of the
│ │ │ +
683 * elements in the initializer_list @a __il. This is linear in
│ │ │ +
684 * il.size().
│ │ │ +
685 */
│ │ │ +
686 void
│ │ │ +
│ │ │ + │ │ │ +
688 { assign(__il.begin(), __il.end()); }
│ │ │ +
│ │ │ +
689
│ │ │ +
690 /// Get a copy of the memory allocation object.
│ │ │ +
691 allocator_type
│ │ │ +
│ │ │ +
692 get_allocator() const noexcept
│ │ │ +
693 { return allocator_type(this->_M_get_Node_allocator()); }
│ │ │ +
│ │ │ +
694
│ │ │ +
695 // 23.3.4.3 iterators:
│ │ │ +
696
│ │ │ +
697 /**
│ │ │ +
698 * Returns a read/write iterator that points before the first element
│ │ │ +
699 * in the %forward_list. Iteration is done in ordinary element order.
│ │ │ +
700 */
│ │ │ + │ │ │ +
│ │ │ +
702 before_begin() noexcept
│ │ │ +
703 { return iterator(&this->_M_impl._M_head); }
│ │ │ +
│ │ │ +
704
│ │ │ +
705 /**
│ │ │ +
706 * Returns a read-only (constant) iterator that points before the
│ │ │ +
707 * first element in the %forward_list. Iteration is done in ordinary
│ │ │ +
708 * element order.
│ │ │ +
709 */
│ │ │ +
710 const_iterator
│ │ │ +
│ │ │ +
711 before_begin() const noexcept
│ │ │ +
712 { return const_iterator(&this->_M_impl._M_head); }
│ │ │ +
│ │ │ +
713
│ │ │ +
714 /**
│ │ │ +
715 * Returns a read/write iterator that points to the first element
│ │ │ +
716 * in the %forward_list. Iteration is done in ordinary element order.
│ │ │ +
717 */
│ │ │ + │ │ │ +
│ │ │ +
719 begin() noexcept
│ │ │ +
720 { return iterator(this->_M_impl._M_head._M_next); }
│ │ │ +
│ │ │ +
721
│ │ │ +
722 /**
│ │ │ +
723 * Returns a read-only (constant) iterator that points to the first
│ │ │ +
724 * element in the %forward_list. Iteration is done in ordinary
│ │ │ +
725 * element order.
│ │ │ +
726 */
│ │ │ +
727 const_iterator
│ │ │ +
│ │ │ +
728 begin() const noexcept
│ │ │ +
729 { return const_iterator(this->_M_impl._M_head._M_next); }
│ │ │ +
│ │ │ +
730
│ │ │ +
731 /**
│ │ │ +
732 * Returns a read/write iterator that points one past the last
│ │ │ +
733 * element in the %forward_list. Iteration is done in ordinary
│ │ │ +
734 * element order.
│ │ │ +
735 */
│ │ │ + │ │ │ +
│ │ │ +
737 end() noexcept
│ │ │ +
738 { return iterator(nullptr); }
│ │ │ +
│ │ │ +
739
│ │ │ +
740 /**
│ │ │ +
741 * Returns a read-only iterator that points one past the last
│ │ │ +
742 * element in the %forward_list. Iteration is done in ordinary
│ │ │ +
743 * element order.
│ │ │ +
744 */
│ │ │ +
745 const_iterator
│ │ │ +
│ │ │ +
746 end() const noexcept
│ │ │ +
747 { return const_iterator(nullptr); }
│ │ │ +
│ │ │ +
748
│ │ │ +
749 /**
│ │ │ +
750 * Returns a read-only (constant) iterator that points to the
│ │ │ +
751 * first element in the %forward_list. Iteration is done in ordinary
│ │ │ +
752 * element order.
│ │ │ +
753 */
│ │ │ +
754 const_iterator
│ │ │ +
│ │ │ +
755 cbegin() const noexcept
│ │ │ +
756 { return const_iterator(this->_M_impl._M_head._M_next); }
│ │ │ +
│ │ │ +
757
│ │ │ +
758 /**
│ │ │ +
759 * Returns a read-only (constant) iterator that points before the
│ │ │ +
760 * first element in the %forward_list. Iteration is done in ordinary
│ │ │ +
761 * element order.
│ │ │ +
762 */
│ │ │ +
763 const_iterator
│ │ │ +
│ │ │ +
764 cbefore_begin() const noexcept
│ │ │ +
765 { return const_iterator(&this->_M_impl._M_head); }
│ │ │ +
│ │ │ +
766
│ │ │ +
767 /**
│ │ │ +
768 * Returns a read-only (constant) iterator that points one past
│ │ │ +
769 * the last element in the %forward_list. Iteration is done in
│ │ │ +
770 * ordinary element order.
│ │ │ +
771 */
│ │ │ +
772 const_iterator
│ │ │ +
│ │ │ +
773 cend() const noexcept
│ │ │ +
774 { return const_iterator(nullptr); }
│ │ │ +
│ │ │ +
775
│ │ │ +
776 /**
│ │ │ +
777 * Returns true if the %forward_list is empty. (Thus begin() would
│ │ │ +
778 * equal end().)
│ │ │ +
779 */
│ │ │ +
780 _GLIBCXX_NODISCARD bool
│ │ │ +
│ │ │ +
781 empty() const noexcept
│ │ │ +
782 { return this->_M_impl._M_head._M_next == nullptr; }
│ │ │ +
│ │ │ +
783
│ │ │ +
784 /**
│ │ │ +
785 * Returns the largest possible number of elements of %forward_list.
│ │ │ +
786 */
│ │ │ + │ │ │ +
│ │ │ +
788 max_size() const noexcept
│ │ │ +
789 { return _Node_alloc_traits::max_size(this->_M_get_Node_allocator()); }
│ │ │ +
│ │ │ +
790
│ │ │ +
791 // 23.3.4.4 element access:
│ │ │ +
792
│ │ │ +
793 /**
│ │ │ +
794 * Returns a read/write reference to the data at the first
│ │ │ +
795 * element of the %forward_list.
│ │ │ +
796 */
│ │ │ +
797 reference
│ │ │ +
│ │ │ + │ │ │ +
799 {
│ │ │ +
800 _Node* __front = static_cast<_Node*>(this->_M_impl._M_head._M_next);
│ │ │ +
801 return *__front->_M_valptr();
│ │ │ +
802 }
│ │ │ +
│ │ │ +
803
│ │ │ +
804 /**
│ │ │ +
805 * Returns a read-only (constant) reference to the data at the first
│ │ │ +
806 * element of the %forward_list.
│ │ │ +
807 */
│ │ │ +
808 const_reference
│ │ │ +
│ │ │ +
809 front() const
│ │ │ +
810 {
│ │ │ +
811 _Node* __front = static_cast<_Node*>(this->_M_impl._M_head._M_next);
│ │ │ +
812 return *__front->_M_valptr();
│ │ │ +
813 }
│ │ │ +
│ │ │ +
814
│ │ │ +
815 // 23.3.4.5 modifiers:
│ │ │ +
816
│ │ │ +
817 /**
│ │ │ +
818 * @brief Constructs object in %forward_list at the front of the
│ │ │ +
819 * list.
│ │ │ +
820 * @param __args Arguments.
│ │ │ +
821 *
│ │ │ +
822 * This function will insert an object of type Tp constructed
│ │ │ +
823 * with Tp(std::forward<Args>(args)...) at the front of the list
│ │ │ +
824 * Due to the nature of a %forward_list this operation can
│ │ │ +
825 * be done in constant time, and does not invalidate iterators
│ │ │ +
826 * and references.
│ │ │ +
827 */
│ │ │ +
828 template<typename... _Args>
│ │ │ +
829#if __cplusplus > 201402L
│ │ │ +
830 reference
│ │ │ +
831#else
│ │ │ +
832 void
│ │ │ +
833#endif
│ │ │ +
│ │ │ +
834 emplace_front(_Args&&... __args)
│ │ │ +
835 {
│ │ │ +
836 this->_M_insert_after(cbefore_begin(),
│ │ │ +
837 std::forward<_Args>(__args)...);
│ │ │ +
838#if __cplusplus > 201402L
│ │ │ +
839 return front();
│ │ │ +
840#endif
│ │ │ +
841 }
│ │ │ +
│ │ │ +
842
│ │ │ +
843 /**
│ │ │ +
844 * @brief Add data to the front of the %forward_list.
│ │ │ +
845 * @param __val Data to be added.
│ │ │ +
846 *
│ │ │ +
847 * This is a typical stack operation. The function creates an
│ │ │ +
848 * element at the front of the %forward_list and assigns the given
│ │ │ +
849 * data to it. Due to the nature of a %forward_list this operation
│ │ │ +
850 * can be done in constant time, and does not invalidate iterators
│ │ │ +
851 * and references.
│ │ │ +
852 */
│ │ │ +
853 void
│ │ │ +
│ │ │ +
854 push_front(const _Tp& __val)
│ │ │ +
855 { this->_M_insert_after(cbefore_begin(), __val); }
│ │ │ +
│ │ │ +
856
│ │ │ +
857 /**
│ │ │ +
858 *
│ │ │ +
859 */
│ │ │ +
860 void
│ │ │ +
861 push_front(_Tp&& __val)
│ │ │ +
862 { this->_M_insert_after(cbefore_begin(), std::move(__val)); }
│ │ │ +
863
│ │ │ +
864 /**
│ │ │ +
865 * @brief Removes first element.
│ │ │ +
866 *
│ │ │ +
867 * This is a typical stack operation. It shrinks the %forward_list
│ │ │ +
868 * by one. Due to the nature of a %forward_list this operation can
│ │ │ +
869 * be done in constant time, and only invalidates iterators/references
│ │ │ +
870 * to the element being removed.
│ │ │ +
871 *
│ │ │ +
872 * Note that no data is returned, and if the first element's data
│ │ │ +
873 * is needed, it should be retrieved before pop_front() is
│ │ │ +
874 * called.
│ │ │ +
875 */
│ │ │ +
876 void
│ │ │ +
│ │ │ + │ │ │ +
878 { this->_M_erase_after(&this->_M_impl._M_head); }
│ │ │ +
│ │ │ +
879
│ │ │ +
880 /**
│ │ │ +
881 * @brief Constructs object in %forward_list after the specified
│ │ │ +
882 * iterator.
│ │ │ +
883 * @param __pos A const_iterator into the %forward_list.
│ │ │ +
884 * @param __args Arguments.
│ │ │ +
885 * @return An iterator that points to the inserted data.
│ │ │ +
886 *
│ │ │ +
887 * This function will insert an object of type T constructed
│ │ │ +
888 * with T(std::forward<Args>(args)...) after the specified
│ │ │ +
889 * location. Due to the nature of a %forward_list this operation can
│ │ │ +
890 * be done in constant time, and does not invalidate iterators
│ │ │ +
891 * and references.
│ │ │ +
892 */
│ │ │ +
893 template<typename... _Args>
│ │ │ + │ │ │ +
│ │ │ +
895 emplace_after(const_iterator __pos, _Args&&... __args)
│ │ │ +
896 { return iterator(this->_M_insert_after(__pos,
│ │ │ +
897 std::forward<_Args>(__args)...)); }
│ │ │ +
│ │ │ +
898
│ │ │ +
899 /**
│ │ │ +
900 * @brief Inserts given value into %forward_list after specified
│ │ │ +
901 * iterator.
│ │ │ +
902 * @param __pos An iterator into the %forward_list.
│ │ │ +
903 * @param __val Data to be inserted.
│ │ │ +
904 * @return An iterator that points to the inserted data.
│ │ │ +
905 *
│ │ │ +
906 * This function will insert a copy of the given value after
│ │ │ +
907 * the specified location. Due to the nature of a %forward_list this
│ │ │ +
908 * operation can be done in constant time, and does not
│ │ │ +
909 * invalidate iterators and references.
│ │ │ +
910 */
│ │ │ + │ │ │ +
│ │ │ +
912 insert_after(const_iterator __pos, const _Tp& __val)
│ │ │ +
913 { return iterator(this->_M_insert_after(__pos, __val)); }
│ │ │ +
│ │ │ +
914
│ │ │ +
915 /**
│ │ │ +
916 *
│ │ │ +
917 */
│ │ │ + │ │ │ +
919 insert_after(const_iterator __pos, _Tp&& __val)
│ │ │ +
920 { return iterator(this->_M_insert_after(__pos, std::move(__val))); }
│ │ │ +
921
│ │ │ +
922 /**
│ │ │ +
923 * @brief Inserts a number of copies of given data into the
│ │ │ +
924 * %forward_list.
│ │ │ +
925 * @param __pos An iterator into the %forward_list.
│ │ │ +
926 * @param __n Number of elements to be inserted.
│ │ │ +
927 * @param __val Data to be inserted.
│ │ │ +
928 * @return An iterator pointing to the last inserted copy of
│ │ │ +
929 * @a val or @a pos if @a n == 0.
│ │ │ +
930 *
│ │ │ +
931 * This function will insert a specified number of copies of the
│ │ │ +
932 * given data after the location specified by @a pos.
│ │ │ +
933 *
│ │ │ +
934 * This operation is linear in the number of elements inserted and
│ │ │ +
935 * does not invalidate iterators and references.
│ │ │ +
936 */
│ │ │ +
937 iterator
│ │ │ +
938 insert_after(const_iterator __pos, size_type __n, const _Tp& __val);
│ │ │ +
939
│ │ │ +
940 /**
│ │ │ +
941 * @brief Inserts a range into the %forward_list.
│ │ │ +
942 * @param __pos An iterator into the %forward_list.
│ │ │ +
943 * @param __first An input iterator.
│ │ │ +
944 * @param __last An input iterator.
│ │ │ +
945 * @return An iterator pointing to the last inserted element or
│ │ │ +
946 * @a __pos if @a __first == @a __last.
│ │ │ +
947 *
│ │ │ +
948 * This function will insert copies of the data in the range
│ │ │ +
949 * [@a __first,@a __last) into the %forward_list after the
│ │ │ +
950 * location specified by @a __pos.
│ │ │ +
951 *
│ │ │ +
952 * This operation is linear in the number of elements inserted and
│ │ │ +
953 * does not invalidate iterators and references.
│ │ │ +
954 */
│ │ │ +
955 template<typename _InputIterator,
│ │ │ +
956 typename = std::_RequireInputIter<_InputIterator>>
│ │ │ +
957 iterator
│ │ │ +
958 insert_after(const_iterator __pos,
│ │ │ +
959 _InputIterator __first, _InputIterator __last);
│ │ │ +
960
│ │ │ +
961 /**
│ │ │ +
962 * @brief Inserts the contents of an initializer_list into
│ │ │ +
963 * %forward_list after the specified iterator.
│ │ │ +
964 * @param __pos An iterator into the %forward_list.
│ │ │ +
965 * @param __il An initializer_list of value_type.
│ │ │ +
966 * @return An iterator pointing to the last inserted element
│ │ │ +
967 * or @a __pos if @a __il is empty.
│ │ │ +
968 *
│ │ │ +
969 * This function will insert copies of the data in the
│ │ │ +
970 * initializer_list @a __il into the %forward_list before the location
│ │ │ +
971 * specified by @a __pos.
│ │ │ +
972 *
│ │ │ +
973 * This operation is linear in the number of elements inserted and
│ │ │ +
974 * does not invalidate iterators and references.
│ │ │ +
975 */
│ │ │ +
976 iterator
│ │ │ +
│ │ │ +
977 insert_after(const_iterator __pos, std::initializer_list<_Tp> __il)
│ │ │ +
978 { return insert_after(__pos, __il.begin(), __il.end()); }
│ │ │ +
│ │ │ +
979
│ │ │ +
980 /**
│ │ │ +
981 * @brief Removes the element pointed to by the iterator following
│ │ │ +
982 * @c pos.
│ │ │ +
983 * @param __pos Iterator pointing before element to be erased.
│ │ │ +
984 * @return An iterator pointing to the element following the one
│ │ │ +
985 * that was erased, or end() if no such element exists.
│ │ │ +
986 *
│ │ │ +
987 * This function will erase the element at the given position and
│ │ │ +
988 * thus shorten the %forward_list by one.
│ │ │ +
989 *
│ │ │ +
990 * Due to the nature of a %forward_list this operation can be done
│ │ │ +
991 * in constant time, and only invalidates iterators/references to
│ │ │ +
992 * the element being removed. The user is also cautioned that
│ │ │ +
993 * this function only erases the element, and that if the element
│ │ │ +
994 * is itself a pointer, the pointed-to memory is not touched in
│ │ │ +
995 * any way. Managing the pointer is the user's responsibility.
│ │ │ +
996 */
│ │ │ + │ │ │ +
│ │ │ +
998 erase_after(const_iterator __pos)
│ │ │ +
999 { return iterator(this->_M_erase_after(const_cast<_Node_base*>
│ │ │ +
1000 (__pos._M_node))); }
│ │ │ +
│ │ │ +
1001
│ │ │ +
1002 /**
│ │ │ +
1003 * @brief Remove a range of elements.
│ │ │ +
1004 * @param __pos Iterator pointing before the first element to be
│ │ │ +
1005 * erased.
│ │ │ +
1006 * @param __last Iterator pointing to one past the last element to be
│ │ │ +
1007 * erased.
│ │ │ +
1008 * @return @ __last.
│ │ │ +
1009 *
│ │ │ +
1010 * This function will erase the elements in the range
│ │ │ +
1011 * @a (__pos,__last) and shorten the %forward_list accordingly.
│ │ │ +
1012 *
│ │ │ +
1013 * This operation is linear time in the size of the range and only
│ │ │ +
1014 * invalidates iterators/references to the element being removed.
│ │ │ +
1015 * The user is also cautioned that this function only erases the
│ │ │ +
1016 * elements, and that if the elements themselves are pointers, the
│ │ │ +
1017 * pointed-to memory is not touched in any way. Managing the pointer
│ │ │ +
1018 * is the user's responsibility.
│ │ │ +
1019 */
│ │ │ +
1020 iterator
│ │ │ +
│ │ │ +
1021 erase_after(const_iterator __pos, const_iterator __last)
│ │ │ +
1022 { return iterator(this->_M_erase_after(const_cast<_Node_base*>
│ │ │ +
1023 (__pos._M_node),
│ │ │ +
1024 const_cast<_Node_base*>
│ │ │ +
1025 (__last._M_node))); }
│ │ │ +
│ │ │ +
1026
│ │ │ +
1027 /**
│ │ │ +
1028 * @brief Swaps data with another %forward_list.
│ │ │ +
1029 * @param __list A %forward_list of the same element and allocator
│ │ │ +
1030 * types.
│ │ │ +
1031 *
│ │ │ +
1032 * This exchanges the elements between two lists in constant
│ │ │ +
1033 * time. Note that the global std::swap() function is
│ │ │ +
1034 * specialized such that std::swap(l1,l2) will feed to this
│ │ │ +
1035 * function.
│ │ │ +
1036 *
│ │ │ +
1037 * Whether the allocators are swapped depends on the allocator traits.
│ │ │ +
1038 */
│ │ │ +
1039 void
│ │ │ +
│ │ │ +
1040 swap(forward_list& __list) noexcept
│ │ │ +
1041 {
│ │ │ +
1042 std::swap(this->_M_impl._M_head._M_next,
│ │ │ +
1043 __list._M_impl._M_head._M_next);
│ │ │ +
1044 _Node_alloc_traits::_S_on_swap(this->_M_get_Node_allocator(),
│ │ │ +
1045 __list._M_get_Node_allocator());
│ │ │ +
1046 }
│ │ │ +
│ │ │ +
1047
│ │ │ +
1048 /**
│ │ │ +
1049 * @brief Resizes the %forward_list to the specified number of
│ │ │ +
1050 * elements.
│ │ │ +
1051 * @param __sz Number of elements the %forward_list should contain.
│ │ │ +
1052 *
│ │ │ +
1053 * This function will %resize the %forward_list to the specified
│ │ │ +
1054 * number of elements. If the number is smaller than the
│ │ │ +
1055 * %forward_list's current number of elements the %forward_list
│ │ │ +
1056 * is truncated, otherwise the %forward_list is extended and the
│ │ │ +
1057 * new elements are default constructed.
│ │ │ +
1058 */
│ │ │ +
1059 void
│ │ │ +
1060 resize(size_type __sz);
│ │ │ +
1061
│ │ │ +
1062 /**
│ │ │ +
1063 * @brief Resizes the %forward_list to the specified number of
│ │ │ +
1064 * elements.
│ │ │ +
1065 * @param __sz Number of elements the %forward_list should contain.
│ │ │ +
1066 * @param __val Data with which new elements should be populated.
│ │ │ +
1067 *
│ │ │ +
1068 * This function will %resize the %forward_list to the specified
│ │ │ +
1069 * number of elements. If the number is smaller than the
│ │ │ +
1070 * %forward_list's current number of elements the %forward_list
│ │ │ +
1071 * is truncated, otherwise the %forward_list is extended and new
│ │ │ +
1072 * elements are populated with given data.
│ │ │ +
1073 */
│ │ │ +
1074 void
│ │ │ +
1075 resize(size_type __sz, const value_type& __val);
│ │ │ +
1076
│ │ │ +
1077 /**
│ │ │ +
1078 * @brief Erases all the elements.
│ │ │ +
1079 *
│ │ │ +
1080 * Note that this function only erases
│ │ │ +
1081 * the elements, and that if the elements themselves are
│ │ │ +
1082 * pointers, the pointed-to memory is not touched in any way.
│ │ │ +
1083 * Managing the pointer is the user's responsibility.
│ │ │ +
1084 */
│ │ │ +
1085 void
│ │ │ +
│ │ │ +
1086 clear() noexcept
│ │ │ +
1087 { this->_M_erase_after(&this->_M_impl._M_head, nullptr); }
│ │ │ +
│ │ │ +
1088
│ │ │ +
1089 // 23.3.4.6 forward_list operations:
│ │ │ +
1090
│ │ │ +
1091 /**
│ │ │ +
1092 * @brief Insert contents of another %forward_list.
│ │ │ +
1093 * @param __pos Iterator referencing the element to insert after.
│ │ │ +
1094 * @param __list Source list.
│ │ │ +
1095 *
│ │ │ +
1096 * The elements of @a list are inserted in constant time after
│ │ │ +
1097 * the element referenced by @a pos. @a list becomes an empty
│ │ │ +
1098 * list.
│ │ │ +
1099 *
│ │ │ +
1100 * Requires this != @a x.
│ │ │ +
1101 */
│ │ │ +
1102 void
│ │ │ +
│ │ │ +
1103 splice_after(const_iterator __pos, forward_list&& __list) noexcept
│ │ │ +
1104 {
│ │ │ +
1105 if (!__list.empty())
│ │ │ +
1106 _M_splice_after(__pos, __list.before_begin(), __list.end());
│ │ │ +
1107 }
│ │ │ +
│ │ │ +
1108
│ │ │ +
1109 void
│ │ │ +
1110 splice_after(const_iterator __pos, forward_list& __list) noexcept
│ │ │ +
1111 { splice_after(__pos, std::move(__list)); }
│ │ │ +
1112
│ │ │ +
1113 /**
│ │ │ +
1114 * @brief Insert element from another %forward_list.
│ │ │ +
1115 * @param __pos Iterator referencing the element to insert after.
│ │ │ +
1116 * @param __list Source list.
│ │ │ +
1117 * @param __i Iterator referencing the element before the element
│ │ │ +
1118 * to move.
│ │ │ +
1119 *
│ │ │ +
1120 * Removes the element in list @a list referenced by @a i and
│ │ │ +
1121 * inserts it into the current list after @a pos.
│ │ │ +
1122 */
│ │ │ +
1123 void
│ │ │ +
1124 splice_after(const_iterator __pos, forward_list&& __list,
│ │ │ +
1125 const_iterator __i) noexcept;
│ │ │ +
1126
│ │ │ +
1127 void
│ │ │ +
1128 splice_after(const_iterator __pos, forward_list& __list,
│ │ │ +
1129 const_iterator __i) noexcept
│ │ │ +
1130 { splice_after(__pos, std::move(__list), __i); }
│ │ │ +
1131
│ │ │ +
1132 /**
│ │ │ +
1133 * @brief Insert range from another %forward_list.
│ │ │ +
1134 * @param __pos Iterator referencing the element to insert after.
│ │ │ +
1135 * @param __list Source list.
│ │ │ +
1136 * @param __before Iterator referencing before the start of range
│ │ │ +
1137 * in list.
│ │ │ +
1138 * @param __last Iterator referencing the end of range in list.
│ │ │ +
1139 *
│ │ │ +
1140 * Removes elements in the range (__before,__last) and inserts them
│ │ │ +
1141 * after @a __pos in constant time.
│ │ │ +
1142 *
│ │ │ +
1143 * Undefined if @a __pos is in (__before,__last).
│ │ │ +
1144 * @{
│ │ │ +
1145 */
│ │ │ +
1146 void
│ │ │ +
│ │ │ +
1147 splice_after(const_iterator __pos, forward_list&&,
│ │ │ +
1148 const_iterator __before, const_iterator __last) noexcept
│ │ │ +
1149 { _M_splice_after(__pos, __before, __last); }
│ │ │ +
│ │ │ +
1150
│ │ │ +
1151 void
│ │ │ +
│ │ │ +
1152 splice_after(const_iterator __pos, forward_list&,
│ │ │ +
1153 const_iterator __before, const_iterator __last) noexcept
│ │ │ +
1154 { _M_splice_after(__pos, __before, __last); }
│ │ │ +
│ │ │ +
1155 /// @}
│ │ │ +
1156
│ │ │ +
1157 private:
│ │ │ +
1158#if __cplusplus > 201703L
│ │ │ +
1159# define __cpp_lib_list_remove_return_type 201806L
│ │ │ +
1160 using __remove_return_type = size_type;
│ │ │ +
1161# define _GLIBCXX_FWDLIST_REMOVE_RETURN_TYPE_TAG \
│ │ │ +
1162 __attribute__((__abi_tag__("__cxx20")))
│ │ │ +
1163#else
│ │ │ +
1164 using __remove_return_type = void;
│ │ │ +
1165# define _GLIBCXX_FWDLIST_REMOVE_RETURN_TYPE_TAG
│ │ │ +
1166#endif
│ │ │ +
1167 public:
│ │ │ +
1168
│ │ │ +
1169 /**
│ │ │ +
1170 * @brief Remove all elements equal to value.
│ │ │ +
1171 * @param __val The value to remove.
│ │ │ +
1172 *
│ │ │ +
1173 * Removes every element in the list equal to @a __val.
│ │ │ +
1174 * Remaining elements stay in list order. Note that this
│ │ │ +
1175 * function only erases the elements, and that if the elements
│ │ │ +
1176 * themselves are pointers, the pointed-to memory is not
│ │ │ +
1177 * touched in any way. Managing the pointer is the user's
│ │ │ +
1178 * responsibility.
│ │ │ +
1179 */
│ │ │ +
1180 _GLIBCXX_FWDLIST_REMOVE_RETURN_TYPE_TAG
│ │ │ +
1181 __remove_return_type
│ │ │ +
1182 remove(const _Tp& __val);
│ │ │ +
1183
│ │ │ +
1184 /**
│ │ │ +
1185 * @brief Remove all elements satisfying a predicate.
│ │ │ +
1186 * @param __pred Unary predicate function or object.
│ │ │ +
1187 *
│ │ │ +
1188 * Removes every element in the list for which the predicate
│ │ │ +
1189 * returns true. Remaining elements stay in list order. Note
│ │ │ +
1190 * that this function only erases the elements, and that if the
│ │ │ +
1191 * elements themselves are pointers, the pointed-to memory is
│ │ │ +
1192 * not touched in any way. Managing the pointer is the user's
│ │ │ +
1193 * responsibility.
│ │ │ +
1194 */
│ │ │ +
1195 template<typename _Pred>
│ │ │ +
1196 __remove_return_type
│ │ │ +
1197 remove_if(_Pred __pred);
│ │ │ +
1198
│ │ │ +
1199 /**
│ │ │ +
1200 * @brief Remove consecutive duplicate elements.
│ │ │ +
1201 *
│ │ │ +
1202 * For each consecutive set of elements with the same value,
│ │ │ +
1203 * remove all but the first one. Remaining elements stay in
│ │ │ +
1204 * list order. Note that this function only erases the
│ │ │ +
1205 * elements, and that if the elements themselves are pointers,
│ │ │ +
1206 * the pointed-to memory is not touched in any way. Managing
│ │ │ +
1207 * the pointer is the user's responsibility.
│ │ │ +
1208 */
│ │ │ +
1209 _GLIBCXX_FWDLIST_REMOVE_RETURN_TYPE_TAG
│ │ │ +
1210 __remove_return_type
│ │ │ +
│ │ │ + │ │ │ +
1212 { return unique(std::equal_to<_Tp>()); }
│ │ │ +
│ │ │ +
1213
│ │ │ +
1214#undef _GLIBCXX_FWDLIST_REMOVE_RETURN_TYPE_TAG
│ │ │ +
1215
│ │ │ +
1216 /**
│ │ │ +
1217 * @brief Remove consecutive elements satisfying a predicate.
│ │ │ +
1218 * @param __binary_pred Binary predicate function or object.
│ │ │ +
1219 *
│ │ │ +
1220 * For each consecutive set of elements [first,last) that
│ │ │ +
1221 * satisfy predicate(first,i) where i is an iterator in
│ │ │ +
1222 * [first,last), remove all but the first one. Remaining
│ │ │ +
1223 * elements stay in list order. Note that this function only
│ │ │ +
1224 * erases the elements, and that if the elements themselves are
│ │ │ +
1225 * pointers, the pointed-to memory is not touched in any way.
│ │ │ +
1226 * Managing the pointer is the user's responsibility.
│ │ │ +
1227 */
│ │ │ +
1228 template<typename _BinPred>
│ │ │ +
1229 __remove_return_type
│ │ │ +
1230 unique(_BinPred __binary_pred);
│ │ │ +
1231
│ │ │ +
1232 /**
│ │ │ +
1233 * @brief Merge sorted lists.
│ │ │ +
1234 * @param __list Sorted list to merge.
│ │ │ +
1235 *
│ │ │ +
1236 * Assumes that both @a list and this list are sorted according to
│ │ │ +
1237 * operator<(). Merges elements of @a __list into this list in
│ │ │ +
1238 * sorted order, leaving @a __list empty when complete. Elements in
│ │ │ +
1239 * this list precede elements in @a __list that are equal.
│ │ │ +
1240 */
│ │ │ +
1241 void
│ │ │ +
│ │ │ + │ │ │ +
1243 { merge(std::move(__list), std::less<_Tp>()); }
│ │ │ +
│ │ │ +
1244
│ │ │ +
1245 void
│ │ │ +
1246 merge(forward_list& __list)
│ │ │ +
1247 { merge(std::move(__list)); }
│ │ │ +
1248
│ │ │ +
1249 /**
│ │ │ +
1250 * @brief Merge sorted lists according to comparison function.
│ │ │ +
1251 * @param __list Sorted list to merge.
│ │ │ +
1252 * @param __comp Comparison function defining sort order.
│ │ │ +
1253 *
│ │ │ +
1254 * Assumes that both @a __list and this list are sorted according to
│ │ │ +
1255 * comp. Merges elements of @a __list into this list
│ │ │ +
1256 * in sorted order, leaving @a __list empty when complete. Elements
│ │ │ +
1257 * in this list precede elements in @a __list that are equivalent
│ │ │ +
1258 * according to comp().
│ │ │ +
1259 */
│ │ │ +
1260 template<typename _Comp>
│ │ │ +
1261 void
│ │ │ +
1262 merge(forward_list&& __list, _Comp __comp);
│ │ │ +
1263
│ │ │ +
1264 template<typename _Comp>
│ │ │ +
1265 void
│ │ │ +
1266 merge(forward_list& __list, _Comp __comp)
│ │ │ +
1267 { merge(std::move(__list), __comp); }
│ │ │ +
1268
│ │ │ +
1269 /**
│ │ │ +
1270 * @brief Sort the elements of the list.
│ │ │ +
1271 *
│ │ │ +
1272 * Sorts the elements of this list in NlogN time. Equivalent
│ │ │ +
1273 * elements remain in list order.
│ │ │ +
1274 */
│ │ │ +
1275 void
│ │ │ +
│ │ │ + │ │ │ +
1277 { sort(std::less<_Tp>()); }
│ │ │ +
│ │ │ +
1278
│ │ │ +
1279 /**
│ │ │ +
1280 * @brief Sort the forward_list using a comparison function.
│ │ │ +
1281 *
│ │ │ +
1282 * Sorts the elements of this list in NlogN time. Equivalent
│ │ │ +
1283 * elements remain in list order.
│ │ │ +
1284 */
│ │ │ +
1285 template<typename _Comp>
│ │ │ +
1286 void
│ │ │ +
1287 sort(_Comp __comp);
│ │ │ +
1288
│ │ │ +
1289 /**
│ │ │ +
1290 * @brief Reverse the elements in list.
│ │ │ +
1291 *
│ │ │ +
1292 * Reverse the order of elements in the list in linear time.
│ │ │ +
1293 */
│ │ │ +
1294 void
│ │ │ +
│ │ │ +
1295 reverse() noexcept
│ │ │ +
1296 { this->_M_impl._M_head._M_reverse_after(); }
│ │ │ +
│ │ │ +
1297
│ │ │ +
1298 private:
│ │ │ +
1299 // Called by the range constructor to implement [23.3.4.2]/9
│ │ │ +
1300 template<typename _InputIterator>
│ │ │ +
1301 void
│ │ │ +
1302 _M_range_initialize(_InputIterator __first, _InputIterator __last);
│ │ │ +
1303
│ │ │ +
1304 // Called by forward_list(n,v,a), and the range constructor when it
│ │ │ +
1305 // turns out to be the same thing.
│ │ │ +
1306 void
│ │ │ +
1307 _M_fill_initialize(size_type __n, const value_type& __value);
│ │ │ +
1308
│ │ │ +
1309 // Called by splice_after and insert_after.
│ │ │ +
1310 iterator
│ │ │ +
1311 _M_splice_after(const_iterator __pos, const_iterator __before,
│ │ │ +
1312 const_iterator __last);
│ │ │ +
1313
│ │ │ +
1314 // Called by forward_list(n).
│ │ │ +
1315 void
│ │ │ +
1316 _M_default_initialize(size_type __n);
│ │ │ +
1317
│ │ │ +
1318 // Called by resize(sz).
│ │ │ +
1319 void
│ │ │ +
1320 _M_default_insert_after(const_iterator __pos, size_type __n);
│ │ │ +
1321
│ │ │ +
1322 // Called by operator=(forward_list&&)
│ │ │ +
1323 void
│ │ │ +
1324 _M_move_assign(forward_list&& __list, true_type) noexcept
│ │ │ +
1325 {
│ │ │ +
1326 clear();
│ │ │ +
1327 this->_M_impl._M_head._M_next = __list._M_impl._M_head._M_next;
│ │ │ +
1328 __list._M_impl._M_head._M_next = nullptr;
│ │ │ +
1329 std::__alloc_on_move(this->_M_get_Node_allocator(),
│ │ │ +
1330 __list._M_get_Node_allocator());
│ │ │ +
1331 }
│ │ │ +
1332
│ │ │ +
1333 // Called by operator=(forward_list&&)
│ │ │ +
1334 void
│ │ │ +
1335 _M_move_assign(forward_list&& __list, false_type)
│ │ │ +
1336 {
│ │ │ +
1337 if (__list._M_get_Node_allocator() == this->_M_get_Node_allocator())
│ │ │ +
1338 _M_move_assign(std::move(__list), true_type());
│ │ │ +
1339 else
│ │ │ +
1340 // The rvalue's allocator cannot be moved, or is not equal,
│ │ │ +
1341 // so we need to individually move each element.
│ │ │ +
1342 this->assign(std::make_move_iterator(__list.begin()),
│ │ │ +
1343 std::make_move_iterator(__list.end()));
│ │ │ +
1344 }
│ │ │ +
1345
│ │ │ +
1346 // Called by assign(_InputIterator, _InputIterator) if _Tp is
│ │ │ +
1347 // CopyAssignable.
│ │ │ +
1348 template<typename _InputIterator>
│ │ │ +
1349 void
│ │ │ +
1350 _M_assign(_InputIterator __first, _InputIterator __last, true_type)
│ │ │ +
1351 {
│ │ │ +
1352 auto __prev = before_begin();
│ │ │ +
1353 auto __curr = begin();
│ │ │ +
1354 auto __end = end();
│ │ │ +
1355 while (__curr != __end && __first != __last)
│ │ │ +
1356 {
│ │ │ +
1357 *__curr = *__first;
│ │ │ +
1358 ++__prev;
│ │ │ +
1359 ++__curr;
│ │ │ +
1360 ++__first;
│ │ │ +
1361 }
│ │ │ +
1362 if (__first != __last)
│ │ │ +
1363 insert_after(__prev, __first, __last);
│ │ │ +
1364 else if (__curr != __end)
│ │ │ +
1365 erase_after(__prev, __end);
│ │ │ +
1366 }
│ │ │ +
1367
│ │ │ +
1368 // Called by assign(_InputIterator, _InputIterator) if _Tp is not
│ │ │ +
1369 // CopyAssignable.
│ │ │ +
1370 template<typename _InputIterator>
│ │ │ +
1371 void
│ │ │ +
1372 _M_assign(_InputIterator __first, _InputIterator __last, false_type)
│ │ │ +
1373 {
│ │ │ +
1374 clear();
│ │ │ +
1375 insert_after(cbefore_begin(), __first, __last);
│ │ │ +
1376 }
│ │ │ +
1377
│ │ │ +
1378 // Called by assign(size_type, const _Tp&) if Tp is CopyAssignable
│ │ │ +
1379 void
│ │ │ +
1380 _M_assign_n(size_type __n, const _Tp& __val, true_type)
│ │ │ +
1381 {
│ │ │ +
1382 auto __prev = before_begin();
│ │ │ +
1383 auto __curr = begin();
│ │ │ +
1384 auto __end = end();
│ │ │ +
1385 while (__curr != __end && __n > 0)
│ │ │ +
1386 {
│ │ │ +
1387 *__curr = __val;
│ │ │ +
1388 ++__prev;
│ │ │ +
1389 ++__curr;
│ │ │ +
1390 --__n;
│ │ │ +
1391 }
│ │ │ +
1392 if (__n > 0)
│ │ │ +
1393 insert_after(__prev, __n, __val);
│ │ │ +
1394 else if (__curr != __end)
│ │ │ +
1395 erase_after(__prev, __end);
│ │ │ +
1396 }
│ │ │ +
1397
│ │ │ +
1398 // Called by assign(size_type, const _Tp&) if Tp is non-CopyAssignable
│ │ │ +
1399 void
│ │ │ +
1400 _M_assign_n(size_type __n, const _Tp& __val, false_type)
│ │ │ +
1401 {
│ │ │ +
1402 clear();
│ │ │ +
1403 insert_after(cbefore_begin(), __n, __val);
│ │ │ +
1404 }
│ │ │ +
1405 };
│ │ │ +
│ │ │ +
1406
│ │ │ +
1407#if __cpp_deduction_guides >= 201606
│ │ │ +
1408 template<typename _InputIterator, typename _ValT
│ │ │ + │ │ │ +
1410 typename _Allocator = allocator<_ValT>,
│ │ │ +
1411 typename = _RequireInputIter<_InputIterator>,
│ │ │ +
1412 typename = _RequireAllocator<_Allocator>>
│ │ │ +
1413 forward_list(_InputIterator, _InputIterator, _Allocator = _Allocator())
│ │ │ + │ │ │ +
1415#endif
│ │ │ +
1416
│ │ │ +
1417 /**
│ │ │ +
1418 * @brief Forward list equality comparison.
│ │ │ +
1419 * @param __lx A %forward_list
│ │ │ +
1420 * @param __ly A %forward_list of the same type as @a __lx.
│ │ │ +
1421 * @return True iff the elements of the forward lists are equal.
│ │ │ +
1422 *
│ │ │ +
1423 * This is an equivalence relation. It is linear in the number of
│ │ │ +
1424 * elements of the forward lists. Deques are considered equivalent
│ │ │ +
1425 * if corresponding elements compare equal.
│ │ │ +
1426 */
│ │ │ +
1427 template<typename _Tp, typename _Alloc>
│ │ │ +
1428 bool
│ │ │ +
1429 operator==(const forward_list<_Tp, _Alloc>& __lx,
│ │ │ +
1430 const forward_list<_Tp, _Alloc>& __ly);
│ │ │ +
1431
│ │ │ +
1432#if __cpp_lib_three_way_comparison
│ │ │ +
1433 /**
│ │ │ +
1434 * @brief Forward list ordering relation.
│ │ │ +
1435 * @param __x A `forward_list`.
│ │ │ +
1436 * @param __y A `forward_list` of the same type as `__x`.
│ │ │ +
1437 * @return A value indicating whether `__x` is less than, equal to,
│ │ │ +
1438 * greater than, or incomparable with `__y`.
│ │ │ +
1439 *
│ │ │ +
1440 * See `std::lexicographical_compare_three_way()` for how the determination
│ │ │ +
1441 * is made. This operator is used to synthesize relational operators like
│ │ │ +
1442 * `<` and `>=` etc.
│ │ │ +
1443 */
│ │ │ +
1444 template<typename _Tp, typename _Alloc>
│ │ │ +
1445 inline __detail::__synth3way_t<_Tp>
│ │ │ +
1446 operator<=>(const forward_list<_Tp, _Alloc>& __x,
│ │ │ +
1447 const forward_list<_Tp, _Alloc>& __y)
│ │ │ +
1448 {
│ │ │ +
1449 return std::lexicographical_compare_three_way(__x.begin(), __x.end(),
│ │ │ +
1450 __y.begin(), __y.end(),
│ │ │ +
1451 __detail::__synth3way);
│ │ │ +
1452 }
│ │ │ +
1453#else
│ │ │ +
1454 /**
│ │ │ +
1455 * @brief Forward list ordering relation.
│ │ │ +
1456 * @param __lx A %forward_list.
│ │ │ +
1457 * @param __ly A %forward_list of the same type as @a __lx.
│ │ │ +
1458 * @return True iff @a __lx is lexicographically less than @a __ly.
│ │ │ +
1459 *
│ │ │ +
1460 * This is a total ordering relation. It is linear in the number of
│ │ │ +
1461 * elements of the forward lists. The elements must be comparable
│ │ │ +
1462 * with @c <.
│ │ │ +
1463 *
│ │ │ +
1464 * See std::lexicographical_compare() for how the determination is made.
│ │ │ +
1465 */
│ │ │ +
1466 template<typename _Tp, typename _Alloc>
│ │ │ +
│ │ │ +
1467 inline bool
│ │ │ +
1468 operator<(const forward_list<_Tp, _Alloc>& __lx,
│ │ │ +
1469 const forward_list<_Tp, _Alloc>& __ly)
│ │ │ +
1470 { return std::lexicographical_compare(__lx.cbegin(), __lx.cend(),
│ │ │ +
1471 __ly.cbegin(), __ly.cend()); }
│ │ │ +
│ │ │ +
1472
│ │ │ +
1473 /// Based on operator==
│ │ │ +
1474 template<typename _Tp, typename _Alloc>
│ │ │ +
1475 inline bool
│ │ │ +
│ │ │ +
1476 operator!=(const forward_list<_Tp, _Alloc>& __lx,
│ │ │ +
1477 const forward_list<_Tp, _Alloc>& __ly)
│ │ │ +
1478 { return !(__lx == __ly); }
│ │ │ +
│ │ │ +
1479
│ │ │ +
1480 /// Based on operator<
│ │ │ +
1481 template<typename _Tp, typename _Alloc>
│ │ │ +
1482 inline bool
│ │ │ +
│ │ │ +
1483 operator>(const forward_list<_Tp, _Alloc>& __lx,
│ │ │ +
1484 const forward_list<_Tp, _Alloc>& __ly)
│ │ │ +
1485 { return (__ly < __lx); }
│ │ │ +
│ │ │ +
1486
│ │ │ +
1487 /// Based on operator<
│ │ │ +
1488 template<typename _Tp, typename _Alloc>
│ │ │ +
1489 inline bool
│ │ │ +
│ │ │ +
1490 operator>=(const forward_list<_Tp, _Alloc>& __lx,
│ │ │ +
1491 const forward_list<_Tp, _Alloc>& __ly)
│ │ │ +
1492 { return !(__lx < __ly); }
│ │ │ +
│ │ │ +
1493
│ │ │ +
1494 /// Based on operator<
│ │ │ +
1495 template<typename _Tp, typename _Alloc>
│ │ │ +
│ │ │ +
1496 inline bool
│ │ │ +
1497 operator<=(const forward_list<_Tp, _Alloc>& __lx,
│ │ │ +
1498 const forward_list<_Tp, _Alloc>& __ly)
│ │ │ +
1499 { return !(__ly < __lx); }
│ │ │ +
│ │ │ +
1500#endif // three-way comparison
│ │ │ +
1501
│ │ │ +
1502 /// See std::forward_list::swap().
│ │ │ +
1503 template<typename _Tp, typename _Alloc>
│ │ │ +
1504 inline void
│ │ │ +
│ │ │ + │ │ │ + │ │ │ +
1507 noexcept(noexcept(__lx.swap(__ly)))
│ │ │ +
1508 { __lx.swap(__ly); }
│ │ │ +
│ │ │ +
1509
│ │ │ +
1510_GLIBCXX_END_NAMESPACE_CONTAINER
│ │ │ +
1511_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ +
1512} // namespace std
│ │ │ +
1513
│ │ │ +
1514#endif // _FORWARD_LIST_H
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
integral_constant< bool, true > true_type
The type used as a compile-time boolean with true value.
Definition type_traits:83
│ │ │ +
integral_constant< bool, false > false_type
The type used as a compile-time boolean with false value.
Definition type_traits:86
│ │ │ +
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:428
│ │ │ +
constexpr _Tp && forward(typename std::remove_reference< _Tp >::type &__t) noexcept
Forward an lvalue.
Definition move.h:77
│ │ │
ISO C++ entities toplevel namespace is std.
│ │ │ +
initializer_list
│ │ │ + │ │ │ +
is_nothrow_default_constructible
Definition type_traits:1033
│ │ │ +
is_assignable
Definition type_traits:1088
│ │ │ +
is_copy_assignable
Definition type_traits:1109
│ │ │ +
Uniform interface to all allocator types.
│ │ │ +
__detected_or_t< value_type *, __pointer, _Alloc > pointer
│ │ │ +
typename _Ptr< __c_pointer, const value_type >::type const_pointer
│ │ │ +
The standard allocator, as per C++03 [20.4.1].
Definition allocator.h:125
│ │ │ + │ │ │ +
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 inequality comparison.
│ │ │ +
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 inequality comparison.
│ │ │ +
friend bool operator==(const _Self &__x, const _Self &__y) noexcept
Forward list const_iterator equality comparison.
│ │ │ +
A standard container with linear time access to elements, and fixed time insertion/deletion at any po...
│ │ │ +
iterator insert_after(const_iterator __pos, _InputIterator __first, _InputIterator __last)
Inserts a range into the forward_list.
│ │ │ +
__remove_return_type unique(_BinPred __binary_pred)
Remove consecutive elements satisfying a predicate.
│ │ │ +
void merge(forward_list &&__list, _Comp __comp)
Merge sorted lists according to comparison function.
│ │ │ +
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.
│ │ │ +
forward_list(forward_list &&__list, const _Alloc &__al) noexcept(_Node_alloc_traits::_S_always_equal())
Move constructor with allocator argument.
│ │ │ +
void swap(forward_list &__list) noexcept
Swaps data with another forward_list.
│ │ │ +
void sort(_Comp __comp)
Sort the forward_list using a comparison function.
│ │ │ +
const_reference front() const
│ │ │ +
forward_list(const forward_list &__list, const _Alloc &__al)
Copy constructor with allocator argument.
│ │ │ +
void merge(forward_list &&__list)
Merge sorted lists.
│ │ │ +
forward_list(const _Alloc &__al) noexcept
Creates a forward_list with no elements.
│ │ │ +
iterator insert_after(const_iterator __pos, size_type __n, const _Tp &__val)
Inserts a number of copies of given data into the forward_list.
│ │ │ +
__remove_return_type remove(const _Tp &__val)
Remove all elements equal to value.
│ │ │ +
void sort()
Sort the elements of the list.
│ │ │ +
iterator before_begin() noexcept
│ │ │ +
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()
│ │ │ +
void splice_after(const_iterator __pos, forward_list &&__list, const_iterator __i) noexcept
Insert element from another forward_list.
│ │ │ +
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.
│ │ │ +
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 resize(size_type __sz, const value_type &__val)
Resizes the forward_list to the specified number of elements.
│ │ │ +
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:100
│ │ │ +
One of the comparison functors.
│ │ │ +
One of the comparison functors.
│ │ │ +
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(_Node_alloc_type &__a, size_type __n)
│ │ │ +
static constexpr void deallocate(_Node_alloc_type &__a, pointer __p, size_type __n)
│ │ │ +
static constexpr size_type max_size(const _Node_alloc_type &__a) noexcept
│ │ │ + │ │ │ + │ │ │
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,13 +1,13 @@ │ │ │ │ libstdc++ │ │ │ │ -valarray_array.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// The template and inlines for the -*- C++ -*- internal _Array helper class. │ │ │ │ +1// -*- C++ -*- │ │ │ │ 2 │ │ │ │ -3// Copyright (C) 1997-2021 Free Software Foundation, Inc. │ │ │ │ +3// Copyright (C) 2008-2021 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,1840 @@ │ │ │ │ 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 │ │ │ │ +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{valarray} │ │ │ │ +27 * Do not attempt to use it directly. @headername{forward_list} │ │ │ │ 28 */ │ │ │ │ 29 │ │ │ │ -30// Written by Gabriel Dos Reis │ │ │ │ -31 │ │ │ │ -32#ifndef _VALARRAY_ARRAY_H │ │ │ │ -33#define _VALARRAY_ARRAY_H 1 │ │ │ │ +30#ifndef _FORWARD_LIST_H │ │ │ │ +31#define _FORWARD_LIST_H 1 │ │ │ │ +32 │ │ │ │ +33#pragma GCC system_header │ │ │ │ 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); } │ │ │ │ -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) │ │ │ │ +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 /** │ │ │ │ +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 _Fwd_list_node_base │ │ │ │ +55 { │ │ │ │ +56 _Fwd_list_node_base() = default; │ │ │ │ +57 _Fwd_list_node_base(_Fwd_list_node_base&& __x) noexcept │ │ │ │ +58 : _M_next(__x._M_next) │ │ │ │ +59 { __x._M_next = nullptr; } │ │ │ │ +60 │ │ │ │ +61 _Fwd_list_node_base(const _Fwd_list_node_base&) = delete; │ │ │ │ +62 _Fwd_list_node_base& operator=(const _Fwd_list_node_base&) = delete; │ │ │ │ +63 │ │ │ │ +64 _Fwd_list_node_base& │ │ │ │ +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 │ │ │ │ +74 _Fwd_list_node_base* │ │ │ │ +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 _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 │ │ │ │ +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 │ │ │ │ -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 }; │ │ │ │ -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 │ │ │ │ +_1_1_3 struct _Fwd_list_node │ │ │ │ +114 : public _Fwd_list_node_base │ │ │ │ +115 { │ │ │ │ +116 _Fwd_list_node() = default; │ │ │ │ +117 │ │ │ │ +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 │ │ │ │ +_1_3_5 struct _Fwd_list_iterator │ │ │ │ 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 } │ │ │ │ -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++]); │ │ │ │ +137 typedef _Fwd_list_iterator<_Tp> _Self; │ │ │ │ +138 typedef ___F_w_d___l_i_s_t___n_o_d_e_<___T_p_> _Node; │ │ │ │ +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 iterator_category; │ │ │ │ +145 │ │ │ │ +146 _Fwd_list_iterator() noexcept │ │ │ │ +147 : _M_node() { } │ │ │ │ +148 │ │ │ │ +149 explicit │ │ │ │ +150 _Fwd_list_iterator(___F_w_d___l_i_s_t___n_o_d_e___b_a_s_e* __n) noexcept │ │ │ │ +151 : _M_node(__n) { } │ │ │ │ +152 │ │ │ │ +153 reference │ │ │ │ +154 operator*() const noexcept │ │ │ │ +155 { return *static_cast<_Node*>(this->_M_node)->_M_valptr(); } │ │ │ │ +156 │ │ │ │ +157 pointer │ │ │ │ +158 operator->() const noexcept │ │ │ │ +159 { return static_cast<_Node*>(this->_M_node)->_M_valptr(); } │ │ │ │ +160 │ │ │ │ +161 _Self& │ │ │ │ +162 operator++() noexcept │ │ │ │ +163 { │ │ │ │ +164 _M_node = _M_node->_M_next; │ │ │ │ +165 return *this; │ │ │ │ +166 } │ │ │ │ +167 │ │ │ │ +168 _Self │ │ │ │ +169 operator++(int) noexcept │ │ │ │ +170 { │ │ │ │ +171 _Self __tmp(*this); │ │ │ │ +172 _M_node = _M_node->_M_next; │ │ │ │ +173 return __tmp; │ │ │ │ +174 } │ │ │ │ +175 │ │ │ │ +176 /** │ │ │ │ +177 * @brief Forward list iterator equality comparison. │ │ │ │ +178 */ │ │ │ │ +179 friend bool │ │ │ │ +_1_8_0 _o_p_e_r_a_t_o_r_=_=(const _Self& __x, const _Self& __y) noexcept │ │ │ │ +181 { return __x._M_node == __y._M_node; } │ │ │ │ +182 │ │ │ │ +183#if __cpp_impl_three_way_comparison < 201907L │ │ │ │ +184 /** │ │ │ │ +185 * @brief Forward list iterator inequality comparison. │ │ │ │ +186 */ │ │ │ │ +187 friend bool │ │ │ │ +_1_8_8 _o_p_e_r_a_t_o_r_!_=(const _Self& __x, const _Self& __y) noexcept │ │ │ │ +189 { return __x._M_node != __y._M_node; } │ │ │ │ +190#endif │ │ │ │ +191 │ │ │ │ +192 _Self │ │ │ │ +193 _M_next() const noexcept │ │ │ │ +194 { │ │ │ │ +195 if (_M_node) │ │ │ │ +196 return ___F_w_d___l_i_s_t___i_t_e_r_a_t_o_r(_M_node->_M_next); │ │ │ │ +197 else │ │ │ │ +198 return ___F_w_d___l_i_s_t___i_t_e_r_a_t_o_r(nullptr); │ │ │ │ 199 } │ │ │ │ 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 } │ │ │ │ -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++; │ │ │ │ +201 _Fwd_list_node_base* _M_node; │ │ │ │ +202 }; │ │ │ │ +203 │ │ │ │ +204 /** │ │ │ │ +205 * @brief A forward_list::const_iterator. │ │ │ │ +206 * │ │ │ │ +207 * All the functions are op overloads. │ │ │ │ +208 */ │ │ │ │ +209 template │ │ │ │ +_2_1_0 struct _Fwd_list_const_iterator │ │ │ │ +211 { │ │ │ │ +212 typedef _Fwd_list_const_iterator<_Tp> _Self; │ │ │ │ +213 typedef const ___F_w_d___l_i_s_t___n_o_d_e_<___T_p_> _Node; │ │ │ │ +214 typedef ___F_w_d___l_i_s_t___i_t_e_r_a_t_o_r_<___T_p_> iterator; │ │ │ │ +215 │ │ │ │ +216 typedef _Tp value_type; │ │ │ │ +217 typedef const _Tp* pointer; │ │ │ │ +218 typedef const _Tp& reference; │ │ │ │ +219 typedef ptrdiff_t difference_type; │ │ │ │ +220 typedef _s_t_d_:_:_f_o_r_w_a_r_d___i_t_e_r_a_t_o_r___t_a_g iterator_category; │ │ │ │ +221 │ │ │ │ +222 _Fwd_list_const_iterator() noexcept │ │ │ │ +223 : _M_node() { } │ │ │ │ +224 │ │ │ │ +225 explicit │ │ │ │ +226 _Fwd_list_const_iterator(const ___F_w_d___l_i_s_t___n_o_d_e___b_a_s_e* __n) noexcept │ │ │ │ +227 : _M_node(__n) { } │ │ │ │ +228 │ │ │ │ +229 _Fwd_list_const_iterator(const iterator& __iter) noexcept │ │ │ │ +230 : _M_node(__iter._M_node) { } │ │ │ │ +231 │ │ │ │ +232 reference │ │ │ │ +233 operator*() const noexcept │ │ │ │ +234 { return *static_cast<_Node*>(this->_M_node)->_M_valptr(); } │ │ │ │ +235 │ │ │ │ +236 pointer │ │ │ │ +237 operator->() const noexcept │ │ │ │ +238 { return static_cast<_Node*>(this->_M_node)->_M_valptr(); } │ │ │ │ +239 │ │ │ │ +240 _Self& │ │ │ │ +241 operator++() noexcept │ │ │ │ +242 { │ │ │ │ +243 _M_node = _M_node->_M_next; │ │ │ │ +244 return *this; │ │ │ │ +245 } │ │ │ │ +246 │ │ │ │ +247 _Self │ │ │ │ +248 operator++(int) noexcept │ │ │ │ +249 { │ │ │ │ +250 _Self __tmp(*this); │ │ │ │ +251 _M_node = _M_node->_M_next; │ │ │ │ +252 return __tmp; │ │ │ │ 253 } │ │ │ │ -254 }; │ │ │ │ -255 │ │ │ │ -256 template │ │ │ │ -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 │ │ │ │ -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 } │ │ │ │ +254 │ │ │ │ +255 /** │ │ │ │ +256 * @brief Forward list const_iterator equality comparison. │ │ │ │ +257 */ │ │ │ │ +258 friend bool │ │ │ │ +_2_5_9 _o_p_e_r_a_t_o_r_=_=(const _Self& __x, const _Self& __y) noexcept │ │ │ │ +260 { return __x._M_node == __y._M_node; } │ │ │ │ +261 │ │ │ │ +262#if __cpp_impl_three_way_comparison < 201907L │ │ │ │ +263 /** │ │ │ │ +264 * @brief Forward list const_iterator inequality comparison. │ │ │ │ +265 */ │ │ │ │ +266 friend bool │ │ │ │ +_2_6_7 _o_p_e_r_a_t_o_r_!_=(const _Self& __x, const _Self& __y) noexcept │ │ │ │ +268 { return __x._M_node != __y._M_node; } │ │ │ │ +269#endif │ │ │ │ +270 │ │ │ │ +271 _Self │ │ │ │ +272 _M_next() const noexcept │ │ │ │ +273 { │ │ │ │ +274 if (this->_M_node) │ │ │ │ +275 return ___F_w_d___l_i_s_t___c_o_n_s_t___i_t_e_r_a_t_o_r(_M_node->_M_next); │ │ │ │ +276 else │ │ │ │ +277 return ___F_w_d___l_i_s_t___c_o_n_s_t___i_t_e_r_a_t_o_r(nullptr); │ │ │ │ +278 } │ │ │ │ +279 │ │ │ │ +280 const _Fwd_list_node_base* _M_node; │ │ │ │ +281 }; │ │ │ │ +282 │ │ │ │ +283 /** │ │ │ │ +284 * @brief Base class for %forward_list. │ │ │ │ +285 */ │ │ │ │ +286 template │ │ │ │ +_2_8_7 struct _Fwd_list_base │ │ │ │ +288 { │ │ │ │ +289 protected: │ │ │ │ +290 typedef __alloc_rebind<_Alloc, _Fwd_list_node<_Tp>> _Node_alloc_type; │ │ │ │ +291 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_> _Node_alloc_traits; │ │ │ │ +292 │ │ │ │ +293 struct _Fwd_list_impl │ │ │ │ +294 : public _Node_alloc_type │ │ │ │ +295 { │ │ │ │ +296 ___F_w_d___l_i_s_t___n_o_d_e___b_a_s_e _M_head; │ │ │ │ +297 │ │ │ │ +298 _Fwd_list_impl() │ │ │ │ +299 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) │ │ │ │ +300 : _Node_alloc_type(), _M_head() │ │ │ │ +301 { } │ │ │ │ +302 │ │ │ │ +303 _Fwd_list_impl(_Fwd_list_impl&&) = default; │ │ │ │ +304 │ │ │ │ +305 _Fwd_list_impl(_Fwd_list_impl&& __fl, _Node_alloc_type&& __a) │ │ │ │ +306 : _Node_alloc_type(_s_t_d_:_:_m_o_v_e(__a)), _M_head(_s_t_d_:_:_m_o_v_e(__fl._M_head)) │ │ │ │ +307 { } │ │ │ │ +308 │ │ │ │ +309 _Fwd_list_impl(_Node_alloc_type&& __a) │ │ │ │ +310 : _Node_alloc_type(_s_t_d_:_:_m_o_v_e(__a)), _M_head() │ │ │ │ +311 { } │ │ │ │ +312 }; │ │ │ │ +313 │ │ │ │ +314 _Fwd_list_impl _M_impl; │ │ │ │ +315 │ │ │ │ +316 public: │ │ │ │ +317 typedef ___F_w_d___l_i_s_t___i_t_e_r_a_t_o_r_<___T_p_> iterator; │ │ │ │ +318 typedef ___F_w_d___l_i_s_t___c_o_n_s_t___i_t_e_r_a_t_o_r_<___T_p_> const_iterator; │ │ │ │ +319 typedef ___F_w_d___l_i_s_t___n_o_d_e_<___T_p_> _Node; │ │ │ │ +320 │ │ │ │ +321 _Node_alloc_type& │ │ │ │ +322 _M_get_Node_allocator() noexcept │ │ │ │ +323 { return this->_M_impl; } │ │ │ │ +324 │ │ │ │ +325 const _Node_alloc_type& │ │ │ │ +326 _M_get_Node_allocator() const noexcept │ │ │ │ +327 { return this->_M_impl; } │ │ │ │ +328 │ │ │ │ +329 _Fwd_list_base() = default; │ │ │ │ +330 │ │ │ │ +331 _Fwd_list_base(_Node_alloc_type&& __a) │ │ │ │ +332 : _M_impl(_s_t_d_:_:_m_o_v_e(__a)) { } │ │ │ │ +333 │ │ │ │ +334 // When allocators are always equal. │ │ │ │ +335 _Fwd_list_base(_Fwd_list_base&& __lst, _Node_alloc_type&& __a, │ │ │ │ +336 _s_t_d_:_:_t_r_u_e___t_y_p_e) │ │ │ │ +337 : _M_impl(_s_t_d_:_:_m_o_v_e(__lst._M_impl), _s_t_d_:_:_m_o_v_e(__a)) │ │ │ │ +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; │ │ │ │ +340 // When allocators are not always equal. │ │ │ │ +341 _Fwd_list_base(_Fwd_list_base&& __lst, _Node_alloc_type&& __a); │ │ │ │ +342 │ │ │ │ +343 _Fwd_list_base(_Fwd_list_base&&) = default; │ │ │ │ +344 │ │ │ │ +345 ~_Fwd_list_base() │ │ │ │ +346 { _M_erase_after(&_M_impl._M_head, nullptr); } │ │ │ │ +347 │ │ │ │ +348 protected: │ │ │ │ +349 _Node* │ │ │ │ +350 _M_get_node() │ │ │ │ +351 { │ │ │ │ +352 auto __ptr = ___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); │ │ │ │ +353 return std::__to_address(__ptr); │ │ │ │ 354 } │ │ │ │ 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); │ │ │ │ -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); } │ │ │ │ -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); } │ │ │ │ -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); } │ │ │ │ -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); } │ │ │ │ +356 template │ │ │ │ +357 _Node* │ │ │ │ +358 _M_create_node(_Args&&... __args) │ │ │ │ +359 { │ │ │ │ +360 _Node* __node = this->_M_get_node(); │ │ │ │ +361 __try │ │ │ │ +362 { │ │ │ │ +363 ::new ((void*)__node) _Node; │ │ │ │ +364 _Node_alloc_traits::construct(_M_get_Node_allocator(), │ │ │ │ +365 __node->_M_valptr(), │ │ │ │ +366 _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(__args)...); │ │ │ │ +367 } │ │ │ │ +368 __catch(...) │ │ │ │ +369 { │ │ │ │ +370 this->_M_put_node(__node); │ │ │ │ +371 __throw_exception_again; │ │ │ │ +372 } │ │ │ │ +373 return __node; │ │ │ │ +374 } │ │ │ │ +375 │ │ │ │ +376 template │ │ │ │ +377 ___F_w_d___l_i_s_t___n_o_d_e___b_a_s_e* │ │ │ │ +378 _M_insert_after(const_iterator __pos, _Args&&... __args); │ │ │ │ +379 │ │ │ │ +380 void │ │ │ │ +381 _M_put_node(_Node* __p) │ │ │ │ +382 { │ │ │ │ +383 typedef typename _Node_alloc_traits::pointer _Ptr; │ │ │ │ +384 auto __ptr = _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); │ │ │ │ +385 ___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(), __ptr, 1); │ │ │ │ +386 } │ │ │ │ +387 │ │ │ │ +388 ___F_w_d___l_i_s_t___n_o_d_e___b_a_s_e* │ │ │ │ +389 _M_erase_after(___F_w_d___l_i_s_t___n_o_d_e___b_a_s_e* __pos); │ │ │ │ +390 │ │ │ │ +391 ___F_w_d___l_i_s_t___n_o_d_e___b_a_s_e* │ │ │ │ +392 _M_erase_after(___F_w_d___l_i_s_t___n_o_d_e___b_a_s_e* __pos, │ │ │ │ +393 ___F_w_d___l_i_s_t___n_o_d_e___b_a_s_e* __last); │ │ │ │ +394 }; │ │ │ │ +395 │ │ │ │ +396 /** │ │ │ │ +397 * @brief A standard container with linear time access to elements, │ │ │ │ +398 * and fixed time insertion/deletion at any point in the sequence. │ │ │ │ +399 * │ │ │ │ +400 * @ingroup sequences │ │ │ │ +401 * │ │ │ │ +402 * @tparam _Tp Type of element. │ │ │ │ +403 * @tparam _Alloc Allocator type, defaults to allocator<_Tp>. │ │ │ │ +404 * │ │ │ │ +405 * Meets the requirements of a container, a │ │ │ │ +406 * sequence, including the │ │ │ │ +407 * optional sequence requirements with the │ │ │ │ +408 * %exception of @c at and @c operator[]. │ │ │ │ +409 * │ │ │ │ +410 * This is a @e singly @e linked %list. Traversal up the │ │ │ │ +411 * %list requires linear time, but adding and removing elements (or │ │ │ │ +412 * @e nodes) is done in constant time, regardless of where the │ │ │ │ +413 * change takes place. Unlike std::vector and std::deque, │ │ │ │ +414 * random-access iterators are not provided, so subscripting ( @c │ │ │ │ +415 * [] ) access is not allowed. For algorithms which only need │ │ │ │ +416 * sequential access, this lack makes no difference. │ │ │ │ +417 * │ │ │ │ +418 * Also unlike the other standard containers, std::forward_list provides │ │ │ │ +419 * specialized algorithms %unique to linked lists, such as │ │ │ │ +420 * splicing, sorting, and in-place reversal. │ │ │ │ +421 */ │ │ │ │ +422 template> │ │ │ │ +_4_2_3 class _f_o_r_w_a_r_d___l_i_s_t : private _Fwd_list_base<_Tp, _Alloc> │ │ │ │ +424 { │ │ │ │ +425 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, │ │ │ │ +426 "std::forward_list must have a non-const, non-volatile value_type"); │ │ │ │ +427#if __cplusplus > 201703L || defined __STRICT_ANSI__ │ │ │ │ +428 static_assert(is_same::value, │ │ │ │ +429 "std::forward_list must have the same value_type as its allocator"); │ │ │ │ +430#endif │ │ │ │ +431 │ │ │ │ +432 private: │ │ │ │ +433 typedef _Fwd_list_base<_Tp, _Alloc> _Base; │ │ │ │ +434 typedef ___F_w_d___l_i_s_t___n_o_d_e___b_a_s_e _Node_base; │ │ │ │ +435 typedef typename _Base::_Node _Node; │ │ │ │ +436 typedef typename _Base::_Node_alloc_type _Node_alloc_type; │ │ │ │ +437 typedef typename _Base::_Node_alloc_traits _Node_alloc_traits; │ │ │ │ +438 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_>> _Alloc_traits; │ │ │ │ +439 │ │ │ │ +440 public: │ │ │ │ +441 // types: │ │ │ │ +442 typedef _Tp value_type; │ │ │ │ +443 typedef typename ___A_l_l_o_c___t_r_a_i_t_s_:_:_p_o_i_n_t_e_r pointer; │ │ │ │ +444 typedef typename ___A_l_l_o_c___t_r_a_i_t_s_:_:_c_o_n_s_t___p_o_i_n_t_e_r const_pointer; │ │ │ │ +445 typedef value_type& reference; │ │ │ │ +446 typedef const value_type& const_reference; │ │ │ │ +447 │ │ │ │ +448 typedef typename _Base::iterator iterator; │ │ │ │ +449 typedef typename _Base::const_iterator const_iterator; │ │ │ │ +450 typedef std::size_t size_type; │ │ │ │ +451 typedef std::ptrdiff_t difference_type; │ │ │ │ +452 typedef _Alloc allocator_type; │ │ │ │ +453 │ │ │ │ +454 // 23.3.4.2 construct/copy/destroy: │ │ │ │ +455 │ │ │ │ +456 /** │ │ │ │ +457 * @brief Creates a %forward_list with no elements. │ │ │ │ +458 */ │ │ │ │ +_4_5_9 _f_o_r_w_a_r_d___l_i_s_t() = default; │ │ │ │ +460 │ │ │ │ +461 /** │ │ │ │ +462 * @brief Creates a %forward_list with no elements. │ │ │ │ +463 * @param __al An allocator object. │ │ │ │ +464 */ │ │ │ │ +465 explicit │ │ │ │ +_4_6_6 _f_o_r_w_a_r_d___l_i_s_t(const _Alloc& __al) noexcept │ │ │ │ +467 : _Base(_Node_alloc_type(__al)) │ │ │ │ +468 { } │ │ │ │ +469 │ │ │ │ +470 /** │ │ │ │ +471 * @brief Copy constructor with allocator argument. │ │ │ │ +472 * @param __list Input list to copy. │ │ │ │ +473 * @param __al An allocator object. │ │ │ │ +474 */ │ │ │ │ +_4_7_5 _f_o_r_w_a_r_d___l_i_s_t(const _f_o_r_w_a_r_d___l_i_s_t& __list, const _Alloc& __al) │ │ │ │ +476 : _Base(_Node_alloc_type(__al)) │ │ │ │ +477 { _M_range_initialize(__list._b_e_g_i_n(), __list._e_n_d()); } │ │ │ │ 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) │ │ │ │ -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 │ │ │ │ -_c_s_t_d_l_i_b │ │ │ │ -_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 │ │ │ │ +479 private: │ │ │ │ +480 _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, │ │ │ │ +481 _f_a_l_s_e___t_y_p_e) │ │ │ │ +482 : _Base(_s_t_d::_m_o_v_e(__list), _s_t_d::_m_o_v_e(__al)) │ │ │ │ +483 { │ │ │ │ +484 // If __list is not empty it means its allocator is not equal to __a, │ │ │ │ +485 // so we need to move from each element individually. │ │ │ │ +486 _i_n_s_e_r_t___a_f_t_e_r(_c_b_e_f_o_r_e___b_e_g_i_n(), │ │ │ │ +487 std::__make_move_if_noexcept_iterator(__list.begin()), │ │ │ │ +488 std::__make_move_if_noexcept_iterator(__list.end())); │ │ │ │ +489 } │ │ │ │ +490 │ │ │ │ +491 _f_o_r_w_a_r_d___l_i_s_t(forward_list&& __list, _Node_alloc_type&& __al, │ │ │ │ +492 true_type) │ │ │ │ +493 noexcept │ │ │ │ +494 : _Base(_s_t_d_:_:_m_o_v_e(__list), _Node_alloc_type(__al), true_type{}) │ │ │ │ +495 { } │ │ │ │ +496 │ │ │ │ +497 public: │ │ │ │ +498 /** │ │ │ │ +499 * @brief Move constructor with allocator argument. │ │ │ │ +500 * @param __list Input list to move. │ │ │ │ +501 * @param __al An allocator object. │ │ │ │ +502 */ │ │ │ │ +_5_0_3 _f_o_r_w_a_r_d___l_i_s_t(_f_o_r_w_a_r_d___l_i_s_t&& __list, const _Alloc& __al) │ │ │ │ +504 noexcept(_Node_alloc_traits::_S_always_equal()) │ │ │ │ +505 : _f_o_r_w_a_r_d___l_i_s_t(_s_t_d::_m_o_v_e(__list), _Node_alloc_type(__al), │ │ │ │ +506 typename _Node_alloc_traits::is_always_equal{}) │ │ │ │ +507 { } │ │ │ │ +508 │ │ │ │ +509 /** │ │ │ │ +510 * @brief Creates a %forward_list with default constructed elements. │ │ │ │ +511 * @param __n The number of elements to initially create. │ │ │ │ +512 * @param __al An allocator object. │ │ │ │ +513 * │ │ │ │ +514 * This constructor creates the %forward_list with @a __n default │ │ │ │ +515 * constructed elements. │ │ │ │ +516 */ │ │ │ │ +517 explicit │ │ │ │ +_5_1_8 _f_o_r_w_a_r_d___l_i_s_t(size_type __n, const _Alloc& __al = _Alloc()) │ │ │ │ +519 : _Base(_Node_alloc_type(__al)) │ │ │ │ +520 { _M_default_initialize(__n); } │ │ │ │ +521 │ │ │ │ +522 /** │ │ │ │ +523 * @brief Creates a %forward_list with copies of an exemplar element. │ │ │ │ +524 * @param __n The number of elements to initially create. │ │ │ │ +525 * @param __value An element to copy. │ │ │ │ +526 * @param __al An allocator object. │ │ │ │ +527 * │ │ │ │ +528 * This constructor fills the %forward_list with @a __n copies of │ │ │ │ +529 * @a __value. │ │ │ │ +530 */ │ │ │ │ +_5_3_1 _f_o_r_w_a_r_d___l_i_s_t(size_type __n, const _Tp& __value, │ │ │ │ +532 const _Alloc& __al = _Alloc()) │ │ │ │ +533 : _Base(_Node_alloc_type(__al)) │ │ │ │ +534 { _M_fill_initialize(__n, __value); } │ │ │ │ +535 │ │ │ │ +536 /** │ │ │ │ +537 * @brief Builds a %forward_list from a range. │ │ │ │ +538 * @param __first An input iterator. │ │ │ │ +539 * @param __last An input iterator. │ │ │ │ +540 * @param __al An allocator object. │ │ │ │ +541 * │ │ │ │ +542 * Create a %forward_list consisting of copies of the elements from │ │ │ │ +543 * [@a __first,@a __last). This is linear in N (where N is │ │ │ │ +544 * distance(@a __first,@a __last)). │ │ │ │ +545 */ │ │ │ │ +546 template> │ │ │ │ +_5_4_8 _f_o_r_w_a_r_d___l_i_s_t(_InputIterator __first, _InputIterator __last, │ │ │ │ +549 const _Alloc& __al = _Alloc()) │ │ │ │ +550 : _Base(_Node_alloc_type(__al)) │ │ │ │ +551 { _M_range_initialize(__first, __last); } │ │ │ │ +552 │ │ │ │ +553 /** │ │ │ │ +554 * @brief The %forward_list copy constructor. │ │ │ │ +555 * @param __list A %forward_list of identical element and allocator │ │ │ │ +556 * types. │ │ │ │ +557 */ │ │ │ │ +_5_5_8 _f_o_r_w_a_r_d___l_i_s_t(const _f_o_r_w_a_r_d___l_i_s_t& __list) │ │ │ │ +559 : _Base(_Node_alloc_traits::_S_select_on_copy( │ │ │ │ +560 __list._M_get_Node_allocator())) │ │ │ │ +561 { _M_range_initialize(__list._b_e_g_i_n(), __list._e_n_d()); } │ │ │ │ +562 │ │ │ │ +563 /** │ │ │ │ +564 * @brief The %forward_list move constructor. │ │ │ │ +565 * @param __list A %forward_list of identical element and allocator │ │ │ │ +566 * types. │ │ │ │ +567 * │ │ │ │ +568 * The newly-created %forward_list contains the exact contents of the │ │ │ │ +569 * moved instance. The contents of the moved instance are a valid, but │ │ │ │ +570 * unspecified %forward_list. │ │ │ │ +571 */ │ │ │ │ +_5_7_2 _f_o_r_w_a_r_d___l_i_s_t(_f_o_r_w_a_r_d___l_i_s_t&&) = default; │ │ │ │ +573 │ │ │ │ +574 /** │ │ │ │ +575 * @brief Builds a %forward_list from an initializer_list │ │ │ │ +576 * @param __il An initializer_list of value_type. │ │ │ │ +577 * @param __al An allocator object. │ │ │ │ +578 * │ │ │ │ +579 * Create a %forward_list consisting of copies of the elements │ │ │ │ +580 * in the initializer_list @a __il. This is linear in __il.size(). │ │ │ │ +581 */ │ │ │ │ +_5_8_2 _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_> __il, │ │ │ │ +583 const _Alloc& __al = _Alloc()) │ │ │ │ +584 : _Base(_Node_alloc_type(__al)) │ │ │ │ +585 { _M_range_initialize(__il.begin(), __il.end()); } │ │ │ │ +586 │ │ │ │ +587 /** │ │ │ │ +588 * @brief The forward_list dtor. │ │ │ │ +589 */ │ │ │ │ +_5_9_0 _~_f_o_r_w_a_r_d___l_i_s_t() noexcept │ │ │ │ +591 { } │ │ │ │ +592 │ │ │ │ +593 /** │ │ │ │ +594 * @brief The %forward_list assignment operator. │ │ │ │ +595 * @param __list A %forward_list of identical element and allocator │ │ │ │ +596 * types. │ │ │ │ +597 * │ │ │ │ +598 * All the elements of @a __list are copied. │ │ │ │ +599 * │ │ │ │ +600 * Whether the allocator is copied depends on the allocator traits. │ │ │ │ +601 */ │ │ │ │ +602 _f_o_r_w_a_r_d___l_i_s_t& │ │ │ │ +_6_0_3 _o_p_e_r_a_t_o_r_=(const _f_o_r_w_a_r_d___l_i_s_t& __list); │ │ │ │ +604 │ │ │ │ +605 /** │ │ │ │ +606 * @brief The %forward_list move assignment operator. │ │ │ │ +607 * @param __list A %forward_list of identical element and allocator │ │ │ │ +608 * types. │ │ │ │ +609 * │ │ │ │ +610 * The contents of @a __list are moved into this %forward_list │ │ │ │ +611 * (without copying, if the allocators permit it). │ │ │ │ +612 * │ │ │ │ +613 * Afterwards @a __list is a valid, but unspecified %forward_list │ │ │ │ +614 * │ │ │ │ +615 * Whether the allocator is moved depends on the allocator traits. │ │ │ │ +616 */ │ │ │ │ +617 _f_o_r_w_a_r_d___l_i_s_t& │ │ │ │ +_6_1_8 _o_p_e_r_a_t_o_r_=(_f_o_r_w_a_r_d___l_i_s_t&& __list) │ │ │ │ +619 noexcept(_Node_alloc_traits::_S_nothrow_move()) │ │ │ │ +620 { │ │ │ │ +621 constexpr bool __move_storage = │ │ │ │ +622 _Node_alloc_traits::_S_propagate_on_move_assign() │ │ │ │ +623 || _Node_alloc_traits::_S_always_equal(); │ │ │ │ +624 _M_move_assign(_s_t_d_:_:_m_o_v_e(__list), __bool_constant<__move_storage>()); │ │ │ │ +625 return *this; │ │ │ │ +626 } │ │ │ │ +627 │ │ │ │ +628 /** │ │ │ │ +629 * @brief The %forward_list initializer list assignment operator. │ │ │ │ +630 * @param __il An initializer_list of value_type. │ │ │ │ +631 * │ │ │ │ +632 * Replace the contents of the %forward_list with copies of the │ │ │ │ +633 * elements in the initializer_list @a __il. This is linear in │ │ │ │ +634 * __il.size(). │ │ │ │ +635 */ │ │ │ │ +636 _f_o_r_w_a_r_d___l_i_s_t& │ │ │ │ +_6_3_7 _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_> __il) │ │ │ │ +638 { │ │ │ │ +639 _a_s_s_i_g_n(__il); │ │ │ │ +640 return *this; │ │ │ │ +641 } │ │ │ │ +642 │ │ │ │ +643 /** │ │ │ │ +644 * @brief Assigns a range to a %forward_list. │ │ │ │ +645 * @param __first An input iterator. │ │ │ │ +646 * @param __last An input iterator. │ │ │ │ +647 * │ │ │ │ +648 * This function fills a %forward_list with copies of the elements │ │ │ │ +649 * in the range [@a __first,@a __last). │ │ │ │ +650 * │ │ │ │ +651 * Note that the assignment completely changes the %forward_list and │ │ │ │ +652 * that the number of elements of the resulting %forward_list is the │ │ │ │ +653 * same as the number of elements assigned. │ │ │ │ +654 */ │ │ │ │ +655 template> │ │ │ │ +657 void │ │ │ │ +_6_5_8 _a_s_s_i_g_n(_InputIterator __first, _InputIterator __last) │ │ │ │ +659 { │ │ │ │ +660 typedef _i_s___a_s_s_i_g_n_a_b_l_e<_Tp, decltype(*__first)> __assignable; │ │ │ │ +661 _M_assign(__first, __last, __assignable()); │ │ │ │ +662 } │ │ │ │ +663 │ │ │ │ +664 /** │ │ │ │ +665 * @brief Assigns a given value to a %forward_list. │ │ │ │ +666 * @param __n Number of elements to be assigned. │ │ │ │ +667 * @param __val Value to be assigned. │ │ │ │ +668 * │ │ │ │ +669 * This function fills a %forward_list with @a __n copies of the │ │ │ │ +670 * given value. Note that the assignment completely changes the │ │ │ │ +671 * %forward_list, and that the resulting %forward_list has __n │ │ │ │ +672 * elements. │ │ │ │ +673 */ │ │ │ │ +674 void │ │ │ │ +_6_7_5 _a_s_s_i_g_n(size_type __n, const _Tp& __val) │ │ │ │ +676 { _M_assign_n(__n, __val, _i_s___c_o_p_y___a_s_s_i_g_n_a_b_l_e_<___T_p_>()); } │ │ │ │ +677 │ │ │ │ +678 /** │ │ │ │ +679 * @brief Assigns an initializer_list to a %forward_list. │ │ │ │ +680 * @param __il An initializer_list of value_type. │ │ │ │ +681 * │ │ │ │ +682 * Replace the contents of the %forward_list with copies of the │ │ │ │ +683 * elements in the initializer_list @a __il. This is linear in │ │ │ │ +684 * il.size(). │ │ │ │ +685 */ │ │ │ │ +686 void │ │ │ │ +_6_8_7 _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_> __il) │ │ │ │ +688 { _a_s_s_i_g_n(__il.begin(), __il.end()); } │ │ │ │ +689 │ │ │ │ +690 /// Get a copy of the memory allocation object. │ │ │ │ +691 allocator_type │ │ │ │ +_6_9_2 _g_e_t___a_l_l_o_c_a_t_o_r() const noexcept │ │ │ │ +693 { return allocator_type(this->_M_get_Node_allocator()); } │ │ │ │ +694 │ │ │ │ +695 // 23.3.4.3 iterators: │ │ │ │ +696 │ │ │ │ +697 /** │ │ │ │ +698 * Returns a read/write iterator that points before the first element │ │ │ │ +699 * in the %forward_list. Iteration is done in ordinary element order. │ │ │ │ +700 */ │ │ │ │ +701 _i_t_e_r_a_t_o_r │ │ │ │ +_7_0_2 _b_e_f_o_r_e___b_e_g_i_n() noexcept │ │ │ │ +703 { return iterator(&this->_M_impl._M_head); } │ │ │ │ +704 │ │ │ │ +705 /** │ │ │ │ +706 * Returns a read-only (constant) iterator that points before the │ │ │ │ +707 * first element in the %forward_list. Iteration is done in ordinary │ │ │ │ +708 * element order. │ │ │ │ +709 */ │ │ │ │ +710 const_iterator │ │ │ │ +_7_1_1 _b_e_f_o_r_e___b_e_g_i_n() const noexcept │ │ │ │ +712 { return const_iterator(&this->_M_impl._M_head); } │ │ │ │ +713 │ │ │ │ +714 /** │ │ │ │ +715 * Returns a read/write iterator that points to the first element │ │ │ │ +716 * in the %forward_list. Iteration is done in ordinary element order. │ │ │ │ +717 */ │ │ │ │ +718 _i_t_e_r_a_t_o_r │ │ │ │ +_7_1_9 _b_e_g_i_n() noexcept │ │ │ │ +720 { return iterator(this->_M_impl._M_head._M_next); } │ │ │ │ +721 │ │ │ │ +722 /** │ │ │ │ +723 * Returns a read-only (constant) iterator that points to the first │ │ │ │ +724 * element in the %forward_list. Iteration is done in ordinary │ │ │ │ +725 * element order. │ │ │ │ +726 */ │ │ │ │ +727 const_iterator │ │ │ │ +_7_2_8 _b_e_g_i_n() const noexcept │ │ │ │ +729 { return const_iterator(this->_M_impl._M_head._M_next); } │ │ │ │ +730 │ │ │ │ +731 /** │ │ │ │ +732 * Returns a read/write iterator that points one past the last │ │ │ │ +733 * element in the %forward_list. Iteration is done in ordinary │ │ │ │ +734 * element order. │ │ │ │ +735 */ │ │ │ │ +736 _i_t_e_r_a_t_o_r │ │ │ │ +_7_3_7 _e_n_d() noexcept │ │ │ │ +738 { return iterator(nullptr); } │ │ │ │ +739 │ │ │ │ +740 /** │ │ │ │ +741 * Returns a read-only iterator that points one past the last │ │ │ │ +742 * element in the %forward_list. Iteration is done in ordinary │ │ │ │ +743 * element order. │ │ │ │ +744 */ │ │ │ │ +745 const_iterator │ │ │ │ +_7_4_6 _e_n_d() const noexcept │ │ │ │ +747 { return const_iterator(nullptr); } │ │ │ │ +748 │ │ │ │ +749 /** │ │ │ │ +750 * Returns a read-only (constant) iterator that points to the │ │ │ │ +751 * first element in the %forward_list. Iteration is done in ordinary │ │ │ │ +752 * element order. │ │ │ │ +753 */ │ │ │ │ +754 const_iterator │ │ │ │ +_7_5_5 _c_b_e_g_i_n() const noexcept │ │ │ │ +756 { return const_iterator(this->_M_impl._M_head._M_next); } │ │ │ │ +757 │ │ │ │ +758 /** │ │ │ │ +759 * Returns a read-only (constant) iterator that points before the │ │ │ │ +760 * first element in the %forward_list. Iteration is done in ordinary │ │ │ │ +761 * element order. │ │ │ │ +762 */ │ │ │ │ +763 const_iterator │ │ │ │ +_7_6_4 _c_b_e_f_o_r_e___b_e_g_i_n() const noexcept │ │ │ │ +765 { return const_iterator(&this->_M_impl._M_head); } │ │ │ │ +766 │ │ │ │ +767 /** │ │ │ │ +768 * Returns a read-only (constant) iterator that points one past │ │ │ │ +769 * the last element in the %forward_list. Iteration is done in │ │ │ │ +770 * ordinary element order. │ │ │ │ +771 */ │ │ │ │ +772 const_iterator │ │ │ │ +_7_7_3 _c_e_n_d() const noexcept │ │ │ │ +774 { return const_iterator(nullptr); } │ │ │ │ +775 │ │ │ │ +776 /** │ │ │ │ +777 * Returns true if the %forward_list is empty. (Thus begin() would │ │ │ │ +778 * equal end().) │ │ │ │ +779 */ │ │ │ │ +780 _GLIBCXX_NODISCARD bool │ │ │ │ +_7_8_1 _e_m_p_t_y() const noexcept │ │ │ │ +782 { return this->_M_impl._M_head._M_next == nullptr; } │ │ │ │ +783 │ │ │ │ +784 /** │ │ │ │ +785 * Returns the largest possible number of elements of %forward_list. │ │ │ │ +786 */ │ │ │ │ +787 _s_i_z_e___t_y_p_e │ │ │ │ +_7_8_8 _m_a_x___s_i_z_e() const noexcept │ │ │ │ +789 { 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()); } │ │ │ │ +790 │ │ │ │ +791 // 23.3.4.4 element access: │ │ │ │ +792 │ │ │ │ +793 /** │ │ │ │ +794 * Returns a read/write reference to the data at the first │ │ │ │ +795 * element of the %forward_list. │ │ │ │ +796 */ │ │ │ │ +797 reference │ │ │ │ +_7_9_8 _f_r_o_n_t() │ │ │ │ +799 { │ │ │ │ +800 _Node* __front = static_cast<_Node*>(this->_M_impl._M_head._M_next); │ │ │ │ +801 return *__front->_M_valptr(); │ │ │ │ +802 } │ │ │ │ +803 │ │ │ │ +804 /** │ │ │ │ +805 * Returns a read-only (constant) reference to the data at the first │ │ │ │ +806 * element of the %forward_list. │ │ │ │ +807 */ │ │ │ │ +808 const_reference │ │ │ │ +_8_0_9 _f_r_o_n_t() const │ │ │ │ +810 { │ │ │ │ +811 _Node* __front = static_cast<_Node*>(this->_M_impl._M_head._M_next); │ │ │ │ +812 return *__front->_M_valptr(); │ │ │ │ +813 } │ │ │ │ +814 │ │ │ │ +815 // 23.3.4.5 modifiers: │ │ │ │ +816 │ │ │ │ +817 /** │ │ │ │ +818 * @brief Constructs object in %forward_list at the front of the │ │ │ │ +819 * list. │ │ │ │ +820 * @param __args Arguments. │ │ │ │ +821 * │ │ │ │ +822 * This function will insert an object of type Tp constructed │ │ │ │ +823 * with Tp(std::forward(args)...) at the front of the list │ │ │ │ +824 * Due to the nature of a %forward_list this operation can │ │ │ │ +825 * be done in constant time, and does not invalidate iterators │ │ │ │ +826 * and references. │ │ │ │ +827 */ │ │ │ │ +828 template │ │ │ │ +829#if __cplusplus > 201402L │ │ │ │ +830 reference │ │ │ │ +831#else │ │ │ │ +832 void │ │ │ │ +833#endif │ │ │ │ +_8_3_4 _e_m_p_l_a_c_e___f_r_o_n_t(_Args&&... __args) │ │ │ │ +835 { │ │ │ │ +836 this->_M_insert_after(_c_b_e_f_o_r_e___b_e_g_i_n(), │ │ │ │ +837 _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(__args)...); │ │ │ │ +838#if __cplusplus > 201402L │ │ │ │ +839 return _f_r_o_n_t(); │ │ │ │ +840#endif │ │ │ │ +841 } │ │ │ │ +842 │ │ │ │ +843 /** │ │ │ │ +844 * @brief Add data to the front of the %forward_list. │ │ │ │ +845 * @param __val Data to be added. │ │ │ │ +846 * │ │ │ │ +847 * This is a typical stack operation. The function creates an │ │ │ │ +848 * element at the front of the %forward_list and assigns the given │ │ │ │ +849 * data to it. Due to the nature of a %forward_list this operation │ │ │ │ +850 * can be done in constant time, and does not invalidate iterators │ │ │ │ +851 * and references. │ │ │ │ +852 */ │ │ │ │ +853 void │ │ │ │ +_8_5_4 _p_u_s_h___f_r_o_n_t(const _Tp& __val) │ │ │ │ +855 { this->_M_insert_after(_c_b_e_f_o_r_e___b_e_g_i_n(), __val); } │ │ │ │ +856 │ │ │ │ +857 /** │ │ │ │ +858 * │ │ │ │ +859 */ │ │ │ │ +860 void │ │ │ │ +861 _p_u_s_h___f_r_o_n_t(_Tp&& __val) │ │ │ │ +862 { this->_M_insert_after(_c_b_e_f_o_r_e___b_e_g_i_n(), _s_t_d_:_:_m_o_v_e(__val)); } │ │ │ │ +863 │ │ │ │ +864 /** │ │ │ │ +865 * @brief Removes first element. │ │ │ │ +866 * │ │ │ │ +867 * This is a typical stack operation. It shrinks the %forward_list │ │ │ │ +868 * by one. Due to the nature of a %forward_list this operation can │ │ │ │ +869 * be done in constant time, and only invalidates iterators/references │ │ │ │ +870 * to the element being removed. │ │ │ │ +871 * │ │ │ │ +872 * Note that no data is returned, and if the first element's data │ │ │ │ +873 * is needed, it should be retrieved before pop_front() is │ │ │ │ +874 * called. │ │ │ │ +875 */ │ │ │ │ +876 void │ │ │ │ +_8_7_7 _p_o_p___f_r_o_n_t() │ │ │ │ +878 { this->_M_erase_after(&this->_M_impl._M_head); } │ │ │ │ +879 │ │ │ │ +880 /** │ │ │ │ +881 * @brief Constructs object in %forward_list after the specified │ │ │ │ +882 * iterator. │ │ │ │ +883 * @param __pos A const_iterator into the %forward_list. │ │ │ │ +884 * @param __args Arguments. │ │ │ │ +885 * @return An iterator that points to the inserted data. │ │ │ │ +886 * │ │ │ │ +887 * This function will insert an object of type T constructed │ │ │ │ +888 * with T(std::forward(args)...) after the specified │ │ │ │ +889 * location. Due to the nature of a %forward_list this operation can │ │ │ │ +890 * be done in constant time, and does not invalidate iterators │ │ │ │ +891 * and references. │ │ │ │ +892 */ │ │ │ │ +893 template │ │ │ │ +894 _i_t_e_r_a_t_o_r │ │ │ │ +_8_9_5 _e_m_p_l_a_c_e___a_f_t_e_r(const_iterator __pos, _Args&&... __args) │ │ │ │ +896 { return iterator(this->_M_insert_after(__pos, │ │ │ │ +897 _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(__args)...)); } │ │ │ │ +898 │ │ │ │ +899 /** │ │ │ │ +900 * @brief Inserts given value into %forward_list after specified │ │ │ │ +901 * iterator. │ │ │ │ +902 * @param __pos An iterator into the %forward_list. │ │ │ │ +903 * @param __val Data to be inserted. │ │ │ │ +904 * @return An iterator that points to the inserted data. │ │ │ │ +905 * │ │ │ │ +906 * This function will insert a copy of the given value after │ │ │ │ +907 * the specified location. Due to the nature of a %forward_list this │ │ │ │ +908 * operation can be done in constant time, and does not │ │ │ │ +909 * invalidate iterators and references. │ │ │ │ +910 */ │ │ │ │ +911 _i_t_e_r_a_t_o_r │ │ │ │ +_9_1_2 _i_n_s_e_r_t___a_f_t_e_r(const_iterator __pos, const _Tp& __val) │ │ │ │ +913 { return iterator(this->_M_insert_after(__pos, __val)); } │ │ │ │ +914 │ │ │ │ +915 /** │ │ │ │ +916 * │ │ │ │ +917 */ │ │ │ │ +918 _i_t_e_r_a_t_o_r │ │ │ │ +919 _i_n_s_e_r_t___a_f_t_e_r(const_iterator __pos, _Tp&& __val) │ │ │ │ +920 { return _i_t_e_r_a_t_o_r(this->_M_insert_after(__pos, _s_t_d_:_:_m_o_v_e(__val))); } │ │ │ │ +921 │ │ │ │ +922 /** │ │ │ │ +923 * @brief Inserts a number of copies of given data into the │ │ │ │ +924 * %forward_list. │ │ │ │ +925 * @param __pos An iterator into the %forward_list. │ │ │ │ +926 * @param __n Number of elements to be inserted. │ │ │ │ +927 * @param __val Data to be inserted. │ │ │ │ +928 * @return An iterator pointing to the last inserted copy of │ │ │ │ +929 * @a val or @a pos if @a n == 0. │ │ │ │ +930 * │ │ │ │ +931 * This function will insert a specified number of copies of the │ │ │ │ +932 * given data after the location specified by @a pos. │ │ │ │ +933 * │ │ │ │ +934 * This operation is linear in the number of elements inserted and │ │ │ │ +935 * does not invalidate iterators and references. │ │ │ │ +936 */ │ │ │ │ +937 iterator │ │ │ │ +_9_3_8 _i_n_s_e_r_t___a_f_t_e_r(const_iterator __pos, size_type __n, const _Tp& __val); │ │ │ │ +939 │ │ │ │ +940 /** │ │ │ │ +941 * @brief Inserts a range into the %forward_list. │ │ │ │ +942 * @param __pos An iterator into the %forward_list. │ │ │ │ +943 * @param __first An input iterator. │ │ │ │ +944 * @param __last An input iterator. │ │ │ │ +945 * @return An iterator pointing to the last inserted element or │ │ │ │ +946 * @a __pos if @a __first == @a __last. │ │ │ │ +947 * │ │ │ │ +948 * This function will insert copies of the data in the range │ │ │ │ +949 * [@a __first,@a __last) into the %forward_list after the │ │ │ │ +950 * location specified by @a __pos. │ │ │ │ +951 * │ │ │ │ +952 * This operation is linear in the number of elements inserted and │ │ │ │ +953 * does not invalidate iterators and references. │ │ │ │ +954 */ │ │ │ │ +955 template> │ │ │ │ +957 iterator │ │ │ │ +_9_5_8 _i_n_s_e_r_t___a_f_t_e_r(const_iterator __pos, │ │ │ │ +959 _InputIterator __first, _InputIterator __last); │ │ │ │ +960 │ │ │ │ +961 /** │ │ │ │ +962 * @brief Inserts the contents of an initializer_list into │ │ │ │ +963 * %forward_list after the specified iterator. │ │ │ │ +964 * @param __pos An iterator into the %forward_list. │ │ │ │ +965 * @param __il An initializer_list of value_type. │ │ │ │ +966 * @return An iterator pointing to the last inserted element │ │ │ │ +967 * or @a __pos if @a __il is empty. │ │ │ │ +968 * │ │ │ │ +969 * This function will insert copies of the data in the │ │ │ │ +970 * initializer_list @a __il into the %forward_list before the location │ │ │ │ +971 * specified by @a __pos. │ │ │ │ +972 * │ │ │ │ +973 * This operation is linear in the number of elements inserted and │ │ │ │ +974 * does not invalidate iterators and references. │ │ │ │ +975 */ │ │ │ │ +976 iterator │ │ │ │ +_9_7_7 _i_n_s_e_r_t___a_f_t_e_r(const_iterator __pos, _s_t_d_:_:_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t_<___T_p_> __il) │ │ │ │ +978 { return _i_n_s_e_r_t___a_f_t_e_r(__pos, __il.begin(), __il.end()); } │ │ │ │ +979 │ │ │ │ +980 /** │ │ │ │ +981 * @brief Removes the element pointed to by the iterator following │ │ │ │ +982 * @c pos. │ │ │ │ +983 * @param __pos Iterator pointing before element to be erased. │ │ │ │ +984 * @return An iterator pointing to the element following the one │ │ │ │ +985 * that was erased, or end() if no such element exists. │ │ │ │ +986 * │ │ │ │ +987 * This function will erase the element at the given position and │ │ │ │ +988 * thus shorten the %forward_list by one. │ │ │ │ +989 * │ │ │ │ +990 * Due to the nature of a %forward_list this operation can be done │ │ │ │ +991 * in constant time, and only invalidates iterators/references to │ │ │ │ +992 * the element being removed. The user is also cautioned that │ │ │ │ +993 * this function only erases the element, and that if the element │ │ │ │ +994 * is itself a pointer, the pointed-to memory is not touched in │ │ │ │ +995 * any way. Managing the pointer is the user's responsibility. │ │ │ │ +996 */ │ │ │ │ +997 _i_t_e_r_a_t_o_r │ │ │ │ +_9_9_8 _e_r_a_s_e___a_f_t_e_r(const_iterator __pos) │ │ │ │ +999 { return iterator(this->_M_erase_after(const_cast<_Node_base*> │ │ │ │ +1000 (__pos._M_node))); } │ │ │ │ +1001 │ │ │ │ +1002 /** │ │ │ │ +1003 * @brief Remove a range of elements. │ │ │ │ +1004 * @param __pos Iterator pointing before the first element to be │ │ │ │ +1005 * erased. │ │ │ │ +1006 * @param __last Iterator pointing to one past the last element to be │ │ │ │ +1007 * erased. │ │ │ │ +1008 * @return @ __last. │ │ │ │ +1009 * │ │ │ │ +1010 * This function will erase the elements in the range │ │ │ │ +1011 * @a (__pos,__last) and shorten the %forward_list accordingly. │ │ │ │ +1012 * │ │ │ │ +1013 * This operation is linear time in the size of the range and only │ │ │ │ +1014 * invalidates iterators/references to the element being removed. │ │ │ │ +1015 * The user is also cautioned that this function only erases the │ │ │ │ +1016 * elements, and that if the elements themselves are pointers, the │ │ │ │ +1017 * pointed-to memory is not touched in any way. Managing the pointer │ │ │ │ +1018 * is the user's responsibility. │ │ │ │ +1019 */ │ │ │ │ +1020 _i_t_e_r_a_t_o_r │ │ │ │ +_1_0_2_1 _e_r_a_s_e___a_f_t_e_r(const_iterator __pos, const_iterator __last) │ │ │ │ +1022 { return iterator(this->_M_erase_after(const_cast<_Node_base*> │ │ │ │ +1023 (__pos._M_node), │ │ │ │ +1024 const_cast<_Node_base*> │ │ │ │ +1025 (__last._M_node))); } │ │ │ │ +1026 │ │ │ │ +1027 /** │ │ │ │ +1028 * @brief Swaps data with another %forward_list. │ │ │ │ +1029 * @param __list A %forward_list of the same element and allocator │ │ │ │ +1030 * types. │ │ │ │ +1031 * │ │ │ │ +1032 * This exchanges the elements between two lists in constant │ │ │ │ +1033 * time. Note that the global std::swap() function is │ │ │ │ +1034 * specialized such that std::swap(l1,l2) will feed to this │ │ │ │ +1035 * function. │ │ │ │ +1036 * │ │ │ │ +1037 * Whether the allocators are swapped depends on the allocator traits. │ │ │ │ +1038 */ │ │ │ │ +1039 void │ │ │ │ +_1_0_4_0 _s_w_a_p(_f_o_r_w_a_r_d___l_i_s_t& __list) noexcept │ │ │ │ +1041 { │ │ │ │ +1042 _s_t_d_:_:_s_w_a_p(this->_M_impl._M_head._M_next, │ │ │ │ +1043 __list._M_impl._M_head._M_next); │ │ │ │ +1044 _Node_alloc_traits::_S_on_swap(this->_M_get_Node_allocator(), │ │ │ │ +1045 __list._M_get_Node_allocator()); │ │ │ │ +1046 } │ │ │ │ +1047 │ │ │ │ +1048 /** │ │ │ │ +1049 * @brief Resizes the %forward_list to the specified number of │ │ │ │ +1050 * elements. │ │ │ │ +1051 * @param __sz Number of elements the %forward_list should contain. │ │ │ │ +1052 * │ │ │ │ +1053 * This function will %resize the %forward_list to the specified │ │ │ │ +1054 * number of elements. If the number is smaller than the │ │ │ │ +1055 * %forward_list's current number of elements the %forward_list │ │ │ │ +1056 * is truncated, otherwise the %forward_list is extended and the │ │ │ │ +1057 * new elements are default constructed. │ │ │ │ +1058 */ │ │ │ │ +1059 void │ │ │ │ +_1_0_6_0 _r_e_s_i_z_e(size_type __sz); │ │ │ │ +1061 │ │ │ │ +1062 /** │ │ │ │ +1063 * @brief Resizes the %forward_list to the specified number of │ │ │ │ +1064 * elements. │ │ │ │ +1065 * @param __sz Number of elements the %forward_list should contain. │ │ │ │ +1066 * @param __val Data with which new elements should be populated. │ │ │ │ +1067 * │ │ │ │ +1068 * This function will %resize the %forward_list to the specified │ │ │ │ +1069 * number of elements. If the number is smaller than the │ │ │ │ +1070 * %forward_list's current number of elements the %forward_list │ │ │ │ +1071 * is truncated, otherwise the %forward_list is extended and new │ │ │ │ +1072 * elements are populated with given data. │ │ │ │ +1073 */ │ │ │ │ +1074 void │ │ │ │ +_1_0_7_5 _r_e_s_i_z_e(size_type __sz, const value_type& __val); │ │ │ │ +1076 │ │ │ │ +1077 /** │ │ │ │ +1078 * @brief Erases all the elements. │ │ │ │ +1079 * │ │ │ │ +1080 * Note that this function only erases │ │ │ │ +1081 * the elements, and that if the elements themselves are │ │ │ │ +1082 * pointers, the pointed-to memory is not touched in any way. │ │ │ │ +1083 * Managing the pointer is the user's responsibility. │ │ │ │ +1084 */ │ │ │ │ +1085 void │ │ │ │ +_1_0_8_6 _c_l_e_a_r() noexcept │ │ │ │ +1087 { this->_M_erase_after(&this->_M_impl._M_head, nullptr); } │ │ │ │ +1088 │ │ │ │ +1089 // 23.3.4.6 forward_list operations: │ │ │ │ +1090 │ │ │ │ +1091 /** │ │ │ │ +1092 * @brief Insert contents of another %forward_list. │ │ │ │ +1093 * @param __pos Iterator referencing the element to insert after. │ │ │ │ +1094 * @param __list Source list. │ │ │ │ +1095 * │ │ │ │ +1096 * The elements of @a list are inserted in constant time after │ │ │ │ +1097 * the element referenced by @a pos. @a list becomes an empty │ │ │ │ +1098 * list. │ │ │ │ +1099 * │ │ │ │ +1100 * Requires this != @a x. │ │ │ │ +1101 */ │ │ │ │ +1102 void │ │ │ │ +_1_1_0_3 _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) noexcept │ │ │ │ +1104 { │ │ │ │ +1105 if (!__list.empty()) │ │ │ │ +1106 _M_splice_after(__pos, __list.before_begin(), __list.end()); │ │ │ │ +1107 } │ │ │ │ +1108 │ │ │ │ +1109 void │ │ │ │ +1110 _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) noexcept │ │ │ │ +1111 { _s_p_l_i_c_e___a_f_t_e_r(__pos, _s_t_d_:_:_m_o_v_e(__list)); } │ │ │ │ +1112 │ │ │ │ +1113 /** │ │ │ │ +1114 * @brief Insert element from another %forward_list. │ │ │ │ +1115 * @param __pos Iterator referencing the element to insert after. │ │ │ │ +1116 * @param __list Source list. │ │ │ │ +1117 * @param __i Iterator referencing the element before the element │ │ │ │ +1118 * to move. │ │ │ │ +1119 * │ │ │ │ +1120 * Removes the element in list @a list referenced by @a i and │ │ │ │ +1121 * inserts it into the current list after @a pos. │ │ │ │ +1122 */ │ │ │ │ +1123 void │ │ │ │ +_1_1_2_4 _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, │ │ │ │ +1125 const_iterator __i) noexcept; │ │ │ │ +1126 │ │ │ │ +1127 void │ │ │ │ +1128 _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, │ │ │ │ +1129 const_iterator __i) noexcept │ │ │ │ +1130 { _s_p_l_i_c_e___a_f_t_e_r(__pos, _s_t_d_:_:_m_o_v_e(__list), __i); } │ │ │ │ +1131 │ │ │ │ +1132 /** │ │ │ │ +1133 * @brief Insert range from another %forward_list. │ │ │ │ +1134 * @param __pos Iterator referencing the element to insert after. │ │ │ │ +1135 * @param __list Source list. │ │ │ │ +1136 * @param __before Iterator referencing before the start of range │ │ │ │ +1137 * in list. │ │ │ │ +1138 * @param __last Iterator referencing the end of range in list. │ │ │ │ +1139 * │ │ │ │ +1140 * Removes elements in the range (__before,__last) and inserts them │ │ │ │ +1141 * after @a __pos in constant time. │ │ │ │ +1142 * │ │ │ │ +1143 * Undefined if @a __pos is in (__before,__last). │ │ │ │ +1144 * @{ │ │ │ │ +1145 */ │ │ │ │ +1146 void │ │ │ │ +_1_1_4_7 _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&&, │ │ │ │ +1148 const_iterator __before, const_iterator __last) noexcept │ │ │ │ +1149 { _M_splice_after(__pos, __before, __last); } │ │ │ │ +1150 │ │ │ │ +1151 void │ │ │ │ +_1_1_5_2 _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&, │ │ │ │ +1153 const_iterator __before, const_iterator __last) noexcept │ │ │ │ +1154 { _M_splice_after(__pos, __before, __last); } │ │ │ │ +1155 /// @} │ │ │ │ +1156 │ │ │ │ +1157 private: │ │ │ │ +1158#if __cplusplus > 201703L │ │ │ │ +1159# define __cpp_lib_list_remove_return_type 201806L │ │ │ │ +1160 using __remove_return_type = _s_i_z_e___t_y_p_e; │ │ │ │ +1161# define _GLIBCXX_FWDLIST_REMOVE_RETURN_TYPE_TAG \ │ │ │ │ +1162 __attribute__((__abi_tag__("__cxx20"))) │ │ │ │ +1163#else │ │ │ │ +1164 using __remove_return_type = void; │ │ │ │ +1165# define _GLIBCXX_FWDLIST_REMOVE_RETURN_TYPE_TAG │ │ │ │ +1166#endif │ │ │ │ +1167 public: │ │ │ │ +1168 │ │ │ │ +1169 /** │ │ │ │ +1170 * @brief Remove all elements equal to value. │ │ │ │ +1171 * @param __val The value to remove. │ │ │ │ +1172 * │ │ │ │ +1173 * Removes every element in the list equal to @a __val. │ │ │ │ +1174 * Remaining elements stay in list order. Note that this │ │ │ │ +1175 * function only erases the elements, and that if the elements │ │ │ │ +1176 * themselves are pointers, the pointed-to memory is not │ │ │ │ +1177 * touched in any way. Managing the pointer is the user's │ │ │ │ +1178 * responsibility. │ │ │ │ +1179 */ │ │ │ │ +1180 _GLIBCXX_FWDLIST_REMOVE_RETURN_TYPE_TAG │ │ │ │ +1181 __remove_return_type │ │ │ │ +_1_1_8_2 _r_e_m_o_v_e(const _Tp& __val); │ │ │ │ +1183 │ │ │ │ +1184 /** │ │ │ │ +1185 * @brief Remove all elements satisfying a predicate. │ │ │ │ +1186 * @param __pred Unary predicate function or object. │ │ │ │ +1187 * │ │ │ │ +1188 * Removes every element in the list for which the predicate │ │ │ │ +1189 * returns true. Remaining elements stay in list order. Note │ │ │ │ +1190 * that this function only erases the elements, and that if the │ │ │ │ +1191 * elements themselves are pointers, the pointed-to memory is │ │ │ │ +1192 * not touched in any way. Managing the pointer is the user's │ │ │ │ +1193 * responsibility. │ │ │ │ +1194 */ │ │ │ │ +1195 template │ │ │ │ +1196 __remove_return_type │ │ │ │ +_1_1_9_7 _r_e_m_o_v_e___i_f(_Pred __pred); │ │ │ │ +1198 │ │ │ │ +1199 /** │ │ │ │ +1200 * @brief Remove consecutive duplicate elements. │ │ │ │ +1201 * │ │ │ │ +1202 * For each consecutive set of elements with the same value, │ │ │ │ +1203 * remove all but the first one. Remaining elements stay in │ │ │ │ +1204 * list order. Note that this function only erases the │ │ │ │ +1205 * elements, and that if the elements themselves are pointers, │ │ │ │ +1206 * the pointed-to memory is not touched in any way. Managing │ │ │ │ +1207 * the pointer is the user's responsibility. │ │ │ │ +1208 */ │ │ │ │ +1209 _GLIBCXX_FWDLIST_REMOVE_RETURN_TYPE_TAG │ │ │ │ +1210 __remove_return_type │ │ │ │ +_1_2_1_1 _u_n_i_q_u_e() │ │ │ │ +1212 { return _u_n_i_q_u_e(_s_t_d_:_:_e_q_u_a_l___t_o_<___T_p_>()); } │ │ │ │ +1213 │ │ │ │ +1214#undef _GLIBCXX_FWDLIST_REMOVE_RETURN_TYPE_TAG │ │ │ │ +1215 │ │ │ │ +1216 /** │ │ │ │ +1217 * @brief Remove consecutive elements satisfying a predicate. │ │ │ │ +1218 * @param __binary_pred Binary predicate function or object. │ │ │ │ +1219 * │ │ │ │ +1220 * For each consecutive set of elements [first,last) that │ │ │ │ +1221 * satisfy predicate(first,i) where i is an iterator in │ │ │ │ +1222 * [first,last), remove all but the first one. Remaining │ │ │ │ +1223 * elements stay in list order. Note that this function only │ │ │ │ +1224 * erases the elements, and that if the elements themselves are │ │ │ │ +1225 * pointers, the pointed-to memory is not touched in any way. │ │ │ │ +1226 * Managing the pointer is the user's responsibility. │ │ │ │ +1227 */ │ │ │ │ +1228 template │ │ │ │ +1229 __remove_return_type │ │ │ │ +_1_2_3_0 _u_n_i_q_u_e(_BinPred __binary_pred); │ │ │ │ +1231 │ │ │ │ +1232 /** │ │ │ │ +1233 * @brief Merge sorted lists. │ │ │ │ +1234 * @param __list Sorted list to merge. │ │ │ │ +1235 * │ │ │ │ +1236 * Assumes that both @a list and this list are sorted according to │ │ │ │ +1237 * operator<(). Merges elements of @a __list into this list in │ │ │ │ +1238 * sorted order, leaving @a __list empty when complete. Elements in │ │ │ │ +1239 * this list precede elements in @a __list that are equal. │ │ │ │ +1240 */ │ │ │ │ +1241 void │ │ │ │ +_1_2_4_2 _m_e_r_g_e(_f_o_r_w_a_r_d___l_i_s_t&& __list) │ │ │ │ +1243 { _m_e_r_g_e(_s_t_d_:_:_m_o_v_e(__list), _s_t_d_:_:_l_e_s_s_<___T_p_>()); } │ │ │ │ +1244 │ │ │ │ +1245 void │ │ │ │ +1246 _m_e_r_g_e(_f_o_r_w_a_r_d___l_i_s_t& __list) │ │ │ │ +1247 { _m_e_r_g_e(_s_t_d_:_:_m_o_v_e(__list)); } │ │ │ │ +1248 │ │ │ │ +1249 /** │ │ │ │ +1250 * @brief Merge sorted lists according to comparison function. │ │ │ │ +1251 * @param __list Sorted list to merge. │ │ │ │ +1252 * @param __comp Comparison function defining sort order. │ │ │ │ +1253 * │ │ │ │ +1254 * Assumes that both @a __list and this list are sorted according to │ │ │ │ +1255 * comp. Merges elements of @a __list into this list │ │ │ │ +1256 * in sorted order, leaving @a __list empty when complete. Elements │ │ │ │ +1257 * in this list precede elements in @a __list that are equivalent │ │ │ │ +1258 * according to comp(). │ │ │ │ +1259 */ │ │ │ │ +1260 template │ │ │ │ +1261 void │ │ │ │ +_1_2_6_2 _m_e_r_g_e(_f_o_r_w_a_r_d___l_i_s_t&& __list, _Comp __comp); │ │ │ │ +1263 │ │ │ │ +1264 template │ │ │ │ +1265 void │ │ │ │ +1266 _m_e_r_g_e(_f_o_r_w_a_r_d___l_i_s_t& __list, _Comp __comp) │ │ │ │ +1267 { _m_e_r_g_e(_s_t_d_:_:_m_o_v_e(__list), __comp); } │ │ │ │ +1268 │ │ │ │ +1269 /** │ │ │ │ +1270 * @brief Sort the elements of the list. │ │ │ │ +1271 * │ │ │ │ +1272 * Sorts the elements of this list in NlogN time. Equivalent │ │ │ │ +1273 * elements remain in list order. │ │ │ │ +1274 */ │ │ │ │ +1275 void │ │ │ │ +_1_2_7_6 _s_o_r_t() │ │ │ │ +1277 { _s_o_r_t(_s_t_d_:_:_l_e_s_s_<___T_p_>()); } │ │ │ │ +1278 │ │ │ │ +1279 /** │ │ │ │ +1280 * @brief Sort the forward_list using a comparison function. │ │ │ │ +1281 * │ │ │ │ +1282 * Sorts the elements of this list in NlogN time. Equivalent │ │ │ │ +1283 * elements remain in list order. │ │ │ │ +1284 */ │ │ │ │ +1285 template │ │ │ │ +1286 void │ │ │ │ +_1_2_8_7 _s_o_r_t(_Comp __comp); │ │ │ │ +1288 │ │ │ │ +1289 /** │ │ │ │ +1290 * @brief Reverse the elements in list. │ │ │ │ +1291 * │ │ │ │ +1292 * Reverse the order of elements in the list in linear time. │ │ │ │ +1293 */ │ │ │ │ +1294 void │ │ │ │ +_1_2_9_5 _r_e_v_e_r_s_e() noexcept │ │ │ │ +1296 { this->_M_impl._M_head._M_reverse_after(); } │ │ │ │ +1297 │ │ │ │ +1298 private: │ │ │ │ +1299 // Called by the range constructor to implement [23.3.4.2]/9 │ │ │ │ +1300 template │ │ │ │ +1301 void │ │ │ │ +1302 _M_range_initialize(_InputIterator __first, _InputIterator __last); │ │ │ │ +1303 │ │ │ │ +1304 // Called by forward_list(n,v,a), and the range constructor when it │ │ │ │ +1305 // turns out to be the same thing. │ │ │ │ +1306 void │ │ │ │ +1307 _M_fill_initialize(_s_i_z_e___t_y_p_e __n, const _v_a_l_u_e___t_y_p_e& __value); │ │ │ │ +1308 │ │ │ │ +1309 // Called by splice_after and insert_after. │ │ │ │ +1310 _i_t_e_r_a_t_o_r │ │ │ │ +1311 _M_splice_after(const_iterator __pos, const_iterator __before, │ │ │ │ +1312 const_iterator __last); │ │ │ │ +1313 │ │ │ │ +1314 // Called by forward_list(n). │ │ │ │ +1315 void │ │ │ │ +1316 _M_default_initialize(_s_i_z_e___t_y_p_e __n); │ │ │ │ +1317 │ │ │ │ +1318 // Called by resize(sz). │ │ │ │ +1319 void │ │ │ │ +1320 _M_default_insert_after(const_iterator __pos, _s_i_z_e___t_y_p_e __n); │ │ │ │ +1321 │ │ │ │ +1322 // Called by operator=(forward_list&&) │ │ │ │ +1323 void │ │ │ │ +1324 _M_move_assign(_f_o_r_w_a_r_d___l_i_s_t&& __list, _t_r_u_e___t_y_p_e) noexcept │ │ │ │ +1325 { │ │ │ │ +1326 _c_l_e_a_r(); │ │ │ │ +1327 this->_M_impl._M_head._M_next = __list._M_impl._M_head._M_next; │ │ │ │ +1328 __list._M_impl._M_head._M_next = nullptr; │ │ │ │ +1329 std::__alloc_on_move(this->_M_get_Node_allocator(), │ │ │ │ +1330 __list._M_get_Node_allocator()); │ │ │ │ +1331 } │ │ │ │ +1332 │ │ │ │ +1333 // Called by operator=(forward_list&&) │ │ │ │ +1334 void │ │ │ │ +1335 _M_move_assign(forward_list&& __list, false_type) │ │ │ │ +1336 { │ │ │ │ +1337 if (__list._M_get_Node_allocator() == this->_M_get_Node_allocator()) │ │ │ │ +1338 _M_move_assign(_s_t_d_:_:_m_o_v_e(__list), _t_r_u_e___t_y_p_e()); │ │ │ │ +1339 else │ │ │ │ +1340 // The rvalue's allocator cannot be moved, or is not equal, │ │ │ │ +1341 // so we need to individually move each element. │ │ │ │ +1342 this->_a_s_s_i_g_n(std::make_move_iterator(__list._b_e_g_i_n()), │ │ │ │ +1343 std::make_move_iterator(__list._e_n_d())); │ │ │ │ +1344 } │ │ │ │ +1345 │ │ │ │ +1346 // Called by assign(_InputIterator, _InputIterator) if _Tp is │ │ │ │ +1347 // CopyAssignable. │ │ │ │ +1348 template │ │ │ │ +1349 void │ │ │ │ +1350 _M_assign(_InputIterator __first, _InputIterator __last, _t_r_u_e___t_y_p_e) │ │ │ │ +1351 { │ │ │ │ +1352 auto __prev = _b_e_f_o_r_e___b_e_g_i_n(); │ │ │ │ +1353 auto __curr = _b_e_g_i_n(); │ │ │ │ +1354 auto __end = _e_n_d(); │ │ │ │ +1355 while (__curr != __end && __first != __last) │ │ │ │ +1356 { │ │ │ │ +1357 *__curr = *__first; │ │ │ │ +1358 ++__prev; │ │ │ │ +1359 ++__curr; │ │ │ │ +1360 ++__first; │ │ │ │ +1361 } │ │ │ │ +1362 if (__first != __last) │ │ │ │ +1363 _i_n_s_e_r_t___a_f_t_e_r(__prev, __first, __last); │ │ │ │ +1364 else if (__curr != __end) │ │ │ │ +1365 _e_r_a_s_e___a_f_t_e_r(__prev, __end); │ │ │ │ +1366 } │ │ │ │ +1367 │ │ │ │ +1368 // Called by assign(_InputIterator, _InputIterator) if _Tp is not │ │ │ │ +1369 // CopyAssignable. │ │ │ │ +1370 template │ │ │ │ +1371 void │ │ │ │ +1372 _M_assign(_InputIterator __first, _InputIterator __last, _f_a_l_s_e___t_y_p_e) │ │ │ │ +1373 { │ │ │ │ +1374 _c_l_e_a_r(); │ │ │ │ +1375 _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); │ │ │ │ +1376 } │ │ │ │ +1377 │ │ │ │ +1378 // Called by assign(size_type, const _Tp&) if Tp is CopyAssignable │ │ │ │ +1379 void │ │ │ │ +1380 _M_assign_n(size_type __n, const _Tp& __val, _t_r_u_e___t_y_p_e) │ │ │ │ +1381 { │ │ │ │ +1382 auto __prev = _b_e_f_o_r_e___b_e_g_i_n(); │ │ │ │ +1383 auto __curr = _b_e_g_i_n(); │ │ │ │ +1384 auto __end = _e_n_d(); │ │ │ │ +1385 while (__curr != __end && __n > 0) │ │ │ │ +1386 { │ │ │ │ +1387 *__curr = __val; │ │ │ │ +1388 ++__prev; │ │ │ │ +1389 ++__curr; │ │ │ │ +1390 --__n; │ │ │ │ +1391 } │ │ │ │ +1392 if (__n > 0) │ │ │ │ +1393 _i_n_s_e_r_t___a_f_t_e_r(__prev, __n, __val); │ │ │ │ +1394 else if (__curr != __end) │ │ │ │ +1395 _e_r_a_s_e___a_f_t_e_r(__prev, __end); │ │ │ │ +1396 } │ │ │ │ +1397 │ │ │ │ +1398 // Called by assign(size_type, const _Tp&) if Tp is non-CopyAssignable │ │ │ │ +1399 void │ │ │ │ +1400 _M_assign_n(size_type __n, const _Tp& __val, _f_a_l_s_e___t_y_p_e) │ │ │ │ +1401 { │ │ │ │ +1402 _c_l_e_a_r(); │ │ │ │ +1403 _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); │ │ │ │ +1404 } │ │ │ │ +1405 }; │ │ │ │ +1406 │ │ │ │ +1407#if __cpp_deduction_guides >= 201606 │ │ │ │ +1408 template_:_:_v_a_l_u_e___t_y_p_e, │ │ │ │ +1410 typename _Allocator = _a_l_l_o_c_a_t_o_r_<___V_a_l_T_>, │ │ │ │ +1411 typename = _RequireInputIter<_InputIterator>, │ │ │ │ +1412 typename = _RequireAllocator<_Allocator>> │ │ │ │ +1413 _f_o_r_w_a_r_d___l_i_s_t(_InputIterator, _InputIterator, _Allocator = _Allocator()) │ │ │ │ +1414 -> _f_o_r_w_a_r_d___l_i_s_t_<___V_a_l_T_,_ ___A_l_l_o_c_a_t_o_r_>; │ │ │ │ +1415#endif │ │ │ │ +1416 │ │ │ │ +1417 /** │ │ │ │ +1418 * @brief Forward list equality comparison. │ │ │ │ +1419 * @param __lx A %forward_list │ │ │ │ +1420 * @param __ly A %forward_list of the same type as @a __lx. │ │ │ │ +1421 * @return True iff the elements of the forward lists are equal. │ │ │ │ +1422 * │ │ │ │ +1423 * This is an equivalence relation. It is linear in the number of │ │ │ │ +1424 * elements of the forward lists. Deques are considered equivalent │ │ │ │ +1425 * if corresponding elements compare equal. │ │ │ │ +1426 */ │ │ │ │ +1427 template │ │ │ │ +1428 bool │ │ │ │ +1429 operator==(const _f_o_r_w_a_r_d___l_i_s_t_<___T_p_,_ ___A_l_l_o_c_>& __lx, │ │ │ │ +1430 const _f_o_r_w_a_r_d___l_i_s_t_<___T_p_,_ ___A_l_l_o_c_>& __ly); │ │ │ │ +1431 │ │ │ │ +1432#if __cpp_lib_three_way_comparison │ │ │ │ +1433 /** │ │ │ │ +1434 * @brief Forward list ordering relation. │ │ │ │ +1435 * @param __x A `forward_list`. │ │ │ │ +1436 * @param __y A `forward_list` of the same type as `__x`. │ │ │ │ +1437 * @return A value indicating whether `__x` is less than, equal to, │ │ │ │ +1438 * greater than, or incomparable with `__y`. │ │ │ │ +1439 * │ │ │ │ +1440 * See `std::lexicographical_compare_three_way()` for how the determination │ │ │ │ +1441 * is made. This operator is used to synthesize relational operators like │ │ │ │ +1442 * `<` and `>=` etc. │ │ │ │ +1443 */ │ │ │ │ +1444 template │ │ │ │ +1445 inline __detail::__synth3way_t<_Tp> │ │ │ │ +1446 operator<=>(const _f_o_r_w_a_r_d___l_i_s_t_<___T_p_,_ ___A_l_l_o_c_>& __x, │ │ │ │ +1447 const _f_o_r_w_a_r_d___l_i_s_t_<___T_p_,_ ___A_l_l_o_c_>& __y) │ │ │ │ +1448 { │ │ │ │ +1449 return std::lexicographical_compare_three_way(__x.begin(), __x.end(), │ │ │ │ +1450 __y.begin(), __y.end(), │ │ │ │ +1451 __detail::__synth3way); │ │ │ │ +1452 } │ │ │ │ +1453#else │ │ │ │ +1454 /** │ │ │ │ +1455 * @brief Forward list ordering relation. │ │ │ │ +1456 * @param __lx A %forward_list. │ │ │ │ +1457 * @param __ly A %forward_list of the same type as @a __lx. │ │ │ │ +1458 * @return True iff @a __lx is lexicographically less than @a __ly. │ │ │ │ +1459 * │ │ │ │ +1460 * This is a total ordering relation. It is linear in the number of │ │ │ │ +1461 * elements of the forward lists. The elements must be comparable │ │ │ │ +1462 * with @c <. │ │ │ │ +1463 * │ │ │ │ +1464 * See std::lexicographical_compare() for how the determination is made. │ │ │ │ +1465 */ │ │ │ │ +1466 template │ │ │ │ +_1_4_6_7 inline bool │ │ │ │ +1468 operator<(const _f_o_r_w_a_r_d___l_i_s_t_<___T_p_,_ ___A_l_l_o_c_>& __lx, │ │ │ │ +1469 const _f_o_r_w_a_r_d___l_i_s_t_<___T_p_,_ ___A_l_l_o_c_>& __ly) │ │ │ │ +1470 { return std::lexicographical_compare(__lx._c_b_e_g_i_n(), __lx._c_e_n_d(), │ │ │ │ +1471 __ly._c_b_e_g_i_n(), __ly._c_e_n_d()); } │ │ │ │ +1472 │ │ │ │ +1473 /// Based on operator== │ │ │ │ +1474 template │ │ │ │ +1475 inline bool │ │ │ │ +_1_4_7_6 operator!=(const _f_o_r_w_a_r_d___l_i_s_t_<___T_p_,_ ___A_l_l_o_c_>& __lx, │ │ │ │ +1477 const _f_o_r_w_a_r_d___l_i_s_t_<___T_p_,_ ___A_l_l_o_c_>& __ly) │ │ │ │ +1478 { return !(__lx == __ly); } │ │ │ │ +1479 │ │ │ │ +1480 /// Based on operator< │ │ │ │ +1481 template │ │ │ │ +1482 inline bool │ │ │ │ +_1_4_8_3 operator>(const _f_o_r_w_a_r_d___l_i_s_t_<___T_p_,_ ___A_l_l_o_c_>& __lx, │ │ │ │ +1484 const _f_o_r_w_a_r_d___l_i_s_t_<___T_p_,_ ___A_l_l_o_c_>& __ly) │ │ │ │ +1485 { return (__ly < __lx); } │ │ │ │ +1486 │ │ │ │ +1487 /// Based on operator< │ │ │ │ +1488 template │ │ │ │ +1489 inline bool │ │ │ │ +_1_4_9_0 operator>=(const _f_o_r_w_a_r_d___l_i_s_t_<___T_p_,_ ___A_l_l_o_c_>& __lx, │ │ │ │ +1491 const _f_o_r_w_a_r_d___l_i_s_t_<___T_p_,_ ___A_l_l_o_c_>& __ly) │ │ │ │ +1492 { return !(__lx < __ly); } │ │ │ │ +1493 │ │ │ │ +1494 /// Based on operator< │ │ │ │ +1495 template │ │ │ │ +_1_4_9_6 inline bool │ │ │ │ +1497 operator<=(const _f_o_r_w_a_r_d___l_i_s_t_<___T_p_,_ ___A_l_l_o_c_>& __lx, │ │ │ │ +1498 const _f_o_r_w_a_r_d___l_i_s_t_<___T_p_,_ ___A_l_l_o_c_>& __ly) │ │ │ │ +1499 { return !(__ly < __lx); } │ │ │ │ +1500#endif // three-way comparison │ │ │ │ +1501 │ │ │ │ +1502 /// See std::forward_list::swap(). │ │ │ │ +1503 template │ │ │ │ +1504 inline void │ │ │ │ +_1_5_0_5 _s_w_a_p(_f_o_r_w_a_r_d___l_i_s_t_<___T_p_,_ ___A_l_l_o_c_>& __lx, │ │ │ │ +1506 _f_o_r_w_a_r_d___l_i_s_t_<___T_p_,_ ___A_l_l_o_c_>& __ly) │ │ │ │ +1507 noexcept(noexcept(__lx.swap(__ly))) │ │ │ │ +1508 { __lx.swap(__ly); } │ │ │ │ +1509 │ │ │ │ +1510_GLIBCXX_END_NAMESPACE_CONTAINER │ │ │ │ +1511_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ +1512} // namespace std │ │ │ │ +1513 │ │ │ │ +1514#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_3 │ │ │ │ +_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_6 │ │ │ │ +_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_8 │ │ │ │ +_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 │ │ │ │ ISO C++ entities toplevel namespace is std. │ │ │ │ +_s_t_d_:_:_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t │ │ │ │ +initializer_list │ │ │ │ +DDeeffiinniittiioonn _i_n_i_t_i_a_l_i_z_e_r___l_i_s_t_:_4_8 │ │ │ │ +_s_t_d_:_:_i_s___s_a_m_e │ │ │ │ +is_same │ │ │ │ +DDeeffiinniittiioonn _t_y_p_e___t_r_a_i_t_s_:_1_4_0_9 │ │ │ │ +_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_3_3 │ │ │ │ +_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_0_8_8 │ │ │ │ +_s_t_d_:_:_i_s___c_o_p_y___a_s_s_i_g_n_a_b_l_e │ │ │ │ +is_copy_assignable │ │ │ │ +DDeeffiinniittiioonn _t_y_p_e___t_r_a_i_t_s_:_1_1_0_9 │ │ │ │ +_s_t_d_:_:_a_l_l_o_c_a_t_o_r___t_r_a_i_t_s │ │ │ │ +Uniform interface to all allocator types. │ │ │ │ +DDeeffiinniittiioonn _b_i_t_s_/_a_l_l_o_c___t_r_a_i_t_s_._h_:_9_1 │ │ │ │ +_s_t_d_:_:_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_ _>_ _>_:_:_p_o_i_n_t_e_r │ │ │ │ +__detected_or_t< value_type *, __pointer, _Alloc > pointer │ │ │ │ +DDeeffiinniittiioonn _b_i_t_s_/_a_l_l_o_c___t_r_a_i_t_s_._h_:_1_0_2 │ │ │ │ +_s_t_d_:_:_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_ _>_ _>_:_:_c_o_n_s_t___p_o_i_n_t_e_r │ │ │ │ +typename _Ptr< __c_pointer, const value_type >::type const_pointer │ │ │ │ +DDeeffiinniittiioonn _b_i_t_s_/_a_l_l_o_c___t_r_a_i_t_s_._h_:_1_4_2 │ │ │ │ +_s_t_d_:_:_a_l_l_o_c_a_t_o_r │ │ │ │ +The standard allocator, as per C++03 [20.4.1]. │ │ │ │ +DDeeffiinniittiioonn _a_l_l_o_c_a_t_o_r_._h_:_1_2_5 │ │ │ │ +_s_t_d_:_:_v_a_l_u_e___t_y_p_e │ │ │ │ +_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 inequality comparison. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_1_8_8 │ │ │ │ +_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_0 │ │ │ │ +_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_1 │ │ │ │ +_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 inequality comparison. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_2_6_7 │ │ │ │ +_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_5_9 │ │ │ │ +_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_2_4 │ │ │ │ +_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, _InputIterator __first, │ │ │ │ +_InputIterator __last) │ │ │ │ +Inserts a range into the forward_list. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._t_c_c_:_2_7_1 │ │ │ │ +_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_:_:_m_e_r_g_e │ │ │ │ +void merge(forward_list &&__list, _Comp __comp) │ │ │ │ +Merge sorted lists according to comparison function. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._t_c_c_:_3_6_8 │ │ │ │ +_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_1_9 │ │ │ │ +_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_1_1 │ │ │ │ +_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_2_9_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()=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_:_5_9_0 │ │ │ │ +_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_:_9_9_8 │ │ │ │ +_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 _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_0_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_4_0 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_s_o_r_t │ │ │ │ +void sort(_Comp __comp) │ │ │ │ +Sort the forward_list using a comparison function. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._t_c_c_:_4_1_7 │ │ │ │ +_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_0_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(const forward_list &__list, const _Alloc &__al) │ │ │ │ +Copy constructor with allocator argument. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_4_7_5 │ │ │ │ +_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_4_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(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_6_6 │ │ │ │ +_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, size_type __n, const _Tp &__val) │ │ │ │ +Inserts a number of copies of given data into the forward_list. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._t_c_c_:_2_5_6 │ │ │ │ +_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. │ │ │ │ +_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_2_7_6 │ │ │ │ +_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_0_2 │ │ │ │ +_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_:_8_9_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) │ │ │ │ +The forward_list copy constructor. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_5_5_8 │ │ │ │ +_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_1_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=(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_1_8 │ │ │ │ +_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_3_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(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_3_1 │ │ │ │ +_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_7_5 │ │ │ │ +_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_2_8 │ │ │ │ +_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_0_3 │ │ │ │ +_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_6_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_3_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(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_8_2 │ │ │ │ +_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_3_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 _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_1_8 │ │ │ │ +_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_:_9_7_7 │ │ │ │ +_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_4_6 │ │ │ │ +_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_4_7 │ │ │ │ +_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_:_7_9_8 │ │ │ │ +_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, const_iterator │ │ │ │ +__i) noexcept │ │ │ │ +Insert element from another forward_list. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._t_c_c_:_2_3_9 │ │ │ │ +_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_2_1 │ │ │ │ +_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_1_1 │ │ │ │ +_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_0_8_6 │ │ │ │ +_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_7_3 │ │ │ │ +_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_5_8 │ │ │ │ +_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_:_7_8_1 │ │ │ │ +_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_:_6_9_2 │ │ │ │ +_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, const value_type &__val) │ │ │ │ +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_:_2_0_1 │ │ │ │ +_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_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(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_4_8 │ │ │ │ +_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_5_2 │ │ │ │ +_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_5_5 │ │ │ │ +_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_:_8_7_7 │ │ │ │ +_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_8_7 │ │ │ │ +_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_:_7_8_8 │ │ │ │ +_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_0_0 │ │ │ │ +_s_t_d_:_:_e_q_u_a_l___t_o │ │ │ │ +One of the comparison functors. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___f_u_n_c_t_i_o_n_._h_:_3_6_6 │ │ │ │ +_s_t_d_:_:_l_e_s_s │ │ │ │ +One of the comparison functors. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___f_u_n_c_t_i_o_n_._h_:_3_9_6 │ │ │ │ +_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 │ │ │ │ +_____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_<_ ___N_o_d_e___a_l_l_o_c___t_y_p_e_ _>_:_:_a_l_l_o_c_a_t_e │ │ │ │ +static constexpr pointer allocate(_Node_alloc_type &__a, size_type __n) │ │ │ │ +_____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_ _>_:_:_d_e_a_l_l_o_c_a_t_e │ │ │ │ +static constexpr void deallocate(_Node_alloc_type &__a, pointer __p, size_type │ │ │ │ +__n) │ │ │ │ +_____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_ _>_:_:_m_a_x___s_i_z_e │ │ │ │ +static constexpr size_type max_size(const _Node_alloc_type &__a) noexcept │ │ │ │ +_a_l_l_o_c___t_r_a_i_t_s_._h │ │ │ │ +_s_t_l___i_t_e_r_a_t_o_r_._h │ │ │ │ * bbiittss │ │ │ │ - * _v_a_l_a_r_r_a_y___a_r_r_a_y_._h │ │ │ │ + * _f_o_r_w_a_r_d___l_i_s_t_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.15.0 │ │ ├── ./usr/share/doc/gcc-11-base/libstdc++/user/a00359.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: uses_allocator_args.h File Reference │ │ │ +libstdc++: gslice_array.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -48,35 +48,44 @@ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
uses_allocator_args.h File Reference
│ │ │ +
gslice_array.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │

Go to the source code of this file.

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

│ │ │ +Classes

class  std::gslice_array< _Tp >
│ │ │ + │ │ │ + │ │ │ +

│ │ │ +Namespaces

namespace  std
│ │ │

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 <valarray>.

│ │ │ │ │ │ -

Definition in file uses_allocator_args.h.

│ │ │ +

Definition in file gslice_array.h.

│ │ │
│ │ │
│ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,10 +1,14 @@ │ │ │ │ libstdc++ │ │ │ │ -uses_allocator_args.h File Reference │ │ │ │ +gslice_array.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_:_:_g_s_l_i_c_e___a_r_r_a_y_<_ ___T_p_ _> │ │ │ │ +NNaammeessppaacceess │ │ │ │ +namespace   _s_t_d │ │ │ │ ********** 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 _g_s_l_i_c_e___a_r_r_a_y_._h. │ │ │ │ * bbiittss │ │ │ │ - * _u_s_e_s___a_l_l_o_c_a_t_o_r___a_r_g_s_._h │ │ │ │ + * _g_s_l_i_c_e___a_r_r_a_y_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.15.0 │ │ ├── ./usr/share/doc/gcc-11-base/libstdc++/user/a00359_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: uses_allocator_args.h Source File │ │ │ +libstdc++: gslice_array.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -48,20 +48,20 @@ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
uses_allocator_args.h
│ │ │ +
gslice_array.h
│ │ │
│ │ │
│ │ │ -Go to the documentation of this file.
1// Utility functions for 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) 2019-2021 Free Software Foundation, Inc.
│ │ │ +
3// Copyright (C) 1997-2021 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
│ │ │ @@ -75,222 +75,246 @@ │ │ │
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/gslice_array.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{valarray}
│ │ │
28 */
│ │ │
29
│ │ │ -
30#ifndef _USES_ALLOCATOR_ARGS
│ │ │ -
31#define _USES_ALLOCATOR_ARGS 1
│ │ │ -
32
│ │ │ -
33#pragma GCC system_header
│ │ │ +
30// Written by Gabriel Dos Reis <Gabriel.Dos-Reis@DPTMaths.ENS-Cachan.Fr>
│ │ │ +
31
│ │ │ +
32#ifndef _GSLICE_ARRAY_H
│ │ │ +
33#define _GSLICE_ARRAY_H 1
│ │ │
34
│ │ │ -
35#if __cplusplus > 201703L && __cpp_concepts
│ │ │ +
35#pragma GCC system_header
│ │ │
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 template<typename _Tp>
│ │ │ -
46 inline constexpr bool __is_pair = false;
│ │ │ -
47 template<typename _Tp, typename _Up>
│ │ │ -
48 inline constexpr bool __is_pair<pair<_Tp, _Up>> = true;
│ │ │ -
49 template<typename _Tp, typename _Up>
│ │ │ -
50 inline constexpr bool __is_pair<const pair<_Tp, _Up>> = true;
│ │ │ -
51
│ │ │ -
52 template<typename _Tp>
│ │ │ -
53 concept _Std_pair = __is_pair<_Tp>;
│ │ │ -
54
│ │ │ -
55/** @addtogroup allocators
│ │ │ -
56 * @{
│ │ │ -
57 */
│ │ │ -
58
│ │ │ -
59// Not specified by C++20, used internally
│ │ │ -
60#define __cpp_lib_make_obj_using_allocator 201811L
│ │ │ -
61
│ │ │ -
62 template<typename _Tp, typename _Alloc, typename... _Args>
│ │ │ -
63 constexpr auto
│ │ │ -
64 uses_allocator_construction_args(const _Alloc& __a,
│ │ │ -
65 _Args&&... __args) noexcept
│ │ │ -
66 requires (! _Std_pair<_Tp>)
│ │ │ -
67 {
│ │ │ -
68 if constexpr (uses_allocator_v<remove_cv_t<_Tp>, _Alloc>)
│ │ │ -
69 {
│ │ │ -
70 if constexpr (is_constructible_v<_Tp, allocator_arg_t,
│ │ │ -
71 const _Alloc&, _Args...>)
│ │ │ -
72 {
│ │ │ -
73 return tuple<allocator_arg_t, const _Alloc&, _Args&&...>(
│ │ │ -
74 allocator_arg, __a, std::forward<_Args>(__args)...);
│ │ │ -
75 }
│ │ │ -
76 else
│ │ │ -
77 {
│ │ │ -
78 static_assert(is_constructible_v<_Tp, _Args..., const _Alloc&>,
│ │ │ -
79 "construction with an allocator must be possible"
│ │ │ -
80 " if uses_allocator is true");
│ │ │ -
81
│ │ │ -
82 return tuple<_Args&&..., const _Alloc&>(
│ │ │ -
83 std::forward<_Args>(__args)..., __a);
│ │ │ -
84 }
│ │ │ -
85 }
│ │ │ -
86 else
│ │ │ -
87 {
│ │ │ -
88 static_assert(is_constructible_v<_Tp, _Args...>);
│ │ │ -
89
│ │ │ -
90 return tuple<_Args&&...>(std::forward<_Args>(__args)...);
│ │ │ -
91 }
│ │ │ -
92 }
│ │ │ -
93
│ │ │ -
94 template<_Std_pair _Tp, typename _Alloc, typename _Tuple1, typename _Tuple2>
│ │ │ -
95 constexpr auto
│ │ │ -
96 uses_allocator_construction_args(const _Alloc& __a, piecewise_construct_t,
│ │ │ -
97 _Tuple1&& __x, _Tuple2&& __y) noexcept;
│ │ │ -
98
│ │ │ -
99 template<_Std_pair _Tp, typename _Alloc>
│ │ │ -
100 constexpr auto
│ │ │ -
101 uses_allocator_construction_args(const _Alloc&) noexcept;
│ │ │ -
102
│ │ │ -
103 template<_Std_pair _Tp, typename _Alloc, typename _Up, typename _Vp>
│ │ │ -
104 constexpr auto
│ │ │ -
105 uses_allocator_construction_args(const _Alloc&, _Up&&, _Vp&&) noexcept;
│ │ │ -
106
│ │ │ -
107 template<_Std_pair _Tp, typename _Alloc, typename _Up, typename _Vp>
│ │ │ -
108 constexpr auto
│ │ │ -
109 uses_allocator_construction_args(const _Alloc&,
│ │ │ -
110 const pair<_Up, _Vp>&) noexcept;
│ │ │ -
111
│ │ │ -
112 template<_Std_pair _Tp, typename _Alloc, typename _Up, typename _Vp>
│ │ │ -
113 constexpr auto
│ │ │ -
114 uses_allocator_construction_args(const _Alloc&, pair<_Up, _Vp>&&) noexcept;
│ │ │ -
115
│ │ │ -
116 template<_Std_pair _Tp, typename _Alloc, typename _Tuple1, typename _Tuple2>
│ │ │ -
117 constexpr auto
│ │ │ -
118 uses_allocator_construction_args(const _Alloc& __a, piecewise_construct_t,
│ │ │ -
119 _Tuple1&& __x, _Tuple2&& __y) noexcept
│ │ │ -
120 {
│ │ │ -
121 using _Tp1 = typename _Tp::first_type;
│ │ │ -
122 using _Tp2 = typename _Tp::second_type;
│ │ │ -
123
│ │ │ -
124 return std::make_tuple(piecewise_construct,
│ │ │ -
125 std::apply([&__a](auto&&... __args1) {
│ │ │ -
126 return std::uses_allocator_construction_args<_Tp1>(
│ │ │ -
127 __a, std::forward<decltype(__args1)>(__args1)...);
│ │ │ -
128 }, std::forward<_Tuple1>(__x)),
│ │ │ -
129 std::apply([&__a](auto&&... __args2) {
│ │ │ -
130 return std::uses_allocator_construction_args<_Tp2>(
│ │ │ -
131 __a, std::forward<decltype(__args2)>(__args2)...);
│ │ │ -
132 }, std::forward<_Tuple2>(__y)));
│ │ │ -
133 }
│ │ │ -
134
│ │ │ -
135 template<_Std_pair _Tp, typename _Alloc>
│ │ │ -
136 constexpr auto
│ │ │ -
137 uses_allocator_construction_args(const _Alloc& __a) noexcept
│ │ │ -
138 {
│ │ │ -
139 using _Tp1 = typename _Tp::first_type;
│ │ │ -
140 using _Tp2 = typename _Tp::second_type;
│ │ │ -
141
│ │ │ -
142 return std::make_tuple(piecewise_construct,
│ │ │ -
143 std::uses_allocator_construction_args<_Tp1>(__a),
│ │ │ -
144 std::uses_allocator_construction_args<_Tp2>(__a));
│ │ │ -
145 }
│ │ │ -
146
│ │ │ -
147 template<_Std_pair _Tp, typename _Alloc, typename _Up, typename _Vp>
│ │ │ -
148 constexpr auto
│ │ │ -
149 uses_allocator_construction_args(const _Alloc& __a, _Up&& __u, _Vp&& __v)
│ │ │ -
150 noexcept
│ │ │ -
151 {
│ │ │ -
152 using _Tp1 = typename _Tp::first_type;
│ │ │ -
153 using _Tp2 = typename _Tp::second_type;
│ │ │ -
154
│ │ │ -
155 return std::make_tuple(piecewise_construct,
│ │ │ -
156 std::uses_allocator_construction_args<_Tp1>(__a,
│ │ │ -
157 std::forward<_Up>(__u)),
│ │ │ -
158 std::uses_allocator_construction_args<_Tp2>(__a,
│ │ │ -
159 std::forward<_Vp>(__v)));
│ │ │ -
160 }
│ │ │ -
161
│ │ │ -
162 template<_Std_pair _Tp, typename _Alloc, typename _Up, typename _Vp>
│ │ │ -
163 constexpr auto
│ │ │ -
164 uses_allocator_construction_args(const _Alloc& __a,
│ │ │ -
165 const pair<_Up, _Vp>& __pr) noexcept
│ │ │ -
166 {
│ │ │ -
167 using _Tp1 = typename _Tp::first_type;
│ │ │ -
168 using _Tp2 = typename _Tp::second_type;
│ │ │ -
169
│ │ │ -
170 return std::make_tuple(piecewise_construct,
│ │ │ -
171 std::uses_allocator_construction_args<_Tp1>(__a, __pr.first),
│ │ │ -
172 std::uses_allocator_construction_args<_Tp2>(__a, __pr.second));
│ │ │ -
173 }
│ │ │ -
174
│ │ │ -
175 template<_Std_pair _Tp, typename _Alloc, typename _Up, typename _Vp>
│ │ │ -
176 constexpr auto
│ │ │ -
177 uses_allocator_construction_args(const _Alloc& __a,
│ │ │ -
178 pair<_Up, _Vp>&& __pr) noexcept
│ │ │ -
179 {
│ │ │ -
180 using _Tp1 = typename _Tp::first_type;
│ │ │ -
181 using _Tp2 = typename _Tp::second_type;
│ │ │ -
182
│ │ │ -
183 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ -
184 // 3527. uses_allocator_construction_args handles rvalue pairs
│ │ │ -
185 // of rvalue references incorrectly
│ │ │ -
186 return std::make_tuple(piecewise_construct,
│ │ │ -
187 std::uses_allocator_construction_args<_Tp1>(__a,
│ │ │ -
188 std::get<0>(std::move(__pr))),
│ │ │ -
189 std::uses_allocator_construction_args<_Tp2>(__a,
│ │ │ -
190 std::get<1>(std::move(__pr))));
│ │ │ -
191 }
│ │ │ -
192
│ │ │ -
193 template<typename _Tp, typename _Alloc, typename... _Args>
│ │ │ -
194 constexpr _Tp
│ │ │ -
195 make_obj_using_allocator(const _Alloc& __a, _Args&&... __args)
│ │ │ -
196 {
│ │ │ -
197 return std::make_from_tuple<_Tp>(
│ │ │ -
198 std::uses_allocator_construction_args<_Tp>(__a,
│ │ │ -
199 std::forward<_Args>(__args)...));
│ │ │ -
200 }
│ │ │ -
201
│ │ │ -
202 template<typename _Tp, typename _Alloc, typename... _Args>
│ │ │ -
203 constexpr _Tp*
│ │ │ -
204 uninitialized_construct_using_allocator(_Tp* __p, const _Alloc& __a,
│ │ │ -
205 _Args&&... __args)
│ │ │ -
206 {
│ │ │ -
207 return std::apply([&](auto&&... __xs) {
│ │ │ -
208 return std::construct_at(__p, std::forward<decltype(__xs)>(__xs)...);
│ │ │ -
209 }, std::uses_allocator_construction_args<_Tp>(__a,
│ │ │ -
210 std::forward<_Args>(__args)...));
│ │ │ -
211 }
│ │ │ -
212/// @}
│ │ │ -
213_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ -
214} // namespace std
│ │ │ -
215#endif // C++20
│ │ │ -
216#endif // _USES_ALLOCATOR_ARGS
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
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
│ │ │ +
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
│ │ │ +
129 gslice_array(_Array<_Tp>, const valarray<size_t>&);
│ │ │ +
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>
│ │ │ +
141 inline
│ │ │ +
142 gslice_array<_Tp>::gslice_array(_Array<_Tp> __a,
│ │ │ +
143 const valarray<size_t>& __i)
│ │ │ +
144 : _M_array(__a), _M_index(__i) {}
│ │ │ +
145
│ │ │ +
146 template<typename _Tp>
│ │ │ +
147 inline
│ │ │ +
│ │ │ + │ │ │ +
149 : _M_array(__a._M_array), _M_index(__a._M_index) {}
│ │ │ +
│ │ │ +
150
│ │ │ +
151 template<typename _Tp>
│ │ │ +
152 inline gslice_array<_Tp>&
│ │ │ +
│ │ │ + │ │ │ +
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
│ │ │ +
180 gslice_array<_Tp>::operator=(const _Expr<_Dom, _Tp>& __e) const
│ │ │ +
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 */
│ │ │ +
size_t size() const
Return the number of elements in array.
Definition valarray:937
│ │ │ +
gslice_array(const gslice_array &)
Copy constructor. Both slices refer to the same underlying array.
│ │ │ +
gslice_array & operator=(const gslice_array &)
Assignment operator. Assigns slice elements to corresponding elements of a.
│ │ │
ISO C++ entities toplevel namespace is std.
│ │ │ -
Primary class template, tuple.
Definition tuple:609
│ │ │ -
Tag type for piecewise construction of std::pair objects.
Definition stl_pair.h:80
│ │ │ -
Struct holding two objects of arbitrary type.
Definition stl_pair.h:213
│ │ │ +
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.
│ │ │ +
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.
│ │ │ +
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,13 +1,13 @@ │ │ │ │ libstdc++ │ │ │ │ -uses_allocator_args.h │ │ │ │ +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// Utility functions for uses-allocator construction -*- C++ -*- │ │ │ │ +1// The template and inlines for the -*- C++ -*- gslice_array class. │ │ │ │ 2 │ │ │ │ -3// Copyright (C) 2019-2021 Free Software Foundation, Inc. │ │ │ │ +3// Copyright (C) 1997-2021 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,231 +21,261 @@ │ │ │ │ 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/gslice_array.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{valarray} │ │ │ │ 28 */ │ │ │ │ 29 │ │ │ │ -30#ifndef _USES_ALLOCATOR_ARGS │ │ │ │ -31#define _USES_ALLOCATOR_ARGS 1 │ │ │ │ -32 │ │ │ │ -33#pragma GCC system_header │ │ │ │ +30// Written by Gabriel Dos Reis │ │ │ │ +31 │ │ │ │ +32#ifndef _GSLICE_ARRAY_H │ │ │ │ +33#define _GSLICE_ARRAY_H 1 │ │ │ │ 34 │ │ │ │ -35#if __cplusplus > 201703L && __cpp_concepts │ │ │ │ +35#pragma GCC system_header │ │ │ │ 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 template │ │ │ │ -46 inline constexpr bool __is_pair = false; │ │ │ │ -47 template │ │ │ │ -48 inline constexpr bool __is_pair> = true; │ │ │ │ -49 template │ │ │ │ -50 inline constexpr bool __is_pair> = true; │ │ │ │ -51 │ │ │ │ -52 template │ │ │ │ -53 concept _Std_pair = __is_pair<_Tp>; │ │ │ │ -54 │ │ │ │ -55/** @addtogroup allocators │ │ │ │ -56 * @{ │ │ │ │ -57 */ │ │ │ │ -58 │ │ │ │ -59// Not specified by C++20, used internally │ │ │ │ -60#define __cpp_lib_make_obj_using_allocator 201811L │ │ │ │ -61 │ │ │ │ -62 template │ │ │ │ -63 constexpr auto │ │ │ │ -64 uses_allocator_construction_args(const _Alloc& __a, │ │ │ │ -65 _Args&&... __args) noexcept │ │ │ │ -66 requires (! _Std_pair<_Tp>) │ │ │ │ -67 { │ │ │ │ -68 if constexpr (uses_allocator_v, _Alloc>) │ │ │ │ -69 { │ │ │ │ -70 if constexpr (is_constructible_v<_Tp, allocator_arg_t, │ │ │ │ -71 const _Alloc&, _Args...>) │ │ │ │ -72 { │ │ │ │ -73 return _t_u_p_l_e( │ │ │ │ -74 allocator_arg, __a, _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(__args)...); │ │ │ │ -75 } │ │ │ │ -76 else │ │ │ │ -77 { │ │ │ │ -78 static_assert(is_constructible_v<_Tp, _Args..., const _Alloc&>, │ │ │ │ -79 "construction with an allocator must be possible" │ │ │ │ -80 " if uses_allocator is true"); │ │ │ │ -81 │ │ │ │ -82 return _t_u_p_l_e<_Args&&..., const _Alloc&>( │ │ │ │ -83 _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(__args)..., __a); │ │ │ │ -84 } │ │ │ │ -85 } │ │ │ │ -86 else │ │ │ │ -87 { │ │ │ │ -88 static_assert(is_constructible_v<_Tp, _Args...>); │ │ │ │ -89 │ │ │ │ -90 return _t_u_p_l_e<_Args&&...>(_s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(__args)...); │ │ │ │ -91 } │ │ │ │ -92 } │ │ │ │ -93 │ │ │ │ -94 template<_Std_pair _Tp, typename _Alloc, typename _Tuple1, typename _Tuple2> │ │ │ │ -95 constexpr auto │ │ │ │ -96 uses_allocator_construction_args(const _Alloc& __a, _p_i_e_c_e_w_i_s_e___c_o_n_s_t_r_u_c_t___t, │ │ │ │ -97 _Tuple1&& __x, _Tuple2&& __y) noexcept; │ │ │ │ -98 │ │ │ │ -99 template<_Std_pair _Tp, typename _Alloc> │ │ │ │ -100 constexpr auto │ │ │ │ -101 uses_allocator_construction_args(const _Alloc&) noexcept; │ │ │ │ -102 │ │ │ │ -103 template<_Std_pair _Tp, typename _Alloc, typename _Up, typename _Vp> │ │ │ │ -104 constexpr auto │ │ │ │ -105 uses_allocator_construction_args(const _Alloc&, _Up&&, _Vp&&) noexcept; │ │ │ │ -106 │ │ │ │ -107 template<_Std_pair _Tp, typename _Alloc, typename _Up, typename _Vp> │ │ │ │ -108 constexpr auto │ │ │ │ -109 uses_allocator_construction_args(const _Alloc&, │ │ │ │ -110 const _p_a_i_r<_Up, _Vp>&) noexcept; │ │ │ │ -111 │ │ │ │ -112 template<_Std_pair _Tp, typename _Alloc, typename _Up, typename _Vp> │ │ │ │ -113 constexpr auto │ │ │ │ -114 uses_allocator_construction_args(const _Alloc&, _p_a_i_r<_Up, _Vp>&&) noexcept; │ │ │ │ -115 │ │ │ │ -116 template<_Std_pair _Tp, typename _Alloc, typename _Tuple1, typename │ │ │ │ -_Tuple2> │ │ │ │ -117 constexpr auto │ │ │ │ -118 uses_allocator_construction_args(const _Alloc& __a, _p_i_e_c_e_w_i_s_e___c_o_n_s_t_r_u_c_t___t, │ │ │ │ -119 _Tuple1&& __x, _Tuple2&& __y) noexcept │ │ │ │ -120 { │ │ │ │ -121 using _Tp1 = typename _Tp::first_type; │ │ │ │ -122 using _Tp2 = typename _Tp::second_type; │ │ │ │ -123 │ │ │ │ -124 return std::make_tuple(_p_i_e_c_e_w_i_s_e___c_o_n_s_t_r_u_c_t, │ │ │ │ -125 std::apply([&__a](auto&&... __args1) { │ │ │ │ -126 return std::uses_allocator_construction_args<_Tp1>( │ │ │ │ -127 __a, _s_t_d_:_:_f_o_r_w_a_r_d(__args1)...); │ │ │ │ -128 }, _s_t_d_:_:_f_o_r_w_a_r_d_<___T_u_p_l_e_1_>(__x)), │ │ │ │ -129 std::apply([&__a](auto&&... __args2) { │ │ │ │ -130 return std::uses_allocator_construction_args<_Tp2>( │ │ │ │ -131 __a, _s_t_d_:_:_f_o_r_w_a_r_d(__args2)...); │ │ │ │ -132 }, _s_t_d_:_:_f_o_r_w_a_r_d_<___T_u_p_l_e_2_>(__y))); │ │ │ │ -133 } │ │ │ │ -134 │ │ │ │ -135 template<_Std_pair _Tp, typename _Alloc> │ │ │ │ -136 constexpr auto │ │ │ │ -137 uses_allocator_construction_args(const _Alloc& __a) noexcept │ │ │ │ -138 { │ │ │ │ -139 using _Tp1 = typename _Tp::first_type; │ │ │ │ -140 using _Tp2 = typename _Tp::second_type; │ │ │ │ -141 │ │ │ │ -142 return std::make_tuple(_p_i_e_c_e_w_i_s_e___c_o_n_s_t_r_u_c_t, │ │ │ │ -143 std::uses_allocator_construction_args<_Tp1>(__a), │ │ │ │ -144 std::uses_allocator_construction_args<_Tp2>(__a)); │ │ │ │ -145 } │ │ │ │ -146 │ │ │ │ -147 template<_Std_pair _Tp, typename _Alloc, typename _Up, typename _Vp> │ │ │ │ -148 constexpr auto │ │ │ │ -149 uses_allocator_construction_args(const _Alloc& __a, _Up&& __u, _Vp&& __v) │ │ │ │ -150 noexcept │ │ │ │ -151 { │ │ │ │ -152 using _Tp1 = typename _Tp::first_type; │ │ │ │ -153 using _Tp2 = typename _Tp::second_type; │ │ │ │ -154 │ │ │ │ -155 return std::make_tuple(_p_i_e_c_e_w_i_s_e___c_o_n_s_t_r_u_c_t, │ │ │ │ -156 std::uses_allocator_construction_args<_Tp1>(__a, │ │ │ │ -157 _s_t_d_:_:_f_o_r_w_a_r_d_<___U_p_>(__u)), │ │ │ │ -158 std::uses_allocator_construction_args<_Tp2>(__a, │ │ │ │ -159 _s_t_d_:_:_f_o_r_w_a_r_d_<___V_p_>(__v))); │ │ │ │ -160 } │ │ │ │ -161 │ │ │ │ -162 template<_Std_pair _Tp, typename _Alloc, typename _Up, typename _Vp> │ │ │ │ -163 constexpr auto │ │ │ │ -164 uses_allocator_construction_args(const _Alloc& __a, │ │ │ │ -165 const _p_a_i_r_<___U_p_,_ ___V_p_>& __pr) noexcept │ │ │ │ -166 { │ │ │ │ -167 using _Tp1 = typename _Tp::first_type; │ │ │ │ -168 using _Tp2 = typename _Tp::second_type; │ │ │ │ -169 │ │ │ │ -170 return std::make_tuple(_p_i_e_c_e_w_i_s_e___c_o_n_s_t_r_u_c_t, │ │ │ │ -171 std::uses_allocator_construction_args<_Tp1>(__a, __pr.first), │ │ │ │ -172 std::uses_allocator_construction_args<_Tp2>(__a, __pr.second)); │ │ │ │ -173 } │ │ │ │ -174 │ │ │ │ -175 template<_Std_pair _Tp, typename _Alloc, typename _Up, typename _Vp> │ │ │ │ -176 constexpr auto │ │ │ │ -177 uses_allocator_construction_args(const _Alloc& __a, │ │ │ │ -178 _p_a_i_r_<___U_p_,_ ___V_p_>&& __pr) noexcept │ │ │ │ -179 { │ │ │ │ -180 using _Tp1 = typename _Tp::first_type; │ │ │ │ -181 using _Tp2 = typename _Tp::second_type; │ │ │ │ -182 │ │ │ │ -183 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ -184 // 3527. uses_allocator_construction_args handles rvalue pairs │ │ │ │ -185 // of rvalue references incorrectly │ │ │ │ -186 return std::make_tuple(_p_i_e_c_e_w_i_s_e___c_o_n_s_t_r_u_c_t, │ │ │ │ -187 std::uses_allocator_construction_args<_Tp1>(__a, │ │ │ │ -188 std::get<0>(_s_t_d_:_:_m_o_v_e(__pr))), │ │ │ │ -189 std::uses_allocator_construction_args<_Tp2>(__a, │ │ │ │ -190 std::get<1>(_s_t_d_:_:_m_o_v_e(__pr)))); │ │ │ │ -191 } │ │ │ │ -192 │ │ │ │ -193 template │ │ │ │ -194 constexpr _Tp │ │ │ │ -195 make_obj_using_allocator(const _Alloc& __a, _Args&&... __args) │ │ │ │ -196 { │ │ │ │ -197 return std::make_from_tuple<_Tp>( │ │ │ │ -198 std::uses_allocator_construction_args<_Tp>(__a, │ │ │ │ -199 _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(__args)...)); │ │ │ │ -200 } │ │ │ │ -201 │ │ │ │ -202 template │ │ │ │ -203 constexpr _Tp* │ │ │ │ -204 uninitialized_construct_using_allocator(_Tp* __p, const _Alloc& __a, │ │ │ │ -205 _Args&&... __args) │ │ │ │ -206 { │ │ │ │ -207 return std::apply([&](auto&&... __xs) { │ │ │ │ -208 return std::construct_at(__p, _s_t_d_:_:_f_o_r_w_a_r_d(__xs)...); │ │ │ │ -209 }, std::uses_allocator_construction_args<_Tp>(__a, │ │ │ │ -210 _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(__args)...)); │ │ │ │ -211 } │ │ │ │ -212/// @} │ │ │ │ -213_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ -214} // namespace std │ │ │ │ -215#endif // C++20 │ │ │ │ -216#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_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 │ │ │ │ +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. │ │ │ │ +69 _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. │ │ │ │ +73 _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 _Expr<_Dom, _Tp>&) const; │ │ │ │ +102 template │ │ │ │ +103 void _o_p_e_r_a_t_o_r_*_=(const _Expr<_Dom, _Tp>&) const; │ │ │ │ +104 template │ │ │ │ +105 void _o_p_e_r_a_t_o_r_/_=(const _Expr<_Dom, _Tp>&) const; │ │ │ │ +106 template │ │ │ │ +107 void _o_p_e_r_a_t_o_r_%_=(const _Expr<_Dom, _Tp>&) const; │ │ │ │ +108 template │ │ │ │ +109 void _o_p_e_r_a_t_o_r_+_=(const _Expr<_Dom, _Tp>&) const; │ │ │ │ +110 template │ │ │ │ +111 void _o_p_e_r_a_t_o_r_-_=(const _Expr<_Dom, _Tp>&) const; │ │ │ │ +112 template │ │ │ │ +113 void _o_p_e_r_a_t_o_r_^_=(const _Expr<_Dom, _Tp>&) const; │ │ │ │ +114 template │ │ │ │ +115 void _o_p_e_r_a_t_o_r_&_=(const _Expr<_Dom, _Tp>&) const; │ │ │ │ +116 template │ │ │ │ +117 void _o_p_e_r_a_t_o_r_|_=(const _Expr<_Dom, _Tp>&) const; │ │ │ │ +118 template │ │ │ │ +119 void _o_p_e_r_a_t_o_r_<_<_=(const _Expr<_Dom, _Tp>&) const; │ │ │ │ +120 template │ │ │ │ +121 void _o_p_e_r_a_t_o_r_>_>_=(const _Expr<_Dom, _Tp>&) const; │ │ │ │ +122 │ │ │ │ +123 private: │ │ │ │ +124 _Array<_Tp> _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(_Array<_Tp>, 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 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(_Array<_Tp> __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 │ │ │ │ +_1_4_8 _g_s_l_i_c_e___a_r_r_a_y_<___T_p_>_:_:_g_s_l_i_c_e___a_r_r_a_y(const _g_s_l_i_c_e___a_r_r_a_y_<___T_p_>& __a) │ │ │ │ +149 : _M_array(__a._M_array), _M_index(__a._M_index) {} │ │ │ │ +150 │ │ │ │ +151 template │ │ │ │ +152 inline _g_s_l_i_c_e___a_r_r_a_y_<___T_p_>& │ │ │ │ +_1_5_3 _g_s_l_i_c_e___a_r_r_a_y_<___T_p_>_:_:_o_p_e_r_a_t_o_r_=(const _g_s_l_i_c_e___a_r_r_a_y_<___T_p_>& __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, _Array(_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(_Array<_Tp>(__v), __v._s_i_z_e(), │ │ │ │ +174 _M_array, _Array(_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 _Expr<_Dom, _Tp>& __e) const │ │ │ │ +181 { │ │ │ │ +182 std::__valarray_copy (__e, _M_index.size(), _M_array, │ │ │ │ +183 _Array(_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_:_:_v_a_l_a_r_r_a_y_:_:_s_i_z_e │ │ │ │ +size_t size() const │ │ │ │ +Return the number of elements in array. │ │ │ │ +DDeeffiinniittiioonn _v_a_l_a_r_r_a_y_:_9_3_7 │ │ │ │ +_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. │ │ │ │ +DDeeffiinniittiioonn _g_s_l_i_c_e___a_r_r_a_y_._h_:_1_4_8 │ │ │ │ +_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. │ │ │ │ +DDeeffiinniittiioonn _g_s_l_i_c_e___a_r_r_a_y_._h_:_1_5_3 │ │ │ │ _s_t_d │ │ │ │ ISO C++ entities toplevel namespace is std. │ │ │ │ -_s_t_d_:_:_t_u_p_l_e │ │ │ │ -Primary class template, tuple. │ │ │ │ -DDeeffiinniittiioonn _t_u_p_l_e_:_6_0_9 │ │ │ │ -_s_t_d_:_:_p_i_e_c_e_w_i_s_e___c_o_n_s_t_r_u_c_t___t │ │ │ │ -Tag type for piecewise construction of std::pair objects. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___p_a_i_r_._h_:_8_0 │ │ │ │ -_s_t_d_:_:_p_a_i_r │ │ │ │ -Struct holding two objects of arbitrary type. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___p_a_i_r_._h_:_2_1_3 │ │ │ │ +_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_%_= │ │ │ │ +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_:_:_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. │ │ │ │ * bbiittss │ │ │ │ - * _u_s_e_s___a_l_l_o_c_a_t_o_r___a_r_g_s_._h │ │ │ │ + * _g_s_l_i_c_e___a_r_r_a_y_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.15.0 │ │ ├── ./usr/share/doc/gcc-11-base/libstdc++/user/a00362_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: uses_allocator.h Source File │ │ │ +libstdc++: stream_iterator.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -48,20 +48,20 @@ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
uses_allocator.h
│ │ │ +
stream_iterator.h
│ │ │
│ │ │
│ │ │ -
1// Uses-allocator Construction -*- C++ -*-
│ │ │ +Go to the documentation of this file.
1// Stream iterators
│ │ │
2
│ │ │ -
3// Copyright (C) 2010-2021 Free Software Foundation, Inc.
│ │ │ +
3// Copyright (C) 2001-2021 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
│ │ │ @@ -74,203 +74,295 @@ │ │ │
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
│ │ │ -
31
│ │ │ -
32#include <type_traits>
│ │ │ -
33#include <bits/move.h>
│ │ │ +
24
│ │ │ +
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{iterator}
│ │ │ +
28 */
│ │ │ +
29
│ │ │ +
30#ifndef _STREAM_ITERATOR_H
│ │ │ +
31#define _STREAM_ITERATOR_H 1
│ │ │ +
32
│ │ │ +
33#pragma GCC system_header
│ │ │
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...>
│ │ │ - │ │ │ -
91 is_constructible<_Tp, allocator_arg_t, const _Alloc&, _Args...>::value,
│ │ │ -
92 __uses_alloc1<_Alloc>,
│ │ │ -
93 __uses_alloc2<_Alloc>>::type
│ │ │ -
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 };
│ │ │ +
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 /// Provides input iterator semantics for streams.
│ │ │ +
47 template<typename _Tp, typename _CharT = char,
│ │ │ +
48 typename _Traits = char_traits<_CharT>, typename _Dist = ptrdiff_t>
│ │ │ +
│ │ │ + │ │ │ +
50 : public iterator<input_iterator_tag, _Tp, _Dist, const _Tp*, const _Tp&>
│ │ │ +
51 {
│ │ │ +
52 public:
│ │ │ +
53 typedef _CharT char_type;
│ │ │ +
54 typedef _Traits traits_type;
│ │ │ +
55 typedef basic_istream<_CharT, _Traits> istream_type;
│ │ │ +
56
│ │ │ +
57 private:
│ │ │ +
58 istream_type* _M_stream;
│ │ │ +
59 _Tp _M_value;
│ │ │ +
60 // This bool becomes false at end-of-stream. It should be sufficient to
│ │ │ +
61 // check _M_stream != nullptr instead, but historically we did not set
│ │ │ +
62 // _M_stream to null when reaching the end, so we need to keep this flag.
│ │ │ +
63 bool _M_ok;
│ │ │ +
64
│ │ │ +
65 public:
│ │ │ +
66 /// Construct end of input stream iterator.
│ │ │ +
│ │ │ +
67 _GLIBCXX_CONSTEXPR istream_iterator()
│ │ │ +
68 : _M_stream(0), _M_value(), _M_ok(false) {}
│ │ │ +
│ │ │ +
69
│ │ │ +
70 /// Construct start of input stream iterator.
│ │ │ +
│ │ │ +
71 istream_iterator(istream_type& __s)
│ │ │ +
72 : _M_stream(std::__addressof(__s)), _M_ok(true)
│ │ │ +
73 { _M_read(); }
│ │ │ +
│ │ │ +
74
│ │ │ + │ │ │ +
76 : _M_stream(__obj._M_stream), _M_value(__obj._M_value),
│ │ │ +
77 _M_ok(__obj._M_ok)
│ │ │ +
78 { }
│ │ │ +
79
│ │ │ +
80#if __cplusplus > 201703L && __cpp_lib_concepts
│ │ │ +
81 constexpr
│ │ │ +
82 istream_iterator(default_sentinel_t)
│ │ │ +
83 noexcept(is_nothrow_default_constructible_v<_Tp>)
│ │ │ +
84 : istream_iterator() { }
│ │ │ +
85#endif
│ │ │ +
86
│ │ │ +
87#if __cplusplus >= 201103L
│ │ │ +
88 istream_iterator& operator=(const istream_iterator&) = default;
│ │ │ +
89 ~istream_iterator() = default;
│ │ │ +
90#endif
│ │ │ +
91
│ │ │ +
92 const _Tp&
│ │ │ +
93 operator*() const
│ │ │ +
94 {
│ │ │ +
95 __glibcxx_requires_cond(_M_ok,
│ │ │ +
96 _M_message(__gnu_debug::__msg_deref_istream)
│ │ │ +
97 ._M_iterator(*this));
│ │ │ +
98 return _M_value;
│ │ │ +
99 }
│ │ │ +
100
│ │ │ +
101 const _Tp*
│ │ │ +
102 operator->() const { return std::__addressof((operator*())); }
│ │ │
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 =
│ │ │ - │ │ │ -
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<uses_allocator<_Tp, _Alloc>::value,
│ │ │ -
136 __or_<_Predicate<_Tp, allocator_arg_t, _Alloc, _Args...>,
│ │ │ -
137 _Predicate<_Tp, _Args..., _Alloc>>,
│ │ │ -
138 _Predicate<_Tp, _Args...>>::type { };
│ │ │ -
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
│ │ │ -
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 {
│ │ │ -
187 std::__uses_allocator_construct_impl(
│ │ │ -
188 std::__use_alloc<_Tp, _Alloc, _Args...>(__a), __ptr,
│ │ │ -
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:86
│ │ │ -
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
│ │ │ + │ │ │ +
105 operator++()
│ │ │ +
106 {
│ │ │ +
107 __glibcxx_requires_cond(_M_ok,
│ │ │ +
108 _M_message(__gnu_debug::__msg_inc_istream)
│ │ │ +
109 ._M_iterator(*this));
│ │ │ +
110 _M_read();
│ │ │ +
111 return *this;
│ │ │ +
112 }
│ │ │ +
113
│ │ │ + │ │ │ +
115 operator++(int)
│ │ │ +
116 {
│ │ │ +
117 __glibcxx_requires_cond(_M_ok,
│ │ │ +
118 _M_message(__gnu_debug::__msg_inc_istream)
│ │ │ +
119 ._M_iterator(*this));
│ │ │ +
120 istream_iterator __tmp = *this;
│ │ │ +
121 _M_read();
│ │ │ +
122 return __tmp;
│ │ │ +
123 }
│ │ │ +
124
│ │ │ +
125 private:
│ │ │ +
126 bool
│ │ │ +
127 _M_equal(const istream_iterator& __x) const
│ │ │ +
128 {
│ │ │ +
129 // Ideally this would just return _M_stream == __x._M_stream,
│ │ │ +
130 // but code compiled with old versions never sets _M_stream to null.
│ │ │ +
131 return (_M_ok == __x._M_ok) && (!_M_ok || _M_stream == __x._M_stream);
│ │ │ +
132 }
│ │ │ +
133
│ │ │ +
134 void
│ │ │ +
135 _M_read()
│ │ │ +
136 {
│ │ │ +
137 if (_M_stream && !(*_M_stream >> _M_value))
│ │ │ +
138 {
│ │ │ +
139 _M_stream = 0;
│ │ │ +
140 _M_ok = false;
│ │ │ +
141 }
│ │ │ +
142 }
│ │ │ +
143
│ │ │ +
144 /// Return true if the iterators refer to the same stream,
│ │ │ +
145 /// or are both at end-of-stream.
│ │ │ +
146 friend bool
│ │ │ +
│ │ │ + │ │ │ +
148 { return __x._M_equal(__y); }
│ │ │ +
│ │ │ +
149
│ │ │ +
150 /// Return true if the iterators refer to different streams,
│ │ │ +
151 /// or if one is at end-of-stream and the other is not.
│ │ │ +
152 friend bool
│ │ │ +
│ │ │ + │ │ │ +
154 { return !__x._M_equal(__y); }
│ │ │ +
│ │ │ +
155
│ │ │ +
156#if __cplusplus > 201703L && __cpp_lib_concepts
│ │ │ +
157 friend bool
│ │ │ +
158 operator==(const istream_iterator& __i, default_sentinel_t)
│ │ │ +
159 { return !__i._M_stream; }
│ │ │ +
160#endif
│ │ │ +
161 };
│ │ │ +
│ │ │ +
162
│ │ │ +
163 /**
│ │ │ +
164 * @brief Provides output iterator semantics for streams.
│ │ │ +
165 *
│ │ │ +
166 * This class provides an iterator to write to an ostream. The type Tp is
│ │ │ +
167 * the only type written by this iterator and there must be an
│ │ │ +
168 * operator<<(Tp) defined.
│ │ │ +
169 *
│ │ │ +
170 * @tparam _Tp The type to write to the ostream.
│ │ │ +
171 * @tparam _CharT The ostream char_type.
│ │ │ +
172 * @tparam _Traits The ostream char_traits.
│ │ │ +
173 */
│ │ │ +
174 template<typename _Tp, typename _CharT = char,
│ │ │ +
175 typename _Traits = char_traits<_CharT> >
│ │ │ +
│ │ │ + │ │ │ +
177 : public iterator<output_iterator_tag, void, void, void, void>
│ │ │ +
178 {
│ │ │ +
179 public:
│ │ │ +
180 ///@{
│ │ │ +
181 /// Public typedef
│ │ │ +
182#if __cplusplus > 201703L
│ │ │ +
183 using difference_type = ptrdiff_t;
│ │ │ +
184#endif
│ │ │ +
185 typedef _CharT char_type;
│ │ │ +
186 typedef _Traits traits_type;
│ │ │ + │ │ │ +
188 ///@}
│ │ │ +
189
│ │ │ +
190 private:
│ │ │ +
191 ostream_type* _M_stream;
│ │ │ +
192 const _CharT* _M_string;
│ │ │ +
193
│ │ │ +
194 public:
│ │ │ +
195#if __cplusplus > 201703L
│ │ │ +
196 constexpr ostream_iterator() noexcept
│ │ │ +
197 : _M_stream(nullptr), _M_string(nullptr) { }
│ │ │ +
198#endif
│ │ │ +
199
│ │ │ +
200 /// Construct from an ostream.
│ │ │ +
│ │ │ + │ │ │ +
202 : _M_stream(std::__addressof(__s)), _M_string(0) {}
│ │ │ +
│ │ │ +
203
│ │ │ +
204 /**
│ │ │ +
205 * Construct from an ostream.
│ │ │ +
206 *
│ │ │ +
207 * The delimiter string @a c is written to the stream after every Tp
│ │ │ +
208 * written to the stream. The delimiter is not copied, and thus must
│ │ │ +
209 * not be destroyed while this iterator is in use.
│ │ │ +
210 *
│ │ │ +
211 * @param __s Underlying ostream to write to.
│ │ │ +
212 * @param __c CharT delimiter string to insert.
│ │ │ +
213 */
│ │ │ +
│ │ │ +
214 ostream_iterator(ostream_type& __s, const _CharT* __c)
│ │ │ +
215 : _M_stream(std::__addressof(__s)), _M_string(__c) { }
│ │ │ +
│ │ │ +
216
│ │ │ +
217 /// Copy constructor.
│ │ │ +
│ │ │ + │ │ │ +
219 : _M_stream(__obj._M_stream), _M_string(__obj._M_string) { }
│ │ │ +
│ │ │ +
220
│ │ │ +
221#if __cplusplus >= 201103L
│ │ │ +
222 ostream_iterator& operator=(const ostream_iterator&) = default;
│ │ │ +
223#endif
│ │ │ +
224
│ │ │ +
225 /// Writes @a value to underlying ostream using operator<<. If
│ │ │ +
226 /// constructed with delimiter string, writes delimiter to ostream.
│ │ │ + │ │ │ +
│ │ │ +
228 operator=(const _Tp& __value)
│ │ │ +
229 {
│ │ │ +
230 __glibcxx_requires_cond(_M_stream != 0,
│ │ │ +
231 _M_message(__gnu_debug::__msg_output_ostream)
│ │ │ +
232 ._M_iterator(*this));
│ │ │ +
233 *_M_stream << __value;
│ │ │ +
234 if (_M_string)
│ │ │ +
235 *_M_stream << _M_string;
│ │ │ +
236 return *this;
│ │ │ +
237 }
│ │ │ +
│ │ │ +
238
│ │ │ + │ │ │ +
240 operator*()
│ │ │ +
241 { return *this; }
│ │ │ +
242
│ │ │ + │ │ │ +
244 operator++()
│ │ │ +
245 { return *this; }
│ │ │ +
246
│ │ │ + │ │ │ +
248 operator++(int)
│ │ │ +
249 { return *this; }
│ │ │ +
250 };
│ │ │ +
│ │ │ +
251
│ │ │ +
252 /// @} group iterators
│ │ │ +
253
│ │ │ +
254_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ +
255} // namespace
│ │ │ +
256
│ │ │ +
257#endif
│ │ │ + │ │ │ +
constexpr complex< _Tp > operator*(const complex< _Tp > &__x, const complex< _Tp > &__y)
Return new complex value x times y.
Definition complex:392
│ │ │ +
constexpr _Tp * __addressof(_Tp &__r) noexcept
Same as C++11 std::addressof.
Definition move.h:49
│ │ │
ISO C++ entities toplevel namespace is std.
│ │ │ -
Define a member typedef type to one of two argument types.
Definition type_traits:2219
│ │ │ - │ │ │ -
Declare uses_allocator so it can be specialized in <queue> etc.
Definition memoryfwd.h:72
│ │ │ +
Template class basic_istream.
Definition istream:59
│ │ │ +
Template class basic_ostream.
Definition ostream:59
│ │ │ +
Basis for explicit traits specializations.
│ │ │ +
Common iterator class.
│ │ │ + │ │ │ +
Provides input iterator semantics for streams.
│ │ │ +
friend bool operator!=(const istream_iterator &__x, const istream_iterator &__y)
Return true if the iterators refer to different streams, or if one is at end-of-stream and the other ...
│ │ │ +
istream_iterator(istream_type &__s)
Construct start of input stream iterator.
│ │ │ +
constexpr istream_iterator()
Construct end of input stream iterator.
│ │ │ +
friend bool operator==(const istream_iterator &__x, const istream_iterator &__y)
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)
Construct from an ostream.
│ │ │ +
_Traits traits_type
Public typedef.
│ │ │ +
ostream_iterator(const ostream_iterator &__obj)
Copy constructor.
│ │ │ +
ostream_iterator & operator=(const _Tp &__value)
Writes value to underlying ostream using operator<<. If constructed with delimiter string,...
│ │ │ +
basic_ostream< _CharT, _Traits > ostream_type
Public typedef.
│ │ │ +
ostream_iterator(ostream_type &__s, const _CharT *__c)
│ │ │
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,12 +1,13 @@ │ │ │ │ libstdc++ │ │ │ │ -uses_allocator.h │ │ │ │ -1// Uses-allocator Construction -*- C++ -*- │ │ │ │ +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// Stream iterators │ │ │ │ 2 │ │ │ │ -3// Copyright (C) 2010-2021 Free Software Foundation, Inc. │ │ │ │ +3// Copyright (C) 2001-2021 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,211 +21,324 @@ │ │ │ │ 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 │ │ │ │ -31 │ │ │ │ -32#include <_t_y_p_e___t_r_a_i_t_s> │ │ │ │ -33#include <_b_i_t_s_/_m_o_v_e_._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{iterator} │ │ │ │ +28 */ │ │ │ │ +29 │ │ │ │ +30#ifndef _STREAM_ITERATOR_H │ │ │ │ +31#define _STREAM_ITERATOR_H 1 │ │ │ │ +32 │ │ │ │ +33#pragma GCC system_header │ │ │ │ 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_, _i_s___s_a_m_e_<___T_p_,_ _____e_r_a_s_e_d___t_y_p_e_>>; │ │ │ │ -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 _u_s_e_s___a_l_l_o_c_a_t_o_r │ │ │ │ -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 : _c_o_n_d_i_t_i_o_n_a_l< │ │ │ │ -91 is_constructible<_Tp, allocator_arg_t, const _Alloc&, _Args...>::value, │ │ │ │ -92 __uses_alloc1<_Alloc>, │ │ │ │ -93 __uses_alloc2<_Alloc>>::type │ │ │ │ +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 /// Provides input iterator semantics for streams. │ │ │ │ +47 template, typename _Dist = ptrdiff_t> │ │ │ │ +_4_9 class _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r │ │ │ │ +50 : public _i_t_e_r_a_t_o_r │ │ │ │ +51 { │ │ │ │ +52 public: │ │ │ │ +53 typedef _CharT char_type; │ │ │ │ +54 typedef _Traits traits_type; │ │ │ │ +55 typedef _b_a_s_i_c___i_s_t_r_e_a_m_<___C_h_a_r_T_,_ ___T_r_a_i_t_s_> istream_type; │ │ │ │ +56 │ │ │ │ +57 private: │ │ │ │ +58 istream_type* _M_stream; │ │ │ │ +59 _Tp _M_value; │ │ │ │ +60 // This bool becomes false at end-of-stream. It should be sufficient to │ │ │ │ +61 // check _M_stream != nullptr instead, but historically we did not set │ │ │ │ +62 // _M_stream to null when reaching the end, so we need to keep this flag. │ │ │ │ +63 bool _M_ok; │ │ │ │ +64 │ │ │ │ +65 public: │ │ │ │ +66 /// Construct end of input stream iterator. │ │ │ │ +_6_7 _GLIBCXX_CONSTEXPR _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r() │ │ │ │ +68 : _M_stream(0), _M_value(), _M_ok(false) {} │ │ │ │ +69 │ │ │ │ +70 /// Construct start of input stream iterator. │ │ │ │ +_7_1 _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r(istream_type& __s) │ │ │ │ +72 : _M_stream(_s_t_d::_____a_d_d_r_e_s_s_o_f(__s)), _M_ok(true) │ │ │ │ +73 { _M_read(); } │ │ │ │ +74 │ │ │ │ +75 _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& __obj) │ │ │ │ +76 : _M_stream(__obj._M_stream), _M_value(__obj._M_value), │ │ │ │ +77 _M_ok(__obj._M_ok) │ │ │ │ +78 { } │ │ │ │ +79 │ │ │ │ +80#if __cplusplus > 201703L && __cpp_lib_concepts │ │ │ │ +81 constexpr │ │ │ │ +82 _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r(default_sentinel_t) │ │ │ │ +83 noexcept(is_nothrow_default_constructible_v<_Tp>) │ │ │ │ +84 : _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r() { } │ │ │ │ +85#endif │ │ │ │ +86 │ │ │ │ +87#if __cplusplus >= 201103L │ │ │ │ +88 _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; │ │ │ │ +89 _~_i_s_t_r_e_a_m___i_t_e_r_a_t_o_r() = default; │ │ │ │ +90#endif │ │ │ │ +91 │ │ │ │ +92 const _Tp& │ │ │ │ +93 operator*() const │ │ │ │ 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 }; │ │ │ │ +95 __glibcxx_requires_cond(_M_ok, │ │ │ │ +96 _M_message(__gnu_debug::__msg_deref_istream) │ │ │ │ +97 ._M_iterator(*this)); │ │ │ │ +98 return _M_value; │ │ │ │ +99 } │ │ │ │ +100 │ │ │ │ +101 const _Tp* │ │ │ │ +102 operator->() const { return _s_t_d_:_:_____a_d_d_r_e_s_s_o_f((operator*())); } │ │ │ │ 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) │ │ │ │ +104 _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r& │ │ │ │ +105 operator++() │ │ │ │ +106 { │ │ │ │ +107 __glibcxx_requires_cond(_M_ok, │ │ │ │ +108 _M_message(__gnu_debug::__msg_inc_istream) │ │ │ │ +109 ._M_iterator(*this)); │ │ │ │ +110 _M_read(); │ │ │ │ +111 return *this; │ │ │ │ +112 } │ │ │ │ +113 │ │ │ │ +114 _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r │ │ │ │ +115 operator++(int) │ │ │ │ 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 _u_s_e_s___a_l_l_o_c_a_t_o_r_<___T_p_,_ ___A_l_l_o_c_>_:_:_v_a_l_u_e; │ │ │ │ -130#endif // C++17 │ │ │ │ -131 │ │ │ │ -132 template class _Predicate, │ │ │ │ -133 typename _Tp, typename _Alloc, typename... _Args> │ │ │ │ -134 struct __is_uses_allocator_predicate │ │ │ │ -135 : _c_o_n_d_i_t_i_o_n_a_l::value, │ │ │ │ -136 __or_<_Predicate<_Tp, allocator_arg_t, _Alloc, _Args...>, │ │ │ │ -137 _Predicate<_Tp, _Args..., _Alloc>>, │ │ │ │ -138 _Predicate<_Tp, _Args...>>::type { }; │ │ │ │ -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 │ │ │ │ -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 std::__uses_allocator_construct_impl( │ │ │ │ -188 std::__use_alloc<_Tp, _Alloc, _Args...>(__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_6 │ │ │ │ +117 __glibcxx_requires_cond(_M_ok, │ │ │ │ +118 _M_message(__gnu_debug::__msg_inc_istream) │ │ │ │ +119 ._M_iterator(*this)); │ │ │ │ +120 _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r __tmp = *this; │ │ │ │ +121 _M_read(); │ │ │ │ +122 return __tmp; │ │ │ │ +123 } │ │ │ │ +124 │ │ │ │ +125 private: │ │ │ │ +126 bool │ │ │ │ +127 _M_equal(const _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r& __x) const │ │ │ │ +128 { │ │ │ │ +129 // Ideally this would just return _M_stream == __x._M_stream, │ │ │ │ +130 // but code compiled with old versions never sets _M_stream to null. │ │ │ │ +131 return (_M_ok == __x._M_ok) && (!_M_ok || _M_stream == __x._M_stream); │ │ │ │ +132 } │ │ │ │ +133 │ │ │ │ +134 void │ │ │ │ +135 _M_read() │ │ │ │ +136 { │ │ │ │ +137 if (_M_stream && !(*_M_stream >> _M_value)) │ │ │ │ +138 { │ │ │ │ +139 _M_stream = 0; │ │ │ │ +140 _M_ok = false; │ │ │ │ +141 } │ │ │ │ +142 } │ │ │ │ +143 │ │ │ │ +144 /// Return true if the iterators refer to the same stream, │ │ │ │ +145 /// or are both at end-of-stream. │ │ │ │ +146 friend bool │ │ │ │ +_1_4_7 _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) │ │ │ │ +148 { return __x._M_equal(__y); } │ │ │ │ +149 │ │ │ │ +150 /// Return true if the iterators refer to different streams, │ │ │ │ +151 /// or if one is at end-of-stream and the other is not. │ │ │ │ +152 friend bool │ │ │ │ +_1_5_3 _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) │ │ │ │ +154 { return !__x._M_equal(__y); } │ │ │ │ +155 │ │ │ │ +156#if __cplusplus > 201703L && __cpp_lib_concepts │ │ │ │ +157 friend bool │ │ │ │ +158 _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) │ │ │ │ +159 { return !__i._M_stream; } │ │ │ │ +160#endif │ │ │ │ +161 }; │ │ │ │ +162 │ │ │ │ +163 /** │ │ │ │ +164 * @brief Provides output iterator semantics for streams. │ │ │ │ +165 * │ │ │ │ +166 * This class provides an iterator to write to an ostream. The type Tp is │ │ │ │ +167 * the only type written by this iterator and there must be an │ │ │ │ +168 * operator<<(Tp) defined. │ │ │ │ +169 * │ │ │ │ +170 * @tparam _Tp The type to write to the ostream. │ │ │ │ +171 * @tparam _CharT The ostream char_type. │ │ │ │ +172 * @tparam _Traits The ostream char_traits. │ │ │ │ +173 */ │ │ │ │ +174 template > │ │ │ │ +_1_7_6 class _o_s_t_r_e_a_m___i_t_e_r_a_t_o_r │ │ │ │ +177 : public _i_t_e_r_a_t_o_r │ │ │ │ +178 { │ │ │ │ +179 public: │ │ │ │ +180 ///@{ │ │ │ │ +181 /// Public typedef │ │ │ │ +182#if __cplusplus > 201703L │ │ │ │ +183 using _d_i_f_f_e_r_e_n_c_e___t_y_p_e = ptrdiff_t; │ │ │ │ +184#endif │ │ │ │ +_1_8_5 typedef _CharT _c_h_a_r___t_y_p_e; │ │ │ │ +_1_8_6 typedef _Traits _t_r_a_i_t_s___t_y_p_e; │ │ │ │ +_1_8_7 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; │ │ │ │ +188 ///@} │ │ │ │ +189 │ │ │ │ +190 private: │ │ │ │ +191 _o_s_t_r_e_a_m___t_y_p_e* _M_stream; │ │ │ │ +192 const _CharT* _M_string; │ │ │ │ +193 │ │ │ │ +194 public: │ │ │ │ +195#if __cplusplus > 201703L │ │ │ │ +196 constexpr _o_s_t_r_e_a_m___i_t_e_r_a_t_o_r() noexcept │ │ │ │ +197 : _M_stream(nullptr), _M_string(nullptr) { } │ │ │ │ +198#endif │ │ │ │ +199 │ │ │ │ +200 /// Construct from an ostream. │ │ │ │ +_2_0_1 _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) │ │ │ │ +202 : _M_stream(_s_t_d::_____a_d_d_r_e_s_s_o_f(__s)), _M_string(0) {} │ │ │ │ +203 │ │ │ │ +204 /** │ │ │ │ +205 * Construct from an ostream. │ │ │ │ +206 * │ │ │ │ +207 * The delimiter string @a c is written to the stream after every Tp │ │ │ │ +208 * written to the stream. The delimiter is not copied, and thus must │ │ │ │ +209 * not be destroyed while this iterator is in use. │ │ │ │ +210 * │ │ │ │ +211 * @param __s Underlying ostream to write to. │ │ │ │ +212 * @param __c CharT delimiter string to insert. │ │ │ │ +213 */ │ │ │ │ +_2_1_4 _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) │ │ │ │ +215 : _M_stream(_s_t_d::_____a_d_d_r_e_s_s_o_f(__s)), _M_string(__c) { } │ │ │ │ +216 │ │ │ │ +217 /// Copy constructor. │ │ │ │ +_2_1_8 _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& __obj) │ │ │ │ +219 : _M_stream(__obj._M_stream), _M_string(__obj._M_string) { } │ │ │ │ +220 │ │ │ │ +221#if __cplusplus >= 201103L │ │ │ │ +222 _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; │ │ │ │ +223#endif │ │ │ │ +224 │ │ │ │ +225 /// Writes @a value to underlying ostream using operator<<. If │ │ │ │ +226 /// constructed with delimiter string, writes delimiter to ostream. │ │ │ │ +227 _o_s_t_r_e_a_m___i_t_e_r_a_t_o_r& │ │ │ │ +_2_2_8 _o_p_e_r_a_t_o_r_=(const _Tp& __value) │ │ │ │ +229 { │ │ │ │ +230 __glibcxx_requires_cond(_M_stream != 0, │ │ │ │ +231 _M_message(__gnu_debug::__msg_output_ostream) │ │ │ │ +232 ._M_iterator(*this)); │ │ │ │ +233 *_M_stream << __value; │ │ │ │ +234 if (_M_string) │ │ │ │ +235 *_M_stream << _M_string; │ │ │ │ +236 return *this; │ │ │ │ +237 } │ │ │ │ +238 │ │ │ │ +239 _o_s_t_r_e_a_m___i_t_e_r_a_t_o_r& │ │ │ │ +240 _o_p_e_r_a_t_o_r_*() │ │ │ │ +241 { return *this; } │ │ │ │ +242 │ │ │ │ +243 _o_s_t_r_e_a_m___i_t_e_r_a_t_o_r& │ │ │ │ +244 operator++() │ │ │ │ +245 { return *this; } │ │ │ │ +246 │ │ │ │ +247 _o_s_t_r_e_a_m___i_t_e_r_a_t_o_r& │ │ │ │ +248 operator++(int) │ │ │ │ +249 { return *this; } │ │ │ │ +250 }; │ │ │ │ +251 │ │ │ │ +252 /// @} group iterators │ │ │ │ +253 │ │ │ │ +254_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ +255} // namespace │ │ │ │ +256 │ │ │ │ +257#endif │ │ │ │ +_d_e_b_u_g_._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_:_:_____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 │ │ │ │ ISO C++ entities toplevel namespace is std. │ │ │ │ -_s_t_d_:_:_c_o_n_d_i_t_i_o_n_a_l │ │ │ │ -Define a member typedef type to one of two argument types. │ │ │ │ -DDeeffiinniittiioonn _t_y_p_e___t_r_a_i_t_s_:_2_2_1_9 │ │ │ │ -_s_t_d_:_:_i_s___s_a_m_e │ │ │ │ -is_same │ │ │ │ -DDeeffiinniittiioonn _t_y_p_e___t_r_a_i_t_s_:_1_4_0_9 │ │ │ │ -_s_t_d_:_:_u_s_e_s___a_l_l_o_c_a_t_o_r │ │ │ │ -Declare uses_allocator so it can be specialized in etc. │ │ │ │ -DDeeffiinniittiioonn _m_e_m_o_r_y_f_w_d_._h_:_7_2 │ │ │ │ +_s_t_d_:_:_b_a_s_i_c___i_s_t_r_e_a_m │ │ │ │ +Template class basic_istream. │ │ │ │ +DDeeffiinniittiioonn _i_s_t_r_e_a_m_:_5_9 │ │ │ │ +_s_t_d_:_:_b_a_s_i_c___o_s_t_r_e_a_m │ │ │ │ +Template class basic_ostream. │ │ │ │ +DDeeffiinniittiioonn _o_s_t_r_e_a_m_:_5_9 │ │ │ │ +_s_t_d_:_:_c_h_a_r___t_r_a_i_t_s │ │ │ │ +Basis for explicit traits specializations. │ │ │ │ +DDeeffiinniittiioonn _c_h_a_r___t_r_a_i_t_s_._h_:_3_3_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_:_:_i_t_e_r_a_t_o_r_<_ _o_u_t_p_u_t___i_t_e_r_a_t_o_r___t_a_g_,_ _v_o_i_d_,_ _v_o_i_d_,_ _v_o_i_d_,_ _v_o_i_d_ _>_:_:_d_i_f_f_e_r_e_n_c_e___t_y_p_e │ │ │ │ +void difference_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_4 │ │ │ │ +_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_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) │ │ │ │ +Return true if the iterators refer to different streams, or if one is at end- │ │ │ │ +of-stream and the other ... │ │ │ │ +DDeeffiinniittiioonn _s_t_r_e_a_m___i_t_e_r_a_t_o_r_._h_:_1_5_3 │ │ │ │ +_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_1 │ │ │ │ +_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() │ │ │ │ +Construct end of input stream iterator. │ │ │ │ +DDeeffiinniittiioonn _s_t_r_e_a_m___i_t_e_r_a_t_o_r_._h_:_6_7 │ │ │ │ +_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) │ │ │ │ +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_4_7 │ │ │ │ +_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_7_8 │ │ │ │ +_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_:_1_8_5 │ │ │ │ +_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) │ │ │ │ +Construct from an ostream. │ │ │ │ +DDeeffiinniittiioonn _s_t_r_e_a_m___i_t_e_r_a_t_o_r_._h_:_2_0_1 │ │ │ │ +_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_:_1_8_6 │ │ │ │ +_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) │ │ │ │ +Copy constructor. │ │ │ │ +DDeeffiinniittiioonn _s_t_r_e_a_m___i_t_e_r_a_t_o_r_._h_:_2_1_8 │ │ │ │ +_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_2_8 │ │ │ │ +_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_:_1_8_7 │ │ │ │ +_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) │ │ │ │ +DDeeffiinniittiioonn _s_t_r_e_a_m___i_t_e_r_a_t_o_r_._h_:_2_1_4 │ │ │ │ * bbiittss │ │ │ │ - * uusseess__aallllooccaattoorr..hh │ │ │ │ + * _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.15.0 │ │ ├── ./usr/share/doc/gcc-11-base/libstdc++/user/a00365.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: unordered_set.h File Reference │ │ │ +libstdc++: std_mutex.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -48,71 +48,54 @@ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
unordered_set.h File Reference
│ │ │ +
std_mutex.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │

Go to the source code of this file.

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

│ │ │ Classes

class  std::unordered_multiset< _Value, _Hash, _Pred, _Alloc >
class  std::unordered_set< _Value, _Hash, _Pred, _Alloc >
struct  std::adopt_lock_t
struct  std::defer_lock_t
class  std::lock_guard< _Mutex >
class  std::mutex
struct  std::try_to_lock_t
│ │ │ │ │ │ │ │ │

│ │ │ 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
template<bool _Cache>
using std::__umset_traits
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
template<bool _Cache>
using std::__uset_traits
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ -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>
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)))

│ │ │ +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_set>.

│ │ │ +

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_set.h.

│ │ │ +

Definition in file std_mutex.h.

│ │ │
│ │ │
│ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,49 +1,22 @@ │ │ │ │ libstdc++ │ │ │ │ -unordered_set.h File Reference │ │ │ │ +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_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_:_:_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_ _> │ │ │ │ +struct   _s_t_d_:_:_a_d_o_p_t___l_o_c_k___t │ │ │ │ +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 │ │ │ │ -TTyyppeeddeeffss │ │ │ │ -template, typename _Pred = │ │ │ │ -std::equal_to<_Value>, typename _Alloc = std::allocator<_Value>, typename _Tr │ │ │ │ -= __umset_traits<__cache_default<_Value, _Hash>::value>> │ │ │ │ -using  _s_t_d_:_:_____u_m_s_e_t___h_a_s_h_t_a_b_l_e │ │ │ │ -template │ │ │ │ -using  _s_t_d_:_:_____u_m_s_e_t___t_r_a_i_t_s │ │ │ │ -template, typename _Pred = │ │ │ │ -std::equal_to<_Value>, typename _Alloc = std::allocator<_Value>, typename _Tr │ │ │ │ -= __uset_traits<__cache_default<_Value, _Hash>::value>> │ │ │ │ -using  _s_t_d_:_:_____u_s_e_t___h_a_s_h_t_a_b_l_e │ │ │ │ -template │ │ │ │ -using  _s_t_d_:_:_____u_s_e_t___t_r_a_i_t_s │ │ │ │ -FFuunnccttiioonnss │ │ │ │ -template │ │ │ │ -bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_!_= (const unordered_multiset< _Value, _Hash, _Pred, _Alloc > │ │ │ │ - &__x, const unordered_multiset< _Value, _Hash, _Pred, _Alloc > &__y) │ │ │ │ -template │ │ │ │ -bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_!_= (const unordered_set< _Value, _Hash, _Pred, _Alloc > │ │ │ │ - &__x, const unordered_set< _Value, _Hash, _Pred, _Alloc > &__y) │ │ │ │ -template │ │ │ │ -bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_=_= (const unordered_multiset< _Value, _Hash, _Pred, _Alloc > │ │ │ │ - &__x, const unordered_multiset< _Value, _Hash, _Pred, _Alloc > &__y) │ │ │ │ -template │ │ │ │ -bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_=_= (const unordered_set< _Value, _Hash, _Pred, _Alloc > │ │ │ │ - &__x, const unordered_set< _Value, _Hash, _Pred, _Alloc > &__y) │ │ │ │ -template │ │ │ │ -void  _s_t_d_:_:_s_w_a_p (unordered_multiset< _Value, _Hash, _Pred, _Alloc > &__x, │ │ │ │ - unordered_multiset< _Value, _Hash, _Pred, _Alloc > &__y) noexcept │ │ │ │ - (noexcept(__x.swap(__y))) │ │ │ │ -template │ │ │ │ -void  _s_t_d_:_:_s_w_a_p (unordered_set< _Value, _Hash, _Pred, _Alloc > &__x, │ │ │ │ - unordered_set< _Value, _Hash, _Pred, _Alloc > &__y) noexcept(noexcept │ │ │ │ - (__x.swap(__y))) │ │ │ │ +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 │ │ │ │ +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___s_e_t_._h. │ │ │ │ +attempt to use it directly. Instead, include . │ │ │ │ +Definition in file _s_t_d___m_u_t_e_x_._h. │ │ │ │ * bbiittss │ │ │ │ - * _u_n_o_r_d_e_r_e_d___s_e_t_._h │ │ │ │ + * _s_t_d___m_u_t_e_x_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.15.0 │ │ ├── ./usr/share/doc/gcc-11-base/libstdc++/user/a00365.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,4 +1,5 @@ │ │ │ │ var a00365 = [ │ │ │ │ - ["std::__umset_traits", "a01631.html#a65dc9ea843498fde1476b968ca1160e5", null], │ │ │ │ - ["std::__uset_traits", "a01631.html#a92c803e6ba8e01cf538e551a7d3e0778", null] │ │ │ │ + ["std::adopt_lock", "a01582.html#gad21e19f3b9b1166718c228219723e130", null], │ │ │ │ + ["std::defer_lock", "a01582.html#gaef1e52b34e2d2d6e3850bbd28ff7546a", null], │ │ │ │ + ["std::try_to_lock", "a01582.html#ga845da3c3459b8dc4c6f690039b797dfc", null] │ │ │ │ ]; │ │ ├── ./usr/share/doc/gcc-11-base/libstdc++/user/a00365_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: unordered_set.h Source File │ │ │ +libstdc++: std_mutex.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -48,20 +48,20 @@ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
unordered_set.h
│ │ │ +
std_mutex.h
│ │ │
│ │ │
│ │ │ -Go to the documentation of this file.
1// unordered_set implementation -*- C++ -*-
│ │ │ +Go to the documentation of this file.
1// std::mutex implementation -*- C++ -*-
│ │ │
2
│ │ │ -
3// Copyright (C) 2010-2021 Free Software Foundation, Inc.
│ │ │ +
3// Copyright (C) 2003-2021 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
│ │ │ @@ -75,2257 +75,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// <http://www.gnu.org/licenses/>.
│ │ │
24
│ │ │ -
25/** @file bits/unordered_set.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_set}
│ │ │ +
27 * Do not attempt to use it directly. @headername{mutex}
│ │ │
28 */
│ │ │
29
│ │ │ -
30#ifndef _UNORDERED_SET_H
│ │ │ -
31#define _UNORDERED_SET_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_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>,
│ │ │ -
44 typename _Pred = std::equal_to<_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>,
│ │ │ -
59 typename _Pred = std::equal_to<_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#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 // Common base class for std::mutex and std::timed_mutex
│ │ │ +
57 class __mutex_base
│ │ │ +
58 {
│ │ │ +
59 protected:
│ │ │ +
60 typedef __gthread_mutex_t __native_type;
│ │ │ +
61
│ │ │ +
62#ifdef __GTHREAD_MUTEX_INIT
│ │ │ +
63 __native_type _M_mutex = __GTHREAD_MUTEX_INIT;
│ │ │ +
64
│ │ │ +
65 constexpr __mutex_base() noexcept = default;
│ │ │ +
66#else
│ │ │ +
67 __native_type _M_mutex;
│ │ │
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 *
│ │ │ -
79 * @tparam _Value Type of key objects.
│ │ │ -
80 * @tparam _Hash Hashing function object type, defaults to hash<_Value>.
│ │ │ +
69 __mutex_base() noexcept
│ │ │ +
70 {
│ │ │ +
71 // XXX EAGAIN, ENOMEM, EPERM, EBUSY(may), EINVAL(may)
│ │ │ +
72 __GTHREAD_MUTEX_INIT_FUNCTION(&_M_mutex);
│ │ │ +
73 }
│ │ │ +
74
│ │ │ +
75 ~__mutex_base() noexcept { __gthread_mutex_destroy(&_M_mutex); }
│ │ │ +
76#endif
│ │ │ +
77
│ │ │ +
78 __mutex_base(const __mutex_base&) = delete;
│ │ │ +
79 __mutex_base& operator=(const __mutex_base&) = delete;
│ │ │ +
80 };
│ │ │
81
│ │ │ -
82 * @tparam _Pred Predicate function object type, defaults to
│ │ │ -
83 * equal_to<_Value>.
│ │ │ -
84 *
│ │ │ -
85 * @tparam _Alloc Allocator type, defaults to allocator<_Key>.
│ │ │ -
86 *
│ │ │ -
87 * Meets the requirements of a <a href="tables.html#65">container</a>, and
│ │ │ -
88 * <a href="tables.html#xx">unordered associative container</a>
│ │ │ -
89 *
│ │ │ -
90 * Base is _Hashtable, dispatched at compile time via template
│ │ │ -
91 * alias __uset_hashtable.
│ │ │ -
92 */
│ │ │ -
93 template<typename _Value,
│ │ │ -
94 typename _Hash = hash<_Value>,
│ │ │ -
95 typename _Pred = equal_to<_Value>,
│ │ │ -
96 typename _Alloc = allocator<_Value>>
│ │ │ -
│ │ │ - │ │ │ -
98 {
│ │ │ -
99 typedef __uset_hashtable<_Value, _Hash, _Pred, _Alloc> _Hashtable;
│ │ │ -
100 _Hashtable _M_h;
│ │ │ +
82 /// The standard mutex type.
│ │ │ +
│ │ │ +
83 class mutex : private __mutex_base
│ │ │ +
84 {
│ │ │ +
85 public:
│ │ │ +
86 typedef __native_type* native_handle_type;
│ │ │ +
87
│ │ │ +
88#ifdef __GTHREAD_MUTEX_INIT
│ │ │ +
89 constexpr
│ │ │ +
90#endif
│ │ │ +
91 mutex() noexcept = default;
│ │ │ +
92 ~mutex() = default;
│ │ │ +
93
│ │ │ +
94 mutex(const mutex&) = delete;
│ │ │ +
95 mutex& operator=(const mutex&) = delete;
│ │ │ +
96
│ │ │ +
97 void
│ │ │ +
98 lock()
│ │ │ +
99 {
│ │ │ +
100 int __e = __gthread_mutex_lock(&_M_mutex);
│ │ │
101
│ │ │ -
102 public:
│ │ │ -
103 // typedefs:
│ │ │ -
104 ///@{
│ │ │ -
105 /// Public typedefs.
│ │ │ -
106 typedef typename _Hashtable::key_type key_type;
│ │ │ -
107 typedef typename _Hashtable::value_type value_type;
│ │ │ -
108 typedef typename _Hashtable::hasher hasher;
│ │ │ -
109 typedef typename _Hashtable::key_equal key_equal;
│ │ │ -
110 typedef typename _Hashtable::allocator_type allocator_type;
│ │ │ -
111 ///@}
│ │ │ -
112
│ │ │ -
113 ///@{
│ │ │ -
114 /// Iterator-related typedefs.
│ │ │ -
115 typedef typename _Hashtable::pointer pointer;
│ │ │ -
116 typedef typename _Hashtable::const_pointer const_pointer;
│ │ │ -
117 typedef typename _Hashtable::reference reference;
│ │ │ -
118 typedef typename _Hashtable::const_reference const_reference;
│ │ │ -
119 typedef typename _Hashtable::iterator iterator;
│ │ │ -
120 typedef typename _Hashtable::const_iterator const_iterator;
│ │ │ -
121 typedef typename _Hashtable::local_iterator local_iterator;
│ │ │ -
122 typedef typename _Hashtable::const_local_iterator const_local_iterator;
│ │ │ -
123 typedef typename _Hashtable::size_type size_type;
│ │ │ -
124 typedef typename _Hashtable::difference_type difference_type;
│ │ │ -
125 ///@}
│ │ │ -
126
│ │ │ -
127#if __cplusplus > 201402L
│ │ │ -
128 using node_type = typename _Hashtable::node_type;
│ │ │ -
129 using insert_return_type = typename _Hashtable::insert_return_type;
│ │ │ -
130#endif
│ │ │ -
131
│ │ │ -
132 // construct/destroy/copy
│ │ │ -
133
│ │ │ -
134 /// Default constructor.
│ │ │ -
135 unordered_set() = default;
│ │ │ -
136
│ │ │ -
137 /**
│ │ │ -
138 * @brief Default constructor creates no elements.
│ │ │ -
139 * @param __n Minimal initial number of buckets.
│ │ │ -
140 * @param __hf A hash functor.
│ │ │ -
141 * @param __eql A key equality functor.
│ │ │ -
142 * @param __a An allocator object.
│ │ │ -
143 */
│ │ │ -
144 explicit
│ │ │ -
│ │ │ - │ │ │ -
146 const hasher& __hf = hasher(),
│ │ │ -
147 const key_equal& __eql = key_equal(),
│ │ │ -
148 const allocator_type& __a = allocator_type())
│ │ │ -
149 : _M_h(__n, __hf, __eql, __a)
│ │ │ -
150 { }
│ │ │ -
│ │ │ -
151
│ │ │ -
152 /**
│ │ │ -
153 * @brief Builds an %unordered_set from a range.
│ │ │ -
154 * @param __first An input iterator.
│ │ │ -
155 * @param __last An input iterator.
│ │ │ -
156 * @param __n Minimal initial number of buckets.
│ │ │ -
157 * @param __hf A hash functor.
│ │ │ -
158 * @param __eql A key equality functor.
│ │ │ -
159 * @param __a An allocator object.
│ │ │ -
160 *
│ │ │ -
161 * Create an %unordered_set consisting of copies of the elements from
│ │ │ -
162 * [__first,__last). This is linear in N (where N is
│ │ │ -
163 * distance(__first,__last)).
│ │ │ -
164 */
│ │ │ -
165 template<typename _InputIterator>
│ │ │ -
│ │ │ -
166 unordered_set(_InputIterator __first, _InputIterator __last,
│ │ │ -
167 size_type __n = 0,
│ │ │ -
168 const hasher& __hf = hasher(),
│ │ │ -
169 const key_equal& __eql = key_equal(),
│ │ │ -
170 const allocator_type& __a = allocator_type())
│ │ │ -
171 : _M_h(__first, __last, __n, __hf, __eql, __a)
│ │ │ -
172 { }
│ │ │ -
│ │ │ -
173
│ │ │ -
174 /// Copy constructor.
│ │ │ -
175 unordered_set(const unordered_set&) = default;
│ │ │ -
176
│ │ │ -
177 /// Move constructor.
│ │ │ - │ │ │ -
179
│ │ │ -
180 /**
│ │ │ -
181 * @brief Creates an %unordered_set with no elements.
│ │ │ -
182 * @param __a An allocator object.
│ │ │ -
183 */
│ │ │ -
184 explicit
│ │ │ -
│ │ │ - │ │ │ -
186 : _M_h(__a)
│ │ │ -
187 { }
│ │ │ -
│ │ │ -
188
│ │ │ -
189 /*
│ │ │ -
190 * @brief Copy constructor with allocator argument.
│ │ │ -
191 * @param __uset Input %unordered_set to copy.
│ │ │ -
192 * @param __a An allocator object.
│ │ │ -
193 */
│ │ │ -
194 unordered_set(const unordered_set& __uset,
│ │ │ -
195 const allocator_type& __a)
│ │ │ -
196 : _M_h(__uset._M_h, __a)
│ │ │ -
197 { }
│ │ │ -
198
│ │ │ -
199 /*
│ │ │ -
200 * @brief Move constructor with allocator argument.
│ │ │ -
201 * @param __uset Input %unordered_set to move.
│ │ │ -
202 * @param __a An allocator object.
│ │ │ -
203 */
│ │ │ -
204 unordered_set(unordered_set&& __uset,
│ │ │ -
205 const allocator_type& __a)
│ │ │ -
206 noexcept( noexcept(_Hashtable(std::move(__uset._M_h), __a)) )
│ │ │ -
207 : _M_h(std::move(__uset._M_h), __a)
│ │ │ -
208 { }
│ │ │ -
209
│ │ │ -
210 /**
│ │ │ -
211 * @brief Builds an %unordered_set from an initializer_list.
│ │ │ -
212 * @param __l An initializer_list.
│ │ │ -
213 * @param __n Minimal initial number of buckets.
│ │ │ -
214 * @param __hf A hash functor.
│ │ │ -
215 * @param __eql A key equality functor.
│ │ │ -
216 * @param __a An allocator object.
│ │ │ -
217 *
│ │ │ -
218 * Create an %unordered_set consisting of copies of the elements in the
│ │ │ -
219 * list. This is linear in N (where N is @a __l.size()).
│ │ │ -
220 */
│ │ │ -
│ │ │ - │ │ │ -
222 size_type __n = 0,
│ │ │ -
223 const hasher& __hf = hasher(),
│ │ │ -
224 const key_equal& __eql = key_equal(),
│ │ │ -
225 const allocator_type& __a = allocator_type())
│ │ │ -
226 : _M_h(__l, __n, __hf, __eql, __a)
│ │ │ -
227 { }
│ │ │ -
│ │ │ -
228
│ │ │ -
229 unordered_set(size_type __n, const allocator_type& __a)
│ │ │ -
230 : unordered_set(__n, hasher(), key_equal(), __a)
│ │ │ -
231 { }
│ │ │ -
232
│ │ │ -
233 unordered_set(size_type __n, const hasher& __hf,
│ │ │ -
234 const allocator_type& __a)
│ │ │ -
235 : unordered_set(__n, __hf, key_equal(), __a)
│ │ │ -
236 { }
│ │ │ -
237
│ │ │ -
238 template<typename _InputIterator>
│ │ │ -
239 unordered_set(_InputIterator __first, _InputIterator __last,
│ │ │ -
240 size_type __n,
│ │ │ -
241 const allocator_type& __a)
│ │ │ -
242 : unordered_set(__first, __last, __n, hasher(), key_equal(), __a)
│ │ │ -
243 { }
│ │ │ -
244
│ │ │ -
245 template<typename _InputIterator>
│ │ │ -
246 unordered_set(_InputIterator __first, _InputIterator __last,
│ │ │ -
247 size_type __n, const hasher& __hf,
│ │ │ -
248 const allocator_type& __a)
│ │ │ -
249 : unordered_set(__first, __last, __n, __hf, key_equal(), __a)
│ │ │ -
250 { }
│ │ │ -
251
│ │ │ -
252 unordered_set(initializer_list<value_type> __l,
│ │ │ -
253 size_type __n,
│ │ │ -
254 const allocator_type& __a)
│ │ │ -
255 : unordered_set(__l, __n, hasher(), key_equal(), __a)
│ │ │ -
256 { }
│ │ │ -
257
│ │ │ -
258 unordered_set(initializer_list<value_type> __l,
│ │ │ -
259 size_type __n, const hasher& __hf,
│ │ │ -
260 const allocator_type& __a)
│ │ │ -
261 : unordered_set(__l, __n, __hf, key_equal(), __a)
│ │ │ -
262 { }
│ │ │ -
263
│ │ │ -
264 /// Copy assignment operator.
│ │ │ - │ │ │ -
266 operator=(const unordered_set&) = default;
│ │ │ -
267
│ │ │ -
268 /// Move assignment operator.
│ │ │ - │ │ │ - │ │ │ -
271
│ │ │ -
272 /**
│ │ │ -
273 * @brief %Unordered_set list assignment operator.
│ │ │ -
274 * @param __l An initializer_list.
│ │ │ -
275 *
│ │ │ -
276 * This function fills an %unordered_set with copies of the elements in
│ │ │ -
277 * the initializer list @a __l.
│ │ │ -
278 *
│ │ │ -
279 * Note that the assignment completely changes the %unordered_set and
│ │ │ -
280 * that the resulting %unordered_set's size is the same as the number
│ │ │ -
281 * of elements assigned.
│ │ │ -
282 */
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
285 {
│ │ │ -
286 _M_h = __l;
│ │ │ -
287 return *this;
│ │ │ -
288 }
│ │ │ -
│ │ │ -
289
│ │ │ -
290 /// Returns the allocator object used by the %unordered_set.
│ │ │ - │ │ │ -
│ │ │ -
292 get_allocator() const noexcept
│ │ │ -
293 { return _M_h.get_allocator(); }
│ │ │ -
│ │ │ -
294
│ │ │ -
295 // size and capacity:
│ │ │ -
296
│ │ │ -
297 /// Returns true if the %unordered_set is empty.
│ │ │ -
298 _GLIBCXX_NODISCARD bool
│ │ │ -
│ │ │ -
299 empty() const noexcept
│ │ │ -
300 { return _M_h.empty(); }
│ │ │ -
│ │ │ -
301
│ │ │ -
302 /// Returns the size of the %unordered_set.
│ │ │ - │ │ │ -
│ │ │ -
304 size() const noexcept
│ │ │ -
305 { return _M_h.size(); }
│ │ │ -
│ │ │ -
306
│ │ │ -
307 /// Returns the maximum size of the %unordered_set.
│ │ │ - │ │ │ -
│ │ │ -
309 max_size() const noexcept
│ │ │ -
310 { return _M_h.max_size(); }
│ │ │ -
│ │ │ -
311
│ │ │ -
312 // iterators.
│ │ │ -
313
│ │ │ -
314 ///@{
│ │ │ -
315 /**
│ │ │ -
316 * Returns a read-only (constant) iterator that points to the first
│ │ │ -
317 * element in the %unordered_set.
│ │ │ -
318 */
│ │ │ - │ │ │ -
│ │ │ -
320 begin() noexcept
│ │ │ -
321 { return _M_h.begin(); }
│ │ │ -
│ │ │ -
322
│ │ │ -
323 const_iterator
│ │ │ -
│ │ │ -
324 begin() const noexcept
│ │ │ -
325 { return _M_h.begin(); }
│ │ │ -
│ │ │ -
326 ///@}
│ │ │ -
327
│ │ │ -
328 ///@{
│ │ │ -
329 /**
│ │ │ -
330 * Returns a read-only (constant) iterator that points one past the last
│ │ │ -
331 * element in the %unordered_set.
│ │ │ -
332 */
│ │ │ - │ │ │ -
│ │ │ -
334 end() noexcept
│ │ │ -
335 { return _M_h.end(); }
│ │ │ -
│ │ │ -
336
│ │ │ -
337 const_iterator
│ │ │ -
│ │ │ -
338 end() const noexcept
│ │ │ -
339 { return _M_h.end(); }
│ │ │ -
│ │ │ -
340 ///@}
│ │ │ -
341
│ │ │ -
342 /**
│ │ │ -
343 * Returns a read-only (constant) iterator that points to the first
│ │ │ -
344 * element in the %unordered_set.
│ │ │ -
345 */
│ │ │ -
346 const_iterator
│ │ │ -
│ │ │ -
347 cbegin() const noexcept
│ │ │ -
348 { return _M_h.begin(); }
│ │ │ -
│ │ │ -
349
│ │ │ -
350 /**
│ │ │ -
351 * Returns a read-only (constant) iterator that points one past the last
│ │ │ -
352 * element in the %unordered_set.
│ │ │ -
353 */
│ │ │ -
354 const_iterator
│ │ │ -
│ │ │ -
355 cend() const noexcept
│ │ │ -
356 { return _M_h.end(); }
│ │ │ -
│ │ │ -
357
│ │ │ -
358 // modifiers.
│ │ │ -
359
│ │ │ -
360 /**
│ │ │ -
361 * @brief Attempts to build and insert an element into the
│ │ │ -
362 * %unordered_set.
│ │ │ -
363 * @param __args Arguments used to generate an element.
│ │ │ -
364 * @return A pair, of which the first element is an iterator that points
│ │ │ -
365 * to the possibly inserted element, and the second is a bool
│ │ │ -
366 * that is true if the element was actually inserted.
│ │ │ -
367 *
│ │ │ -
368 * This function attempts to build and insert an element into the
│ │ │ -
369 * %unordered_set. An %unordered_set relies on unique keys and thus an
│ │ │ -
370 * element is only inserted if it is not already present in the
│ │ │ -
371 * %unordered_set.
│ │ │ -
372 *
│ │ │ -
373 * Insertion requires amortized constant time.
│ │ │ -
374 */
│ │ │ -
375 template<typename... _Args>
│ │ │ - │ │ │ -
│ │ │ -
377 emplace(_Args&&... __args)
│ │ │ -
378 { return _M_h.emplace(std::forward<_Args>(__args)...); }
│ │ │ -
│ │ │ -
379
│ │ │ -
380 /**
│ │ │ -
381 * @brief Attempts to insert an element into the %unordered_set.
│ │ │ -
382 * @param __pos An iterator that serves as a hint as to where the
│ │ │ -
383 * element should be inserted.
│ │ │ -
384 * @param __args Arguments used to generate the element to be
│ │ │ -
385 * inserted.
│ │ │ -
386 * @return An iterator that points to the element with key equivalent to
│ │ │ -
387 * the one generated from @a __args (may or may not be the
│ │ │ -
388 * element itself).
│ │ │ -
389 *
│ │ │ -
390 * This function is not concerned about whether the insertion took place,
│ │ │ -
391 * and thus does not return a boolean like the single-argument emplace()
│ │ │ -
392 * does. Note that the first parameter is only a hint and can
│ │ │ -
393 * potentially improve the performance of the insertion process. A bad
│ │ │ -
394 * hint would cause no gains in efficiency.
│ │ │ -
395 *
│ │ │ -
396 * For more on @a hinting, see:
│ │ │ -
397 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/associative.html#containers.associative.insert_hints
│ │ │ -
398 *
│ │ │ -
399 * Insertion requires amortized constant time.
│ │ │ -
400 */
│ │ │ -
401 template<typename... _Args>
│ │ │ - │ │ │ -
│ │ │ -
403 emplace_hint(const_iterator __pos, _Args&&... __args)
│ │ │ -
404 { return _M_h.emplace_hint(__pos, std::forward<_Args>(__args)...); }
│ │ │ -
│ │ │ -
405
│ │ │ -
406 ///@{
│ │ │ -
407 /**
│ │ │ -
408 * @brief Attempts to insert an element into the %unordered_set.
│ │ │ -
409 * @param __x Element to be inserted.
│ │ │ -
410 * @return A pair, of which the first element is an iterator that points
│ │ │ -
411 * to the possibly inserted element, and the second is a bool
│ │ │ -
412 * that is true if the element was actually inserted.
│ │ │ -
413 *
│ │ │ -
414 * This function attempts to insert an element into the %unordered_set.
│ │ │ -
415 * An %unordered_set relies on unique keys and thus an element is only
│ │ │ -
416 * inserted if it is not already present in the %unordered_set.
│ │ │ -
417 *
│ │ │ -
418 * Insertion requires amortized constant time.
│ │ │ -
419 */
│ │ │ - │ │ │ -
│ │ │ -
421 insert(const value_type& __x)
│ │ │ -
422 { return _M_h.insert(__x); }
│ │ │ -
│ │ │ -
423
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
426 { return _M_h.insert(std::move(__x)); }
│ │ │ -
│ │ │ -
427 ///@}
│ │ │ -
428
│ │ │ -
429 ///@{
│ │ │ -
430 /**
│ │ │ -
431 * @brief Attempts to insert an element into the %unordered_set.
│ │ │ -
432 * @param __hint An iterator that serves as a hint as to where the
│ │ │ -
433 * element should be inserted.
│ │ │ -
434 * @param __x Element to be inserted.
│ │ │ -
435 * @return An iterator that points to the element with key of
│ │ │ -
436 * @a __x (may or may not be the element passed in).
│ │ │ -
437 *
│ │ │ -
438 * This function is not concerned about whether the insertion took place,
│ │ │ -
439 * and thus does not return a boolean like the single-argument insert()
│ │ │ -
440 * does. Note that the first parameter is only a hint and can
│ │ │ -
441 * potentially improve the performance of the insertion process. A bad
│ │ │ -
442 * hint would cause no gains in efficiency.
│ │ │ -
443 *
│ │ │ -
444 * For more on @a hinting, see:
│ │ │ -
445 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/associative.html#containers.associative.insert_hints
│ │ │ -
446 *
│ │ │ -
447 * Insertion requires amortized constant.
│ │ │ -
448 */
│ │ │ - │ │ │ -
│ │ │ -
450 insert(const_iterator __hint, const value_type& __x)
│ │ │ -
451 { return _M_h.insert(__hint, __x); }
│ │ │ -
│ │ │ -
452
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
455 { return _M_h.insert(__hint, std::move(__x)); }
│ │ │ -
│ │ │ -
456 ///@}
│ │ │ -
457
│ │ │ -
458 /**
│ │ │ -
459 * @brief A template function that attempts to insert a range of
│ │ │ -
460 * elements.
│ │ │ -
461 * @param __first Iterator pointing to the start of the range to be
│ │ │ -
462 * inserted.
│ │ │ -
463 * @param __last Iterator pointing to the end of the range.
│ │ │ -
464 *
│ │ │ -
465 * Complexity similar to that of the range constructor.
│ │ │ -
466 */
│ │ │ -
467 template<typename _InputIterator>
│ │ │ -
468 void
│ │ │ -
│ │ │ -
469 insert(_InputIterator __first, _InputIterator __last)
│ │ │ -
470 { _M_h.insert(__first, __last); }
│ │ │ -
│ │ │ -
471
│ │ │ -
472 /**
│ │ │ -
473 * @brief Attempts to insert a list of elements into the %unordered_set.
│ │ │ -
474 * @param __l A std::initializer_list<value_type> of elements
│ │ │ -
475 * to be inserted.
│ │ │ -
476 *
│ │ │ -
477 * Complexity similar to that of the range constructor.
│ │ │ -
478 */
│ │ │ -
479 void
│ │ │ -
│ │ │ - │ │ │ -
481 { _M_h.insert(__l); }
│ │ │ -
│ │ │ -
482
│ │ │ -
483#if __cplusplus > 201402L
│ │ │ -
484 /// Extract a node.
│ │ │ -
485 node_type
│ │ │ -
│ │ │ - │ │ │ -
487 {
│ │ │ -
488 __glibcxx_assert(__pos != end());
│ │ │ -
489 return _M_h.extract(__pos);
│ │ │ -
490 }
│ │ │ -
│ │ │ -
491
│ │ │ -
492 /// Extract a node.
│ │ │ -
493 node_type
│ │ │ -
│ │ │ -
494 extract(const key_type& __key)
│ │ │ -
495 { return _M_h.extract(__key); }
│ │ │ -
│ │ │ -
496
│ │ │ -
497 /// Re-insert an extracted node.
│ │ │ -
498 insert_return_type
│ │ │ -
│ │ │ -
499 insert(node_type&& __nh)
│ │ │ -
500 { return _M_h._M_reinsert_node(std::move(__nh)); }
│ │ │ -
│ │ │ -
501
│ │ │ -
502 /// Re-insert an extracted node.
│ │ │ - │ │ │ -
│ │ │ -
504 insert(const_iterator, node_type&& __nh)
│ │ │ -
505 { return _M_h._M_reinsert_node(std::move(__nh)).position; }
│ │ │ -
│ │ │ -
506#endif // C++17
│ │ │ -
507
│ │ │ -
508 ///@{
│ │ │ -
509 /**
│ │ │ -
510 * @brief Erases an element from an %unordered_set.
│ │ │ -
511 * @param __position An iterator pointing to the element to be erased.
│ │ │ -
512 * @return An iterator pointing to the element immediately following
│ │ │ -
513 * @a __position prior to the element being erased. If no such
│ │ │ -
514 * element exists, end() is returned.
│ │ │ -
515 *
│ │ │ -
516 * This function erases an element, pointed to by the given iterator,
│ │ │ -
517 * from an %unordered_set. Note that this function only erases the
│ │ │ -
518 * element, and that if the element is itself a pointer, the pointed-to
│ │ │ -
519 * memory is not touched in any way. Managing the pointer is the user's
│ │ │ -
520 * responsibility.
│ │ │ -
521 */
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
524 { return _M_h.erase(__position); }
│ │ │ -
│ │ │ -
525
│ │ │ -
526 // LWG 2059.
│ │ │ - │ │ │ -
│ │ │ -
528 erase(iterator __position)
│ │ │ -
529 { return _M_h.erase(__position); }
│ │ │ -
│ │ │ -
530 ///@}
│ │ │ -
531
│ │ │ -
532 /**
│ │ │ -
533 * @brief Erases elements according to the provided key.
│ │ │ -
534 * @param __x Key of element to be erased.
│ │ │ -
535 * @return The number of elements erased.
│ │ │ -
536 *
│ │ │ -
537 * This function erases all the elements located by the given key from
│ │ │ -
538 * an %unordered_set. For an %unordered_set the result of this function
│ │ │ -
539 * can only be 0 (not present) or 1 (present).
│ │ │ -
540 * Note that this function only erases the element, and that if
│ │ │ -
541 * the element is itself a pointer, the pointed-to memory is not touched
│ │ │ -
542 * in any way. Managing the pointer is the user's responsibility.
│ │ │ -
543 */
│ │ │ - │ │ │ -
│ │ │ -
545 erase(const key_type& __x)
│ │ │ -
546 { return _M_h.erase(__x); }
│ │ │ -
│ │ │ -
547
│ │ │ -
548 /**
│ │ │ -
549 * @brief Erases a [__first,__last) range of elements from an
│ │ │ -
550 * %unordered_set.
│ │ │ -
551 * @param __first Iterator pointing to the start of the range to be
│ │ │ -
552 * erased.
│ │ │ -
553 * @param __last Iterator pointing to the end of the range to
│ │ │ -
554 * be erased.
│ │ │ -
555 * @return The iterator @a __last.
│ │ │ -
556 *
│ │ │ -
557 * This function erases a sequence of elements from an %unordered_set.
│ │ │ -
558 * Note that this function only erases the element, and that if
│ │ │ -
559 * the element is itself a pointer, the pointed-to memory is not touched
│ │ │ -
560 * in any way. Managing the pointer is the user's responsibility.
│ │ │ -
561 */
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
564 { return _M_h.erase(__first, __last); }
│ │ │ -
│ │ │ -
565
│ │ │ -
566 /**
│ │ │ -
567 * Erases all elements in an %unordered_set. Note that this function only
│ │ │ -
568 * erases the elements, and that if the elements themselves are pointers,
│ │ │ -
569 * the pointed-to memory is not touched in any way. Managing the pointer
│ │ │ -
570 * is the user's responsibility.
│ │ │ -
571 */
│ │ │ -
572 void
│ │ │ -
│ │ │ -
573 clear() noexcept
│ │ │ -
574 { _M_h.clear(); }
│ │ │ -
│ │ │ -
575
│ │ │ -
576 /**
│ │ │ -
577 * @brief Swaps data with another %unordered_set.
│ │ │ -
578 * @param __x An %unordered_set of the same element and allocator
│ │ │ -
579 * types.
│ │ │ -
580 *
│ │ │ -
581 * This exchanges the elements between two sets in constant time.
│ │ │ -
582 * Note that the global std::swap() function is specialized such that
│ │ │ -
583 * std::swap(s1,s2) will feed to this function.
│ │ │ -
584 */
│ │ │ -
585 void
│ │ │ -
│ │ │ - │ │ │ -
587 noexcept( noexcept(_M_h.swap(__x._M_h)) )
│ │ │ -
588 { _M_h.swap(__x._M_h); }
│ │ │ -
│ │ │ -
589
│ │ │ -
590#if __cplusplus > 201402L
│ │ │ -
591 template<typename, typename, typename>
│ │ │ -
592 friend class std::_Hash_merge_helper;
│ │ │ -
593
│ │ │ -
594 template<typename _H2, typename _P2>
│ │ │ -
595 void
│ │ │ - │ │ │ -
597 {
│ │ │ -
598 using _Merge_helper = _Hash_merge_helper<unordered_set, _H2, _P2>;
│ │ │ -
599 _M_h._M_merge_unique(_Merge_helper::_S_get_table(__source));
│ │ │ -
600 }
│ │ │ -
601
│ │ │ -
602 template<typename _H2, typename _P2>
│ │ │ -
603 void
│ │ │ -
604 merge(unordered_set<_Value, _H2, _P2, _Alloc>&& __source)
│ │ │ -
605 { merge(__source); }
│ │ │ -
606
│ │ │ -
607 template<typename _H2, typename _P2>
│ │ │ -
608 void
│ │ │ -
609 merge(unordered_multiset<_Value, _H2, _P2, _Alloc>& __source)
│ │ │ -
610 {
│ │ │ -
611 using _Merge_helper = _Hash_merge_helper<unordered_set, _H2, _P2>;
│ │ │ -
612 _M_h._M_merge_unique(_Merge_helper::_S_get_table(__source));
│ │ │ -
613 }
│ │ │ -
614
│ │ │ -
615 template<typename _H2, typename _P2>
│ │ │ -
616 void
│ │ │ -
617 merge(unordered_multiset<_Value, _H2, _P2, _Alloc>&& __source)
│ │ │ -
618 { merge(__source); }
│ │ │ -
619#endif // C++17
│ │ │ -
620
│ │ │ -
621 // observers.
│ │ │ -
622
│ │ │ -
623 /// Returns the hash functor object with which the %unordered_set was
│ │ │ -
624 /// constructed.
│ │ │ -
625 hasher
│ │ │ -
│ │ │ - │ │ │ -
627 { return _M_h.hash_function(); }
│ │ │ -
│ │ │ -
628
│ │ │ -
629 /// Returns the key comparison object with which the %unordered_set was
│ │ │ -
630 /// constructed.
│ │ │ - │ │ │ -
│ │ │ -
632 key_eq() const
│ │ │ -
633 { return _M_h.key_eq(); }
│ │ │ -
│ │ │ -
634
│ │ │ -
635 // lookup.
│ │ │ -
636
│ │ │ -
637 ///@{
│ │ │ -
638 /**
│ │ │ -
639 * @brief Tries to locate an element in an %unordered_set.
│ │ │ -
640 * @param __x Element to be located.
│ │ │ -
641 * @return Iterator pointing to sought-after element, or end() if not
│ │ │ -
642 * found.
│ │ │ -
643 *
│ │ │ -
644 * This function takes a key and tries to locate the element with which
│ │ │ -
645 * the key matches. If successful the function returns an iterator
│ │ │ -
646 * pointing to the sought after element. If unsuccessful it returns the
│ │ │ -
647 * past-the-end ( @c end() ) iterator.
│ │ │ -
648 */
│ │ │ - │ │ │ -
│ │ │ -
650 find(const key_type& __x)
│ │ │ -
651 { return _M_h.find(__x); }
│ │ │ -
│ │ │ -
652
│ │ │ -
653#if __cplusplus > 201703L
│ │ │ -
654 template<typename _Kt>
│ │ │ -
655 auto
│ │ │ -
656 find(const _Kt& __k)
│ │ │ -
657 -> decltype(_M_h._M_find_tr(__k))
│ │ │ -
658 { return _M_h._M_find_tr(__k); }
│ │ │ -
659#endif
│ │ │ -
660
│ │ │ -
661 const_iterator
│ │ │ -
│ │ │ -
662 find(const key_type& __x) const
│ │ │ -
663 { return _M_h.find(__x); }
│ │ │ -
│ │ │ -
664
│ │ │ -
665#if __cplusplus > 201703L
│ │ │ -
666 template<typename _Kt>
│ │ │ -
667 auto
│ │ │ -
668 find(const _Kt& __k) const
│ │ │ -
669 -> decltype(_M_h._M_find_tr(__k))
│ │ │ -
670 { return _M_h._M_find_tr(__k); }
│ │ │ -
671#endif
│ │ │ -
672 ///@}
│ │ │ -
673
│ │ │ -
674 ///@{
│ │ │ -
675 /**
│ │ │ -
676 * @brief Finds the number of elements.
│ │ │ -
677 * @param __x Element to located.
│ │ │ -
678 * @return Number of elements with specified key.
│ │ │ -
679 *
│ │ │ -
680 * This function only makes sense for unordered_multisets; for
│ │ │ -
681 * unordered_set the result will either be 0 (not present) or 1
│ │ │ -
682 * (present).
│ │ │ -
683 */
│ │ │ -
684 size_type
│ │ │ -
│ │ │ -
685 count(const key_type& __x) const
│ │ │ -
686 { return _M_h.count(__x); }
│ │ │ -
│ │ │ -
687
│ │ │ -
688#if __cplusplus > 201703L
│ │ │ -
689 template<typename _Kt>
│ │ │ -
690 auto
│ │ │ -
691 count(const _Kt& __k) const
│ │ │ -
692 -> decltype(_M_h._M_count_tr(__k))
│ │ │ -
693 { return _M_h._M_count_tr(__k); }
│ │ │ -
694#endif
│ │ │ -
695 ///@}
│ │ │ -
696
│ │ │ -
697#if __cplusplus > 201703L
│ │ │ -
698 ///@{
│ │ │ -
699 /**
│ │ │ -
700 * @brief Finds whether an element with the given key exists.
│ │ │ -
701 * @param __x Key of elements to be located.
│ │ │ -
702 * @return True if there is any element with the specified key.
│ │ │ -
703 */
│ │ │ -
704 bool
│ │ │ -
705 contains(const key_type& __x) const
│ │ │ -
706 { return _M_h.find(__x) != _M_h.end(); }
│ │ │ -
707
│ │ │ -
708 template<typename _Kt>
│ │ │ -
709 auto
│ │ │ -
710 contains(const _Kt& __k) const
│ │ │ -
711 -> decltype(_M_h._M_find_tr(__k), void(), true)
│ │ │ -
712 { return _M_h._M_find_tr(__k) != _M_h.end(); }
│ │ │ -
713 ///@}
│ │ │ -
714#endif
│ │ │ -
715
│ │ │ -
716 ///@{
│ │ │ -
717 /**
│ │ │ -
718 * @brief Finds a subsequence matching given key.
│ │ │ -
719 * @param __x Key to be located.
│ │ │ -
720 * @return Pair of iterators that possibly points to the subsequence
│ │ │ -
721 * matching given key.
│ │ │ -
722 *
│ │ │ -
723 * This function probably only makes sense for multisets.
│ │ │ -
724 */
│ │ │ -
725 std::pair<iterator, iterator>
│ │ │ -
│ │ │ - │ │ │ -
727 { return _M_h.equal_range(__x); }
│ │ │ -
│ │ │ -
728
│ │ │ -
729#if __cplusplus > 201703L
│ │ │ -
730 template<typename _Kt>
│ │ │ -
731 auto
│ │ │ -
732 equal_range(const _Kt& __k)
│ │ │ -
733 -> decltype(_M_h._M_equal_range_tr(__k))
│ │ │ -
734 { return _M_h._M_equal_range_tr(__k); }
│ │ │ -
735#endif
│ │ │ -
736
│ │ │ - │ │ │ -
│ │ │ -
738 equal_range(const key_type& __x) const
│ │ │ -
739 { return _M_h.equal_range(__x); }
│ │ │ -
│ │ │ -
740
│ │ │ -
741#if __cplusplus > 201703L
│ │ │ -
742 template<typename _Kt>
│ │ │ -
743 auto
│ │ │ -
744 equal_range(const _Kt& __k) const
│ │ │ -
745 -> decltype(_M_h._M_equal_range_tr(__k))
│ │ │ -
746 { return _M_h._M_equal_range_tr(__k); }
│ │ │ -
747#endif
│ │ │ -
748 ///@}
│ │ │ -
749
│ │ │ -
750 // bucket interface.
│ │ │ -
751
│ │ │ -
752 /// Returns the number of buckets of the %unordered_set.
│ │ │ -
753 size_type
│ │ │ -
│ │ │ -
754 bucket_count() const noexcept
│ │ │ -
755 { return _M_h.bucket_count(); }
│ │ │ -
│ │ │ -
756
│ │ │ -
757 /// Returns the maximum number of buckets of the %unordered_set.
│ │ │ - │ │ │ -
│ │ │ -
759 max_bucket_count() const noexcept
│ │ │ -
760 { return _M_h.max_bucket_count(); }
│ │ │ -
│ │ │ -
761
│ │ │ -
762 /*
│ │ │ -
763 * @brief Returns the number of elements in a given bucket.
│ │ │ -
764 * @param __n A bucket index.
│ │ │ -
765 * @return The number of elements in the bucket.
│ │ │ -
766 */
│ │ │ - │ │ │ -
768 bucket_size(size_type __n) const
│ │ │ -
769 { return _M_h.bucket_size(__n); }
│ │ │ -
770
│ │ │ -
771 /*
│ │ │ -
772 * @brief Returns the bucket index of a given element.
│ │ │ -
773 * @param __key A key instance.
│ │ │ -
774 * @return The key bucket index.
│ │ │ -
775 */
│ │ │ -
776 size_type
│ │ │ -
777 bucket(const key_type& __key) const
│ │ │ -
778 { return _M_h.bucket(__key); }
│ │ │ -
779
│ │ │ -
780 ///@{
│ │ │ -
781 /**
│ │ │ -
782 * @brief Returns a read-only (constant) iterator pointing to the first
│ │ │ -
783 * bucket element.
│ │ │ -
784 * @param __n The bucket index.
│ │ │ -
785 * @return A read-only local iterator.
│ │ │ -
786 */
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
789 { return _M_h.begin(__n); }
│ │ │ -
│ │ │ -
790
│ │ │ - │ │ │ -
│ │ │ -
792 begin(size_type __n) const
│ │ │ -
793 { return _M_h.begin(__n); }
│ │ │ -
│ │ │ -
794
│ │ │ - │ │ │ -
│ │ │ -
796 cbegin(size_type __n) const
│ │ │ -
797 { return _M_h.cbegin(__n); }
│ │ │ -
│ │ │ -
798 ///@}
│ │ │ -
799
│ │ │ -
800 ///@{
│ │ │ -
801 /**
│ │ │ -
802 * @brief Returns a read-only (constant) iterator pointing to one past
│ │ │ -
803 * the last bucket elements.
│ │ │ -
804 * @param __n The bucket index.
│ │ │ -
805 * @return A read-only local iterator.
│ │ │ -
806 */
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
809 { return _M_h.end(__n); }
│ │ │ -
│ │ │ -
810
│ │ │ - │ │ │ -
│ │ │ -
812 end(size_type __n) const
│ │ │ -
813 { return _M_h.end(__n); }
│ │ │ -
│ │ │ -
814
│ │ │ - │ │ │ -
│ │ │ -
816 cend(size_type __n) const
│ │ │ -
817 { return _M_h.cend(__n); }
│ │ │ -
│ │ │ -
818 ///@}
│ │ │ -
819
│ │ │ -
820 // hash policy.
│ │ │ -
821
│ │ │ -
822 /// Returns the average number of elements per bucket.
│ │ │ -
823 float
│ │ │ -
│ │ │ -
824 load_factor() const noexcept
│ │ │ -
825 { return _M_h.load_factor(); }
│ │ │ -
│ │ │ -
826
│ │ │ -
827 /// Returns a positive number that the %unordered_set tries to keep the
│ │ │ -
828 /// load factor less than or equal to.
│ │ │ -
829 float
│ │ │ -
│ │ │ -
830 max_load_factor() const noexcept
│ │ │ -
831 { return _M_h.max_load_factor(); }
│ │ │ -
│ │ │ -
832
│ │ │ -
833 /**
│ │ │ -
834 * @brief Change the %unordered_set maximum load factor.
│ │ │ -
835 * @param __z The new maximum load factor.
│ │ │ -
836 */
│ │ │ -
837 void
│ │ │ -
│ │ │ - │ │ │ -
839 { _M_h.max_load_factor(__z); }
│ │ │ -
│ │ │ -
840
│ │ │ -
841 /**
│ │ │ -
842 * @brief May rehash the %unordered_set.
│ │ │ -
843 * @param __n The new number of buckets.
│ │ │ -
844 *
│ │ │ -
845 * Rehash will occur only if the new number of buckets respect the
│ │ │ -
846 * %unordered_set maximum load factor.
│ │ │ -
847 */
│ │ │ -
848 void
│ │ │ -
│ │ │ - │ │ │ -
850 { _M_h.rehash(__n); }
│ │ │ -
│ │ │ -
851
│ │ │ -
852 /**
│ │ │ -
853 * @brief Prepare the %unordered_set for a specified number of
│ │ │ -
854 * elements.
│ │ │ -
855 * @param __n Number of elements required.
│ │ │ -
856 *
│ │ │ -
857 * Same as rehash(ceil(n / max_load_factor())).
│ │ │ -
858 */
│ │ │ -
859 void
│ │ │ -
│ │ │ - │ │ │ -
861 { _M_h.reserve(__n); }
│ │ │ -
│ │ │ -
862
│ │ │ -
863 template<typename _Value1, typename _Hash1, typename _Pred1,
│ │ │ -
864 typename _Alloc1>
│ │ │ -
865 friend bool
│ │ │ - │ │ │ - │ │ │ -
868 };
│ │ │ -
│ │ │ -
869
│ │ │ -
870#if __cpp_deduction_guides >= 201606
│ │ │ -
871
│ │ │ -
872 template<typename _InputIterator,
│ │ │ -
873 typename _Hash =
│ │ │ -
874 hash<typename iterator_traits<_InputIterator>::value_type>,
│ │ │ -
875 typename _Pred =
│ │ │ -
876 equal_to<typename iterator_traits<_InputIterator>::value_type>,
│ │ │ -
877 typename _Allocator =
│ │ │ -
878 allocator<typename iterator_traits<_InputIterator>::value_type>,
│ │ │ -
879 typename = _RequireInputIter<_InputIterator>,
│ │ │ -
880 typename = _RequireNotAllocatorOrIntegral<_Hash>,
│ │ │ -
881 typename = _RequireNotAllocator<_Pred>,
│ │ │ -
882 typename = _RequireAllocator<_Allocator>>
│ │ │ -
883 unordered_set(_InputIterator, _InputIterator,
│ │ │ -
884 unordered_set<int>::size_type = {},
│ │ │ -
885 _Hash = _Hash(), _Pred = _Pred(), _Allocator = _Allocator())
│ │ │ - │ │ │ -
887 _Hash, _Pred, _Allocator>;
│ │ │ -
888
│ │ │ -
889 template<typename _Tp, typename _Hash = hash<_Tp>,
│ │ │ -
890 typename _Pred = equal_to<_Tp>,
│ │ │ -
891 typename _Allocator = allocator<_Tp>,
│ │ │ -
892 typename = _RequireNotAllocatorOrIntegral<_Hash>,
│ │ │ -
893 typename = _RequireNotAllocator<_Pred>,
│ │ │ -
894 typename = _RequireAllocator<_Allocator>>
│ │ │ - │ │ │ - │ │ │ -
897 _Hash = _Hash(), _Pred = _Pred(), _Allocator = _Allocator())
│ │ │ - │ │ │ -
899
│ │ │ -
900 template<typename _InputIterator, typename _Allocator,
│ │ │ -
901 typename = _RequireInputIter<_InputIterator>,
│ │ │ -
902 typename = _RequireAllocator<_Allocator>>
│ │ │ -
903 unordered_set(_InputIterator, _InputIterator,
│ │ │ - │ │ │ - │ │ │ -
906 hash<
│ │ │ - │ │ │ -
908 equal_to<
│ │ │ - │ │ │ -
910 _Allocator>;
│ │ │ -
911
│ │ │ -
912 template<typename _InputIterator, typename _Hash, typename _Allocator,
│ │ │ -
913 typename = _RequireInputIter<_InputIterator>,
│ │ │ -
914 typename = _RequireNotAllocatorOrIntegral<_Hash>,
│ │ │ -
915 typename = _RequireAllocator<_Allocator>>
│ │ │ -
916 unordered_set(_InputIterator, _InputIterator,
│ │ │ - │ │ │ -
918 _Hash, _Allocator)
│ │ │ - │ │ │ -
920 _Hash,
│ │ │ -
921 equal_to<
│ │ │ - │ │ │ -
923 _Allocator>;
│ │ │ -
924
│ │ │ -
925 template<typename _Tp, typename _Allocator,
│ │ │ -
926 typename = _RequireAllocator<_Allocator>>
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
930
│ │ │ -
931 template<typename _Tp, typename _Hash, typename _Allocator,
│ │ │ -
932 typename = _RequireNotAllocatorOrIntegral<_Hash>,
│ │ │ -
933 typename = _RequireAllocator<_Allocator>>
│ │ │ - │ │ │ -
935 unordered_set<int>::size_type, _Hash, _Allocator)
│ │ │ - │ │ │ -
937
│ │ │ -
938#endif
│ │ │ -
939
│ │ │ -
940 /**
│ │ │ -
941 * @brief A standard container composed of equivalent keys
│ │ │ -
942 * (possibly containing multiple of each key value) in which the
│ │ │ -
943 * elements' keys are the elements themselves.
│ │ │ -
944 *
│ │ │ -
945 * @ingroup unordered_associative_containers
│ │ │ -
946 *
│ │ │ -
947 * @tparam _Value Type of key objects.
│ │ │ -
948 * @tparam _Hash Hashing function object type, defaults to hash<_Value>.
│ │ │ -
949 * @tparam _Pred Predicate function object type, defaults
│ │ │ -
950 * to equal_to<_Value>.
│ │ │ -
951 * @tparam _Alloc Allocator type, defaults to allocator<_Key>.
│ │ │ -
952 *
│ │ │ -
953 * Meets the requirements of a <a href="tables.html#65">container</a>, and
│ │ │ -
954 * <a href="tables.html#xx">unordered associative container</a>
│ │ │ -
955 *
│ │ │ -
956 * Base is _Hashtable, dispatched at compile time via template
│ │ │ -
957 * alias __umset_hashtable.
│ │ │ -
958 */
│ │ │ -
959 template<typename _Value,
│ │ │ -
960 typename _Hash = hash<_Value>,
│ │ │ -
961 typename _Pred = equal_to<_Value>,
│ │ │ -
962 typename _Alloc = allocator<_Value>>
│ │ │ -
│ │ │ - │ │ │ -
964 {
│ │ │ -
965 typedef __umset_hashtable<_Value, _Hash, _Pred, _Alloc> _Hashtable;
│ │ │ -
966 _Hashtable _M_h;
│ │ │ -
967
│ │ │ -
968 public:
│ │ │ -
969 // typedefs:
│ │ │ -
970 ///@{
│ │ │ -
971 /// Public typedefs.
│ │ │ -
972 typedef typename _Hashtable::key_type key_type;
│ │ │ -
973 typedef typename _Hashtable::value_type value_type;
│ │ │ -
974 typedef typename _Hashtable::hasher hasher;
│ │ │ -
975 typedef typename _Hashtable::key_equal key_equal;
│ │ │ -
976 typedef typename _Hashtable::allocator_type allocator_type;
│ │ │ -
977 ///@}
│ │ │ -
978
│ │ │ -
979 ///@{
│ │ │ -
980 /// Iterator-related typedefs.
│ │ │ -
981 typedef typename _Hashtable::pointer pointer;
│ │ │ -
982 typedef typename _Hashtable::const_pointer const_pointer;
│ │ │ -
983 typedef typename _Hashtable::reference reference;
│ │ │ -
984 typedef typename _Hashtable::const_reference const_reference;
│ │ │ -
985 typedef typename _Hashtable::iterator iterator;
│ │ │ -
986 typedef typename _Hashtable::const_iterator const_iterator;
│ │ │ -
987 typedef typename _Hashtable::local_iterator local_iterator;
│ │ │ -
988 typedef typename _Hashtable::const_local_iterator const_local_iterator;
│ │ │ -
989 typedef typename _Hashtable::size_type size_type;
│ │ │ -
990 typedef typename _Hashtable::difference_type difference_type;
│ │ │ -
991 ///@}
│ │ │ -
992
│ │ │ -
993#if __cplusplus > 201402L
│ │ │ -
994 using node_type = typename _Hashtable::node_type;
│ │ │ -
995#endif
│ │ │ -
996
│ │ │ -
997 // construct/destroy/copy
│ │ │ -
998
│ │ │ -
999 /// Default constructor.
│ │ │ - │ │ │ -
1001
│ │ │ -
1002 /**
│ │ │ -
1003 * @brief Default constructor creates no elements.
│ │ │ -
1004 * @param __n Minimal initial number of buckets.
│ │ │ -
1005 * @param __hf A hash functor.
│ │ │ -
1006 * @param __eql A key equality functor.
│ │ │ -
1007 * @param __a An allocator object.
│ │ │ -
1008 */
│ │ │ -
1009 explicit
│ │ │ -
│ │ │ - │ │ │ -
1011 const hasher& __hf = hasher(),
│ │ │ -
1012 const key_equal& __eql = key_equal(),
│ │ │ -
1013 const allocator_type& __a = allocator_type())
│ │ │ -
1014 : _M_h(__n, __hf, __eql, __a)
│ │ │ -
1015 { }
│ │ │ -
│ │ │ -
1016
│ │ │ -
1017 /**
│ │ │ -
1018 * @brief Builds an %unordered_multiset from a range.
│ │ │ -
1019 * @param __first An input iterator.
│ │ │ -
1020 * @param __last An input iterator.
│ │ │ -
1021 * @param __n Minimal initial number of buckets.
│ │ │ -
1022 * @param __hf A hash functor.
│ │ │ -
1023 * @param __eql A key equality functor.
│ │ │ -
1024 * @param __a An allocator object.
│ │ │ -
1025 *
│ │ │ -
1026 * Create an %unordered_multiset consisting of copies of the elements
│ │ │ -
1027 * from [__first,__last). This is linear in N (where N is
│ │ │ -
1028 * distance(__first,__last)).
│ │ │ -
1029 */
│ │ │ -
1030 template<typename _InputIterator>
│ │ │ -
│ │ │ -
1031 unordered_multiset(_InputIterator __first, _InputIterator __last,
│ │ │ -
1032 size_type __n = 0,
│ │ │ -
1033 const hasher& __hf = hasher(),
│ │ │ -
1034 const key_equal& __eql = key_equal(),
│ │ │ -
1035 const allocator_type& __a = allocator_type())
│ │ │ -
1036 : _M_h(__first, __last, __n, __hf, __eql, __a)
│ │ │ -
1037 { }
│ │ │ -
│ │ │ -
1038
│ │ │ -
1039 /// Copy constructor.
│ │ │ - │ │ │ -
1041
│ │ │ -
1042 /// Move constructor.
│ │ │ - │ │ │ -
1044
│ │ │ -
1045 /**
│ │ │ -
1046 * @brief Builds an %unordered_multiset from an initializer_list.
│ │ │ -
1047 * @param __l An initializer_list.
│ │ │ -
1048 * @param __n Minimal initial number of buckets.
│ │ │ -
1049 * @param __hf A hash functor.
│ │ │ -
1050 * @param __eql A key equality functor.
│ │ │ -
1051 * @param __a An allocator object.
│ │ │ -
1052 *
│ │ │ -
1053 * Create an %unordered_multiset consisting of copies of the elements in
│ │ │ -
1054 * the list. This is linear in N (where N is @a __l.size()).
│ │ │ -
1055 */
│ │ │ -
│ │ │ - │ │ │ -
1057 size_type __n = 0,
│ │ │ -
1058 const hasher& __hf = hasher(),
│ │ │ -
1059 const key_equal& __eql = key_equal(),
│ │ │ -
1060 const allocator_type& __a = allocator_type())
│ │ │ -
1061 : _M_h(__l, __n, __hf, __eql, __a)
│ │ │ -
1062 { }
│ │ │ -
│ │ │ -
1063
│ │ │ -
1064 /// Copy assignment operator.
│ │ │ - │ │ │ - │ │ │ -
1067
│ │ │ -
1068 /// Move assignment operator.
│ │ │ - │ │ │ - │ │ │ -
1071
│ │ │ -
1072 /**
│ │ │ -
1073 * @brief Creates an %unordered_multiset with no elements.
│ │ │ -
1074 * @param __a An allocator object.
│ │ │ -
1075 */
│ │ │ -
1076 explicit
│ │ │ -
│ │ │ - │ │ │ -
1078 : _M_h(__a)
│ │ │ -
1079 { }
│ │ │ -
│ │ │ -
1080
│ │ │ -
1081 /*
│ │ │ -
1082 * @brief Copy constructor with allocator argument.
│ │ │ -
1083 * @param __uset Input %unordered_multiset to copy.
│ │ │ -
1084 * @param __a An allocator object.
│ │ │ -
1085 */
│ │ │ - │ │ │ -
1087 const allocator_type& __a)
│ │ │ -
1088 : _M_h(__umset._M_h, __a)
│ │ │ -
1089 { }
│ │ │ -
1090
│ │ │ -
1091 /*
│ │ │ -
1092 * @brief Move constructor with allocator argument.
│ │ │ -
1093 * @param __umset Input %unordered_multiset to move.
│ │ │ -
1094 * @param __a An allocator object.
│ │ │ -
1095 */
│ │ │ -
1096 unordered_multiset(unordered_multiset&& __umset,
│ │ │ -
1097 const allocator_type& __a)
│ │ │ -
1098 noexcept( noexcept(_Hashtable(std::move(__umset._M_h), __a)) )
│ │ │ -
1099 : _M_h(std::move(__umset._M_h), __a)
│ │ │ -
1100 { }
│ │ │ -
1101
│ │ │ - │ │ │ -
1103 : unordered_multiset(__n, hasher(), key_equal(), __a)
│ │ │ -
1104 { }
│ │ │ -
1105
│ │ │ -
1106 unordered_multiset(size_type __n, const hasher& __hf,
│ │ │ -
1107 const allocator_type& __a)
│ │ │ -
1108 : unordered_multiset(__n, __hf, key_equal(), __a)
│ │ │ -
1109 { }
│ │ │ -
1110
│ │ │ -
1111 template<typename _InputIterator>
│ │ │ -
1112 unordered_multiset(_InputIterator __first, _InputIterator __last,
│ │ │ -
1113 size_type __n,
│ │ │ -
1114 const allocator_type& __a)
│ │ │ -
1115 : unordered_multiset(__first, __last, __n, hasher(), key_equal(), __a)
│ │ │ -
1116 { }
│ │ │ -
1117
│ │ │ -
1118 template<typename _InputIterator>
│ │ │ -
1119 unordered_multiset(_InputIterator __first, _InputIterator __last,
│ │ │ -
1120 size_type __n, const hasher& __hf,
│ │ │ -
1121 const allocator_type& __a)
│ │ │ -
1122 : unordered_multiset(__first, __last, __n, __hf, key_equal(), __a)
│ │ │ -
1123 { }
│ │ │ -
1124
│ │ │ -
1125 unordered_multiset(initializer_list<value_type> __l,
│ │ │ -
1126 size_type __n,
│ │ │ -
1127 const allocator_type& __a)
│ │ │ -
1128 : unordered_multiset(__l, __n, hasher(), key_equal(), __a)
│ │ │ -
1129 { }
│ │ │ -
1130
│ │ │ -
1131 unordered_multiset(initializer_list<value_type> __l,
│ │ │ -
1132 size_type __n, const hasher& __hf,
│ │ │ -
1133 const allocator_type& __a)
│ │ │ -
1134 : unordered_multiset(__l, __n, __hf, key_equal(), __a)
│ │ │ -
1135 { }
│ │ │ -
1136
│ │ │ -
1137 /**
│ │ │ -
1138 * @brief %Unordered_multiset list assignment operator.
│ │ │ -
1139 * @param __l An initializer_list.
│ │ │ -
1140 *
│ │ │ -
1141 * This function fills an %unordered_multiset with copies of the elements
│ │ │ -
1142 * in the initializer list @a __l.
│ │ │ -
1143 *
│ │ │ -
1144 * Note that the assignment completely changes the %unordered_multiset
│ │ │ -
1145 * and that the resulting %unordered_multiset's size is the same as the
│ │ │ -
1146 * number of elements assigned.
│ │ │ -
1147 */
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
1150 {
│ │ │ -
1151 _M_h = __l;
│ │ │ -
1152 return *this;
│ │ │ -
1153 }
│ │ │ -
│ │ │ -
1154
│ │ │ -
1155 /// Returns the allocator object used by the %unordered_multiset.
│ │ │ - │ │ │ -
│ │ │ -
1157 get_allocator() const noexcept
│ │ │ -
1158 { return _M_h.get_allocator(); }
│ │ │ -
│ │ │ -
1159
│ │ │ -
1160 // size and capacity:
│ │ │ -
1161
│ │ │ -
1162 /// Returns true if the %unordered_multiset is empty.
│ │ │ -
1163 _GLIBCXX_NODISCARD bool
│ │ │ -
│ │ │ -
1164 empty() const noexcept
│ │ │ -
1165 { return _M_h.empty(); }
│ │ │ -
│ │ │ -
1166
│ │ │ -
1167 /// Returns the size of the %unordered_multiset.
│ │ │ -
1168 size_type
│ │ │ -
│ │ │ -
1169 size() const noexcept
│ │ │ -
1170 { return _M_h.size(); }
│ │ │ -
│ │ │ -
1171
│ │ │ -
1172 /// Returns the maximum size of the %unordered_multiset.
│ │ │ -
1173 size_type
│ │ │ -
│ │ │ -
1174 max_size() const noexcept
│ │ │ -
1175 { return _M_h.max_size(); }
│ │ │ -
│ │ │ -
1176
│ │ │ -
1177 // iterators.
│ │ │ -
1178
│ │ │ -
1179 ///@{
│ │ │ -
1180 /**
│ │ │ -
1181 * Returns a read-only (constant) iterator that points to the first
│ │ │ -
1182 * element in the %unordered_multiset.
│ │ │ -
1183 */
│ │ │ -
1184 iterator
│ │ │ -
│ │ │ -
1185 begin() noexcept
│ │ │ -
1186 { return _M_h.begin(); }
│ │ │ -
│ │ │ -
1187
│ │ │ -
1188 const_iterator
│ │ │ -
│ │ │ -
1189 begin() const noexcept
│ │ │ -
1190 { return _M_h.begin(); }
│ │ │ -
│ │ │ -
1191 ///@}
│ │ │ -
1192
│ │ │ -
1193 ///@{
│ │ │ -
1194 /**
│ │ │ -
1195 * Returns a read-only (constant) iterator that points one past the last
│ │ │ -
1196 * element in the %unordered_multiset.
│ │ │ -
1197 */
│ │ │ -
1198 iterator
│ │ │ -
│ │ │ -
1199 end() noexcept
│ │ │ -
1200 { return _M_h.end(); }
│ │ │ -
│ │ │ -
1201
│ │ │ -
1202 const_iterator
│ │ │ -
│ │ │ -
1203 end() const noexcept
│ │ │ -
1204 { return _M_h.end(); }
│ │ │ -
│ │ │ -
1205 ///@}
│ │ │ -
1206
│ │ │ -
1207 /**
│ │ │ -
1208 * Returns a read-only (constant) iterator that points to the first
│ │ │ -
1209 * element in the %unordered_multiset.
│ │ │ -
1210 */
│ │ │ -
1211 const_iterator
│ │ │ -
│ │ │ -
1212 cbegin() const noexcept
│ │ │ -
1213 { return _M_h.begin(); }
│ │ │ -
│ │ │ -
1214
│ │ │ -
1215 /**
│ │ │ -
1216 * Returns a read-only (constant) iterator that points one past the last
│ │ │ -
1217 * element in the %unordered_multiset.
│ │ │ -
1218 */
│ │ │ -
1219 const_iterator
│ │ │ -
│ │ │ -
1220 cend() const noexcept
│ │ │ -
1221 { return _M_h.end(); }
│ │ │ -
│ │ │ -
1222
│ │ │ -
1223 // modifiers.
│ │ │ -
1224
│ │ │ -
1225 /**
│ │ │ -
1226 * @brief Builds and insert an element into the %unordered_multiset.
│ │ │ -
1227 * @param __args Arguments used to generate an element.
│ │ │ -
1228 * @return An iterator that points to the inserted element.
│ │ │ -
1229 *
│ │ │ -
1230 * Insertion requires amortized constant time.
│ │ │ -
1231 */
│ │ │ -
1232 template<typename... _Args>
│ │ │ -
1233 iterator
│ │ │ -
│ │ │ -
1234 emplace(_Args&&... __args)
│ │ │ -
1235 { return _M_h.emplace(std::forward<_Args>(__args)...); }
│ │ │ -
│ │ │ -
1236
│ │ │ -
1237 /**
│ │ │ -
1238 * @brief Inserts an element into the %unordered_multiset.
│ │ │ -
1239 * @param __pos An iterator that serves as a hint as to where the
│ │ │ -
1240 * element should be inserted.
│ │ │ -
1241 * @param __args Arguments used to generate the element to be
│ │ │ -
1242 * inserted.
│ │ │ -
1243 * @return An iterator that points to the inserted element.
│ │ │ -
1244 *
│ │ │ -
1245 * Note that the first parameter is only a hint and can potentially
│ │ │ -
1246 * improve the performance of the insertion process. A bad hint would
│ │ │ -
1247 * cause no gains in efficiency.
│ │ │ -
1248 *
│ │ │ -
1249 * For more on @a hinting, see:
│ │ │ -
1250 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/associative.html#containers.associative.insert_hints
│ │ │ -
1251 *
│ │ │ -
1252 * Insertion requires amortized constant time.
│ │ │ -
1253 */
│ │ │ -
1254 template<typename... _Args>
│ │ │ -
1255 iterator
│ │ │ -
│ │ │ -
1256 emplace_hint(const_iterator __pos, _Args&&... __args)
│ │ │ -
1257 { return _M_h.emplace_hint(__pos, std::forward<_Args>(__args)...); }
│ │ │ -
│ │ │ -
1258
│ │ │ -
1259 ///@{
│ │ │ -
1260 /**
│ │ │ -
1261 * @brief Inserts an element into the %unordered_multiset.
│ │ │ -
1262 * @param __x Element to be inserted.
│ │ │ -
1263 * @return An iterator that points to the inserted element.
│ │ │ -
1264 *
│ │ │ -
1265 * Insertion requires amortized constant time.
│ │ │ -
1266 */
│ │ │ -
1267 iterator
│ │ │ -
│ │ │ -
1268 insert(const value_type& __x)
│ │ │ -
1269 { return _M_h.insert(__x); }
│ │ │ -
│ │ │ -
1270
│ │ │ -
1271 iterator
│ │ │ -
│ │ │ - │ │ │ -
1273 { return _M_h.insert(std::move(__x)); }
│ │ │ -
│ │ │ -
1274 ///@}
│ │ │ -
1275
│ │ │ -
1276 ///@{
│ │ │ -
1277 /**
│ │ │ -
1278 * @brief Inserts an element into the %unordered_multiset.
│ │ │ -
1279 * @param __hint An iterator that serves as a hint as to where the
│ │ │ -
1280 * element should be inserted.
│ │ │ -
1281 * @param __x Element to be inserted.
│ │ │ -
1282 * @return An iterator that points to the inserted element.
│ │ │ -
1283 *
│ │ │ -
1284 * Note that the first parameter is only a hint and can potentially
│ │ │ -
1285 * improve the performance of the insertion process. A bad hint would
│ │ │ -
1286 * cause no gains in efficiency.
│ │ │ -
1287 *
│ │ │ -
1288 * For more on @a hinting, see:
│ │ │ -
1289 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/associative.html#containers.associative.insert_hints
│ │ │ -
1290 *
│ │ │ -
1291 * Insertion requires amortized constant.
│ │ │ -
1292 */
│ │ │ -
1293 iterator
│ │ │ -
│ │ │ - │ │ │ -
1295 { return _M_h.insert(__hint, __x); }
│ │ │ -
│ │ │ -
1296
│ │ │ -
1297 iterator
│ │ │ -
│ │ │ - │ │ │ -
1299 { return _M_h.insert(__hint, std::move(__x)); }
│ │ │ -
│ │ │ -
1300 ///@}
│ │ │ -
1301
│ │ │ -
1302 /**
│ │ │ -
1303 * @brief A template function that inserts a range of elements.
│ │ │ -
1304 * @param __first Iterator pointing to the start of the range to be
│ │ │ -
1305 * inserted.
│ │ │ -
1306 * @param __last Iterator pointing to the end of the range.
│ │ │ -
1307 *
│ │ │ -
1308 * Complexity similar to that of the range constructor.
│ │ │ -
1309 */
│ │ │ -
1310 template<typename _InputIterator>
│ │ │ -
1311 void
│ │ │ -
│ │ │ -
1312 insert(_InputIterator __first, _InputIterator __last)
│ │ │ -
1313 { _M_h.insert(__first, __last); }
│ │ │ -
│ │ │ -
1314
│ │ │ -
1315 /**
│ │ │ -
1316 * @brief Inserts a list of elements into the %unordered_multiset.
│ │ │ -
1317 * @param __l A std::initializer_list<value_type> of elements to be
│ │ │ -
1318 * inserted.
│ │ │ -
1319 *
│ │ │ -
1320 * Complexity similar to that of the range constructor.
│ │ │ -
1321 */
│ │ │ -
1322 void
│ │ │ -
│ │ │ - │ │ │ -
1324 { _M_h.insert(__l); }
│ │ │ -
│ │ │ -
1325
│ │ │ -
1326#if __cplusplus > 201402L
│ │ │ -
1327 /// Extract a node.
│ │ │ -
1328 node_type
│ │ │ -
│ │ │ - │ │ │ -
1330 {
│ │ │ -
1331 __glibcxx_assert(__pos != end());
│ │ │ -
1332 return _M_h.extract(__pos);
│ │ │ -
1333 }
│ │ │ -
│ │ │ -
1334
│ │ │ -
1335 /// Extract a node.
│ │ │ -
1336 node_type
│ │ │ -
│ │ │ -
1337 extract(const key_type& __key)
│ │ │ -
1338 { return _M_h.extract(__key); }
│ │ │ -
│ │ │ -
1339
│ │ │ -
1340 /// Re-insert an extracted node.
│ │ │ -
1341 iterator
│ │ │ -
│ │ │ -
1342 insert(node_type&& __nh)
│ │ │ -
1343 { return _M_h._M_reinsert_node_multi(cend(), std::move(__nh)); }
│ │ │ -
│ │ │ -
1344
│ │ │ -
1345 /// Re-insert an extracted node.
│ │ │ -
1346 iterator
│ │ │ -
│ │ │ -
1347 insert(const_iterator __hint, node_type&& __nh)
│ │ │ -
1348 { return _M_h._M_reinsert_node_multi(__hint, std::move(__nh)); }
│ │ │ -
│ │ │ -
1349#endif // C++17
│ │ │ -
1350
│ │ │ -
1351 ///@{
│ │ │ -
1352 /**
│ │ │ -
1353 * @brief Erases an element from an %unordered_multiset.
│ │ │ -
1354 * @param __position An iterator pointing to the element to be erased.
│ │ │ -
1355 * @return An iterator pointing to the element immediately following
│ │ │ -
1356 * @a __position prior to the element being erased. If no such
│ │ │ -
1357 * element exists, end() is returned.
│ │ │ -
1358 *
│ │ │ -
1359 * This function erases an element, pointed to by the given iterator,
│ │ │ -
1360 * from an %unordered_multiset.
│ │ │ -
1361 *
│ │ │ -
1362 * Note that this function only erases the element, and that if the
│ │ │ -
1363 * element is itself a pointer, the pointed-to memory is not touched in
│ │ │ -
1364 * any way. Managing the pointer is the user's responsibility.
│ │ │ -
1365 */
│ │ │ -
1366 iterator
│ │ │ -
│ │ │ - │ │ │ -
1368 { return _M_h.erase(__position); }
│ │ │ -
│ │ │ -
1369
│ │ │ -
1370 // LWG 2059.
│ │ │ -
1371 iterator
│ │ │ -
│ │ │ -
1372 erase(iterator __position)
│ │ │ -
1373 { return _M_h.erase(__position); }
│ │ │ -
│ │ │ -
1374 ///@}
│ │ │ -
1375
│ │ │ -
1376
│ │ │ -
1377 /**
│ │ │ -
1378 * @brief Erases elements according to the provided key.
│ │ │ -
1379 * @param __x Key of element to be erased.
│ │ │ -
1380 * @return The number of elements erased.
│ │ │ -
1381 *
│ │ │ -
1382 * This function erases all the elements located by the given key from
│ │ │ -
1383 * an %unordered_multiset.
│ │ │ -
1384 *
│ │ │ -
1385 * Note that this function only erases the element, and that if the
│ │ │ -
1386 * element is itself a pointer, the pointed-to memory is not touched in
│ │ │ -
1387 * any way. Managing the pointer is the user's responsibility.
│ │ │ -
1388 */
│ │ │ -
1389 size_type
│ │ │ -
│ │ │ -
1390 erase(const key_type& __x)
│ │ │ -
1391 { return _M_h.erase(__x); }
│ │ │ -
│ │ │ -
1392
│ │ │ -
1393 /**
│ │ │ -
1394 * @brief Erases a [__first,__last) range of elements from an
│ │ │ -
1395 * %unordered_multiset.
│ │ │ -
1396 * @param __first Iterator pointing to the start of the range to be
│ │ │ -
1397 * erased.
│ │ │ -
1398 * @param __last Iterator pointing to the end of the range to
│ │ │ -
1399 * be erased.
│ │ │ -
1400 * @return The iterator @a __last.
│ │ │ -
1401 *
│ │ │ -
1402 * This function erases a sequence of elements from an
│ │ │ -
1403 * %unordered_multiset.
│ │ │ -
1404 *
│ │ │ -
1405 * Note that this function only erases the element, and that if
│ │ │ -
1406 * the element is itself a pointer, the pointed-to memory is not touched
│ │ │ -
1407 * in any way. Managing the pointer is the user's responsibility.
│ │ │ -
1408 */
│ │ │ -
1409 iterator
│ │ │ -
│ │ │ - │ │ │ -
1411 { return _M_h.erase(__first, __last); }
│ │ │ -
│ │ │ -
1412
│ │ │ -
1413 /**
│ │ │ -
1414 * Erases all elements in an %unordered_multiset.
│ │ │ -
1415 *
│ │ │ -
1416 * Note that this function only erases the elements, and that if the
│ │ │ -
1417 * elements themselves are pointers, the pointed-to memory is not touched
│ │ │ -
1418 * in any way. Managing the pointer is the user's responsibility.
│ │ │ -
1419 */
│ │ │ -
1420 void
│ │ │ -
│ │ │ -
1421 clear() noexcept
│ │ │ -
1422 { _M_h.clear(); }
│ │ │ -
│ │ │ -
1423
│ │ │ -
1424 /**
│ │ │ -
1425 * @brief Swaps data with another %unordered_multiset.
│ │ │ -
1426 * @param __x An %unordered_multiset of the same element and allocator
│ │ │ -
1427 * types.
│ │ │ -
1428 *
│ │ │ -
1429 * This exchanges the elements between two sets in constant time.
│ │ │ -
1430 * Note that the global std::swap() function is specialized such that
│ │ │ -
1431 * std::swap(s1,s2) will feed to this function.
│ │ │ -
1432 */
│ │ │ -
1433 void
│ │ │ -
│ │ │ - │ │ │ -
1435 noexcept( noexcept(_M_h.swap(__x._M_h)) )
│ │ │ -
1436 { _M_h.swap(__x._M_h); }
│ │ │ -
│ │ │ -
1437
│ │ │ -
1438#if __cplusplus > 201402L
│ │ │ -
1439 template<typename, typename, typename>
│ │ │ -
1440 friend class std::_Hash_merge_helper;
│ │ │ -
1441
│ │ │ -
1442 template<typename _H2, typename _P2>
│ │ │ -
1443 void
│ │ │ - │ │ │ -
1445 {
│ │ │ -
1446 using _Merge_helper
│ │ │ -
1447 = _Hash_merge_helper<unordered_multiset, _H2, _P2>;
│ │ │ -
1448 _M_h._M_merge_multi(_Merge_helper::_S_get_table(__source));
│ │ │ -
1449 }
│ │ │ -
1450
│ │ │ -
1451 template<typename _H2, typename _P2>
│ │ │ -
1452 void
│ │ │ -
1453 merge(unordered_multiset<_Value, _H2, _P2, _Alloc>&& __source)
│ │ │ -
1454 { merge(__source); }
│ │ │ -
1455
│ │ │ -
1456 template<typename _H2, typename _P2>
│ │ │ -
1457 void
│ │ │ -
1458 merge(unordered_set<_Value, _H2, _P2, _Alloc>& __source)
│ │ │ -
1459 {
│ │ │ -
1460 using _Merge_helper
│ │ │ -
1461 = _Hash_merge_helper<unordered_multiset, _H2, _P2>;
│ │ │ -
1462 _M_h._M_merge_multi(_Merge_helper::_S_get_table(__source));
│ │ │ -
1463 }
│ │ │ -
1464
│ │ │ -
1465 template<typename _H2, typename _P2>
│ │ │ -
1466 void
│ │ │ -
1467 merge(unordered_set<_Value, _H2, _P2, _Alloc>&& __source)
│ │ │ -
1468 { merge(__source); }
│ │ │ -
1469#endif // C++17
│ │ │ -
1470
│ │ │ -
1471 // observers.
│ │ │ -
1472
│ │ │ -
1473 /// Returns the hash functor object with which the %unordered_multiset
│ │ │ -
1474 /// was constructed.
│ │ │ -
1475 hasher
│ │ │ -
│ │ │ - │ │ │ -
1477 { return _M_h.hash_function(); }
│ │ │ -
│ │ │ -
1478
│ │ │ -
1479 /// Returns the key comparison object with which the %unordered_multiset
│ │ │ -
1480 /// was constructed.
│ │ │ -
1481 key_equal
│ │ │ -
│ │ │ -
1482 key_eq() const
│ │ │ -
1483 { return _M_h.key_eq(); }
│ │ │ -
│ │ │ -
1484
│ │ │ -
1485 // lookup.
│ │ │ -
1486
│ │ │ -
1487 ///@{
│ │ │ -
1488 /**
│ │ │ -
1489 * @brief Tries to locate an element in an %unordered_multiset.
│ │ │ -
1490 * @param __x Element to be located.
│ │ │ -
1491 * @return Iterator pointing to sought-after element, or end() if not
│ │ │ -
1492 * found.
│ │ │ -
1493 *
│ │ │ -
1494 * This function takes a key and tries to locate the element with which
│ │ │ -
1495 * the key matches. If successful the function returns an iterator
│ │ │ -
1496 * pointing to the sought after element. If unsuccessful it returns the
│ │ │ -
1497 * past-the-end ( @c end() ) iterator.
│ │ │ -
1498 */
│ │ │ -
1499 iterator
│ │ │ -
│ │ │ -
1500 find(const key_type& __x)
│ │ │ -
1501 { return _M_h.find(__x); }
│ │ │ -
│ │ │ -
1502
│ │ │ -
1503#if __cplusplus > 201703L
│ │ │ -
1504 template<typename _Kt>
│ │ │ -
1505 auto
│ │ │ -
1506 find(const _Kt& __x)
│ │ │ -
1507 -> decltype(_M_h._M_find_tr(__x))
│ │ │ -
1508 { return _M_h._M_find_tr(__x); }
│ │ │ -
1509#endif
│ │ │ -
1510
│ │ │ -
1511 const_iterator
│ │ │ -
│ │ │ -
1512 find(const key_type& __x) const
│ │ │ -
1513 { return _M_h.find(__x); }
│ │ │ -
│ │ │ -
1514
│ │ │ -
1515#if __cplusplus > 201703L
│ │ │ -
1516 template<typename _Kt>
│ │ │ -
1517 auto
│ │ │ -
1518 find(const _Kt& __x) const
│ │ │ -
1519 -> decltype(_M_h._M_find_tr(__x))
│ │ │ -
1520 { return _M_h._M_find_tr(__x); }
│ │ │ -
1521#endif
│ │ │ -
1522 ///@}
│ │ │ -
1523
│ │ │ -
1524 ///@{
│ │ │ -
1525 /**
│ │ │ -
1526 * @brief Finds the number of elements.
│ │ │ -
1527 * @param __x Element to located.
│ │ │ -
1528 * @return Number of elements with specified key.
│ │ │ -
1529 */
│ │ │ -
1530 size_type
│ │ │ -
│ │ │ -
1531 count(const key_type& __x) const
│ │ │ -
1532 { return _M_h.count(__x); }
│ │ │ -
│ │ │ -
1533
│ │ │ -
1534#if __cplusplus > 201703L
│ │ │ -
1535 template<typename _Kt>
│ │ │ -
1536 auto
│ │ │ -
1537 count(const _Kt& __x) const -> decltype(_M_h._M_count_tr(__x))
│ │ │ -
1538 { return _M_h._M_count_tr(__x); }
│ │ │ -
1539#endif
│ │ │ -
1540 ///@}
│ │ │ -
1541
│ │ │ -
1542#if __cplusplus > 201703L
│ │ │ -
1543 ///@{
│ │ │ -
1544 /**
│ │ │ -
1545 * @brief Finds whether an element with the given key exists.
│ │ │ -
1546 * @param __x Key of elements to be located.
│ │ │ -
1547 * @return True if there is any element with the specified key.
│ │ │ -
1548 */
│ │ │ -
1549 bool
│ │ │ -
1550 contains(const key_type& __x) const
│ │ │ -
1551 { return _M_h.find(__x) != _M_h.end(); }
│ │ │ -
1552
│ │ │ -
1553 template<typename _Kt>
│ │ │ -
1554 auto
│ │ │ -
1555 contains(const _Kt& __x) const
│ │ │ -
1556 -> decltype(_M_h._M_find_tr(__x), void(), true)
│ │ │ -
1557 { return _M_h._M_find_tr(__x) != _M_h.end(); }
│ │ │ -
1558 ///@}
│ │ │ -
1559#endif
│ │ │ -
1560
│ │ │ -
1561 ///@{
│ │ │ -
1562 /**
│ │ │ -
1563 * @brief Finds a subsequence matching given key.
│ │ │ -
1564 * @param __x Key to be located.
│ │ │ -
1565 * @return Pair of iterators that possibly points to the subsequence
│ │ │ -
1566 * matching given key.
│ │ │ -
1567 */
│ │ │ -
1568 std::pair<iterator, iterator>
│ │ │ -
│ │ │ - │ │ │ -
1570 { return _M_h.equal_range(__x); }
│ │ │ -
│ │ │ -
1571
│ │ │ -
1572#if __cplusplus > 201703L
│ │ │ -
1573 template<typename _Kt>
│ │ │ -
1574 auto
│ │ │ -
1575 equal_range(const _Kt& __x)
│ │ │ -
1576 -> decltype(_M_h._M_equal_range_tr(__x))
│ │ │ -
1577 { return _M_h._M_equal_range_tr(__x); }
│ │ │ -
1578#endif
│ │ │ -
1579
│ │ │ - │ │ │ -
│ │ │ -
1581 equal_range(const key_type& __x) const
│ │ │ -
1582 { return _M_h.equal_range(__x); }
│ │ │ -
│ │ │ -
1583
│ │ │ -
1584#if __cplusplus > 201703L
│ │ │ -
1585 template<typename _Kt>
│ │ │ -
1586 auto
│ │ │ -
1587 equal_range(const _Kt& __x) const
│ │ │ -
1588 -> decltype(_M_h._M_equal_range_tr(__x))
│ │ │ -
1589 { return _M_h._M_equal_range_tr(__x); }
│ │ │ -
1590#endif
│ │ │ -
1591 ///@}
│ │ │ -
1592
│ │ │ -
1593 // bucket interface.
│ │ │ -
1594
│ │ │ -
1595 /// Returns the number of buckets of the %unordered_multiset.
│ │ │ -
1596 size_type
│ │ │ -
│ │ │ -
1597 bucket_count() const noexcept
│ │ │ -
1598 { return _M_h.bucket_count(); }
│ │ │ -
│ │ │ -
1599
│ │ │ -
1600 /// Returns the maximum number of buckets of the %unordered_multiset.
│ │ │ -
1601 size_type
│ │ │ -
│ │ │ -
1602 max_bucket_count() const noexcept
│ │ │ -
1603 { return _M_h.max_bucket_count(); }
│ │ │ -
│ │ │ -
1604
│ │ │ -
1605 /*
│ │ │ -
1606 * @brief Returns the number of elements in a given bucket.
│ │ │ -
1607 * @param __n A bucket index.
│ │ │ -
1608 * @return The number of elements in the bucket.
│ │ │ -
1609 */
│ │ │ -
1610 size_type
│ │ │ -
1611 bucket_size(size_type __n) const
│ │ │ -
1612 { return _M_h.bucket_size(__n); }
│ │ │ -
1613
│ │ │ -
1614 /*
│ │ │ -
1615 * @brief Returns the bucket index of a given element.
│ │ │ -
1616 * @param __key A key instance.
│ │ │ -
1617 * @return The key bucket index.
│ │ │ -
1618 */
│ │ │ -
1619 size_type
│ │ │ -
1620 bucket(const key_type& __key) const
│ │ │ -
1621 { return _M_h.bucket(__key); }
│ │ │ -
1622
│ │ │ -
1623 ///@{
│ │ │ -
1624 /**
│ │ │ -
1625 * @brief Returns a read-only (constant) iterator pointing to the first
│ │ │ -
1626 * bucket element.
│ │ │ -
1627 * @param __n The bucket index.
│ │ │ -
1628 * @return A read-only local iterator.
│ │ │ -
1629 */
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
1632 { return _M_h.begin(__n); }
│ │ │ -
│ │ │ -
1633
│ │ │ - │ │ │ -
│ │ │ -
1635 begin(size_type __n) const
│ │ │ -
1636 { return _M_h.begin(__n); }
│ │ │ -
│ │ │ -
1637
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
1640 { return _M_h.cbegin(__n); }
│ │ │ -
│ │ │ -
1641 ///@}
│ │ │ -
1642
│ │ │ -
1643 ///@{
│ │ │ -
1644 /**
│ │ │ -
1645 * @brief Returns a read-only (constant) iterator pointing to one past
│ │ │ -
1646 * the last bucket elements.
│ │ │ -
1647 * @param __n The bucket index.
│ │ │ -
1648 * @return A read-only local iterator.
│ │ │ -
1649 */
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
1652 { return _M_h.end(__n); }
│ │ │ -
│ │ │ -
1653
│ │ │ - │ │ │ -
│ │ │ -
1655 end(size_type __n) const
│ │ │ -
1656 { return _M_h.end(__n); }
│ │ │ -
│ │ │ -
1657
│ │ │ - │ │ │ -
│ │ │ -
1659 cend(size_type __n) const
│ │ │ -
1660 { return _M_h.cend(__n); }
│ │ │ -
│ │ │ -
1661 ///@}
│ │ │ -
1662
│ │ │ -
1663 // hash policy.
│ │ │ -
1664
│ │ │ -
1665 /// Returns the average number of elements per bucket.
│ │ │ -
1666 float
│ │ │ -
│ │ │ -
1667 load_factor() const noexcept
│ │ │ -
1668 { return _M_h.load_factor(); }
│ │ │ -
│ │ │ -
1669
│ │ │ -
1670 /// Returns a positive number that the %unordered_multiset tries to keep the
│ │ │ -
1671 /// load factor less than or equal to.
│ │ │ -
1672 float
│ │ │ -
│ │ │ -
1673 max_load_factor() const noexcept
│ │ │ -
1674 { return _M_h.max_load_factor(); }
│ │ │ -
│ │ │ -
1675
│ │ │ -
1676 /**
│ │ │ -
1677 * @brief Change the %unordered_multiset maximum load factor.
│ │ │ -
1678 * @param __z The new maximum load factor.
│ │ │ -
1679 */
│ │ │ -
1680 void
│ │ │ -
│ │ │ - │ │ │ -
1682 { _M_h.max_load_factor(__z); }
│ │ │ -
│ │ │ -
1683
│ │ │ -
1684 /**
│ │ │ -
1685 * @brief May rehash the %unordered_multiset.
│ │ │ -
1686 * @param __n The new number of buckets.
│ │ │ -
1687 *
│ │ │ -
1688 * Rehash will occur only if the new number of buckets respect the
│ │ │ -
1689 * %unordered_multiset maximum load factor.
│ │ │ -
1690 */
│ │ │ -
1691 void
│ │ │ -
│ │ │ - │ │ │ -
1693 { _M_h.rehash(__n); }
│ │ │ -
│ │ │ -
1694
│ │ │ -
1695 /**
│ │ │ -
1696 * @brief Prepare the %unordered_multiset for a specified number of
│ │ │ -
1697 * elements.
│ │ │ -
1698 * @param __n Number of elements required.
│ │ │ -
1699 *
│ │ │ -
1700 * Same as rehash(ceil(n / max_load_factor())).
│ │ │ -
1701 */
│ │ │ -
1702 void
│ │ │ -
│ │ │ - │ │ │ -
1704 { _M_h.reserve(__n); }
│ │ │ -
│ │ │ -
1705
│ │ │ -
1706 template<typename _Value1, typename _Hash1, typename _Pred1,
│ │ │ -
1707 typename _Alloc1>
│ │ │ -
1708 friend bool
│ │ │ - │ │ │ - │ │ │ -
1711 };
│ │ │ -
│ │ │ -
1712
│ │ │ -
1713
│ │ │ -
1714#if __cpp_deduction_guides >= 201606
│ │ │ -
1715
│ │ │ -
1716 template<typename _InputIterator,
│ │ │ -
1717 typename _Hash =
│ │ │ -
1718 hash<typename iterator_traits<_InputIterator>::value_type>,
│ │ │ -
1719 typename _Pred =
│ │ │ -
1720 equal_to<typename iterator_traits<_InputIterator>::value_type>,
│ │ │ -
1721 typename _Allocator =
│ │ │ -
1722 allocator<typename iterator_traits<_InputIterator>::value_type>,
│ │ │ -
1723 typename = _RequireInputIter<_InputIterator>,
│ │ │ -
1724 typename = _RequireNotAllocatorOrIntegral<_Hash>,
│ │ │ -
1725 typename = _RequireNotAllocator<_Pred>,
│ │ │ -
1726 typename = _RequireAllocator<_Allocator>>
│ │ │ -
1727 unordered_multiset(_InputIterator, _InputIterator,
│ │ │ -
1728 unordered_multiset<int>::size_type = {},
│ │ │ -
1729 _Hash = _Hash(), _Pred = _Pred(),
│ │ │ -
1730 _Allocator = _Allocator())
│ │ │ - │ │ │ -
1732 _Hash, _Pred, _Allocator>;
│ │ │ -
1733
│ │ │ -
1734 template<typename _Tp, typename _Hash = hash<_Tp>,
│ │ │ -
1735 typename _Pred = equal_to<_Tp>,
│ │ │ -
1736 typename _Allocator = allocator<_Tp>,
│ │ │ -
1737 typename = _RequireNotAllocatorOrIntegral<_Hash>,
│ │ │ -
1738 typename = _RequireNotAllocator<_Pred>,
│ │ │ -
1739 typename = _RequireAllocator<_Allocator>>
│ │ │ - │ │ │ - │ │ │ -
1742 _Hash = _Hash(), _Pred = _Pred(),
│ │ │ -
1743 _Allocator = _Allocator())
│ │ │ - │ │ │ -
1745
│ │ │ -
1746 template<typename _InputIterator, typename _Allocator,
│ │ │ -
1747 typename = _RequireInputIter<_InputIterator>,
│ │ │ -
1748 typename = _RequireAllocator<_Allocator>>
│ │ │ -
1749 unordered_multiset(_InputIterator, _InputIterator,
│ │ │ - │ │ │ - │ │ │ -
1752 hash<typename
│ │ │ - │ │ │ -
1754 equal_to<typename
│ │ │ - │ │ │ -
1756 _Allocator>;
│ │ │ -
1757
│ │ │ -
1758 template<typename _InputIterator, typename _Hash, typename _Allocator,
│ │ │ -
1759 typename = _RequireInputIter<_InputIterator>,
│ │ │ -
1760 typename = _RequireNotAllocatorOrIntegral<_Hash>,
│ │ │ -
1761 typename = _RequireAllocator<_Allocator>>
│ │ │ -
1762 unordered_multiset(_InputIterator, _InputIterator,
│ │ │ - │ │ │ -
1764 _Hash, _Allocator)
│ │ │ -
1765 -> unordered_multiset<typename
│ │ │ - │ │ │ -
1767 _Hash,
│ │ │ -
1768 equal_to<
│ │ │ -
1769 typename
│ │ │ - │ │ │ -
1771 _Allocator>;
│ │ │ -
1772
│ │ │ -
1773 template<typename _Tp, typename _Allocator,
│ │ │ -
1774 typename = _RequireAllocator<_Allocator>>
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
1778
│ │ │ -
1779 template<typename _Tp, typename _Hash, typename _Allocator,
│ │ │ -
1780 typename = _RequireNotAllocatorOrIntegral<_Hash>,
│ │ │ -
1781 typename = _RequireAllocator<_Allocator>>
│ │ │ - │ │ │ -
1783 unordered_multiset<int>::size_type, _Hash, _Allocator)
│ │ │ - │ │ │ -
1785
│ │ │ -
1786#endif
│ │ │ -
1787
│ │ │ -
1788 template<class _Value, class _Hash, class _Pred, class _Alloc>
│ │ │ -
1789 inline void
│ │ │ - │ │ │ - │ │ │ -
1792 noexcept(noexcept(__x.swap(__y)))
│ │ │ -
1793 { __x.swap(__y); }
│ │ │ -
1794
│ │ │ -
1795 template<class _Value, class _Hash, class _Pred, class _Alloc>
│ │ │ -
1796 inline void
│ │ │ - │ │ │ - │ │ │ -
1799 noexcept(noexcept(__x.swap(__y)))
│ │ │ -
1800 { __x.swap(__y); }
│ │ │ -
1801
│ │ │ -
1802 template<class _Value, class _Hash, class _Pred, class _Alloc>
│ │ │ -
1803 inline bool
│ │ │ -
1804 operator==(const unordered_set<_Value, _Hash, _Pred, _Alloc>& __x,
│ │ │ - │ │ │ -
1806 { return __x._M_h._M_equal(__y._M_h); }
│ │ │ -
1807
│ │ │ -
1808#if __cpp_impl_three_way_comparison < 201907L
│ │ │ -
1809 template<class _Value, class _Hash, class _Pred, class _Alloc>
│ │ │ -
1810 inline bool
│ │ │ -
1811 operator!=(const unordered_set<_Value, _Hash, _Pred, _Alloc>& __x,
│ │ │ - │ │ │ -
1813 { return !(__x == __y); }
│ │ │ -
1814#endif
│ │ │ -
1815
│ │ │ -
1816 template<class _Value, class _Hash, class _Pred, class _Alloc>
│ │ │ -
1817 inline bool
│ │ │ - │ │ │ - │ │ │ -
1820 { return __x._M_h._M_equal(__y._M_h); }
│ │ │ -
1821
│ │ │ -
1822#if __cpp_impl_three_way_comparison < 201907L
│ │ │ -
1823 template<class _Value, class _Hash, class _Pred, class _Alloc>
│ │ │ -
1824 inline bool
│ │ │ - │ │ │ - │ │ │ -
1827 { return !(__x == __y); }
│ │ │ -
1828#endif
│ │ │ -
1829
│ │ │ -
1830_GLIBCXX_END_NAMESPACE_CONTAINER
│ │ │ -
1831
│ │ │ -
1832#if __cplusplus > 201402L
│ │ │ -
1833 // Allow std::unordered_set access to internals of compatible sets.
│ │ │ -
1834 template<typename _Val, typename _Hash1, typename _Eq1, typename _Alloc,
│ │ │ -
1835 typename _Hash2, typename _Eq2>
│ │ │ -
1836 struct _Hash_merge_helper<
│ │ │ -
1837 _GLIBCXX_STD_C::unordered_set<_Val, _Hash1, _Eq1, _Alloc>, _Hash2, _Eq2>
│ │ │ -
1838 {
│ │ │ -
1839 private:
│ │ │ -
1840 template<typename... _Tp>
│ │ │ -
1841 using unordered_set = _GLIBCXX_STD_C::unordered_set<_Tp...>;
│ │ │ -
1842 template<typename... _Tp>
│ │ │ -
1843 using unordered_multiset = _GLIBCXX_STD_C::unordered_multiset<_Tp...>;
│ │ │ -
1844
│ │ │ -
1845 friend unordered_set<_Val, _Hash1, _Eq1, _Alloc>;
│ │ │ -
1846
│ │ │ -
1847 static auto&
│ │ │ -
1848 _S_get_table(unordered_set<_Val, _Hash2, _Eq2, _Alloc>& __set)
│ │ │ -
1849 { return __set._M_h; }
│ │ │ -
1850
│ │ │ -
1851 static auto&
│ │ │ -
1852 _S_get_table(unordered_multiset<_Val, _Hash2, _Eq2, _Alloc>& __set)
│ │ │ -
1853 { return __set._M_h; }
│ │ │ -
1854 };
│ │ │ -
1855
│ │ │ -
1856 // Allow std::unordered_multiset access to internals of compatible sets.
│ │ │ -
1857 template<typename _Val, typename _Hash1, typename _Eq1, typename _Alloc,
│ │ │ -
1858 typename _Hash2, typename _Eq2>
│ │ │ -
1859 struct _Hash_merge_helper<
│ │ │ -
1860 _GLIBCXX_STD_C::unordered_multiset<_Val, _Hash1, _Eq1, _Alloc>,
│ │ │ -
1861 _Hash2, _Eq2>
│ │ │ -
1862 {
│ │ │ -
1863 private:
│ │ │ -
1864 template<typename... _Tp>
│ │ │ -
1865 using unordered_set = _GLIBCXX_STD_C::unordered_set<_Tp...>;
│ │ │ -
1866 template<typename... _Tp>
│ │ │ -
1867 using unordered_multiset = _GLIBCXX_STD_C::unordered_multiset<_Tp...>;
│ │ │ -
1868
│ │ │ -
1869 friend unordered_multiset<_Val, _Hash1, _Eq1, _Alloc>;
│ │ │ -
1870
│ │ │ -
1871 static auto&
│ │ │ -
1872 _S_get_table(unordered_set<_Val, _Hash2, _Eq2, _Alloc>& __set)
│ │ │ -
1873 { return __set._M_h; }
│ │ │ -
1874
│ │ │ -
1875 static auto&
│ │ │ -
1876 _S_get_table(unordered_multiset<_Val, _Hash2, _Eq2, _Alloc>& __set)
│ │ │ -
1877 { return __set._M_h; }
│ │ │ -
1878 };
│ │ │ -
1879#endif // C++17
│ │ │ -
1880
│ │ │ -
1881_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ -
1882} // namespace std
│ │ │ -
1883
│ │ │ -
1884#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:428
│ │ │ -
constexpr _Tp && forward(typename std::remove_reference< _Tp >::type &__t) noexcept
Forward an lvalue.
Definition move.h:77
│ │ │ +
102 // EINVAL, EAGAIN, EBUSY, EINVAL, EDEADLK(may)
│ │ │ +
103 if (__e)
│ │ │ +
104 __throw_system_error(__e);
│ │ │ +
105 }
│ │ │ +
106
│ │ │ +
107 bool
│ │ │ +
108 try_lock() noexcept
│ │ │ +
109 {
│ │ │ +
110 // XXX EINVAL, EAGAIN, EBUSY
│ │ │ +
111 return !__gthread_mutex_trylock(&_M_mutex);
│ │ │ +
112 }
│ │ │ +
113
│ │ │ +
114 void
│ │ │ +
115 unlock()
│ │ │ +
116 {
│ │ │ +
117 // XXX EINVAL, EAGAIN, EPERM
│ │ │ +
118 __gthread_mutex_unlock(&_M_mutex);
│ │ │ +
119 }
│ │ │ +
120
│ │ │ +
121 native_handle_type
│ │ │ +
122 native_handle() noexcept
│ │ │ +
123 { return &_M_mutex; }
│ │ │ +
124 };
│ │ │ +
│ │ │ +
125
│ │ │ +
126 // Implementation details for std::condition_variable
│ │ │ +
127 class __condvar
│ │ │ +
128 {
│ │ │ +
129 using timespec = __gthread_time_t;
│ │ │ +
130
│ │ │ +
131 public:
│ │ │ +
132 __condvar() noexcept
│ │ │ +
133 {
│ │ │ +
134#ifndef __GTHREAD_COND_INIT
│ │ │ +
135 __GTHREAD_COND_INIT_FUNCTION(&_M_cond);
│ │ │ +
136#endif
│ │ │ +
137 }
│ │ │ +
138
│ │ │ +
139 ~__condvar()
│ │ │ +
140 {
│ │ │ +
141 int __e __attribute__((__unused__)) = __gthread_cond_destroy(&_M_cond);
│ │ │ +
142 __glibcxx_assert(__e != EBUSY); // threads are still blocked
│ │ │ +
143 }
│ │ │ +
144
│ │ │ +
145 __condvar(const __condvar&) = delete;
│ │ │ +
146 __condvar& operator=(const __condvar&) = delete;
│ │ │ +
147
│ │ │ +
148 __gthread_cond_t* native_handle() noexcept { return &_M_cond; }
│ │ │ +
149
│ │ │ +
150 // Expects: Calling thread has locked __m.
│ │ │ +
151 void
│ │ │ +
152 wait(mutex& __m) noexcept
│ │ │ +
153 {
│ │ │ +
154 int __e __attribute__((__unused__))
│ │ │ +
155 = __gthread_cond_wait(&_M_cond, __m.native_handle());
│ │ │ +
156 __glibcxx_assert(__e == 0);
│ │ │ +
157 }
│ │ │ +
158
│ │ │ +
159 void
│ │ │ +
160 wait_until(mutex& __m, timespec& __abs_time) noexcept
│ │ │ +
161 {
│ │ │ +
162 __gthread_cond_timedwait(&_M_cond, __m.native_handle(), &__abs_time);
│ │ │ +
163 }
│ │ │ +
164
│ │ │ +
165#ifdef _GLIBCXX_USE_PTHREAD_COND_CLOCKWAIT
│ │ │ +
166 void
│ │ │ +
167 wait_until(mutex& __m, clockid_t __clock, timespec& __abs_time) noexcept
│ │ │ +
168 {
│ │ │ +
169 pthread_cond_clockwait(&_M_cond, __m.native_handle(), __clock,
│ │ │ +
170 &__abs_time);
│ │ │ +
171 }
│ │ │ +
172#endif
│ │ │ +
173
│ │ │ +
174 void
│ │ │ +
175 notify_one() noexcept
│ │ │ +
176 {
│ │ │ +
177 int __e __attribute__((__unused__)) = __gthread_cond_signal(&_M_cond);
│ │ │ +
178 __glibcxx_assert(__e == 0);
│ │ │ +
179 }
│ │ │ +
180
│ │ │ +
181 void
│ │ │ +
182 notify_all() noexcept
│ │ │ +
183 {
│ │ │ +
184 int __e __attribute__((__unused__)) = __gthread_cond_broadcast(&_M_cond);
│ │ │ +
185 __glibcxx_assert(__e == 0);
│ │ │ +
186 }
│ │ │ +
187
│ │ │ +
188 protected:
│ │ │ +
189#ifdef __GTHREAD_COND_INIT
│ │ │ +
190 __gthread_cond_t _M_cond = __GTHREAD_COND_INIT;
│ │ │ +
191#else
│ │ │ +
192 __gthread_cond_t _M_cond;
│ │ │ +
193#endif
│ │ │ +
194 };
│ │ │ +
195
│ │ │ +
196#endif // _GLIBCXX_HAS_GTHREADS
│ │ │ +
197
│ │ │ +
198 /// Do not acquire ownership of the mutex.
│ │ │ +
199 struct defer_lock_t { explicit defer_lock_t() = default; };
│ │ │ +
200
│ │ │ +
201 /// Try to acquire ownership of the mutex without blocking.
│ │ │ +
202 struct try_to_lock_t { explicit try_to_lock_t() = default; };
│ │ │ +
203
│ │ │ +
204 /// Assume the calling thread has already obtained mutex ownership
│ │ │ +
205 /// and manage it.
│ │ │ +
206 struct adopt_lock_t { explicit adopt_lock_t() = default; };
│ │ │ +
207
│ │ │ +
208 /// Tag used to prevent a scoped lock from acquiring ownership of a mutex.
│ │ │ +
209 _GLIBCXX17_INLINE constexpr defer_lock_t defer_lock { };
│ │ │ +
210
│ │ │ +
211 /// Tag used to prevent a scoped lock from blocking if a mutex is locked.
│ │ │ +
212 _GLIBCXX17_INLINE constexpr try_to_lock_t try_to_lock { };
│ │ │ +
213
│ │ │ +
214 /// Tag used to make a scoped lock take ownership of a locked mutex.
│ │ │ +
215 _GLIBCXX17_INLINE constexpr adopt_lock_t adopt_lock { };
│ │ │ +
216
│ │ │ +
217 /** @brief A simple scoped lock type.
│ │ │ +
218 *
│ │ │ +
219 * A lock_guard controls mutex ownership within a scope, releasing
│ │ │ +
220 * ownership in the destructor.
│ │ │ +
221 */
│ │ │ +
222 template<typename _Mutex>
│ │ │ +
│ │ │ +
223 class lock_guard
│ │ │ +
224 {
│ │ │ +
225 public:
│ │ │ +
226 typedef _Mutex mutex_type;
│ │ │ +
227
│ │ │ +
228 explicit lock_guard(mutex_type& __m) : _M_device(__m)
│ │ │ +
229 { _M_device.lock(); }
│ │ │ +
230
│ │ │ +
231 lock_guard(mutex_type& __m, adopt_lock_t) noexcept : _M_device(__m)
│ │ │ +
232 { } // calling thread owns mutex
│ │ │ +
233
│ │ │ +
234 ~lock_guard()
│ │ │ +
235 { _M_device.unlock(); }
│ │ │ +
236
│ │ │ +
237 lock_guard(const lock_guard&) = delete;
│ │ │ +
238 lock_guard& operator=(const lock_guard&) = delete;
│ │ │ +
239
│ │ │ +
240 private:
│ │ │ +
241 mutex_type& _M_device;
│ │ │ +
242 };
│ │ │ +
│ │ │ +
243
│ │ │ +
244 /// @} group mutexes
│ │ │ +
245_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ +
246} // namespace
│ │ │ +
247#endif // C++11
│ │ │ +
248#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:212
│ │ │ +
constexpr adopt_lock_t adopt_lock
Tag used to make a scoped lock take ownership of a locked mutex.
Definition std_mutex.h:215
│ │ │ +
constexpr defer_lock_t defer_lock
Tag used to prevent a scoped lock from acquiring ownership of a mutex.
Definition std_mutex.h:209
│ │ │
ISO C++ entities toplevel namespace is std.
│ │ │ -
__detail::_Hashtable_traits< _Cache, true, false > __umset_traits
Base types for unordered_multiset.
│ │ │ -
__detail::_Hashtable_traits< _Cache, true, true > __uset_traits
Base types for unordered_set.
│ │ │ -
initializer_list
│ │ │ -
Primary class template hash.
│ │ │ - │ │ │ -
The standard allocator, as per C++03 [20.4.1].
Definition allocator.h:125
│ │ │ -
Traits class for iterators.
│ │ │ -
One of the comparison functors.
│ │ │ -
Common iterator class.
│ │ │ -
Struct holding two objects of arbitrary type.
Definition stl_pair.h:213
│ │ │ -
A standard container composed of equivalent keys (possibly containing multiple of each key value) in ...
│ │ │ -
iterator begin() noexcept
│ │ │ -
iterator insert(const_iterator __hint, const value_type &__x)
Inserts an element into the unordered_multiset.
│ │ │ - │ │ │ -
void insert(initializer_list< value_type > __l)
Inserts a list of elements into the unordered_multiset.
│ │ │ - │ │ │ -
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
│ │ │ - │ │ │ -
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.
│ │ │ - │ │ │ -
unordered_multiset(const allocator_type &__a)
Creates an unordered_multiset with no elements.
│ │ │ - │ │ │ -
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.
│ │ │ - │ │ │ -
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.
│ │ │ - │ │ │ - │ │ │ -
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.
│ │ │ -
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.
│ │ │ - │ │ │ -
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.
│ │ │ - │ │ │ -
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.
│ │ │ - │ │ │ -
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.
│ │ │ - │ │ │ -
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.
│ │ │ - │ │ │ -
local_iterator end(size_type __n)
Returns a read-only (constant) iterator pointing to one past the last bucket elements.
│ │ │ -
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.
│ │ │ - │ │ │ -
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.
│ │ │ - │ │ │ -
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.
│ │ │ - │ │ │ -
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.
│ │ │ - │ │ │ -
const_local_iterator end(size_type __n) const
Returns a read-only (constant) iterator pointing to one past the last bucket elements.
│ │ │ - │ │ │ -
const_iterator cend() const noexcept
│ │ │ -
const_iterator find(const key_type &__x) const
Tries to locate an element in an unordered_set.
│ │ │ - │ │ │ -
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.
│ │ │ -
const_local_iterator cbegin(size_type __n) const
Returns a read-only (constant) iterator pointing to the first bucket element.
│ │ │ -
const_iterator begin() const noexcept
│ │ │ - │ │ │ - │ │ │ -
insert_return_type insert(node_type &&__nh)
Re-insert an extracted node.
│ │ │ - │ │ │ -
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.
│ │ │ - │ │ │ -
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.
│ │ │ - │ │ │ -
size_type size() const noexcept
Returns the size of the unordered_set.
│ │ │ -
iterator insert(const_iterator, node_type &&__nh)
Re-insert an extracted node.
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
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.
│ │ │ -
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.
│ │ │ - │ │ │ -
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.
│ │ │ -
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.
│ │ │ - │ │ │ -
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.
│ │ │ - │ │ │ -
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.
│ │ │ +
Do not acquire ownership of the mutex.
Definition std_mutex.h:199
│ │ │ +
Try to acquire ownership of the mutex without blocking.
Definition std_mutex.h:202
│ │ │ +
Assume the calling thread has already obtained mutex ownership and manage it.
Definition std_mutex.h:206
│ │ │
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,13 +1,13 @@ │ │ │ │ libstdc++ │ │ │ │ -unordered_set.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_set implementation -*- C++ -*- │ │ │ │ +1// std::mutex implementation -*- C++ -*- │ │ │ │ 2 │ │ │ │ -3// Copyright (C) 2010-2021 Free Software Foundation, Inc. │ │ │ │ +3// Copyright (C) 2003-2021 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,2511 +21,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// . │ │ │ │ 24 │ │ │ │ -25/** @file bits/unordered_set.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_set} │ │ │ │ +27 * Do not attempt to use it directly. @headername{mutex} │ │ │ │ 28 */ │ │ │ │ 29 │ │ │ │ -30#ifndef _UNORDERED_SET_H │ │ │ │ -31#define _UNORDERED_SET_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_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 _Pred = _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 _Tr = _____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 __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 │ │ │ │ -_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 _Pred = _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 _Tr = _____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 __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#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#ifdef _GLIBCXX_HAS_GTHREADS │ │ │ │ +56 // Common base class for std::mutex and std::timed_mutex │ │ │ │ +57 class __mutex_base │ │ │ │ +58 { │ │ │ │ +59 protected: │ │ │ │ +60 typedef __gthread_mutex_t __native_type; │ │ │ │ +61 │ │ │ │ +62#ifdef __GTHREAD_MUTEX_INIT │ │ │ │ +63 __native_type _M_mutex = __GTHREAD_MUTEX_INIT; │ │ │ │ +64 │ │ │ │ +65 constexpr __mutex_base() noexcept = default; │ │ │ │ +66#else │ │ │ │ +67 __native_type _M_mutex; │ │ │ │ 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 * │ │ │ │ -79 * @tparam _Value Type of key objects. │ │ │ │ -80 * @tparam _Hash Hashing function object type, defaults to hash<_Value>. │ │ │ │ +69 __mutex_base() noexcept │ │ │ │ +70 { │ │ │ │ +71 // XXX EAGAIN, ENOMEM, EPERM, EBUSY(may), EINVAL(may) │ │ │ │ +72 __GTHREAD_MUTEX_INIT_FUNCTION(&_M_mutex); │ │ │ │ +73 } │ │ │ │ +74 │ │ │ │ +75 ~__mutex_base() noexcept { __gthread_mutex_destroy(&_M_mutex); } │ │ │ │ +76#endif │ │ │ │ +77 │ │ │ │ +78 __mutex_base(const __mutex_base&) = delete; │ │ │ │ +79 __mutex_base& operator=(const __mutex_base&) = delete; │ │ │ │ +80 }; │ │ │ │ 81 │ │ │ │ -82 * @tparam _Pred Predicate function object type, defaults to │ │ │ │ -83 * equal_to<_Value>. │ │ │ │ -84 * │ │ │ │ -85 * @tparam _Alloc Allocator type, defaults to allocator<_Key>. │ │ │ │ -86 * │ │ │ │ -87 * Meets the requirements of a container, and │ │ │ │ -88 * unordered associative container │ │ │ │ -89 * │ │ │ │ -90 * Base is _Hashtable, dispatched at compile time via template │ │ │ │ -91 * alias __uset_hashtable. │ │ │ │ -92 */ │ │ │ │ -93 template, │ │ │ │ -95 typename _Pred = _e_q_u_a_l___t_o_<___V_a_l_u_e_>, │ │ │ │ -96 typename _Alloc = _a_l_l_o_c_a_t_o_r_<___V_a_l_u_e_>> │ │ │ │ -_9_7 class _u_n_o_r_d_e_r_e_d___s_e_t │ │ │ │ -98 { │ │ │ │ -99 typedef __uset_hashtable<_Value, _Hash, _Pred, _Alloc> _Hashtable; │ │ │ │ -100 _Hashtable _M_h; │ │ │ │ +82 /// The standard mutex type. │ │ │ │ +_8_3 class mutex : private __mutex_base │ │ │ │ +84 { │ │ │ │ +85 public: │ │ │ │ +86 typedef __native_type* native_handle_type; │ │ │ │ +87 │ │ │ │ +88#ifdef __GTHREAD_MUTEX_INIT │ │ │ │ +89 constexpr │ │ │ │ +90#endif │ │ │ │ +91 mutex() noexcept = default; │ │ │ │ +92 ~mutex() = default; │ │ │ │ +93 │ │ │ │ +94 mutex(const mutex&) = delete; │ │ │ │ +95 mutex& operator=(const mutex&) = delete; │ │ │ │ +96 │ │ │ │ +97 void │ │ │ │ +98 lock() │ │ │ │ +99 { │ │ │ │ +100 int __e = __gthread_mutex_lock(&_M_mutex); │ │ │ │ 101 │ │ │ │ -102 public: │ │ │ │ -103 // typedefs: │ │ │ │ -104 ///@{ │ │ │ │ -105 /// Public typedefs. │ │ │ │ -_1_0_6 typedef typename _Hashtable::key_type _k_e_y___t_y_p_e; │ │ │ │ -_1_0_7 typedef typename _Hashtable::value_type _v_a_l_u_e___t_y_p_e; │ │ │ │ -_1_0_8 typedef typename _Hashtable::hasher _h_a_s_h_e_r; │ │ │ │ -_1_0_9 typedef typename _Hashtable::key_equal _k_e_y___e_q_u_a_l; │ │ │ │ -_1_1_0 typedef typename _Hashtable::allocator_type _a_l_l_o_c_a_t_o_r___t_y_p_e; │ │ │ │ -111 ///@} │ │ │ │ -112 │ │ │ │ -113 ///@{ │ │ │ │ -114 /// Iterator-related typedefs. │ │ │ │ -_1_1_5 typedef typename _Hashtable::pointer _p_o_i_n_t_e_r; │ │ │ │ -_1_1_6 typedef typename _Hashtable::const_pointer _c_o_n_s_t___p_o_i_n_t_e_r; │ │ │ │ -_1_1_7 typedef typename _Hashtable::reference _r_e_f_e_r_e_n_c_e; │ │ │ │ -_1_1_8 typedef typename _Hashtable::const_reference _c_o_n_s_t___r_e_f_e_r_e_n_c_e; │ │ │ │ -_1_1_9 typedef typename _Hashtable::iterator _i_t_e_r_a_t_o_r; │ │ │ │ -_1_2_0 typedef typename _Hashtable::const_iterator _c_o_n_s_t___i_t_e_r_a_t_o_r; │ │ │ │ -_1_2_1 typedef typename _Hashtable::local_iterator _l_o_c_a_l___i_t_e_r_a_t_o_r; │ │ │ │ -_1_2_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; │ │ │ │ -_1_2_3 typedef typename _Hashtable::size_type _s_i_z_e___t_y_p_e; │ │ │ │ -_1_2_4 typedef typename _Hashtable::difference_type _d_i_f_f_e_r_e_n_c_e___t_y_p_e; │ │ │ │ -125 ///@} │ │ │ │ -126 │ │ │ │ -127#if __cplusplus > 201402L │ │ │ │ -128 using node_type = typename _Hashtable::node_type; │ │ │ │ -129 using insert_return_type = typename _Hashtable::insert_return_type; │ │ │ │ -130#endif │ │ │ │ -131 │ │ │ │ -132 // construct/destroy/copy │ │ │ │ -133 │ │ │ │ -134 /// Default constructor. │ │ │ │ -_1_3_5 _u_n_o_r_d_e_r_e_d___s_e_t() = default; │ │ │ │ -136 │ │ │ │ -137 /** │ │ │ │ -138 * @brief Default constructor creates no elements. │ │ │ │ -139 * @param __n Minimal initial number of buckets. │ │ │ │ -140 * @param __hf A hash functor. │ │ │ │ -141 * @param __eql A key equality functor. │ │ │ │ -142 * @param __a An allocator object. │ │ │ │ -143 */ │ │ │ │ -144 explicit │ │ │ │ -_1_4_5 _u_n_o_r_d_e_r_e_d___s_e_t(_s_i_z_e___t_y_p_e __n, │ │ │ │ -146 const _h_a_s_h_e_r& __hf = _h_a_s_h_e_r(), │ │ │ │ -147 const _k_e_y___e_q_u_a_l& __eql = _k_e_y___e_q_u_a_l(), │ │ │ │ -148 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()) │ │ │ │ -149 : _M_h(__n, __hf, __eql, __a) │ │ │ │ -150 { } │ │ │ │ -151 │ │ │ │ -152 /** │ │ │ │ -153 * @brief Builds an %unordered_set from a range. │ │ │ │ -154 * @param __first An input iterator. │ │ │ │ -155 * @param __last An input iterator. │ │ │ │ -156 * @param __n Minimal initial number of buckets. │ │ │ │ -157 * @param __hf A hash functor. │ │ │ │ -158 * @param __eql A key equality functor. │ │ │ │ -159 * @param __a An allocator object. │ │ │ │ -160 * │ │ │ │ -161 * Create an %unordered_set consisting of copies of the elements from │ │ │ │ -162 * [__first,__last). This is linear in N (where N is │ │ │ │ -163 * distance(__first,__last)). │ │ │ │ -164 */ │ │ │ │ -165 template │ │ │ │ -_1_6_6 _u_n_o_r_d_e_r_e_d___s_e_t(_InputIterator __first, _InputIterator __last, │ │ │ │ -167 _s_i_z_e___t_y_p_e __n = 0, │ │ │ │ -168 const _h_a_s_h_e_r& __hf = _h_a_s_h_e_r(), │ │ │ │ -169 const _k_e_y___e_q_u_a_l& __eql = _k_e_y___e_q_u_a_l(), │ │ │ │ -170 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()) │ │ │ │ -171 : _M_h(__first, __last, __n, __hf, __eql, __a) │ │ │ │ -172 { } │ │ │ │ +102 // EINVAL, EAGAIN, EBUSY, EINVAL, EDEADLK(may) │ │ │ │ +103 if (__e) │ │ │ │ +104 __throw_system_error(__e); │ │ │ │ +105 } │ │ │ │ +106 │ │ │ │ +107 bool │ │ │ │ +108 try_lock() noexcept │ │ │ │ +109 { │ │ │ │ +110 // XXX EINVAL, EAGAIN, EBUSY │ │ │ │ +111 return !__gthread_mutex_trylock(&_M_mutex); │ │ │ │ +112 } │ │ │ │ +113 │ │ │ │ +114 void │ │ │ │ +115 unlock() │ │ │ │ +116 { │ │ │ │ +117 // XXX EINVAL, EAGAIN, EPERM │ │ │ │ +118 __gthread_mutex_unlock(&_M_mutex); │ │ │ │ +119 } │ │ │ │ +120 │ │ │ │ +121 native_handle_type │ │ │ │ +122 native_handle() noexcept │ │ │ │ +123 { return &_M_mutex; } │ │ │ │ +124 }; │ │ │ │ +125 │ │ │ │ +126 // Implementation details for std::condition_variable │ │ │ │ +127 class __condvar │ │ │ │ +128 { │ │ │ │ +129 using timespec = __gthread_time_t; │ │ │ │ +130 │ │ │ │ +131 public: │ │ │ │ +132 __condvar() noexcept │ │ │ │ +133 { │ │ │ │ +134#ifndef __GTHREAD_COND_INIT │ │ │ │ +135 __GTHREAD_COND_INIT_FUNCTION(&_M_cond); │ │ │ │ +136#endif │ │ │ │ +137 } │ │ │ │ +138 │ │ │ │ +139 ~__condvar() │ │ │ │ +140 { │ │ │ │ +141 int __e __attribute__((__unused__)) = __gthread_cond_destroy(&_M_cond); │ │ │ │ +142 __glibcxx_assert(__e != EBUSY); // threads are still blocked │ │ │ │ +143 } │ │ │ │ +144 │ │ │ │ +145 __condvar(const __condvar&) = delete; │ │ │ │ +146 __condvar& operator=(const __condvar&) = delete; │ │ │ │ +147 │ │ │ │ +148 __gthread_cond_t* native_handle() noexcept { return &_M_cond; } │ │ │ │ +149 │ │ │ │ +150 // Expects: Calling thread has locked __m. │ │ │ │ +151 void │ │ │ │ +152 wait(mutex& __m) noexcept │ │ │ │ +153 { │ │ │ │ +154 int __e __attribute__((__unused__)) │ │ │ │ +155 = __gthread_cond_wait(&_M_cond, __m.native_handle()); │ │ │ │ +156 __glibcxx_assert(__e == 0); │ │ │ │ +157 } │ │ │ │ +158 │ │ │ │ +159 void │ │ │ │ +160 wait_until(mutex& __m, timespec& __abs_time) noexcept │ │ │ │ +161 { │ │ │ │ +162 __gthread_cond_timedwait(&_M_cond, __m.native_handle(), &__abs_time); │ │ │ │ +163 } │ │ │ │ +164 │ │ │ │ +165#ifdef _GLIBCXX_USE_PTHREAD_COND_CLOCKWAIT │ │ │ │ +166 void │ │ │ │ +167 wait_until(mutex& __m, clockid_t __clock, timespec& __abs_time) noexcept │ │ │ │ +168 { │ │ │ │ +169 pthread_cond_clockwait(&_M_cond, __m.native_handle(), __clock, │ │ │ │ +170 &__abs_time); │ │ │ │ +171 } │ │ │ │ +172#endif │ │ │ │ 173 │ │ │ │ -174 /// Copy constructor. │ │ │ │ -_1_7_5 _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; │ │ │ │ -176 │ │ │ │ -177 /// Move constructor. │ │ │ │ -_1_7_8 _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; │ │ │ │ -179 │ │ │ │ -180 /** │ │ │ │ -181 * @brief Creates an %unordered_set with no elements. │ │ │ │ -182 * @param __a An allocator object. │ │ │ │ -183 */ │ │ │ │ -184 explicit │ │ │ │ -_1_8_5 _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) │ │ │ │ -186 : _M_h(__a) │ │ │ │ -187 { } │ │ │ │ -188 │ │ │ │ -189 /* │ │ │ │ -190 * @brief Copy constructor with allocator argument. │ │ │ │ -191 * @param __uset Input %unordered_set to copy. │ │ │ │ -192 * @param __a An allocator object. │ │ │ │ -193 */ │ │ │ │ -194 _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& __uset, │ │ │ │ -195 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -196 : _M_h(__uset._M_h, __a) │ │ │ │ -197 { } │ │ │ │ -198 │ │ │ │ -199 /* │ │ │ │ -200 * @brief Move constructor with allocator argument. │ │ │ │ -201 * @param __uset Input %unordered_set to move. │ │ │ │ -202 * @param __a An allocator object. │ │ │ │ -203 */ │ │ │ │ -204 _u_n_o_r_d_e_r_e_d___s_e_t(unordered_set&& __uset, │ │ │ │ -205 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -206 noexcept( noexcept(_Hashtable(_s_t_d_:_:_m_o_v_e(__uset._M_h), __a)) ) │ │ │ │ -207 : _M_h(_s_t_d::_m_o_v_e(__uset._M_h), __a) │ │ │ │ -208 { } │ │ │ │ -209 │ │ │ │ -210 /** │ │ │ │ -211 * @brief Builds an %unordered_set from an initializer_list. │ │ │ │ -212 * @param __l An initializer_list. │ │ │ │ -213 * @param __n Minimal initial number of buckets. │ │ │ │ -214 * @param __hf A hash functor. │ │ │ │ -215 * @param __eql A key equality functor. │ │ │ │ -216 * @param __a An allocator object. │ │ │ │ -217 * │ │ │ │ -218 * Create an %unordered_set consisting of copies of the elements in the │ │ │ │ -219 * list. This is linear in N (where N is @a __l.size()). │ │ │ │ -220 */ │ │ │ │ -_2_2_1 _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, │ │ │ │ -222 _s_i_z_e___t_y_p_e __n = 0, │ │ │ │ -223 const _h_a_s_h_e_r& __hf = _h_a_s_h_e_r(), │ │ │ │ -224 const _k_e_y___e_q_u_a_l& __eql = _k_e_y___e_q_u_a_l(), │ │ │ │ -225 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()) │ │ │ │ -226 : _M_h(__l, __n, __hf, __eql, __a) │ │ │ │ -227 { } │ │ │ │ -228 │ │ │ │ -229 _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) │ │ │ │ -230 : _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) │ │ │ │ -231 { } │ │ │ │ -232 │ │ │ │ -233 _u_n_o_r_d_e_r_e_d___s_e_t(size_type __n, const _h_a_s_h_e_r& __hf, │ │ │ │ -234 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -235 : unordered_set(__n, __hf, _k_e_y___e_q_u_a_l(), __a) │ │ │ │ -236 { } │ │ │ │ -237 │ │ │ │ -238 template │ │ │ │ -239 _u_n_o_r_d_e_r_e_d___s_e_t(_InputIterator __first, _InputIterator __last, │ │ │ │ -240 _s_i_z_e___t_y_p_e __n, │ │ │ │ -241 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -242 : _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) │ │ │ │ -243 { } │ │ │ │ -244 │ │ │ │ -245 template │ │ │ │ -246 _u_n_o_r_d_e_r_e_d___s_e_t(_InputIterator __first, _InputIterator __last, │ │ │ │ -247 _s_i_z_e___t_y_p_e __n, const _h_a_s_h_e_r& __hf, │ │ │ │ -248 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -249 : _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) │ │ │ │ -250 { } │ │ │ │ -251 │ │ │ │ -252 _u_n_o_r_d_e_r_e_d___s_e_t(initializer_list __l, │ │ │ │ -253 _s_i_z_e___t_y_p_e __n, │ │ │ │ -254 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -255 : _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) │ │ │ │ -256 { } │ │ │ │ -257 │ │ │ │ -258 _u_n_o_r_d_e_r_e_d___s_e_t(initializer_list __l, │ │ │ │ -259 _s_i_z_e___t_y_p_e __n, const _h_a_s_h_e_r& __hf, │ │ │ │ -260 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -261 : _u_n_o_r_d_e_r_e_d___s_e_t(__l, __n, __hf, _k_e_y___e_q_u_a_l(), __a) │ │ │ │ -262 { } │ │ │ │ -263 │ │ │ │ -264 /// Copy assignment operator. │ │ │ │ -265 _u_n_o_r_d_e_r_e_d___s_e_t& │ │ │ │ -_2_6_6 _o_p_e_r_a_t_o_r_=(const _u_n_o_r_d_e_r_e_d___s_e_t&) = default; │ │ │ │ -267 │ │ │ │ -268 /// Move assignment operator. │ │ │ │ -269 _u_n_o_r_d_e_r_e_d___s_e_t& │ │ │ │ -_2_7_0 _o_p_e_r_a_t_o_r_=(_u_n_o_r_d_e_r_e_d___s_e_t&&) = default; │ │ │ │ -271 │ │ │ │ -272 /** │ │ │ │ -273 * @brief %Unordered_set list assignment operator. │ │ │ │ -274 * @param __l An initializer_list. │ │ │ │ -275 * │ │ │ │ -276 * This function fills an %unordered_set with copies of the elements in │ │ │ │ -277 * the initializer list @a __l. │ │ │ │ -278 * │ │ │ │ -279 * Note that the assignment completely changes the %unordered_set and │ │ │ │ -280 * that the resulting %unordered_set's size is the same as the number │ │ │ │ -281 * of elements assigned. │ │ │ │ -282 */ │ │ │ │ -283 _u_n_o_r_d_e_r_e_d___s_e_t& │ │ │ │ -_2_8_4 _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) │ │ │ │ -285 { │ │ │ │ -286 _M_h = __l; │ │ │ │ -287 return *this; │ │ │ │ -288 } │ │ │ │ -289 │ │ │ │ -290 /// Returns the allocator object used by the %unordered_set. │ │ │ │ -291 _a_l_l_o_c_a_t_o_r___t_y_p_e │ │ │ │ -_2_9_2 _g_e_t___a_l_l_o_c_a_t_o_r() const noexcept │ │ │ │ -293 { return _M_h.get_allocator(); } │ │ │ │ -294 │ │ │ │ -295 // size and capacity: │ │ │ │ -296 │ │ │ │ -297 /// Returns true if the %unordered_set is empty. │ │ │ │ -298 _GLIBCXX_NODISCARD bool │ │ │ │ -_2_9_9 _e_m_p_t_y() const noexcept │ │ │ │ -300 { return _M_h.empty(); } │ │ │ │ -301 │ │ │ │ -302 /// Returns the size of the %unordered_set. │ │ │ │ -303 _s_i_z_e___t_y_p_e │ │ │ │ -_3_0_4 _s_i_z_e() const noexcept │ │ │ │ -305 { return _M_h.size(); } │ │ │ │ -306 │ │ │ │ -307 /// Returns the maximum size of the %unordered_set. │ │ │ │ -308 _s_i_z_e___t_y_p_e │ │ │ │ -_3_0_9 _m_a_x___s_i_z_e() const noexcept │ │ │ │ -310 { return _M_h.max_size(); } │ │ │ │ -311 │ │ │ │ -312 // iterators. │ │ │ │ -313 │ │ │ │ -314 ///@{ │ │ │ │ -315 /** │ │ │ │ -316 * Returns a read-only (constant) iterator that points to the first │ │ │ │ -317 * element in the %unordered_set. │ │ │ │ -318 */ │ │ │ │ -319 _i_t_e_r_a_t_o_r │ │ │ │ -_3_2_0 _b_e_g_i_n() noexcept │ │ │ │ -321 { return _M_h.begin(); } │ │ │ │ -322 │ │ │ │ -323 const_iterator │ │ │ │ -_3_2_4 _b_e_g_i_n() const noexcept │ │ │ │ -325 { return _M_h.begin(); } │ │ │ │ -326 ///@} │ │ │ │ -327 │ │ │ │ -328 ///@{ │ │ │ │ -329 /** │ │ │ │ -330 * Returns a read-only (constant) iterator that points one past the last │ │ │ │ -331 * element in the %unordered_set. │ │ │ │ -332 */ │ │ │ │ -333 _i_t_e_r_a_t_o_r │ │ │ │ -_3_3_4 _e_n_d() noexcept │ │ │ │ -335 { return _M_h.end(); } │ │ │ │ -336 │ │ │ │ -337 const_iterator │ │ │ │ -_3_3_8 _e_n_d() const noexcept │ │ │ │ -339 { return _M_h.end(); } │ │ │ │ -340 ///@} │ │ │ │ -341 │ │ │ │ -342 /** │ │ │ │ -343 * Returns a read-only (constant) iterator that points to the first │ │ │ │ -344 * element in the %unordered_set. │ │ │ │ -345 */ │ │ │ │ -346 const_iterator │ │ │ │ -_3_4_7 _c_b_e_g_i_n() const noexcept │ │ │ │ -348 { return _M_h.begin(); } │ │ │ │ -349 │ │ │ │ -350 /** │ │ │ │ -351 * Returns a read-only (constant) iterator that points one past the last │ │ │ │ -352 * element in the %unordered_set. │ │ │ │ -353 */ │ │ │ │ -354 const_iterator │ │ │ │ -_3_5_5 _c_e_n_d() const noexcept │ │ │ │ -356 { return _M_h.end(); } │ │ │ │ -357 │ │ │ │ -358 // modifiers. │ │ │ │ -359 │ │ │ │ -360 /** │ │ │ │ -361 * @brief Attempts to build and insert an element into the │ │ │ │ -362 * %unordered_set. │ │ │ │ -363 * @param __args Arguments used to generate an element. │ │ │ │ -364 * @return A pair, of which the first element is an iterator that points │ │ │ │ -365 * to the possibly inserted element, and the second is a bool │ │ │ │ -366 * that is true if the element was actually inserted. │ │ │ │ -367 * │ │ │ │ -368 * This function attempts to build and insert an element into the │ │ │ │ -369 * %unordered_set. An %unordered_set relies on unique keys and thus an │ │ │ │ -370 * element is only inserted if it is not already present in the │ │ │ │ -371 * %unordered_set. │ │ │ │ -372 * │ │ │ │ -373 * Insertion requires amortized constant time. │ │ │ │ -374 */ │ │ │ │ -375 template │ │ │ │ -376 _s_t_d_:_:_p_a_i_r_<_i_t_e_r_a_t_o_r_,_ _b_o_o_l_> │ │ │ │ -_3_7_7 _e_m_p_l_a_c_e(_Args&&... __args) │ │ │ │ -378 { return _M_h.emplace(_s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(__args)...); } │ │ │ │ -379 │ │ │ │ -380 /** │ │ │ │ -381 * @brief Attempts to insert an element into the %unordered_set. │ │ │ │ -382 * @param __pos An iterator that serves as a hint as to where the │ │ │ │ -383 * element should be inserted. │ │ │ │ -384 * @param __args Arguments used to generate the element to be │ │ │ │ -385 * inserted. │ │ │ │ -386 * @return An iterator that points to the element with key equivalent to │ │ │ │ -387 * the one generated from @a __args (may or may not be the │ │ │ │ -388 * element itself). │ │ │ │ -389 * │ │ │ │ -390 * This function is not concerned about whether the insertion took place, │ │ │ │ -391 * and thus does not return a boolean like the single-argument emplace() │ │ │ │ -392 * does. Note that the first parameter is only a hint and can │ │ │ │ -393 * potentially improve the performance of the insertion process. A bad │ │ │ │ -394 * hint would cause no gains in efficiency. │ │ │ │ -395 * │ │ │ │ -396 * For more on @a hinting, see: │ │ │ │ -397 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/ │ │ │ │ -associative.html#containers.associative.insert_hints │ │ │ │ -398 * │ │ │ │ -399 * Insertion requires amortized constant time. │ │ │ │ -400 */ │ │ │ │ -401 template │ │ │ │ -402 _i_t_e_r_a_t_o_r │ │ │ │ -_4_0_3 _e_m_p_l_a_c_e___h_i_n_t(_c_o_n_s_t___i_t_e_r_a_t_o_r __pos, _Args&&... __args) │ │ │ │ -404 { return _M_h.emplace_hint(__pos, _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(__args)...); } │ │ │ │ -405 │ │ │ │ -406 ///@{ │ │ │ │ -407 /** │ │ │ │ -408 * @brief Attempts to insert an element into the %unordered_set. │ │ │ │ -409 * @param __x Element to be inserted. │ │ │ │ -410 * @return A pair, of which the first element is an iterator that points │ │ │ │ -411 * to the possibly inserted element, and the second is a bool │ │ │ │ -412 * that is true if the element was actually inserted. │ │ │ │ -413 * │ │ │ │ -414 * This function attempts to insert an element into the %unordered_set. │ │ │ │ -415 * An %unordered_set relies on unique keys and thus an element is only │ │ │ │ -416 * inserted if it is not already present in the %unordered_set. │ │ │ │ -417 * │ │ │ │ -418 * Insertion requires amortized constant time. │ │ │ │ -419 */ │ │ │ │ -420 _s_t_d_:_:_p_a_i_r_<_i_t_e_r_a_t_o_r_,_ _b_o_o_l_> │ │ │ │ -_4_2_1 _i_n_s_e_r_t(const _v_a_l_u_e___t_y_p_e& __x) │ │ │ │ -422 { return _M_h.insert(__x); } │ │ │ │ -423 │ │ │ │ -424 _s_t_d_:_:_p_a_i_r_<_i_t_e_r_a_t_o_r_,_ _b_o_o_l_> │ │ │ │ -_4_2_5 _i_n_s_e_r_t(_v_a_l_u_e___t_y_p_e&& __x) │ │ │ │ -426 { return _M_h.insert(_s_t_d_:_:_m_o_v_e(__x)); } │ │ │ │ -427 ///@} │ │ │ │ -428 │ │ │ │ -429 ///@{ │ │ │ │ -430 /** │ │ │ │ -431 * @brief Attempts to insert an element into the %unordered_set. │ │ │ │ -432 * @param __hint An iterator that serves as a hint as to where the │ │ │ │ -433 * element should be inserted. │ │ │ │ -434 * @param __x Element to be inserted. │ │ │ │ -435 * @return An iterator that points to the element with key of │ │ │ │ -436 * @a __x (may or may not be the element passed in). │ │ │ │ -437 * │ │ │ │ -438 * This function is not concerned about whether the insertion took place, │ │ │ │ -439 * and thus does not return a boolean like the single-argument insert() │ │ │ │ -440 * does. Note that the first parameter is only a hint and can │ │ │ │ -441 * potentially improve the performance of the insertion process. A bad │ │ │ │ -442 * hint would cause no gains in efficiency. │ │ │ │ -443 * │ │ │ │ -444 * For more on @a hinting, see: │ │ │ │ -445 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/ │ │ │ │ -associative.html#containers.associative.insert_hints │ │ │ │ -446 * │ │ │ │ -447 * Insertion requires amortized constant. │ │ │ │ -448 */ │ │ │ │ -449 _i_t_e_r_a_t_o_r │ │ │ │ -_4_5_0 _i_n_s_e_r_t(_c_o_n_s_t___i_t_e_r_a_t_o_r __hint, const _v_a_l_u_e___t_y_p_e& __x) │ │ │ │ -451 { return _M_h.insert(__hint, __x); } │ │ │ │ -452 │ │ │ │ -453 _i_t_e_r_a_t_o_r │ │ │ │ -_4_5_4 _i_n_s_e_r_t(_c_o_n_s_t___i_t_e_r_a_t_o_r __hint, _v_a_l_u_e___t_y_p_e&& __x) │ │ │ │ -455 { return _M_h.insert(__hint, _s_t_d_:_:_m_o_v_e(__x)); } │ │ │ │ -456 ///@} │ │ │ │ -457 │ │ │ │ -458 /** │ │ │ │ -459 * @brief A template function that attempts to insert a range of │ │ │ │ -460 * elements. │ │ │ │ -461 * @param __first Iterator pointing to the start of the range to be │ │ │ │ -462 * inserted. │ │ │ │ -463 * @param __last Iterator pointing to the end of the range. │ │ │ │ -464 * │ │ │ │ -465 * Complexity similar to that of the range constructor. │ │ │ │ -466 */ │ │ │ │ -467 template │ │ │ │ -468 void │ │ │ │ -_4_6_9 _i_n_s_e_r_t(_InputIterator __first, _InputIterator __last) │ │ │ │ -470 { _M_h.insert(__first, __last); } │ │ │ │ -471 │ │ │ │ -472 /** │ │ │ │ -473 * @brief Attempts to insert a list of elements into the %unordered_set. │ │ │ │ -474 * @param __l A std::initializer_list of elements │ │ │ │ -475 * to be inserted. │ │ │ │ -476 * │ │ │ │ -477 * Complexity similar to that of the range constructor. │ │ │ │ -478 */ │ │ │ │ -479 void │ │ │ │ -_4_8_0 _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) │ │ │ │ -481 { _M_h.insert(__l); } │ │ │ │ -482 │ │ │ │ -483#if __cplusplus > 201402L │ │ │ │ -484 /// Extract a node. │ │ │ │ -485 node_type │ │ │ │ -_4_8_6 _e_x_t_r_a_c_t(_c_o_n_s_t___i_t_e_r_a_t_o_r __pos) │ │ │ │ -487 { │ │ │ │ -488 __glibcxx_assert(__pos != _e_n_d()); │ │ │ │ -489 return _M_h.extract(__pos); │ │ │ │ -490 } │ │ │ │ -491 │ │ │ │ -492 /// Extract a node. │ │ │ │ -493 node_type │ │ │ │ -_4_9_4 _e_x_t_r_a_c_t(const _k_e_y___t_y_p_e& __key) │ │ │ │ -495 { return _M_h.extract(__key); } │ │ │ │ -496 │ │ │ │ -497 /// Re-insert an extracted node. │ │ │ │ -498 insert_return_type │ │ │ │ -_4_9_9 _i_n_s_e_r_t(node_type&& __nh) │ │ │ │ -500 { return _M_h._M_reinsert_node(_s_t_d_:_:_m_o_v_e(__nh)); } │ │ │ │ -501 │ │ │ │ -502 /// Re-insert an extracted node. │ │ │ │ -503 _i_t_e_r_a_t_o_r │ │ │ │ -_5_0_4 _i_n_s_e_r_t(_c_o_n_s_t___i_t_e_r_a_t_o_r, node_type&& __nh) │ │ │ │ -505 { return _M_h._M_reinsert_node(_s_t_d_:_:_m_o_v_e(__nh)).position; } │ │ │ │ -506#endif // C++17 │ │ │ │ -507 │ │ │ │ -508 ///@{ │ │ │ │ -509 /** │ │ │ │ -510 * @brief Erases an element from an %unordered_set. │ │ │ │ -511 * @param __position An iterator pointing to the element to be erased. │ │ │ │ -512 * @return An iterator pointing to the element immediately following │ │ │ │ -513 * @a __position prior to the element being erased. If no such │ │ │ │ -514 * element exists, end() is returned. │ │ │ │ -515 * │ │ │ │ -516 * This function erases an element, pointed to by the given iterator, │ │ │ │ -517 * from an %unordered_set. Note that this function only erases the │ │ │ │ -518 * element, and that if the element is itself a pointer, the pointed-to │ │ │ │ -519 * memory is not touched in any way. Managing the pointer is the user's │ │ │ │ -520 * responsibility. │ │ │ │ -521 */ │ │ │ │ -522 _i_t_e_r_a_t_o_r │ │ │ │ -_5_2_3 _e_r_a_s_e(_c_o_n_s_t___i_t_e_r_a_t_o_r __position) │ │ │ │ -524 { return _M_h.erase(__position); } │ │ │ │ -525 │ │ │ │ -526 // LWG 2059. │ │ │ │ -527 _i_t_e_r_a_t_o_r │ │ │ │ -_5_2_8 _e_r_a_s_e(_i_t_e_r_a_t_o_r __position) │ │ │ │ -529 { return _M_h.erase(__position); } │ │ │ │ -530 ///@} │ │ │ │ -531 │ │ │ │ -532 /** │ │ │ │ -533 * @brief Erases elements according to the provided key. │ │ │ │ -534 * @param __x Key of element to be erased. │ │ │ │ -535 * @return The number of elements erased. │ │ │ │ -536 * │ │ │ │ -537 * This function erases all the elements located by the given key from │ │ │ │ -538 * an %unordered_set. For an %unordered_set the result of this function │ │ │ │ -539 * can only be 0 (not present) or 1 (present). │ │ │ │ -540 * Note that this function only erases the element, and that if │ │ │ │ -541 * the element is itself a pointer, the pointed-to memory is not touched │ │ │ │ -542 * in any way. Managing the pointer is the user's responsibility. │ │ │ │ -543 */ │ │ │ │ -544 _s_i_z_e___t_y_p_e │ │ │ │ -_5_4_5 _e_r_a_s_e(const _k_e_y___t_y_p_e& __x) │ │ │ │ -546 { return _M_h.erase(__x); } │ │ │ │ -547 │ │ │ │ -548 /** │ │ │ │ -549 * @brief Erases a [__first,__last) range of elements from an │ │ │ │ -550 * %unordered_set. │ │ │ │ -551 * @param __first Iterator pointing to the start of the range to be │ │ │ │ -552 * erased. │ │ │ │ -553 * @param __last Iterator pointing to the end of the range to │ │ │ │ -554 * be erased. │ │ │ │ -555 * @return The iterator @a __last. │ │ │ │ -556 * │ │ │ │ -557 * This function erases a sequence of elements from an %unordered_set. │ │ │ │ -558 * Note that this function only erases the element, and that if │ │ │ │ -559 * the element is itself a pointer, the pointed-to memory is not touched │ │ │ │ -560 * in any way. Managing the pointer is the user's responsibility. │ │ │ │ -561 */ │ │ │ │ -562 _i_t_e_r_a_t_o_r │ │ │ │ -_5_6_3 _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) │ │ │ │ -564 { return _M_h.erase(__first, __last); } │ │ │ │ -565 │ │ │ │ -566 /** │ │ │ │ -567 * Erases all elements in an %unordered_set. Note that this function only │ │ │ │ -568 * erases the elements, and that if the elements themselves are pointers, │ │ │ │ -569 * the pointed-to memory is not touched in any way. Managing the pointer │ │ │ │ -570 * is the user's responsibility. │ │ │ │ -571 */ │ │ │ │ -572 void │ │ │ │ -_5_7_3 _c_l_e_a_r() noexcept │ │ │ │ -574 { _M_h.clear(); } │ │ │ │ -575 │ │ │ │ -576 /** │ │ │ │ -577 * @brief Swaps data with another %unordered_set. │ │ │ │ -578 * @param __x An %unordered_set of the same element and allocator │ │ │ │ -579 * types. │ │ │ │ -580 * │ │ │ │ -581 * This exchanges the elements between two sets in constant time. │ │ │ │ -582 * Note that the global std::swap() function is specialized such that │ │ │ │ -583 * std::swap(s1,s2) will feed to this function. │ │ │ │ -584 */ │ │ │ │ -585 void │ │ │ │ -_5_8_6 _s_w_a_p(_u_n_o_r_d_e_r_e_d___s_e_t& __x) │ │ │ │ -587 noexcept( noexcept(_M_h.swap(__x._M_h)) ) │ │ │ │ -588 { _M_h.swap(__x._M_h); } │ │ │ │ -589 │ │ │ │ -590#if __cplusplus > 201402L │ │ │ │ -591 template │ │ │ │ -592 friend class std::_Hash_merge_helper; │ │ │ │ -593 │ │ │ │ -594 template │ │ │ │ -595 void │ │ │ │ -596 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_>& __source) │ │ │ │ -597 { │ │ │ │ -598 using _Merge_helper = _Hash_merge_helper; │ │ │ │ -599 _M_h._M_merge_unique(_Merge_helper::_S_get_table(__source)); │ │ │ │ -600 } │ │ │ │ -601 │ │ │ │ -602 template │ │ │ │ -603 void │ │ │ │ -604 merge(unordered_set<_Value, _H2, _P2, _Alloc>&& __source) │ │ │ │ -605 { merge(__source); } │ │ │ │ -606 │ │ │ │ -607 template │ │ │ │ -608 void │ │ │ │ -609 merge(unordered_multiset<_Value, _H2, _P2, _Alloc>& __source) │ │ │ │ -610 { │ │ │ │ -611 using _Merge_helper = _Hash_merge_helper; │ │ │ │ -612 _M_h._M_merge_unique(_Merge_helper::_S_get_table(__source)); │ │ │ │ -613 } │ │ │ │ -614 │ │ │ │ -615 template │ │ │ │ -616 void │ │ │ │ -617 merge(unordered_multiset<_Value, _H2, _P2, _Alloc>&& __source) │ │ │ │ -618 { merge(__source); } │ │ │ │ -619#endif // C++17 │ │ │ │ -620 │ │ │ │ -621 // observers. │ │ │ │ -622 │ │ │ │ -623 /// Returns the hash functor object with which the %unordered_set was │ │ │ │ -624 /// constructed. │ │ │ │ -625 _h_a_s_h_e_r │ │ │ │ -_6_2_6 _h_a_s_h___f_u_n_c_t_i_o_n() const │ │ │ │ -627 { return _M_h.hash_function(); } │ │ │ │ -628 │ │ │ │ -629 /// Returns the key comparison object with which the %unordered_set was │ │ │ │ -630 /// constructed. │ │ │ │ -631 _k_e_y___e_q_u_a_l │ │ │ │ -_6_3_2 _k_e_y___e_q() const │ │ │ │ -633 { return _M_h.key_eq(); } │ │ │ │ -634 │ │ │ │ -635 // lookup. │ │ │ │ -636 │ │ │ │ -637 ///@{ │ │ │ │ -638 /** │ │ │ │ -639 * @brief Tries to locate an element in an %unordered_set. │ │ │ │ -640 * @param __x Element to be located. │ │ │ │ -641 * @return Iterator pointing to sought-after element, or end() if not │ │ │ │ -642 * found. │ │ │ │ -643 * │ │ │ │ -644 * This function takes a key and tries to locate the element with which │ │ │ │ -645 * the key matches. If successful the function returns an iterator │ │ │ │ -646 * pointing to the sought after element. If unsuccessful it returns the │ │ │ │ -647 * past-the-end ( @c end() ) iterator. │ │ │ │ -648 */ │ │ │ │ -649 _i_t_e_r_a_t_o_r │ │ │ │ -_6_5_0 _f_i_n_d(const _k_e_y___t_y_p_e& __x) │ │ │ │ -651 { return _M_h.find(__x); } │ │ │ │ -652 │ │ │ │ -653#if __cplusplus > 201703L │ │ │ │ -654 template │ │ │ │ -655 auto │ │ │ │ -656 _f_i_n_d(const _Kt& __k) │ │ │ │ -657 -> decltype(_M_h._M_find_tr(__k)) │ │ │ │ -658 { return _M_h._M_find_tr(__k); } │ │ │ │ -659#endif │ │ │ │ -660 │ │ │ │ -661 const_iterator │ │ │ │ -_6_6_2 _f_i_n_d(const _k_e_y___t_y_p_e& __x) const │ │ │ │ -663 { return _M_h.find(__x); } │ │ │ │ -664 │ │ │ │ -665#if __cplusplus > 201703L │ │ │ │ -666 template │ │ │ │ -667 auto │ │ │ │ -668 _f_i_n_d(const _Kt& __k) const │ │ │ │ -669 -> decltype(_M_h._M_find_tr(__k)) │ │ │ │ -670 { return _M_h._M_find_tr(__k); } │ │ │ │ -671#endif │ │ │ │ -672 ///@} │ │ │ │ -673 │ │ │ │ -674 ///@{ │ │ │ │ -675 /** │ │ │ │ -676 * @brief Finds the number of elements. │ │ │ │ -677 * @param __x Element to located. │ │ │ │ -678 * @return Number of elements with specified key. │ │ │ │ -679 * │ │ │ │ -680 * This function only makes sense for unordered_multisets; for │ │ │ │ -681 * unordered_set the result will either be 0 (not present) or 1 │ │ │ │ -682 * (present). │ │ │ │ -683 */ │ │ │ │ -684 size_type │ │ │ │ -_6_8_5 _c_o_u_n_t(const _k_e_y___t_y_p_e& __x) const │ │ │ │ -686 { return _M_h.count(__x); } │ │ │ │ -687 │ │ │ │ -688#if __cplusplus > 201703L │ │ │ │ -689 template │ │ │ │ -690 auto │ │ │ │ -691 _c_o_u_n_t(const _Kt& __k) const │ │ │ │ -692 -> decltype(_M_h._M_count_tr(__k)) │ │ │ │ -693 { return _M_h._M_count_tr(__k); } │ │ │ │ -694#endif │ │ │ │ -695 ///@} │ │ │ │ -696 │ │ │ │ -697#if __cplusplus > 201703L │ │ │ │ -698 ///@{ │ │ │ │ -699 /** │ │ │ │ -700 * @brief Finds whether an element with the given key exists. │ │ │ │ -701 * @param __x Key of elements to be located. │ │ │ │ -702 * @return True if there is any element with the specified key. │ │ │ │ -703 */ │ │ │ │ -704 bool │ │ │ │ -705 contains(const _k_e_y___t_y_p_e& __x) const │ │ │ │ -706 { return _M_h.find(__x) != _M_h.end(); } │ │ │ │ -707 │ │ │ │ -708 template │ │ │ │ -709 auto │ │ │ │ -710 contains(const _Kt& __k) const │ │ │ │ -711 -> decltype(_M_h._M_find_tr(__k), void(), true) │ │ │ │ -712 { return _M_h._M_find_tr(__k) != _M_h.end(); } │ │ │ │ -713 ///@} │ │ │ │ -714#endif │ │ │ │ -715 │ │ │ │ -716 ///@{ │ │ │ │ -717 /** │ │ │ │ -718 * @brief Finds a subsequence matching given key. │ │ │ │ -719 * @param __x Key to be located. │ │ │ │ -720 * @return Pair of iterators that possibly points to the subsequence │ │ │ │ -721 * matching given key. │ │ │ │ -722 * │ │ │ │ -723 * This function probably only makes sense for multisets. │ │ │ │ -724 */ │ │ │ │ -725 std::pair │ │ │ │ -_7_2_6 _e_q_u_a_l___r_a_n_g_e(const _k_e_y___t_y_p_e& __x) │ │ │ │ -727 { return _M_h.equal_range(__x); } │ │ │ │ -728 │ │ │ │ -729#if __cplusplus > 201703L │ │ │ │ -730 template │ │ │ │ -731 auto │ │ │ │ -732 _e_q_u_a_l___r_a_n_g_e(const _Kt& __k) │ │ │ │ -733 -> decltype(_M_h._M_equal_range_tr(__k)) │ │ │ │ -734 { return _M_h._M_equal_range_tr(__k); } │ │ │ │ -735#endif │ │ │ │ -736 │ │ │ │ -737 _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_3_8 _e_q_u_a_l___r_a_n_g_e(const _k_e_y___t_y_p_e& __x) const │ │ │ │ -739 { return _M_h.equal_range(__x); } │ │ │ │ -740 │ │ │ │ -741#if __cplusplus > 201703L │ │ │ │ -742 template │ │ │ │ -743 auto │ │ │ │ -744 _e_q_u_a_l___r_a_n_g_e(const _Kt& __k) const │ │ │ │ -745 -> decltype(_M_h._M_equal_range_tr(__k)) │ │ │ │ -746 { return _M_h._M_equal_range_tr(__k); } │ │ │ │ -747#endif │ │ │ │ -748 ///@} │ │ │ │ -749 │ │ │ │ -750 // bucket interface. │ │ │ │ -751 │ │ │ │ -752 /// Returns the number of buckets of the %unordered_set. │ │ │ │ -753 size_type │ │ │ │ -_7_5_4 _b_u_c_k_e_t___c_o_u_n_t() const noexcept │ │ │ │ -755 { return _M_h.bucket_count(); } │ │ │ │ -756 │ │ │ │ -757 /// Returns the maximum number of buckets of the %unordered_set. │ │ │ │ -758 _s_i_z_e___t_y_p_e │ │ │ │ -_7_5_9 _m_a_x___b_u_c_k_e_t___c_o_u_n_t() const noexcept │ │ │ │ -760 { return _M_h.max_bucket_count(); } │ │ │ │ -761 │ │ │ │ -762 /* │ │ │ │ -763 * @brief Returns the number of elements in a given bucket. │ │ │ │ -764 * @param __n A bucket index. │ │ │ │ -765 * @return The number of elements in the bucket. │ │ │ │ -766 */ │ │ │ │ -767 _s_i_z_e___t_y_p_e │ │ │ │ -768 bucket_size(_s_i_z_e___t_y_p_e __n) const │ │ │ │ -769 { return _M_h.bucket_size(__n); } │ │ │ │ -770 │ │ │ │ -771 /* │ │ │ │ -772 * @brief Returns the bucket index of a given element. │ │ │ │ -773 * @param __key A key instance. │ │ │ │ -774 * @return The key bucket index. │ │ │ │ -775 */ │ │ │ │ -776 size_type │ │ │ │ -777 bucket(const _k_e_y___t_y_p_e& __key) const │ │ │ │ -778 { return _M_h.bucket(__key); } │ │ │ │ -779 │ │ │ │ -780 ///@{ │ │ │ │ -781 /** │ │ │ │ -782 * @brief Returns a read-only (constant) iterator pointing to the first │ │ │ │ -783 * bucket element. │ │ │ │ -784 * @param __n The bucket index. │ │ │ │ -785 * @return A read-only local iterator. │ │ │ │ -786 */ │ │ │ │ -787 _l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_7_8_8 _b_e_g_i_n(_s_i_z_e___t_y_p_e __n) │ │ │ │ -789 { return _M_h.begin(__n); } │ │ │ │ -790 │ │ │ │ -791 _c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_7_9_2 _b_e_g_i_n(_s_i_z_e___t_y_p_e __n) const │ │ │ │ -793 { return _M_h.begin(__n); } │ │ │ │ -794 │ │ │ │ -795 _c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_7_9_6 _c_b_e_g_i_n(_s_i_z_e___t_y_p_e __n) const │ │ │ │ -797 { return _M_h.cbegin(__n); } │ │ │ │ -798 ///@} │ │ │ │ -799 │ │ │ │ -800 ///@{ │ │ │ │ -801 /** │ │ │ │ -802 * @brief Returns a read-only (constant) iterator pointing to one past │ │ │ │ -803 * the last bucket elements. │ │ │ │ -804 * @param __n The bucket index. │ │ │ │ -805 * @return A read-only local iterator. │ │ │ │ -806 */ │ │ │ │ -807 _l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_8_0_8 _e_n_d(_s_i_z_e___t_y_p_e __n) │ │ │ │ -809 { return _M_h.end(__n); } │ │ │ │ -810 │ │ │ │ -811 _c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_8_1_2 _e_n_d(_s_i_z_e___t_y_p_e __n) const │ │ │ │ -813 { return _M_h.end(__n); } │ │ │ │ -814 │ │ │ │ -815 _c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_8_1_6 _c_e_n_d(_s_i_z_e___t_y_p_e __n) const │ │ │ │ -817 { return _M_h.cend(__n); } │ │ │ │ -818 ///@} │ │ │ │ -819 │ │ │ │ -820 // hash policy. │ │ │ │ -821 │ │ │ │ -822 /// Returns the average number of elements per bucket. │ │ │ │ -823 float │ │ │ │ -_8_2_4 _l_o_a_d___f_a_c_t_o_r() const noexcept │ │ │ │ -825 { return _M_h.load_factor(); } │ │ │ │ -826 │ │ │ │ -827 /// Returns a positive number that the %unordered_set tries to keep the │ │ │ │ -828 /// load factor less than or equal to. │ │ │ │ -829 float │ │ │ │ -_8_3_0 _m_a_x___l_o_a_d___f_a_c_t_o_r() const noexcept │ │ │ │ -831 { return _M_h.max_load_factor(); } │ │ │ │ -832 │ │ │ │ -833 /** │ │ │ │ -834 * @brief Change the %unordered_set maximum load factor. │ │ │ │ -835 * @param __z The new maximum load factor. │ │ │ │ -836 */ │ │ │ │ -837 void │ │ │ │ -_8_3_8 _m_a_x___l_o_a_d___f_a_c_t_o_r(float __z) │ │ │ │ -839 { _M_h.max_load_factor(__z); } │ │ │ │ -840 │ │ │ │ -841 /** │ │ │ │ -842 * @brief May rehash the %unordered_set. │ │ │ │ -843 * @param __n The new number of buckets. │ │ │ │ -844 * │ │ │ │ -845 * Rehash will occur only if the new number of buckets respect the │ │ │ │ -846 * %unordered_set maximum load factor. │ │ │ │ -847 */ │ │ │ │ -848 void │ │ │ │ -_8_4_9 _r_e_h_a_s_h(_s_i_z_e___t_y_p_e __n) │ │ │ │ -850 { _M_h.rehash(__n); } │ │ │ │ -851 │ │ │ │ -852 /** │ │ │ │ -853 * @brief Prepare the %unordered_set for a specified number of │ │ │ │ -854 * elements. │ │ │ │ -855 * @param __n Number of elements required. │ │ │ │ -856 * │ │ │ │ -857 * Same as rehash(ceil(n / max_load_factor())). │ │ │ │ -858 */ │ │ │ │ -859 void │ │ │ │ -_8_6_0 _r_e_s_e_r_v_e(_s_i_z_e___t_y_p_e __n) │ │ │ │ -861 { _M_h.reserve(__n); } │ │ │ │ -862 │ │ │ │ -863 template │ │ │ │ -865 friend bool │ │ │ │ -866 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_>&, │ │ │ │ -867 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_>&); │ │ │ │ -868 }; │ │ │ │ -869 │ │ │ │ -870#if __cpp_deduction_guides >= 201606 │ │ │ │ -871 │ │ │ │ -872 template::value_type>, │ │ │ │ -875 typename _Pred = │ │ │ │ -876 equal_to::value_type>, │ │ │ │ -877 typename _Allocator = │ │ │ │ -878 allocator::value_type>, │ │ │ │ -879 typename = _RequireInputIter<_InputIterator>, │ │ │ │ -880 typename = _RequireNotAllocatorOrIntegral<_Hash>, │ │ │ │ -881 typename = _RequireNotAllocator<_Pred>, │ │ │ │ -882 typename = _RequireAllocator<_Allocator>> │ │ │ │ -883 unordered_set(_InputIterator, _InputIterator, │ │ │ │ -884 unordered_set::size_type = {}, │ │ │ │ -885 _Hash = _Hash(), _Pred = _Pred(), _Allocator = _Allocator()) │ │ │ │ -886 -> _u_n_o_r_d_e_r_e_d___s_e_t_:_:_v_a_l_u_e___t_y_p_e, │ │ │ │ -887 _Hash, _Pred, _Allocator>; │ │ │ │ -888 │ │ │ │ -889 template, │ │ │ │ -890 typename _Pred = equal_to<_Tp>, │ │ │ │ -891 typename _Allocator = allocator<_Tp>, │ │ │ │ -892 typename = _RequireNotAllocatorOrIntegral<_Hash>, │ │ │ │ -893 typename = _RequireNotAllocator<_Pred>, │ │ │ │ -894 typename = _RequireAllocator<_Allocator>> │ │ │ │ -895 _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_<___T_p_>, │ │ │ │ -896 _u_n_o_r_d_e_r_e_d___s_e_t_<_i_n_t_>_:_:_s_i_z_e___t_y_p_e = {}, │ │ │ │ -897 _Hash = _Hash(), _Pred = _Pred(), _Allocator = _Allocator()) │ │ │ │ -898 -> _u_n_o_r_d_e_r_e_d___s_e_t_<___T_p_,_ ___H_a_s_h_,_ ___P_r_e_d_,_ ___A_l_l_o_c_a_t_o_r_>; │ │ │ │ -899 │ │ │ │ -900 template, │ │ │ │ -902 typename = _RequireAllocator<_Allocator>> │ │ │ │ -903 _u_n_o_r_d_e_r_e_d___s_e_t(_InputIterator, _InputIterator, │ │ │ │ -904 _u_n_o_r_d_e_r_e_d___s_e_t_<_i_n_t_>_:_:_s_i_z_e___t_y_p_e, _Allocator) │ │ │ │ -905 -> _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_>_:_:_v_a_l_u_e___t_y_p_e, │ │ │ │ -906 _h_a_s_h< │ │ │ │ -907 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>, │ │ │ │ -908 _e_q_u_a_l___t_o< │ │ │ │ -909 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>, │ │ │ │ -910 _Allocator>; │ │ │ │ -911 │ │ │ │ -912 template, │ │ │ │ -914 typename = _RequireNotAllocatorOrIntegral<_Hash>, │ │ │ │ -915 typename = _RequireAllocator<_Allocator>> │ │ │ │ -916 _u_n_o_r_d_e_r_e_d___s_e_t(_InputIterator, _InputIterator, │ │ │ │ -917 _u_n_o_r_d_e_r_e_d___s_e_t_<_i_n_t_>_:_:_s_i_z_e___t_y_p_e, │ │ │ │ -918 _Hash, _Allocator) │ │ │ │ -919 -> _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_>_:_:_v_a_l_u_e___t_y_p_e, │ │ │ │ -920 _Hash, │ │ │ │ -921 _e_q_u_a_l___t_o< │ │ │ │ -922 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>, │ │ │ │ -923 _Allocator>; │ │ │ │ -924 │ │ │ │ -925 template> │ │ │ │ -927 _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_<___T_p_>, │ │ │ │ -928 _u_n_o_r_d_e_r_e_d___s_e_t_<_i_n_t_>_:_:_s_i_z_e___t_y_p_e, _Allocator) │ │ │ │ -929 -> _u_n_o_r_d_e_r_e_d___s_e_t_<___T_p_,_ _h_a_s_h_<___T_p_>, _e_q_u_a_l___t_o_<___T_p_>, _Allocator>; │ │ │ │ -930 │ │ │ │ -931 template, │ │ │ │ -933 typename = _RequireAllocator<_Allocator>> │ │ │ │ -934 _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_<___T_p_>, │ │ │ │ -935 _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) │ │ │ │ -936 -> _u_n_o_r_d_e_r_e_d___s_e_t_<___T_p_,_ ___H_a_s_h_,_ _e_q_u_a_l___t_o_<___T_p_>, _Allocator>; │ │ │ │ -937 │ │ │ │ -938#endif │ │ │ │ -939 │ │ │ │ -940 /** │ │ │ │ -941 * @brief A standard container composed of equivalent keys │ │ │ │ -942 * (possibly containing multiple of each key value) in which the │ │ │ │ -943 * elements' keys are the elements themselves. │ │ │ │ -944 * │ │ │ │ -945 * @ingroup unordered_associative_containers │ │ │ │ -946 * │ │ │ │ -947 * @tparam _Value Type of key objects. │ │ │ │ -948 * @tparam _Hash Hashing function object type, defaults to hash<_Value>. │ │ │ │ -949 * @tparam _Pred Predicate function object type, defaults │ │ │ │ -950 * to equal_to<_Value>. │ │ │ │ -951 * @tparam _Alloc Allocator type, defaults to allocator<_Key>. │ │ │ │ -952 * │ │ │ │ -953 * Meets the requirements of a container, and │ │ │ │ -954 * unordered associative container │ │ │ │ -955 * │ │ │ │ -956 * Base is _Hashtable, dispatched at compile time via template │ │ │ │ -957 * alias __umset_hashtable. │ │ │ │ -958 */ │ │ │ │ -959 template, │ │ │ │ -961 typename _Pred = _e_q_u_a_l___t_o_<___V_a_l_u_e_>, │ │ │ │ -962 typename _Alloc = _a_l_l_o_c_a_t_o_r_<___V_a_l_u_e_>> │ │ │ │ -_9_6_3 class _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t │ │ │ │ -964 { │ │ │ │ -965 typedef __umset_hashtable<_Value, _Hash, _Pred, _Alloc> _Hashtable; │ │ │ │ -966 _Hashtable _M_h; │ │ │ │ -967 │ │ │ │ -968 public: │ │ │ │ -969 // typedefs: │ │ │ │ -970 ///@{ │ │ │ │ -971 /// Public typedefs. │ │ │ │ -_9_7_2 typedef typename _Hashtable::key_type _k_e_y___t_y_p_e; │ │ │ │ -_9_7_3 typedef typename _Hashtable::value_type _v_a_l_u_e___t_y_p_e; │ │ │ │ -_9_7_4 typedef typename _Hashtable::hasher _h_a_s_h_e_r; │ │ │ │ -_9_7_5 typedef typename _Hashtable::key_equal _k_e_y___e_q_u_a_l; │ │ │ │ -_9_7_6 typedef typename _Hashtable::allocator_type _a_l_l_o_c_a_t_o_r___t_y_p_e; │ │ │ │ -977 ///@} │ │ │ │ -978 │ │ │ │ -979 ///@{ │ │ │ │ -980 /// Iterator-related typedefs. │ │ │ │ -_9_8_1 typedef typename _Hashtable::pointer _p_o_i_n_t_e_r; │ │ │ │ -_9_8_2 typedef typename _Hashtable::const_pointer _c_o_n_s_t___p_o_i_n_t_e_r; │ │ │ │ -_9_8_3 typedef typename _Hashtable::reference _r_e_f_e_r_e_n_c_e; │ │ │ │ -_9_8_4 typedef typename _Hashtable::const_reference _c_o_n_s_t___r_e_f_e_r_e_n_c_e; │ │ │ │ -_9_8_5 typedef typename _Hashtable::iterator _i_t_e_r_a_t_o_r; │ │ │ │ -_9_8_6 typedef typename _Hashtable::const_iterator _c_o_n_s_t___i_t_e_r_a_t_o_r; │ │ │ │ -_9_8_7 typedef typename _Hashtable::local_iterator _l_o_c_a_l___i_t_e_r_a_t_o_r; │ │ │ │ -_9_8_8 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_8_9 typedef typename _Hashtable::size_type _s_i_z_e___t_y_p_e; │ │ │ │ -_9_9_0 typedef typename _Hashtable::difference_type _d_i_f_f_e_r_e_n_c_e___t_y_p_e; │ │ │ │ -991 ///@} │ │ │ │ -992 │ │ │ │ -993#if __cplusplus > 201402L │ │ │ │ -994 using node_type = typename _Hashtable::node_type; │ │ │ │ -995#endif │ │ │ │ -996 │ │ │ │ -997 // construct/destroy/copy │ │ │ │ -998 │ │ │ │ -999 /// Default constructor. │ │ │ │ -_1_0_0_0 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t() = default; │ │ │ │ -1001 │ │ │ │ -1002 /** │ │ │ │ -1003 * @brief Default constructor creates no elements. │ │ │ │ -1004 * @param __n Minimal initial number of buckets. │ │ │ │ -1005 * @param __hf A hash functor. │ │ │ │ -1006 * @param __eql A key equality functor. │ │ │ │ -1007 * @param __a An allocator object. │ │ │ │ -1008 */ │ │ │ │ -1009 explicit │ │ │ │ -_1_0_1_0 _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, │ │ │ │ -1011 const _h_a_s_h_e_r& __hf = _h_a_s_h_e_r(), │ │ │ │ -1012 const _k_e_y___e_q_u_a_l& __eql = _k_e_y___e_q_u_a_l(), │ │ │ │ -1013 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()) │ │ │ │ -1014 : _M_h(__n, __hf, __eql, __a) │ │ │ │ -1015 { } │ │ │ │ -1016 │ │ │ │ -1017 /** │ │ │ │ -1018 * @brief Builds an %unordered_multiset from a range. │ │ │ │ -1019 * @param __first An input iterator. │ │ │ │ -1020 * @param __last An input iterator. │ │ │ │ -1021 * @param __n Minimal initial number of buckets. │ │ │ │ -1022 * @param __hf A hash functor. │ │ │ │ -1023 * @param __eql A key equality functor. │ │ │ │ -1024 * @param __a An allocator object. │ │ │ │ -1025 * │ │ │ │ -1026 * Create an %unordered_multiset consisting of copies of the elements │ │ │ │ -1027 * from [__first,__last). This is linear in N (where N is │ │ │ │ -1028 * distance(__first,__last)). │ │ │ │ -1029 */ │ │ │ │ -1030 template │ │ │ │ -_1_0_3_1 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t(_InputIterator __first, _InputIterator __last, │ │ │ │ -1032 _s_i_z_e___t_y_p_e __n = 0, │ │ │ │ -1033 const _h_a_s_h_e_r& __hf = _h_a_s_h_e_r(), │ │ │ │ -1034 const _k_e_y___e_q_u_a_l& __eql = _k_e_y___e_q_u_a_l(), │ │ │ │ -1035 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()) │ │ │ │ -1036 : _M_h(__first, __last, __n, __hf, __eql, __a) │ │ │ │ -1037 { } │ │ │ │ -1038 │ │ │ │ -1039 /// Copy constructor. │ │ │ │ -_1_0_4_0 _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; │ │ │ │ -1041 │ │ │ │ -1042 /// Move constructor. │ │ │ │ -_1_0_4_3 _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; │ │ │ │ -1044 │ │ │ │ -1045 /** │ │ │ │ -1046 * @brief Builds an %unordered_multiset from an initializer_list. │ │ │ │ -1047 * @param __l An initializer_list. │ │ │ │ -1048 * @param __n Minimal initial number of buckets. │ │ │ │ -1049 * @param __hf A hash functor. │ │ │ │ -1050 * @param __eql A key equality functor. │ │ │ │ -1051 * @param __a An allocator object. │ │ │ │ -1052 * │ │ │ │ -1053 * Create an %unordered_multiset consisting of copies of the elements in │ │ │ │ -1054 * the list. This is linear in N (where N is @a __l.size()). │ │ │ │ -1055 */ │ │ │ │ -_1_0_5_6 _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, │ │ │ │ -1057 _s_i_z_e___t_y_p_e __n = 0, │ │ │ │ -1058 const _h_a_s_h_e_r& __hf = _h_a_s_h_e_r(), │ │ │ │ -1059 const _k_e_y___e_q_u_a_l& __eql = _k_e_y___e_q_u_a_l(), │ │ │ │ -1060 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()) │ │ │ │ -1061 : _M_h(__l, __n, __hf, __eql, __a) │ │ │ │ -1062 { } │ │ │ │ -1063 │ │ │ │ -1064 /// Copy assignment operator. │ │ │ │ -1065 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t& │ │ │ │ -_1_0_6_6 _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; │ │ │ │ -1067 │ │ │ │ -1068 /// Move 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_=(_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t&&) = default; │ │ │ │ -1071 │ │ │ │ -1072 /** │ │ │ │ -1073 * @brief Creates an %unordered_multiset with no elements. │ │ │ │ -1074 * @param __a An allocator object. │ │ │ │ -1075 */ │ │ │ │ -1076 explicit │ │ │ │ -_1_0_7_7 _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) │ │ │ │ -1078 : _M_h(__a) │ │ │ │ -1079 { } │ │ │ │ -1080 │ │ │ │ -1081 /* │ │ │ │ -1082 * @brief Copy constructor with allocator argument. │ │ │ │ -1083 * @param __uset Input %unordered_multiset to copy. │ │ │ │ -1084 * @param __a An allocator object. │ │ │ │ -1085 */ │ │ │ │ -1086 _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& __umset, │ │ │ │ -1087 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -1088 : _M_h(__umset._M_h, __a) │ │ │ │ -1089 { } │ │ │ │ -1090 │ │ │ │ -1091 /* │ │ │ │ -1092 * @brief Move constructor with allocator argument. │ │ │ │ -1093 * @param __umset Input %unordered_multiset to move. │ │ │ │ -1094 * @param __a An allocator object. │ │ │ │ -1095 */ │ │ │ │ -1096 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t(unordered_multiset&& __umset, │ │ │ │ -1097 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -1098 noexcept( noexcept(_Hashtable(_s_t_d_:_:_m_o_v_e(__umset._M_h), __a)) ) │ │ │ │ -1099 : _M_h(_s_t_d::_m_o_v_e(__umset._M_h), __a) │ │ │ │ -1100 { } │ │ │ │ -1101 │ │ │ │ -1102 _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) │ │ │ │ -1103 : _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) │ │ │ │ -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 _h_a_s_h_e_r& __hf, │ │ │ │ -1107 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -1108 : _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) │ │ │ │ -1109 { } │ │ │ │ -1110 │ │ │ │ -1111 template │ │ │ │ -1112 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t(_InputIterator __first, _InputIterator __last, │ │ │ │ -1113 _s_i_z_e___t_y_p_e __n, │ │ │ │ -1114 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -1115 : _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) │ │ │ │ -1116 { } │ │ │ │ -1117 │ │ │ │ -1118 template │ │ │ │ -1119 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t(_InputIterator __first, _InputIterator __last, │ │ │ │ -1120 _s_i_z_e___t_y_p_e __n, const _h_a_s_h_e_r& __hf, │ │ │ │ -1121 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -1122 : _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) │ │ │ │ -1123 { } │ │ │ │ -1124 │ │ │ │ -1125 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t(initializer_list __l, │ │ │ │ -1126 _s_i_z_e___t_y_p_e __n, │ │ │ │ -1127 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -1128 : _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) │ │ │ │ -1129 { } │ │ │ │ -1130 │ │ │ │ -1131 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t(initializer_list __l, │ │ │ │ -1132 _s_i_z_e___t_y_p_e __n, const _h_a_s_h_e_r& __hf, │ │ │ │ -1133 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -1134 : _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) │ │ │ │ -1135 { } │ │ │ │ -1136 │ │ │ │ -1137 /** │ │ │ │ -1138 * @brief %Unordered_multiset list assignment operator. │ │ │ │ -1139 * @param __l An initializer_list. │ │ │ │ -1140 * │ │ │ │ -1141 * This function fills an %unordered_multiset with copies of the elements │ │ │ │ -1142 * in the initializer list @a __l. │ │ │ │ -1143 * │ │ │ │ -1144 * Note that the assignment completely changes the %unordered_multiset │ │ │ │ -1145 * and that the resulting %unordered_multiset's size is the same as the │ │ │ │ -1146 * number of elements assigned. │ │ │ │ -1147 */ │ │ │ │ -1148 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t& │ │ │ │ -_1_1_4_9 _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) │ │ │ │ -1150 { │ │ │ │ -1151 _M_h = __l; │ │ │ │ -1152 return *this; │ │ │ │ -1153 } │ │ │ │ -1154 │ │ │ │ -1155 /// Returns the allocator object used by the %unordered_multiset. │ │ │ │ -1156 _a_l_l_o_c_a_t_o_r___t_y_p_e │ │ │ │ -_1_1_5_7 _g_e_t___a_l_l_o_c_a_t_o_r() const noexcept │ │ │ │ -1158 { return _M_h.get_allocator(); } │ │ │ │ -1159 │ │ │ │ -1160 // size and capacity: │ │ │ │ -1161 │ │ │ │ -1162 /// Returns true if the %unordered_multiset is empty. │ │ │ │ -1163 _GLIBCXX_NODISCARD bool │ │ │ │ -_1_1_6_4 _e_m_p_t_y() const noexcept │ │ │ │ -1165 { return _M_h.empty(); } │ │ │ │ -1166 │ │ │ │ -1167 /// Returns the size of the %unordered_multiset. │ │ │ │ -1168 _s_i_z_e___t_y_p_e │ │ │ │ -_1_1_6_9 _s_i_z_e() const noexcept │ │ │ │ -1170 { return _M_h.size(); } │ │ │ │ -1171 │ │ │ │ -1172 /// Returns the maximum size of the %unordered_multiset. │ │ │ │ -1173 _s_i_z_e___t_y_p_e │ │ │ │ -_1_1_7_4 _m_a_x___s_i_z_e() const noexcept │ │ │ │ -1175 { return _M_h.max_size(); } │ │ │ │ -1176 │ │ │ │ -1177 // iterators. │ │ │ │ -1178 │ │ │ │ -1179 ///@{ │ │ │ │ -1180 /** │ │ │ │ -1181 * Returns a read-only (constant) iterator that points to the first │ │ │ │ -1182 * element in the %unordered_multiset. │ │ │ │ -1183 */ │ │ │ │ -1184 _i_t_e_r_a_t_o_r │ │ │ │ -_1_1_8_5 _b_e_g_i_n() noexcept │ │ │ │ -1186 { return _M_h.begin(); } │ │ │ │ -1187 │ │ │ │ -1188 const_iterator │ │ │ │ -_1_1_8_9 _b_e_g_i_n() const noexcept │ │ │ │ -1190 { return _M_h.begin(); } │ │ │ │ -1191 ///@} │ │ │ │ -1192 │ │ │ │ -1193 ///@{ │ │ │ │ -1194 /** │ │ │ │ -1195 * Returns a read-only (constant) iterator that points one past the last │ │ │ │ -1196 * element in the %unordered_multiset. │ │ │ │ -1197 */ │ │ │ │ -1198 _i_t_e_r_a_t_o_r │ │ │ │ -_1_1_9_9 _e_n_d() noexcept │ │ │ │ -1200 { return _M_h.end(); } │ │ │ │ -1201 │ │ │ │ -1202 const_iterator │ │ │ │ -_1_2_0_3 _e_n_d() const noexcept │ │ │ │ -1204 { return _M_h.end(); } │ │ │ │ -1205 ///@} │ │ │ │ -1206 │ │ │ │ -1207 /** │ │ │ │ -1208 * Returns a read-only (constant) iterator that points to the first │ │ │ │ -1209 * element in the %unordered_multiset. │ │ │ │ -1210 */ │ │ │ │ -1211 const_iterator │ │ │ │ -_1_2_1_2 _c_b_e_g_i_n() const noexcept │ │ │ │ -1213 { return _M_h.begin(); } │ │ │ │ -1214 │ │ │ │ -1215 /** │ │ │ │ -1216 * Returns a read-only (constant) iterator that points one past the last │ │ │ │ -1217 * element in the %unordered_multiset. │ │ │ │ -1218 */ │ │ │ │ -1219 const_iterator │ │ │ │ -_1_2_2_0 _c_e_n_d() const noexcept │ │ │ │ -1221 { return _M_h.end(); } │ │ │ │ -1222 │ │ │ │ -1223 // modifiers. │ │ │ │ -1224 │ │ │ │ -1225 /** │ │ │ │ -1226 * @brief Builds and insert an element into the %unordered_multiset. │ │ │ │ -1227 * @param __args Arguments used to generate an element. │ │ │ │ -1228 * @return An iterator that points to the inserted element. │ │ │ │ -1229 * │ │ │ │ -1230 * Insertion requires amortized constant time. │ │ │ │ -1231 */ │ │ │ │ -1232 template │ │ │ │ -1233 _i_t_e_r_a_t_o_r │ │ │ │ -_1_2_3_4 _e_m_p_l_a_c_e(_Args&&... __args) │ │ │ │ -1235 { return _M_h.emplace(_s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(__args)...); } │ │ │ │ -1236 │ │ │ │ -1237 /** │ │ │ │ -1238 * @brief Inserts an element into the %unordered_multiset. │ │ │ │ -1239 * @param __pos An iterator that serves as a hint as to where the │ │ │ │ -1240 * element should be inserted. │ │ │ │ -1241 * @param __args Arguments used to generate the element to be │ │ │ │ -1242 * inserted. │ │ │ │ -1243 * @return An iterator that points to the inserted element. │ │ │ │ -1244 * │ │ │ │ -1245 * Note that the first parameter is only a hint and can potentially │ │ │ │ -1246 * improve the performance of the insertion process. A bad hint would │ │ │ │ -1247 * cause no gains in efficiency. │ │ │ │ -1248 * │ │ │ │ -1249 * For more on @a hinting, see: │ │ │ │ -1250 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/ │ │ │ │ -associative.html#containers.associative.insert_hints │ │ │ │ -1251 * │ │ │ │ -1252 * Insertion requires amortized constant time. │ │ │ │ -1253 */ │ │ │ │ -1254 template │ │ │ │ -1255 _i_t_e_r_a_t_o_r │ │ │ │ -_1_2_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 __pos, _Args&&... __args) │ │ │ │ -1257 { return _M_h.emplace_hint(__pos, _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(__args)...); } │ │ │ │ -1258 │ │ │ │ -1259 ///@{ │ │ │ │ -1260 /** │ │ │ │ -1261 * @brief Inserts an element into the %unordered_multiset. │ │ │ │ -1262 * @param __x Element to be inserted. │ │ │ │ -1263 * @return An iterator that points to the inserted element. │ │ │ │ -1264 * │ │ │ │ -1265 * Insertion requires amortized constant time. │ │ │ │ -1266 */ │ │ │ │ -1267 _i_t_e_r_a_t_o_r │ │ │ │ -_1_2_6_8 _i_n_s_e_r_t(const _v_a_l_u_e___t_y_p_e& __x) │ │ │ │ -1269 { return _M_h.insert(__x); } │ │ │ │ -1270 │ │ │ │ -1271 _i_t_e_r_a_t_o_r │ │ │ │ -_1_2_7_2 _i_n_s_e_r_t(_v_a_l_u_e___t_y_p_e&& __x) │ │ │ │ -1273 { return _M_h.insert(_s_t_d_:_:_m_o_v_e(__x)); } │ │ │ │ -1274 ///@} │ │ │ │ -1275 │ │ │ │ -1276 ///@{ │ │ │ │ -1277 /** │ │ │ │ -1278 * @brief Inserts an element into the %unordered_multiset. │ │ │ │ -1279 * @param __hint An iterator that serves as a hint as to where the │ │ │ │ -1280 * element should be inserted. │ │ │ │ -1281 * @param __x Element to be inserted. │ │ │ │ -1282 * @return An iterator that points to the inserted element. │ │ │ │ -1283 * │ │ │ │ -1284 * Note that the first parameter is only a hint and can potentially │ │ │ │ -1285 * improve the performance of the insertion process. A bad hint would │ │ │ │ -1286 * cause no gains in efficiency. │ │ │ │ -1287 * │ │ │ │ -1288 * For more on @a hinting, see: │ │ │ │ -1289 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/ │ │ │ │ -associative.html#containers.associative.insert_hints │ │ │ │ -1290 * │ │ │ │ -1291 * Insertion requires amortized constant. │ │ │ │ -1292 */ │ │ │ │ -1293 _i_t_e_r_a_t_o_r │ │ │ │ -_1_2_9_4 _i_n_s_e_r_t(_c_o_n_s_t___i_t_e_r_a_t_o_r __hint, const _v_a_l_u_e___t_y_p_e& __x) │ │ │ │ -1295 { return _M_h.insert(__hint, __x); } │ │ │ │ -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 __hint, _v_a_l_u_e___t_y_p_e&& __x) │ │ │ │ -1299 { return _M_h.insert(__hint, _s_t_d_:_:_m_o_v_e(__x)); } │ │ │ │ -1300 ///@} │ │ │ │ -1301 │ │ │ │ -1302 /** │ │ │ │ -1303 * @brief A template function that inserts a range of elements. │ │ │ │ -1304 * @param __first Iterator pointing to the start of the range to be │ │ │ │ -1305 * inserted. │ │ │ │ -1306 * @param __last Iterator pointing to the end of the range. │ │ │ │ -1307 * │ │ │ │ -1308 * Complexity similar to that of the range constructor. │ │ │ │ -1309 */ │ │ │ │ -1310 template │ │ │ │ -1311 void │ │ │ │ -_1_3_1_2 _i_n_s_e_r_t(_InputIterator __first, _InputIterator __last) │ │ │ │ -1313 { _M_h.insert(__first, __last); } │ │ │ │ -1314 │ │ │ │ -1315 /** │ │ │ │ -1316 * @brief Inserts a list of elements into the %unordered_multiset. │ │ │ │ -1317 * @param __l A std::initializer_list of elements to be │ │ │ │ -1318 * inserted. │ │ │ │ -1319 * │ │ │ │ -1320 * Complexity similar to that of the range constructor. │ │ │ │ -1321 */ │ │ │ │ -1322 void │ │ │ │ -_1_3_2_3 _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) │ │ │ │ -1324 { _M_h.insert(__l); } │ │ │ │ -1325 │ │ │ │ -1326#if __cplusplus > 201402L │ │ │ │ -1327 /// Extract a node. │ │ │ │ -1328 node_type │ │ │ │ -_1_3_2_9 _e_x_t_r_a_c_t(_c_o_n_s_t___i_t_e_r_a_t_o_r __pos) │ │ │ │ -1330 { │ │ │ │ -1331 __glibcxx_assert(__pos != _e_n_d()); │ │ │ │ -1332 return _M_h.extract(__pos); │ │ │ │ -1333 } │ │ │ │ -1334 │ │ │ │ -1335 /// Extract a node. │ │ │ │ -1336 node_type │ │ │ │ -_1_3_3_7 _e_x_t_r_a_c_t(const _k_e_y___t_y_p_e& __key) │ │ │ │ -1338 { return _M_h.extract(__key); } │ │ │ │ -1339 │ │ │ │ -1340 /// Re-insert an extracted node. │ │ │ │ -1341 _i_t_e_r_a_t_o_r │ │ │ │ -_1_3_4_2 _i_n_s_e_r_t(node_type&& __nh) │ │ │ │ -1343 { return _M_h._M_reinsert_node_multi(_c_e_n_d(), _s_t_d_:_:_m_o_v_e(__nh)); } │ │ │ │ -1344 │ │ │ │ -1345 /// Re-insert an extracted node. │ │ │ │ -1346 _i_t_e_r_a_t_o_r │ │ │ │ -_1_3_4_7 _i_n_s_e_r_t(_c_o_n_s_t___i_t_e_r_a_t_o_r __hint, node_type&& __nh) │ │ │ │ -1348 { return _M_h._M_reinsert_node_multi(__hint, _s_t_d_:_:_m_o_v_e(__nh)); } │ │ │ │ -1349#endif // C++17 │ │ │ │ -1350 │ │ │ │ -1351 ///@{ │ │ │ │ -1352 /** │ │ │ │ -1353 * @brief Erases an element from an %unordered_multiset. │ │ │ │ -1354 * @param __position An iterator pointing to the element to be erased. │ │ │ │ -1355 * @return An iterator pointing to the element immediately following │ │ │ │ -1356 * @a __position prior to the element being erased. If no such │ │ │ │ -1357 * element exists, end() is returned. │ │ │ │ -1358 * │ │ │ │ -1359 * This function erases an element, pointed to by the given iterator, │ │ │ │ -1360 * from an %unordered_multiset. │ │ │ │ -1361 * │ │ │ │ -1362 * Note that this function only erases the element, and that if the │ │ │ │ -1363 * element is itself a pointer, the pointed-to memory is not touched in │ │ │ │ -1364 * any way. Managing the pointer is the user's responsibility. │ │ │ │ -1365 */ │ │ │ │ -1366 _i_t_e_r_a_t_o_r │ │ │ │ -_1_3_6_7 _e_r_a_s_e(_c_o_n_s_t___i_t_e_r_a_t_o_r __position) │ │ │ │ -1368 { return _M_h.erase(__position); } │ │ │ │ -1369 │ │ │ │ -1370 // LWG 2059. │ │ │ │ -1371 _i_t_e_r_a_t_o_r │ │ │ │ -_1_3_7_2 _e_r_a_s_e(_i_t_e_r_a_t_o_r __position) │ │ │ │ -1373 { return _M_h.erase(__position); } │ │ │ │ -1374 ///@} │ │ │ │ -1375 │ │ │ │ -1376 │ │ │ │ -1377 /** │ │ │ │ -1378 * @brief Erases elements according to the provided key. │ │ │ │ -1379 * @param __x Key of element to be erased. │ │ │ │ -1380 * @return The number of elements erased. │ │ │ │ -1381 * │ │ │ │ -1382 * This function erases all the elements located by the given key from │ │ │ │ -1383 * an %unordered_multiset. │ │ │ │ -1384 * │ │ │ │ -1385 * Note that this function only erases the element, and that if the │ │ │ │ -1386 * element is itself a pointer, the pointed-to memory is not touched in │ │ │ │ -1387 * any way. Managing the pointer is the user's responsibility. │ │ │ │ -1388 */ │ │ │ │ -1389 _s_i_z_e___t_y_p_e │ │ │ │ -_1_3_9_0 _e_r_a_s_e(const _k_e_y___t_y_p_e& __x) │ │ │ │ -1391 { return _M_h.erase(__x); } │ │ │ │ -1392 │ │ │ │ -1393 /** │ │ │ │ -1394 * @brief Erases a [__first,__last) range of elements from an │ │ │ │ -1395 * %unordered_multiset. │ │ │ │ -1396 * @param __first Iterator pointing to the start of the range to be │ │ │ │ -1397 * erased. │ │ │ │ -1398 * @param __last Iterator pointing to the end of the range to │ │ │ │ -1399 * be erased. │ │ │ │ -1400 * @return The iterator @a __last. │ │ │ │ -1401 * │ │ │ │ -1402 * This function erases a sequence of elements from an │ │ │ │ -1403 * %unordered_multiset. │ │ │ │ -1404 * │ │ │ │ -1405 * Note that this function only erases the element, and that if │ │ │ │ -1406 * the element is itself a pointer, the pointed-to memory is not touched │ │ │ │ -1407 * in any way. Managing the pointer is the user's responsibility. │ │ │ │ -1408 */ │ │ │ │ -1409 _i_t_e_r_a_t_o_r │ │ │ │ -_1_4_1_0 _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) │ │ │ │ -1411 { return _M_h.erase(__first, __last); } │ │ │ │ -1412 │ │ │ │ -1413 /** │ │ │ │ -1414 * Erases all elements in an %unordered_multiset. │ │ │ │ -1415 * │ │ │ │ -1416 * Note that this function only erases the elements, and that if the │ │ │ │ -1417 * elements themselves are pointers, the pointed-to memory is not touched │ │ │ │ -1418 * in any way. Managing the pointer is the user's responsibility. │ │ │ │ -1419 */ │ │ │ │ -1420 void │ │ │ │ -_1_4_2_1 _c_l_e_a_r() noexcept │ │ │ │ -1422 { _M_h.clear(); } │ │ │ │ -1423 │ │ │ │ -1424 /** │ │ │ │ -1425 * @brief Swaps data with another %unordered_multiset. │ │ │ │ -1426 * @param __x An %unordered_multiset of the same element and allocator │ │ │ │ -1427 * types. │ │ │ │ -1428 * │ │ │ │ -1429 * This exchanges the elements between two sets in constant time. │ │ │ │ -1430 * Note that the global std::swap() function is specialized such that │ │ │ │ -1431 * std::swap(s1,s2) will feed to this function. │ │ │ │ -1432 */ │ │ │ │ -1433 void │ │ │ │ -_1_4_3_4 _s_w_a_p(_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t& __x) │ │ │ │ -1435 noexcept( noexcept(_M_h.swap(__x._M_h)) ) │ │ │ │ -1436 { _M_h.swap(__x._M_h); } │ │ │ │ -1437 │ │ │ │ -1438#if __cplusplus > 201402L │ │ │ │ -1439 template │ │ │ │ -1440 friend class std::_Hash_merge_helper; │ │ │ │ -1441 │ │ │ │ -1442 template │ │ │ │ -1443 void │ │ │ │ -1444 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_>& __source) │ │ │ │ -1445 { │ │ │ │ -1446 using _Merge_helper │ │ │ │ -1447 = _Hash_merge_helper; │ │ │ │ -1448 _M_h._M_merge_multi(_Merge_helper::_S_get_table(__source)); │ │ │ │ -1449 } │ │ │ │ -1450 │ │ │ │ -1451 template │ │ │ │ -1452 void │ │ │ │ -1453 merge(unordered_multiset<_Value, _H2, _P2, _Alloc>&& __source) │ │ │ │ -1454 { merge(__source); } │ │ │ │ -1455 │ │ │ │ -1456 template │ │ │ │ -1457 void │ │ │ │ -1458 merge(unordered_set<_Value, _H2, _P2, _Alloc>& __source) │ │ │ │ -1459 { │ │ │ │ -1460 using _Merge_helper │ │ │ │ -1461 = _Hash_merge_helper; │ │ │ │ -1462 _M_h._M_merge_multi(_Merge_helper::_S_get_table(__source)); │ │ │ │ -1463 } │ │ │ │ -1464 │ │ │ │ -1465 template │ │ │ │ -1466 void │ │ │ │ -1467 merge(unordered_set<_Value, _H2, _P2, _Alloc>&& __source) │ │ │ │ -1468 { merge(__source); } │ │ │ │ -1469#endif // C++17 │ │ │ │ -1470 │ │ │ │ -1471 // observers. │ │ │ │ -1472 │ │ │ │ -1473 /// Returns the hash functor object with which the %unordered_multiset │ │ │ │ -1474 /// was constructed. │ │ │ │ -1475 _h_a_s_h_e_r │ │ │ │ -_1_4_7_6 _h_a_s_h___f_u_n_c_t_i_o_n() const │ │ │ │ -1477 { return _M_h.hash_function(); } │ │ │ │ -1478 │ │ │ │ -1479 /// Returns the key comparison object with which the %unordered_multiset │ │ │ │ -1480 /// was constructed. │ │ │ │ -1481 _k_e_y___e_q_u_a_l │ │ │ │ -_1_4_8_2 _k_e_y___e_q() const │ │ │ │ -1483 { return _M_h.key_eq(); } │ │ │ │ -1484 │ │ │ │ -1485 // lookup. │ │ │ │ -1486 │ │ │ │ -1487 ///@{ │ │ │ │ -1488 /** │ │ │ │ -1489 * @brief Tries to locate an element in an %unordered_multiset. │ │ │ │ -1490 * @param __x Element to be located. │ │ │ │ -1491 * @return Iterator pointing to sought-after element, or end() if not │ │ │ │ -1492 * found. │ │ │ │ -1493 * │ │ │ │ -1494 * This function takes a key and tries to locate the element with which │ │ │ │ -1495 * the key matches. If successful the function returns an iterator │ │ │ │ -1496 * pointing to the sought after element. If unsuccessful it returns the │ │ │ │ -1497 * past-the-end ( @c end() ) iterator. │ │ │ │ -1498 */ │ │ │ │ -1499 _i_t_e_r_a_t_o_r │ │ │ │ -_1_5_0_0 _f_i_n_d(const _k_e_y___t_y_p_e& __x) │ │ │ │ -1501 { return _M_h.find(__x); } │ │ │ │ -1502 │ │ │ │ -1503#if __cplusplus > 201703L │ │ │ │ -1504 template │ │ │ │ -1505 auto │ │ │ │ -1506 _f_i_n_d(const _Kt& __x) │ │ │ │ -1507 -> decltype(_M_h._M_find_tr(__x)) │ │ │ │ -1508 { return _M_h._M_find_tr(__x); } │ │ │ │ -1509#endif │ │ │ │ -1510 │ │ │ │ -1511 const_iterator │ │ │ │ -_1_5_1_2 _f_i_n_d(const _k_e_y___t_y_p_e& __x) const │ │ │ │ -1513 { return _M_h.find(__x); } │ │ │ │ -1514 │ │ │ │ -1515#if __cplusplus > 201703L │ │ │ │ -1516 template │ │ │ │ -1517 auto │ │ │ │ -1518 _f_i_n_d(const _Kt& __x) const │ │ │ │ -1519 -> decltype(_M_h._M_find_tr(__x)) │ │ │ │ -1520 { return _M_h._M_find_tr(__x); } │ │ │ │ -1521#endif │ │ │ │ -1522 ///@} │ │ │ │ -1523 │ │ │ │ -1524 ///@{ │ │ │ │ -1525 /** │ │ │ │ -1526 * @brief Finds the number of elements. │ │ │ │ -1527 * @param __x Element to located. │ │ │ │ -1528 * @return Number of elements with specified key. │ │ │ │ -1529 */ │ │ │ │ -1530 size_type │ │ │ │ -_1_5_3_1 _c_o_u_n_t(const _k_e_y___t_y_p_e& __x) const │ │ │ │ -1532 { return _M_h.count(__x); } │ │ │ │ -1533 │ │ │ │ -1534#if __cplusplus > 201703L │ │ │ │ -1535 template │ │ │ │ -1536 auto │ │ │ │ -1537 _c_o_u_n_t(const _Kt& __x) const -> decltype(_M_h._M_count_tr(__x)) │ │ │ │ -1538 { return _M_h._M_count_tr(__x); } │ │ │ │ -1539#endif │ │ │ │ -1540 ///@} │ │ │ │ -1541 │ │ │ │ -1542#if __cplusplus > 201703L │ │ │ │ -1543 ///@{ │ │ │ │ -1544 /** │ │ │ │ -1545 * @brief Finds whether an element with the given key exists. │ │ │ │ -1546 * @param __x Key of elements to be located. │ │ │ │ -1547 * @return True if there is any element with the specified key. │ │ │ │ -1548 */ │ │ │ │ -1549 bool │ │ │ │ -1550 contains(const _k_e_y___t_y_p_e& __x) const │ │ │ │ -1551 { return _M_h.find(__x) != _M_h.end(); } │ │ │ │ -1552 │ │ │ │ -1553 template │ │ │ │ -1554 auto │ │ │ │ -1555 contains(const _Kt& __x) const │ │ │ │ -1556 -> decltype(_M_h._M_find_tr(__x), void(), true) │ │ │ │ -1557 { return _M_h._M_find_tr(__x) != _M_h.end(); } │ │ │ │ -1558 ///@} │ │ │ │ -1559#endif │ │ │ │ -1560 │ │ │ │ -1561 ///@{ │ │ │ │ -1562 /** │ │ │ │ -1563 * @brief Finds a subsequence matching given key. │ │ │ │ -1564 * @param __x Key to be located. │ │ │ │ -1565 * @return Pair of iterators that possibly points to the subsequence │ │ │ │ -1566 * matching given key. │ │ │ │ -1567 */ │ │ │ │ -1568 std::pair │ │ │ │ -_1_5_6_9 _e_q_u_a_l___r_a_n_g_e(const _k_e_y___t_y_p_e& __x) │ │ │ │ -1570 { return _M_h.equal_range(__x); } │ │ │ │ -1571 │ │ │ │ -1572#if __cplusplus > 201703L │ │ │ │ -1573 template │ │ │ │ -1574 auto │ │ │ │ -1575 _e_q_u_a_l___r_a_n_g_e(const _Kt& __x) │ │ │ │ -1576 -> decltype(_M_h._M_equal_range_tr(__x)) │ │ │ │ -1577 { return _M_h._M_equal_range_tr(__x); } │ │ │ │ -1578#endif │ │ │ │ -1579 │ │ │ │ -1580 _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_1 _e_q_u_a_l___r_a_n_g_e(const _k_e_y___t_y_p_e& __x) const │ │ │ │ -1582 { return _M_h.equal_range(__x); } │ │ │ │ -1583 │ │ │ │ -1584#if __cplusplus > 201703L │ │ │ │ -1585 template │ │ │ │ -1586 auto │ │ │ │ -1587 _e_q_u_a_l___r_a_n_g_e(const _Kt& __x) const │ │ │ │ -1588 -> decltype(_M_h._M_equal_range_tr(__x)) │ │ │ │ -1589 { return _M_h._M_equal_range_tr(__x); } │ │ │ │ -1590#endif │ │ │ │ -1591 ///@} │ │ │ │ -1592 │ │ │ │ -1593 // bucket interface. │ │ │ │ -1594 │ │ │ │ -1595 /// Returns the number of buckets of the %unordered_multiset. │ │ │ │ -1596 size_type │ │ │ │ -_1_5_9_7 _b_u_c_k_e_t___c_o_u_n_t() const noexcept │ │ │ │ -1598 { return _M_h.bucket_count(); } │ │ │ │ -1599 │ │ │ │ -1600 /// Returns the maximum number of buckets of the %unordered_multiset. │ │ │ │ -1601 _s_i_z_e___t_y_p_e │ │ │ │ -_1_6_0_2 _m_a_x___b_u_c_k_e_t___c_o_u_n_t() const noexcept │ │ │ │ -1603 { return _M_h.max_bucket_count(); } │ │ │ │ -1604 │ │ │ │ -1605 /* │ │ │ │ -1606 * @brief Returns the number of elements in a given bucket. │ │ │ │ -1607 * @param __n A bucket index. │ │ │ │ -1608 * @return The number of elements in the bucket. │ │ │ │ -1609 */ │ │ │ │ -1610 _s_i_z_e___t_y_p_e │ │ │ │ -1611 bucket_size(_s_i_z_e___t_y_p_e __n) const │ │ │ │ -1612 { return _M_h.bucket_size(__n); } │ │ │ │ -1613 │ │ │ │ -1614 /* │ │ │ │ -1615 * @brief Returns the bucket index of a given element. │ │ │ │ -1616 * @param __key A key instance. │ │ │ │ -1617 * @return The key bucket index. │ │ │ │ -1618 */ │ │ │ │ -1619 size_type │ │ │ │ -1620 bucket(const _k_e_y___t_y_p_e& __key) const │ │ │ │ -1621 { return _M_h.bucket(__key); } │ │ │ │ -1622 │ │ │ │ -1623 ///@{ │ │ │ │ -1624 /** │ │ │ │ -1625 * @brief Returns a read-only (constant) iterator pointing to the first │ │ │ │ -1626 * bucket element. │ │ │ │ -1627 * @param __n The bucket index. │ │ │ │ -1628 * @return A read-only local iterator. │ │ │ │ -1629 */ │ │ │ │ -1630 _l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_1_6_3_1 _b_e_g_i_n(_s_i_z_e___t_y_p_e __n) │ │ │ │ -1632 { return _M_h.begin(__n); } │ │ │ │ -1633 │ │ │ │ -1634 _c_o_n_s_t___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) const │ │ │ │ -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 _c_b_e_g_i_n(_s_i_z_e___t_y_p_e __n) const │ │ │ │ -1640 { return _M_h.cbegin(__n); } │ │ │ │ -1641 ///@} │ │ │ │ -1642 │ │ │ │ -1643 ///@{ │ │ │ │ -1644 /** │ │ │ │ -1645 * @brief Returns a read-only (constant) iterator pointing to one past │ │ │ │ -1646 * the last bucket elements. │ │ │ │ -1647 * @param __n The bucket index. │ │ │ │ -1648 * @return A read-only local iterator. │ │ │ │ -1649 */ │ │ │ │ -1650 _l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_1_6_5_1 _e_n_d(_s_i_z_e___t_y_p_e __n) │ │ │ │ -1652 { return _M_h.end(__n); } │ │ │ │ -1653 │ │ │ │ -1654 _c_o_n_s_t___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) const │ │ │ │ -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 _c_e_n_d(_s_i_z_e___t_y_p_e __n) const │ │ │ │ -1660 { return _M_h.cend(__n); } │ │ │ │ -1661 ///@} │ │ │ │ -1662 │ │ │ │ -1663 // hash policy. │ │ │ │ -1664 │ │ │ │ -1665 /// Returns the average number of elements per bucket. │ │ │ │ -1666 float │ │ │ │ -_1_6_6_7 _l_o_a_d___f_a_c_t_o_r() const noexcept │ │ │ │ -1668 { return _M_h.load_factor(); } │ │ │ │ -1669 │ │ │ │ -1670 /// Returns a positive number that the %unordered_multiset tries to keep │ │ │ │ -the │ │ │ │ -1671 /// load factor less than or equal to. │ │ │ │ -1672 float │ │ │ │ -_1_6_7_3 _m_a_x___l_o_a_d___f_a_c_t_o_r() const noexcept │ │ │ │ -1674 { return _M_h.max_load_factor(); } │ │ │ │ -1675 │ │ │ │ -1676 /** │ │ │ │ -1677 * @brief Change the %unordered_multiset maximum load factor. │ │ │ │ -1678 * @param __z The new maximum load factor. │ │ │ │ -1679 */ │ │ │ │ -1680 void │ │ │ │ -_1_6_8_1 _m_a_x___l_o_a_d___f_a_c_t_o_r(float __z) │ │ │ │ -1682 { _M_h.max_load_factor(__z); } │ │ │ │ -1683 │ │ │ │ -1684 /** │ │ │ │ -1685 * @brief May rehash the %unordered_multiset. │ │ │ │ -1686 * @param __n The new number of buckets. │ │ │ │ -1687 * │ │ │ │ -1688 * Rehash will occur only if the new number of buckets respect the │ │ │ │ -1689 * %unordered_multiset maximum load factor. │ │ │ │ -1690 */ │ │ │ │ -1691 void │ │ │ │ -_1_6_9_2 _r_e_h_a_s_h(_s_i_z_e___t_y_p_e __n) │ │ │ │ -1693 { _M_h.rehash(__n); } │ │ │ │ -1694 │ │ │ │ -1695 /** │ │ │ │ -1696 * @brief Prepare the %unordered_multiset for a specified number of │ │ │ │ -1697 * elements. │ │ │ │ -1698 * @param __n Number of elements required. │ │ │ │ -1699 * │ │ │ │ -1700 * Same as rehash(ceil(n / max_load_factor())). │ │ │ │ -1701 */ │ │ │ │ -1702 void │ │ │ │ -_1_7_0_3 _r_e_s_e_r_v_e(_s_i_z_e___t_y_p_e __n) │ │ │ │ -1704 { _M_h.reserve(__n); } │ │ │ │ -1705 │ │ │ │ -1706 template │ │ │ │ -1708 friend bool │ │ │ │ -1709 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_>&, │ │ │ │ -1710 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_>&); │ │ │ │ -1711 }; │ │ │ │ -1712 │ │ │ │ -1713 │ │ │ │ -1714#if __cpp_deduction_guides >= 201606 │ │ │ │ -1715 │ │ │ │ -1716 template::value_type>, │ │ │ │ -1719 typename _Pred = │ │ │ │ -1720 equal_to::value_type>, │ │ │ │ -1721 typename _Allocator = │ │ │ │ -1722 allocator::value_type>, │ │ │ │ -1723 typename = _RequireInputIter<_InputIterator>, │ │ │ │ -1724 typename = _RequireNotAllocatorOrIntegral<_Hash>, │ │ │ │ -1725 typename = _RequireNotAllocator<_Pred>, │ │ │ │ -1726 typename = _RequireAllocator<_Allocator>> │ │ │ │ -1727 unordered_multiset(_InputIterator, _InputIterator, │ │ │ │ -1728 unordered_multiset::size_type = {}, │ │ │ │ -1729 _Hash = _Hash(), _Pred = _Pred(), │ │ │ │ -1730 _Allocator = _Allocator()) │ │ │ │ -1731 -> _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, │ │ │ │ -1732 _Hash, _Pred, _Allocator>; │ │ │ │ -1733 │ │ │ │ -1734 template, │ │ │ │ -1735 typename _Pred = equal_to<_Tp>, │ │ │ │ -1736 typename _Allocator = allocator<_Tp>, │ │ │ │ -1737 typename = _RequireNotAllocatorOrIntegral<_Hash>, │ │ │ │ -1738 typename = _RequireNotAllocator<_Pred>, │ │ │ │ -1739 typename = _RequireAllocator<_Allocator>> │ │ │ │ -1740 _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_<___T_p_>, │ │ │ │ -1741 _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 = {}, │ │ │ │ -1742 _Hash = _Hash(), _Pred = _Pred(), │ │ │ │ -1743 _Allocator = _Allocator()) │ │ │ │ -1744 -> _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_<___T_p_,_ ___H_a_s_h_,_ ___P_r_e_d_,_ ___A_l_l_o_c_a_t_o_r_>; │ │ │ │ -1745 │ │ │ │ -1746 template, │ │ │ │ -1748 typename = _RequireAllocator<_Allocator>> │ │ │ │ -1749 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t(_InputIterator, _InputIterator, │ │ │ │ -1750 _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) │ │ │ │ -1751 -> _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_>_:_: │ │ │ │ -_v_a_l_u_e___t_y_p_e, │ │ │ │ -1752 _h_a_s_h_:_:_v_a_l_u_e___t_y_p_e>, │ │ │ │ -1754 _e_q_u_a_l___t_o_:_:_v_a_l_u_e___t_y_p_e>, │ │ │ │ -1756 _Allocator>; │ │ │ │ -1757 │ │ │ │ -1758 template, │ │ │ │ -1760 typename = _RequireNotAllocatorOrIntegral<_Hash>, │ │ │ │ -1761 typename = _RequireAllocator<_Allocator>> │ │ │ │ -1762 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t(_InputIterator, _InputIterator, │ │ │ │ -1763 _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, │ │ │ │ -1764 _Hash, _Allocator) │ │ │ │ -1765 -> _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, │ │ │ │ -1767 _Hash, │ │ │ │ -1768 _e_q_u_a_l___t_o< │ │ │ │ -1769 typename │ │ │ │ -1770 _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>, │ │ │ │ -1771 _Allocator>; │ │ │ │ -1772 │ │ │ │ -1773 template> │ │ │ │ -1775 _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_<___T_p_>, │ │ │ │ -1776 _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) │ │ │ │ -1777 -> _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_<___T_p_,_ _h_a_s_h_<___T_p_>, _e_q_u_a_l___t_o_<___T_p_>, _Allocator>; │ │ │ │ -1778 │ │ │ │ -1779 template, │ │ │ │ -1781 typename = _RequireAllocator<_Allocator>> │ │ │ │ -1782 _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_<___T_p_>, │ │ │ │ -1783 _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) │ │ │ │ -1784 -> _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_<___T_p_,_ ___H_a_s_h_,_ _e_q_u_a_l___t_o_<___T_p_>, _Allocator>; │ │ │ │ -1785 │ │ │ │ -1786#endif │ │ │ │ -1787 │ │ │ │ -1788 template │ │ │ │ -1789 inline void │ │ │ │ -1790 _s_w_a_p(_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_>& __x, │ │ │ │ -1791 _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_>& __y) │ │ │ │ -1792 noexcept(noexcept(__x.swap(__y))) │ │ │ │ -1793 { __x.swap(__y); } │ │ │ │ -1794 │ │ │ │ -1795 template │ │ │ │ -1796 inline void │ │ │ │ -1797 _s_w_a_p(_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_>& __x, │ │ │ │ -1798 _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_>& __y) │ │ │ │ -1799 noexcept(noexcept(__x.swap(__y))) │ │ │ │ -1800 { __x.swap(__y); } │ │ │ │ -1801 │ │ │ │ -1802 template │ │ │ │ -1803 inline bool │ │ │ │ -1804 operator==(const _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_>& __x, │ │ │ │ -1805 const _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_>& __y) │ │ │ │ -1806 { return __x._M_h._M_equal(__y._M_h); } │ │ │ │ -1807 │ │ │ │ -1808#if __cpp_impl_three_way_comparison < 201907L │ │ │ │ -1809 template │ │ │ │ -1810 inline bool │ │ │ │ -1811 operator!=(const _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_>& __x, │ │ │ │ -1812 const _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_>& __y) │ │ │ │ -1813 { return !(__x == __y); } │ │ │ │ -1814#endif │ │ │ │ -1815 │ │ │ │ -1816 template │ │ │ │ -1817 inline bool │ │ │ │ -1818 operator==(const _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_>& __x, │ │ │ │ -1819 const _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_>& __y) │ │ │ │ -1820 { return __x._M_h._M_equal(__y._M_h); } │ │ │ │ -1821 │ │ │ │ -1822#if __cpp_impl_three_way_comparison < 201907L │ │ │ │ -1823 template │ │ │ │ -1824 inline bool │ │ │ │ -1825 operator!=(const _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_>& __x, │ │ │ │ -1826 const _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_>& __y) │ │ │ │ -1827 { return !(__x == __y); } │ │ │ │ -1828#endif │ │ │ │ -1829 │ │ │ │ -1830_GLIBCXX_END_NAMESPACE_CONTAINER │ │ │ │ -1831 │ │ │ │ -1832#if __cplusplus > 201402L │ │ │ │ -1833 // Allow std::unordered_set access to internals of compatible sets. │ │ │ │ -1834 template │ │ │ │ -1836 struct _Hash_merge_helper< │ │ │ │ -1837 _GLIBCXX_STD_C::_u_n_o_r_d_e_r_e_d___s_e_t<_Val, _Hash1, _Eq1, _Alloc>, _Hash2, _Eq2> │ │ │ │ -1838 { │ │ │ │ -1839 private: │ │ │ │ -1840 template │ │ │ │ -1841 using unordered_set = _GLIBCXX_STD_C::unordered_set<_Tp...>; │ │ │ │ -1842 template │ │ │ │ -1843 using unordered_multiset = _GLIBCXX_STD_C::unordered_multiset<_Tp...>; │ │ │ │ -1844 │ │ │ │ -1845 friend unordered_set<_Val, _Hash1, _Eq1, _Alloc>; │ │ │ │ -1846 │ │ │ │ -1847 static auto& │ │ │ │ -1848 _S_get_table(unordered_set<_Val, _Hash2, _Eq2, _Alloc>& __set) │ │ │ │ -1849 { return __set._M_h; } │ │ │ │ -1850 │ │ │ │ -1851 static auto& │ │ │ │ -1852 _S_get_table(unordered_multiset<_Val, _Hash2, _Eq2, _Alloc>& __set) │ │ │ │ -1853 { return __set._M_h; } │ │ │ │ -1854 }; │ │ │ │ -1855 │ │ │ │ -1856 // Allow std::unordered_multiset access to internals of compatible sets. │ │ │ │ -1857 template │ │ │ │ -1859 struct _Hash_merge_helper< │ │ │ │ -1860 _GLIBCXX_STD_C::_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t<_Val, _Hash1, _Eq1, _Alloc>, │ │ │ │ -1861 _Hash2, _Eq2> │ │ │ │ -1862 { │ │ │ │ -1863 private: │ │ │ │ -1864 template │ │ │ │ -1865 using unordered_set = _GLIBCXX_STD_C::unordered_set<_Tp...>; │ │ │ │ -1866 template │ │ │ │ -1867 using unordered_multiset = _GLIBCXX_STD_C::unordered_multiset<_Tp...>; │ │ │ │ -1868 │ │ │ │ -1869 friend unordered_multiset<_Val, _Hash1, _Eq1, _Alloc>; │ │ │ │ -1870 │ │ │ │ -1871 static auto& │ │ │ │ -1872 _S_get_table(unordered_set<_Val, _Hash2, _Eq2, _Alloc>& __set) │ │ │ │ -1873 { return __set._M_h; } │ │ │ │ -1874 │ │ │ │ -1875 static auto& │ │ │ │ -1876 _S_get_table(unordered_multiset<_Val, _Hash2, _Eq2, _Alloc>& __set) │ │ │ │ -1877 { return __set._M_h; } │ │ │ │ -1878 }; │ │ │ │ -1879#endif // C++17 │ │ │ │ -1880 │ │ │ │ -1881_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ -1882} // namespace std │ │ │ │ -1883 │ │ │ │ -1884#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_8 │ │ │ │ -_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 │ │ │ │ +174 void │ │ │ │ +175 notify_one() noexcept │ │ │ │ +176 { │ │ │ │ +177 int __e __attribute__((__unused__)) = __gthread_cond_signal(&_M_cond); │ │ │ │ +178 __glibcxx_assert(__e == 0); │ │ │ │ +179 } │ │ │ │ +180 │ │ │ │ +181 void │ │ │ │ +182 notify_all() noexcept │ │ │ │ +183 { │ │ │ │ +184 int __e __attribute__((__unused__)) = __gthread_cond_broadcast(&_M_cond); │ │ │ │ +185 __glibcxx_assert(__e == 0); │ │ │ │ +186 } │ │ │ │ +187 │ │ │ │ +188 protected: │ │ │ │ +189#ifdef __GTHREAD_COND_INIT │ │ │ │ +190 __gthread_cond_t _M_cond = __GTHREAD_COND_INIT; │ │ │ │ +191#else │ │ │ │ +192 __gthread_cond_t _M_cond; │ │ │ │ +193#endif │ │ │ │ +194 }; │ │ │ │ +195 │ │ │ │ +196#endif // _GLIBCXX_HAS_GTHREADS │ │ │ │ +197 │ │ │ │ +198 /// Do not acquire ownership of the mutex. │ │ │ │ +_1_9_9 struct defer_lock_t { explicit defer_lock_t() = default; }; │ │ │ │ +200 │ │ │ │ +201 /// Try to acquire ownership of the mutex without blocking. │ │ │ │ +_2_0_2 struct try_to_lock_t { explicit try_to_lock_t() = default; }; │ │ │ │ +203 │ │ │ │ +204 /// Assume the calling thread has already obtained mutex ownership │ │ │ │ +205 /// and manage it. │ │ │ │ +_2_0_6 struct adopt_lock_t { explicit adopt_lock_t() = default; }; │ │ │ │ +207 │ │ │ │ +208 /// Tag used to prevent a scoped lock from acquiring ownership of a mutex. │ │ │ │ +_2_0_9 _GLIBCXX17_INLINE constexpr _d_e_f_e_r___l_o_c_k___t _d_e_f_e_r___l_o_c_k { }; │ │ │ │ +210 │ │ │ │ +211 /// Tag used to prevent a scoped lock from blocking if a mutex is locked. │ │ │ │ +_2_1_2 _GLIBCXX17_INLINE constexpr _t_r_y___t_o___l_o_c_k___t _t_r_y___t_o___l_o_c_k { }; │ │ │ │ +213 │ │ │ │ +214 /// Tag used to make a scoped lock take ownership of a locked mutex. │ │ │ │ +_2_1_5 _GLIBCXX17_INLINE constexpr _a_d_o_p_t___l_o_c_k___t _a_d_o_p_t___l_o_c_k { }; │ │ │ │ +216 │ │ │ │ +217 /** @brief A simple scoped lock type. │ │ │ │ +218 * │ │ │ │ +219 * A lock_guard controls mutex ownership within a scope, releasing │ │ │ │ +220 * ownership in the destructor. │ │ │ │ +221 */ │ │ │ │ +222 template │ │ │ │ +_2_2_3 class lock_guard │ │ │ │ +224 { │ │ │ │ +225 public: │ │ │ │ +226 typedef _Mutex mutex_type; │ │ │ │ +227 │ │ │ │ +228 explicit lock_guard(mutex_type& __m) : _M_device(__m) │ │ │ │ +229 { _M_device.lock(); } │ │ │ │ +230 │ │ │ │ +231 lock_guard(mutex_type& __m, _a_d_o_p_t___l_o_c_k___t) noexcept : _M_device(__m) │ │ │ │ +232 { } // calling thread owns mutex │ │ │ │ +233 │ │ │ │ +234 ~lock_guard() │ │ │ │ +235 { _M_device.unlock(); } │ │ │ │ +236 │ │ │ │ +237 lock_guard(const lock_guard&) = delete; │ │ │ │ +238 lock_guard& operator=(const lock_guard&) = delete; │ │ │ │ +239 │ │ │ │ +240 private: │ │ │ │ +241 mutex_type& _M_device; │ │ │ │ +242 }; │ │ │ │ +243 │ │ │ │ +244 /// @} group mutexes │ │ │ │ +245_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ +246} // namespace │ │ │ │ +247#endif // C++11 │ │ │ │ +248#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_1_2 │ │ │ │ +_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_1_5 │ │ │ │ +_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_0_9 │ │ │ │ _s_t_d │ │ │ │ ISO C++ entities toplevel namespace is std. │ │ │ │ -_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_:_:_____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_:_:_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t │ │ │ │ -initializer_list │ │ │ │ -DDeeffiinniittiioonn _i_n_i_t_i_a_l_i_z_e_r___l_i_s_t_:_4_8 │ │ │ │ -_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_:_:_s_i_z_e___t_y_p_e │ │ │ │ -_s_t_d_:_:_a_l_l_o_c_a_t_o_r │ │ │ │ -The standard allocator, as per C++03 [20.4.1]. │ │ │ │ -DDeeffiinniittiioonn _a_l_l_o_c_a_t_o_r_._h_:_1_2_5 │ │ │ │ -_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_:_:_e_q_u_a_l___t_o │ │ │ │ -One of the comparison functors. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___f_u_n_c_t_i_o_n_._h_:_3_6_6 │ │ │ │ -_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_:_:_p_a_i_r │ │ │ │ -Struct holding two objects of arbitrary type. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___p_a_i_r_._h_:_2_1_3 │ │ │ │ -_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_4 │ │ │ │ -_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_5 │ │ │ │ -_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_4 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_<_ ___K_e_y_,_ ___H_a_s_h_,_ ___P_r_e_d_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ ___K_e_y_ _>_ _>_:_: │ │ │ │ -_d_i_f_f_e_r_e_n_c_e___t_y_p_e │ │ │ │ -_Hashtable::difference_type difference_type │ │ │ │ -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_:_:_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_3 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_<_ ___K_e_y_,_ ___H_a_s_h_,_ ___P_r_e_d_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ ___K_e_y_ _>_ _>_:_: │ │ │ │ -_p_o_i_n_t_e_r │ │ │ │ -_Hashtable::pointer pointer │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_9_8_1 │ │ │ │ -_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_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 │ │ │ │ -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_1 │ │ │ │ -_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_5_9_7 │ │ │ │ -_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_1 │ │ │ │ -_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_3 │ │ │ │ -_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_4 │ │ │ │ -_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_0 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_<_ ___K_e_y_,_ ___H_a_s_h_,_ ___P_r_e_d_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ ___K_e_y_ _>_ _>_:_: │ │ │ │ -_l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_Hashtable::local_iterator local_iterator │ │ │ │ -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_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_3_7 │ │ │ │ -_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_5 │ │ │ │ -_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_4 │ │ │ │ -_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_1 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_<_ ___K_e_y_,_ ___H_a_s_h_,_ ___P_r_e_d_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ ___K_e_y_ _>_ _>_:_: │ │ │ │ -_c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ -_Hashtable::const_iterator const_iterator │ │ │ │ -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_:_:_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_7_7 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_<_ ___K_e_y_,_ ___H_a_s_h_,_ ___P_r_e_d_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ ___K_e_y_ _>_ _>_:_: │ │ │ │ -_a_l_l_o_c_a_t_o_r___t_y_p_e │ │ │ │ -_Hashtable::allocator_type allocator_type │ │ │ │ -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_:_:_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_5 │ │ │ │ -_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_0 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_<_ ___K_e_y_,_ ___H_a_s_h_,_ ___P_r_e_d_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ ___K_e_y_ _>_ _>_:_: │ │ │ │ -_v_a_l_u_e___t_y_p_e │ │ │ │ -_Hashtable::value_type value_type │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_9_7_3 │ │ │ │ -_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_6_7 │ │ │ │ -_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_4_7 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_<_ ___K_e_y_,_ ___H_a_s_h_,_ ___P_r_e_d_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ ___K_e_y_ _>_ _>_:_: │ │ │ │ -_s_i_z_e___t_y_p_e │ │ │ │ -_Hashtable::size_type size_type │ │ │ │ -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_<_ ___K_e_y_,_ ___H_a_s_h_,_ ___P_r_e_d_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ ___K_e_y_ _>_ _>_:_: │ │ │ │ -_k_e_y___t_y_p_e │ │ │ │ -_Hashtable::key_type key_type │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_9_7_2 │ │ │ │ -_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_7_6 │ │ │ │ -_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_5_6 │ │ │ │ -_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_1 │ │ │ │ -_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_6_7 │ │ │ │ -_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_<_ ___K_e_y_,_ ___H_a_s_h_,_ ___P_r_e_d_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ ___K_e_y_ _>_ _>_:_: │ │ │ │ -_r_e_f_e_r_e_n_c_e │ │ │ │ -_Hashtable::reference reference │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_9_8_3 │ │ │ │ -_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_1_9_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___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_5_6 │ │ │ │ -_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_4 │ │ │ │ -_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_8_9 │ │ │ │ -_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_0 │ │ │ │ -_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_2 │ │ │ │ -_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_2 │ │ │ │ -_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_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 │ │ │ │ -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_2 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_<_ ___K_e_y_,_ ___H_a_s_h_,_ ___P_r_e_d_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ ___K_e_y_ _>_ _>_:_: │ │ │ │ -_c_o_n_s_t___p_o_i_n_t_e_r │ │ │ │ -_Hashtable::const_pointer const_pointer │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_9_8_2 │ │ │ │ -_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_6_9 │ │ │ │ -_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_2 │ │ │ │ -_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_6_8 │ │ │ │ -_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_3 │ │ │ │ -_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_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(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_2_9_8 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_<_ ___K_e_y_,_ ___H_a_s_h_,_ ___P_r_e_d_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ ___K_e_y_ _>_ _>_:_: │ │ │ │ -_c_o_n_s_t___r_e_f_e_r_e_n_c_e │ │ │ │ -_Hashtable::const_reference const_reference │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_9_8_4 │ │ │ │ -_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_2 │ │ │ │ -_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_5_9 │ │ │ │ -_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_2 │ │ │ │ -_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_2 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_<_ ___K_e_y_,_ ___H_a_s_h_,_ ___P_r_e_d_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ ___K_e_y_ _>_ _>_:_: │ │ │ │ -_h_a_s_h_e_r │ │ │ │ -_Hashtable::hasher hasher │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_9_7_4 │ │ │ │ -_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_0 │ │ │ │ -_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_4_9 │ │ │ │ -_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_6_9 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_<_ ___K_e_y_,_ ___H_a_s_h_,_ ___P_r_e_d_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ ___K_e_y_ _>_ _>_:_: │ │ │ │ -_i_t_e_r_a_t_o_r │ │ │ │ -_Hashtable::iterator iterator │ │ │ │ -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_:_:_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_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_2_9 │ │ │ │ -_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_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_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_3_9 │ │ │ │ -_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 │ │ │ │ -Copy constructor. │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_<_ ___K_e_y_,_ ___H_a_s_h_,_ ___P_r_e_d_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ ___K_e_y_ _>_ _>_:_: │ │ │ │ -_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 │ │ │ │ -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 │ │ │ │ -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_0 │ │ │ │ -_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_2 │ │ │ │ -_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_5_7 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_<_ ___K_e_y_,_ ___H_a_s_h_,_ ___P_r_e_d_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ ___K_e_y_ _>_ _>_:_: │ │ │ │ -_k_e_y___e_q_u_a_l │ │ │ │ -_Hashtable::key_equal key_equal │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_9_7_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 │ │ │ │ -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_1 │ │ │ │ -_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_:_9_8 │ │ │ │ -_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_1 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_<_ ___K_e_y_,_ ___H_a_s_h_,_ ___P_r_e_d_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ ___K_e_y_ _>_ _>_:_: │ │ │ │ -_i_t_e_r_a_t_o_r │ │ │ │ -_Hashtable::iterator iterator │ │ │ │ -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_:_:_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_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 │ │ │ │ -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_3_8 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_<_ ___K_e_y_,_ ___H_a_s_h_,_ ___P_r_e_d_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ ___K_e_y_ _>_ _>_:_: │ │ │ │ -_r_e_f_e_r_e_n_c_e │ │ │ │ -_Hashtable::reference reference │ │ │ │ -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_:_:_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_2 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_<_ ___K_e_y_,_ ___H_a_s_h_,_ ___P_r_e_d_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ ___K_e_y_ _>_ _>_:_: │ │ │ │ -_v_a_l_u_e___t_y_p_e │ │ │ │ -_Hashtable::value_type value_type │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_0_7 │ │ │ │ -_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_5 │ │ │ │ -_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_2 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_<_ ___K_e_y_,_ ___H_a_s_h_,_ ___P_r_e_d_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ ___K_e_y_ _>_ _>_:_: │ │ │ │ -_k_e_y___t_y_p_e │ │ │ │ -_Hashtable::key_type key_type │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_0_6 │ │ │ │ -_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_5 │ │ │ │ -_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_2 │ │ │ │ -_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_6 │ │ │ │ -_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_4 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_<_ ___K_e_y_,_ ___H_a_s_h_,_ ___P_r_e_d_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ ___K_e_y_ _>_ _>_:_:_h_a_s_h_e_r │ │ │ │ -_Hashtable::hasher hasher │ │ │ │ -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_<_ ___K_e_y_,_ ___H_a_s_h_,_ ___P_r_e_d_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ ___K_e_y_ _>_ _>_:_: │ │ │ │ -_l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_Hashtable::local_iterator local_iterator │ │ │ │ -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_:_:_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_:_4_9_9 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_<_ ___K_e_y_,_ ___H_a_s_h_,_ ___P_r_e_d_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ ___K_e_y_ _>_ _>_:_: │ │ │ │ -_s_i_z_e___t_y_p_e │ │ │ │ -_Hashtable::size_type size_type │ │ │ │ -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_:_:_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_7 │ │ │ │ -_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_:_2_9_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=(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_4 │ │ │ │ -_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_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(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_5 │ │ │ │ -_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_6 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_<_ ___K_e_y_,_ ___H_a_s_h_,_ ___P_r_e_d_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ ___K_e_y_ _>_ _>_:_: │ │ │ │ -_c_o_n_s_t___p_o_i_n_t_e_r │ │ │ │ -_Hashtable::const_pointer const_pointer │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_1_6 │ │ │ │ -_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_3_8 │ │ │ │ -_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_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 __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_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(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_5 │ │ │ │ -_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_4 │ │ │ │ -_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_4_9 │ │ │ │ -_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_0_8 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_<_ ___K_e_y_,_ ___H_a_s_h_,_ ___P_r_e_d_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ ___K_e_y_ _>_ _>_:_: │ │ │ │ -_k_e_y___e_q_u_a_l │ │ │ │ -_Hashtable::key_equal key_equal │ │ │ │ -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_:_:_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_4 │ │ │ │ -_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_4 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_<_ ___K_e_y_,_ ___H_a_s_h_,_ ___P_r_e_d_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ ___K_e_y_ _>_ _>_:_: │ │ │ │ -_c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ -_Hashtable::const_iterator const_iterator │ │ │ │ -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_<_ ___K_e_y_,_ ___H_a_s_h_,_ ___P_r_e_d_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ ___K_e_y_ _>_ _>_:_: │ │ │ │ -_d_i_f_f_e_r_e_n_c_e___t_y_p_e │ │ │ │ -_Hashtable::difference_type difference_type │ │ │ │ -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_<_ ___K_e_y_,_ ___H_a_s_h_,_ ___P_r_e_d_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ ___K_e_y_ _>_ _>_:_: │ │ │ │ -_c_o_n_s_t___r_e_f_e_r_e_n_c_e │ │ │ │ -_Hashtable::const_reference const_reference │ │ │ │ -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_:_:_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_6 │ │ │ │ -_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_6 │ │ │ │ -_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_3 │ │ │ │ -_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_2 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_<_ ___K_e_y_,_ ___H_a_s_h_,_ ___P_r_e_d_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ ___K_e_y_ _>_ _>_:_: │ │ │ │ -_a_l_l_o_c_a_t_o_r___t_y_p_e │ │ │ │ -_Hashtable::allocator_type allocator_type │ │ │ │ -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_:_:_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_4 │ │ │ │ -_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_3_8 │ │ │ │ -_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_4 │ │ │ │ -_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_4 │ │ │ │ -_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_8_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()=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_6_9 │ │ │ │ -_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_0 │ │ │ │ -_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_7 │ │ │ │ -_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_5 │ │ │ │ -_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_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 __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_3 │ │ │ │ -_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_3 │ │ │ │ -_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_2 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_<_ ___K_e_y_,_ ___H_a_s_h_,_ ___P_r_e_d_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ ___K_e_y_ _>_ _>_:_: │ │ │ │ -_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 │ │ │ │ -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_:_:_c_l_e_a_r │ │ │ │ -void clear() noexcept │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_5_7_3 │ │ │ │ -_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_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(_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_6 │ │ │ │ -_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_4 │ │ │ │ -_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_0 │ │ │ │ -_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_6 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_<_ ___K_e_y_,_ ___H_a_s_h_,_ ___P_r_e_d_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ ___K_e_y_ _>_ _>_:_: │ │ │ │ -_p_o_i_n_t_e_r │ │ │ │ -_Hashtable::pointer pointer │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_1_5 │ │ │ │ -_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_0 │ │ │ │ -_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_0 │ │ │ │ -_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_0_9 │ │ │ │ -_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_5_9 │ │ │ │ +_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_:_1_9_9 │ │ │ │ +_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_0_2 │ │ │ │ +_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_0_6 │ │ │ │ * bbiittss │ │ │ │ - * _u_n_o_r_d_e_r_e_d___s_e_t_._h │ │ │ │ + * _s_t_d___m_u_t_e_x_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.15.0 │ │ ├── ./usr/share/doc/gcc-11-base/libstdc++/user/a00368.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: unordered_map.h File Reference │ │ │ +libstdc++: fstream.tcc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -48,77 +48,46 @@ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
unordered_map.h File Reference
│ │ │ +
fstream.tcc File Reference
│ │ │
│ │ │
│ │ │ │ │ │

Go to the source code of this file.

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

│ │ │ -Classes

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_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
template<bool _Cache>
using std::__umap_traits
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
template<bool _Cache>
using std::__ummap_traits
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │

│ │ │ -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>
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)))
#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 <unordered_map>.

│ │ │ +

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

│ │ │ │ │ │ -

Definition in file unordered_map.h.

│ │ │ +

Definition in file fstream.tcc.

│ │ │

Macro Definition Documentation

│ │ │ - │ │ │ -

◆ __cpp_lib_unordered_map_try_emplace

│ │ │ + │ │ │ +

◆ _FSTREAM_TCC

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

Definition at line 446 of file unordered_map.h.

│ │ │ +

Definition at line 35 of file fstream.tcc.

│ │ │ │ │ │
│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,59 +1,18 @@ │ │ │ │ libstdc++ │ │ │ │ -unordered_map.h File Reference │ │ │ │ +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 │ │ │ │ -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___u_n_o_r_d_e_r_e_d___m_a_p___t_r_y___e_m_p_l_a_c_e │ │ │ │ -TTyyppeeddeeffss │ │ │ │ -template, typename │ │ │ │ -_Pred = std::equal_to<_Key>, typename _Alloc = std::allocator >, typename _Tr = __umap_traits<__cache_default<_Key, _Hash>:: │ │ │ │ -value>> │ │ │ │ -using  _s_t_d_:_:_____u_m_a_p___h_a_s_h_t_a_b_l_e │ │ │ │ -template │ │ │ │ -using  _s_t_d_:_:_____u_m_a_p___t_r_a_i_t_s │ │ │ │ -template, typename │ │ │ │ -_Pred = std::equal_to<_Key>, typename _Alloc = std::allocator >, typename _Tr = __ummap_traits<__cache_default<_Key, _Hash>:: │ │ │ │ -value>> │ │ │ │ -using  _s_t_d_:_:_____u_m_m_a_p___h_a_s_h_t_a_b_l_e │ │ │ │ -template │ │ │ │ -using  _s_t_d_:_:_____u_m_m_a_p___t_r_a_i_t_s │ │ │ │ -FFuunnccttiioonnss │ │ │ │ -template │ │ │ │ -bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_!_= (const unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc > │ │ │ │ - &__x, const unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc > &__y) │ │ │ │ -template │ │ │ │ -bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_!_= (const unordered_multimap< _Key, _Tp, _Hash, _Pred, │ │ │ │ - _Alloc > &__x, const unordered_multimap< _Key, _Tp, _Hash, _Pred, _Alloc │ │ │ │ - > &__y) │ │ │ │ -template │ │ │ │ -bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_=_= (const unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc > │ │ │ │ - &__x, const unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc > &__y) │ │ │ │ -template │ │ │ │ -bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_=_= (const unordered_multimap< _Key, _Tp, _Hash, _Pred, │ │ │ │ - _Alloc > &__x, const unordered_multimap< _Key, _Tp, _Hash, _Pred, _Alloc │ │ │ │ - > &__y) │ │ │ │ -template │ │ │ │ -void  _s_t_d_:_:_s_w_a_p (unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc > &__x, │ │ │ │ - unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc > &__y) noexcept(noexcept │ │ │ │ - (__x.swap(__y))) │ │ │ │ -template │ │ │ │ -void  _s_t_d_:_:_s_w_a_p (unordered_multimap< _Key, _Tp, _Hash, _Pred, _Alloc > &__x, │ │ │ │ - unordered_multimap< _Key, _Tp, _Hash, _Pred, _Alloc > &__y) noexcept │ │ │ │ - (noexcept(__x.swap(__y))) │ │ │ │ +#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_o_r_d_e_r_e_d___m_a_p_._h. │ │ │ │ +attempt to use it directly. Instead, include . │ │ │ │ +Definition in file _f_s_t_r_e_a_m_._t_c_c. │ │ │ │ ********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ -********** _?◆_? ____ccpppp__lliibb__uunnoorrddeerreedd__mmaapp__ttrryy__eemmppllaaccee ********** │ │ │ │ -#define __cpp_lib_unordered_map_try_emplace │ │ │ │ -Definition at line _4_4_6 of file _u_n_o_r_d_e_r_e_d___m_a_p_._h. │ │ │ │ +********** _?◆_? __FFSSTTRREEAAMM__TTCCCC ********** │ │ │ │ +#define _FSTREAM_TCC │ │ │ │ +Definition at line _3_5 of file _f_s_t_r_e_a_m_._t_c_c. │ │ │ │ * bbiittss │ │ │ │ - * _u_n_o_r_d_e_r_e_d___m_a_p_._h │ │ │ │ + * _f_s_t_r_e_a_m_._t_c_c │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.15.0 │ │ ├── ./usr/share/doc/gcc-11-base/libstdc++/user/a00368_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: unordered_map.h Source File │ │ │ +libstdc++: fstream.tcc Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -48,20 +48,20 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
unordered_map.h
│ │ │ +
fstream.tcc
│ │ │
│ │ │
│ │ │ -Go to the documentation of this file.
1// unordered_map implementation -*- C++ -*-
│ │ │ +Go to the documentation of this file.
1// File based streams -*- C++ -*-
│ │ │
2
│ │ │ -
3// Copyright (C) 2010-2021 Free Software Foundation, Inc.
│ │ │ +
3// Copyright (C) 1997-2021 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
│ │ │ @@ -75,2626 +75,1222 @@ │ │ │
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/fstream.tcc
│ │ │
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{fstream}
│ │ │
28 */
│ │ │
29
│ │ │ -
30#ifndef _UNORDERED_MAP_H
│ │ │ -
31#define _UNORDERED_MAP_H
│ │ │ -
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>,
│ │ │ - │ │ │ - │ │ │ -
48 using __umap_hashtable = _Hashtable<_Key, std::pair<const _Key, _Tp>,
│ │ │ -
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>,
│ │ │ - │ │ │ - │ │ │ -
65 using __ummap_hashtable = _Hashtable<_Key, std::pair<const _Key, _Tp>,
│ │ │ -
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 *
│ │ │ -
82 * @tparam _Key Type of key objects.
│ │ │ -
83 * @tparam _Tp Type of mapped objects.
│ │ │ -
84 * @tparam _Hash Hashing function object type, defaults to hash<_Value>.
│ │ │ -
85 * @tparam _Pred Predicate function object type, defaults
│ │ │ -
86 * to equal_to<_Value>.
│ │ │ -
87 * @tparam _Alloc Allocator type, defaults to
│ │ │ -
88 * std::allocator<std::pair<const _Key, _Tp>>.
│ │ │ -
89 *
│ │ │ -
90 * Meets the requirements of a <a href="tables.html#65">container</a>, and
│ │ │ -
91 * <a href="tables.html#xx">unordered associative container</a>
│ │ │ -
92 *
│ │ │ -
93 * The resulting value type of the container is std::pair<const _Key, _Tp>.
│ │ │ -
94 *
│ │ │ -
95 * Base is _Hashtable, dispatched at compile time via template
│ │ │ -
96 * alias __umap_hashtable.
│ │ │ -
97 */
│ │ │ -
98 template<typename _Key, typename _Tp,
│ │ │ -
99 typename _Hash = hash<_Key>,
│ │ │ -
100 typename _Pred = equal_to<_Key>,
│ │ │ -
101 typename _Alloc = allocator<std::pair<const _Key, _Tp>>>
│ │ │ -
│ │ │ - │ │ │ -
103 {
│ │ │ -
104 typedef __umap_hashtable<_Key, _Tp, _Hash, _Pred, _Alloc> _Hashtable;
│ │ │ -
105 _Hashtable _M_h;
│ │ │ -
106
│ │ │ -
107 public:
│ │ │ -
108 // typedefs:
│ │ │ -
109 ///@{
│ │ │ -
110 /// Public typedefs.
│ │ │ -
111 typedef typename _Hashtable::key_type key_type;
│ │ │ -
112 typedef typename _Hashtable::value_type value_type;
│ │ │ -
113 typedef typename _Hashtable::mapped_type mapped_type;
│ │ │ -
114 typedef typename _Hashtable::hasher hasher;
│ │ │ -
115 typedef typename _Hashtable::key_equal key_equal;
│ │ │ -
116 typedef typename _Hashtable::allocator_type allocator_type;
│ │ │ -
117 ///@}
│ │ │ -
118
│ │ │ -
119 ///@{
│ │ │ -
120 /// Iterator-related typedefs.
│ │ │ -
121 typedef typename _Hashtable::pointer pointer;
│ │ │ -
122 typedef typename _Hashtable::const_pointer const_pointer;
│ │ │ -
123 typedef typename _Hashtable::reference reference;
│ │ │ -
124 typedef typename _Hashtable::const_reference const_reference;
│ │ │ -
125 typedef typename _Hashtable::iterator iterator;
│ │ │ -
126 typedef typename _Hashtable::const_iterator const_iterator;
│ │ │ -
127 typedef typename _Hashtable::local_iterator local_iterator;
│ │ │ -
128 typedef typename _Hashtable::const_local_iterator const_local_iterator;
│ │ │ -
129 typedef typename _Hashtable::size_type size_type;
│ │ │ -
130 typedef typename _Hashtable::difference_type difference_type;
│ │ │ -
131 ///@}
│ │ │ -
132
│ │ │ -
133#if __cplusplus > 201402L
│ │ │ -
134 using node_type = typename _Hashtable::node_type;
│ │ │ -
135 using insert_return_type = typename _Hashtable::insert_return_type;
│ │ │ -
136#endif
│ │ │ -
137
│ │ │ -
138 //construct/destroy/copy
│ │ │ -
139
│ │ │ -
140 /// Default constructor.
│ │ │ -
141 unordered_map() = default;
│ │ │ -
142
│ │ │ -
143 /**
│ │ │ -
144 * @brief Default constructor creates no elements.
│ │ │ -
145 * @param __n Minimal initial number of buckets.
│ │ │ -
146 * @param __hf A hash functor.
│ │ │ -
147 * @param __eql A key equality functor.
│ │ │ -
148 * @param __a An allocator object.
│ │ │ -
149 */
│ │ │ -
150 explicit
│ │ │ -
│ │ │ - │ │ │ -
152 const hasher& __hf = hasher(),
│ │ │ -
153 const key_equal& __eql = key_equal(),
│ │ │ -
154 const allocator_type& __a = allocator_type())
│ │ │ -
155 : _M_h(__n, __hf, __eql, __a)
│ │ │ -
156 { }
│ │ │ -
│ │ │ -
157
│ │ │ -
158 /**
│ │ │ -
159 * @brief Builds an %unordered_map from a range.
│ │ │ -
160 * @param __first An input iterator.
│ │ │ -
161 * @param __last An input iterator.
│ │ │ -
162 * @param __n Minimal initial number of buckets.
│ │ │ -
163 * @param __hf A hash functor.
│ │ │ -
164 * @param __eql A key equality functor.
│ │ │ -
165 * @param __a An allocator object.
│ │ │ -
166 *
│ │ │ -
167 * Create an %unordered_map consisting of copies of the elements from
│ │ │ -
168 * [__first,__last). This is linear in N (where N is
│ │ │ -
169 * distance(__first,__last)).
│ │ │ -
170 */
│ │ │ -
171 template<typename _InputIterator>
│ │ │ -
│ │ │ -
172 unordered_map(_InputIterator __first, _InputIterator __last,
│ │ │ -
173 size_type __n = 0,
│ │ │ -
174 const hasher& __hf = hasher(),
│ │ │ -
175 const key_equal& __eql = key_equal(),
│ │ │ -
176 const allocator_type& __a = allocator_type())
│ │ │ -
177 : _M_h(__first, __last, __n, __hf, __eql, __a)
│ │ │ -
178 { }
│ │ │ -
│ │ │ -
179
│ │ │ -
180 /// Copy constructor.
│ │ │ -
181 unordered_map(const unordered_map&) = default;
│ │ │ -
182
│ │ │ -
183 /// Move constructor.
│ │ │ - │ │ │ -
185
│ │ │ -
186 /**
│ │ │ -
187 * @brief Creates an %unordered_map with no elements.
│ │ │ -
188 * @param __a An allocator object.
│ │ │ -
189 */
│ │ │ -
190 explicit
│ │ │ -
│ │ │ - │ │ │ -
192 : _M_h(__a)
│ │ │ -
193 { }
│ │ │ -
│ │ │ -
194
│ │ │ -
195 /*
│ │ │ -
196 * @brief Copy constructor with allocator argument.
│ │ │ -
197 * @param __uset Input %unordered_map to copy.
│ │ │ -
198 * @param __a An allocator object.
│ │ │ -
199 */
│ │ │ -
200 unordered_map(const unordered_map& __umap,
│ │ │ -
201 const allocator_type& __a)
│ │ │ -
202 : _M_h(__umap._M_h, __a)
│ │ │ -
203 { }
│ │ │ -
204
│ │ │ -
205 /*
│ │ │ -
206 * @brief Move constructor with allocator argument.
│ │ │ -
207 * @param __uset Input %unordered_map to move.
│ │ │ -
208 * @param __a An allocator object.
│ │ │ -
209 */
│ │ │ -
210 unordered_map(unordered_map&& __umap,
│ │ │ -
211 const allocator_type& __a)
│ │ │ -
212 noexcept( noexcept(_Hashtable(std::move(__umap._M_h), __a)) )
│ │ │ -
213 : _M_h(std::move(__umap._M_h), __a)
│ │ │ -
214 { }
│ │ │ -
215
│ │ │ -
216 /**
│ │ │ -
217 * @brief Builds an %unordered_map from an initializer_list.
│ │ │ -
218 * @param __l An initializer_list.
│ │ │ -
219 * @param __n Minimal initial number of buckets.
│ │ │ -
220 * @param __hf A hash functor.
│ │ │ -
221 * @param __eql A key equality functor.
│ │ │ -
222 * @param __a An allocator object.
│ │ │ -
223 *
│ │ │ -
224 * Create an %unordered_map consisting of copies of the elements in the
│ │ │ -
225 * list. This is linear in N (where N is @a __l.size()).
│ │ │ -
226 */
│ │ │ -
│ │ │ - │ │ │ -
228 size_type __n = 0,
│ │ │ -
229 const hasher& __hf = hasher(),
│ │ │ -
230 const key_equal& __eql = key_equal(),
│ │ │ -
231 const allocator_type& __a = allocator_type())
│ │ │ -
232 : _M_h(__l, __n, __hf, __eql, __a)
│ │ │ -
233 { }
│ │ │ -
│ │ │ -
234
│ │ │ -
235 unordered_map(size_type __n, const allocator_type& __a)
│ │ │ -
236 : unordered_map(__n, hasher(), key_equal(), __a)
│ │ │ -
237 { }
│ │ │ -
238
│ │ │ -
239 unordered_map(size_type __n, const hasher& __hf,
│ │ │ -
240 const allocator_type& __a)
│ │ │ -
241 : unordered_map(__n, __hf, key_equal(), __a)
│ │ │ -
242 { }
│ │ │ -
243
│ │ │ -
244 template<typename _InputIterator>
│ │ │ -
245 unordered_map(_InputIterator __first, _InputIterator __last,
│ │ │ -
246 size_type __n,
│ │ │ -
247 const allocator_type& __a)
│ │ │ -
248 : unordered_map(__first, __last, __n, hasher(), key_equal(), __a)
│ │ │ -
249 { }
│ │ │ -
250
│ │ │ -
251 template<typename _InputIterator>
│ │ │ -
252 unordered_map(_InputIterator __first, _InputIterator __last,
│ │ │ -
253 size_type __n, const hasher& __hf,
│ │ │ -
254 const allocator_type& __a)
│ │ │ -
255 : unordered_map(__first, __last, __n, __hf, key_equal(), __a)
│ │ │ -
256 { }
│ │ │ -
257
│ │ │ -
258 unordered_map(initializer_list<value_type> __l,
│ │ │ -
259 size_type __n,
│ │ │ -
260 const allocator_type& __a)
│ │ │ -
261 : unordered_map(__l, __n, hasher(), key_equal(), __a)
│ │ │ -
262 { }
│ │ │ -
263
│ │ │ -
264 unordered_map(initializer_list<value_type> __l,
│ │ │ -
265 size_type __n, const hasher& __hf,
│ │ │ -
266 const allocator_type& __a)
│ │ │ -
267 : unordered_map(__l, __n, __hf, key_equal(), __a)
│ │ │ -
268 { }
│ │ │ -
269
│ │ │ -
270 /// Copy assignment operator.
│ │ │ - │ │ │ -
272 operator=(const unordered_map&) = default;
│ │ │ -
273
│ │ │ -
274 /// Move assignment operator.
│ │ │ - │ │ │ - │ │ │ -
277
│ │ │ -
278 /**
│ │ │ -
279 * @brief %Unordered_map list assignment operator.
│ │ │ -
280 * @param __l An initializer_list.
│ │ │ -
281 *
│ │ │ -
282 * This function fills an %unordered_map with copies of the elements in
│ │ │ -
283 * the initializer list @a __l.
│ │ │ -
284 *
│ │ │ -
285 * Note that the assignment completely changes the %unordered_map and
│ │ │ -
286 * that the resulting %unordered_map's size is the same as the number
│ │ │ -
287 * of elements assigned.
│ │ │ -
288 */
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
291 {
│ │ │ -
292 _M_h = __l;
│ │ │ -
293 return *this;
│ │ │ -
294 }
│ │ │ -
│ │ │ -
295
│ │ │ -
296 /// Returns the allocator object used by the %unordered_map.
│ │ │ - │ │ │ -
│ │ │ -
298 get_allocator() const noexcept
│ │ │ -
299 { return _M_h.get_allocator(); }
│ │ │ -
│ │ │ -
300
│ │ │ -
301 // size and capacity:
│ │ │ -
302
│ │ │ -
303 /// Returns true if the %unordered_map is empty.
│ │ │ -
304 _GLIBCXX_NODISCARD bool
│ │ │ -
│ │ │ -
305 empty() const noexcept
│ │ │ -
306 { return _M_h.empty(); }
│ │ │ -
│ │ │ -
307
│ │ │ -
308 /// Returns the size of the %unordered_map.
│ │ │ - │ │ │ -
│ │ │ -
310 size() const noexcept
│ │ │ -
311 { return _M_h.size(); }
│ │ │ -
│ │ │ -
312
│ │ │ -
313 /// Returns the maximum size of the %unordered_map.
│ │ │ - │ │ │ +
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
│ │ │ + │ │ │ + │ │ │ +
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 template<typename _CharT, typename _Traits>
│ │ │ +
62 void
│ │ │ + │ │ │ + │ │ │ +
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(),
│ │ │ + │ │ │ +
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
│ │ │ + │ │ │ +
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 _CharT, typename _Traits>
│ │ │ +
178 typename basic_filebuf<_CharT, _Traits>::__filebuf_type*
│ │ │ +
│ │ │ + │ │ │ +
180 open(const char* __s, ios_base::openmode __mode)
│ │ │ +
181 {
│ │ │ +
182 __filebuf_type *__ret = 0;
│ │ │ +
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 // 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 {
│ │ │ +
260 basic_filebuf *__fb;
│ │ │ +
261 __close_sentry (basic_filebuf *__fbi): __fb(__fbi) { }
│ │ │ +
262 ~__close_sentry ()
│ │ │ +
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 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 max_size() const noexcept
│ │ │ -
316 { return _M_h.max_size(); }
│ │ │ -
│ │ │ -
317
│ │ │ -
318 // iterators.
│ │ │ -
319
│ │ │ -
320 /**
│ │ │ -
321 * Returns a read/write iterator that points to the first element in the
│ │ │ -
322 * %unordered_map.
│ │ │ -
323 */
│ │ │ - │ │ │ -
│ │ │ -
325 begin() noexcept
│ │ │ -
326 { return _M_h.begin(); }
│ │ │ -
│ │ │ -
327
│ │ │ -
328 ///@{
│ │ │ -
329 /**
│ │ │ -
330 * Returns a read-only (constant) iterator that points to the first
│ │ │ -
331 * element in the %unordered_map.
│ │ │ -
332 */
│ │ │ -
333 const_iterator
│ │ │ -
│ │ │ -
334 begin() const noexcept
│ │ │ -
335 { return _M_h.begin(); }
│ │ │ -
│ │ │ -
336
│ │ │ -
337 const_iterator
│ │ │ -
│ │ │ -
338 cbegin() const noexcept
│ │ │ -
339 { return _M_h.begin(); }
│ │ │ -
│ │ │ -
340 ///@}
│ │ │ -
341
│ │ │ -
342 /**
│ │ │ -
343 * Returns a read/write iterator that points one past the last element in
│ │ │ -
344 * the %unordered_map.
│ │ │ -
345 */
│ │ │ - │ │ │ -
│ │ │ -
347 end() noexcept
│ │ │ -
348 { return _M_h.end(); }
│ │ │ -
│ │ │ -
349
│ │ │ -
350 ///@{
│ │ │ -
351 /**
│ │ │ -
352 * Returns a read-only (constant) iterator that points one past the last
│ │ │ -
353 * element in the %unordered_map.
│ │ │ -
354 */
│ │ │ -
355 const_iterator
│ │ │ -
│ │ │ -
356 end() const noexcept
│ │ │ -
357 { return _M_h.end(); }
│ │ │ -
│ │ │ -
358
│ │ │ -
359 const_iterator
│ │ │ -
│ │ │ -
360 cend() const noexcept
│ │ │ -
361 { return _M_h.end(); }
│ │ │ -
│ │ │ -
362 ///@}
│ │ │ -
363
│ │ │ -
364 // modifiers.
│ │ │ -
365
│ │ │ -
366 /**
│ │ │ -
367 * @brief Attempts to build and insert a std::pair into the
│ │ │ -
368 * %unordered_map.
│ │ │ -
369 *
│ │ │ -
370 * @param __args Arguments used to generate a new pair instance (see
│ │ │ -
371 * std::piecewise_contruct for passing arguments to each
│ │ │ -
372 * part of the pair constructor).
│ │ │ -
373 *
│ │ │ -
374 * @return A pair, of which the first element is an iterator that points
│ │ │ -
375 * to the possibly inserted pair, and the second is a bool that
│ │ │ -
376 * is true if the pair was actually inserted.
│ │ │ -
377 *
│ │ │ -
378 * This function attempts to build and insert a (key, value) %pair into
│ │ │ -
379 * the %unordered_map.
│ │ │ -
380 * An %unordered_map relies on unique keys and thus a %pair is only
│ │ │ -
381 * inserted if its first element (the key) is not already present in the
│ │ │ -
382 * %unordered_map.
│ │ │ -
383 *
│ │ │ -
384 * Insertion requires amortized constant time.
│ │ │ -
385 */
│ │ │ -
386 template<typename... _Args>
│ │ │ - │ │ │ +
315#endif
│ │ │ +
316 __ret += _M_file.showmanyc() / _M_codecvt->max_length();
│ │ │ +
317 }
│ │ │ +
318 return __ret;
│ │ │ +
319 }
│ │ │ +
320
│ │ │ +
321 template<typename _CharT, typename _Traits>
│ │ │ + │ │ │ +
│ │ │ + │ │ │ + │ │ │ +
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...
│ │ │ + │ │ │ +
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)
│ │ │ +
368 __blen = __rlen = __buflen * __enc;
│ │ │ +
369 else
│ │ │ +
370 {
│ │ │ +
371 __blen = __buflen + _M_codecvt->max_length() - 1;
│ │ │ +
372 __rlen = __buflen;
│ │ │ +
373 }
│ │ │ +
374 const streamsize __remainder = _M_ext_end - _M_ext_next;
│ │ │ +
375 __rlen = __rlen > __remainder ? __rlen - __remainder : 0;
│ │ │ +
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)
│ │ │
│ │ │ -
388 emplace(_Args&&... __args)
│ │ │ -
389 { return _M_h.emplace(std::forward<_Args>(__args)...); }
│ │ │ -
│ │ │ -
390
│ │ │ -
391 /**
│ │ │ -
392 * @brief Attempts to build and insert a std::pair into the
│ │ │ -
393 * %unordered_map.
│ │ │ -
394 *
│ │ │ -
395 * @param __pos An iterator that serves as a hint as to where the pair
│ │ │ -
396 * should be inserted.
│ │ │ -
397 * @param __args Arguments used to generate a new pair instance (see
│ │ │ -
398 * std::piecewise_contruct for passing arguments to each
│ │ │ -
399 * part of the pair constructor).
│ │ │ -
400 * @return An iterator that points to the element with key of the
│ │ │ -
401 * std::pair built from @a __args (may or may not be that
│ │ │ -
402 * std::pair).
│ │ │ -
403 *
│ │ │ -
404 * This function is not concerned about whether the insertion took place,
│ │ │ -
405 * and thus does not return a boolean like the single-argument emplace()
│ │ │ -
406 * does.
│ │ │ -
407 * Note that the first parameter is only a hint and can potentially
│ │ │ -
408 * improve the performance of the insertion process. A bad hint would
│ │ │ -
409 * cause no gains in efficiency.
│ │ │ -
410 *
│ │ │ -
411 * See
│ │ │ -
412 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/associative.html#containers.associative.insert_hints
│ │ │ -
413 * for more on @a hinting.
│ │ │ -
414 *
│ │ │ -
415 * Insertion requires amortized constant time.
│ │ │ -
416 */
│ │ │ -
417 template<typename... _Args>
│ │ │ - │ │ │ -
│ │ │ -
419 emplace_hint(const_iterator __pos, _Args&&... __args)
│ │ │ -
420 { return _M_h.emplace_hint(__pos, std::forward<_Args>(__args)...); }
│ │ │ -
│ │ │ -
421
│ │ │ -
422#if __cplusplus > 201402L
│ │ │ -
423 /// Extract a node.
│ │ │ -
424 node_type
│ │ │ +
388 __builtin_memcpy(__buf, _M_ext_next, __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,
│ │ │
│ │ │ - │ │ │ -
426 {
│ │ │ -
427 __glibcxx_assert(__pos != end());
│ │ │ -
428 return _M_h.extract(__pos);
│ │ │ -
429 }
│ │ │ -
│ │ │ -
430
│ │ │ -
431 /// Extract a node.
│ │ │ -
432 node_type
│ │ │ -
│ │ │ -
433 extract(const key_type& __key)
│ │ │ -
434 { return _M_h.extract(__key); }
│ │ │ -
│ │ │ -
435
│ │ │ -
436 /// Re-insert an extracted node.
│ │ │ -
437 insert_return_type
│ │ │ -
│ │ │ -
438 insert(node_type&& __nh)
│ │ │ -
439 { return _M_h._M_reinsert_node(std::move(__nh)); }
│ │ │ -
│ │ │ -
440
│ │ │ -
441 /// Re-insert an extracted node.
│ │ │ - │ │ │ -
│ │ │ -
443 insert(const_iterator, node_type&& __nh)
│ │ │ -
444 { return _M_h._M_reinsert_node(std::move(__nh)).position; }
│ │ │ -
│ │ │ -
445
│ │ │ -
446#define __cpp_lib_unordered_map_try_emplace 201411
│ │ │ -
447 /**
│ │ │ -
448 * @brief Attempts to build and insert a std::pair into the
│ │ │ -
449 * %unordered_map.
│ │ │ -
450 *
│ │ │ -
451 * @param __k Key to use for finding a possibly existing pair in
│ │ │ -
452 * the unordered_map.
│ │ │ -
453 * @param __args Arguments used to generate the .second for a
│ │ │ -
454 * new pair instance.
│ │ │ -
455 *
│ │ │ -
456 * @return A pair, of which the first element is an iterator that points
│ │ │ -
457 * to the possibly inserted pair, and the second is a bool that
│ │ │ -
458 * is true if the pair was actually inserted.
│ │ │ -
459 *
│ │ │ -
460 * This function attempts to build and insert a (key, value) %pair into
│ │ │ -
461 * the %unordered_map.
│ │ │ -
462 * An %unordered_map relies on unique keys and thus a %pair is only
│ │ │ -
463 * inserted if its first element (the key) is not already present in the
│ │ │ -
464 * %unordered_map.
│ │ │ -
465 * If a %pair is not inserted, this function has no effect.
│ │ │ -
466 *
│ │ │ -
467 * Insertion requires amortized constant time.
│ │ │ -
468 */
│ │ │ -
469 template <typename... _Args>
│ │ │ - │ │ │ -
│ │ │ -
471 try_emplace(const key_type& __k, _Args&&... __args)
│ │ │ -
472 {
│ │ │ -
473 return _M_h.try_emplace(cend(), __k, std::forward<_Args>(__args)...);
│ │ │ -
474 }
│ │ │ -
│ │ │ -
475
│ │ │ -
476 // move-capable overload
│ │ │ -
477 template <typename... _Args>
│ │ │ - │ │ │ -
479 try_emplace(key_type&& __k, _Args&&... __args)
│ │ │ -
480 {
│ │ │ -
481 return _M_h.try_emplace(cend(), std::move(__k),
│ │ │ -
482 std::forward<_Args>(__args)...);
│ │ │ -
483 }
│ │ │ -
484
│ │ │ -
485 /**
│ │ │ -
486 * @brief Attempts to build and insert a std::pair into the
│ │ │ -
487 * %unordered_map.
│ │ │ -
488 *
│ │ │ -
489 * @param __hint An iterator that serves as a hint as to where the pair
│ │ │ -
490 * should be inserted.
│ │ │ -
491 * @param __k Key to use for finding a possibly existing pair in
│ │ │ -
492 * the unordered_map.
│ │ │ -
493 * @param __args Arguments used to generate the .second for a
│ │ │ -
494 * new pair instance.
│ │ │ -
495 * @return An iterator that points to the element with key of the
│ │ │ -
496 * std::pair built from @a __args (may or may not be that
│ │ │ -
497 * std::pair).
│ │ │ -
498 *
│ │ │ -
499 * This function is not concerned about whether the insertion took place,
│ │ │ -
500 * and thus does not return a boolean like the single-argument emplace()
│ │ │ -
501 * does. However, if insertion did not take place,
│ │ │ -
502 * this function has no effect.
│ │ │ -
503 * Note that the first parameter is only a hint and can potentially
│ │ │ -
504 * improve the performance of the insertion process. A bad hint would
│ │ │ -
505 * cause no gains in efficiency.
│ │ │ -
506 *
│ │ │ -
507 * See
│ │ │ -
508 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/associative.html#containers.associative.insert_hints
│ │ │ -
509 * for more on @a hinting.
│ │ │ -
510 *
│ │ │ -
511 * Insertion requires amortized constant time.
│ │ │ -
512 */
│ │ │ -
513 template <typename... _Args>
│ │ │ -
514 iterator
│ │ │ -
│ │ │ - │ │ │ -
516 _Args&&... __args)
│ │ │ -
517 {
│ │ │ -
518 return _M_h.try_emplace(__hint, __k,
│ │ │ -
519 std::forward<_Args>(__args)...).first;
│ │ │ -
520 }
│ │ │ -
│ │ │ +
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;
│ │ │ +
431 __ilen = std::min(__avail, __buflen);
│ │ │ +
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();
│ │ │ +
│ │ │ + │ │ │ +
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 // move-capable overload
│ │ │ -
523 template <typename... _Args>
│ │ │ - │ │ │ -
525 try_emplace(const_iterator __hint, key_type&& __k, _Args&&... __args)
│ │ │ -
526 {
│ │ │ -
527 return _M_h.try_emplace(__hint, std::move(__k),
│ │ │ -
528 std::forward<_Args>(__args)...).first;
│ │ │ -
529 }
│ │ │ -
530#endif // C++17
│ │ │ -
531
│ │ │ -
532 ///@{
│ │ │ -
533 /**
│ │ │ -
534 * @brief Attempts to insert a std::pair into the %unordered_map.
│ │ │ -
535
│ │ │ -
536 * @param __x Pair to be inserted (see std::make_pair for easy
│ │ │ -
537 * creation of pairs).
│ │ │ -
538 *
│ │ │ -
539 * @return A pair, of which the first element is an iterator that
│ │ │ -
540 * points to the possibly inserted pair, and the second is
│ │ │ -
541 * a bool that is true if the pair was actually inserted.
│ │ │ -
542 *
│ │ │ -
543 * This function attempts to insert a (key, value) %pair into the
│ │ │ -
544 * %unordered_map. An %unordered_map relies on unique keys and thus a
│ │ │ -
545 * %pair is only inserted if its first element (the key) is not already
│ │ │ -
546 * present in the %unordered_map.
│ │ │ -
547 *
│ │ │ -
548 * Insertion requires amortized constant time.
│ │ │ -
549 */
│ │ │ - │ │ │ -
│ │ │ -
551 insert(const value_type& __x)
│ │ │ -
552 { return _M_h.insert(__x); }
│ │ │ -
│ │ │ -
553
│ │ │ -
554 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ -
555 // 2354. Unnecessary copying when inserting into maps with braced-init
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
558 { return _M_h.insert(std::move(__x)); }
│ │ │ -
│ │ │ -
559
│ │ │ -
560 template<typename _Pair>
│ │ │ -
561 __enable_if_t<is_constructible<value_type, _Pair&&>::value,
│ │ │ - │ │ │ -
│ │ │ -
563 insert(_Pair&& __x)
│ │ │ -
564 { return _M_h.emplace(std::forward<_Pair>(__x)); }
│ │ │ -
│ │ │ -
565 ///@}
│ │ │ -
566
│ │ │ -
567 ///@{
│ │ │ -
568 /**
│ │ │ -
569 * @brief Attempts to insert a std::pair into the %unordered_map.
│ │ │ -
570 * @param __hint An iterator that serves as a hint as to where the
│ │ │ -
571 * pair should be inserted.
│ │ │ -
572 * @param __x Pair to be inserted (see std::make_pair for easy creation
│ │ │ -
573 * of pairs).
│ │ │ -
574 * @return An iterator that points to the element with key of
│ │ │ -
575 * @a __x (may or may not be the %pair passed in).
│ │ │ -
576 *
│ │ │ -
577 * This function is not concerned about whether the insertion took place,
│ │ │ -
578 * and thus does not return a boolean like the single-argument insert()
│ │ │ -
579 * does. Note that the first parameter is only a hint and can
│ │ │ -
580 * potentially improve the performance of the insertion process. A bad
│ │ │ -
581 * hint would cause no gains in efficiency.
│ │ │ -
582 *
│ │ │ -
583 * See
│ │ │ -
584 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/associative.html#containers.associative.insert_hints
│ │ │ -
585 * for more on @a hinting.
│ │ │ -
586 *
│ │ │ -
587 * Insertion requires amortized constant time.
│ │ │ -
588 */
│ │ │ - │ │ │ -
│ │ │ -
590 insert(const_iterator __hint, const value_type& __x)
│ │ │ -
591 { return _M_h.insert(__hint, __x); }
│ │ │ -
│ │ │ -
592
│ │ │ -
593 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ -
594 // 2354. Unnecessary copying when inserting into maps with braced-init
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
597 { return _M_h.insert(__hint, std::move(__x)); }
│ │ │ -
│ │ │ -
598
│ │ │ -
599 template<typename _Pair>
│ │ │ -
600 __enable_if_t<is_constructible<value_type, _Pair&&>::value, iterator>
│ │ │ -
│ │ │ -
601 insert(const_iterator __hint, _Pair&& __x)
│ │ │ -
602 { return _M_h.emplace_hint(__hint, std::forward<_Pair>(__x)); }
│ │ │ -
│ │ │ -
603 ///@}
│ │ │ -
604
│ │ │ -
605 /**
│ │ │ -
606 * @brief A template function that attempts to insert a range of
│ │ │ -
607 * elements.
│ │ │ -
608 * @param __first Iterator pointing to the start of the range to be
│ │ │ -
609 * inserted.
│ │ │ -
610 * @param __last Iterator pointing to the end of the range.
│ │ │ -
611 *
│ │ │ -
612 * Complexity similar to that of the range constructor.
│ │ │ -
613 */
│ │ │ -
614 template<typename _InputIterator>
│ │ │ -
615 void
│ │ │ -
│ │ │ -
616 insert(_InputIterator __first, _InputIterator __last)
│ │ │ -
617 { _M_h.insert(__first, __last); }
│ │ │ -
│ │ │ -
618
│ │ │ -
619 /**
│ │ │ -
620 * @brief Attempts to insert a list of elements into the %unordered_map.
│ │ │ -
621 * @param __l A std::initializer_list<value_type> of elements
│ │ │ -
622 * to be inserted.
│ │ │ -
623 *
│ │ │ -
624 * Complexity similar to that of the range constructor.
│ │ │ -
625 */
│ │ │ -
626 void
│ │ │ -
│ │ │ - │ │ │ -
628 { _M_h.insert(__l); }
│ │ │ -
│ │ │ +
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 {
│ │ │ + │ │ │ +
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
│ │ │ + │ │ │ +
548 if (__testout)
│ │ │ +
549 {
│ │ │ +
550 if (_M_reading)
│ │ │ +
551 {
│ │ │ + │ │ │ +
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
│ │ │ + │ │ │ +
607 _M_convert_to_external(_CharT* __ibuf, streamsize __ilen)
│ │ │ +
608 {
│ │ │ +
609 // Sizes of external and pending output.
│ │ │ +
610 streamsize __elen;
│ │ │ +
611 streamsize __plen;
│ │ │ +
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
│ │ │ -
631#if __cplusplus > 201402L
│ │ │ -
632 /**
│ │ │ -
633 * @brief Attempts to insert a std::pair into the %unordered_map.
│ │ │ -
634 * @param __k Key to use for finding a possibly existing pair in
│ │ │ -
635 * the map.
│ │ │ -
636 * @param __obj Argument used to generate the .second for a pair
│ │ │ -
637 * instance.
│ │ │ -
638 *
│ │ │ -
639 * @return A pair, of which the first element is an iterator that
│ │ │ -
640 * points to the possibly inserted pair, and the second is
│ │ │ -
641 * a bool that is true if the pair was actually inserted.
│ │ │ -
642 *
│ │ │ -
643 * This function attempts to insert a (key, value) %pair into the
│ │ │ -
644 * %unordered_map. An %unordered_map relies on unique keys and thus a
│ │ │ -
645 * %pair is only inserted if its first element (the key) is not already
│ │ │ -
646 * present in the %unordered_map.
│ │ │ -
647 * If the %pair was already in the %unordered_map, the .second of
│ │ │ -
648 * the %pair is assigned from __obj.
│ │ │ -
649 *
│ │ │ -
650 * Insertion requires amortized constant time.
│ │ │ -
651 */
│ │ │ -
652 template <typename _Obj>
│ │ │ - │ │ │ -
│ │ │ -
654 insert_or_assign(const key_type& __k, _Obj&& __obj)
│ │ │ -
655 {
│ │ │ -
656 auto __ret = _M_h.try_emplace(cend(), __k,
│ │ │ -
657 std::forward<_Obj>(__obj));
│ │ │ -
658 if (!__ret.second)
│ │ │ -
659 __ret.first->second = std::forward<_Obj>(__obj);
│ │ │ -
660 return __ret;
│ │ │ -
661 }
│ │ │ -
│ │ │ -
662
│ │ │ -
663 // move-capable overload
│ │ │ -
664 template <typename _Obj>
│ │ │ - │ │ │ -
666 insert_or_assign(key_type&& __k, _Obj&& __obj)
│ │ │ -
667 {
│ │ │ -
668 auto __ret = _M_h.try_emplace(cend(), std::move(__k),
│ │ │ -
669 std::forward<_Obj>(__obj));
│ │ │ -
670 if (!__ret.second)
│ │ │ -
671 __ret.first->second = std::forward<_Obj>(__obj);
│ │ │ -
672 return __ret;
│ │ │ -
673 }
│ │ │ -
674
│ │ │ -
675 /**
│ │ │ -
676 * @brief Attempts to insert a std::pair into the %unordered_map.
│ │ │ -
677 * @param __hint An iterator that serves as a hint as to where the
│ │ │ -
678 * pair should be inserted.
│ │ │ -
679 * @param __k Key to use for finding a possibly existing pair in
│ │ │ -
680 * the unordered_map.
│ │ │ -
681 * @param __obj Argument used to generate the .second for a pair
│ │ │ -
682 * instance.
│ │ │ -
683 * @return An iterator that points to the element with key of
│ │ │ -
684 * @a __x (may or may not be the %pair passed in).
│ │ │ -
685 *
│ │ │ -
686 * This function is not concerned about whether the insertion took place,
│ │ │ -
687 * and thus does not return a boolean like the single-argument insert()
│ │ │ -
688 * does.
│ │ │ -
689 * If the %pair was already in the %unordered map, the .second of
│ │ │ -
690 * the %pair is assigned from __obj.
│ │ │ -
691 * Note that the first parameter is only a hint and can
│ │ │ -
692 * potentially improve the performance of the insertion process. A bad
│ │ │ -
693 * hint would cause no gains in efficiency.
│ │ │ -
694 *
│ │ │ -
695 * See
│ │ │ -
696 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/associative.html#containers.associative.insert_hints
│ │ │ -
697 * for more on @a hinting.
│ │ │ -
698 *
│ │ │ -
699 * Insertion requires amortized constant time.
│ │ │ -
700 */
│ │ │ -
701 template <typename _Obj>
│ │ │ -
702 iterator
│ │ │ -
│ │ │ - │ │ │ -
704 _Obj&& __obj)
│ │ │ -
705 {
│ │ │ -
706 auto __ret = _M_h.try_emplace(__hint, __k, std::forward<_Obj>(__obj));
│ │ │ -
707 if (!__ret.second)
│ │ │ -
708 __ret.first->second = std::forward<_Obj>(__obj);
│ │ │ -
709 return __ret.first;
│ │ │ -
710 }
│ │ │ -
│ │ │ -
711
│ │ │ -
712 // move-capable overload
│ │ │ -
713 template <typename _Obj>
│ │ │ - │ │ │ -
715 insert_or_assign(const_iterator __hint, key_type&& __k, _Obj&& __obj)
│ │ │ -
716 {
│ │ │ -
717 auto __ret = _M_h.try_emplace(__hint, std::move(__k),
│ │ │ -
718 std::forward<_Obj>(__obj));
│ │ │ -
719 if (!__ret.second)
│ │ │ -
720 __ret.first->second = std::forward<_Obj>(__obj);
│ │ │ -
721 return __ret.first;
│ │ │ -
722 }
│ │ │ -
723#endif
│ │ │ -
724
│ │ │ -
725 ///@{
│ │ │ -
726 /**
│ │ │ -
727 * @brief Erases an element from an %unordered_map.
│ │ │ -
728 * @param __position An iterator pointing to the element to be erased.
│ │ │ -
729 * @return An iterator pointing to the element immediately following
│ │ │ -
730 * @a __position prior to the element being erased. If no such
│ │ │ -
731 * element exists, end() is returned.
│ │ │ -
732 *
│ │ │ -
733 * This function erases an element, pointed to by the given iterator,
│ │ │ -
734 * from an %unordered_map.
│ │ │ -
735 * Note that this function only erases the element, and that if the
│ │ │ -
736 * element is itself a pointer, the pointed-to memory is not touched in
│ │ │ -
737 * any way. Managing the pointer is the user's responsibility.
│ │ │ -
738 */
│ │ │ -
739 iterator
│ │ │ -
│ │ │ - │ │ │ -
741 { return _M_h.erase(__position); }
│ │ │ -
│ │ │ -
742
│ │ │ -
743 // LWG 2059.
│ │ │ - │ │ │ -
│ │ │ -
745 erase(iterator __position)
│ │ │ -
746 { return _M_h.erase(__position); }
│ │ │ -
│ │ │ -
747 ///@}
│ │ │ -
748
│ │ │ -
749 /**
│ │ │ -
750 * @brief Erases elements according to the provided key.
│ │ │ -
751 * @param __x Key of element to be erased.
│ │ │ -
752 * @return The number of elements erased.
│ │ │ -
753 *
│ │ │ -
754 * This function erases all the elements located by the given key from
│ │ │ -
755 * an %unordered_map. For an %unordered_map the result of this function
│ │ │ -
756 * can only be 0 (not present) or 1 (present).
│ │ │ -
757 * Note that this function only erases the element, and that if the
│ │ │ -
758 * element is itself a pointer, the pointed-to memory is not touched in
│ │ │ -
759 * any way. Managing the pointer is the user's responsibility.
│ │ │ -
760 */
│ │ │ - │ │ │ -
│ │ │ -
762 erase(const key_type& __x)
│ │ │ -
763 { return _M_h.erase(__x); }
│ │ │ -
│ │ │ -
764
│ │ │ -
765 /**
│ │ │ -
766 * @brief Erases a [__first,__last) range of elements from an
│ │ │ -
767 * %unordered_map.
│ │ │ -
768 * @param __first Iterator pointing to the start of the range to be
│ │ │ -
769 * erased.
│ │ │ -
770 * @param __last Iterator pointing to the end of the range to
│ │ │ -
771 * be erased.
│ │ │ -
772 * @return The iterator @a __last.
│ │ │ -
773 *
│ │ │ -
774 * This function erases a sequence of elements from an %unordered_map.
│ │ │ -
775 * Note that this function only erases the elements, and that if
│ │ │ -
776 * the element is itself a pointer, the pointed-to memory is not touched
│ │ │ -
777 * in any way. Managing the pointer is the user's responsibility.
│ │ │ -
778 */
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
781 { return _M_h.erase(__first, __last); }
│ │ │ -
│ │ │ -
782
│ │ │ -
783 /**
│ │ │ -
784 * Erases all elements in an %unordered_map.
│ │ │ -
785 * Note that this function only erases the elements, and that if the
│ │ │ -
786 * elements themselves are pointers, the pointed-to memory is not touched
│ │ │ -
787 * in any way. Managing the pointer is the user's responsibility.
│ │ │ -
788 */
│ │ │ -
789 void
│ │ │ -
│ │ │ -
790 clear() noexcept
│ │ │ -
791 { _M_h.clear(); }
│ │ │ -
│ │ │ -
792
│ │ │ -
793 /**
│ │ │ -
794 * @brief Swaps data with another %unordered_map.
│ │ │ -
795 * @param __x An %unordered_map of the same element and allocator
│ │ │ -
796 * types.
│ │ │ -
797 *
│ │ │ -
798 * This exchanges the elements between two %unordered_map in constant
│ │ │ -
799 * time.
│ │ │ -
800 * Note that the global std::swap() function is specialized such that
│ │ │ -
801 * std::swap(m1,m2) will feed to this function.
│ │ │ -
802 */
│ │ │ -
803 void
│ │ │ -
│ │ │ - │ │ │ -
805 noexcept( noexcept(_M_h.swap(__x._M_h)) )
│ │ │ -
806 { _M_h.swap(__x._M_h); }
│ │ │ -
│ │ │ -
807
│ │ │ -
808#if __cplusplus > 201402L
│ │ │ -
809 template<typename, typename, typename>
│ │ │ -
810 friend class std::_Hash_merge_helper;
│ │ │ -
811
│ │ │ -
812 template<typename _H2, typename _P2>
│ │ │ -
813 void
│ │ │ - │ │ │ -
815 {
│ │ │ -
816 using _Merge_helper = _Hash_merge_helper<unordered_map, _H2, _P2>;
│ │ │ -
817 _M_h._M_merge_unique(_Merge_helper::_S_get_table(__source));
│ │ │ -
818 }
│ │ │ -
819
│ │ │ -
820 template<typename _H2, typename _P2>
│ │ │ -
821 void
│ │ │ -
822 merge(unordered_map<_Key, _Tp, _H2, _P2, _Alloc>&& __source)
│ │ │ -
823 { merge(__source); }
│ │ │ -
824
│ │ │ -
825 template<typename _H2, typename _P2>
│ │ │ -
826 void
│ │ │ -
827 merge(unordered_multimap<_Key, _Tp, _H2, _P2, _Alloc>& __source)
│ │ │ -
828 {
│ │ │ -
829 using _Merge_helper = _Hash_merge_helper<unordered_map, _H2, _P2>;
│ │ │ -
830 _M_h._M_merge_unique(_Merge_helper::_S_get_table(__source));
│ │ │ -
831 }
│ │ │ -
832
│ │ │ -
833 template<typename _H2, typename _P2>
│ │ │ -
834 void
│ │ │ -
835 merge(unordered_multimap<_Key, _Tp, _H2, _P2, _Alloc>&& __source)
│ │ │ -
836 { merge(__source); }
│ │ │ -
837#endif // C++17
│ │ │ -
838
│ │ │ -
839 // observers.
│ │ │ -
840
│ │ │ -
841 /// Returns the hash functor object with which the %unordered_map was
│ │ │ -
842 /// constructed.
│ │ │ -
843 hasher
│ │ │ -
│ │ │ - │ │ │ -
845 { return _M_h.hash_function(); }
│ │ │ -
│ │ │ -
846
│ │ │ -
847 /// Returns the key comparison object with which the %unordered_map was
│ │ │ -
848 /// constructed.
│ │ │ - │ │ │ -
│ │ │ -
850 key_eq() const
│ │ │ -
851 { return _M_h.key_eq(); }
│ │ │ -
│ │ │ -
852
│ │ │ -
853 // lookup.
│ │ │ -
854
│ │ │ -
855 ///@{
│ │ │ -
856 /**
│ │ │ -
857 * @brief Tries to locate an element in an %unordered_map.
│ │ │ -
858 * @param __x Key to be located.
│ │ │ -
859 * @return Iterator pointing to sought-after element, or end() if not
│ │ │ -
860 * found.
│ │ │ -
861 *
│ │ │ -
862 * This function takes a key and tries to locate the element with which
│ │ │ -
863 * the key matches. If successful the function returns an iterator
│ │ │ -
864 * pointing to the sought after element. If unsuccessful it returns the
│ │ │ -
865 * past-the-end ( @c end() ) iterator.
│ │ │ -
866 */
│ │ │ - │ │ │ -
│ │ │ -
868 find(const key_type& __x)
│ │ │ -
869 { return _M_h.find(__x); }
│ │ │ -
│ │ │ -
870
│ │ │ -
871#if __cplusplus > 201703L
│ │ │ -
872 template<typename _Kt>
│ │ │ -
873 auto
│ │ │ -
874 find(const _Kt& __x) -> decltype(_M_h._M_find_tr(__x))
│ │ │ -
875 { return _M_h._M_find_tr(__x); }
│ │ │ -
876#endif
│ │ │ -
877
│ │ │ -
878 const_iterator
│ │ │ -
│ │ │ -
879 find(const key_type& __x) const
│ │ │ -
880 { return _M_h.find(__x); }
│ │ │ -
│ │ │ -
881
│ │ │ -
882#if __cplusplus > 201703L
│ │ │ -
883 template<typename _Kt>
│ │ │ -
884 auto
│ │ │ -
885 find(const _Kt& __x) const -> decltype(_M_h._M_find_tr(__x))
│ │ │ -
886 { return _M_h._M_find_tr(__x); }
│ │ │ -
887#endif
│ │ │ -
888 ///@}
│ │ │ -
889
│ │ │ -
890 ///@{
│ │ │ -
891 /**
│ │ │ -
892 * @brief Finds the number of elements.
│ │ │ -
893 * @param __x Key to count.
│ │ │ -
894 * @return Number of elements with specified key.
│ │ │ -
895 *
│ │ │ -
896 * This function only makes sense for %unordered_multimap; for
│ │ │ -
897 * %unordered_map the result will either be 0 (not present) or 1
│ │ │ -
898 * (present).
│ │ │ -
899 */
│ │ │ -
900 size_type
│ │ │ -
│ │ │ -
901 count(const key_type& __x) const
│ │ │ -
902 { return _M_h.count(__x); }
│ │ │ -
│ │ │ -
903
│ │ │ -
904#if __cplusplus > 201703L
│ │ │ -
905 template<typename _Kt>
│ │ │ -
906 auto
│ │ │ -
907 count(const _Kt& __x) const -> decltype(_M_h._M_count_tr(__x))
│ │ │ -
908 { return _M_h._M_count_tr(__x); }
│ │ │ -
909#endif
│ │ │ -
910 ///@}
│ │ │ -
911
│ │ │ -
912#if __cplusplus > 201703L
│ │ │ -
913 ///@{
│ │ │ -
914 /**
│ │ │ -
915 * @brief Finds whether an element with the given key exists.
│ │ │ -
916 * @param __x Key of elements to be located.
│ │ │ -
917 * @return True if there is any element with the specified key.
│ │ │ -
918 */
│ │ │ -
919 bool
│ │ │ -
920 contains(const key_type& __x) const
│ │ │ -
921 { return _M_h.find(__x) != _M_h.end(); }
│ │ │ -
922
│ │ │ -
923 template<typename _Kt>
│ │ │ -
924 auto
│ │ │ -
925 contains(const _Kt& __x) const
│ │ │ -
926 -> decltype(_M_h._M_find_tr(__x), void(), true)
│ │ │ -
927 { return _M_h._M_find_tr(__x) != _M_h.end(); }
│ │ │ -
928 ///@}
│ │ │ -
929#endif
│ │ │ -
930
│ │ │ -
931 ///@{
│ │ │ -
932 /**
│ │ │ -
933 * @brief Finds a subsequence matching given key.
│ │ │ -
934 * @param __x Key to be located.
│ │ │ -
935 * @return Pair of iterators that possibly points to the subsequence
│ │ │ -
936 * matching given key.
│ │ │ -
937 *
│ │ │ -
938 * This function probably only makes sense for %unordered_multimap.
│ │ │ -
939 */
│ │ │ -
940 std::pair<iterator, iterator>
│ │ │ -
│ │ │ - │ │ │ -
942 { return _M_h.equal_range(__x); }
│ │ │ -
│ │ │ -
943
│ │ │ -
944#if __cplusplus > 201703L
│ │ │ -
945 template<typename _Kt>
│ │ │ -
946 auto
│ │ │ -
947 equal_range(const _Kt& __x)
│ │ │ -
948 -> decltype(_M_h._M_equal_range_tr(__x))
│ │ │ -
949 { return _M_h._M_equal_range_tr(__x); }
│ │ │ -
950#endif
│ │ │ -
951
│ │ │ - │ │ │ -
│ │ │ -
953 equal_range(const key_type& __x) const
│ │ │ -
954 { return _M_h.equal_range(__x); }
│ │ │ -
│ │ │ -
955
│ │ │ -
956#if __cplusplus > 201703L
│ │ │ -
957 template<typename _Kt>
│ │ │ -
958 auto
│ │ │ -
959 equal_range(const _Kt& __x) const
│ │ │ -
960 -> decltype(_M_h._M_equal_range_tr(__x))
│ │ │ -
961 { return _M_h._M_equal_range_tr(__x); }
│ │ │ -
962#endif
│ │ │ -
963 ///@}
│ │ │ -
964
│ │ │ -
965 ///@{
│ │ │ -
966 /**
│ │ │ -
967 * @brief Subscript ( @c [] ) access to %unordered_map data.
│ │ │ -
968 * @param __k The key for which data should be retrieved.
│ │ │ -
969 * @return A reference to the data of the (key,data) %pair.
│ │ │ -
970 *
│ │ │ -
971 * Allows for easy lookup with the subscript ( @c [] )operator. Returns
│ │ │ -
972 * data associated with the key specified in subscript. If the key does
│ │ │ -
973 * not exist, a pair with that key is created using default values, which
│ │ │ -
974 * is then returned.
│ │ │ -
975 *
│ │ │ -
976 * Lookup requires constant time.
│ │ │ -
977 */
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
980 { return _M_h[__k]; }
│ │ │ -
│ │ │ -
981
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
984 { return _M_h[std::move(__k)]; }
│ │ │ -
│ │ │ -
985 ///@}
│ │ │ -
986
│ │ │ -
987 ///@{
│ │ │ -
988 /**
│ │ │ -
989 * @brief Access to %unordered_map data.
│ │ │ -
990 * @param __k The key for which data should be retrieved.
│ │ │ -
991 * @return A reference to the data whose key is equal to @a __k, if
│ │ │ -
992 * such a data is present in the %unordered_map.
│ │ │ -
993 * @throw std::out_of_range If no such data is present.
│ │ │ -
994 */
│ │ │ - │ │ │ -
│ │ │ -
996 at(const key_type& __k)
│ │ │ -
997 { return _M_h.at(__k); }
│ │ │ -
│ │ │ -
998
│ │ │ -
999 const mapped_type&
│ │ │ -
│ │ │ -
1000 at(const key_type& __k) const
│ │ │ -
1001 { return _M_h.at(__k); }
│ │ │ -
│ │ │ -
1002 ///@}
│ │ │ -
1003
│ │ │ -
1004 // bucket interface.
│ │ │ -
1005
│ │ │ -
1006 /// Returns the number of buckets of the %unordered_map.
│ │ │ -
1007 size_type
│ │ │ -
│ │ │ -
1008 bucket_count() const noexcept
│ │ │ -
1009 { return _M_h.bucket_count(); }
│ │ │ -
│ │ │ -
1010
│ │ │ -
1011 /// Returns the maximum number of buckets of the %unordered_map.
│ │ │ -
1012 size_type
│ │ │ -
│ │ │ -
1013 max_bucket_count() const noexcept
│ │ │ -
1014 { return _M_h.max_bucket_count(); }
│ │ │ -
│ │ │ -
1015
│ │ │ -
1016 /*
│ │ │ -
1017 * @brief Returns the number of elements in a given bucket.
│ │ │ -
1018 * @param __n A bucket index.
│ │ │ -
1019 * @return The number of elements in the bucket.
│ │ │ -
1020 */
│ │ │ -
1021 size_type
│ │ │ -
1022 bucket_size(size_type __n) const
│ │ │ -
1023 { return _M_h.bucket_size(__n); }
│ │ │ -
1024
│ │ │ -
1025 /*
│ │ │ -
1026 * @brief Returns the bucket index of a given element.
│ │ │ -
1027 * @param __key A key instance.
│ │ │ -
1028 * @return The key bucket index.
│ │ │ -
1029 */
│ │ │ -
1030 size_type
│ │ │ -
1031 bucket(const key_type& __key) const
│ │ │ -
1032 { return _M_h.bucket(__key); }
│ │ │ -
1033
│ │ │ -
1034 /**
│ │ │ -
1035 * @brief Returns a read/write iterator pointing to the first bucket
│ │ │ -
1036 * element.
│ │ │ -
1037 * @param __n The bucket index.
│ │ │ -
1038 * @return A read/write local iterator.
│ │ │ -
1039 */
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
1042 { return _M_h.begin(__n); }
│ │ │ -
│ │ │ -
1043
│ │ │ -
1044 ///@{
│ │ │ -
1045 /**
│ │ │ -
1046 * @brief Returns a read-only (constant) iterator pointing to the first
│ │ │ -
1047 * bucket element.
│ │ │ -
1048 * @param __n The bucket index.
│ │ │ -
1049 * @return A read-only local iterator.
│ │ │ -
1050 */
│ │ │ - │ │ │ -
│ │ │ -
1052 begin(size_type __n) const
│ │ │ -
1053 { return _M_h.begin(__n); }
│ │ │ -
│ │ │ -
1054
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
1057 { return _M_h.cbegin(__n); }
│ │ │ -
│ │ │ -
1058 ///@}
│ │ │ -
1059
│ │ │ -
1060 /**
│ │ │ -
1061 * @brief Returns a read/write iterator pointing to one past the last
│ │ │ -
1062 * bucket elements.
│ │ │ -
1063 * @param __n The bucket index.
│ │ │ -
1064 * @return A read/write local iterator.
│ │ │ -
1065 */
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
1068 { return _M_h.end(__n); }
│ │ │ -
│ │ │ -
1069
│ │ │ -
1070 ///@{
│ │ │ -
1071 /**
│ │ │ -
1072 * @brief Returns a read-only (constant) iterator pointing to one past
│ │ │ -
1073 * the last bucket elements.
│ │ │ -
1074 * @param __n The bucket index.
│ │ │ -
1075 * @return A read-only local iterator.
│ │ │ -
1076 */
│ │ │ - │ │ │ -
│ │ │ -
1078 end(size_type __n) const
│ │ │ -
1079 { return _M_h.end(__n); }
│ │ │ -
│ │ │ -
1080
│ │ │ - │ │ │ -
│ │ │ -
1082 cend(size_type __n) const
│ │ │ -
1083 { return _M_h.cend(__n); }
│ │ │ -
│ │ │ -
1084 ///@}
│ │ │ -
1085
│ │ │ -
1086 // hash policy.
│ │ │ -
1087
│ │ │ -
1088 /// Returns the average number of elements per bucket.
│ │ │ -
1089 float
│ │ │ -
│ │ │ -
1090 load_factor() const noexcept
│ │ │ -
1091 { return _M_h.load_factor(); }
│ │ │ -
│ │ │ -
1092
│ │ │ -
1093 /// Returns a positive number that the %unordered_map tries to keep the
│ │ │ -
1094 /// load factor less than or equal to.
│ │ │ -
1095 float
│ │ │ -
│ │ │ -
1096 max_load_factor() const noexcept
│ │ │ -
1097 { return _M_h.max_load_factor(); }
│ │ │ -
│ │ │ -
1098
│ │ │ -
1099 /**
│ │ │ -
1100 * @brief Change the %unordered_map maximum load factor.
│ │ │ -
1101 * @param __z The new maximum load factor.
│ │ │ -
1102 */
│ │ │ -
1103 void
│ │ │ -
│ │ │ - │ │ │ -
1105 { _M_h.max_load_factor(__z); }
│ │ │ -
│ │ │ -
1106
│ │ │ -
1107 /**
│ │ │ -
1108 * @brief May rehash the %unordered_map.
│ │ │ -
1109 * @param __n The new number of buckets.
│ │ │ -
1110 *
│ │ │ -
1111 * Rehash will occur only if the new number of buckets respect the
│ │ │ -
1112 * %unordered_map maximum load factor.
│ │ │ -
1113 */
│ │ │ -
1114 void
│ │ │ -
│ │ │ - │ │ │ -
1116 { _M_h.rehash(__n); }
│ │ │ -
│ │ │ -
1117
│ │ │ -
1118 /**
│ │ │ -
1119 * @brief Prepare the %unordered_map for a specified number of
│ │ │ -
1120 * elements.
│ │ │ -
1121 * @param __n Number of elements required.
│ │ │ -
1122 *
│ │ │ -
1123 * Same as rehash(ceil(n / max_load_factor())).
│ │ │ -
1124 */
│ │ │ -
1125 void
│ │ │ -
│ │ │ - │ │ │ -
1127 { _M_h.reserve(__n); }
│ │ │ -
│ │ │ -
1128
│ │ │ -
1129 template<typename _Key1, typename _Tp1, typename _Hash1, typename _Pred1,
│ │ │ -
1130 typename _Alloc1>
│ │ │ -
1131 friend bool
│ │ │ - │ │ │ - │ │ │ -
1134 };
│ │ │ -
│ │ │ -
1135
│ │ │ -
1136#if __cpp_deduction_guides >= 201606
│ │ │ -
1137
│ │ │ -
1138 template<typename _InputIterator,
│ │ │ -
1139 typename _Hash = hash<__iter_key_t<_InputIterator>>,
│ │ │ -
1140 typename _Pred = equal_to<__iter_key_t<_InputIterator>>,
│ │ │ -
1141 typename _Allocator = allocator<__iter_to_alloc_t<_InputIterator>>,
│ │ │ -
1142 typename = _RequireInputIter<_InputIterator>,
│ │ │ -
1143 typename = _RequireNotAllocatorOrIntegral<_Hash>,
│ │ │ -
1144 typename = _RequireNotAllocator<_Pred>,
│ │ │ -
1145 typename = _RequireAllocator<_Allocator>>
│ │ │ -
1146 unordered_map(_InputIterator, _InputIterator,
│ │ │ -
1147 typename unordered_map<int, int>::size_type = {},
│ │ │ -
1148 _Hash = _Hash(), _Pred = _Pred(), _Allocator = _Allocator())
│ │ │ -
1149 -> unordered_map<__iter_key_t<_InputIterator>,
│ │ │ -
1150 __iter_val_t<_InputIterator>,
│ │ │ -
1151 _Hash, _Pred, _Allocator>;
│ │ │ -
1152
│ │ │ -
1153 template<typename _Key, typename _Tp, typename _Hash = hash<_Key>,
│ │ │ -
1154 typename _Pred = equal_to<_Key>,
│ │ │ -
1155 typename _Allocator = allocator<pair<const _Key, _Tp>>,
│ │ │ -
1156 typename = _RequireNotAllocatorOrIntegral<_Hash>,
│ │ │ -
1157 typename = _RequireNotAllocator<_Pred>,
│ │ │ -
1158 typename = _RequireAllocator<_Allocator>>
│ │ │ - │ │ │ - │ │ │ -
1161 _Hash = _Hash(), _Pred = _Pred(), _Allocator = _Allocator())
│ │ │ - │ │ │ -
1163
│ │ │ -
1164 template<typename _InputIterator, typename _Allocator,
│ │ │ -
1165 typename = _RequireInputIter<_InputIterator>,
│ │ │ -
1166 typename = _RequireAllocator<_Allocator>>
│ │ │ -
1167 unordered_map(_InputIterator, _InputIterator,
│ │ │ -
1168 typename unordered_map<int, int>::size_type, _Allocator)
│ │ │ - │ │ │ -
1170 __iter_val_t<_InputIterator>,
│ │ │ - │ │ │ - │ │ │ -
1173 _Allocator>;
│ │ │ -
1174
│ │ │ -
1175 template<typename _InputIterator, typename _Allocator,
│ │ │ -
1176 typename = _RequireInputIter<_InputIterator>,
│ │ │ -
1177 typename = _RequireAllocator<_Allocator>>
│ │ │ -
1178 unordered_map(_InputIterator, _InputIterator, _Allocator)
│ │ │ - │ │ │ -
1180 __iter_val_t<_InputIterator>,
│ │ │ - │ │ │ - │ │ │ -
1183 _Allocator>;
│ │ │ -
1184
│ │ │ -
1185 template<typename _InputIterator, typename _Hash, typename _Allocator,
│ │ │ -
1186 typename = _RequireInputIter<_InputIterator>,
│ │ │ -
1187 typename = _RequireNotAllocatorOrIntegral<_Hash>,
│ │ │ -
1188 typename = _RequireAllocator<_Allocator>>
│ │ │ -
1189 unordered_map(_InputIterator, _InputIterator,
│ │ │ - │ │ │ -
1191 _Hash, _Allocator)
│ │ │ - │ │ │ -
1193 __iter_val_t<_InputIterator>, _Hash,
│ │ │ - │ │ │ -
1195
│ │ │ -
1196 template<typename _Key, typename _Tp, typename _Allocator,
│ │ │ -
1197 typename = _RequireAllocator<_Allocator>>
│ │ │ - │ │ │ - │ │ │ -
1200 _Allocator)
│ │ │ - │ │ │ -
1202
│ │ │ -
1203 template<typename _Key, typename _Tp, typename _Allocator,
│ │ │ -
1204 typename = _RequireAllocator<_Allocator>>
│ │ │ - │ │ │ - │ │ │ -
1207
│ │ │ -
1208 template<typename _Key, typename _Tp, typename _Hash, typename _Allocator,
│ │ │ -
1209 typename = _RequireNotAllocatorOrIntegral<_Hash>,
│ │ │ -
1210 typename = _RequireAllocator<_Allocator>>
│ │ │ - │ │ │ - │ │ │ -
1213 _Hash, _Allocator)
│ │ │ - │ │ │ -
1215
│ │ │ -
1216#endif
│ │ │ -
1217
│ │ │ -
1218 /**
│ │ │ -
1219 * @brief A standard container composed of equivalent keys
│ │ │ -
1220 * (possibly containing multiple of each key value) that associates
│ │ │ -
1221 * values of another type with the keys.
│ │ │ -
1222 *
│ │ │ -
1223 * @ingroup unordered_associative_containers
│ │ │ -
1224 *
│ │ │ -
1225 * @tparam _Key Type of key objects.
│ │ │ -
1226 * @tparam _Tp Type of mapped objects.
│ │ │ -
1227 * @tparam _Hash Hashing function object type, defaults to hash<_Value>.
│ │ │ -
1228 * @tparam _Pred Predicate function object type, defaults
│ │ │ -
1229 * to equal_to<_Value>.
│ │ │ -
1230 * @tparam _Alloc Allocator type, defaults to
│ │ │ -
1231 * std::allocator<std::pair<const _Key, _Tp>>.
│ │ │ -
1232 *
│ │ │ -
1233 * Meets the requirements of a <a href="tables.html#65">container</a>, and
│ │ │ -
1234 * <a href="tables.html#xx">unordered associative container</a>
│ │ │ -
1235 *
│ │ │ -
1236 * The resulting value type of the container is std::pair<const _Key, _Tp>.
│ │ │ -
1237 *
│ │ │ -
1238 * Base is _Hashtable, dispatched at compile time via template
│ │ │ -
1239 * alias __ummap_hashtable.
│ │ │ -
1240 */
│ │ │ -
1241 template<typename _Key, typename _Tp,
│ │ │ -
1242 typename _Hash = hash<_Key>,
│ │ │ -
1243 typename _Pred = equal_to<_Key>,
│ │ │ -
1244 typename _Alloc = allocator<std::pair<const _Key, _Tp>>>
│ │ │ -
│ │ │ - │ │ │ -
1246 {
│ │ │ -
1247 typedef __ummap_hashtable<_Key, _Tp, _Hash, _Pred, _Alloc> _Hashtable;
│ │ │ -
1248 _Hashtable _M_h;
│ │ │ -
1249
│ │ │ -
1250 public:
│ │ │ -
1251 // typedefs:
│ │ │ -
1252 ///@{
│ │ │ -
1253 /// Public typedefs.
│ │ │ -
1254 typedef typename _Hashtable::key_type key_type;
│ │ │ -
1255 typedef typename _Hashtable::value_type value_type;
│ │ │ -
1256 typedef typename _Hashtable::mapped_type mapped_type;
│ │ │ -
1257 typedef typename _Hashtable::hasher hasher;
│ │ │ -
1258 typedef typename _Hashtable::key_equal key_equal;
│ │ │ -
1259 typedef typename _Hashtable::allocator_type allocator_type;
│ │ │ -
1260 ///@}
│ │ │ -
1261
│ │ │ -
1262 ///@{
│ │ │ -
1263 /// Iterator-related typedefs.
│ │ │ -
1264 typedef typename _Hashtable::pointer pointer;
│ │ │ -
1265 typedef typename _Hashtable::const_pointer const_pointer;
│ │ │ -
1266 typedef typename _Hashtable::reference reference;
│ │ │ -
1267 typedef typename _Hashtable::const_reference const_reference;
│ │ │ -
1268 typedef typename _Hashtable::iterator iterator;
│ │ │ -
1269 typedef typename _Hashtable::const_iterator const_iterator;
│ │ │ -
1270 typedef typename _Hashtable::local_iterator local_iterator;
│ │ │ -
1271 typedef typename _Hashtable::const_local_iterator const_local_iterator;
│ │ │ -
1272 typedef typename _Hashtable::size_type size_type;
│ │ │ -
1273 typedef typename _Hashtable::difference_type difference_type;
│ │ │ -
1274 ///@}
│ │ │ -
1275
│ │ │ -
1276#if __cplusplus > 201402L
│ │ │ -
1277 using node_type = typename _Hashtable::node_type;
│ │ │ -
1278#endif
│ │ │ -
1279
│ │ │ -
1280 //construct/destroy/copy
│ │ │ -
1281
│ │ │ -
1282 /// Default constructor.
│ │ │ - │ │ │ -
1284
│ │ │ -
1285 /**
│ │ │ -
1286 * @brief Default constructor creates no elements.
│ │ │ -
1287 * @param __n Mnimal initial number of buckets.
│ │ │ -
1288 * @param __hf A hash functor.
│ │ │ -
1289 * @param __eql A key equality functor.
│ │ │ -
1290 * @param __a An allocator object.
│ │ │ -
1291 */
│ │ │ -
1292 explicit
│ │ │ -
│ │ │ - │ │ │ -
1294 const hasher& __hf = hasher(),
│ │ │ -
1295 const key_equal& __eql = key_equal(),
│ │ │ -
1296 const allocator_type& __a = allocator_type())
│ │ │ -
1297 : _M_h(__n, __hf, __eql, __a)
│ │ │ -
1298 { }
│ │ │ -
│ │ │ -
1299
│ │ │ -
1300 /**
│ │ │ -
1301 * @brief Builds an %unordered_multimap from a range.
│ │ │ -
1302 * @param __first An input iterator.
│ │ │ -
1303 * @param __last An input iterator.
│ │ │ -
1304 * @param __n Minimal initial number of buckets.
│ │ │ -
1305 * @param __hf A hash functor.
│ │ │ -
1306 * @param __eql A key equality functor.
│ │ │ -
1307 * @param __a An allocator object.
│ │ │ -
1308 *
│ │ │ -
1309 * Create an %unordered_multimap consisting of copies of the elements
│ │ │ -
1310 * from [__first,__last). This is linear in N (where N is
│ │ │ -
1311 * distance(__first,__last)).
│ │ │ -
1312 */
│ │ │ -
1313 template<typename _InputIterator>
│ │ │ -
│ │ │ -
1314 unordered_multimap(_InputIterator __first, _InputIterator __last,
│ │ │ -
1315 size_type __n = 0,
│ │ │ -
1316 const hasher& __hf = hasher(),
│ │ │ -
1317 const key_equal& __eql = key_equal(),
│ │ │ -
1318 const allocator_type& __a = allocator_type())
│ │ │ -
1319 : _M_h(__first, __last, __n, __hf, __eql, __a)
│ │ │ -
1320 { }
│ │ │ -
│ │ │ -
1321
│ │ │ -
1322 /// Copy constructor.
│ │ │ - │ │ │ -
1324
│ │ │ -
1325 /// Move constructor.
│ │ │ - │ │ │ -
1327
│ │ │ -
1328 /**
│ │ │ -
1329 * @brief Creates an %unordered_multimap with no elements.
│ │ │ -
1330 * @param __a An allocator object.
│ │ │ -
1331 */
│ │ │ -
1332 explicit
│ │ │ -
│ │ │ - │ │ │ -
1334 : _M_h(__a)
│ │ │ -
1335 { }
│ │ │ -
│ │ │ -
1336
│ │ │ -
1337 /*
│ │ │ -
1338 * @brief Copy constructor with allocator argument.
│ │ │ -
1339 * @param __uset Input %unordered_multimap to copy.
│ │ │ -
1340 * @param __a An allocator object.
│ │ │ -
1341 */
│ │ │ - │ │ │ -
1343 const allocator_type& __a)
│ │ │ -
1344 : _M_h(__ummap._M_h, __a)
│ │ │ -
1345 { }
│ │ │ -
1346
│ │ │ -
1347 /*
│ │ │ -
1348 * @brief Move constructor with allocator argument.
│ │ │ -
1349 * @param __uset Input %unordered_multimap to move.
│ │ │ -
1350 * @param __a An allocator object.
│ │ │ -
1351 */
│ │ │ -
1352 unordered_multimap(unordered_multimap&& __ummap,
│ │ │ -
1353 const allocator_type& __a)
│ │ │ -
1354 noexcept( noexcept(_Hashtable(std::move(__ummap._M_h), __a)) )
│ │ │ -
1355 : _M_h(std::move(__ummap._M_h), __a)
│ │ │ -
1356 { }
│ │ │ -
1357
│ │ │ -
1358 /**
│ │ │ -
1359 * @brief Builds an %unordered_multimap from an initializer_list.
│ │ │ -
1360 * @param __l An initializer_list.
│ │ │ -
1361 * @param __n Minimal initial number of buckets.
│ │ │ -
1362 * @param __hf A hash functor.
│ │ │ -
1363 * @param __eql A key equality functor.
│ │ │ -
1364 * @param __a An allocator object.
│ │ │ -
1365 *
│ │ │ -
1366 * Create an %unordered_multimap consisting of copies of the elements in
│ │ │ -
1367 * the list. This is linear in N (where N is @a __l.size()).
│ │ │ -
1368 */
│ │ │ -
│ │ │ - │ │ │ -
1370 size_type __n = 0,
│ │ │ -
1371 const hasher& __hf = hasher(),
│ │ │ -
1372 const key_equal& __eql = key_equal(),
│ │ │ -
1373 const allocator_type& __a = allocator_type())
│ │ │ -
1374 : _M_h(__l, __n, __hf, __eql, __a)
│ │ │ -
1375 { }
│ │ │ -
│ │ │ -
1376
│ │ │ - │ │ │ -
1378 : unordered_multimap(__n, hasher(), key_equal(), __a)
│ │ │ -
1379 { }
│ │ │ -
1380
│ │ │ -
1381 unordered_multimap(size_type __n, const hasher& __hf,
│ │ │ -
1382 const allocator_type& __a)
│ │ │ -
1383 : unordered_multimap(__n, __hf, key_equal(), __a)
│ │ │ -
1384 { }
│ │ │ -
1385
│ │ │ -
1386 template<typename _InputIterator>
│ │ │ -
1387 unordered_multimap(_InputIterator __first, _InputIterator __last,
│ │ │ -
1388 size_type __n,
│ │ │ -
1389 const allocator_type& __a)
│ │ │ -
1390 : unordered_multimap(__first, __last, __n, hasher(), key_equal(), __a)
│ │ │ -
1391 { }
│ │ │ -
1392
│ │ │ -
1393 template<typename _InputIterator>
│ │ │ -
1394 unordered_multimap(_InputIterator __first, _InputIterator __last,
│ │ │ -
1395 size_type __n, const hasher& __hf,
│ │ │ -
1396 const allocator_type& __a)
│ │ │ -
1397 : unordered_multimap(__first, __last, __n, __hf, key_equal(), __a)
│ │ │ -
1398 { }
│ │ │ -
1399
│ │ │ -
1400 unordered_multimap(initializer_list<value_type> __l,
│ │ │ -
1401 size_type __n,
│ │ │ -
1402 const allocator_type& __a)
│ │ │ -
1403 : unordered_multimap(__l, __n, hasher(), key_equal(), __a)
│ │ │ -
1404 { }
│ │ │ -
1405
│ │ │ -
1406 unordered_multimap(initializer_list<value_type> __l,
│ │ │ -
1407 size_type __n, const hasher& __hf,
│ │ │ -
1408 const allocator_type& __a)
│ │ │ -
1409 : unordered_multimap(__l, __n, __hf, key_equal(), __a)
│ │ │ -
1410 { }
│ │ │ -
1411
│ │ │ -
1412 /// Copy assignment operator.
│ │ │ - │ │ │ - │ │ │ -
1415
│ │ │ -
1416 /// Move assignment operator.
│ │ │ - │ │ │ - │ │ │ -
1419
│ │ │ -
1420 /**
│ │ │ -
1421 * @brief %Unordered_multimap list assignment operator.
│ │ │ -
1422 * @param __l An initializer_list.
│ │ │ -
1423 *
│ │ │ -
1424 * This function fills an %unordered_multimap with copies of the
│ │ │ -
1425 * elements in the initializer list @a __l.
│ │ │ -
1426 *
│ │ │ -
1427 * Note that the assignment completely changes the %unordered_multimap
│ │ │ -
1428 * and that the resulting %unordered_multimap's size is the same as the
│ │ │ -
1429 * number of elements assigned.
│ │ │ -
1430 */
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
1433 {
│ │ │ -
1434 _M_h = __l;
│ │ │ -
1435 return *this;
│ │ │ -
1436 }
│ │ │ -
│ │ │ -
1437
│ │ │ -
1438 /// Returns the allocator object used by the %unordered_multimap.
│ │ │ - │ │ │ -
│ │ │ -
1440 get_allocator() const noexcept
│ │ │ -
1441 { return _M_h.get_allocator(); }
│ │ │ -
│ │ │ -
1442
│ │ │ -
1443 // size and capacity:
│ │ │ -
1444
│ │ │ -
1445 /// Returns true if the %unordered_multimap is empty.
│ │ │ -
1446 _GLIBCXX_NODISCARD bool
│ │ │ -
│ │ │ -
1447 empty() const noexcept
│ │ │ -
1448 { return _M_h.empty(); }
│ │ │ -
│ │ │ -
1449
│ │ │ -
1450 /// Returns the size of the %unordered_multimap.
│ │ │ -
1451 size_type
│ │ │ -
│ │ │ -
1452 size() const noexcept
│ │ │ -
1453 { return _M_h.size(); }
│ │ │ -
│ │ │ -
1454
│ │ │ -
1455 /// Returns the maximum size of the %unordered_multimap.
│ │ │ -
1456 size_type
│ │ │ -
│ │ │ -
1457 max_size() const noexcept
│ │ │ -
1458 { return _M_h.max_size(); }
│ │ │ -
│ │ │ -
1459
│ │ │ -
1460 // iterators.
│ │ │ -
1461
│ │ │ -
1462 /**
│ │ │ -
1463 * Returns a read/write iterator that points to the first element in the
│ │ │ -
1464 * %unordered_multimap.
│ │ │ -
1465 */
│ │ │ -
1466 iterator
│ │ │ -
│ │ │ -
1467 begin() noexcept
│ │ │ -
1468 { return _M_h.begin(); }
│ │ │ -
│ │ │ -
1469
│ │ │ -
1470 ///@{
│ │ │ -
1471 /**
│ │ │ -
1472 * Returns a read-only (constant) iterator that points to the first
│ │ │ -
1473 * element in the %unordered_multimap.
│ │ │ -
1474 */
│ │ │ -
1475 const_iterator
│ │ │ -
│ │ │ -
1476 begin() const noexcept
│ │ │ -
1477 { return _M_h.begin(); }
│ │ │ -
│ │ │ -
1478
│ │ │ -
1479 const_iterator
│ │ │ -
│ │ │ -
1480 cbegin() const noexcept
│ │ │ -
1481 { return _M_h.begin(); }
│ │ │ -
│ │ │ -
1482 ///@}
│ │ │ -
1483
│ │ │ -
1484 /**
│ │ │ -
1485 * Returns a read/write iterator that points one past the last element in
│ │ │ -
1486 * the %unordered_multimap.
│ │ │ -
1487 */
│ │ │ -
1488 iterator
│ │ │ -
│ │ │ -
1489 end() noexcept
│ │ │ -
1490 { return _M_h.end(); }
│ │ │ -
│ │ │ -
1491
│ │ │ -
1492 ///@{
│ │ │ -
1493 /**
│ │ │ -
1494 * Returns a read-only (constant) iterator that points one past the last
│ │ │ -
1495 * element in the %unordered_multimap.
│ │ │ -
1496 */
│ │ │ -
1497 const_iterator
│ │ │ -
│ │ │ -
1498 end() const noexcept
│ │ │ -
1499 { return _M_h.end(); }
│ │ │ -
│ │ │ -
1500
│ │ │ -
1501 const_iterator
│ │ │ -
│ │ │ -
1502 cend() const noexcept
│ │ │ -
1503 { return _M_h.end(); }
│ │ │ -
│ │ │ -
1504 ///@}
│ │ │ -
1505
│ │ │ -
1506 // modifiers.
│ │ │ -
1507
│ │ │ -
1508 /**
│ │ │ -
1509 * @brief Attempts to build and insert a std::pair into the
│ │ │ -
1510 * %unordered_multimap.
│ │ │ -
1511 *
│ │ │ -
1512 * @param __args Arguments used to generate a new pair instance (see
│ │ │ -
1513 * std::piecewise_contruct for passing arguments to each
│ │ │ -
1514 * part of the pair constructor).
│ │ │ -
1515 *
│ │ │ -
1516 * @return An iterator that points to the inserted pair.
│ │ │ -
1517 *
│ │ │ -
1518 * This function attempts to build and insert a (key, value) %pair into
│ │ │ -
1519 * the %unordered_multimap.
│ │ │ -
1520 *
│ │ │ -
1521 * Insertion requires amortized constant time.
│ │ │ -
1522 */
│ │ │ -
1523 template<typename... _Args>
│ │ │ -
1524 iterator
│ │ │ -
│ │ │ -
1525 emplace(_Args&&... __args)
│ │ │ -
1526 { return _M_h.emplace(std::forward<_Args>(__args)...); }
│ │ │ -
│ │ │ -
1527
│ │ │ -
1528 /**
│ │ │ -
1529 * @brief Attempts to build and insert a std::pair into the
│ │ │ -
1530 * %unordered_multimap.
│ │ │ -
1531 *
│ │ │ -
1532 * @param __pos An iterator that serves as a hint as to where the pair
│ │ │ -
1533 * should be inserted.
│ │ │ -
1534 * @param __args Arguments used to generate a new pair instance (see
│ │ │ -
1535 * std::piecewise_contruct for passing arguments to each
│ │ │ -
1536 * part of the pair constructor).
│ │ │ -
1537 * @return An iterator that points to the element with key of the
│ │ │ -
1538 * std::pair built from @a __args.
│ │ │ -
1539 *
│ │ │ -
1540 * Note that the first parameter is only a hint and can potentially
│ │ │ -
1541 * improve the performance of the insertion process. A bad hint would
│ │ │ -
1542 * cause no gains in efficiency.
│ │ │ -
1543 *
│ │ │ -
1544 * See
│ │ │ -
1545 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/associative.html#containers.associative.insert_hints
│ │ │ -
1546 * for more on @a hinting.
│ │ │ -
1547 *
│ │ │ -
1548 * Insertion requires amortized constant time.
│ │ │ -
1549 */
│ │ │ -
1550 template<typename... _Args>
│ │ │ -
1551 iterator
│ │ │ -
│ │ │ -
1552 emplace_hint(const_iterator __pos, _Args&&... __args)
│ │ │ -
1553 { return _M_h.emplace_hint(__pos, std::forward<_Args>(__args)...); }
│ │ │ -
│ │ │ -
1554
│ │ │ -
1555 ///@{
│ │ │ -
1556 /**
│ │ │ -
1557 * @brief Inserts a std::pair into the %unordered_multimap.
│ │ │ -
1558 * @param __x Pair to be inserted (see std::make_pair for easy
│ │ │ -
1559 * creation of pairs).
│ │ │ -
1560 *
│ │ │ -
1561 * @return An iterator that points to the inserted pair.
│ │ │ -
1562 *
│ │ │ -
1563 * Insertion requires amortized constant time.
│ │ │ -
1564 */
│ │ │ -
1565 iterator
│ │ │ -
│ │ │ -
1566 insert(const value_type& __x)
│ │ │ -
1567 { return _M_h.insert(__x); }
│ │ │ -
│ │ │ -
1568
│ │ │ -
1569 iterator
│ │ │ -
│ │ │ - │ │ │ -
1571 { return _M_h.insert(std::move(__x)); }
│ │ │ -
│ │ │ -
1572
│ │ │ -
1573 template<typename _Pair>
│ │ │ -
1574 __enable_if_t<is_constructible<value_type, _Pair&&>::value, iterator>
│ │ │ -
│ │ │ -
1575 insert(_Pair&& __x)
│ │ │ -
1576 { return _M_h.emplace(std::forward<_Pair>(__x)); }
│ │ │ -
│ │ │ -
1577 ///@}
│ │ │ -
1578
│ │ │ -
1579 ///@{
│ │ │ -
1580 /**
│ │ │ -
1581 * @brief Inserts a std::pair into the %unordered_multimap.
│ │ │ -
1582 * @param __hint An iterator that serves as a hint as to where the
│ │ │ -
1583 * pair should be inserted.
│ │ │ -
1584 * @param __x Pair to be inserted (see std::make_pair for easy creation
│ │ │ -
1585 * of pairs).
│ │ │ -
1586 * @return An iterator that points to the element with key of
│ │ │ -
1587 * @a __x (may or may not be the %pair passed in).
│ │ │ -
1588 *
│ │ │ -
1589 * Note that the first parameter is only a hint and can potentially
│ │ │ -
1590 * improve the performance of the insertion process. A bad hint would
│ │ │ -
1591 * cause no gains in efficiency.
│ │ │ -
1592 *
│ │ │ -
1593 * See
│ │ │ -
1594 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/associative.html#containers.associative.insert_hints
│ │ │ -
1595 * for more on @a hinting.
│ │ │ -
1596 *
│ │ │ -
1597 * Insertion requires amortized constant time.
│ │ │ -
1598 */
│ │ │ -
1599 iterator
│ │ │ -
│ │ │ - │ │ │ -
1601 { return _M_h.insert(__hint, __x); }
│ │ │ -
│ │ │ -
1602
│ │ │ -
1603 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ -
1604 // 2354. Unnecessary copying when inserting into maps with braced-init
│ │ │ -
1605 iterator
│ │ │ -
│ │ │ - │ │ │ -
1607 { return _M_h.insert(__hint, std::move(__x)); }
│ │ │ -
│ │ │ -
1608
│ │ │ -
1609 template<typename _Pair>
│ │ │ -
1610 __enable_if_t<is_constructible<value_type, _Pair&&>::value, iterator>
│ │ │ -
│ │ │ -
1611 insert(const_iterator __hint, _Pair&& __x)
│ │ │ -
1612 { return _M_h.emplace_hint(__hint, std::forward<_Pair>(__x)); }
│ │ │ -
│ │ │ -
1613 ///@}
│ │ │ -
1614
│ │ │ -
1615 /**
│ │ │ -
1616 * @brief A template function that attempts to insert a range of
│ │ │ -
1617 * elements.
│ │ │ -
1618 * @param __first Iterator pointing to the start of the range to be
│ │ │ -
1619 * inserted.
│ │ │ -
1620 * @param __last Iterator pointing to the end of the range.
│ │ │ -
1621 *
│ │ │ -
1622 * Complexity similar to that of the range constructor.
│ │ │ -
1623 */
│ │ │ -
1624 template<typename _InputIterator>
│ │ │ -
1625 void
│ │ │ -
│ │ │ -
1626 insert(_InputIterator __first, _InputIterator __last)
│ │ │ -
1627 { _M_h.insert(__first, __last); }
│ │ │ -
│ │ │ -
1628
│ │ │ -
1629 /**
│ │ │ -
1630 * @brief Attempts to insert a list of elements into the
│ │ │ -
1631 * %unordered_multimap.
│ │ │ -
1632 * @param __l A std::initializer_list<value_type> of elements
│ │ │ -
1633 * to be inserted.
│ │ │ -
1634 *
│ │ │ -
1635 * Complexity similar to that of the range constructor.
│ │ │ -
1636 */
│ │ │ -
1637 void
│ │ │ -
│ │ │ - │ │ │ -
1639 { _M_h.insert(__l); }
│ │ │ -
│ │ │ -
1640
│ │ │ -
1641#if __cplusplus > 201402L
│ │ │ -
1642 /// Extract a node.
│ │ │ -
1643 node_type
│ │ │ -
│ │ │ - │ │ │ -
1645 {
│ │ │ -
1646 __glibcxx_assert(__pos != end());
│ │ │ -
1647 return _M_h.extract(__pos);
│ │ │ -
1648 }
│ │ │ -
│ │ │ -
1649
│ │ │ -
1650 /// Extract a node.
│ │ │ -
1651 node_type
│ │ │ -
│ │ │ -
1652 extract(const key_type& __key)
│ │ │ -
1653 { return _M_h.extract(__key); }
│ │ │ -
│ │ │ -
1654
│ │ │ -
1655 /// Re-insert an extracted node.
│ │ │ -
1656 iterator
│ │ │ -
│ │ │ -
1657 insert(node_type&& __nh)
│ │ │ -
1658 { return _M_h._M_reinsert_node_multi(cend(), std::move(__nh)); }
│ │ │ -
│ │ │ -
1659
│ │ │ -
1660 /// Re-insert an extracted node.
│ │ │ -
1661 iterator
│ │ │ -
│ │ │ -
1662 insert(const_iterator __hint, node_type&& __nh)
│ │ │ -
1663 { return _M_h._M_reinsert_node_multi(__hint, std::move(__nh)); }
│ │ │ -
│ │ │ -
1664#endif // C++17
│ │ │ -
1665
│ │ │ -
1666 ///@{
│ │ │ -
1667 /**
│ │ │ -
1668 * @brief Erases an element from an %unordered_multimap.
│ │ │ -
1669 * @param __position An iterator pointing to the element to be erased.
│ │ │ -
1670 * @return An iterator pointing to the element immediately following
│ │ │ -
1671 * @a __position prior to the element being erased. If no such
│ │ │ -
1672 * element exists, end() is returned.
│ │ │ -
1673 *
│ │ │ -
1674 * This function erases an element, pointed to by the given iterator,
│ │ │ -
1675 * from an %unordered_multimap.
│ │ │ -
1676 * Note that this function only erases the element, and that if the
│ │ │ -
1677 * element is itself a pointer, the pointed-to memory is not touched in
│ │ │ -
1678 * any way. Managing the pointer is the user's responsibility.
│ │ │ -
1679 */
│ │ │ -
1680 iterator
│ │ │ -
│ │ │ - │ │ │ -
1682 { return _M_h.erase(__position); }
│ │ │ -
│ │ │ -
1683
│ │ │ -
1684 // LWG 2059.
│ │ │ -
1685 iterator
│ │ │ -
│ │ │ -
1686 erase(iterator __position)
│ │ │ -
1687 { return _M_h.erase(__position); }
│ │ │ -
│ │ │ -
1688 ///@}
│ │ │ -
1689
│ │ │ -
1690 /**
│ │ │ -
1691 * @brief Erases elements according to the provided key.
│ │ │ -
1692 * @param __x Key of elements to be erased.
│ │ │ -
1693 * @return The number of elements erased.
│ │ │ -
1694 *
│ │ │ -
1695 * This function erases all the elements located by the given key from
│ │ │ -
1696 * an %unordered_multimap.
│ │ │ -
1697 * Note that this function only erases the element, and that if the
│ │ │ -
1698 * element is itself a pointer, the pointed-to memory is not touched in
│ │ │ -
1699 * any way. Managing the pointer is the user's responsibility.
│ │ │ -
1700 */
│ │ │ -
1701 size_type
│ │ │ -
│ │ │ -
1702 erase(const key_type& __x)
│ │ │ -
1703 { return _M_h.erase(__x); }
│ │ │ -
│ │ │ -
1704
│ │ │ -
1705 /**
│ │ │ -
1706 * @brief Erases a [__first,__last) range of elements from an
│ │ │ -
1707 * %unordered_multimap.
│ │ │ -
1708 * @param __first Iterator pointing to the start of the range to be
│ │ │ -
1709 * erased.
│ │ │ -
1710 * @param __last Iterator pointing to the end of the range to
│ │ │ -
1711 * be erased.
│ │ │ -
1712 * @return The iterator @a __last.
│ │ │ -
1713 *
│ │ │ -
1714 * This function erases a sequence of elements from an
│ │ │ -
1715 * %unordered_multimap.
│ │ │ -
1716 * Note that this function only erases the elements, and that if
│ │ │ -
1717 * the element is itself a pointer, the pointed-to memory is not touched
│ │ │ -
1718 * in any way. Managing the pointer is the user's responsibility.
│ │ │ -
1719 */
│ │ │ -
1720 iterator
│ │ │ -
│ │ │ - │ │ │ -
1722 { return _M_h.erase(__first, __last); }
│ │ │ -
│ │ │ -
1723
│ │ │ -
1724 /**
│ │ │ -
1725 * Erases all elements in an %unordered_multimap.
│ │ │ -
1726 * Note that this function only erases the elements, and that if the
│ │ │ -
1727 * elements themselves are pointers, the pointed-to memory is not touched
│ │ │ -
1728 * in any way. Managing the pointer is the user's responsibility.
│ │ │ -
1729 */
│ │ │ -
1730 void
│ │ │ -
│ │ │ -
1731 clear() noexcept
│ │ │ -
1732 { _M_h.clear(); }
│ │ │ -
│ │ │ -
1733
│ │ │ -
1734 /**
│ │ │ -
1735 * @brief Swaps data with another %unordered_multimap.
│ │ │ -
1736 * @param __x An %unordered_multimap of the same element and allocator
│ │ │ -
1737 * types.
│ │ │ -
1738 *
│ │ │ -
1739 * This exchanges the elements between two %unordered_multimap in
│ │ │ -
1740 * constant time.
│ │ │ -
1741 * Note that the global std::swap() function is specialized such that
│ │ │ -
1742 * std::swap(m1,m2) will feed to this function.
│ │ │ -
1743 */
│ │ │ -
1744 void
│ │ │ -
│ │ │ - │ │ │ -
1746 noexcept( noexcept(_M_h.swap(__x._M_h)) )
│ │ │ -
1747 { _M_h.swap(__x._M_h); }
│ │ │ -
│ │ │ -
1748
│ │ │ -
1749#if __cplusplus > 201402L
│ │ │ -
1750 template<typename, typename, typename>
│ │ │ -
1751 friend class std::_Hash_merge_helper;
│ │ │ -
1752
│ │ │ -
1753 template<typename _H2, typename _P2>
│ │ │ -
1754 void
│ │ │ - │ │ │ -
1756 {
│ │ │ -
1757 using _Merge_helper
│ │ │ -
1758 = _Hash_merge_helper<unordered_multimap, _H2, _P2>;
│ │ │ -
1759 _M_h._M_merge_multi(_Merge_helper::_S_get_table(__source));
│ │ │ -
1760 }
│ │ │ -
1761
│ │ │ -
1762 template<typename _H2, typename _P2>
│ │ │ -
1763 void
│ │ │ -
1764 merge(unordered_multimap<_Key, _Tp, _H2, _P2, _Alloc>&& __source)
│ │ │ -
1765 { merge(__source); }
│ │ │ -
1766
│ │ │ -
1767 template<typename _H2, typename _P2>
│ │ │ -
1768 void
│ │ │ -
1769 merge(unordered_map<_Key, _Tp, _H2, _P2, _Alloc>& __source)
│ │ │ -
1770 {
│ │ │ -
1771 using _Merge_helper
│ │ │ -
1772 = _Hash_merge_helper<unordered_multimap, _H2, _P2>;
│ │ │ -
1773 _M_h._M_merge_multi(_Merge_helper::_S_get_table(__source));
│ │ │ -
1774 }
│ │ │ -
1775
│ │ │ -
1776 template<typename _H2, typename _P2>
│ │ │ -
1777 void
│ │ │ -
1778 merge(unordered_map<_Key, _Tp, _H2, _P2, _Alloc>&& __source)
│ │ │ -
1779 { merge(__source); }
│ │ │ -
1780#endif // C++17
│ │ │ -
1781
│ │ │ -
1782 // observers.
│ │ │ -
1783
│ │ │ -
1784 /// Returns the hash functor object with which the %unordered_multimap
│ │ │ -
1785 /// was constructed.
│ │ │ -
1786 hasher
│ │ │ -
│ │ │ - │ │ │ -
1788 { return _M_h.hash_function(); }
│ │ │ -
│ │ │ -
1789
│ │ │ -
1790 /// Returns the key comparison object with which the %unordered_multimap
│ │ │ -
1791 /// was constructed.
│ │ │ -
1792 key_equal
│ │ │ -
│ │ │ -
1793 key_eq() const
│ │ │ -
1794 { return _M_h.key_eq(); }
│ │ │ -
│ │ │ -
1795
│ │ │ -
1796 // lookup.
│ │ │ -
1797
│ │ │ -
1798 ///@{
│ │ │ -
1799 /**
│ │ │ -
1800 * @brief Tries to locate an element in an %unordered_multimap.
│ │ │ -
1801 * @param __x Key to be located.
│ │ │ -
1802 * @return Iterator pointing to sought-after element, or end() if not
│ │ │ -
1803 * found.
│ │ │ -
1804 *
│ │ │ -
1805 * This function takes a key and tries to locate the element with which
│ │ │ -
1806 * the key matches. If successful the function returns an iterator
│ │ │ -
1807 * pointing to the sought after element. If unsuccessful it returns the
│ │ │ -
1808 * past-the-end ( @c end() ) iterator.
│ │ │ -
1809 */
│ │ │ -
1810 iterator
│ │ │ -
│ │ │ -
1811 find(const key_type& __x)
│ │ │ -
1812 { return _M_h.find(__x); }
│ │ │ -
│ │ │ -
1813
│ │ │ -
1814#if __cplusplus > 201703L
│ │ │ -
1815 template<typename _Kt>
│ │ │ -
1816 auto
│ │ │ -
1817 find(const _Kt& __x) -> decltype(_M_h._M_find_tr(__x))
│ │ │ -
1818 { return _M_h._M_find_tr(__x); }
│ │ │ -
1819#endif
│ │ │ -
1820
│ │ │ -
1821 const_iterator
│ │ │ -
│ │ │ -
1822 find(const key_type& __x) const
│ │ │ -
1823 { return _M_h.find(__x); }
│ │ │ -
│ │ │ -
1824
│ │ │ -
1825#if __cplusplus > 201703L
│ │ │ -
1826 template<typename _Kt>
│ │ │ -
1827 auto
│ │ │ -
1828 find(const _Kt& __x) const -> decltype(_M_h._M_find_tr(__x))
│ │ │ -
1829 { return _M_h._M_find_tr(__x); }
│ │ │ -
1830#endif
│ │ │ -
1831 ///@}
│ │ │ -
1832
│ │ │ -
1833 ///@{
│ │ │ -
1834 /**
│ │ │ -
1835 * @brief Finds the number of elements.
│ │ │ -
1836 * @param __x Key to count.
│ │ │ -
1837 * @return Number of elements with specified key.
│ │ │ -
1838 */
│ │ │ -
1839 size_type
│ │ │ -
│ │ │ -
1840 count(const key_type& __x) const
│ │ │ -
1841 { return _M_h.count(__x); }
│ │ │ -
│ │ │ -
1842
│ │ │ -
1843#if __cplusplus > 201703L
│ │ │ -
1844 template<typename _Kt>
│ │ │ -
1845 auto
│ │ │ -
1846 count(const _Kt& __x) const -> decltype(_M_h._M_count_tr(__x))
│ │ │ -
1847 { return _M_h._M_count_tr(__x); }
│ │ │ -
1848#endif
│ │ │ -
1849 ///@}
│ │ │ -
1850
│ │ │ -
1851#if __cplusplus > 201703L
│ │ │ -
1852 ///@{
│ │ │ -
1853 /**
│ │ │ -
1854 * @brief Finds whether an element with the given key exists.
│ │ │ -
1855 * @param __x Key of elements to be located.
│ │ │ -
1856 * @return True if there is any element with the specified key.
│ │ │ -
1857 */
│ │ │ -
1858 bool
│ │ │ -
1859 contains(const key_type& __x) const
│ │ │ -
1860 { return _M_h.find(__x) != _M_h.end(); }
│ │ │ -
1861
│ │ │ -
1862 template<typename _Kt>
│ │ │ -
1863 auto
│ │ │ -
1864 contains(const _Kt& __x) const
│ │ │ -
1865 -> decltype(_M_h._M_find_tr(__x), void(), true)
│ │ │ -
1866 { return _M_h._M_find_tr(__x) != _M_h.end(); }
│ │ │ -
1867 ///@}
│ │ │ -
1868#endif
│ │ │ -
1869
│ │ │ -
1870 ///@{
│ │ │ -
1871 /**
│ │ │ -
1872 * @brief Finds a subsequence matching given key.
│ │ │ -
1873 * @param __x Key to be located.
│ │ │ -
1874 * @return Pair of iterators that possibly points to the subsequence
│ │ │ -
1875 * matching given key.
│ │ │ -
1876 */
│ │ │ -
1877 std::pair<iterator, iterator>
│ │ │ -
│ │ │ - │ │ │ -
1879 { return _M_h.equal_range(__x); }
│ │ │ -
│ │ │ -
1880
│ │ │ -
1881#if __cplusplus > 201703L
│ │ │ -
1882 template<typename _Kt>
│ │ │ -
1883 auto
│ │ │ -
1884 equal_range(const _Kt& __x)
│ │ │ -
1885 -> decltype(_M_h._M_equal_range_tr(__x))
│ │ │ -
1886 { return _M_h._M_equal_range_tr(__x); }
│ │ │ -
1887#endif
│ │ │ -
1888
│ │ │ - │ │ │ -
│ │ │ -
1890 equal_range(const key_type& __x) const
│ │ │ -
1891 { return _M_h.equal_range(__x); }
│ │ │ -
│ │ │ -
1892
│ │ │ -
1893#if __cplusplus > 201703L
│ │ │ -
1894 template<typename _Kt>
│ │ │ -
1895 auto
│ │ │ -
1896 equal_range(const _Kt& __x) const
│ │ │ -
1897 -> decltype(_M_h._M_equal_range_tr(__x))
│ │ │ -
1898 { return _M_h._M_equal_range_tr(__x); }
│ │ │ -
1899#endif
│ │ │ -
1900 ///@}
│ │ │ -
1901
│ │ │ -
1902 // bucket interface.
│ │ │ -
1903
│ │ │ -
1904 /// Returns the number of buckets of the %unordered_multimap.
│ │ │ -
1905 size_type
│ │ │ -
│ │ │ -
1906 bucket_count() const noexcept
│ │ │ -
1907 { return _M_h.bucket_count(); }
│ │ │ -
│ │ │ -
1908
│ │ │ -
1909 /// Returns the maximum number of buckets of the %unordered_multimap.
│ │ │ -
1910 size_type
│ │ │ -
│ │ │ -
1911 max_bucket_count() const noexcept
│ │ │ -
1912 { return _M_h.max_bucket_count(); }
│ │ │ -
│ │ │ -
1913
│ │ │ -
1914 /*
│ │ │ -
1915 * @brief Returns the number of elements in a given bucket.
│ │ │ -
1916 * @param __n A bucket index.
│ │ │ -
1917 * @return The number of elements in the bucket.
│ │ │ -
1918 */
│ │ │ -
1919 size_type
│ │ │ -
1920 bucket_size(size_type __n) const
│ │ │ -
1921 { return _M_h.bucket_size(__n); }
│ │ │ -
1922
│ │ │ -
1923 /*
│ │ │ -
1924 * @brief Returns the bucket index of a given element.
│ │ │ -
1925 * @param __key A key instance.
│ │ │ -
1926 * @return The key bucket index.
│ │ │ -
1927 */
│ │ │ -
1928 size_type
│ │ │ -
1929 bucket(const key_type& __key) const
│ │ │ -
1930 { return _M_h.bucket(__key); }
│ │ │ -
1931
│ │ │ -
1932 /**
│ │ │ -
1933 * @brief Returns a read/write iterator pointing to the first bucket
│ │ │ -
1934 * element.
│ │ │ -
1935 * @param __n The bucket index.
│ │ │ -
1936 * @return A read/write local iterator.
│ │ │ -
1937 */
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
1940 { return _M_h.begin(__n); }
│ │ │ -
│ │ │ -
1941
│ │ │ -
1942 ///@{
│ │ │ -
1943 /**
│ │ │ -
1944 * @brief Returns a read-only (constant) iterator pointing to the first
│ │ │ -
1945 * bucket element.
│ │ │ -
1946 * @param __n The bucket index.
│ │ │ -
1947 * @return A read-only local iterator.
│ │ │ -
1948 */
│ │ │ - │ │ │ -
│ │ │ -
1950 begin(size_type __n) const
│ │ │ -
1951 { return _M_h.begin(__n); }
│ │ │ -
│ │ │ -
1952
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
1955 { return _M_h.cbegin(__n); }
│ │ │ -
│ │ │ -
1956 ///@}
│ │ │ -
1957
│ │ │ -
1958 /**
│ │ │ -
1959 * @brief Returns a read/write iterator pointing to one past the last
│ │ │ -
1960 * bucket elements.
│ │ │ -
1961 * @param __n The bucket index.
│ │ │ -
1962 * @return A read/write local iterator.
│ │ │ -
1963 */
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
1966 { return _M_h.end(__n); }
│ │ │ -
│ │ │ -
1967
│ │ │ -
1968 ///@{
│ │ │ -
1969 /**
│ │ │ -
1970 * @brief Returns a read-only (constant) iterator pointing to one past
│ │ │ -
1971 * the last bucket elements.
│ │ │ -
1972 * @param __n The bucket index.
│ │ │ -
1973 * @return A read-only local iterator.
│ │ │ -
1974 */
│ │ │ - │ │ │ -
│ │ │ -
1976 end(size_type __n) const
│ │ │ -
1977 { return _M_h.end(__n); }
│ │ │ -
│ │ │ -
1978
│ │ │ - │ │ │ -
│ │ │ -
1980 cend(size_type __n) const
│ │ │ -
1981 { return _M_h.cend(__n); }
│ │ │ -
│ │ │ -
1982 ///@}
│ │ │ -
1983
│ │ │ -
1984 // hash policy.
│ │ │ -
1985
│ │ │ -
1986 /// Returns the average number of elements per bucket.
│ │ │ -
1987 float
│ │ │ -
│ │ │ -
1988 load_factor() const noexcept
│ │ │ -
1989 { return _M_h.load_factor(); }
│ │ │ -
│ │ │ -
1990
│ │ │ -
1991 /// Returns a positive number that the %unordered_multimap tries to keep
│ │ │ -
1992 /// the load factor less than or equal to.
│ │ │ -
1993 float
│ │ │ -
│ │ │ -
1994 max_load_factor() const noexcept
│ │ │ -
1995 { return _M_h.max_load_factor(); }
│ │ │ -
│ │ │ -
1996
│ │ │ -
1997 /**
│ │ │ -
1998 * @brief Change the %unordered_multimap maximum load factor.
│ │ │ -
1999 * @param __z The new maximum load factor.
│ │ │ -
2000 */
│ │ │ -
2001 void
│ │ │ -
│ │ │ - │ │ │ -
2003 { _M_h.max_load_factor(__z); }
│ │ │ -
│ │ │ -
2004
│ │ │ -
2005 /**
│ │ │ -
2006 * @brief May rehash the %unordered_multimap.
│ │ │ -
2007 * @param __n The new number of buckets.
│ │ │ -
2008 *
│ │ │ -
2009 * Rehash will occur only if the new number of buckets respect the
│ │ │ -
2010 * %unordered_multimap maximum load factor.
│ │ │ -
2011 */
│ │ │ -
2012 void
│ │ │ -
│ │ │ - │ │ │ -
2014 { _M_h.rehash(__n); }
│ │ │ -
│ │ │ -
2015
│ │ │ -
2016 /**
│ │ │ -
2017 * @brief Prepare the %unordered_multimap for a specified number of
│ │ │ -
2018 * elements.
│ │ │ -
2019 * @param __n Number of elements required.
│ │ │ -
2020 *
│ │ │ -
2021 * Same as rehash(ceil(n / max_load_factor())).
│ │ │ -
2022 */
│ │ │ -
2023 void
│ │ │ -
│ │ │ - │ │ │ -
2025 { _M_h.reserve(__n); }
│ │ │ -
│ │ │ -
2026
│ │ │ -
2027 template<typename _Key1, typename _Tp1, typename _Hash1, typename _Pred1,
│ │ │ -
2028 typename _Alloc1>
│ │ │ -
2029 friend bool
│ │ │ -
2030 operator==(const unordered_multimap<_Key1, _Tp1,
│ │ │ -
2031 _Hash1, _Pred1, _Alloc1>&,
│ │ │ -
2032 const unordered_multimap<_Key1, _Tp1,
│ │ │ -
2033 _Hash1, _Pred1, _Alloc1>&);
│ │ │ -
2034 };
│ │ │ -
│ │ │ -
2035
│ │ │ -
2036#if __cpp_deduction_guides >= 201606
│ │ │ -
2037
│ │ │ -
2038 template<typename _InputIterator,
│ │ │ -
2039 typename _Hash = hash<__iter_key_t<_InputIterator>>,
│ │ │ -
2040 typename _Pred = equal_to<__iter_key_t<_InputIterator>>,
│ │ │ -
2041 typename _Allocator = allocator<__iter_to_alloc_t<_InputIterator>>,
│ │ │ -
2042 typename = _RequireInputIter<_InputIterator>,
│ │ │ -
2043 typename = _RequireNotAllocatorOrIntegral<_Hash>,
│ │ │ -
2044 typename = _RequireNotAllocator<_Pred>,
│ │ │ -
2045 typename = _RequireAllocator<_Allocator>>
│ │ │ -
2046 unordered_multimap(_InputIterator, _InputIterator,
│ │ │ -
2047 unordered_multimap<int, int>::size_type = {},
│ │ │ -
2048 _Hash = _Hash(), _Pred = _Pred(),
│ │ │ -
2049 _Allocator = _Allocator())
│ │ │ -
2050 -> unordered_multimap<__iter_key_t<_InputIterator>,
│ │ │ -
2051 __iter_val_t<_InputIterator>, _Hash, _Pred,
│ │ │ -
2052 _Allocator>;
│ │ │ -
2053
│ │ │ -
2054 template<typename _Key, typename _Tp, typename _Hash = hash<_Key>,
│ │ │ -
2055 typename _Pred = equal_to<_Key>,
│ │ │ -
2056 typename _Allocator = allocator<pair<const _Key, _Tp>>,
│ │ │ -
2057 typename = _RequireNotAllocatorOrIntegral<_Hash>,
│ │ │ -
2058 typename = _RequireNotAllocator<_Pred>,
│ │ │ -
2059 typename = _RequireAllocator<_Allocator>>
│ │ │ - │ │ │ - │ │ │ -
2062 _Hash = _Hash(), _Pred = _Pred(),
│ │ │ -
2063 _Allocator = _Allocator())
│ │ │ - │ │ │ -
2065
│ │ │ -
2066 template<typename _InputIterator, typename _Allocator,
│ │ │ -
2067 typename = _RequireInputIter<_InputIterator>,
│ │ │ -
2068 typename = _RequireAllocator<_Allocator>>
│ │ │ -
2069 unordered_multimap(_InputIterator, _InputIterator,
│ │ │ - │ │ │ - │ │ │ -
2072 __iter_val_t<_InputIterator>,
│ │ │ - │ │ │ - │ │ │ -
2075
│ │ │ -
2076 template<typename _InputIterator, typename _Allocator,
│ │ │ -
2077 typename = _RequireInputIter<_InputIterator>,
│ │ │ -
2078 typename = _RequireAllocator<_Allocator>>
│ │ │ -
2079 unordered_multimap(_InputIterator, _InputIterator, _Allocator)
│ │ │ - │ │ │ -
2081 __iter_val_t<_InputIterator>,
│ │ │ - │ │ │ - │ │ │ -
2084
│ │ │ -
2085 template<typename _InputIterator, typename _Hash, typename _Allocator,
│ │ │ -
2086 typename = _RequireInputIter<_InputIterator>,
│ │ │ -
2087 typename = _RequireNotAllocatorOrIntegral<_Hash>,
│ │ │ -
2088 typename = _RequireAllocator<_Allocator>>
│ │ │ -
2089 unordered_multimap(_InputIterator, _InputIterator,
│ │ │ - │ │ │ -
2091 _Allocator)
│ │ │ - │ │ │ -
2093 __iter_val_t<_InputIterator>, _Hash,
│ │ │ - │ │ │ -
2095
│ │ │ -
2096 template<typename _Key, typename _Tp, typename _Allocator,
│ │ │ -
2097 typename = _RequireAllocator<_Allocator>>
│ │ │ - │ │ │ - │ │ │ -
2100 _Allocator)
│ │ │ - │ │ │ -
2102
│ │ │ -
2103 template<typename _Key, typename _Tp, typename _Allocator,
│ │ │ -
2104 typename = _RequireAllocator<_Allocator>>
│ │ │ - │ │ │ - │ │ │ -
2107
│ │ │ -
2108 template<typename _Key, typename _Tp, typename _Hash, typename _Allocator,
│ │ │ -
2109 typename = _RequireNotAllocatorOrIntegral<_Hash>,
│ │ │ -
2110 typename = _RequireAllocator<_Allocator>>
│ │ │ - │ │ │ - │ │ │ -
2113 _Hash, _Allocator)
│ │ │ - │ │ │ -
2115
│ │ │ -
2116#endif
│ │ │ -
2117
│ │ │ -
2118 template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
│ │ │ -
2119 inline void
│ │ │ - │ │ │ - │ │ │ -
2122 noexcept(noexcept(__x.swap(__y)))
│ │ │ -
2123 { __x.swap(__y); }
│ │ │ -
2124
│ │ │ -
2125 template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
│ │ │ -
2126 inline void
│ │ │ - │ │ │ - │ │ │ -
2129 noexcept(noexcept(__x.swap(__y)))
│ │ │ -
2130 { __x.swap(__y); }
│ │ │ -
2131
│ │ │ -
2132 template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
│ │ │ -
2133 inline bool
│ │ │ - │ │ │ - │ │ │ -
2136 { return __x._M_h._M_equal(__y._M_h); }
│ │ │ -
2137
│ │ │ -
2138#if __cpp_impl_three_way_comparison < 201907L
│ │ │ -
2139 template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
│ │ │ -
2140 inline bool
│ │ │ - │ │ │ - │ │ │ -
2143 { return !(__x == __y); }
│ │ │ -
2144#endif
│ │ │ -
2145
│ │ │ -
2146 template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
│ │ │ -
2147 inline bool
│ │ │ - │ │ │ - │ │ │ -
2150 { return __x._M_h._M_equal(__y._M_h); }
│ │ │ -
2151
│ │ │ -
2152#if __cpp_impl_three_way_comparison < 201907L
│ │ │ -
2153 template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
│ │ │ -
2154 inline bool
│ │ │ - │ │ │ - │ │ │ -
2157 { return !(__x == __y); }
│ │ │ -
2158#endif
│ │ │ -
2159
│ │ │ -
2160_GLIBCXX_END_NAMESPACE_CONTAINER
│ │ │ -
2161
│ │ │ -
2162#if __cplusplus > 201402L
│ │ │ -
2163 // Allow std::unordered_map access to internals of compatible maps.
│ │ │ -
2164 template<typename _Key, typename _Val, typename _Hash1, typename _Eq1,
│ │ │ -
2165 typename _Alloc, typename _Hash2, typename _Eq2>
│ │ │ -
2166 struct _Hash_merge_helper<
│ │ │ -
2167 _GLIBCXX_STD_C::unordered_map<_Key, _Val, _Hash1, _Eq1, _Alloc>,
│ │ │ -
2168 _Hash2, _Eq2>
│ │ │ -
2169 {
│ │ │ -
2170 private:
│ │ │ -
2171 template<typename... _Tp>
│ │ │ -
2172 using unordered_map = _GLIBCXX_STD_C::unordered_map<_Tp...>;
│ │ │ -
2173 template<typename... _Tp>
│ │ │ -
2174 using unordered_multimap = _GLIBCXX_STD_C::unordered_multimap<_Tp...>;
│ │ │ -
2175
│ │ │ -
2176 friend unordered_map<_Key, _Val, _Hash1, _Eq1, _Alloc>;
│ │ │ -
2177
│ │ │ -
2178 static auto&
│ │ │ -
2179 _S_get_table(unordered_map<_Key, _Val, _Hash2, _Eq2, _Alloc>& __map)
│ │ │ -
2180 { return __map._M_h; }
│ │ │ -
2181
│ │ │ -
2182 static auto&
│ │ │ -
2183 _S_get_table(unordered_multimap<_Key, _Val, _Hash2, _Eq2, _Alloc>& __map)
│ │ │ -
2184 { return __map._M_h; }
│ │ │ -
2185 };
│ │ │ -
2186
│ │ │ -
2187 // Allow std::unordered_multimap access to internals of compatible maps.
│ │ │ -
2188 template<typename _Key, typename _Val, typename _Hash1, typename _Eq1,
│ │ │ -
2189 typename _Alloc, typename _Hash2, typename _Eq2>
│ │ │ -
2190 struct _Hash_merge_helper<
│ │ │ -
2191 _GLIBCXX_STD_C::unordered_multimap<_Key, _Val, _Hash1, _Eq1, _Alloc>,
│ │ │ -
2192 _Hash2, _Eq2>
│ │ │ -
2193 {
│ │ │ -
2194 private:
│ │ │ -
2195 template<typename... _Tp>
│ │ │ -
2196 using unordered_map = _GLIBCXX_STD_C::unordered_map<_Tp...>;
│ │ │ -
2197 template<typename... _Tp>
│ │ │ -
2198 using unordered_multimap = _GLIBCXX_STD_C::unordered_multimap<_Tp...>;
│ │ │ -
2199
│ │ │ -
2200 friend unordered_multimap<_Key, _Val, _Hash1, _Eq1, _Alloc>;
│ │ │ -
2201
│ │ │ -
2202 static auto&
│ │ │ -
2203 _S_get_table(unordered_map<_Key, _Val, _Hash2, _Eq2, _Alloc>& __map)
│ │ │ -
2204 { return __map._M_h; }
│ │ │ -
2205
│ │ │ -
2206 static auto&
│ │ │ -
2207 _S_get_table(unordered_multimap<_Key, _Val, _Hash2, _Eq2, _Alloc>& __map)
│ │ │ -
2208 { return __map._M_h; }
│ │ │ -
2209 };
│ │ │ -
2210#endif // C++17
│ │ │ -
2211
│ │ │ -
2212_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ -
2213} // namespace std
│ │ │ -
2214
│ │ │ -
2215#endif /* _UNORDERED_MAP_H */
│ │ │ -
constexpr std::remove_reference< _Tp >::type && move(_Tp &&__t) noexcept
Convert a value to an rvalue.
Definition move.h:104
│ │ │ +
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 }
│ │ │ + │ │ │ +
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).
│ │ │ +
715 streamsize __len;
│ │ │ +
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 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
│ │ │ + │ │ │ +
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
│ │ │ +
775 const streamsize __limit = std::min(__chunk, __bufavail);
│ │ │ +
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>
│ │ │ +
802 typename basic_filebuf<_CharT, _Traits>::__streambuf_type*
│ │ │ +
│ │ │ + │ │ │ +
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)
│ │ │ + │ │ │ +
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 {
│ │ │ +
878 __ret = __file_off + __computed_off;
│ │ │ +
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.
│ │ │ + │ │ │ +
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;
│ │ │ +
921 __ret = __file_off;
│ │ │ +
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>
│ │ │ + │ │ │ +
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
│ │ │ + │ │ │ + │ │ │ +
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 // 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 const __codecvt_type* _M_codecvt_tmp = 0;
│ │ │ +
1035 if (__builtin_expect(has_facet<__codecvt_type>(__loc), true))
│ │ │ +
1036 _M_codecvt_tmp = &use_facet<__codecvt_type>(__loc);
│ │ │ +
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().
│ │ │ + │ │ │ +
1059 + _M_codecvt->length(_M_state_last, _M_ext_buf,
│ │ │ + │ │ │ +
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
│ │ │ + │ │ │ +
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:428
│ │ │ -
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.
│ │ │ +
bool has_facet(const locale &__loc)
Test for the presence of a facet.
│ │ │ +
const _Facet & use_facet(const locale &__loc)
Return a facet.
│ │ │
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.
│ │ │ -
initializer_list
│ │ │ -
Primary class template hash.
│ │ │ - │ │ │ -
The standard allocator, as per C++03 [20.4.1].
Definition allocator.h:125
│ │ │ -
One of the comparison functors.
│ │ │ -
Common iterator class.
│ │ │ -
Struct holding two objects of arbitrary type.
Definition stl_pair.h:213
│ │ │ -
_T1 first
The first member.
Definition stl_pair.h:217
│ │ │ -
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.
│ │ │ - │ │ │ -
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.
│ │ │ - │ │ │ -
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.
│ │ │ - │ │ │ -
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.
│ │ │ - │ │ │ -
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.
│ │ │ - │ │ │ -
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.
│ │ │ - │ │ │ - │ │ │ -
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.
│ │ │ -
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.
│ │ │ - │ │ │ - │ │ │ -
const_local_iterator begin(size_type __n) const
Returns a read-only (constant) iterator pointing to the first bucket element.
│ │ │ - │ │ │ -
unordered_multimap(unordered_multimap &&)=default
Move constructor.
│ │ │ -
unordered_multimap(const allocator_type &__a)
Creates an unordered_multimap with no elements.
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
__enable_if_t< is_constructible< value_type, _Pair && >::value, iterator > insert(_Pair &&__x)
Inserts a std::pair into the unordered_multimap.
│ │ │ -
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.
│ │ │ - │ │ │ -
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
│ │ │ - │ │ │ -
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.
│ │ │ - │ │ │ -
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.
│ │ │ -
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.
│ │ │ - │ │ │ -
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.
│ │ │ -
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.
│ │ │ -
unordered_map & operator=(initializer_list< value_type > __l)
Unordered_map list assignment operator.
│ │ │ - │ │ │ -
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.
│ │ │ - │ │ │ -
iterator insert(const_iterator __hint, const value_type &__x)
Attempts to insert a std::pair into the unordered_map.
│ │ │ -
iterator end() noexcept
│ │ │ - │ │ │ -
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.
│ │ │ -
size_type max_size() const noexcept
Returns the maximum size of the unordered_map.
│ │ │ -
const_iterator end() const noexcept
│ │ │ -
unordered_map()=default
Default constructor.
│ │ │ - │ │ │ -
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.
│ │ │ - │ │ │ -
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.
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
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.
│ │ │ - │ │ │ -
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.
│ │ │ - │ │ │ -
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.
│ │ │ -
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.
│ │ │ - │ │ │ - │ │ │ -
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.
│ │ │ - │ │ │ - │ │ │ -
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.
│ │ │ - │ │ │ -
void rehash(size_type __n)
May rehash the unordered_map.
│ │ │ -
const_iterator cbegin() const noexcept
│ │ │ +
ptrdiff_t streamsize
Integral type for I/O operation counts and buffer sizes.
Definition postypes.h:98
│ │ │ +
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
│ │ │ +
char_type _M_pback
Definition fstream:169
│ │ │ +
virtual streamsize showmanyc()
Investigating the data available.
Definition fstream.tcc:298
│ │ │ +
ios_base::openmode _M_mode
Place to stash in || out || in | out settings for current filebuf.
Definition fstream:126
│ │ │ +
streamsize _M_ext_buf_size
Definition fstream:188
│ │ │ +
char_type * _M_pback_cur_save
Definition fstream:170
│ │ │ +
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
│ │ │ +
bool is_open() const
Returns true if the external file is open.
Definition fstream:270
│ │ │ +
size_t _M_buf_size
Definition fstream:148
│ │ │ +
__filebuf_type * close()
Closes the currently associated file.
Definition fstream.tcc:250
│ │ │ +
char_type * _M_pback_end_save
Definition fstream:171
│ │ │ +
char * _M_ext_buf
Definition fstream:183
│ │ │ +
void _M_destroy_pback()
Definition fstream:221
│ │ │ +
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
│ │ │ +
char_type * _M_buf
Pointer to the beginning of internal buffer.
Definition fstream:141
│ │ │ +
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
│ │ │ +
void _M_create_pback()
Definition fstream:204
│ │ │ + │ │ │ +
__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
│ │ │ +
void _M_set_buffer(streamsize __off)
Definition fstream:464
│ │ │ +
virtual int sync()
Synchronizes the buffer arrays with the controlled sequences.
Definition fstream.tcc:1013
│ │ │ +
const char * _M_ext_next
Definition fstream:195
│ │ │ +
virtual __streambuf_type * setbuf(char_type *__s, streamsize __n)
Manipulates the buffer.
Definition fstream.tcc:804
│ │ │ +
Controlling input for files.
Definition fstream:498
│ │ │ +
Controlling output for files.
Definition fstream:759
│ │ │ +
Controlling input and output for files.
Definition fstream:1022
│ │ │ +
traits_type::int_type int_type
Definition streambuf:133
│ │ │ +
char_type * epptr() const
Access to the put area.
Definition streambuf:540
│ │ │ +
virtual streamsize xsputn(const char_type *__s, streamsize __n)
│ │ │ +
char_type * pptr() const
Access to the put area.
Definition streambuf:537
│ │ │ +
void setg(char_type *__gbeg, char_type *__gnext, char_type *__gend)
Setting the three read area pointers.
Definition streambuf:514
│ │ │ +
char_type * eback() const
Access to the get area.
Definition streambuf:487
│ │ │ +
char_type * egptr() const
Access to the get area.
Definition streambuf:493
│ │ │ +
char_type * gptr() const
Access to the get area.
Definition streambuf:490
│ │ │ +
virtual streamsize xsgetn(char_type *__s, streamsize __n)
│ │ │ +
void gbump(int __n)
Moving the read position.
Definition streambuf:503
│ │ │ +
void pbump(int __n)
Moving the write position.
Definition streambuf:550
│ │ │ +
char_type * pbase() const
Access to the put area.
Definition streambuf:534
│ │ │ +
locale _M_buf_locale
Current locale setting.
Definition streambuf:197
│ │ │ + │ │ │ +
The base of the I/O class hierarchy.
Definition ios_base.h:229
│ │ │ +
static const seekdir cur
Request a seek relative to the current position within the sequence.
Definition ios_base.h:485
│ │ │ +
static const seekdir beg
Request a seek relative to the beginning of the stream.
Definition ios_base.h:482
│ │ │ +
static const seekdir end
Request a seek relative to the current end of the sequence.
Definition ios_base.h:488
│ │ │ +
static const openmode in
Open for input. Default for ifstream and fstream.
Definition ios_base.h:461
│ │ │ +
static const openmode out
Open for output. Default for ofstream and fstream.
Definition ios_base.h:464
│ │ │ +
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:458
│ │ │ +
_Ios_Openmode openmode
This is a bitmask type.
Definition ios_base.h:447
│ │ │ +
static const openmode app
Seek to end before each write.
Definition ios_base.h:450
│ │ │ +
_Ios_Seekdir seekdir
This is an enumerated type.
Definition ios_base.h:479
│ │ │ +
static const openmode ate
Open and seek to end immediately after opening.
Definition ios_base.h:453
│ │ │ +
Container class for localization functionality.
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,13 +1,13 @@ │ │ │ │ libstdc++ │ │ │ │ -unordered_map.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// unordered_map implementation -*- C++ -*- │ │ │ │ +1// File based streams -*- C++ -*- │ │ │ │ 2 │ │ │ │ -3// Copyright (C) 2010-2021 Free Software Foundation, Inc. │ │ │ │ +3// Copyright (C) 1997-2021 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,2903 +21,1330 @@ │ │ │ │ 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/fstream.tcc │ │ │ │ 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{fstream} │ │ │ │ 28 */ │ │ │ │ 29 │ │ │ │ -30#ifndef _UNORDERED_MAP_H │ │ │ │ -31#define _UNORDERED_MAP_H │ │ │ │ -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 _Pred = _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 _Tr = _____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 __umap_hashtable = _Hashtable<_Key, std::pair, │ │ │ │ -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 │ │ │ │ -_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 _Pred = _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 _Tr = _____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 __ummap_hashtable = _Hashtable<_Key, std::pair, │ │ │ │ -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 │ │ │ │ -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 * │ │ │ │ -82 * @tparam _Key Type of key objects. │ │ │ │ -83 * @tparam _Tp Type of mapped objects. │ │ │ │ -84 * @tparam _Hash Hashing function object type, defaults to hash<_Value>. │ │ │ │ -85 * @tparam _Pred Predicate function object type, defaults │ │ │ │ -86 * to equal_to<_Value>. │ │ │ │ -87 * @tparam _Alloc Allocator type, defaults to │ │ │ │ -88 * std::allocator>. │ │ │ │ -89 * │ │ │ │ -90 * Meets the requirements of a container, and │ │ │ │ -91 * unordered associative container │ │ │ │ -92 * │ │ │ │ -93 * The resulting value type of the container is std::pair. │ │ │ │ -94 * │ │ │ │ -95 * Base is _Hashtable, dispatched at compile time via template │ │ │ │ -96 * alias __umap_hashtable. │ │ │ │ -97 */ │ │ │ │ -98 template, │ │ │ │ -100 typename _Pred = _e_q_u_a_l___t_o_<___K_e_y_>, │ │ │ │ -101 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_2 class _u_n_o_r_d_e_r_e_d___m_a_p │ │ │ │ -103 { │ │ │ │ -104 typedef __umap_hashtable<_Key, _Tp, _Hash, _Pred, _Alloc> _Hashtable; │ │ │ │ -105 _Hashtable _M_h; │ │ │ │ -106 │ │ │ │ -107 public: │ │ │ │ -108 // typedefs: │ │ │ │ -109 ///@{ │ │ │ │ -110 /// Public typedefs. │ │ │ │ -_1_1_1 typedef typename _Hashtable::key_type _k_e_y___t_y_p_e; │ │ │ │ -_1_1_2 typedef typename _Hashtable::value_type _v_a_l_u_e___t_y_p_e; │ │ │ │ -_1_1_3 typedef typename _Hashtable::mapped_type _m_a_p_p_e_d___t_y_p_e; │ │ │ │ -_1_1_4 typedef typename _Hashtable::hasher _h_a_s_h_e_r; │ │ │ │ -_1_1_5 typedef typename _Hashtable::key_equal _k_e_y___e_q_u_a_l; │ │ │ │ -_1_1_6 typedef typename _Hashtable::allocator_type _a_l_l_o_c_a_t_o_r___t_y_p_e; │ │ │ │ -117 ///@} │ │ │ │ -118 │ │ │ │ -119 ///@{ │ │ │ │ -120 /// Iterator-related typedefs. │ │ │ │ -_1_2_1 typedef typename _Hashtable::pointer _p_o_i_n_t_e_r; │ │ │ │ -_1_2_2 typedef typename _Hashtable::const_pointer _c_o_n_s_t___p_o_i_n_t_e_r; │ │ │ │ -_1_2_3 typedef typename _Hashtable::reference _r_e_f_e_r_e_n_c_e; │ │ │ │ -_1_2_4 typedef typename _Hashtable::const_reference _c_o_n_s_t___r_e_f_e_r_e_n_c_e; │ │ │ │ -_1_2_5 typedef typename _Hashtable::iterator _i_t_e_r_a_t_o_r; │ │ │ │ -_1_2_6 typedef typename _Hashtable::const_iterator _c_o_n_s_t___i_t_e_r_a_t_o_r; │ │ │ │ -_1_2_7 typedef typename _Hashtable::local_iterator _l_o_c_a_l___i_t_e_r_a_t_o_r; │ │ │ │ -_1_2_8 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_9 typedef typename _Hashtable::size_type _s_i_z_e___t_y_p_e; │ │ │ │ -_1_3_0 typedef typename _Hashtable::difference_type _d_i_f_f_e_r_e_n_c_e___t_y_p_e; │ │ │ │ -131 ///@} │ │ │ │ -132 │ │ │ │ -133#if __cplusplus > 201402L │ │ │ │ -134 using node_type = typename _Hashtable::node_type; │ │ │ │ -135 using insert_return_type = typename _Hashtable::insert_return_type; │ │ │ │ -136#endif │ │ │ │ -137 │ │ │ │ -138 //construct/destroy/copy │ │ │ │ -139 │ │ │ │ -140 /// Default constructor. │ │ │ │ -_1_4_1 _u_n_o_r_d_e_r_e_d___m_a_p() = default; │ │ │ │ -142 │ │ │ │ -143 /** │ │ │ │ -144 * @brief Default constructor creates no elements. │ │ │ │ -145 * @param __n Minimal initial number of buckets. │ │ │ │ -146 * @param __hf A hash functor. │ │ │ │ -147 * @param __eql A key equality functor. │ │ │ │ -148 * @param __a An allocator object. │ │ │ │ -149 */ │ │ │ │ -150 explicit │ │ │ │ -_1_5_1 _u_n_o_r_d_e_r_e_d___m_a_p(_s_i_z_e___t_y_p_e __n, │ │ │ │ -152 const _h_a_s_h_e_r& __hf = _h_a_s_h_e_r(), │ │ │ │ -153 const _k_e_y___e_q_u_a_l& __eql = _k_e_y___e_q_u_a_l(), │ │ │ │ -154 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()) │ │ │ │ -155 : _M_h(__n, __hf, __eql, __a) │ │ │ │ -156 { } │ │ │ │ -157 │ │ │ │ -158 /** │ │ │ │ -159 * @brief Builds an %unordered_map from a range. │ │ │ │ -160 * @param __first An input iterator. │ │ │ │ -161 * @param __last An input iterator. │ │ │ │ -162 * @param __n Minimal initial number of buckets. │ │ │ │ -163 * @param __hf A hash functor. │ │ │ │ -164 * @param __eql A key equality functor. │ │ │ │ -165 * @param __a An allocator object. │ │ │ │ -166 * │ │ │ │ -167 * Create an %unordered_map consisting of copies of the elements from │ │ │ │ -168 * [__first,__last). This is linear in N (where N is │ │ │ │ -169 * distance(__first,__last)). │ │ │ │ -170 */ │ │ │ │ -171 template │ │ │ │ -_1_7_2 _u_n_o_r_d_e_r_e_d___m_a_p(_InputIterator __first, _InputIterator __last, │ │ │ │ -173 _s_i_z_e___t_y_p_e __n = 0, │ │ │ │ -174 const _h_a_s_h_e_r& __hf = _h_a_s_h_e_r(), │ │ │ │ -175 const _k_e_y___e_q_u_a_l& __eql = _k_e_y___e_q_u_a_l(), │ │ │ │ -176 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()) │ │ │ │ -177 : _M_h(__first, __last, __n, __hf, __eql, __a) │ │ │ │ -178 { } │ │ │ │ -179 │ │ │ │ -180 /// Copy constructor. │ │ │ │ -_1_8_1 _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; │ │ │ │ -182 │ │ │ │ -183 /// Move constructor. │ │ │ │ -_1_8_4 _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; │ │ │ │ -185 │ │ │ │ -186 /** │ │ │ │ -187 * @brief Creates an %unordered_map with no elements. │ │ │ │ -188 * @param __a An allocator object. │ │ │ │ -189 */ │ │ │ │ -190 explicit │ │ │ │ -_1_9_1 _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) │ │ │ │ -192 : _M_h(__a) │ │ │ │ -193 { } │ │ │ │ -194 │ │ │ │ -195 /* │ │ │ │ -196 * @brief Copy constructor with allocator argument. │ │ │ │ -197 * @param __uset Input %unordered_map to copy. │ │ │ │ -198 * @param __a An allocator object. │ │ │ │ -199 */ │ │ │ │ -200 _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& __umap, │ │ │ │ -201 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -202 : _M_h(__umap._M_h, __a) │ │ │ │ -203 { } │ │ │ │ -204 │ │ │ │ -205 /* │ │ │ │ -206 * @brief Move constructor with allocator argument. │ │ │ │ -207 * @param __uset Input %unordered_map to move. │ │ │ │ -208 * @param __a An allocator object. │ │ │ │ -209 */ │ │ │ │ -210 _u_n_o_r_d_e_r_e_d___m_a_p(unordered_map&& __umap, │ │ │ │ -211 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -212 noexcept( noexcept(_Hashtable(_s_t_d_:_:_m_o_v_e(__umap._M_h), __a)) ) │ │ │ │ -213 : _M_h(_s_t_d::_m_o_v_e(__umap._M_h), __a) │ │ │ │ -214 { } │ │ │ │ -215 │ │ │ │ -216 /** │ │ │ │ -217 * @brief Builds an %unordered_map from an initializer_list. │ │ │ │ -218 * @param __l An initializer_list. │ │ │ │ -219 * @param __n Minimal initial number of buckets. │ │ │ │ -220 * @param __hf A hash functor. │ │ │ │ -221 * @param __eql A key equality functor. │ │ │ │ -222 * @param __a An allocator object. │ │ │ │ -223 * │ │ │ │ -224 * Create an %unordered_map consisting of copies of the elements in the │ │ │ │ -225 * list. This is linear in N (where N is @a __l.size()). │ │ │ │ -226 */ │ │ │ │ -_2_2_7 _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, │ │ │ │ -228 _s_i_z_e___t_y_p_e __n = 0, │ │ │ │ -229 const _h_a_s_h_e_r& __hf = _h_a_s_h_e_r(), │ │ │ │ -230 const _k_e_y___e_q_u_a_l& __eql = _k_e_y___e_q_u_a_l(), │ │ │ │ -231 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()) │ │ │ │ -232 : _M_h(__l, __n, __hf, __eql, __a) │ │ │ │ -233 { } │ │ │ │ -234 │ │ │ │ -235 _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) │ │ │ │ -236 : _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) │ │ │ │ -237 { } │ │ │ │ -238 │ │ │ │ -239 _u_n_o_r_d_e_r_e_d___m_a_p(size_type __n, const _h_a_s_h_e_r& __hf, │ │ │ │ -240 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -241 : unordered_map(__n, __hf, _k_e_y___e_q_u_a_l(), __a) │ │ │ │ -242 { } │ │ │ │ -243 │ │ │ │ -244 template │ │ │ │ -245 _u_n_o_r_d_e_r_e_d___m_a_p(_InputIterator __first, _InputIterator __last, │ │ │ │ -246 _s_i_z_e___t_y_p_e __n, │ │ │ │ -247 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -248 : _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) │ │ │ │ -249 { } │ │ │ │ -250 │ │ │ │ -251 template │ │ │ │ -252 _u_n_o_r_d_e_r_e_d___m_a_p(_InputIterator __first, _InputIterator __last, │ │ │ │ -253 _s_i_z_e___t_y_p_e __n, const _h_a_s_h_e_r& __hf, │ │ │ │ -254 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -255 : _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) │ │ │ │ -256 { } │ │ │ │ -257 │ │ │ │ -258 _u_n_o_r_d_e_r_e_d___m_a_p(initializer_list __l, │ │ │ │ -259 _s_i_z_e___t_y_p_e __n, │ │ │ │ -260 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -261 : _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) │ │ │ │ -262 { } │ │ │ │ -263 │ │ │ │ -264 _u_n_o_r_d_e_r_e_d___m_a_p(initializer_list __l, │ │ │ │ -265 _s_i_z_e___t_y_p_e __n, const _h_a_s_h_e_r& __hf, │ │ │ │ -266 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -267 : _u_n_o_r_d_e_r_e_d___m_a_p(__l, __n, __hf, _k_e_y___e_q_u_a_l(), __a) │ │ │ │ -268 { } │ │ │ │ -269 │ │ │ │ -270 /// Copy assignment operator. │ │ │ │ -271 _u_n_o_r_d_e_r_e_d___m_a_p& │ │ │ │ -_2_7_2 _o_p_e_r_a_t_o_r_=(const _u_n_o_r_d_e_r_e_d___m_a_p&) = default; │ │ │ │ +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 _b_a_s_i_c___f_i_l_e_b_u_f_<___C_h_a_r_T_,_ ___T_r_a_i_t_s_>_:_: │ │ │ │ +50_ ___M___a_l_l_o_c_a_t_e___i_n_t_e_r_n_a_l___b_u_f_f_e_r() │ │ │ │ +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 template │ │ │ │ +62 void │ │ │ │ +63 _b_a_s_i_c___f_i_l_e_b_u_f_<___C_h_a_r_T_,_ ___T_r_a_i_t_s_>_:_: │ │ │ │ +64_ ___M___d_e_s_t_r_o_y___i_n_t_e_r_n_a_l___b_u_f_f_e_r() 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 │ │ │ │ +_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() : __streambuf_type(), _M_lock(), _M_file(&_M_lock), │ │ │ │ +82 ___M___m_o_d_e(ios_base::openmode(0)), _M_state_beg(), _M_state_cur(), │ │ │ │ +83 _M_state_last(), ___M___b_u_f(0), ___M___b_u_f___s_i_z_e(_GLIBCXX_BUFSIZ), │ │ │ │ +84 _M_buf_allocated(false), ___M___r_e_a_d_i_n_g(false), _M_writing(false), ___M___p_b_a_c_k(), │ │ │ │ +85 ___M___p_b_a_c_k___c_u_r___s_a_v_e(0), ___M___p_b_a_c_k___e_n_d___s_a_v_e(0), ___M___p_b_a_c_k___i_n_i_t(false), │ │ │ │ +86 _M_codecvt(0), ___M___e_x_t___b_u_f(0), ___M___e_x_t___b_u_f___s_i_z_e(0), ___M___e_x_t___n_e_x_t(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&& __rhs) │ │ │ │ +97 : __streambuf_type(__rhs), │ │ │ │ +98 _M_lock(), _M_file(_s_t_d::_m_o_v_e(__rhs._M_file), &_M_lock), │ │ │ │ +99 _M_mode(_s_t_d::__exchange(__rhs._M_mode, _i_o_s___b_a_s_e::openmode(0))), │ │ │ │ +100 _M_state_beg(_s_t_d::_m_o_v_e(__rhs._M_state_beg)), │ │ │ │ +101 _M_state_cur(_s_t_d::_m_o_v_e(__rhs._M_state_cur)), │ │ │ │ +102 _M_state_last(_s_t_d::_m_o_v_e(__rhs._M_state_last)), │ │ │ │ +103 _M_buf(_s_t_d::__exchange(__rhs._M_buf, nullptr)), │ │ │ │ +104 _M_buf_size(_s_t_d::__exchange(__rhs._M_buf_size, 1)), │ │ │ │ +105 _M_buf_allocated(_s_t_d::__exchange(__rhs._M_buf_allocated, false)), │ │ │ │ +106 _M_reading(_s_t_d::__exchange(__rhs._M_reading, false)), │ │ │ │ +107 _M_writing(_s_t_d::__exchange(__rhs._M_writing, false)), │ │ │ │ +108 _M_pback(__rhs._M_pback), │ │ │ │ +109 _M_pback_cur_save(_s_t_d::__exchange(__rhs._M_pback_cur_save, nullptr)), │ │ │ │ +110 _M_pback_end_save(_s_t_d::__exchange(__rhs._M_pback_end_save, nullptr)), │ │ │ │ +111 _M_pback_init(_s_t_d::__exchange(__rhs._M_pback_init, false)), │ │ │ │ +112 _M_codecvt(__rhs._M_codecvt), │ │ │ │ +113 _M_ext_buf(_s_t_d::__exchange(__rhs._M_ext_buf, nullptr)), │ │ │ │ +114 _M_ext_buf_size(_s_t_d::__exchange(__rhs._M_ext_buf_size, 0)), │ │ │ │ +115 _M_ext_next(_s_t_d::__exchange(__rhs._M_ext_next, nullptr)), │ │ │ │ +116 _M_ext_end(_s_t_d::__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 │ │ │ │ +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 _b_a_s_i_c___f_i_l_e_b_u_f_<___C_h_a_r_T_,_ ___T_r_a_i_t_s_>_:_: │ │ │ │ +154_ _s_w_a_p(_b_a_s_i_c___f_i_l_e_b_u_f& __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 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, _i_o_s___b_a_s_e_:_:_o_p_e_n_m_o_d_e __mode) │ │ │ │ +181 { │ │ │ │ +182 __filebuf_type *__ret = 0; │ │ │ │ +183 if (!this->_i_s___o_p_e_n()) │ │ │ │ +184 { │ │ │ │ +185 _M_file.open(__s, __mode); │ │ │ │ +186 if (this->_i_s___o_p_e_n()) │ │ │ │ +187 { │ │ │ │ +188 _M_allocate_internal_buffer(); │ │ │ │ +189 ___M___m_o_d_e = __mode; │ │ │ │ +190 │ │ │ │ +191 // Setup initial buffer to 'uncommitted' mode. │ │ │ │ +192 ___M___r_e_a_d_i_n_g = false; │ │ │ │ +193 _M_writing = false; │ │ │ │ +194 ___M___s_e_t___b_u_f_f_e_r(-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 & _i_o_s___b_a_s_e_:_:_a_t_e) │ │ │ │ +201 && this->_s_e_e_k_o_f_f(0, _i_o_s___b_a_s_e_:_:_e_n_d, __mode) │ │ │ │ +202 == pos_type(off_type(-1))) │ │ │ │ +203 this->_c_l_o_s_e(); │ │ │ │ +204 else │ │ │ │ +205 __ret = this; │ │ │ │ +206 } │ │ │ │ +207 } │ │ │ │ +208 return __ret; │ │ │ │ +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, _i_o_s___b_a_s_e_:_:_o_p_e_n_m_o_d_e __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 // 27.8.1.3,4 │ │ │ │ +235 if ((__mode & _i_o_s___b_a_s_e_:_:_a_t_e) │ │ │ │ +236 && this->seekoff(0, _i_o_s___b_a_s_e_:_:_e_n_d, __mode) │ │ │ │ +237 == _p_o_s___t_y_p_e(_o_f_f___t_y_p_e(-1))) │ │ │ │ +238 this->close(); │ │ │ │ +239 else │ │ │ │ +_2_4_0 __ret = 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->_i_s___o_p_e_n()) │ │ │ │ +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 { │ │ │ │ +260 _b_a_s_i_c___f_i_l_e_b_u_f *__fb; │ │ │ │ +261 __close_sentry (_b_a_s_i_c___f_i_l_e_b_u_f *__fbi): __fb(__fbi) { } │ │ │ │ +262 ~__close_sentry () │ │ │ │ +263 { │ │ │ │ +264 __fb->___M___m_o_d_e = _i_o_s___b_a_s_e_:_:_o_p_e_n_m_o_d_e(0); │ │ │ │ +265 __fb->___M___p_b_a_c_k___i_n_i_t = false; │ │ │ │ +266 __fb->_M_destroy_internal_buffer(); │ │ │ │ +267 __fb->___M___r_e_a_d_i_n_g = false; │ │ │ │ +268 __fb->_M_writing = false; │ │ │ │ +269 __fb->___M___s_e_t___b_u_f_f_e_r(-1); │ │ │ │ +270 __fb->_M_state_last = __fb->_M_state_cur = __fb->_M_state_beg; │ │ │ │ +271 } │ │ │ │ +272 } __cs (this); │ │ │ │ 273 │ │ │ │ -274 /// Move assignment operator. │ │ │ │ -275 _u_n_o_r_d_e_r_e_d___m_a_p& │ │ │ │ -_2_7_6 _o_p_e_r_a_t_o_r_=(_u_n_o_r_d_e_r_e_d___m_a_p&&) = default; │ │ │ │ -277 │ │ │ │ -278 /** │ │ │ │ -279 * @brief %Unordered_map list assignment operator. │ │ │ │ -280 * @param __l An initializer_list. │ │ │ │ -281 * │ │ │ │ -282 * This function fills an %unordered_map with copies of the elements in │ │ │ │ -283 * the initializer list @a __l. │ │ │ │ -284 * │ │ │ │ -285 * Note that the assignment completely changes the %unordered_map and │ │ │ │ -286 * that the resulting %unordered_map's size is the same as the number │ │ │ │ -287 * of elements assigned. │ │ │ │ -288 */ │ │ │ │ -289 _u_n_o_r_d_e_r_e_d___m_a_p& │ │ │ │ -_2_9_0 _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) │ │ │ │ -291 { │ │ │ │ -292 _M_h = __l; │ │ │ │ -293 return *this; │ │ │ │ -294 } │ │ │ │ -295 │ │ │ │ -296 /// Returns the allocator object used by the %unordered_map. │ │ │ │ -297 _a_l_l_o_c_a_t_o_r___t_y_p_e │ │ │ │ -_2_9_8 _g_e_t___a_l_l_o_c_a_t_o_r() const noexcept │ │ │ │ -299 { return _M_h.get_allocator(); } │ │ │ │ -300 │ │ │ │ -301 // size and capacity: │ │ │ │ -302 │ │ │ │ -303 /// Returns true if the %unordered_map is empty. │ │ │ │ -304 _GLIBCXX_NODISCARD bool │ │ │ │ -_3_0_5 _e_m_p_t_y() const noexcept │ │ │ │ -306 { return _M_h.empty(); } │ │ │ │ +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 if (__testfail) │ │ │ │ +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 __ret = -1; │ │ │ │ +301 const bool __testin = ___M___m_o_d_e & _i_o_s___b_a_s_e_:_:_i_n; │ │ │ │ +302 if (__testin && this->_i_s___o_p_e_n()) │ │ │ │ +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->_e_g_p_t_r() - this->_g_p_t_r(); │ │ │ │ 307 │ │ │ │ -308 /// Returns the size of the %unordered_map. │ │ │ │ -309 _s_i_z_e___t_y_p_e │ │ │ │ -_3_1_0 _s_i_z_e() const noexcept │ │ │ │ -311 { return _M_h.size(); } │ │ │ │ -312 │ │ │ │ -313 /// Returns the maximum size of the %unordered_map. │ │ │ │ -314 _s_i_z_e___t_y_p_e │ │ │ │ -_3_1_5 _m_a_x___s_i_z_e() const noexcept │ │ │ │ -316 { return _M_h.max_size(); } │ │ │ │ -317 │ │ │ │ -318 // iterators. │ │ │ │ -319 │ │ │ │ -320 /** │ │ │ │ -321 * Returns a read/write iterator that points to the first element in the │ │ │ │ -322 * %unordered_map. │ │ │ │ -323 */ │ │ │ │ -324 _i_t_e_r_a_t_o_r │ │ │ │ -_3_2_5 _b_e_g_i_n() noexcept │ │ │ │ -326 { return _M_h.begin(); } │ │ │ │ -327 │ │ │ │ -328 ///@{ │ │ │ │ -329 /** │ │ │ │ -330 * Returns a read-only (constant) iterator that points to the first │ │ │ │ -331 * element in the %unordered_map. │ │ │ │ -332 */ │ │ │ │ -333 const_iterator │ │ │ │ -_3_3_4 _b_e_g_i_n() const noexcept │ │ │ │ -335 { return _M_h.begin(); } │ │ │ │ -336 │ │ │ │ -337 const_iterator │ │ │ │ -_3_3_8 _c_b_e_g_i_n() const noexcept │ │ │ │ -339 { return _M_h.begin(); } │ │ │ │ -340 ///@} │ │ │ │ +308#if _GLIBCXX_HAVE_DOS_BASED_FILESYSTEM │ │ │ │ +309 // About this workaround, see libstdc++/20806. │ │ │ │ +310 const bool __testbinary = ___M___m_o_d_e & _i_o_s___b_a_s_e_:_:_b_i_n_a_r_y; │ │ │ │ +311 if (__check_facet(_M_codecvt).encoding() >= 0 │ │ │ │ +312 && __testbinary) │ │ │ │ +313#else │ │ │ │ +314 if (__check_facet(_M_codecvt).encoding() >= 0) │ │ │ │ +_3_1_5#endif │ │ │ │ +316 __ret += _M_file.showmanyc() / _M_codecvt->max_length(); │ │ │ │ +317 } │ │ │ │ +318 return __ret; │ │ │ │ +319 } │ │ │ │ +320 │ │ │ │ +321 template │ │ │ │ +322 typename _b_a_s_i_c___f_i_l_e_b_u_f_<___C_h_a_r_T_,_ ___T_r_a_i_t_s_>_:_:_i_n_t___t_y_p_e │ │ │ │ +_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 __ret = traits_type::eof(); │ │ │ │ +327 const bool __testin = ___M___m_o_d_e & _i_o_s___b_a_s_e_:_:_i_n; │ │ │ │ +328 if (__testin) │ │ │ │ +329 { │ │ │ │ +330 if (_M_writing) │ │ │ │ +331 { │ │ │ │ +332 if (_o_v_e_r_f_l_o_w() == traits_type::eof()) │ │ │ │ +333 return __ret; │ │ │ │ +334 ___M___s_e_t___b_u_f_f_e_r(-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___d_e_s_t_r_o_y___p_b_a_c_k(); │ │ │ │ 341 │ │ │ │ -342 /** │ │ │ │ -343 * Returns a read/write iterator that points one past the last element in │ │ │ │ -344 * the %unordered_map. │ │ │ │ -345 */ │ │ │ │ -346 _i_t_e_r_a_t_o_r │ │ │ │ -_3_4_7 _e_n_d() noexcept │ │ │ │ -348 { return _M_h.end(); } │ │ │ │ -349 │ │ │ │ -350 ///@{ │ │ │ │ -351 /** │ │ │ │ -352 * Returns a read-only (constant) iterator that points one past the last │ │ │ │ -353 * element in the %unordered_map. │ │ │ │ -354 */ │ │ │ │ -355 const_iterator │ │ │ │ -_3_5_6 _e_n_d() const noexcept │ │ │ │ -357 { return _M_h.end(); } │ │ │ │ -358 │ │ │ │ -359 const_iterator │ │ │ │ -_3_6_0 _c_e_n_d() const noexcept │ │ │ │ -361 { return _M_h.end(); } │ │ │ │ -362 ///@} │ │ │ │ -363 │ │ │ │ -364 // modifiers. │ │ │ │ -365 │ │ │ │ -366 /** │ │ │ │ -367 * @brief Attempts to build and insert a std::pair into the │ │ │ │ -368 * %unordered_map. │ │ │ │ -369 * │ │ │ │ -370 * @param __args Arguments used to generate a new pair instance (see │ │ │ │ -371 * std::piecewise_contruct for passing arguments to each │ │ │ │ -372 * part of the pair constructor). │ │ │ │ -373 * │ │ │ │ -374 * @return A pair, of which the first element is an iterator that points │ │ │ │ -375 * to the possibly inserted pair, and the second is a bool that │ │ │ │ -376 * is true if the pair was actually inserted. │ │ │ │ -377 * │ │ │ │ -378 * This function attempts to build and insert a (key, value) %pair into │ │ │ │ -379 * the %unordered_map. │ │ │ │ -380 * An %unordered_map relies on unique keys and thus a %pair is only │ │ │ │ -381 * inserted if its first element (the key) is not already present in the │ │ │ │ -382 * %unordered_map. │ │ │ │ -383 * │ │ │ │ -384 * Insertion requires amortized constant time. │ │ │ │ -385 */ │ │ │ │ -386 template │ │ │ │ -387 _s_t_d_:_:_p_a_i_r_<_i_t_e_r_a_t_o_r_,_ _b_o_o_l_> │ │ │ │ -_3_8_8 _e_m_p_l_a_c_e(_Args&&... __args) │ │ │ │ -389 { return _M_h.emplace(_s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(__args)...); } │ │ │ │ -390 │ │ │ │ -391 /** │ │ │ │ -392 * @brief Attempts to build and insert a std::pair into the │ │ │ │ -393 * %unordered_map. │ │ │ │ -394 * │ │ │ │ -395 * @param __pos An iterator that serves as a hint as to where the pair │ │ │ │ -396 * should be inserted. │ │ │ │ -397 * @param __args Arguments used to generate a new pair instance (see │ │ │ │ -398 * std::piecewise_contruct for passing arguments to each │ │ │ │ -399 * part of the pair constructor). │ │ │ │ -400 * @return An iterator that points to the element with key of the │ │ │ │ -401 * std::pair built from @a __args (may or may not be that │ │ │ │ -402 * std::pair). │ │ │ │ -403 * │ │ │ │ -404 * This function is not concerned about whether the insertion took place, │ │ │ │ -405 * and thus does not return a boolean like the single-argument emplace() │ │ │ │ -406 * does. │ │ │ │ -407 * Note that the first parameter is only a hint and can potentially │ │ │ │ -408 * improve the performance of the insertion process. A bad hint would │ │ │ │ -409 * cause no gains in efficiency. │ │ │ │ -410 * │ │ │ │ -411 * See │ │ │ │ -412 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/ │ │ │ │ -associative.html#containers.associative.insert_hints │ │ │ │ -413 * for more on @a hinting. │ │ │ │ -414 * │ │ │ │ -415 * Insertion requires amortized constant time. │ │ │ │ -416 */ │ │ │ │ -417 template │ │ │ │ -418 _i_t_e_r_a_t_o_r │ │ │ │ -_4_1_9 _e_m_p_l_a_c_e___h_i_n_t(_c_o_n_s_t___i_t_e_r_a_t_o_r __pos, _Args&&... __args) │ │ │ │ -420 { return _M_h.emplace_hint(__pos, _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(__args)...); } │ │ │ │ -421 │ │ │ │ -422#if __cplusplus > 201402L │ │ │ │ -423 /// Extract a node. │ │ │ │ -424 node_type │ │ │ │ -_4_2_5 _e_x_t_r_a_c_t(_c_o_n_s_t___i_t_e_r_a_t_o_r __pos) │ │ │ │ -426 { │ │ │ │ -427 __glibcxx_assert(__pos != _e_n_d()); │ │ │ │ -428 return _M_h.extract(__pos); │ │ │ │ -429 } │ │ │ │ -430 │ │ │ │ -431 /// Extract a node. │ │ │ │ -432 node_type │ │ │ │ -_4_3_3 _e_x_t_r_a_c_t(const _k_e_y___t_y_p_e& __key) │ │ │ │ -434 { return _M_h.extract(__key); } │ │ │ │ -435 │ │ │ │ -436 /// Re-insert an extracted node. │ │ │ │ -437 insert_return_type │ │ │ │ -_4_3_8 _i_n_s_e_r_t(node_type&& __nh) │ │ │ │ -439 { return _M_h._M_reinsert_node(_s_t_d_:_:_m_o_v_e(__nh)); } │ │ │ │ -440 │ │ │ │ -441 /// Re-insert an extracted node. │ │ │ │ -442 _i_t_e_r_a_t_o_r │ │ │ │ -_4_4_3 _i_n_s_e_r_t(_c_o_n_s_t___i_t_e_r_a_t_o_r, node_type&& __nh) │ │ │ │ -444 { return _M_h._M_reinsert_node(_s_t_d_:_:_m_o_v_e(__nh)).position; } │ │ │ │ -445 │ │ │ │ -446#define __cpp_lib_unordered_map_try_emplace 201411 │ │ │ │ -447 /** │ │ │ │ -448 * @brief Attempts to build and insert a std::pair into the │ │ │ │ -449 * %unordered_map. │ │ │ │ -450 * │ │ │ │ -451 * @param __k Key to use for finding a possibly existing pair in │ │ │ │ -452 * the unordered_map. │ │ │ │ -453 * @param __args Arguments used to generate the .second for a │ │ │ │ -454 * new pair instance. │ │ │ │ -455 * │ │ │ │ -456 * @return A pair, of which the first element is an iterator that points │ │ │ │ -457 * to the possibly inserted pair, and the second is a bool that │ │ │ │ -458 * is true if the pair was actually inserted. │ │ │ │ -459 * │ │ │ │ -460 * This function attempts to build and insert a (key, value) %pair into │ │ │ │ -461 * the %unordered_map. │ │ │ │ -462 * An %unordered_map relies on unique keys and thus a %pair is only │ │ │ │ -463 * inserted if its first element (the key) is not already present in the │ │ │ │ -464 * %unordered_map. │ │ │ │ -465 * If a %pair is not inserted, this function has no effect. │ │ │ │ -466 * │ │ │ │ -467 * Insertion requires amortized constant time. │ │ │ │ -468 */ │ │ │ │ -469 template │ │ │ │ -470 _p_a_i_r_<_i_t_e_r_a_t_o_r_,_ _b_o_o_l_> │ │ │ │ -_4_7_1 _t_r_y___e_m_p_l_a_c_e(const _k_e_y___t_y_p_e& __k, _Args&&... __args) │ │ │ │ -472 { │ │ │ │ -473 return _M_h.try_emplace(_c_e_n_d(), __k, _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(__args)...); │ │ │ │ -474 } │ │ │ │ -475 │ │ │ │ -476 // move-capable overload │ │ │ │ -477 template │ │ │ │ -478 _p_a_i_r_<_i_t_e_r_a_t_o_r_,_ _b_o_o_l_> │ │ │ │ -479 _t_r_y___e_m_p_l_a_c_e(_k_e_y___t_y_p_e&& __k, _Args&&... __args) │ │ │ │ -480 { │ │ │ │ -481 return _M_h.try_emplace(_c_e_n_d(), _s_t_d_:_:_m_o_v_e(__k), │ │ │ │ -482 _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(__args)...); │ │ │ │ -483 } │ │ │ │ -484 │ │ │ │ -485 /** │ │ │ │ -486 * @brief Attempts to build and insert a std::pair into the │ │ │ │ -487 * %unordered_map. │ │ │ │ -488 * │ │ │ │ -489 * @param __hint An iterator that serves as a hint as to where the pair │ │ │ │ -490 * should be inserted. │ │ │ │ -491 * @param __k Key to use for finding a possibly existing pair in │ │ │ │ -492 * the unordered_map. │ │ │ │ -493 * @param __args Arguments used to generate the .second for a │ │ │ │ -494 * new pair instance. │ │ │ │ -495 * @return An iterator that points to the element with key of the │ │ │ │ -496 * std::pair built from @a __args (may or may not be that │ │ │ │ -497 * std::pair). │ │ │ │ -498 * │ │ │ │ -499 * This function is not concerned about whether the insertion took place, │ │ │ │ -500 * and thus does not return a boolean like the single-argument emplace() │ │ │ │ -501 * does. However, if insertion did not take place, │ │ │ │ -502 * this function has no effect. │ │ │ │ -503 * Note that the first parameter is only a hint and can potentially │ │ │ │ -504 * improve the performance of the insertion process. A bad hint would │ │ │ │ -505 * cause no gains in efficiency. │ │ │ │ -506 * │ │ │ │ -507 * See │ │ │ │ -508 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/ │ │ │ │ -associative.html#containers.associative.insert_hints │ │ │ │ -509 * for more on @a hinting. │ │ │ │ -510 * │ │ │ │ -511 * Insertion requires amortized constant time. │ │ │ │ -512 */ │ │ │ │ -513 template │ │ │ │ -514 iterator │ │ │ │ -_5_1_5 _t_r_y___e_m_p_l_a_c_e(_c_o_n_s_t___i_t_e_r_a_t_o_r __hint, const _k_e_y___t_y_p_e& __k, │ │ │ │ -516 _Args&&... __args) │ │ │ │ -517 { │ │ │ │ -518 return _M_h.try_emplace(__hint, __k, │ │ │ │ -519 _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(__args)...).first; │ │ │ │ +342 if (this->_g_p_t_r() < this->_e_g_p_t_r()) │ │ │ │ +343 return traits_type::to_int_type(*this->_g_p_t_r()); │ │ │ │ +344 │ │ │ │ +345 // Get and convert input sequence. │ │ │ │ +346 const size_t __buflen = ___M___b_u_f___s_i_z_e > 1 ? ___M___b_u_f___s_i_z_e - 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 _s_t_r_e_a_m_s_i_z_e __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(this->_e_b_a_c_k()), │ │ │ │ +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 _s_t_r_e_a_m_s_i_z_e __blen; // Minimum buffer size. │ │ │ │ +_3_6_6 _s_t_r_e_a_m_s_i_z_e __rlen; // Number of chars to read. │ │ │ │ +367 if (__enc > 0) │ │ │ │ +368 __blen = __rlen = __buflen * __enc; │ │ │ │ +369 else │ │ │ │ +370 { │ │ │ │ +371 __blen = __buflen + _M_codecvt->max_length() - 1; │ │ │ │ +372 __rlen = __buflen; │ │ │ │ +373 } │ │ │ │ +374 const _s_t_r_e_a_m_s_i_z_e __remainder = _M_ext_end - _M_ext_next; │ │ │ │ +375 __rlen = __rlen > __remainder ? __rlen - __remainder : 0; │ │ │ │ +376 │ │ │ │ +_3_7_7 // An imbue in 'read' mode implies first converting the external │ │ │ │ +378 // chars already present. │ │ │ │ +379 if (___M___r_e_a_d_i_n_g && this->_e_g_p_t_r() == this->_e_b_a_c_k() && __remainder) │ │ │ │ +380 __rlen = 0; │ │ │ │ +381 │ │ │ │ +382 // Allocate buffer if necessary and move unconverted │ │ │ │ +383 // bytes to front. │ │ │ │ +384 if (___M___e_x_t___b_u_f___s_i_z_e < __blen) │ │ │ │ +_3_8_5 { │ │ │ │ +386 char* __buf = new char[__blen]; │ │ │ │ +387 if (__remainder) │ │ │ │ +_3_8_8 __builtin_memcpy(__buf, ___M___e_x_t___n_e_x_t, __remainder); │ │ │ │ +389 │ │ │ │ +390 delete [] ___M___e_x_t___b_u_f; │ │ │ │ +391 ___M___e_x_t___b_u_f = __buf; │ │ │ │ +392 ___M___e_x_t___b_u_f___s_i_z_e = __blen; │ │ │ │ +393 } │ │ │ │ +394 else if (__remainder) │ │ │ │ +395 __builtin_memmove(_M_ext_buf, _M_ext_next, __remainder); │ │ │ │ +396 │ │ │ │ +397 _M_ext_next = _M_ext_buf; │ │ │ │ +_3_9_8 _M_ext_end = ___M___e_x_t___b_u_f + __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___e_x_t___b_u_f + __rlen > ___M___e_x_t___b_u_f___s_i_z_e) │ │ │ │ +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 __elen = _M_file.xsgetn(_M_ext_end, __rlen); │ │ │ │ +415 if (__elen == 0) │ │ │ │ +416 __got_eof = true; │ │ │ │ +417 else if (__elen == -1) │ │ │ │ +_4_1_8 break; │ │ │ │ +419 _M_ext_end += __elen; │ │ │ │ +420 } │ │ │ │ +_4_2_1 │ │ │ │ +422 char_type* __iend = this->_e_b_a_c_k(); │ │ │ │ +423 if (___M___e_x_t___n_e_x_t < _M_ext_end) │ │ │ │ +424 __r = _M_codecvt->in(_M_state_cur, ___M___e_x_t___n_e_x_t, │ │ │ │ +_4_2_5 _M_ext_end, ___M___e_x_t___n_e_x_t, │ │ │ │ +426 this->_e_b_a_c_k(), │ │ │ │ +427 this->_e_b_a_c_k() + __buflen, __iend); │ │ │ │ +428 if (__r == codecvt_base::noconv) │ │ │ │ +429 { │ │ │ │ +430 size_t __avail = _M_ext_end - ___M___e_x_t___b_u_f; │ │ │ │ +431 __ilen = _s_t_d_:_:_m_i_n(__avail, __buflen); │ │ │ │ +432 traits_type::copy(this->_e_b_a_c_k(), │ │ │ │ +433 reinterpret_cast │ │ │ │ +434 (___M___e_x_t___b_u_f), __ilen); │ │ │ │ +435 ___M___e_x_t___n_e_x_t = ___M___e_x_t___b_u_f + __ilen; │ │ │ │ +_4_3_6 } │ │ │ │ +437 else │ │ │ │ +438 __ilen = __iend - 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 __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 │ │ │ │ +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 __ret = traits_type::eof(); │ │ │ │ +486 const bool __testin = ___M___m_o_d_e & _i_o_s___b_a_s_e_:_:_i_n; │ │ │ │ +487 if (__testin) │ │ │ │ +488 { │ │ │ │ +489 if (_M_writing) │ │ │ │ +490 { │ │ │ │ +491 if (_o_v_e_r_f_l_o_w() == traits_type::eof()) │ │ │ │ +492 return __ret; │ │ │ │ +493 ___M___s_e_t___b_u_f_f_e_r(-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___p_b_a_c_k___i_n_i_t; │ │ │ │ +499 const bool __testeof = traits_type::eq_int_type(__i, __ret); │ │ │ │ +500 int_type __tmp; │ │ │ │ +501 if (this->_e_b_a_c_k() < this->_g_p_t_r()) │ │ │ │ +502 { │ │ │ │ +503 this->_g_b_u_m_p(-1); │ │ │ │ +504 __tmp = traits_type::to_int_type(*this->_g_p_t_r()); │ │ │ │ +505 } │ │ │ │ +506 else if (this->_s_e_e_k_o_f_f(-1, _i_o_s___b_a_s_e_:_:_c_u_r) != pos_type(off_type(-1))) │ │ │ │ +507 { │ │ │ │ +508 __tmp = this->_u_n_d_e_r_f_l_o_w(); │ │ │ │ +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 // move-capable overload │ │ │ │ -523 template │ │ │ │ -524 _i_t_e_r_a_t_o_r │ │ │ │ -525 _t_r_y___e_m_p_l_a_c_e(const_iterator __hint, _k_e_y___t_y_p_e&& __k, _Args&&... __args) │ │ │ │ -526 { │ │ │ │ -527 return _M_h.try_emplace(__hint, _s_t_d_:_:_m_o_v_e(__k), │ │ │ │ -528 _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(__args)...).first; │ │ │ │ -529 } │ │ │ │ -530#endif // C++17 │ │ │ │ -531 │ │ │ │ -532 ///@{ │ │ │ │ -533 /** │ │ │ │ -534 * @brief Attempts to insert a std::pair into the %unordered_map. │ │ │ │ -535 │ │ │ │ -536 * @param __x Pair to be inserted (see std::make_pair for easy │ │ │ │ -537 * creation of pairs). │ │ │ │ -538 * │ │ │ │ -539 * @return A pair, of which the first element is an iterator that │ │ │ │ -540 * points to the possibly inserted pair, and the second is │ │ │ │ -541 * a bool that is true if the pair was actually inserted. │ │ │ │ -542 * │ │ │ │ -543 * This function attempts to insert a (key, value) %pair into the │ │ │ │ -544 * %unordered_map. An %unordered_map relies on unique keys and thus a │ │ │ │ -545 * %pair is only inserted if its first element (the key) is not already │ │ │ │ -546 * present in the %unordered_map. │ │ │ │ -547 * │ │ │ │ -548 * Insertion requires amortized constant time. │ │ │ │ -549 */ │ │ │ │ -550 _s_t_d_:_:_p_a_i_r_<_i_t_e_r_a_t_o_r_,_ _b_o_o_l_> │ │ │ │ -_5_5_1 _i_n_s_e_r_t(const _v_a_l_u_e___t_y_p_e& __x) │ │ │ │ -552 { return _M_h.insert(__x); } │ │ │ │ -553 │ │ │ │ -554 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ -555 // 2354. Unnecessary copying when inserting into maps with braced-init │ │ │ │ -556 _s_t_d_:_:_p_a_i_r_<_i_t_e_r_a_t_o_r_,_ _b_o_o_l_> │ │ │ │ -_5_5_7 _i_n_s_e_r_t(_v_a_l_u_e___t_y_p_e&& __x) │ │ │ │ -558 { return _M_h.insert(_s_t_d_:_:_m_o_v_e(__x)); } │ │ │ │ -559 │ │ │ │ -560 template │ │ │ │ -561 __enable_if_t::value, │ │ │ │ -562 _p_a_i_r_<_i_t_e_r_a_t_o_r_,_ _b_o_o_l_>> │ │ │ │ -_5_6_3 _i_n_s_e_r_t(_Pair&& __x) │ │ │ │ -564 { return _M_h.emplace(_s_t_d_:_:_f_o_r_w_a_r_d_<___P_a_i_r_>(__x)); } │ │ │ │ -565 ///@} │ │ │ │ +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___c_r_e_a_t_e___p_b_a_c_k(); │ │ │ │ +531 ___M___r_e_a_d_i_n_g = true; │ │ │ │ +532 *this->_g_p_t_r() = traits_type::to_char_type(__i); │ │ │ │ +533 __ret = __i; │ │ │ │ +534 } │ │ │ │ +535 } │ │ │ │ +536 return __ret; │ │ │ │ +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 __ret = traits_type::eof(); │ │ │ │ +545 const bool __testeof = traits_type::eq_int_type(__c, __ret); │ │ │ │ +546 const bool __testout = (___M___m_o_d_e & _i_o_s___b_a_s_e_:_:_o_u_t │ │ │ │ +547 || ___M___m_o_d_e & _i_o_s___b_a_s_e_:_:_a_p_p); │ │ │ │ +548 if (__testout) │ │ │ │ +549 { │ │ │ │ +550 if (___M___r_e_a_d_i_n_g) │ │ │ │ +551 { │ │ │ │ +552 ___M___d_e_s_t_r_o_y___p_b_a_c_k(); │ │ │ │ +553 const int __gptr_off = _M_get_ext_pos(_M_state_last); │ │ │ │ +554 if (_M_seek(__gptr_off, _i_o_s___b_a_s_e_:_:_c_u_r, _M_state_last) │ │ │ │ +555 == pos_type(off_type(-1))) │ │ │ │ +556 return __ret; │ │ │ │ +557 } │ │ │ │ +558 if (this->_p_b_a_s_e() < this->_p_p_t_r()) │ │ │ │ +559 { │ │ │ │ +560 // If appropriate, append the overflow char. │ │ │ │ +561 if (!__testeof) │ │ │ │ +562 { │ │ │ │ +563 *this->_p_p_t_r() = traits_type::to_char_type(__c); │ │ │ │ +564 this->_p_b_u_m_p(1); │ │ │ │ +565 } │ │ │ │ 566 │ │ │ │ -567 ///@{ │ │ │ │ -568 /** │ │ │ │ -569 * @brief Attempts to insert a std::pair into the %unordered_map. │ │ │ │ -570 * @param __hint An iterator that serves as a hint as to where the │ │ │ │ -571 * pair should be inserted. │ │ │ │ -572 * @param __x Pair to be inserted (see std::make_pair for easy creation │ │ │ │ -573 * of pairs). │ │ │ │ -574 * @return An iterator that points to the element with key of │ │ │ │ -575 * @a __x (may or may not be the %pair passed in). │ │ │ │ -576 * │ │ │ │ -577 * This function is not concerned about whether the insertion took place, │ │ │ │ -578 * and thus does not return a boolean like the single-argument insert() │ │ │ │ -579 * does. Note that the first parameter is only a hint and can │ │ │ │ -580 * potentially improve the performance of the insertion process. A bad │ │ │ │ -581 * hint would cause no gains in efficiency. │ │ │ │ -582 * │ │ │ │ -583 * See │ │ │ │ -584 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/ │ │ │ │ -associative.html#containers.associative.insert_hints │ │ │ │ -585 * for more on @a hinting. │ │ │ │ -586 * │ │ │ │ -587 * Insertion requires amortized constant time. │ │ │ │ -588 */ │ │ │ │ -589 _i_t_e_r_a_t_o_r │ │ │ │ -_5_9_0 _i_n_s_e_r_t(_c_o_n_s_t___i_t_e_r_a_t_o_r __hint, const _v_a_l_u_e___t_y_p_e& __x) │ │ │ │ -591 { return _M_h.insert(__hint, __x); } │ │ │ │ -592 │ │ │ │ -593 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ -594 // 2354. Unnecessary copying when inserting into maps with braced-init │ │ │ │ -595 _i_t_e_r_a_t_o_r │ │ │ │ -_5_9_6 _i_n_s_e_r_t(_c_o_n_s_t___i_t_e_r_a_t_o_r __hint, _v_a_l_u_e___t_y_p_e&& __x) │ │ │ │ -597 { return _M_h.insert(__hint, _s_t_d_:_:_m_o_v_e(__x)); } │ │ │ │ -598 │ │ │ │ -599 template │ │ │ │ -600 __enable_if_t::value, _i_t_e_r_a_t_o_r> │ │ │ │ -_6_0_1 _i_n_s_e_r_t(_c_o_n_s_t___i_t_e_r_a_t_o_r __hint, _Pair&& __x) │ │ │ │ -602 { return _M_h.emplace_hint(__hint, _s_t_d_:_:_f_o_r_w_a_r_d_<___P_a_i_r_>(__x)); } │ │ │ │ -603 ///@} │ │ │ │ -604 │ │ │ │ -605 /** │ │ │ │ -606 * @brief A template function that attempts to insert a range of │ │ │ │ -607 * elements. │ │ │ │ -608 * @param __first Iterator pointing to the start of the range to be │ │ │ │ -609 * inserted. │ │ │ │ -610 * @param __last Iterator pointing to the end of the range. │ │ │ │ -611 * │ │ │ │ -612 * Complexity similar to that of the range constructor. │ │ │ │ -613 */ │ │ │ │ -614 template │ │ │ │ -615 void │ │ │ │ -_6_1_6 _i_n_s_e_r_t(_InputIterator __first, _InputIterator __last) │ │ │ │ -617 { _M_h.insert(__first, __last); } │ │ │ │ -618 │ │ │ │ -619 /** │ │ │ │ -620 * @brief Attempts to insert a list of elements into the %unordered_map. │ │ │ │ -621 * @param __l A std::initializer_list of elements │ │ │ │ -622 * to be inserted. │ │ │ │ -623 * │ │ │ │ -624 * Complexity similar to that of the range constructor. │ │ │ │ -625 */ │ │ │ │ -626 void │ │ │ │ -_6_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) │ │ │ │ -628 { _M_h.insert(__l); } │ │ │ │ +567 // Convert pending sequence to external representation, │ │ │ │ +568 // and output. │ │ │ │ +569 if (_M_convert_to_external(this->_p_b_a_s_e(), │ │ │ │ +570 this->_p_p_t_r() - this->_p_b_a_s_e())) │ │ │ │ +571 { │ │ │ │ +572 ___M___s_e_t___b_u_f_f_e_r(0); │ │ │ │ +573 __ret = traits_type::not_eof(__c); │ │ │ │ +574 } │ │ │ │ +575 } │ │ │ │ +576 else if (___M___b_u_f___s_i_z_e > 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___s_e_t___b_u_f_f_e_r(0); │ │ │ │ +582 _M_writing = true; │ │ │ │ +583 if (!__testeof) │ │ │ │ +584 { │ │ │ │ +585 *this->_p_p_t_r() = traits_type::to_char_type(__c); │ │ │ │ +586 this->_p_b_u_m_p(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 │ │ │ │ +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* __ibuf, _s_t_r_e_a_m_s_i_z_e __ilen) │ │ │ │ +608 { │ │ │ │ +609 // Sizes of external and pending output. │ │ │ │ +610 _s_t_r_e_a_m_s_i_z_e __elen; │ │ │ │ +611 _s_t_r_e_a_m_s_i_z_e __plen; │ │ │ │ +612 if (__check_facet(_M_codecvt).always_noconv()) │ │ │ │ +613 { │ │ │ │ +614 __elen = _M_file.xsputn(reinterpret_cast(__ibuf), __ilen); │ │ │ │ +615 __plen = __ilen; │ │ │ │ +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 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 │ │ │ │ -631#if __cplusplus > 201402L │ │ │ │ -632 /** │ │ │ │ -633 * @brief Attempts to insert a std::pair into the %unordered_map. │ │ │ │ -634 * @param __k Key to use for finding a possibly existing pair in │ │ │ │ -635 * the map. │ │ │ │ -636 * @param __obj Argument used to generate the .second for a pair │ │ │ │ -637 * instance. │ │ │ │ -638 * │ │ │ │ -639 * @return A pair, of which the first element is an iterator that │ │ │ │ -640 * points to the possibly inserted pair, and the second is │ │ │ │ -641 * a bool that is true if the pair was actually inserted. │ │ │ │ -642 * │ │ │ │ -643 * This function attempts to insert a (key, value) %pair into the │ │ │ │ -644 * %unordered_map. An %unordered_map relies on unique keys and thus a │ │ │ │ -645 * %pair is only inserted if its first element (the key) is not already │ │ │ │ -646 * present in the %unordered_map. │ │ │ │ -647 * If the %pair was already in the %unordered_map, the .second of │ │ │ │ -648 * the %pair is assigned from __obj. │ │ │ │ -649 * │ │ │ │ -650 * Insertion requires amortized constant time. │ │ │ │ -651 */ │ │ │ │ -652 template │ │ │ │ -653 _p_a_i_r_<_i_t_e_r_a_t_o_r_,_ _b_o_o_l_> │ │ │ │ -_6_5_4 _i_n_s_e_r_t___o_r___a_s_s_i_g_n(const _k_e_y___t_y_p_e& __k, _Obj&& __obj) │ │ │ │ -655 { │ │ │ │ -656 auto __ret = _M_h.try_emplace(_c_e_n_d(), __k, │ │ │ │ -657 _s_t_d_:_:_f_o_r_w_a_r_d_<___O_b_j_>(__obj)); │ │ │ │ -658 if (!__ret.second) │ │ │ │ -659 __ret.first->second = _s_t_d_:_:_f_o_r_w_a_r_d_<___O_b_j_>(__obj); │ │ │ │ -660 return __ret; │ │ │ │ -661 } │ │ │ │ -662 │ │ │ │ -663 // move-capable overload │ │ │ │ -664 template │ │ │ │ -665 _p_a_i_r_<_i_t_e_r_a_t_o_r_,_ _b_o_o_l_> │ │ │ │ -666 _i_n_s_e_r_t___o_r___a_s_s_i_g_n(_k_e_y___t_y_p_e&& __k, _Obj&& __obj) │ │ │ │ -667 { │ │ │ │ -668 auto __ret = _M_h.try_emplace(_c_e_n_d(), _s_t_d_:_:_m_o_v_e(__k), │ │ │ │ -669 _s_t_d_:_:_f_o_r_w_a_r_d_<___O_b_j_>(__obj)); │ │ │ │ -670 if (!__ret.second) │ │ │ │ -671 __ret._f_i_r_s_t->second = _s_t_d_:_:_f_o_r_w_a_r_d_<___O_b_j_>(__obj); │ │ │ │ -672 return __ret; │ │ │ │ -673 } │ │ │ │ -674 │ │ │ │ -675 /** │ │ │ │ -676 * @brief Attempts to insert a std::pair into the %unordered_map. │ │ │ │ -677 * @param __hint An iterator that serves as a hint as to where the │ │ │ │ -678 * pair should be inserted. │ │ │ │ -679 * @param __k Key to use for finding a possibly existing pair in │ │ │ │ -680 * the unordered_map. │ │ │ │ -681 * @param __obj Argument used to generate the .second for a pair │ │ │ │ -682 * instance. │ │ │ │ -683 * @return An iterator that points to the element with key of │ │ │ │ -684 * @a __x (may or may not be the %pair passed in). │ │ │ │ -685 * │ │ │ │ -686 * This function is not concerned about whether the insertion took place, │ │ │ │ -687 * and thus does not return a boolean like the single-argument insert() │ │ │ │ -688 * does. │ │ │ │ -689 * If the %pair was already in the %unordered map, the .second of │ │ │ │ -690 * the %pair is assigned from __obj. │ │ │ │ -691 * Note that the first parameter is only a hint and can │ │ │ │ -692 * potentially improve the performance of the insertion process. A bad │ │ │ │ -693 * hint would cause no gains in efficiency. │ │ │ │ -694 * │ │ │ │ -695 * See │ │ │ │ -696 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/ │ │ │ │ -associative.html#containers.associative.insert_hints │ │ │ │ -697 * for more on @a hinting. │ │ │ │ -698 * │ │ │ │ -699 * Insertion requires amortized constant time. │ │ │ │ -700 */ │ │ │ │ -701 template │ │ │ │ -702 iterator │ │ │ │ -_7_0_3 _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 __hint, const _k_e_y___t_y_p_e& __k, │ │ │ │ -704 _Obj&& __obj) │ │ │ │ +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 __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 __ret = 0; │ │ │ │ +674 if (___M___p_b_a_c_k___i_n_i_t) │ │ │ │ +675 { │ │ │ │ +676 if (__n > 0 && this->_g_p_t_r() == this->_e_b_a_c_k()) │ │ │ │ +677 { │ │ │ │ +678 *__s++ = *this->_g_p_t_r(); // emulate non-underflowing sbumpc │ │ │ │ +679 this->_g_b_u_m_p(1); │ │ │ │ +680 __ret = 1; │ │ │ │ +681 --__n; │ │ │ │ +682 } │ │ │ │ +683 ___M___d_e_s_t_r_o_y___p_b_a_c_k(); │ │ │ │ +684 } │ │ │ │ +685 else if (_M_writing) │ │ │ │ +686 { │ │ │ │ +687 if (_o_v_e_r_f_l_o_w() == traits_type::eof()) │ │ │ │ +688 return __ret; │ │ │ │ +689 ___M___s_e_t___b_u_f_f_e_r(-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___m_o_d_e & _i_o_s___b_a_s_e_:_:_i_n; │ │ │ │ +697 const _s_t_r_e_a_m_s_i_z_e __buflen = ___M___b_u_f___s_i_z_e > 1 ? ___M___b_u_f___s_i_z_e - 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 _s_t_r_e_a_m_s_i_z_e __avail = this->_e_g_p_t_r() - this->_g_p_t_r(); │ │ │ │ +704 if (__avail != 0) │ │ │ │ 705 { │ │ │ │ -706 auto __ret = _M_h.try_emplace(__hint, __k, _s_t_d_:_:_f_o_r_w_a_r_d_<___O_b_j_>(__obj)); │ │ │ │ -707 if (!__ret.second) │ │ │ │ -708 __ret.first->second = _s_t_d_:_:_f_o_r_w_a_r_d_<___O_b_j_>(__obj); │ │ │ │ -709 return __ret.first; │ │ │ │ -710 } │ │ │ │ -711 │ │ │ │ -712 // move-capable overload │ │ │ │ -713 template │ │ │ │ -714 _i_t_e_r_a_t_o_r │ │ │ │ -715 _i_n_s_e_r_t___o_r___a_s_s_i_g_n(const_iterator __hint, _k_e_y___t_y_p_e&& __k, _Obj&& __obj) │ │ │ │ -716 { │ │ │ │ -717 auto __ret = _M_h.try_emplace(__hint, _s_t_d_:_:_m_o_v_e(__k), │ │ │ │ -718 _s_t_d_:_:_f_o_r_w_a_r_d_<___O_b_j_>(__obj)); │ │ │ │ -719 if (!__ret.second) │ │ │ │ -720 __ret.first->second = _s_t_d_:_:_f_o_r_w_a_r_d_<___O_b_j_>(__obj); │ │ │ │ -721 return __ret.first; │ │ │ │ -722 } │ │ │ │ -723#endif │ │ │ │ +706 traits_type::copy(__s, this->_g_p_t_r(), __avail); │ │ │ │ +707 __s += __avail; │ │ │ │ +708 this->_s_e_t_g(this->_e_b_a_c_k(), this->_g_p_t_r() + __avail, this->_e_g_p_t_r()); │ │ │ │ +709 __ret += __avail; │ │ │ │ +710 __n -= __avail; │ │ │ │ +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 __len; │ │ │ │ +716 for (;;) │ │ │ │ +717 { │ │ │ │ +718 __len = _M_file.xsgetn(reinterpret_cast(__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 ///@{ │ │ │ │ -726 /** │ │ │ │ -727 * @brief Erases an element from an %unordered_map. │ │ │ │ -728 * @param __position An iterator pointing to the element to be erased. │ │ │ │ -729 * @return An iterator pointing to the element immediately following │ │ │ │ -730 * @a __position prior to the element being erased. If no such │ │ │ │ -731 * element exists, end() is returned. │ │ │ │ -732 * │ │ │ │ -733 * This function erases an element, pointed to by the given iterator, │ │ │ │ -734 * from an %unordered_map. │ │ │ │ -735 * Note that this function only erases the element, and that if the │ │ │ │ -736 * element is itself a pointer, the pointed-to memory is not touched in │ │ │ │ -737 * any way. Managing the pointer is the user's responsibility. │ │ │ │ -738 */ │ │ │ │ -739 iterator │ │ │ │ -_7_4_0 _e_r_a_s_e(_c_o_n_s_t___i_t_e_r_a_t_o_r __position) │ │ │ │ -741 { return _M_h.erase(__position); } │ │ │ │ -742 │ │ │ │ -743 // LWG 2059. │ │ │ │ -744 _i_t_e_r_a_t_o_r │ │ │ │ -_7_4_5 _e_r_a_s_e(_i_t_e_r_a_t_o_r __position) │ │ │ │ -746 { return _M_h.erase(__position); } │ │ │ │ -747 ///@} │ │ │ │ -748 │ │ │ │ -749 /** │ │ │ │ -750 * @brief Erases elements according to the provided key. │ │ │ │ -751 * @param __x Key of element to be erased. │ │ │ │ -752 * @return The number of elements erased. │ │ │ │ -753 * │ │ │ │ -754 * This function erases all the elements located by the given key from │ │ │ │ -755 * an %unordered_map. For an %unordered_map the result of this function │ │ │ │ -756 * can only be 0 (not present) or 1 (present). │ │ │ │ -757 * Note that this function only erases the element, and that if the │ │ │ │ -758 * element is itself a pointer, the pointed-to memory is not touched in │ │ │ │ -759 * any way. Managing the pointer is the user's responsibility. │ │ │ │ -760 */ │ │ │ │ -761 _s_i_z_e___t_y_p_e │ │ │ │ -_7_6_2 _e_r_a_s_e(const _k_e_y___t_y_p_e& __x) │ │ │ │ -763 { return _M_h.erase(__x); } │ │ │ │ -764 │ │ │ │ -765 /** │ │ │ │ -766 * @brief Erases a [__first,__last) range of elements from an │ │ │ │ -767 * %unordered_map. │ │ │ │ -768 * @param __first Iterator pointing to the start of the range to be │ │ │ │ -769 * erased. │ │ │ │ -770 * @param __last Iterator pointing to the end of the range to │ │ │ │ -771 * be erased. │ │ │ │ -772 * @return The iterator @a __last. │ │ │ │ -773 * │ │ │ │ -774 * This function erases a sequence of elements from an %unordered_map. │ │ │ │ -775 * Note that this function only erases the elements, and that if │ │ │ │ -776 * the element is itself a pointer, the pointed-to memory is not touched │ │ │ │ -777 * in any way. Managing the pointer is the user's responsibility. │ │ │ │ -778 */ │ │ │ │ -779 _i_t_e_r_a_t_o_r │ │ │ │ -_7_8_0 _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) │ │ │ │ -781 { return _M_h.erase(__first, __last); } │ │ │ │ -782 │ │ │ │ -783 /** │ │ │ │ -784 * Erases all elements in an %unordered_map. │ │ │ │ -785 * Note that this function only erases the elements, and that if the │ │ │ │ -786 * elements themselves are pointers, the pointed-to memory is not touched │ │ │ │ -787 * in any way. Managing the pointer is the user's responsibility. │ │ │ │ -788 */ │ │ │ │ -789 void │ │ │ │ -_7_9_0 _c_l_e_a_r() noexcept │ │ │ │ -791 { _M_h.clear(); } │ │ │ │ -792 │ │ │ │ -793 /** │ │ │ │ -794 * @brief Swaps data with another %unordered_map. │ │ │ │ -795 * @param __x An %unordered_map of the same element and allocator │ │ │ │ -796 * types. │ │ │ │ -797 * │ │ │ │ -798 * This exchanges the elements between two %unordered_map in constant │ │ │ │ -799 * time. │ │ │ │ -800 * Note that the global std::swap() function is specialized such that │ │ │ │ -801 * std::swap(m1,m2) will feed to this function. │ │ │ │ -802 */ │ │ │ │ -803 void │ │ │ │ -_8_0_4 _s_w_a_p(_u_n_o_r_d_e_r_e_d___m_a_p& __x) │ │ │ │ -805 noexcept( noexcept(_M_h.swap(__x._M_h)) ) │ │ │ │ -806 { _M_h.swap(__x._M_h); } │ │ │ │ -807 │ │ │ │ -808#if __cplusplus > 201402L │ │ │ │ -809 template │ │ │ │ -810 friend class std::_Hash_merge_helper; │ │ │ │ -811 │ │ │ │ -812 template │ │ │ │ -813 void │ │ │ │ -814 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_>& __source) │ │ │ │ -815 { │ │ │ │ -816 using _Merge_helper = _Hash_merge_helper; │ │ │ │ -817 _M_h._M_merge_unique(_Merge_helper::_S_get_table(__source)); │ │ │ │ -818 } │ │ │ │ -819 │ │ │ │ -820 template │ │ │ │ -821 void │ │ │ │ -822 merge(unordered_map<_Key, _Tp, _H2, _P2, _Alloc>&& __source) │ │ │ │ -823 { merge(__source); } │ │ │ │ -824 │ │ │ │ -825 template │ │ │ │ -826 void │ │ │ │ -827 merge(unordered_multimap<_Key, _Tp, _H2, _P2, _Alloc>& __source) │ │ │ │ -828 { │ │ │ │ -829 using _Merge_helper = _Hash_merge_helper; │ │ │ │ -830 _M_h._M_merge_unique(_Merge_helper::_S_get_table(__source)); │ │ │ │ -831 } │ │ │ │ -832 │ │ │ │ -833 template │ │ │ │ -834 void │ │ │ │ -835 merge(unordered_multimap<_Key, _Tp, _H2, _P2, _Alloc>&& __source) │ │ │ │ -836 { merge(__source); } │ │ │ │ -837#endif // C++17 │ │ │ │ -838 │ │ │ │ -839 // observers. │ │ │ │ +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___r_e_a_d_i_n_g = 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___s_e_t___b_u_f_f_e_r(-1); │ │ │ │ +744 ___M___r_e_a_d_i_n_g = false; │ │ │ │ +745 } │ │ │ │ +746 } │ │ │ │ +747 else │ │ │ │ +748 __ret += _____s_t_r_e_a_m_b_u_f___t_y_p_e_:_:_x_s_g_e_t_n(__s, __n); │ │ │ │ +749 │ │ │ │ +750 return __ret; │ │ │ │ +751 } │ │ │ │ +752 │ │ │ │ +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 __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___m_o_d_e & _i_o_s___b_a_s_e_:_:_o_u_t │ │ │ │ +763 || ___M___m_o_d_e & _i_o_s___b_a_s_e_:_:_a_p_p); │ │ │ │ +764 if (__check_facet(_M_codecvt).always_noconv() │ │ │ │ +765 && __testout && !___M___r_e_a_d_i_n_g) │ │ │ │ +766 { │ │ │ │ +767 // Measurement would reveal the best choice. │ │ │ │ +768 const _s_t_r_e_a_m_s_i_z_e __chunk = 1ul << 10; │ │ │ │ +769 _s_t_r_e_a_m_s_i_z_e __bufavail = this->_e_p_p_t_r() - this->_p_p_t_r(); │ │ │ │ +770 │ │ │ │ +771 // Don't mistake 'uncommitted' mode buffered with unbuffered. │ │ │ │ +772 if (!_M_writing && ___M___b_u_f___s_i_z_e > 1) │ │ │ │ +773 __bufavail = ___M___b_u_f___s_i_z_e - 1; │ │ │ │ +774 │ │ │ │ +775 const _s_t_r_e_a_m_s_i_z_e __limit = _s_t_d_:_:_m_i_n(__chunk, __bufavail); │ │ │ │ +776 if (__n >= __limit) │ │ │ │ +777 { │ │ │ │ +778 const _s_t_r_e_a_m_s_i_z_e __buffill = this->_p_p_t_r() - this->_p_b_a_s_e(); │ │ │ │ +779 const char* __buf = reinterpret_cast(this->_p_b_a_s_e()); │ │ │ │ +780 __ret = _M_file.xsputn_2(__buf, __buffill, │ │ │ │ +781 reinterpret_cast(__s), │ │ │ │ +782 __n); │ │ │ │ +783 if (__ret == __buffill + __n) │ │ │ │ +784 { │ │ │ │ +785 ___M___s_e_t___b_u_f_f_e_r(0); │ │ │ │ +786 _M_writing = true; │ │ │ │ +787 } │ │ │ │ +788 if (__ret > __buffill) │ │ │ │ +789 __ret -= __buffill; │ │ │ │ +790 else │ │ │ │ +791 __ret = 0; │ │ │ │ +792 } │ │ │ │ +793 else │ │ │ │ +794 __ret = _____s_t_r_e_a_m_b_u_f___t_y_p_e_:_:_x_s_p_u_t_n(__s, __n); │ │ │ │ +795 } │ │ │ │ +796 else │ │ │ │ +797 __ret = _____s_t_r_e_a_m_b_u_f___t_y_p_e_:_:_x_s_p_u_t_n(__s, __n); │ │ │ │ +798 return __ret; │ │ │ │ +799 } │ │ │ │ +800 │ │ │ │ +801 template │ │ │ │ +802 typename basic_filebuf<_CharT, _Traits>::__streambuf_type* │ │ │ │ +_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->_i_s___o_p_e_n()) │ │ │ │ +807 { │ │ │ │ +808 if (__s == 0 && __n == 0) │ │ │ │ +809 ___M___b_u_f___s_i_z_e = 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___b_u_f = __s; │ │ │ │ +821 ___M___b_u_f___s_i_z_e = __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 __off, _i_o_s___b_a_s_e_:_:_s_e_e_k_d_i_r __way, _i_o_s___b_a_s_e_:_:_o_p_e_n_m_o_d_e) │ │ │ │ +834 { │ │ │ │ +835 int __width = 0; │ │ │ │ +836 if (_M_codecvt) │ │ │ │ +837 __width = _M_codecvt->encoding(); │ │ │ │ +838 if (__width < 0) │ │ │ │ +839 __width = 0; │ │ │ │ 840 │ │ │ │ -841 /// Returns the hash functor object with which the %unordered_map was │ │ │ │ -842 /// constructed. │ │ │ │ -843 _h_a_s_h_e_r │ │ │ │ -_8_4_4 _h_a_s_h___f_u_n_c_t_i_o_n() const │ │ │ │ -845 { return _M_h.hash_function(); } │ │ │ │ -846 │ │ │ │ -847 /// Returns the key comparison object with which the %unordered_map was │ │ │ │ -848 /// constructed. │ │ │ │ -849 _k_e_y___e_q_u_a_l │ │ │ │ -_8_5_0 _k_e_y___e_q() const │ │ │ │ -851 { return _M_h.key_eq(); } │ │ │ │ -852 │ │ │ │ -853 // lookup. │ │ │ │ -854 │ │ │ │ -855 ///@{ │ │ │ │ -856 /** │ │ │ │ -857 * @brief Tries to locate an element in an %unordered_map. │ │ │ │ -858 * @param __x Key to be located. │ │ │ │ -859 * @return Iterator pointing to sought-after element, or end() if not │ │ │ │ -860 * found. │ │ │ │ -861 * │ │ │ │ -862 * This function takes a key and tries to locate the element with which │ │ │ │ -863 * the key matches. If successful the function returns an iterator │ │ │ │ -864 * pointing to the sought after element. If unsuccessful it returns the │ │ │ │ -865 * past-the-end ( @c end() ) iterator. │ │ │ │ -866 */ │ │ │ │ -867 _i_t_e_r_a_t_o_r │ │ │ │ -_8_6_8 _f_i_n_d(const _k_e_y___t_y_p_e& __x) │ │ │ │ -869 { return _M_h.find(__x); } │ │ │ │ -870 │ │ │ │ -871#if __cplusplus > 201703L │ │ │ │ -872 template │ │ │ │ -873 auto │ │ │ │ -874 _f_i_n_d(const _Kt& __x) -> decltype(_M_h._M_find_tr(__x)) │ │ │ │ -875 { return _M_h._M_find_tr(__x); } │ │ │ │ -876#endif │ │ │ │ -877 │ │ │ │ -878 const_iterator │ │ │ │ -_8_7_9 _f_i_n_d(const _k_e_y___t_y_p_e& __x) const │ │ │ │ -880 { return _M_h.find(__x); } │ │ │ │ -881 │ │ │ │ -882#if __cplusplus > 201703L │ │ │ │ -883 template │ │ │ │ -884 auto │ │ │ │ -885 _f_i_n_d(const _Kt& __x) const -> decltype(_M_h._M_find_tr(__x)) │ │ │ │ -886 { return _M_h._M_find_tr(__x); } │ │ │ │ -887#endif │ │ │ │ -888 ///@} │ │ │ │ -889 │ │ │ │ -890 ///@{ │ │ │ │ -891 /** │ │ │ │ -892 * @brief Finds the number of elements. │ │ │ │ -893 * @param __x Key to count. │ │ │ │ -894 * @return Number of elements with specified key. │ │ │ │ -895 * │ │ │ │ -896 * This function only makes sense for %unordered_multimap; for │ │ │ │ -897 * %unordered_map the result will either be 0 (not present) or 1 │ │ │ │ -898 * (present). │ │ │ │ -899 */ │ │ │ │ -900 size_type │ │ │ │ -_9_0_1 _c_o_u_n_t(const _k_e_y___t_y_p_e& __x) const │ │ │ │ -902 { return _M_h.count(__x); } │ │ │ │ -903 │ │ │ │ -904#if __cplusplus > 201703L │ │ │ │ -905 template │ │ │ │ -906 auto │ │ │ │ -907 _c_o_u_n_t(const _Kt& __x) const -> decltype(_M_h._M_count_tr(__x)) │ │ │ │ -908 { return _M_h._M_count_tr(__x); } │ │ │ │ -909#endif │ │ │ │ -910 ///@} │ │ │ │ -911 │ │ │ │ -912#if __cplusplus > 201703L │ │ │ │ -913 ///@{ │ │ │ │ -914 /** │ │ │ │ -915 * @brief Finds whether an element with the given key exists. │ │ │ │ -916 * @param __x Key of elements to be located. │ │ │ │ -917 * @return True if there is any element with the specified key. │ │ │ │ -918 */ │ │ │ │ -919 bool │ │ │ │ -920 contains(const _k_e_y___t_y_p_e& __x) const │ │ │ │ -921 { return _M_h.find(__x) != _M_h.end(); } │ │ │ │ -922 │ │ │ │ -923 template │ │ │ │ -924 auto │ │ │ │ -925 contains(const _Kt& __x) const │ │ │ │ -926 -> decltype(_M_h._M_find_tr(__x), void(), true) │ │ │ │ -927 { return _M_h._M_find_tr(__x) != _M_h.end(); } │ │ │ │ -928 ///@} │ │ │ │ -929#endif │ │ │ │ -930 │ │ │ │ -931 ///@{ │ │ │ │ -932 /** │ │ │ │ -933 * @brief Finds a subsequence matching given key. │ │ │ │ -934 * @param __x Key to be located. │ │ │ │ -935 * @return Pair of iterators that possibly points to the subsequence │ │ │ │ -936 * matching given key. │ │ │ │ -937 * │ │ │ │ -938 * This function probably only makes sense for %unordered_multimap. │ │ │ │ -939 */ │ │ │ │ -940 std::pair │ │ │ │ -_9_4_1 _e_q_u_a_l___r_a_n_g_e(const _k_e_y___t_y_p_e& __x) │ │ │ │ -942 { return _M_h.equal_range(__x); } │ │ │ │ -943 │ │ │ │ -944#if __cplusplus > 201703L │ │ │ │ -945 template │ │ │ │ -946 auto │ │ │ │ -947 _e_q_u_a_l___r_a_n_g_e(const _Kt& __x) │ │ │ │ -948 -> decltype(_M_h._M_equal_range_tr(__x)) │ │ │ │ -949 { return _M_h._M_equal_range_tr(__x); } │ │ │ │ -950#endif │ │ │ │ -951 │ │ │ │ -952 _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_3 _e_q_u_a_l___r_a_n_g_e(const _k_e_y___t_y_p_e& __x) const │ │ │ │ -954 { return _M_h.equal_range(__x); } │ │ │ │ -955 │ │ │ │ -956#if __cplusplus > 201703L │ │ │ │ -957 template │ │ │ │ -958 auto │ │ │ │ -959 _e_q_u_a_l___r_a_n_g_e(const _Kt& __x) const │ │ │ │ -960 -> decltype(_M_h._M_equal_range_tr(__x)) │ │ │ │ -961 { return _M_h._M_equal_range_tr(__x); } │ │ │ │ -962#endif │ │ │ │ -963 ///@} │ │ │ │ -964 │ │ │ │ -965 ///@{ │ │ │ │ -966 /** │ │ │ │ -967 * @brief Subscript ( @c [] ) access to %unordered_map data. │ │ │ │ -968 * @param __k The key for which data should be retrieved. │ │ │ │ -969 * @return A reference to the data of the (key,data) %pair. │ │ │ │ -970 * │ │ │ │ -971 * Allows for easy lookup with the subscript ( @c [] )operator. Returns │ │ │ │ -972 * data associated with the key specified in subscript. If the key does │ │ │ │ -973 * not exist, a pair with that key is created using default values, which │ │ │ │ -974 * is then returned. │ │ │ │ -975 * │ │ │ │ -976 * Lookup requires constant time. │ │ │ │ -977 */ │ │ │ │ -978 _m_a_p_p_e_d___t_y_p_e& │ │ │ │ -_9_7_9 _o_p_e_r_a_t_o_r_[_](const _k_e_y___t_y_p_e& __k) │ │ │ │ -980 { return _M_h[__k]; } │ │ │ │ -981 │ │ │ │ -982 _m_a_p_p_e_d___t_y_p_e& │ │ │ │ -_9_8_3 _o_p_e_r_a_t_o_r_[_](_k_e_y___t_y_p_e&& __k) │ │ │ │ -984 { return _M_h[_s_t_d_:_:_m_o_v_e(__k)]; } │ │ │ │ -985 ///@} │ │ │ │ -986 │ │ │ │ -987 ///@{ │ │ │ │ -988 /** │ │ │ │ -989 * @brief Access to %unordered_map data. │ │ │ │ -990 * @param __k The key for which data should be retrieved. │ │ │ │ -991 * @return A reference to the data whose key is equal to @a __k, if │ │ │ │ -992 * such a data is present in the %unordered_map. │ │ │ │ -993 * @throw std::out_of_range If no such data is present. │ │ │ │ -994 */ │ │ │ │ -995 _m_a_p_p_e_d___t_y_p_e& │ │ │ │ -_9_9_6 _a_t(const _k_e_y___t_y_p_e& __k) │ │ │ │ -997 { return _M_h.at(__k); } │ │ │ │ -998 │ │ │ │ -999 const _m_a_p_p_e_d___t_y_p_e& │ │ │ │ -_1_0_0_0 _a_t(const _k_e_y___t_y_p_e& __k) const │ │ │ │ -1001 { return _M_h.at(__k); } │ │ │ │ -1002 ///@} │ │ │ │ -1003 │ │ │ │ -1004 // bucket interface. │ │ │ │ -1005 │ │ │ │ -1006 /// Returns the number of buckets of the %unordered_map. │ │ │ │ -1007 _s_i_z_e___t_y_p_e │ │ │ │ -_1_0_0_8 _b_u_c_k_e_t___c_o_u_n_t() const noexcept │ │ │ │ -1009 { return _M_h.bucket_count(); } │ │ │ │ -1010 │ │ │ │ -1011 /// Returns the maximum number of buckets of the %unordered_map. │ │ │ │ -1012 _s_i_z_e___t_y_p_e │ │ │ │ -_1_0_1_3 _m_a_x___b_u_c_k_e_t___c_o_u_n_t() const noexcept │ │ │ │ -1014 { return _M_h.max_bucket_count(); } │ │ │ │ -1015 │ │ │ │ -1016 /* │ │ │ │ -1017 * @brief Returns the number of elements in a given bucket. │ │ │ │ -1018 * @param __n A bucket index. │ │ │ │ -1019 * @return The number of elements in the bucket. │ │ │ │ -1020 */ │ │ │ │ -1021 _s_i_z_e___t_y_p_e │ │ │ │ -1022 bucket_size(_s_i_z_e___t_y_p_e __n) const │ │ │ │ -1023 { return _M_h.bucket_size(__n); } │ │ │ │ -1024 │ │ │ │ -1025 /* │ │ │ │ -1026 * @brief Returns the bucket index of a given element. │ │ │ │ -1027 * @param __key A key instance. │ │ │ │ -1028 * @return The key bucket index. │ │ │ │ -1029 */ │ │ │ │ -1030 size_type │ │ │ │ -1031 bucket(const _k_e_y___t_y_p_e& __key) const │ │ │ │ -1032 { return _M_h.bucket(__key); } │ │ │ │ +841 pos_type __ret = pos_type(off_type(-1)); │ │ │ │ +842 const bool __testfail = __off != 0 && __width <= 0; │ │ │ │ +843 if (this->_i_s___o_p_e_n() && !__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 == _i_o_s___b_a_s_e_:_:_c_u_r && __off == 0 │ │ │ │ +850 && (!_M_writing || _M_codecvt->always_noconv()); │ │ │ │ +851 │ │ │ │ +852 // Ditch any pback buffers to avoid confusion. │ │ │ │ +853 if (!__no_movement) │ │ │ │ +854 ___M___d_e_s_t_r_o_y___p_b_a_c_k(); │ │ │ │ +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___r_e_a_d_i_n_g && __way == _i_o_s___b_a_s_e_:_:_c_u_r) │ │ │ │ +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->_p_p_t_r() - this->_p_b_a_s_e(); │ │ │ │ +874 │ │ │ │ +875 off_type __file_off = _M_file.seekoff(0, _i_o_s___b_a_s_e_:_:_c_u_r); │ │ │ │ +876 if (__file_off != off_type(-1)) │ │ │ │ +877 { │ │ │ │ +878 __ret = __file_off + __computed_off; │ │ │ │ +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 │ │ │ │ +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 __pos, _i_o_s___b_a_s_e_:_:_o_p_e_n_m_o_d_e) │ │ │ │ +894 { │ │ │ │ +895 pos_type __ret = pos_type(off_type(-1)); │ │ │ │ +896 if (this->_i_s___o_p_e_n()) │ │ │ │ +897 { │ │ │ │ +898 // Ditch any pback buffers to avoid confusion. │ │ │ │ +899 ___M___d_e_s_t_r_o_y___p_b_a_c_k(); │ │ │ │ +900 __ret = _M_seek(off_type(__pos), _i_o_s___b_a_s_e_:_:_b_e_g, __pos.state()); │ │ │ │ +901 } │ │ │ │ +902 return __ret; │ │ │ │ +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(_o_f_f___t_y_p_e __off, _i_o_s___b_a_s_e_:_:_s_e_e_k_d_i_r __way, __state_type __state) │ │ │ │ +909 { │ │ │ │ +910 _p_o_s___t_y_p_e __ret = _p_o_s___t_y_p_e(_o_f_f___t_y_p_e(-1)); │ │ │ │ +911 if (_M_terminate_output()) │ │ │ │ +912 { │ │ │ │ +913 _o_f_f___t_y_p_e __file_off = _M_file.seekoff(__off, __way); │ │ │ │ +914 if (__file_off != _o_f_f___t_y_p_e(-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; │ │ │ │ +921 __ret = __file_off; │ │ │ │ +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 │ │ │ │ +932 int _b_a_s_i_c___f_i_l_e_b_u_f_<___C_h_a_r_T_,_ ___T_r_a_i_t_s_>_:_: │ │ │ │ +933_ ___M___g_e_t___e_x_t___p_o_s(__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 _b_a_s_i_c___f_i_l_e_b_u_f_<___C_h_a_r_T_,_ ___T_r_a_i_t_s_>_:_: │ │ │ │ +952_ ___M___t_e_r_m_i_n_a_t_e___o_u_t_p_u_t() │ │ │ │ +953 { │ │ │ │ +954 // Part one: update the output sequence. │ │ │ │ +955 bool __testvalid = true; │ │ │ │ +956 if (this->pbase() < this->pptr()) │ │ │ │ +957 { │ │ │ │ +958 const _i_n_t___t_y_p_e __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 _i_n_t___t_y_p_e __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 // 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->_p_b_a_s_e() < this->_p_p_t_r()) │ │ │ │ +1019 { │ │ │ │ +1020 const int_type __tmp = this->_o_v_e_r_f_l_o_w(); │ │ │ │ +1021 if (traits_type::eq_int_type(__tmp, traits_type::eof())) │ │ │ │ +1022 __ret = -1; │ │ │ │ +1023 } │ │ │ │ +1024 return __ret; │ │ │ │ +1025 } │ │ │ │ +1026 │ │ │ │ +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& __loc) │ │ │ │ +1031 { │ │ │ │ +1032 bool __testvalid = true; │ │ │ │ 1033 │ │ │ │ -1034 /** │ │ │ │ -1035 * @brief Returns a read/write iterator pointing to the first bucket │ │ │ │ -1036 * element. │ │ │ │ -1037 * @param __n The bucket index. │ │ │ │ -1038 * @return A read/write local iterator. │ │ │ │ -1039 */ │ │ │ │ -1040 _l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_1_0_4_1 _b_e_g_i_n(_s_i_z_e___t_y_p_e __n) │ │ │ │ -1042 { return _M_h.begin(__n); } │ │ │ │ -1043 │ │ │ │ -1044 ///@{ │ │ │ │ -1045 /** │ │ │ │ -1046 * @brief Returns a read-only (constant) iterator pointing to the first │ │ │ │ -1047 * bucket element. │ │ │ │ -1048 * @param __n The bucket index. │ │ │ │ -1049 * @return A read-only local iterator. │ │ │ │ -1050 */ │ │ │ │ -1051 _c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_1_0_5_2 _b_e_g_i_n(_s_i_z_e___t_y_p_e __n) const │ │ │ │ -1053 { return _M_h.begin(__n); } │ │ │ │ -1054 │ │ │ │ -1055 _c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_1_0_5_6 _c_b_e_g_i_n(_s_i_z_e___t_y_p_e __n) const │ │ │ │ -1057 { return _M_h.cbegin(__n); } │ │ │ │ -1058 ///@} │ │ │ │ -1059 │ │ │ │ -1060 /** │ │ │ │ -1061 * @brief Returns a read/write iterator pointing to one past the last │ │ │ │ -1062 * bucket elements. │ │ │ │ -1063 * @param __n The bucket index. │ │ │ │ -1064 * @return A read/write local iterator. │ │ │ │ -1065 */ │ │ │ │ -1066 _l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_1_0_6_7 _e_n_d(_s_i_z_e___t_y_p_e __n) │ │ │ │ -1068 { return _M_h.end(__n); } │ │ │ │ -1069 │ │ │ │ -1070 ///@{ │ │ │ │ -1071 /** │ │ │ │ -1072 * @brief Returns a read-only (constant) iterator pointing to one past │ │ │ │ -1073 * the last bucket elements. │ │ │ │ -1074 * @param __n The bucket index. │ │ │ │ -1075 * @return A read-only local iterator. │ │ │ │ -1076 */ │ │ │ │ -1077 _c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_1_0_7_8 _e_n_d(_s_i_z_e___t_y_p_e __n) const │ │ │ │ -1079 { return _M_h.end(__n); } │ │ │ │ -1080 │ │ │ │ -1081 _c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_1_0_8_2 _c_e_n_d(_s_i_z_e___t_y_p_e __n) const │ │ │ │ -1083 { return _M_h.cend(__n); } │ │ │ │ -1084 ///@} │ │ │ │ -1085 │ │ │ │ -1086 // hash policy. │ │ │ │ -1087 │ │ │ │ -1088 /// Returns the average number of elements per bucket. │ │ │ │ -1089 float │ │ │ │ -_1_0_9_0 _l_o_a_d___f_a_c_t_o_r() const noexcept │ │ │ │ -1091 { return _M_h.load_factor(); } │ │ │ │ -1092 │ │ │ │ -1093 /// Returns a positive number that the %unordered_map tries to keep the │ │ │ │ -1094 /// load factor less than or equal to. │ │ │ │ -1095 float │ │ │ │ -_1_0_9_6 _m_a_x___l_o_a_d___f_a_c_t_o_r() const noexcept │ │ │ │ -1097 { return _M_h.max_load_factor(); } │ │ │ │ +1034 const __codecvt_type* _M_codecvt_tmp = 0; │ │ │ │ +1035 if (__builtin_expect(_h_a_s___f_a_c_e_t_<_____c_o_d_e_c_v_t___t_y_p_e_>(__loc), true)) │ │ │ │ +1036 _M_codecvt_tmp = &_u_s_e___f_a_c_e_t_<_____c_o_d_e_c_v_t___t_y_p_e_>(__loc); │ │ │ │ +1037 │ │ │ │ +1038 if (this->_i_s___o_p_e_n()) │ │ │ │ +1039 { │ │ │ │ +1040 // encoding() == -1 is ok only at the beginning. │ │ │ │ +1041 if ((___M___r_e_a_d_i_n_g || _M_writing) │ │ │ │ +1042 && __check_facet(_M_codecvt).encoding() == -1) │ │ │ │ +1043 __testvalid = false; │ │ │ │ +1044 else │ │ │ │ +1045 { │ │ │ │ +1046 if (___M___r_e_a_d_i_n_g) │ │ │ │ +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->_s_e_e_k_o_f_f(0, _i_o_s___b_a_s_e_:_:_c_u_r, ___M___m_o_d_e) │ │ │ │ +1053 != pos_type(off_type(-1)); │ │ │ │ +1054 } │ │ │ │ +1055 else │ │ │ │ +1056 { │ │ │ │ +1057 // External position corresponding to gptr(). │ │ │ │ +1058 ___M___e_x_t___n_e_x_t = ___M___e_x_t___b_u_f │ │ │ │ +1059 + _M_codecvt->length(_M_state_last, ___M___e_x_t___b_u_f, │ │ │ │ +1060 ___M___e_x_t___n_e_x_t, │ │ │ │ +1061 this->_g_p_t_r() - this->_e_b_a_c_k()); │ │ │ │ +1062 const _s_t_r_e_a_m_s_i_z_e __remainder = _M_ext_end - ___M___e_x_t___n_e_x_t; │ │ │ │ +1063 if (__remainder) │ │ │ │ +1064 __builtin_memmove(___M___e_x_t___b_u_f, ___M___e_x_t___n_e_x_t, __remainder); │ │ │ │ +1065 │ │ │ │ +1066 ___M___e_x_t___n_e_x_t = ___M___e_x_t___b_u_f; │ │ │ │ +1067 _M_ext_end = ___M___e_x_t___b_u_f + __remainder; │ │ │ │ +1068 ___M___s_e_t___b_u_f_f_e_r(-1); │ │ │ │ +1069 _M_state_last = _M_state_cur = _M_state_beg; │ │ │ │ +1070 } │ │ │ │ +1071 } │ │ │ │ +1072 else if (_M_writing && (__testvalid = _M_terminate_output())) │ │ │ │ +1073 ___M___s_e_t___b_u_f_f_e_r(-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 _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 /** │ │ │ │ -1100 * @brief Change the %unordered_map maximum load factor. │ │ │ │ -1101 * @param __z The new maximum load factor. │ │ │ │ -1102 */ │ │ │ │ -1103 void │ │ │ │ -_1_1_0_4 _m_a_x___l_o_a_d___f_a_c_t_o_r(float __z) │ │ │ │ -1105 { _M_h.max_load_factor(__z); } │ │ │ │ -1106 │ │ │ │ -1107 /** │ │ │ │ -1108 * @brief May rehash the %unordered_map. │ │ │ │ -1109 * @param __n The new number of buckets. │ │ │ │ -1110 * │ │ │ │ -1111 * Rehash will occur only if the new number of buckets respect the │ │ │ │ -1112 * %unordered_map maximum load factor. │ │ │ │ -1113 */ │ │ │ │ -1114 void │ │ │ │ -_1_1_1_5 _r_e_h_a_s_h(_s_i_z_e___t_y_p_e __n) │ │ │ │ -1116 { _M_h.rehash(__n); } │ │ │ │ -1117 │ │ │ │ -1118 /** │ │ │ │ -1119 * @brief Prepare the %unordered_map for a specified number of │ │ │ │ -1120 * elements. │ │ │ │ -1121 * @param __n Number of elements required. │ │ │ │ -1122 * │ │ │ │ -1123 * Same as rehash(ceil(n / max_load_factor())). │ │ │ │ -1124 */ │ │ │ │ -1125 void │ │ │ │ -_1_1_2_6 _r_e_s_e_r_v_e(_s_i_z_e___t_y_p_e __n) │ │ │ │ -1127 { _M_h.reserve(__n); } │ │ │ │ -1128 │ │ │ │ -1129 template │ │ │ │ -1131 friend bool │ │ │ │ -1132 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_>&, │ │ │ │ -1133 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_>&); │ │ │ │ -1134 }; │ │ │ │ -1135 │ │ │ │ -1136#if __cpp_deduction_guides >= 201606 │ │ │ │ -1137 │ │ │ │ -1138 template>, │ │ │ │ -1140 typename _Pred = equal_to<__iter_key_t<_InputIterator>>, │ │ │ │ -1141 typename _Allocator = allocator<__iter_to_alloc_t<_InputIterator>>, │ │ │ │ -1142 typename = _RequireInputIter<_InputIterator>, │ │ │ │ -1143 typename = _RequireNotAllocatorOrIntegral<_Hash>, │ │ │ │ -1144 typename = _RequireNotAllocator<_Pred>, │ │ │ │ -1145 typename = _RequireAllocator<_Allocator>> │ │ │ │ -1146 unordered_map(_InputIterator, _InputIterator, │ │ │ │ -1147 typename unordered_map::size_type = {}, │ │ │ │ -1148 _Hash = _Hash(), _Pred = _Pred(), _Allocator = _Allocator()) │ │ │ │ -1149 -> _u_n_o_r_d_e_r_e_d___m_a_p<__iter_key_t<_InputIterator>, │ │ │ │ -1150 __iter_val_t<_InputIterator>, │ │ │ │ -1151 _Hash, _Pred, _Allocator>; │ │ │ │ -1152 │ │ │ │ -1153 template, │ │ │ │ -1154 typename _Pred = equal_to<_Key>, │ │ │ │ -1155 typename _Allocator = allocator>, │ │ │ │ -1156 typename = _RequireNotAllocatorOrIntegral<_Hash>, │ │ │ │ -1157 typename = _RequireNotAllocator<_Pred>, │ │ │ │ -1158 typename = _RequireAllocator<_Allocator>> │ │ │ │ -1159 _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<_p_a_i_r_<___K_e_y_,_ ___T_p_>>, │ │ │ │ -1160 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 = {}, │ │ │ │ -1161 _Hash = _Hash(), _Pred = _Pred(), _Allocator = _Allocator()) │ │ │ │ -1162 -> _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_a_t_o_r_>; │ │ │ │ -1163 │ │ │ │ -1164 template, │ │ │ │ -1166 typename = _RequireAllocator<_Allocator>> │ │ │ │ -1167 _u_n_o_r_d_e_r_e_d___m_a_p(_InputIterator, _InputIterator, │ │ │ │ -1168 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) │ │ │ │ -1169 -> _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_>, │ │ │ │ -1170 __iter_val_t<_InputIterator>, │ │ │ │ -1171 _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_>>, │ │ │ │ -1172 _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_>>, │ │ │ │ -1173 _Allocator>; │ │ │ │ -1174 │ │ │ │ -1175 template, │ │ │ │ -1177 typename = _RequireAllocator<_Allocator>> │ │ │ │ -1178 _u_n_o_r_d_e_r_e_d___m_a_p(_InputIterator, _InputIterator, _Allocator) │ │ │ │ -1179 -> _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_>, │ │ │ │ -1180 __iter_val_t<_InputIterator>, │ │ │ │ -1181 _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_>>, │ │ │ │ -1182 _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_>>, │ │ │ │ -1183 _Allocator>; │ │ │ │ -1184 │ │ │ │ -1185 template, │ │ │ │ -1187 typename = _RequireNotAllocatorOrIntegral<_Hash>, │ │ │ │ -1188 typename = _RequireAllocator<_Allocator>> │ │ │ │ -1189 _u_n_o_r_d_e_r_e_d___m_a_p(_InputIterator, _InputIterator, │ │ │ │ -1190 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, │ │ │ │ -1191 _Hash, _Allocator) │ │ │ │ -1192 -> _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_>, │ │ │ │ -1193 __iter_val_t<_InputIterator>, _Hash, │ │ │ │ -1194 _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_>>, _Allocator>; │ │ │ │ -1195 │ │ │ │ -1196 template> │ │ │ │ -1198 _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<_p_a_i_r_<___K_e_y_,_ ___T_p_>>, │ │ │ │ -1199 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, │ │ │ │ -1200 _Allocator) │ │ │ │ -1201 -> _u_n_o_r_d_e_r_e_d___m_a_p_<___K_e_y_,_ ___T_p_,_ _h_a_s_h_<___K_e_y_>, _e_q_u_a_l___t_o_<___K_e_y_>, _Allocator>; │ │ │ │ -1202 │ │ │ │ -1203 template> │ │ │ │ -1205 _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<_p_a_i_r_<___K_e_y_,_ ___T_p_>>, _Allocator) │ │ │ │ -1206 -> _u_n_o_r_d_e_r_e_d___m_a_p_<___K_e_y_,_ ___T_p_,_ _h_a_s_h_<___K_e_y_>, _e_q_u_a_l___t_o_<___K_e_y_>, _Allocator>; │ │ │ │ -1207 │ │ │ │ -1208 template, │ │ │ │ -1210 typename = _RequireAllocator<_Allocator>> │ │ │ │ -1211 _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<_p_a_i_r_<___K_e_y_,_ ___T_p_>>, │ │ │ │ -1212 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, │ │ │ │ -1213 _Hash, _Allocator) │ │ │ │ -1214 -> _u_n_o_r_d_e_r_e_d___m_a_p_<___K_e_y_,_ ___T_p_,_ ___H_a_s_h_,_ _e_q_u_a_l___t_o_<___K_e_y_>, _Allocator>; │ │ │ │ -1215 │ │ │ │ -1216#endif │ │ │ │ -1217 │ │ │ │ -1218 /** │ │ │ │ -1219 * @brief A standard container composed of equivalent keys │ │ │ │ -1220 * (possibly containing multiple of each key value) that associates │ │ │ │ -1221 * values of another type with the keys. │ │ │ │ -1222 * │ │ │ │ -1223 * @ingroup unordered_associative_containers │ │ │ │ -1224 * │ │ │ │ -1225 * @tparam _Key Type of key objects. │ │ │ │ -1226 * @tparam _Tp Type of mapped objects. │ │ │ │ -1227 * @tparam _Hash Hashing function object type, defaults to hash<_Value>. │ │ │ │ -1228 * @tparam _Pred Predicate function object type, defaults │ │ │ │ -1229 * to equal_to<_Value>. │ │ │ │ -1230 * @tparam _Alloc Allocator type, defaults to │ │ │ │ -1231 * std::allocator>. │ │ │ │ -1232 * │ │ │ │ -1233 * Meets the requirements of a container, and │ │ │ │ -1234 * unordered associative container │ │ │ │ -1235 * │ │ │ │ -1236 * The resulting value type of the container is std::pair. │ │ │ │ -1237 * │ │ │ │ -1238 * Base is _Hashtable, dispatched at compile time via template │ │ │ │ -1239 * alias __ummap_hashtable. │ │ │ │ -1240 */ │ │ │ │ -1241 template, │ │ │ │ -1243 typename _Pred = _e_q_u_a_l___t_o_<___K_e_y_>, │ │ │ │ -1244 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_2_4_5 class _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p │ │ │ │ -1246 { │ │ │ │ -1247 typedef __ummap_hashtable<_Key, _Tp, _Hash, _Pred, _Alloc> _Hashtable; │ │ │ │ -1248 _Hashtable _M_h; │ │ │ │ -1249 │ │ │ │ -1250 public: │ │ │ │ -1251 // typedefs: │ │ │ │ -1252 ///@{ │ │ │ │ -1253 /// Public typedefs. │ │ │ │ -_1_2_5_4 typedef typename _Hashtable::key_type _k_e_y___t_y_p_e; │ │ │ │ -_1_2_5_5 typedef typename _Hashtable::value_type _v_a_l_u_e___t_y_p_e; │ │ │ │ -_1_2_5_6 typedef typename _Hashtable::mapped_type _m_a_p_p_e_d___t_y_p_e; │ │ │ │ -_1_2_5_7 typedef typename _Hashtable::hasher _h_a_s_h_e_r; │ │ │ │ -_1_2_5_8 typedef typename _Hashtable::key_equal _k_e_y___e_q_u_a_l; │ │ │ │ -_1_2_5_9 typedef typename _Hashtable::allocator_type _a_l_l_o_c_a_t_o_r___t_y_p_e; │ │ │ │ -1260 ///@} │ │ │ │ -1261 │ │ │ │ -1262 ///@{ │ │ │ │ -1263 /// Iterator-related typedefs. │ │ │ │ -_1_2_6_4 typedef typename _Hashtable::pointer _p_o_i_n_t_e_r; │ │ │ │ -_1_2_6_5 typedef typename _Hashtable::const_pointer _c_o_n_s_t___p_o_i_n_t_e_r; │ │ │ │ -_1_2_6_6 typedef typename _Hashtable::reference _r_e_f_e_r_e_n_c_e; │ │ │ │ -_1_2_6_7 typedef typename _Hashtable::const_reference _c_o_n_s_t___r_e_f_e_r_e_n_c_e; │ │ │ │ -_1_2_6_8 typedef typename _Hashtable::iterator _i_t_e_r_a_t_o_r; │ │ │ │ -_1_2_6_9 typedef typename _Hashtable::const_iterator _c_o_n_s_t___i_t_e_r_a_t_o_r; │ │ │ │ -_1_2_7_0 typedef typename _Hashtable::local_iterator _l_o_c_a_l___i_t_e_r_a_t_o_r; │ │ │ │ -_1_2_7_1 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_2 typedef typename _Hashtable::size_type _s_i_z_e___t_y_p_e; │ │ │ │ -_1_2_7_3 typedef typename _Hashtable::difference_type _d_i_f_f_e_r_e_n_c_e___t_y_p_e; │ │ │ │ -1274 ///@} │ │ │ │ -1275 │ │ │ │ -1276#if __cplusplus > 201402L │ │ │ │ -1277 using node_type = typename _Hashtable::node_type; │ │ │ │ -1278#endif │ │ │ │ -1279 │ │ │ │ -1280 //construct/destroy/copy │ │ │ │ -1281 │ │ │ │ -1282 /// Default constructor. │ │ │ │ -_1_2_8_3 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p() = default; │ │ │ │ -1284 │ │ │ │ -1285 /** │ │ │ │ -1286 * @brief Default constructor creates no elements. │ │ │ │ -1287 * @param __n Mnimal initial number of buckets. │ │ │ │ -1288 * @param __hf A hash functor. │ │ │ │ -1289 * @param __eql A key equality functor. │ │ │ │ -1290 * @param __a An allocator object. │ │ │ │ -1291 */ │ │ │ │ -1292 explicit │ │ │ │ -_1_2_9_3 _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, │ │ │ │ -1294 const _h_a_s_h_e_r& __hf = _h_a_s_h_e_r(), │ │ │ │ -1295 const _k_e_y___e_q_u_a_l& __eql = _k_e_y___e_q_u_a_l(), │ │ │ │ -1296 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()) │ │ │ │ -1297 : _M_h(__n, __hf, __eql, __a) │ │ │ │ -1298 { } │ │ │ │ -1299 │ │ │ │ -1300 /** │ │ │ │ -1301 * @brief Builds an %unordered_multimap from a range. │ │ │ │ -1302 * @param __first An input iterator. │ │ │ │ -1303 * @param __last An input iterator. │ │ │ │ -1304 * @param __n Minimal initial number of buckets. │ │ │ │ -1305 * @param __hf A hash functor. │ │ │ │ -1306 * @param __eql A key equality functor. │ │ │ │ -1307 * @param __a An allocator object. │ │ │ │ -1308 * │ │ │ │ -1309 * Create an %unordered_multimap consisting of copies of the elements │ │ │ │ -1310 * from [__first,__last). This is linear in N (where N is │ │ │ │ -1311 * distance(__first,__last)). │ │ │ │ -1312 */ │ │ │ │ -1313 template │ │ │ │ -_1_3_1_4 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p(_InputIterator __first, _InputIterator __last, │ │ │ │ -1315 _s_i_z_e___t_y_p_e __n = 0, │ │ │ │ -1316 const _h_a_s_h_e_r& __hf = _h_a_s_h_e_r(), │ │ │ │ -1317 const _k_e_y___e_q_u_a_l& __eql = _k_e_y___e_q_u_a_l(), │ │ │ │ -1318 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()) │ │ │ │ -1319 : _M_h(__first, __last, __n, __hf, __eql, __a) │ │ │ │ -1320 { } │ │ │ │ -1321 │ │ │ │ -1322 /// Copy constructor. │ │ │ │ -_1_3_2_3 _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; │ │ │ │ -1324 │ │ │ │ -1325 /// Move constructor. │ │ │ │ -_1_3_2_6 _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; │ │ │ │ -1327 │ │ │ │ -1328 /** │ │ │ │ -1329 * @brief Creates an %unordered_multimap with no elements. │ │ │ │ -1330 * @param __a An allocator object. │ │ │ │ -1331 */ │ │ │ │ -1332 explicit │ │ │ │ -_1_3_3_3 _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) │ │ │ │ -1334 : _M_h(__a) │ │ │ │ -1335 { } │ │ │ │ -1336 │ │ │ │ -1337 /* │ │ │ │ -1338 * @brief Copy constructor with allocator argument. │ │ │ │ -1339 * @param __uset Input %unordered_multimap to copy. │ │ │ │ -1340 * @param __a An allocator object. │ │ │ │ -1341 */ │ │ │ │ -1342 _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& __ummap, │ │ │ │ -1343 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -1344 : _M_h(__ummap._M_h, __a) │ │ │ │ -1345 { } │ │ │ │ -1346 │ │ │ │ -1347 /* │ │ │ │ -1348 * @brief Move constructor with allocator argument. │ │ │ │ -1349 * @param __uset Input %unordered_multimap to move. │ │ │ │ -1350 * @param __a An allocator object. │ │ │ │ -1351 */ │ │ │ │ -1352 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p(unordered_multimap&& __ummap, │ │ │ │ -1353 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -1354 noexcept( noexcept(_Hashtable(_s_t_d_:_:_m_o_v_e(__ummap._M_h), __a)) ) │ │ │ │ -1355 : _M_h(_s_t_d::_m_o_v_e(__ummap._M_h), __a) │ │ │ │ -1356 { } │ │ │ │ -1357 │ │ │ │ -1358 /** │ │ │ │ -1359 * @brief Builds an %unordered_multimap from an initializer_list. │ │ │ │ -1360 * @param __l An initializer_list. │ │ │ │ -1361 * @param __n Minimal initial number of buckets. │ │ │ │ -1362 * @param __hf A hash functor. │ │ │ │ -1363 * @param __eql A key equality functor. │ │ │ │ -1364 * @param __a An allocator object. │ │ │ │ -1365 * │ │ │ │ -1366 * Create an %unordered_multimap consisting of copies of the elements in │ │ │ │ -1367 * the list. This is linear in N (where N is @a __l.size()). │ │ │ │ -1368 */ │ │ │ │ -_1_3_6_9 _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, │ │ │ │ -1370 _s_i_z_e___t_y_p_e __n = 0, │ │ │ │ -1371 const _h_a_s_h_e_r& __hf = _h_a_s_h_e_r(), │ │ │ │ -1372 const _k_e_y___e_q_u_a_l& __eql = _k_e_y___e_q_u_a_l(), │ │ │ │ -1373 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()) │ │ │ │ -1374 : _M_h(__l, __n, __hf, __eql, __a) │ │ │ │ -1375 { } │ │ │ │ -1376 │ │ │ │ -1377 _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) │ │ │ │ -1378 : _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) │ │ │ │ -1379 { } │ │ │ │ -1380 │ │ │ │ -1381 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p(size_type __n, const _h_a_s_h_e_r& __hf, │ │ │ │ -1382 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -1383 : unordered_multimap(__n, __hf, _k_e_y___e_q_u_a_l(), __a) │ │ │ │ -1384 { } │ │ │ │ -1385 │ │ │ │ -1386 template │ │ │ │ -1387 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p(_InputIterator __first, _InputIterator __last, │ │ │ │ -1388 _s_i_z_e___t_y_p_e __n, │ │ │ │ -1389 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -1390 : _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) │ │ │ │ -1391 { } │ │ │ │ -1392 │ │ │ │ -1393 template │ │ │ │ -1394 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p(_InputIterator __first, _InputIterator __last, │ │ │ │ -1395 _s_i_z_e___t_y_p_e __n, const _h_a_s_h_e_r& __hf, │ │ │ │ -1396 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -1397 : _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) │ │ │ │ -1398 { } │ │ │ │ -1399 │ │ │ │ -1400 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p(initializer_list __l, │ │ │ │ -1401 _s_i_z_e___t_y_p_e __n, │ │ │ │ -1402 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -1403 : _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) │ │ │ │ -1404 { } │ │ │ │ -1405 │ │ │ │ -1406 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p(initializer_list __l, │ │ │ │ -1407 _s_i_z_e___t_y_p_e __n, const _h_a_s_h_e_r& __hf, │ │ │ │ -1408 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -1409 : _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) │ │ │ │ -1410 { } │ │ │ │ -1411 │ │ │ │ -1412 /// Copy assignment operator. │ │ │ │ -1413 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p& │ │ │ │ -_1_4_1_4 _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; │ │ │ │ -1415 │ │ │ │ -1416 /// Move 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_=(_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p&&) = default; │ │ │ │ -1419 │ │ │ │ -1420 /** │ │ │ │ -1421 * @brief %Unordered_multimap list assignment operator. │ │ │ │ -1422 * @param __l An initializer_list. │ │ │ │ -1423 * │ │ │ │ -1424 * This function fills an %unordered_multimap with copies of the │ │ │ │ -1425 * elements in the initializer list @a __l. │ │ │ │ -1426 * │ │ │ │ -1427 * Note that the assignment completely changes the %unordered_multimap │ │ │ │ -1428 * and that the resulting %unordered_multimap's size is the same as the │ │ │ │ -1429 * number of elements assigned. │ │ │ │ -1430 */ │ │ │ │ -1431 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p& │ │ │ │ -_1_4_3_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) │ │ │ │ -1433 { │ │ │ │ -1434 _M_h = __l; │ │ │ │ -1435 return *this; │ │ │ │ -1436 } │ │ │ │ -1437 │ │ │ │ -1438 /// Returns the allocator object used by the %unordered_multimap. │ │ │ │ -1439 _a_l_l_o_c_a_t_o_r___t_y_p_e │ │ │ │ -_1_4_4_0 _g_e_t___a_l_l_o_c_a_t_o_r() const noexcept │ │ │ │ -1441 { return _M_h.get_allocator(); } │ │ │ │ -1442 │ │ │ │ -1443 // size and capacity: │ │ │ │ -1444 │ │ │ │ -1445 /// Returns true if the %unordered_multimap is empty. │ │ │ │ -1446 _GLIBCXX_NODISCARD bool │ │ │ │ -_1_4_4_7 _e_m_p_t_y() const noexcept │ │ │ │ -1448 { return _M_h.empty(); } │ │ │ │ -1449 │ │ │ │ -1450 /// Returns the size of the %unordered_multimap. │ │ │ │ -1451 _s_i_z_e___t_y_p_e │ │ │ │ -_1_4_5_2 _s_i_z_e() const noexcept │ │ │ │ -1453 { return _M_h.size(); } │ │ │ │ -1454 │ │ │ │ -1455 /// Returns the maximum size of the %unordered_multimap. │ │ │ │ -1456 _s_i_z_e___t_y_p_e │ │ │ │ -_1_4_5_7 _m_a_x___s_i_z_e() const noexcept │ │ │ │ -1458 { return _M_h.max_size(); } │ │ │ │ -1459 │ │ │ │ -1460 // iterators. │ │ │ │ -1461 │ │ │ │ -1462 /** │ │ │ │ -1463 * Returns a read/write iterator that points to the first element in the │ │ │ │ -1464 * %unordered_multimap. │ │ │ │ -1465 */ │ │ │ │ -1466 _i_t_e_r_a_t_o_r │ │ │ │ -_1_4_6_7 _b_e_g_i_n() noexcept │ │ │ │ -1468 { return _M_h.begin(); } │ │ │ │ -1469 │ │ │ │ -1470 ///@{ │ │ │ │ -1471 /** │ │ │ │ -1472 * Returns a read-only (constant) iterator that points to the first │ │ │ │ -1473 * element in the %unordered_multimap. │ │ │ │ -1474 */ │ │ │ │ -1475 const_iterator │ │ │ │ -_1_4_7_6 _b_e_g_i_n() const noexcept │ │ │ │ -1477 { return _M_h.begin(); } │ │ │ │ -1478 │ │ │ │ -1479 const_iterator │ │ │ │ -_1_4_8_0 _c_b_e_g_i_n() const noexcept │ │ │ │ -1481 { return _M_h.begin(); } │ │ │ │ -1482 ///@} │ │ │ │ -1483 │ │ │ │ -1484 /** │ │ │ │ -1485 * Returns a read/write iterator that points one past the last element in │ │ │ │ -1486 * the %unordered_multimap. │ │ │ │ -1487 */ │ │ │ │ -1488 _i_t_e_r_a_t_o_r │ │ │ │ -_1_4_8_9 _e_n_d() noexcept │ │ │ │ -1490 { return _M_h.end(); } │ │ │ │ -1491 │ │ │ │ -1492 ///@{ │ │ │ │ -1493 /** │ │ │ │ -1494 * Returns a read-only (constant) iterator that points one past the last │ │ │ │ -1495 * element in the %unordered_multimap. │ │ │ │ -1496 */ │ │ │ │ -1497 const_iterator │ │ │ │ -_1_4_9_8 _e_n_d() const noexcept │ │ │ │ -1499 { return _M_h.end(); } │ │ │ │ -1500 │ │ │ │ -1501 const_iterator │ │ │ │ -_1_5_0_2 _c_e_n_d() const noexcept │ │ │ │ -1503 { return _M_h.end(); } │ │ │ │ -1504 ///@} │ │ │ │ -1505 │ │ │ │ -1506 // modifiers. │ │ │ │ -1507 │ │ │ │ -1508 /** │ │ │ │ -1509 * @brief Attempts to build and insert a std::pair into the │ │ │ │ -1510 * %unordered_multimap. │ │ │ │ -1511 * │ │ │ │ -1512 * @param __args Arguments used to generate a new pair instance (see │ │ │ │ -1513 * std::piecewise_contruct for passing arguments to each │ │ │ │ -1514 * part of the pair constructor). │ │ │ │ -1515 * │ │ │ │ -1516 * @return An iterator that points to the inserted pair. │ │ │ │ -1517 * │ │ │ │ -1518 * This function attempts to build and insert a (key, value) %pair into │ │ │ │ -1519 * the %unordered_multimap. │ │ │ │ -1520 * │ │ │ │ -1521 * Insertion requires amortized constant time. │ │ │ │ -1522 */ │ │ │ │ -1523 template │ │ │ │ -1524 _i_t_e_r_a_t_o_r │ │ │ │ -_1_5_2_5 _e_m_p_l_a_c_e(_Args&&... __args) │ │ │ │ -1526 { return _M_h.emplace(_s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(__args)...); } │ │ │ │ -1527 │ │ │ │ -1528 /** │ │ │ │ -1529 * @brief Attempts to build and insert a std::pair into the │ │ │ │ -1530 * %unordered_multimap. │ │ │ │ -1531 * │ │ │ │ -1532 * @param __pos An iterator that serves as a hint as to where the pair │ │ │ │ -1533 * should be inserted. │ │ │ │ -1534 * @param __args Arguments used to generate a new pair instance (see │ │ │ │ -1535 * std::piecewise_contruct for passing arguments to each │ │ │ │ -1536 * part of the pair constructor). │ │ │ │ -1537 * @return An iterator that points to the element with key of the │ │ │ │ -1538 * std::pair built from @a __args. │ │ │ │ -1539 * │ │ │ │ -1540 * Note that the first parameter is only a hint and can potentially │ │ │ │ -1541 * improve the performance of the insertion process. A bad hint would │ │ │ │ -1542 * cause no gains in efficiency. │ │ │ │ -1543 * │ │ │ │ -1544 * See │ │ │ │ -1545 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/ │ │ │ │ -associative.html#containers.associative.insert_hints │ │ │ │ -1546 * for more on @a hinting. │ │ │ │ -1547 * │ │ │ │ -1548 * Insertion requires amortized constant time. │ │ │ │ -1549 */ │ │ │ │ -1550 template │ │ │ │ -1551 _i_t_e_r_a_t_o_r │ │ │ │ -_1_5_5_2 _e_m_p_l_a_c_e___h_i_n_t(_c_o_n_s_t___i_t_e_r_a_t_o_r __pos, _Args&&... __args) │ │ │ │ -1553 { return _M_h.emplace_hint(__pos, _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(__args)...); } │ │ │ │ -1554 │ │ │ │ -1555 ///@{ │ │ │ │ -1556 /** │ │ │ │ -1557 * @brief Inserts a std::pair into the %unordered_multimap. │ │ │ │ -1558 * @param __x Pair to be inserted (see std::make_pair for easy │ │ │ │ -1559 * creation of pairs). │ │ │ │ -1560 * │ │ │ │ -1561 * @return An iterator that points to the inserted pair. │ │ │ │ -1562 * │ │ │ │ -1563 * Insertion requires amortized constant time. │ │ │ │ -1564 */ │ │ │ │ -1565 _i_t_e_r_a_t_o_r │ │ │ │ -_1_5_6_6 _i_n_s_e_r_t(const _v_a_l_u_e___t_y_p_e& __x) │ │ │ │ -1567 { return _M_h.insert(__x); } │ │ │ │ -1568 │ │ │ │ -1569 _i_t_e_r_a_t_o_r │ │ │ │ -_1_5_7_0 _i_n_s_e_r_t(_v_a_l_u_e___t_y_p_e&& __x) │ │ │ │ -1571 { return _M_h.insert(_s_t_d_:_:_m_o_v_e(__x)); } │ │ │ │ -1572 │ │ │ │ -1573 template │ │ │ │ -1574 __enable_if_t::value, _i_t_e_r_a_t_o_r> │ │ │ │ -_1_5_7_5 _i_n_s_e_r_t(_Pair&& __x) │ │ │ │ -1576 { return _M_h.emplace(_s_t_d_:_:_f_o_r_w_a_r_d_<___P_a_i_r_>(__x)); } │ │ │ │ -1577 ///@} │ │ │ │ -1578 │ │ │ │ -1579 ///@{ │ │ │ │ -1580 /** │ │ │ │ -1581 * @brief Inserts a std::pair into the %unordered_multimap. │ │ │ │ -1582 * @param __hint An iterator that serves as a hint as to where the │ │ │ │ -1583 * pair should be inserted. │ │ │ │ -1584 * @param __x Pair to be inserted (see std::make_pair for easy creation │ │ │ │ -1585 * of pairs). │ │ │ │ -1586 * @return An iterator that points to the element with key of │ │ │ │ -1587 * @a __x (may or may not be the %pair passed in). │ │ │ │ -1588 * │ │ │ │ -1589 * Note that the first parameter is only a hint and can potentially │ │ │ │ -1590 * improve the performance of the insertion process. A bad hint would │ │ │ │ -1591 * cause no gains in efficiency. │ │ │ │ -1592 * │ │ │ │ -1593 * See │ │ │ │ -1594 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/ │ │ │ │ -associative.html#containers.associative.insert_hints │ │ │ │ -1595 * for more on @a hinting. │ │ │ │ -1596 * │ │ │ │ -1597 * Insertion requires amortized constant time. │ │ │ │ -1598 */ │ │ │ │ -1599 _i_t_e_r_a_t_o_r │ │ │ │ -_1_6_0_0 _i_n_s_e_r_t(_c_o_n_s_t___i_t_e_r_a_t_o_r __hint, const _v_a_l_u_e___t_y_p_e& __x) │ │ │ │ -1601 { return _M_h.insert(__hint, __x); } │ │ │ │ -1602 │ │ │ │ -1603 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ -1604 // 2354. Unnecessary copying when inserting into maps with braced-init │ │ │ │ -1605 _i_t_e_r_a_t_o_r │ │ │ │ -_1_6_0_6 _i_n_s_e_r_t(_c_o_n_s_t___i_t_e_r_a_t_o_r __hint, _v_a_l_u_e___t_y_p_e&& __x) │ │ │ │ -1607 { return _M_h.insert(__hint, _s_t_d_:_:_m_o_v_e(__x)); } │ │ │ │ -1608 │ │ │ │ -1609 template │ │ │ │ -1610 __enable_if_t::value, _i_t_e_r_a_t_o_r> │ │ │ │ -_1_6_1_1 _i_n_s_e_r_t(_c_o_n_s_t___i_t_e_r_a_t_o_r __hint, _Pair&& __x) │ │ │ │ -1612 { return _M_h.emplace_hint(__hint, _s_t_d_:_:_f_o_r_w_a_r_d_<___P_a_i_r_>(__x)); } │ │ │ │ -1613 ///@} │ │ │ │ -1614 │ │ │ │ -1615 /** │ │ │ │ -1616 * @brief A template function that attempts to insert a range of │ │ │ │ -1617 * elements. │ │ │ │ -1618 * @param __first Iterator pointing to the start of the range to be │ │ │ │ -1619 * inserted. │ │ │ │ -1620 * @param __last Iterator pointing to the end of the range. │ │ │ │ -1621 * │ │ │ │ -1622 * Complexity similar to that of the range constructor. │ │ │ │ -1623 */ │ │ │ │ -1624 template │ │ │ │ -1625 void │ │ │ │ -_1_6_2_6 _i_n_s_e_r_t(_InputIterator __first, _InputIterator __last) │ │ │ │ -1627 { _M_h.insert(__first, __last); } │ │ │ │ -1628 │ │ │ │ -1629 /** │ │ │ │ -1630 * @brief Attempts to insert a list of elements into the │ │ │ │ -1631 * %unordered_multimap. │ │ │ │ -1632 * @param __l A std::initializer_list of elements │ │ │ │ -1633 * to be inserted. │ │ │ │ -1634 * │ │ │ │ -1635 * Complexity similar to that of the range constructor. │ │ │ │ -1636 */ │ │ │ │ -1637 void │ │ │ │ -_1_6_3_8 _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) │ │ │ │ -1639 { _M_h.insert(__l); } │ │ │ │ -1640 │ │ │ │ -1641#if __cplusplus > 201402L │ │ │ │ -1642 /// Extract a node. │ │ │ │ -1643 node_type │ │ │ │ -_1_6_4_4 _e_x_t_r_a_c_t(_c_o_n_s_t___i_t_e_r_a_t_o_r __pos) │ │ │ │ -1645 { │ │ │ │ -1646 __glibcxx_assert(__pos != _e_n_d()); │ │ │ │ -1647 return _M_h.extract(__pos); │ │ │ │ -1648 } │ │ │ │ -1649 │ │ │ │ -1650 /// Extract a node. │ │ │ │ -1651 node_type │ │ │ │ -_1_6_5_2 _e_x_t_r_a_c_t(const _k_e_y___t_y_p_e& __key) │ │ │ │ -1653 { return _M_h.extract(__key); } │ │ │ │ -1654 │ │ │ │ -1655 /// Re-insert an extracted node. │ │ │ │ -1656 _i_t_e_r_a_t_o_r │ │ │ │ -_1_6_5_7 _i_n_s_e_r_t(node_type&& __nh) │ │ │ │ -1658 { return _M_h._M_reinsert_node_multi(_c_e_n_d(), _s_t_d_:_:_m_o_v_e(__nh)); } │ │ │ │ -1659 │ │ │ │ -1660 /// Re-insert an extracted node. │ │ │ │ -1661 _i_t_e_r_a_t_o_r │ │ │ │ -_1_6_6_2 _i_n_s_e_r_t(_c_o_n_s_t___i_t_e_r_a_t_o_r __hint, node_type&& __nh) │ │ │ │ -1663 { return _M_h._M_reinsert_node_multi(__hint, _s_t_d_:_:_m_o_v_e(__nh)); } │ │ │ │ -1664#endif // C++17 │ │ │ │ -1665 │ │ │ │ -1666 ///@{ │ │ │ │ -1667 /** │ │ │ │ -1668 * @brief Erases an element from an %unordered_multimap. │ │ │ │ -1669 * @param __position An iterator pointing to the element to be erased. │ │ │ │ -1670 * @return An iterator pointing to the element immediately following │ │ │ │ -1671 * @a __position prior to the element being erased. If no such │ │ │ │ -1672 * element exists, end() is returned. │ │ │ │ -1673 * │ │ │ │ -1674 * This function erases an element, pointed to by the given iterator, │ │ │ │ -1675 * from an %unordered_multimap. │ │ │ │ -1676 * Note that this function only erases the element, and that if the │ │ │ │ -1677 * element is itself a pointer, the pointed-to memory is not touched in │ │ │ │ -1678 * any way. Managing the pointer is the user's responsibility. │ │ │ │ -1679 */ │ │ │ │ -1680 _i_t_e_r_a_t_o_r │ │ │ │ -_1_6_8_1 _e_r_a_s_e(_c_o_n_s_t___i_t_e_r_a_t_o_r __position) │ │ │ │ -1682 { return _M_h.erase(__position); } │ │ │ │ -1683 │ │ │ │ -1684 // LWG 2059. │ │ │ │ -1685 _i_t_e_r_a_t_o_r │ │ │ │ -_1_6_8_6 _e_r_a_s_e(_i_t_e_r_a_t_o_r __position) │ │ │ │ -1687 { return _M_h.erase(__position); } │ │ │ │ -1688 ///@} │ │ │ │ -1689 │ │ │ │ -1690 /** │ │ │ │ -1691 * @brief Erases elements according to the provided key. │ │ │ │ -1692 * @param __x Key of elements to be erased. │ │ │ │ -1693 * @return The number of elements erased. │ │ │ │ -1694 * │ │ │ │ -1695 * This function erases all the elements located by the given key from │ │ │ │ -1696 * an %unordered_multimap. │ │ │ │ -1697 * Note that this function only erases the element, and that if the │ │ │ │ -1698 * element is itself a pointer, the pointed-to memory is not touched in │ │ │ │ -1699 * any way. Managing the pointer is the user's responsibility. │ │ │ │ -1700 */ │ │ │ │ -1701 _s_i_z_e___t_y_p_e │ │ │ │ -_1_7_0_2 _e_r_a_s_e(const _k_e_y___t_y_p_e& __x) │ │ │ │ -1703 { return _M_h.erase(__x); } │ │ │ │ -1704 │ │ │ │ -1705 /** │ │ │ │ -1706 * @brief Erases a [__first,__last) range of elements from an │ │ │ │ -1707 * %unordered_multimap. │ │ │ │ -1708 * @param __first Iterator pointing to the start of the range to be │ │ │ │ -1709 * erased. │ │ │ │ -1710 * @param __last Iterator pointing to the end of the range to │ │ │ │ -1711 * be erased. │ │ │ │ -1712 * @return The iterator @a __last. │ │ │ │ -1713 * │ │ │ │ -1714 * This function erases a sequence of elements from an │ │ │ │ -1715 * %unordered_multimap. │ │ │ │ -1716 * Note that this function only erases the elements, and that if │ │ │ │ -1717 * the element is itself a pointer, the pointed-to memory is not touched │ │ │ │ -1718 * in any way. Managing the pointer is the user's responsibility. │ │ │ │ -1719 */ │ │ │ │ -1720 _i_t_e_r_a_t_o_r │ │ │ │ -_1_7_2_1 _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) │ │ │ │ -1722 { return _M_h.erase(__first, __last); } │ │ │ │ -1723 │ │ │ │ -1724 /** │ │ │ │ -1725 * Erases all elements in an %unordered_multimap. │ │ │ │ -1726 * Note that this function only erases the elements, and that if the │ │ │ │ -1727 * elements themselves are pointers, the pointed-to memory is not touched │ │ │ │ -1728 * in any way. Managing the pointer is the user's responsibility. │ │ │ │ -1729 */ │ │ │ │ -1730 void │ │ │ │ -_1_7_3_1 _c_l_e_a_r() noexcept │ │ │ │ -1732 { _M_h.clear(); } │ │ │ │ -1733 │ │ │ │ -1734 /** │ │ │ │ -1735 * @brief Swaps data with another %unordered_multimap. │ │ │ │ -1736 * @param __x An %unordered_multimap of the same element and allocator │ │ │ │ -1737 * types. │ │ │ │ -1738 * │ │ │ │ -1739 * This exchanges the elements between two %unordered_multimap in │ │ │ │ -1740 * constant time. │ │ │ │ -1741 * Note that the global std::swap() function is specialized such that │ │ │ │ -1742 * std::swap(m1,m2) will feed to this function. │ │ │ │ -1743 */ │ │ │ │ -1744 void │ │ │ │ -_1_7_4_5 _s_w_a_p(_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p& __x) │ │ │ │ -1746 noexcept( noexcept(_M_h.swap(__x._M_h)) ) │ │ │ │ -1747 { _M_h.swap(__x._M_h); } │ │ │ │ -1748 │ │ │ │ -1749#if __cplusplus > 201402L │ │ │ │ -1750 template │ │ │ │ -1751 friend class std::_Hash_merge_helper; │ │ │ │ -1752 │ │ │ │ -1753 template │ │ │ │ -1754 void │ │ │ │ -1755 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_>& __source) │ │ │ │ -1756 { │ │ │ │ -1757 using _Merge_helper │ │ │ │ -1758 = _Hash_merge_helper; │ │ │ │ -1759 _M_h._M_merge_multi(_Merge_helper::_S_get_table(__source)); │ │ │ │ -1760 } │ │ │ │ -1761 │ │ │ │ -1762 template │ │ │ │ -1763 void │ │ │ │ -1764 merge(unordered_multimap<_Key, _Tp, _H2, _P2, _Alloc>&& __source) │ │ │ │ -1765 { merge(__source); } │ │ │ │ -1766 │ │ │ │ -1767 template │ │ │ │ -1768 void │ │ │ │ -1769 merge(unordered_map<_Key, _Tp, _H2, _P2, _Alloc>& __source) │ │ │ │ -1770 { │ │ │ │ -1771 using _Merge_helper │ │ │ │ -1772 = _Hash_merge_helper; │ │ │ │ -1773 _M_h._M_merge_multi(_Merge_helper::_S_get_table(__source)); │ │ │ │ -1774 } │ │ │ │ -1775 │ │ │ │ -1776 template │ │ │ │ -1777 void │ │ │ │ -1778 merge(unordered_map<_Key, _Tp, _H2, _P2, _Alloc>&& __source) │ │ │ │ -1779 { merge(__source); } │ │ │ │ -1780#endif // C++17 │ │ │ │ -1781 │ │ │ │ -1782 // observers. │ │ │ │ -1783 │ │ │ │ -1784 /// Returns the hash functor object with which the %unordered_multimap │ │ │ │ -1785 /// was constructed. │ │ │ │ -1786 _h_a_s_h_e_r │ │ │ │ -_1_7_8_7 _h_a_s_h___f_u_n_c_t_i_o_n() const │ │ │ │ -1788 { return _M_h.hash_function(); } │ │ │ │ -1789 │ │ │ │ -1790 /// Returns the key comparison object with which the %unordered_multimap │ │ │ │ -1791 /// was constructed. │ │ │ │ -1792 _k_e_y___e_q_u_a_l │ │ │ │ -_1_7_9_3 _k_e_y___e_q() const │ │ │ │ -1794 { return _M_h.key_eq(); } │ │ │ │ -1795 │ │ │ │ -1796 // lookup. │ │ │ │ -1797 │ │ │ │ -1798 ///@{ │ │ │ │ -1799 /** │ │ │ │ -1800 * @brief Tries to locate an element in an %unordered_multimap. │ │ │ │ -1801 * @param __x Key to be located. │ │ │ │ -1802 * @return Iterator pointing to sought-after element, or end() if not │ │ │ │ -1803 * found. │ │ │ │ -1804 * │ │ │ │ -1805 * This function takes a key and tries to locate the element with which │ │ │ │ -1806 * the key matches. If successful the function returns an iterator │ │ │ │ -1807 * pointing to the sought after element. If unsuccessful it returns the │ │ │ │ -1808 * past-the-end ( @c end() ) iterator. │ │ │ │ -1809 */ │ │ │ │ -1810 _i_t_e_r_a_t_o_r │ │ │ │ -_1_8_1_1 _f_i_n_d(const _k_e_y___t_y_p_e& __x) │ │ │ │ -1812 { return _M_h.find(__x); } │ │ │ │ -1813 │ │ │ │ -1814#if __cplusplus > 201703L │ │ │ │ -1815 template │ │ │ │ -1816 auto │ │ │ │ -1817 _f_i_n_d(const _Kt& __x) -> decltype(_M_h._M_find_tr(__x)) │ │ │ │ -1818 { return _M_h._M_find_tr(__x); } │ │ │ │ -1819#endif │ │ │ │ -1820 │ │ │ │ -1821 const_iterator │ │ │ │ -_1_8_2_2 _f_i_n_d(const _k_e_y___t_y_p_e& __x) const │ │ │ │ -1823 { return _M_h.find(__x); } │ │ │ │ -1824 │ │ │ │ -1825#if __cplusplus > 201703L │ │ │ │ -1826 template │ │ │ │ -1827 auto │ │ │ │ -1828 _f_i_n_d(const _Kt& __x) const -> decltype(_M_h._M_find_tr(__x)) │ │ │ │ -1829 { return _M_h._M_find_tr(__x); } │ │ │ │ -1830#endif │ │ │ │ -1831 ///@} │ │ │ │ -1832 │ │ │ │ -1833 ///@{ │ │ │ │ -1834 /** │ │ │ │ -1835 * @brief Finds the number of elements. │ │ │ │ -1836 * @param __x Key to count. │ │ │ │ -1837 * @return Number of elements with specified key. │ │ │ │ -1838 */ │ │ │ │ -1839 size_type │ │ │ │ -_1_8_4_0 _c_o_u_n_t(const _k_e_y___t_y_p_e& __x) const │ │ │ │ -1841 { return _M_h.count(__x); } │ │ │ │ -1842 │ │ │ │ -1843#if __cplusplus > 201703L │ │ │ │ -1844 template │ │ │ │ -1845 auto │ │ │ │ -1846 _c_o_u_n_t(const _Kt& __x) const -> decltype(_M_h._M_count_tr(__x)) │ │ │ │ -1847 { return _M_h._M_count_tr(__x); } │ │ │ │ -1848#endif │ │ │ │ -1849 ///@} │ │ │ │ -1850 │ │ │ │ -1851#if __cplusplus > 201703L │ │ │ │ -1852 ///@{ │ │ │ │ -1853 /** │ │ │ │ -1854 * @brief Finds whether an element with the given key exists. │ │ │ │ -1855 * @param __x Key of elements to be located. │ │ │ │ -1856 * @return True if there is any element with the specified key. │ │ │ │ -1857 */ │ │ │ │ -1858 bool │ │ │ │ -1859 contains(const _k_e_y___t_y_p_e& __x) const │ │ │ │ -1860 { return _M_h.find(__x) != _M_h.end(); } │ │ │ │ -1861 │ │ │ │ -1862 template │ │ │ │ -1863 auto │ │ │ │ -1864 contains(const _Kt& __x) const │ │ │ │ -1865 -> decltype(_M_h._M_find_tr(__x), void(), true) │ │ │ │ -1866 { return _M_h._M_find_tr(__x) != _M_h.end(); } │ │ │ │ -1867 ///@} │ │ │ │ -1868#endif │ │ │ │ -1869 │ │ │ │ -1870 ///@{ │ │ │ │ -1871 /** │ │ │ │ -1872 * @brief Finds a subsequence matching given key. │ │ │ │ -1873 * @param __x Key to be located. │ │ │ │ -1874 * @return Pair of iterators that possibly points to the subsequence │ │ │ │ -1875 * matching given key. │ │ │ │ -1876 */ │ │ │ │ -1877 std::pair │ │ │ │ -_1_8_7_8 _e_q_u_a_l___r_a_n_g_e(const _k_e_y___t_y_p_e& __x) │ │ │ │ -1879 { return _M_h.equal_range(__x); } │ │ │ │ -1880 │ │ │ │ -1881#if __cplusplus > 201703L │ │ │ │ -1882 template │ │ │ │ -1883 auto │ │ │ │ -1884 _e_q_u_a_l___r_a_n_g_e(const _Kt& __x) │ │ │ │ -1885 -> decltype(_M_h._M_equal_range_tr(__x)) │ │ │ │ -1886 { return _M_h._M_equal_range_tr(__x); } │ │ │ │ -1887#endif │ │ │ │ -1888 │ │ │ │ -1889 _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_0 _e_q_u_a_l___r_a_n_g_e(const _k_e_y___t_y_p_e& __x) const │ │ │ │ -1891 { return _M_h.equal_range(__x); } │ │ │ │ -1892 │ │ │ │ -1893#if __cplusplus > 201703L │ │ │ │ -1894 template │ │ │ │ -1895 auto │ │ │ │ -1896 _e_q_u_a_l___r_a_n_g_e(const _Kt& __x) const │ │ │ │ -1897 -> decltype(_M_h._M_equal_range_tr(__x)) │ │ │ │ -1898 { return _M_h._M_equal_range_tr(__x); } │ │ │ │ -1899#endif │ │ │ │ -1900 ///@} │ │ │ │ -1901 │ │ │ │ -1902 // bucket interface. │ │ │ │ -1903 │ │ │ │ -1904 /// Returns the number of buckets of the %unordered_multimap. │ │ │ │ -1905 size_type │ │ │ │ -_1_9_0_6 _b_u_c_k_e_t___c_o_u_n_t() const noexcept │ │ │ │ -1907 { return _M_h.bucket_count(); } │ │ │ │ -1908 │ │ │ │ -1909 /// Returns the maximum number of buckets of the %unordered_multimap. │ │ │ │ -1910 _s_i_z_e___t_y_p_e │ │ │ │ -_1_9_1_1 _m_a_x___b_u_c_k_e_t___c_o_u_n_t() const noexcept │ │ │ │ -1912 { return _M_h.max_bucket_count(); } │ │ │ │ -1913 │ │ │ │ -1914 /* │ │ │ │ -1915 * @brief Returns the number of elements in a given bucket. │ │ │ │ -1916 * @param __n A bucket index. │ │ │ │ -1917 * @return The number of elements in the bucket. │ │ │ │ -1918 */ │ │ │ │ -1919 _s_i_z_e___t_y_p_e │ │ │ │ -1920 bucket_size(_s_i_z_e___t_y_p_e __n) const │ │ │ │ -1921 { return _M_h.bucket_size(__n); } │ │ │ │ -1922 │ │ │ │ -1923 /* │ │ │ │ -1924 * @brief Returns the bucket index of a given element. │ │ │ │ -1925 * @param __key A key instance. │ │ │ │ -1926 * @return The key bucket index. │ │ │ │ -1927 */ │ │ │ │ -1928 size_type │ │ │ │ -1929 bucket(const _k_e_y___t_y_p_e& __key) const │ │ │ │ -1930 { return _M_h.bucket(__key); } │ │ │ │ -1931 │ │ │ │ -1932 /** │ │ │ │ -1933 * @brief Returns a read/write iterator pointing to the first bucket │ │ │ │ -1934 * element. │ │ │ │ -1935 * @param __n The bucket index. │ │ │ │ -1936 * @return A read/write local iterator. │ │ │ │ -1937 */ │ │ │ │ -1938 _l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_1_9_3_9 _b_e_g_i_n(_s_i_z_e___t_y_p_e __n) │ │ │ │ -1940 { return _M_h.begin(__n); } │ │ │ │ -1941 │ │ │ │ -1942 ///@{ │ │ │ │ -1943 /** │ │ │ │ -1944 * @brief Returns a read-only (constant) iterator pointing to the first │ │ │ │ -1945 * bucket element. │ │ │ │ -1946 * @param __n The bucket index. │ │ │ │ -1947 * @return A read-only local iterator. │ │ │ │ -1948 */ │ │ │ │ -1949 _c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_1_9_5_0 _b_e_g_i_n(_s_i_z_e___t_y_p_e __n) const │ │ │ │ -1951 { return _M_h.begin(__n); } │ │ │ │ -1952 │ │ │ │ -1953 _c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_1_9_5_4 _c_b_e_g_i_n(_s_i_z_e___t_y_p_e __n) const │ │ │ │ -1955 { return _M_h.cbegin(__n); } │ │ │ │ -1956 ///@} │ │ │ │ -1957 │ │ │ │ -1958 /** │ │ │ │ -1959 * @brief Returns a read/write iterator pointing to one past the last │ │ │ │ -1960 * bucket elements. │ │ │ │ -1961 * @param __n The bucket index. │ │ │ │ -1962 * @return A read/write local iterator. │ │ │ │ -1963 */ │ │ │ │ -1964 _l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_1_9_6_5 _e_n_d(_s_i_z_e___t_y_p_e __n) │ │ │ │ -1966 { return _M_h.end(__n); } │ │ │ │ -1967 │ │ │ │ -1968 ///@{ │ │ │ │ -1969 /** │ │ │ │ -1970 * @brief Returns a read-only (constant) iterator pointing to one past │ │ │ │ -1971 * the last bucket elements. │ │ │ │ -1972 * @param __n The bucket index. │ │ │ │ -1973 * @return A read-only local iterator. │ │ │ │ -1974 */ │ │ │ │ -1975 _c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_1_9_7_6 _e_n_d(_s_i_z_e___t_y_p_e __n) const │ │ │ │ -1977 { return _M_h.end(__n); } │ │ │ │ -1978 │ │ │ │ -1979 _c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_1_9_8_0 _c_e_n_d(_s_i_z_e___t_y_p_e __n) const │ │ │ │ -1981 { return _M_h.cend(__n); } │ │ │ │ -1982 ///@} │ │ │ │ -1983 │ │ │ │ -1984 // hash policy. │ │ │ │ -1985 │ │ │ │ -1986 /// Returns the average number of elements per bucket. │ │ │ │ -1987 float │ │ │ │ -_1_9_8_8 _l_o_a_d___f_a_c_t_o_r() const noexcept │ │ │ │ -1989 { return _M_h.load_factor(); } │ │ │ │ -1990 │ │ │ │ -1991 /// Returns a positive number that the %unordered_multimap tries to keep │ │ │ │ -1992 /// the load factor less than or equal to. │ │ │ │ -1993 float │ │ │ │ -_1_9_9_4 _m_a_x___l_o_a_d___f_a_c_t_o_r() const noexcept │ │ │ │ -1995 { return _M_h.max_load_factor(); } │ │ │ │ -1996 │ │ │ │ -1997 /** │ │ │ │ -1998 * @brief Change the %unordered_multimap maximum load factor. │ │ │ │ -1999 * @param __z The new maximum load factor. │ │ │ │ -2000 */ │ │ │ │ -2001 void │ │ │ │ -_2_0_0_2 _m_a_x___l_o_a_d___f_a_c_t_o_r(float __z) │ │ │ │ -2003 { _M_h.max_load_factor(__z); } │ │ │ │ -2004 │ │ │ │ -2005 /** │ │ │ │ -2006 * @brief May rehash the %unordered_multimap. │ │ │ │ -2007 * @param __n The new number of buckets. │ │ │ │ -2008 * │ │ │ │ -2009 * Rehash will occur only if the new number of buckets respect the │ │ │ │ -2010 * %unordered_multimap maximum load factor. │ │ │ │ -2011 */ │ │ │ │ -2012 void │ │ │ │ -_2_0_1_3 _r_e_h_a_s_h(_s_i_z_e___t_y_p_e __n) │ │ │ │ -2014 { _M_h.rehash(__n); } │ │ │ │ -2015 │ │ │ │ -2016 /** │ │ │ │ -2017 * @brief Prepare the %unordered_multimap for a specified number of │ │ │ │ -2018 * elements. │ │ │ │ -2019 * @param __n Number of elements required. │ │ │ │ -2020 * │ │ │ │ -2021 * Same as rehash(ceil(n / max_load_factor())). │ │ │ │ -2022 */ │ │ │ │ -2023 void │ │ │ │ -_2_0_2_4 _r_e_s_e_r_v_e(_s_i_z_e___t_y_p_e __n) │ │ │ │ -2025 { _M_h.reserve(__n); } │ │ │ │ -2026 │ │ │ │ -2027 template │ │ │ │ -2029 friend bool │ │ │ │ -2030 operator==(const _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p<_Key1, _Tp1, │ │ │ │ -2031 _Hash1, _Pred1, _Alloc1>&, │ │ │ │ -2032 const _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p<_Key1, _Tp1, │ │ │ │ -2033 _Hash1, _Pred1, _Alloc1>&); │ │ │ │ -2034 }; │ │ │ │ -2035 │ │ │ │ -2036#if __cpp_deduction_guides >= 201606 │ │ │ │ -2037 │ │ │ │ -2038 template>, │ │ │ │ -2040 typename _Pred = equal_to<__iter_key_t<_InputIterator>>, │ │ │ │ -2041 typename _Allocator = allocator<__iter_to_alloc_t<_InputIterator>>, │ │ │ │ -2042 typename = _RequireInputIter<_InputIterator>, │ │ │ │ -2043 typename = _RequireNotAllocatorOrIntegral<_Hash>, │ │ │ │ -2044 typename = _RequireNotAllocator<_Pred>, │ │ │ │ -2045 typename = _RequireAllocator<_Allocator>> │ │ │ │ -2046 unordered_multimap(_InputIterator, _InputIterator, │ │ │ │ -2047 unordered_multimap::size_type = {}, │ │ │ │ -2048 _Hash = _Hash(), _Pred = _Pred(), │ │ │ │ -2049 _Allocator = _Allocator()) │ │ │ │ -2050 -> _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p<__iter_key_t<_InputIterator>, │ │ │ │ -2051 __iter_val_t<_InputIterator>, _Hash, _Pred, │ │ │ │ -2052 _Allocator>; │ │ │ │ -2053 │ │ │ │ -2054 template, │ │ │ │ -2055 typename _Pred = equal_to<_Key>, │ │ │ │ -2056 typename _Allocator = allocator>, │ │ │ │ -2057 typename = _RequireNotAllocatorOrIntegral<_Hash>, │ │ │ │ -2058 typename = _RequireNotAllocator<_Pred>, │ │ │ │ -2059 typename = _RequireAllocator<_Allocator>> │ │ │ │ -2060 _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<_p_a_i_r_<___K_e_y_,_ ___T_p_>>, │ │ │ │ -2061 _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 = {}, │ │ │ │ -2062 _Hash = _Hash(), _Pred = _Pred(), │ │ │ │ -2063 _Allocator = _Allocator()) │ │ │ │ -2064 -> _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_a_t_o_r_>; │ │ │ │ -2065 │ │ │ │ -2066 template, │ │ │ │ -2068 typename = _RequireAllocator<_Allocator>> │ │ │ │ -2069 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p(_InputIterator, _InputIterator, │ │ │ │ -2070 _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) │ │ │ │ -2071 -> _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_>, │ │ │ │ -2072 __iter_val_t<_InputIterator>, │ │ │ │ -2073 _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_>>, │ │ │ │ -2074 _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_>>, _Allocator>; │ │ │ │ -2075 │ │ │ │ -2076 template, │ │ │ │ -2078 typename = _RequireAllocator<_Allocator>> │ │ │ │ -2079 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p(_InputIterator, _InputIterator, _Allocator) │ │ │ │ -2080 -> _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_>, │ │ │ │ -2081 __iter_val_t<_InputIterator>, │ │ │ │ -2082 _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_>>, │ │ │ │ -2083 _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_>>, _Allocator>; │ │ │ │ -2084 │ │ │ │ -2085 template, │ │ │ │ -2087 typename = _RequireNotAllocatorOrIntegral<_Hash>, │ │ │ │ -2088 typename = _RequireAllocator<_Allocator>> │ │ │ │ -2089 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p(_InputIterator, _InputIterator, │ │ │ │ -2090 _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, │ │ │ │ -2091 _Allocator) │ │ │ │ -2092 -> _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_>, │ │ │ │ -2093 __iter_val_t<_InputIterator>, _Hash, │ │ │ │ -2094 _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_>>, _Allocator>; │ │ │ │ -2095 │ │ │ │ -2096 template> │ │ │ │ -2098 _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<_p_a_i_r_<___K_e_y_,_ ___T_p_>>, │ │ │ │ -2099 _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, │ │ │ │ -2100 _Allocator) │ │ │ │ -2101 -> _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_<___K_e_y_>, _e_q_u_a_l___t_o_<___K_e_y_>, _Allocator>; │ │ │ │ -2102 │ │ │ │ -2103 template> │ │ │ │ -2105 _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<_p_a_i_r_<___K_e_y_,_ ___T_p_>>, _Allocator) │ │ │ │ -2106 -> _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_<___K_e_y_>, _e_q_u_a_l___t_o_<___K_e_y_>, _Allocator>; │ │ │ │ -2107 │ │ │ │ -2108 template, │ │ │ │ -2110 typename = _RequireAllocator<_Allocator>> │ │ │ │ -2111 _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<_p_a_i_r_<___K_e_y_,_ ___T_p_>>, │ │ │ │ -2112 _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, │ │ │ │ -2113 _Hash, _Allocator) │ │ │ │ -2114 -> _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_,_ _e_q_u_a_l___t_o_<___K_e_y_>, _Allocator>; │ │ │ │ -2115 │ │ │ │ -2116#endif │ │ │ │ -2117 │ │ │ │ -2118 template │ │ │ │ -2119 inline void │ │ │ │ -2120 _s_w_a_p(_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_>& __x, │ │ │ │ -2121 _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_>& __y) │ │ │ │ -2122 noexcept(noexcept(__x.swap(__y))) │ │ │ │ -2123 { __x.swap(__y); } │ │ │ │ -2124 │ │ │ │ -2125 template │ │ │ │ -2126 inline void │ │ │ │ -2127 _s_w_a_p(_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_>& __x, │ │ │ │ -2128 _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_>& __y) │ │ │ │ -2129 noexcept(noexcept(__x.swap(__y))) │ │ │ │ -2130 { __x.swap(__y); } │ │ │ │ -2131 │ │ │ │ -2132 template │ │ │ │ -2133 inline bool │ │ │ │ -2134 operator==(const _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_>& __x, │ │ │ │ -2135 const _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_>& __y) │ │ │ │ -2136 { return __x._M_h._M_equal(__y._M_h); } │ │ │ │ -2137 │ │ │ │ -2138#if __cpp_impl_three_way_comparison < 201907L │ │ │ │ -2139 template │ │ │ │ -2140 inline bool │ │ │ │ -2141 operator!=(const _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_>& __x, │ │ │ │ -2142 const _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_>& __y) │ │ │ │ -2143 { return !(__x == __y); } │ │ │ │ -2144#endif │ │ │ │ -2145 │ │ │ │ -2146 template │ │ │ │ -2147 inline bool │ │ │ │ -2148 operator==(const _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_>& __x, │ │ │ │ -2149 const _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_>& __y) │ │ │ │ -2150 { return __x._M_h._M_equal(__y._M_h); } │ │ │ │ -2151 │ │ │ │ -2152#if __cpp_impl_three_way_comparison < 201907L │ │ │ │ -2153 template │ │ │ │ -2154 inline bool │ │ │ │ -2155 operator!=(const _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_>& __x, │ │ │ │ -2156 const _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_>& __y) │ │ │ │ -2157 { return !(__x == __y); } │ │ │ │ -2158#endif │ │ │ │ -2159 │ │ │ │ -2160_GLIBCXX_END_NAMESPACE_CONTAINER │ │ │ │ -2161 │ │ │ │ -2162#if __cplusplus > 201402L │ │ │ │ -2163 // Allow std::unordered_map access to internals of compatible maps. │ │ │ │ -2164 template │ │ │ │ -2166 struct _Hash_merge_helper< │ │ │ │ -2167 _GLIBCXX_STD_C::_u_n_o_r_d_e_r_e_d___m_a_p<_Key, _Val, _Hash1, _Eq1, _Alloc>, │ │ │ │ -2168 _Hash2, _Eq2> │ │ │ │ -2169 { │ │ │ │ -2170 private: │ │ │ │ -2171 template │ │ │ │ -2172 using unordered_map = _GLIBCXX_STD_C::unordered_map<_Tp...>; │ │ │ │ -2173 template │ │ │ │ -2174 using unordered_multimap = _GLIBCXX_STD_C::unordered_multimap<_Tp...>; │ │ │ │ -2175 │ │ │ │ -2176 friend unordered_map<_Key, _Val, _Hash1, _Eq1, _Alloc>; │ │ │ │ -2177 │ │ │ │ -2178 static auto& │ │ │ │ -2179 _S_get_table(unordered_map<_Key, _Val, _Hash2, _Eq2, _Alloc>& __map) │ │ │ │ -2180 { return __map._M_h; } │ │ │ │ -2181 │ │ │ │ -2182 static auto& │ │ │ │ -2183 _S_get_table(unordered_multimap<_Key, _Val, _Hash2, _Eq2, _Alloc>& __map) │ │ │ │ -2184 { return __map._M_h; } │ │ │ │ -2185 }; │ │ │ │ -2186 │ │ │ │ -2187 // Allow std::unordered_multimap access to internals of compatible maps. │ │ │ │ -2188 template │ │ │ │ -2190 struct _Hash_merge_helper< │ │ │ │ -2191 _GLIBCXX_STD_C::_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p<_Key, _Val, _Hash1, _Eq1, _Alloc>, │ │ │ │ -2192 _Hash2, _Eq2> │ │ │ │ -2193 { │ │ │ │ -2194 private: │ │ │ │ -2195 template │ │ │ │ -2196 using unordered_map = _GLIBCXX_STD_C::unordered_map<_Tp...>; │ │ │ │ -2197 template │ │ │ │ -2198 using unordered_multimap = _GLIBCXX_STD_C::unordered_multimap<_Tp...>; │ │ │ │ -2199 │ │ │ │ -2200 friend unordered_multimap<_Key, _Val, _Hash1, _Eq1, _Alloc>; │ │ │ │ -2201 │ │ │ │ -2202 static auto& │ │ │ │ -2203 _S_get_table(unordered_map<_Key, _Val, _Hash2, _Eq2, _Alloc>& __map) │ │ │ │ -2204 { return __map._M_h; } │ │ │ │ -2205 │ │ │ │ -2206 static auto& │ │ │ │ -2207 _S_get_table(unordered_multimap<_Key, _Val, _Hash2, _Eq2, _Alloc>& __map) │ │ │ │ -2208 { return __map._M_h; } │ │ │ │ -2209 }; │ │ │ │ -2210#endif // C++17 │ │ │ │ -2211 │ │ │ │ -2212_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ -2213} // namespace std │ │ │ │ -2214 │ │ │ │ -2215#endif /* _UNORDERED_MAP_H */ │ │ │ │ +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_8 │ │ │ │ -_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_:_:_h_a_s___f_a_c_e_t │ │ │ │ +bool has_facet(const locale &__loc) │ │ │ │ +Test for the presence of a facet. │ │ │ │ +DDeeffiinniittiioonn _l_o_c_a_l_e___c_l_a_s_s_e_s_._t_c_c_:_1_0_4 │ │ │ │ +_s_t_d_:_:_u_s_e___f_a_c_e_t │ │ │ │ +const _Facet & use_facet(const locale &__loc) │ │ │ │ +Return a facet. │ │ │ │ +DDeeffiinniittiioonn _l_o_c_a_l_e___c_l_a_s_s_e_s_._t_c_c_:_1_3_2 │ │ │ │ _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_n_i_t_i_a_l_i_z_e_r___l_i_s_t │ │ │ │ -initializer_list │ │ │ │ -DDeeffiinniittiioonn _i_n_i_t_i_a_l_i_z_e_r___l_i_s_t_:_4_8 │ │ │ │ -_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_:_:_s_i_z_e___t_y_p_e │ │ │ │ -_s_t_d_:_:_a_l_l_o_c_a_t_o_r │ │ │ │ -The standard allocator, as per C++03 [20.4.1]. │ │ │ │ -DDeeffiinniittiioonn _a_l_l_o_c_a_t_o_r_._h_:_1_2_5 │ │ │ │ -_s_t_d_:_:_e_q_u_a_l___t_o │ │ │ │ -One of the comparison functors. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___f_u_n_c_t_i_o_n_._h_:_3_6_6 │ │ │ │ -_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_:_:_p_a_i_r │ │ │ │ -Struct holding two objects of arbitrary type. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___p_a_i_r_._h_:_2_1_3 │ │ │ │ -_s_t_d_:_:_p_a_i_r_:_:_f_i_r_s_t │ │ │ │ -_T1 first │ │ │ │ -The first member. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___p_a_i_r_._h_:_2_1_7 │ │ │ │ -_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_4_6 │ │ │ │ -_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_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_,_ ___T_p_,_ ___H_a_s_h_,_ ___P_r_e_d_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ _p_a_i_r_< │ │ │ │ -_c_o_n_s_t_ ___K_e_y_,_ ___T_p_ _>_ _>_ _>_:_:_r_e_f_e_r_e_n_c_e │ │ │ │ -_Hashtable::reference reference │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_6_6 │ │ │ │ -_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_8_6 │ │ │ │ -_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_4_9_8 │ │ │ │ -_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_2 │ │ │ │ -_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_7_8 │ │ │ │ -_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_0_6 │ │ │ │ -_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_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ _p_a_i_r_< │ │ │ │ -_c_o_n_s_t_ ___K_e_y_,_ ___T_p_ _>_ _>_ _>_:_:_i_t_e_r_a_t_o_r │ │ │ │ -_Hashtable::iterator iterator │ │ │ │ -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_:_:_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_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 │ │ │ │ -iterator begin() noexcept │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_4_6_7 │ │ │ │ -_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_7_6 │ │ │ │ -_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_8_7 │ │ │ │ -_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_2 │ │ │ │ -_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_1 │ │ │ │ -_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_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 │ │ │ │ -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_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 │ │ │ │ -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_2 │ │ │ │ -_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_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ _p_a_i_r_< │ │ │ │ -_c_o_n_s_t_ ___K_e_y_,_ ___T_p_ _>_ _>_ _>_:_:_m_a_p_p_e_d___t_y_p_e │ │ │ │ -_Hashtable::mapped_type mapped_type │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_5_6 │ │ │ │ -_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_5 │ │ │ │ -_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_2_6 │ │ │ │ -_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_2 │ │ │ │ -_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_3 │ │ │ │ -_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_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ _p_a_i_r_< │ │ │ │ -_c_o_n_s_t_ ___K_e_y_,_ ___T_p_ _>_ _>_ _>_:_:_v_a_l_u_e___t_y_p_e │ │ │ │ -_Hashtable::value_type value_type │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_5_5 │ │ │ │ -_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_5 │ │ │ │ -_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_2 │ │ │ │ -_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_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ _p_a_i_r_< │ │ │ │ -_c_o_n_s_t_ ___K_e_y_,_ ___T_p_ _>_ _>_ _>_:_:_c_o_n_s_t___r_e_f_e_r_e_n_c_e │ │ │ │ -_Hashtable::const_reference const_reference │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_6_7 │ │ │ │ -_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_5_7 │ │ │ │ -_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_1 │ │ │ │ -_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_8_9 │ │ │ │ -_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_3_9 │ │ │ │ -_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_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()=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_0 │ │ │ │ -_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_6_6 │ │ │ │ -_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_<_ ___K_e_y_,_ ___T_p_,_ ___H_a_s_h_,_ ___P_r_e_d_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ _p_a_i_r_< │ │ │ │ -_c_o_n_s_t_ ___K_e_y_,_ ___T_p_ _>_ _>_ _>_:_:_h_a_s_h_e_r │ │ │ │ -_Hashtable::hasher hasher │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_5_7 │ │ │ │ -_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_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ _p_a_i_r_< │ │ │ │ -_c_o_n_s_t_ ___K_e_y_,_ ___T_p_ _>_ _>_ _>_:_:_l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_Hashtable::local_iterator local_iterator │ │ │ │ -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_:_:_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_4 │ │ │ │ -_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_0 │ │ │ │ -_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_4 │ │ │ │ -_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_1 │ │ │ │ -_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_1 │ │ │ │ -_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_6_9 │ │ │ │ -_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_1 │ │ │ │ -_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_7_6 │ │ │ │ -_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_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ _p_a_i_r_< │ │ │ │ -_c_o_n_s_t_ ___K_e_y_,_ ___T_p_ _>_ _>_ _>_:_:_p_o_i_n_t_e_r │ │ │ │ -_Hashtable::pointer pointer │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_6_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_p_,_ ___H_a_s_h_,_ ___P_r_e_d_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ _p_a_i_r_< │ │ │ │ -_c_o_n_s_t_ ___K_e_y_,_ ___T_p_ _>_ _>_ _>_:_:_a_l_l_o_c_a_t_o_r___t_y_p_e │ │ │ │ -_Hashtable::allocator_type allocator_type │ │ │ │ -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_:_:_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_0 │ │ │ │ -_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_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ _p_a_i_r_< │ │ │ │ -_c_o_n_s_t_ ___K_e_y_,_ ___T_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 │ │ │ │ -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_:_:_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_3 │ │ │ │ -_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_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ _p_a_i_r_< │ │ │ │ -_c_o_n_s_t_ ___K_e_y_,_ ___T_p_ _>_ _>_ _>_:_:_d_i_f_f_e_r_e_n_c_e___t_y_p_e │ │ │ │ -_Hashtable::difference_type difference_type │ │ │ │ -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_<_ ___K_e_y_,_ ___T_p_,_ ___H_a_s_h_,_ ___P_r_e_d_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ _p_a_i_r_< │ │ │ │ -_c_o_n_s_t_ ___K_e_y_,_ ___T_p_ _>_ _>_ _>_:_:_s_i_z_e___t_y_p_e │ │ │ │ -_Hashtable::size_type size_type │ │ │ │ -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_<_ ___K_e_y_,_ ___T_p_,_ ___H_a_s_h_,_ ___P_r_e_d_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ _p_a_i_r_< │ │ │ │ -_c_o_n_s_t_ ___K_e_y_,_ ___T_p_ _>_ _>_ _>_:_:_c_o_n_s_t___p_o_i_n_t_e_r │ │ │ │ -_Hashtable::const_pointer const_pointer │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_6_5 │ │ │ │ -_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_5 │ │ │ │ -_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_5 │ │ │ │ -_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_3 │ │ │ │ -_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_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ _p_a_i_r_< │ │ │ │ -_c_o_n_s_t_ ___K_e_y_,_ ___T_p_ _>_ _>_ _>_:_:_c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ -_Hashtable::const_iterator const_iterator │ │ │ │ -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 │ │ │ │ -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_3_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_iterator cend() 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_:_:_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_5_7 │ │ │ │ -_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_4 │ │ │ │ -_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_4_7 │ │ │ │ -_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_0 │ │ │ │ -_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_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ _p_a_i_r_< │ │ │ │ -_c_o_n_s_t_ ___K_e_y_,_ ___T_p_ _>_ _>_ _>_:_:_k_e_y___t_y_p_e │ │ │ │ -_Hashtable::key_type key_type │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_5_4 │ │ │ │ -_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_4 │ │ │ │ -_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_0 │ │ │ │ -_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_0 │ │ │ │ -_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_2 │ │ │ │ -_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_2 │ │ │ │ -_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_0_6 │ │ │ │ -_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_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ _p_a_i_r_< │ │ │ │ -_c_o_n_s_t_ ___K_e_y_,_ ___T_p_ _>_ _>_ _>_:_:_k_e_y___e_q_u_a_l │ │ │ │ -_Hashtable::key_equal key_equal │ │ │ │ -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_:_:_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_0 │ │ │ │ -_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_2 │ │ │ │ -_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_3 │ │ │ │ -_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_6 │ │ │ │ -_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_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ _p_a_i_r_<_ _c_o_n_s_t │ │ │ │ -___K_e_y_,_ ___T_p_ _>_ _>_ _>_:_:_i_t_e_r_a_t_o_r │ │ │ │ -_Hashtable::iterator iterator │ │ │ │ -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_:_:_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_4 │ │ │ │ -_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_0 │ │ │ │ -_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_3 │ │ │ │ -_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_6 │ │ │ │ -_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_:_2_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=(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_0 │ │ │ │ -_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_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ _p_a_i_r_<_ _c_o_n_s_t │ │ │ │ -___K_e_y_,_ ___T_p_ _>_ _>_ _>_:_:_c_o_n_s_t___p_o_i_n_t_e_r │ │ │ │ -_Hashtable::const_pointer const_pointer │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_2 │ │ │ │ -_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_7 │ │ │ │ -_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_1 │ │ │ │ -_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_1 │ │ │ │ -_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_6 │ │ │ │ -_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_0 │ │ │ │ -_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_5 │ │ │ │ -_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_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(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_1 │ │ │ │ -_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_6 │ │ │ │ -_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_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 │ │ │ │ -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_3 │ │ │ │ -_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_3 │ │ │ │ -_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_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ _p_a_i_r_<_ _c_o_n_s_t │ │ │ │ -___K_e_y_,_ ___T_p_ _>_ _>_ _>_:_:_r_e_f_e_r_e_n_c_e │ │ │ │ -_Hashtable::reference reference │ │ │ │ -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 │ │ │ │ -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_0 │ │ │ │ -_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_7 │ │ │ │ -_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_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ _p_a_i_r_<_ _c_o_n_s_t │ │ │ │ -___K_e_y_,_ ___T_p_ _>_ _>_ _>_:_:_a_l_l_o_c_a_t_o_r___t_y_p_e │ │ │ │ -_Hashtable::allocator_type allocator_type │ │ │ │ -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_:_:_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_1 │ │ │ │ -_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_5 │ │ │ │ -_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_2 │ │ │ │ -_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_7_9 │ │ │ │ -_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_7_8 │ │ │ │ -_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_5 │ │ │ │ -_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_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()=default │ │ │ │ -Default constructor. │ │ │ │ -_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_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ _p_a_i_r_<_ _c_o_n_s_t │ │ │ │ -___K_e_y_,_ ___T_p_ _>_ _>_ _>_:_:_m_a_p_p_e_d___t_y_p_e │ │ │ │ -_Hashtable::mapped_type mapped_type │ │ │ │ -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_:_:_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_2 │ │ │ │ -_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_1 │ │ │ │ -_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_8_8 │ │ │ │ -_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_2 │ │ │ │ -_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_0 │ │ │ │ -_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_3 │ │ │ │ -_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_3 │ │ │ │ -_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_7 │ │ │ │ -_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_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ _p_a_i_r_<_ _c_o_n_s_t │ │ │ │ -___K_e_y_,_ ___T_p_ _>_ _>_ _>_:_:_h_a_s_h_e_r │ │ │ │ -_Hashtable::hasher hasher │ │ │ │ -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_:_:_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_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(_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_2 │ │ │ │ -_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_0 │ │ │ │ -_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_7_9 │ │ │ │ -_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_1 │ │ │ │ -_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_4 │ │ │ │ -_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_0 │ │ │ │ -_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_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ _p_a_i_r_<_ _c_o_n_s_t │ │ │ │ -___K_e_y_,_ ___T_p_ _>_ _>_ _>_:_:_c_o_n_s_t___r_e_f_e_r_e_n_c_e │ │ │ │ -_Hashtable::const_reference const_reference │ │ │ │ -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_<_ ___K_e_y_,_ ___T_p_,_ ___H_a_s_h_,_ ___P_r_e_d_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ _p_a_i_r_<_ _c_o_n_s_t │ │ │ │ -___K_e_y_,_ ___T_p_ _>_ _>_ _>_:_:_k_e_y___e_q_u_a_l │ │ │ │ -_Hashtable::key_equal key_equal │ │ │ │ -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_<_ ___K_e_y_,_ ___T_p_,_ ___H_a_s_h_,_ ___P_r_e_d_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ _p_a_i_r_<_ _c_o_n_s_t │ │ │ │ -___K_e_y_,_ ___T_p_ _>_ _>_ _>_:_:_l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_Hashtable::local_iterator local_iterator │ │ │ │ -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_:_:_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_5 │ │ │ │ -_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_0 │ │ │ │ -_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_7 │ │ │ │ -_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_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ _p_a_i_r_<_ _c_o_n_s_t │ │ │ │ -___K_e_y_,_ ___T_p_ _>_ _>_ _>_:_:_p_o_i_n_t_e_r │ │ │ │ -_Hashtable::pointer pointer │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_1 │ │ │ │ -_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_3 │ │ │ │ -_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_1 │ │ │ │ -_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_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ _p_a_i_r_<_ _c_o_n_s_t │ │ │ │ -___K_e_y_,_ ___T_p_ _>_ _>_ _>_:_:_k_e_y___t_y_p_e │ │ │ │ -_Hashtable::key_type key_type │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_1_1 │ │ │ │ -_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_0_8 │ │ │ │ -_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_5 │ │ │ │ -_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_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(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_7 │ │ │ │ -_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_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ _p_a_i_r_<_ _c_o_n_s_t │ │ │ │ -___K_e_y_,_ ___T_p_ _>_ _>_ _>_:_:_c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ -_Hashtable::const_iterator const_iterator │ │ │ │ -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_,_ ___T_p_,_ ___H_a_s_h_,_ ___P_r_e_d_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ _p_a_i_r_<_ _c_o_n_s_t │ │ │ │ -___K_e_y_,_ ___T_p_ _>_ _>_ _>_:_:_s_i_z_e___t_y_p_e │ │ │ │ -_Hashtable::size_type size_type │ │ │ │ -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_:_:_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_6_8 │ │ │ │ -_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_0 │ │ │ │ -_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_0 │ │ │ │ -_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_4 │ │ │ │ -_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_1 │ │ │ │ -_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_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=(const unordered_map &)=default │ │ │ │ -Copy assignment operator. │ │ │ │ -_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_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ _p_a_i_r_<_ _c_o_n_s_t │ │ │ │ -___K_e_y_,_ ___T_p_ _>_ _>_ _>_:_:_d_i_f_f_e_r_e_n_c_e___t_y_p_e │ │ │ │ -_Hashtable::difference_type difference_type │ │ │ │ -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_<_ ___K_e_y_,_ ___T_p_,_ ___H_a_s_h_,_ ___P_r_e_d_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ _p_a_i_r_<_ _c_o_n_s_t │ │ │ │ -___K_e_y_,_ ___T_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 │ │ │ │ -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_:_:_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_3 │ │ │ │ -_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_1_9 │ │ │ │ -_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_3_8 │ │ │ │ -_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_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ _p_a_i_r_<_ _c_o_n_s_t │ │ │ │ -___K_e_y_,_ ___T_p_ _>_ _>_ _>_:_:_v_a_l_u_e___t_y_p_e │ │ │ │ -_Hashtable::value_type value_type │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_1_2 │ │ │ │ -_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_5 │ │ │ │ -_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_3_8 │ │ │ │ +_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_:_9_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_:_:___M___p_b_a_c_k │ │ │ │ +char_type _M_pback │ │ │ │ +DDeeffiinniittiioonn _f_s_t_r_e_a_m_:_1_6_9 │ │ │ │ +_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_:_:___M___m_o_d_e │ │ │ │ +ios_base::openmode _M_mode │ │ │ │ +Place to stash in || out || in | out settings for current filebuf. │ │ │ │ +DDeeffiinniittiioonn _f_s_t_r_e_a_m_:_1_2_6 │ │ │ │ +_s_t_d_:_:_b_a_s_i_c___f_i_l_e_b_u_f_:_:___M___e_x_t___b_u_f___s_i_z_e │ │ │ │ +streamsize _M_ext_buf_size │ │ │ │ +DDeeffiinniittiioonn _f_s_t_r_e_a_m_:_1_8_8 │ │ │ │ +_s_t_d_:_:_b_a_s_i_c___f_i_l_e_b_u_f_:_:___M___p_b_a_c_k___c_u_r___s_a_v_e │ │ │ │ +char_type * _M_pback_cur_save │ │ │ │ +DDeeffiinniittiioonn _f_s_t_r_e_a_m_:_1_7_0 │ │ │ │ +_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_:_:_i_s___o_p_e_n │ │ │ │ +bool is_open() const │ │ │ │ +Returns true if the external file is open. │ │ │ │ +DDeeffiinniittiioonn _f_s_t_r_e_a_m_:_2_7_0 │ │ │ │ +_s_t_d_:_:_b_a_s_i_c___f_i_l_e_b_u_f_:_:___M___b_u_f___s_i_z_e │ │ │ │ +size_t _M_buf_size │ │ │ │ +DDeeffiinniittiioonn _f_s_t_r_e_a_m_:_1_4_8 │ │ │ │ +_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_:_:___M___p_b_a_c_k___e_n_d___s_a_v_e │ │ │ │ +char_type * _M_pback_end_save │ │ │ │ +DDeeffiinniittiioonn _f_s_t_r_e_a_m_:_1_7_1 │ │ │ │ +_s_t_d_:_:_b_a_s_i_c___f_i_l_e_b_u_f_:_:___M___e_x_t___b_u_f │ │ │ │ +char * _M_ext_buf │ │ │ │ +DDeeffiinniittiioonn _f_s_t_r_e_a_m_:_1_8_3 │ │ │ │ +_s_t_d_:_:_b_a_s_i_c___f_i_l_e_b_u_f_:_:___M___d_e_s_t_r_o_y___p_b_a_c_k │ │ │ │ +void _M_destroy_pback() │ │ │ │ +DDeeffiinniittiioonn _f_s_t_r_e_a_m_:_2_2_1 │ │ │ │ +_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_:_:___M___b_u_f │ │ │ │ +char_type * _M_buf │ │ │ │ +Pointer to the beginning of internal buffer. │ │ │ │ +DDeeffiinniittiioonn _f_s_t_r_e_a_m_:_1_4_1 │ │ │ │ +_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_:_:___M___p_b_a_c_k___i_n_i_t │ │ │ │ +bool _M_pback_init │ │ │ │ +DDeeffiinniittiioonn _f_s_t_r_e_a_m_:_1_7_2 │ │ │ │ +_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_:_:___M___c_r_e_a_t_e___p_b_a_c_k │ │ │ │ +void _M_create_pback() │ │ │ │ +DDeeffiinniittiioonn _f_s_t_r_e_a_m_:_2_0_4 │ │ │ │ +_s_t_d_:_:_b_a_s_i_c___f_i_l_e_b_u_f_:_:___M___r_e_a_d_i_n_g │ │ │ │ +bool _M_reading │ │ │ │ +DDeeffiinniittiioonn _f_s_t_r_e_a_m_:_1_6_0 │ │ │ │ +_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_:_:___M___s_e_t___b_u_f_f_e_r │ │ │ │ +void _M_set_buffer(streamsize __off) │ │ │ │ +DDeeffiinniittiioonn _f_s_t_r_e_a_m_:_4_6_4 │ │ │ │ +_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_:_:___M___e_x_t___n_e_x_t │ │ │ │ +const char * _M_ext_next │ │ │ │ +DDeeffiinniittiioonn _f_s_t_r_e_a_m_:_1_9_5 │ │ │ │ +_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___i_f_s_t_r_e_a_m │ │ │ │ +Controlling input for files. │ │ │ │ +DDeeffiinniittiioonn _f_s_t_r_e_a_m_:_4_9_8 │ │ │ │ +_s_t_d_:_:_b_a_s_i_c___o_f_s_t_r_e_a_m │ │ │ │ +Controlling output for files. │ │ │ │ +DDeeffiinniittiioonn _f_s_t_r_e_a_m_:_7_5_9 │ │ │ │ +_s_t_d_:_:_b_a_s_i_c___f_s_t_r_e_a_m │ │ │ │ +Controlling input and output for files. │ │ │ │ +DDeeffiinniittiioonn _f_s_t_r_e_a_m_:_1_0_2_2 │ │ │ │ +_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_:_:_e_p_p_t_r │ │ │ │ +char_type * epptr() const │ │ │ │ +Access to the put area. │ │ │ │ +DDeeffiinniittiioonn _s_t_r_e_a_m_b_u_f_:_5_4_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_,_ _t_r_a_i_t_s___t_y_p_e_ _>_:_:_x_s_p_u_t_n │ │ │ │ +virtual streamsize xsputn(const char_type *__s, streamsize __n) │ │ │ │ +_s_t_d_:_:_b_a_s_i_c___s_t_r_e_a_m_b_u_f_:_:_p_p_t_r │ │ │ │ +char_type * pptr() const │ │ │ │ +Access to the put area. │ │ │ │ +DDeeffiinniittiioonn _s_t_r_e_a_m_b_u_f_:_5_3_7 │ │ │ │ +_s_t_d_:_:_b_a_s_i_c___s_t_r_e_a_m_b_u_f_:_:_s_e_t_g │ │ │ │ +void setg(char_type *__gbeg, char_type *__gnext, char_type *__gend) │ │ │ │ +Setting the three read area pointers. │ │ │ │ +DDeeffiinniittiioonn _s_t_r_e_a_m_b_u_f_:_5_1_4 │ │ │ │ +_s_t_d_:_:_b_a_s_i_c___s_t_r_e_a_m_b_u_f_:_:_e_b_a_c_k │ │ │ │ +char_type * eback() const │ │ │ │ +Access to the get area. │ │ │ │ +DDeeffiinniittiioonn _s_t_r_e_a_m_b_u_f_:_4_8_7 │ │ │ │ +_s_t_d_:_:_b_a_s_i_c___s_t_r_e_a_m_b_u_f_:_:_e_g_p_t_r │ │ │ │ +char_type * egptr() const │ │ │ │ +Access to the get area. │ │ │ │ +DDeeffiinniittiioonn _s_t_r_e_a_m_b_u_f_:_4_9_3 │ │ │ │ +_s_t_d_:_:_b_a_s_i_c___s_t_r_e_a_m_b_u_f_:_:_g_p_t_r │ │ │ │ +char_type * gptr() const │ │ │ │ +Access to the get area. │ │ │ │ +DDeeffiinniittiioonn _s_t_r_e_a_m_b_u_f_:_4_9_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_,_ _t_r_a_i_t_s___t_y_p_e_ _>_:_:_x_s_g_e_t_n │ │ │ │ +virtual streamsize xsgetn(char_type *__s, streamsize __n) │ │ │ │ +_s_t_d_:_:_b_a_s_i_c___s_t_r_e_a_m_b_u_f_:_:_g_b_u_m_p │ │ │ │ +void gbump(int __n) │ │ │ │ +Moving the read position. │ │ │ │ +DDeeffiinniittiioonn _s_t_r_e_a_m_b_u_f_:_5_0_3 │ │ │ │ +_s_t_d_:_:_b_a_s_i_c___s_t_r_e_a_m_b_u_f_:_:_p_b_u_m_p │ │ │ │ +void pbump(int __n) │ │ │ │ +Moving the write position. │ │ │ │ +DDeeffiinniittiioonn _s_t_r_e_a_m_b_u_f_:_5_5_0 │ │ │ │ +_s_t_d_:_:_b_a_s_i_c___s_t_r_e_a_m_b_u_f_:_:_p_b_a_s_e │ │ │ │ +char_type * pbase() const │ │ │ │ +Access to the put area. │ │ │ │ +DDeeffiinniittiioonn _s_t_r_e_a_m_b_u_f_:_5_3_4 │ │ │ │ +_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_:_:_p_o_s___t_y_p_e │ │ │ │ +_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_2_9 │ │ │ │ +_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_8_5 │ │ │ │ +_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_8_2 │ │ │ │ +_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_:_4_8_8 │ │ │ │ +_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_1 │ │ │ │ +_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_4 │ │ │ │ +_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_5_8 │ │ │ │ +_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_4_7 │ │ │ │ +_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_0 │ │ │ │ +_s_t_d_:_:_i_o_s___b_a_s_e_:_:_s_e_e_k_d_i_r │ │ │ │ +_Ios_Seekdir seekdir │ │ │ │ +This is an enumerated type. │ │ │ │ +DDeeffiinniittiioonn _i_o_s___b_a_s_e_._h_:_4_7_9 │ │ │ │ +_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_3 │ │ │ │ +_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 │ │ │ │ * bbiittss │ │ │ │ - * _u_n_o_r_d_e_r_e_d___m_a_p_._h │ │ │ │ + * _f_s_t_r_e_a_m_._t_c_c │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.15.0 │ │ ├── ./usr/share/doc/gcc-11-base/libstdc++/user/a00371.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: unique_ptr.h File Reference │ │ │ +libstdc++: atomic_lockfree_defines.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -48,54 +48,49 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
unique_ptr.h File Reference
│ │ │ +
atomic_lockfree_defines.h 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
#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 <memory>.

│ │ │ +

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_ptr.h.

│ │ │ +

Definition in file atomic_lockfree_defines.h.

│ │ │
│ │ │
│ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,21 +1,21 @@ │ │ │ │ libstdc++ │ │ │ │ -unique_ptr.h File Reference │ │ │ │ +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 │ │ │ │ -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 │ │ │ │ +#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 │ │ │ │ +#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___p_t_r_._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. │ │ │ │ * bbiittss │ │ │ │ - * _u_n_i_q_u_e___p_t_r_._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.15.0 │ │ ├── ./usr/share/doc/gcc-11-base/libstdc++/user/a00371.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,3 +1,3 @@ │ │ │ │ var a00371 = [ │ │ │ │ - ["__cpp_lib_make_unique", "a01557.html#ga535c3432b51655f9828df78d38812206", null] │ │ │ │ + ["ATOMIC_BOOL_LOCK_FREE", "a01572.html#ga804f4cd80492d5bc779ef06aa8d77198", null] │ │ │ │ ]; │ │ ├── ./usr/share/doc/gcc-11-base/libstdc++/user/a00371_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: unique_ptr.h Source File │ │ │ +libstdc++: atomic_lockfree_defines.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -48,18 +48,18 @@ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
unique_ptr.h
│ │ │ +
atomic_lockfree_defines.h
│ │ │
│ │ │
│ │ │ -Go to the documentation of this file.
1// unique_ptr implementation -*- C++ -*-
│ │ │ +Go to the documentation of this file.
1// -*- C++ -*- header.
│ │ │
2
│ │ │
3// Copyright (C) 2008-2021 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)
│ │ │ @@ -75,1227 +75,61 @@ │ │ │
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/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{memory}
│ │ │ +
27 * Do not attempt to use it directly. @headername{atomic}
│ │ │
28 */
│ │ │
29
│ │ │ -
30#ifndef _UNIQUE_PTR_H
│ │ │ -
31#define _UNIQUE_PTR_H 1
│ │ │ +
30#ifndef _GLIBCXX_ATOMIC_LOCK_FREE_H
│ │ │ +
31#define _GLIBCXX_ATOMIC_LOCK_FREE_H 1
│ │ │
32
│ │ │ -
33#include <bits/c++config.h>
│ │ │ -
34#include <debug/assertions.h>
│ │ │ -
35#include <type_traits>
│ │ │ -
36#include <utility>
│ │ │ -
37#include <tuple>
│ │ │ -
38#include <bits/stl_function.h>
│ │ │ - │ │ │ -
40#if __cplusplus > 201703L
│ │ │ -
41# include <compare>
│ │ │ -
42# include <ostream>
│ │ │ -
43#endif
│ │ │ -
44
│ │ │ -
45namespace std _GLIBCXX_VISIBILITY(default)
│ │ │ -
46{
│ │ │ -
47_GLIBCXX_BEGIN_NAMESPACE_VERSION
│ │ │ -
48
│ │ │ -
49 /**
│ │ │ -
50 * @addtogroup pointer_abstractions
│ │ │ -
51 * @{
│ │ │ -
52 */
│ │ │ -
53
│ │ │ -
54#if _GLIBCXX_USE_DEPRECATED
│ │ │ -
55#pragma GCC diagnostic push
│ │ │ -
56#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
│ │ │ -
57 template<typename> class auto_ptr;
│ │ │ -
58#pragma GCC diagnostic pop
│ │ │ -
59#endif
│ │ │ -
60
│ │ │ -
61 /// Primary template of default_delete, used by unique_ptr for single objects
│ │ │ -
62 template<typename _Tp>
│ │ │ -
│ │ │ - │ │ │ -
64 {
│ │ │ -
65 /// Default constructor
│ │ │ -
66 constexpr default_delete() noexcept = default;
│ │ │ -
67
│ │ │ -
68 /** @brief Converting constructor.
│ │ │ -
69 *
│ │ │ -
70 * Allows conversion from a deleter for objects of another type, `_Up`,
│ │ │ -
71 * only if `_Up*` is convertible to `_Tp*`.
│ │ │ -
72 */
│ │ │ -
73 template<typename _Up,
│ │ │ -
74 typename = _Require<is_convertible<_Up*, _Tp*>>>
│ │ │ -
75 default_delete(const default_delete<_Up>&) noexcept { }
│ │ │ -
76
│ │ │ -
77 /// Calls `delete __ptr`
│ │ │ -
78 void
│ │ │ -
│ │ │ -
79 operator()(_Tp* __ptr) const
│ │ │ -
80 {
│ │ │ -
81 static_assert(!is_void<_Tp>::value,
│ │ │ -
82 "can't delete pointer to incomplete type");
│ │ │ -
83 static_assert(sizeof(_Tp)>0,
│ │ │ -
84 "can't delete pointer to incomplete type");
│ │ │ -
85 delete __ptr;
│ │ │ -
86 }
│ │ │ -
│ │ │ -
87 };
│ │ │ -
│ │ │ -
88
│ │ │ -
89 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ -
90 // DR 740 - omit specialization for array objects with a compile time length
│ │ │ -
91
│ │ │ -
92 /// Specialization of default_delete for arrays, used by `unique_ptr<T[]>`
│ │ │ -
93 template<typename _Tp>
│ │ │ -
│ │ │ -
94 struct default_delete<_Tp[]>
│ │ │ -
95 {
│ │ │ -
96 public:
│ │ │ -
97 /// Default constructor
│ │ │ -
98 constexpr default_delete() noexcept = default;
│ │ │ -
99
│ │ │ -
100 /** @brief Converting constructor.
│ │ │ -
101 *
│ │ │ -
102 * Allows conversion from a deleter for arrays of another type, such as
│ │ │ -
103 * a const-qualified version of `_Tp`.
│ │ │ -
104 *
│ │ │ -
105 * Conversions from types derived from `_Tp` are not allowed because
│ │ │ -
106 * it is undefined to `delete[]` an array of derived types through a
│ │ │ -
107 * pointer to the base type.
│ │ │ -
108 */
│ │ │ -
109 template<typename _Up,
│ │ │ -
110 typename = _Require<is_convertible<_Up(*)[], _Tp(*)[]>>>
│ │ │ -
111 default_delete(const default_delete<_Up[]>&) noexcept { }
│ │ │ -
112
│ │ │ -
113 /// Calls `delete[] __ptr`
│ │ │ -
114 template<typename _Up>
│ │ │ -
115 typename enable_if<is_convertible<_Up(*)[], _Tp(*)[]>::value>::type
│ │ │ -
│ │ │ -
116 operator()(_Up* __ptr) const
│ │ │ -
117 {
│ │ │ -
118 static_assert(sizeof(_Tp)>0,
│ │ │ -
119 "can't delete pointer to incomplete type");
│ │ │ -
120 delete [] __ptr;
│ │ │ -
121 }
│ │ │ -
│ │ │ -
122 };
│ │ │ -
│ │ │ -
123
│ │ │ -
124 /// @cond undocumented
│ │ │ -
125
│ │ │ -
126 // Manages the pointer and deleter of a unique_ptr
│ │ │ -
127 template <typename _Tp, typename _Dp>
│ │ │ -
128 class __uniq_ptr_impl
│ │ │ -
129 {
│ │ │ -
130 template <typename _Up, typename _Ep, typename = void>
│ │ │ -
131 struct _Ptr
│ │ │ -
132 {
│ │ │ -
133 using type = _Up*;
│ │ │ -
134 };
│ │ │ -
135
│ │ │ -
136 template <typename _Up, typename _Ep>
│ │ │ -
137 struct
│ │ │ -
138 _Ptr<_Up, _Ep, __void_t<typename remove_reference<_Ep>::type::pointer>>
│ │ │ -
139 {
│ │ │ -
140 using type = typename remove_reference<_Ep>::type::pointer;
│ │ │ -
141 };
│ │ │ -
142
│ │ │ -
143 public:
│ │ │ -
144 using _DeleterConstraint = enable_if<
│ │ │ -
145 __and_<__not_<is_pointer<_Dp>>,
│ │ │ -
146 is_default_constructible<_Dp>>::value>;
│ │ │ -
147
│ │ │ -
148 using pointer = typename _Ptr<_Tp, _Dp>::type;
│ │ │ -
149
│ │ │ -
150 static_assert( !is_rvalue_reference<_Dp>::value,
│ │ │ -
151 "unique_ptr's deleter type must be a function object type"
│ │ │ -
152 " or an lvalue reference type" );
│ │ │ -
153
│ │ │ -
154 __uniq_ptr_impl() = default;
│ │ │ -
155 __uniq_ptr_impl(pointer __p) : _M_t() { _M_ptr() = __p; }
│ │ │ -
156
│ │ │ -
157 template<typename _Del>
│ │ │ -
158 __uniq_ptr_impl(pointer __p, _Del&& __d)
│ │ │ -
159 : _M_t(__p, std::forward<_Del>(__d)) { }
│ │ │ -
160
│ │ │ -
161 __uniq_ptr_impl(__uniq_ptr_impl&& __u) noexcept
│ │ │ -
162 : _M_t(std::move(__u._M_t))
│ │ │ -
163 { __u._M_ptr() = nullptr; }
│ │ │ -
164
│ │ │ -
165 __uniq_ptr_impl& operator=(__uniq_ptr_impl&& __u) noexcept
│ │ │ -
166 {
│ │ │ -
167 reset(__u.release());
│ │ │ -
168 _M_deleter() = std::forward<_Dp>(__u._M_deleter());
│ │ │ -
169 return *this;
│ │ │ -
170 }
│ │ │ -
171
│ │ │ -
172 pointer& _M_ptr() { return std::get<0>(_M_t); }
│ │ │ -
173 pointer _M_ptr() const { return std::get<0>(_M_t); }
│ │ │ -
174 _Dp& _M_deleter() { return std::get<1>(_M_t); }
│ │ │ -
175 const _Dp& _M_deleter() const { return std::get<1>(_M_t); }
│ │ │ -
176
│ │ │ -
177 void reset(pointer __p) noexcept
│ │ │ -
178 {
│ │ │ -
179 const pointer __old_p = _M_ptr();
│ │ │ -
180 _M_ptr() = __p;
│ │ │ -
181 if (__old_p)
│ │ │ -
182 _M_deleter()(__old_p);
│ │ │ -
183 }
│ │ │ -
184
│ │ │ -
185 pointer release() noexcept
│ │ │ -
186 {
│ │ │ -
187 pointer __p = _M_ptr();
│ │ │ -
188 _M_ptr() = nullptr;
│ │ │ -
189 return __p;
│ │ │ -
190 }
│ │ │ -
191
│ │ │ -
192 void
│ │ │ -
193 swap(__uniq_ptr_impl& __rhs) noexcept
│ │ │ -
194 {
│ │ │ -
195 using std::swap;
│ │ │ -
196 swap(this->_M_ptr(), __rhs._M_ptr());
│ │ │ -
197 swap(this->_M_deleter(), __rhs._M_deleter());
│ │ │ -
198 }
│ │ │ -
199
│ │ │ -
200 private:
│ │ │ -
201 tuple<pointer, _Dp> _M_t;
│ │ │ -
202 };
│ │ │ -
203
│ │ │ -
204 // Defines move construction + assignment as either defaulted or deleted.
│ │ │ -
205 template <typename _Tp, typename _Dp,
│ │ │ - │ │ │ - │ │ │ -
208 struct __uniq_ptr_data : __uniq_ptr_impl<_Tp, _Dp>
│ │ │ -
209 {
│ │ │ -
210 using __uniq_ptr_impl<_Tp, _Dp>::__uniq_ptr_impl;
│ │ │ -
211 __uniq_ptr_data(__uniq_ptr_data&&) = default;
│ │ │ -
212 __uniq_ptr_data& operator=(__uniq_ptr_data&&) = default;
│ │ │ -
213 };
│ │ │ -
214
│ │ │ -
215 template <typename _Tp, typename _Dp>
│ │ │ -
216 struct __uniq_ptr_data<_Tp, _Dp, true, false> : __uniq_ptr_impl<_Tp, _Dp>
│ │ │ -
217 {
│ │ │ -
218 using __uniq_ptr_impl<_Tp, _Dp>::__uniq_ptr_impl;
│ │ │ -
219 __uniq_ptr_data(__uniq_ptr_data&&) = default;
│ │ │ -
220 __uniq_ptr_data& operator=(__uniq_ptr_data&&) = delete;
│ │ │ -
221 };
│ │ │ -
222
│ │ │ -
223 template <typename _Tp, typename _Dp>
│ │ │ -
224 struct __uniq_ptr_data<_Tp, _Dp, false, true> : __uniq_ptr_impl<_Tp, _Dp>
│ │ │ -
225 {
│ │ │ -
226 using __uniq_ptr_impl<_Tp, _Dp>::__uniq_ptr_impl;
│ │ │ -
227 __uniq_ptr_data(__uniq_ptr_data&&) = delete;
│ │ │ -
228 __uniq_ptr_data& operator=(__uniq_ptr_data&&) = default;
│ │ │ -
229 };
│ │ │ -
230
│ │ │ -
231 template <typename _Tp, typename _Dp>
│ │ │ -
232 struct __uniq_ptr_data<_Tp, _Dp, false, false> : __uniq_ptr_impl<_Tp, _Dp>
│ │ │ -
233 {
│ │ │ -
234 using __uniq_ptr_impl<_Tp, _Dp>::__uniq_ptr_impl;
│ │ │ -
235 __uniq_ptr_data(__uniq_ptr_data&&) = delete;
│ │ │ -
236 __uniq_ptr_data& operator=(__uniq_ptr_data&&) = delete;
│ │ │ -
237 };
│ │ │ -
238 /// @endcond
│ │ │ -
239
│ │ │ -
240 /// 20.7.1.2 unique_ptr for single objects.
│ │ │ -
241 template <typename _Tp, typename _Dp = default_delete<_Tp>>
│ │ │ -
│ │ │ - │ │ │ -
243 {
│ │ │ -
244 template <typename _Up>
│ │ │ -
245 using _DeleterConstraint =
│ │ │ -
246 typename __uniq_ptr_impl<_Tp, _Up>::_DeleterConstraint::type;
│ │ │ -
247
│ │ │ -
248 __uniq_ptr_data<_Tp, _Dp> _M_t;
│ │ │ -
249
│ │ │ -
250 public:
│ │ │ -
251 using pointer = typename __uniq_ptr_impl<_Tp, _Dp>::pointer;
│ │ │ -
252 using element_type = _Tp;
│ │ │ -
253 using deleter_type = _Dp;
│ │ │ -
254
│ │ │ -
255 private:
│ │ │ -
256 // helper template for detecting a safe conversion from another
│ │ │ -
257 // unique_ptr
│ │ │ -
258 template<typename _Up, typename _Ep>
│ │ │ -
259 using __safe_conversion_up = __and_<
│ │ │ - │ │ │ -
261 __not_<is_array<_Up>>
│ │ │ -
262 >;
│ │ │ -
263
│ │ │ -
264 public:
│ │ │ -
265 // Constructors.
│ │ │ -
266
│ │ │ -
267 /// Default constructor, creates a unique_ptr that owns nothing.
│ │ │ -
268 template<typename _Del = _Dp, typename = _DeleterConstraint<_Del>>
│ │ │ -
│ │ │ -
269 constexpr unique_ptr() noexcept
│ │ │ -
270 : _M_t()
│ │ │ -
271 { }
│ │ │ -
│ │ │ -
272
│ │ │ -
273 /** Takes ownership of a pointer.
│ │ │ -
274 *
│ │ │ -
275 * @param __p A pointer to an object of @c element_type
│ │ │ -
276 *
│ │ │ -
277 * The deleter will be value-initialized.
│ │ │ -
278 */
│ │ │ -
279 template<typename _Del = _Dp, typename = _DeleterConstraint<_Del>>
│ │ │ -
280 explicit
│ │ │ -
│ │ │ -
281 unique_ptr(pointer __p) noexcept
│ │ │ -
282 : _M_t(__p)
│ │ │ -
283 { }
│ │ │ -
│ │ │ -
284
│ │ │ -
285 /** Takes ownership of a pointer.
│ │ │ -
286 *
│ │ │ -
287 * @param __p A pointer to an object of @c element_type
│ │ │ -
288 * @param __d A reference to a deleter.
│ │ │ -
289 *
│ │ │ -
290 * The deleter will be initialized with @p __d
│ │ │ -
291 */
│ │ │ -
292 template<typename _Del = deleter_type,
│ │ │ -
293 typename = _Require<is_copy_constructible<_Del>>>
│ │ │ -
│ │ │ -
294 unique_ptr(pointer __p, const deleter_type& __d) noexcept
│ │ │ -
295 : _M_t(__p, __d) { }
│ │ │ -
│ │ │ -
296
│ │ │ -
297 /** Takes ownership of a pointer.
│ │ │ -
298 *
│ │ │ -
299 * @param __p A pointer to an object of @c element_type
│ │ │ -
300 * @param __d An rvalue reference to a (non-reference) deleter.
│ │ │ -
301 *
│ │ │ -
302 * The deleter will be initialized with @p std::move(__d)
│ │ │ -
303 */
│ │ │ -
304 template<typename _Del = deleter_type,
│ │ │ -
305 typename = _Require<is_move_constructible<_Del>>>
│ │ │ -
│ │ │ -
306 unique_ptr(pointer __p,
│ │ │ -
307 __enable_if_t<!is_lvalue_reference<_Del>::value,
│ │ │ -
308 _Del&&> __d) noexcept
│ │ │ -
309 : _M_t(__p, std::move(__d))
│ │ │ -
310 { }
│ │ │ -
│ │ │ -
311
│ │ │ -
312 template<typename _Del = deleter_type,
│ │ │ -
313 typename _DelUnref = typename remove_reference<_Del>::type>
│ │ │ -
314 unique_ptr(pointer,
│ │ │ -
315 __enable_if_t<is_lvalue_reference<_Del>::value,
│ │ │ -
316 _DelUnref&&>) = delete;
│ │ │ -
317
│ │ │ -
318 /// Creates a unique_ptr that owns nothing.
│ │ │ -
319 template<typename _Del = _Dp, typename = _DeleterConstraint<_Del>>
│ │ │ -
│ │ │ -
320 constexpr unique_ptr(nullptr_t) noexcept
│ │ │ -
321 : _M_t()
│ │ │ -
322 { }
│ │ │ -
│ │ │ -
323
│ │ │ -
324 // Move constructors.
│ │ │ -
325
│ │ │ -
326 /// Move constructor.
│ │ │ -
327 unique_ptr(unique_ptr&&) = default;
│ │ │ -
328
│ │ │ -
329 /** @brief Converting constructor from another type
│ │ │ -
330 *
│ │ │ -
331 * Requires that the pointer owned by @p __u is convertible to the
│ │ │ -
332 * type of pointer owned by this object, @p __u does not own an array,
│ │ │ -
333 * and @p __u has a compatible deleter type.
│ │ │ -
334 */
│ │ │ -
335 template<typename _Up, typename _Ep, typename = _Require<
│ │ │ -
336 __safe_conversion_up<_Up, _Ep>,
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
│ │ │ - │ │ │ -
341 : _M_t(__u.release(), std::forward<_Ep>(__u.get_deleter()))
│ │ │ -
342 { }
│ │ │ -
│ │ │ -
343
│ │ │ -
344#if _GLIBCXX_USE_DEPRECATED
│ │ │ -
345#pragma GCC diagnostic push
│ │ │ -
346#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
│ │ │ -
347 /// Converting constructor from @c auto_ptr
│ │ │ -
348 template<typename _Up, typename = _Require<
│ │ │ - │ │ │ -
350 unique_ptr(auto_ptr<_Up>&& __u) noexcept;
│ │ │ -
351#pragma GCC diagnostic pop
│ │ │ -
352#endif
│ │ │ -
353
│ │ │ -
354 /// Destructor, invokes the deleter if the stored pointer is not null.
│ │ │ -
│ │ │ -
355 ~unique_ptr() noexcept
│ │ │ -
356 {
│ │ │ -
357 static_assert(__is_invocable<deleter_type&, pointer>::value,
│ │ │ -
358 "unique_ptr's deleter must be invocable with a pointer");
│ │ │ -
359 auto& __ptr = _M_t._M_ptr();
│ │ │ -
360 if (__ptr != nullptr)
│ │ │ -
361 get_deleter()(std::move(__ptr));
│ │ │ -
362 __ptr = pointer();
│ │ │ -
363 }
│ │ │ -
│ │ │ -
364
│ │ │ -
365 // Assignment.
│ │ │ -
366
│ │ │ -
367 /** @brief Move assignment operator.
│ │ │ -
368 *
│ │ │ -
369 * Invokes the deleter if this object owns a pointer.
│ │ │ -
370 */
│ │ │ - │ │ │ -
372
│ │ │ -
373 /** @brief Assignment from another type.
│ │ │ -
374 *
│ │ │ -
375 * @param __u The object to transfer ownership from, which owns a
│ │ │ -
376 * convertible pointer to a non-array object.
│ │ │ -
377 *
│ │ │ -
378 * Invokes the deleter if this object owns a pointer.
│ │ │ -
379 */
│ │ │ -
380 template<typename _Up, typename _Ep>
│ │ │ -
381 typename enable_if< __and_<
│ │ │ -
382 __safe_conversion_up<_Up, _Ep>,
│ │ │ - │ │ │ -
384 >::value,
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
387 {
│ │ │ -
388 reset(__u.release());
│ │ │ -
389 get_deleter() = std::forward<_Ep>(__u.get_deleter());
│ │ │ -
390 return *this;
│ │ │ -
391 }
│ │ │ -
│ │ │ -
392
│ │ │ -
393 /// Reset the %unique_ptr to empty, invoking the deleter if necessary.
│ │ │ - │ │ │ -
│ │ │ -
395 operator=(nullptr_t) noexcept
│ │ │ -
396 {
│ │ │ -
397 reset();
│ │ │ -
398 return *this;
│ │ │ -
399 }
│ │ │ -
│ │ │ -
400
│ │ │ -
401 // Observers.
│ │ │ -
402
│ │ │ -
403 /// Dereference the stored pointer.
│ │ │ -
404 typename add_lvalue_reference<element_type>::type
│ │ │ -
│ │ │ -
405 operator*() const
│ │ │ -
406 {
│ │ │ -
407 __glibcxx_assert(get() != pointer());
│ │ │ -
408 return *get();
│ │ │ -
409 }
│ │ │ -
│ │ │ -
410
│ │ │ -
411 /// Return the stored pointer.
│ │ │ -
412 pointer
│ │ │ -
│ │ │ -
413 operator->() const noexcept
│ │ │ -
414 {
│ │ │ -
415 _GLIBCXX_DEBUG_PEDASSERT(get() != pointer());
│ │ │ -
416 return get();
│ │ │ -
417 }
│ │ │ -
│ │ │ -
418
│ │ │ -
419 /// Return the stored pointer.
│ │ │ -
420 pointer
│ │ │ -
│ │ │ -
421 get() const noexcept
│ │ │ -
422 { return _M_t._M_ptr(); }
│ │ │ -
│ │ │ -
423
│ │ │ -
424 /// Return a reference to the stored deleter.
│ │ │ -
425 deleter_type&
│ │ │ -
│ │ │ -
426 get_deleter() noexcept
│ │ │ -
427 { return _M_t._M_deleter(); }
│ │ │ -
│ │ │ -
428
│ │ │ -
429 /// Return a reference to the stored deleter.
│ │ │ -
430 const deleter_type&
│ │ │ -
│ │ │ -
431 get_deleter() const noexcept
│ │ │ -
432 { return _M_t._M_deleter(); }
│ │ │ -
│ │ │ -
433
│ │ │ -
434 /// Return @c true if the stored pointer is not null.
│ │ │ -
│ │ │ -
435 explicit operator bool() const noexcept
│ │ │ -
436 { return get() == pointer() ? false : true; }
│ │ │ -
│ │ │ -
437
│ │ │ -
438 // Modifiers.
│ │ │ -
439
│ │ │ -
440 /// Release ownership of any stored pointer.
│ │ │ -
441 pointer
│ │ │ -
│ │ │ -
442 release() noexcept
│ │ │ -
443 { return _M_t.release(); }
│ │ │ -
│ │ │ -
444
│ │ │ -
445 /** @brief Replace the stored pointer.
│ │ │ -
446 *
│ │ │ -
447 * @param __p The new pointer to store.
│ │ │ -
448 *
│ │ │ -
449 * The deleter will be invoked if a pointer is already owned.
│ │ │ -
450 */
│ │ │ -
451 void
│ │ │ -
│ │ │ -
452 reset(pointer __p = pointer()) noexcept
│ │ │ -
453 {
│ │ │ -
454 static_assert(__is_invocable<deleter_type&, pointer>::value,
│ │ │ -
455 "unique_ptr's deleter must be invocable with a pointer");
│ │ │ -
456 _M_t.reset(std::move(__p));
│ │ │ -
457 }
│ │ │ -
│ │ │ -
458
│ │ │ -
459 /// Exchange the pointer and deleter with another object.
│ │ │ -
460 void
│ │ │ -
│ │ │ -
461 swap(unique_ptr& __u) noexcept
│ │ │ -
462 {
│ │ │ -
463 static_assert(__is_swappable<_Dp>::value, "deleter must be swappable");
│ │ │ -
464 _M_t.swap(__u._M_t);
│ │ │ -
465 }
│ │ │ -
│ │ │ -
466
│ │ │ -
467 // Disable copy from lvalue.
│ │ │ -
468 unique_ptr(const unique_ptr&) = delete;
│ │ │ -
469 unique_ptr& operator=(const unique_ptr&) = delete;
│ │ │ -
470 };
│ │ │ -
│ │ │ -
471
│ │ │ -
472 /// 20.7.1.3 unique_ptr for array objects with a runtime length
│ │ │ -
473 // [unique.ptr.runtime]
│ │ │ -
474 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ -
475 // DR 740 - omit specialization for array objects with a compile time length
│ │ │ -
476 template<typename _Tp, typename _Dp>
│ │ │ -
│ │ │ -
477 class unique_ptr<_Tp[], _Dp>
│ │ │ -
478 {
│ │ │ -
479 template <typename _Up>
│ │ │ -
480 using _DeleterConstraint =
│ │ │ -
481 typename __uniq_ptr_impl<_Tp, _Up>::_DeleterConstraint::type;
│ │ │ -
482
│ │ │ -
483 __uniq_ptr_data<_Tp, _Dp> _M_t;
│ │ │ -
484
│ │ │ -
485 template<typename _Up>
│ │ │ -
486 using __remove_cv = typename remove_cv<_Up>::type;
│ │ │ -
487
│ │ │ -
488 // like is_base_of<_Tp, _Up> but false if unqualified types are the same
│ │ │ -
489 template<typename _Up>
│ │ │ -
490 using __is_derived_Tp
│ │ │ -
491 = __and_< is_base_of<_Tp, _Up>,
│ │ │ -
492 __not_<is_same<__remove_cv<_Tp>, __remove_cv<_Up>>> >;
│ │ │ -
493
│ │ │ -
494 public:
│ │ │ -
495 using pointer = typename __uniq_ptr_impl<_Tp, _Dp>::pointer;
│ │ │ -
496 using element_type = _Tp;
│ │ │ -
497 using deleter_type = _Dp;
│ │ │ -
498
│ │ │ -
499 // helper template for detecting a safe conversion from another
│ │ │ -
500 // unique_ptr
│ │ │ -
501 template<typename _Up, typename _Ep,
│ │ │ -
502 typename _UPtr = unique_ptr<_Up, _Ep>,
│ │ │ -
503 typename _UP_pointer = typename _UPtr::pointer,
│ │ │ -
504 typename _UP_element_type = typename _UPtr::element_type>
│ │ │ -
505 using __safe_conversion_up = __and_<
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
509 is_convertible<_UP_element_type(*)[], element_type(*)[]>
│ │ │ -
510 >;
│ │ │ -
511
│ │ │ -
512 // helper template for detecting a safe conversion from a raw pointer
│ │ │ -
513 template<typename _Up>
│ │ │ -
514 using __safe_conversion_raw = __and_<
│ │ │ -
515 __or_<__or_<is_same<_Up, pointer>,
│ │ │ - │ │ │ -
517 __and_<is_pointer<_Up>,
│ │ │ - │ │ │ - │ │ │ -
520 typename remove_pointer<_Up>::type(*)[],
│ │ │ -
521 element_type(*)[]>
│ │ │ -
522 >
│ │ │ -
523 >
│ │ │ -
524 >;
│ │ │ -
525
│ │ │ -
526 // Constructors.
│ │ │ -
527
│ │ │ -
528 /// Default constructor, creates a unique_ptr that owns nothing.
│ │ │ -
│ │ │ -
529 template<typename _Del = _Dp, typename = _DeleterConstraint<_Del>>
│ │ │ -
530 constexpr unique_ptr() noexcept
│ │ │ -
531 : _M_t()
│ │ │ -
│ │ │ -
532 { }
│ │ │ -
533
│ │ │ -
534 /** Takes ownership of a pointer.
│ │ │ -
535 *
│ │ │ -
536 * @param __p A pointer to an array of a type safely convertible
│ │ │ -
537 * to an array of @c element_type
│ │ │ -
538 *
│ │ │ -
539 * The deleter will be value-initialized.
│ │ │ -
540 */
│ │ │ -
541 template<typename _Up,
│ │ │ -
542 typename _Vp = _Dp,
│ │ │ -
543 typename = _DeleterConstraint<_Vp>,
│ │ │ -
544 typename = typename enable_if<
│ │ │ -
545 __safe_conversion_raw<_Up>::value, bool>::type>
│ │ │ -
│ │ │ -
546 explicit
│ │ │ -
547 unique_ptr(_Up __p) noexcept
│ │ │ -
548 : _M_t(__p)
│ │ │ -
│ │ │ -
549 { }
│ │ │ -
550
│ │ │ -
551 /** Takes ownership of a pointer.
│ │ │ -
552 *
│ │ │ -
553 * @param __p A pointer to an array of a type safely convertible
│ │ │ -
554 * to an array of @c element_type
│ │ │ -
555 * @param __d A reference to a deleter.
│ │ │ -
556 *
│ │ │ -
557 * The deleter will be initialized with @p __d
│ │ │ -
558 */
│ │ │ -
559 template<typename _Up, typename _Del = deleter_type,
│ │ │ -
560 typename = _Require<__safe_conversion_raw<_Up>,
│ │ │ -
│ │ │ - │ │ │ -
562 unique_ptr(_Up __p, const deleter_type& __d) noexcept
│ │ │ -
│ │ │ -
563 : _M_t(__p, __d) { }
│ │ │ -
564
│ │ │ -
565 /** Takes ownership of a pointer.
│ │ │ -
566 *
│ │ │ -
567 * @param __p A pointer to an array of a type safely convertible
│ │ │ -
568 * to an array of @c element_type
│ │ │ -
569 * @param __d A reference to a deleter.
│ │ │ -
570 *
│ │ │ -
571 * The deleter will be initialized with @p std::move(__d)
│ │ │ -
572 */
│ │ │ -
573 template<typename _Up, typename _Del = deleter_type,
│ │ │ -
574 typename = _Require<__safe_conversion_raw<_Up>,
│ │ │ -
│ │ │ - │ │ │ -
576 unique_ptr(_Up __p,
│ │ │ -
577 __enable_if_t<!is_lvalue_reference<_Del>::value,
│ │ │ -
578 _Del&&> __d) noexcept
│ │ │ -
579 : _M_t(std::move(__p), std::move(__d))
│ │ │ -
│ │ │ -
580 { }
│ │ │ -
581
│ │ │ -
582 template<typename _Up, typename _Del = deleter_type,
│ │ │ -
583 typename _DelUnref = typename remove_reference<_Del>::type,
│ │ │ -
584 typename = _Require<__safe_conversion_raw<_Up>>>
│ │ │ -
585 unique_ptr(_Up,
│ │ │ -
586 __enable_if_t<is_lvalue_reference<_Del>::value,
│ │ │ -
587 _DelUnref&&>) = delete;
│ │ │ -
588
│ │ │ -
589 /// Move constructor.
│ │ │ -
590 unique_ptr(unique_ptr&&) = default;
│ │ │ -
591
│ │ │ -
592 /// Creates a unique_ptr that owns nothing.
│ │ │ -
│ │ │ -
593 template<typename _Del = _Dp, typename = _DeleterConstraint<_Del>>
│ │ │ -
594 constexpr unique_ptr(nullptr_t) noexcept
│ │ │ -
595 : _M_t()
│ │ │ -
│ │ │ -
596 { }
│ │ │ -
597
│ │ │ -
598 template<typename _Up, typename _Ep, typename = _Require<
│ │ │ -
599 __safe_conversion_up<_Up, _Ep>,
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
603 unique_ptr(unique_ptr<_Up, _Ep>&& __u) noexcept
│ │ │ -
604 : _M_t(__u.release(), std::forward<_Ep>(__u.get_deleter()))
│ │ │ -
605 { }
│ │ │ -
606
│ │ │ -
│ │ │ -
607 /// Destructor, invokes the deleter if the stored pointer is not null.
│ │ │ - │ │ │ -
609 {
│ │ │ -
610 auto& __ptr = _M_t._M_ptr();
│ │ │ -
611 if (__ptr != nullptr)
│ │ │ -
612 get_deleter()(__ptr);
│ │ │ -
613 __ptr = pointer();
│ │ │ -
│ │ │ -
614 }
│ │ │ -
615
│ │ │ -
616 // Assignment.
│ │ │ -
617
│ │ │ -
618 /** @brief Move assignment operator.
│ │ │ -
619 *
│ │ │ -
620 * Invokes the deleter if this object owns a pointer.
│ │ │ -
621 */
│ │ │ - │ │ │ -
623 operator=(unique_ptr&&) = default;
│ │ │ -
624
│ │ │ -
625 /** @brief Assignment from another type.
│ │ │ -
626 *
│ │ │ -
627 * @param __u The object to transfer ownership from, which owns a
│ │ │ -
628 * convertible pointer to an array object.
│ │ │ -
629 *
│ │ │ -
630 * Invokes the deleter if this object owns a pointer.
│ │ │ -
631 */
│ │ │ -
632 template<typename _Up, typename _Ep>
│ │ │ -
633 typename
│ │ │ - │ │ │ - │ │ │ -
636 >::value,
│ │ │ -
│ │ │ - │ │ │ -
638 operator=(unique_ptr<_Up, _Ep>&& __u) noexcept
│ │ │ -
639 {
│ │ │ -
640 reset(__u.release());
│ │ │ -
641 get_deleter() = std::forward<_Ep>(__u.get_deleter());
│ │ │ -
642 return *this;
│ │ │ -
│ │ │ -
643 }
│ │ │ -
644
│ │ │ -
645 /// Reset the %unique_ptr to empty, invoking the deleter if necessary.
│ │ │ -
│ │ │ - │ │ │ -
647 operator=(nullptr_t) noexcept
│ │ │ -
648 {
│ │ │ -
649 reset();
│ │ │ -
650 return *this;
│ │ │ -
│ │ │ -
651 }
│ │ │ -
652
│ │ │ -
653 // Observers.
│ │ │ -
654
│ │ │ -
655 /// Access an element of owned array.
│ │ │ -
│ │ │ -
656 typename std::add_lvalue_reference<element_type>::type
│ │ │ -
657 operator[](size_t __i) const
│ │ │ -
658 {
│ │ │ -
659 __glibcxx_assert(get() != pointer());
│ │ │ -
660 return get()[__i];
│ │ │ -
│ │ │ -
661 }
│ │ │ -
662
│ │ │ -
663 /// Return the stored pointer.
│ │ │ -
│ │ │ -
664 pointer
│ │ │ -
665 get() const noexcept
│ │ │ -
│ │ │ -
666 { return _M_t._M_ptr(); }
│ │ │ -
667
│ │ │ -
668 /// Return a reference to the stored deleter.
│ │ │ -
│ │ │ -
669 deleter_type&
│ │ │ -
670 get_deleter() noexcept
│ │ │ -
│ │ │ -
671 { return _M_t._M_deleter(); }
│ │ │ -
672
│ │ │ -
673 /// Return a reference to the stored deleter.
│ │ │ -
│ │ │ -
674 const deleter_type&
│ │ │ -
675 get_deleter() const noexcept
│ │ │ -
│ │ │ -
676 { return _M_t._M_deleter(); }
│ │ │ -
677
│ │ │ -
│ │ │ -
678 /// Return @c true if the stored pointer is not null.
│ │ │ -
679 explicit operator bool() const noexcept
│ │ │ -
│ │ │ -
680 { return get() == pointer() ? false : true; }
│ │ │ -
681
│ │ │ -
682 // Modifiers.
│ │ │ -
683
│ │ │ -
684 /// Release ownership of any stored pointer.
│ │ │ -
│ │ │ -
685 pointer
│ │ │ -
686 release() noexcept
│ │ │ -
│ │ │ -
687 { return _M_t.release(); }
│ │ │ -
688
│ │ │ -
689 /** @brief Replace the stored pointer.
│ │ │ -
690 *
│ │ │ -
691 * @param __p The new pointer to store.
│ │ │ -
692 *
│ │ │ -
693 * The deleter will be invoked if a pointer is already owned.
│ │ │ -
694 */
│ │ │ -
695 template <typename _Up,
│ │ │ -
696 typename = _Require<
│ │ │ -
697 __or_<is_same<_Up, pointer>,
│ │ │ -
698 __and_<is_same<pointer, element_type*>,
│ │ │ - │ │ │ - │ │ │ -
701 typename remove_pointer<_Up>::type(*)[],
│ │ │ -
702 element_type(*)[]
│ │ │ -
703 >
│ │ │ -
704 >
│ │ │ -
705 >
│ │ │ -
706 >>
│ │ │ -
│ │ │ -
707 void
│ │ │ -
708 reset(_Up __p) noexcept
│ │ │ -
│ │ │ -
709 { _M_t.reset(std::move(__p)); }
│ │ │ -
710
│ │ │ -
711 void reset(nullptr_t = nullptr) noexcept
│ │ │ -
712 { reset(pointer()); }
│ │ │ -
713
│ │ │ -
714 /// Exchange the pointer and deleter with another object.
│ │ │ -
│ │ │ -
715 void
│ │ │ -
716 swap(unique_ptr& __u) noexcept
│ │ │ -
717 {
│ │ │ -
718 static_assert(__is_swappable<_Dp>::value, "deleter must be swappable");
│ │ │ -
719 _M_t.swap(__u._M_t);
│ │ │ -
│ │ │ -
720 }
│ │ │ -
721
│ │ │ -
722 // Disable copy from lvalue.
│ │ │ -
723 unique_ptr(const unique_ptr&) = delete;
│ │ │ -
724 unique_ptr& operator=(const unique_ptr&) = delete;
│ │ │ -
725 };
│ │ │ -
│ │ │ -
726
│ │ │ -
727 /// @relates unique_ptr @{
│ │ │ -
728
│ │ │ -
729 /// Swap overload for unique_ptr
│ │ │ -
730 template<typename _Tp, typename _Dp>
│ │ │ -
731 inline
│ │ │ -
732#if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11
│ │ │ -
733 // Constrained free swap overload, see p0185r1
│ │ │ -
734 typename enable_if<__is_swappable<_Dp>::value>::type
│ │ │ -
735#else
│ │ │ -
736 void
│ │ │ -
737#endif
│ │ │ -
│ │ │ - │ │ │ -
739 unique_ptr<_Tp, _Dp>& __y) noexcept
│ │ │ -
740 { __x.swap(__y); }
│ │ │ -
│ │ │ -
741
│ │ │ -
742#if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11
│ │ │ -
743 template<typename _Tp, typename _Dp>
│ │ │ - │ │ │ - │ │ │ -
746 unique_ptr<_Tp, _Dp>&) = delete;
│ │ │ -
747#endif
│ │ │ -
748
│ │ │ -
749 /// Equality operator for unique_ptr objects, compares the owned pointers
│ │ │ -
750 template<typename _Tp, typename _Dp,
│ │ │ -
751 typename _Up, typename _Ep>
│ │ │ -
752 _GLIBCXX_NODISCARD inline bool
│ │ │ -
│ │ │ - │ │ │ -
754 const unique_ptr<_Up, _Ep>& __y)
│ │ │ -
755 { return __x.get() == __y.get(); }
│ │ │ -
│ │ │ -
756
│ │ │ -
757 /// unique_ptr comparison with nullptr
│ │ │ -
758 template<typename _Tp, typename _Dp>
│ │ │ -
759 _GLIBCXX_NODISCARD inline bool
│ │ │ -
│ │ │ -
760 operator==(const unique_ptr<_Tp, _Dp>& __x, nullptr_t) noexcept
│ │ │ -
761 { return !__x; }
│ │ │ -
│ │ │ -
762
│ │ │ -
763#ifndef __cpp_lib_three_way_comparison
│ │ │ -
764 /// unique_ptr comparison with nullptr
│ │ │ -
765 template<typename _Tp, typename _Dp>
│ │ │ -
766 _GLIBCXX_NODISCARD inline bool
│ │ │ -
│ │ │ -
767 operator==(nullptr_t, const unique_ptr<_Tp, _Dp>& __x) noexcept
│ │ │ -
768 { return !__x; }
│ │ │ -
│ │ │ -
769
│ │ │ -
770 /// Inequality operator for unique_ptr objects, compares the owned pointers
│ │ │ -
771 template<typename _Tp, typename _Dp,
│ │ │ -
772 typename _Up, typename _Ep>
│ │ │ -
773 _GLIBCXX_NODISCARD inline bool
│ │ │ -
│ │ │ - │ │ │ -
775 const unique_ptr<_Up, _Ep>& __y)
│ │ │ -
776 { return __x.get() != __y.get(); }
│ │ │ -
│ │ │ -
777
│ │ │ -
778 /// unique_ptr comparison with nullptr
│ │ │ -
779 template<typename _Tp, typename _Dp>
│ │ │ -
780 _GLIBCXX_NODISCARD inline bool
│ │ │ -
│ │ │ -
781 operator!=(const unique_ptr<_Tp, _Dp>& __x, nullptr_t) noexcept
│ │ │ -
782 { return (bool)__x; }
│ │ │ -
│ │ │ -
783
│ │ │ -
784 /// unique_ptr comparison with nullptr
│ │ │ -
785 template<typename _Tp, typename _Dp>
│ │ │ -
786 _GLIBCXX_NODISCARD inline bool
│ │ │ -
│ │ │ -
787 operator!=(nullptr_t, const unique_ptr<_Tp, _Dp>& __x) noexcept
│ │ │ -
788 { return (bool)__x; }
│ │ │ -
│ │ │ -
789#endif // three way comparison
│ │ │ -
790
│ │ │ -
791 /// Relational operator for unique_ptr objects, compares the owned pointers
│ │ │ -
792 template<typename _Tp, typename _Dp,
│ │ │ -
793 typename _Up, typename _Ep>
│ │ │ -
│ │ │ -
794 _GLIBCXX_NODISCARD inline bool
│ │ │ - │ │ │ -
796 const unique_ptr<_Up, _Ep>& __y)
│ │ │ -
797 {
│ │ │ -
798 typedef typename
│ │ │ - │ │ │ -
800 typename unique_ptr<_Up, _Ep>::pointer>::type _CT;
│ │ │ -
801 return std::less<_CT>()(__x.get(), __y.get());
│ │ │ -
802 }
│ │ │ -
│ │ │ -
803
│ │ │ -
804 /// unique_ptr comparison with nullptr
│ │ │ -
805 template<typename _Tp, typename _Dp>
│ │ │ -
│ │ │ -
806 _GLIBCXX_NODISCARD inline bool
│ │ │ -
807 operator<(const unique_ptr<_Tp, _Dp>& __x, nullptr_t)
│ │ │ -
808 {
│ │ │ - │ │ │ -
810 nullptr);
│ │ │ -
811 }
│ │ │ -
│ │ │ -
812
│ │ │ -
813 /// unique_ptr comparison with nullptr
│ │ │ -
814 template<typename _Tp, typename _Dp>
│ │ │ -
│ │ │ -
815 _GLIBCXX_NODISCARD inline bool
│ │ │ -
816 operator<(nullptr_t, const unique_ptr<_Tp, _Dp>& __x)
│ │ │ -
817 {
│ │ │ - │ │ │ -
819 __x.get());
│ │ │ -
820 }
│ │ │ -
│ │ │ -
821
│ │ │ -
822 /// Relational operator for unique_ptr objects, compares the owned pointers
│ │ │ -
823 template<typename _Tp, typename _Dp,
│ │ │ -
824 typename _Up, typename _Ep>
│ │ │ -
│ │ │ -
825 _GLIBCXX_NODISCARD inline bool
│ │ │ - │ │ │ -
827 const unique_ptr<_Up, _Ep>& __y)
│ │ │ -
828 { return !(__y < __x); }
│ │ │ -
│ │ │ -
829
│ │ │ -
830 /// unique_ptr comparison with nullptr
│ │ │ -
831 template<typename _Tp, typename _Dp>
│ │ │ -
│ │ │ -
832 _GLIBCXX_NODISCARD inline bool
│ │ │ -
833 operator<=(const unique_ptr<_Tp, _Dp>& __x, nullptr_t)
│ │ │ -
834 { return !(nullptr < __x); }
│ │ │ -
│ │ │ -
835
│ │ │ -
836 /// unique_ptr comparison with nullptr
│ │ │ -
837 template<typename _Tp, typename _Dp>
│ │ │ -
│ │ │ -
838 _GLIBCXX_NODISCARD inline bool
│ │ │ -
839 operator<=(nullptr_t, const unique_ptr<_Tp, _Dp>& __x)
│ │ │ -
840 { return !(__x < nullptr); }
│ │ │ -
│ │ │ -
841
│ │ │ -
842 /// Relational operator for unique_ptr objects, compares the owned pointers
│ │ │ -
843 template<typename _Tp, typename _Dp,
│ │ │ -
844 typename _Up, typename _Ep>
│ │ │ -
845 _GLIBCXX_NODISCARD inline bool
│ │ │ -
│ │ │ - │ │ │ -
847 const unique_ptr<_Up, _Ep>& __y)
│ │ │ -
848 { return (__y < __x); }
│ │ │ -
│ │ │ -
849
│ │ │ -
850 /// unique_ptr comparison with nullptr
│ │ │ -
851 template<typename _Tp, typename _Dp>
│ │ │ -
852 _GLIBCXX_NODISCARD inline bool
│ │ │ -
│ │ │ -
853 operator>(const unique_ptr<_Tp, _Dp>& __x, nullptr_t)
│ │ │ -
854 {
│ │ │ - │ │ │ -
856 __x.get());
│ │ │ -
857 }
│ │ │ -
│ │ │ -
858
│ │ │ -
859 /// unique_ptr comparison with nullptr
│ │ │ -
860 template<typename _Tp, typename _Dp>
│ │ │ -
861 _GLIBCXX_NODISCARD inline bool
│ │ │ -
│ │ │ -
862 operator>(nullptr_t, const unique_ptr<_Tp, _Dp>& __x)
│ │ │ -
863 {
│ │ │ - │ │ │ -
865 nullptr);
│ │ │ -
866 }
│ │ │ -
│ │ │ -
867
│ │ │ -
868 /// Relational operator for unique_ptr objects, compares the owned pointers
│ │ │ -
869 template<typename _Tp, typename _Dp,
│ │ │ -
870 typename _Up, typename _Ep>
│ │ │ -
871 _GLIBCXX_NODISCARD inline bool
│ │ │ -
│ │ │ - │ │ │ -
873 const unique_ptr<_Up, _Ep>& __y)
│ │ │ -
874 { return !(__x < __y); }
│ │ │ -
│ │ │ -
875
│ │ │ -
876 /// unique_ptr comparison with nullptr
│ │ │ -
877 template<typename _Tp, typename _Dp>
│ │ │ -
878 _GLIBCXX_NODISCARD inline bool
│ │ │ -
│ │ │ -
879 operator>=(const unique_ptr<_Tp, _Dp>& __x, nullptr_t)
│ │ │ -
880 { return !(__x < nullptr); }
│ │ │ -
│ │ │ -
881
│ │ │ -
882 /// unique_ptr comparison with nullptr
│ │ │ -
883 template<typename _Tp, typename _Dp>
│ │ │ -
884 _GLIBCXX_NODISCARD inline bool
│ │ │ -
│ │ │ -
885 operator>=(nullptr_t, const unique_ptr<_Tp, _Dp>& __x)
│ │ │ -
886 { return !(nullptr < __x); }
│ │ │ -
│ │ │ -
887
│ │ │ -
888#ifdef __cpp_lib_three_way_comparison
│ │ │ -
889 template<typename _Tp, typename _Dp, typename _Up, typename _Ep>
│ │ │ -
890 requires three_way_comparable_with<typename unique_ptr<_Tp, _Dp>::pointer,
│ │ │ -
891 typename unique_ptr<_Up, _Ep>::pointer>
│ │ │ -
892 inline
│ │ │ -
893 compare_three_way_result_t<typename unique_ptr<_Tp, _Dp>::pointer,
│ │ │ -
894 typename unique_ptr<_Up, _Ep>::pointer>
│ │ │ -
895 operator<=>(const unique_ptr<_Tp, _Dp>& __x,
│ │ │ -
896 const unique_ptr<_Up, _Ep>& __y)
│ │ │ -
897 { return compare_three_way()(__x.get(), __y.get()); }
│ │ │ -
898
│ │ │ -
899 template<typename _Tp, typename _Dp>
│ │ │ -
900 requires three_way_comparable<typename unique_ptr<_Tp, _Dp>::pointer>
│ │ │ -
901 inline
│ │ │ -
902 compare_three_way_result_t<typename unique_ptr<_Tp, _Dp>::pointer>
│ │ │ -
903 operator<=>(const unique_ptr<_Tp, _Dp>& __x, nullptr_t)
│ │ │ -
904 {
│ │ │ -
905 using pointer = typename unique_ptr<_Tp, _Dp>::pointer;
│ │ │ -
906 return compare_three_way()(__x.get(), static_cast<pointer>(nullptr));
│ │ │ -
907 }
│ │ │ -
908#endif
│ │ │ -
909 /// @} relates unique_ptr
│ │ │ -
910
│ │ │ -
911 /// @cond undocumented
│ │ │ -
912 template<typename _Up, typename _Ptr = typename _Up::pointer,
│ │ │ -
913 bool = __poison_hash<_Ptr>::__enable_hash_call>
│ │ │ -
914 struct __uniq_ptr_hash
│ │ │ -
915#if ! _GLIBCXX_INLINE_VERSION
│ │ │ -
916 : private __poison_hash<_Ptr>
│ │ │ -
917#endif
│ │ │ -
918 {
│ │ │ -
919 size_t
│ │ │ -
920 operator()(const _Up& __u) const
│ │ │ -
921 noexcept(noexcept(std::declval<hash<_Ptr>>()(std::declval<_Ptr>())))
│ │ │ -
922 { return hash<_Ptr>()(__u.get()); }
│ │ │ -
923 };
│ │ │ -
924
│ │ │ -
925 template<typename _Up, typename _Ptr>
│ │ │ -
926 struct __uniq_ptr_hash<_Up, _Ptr, false>
│ │ │ -
927 : private __poison_hash<_Ptr>
│ │ │ -
928 { };
│ │ │ -
929 /// @endcond
│ │ │ -
930
│ │ │ -
931 /// std::hash specialization for unique_ptr.
│ │ │ -
932 template<typename _Tp, typename _Dp>
│ │ │ -
│ │ │ -
933 struct hash<unique_ptr<_Tp, _Dp>>
│ │ │ -
934 : public __hash_base<size_t, unique_ptr<_Tp, _Dp>>,
│ │ │ -
935 public __uniq_ptr_hash<unique_ptr<_Tp, _Dp>>
│ │ │ -
936 { };
│ │ │ -
│ │ │ -
937
│ │ │ -
938#if __cplusplus >= 201402L
│ │ │ -
939 /// @relates unique_ptr @{
│ │ │ -
940#define __cpp_lib_make_unique 201304
│ │ │ -
941
│ │ │ -
942 /// @cond undocumented
│ │ │ -
943
│ │ │ -
944 template<typename _Tp>
│ │ │ -
945 struct _MakeUniq
│ │ │ -
946 { typedef unique_ptr<_Tp> __single_object; };
│ │ │ -
947
│ │ │ -
948 template<typename _Tp>
│ │ │ -
949 struct _MakeUniq<_Tp[]>
│ │ │ -
950 { typedef unique_ptr<_Tp[]> __array; };
│ │ │ -
951
│ │ │ -
952 template<typename _Tp, size_t _Bound>
│ │ │ -
953 struct _MakeUniq<_Tp[_Bound]>
│ │ │ -
954 { struct __invalid_type { }; };
│ │ │ -
955
│ │ │ -
956 /// @endcond
│ │ │ -
957
│ │ │ -
958 /// std::make_unique for single objects
│ │ │ -
959 template<typename _Tp, typename... _Args>
│ │ │ -
960 inline typename _MakeUniq<_Tp>::__single_object
│ │ │ -
│ │ │ -
961 make_unique(_Args&&... __args)
│ │ │ -
962 { return unique_ptr<_Tp>(new _Tp(std::forward<_Args>(__args)...)); }
│ │ │ -
│ │ │ -
963
│ │ │ -
964 /// std::make_unique for arrays of unknown bound
│ │ │ -
965 template<typename _Tp>
│ │ │ -
966 inline typename _MakeUniq<_Tp>::__array
│ │ │ -
│ │ │ -
967 make_unique(size_t __num)
│ │ │ -
968 { return unique_ptr<_Tp>(new remove_extent_t<_Tp>[__num]()); }
│ │ │ -
│ │ │ -
969
│ │ │ -
970 /// Disable std::make_unique for arrays of known bound
│ │ │ -
971 template<typename _Tp, typename... _Args>
│ │ │ -
972 typename _MakeUniq<_Tp>::__invalid_type
│ │ │ -
973 make_unique(_Args&&...) = delete;
│ │ │ -
974
│ │ │ -
975#if __cplusplus > 201703L
│ │ │ -
976 /// std::make_unique_for_overwrite for single objects
│ │ │ -
977 template<typename _Tp>
│ │ │ -
978 inline typename _MakeUniq<_Tp>::__single_object
│ │ │ -
979 make_unique_for_overwrite()
│ │ │ -
980 { return unique_ptr<_Tp>(new _Tp); }
│ │ │ -
981
│ │ │ -
982 /// std::make_unique_for_overwrite for arrays of unknown bound
│ │ │ -
983 template<typename _Tp>
│ │ │ -
984 inline typename _MakeUniq<_Tp>::__array
│ │ │ -
985 make_unique_for_overwrite(size_t __n)
│ │ │ -
986 { return unique_ptr<_Tp>(new remove_extent_t<_Tp>[__n]); }
│ │ │ -
987
│ │ │ -
988 /// Disable std::make_unique_for_overwrite for arrays of known bound
│ │ │ -
989 template<typename _Tp, typename... _Args>
│ │ │ -
990 typename _MakeUniq<_Tp>::__invalid_type
│ │ │ -
991 make_unique_for_overwrite(_Args&&...) = delete;
│ │ │ -
992#endif // C++20
│ │ │ -
993
│ │ │ -
994 /// @} relates unique_ptr
│ │ │ -
995#endif // C++14
│ │ │ -
996
│ │ │ -
997#if __cplusplus > 201703L && __cpp_concepts
│ │ │ -
998 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ -
999 // 2948. unique_ptr does not define operator<< for stream output
│ │ │ -
1000 /// Stream output operator for unique_ptr
│ │ │ -
1001 template<typename _CharT, typename _Traits, typename _Tp, typename _Dp>
│ │ │ -
1002 inline basic_ostream<_CharT, _Traits>&
│ │ │ -
1003 operator<<(basic_ostream<_CharT, _Traits>& __os,
│ │ │ -
1004 const unique_ptr<_Tp, _Dp>& __p)
│ │ │ -
1005 requires requires { __os << __p.get(); }
│ │ │ -
1006 {
│ │ │ -
1007 __os << __p.get();
│ │ │ -
1008 return __os;
│ │ │ -
1009 }
│ │ │ -
1010#endif // C++20
│ │ │ -
1011
│ │ │ -
1012 /// @} group pointer_abstractions
│ │ │ -
1013
│ │ │ -
1014#if __cplusplus >= 201703L
│ │ │ -
1015 namespace __detail::__variant
│ │ │ -
1016 {
│ │ │ -
1017 template<typename> struct _Never_valueless_alt; // see <variant>
│ │ │ -
1018
│ │ │ -
1019 // Provide the strong exception-safety guarantee when emplacing a
│ │ │ -
1020 // unique_ptr into a variant.
│ │ │ -
1021 template<typename _Tp, typename _Del>
│ │ │ -
1022 struct _Never_valueless_alt<std::unique_ptr<_Tp, _Del>>
│ │ │ - │ │ │ -
1024 { };
│ │ │ -
1025 } // namespace __detail::__variant
│ │ │ -
1026#endif // C++17
│ │ │ -
1027
│ │ │ -
1028_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ -
1029} // namespace
│ │ │ -
1030
│ │ │ -
1031#endif /* _UNIQUE_PTR_H */
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
bool operator==(const unique_ptr< _Res, _Result_base::_Deleter > &__x, const unique_ptr< _Up, _Ep > &__y)
Definition unique_ptr.h:753
│ │ │ -
bool operator==(nullptr_t, const unique_ptr< _Res, _Result_base::_Deleter > &__x) noexcept
Definition unique_ptr.h:767
│ │ │ -
bool operator>=(const unique_ptr< _Res, _Result_base::_Deleter > &__x, const unique_ptr< _Up, _Ep > &__y)
Definition unique_ptr.h:872
│ │ │ -
bool operator==(const unique_ptr< _Res, _Result_base::_Deleter > &__x, nullptr_t) noexcept
Definition unique_ptr.h:760
│ │ │ -
bool operator!=(nullptr_t, const unique_ptr< _Res, _Result_base::_Deleter > &__x) noexcept
Definition unique_ptr.h:787
│ │ │ -
bool operator!=(const unique_ptr< _Res, _Result_base::_Deleter > &__x, nullptr_t) noexcept
Definition unique_ptr.h:781
│ │ │ -
enable_if< __is_swappable< _Result_base::_Deleter >::value >::type swap(unique_ptr< _Res, _Result_base::_Deleter > &__x, unique_ptr< _Res, _Result_base::_Deleter > &__y) noexcept
Definition unique_ptr.h:738
│ │ │ -
_MakeUniq< _Res >::__array make_unique(size_t __num)
Definition unique_ptr.h:967
│ │ │ -
bool operator>(nullptr_t, const unique_ptr< _Res, _Result_base::_Deleter > &__x)
Definition unique_ptr.h:862
│ │ │ -
bool operator<(const unique_ptr< _Res, _Result_base::_Deleter > &__x, const unique_ptr< _Up, _Ep > &__y)
Definition unique_ptr.h:795
│ │ │ -
bool operator>(const unique_ptr< _Res, _Result_base::_Deleter > &__x, nullptr_t)
Definition unique_ptr.h:853
│ │ │ -
bool operator>=(const unique_ptr< _Res, _Result_base::_Deleter > &__x, nullptr_t)
Definition unique_ptr.h:879
│ │ │ -
bool operator!=(const unique_ptr< _Res, _Result_base::_Deleter > &__x, const unique_ptr< _Up, _Ep > &__y)
Definition unique_ptr.h:774
│ │ │ -
bool operator>=(nullptr_t, const unique_ptr< _Res, _Result_base::_Deleter > &__x)
Definition unique_ptr.h:885
│ │ │ -
_MakeUniq< _Res >::__invalid_type make_unique(_Args &&...)=delete
│ │ │ -
bool operator>(const unique_ptr< _Res, _Result_base::_Deleter > &__x, const unique_ptr< _Up, _Ep > &__y)
Definition unique_ptr.h:846
│ │ │ -
bool operator<=(const unique_ptr< _Res, _Result_base::_Deleter > &__x, const unique_ptr< _Up, _Ep > &__y)
Definition unique_ptr.h:826
│ │ │ -
_MakeUniq< _Res >::__single_object make_unique(_Args &&... __args)
Definition unique_ptr.h:961
│ │ │ -
typename remove_extent< _Tp >::type remove_extent_t
Alias template for remove_extent.
Definition type_traits:2006
│ │ │ -
integral_constant< bool, true > true_type
The type used as a compile-time boolean with true value.
Definition type_traits:83
│ │ │ -
auto declval() noexcept -> decltype(__declval< _Tp >(0))
Definition type_traits:2356
│ │ │ -
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:428
│ │ │ -
constexpr _Tp && forward(typename std::remove_reference< _Tp >::type &__t) noexcept
Forward an lvalue.
Definition move.h:77
│ │ │ -
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:1540
│ │ │ -
Primary class template hash.
│ │ │ -
Define a member typedef type to one of two argument types.
Definition type_traits:2219
│ │ │ -
is_void
Definition type_traits:272
│ │ │ -
is_array
Definition type_traits:429
│ │ │ -
is_pointer
Definition type_traits:451
│ │ │ - │ │ │ -
is_copy_constructible
Definition type_traits:986
│ │ │ -
is_move_constructible
Definition type_traits:1009
│ │ │ -
is_assignable
Definition type_traits:1088
│ │ │ -
is_move_assignable
Definition type_traits:1130
│ │ │ -
is_convertible
Definition type_traits:1458
│ │ │ - │ │ │ -
Define a member typedef type only if a boolean constant is true.
Definition type_traits:2192
│ │ │ -
common_type
Definition type_traits:2228
│ │ │ -
One of the comparison functors.
│ │ │ -
constexpr default_delete() noexcept=default
Default constructor.
│ │ │ -
void operator()(_Tp *__ptr) const
Calls delete __ptr.
Definition unique_ptr.h:79
│ │ │ -
enable_if< is_convertible< _Up(*)[], _Tp(*)[]>::value >::type operator()(_Up *__ptr) const
Calls delete[] __ptr.
Definition unique_ptr.h:116
│ │ │ -
constexpr default_delete() noexcept=default
Default constructor.
│ │ │ -
20.7.1.2 unique_ptr for single objects.
Definition unique_ptr.h:243
│ │ │ -
void reset(pointer __p=pointer()) noexcept
Replace the stored pointer.
Definition unique_ptr.h:452
│ │ │ -
void swap(unique_ptr &__u) noexcept
Definition unique_ptr.h:461
│ │ │ -
enable_if< __and_< __safe_conversion_up< _Up, _Ep >, is_assignable< deleter_type &, _Ep && > >::value, unique_ptr & >::type operator=(unique_ptr< _Up, _Ep > &&__u) noexcept
Definition unique_ptr.h:386
│ │ │ -
unique_ptr(pointer __p, const deleter_type &__d) noexcept
Definition unique_ptr.h:294
│ │ │ -
unique_ptr(unique_ptr< _Up, _Ep > &&__u) noexcept
Definition unique_ptr.h:340
│ │ │ -
constexpr unique_ptr() noexcept
Default constructor, creates a unique_ptr that owns nothing.
Definition unique_ptr.h:269
│ │ │ - │ │ │ -
unique_ptr(pointer __p, __enable_if_t<!is_lvalue_reference< _Del >::value, _Del && > __d) noexcept
Definition unique_ptr.h:306
│ │ │ -
unique_ptr & operator=(nullptr_t) noexcept
Definition unique_ptr.h:395
│ │ │ -
add_lvalue_reference< element_type >::type operator*() const
Definition unique_ptr.h:405
│ │ │ -
unique_ptr & operator=(unique_ptr &&)=default
│ │ │ - │ │ │ - │ │ │ -
const deleter_type & get_deleter() const noexcept
Definition unique_ptr.h:431
│ │ │ -
deleter_type & get_deleter() noexcept
Return a reference to the stored deleter.
Definition unique_ptr.h:426
│ │ │ - │ │ │ -
pointer get() const noexcept
Return the stored pointer.
Definition unique_ptr.h:421
│ │ │ -
constexpr unique_ptr(nullptr_t) noexcept
Definition unique_ptr.h:320
│ │ │ - │ │ │ -
std::add_lvalue_reference< element_type >::type operator[](size_t __i) const
Access an element of owned array.
Definition unique_ptr.h:656
│ │ │ -
constexpr unique_ptr() noexcept
Default constructor, creates a unique_ptr that owns nothing.
Definition unique_ptr.h:529
│ │ │ -
A simple smart pointer providing strict ownership semantics.
Definition auto_ptr.h:90
│ │ │ +
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
│ │ │
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,11 +1,11 @@ │ │ │ │ libstdc++ │ │ │ │ -unique_ptr.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// unique_ptr implementation -*- C++ -*- │ │ │ │ +1// -*- C++ -*- header. │ │ │ │ 2 │ │ │ │ 3// Copyright (C) 2008-2021 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,1262 +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_ptr.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{memory} │ │ │ │ +27 * Do not attempt to use it directly. @headername{atomic} │ │ │ │ 28 */ │ │ │ │ 29 │ │ │ │ -30#ifndef _UNIQUE_PTR_H │ │ │ │ -31#define _UNIQUE_PTR_H 1 │ │ │ │ +30#ifndef _GLIBCXX_ATOMIC_LOCK_FREE_H │ │ │ │ +31#define _GLIBCXX_ATOMIC_LOCK_FREE_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 <_u_t_i_l_i_t_y> │ │ │ │ -37#include <_t_u_p_l_e> │ │ │ │ -38#include <_b_i_t_s_/_s_t_l___f_u_n_c_t_i_o_n_._h> │ │ │ │ -39#include <_b_i_t_s_/_f_u_n_c_t_i_o_n_a_l___h_a_s_h_._h> │ │ │ │ -40#if __cplusplus > 201703L │ │ │ │ -41# include <_c_o_m_p_a_r_e> │ │ │ │ -42# include <_o_s_t_r_e_a_m> │ │ │ │ -43#endif │ │ │ │ -44 │ │ │ │ -45namespace _s_t_d _GLIBCXX_VISIBILITY(default) │ │ │ │ -46{ │ │ │ │ -47_GLIBCXX_BEGIN_NAMESPACE_VERSION │ │ │ │ -48 │ │ │ │ -49 /** │ │ │ │ -50 * @addtogroup pointer_abstractions │ │ │ │ -51 * @{ │ │ │ │ -52 */ │ │ │ │ -53 │ │ │ │ -54#if _GLIBCXX_USE_DEPRECATED │ │ │ │ -55#pragma GCC diagnostic push │ │ │ │ -56#pragma GCC diagnostic ignored "-Wdeprecated-declarations" │ │ │ │ -57 template class _a_u_t_o___p_t_r; │ │ │ │ -58#pragma GCC diagnostic pop │ │ │ │ -59#endif │ │ │ │ -60 │ │ │ │ -61 /// Primary template of default_delete, used by unique_ptr for single │ │ │ │ -objects │ │ │ │ -62 template │ │ │ │ -_6_3 struct _d_e_f_a_u_l_t___d_e_l_e_t_e │ │ │ │ -64 { │ │ │ │ -65 /// Default constructor │ │ │ │ -_6_6 constexpr _d_e_f_a_u_l_t___d_e_l_e_t_e() noexcept = default; │ │ │ │ -67 │ │ │ │ -68 /** @brief Converting constructor. │ │ │ │ -69 * │ │ │ │ -70 * Allows conversion from a deleter for objects of another type, `_Up`, │ │ │ │ -71 * only if `_Up*` is convertible to `_Tp*`. │ │ │ │ -72 */ │ │ │ │ -73 template>> │ │ │ │ -_7_5 _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 { } │ │ │ │ -76 │ │ │ │ -77 /// Calls `delete __ptr` │ │ │ │ -78 void │ │ │ │ -_7_9 _o_p_e_r_a_t_o_r_(_)(_Tp* __ptr) const │ │ │ │ -80 { │ │ │ │ -81 static_assert(!_i_s___v_o_i_d_<___T_p_>_:_:_v_a_l_u_e, │ │ │ │ -82 "can't delete pointer to incomplete type"); │ │ │ │ -83 static_assert(sizeof(_Tp)>0, │ │ │ │ -84 "can't delete pointer to incomplete type"); │ │ │ │ -85 delete __ptr; │ │ │ │ -86 } │ │ │ │ -87 }; │ │ │ │ -88 │ │ │ │ -89 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ -90 // DR 740 - omit specialization for array objects with a compile time length │ │ │ │ -91 │ │ │ │ -92 /// Specialization of default_delete for arrays, used by `unique_ptr` │ │ │ │ -93 template │ │ │ │ -_9_4 struct _d_e_f_a_u_l_t___d_e_l_e_t_e<_Tp[]> │ │ │ │ -95 { │ │ │ │ -96 public: │ │ │ │ -97 /// Default constructor │ │ │ │ -_9_8 constexpr _d_e_f_a_u_l_t___d_e_l_e_t_e() noexcept = default; │ │ │ │ -99 │ │ │ │ -100 /** @brief Converting constructor. │ │ │ │ -101 * │ │ │ │ -102 * Allows conversion from a deleter for arrays of another type, such as │ │ │ │ -103 * a const-qualified version of `_Tp`. │ │ │ │ -104 * │ │ │ │ -105 * Conversions from types derived from `_Tp` are not allowed because │ │ │ │ -106 * it is undefined to `delete[]` an array of derived types through a │ │ │ │ -107 * pointer to the base type. │ │ │ │ -108 */ │ │ │ │ -109 template>> │ │ │ │ -_1_1_1 _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 { } │ │ │ │ -112 │ │ │ │ -113 /// Calls `delete[] __ptr` │ │ │ │ -114 template │ │ │ │ -115 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>_:_:_t_y_p_e │ │ │ │ -_1_1_6 _o_p_e_r_a_t_o_r_(_)(_Up* __ptr) const │ │ │ │ -117 { │ │ │ │ -118 static_assert(sizeof(_Tp)>0, │ │ │ │ -119 "can't delete pointer to incomplete type"); │ │ │ │ -120 delete [] __ptr; │ │ │ │ -121 } │ │ │ │ -122 }; │ │ │ │ -123 │ │ │ │ -124 /// @cond undocumented │ │ │ │ -125 │ │ │ │ -126 // Manages the pointer and deleter of a unique_ptr │ │ │ │ -127 template │ │ │ │ -128 class __uniq_ptr_impl │ │ │ │ -129 { │ │ │ │ -130 template │ │ │ │ -131 struct _Ptr │ │ │ │ -132 { │ │ │ │ -133 using type = _Up*; │ │ │ │ -134 }; │ │ │ │ -135 │ │ │ │ -136 template │ │ │ │ -137 struct │ │ │ │ -138 _Ptr<_Up, _Ep, __void_t::type::pointer>> │ │ │ │ -139 { │ │ │ │ -140 using type = typename remove_reference<_Ep>::type::pointer; │ │ │ │ -141 }; │ │ │ │ -142 │ │ │ │ -143 public: │ │ │ │ -144 using _DeleterConstraint = enable_if< │ │ │ │ -145 __and_<__not_>, │ │ │ │ -146 is_default_constructible<_Dp>>::value>; │ │ │ │ -147 │ │ │ │ -148 using pointer = typename _Ptr<_Tp, _Dp>::type; │ │ │ │ -149 │ │ │ │ -150 static_assert( !is_rvalue_reference<_Dp>::value, │ │ │ │ -151 "unique_ptr's deleter type must be a function object type" │ │ │ │ -152 " or an lvalue reference type" ); │ │ │ │ -153 │ │ │ │ -154 __uniq_ptr_impl() = default; │ │ │ │ -155 __uniq_ptr_impl(pointer __p) : _M_t() { _M_ptr() = __p; } │ │ │ │ -156 │ │ │ │ -157 template │ │ │ │ -158 __uniq_ptr_impl(pointer __p, _Del&& __d) │ │ │ │ -159 : _M_t(__p, std::_f_o_r_w_a_r_d<_Del>(__d)) { } │ │ │ │ -160 │ │ │ │ -161 __uniq_ptr_impl(__uniq_ptr_impl&& __u) noexcept │ │ │ │ -162 : _M_t(_s_t_d_:_:_m_o_v_e(__u._M_t)) │ │ │ │ -163 { __u._M_ptr() = nullptr; } │ │ │ │ -164 │ │ │ │ -165 __uniq_ptr_impl& operator=(__uniq_ptr_impl&& __u) noexcept │ │ │ │ -166 { │ │ │ │ -167 reset(__u.release()); │ │ │ │ -168 _M_deleter() = _s_t_d_:_:_f_o_r_w_a_r_d_<___D_p_>(__u._M_deleter()); │ │ │ │ -169 return *this; │ │ │ │ -170 } │ │ │ │ -171 │ │ │ │ -172 pointer& _M_ptr() { return std::get<0>(_M_t); } │ │ │ │ -173 pointer _M_ptr() const { return std::get<0>(_M_t); } │ │ │ │ -174 _Dp& _M_deleter() { return std::get<1>(_M_t); } │ │ │ │ -175 const _Dp& _M_deleter() const { return std::get<1>(_M_t); } │ │ │ │ -176 │ │ │ │ -177 void reset(pointer __p) noexcept │ │ │ │ -178 { │ │ │ │ -179 const pointer __old_p = _M_ptr(); │ │ │ │ -180 _M_ptr() = __p; │ │ │ │ -181 if (__old_p) │ │ │ │ -182 _M_deleter()(__old_p); │ │ │ │ -183 } │ │ │ │ -184 │ │ │ │ -185 pointer release() noexcept │ │ │ │ -186 { │ │ │ │ -187 pointer __p = _M_ptr(); │ │ │ │ -188 _M_ptr() = nullptr; │ │ │ │ -189 return __p; │ │ │ │ -190 } │ │ │ │ -191 │ │ │ │ -192 void │ │ │ │ -193 _s_w_a_p(__uniq_ptr_impl& __rhs) noexcept │ │ │ │ -194 { │ │ │ │ -195 using _s_t_d_:_:_s_w_a_p; │ │ │ │ -196 _s_w_a_p(this->_M_ptr(), __rhs._M_ptr()); │ │ │ │ -197 _s_w_a_p(this->_M_deleter(), __rhs._M_deleter()); │ │ │ │ -198 } │ │ │ │ -199 │ │ │ │ -200 private: │ │ │ │ -201 tuple _M_t; │ │ │ │ -202 }; │ │ │ │ -203 │ │ │ │ -204 // Defines move construction + assignment as either defaulted or deleted. │ │ │ │ -205 template _:_:_v_a_l_u_e, │ │ │ │ -207 bool = _i_s___m_o_v_e___a_s_s_i_g_n_a_b_l_e_<___D_p_>_:_:_v_a_l_u_e> │ │ │ │ -208 struct __uniq_ptr_data : __uniq_ptr_impl<_Tp, _Dp> │ │ │ │ -209 { │ │ │ │ -210 using __uniq_ptr_impl<_Tp, _Dp>::__uniq_ptr_impl; │ │ │ │ -211 __uniq_ptr_data(__uniq_ptr_data&&) = default; │ │ │ │ -212 __uniq_ptr_data& operator=(__uniq_ptr_data&&) = default; │ │ │ │ -213 }; │ │ │ │ -214 │ │ │ │ -215 template │ │ │ │ -216 struct __uniq_ptr_data<_Tp, _Dp, true, false> : __uniq_ptr_impl<_Tp, _Dp> │ │ │ │ -217 { │ │ │ │ -218 using __uniq_ptr_impl<_Tp, _Dp>::__uniq_ptr_impl; │ │ │ │ -219 __uniq_ptr_data(__uniq_ptr_data&&) = default; │ │ │ │ -220 __uniq_ptr_data& operator=(__uniq_ptr_data&&) = delete; │ │ │ │ -221 }; │ │ │ │ -222 │ │ │ │ -223 template │ │ │ │ -224 struct __uniq_ptr_data<_Tp, _Dp, false, true> : __uniq_ptr_impl<_Tp, _Dp> │ │ │ │ -225 { │ │ │ │ -226 using __uniq_ptr_impl<_Tp, _Dp>::__uniq_ptr_impl; │ │ │ │ -227 __uniq_ptr_data(__uniq_ptr_data&&) = delete; │ │ │ │ -228 __uniq_ptr_data& operator=(__uniq_ptr_data&&) = default; │ │ │ │ -229 }; │ │ │ │ -230 │ │ │ │ -231 template │ │ │ │ -232 struct __uniq_ptr_data<_Tp, _Dp, false, false> : __uniq_ptr_impl<_Tp, _Dp> │ │ │ │ -233 { │ │ │ │ -234 using __uniq_ptr_impl<_Tp, _Dp>::__uniq_ptr_impl; │ │ │ │ -235 __uniq_ptr_data(__uniq_ptr_data&&) = delete; │ │ │ │ -236 __uniq_ptr_data& operator=(__uniq_ptr_data&&) = delete; │ │ │ │ -237 }; │ │ │ │ -238 /// @endcond │ │ │ │ -239 │ │ │ │ -240 /// 20.7.1.2 unique_ptr for single objects. │ │ │ │ -241 template > │ │ │ │ -_2_4_2 class _u_n_i_q_u_e___p_t_r │ │ │ │ -243 { │ │ │ │ -244 template │ │ │ │ -245 using _DeleterConstraint = │ │ │ │ -246 typename __uniq_ptr_impl<_Tp, _Up>::_DeleterConstraint::type; │ │ │ │ -247 │ │ │ │ -248 __uniq_ptr_data<_Tp, _Dp> _M_t; │ │ │ │ -249 │ │ │ │ -250 public: │ │ │ │ -251 using pointer = typename __uniq_ptr_impl<_Tp, _Dp>::pointer; │ │ │ │ -252 using element_type = _Tp; │ │ │ │ -253 using deleter_type = _Dp; │ │ │ │ -254 │ │ │ │ -255 private: │ │ │ │ -256 // helper template for detecting a safe conversion from another │ │ │ │ -257 // unique_ptr │ │ │ │ -258 template │ │ │ │ -259 using __safe_conversion_up = __and_< │ │ │ │ -260 _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>, │ │ │ │ -261 __not_> │ │ │ │ -262 >; │ │ │ │ -263 │ │ │ │ -264 public: │ │ │ │ -265 // Constructors. │ │ │ │ -266 │ │ │ │ -267 /// Default constructor, creates a unique_ptr that owns nothing. │ │ │ │ -268 template> │ │ │ │ -_2_6_9 constexpr _u_n_i_q_u_e___p_t_r() noexcept │ │ │ │ -270 : _M_t() │ │ │ │ -271 { } │ │ │ │ -272 │ │ │ │ -273 /** Takes ownership of a pointer. │ │ │ │ -274 * │ │ │ │ -275 * @param __p A pointer to an object of @c element_type │ │ │ │ -276 * │ │ │ │ -277 * The deleter will be value-initialized. │ │ │ │ -278 */ │ │ │ │ -279 template> │ │ │ │ -280 explicit │ │ │ │ -_2_8_1 _u_n_i_q_u_e___p_t_r(pointer __p) noexcept │ │ │ │ -282 : _M_t(__p) │ │ │ │ -283 { } │ │ │ │ -284 │ │ │ │ -285 /** Takes ownership of a pointer. │ │ │ │ -286 * │ │ │ │ -287 * @param __p A pointer to an object of @c element_type │ │ │ │ -288 * @param __d A reference to a deleter. │ │ │ │ -289 * │ │ │ │ -290 * The deleter will be initialized with @p __d │ │ │ │ -291 */ │ │ │ │ -292 template>> │ │ │ │ -_2_9_4 _u_n_i_q_u_e___p_t_r(pointer __p, const deleter_type& __d) noexcept │ │ │ │ -295 : _M_t(__p, __d) { } │ │ │ │ -296 │ │ │ │ -297 /** Takes ownership of a pointer. │ │ │ │ -298 * │ │ │ │ -299 * @param __p A pointer to an object of @c element_type │ │ │ │ -300 * @param __d An rvalue reference to a (non-reference) deleter. │ │ │ │ -301 * │ │ │ │ -302 * The deleter will be initialized with @p std::move(__d) │ │ │ │ -303 */ │ │ │ │ -304 template>> │ │ │ │ -_3_0_6 _u_n_i_q_u_e___p_t_r(pointer __p, │ │ │ │ -307 __enable_if_t::value, │ │ │ │ -308 _Del&&> __d) noexcept │ │ │ │ -309 : _M_t(__p, _s_t_d_:_:_m_o_v_e(__d)) │ │ │ │ -310 { } │ │ │ │ -311 │ │ │ │ -312 template::type> │ │ │ │ -314 _u_n_i_q_u_e___p_t_r(pointer, │ │ │ │ -315 __enable_if_t::value, │ │ │ │ -316 _DelUnref&&>) = delete; │ │ │ │ -317 │ │ │ │ -318 /// Creates a unique_ptr that owns nothing. │ │ │ │ -319 template> │ │ │ │ -_3_2_0 constexpr _u_n_i_q_u_e___p_t_r(nullptr_t) noexcept │ │ │ │ -321 : _M_t() │ │ │ │ -322 { } │ │ │ │ -323 │ │ │ │ -324 // Move constructors. │ │ │ │ -325 │ │ │ │ -326 /// Move constructor. │ │ │ │ -_3_2_7 _u_n_i_q_u_e___p_t_r(_u_n_i_q_u_e___p_t_r&&) = default; │ │ │ │ -328 │ │ │ │ -329 /** @brief Converting constructor from another type │ │ │ │ -330 * │ │ │ │ -331 * Requires that the pointer owned by @p __u is convertible to the │ │ │ │ -332 * type of pointer owned by this object, @p __u does not own an array, │ │ │ │ -333 * and @p __u has a compatible deleter type. │ │ │ │ -334 */ │ │ │ │ -335 template, │ │ │ │ -337 typename _c_o_n_d_i_t_i_o_n_a_l_<_i_s___r_e_f_e_r_e_n_c_e_<___D_p_>_:_:_v_a_l_u_e, │ │ │ │ -338 _i_s___s_a_m_e_<___E_p_,_ ___D_p_>, │ │ │ │ -339 _i_s___c_o_n_v_e_r_t_i_b_l_e_<___E_p_,_ ___D_p_>>_:_:_t_y_p_e>> │ │ │ │ -_3_4_0 _u_n_i_q_u_e___p_t_r(_u_n_i_q_u_e___p_t_r_<___U_p_,_ ___E_p_>&& __u) noexcept │ │ │ │ -341 : _M_t(__u.release(), _s_t_d_:_:_f_o_r_w_a_r_d_<___E_p_>(__u.get_deleter())) │ │ │ │ -342 { } │ │ │ │ -343 │ │ │ │ -344#if _GLIBCXX_USE_DEPRECATED │ │ │ │ -345#pragma GCC diagnostic push │ │ │ │ -346#pragma GCC diagnostic ignored "-Wdeprecated-declarations" │ │ │ │ -347 /// Converting constructor from @c auto_ptr │ │ │ │ -348 template, _i_s___s_a_m_e_<___D_p_,_ _d_e_f_a_u_l_t___d_e_l_e_t_e_<___T_p_>>>> │ │ │ │ -350 _u_n_i_q_u_e___p_t_r(_a_u_t_o___p_t_r_<___U_p_>&& __u) noexcept; │ │ │ │ -351#pragma GCC diagnostic pop │ │ │ │ -352#endif │ │ │ │ -353 │ │ │ │ -354 /// Destructor, invokes the deleter if the stored pointer is not null. │ │ │ │ -_3_5_5 _~_u_n_i_q_u_e___p_t_r() noexcept │ │ │ │ -356 { │ │ │ │ -357 static_assert(__is_invocable::value, │ │ │ │ -358 "unique_ptr's deleter must be invocable with a pointer"); │ │ │ │ -359 auto& __ptr = _M_t._M_ptr(); │ │ │ │ -360 if (__ptr != nullptr) │ │ │ │ -361 _g_e_t___d_e_l_e_t_e_r()(_s_t_d_:_:_m_o_v_e(__ptr)); │ │ │ │ -362 __ptr = pointer(); │ │ │ │ -363 } │ │ │ │ -364 │ │ │ │ -365 // Assignment. │ │ │ │ -366 │ │ │ │ -367 /** @brief Move assignment operator. │ │ │ │ -368 * │ │ │ │ -369 * Invokes the deleter if this object owns a pointer. │ │ │ │ -370 */ │ │ │ │ -_3_7_1 _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; │ │ │ │ -372 │ │ │ │ -373 /** @brief Assignment from another type. │ │ │ │ -374 * │ │ │ │ -375 * @param __u The object to transfer ownership from, which owns a │ │ │ │ -376 * convertible pointer to a non-array object. │ │ │ │ -377 * │ │ │ │ -378 * Invokes the deleter if this object owns a pointer. │ │ │ │ -379 */ │ │ │ │ -380 template │ │ │ │ -381 typename _e_n_a_b_l_e___i_f< __and_< │ │ │ │ -382 __safe_conversion_up<_Up, _Ep>, │ │ │ │ -383 _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_&_&_> │ │ │ │ -384 >::value, │ │ │ │ -385 _u_n_i_q_u_e___p_t_r&>_:_:_t_y_p_e │ │ │ │ -_3_8_6 _o_p_e_r_a_t_o_r_=(_u_n_i_q_u_e___p_t_r_<___U_p_,_ ___E_p_>&& __u) noexcept │ │ │ │ -387 { │ │ │ │ -388 _r_e_s_e_t(__u.release()); │ │ │ │ -389 _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()); │ │ │ │ -390 return *this; │ │ │ │ -391 } │ │ │ │ -392 │ │ │ │ -393 /// Reset the %unique_ptr to empty, invoking the deleter if necessary. │ │ │ │ -394 _u_n_i_q_u_e___p_t_r& │ │ │ │ -_3_9_5 _o_p_e_r_a_t_o_r_=(nullptr_t) noexcept │ │ │ │ -396 { │ │ │ │ -397 _r_e_s_e_t(); │ │ │ │ -398 return *this; │ │ │ │ -399 } │ │ │ │ -400 │ │ │ │ -401 // Observers. │ │ │ │ -402 │ │ │ │ -403 /// Dereference the stored pointer. │ │ │ │ -404 typename add_lvalue_reference::type │ │ │ │ -_4_0_5 _o_p_e_r_a_t_o_r_*() const │ │ │ │ -406 { │ │ │ │ -407 __glibcxx_assert(_g_e_t() != pointer()); │ │ │ │ -408 return *_g_e_t(); │ │ │ │ -409 } │ │ │ │ -410 │ │ │ │ -411 /// Return the stored pointer. │ │ │ │ -412 pointer │ │ │ │ -_4_1_3 _o_p_e_r_a_t_o_r_-_>() const noexcept │ │ │ │ -414 { │ │ │ │ -415 _GLIBCXX_DEBUG_PEDASSERT(_g_e_t() != pointer()); │ │ │ │ -416 return _g_e_t(); │ │ │ │ -417 } │ │ │ │ -418 │ │ │ │ -419 /// Return the stored pointer. │ │ │ │ -420 pointer │ │ │ │ -_4_2_1 _g_e_t() const noexcept │ │ │ │ -422 { return _M_t._M_ptr(); } │ │ │ │ -423 │ │ │ │ -424 /// Return a reference to the stored deleter. │ │ │ │ -425 deleter_type& │ │ │ │ -_4_2_6 _g_e_t___d_e_l_e_t_e_r() noexcept │ │ │ │ -427 { return _M_t._M_deleter(); } │ │ │ │ -428 │ │ │ │ -429 /// Return a reference to the stored deleter. │ │ │ │ -430 const deleter_type& │ │ │ │ -_4_3_1 _g_e_t___d_e_l_e_t_e_r() const noexcept │ │ │ │ -432 { return _M_t._M_deleter(); } │ │ │ │ -433 │ │ │ │ -434 /// Return @c true if the stored pointer is not null. │ │ │ │ -_4_3_5 explicit operator bool() const noexcept │ │ │ │ -436 { return _g_e_t() == pointer() ? false : true; } │ │ │ │ -437 │ │ │ │ -438 // Modifiers. │ │ │ │ -439 │ │ │ │ -440 /// Release ownership of any stored pointer. │ │ │ │ -441 pointer │ │ │ │ -_4_4_2 _r_e_l_e_a_s_e() noexcept │ │ │ │ -443 { return _M_t.release(); } │ │ │ │ -444 │ │ │ │ -445 /** @brief Replace the stored pointer. │ │ │ │ -446 * │ │ │ │ -447 * @param __p The new pointer to store. │ │ │ │ -448 * │ │ │ │ -449 * The deleter will be invoked if a pointer is already owned. │ │ │ │ -450 */ │ │ │ │ -451 void │ │ │ │ -_4_5_2 _r_e_s_e_t(pointer __p = pointer()) noexcept │ │ │ │ -453 { │ │ │ │ -454 static_assert(__is_invocable::value, │ │ │ │ -455 "unique_ptr's deleter must be invocable with a pointer"); │ │ │ │ -456 _M_t.reset(_s_t_d_:_:_m_o_v_e(__p)); │ │ │ │ -457 } │ │ │ │ -458 │ │ │ │ -459 /// Exchange the pointer and deleter with another object. │ │ │ │ -460 void │ │ │ │ -_4_6_1 _s_w_a_p(_u_n_i_q_u_e___p_t_r& __u) noexcept │ │ │ │ -462 { │ │ │ │ -463 static_assert(__is_swappable<_Dp>::value, "deleter must be swappable"); │ │ │ │ -464 _M_t.swap(__u._M_t); │ │ │ │ -465 } │ │ │ │ -466 │ │ │ │ -467 // Disable copy from lvalue. │ │ │ │ -468 _u_n_i_q_u_e___p_t_r(const _u_n_i_q_u_e___p_t_r&) = delete; │ │ │ │ -469 _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; │ │ │ │ -470 }; │ │ │ │ -471 │ │ │ │ -472 /// 20.7.1.3 unique_ptr for array objects with a runtime length │ │ │ │ -473 // [unique.ptr.runtime] │ │ │ │ -474 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ -475 // DR 740 - omit specialization for array objects with a compile time │ │ │ │ -length │ │ │ │ -476 template │ │ │ │ -_4_7_7 class _u_n_i_q_u_e___p_t_r<_Tp[], _Dp> │ │ │ │ -478 { │ │ │ │ -479 template │ │ │ │ -480 using _DeleterConstraint = │ │ │ │ -481 typename __uniq_ptr_impl<_Tp, _Up>::_DeleterConstraint::type; │ │ │ │ -482 │ │ │ │ -483 __uniq_ptr_data<_Tp, _Dp> _M_t; │ │ │ │ -484 │ │ │ │ -485 template │ │ │ │ -486 using __remove_cv = typename remove_cv<_Up>::type; │ │ │ │ -487 │ │ │ │ -488 // like is_base_of<_Tp, _Up> but false if unqualified types are the same │ │ │ │ -489 template │ │ │ │ -490 using __is_derived_Tp │ │ │ │ -491 = __and_< is_base_of<_Tp, _Up>, │ │ │ │ -492 __not_, __remove_cv<_Up>>> >; │ │ │ │ -493 │ │ │ │ -494 public: │ │ │ │ -495 using pointer = typename __uniq_ptr_impl<_Tp, _Dp>::pointer; │ │ │ │ -496 using element_type = _Tp; │ │ │ │ -497 using deleter_type = _Dp; │ │ │ │ -498 │ │ │ │ -499 // helper template for detecting a safe conversion from another │ │ │ │ -500 // unique_ptr │ │ │ │ -501 template, │ │ │ │ -503 typename _UP_pointer = typename _UPtr::pointer, │ │ │ │ -504 typename _UP_element_type = typename _UPtr::element_type> │ │ │ │ -505 using __safe_conversion_up = __and_< │ │ │ │ -506 _i_s___a_r_r_a_y_<___U_p_>, │ │ │ │ -507 _i_s___s_a_m_e_<_p_o_i_n_t_e_r_,_ _e_l_e_m_e_n_t___t_y_p_e_*_>, │ │ │ │ -508 _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_*_>, │ │ │ │ -509 _i_s___c_o_n_v_e_r_t_i_b_l_e<_UP_element_type(*)[], element_type(*)[]> │ │ │ │ -510 >; │ │ │ │ -511 │ │ │ │ -512 // helper template for detecting a safe conversion from a raw pointer │ │ │ │ -513 template │ │ │ │ -514 using __safe_conversion_raw = __and_< │ │ │ │ -515 __or_<__or_, │ │ │ │ -516 _i_s___s_a_m_e_<___U_p_,_ _n_u_l_l_p_t_r___t_>>, │ │ │ │ -517 __and_, │ │ │ │ -518 _i_s___s_a_m_e_<_p_o_i_n_t_e_r_,_ _e_l_e_m_e_n_t___t_y_p_e_*_>, │ │ │ │ -519 _i_s___c_o_n_v_e_r_t_i_b_l_e< │ │ │ │ -520 typename remove_pointer<_Up>::type(*)[], │ │ │ │ -521 element_type(*)[]> │ │ │ │ -522 > │ │ │ │ -523 > │ │ │ │ -524 >; │ │ │ │ -525 │ │ │ │ -526 // Constructors. │ │ │ │ -527 │ │ │ │ -528 /// Default constructor, creates a unique_ptr that owns nothing. │ │ │ │ -_5_2_9 template> │ │ │ │ -530 constexpr _u_n_i_q_u_e___p_t_r() noexcept │ │ │ │ -531 : _M_t() │ │ │ │ -532 { } │ │ │ │ -533 │ │ │ │ -534 /** Takes ownership of a pointer. │ │ │ │ -535 * │ │ │ │ -536 * @param __p A pointer to an array of a type safely convertible │ │ │ │ -537 * to an array of @c element_type │ │ │ │ -538 * │ │ │ │ -539 * The deleter will be value-initialized. │ │ │ │ -540 */ │ │ │ │ -541 template, │ │ │ │ -544 typename = typename _e_n_a_b_l_e___i_f< │ │ │ │ -545 __safe_conversion_raw<_Up>::value, bool>_:_:_t_y_p_e> │ │ │ │ -_5_4_6 explicit │ │ │ │ -547 _u_n_i_q_u_e___p_t_r(_Up __p) noexcept │ │ │ │ -548 : _M_t(__p) │ │ │ │ -549 { } │ │ │ │ -550 │ │ │ │ -551 /** Takes ownership of a pointer. │ │ │ │ -552 * │ │ │ │ -553 * @param __p A pointer to an array of a type safely convertible │ │ │ │ -554 * to an array of @c element_type │ │ │ │ -555 * @param __d A reference to a deleter. │ │ │ │ -556 * │ │ │ │ -557 * The deleter will be initialized with @p __d │ │ │ │ -558 */ │ │ │ │ -559 template, │ │ │ │ -_5_6_1 _i_s___c_o_p_y___c_o_n_s_t_r_u_c_t_i_b_l_e_<___D_e_l_>>> │ │ │ │ -562 _u_n_i_q_u_e___p_t_r(_Up __p, const deleter_type& __d) noexcept │ │ │ │ -563 : _M_t(__p, __d) { } │ │ │ │ -564 │ │ │ │ -565 /** Takes ownership of a pointer. │ │ │ │ -566 * │ │ │ │ -567 * @param __p A pointer to an array of a type safely convertible │ │ │ │ -568 * to an array of @c element_type │ │ │ │ -569 * @param __d A reference to a deleter. │ │ │ │ -570 * │ │ │ │ -571 * The deleter will be initialized with @p std::move(__d) │ │ │ │ -572 */ │ │ │ │ -573 template, │ │ │ │ -_5_7_5 _i_s___m_o_v_e___c_o_n_s_t_r_u_c_t_i_b_l_e_<___D_e_l_>>> │ │ │ │ -576 _u_n_i_q_u_e___p_t_r(_Up __p, │ │ │ │ -577 __enable_if_t::value, │ │ │ │ -578 _Del&&> __d) noexcept │ │ │ │ -579 : _M_t(_s_t_d_:_:_m_o_v_e(__p), _s_t_d_:_:_m_o_v_e(__d)) │ │ │ │ -580 { } │ │ │ │ -581 │ │ │ │ -582 template::type, │ │ │ │ -584 typename = _Require<__safe_conversion_raw<_Up>>> │ │ │ │ -585 _u_n_i_q_u_e___p_t_r(_Up, │ │ │ │ -586 __enable_if_t::value, │ │ │ │ -587 _DelUnref&&>) = delete; │ │ │ │ -588 │ │ │ │ -_5_8_9 /// Move constructor. │ │ │ │ -590 _u_n_i_q_u_e___p_t_r(_u_n_i_q_u_e___p_t_r&&) = default; │ │ │ │ -591 │ │ │ │ -592 /// Creates a unique_ptr that owns nothing. │ │ │ │ -_5_9_3 template> │ │ │ │ -594 constexpr _u_n_i_q_u_e___p_t_r(nullptr_t) noexcept │ │ │ │ -595 : _M_t() │ │ │ │ -596 { } │ │ │ │ -597 │ │ │ │ -598 template, │ │ │ │ -600 typename _c_o_n_d_i_t_i_o_n_a_l_<_i_s___r_e_f_e_r_e_n_c_e_<___D_p_>_:_:_v_a_l_u_e, │ │ │ │ -601 _i_s___s_a_m_e_<___E_p_,_ ___D_p_>, │ │ │ │ -602 _i_s___c_o_n_v_e_r_t_i_b_l_e_<___E_p_,_ ___D_p_>>_:_:_t_y_p_e>> │ │ │ │ -603 _u_n_i_q_u_e___p_t_r(_u_n_i_q_u_e___p_t_r_<___U_p_,_ ___E_p_>&& __u) noexcept │ │ │ │ -604 : _M_t(__u.release(), _s_t_d_:_:_f_o_r_w_a_r_d_<___E_p_>(__u.get_deleter())) │ │ │ │ -605 { } │ │ │ │ -606 │ │ │ │ -_6_0_7 /// Destructor, invokes the deleter if the stored pointer is not null. │ │ │ │ -608 _~_u_n_i_q_u_e___p_t_r() │ │ │ │ -609 { │ │ │ │ -610 auto& __ptr = _M_t._M_ptr(); │ │ │ │ -611 if (__ptr != nullptr) │ │ │ │ -612 _g_e_t___d_e_l_e_t_e_r()(__ptr); │ │ │ │ -613 __ptr = pointer(); │ │ │ │ -614 } │ │ │ │ -615 │ │ │ │ -616 // Assignment. │ │ │ │ -617 │ │ │ │ -618 /** @brief Move assignment operator. │ │ │ │ -619 * │ │ │ │ -620 * Invokes the deleter if this object owns a pointer. │ │ │ │ -621 */ │ │ │ │ -_6_2_2 _u_n_i_q_u_e___p_t_r& │ │ │ │ -623 _o_p_e_r_a_t_o_r_=(_u_n_i_q_u_e___p_t_r&&) = default; │ │ │ │ -624 │ │ │ │ -625 /** @brief Assignment from another type. │ │ │ │ -626 * │ │ │ │ -627 * @param __u The object to transfer ownership from, which owns a │ │ │ │ -628 * convertible pointer to an array object. │ │ │ │ -629 * │ │ │ │ -630 * Invokes the deleter if this object owns a pointer. │ │ │ │ -631 */ │ │ │ │ -632 template │ │ │ │ -633 typename │ │ │ │ -634 _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_>, │ │ │ │ -635 _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_&_&_> │ │ │ │ -636 >::value, │ │ │ │ -_6_3_7 _u_n_i_q_u_e___p_t_r&>_:_:_t_y_p_e │ │ │ │ -638 _o_p_e_r_a_t_o_r_=(_u_n_i_q_u_e___p_t_r_<___U_p_,_ ___E_p_>&& __u) noexcept │ │ │ │ -639 { │ │ │ │ -640 _r_e_s_e_t(__u.release()); │ │ │ │ -641 _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()); │ │ │ │ -642 return *this; │ │ │ │ -643 } │ │ │ │ -644 │ │ │ │ -645 /// Reset the %unique_ptr to empty, invoking the deleter if necessary. │ │ │ │ -_6_4_6 _u_n_i_q_u_e___p_t_r& │ │ │ │ -647 _o_p_e_r_a_t_o_r_=(nullptr_t) noexcept │ │ │ │ -648 { │ │ │ │ -649 _r_e_s_e_t(); │ │ │ │ -650 return *this; │ │ │ │ -651 } │ │ │ │ -652 │ │ │ │ -653 // Observers. │ │ │ │ -654 │ │ │ │ -655 /// Access an element of owned array. │ │ │ │ -_6_5_6 typename std::add_lvalue_reference::type │ │ │ │ -657 _o_p_e_r_a_t_o_r_[_](size_t __i) const │ │ │ │ -658 { │ │ │ │ -659 __glibcxx_assert(_g_e_t() != pointer()); │ │ │ │ -660 return _g_e_t()[__i]; │ │ │ │ -661 } │ │ │ │ -662 │ │ │ │ -663 /// Return the stored pointer. │ │ │ │ -_6_6_4 pointer │ │ │ │ -665 _g_e_t() const noexcept │ │ │ │ -666 { return _M_t._M_ptr(); } │ │ │ │ -667 │ │ │ │ -668 /// Return a reference to the stored deleter. │ │ │ │ -_6_6_9 deleter_type& │ │ │ │ -670 _g_e_t___d_e_l_e_t_e_r() noexcept │ │ │ │ -671 { return _M_t._M_deleter(); } │ │ │ │ -672 │ │ │ │ -673 /// Return a reference to the stored deleter. │ │ │ │ -_6_7_4 const deleter_type& │ │ │ │ -675 _g_e_t___d_e_l_e_t_e_r() const noexcept │ │ │ │ -676 { return _M_t._M_deleter(); } │ │ │ │ -677 │ │ │ │ -_6_7_8 /// Return @c true if the stored pointer is not null. │ │ │ │ -679 explicit operator bool() const noexcept │ │ │ │ -680 { return _g_e_t() == pointer() ? false : true; } │ │ │ │ -681 │ │ │ │ -682 // Modifiers. │ │ │ │ -683 │ │ │ │ -684 /// Release ownership of any stored pointer. │ │ │ │ -_6_8_5 pointer │ │ │ │ -686 _r_e_l_e_a_s_e() noexcept │ │ │ │ -687 { return _M_t.release(); } │ │ │ │ -688 │ │ │ │ -689 /** @brief Replace the stored pointer. │ │ │ │ -690 * │ │ │ │ -691 * @param __p The new pointer to store. │ │ │ │ -692 * │ │ │ │ -693 * The deleter will be invoked if a pointer is already owned. │ │ │ │ -694 */ │ │ │ │ -695 template , │ │ │ │ -698 __and_, │ │ │ │ -699 _i_s___p_o_i_n_t_e_r_<___U_p_>, │ │ │ │ -700 _i_s___c_o_n_v_e_r_t_i_b_l_e< │ │ │ │ -701 typename remove_pointer<_Up>::type(*)[], │ │ │ │ -702 element_type(*)[] │ │ │ │ -703 > │ │ │ │ -704 > │ │ │ │ -705 > │ │ │ │ -706 >> │ │ │ │ -_7_0_7 void │ │ │ │ -708 _r_e_s_e_t(_Up __p) noexcept │ │ │ │ -709 { _M_t.reset(_s_t_d_:_:_m_o_v_e(__p)); } │ │ │ │ -710 │ │ │ │ -711 void _r_e_s_e_t(nullptr_t = nullptr) noexcept │ │ │ │ -712 { _r_e_s_e_t(pointer()); } │ │ │ │ -713 │ │ │ │ -714 /// Exchange the pointer and deleter with another object. │ │ │ │ -_7_1_5 void │ │ │ │ -716 _s_w_a_p(_u_n_i_q_u_e___p_t_r& __u) noexcept │ │ │ │ -717 { │ │ │ │ -718 static_assert(__is_swappable<_Dp>::value, "deleter must be swappable"); │ │ │ │ -719 _M_t.swap(__u._M_t); │ │ │ │ -720 } │ │ │ │ -721 │ │ │ │ -722 // Disable copy from lvalue. │ │ │ │ -723 _u_n_i_q_u_e___p_t_r(const _u_n_i_q_u_e___p_t_r&) = delete; │ │ │ │ -724 _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; │ │ │ │ -725 }; │ │ │ │ -726 │ │ │ │ -727 /// @relates unique_ptr @{ │ │ │ │ -728 │ │ │ │ -729 /// Swap overload for unique_ptr │ │ │ │ -730 template │ │ │ │ -731 inline │ │ │ │ -732#if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11 │ │ │ │ -733 // Constrained free swap overload, see p0185r1 │ │ │ │ -734 typename enable_if<__is_swappable<_Dp>::value>::type │ │ │ │ -735#else │ │ │ │ -736 void │ │ │ │ -737#endif │ │ │ │ -_7_3_8 _s_w_a_p(_u_n_i_q_u_e___p_t_r_<___T_p_,_ ___D_p_>& __x, │ │ │ │ -739 _u_n_i_q_u_e___p_t_r_<___T_p_,_ ___D_p_>& __y) noexcept │ │ │ │ -740 { __x.swap(__y); } │ │ │ │ -741 │ │ │ │ -742#if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11 │ │ │ │ -743 template │ │ │ │ -744 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>_:_:_t_y_p_e │ │ │ │ -745 _s_w_a_p(_u_n_i_q_u_e___p_t_r_<___T_p_,_ ___D_p_>&, │ │ │ │ -746 _u_n_i_q_u_e___p_t_r_<___T_p_,_ ___D_p_>&) = delete; │ │ │ │ -747#endif │ │ │ │ -748 │ │ │ │ -749 /// Equality operator for unique_ptr objects, compares the owned pointers │ │ │ │ -750 template │ │ │ │ -752 _GLIBCXX_NODISCARD inline bool │ │ │ │ -_7_5_3 _o_p_e_r_a_t_o_r_=_=(const _u_n_i_q_u_e___p_t_r_<___T_p_,_ ___D_p_>& __x, │ │ │ │ -754 const _u_n_i_q_u_e___p_t_r_<___U_p_,_ ___E_p_>& __y) │ │ │ │ -755 { return __x._g_e_t() == __y._g_e_t(); } │ │ │ │ -756 │ │ │ │ -757 /// unique_ptr comparison with nullptr │ │ │ │ -758 template │ │ │ │ -759 _GLIBCXX_NODISCARD inline bool │ │ │ │ -_7_6_0 _o_p_e_r_a_t_o_r_=_=(const _u_n_i_q_u_e___p_t_r_<___T_p_,_ ___D_p_>& __x, nullptr_t) noexcept │ │ │ │ -761 { return !__x; } │ │ │ │ -762 │ │ │ │ -763#ifndef __cpp_lib_three_way_comparison │ │ │ │ -764 /// unique_ptr comparison with nullptr │ │ │ │ -765 template │ │ │ │ -766 _GLIBCXX_NODISCARD inline bool │ │ │ │ -_7_6_7 _o_p_e_r_a_t_o_r_=_=(nullptr_t, const _u_n_i_q_u_e___p_t_r_<___T_p_,_ ___D_p_>& __x) noexcept │ │ │ │ -768 { return !__x; } │ │ │ │ -769 │ │ │ │ -770 /// Inequality operator for unique_ptr objects, compares the owned pointers │ │ │ │ -771 template │ │ │ │ -773 _GLIBCXX_NODISCARD inline bool │ │ │ │ -_7_7_4 _o_p_e_r_a_t_o_r_!_=(const _u_n_i_q_u_e___p_t_r_<___T_p_,_ ___D_p_>& __x, │ │ │ │ -775 const _u_n_i_q_u_e___p_t_r_<___U_p_,_ ___E_p_>& __y) │ │ │ │ -776 { return __x._g_e_t() != __y._g_e_t(); } │ │ │ │ -777 │ │ │ │ -778 /// unique_ptr comparison with nullptr │ │ │ │ -779 template │ │ │ │ -780 _GLIBCXX_NODISCARD inline bool │ │ │ │ -_7_8_1 _o_p_e_r_a_t_o_r_!_=(const _u_n_i_q_u_e___p_t_r_<___T_p_,_ ___D_p_>& __x, nullptr_t) noexcept │ │ │ │ -782 { return (bool)__x; } │ │ │ │ -783 │ │ │ │ -784 /// unique_ptr comparison with nullptr │ │ │ │ -785 template │ │ │ │ -786 _GLIBCXX_NODISCARD inline bool │ │ │ │ -_7_8_7 _o_p_e_r_a_t_o_r_!_=(nullptr_t, const _u_n_i_q_u_e___p_t_r_<___T_p_,_ ___D_p_>& __x) noexcept │ │ │ │ -788 { return (bool)__x; } │ │ │ │ -789#endif // three way comparison │ │ │ │ -790 │ │ │ │ -791 /// Relational operator for unique_ptr objects, compares the owned pointers │ │ │ │ -792 template │ │ │ │ -_7_9_4 _GLIBCXX_NODISCARD inline bool │ │ │ │ -795 _o_p_e_r_a_t_o_r_<(const _u_n_i_q_u_e___p_t_r_<___T_p_,_ ___D_p_>& __x, │ │ │ │ -796 const _u_n_i_q_u_e___p_t_r_<___U_p_,_ ___E_p_>& __y) │ │ │ │ -797 { │ │ │ │ -798 typedef typename │ │ │ │ -799 _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, │ │ │ │ -800 typename unique_ptr<_Up, _Ep>::pointer>_:_:_t_y_p_e _CT; │ │ │ │ -801 return _s_t_d_:_:_l_e_s_s_<___C_T_>()(__x._g_e_t(), __y._g_e_t()); │ │ │ │ -802 } │ │ │ │ -803 │ │ │ │ -804 /// unique_ptr comparison with nullptr │ │ │ │ -805 template │ │ │ │ -_8_0_6 _GLIBCXX_NODISCARD inline bool │ │ │ │ -807 _o_p_e_r_a_t_o_r_<(const _u_n_i_q_u_e___p_t_r_<___T_p_,_ ___D_p_>& __x, nullptr_t) │ │ │ │ -808 { │ │ │ │ -809 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._g_e_t(), │ │ │ │ -810 nullptr); │ │ │ │ -811 } │ │ │ │ -812 │ │ │ │ -813 /// unique_ptr comparison with nullptr │ │ │ │ -814 template │ │ │ │ -_8_1_5 _GLIBCXX_NODISCARD inline bool │ │ │ │ -816 _o_p_e_r_a_t_o_r_<(nullptr_t, const _u_n_i_q_u_e___p_t_r_<___T_p_,_ ___D_p_>& __x) │ │ │ │ -817 { │ │ │ │ -818 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, │ │ │ │ -819 __x._g_e_t()); │ │ │ │ -820 } │ │ │ │ -821 │ │ │ │ -822 /// Relational operator for unique_ptr objects, compares the owned pointers │ │ │ │ -823 template │ │ │ │ -_8_2_5 _GLIBCXX_NODISCARD inline bool │ │ │ │ -826 _o_p_e_r_a_t_o_r_<_=(const _u_n_i_q_u_e___p_t_r_<___T_p_,_ ___D_p_>& __x, │ │ │ │ -827 const _u_n_i_q_u_e___p_t_r_<___U_p_,_ ___E_p_>& __y) │ │ │ │ -828 { return !(__y < __x); } │ │ │ │ -829 │ │ │ │ -830 /// unique_ptr comparison with nullptr │ │ │ │ -831 template │ │ │ │ -_8_3_2 _GLIBCXX_NODISCARD inline bool │ │ │ │ -833 _o_p_e_r_a_t_o_r_<_=(const _u_n_i_q_u_e___p_t_r_<___T_p_,_ ___D_p_>& __x, nullptr_t) │ │ │ │ -834 { return !(nullptr < __x); } │ │ │ │ -835 │ │ │ │ -836 /// unique_ptr comparison with nullptr │ │ │ │ -837 template │ │ │ │ -_8_3_8 _GLIBCXX_NODISCARD inline bool │ │ │ │ -839 _o_p_e_r_a_t_o_r_<_=(nullptr_t, const _u_n_i_q_u_e___p_t_r_<___T_p_,_ ___D_p_>& __x) │ │ │ │ -840 { return !(__x < nullptr); } │ │ │ │ -841 │ │ │ │ -842 /// Relational operator for unique_ptr objects, compares the owned pointers │ │ │ │ -843 template │ │ │ │ -845 _GLIBCXX_NODISCARD inline bool │ │ │ │ -_8_4_6 _o_p_e_r_a_t_o_r_>(const _u_n_i_q_u_e___p_t_r_<___T_p_,_ ___D_p_>& __x, │ │ │ │ -847 const _u_n_i_q_u_e___p_t_r_<___U_p_,_ ___E_p_>& __y) │ │ │ │ -848 { return (__y < __x); } │ │ │ │ -849 │ │ │ │ -850 /// unique_ptr comparison with nullptr │ │ │ │ -851 template │ │ │ │ -852 _GLIBCXX_NODISCARD inline bool │ │ │ │ -_8_5_3 _o_p_e_r_a_t_o_r_>(const _u_n_i_q_u_e___p_t_r_<___T_p_,_ ___D_p_>& __x, nullptr_t) │ │ │ │ -854 { │ │ │ │ -855 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, │ │ │ │ -856 __x._g_e_t()); │ │ │ │ -857 } │ │ │ │ -858 │ │ │ │ -859 /// unique_ptr comparison with nullptr │ │ │ │ -860 template │ │ │ │ -861 _GLIBCXX_NODISCARD inline bool │ │ │ │ -_8_6_2 _o_p_e_r_a_t_o_r_>(nullptr_t, const _u_n_i_q_u_e___p_t_r_<___T_p_,_ ___D_p_>& __x) │ │ │ │ -863 { │ │ │ │ -864 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._g_e_t(), │ │ │ │ -865 nullptr); │ │ │ │ -866 } │ │ │ │ -867 │ │ │ │ -868 /// Relational operator for unique_ptr objects, compares the owned pointers │ │ │ │ -869 template │ │ │ │ -871 _GLIBCXX_NODISCARD inline bool │ │ │ │ -_8_7_2 _o_p_e_r_a_t_o_r_>_=(const _u_n_i_q_u_e___p_t_r_<___T_p_,_ ___D_p_>& __x, │ │ │ │ -873 const _u_n_i_q_u_e___p_t_r_<___U_p_,_ ___E_p_>& __y) │ │ │ │ -874 { return !(__x < __y); } │ │ │ │ -875 │ │ │ │ -876 /// unique_ptr comparison with nullptr │ │ │ │ -877 template │ │ │ │ -878 _GLIBCXX_NODISCARD inline bool │ │ │ │ -_8_7_9 _o_p_e_r_a_t_o_r_>_=(const _u_n_i_q_u_e___p_t_r_<___T_p_,_ ___D_p_>& __x, nullptr_t) │ │ │ │ -880 { return !(__x < nullptr); } │ │ │ │ -881 │ │ │ │ -882 /// unique_ptr comparison with nullptr │ │ │ │ -883 template │ │ │ │ -884 _GLIBCXX_NODISCARD inline bool │ │ │ │ -_8_8_5 _o_p_e_r_a_t_o_r_>_=(nullptr_t, const _u_n_i_q_u_e___p_t_r_<___T_p_,_ ___D_p_>& __x) │ │ │ │ -886 { return !(nullptr < __x); } │ │ │ │ -887 │ │ │ │ -888#ifdef __cpp_lib_three_way_comparison │ │ │ │ -889 template │ │ │ │ -890 requires three_way_comparable_with::pointer, │ │ │ │ -891 typename unique_ptr<_Up, _Ep>::pointer> │ │ │ │ -892 inline │ │ │ │ -893 compare_three_way_result_t::pointer, │ │ │ │ -894 typename unique_ptr<_Up, _Ep>::pointer> │ │ │ │ -895 operator<=>(const _u_n_i_q_u_e___p_t_r_<___T_p_,_ ___D_p_>& __x, │ │ │ │ -896 const _u_n_i_q_u_e___p_t_r_<___U_p_,_ ___E_p_>& __y) │ │ │ │ -897 { return compare_three_way()(__x._g_e_t(), __y._g_e_t()); } │ │ │ │ -898 │ │ │ │ -899 template │ │ │ │ -900 requires three_way_comparable::pointer> │ │ │ │ -901 inline │ │ │ │ -902 compare_three_way_result_t::pointer> │ │ │ │ -903 operator<=>(const unique_ptr<_Tp, _Dp>& __x, nullptr_t) │ │ │ │ -904 { │ │ │ │ -905 using pointer = typename unique_ptr<_Tp, _Dp>::pointer; │ │ │ │ -906 return compare_three_way()(__x.get(), static_cast(nullptr)); │ │ │ │ -907 } │ │ │ │ -908#endif │ │ │ │ -909 /// @} relates unique_ptr │ │ │ │ -910 │ │ │ │ -911 /// @cond undocumented │ │ │ │ -912 template::__enable_hash_call> │ │ │ │ -914 struct __uniq_ptr_hash │ │ │ │ -915#if ! _GLIBCXX_INLINE_VERSION │ │ │ │ -916 : private __poison_hash<_Ptr> │ │ │ │ -917#endif │ │ │ │ -918 { │ │ │ │ -919 size_t │ │ │ │ -920 operator()(const _Up& __u) const │ │ │ │ -921 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_>()))) │ │ │ │ -922 { return hash<_Ptr>()(__u.get()); } │ │ │ │ -923 }; │ │ │ │ -924 │ │ │ │ -925 template │ │ │ │ -926 struct __uniq_ptr_hash<_Up, _Ptr, false> │ │ │ │ -927 : private __poison_hash<_Ptr> │ │ │ │ -928 { }; │ │ │ │ -929 /// @endcond │ │ │ │ -930 │ │ │ │ -931 /// std::hash specialization for unique_ptr. │ │ │ │ -932 template │ │ │ │ -_9_3_3 struct _h_a_s_h<_u_n_i_q_u_e___p_t_r<_Tp, _Dp>> │ │ │ │ -934 : public __hash_base>, │ │ │ │ -935 public __uniq_ptr_hash> │ │ │ │ -936 { }; │ │ │ │ -937 │ │ │ │ -938#if __cplusplus >= 201402L │ │ │ │ -939 /// @relates unique_ptr @{ │ │ │ │ -_9_4_0#define __cpp_lib_make_unique 201304 │ │ │ │ -941 │ │ │ │ -942 /// @cond undocumented │ │ │ │ -943 │ │ │ │ -944 template │ │ │ │ -945 struct _MakeUniq │ │ │ │ -946 { typedef unique_ptr<_Tp> __single_object; }; │ │ │ │ -947 │ │ │ │ -948 template │ │ │ │ -949 struct _MakeUniq<_Tp[]> │ │ │ │ -950 { typedef unique_ptr<_Tp[]> __array; }; │ │ │ │ -951 │ │ │ │ -952 template │ │ │ │ -953 struct _MakeUniq<_Tp[_Bound]> │ │ │ │ -954 { struct __invalid_type { }; }; │ │ │ │ -955 │ │ │ │ -956 /// @endcond │ │ │ │ -957 │ │ │ │ -958 /// std::make_unique for single objects │ │ │ │ -959 template │ │ │ │ -960 inline typename _MakeUniq<_Tp>::__single_object │ │ │ │ -_9_6_1 _m_a_k_e___u_n_i_q_u_e(_Args&&... __args) │ │ │ │ -962 { 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_>(__args)...)); } │ │ │ │ -963 │ │ │ │ -964 /// std::make_unique for arrays of unknown bound │ │ │ │ -965 template │ │ │ │ -966 inline typename _MakeUniq<_Tp>::__array │ │ │ │ -_9_6_7 _m_a_k_e___u_n_i_q_u_e(size_t __num) │ │ │ │ -968 { 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_>[__num]()); } │ │ │ │ -969 │ │ │ │ -970 /// Disable std::make_unique for arrays of known bound │ │ │ │ -971 template │ │ │ │ -972 typename _MakeUniq<_Tp>::__invalid_type │ │ │ │ -_9_7_3 _m_a_k_e___u_n_i_q_u_e(_Args&&...) = delete; │ │ │ │ -974 │ │ │ │ -975#if __cplusplus > 201703L │ │ │ │ -976 /// std::make_unique_for_overwrite for single objects │ │ │ │ -977 template │ │ │ │ -978 inline typename _MakeUniq<_Tp>::__single_object │ │ │ │ -979 make_unique_for_overwrite() │ │ │ │ -980 { return _u_n_i_q_u_e___p_t_r_<___T_p_>(new _Tp); } │ │ │ │ -981 │ │ │ │ -982 /// std::make_unique_for_overwrite for arrays of unknown bound │ │ │ │ -983 template │ │ │ │ -984 inline typename _MakeUniq<_Tp>::__array │ │ │ │ -985 make_unique_for_overwrite(size_t __n) │ │ │ │ -986 { 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]); } │ │ │ │ -987 │ │ │ │ -988 /// Disable std::make_unique_for_overwrite for arrays of known bound │ │ │ │ -989 template │ │ │ │ -990 typename _MakeUniq<_Tp>::__invalid_type │ │ │ │ -991 make_unique_for_overwrite(_Args&&...) = delete; │ │ │ │ -992#endif // C++20 │ │ │ │ -993 │ │ │ │ -994 /// @} relates unique_ptr │ │ │ │ -995#endif // C++14 │ │ │ │ -996 │ │ │ │ -997#if __cplusplus > 201703L && __cpp_concepts │ │ │ │ -998 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ -999 // 2948. unique_ptr does not define operator<< for stream output │ │ │ │ -1000 /// Stream output operator for unique_ptr │ │ │ │ -1001 template │ │ │ │ -1002 inline basic_ostream<_CharT, _Traits>& │ │ │ │ -1003 _o_p_e_r_a_t_o_r_<_<(basic_ostream<_CharT, _Traits>& __os, │ │ │ │ -1004 const unique_ptr<_Tp, _Dp>& __p) │ │ │ │ -1005 requires requires { __os << __p.get(); } │ │ │ │ -1006 { │ │ │ │ -1007 __os << __p.get(); │ │ │ │ -1008 return __os; │ │ │ │ -1009 } │ │ │ │ -1010#endif // C++20 │ │ │ │ -1011 │ │ │ │ -1012 /// @} group pointer_abstractions │ │ │ │ -1013 │ │ │ │ -1014#if __cplusplus >= 201703L │ │ │ │ -1015 namespace __detail::__variant │ │ │ │ -1016 { │ │ │ │ -1017 template struct _Never_valueless_alt; // see │ │ │ │ -1018 │ │ │ │ -1019 // Provide the strong exception-safety guarantee when emplacing a │ │ │ │ -1020 // unique_ptr into a variant. │ │ │ │ -1021 template │ │ │ │ -1022 struct _Never_valueless_alt> │ │ │ │ -1023 : _s_t_d_:_:_t_r_u_e___t_y_p_e │ │ │ │ -1024 { }; │ │ │ │ -1025 } // namespace __detail::__variant │ │ │ │ -1026#endif // C++17 │ │ │ │ -1027 │ │ │ │ -1028_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ -1029} // namespace │ │ │ │ -1030 │ │ │ │ -1031#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 │ │ │ │ -_u_t_i_l_i_t_y │ │ │ │ -_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_<_ ___R_e_s_,_ ___R_e_s_u_l_t___b_a_s_e_:_:___D_e_l_e_t_e_r_ _>_:_:_o_p_e_r_a_t_o_r_=_= │ │ │ │ -bool operator==(const unique_ptr< _Res, _Result_base::_Deleter > &__x, const │ │ │ │ -unique_ptr< _Up, _Ep > &__y) │ │ │ │ -DDeeffiinniittiioonn _u_n_i_q_u_e___p_t_r_._h_:_7_5_3 │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___p_t_r_<_ ___R_e_s_,_ ___R_e_s_u_l_t___b_a_s_e_:_:___D_e_l_e_t_e_r_ _>_:_:_o_p_e_r_a_t_o_r_=_= │ │ │ │ -bool operator==(nullptr_t, const unique_ptr< _Res, _Result_base::_Deleter > │ │ │ │ -&__x) noexcept │ │ │ │ -DDeeffiinniittiioonn _u_n_i_q_u_e___p_t_r_._h_:_7_6_7 │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___p_t_r_<_ ___R_e_s_,_ ___R_e_s_u_l_t___b_a_s_e_:_:___D_e_l_e_t_e_r_ _>_:_:_o_p_e_r_a_t_o_r_>_= │ │ │ │ -bool operator>=(const unique_ptr< _Res, _Result_base::_Deleter > &__x, const │ │ │ │ -unique_ptr< _Up, _Ep > &__y) │ │ │ │ -DDeeffiinniittiioonn _u_n_i_q_u_e___p_t_r_._h_:_8_7_2 │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___p_t_r_<_ ___R_e_s_,_ ___R_e_s_u_l_t___b_a_s_e_:_:___D_e_l_e_t_e_r_ _>_:_:_o_p_e_r_a_t_o_r_=_= │ │ │ │ -bool operator==(const unique_ptr< _Res, _Result_base::_Deleter > &__x, │ │ │ │ -nullptr_t) noexcept │ │ │ │ -DDeeffiinniittiioonn _u_n_i_q_u_e___p_t_r_._h_:_7_6_0 │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___p_t_r_<_ ___R_e_s_,_ ___R_e_s_u_l_t___b_a_s_e_:_:___D_e_l_e_t_e_r_ _>_:_:_o_p_e_r_a_t_o_r_!_= │ │ │ │ -bool operator!=(nullptr_t, const unique_ptr< _Res, _Result_base::_Deleter > │ │ │ │ -&__x) noexcept │ │ │ │ -DDeeffiinniittiioonn _u_n_i_q_u_e___p_t_r_._h_:_7_8_7 │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___p_t_r_<_ ___R_e_s_,_ ___R_e_s_u_l_t___b_a_s_e_:_:___D_e_l_e_t_e_r_ _>_:_:_o_p_e_r_a_t_o_r_!_= │ │ │ │ -bool operator!=(const unique_ptr< _Res, _Result_base::_Deleter > &__x, │ │ │ │ -nullptr_t) noexcept │ │ │ │ -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_<_ ___R_e_s_,_ ___R_e_s_u_l_t___b_a_s_e_:_:___D_e_l_e_t_e_r_ _>_:_:_s_w_a_p │ │ │ │ -enable_if< __is_swappable< _Result_base::_Deleter >::value >::type swap │ │ │ │ -(unique_ptr< _Res, _Result_base::_Deleter > &__x, unique_ptr< _Res, │ │ │ │ -_Result_base::_Deleter > &__y) noexcept │ │ │ │ -DDeeffiinniittiioonn _u_n_i_q_u_e___p_t_r_._h_:_7_3_8 │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___p_t_r_<_ ___R_e_s_,_ ___R_e_s_u_l_t___b_a_s_e_:_:___D_e_l_e_t_e_r_ _>_:_:_m_a_k_e___u_n_i_q_u_e │ │ │ │ -_MakeUniq< _Res >::__array make_unique(size_t __num) │ │ │ │ -DDeeffiinniittiioonn _u_n_i_q_u_e___p_t_r_._h_:_9_6_7 │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___p_t_r_<_ ___R_e_s_,_ ___R_e_s_u_l_t___b_a_s_e_:_:___D_e_l_e_t_e_r_ _>_:_:_o_p_e_r_a_t_o_r_> │ │ │ │ -bool operator>(nullptr_t, const unique_ptr< _Res, _Result_base::_Deleter > │ │ │ │ -&__x) │ │ │ │ -DDeeffiinniittiioonn _u_n_i_q_u_e___p_t_r_._h_:_8_6_2 │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___p_t_r_<_ ___R_e_s_,_ ___R_e_s_u_l_t___b_a_s_e_:_:___D_e_l_e_t_e_r_ _>_<_ ___R_e_s_u_l_t___b_a_s_e_ _>_:_:_o_p_e_r_a_t_o_r_< │ │ │ │ -bool operator<(const unique_ptr< _Res, _Result_base::_Deleter > &__x, const │ │ │ │ -unique_ptr< _Up, _Ep > &__y) │ │ │ │ -DDeeffiinniittiioonn _u_n_i_q_u_e___p_t_r_._h_:_7_9_5 │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___p_t_r_<_ ___R_e_s_,_ ___R_e_s_u_l_t___b_a_s_e_:_:___D_e_l_e_t_e_r_ _>_:_:_o_p_e_r_a_t_o_r_> │ │ │ │ -bool operator>(const unique_ptr< _Res, _Result_base::_Deleter > &__x, │ │ │ │ -nullptr_t) │ │ │ │ -DDeeffiinniittiioonn _u_n_i_q_u_e___p_t_r_._h_:_8_5_3 │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___p_t_r_<_ ___R_e_s_,_ ___R_e_s_u_l_t___b_a_s_e_:_:___D_e_l_e_t_e_r_ _>_:_:_o_p_e_r_a_t_o_r_>_= │ │ │ │ -bool operator>=(const unique_ptr< _Res, _Result_base::_Deleter > &__x, │ │ │ │ -nullptr_t) │ │ │ │ -DDeeffiinniittiioonn _u_n_i_q_u_e___p_t_r_._h_:_8_7_9 │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___p_t_r_<_ ___R_e_s_,_ ___R_e_s_u_l_t___b_a_s_e_:_:___D_e_l_e_t_e_r_ _>_:_:_o_p_e_r_a_t_o_r_!_= │ │ │ │ -bool operator!=(const unique_ptr< _Res, _Result_base::_Deleter > &__x, const │ │ │ │ -unique_ptr< _Up, _Ep > &__y) │ │ │ │ -DDeeffiinniittiioonn _u_n_i_q_u_e___p_t_r_._h_:_7_7_4 │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___p_t_r_<_ ___R_e_s_,_ ___R_e_s_u_l_t___b_a_s_e_:_:___D_e_l_e_t_e_r_ _>_:_:_o_p_e_r_a_t_o_r_>_= │ │ │ │ -bool operator>=(nullptr_t, const unique_ptr< _Res, _Result_base::_Deleter > │ │ │ │ -&__x) │ │ │ │ -DDeeffiinniittiioonn _u_n_i_q_u_e___p_t_r_._h_:_8_8_5 │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___p_t_r_<_ ___R_e_s_,_ ___R_e_s_u_l_t___b_a_s_e_:_:___D_e_l_e_t_e_r_ _>_:_:_m_a_k_e___u_n_i_q_u_e │ │ │ │ -_MakeUniq< _Res >::__invalid_type make_unique(_Args &&...)=delete │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___p_t_r_<_ ___R_e_s_,_ ___R_e_s_u_l_t___b_a_s_e_:_:___D_e_l_e_t_e_r_ _>_:_:_o_p_e_r_a_t_o_r_> │ │ │ │ -bool operator>(const unique_ptr< _Res, _Result_base::_Deleter > &__x, const │ │ │ │ -unique_ptr< _Up, _Ep > &__y) │ │ │ │ -DDeeffiinniittiioonn _u_n_i_q_u_e___p_t_r_._h_:_8_4_6 │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___p_t_r_<_ ___R_e_s_,_ ___R_e_s_u_l_t___b_a_s_e_:_:___D_e_l_e_t_e_r_ _>_<_ ___R_e_s_u_l_t___b_a_s_e_ _>_:_:_o_p_e_r_a_t_o_r_<_= │ │ │ │ -bool operator<=(const unique_ptr< _Res, _Result_base::_Deleter > &__x, const │ │ │ │ -unique_ptr< _Up, _Ep > &__y) │ │ │ │ -DDeeffiinniittiioonn _u_n_i_q_u_e___p_t_r_._h_:_8_2_6 │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___p_t_r_<_ ___R_e_s_,_ ___R_e_s_u_l_t___b_a_s_e_:_:___D_e_l_e_t_e_r_ _>_:_:_m_a_k_e___u_n_i_q_u_e │ │ │ │ -_MakeUniq< _Res >::__single_object make_unique(_Args &&... __args) │ │ │ │ -DDeeffiinniittiioonn _u_n_i_q_u_e___p_t_r_._h_:_9_6_1 │ │ │ │ -_s_t_d_:_:_r_e_m_o_v_e___e_x_t_e_n_t___t │ │ │ │ -typename remove_extent< _Tp >::type remove_extent_t │ │ │ │ -Alias template for remove_extent. │ │ │ │ -DDeeffiinniittiioonn _t_y_p_e___t_r_a_i_t_s_:_2_0_0_6 │ │ │ │ -_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_3 │ │ │ │ -_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_5_6 │ │ │ │ -_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_8 │ │ │ │ -_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 │ │ │ │ -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_0 │ │ │ │ -_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_:_:_c_o_n_d_i_t_i_o_n_a_l │ │ │ │ -Define a member typedef type to one of two argument types. │ │ │ │ -DDeeffiinniittiioonn _t_y_p_e___t_r_a_i_t_s_:_2_2_1_9 │ │ │ │ -_s_t_d_:_:_i_s___v_o_i_d │ │ │ │ -is_void │ │ │ │ -DDeeffiinniittiioonn _t_y_p_e___t_r_a_i_t_s_:_2_7_2 │ │ │ │ -_s_t_d_:_:_i_s___a_r_r_a_y │ │ │ │ -is_array │ │ │ │ -DDeeffiinniittiioonn _t_y_p_e___t_r_a_i_t_s_:_4_2_9 │ │ │ │ -_s_t_d_:_:_i_s___p_o_i_n_t_e_r │ │ │ │ -is_pointer │ │ │ │ -DDeeffiinniittiioonn _t_y_p_e___t_r_a_i_t_s_:_4_5_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_0_9 │ │ │ │ -_s_t_d_:_:_i_s___c_o_p_y___c_o_n_s_t_r_u_c_t_i_b_l_e │ │ │ │ -is_copy_constructible │ │ │ │ -DDeeffiinniittiioonn _t_y_p_e___t_r_a_i_t_s_:_9_8_6 │ │ │ │ -_s_t_d_:_:_i_s___m_o_v_e___c_o_n_s_t_r_u_c_t_i_b_l_e │ │ │ │ -is_move_constructible │ │ │ │ -DDeeffiinniittiioonn _t_y_p_e___t_r_a_i_t_s_:_1_0_0_9 │ │ │ │ -_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_0_8_8 │ │ │ │ -_s_t_d_:_:_i_s___m_o_v_e___a_s_s_i_g_n_a_b_l_e │ │ │ │ -is_move_assignable │ │ │ │ -DDeeffiinniittiioonn _t_y_p_e___t_r_a_i_t_s_:_1_1_3_0 │ │ │ │ -_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_5_8 │ │ │ │ -_s_t_d_:_:_t_y_p_e │ │ │ │ -_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_1_9_2 │ │ │ │ -_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_2_8 │ │ │ │ -_s_t_d_:_:_l_e_s_s │ │ │ │ -One of the comparison functors. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___f_u_n_c_t_i_o_n_._h_:_3_9_6 │ │ │ │ -_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_:_:_o_p_e_r_a_t_o_r_(_) │ │ │ │ -void operator()(_Tp *__ptr) const │ │ │ │ -Calls delete __ptr. │ │ │ │ -DDeeffiinniittiioonn _u_n_i_q_u_e___p_t_r_._h_:_7_9 │ │ │ │ -_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_(_) │ │ │ │ -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_1_6 │ │ │ │ -_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 │ │ │ │ -20.7.1.2 unique_ptr for single objects. │ │ │ │ -DDeeffiinniittiioonn _u_n_i_q_u_e___p_t_r_._h_:_2_4_3 │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___p_t_r_:_:_r_e_s_e_t │ │ │ │ -void reset(pointer __p=pointer()) noexcept │ │ │ │ -Replace the stored pointer. │ │ │ │ -DDeeffiinniittiioonn _u_n_i_q_u_e___p_t_r_._h_:_4_5_2 │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___p_t_r_<_ ___R_e_s_,_ ___R_e_s_u_l_t___b_a_s_e_:_:___D_e_l_e_t_e_r_ _>_:_:_s_w_a_p │ │ │ │ -void swap(unique_ptr &__u) noexcept │ │ │ │ -DDeeffiinniittiioonn _u_n_i_q_u_e___p_t_r_._h_:_4_6_1 │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___p_t_r_<_ ___R_e_s_,_ ___R_e_s_u_l_t___b_a_s_e_:_:___D_e_l_e_t_e_r_ _>_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ -enable_if< __and_< __safe_conversion_up< _Up, _Ep >, is_assignable< │ │ │ │ -deleter_type &, _Ep && > >::value, unique_ptr & >::type operator=(unique_ptr< │ │ │ │ -_Up, _Ep > &&__u) noexcept │ │ │ │ -DDeeffiinniittiioonn _u_n_i_q_u_e___p_t_r_._h_:_3_8_6 │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___p_t_r_<_ ___R_e_s_,_ ___R_e_s_u_l_t___b_a_s_e_:_:___D_e_l_e_t_e_r_ _>_:_:_u_n_i_q_u_e___p_t_r │ │ │ │ -unique_ptr(pointer __p, const deleter_type &__d) noexcept │ │ │ │ -DDeeffiinniittiioonn _u_n_i_q_u_e___p_t_r_._h_:_2_9_4 │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___p_t_r_<_ ___R_e_s_,_ ___R_e_s_u_l_t___b_a_s_e_:_:___D_e_l_e_t_e_r_ _>_:_:_u_n_i_q_u_e___p_t_r │ │ │ │ -unique_ptr(unique_ptr< _Up, _Ep > &&__u) noexcept │ │ │ │ -DDeeffiinniittiioonn _u_n_i_q_u_e___p_t_r_._h_:_3_4_0 │ │ │ │ -_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_:_2_6_9 │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___p_t_r_<_ ___R_e_s_,_ ___R_e_s_u_l_t___b_a_s_e_:_:___D_e_l_e_t_e_r_ _>_:_:_u_n_i_q_u_e___p_t_r │ │ │ │ -unique_ptr(unique_ptr &&)=default │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___p_t_r_<_ ___R_e_s_,_ ___R_e_s_u_l_t___b_a_s_e_:_:___D_e_l_e_t_e_r_ _>_:_:_u_n_i_q_u_e___p_t_r │ │ │ │ -unique_ptr(pointer __p, __enable_if_t::value, _Del │ │ │ │ -&& > __d) noexcept │ │ │ │ -DDeeffiinniittiioonn _u_n_i_q_u_e___p_t_r_._h_:_3_0_6 │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___p_t_r_<_ ___R_e_s_,_ ___R_e_s_u_l_t___b_a_s_e_:_:___D_e_l_e_t_e_r_ _>_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ -unique_ptr & operator=(nullptr_t) noexcept │ │ │ │ -DDeeffiinniittiioonn _u_n_i_q_u_e___p_t_r_._h_:_3_9_5 │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___p_t_r_<_ ___R_e_s_,_ ___R_e_s_u_l_t___b_a_s_e_:_:___D_e_l_e_t_e_r_ _>_:_:_o_p_e_r_a_t_o_r_* │ │ │ │ -add_lvalue_reference< element_type >::type operator*() const │ │ │ │ -DDeeffiinniittiioonn _u_n_i_q_u_e___p_t_r_._h_:_4_0_5 │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___p_t_r_<_ ___R_e_s_,_ ___R_e_s_u_l_t___b_a_s_e_:_:___D_e_l_e_t_e_r_ _>_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ -unique_ptr & operator=(unique_ptr &&)=default │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___p_t_r_<_ ___R_e_s_,_ ___R_e_s_u_l_t___b_a_s_e_:_:___D_e_l_e_t_e_r_ _>_:_:_u_n_i_q_u_e___p_t_r │ │ │ │ -unique_ptr(pointer __p) noexcept │ │ │ │ -DDeeffiinniittiioonn _u_n_i_q_u_e___p_t_r_._h_:_2_8_1 │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___p_t_r_<_ ___R_e_s_,_ ___R_e_s_u_l_t___b_a_s_e_:_:___D_e_l_e_t_e_r_ _>_:_:_~_u_n_i_q_u_e___p_t_r │ │ │ │ -~unique_ptr() noexcept │ │ │ │ -DDeeffiinniittiioonn _u_n_i_q_u_e___p_t_r_._h_:_3_5_5 │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___p_t_r_<_ ___R_e_s_,_ ___R_e_s_u_l_t___b_a_s_e_:_:___D_e_l_e_t_e_r_ _>_:_:_g_e_t___d_e_l_e_t_e_r │ │ │ │ -const deleter_type & get_deleter() const noexcept │ │ │ │ -DDeeffiinniittiioonn _u_n_i_q_u_e___p_t_r_._h_:_4_3_1 │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___p_t_r_:_:_g_e_t___d_e_l_e_t_e_r │ │ │ │ -deleter_type & get_deleter() noexcept │ │ │ │ -Return a reference to the stored deleter. │ │ │ │ -DDeeffiinniittiioonn _u_n_i_q_u_e___p_t_r_._h_:_4_2_6 │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___p_t_r_<_ ___R_e_s_,_ ___R_e_s_u_l_t___b_a_s_e_:_:___D_e_l_e_t_e_r_ _>_:_:_o_p_e_r_a_t_o_r_-_> │ │ │ │ -pointer operator->() const noexcept │ │ │ │ -DDeeffiinniittiioonn _u_n_i_q_u_e___p_t_r_._h_:_4_1_3 │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___p_t_r_:_:_g_e_t │ │ │ │ -pointer get() const noexcept │ │ │ │ -Return the stored pointer. │ │ │ │ -DDeeffiinniittiioonn _u_n_i_q_u_e___p_t_r_._h_:_4_2_1 │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___p_t_r_<_ ___R_e_s_,_ ___R_e_s_u_l_t___b_a_s_e_:_:___D_e_l_e_t_e_r_ _>_:_:_u_n_i_q_u_e___p_t_r │ │ │ │ -constexpr unique_ptr(nullptr_t) noexcept │ │ │ │ -DDeeffiinniittiioonn _u_n_i_q_u_e___p_t_r_._h_:_3_2_0 │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___p_t_r_<_ ___R_e_s_,_ ___R_e_s_u_l_t___b_a_s_e_:_:___D_e_l_e_t_e_r_ _>_:_:_r_e_l_e_a_s_e │ │ │ │ -pointer release() noexcept │ │ │ │ -DDeeffiinniittiioonn _u_n_i_q_u_e___p_t_r_._h_:_4_4_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_[_] │ │ │ │ -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_:_6_5_6 │ │ │ │ -_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_2_9 │ │ │ │ -_s_t_d_:_:_a_u_t_o___p_t_r │ │ │ │ -A simple smart pointer providing strict ownership semantics. │ │ │ │ -DDeeffiinniittiioonn _a_u_t_o___p_t_r_._h_:_9_0 │ │ │ │ +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 │ │ │ │ +_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 │ │ │ │ * bbiittss │ │ │ │ - * _u_n_i_q_u_e___p_t_r_._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.15.0 │ │ ├── ./usr/share/doc/gcc-11-base/libstdc++/user/a00374.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: unique_lock.h File Reference │ │ │ +libstdc++: shared_ptr_atomic.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -48,44 +48,87 @@ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
unique_lock.h File Reference
│ │ │ +
shared_ptr_atomic.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │

Go to the source code of this file.

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

│ │ │ -Classes

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

│ │ │ Namespaces

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

│ │ │ +Functions

template<typename _Tp, _Lock_policy _Lp>
__shared_ptr< _Tp, _Lp > std::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, _Lp > std::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, _Lp > std::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, _Lp > std::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)
│ │ │

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 <memory>.

│ │ │ │ │ │ -

Definition in file unique_lock.h.

│ │ │ +

Definition in file shared_ptr_atomic.h.

│ │ │
│ │ │
│ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,14 +1,82 @@ │ │ │ │ libstdc++ │ │ │ │ -unique_lock.h File Reference │ │ │ │ +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 │ │ │ │ -class   _s_t_d_:_:_u_n_i_q_u_e___l_o_c_k_<_ ___M_u_t_e_x_ _> │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _s_t_d │ │ │ │ +FFuunnccttiioonnss │ │ │ │ +template │ │ │ │ +__shared_ptr< _Tp, _Lp >  _s_t_d_:_:_a_t_o_m_i_c___l_o_a_d (const __shared_ptr< _Tp, _Lp > │ │ │ │ + *__p) │ │ │ │ +template │ │ │ │ + _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 │ │ │ │ +__shared_ptr< _Tp, _Lp >  _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, │ │ │ │ + _Lp > *__p, _m_e_m_o_r_y___o_r_d_e_r) │ │ │ │ +template │ │ │ │ + _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 │ │ │ │ + void  _s_t_d_:_:_a_t_o_m_i_c___s_t_o_r_e (__shared_ptr< _Tp, _Lp > *__p, │ │ │ │ + __shared_ptr< _Tp, _Lp > __r) │ │ │ │ +template │ │ │ │ + void  _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 │ │ │ │ + void  _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, _Lp > │ │ │ │ + *__p, __shared_ptr< _Tp, _Lp > __r, _m_e_m_o_r_y___o_r_d_e_r) │ │ │ │ +template │ │ │ │ + void  _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 │ │ │ │ +__shared_ptr< _Tp, _Lp >  _s_t_d_:_:_a_t_o_m_i_c___e_x_c_h_a_n_g_e (__shared_ptr< _Tp, _Lp > *__p, │ │ │ │ + __shared_ptr< _Tp, _Lp > __r) │ │ │ │ +template │ │ │ │ + _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 │ │ │ │ +__shared_ptr< _Tp, _Lp >  _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, _Lp │ │ │ │ + > *__p, __shared_ptr< _Tp, _Lp > __r, _m_e_m_o_r_y___o_r_d_e_r) │ │ │ │ +template │ │ │ │ + _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 │ │ │ │ + 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, _Lp > *__p, __shared_ptr< _Tp, _Lp > *__v, │ │ │ │ + __shared_ptr< _Tp, _Lp > __w) │ │ │ │ +template │ │ │ │ + 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 │ │ │ │ + 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, _Lp > *__p, __shared_ptr< _Tp, │ │ │ │ + _Lp > *__v, __shared_ptr< _Tp, _Lp > __w, │ │ │ │ + _m_e_m_o_r_y___o_r_d_e_r, _m_e_m_o_r_y___o_r_d_e_r) │ │ │ │ +template │ │ │ │ + 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 │ │ │ │ + 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, │ │ │ │ + _Lp > *__p, __shared_ptr< _Tp, _Lp > *__v, │ │ │ │ + __shared_ptr< _Tp, _Lp > __w) │ │ │ │ +template │ │ │ │ + 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 │ │ │ │ + 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, _Lp > *__p, __shared_ptr< _Tp, │ │ │ │ + _Lp > *__v, __shared_ptr< _Tp, _Lp > __w, │ │ │ │ + _m_e_m_o_r_y___o_r_d_e_r __success, _m_e_m_o_r_y___o_r_d_e_r __failure) │ │ │ │ +template │ │ │ │ + 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 __success, │ │ │ │ + _m_e_m_o_r_y___o_r_d_e_r __failure) │ │ │ │ ********** 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 _s_h_a_r_e_d___p_t_r___a_t_o_m_i_c_._h. │ │ │ │ * bbiittss │ │ │ │ - * _u_n_i_q_u_e___l_o_c_k_._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.15.0 │ │ ├── ./usr/share/doc/gcc-11-base/libstdc++/user/a00374_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: unique_lock.h Source File │ │ │ +libstdc++: shared_ptr_atomic.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -48,20 +48,20 @@ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
unique_lock.h
│ │ │ +
shared_ptr_atomic.h
│ │ │
│ │ │
│ │ │ -Go to the documentation of this file.
1// std::unique_lock implementation -*- C++ -*-
│ │ │ +Go to the documentation of this file.
1// shared_ptr atomic access -*- C++ -*-
│ │ │
2
│ │ │ -
3// Copyright (C) 2008-2021 Free Software Foundation, Inc.
│ │ │ +
3// Copyright (C) 2014-2021 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
│ │ │ @@ -75,256 +75,380 @@ │ │ │
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/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{mutex}
│ │ │ +
27 * Do not attempt to use it directly. @headername{memory}
│ │ │
28 */
│ │ │
29
│ │ │ -
30#ifndef _GLIBCXX_UNIQUE_LOCK_H
│ │ │ -
31#define _GLIBCXX_UNIQUE_LOCK_H 1
│ │ │ +
30#ifndef _SHARED_PTR_ATOMIC_H
│ │ │ +
31#define _SHARED_PTR_ATOMIC_H 1
│ │ │
32
│ │ │ -
33#pragma GCC system_header
│ │ │ +
33#include <bits/atomic_base.h>
│ │ │
34
│ │ │ -
35#if __cplusplus < 201103L
│ │ │ -
36# include <bits/c++0x_warning.h>
│ │ │ -
37#else
│ │ │ -
38
│ │ │ -
39#include <chrono>
│ │ │ -
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 * @ingroup mutexes
│ │ │ -
55 */
│ │ │ -
56 template<typename _Mutex>
│ │ │ -
│ │ │ -
57 class unique_lock
│ │ │ -
58 {
│ │ │ -
59 public:
│ │ │ -
60 typedef _Mutex mutex_type;
│ │ │ -
61
│ │ │ -
62 unique_lock() noexcept
│ │ │ -
63 : _M_device(0), _M_owns(false)
│ │ │ -
64 { }
│ │ │ -
65
│ │ │ -
66 explicit unique_lock(mutex_type& __m)
│ │ │ -
67 : _M_device(std::__addressof(__m)), _M_owns(false)
│ │ │ -
68 {
│ │ │ -
69 lock();
│ │ │ -
70 _M_owns = true;
│ │ │ -
71 }
│ │ │ -
72
│ │ │ -
73 unique_lock(mutex_type& __m, defer_lock_t) noexcept
│ │ │ -
74 : _M_device(std::__addressof(__m)), _M_owns(false)
│ │ │ -
75 { }
│ │ │ -
76
│ │ │ -
77 unique_lock(mutex_type& __m, try_to_lock_t)
│ │ │ -
78 : _M_device(std::__addressof(__m)), _M_owns(_M_device->try_lock())
│ │ │ -
79 { }
│ │ │ -
80
│ │ │ -
81 unique_lock(mutex_type& __m, adopt_lock_t) noexcept
│ │ │ -
82 : _M_device(std::__addressof(__m)), _M_owns(true)
│ │ │ -
83 {
│ │ │ -
84 // XXX calling thread owns mutex
│ │ │ -
85 }
│ │ │ -
86
│ │ │ -
87 template<typename _Clock, typename _Duration>
│ │ │ -
88 unique_lock(mutex_type& __m,
│ │ │ - │ │ │ -
90 : _M_device(std::__addressof(__m)),
│ │ │ -
91 _M_owns(_M_device->try_lock_until(__atime))
│ │ │ -
92 { }
│ │ │ -
93
│ │ │ -
94 template<typename _Rep, typename _Period>
│ │ │ -
95 unique_lock(mutex_type& __m,
│ │ │ - │ │ │ -
97 : _M_device(std::__addressof(__m)),
│ │ │ -
98 _M_owns(_M_device->try_lock_for(__rtime))
│ │ │ -
99 { }
│ │ │ -
100
│ │ │ -
101 ~unique_lock()
│ │ │ -
102 {
│ │ │ -
103 if (_M_owns)
│ │ │ -
104 unlock();
│ │ │ -
105 }
│ │ │ -
106
│ │ │ -
107 unique_lock(const unique_lock&) = delete;
│ │ │ -
108 unique_lock& operator=(const unique_lock&) = delete;
│ │ │ -
109
│ │ │ -
110 unique_lock(unique_lock&& __u) noexcept
│ │ │ -
111 : _M_device(__u._M_device), _M_owns(__u._M_owns)
│ │ │ -
112 {
│ │ │ -
113 __u._M_device = 0;
│ │ │ -
114 __u._M_owns = false;
│ │ │ -
115 }
│ │ │ -
116
│ │ │ -
117 unique_lock& operator=(unique_lock&& __u) noexcept
│ │ │ -
118 {
│ │ │ -
119 if(_M_owns)
│ │ │ -
120 unlock();
│ │ │ +
35namespace std _GLIBCXX_VISIBILITY(default)
│ │ │ +
36{
│ │ │ +
37_GLIBCXX_BEGIN_NAMESPACE_VERSION
│ │ │ +
38
│ │ │ +
39 /**
│ │ │ +
40 * @addtogroup pointer_abstractions
│ │ │ +
41 * @{
│ │ │ +
42 */
│ │ │ +
43 /// @relates shared_ptr @{
│ │ │ +
44
│ │ │ +
45 /// @cond undocumented
│ │ │ +
46
│ │ │ +
47 struct _Sp_locker
│ │ │ +
48 {
│ │ │ +
49 _Sp_locker(const _Sp_locker&) = delete;
│ │ │ +
50 _Sp_locker& operator=(const _Sp_locker&) = delete;
│ │ │ +
51
│ │ │ +
52#ifdef __GTHREADS
│ │ │ +
53 explicit
│ │ │ +
54 _Sp_locker(const void*) noexcept;
│ │ │ +
55 _Sp_locker(const void*, const void*) noexcept;
│ │ │ +
56 ~_Sp_locker();
│ │ │ +
57
│ │ │ +
58 private:
│ │ │ +
59 unsigned char _M_key1;
│ │ │ +
60 unsigned char _M_key2;
│ │ │ +
61#else
│ │ │ +
62 explicit _Sp_locker(const void*, const void* = nullptr) { }
│ │ │ +
63#endif
│ │ │ +
64 };
│ │ │ +
65
│ │ │ +
66 /// @endcond
│ │ │ +
67
│ │ │ +
68 /**
│ │ │ +
69 * @brief Report whether shared_ptr atomic operations are lock-free.
│ │ │ +
70 * @param __p A non-null pointer to a shared_ptr object.
│ │ │ +
71 * @return True if atomic access to @c *__p is lock-free, false otherwise.
│ │ │ +
72 * @{
│ │ │ +
73 */
│ │ │ +
74 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
75 inline bool
│ │ │ +
│ │ │ +
76 atomic_is_lock_free(const __shared_ptr<_Tp, _Lp>* __p)
│ │ │ +
77 {
│ │ │ +
78#ifdef __GTHREADS
│ │ │ +
79 return __gthread_active_p() == 0;
│ │ │ +
80#else
│ │ │ +
81 return true;
│ │ │ +
82#endif
│ │ │ +
83 }
│ │ │ +
│ │ │ +
84
│ │ │ +
85 template<typename _Tp>
│ │ │ +
86 inline bool
│ │ │ +
87 atomic_is_lock_free(const shared_ptr<_Tp>* __p)
│ │ │ +
88 { return std::atomic_is_lock_free<_Tp, __default_lock_policy>(__p); }
│ │ │ +
89
│ │ │ +
90 /// @}
│ │ │ +
91
│ │ │ +
92 /**
│ │ │ +
93 * @brief Atomic load for shared_ptr objects.
│ │ │ +
94 * @param __p A non-null pointer to a shared_ptr object.
│ │ │ +
95 * @return @c *__p
│ │ │ +
96 *
│ │ │ +
97 * The memory order shall not be @c memory_order_release or
│ │ │ +
98 * @c memory_order_acq_rel.
│ │ │ +
99 * @{
│ │ │ +
100 */
│ │ │ +
101 template<typename _Tp>
│ │ │ +
102 inline shared_ptr<_Tp>
│ │ │ +
│ │ │ +
103 atomic_load_explicit(const shared_ptr<_Tp>* __p, memory_order)
│ │ │ +
104 {
│ │ │ +
105 _Sp_locker __lock{__p};
│ │ │ +
106 return *__p;
│ │ │ +
107 }
│ │ │ +
│ │ │ +
108
│ │ │ +
109 template<typename _Tp>
│ │ │ +
110 inline shared_ptr<_Tp>
│ │ │ +
│ │ │ +
111 atomic_load(const shared_ptr<_Tp>* __p)
│ │ │ +
112 { return std::atomic_load_explicit(__p, memory_order_seq_cst); }
│ │ │ +
│ │ │ +
113
│ │ │ +
114 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
115 inline __shared_ptr<_Tp, _Lp>
│ │ │ +
│ │ │ +
116 atomic_load_explicit(const __shared_ptr<_Tp, _Lp>* __p, memory_order)
│ │ │ +
117 {
│ │ │ +
118 _Sp_locker __lock{__p};
│ │ │ +
119 return *__p;
│ │ │ +
120 }
│ │ │ +
│ │ │
121
│ │ │ -
122 unique_lock(std::move(__u)).swap(*this);
│ │ │ -
123
│ │ │ -
124 __u._M_device = 0;
│ │ │ -
125 __u._M_owns = false;
│ │ │ -
126
│ │ │ -
127 return *this;
│ │ │ -
128 }
│ │ │ -
129
│ │ │ -
130 void
│ │ │ -
131 lock()
│ │ │ -
132 {
│ │ │ -
133 if (!_M_device)
│ │ │ -
134 __throw_system_error(int(errc::operation_not_permitted));
│ │ │ -
135 else if (_M_owns)
│ │ │ -
136 __throw_system_error(int(errc::resource_deadlock_would_occur));
│ │ │ -
137 else
│ │ │ -
138 {
│ │ │ -
139 _M_device->lock();
│ │ │ -
140 _M_owns = true;
│ │ │ -
141 }
│ │ │ -
142 }
│ │ │ -
143
│ │ │ -
144 bool
│ │ │ -
145 try_lock()
│ │ │ -
146 {
│ │ │ -
147 if (!_M_device)
│ │ │ -
148 __throw_system_error(int(errc::operation_not_permitted));
│ │ │ -
149 else if (_M_owns)
│ │ │ -
150 __throw_system_error(int(errc::resource_deadlock_would_occur));
│ │ │ -
151 else
│ │ │ -
152 {
│ │ │ -
153 _M_owns = _M_device->try_lock();
│ │ │ -
154 return _M_owns;
│ │ │ -
155 }
│ │ │ -
156 }
│ │ │ -
157
│ │ │ -
158 template<typename _Clock, typename _Duration>
│ │ │ -
159 bool
│ │ │ -
160 try_lock_until(const chrono::time_point<_Clock, _Duration>& __atime)
│ │ │ -
161 {
│ │ │ -
162 if (!_M_device)
│ │ │ -
163 __throw_system_error(int(errc::operation_not_permitted));
│ │ │ -
164 else if (_M_owns)
│ │ │ -
165 __throw_system_error(int(errc::resource_deadlock_would_occur));
│ │ │ -
166 else
│ │ │ -
167 {
│ │ │ -
168 _M_owns = _M_device->try_lock_until(__atime);
│ │ │ -
169 return _M_owns;
│ │ │ -
170 }
│ │ │ -
171 }
│ │ │ -
172
│ │ │ -
173 template<typename _Rep, typename _Period>
│ │ │ -
174 bool
│ │ │ -
175 try_lock_for(const chrono::duration<_Rep, _Period>& __rtime)
│ │ │ -
176 {
│ │ │ -
177 if (!_M_device)
│ │ │ -
178 __throw_system_error(int(errc::operation_not_permitted));
│ │ │ -
179 else if (_M_owns)
│ │ │ -
180 __throw_system_error(int(errc::resource_deadlock_would_occur));
│ │ │ -
181 else
│ │ │ -
182 {
│ │ │ -
183 _M_owns = _M_device->try_lock_for(__rtime);
│ │ │ -
184 return _M_owns;
│ │ │ -
185 }
│ │ │ -
186 }
│ │ │ -
187
│ │ │ -
188 void
│ │ │ -
189 unlock()
│ │ │ -
190 {
│ │ │ -
191 if (!_M_owns)
│ │ │ -
192 __throw_system_error(int(errc::operation_not_permitted));
│ │ │ -
193 else if (_M_device)
│ │ │ -
194 {
│ │ │ -
195 _M_device->unlock();
│ │ │ -
196 _M_owns = false;
│ │ │ -
197 }
│ │ │ -
198 }
│ │ │ -
199
│ │ │ -
200 void
│ │ │ -
201 swap(unique_lock& __u) noexcept
│ │ │ -
202 {
│ │ │ -
203 std::swap(_M_device, __u._M_device);
│ │ │ -
204 std::swap(_M_owns, __u._M_owns);
│ │ │ -
205 }
│ │ │ -
206
│ │ │ -
207 mutex_type*
│ │ │ -
208 release() noexcept
│ │ │ -
209 {
│ │ │ -
210 mutex_type* __ret = _M_device;
│ │ │ -
211 _M_device = 0;
│ │ │ -
212 _M_owns = false;
│ │ │ -
213 return __ret;
│ │ │ -
214 }
│ │ │ -
215
│ │ │ -
216 bool
│ │ │ -
217 owns_lock() const noexcept
│ │ │ -
218 { return _M_owns; }
│ │ │ -
219
│ │ │ -
220 explicit operator bool() const noexcept
│ │ │ -
221 { return owns_lock(); }
│ │ │ -
222
│ │ │ -
223 mutex_type*
│ │ │ -
224 mutex() const noexcept
│ │ │ -
225 { return _M_device; }
│ │ │ -
226
│ │ │ -
227 private:
│ │ │ -
228 mutex_type* _M_device;
│ │ │ -
229 bool _M_owns;
│ │ │ -
230 };
│ │ │ -
│ │ │ -
231
│ │ │ -
232 /// Swap overload for unique_lock objects.
│ │ │ -
233 /// @relates unique_lock
│ │ │ -
234 template<typename _Mutex>
│ │ │ -
235 inline void
│ │ │ -
│ │ │ -
236 swap(unique_lock<_Mutex>& __x, unique_lock<_Mutex>& __y) noexcept
│ │ │ -
237 { __x.swap(__y); }
│ │ │ -
│ │ │ -
238
│ │ │ -
239_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ -
240} // namespace
│ │ │ -
241
│ │ │ -
242#endif // C++11
│ │ │ -
243#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:428
│ │ │ -
constexpr _Tp * __addressof(_Tp &__r) noexcept
Same as C++11 std::addressof.
Definition move.h:49
│ │ │ +
122 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
123 inline __shared_ptr<_Tp, _Lp>
│ │ │ +
│ │ │ +
124 atomic_load(const __shared_ptr<_Tp, _Lp>* __p)
│ │ │ +
125 { return std::atomic_load_explicit(__p, memory_order_seq_cst); }
│ │ │ +
│ │ │ +
126 /// @}
│ │ │ +
127
│ │ │ +
128 /**
│ │ │ +
129 * @brief Atomic store for shared_ptr objects.
│ │ │ +
130 * @param __p A non-null pointer to a shared_ptr object.
│ │ │ +
131 * @param __r The value to store.
│ │ │ +
132 *
│ │ │ +
133 * The memory order shall not be @c memory_order_acquire or
│ │ │ +
134 * @c memory_order_acq_rel.
│ │ │ +
135 * @{
│ │ │ +
136 */
│ │ │ +
137 template<typename _Tp>
│ │ │ +
138 inline void
│ │ │ +
│ │ │ +
139 atomic_store_explicit(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r,
│ │ │ + │ │ │ +
141 {
│ │ │ +
142 _Sp_locker __lock{__p};
│ │ │ +
143 __p->swap(__r); // use swap so that **__p not destroyed while lock held
│ │ │ +
144 }
│ │ │ +
│ │ │ +
145
│ │ │ +
146 template<typename _Tp>
│ │ │ +
147 inline void
│ │ │ +
│ │ │ +
148 atomic_store(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r)
│ │ │ +
149 { std::atomic_store_explicit(__p, std::move(__r), memory_order_seq_cst); }
│ │ │ +
│ │ │ +
150
│ │ │ +
151 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
152 inline void
│ │ │ +
│ │ │ +
153 atomic_store_explicit(__shared_ptr<_Tp, _Lp>* __p,
│ │ │ +
154 __shared_ptr<_Tp, _Lp> __r,
│ │ │ + │ │ │ +
156 {
│ │ │ +
157 _Sp_locker __lock{__p};
│ │ │ +
158 __p->swap(__r); // use swap so that **__p not destroyed while lock held
│ │ │ +
159 }
│ │ │ +
│ │ │ +
160
│ │ │ +
161 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
162 inline void
│ │ │ +
│ │ │ +
163 atomic_store(__shared_ptr<_Tp, _Lp>* __p, __shared_ptr<_Tp, _Lp> __r)
│ │ │ +
164 { std::atomic_store_explicit(__p, std::move(__r), memory_order_seq_cst); }
│ │ │ +
│ │ │ +
165 /// @}
│ │ │ +
166
│ │ │ +
167 /**
│ │ │ +
168 * @brief Atomic exchange for shared_ptr objects.
│ │ │ +
169 * @param __p A non-null pointer to a shared_ptr object.
│ │ │ +
170 * @param __r New value to store in @c *__p.
│ │ │ +
171 * @return The original value of @c *__p
│ │ │ +
172 * @{
│ │ │ +
173 */
│ │ │ +
174 template<typename _Tp>
│ │ │ +
175 inline shared_ptr<_Tp>
│ │ │ +
│ │ │ +
176 atomic_exchange_explicit(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r,
│ │ │ + │ │ │ +
178 {
│ │ │ +
179 _Sp_locker __lock{__p};
│ │ │ +
180 __p->swap(__r);
│ │ │ +
181 return __r;
│ │ │ +
182 }
│ │ │ +
│ │ │ +
183
│ │ │ +
184 template<typename _Tp>
│ │ │ +
185 inline shared_ptr<_Tp>
│ │ │ +
│ │ │ +
186 atomic_exchange(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r)
│ │ │ +
187 {
│ │ │ +
188 return std::atomic_exchange_explicit(__p, std::move(__r),
│ │ │ +
189 memory_order_seq_cst);
│ │ │ +
190 }
│ │ │ +
│ │ │ +
191
│ │ │ +
192 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
193 inline __shared_ptr<_Tp, _Lp>
│ │ │ +
│ │ │ +
194 atomic_exchange_explicit(__shared_ptr<_Tp, _Lp>* __p,
│ │ │ +
195 __shared_ptr<_Tp, _Lp> __r,
│ │ │ + │ │ │ +
197 {
│ │ │ +
198 _Sp_locker __lock{__p};
│ │ │ +
199 __p->swap(__r);
│ │ │ +
200 return __r;
│ │ │ +
201 }
│ │ │ +
│ │ │ +
202
│ │ │ +
203 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
204 inline __shared_ptr<_Tp, _Lp>
│ │ │ +
│ │ │ +
205 atomic_exchange(__shared_ptr<_Tp, _Lp>* __p, __shared_ptr<_Tp, _Lp> __r)
│ │ │ +
206 {
│ │ │ +
207 return std::atomic_exchange_explicit(__p, std::move(__r),
│ │ │ +
208 memory_order_seq_cst);
│ │ │ +
209 }
│ │ │ +
│ │ │ +
210 /// @}
│ │ │ +
211
│ │ │ +
212 /**
│ │ │ +
213 * @brief Atomic compare-and-swap for shared_ptr objects.
│ │ │ +
214 * @param __p A non-null pointer to a shared_ptr object.
│ │ │ +
215 * @param __v A non-null pointer to a shared_ptr object.
│ │ │ +
216 * @param __w A non-null pointer to a shared_ptr object.
│ │ │ +
217 * @return True if @c *__p was equivalent to @c *__v, false otherwise.
│ │ │ +
218 *
│ │ │ +
219 * The memory order for failure shall not be @c memory_order_release or
│ │ │ +
220 * @c memory_order_acq_rel, or stronger than the memory order for success.
│ │ │ +
221 * @{
│ │ │ +
222 */
│ │ │ +
223 template<typename _Tp>
│ │ │ +
224 bool
│ │ │ +
│ │ │ +
225 atomic_compare_exchange_strong_explicit(shared_ptr<_Tp>* __p,
│ │ │ +
226 shared_ptr<_Tp>* __v,
│ │ │ +
227 shared_ptr<_Tp> __w,
│ │ │ + │ │ │ + │ │ │ +
230 {
│ │ │ +
231 shared_ptr<_Tp> __x; // goes out of scope after __lock
│ │ │ +
232 _Sp_locker __lock{__p, __v};
│ │ │ + │ │ │ +
234 if (*__p == *__v && !__less(*__p, *__v) && !__less(*__v, *__p))
│ │ │ +
235 {
│ │ │ +
236 __x = std::move(*__p);
│ │ │ +
237 *__p = std::move(__w);
│ │ │ +
238 return true;
│ │ │ +
239 }
│ │ │ +
240 __x = std::move(*__v);
│ │ │ +
241 *__v = *__p;
│ │ │ +
242 return false;
│ │ │ +
243 }
│ │ │ +
│ │ │ +
244
│ │ │ +
245 template<typename _Tp>
│ │ │ +
246 inline bool
│ │ │ +
│ │ │ +
247 atomic_compare_exchange_strong(shared_ptr<_Tp>* __p, shared_ptr<_Tp>* __v,
│ │ │ +
248 shared_ptr<_Tp> __w)
│ │ │ +
249 {
│ │ │ +
250 return std::atomic_compare_exchange_strong_explicit(__p, __v,
│ │ │ +
251 std::move(__w), memory_order_seq_cst, memory_order_seq_cst);
│ │ │ +
252 }
│ │ │ +
│ │ │ +
253
│ │ │ +
254 template<typename _Tp>
│ │ │ +
255 inline bool
│ │ │ +
│ │ │ +
256 atomic_compare_exchange_weak_explicit(shared_ptr<_Tp>* __p,
│ │ │ +
257 shared_ptr<_Tp>* __v,
│ │ │ +
258 shared_ptr<_Tp> __w,
│ │ │ +
259 memory_order __success,
│ │ │ +
260 memory_order __failure)
│ │ │ +
261 {
│ │ │ +
262 return std::atomic_compare_exchange_strong_explicit(__p, __v,
│ │ │ +
263 std::move(__w), __success, __failure);
│ │ │ +
264 }
│ │ │ +
│ │ │ +
265
│ │ │ +
266 template<typename _Tp>
│ │ │ +
267 inline bool
│ │ │ +
│ │ │ +
268 atomic_compare_exchange_weak(shared_ptr<_Tp>* __p, shared_ptr<_Tp>* __v,
│ │ │ +
269 shared_ptr<_Tp> __w)
│ │ │ +
270 {
│ │ │ +
271 return std::atomic_compare_exchange_weak_explicit(__p, __v,
│ │ │ +
272 std::move(__w), memory_order_seq_cst, memory_order_seq_cst);
│ │ │ +
273 }
│ │ │ +
│ │ │ +
274
│ │ │ +
275 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
276 bool
│ │ │ +
│ │ │ +
277 atomic_compare_exchange_strong_explicit(__shared_ptr<_Tp, _Lp>* __p,
│ │ │ +
278 __shared_ptr<_Tp, _Lp>* __v,
│ │ │ +
279 __shared_ptr<_Tp, _Lp> __w,
│ │ │ + │ │ │ + │ │ │ +
282 {
│ │ │ +
283 __shared_ptr<_Tp, _Lp> __x; // goes out of scope after __lock
│ │ │ +
284 _Sp_locker __lock{__p, __v};
│ │ │ + │ │ │ +
286 if (*__p == *__v && !__less(*__p, *__v) && !__less(*__v, *__p))
│ │ │ +
287 {
│ │ │ +
288 __x = std::move(*__p);
│ │ │ +
289 *__p = std::move(__w);
│ │ │ +
290 return true;
│ │ │ +
291 }
│ │ │ +
292 __x = std::move(*__v);
│ │ │ +
293 *__v = *__p;
│ │ │ +
294 return false;
│ │ │ +
295 }
│ │ │ +
│ │ │ +
296
│ │ │ +
297 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
298 inline bool
│ │ │ +
│ │ │ +
299 atomic_compare_exchange_strong(__shared_ptr<_Tp, _Lp>* __p,
│ │ │ +
300 __shared_ptr<_Tp, _Lp>* __v,
│ │ │ +
301 __shared_ptr<_Tp, _Lp> __w)
│ │ │ +
302 {
│ │ │ +
303 return std::atomic_compare_exchange_strong_explicit(__p, __v,
│ │ │ +
304 std::move(__w), memory_order_seq_cst, memory_order_seq_cst);
│ │ │ +
305 }
│ │ │ +
│ │ │ +
306
│ │ │ +
307 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
308 inline bool
│ │ │ +
│ │ │ +
309 atomic_compare_exchange_weak_explicit(__shared_ptr<_Tp, _Lp>* __p,
│ │ │ +
310 __shared_ptr<_Tp, _Lp>* __v,
│ │ │ +
311 __shared_ptr<_Tp, _Lp> __w,
│ │ │ +
312 memory_order __success,
│ │ │ +
313 memory_order __failure)
│ │ │ +
314 {
│ │ │ +
315 return std::atomic_compare_exchange_strong_explicit(__p, __v,
│ │ │ +
316 std::move(__w), __success, __failure);
│ │ │ +
317 }
│ │ │ +
│ │ │ +
318
│ │ │ +
319 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
320 inline bool
│ │ │ +
│ │ │ +
321 atomic_compare_exchange_weak(__shared_ptr<_Tp, _Lp>* __p,
│ │ │ +
322 __shared_ptr<_Tp, _Lp>* __v,
│ │ │ +
323 __shared_ptr<_Tp, _Lp> __w)
│ │ │ +
324 {
│ │ │ +
325 return std::atomic_compare_exchange_weak_explicit(__p, __v,
│ │ │ +
326 std::move(__w), memory_order_seq_cst, memory_order_seq_cst);
│ │ │ +
327 }
│ │ │ +
│ │ │ +
328 /// @}
│ │ │ +
329
│ │ │ +
330 /// @} relates shared_ptr
│ │ │ +
331 /// @} group pointer_abstractions
│ │ │ +
332
│ │ │ +
333_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ +
334} // namespace
│ │ │ +
335
│ │ │ +
336#endif // _SHARED_PTR_ATOMIC_H
│ │ │ + │ │ │ +
bool atomic_is_lock_free(const __shared_ptr< _Tp, _Lp > *__p)
Report whether shared_ptr atomic operations are lock-free.
│ │ │ +
constexpr std::remove_reference< _Tp >::type && move(_Tp &&__t) noexcept
Convert a value to an rvalue.
Definition move.h:104
│ │ │ +
memory_order
Enumeration for memory_order.
Definition atomic_base.h:79
│ │ │
ISO C++ entities toplevel namespace is std.
│ │ │ -
chrono::duration represents a distance between two points in time
Definition chrono:460
│ │ │ -
chrono::time_point represents a point in time as measured by a clock
Definition chrono:873
│ │ │ -
Do not acquire ownership of the mutex.
Definition std_mutex.h:199
│ │ │ -
Try to acquire ownership of the mutex without blocking.
Definition std_mutex.h:202
│ │ │ -
Assume the calling thread has already obtained mutex ownership and manage it.
Definition std_mutex.h:206
│ │ │ -
void swap(unique_lock< _Mutex > &__x, unique_lock< _Mutex > &__y) noexcept
Swap overload for unique_lock objects.
│ │ │ +
A smart pointer with reference-counted copy semantics.
│ │ │ +
Primary template owner_less.
│ │ │
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,13 +1,13 @@ │ │ │ │ libstdc++ │ │ │ │ -unique_lock.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// std::unique_lock implementation -*- C++ -*- │ │ │ │ +1// shared_ptr atomic access -*- C++ -*- │ │ │ │ 2 │ │ │ │ -3// Copyright (C) 2008-2021 Free Software Foundation, Inc. │ │ │ │ +3// Copyright (C) 2014-2021 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,266 +21,343 @@ │ │ │ │ 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/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{mutex} │ │ │ │ +27 * Do not attempt to use it directly. @headername{memory} │ │ │ │ 28 */ │ │ │ │ 29 │ │ │ │ -30#ifndef _GLIBCXX_UNIQUE_LOCK_H │ │ │ │ -31#define _GLIBCXX_UNIQUE_LOCK_H 1 │ │ │ │ +30#ifndef _SHARED_PTR_ATOMIC_H │ │ │ │ +31#define _SHARED_PTR_ATOMIC_H 1 │ │ │ │ 32 │ │ │ │ -33#pragma GCC system_header │ │ │ │ +33#include <_b_i_t_s_/_a_t_o_m_i_c___b_a_s_e_._h> │ │ │ │ 34 │ │ │ │ -35#if __cplusplus < 201103L │ │ │ │ -36# include <_b_i_t_s_/_c_+_+_0_x___w_a_r_n_i_n_g_._h> │ │ │ │ -37#else │ │ │ │ +35namespace _s_t_d _GLIBCXX_VISIBILITY(default) │ │ │ │ +36{ │ │ │ │ +37_GLIBCXX_BEGIN_NAMESPACE_VERSION │ │ │ │ 38 │ │ │ │ -39#include <_c_h_r_o_n_o> │ │ │ │ -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 │ │ │ │ +39 /** │ │ │ │ +40 * @addtogroup pointer_abstractions │ │ │ │ +41 * @{ │ │ │ │ +42 */ │ │ │ │ +43 /// @relates shared_ptr @{ │ │ │ │ +44 │ │ │ │ +45 /// @cond undocumented │ │ │ │ 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 * @ingroup mutexes │ │ │ │ -55 */ │ │ │ │ -56 template │ │ │ │ -_5_7 class unique_lock │ │ │ │ -58 { │ │ │ │ -59 public: │ │ │ │ -60 typedef _Mutex mutex_type; │ │ │ │ -61 │ │ │ │ -62 unique_lock() noexcept │ │ │ │ -63 : _M_device(0), _M_owns(false) │ │ │ │ -64 { } │ │ │ │ +47 struct _Sp_locker │ │ │ │ +48 { │ │ │ │ +49 _Sp_locker(const _Sp_locker&) = delete; │ │ │ │ +50 _Sp_locker& operator=(const _Sp_locker&) = delete; │ │ │ │ +51 │ │ │ │ +52#ifdef __GTHREADS │ │ │ │ +53 explicit │ │ │ │ +54 _Sp_locker(const void*) noexcept; │ │ │ │ +55 _Sp_locker(const void*, const void*) noexcept; │ │ │ │ +56 ~_Sp_locker(); │ │ │ │ +57 │ │ │ │ +58 private: │ │ │ │ +59 unsigned char _M_key1; │ │ │ │ +60 unsigned char _M_key2; │ │ │ │ +61#else │ │ │ │ +62 explicit _Sp_locker(const void*, const void* = nullptr) { } │ │ │ │ +63#endif │ │ │ │ +64 }; │ │ │ │ 65 │ │ │ │ -66 explicit unique_lock(mutex_type& __m) │ │ │ │ -67 : _M_device(_s_t_d_:_:_____a_d_d_r_e_s_s_o_f(__m)), _M_owns(false) │ │ │ │ -68 { │ │ │ │ -69 lock(); │ │ │ │ -70 _M_owns = true; │ │ │ │ -71 } │ │ │ │ -72 │ │ │ │ -73 unique_lock(mutex_type& __m, _d_e_f_e_r___l_o_c_k___t) noexcept │ │ │ │ -74 : _M_device(_s_t_d_:_:_____a_d_d_r_e_s_s_o_f(__m)), _M_owns(false) │ │ │ │ -75 { } │ │ │ │ -76 │ │ │ │ -77 unique_lock(mutex_type& __m, _t_r_y___t_o___l_o_c_k___t) │ │ │ │ -78 : _M_device(_s_t_d_:_:_____a_d_d_r_e_s_s_o_f(__m)), _M_owns(_M_device->try_lock()) │ │ │ │ -79 { } │ │ │ │ -80 │ │ │ │ -81 unique_lock(mutex_type& __m, _a_d_o_p_t___l_o_c_k___t) noexcept │ │ │ │ -82 : _M_device(_s_t_d_:_:_____a_d_d_r_e_s_s_o_f(__m)), _M_owns(true) │ │ │ │ -83 { │ │ │ │ -84 // XXX calling thread owns mutex │ │ │ │ -85 } │ │ │ │ -86 │ │ │ │ -87 template │ │ │ │ -88 unique_lock(mutex_type& __m, │ │ │ │ -89 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_>& __atime) │ │ │ │ -90 : _M_device(_s_t_d_:_:_____a_d_d_r_e_s_s_o_f(__m)), │ │ │ │ -91 _M_owns(_M_device->try_lock_until(__atime)) │ │ │ │ -92 { } │ │ │ │ -93 │ │ │ │ -94 template │ │ │ │ -95 unique_lock(mutex_type& __m, │ │ │ │ -96 const _c_h_r_o_n_o_:_:_d_u_r_a_t_i_o_n_<___R_e_p_,_ ___P_e_r_i_o_d_>& __rtime) │ │ │ │ -97 : _M_device(_s_t_d_:_:_____a_d_d_r_e_s_s_o_f(__m)), │ │ │ │ -98 _M_owns(_M_device->try_lock_for(__rtime)) │ │ │ │ -99 { } │ │ │ │ -100 │ │ │ │ -101 ~unique_lock() │ │ │ │ -102 { │ │ │ │ -103 if (_M_owns) │ │ │ │ -104 unlock(); │ │ │ │ -105 } │ │ │ │ -106 │ │ │ │ -107 unique_lock(const unique_lock&) = delete; │ │ │ │ -108 unique_lock& operator=(const unique_lock&) = delete; │ │ │ │ -109 │ │ │ │ -110 unique_lock(unique_lock&& __u) noexcept │ │ │ │ -111 : _M_device(__u._M_device), _M_owns(__u._M_owns) │ │ │ │ -112 { │ │ │ │ -113 __u._M_device = 0; │ │ │ │ -114 __u._M_owns = false; │ │ │ │ -115 } │ │ │ │ -116 │ │ │ │ -117 unique_lock& operator=(unique_lock&& __u) noexcept │ │ │ │ -118 { │ │ │ │ -119 if(_M_owns) │ │ │ │ -120 unlock(); │ │ │ │ +66 /// @endcond │ │ │ │ +67 │ │ │ │ +68 /** │ │ │ │ +69 * @brief Report whether shared_ptr atomic operations are lock-free. │ │ │ │ +70 * @param __p A non-null pointer to a shared_ptr object. │ │ │ │ +71 * @return True if atomic access to @c *__p is lock-free, false otherwise. │ │ │ │ +72 * @{ │ │ │ │ +73 */ │ │ │ │ +74 template │ │ │ │ +75 inline bool │ │ │ │ +_7_6 _a_t_o_m_i_c___i_s___l_o_c_k___f_r_e_e(const __shared_ptr<_Tp, _Lp>* __p) │ │ │ │ +77 { │ │ │ │ +78#ifdef __GTHREADS │ │ │ │ +79 return __gthread_active_p() == 0; │ │ │ │ +80#else │ │ │ │ +81 return true; │ │ │ │ +82#endif │ │ │ │ +83 } │ │ │ │ +84 │ │ │ │ +85 template │ │ │ │ +86 inline bool │ │ │ │ +87 atomic_is_lock_free(const _s_h_a_r_e_d___p_t_r_<___T_p_>* __p) │ │ │ │ +88 { return std::atomic_is_lock_free<_Tp, __default_lock_policy>(__p); } │ │ │ │ +89 │ │ │ │ +90 /// @} │ │ │ │ +91 │ │ │ │ +92 /** │ │ │ │ +93 * @brief Atomic load for shared_ptr objects. │ │ │ │ +94 * @param __p A non-null pointer to a shared_ptr object. │ │ │ │ +95 * @return @c *__p │ │ │ │ +96 * │ │ │ │ +97 * The memory order shall not be @c memory_order_release or │ │ │ │ +98 * @c memory_order_acq_rel. │ │ │ │ +99 * @{ │ │ │ │ +100 */ │ │ │ │ +101 template │ │ │ │ +102 inline shared_ptr<_Tp> │ │ │ │ +_1_0_3 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) │ │ │ │ +104 { │ │ │ │ +105 _Sp_locker __lock{__p}; │ │ │ │ +106 return *__p; │ │ │ │ +107 } │ │ │ │ +108 │ │ │ │ +109 template │ │ │ │ +110 inline shared_ptr<_Tp> │ │ │ │ +_1_1_1 atomic_load(const _s_h_a_r_e_d___p_t_r_<___T_p_>* __p) │ │ │ │ +112 { return std::atomic_load_explicit(__p, memory_order_seq_cst); } │ │ │ │ +113 │ │ │ │ +114 template │ │ │ │ +115 inline __shared_ptr<_Tp, _Lp> │ │ │ │ +_1_1_6 atomic_load_explicit(const __shared_ptr<_Tp, _Lp>* __p, _m_e_m_o_r_y___o_r_d_e_r) │ │ │ │ +117 { │ │ │ │ +118 _Sp_locker __lock{__p}; │ │ │ │ +119 return *__p; │ │ │ │ +120 } │ │ │ │ 121 │ │ │ │ -122 unique_lock(_s_t_d_:_:_m_o_v_e(__u)).swap(*this); │ │ │ │ -123 │ │ │ │ -124 __u._M_device = 0; │ │ │ │ -125 __u._M_owns = false; │ │ │ │ -126 │ │ │ │ -127 return *this; │ │ │ │ -128 } │ │ │ │ -129 │ │ │ │ -130 void │ │ │ │ -131 lock() │ │ │ │ -132 { │ │ │ │ -133 if (!_M_device) │ │ │ │ -134 __throw_system_error(int(errc::operation_not_permitted)); │ │ │ │ -135 else if (_M_owns) │ │ │ │ -136 __throw_system_error(int(errc::resource_deadlock_would_occur)); │ │ │ │ -137 else │ │ │ │ -138 { │ │ │ │ -139 _M_device->lock(); │ │ │ │ -140 _M_owns = true; │ │ │ │ -141 } │ │ │ │ -142 } │ │ │ │ -143 │ │ │ │ -144 bool │ │ │ │ -145 try_lock() │ │ │ │ -146 { │ │ │ │ -147 if (!_M_device) │ │ │ │ -148 __throw_system_error(int(errc::operation_not_permitted)); │ │ │ │ -149 else if (_M_owns) │ │ │ │ -150 __throw_system_error(int(errc::resource_deadlock_would_occur)); │ │ │ │ -151 else │ │ │ │ -152 { │ │ │ │ -153 _M_owns = _M_device->try_lock(); │ │ │ │ -154 return _M_owns; │ │ │ │ -155 } │ │ │ │ -156 } │ │ │ │ -157 │ │ │ │ -158 template │ │ │ │ -159 bool │ │ │ │ -160 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_>& __atime) │ │ │ │ -161 { │ │ │ │ -162 if (!_M_device) │ │ │ │ -163 __throw_system_error(int(errc::operation_not_permitted)); │ │ │ │ -164 else if (_M_owns) │ │ │ │ -165 __throw_system_error(int(errc::resource_deadlock_would_occur)); │ │ │ │ -166 else │ │ │ │ -167 { │ │ │ │ -168 _M_owns = _M_device->try_lock_until(__atime); │ │ │ │ -169 return _M_owns; │ │ │ │ -170 } │ │ │ │ -171 } │ │ │ │ -172 │ │ │ │ -173 template │ │ │ │ -174 bool │ │ │ │ -175 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_>& __rtime) │ │ │ │ -176 { │ │ │ │ -177 if (!_M_device) │ │ │ │ -178 __throw_system_error(int(errc::operation_not_permitted)); │ │ │ │ -179 else if (_M_owns) │ │ │ │ -180 __throw_system_error(int(errc::resource_deadlock_would_occur)); │ │ │ │ -181 else │ │ │ │ -182 { │ │ │ │ -183 _M_owns = _M_device->try_lock_for(__rtime); │ │ │ │ -184 return _M_owns; │ │ │ │ -185 } │ │ │ │ -186 } │ │ │ │ -187 │ │ │ │ -188 void │ │ │ │ -189 unlock() │ │ │ │ -190 { │ │ │ │ -191 if (!_M_owns) │ │ │ │ -192 __throw_system_error(int(errc::operation_not_permitted)); │ │ │ │ -193 else if (_M_device) │ │ │ │ -194 { │ │ │ │ -195 _M_device->unlock(); │ │ │ │ -196 _M_owns = false; │ │ │ │ -197 } │ │ │ │ -198 } │ │ │ │ -199 │ │ │ │ -200 void │ │ │ │ -201 swap(unique_lock& __u) noexcept │ │ │ │ -202 { │ │ │ │ -203 _s_t_d_:_:_s_w_a_p(_M_device, __u._M_device); │ │ │ │ -204 _s_t_d_:_:_s_w_a_p(_M_owns, __u._M_owns); │ │ │ │ -205 } │ │ │ │ -206 │ │ │ │ -207 mutex_type* │ │ │ │ -208 release() noexcept │ │ │ │ -209 { │ │ │ │ -210 mutex_type* __ret = _M_device; │ │ │ │ -211 _M_device = 0; │ │ │ │ -212 _M_owns = false; │ │ │ │ -213 return __ret; │ │ │ │ -214 } │ │ │ │ -215 │ │ │ │ -216 bool │ │ │ │ -217 owns_lock() const noexcept │ │ │ │ -218 { return _M_owns; } │ │ │ │ -219 │ │ │ │ -220 explicit operator bool() const noexcept │ │ │ │ -221 { return owns_lock(); } │ │ │ │ -222 │ │ │ │ -223 mutex_type* │ │ │ │ -224 mutex() const noexcept │ │ │ │ -225 { return _M_device; } │ │ │ │ -226 │ │ │ │ -227 private: │ │ │ │ -228 mutex_type* _M_device; │ │ │ │ -229 bool _M_owns; │ │ │ │ -230 }; │ │ │ │ -231 │ │ │ │ -232 /// Swap overload for unique_lock objects. │ │ │ │ -233 /// @relates unique_lock │ │ │ │ -234 template │ │ │ │ -235 inline void │ │ │ │ -_2_3_6 _s_w_a_p(unique_lock<_Mutex>& __x, unique_lock<_Mutex>& __y) noexcept │ │ │ │ -237 { __x.swap(__y); } │ │ │ │ -238 │ │ │ │ -239_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ -240} // namespace │ │ │ │ -241 │ │ │ │ -242#endif // C++11 │ │ │ │ -243#endif // _GLIBCXX_UNIQUE_LOCK_H │ │ │ │ -_c_h_r_o_n_o │ │ │ │ -_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 │ │ │ │ +122 template │ │ │ │ +123 inline __shared_ptr<_Tp, _Lp> │ │ │ │ +_1_2_4 atomic_load(const __shared_ptr<_Tp, _Lp>* __p) │ │ │ │ +125 { return std::atomic_load_explicit(__p, memory_order_seq_cst); } │ │ │ │ +126 /// @} │ │ │ │ +127 │ │ │ │ +128 /** │ │ │ │ +129 * @brief Atomic store for shared_ptr objects. │ │ │ │ +130 * @param __p A non-null pointer to a shared_ptr object. │ │ │ │ +131 * @param __r The value to store. │ │ │ │ +132 * │ │ │ │ +133 * The memory order shall not be @c memory_order_acquire or │ │ │ │ +134 * @c memory_order_acq_rel. │ │ │ │ +135 * @{ │ │ │ │ +136 */ │ │ │ │ +137 template │ │ │ │ +138 inline void │ │ │ │ +_1_3_9 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, │ │ │ │ +140 _m_e_m_o_r_y___o_r_d_e_r) │ │ │ │ +141 { │ │ │ │ +142 _Sp_locker __lock{__p}; │ │ │ │ +143 __p->swap(__r); // use swap so that **__p not destroyed while lock held │ │ │ │ +144 } │ │ │ │ +145 │ │ │ │ +146 template │ │ │ │ +147 inline void │ │ │ │ +_1_4_8 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) │ │ │ │ +149 { std::atomic_store_explicit(__p, _s_t_d_:_:_m_o_v_e(__r), memory_order_seq_cst); } │ │ │ │ +150 │ │ │ │ +151 template │ │ │ │ +152 inline void │ │ │ │ +_1_5_3 atomic_store_explicit(__shared_ptr<_Tp, _Lp>* __p, │ │ │ │ +154 __shared_ptr<_Tp, _Lp> __r, │ │ │ │ +155 _m_e_m_o_r_y___o_r_d_e_r) │ │ │ │ +156 { │ │ │ │ +157 _Sp_locker __lock{__p}; │ │ │ │ +158 __p->swap(__r); // use swap so that **__p not destroyed while lock held │ │ │ │ +159 } │ │ │ │ +160 │ │ │ │ +161 template │ │ │ │ +162 inline void │ │ │ │ +_1_6_3 atomic_store(__shared_ptr<_Tp, _Lp>* __p, __shared_ptr<_Tp, _Lp> __r) │ │ │ │ +164 { std::atomic_store_explicit(__p, _s_t_d_:_:_m_o_v_e(__r), memory_order_seq_cst); } │ │ │ │ +165 /// @} │ │ │ │ +166 │ │ │ │ +167 /** │ │ │ │ +168 * @brief Atomic exchange for shared_ptr objects. │ │ │ │ +169 * @param __p A non-null pointer to a shared_ptr object. │ │ │ │ +170 * @param __r New value to store in @c *__p. │ │ │ │ +171 * @return The original value of @c *__p │ │ │ │ +172 * @{ │ │ │ │ +173 */ │ │ │ │ +174 template │ │ │ │ +175 inline shared_ptr<_Tp> │ │ │ │ +_1_7_6 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, │ │ │ │ +177 _m_e_m_o_r_y___o_r_d_e_r) │ │ │ │ +178 { │ │ │ │ +179 _Sp_locker __lock{__p}; │ │ │ │ +180 __p->swap(__r); │ │ │ │ +181 return __r; │ │ │ │ +182 } │ │ │ │ +183 │ │ │ │ +184 template │ │ │ │ +185 inline shared_ptr<_Tp> │ │ │ │ +_1_8_6 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) │ │ │ │ +187 { │ │ │ │ +188 return std::atomic_exchange_explicit(__p, _s_t_d_:_:_m_o_v_e(__r), │ │ │ │ +189 memory_order_seq_cst); │ │ │ │ +190 } │ │ │ │ +191 │ │ │ │ +192 template │ │ │ │ +193 inline __shared_ptr<_Tp, _Lp> │ │ │ │ +_1_9_4 atomic_exchange_explicit(__shared_ptr<_Tp, _Lp>* __p, │ │ │ │ +195 __shared_ptr<_Tp, _Lp> __r, │ │ │ │ +196 _m_e_m_o_r_y___o_r_d_e_r) │ │ │ │ +197 { │ │ │ │ +198 _Sp_locker __lock{__p}; │ │ │ │ +199 __p->swap(__r); │ │ │ │ +200 return __r; │ │ │ │ +201 } │ │ │ │ +202 │ │ │ │ +203 template │ │ │ │ +204 inline __shared_ptr<_Tp, _Lp> │ │ │ │ +_2_0_5 atomic_exchange(__shared_ptr<_Tp, _Lp>* __p, __shared_ptr<_Tp, _Lp> __r) │ │ │ │ +206 { │ │ │ │ +207 return std::atomic_exchange_explicit(__p, _s_t_d_:_:_m_o_v_e(__r), │ │ │ │ +208 memory_order_seq_cst); │ │ │ │ +209 } │ │ │ │ +210 /// @} │ │ │ │ +211 │ │ │ │ +212 /** │ │ │ │ +213 * @brief Atomic compare-and-swap for shared_ptr objects. │ │ │ │ +214 * @param __p A non-null pointer to a shared_ptr object. │ │ │ │ +215 * @param __v A non-null pointer to a shared_ptr object. │ │ │ │ +216 * @param __w A non-null pointer to a shared_ptr object. │ │ │ │ +217 * @return True if @c *__p was equivalent to @c *__v, false otherwise. │ │ │ │ +218 * │ │ │ │ +219 * The memory order for failure shall not be @c memory_order_release or │ │ │ │ +220 * @c memory_order_acq_rel, or stronger than the memory order for success. │ │ │ │ +221 * @{ │ │ │ │ +222 */ │ │ │ │ +223 template │ │ │ │ +224 bool │ │ │ │ +_2_2_5 atomic_compare_exchange_strong_explicit(_s_h_a_r_e_d___p_t_r_<___T_p_>* __p, │ │ │ │ +226 _s_h_a_r_e_d___p_t_r_<___T_p_>* __v, │ │ │ │ +227 _s_h_a_r_e_d___p_t_r_<___T_p_> __w, │ │ │ │ +228 _m_e_m_o_r_y___o_r_d_e_r, │ │ │ │ +229 _m_e_m_o_r_y___o_r_d_e_r) │ │ │ │ +230 { │ │ │ │ +231 _s_h_a_r_e_d___p_t_r_<___T_p_> __x; // goes out of scope after __lock │ │ │ │ +232 _Sp_locker __lock{__p, __v}; │ │ │ │ +233 _o_w_n_e_r___l_e_s_s_<_s_h_a_r_e_d___p_t_r_<___T_p_>> __less; │ │ │ │ +234 if (*__p == *__v && !__less(*__p, *__v) && !__less(*__v, *__p)) │ │ │ │ +235 { │ │ │ │ +236 __x = _s_t_d_:_:_m_o_v_e(*__p); │ │ │ │ +237 *__p = _s_t_d_:_:_m_o_v_e(__w); │ │ │ │ +238 return true; │ │ │ │ +239 } │ │ │ │ +240 __x = _s_t_d_:_:_m_o_v_e(*__v); │ │ │ │ +241 *__v = *__p; │ │ │ │ +242 return false; │ │ │ │ +243 } │ │ │ │ +244 │ │ │ │ +245 template │ │ │ │ +246 inline bool │ │ │ │ +_2_4_7 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, │ │ │ │ +248 _s_h_a_r_e_d___p_t_r_<___T_p_> __w) │ │ │ │ +249 { │ │ │ │ +250 return std::atomic_compare_exchange_strong_explicit(__p, __v, │ │ │ │ +251 _s_t_d_:_:_m_o_v_e(__w), memory_order_seq_cst, memory_order_seq_cst); │ │ │ │ +252 } │ │ │ │ +253 │ │ │ │ +254 template │ │ │ │ +255 inline bool │ │ │ │ +_2_5_6 atomic_compare_exchange_weak_explicit(_s_h_a_r_e_d___p_t_r_<___T_p_>* __p, │ │ │ │ +257 _s_h_a_r_e_d___p_t_r_<___T_p_>* __v, │ │ │ │ +258 _s_h_a_r_e_d___p_t_r_<___T_p_> __w, │ │ │ │ +259 _m_e_m_o_r_y___o_r_d_e_r __success, │ │ │ │ +260 _m_e_m_o_r_y___o_r_d_e_r __failure) │ │ │ │ +261 { │ │ │ │ +262 return std::atomic_compare_exchange_strong_explicit(__p, __v, │ │ │ │ +263 _s_t_d_:_:_m_o_v_e(__w), __success, __failure); │ │ │ │ +264 } │ │ │ │ +265 │ │ │ │ +266 template │ │ │ │ +267 inline bool │ │ │ │ +_2_6_8 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, │ │ │ │ +269 _s_h_a_r_e_d___p_t_r_<___T_p_> __w) │ │ │ │ +270 { │ │ │ │ +271 return std::atomic_compare_exchange_weak_explicit(__p, __v, │ │ │ │ +272 _s_t_d_:_:_m_o_v_e(__w), memory_order_seq_cst, memory_order_seq_cst); │ │ │ │ +273 } │ │ │ │ +274 │ │ │ │ +275 template │ │ │ │ +276 bool │ │ │ │ +_2_7_7 atomic_compare_exchange_strong_explicit(__shared_ptr<_Tp, _Lp>* __p, │ │ │ │ +278 __shared_ptr<_Tp, _Lp>* __v, │ │ │ │ +279 __shared_ptr<_Tp, _Lp> __w, │ │ │ │ +280 _m_e_m_o_r_y___o_r_d_e_r, │ │ │ │ +281 _m_e_m_o_r_y___o_r_d_e_r) │ │ │ │ +282 { │ │ │ │ +283 __shared_ptr<_Tp, _Lp> __x; // goes out of scope after __lock │ │ │ │ +284 _Sp_locker __lock{__p, __v}; │ │ │ │ +285 _o_w_n_e_r___l_e_s_s_<_____s_h_a_r_e_d___p_t_r_<___T_p_,_ ___L_p_>> __less; │ │ │ │ +286 if (*__p == *__v && !__less(*__p, *__v) && !__less(*__v, *__p)) │ │ │ │ +287 { │ │ │ │ +288 __x = _s_t_d_:_:_m_o_v_e(*__p); │ │ │ │ +289 *__p = _s_t_d_:_:_m_o_v_e(__w); │ │ │ │ +290 return true; │ │ │ │ +291 } │ │ │ │ +292 __x = _s_t_d_:_:_m_o_v_e(*__v); │ │ │ │ +293 *__v = *__p; │ │ │ │ +294 return false; │ │ │ │ +295 } │ │ │ │ +296 │ │ │ │ +297 template │ │ │ │ +298 inline bool │ │ │ │ +_2_9_9 atomic_compare_exchange_strong(__shared_ptr<_Tp, _Lp>* __p, │ │ │ │ +300 __shared_ptr<_Tp, _Lp>* __v, │ │ │ │ +301 __shared_ptr<_Tp, _Lp> __w) │ │ │ │ +302 { │ │ │ │ +303 return std::atomic_compare_exchange_strong_explicit(__p, __v, │ │ │ │ +304 _s_t_d_:_:_m_o_v_e(__w), memory_order_seq_cst, memory_order_seq_cst); │ │ │ │ +305 } │ │ │ │ +306 │ │ │ │ +307 template │ │ │ │ +308 inline bool │ │ │ │ +_3_0_9 atomic_compare_exchange_weak_explicit(__shared_ptr<_Tp, _Lp>* __p, │ │ │ │ +310 __shared_ptr<_Tp, _Lp>* __v, │ │ │ │ +311 __shared_ptr<_Tp, _Lp> __w, │ │ │ │ +312 _m_e_m_o_r_y___o_r_d_e_r __success, │ │ │ │ +313 _m_e_m_o_r_y___o_r_d_e_r __failure) │ │ │ │ +314 { │ │ │ │ +315 return std::atomic_compare_exchange_strong_explicit(__p, __v, │ │ │ │ +316 _s_t_d_:_:_m_o_v_e(__w), __success, __failure); │ │ │ │ +317 } │ │ │ │ +318 │ │ │ │ +319 template │ │ │ │ +320 inline bool │ │ │ │ +_3_2_1 atomic_compare_exchange_weak(__shared_ptr<_Tp, _Lp>* __p, │ │ │ │ +322 __shared_ptr<_Tp, _Lp>* __v, │ │ │ │ +323 __shared_ptr<_Tp, _Lp> __w) │ │ │ │ +324 { │ │ │ │ +325 return std::atomic_compare_exchange_weak_explicit(__p, __v, │ │ │ │ +326 _s_t_d_:_:_m_o_v_e(__w), memory_order_seq_cst, memory_order_seq_cst); │ │ │ │ +327 } │ │ │ │ +328 /// @} │ │ │ │ +329 │ │ │ │ +330 /// @} relates shared_ptr │ │ │ │ +331 /// @} group pointer_abstractions │ │ │ │ +332 │ │ │ │ +333_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ +334} // namespace │ │ │ │ +335 │ │ │ │ +336#endif // _SHARED_PTR_ATOMIC_H │ │ │ │ +_a_t_o_m_i_c___b_a_s_e_._h │ │ │ │ +_s_t_d_:_:_s_h_a_r_e_d___p_t_r_:_:_a_t_o_m_i_c___i_s___l_o_c_k___f_r_e_e │ │ │ │ +bool atomic_is_lock_free(const __shared_ptr< _Tp, _Lp > *__p) │ │ │ │ +Report whether shared_ptr atomic operations are lock-free. │ │ │ │ +DDeeffiinniittiioonn _s_h_a_r_e_d___p_t_r___a_t_o_m_i_c_._h_:_7_6 │ │ │ │ _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_8 │ │ │ │ -_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_:_:_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_:_7_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_:_4_6_0 │ │ │ │ -_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_:_8_7_3 │ │ │ │ -_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_:_1_9_9 │ │ │ │ -_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_0_2 │ │ │ │ -_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_0_6 │ │ │ │ -_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_6 │ │ │ │ +_s_t_d_:_:_s_h_a_r_e_d___p_t_r │ │ │ │ +A smart pointer with reference-counted copy semantics. │ │ │ │ +DDeeffiinniittiioonn _b_i_t_s_/_s_h_a_r_e_d___p_t_r_._h_:_1_2_3 │ │ │ │ +_s_t_d_:_:_o_w_n_e_r___l_e_s_s │ │ │ │ +Primary template owner_less. │ │ │ │ +DDeeffiinniittiioonn _b_i_t_s_/_s_h_a_r_e_d___p_t_r_._h_:_7_6_9 │ │ │ │ * bbiittss │ │ │ │ - * _u_n_i_q_u_e___l_o_c_k_._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.15.0 │ │ ├── ./usr/share/doc/gcc-11-base/libstdc++/user/a00377.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: uniform_int_dist.h File Reference │ │ │ +libstdc++: shared_ptr_base.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -48,51 +48,132 @@ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
uniform_int_dist.h File Reference
│ │ │ +
shared_ptr_base.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 >
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::__detail
│ │ │ + │ │ │ + │ │ │ +

│ │ │ +Macros

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

│ │ │ +Enumerations

enum  _Lock_policy
│ │ │ │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +

│ │ │ Functions

template<typename _Tp>
constexpr bool std::__detail::_Power_of_2 (_Tp __x)
template<typename _Tp, _Lock_policy _Lp = __default_lock_policy, typename _Alloc, typename... _Args>
__shared_ptr< _Tp, _Lp > std::__allocate_shared (const _Alloc &__a, _Args &&... __args)
template<typename _Tp, _Lock_policy _Lp = __default_lock_policy, typename... _Args>
__shared_ptr< _Tp, _Lp > std::__make_shared (_Args &&... __args)
void std::__throw_bad_weak_ptr ()
template<typename _Tp, typename _Tp1, _Lock_policy _Lp>
__shared_ptr< _Tp, _Lp > std::const_pointer_cast (const __shared_ptr< _Tp1, _Lp > &__r) noexcept
template<typename _Tp, typename _Tp1, _Lock_policy _Lp>
__shared_ptr< _Tp, _Lp > std::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, _Lp > std::reinterpret_pointer_cast (const __shared_ptr< _Tp1, _Lp > &__r) noexcept
template<typename _Tp, typename _Tp1, _Lock_policy _Lp>
__shared_ptr< _Tp, _Lp > std::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
│ │ │ + │ │ │ + │ │ │

│ │ │ +Variables

static const _Lock_policy std::__default_lock_policy
│ │ │

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_base.h.

│ │ │ +

Macro Definition Documentation

│ │ │ + │ │ │ +

◆ __cpp_lib_shared_ptr_arrays

│ │ │ │ │ │ -

Definition in file uniform_int_dist.h.

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

Definition at line 887 of file shared_ptr_base.h.

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ +
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,19 +1,108 @@ │ │ │ │ libstdc++ │ │ │ │ -uniform_int_dist.h File Reference │ │ │ │ +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_:_:_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_ _> │ │ │ │ +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_:_:_____d_e_t_a_i_l │ │ │ │ +MMaaccrrooss │ │ │ │ +#define  _____c_p_p___l_i_b___s_h_a_r_e_d___p_t_r___a_r_r_a_y_s │ │ │ │ +EEnnuummeerraattiioonnss │ │ │ │ +enum   __LLoocckk__ppoolliiccyy │ │ │ │ FFuunnccttiioonnss │ │ │ │ -template │ │ │ │ -constexpr bool  _s_t_d_:_:_____d_e_t_a_i_l_:_:___P_o_w_e_r___o_f___2 (_Tp __x) │ │ │ │ +template │ │ │ │ +__shared_ptr< _Tp, _Lp >  _s_t_d_:_:_____a_l_l_o_c_a_t_e___s_h_a_r_e_d (const _Alloc &__a, _Args │ │ │ │ + &&... __args) │ │ │ │ +template │ │ │ │ +__shared_ptr< _Tp, _Lp >  _s_t_d_:_:_____m_a_k_e___s_h_a_r_e_d (_Args &&... __args) │ │ │ │ + void  _s_t_d_:_:_____t_h_r_o_w___b_a_d___w_e_a_k___p_t_r () │ │ │ │ +template │ │ │ │ +__shared_ptr< _Tp, _Lp >  _s_t_d_:_:_c_o_n_s_t___p_o_i_n_t_e_r___c_a_s_t (const __shared_ptr< _Tp1, │ │ │ │ + _Lp > &__r) noexcept │ │ │ │ +template │ │ │ │ +__shared_ptr< _Tp, _Lp >  _s_t_d_:_:_d_y_n_a_m_i_c___p_o_i_n_t_e_r___c_a_s_t (const __shared_ptr< _Tp1, │ │ │ │ + _Lp > &__r) noexcept │ │ │ │ +template │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_!_= (const __shared_ptr< _Tp, _Lp > &__a, │ │ │ │ + nullptr_t) noexcept │ │ │ │ +template │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_!_= (const __shared_ptr< _Tp1, _Lp > │ │ │ │ + &__a, const __shared_ptr< _Tp2, _Lp > &__b) noexcept │ │ │ │ +template │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_!_= (nullptr_t, const __shared_ptr< _Tp, │ │ │ │ + _Lp > &__a) noexcept │ │ │ │ +template │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_< (const __shared_ptr< _Tp, _Lp > &__a, │ │ │ │ + const __shared_ptr< _Up, _Lp > &__b) noexcept │ │ │ │ +template │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_< (const __shared_ptr< _Tp, _Lp > &__a, │ │ │ │ + nullptr_t) noexcept │ │ │ │ +template │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_< (nullptr_t, const __shared_ptr< _Tp, │ │ │ │ + _Lp > &__a) noexcept │ │ │ │ +template │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_<_= (const __shared_ptr< _Tp, _Lp > &__a, │ │ │ │ + nullptr_t) noexcept │ │ │ │ +template │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_<_= (const __shared_ptr< _Tp1, _Lp > │ │ │ │ + &__a, const __shared_ptr< _Tp2, _Lp > &__b) noexcept │ │ │ │ +template │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_<_= (nullptr_t, const __shared_ptr< _Tp, │ │ │ │ + _Lp > &__a) noexcept │ │ │ │ +template │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_=_= (const __shared_ptr< _Tp, _Lp > &__a, │ │ │ │ + nullptr_t) noexcept │ │ │ │ +template │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_=_= (const __shared_ptr< _Tp1, _Lp > │ │ │ │ + &__a, const __shared_ptr< _Tp2, _Lp > &__b) noexcept │ │ │ │ +template │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_=_= (nullptr_t, const __shared_ptr< _Tp, │ │ │ │ + _Lp > &__a) noexcept │ │ │ │ +template │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_> (const __shared_ptr< _Tp, _Lp > &__a, │ │ │ │ + nullptr_t) noexcept │ │ │ │ +template │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_> (const __shared_ptr< _Tp1, _Lp > &__a, │ │ │ │ + const __shared_ptr< _Tp2, _Lp > &__b) noexcept │ │ │ │ +template │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_> (nullptr_t, const __shared_ptr< _Tp, │ │ │ │ + _Lp > &__a) noexcept │ │ │ │ +template │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_>_= (const __shared_ptr< _Tp, _Lp > &__a, │ │ │ │ + nullptr_t) noexcept │ │ │ │ +template │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_>_= (const __shared_ptr< _Tp1, _Lp > │ │ │ │ + &__a, const __shared_ptr< _Tp2, _Lp > &__b) noexcept │ │ │ │ +template │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_>_= (nullptr_t, const __shared_ptr< _Tp, │ │ │ │ + _Lp > &__a) noexcept │ │ │ │ +template │ │ │ │ +__shared_ptr< _Tp, _Lp >  _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< │ │ │ │ + _Tp1, _Lp > &__r) noexcept │ │ │ │ +template │ │ │ │ +__shared_ptr< _Tp, _Lp >  _s_t_d_:_:_s_t_a_t_i_c___p_o_i_n_t_e_r___c_a_s_t (const __shared_ptr< _Tp1, │ │ │ │ + _Lp > &__r) noexcept │ │ │ │ +template │ │ │ │ + void  _s_t_d_:_:_s_w_a_p (__shared_ptr< _Tp, _Lp > &__a, │ │ │ │ + __shared_ptr< _Tp, _Lp > &__b) noexcept │ │ │ │ +template │ │ │ │ + void  _s_t_d_:_:_s_w_a_p (__weak_ptr< _Tp, _Lp > &__a, __weak_ptr< │ │ │ │ + _Tp, _Lp > &__b) noexcept │ │ │ │ +VVaarriiaabblleess │ │ │ │ +static const _Lock_policy  _s_t_d_:_:_____d_e_f_a_u_l_t___l_o_c_k___p_o_l_i_c_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_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___b_a_s_e_._h. │ │ │ │ +********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ +********** _?◆_? ____ccpppp__lliibb__sshhaarreedd__ppttrr__aarrrraayyss ********** │ │ │ │ +#define __cpp_lib_shared_ptr_arrays │ │ │ │ +Definition at line _8_8_7 of file _s_h_a_r_e_d___p_t_r___b_a_s_e_._h. │ │ │ │ * bbiittss │ │ │ │ - * _u_n_i_f_o_r_m___i_n_t___d_i_s_t_._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.15.0 │ │ ├── ./usr/share/doc/gcc-11-base/libstdc++/user/a00377.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,4 +1,8 @@ │ │ │ │ var a00377 = [ │ │ │ │ - ["std::uniform_int_distribution< _IntType >::param_type", "a07426.html", null], │ │ │ │ - ["std::uniform_int_distribution< _IntType >", "a07422.html", "a07422"] │ │ │ │ + ["std::_Sp_ebo_helper< _Nm, _Tp, false >", "a06434.html", null], │ │ │ │ + ["std::_Sp_ebo_helper< _Nm, _Tp, true >", "a06430.html", null], │ │ │ │ + ["std::hash< __shared_ptr< _Tp, _Lp > >", "a06562.html", null], │ │ │ │ + ["std::const_pointer_cast", "a01631.html#adb18eb46e1822ef9603a6c3e8e852bf7", null], │ │ │ │ + ["std::dynamic_pointer_cast", "a01631.html#a571f41a06af9b30a36822738fe0ab992", null], │ │ │ │ + ["std::static_pointer_cast", "a01631.html#aabfc33012523ee37216271c6256af371", null] │ │ │ │ ]; │ │ ├── ./usr/share/doc/gcc-11-base/libstdc++/user/a00377_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: uniform_int_dist.h Source File │ │ │ +libstdc++: shared_ptr_base.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -48,20 +48,20 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
uniform_int_dist.h
│ │ │ +
shared_ptr_base.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 and weak_ptr implementation details -*- C++ -*-
│ │ │
2
│ │ │ -
3// Copyright (C) 2009-2021 Free Software Foundation, Inc.
│ │ │ +
3// Copyright (C) 2007-2021 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
│ │ │ @@ -74,492 +74,1914 @@ │ │ │
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/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
│ │ │ +
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// shared_ptr.hpp
│ │ │ +
31// Copyright (C) 1998, 1999 Greg Colvin and Beman Dawes.
│ │ │ +
32// Copyright (C) 2001, 2002, 2003 Peter Dimov
│ │ │
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>
│ │ │ -
48 concept uniform_random_bit_generator
│ │ │ -
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 }
│ │ │ -
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. */
│ │ │ -
│ │ │ -
86 struct param_type
│ │ │ -
87 {
│ │ │ -
88 typedef uniform_int_distribution<_IntType> distribution_type;
│ │ │ -
89
│ │ │ -
90 param_type() : param_type(0) { }
│ │ │ -
91
│ │ │ -
92 explicit
│ │ │ -
93 param_type(_IntType __a,
│ │ │ -
94 _IntType __b = __gnu_cxx::__int_traits<_IntType>::__max)
│ │ │ -
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 };
│ │ │ +
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 > 201703L
│ │ │ +
64# include <compare>
│ │ │ +
65#endif
│ │ │ +
66
│ │ │ +
67namespace std _GLIBCXX_VISIBILITY(default)
│ │ │ +
68{
│ │ │ +
69_GLIBCXX_BEGIN_NAMESPACE_VERSION
│ │ │ +
70
│ │ │ +
71#if _GLIBCXX_USE_DEPRECATED
│ │ │ +
72#pragma GCC diagnostic push
│ │ │ +
73#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
│ │ │ +
74 template<typename> class auto_ptr;
│ │ │ +
75#pragma GCC diagnostic pop
│ │ │ +
76#endif
│ │ │ +
77
│ │ │ +
78 /**
│ │ │ +
79 * @brief Exception possibly thrown by @c shared_ptr.
│ │ │ +
80 * @ingroup exceptions
│ │ │ +
81 */
│ │ │ +
│ │ │ + │ │ │ +
83 {
│ │ │ +
84 public:
│ │ │ +
85 virtual char const* what() const noexcept;
│ │ │ +
86
│ │ │ +
87 virtual ~bad_weak_ptr() noexcept;
│ │ │ +
88 };
│ │ │
│ │ │ +
89
│ │ │ +
90 // Substitute for bad_weak_ptr object in the case of -fno-exceptions.
│ │ │ +
91 inline void
│ │ │ +
92 __throw_bad_weak_ptr()
│ │ │ +
93 { _GLIBCXX_THROW_OR_ABORT(bad_weak_ptr()); }
│ │ │ +
94
│ │ │ +
95 using __gnu_cxx::_Lock_policy;
│ │ │ +
96 using __gnu_cxx::__default_lock_policy;
│ │ │ +
97 using __gnu_cxx::_S_single;
│ │ │ +
98 using __gnu_cxx::_S_mutex;
│ │ │ +
99 using __gnu_cxx::_S_atomic;
│ │ │ +
100
│ │ │ +
101 // Empty helper class except when the template argument is _S_mutex.
│ │ │ +
102 template<_Lock_policy _Lp>
│ │ │ +
103 class _Mutex_base
│ │ │ +
104 {
│ │ │ +
105 protected:
│ │ │ +
106 // The atomic policy uses fully-fenced builtins, single doesn't care.
│ │ │ +
107 enum { _S_need_barriers = 0 };
│ │ │ +
108 };
│ │ │ +
109
│ │ │ +
110 template<>
│ │ │ +
111 class _Mutex_base<_S_mutex>
│ │ │ +
112 : public __gnu_cxx::__mutex
│ │ │ +
113 {
│ │ │ +
114 protected:
│ │ │ +
115 // This policy is used when atomic builtins are not available.
│ │ │ +
116 // The replacement atomic operations might not have the necessary
│ │ │ +
117 // memory barriers.
│ │ │ +
118 enum { _S_need_barriers = 1 };
│ │ │ +
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
│ │ │ -
133 = __gnu_cxx::__int_traits<_IntType>::__max)
│ │ │ -
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() { }
│ │ │ +
121 template<_Lock_policy _Lp = __default_lock_policy>
│ │ │ +
122 class _Sp_counted_base
│ │ │ +
123 : public _Mutex_base<_Lp>
│ │ │ +
124 {
│ │ │ +
125 public:
│ │ │ +
126 _Sp_counted_base() noexcept
│ │ │ +
127 : _M_use_count(1), _M_weak_count(1) { }
│ │ │ +
128
│ │ │ +
129 virtual
│ │ │ +
130 ~_Sp_counted_base() noexcept
│ │ │ +
131 { }
│ │ │ +
132
│ │ │ +
133 // Called when _M_use_count drops to zero, to release the resources
│ │ │ +
134 // managed by *this.
│ │ │ +
135 virtual void
│ │ │ +
136 _M_dispose() noexcept = 0;
│ │ │ +
137
│ │ │ +
138 // Called when _M_weak_count drops to zero.
│ │ │ +
139 virtual void
│ │ │ +
140 _M_destroy() noexcept
│ │ │ +
141 { delete this; }
│ │ │ +
142
│ │ │ +
143 virtual void*
│ │ │ +
144 _M_get_deleter(const std::type_info&) noexcept = 0;
│ │ │ +
145
│ │ │ +
146 void
│ │ │ +
147 _M_add_ref_copy()
│ │ │ +
148 { __gnu_cxx::__atomic_add_dispatch(&_M_use_count, 1); }
│ │ │
149
│ │ │ -
150 result_type
│ │ │ -
151 a() const
│ │ │ -
152 { return _M_param.a(); }
│ │ │ -
153
│ │ │ -
154 result_type
│ │ │ -
155 b() const
│ │ │ -
156 { return _M_param.b(); }
│ │ │ -
157
│ │ │ -
158 /**
│ │ │ -
159 * @brief Returns the parameter set of the distribution.
│ │ │ -
160 */
│ │ │ - │ │ │ -
│ │ │ -
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
│ │ │ -
│ │ │ -
170 param(const param_type& __param)
│ │ │ -
171 { _M_param = __param; }
│ │ │ +
150 void
│ │ │ +
151 _M_add_ref_lock()
│ │ │ +
152 {
│ │ │ +
153 if (!_M_add_ref_lock_nothrow())
│ │ │ +
154 __throw_bad_weak_ptr();
│ │ │ +
155 }
│ │ │ +
156
│ │ │ +
157 bool
│ │ │ +
158 _M_add_ref_lock_nothrow() noexcept;
│ │ │ +
159
│ │ │ +
160 void
│ │ │ +
161 _M_release() noexcept
│ │ │ +
162 {
│ │ │ +
163 // Be race-detector-friendly. For more info see bits/c++config.
│ │ │ +
164 _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE(&_M_use_count);
│ │ │ +
165 if (__gnu_cxx::__exchange_and_add_dispatch(&_M_use_count, -1) == 1)
│ │ │ +
166 {
│ │ │ +
167 _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER(&_M_use_count);
│ │ │ +
168 _M_dispose();
│ │ │ +
169 // There must be a memory barrier between dispose() and destroy()
│ │ │ +
170 // to ensure that the effects of dispose() are observed in the
│ │ │ +
171 // thread that runs destroy().
│ │ │ +
172 // See http://gcc.gnu.org/ml/libstdc++/2005-11/msg00136.html
│ │ │ +
173 if (_Mutex_base<_Lp>::_S_need_barriers)
│ │ │ +
174 {
│ │ │ +
175 __atomic_thread_fence (__ATOMIC_ACQ_REL);
│ │ │ +
176 }
│ │ │ +
177
│ │ │ +
178 // Be race-detector-friendly. For more info see bits/c++config.
│ │ │ +
179 _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE(&_M_weak_count);
│ │ │ +
180 if (__gnu_cxx::__exchange_and_add_dispatch(&_M_weak_count,
│ │ │ +
181 -1) == 1)
│ │ │ +
182 {
│ │ │ +
183 _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER(&_M_weak_count);
│ │ │ +
184 _M_destroy();
│ │ │ +
185 }
│ │ │ +
186 }
│ │ │ +
187 }
│ │ │ +
188
│ │ │ +
189 void
│ │ │ +
190 _M_weak_add_ref() noexcept
│ │ │ +
191 { __gnu_cxx::__atomic_add_dispatch(&_M_weak_count, 1); }
│ │ │ +
192
│ │ │ +
193 void
│ │ │ +
194 _M_weak_release() noexcept
│ │ │ +
195 {
│ │ │ +
196 // Be race-detector-friendly. For more info see bits/c++config.
│ │ │ +
197 _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE(&_M_weak_count);
│ │ │ +
198 if (__gnu_cxx::__exchange_and_add_dispatch(&_M_weak_count, -1) == 1)
│ │ │ +
199 {
│ │ │ +
200 _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER(&_M_weak_count);
│ │ │ +
201 if (_Mutex_base<_Lp>::_S_need_barriers)
│ │ │ +
202 {
│ │ │ +
203 // See _M_release(),
│ │ │ +
204 // destroy() must observe results of dispose()
│ │ │ +
205 __atomic_thread_fence (__ATOMIC_ACQ_REL);
│ │ │ +
206 }
│ │ │ +
207 _M_destroy();
│ │ │ +
208 }
│ │ │ +
209 }
│ │ │ +
210
│ │ │ +
211 long
│ │ │ +
212 _M_get_use_count() const noexcept
│ │ │ +
213 {
│ │ │ +
214 // No memory barrier is used here so there is no synchronization
│ │ │ +
215 // with other threads.
│ │ │ +
216 return __atomic_load_n(&_M_use_count, __ATOMIC_RELAXED);
│ │ │ +
217 }
│ │ │ +
218
│ │ │ +
219 private:
│ │ │ +
220 _Sp_counted_base(_Sp_counted_base const&) = delete;
│ │ │ +
221 _Sp_counted_base& operator=(_Sp_counted_base const&) = delete;
│ │ │ +
222
│ │ │ +
223 _Atomic_word _M_use_count; // #shared
│ │ │ +
224 _Atomic_word _M_weak_count; // #weak + (#shared != 0)
│ │ │ +
225 };
│ │ │ +
226
│ │ │ +
227 template<>
│ │ │ +
228 inline bool
│ │ │ +
229 _Sp_counted_base<_S_single>::
│ │ │ +
230 _M_add_ref_lock_nothrow() noexcept
│ │ │ +
231 {
│ │ │ +
232 if (_M_use_count == 0)
│ │ │ +
233 return false;
│ │ │ +
234 ++_M_use_count;
│ │ │ +
235 return true;
│ │ │ +
236 }
│ │ │ +
237
│ │ │ +
238 template<>
│ │ │ +
239 inline bool
│ │ │ +
240 _Sp_counted_base<_S_mutex>::
│ │ │ +
241 _M_add_ref_lock_nothrow() noexcept
│ │ │ +
242 {
│ │ │ +
243 __gnu_cxx::__scoped_lock sentry(*this);
│ │ │ +
244 if (__gnu_cxx::__exchange_and_add_dispatch(&_M_use_count, 1) == 0)
│ │ │ +
245 {
│ │ │ +
246 _M_use_count = 0;
│ │ │ +
247 return false;
│ │ │ +
248 }
│ │ │ +
249 return true;
│ │ │ +
250 }
│ │ │ +
251
│ │ │ +
252 template<>
│ │ │ +
253 inline bool
│ │ │ +
254 _Sp_counted_base<_S_atomic>::
│ │ │ +
255 _M_add_ref_lock_nothrow() noexcept
│ │ │ +
256 {
│ │ │ +
257 // Perform lock-free add-if-not-zero operation.
│ │ │ +
258 _Atomic_word __count = _M_get_use_count();
│ │ │ +
259 do
│ │ │ +
260 {
│ │ │ +
261 if (__count == 0)
│ │ │ +
262 return false;
│ │ │ +
263 // Replace the current counter value with the old value + 1, as
│ │ │ +
264 // long as it's not changed meanwhile.
│ │ │ +
265 }
│ │ │ +
266 while (!__atomic_compare_exchange_n(&_M_use_count, &__count, __count + 1,
│ │ │ +
267 true, __ATOMIC_ACQ_REL,
│ │ │ +
268 __ATOMIC_RELAXED));
│ │ │ +
269 return true;
│ │ │ +
270 }
│ │ │ +
271
│ │ │ +
272 template<>
│ │ │ +
273 inline void
│ │ │ +
274 _Sp_counted_base<_S_single>::_M_add_ref_copy()
│ │ │ +
275 { ++_M_use_count; }
│ │ │ +
276
│ │ │ +
277 template<>
│ │ │ +
278 inline void
│ │ │ +
279 _Sp_counted_base<_S_single>::_M_release() noexcept
│ │ │ +
280 {
│ │ │ +
281 if (--_M_use_count == 0)
│ │ │ +
282 {
│ │ │ +
283 _M_dispose();
│ │ │ +
284 if (--_M_weak_count == 0)
│ │ │ +
285 _M_destroy();
│ │ │ +
286 }
│ │ │ +
287 }
│ │ │ +
288
│ │ │ +
289 template<>
│ │ │ +
290 inline void
│ │ │ +
291 _Sp_counted_base<_S_single>::_M_weak_add_ref() noexcept
│ │ │ +
292 { ++_M_weak_count; }
│ │ │ +
293
│ │ │ +
294 template<>
│ │ │ +
295 inline void
│ │ │ +
296 _Sp_counted_base<_S_single>::_M_weak_release() noexcept
│ │ │ +
297 {
│ │ │ +
298 if (--_M_weak_count == 0)
│ │ │ +
299 _M_destroy();
│ │ │ +
300 }
│ │ │ +
301
│ │ │ +
302 template<>
│ │ │ +
303 inline long
│ │ │ +
304 _Sp_counted_base<_S_single>::_M_get_use_count() const noexcept
│ │ │ +
305 { return _M_use_count; }
│ │ │ +
306
│ │ │ +
307
│ │ │ +
308 // Forward declarations.
│ │ │ +
309 template<typename _Tp, _Lock_policy _Lp = __default_lock_policy>
│ │ │ +
310 class __shared_ptr;
│ │ │ +
311
│ │ │ +
312 template<typename _Tp, _Lock_policy _Lp = __default_lock_policy>
│ │ │ +
313 class __weak_ptr;
│ │ │ +
314
│ │ │ +
315 template<typename _Tp, _Lock_policy _Lp = __default_lock_policy>
│ │ │ +
316 class __enable_shared_from_this;
│ │ │ +
317
│ │ │ +
318 template<typename _Tp>
│ │ │ +
319 class shared_ptr;
│ │ │ +
320
│ │ │ +
321 template<typename _Tp>
│ │ │ +
322 class weak_ptr;
│ │ │ +
323
│ │ │ +
324 template<typename _Tp>
│ │ │ +
325 struct owner_less;
│ │ │ +
326
│ │ │ +
327 template<typename _Tp>
│ │ │ +
328 class enable_shared_from_this;
│ │ │ +
329
│ │ │ +
330 template<_Lock_policy _Lp = __default_lock_policy>
│ │ │ +
331 class __weak_count;
│ │ │ +
332
│ │ │ +
333 template<_Lock_policy _Lp = __default_lock_policy>
│ │ │ +
334 class __shared_count;
│ │ │ +
335
│ │ │ +
336
│ │ │ +
337 // Counted ptr with no deleter or allocator support
│ │ │ +
338 template<typename _Ptr, _Lock_policy _Lp>
│ │ │ +
339 class _Sp_counted_ptr final : public _Sp_counted_base<_Lp>
│ │ │ +
340 {
│ │ │ +
341 public:
│ │ │ +
342 explicit
│ │ │ +
343 _Sp_counted_ptr(_Ptr __p) noexcept
│ │ │ +
344 : _M_ptr(__p) { }
│ │ │ +
345
│ │ │ +
346 virtual void
│ │ │ +
347 _M_dispose() noexcept
│ │ │ +
348 { delete _M_ptr; }
│ │ │ +
349
│ │ │ +
350 virtual void
│ │ │ +
351 _M_destroy() noexcept
│ │ │ +
352 { delete this; }
│ │ │ +
353
│ │ │ +
354 virtual void*
│ │ │ +
355 _M_get_deleter(const std::type_info&) noexcept
│ │ │ +
356 { return nullptr; }
│ │ │ +
357
│ │ │ +
358 _Sp_counted_ptr(const _Sp_counted_ptr&) = delete;
│ │ │ +
359 _Sp_counted_ptr& operator=(const _Sp_counted_ptr&) = delete;
│ │ │ +
360
│ │ │ +
361 private:
│ │ │ +
362 _Ptr _M_ptr;
│ │ │ +
363 };
│ │ │ +
364
│ │ │ +
365 template<>
│ │ │ +
366 inline void
│ │ │ +
367 _Sp_counted_ptr<nullptr_t, _S_single>::_M_dispose() noexcept { }
│ │ │ +
368
│ │ │ +
369 template<>
│ │ │ +
370 inline void
│ │ │ +
371 _Sp_counted_ptr<nullptr_t, _S_mutex>::_M_dispose() noexcept { }
│ │ │ +
372
│ │ │ +
373 template<>
│ │ │ +
374 inline void
│ │ │ +
375 _Sp_counted_ptr<nullptr_t, _S_atomic>::_M_dispose() noexcept { }
│ │ │ +
376
│ │ │ +
377 template<int _Nm, typename _Tp,
│ │ │ +
378 bool __use_ebo = !__is_final(_Tp) && __is_empty(_Tp)>
│ │ │ +
379 struct _Sp_ebo_helper;
│ │ │ +
380
│ │ │ +
381 /// Specialization using EBO.
│ │ │ +
382 template<int _Nm, typename _Tp>
│ │ │ +
│ │ │ +
383 struct _Sp_ebo_helper<_Nm, _Tp, true> : private _Tp
│ │ │ +
384 {
│ │ │ +
385 explicit _Sp_ebo_helper(const _Tp& __tp) : _Tp(__tp) { }
│ │ │ +
386 explicit _Sp_ebo_helper(_Tp&& __tp) : _Tp(std::move(__tp)) { }
│ │ │ +
387
│ │ │ +
388 static _Tp&
│ │ │ +
389 _S_get(_Sp_ebo_helper& __eboh) { return static_cast<_Tp&>(__eboh); }
│ │ │ +
390 };
│ │ │
│ │ │ -
172
│ │ │ -
173 /**
│ │ │ -
174 * @brief Returns the inclusive lower bound of the distribution range.
│ │ │ -
175 */
│ │ │ -
176 result_type
│ │ │ -
│ │ │ -
177 min() const
│ │ │ -
178 { return this->a(); }
│ │ │ +
391
│ │ │ +
392 /// Specialization not using EBO.
│ │ │ +
393 template<int _Nm, typename _Tp>
│ │ │ +
│ │ │ +
394 struct _Sp_ebo_helper<_Nm, _Tp, false>
│ │ │ +
395 {
│ │ │ +
396 explicit _Sp_ebo_helper(const _Tp& __tp) : _M_tp(__tp) { }
│ │ │ +
397 explicit _Sp_ebo_helper(_Tp&& __tp) : _M_tp(std::move(__tp)) { }
│ │ │ +
398
│ │ │ +
399 static _Tp&
│ │ │ +
400 _S_get(_Sp_ebo_helper& __eboh)
│ │ │ +
401 { return __eboh._M_tp; }
│ │ │ +
402
│ │ │ +
403 private:
│ │ │ +
404 _Tp _M_tp;
│ │ │ +
405 };
│ │ │
│ │ │ -
179
│ │ │ -
180 /**
│ │ │ -
181 * @brief Returns the inclusive upper bound of the distribution range.
│ │ │ -
182 */
│ │ │ -
183 result_type
│ │ │ -
│ │ │ -
184 max() const
│ │ │ -
185 { return this->b(); }
│ │ │ +
406
│ │ │ +
407 // Support for custom deleter and/or allocator
│ │ │ +
408 template<typename _Ptr, typename _Deleter, typename _Alloc, _Lock_policy _Lp>
│ │ │ +
409 class _Sp_counted_deleter final : public _Sp_counted_base<_Lp>
│ │ │ +
410 {
│ │ │ +
411 class _Impl : _Sp_ebo_helper<0, _Deleter>, _Sp_ebo_helper<1, _Alloc>
│ │ │ +
412 {
│ │ │ +
413 typedef _Sp_ebo_helper<0, _Deleter> _Del_base;
│ │ │ +
414 typedef _Sp_ebo_helper<1, _Alloc> _Alloc_base;
│ │ │ +
415
│ │ │ +
416 public:
│ │ │ +
417 _Impl(_Ptr __p, _Deleter __d, const _Alloc& __a) noexcept
│ │ │ +
418 : _Del_base(std::move(__d)), _Alloc_base(__a), _M_ptr(__p)
│ │ │ +
419 { }
│ │ │ +
420
│ │ │ +
421 _Deleter& _M_del() noexcept { return _Del_base::_S_get(*this); }
│ │ │ +
422 _Alloc& _M_alloc() noexcept { return _Alloc_base::_S_get(*this); }
│ │ │ +
423
│ │ │ +
424 _Ptr _M_ptr;
│ │ │ +
425 };
│ │ │ +
426
│ │ │ +
427 public:
│ │ │ +
428 using __allocator_type = __alloc_rebind<_Alloc, _Sp_counted_deleter>;
│ │ │ +
429
│ │ │ +
430 // __d(__p) must not throw.
│ │ │ +
431 _Sp_counted_deleter(_Ptr __p, _Deleter __d) noexcept
│ │ │ +
432 : _M_impl(__p, std::move(__d), _Alloc()) { }
│ │ │ +
433
│ │ │ +
434 // __d(__p) must not throw.
│ │ │ +
435 _Sp_counted_deleter(_Ptr __p, _Deleter __d, const _Alloc& __a) noexcept
│ │ │ +
436 : _M_impl(__p, std::move(__d), __a) { }
│ │ │ +
437
│ │ │ +
438 ~_Sp_counted_deleter() noexcept { }
│ │ │ +
439
│ │ │ +
440 virtual void
│ │ │ +
441 _M_dispose() noexcept
│ │ │ +
442 { _M_impl._M_del()(_M_impl._M_ptr); }
│ │ │ +
443
│ │ │ +
444 virtual void
│ │ │ +
445 _M_destroy() noexcept
│ │ │ +
446 {
│ │ │ +
447 __allocator_type __a(_M_impl._M_alloc());
│ │ │ +
448 __allocated_ptr<__allocator_type> __guard_ptr{ __a, this };
│ │ │ +
449 this->~_Sp_counted_deleter();
│ │ │ +
450 }
│ │ │ +
451
│ │ │ +
452 virtual void*
│ │ │ +
453 _M_get_deleter(const type_info& __ti [[__gnu__::__unused__]]) noexcept
│ │ │ +
454 {
│ │ │ +
455#if __cpp_rtti
│ │ │ +
456 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ +
457 // 2400. shared_ptr's get_deleter() should use addressof()
│ │ │ +
458 return __ti == typeid(_Deleter)
│ │ │ +
459 ? std::__addressof(_M_impl._M_del())
│ │ │ +
460 : nullptr;
│ │ │ +
461#else
│ │ │ +
462 return nullptr;
│ │ │ +
463#endif
│ │ │ +
464 }
│ │ │ +
465
│ │ │ +
466 private:
│ │ │ +
467 _Impl _M_impl;
│ │ │ +
468 };
│ │ │ +
469
│ │ │ +
470 // helpers for make_shared / allocate_shared
│ │ │ +
471
│ │ │ +
472 struct _Sp_make_shared_tag
│ │ │ +
473 {
│ │ │ +
474 private:
│ │ │ +
475 template<typename _Tp, typename _Alloc, _Lock_policy _Lp>
│ │ │ +
476 friend class _Sp_counted_ptr_inplace;
│ │ │ +
477
│ │ │ +
478 static const type_info&
│ │ │ +
479 _S_ti() noexcept _GLIBCXX_VISIBILITY(default)
│ │ │ +
480 {
│ │ │ +
481 alignas(type_info) static constexpr char __tag[sizeof(type_info)] = { };
│ │ │ +
482 return reinterpret_cast<const type_info&>(__tag);
│ │ │ +
483 }
│ │ │ +
484
│ │ │ +
485 static bool _S_eq(const type_info&) noexcept;
│ │ │ +
486 };
│ │ │ +
487
│ │ │ +
488 template<typename _Alloc>
│ │ │ +
489 struct _Sp_alloc_shared_tag
│ │ │ +
490 {
│ │ │ +
491 const _Alloc& _M_a;
│ │ │ +
492 };
│ │ │ +
493
│ │ │ +
494 template<typename _Tp, typename _Alloc, _Lock_policy _Lp>
│ │ │ +
495 class _Sp_counted_ptr_inplace final : public _Sp_counted_base<_Lp>
│ │ │ +
496 {
│ │ │ +
497 class _Impl : _Sp_ebo_helper<0, _Alloc>
│ │ │ +
498 {
│ │ │ +
499 typedef _Sp_ebo_helper<0, _Alloc> _A_base;
│ │ │ +
500
│ │ │ +
501 public:
│ │ │ +
502 explicit _Impl(_Alloc __a) noexcept : _A_base(__a) { }
│ │ │ +
503
│ │ │ +
504 _Alloc& _M_alloc() noexcept { return _A_base::_S_get(*this); }
│ │ │ +
505
│ │ │ +
506 __gnu_cxx::__aligned_buffer<_Tp> _M_storage;
│ │ │ +
507 };
│ │ │ +
508
│ │ │ +
509 public:
│ │ │ +
510 using __allocator_type = __alloc_rebind<_Alloc, _Sp_counted_ptr_inplace>;
│ │ │ +
511
│ │ │ +
512 // Alloc parameter is not a reference so doesn't alias anything in __args
│ │ │ +
513 template<typename... _Args>
│ │ │ +
514 _Sp_counted_ptr_inplace(_Alloc __a, _Args&&... __args)
│ │ │ +
515 : _M_impl(__a)
│ │ │ +
516 {
│ │ │ +
517 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ +
518 // 2070. allocate_shared should use allocator_traits<A>::construct
│ │ │ +
519 allocator_traits<_Alloc>::construct(__a, _M_ptr(),
│ │ │ +
520 std::forward<_Args>(__args)...); // might throw
│ │ │ +
521 }
│ │ │ +
522
│ │ │ +
523 ~_Sp_counted_ptr_inplace() noexcept { }
│ │ │ +
524
│ │ │ +
525 virtual void
│ │ │ +
526 _M_dispose() noexcept
│ │ │ +
527 {
│ │ │ +
528 allocator_traits<_Alloc>::destroy(_M_impl._M_alloc(), _M_ptr());
│ │ │ +
529 }
│ │ │ +
530
│ │ │ +
531 // Override because the allocator needs to know the dynamic type
│ │ │ +
532 virtual void
│ │ │ +
533 _M_destroy() noexcept
│ │ │ +
534 {
│ │ │ +
535 __allocator_type __a(_M_impl._M_alloc());
│ │ │ +
536 __allocated_ptr<__allocator_type> __guard_ptr{ __a, this };
│ │ │ +
537 this->~_Sp_counted_ptr_inplace();
│ │ │ +
538 }
│ │ │ +
539
│ │ │ +
540 private:
│ │ │ +
541 friend class __shared_count<_Lp>; // To be able to call _M_ptr().
│ │ │ +
542
│ │ │ +
543 // No longer used, but code compiled against old libstdc++ headers
│ │ │ +
544 // might still call it from __shared_ptr ctor to get the pointer out.
│ │ │ +
545 virtual void*
│ │ │ +
546 _M_get_deleter(const std::type_info& __ti) noexcept override
│ │ │ +
547 {
│ │ │ +
548 auto __ptr = const_cast<typename remove_cv<_Tp>::type*>(_M_ptr());
│ │ │ +
549 // Check for the fake type_info first, so we don't try to access it
│ │ │ +
550 // as a real type_info object. Otherwise, check if it's the real
│ │ │ +
551 // type_info for this class. With RTTI enabled we can check directly,
│ │ │ +
552 // or call a library function to do it.
│ │ │ +
553 if (&__ti == &_Sp_make_shared_tag::_S_ti()
│ │ │ +
554 ||
│ │ │ +
555#if __cpp_rtti
│ │ │ +
556 __ti == typeid(_Sp_make_shared_tag)
│ │ │ +
557#else
│ │ │ +
558 _Sp_make_shared_tag::_S_eq(__ti)
│ │ │ +
559#endif
│ │ │ +
560 )
│ │ │ +
561 return __ptr;
│ │ │ +
562 return nullptr;
│ │ │ +
563 }
│ │ │ +
564
│ │ │ +
565 _Tp* _M_ptr() noexcept { return _M_impl._M_storage._M_ptr(); }
│ │ │ +
566
│ │ │ +
567 _Impl _M_impl;
│ │ │ +
568 };
│ │ │ +
569
│ │ │ +
570 // The default deleter for shared_ptr<T[]> and shared_ptr<T[N]>.
│ │ │ +
571 struct __sp_array_delete
│ │ │ +
572 {
│ │ │ +
573 template<typename _Yp>
│ │ │ +
574 void operator()(_Yp* __p) const { delete[] __p; }
│ │ │ +
575 };
│ │ │ +
576
│ │ │ +
577 template<_Lock_policy _Lp>
│ │ │ +
578 class __shared_count
│ │ │ +
579 {
│ │ │ +
580 template<typename _Tp>
│ │ │ +
581 struct __not_alloc_shared_tag { using type = void; };
│ │ │ +
582
│ │ │ +
583 template<typename _Tp>
│ │ │ +
584 struct __not_alloc_shared_tag<_Sp_alloc_shared_tag<_Tp>> { };
│ │ │ +
585
│ │ │ +
586 public:
│ │ │ +
587 constexpr __shared_count() noexcept : _M_pi(0)
│ │ │ +
588 { }
│ │ │ +
589
│ │ │ +
590 template<typename _Ptr>
│ │ │ +
591 explicit
│ │ │ +
592 __shared_count(_Ptr __p) : _M_pi(0)
│ │ │ +
593 {
│ │ │ +
594 __try
│ │ │ +
595 {
│ │ │ +
596 _M_pi = new _Sp_counted_ptr<_Ptr, _Lp>(__p);
│ │ │ +
597 }
│ │ │ +
598 __catch(...)
│ │ │ +
599 {
│ │ │ +
600 delete __p;
│ │ │ +
601 __throw_exception_again;
│ │ │ +
602 }
│ │ │ +
603 }
│ │ │ +
604
│ │ │ +
605 template<typename _Ptr>
│ │ │ +
606 __shared_count(_Ptr __p, /* is_array = */ false_type)
│ │ │ +
607 : __shared_count(__p)
│ │ │ +
608 { }
│ │ │ +
609
│ │ │ +
610 template<typename _Ptr>
│ │ │ +
611 __shared_count(_Ptr __p, /* is_array = */ true_type)
│ │ │ +
612 : __shared_count(__p, __sp_array_delete{}, allocator<void>())
│ │ │ +
613 { }
│ │ │ +
614
│ │ │ +
615 template<typename _Ptr, typename _Deleter,
│ │ │ +
616 typename = typename __not_alloc_shared_tag<_Deleter>::type>
│ │ │ +
617 __shared_count(_Ptr __p, _Deleter __d)
│ │ │ +
618 : __shared_count(__p, std::move(__d), allocator<void>())
│ │ │ +
619 { }
│ │ │ +
620
│ │ │ +
621 template<typename _Ptr, typename _Deleter, typename _Alloc,
│ │ │ +
622 typename = typename __not_alloc_shared_tag<_Deleter>::type>
│ │ │ +
623 __shared_count(_Ptr __p, _Deleter __d, _Alloc __a) : _M_pi(0)
│ │ │ +
624 {
│ │ │ +
625 typedef _Sp_counted_deleter<_Ptr, _Deleter, _Alloc, _Lp> _Sp_cd_type;
│ │ │ +
626 __try
│ │ │ +
627 {
│ │ │ +
628 typename _Sp_cd_type::__allocator_type __a2(__a);
│ │ │ +
629 auto __guard = std::__allocate_guarded(__a2);
│ │ │ +
630 _Sp_cd_type* __mem = __guard.get();
│ │ │ +
631 ::new (__mem) _Sp_cd_type(__p, std::move(__d), std::move(__a));
│ │ │ +
632 _M_pi = __mem;
│ │ │ +
633 __guard = nullptr;
│ │ │ +
634 }
│ │ │ +
635 __catch(...)
│ │ │ +
636 {
│ │ │ +
637 __d(__p); // Call _Deleter on __p.
│ │ │ +
638 __throw_exception_again;
│ │ │ +
639 }
│ │ │ +
640 }
│ │ │ +
641
│ │ │ +
642 template<typename _Tp, typename _Alloc, typename... _Args>
│ │ │ +
643 __shared_count(_Tp*& __p, _Sp_alloc_shared_tag<_Alloc> __a,
│ │ │ +
644 _Args&&... __args)
│ │ │ +
645 {
│ │ │ +
646 typedef _Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp> _Sp_cp_type;
│ │ │ +
647 typename _Sp_cp_type::__allocator_type __a2(__a._M_a);
│ │ │ +
648 auto __guard = std::__allocate_guarded(__a2);
│ │ │ +
649 _Sp_cp_type* __mem = __guard.get();
│ │ │ +
650 auto __pi = ::new (__mem)
│ │ │ +
651 _Sp_cp_type(__a._M_a, std::forward<_Args>(__args)...);
│ │ │ +
652 __guard = nullptr;
│ │ │ +
653 _M_pi = __pi;
│ │ │ +
654 __p = __pi->_M_ptr();
│ │ │ +
655 }
│ │ │ +
656
│ │ │ +
657#if _GLIBCXX_USE_DEPRECATED
│ │ │ +
658#pragma GCC diagnostic push
│ │ │ +
659#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
│ │ │ +
660 // Special case for auto_ptr<_Tp> to provide the strong guarantee.
│ │ │ +
661 template<typename _Tp>
│ │ │ +
662 explicit
│ │ │ +
663 __shared_count(std::auto_ptr<_Tp>&& __r);
│ │ │ +
664#pragma GCC diagnostic pop
│ │ │ +
665#endif
│ │ │ +
666
│ │ │ +
667 // Special case for unique_ptr<_Tp,_Del> to provide the strong guarantee.
│ │ │ +
668 template<typename _Tp, typename _Del>
│ │ │ +
669 explicit
│ │ │ +
670 __shared_count(std::unique_ptr<_Tp, _Del>&& __r) : _M_pi(0)
│ │ │ +
671 {
│ │ │ +
672 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ +
673 // 2415. Inconsistency between unique_ptr and shared_ptr
│ │ │ +
674 if (__r.get() == nullptr)
│ │ │ +
675 return;
│ │ │ +
676
│ │ │ +
677 using _Ptr = typename unique_ptr<_Tp, _Del>::pointer;
│ │ │ +
678 using _Del2 = typename conditional<is_reference<_Del>::value,
│ │ │ +
679 reference_wrapper<typename remove_reference<_Del>::type>,
│ │ │ +
680 _Del>::type;
│ │ │ +
681 using _Sp_cd_type
│ │ │ +
682 = _Sp_counted_deleter<_Ptr, _Del2, allocator<void>, _Lp>;
│ │ │ +
683 using _Alloc = allocator<_Sp_cd_type>;
│ │ │ +
684 using _Alloc_traits = allocator_traits<_Alloc>;
│ │ │ +
685 _Alloc __a;
│ │ │ +
686 _Sp_cd_type* __mem = _Alloc_traits::allocate(__a, 1);
│ │ │ +
687 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ +
688 // 3548. shared_ptr construction from unique_ptr should move
│ │ │ +
689 // (not copy) the deleter
│ │ │ +
690 _Alloc_traits::construct(__a, __mem, __r.release(),
│ │ │ +
691 std::forward<_Del>(__r.get_deleter()));
│ │ │ +
692 _M_pi = __mem;
│ │ │ +
693 }
│ │ │ +
694
│ │ │ +
695 // Throw bad_weak_ptr when __r._M_get_use_count() == 0.
│ │ │ +
696 explicit __shared_count(const __weak_count<_Lp>& __r);
│ │ │ +
697
│ │ │ +
698 // Does not throw if __r._M_get_use_count() == 0, caller must check.
│ │ │ +
699 explicit
│ │ │ +
700 __shared_count(const __weak_count<_Lp>& __r, std::nothrow_t) noexcept;
│ │ │ +
701
│ │ │ +
702 ~__shared_count() noexcept
│ │ │ +
703 {
│ │ │ +
704 if (_M_pi != nullptr)
│ │ │ +
705 _M_pi->_M_release();
│ │ │ +
706 }
│ │ │ +
707
│ │ │ +
708 __shared_count(const __shared_count& __r) noexcept
│ │ │ +
709 : _M_pi(__r._M_pi)
│ │ │ +
710 {
│ │ │ +
711 if (_M_pi != nullptr)
│ │ │ +
712 _M_pi->_M_add_ref_copy();
│ │ │ +
713 }
│ │ │ +
714
│ │ │ +
715 __shared_count&
│ │ │ +
716 operator=(const __shared_count& __r) noexcept
│ │ │ +
717 {
│ │ │ +
718 _Sp_counted_base<_Lp>* __tmp = __r._M_pi;
│ │ │ +
719 if (__tmp != _M_pi)
│ │ │ +
720 {
│ │ │ +
721 if (__tmp != nullptr)
│ │ │ +
722 __tmp->_M_add_ref_copy();
│ │ │ +
723 if (_M_pi != nullptr)
│ │ │ +
724 _M_pi->_M_release();
│ │ │ +
725 _M_pi = __tmp;
│ │ │ +
726 }
│ │ │ +
727 return *this;
│ │ │ +
728 }
│ │ │ +
729
│ │ │ +
730 void
│ │ │ +
731 _M_swap(__shared_count& __r) noexcept
│ │ │ +
732 {
│ │ │ +
733 _Sp_counted_base<_Lp>* __tmp = __r._M_pi;
│ │ │ +
734 __r._M_pi = _M_pi;
│ │ │ +
735 _M_pi = __tmp;
│ │ │ +
736 }
│ │ │ +
737
│ │ │ +
738 long
│ │ │ +
739 _M_get_use_count() const noexcept
│ │ │ +
740 { return _M_pi ? _M_pi->_M_get_use_count() : 0; }
│ │ │ +
741
│ │ │ +
742 bool
│ │ │ +
743 _M_unique() const noexcept
│ │ │ +
744 { return this->_M_get_use_count() == 1; }
│ │ │ +
745
│ │ │ +
746 void*
│ │ │ +
747 _M_get_deleter(const std::type_info& __ti) const noexcept
│ │ │ +
748 { return _M_pi ? _M_pi->_M_get_deleter(__ti) : nullptr; }
│ │ │ +
749
│ │ │ +
750 bool
│ │ │ +
751 _M_less(const __shared_count& __rhs) const noexcept
│ │ │ +
752 { return std::less<_Sp_counted_base<_Lp>*>()(this->_M_pi, __rhs._M_pi); }
│ │ │ +
753
│ │ │ +
754 bool
│ │ │ +
755 _M_less(const __weak_count<_Lp>& __rhs) const noexcept
│ │ │ +
756 { return std::less<_Sp_counted_base<_Lp>*>()(this->_M_pi, __rhs._M_pi); }
│ │ │ +
757
│ │ │ +
758 // Friend function injected into enclosing namespace and found by ADL
│ │ │ +
759 friend inline bool
│ │ │ +
760 operator==(const __shared_count& __a, const __shared_count& __b) noexcept
│ │ │ +
761 { return __a._M_pi == __b._M_pi; }
│ │ │ +
762
│ │ │ +
763 private:
│ │ │ +
764 friend class __weak_count<_Lp>;
│ │ │ +
765
│ │ │ +
766 _Sp_counted_base<_Lp>* _M_pi;
│ │ │ +
767 };
│ │ │ +
768
│ │ │ +
769
│ │ │ +
770 template<_Lock_policy _Lp>
│ │ │ +
771 class __weak_count
│ │ │ +
772 {
│ │ │ +
773 public:
│ │ │ +
774 constexpr __weak_count() noexcept : _M_pi(nullptr)
│ │ │ +
775 { }
│ │ │ +
776
│ │ │ +
777 __weak_count(const __shared_count<_Lp>& __r) noexcept
│ │ │ +
778 : _M_pi(__r._M_pi)
│ │ │ +
779 {
│ │ │ +
780 if (_M_pi != nullptr)
│ │ │ +
781 _M_pi->_M_weak_add_ref();
│ │ │ +
782 }
│ │ │ +
783
│ │ │ +
784 __weak_count(const __weak_count& __r) noexcept
│ │ │ +
785 : _M_pi(__r._M_pi)
│ │ │ +
786 {
│ │ │ +
787 if (_M_pi != nullptr)
│ │ │ +
788 _M_pi->_M_weak_add_ref();
│ │ │ +
789 }
│ │ │ +
790
│ │ │ +
791 __weak_count(__weak_count&& __r) noexcept
│ │ │ +
792 : _M_pi(__r._M_pi)
│ │ │ +
793 { __r._M_pi = nullptr; }
│ │ │ +
794
│ │ │ +
795 ~__weak_count() noexcept
│ │ │ +
796 {
│ │ │ +
797 if (_M_pi != nullptr)
│ │ │ +
798 _M_pi->_M_weak_release();
│ │ │ +
799 }
│ │ │ +
800
│ │ │ +
801 __weak_count&
│ │ │ +
802 operator=(const __shared_count<_Lp>& __r) noexcept
│ │ │ +
803 {
│ │ │ +
804 _Sp_counted_base<_Lp>* __tmp = __r._M_pi;
│ │ │ +
805 if (__tmp != nullptr)
│ │ │ +
806 __tmp->_M_weak_add_ref();
│ │ │ +
807 if (_M_pi != nullptr)
│ │ │ +
808 _M_pi->_M_weak_release();
│ │ │ +
809 _M_pi = __tmp;
│ │ │ +
810 return *this;
│ │ │ +
811 }
│ │ │ +
812
│ │ │ +
813 __weak_count&
│ │ │ +
814 operator=(const __weak_count& __r) noexcept
│ │ │ +
815 {
│ │ │ +
816 _Sp_counted_base<_Lp>* __tmp = __r._M_pi;
│ │ │ +
817 if (__tmp != nullptr)
│ │ │ +
818 __tmp->_M_weak_add_ref();
│ │ │ +
819 if (_M_pi != nullptr)
│ │ │ +
820 _M_pi->_M_weak_release();
│ │ │ +
821 _M_pi = __tmp;
│ │ │ +
822 return *this;
│ │ │ +
823 }
│ │ │ +
824
│ │ │ +
825 __weak_count&
│ │ │ +
826 operator=(__weak_count&& __r) noexcept
│ │ │ +
827 {
│ │ │ +
828 if (_M_pi != nullptr)
│ │ │ +
829 _M_pi->_M_weak_release();
│ │ │ +
830 _M_pi = __r._M_pi;
│ │ │ +
831 __r._M_pi = nullptr;
│ │ │ +
832 return *this;
│ │ │ +
833 }
│ │ │ +
834
│ │ │ +
835 void
│ │ │ +
836 _M_swap(__weak_count& __r) noexcept
│ │ │ +
837 {
│ │ │ +
838 _Sp_counted_base<_Lp>* __tmp = __r._M_pi;
│ │ │ +
839 __r._M_pi = _M_pi;
│ │ │ +
840 _M_pi = __tmp;
│ │ │ +
841 }
│ │ │ +
842
│ │ │ +
843 long
│ │ │ +
844 _M_get_use_count() const noexcept
│ │ │ +
845 { return _M_pi != nullptr ? _M_pi->_M_get_use_count() : 0; }
│ │ │ +
846
│ │ │ +
847 bool
│ │ │ +
848 _M_less(const __weak_count& __rhs) const noexcept
│ │ │ +
849 { return std::less<_Sp_counted_base<_Lp>*>()(this->_M_pi, __rhs._M_pi); }
│ │ │ +
850
│ │ │ +
851 bool
│ │ │ +
852 _M_less(const __shared_count<_Lp>& __rhs) const noexcept
│ │ │ +
853 { return std::less<_Sp_counted_base<_Lp>*>()(this->_M_pi, __rhs._M_pi); }
│ │ │ +
854
│ │ │ +
855 // Friend function injected into enclosing namespace and found by ADL
│ │ │ +
856 friend inline bool
│ │ │ +
857 operator==(const __weak_count& __a, const __weak_count& __b) noexcept
│ │ │ +
858 { return __a._M_pi == __b._M_pi; }
│ │ │ +
859
│ │ │ +
860 private:
│ │ │ +
861 friend class __shared_count<_Lp>;
│ │ │ +
862
│ │ │ +
863 _Sp_counted_base<_Lp>* _M_pi;
│ │ │ +
864 };
│ │ │ +
865
│ │ │ +
866 // Now that __weak_count is defined we can define this constructor:
│ │ │ +
867 template<_Lock_policy _Lp>
│ │ │ +
868 inline
│ │ │ +
869 __shared_count<_Lp>::__shared_count(const __weak_count<_Lp>& __r)
│ │ │ +
870 : _M_pi(__r._M_pi)
│ │ │ +
871 {
│ │ │ +
872 if (_M_pi == nullptr || !_M_pi->_M_add_ref_lock_nothrow())
│ │ │ +
873 __throw_bad_weak_ptr();
│ │ │ +
874 }
│ │ │ +
875
│ │ │ +
876 // Now that __weak_count is defined we can define this constructor:
│ │ │ +
877 template<_Lock_policy _Lp>
│ │ │ +
878 inline
│ │ │ +
879 __shared_count<_Lp>::
│ │ │ +
880 __shared_count(const __weak_count<_Lp>& __r, std::nothrow_t) noexcept
│ │ │ +
881 : _M_pi(__r._M_pi)
│ │ │ +
882 {
│ │ │ +
883 if (_M_pi && !_M_pi->_M_add_ref_lock_nothrow())
│ │ │ +
884 _M_pi = nullptr;
│ │ │ +
885 }
│ │ │ +
886
│ │ │ +
887#define __cpp_lib_shared_ptr_arrays 201611L
│ │ │ +
888
│ │ │ +
889 // Helper traits for shared_ptr of array:
│ │ │ +
890
│ │ │ +
891 // A pointer type Y* is said to be compatible with a pointer type T* when
│ │ │ +
892 // either Y* is convertible to T* or Y is U[N] and T is U cv [].
│ │ │ +
893 template<typename _Yp_ptr, typename _Tp_ptr>
│ │ │ +
894 struct __sp_compatible_with
│ │ │ +
895 : false_type
│ │ │ +
896 { };
│ │ │ +
897
│ │ │ +
898 template<typename _Yp, typename _Tp>
│ │ │ +
899 struct __sp_compatible_with<_Yp*, _Tp*>
│ │ │ + │ │ │ +
901 { };
│ │ │ +
902
│ │ │ +
903 template<typename _Up, size_t _Nm>
│ │ │ +
904 struct __sp_compatible_with<_Up(*)[_Nm], _Up(*)[]>
│ │ │ +
905 : true_type
│ │ │ +
906 { };
│ │ │ +
907
│ │ │ +
908 template<typename _Up, size_t _Nm>
│ │ │ +
909 struct __sp_compatible_with<_Up(*)[_Nm], const _Up(*)[]>
│ │ │ +
910 : true_type
│ │ │ +
911 { };
│ │ │ +
912
│ │ │ +
913 template<typename _Up, size_t _Nm>
│ │ │ +
914 struct __sp_compatible_with<_Up(*)[_Nm], volatile _Up(*)[]>
│ │ │ +
915 : true_type
│ │ │ +
916 { };
│ │ │ +
917
│ │ │ +
918 template<typename _Up, size_t _Nm>
│ │ │ +
919 struct __sp_compatible_with<_Up(*)[_Nm], const volatile _Up(*)[]>
│ │ │ +
920 : true_type
│ │ │ +
921 { };
│ │ │ +
922
│ │ │ +
923 // Test conversion from Y(*)[N] to U(*)[N] without forming invalid type Y[N].
│ │ │ +
924 template<typename _Up, size_t _Nm, typename _Yp, typename = void>
│ │ │ +
925 struct __sp_is_constructible_arrN
│ │ │ +
926 : false_type
│ │ │ +
927 { };
│ │ │ +
928
│ │ │ +
929 template<typename _Up, size_t _Nm, typename _Yp>
│ │ │ +
930 struct __sp_is_constructible_arrN<_Up, _Nm, _Yp, __void_t<_Yp[_Nm]>>
│ │ │ +
931 : is_convertible<_Yp(*)[_Nm], _Up(*)[_Nm]>::type
│ │ │ +
932 { };
│ │ │ +
933
│ │ │ +
934 // Test conversion from Y(*)[] to U(*)[] without forming invalid type Y[].
│ │ │ +
935 template<typename _Up, typename _Yp, typename = void>
│ │ │ +
936 struct __sp_is_constructible_arr
│ │ │ +
937 : false_type
│ │ │ +
938 { };
│ │ │ +
939
│ │ │ +
940 template<typename _Up, typename _Yp>
│ │ │ +
941 struct __sp_is_constructible_arr<_Up, _Yp, __void_t<_Yp[]>>
│ │ │ +
942 : is_convertible<_Yp(*)[], _Up(*)[]>::type
│ │ │ +
943 { };
│ │ │ +
944
│ │ │ +
945 // Trait to check if shared_ptr<T> can be constructed from Y*.
│ │ │ +
946 template<typename _Tp, typename _Yp>
│ │ │ +
947 struct __sp_is_constructible;
│ │ │ +
948
│ │ │ +
949 // When T is U[N], Y(*)[N] shall be convertible to T*;
│ │ │ +
950 template<typename _Up, size_t _Nm, typename _Yp>
│ │ │ +
951 struct __sp_is_constructible<_Up[_Nm], _Yp>
│ │ │ +
952 : __sp_is_constructible_arrN<_Up, _Nm, _Yp>::type
│ │ │ +
953 { };
│ │ │ +
954
│ │ │ +
955 // when T is U[], Y(*)[] shall be convertible to T*;
│ │ │ +
956 template<typename _Up, typename _Yp>
│ │ │ +
957 struct __sp_is_constructible<_Up[], _Yp>
│ │ │ +
958 : __sp_is_constructible_arr<_Up, _Yp>::type
│ │ │ +
959 { };
│ │ │ +
960
│ │ │ +
961 // otherwise, Y* shall be convertible to T*.
│ │ │ +
962 template<typename _Tp, typename _Yp>
│ │ │ +
963 struct __sp_is_constructible
│ │ │ +
964 : is_convertible<_Yp*, _Tp*>::type
│ │ │ +
965 { };
│ │ │ +
966
│ │ │ +
967
│ │ │ +
968 // Define operator* and operator-> for shared_ptr<T>.
│ │ │ +
969 template<typename _Tp, _Lock_policy _Lp,
│ │ │ +
970 bool = is_array<_Tp>::value, bool = is_void<_Tp>::value>
│ │ │ +
971 class __shared_ptr_access
│ │ │ +
972 {
│ │ │ +
973 public:
│ │ │ +
974 using element_type = _Tp;
│ │ │ +
975
│ │ │ +
976 element_type&
│ │ │ +
977 operator*() const noexcept
│ │ │ +
978 {
│ │ │ +
979 __glibcxx_assert(_M_get() != nullptr);
│ │ │ +
980 return *_M_get();
│ │ │ +
981 }
│ │ │ +
982
│ │ │ +
983 element_type*
│ │ │ +
984 operator->() const noexcept
│ │ │ +
985 {
│ │ │ +
986 _GLIBCXX_DEBUG_PEDASSERT(_M_get() != nullptr);
│ │ │ +
987 return _M_get();
│ │ │ +
988 }
│ │ │ +
989
│ │ │ +
990 private:
│ │ │ +
991 element_type*
│ │ │ +
992 _M_get() const noexcept
│ │ │ +
993 { return static_cast<const __shared_ptr<_Tp, _Lp>*>(this)->get(); }
│ │ │ +
994 };
│ │ │ +
995
│ │ │ +
996 // Define operator-> for shared_ptr<cv void>.
│ │ │ +
997 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
998 class __shared_ptr_access<_Tp, _Lp, false, true>
│ │ │ +
999 {
│ │ │ +
1000 public:
│ │ │ +
1001 using element_type = _Tp;
│ │ │ +
1002
│ │ │ +
1003 element_type*
│ │ │ +
1004 operator->() const noexcept
│ │ │ +
1005 {
│ │ │ +
1006 auto __ptr = static_cast<const __shared_ptr<_Tp, _Lp>*>(this)->get();
│ │ │ +
1007 _GLIBCXX_DEBUG_PEDASSERT(__ptr != nullptr);
│ │ │ +
1008 return __ptr;
│ │ │ +
1009 }
│ │ │ +
1010 };
│ │ │ +
1011
│ │ │ +
1012 // Define operator[] for shared_ptr<T[]> and shared_ptr<T[N]>.
│ │ │ +
1013 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
1014 class __shared_ptr_access<_Tp, _Lp, true, false>
│ │ │ +
1015 {
│ │ │ +
1016 public:
│ │ │ +
1017 using element_type = typename remove_extent<_Tp>::type;
│ │ │ +
1018
│ │ │ +
1019#if __cplusplus <= 201402L
│ │ │ +
1020 [[__deprecated__("shared_ptr<T[]>::operator* is absent from C++17")]]
│ │ │ +
1021 element_type&
│ │ │ +
1022 operator*() const noexcept
│ │ │ +
1023 {
│ │ │ +
1024 __glibcxx_assert(_M_get() != nullptr);
│ │ │ +
1025 return *_M_get();
│ │ │ +
1026 }
│ │ │ +
1027
│ │ │ +
1028 [[__deprecated__("shared_ptr<T[]>::operator-> is absent from C++17")]]
│ │ │ +
1029 element_type*
│ │ │ +
1030 operator->() const noexcept
│ │ │ +
1031 {
│ │ │ +
1032 _GLIBCXX_DEBUG_PEDASSERT(_M_get() != nullptr);
│ │ │ +
1033 return _M_get();
│ │ │ +
1034 }
│ │ │ +
1035#endif
│ │ │ +
1036
│ │ │ +
1037 element_type&
│ │ │ +
1038 operator[](ptrdiff_t __i) const
│ │ │ +
1039 {
│ │ │ +
1040 __glibcxx_assert(_M_get() != nullptr);
│ │ │ +
1041 __glibcxx_assert(!extent<_Tp>::value || __i < extent<_Tp>::value);
│ │ │ +
1042 return _M_get()[__i];
│ │ │ +
1043 }
│ │ │ +
1044
│ │ │ +
1045 private:
│ │ │ +
1046 element_type*
│ │ │ +
1047 _M_get() const noexcept
│ │ │ +
1048 { return static_cast<const __shared_ptr<_Tp, _Lp>*>(this)->get(); }
│ │ │ +
1049 };
│ │ │ +
1050
│ │ │ +
1051 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
1052 class __shared_ptr
│ │ │ +
1053 : public __shared_ptr_access<_Tp, _Lp>
│ │ │ +
1054 {
│ │ │ +
1055 public:
│ │ │ +
1056 using element_type = typename remove_extent<_Tp>::type;
│ │ │ +
1057
│ │ │ +
1058 private:
│ │ │ +
1059 // Constraint for taking ownership of a pointer of type _Yp*:
│ │ │ +
1060 template<typename _Yp>
│ │ │ +
1061 using _SafeConv
│ │ │ +
1062 = typename enable_if<__sp_is_constructible<_Tp, _Yp>::value>::type;
│ │ │ +
1063
│ │ │ +
1064 // Constraint for construction from shared_ptr and weak_ptr:
│ │ │ +
1065 template<typename _Yp, typename _Res = void>
│ │ │ +
1066 using _Compatible = typename
│ │ │ +
1067 enable_if<__sp_compatible_with<_Yp*, _Tp*>::value, _Res>::type;
│ │ │ +
1068
│ │ │ +
1069 // Constraint for assignment from shared_ptr and weak_ptr:
│ │ │ +
1070 template<typename _Yp>
│ │ │ +
1071 using _Assignable = _Compatible<_Yp, __shared_ptr&>;
│ │ │ +
1072
│ │ │ +
1073 // Constraint for construction from unique_ptr:
│ │ │ +
1074 template<typename _Yp, typename _Del, typename _Res = void,
│ │ │ +
1075 typename _Ptr = typename unique_ptr<_Yp, _Del>::pointer>
│ │ │ +
1076 using _UniqCompatible = __enable_if_t<__and_<
│ │ │ +
1077 __sp_compatible_with<_Yp*, _Tp*>,
│ │ │ +
1078 is_convertible<_Ptr, element_type*>,
│ │ │ +
1079 is_move_constructible<_Del>
│ │ │ +
1080 >::value, _Res>;
│ │ │ +
1081
│ │ │ +
1082 // Constraint for assignment from unique_ptr:
│ │ │ +
1083 template<typename _Yp, typename _Del>
│ │ │ +
1084 using _UniqAssignable = _UniqCompatible<_Yp, _Del, __shared_ptr&>;
│ │ │ +
1085
│ │ │ +
1086 public:
│ │ │ +
1087
│ │ │ +
1088#if __cplusplus > 201402L
│ │ │ +
1089 using weak_type = __weak_ptr<_Tp, _Lp>;
│ │ │ +
1090#endif
│ │ │ +
1091
│ │ │ +
1092 constexpr __shared_ptr() noexcept
│ │ │ +
1093 : _M_ptr(0), _M_refcount()
│ │ │ +
1094 { }
│ │ │ +
1095
│ │ │ +
1096 template<typename _Yp, typename = _SafeConv<_Yp>>
│ │ │ +
1097 explicit
│ │ │ +
1098 __shared_ptr(_Yp* __p)
│ │ │ +
1099 : _M_ptr(__p), _M_refcount(__p, typename is_array<_Tp>::type())
│ │ │ +
1100 {
│ │ │ +
1101 static_assert( !is_void<_Yp>::value, "incomplete type" );
│ │ │ +
1102 static_assert( sizeof(_Yp) > 0, "incomplete type" );
│ │ │ +
1103 _M_enable_shared_from_this_with(__p);
│ │ │ +
1104 }
│ │ │ +
1105
│ │ │ +
1106 template<typename _Yp, typename _Deleter, typename = _SafeConv<_Yp>>
│ │ │ +
1107 __shared_ptr(_Yp* __p, _Deleter __d)
│ │ │ +
1108 : _M_ptr(__p), _M_refcount(__p, std::move(__d))
│ │ │ +
1109 {
│ │ │ +
1110 static_assert(__is_invocable<_Deleter&, _Yp*&>::value,
│ │ │ +
1111 "deleter expression d(p) is well-formed");
│ │ │ +
1112 _M_enable_shared_from_this_with(__p);
│ │ │ +
1113 }
│ │ │ +
1114
│ │ │ +
1115 template<typename _Yp, typename _Deleter, typename _Alloc,
│ │ │ +
1116 typename = _SafeConv<_Yp>>
│ │ │ +
1117 __shared_ptr(_Yp* __p, _Deleter __d, _Alloc __a)
│ │ │ +
1118 : _M_ptr(__p), _M_refcount(__p, std::move(__d), std::move(__a))
│ │ │ +
1119 {
│ │ │ +
1120 static_assert(__is_invocable<_Deleter&, _Yp*&>::value,
│ │ │ +
1121 "deleter expression d(p) is well-formed");
│ │ │ +
1122 _M_enable_shared_from_this_with(__p);
│ │ │ +
1123 }
│ │ │ +
1124
│ │ │ +
1125 template<typename _Deleter>
│ │ │ +
1126 __shared_ptr(nullptr_t __p, _Deleter __d)
│ │ │ +
1127 : _M_ptr(0), _M_refcount(__p, std::move(__d))
│ │ │ +
1128 { }
│ │ │ +
1129
│ │ │ +
1130 template<typename _Deleter, typename _Alloc>
│ │ │ +
1131 __shared_ptr(nullptr_t __p, _Deleter __d, _Alloc __a)
│ │ │ +
1132 : _M_ptr(0), _M_refcount(__p, std::move(__d), std::move(__a))
│ │ │ +
1133 { }
│ │ │ +
1134
│ │ │ +
1135 // Aliasing constructor
│ │ │ +
1136 template<typename _Yp>
│ │ │ +
1137 __shared_ptr(const __shared_ptr<_Yp, _Lp>& __r,
│ │ │ +
1138 element_type* __p) noexcept
│ │ │ +
1139 : _M_ptr(__p), _M_refcount(__r._M_refcount) // never throws
│ │ │ +
1140 { }
│ │ │ +
1141
│ │ │ +
1142 // Aliasing constructor
│ │ │ +
1143 template<typename _Yp>
│ │ │ +
1144 __shared_ptr(__shared_ptr<_Yp, _Lp>&& __r,
│ │ │ +
1145 element_type* __p) noexcept
│ │ │ +
1146 : _M_ptr(__p), _M_refcount()
│ │ │ +
1147 {
│ │ │ +
1148 _M_refcount._M_swap(__r._M_refcount);
│ │ │ +
1149 __r._M_ptr = nullptr;
│ │ │ +
1150 }
│ │ │ +
1151
│ │ │ +
1152 __shared_ptr(const __shared_ptr&) noexcept = default;
│ │ │ +
1153 __shared_ptr& operator=(const __shared_ptr&) noexcept = default;
│ │ │ +
1154 ~__shared_ptr() = default;
│ │ │ +
1155
│ │ │ +
1156 template<typename _Yp, typename = _Compatible<_Yp>>
│ │ │ +
1157 __shared_ptr(const __shared_ptr<_Yp, _Lp>& __r) noexcept
│ │ │ +
1158 : _M_ptr(__r._M_ptr), _M_refcount(__r._M_refcount)
│ │ │ +
1159 { }
│ │ │ +
1160
│ │ │ +
1161 __shared_ptr(__shared_ptr&& __r) noexcept
│ │ │ +
1162 : _M_ptr(__r._M_ptr), _M_refcount()
│ │ │ +
1163 {
│ │ │ +
1164 _M_refcount._M_swap(__r._M_refcount);
│ │ │ +
1165 __r._M_ptr = nullptr;
│ │ │ +
1166 }
│ │ │ +
1167
│ │ │ +
1168 template<typename _Yp, typename = _Compatible<_Yp>>
│ │ │ +
1169 __shared_ptr(__shared_ptr<_Yp, _Lp>&& __r) noexcept
│ │ │ +
1170 : _M_ptr(__r._M_ptr), _M_refcount()
│ │ │ +
1171 {
│ │ │ +
1172 _M_refcount._M_swap(__r._M_refcount);
│ │ │ +
1173 __r._M_ptr = nullptr;
│ │ │ +
1174 }
│ │ │ +
1175
│ │ │ +
1176 template<typename _Yp, typename = _Compatible<_Yp>>
│ │ │ +
1177 explicit __shared_ptr(const __weak_ptr<_Yp, _Lp>& __r)
│ │ │ +
1178 : _M_refcount(__r._M_refcount) // may throw
│ │ │ +
1179 {
│ │ │ +
1180 // It is now safe to copy __r._M_ptr, as
│ │ │ +
1181 // _M_refcount(__r._M_refcount) did not throw.
│ │ │ +
1182 _M_ptr = __r._M_ptr;
│ │ │ +
1183 }
│ │ │ +
1184
│ │ │ +
1185 // If an exception is thrown this constructor has no effect.
│ │ │ +
1186 template<typename _Yp, typename _Del,
│ │ │ +
1187 typename = _UniqCompatible<_Yp, _Del>>
│ │ │ +
1188 __shared_ptr(unique_ptr<_Yp, _Del>&& __r)
│ │ │ +
1189 : _M_ptr(__r.get()), _M_refcount()
│ │ │ +
1190 {
│ │ │ +
1191 auto __raw = __to_address(__r.get());
│ │ │ +
1192 _M_refcount = __shared_count<_Lp>(std::move(__r));
│ │ │ +
1193 _M_enable_shared_from_this_with(__raw);
│ │ │ +
1194 }
│ │ │ +
1195
│ │ │ +
1196#if __cplusplus <= 201402L && _GLIBCXX_USE_DEPRECATED
│ │ │ +
1197 protected:
│ │ │ +
1198 // If an exception is thrown this constructor has no effect.
│ │ │ +
1199 template<typename _Tp1, typename _Del,
│ │ │ +
1200 typename enable_if<__and_<
│ │ │ +
1201 __not_<is_array<_Tp>>, is_array<_Tp1>,
│ │ │ +
1202 is_convertible<typename unique_ptr<_Tp1, _Del>::pointer, _Tp*>
│ │ │ +
1203 >::value, bool>::type = true>
│ │ │ +
1204 __shared_ptr(unique_ptr<_Tp1, _Del>&& __r, __sp_array_delete)
│ │ │ +
1205 : _M_ptr(__r.get()), _M_refcount()
│ │ │ +
1206 {
│ │ │ +
1207 auto __raw = __to_address(__r.get());
│ │ │ +
1208 _M_refcount = __shared_count<_Lp>(std::move(__r));
│ │ │ +
1209 _M_enable_shared_from_this_with(__raw);
│ │ │ +
1210 }
│ │ │ +
1211 public:
│ │ │ +
1212#endif
│ │ │ +
1213
│ │ │ +
1214#if _GLIBCXX_USE_DEPRECATED
│ │ │ +
1215#pragma GCC diagnostic push
│ │ │ +
1216#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
│ │ │ +
1217 // Postcondition: use_count() == 1 and __r.get() == 0
│ │ │ +
1218 template<typename _Yp, typename = _Compatible<_Yp>>
│ │ │ +
1219 __shared_ptr(auto_ptr<_Yp>&& __r);
│ │ │ +
1220#pragma GCC diagnostic pop
│ │ │ +
1221#endif
│ │ │ +
1222
│ │ │ +
1223 constexpr __shared_ptr(nullptr_t) noexcept : __shared_ptr() { }
│ │ │ +
1224
│ │ │ +
1225 template<typename _Yp>
│ │ │ +
1226 _Assignable<_Yp>
│ │ │ +
1227 operator=(const __shared_ptr<_Yp, _Lp>& __r) noexcept
│ │ │ +
1228 {
│ │ │ +
1229 _M_ptr = __r._M_ptr;
│ │ │ +
1230 _M_refcount = __r._M_refcount; // __shared_count::op= doesn't throw
│ │ │ +
1231 return *this;
│ │ │ +
1232 }
│ │ │ +
1233
│ │ │ +
1234#if _GLIBCXX_USE_DEPRECATED
│ │ │ +
1235#pragma GCC diagnostic push
│ │ │ +
1236#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
│ │ │ +
1237 template<typename _Yp>
│ │ │ +
1238 _Assignable<_Yp>
│ │ │ +
1239 operator=(auto_ptr<_Yp>&& __r)
│ │ │ +
1240 {
│ │ │ +
1241 __shared_ptr(std::move(__r)).swap(*this);
│ │ │ +
1242 return *this;
│ │ │ +
1243 }
│ │ │ +
1244#pragma GCC diagnostic pop
│ │ │ +
1245#endif
│ │ │ +
1246
│ │ │ +
1247 __shared_ptr&
│ │ │ +
1248 operator=(__shared_ptr&& __r) noexcept
│ │ │ +
1249 {
│ │ │ +
1250 __shared_ptr(std::move(__r)).swap(*this);
│ │ │ +
1251 return *this;
│ │ │ +
1252 }
│ │ │ +
1253
│ │ │ +
1254 template<class _Yp>
│ │ │ +
1255 _Assignable<_Yp>
│ │ │ +
1256 operator=(__shared_ptr<_Yp, _Lp>&& __r) noexcept
│ │ │ +
1257 {
│ │ │ +
1258 __shared_ptr(std::move(__r)).swap(*this);
│ │ │ +
1259 return *this;
│ │ │ +
1260 }
│ │ │ +
1261
│ │ │ +
1262 template<typename _Yp, typename _Del>
│ │ │ +
1263 _UniqAssignable<_Yp, _Del>
│ │ │ +
1264 operator=(unique_ptr<_Yp, _Del>&& __r)
│ │ │ +
1265 {
│ │ │ +
1266 __shared_ptr(std::move(__r)).swap(*this);
│ │ │ +
1267 return *this;
│ │ │ +
1268 }
│ │ │ +
1269
│ │ │ +
1270 void
│ │ │ +
1271 reset() noexcept
│ │ │ +
1272 { __shared_ptr().swap(*this); }
│ │ │ +
1273
│ │ │ +
1274 template<typename _Yp>
│ │ │ +
1275 _SafeConv<_Yp>
│ │ │ +
1276 reset(_Yp* __p) // _Yp must be complete.
│ │ │ +
1277 {
│ │ │ +
1278 // Catch self-reset errors.
│ │ │ +
1279 __glibcxx_assert(__p == nullptr || __p != _M_ptr);
│ │ │ +
1280 __shared_ptr(__p).swap(*this);
│ │ │ +
1281 }
│ │ │ +
1282
│ │ │ +
1283 template<typename _Yp, typename _Deleter>
│ │ │ +
1284 _SafeConv<_Yp>
│ │ │ +
1285 reset(_Yp* __p, _Deleter __d)
│ │ │ +
1286 { __shared_ptr(__p, std::move(__d)).swap(*this); }
│ │ │ +
1287
│ │ │ +
1288 template<typename _Yp, typename _Deleter, typename _Alloc>
│ │ │ +
1289 _SafeConv<_Yp>
│ │ │ +
1290 reset(_Yp* __p, _Deleter __d, _Alloc __a)
│ │ │ +
1291 { __shared_ptr(__p, std::move(__d), std::move(__a)).swap(*this); }
│ │ │ +
1292
│ │ │ +
1293 /// Return the stored pointer.
│ │ │ +
1294 element_type*
│ │ │ +
1295 get() const noexcept
│ │ │ +
1296 { return _M_ptr; }
│ │ │ +
1297
│ │ │ +
1298 /// Return true if the stored pointer is not null.
│ │ │ +
1299 explicit operator bool() const noexcept
│ │ │ +
1300 { return _M_ptr != nullptr; }
│ │ │ +
1301
│ │ │ +
1302 /// Return true if use_count() == 1.
│ │ │ +
1303 bool
│ │ │ +
1304 unique() const noexcept
│ │ │ +
1305 { return _M_refcount._M_unique(); }
│ │ │ +
1306
│ │ │ +
1307 /// If *this owns a pointer, return the number of owners, otherwise zero.
│ │ │ +
1308 long
│ │ │ +
1309 use_count() const noexcept
│ │ │ +
1310 { return _M_refcount._M_get_use_count(); }
│ │ │ +
1311
│ │ │ +
1312 /// Exchange both the owned pointer and the stored pointer.
│ │ │ +
1313 void
│ │ │ +
1314 swap(__shared_ptr<_Tp, _Lp>& __other) noexcept
│ │ │ +
1315 {
│ │ │ +
1316 std::swap(_M_ptr, __other._M_ptr);
│ │ │ +
1317 _M_refcount._M_swap(__other._M_refcount);
│ │ │ +
1318 }
│ │ │ +
1319
│ │ │ +
1320 /** @brief Define an ordering based on ownership.
│ │ │ +
1321 *
│ │ │ +
1322 * This function defines a strict weak ordering between two shared_ptr
│ │ │ +
1323 * or weak_ptr objects, such that one object is less than the other
│ │ │ +
1324 * unless they share ownership of the same pointer, or are both empty.
│ │ │ +
1325 * @{
│ │ │ +
1326 */
│ │ │ +
1327 template<typename _Tp1>
│ │ │ +
1328 bool
│ │ │ +
1329 owner_before(__shared_ptr<_Tp1, _Lp> const& __rhs) const noexcept
│ │ │ +
1330 { return _M_refcount._M_less(__rhs._M_refcount); }
│ │ │ +
1331
│ │ │ +
1332 template<typename _Tp1>
│ │ │ +
1333 bool
│ │ │ +
1334 owner_before(__weak_ptr<_Tp1, _Lp> const& __rhs) const noexcept
│ │ │ +
1335 { return _M_refcount._M_less(__rhs._M_refcount); }
│ │ │ +
1336 /// @}
│ │ │ +
1337
│ │ │ +
1338 protected:
│ │ │ +
1339 // This constructor is non-standard, it is used by allocate_shared.
│ │ │ +
1340 template<typename _Alloc, typename... _Args>
│ │ │ +
1341 __shared_ptr(_Sp_alloc_shared_tag<_Alloc> __tag, _Args&&... __args)
│ │ │ +
1342 : _M_ptr(), _M_refcount(_M_ptr, __tag, std::forward<_Args>(__args)...)
│ │ │ +
1343 { _M_enable_shared_from_this_with(_M_ptr); }
│ │ │ +
1344
│ │ │ +
1345 template<typename _Tp1, _Lock_policy _Lp1, typename _Alloc,
│ │ │ +
1346 typename... _Args>
│ │ │ +
1347 friend __shared_ptr<_Tp1, _Lp1>
│ │ │ +
1348 __allocate_shared(const _Alloc& __a, _Args&&... __args);
│ │ │ +
1349
│ │ │ +
1350 // This constructor is used by __weak_ptr::lock() and
│ │ │ +
1351 // shared_ptr::shared_ptr(const weak_ptr&, std::nothrow_t).
│ │ │ +
1352 __shared_ptr(const __weak_ptr<_Tp, _Lp>& __r, std::nothrow_t) noexcept
│ │ │ +
1353 : _M_refcount(__r._M_refcount, std::nothrow)
│ │ │ +
1354 {
│ │ │ +
1355 _M_ptr = _M_refcount._M_get_use_count() ? __r._M_ptr : nullptr;
│ │ │ +
1356 }
│ │ │ +
1357
│ │ │ +
1358 friend class __weak_ptr<_Tp, _Lp>;
│ │ │ +
1359
│ │ │ +
1360 private:
│ │ │ +
1361
│ │ │ +
1362 template<typename _Yp>
│ │ │ +
1363 using __esft_base_t = decltype(__enable_shared_from_this_base(
│ │ │ +
1364 std::declval<const __shared_count<_Lp>&>(),
│ │ │ + │ │ │ +
1366
│ │ │ +
1367 // Detect an accessible and unambiguous enable_shared_from_this base.
│ │ │ +
1368 template<typename _Yp, typename = void>
│ │ │ +
1369 struct __has_esft_base
│ │ │ +
1370 : false_type { };
│ │ │ +
1371
│ │ │ +
1372 template<typename _Yp>
│ │ │ +
1373 struct __has_esft_base<_Yp, __void_t<__esft_base_t<_Yp>>>
│ │ │ +
1374 : __not_<is_array<_Tp>> { }; // No enable shared_from_this for arrays
│ │ │ +
1375
│ │ │ +
1376 template<typename _Yp, typename _Yp2 = typename remove_cv<_Yp>::type>
│ │ │ +
1377 typename enable_if<__has_esft_base<_Yp2>::value>::type
│ │ │ +
1378 _M_enable_shared_from_this_with(_Yp* __p) noexcept
│ │ │ +
1379 {
│ │ │ +
1380 if (auto __base = __enable_shared_from_this_base(_M_refcount, __p))
│ │ │ +
1381 __base->_M_weak_assign(const_cast<_Yp2*>(__p), _M_refcount);
│ │ │ +
1382 }
│ │ │ +
1383
│ │ │ +
1384 template<typename _Yp, typename _Yp2 = typename remove_cv<_Yp>::type>
│ │ │ +
1385 typename enable_if<!__has_esft_base<_Yp2>::value>::type
│ │ │ +
1386 _M_enable_shared_from_this_with(_Yp*) noexcept
│ │ │ +
1387 { }
│ │ │ +
1388
│ │ │ +
1389 void*
│ │ │ +
1390 _M_get_deleter(const std::type_info& __ti) const noexcept
│ │ │ +
1391 { return _M_refcount._M_get_deleter(__ti); }
│ │ │ +
1392
│ │ │ +
1393 template<typename _Tp1, _Lock_policy _Lp1> friend class __shared_ptr;
│ │ │ +
1394 template<typename _Tp1, _Lock_policy _Lp1> friend class __weak_ptr;
│ │ │ +
1395
│ │ │ +
1396 template<typename _Del, typename _Tp1, _Lock_policy _Lp1>
│ │ │ +
1397 friend _Del* get_deleter(const __shared_ptr<_Tp1, _Lp1>&) noexcept;
│ │ │ +
1398
│ │ │ +
1399 template<typename _Del, typename _Tp1>
│ │ │ +
1400 friend _Del* get_deleter(const shared_ptr<_Tp1>&) noexcept;
│ │ │ +
1401
│ │ │ +
1402 element_type* _M_ptr; // Contained pointer.
│ │ │ +
1403 __shared_count<_Lp> _M_refcount; // Reference counter.
│ │ │ +
1404 };
│ │ │ +
1405
│ │ │ +
1406
│ │ │ +
1407 // 20.7.2.2.7 shared_ptr comparisons
│ │ │ +
1408 template<typename _Tp1, typename _Tp2, _Lock_policy _Lp>
│ │ │ +
1409 inline bool
│ │ │ +
1410 operator==(const __shared_ptr<_Tp1, _Lp>& __a,
│ │ │ +
1411 const __shared_ptr<_Tp2, _Lp>& __b) noexcept
│ │ │ +
1412 { return __a.get() == __b.get(); }
│ │ │ +
1413
│ │ │ +
1414 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
1415 inline bool
│ │ │ +
1416 operator==(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept
│ │ │ +
1417 { return !__a; }
│ │ │ +
1418
│ │ │ +
1419#ifdef __cpp_lib_three_way_comparison
│ │ │ +
1420 template<typename _Tp, typename _Up, _Lock_policy _Lp>
│ │ │ +
1421 inline strong_ordering
│ │ │ +
1422 operator<=>(const __shared_ptr<_Tp, _Lp>& __a,
│ │ │ +
1423 const __shared_ptr<_Up, _Lp>& __b) noexcept
│ │ │ +
1424 { return compare_three_way()(__a.get(), __b.get()); }
│ │ │ +
1425
│ │ │ +
1426 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
1427 inline strong_ordering
│ │ │ +
1428 operator<=>(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept
│ │ │ +
1429 {
│ │ │ +
1430 using pointer = typename __shared_ptr<_Tp, _Lp>::element_type*;
│ │ │ +
1431 return compare_three_way()(__a.get(), static_cast<pointer>(nullptr));
│ │ │ +
1432 }
│ │ │ +
1433#else
│ │ │ +
1434 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
1435 inline bool
│ │ │ +
1436 operator==(nullptr_t, const __shared_ptr<_Tp, _Lp>& __a) noexcept
│ │ │ +
1437 { return !__a; }
│ │ │ +
1438
│ │ │ +
1439 template<typename _Tp1, typename _Tp2, _Lock_policy _Lp>
│ │ │ +
1440 inline bool
│ │ │ +
1441 operator!=(const __shared_ptr<_Tp1, _Lp>& __a,
│ │ │ +
1442 const __shared_ptr<_Tp2, _Lp>& __b) noexcept
│ │ │ +
1443 { return __a.get() != __b.get(); }
│ │ │ +
1444
│ │ │ +
1445 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
1446 inline bool
│ │ │ +
1447 operator!=(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept
│ │ │ +
1448 { return (bool)__a; }
│ │ │ +
1449
│ │ │ +
1450 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
1451 inline bool
│ │ │ +
1452 operator!=(nullptr_t, const __shared_ptr<_Tp, _Lp>& __a) noexcept
│ │ │ +
1453 { return (bool)__a; }
│ │ │ +
1454
│ │ │ +
1455 template<typename _Tp, typename _Up, _Lock_policy _Lp>
│ │ │ +
1456 inline bool
│ │ │ +
1457 operator<(const __shared_ptr<_Tp, _Lp>& __a,
│ │ │ +
1458 const __shared_ptr<_Up, _Lp>& __b) noexcept
│ │ │ +
1459 {
│ │ │ +
1460 using _Tp_elt = typename __shared_ptr<_Tp, _Lp>::element_type;
│ │ │ +
1461 using _Up_elt = typename __shared_ptr<_Up, _Lp>::element_type;
│ │ │ +
1462 using _Vp = typename common_type<_Tp_elt*, _Up_elt*>::type;
│ │ │ +
1463 return less<_Vp>()(__a.get(), __b.get());
│ │ │ +
1464 }
│ │ │ +
1465
│ │ │ +
1466 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
1467 inline bool
│ │ │ +
1468 operator<(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept
│ │ │ +
1469 {
│ │ │ +
1470 using _Tp_elt = typename __shared_ptr<_Tp, _Lp>::element_type;
│ │ │ +
1471 return less<_Tp_elt*>()(__a.get(), nullptr);
│ │ │ +
1472 }
│ │ │ +
1473
│ │ │ +
1474 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
1475 inline bool
│ │ │ +
1476 operator<(nullptr_t, const __shared_ptr<_Tp, _Lp>& __a) noexcept
│ │ │ +
1477 {
│ │ │ +
1478 using _Tp_elt = typename __shared_ptr<_Tp, _Lp>::element_type;
│ │ │ +
1479 return less<_Tp_elt*>()(nullptr, __a.get());
│ │ │ +
1480 }
│ │ │ +
1481
│ │ │ +
1482 template<typename _Tp1, typename _Tp2, _Lock_policy _Lp>
│ │ │ +
1483 inline bool
│ │ │ +
1484 operator<=(const __shared_ptr<_Tp1, _Lp>& __a,
│ │ │ +
1485 const __shared_ptr<_Tp2, _Lp>& __b) noexcept
│ │ │ +
1486 { return !(__b < __a); }
│ │ │ +
1487
│ │ │ +
1488 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
1489 inline bool
│ │ │ +
1490 operator<=(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept
│ │ │ +
1491 { return !(nullptr < __a); }
│ │ │ +
1492
│ │ │ +
1493 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
1494 inline bool
│ │ │ +
1495 operator<=(nullptr_t, const __shared_ptr<_Tp, _Lp>& __a) noexcept
│ │ │ +
1496 { return !(__a < nullptr); }
│ │ │ +
1497
│ │ │ +
1498 template<typename _Tp1, typename _Tp2, _Lock_policy _Lp>
│ │ │ +
1499 inline bool
│ │ │ +
1500 operator>(const __shared_ptr<_Tp1, _Lp>& __a,
│ │ │ +
1501 const __shared_ptr<_Tp2, _Lp>& __b) noexcept
│ │ │ +
1502 { return (__b < __a); }
│ │ │ +
1503
│ │ │ +
1504 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
1505 inline bool
│ │ │ +
1506 operator>(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept
│ │ │ +
1507 { return nullptr < __a; }
│ │ │ +
1508
│ │ │ +
1509 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
1510 inline bool
│ │ │ +
1511 operator>(nullptr_t, const __shared_ptr<_Tp, _Lp>& __a) noexcept
│ │ │ +
1512 { return __a < nullptr; }
│ │ │ +
1513
│ │ │ +
1514 template<typename _Tp1, typename _Tp2, _Lock_policy _Lp>
│ │ │ +
1515 inline bool
│ │ │ +
1516 operator>=(const __shared_ptr<_Tp1, _Lp>& __a,
│ │ │ +
1517 const __shared_ptr<_Tp2, _Lp>& __b) noexcept
│ │ │ +
1518 { return !(__a < __b); }
│ │ │ +
1519
│ │ │ +
1520 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
1521 inline bool
│ │ │ +
1522 operator>=(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept
│ │ │ +
1523 { return !(__a < nullptr); }
│ │ │ +
1524
│ │ │ +
1525 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
1526 inline bool
│ │ │ +
1527 operator>=(nullptr_t, const __shared_ptr<_Tp, _Lp>& __a) noexcept
│ │ │ +
1528 { return !(nullptr < __a); }
│ │ │ +
1529#endif // three-way comparison
│ │ │ +
1530
│ │ │ +
1531 // 20.7.2.2.8 shared_ptr specialized algorithms.
│ │ │ +
1532 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
1533 inline void
│ │ │ +
1534 swap(__shared_ptr<_Tp, _Lp>& __a, __shared_ptr<_Tp, _Lp>& __b) noexcept
│ │ │ +
1535 { __a.swap(__b); }
│ │ │ +
1536
│ │ │ +
1537 // 20.7.2.2.9 shared_ptr casts
│ │ │ +
1538
│ │ │ +
1539 // The seemingly equivalent code:
│ │ │ +
1540 // shared_ptr<_Tp, _Lp>(static_cast<_Tp*>(__r.get()))
│ │ │ +
1541 // will eventually result in undefined behaviour, attempting to
│ │ │ +
1542 // delete the same object twice.
│ │ │ +
1543 /// static_pointer_cast
│ │ │ +
1544 template<typename _Tp, typename _Tp1, _Lock_policy _Lp>
│ │ │ +
1545 inline __shared_ptr<_Tp, _Lp>
│ │ │ +
│ │ │ +
1546 static_pointer_cast(const __shared_ptr<_Tp1, _Lp>& __r) noexcept
│ │ │ +
1547 {
│ │ │ +
1548 using _Sp = __shared_ptr<_Tp, _Lp>;
│ │ │ +
1549 return _Sp(__r, static_cast<typename _Sp::element_type*>(__r.get()));
│ │ │ +
1550 }
│ │ │
│ │ │ -
186
│ │ │ -
187 /**
│ │ │ -
188 * @brief Generating functions.
│ │ │ -
189 */
│ │ │ -
190 template<typename _UniformRandomBitGenerator>
│ │ │ -
191 result_type
│ │ │ -
│ │ │ -
192 operator()(_UniformRandomBitGenerator& __urng)
│ │ │ -
193 { return this->operator()(__urng, _M_param); }
│ │ │ +
1551
│ │ │ +
1552 // The seemingly equivalent code:
│ │ │ +
1553 // shared_ptr<_Tp, _Lp>(const_cast<_Tp*>(__r.get()))
│ │ │ +
1554 // will eventually result in undefined behaviour, attempting to
│ │ │ +
1555 // delete the same object twice.
│ │ │ +
1556 /// const_pointer_cast
│ │ │ +
1557 template<typename _Tp, typename _Tp1, _Lock_policy _Lp>
│ │ │ +
1558 inline __shared_ptr<_Tp, _Lp>
│ │ │ +
│ │ │ +
1559 const_pointer_cast(const __shared_ptr<_Tp1, _Lp>& __r) noexcept
│ │ │ +
1560 {
│ │ │ +
1561 using _Sp = __shared_ptr<_Tp, _Lp>;
│ │ │ +
1562 return _Sp(__r, const_cast<typename _Sp::element_type*>(__r.get()));
│ │ │ +
1563 }
│ │ │
│ │ │ -
194
│ │ │ -
195 template<typename _UniformRandomBitGenerator>
│ │ │ -
196 result_type
│ │ │ -
197 operator()(_UniformRandomBitGenerator& __urng,
│ │ │ -
198 const param_type& __p);
│ │ │ -
199
│ │ │ -
200 template<typename _ForwardIterator,
│ │ │ -
201 typename _UniformRandomBitGenerator>
│ │ │ -
202 void
│ │ │ -
203 __generate(_ForwardIterator __f, _ForwardIterator __t,
│ │ │ -
204 _UniformRandomBitGenerator& __urng)
│ │ │ -
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
│ │ │ -
│ │ │ - │ │ │ -
228 const uniform_int_distribution& __d2)
│ │ │ -
229 { return __d1._M_param == __d2._M_param; }
│ │ │ +
1564
│ │ │ +
1565 // The seemingly equivalent code:
│ │ │ +
1566 // shared_ptr<_Tp, _Lp>(dynamic_cast<_Tp*>(__r.get()))
│ │ │ +
1567 // will eventually result in undefined behaviour, attempting to
│ │ │ +
1568 // delete the same object twice.
│ │ │ +
1569 /// dynamic_pointer_cast
│ │ │ +
1570 template<typename _Tp, typename _Tp1, _Lock_policy _Lp>
│ │ │ +
1571 inline __shared_ptr<_Tp, _Lp>
│ │ │ +
│ │ │ +
1572 dynamic_pointer_cast(const __shared_ptr<_Tp1, _Lp>& __r) noexcept
│ │ │ +
1573 {
│ │ │ +
1574 using _Sp = __shared_ptr<_Tp, _Lp>;
│ │ │ +
1575 if (auto* __p = dynamic_cast<typename _Sp::element_type*>(__r.get()))
│ │ │ +
1576 return _Sp(__r, __p);
│ │ │ +
1577 return _Sp();
│ │ │ +
1578 }
│ │ │
│ │ │ -
230
│ │ │ -
231 private:
│ │ │ -
232 template<typename _ForwardIterator,
│ │ │ -
233 typename _UniformRandomBitGenerator>
│ │ │ -
234 void
│ │ │ -
235 __generate_impl(_ForwardIterator __f, _ForwardIterator __t,
│ │ │ -
236 _UniformRandomBitGenerator& __urng,
│ │ │ -
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 {
│ │ │ -
248 using _Up_traits = __gnu_cxx::__int_traits<_Up>;
│ │ │ -
249 using _Wp_traits = __gnu_cxx::__int_traits<_Wp>;
│ │ │ -
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 };
│ │ │ +
1579
│ │ │ +
1580#if __cplusplus > 201402L
│ │ │ +
1581 template<typename _Tp, typename _Tp1, _Lock_policy _Lp>
│ │ │ +
1582 inline __shared_ptr<_Tp, _Lp>
│ │ │ +
1583 reinterpret_pointer_cast(const __shared_ptr<_Tp1, _Lp>& __r) noexcept
│ │ │ +
1584 {
│ │ │ +
1585 using _Sp = __shared_ptr<_Tp, _Lp>;
│ │ │ +
1586 return _Sp(__r, reinterpret_cast<typename _Sp::element_type*>(__r.get()));
│ │ │ +
1587 }
│ │ │ +
1588#endif
│ │ │ +
1589
│ │ │ +
1590 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
1591 class __weak_ptr
│ │ │ +
1592 {
│ │ │ +
1593 template<typename _Yp, typename _Res = void>
│ │ │ +
1594 using _Compatible = typename
│ │ │ +
1595 enable_if<__sp_compatible_with<_Yp*, _Tp*>::value, _Res>::type;
│ │ │ +
1596
│ │ │ +
1597 // Constraint for assignment from shared_ptr and weak_ptr:
│ │ │ +
1598 template<typename _Yp>
│ │ │ +
1599 using _Assignable = _Compatible<_Yp, __weak_ptr&>;
│ │ │ +
1600
│ │ │ +
1601 public:
│ │ │ +
1602 using element_type = typename remove_extent<_Tp>::type;
│ │ │ +
1603
│ │ │ +
1604 constexpr __weak_ptr() noexcept
│ │ │ +
1605 : _M_ptr(nullptr), _M_refcount()
│ │ │ +
1606 { }
│ │ │ +
1607
│ │ │ +
1608 __weak_ptr(const __weak_ptr&) noexcept = default;
│ │ │ +
1609
│ │ │ +
1610 ~__weak_ptr() = default;
│ │ │ +
1611
│ │ │ +
1612 // The "obvious" converting constructor implementation:
│ │ │ +
1613 //
│ │ │ +
1614 // template<typename _Tp1>
│ │ │ +
1615 // __weak_ptr(const __weak_ptr<_Tp1, _Lp>& __r)
│ │ │ +
1616 // : _M_ptr(__r._M_ptr), _M_refcount(__r._M_refcount) // never throws
│ │ │ +
1617 // { }
│ │ │ +
1618 //
│ │ │ +
1619 // has a serious problem.
│ │ │ +
1620 //
│ │ │ +
1621 // __r._M_ptr may already have been invalidated. The _M_ptr(__r._M_ptr)
│ │ │ +
1622 // conversion may require access to *__r._M_ptr (virtual inheritance).
│ │ │ +
1623 //
│ │ │ +
1624 // It is not possible to avoid spurious access violations since
│ │ │ +
1625 // in multithreaded programs __r._M_ptr may be invalidated at any point.
│ │ │ +
1626 template<typename _Yp, typename = _Compatible<_Yp>>
│ │ │ +
1627 __weak_ptr(const __weak_ptr<_Yp, _Lp>& __r) noexcept
│ │ │ +
1628 : _M_refcount(__r._M_refcount)
│ │ │ +
1629 { _M_ptr = __r.lock().get(); }
│ │ │ +
1630
│ │ │ +
1631 template<typename _Yp, typename = _Compatible<_Yp>>
│ │ │ +
1632 __weak_ptr(const __shared_ptr<_Yp, _Lp>& __r) noexcept
│ │ │ +
1633 : _M_ptr(__r._M_ptr), _M_refcount(__r._M_refcount)
│ │ │ +
1634 { }
│ │ │ +
1635
│ │ │ +
1636 __weak_ptr(__weak_ptr&& __r) noexcept
│ │ │ +
1637 : _M_ptr(__r._M_ptr), _M_refcount(std::move(__r._M_refcount))
│ │ │ +
1638 { __r._M_ptr = nullptr; }
│ │ │ +
1639
│ │ │ +
1640 template<typename _Yp, typename = _Compatible<_Yp>>
│ │ │ +
1641 __weak_ptr(__weak_ptr<_Yp, _Lp>&& __r) noexcept
│ │ │ +
1642 : _M_ptr(__r.lock().get()), _M_refcount(std::move(__r._M_refcount))
│ │ │ +
1643 { __r._M_ptr = nullptr; }
│ │ │ +
1644
│ │ │ +
1645 __weak_ptr&
│ │ │ +
1646 operator=(const __weak_ptr& __r) noexcept = default;
│ │ │ +
1647
│ │ │ +
1648 template<typename _Yp>
│ │ │ +
1649 _Assignable<_Yp>
│ │ │ +
1650 operator=(const __weak_ptr<_Yp, _Lp>& __r) noexcept
│ │ │ +
1651 {
│ │ │ +
1652 _M_ptr = __r.lock().get();
│ │ │ +
1653 _M_refcount = __r._M_refcount;
│ │ │ +
1654 return *this;
│ │ │ +
1655 }
│ │ │ +
1656
│ │ │ +
1657 template<typename _Yp>
│ │ │ +
1658 _Assignable<_Yp>
│ │ │ +
1659 operator=(const __shared_ptr<_Yp, _Lp>& __r) noexcept
│ │ │ +
1660 {
│ │ │ +
1661 _M_ptr = __r._M_ptr;
│ │ │ +
1662 _M_refcount = __r._M_refcount;
│ │ │ +
1663 return *this;
│ │ │ +
1664 }
│ │ │ +
1665
│ │ │ +
1666 __weak_ptr&
│ │ │ +
1667 operator=(__weak_ptr&& __r) noexcept
│ │ │ +
1668 {
│ │ │ +
1669 __weak_ptr(std::move(__r)).swap(*this);
│ │ │ +
1670 return *this;
│ │ │ +
1671 }
│ │ │ +
1672
│ │ │ +
1673 template<typename _Yp>
│ │ │ +
1674 _Assignable<_Yp>
│ │ │ +
1675 operator=(__weak_ptr<_Yp, _Lp>&& __r) noexcept
│ │ │ +
1676 {
│ │ │ +
1677 _M_ptr = __r.lock().get();
│ │ │ +
1678 _M_refcount = std::move(__r._M_refcount);
│ │ │ +
1679 __r._M_ptr = nullptr;
│ │ │ +
1680 return *this;
│ │ │ +
1681 }
│ │ │ +
1682
│ │ │ +
1683 __shared_ptr<_Tp, _Lp>
│ │ │ +
1684 lock() const noexcept
│ │ │ +
1685 { return __shared_ptr<element_type, _Lp>(*this, std::nothrow); }
│ │ │ +
1686
│ │ │ +
1687 long
│ │ │ +
1688 use_count() const noexcept
│ │ │ +
1689 { return _M_refcount._M_get_use_count(); }
│ │ │ +
1690
│ │ │ +
1691 bool
│ │ │ +
1692 expired() const noexcept
│ │ │ +
1693 { return _M_refcount._M_get_use_count() == 0; }
│ │ │ +
1694
│ │ │ +
1695 template<typename _Tp1>
│ │ │ +
1696 bool
│ │ │ +
1697 owner_before(const __shared_ptr<_Tp1, _Lp>& __rhs) const noexcept
│ │ │ +
1698 { return _M_refcount._M_less(__rhs._M_refcount); }
│ │ │ +
1699
│ │ │ +
1700 template<typename _Tp1>
│ │ │ +
1701 bool
│ │ │ +
1702 owner_before(const __weak_ptr<_Tp1, _Lp>& __rhs) const noexcept
│ │ │ +
1703 { return _M_refcount._M_less(__rhs._M_refcount); }
│ │ │ +
1704
│ │ │ +
1705 void
│ │ │ +
1706 reset() noexcept
│ │ │ +
1707 { __weak_ptr().swap(*this); }
│ │ │ +
1708
│ │ │ +
1709 void
│ │ │ +
1710 swap(__weak_ptr& __s) noexcept
│ │ │ +
1711 {
│ │ │ +
1712 std::swap(_M_ptr, __s._M_ptr);
│ │ │ +
1713 _M_refcount._M_swap(__s._M_refcount);
│ │ │ +
1714 }
│ │ │ +
1715
│ │ │ +
1716 private:
│ │ │ +
1717 // Used by __enable_shared_from_this.
│ │ │ +
1718 void
│ │ │ +
1719 _M_assign(_Tp* __ptr, const __shared_count<_Lp>& __refcount) noexcept
│ │ │ +
1720 {
│ │ │ +
1721 if (use_count() == 0)
│ │ │ +
1722 {
│ │ │ +
1723 _M_ptr = __ptr;
│ │ │ +
1724 _M_refcount = __refcount;
│ │ │ +
1725 }
│ │ │ +
1726 }
│ │ │ +
1727
│ │ │ +
1728 template<typename _Tp1, _Lock_policy _Lp1> friend class __shared_ptr;
│ │ │ +
1729 template<typename _Tp1, _Lock_policy _Lp1> friend class __weak_ptr;
│ │ │ +
1730 friend class __enable_shared_from_this<_Tp, _Lp>;
│ │ │ +
1731 friend class enable_shared_from_this<_Tp>;
│ │ │ +
1732
│ │ │ +
1733 element_type* _M_ptr; // Contained pointer.
│ │ │ +
1734 __weak_count<_Lp> _M_refcount; // Reference counter.
│ │ │ +
1735 };
│ │ │ +
1736
│ │ │ +
1737 // 20.7.2.3.6 weak_ptr specialized algorithms.
│ │ │ +
1738 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
1739 inline void
│ │ │ +
1740 swap(__weak_ptr<_Tp, _Lp>& __a, __weak_ptr<_Tp, _Lp>& __b) noexcept
│ │ │ +
1741 { __a.swap(__b); }
│ │ │ +
1742
│ │ │ +
1743 template<typename _Tp, typename _Tp1>
│ │ │ +
1744 struct _Sp_owner_less : public binary_function<_Tp, _Tp, bool>
│ │ │ +
1745 {
│ │ │ +
1746 bool
│ │ │ +
1747 operator()(const _Tp& __lhs, const _Tp& __rhs) const noexcept
│ │ │ +
1748 { return __lhs.owner_before(__rhs); }
│ │ │ +
1749
│ │ │ +
1750 bool
│ │ │ +
1751 operator()(const _Tp& __lhs, const _Tp1& __rhs) const noexcept
│ │ │ +
1752 { return __lhs.owner_before(__rhs); }
│ │ │ +
1753
│ │ │ +
1754 bool
│ │ │ +
1755 operator()(const _Tp1& __lhs, const _Tp& __rhs) const noexcept
│ │ │ +
1756 { return __lhs.owner_before(__rhs); }
│ │ │ +
1757 };
│ │ │ +
1758
│ │ │ +
1759 template<>
│ │ │ +
1760 struct _Sp_owner_less<void, void>
│ │ │ +
1761 {
│ │ │ +
1762 template<typename _Tp, typename _Up>
│ │ │ +
1763 auto
│ │ │ +
1764 operator()(const _Tp& __lhs, const _Up& __rhs) const noexcept
│ │ │ +
1765 -> decltype(__lhs.owner_before(__rhs))
│ │ │ +
1766 { return __lhs.owner_before(__rhs); }
│ │ │ +
1767
│ │ │ +
1768 using is_transparent = void;
│ │ │ +
1769 };
│ │ │ +
1770
│ │ │ +
1771 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
1772 struct owner_less<__shared_ptr<_Tp, _Lp>>
│ │ │ +
1773 : public _Sp_owner_less<__shared_ptr<_Tp, _Lp>, __weak_ptr<_Tp, _Lp>>
│ │ │ +
1774 { };
│ │ │ +
1775
│ │ │ +
1776 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
1777 struct owner_less<__weak_ptr<_Tp, _Lp>>
│ │ │ +
1778 : public _Sp_owner_less<__weak_ptr<_Tp, _Lp>, __shared_ptr<_Tp, _Lp>>
│ │ │ +
1779 { };
│ │ │ +
1780
│ │ │ +
1781
│ │ │ +
1782 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
1783 class __enable_shared_from_this
│ │ │ +
1784 {
│ │ │ +
1785 protected:
│ │ │ +
1786 constexpr __enable_shared_from_this() noexcept { }
│ │ │ +
1787
│ │ │ +
1788 __enable_shared_from_this(const __enable_shared_from_this&) noexcept { }
│ │ │ +
1789
│ │ │ +
1790 __enable_shared_from_this&
│ │ │ +
1791 operator=(const __enable_shared_from_this&) noexcept
│ │ │ +
1792 { return *this; }
│ │ │ +
1793
│ │ │ +
1794 ~__enable_shared_from_this() { }
│ │ │ +
1795
│ │ │ +
1796 public:
│ │ │ +
1797 __shared_ptr<_Tp, _Lp>
│ │ │ +
1798 shared_from_this()
│ │ │ +
1799 { return __shared_ptr<_Tp, _Lp>(this->_M_weak_this); }
│ │ │ +
1800
│ │ │ +
1801 __shared_ptr<const _Tp, _Lp>
│ │ │ +
1802 shared_from_this() const
│ │ │ +
1803 { return __shared_ptr<const _Tp, _Lp>(this->_M_weak_this); }
│ │ │ +
1804
│ │ │ +
1805#if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11
│ │ │ +
1806 __weak_ptr<_Tp, _Lp>
│ │ │ +
1807 weak_from_this() noexcept
│ │ │ +
1808 { return this->_M_weak_this; }
│ │ │ +
1809
│ │ │ +
1810 __weak_ptr<const _Tp, _Lp>
│ │ │ +
1811 weak_from_this() const noexcept
│ │ │ +
1812 { return this->_M_weak_this; }
│ │ │ +
1813#endif
│ │ │ +
1814
│ │ │ +
1815 private:
│ │ │ +
1816 template<typename _Tp1>
│ │ │ +
1817 void
│ │ │ +
1818 _M_weak_assign(_Tp1* __p, const __shared_count<_Lp>& __n) const noexcept
│ │ │ +
1819 { _M_weak_this._M_assign(__p, __n); }
│ │ │ +
1820
│ │ │ +
1821 friend const __enable_shared_from_this*
│ │ │ +
1822 __enable_shared_from_this_base(const __shared_count<_Lp>&,
│ │ │ +
1823 const __enable_shared_from_this* __p)
│ │ │ +
1824 { return __p; }
│ │ │ +
1825
│ │ │ +
1826 template<typename, _Lock_policy>
│ │ │ +
1827 friend class __shared_ptr;
│ │ │ +
1828
│ │ │ +
1829 mutable __weak_ptr<_Tp, _Lp> _M_weak_this;
│ │ │ +
1830 };
│ │ │ +
1831
│ │ │ +
1832 template<typename _Tp, _Lock_policy _Lp = __default_lock_policy,
│ │ │ +
1833 typename _Alloc, typename... _Args>
│ │ │ +
1834 inline __shared_ptr<_Tp, _Lp>
│ │ │ +
1835 __allocate_shared(const _Alloc& __a, _Args&&... __args)
│ │ │ +
1836 {
│ │ │ +
1837 static_assert(!is_array<_Tp>::value, "make_shared<T[]> not supported");
│ │ │ +
1838
│ │ │ +
1839 return __shared_ptr<_Tp, _Lp>(_Sp_alloc_shared_tag<_Alloc>{__a},
│ │ │ +
1840 std::forward<_Args>(__args)...);
│ │ │ +
1841 }
│ │ │ +
1842
│ │ │ +
1843 template<typename _Tp, _Lock_policy _Lp = __default_lock_policy,
│ │ │ +
1844 typename... _Args>
│ │ │ +
1845 inline __shared_ptr<_Tp, _Lp>
│ │ │ +
1846 __make_shared(_Args&&... __args)
│ │ │ +
1847 {
│ │ │ +
1848 typedef typename std::remove_const<_Tp>::type _Tp_nc;
│ │ │ +
1849 return std::__allocate_shared<_Tp, _Lp>(std::allocator<_Tp_nc>(),
│ │ │ +
1850 std::forward<_Args>(__args)...);
│ │ │ +
1851 }
│ │ │ +
1852
│ │ │ +
1853 /// std::hash specialization for __shared_ptr.
│ │ │ +
1854 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
│ │ │ +
1855 struct hash<__shared_ptr<_Tp, _Lp>>
│ │ │ +
1856 : public __hash_base<size_t, __shared_ptr<_Tp, _Lp>>
│ │ │ +
1857 {
│ │ │ +
1858 size_t
│ │ │ +
1859 operator()(const __shared_ptr<_Tp, _Lp>& __s) const noexcept
│ │ │ +
1860 {
│ │ │ + │ │ │ +
1862 __s.get());
│ │ │ +
1863 }
│ │ │ +
1864 };
│ │ │
│ │ │ -
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 = _S_nd<unsigned __int128>(__urng, __u64erange);
│ │ │ -
308 }
│ │ │ -
309 else
│ │ │ -
310#endif
│ │ │ -
311 if _GLIBCXX17_CONSTEXPR (__urngrange == __UINT32_MAX__)
│ │ │ -
312 {
│ │ │ -
313 // __urng produces values that use exactly 32-bits,
│ │ │ -
314 // so use 64-bit integers to downscale to desired range.
│ │ │ -
315 __UINT32_TYPE__ __u32erange = __uerange;
│ │ │ -
316 __ret = _S_nd<__UINT64_TYPE__>(__urng, __u32erange);
│ │ │ -
317 }
│ │ │ -
318 else
│ │ │ -
319#endif
│ │ │ -
320 {
│ │ │ -
321 // fallback case (2 divisions)
│ │ │ -
322 const __uctype __scaling = __urngrange / __uerange;
│ │ │ -
323 const __uctype __past = __uerange * __scaling;
│ │ │ -
324 do
│ │ │ -
325 __ret = __uctype(__urng()) - __urngmin;
│ │ │ -
326 while (__ret >= __past);
│ │ │ -
327 __ret /= __scaling;
│ │ │ -
328 }
│ │ │ -
329 }
│ │ │ -
330 else if (__urngrange < __urange)
│ │ │ -
331 {
│ │ │ -
332 // upscaling
│ │ │ -
333 /*
│ │ │ -
334 Note that every value in [0, urange]
│ │ │ -
335 can be written uniquely as
│ │ │ -
336
│ │ │ -
337 (urngrange + 1) * high + low
│ │ │ -
338
│ │ │ -
339 where
│ │ │ -
340
│ │ │ -
341 high in [0, urange / (urngrange + 1)]
│ │ │ -
342
│ │ │ -
343 and
│ │ │ -
344
│ │ │ -
345 low in [0, urngrange].
│ │ │ -
346 */
│ │ │ -
347 __uctype __tmp; // wraparound control
│ │ │ -
348 do
│ │ │ -
349 {
│ │ │ -
350 const __uctype __uerngrange = __urngrange + 1;
│ │ │ -
351 __tmp = (__uerngrange * operator()
│ │ │ -
352 (__urng, param_type(0, __urange / __uerngrange)));
│ │ │ -
353 __ret = __tmp + (__uctype(__urng()) - __urngmin);
│ │ │ -
354 }
│ │ │ -
355 while (__ret > __urange || __ret < __tmp);
│ │ │ -
356 }
│ │ │ -
357 else
│ │ │ -
358 __ret = __uctype(__urng()) - __urngmin;
│ │ │ -
359
│ │ │ -
360 return __ret + __param.a();
│ │ │ -
361 }
│ │ │ -
362
│ │ │ -
363
│ │ │ -
364 template<typename _IntType>
│ │ │ -
365 template<typename _ForwardIterator,
│ │ │ -
366 typename _UniformRandomBitGenerator>
│ │ │ -
367 void
│ │ │ - │ │ │ -
369 __generate_impl(_ForwardIterator __f, _ForwardIterator __t,
│ │ │ -
370 _UniformRandomBitGenerator& __urng,
│ │ │ -
371 const param_type& __param)
│ │ │ -
372 {
│ │ │ -
373 __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
│ │ │ -
374 typedef typename _UniformRandomBitGenerator::result_type _Gresult_type;
│ │ │ -
375 typedef typename make_unsigned<result_type>::type __utype;
│ │ │ -
376 typedef typename common_type<_Gresult_type, __utype>::type __uctype;
│ │ │ -
377
│ │ │ -
378 static_assert( __urng.min() < __urng.max(),
│ │ │ -
379 "Uniform random bit generator must define min() < max()");
│ │ │ -
380
│ │ │ -
381 constexpr __uctype __urngmin = __urng.min();
│ │ │ -
382 constexpr __uctype __urngmax = __urng.max();
│ │ │ -
383 constexpr __uctype __urngrange = __urngmax - __urngmin;
│ │ │ -
384 const __uctype __urange
│ │ │ -
385 = __uctype(__param.b()) - __uctype(__param.a());
│ │ │ -
386
│ │ │ -
387 __uctype __ret;
│ │ │ -
388
│ │ │ -
389 if (__urngrange > __urange)
│ │ │ -
390 {
│ │ │ -
391 if (__detail::_Power_of_2(__urngrange + 1)
│ │ │ -
392 && __detail::_Power_of_2(__urange + 1))
│ │ │ -
393 {
│ │ │ -
394 while (__f != __t)
│ │ │ -
395 {
│ │ │ -
396 __ret = __uctype(__urng()) - __urngmin;
│ │ │ -
397 *__f++ = (__ret & __urange) + __param.a();
│ │ │ -
398 }
│ │ │ -
399 }
│ │ │ -
400 else
│ │ │ -
401 {
│ │ │ -
402 // downscaling
│ │ │ -
403 const __uctype __uerange = __urange + 1; // __urange can be zero
│ │ │ -
404 const __uctype __scaling = __urngrange / __uerange;
│ │ │ -
405 const __uctype __past = __uerange * __scaling;
│ │ │ -
406 while (__f != __t)
│ │ │ -
407 {
│ │ │ -
408 do
│ │ │ -
409 __ret = __uctype(__urng()) - __urngmin;
│ │ │ -
410 while (__ret >= __past);
│ │ │ -
411 *__f++ = __ret / __scaling + __param.a();
│ │ │ -
412 }
│ │ │ -
413 }
│ │ │ -
414 }
│ │ │ -
415 else if (__urngrange < __urange)
│ │ │ -
416 {
│ │ │ -
417 // upscaling
│ │ │ -
418 /*
│ │ │ -
419 Note that every value in [0, urange]
│ │ │ -
420 can be written uniquely as
│ │ │ -
421
│ │ │ -
422 (urngrange + 1) * high + low
│ │ │ -
423
│ │ │ -
424 where
│ │ │ -
425
│ │ │ -
426 high in [0, urange / (urngrange + 1)]
│ │ │ -
427
│ │ │ -
428 and
│ │ │ -
429
│ │ │ -
430 low in [0, urngrange].
│ │ │ -
431 */
│ │ │ -
432 __uctype __tmp; // wraparound control
│ │ │ -
433 while (__f != __t)
│ │ │ -
434 {
│ │ │ -
435 do
│ │ │ -
436 {
│ │ │ -
437 constexpr __uctype __uerngrange = __urngrange + 1;
│ │ │ -
438 __tmp = (__uerngrange * operator()
│ │ │ -
439 (__urng, param_type(0, __urange / __uerngrange)));
│ │ │ -
440 __ret = __tmp + (__uctype(__urng()) - __urngmin);
│ │ │ -
441 }
│ │ │ -
442 while (__ret > __urange || __ret < __tmp);
│ │ │ -
443 *__f++ = __ret;
│ │ │ -
444 }
│ │ │ -
445 }
│ │ │ -
446 else
│ │ │ -
447 while (__f != __t)
│ │ │ -
448 *__f++ = __uctype(__urng()) - __urngmin + __param.a();
│ │ │ -
449 }
│ │ │ -
450
│ │ │ -
451 // operator!= and operator<< and operator>> are defined in <bits/random.h>
│ │ │ -
452
│ │ │ -
453_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ -
454} // namespace std
│ │ │ -
455
│ │ │ -
456#endif
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
integral_constant< bool, __v > bool_constant
Alias template for compile-time boolean constant types.
Definition type_traits:99
│ │ │ +
1865
│ │ │ +
1866_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ +
1867} // namespace
│ │ │ +
1868
│ │ │ +
1869#endif // _SHARED_PTR_BASE_H
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
integral_constant< bool, true > true_type
The type used as a compile-time boolean with true value.
Definition type_traits:83
│ │ │ +
integral_constant< bool, false > false_type
The type used as a compile-time boolean with false value.
Definition type_traits:86
│ │ │ +
auto declval() noexcept -> decltype(__declval< _Tp >(0))
Definition type_traits:2356
│ │ │ +
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:428
│ │ │ +
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
│ │ │
ISO C++ entities toplevel namespace is std.
│ │ │ -
Implementation details not part of the namespace std interface.
│ │ │ -
__numeric_traits_integer< _Tp > __int_traits
Convenience alias for __numeric_traits<integer-type>.
│ │ │ -
is_integral
Definition type_traits:394
│ │ │ +
__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)
│ │ │ +
Primary class template hash.
│ │ │ +
is_void
Definition type_traits:272
│ │ │ +
is_convertible
Definition type_traits:1458
│ │ │
common_type
Definition type_traits:2228
│ │ │ -
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.
│ │ │ - │ │ │ - │ │ │ +
Base class for all library exceptions.
Definition exception.h:62
│ │ │ +
Primary template owner_less.
│ │ │ +
Exception possibly thrown by shared_ptr.
│ │ │ +
virtual char const * what() const noexcept
│ │ │ + │ │ │ +
One of the comparison functors.
│ │ │ +
A simple smart pointer providing strict ownership semantics.
Definition auto_ptr.h:90
│ │ │
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,13 +1,13 @@ │ │ │ │ libstdc++ │ │ │ │ -uniform_int_dist.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// Class template uniform_int_distribution -*- C++ -*- │ │ │ │ +1// shared_ptr and weak_ptr implementation details -*- C++ -*- │ │ │ │ 2 │ │ │ │ -3// Copyright (C) 2009-2021 Free Software Foundation, Inc. │ │ │ │ +3// Copyright (C) 2007-2021 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,511 +21,1948 @@ │ │ │ │ 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 │ │ │ │ +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// shared_ptr.hpp │ │ │ │ +31// Copyright (C) 1998, 1999 Greg Colvin and Beman Dawes. │ │ │ │ +32// Copyright (C) 2001, 2002, 2003 Peter Dimov │ │ │ │ 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 │ │ │ │ -48 concept uniform_random_bit_generator │ │ │ │ -49 = invocable<_Gen&> && unsigned_integral> │ │ │ │ -50 && requires │ │ │ │ -51 { │ │ │ │ -52 { _Gen::min() } -> same_as>; │ │ │ │ -53 { _Gen::max() } -> same_as>; │ │ │ │ -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 _____d_e_t_a_i_l │ │ │ │ -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 } │ │ │ │ +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 > 201703L │ │ │ │ +64# include <_c_o_m_p_a_r_e> │ │ │ │ +65#endif │ │ │ │ +66 │ │ │ │ +67namespace _s_t_d _GLIBCXX_VISIBILITY(default) │ │ │ │ +68{ │ │ │ │ +69_GLIBCXX_BEGIN_NAMESPACE_VERSION │ │ │ │ 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 param_type │ │ │ │ -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_> distribution_type; │ │ │ │ +71#if _GLIBCXX_USE_DEPRECATED │ │ │ │ +72#pragma GCC diagnostic push │ │ │ │ +73#pragma GCC diagnostic ignored "-Wdeprecated-declarations" │ │ │ │ +74 template class _a_u_t_o___p_t_r; │ │ │ │ +75#pragma GCC diagnostic pop │ │ │ │ +76#endif │ │ │ │ +77 │ │ │ │ +78 /** │ │ │ │ +79 * @brief Exception possibly thrown by @c shared_ptr. │ │ │ │ +80 * @ingroup exceptions │ │ │ │ +81 */ │ │ │ │ +_8_2 class _b_a_d___w_e_a_k___p_t_r : public _s_t_d_:_:_e_x_c_e_p_t_i_o_n │ │ │ │ +83 { │ │ │ │ +84 public: │ │ │ │ +_8_5 virtual char const* _w_h_a_t() const noexcept; │ │ │ │ +86 │ │ │ │ +87 virtual ~_b_a_d___w_e_a_k___p_t_r() noexcept; │ │ │ │ +88 }; │ │ │ │ 89 │ │ │ │ -90 param_type() : param_type(0) { } │ │ │ │ -91 │ │ │ │ -92 explicit │ │ │ │ -93 param_type(_IntType __a, │ │ │ │ -94 _IntType __b = __gnu_cxx::__int_traits<_IntType>::__max) │ │ │ │ -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 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; │ │ │ │ +90 // Substitute for bad_weak_ptr object in the case of -fno-exceptions. │ │ │ │ +91 inline void │ │ │ │ +92 __throw_bad_weak_ptr() │ │ │ │ +93 { _GLIBCXX_THROW_OR_ABORT(_b_a_d___w_e_a_k___p_t_r()); } │ │ │ │ +94 │ │ │ │ +95 using __gnu_cxx::_Lock_policy; │ │ │ │ +96 using __gnu_cxx::__default_lock_policy; │ │ │ │ +97 using __gnu_cxx::_S_single; │ │ │ │ +98 using __gnu_cxx::_S_mutex; │ │ │ │ +99 using __gnu_cxx::_S_atomic; │ │ │ │ +100 │ │ │ │ +101 // Empty helper class except when the template argument is _S_mutex. │ │ │ │ +102 template<_Lock_policy _Lp> │ │ │ │ +103 class _Mutex_base │ │ │ │ +104 { │ │ │ │ +105 protected: │ │ │ │ +106 // The atomic policy uses fully-fenced builtins, single doesn't care. │ │ │ │ +107 enum { _S_need_barriers = 0 }; │ │ │ │ +108 }; │ │ │ │ +109 │ │ │ │ +110 template<> │ │ │ │ +111 class _Mutex_base<_S_mutex> │ │ │ │ +112 : public __gnu_cxx::__mutex │ │ │ │ +113 { │ │ │ │ +114 protected: │ │ │ │ +115 // This policy is used when atomic builtins are not available. │ │ │ │ +116 // The replacement atomic operations might not have the necessary │ │ │ │ +117 // memory barriers. │ │ │ │ +118 enum { _S_need_barriers = 1 }; │ │ │ │ 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 = __gnu_cxx::__int_traits<_IntType>::__max) │ │ │ │ -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() { } │ │ │ │ +121 template<_Lock_policy _Lp = __default_lock_policy> │ │ │ │ +122 class _Sp_counted_base │ │ │ │ +123 : public _Mutex_base<_Lp> │ │ │ │ +124 { │ │ │ │ +125 public: │ │ │ │ +126 _Sp_counted_base() noexcept │ │ │ │ +127 : _M_use_count(1), _M_weak_count(1) { } │ │ │ │ +128 │ │ │ │ +129 virtual │ │ │ │ +130 ~_Sp_counted_base() noexcept │ │ │ │ +131 { } │ │ │ │ +132 │ │ │ │ +133 // Called when _M_use_count drops to zero, to release the resources │ │ │ │ +134 // managed by *this. │ │ │ │ +135 virtual void │ │ │ │ +136 _M_dispose() noexcept = 0; │ │ │ │ +137 │ │ │ │ +138 // Called when _M_weak_count drops to zero. │ │ │ │ +139 virtual void │ │ │ │ +140 _M_destroy() noexcept │ │ │ │ +141 { delete this; } │ │ │ │ +142 │ │ │ │ +143 virtual void* │ │ │ │ +144 _M_get_deleter(const std::type_info&) noexcept = 0; │ │ │ │ +145 │ │ │ │ +146 void │ │ │ │ +147 _M_add_ref_copy() │ │ │ │ +148 { __gnu_cxx::__atomic_add_dispatch(&_M_use_count, 1); } │ │ │ │ 149 │ │ │ │ -150 result_type │ │ │ │ -151 a() const │ │ │ │ -152 { return _M_param.a(); } │ │ │ │ -153 │ │ │ │ -154 result_type │ │ │ │ -155 b() const │ │ │ │ -156 { return _M_param.b(); } │ │ │ │ -157 │ │ │ │ -158 /** │ │ │ │ -159 * @brief Returns the parameter set of the distribution. │ │ │ │ -160 */ │ │ │ │ -161 _p_a_r_a_m___t_y_p_e │ │ │ │ -_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 param_type& __param) │ │ │ │ -171 { _M_param = __param; } │ │ │ │ -172 │ │ │ │ -173 /** │ │ │ │ -174 * @brief Returns the inclusive lower bound of the distribution range. │ │ │ │ -175 */ │ │ │ │ -176 result_type │ │ │ │ -_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 result_type │ │ │ │ -_1_8_4 _m_a_x() const │ │ │ │ -185 { return this->b(); } │ │ │ │ -186 │ │ │ │ -187 /** │ │ │ │ -188 * @brief Generating functions. │ │ │ │ -189 */ │ │ │ │ -190 template │ │ │ │ -191 result_type │ │ │ │ -_1_9_2 _o_p_e_r_a_t_o_r_(_)(_UniformRandomBitGenerator& __urng) │ │ │ │ -193 { return this->_o_p_e_r_a_t_o_r_(_)(__urng, _M_param); } │ │ │ │ -194 │ │ │ │ -195 template │ │ │ │ -196 result_type │ │ │ │ -197 _o_p_e_r_a_t_o_r_(_)(_UniformRandomBitGenerator& __urng, │ │ │ │ -198 const param_type& __p); │ │ │ │ -199 │ │ │ │ -200 template │ │ │ │ -202 void │ │ │ │ -203 __generate(_ForwardIterator __f, _ForwardIterator __t, │ │ │ │ -204 _UniformRandomBitGenerator& __urng) │ │ │ │ -205 { this->__generate(__f, __t, __urng, _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 _p_a_r_a_m___t_y_p_e& __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& __d1, │ │ │ │ -228 const _u_n_i_f_o_r_m___i_n_t___d_i_s_t_r_i_b_u_t_i_o_n& __d2) │ │ │ │ -229 { return __d1._M_param == __d2._M_param; } │ │ │ │ -230 │ │ │ │ -231 private: │ │ │ │ -232 template │ │ │ │ -234 void │ │ │ │ -235 __generate_impl(_ForwardIterator __f, _ForwardIterator __t, │ │ │ │ -236 _UniformRandomBitGenerator& __urng, │ │ │ │ -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(_Urbg& __g, _Up __range) │ │ │ │ -247 { │ │ │ │ -248 using _Up_traits = _____g_n_u___c_x_x_:_:_____i_n_t___t_r_a_i_t_s_<___U_p_>; │ │ │ │ -249 using _Wp_traits = _____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 _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; │ │ │ │ +150 void │ │ │ │ +151 _M_add_ref_lock() │ │ │ │ +152 { │ │ │ │ +153 if (!_M_add_ref_lock_nothrow()) │ │ │ │ +154 __throw_bad_weak_ptr(); │ │ │ │ +155 } │ │ │ │ +156 │ │ │ │ +157 bool │ │ │ │ +158 _M_add_ref_lock_nothrow() noexcept; │ │ │ │ +159 │ │ │ │ +160 void │ │ │ │ +161 _M_release() noexcept │ │ │ │ +162 { │ │ │ │ +163 // Be race-detector-friendly. For more info see bits/c++config. │ │ │ │ +164 _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE(&_M_use_count); │ │ │ │ +165 if (__gnu_cxx::__exchange_and_add_dispatch(&_M_use_count, -1) == 1) │ │ │ │ +166 { │ │ │ │ +167 _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER(&_M_use_count); │ │ │ │ +168 _M_dispose(); │ │ │ │ +169 // There must be a memory barrier between dispose() and destroy() │ │ │ │ +170 // to ensure that the effects of dispose() are observed in the │ │ │ │ +171 // thread that runs destroy(). │ │ │ │ +172 // See http://gcc.gnu.org/ml/libstdc++/2005-11/msg00136.html │ │ │ │ +173 if (_Mutex_base<_Lp>::_S_need_barriers) │ │ │ │ +174 { │ │ │ │ +175 __atomic_thread_fence (__ATOMIC_ACQ_REL); │ │ │ │ +176 } │ │ │ │ +177 │ │ │ │ +178 // Be race-detector-friendly. For more info see bits/c++config. │ │ │ │ +179 _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE(&_M_weak_count); │ │ │ │ +180 if (__gnu_cxx::__exchange_and_add_dispatch(&_M_weak_count, │ │ │ │ +181 -1) == 1) │ │ │ │ +182 { │ │ │ │ +183 _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER(&_M_weak_count); │ │ │ │ +184 _M_destroy(); │ │ │ │ +185 } │ │ │ │ +186 } │ │ │ │ +187 } │ │ │ │ +188 │ │ │ │ +189 void │ │ │ │ +190 _M_weak_add_ref() noexcept │ │ │ │ +191 { __gnu_cxx::__atomic_add_dispatch(&_M_weak_count, 1); } │ │ │ │ +192 │ │ │ │ +193 void │ │ │ │ +194 _M_weak_release() noexcept │ │ │ │ +195 { │ │ │ │ +196 // Be race-detector-friendly. For more info see bits/c++config. │ │ │ │ +197 _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE(&_M_weak_count); │ │ │ │ +198 if (__gnu_cxx::__exchange_and_add_dispatch(&_M_weak_count, -1) == 1) │ │ │ │ +199 { │ │ │ │ +200 _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER(&_M_weak_count); │ │ │ │ +201 if (_Mutex_base<_Lp>::_S_need_barriers) │ │ │ │ +202 { │ │ │ │ +203 // See _M_release(), │ │ │ │ +204 // destroy() must observe results of dispose() │ │ │ │ +205 __atomic_thread_fence (__ATOMIC_ACQ_REL); │ │ │ │ +206 } │ │ │ │ +207 _M_destroy(); │ │ │ │ +208 } │ │ │ │ +209 } │ │ │ │ +210 │ │ │ │ +211 long │ │ │ │ +212 _M_get_use_count() const noexcept │ │ │ │ +213 { │ │ │ │ +214 // No memory barrier is used here so there is no synchronization │ │ │ │ +215 // with other threads. │ │ │ │ +216 return __atomic_load_n(&_M_use_count, __ATOMIC_RELAXED); │ │ │ │ +217 } │ │ │ │ +218 │ │ │ │ +219 private: │ │ │ │ +220 _Sp_counted_base(_Sp_counted_base const&) = delete; │ │ │ │ +221 _Sp_counted_base& operator=(_Sp_counted_base const&) = delete; │ │ │ │ +222 │ │ │ │ +223 _Atomic_word _M_use_count; // #shared │ │ │ │ +224 _Atomic_word _M_weak_count; // #weak + (#shared != 0) │ │ │ │ +225 }; │ │ │ │ +226 │ │ │ │ +227 template<> │ │ │ │ +228 inline bool │ │ │ │ +229 _Sp_counted_base<_S_single>:: │ │ │ │ +230 _M_add_ref_lock_nothrow() noexcept │ │ │ │ +231 { │ │ │ │ +232 if (_M_use_count == 0) │ │ │ │ +233 return false; │ │ │ │ +234 ++_M_use_count; │ │ │ │ +235 return true; │ │ │ │ +236 } │ │ │ │ +237 │ │ │ │ +238 template<> │ │ │ │ +239 inline bool │ │ │ │ +240 _Sp_counted_base<_S_mutex>:: │ │ │ │ +241 _M_add_ref_lock_nothrow() noexcept │ │ │ │ +242 { │ │ │ │ +243 __gnu_cxx::__scoped_lock sentry(*this); │ │ │ │ +244 if (__gnu_cxx::__exchange_and_add_dispatch(&_M_use_count, 1) == 0) │ │ │ │ +245 { │ │ │ │ +246 _M_use_count = 0; │ │ │ │ +247 return false; │ │ │ │ +248 } │ │ │ │ +249 return true; │ │ │ │ +250 } │ │ │ │ +251 │ │ │ │ +252 template<> │ │ │ │ +253 inline bool │ │ │ │ +254 _Sp_counted_base<_S_atomic>:: │ │ │ │ +255 _M_add_ref_lock_nothrow() noexcept │ │ │ │ +256 { │ │ │ │ +257 // Perform lock-free add-if-not-zero operation. │ │ │ │ +258 _Atomic_word __count = _M_get_use_count(); │ │ │ │ +259 do │ │ │ │ +260 { │ │ │ │ +261 if (__count == 0) │ │ │ │ +262 return false; │ │ │ │ +263 // Replace the current counter value with the old value + 1, as │ │ │ │ +264 // long as it's not changed meanwhile. │ │ │ │ +265 } │ │ │ │ +266 while (!__atomic_compare_exchange_n(&_M_use_count, &__count, __count + 1, │ │ │ │ +267 true, __ATOMIC_ACQ_REL, │ │ │ │ +268 __ATOMIC_RELAXED)); │ │ │ │ +269 return true; │ │ │ │ 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 _c_o_m_m_o_n___t_y_p_e_<___G_r_e_s_u_l_t___t_y_p_e_,_ _____u_t_y_p_e_>_:_:_t_y_p_e __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 = _S_nd(__urng, __u64erange); │ │ │ │ -308 } │ │ │ │ -309 else │ │ │ │ -310#endif │ │ │ │ -311 if _GLIBCXX17_CONSTEXPR (__urngrange == __UINT32_MAX__) │ │ │ │ -312 { │ │ │ │ -313 // __urng produces values that use exactly 32-bits, │ │ │ │ -314 // so use 64-bit integers to downscale to desired range. │ │ │ │ -315 __UINT32_TYPE__ __u32erange = __uerange; │ │ │ │ -316 __ret = _S_nd<__UINT64_TYPE__>(__urng, __u32erange); │ │ │ │ -317 } │ │ │ │ -318 else │ │ │ │ -319#endif │ │ │ │ -320 { │ │ │ │ -321 // fallback case (2 divisions) │ │ │ │ -322 const __uctype __scaling = __urngrange / __uerange; │ │ │ │ -323 const __uctype __past = __uerange * __scaling; │ │ │ │ -324 do │ │ │ │ -325 __ret = __uctype(__urng()) - __urngmin; │ │ │ │ -326 while (__ret >= __past); │ │ │ │ -327 __ret /= __scaling; │ │ │ │ -328 } │ │ │ │ -329 } │ │ │ │ -330 else if (__urngrange < __urange) │ │ │ │ -331 { │ │ │ │ -332 // upscaling │ │ │ │ -333 /* │ │ │ │ -334 Note that every value in [0, urange] │ │ │ │ -335 can be written uniquely as │ │ │ │ +271 │ │ │ │ +272 template<> │ │ │ │ +273 inline void │ │ │ │ +274 _Sp_counted_base<_S_single>::_M_add_ref_copy() │ │ │ │ +275 { ++_M_use_count; } │ │ │ │ +276 │ │ │ │ +277 template<> │ │ │ │ +278 inline void │ │ │ │ +279 _Sp_counted_base<_S_single>::_M_release() noexcept │ │ │ │ +280 { │ │ │ │ +281 if (--_M_use_count == 0) │ │ │ │ +282 { │ │ │ │ +283 _M_dispose(); │ │ │ │ +284 if (--_M_weak_count == 0) │ │ │ │ +285 _M_destroy(); │ │ │ │ +286 } │ │ │ │ +287 } │ │ │ │ +288 │ │ │ │ +289 template<> │ │ │ │ +290 inline void │ │ │ │ +291 _Sp_counted_base<_S_single>::_M_weak_add_ref() noexcept │ │ │ │ +292 { ++_M_weak_count; } │ │ │ │ +293 │ │ │ │ +294 template<> │ │ │ │ +295 inline void │ │ │ │ +296 _Sp_counted_base<_S_single>::_M_weak_release() noexcept │ │ │ │ +297 { │ │ │ │ +298 if (--_M_weak_count == 0) │ │ │ │ +299 _M_destroy(); │ │ │ │ +300 } │ │ │ │ +301 │ │ │ │ +302 template<> │ │ │ │ +303 inline long │ │ │ │ +304 _Sp_counted_base<_S_single>::_M_get_use_count() const noexcept │ │ │ │ +305 { return _M_use_count; } │ │ │ │ +306 │ │ │ │ +307 │ │ │ │ +308 // Forward declarations. │ │ │ │ +309 template │ │ │ │ +310 class __shared_ptr; │ │ │ │ +311 │ │ │ │ +312 template │ │ │ │ +313 class __weak_ptr; │ │ │ │ +314 │ │ │ │ +315 template │ │ │ │ +316 class __enable_shared_from_this; │ │ │ │ +317 │ │ │ │ +318 template │ │ │ │ +319 class shared_ptr; │ │ │ │ +320 │ │ │ │ +321 template │ │ │ │ +322 class weak_ptr; │ │ │ │ +323 │ │ │ │ +324 template │ │ │ │ +325 struct owner_less; │ │ │ │ +326 │ │ │ │ +327 template │ │ │ │ +328 class enable_shared_from_this; │ │ │ │ +329 │ │ │ │ +330 template<_Lock_policy _Lp = __default_lock_policy> │ │ │ │ +331 class __weak_count; │ │ │ │ +332 │ │ │ │ +333 template<_Lock_policy _Lp = __default_lock_policy> │ │ │ │ +334 class __shared_count; │ │ │ │ +335 │ │ │ │ 336 │ │ │ │ -337 (urngrange + 1) * high + low │ │ │ │ -338 │ │ │ │ -339 where │ │ │ │ -340 │ │ │ │ -341 high in [0, urange / (urngrange + 1)] │ │ │ │ -342 │ │ │ │ -343 and │ │ │ │ -344 │ │ │ │ -345 low in [0, urngrange]. │ │ │ │ -346 */ │ │ │ │ -347 __uctype __tmp; // wraparound control │ │ │ │ -348 do │ │ │ │ -349 { │ │ │ │ -350 const __uctype __uerngrange = __urngrange + 1; │ │ │ │ -351 __tmp = (__uerngrange * operator() │ │ │ │ -352 (__urng, param_type(0, __urange / __uerngrange))); │ │ │ │ -353 __ret = __tmp + (__uctype(__urng()) - __urngmin); │ │ │ │ -354 } │ │ │ │ -355 while (__ret > __urange || __ret < __tmp); │ │ │ │ -356 } │ │ │ │ -357 else │ │ │ │ -358 __ret = __uctype(__urng()) - __urngmin; │ │ │ │ -359 │ │ │ │ -360 return __ret + __param.a(); │ │ │ │ -361 } │ │ │ │ -362 │ │ │ │ -363 │ │ │ │ -364 template │ │ │ │ -365 template │ │ │ │ -367 void │ │ │ │ -368 _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_>_:_: │ │ │ │ -369_ _____g_e_n_e_r_a_t_e___i_m_p_l(_ForwardIterator __f, _ForwardIterator __t, │ │ │ │ -370 _UniformRandomBitGenerator& __urng, │ │ │ │ -371 const param_type& __param) │ │ │ │ -372 { │ │ │ │ -373 __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>) │ │ │ │ -374 typedef typename _UniformRandomBitGenerator::result_type _Gresult_type; │ │ │ │ -375 typedef typename make_unsigned::type __utype; │ │ │ │ -376 typedef typename _c_o_m_m_o_n___t_y_p_e_<___G_r_e_s_u_l_t___t_y_p_e_,_ _____u_t_y_p_e_>_:_:_t_y_p_e __uctype; │ │ │ │ -377 │ │ │ │ -378 static_assert( __urng.min() < __urng.max(), │ │ │ │ -379 "Uniform random bit generator must define min() < max()"); │ │ │ │ +337 // Counted ptr with no deleter or allocator support │ │ │ │ +338 template │ │ │ │ +339 class _Sp_counted_ptr final : public _Sp_counted_base<_Lp> │ │ │ │ +340 { │ │ │ │ +341 public: │ │ │ │ +342 explicit │ │ │ │ +343 _Sp_counted_ptr(_Ptr __p) noexcept │ │ │ │ +344 : _M_ptr(__p) { } │ │ │ │ +345 │ │ │ │ +346 virtual void │ │ │ │ +347 _M_dispose() noexcept │ │ │ │ +348 { delete _M_ptr; } │ │ │ │ +349 │ │ │ │ +350 virtual void │ │ │ │ +351 _M_destroy() noexcept │ │ │ │ +352 { delete this; } │ │ │ │ +353 │ │ │ │ +354 virtual void* │ │ │ │ +355 _M_get_deleter(const std::type_info&) noexcept │ │ │ │ +356 { return nullptr; } │ │ │ │ +357 │ │ │ │ +358 _Sp_counted_ptr(const _Sp_counted_ptr&) = delete; │ │ │ │ +359 _Sp_counted_ptr& operator=(const _Sp_counted_ptr&) = delete; │ │ │ │ +360 │ │ │ │ +361 private: │ │ │ │ +362 _Ptr _M_ptr; │ │ │ │ +363 }; │ │ │ │ +364 │ │ │ │ +365 template<> │ │ │ │ +366 inline void │ │ │ │ +367 _Sp_counted_ptr::_M_dispose() noexcept { } │ │ │ │ +368 │ │ │ │ +369 template<> │ │ │ │ +370 inline void │ │ │ │ +371 _Sp_counted_ptr::_M_dispose() noexcept { } │ │ │ │ +372 │ │ │ │ +373 template<> │ │ │ │ +374 inline void │ │ │ │ +375 _Sp_counted_ptr::_M_dispose() noexcept { } │ │ │ │ +376 │ │ │ │ +377 template │ │ │ │ +379 struct _Sp_ebo_helper; │ │ │ │ 380 │ │ │ │ -381 constexpr __uctype __urngmin = __urng.min(); │ │ │ │ -382 constexpr __uctype __urngmax = __urng.max(); │ │ │ │ -383 constexpr __uctype __urngrange = __urngmax - __urngmin; │ │ │ │ -384 const __uctype __urange │ │ │ │ -385 = __uctype(__param.b()) - __uctype(__param.a()); │ │ │ │ -386 │ │ │ │ -387 __uctype __ret; │ │ │ │ -388 │ │ │ │ -389 if (__urngrange > __urange) │ │ │ │ -390 { │ │ │ │ -391 if (__detail::_Power_of_2(__urngrange + 1) │ │ │ │ -392 && __detail::_Power_of_2(__urange + 1)) │ │ │ │ -393 { │ │ │ │ -394 while (__f != __t) │ │ │ │ +381 /// Specialization using EBO. │ │ │ │ +382 template │ │ │ │ +_3_8_3 struct _Sp_ebo_helper<_Nm, _Tp, true> : private _Tp │ │ │ │ +384 { │ │ │ │ +385 explicit _Sp_ebo_helper(const _Tp& __tp) : _Tp(__tp) { } │ │ │ │ +386 explicit _Sp_ebo_helper(_Tp&& __tp) : _Tp(_s_t_d_:_:_m_o_v_e(__tp)) { } │ │ │ │ +387 │ │ │ │ +388 static _Tp& │ │ │ │ +389 _S_get(_Sp_ebo_helper& __eboh) { return static_cast<_Tp&>(__eboh); } │ │ │ │ +390 }; │ │ │ │ +391 │ │ │ │ +392 /// Specialization not using EBO. │ │ │ │ +393 template │ │ │ │ +_3_9_4 struct _Sp_ebo_helper<_Nm, _Tp, false> │ │ │ │ 395 { │ │ │ │ -396 __ret = __uctype(__urng()) - __urngmin; │ │ │ │ -397 *__f++ = (__ret & __urange) + __param.a(); │ │ │ │ -398 } │ │ │ │ -399 } │ │ │ │ -400 else │ │ │ │ -401 { │ │ │ │ -402 // downscaling │ │ │ │ -403 const __uctype __uerange = __urange + 1; // __urange can be zero │ │ │ │ -404 const __uctype __scaling = __urngrange / __uerange; │ │ │ │ -405 const __uctype __past = __uerange * __scaling; │ │ │ │ -406 while (__f != __t) │ │ │ │ -407 { │ │ │ │ -408 do │ │ │ │ -409 __ret = __uctype(__urng()) - __urngmin; │ │ │ │ -410 while (__ret >= __past); │ │ │ │ -411 *__f++ = __ret / __scaling + __param.a(); │ │ │ │ -412 } │ │ │ │ -413 } │ │ │ │ -414 } │ │ │ │ -415 else if (__urngrange < __urange) │ │ │ │ -416 { │ │ │ │ -417 // upscaling │ │ │ │ -418 /* │ │ │ │ -419 Note that every value in [0, urange] │ │ │ │ -420 can be written uniquely as │ │ │ │ -421 │ │ │ │ -422 (urngrange + 1) * high + low │ │ │ │ +396 explicit _Sp_ebo_helper(const _Tp& __tp) : _M_tp(__tp) { } │ │ │ │ +397 explicit _Sp_ebo_helper(_Tp&& __tp) : _M_tp(_s_t_d_:_:_m_o_v_e(__tp)) { } │ │ │ │ +398 │ │ │ │ +399 static _Tp& │ │ │ │ +400 _S_get(_Sp_ebo_helper& __eboh) │ │ │ │ +401 { return __eboh._M_tp; } │ │ │ │ +402 │ │ │ │ +403 private: │ │ │ │ +404 _Tp _M_tp; │ │ │ │ +405 }; │ │ │ │ +406 │ │ │ │ +407 // Support for custom deleter and/or allocator │ │ │ │ +408 template │ │ │ │ +409 class _Sp_counted_deleter final : public _Sp_counted_base<_Lp> │ │ │ │ +410 { │ │ │ │ +411 class _Impl : _Sp_ebo_helper<0, _Deleter>, _Sp_ebo_helper<1, _Alloc> │ │ │ │ +412 { │ │ │ │ +413 typedef _Sp_ebo_helper<0, _Deleter> _Del_base; │ │ │ │ +414 typedef _Sp_ebo_helper<1, _Alloc> _Alloc_base; │ │ │ │ +415 │ │ │ │ +416 public: │ │ │ │ +417 _Impl(_Ptr __p, _Deleter __d, const _Alloc& __a) noexcept │ │ │ │ +418 : _Del_base(_s_t_d_:_:_m_o_v_e(__d)), _Alloc_base(__a), _M_ptr(__p) │ │ │ │ +419 { } │ │ │ │ +420 │ │ │ │ +421 _Deleter& _M_del() noexcept { return _Del_base::_S_get(*this); } │ │ │ │ +422 _Alloc& _M_alloc() noexcept { return _Alloc_base::_S_get(*this); } │ │ │ │ 423 │ │ │ │ -424 where │ │ │ │ -425 │ │ │ │ -426 high in [0, urange / (urngrange + 1)] │ │ │ │ -427 │ │ │ │ -428 and │ │ │ │ +424 _Ptr _M_ptr; │ │ │ │ +425 }; │ │ │ │ +426 │ │ │ │ +427 public: │ │ │ │ +428 using __allocator_type = __alloc_rebind<_Alloc, _Sp_counted_deleter>; │ │ │ │ 429 │ │ │ │ -430 low in [0, urngrange]. │ │ │ │ -431 */ │ │ │ │ -432 __uctype __tmp; // wraparound control │ │ │ │ -433 while (__f != __t) │ │ │ │ -434 { │ │ │ │ -435 do │ │ │ │ -436 { │ │ │ │ -437 constexpr __uctype __uerngrange = __urngrange + 1; │ │ │ │ -438 __tmp = (__uerngrange * operator() │ │ │ │ -439 (__urng, param_type(0, __urange / __uerngrange))); │ │ │ │ -440 __ret = __tmp + (__uctype(__urng()) - __urngmin); │ │ │ │ -441 } │ │ │ │ -442 while (__ret > __urange || __ret < __tmp); │ │ │ │ -443 *__f++ = __ret; │ │ │ │ -444 } │ │ │ │ -445 } │ │ │ │ -446 else │ │ │ │ -447 while (__f != __t) │ │ │ │ -448 *__f++ = __uctype(__urng()) - __urngmin + __param.a(); │ │ │ │ -449 } │ │ │ │ -450 │ │ │ │ -451 // operator!= and operator<< and operator>> are defined in │ │ │ │ -452 │ │ │ │ -453_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ -454} // namespace std │ │ │ │ -455 │ │ │ │ -456#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_9 │ │ │ │ +430 // __d(__p) must not throw. │ │ │ │ +431 _Sp_counted_deleter(_Ptr __p, _Deleter __d) noexcept │ │ │ │ +432 : _M_impl(__p, _s_t_d_:_:_m_o_v_e(__d), _Alloc()) { } │ │ │ │ +433 │ │ │ │ +434 // __d(__p) must not throw. │ │ │ │ +435 _Sp_counted_deleter(_Ptr __p, _Deleter __d, const _Alloc& __a) noexcept │ │ │ │ +436 : _M_impl(__p, _s_t_d_:_:_m_o_v_e(__d), __a) { } │ │ │ │ +437 │ │ │ │ +438 ~_Sp_counted_deleter() noexcept { } │ │ │ │ +439 │ │ │ │ +440 virtual void │ │ │ │ +441 _M_dispose() noexcept │ │ │ │ +442 { _M_impl._M_del()(_M_impl._M_ptr); } │ │ │ │ +443 │ │ │ │ +444 virtual void │ │ │ │ +445 _M_destroy() noexcept │ │ │ │ +446 { │ │ │ │ +447 __allocator_type __a(_M_impl._M_alloc()); │ │ │ │ +448 __allocated_ptr<__allocator_type> __guard_ptr{ __a, this }; │ │ │ │ +449 this->~_Sp_counted_deleter(); │ │ │ │ +450 } │ │ │ │ +451 │ │ │ │ +452 virtual void* │ │ │ │ +453 _M_get_deleter(const type_info& __ti [[__gnu__::__unused__]]) noexcept │ │ │ │ +454 { │ │ │ │ +455#if __cpp_rtti │ │ │ │ +456 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ +457 // 2400. shared_ptr's get_deleter() should use addressof() │ │ │ │ +458 return __ti == typeid(_Deleter) │ │ │ │ +459 ? _s_t_d_:_:_____a_d_d_r_e_s_s_o_f(_M_impl._M_del()) │ │ │ │ +460 : nullptr; │ │ │ │ +461#else │ │ │ │ +462 return nullptr; │ │ │ │ +463#endif │ │ │ │ +464 } │ │ │ │ +465 │ │ │ │ +466 private: │ │ │ │ +467 _Impl _M_impl; │ │ │ │ +468 }; │ │ │ │ +469 │ │ │ │ +470 // helpers for make_shared / allocate_shared │ │ │ │ +471 │ │ │ │ +472 struct _Sp_make_shared_tag │ │ │ │ +473 { │ │ │ │ +474 private: │ │ │ │ +475 template │ │ │ │ +476 friend class _Sp_counted_ptr_inplace; │ │ │ │ +477 │ │ │ │ +478 static const type_info& │ │ │ │ +479 _S_ti() noexcept _GLIBCXX_VISIBILITY(default) │ │ │ │ +480 { │ │ │ │ +481 alignas(type_info) static constexpr char __tag[sizeof(type_info)] = { }; │ │ │ │ +482 return reinterpret_cast(__tag); │ │ │ │ +483 } │ │ │ │ +484 │ │ │ │ +485 static bool _S_eq(const type_info&) noexcept; │ │ │ │ +486 }; │ │ │ │ +487 │ │ │ │ +488 template │ │ │ │ +489 struct _Sp_alloc_shared_tag │ │ │ │ +490 { │ │ │ │ +491 const _Alloc& _M_a; │ │ │ │ +492 }; │ │ │ │ +493 │ │ │ │ +494 template │ │ │ │ +495 class _Sp_counted_ptr_inplace final : public _Sp_counted_base<_Lp> │ │ │ │ +496 { │ │ │ │ +497 class _Impl : _Sp_ebo_helper<0, _Alloc> │ │ │ │ +498 { │ │ │ │ +499 typedef _Sp_ebo_helper<0, _Alloc> _A_base; │ │ │ │ +500 │ │ │ │ +501 public: │ │ │ │ +502 explicit _Impl(_Alloc __a) noexcept : _A_base(__a) { } │ │ │ │ +503 │ │ │ │ +504 _Alloc& _M_alloc() noexcept { return _A_base::_S_get(*this); } │ │ │ │ +505 │ │ │ │ +506 __gnu_cxx::__aligned_buffer<_Tp> _M_storage; │ │ │ │ +507 }; │ │ │ │ +508 │ │ │ │ +509 public: │ │ │ │ +510 using __allocator_type = __alloc_rebind<_Alloc, _Sp_counted_ptr_inplace>; │ │ │ │ +511 │ │ │ │ +512 // Alloc parameter is not a reference so doesn't alias anything in __args │ │ │ │ +513 template │ │ │ │ +514 _Sp_counted_ptr_inplace(_Alloc __a, _Args&&... __args) │ │ │ │ +515 : _M_impl(__a) │ │ │ │ +516 { │ │ │ │ +517 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ +518 // 2070. allocate_shared should use allocator_traits::construct │ │ │ │ +519 allocator_traits<_Alloc>::construct(__a, _M_ptr(), │ │ │ │ +520 _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(__args)...); // might throw │ │ │ │ +521 } │ │ │ │ +522 │ │ │ │ +523 ~_Sp_counted_ptr_inplace() noexcept { } │ │ │ │ +524 │ │ │ │ +525 virtual void │ │ │ │ +526 _M_dispose() noexcept │ │ │ │ +527 { │ │ │ │ +528 allocator_traits<_Alloc>::destroy(_M_impl._M_alloc(), _M_ptr()); │ │ │ │ +529 } │ │ │ │ +530 │ │ │ │ +531 // Override because the allocator needs to know the dynamic type │ │ │ │ +532 virtual void │ │ │ │ +533 _M_destroy() noexcept │ │ │ │ +534 { │ │ │ │ +535 __allocator_type __a(_M_impl._M_alloc()); │ │ │ │ +536 __allocated_ptr<__allocator_type> __guard_ptr{ __a, this }; │ │ │ │ +537 this->~_Sp_counted_ptr_inplace(); │ │ │ │ +538 } │ │ │ │ +539 │ │ │ │ +540 private: │ │ │ │ +541 friend class __shared_count<_Lp>; // To be able to call _M_ptr(). │ │ │ │ +542 │ │ │ │ +543 // No longer used, but code compiled against old libstdc++ headers │ │ │ │ +544 // might still call it from __shared_ptr ctor to get the pointer out. │ │ │ │ +545 virtual void* │ │ │ │ +546 _M_get_deleter(const std::type_info& __ti) noexcept override │ │ │ │ +547 { │ │ │ │ +548 auto __ptr = const_cast::type*>(_M_ptr()); │ │ │ │ +549 // Check for the fake type_info first, so we don't try to access it │ │ │ │ +550 // as a real type_info object. Otherwise, check if it's the real │ │ │ │ +551 // type_info for this class. With RTTI enabled we can check directly, │ │ │ │ +552 // or call a library function to do it. │ │ │ │ +553 if (&__ti == &_Sp_make_shared_tag::_S_ti() │ │ │ │ +554 || │ │ │ │ +555#if __cpp_rtti │ │ │ │ +556 __ti == typeid(_Sp_make_shared_tag) │ │ │ │ +557#else │ │ │ │ +558 _Sp_make_shared_tag::_S_eq(__ti) │ │ │ │ +559#endif │ │ │ │ +560 ) │ │ │ │ +561 return __ptr; │ │ │ │ +562 return nullptr; │ │ │ │ +563 } │ │ │ │ +564 │ │ │ │ +565 _Tp* _M_ptr() noexcept { return _M_impl._M_storage._M_ptr(); } │ │ │ │ +566 │ │ │ │ +567 _Impl _M_impl; │ │ │ │ +568 }; │ │ │ │ +569 │ │ │ │ +570 // The default deleter for shared_ptr and shared_ptr. │ │ │ │ +571 struct __sp_array_delete │ │ │ │ +572 { │ │ │ │ +573 template │ │ │ │ +574 void operator()(_Yp* __p) const { delete[] __p; } │ │ │ │ +575 }; │ │ │ │ +576 │ │ │ │ +577 template<_Lock_policy _Lp> │ │ │ │ +578 class __shared_count │ │ │ │ +579 { │ │ │ │ +580 template │ │ │ │ +581 struct __not_alloc_shared_tag { using type = void; }; │ │ │ │ +582 │ │ │ │ +583 template │ │ │ │ +584 struct __not_alloc_shared_tag<_Sp_alloc_shared_tag<_Tp>> { }; │ │ │ │ +585 │ │ │ │ +586 public: │ │ │ │ +587 constexpr __shared_count() noexcept : _M_pi(0) │ │ │ │ +588 { } │ │ │ │ +589 │ │ │ │ +590 template │ │ │ │ +591 explicit │ │ │ │ +592 __shared_count(_Ptr __p) : _M_pi(0) │ │ │ │ +593 { │ │ │ │ +594 __try │ │ │ │ +595 { │ │ │ │ +596 _M_pi = new _Sp_counted_ptr<_Ptr, _Lp>(__p); │ │ │ │ +597 } │ │ │ │ +598 __catch(...) │ │ │ │ +599 { │ │ │ │ +600 delete __p; │ │ │ │ +601 __throw_exception_again; │ │ │ │ +602 } │ │ │ │ +603 } │ │ │ │ +604 │ │ │ │ +605 template │ │ │ │ +606 __shared_count(_Ptr __p, /* is_array = */ false_type) │ │ │ │ +607 : __shared_count(__p) │ │ │ │ +608 { } │ │ │ │ +609 │ │ │ │ +610 template │ │ │ │ +611 __shared_count(_Ptr __p, /* is_array = */ true_type) │ │ │ │ +612 : __shared_count(__p, __sp_array_delete{}, allocator()) │ │ │ │ +613 { } │ │ │ │ +614 │ │ │ │ +615 template::type> │ │ │ │ +617 __shared_count(_Ptr __p, _Deleter __d) │ │ │ │ +618 : __shared_count(__p, std::_m_o_v_e(__d), allocator()) │ │ │ │ +619 { } │ │ │ │ +620 │ │ │ │ +621 template::type> │ │ │ │ +623 __shared_count(_Ptr __p, _Deleter __d, _Alloc __a) : _M_pi(0) │ │ │ │ +624 { │ │ │ │ +625 typedef _Sp_counted_deleter<_Ptr, _Deleter, _Alloc, _Lp> _Sp_cd_type; │ │ │ │ +626 __try │ │ │ │ +627 { │ │ │ │ +628 typename _Sp_cd_type::__allocator_type __a2(__a); │ │ │ │ +629 auto __guard = std::__allocate_guarded(__a2); │ │ │ │ +630 _Sp_cd_type* __mem = __guard.get(); │ │ │ │ +631 ::new (__mem) _Sp_cd_type(__p, _s_t_d_:_:_m_o_v_e(__d), _s_t_d_:_:_m_o_v_e(__a)); │ │ │ │ +632 _M_pi = __mem; │ │ │ │ +633 __guard = nullptr; │ │ │ │ +634 } │ │ │ │ +635 __catch(...) │ │ │ │ +636 { │ │ │ │ +637 __d(__p); // Call _Deleter on __p. │ │ │ │ +638 __throw_exception_again; │ │ │ │ +639 } │ │ │ │ +640 } │ │ │ │ +641 │ │ │ │ +642 template │ │ │ │ +643 __shared_count(_Tp*& __p, _Sp_alloc_shared_tag<_Alloc> __a, │ │ │ │ +644 _Args&&... __args) │ │ │ │ +645 { │ │ │ │ +646 typedef _Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp> _Sp_cp_type; │ │ │ │ +647 typename _Sp_cp_type::__allocator_type __a2(__a._M_a); │ │ │ │ +648 auto __guard = std::__allocate_guarded(__a2); │ │ │ │ +649 _Sp_cp_type* __mem = __guard.get(); │ │ │ │ +650 auto __pi = ::new (__mem) │ │ │ │ +651 _Sp_cp_type(__a._M_a, _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(__args)...); │ │ │ │ +652 __guard = nullptr; │ │ │ │ +653 _M_pi = __pi; │ │ │ │ +654 __p = __pi->_M_ptr(); │ │ │ │ +655 } │ │ │ │ +656 │ │ │ │ +657#if _GLIBCXX_USE_DEPRECATED │ │ │ │ +658#pragma GCC diagnostic push │ │ │ │ +659#pragma GCC diagnostic ignored "-Wdeprecated-declarations" │ │ │ │ +660 // Special case for auto_ptr<_Tp> to provide the strong guarantee. │ │ │ │ +661 template │ │ │ │ +662 explicit │ │ │ │ +663 __shared_count(std::auto_ptr<_Tp>&& __r); │ │ │ │ +664#pragma GCC diagnostic pop │ │ │ │ +665#endif │ │ │ │ +666 │ │ │ │ +667 // Special case for unique_ptr<_Tp,_Del> to provide the strong guarantee. │ │ │ │ +668 template │ │ │ │ +669 explicit │ │ │ │ +670 __shared_count(std::unique_ptr<_Tp, _Del>&& __r) : _M_pi(0) │ │ │ │ +671 { │ │ │ │ +672 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ +673 // 2415. Inconsistency between unique_ptr and shared_ptr │ │ │ │ +674 if (__r.get() == nullptr) │ │ │ │ +675 return; │ │ │ │ +676 │ │ │ │ +677 using _Ptr = typename unique_ptr<_Tp, _Del>::pointer; │ │ │ │ +678 using _Del2 = typename conditional::value, │ │ │ │ +679 reference_wrapper::type>, │ │ │ │ +680 _Del>::type; │ │ │ │ +681 using _Sp_cd_type │ │ │ │ +682 = _Sp_counted_deleter<_Ptr, _Del2, allocator, _Lp>; │ │ │ │ +683 using _Alloc = allocator<_Sp_cd_type>; │ │ │ │ +684 using _Alloc_traits = allocator_traits<_Alloc>; │ │ │ │ +685 _Alloc __a; │ │ │ │ +686 _Sp_cd_type* __mem = _Alloc_traits::allocate(__a, 1); │ │ │ │ +687 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ +688 // 3548. shared_ptr construction from unique_ptr should move │ │ │ │ +689 // (not copy) the deleter │ │ │ │ +690 _Alloc_traits::construct(__a, __mem, __r.release(), │ │ │ │ +691 _s_t_d_:_:_f_o_r_w_a_r_d_<___D_e_l_>(__r.get_deleter())); │ │ │ │ +692 _M_pi = __mem; │ │ │ │ +693 } │ │ │ │ +694 │ │ │ │ +695 // Throw bad_weak_ptr when __r._M_get_use_count() == 0. │ │ │ │ +696 explicit __shared_count(const __weak_count<_Lp>& __r); │ │ │ │ +697 │ │ │ │ +698 // Does not throw if __r._M_get_use_count() == 0, caller must check. │ │ │ │ +699 explicit │ │ │ │ +700 __shared_count(const __weak_count<_Lp>& __r, std::nothrow_t) noexcept; │ │ │ │ +701 │ │ │ │ +702 ~__shared_count() noexcept │ │ │ │ +703 { │ │ │ │ +704 if (_M_pi != nullptr) │ │ │ │ +705 _M_pi->_M_release(); │ │ │ │ +706 } │ │ │ │ +707 │ │ │ │ +708 __shared_count(const __shared_count& __r) noexcept │ │ │ │ +709 : _M_pi(__r._M_pi) │ │ │ │ +710 { │ │ │ │ +711 if (_M_pi != nullptr) │ │ │ │ +712 _M_pi->_M_add_ref_copy(); │ │ │ │ +713 } │ │ │ │ +714 │ │ │ │ +715 __shared_count& │ │ │ │ +716 operator=(const __shared_count& __r) noexcept │ │ │ │ +717 { │ │ │ │ +718 _Sp_counted_base<_Lp>* __tmp = __r._M_pi; │ │ │ │ +719 if (__tmp != _M_pi) │ │ │ │ +720 { │ │ │ │ +721 if (__tmp != nullptr) │ │ │ │ +722 __tmp->_M_add_ref_copy(); │ │ │ │ +723 if (_M_pi != nullptr) │ │ │ │ +724 _M_pi->_M_release(); │ │ │ │ +725 _M_pi = __tmp; │ │ │ │ +726 } │ │ │ │ +727 return *this; │ │ │ │ +728 } │ │ │ │ +729 │ │ │ │ +730 void │ │ │ │ +731 _M_swap(__shared_count& __r) noexcept │ │ │ │ +732 { │ │ │ │ +733 _Sp_counted_base<_Lp>* __tmp = __r._M_pi; │ │ │ │ +734 __r._M_pi = _M_pi; │ │ │ │ +735 _M_pi = __tmp; │ │ │ │ +736 } │ │ │ │ +737 │ │ │ │ +738 long │ │ │ │ +739 _M_get_use_count() const noexcept │ │ │ │ +740 { return _M_pi ? _M_pi->_M_get_use_count() : 0; } │ │ │ │ +741 │ │ │ │ +742 bool │ │ │ │ +743 _M_unique() const noexcept │ │ │ │ +744 { return this->_M_get_use_count() == 1; } │ │ │ │ +745 │ │ │ │ +746 void* │ │ │ │ +747 _M_get_deleter(const std::type_info& __ti) const noexcept │ │ │ │ +748 { return _M_pi ? _M_pi->_M_get_deleter(__ti) : nullptr; } │ │ │ │ +749 │ │ │ │ +750 bool │ │ │ │ +751 _M_less(const __shared_count& __rhs) const noexcept │ │ │ │ +752 { return std::less<_Sp_counted_base<_Lp>*>()(this->_M_pi, __rhs._M_pi); } │ │ │ │ +753 │ │ │ │ +754 bool │ │ │ │ +755 _M_less(const __weak_count<_Lp>& __rhs) const noexcept │ │ │ │ +756 { return std::less<_Sp_counted_base<_Lp>*>()(this->_M_pi, __rhs._M_pi); } │ │ │ │ +757 │ │ │ │ +758 // Friend function injected into enclosing namespace and found by ADL │ │ │ │ +759 friend inline bool │ │ │ │ +760 operator==(const __shared_count& __a, const __shared_count& __b) noexcept │ │ │ │ +761 { return __a._M_pi == __b._M_pi; } │ │ │ │ +762 │ │ │ │ +763 private: │ │ │ │ +764 friend class __weak_count<_Lp>; │ │ │ │ +765 │ │ │ │ +766 _Sp_counted_base<_Lp>* _M_pi; │ │ │ │ +767 }; │ │ │ │ +768 │ │ │ │ +769 │ │ │ │ +770 template<_Lock_policy _Lp> │ │ │ │ +771 class __weak_count │ │ │ │ +772 { │ │ │ │ +773 public: │ │ │ │ +774 constexpr __weak_count() noexcept : _M_pi(nullptr) │ │ │ │ +775 { } │ │ │ │ +776 │ │ │ │ +777 __weak_count(const __shared_count<_Lp>& __r) noexcept │ │ │ │ +778 : _M_pi(__r._M_pi) │ │ │ │ +779 { │ │ │ │ +780 if (_M_pi != nullptr) │ │ │ │ +781 _M_pi->_M_weak_add_ref(); │ │ │ │ +782 } │ │ │ │ +783 │ │ │ │ +784 __weak_count(const __weak_count& __r) noexcept │ │ │ │ +785 : _M_pi(__r._M_pi) │ │ │ │ +786 { │ │ │ │ +787 if (_M_pi != nullptr) │ │ │ │ +788 _M_pi->_M_weak_add_ref(); │ │ │ │ +789 } │ │ │ │ +790 │ │ │ │ +791 __weak_count(__weak_count&& __r) noexcept │ │ │ │ +792 : _M_pi(__r._M_pi) │ │ │ │ +793 { __r._M_pi = nullptr; } │ │ │ │ +794 │ │ │ │ +795 ~__weak_count() noexcept │ │ │ │ +796 { │ │ │ │ +797 if (_M_pi != nullptr) │ │ │ │ +798 _M_pi->_M_weak_release(); │ │ │ │ +799 } │ │ │ │ +800 │ │ │ │ +801 __weak_count& │ │ │ │ +802 operator=(const __shared_count<_Lp>& __r) noexcept │ │ │ │ +803 { │ │ │ │ +804 _Sp_counted_base<_Lp>* __tmp = __r._M_pi; │ │ │ │ +805 if (__tmp != nullptr) │ │ │ │ +806 __tmp->_M_weak_add_ref(); │ │ │ │ +807 if (_M_pi != nullptr) │ │ │ │ +808 _M_pi->_M_weak_release(); │ │ │ │ +809 _M_pi = __tmp; │ │ │ │ +810 return *this; │ │ │ │ +811 } │ │ │ │ +812 │ │ │ │ +813 __weak_count& │ │ │ │ +814 operator=(const __weak_count& __r) noexcept │ │ │ │ +815 { │ │ │ │ +816 _Sp_counted_base<_Lp>* __tmp = __r._M_pi; │ │ │ │ +817 if (__tmp != nullptr) │ │ │ │ +818 __tmp->_M_weak_add_ref(); │ │ │ │ +819 if (_M_pi != nullptr) │ │ │ │ +820 _M_pi->_M_weak_release(); │ │ │ │ +821 _M_pi = __tmp; │ │ │ │ +822 return *this; │ │ │ │ +823 } │ │ │ │ +824 │ │ │ │ +825 __weak_count& │ │ │ │ +826 operator=(__weak_count&& __r) noexcept │ │ │ │ +827 { │ │ │ │ +828 if (_M_pi != nullptr) │ │ │ │ +829 _M_pi->_M_weak_release(); │ │ │ │ +830 _M_pi = __r._M_pi; │ │ │ │ +831 __r._M_pi = nullptr; │ │ │ │ +832 return *this; │ │ │ │ +833 } │ │ │ │ +834 │ │ │ │ +835 void │ │ │ │ +836 _M_swap(__weak_count& __r) noexcept │ │ │ │ +837 { │ │ │ │ +838 _Sp_counted_base<_Lp>* __tmp = __r._M_pi; │ │ │ │ +839 __r._M_pi = _M_pi; │ │ │ │ +840 _M_pi = __tmp; │ │ │ │ +841 } │ │ │ │ +842 │ │ │ │ +843 long │ │ │ │ +844 _M_get_use_count() const noexcept │ │ │ │ +845 { return _M_pi != nullptr ? _M_pi->_M_get_use_count() : 0; } │ │ │ │ +846 │ │ │ │ +847 bool │ │ │ │ +848 _M_less(const __weak_count& __rhs) const noexcept │ │ │ │ +849 { return std::less<_Sp_counted_base<_Lp>*>()(this->_M_pi, __rhs._M_pi); } │ │ │ │ +850 │ │ │ │ +851 bool │ │ │ │ +852 _M_less(const __shared_count<_Lp>& __rhs) const noexcept │ │ │ │ +853 { return std::less<_Sp_counted_base<_Lp>*>()(this->_M_pi, __rhs._M_pi); } │ │ │ │ +854 │ │ │ │ +855 // Friend function injected into enclosing namespace and found by ADL │ │ │ │ +856 friend inline bool │ │ │ │ +857 operator==(const __weak_count& __a, const __weak_count& __b) noexcept │ │ │ │ +858 { return __a._M_pi == __b._M_pi; } │ │ │ │ +859 │ │ │ │ +860 private: │ │ │ │ +861 friend class __shared_count<_Lp>; │ │ │ │ +862 │ │ │ │ +863 _Sp_counted_base<_Lp>* _M_pi; │ │ │ │ +864 }; │ │ │ │ +865 │ │ │ │ +866 // Now that __weak_count is defined we can define this constructor: │ │ │ │ +867 template<_Lock_policy _Lp> │ │ │ │ +868 inline │ │ │ │ +869 __shared_count<_Lp>::__shared_count(const __weak_count<_Lp>& __r) │ │ │ │ +870 : _M_pi(__r._M_pi) │ │ │ │ +871 { │ │ │ │ +872 if (_M_pi == nullptr || !_M_pi->_M_add_ref_lock_nothrow()) │ │ │ │ +873 __throw_bad_weak_ptr(); │ │ │ │ +874 } │ │ │ │ +875 │ │ │ │ +876 // Now that __weak_count is defined we can define this constructor: │ │ │ │ +877 template<_Lock_policy _Lp> │ │ │ │ +878 inline │ │ │ │ +879 __shared_count<_Lp>:: │ │ │ │ +880 __shared_count(const __weak_count<_Lp>& __r, std::nothrow_t) noexcept │ │ │ │ +881 : _M_pi(__r._M_pi) │ │ │ │ +882 { │ │ │ │ +883 if (_M_pi && !_M_pi->_M_add_ref_lock_nothrow()) │ │ │ │ +884 _M_pi = nullptr; │ │ │ │ +885 } │ │ │ │ +886 │ │ │ │ +887#define __cpp_lib_shared_ptr_arrays 201611L │ │ │ │ +888 │ │ │ │ +889 // Helper traits for shared_ptr of array: │ │ │ │ +890 │ │ │ │ +891 // A pointer type Y* is said to be compatible with a pointer type T* when │ │ │ │ +892 // either Y* is convertible to T* or Y is U[N] and T is U cv []. │ │ │ │ +893 template │ │ │ │ +894 struct __sp_compatible_with │ │ │ │ +895 : _f_a_l_s_e___t_y_p_e │ │ │ │ +896 { }; │ │ │ │ +897 │ │ │ │ +898 template │ │ │ │ +899 struct __sp_compatible_with<_Yp*, _Tp*> │ │ │ │ +900 : _i_s___c_o_n_v_e_r_t_i_b_l_e_<___Y_p_*_,_ ___T_p_*_>_:_:_t_y_p_e │ │ │ │ +901 { }; │ │ │ │ +902 │ │ │ │ +903 template │ │ │ │ +904 struct __sp_compatible_with<_Up(*)[_Nm], _Up(*)[]> │ │ │ │ +905 : _t_r_u_e___t_y_p_e │ │ │ │ +906 { }; │ │ │ │ +907 │ │ │ │ +908 template │ │ │ │ +909 struct __sp_compatible_with<_Up(*)[_Nm], const _Up(*)[]> │ │ │ │ +910 : _t_r_u_e___t_y_p_e │ │ │ │ +911 { }; │ │ │ │ +912 │ │ │ │ +913 template │ │ │ │ +914 struct __sp_compatible_with<_Up(*)[_Nm], volatile _Up(*)[]> │ │ │ │ +915 : _t_r_u_e___t_y_p_e │ │ │ │ +916 { }; │ │ │ │ +917 │ │ │ │ +918 template │ │ │ │ +919 struct __sp_compatible_with<_Up(*)[_Nm], const volatile _Up(*)[]> │ │ │ │ +920 : _t_r_u_e___t_y_p_e │ │ │ │ +921 { }; │ │ │ │ +922 │ │ │ │ +923 // Test conversion from Y(*)[N] to U(*)[N] without forming invalid type Y │ │ │ │ +[N]. │ │ │ │ +924 template │ │ │ │ +925 struct __sp_is_constructible_arrN │ │ │ │ +926 : _f_a_l_s_e___t_y_p_e │ │ │ │ +927 { }; │ │ │ │ +928 │ │ │ │ +929 template │ │ │ │ +930 struct __sp_is_constructible_arrN<_Up, _Nm, _Yp, __void_t<_Yp[_Nm]>> │ │ │ │ +931 : _i_s___c_o_n_v_e_r_t_i_b_l_e<_Yp(*)[_Nm], _Up(*)[_Nm]>::type │ │ │ │ +932 { }; │ │ │ │ +933 │ │ │ │ +934 // Test conversion from Y(*)[] to U(*)[] without forming invalid type Y[]. │ │ │ │ +935 template │ │ │ │ +936 struct __sp_is_constructible_arr │ │ │ │ +937 : _f_a_l_s_e___t_y_p_e │ │ │ │ +938 { }; │ │ │ │ +939 │ │ │ │ +940 template │ │ │ │ +941 struct __sp_is_constructible_arr<_Up, _Yp, __void_t<_Yp[]>> │ │ │ │ +942 : _i_s___c_o_n_v_e_r_t_i_b_l_e<_Yp(*)[], _Up(*)[]>::type │ │ │ │ +943 { }; │ │ │ │ +944 │ │ │ │ +945 // Trait to check if shared_ptr can be constructed from Y*. │ │ │ │ +946 template │ │ │ │ +947 struct __sp_is_constructible; │ │ │ │ +948 │ │ │ │ +949 // When T is U[N], Y(*)[N] shall be convertible to T*; │ │ │ │ +950 template │ │ │ │ +951 struct __sp_is_constructible<_Up[_Nm], _Yp> │ │ │ │ +952 : __sp_is_constructible_arrN<_Up, _Nm, _Yp>::type │ │ │ │ +953 { }; │ │ │ │ +954 │ │ │ │ +955 // when T is U[], Y(*)[] shall be convertible to T*; │ │ │ │ +956 template │ │ │ │ +957 struct __sp_is_constructible<_Up[], _Yp> │ │ │ │ +958 : __sp_is_constructible_arr<_Up, _Yp>::type │ │ │ │ +959 { }; │ │ │ │ +960 │ │ │ │ +961 // otherwise, Y* shall be convertible to T*. │ │ │ │ +962 template │ │ │ │ +963 struct __sp_is_constructible │ │ │ │ +964 : _i_s___c_o_n_v_e_r_t_i_b_l_e<_Yp*, _Tp*>::type │ │ │ │ +965 { }; │ │ │ │ +966 │ │ │ │ +967 │ │ │ │ +968 // Define operator* and operator-> for shared_ptr. │ │ │ │ +969 template::value, bool = _i_s___v_o_i_d_<___T_p_>_:_:_v_a_l_u_e> │ │ │ │ +971 class __shared_ptr_access │ │ │ │ +972 { │ │ │ │ +973 public: │ │ │ │ +974 using element_type = _Tp; │ │ │ │ +975 │ │ │ │ +976 element_type& │ │ │ │ +977 operator*() const noexcept │ │ │ │ +978 { │ │ │ │ +979 __glibcxx_assert(_M_get() != nullptr); │ │ │ │ +980 return *_M_get(); │ │ │ │ +981 } │ │ │ │ +982 │ │ │ │ +983 element_type* │ │ │ │ +984 operator->() const noexcept │ │ │ │ +985 { │ │ │ │ +986 _GLIBCXX_DEBUG_PEDASSERT(_M_get() != nullptr); │ │ │ │ +987 return _M_get(); │ │ │ │ +988 } │ │ │ │ +989 │ │ │ │ +990 private: │ │ │ │ +991 element_type* │ │ │ │ +992 _M_get() const noexcept │ │ │ │ +993 { return static_cast*>(this)->get(); } │ │ │ │ +994 }; │ │ │ │ +995 │ │ │ │ +996 // Define operator-> for shared_ptr. │ │ │ │ +997 template │ │ │ │ +998 class __shared_ptr_access<_Tp, _Lp, false, true> │ │ │ │ +999 { │ │ │ │ +1000 public: │ │ │ │ +1001 using element_type = _Tp; │ │ │ │ +1002 │ │ │ │ +1003 element_type* │ │ │ │ +1004 operator->() const noexcept │ │ │ │ +1005 { │ │ │ │ +1006 auto __ptr = static_cast*>(this)->get(); │ │ │ │ +1007 _GLIBCXX_DEBUG_PEDASSERT(__ptr != nullptr); │ │ │ │ +1008 return __ptr; │ │ │ │ +1009 } │ │ │ │ +1010 }; │ │ │ │ +1011 │ │ │ │ +1012 // Define operator[] for shared_ptr and shared_ptr. │ │ │ │ +1013 template │ │ │ │ +1014 class __shared_ptr_access<_Tp, _Lp, true, false> │ │ │ │ +1015 { │ │ │ │ +1016 public: │ │ │ │ +1017 using element_type = typename remove_extent<_Tp>::type; │ │ │ │ +1018 │ │ │ │ +1019#if __cplusplus <= 201402L │ │ │ │ +1020 [[__deprecated__("shared_ptr::operator* is absent from C++17")]] │ │ │ │ +1021 element_type& │ │ │ │ +1022 operator*() const noexcept │ │ │ │ +1023 { │ │ │ │ +1024 __glibcxx_assert(_M_get() != nullptr); │ │ │ │ +1025 return *_M_get(); │ │ │ │ +1026 } │ │ │ │ +1027 │ │ │ │ +1028 [[__deprecated__("shared_ptr::operator-> is absent from C++17")]] │ │ │ │ +1029 element_type* │ │ │ │ +1030 operator->() const noexcept │ │ │ │ +1031 { │ │ │ │ +1032 _GLIBCXX_DEBUG_PEDASSERT(_M_get() != nullptr); │ │ │ │ +1033 return _M_get(); │ │ │ │ +1034 } │ │ │ │ +1035#endif │ │ │ │ +1036 │ │ │ │ +1037 element_type& │ │ │ │ +1038 operator[](ptrdiff_t __i) const │ │ │ │ +1039 { │ │ │ │ +1040 __glibcxx_assert(_M_get() != nullptr); │ │ │ │ +1041 __glibcxx_assert(!extent<_Tp>::value || __i < extent<_Tp>::value); │ │ │ │ +1042 return _M_get()[__i]; │ │ │ │ +1043 } │ │ │ │ +1044 │ │ │ │ +1045 private: │ │ │ │ +1046 element_type* │ │ │ │ +1047 _M_get() const noexcept │ │ │ │ +1048 { return static_cast*>(this)->get(); } │ │ │ │ +1049 }; │ │ │ │ +1050 │ │ │ │ +1051 template │ │ │ │ +1052 class __shared_ptr │ │ │ │ +1053 : public __shared_ptr_access<_Tp, _Lp> │ │ │ │ +1054 { │ │ │ │ +1055 public: │ │ │ │ +1056 using element_type = typename remove_extent<_Tp>::type; │ │ │ │ +1057 │ │ │ │ +1058 private: │ │ │ │ +1059 // Constraint for taking ownership of a pointer of type _Yp*: │ │ │ │ +1060 template │ │ │ │ +1061 using _SafeConv │ │ │ │ +1062 = typename enable_if<__sp_is_constructible<_Tp, _Yp>::value>::type; │ │ │ │ +1063 │ │ │ │ +1064 // Constraint for construction from shared_ptr and weak_ptr: │ │ │ │ +1065 template │ │ │ │ +1066 using _Compatible = typename │ │ │ │ +1067 enable_if<__sp_compatible_with<_Yp*, _Tp*>::value, _Res>::type; │ │ │ │ +1068 │ │ │ │ +1069 // Constraint for assignment from shared_ptr and weak_ptr: │ │ │ │ +1070 template │ │ │ │ +1071 using _Assignable = _Compatible<_Yp, __shared_ptr&>; │ │ │ │ +1072 │ │ │ │ +1073 // Constraint for construction from unique_ptr: │ │ │ │ +1074 template::pointer> │ │ │ │ +1076 using _UniqCompatible = __enable_if_t<__and_< │ │ │ │ +1077 __sp_compatible_with<_Yp*, _Tp*>, │ │ │ │ +1078 is_convertible<_Ptr, element_type*>, │ │ │ │ +1079 is_move_constructible<_Del> │ │ │ │ +1080 >::value, _Res>; │ │ │ │ +1081 │ │ │ │ +1082 // Constraint for assignment from unique_ptr: │ │ │ │ +1083 template │ │ │ │ +1084 using _UniqAssignable = _UniqCompatible<_Yp, _Del, __shared_ptr&>; │ │ │ │ +1085 │ │ │ │ +1086 public: │ │ │ │ +1087 │ │ │ │ +1088#if __cplusplus > 201402L │ │ │ │ +1089 using weak_type = __weak_ptr<_Tp, _Lp>; │ │ │ │ +1090#endif │ │ │ │ +1091 │ │ │ │ +1092 constexpr __shared_ptr() noexcept │ │ │ │ +1093 : _M_ptr(0), _M_refcount() │ │ │ │ +1094 { } │ │ │ │ +1095 │ │ │ │ +1096 template> │ │ │ │ +1097 explicit │ │ │ │ +1098 __shared_ptr(_Yp* __p) │ │ │ │ +1099 : _M_ptr(__p), _M_refcount(__p, typename is_array<_Tp>::type()) │ │ │ │ +1100 { │ │ │ │ +1101 static_assert( !is_void<_Yp>::value, "incomplete type" ); │ │ │ │ +1102 static_assert( sizeof(_Yp) > 0, "incomplete type" ); │ │ │ │ +1103 _M_enable_shared_from_this_with(__p); │ │ │ │ +1104 } │ │ │ │ +1105 │ │ │ │ +1106 template> │ │ │ │ +1107 __shared_ptr(_Yp* __p, _Deleter __d) │ │ │ │ +1108 : _M_ptr(__p), _M_refcount(__p, std::_m_o_v_e(__d)) │ │ │ │ +1109 { │ │ │ │ +1110 static_assert(__is_invocable<_Deleter&, _Yp*&>::value, │ │ │ │ +1111 "deleter expression d(p) is well-formed"); │ │ │ │ +1112 _M_enable_shared_from_this_with(__p); │ │ │ │ +1113 } │ │ │ │ +1114 │ │ │ │ +1115 template> │ │ │ │ +1117 __shared_ptr(_Yp* __p, _Deleter __d, _Alloc __a) │ │ │ │ +1118 : _M_ptr(__p), _M_refcount(__p, std::_m_o_v_e(__d), std::_m_o_v_e(__a)) │ │ │ │ +1119 { │ │ │ │ +1120 static_assert(__is_invocable<_Deleter&, _Yp*&>::value, │ │ │ │ +1121 "deleter expression d(p) is well-formed"); │ │ │ │ +1122 _M_enable_shared_from_this_with(__p); │ │ │ │ +1123 } │ │ │ │ +1124 │ │ │ │ +1125 template │ │ │ │ +1126 __shared_ptr(nullptr_t __p, _Deleter __d) │ │ │ │ +1127 : _M_ptr(0), _M_refcount(__p, std::_m_o_v_e(__d)) │ │ │ │ +1128 { } │ │ │ │ +1129 │ │ │ │ +1130 template │ │ │ │ +1131 __shared_ptr(nullptr_t __p, _Deleter __d, _Alloc __a) │ │ │ │ +1132 : _M_ptr(0), _M_refcount(__p, std::_m_o_v_e(__d), std::_m_o_v_e(__a)) │ │ │ │ +1133 { } │ │ │ │ +1134 │ │ │ │ +1135 // Aliasing constructor │ │ │ │ +1136 template │ │ │ │ +1137 __shared_ptr(const __shared_ptr<_Yp, _Lp>& __r, │ │ │ │ +1138 element_type* __p) noexcept │ │ │ │ +1139 : _M_ptr(__p), _M_refcount(__r._M_refcount) // never throws │ │ │ │ +1140 { } │ │ │ │ +1141 │ │ │ │ +1142 // Aliasing constructor │ │ │ │ +1143 template │ │ │ │ +1144 __shared_ptr(__shared_ptr<_Yp, _Lp>&& __r, │ │ │ │ +1145 element_type* __p) noexcept │ │ │ │ +1146 : _M_ptr(__p), _M_refcount() │ │ │ │ +1147 { │ │ │ │ +1148 _M_refcount._M_swap(__r._M_refcount); │ │ │ │ +1149 __r._M_ptr = nullptr; │ │ │ │ +1150 } │ │ │ │ +1151 │ │ │ │ +1152 __shared_ptr(const __shared_ptr&) noexcept = default; │ │ │ │ +1153 __shared_ptr& operator=(const __shared_ptr&) noexcept = default; │ │ │ │ +1154 ~__shared_ptr() = default; │ │ │ │ +1155 │ │ │ │ +1156 template> │ │ │ │ +1157 __shared_ptr(const __shared_ptr<_Yp, _Lp>& __r) noexcept │ │ │ │ +1158 : _M_ptr(__r._M_ptr), _M_refcount(__r._M_refcount) │ │ │ │ +1159 { } │ │ │ │ +1160 │ │ │ │ +1161 __shared_ptr(__shared_ptr&& __r) noexcept │ │ │ │ +1162 : _M_ptr(__r._M_ptr), _M_refcount() │ │ │ │ +1163 { │ │ │ │ +1164 _M_refcount._M_swap(__r._M_refcount); │ │ │ │ +1165 __r._M_ptr = nullptr; │ │ │ │ +1166 } │ │ │ │ +1167 │ │ │ │ +1168 template> │ │ │ │ +1169 __shared_ptr(__shared_ptr<_Yp, _Lp>&& __r) noexcept │ │ │ │ +1170 : _M_ptr(__r._M_ptr), _M_refcount() │ │ │ │ +1171 { │ │ │ │ +1172 _M_refcount._M_swap(__r._M_refcount); │ │ │ │ +1173 __r._M_ptr = nullptr; │ │ │ │ +1174 } │ │ │ │ +1175 │ │ │ │ +1176 template> │ │ │ │ +1177 explicit __shared_ptr(const __weak_ptr<_Yp, _Lp>& __r) │ │ │ │ +1178 : _M_refcount(__r._M_refcount) // may throw │ │ │ │ +1179 { │ │ │ │ +1180 // It is now safe to copy __r._M_ptr, as │ │ │ │ +1181 // _M_refcount(__r._M_refcount) did not throw. │ │ │ │ +1182 _M_ptr = __r._M_ptr; │ │ │ │ +1183 } │ │ │ │ +1184 │ │ │ │ +1185 // If an exception is thrown this constructor has no effect. │ │ │ │ +1186 template> │ │ │ │ +1188 __shared_ptr(unique_ptr<_Yp, _Del>&& __r) │ │ │ │ +1189 : _M_ptr(__r.get()), _M_refcount() │ │ │ │ +1190 { │ │ │ │ +1191 auto __raw = __to_address(__r.get()); │ │ │ │ +1192 _M_refcount = __shared_count<_Lp>(_s_t_d_:_:_m_o_v_e(__r)); │ │ │ │ +1193 _M_enable_shared_from_this_with(__raw); │ │ │ │ +1194 } │ │ │ │ +1195 │ │ │ │ +1196#if __cplusplus <= 201402L && _GLIBCXX_USE_DEPRECATED │ │ │ │ +1197 protected: │ │ │ │ +1198 // If an exception is thrown this constructor has no effect. │ │ │ │ +1199 template>, is_array<_Tp1>, │ │ │ │ +1202 is_convertible::pointer, _Tp*> │ │ │ │ +1203 >::value, bool>::type = true> │ │ │ │ +1204 __shared_ptr(unique_ptr<_Tp1, _Del>&& __r, __sp_array_delete) │ │ │ │ +1205 : _M_ptr(__r.get()), _M_refcount() │ │ │ │ +1206 { │ │ │ │ +1207 auto __raw = __to_address(__r.get()); │ │ │ │ +1208 _M_refcount = __shared_count<_Lp>(_s_t_d_:_:_m_o_v_e(__r)); │ │ │ │ +1209 _M_enable_shared_from_this_with(__raw); │ │ │ │ +1210 } │ │ │ │ +1211 public: │ │ │ │ +1212#endif │ │ │ │ +1213 │ │ │ │ +1214#if _GLIBCXX_USE_DEPRECATED │ │ │ │ +1215#pragma GCC diagnostic push │ │ │ │ +1216#pragma GCC diagnostic ignored "-Wdeprecated-declarations" │ │ │ │ +1217 // Postcondition: use_count() == 1 and __r.get() == 0 │ │ │ │ +1218 template> │ │ │ │ +1219 __shared_ptr(auto_ptr<_Yp>&& __r); │ │ │ │ +1220#pragma GCC diagnostic pop │ │ │ │ +1221#endif │ │ │ │ +1222 │ │ │ │ +1223 constexpr __shared_ptr(nullptr_t) noexcept : __shared_ptr() { } │ │ │ │ +1224 │ │ │ │ +1225 template │ │ │ │ +1226 _Assignable<_Yp> │ │ │ │ +1227 operator=(const __shared_ptr<_Yp, _Lp>& __r) noexcept │ │ │ │ +1228 { │ │ │ │ +1229 _M_ptr = __r._M_ptr; │ │ │ │ +1230 _M_refcount = __r._M_refcount; // __shared_count::op= doesn't throw │ │ │ │ +1231 return *this; │ │ │ │ +1232 } │ │ │ │ +1233 │ │ │ │ +1234#if _GLIBCXX_USE_DEPRECATED │ │ │ │ +1235#pragma GCC diagnostic push │ │ │ │ +1236#pragma GCC diagnostic ignored "-Wdeprecated-declarations" │ │ │ │ +1237 template │ │ │ │ +1238 _Assignable<_Yp> │ │ │ │ +1239 operator=(auto_ptr<_Yp>&& __r) │ │ │ │ +1240 { │ │ │ │ +1241 __shared_ptr(_s_t_d_:_:_m_o_v_e(__r)).swap(*this); │ │ │ │ +1242 return *this; │ │ │ │ +1243 } │ │ │ │ +1244#pragma GCC diagnostic pop │ │ │ │ +1245#endif │ │ │ │ +1246 │ │ │ │ +1247 __shared_ptr& │ │ │ │ +1248 operator=(__shared_ptr&& __r) noexcept │ │ │ │ +1249 { │ │ │ │ +1250 __shared_ptr(_s_t_d_:_:_m_o_v_e(__r)).swap(*this); │ │ │ │ +1251 return *this; │ │ │ │ +1252 } │ │ │ │ +1253 │ │ │ │ +1254 template │ │ │ │ +1255 _Assignable<_Yp> │ │ │ │ +1256 operator=(__shared_ptr<_Yp, _Lp>&& __r) noexcept │ │ │ │ +1257 { │ │ │ │ +1258 __shared_ptr(_s_t_d_:_:_m_o_v_e(__r)).swap(*this); │ │ │ │ +1259 return *this; │ │ │ │ +1260 } │ │ │ │ +1261 │ │ │ │ +1262 template │ │ │ │ +1263 _UniqAssignable<_Yp, _Del> │ │ │ │ +1264 operator=(unique_ptr<_Yp, _Del>&& __r) │ │ │ │ +1265 { │ │ │ │ +1266 __shared_ptr(_s_t_d_:_:_m_o_v_e(__r)).swap(*this); │ │ │ │ +1267 return *this; │ │ │ │ +1268 } │ │ │ │ +1269 │ │ │ │ +1270 void │ │ │ │ +1271 reset() noexcept │ │ │ │ +1272 { __shared_ptr().swap(*this); } │ │ │ │ +1273 │ │ │ │ +1274 template │ │ │ │ +1275 _SafeConv<_Yp> │ │ │ │ +1276 reset(_Yp* __p) // _Yp must be complete. │ │ │ │ +1277 { │ │ │ │ +1278 // Catch self-reset errors. │ │ │ │ +1279 __glibcxx_assert(__p == nullptr || __p != _M_ptr); │ │ │ │ +1280 __shared_ptr(__p).swap(*this); │ │ │ │ +1281 } │ │ │ │ +1282 │ │ │ │ +1283 template │ │ │ │ +1284 _SafeConv<_Yp> │ │ │ │ +1285 reset(_Yp* __p, _Deleter __d) │ │ │ │ +1286 { __shared_ptr(__p, _s_t_d_:_:_m_o_v_e(__d)).swap(*this); } │ │ │ │ +1287 │ │ │ │ +1288 template │ │ │ │ +1289 _SafeConv<_Yp> │ │ │ │ +1290 reset(_Yp* __p, _Deleter __d, _Alloc __a) │ │ │ │ +1291 { __shared_ptr(__p, _s_t_d_:_:_m_o_v_e(__d), _s_t_d_:_:_m_o_v_e(__a)).swap(*this); } │ │ │ │ +1292 │ │ │ │ +1293 /// Return the stored pointer. │ │ │ │ +1294 element_type* │ │ │ │ +1295 get() const noexcept │ │ │ │ +1296 { return _M_ptr; } │ │ │ │ +1297 │ │ │ │ +1298 /// Return true if the stored pointer is not null. │ │ │ │ +1299 explicit operator bool() const noexcept │ │ │ │ +1300 { return _M_ptr != nullptr; } │ │ │ │ +1301 │ │ │ │ +1302 /// Return true if use_count() == 1. │ │ │ │ +1303 bool │ │ │ │ +1304 unique() const noexcept │ │ │ │ +1305 { return _M_refcount._M_unique(); } │ │ │ │ +1306 │ │ │ │ +1307 /// If *this owns a pointer, return the number of owners, otherwise zero. │ │ │ │ +1308 long │ │ │ │ +1309 use_count() const noexcept │ │ │ │ +1310 { return _M_refcount._M_get_use_count(); } │ │ │ │ +1311 │ │ │ │ +1312 /// Exchange both the owned pointer and the stored pointer. │ │ │ │ +1313 void │ │ │ │ +1314 swap(__shared_ptr<_Tp, _Lp>& __other) noexcept │ │ │ │ +1315 { │ │ │ │ +1316 _s_t_d_:_:_s_w_a_p(_M_ptr, __other._M_ptr); │ │ │ │ +1317 _M_refcount._M_swap(__other._M_refcount); │ │ │ │ +1318 } │ │ │ │ +1319 │ │ │ │ +1320 /** @brief Define an ordering based on ownership. │ │ │ │ +1321 * │ │ │ │ +1322 * This function defines a strict weak ordering between two shared_ptr │ │ │ │ +1323 * or weak_ptr objects, such that one object is less than the other │ │ │ │ +1324 * unless they share ownership of the same pointer, or are both empty. │ │ │ │ +1325 * @{ │ │ │ │ +1326 */ │ │ │ │ +1327 template │ │ │ │ +1328 bool │ │ │ │ +1329 owner_before(__shared_ptr<_Tp1, _Lp> const& __rhs) const noexcept │ │ │ │ +1330 { return _M_refcount._M_less(__rhs._M_refcount); } │ │ │ │ +1331 │ │ │ │ +1332 template │ │ │ │ +1333 bool │ │ │ │ +1334 owner_before(__weak_ptr<_Tp1, _Lp> const& __rhs) const noexcept │ │ │ │ +1335 { return _M_refcount._M_less(__rhs._M_refcount); } │ │ │ │ +1336 /// @} │ │ │ │ +1337 │ │ │ │ +1338 protected: │ │ │ │ +1339 // This constructor is non-standard, it is used by allocate_shared. │ │ │ │ +1340 template │ │ │ │ +1341 __shared_ptr(_Sp_alloc_shared_tag<_Alloc> __tag, _Args&&... __args) │ │ │ │ +1342 : _M_ptr(), _M_refcount(_M_ptr, __tag, std::_f_o_r_w_a_r_d<_Args>(__args)...) │ │ │ │ +1343 { _M_enable_shared_from_this_with(_M_ptr); } │ │ │ │ +1344 │ │ │ │ +1345 template │ │ │ │ +1347 friend __shared_ptr<_Tp1, _Lp1> │ │ │ │ +1348 __allocate_shared(const _Alloc& __a, _Args&&... __args); │ │ │ │ +1349 │ │ │ │ +1350 // This constructor is used by __weak_ptr::lock() and │ │ │ │ +1351 // shared_ptr::shared_ptr(const weak_ptr&, std::nothrow_t). │ │ │ │ +1352 __shared_ptr(const __weak_ptr<_Tp, _Lp>& __r, std::nothrow_t) noexcept │ │ │ │ +1353 : _M_refcount(__r._M_refcount, std::nothrow) │ │ │ │ +1354 { │ │ │ │ +1355 _M_ptr = _M_refcount._M_get_use_count() ? __r._M_ptr : nullptr; │ │ │ │ +1356 } │ │ │ │ +1357 │ │ │ │ +1358 friend class __weak_ptr<_Tp, _Lp>; │ │ │ │ +1359 │ │ │ │ +1360 private: │ │ │ │ +1361 │ │ │ │ +1362 template │ │ │ │ +1363 using __esft_base_t = decltype(__enable_shared_from_this_base( │ │ │ │ +1364 _s_t_d_:_:_d_e_c_l_v_a_l&>(), │ │ │ │ +1365 _s_t_d_:_:_d_e_c_l_v_a_l_<___Y_p_*_>())); │ │ │ │ +1366 │ │ │ │ +1367 // Detect an accessible and unambiguous enable_shared_from_this base. │ │ │ │ +1368 template │ │ │ │ +1369 struct __has_esft_base │ │ │ │ +1370 : _f_a_l_s_e___t_y_p_e { }; │ │ │ │ +1371 │ │ │ │ +1372 template │ │ │ │ +1373 struct __has_esft_base<_Yp, __void_t<__esft_base_t<_Yp>>> │ │ │ │ +1374 : __not_> { }; // No enable shared_from_this for arrays │ │ │ │ +1375 │ │ │ │ +1376 template::type> │ │ │ │ +1377 typename enable_if<__has_esft_base<_Yp2>::value>::type │ │ │ │ +1378 _M_enable_shared_from_this_with(_Yp* __p) noexcept │ │ │ │ +1379 { │ │ │ │ +1380 if (auto __base = __enable_shared_from_this_base(_M_refcount, __p)) │ │ │ │ +1381 _____b_a_s_e->_M_weak_assign(const_cast<_Yp2*>(__p), _M_refcount); │ │ │ │ +1382 } │ │ │ │ +1383 │ │ │ │ +1384 template::type> │ │ │ │ +1385 typename enable_if::value>::type │ │ │ │ +1386 _M_enable_shared_from_this_with(_Yp*) noexcept │ │ │ │ +1387 { } │ │ │ │ +1388 │ │ │ │ +1389 void* │ │ │ │ +1390 _M_get_deleter(const std::type_info& __ti) const noexcept │ │ │ │ +1391 { return _M_refcount._M_get_deleter(__ti); } │ │ │ │ +1392 │ │ │ │ +1393 template friend class __shared_ptr; │ │ │ │ +1394 template friend class __weak_ptr; │ │ │ │ +1395 │ │ │ │ +1396 template │ │ │ │ +1397 friend _Del* get_deleter(const __shared_ptr<_Tp1, _Lp1>&) noexcept; │ │ │ │ +1398 │ │ │ │ +1399 template │ │ │ │ +1400 friend _Del* get_deleter(const shared_ptr<_Tp1>&) noexcept; │ │ │ │ +1401 │ │ │ │ +1402 element_type* _M_ptr; // Contained pointer. │ │ │ │ +1403 __shared_count<_Lp> _M_refcount; // Reference counter. │ │ │ │ +1404 }; │ │ │ │ +1405 │ │ │ │ +1406 │ │ │ │ +1407 // 20.7.2.2.7 shared_ptr comparisons │ │ │ │ +1408 template │ │ │ │ +1409 inline bool │ │ │ │ +1410 operator==(const __shared_ptr<_Tp1, _Lp>& __a, │ │ │ │ +1411 const __shared_ptr<_Tp2, _Lp>& __b) noexcept │ │ │ │ +1412 { return __a.get() == __b.get(); } │ │ │ │ +1413 │ │ │ │ +1414 template │ │ │ │ +1415 inline bool │ │ │ │ +1416 operator==(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept │ │ │ │ +1417 { return !__a; } │ │ │ │ +1418 │ │ │ │ +1419#ifdef __cpp_lib_three_way_comparison │ │ │ │ +1420 template │ │ │ │ +1421 inline strong_ordering │ │ │ │ +1422 operator<=>(const __shared_ptr<_Tp, _Lp>& __a, │ │ │ │ +1423 const __shared_ptr<_Up, _Lp>& __b) noexcept │ │ │ │ +1424 { return compare_three_way()(__a.get(), __b.get()); } │ │ │ │ +1425 │ │ │ │ +1426 template │ │ │ │ +1427 inline strong_ordering │ │ │ │ +1428 operator<=>(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept │ │ │ │ +1429 { │ │ │ │ +1430 using pointer = typename __shared_ptr<_Tp, _Lp>::element_type*; │ │ │ │ +1431 return compare_three_way()(__a.get(), static_cast(nullptr)); │ │ │ │ +1432 } │ │ │ │ +1433#else │ │ │ │ +1434 template │ │ │ │ +1435 inline bool │ │ │ │ +1436 operator==(nullptr_t, const __shared_ptr<_Tp, _Lp>& __a) noexcept │ │ │ │ +1437 { return !__a; } │ │ │ │ +1438 │ │ │ │ +1439 template │ │ │ │ +1440 inline bool │ │ │ │ +1441 operator!=(const __shared_ptr<_Tp1, _Lp>& __a, │ │ │ │ +1442 const __shared_ptr<_Tp2, _Lp>& __b) noexcept │ │ │ │ +1443 { return __a.get() != __b.get(); } │ │ │ │ +1444 │ │ │ │ +1445 template │ │ │ │ +1446 inline bool │ │ │ │ +1447 operator!=(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept │ │ │ │ +1448 { return (bool)__a; } │ │ │ │ +1449 │ │ │ │ +1450 template │ │ │ │ +1451 inline bool │ │ │ │ +1452 operator!=(nullptr_t, const __shared_ptr<_Tp, _Lp>& __a) noexcept │ │ │ │ +1453 { return (bool)__a; } │ │ │ │ +1454 │ │ │ │ +1455 template │ │ │ │ +1456 inline bool │ │ │ │ +1457 operator<(const __shared_ptr<_Tp, _Lp>& __a, │ │ │ │ +1458 const __shared_ptr<_Up, _Lp>& __b) noexcept │ │ │ │ +1459 { │ │ │ │ +1460 using _Tp_elt = typename __shared_ptr<_Tp, _Lp>::element_type; │ │ │ │ +1461 using _Up_elt = typename __shared_ptr<_Up, _Lp>::element_type; │ │ │ │ +1462 using _Vp = typename _c_o_m_m_o_n___t_y_p_e_<___T_p___e_l_t_*_,_ ___U_p___e_l_t_*_>_:_:_t_y_p_e; │ │ │ │ +1463 return _l_e_s_s_<___V_p_>()(__a.get(), __b.get()); │ │ │ │ +1464 } │ │ │ │ +1465 │ │ │ │ +1466 template │ │ │ │ +1467 inline bool │ │ │ │ +1468 operator<(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept │ │ │ │ +1469 { │ │ │ │ +1470 using _Tp_elt = typename __shared_ptr<_Tp, _Lp>::element_type; │ │ │ │ +1471 return _l_e_s_s_<___T_p___e_l_t_*_>()(__a.get(), nullptr); │ │ │ │ +1472 } │ │ │ │ +1473 │ │ │ │ +1474 template │ │ │ │ +1475 inline bool │ │ │ │ +1476 operator<(nullptr_t, const __shared_ptr<_Tp, _Lp>& __a) noexcept │ │ │ │ +1477 { │ │ │ │ +1478 using _Tp_elt = typename __shared_ptr<_Tp, _Lp>::element_type; │ │ │ │ +1479 return _l_e_s_s_<___T_p___e_l_t_*_>()(nullptr, __a.get()); │ │ │ │ +1480 } │ │ │ │ +1481 │ │ │ │ +1482 template │ │ │ │ +1483 inline bool │ │ │ │ +1484 operator<=(const __shared_ptr<_Tp1, _Lp>& __a, │ │ │ │ +1485 const __shared_ptr<_Tp2, _Lp>& __b) noexcept │ │ │ │ +1486 { return !(__b < __a); } │ │ │ │ +1487 │ │ │ │ +1488 template │ │ │ │ +1489 inline bool │ │ │ │ +1490 operator<=(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept │ │ │ │ +1491 { return !(nullptr < __a); } │ │ │ │ +1492 │ │ │ │ +1493 template │ │ │ │ +1494 inline bool │ │ │ │ +1495 operator<=(nullptr_t, const __shared_ptr<_Tp, _Lp>& __a) noexcept │ │ │ │ +1496 { return !(__a < nullptr); } │ │ │ │ +1497 │ │ │ │ +1498 template │ │ │ │ +1499 inline bool │ │ │ │ +1500 operator>(const __shared_ptr<_Tp1, _Lp>& __a, │ │ │ │ +1501 const __shared_ptr<_Tp2, _Lp>& __b) noexcept │ │ │ │ +1502 { return (__b < __a); } │ │ │ │ +1503 │ │ │ │ +1504 template │ │ │ │ +1505 inline bool │ │ │ │ +1506 operator>(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept │ │ │ │ +1507 { return nullptr < __a; } │ │ │ │ +1508 │ │ │ │ +1509 template │ │ │ │ +1510 inline bool │ │ │ │ +1511 operator>(nullptr_t, const __shared_ptr<_Tp, _Lp>& __a) noexcept │ │ │ │ +1512 { return __a < nullptr; } │ │ │ │ +1513 │ │ │ │ +1514 template │ │ │ │ +1515 inline bool │ │ │ │ +1516 operator>=(const __shared_ptr<_Tp1, _Lp>& __a, │ │ │ │ +1517 const __shared_ptr<_Tp2, _Lp>& __b) noexcept │ │ │ │ +1518 { return !(__a < __b); } │ │ │ │ +1519 │ │ │ │ +1520 template │ │ │ │ +1521 inline bool │ │ │ │ +1522 operator>=(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept │ │ │ │ +1523 { return !(__a < nullptr); } │ │ │ │ +1524 │ │ │ │ +1525 template │ │ │ │ +1526 inline bool │ │ │ │ +1527 operator>=(nullptr_t, const __shared_ptr<_Tp, _Lp>& __a) noexcept │ │ │ │ +1528 { return !(nullptr < __a); } │ │ │ │ +1529#endif // three-way comparison │ │ │ │ +1530 │ │ │ │ +1531 // 20.7.2.2.8 shared_ptr specialized algorithms. │ │ │ │ +1532 template │ │ │ │ +1533 inline void │ │ │ │ +1534 _s_w_a_p(__shared_ptr<_Tp, _Lp>& __a, __shared_ptr<_Tp, _Lp>& __b) noexcept │ │ │ │ +1535 { __a.swap(__b); } │ │ │ │ +1536 │ │ │ │ +1537 // 20.7.2.2.9 shared_ptr casts │ │ │ │ +1538 │ │ │ │ +1539 // The seemingly equivalent code: │ │ │ │ +1540 // shared_ptr<_Tp, _Lp>(static_cast<_Tp*>(__r.get())) │ │ │ │ +1541 // will eventually result in undefined behaviour, attempting to │ │ │ │ +1542 // delete the same object twice. │ │ │ │ +1543 /// static_pointer_cast │ │ │ │ +1544 template │ │ │ │ +1545 inline __shared_ptr<_Tp, _Lp> │ │ │ │ +_1_5_4_6 _s_t_a_t_i_c___p_o_i_n_t_e_r___c_a_s_t(const __shared_ptr<_Tp1, _Lp>& __r) noexcept │ │ │ │ +1547 { │ │ │ │ +1548 using _Sp = __shared_ptr<_Tp, _Lp>; │ │ │ │ +1549 return _Sp(__r, static_cast(__r.get())); │ │ │ │ +1550 } │ │ │ │ +1551 │ │ │ │ +1552 // The seemingly equivalent code: │ │ │ │ +1553 // shared_ptr<_Tp, _Lp>(const_cast<_Tp*>(__r.get())) │ │ │ │ +1554 // will eventually result in undefined behaviour, attempting to │ │ │ │ +1555 // delete the same object twice. │ │ │ │ +1556 /// const_pointer_cast │ │ │ │ +1557 template │ │ │ │ +1558 inline __shared_ptr<_Tp, _Lp> │ │ │ │ +_1_5_5_9 _c_o_n_s_t___p_o_i_n_t_e_r___c_a_s_t(const __shared_ptr<_Tp1, _Lp>& __r) noexcept │ │ │ │ +1560 { │ │ │ │ +1561 using _Sp = __shared_ptr<_Tp, _Lp>; │ │ │ │ +1562 return _Sp(__r, const_cast(__r.get())); │ │ │ │ +1563 } │ │ │ │ +1564 │ │ │ │ +1565 // The seemingly equivalent code: │ │ │ │ +1566 // shared_ptr<_Tp, _Lp>(dynamic_cast<_Tp*>(__r.get())) │ │ │ │ +1567 // will eventually result in undefined behaviour, attempting to │ │ │ │ +1568 // delete the same object twice. │ │ │ │ +1569 /// dynamic_pointer_cast │ │ │ │ +1570 template │ │ │ │ +1571 inline __shared_ptr<_Tp, _Lp> │ │ │ │ +_1_5_7_2 _d_y_n_a_m_i_c___p_o_i_n_t_e_r___c_a_s_t(const __shared_ptr<_Tp1, _Lp>& __r) noexcept │ │ │ │ +1573 { │ │ │ │ +1574 using _Sp = __shared_ptr<_Tp, _Lp>; │ │ │ │ +1575 if (auto* __p = dynamic_cast(__r.get())) │ │ │ │ +1576 return _Sp(__r, __p); │ │ │ │ +1577 return _Sp(); │ │ │ │ +1578 } │ │ │ │ +1579 │ │ │ │ +1580#if __cplusplus > 201402L │ │ │ │ +1581 template │ │ │ │ +1582 inline __shared_ptr<_Tp, _Lp> │ │ │ │ +1583 reinterpret_pointer_cast(const __shared_ptr<_Tp1, _Lp>& __r) noexcept │ │ │ │ +1584 { │ │ │ │ +1585 using _Sp = __shared_ptr<_Tp, _Lp>; │ │ │ │ +1586 return _Sp(__r, reinterpret_cast(__r.get())); │ │ │ │ +1587 } │ │ │ │ +1588#endif │ │ │ │ +1589 │ │ │ │ +1590 template │ │ │ │ +1591 class __weak_ptr │ │ │ │ +1592 { │ │ │ │ +1593 template │ │ │ │ +1594 using _Compatible = typename │ │ │ │ +1595 enable_if<__sp_compatible_with<_Yp*, _Tp*>::value, _Res>::type; │ │ │ │ +1596 │ │ │ │ +1597 // Constraint for assignment from shared_ptr and weak_ptr: │ │ │ │ +1598 template │ │ │ │ +1599 using _Assignable = _Compatible<_Yp, __weak_ptr&>; │ │ │ │ +1600 │ │ │ │ +1601 public: │ │ │ │ +1602 using element_type = typename remove_extent<_Tp>::type; │ │ │ │ +1603 │ │ │ │ +1604 constexpr __weak_ptr() noexcept │ │ │ │ +1605 : _M_ptr(nullptr), _M_refcount() │ │ │ │ +1606 { } │ │ │ │ +1607 │ │ │ │ +1608 __weak_ptr(const __weak_ptr&) noexcept = default; │ │ │ │ +1609 │ │ │ │ +1610 ~__weak_ptr() = default; │ │ │ │ +1611 │ │ │ │ +1612 // The "obvious" converting constructor implementation: │ │ │ │ +1613 // │ │ │ │ +1614 // template │ │ │ │ +1615 // __weak_ptr(const __weak_ptr<_Tp1, _Lp>& __r) │ │ │ │ +1616 // : _M_ptr(__r._M_ptr), _M_refcount(__r._M_refcount) // never throws │ │ │ │ +1617 // { } │ │ │ │ +1618 // │ │ │ │ +1619 // has a serious problem. │ │ │ │ +1620 // │ │ │ │ +1621 // __r._M_ptr may already have been invalidated. The _M_ptr(__r._M_ptr) │ │ │ │ +1622 // conversion may require access to *__r._M_ptr (virtual inheritance). │ │ │ │ +1623 // │ │ │ │ +1624 // It is not possible to avoid spurious access violations since │ │ │ │ +1625 // in multithreaded programs __r._M_ptr may be invalidated at any point. │ │ │ │ +1626 template> │ │ │ │ +1627 __weak_ptr(const __weak_ptr<_Yp, _Lp>& __r) noexcept │ │ │ │ +1628 : _M_refcount(__r._M_refcount) │ │ │ │ +1629 { _M_ptr = __r.lock().get(); } │ │ │ │ +1630 │ │ │ │ +1631 template> │ │ │ │ +1632 __weak_ptr(const __shared_ptr<_Yp, _Lp>& __r) noexcept │ │ │ │ +1633 : _M_ptr(__r._M_ptr), _M_refcount(__r._M_refcount) │ │ │ │ +1634 { } │ │ │ │ +1635 │ │ │ │ +1636 __weak_ptr(__weak_ptr&& __r) noexcept │ │ │ │ +1637 : _M_ptr(__r._M_ptr), _M_refcount(_s_t_d_:_:_m_o_v_e(__r._M_refcount)) │ │ │ │ +1638 { __r._M_ptr = nullptr; } │ │ │ │ +1639 │ │ │ │ +1640 template> │ │ │ │ +1641 __weak_ptr(__weak_ptr<_Yp, _Lp>&& __r) noexcept │ │ │ │ +1642 : _M_ptr(__r.lock().get()), _M_refcount(_s_t_d_:_:_m_o_v_e(__r._M_refcount)) │ │ │ │ +1643 { __r._M_ptr = nullptr; } │ │ │ │ +1644 │ │ │ │ +1645 __weak_ptr& │ │ │ │ +1646 operator=(const __weak_ptr& __r) noexcept = default; │ │ │ │ +1647 │ │ │ │ +1648 template │ │ │ │ +1649 _Assignable<_Yp> │ │ │ │ +1650 operator=(const __weak_ptr<_Yp, _Lp>& __r) noexcept │ │ │ │ +1651 { │ │ │ │ +1652 _M_ptr = __r.lock().get(); │ │ │ │ +1653 _M_refcount = __r._M_refcount; │ │ │ │ +1654 return *this; │ │ │ │ +1655 } │ │ │ │ +1656 │ │ │ │ +1657 template │ │ │ │ +1658 _Assignable<_Yp> │ │ │ │ +1659 operator=(const __shared_ptr<_Yp, _Lp>& __r) noexcept │ │ │ │ +1660 { │ │ │ │ +1661 _M_ptr = __r._M_ptr; │ │ │ │ +1662 _M_refcount = __r._M_refcount; │ │ │ │ +1663 return *this; │ │ │ │ +1664 } │ │ │ │ +1665 │ │ │ │ +1666 __weak_ptr& │ │ │ │ +1667 operator=(__weak_ptr&& __r) noexcept │ │ │ │ +1668 { │ │ │ │ +1669 __weak_ptr(_s_t_d_:_:_m_o_v_e(__r)).swap(*this); │ │ │ │ +1670 return *this; │ │ │ │ +1671 } │ │ │ │ +1672 │ │ │ │ +1673 template │ │ │ │ +1674 _Assignable<_Yp> │ │ │ │ +1675 operator=(__weak_ptr<_Yp, _Lp>&& __r) noexcept │ │ │ │ +1676 { │ │ │ │ +1677 _M_ptr = __r.lock().get(); │ │ │ │ +1678 _M_refcount = _s_t_d_:_:_m_o_v_e(__r._M_refcount); │ │ │ │ +1679 __r._M_ptr = nullptr; │ │ │ │ +1680 return *this; │ │ │ │ +1681 } │ │ │ │ +1682 │ │ │ │ +1683 __shared_ptr<_Tp, _Lp> │ │ │ │ +1684 lock() const noexcept │ │ │ │ +1685 { return __shared_ptr(*this, std::nothrow); } │ │ │ │ +1686 │ │ │ │ +1687 long │ │ │ │ +1688 use_count() const noexcept │ │ │ │ +1689 { return _M_refcount._M_get_use_count(); } │ │ │ │ +1690 │ │ │ │ +1691 bool │ │ │ │ +1692 expired() const noexcept │ │ │ │ +1693 { return _M_refcount._M_get_use_count() == 0; } │ │ │ │ +1694 │ │ │ │ +1695 template │ │ │ │ +1696 bool │ │ │ │ +1697 owner_before(const __shared_ptr<_Tp1, _Lp>& __rhs) const noexcept │ │ │ │ +1698 { return _M_refcount._M_less(__rhs._M_refcount); } │ │ │ │ +1699 │ │ │ │ +1700 template │ │ │ │ +1701 bool │ │ │ │ +1702 owner_before(const __weak_ptr<_Tp1, _Lp>& __rhs) const noexcept │ │ │ │ +1703 { return _M_refcount._M_less(__rhs._M_refcount); } │ │ │ │ +1704 │ │ │ │ +1705 void │ │ │ │ +1706 reset() noexcept │ │ │ │ +1707 { __weak_ptr().swap(*this); } │ │ │ │ +1708 │ │ │ │ +1709 void │ │ │ │ +1710 swap(__weak_ptr& __s) noexcept │ │ │ │ +1711 { │ │ │ │ +1712 _s_t_d_:_:_s_w_a_p(_M_ptr, __s._M_ptr); │ │ │ │ +1713 _M_refcount._M_swap(__s._M_refcount); │ │ │ │ +1714 } │ │ │ │ +1715 │ │ │ │ +1716 private: │ │ │ │ +1717 // Used by __enable_shared_from_this. │ │ │ │ +1718 void │ │ │ │ +1719 _M_assign(_Tp* __ptr, const __shared_count<_Lp>& __refcount) noexcept │ │ │ │ +1720 { │ │ │ │ +1721 if (use_count() == 0) │ │ │ │ +1722 { │ │ │ │ +1723 _M_ptr = __ptr; │ │ │ │ +1724 _M_refcount = __refcount; │ │ │ │ +1725 } │ │ │ │ +1726 } │ │ │ │ +1727 │ │ │ │ +1728 template friend class __shared_ptr; │ │ │ │ +1729 template friend class __weak_ptr; │ │ │ │ +1730 friend class __enable_shared_from_this<_Tp, _Lp>; │ │ │ │ +1731 friend class enable_shared_from_this<_Tp>; │ │ │ │ +1732 │ │ │ │ +1733 element_type* _M_ptr; // Contained pointer. │ │ │ │ +1734 __weak_count<_Lp> _M_refcount; // Reference counter. │ │ │ │ +1735 }; │ │ │ │ +1736 │ │ │ │ +1737 // 20.7.2.3.6 weak_ptr specialized algorithms. │ │ │ │ +1738 template │ │ │ │ +1739 inline void │ │ │ │ +1740 _s_w_a_p(__weak_ptr<_Tp, _Lp>& __a, __weak_ptr<_Tp, _Lp>& __b) noexcept │ │ │ │ +1741 { __a.swap(__b); } │ │ │ │ +1742 │ │ │ │ +1743 template │ │ │ │ +1744 struct _Sp_owner_less : public _b_i_n_a_r_y___f_u_n_c_t_i_o_n<_Tp, _Tp, bool> │ │ │ │ +1745 { │ │ │ │ +1746 bool │ │ │ │ +1747 operator()(const _Tp& __lhs, const _Tp& __rhs) const noexcept │ │ │ │ +1748 { return __lhs.owner_before(__rhs); } │ │ │ │ +1749 │ │ │ │ +1750 bool │ │ │ │ +1751 operator()(const _Tp& __lhs, const _Tp1& __rhs) const noexcept │ │ │ │ +1752 { return __lhs.owner_before(__rhs); } │ │ │ │ +1753 │ │ │ │ +1754 bool │ │ │ │ +1755 operator()(const _Tp1& __lhs, const _Tp& __rhs) const noexcept │ │ │ │ +1756 { return __lhs.owner_before(__rhs); } │ │ │ │ +1757 }; │ │ │ │ +1758 │ │ │ │ +1759 template<> │ │ │ │ +1760 struct _Sp_owner_less │ │ │ │ +1761 { │ │ │ │ +1762 template │ │ │ │ +1763 auto │ │ │ │ +1764 operator()(const _Tp& __lhs, const _Up& __rhs) const noexcept │ │ │ │ +1765 -> decltype(__lhs.owner_before(__rhs)) │ │ │ │ +1766 { return __lhs.owner_before(__rhs); } │ │ │ │ +1767 │ │ │ │ +1768 using is_transparent = void; │ │ │ │ +1769 }; │ │ │ │ +1770 │ │ │ │ +1771 template │ │ │ │ +1772 struct _o_w_n_e_r___l_e_s_s<__shared_ptr<_Tp, _Lp>> │ │ │ │ +1773 : public _Sp_owner_less<__shared_ptr<_Tp, _Lp>, __weak_ptr<_Tp, _Lp>> │ │ │ │ +1774 { }; │ │ │ │ +1775 │ │ │ │ +1776 template │ │ │ │ +1777 struct _o_w_n_e_r___l_e_s_s<__weak_ptr<_Tp, _Lp>> │ │ │ │ +1778 : public _Sp_owner_less<__weak_ptr<_Tp, _Lp>, __shared_ptr<_Tp, _Lp>> │ │ │ │ +1779 { }; │ │ │ │ +1780 │ │ │ │ +1781 │ │ │ │ +1782 template │ │ │ │ +1783 class __enable_shared_from_this │ │ │ │ +1784 { │ │ │ │ +1785 protected: │ │ │ │ +1786 constexpr __enable_shared_from_this() noexcept { } │ │ │ │ +1787 │ │ │ │ +1788 __enable_shared_from_this(const __enable_shared_from_this&) noexcept { } │ │ │ │ +1789 │ │ │ │ +1790 __enable_shared_from_this& │ │ │ │ +1791 operator=(const __enable_shared_from_this&) noexcept │ │ │ │ +1792 { return *this; } │ │ │ │ +1793 │ │ │ │ +1794 ~__enable_shared_from_this() { } │ │ │ │ +1795 │ │ │ │ +1796 public: │ │ │ │ +1797 __shared_ptr<_Tp, _Lp> │ │ │ │ +1798 shared_from_this() │ │ │ │ +1799 { return __shared_ptr<_Tp, _Lp>(this->_M_weak_this); } │ │ │ │ +1800 │ │ │ │ +1801 __shared_ptr │ │ │ │ +1802 shared_from_this() const │ │ │ │ +1803 { return __shared_ptr(this->_M_weak_this); } │ │ │ │ +1804 │ │ │ │ +1805#if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11 │ │ │ │ +1806 __weak_ptr<_Tp, _Lp> │ │ │ │ +1807 weak_from_this() noexcept │ │ │ │ +1808 { return this->_M_weak_this; } │ │ │ │ +1809 │ │ │ │ +1810 __weak_ptr │ │ │ │ +1811 weak_from_this() const noexcept │ │ │ │ +1812 { return this->_M_weak_this; } │ │ │ │ +1813#endif │ │ │ │ +1814 │ │ │ │ +1815 private: │ │ │ │ +1816 template │ │ │ │ +1817 void │ │ │ │ +1818 _M_weak_assign(_Tp1* __p, const __shared_count<_Lp>& __n) const noexcept │ │ │ │ +1819 { _M_weak_this._M_assign(__p, __n); } │ │ │ │ +1820 │ │ │ │ +1821 friend const __enable_shared_from_this* │ │ │ │ +1822 __enable_shared_from_this_base(const __shared_count<_Lp>&, │ │ │ │ +1823 const __enable_shared_from_this* __p) │ │ │ │ +1824 { return __p; } │ │ │ │ +1825 │ │ │ │ +1826 template │ │ │ │ +1827 friend class __shared_ptr; │ │ │ │ +1828 │ │ │ │ +1829 mutable __weak_ptr<_Tp, _Lp> _M_weak_this; │ │ │ │ +1830 }; │ │ │ │ +1831 │ │ │ │ +1832 template │ │ │ │ +1834 inline __shared_ptr<_Tp, _Lp> │ │ │ │ +1835 __allocate_shared(const _Alloc& __a, _Args&&... __args) │ │ │ │ +1836 { │ │ │ │ +1837 static_assert(!is_array<_Tp>::value, "make_shared not supported"); │ │ │ │ +1838 │ │ │ │ +1839 return __shared_ptr<_Tp, _Lp>(_Sp_alloc_shared_tag<_Alloc>{__a}, │ │ │ │ +1840 _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(__args)...); │ │ │ │ +1841 } │ │ │ │ +1842 │ │ │ │ +1843 template │ │ │ │ +1845 inline __shared_ptr<_Tp, _Lp> │ │ │ │ +1846 __make_shared(_Args&&... __args) │ │ │ │ +1847 { │ │ │ │ +1848 typedef typename std::remove_const<_Tp>::type _Tp_nc; │ │ │ │ +1849 return std::__allocate_shared<_Tp, _Lp>(std::allocator<_Tp_nc>(), │ │ │ │ +1850 _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(__args)...); │ │ │ │ +1851 } │ │ │ │ +1852 │ │ │ │ +1853 /// std::hash specialization for __shared_ptr. │ │ │ │ +1854 template │ │ │ │ +_1_8_5_5 struct _h_a_s_h<__shared_ptr<_Tp, _Lp>> │ │ │ │ +1856 : public __hash_base> │ │ │ │ +1857 { │ │ │ │ +1858 size_t │ │ │ │ +1859 operator()(const __shared_ptr<_Tp, _Lp>& __s) const noexcept │ │ │ │ +1860 { │ │ │ │ +1861 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*>()( │ │ │ │ +1862 __s.get()); │ │ │ │ +1863 } │ │ │ │ +1864 }; │ │ │ │ +1865 │ │ │ │ +1866_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ +1867} // namespace │ │ │ │ +1868 │ │ │ │ +1869#endif // _SHARED_PTR_BASE_H │ │ │ │ +_c_o_m_p_a_r_e │ │ │ │ +_t_y_p_e_i_n_f_o │ │ │ │ +_f_u_n_c_t_i_o_n_a_l___h_a_s_h_._h │ │ │ │ +_s_t_l___f_u_n_c_t_i_o_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_:_:_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_3 │ │ │ │ +_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_6 │ │ │ │ +_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_5_6 │ │ │ │ +_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_8 │ │ │ │ +_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 │ │ │ │ ISO C++ entities toplevel namespace is std. │ │ │ │ -_s_t_d_:_:_____d_e_t_a_i_l │ │ │ │ -Implementation details not part of the namespace std interface. │ │ │ │ -_____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_6 │ │ │ │ -_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_:_3_9_4 │ │ │ │ +_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_5_7_2 │ │ │ │ +_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_5_4_6 │ │ │ │ +_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_5_5_9 │ │ │ │ +_____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_5 │ │ │ │ +_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_s___v_o_i_d │ │ │ │ +is_void │ │ │ │ +DDeeffiinniittiioonn _t_y_p_e___t_r_a_i_t_s_:_2_7_2 │ │ │ │ +_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_5_8 │ │ │ │ _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_2_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 │ │ │ │ -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 │ │ │ │ -_n_u_m_e_r_i_c___t_r_a_i_t_s_._h │ │ │ │ +_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_:_:_o_w_n_e_r___l_e_s_s │ │ │ │ +Primary template owner_less. │ │ │ │ +DDeeffiinniittiioonn _b_i_t_s_/_s_h_a_r_e_d___p_t_r_._h_:_7_6_9 │ │ │ │ +_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_3 │ │ │ │ +_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_:_:_b_i_n_a_r_y___f_u_n_c_t_i_o_n │ │ │ │ +DDeeffiinniittiioonn _s_t_l___f_u_n_c_t_i_o_n_._h_:_1_3_2 │ │ │ │ +_s_t_d_:_:_l_e_s_s │ │ │ │ +One of the comparison functors. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___f_u_n_c_t_i_o_n_._h_:_3_9_6 │ │ │ │ +_s_t_d_:_:_a_u_t_o___p_t_r │ │ │ │ +A simple smart pointer providing strict ownership semantics. │ │ │ │ +DDeeffiinniittiioonn _a_u_t_o___p_t_r_._h_:_9_0 │ │ │ │ * bbiittss │ │ │ │ - * _u_n_i_f_o_r_m___i_n_t___d_i_s_t_._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.15.0 │ │ ├── ./usr/share/doc/gcc-11-base/libstdc++/user/a00386.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: stringfwd.h File Reference │ │ │ +libstdc++: atomic_wait.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -48,47 +48,94 @@ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
stringfwd.h File Reference
│ │ │ +
atomic_wait.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │

Go to the source code of this file.

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

│ │ │ Namespaces

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

│ │ │ +Macros

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

│ │ │ Typedefs

typedef basic_string< char > std::string
typedef basic_string< char16_t > std::u16string
typedef basic_string< char32_t > std::u32string
typedef basic_string< wchar_t > std::wstring
using std::__detail::__bare_wait
using std::__detail::__enters_wait
using std::__detail::__platform_wait_t
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +

│ │ │ +Functions

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
static 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 <string>.

│ │ │ +

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

│ │ │ + │ │ │ +

Definition in file atomic_wait.h.

│ │ │ +

Macro Definition Documentation

│ │ │ + │ │ │ +

◆ __cpp_lib_atomic_wait

│ │ │ │ │ │ -

Definition in file stringfwd.h.

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

Definition at line 51 of file atomic_wait.h.

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ +
│ │ │
│ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,17 +1,49 @@ │ │ │ │ libstdc++ │ │ │ │ -stringfwd.h File Reference │ │ │ │ +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  _____c_p_p___l_i_b___a_t_o_m_i_c___w_a_i_t │ │ │ │ TTyyppeeddeeffss │ │ │ │ - typedef _b_a_s_i_c___s_t_r_i_n_g< char >  _s_t_d_:_:_s_t_r_i_n_g │ │ │ │ -typedef _b_a_s_i_c___s_t_r_i_n_g< char16_t >  _s_t_d_:_:_u_1_6_s_t_r_i_n_g │ │ │ │ -typedef _b_a_s_i_c___s_t_r_i_n_g< char32_t >  _s_t_d_:_:_u_3_2_s_t_r_i_n_g │ │ │ │ - typedef _b_a_s_i_c___s_t_r_i_n_g< wchar_t >  _s_t_d_:_:_w_s_t_r_i_n_g │ │ │ │ +using  _s_t_d_:_:_____d_e_t_a_i_l_:_:_____b_a_r_e___w_a_i_t │ │ │ │ +using  _s_t_d_:_:_____d_e_t_a_i_l_:_:_____e_n_t_e_r_s___w_a_i_t │ │ │ │ +using  _s_t_d_:_:_____d_e_t_a_i_l_:_:_____p_l_a_t_f_o_r_m___w_a_i_t___t │ │ │ │ +FFuunnccttiioonnss │ │ │ │ +template │ │ │ │ +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 │ │ │ │ +void  _s_t_d_:_:_____a_t_o_m_i_c___n_o_t_i_f_y___a_d_d_r_e_s_s (const _Tp *__addr, bool __all) noexcept │ │ │ │ +void  _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 │ │ │ │ + *__addr, bool __all) noexcept │ │ │ │ +template │ │ │ │ +bool  _s_t_d_:_:_____d_e_t_a_i_l_:_:_____a_t_o_m_i_c___s_p_i_n (_Pred &__pred, _Spin __spin=_Spin{ }) │ │ │ │ + noexcept │ │ │ │ +template │ │ │ │ +void  _s_t_d_:_:_____a_t_o_m_i_c___w_a_i_t___a_d_d_r_e_s_s (const _Tp *__addr, _Pred __pred) noexcept │ │ │ │ +template │ │ │ │ +void  _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 │ │ │ │ + *__addr, _Pred __pred) noexcept │ │ │ │ +template │ │ │ │ +void  _s_t_d_:_:_____a_t_o_m_i_c___w_a_i_t___a_d_d_r_e_s_s___v (const _Tp *__addr, _Tp __old, _ValFn __vfn) │ │ │ │ + noexcept │ │ │ │ +void  _s_t_d_:_:_____d_e_t_a_i_l_:_:_____t_h_r_e_a_d___r_e_l_a_x () noexcept │ │ │ │ +void  _s_t_d_:_:_____d_e_t_a_i_l_:_:_____t_h_r_e_a_d___y_i_e_l_d () noexcept │ │ │ │ +VVaarriiaabblleess │ │ │ │ + constexpr auto  _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 auto  _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 │ │ │ │ +static 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 │ │ │ │ + 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_i_n_g_f_w_d_._h. │ │ │ │ +attempt to use it directly. Instead, include . │ │ │ │ +Definition in file _a_t_o_m_i_c___w_a_i_t_._h. │ │ │ │ +********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ +********** _?◆_? ____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. │ │ │ │ * bbiittss │ │ │ │ - * _s_t_r_i_n_g_f_w_d_._h │ │ │ │ + * _a_t_o_m_i_c___w_a_i_t_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.15.0 │ │ ├── ./usr/share/doc/gcc-11-base/libstdc++/user/a00386_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: stringfwd.h Source File │ │ │ +libstdc++: atomic_wait.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -48,20 +48,20 @@ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
stringfwd.h
│ │ │ +
atomic_wait.h
│ │ │
│ │ │
│ │ │ -Go to the documentation of this file.
1// <string> Forward declarations -*- C++ -*-
│ │ │ +Go to the documentation of this file.
1// -*- C++ -*- header.
│ │ │
2
│ │ │ -
3// Copyright (C) 2001-2021 Free Software Foundation, Inc.
│ │ │ +
3// Copyright (C) 2020-2021 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
│ │ │ @@ -75,108 +75,482 @@ │ │ │
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
│ │ │ +
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{string}
│ │ │ +
27 * Do not attempt to use it directly. @headername{atomic}
│ │ │
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#ifdef _GLIBCXX_USE_WCHAR_T
│ │ │ -
58 template<> struct char_traits<wchar_t>;
│ │ │ -
59#endif
│ │ │ -
60
│ │ │ -
61#ifdef _GLIBCXX_USE_CHAR8_T
│ │ │ -
62 template<> struct char_traits<char8_t>;
│ │ │ -
63#endif
│ │ │ -
64
│ │ │ -
65#if __cplusplus >= 201103L
│ │ │ -
66 template<> struct char_traits<char16_t>;
│ │ │ -
67 template<> struct char_traits<char32_t>;
│ │ │ -
68#endif
│ │ │ -
69
│ │ │ -
70_GLIBCXX_BEGIN_NAMESPACE_CXX11
│ │ │ -
71
│ │ │ -
72 template<typename _CharT, typename _Traits = char_traits<_CharT>,
│ │ │ -
73 typename _Alloc = allocator<_CharT> >
│ │ │ -
74 class basic_string;
│ │ │ -
75
│ │ │ -
76_GLIBCXX_END_NAMESPACE_CXX11
│ │ │ -
77
│ │ │ -
78 /// A string of @c char
│ │ │ - │ │ │ -
80
│ │ │ -
81#ifdef _GLIBCXX_USE_WCHAR_T
│ │ │ -
82 /// A string of @c wchar_t
│ │ │ - │ │ │ -
84#endif
│ │ │ -
85
│ │ │ -
86#ifdef _GLIBCXX_USE_CHAR8_T
│ │ │ -
87 /// A string of @c char8_t
│ │ │ -
88 typedef basic_string<char8_t> u8string;
│ │ │ -
89#endif
│ │ │ -
90
│ │ │ -
91#if __cplusplus >= 201103L
│ │ │ -
92 /// A string of @c char16_t
│ │ │ - │ │ │ -
94
│ │ │ -
95 /// A string of @c char32_t
│ │ │ - │ │ │ -
97#endif
│ │ │ -
98
│ │ │ -
99 /** @} */
│ │ │ -
100
│ │ │ -
101_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ -
102} // namespace std
│ │ │ +
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 static 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 static 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#endif // _STRINGFWD_H
│ │ │ - │ │ │ - │ │ │ -
basic_string< char > string
A string of char.
Definition stringfwd.h:79
│ │ │ -
basic_string< char32_t > u32string
A string of char32_t.
Definition stringfwd.h:96
│ │ │ -
basic_string< char16_t > u16string
A string of char16_t.
Definition stringfwd.h:93
│ │ │ -
basic_string< wchar_t > wstring
A string of wchar_t.
Definition stringfwd.h:83
│ │ │ +
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 constexpr auto __atomic_spin_count_relax = 12;
│ │ │ +
146 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#ifdef __cpp_lib_hardware_interference_size
│ │ │ +
191 static constexpr auto _S_align = hardware_destructive_interference_size;
│ │ │ +
192#else
│ │ │ +
193 static constexpr auto _S_align = 64;
│ │ │ +
194#endif
│ │ │ +
195
│ │ │ +
196 alignas(_S_align) __platform_wait_t _M_wait = 0;
│ │ │ +
197
│ │ │ +
198#ifndef _GLIBCXX_HAVE_PLATFORM_WAIT
│ │ │ +
199 mutex _M_mtx;
│ │ │ +
200#endif
│ │ │ +
201
│ │ │ +
202 alignas(_S_align) __platform_wait_t _M_ver = 0;
│ │ │ +
203
│ │ │ +
204#ifndef _GLIBCXX_HAVE_PLATFORM_WAIT
│ │ │ +
205 __condvar _M_cv;
│ │ │ +
206#endif
│ │ │ +
207 __waiter_pool_base() = default;
│ │ │ +
208
│ │ │ +
209 void
│ │ │ +
210 _M_enter_wait() noexcept
│ │ │ +
211 { __atomic_fetch_add(&_M_wait, 1, __ATOMIC_SEQ_CST); }
│ │ │ +
212
│ │ │ +
213 void
│ │ │ +
214 _M_leave_wait() noexcept
│ │ │ +
215 { __atomic_fetch_sub(&_M_wait, 1, __ATOMIC_RELEASE); }
│ │ │ +
216
│ │ │ +
217 bool
│ │ │ +
218 _M_waiting() const noexcept
│ │ │ +
219 {
│ │ │ +
220 __platform_wait_t __res;
│ │ │ +
221 __atomic_load(&_M_wait, &__res, __ATOMIC_SEQ_CST);
│ │ │ +
222 return __res != 0;
│ │ │ +
223 }
│ │ │ +
224
│ │ │ +
225 void
│ │ │ +
226 _M_notify(__platform_wait_t* __addr, [[maybe_unused]] bool __all,
│ │ │ +
227 bool __bare) noexcept
│ │ │ +
228 {
│ │ │ +
229#ifdef _GLIBCXX_HAVE_PLATFORM_WAIT
│ │ │ +
230 if (__addr == &_M_ver)
│ │ │ +
231 {
│ │ │ +
232 __atomic_fetch_add(__addr, 1, __ATOMIC_SEQ_CST);
│ │ │ +
233 __all = true;
│ │ │ +
234 }
│ │ │ +
235
│ │ │ +
236 if (__bare || _M_waiting())
│ │ │ +
237 __platform_notify(__addr, __all);
│ │ │ +
238#else
│ │ │ +
239 {
│ │ │ +
240 lock_guard<mutex> __l(_M_mtx);
│ │ │ +
241 __atomic_fetch_add(__addr, 1, __ATOMIC_RELAXED);
│ │ │ +
242 }
│ │ │ +
243 if (__bare || _M_waiting())
│ │ │ +
244 _M_cv.notify_all();
│ │ │ +
245#endif
│ │ │ +
246 }
│ │ │ +
247
│ │ │ +
248 static __waiter_pool_base&
│ │ │ +
249 _S_for(const void* __addr) noexcept
│ │ │ +
250 {
│ │ │ +
251 constexpr uintptr_t __ct = 16;
│ │ │ +
252 static __waiter_pool_base __w[__ct];
│ │ │ +
253 auto __key = (uintptr_t(__addr) >> 2) % __ct;
│ │ │ +
254 return __w[__key];
│ │ │ +
255 }
│ │ │ +
256 };
│ │ │ +
257
│ │ │ +
258 struct __waiter_pool : __waiter_pool_base
│ │ │ +
259 {
│ │ │ +
260 void
│ │ │ +
261 _M_do_wait(const __platform_wait_t* __addr, __platform_wait_t __old) noexcept
│ │ │ +
262 {
│ │ │ +
263#ifdef _GLIBCXX_HAVE_PLATFORM_WAIT
│ │ │ +
264 __platform_wait(__addr, __old);
│ │ │ +
265#else
│ │ │ +
266 __platform_wait_t __val;
│ │ │ +
267 __atomic_load(__addr, &__val, __ATOMIC_SEQ_CST);
│ │ │ +
268 if (__val == __old)
│ │ │ +
269 {
│ │ │ +
270 lock_guard<mutex> __l(_M_mtx);
│ │ │ +
271 __atomic_load(__addr, &__val, __ATOMIC_RELAXED);
│ │ │ +
272 if (__val == __old)
│ │ │ +
273 _M_cv.wait(_M_mtx);
│ │ │ +
274 }
│ │ │ +
275#endif // __GLIBCXX_HAVE_PLATFORM_WAIT
│ │ │ +
276 }
│ │ │ +
277 };
│ │ │ +
278
│ │ │ +
279 template<typename _Tp>
│ │ │ +
280 struct __waiter_base
│ │ │ +
281 {
│ │ │ +
282 using __waiter_type = _Tp;
│ │ │ +
283
│ │ │ +
284 __waiter_type& _M_w;
│ │ │ +
285 __platform_wait_t* _M_addr;
│ │ │ +
286
│ │ │ +
287 template<typename _Up>
│ │ │ +
288 static __platform_wait_t*
│ │ │ +
289 _S_wait_addr(const _Up* __a, __platform_wait_t* __b)
│ │ │ +
290 {
│ │ │ +
291 if constexpr (__platform_wait_uses_type<_Up>)
│ │ │ +
292 return reinterpret_cast<__platform_wait_t*>(const_cast<_Up*>(__a));
│ │ │ +
293 else
│ │ │ +
294 return __b;
│ │ │ +
295 }
│ │ │ +
296
│ │ │ +
297 static __waiter_type&
│ │ │ +
298 _S_for(const void* __addr) noexcept
│ │ │ +
299 {
│ │ │ +
300 static_assert(sizeof(__waiter_type) == sizeof(__waiter_pool_base));
│ │ │ +
301 auto& res = __waiter_pool_base::_S_for(__addr);
│ │ │ +
302 return reinterpret_cast<__waiter_type&>(res);
│ │ │ +
303 }
│ │ │ +
304
│ │ │ +
305 template<typename _Up>
│ │ │ +
306 explicit __waiter_base(const _Up* __addr) noexcept
│ │ │ +
307 : _M_w(_S_for(__addr))
│ │ │ +
308 , _M_addr(_S_wait_addr(__addr, &_M_w._M_ver))
│ │ │ +
309 { }
│ │ │ +
310
│ │ │ +
311 void
│ │ │ +
312 _M_notify(bool __all, bool __bare = false) noexcept
│ │ │ +
313 { _M_w._M_notify(_M_addr, __all, __bare); }
│ │ │ +
314
│ │ │ +
315 template<typename _Up, typename _ValFn,
│ │ │ +
316 typename _Spin = __default_spin_policy>
│ │ │ +
317 static bool
│ │ │ +
318 _S_do_spin_v(__platform_wait_t* __addr,
│ │ │ +
319 const _Up& __old, _ValFn __vfn,
│ │ │ +
320 __platform_wait_t& __val,
│ │ │ +
321 _Spin __spin = _Spin{ })
│ │ │ +
322 {
│ │ │ +
323 auto const __pred = [=]
│ │ │ +
324 { return !__detail::__atomic_compare(__old, __vfn()); };
│ │ │ +
325
│ │ │ +
326 if constexpr (__platform_wait_uses_type<_Up>)
│ │ │ +
327 {
│ │ │ +
328 __builtin_memcpy(&__val, &__old, sizeof(__val));
│ │ │ +
329 }
│ │ │ +
330 else
│ │ │ +
331 {
│ │ │ +
332 __atomic_load(__addr, &__val, __ATOMIC_ACQUIRE);
│ │ │ +
333 }
│ │ │ +
334 return __atomic_spin(__pred, __spin);
│ │ │ +
335 }
│ │ │ +
336
│ │ │ +
337 template<typename _Up, typename _ValFn,
│ │ │ +
338 typename _Spin = __default_spin_policy>
│ │ │ +
339 bool
│ │ │ +
340 _M_do_spin_v(const _Up& __old, _ValFn __vfn,
│ │ │ +
341 __platform_wait_t& __val,
│ │ │ +
342 _Spin __spin = _Spin{ })
│ │ │ +
343 { return _S_do_spin_v(_M_addr, __old, __vfn, __val, __spin); }
│ │ │ +
344
│ │ │ +
345 template<typename _Pred,
│ │ │ +
346 typename _Spin = __default_spin_policy>
│ │ │ +
347 static bool
│ │ │ +
348 _S_do_spin(const __platform_wait_t* __addr,
│ │ │ +
349 _Pred __pred,
│ │ │ +
350 __platform_wait_t& __val,
│ │ │ +
351 _Spin __spin = _Spin{ })
│ │ │ +
352 {
│ │ │ +
353 __atomic_load(__addr, &__val, __ATOMIC_ACQUIRE);
│ │ │ +
354 return __atomic_spin(__pred, __spin);
│ │ │ +
355 }
│ │ │ +
356
│ │ │ +
357 template<typename _Pred,
│ │ │ +
358 typename _Spin = __default_spin_policy>
│ │ │ +
359 bool
│ │ │ +
360 _M_do_spin(_Pred __pred, __platform_wait_t& __val,
│ │ │ +
361 _Spin __spin = _Spin{ })
│ │ │ +
362 { return _S_do_spin(_M_addr, __pred, __val, __spin); }
│ │ │ +
363 };
│ │ │ +
364
│ │ │ +
365 template<typename _EntersWait>
│ │ │ +
366 struct __waiter : __waiter_base<__waiter_pool>
│ │ │ +
367 {
│ │ │ +
368 using __base_type = __waiter_base<__waiter_pool>;
│ │ │ +
369
│ │ │ +
370 template<typename _Tp>
│ │ │ +
371 explicit __waiter(const _Tp* __addr) noexcept
│ │ │ +
372 : __base_type(__addr)
│ │ │ +
373 {
│ │ │ +
374 if constexpr (_EntersWait::value)
│ │ │ +
375 _M_w._M_enter_wait();
│ │ │ +
376 }
│ │ │ +
377
│ │ │ +
378 ~__waiter()
│ │ │ +
379 {
│ │ │ +
380 if constexpr (_EntersWait::value)
│ │ │ +
381 _M_w._M_leave_wait();
│ │ │ +
382 }
│ │ │ +
383
│ │ │ +
384 template<typename _Tp, typename _ValFn>
│ │ │ +
385 void
│ │ │ +
386 _M_do_wait_v(_Tp __old, _ValFn __vfn)
│ │ │ +
387 {
│ │ │ +
388 do
│ │ │ +
389 {
│ │ │ +
390 __platform_wait_t __val;
│ │ │ +
391 if (__base_type::_M_do_spin_v(__old, __vfn, __val))
│ │ │ +
392 return;
│ │ │ +
393 __base_type::_M_w._M_do_wait(__base_type::_M_addr, __val);
│ │ │ +
394 }
│ │ │ +
395 while (__detail::__atomic_compare(__old, __vfn()));
│ │ │ +
396 }
│ │ │ +
397
│ │ │ +
398 template<typename _Pred>
│ │ │ +
399 void
│ │ │ +
400 _M_do_wait(_Pred __pred) noexcept
│ │ │ +
401 {
│ │ │ +
402 do
│ │ │ +
403 {
│ │ │ +
404 __platform_wait_t __val;
│ │ │ +
405 if (__base_type::_M_do_spin(__pred, __val))
│ │ │ +
406 return;
│ │ │ +
407 __base_type::_M_w._M_do_wait(__base_type::_M_addr, __val);
│ │ │ +
408 }
│ │ │ +
409 while (!__pred());
│ │ │ +
410 }
│ │ │ +
411 };
│ │ │ +
412
│ │ │ +
413 using __enters_wait = __waiter<std::true_type>;
│ │ │ +
414 using __bare_wait = __waiter<std::false_type>;
│ │ │ +
415 } // namespace __detail
│ │ │ +
416
│ │ │ +
417 template<typename _Tp, typename _ValFn>
│ │ │ +
418 void
│ │ │ +
419 __atomic_wait_address_v(const _Tp* __addr, _Tp __old,
│ │ │ +
420 _ValFn __vfn) noexcept
│ │ │ +
421 {
│ │ │ +
422 __detail::__enters_wait __w(__addr);
│ │ │ +
423 __w._M_do_wait_v(__old, __vfn);
│ │ │ +
424 }
│ │ │ +
425
│ │ │ +
426 template<typename _Tp, typename _Pred>
│ │ │ +
427 void
│ │ │ +
428 __atomic_wait_address(const _Tp* __addr, _Pred __pred) noexcept
│ │ │ +
429 {
│ │ │ +
430 __detail::__enters_wait __w(__addr);
│ │ │ +
431 __w._M_do_wait(__pred);
│ │ │ +
432 }
│ │ │ +
433
│ │ │ +
434 // This call is to be used by atomic types which track contention externally
│ │ │ +
435 template<typename _Pred>
│ │ │ +
436 void
│ │ │ +
437 __atomic_wait_address_bare(const __detail::__platform_wait_t* __addr,
│ │ │ +
438 _Pred __pred) noexcept
│ │ │ +
439 {
│ │ │ +
440#ifdef _GLIBCXX_HAVE_PLATFORM_WAIT
│ │ │ +
441 do
│ │ │ +
442 {
│ │ │ +
443 __detail::__platform_wait_t __val;
│ │ │ +
444 if (__detail::__bare_wait::_S_do_spin(__addr, __pred, __val))
│ │ │ +
445 return;
│ │ │ +
446 __detail::__platform_wait(__addr, __val);
│ │ │ +
447 }
│ │ │ +
448 while (!__pred());
│ │ │ +
449#else // !_GLIBCXX_HAVE_PLATFORM_WAIT
│ │ │ +
450 __detail::__bare_wait __w(__addr);
│ │ │ +
451 __w._M_do_wait(__pred);
│ │ │ +
452#endif
│ │ │ +
453 }
│ │ │ +
454
│ │ │ +
455 template<typename _Tp>
│ │ │ +
456 void
│ │ │ +
457 __atomic_notify_address(const _Tp* __addr, bool __all) noexcept
│ │ │ +
458 {
│ │ │ +
459 __detail::__bare_wait __w(__addr);
│ │ │ +
460 __w._M_notify(__all);
│ │ │ +
461 }
│ │ │ +
462
│ │ │ +
463 // This call is to be used by atomic types which track contention externally
│ │ │ +
464 inline void
│ │ │ +
465 __atomic_notify_address_bare(const __detail::__platform_wait_t* __addr,
│ │ │ +
466 bool __all) noexcept
│ │ │ +
467 {
│ │ │ +
468#ifdef _GLIBCXX_HAVE_PLATFORM_WAIT
│ │ │ +
469 __detail::__platform_notify(__addr, __all);
│ │ │ +
470#else
│ │ │ +
471 __detail::__bare_wait __w(__addr);
│ │ │ +
472 __w._M_notify(__all, true);
│ │ │ +
473#endif
│ │ │ +
474 }
│ │ │ +
475_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ +
476} // namespace std
│ │ │ +
477#endif // GTHREADS || LINUX_FUTEX
│ │ │ +
478#endif // _GLIBCXX_ATOMIC_WAIT_H
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │
ISO C++ entities toplevel namespace is std.
│ │ │ -
Managing sequences of characters and character-like objects.
│ │ │ -
Basis for explicit traits specializations.
│ │ │ +
Implementation details not part of the namespace std interface.
│ │ │ + │ │ │
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,13 +1,13 @@ │ │ │ │ libstdc++ │ │ │ │ -stringfwd.h │ │ │ │ +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// Forward declarations -*- C++ -*- │ │ │ │ +1// -*- C++ -*- header. │ │ │ │ 2 │ │ │ │ -3// Copyright (C) 2001-2021 Free Software Foundation, Inc. │ │ │ │ +3// Copyright (C) 2020-2021 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,116 +21,478 @@ │ │ │ │ 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 │ │ │ │ +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{string} │ │ │ │ +27 * Do not attempt to use it directly. @headername{atomic} │ │ │ │ 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 _c_h_a_r___t_r_a_i_t_s; │ │ │ │ -54 │ │ │ │ -55 template<> struct _c_h_a_r___t_r_a_i_t_s; │ │ │ │ -56 │ │ │ │ -57#ifdef _GLIBCXX_USE_WCHAR_T │ │ │ │ -58 template<> struct _c_h_a_r___t_r_a_i_t_s; │ │ │ │ -59#endif │ │ │ │ -60 │ │ │ │ -61#ifdef _GLIBCXX_USE_CHAR8_T │ │ │ │ -62 template<> struct _c_h_a_r___t_r_a_i_t_s; │ │ │ │ -63#endif │ │ │ │ -64 │ │ │ │ -65#if __cplusplus >= 201103L │ │ │ │ -66 template<> struct _c_h_a_r___t_r_a_i_t_s; │ │ │ │ -67 template<> struct _c_h_a_r___t_r_a_i_t_s; │ │ │ │ -68#endif │ │ │ │ -69 │ │ │ │ -70_GLIBCXX_BEGIN_NAMESPACE_CXX11 │ │ │ │ -71 │ │ │ │ -72 template, │ │ │ │ -73 typename _Alloc = allocator<_CharT> > │ │ │ │ -74 class _b_a_s_i_c___s_t_r_i_n_g; │ │ │ │ -75 │ │ │ │ -76_GLIBCXX_END_NAMESPACE_CXX11 │ │ │ │ -77 │ │ │ │ -78 /// A string of @c char │ │ │ │ -_7_9 typedef _b_a_s_i_c___s_t_r_i_n_g_<_c_h_a_r_> _s_t_r_i_n_g; │ │ │ │ -80 │ │ │ │ -81#ifdef _GLIBCXX_USE_WCHAR_T │ │ │ │ -82 /// A string of @c wchar_t │ │ │ │ -_8_3 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; │ │ │ │ -84#endif │ │ │ │ -85 │ │ │ │ -86#ifdef _GLIBCXX_USE_CHAR8_T │ │ │ │ -87 /// A string of @c char8_t │ │ │ │ -88 typedef _b_a_s_i_c___s_t_r_i_n_g_<_c_h_a_r_8___t_> u8string; │ │ │ │ -89#endif │ │ │ │ -90 │ │ │ │ -91#if __cplusplus >= 201103L │ │ │ │ -92 /// A string of @c char16_t │ │ │ │ -_9_3 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; │ │ │ │ -94 │ │ │ │ -95 /// A string of @c char32_t │ │ │ │ -_9_6 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; │ │ │ │ -97#endif │ │ │ │ -98 │ │ │ │ -99 /** @} */ │ │ │ │ -100 │ │ │ │ -101_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ -102} // namespace std │ │ │ │ +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 <_c_l_i_m_i_t_s> │ │ │ │ +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 _____d_e_t_a_i_l │ │ │ │ +57 { │ │ │ │ +58#ifdef _GLIBCXX_HAVE_LINUX_FUTEX │ │ │ │ +59#define _GLIBCXX_HAVE_PLATFORM_WAIT 1 │ │ │ │ +60 using __platform_wait_t = int; │ │ │ │ +61 static 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 static 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 _____d_e_t_a_i_l │ │ │ │ +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#endif // _STRINGFWD_H │ │ │ │ -_m_e_m_o_r_y_f_w_d_._h │ │ │ │ +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 │ │ │ │ +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 constexpr auto __atomic_spin_count_relax = 12; │ │ │ │ +146 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#ifdef __cpp_lib_hardware_interference_size │ │ │ │ +191 static constexpr auto _S_align = hardware_destructive_interference_size; │ │ │ │ +192#else │ │ │ │ +193 static constexpr auto _S_align = 64; │ │ │ │ +194#endif │ │ │ │ +195 │ │ │ │ +196 alignas(_S_align) __platform_wait_t _M_wait = 0; │ │ │ │ +197 │ │ │ │ +198#ifndef _GLIBCXX_HAVE_PLATFORM_WAIT │ │ │ │ +199 mutex _M_mtx; │ │ │ │ +200#endif │ │ │ │ +201 │ │ │ │ +202 alignas(_S_align) __platform_wait_t _M_ver = 0; │ │ │ │ +203 │ │ │ │ +204#ifndef _GLIBCXX_HAVE_PLATFORM_WAIT │ │ │ │ +205 __condvar _M_cv; │ │ │ │ +206#endif │ │ │ │ +207 __waiter_pool_base() = default; │ │ │ │ +208 │ │ │ │ +209 void │ │ │ │ +210 _M_enter_wait() noexcept │ │ │ │ +211 { __atomic_fetch_add(&_M_wait, 1, __ATOMIC_SEQ_CST); } │ │ │ │ +212 │ │ │ │ +213 void │ │ │ │ +214 _M_leave_wait() noexcept │ │ │ │ +215 { __atomic_fetch_sub(&_M_wait, 1, __ATOMIC_RELEASE); } │ │ │ │ +216 │ │ │ │ +217 bool │ │ │ │ +218 _M_waiting() const noexcept │ │ │ │ +219 { │ │ │ │ +220 __platform_wait_t __res; │ │ │ │ +221 __atomic_load(&_M_wait, &__res, __ATOMIC_SEQ_CST); │ │ │ │ +222 return __res != 0; │ │ │ │ +223 } │ │ │ │ +224 │ │ │ │ +225 void │ │ │ │ +226 _M_notify(__platform_wait_t* __addr, [[maybe_unused]] bool __all, │ │ │ │ +227 bool __bare) noexcept │ │ │ │ +228 { │ │ │ │ +229#ifdef _GLIBCXX_HAVE_PLATFORM_WAIT │ │ │ │ +230 if (__addr == &_M_ver) │ │ │ │ +231 { │ │ │ │ +232 __atomic_fetch_add(__addr, 1, __ATOMIC_SEQ_CST); │ │ │ │ +233 __all = true; │ │ │ │ +234 } │ │ │ │ +235 │ │ │ │ +236 if (__bare || _M_waiting()) │ │ │ │ +237 __platform_notify(__addr, __all); │ │ │ │ +238#else │ │ │ │ +239 { │ │ │ │ +240 lock_guard __l(_M_mtx); │ │ │ │ +241 __atomic_fetch_add(__addr, 1, __ATOMIC_RELAXED); │ │ │ │ +242 } │ │ │ │ +243 if (__bare || _M_waiting()) │ │ │ │ +244 _M_cv.notify_all(); │ │ │ │ +245#endif │ │ │ │ +246 } │ │ │ │ +247 │ │ │ │ +248 static __waiter_pool_base& │ │ │ │ +249 _S_for(const void* __addr) noexcept │ │ │ │ +250 { │ │ │ │ +251 constexpr uintptr_t __ct = 16; │ │ │ │ +252 static __waiter_pool_base __w[__ct]; │ │ │ │ +253 auto __key = (uintptr_t(__addr) >> 2) % __ct; │ │ │ │ +254 return __w[__key]; │ │ │ │ +255 } │ │ │ │ +256 }; │ │ │ │ +257 │ │ │ │ +258 struct __waiter_pool : __waiter_pool_base │ │ │ │ +259 { │ │ │ │ +260 void │ │ │ │ +261 _M_do_wait(const __platform_wait_t* __addr, __platform_wait_t __old) │ │ │ │ +noexcept │ │ │ │ +262 { │ │ │ │ +263#ifdef _GLIBCXX_HAVE_PLATFORM_WAIT │ │ │ │ +264 __platform_wait(__addr, __old); │ │ │ │ +265#else │ │ │ │ +266 __platform_wait_t __val; │ │ │ │ +267 __atomic_load(__addr, &__val, __ATOMIC_SEQ_CST); │ │ │ │ +268 if (__val == __old) │ │ │ │ +269 { │ │ │ │ +270 lock_guard __l(_M_mtx); │ │ │ │ +271 __atomic_load(__addr, &__val, __ATOMIC_RELAXED); │ │ │ │ +272 if (__val == __old) │ │ │ │ +273 _M_cv.wait(_M_mtx); │ │ │ │ +274 } │ │ │ │ +275#endif // __GLIBCXX_HAVE_PLATFORM_WAIT │ │ │ │ +276 } │ │ │ │ +277 }; │ │ │ │ +278 │ │ │ │ +279 template │ │ │ │ +280 struct __waiter_base │ │ │ │ +281 { │ │ │ │ +282 using __waiter_type = _Tp; │ │ │ │ +283 │ │ │ │ +284 __waiter_type& _M_w; │ │ │ │ +285 __platform_wait_t* _M_addr; │ │ │ │ +286 │ │ │ │ +287 template │ │ │ │ +288 static __platform_wait_t* │ │ │ │ +289 _S_wait_addr(const _Up* __a, __platform_wait_t* __b) │ │ │ │ +290 { │ │ │ │ +291 if constexpr (__platform_wait_uses_type<_Up>) │ │ │ │ +292 return reinterpret_cast<__platform_wait_t*>(const_cast<_Up*>(__a)); │ │ │ │ +293 else │ │ │ │ +294 return __b; │ │ │ │ +295 } │ │ │ │ +296 │ │ │ │ +297 static __waiter_type& │ │ │ │ +298 _S_for(const void* __addr) noexcept │ │ │ │ +299 { │ │ │ │ +300 static_assert(sizeof(__waiter_type) == sizeof(__waiter_pool_base)); │ │ │ │ +301 auto& res = __waiter_pool_base::_S_for(__addr); │ │ │ │ +302 return reinterpret_cast<__waiter_type&>(res); │ │ │ │ +303 } │ │ │ │ +304 │ │ │ │ +305 template │ │ │ │ +306 explicit __waiter_base(const _Up* __addr) noexcept │ │ │ │ +307 : _M_w(_S_for(__addr)) │ │ │ │ +308 , _M_addr(_S_wait_addr(__addr, &_M_w._M_ver)) │ │ │ │ +309 { } │ │ │ │ +310 │ │ │ │ +311 void │ │ │ │ +312 _M_notify(bool __all, bool __bare = false) noexcept │ │ │ │ +313 { _M_w._M_notify(_M_addr, __all, __bare); } │ │ │ │ +314 │ │ │ │ +315 template │ │ │ │ +317 static bool │ │ │ │ +318 _S_do_spin_v(__platform_wait_t* __addr, │ │ │ │ +319 const _Up& __old, _ValFn __vfn, │ │ │ │ +320 __platform_wait_t& __val, │ │ │ │ +321 _Spin __spin = _Spin{ }) │ │ │ │ +322 { │ │ │ │ +323 auto const __pred = [=] │ │ │ │ +324 { return !__detail::__atomic_compare(__old, __vfn()); }; │ │ │ │ +325 │ │ │ │ +326 if constexpr (__platform_wait_uses_type<_Up>) │ │ │ │ +327 { │ │ │ │ +328 __builtin_memcpy(&__val, &__old, sizeof(__val)); │ │ │ │ +329 } │ │ │ │ +330 else │ │ │ │ +331 { │ │ │ │ +332 __atomic_load(__addr, &__val, __ATOMIC_ACQUIRE); │ │ │ │ +333 } │ │ │ │ +334 return __atomic_spin(__pred, __spin); │ │ │ │ +335 } │ │ │ │ +336 │ │ │ │ +337 template │ │ │ │ +339 bool │ │ │ │ +340 _M_do_spin_v(const _Up& __old, _ValFn __vfn, │ │ │ │ +341 __platform_wait_t& __val, │ │ │ │ +342 _Spin __spin = _Spin{ }) │ │ │ │ +343 { return _S_do_spin_v(_M_addr, __old, __vfn, __val, __spin); } │ │ │ │ +344 │ │ │ │ +345 template │ │ │ │ +347 static bool │ │ │ │ +348 _S_do_spin(const __platform_wait_t* __addr, │ │ │ │ +349 _Pred __pred, │ │ │ │ +350 __platform_wait_t& __val, │ │ │ │ +351 _Spin __spin = _Spin{ }) │ │ │ │ +352 { │ │ │ │ +353 __atomic_load(__addr, &__val, __ATOMIC_ACQUIRE); │ │ │ │ +354 return __atomic_spin(__pred, __spin); │ │ │ │ +355 } │ │ │ │ +356 │ │ │ │ +357 template │ │ │ │ +359 bool │ │ │ │ +360 _M_do_spin(_Pred __pred, __platform_wait_t& __val, │ │ │ │ +361 _Spin __spin = _Spin{ }) │ │ │ │ +362 { return _S_do_spin(_M_addr, __pred, __val, __spin); } │ │ │ │ +363 }; │ │ │ │ +364 │ │ │ │ +365 template │ │ │ │ +366 struct __waiter : __waiter_base<__waiter_pool> │ │ │ │ +367 { │ │ │ │ +368 using __base_type = __waiter_base<__waiter_pool>; │ │ │ │ +369 │ │ │ │ +370 template │ │ │ │ +371 explicit __waiter(const _Tp* __addr) noexcept │ │ │ │ +372 : __base_type(__addr) │ │ │ │ +373 { │ │ │ │ +374 if constexpr (_EntersWait::value) │ │ │ │ +375 _M_w._M_enter_wait(); │ │ │ │ +376 } │ │ │ │ +377 │ │ │ │ +378 ~__waiter() │ │ │ │ +379 { │ │ │ │ +380 if constexpr (_EntersWait::value) │ │ │ │ +381 _M_w._M_leave_wait(); │ │ │ │ +382 } │ │ │ │ +383 │ │ │ │ +384 template │ │ │ │ +385 void │ │ │ │ +386 _M_do_wait_v(_Tp __old, _ValFn __vfn) │ │ │ │ +387 { │ │ │ │ +388 do │ │ │ │ +389 { │ │ │ │ +390 __platform_wait_t __val; │ │ │ │ +391 if (__base_type::_M_do_spin_v(__old, __vfn, __val)) │ │ │ │ +392 return; │ │ │ │ +393 __base_type::_M_w._M_do_wait(__base_type::_M_addr, __val); │ │ │ │ +394 } │ │ │ │ +395 while (__detail::__atomic_compare(__old, __vfn())); │ │ │ │ +396 } │ │ │ │ +397 │ │ │ │ +398 template │ │ │ │ +399 void │ │ │ │ +400 _M_do_wait(_Pred __pred) noexcept │ │ │ │ +401 { │ │ │ │ +402 do │ │ │ │ +403 { │ │ │ │ +404 __platform_wait_t __val; │ │ │ │ +405 if (__base_type::_M_do_spin(__pred, __val)) │ │ │ │ +406 return; │ │ │ │ +407 __base_type::_M_w._M_do_wait(__base_type::_M_addr, __val); │ │ │ │ +408 } │ │ │ │ +409 while (!__pred()); │ │ │ │ +410 } │ │ │ │ +411 }; │ │ │ │ +412 │ │ │ │ +413 using __enters_wait = __waiter; │ │ │ │ +414 using __bare_wait = __waiter; │ │ │ │ +415 } // namespace __detail │ │ │ │ +416 │ │ │ │ +417 template │ │ │ │ +418 void │ │ │ │ +419 __atomic_wait_address_v(const _Tp* __addr, _Tp __old, │ │ │ │ +420 _ValFn __vfn) noexcept │ │ │ │ +421 { │ │ │ │ +422 __detail::__enters_wait __w(__addr); │ │ │ │ +423 __w._M_do_wait_v(__old, __vfn); │ │ │ │ +424 } │ │ │ │ +425 │ │ │ │ +426 template │ │ │ │ +427 void │ │ │ │ +428 __atomic_wait_address(const _Tp* __addr, _Pred __pred) noexcept │ │ │ │ +429 { │ │ │ │ +430 __detail::__enters_wait __w(__addr); │ │ │ │ +431 __w._M_do_wait(__pred); │ │ │ │ +432 } │ │ │ │ +433 │ │ │ │ +434 // This call is to be used by atomic types which track contention │ │ │ │ +externally │ │ │ │ +435 template │ │ │ │ +436 void │ │ │ │ +437 __atomic_wait_address_bare(const __detail::__platform_wait_t* __addr, │ │ │ │ +438 _Pred __pred) noexcept │ │ │ │ +439 { │ │ │ │ +440#ifdef _GLIBCXX_HAVE_PLATFORM_WAIT │ │ │ │ +441 do │ │ │ │ +442 { │ │ │ │ +443 __detail::__platform_wait_t __val; │ │ │ │ +444 if (__detail::__bare_wait::_S_do_spin(__addr, __pred, __val)) │ │ │ │ +445 return; │ │ │ │ +446 __detail::__platform_wait(__addr, __val); │ │ │ │ +447 } │ │ │ │ +448 while (!__pred()); │ │ │ │ +449#else // !_GLIBCXX_HAVE_PLATFORM_WAIT │ │ │ │ +450 __detail::__bare_wait __w(__addr); │ │ │ │ +451 __w._M_do_wait(__pred); │ │ │ │ +452#endif │ │ │ │ +453 } │ │ │ │ +454 │ │ │ │ +455 template │ │ │ │ +456 void │ │ │ │ +457 __atomic_notify_address(const _Tp* __addr, bool __all) noexcept │ │ │ │ +458 { │ │ │ │ +459 __detail::__bare_wait __w(__addr); │ │ │ │ +460 __w._M_notify(__all); │ │ │ │ +461 } │ │ │ │ +462 │ │ │ │ +463 // This call is to be used by atomic types which track contention │ │ │ │ +externally │ │ │ │ +464 inline void │ │ │ │ +465 __atomic_notify_address_bare(const __detail::__platform_wait_t* __addr, │ │ │ │ +466 bool __all) noexcept │ │ │ │ +467 { │ │ │ │ +468#ifdef _GLIBCXX_HAVE_PLATFORM_WAIT │ │ │ │ +469 __detail::__platform_notify(__addr, __all); │ │ │ │ +470#else │ │ │ │ +471 __detail::__bare_wait __w(__addr); │ │ │ │ +472 __w._M_notify(__all, true); │ │ │ │ +473#endif │ │ │ │ +474 } │ │ │ │ +475_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ +476} // namespace std │ │ │ │ +477#endif // GTHREADS || LINUX_FUTEX │ │ │ │ +478#endif // _GLIBCXX_ATOMIC_WAIT_H │ │ │ │ +_c_e_r_r_n_o │ │ │ │ +_c_l_i_m_i_t_s │ │ │ │ +_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_:_:_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_9 │ │ │ │ -_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_6 │ │ │ │ -_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_:_9_3 │ │ │ │ -_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_3 │ │ │ │ _s_t_d │ │ │ │ ISO C++ entities toplevel namespace is std. │ │ │ │ -_s_t_d_:_:_b_a_s_i_c___s_t_r_i_n_g │ │ │ │ -Managing sequences of characters and character-like objects. │ │ │ │ -DDeeffiinniittiioonn _b_a_s_i_c___s_t_r_i_n_g_._h_:_3_1_7_5 │ │ │ │ -_s_t_d_:_:_c_h_a_r___t_r_a_i_t_s │ │ │ │ -Basis for explicit traits specializations. │ │ │ │ -DDeeffiinniittiioonn _c_h_a_r___t_r_a_i_t_s_._h_:_3_3_9 │ │ │ │ +_s_t_d_:_:_____d_e_t_a_i_l │ │ │ │ +Implementation details not part of the namespace std interface. │ │ │ │ +_n_u_m_e_r_i_c___t_r_a_i_t_s_._h │ │ │ │ * bbiittss │ │ │ │ - * _s_t_r_i_n_g_f_w_d_._h │ │ │ │ + * _a_t_o_m_i_c___w_a_i_t_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.15.0 │ │ ├── ./usr/share/doc/gcc-11-base/libstdc++/user/a00389.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: streambuf.tcc File Reference │ │ │ +libstdc++: concept_check.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -48,53 +48,171 @@ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
streambuf.tcc File Reference
│ │ │ +
concept_check.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │

Go to the source code of this file.

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

│ │ │ -Namespaces

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

│ │ │ Macros

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

│ │ │ -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 > *__sbin, basic_streambuf< _CharT, _Traits > *__sbout, bool &__ineof)
#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 <streambuf>.

│ │ │ +

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.tcc.

│ │ │ +

Definition in file concept_check.h.

│ │ │

Macro Definition Documentation

│ │ │ - │ │ │ -

◆ _STREAMBUF_TCC

│ │ │ + │ │ │ +

◆ __glibcxx_class_requires

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │ │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
#define _STREAMBUF_TCC#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 35 of file streambuf.tcc.

│ │ │ +

Definition at line 48 of file concept_check.h.

│ │ │ │ │ │
│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,26 +1,42 @@ │ │ │ │ libstdc++ │ │ │ │ -streambuf.tcc File Reference │ │ │ │ +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_. │ │ │ │ -NNaammeessppaacceess │ │ │ │ -namespace   _s_t_d │ │ │ │ MMaaccrrooss │ │ │ │ -#define  ___S_T_R_E_A_M_B_U_F___T_C_C │ │ │ │ -FFuunnccttiioonnss │ │ │ │ -template │ │ │ │ -_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 > *__sbin, │ │ │ │ - _b_a_s_i_c___s_t_r_e_a_m_b_u_f< _CharT, _Traits > *__sbout) │ │ │ │ -template │ │ │ │ -_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 > │ │ │ │ - *__sbin, _b_a_s_i_c___s_t_r_e_a_m_b_u_f< _CharT, _Traits > *__sbout, bool │ │ │ │ - &__ineof) │ │ │ │ +#define  _____g_l_i_b_c_x_x___c_l_a_s_s___r_e_q_u_i_r_e_s(_a, _b) │ │ │ │ +#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) │ │ │ │ +#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) │ │ │ │ +#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) │ │ │ │ +#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_._t_c_c. │ │ │ │ +attempt to use it directly. Instead, include . │ │ │ │ +Definition in file _c_o_n_c_e_p_t___c_h_e_c_k_._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. │ │ │ │ +********** _?◆_? ____gglliibbccxxxx__ccllaassss__rreeqquuiirreess ********** │ │ │ │ +#define __glibcxx_class_requires ( __aa, │ │ │ │ + __bb ) │ │ │ │ +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 ( __aa, │ │ │ │ + __bb, │ │ │ │ + __cc ) │ │ │ │ +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 ( __aa, │ │ │ │ + __bb, │ │ │ │ + __cc, │ │ │ │ + __dd ) │ │ │ │ +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 ( __aa, │ │ │ │ + __bb, │ │ │ │ + __cc, │ │ │ │ + __dd, │ │ │ │ + __ee ) │ │ │ │ +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. │ │ │ │ * bbiittss │ │ │ │ - * _s_t_r_e_a_m_b_u_f_._t_c_c │ │ │ │ + * _c_o_n_c_e_p_t___c_h_e_c_k_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.15.0 │ │ ├── ./usr/share/doc/gcc-11-base/libstdc++/user/a00389_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: streambuf.tcc Source File │ │ │ +libstdc++: concept_check.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -48,20 +48,20 @@ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
streambuf.tcc
│ │ │ +
concept_check.h
│ │ │
│ │ │
│ │ │ -Go to the documentation of this file.
1// Stream buffer classes -*- C++ -*-
│ │ │ +Go to the documentation of this file.
1// Concept-checking control -*- C++ -*-
│ │ │
2
│ │ │ -
3// Copyright (C) 1997-2021 Free Software Foundation, Inc.
│ │ │ +
3// Copyright (C) 2001-2021 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
│ │ │ @@ -75,191 +75,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// <http://www.gnu.org/licenses/>.
│ │ │
24
│ │ │ -
25/** @file bits/streambuf.tcc
│ │ │ +
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{streambuf}
│ │ │ +
27 * Do not attempt to use it directly. @headername{iterator}
│ │ │
28 */
│ │ │
29
│ │ │ -
30//
│ │ │ -
31// ISO C++ 14882: 27.5 Stream buffers
│ │ │ -
32//
│ │ │ -
33
│ │ │ -
34#ifndef _STREAMBUF_TCC
│ │ │ -
35#define _STREAMBUF_TCC 1
│ │ │ +
30#ifndef _CONCEPT_CHECK_H
│ │ │ +
31#define _CONCEPT_CHECK_H 1
│ │ │ +
32
│ │ │ +
33#pragma GCC system_header
│ │ │ +
34
│ │ │ +
35#include <bits/c++config.h>
│ │ │
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;
│ │ │ -
55 const streamsize __len = std::min(__buf_len, __remaining);
│ │ │ -
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>
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
80 xsputn(const char_type* __s, streamsize __n)
│ │ │ -
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;
│ │ │ -
89 const streamsize __len = std::min(__buf_len, __remaining);
│ │ │ -
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,
│ │ │ - │ │ │ -
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 extern template
│ │ │ - │ │ │ -
152 __copy_streambufs(basic_streambuf<char>*,
│ │ │ - │ │ │ -
154 extern template
│ │ │ - │ │ │ -
156 __copy_streambufs_eof(basic_streambuf<char>*,
│ │ │ -
157 basic_streambuf<char>*, bool&);
│ │ │ -
158
│ │ │ -
159#ifdef _GLIBCXX_USE_WCHAR_T
│ │ │ -
160 extern template class basic_streambuf<wchar_t>;
│ │ │ -
161 extern template
│ │ │ - │ │ │ -
163 __copy_streambufs(basic_streambuf<wchar_t>*,
│ │ │ - │ │ │ -
165 extern template
│ │ │ - │ │ │ -
167 __copy_streambufs_eof(basic_streambuf<wchar_t>*,
│ │ │ - │ │ │ -
169#endif
│ │ │ -
170#endif
│ │ │ -
171
│ │ │ -
172_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ -
173} // namespace std
│ │ │ -
174
│ │ │ -
175#endif
│ │ │ -
constexpr const _Tp & min(const _Tp &, const _Tp &)
This does what you think it does.
│ │ │ -
ISO C++ entities toplevel namespace is std.
│ │ │ -
ptrdiff_t streamsize
Integral type for I/O operation counts and buffer sizes.
Definition postypes.h:98
│ │ │ -
The actual work of input and output (interface).
Definition streambuf:123
│ │ │ -
traits_type::int_type int_type
Definition streambuf:133
│ │ │ -
char_type * epptr() const
Access to the put area.
Definition streambuf:540
│ │ │ -
virtual int_type overflow(int_type __c=traits_type::eof())
Consumes data from the buffer; writes to the controlled sequence.
Definition streambuf:773
│ │ │ -
virtual streamsize xsputn(const char_type *__s, streamsize __n)
Multiple character insertion.
Definition streambuf.tcc:80
│ │ │ -
char_type * pptr() const
Access to the put area.
Definition streambuf:537
│ │ │ - │ │ │ -
virtual int_type uflow()
Fetches more data from the controlled sequence.
Definition streambuf:705
│ │ │ -
char_type * egptr() const
Access to the get area.
Definition streambuf:493
│ │ │ -
char_type * gptr() const
Access to the get area.
Definition streambuf:490
│ │ │ -
virtual streamsize xsgetn(char_type *__s, streamsize __n)
Multiple character extraction.
Definition streambuf.tcc:46
│ │ │ -
int_type snextc()
Getting the next character.
Definition streambuf:303
│ │ │ -
int_type sgetc()
Getting the next character.
Definition streambuf:343
│ │ │ -
int_type sputc(char_type __c)
Entry point for all single-character output functions.
Definition streambuf:429
│ │ │ +
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.tcc │ │ │ │ +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// Stream buffer classes -*- C++ -*- │ │ │ │ +1// Concept-checking control -*- C++ -*- │ │ │ │ 2 │ │ │ │ -3// Copyright (C) 1997-2021 Free Software Foundation, Inc. │ │ │ │ +3// Copyright (C) 2001-2021 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,224 +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.tcc │ │ │ │ +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{streambuf} │ │ │ │ +27 * Do not attempt to use it directly. @headername{iterator} │ │ │ │ 28 */ │ │ │ │ 29 │ │ │ │ -30// │ │ │ │ -31// ISO C++ 14882: 27.5 Stream buffers │ │ │ │ -32// │ │ │ │ -33 │ │ │ │ -34#ifndef _STREAMBUF_TCC │ │ │ │ -35#define _STREAMBUF_TCC 1 │ │ │ │ +30#ifndef _CONCEPT_CHECK_H │ │ │ │ +31#define _CONCEPT_CHECK_H 1 │ │ │ │ +32 │ │ │ │ +33#pragma GCC system_header │ │ │ │ +34 │ │ │ │ +35#include <_b_i_t_s_/_c_+_+_c_o_n_f_i_g_._h> │ │ │ │ 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 __ret = 0; │ │ │ │ -49 while (__ret < __n) │ │ │ │ -50 { │ │ │ │ -51 const _s_t_r_e_a_m_s_i_z_e __buf_len = this->_e_g_p_t_r() - this->_g_p_t_r(); │ │ │ │ -52 if (__buf_len) │ │ │ │ -53 { │ │ │ │ -54 const _s_t_r_e_a_m_s_i_z_e __remaining = __n - __ret; │ │ │ │ -55 const _s_t_r_e_a_m_s_i_z_e __len = _s_t_d_:_:_m_i_n(__buf_len, __remaining); │ │ │ │ -56 traits_type::copy(__s, this->_g_p_t_r(), __len); │ │ │ │ -57 __ret += __len; │ │ │ │ -58 __s += __len; │ │ │ │ -59 this->__safe_gbump(__len); │ │ │ │ -60 } │ │ │ │ -61 │ │ │ │ -62 if (__ret < __n) │ │ │ │ -63 { │ │ │ │ -64 const _i_n_t___t_y_p_e __c = this->_u_f_l_o_w(); │ │ │ │ -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 │ │ │ │ -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 __ret = 0; │ │ │ │ -83 while (__ret < __n) │ │ │ │ -84 { │ │ │ │ -85 const _s_t_r_e_a_m_s_i_z_e __buf_len = this->_e_p_p_t_r() - this->_p_p_t_r(); │ │ │ │ -86 if (__buf_len) │ │ │ │ -87 { │ │ │ │ -88 const _s_t_r_e_a_m_s_i_z_e __remaining = __n - __ret; │ │ │ │ -89 const _s_t_r_e_a_m_s_i_z_e __len = _s_t_d_:_:_m_i_n(__buf_len, __remaining); │ │ │ │ -90 traits_type::copy(this->_p_p_t_r(), __s, __len); │ │ │ │ -91 __ret += __len; │ │ │ │ -92 __s += __len; │ │ │ │ -93 this->__safe_pbump(__len); │ │ │ │ -94 } │ │ │ │ -95 │ │ │ │ -96 if (__ret < __n) │ │ │ │ -97 { │ │ │ │ -98 _i_n_t___t_y_p_e __c = this->_o_v_e_r_f_l_o_w(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 │ │ │ │ -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_>* __sbin, │ │ │ │ -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_>* __sbout, │ │ │ │ -118 bool& __ineof) │ │ │ │ -119 { │ │ │ │ -120 _s_t_r_e_a_m_s_i_z_e __ret = 0; │ │ │ │ -121 __ineof = true; │ │ │ │ -122 typename _Traits::int_type __c = __sbin->_s_g_e_t_c(); │ │ │ │ -123 while (!_Traits::eq_int_type(__c, _Traits::eof())) │ │ │ │ -124 { │ │ │ │ -125 __c = __sbout->_s_p_u_t_c(_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->_s_n_e_x_t_c(); │ │ │ │ -133 } │ │ │ │ -134 return __ret; │ │ │ │ -135 } │ │ │ │ -136 │ │ │ │ -137 template │ │ │ │ -138 inline _s_t_r_e_a_m_s_i_z_e │ │ │ │ -139 __copy_streambufs(_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_>* __sbin, │ │ │ │ -140 _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_>* __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 _b_a_s_i_c___s_t_r_e_a_m_b_u_f_<_c_h_a_r_>; │ │ │ │ -150 extern template │ │ │ │ -151 _s_t_r_e_a_m_s_i_z_e │ │ │ │ -152 __copy_streambufs(_b_a_s_i_c___s_t_r_e_a_m_b_u_f_<_c_h_a_r_>*, │ │ │ │ -153 _b_a_s_i_c___s_t_r_e_a_m_b_u_f_<_c_h_a_r_>*); │ │ │ │ -154 extern template │ │ │ │ -155 _s_t_r_e_a_m_s_i_z_e │ │ │ │ -156 __copy_streambufs_eof(_b_a_s_i_c___s_t_r_e_a_m_b_u_f_<_c_h_a_r_>*, │ │ │ │ -157 _b_a_s_i_c___s_t_r_e_a_m_b_u_f_<_c_h_a_r_>*, bool&); │ │ │ │ -158 │ │ │ │ -159#ifdef _GLIBCXX_USE_WCHAR_T │ │ │ │ -160 extern template class _b_a_s_i_c___s_t_r_e_a_m_b_u_f_<_w_c_h_a_r___t_>; │ │ │ │ -161 extern template │ │ │ │ -162 _s_t_r_e_a_m_s_i_z_e │ │ │ │ -163 __copy_streambufs(_b_a_s_i_c___s_t_r_e_a_m_b_u_f_<_w_c_h_a_r___t_>*, │ │ │ │ -164 _b_a_s_i_c___s_t_r_e_a_m_b_u_f_<_w_c_h_a_r___t_>*); │ │ │ │ -165 extern template │ │ │ │ -166 _s_t_r_e_a_m_s_i_z_e │ │ │ │ -167 __copy_streambufs_eof(_b_a_s_i_c___s_t_r_e_a_m_b_u_f_<_w_c_h_a_r___t_>*, │ │ │ │ -168 _b_a_s_i_c___s_t_r_e_a_m_b_u_f_<_w_c_h_a_r___t_>*, bool&); │ │ │ │ -169#endif │ │ │ │ -170#endif │ │ │ │ -171 │ │ │ │ -172_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ -173} // namespace std │ │ │ │ -174 │ │ │ │ -175#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 │ │ │ │ -_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_:_9_8 │ │ │ │ -_s_t_d_:_:_b_a_s_i_c___s_t_r_e_a_m_b_u_f │ │ │ │ -The actual work of input and output (interface). │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m_b_u_f_:_1_2_3 │ │ │ │ -_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_:_:_e_p_p_t_r │ │ │ │ -char_type * epptr() const │ │ │ │ -Access to the put area. │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m_b_u_f_:_5_4_0 │ │ │ │ -_s_t_d_:_:_b_a_s_i_c___s_t_r_e_a_m_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_t_r_e_a_m_b_u_f_:_7_7_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_:_:_p_p_t_r │ │ │ │ -char_type * pptr() const │ │ │ │ -Access to the put area. │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m_b_u_f_:_5_3_7 │ │ │ │ -_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_:_:_u_f_l_o_w │ │ │ │ -virtual int_type uflow() │ │ │ │ -Fetches more data from the controlled sequence. │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m_b_u_f_:_7_0_5 │ │ │ │ -_s_t_d_:_:_b_a_s_i_c___s_t_r_e_a_m_b_u_f_:_:_e_g_p_t_r │ │ │ │ -char_type * egptr() const │ │ │ │ -Access to the get area. │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m_b_u_f_:_4_9_3 │ │ │ │ -_s_t_d_:_:_b_a_s_i_c___s_t_r_e_a_m_b_u_f_:_:_g_p_t_r │ │ │ │ -char_type * gptr() const │ │ │ │ -Access to the get area. │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m_b_u_f_:_4_9_0 │ │ │ │ -_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_:_:_b_a_s_i_c___s_t_r_e_a_m_b_u_f_:_:_s_n_e_x_t_c │ │ │ │ -int_type snextc() │ │ │ │ -Getting the next character. │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m_b_u_f_:_3_0_3 │ │ │ │ -_s_t_d_:_:_b_a_s_i_c___s_t_r_e_a_m_b_u_f_:_:_s_g_e_t_c │ │ │ │ -int_type sgetc() │ │ │ │ -Getting the next character. │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m_b_u_f_:_3_4_3 │ │ │ │ -_s_t_d_:_:_b_a_s_i_c___s_t_r_e_a_m_b_u_f_:_:_s_p_u_t_c │ │ │ │ -int_type sputc(char_type __c) │ │ │ │ -Entry point for all single-character output functions. │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m_b_u_f_:_4_2_9 │ │ │ │ +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 │ │ │ │ +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 │ │ │ │ * bbiittss │ │ │ │ - * _s_t_r_e_a_m_b_u_f_._t_c_c │ │ │ │ + * _c_o_n_c_e_p_t___c_h_e_c_k_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.15.0 │ │ ├── ./usr/share/doc/gcc-11-base/libstdc++/user/a00392.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: streambuf_iterator.h File Reference │ │ │ +libstdc++: sstream.tcc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -48,66 +48,61 @@ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
streambuf_iterator.h File Reference
│ │ │ +
sstream.tcc 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)
template<typename _CharT, typename _Traits>
bool std::operator== (const istreambuf_iterator< _CharT, _Traits > &__a, const istreambuf_iterator< _CharT, _Traits > &__b)

│ │ │ +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

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

Definition in file streambuf_iterator.h.

│ │ │ -
│ │ │ +

Definition at line 35 of file sstream.tcc.

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ +
│ │ │
│ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,55 +1,18 @@ │ │ │ │ libstdc++ │ │ │ │ -streambuf_iterator.h File Reference │ │ │ │ +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_b_u_f___i_t_e_r_a_t_o_r_<_ ___C_h_a_r_T_,_ ___T_r_a_i_t_s_ _> │ │ │ │ -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_ _> │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _s_t_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) │ │ │ │ -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 │ │ │ │ - __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 > __it, _Size __n, _CharT │ │ │ │ - *__result, bool __strict) │ │ │ │ -template │ │ │ │ - __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, void >::__type  _CharT > &__i, _Distance __n) │ │ │ │ -template │ │ │ │ - __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 │ │ │ │ - __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 │ │ │ │ - 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) │ │ │ │ -template │ │ │ │ - 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) │ │ │ │ +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_b_u_f___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. │ │ │ │ * bbiittss │ │ │ │ - * _s_t_r_e_a_m_b_u_f___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.15.0 │ │ ├── ./usr/share/doc/gcc-11-base/libstdc++/user/a00392_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: streambuf_iterator.h Source File │ │ │ +libstdc++: sstream.tcc Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -48,18 +48,18 @@ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
streambuf_iterator.h
│ │ │ +
sstream.tcc
│ │ │
│ │ │
│ │ │ -Go to the documentation of this file.
1// Streambuf iterators
│ │ │ +Go to the documentation of this file.
1// String based streams -*- C++ -*-
│ │ │
2
│ │ │
3// Copyright (C) 1997-2021 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)
│ │ │ @@ -75,573 +75,344 @@ │ │ │
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/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 _STREAMBUF_ITERATOR_H
│ │ │ -
31#define _STREAMBUF_ITERATOR_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 // 24.5.3 Template class istreambuf_iterator
│ │ │ -
48 /// Provides input iterator semantics for streambufs.
│ │ │ -
49 template<typename _CharT, typename _Traits>
│ │ │ -
│ │ │ - │ │ │ -
51 : public iterator<input_iterator_tag, _CharT, typename _Traits::off_type,
│ │ │ -
52 _CharT*, _CharT>
│ │ │ -
53 {
│ │ │ -
54 public:
│ │ │ -
55 // Types:
│ │ │ -
56 ///@{
│ │ │ -
57 /// Public typedefs
│ │ │ -
58#if __cplusplus < 201103L
│ │ │ -
59 typedef _CharT& reference; // Changed to _CharT by LWG 445
│ │ │ -
60#elif __cplusplus > 201703L
│ │ │ -
61 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ -
62 // 3188. istreambuf_iterator::pointer should not be unspecified
│ │ │ -
63 using pointer = void;
│ │ │ -
64#endif
│ │ │ -
65
│ │ │ -
66 typedef _CharT char_type;
│ │ │ -
67 typedef _Traits traits_type;
│ │ │ -
68 typedef typename _Traits::int_type int_type;
│ │ │ - │ │ │ - │ │ │ -
71 ///@}
│ │ │ -
72
│ │ │ -
73 template<typename _CharT2>
│ │ │ -
74 friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value,
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
78
│ │ │ -
79 template<bool _IsMove, typename _CharT2>
│ │ │ -
80 friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value,
│ │ │ -
81 _CharT2*>::__type
│ │ │ -
82 __copy_move_a2(istreambuf_iterator<_CharT2>,
│ │ │ - │ │ │ -
84
│ │ │ -
85 template<typename _CharT2, typename _Size>
│ │ │ -
86 friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value,
│ │ │ -
87 _CharT2*>::__type
│ │ │ -
88 __copy_n_a(istreambuf_iterator<_CharT2>, _Size, _CharT2*, bool);
│ │ │ +
30//
│ │ │ +
31// ISO C++ 14882: 27.7 String-based streams
│ │ │ +
32//
│ │ │ +
33
│ │ │ +
34#ifndef _SSTREAM_TCC
│ │ │ +
35#define _SSTREAM_TCC 1
│ │ │ +
36
│ │ │ +
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 template<typename _CharT2>
│ │ │ -
91 friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value,
│ │ │ - │ │ │ - │ │ │ -
94 const _CharT2&);
│ │ │ -
95
│ │ │ -
96 template<typename _CharT2, typename _Distance>
│ │ │ -
97 friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value,
│ │ │ -
98 void>::__type
│ │ │ -
99 advance(istreambuf_iterator<_CharT2>&, _Distance);
│ │ │ -
100
│ │ │ -
101 private:
│ │ │ -
102 // 24.5.3 istreambuf_iterator
│ │ │ -
103 // p 1
│ │ │ -
104 // If the end of stream is reached (streambuf_type::sgetc()
│ │ │ -
105 // returns traits_type::eof()), the iterator becomes equal to
│ │ │ -
106 // the "end of stream" iterator value.
│ │ │ -
107 // NB: This implementation assumes the "end of stream" value
│ │ │ -
108 // is EOF, or -1.
│ │ │ -
109 mutable streambuf_type* _M_sbuf;
│ │ │ -
110 int_type _M_c;
│ │ │ -
111
│ │ │ -
112 public:
│ │ │ -
113 /// Construct end of input stream iterator.
│ │ │ -
│ │ │ -
114 _GLIBCXX_CONSTEXPR istreambuf_iterator() _GLIBCXX_USE_NOEXCEPT
│ │ │ -
115 : _M_sbuf(0), _M_c(traits_type::eof()) { }
│ │ │ -
│ │ │ -
116
│ │ │ -
117#if __cplusplus > 201703L && __cpp_lib_concepts
│ │ │ -
118 constexpr istreambuf_iterator(default_sentinel_t) noexcept
│ │ │ -
119 : istreambuf_iterator() { }
│ │ │ -
120#endif
│ │ │ -
121
│ │ │ -
122#if __cplusplus >= 201103L
│ │ │ -
123 istreambuf_iterator(const istreambuf_iterator&) noexcept = default;
│ │ │ -
124
│ │ │ -
125 ~istreambuf_iterator() = default;
│ │ │ -
126#endif
│ │ │ -
127
│ │ │ -
128 /// Construct start of input stream iterator.
│ │ │ -
│ │ │ -
129 istreambuf_iterator(istream_type& __s) _GLIBCXX_USE_NOEXCEPT
│ │ │ -
130 : _M_sbuf(__s.rdbuf()), _M_c(traits_type::eof()) { }
│ │ │ -
│ │ │ -
131
│ │ │ -
132 /// Construct start of streambuf iterator.
│ │ │ -
│ │ │ -
133 istreambuf_iterator(streambuf_type* __s) _GLIBCXX_USE_NOEXCEPT
│ │ │ -
134 : _M_sbuf(__s), _M_c(traits_type::eof()) { }
│ │ │ -
│ │ │ -
135
│ │ │ -
136#if __cplusplus >= 201103L
│ │ │ - │ │ │ -
138 operator=(const istreambuf_iterator&) noexcept = default;
│ │ │ -
139#endif
│ │ │ -
140
│ │ │ -
141 /// Return the current character pointed to by iterator. This returns
│ │ │ -
142 /// streambuf.sgetc(). It cannot be assigned. NB: The result of
│ │ │ -
143 /// operator*() on an end of stream is undefined.
│ │ │ -
144 char_type
│ │ │ -
│ │ │ -
145 operator*() const
│ │ │ -
146 {
│ │ │ -
147 int_type __c = _M_get();
│ │ │ -
148
│ │ │ -
149#ifdef _GLIBCXX_DEBUG_PEDANTIC
│ │ │ -
150 // Dereferencing a past-the-end istreambuf_iterator is a
│ │ │ -
151 // libstdc++ extension
│ │ │ -
152 __glibcxx_requires_cond(!_S_is_eof(__c),
│ │ │ -
153 _M_message(__gnu_debug::__msg_deref_istreambuf)
│ │ │ -
154 ._M_iterator(*this));
│ │ │ -
155#endif
│ │ │ -
156 return traits_type::to_char_type(__c);
│ │ │ -
157 }
│ │ │ -
│ │ │ -
158
│ │ │ -
159 /// Advance the iterator. Calls streambuf.sbumpc().
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
162 {
│ │ │ -
163 __glibcxx_requires_cond(_M_sbuf &&
│ │ │ -
164 (!_S_is_eof(_M_c) || !_S_is_eof(_M_sbuf->sgetc())),
│ │ │ -
165 _M_message(__gnu_debug::__msg_inc_istreambuf)
│ │ │ -
166 ._M_iterator(*this));
│ │ │ -
167
│ │ │ -
168 _M_sbuf->sbumpc();
│ │ │ -
169 _M_c = traits_type::eof();
│ │ │ -
170 return *this;
│ │ │ -
171 }
│ │ │ -
│ │ │ -
172
│ │ │ -
173 /// Advance the iterator. Calls streambuf.sbumpc().
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
176 {
│ │ │ -
177 __glibcxx_requires_cond(_M_sbuf &&
│ │ │ -
178 (!_S_is_eof(_M_c) || !_S_is_eof(_M_sbuf->sgetc())),
│ │ │ -
179 _M_message(__gnu_debug::__msg_inc_istreambuf)
│ │ │ -
180 ._M_iterator(*this));
│ │ │ -
181
│ │ │ -
182 istreambuf_iterator __old = *this;
│ │ │ -
183 __old._M_c = _M_sbuf->sbumpc();
│ │ │ -
184 _M_c = traits_type::eof();
│ │ │ -
185 return __old;
│ │ │ -
186 }
│ │ │ -
│ │ │ -
187
│ │ │ -
188 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ -
189 // 110 istreambuf_iterator::equal not const
│ │ │ -
190 // NB: there is also number 111 (NAD) relevant to this function.
│ │ │ -
191 /// Return true both iterators are end or both are not end.
│ │ │ -
192 bool
│ │ │ -
│ │ │ -
193 equal(const istreambuf_iterator& __b) const
│ │ │ -
194 { return _M_at_eof() == __b._M_at_eof(); }
│ │ │ -
│ │ │ -
195
│ │ │ -
196 private:
│ │ │ - │ │ │ -
198 _M_get() const
│ │ │ -
199 {
│ │ │ -
200 int_type __ret = _M_c;
│ │ │ -
201 if (_M_sbuf && _S_is_eof(__ret) && _S_is_eof(__ret = _M_sbuf->sgetc()))
│ │ │ -
202 _M_sbuf = 0;
│ │ │ -
203 return __ret;
│ │ │ -
204 }
│ │ │ -
205
│ │ │ -
206 bool
│ │ │ -
207 _M_at_eof() const
│ │ │ -
208 { return _S_is_eof(_M_get()); }
│ │ │ -
209
│ │ │ -
210 static bool
│ │ │ -
211 _S_is_eof(int_type __c)
│ │ │ -
212 {
│ │ │ -
213 const int_type __eof = traits_type::eof();
│ │ │ -
214 return traits_type::eq_int_type(__c, __eof);
│ │ │ -
215 }
│ │ │ -
216
│ │ │ -
217#if __cplusplus > 201703L && __cpp_lib_concepts
│ │ │ -
218 friend bool
│ │ │ -
219 operator==(const istreambuf_iterator& __i, default_sentinel_t __s)
│ │ │ -
220 { return __i._M_at_eof(); }
│ │ │ -
221#endif
│ │ │ -
222 };
│ │ │ -
│ │ │ -
223
│ │ │ -
224 template<typename _CharT, typename _Traits>
│ │ │ -
225 inline bool
│ │ │ -
226 operator==(const istreambuf_iterator<_CharT, _Traits>& __a,
│ │ │ - │ │ │ -
228 { return __a.equal(__b); }
│ │ │ -
229
│ │ │ -
230 template<typename _CharT, typename _Traits>
│ │ │ -
231 inline bool
│ │ │ -
232 operator!=(const istreambuf_iterator<_CharT, _Traits>& __a,
│ │ │ - │ │ │ -
234 { return !__a.equal(__b); }
│ │ │ -
235
│ │ │ -
236 /// Provides output iterator semantics for streambufs.
│ │ │ -
237 template<typename _CharT, typename _Traits>
│ │ │ -
│ │ │ - │ │ │ -
239 : public iterator<output_iterator_tag, void, void, void, void>
│ │ │ -
240 {
│ │ │ -
241 public:
│ │ │ -
242 // Types:
│ │ │ -
243 ///@{
│ │ │ -
244 /// Public typedefs
│ │ │ -
245#if __cplusplus > 201703L
│ │ │ -
246 using difference_type = ptrdiff_t;
│ │ │ -
247#endif
│ │ │ -
248 typedef _CharT char_type;
│ │ │ -
249 typedef _Traits traits_type;
│ │ │ - │ │ │ - │ │ │ -
252 ///@}
│ │ │ -
253
│ │ │ -
254 template<typename _CharT2>
│ │ │ -
255 friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value,
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
259
│ │ │ -
260 private:
│ │ │ -
261 streambuf_type* _M_sbuf;
│ │ │ -
262 bool _M_failed;
│ │ │ -
263
│ │ │ -
264 public:
│ │ │ -
265
│ │ │ -
266#if __cplusplus > 201703L
│ │ │ -
267 constexpr
│ │ │ -
268 ostreambuf_iterator() noexcept
│ │ │ -
269 : _M_sbuf(nullptr), _M_failed(true) { }
│ │ │ -
270#endif
│ │ │ -
271
│ │ │ -
272 /// Construct output iterator from ostream.
│ │ │ -
│ │ │ -
273 ostreambuf_iterator(ostream_type& __s) _GLIBCXX_USE_NOEXCEPT
│ │ │ -
274 : _M_sbuf(__s.rdbuf()), _M_failed(!_M_sbuf) { }
│ │ │ -
│ │ │ -
275
│ │ │ -
276 /// Construct output iterator from streambuf.
│ │ │ -
│ │ │ -
277 ostreambuf_iterator(streambuf_type* __s) _GLIBCXX_USE_NOEXCEPT
│ │ │ -
278 : _M_sbuf(__s), _M_failed(!_M_sbuf) { }
│ │ │ -
│ │ │ -
279
│ │ │ -
280 /// Write character to streambuf. Calls streambuf.sputc().
│ │ │ - │ │ │ -
│ │ │ -
282 operator=(_CharT __c)
│ │ │ -
283 {
│ │ │ -
284 if (!_M_failed &&
│ │ │ -
285 _Traits::eq_int_type(_M_sbuf->sputc(__c), _Traits::eof()))
│ │ │ -
286 _M_failed = true;
│ │ │ -
287 return *this;
│ │ │ -
288 }
│ │ │ -
│ │ │ -
289
│ │ │ -
290 /// Return *this.
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
293 { return *this; }
│ │ │ -
│ │ │ -
294
│ │ │ -
295 /// Return *this.
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
298 { return *this; }
│ │ │ -
│ │ │ -
299
│ │ │ -
300 /// Return *this.
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
303 { return *this; }
│ │ │ -
│ │ │ -
304
│ │ │ -
305 /// Return true if previous operator=() failed.
│ │ │ -
306 bool
│ │ │ -
│ │ │ -
307 failed() const _GLIBCXX_USE_NOEXCEPT
│ │ │ -
308 { return _M_failed; }
│ │ │ -
│ │ │ -
309
│ │ │ - │ │ │ -
311 _M_put(const _CharT* __ws, streamsize __len)
│ │ │ -
312 {
│ │ │ -
313 if (__builtin_expect(!_M_failed, true)
│ │ │ -
314 && __builtin_expect(this->_M_sbuf->sputn(__ws, __len) != __len,
│ │ │ -
315 false))
│ │ │ -
316 _M_failed = true;
│ │ │ -
317 return *this;
│ │ │ -
318 }
│ │ │ -
319 };
│ │ │ -
│ │ │ -
320
│ │ │ -
321 // Overloads for streambuf iterators.
│ │ │ -
322 template<typename _CharT>
│ │ │ -
323 typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
│ │ │ - │ │ │ -
325 copy(istreambuf_iterator<_CharT> __first,
│ │ │ - │ │ │ - │ │ │ -
328 {
│ │ │ -
329 if (__first._M_sbuf && !__last._M_sbuf && !__result._M_failed)
│ │ │ -
330 {
│ │ │ -
331 bool __ineof;
│ │ │ -
332 __copy_streambufs_eof(__first._M_sbuf, __result._M_sbuf, __ineof);
│ │ │ -
333 if (!__ineof)
│ │ │ -
334 __result._M_failed = true;
│ │ │ -
335 }
│ │ │ -
336 return __result;
│ │ │ -
337 }
│ │ │ -
338
│ │ │ -
339 template<bool _IsMove, typename _CharT>
│ │ │ -
340 typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
│ │ │ - │ │ │ -
342 __copy_move_a2(_CharT* __first, _CharT* __last,
│ │ │ - │ │ │ -
344 {
│ │ │ -
345 const streamsize __num = __last - __first;
│ │ │ -
346 if (__num > 0)
│ │ │ -
347 __result._M_put(__first, __num);
│ │ │ -
348 return __result;
│ │ │ -
349 }
│ │ │ -
350
│ │ │ -
351 template<bool _IsMove, typename _CharT>
│ │ │ -
352 typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
│ │ │ - │ │ │ -
354 __copy_move_a2(const _CharT* __first, const _CharT* __last,
│ │ │ - │ │ │ -
356 {
│ │ │ -
357 const streamsize __num = __last - __first;
│ │ │ -
358 if (__num > 0)
│ │ │ -
359 __result._M_put(__first, __num);
│ │ │ -
360 return __result;
│ │ │ -
361 }
│ │ │ -
362
│ │ │ -
363 template<bool _IsMove, typename _CharT>
│ │ │ -
364 typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
│ │ │ -
365 _CharT*>::__type
│ │ │ -
366 __copy_move_a2(istreambuf_iterator<_CharT> __first,
│ │ │ -
367 istreambuf_iterator<_CharT> __last, _CharT* __result)
│ │ │ -
368 {
│ │ │ -
369 typedef istreambuf_iterator<_CharT> __is_iterator_type;
│ │ │ -
370 typedef typename __is_iterator_type::traits_type traits_type;
│ │ │ -
371 typedef typename __is_iterator_type::streambuf_type streambuf_type;
│ │ │ -
372 typedef typename traits_type::int_type int_type;
│ │ │ -
373
│ │ │ -
374 if (__first._M_sbuf && !__last._M_sbuf)
│ │ │ -
375 {
│ │ │ -
376 streambuf_type* __sb = __first._M_sbuf;
│ │ │ -
377 int_type __c = __sb->sgetc();
│ │ │ -
378 while (!traits_type::eq_int_type(__c, traits_type::eof()))
│ │ │ -
379 {
│ │ │ -
380 const streamsize __n = __sb->egptr() - __sb->gptr();
│ │ │ -
381 if (__n > 1)
│ │ │ -
382 {
│ │ │ -
383 traits_type::copy(__result, __sb->gptr(), __n);
│ │ │ -
384 __sb->__safe_gbump(__n);
│ │ │ -
385 __result += __n;
│ │ │ -
386 __c = __sb->underflow();
│ │ │ -
387 }
│ │ │ -
388 else
│ │ │ -
389 {
│ │ │ -
390 *__result++ = traits_type::to_char_type(__c);
│ │ │ -
391 __c = __sb->snextc();
│ │ │ -
392 }
│ │ │ -
393 }
│ │ │ -
394 }
│ │ │ -
395 return __result;
│ │ │ -
396 }
│ │ │ -
397
│ │ │ -
398 template<typename _CharT, typename _Size>
│ │ │ -
399 typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
│ │ │ -
400 _CharT*>::__type
│ │ │ -
401 __copy_n_a(istreambuf_iterator<_CharT> __it, _Size __n, _CharT* __result,
│ │ │ -
402 bool __strict __attribute__((__unused__)))
│ │ │ -
403 {
│ │ │ -
404 if (__n == 0)
│ │ │ -
405 return __result;
│ │ │ -
406
│ │ │ -
407 __glibcxx_requires_cond(__it._M_sbuf,
│ │ │ -
408 _M_message(__gnu_debug::__msg_inc_istreambuf)
│ │ │ -
409 ._M_iterator(__it));
│ │ │ -
410 _CharT* __beg = __result;
│ │ │ -
411 __result += __it._M_sbuf->sgetn(__beg, __n);
│ │ │ -
412 __glibcxx_requires_cond(!__strict || __result - __beg == __n,
│ │ │ -
413 _M_message(__gnu_debug::__msg_inc_istreambuf)
│ │ │ -
414 ._M_iterator(__it));
│ │ │ -
415 return __result;
│ │ │ -
416 }
│ │ │ -
417
│ │ │ -
418 template<typename _CharT>
│ │ │ -
419 typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
│ │ │ - │ │ │ -
421 find(istreambuf_iterator<_CharT> __first,
│ │ │ -
422 istreambuf_iterator<_CharT> __last, const _CharT& __val)
│ │ │ -
423 {
│ │ │ -
424 typedef istreambuf_iterator<_CharT> __is_iterator_type;
│ │ │ -
425 typedef typename __is_iterator_type::traits_type traits_type;
│ │ │ -
426 typedef typename __is_iterator_type::streambuf_type streambuf_type;
│ │ │ -
427 typedef typename traits_type::int_type int_type;
│ │ │ -
428 const int_type __eof = traits_type::eof();
│ │ │ -
429
│ │ │ -
430 if (__first._M_sbuf && !__last._M_sbuf)
│ │ │ -
431 {
│ │ │ -
432 const int_type __ival = traits_type::to_int_type(__val);
│ │ │ -
433 streambuf_type* __sb = __first._M_sbuf;
│ │ │ -
434 int_type __c = __sb->sgetc();
│ │ │ -
435 while (!traits_type::eq_int_type(__c, __eof)
│ │ │ -
436 && !traits_type::eq_int_type(__c, __ival))
│ │ │ -
437 {
│ │ │ -
438 streamsize __n = __sb->egptr() - __sb->gptr();
│ │ │ -
439 if (__n > 1)
│ │ │ -
440 {
│ │ │ -
441 const _CharT* __p = traits_type::find(__sb->gptr(),
│ │ │ -
442 __n, __val);
│ │ │ -
443 if (__p)
│ │ │ -
444 __n = __p - __sb->gptr();
│ │ │ -
445 __sb->__safe_gbump(__n);
│ │ │ -
446 __c = __sb->sgetc();
│ │ │ -
447 }
│ │ │ -
448 else
│ │ │ -
449 __c = __sb->snextc();
│ │ │ -
450 }
│ │ │ -
451
│ │ │ -
452 __first._M_c = __eof;
│ │ │ -
453 }
│ │ │ -
454
│ │ │ -
455 return __first;
│ │ │ -
456 }
│ │ │ -
457
│ │ │ -
458 template<typename _CharT, typename _Distance>
│ │ │ -
459 typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
│ │ │ -
460 void>::__type
│ │ │ -
461 advance(istreambuf_iterator<_CharT>& __i, _Distance __n)
│ │ │ -
462 {
│ │ │ -
463 if (__n == 0)
│ │ │ -
464 return;
│ │ │ -
465
│ │ │ -
466 __glibcxx_assert(__n > 0);
│ │ │ -
467 __glibcxx_requires_cond(!__i._M_at_eof(),
│ │ │ -
468 _M_message(__gnu_debug::__msg_inc_istreambuf)
│ │ │ -
469 ._M_iterator(__i));
│ │ │ -
470
│ │ │ -
471 typedef istreambuf_iterator<_CharT> __is_iterator_type;
│ │ │ -
472 typedef typename __is_iterator_type::traits_type traits_type;
│ │ │ -
473 typedef typename __is_iterator_type::streambuf_type streambuf_type;
│ │ │ -
474 typedef typename traits_type::int_type int_type;
│ │ │ -
475 const int_type __eof = traits_type::eof();
│ │ │ -
476
│ │ │ -
477 streambuf_type* __sb = __i._M_sbuf;
│ │ │ -
478 while (__n > 0)
│ │ │ -
479 {
│ │ │ -
480 streamsize __size = __sb->egptr() - __sb->gptr();
│ │ │ -
481 if (__size > __n)
│ │ │ -
482 {
│ │ │ -
483 __sb->__safe_gbump(__n);
│ │ │ -
484 break;
│ │ │ -
485 }
│ │ │ -
486
│ │ │ -
487 __sb->__safe_gbump(__size);
│ │ │ -
488 __n -= __size;
│ │ │ -
489 if (traits_type::eq_int_type(__sb->underflow(), __eof))
│ │ │ -
490 {
│ │ │ -
491 __glibcxx_requires_cond(__n == 0,
│ │ │ -
492 _M_message(__gnu_debug::__msg_inc_istreambuf)
│ │ │ -
493 ._M_iterator(__i));
│ │ │ -
494 break;
│ │ │ -
495 }
│ │ │ -
496 }
│ │ │ -
497
│ │ │ -
498 __i._M_c = __eof;
│ │ │ -
499 }
│ │ │ -
500
│ │ │ -
501/// @} group iterators
│ │ │ -
502
│ │ │ -
503_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ -
504} // namespace
│ │ │ -
505
│ │ │ -
506#endif
│ │ │ - │ │ │ - │ │ │ +
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());
│ │ │ + │ │ │ +
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();
│ │ │ +
112 if (__builtin_expect(!__testput && __capacity == __max_size, 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 __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;
│ │ │ +
174 __testin &= !(__mode & ios_base::out);
│ │ │ +
175 __testout &= !(__mode & ios_base::in);
│ │ │ +
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
│ │ │ + │ │ │ +
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.
│ │ │ -
ptrdiff_t streamsize
Integral type for I/O operation counts and buffer sizes.
Definition postypes.h:98
│ │ │ -
constexpr void advance(_InputIterator &__i, _Distance __n)
A generalization of pointer arithmetic.
│ │ │ -
The actual work of input and output (interface).
Definition streambuf:123
│ │ │ -
streamsize sputn(const char_type *__s, streamsize __n)
Entry point for all single-character output functions.
Definition streambuf:455
│ │ │ -
int_type sgetc()
Getting the next character.
Definition streambuf:343
│ │ │ -
Template class basic_istream.
Definition istream:59
│ │ │ -
Template class basic_ostream.
Definition ostream:59
│ │ │ -
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.
│ │ │ -
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.
│ │ │ - │ │ │ - │ │ │ - │ │ │ +
char_type * epptr() const
Access to the put area.
Definition streambuf:540
│ │ │ +
char_type * pptr() const
Access to the put area.
Definition streambuf:537
│ │ │ +
void setg(char_type *__gbeg, char_type *__gnext, char_type *__gend)
Setting the three read area pointers.
Definition streambuf:514
│ │ │ +
char_type * eback() const
Access to the get area.
Definition streambuf:487
│ │ │ +
char_type * egptr() const
Access to the get area.
Definition streambuf:493
│ │ │ +
char_type * gptr() const
Access to the get area.
Definition streambuf:490
│ │ │ +
void gbump(int __n)
Moving the read position.
Definition streambuf:503
│ │ │ +
void pbump(int __n)
Moving the write position.
Definition streambuf:550
│ │ │ +
char_type * pbase() const
Access to the put area.
Definition streambuf:534
│ │ │ +
The actual work of input and output (for std::string).
Definition sstream:73
│ │ │ +
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
│ │ │ +
ios_base::openmode _M_mode
Place to stash in || out || in | out settings for current stringbuf.
Definition sstream:99
│ │ │ +
Controlling input for std::string.
Definition sstream:538
│ │ │ +
Controlling output for std::string.
Definition sstream:759
│ │ │ +
Controlling input and output for std::string.
Definition sstream:980
│ │ │ +
void push_back(_CharT __c)
Append a single character.
│ │ │ +
void reserve(size_type __res_arg)
Attempt to preallocate enough memory for specified number of characters.
│ │ │ +
basic_string & assign(const basic_string &__str)
Set value to contents of another string.
│ │ │ + │ │ │ +
static const seekdir cur
Request a seek relative to the current position within the sequence.
Definition ios_base.h:485
│ │ │ +
static const seekdir end
Request a seek relative to the current end of the sequence.
Definition ios_base.h:488
│ │ │ +
static const openmode in
Open for input. Default for ifstream and fstream.
Definition ios_base.h:461
│ │ │ +
static const openmode out
Open for output. Default for ofstream and fstream.
Definition ios_base.h:464
│ │ │ +
_Ios_Openmode openmode
This is a bitmask type.
Definition ios_base.h:447
│ │ │ +
_Ios_Seekdir seekdir
This is an enumerated type.
Definition ios_base.h:479
│ │ │
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,11 +1,11 @@ │ │ │ │ libstdc++ │ │ │ │ -streambuf_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// Streambuf iterators │ │ │ │ +1// String based streams -*- C++ -*- │ │ │ │ 2 │ │ │ │ 3// Copyright (C) 1997-2021 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,635 +21,414 @@ │ │ │ │ 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/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 _STREAMBUF_ITERATOR_H │ │ │ │ -31#define _STREAMBUF_ITERATOR_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 │ │ │ │ -41 │ │ │ │ -42 /** │ │ │ │ -43 * @addtogroup iterators │ │ │ │ -44 * @{ │ │ │ │ -45 */ │ │ │ │ -46 │ │ │ │ -47 // 24.5.3 Template class istreambuf_iterator │ │ │ │ -48 /// Provides input iterator semantics for streambufs. │ │ │ │ -49 template │ │ │ │ -_5_0 class _i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r │ │ │ │ -51 : public _i_t_e_r_a_t_o_r │ │ │ │ -53 { │ │ │ │ -54 public: │ │ │ │ -55 // Types: │ │ │ │ -56 ///@{ │ │ │ │ -57 /// Public typedefs │ │ │ │ -58#if __cplusplus < 201103L │ │ │ │ -59 typedef _CharT& _r_e_f_e_r_e_n_c_e; // Changed to _CharT by LWG 445 │ │ │ │ -60#elif __cplusplus > 201703L │ │ │ │ -61 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ -62 // 3188. istreambuf_iterator::pointer should not be unspecified │ │ │ │ -63 using _p_o_i_n_t_e_r = void; │ │ │ │ -64#endif │ │ │ │ -65 │ │ │ │ -_6_6 typedef _CharT _c_h_a_r___t_y_p_e; │ │ │ │ -_6_7 typedef _Traits _t_r_a_i_t_s___t_y_p_e; │ │ │ │ -_6_8 typedef typename _Traits::int_type _i_n_t___t_y_p_e; │ │ │ │ -_6_9 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_0 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; │ │ │ │ -71 ///@} │ │ │ │ -72 │ │ │ │ -73 template │ │ │ │ -74 friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, │ │ │ │ -75 _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 │ │ │ │ -76 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_>, │ │ │ │ -77 _o_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_<___C_h_a_r_T_2_>); │ │ │ │ -78 │ │ │ │ -79 template │ │ │ │ -80 friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, │ │ │ │ -81 _CharT2*>::__type │ │ │ │ -82 __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_>, │ │ │ │ -83 _i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_<___C_h_a_r_T_2_>, _CharT2*); │ │ │ │ -84 │ │ │ │ -85 template │ │ │ │ -86 friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, │ │ │ │ -87 _CharT2*>::__type │ │ │ │ -88 __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, _CharT2*, bool); │ │ │ │ +30// │ │ │ │ +31// ISO C++ 14882: 27.7 String-based streams │ │ │ │ +32// │ │ │ │ +33 │ │ │ │ +34#ifndef _SSTREAM_TCC │ │ │ │ +35#define _SSTREAM_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 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 __ret = traits_type::eof(); │ │ │ │ +49 if (this->_e_b_a_c_k() < this->_g_p_t_r()) │ │ │ │ +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->_g_p_t_r()[-1]); │ │ │ │ +59 const bool __testout = this->___M___m_o_d_e & _i_o_s___b_a_s_e_:_:_o_u_t; │ │ │ │ +60 if (__testeq || __testout) │ │ │ │ +61 { │ │ │ │ +62 this->_g_b_u_m_p(-1); │ │ │ │ +63 if (!__testeq) │ │ │ │ +64 *this->_g_p_t_r() = traits_type::to_char_type(__c); │ │ │ │ +65 __ret = __c; │ │ │ │ +66 } │ │ │ │ +67 } │ │ │ │ +68 else │ │ │ │ +69 { │ │ │ │ +70 this->_g_b_u_m_p(-1); │ │ │ │ +71 __ret = traits_type::not_eof(__c); │ │ │ │ +72 } │ │ │ │ +73 } │ │ │ │ +74 return __ret; │ │ │ │ +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 __testout = this->___M___m_o_d_e & _i_o_s___b_a_s_e_:_:_o_u_t; │ │ │ │ +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 template │ │ │ │ -91 friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, │ │ │ │ -92 _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 │ │ │ │ -93 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_>, │ │ │ │ -94 const _CharT2&); │ │ │ │ -95 │ │ │ │ -96 template │ │ │ │ -97 friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, │ │ │ │ -98 void>::__type │ │ │ │ -99 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_>&, _Distance); │ │ │ │ -100 │ │ │ │ -101 private: │ │ │ │ -102 // 24.5.3 istreambuf_iterator │ │ │ │ -103 // p 1 │ │ │ │ -104 // If the end of stream is reached (streambuf_type::sgetc() │ │ │ │ -105 // returns traits_type::eof()), the iterator becomes equal to │ │ │ │ -106 // the "end of stream" iterator value. │ │ │ │ -107 // NB: This implementation assumes the "end of stream" value │ │ │ │ -108 // is EOF, or -1. │ │ │ │ -109 mutable _s_t_r_e_a_m_b_u_f___t_y_p_e* _M_sbuf; │ │ │ │ -110 _i_n_t___t_y_p_e _M_c; │ │ │ │ -111 │ │ │ │ -112 public: │ │ │ │ -113 /// Construct end of input stream iterator. │ │ │ │ -_1_1_4 _GLIBCXX_CONSTEXPR _i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r() _GLIBCXX_USE_NOEXCEPT │ │ │ │ -115 : _M_sbuf(0), _M_c(_t_r_a_i_t_s___t_y_p_e::eof()) { } │ │ │ │ -116 │ │ │ │ -117#if __cplusplus > 201703L && __cpp_lib_concepts │ │ │ │ -118 constexpr _i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r(default_sentinel_t) noexcept │ │ │ │ -119 : _i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r() { } │ │ │ │ -120#endif │ │ │ │ -121 │ │ │ │ -122#if __cplusplus >= 201103L │ │ │ │ -123 _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; │ │ │ │ -124 │ │ │ │ -125 ~istreambuf_iterator() = default; │ │ │ │ -126#endif │ │ │ │ -127 │ │ │ │ -128 /// Construct start of input stream iterator. │ │ │ │ -_1_2_9 _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) _GLIBCXX_USE_NOEXCEPT │ │ │ │ -130 : _M_sbuf(__s.rdbuf()), _M_c(traits_type::eof()) { } │ │ │ │ -131 │ │ │ │ -132 /// Construct start of streambuf iterator. │ │ │ │ -_1_3_3 _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) _GLIBCXX_USE_NOEXCEPT │ │ │ │ -134 : _M_sbuf(__s), _M_c(traits_type::eof()) { } │ │ │ │ -135 │ │ │ │ -136#if __cplusplus >= 201103L │ │ │ │ -137 _i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r& │ │ │ │ -138 operator=(const _i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r&) noexcept = default; │ │ │ │ -139#endif │ │ │ │ -140 │ │ │ │ -141 /// Return the current character pointed to by iterator. This returns │ │ │ │ -142 /// streambuf.sgetc(). It cannot be assigned. NB: The result of │ │ │ │ -143 /// operator*() on an end of stream is undefined. │ │ │ │ -144 char_type │ │ │ │ -_1_4_5 _o_p_e_r_a_t_o_r_*() const │ │ │ │ -146 { │ │ │ │ -147 _i_n_t___t_y_p_e __c = _M_get(); │ │ │ │ -148 │ │ │ │ -149#ifdef _GLIBCXX_DEBUG_PEDANTIC │ │ │ │ -150 // Dereferencing a past-the-end istreambuf_iterator is a │ │ │ │ -151 // libstdc++ extension │ │ │ │ -152 __glibcxx_requires_cond(!_S_is_eof(__c), │ │ │ │ -153 _M_message(__gnu_debug::__msg_deref_istreambuf) │ │ │ │ -154 ._M_iterator(*this)); │ │ │ │ -155#endif │ │ │ │ -156 return traits_type::to_char_type(__c); │ │ │ │ -157 } │ │ │ │ +90 const __size_type __capacity = _M_string.capacity(); │ │ │ │ +91 │ │ │ │ +92#if _GLIBCXX_USE_CXX11_ABI │ │ │ │ +93 if (size_t(this->_e_p_p_t_r() - this->_p_b_a_s_e()) < __capacity) │ │ │ │ +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 + __capacity, this->_p_p_t_r() - this->_p_b_a_s_e()); │ │ │ │ +98 if (___M___m_o_d_e & _i_o_s___b_a_s_e_:_:_i_n) │ │ │ │ +99 { │ │ │ │ +100 const __size_type __nget = this->_g_p_t_r() - this->_e_b_a_c_k(); │ │ │ │ +101 const __size_type __eget = this->_e_g_p_t_r() - this->_e_b_a_c_k(); │ │ │ │ +102 this->_s_e_t_g(__base, __base + __nget, __base + __eget + 1); │ │ │ │ +103 } │ │ │ │ +104 *this->_p_p_t_r() = traits_type::to_char_type(__c); │ │ │ │ +105 this->_p_b_u_m_p(1); │ │ │ │ +106 return __c; │ │ │ │ +107 } │ │ │ │ +108#endif │ │ │ │ +109 │ │ │ │ +110 const __size_type __max_size = _M_string.max_size(); │ │ │ │ +111 const bool __testput = this->_p_p_t_r() < this->_e_p_p_t_r(); │ │ │ │ +112 if (__builtin_expect(!__testput && __capacity == __max_size, 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 __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 = _s_t_d_:_:_m_a_x(__size_type(2 * __capacity), │ │ │ │ +130 __size_type(512)); │ │ │ │ +131 const __size_type __len = _s_t_d_:_:_m_i_n(__opt_len, __max_size); │ │ │ │ +132 __string_type __tmp(_M_string.get_allocator()); │ │ │ │ +133 __tmp._r_e_s_e_r_v_e(__len); │ │ │ │ +134 if (this->_p_b_a_s_e()) │ │ │ │ +135 __tmp._a_s_s_i_g_n(this->_p_b_a_s_e(), this->_e_p_p_t_r() - this->_p_b_a_s_e()); │ │ │ │ +136 __tmp._p_u_s_h___b_a_c_k(__conv); │ │ │ │ +137 _M_string.swap(__tmp); │ │ │ │ +138 _M_sync(const_cast(_M_string.data()), │ │ │ │ +139 this->gptr() - this->eback(), this->pptr() - this->pbase()); │ │ │ │ +140 } │ │ │ │ +141 else │ │ │ │ +142 *this->_p_p_t_r() = __conv; │ │ │ │ +143 this->_p_b_u_m_p(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 __ret = traits_type::eof(); │ │ │ │ +153 const bool __testin = this->___M___m_o_d_e & _i_o_s___b_a_s_e_:_:_i_n; │ │ │ │ +154 if (__testin) │ │ │ │ +155 { │ │ │ │ +156 // Update egptr() to match the actual string end. │ │ │ │ +157 _M_update_egptr(); │ │ │ │ 158 │ │ │ │ -159 /// Advance the iterator. Calls streambuf.sbumpc(). │ │ │ │ -160 _i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r& │ │ │ │ -_1_6_1 _o_p_e_r_a_t_o_r_+_+() │ │ │ │ -162 { │ │ │ │ -163 __glibcxx_requires_cond(_M_sbuf && │ │ │ │ -164 (!_S_is_eof(_M_c) || !_S_is_eof(_M_sbuf->sgetc())), │ │ │ │ -165 _M_message(__gnu_debug::__msg_inc_istreambuf) │ │ │ │ -166 ._M_iterator(*this)); │ │ │ │ -167 │ │ │ │ -168 _M_sbuf->sbumpc(); │ │ │ │ -169 _M_c = traits_type::eof(); │ │ │ │ -170 return *this; │ │ │ │ -171 } │ │ │ │ -172 │ │ │ │ -173 /// Advance the iterator. Calls streambuf.sbumpc(). │ │ │ │ -174 _i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r │ │ │ │ -_1_7_5 _o_p_e_r_a_t_o_r_+_+(int) │ │ │ │ -176 { │ │ │ │ -177 __glibcxx_requires_cond(_M_sbuf && │ │ │ │ -178 (!_S_is_eof(_M_c) || !_S_is_eof(_M_sbuf->sgetc())), │ │ │ │ -179 _M_message(__gnu_debug::__msg_inc_istreambuf) │ │ │ │ -180 ._M_iterator(*this)); │ │ │ │ -181 │ │ │ │ -182 _i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r __old = *this; │ │ │ │ -183 __old._M_c = _M_sbuf->sbumpc(); │ │ │ │ -184 _M_c = traits_type::eof(); │ │ │ │ -185 return __old; │ │ │ │ -186 } │ │ │ │ -187 │ │ │ │ -188 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ -189 // 110 istreambuf_iterator::equal not const │ │ │ │ -190 // NB: there is also number 111 (NAD) relevant to this function. │ │ │ │ -191 /// Return true both iterators are end or both are not end. │ │ │ │ -192 bool │ │ │ │ -_1_9_3 _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 │ │ │ │ -194 { return _M_at_eof() == __b._M_at_eof(); } │ │ │ │ -195 │ │ │ │ -196 private: │ │ │ │ -197 _i_n_t___t_y_p_e │ │ │ │ -198 _M_get() const │ │ │ │ -199 { │ │ │ │ -200 _i_n_t___t_y_p_e __ret = _M_c; │ │ │ │ -201 if (_M_sbuf && _S_is_eof(__ret) && _S_is_eof(__ret = _M_sbuf->_s_g_e_t_c())) │ │ │ │ -202 _M_sbuf = 0; │ │ │ │ -203 return __ret; │ │ │ │ -204 } │ │ │ │ -205 │ │ │ │ -206 bool │ │ │ │ -207 _M_at_eof() const │ │ │ │ -208 { return _S_is_eof(_M_get()); } │ │ │ │ -209 │ │ │ │ -210 static bool │ │ │ │ -211 _S_is_eof(_i_n_t___t_y_p_e __c) │ │ │ │ -212 { │ │ │ │ -213 const _i_n_t___t_y_p_e __eof = traits_type::eof(); │ │ │ │ -214 return traits_type::eq_int_type(__c, __eof); │ │ │ │ -215 } │ │ │ │ -216 │ │ │ │ -217#if __cplusplus > 201703L && __cpp_lib_concepts │ │ │ │ -218 friend bool │ │ │ │ -219 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) │ │ │ │ -220 { return __i._M_at_eof(); } │ │ │ │ -221#endif │ │ │ │ -222 }; │ │ │ │ -223 │ │ │ │ -224 template │ │ │ │ -225 inline bool │ │ │ │ -226 operator==(const _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_>& __a, │ │ │ │ -227 const _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_>& __b) │ │ │ │ -228 { return __a.equal(__b); } │ │ │ │ -229 │ │ │ │ -230 template │ │ │ │ -231 inline bool │ │ │ │ -232 operator!=(const _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_>& __a, │ │ │ │ -233 const _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_>& __b) │ │ │ │ -234 { return !__a.equal(__b); } │ │ │ │ -235 │ │ │ │ -236 /// Provides output iterator semantics for streambufs. │ │ │ │ -237 template │ │ │ │ -_2_3_8 class _o_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r │ │ │ │ -239 : public _i_t_e_r_a_t_o_r │ │ │ │ -240 { │ │ │ │ -241 public: │ │ │ │ -242 // Types: │ │ │ │ -243 ///@{ │ │ │ │ -244 /// Public typedefs │ │ │ │ -245#if __cplusplus > 201703L │ │ │ │ -246 using _d_i_f_f_e_r_e_n_c_e___t_y_p_e = ptrdiff_t; │ │ │ │ -247#endif │ │ │ │ -_2_4_8 typedef _CharT _c_h_a_r___t_y_p_e; │ │ │ │ -_2_4_9 typedef _Traits _t_r_a_i_t_s___t_y_p_e; │ │ │ │ -_2_5_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_5_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; │ │ │ │ -252 ///@} │ │ │ │ -253 │ │ │ │ -254 template │ │ │ │ -255 friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, │ │ │ │ -256 _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 │ │ │ │ -257 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_>, │ │ │ │ -258 _o_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_<___C_h_a_r_T_2_>); │ │ │ │ -259 │ │ │ │ -260 private: │ │ │ │ -261 _s_t_r_e_a_m_b_u_f___t_y_p_e* _M_sbuf; │ │ │ │ -262 bool _M_failed; │ │ │ │ -263 │ │ │ │ -264 public: │ │ │ │ -265 │ │ │ │ -266#if __cplusplus > 201703L │ │ │ │ -267 constexpr │ │ │ │ -268 _o_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r() noexcept │ │ │ │ -269 : _M_sbuf(nullptr), _M_failed(true) { } │ │ │ │ -270#endif │ │ │ │ -271 │ │ │ │ -272 /// Construct output iterator from ostream. │ │ │ │ -_2_7_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) _GLIBCXX_USE_NOEXCEPT │ │ │ │ -274 : _M_sbuf(__s.rdbuf()), _M_failed(!_M_sbuf) { } │ │ │ │ -275 │ │ │ │ -276 /// Construct output iterator from streambuf. │ │ │ │ -_2_7_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) _GLIBCXX_USE_NOEXCEPT │ │ │ │ -278 : _M_sbuf(__s), _M_failed(!_M_sbuf) { } │ │ │ │ -279 │ │ │ │ -280 /// Write character to streambuf. Calls streambuf.sputc(). │ │ │ │ -281 _o_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r& │ │ │ │ -_2_8_2 _o_p_e_r_a_t_o_r_=(_CharT __c) │ │ │ │ -283 { │ │ │ │ -284 if (!_M_failed && │ │ │ │ -285 _Traits::eq_int_type(_M_sbuf->sputc(__c), _Traits::eof())) │ │ │ │ -286 _M_failed = true; │ │ │ │ -287 return *this; │ │ │ │ -288 } │ │ │ │ -289 │ │ │ │ -290 /// Return *this. │ │ │ │ -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_*() │ │ │ │ -293 { return *this; } │ │ │ │ -294 │ │ │ │ -295 /// Return *this. │ │ │ │ -296 _o_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r& │ │ │ │ -_2_9_7 _o_p_e_r_a_t_o_r_+_+(int) │ │ │ │ -298 { return *this; } │ │ │ │ -299 │ │ │ │ -300 /// Return *this. │ │ │ │ -301 _o_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r& │ │ │ │ -_3_0_2 _o_p_e_r_a_t_o_r_+_+() │ │ │ │ -303 { return *this; } │ │ │ │ -304 │ │ │ │ -305 /// Return true if previous operator=() failed. │ │ │ │ -306 bool │ │ │ │ -_3_0_7 _f_a_i_l_e_d() const _GLIBCXX_USE_NOEXCEPT │ │ │ │ -308 { return _M_failed; } │ │ │ │ -309 │ │ │ │ -310 _o_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r& │ │ │ │ -311 _M_put(const _CharT* __ws, _s_t_r_e_a_m_s_i_z_e __len) │ │ │ │ -312 { │ │ │ │ -313 if (__builtin_expect(!_M_failed, true) │ │ │ │ -314 && __builtin_expect(this->_M_sbuf->_s_p_u_t_n(__ws, __len) != __len, │ │ │ │ -315 false)) │ │ │ │ -316 _M_failed = true; │ │ │ │ -317 return *this; │ │ │ │ -318 } │ │ │ │ -319 }; │ │ │ │ -320 │ │ │ │ -321 // Overloads for streambuf iterators. │ │ │ │ -322 template │ │ │ │ -323 typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, │ │ │ │ -324 _o_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_<___C_h_a_r_T_> >::__type │ │ │ │ -325 copy(_i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_<___C_h_a_r_T_> __first, │ │ │ │ -326 _i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_<___C_h_a_r_T_> __last, │ │ │ │ -327 _o_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_<___C_h_a_r_T_> __result) │ │ │ │ -328 { │ │ │ │ -329 if (__first._M_sbuf && !__last._M_sbuf && !__result._M_failed) │ │ │ │ -330 { │ │ │ │ -331 bool __ineof; │ │ │ │ -332 __copy_streambufs_eof(__first._M_sbuf, __result._M_sbuf, __ineof); │ │ │ │ -333 if (!__ineof) │ │ │ │ -334 __result._M_failed = true; │ │ │ │ -335 } │ │ │ │ -336 return __result; │ │ │ │ -337 } │ │ │ │ -338 │ │ │ │ -339 template │ │ │ │ -340 typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, │ │ │ │ -341 _o_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_<___C_h_a_r_T_> >::__type │ │ │ │ -342 __copy_move_a2(_CharT* __first, _CharT* __last, │ │ │ │ -343 _o_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_<___C_h_a_r_T_> __result) │ │ │ │ -344 { │ │ │ │ -345 const _s_t_r_e_a_m_s_i_z_e __num = __last - __first; │ │ │ │ -346 if (__num > 0) │ │ │ │ -347 __result._M_put(__first, __num); │ │ │ │ -348 return __result; │ │ │ │ -349 } │ │ │ │ -350 │ │ │ │ -351 template │ │ │ │ -352 typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, │ │ │ │ -353 _o_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_<___C_h_a_r_T_> >::__type │ │ │ │ -354 __copy_move_a2(const _CharT* __first, const _CharT* __last, │ │ │ │ -355 _o_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_<___C_h_a_r_T_> __result) │ │ │ │ -356 { │ │ │ │ -357 const _s_t_r_e_a_m_s_i_z_e __num = __last - __first; │ │ │ │ -358 if (__num > 0) │ │ │ │ -359 __result._M_put(__first, __num); │ │ │ │ -360 return __result; │ │ │ │ -361 } │ │ │ │ -362 │ │ │ │ -363 template │ │ │ │ -364 typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, │ │ │ │ -365 _CharT*>::__type │ │ │ │ -366 __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_> __first, │ │ │ │ -367 _i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_<___C_h_a_r_T_> __last, _CharT* __result) │ │ │ │ -368 { │ │ │ │ -369 typedef _i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_<___C_h_a_r_T_> __is_iterator_type; │ │ │ │ -370 typedef typename __is_iterator_type::traits_type traits_type; │ │ │ │ -371 typedef typename __is_iterator_type::streambuf_type streambuf_type; │ │ │ │ -372 typedef typename traits_type::int_type _i_n_t___t_y_p_e; │ │ │ │ -373 │ │ │ │ -374 if (__first._M_sbuf && !__last._M_sbuf) │ │ │ │ -375 { │ │ │ │ -376 streambuf_type* __sb = __first._M_sbuf; │ │ │ │ -377 _i_n_t___t_y_p_e __c = __sb->sgetc(); │ │ │ │ -378 while (!traits_type::eq_int_type(__c, traits_type::eof())) │ │ │ │ -379 { │ │ │ │ -380 const _s_t_r_e_a_m_s_i_z_e __n = __sb->egptr() - __sb->gptr(); │ │ │ │ -381 if (__n > 1) │ │ │ │ -382 { │ │ │ │ -383 traits_type::copy(__result, __sb->gptr(), __n); │ │ │ │ -384 __sb->__safe_gbump(__n); │ │ │ │ -385 __result += __n; │ │ │ │ -386 __c = __sb->underflow(); │ │ │ │ -387 } │ │ │ │ -388 else │ │ │ │ -389 { │ │ │ │ -390 *__result++ = traits_type::to_char_type(__c); │ │ │ │ -391 __c = __sb->snextc(); │ │ │ │ -392 } │ │ │ │ -393 } │ │ │ │ -394 } │ │ │ │ -395 return __result; │ │ │ │ -396 } │ │ │ │ -397 │ │ │ │ -398 template │ │ │ │ -399 typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, │ │ │ │ -400 _CharT*>::__type │ │ │ │ -401 __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_> __it, _Size __n, _CharT* __result, │ │ │ │ -402 bool __strict __attribute__((__unused__))) │ │ │ │ -403 { │ │ │ │ -404 if (__n == 0) │ │ │ │ -405 return __result; │ │ │ │ -406 │ │ │ │ -407 __glibcxx_requires_cond(__it._M_sbuf, │ │ │ │ -408 _M_message(__gnu_debug::__msg_inc_istreambuf) │ │ │ │ -409 ._M_iterator(__it)); │ │ │ │ -410 _CharT* __beg = __result; │ │ │ │ -411 __result += __it._M_sbuf->sgetn(__beg, __n); │ │ │ │ -412 __glibcxx_requires_cond(!__strict || __result - __beg == __n, │ │ │ │ -413 _M_message(__gnu_debug::__msg_inc_istreambuf) │ │ │ │ -414 ._M_iterator(__it)); │ │ │ │ -415 return __result; │ │ │ │ -416 } │ │ │ │ -417 │ │ │ │ -418 template │ │ │ │ -419 typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, │ │ │ │ -420 _i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_<___C_h_a_r_T_> >::__type │ │ │ │ -421 find(_i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_<___C_h_a_r_T_> __first, │ │ │ │ -422 _i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_<___C_h_a_r_T_> __last, const _CharT& __val) │ │ │ │ -423 { │ │ │ │ -424 typedef _i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_<___C_h_a_r_T_> __is_iterator_type; │ │ │ │ -425 typedef typename __is_iterator_type::traits_type traits_type; │ │ │ │ -426 typedef typename __is_iterator_type::streambuf_type streambuf_type; │ │ │ │ -427 typedef typename traits_type::int_type _i_n_t___t_y_p_e; │ │ │ │ -428 const _i_n_t___t_y_p_e __eof = traits_type::eof(); │ │ │ │ -429 │ │ │ │ -430 if (__first._M_sbuf && !__last._M_sbuf) │ │ │ │ -431 { │ │ │ │ -432 const _i_n_t___t_y_p_e __ival = traits_type::to_int_type(__val); │ │ │ │ -433 streambuf_type* __sb = __first._M_sbuf; │ │ │ │ -434 _i_n_t___t_y_p_e __c = __sb->sgetc(); │ │ │ │ -435 while (!traits_type::eq_int_type(__c, __eof) │ │ │ │ -436 && !traits_type::eq_int_type(__c, __ival)) │ │ │ │ -437 { │ │ │ │ -438 _s_t_r_e_a_m_s_i_z_e __n = __sb->egptr() - __sb->gptr(); │ │ │ │ -439 if (__n > 1) │ │ │ │ -440 { │ │ │ │ -441 const _CharT* __p = traits_type::find(__sb->gptr(), │ │ │ │ -442 __n, __val); │ │ │ │ -443 if (__p) │ │ │ │ -444 __n = __p - __sb->gptr(); │ │ │ │ -445 __sb->__safe_gbump(__n); │ │ │ │ -446 __c = __sb->sgetc(); │ │ │ │ -447 } │ │ │ │ -448 else │ │ │ │ -449 __c = __sb->snextc(); │ │ │ │ -450 } │ │ │ │ -451 │ │ │ │ -452 __first._M_c = __eof; │ │ │ │ -453 } │ │ │ │ -454 │ │ │ │ -455 return __first; │ │ │ │ -456 } │ │ │ │ -457 │ │ │ │ -458 template │ │ │ │ -459 typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, │ │ │ │ -460 void>::__type │ │ │ │ -461 _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_<___C_h_a_r_T_>& __i, _Distance __n) │ │ │ │ -462 { │ │ │ │ -463 if (__n == 0) │ │ │ │ -464 return; │ │ │ │ -465 │ │ │ │ -466 __glibcxx_assert(__n > 0); │ │ │ │ -467 __glibcxx_requires_cond(!__i._M_at_eof(), │ │ │ │ -468 _M_message(__gnu_debug::__msg_inc_istreambuf) │ │ │ │ -469 ._M_iterator(__i)); │ │ │ │ -470 │ │ │ │ -471 typedef _i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_<___C_h_a_r_T_> __is_iterator_type; │ │ │ │ -472 typedef typename __is_iterator_type::traits_type traits_type; │ │ │ │ -473 typedef typename __is_iterator_type::streambuf_type streambuf_type; │ │ │ │ -474 typedef typename traits_type::int_type _i_n_t___t_y_p_e; │ │ │ │ -475 const _i_n_t___t_y_p_e __eof = traits_type::eof(); │ │ │ │ -476 │ │ │ │ -477 streambuf_type* __sb = __i._M_sbuf; │ │ │ │ -478 while (__n > 0) │ │ │ │ -479 { │ │ │ │ -480 _s_t_r_e_a_m_s_i_z_e __size = __sb->egptr() - __sb->gptr(); │ │ │ │ -481 if (__size > __n) │ │ │ │ -482 { │ │ │ │ -483 __sb->__safe_gbump(__n); │ │ │ │ -484 break; │ │ │ │ -485 } │ │ │ │ -486 │ │ │ │ -487 __sb->__safe_gbump(__size); │ │ │ │ -488 __n -= __size; │ │ │ │ -489 if (traits_type::eq_int_type(__sb->underflow(), __eof)) │ │ │ │ -490 { │ │ │ │ -491 __glibcxx_requires_cond(__n == 0, │ │ │ │ -492 _M_message(__gnu_debug::__msg_inc_istreambuf) │ │ │ │ -493 ._M_iterator(__i)); │ │ │ │ -494 break; │ │ │ │ -495 } │ │ │ │ -496 } │ │ │ │ -497 │ │ │ │ -498 __i._M_c = __eof; │ │ │ │ -499 } │ │ │ │ -500 │ │ │ │ -501/// @} group iterators │ │ │ │ -502 │ │ │ │ -503_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ -504} // namespace │ │ │ │ -505 │ │ │ │ -506#endif │ │ │ │ -_s_t_r_e_a_m_b_u_f │ │ │ │ -_d_e_b_u_g_._h │ │ │ │ +159 if (this->_g_p_t_r() < this->_e_g_p_t_r()) │ │ │ │ +160 __ret = traits_type::to_int_type(*this->_g_p_t_r()); │ │ │ │ +161 } │ │ │ │ +162 return __ret; │ │ │ │ +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 __off, _i_o_s___b_a_s_e_:_:_s_e_e_k_d_i_r __way, _i_o_s___b_a_s_e_:_:_o_p_e_n_m_o_d_e __mode) │ │ │ │ +169 { │ │ │ │ +170 pos_type __ret = pos_type(off_type(-1)); │ │ │ │ +171 bool __testin = (_i_o_s___b_a_s_e_:_:_i_n & this->___M___m_o_d_e & __mode) != 0; │ │ │ │ +172 bool __testout = (_i_o_s___b_a_s_e_:_:_o_u_t & this->___M___m_o_d_e & __mode) != 0; │ │ │ │ +173 const bool __testboth = __testin && __testout && __way != _i_o_s___b_a_s_e_:_:_c_u_r; │ │ │ │ +174 __testin &= !(__mode & _i_o_s___b_a_s_e_:_:_o_u_t); │ │ │ │ +175 __testout &= !(__mode & _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* __beg = __testin ? this->_e_b_a_c_k() : this->_p_b_a_s_e(); │ │ │ │ +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 == _i_o_s___b_a_s_e_:_:_c_u_r) │ │ │ │ +187 { │ │ │ │ +188 __newoffi += this->_g_p_t_r() - __beg; │ │ │ │ +189 __newoffo += this->_p_p_t_r() - __beg; │ │ │ │ +190 } │ │ │ │ +191 else if (__way == _i_o_s___b_a_s_e_:_:_e_n_d) │ │ │ │ +192 __newoffo = __newoffi += this->_e_g_p_t_r() - __beg; │ │ │ │ +193 │ │ │ │ +194 if ((__testin || __testboth) │ │ │ │ +195 && __newoffi >= 0 │ │ │ │ +196 && this->_e_g_p_t_r() - __beg >= __newoffi) │ │ │ │ +197 { │ │ │ │ +198 this->_s_e_t_g(this->eback(), this->eback() + __newoffi, │ │ │ │ +199 this->_e_g_p_t_r()); │ │ │ │ +200 __ret = pos_type(__newoffi); │ │ │ │ +201 } │ │ │ │ +202 if ((__testout || __testboth) │ │ │ │ +203 && __newoffo >= 0 │ │ │ │ +204 && this->_e_g_p_t_r() - __beg >= __newoffo) │ │ │ │ +205 { │ │ │ │ +206 _M_pbump(this->_p_b_a_s_e(), this->_e_p_p_t_r(), __newoffo); │ │ │ │ +207 __ret = pos_type(__newoffo); │ │ │ │ +208 } │ │ │ │ +209 } │ │ │ │ +210 return __ret; │ │ │ │ +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 __sp, _i_o_s___b_a_s_e_:_:_o_p_e_n_m_o_d_e __mode) │ │ │ │ +217 { │ │ │ │ +218 pos_type __ret = pos_type(off_type(-1)); │ │ │ │ +219 const bool __testin = (_i_o_s___b_a_s_e_:_:_i_n & this->___M___m_o_d_e & __mode) != 0; │ │ │ │ +220 const bool __testout = (_i_o_s___b_a_s_e_:_:_o_u_t & this->___M___m_o_d_e & __mode) != 0; │ │ │ │ +221 │ │ │ │ +222 const char_type* __beg = __testin ? this->_e_b_a_c_k() : this->_p_b_a_s_e(); │ │ │ │ +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->_e_g_p_t_r() - __beg); │ │ │ │ +230 if (__testpos) │ │ │ │ +231 { │ │ │ │ +232 if (__testin) │ │ │ │ +233 this->_s_e_t_g(this->eback(), this->eback() + __pos, │ │ │ │ +234 this->_e_g_p_t_r()); │ │ │ │ +235 if (__testout) │ │ │ │ +236 _M_pbump(this->_p_b_a_s_e(), this->_e_p_p_t_r(), __pos); │ │ │ │ +237 __ret = __sp; │ │ │ │ +238 } │ │ │ │ +239 } │ │ │ │ +240 return __ret; │ │ │ │ +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 __testin = _M_mode & _i_o_s___b_a_s_e_:_:_i_n; │ │ │ │ +249 const bool __testout = _M_mode & _i_o_s___b_a_s_e_:_:_o_u_t; │ │ │ │ +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 │ │ │ │ +275 void │ │ │ │ +276 _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_>_:_: │ │ │ │ +277_ ___M___p_b_u_m_p(char_type* __pbeg, char_type* __pend, _o_f_f___t_y_p_e __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 _b_a_s_i_c___s_t_r_i_n_g_b_u_f_<_c_h_a_r_>; │ │ │ │ +292 extern template class _b_a_s_i_c___i_s_t_r_i_n_g_s_t_r_e_a_m_<_c_h_a_r_>; │ │ │ │ +293 extern template class _b_a_s_i_c___o_s_t_r_i_n_g_s_t_r_e_a_m_<_c_h_a_r_>; │ │ │ │ +294 extern template class _b_a_s_i_c___s_t_r_i_n_g_s_t_r_e_a_m_<_c_h_a_r_>; │ │ │ │ +295 │ │ │ │ +296#ifdef _GLIBCXX_USE_WCHAR_T │ │ │ │ +297 extern template class _b_a_s_i_c___s_t_r_i_n_g_b_u_f_<_w_c_h_a_r___t_>; │ │ │ │ +298 extern template class _b_a_s_i_c___i_s_t_r_i_n_g_s_t_r_e_a_m_<_w_c_h_a_r___t_>; │ │ │ │ +299 extern template class _b_a_s_i_c___o_s_t_r_i_n_g_s_t_r_e_a_m_<_w_c_h_a_r___t_>; │ │ │ │ +300 extern template class _b_a_s_i_c___s_t_r_i_n_g_s_t_r_e_a_m_<_w_c_h_a_r___t_>; │ │ │ │ +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_:_:_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_:_9_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_0_2 │ │ │ │ -_s_t_d_:_:_b_a_s_i_c___s_t_r_e_a_m_b_u_f │ │ │ │ -The actual work of input and output (interface). │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m_b_u_f_:_1_2_3 │ │ │ │ -_s_t_d_:_:_b_a_s_i_c___s_t_r_e_a_m_b_u_f_:_:_s_p_u_t_n │ │ │ │ -streamsize sputn(const char_type *__s, streamsize __n) │ │ │ │ -Entry point for all single-character output functions. │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m_b_u_f_:_4_5_5 │ │ │ │ -_s_t_d_:_:_b_a_s_i_c___s_t_r_e_a_m_b_u_f_:_:_s_g_e_t_c │ │ │ │ -int_type sgetc() │ │ │ │ -Getting the next character. │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m_b_u_f_:_3_4_3 │ │ │ │ -_s_t_d_:_:_b_a_s_i_c___i_s_t_r_e_a_m │ │ │ │ -Template class basic_istream. │ │ │ │ -DDeeffiinniittiioonn _i_s_t_r_e_a_m_:_5_9 │ │ │ │ -_s_t_d_:_:_b_a_s_i_c___o_s_t_r_e_a_m │ │ │ │ -Template class basic_ostream. │ │ │ │ -DDeeffiinniittiioonn _o_s_t_r_e_a_m_:_5_9 │ │ │ │ -_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_3 │ │ │ │ -_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_:_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 │ │ │ │ -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_4 │ │ │ │ -_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_0 │ │ │ │ -_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_5 │ │ │ │ -_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_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_+_+ │ │ │ │ -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_1 │ │ │ │ -_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_:_6_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_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_2_9 │ │ │ │ -_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_5 │ │ │ │ -_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_6 │ │ │ │ -_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_3 │ │ │ │ -_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_:_6_8 │ │ │ │ -_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_4_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_:_2_9_7 │ │ │ │ -_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_2 │ │ │ │ -_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_0_7 │ │ │ │ -_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_4_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_8_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_:_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_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_5_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_5_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_7_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_4_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_7_7 │ │ │ │ -_s_t_d_:_:_i_n_t___t_y_p_e │ │ │ │ -_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 │ │ │ │ -_>_:_:_p_o_i_n_t_e_r │ │ │ │ -_CharT * pointer │ │ │ │ -DDeeffiinniittiioonn _s_t_l___i_t_e_r_a_t_o_r___b_a_s_e___t_y_p_e_s_._h_:_1_3_6 │ │ │ │ -_s_t_d_:_:_i_t_e_r_a_t_o_r_<_ _o_u_t_p_u_t___i_t_e_r_a_t_o_r___t_a_g_,_ _v_o_i_d_,_ _v_o_i_d_,_ _v_o_i_d_,_ _v_o_i_d_ _>_:_:_d_i_f_f_e_r_e_n_c_e___t_y_p_e │ │ │ │ -void difference_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_4 │ │ │ │ -_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 │ │ │ │ -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_:_:_b_a_s_i_c___s_t_r_e_a_m_b_u_f_:_:_e_p_p_t_r │ │ │ │ +char_type * epptr() const │ │ │ │ +Access to the put area. │ │ │ │ +DDeeffiinniittiioonn _s_t_r_e_a_m_b_u_f_:_5_4_0 │ │ │ │ +_s_t_d_:_:_b_a_s_i_c___s_t_r_e_a_m_b_u_f_:_:_p_p_t_r │ │ │ │ +char_type * pptr() const │ │ │ │ +Access to the put area. │ │ │ │ +DDeeffiinniittiioonn _s_t_r_e_a_m_b_u_f_:_5_3_7 │ │ │ │ +_s_t_d_:_:_b_a_s_i_c___s_t_r_e_a_m_b_u_f_:_:_s_e_t_g │ │ │ │ +void setg(char_type *__gbeg, char_type *__gnext, char_type *__gend) │ │ │ │ +Setting the three read area pointers. │ │ │ │ +DDeeffiinniittiioonn _s_t_r_e_a_m_b_u_f_:_5_1_4 │ │ │ │ +_s_t_d_:_:_b_a_s_i_c___s_t_r_e_a_m_b_u_f_:_:_e_b_a_c_k │ │ │ │ +char_type * eback() const │ │ │ │ +Access to the get area. │ │ │ │ +DDeeffiinniittiioonn _s_t_r_e_a_m_b_u_f_:_4_8_7 │ │ │ │ +_s_t_d_:_:_b_a_s_i_c___s_t_r_e_a_m_b_u_f_:_:_e_g_p_t_r │ │ │ │ +char_type * egptr() const │ │ │ │ +Access to the get area. │ │ │ │ +DDeeffiinniittiioonn _s_t_r_e_a_m_b_u_f_:_4_9_3 │ │ │ │ +_s_t_d_:_:_b_a_s_i_c___s_t_r_e_a_m_b_u_f_:_:_g_p_t_r │ │ │ │ +char_type * gptr() const │ │ │ │ +Access to the get area. │ │ │ │ +DDeeffiinniittiioonn _s_t_r_e_a_m_b_u_f_:_4_9_0 │ │ │ │ +_s_t_d_:_:_b_a_s_i_c___s_t_r_e_a_m_b_u_f_:_:_g_b_u_m_p │ │ │ │ +void gbump(int __n) │ │ │ │ +Moving the read position. │ │ │ │ +DDeeffiinniittiioonn _s_t_r_e_a_m_b_u_f_:_5_0_3 │ │ │ │ +_s_t_d_:_:_b_a_s_i_c___s_t_r_e_a_m_b_u_f_:_:_p_b_u_m_p │ │ │ │ +void pbump(int __n) │ │ │ │ +Moving the write position. │ │ │ │ +DDeeffiinniittiioonn _s_t_r_e_a_m_b_u_f_:_5_5_0 │ │ │ │ +_s_t_d_:_:_b_a_s_i_c___s_t_r_e_a_m_b_u_f_:_:_p_b_a_s_e │ │ │ │ +char_type * pbase() const │ │ │ │ +Access to the put area. │ │ │ │ +DDeeffiinniittiioonn _s_t_r_e_a_m_b_u_f_:_5_3_4 │ │ │ │ +_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_3 │ │ │ │ +_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_b_u_f_:_:___M___m_o_d_e │ │ │ │ +ios_base::openmode _M_mode │ │ │ │ +Place to stash in || out || in | out settings for current stringbuf. │ │ │ │ +DDeeffiinniittiioonn _s_s_t_r_e_a_m_:_9_9 │ │ │ │ +_s_t_d_:_:_b_a_s_i_c___i_s_t_r_i_n_g_s_t_r_e_a_m │ │ │ │ +Controlling input for std::string. │ │ │ │ +DDeeffiinniittiioonn _s_s_t_r_e_a_m_:_5_3_8 │ │ │ │ +_s_t_d_:_:_b_a_s_i_c___o_s_t_r_i_n_g_s_t_r_e_a_m │ │ │ │ +Controlling output for std::string. │ │ │ │ +DDeeffiinniittiioonn _s_s_t_r_e_a_m_:_7_5_9 │ │ │ │ +_s_t_d_:_:_b_a_s_i_c___s_t_r_i_n_g_s_t_r_e_a_m │ │ │ │ +Controlling input and output for std::string. │ │ │ │ +DDeeffiinniittiioonn _s_s_t_r_e_a_m_:_9_8_0 │ │ │ │ +_s_t_d_:_:_b_a_s_i_c___s_t_r_i_n_g_:_:_p_u_s_h___b_a_c_k │ │ │ │ +void push_back(_CharT __c) │ │ │ │ +Append a single character. │ │ │ │ +DDeeffiinniittiioonn _b_a_s_i_c___s_t_r_i_n_g_._h_:_4_3_8_1 │ │ │ │ +_s_t_d_:_:_b_a_s_i_c___s_t_r_i_n_g_:_:_r_e_s_e_r_v_e │ │ │ │ +void reserve(size_type __res_arg) │ │ │ │ +Attempt to preallocate enough memory for specified number of characters. │ │ │ │ +DDeeffiinniittiioonn _b_a_s_i_c___s_t_r_i_n_g_._t_c_c_:_9_3_3 │ │ │ │ +_s_t_d_:_:_b_a_s_i_c___s_t_r_i_n_g_:_:_a_s_s_i_g_n │ │ │ │ +basic_string & assign(const basic_string &__str) │ │ │ │ +Set value to contents of another string. │ │ │ │ +DDeeffiinniittiioonn _b_a_s_i_c___s_t_r_i_n_g_._t_c_c_:_6_7_4 │ │ │ │ +_s_t_d_:_:_o_f_f___t_y_p_e │ │ │ │ +_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_8_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_:_4_8_8 │ │ │ │ +_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_1 │ │ │ │ +_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_4 │ │ │ │ +_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_4_7 │ │ │ │ +_s_t_d_:_:_i_o_s___b_a_s_e_:_:_s_e_e_k_d_i_r │ │ │ │ +_Ios_Seekdir seekdir │ │ │ │ +This is an enumerated type. │ │ │ │ +DDeeffiinniittiioonn _i_o_s___b_a_s_e_._h_:_4_7_9 │ │ │ │ * bbiittss │ │ │ │ - * _s_t_r_e_a_m_b_u_f___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.15.0 │ │ ├── ./usr/share/doc/gcc-11-base/libstdc++/user/a00395.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: stream_iterator.h File Reference │ │ │ +libstdc++: stl_vector.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -48,45 +48,161 @@ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
stream_iterator.h File Reference
│ │ │ +
stl_vector.h 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 >
struct  std::_Vector_base< _Tp, _Alloc >
class  std::vector< _Tp, _Alloc >
│ │ │ │ │ │ │ │ │ + │ │ │ +

│ │ │ Namespaces

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

│ │ │ +Macros

#define _GLIBCXX_ASAN_ANNOTATE_BEFORE_DEALLOC
#define _GLIBCXX_ASAN_ANNOTATE_GREW(n)
#define _GLIBCXX_ASAN_ANNOTATE_GROW(n)
#define _GLIBCXX_ASAN_ANNOTATE_REINIT
#define _GLIBCXX_ASAN_ANNOTATE_SHRINK(n)
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ +Functions

template<typename _Tp, typename _Alloc>
bool std::operator!= (const vector< _Tp, _Alloc > &__x, const vector< _Tp, _Alloc > &__y)
template<typename _Tp, typename _Alloc>
bool std::operator< (const vector< _Tp, _Alloc > &__x, const vector< _Tp, _Alloc > &__y)
template<typename _Tp, typename _Alloc>
bool std::operator<= (const vector< _Tp, _Alloc > &__x, const vector< _Tp, _Alloc > &__y)
template<typename _Tp, typename _Alloc>
bool std::operator== (const vector< _Tp, _Alloc > &__x, const vector< _Tp, _Alloc > &__y)
template<typename _Tp, typename _Alloc>
bool std::operator> (const vector< _Tp, _Alloc > &__x, const vector< _Tp, _Alloc > &__y)
template<typename _Tp, typename _Alloc>
bool std::operator>= (const vector< _Tp, _Alloc > &__x, const vector< _Tp, _Alloc > &__y)
template<typename _Tp, typename _Alloc>
void std::swap (vector< _Tp, _Alloc > &__x, vector< _Tp, _Alloc > &__y) noexcept(/*conditional */)
│ │ │

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 <vector>.

│ │ │ + │ │ │ +

Definition in file stl_vector.h.

│ │ │ +

Macro Definition Documentation

│ │ │ + │ │ │ +

◆ _GLIBCXX_ASAN_ANNOTATE_BEFORE_DEALLOC

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
#define _GLIBCXX_ASAN_ANNOTATE_BEFORE_DEALLOC
│ │ │ +
│ │ │ + │ │ │ +

Definition at line 268 of file stl_vector.h.

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

◆ _GLIBCXX_ASAN_ANNOTATE_GREW

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
#define _GLIBCXX_ASAN_ANNOTATE_GREW( n)
│ │ │ +
│ │ │ + │ │ │ +

Definition at line 266 of file stl_vector.h.

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

◆ _GLIBCXX_ASAN_ANNOTATE_GROW

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
#define _GLIBCXX_ASAN_ANNOTATE_GROW( n)
│ │ │ +
│ │ │ │ │ │ -

Definition in file stream_iterator.h.

│ │ │ -
│ │ │ +

Definition at line 265 of file stl_vector.h.

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

◆ _GLIBCXX_ASAN_ANNOTATE_REINIT

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
#define _GLIBCXX_ASAN_ANNOTATE_REINIT
│ │ │ +
│ │ │ + │ │ │ +

Definition at line 264 of file stl_vector.h.

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

◆ _GLIBCXX_ASAN_ANNOTATE_SHRINK

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
#define _GLIBCXX_ASAN_ANNOTATE_SHRINK( n)
│ │ │ +
│ │ │ + │ │ │ +

Definition at line 267 of file stl_vector.h.

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ +
│ │ │
│ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,15 +1,60 @@ │ │ │ │ libstdc++ │ │ │ │ -stream_iterator.h File Reference │ │ │ │ +stl_vector.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___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_ _> │ │ │ │ +struct   _s_t_d_:_:___V_e_c_t_o_r___b_a_s_e_<_ ___T_p_,_ ___A_l_l_o_c_ _> │ │ │ │ + class   _s_t_d_:_:_v_e_c_t_o_r_<_ ___T_p_,_ ___A_l_l_o_c_ _> │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _s_t_d │ │ │ │ +namespace   _s_t_d_:_:_____d_e_t_a_i_l │ │ │ │ +MMaaccrrooss │ │ │ │ +#define  ___G_L_I_B_C_X_X___A_S_A_N___A_N_N_O_T_A_T_E___B_E_F_O_R_E___D_E_A_L_L_O_C │ │ │ │ +#define  ___G_L_I_B_C_X_X___A_S_A_N___A_N_N_O_T_A_T_E___G_R_E_W(n) │ │ │ │ +#define  ___G_L_I_B_C_X_X___A_S_A_N___A_N_N_O_T_A_T_E___G_R_O_W(n) │ │ │ │ +#define  ___G_L_I_B_C_X_X___A_S_A_N___A_N_N_O_T_A_T_E___R_E_I_N_I_T │ │ │ │ +#define  ___G_L_I_B_C_X_X___A_S_A_N___A_N_N_O_T_A_T_E___S_H_R_I_N_K(n) │ │ │ │ +FFuunnccttiioonnss │ │ │ │ +template │ │ │ │ +bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_!_= (const vector< _Tp, _Alloc > &__x, const vector< _Tp, │ │ │ │ + _Alloc > &__y) │ │ │ │ +template │ │ │ │ +bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_< (const vector< _Tp, _Alloc > &__x, const vector< _Tp, │ │ │ │ + _Alloc > &__y) │ │ │ │ +template │ │ │ │ +bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_<_= (const vector< _Tp, _Alloc > &__x, const vector< _Tp, │ │ │ │ + _Alloc > &__y) │ │ │ │ +template │ │ │ │ +bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_=_= (const vector< _Tp, _Alloc > &__x, const vector< _Tp, │ │ │ │ + _Alloc > &__y) │ │ │ │ +template │ │ │ │ +bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_> (const vector< _Tp, _Alloc > &__x, const vector< _Tp, │ │ │ │ + _Alloc > &__y) │ │ │ │ +template │ │ │ │ +bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_>_= (const vector< _Tp, _Alloc > &__x, const vector< _Tp, │ │ │ │ + _Alloc > &__y) │ │ │ │ +template │ │ │ │ +void  _s_t_d_:_:_s_w_a_p (vector< _Tp, _Alloc > &__x, vector< _Tp, _Alloc > &__y) │ │ │ │ + noexcept(/*_c_o_n_d_i_t_i_o_n_a_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 _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_t_l___v_e_c_t_o_r_._h. │ │ │ │ +********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ +********** _?◆_? __GGLLIIBBCCXXXX__AASSAANN__AANNNNOOTTAATTEE__BBEEFFOORREE__DDEEAALLLLOOCC ********** │ │ │ │ +#define _GLIBCXX_ASAN_ANNOTATE_BEFORE_DEALLOC │ │ │ │ +Definition at line _2_6_8 of file _s_t_l___v_e_c_t_o_r_._h. │ │ │ │ +********** _?◆_? __GGLLIIBBCCXXXX__AASSAANN__AANNNNOOTTAATTEE__GGRREEWW ********** │ │ │ │ +#define _GLIBCXX_ASAN_ANNOTATE_GREW ( nn ) │ │ │ │ +Definition at line _2_6_6 of file _s_t_l___v_e_c_t_o_r_._h. │ │ │ │ +********** _?◆_? __GGLLIIBBCCXXXX__AASSAANN__AANNNNOOTTAATTEE__GGRROOWW ********** │ │ │ │ +#define _GLIBCXX_ASAN_ANNOTATE_GROW ( nn ) │ │ │ │ +Definition at line _2_6_5 of file _s_t_l___v_e_c_t_o_r_._h. │ │ │ │ +********** _?◆_? __GGLLIIBBCCXXXX__AASSAANN__AANNNNOOTTAATTEE__RREEIINNIITT ********** │ │ │ │ +#define _GLIBCXX_ASAN_ANNOTATE_REINIT │ │ │ │ +Definition at line _2_6_4 of file _s_t_l___v_e_c_t_o_r_._h. │ │ │ │ +********** _?◆_? __GGLLIIBBCCXXXX__AASSAANN__AANNNNOOTTAATTEE__SSHHRRIINNKK ********** │ │ │ │ +#define _GLIBCXX_ASAN_ANNOTATE_SHRINK ( nn ) │ │ │ │ +Definition at line _2_6_7 of file _s_t_l___v_e_c_t_o_r_._h. │ │ │ │ * bbiittss │ │ │ │ - * _s_t_r_e_a_m___i_t_e_r_a_t_o_r_._h │ │ │ │ + * _s_t_l___v_e_c_t_o_r_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.15.0 │ │ ├── ./usr/share/doc/gcc-11-base/libstdc++/user/a00395_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: stream_iterator.h Source File │ │ │ +libstdc++: stl_vector.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -48,18 +48,18 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
stream_iterator.h
│ │ │ +
stl_vector.h
│ │ │
│ │ │
│ │ │ -Go to the documentation of this file.
1// Stream iterators
│ │ │ +Go to the documentation of this file.
1// Vector implementation -*- C++ -*-
│ │ │
2
│ │ │
3// Copyright (C) 2001-2021 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)
│ │ │ @@ -74,295 +74,2203 @@ │ │ │
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/stream_iterator.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 _STREAM_ITERATOR_H
│ │ │ -
31#define _STREAM_ITERATOR_H 1
│ │ │ -
32
│ │ │ -
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 /// Provides input iterator semantics for streams.
│ │ │ -
47 template<typename _Tp, typename _CharT = char,
│ │ │ -
48 typename _Traits = char_traits<_CharT>, typename _Dist = ptrdiff_t>
│ │ │ -
│ │ │ - │ │ │ -
50 : public iterator<input_iterator_tag, _Tp, _Dist, const _Tp*, const _Tp&>
│ │ │ -
51 {
│ │ │ -
52 public:
│ │ │ -
53 typedef _CharT char_type;
│ │ │ -
54 typedef _Traits traits_type;
│ │ │ -
55 typedef basic_istream<_CharT, _Traits> istream_type;
│ │ │ -
56
│ │ │ -
57 private:
│ │ │ -
58 istream_type* _M_stream;
│ │ │ -
59 _Tp _M_value;
│ │ │ -
60 // This bool becomes false at end-of-stream. It should be sufficient to
│ │ │ -
61 // check _M_stream != nullptr instead, but historically we did not set
│ │ │ -
62 // _M_stream to null when reaching the end, so we need to keep this flag.
│ │ │ -
63 bool _M_ok;
│ │ │ -
64
│ │ │ -
65 public:
│ │ │ -
66 /// Construct end of input stream iterator.
│ │ │ -
│ │ │ -
67 _GLIBCXX_CONSTEXPR istream_iterator()
│ │ │ -
68 : _M_stream(0), _M_value(), _M_ok(false) {}
│ │ │ -
│ │ │ -
69
│ │ │ -
70 /// Construct start of input stream iterator.
│ │ │ -
│ │ │ -
71 istream_iterator(istream_type& __s)
│ │ │ -
72 : _M_stream(std::__addressof(__s)), _M_ok(true)
│ │ │ -
73 { _M_read(); }
│ │ │ -
│ │ │ -
74
│ │ │ - │ │ │ -
76 : _M_stream(__obj._M_stream), _M_value(__obj._M_value),
│ │ │ -
77 _M_ok(__obj._M_ok)
│ │ │ -
78 { }
│ │ │ -
79
│ │ │ -
80#if __cplusplus > 201703L && __cpp_lib_concepts
│ │ │ -
81 constexpr
│ │ │ -
82 istream_iterator(default_sentinel_t)
│ │ │ -
83 noexcept(is_nothrow_default_constructible_v<_Tp>)
│ │ │ -
84 : istream_iterator() { }
│ │ │ -
85#endif
│ │ │ -
86
│ │ │ -
87#if __cplusplus >= 201103L
│ │ │ -
88 istream_iterator& operator=(const istream_iterator&) = default;
│ │ │ -
89 ~istream_iterator() = default;
│ │ │ -
90#endif
│ │ │ -
91
│ │ │ -
92 const _Tp&
│ │ │ -
93 operator*() const
│ │ │ -
94 {
│ │ │ -
95 __glibcxx_requires_cond(_M_ok,
│ │ │ -
96 _M_message(__gnu_debug::__msg_deref_istream)
│ │ │ -
97 ._M_iterator(*this));
│ │ │ -
98 return _M_value;
│ │ │ -
99 }
│ │ │ +
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/stl_vector.h
│ │ │ +
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>
│ │ │ +
62#if __cplusplus >= 201103L
│ │ │ +
63#include <initializer_list>
│ │ │ +
64#endif
│ │ │ +
65#if __cplusplus > 201703L
│ │ │ +
66# include <compare>
│ │ │ +
67#endif
│ │ │ +
68
│ │ │ +
69#include <debug/assertions.h>
│ │ │ +
70
│ │ │ +
71#if _GLIBCXX_SANITIZE_STD_ALLOCATOR && _GLIBCXX_SANITIZE_VECTOR
│ │ │ +
72extern "C" void
│ │ │ +
73__sanitizer_annotate_contiguous_container(const void*, const void*,
│ │ │ +
74 const void*, const void*);
│ │ │ +
75#endif
│ │ │ +
76
│ │ │ +
77namespace std _GLIBCXX_VISIBILITY(default)
│ │ │ +
78{
│ │ │ +
79_GLIBCXX_BEGIN_NAMESPACE_VERSION
│ │ │ +
80_GLIBCXX_BEGIN_NAMESPACE_CONTAINER
│ │ │ +
81
│ │ │ +
82 /// See bits/stl_deque.h's _Deque_base for an explanation.
│ │ │ +
83 template<typename _Tp, typename _Alloc>
│ │ │ +
│ │ │ +
84 struct _Vector_base
│ │ │ +
85 {
│ │ │ + │ │ │ +
87 rebind<_Tp>::other _Tp_alloc_type;
│ │ │ +
88 typedef typename __gnu_cxx::__alloc_traits<_Tp_alloc_type>::pointer
│ │ │ +
89 pointer;
│ │ │ +
90
│ │ │ +
91 struct _Vector_impl_data
│ │ │ +
92 {
│ │ │ +
93 pointer _M_start;
│ │ │ +
94 pointer _M_finish;
│ │ │ +
95 pointer _M_end_of_storage;
│ │ │ +
96
│ │ │ +
97 _Vector_impl_data() _GLIBCXX_NOEXCEPT
│ │ │ +
98 : _M_start(), _M_finish(), _M_end_of_storage()
│ │ │ +
99 { }
│ │ │
100
│ │ │ -
101 const _Tp*
│ │ │ -
102 operator->() const { return std::__addressof((operator*())); }
│ │ │ -
103
│ │ │ - │ │ │ -
105 operator++()
│ │ │ -
106 {
│ │ │ -
107 __glibcxx_requires_cond(_M_ok,
│ │ │ -
108 _M_message(__gnu_debug::__msg_inc_istream)
│ │ │ -
109 ._M_iterator(*this));
│ │ │ -
110 _M_read();
│ │ │ -
111 return *this;
│ │ │ -
112 }
│ │ │ -
113
│ │ │ - │ │ │ -
115 operator++(int)
│ │ │ -
116 {
│ │ │ -
117 __glibcxx_requires_cond(_M_ok,
│ │ │ -
118 _M_message(__gnu_debug::__msg_inc_istream)
│ │ │ -
119 ._M_iterator(*this));
│ │ │ -
120 istream_iterator __tmp = *this;
│ │ │ -
121 _M_read();
│ │ │ -
122 return __tmp;
│ │ │ -
123 }
│ │ │ -
124
│ │ │ -
125 private:
│ │ │ -
126 bool
│ │ │ -
127 _M_equal(const istream_iterator& __x) const
│ │ │ -
128 {
│ │ │ -
129 // Ideally this would just return _M_stream == __x._M_stream,
│ │ │ -
130 // but code compiled with old versions never sets _M_stream to null.
│ │ │ -
131 return (_M_ok == __x._M_ok) && (!_M_ok || _M_stream == __x._M_stream);
│ │ │ -
132 }
│ │ │ -
133
│ │ │ -
134 void
│ │ │ -
135 _M_read()
│ │ │ -
136 {
│ │ │ -
137 if (_M_stream && !(*_M_stream >> _M_value))
│ │ │ -
138 {
│ │ │ -
139 _M_stream = 0;
│ │ │ -
140 _M_ok = false;
│ │ │ -
141 }
│ │ │ -
142 }
│ │ │ -
143
│ │ │ -
144 /// Return true if the iterators refer to the same stream,
│ │ │ -
145 /// or are both at end-of-stream.
│ │ │ -
146 friend bool
│ │ │ -
│ │ │ - │ │ │ -
148 { return __x._M_equal(__y); }
│ │ │ -
│ │ │ -
149
│ │ │ -
150 /// Return true if the iterators refer to different streams,
│ │ │ -
151 /// or if one is at end-of-stream and the other is not.
│ │ │ -
152 friend bool
│ │ │ -
│ │ │ - │ │ │ -
154 { return !__x._M_equal(__y); }
│ │ │ -
│ │ │ +
101#if __cplusplus >= 201103L
│ │ │ +
102 _Vector_impl_data(_Vector_impl_data&& __x) noexcept
│ │ │ +
103 : _M_start(__x._M_start), _M_finish(__x._M_finish),
│ │ │ +
104 _M_end_of_storage(__x._M_end_of_storage)
│ │ │ +
105 { __x._M_start = __x._M_finish = __x._M_end_of_storage = pointer(); }
│ │ │ +
106#endif
│ │ │ +
107
│ │ │ +
108 void
│ │ │ +
109 _M_copy_data(_Vector_impl_data const& __x) _GLIBCXX_NOEXCEPT
│ │ │ +
110 {
│ │ │ +
111 _M_start = __x._M_start;
│ │ │ +
112 _M_finish = __x._M_finish;
│ │ │ +
113 _M_end_of_storage = __x._M_end_of_storage;
│ │ │ +
114 }
│ │ │ +
115
│ │ │ +
116 void
│ │ │ +
117 _M_swap_data(_Vector_impl_data& __x) _GLIBCXX_NOEXCEPT
│ │ │ +
118 {
│ │ │ +
119 // Do not use std::swap(_M_start, __x._M_start), etc as it loses
│ │ │ +
120 // information used by TBAA.
│ │ │ +
121 _Vector_impl_data __tmp;
│ │ │ +
122 __tmp._M_copy_data(*this);
│ │ │ +
123 _M_copy_data(__x);
│ │ │ +
124 __x._M_copy_data(__tmp);
│ │ │ +
125 }
│ │ │ +
126 };
│ │ │ +
127
│ │ │ +
128 struct _Vector_impl
│ │ │ +
129 : public _Tp_alloc_type, public _Vector_impl_data
│ │ │ +
130 {
│ │ │ +
131 _Vector_impl() _GLIBCXX_NOEXCEPT_IF(
│ │ │ + │ │ │ +
133 : _Tp_alloc_type()
│ │ │ +
134 { }
│ │ │ +
135
│ │ │ +
136 _Vector_impl(_Tp_alloc_type const& __a) _GLIBCXX_NOEXCEPT
│ │ │ +
137 : _Tp_alloc_type(__a)
│ │ │ +
138 { }
│ │ │ +
139
│ │ │ +
140#if __cplusplus >= 201103L
│ │ │ +
141 // Not defaulted, to enforce noexcept(true) even when
│ │ │ +
142 // !is_nothrow_move_constructible<_Tp_alloc_type>.
│ │ │ +
143 _Vector_impl(_Vector_impl&& __x) noexcept
│ │ │ +
144 : _Tp_alloc_type(std::move(__x)), _Vector_impl_data(std::move(__x))
│ │ │ +
145 { }
│ │ │ +
146
│ │ │ +
147 _Vector_impl(_Tp_alloc_type&& __a) noexcept
│ │ │ +
148 : _Tp_alloc_type(std::move(__a))
│ │ │ +
149 { }
│ │ │ +
150
│ │ │ +
151 _Vector_impl(_Tp_alloc_type&& __a, _Vector_impl&& __rv) noexcept
│ │ │ +
152 : _Tp_alloc_type(std::move(__a)), _Vector_impl_data(std::move(__rv))
│ │ │ +
153 { }
│ │ │ +
154#endif
│ │ │
155
│ │ │ -
156#if __cplusplus > 201703L && __cpp_lib_concepts
│ │ │ -
157 friend bool
│ │ │ -
158 operator==(const istream_iterator& __i, default_sentinel_t)
│ │ │ -
159 { return !__i._M_stream; }
│ │ │ -
160#endif
│ │ │ -
161 };
│ │ │ -
│ │ │ -
162
│ │ │ -
163 /**
│ │ │ -
164 * @brief Provides output iterator semantics for streams.
│ │ │ -
165 *
│ │ │ -
166 * This class provides an iterator to write to an ostream. The type Tp is
│ │ │ -
167 * the only type written by this iterator and there must be an
│ │ │ -
168 * operator<<(Tp) defined.
│ │ │ -
169 *
│ │ │ -
170 * @tparam _Tp The type to write to the ostream.
│ │ │ -
171 * @tparam _CharT The ostream char_type.
│ │ │ -
172 * @tparam _Traits The ostream char_traits.
│ │ │ -
173 */
│ │ │ -
174 template<typename _Tp, typename _CharT = char,
│ │ │ -
175 typename _Traits = char_traits<_CharT> >
│ │ │ -
│ │ │ - │ │ │ -
177 : public iterator<output_iterator_tag, void, void, void, void>
│ │ │ -
178 {
│ │ │ -
179 public:
│ │ │ -
180 ///@{
│ │ │ -
181 /// Public typedef
│ │ │ -
182#if __cplusplus > 201703L
│ │ │ -
183 using difference_type = ptrdiff_t;
│ │ │ -
184#endif
│ │ │ -
185 typedef _CharT char_type;
│ │ │ -
186 typedef _Traits traits_type;
│ │ │ - │ │ │ -
188 ///@}
│ │ │ -
189
│ │ │ -
190 private:
│ │ │ -
191 ostream_type* _M_stream;
│ │ │ -
192 const _CharT* _M_string;
│ │ │ -
193
│ │ │ -
194 public:
│ │ │ -
195#if __cplusplus > 201703L
│ │ │ -
196 constexpr ostream_iterator() noexcept
│ │ │ -
197 : _M_stream(nullptr), _M_string(nullptr) { }
│ │ │ -
198#endif
│ │ │ -
199
│ │ │ -
200 /// Construct from an ostream.
│ │ │ -
│ │ │ - │ │ │ -
202 : _M_stream(std::__addressof(__s)), _M_string(0) {}
│ │ │ -
│ │ │ -
203
│ │ │ -
204 /**
│ │ │ -
205 * Construct from an ostream.
│ │ │ -
206 *
│ │ │ -
207 * The delimiter string @a c is written to the stream after every Tp
│ │ │ -
208 * written to the stream. The delimiter is not copied, and thus must
│ │ │ -
209 * not be destroyed while this iterator is in use.
│ │ │ -
210 *
│ │ │ -
211 * @param __s Underlying ostream to write to.
│ │ │ -
212 * @param __c CharT delimiter string to insert.
│ │ │ -
213 */
│ │ │ -
│ │ │ -
214 ostream_iterator(ostream_type& __s, const _CharT* __c)
│ │ │ -
215 : _M_stream(std::__addressof(__s)), _M_string(__c) { }
│ │ │ -
│ │ │ -
216
│ │ │ -
217 /// Copy constructor.
│ │ │ -
│ │ │ - │ │ │ -
219 : _M_stream(__obj._M_stream), _M_string(__obj._M_string) { }
│ │ │ -
│ │ │ -
220
│ │ │ -
221#if __cplusplus >= 201103L
│ │ │ -
222 ostream_iterator& operator=(const ostream_iterator&) = default;
│ │ │ -
223#endif
│ │ │ -
224
│ │ │ -
225 /// Writes @a value to underlying ostream using operator<<. If
│ │ │ -
226 /// constructed with delimiter string, writes delimiter to ostream.
│ │ │ - │ │ │ -
│ │ │ -
228 operator=(const _Tp& __value)
│ │ │ -
229 {
│ │ │ -
230 __glibcxx_requires_cond(_M_stream != 0,
│ │ │ -
231 _M_message(__gnu_debug::__msg_output_ostream)
│ │ │ -
232 ._M_iterator(*this));
│ │ │ -
233 *_M_stream << __value;
│ │ │ -
234 if (_M_string)
│ │ │ -
235 *_M_stream << _M_string;
│ │ │ -
236 return *this;
│ │ │ -
237 }
│ │ │ -
│ │ │ -
238
│ │ │ - │ │ │ -
240 operator*()
│ │ │ -
241 { return *this; }
│ │ │ -
242
│ │ │ - │ │ │ -
244 operator++()
│ │ │ -
245 { return *this; }
│ │ │ -
246
│ │ │ - │ │ │ -
248 operator++(int)
│ │ │ -
249 { return *this; }
│ │ │ -
250 };
│ │ │ -
│ │ │ -
251
│ │ │ -
252 /// @} group iterators
│ │ │ -
253
│ │ │ -
254_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ -
255} // namespace
│ │ │ -
256
│ │ │ -
257#endif
│ │ │ - │ │ │ -
constexpr complex< _Tp > operator*(const complex< _Tp > &__x, const complex< _Tp > &__y)
Return new complex value x times y.
Definition complex:392
│ │ │ -
constexpr _Tp * __addressof(_Tp &__r) noexcept
Same as C++11 std::addressof.
Definition move.h:49
│ │ │ +
156#if _GLIBCXX_SANITIZE_STD_ALLOCATOR && _GLIBCXX_SANITIZE_VECTOR
│ │ │ +
157 template<typename = _Tp_alloc_type>
│ │ │ +
158 struct _Asan
│ │ │ +
159 {
│ │ │ + │ │ │ + │ │ │ +
162
│ │ │ +
163 static void _S_shrink(_Vector_impl&, size_type) { }
│ │ │ +
164 static void _S_on_dealloc(_Vector_impl&) { }
│ │ │ +
165
│ │ │ +
166 typedef _Vector_impl& _Reinit;
│ │ │ +
167
│ │ │ +
168 struct _Grow
│ │ │ +
169 {
│ │ │ +
170 _Grow(_Vector_impl&, size_type) { }
│ │ │ +
171 void _M_grew(size_type) { }
│ │ │ +
172 };
│ │ │ +
173 };
│ │ │ +
174
│ │ │ +
175 // Enable ASan annotations for memory obtained from std::allocator.
│ │ │ +
176 template<typename _Up>
│ │ │ +
177 struct _Asan<allocator<_Up> >
│ │ │ +
178 {
│ │ │ + │ │ │ + │ │ │ +
181
│ │ │ +
182 // Adjust ASan annotation for [_M_start, _M_end_of_storage) to
│ │ │ +
183 // mark end of valid region as __curr instead of __prev.
│ │ │ +
184 static void
│ │ │ +
185 _S_adjust(_Vector_impl& __impl, pointer __prev, pointer __curr)
│ │ │ +
186 {
│ │ │ +
187 __sanitizer_annotate_contiguous_container(__impl._M_start,
│ │ │ +
188 __impl._M_end_of_storage, __prev, __curr);
│ │ │ +
189 }
│ │ │ +
190
│ │ │ +
191 static void
│ │ │ +
192 _S_grow(_Vector_impl& __impl, size_type __n)
│ │ │ +
193 { _S_adjust(__impl, __impl._M_finish, __impl._M_finish + __n); }
│ │ │ +
194
│ │ │ +
195 static void
│ │ │ +
196 _S_shrink(_Vector_impl& __impl, size_type __n)
│ │ │ +
197 { _S_adjust(__impl, __impl._M_finish + __n, __impl._M_finish); }
│ │ │ +
198
│ │ │ +
199 static void
│ │ │ +
200 _S_on_dealloc(_Vector_impl& __impl)
│ │ │ +
201 {
│ │ │ +
202 if (__impl._M_start)
│ │ │ +
203 _S_adjust(__impl, __impl._M_finish, __impl._M_end_of_storage);
│ │ │ +
204 }
│ │ │ +
205
│ │ │ +
206 // Used on reallocation to tell ASan unused capacity is invalid.
│ │ │ +
207 struct _Reinit
│ │ │ +
208 {
│ │ │ +
209 explicit _Reinit(_Vector_impl& __impl) : _M_impl(__impl)
│ │ │ +
210 {
│ │ │ +
211 // Mark unused capacity as valid again before deallocating it.
│ │ │ +
212 _S_on_dealloc(_M_impl);
│ │ │ +
213 }
│ │ │ +
214
│ │ │ +
215 ~_Reinit()
│ │ │ +
216 {
│ │ │ +
217 // Mark unused capacity as invalid after reallocation.
│ │ │ +
218 if (_M_impl._M_start)
│ │ │ +
219 _S_adjust(_M_impl, _M_impl._M_end_of_storage,
│ │ │ +
220 _M_impl._M_finish);
│ │ │ +
221 }
│ │ │ +
222
│ │ │ +
223 _Vector_impl& _M_impl;
│ │ │ +
224
│ │ │ +
225#if __cplusplus >= 201103L
│ │ │ +
226 _Reinit(const _Reinit&) = delete;
│ │ │ +
227 _Reinit& operator=(const _Reinit&) = delete;
│ │ │ +
228#endif
│ │ │ +
229 };
│ │ │ +
230
│ │ │ +
231 // Tell ASan when unused capacity is initialized to be valid.
│ │ │ +
232 struct _Grow
│ │ │ +
233 {
│ │ │ +
234 _Grow(_Vector_impl& __impl, size_type __n)
│ │ │ +
235 : _M_impl(__impl), _M_n(__n)
│ │ │ +
236 { _S_grow(_M_impl, __n); }
│ │ │ +
237
│ │ │ +
238 ~_Grow() { if (_M_n) _S_shrink(_M_impl, _M_n); }
│ │ │ +
239
│ │ │ +
240 void _M_grew(size_type __n) { _M_n -= __n; }
│ │ │ +
241
│ │ │ +
242#if __cplusplus >= 201103L
│ │ │ +
243 _Grow(const _Grow&) = delete;
│ │ │ +
244 _Grow& operator=(const _Grow&) = delete;
│ │ │ +
245#endif
│ │ │ +
246 private:
│ │ │ +
247 _Vector_impl& _M_impl;
│ │ │ +
248 size_type _M_n;
│ │ │ +
249 };
│ │ │ +
250 };
│ │ │ +
251
│ │ │ +
252#define _GLIBCXX_ASAN_ANNOTATE_REINIT \
│ │ │ +
253 typename _Base::_Vector_impl::template _Asan<>::_Reinit const \
│ │ │ +
254 __attribute__((__unused__)) __reinit_guard(this->_M_impl)
│ │ │ +
255#define _GLIBCXX_ASAN_ANNOTATE_GROW(n) \
│ │ │ +
256 typename _Base::_Vector_impl::template _Asan<>::_Grow \
│ │ │ +
257 __attribute__((__unused__)) __grow_guard(this->_M_impl, (n))
│ │ │ +
258#define _GLIBCXX_ASAN_ANNOTATE_GREW(n) __grow_guard._M_grew(n)
│ │ │ +
259#define _GLIBCXX_ASAN_ANNOTATE_SHRINK(n) \
│ │ │ +
260 _Base::_Vector_impl::template _Asan<>::_S_shrink(this->_M_impl, n)
│ │ │ +
261#define _GLIBCXX_ASAN_ANNOTATE_BEFORE_DEALLOC \
│ │ │ +
262 _Base::_Vector_impl::template _Asan<>::_S_on_dealloc(this->_M_impl)
│ │ │ +
263#else // ! (_GLIBCXX_SANITIZE_STD_ALLOCATOR && _GLIBCXX_SANITIZE_VECTOR)
│ │ │ +
264#define _GLIBCXX_ASAN_ANNOTATE_REINIT
│ │ │ +
265#define _GLIBCXX_ASAN_ANNOTATE_GROW(n)
│ │ │ +
266#define _GLIBCXX_ASAN_ANNOTATE_GREW(n)
│ │ │ +
267#define _GLIBCXX_ASAN_ANNOTATE_SHRINK(n)
│ │ │ +
268#define _GLIBCXX_ASAN_ANNOTATE_BEFORE_DEALLOC
│ │ │ +
269#endif // _GLIBCXX_SANITIZE_STD_ALLOCATOR && _GLIBCXX_SANITIZE_VECTOR
│ │ │ +
270 };
│ │ │ +
271
│ │ │ +
272 public:
│ │ │ +
273 typedef _Alloc allocator_type;
│ │ │ +
274
│ │ │ +
275 _Tp_alloc_type&
│ │ │ +
276 _M_get_Tp_allocator() _GLIBCXX_NOEXCEPT
│ │ │ +
277 { return this->_M_impl; }
│ │ │ +
278
│ │ │ +
279 const _Tp_alloc_type&
│ │ │ +
280 _M_get_Tp_allocator() const _GLIBCXX_NOEXCEPT
│ │ │ +
281 { return this->_M_impl; }
│ │ │ +
282
│ │ │ +
283 allocator_type
│ │ │ +
│ │ │ +
284 get_allocator() const _GLIBCXX_NOEXCEPT
│ │ │ +
285 { return allocator_type(_M_get_Tp_allocator()); }
│ │ │ +
│ │ │ +
286
│ │ │ +
287#if __cplusplus >= 201103L
│ │ │ +
288 _Vector_base() = default;
│ │ │ +
289#else
│ │ │ +
290 _Vector_base() { }
│ │ │ +
291#endif
│ │ │ +
292
│ │ │ +
293 _Vector_base(const allocator_type& __a) _GLIBCXX_NOEXCEPT
│ │ │ +
294 : _M_impl(__a) { }
│ │ │ +
295
│ │ │ +
296 // Kept for ABI compatibility.
│ │ │ +
297#if !_GLIBCXX_INLINE_VERSION
│ │ │ +
298 _Vector_base(size_t __n)
│ │ │ +
299 : _M_impl()
│ │ │ +
300 { _M_create_storage(__n); }
│ │ │ +
301#endif
│ │ │ +
302
│ │ │ +
303 _Vector_base(size_t __n, const allocator_type& __a)
│ │ │ +
304 : _M_impl(__a)
│ │ │ +
305 { _M_create_storage(__n); }
│ │ │ +
306
│ │ │ +
307#if __cplusplus >= 201103L
│ │ │ +
308 _Vector_base(_Vector_base&&) = default;
│ │ │ +
309
│ │ │ +
310 // Kept for ABI compatibility.
│ │ │ +
311# if !_GLIBCXX_INLINE_VERSION
│ │ │ +
312 _Vector_base(_Tp_alloc_type&& __a) noexcept
│ │ │ +
313 : _M_impl(std::move(__a)) { }
│ │ │ +
314
│ │ │ +
315 _Vector_base(_Vector_base&& __x, const allocator_type& __a)
│ │ │ +
316 : _M_impl(__a)
│ │ │ +
317 {
│ │ │ +
318 if (__x.get_allocator() == __a)
│ │ │ +
319 this->_M_impl._M_swap_data(__x._M_impl);
│ │ │ +
320 else
│ │ │ +
321 {
│ │ │ +
322 size_t __n = __x._M_impl._M_finish - __x._M_impl._M_start;
│ │ │ +
323 _M_create_storage(__n);
│ │ │ +
324 }
│ │ │ +
325 }
│ │ │ +
326# endif
│ │ │ +
327
│ │ │ +
328 _Vector_base(const allocator_type& __a, _Vector_base&& __x)
│ │ │ +
329 : _M_impl(_Tp_alloc_type(__a), std::move(__x._M_impl))
│ │ │ +
330 { }
│ │ │ +
331#endif
│ │ │ +
332
│ │ │ +
333 ~_Vector_base() _GLIBCXX_NOEXCEPT
│ │ │ +
334 {
│ │ │ +
335 _M_deallocate(_M_impl._M_start,
│ │ │ +
336 _M_impl._M_end_of_storage - _M_impl._M_start);
│ │ │ +
337 }
│ │ │ +
338
│ │ │ +
339 public:
│ │ │ +
340 _Vector_impl _M_impl;
│ │ │ +
341
│ │ │ +
342 pointer
│ │ │ +
343 _M_allocate(size_t __n)
│ │ │ +
344 {
│ │ │ +
345 typedef __gnu_cxx::__alloc_traits<_Tp_alloc_type> _Tr;
│ │ │ +
346 return __n != 0 ? _Tr::allocate(_M_impl, __n) : pointer();
│ │ │ +
347 }
│ │ │ +
348
│ │ │ +
349 void
│ │ │ +
350 _M_deallocate(pointer __p, size_t __n)
│ │ │ +
351 {
│ │ │ +
352 typedef __gnu_cxx::__alloc_traits<_Tp_alloc_type> _Tr;
│ │ │ +
353 if (__p)
│ │ │ +
354 _Tr::deallocate(_M_impl, __p, __n);
│ │ │ +
355 }
│ │ │ +
356
│ │ │ +
357 protected:
│ │ │ +
358 void
│ │ │ +
359 _M_create_storage(size_t __n)
│ │ │ +
360 {
│ │ │ +
361 this->_M_impl._M_start = this->_M_allocate(__n);
│ │ │ +
362 this->_M_impl._M_finish = this->_M_impl._M_start;
│ │ │ +
363 this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n;
│ │ │ +
364 }
│ │ │ +
365 };
│ │ │ +
│ │ │ +
366
│ │ │ +
367 /**
│ │ │ +
368 * @brief A standard container which offers fixed time access to
│ │ │ +
369 * individual elements in any order.
│ │ │ +
370 *
│ │ │ +
371 * @ingroup sequences
│ │ │ +
372 *
│ │ │ +
373 * @tparam _Tp Type of element.
│ │ │ +
374 * @tparam _Alloc Allocator type, defaults to allocator<_Tp>.
│ │ │ +
375 *
│ │ │ +
376 * Meets the requirements of a <a href="tables.html#65">container</a>, a
│ │ │ +
377 * <a href="tables.html#66">reversible container</a>, and a
│ │ │ +
378 * <a href="tables.html#67">sequence</a>, including the
│ │ │ +
379 * <a href="tables.html#68">optional sequence requirements</a> with the
│ │ │ +
380 * %exception of @c push_front and @c pop_front.
│ │ │ +
381 *
│ │ │ +
382 * In some terminology a %vector can be described as a dynamic
│ │ │ +
383 * C-style array, it offers fast and efficient access to individual
│ │ │ +
384 * elements in any order and saves the user from worrying about
│ │ │ +
385 * memory and size allocation. Subscripting ( @c [] ) access is
│ │ │ +
386 * also provided as with C-style arrays.
│ │ │ +
387 */
│ │ │ +
388 template<typename _Tp, typename _Alloc = std::allocator<_Tp> >
│ │ │ +
│ │ │ +
389 class vector : protected _Vector_base<_Tp, _Alloc>
│ │ │ +
390 {
│ │ │ +
391#ifdef _GLIBCXX_CONCEPT_CHECKS
│ │ │ +
392 // Concept requirements.
│ │ │ +
393 typedef typename _Alloc::value_type _Alloc_value_type;
│ │ │ +
394# if __cplusplus < 201103L
│ │ │ +
395 __glibcxx_class_requires(_Tp, _SGIAssignableConcept)
│ │ │ +
396# endif
│ │ │ +
397 __glibcxx_class_requires2(_Tp, _Alloc_value_type, _SameTypeConcept)
│ │ │ +
398#endif
│ │ │ +
399
│ │ │ +
400#if __cplusplus >= 201103L
│ │ │ +
401 static_assert(is_same<typename remove_cv<_Tp>::type, _Tp>::value,
│ │ │ +
402 "std::vector must have a non-const, non-volatile value_type");
│ │ │ +
403# if __cplusplus > 201703L || defined __STRICT_ANSI__
│ │ │ +
404 static_assert(is_same<typename _Alloc::value_type, _Tp>::value,
│ │ │ +
405 "std::vector must have the same value_type as its allocator");
│ │ │ +
406# endif
│ │ │ +
407#endif
│ │ │ +
408
│ │ │ +
409 typedef _Vector_base<_Tp, _Alloc> _Base;
│ │ │ +
410 typedef typename _Base::_Tp_alloc_type _Tp_alloc_type;
│ │ │ +
411 typedef __gnu_cxx::__alloc_traits<_Tp_alloc_type> _Alloc_traits;
│ │ │ +
412
│ │ │ +
413 public:
│ │ │ +
414 typedef _Tp value_type;
│ │ │ +
415 typedef typename _Base::pointer pointer;
│ │ │ +
416 typedef typename _Alloc_traits::const_pointer const_pointer;
│ │ │ +
417 typedef typename _Alloc_traits::reference reference;
│ │ │ +
418 typedef typename _Alloc_traits::const_reference const_reference;
│ │ │ +
419 typedef __gnu_cxx::__normal_iterator<pointer, vector> iterator;
│ │ │ +
420 typedef __gnu_cxx::__normal_iterator<const_pointer, vector>
│ │ │ +
421 const_iterator;
│ │ │ +
422 typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
│ │ │ +
423 typedef std::reverse_iterator<iterator> reverse_iterator;
│ │ │ +
424 typedef size_t size_type;
│ │ │ +
425 typedef ptrdiff_t difference_type;
│ │ │ +
426 typedef _Alloc allocator_type;
│ │ │ +
427
│ │ │ +
428 private:
│ │ │ +
429#if __cplusplus >= 201103L
│ │ │ +
430 static constexpr bool
│ │ │ +
431 _S_nothrow_relocate(true_type)
│ │ │ +
432 {
│ │ │ +
433 return noexcept(std::__relocate_a(std::declval<pointer>(),
│ │ │ + │ │ │ + │ │ │ + │ │ │ +
437 }
│ │ │ +
438
│ │ │ +
439 static constexpr bool
│ │ │ +
440 _S_nothrow_relocate(false_type)
│ │ │ +
441 { return false; }
│ │ │ +
442
│ │ │ +
443 static constexpr bool
│ │ │ +
444 _S_use_relocate()
│ │ │ +
445 {
│ │ │ +
446 // Instantiating std::__relocate_a might cause an error outside the
│ │ │ +
447 // immediate context (in __relocate_object_a's noexcept-specifier),
│ │ │ +
448 // so only do it if we know the type can be move-inserted into *this.
│ │ │ +
449 return _S_nothrow_relocate(__is_move_insertable<_Tp_alloc_type>{});
│ │ │ +
450 }
│ │ │ +
451
│ │ │ +
452 static pointer
│ │ │ +
453 _S_do_relocate(pointer __first, pointer __last, pointer __result,
│ │ │ +
454 _Tp_alloc_type& __alloc, true_type) noexcept
│ │ │ +
455 {
│ │ │ +
456 return std::__relocate_a(__first, __last, __result, __alloc);
│ │ │ +
457 }
│ │ │ +
458
│ │ │ +
459 static pointer
│ │ │ +
460 _S_do_relocate(pointer, pointer, pointer __result,
│ │ │ +
461 _Tp_alloc_type&, false_type) noexcept
│ │ │ +
462 { return __result; }
│ │ │ +
463
│ │ │ +
464 static pointer
│ │ │ +
465 _S_relocate(pointer __first, pointer __last, pointer __result,
│ │ │ +
466 _Tp_alloc_type& __alloc) noexcept
│ │ │ +
467 {
│ │ │ +
468 using __do_it = __bool_constant<_S_use_relocate()>;
│ │ │ +
469 return _S_do_relocate(__first, __last, __result, __alloc, __do_it{});
│ │ │ +
470 }
│ │ │ +
471#endif // C++11
│ │ │ +
472
│ │ │ +
473 protected:
│ │ │ +
474 using _Base::_M_allocate;
│ │ │ +
475 using _Base::_M_deallocate;
│ │ │ +
476 using _Base::_M_impl;
│ │ │ +
477 using _Base::_M_get_Tp_allocator;
│ │ │ +
478
│ │ │ +
479 public:
│ │ │ +
480 // [23.2.4.1] construct/copy/destroy
│ │ │ +
481 // (assign() and get_allocator() are also listed in this section)
│ │ │ +
482
│ │ │ +
483 /**
│ │ │ +
484 * @brief Creates a %vector with no elements.
│ │ │ +
485 */
│ │ │ +
486#if __cplusplus >= 201103L
│ │ │ +
487 vector() = default;
│ │ │ +
488#else
│ │ │ +
489 vector() { }
│ │ │ +
490#endif
│ │ │ +
491
│ │ │ +
492 /**
│ │ │ +
493 * @brief Creates a %vector with no elements.
│ │ │ +
494 * @param __a An allocator object.
│ │ │ +
495 */
│ │ │ +
496 explicit
│ │ │ +
│ │ │ +
497 vector(const allocator_type& __a) _GLIBCXX_NOEXCEPT
│ │ │ +
498 : _Base(__a) { }
│ │ │ +
│ │ │ +
499
│ │ │ +
500#if __cplusplus >= 201103L
│ │ │ +
501 /**
│ │ │ +
502 * @brief Creates a %vector with default constructed elements.
│ │ │ +
503 * @param __n The number of elements to initially create.
│ │ │ +
504 * @param __a An allocator.
│ │ │ +
505 *
│ │ │ +
506 * This constructor fills the %vector with @a __n default
│ │ │ +
507 * constructed elements.
│ │ │ +
508 */
│ │ │ +
509 explicit
│ │ │ +
│ │ │ +
510 vector(size_type __n, const allocator_type& __a = allocator_type())
│ │ │ +
511 : _Base(_S_check_init_len(__n, __a), __a)
│ │ │ +
512 { _M_default_initialize(__n); }
│ │ │ +
│ │ │ +
513
│ │ │ +
514 /**
│ │ │ +
515 * @brief Creates a %vector with copies of an exemplar element.
│ │ │ +
516 * @param __n The number of elements to initially create.
│ │ │ +
517 * @param __value An element to copy.
│ │ │ +
518 * @param __a An allocator.
│ │ │ +
519 *
│ │ │ +
520 * This constructor fills the %vector with @a __n copies of @a __value.
│ │ │ +
521 */
│ │ │ +
│ │ │ +
522 vector(size_type __n, const value_type& __value,
│ │ │ +
523 const allocator_type& __a = allocator_type())
│ │ │ +
524 : _Base(_S_check_init_len(__n, __a), __a)
│ │ │ +
525 { _M_fill_initialize(__n, __value); }
│ │ │ +
│ │ │ +
526#else
│ │ │ +
527 /**
│ │ │ +
528 * @brief Creates a %vector with copies of an exemplar element.
│ │ │ +
529 * @param __n The number of elements to initially create.
│ │ │ +
530 * @param __value An element to copy.
│ │ │ +
531 * @param __a An allocator.
│ │ │ +
532 *
│ │ │ +
533 * This constructor fills the %vector with @a __n copies of @a __value.
│ │ │ +
534 */
│ │ │ +
535 explicit
│ │ │ +
536 vector(size_type __n, const value_type& __value = value_type(),
│ │ │ +
537 const allocator_type& __a = allocator_type())
│ │ │ +
538 : _Base(_S_check_init_len(__n, __a), __a)
│ │ │ +
539 { _M_fill_initialize(__n, __value); }
│ │ │ +
540#endif
│ │ │ +
541
│ │ │ +
542 /**
│ │ │ +
543 * @brief %Vector copy constructor.
│ │ │ +
544 * @param __x A %vector of identical element and allocator types.
│ │ │ +
545 *
│ │ │ +
546 * All the elements of @a __x are copied, but any unused capacity in
│ │ │ +
547 * @a __x will not be copied
│ │ │ +
548 * (i.e. capacity() == size() in the new %vector).
│ │ │ +
549 *
│ │ │ +
550 * The newly-created %vector uses a copy of the allocator object used
│ │ │ +
551 * by @a __x (unless the allocator traits dictate a different object).
│ │ │ +
552 */
│ │ │ +
│ │ │ +
553 vector(const vector& __x)
│ │ │ +
554 : _Base(__x.size(),
│ │ │ +
555 _Alloc_traits::_S_select_on_copy(__x._M_get_Tp_allocator()))
│ │ │ +
556 {
│ │ │ +
557 this->_M_impl._M_finish =
│ │ │ +
558 std::__uninitialized_copy_a(__x.begin(), __x.end(),
│ │ │ +
559 this->_M_impl._M_start,
│ │ │ +
560 _M_get_Tp_allocator());
│ │ │ +
561 }
│ │ │ +
│ │ │ +
562
│ │ │ +
563#if __cplusplus >= 201103L
│ │ │ +
564 /**
│ │ │ +
565 * @brief %Vector move constructor.
│ │ │ +
566 *
│ │ │ +
567 * The newly-created %vector contains the exact contents of the
│ │ │ +
568 * moved instance.
│ │ │ +
569 * The contents of the moved instance are a valid, but unspecified
│ │ │ +
570 * %vector.
│ │ │ +
571 */
│ │ │ +
572 vector(vector&&) noexcept = default;
│ │ │ +
573
│ │ │ +
574 /// Copy constructor with alternative allocator
│ │ │ +
│ │ │ +
575 vector(const vector& __x, const allocator_type& __a)
│ │ │ +
576 : _Base(__x.size(), __a)
│ │ │ +
577 {
│ │ │ +
578 this->_M_impl._M_finish =
│ │ │ +
579 std::__uninitialized_copy_a(__x.begin(), __x.end(),
│ │ │ +
580 this->_M_impl._M_start,
│ │ │ +
581 _M_get_Tp_allocator());
│ │ │ +
582 }
│ │ │ +
│ │ │ +
583
│ │ │ +
584 private:
│ │ │ +
585 vector(vector&& __rv, const allocator_type& __m, true_type) noexcept
│ │ │ +
586 : _Base(__m, std::move(__rv))
│ │ │ +
587 { }
│ │ │ +
588
│ │ │ +
589 vector(vector&& __rv, const allocator_type& __m, false_type)
│ │ │ +
590 : _Base(__m)
│ │ │ +
591 {
│ │ │ +
592 if (__rv.get_allocator() == __m)
│ │ │ +
593 this->_M_impl._M_swap_data(__rv._M_impl);
│ │ │ +
594 else if (!__rv.empty())
│ │ │ +
595 {
│ │ │ +
596 this->_M_create_storage(__rv.size());
│ │ │ +
597 this->_M_impl._M_finish =
│ │ │ +
598 std::__uninitialized_move_a(__rv.begin(), __rv.end(),
│ │ │ +
599 this->_M_impl._M_start,
│ │ │ +
600 _M_get_Tp_allocator());
│ │ │ +
601 __rv.clear();
│ │ │ +
602 }
│ │ │ +
603 }
│ │ │ +
604
│ │ │ +
605 public:
│ │ │ +
606 /// Move constructor with alternative allocator
│ │ │ +
│ │ │ +
607 vector(vector&& __rv, const allocator_type& __m)
│ │ │ +
608 noexcept( noexcept(
│ │ │ + │ │ │ + │ │ │ +
611 : vector(std::move(__rv), __m, typename _Alloc_traits::is_always_equal{})
│ │ │ +
612 { }
│ │ │ +
│ │ │ +
613
│ │ │ +
614 /**
│ │ │ +
615 * @brief Builds a %vector from an initializer list.
│ │ │ +
616 * @param __l An initializer_list.
│ │ │ +
617 * @param __a An allocator.
│ │ │ +
618 *
│ │ │ +
619 * Create a %vector consisting of copies of the elements in the
│ │ │ +
620 * initializer_list @a __l.
│ │ │ +
621 *
│ │ │ +
622 * This will call the element type's copy constructor N times
│ │ │ +
623 * (where N is @a __l.size()) and do no memory reallocation.
│ │ │ +
624 */
│ │ │ +
│ │ │ + │ │ │ +
626 const allocator_type& __a = allocator_type())
│ │ │ +
627 : _Base(__a)
│ │ │ +
628 {
│ │ │ +
629 _M_range_initialize(__l.begin(), __l.end(),
│ │ │ + │ │ │ +
631 }
│ │ │ +
│ │ │ +
632#endif
│ │ │ +
633
│ │ │ +
634 /**
│ │ │ +
635 * @brief Builds a %vector from a range.
│ │ │ +
636 * @param __first An input iterator.
│ │ │ +
637 * @param __last An input iterator.
│ │ │ +
638 * @param __a An allocator.
│ │ │ +
639 *
│ │ │ +
640 * Create a %vector consisting of copies of the elements from
│ │ │ +
641 * [first,last).
│ │ │ +
642 *
│ │ │ +
643 * If the iterators are forward, bidirectional, or
│ │ │ +
644 * random-access, then this will call the elements' copy
│ │ │ +
645 * constructor N times (where N is distance(first,last)) and do
│ │ │ +
646 * no memory reallocation. But if only input iterators are
│ │ │ +
647 * used, then this will do at most 2N calls to the copy
│ │ │ +
648 * constructor, and logN memory reallocations.
│ │ │ +
649 */
│ │ │ +
650#if __cplusplus >= 201103L
│ │ │ +
651 template<typename _InputIterator,
│ │ │ +
652 typename = std::_RequireInputIter<_InputIterator>>
│ │ │ +
│ │ │ +
653 vector(_InputIterator __first, _InputIterator __last,
│ │ │ +
654 const allocator_type& __a = allocator_type())
│ │ │ +
655 : _Base(__a)
│ │ │ +
656 {
│ │ │ +
657 _M_range_initialize(__first, __last,
│ │ │ +
658 std::__iterator_category(__first));
│ │ │ +
659 }
│ │ │ +
│ │ │ +
660#else
│ │ │ +
661 template<typename _InputIterator>
│ │ │ +
662 vector(_InputIterator __first, _InputIterator __last,
│ │ │ +
663 const allocator_type& __a = allocator_type())
│ │ │ +
664 : _Base(__a)
│ │ │ +
665 {
│ │ │ +
666 // Check whether it's an integral type. If so, it's not an iterator.
│ │ │ +
667 typedef typename std::__is_integer<_InputIterator>::__type _Integral;
│ │ │ +
668 _M_initialize_dispatch(__first, __last, _Integral());
│ │ │ +
669 }
│ │ │ +
670#endif
│ │ │ +
671
│ │ │ +
672 /**
│ │ │ +
673 * The dtor only erases the elements, and note that if the
│ │ │ +
674 * elements themselves are pointers, the pointed-to memory is
│ │ │ +
675 * not touched in any way. Managing the pointer is the user's
│ │ │ +
676 * responsibility.
│ │ │ +
677 */
│ │ │ +
│ │ │ +
678 ~vector() _GLIBCXX_NOEXCEPT
│ │ │ +
679 {
│ │ │ +
680 std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
│ │ │ +
681 _M_get_Tp_allocator());
│ │ │ +
682 _GLIBCXX_ASAN_ANNOTATE_BEFORE_DEALLOC;
│ │ │ +
683 }
│ │ │ +
│ │ │ +
684
│ │ │ +
685 /**
│ │ │ +
686 * @brief %Vector assignment operator.
│ │ │ +
687 * @param __x A %vector of identical element and allocator types.
│ │ │ +
688 *
│ │ │ +
689 * All the elements of @a __x are copied, but any unused capacity in
│ │ │ +
690 * @a __x will not be copied.
│ │ │ +
691 *
│ │ │ +
692 * Whether the allocator is copied depends on the allocator traits.
│ │ │ +
693 */
│ │ │ +
694 vector&
│ │ │ +
695 operator=(const vector& __x);
│ │ │ +
696
│ │ │ +
697#if __cplusplus >= 201103L
│ │ │ +
698 /**
│ │ │ +
699 * @brief %Vector move assignment operator.
│ │ │ +
700 * @param __x A %vector of identical element and allocator types.
│ │ │ +
701 *
│ │ │ +
702 * The contents of @a __x are moved into this %vector (without copying,
│ │ │ +
703 * if the allocators permit it).
│ │ │ +
704 * Afterwards @a __x is a valid, but unspecified %vector.
│ │ │ +
705 *
│ │ │ +
706 * Whether the allocator is moved depends on the allocator traits.
│ │ │ +
707 */
│ │ │ +
708 vector&
│ │ │ +
│ │ │ +
709 operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
│ │ │ +
710 {
│ │ │ +
711 constexpr bool __move_storage =
│ │ │ +
712 _Alloc_traits::_S_propagate_on_move_assign()
│ │ │ +
713 || _Alloc_traits::_S_always_equal();
│ │ │ +
714 _M_move_assign(std::move(__x), __bool_constant<__move_storage>());
│ │ │ +
715 return *this;
│ │ │ +
716 }
│ │ │ +
│ │ │ +
717
│ │ │ +
718 /**
│ │ │ +
719 * @brief %Vector list assignment operator.
│ │ │ +
720 * @param __l An initializer_list.
│ │ │ +
721 *
│ │ │ +
722 * This function fills a %vector with copies of the elements in the
│ │ │ +
723 * initializer list @a __l.
│ │ │ +
724 *
│ │ │ +
725 * Note that the assignment completely changes the %vector and
│ │ │ +
726 * that the resulting %vector's size is the same as the number
│ │ │ +
727 * of elements assigned.
│ │ │ +
728 */
│ │ │ +
729 vector&
│ │ │ +
│ │ │ + │ │ │ +
731 {
│ │ │ +
732 this->_M_assign_aux(__l.begin(), __l.end(),
│ │ │ + │ │ │ +
734 return *this;
│ │ │ +
735 }
│ │ │ +
│ │ │ +
736#endif
│ │ │ +
737
│ │ │ +
738 /**
│ │ │ +
739 * @brief Assigns a given value to a %vector.
│ │ │ +
740 * @param __n Number of elements to be assigned.
│ │ │ +
741 * @param __val Value to be assigned.
│ │ │ +
742 *
│ │ │ +
743 * This function fills a %vector with @a __n copies of the given
│ │ │ +
744 * value. Note that the assignment completely changes the
│ │ │ +
745 * %vector and that the resulting %vector's size is the same as
│ │ │ +
746 * the number of elements assigned.
│ │ │ +
747 */
│ │ │ +
748 void
│ │ │ +
│ │ │ +
749 assign(size_type __n, const value_type& __val)
│ │ │ +
750 { _M_fill_assign(__n, __val); }
│ │ │ +
│ │ │ +
751
│ │ │ +
752 /**
│ │ │ +
753 * @brief Assigns a range to a %vector.
│ │ │ +
754 * @param __first An input iterator.
│ │ │ +
755 * @param __last An input iterator.
│ │ │ +
756 *
│ │ │ +
757 * This function fills a %vector with copies of the elements in the
│ │ │ +
758 * range [__first,__last).
│ │ │ +
759 *
│ │ │ +
760 * Note that the assignment completely changes the %vector and
│ │ │ +
761 * that the resulting %vector's size is the same as the number
│ │ │ +
762 * of elements assigned.
│ │ │ +
763 */
│ │ │ +
764#if __cplusplus >= 201103L
│ │ │ +
765 template<typename _InputIterator,
│ │ │ +
766 typename = std::_RequireInputIter<_InputIterator>>
│ │ │ +
767 void
│ │ │ +
│ │ │ +
768 assign(_InputIterator __first, _InputIterator __last)
│ │ │ +
769 { _M_assign_dispatch(__first, __last, __false_type()); }
│ │ │ +
│ │ │ +
770#else
│ │ │ +
771 template<typename _InputIterator>
│ │ │ +
772 void
│ │ │ +
773 assign(_InputIterator __first, _InputIterator __last)
│ │ │ +
774 {
│ │ │ +
775 // Check whether it's an integral type. If so, it's not an iterator.
│ │ │ +
776 typedef typename std::__is_integer<_InputIterator>::__type _Integral;
│ │ │ +
777 _M_assign_dispatch(__first, __last, _Integral());
│ │ │ +
778 }
│ │ │ +
779#endif
│ │ │ +
780
│ │ │ +
781#if __cplusplus >= 201103L
│ │ │ +
782 /**
│ │ │ +
783 * @brief Assigns an initializer list to a %vector.
│ │ │ +
784 * @param __l An initializer_list.
│ │ │ +
785 *
│ │ │ +
786 * This function fills a %vector with copies of the elements in the
│ │ │ +
787 * initializer list @a __l.
│ │ │ +
788 *
│ │ │ +
789 * Note that the assignment completely changes the %vector and
│ │ │ +
790 * that the resulting %vector's size is the same as the number
│ │ │ +
791 * of elements assigned.
│ │ │ +
792 */
│ │ │ +
793 void
│ │ │ +
│ │ │ + │ │ │ +
795 {
│ │ │ +
796 this->_M_assign_aux(__l.begin(), __l.end(),
│ │ │ + │ │ │ +
798 }
│ │ │ +
│ │ │ +
799#endif
│ │ │ +
800
│ │ │ +
801 /// Get a copy of the memory allocation object.
│ │ │ +
802 using _Base::get_allocator;
│ │ │ +
803
│ │ │ +
804 // iterators
│ │ │ +
805 /**
│ │ │ +
806 * Returns a read/write iterator that points to the first
│ │ │ +
807 * element in the %vector. Iteration is done in ordinary
│ │ │ +
808 * element order.
│ │ │ +
809 */
│ │ │ + │ │ │ +
│ │ │ +
811 begin() _GLIBCXX_NOEXCEPT
│ │ │ +
812 { return iterator(this->_M_impl._M_start); }
│ │ │ +
│ │ │ +
813
│ │ │ +
814 /**
│ │ │ +
815 * Returns a read-only (constant) iterator that points to the
│ │ │ +
816 * first element in the %vector. Iteration is done in ordinary
│ │ │ +
817 * element order.
│ │ │ +
818 */
│ │ │ +
819 const_iterator
│ │ │ +
│ │ │ +
820 begin() const _GLIBCXX_NOEXCEPT
│ │ │ +
821 { return const_iterator(this->_M_impl._M_start); }
│ │ │ +
│ │ │ +
822
│ │ │ +
823 /**
│ │ │ +
824 * Returns a read/write iterator that points one past the last
│ │ │ +
825 * element in the %vector. Iteration is done in ordinary
│ │ │ +
826 * element order.
│ │ │ +
827 */
│ │ │ + │ │ │ +
│ │ │ +
829 end() _GLIBCXX_NOEXCEPT
│ │ │ +
830 { return iterator(this->_M_impl._M_finish); }
│ │ │ +
│ │ │ +
831
│ │ │ +
832 /**
│ │ │ +
833 * Returns a read-only (constant) iterator that points one past
│ │ │ +
834 * the last element in the %vector. Iteration is done in
│ │ │ +
835 * ordinary element order.
│ │ │ +
836 */
│ │ │ +
837 const_iterator
│ │ │ +
│ │ │ +
838 end() const _GLIBCXX_NOEXCEPT
│ │ │ +
839 { return const_iterator(this->_M_impl._M_finish); }
│ │ │ +
│ │ │ +
840
│ │ │ +
841 /**
│ │ │ +
842 * Returns a read/write reverse iterator that points to the
│ │ │ +
843 * last element in the %vector. Iteration is done in reverse
│ │ │ +
844 * element order.
│ │ │ +
845 */
│ │ │ + │ │ │ +
│ │ │ +
847 rbegin() _GLIBCXX_NOEXCEPT
│ │ │ +
848 { return reverse_iterator(end()); }
│ │ │ +
│ │ │ +
849
│ │ │ +
850 /**
│ │ │ +
851 * Returns a read-only (constant) reverse iterator that points
│ │ │ +
852 * to the last element in the %vector. Iteration is done in
│ │ │ +
853 * reverse element order.
│ │ │ +
854 */
│ │ │ +
855 const_reverse_iterator
│ │ │ +
│ │ │ +
856 rbegin() const _GLIBCXX_NOEXCEPT
│ │ │ +
857 { return const_reverse_iterator(end()); }
│ │ │ +
│ │ │ +
858
│ │ │ +
859 /**
│ │ │ +
860 * Returns a read/write reverse iterator that points to one
│ │ │ +
861 * before the first element in the %vector. Iteration is done
│ │ │ +
862 * in reverse element order.
│ │ │ +
863 */
│ │ │ + │ │ │ +
│ │ │ +
865 rend() _GLIBCXX_NOEXCEPT
│ │ │ +
866 { return reverse_iterator(begin()); }
│ │ │ +
│ │ │ +
867
│ │ │ +
868 /**
│ │ │ +
869 * Returns a read-only (constant) reverse iterator that points
│ │ │ +
870 * to one before the first element in the %vector. Iteration
│ │ │ +
871 * is done in reverse element order.
│ │ │ +
872 */
│ │ │ +
873 const_reverse_iterator
│ │ │ +
│ │ │ +
874 rend() const _GLIBCXX_NOEXCEPT
│ │ │ +
875 { return const_reverse_iterator(begin()); }
│ │ │ +
│ │ │ +
876
│ │ │ +
877#if __cplusplus >= 201103L
│ │ │ +
878 /**
│ │ │ +
879 * Returns a read-only (constant) iterator that points to the
│ │ │ +
880 * first element in the %vector. Iteration is done in ordinary
│ │ │ +
881 * element order.
│ │ │ +
882 */
│ │ │ +
883 const_iterator
│ │ │ +
│ │ │ +
884 cbegin() const noexcept
│ │ │ +
885 { return const_iterator(this->_M_impl._M_start); }
│ │ │ +
│ │ │ +
886
│ │ │ +
887 /**
│ │ │ +
888 * Returns a read-only (constant) iterator that points one past
│ │ │ +
889 * the last element in the %vector. Iteration is done in
│ │ │ +
890 * ordinary element order.
│ │ │ +
891 */
│ │ │ +
892 const_iterator
│ │ │ +
│ │ │ +
893 cend() const noexcept
│ │ │ +
894 { return const_iterator(this->_M_impl._M_finish); }
│ │ │ +
│ │ │ +
895
│ │ │ +
896 /**
│ │ │ +
897 * Returns a read-only (constant) reverse iterator that points
│ │ │ +
898 * to the last element in the %vector. Iteration is done in
│ │ │ +
899 * reverse element order.
│ │ │ +
900 */
│ │ │ +
901 const_reverse_iterator
│ │ │ +
│ │ │ +
902 crbegin() const noexcept
│ │ │ +
903 { return const_reverse_iterator(end()); }
│ │ │ +
│ │ │ +
904
│ │ │ +
905 /**
│ │ │ +
906 * Returns a read-only (constant) reverse iterator that points
│ │ │ +
907 * to one before the first element in the %vector. Iteration
│ │ │ +
908 * is done in reverse element order.
│ │ │ +
909 */
│ │ │ +
910 const_reverse_iterator
│ │ │ +
│ │ │ +
911 crend() const noexcept
│ │ │ +
912 { return const_reverse_iterator(begin()); }
│ │ │ +
│ │ │ +
913#endif
│ │ │ +
914
│ │ │ +
915 // [23.2.4.2] capacity
│ │ │ +
916 /** Returns the number of elements in the %vector. */
│ │ │ + │ │ │ +
│ │ │ +
918 size() const _GLIBCXX_NOEXCEPT
│ │ │ +
919 { return size_type(this->_M_impl._M_finish - this->_M_impl._M_start); }
│ │ │ +
│ │ │ +
920
│ │ │ +
921 /** Returns the size() of the largest possible %vector. */
│ │ │ + │ │ │ +
│ │ │ +
923 max_size() const _GLIBCXX_NOEXCEPT
│ │ │ +
924 { return _S_max_size(_M_get_Tp_allocator()); }
│ │ │ +
│ │ │ +
925
│ │ │ +
926#if __cplusplus >= 201103L
│ │ │ +
927 /**
│ │ │ +
928 * @brief Resizes the %vector to the specified number of elements.
│ │ │ +
929 * @param __new_size Number of elements the %vector should contain.
│ │ │ +
930 *
│ │ │ +
931 * This function will %resize the %vector to the specified
│ │ │ +
932 * number of elements. If the number is smaller than the
│ │ │ +
933 * %vector's current size the %vector is truncated, otherwise
│ │ │ +
934 * default constructed elements are appended.
│ │ │ +
935 */
│ │ │ +
936 void
│ │ │ +
│ │ │ +
937 resize(size_type __new_size)
│ │ │ +
938 {
│ │ │ +
939 if (__new_size > size())
│ │ │ +
940 _M_default_append(__new_size - size());
│ │ │ +
941 else if (__new_size < size())
│ │ │ +
942 _M_erase_at_end(this->_M_impl._M_start + __new_size);
│ │ │ +
943 }
│ │ │ +
│ │ │ +
944
│ │ │ +
945 /**
│ │ │ +
946 * @brief Resizes the %vector to the specified number of elements.
│ │ │ +
947 * @param __new_size Number of elements the %vector should contain.
│ │ │ +
948 * @param __x Data with which new elements should be populated.
│ │ │ +
949 *
│ │ │ +
950 * This function will %resize the %vector to the specified
│ │ │ +
951 * number of elements. If the number is smaller than the
│ │ │ +
952 * %vector's current size the %vector is truncated, otherwise
│ │ │ +
953 * the %vector is extended and new elements are populated with
│ │ │ +
954 * given data.
│ │ │ +
955 */
│ │ │ +
956 void
│ │ │ +
│ │ │ +
957 resize(size_type __new_size, const value_type& __x)
│ │ │ +
958 {
│ │ │ +
959 if (__new_size > size())
│ │ │ +
960 _M_fill_insert(end(), __new_size - size(), __x);
│ │ │ +
961 else if (__new_size < size())
│ │ │ +
962 _M_erase_at_end(this->_M_impl._M_start + __new_size);
│ │ │ +
963 }
│ │ │ +
│ │ │ +
964#else
│ │ │ +
965 /**
│ │ │ +
966 * @brief Resizes the %vector to the specified number of elements.
│ │ │ +
967 * @param __new_size Number of elements the %vector should contain.
│ │ │ +
968 * @param __x Data with which new elements should be populated.
│ │ │ +
969 *
│ │ │ +
970 * This function will %resize the %vector to the specified
│ │ │ +
971 * number of elements. If the number is smaller than the
│ │ │ +
972 * %vector's current size the %vector is truncated, otherwise
│ │ │ +
973 * the %vector is extended and new elements are populated with
│ │ │ +
974 * given data.
│ │ │ +
975 */
│ │ │ +
976 void
│ │ │ +
977 resize(size_type __new_size, value_type __x = value_type())
│ │ │ +
978 {
│ │ │ +
979 if (__new_size > size())
│ │ │ +
980 _M_fill_insert(end(), __new_size - size(), __x);
│ │ │ +
981 else if (__new_size < size())
│ │ │ +
982 _M_erase_at_end(this->_M_impl._M_start + __new_size);
│ │ │ +
983 }
│ │ │ +
984#endif
│ │ │ +
985
│ │ │ +
986#if __cplusplus >= 201103L
│ │ │ +
987 /** A non-binding request to reduce capacity() to size(). */
│ │ │ +
988 void
│ │ │ +
│ │ │ + │ │ │ +
990 { _M_shrink_to_fit(); }
│ │ │ +
│ │ │ +
991#endif
│ │ │ +
992
│ │ │ +
993 /**
│ │ │ +
994 * Returns the total number of elements that the %vector can
│ │ │ +
995 * hold before needing to allocate more memory.
│ │ │ +
996 */
│ │ │ + │ │ │ +
│ │ │ +
998 capacity() const _GLIBCXX_NOEXCEPT
│ │ │ +
999 { return size_type(this->_M_impl._M_end_of_storage
│ │ │ +
1000 - this->_M_impl._M_start); }
│ │ │ +
│ │ │ +
1001
│ │ │ +
1002 /**
│ │ │ +
1003 * Returns true if the %vector is empty. (Thus begin() would
│ │ │ +
1004 * equal end().)
│ │ │ +
1005 */
│ │ │ +
1006 _GLIBCXX_NODISCARD bool
│ │ │ +
│ │ │ +
1007 empty() const _GLIBCXX_NOEXCEPT
│ │ │ +
1008 { return begin() == end(); }
│ │ │ +
│ │ │ +
1009
│ │ │ +
1010 /**
│ │ │ +
1011 * @brief Attempt to preallocate enough memory for specified number of
│ │ │ +
1012 * elements.
│ │ │ +
1013 * @param __n Number of elements required.
│ │ │ +
1014 * @throw std::length_error If @a n exceeds @c max_size().
│ │ │ +
1015 *
│ │ │ +
1016 * This function attempts to reserve enough memory for the
│ │ │ +
1017 * %vector to hold the specified number of elements. If the
│ │ │ +
1018 * number requested is more than max_size(), length_error is
│ │ │ +
1019 * thrown.
│ │ │ +
1020 *
│ │ │ +
1021 * The advantage of this function is that if optimal code is a
│ │ │ +
1022 * necessity and the user can determine the number of elements
│ │ │ +
1023 * that will be required, the user can reserve the memory in
│ │ │ +
1024 * %advance, and thus prevent a possible reallocation of memory
│ │ │ +
1025 * and copying of %vector data.
│ │ │ +
1026 */
│ │ │ +
1027 void
│ │ │ +
1028 reserve(size_type __n);
│ │ │ +
1029
│ │ │ +
1030 // element access
│ │ │ +
1031 /**
│ │ │ +
1032 * @brief Subscript access to the data contained in the %vector.
│ │ │ +
1033 * @param __n The index of the element for which data should be
│ │ │ +
1034 * accessed.
│ │ │ +
1035 * @return Read/write reference to data.
│ │ │ +
1036 *
│ │ │ +
1037 * This operator allows for easy, array-style, data access.
│ │ │ +
1038 * Note that data access with this operator is unchecked and
│ │ │ +
1039 * out_of_range lookups are not defined. (For checked lookups
│ │ │ +
1040 * see at().)
│ │ │ +
1041 */
│ │ │ +
1042 reference
│ │ │ +
│ │ │ +
1043 operator[](size_type __n) _GLIBCXX_NOEXCEPT
│ │ │ +
1044 {
│ │ │ +
1045 __glibcxx_requires_subscript(__n);
│ │ │ +
1046 return *(this->_M_impl._M_start + __n);
│ │ │ +
1047 }
│ │ │ +
│ │ │ +
1048
│ │ │ +
1049 /**
│ │ │ +
1050 * @brief Subscript access to the data contained in the %vector.
│ │ │ +
1051 * @param __n The index of the element for which data should be
│ │ │ +
1052 * accessed.
│ │ │ +
1053 * @return Read-only (constant) reference to data.
│ │ │ +
1054 *
│ │ │ +
1055 * This operator allows for easy, array-style, data access.
│ │ │ +
1056 * Note that data access with this operator is unchecked and
│ │ │ +
1057 * out_of_range lookups are not defined. (For checked lookups
│ │ │ +
1058 * see at().)
│ │ │ +
1059 */
│ │ │ +
1060 const_reference
│ │ │ +
│ │ │ +
1061 operator[](size_type __n) const _GLIBCXX_NOEXCEPT
│ │ │ +
1062 {
│ │ │ +
1063 __glibcxx_requires_subscript(__n);
│ │ │ +
1064 return *(this->_M_impl._M_start + __n);
│ │ │ +
1065 }
│ │ │ +
│ │ │ +
1066
│ │ │ +
1067 protected:
│ │ │ +
1068 /// Safety check used only from at().
│ │ │ +
1069 void
│ │ │ +
│ │ │ +
1070 _M_range_check(size_type __n) const
│ │ │ +
1071 {
│ │ │ +
1072 if (__n >= this->size())
│ │ │ +
1073 __throw_out_of_range_fmt(__N("vector::_M_range_check: __n "
│ │ │ +
1074 "(which is %zu) >= this->size() "
│ │ │ +
1075 "(which is %zu)"),
│ │ │ +
1076 __n, this->size());
│ │ │ +
1077 }
│ │ │ +
│ │ │ +
1078
│ │ │ +
1079 public:
│ │ │ +
1080 /**
│ │ │ +
1081 * @brief Provides access to the data contained in the %vector.
│ │ │ +
1082 * @param __n The index of the element for which data should be
│ │ │ +
1083 * accessed.
│ │ │ +
1084 * @return Read/write reference to data.
│ │ │ +
1085 * @throw std::out_of_range If @a __n is an invalid index.
│ │ │ +
1086 *
│ │ │ +
1087 * This function provides for safer data access. The parameter
│ │ │ +
1088 * is first checked that it is in the range of the vector. The
│ │ │ +
1089 * function throws out_of_range if the check fails.
│ │ │ +
1090 */
│ │ │ +
1091 reference
│ │ │ +
│ │ │ +
1092 at(size_type __n)
│ │ │ +
1093 {
│ │ │ +
1094 _M_range_check(__n);
│ │ │ +
1095 return (*this)[__n];
│ │ │ +
1096 }
│ │ │ +
│ │ │ +
1097
│ │ │ +
1098 /**
│ │ │ +
1099 * @brief Provides access to the data contained in the %vector.
│ │ │ +
1100 * @param __n The index of the element for which data should be
│ │ │ +
1101 * accessed.
│ │ │ +
1102 * @return Read-only (constant) reference to data.
│ │ │ +
1103 * @throw std::out_of_range If @a __n is an invalid index.
│ │ │ +
1104 *
│ │ │ +
1105 * This function provides for safer data access. The parameter
│ │ │ +
1106 * is first checked that it is in the range of the vector. The
│ │ │ +
1107 * function throws out_of_range if the check fails.
│ │ │ +
1108 */
│ │ │ +
1109 const_reference
│ │ │ +
│ │ │ +
1110 at(size_type __n) const
│ │ │ +
1111 {
│ │ │ +
1112 _M_range_check(__n);
│ │ │ +
1113 return (*this)[__n];
│ │ │ +
1114 }
│ │ │ +
│ │ │ +
1115
│ │ │ +
1116 /**
│ │ │ +
1117 * Returns a read/write reference to the data at the first
│ │ │ +
1118 * element of the %vector.
│ │ │ +
1119 */
│ │ │ +
1120 reference
│ │ │ +
│ │ │ +
1121 front() _GLIBCXX_NOEXCEPT
│ │ │ +
1122 {
│ │ │ +
1123 __glibcxx_requires_nonempty();
│ │ │ +
1124 return *begin();
│ │ │ +
1125 }
│ │ │ +
│ │ │ +
1126
│ │ │ +
1127 /**
│ │ │ +
1128 * Returns a read-only (constant) reference to the data at the first
│ │ │ +
1129 * element of the %vector.
│ │ │ +
1130 */
│ │ │ +
1131 const_reference
│ │ │ +
│ │ │ +
1132 front() const _GLIBCXX_NOEXCEPT
│ │ │ +
1133 {
│ │ │ +
1134 __glibcxx_requires_nonempty();
│ │ │ +
1135 return *begin();
│ │ │ +
1136 }
│ │ │ +
│ │ │ +
1137
│ │ │ +
1138 /**
│ │ │ +
1139 * Returns a read/write reference to the data at the last
│ │ │ +
1140 * element of the %vector.
│ │ │ +
1141 */
│ │ │ +
1142 reference
│ │ │ +
│ │ │ +
1143 back() _GLIBCXX_NOEXCEPT
│ │ │ +
1144 {
│ │ │ +
1145 __glibcxx_requires_nonempty();
│ │ │ +
1146 return *(end() - 1);
│ │ │ +
1147 }
│ │ │ +
│ │ │ +
1148
│ │ │ +
1149 /**
│ │ │ +
1150 * Returns a read-only (constant) reference to the data at the
│ │ │ +
1151 * last element of the %vector.
│ │ │ +
1152 */
│ │ │ +
1153 const_reference
│ │ │ +
│ │ │ +
1154 back() const _GLIBCXX_NOEXCEPT
│ │ │ +
1155 {
│ │ │ +
1156 __glibcxx_requires_nonempty();
│ │ │ +
1157 return *(end() - 1);
│ │ │ +
1158 }
│ │ │ +
│ │ │ +
1159
│ │ │ +
1160 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ +
1161 // DR 464. Suggestion for new member functions in standard containers.
│ │ │ +
1162 // data access
│ │ │ +
1163 /**
│ │ │ +
1164 * Returns a pointer such that [data(), data() + size()) is a valid
│ │ │ +
1165 * range. For a non-empty %vector, data() == &front().
│ │ │ +
1166 */
│ │ │ +
1167 _Tp*
│ │ │ +
│ │ │ +
1168 data() _GLIBCXX_NOEXCEPT
│ │ │ +
1169 { return _M_data_ptr(this->_M_impl._M_start); }
│ │ │ +
│ │ │ +
1170
│ │ │ +
1171 const _Tp*
│ │ │ +
1172 data() const _GLIBCXX_NOEXCEPT
│ │ │ +
1173 { return _M_data_ptr(this->_M_impl._M_start); }
│ │ │ +
1174
│ │ │ +
1175 // [23.2.4.3] modifiers
│ │ │ +
1176 /**
│ │ │ +
1177 * @brief Add data to the end of the %vector.
│ │ │ +
1178 * @param __x Data to be added.
│ │ │ +
1179 *
│ │ │ +
1180 * This is a typical stack operation. The function creates an
│ │ │ +
1181 * element at the end of the %vector and assigns the given data
│ │ │ +
1182 * to it. Due to the nature of a %vector this operation can be
│ │ │ +
1183 * done in constant time if the %vector has preallocated space
│ │ │ +
1184 * available.
│ │ │ +
1185 */
│ │ │ +
1186 void
│ │ │ +
│ │ │ +
1187 push_back(const value_type& __x)
│ │ │ +
1188 {
│ │ │ +
1189 if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage)
│ │ │ +
1190 {
│ │ │ +
1191 _GLIBCXX_ASAN_ANNOTATE_GROW(1);
│ │ │ +
1192 _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish,
│ │ │ +
1193 __x);
│ │ │ +
1194 ++this->_M_impl._M_finish;
│ │ │ +
1195 _GLIBCXX_ASAN_ANNOTATE_GREW(1);
│ │ │ +
1196 }
│ │ │ +
1197 else
│ │ │ +
1198 _M_realloc_insert(end(), __x);
│ │ │ +
1199 }
│ │ │ +
│ │ │ +
1200
│ │ │ +
1201#if __cplusplus >= 201103L
│ │ │ +
1202 void
│ │ │ +
1203 push_back(value_type&& __x)
│ │ │ +
1204 { emplace_back(std::move(__x)); }
│ │ │ +
1205
│ │ │ +
1206 template<typename... _Args>
│ │ │ +
1207#if __cplusplus > 201402L
│ │ │ +
1208 reference
│ │ │ +
1209#else
│ │ │ +
1210 void
│ │ │ +
1211#endif
│ │ │ +
1212 emplace_back(_Args&&... __args);
│ │ │ +
1213#endif
│ │ │ +
1214
│ │ │ +
1215 /**
│ │ │ +
1216 * @brief Removes last element.
│ │ │ +
1217 *
│ │ │ +
1218 * This is a typical stack operation. It shrinks the %vector by one.
│ │ │ +
1219 *
│ │ │ +
1220 * Note that no data is returned, and if the last element's
│ │ │ +
1221 * data is needed, it should be retrieved before pop_back() is
│ │ │ +
1222 * called.
│ │ │ +
1223 */
│ │ │ +
1224 void
│ │ │ +
│ │ │ +
1225 pop_back() _GLIBCXX_NOEXCEPT
│ │ │ +
1226 {
│ │ │ +
1227 __glibcxx_requires_nonempty();
│ │ │ +
1228 --this->_M_impl._M_finish;
│ │ │ +
1229 _Alloc_traits::destroy(this->_M_impl, this->_M_impl._M_finish);
│ │ │ +
1230 _GLIBCXX_ASAN_ANNOTATE_SHRINK(1);
│ │ │ +
1231 }
│ │ │ +
│ │ │ +
1232
│ │ │ +
1233#if __cplusplus >= 201103L
│ │ │ +
1234 /**
│ │ │ +
1235 * @brief Inserts an object in %vector before specified iterator.
│ │ │ +
1236 * @param __position A const_iterator into the %vector.
│ │ │ +
1237 * @param __args Arguments.
│ │ │ +
1238 * @return An iterator that points to the inserted data.
│ │ │ +
1239 *
│ │ │ +
1240 * This function will insert an object of type T constructed
│ │ │ +
1241 * with T(std::forward<Args>(args)...) before the specified location.
│ │ │ +
1242 * Note that this kind of operation could be expensive for a %vector
│ │ │ +
1243 * and if it is frequently used the user should consider using
│ │ │ +
1244 * std::list.
│ │ │ +
1245 */
│ │ │ +
1246 template<typename... _Args>
│ │ │ +
1247 iterator
│ │ │ +
│ │ │ +
1248 emplace(const_iterator __position, _Args&&... __args)
│ │ │ +
1249 { return _M_emplace_aux(__position, std::forward<_Args>(__args)...); }
│ │ │ +
│ │ │ +
1250
│ │ │ +
1251 /**
│ │ │ +
1252 * @brief Inserts given value into %vector before specified iterator.
│ │ │ +
1253 * @param __position A const_iterator into the %vector.
│ │ │ +
1254 * @param __x Data to be inserted.
│ │ │ +
1255 * @return An iterator that points to the inserted data.
│ │ │ +
1256 *
│ │ │ +
1257 * This function will insert a copy of the given value before
│ │ │ +
1258 * the specified location. Note that this kind of operation
│ │ │ +
1259 * could be expensive for a %vector and if it is frequently
│ │ │ +
1260 * used the user should consider using std::list.
│ │ │ +
1261 */
│ │ │ +
1262 iterator
│ │ │ +
1263 insert(const_iterator __position, const value_type& __x);
│ │ │ +
1264#else
│ │ │ +
1265 /**
│ │ │ +
1266 * @brief Inserts given value into %vector before specified iterator.
│ │ │ +
1267 * @param __position An iterator into the %vector.
│ │ │ +
1268 * @param __x Data to be inserted.
│ │ │ +
1269 * @return An iterator that points to the inserted data.
│ │ │ +
1270 *
│ │ │ +
1271 * This function will insert a copy of the given value before
│ │ │ +
1272 * the specified location. Note that this kind of operation
│ │ │ +
1273 * could be expensive for a %vector and if it is frequently
│ │ │ +
1274 * used the user should consider using std::list.
│ │ │ +
1275 */
│ │ │ +
1276 iterator
│ │ │ +
1277 insert(iterator __position, const value_type& __x);
│ │ │ +
1278#endif
│ │ │ +
1279
│ │ │ +
1280#if __cplusplus >= 201103L
│ │ │ +
1281 /**
│ │ │ +
1282 * @brief Inserts given rvalue into %vector before specified iterator.
│ │ │ +
1283 * @param __position A const_iterator into the %vector.
│ │ │ +
1284 * @param __x Data to be inserted.
│ │ │ +
1285 * @return An iterator that points to the inserted data.
│ │ │ +
1286 *
│ │ │ +
1287 * This function will insert a copy of the given rvalue before
│ │ │ +
1288 * the specified location. Note that this kind of operation
│ │ │ +
1289 * could be expensive for a %vector and if it is frequently
│ │ │ +
1290 * used the user should consider using std::list.
│ │ │ +
1291 */
│ │ │ +
1292 iterator
│ │ │ +
│ │ │ +
1293 insert(const_iterator __position, value_type&& __x)
│ │ │ +
1294 { return _M_insert_rval(__position, std::move(__x)); }
│ │ │ +
│ │ │ +
1295
│ │ │ +
1296 /**
│ │ │ +
1297 * @brief Inserts an initializer_list into the %vector.
│ │ │ +
1298 * @param __position An iterator into the %vector.
│ │ │ +
1299 * @param __l An initializer_list.
│ │ │ +
1300 *
│ │ │ +
1301 * This function will insert copies of the data in the
│ │ │ +
1302 * initializer_list @a l into the %vector before the location
│ │ │ +
1303 * specified by @a position.
│ │ │ +
1304 *
│ │ │ +
1305 * Note that this kind of operation could be expensive for a
│ │ │ +
1306 * %vector and if it is frequently used the user should
│ │ │ +
1307 * consider using std::list.
│ │ │ +
1308 */
│ │ │ +
1309 iterator
│ │ │ +
│ │ │ +
1310 insert(const_iterator __position, initializer_list<value_type> __l)
│ │ │ +
1311 {
│ │ │ +
1312 auto __offset = __position - cbegin();
│ │ │ +
1313 _M_range_insert(begin() + __offset, __l.begin(), __l.end(),
│ │ │ + │ │ │ +
1315 return begin() + __offset;
│ │ │ +
1316 }
│ │ │ +
│ │ │ +
1317#endif
│ │ │ +
1318
│ │ │ +
1319#if __cplusplus >= 201103L
│ │ │ +
1320 /**
│ │ │ +
1321 * @brief Inserts a number of copies of given data into the %vector.
│ │ │ +
1322 * @param __position A const_iterator into the %vector.
│ │ │ +
1323 * @param __n Number of elements to be inserted.
│ │ │ +
1324 * @param __x Data to be inserted.
│ │ │ +
1325 * @return An iterator that points to the inserted data.
│ │ │ +
1326 *
│ │ │ +
1327 * This function will insert a specified number of copies of
│ │ │ +
1328 * the given data before the location specified by @a position.
│ │ │ +
1329 *
│ │ │ +
1330 * Note that this kind of operation could be expensive for a
│ │ │ +
1331 * %vector and if it is frequently used the user should
│ │ │ +
1332 * consider using std::list.
│ │ │ +
1333 */
│ │ │ +
1334 iterator
│ │ │ +
│ │ │ +
1335 insert(const_iterator __position, size_type __n, const value_type& __x)
│ │ │ +
1336 {
│ │ │ +
1337 difference_type __offset = __position - cbegin();
│ │ │ +
1338 _M_fill_insert(begin() + __offset, __n, __x);
│ │ │ +
1339 return begin() + __offset;
│ │ │ +
1340 }
│ │ │ +
│ │ │ +
1341#else
│ │ │ +
1342 /**
│ │ │ +
1343 * @brief Inserts a number of copies of given data into the %vector.
│ │ │ +
1344 * @param __position An iterator into the %vector.
│ │ │ +
1345 * @param __n Number of elements to be inserted.
│ │ │ +
1346 * @param __x Data to be inserted.
│ │ │ +
1347 *
│ │ │ +
1348 * This function will insert a specified number of copies of
│ │ │ +
1349 * the given data before the location specified by @a position.
│ │ │ +
1350 *
│ │ │ +
1351 * Note that this kind of operation could be expensive for a
│ │ │ +
1352 * %vector and if it is frequently used the user should
│ │ │ +
1353 * consider using std::list.
│ │ │ +
1354 */
│ │ │ +
1355 void
│ │ │ +
1356 insert(iterator __position, size_type __n, const value_type& __x)
│ │ │ +
1357 { _M_fill_insert(__position, __n, __x); }
│ │ │ +
1358#endif
│ │ │ +
1359
│ │ │ +
1360#if __cplusplus >= 201103L
│ │ │ +
1361 /**
│ │ │ +
1362 * @brief Inserts a range into the %vector.
│ │ │ +
1363 * @param __position A const_iterator into the %vector.
│ │ │ +
1364 * @param __first An input iterator.
│ │ │ +
1365 * @param __last An input iterator.
│ │ │ +
1366 * @return An iterator that points to the inserted data.
│ │ │ +
1367 *
│ │ │ +
1368 * This function will insert copies of the data in the range
│ │ │ +
1369 * [__first,__last) into the %vector before the location specified
│ │ │ +
1370 * by @a pos.
│ │ │ +
1371 *
│ │ │ +
1372 * Note that this kind of operation could be expensive for a
│ │ │ +
1373 * %vector and if it is frequently used the user should
│ │ │ +
1374 * consider using std::list.
│ │ │ +
1375 */
│ │ │ +
1376 template<typename _InputIterator,
│ │ │ +
1377 typename = std::_RequireInputIter<_InputIterator>>
│ │ │ +
1378 iterator
│ │ │ +
│ │ │ +
1379 insert(const_iterator __position, _InputIterator __first,
│ │ │ +
1380 _InputIterator __last)
│ │ │ +
1381 {
│ │ │ +
1382 difference_type __offset = __position - cbegin();
│ │ │ +
1383 _M_insert_dispatch(begin() + __offset,
│ │ │ +
1384 __first, __last, __false_type());
│ │ │ +
1385 return begin() + __offset;
│ │ │ +
1386 }
│ │ │ +
│ │ │ +
1387#else
│ │ │ +
1388 /**
│ │ │ +
1389 * @brief Inserts a range into the %vector.
│ │ │ +
1390 * @param __position An iterator into the %vector.
│ │ │ +
1391 * @param __first An input iterator.
│ │ │ +
1392 * @param __last An input iterator.
│ │ │ +
1393 *
│ │ │ +
1394 * This function will insert copies of the data in the range
│ │ │ +
1395 * [__first,__last) into the %vector before the location specified
│ │ │ +
1396 * by @a pos.
│ │ │ +
1397 *
│ │ │ +
1398 * Note that this kind of operation could be expensive for a
│ │ │ +
1399 * %vector and if it is frequently used the user should
│ │ │ +
1400 * consider using std::list.
│ │ │ +
1401 */
│ │ │ +
1402 template<typename _InputIterator>
│ │ │ +
1403 void
│ │ │ +
1404 insert(iterator __position, _InputIterator __first,
│ │ │ +
1405 _InputIterator __last)
│ │ │ +
1406 {
│ │ │ +
1407 // Check whether it's an integral type. If so, it's not an iterator.
│ │ │ +
1408 typedef typename std::__is_integer<_InputIterator>::__type _Integral;
│ │ │ +
1409 _M_insert_dispatch(__position, __first, __last, _Integral());
│ │ │ +
1410 }
│ │ │ +
1411#endif
│ │ │ +
1412
│ │ │ +
1413 /**
│ │ │ +
1414 * @brief Remove element at given position.
│ │ │ +
1415 * @param __position Iterator pointing to element to be erased.
│ │ │ +
1416 * @return An iterator pointing to the next element (or end()).
│ │ │ +
1417 *
│ │ │ +
1418 * This function will erase the element at the given position and thus
│ │ │ +
1419 * shorten the %vector by one.
│ │ │ +
1420 *
│ │ │ +
1421 * Note This operation could be expensive and if it is
│ │ │ +
1422 * frequently used the user should consider using std::list.
│ │ │ +
1423 * The user is also cautioned that this function only erases
│ │ │ +
1424 * the element, and that if the element is itself a pointer,
│ │ │ +
1425 * the pointed-to memory is not touched in any way. Managing
│ │ │ +
1426 * the pointer is the user's responsibility.
│ │ │ +
1427 */
│ │ │ +
1428 iterator
│ │ │ +
1429#if __cplusplus >= 201103L
│ │ │ +
│ │ │ +
1430 erase(const_iterator __position)
│ │ │ +
1431 { return _M_erase(begin() + (__position - cbegin())); }
│ │ │ +
│ │ │ +
1432#else
│ │ │ +
1433 erase(iterator __position)
│ │ │ +
1434 { return _M_erase(__position); }
│ │ │ +
1435#endif
│ │ │ +
1436
│ │ │ +
1437 /**
│ │ │ +
1438 * @brief Remove a range of elements.
│ │ │ +
1439 * @param __first Iterator pointing to the first element to be erased.
│ │ │ +
1440 * @param __last Iterator pointing to one past the last element to be
│ │ │ +
1441 * erased.
│ │ │ +
1442 * @return An iterator pointing to the element pointed to by @a __last
│ │ │ +
1443 * prior to erasing (or end()).
│ │ │ +
1444 *
│ │ │ +
1445 * This function will erase the elements in the range
│ │ │ +
1446 * [__first,__last) and shorten the %vector accordingly.
│ │ │ +
1447 *
│ │ │ +
1448 * Note This operation could be expensive and if it is
│ │ │ +
1449 * frequently used the user should consider using std::list.
│ │ │ +
1450 * The user is also cautioned that this function only erases
│ │ │ +
1451 * the elements, and that if the elements themselves are
│ │ │ +
1452 * pointers, the pointed-to memory is not touched in any way.
│ │ │ +
1453 * Managing the pointer is the user's responsibility.
│ │ │ +
1454 */
│ │ │ +
1455 iterator
│ │ │ +
1456#if __cplusplus >= 201103L
│ │ │ +
│ │ │ +
1457 erase(const_iterator __first, const_iterator __last)
│ │ │ +
1458 {
│ │ │ +
1459 const auto __beg = begin();
│ │ │ +
1460 const auto __cbeg = cbegin();
│ │ │ +
1461 return _M_erase(__beg + (__first - __cbeg), __beg + (__last - __cbeg));
│ │ │ +
1462 }
│ │ │ +
│ │ │ +
1463#else
│ │ │ +
1464 erase(iterator __first, iterator __last)
│ │ │ +
1465 { return _M_erase(__first, __last); }
│ │ │ +
1466#endif
│ │ │ +
1467
│ │ │ +
1468 /**
│ │ │ +
1469 * @brief Swaps data with another %vector.
│ │ │ +
1470 * @param __x A %vector of the same element and allocator types.
│ │ │ +
1471 *
│ │ │ +
1472 * This exchanges the elements between two vectors in constant time.
│ │ │ +
1473 * (Three pointers, so it should be quite fast.)
│ │ │ +
1474 * Note that the global std::swap() function is specialized such that
│ │ │ +
1475 * std::swap(v1,v2) will feed to this function.
│ │ │ +
1476 *
│ │ │ +
1477 * Whether the allocators are swapped depends on the allocator traits.
│ │ │ +
1478 */
│ │ │ +
1479 void
│ │ │ +
│ │ │ +
1480 swap(vector& __x) _GLIBCXX_NOEXCEPT
│ │ │ +
1481 {
│ │ │ +
1482#if __cplusplus >= 201103L
│ │ │ +
1483 __glibcxx_assert(_Alloc_traits::propagate_on_container_swap::value
│ │ │ +
1484 || _M_get_Tp_allocator() == __x._M_get_Tp_allocator());
│ │ │ +
1485#endif
│ │ │ +
1486 this->_M_impl._M_swap_data(__x._M_impl);
│ │ │ +
1487 _Alloc_traits::_S_on_swap(_M_get_Tp_allocator(),
│ │ │ +
1488 __x._M_get_Tp_allocator());
│ │ │ +
1489 }
│ │ │ +
│ │ │ +
1490
│ │ │ +
1491 /**
│ │ │ +
1492 * Erases all the elements. Note that this function only erases the
│ │ │ +
1493 * elements, and that if the elements themselves are pointers, the
│ │ │ +
1494 * pointed-to memory is not touched in any way. Managing the pointer is
│ │ │ +
1495 * the user's responsibility.
│ │ │ +
1496 */
│ │ │ +
1497 void
│ │ │ +
│ │ │ +
1498 clear() _GLIBCXX_NOEXCEPT
│ │ │ +
1499 { _M_erase_at_end(this->_M_impl._M_start); }
│ │ │ +
│ │ │ +
1500
│ │ │ +
1501 protected:
│ │ │ +
1502 /**
│ │ │ +
1503 * Memory expansion handler. Uses the member allocation function to
│ │ │ +
1504 * obtain @a n bytes of memory, and then copies [first,last) into it.
│ │ │ +
1505 */
│ │ │ +
1506 template<typename _ForwardIterator>
│ │ │ +
1507 pointer
│ │ │ +
│ │ │ + │ │ │ +
1509 _ForwardIterator __first, _ForwardIterator __last)
│ │ │ +
1510 {
│ │ │ +
1511 pointer __result = this->_M_allocate(__n);
│ │ │ +
1512 __try
│ │ │ +
1513 {
│ │ │ +
1514 std::__uninitialized_copy_a(__first, __last, __result,
│ │ │ +
1515 _M_get_Tp_allocator());
│ │ │ +
1516 return __result;
│ │ │ +
1517 }
│ │ │ +
1518 __catch(...)
│ │ │ +
1519 {
│ │ │ +
1520 _M_deallocate(__result, __n);
│ │ │ +
1521 __throw_exception_again;
│ │ │ +
1522 }
│ │ │ +
1523 }
│ │ │ +
│ │ │ +
1524
│ │ │ +
1525
│ │ │ +
1526 // Internal constructor functions follow.
│ │ │ +
1527
│ │ │ +
1528 // Called by the range constructor to implement [23.1.1]/9
│ │ │ +
1529
│ │ │ +
1530#if __cplusplus < 201103L
│ │ │ +
1531 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ +
1532 // 438. Ambiguity in the "do the right thing" clause
│ │ │ +
1533 template<typename _Integer>
│ │ │ +
1534 void
│ │ │ +
1535 _M_initialize_dispatch(_Integer __n, _Integer __value, __true_type)
│ │ │ +
1536 {
│ │ │ +
1537 this->_M_impl._M_start = _M_allocate(_S_check_init_len(
│ │ │ +
1538 static_cast<size_type>(__n), _M_get_Tp_allocator()));
│ │ │ +
1539 this->_M_impl._M_end_of_storage =
│ │ │ +
1540 this->_M_impl._M_start + static_cast<size_type>(__n);
│ │ │ +
1541 _M_fill_initialize(static_cast<size_type>(__n), __value);
│ │ │ +
1542 }
│ │ │ +
1543
│ │ │ +
1544 // Called by the range constructor to implement [23.1.1]/9
│ │ │ +
1545 template<typename _InputIterator>
│ │ │ +
1546 void
│ │ │ +
1547 _M_initialize_dispatch(_InputIterator __first, _InputIterator __last,
│ │ │ +
1548 __false_type)
│ │ │ +
1549 {
│ │ │ +
1550 _M_range_initialize(__first, __last,
│ │ │ +
1551 std::__iterator_category(__first));
│ │ │ +
1552 }
│ │ │ +
1553#endif
│ │ │ +
1554
│ │ │ +
1555 // Called by the second initialize_dispatch above
│ │ │ +
1556 template<typename _InputIterator>
│ │ │ +
1557 void
│ │ │ +
1558 _M_range_initialize(_InputIterator __first, _InputIterator __last,
│ │ │ +
1559 std::input_iterator_tag)
│ │ │ +
1560 {
│ │ │ +
1561 __try {
│ │ │ +
1562 for (; __first != __last; ++__first)
│ │ │ +
1563#if __cplusplus >= 201103L
│ │ │ +
1564 emplace_back(*__first);
│ │ │ +
1565#else
│ │ │ +
1566 push_back(*__first);
│ │ │ +
1567#endif
│ │ │ +
1568 } __catch(...) {
│ │ │ +
1569 clear();
│ │ │ +
1570 __throw_exception_again;
│ │ │ +
1571 }
│ │ │ +
1572 }
│ │ │ +
1573
│ │ │ +
1574 // Called by the second initialize_dispatch above
│ │ │ +
1575 template<typename _ForwardIterator>
│ │ │ +
1576 void
│ │ │ +
1577 _M_range_initialize(_ForwardIterator __first, _ForwardIterator __last,
│ │ │ +
1578 std::forward_iterator_tag)
│ │ │ +
1579 {
│ │ │ +
1580 const size_type __n = std::distance(__first, __last);
│ │ │ +
1581 this->_M_impl._M_start
│ │ │ +
1582 = this->_M_allocate(_S_check_init_len(__n, _M_get_Tp_allocator()));
│ │ │ +
1583 this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n;
│ │ │ +
1584 this->_M_impl._M_finish =
│ │ │ +
1585 std::__uninitialized_copy_a(__first, __last,
│ │ │ +
1586 this->_M_impl._M_start,
│ │ │ +
1587 _M_get_Tp_allocator());
│ │ │ +
1588 }
│ │ │ +
1589
│ │ │ +
1590 // Called by the first initialize_dispatch above and by the
│ │ │ +
1591 // vector(n,value,a) constructor.
│ │ │ +
1592 void
│ │ │ +
1593 _M_fill_initialize(size_type __n, const value_type& __value)
│ │ │ +
1594 {
│ │ │ +
1595 this->_M_impl._M_finish =
│ │ │ +
1596 std::__uninitialized_fill_n_a(this->_M_impl._M_start, __n, __value,
│ │ │ +
1597 _M_get_Tp_allocator());
│ │ │ +
1598 }
│ │ │ +
1599
│ │ │ +
1600#if __cplusplus >= 201103L
│ │ │ +
1601 // Called by the vector(n) constructor.
│ │ │ +
1602 void
│ │ │ +
1603 _M_default_initialize(size_type __n)
│ │ │ +
1604 {
│ │ │ +
1605 this->_M_impl._M_finish =
│ │ │ +
1606 std::__uninitialized_default_n_a(this->_M_impl._M_start, __n,
│ │ │ +
1607 _M_get_Tp_allocator());
│ │ │ +
1608 }
│ │ │ +
1609#endif
│ │ │ +
1610
│ │ │ +
1611 // Internal assign functions follow. The *_aux functions do the actual
│ │ │ +
1612 // assignment work for the range versions.
│ │ │ +
1613
│ │ │ +
1614 // Called by the range assign to implement [23.1.1]/9
│ │ │ +
1615
│ │ │ +
1616 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ +
1617 // 438. Ambiguity in the "do the right thing" clause
│ │ │ +
1618 template<typename _Integer>
│ │ │ +
1619 void
│ │ │ +
1620 _M_assign_dispatch(_Integer __n, _Integer __val, __true_type)
│ │ │ +
1621 { _M_fill_assign(__n, __val); }
│ │ │ +
1622
│ │ │ +
1623 // Called by the range assign to implement [23.1.1]/9
│ │ │ +
1624 template<typename _InputIterator>
│ │ │ +
1625 void
│ │ │ +
1626 _M_assign_dispatch(_InputIterator __first, _InputIterator __last,
│ │ │ +
1627 __false_type)
│ │ │ +
1628 { _M_assign_aux(__first, __last, std::__iterator_category(__first)); }
│ │ │ +
1629
│ │ │ +
1630 // Called by the second assign_dispatch above
│ │ │ +
1631 template<typename _InputIterator>
│ │ │ +
1632 void
│ │ │ +
1633 _M_assign_aux(_InputIterator __first, _InputIterator __last,
│ │ │ +
1634 std::input_iterator_tag);
│ │ │ +
1635
│ │ │ +
1636 // Called by the second assign_dispatch above
│ │ │ +
1637 template<typename _ForwardIterator>
│ │ │ +
1638 void
│ │ │ +
1639 _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last,
│ │ │ +
1640 std::forward_iterator_tag);
│ │ │ +
1641
│ │ │ +
1642 // Called by assign(n,t), and the range assign when it turns out
│ │ │ +
1643 // to be the same thing.
│ │ │ +
1644 void
│ │ │ +
1645 _M_fill_assign(size_type __n, const value_type& __val);
│ │ │ +
1646
│ │ │ +
1647 // Internal insert functions follow.
│ │ │ +
1648
│ │ │ +
1649 // Called by the range insert to implement [23.1.1]/9
│ │ │ +
1650
│ │ │ +
1651 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ +
1652 // 438. Ambiguity in the "do the right thing" clause
│ │ │ +
1653 template<typename _Integer>
│ │ │ +
1654 void
│ │ │ +
1655 _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __val,
│ │ │ +
1656 __true_type)
│ │ │ +
1657 { _M_fill_insert(__pos, __n, __val); }
│ │ │ +
1658
│ │ │ +
1659 // Called by the range insert to implement [23.1.1]/9
│ │ │ +
1660 template<typename _InputIterator>
│ │ │ +
1661 void
│ │ │ +
1662 _M_insert_dispatch(iterator __pos, _InputIterator __first,
│ │ │ +
1663 _InputIterator __last, __false_type)
│ │ │ +
1664 {
│ │ │ +
1665 _M_range_insert(__pos, __first, __last,
│ │ │ +
1666 std::__iterator_category(__first));
│ │ │ +
1667 }
│ │ │ +
1668
│ │ │ +
1669 // Called by the second insert_dispatch above
│ │ │ +
1670 template<typename _InputIterator>
│ │ │ +
1671 void
│ │ │ +
1672 _M_range_insert(iterator __pos, _InputIterator __first,
│ │ │ +
1673 _InputIterator __last, std::input_iterator_tag);
│ │ │ +
1674
│ │ │ +
1675 // Called by the second insert_dispatch above
│ │ │ +
1676 template<typename _ForwardIterator>
│ │ │ +
1677 void
│ │ │ +
1678 _M_range_insert(iterator __pos, _ForwardIterator __first,
│ │ │ +
1679 _ForwardIterator __last, std::forward_iterator_tag);
│ │ │ +
1680
│ │ │ +
1681 // Called by insert(p,n,x), and the range insert when it turns out to be
│ │ │ +
1682 // the same thing.
│ │ │ +
1683 void
│ │ │ +
1684 _M_fill_insert(iterator __pos, size_type __n, const value_type& __x);
│ │ │ +
1685
│ │ │ +
1686#if __cplusplus >= 201103L
│ │ │ +
1687 // Called by resize(n).
│ │ │ +
1688 void
│ │ │ +
1689 _M_default_append(size_type __n);
│ │ │ +
1690
│ │ │ +
1691 bool
│ │ │ +
1692 _M_shrink_to_fit();
│ │ │ +
1693#endif
│ │ │ +
1694
│ │ │ +
1695#if __cplusplus < 201103L
│ │ │ +
1696 // Called by insert(p,x)
│ │ │ +
1697 void
│ │ │ +
1698 _M_insert_aux(iterator __position, const value_type& __x);
│ │ │ +
1699
│ │ │ +
1700 void
│ │ │ +
1701 _M_realloc_insert(iterator __position, const value_type& __x);
│ │ │ +
1702#else
│ │ │ +
1703 // A value_type object constructed with _Alloc_traits::construct()
│ │ │ +
1704 // and destroyed with _Alloc_traits::destroy().
│ │ │ +
1705 struct _Temporary_value
│ │ │ +
1706 {
│ │ │ +
1707 template<typename... _Args>
│ │ │ +
1708 explicit
│ │ │ +
1709 _Temporary_value(vector* __vec, _Args&&... __args) : _M_this(__vec)
│ │ │ +
1710 {
│ │ │ +
1711 _Alloc_traits::construct(_M_this->_M_impl, _M_ptr(),
│ │ │ +
1712 std::forward<_Args>(__args)...);
│ │ │ +
1713 }
│ │ │ +
1714
│ │ │ +
1715 ~_Temporary_value()
│ │ │ +
1716 { _Alloc_traits::destroy(_M_this->_M_impl, _M_ptr()); }
│ │ │ +
1717
│ │ │ +
1718 value_type&
│ │ │ +
1719 _M_val() { return *_M_ptr(); }
│ │ │ +
1720
│ │ │ +
1721 private:
│ │ │ +
1722 _Tp*
│ │ │ +
1723 _M_ptr() { return reinterpret_cast<_Tp*>(&__buf); }
│ │ │ +
1724
│ │ │ +
1725 vector* _M_this;
│ │ │ +
1726 typename aligned_storage<sizeof(_Tp), alignof(_Tp)>::type __buf;
│ │ │ +
1727 };
│ │ │ +
1728
│ │ │ +
1729 // Called by insert(p,x) and other functions when insertion needs to
│ │ │ +
1730 // reallocate or move existing elements. _Arg is either _Tp& or _Tp.
│ │ │ +
1731 template<typename _Arg>
│ │ │ +
1732 void
│ │ │ +
1733 _M_insert_aux(iterator __position, _Arg&& __arg);
│ │ │ +
1734
│ │ │ +
1735 template<typename... _Args>
│ │ │ +
1736 void
│ │ │ +
1737 _M_realloc_insert(iterator __position, _Args&&... __args);
│ │ │ +
1738
│ │ │ +
1739 // Either move-construct at the end, or forward to _M_insert_aux.
│ │ │ +
1740 iterator
│ │ │ +
1741 _M_insert_rval(const_iterator __position, value_type&& __v);
│ │ │ +
1742
│ │ │ +
1743 // Try to emplace at the end, otherwise forward to _M_insert_aux.
│ │ │ +
1744 template<typename... _Args>
│ │ │ +
1745 iterator
│ │ │ +
1746 _M_emplace_aux(const_iterator __position, _Args&&... __args);
│ │ │ +
1747
│ │ │ +
1748 // Emplacing an rvalue of the correct type can use _M_insert_rval.
│ │ │ +
1749 iterator
│ │ │ +
1750 _M_emplace_aux(const_iterator __position, value_type&& __v)
│ │ │ +
1751 { return _M_insert_rval(__position, std::move(__v)); }
│ │ │ +
1752#endif
│ │ │ +
1753
│ │ │ +
1754 // Called by _M_fill_insert, _M_insert_aux etc.
│ │ │ +
1755 size_type
│ │ │ +
1756 _M_check_len(size_type __n, const char* __s) const
│ │ │ +
1757 {
│ │ │ +
1758 if (max_size() - size() < __n)
│ │ │ +
1759 __throw_length_error(__N(__s));
│ │ │ +
1760
│ │ │ +
1761 const size_type __len = size() + (std::max)(size(), __n);
│ │ │ +
1762 return (__len < size() || __len > max_size()) ? max_size() : __len;
│ │ │ +
1763 }
│ │ │ +
1764
│ │ │ +
1765 // Called by constructors to check initial size.
│ │ │ +
1766 static size_type
│ │ │ +
1767 _S_check_init_len(size_type __n, const allocator_type& __a)
│ │ │ +
1768 {
│ │ │ +
1769 if (__n > _S_max_size(_Tp_alloc_type(__a)))
│ │ │ +
1770 __throw_length_error(
│ │ │ +
1771 __N("cannot create std::vector larger than max_size()"));
│ │ │ +
1772 return __n;
│ │ │ +
1773 }
│ │ │ +
1774
│ │ │ +
1775 static size_type
│ │ │ +
1776 _S_max_size(const _Tp_alloc_type& __a) _GLIBCXX_NOEXCEPT
│ │ │ +
1777 {
│ │ │ +
1778 // std::distance(begin(), end()) cannot be greater than PTRDIFF_MAX,
│ │ │ +
1779 // and realistically we can't store more than PTRDIFF_MAX/sizeof(T)
│ │ │ +
1780 // (even if std::allocator_traits::max_size says we can).
│ │ │ +
1781 const size_t __diffmax
│ │ │ +
1782 = __gnu_cxx::__numeric_traits<ptrdiff_t>::__max / sizeof(_Tp);
│ │ │ +
1783 const size_t __allocmax = _Alloc_traits::max_size(__a);
│ │ │ +
1784 return (std::min)(__diffmax, __allocmax);
│ │ │ +
1785 }
│ │ │ +
1786
│ │ │ +
1787 // Internal erase functions follow.
│ │ │ +
1788
│ │ │ +
1789 // Called by erase(q1,q2), clear(), resize(), _M_fill_assign,
│ │ │ +
1790 // _M_assign_aux.
│ │ │ +
1791 void
│ │ │ +
1792 _M_erase_at_end(pointer __pos) _GLIBCXX_NOEXCEPT
│ │ │ +
1793 {
│ │ │ +
1794 if (size_type __n = this->_M_impl._M_finish - __pos)
│ │ │ +
1795 {
│ │ │ +
1796 std::_Destroy(__pos, this->_M_impl._M_finish,
│ │ │ +
1797 _M_get_Tp_allocator());
│ │ │ +
1798 this->_M_impl._M_finish = __pos;
│ │ │ +
1799 _GLIBCXX_ASAN_ANNOTATE_SHRINK(__n);
│ │ │ +
1800 }
│ │ │ +
1801 }
│ │ │ +
1802
│ │ │ +
1803 iterator
│ │ │ +
1804 _M_erase(iterator __position);
│ │ │ +
1805
│ │ │ +
1806 iterator
│ │ │ +
1807 _M_erase(iterator __first, iterator __last);
│ │ │ +
1808
│ │ │ +
1809#if __cplusplus >= 201103L
│ │ │ +
1810 private:
│ │ │ +
1811 // Constant-time move assignment when source object's memory can be
│ │ │ +
1812 // moved, either because the source's allocator will move too
│ │ │ +
1813 // or because the allocators are equal.
│ │ │ +
1814 void
│ │ │ +
1815 _M_move_assign(vector&& __x, true_type) noexcept
│ │ │ +
1816 {
│ │ │ +
1817 vector __tmp(get_allocator());
│ │ │ +
1818 this->_M_impl._M_swap_data(__x._M_impl);
│ │ │ +
1819 __tmp._M_impl._M_swap_data(__x._M_impl);
│ │ │ +
1820 std::__alloc_on_move(_M_get_Tp_allocator(), __x._M_get_Tp_allocator());
│ │ │ +
1821 }
│ │ │ +
1822
│ │ │ +
1823 // Do move assignment when it might not be possible to move source
│ │ │ +
1824 // object's memory, resulting in a linear-time operation.
│ │ │ +
1825 void
│ │ │ +
1826 _M_move_assign(vector&& __x, false_type)
│ │ │ +
1827 {
│ │ │ +
1828 if (__x._M_get_Tp_allocator() == this->_M_get_Tp_allocator())
│ │ │ +
1829 _M_move_assign(std::move(__x), true_type());
│ │ │ +
1830 else
│ │ │ +
1831 {
│ │ │ +
1832 // The rvalue's allocator cannot be moved and is not equal,
│ │ │ +
1833 // so we need to individually move each element.
│ │ │ +
1834 this->_M_assign_aux(std::make_move_iterator(__x.begin()),
│ │ │ +
1835 std::make_move_iterator(__x.end()),
│ │ │ +
1836 std::random_access_iterator_tag());
│ │ │ +
1837 __x.clear();
│ │ │ +
1838 }
│ │ │ +
1839 }
│ │ │ +
1840#endif
│ │ │ +
1841
│ │ │ +
1842 template<typename _Up>
│ │ │ +
1843 _Up*
│ │ │ +
1844 _M_data_ptr(_Up* __ptr) const _GLIBCXX_NOEXCEPT
│ │ │ +
1845 { return __ptr; }
│ │ │ +
1846
│ │ │ +
1847#if __cplusplus >= 201103L
│ │ │ +
1848 template<typename _Ptr>
│ │ │ +
1849 typename std::pointer_traits<_Ptr>::element_type*
│ │ │ +
1850 _M_data_ptr(_Ptr __ptr) const
│ │ │ +
1851 { return empty() ? nullptr : std::__to_address(__ptr); }
│ │ │ +
1852#else
│ │ │ +
1853 template<typename _Up>
│ │ │ +
1854 _Up*
│ │ │ +
1855 _M_data_ptr(_Up* __ptr) _GLIBCXX_NOEXCEPT
│ │ │ +
1856 { return __ptr; }
│ │ │ +
1857
│ │ │ +
1858 template<typename _Ptr>
│ │ │ +
1859 value_type*
│ │ │ +
1860 _M_data_ptr(_Ptr __ptr)
│ │ │ +
1861 { return empty() ? (value_type*)0 : __ptr.operator->(); }
│ │ │ +
1862
│ │ │ +
1863 template<typename _Ptr>
│ │ │ +
1864 const value_type*
│ │ │ +
1865 _M_data_ptr(_Ptr __ptr) const
│ │ │ +
1866 { return empty() ? (const value_type*)0 : __ptr.operator->(); }
│ │ │ +
1867#endif
│ │ │ +
1868 };
│ │ │ +
│ │ │ +
1869
│ │ │ +
1870#if __cpp_deduction_guides >= 201606
│ │ │ +
1871 template<typename _InputIterator, typename _ValT
│ │ │ + │ │ │ +
1873 typename _Allocator = allocator<_ValT>,
│ │ │ +
1874 typename = _RequireInputIter<_InputIterator>,
│ │ │ +
1875 typename = _RequireAllocator<_Allocator>>
│ │ │ +
1876 vector(_InputIterator, _InputIterator, _Allocator = _Allocator())
│ │ │ + │ │ │ +
1878#endif
│ │ │ +
1879
│ │ │ +
1880 /**
│ │ │ +
1881 * @brief Vector equality comparison.
│ │ │ +
1882 * @param __x A %vector.
│ │ │ +
1883 * @param __y A %vector of the same type as @a __x.
│ │ │ +
1884 * @return True iff the size and elements of the vectors are equal.
│ │ │ +
1885 *
│ │ │ +
1886 * This is an equivalence relation. It is linear in the size of the
│ │ │ +
1887 * vectors. Vectors are considered equivalent if their sizes are equal,
│ │ │ +
1888 * and if corresponding elements compare equal.
│ │ │ +
1889 */
│ │ │ +
1890 template<typename _Tp, typename _Alloc>
│ │ │ +
1891 inline bool
│ │ │ +
│ │ │ +
1892 operator==(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y)
│ │ │ +
1893 { return (__x.size() == __y.size()
│ │ │ +
1894 && std::equal(__x.begin(), __x.end(), __y.begin())); }
│ │ │ +
│ │ │ +
1895
│ │ │ +
1896#if __cpp_lib_three_way_comparison
│ │ │ +
1897 /**
│ │ │ +
1898 * @brief Vector ordering relation.
│ │ │ +
1899 * @param __x A `vector`.
│ │ │ +
1900 * @param __y A `vector` of the same type as `__x`.
│ │ │ +
1901 * @return A value indicating whether `__x` is less than, equal to,
│ │ │ +
1902 * greater than, or incomparable with `__y`.
│ │ │ +
1903 *
│ │ │ +
1904 * See `std::lexicographical_compare_three_way()` for how the determination
│ │ │ +
1905 * is made. This operator is used to synthesize relational operators like
│ │ │ +
1906 * `<` and `>=` etc.
│ │ │ +
1907 */
│ │ │ +
1908 template<typename _Tp, typename _Alloc>
│ │ │ +
1909 inline __detail::__synth3way_t<_Tp>
│ │ │ +
1910 operator<=>(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y)
│ │ │ +
1911 {
│ │ │ +
1912 return std::lexicographical_compare_three_way(__x.begin(), __x.end(),
│ │ │ +
1913 __y.begin(), __y.end(),
│ │ │ +
1914 __detail::__synth3way);
│ │ │ +
1915 }
│ │ │ +
1916#else
│ │ │ +
1917 /**
│ │ │ +
1918 * @brief Vector ordering relation.
│ │ │ +
1919 * @param __x A %vector.
│ │ │ +
1920 * @param __y A %vector of the same type as @a __x.
│ │ │ +
1921 * @return True iff @a __x is lexicographically less than @a __y.
│ │ │ +
1922 *
│ │ │ +
1923 * This is a total ordering relation. It is linear in the size of the
│ │ │ +
1924 * vectors. The elements must be comparable with @c <.
│ │ │ +
1925 *
│ │ │ +
1926 * See std::lexicographical_compare() for how the determination is made.
│ │ │ +
1927 */
│ │ │ +
1928 template<typename _Tp, typename _Alloc>
│ │ │ +
│ │ │ +
1929 inline bool
│ │ │ +
1930 operator<(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y)
│ │ │ +
1931 { return std::lexicographical_compare(__x.begin(), __x.end(),
│ │ │ +
1932 __y.begin(), __y.end()); }
│ │ │ +
│ │ │ +
1933
│ │ │ +
1934 /// Based on operator==
│ │ │ +
1935 template<typename _Tp, typename _Alloc>
│ │ │ +
1936 inline bool
│ │ │ +
│ │ │ +
1937 operator!=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y)
│ │ │ +
1938 { return !(__x == __y); }
│ │ │ +
│ │ │ +
1939
│ │ │ +
1940 /// Based on operator<
│ │ │ +
1941 template<typename _Tp, typename _Alloc>
│ │ │ +
1942 inline bool
│ │ │ +
│ │ │ +
1943 operator>(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y)
│ │ │ +
1944 { return __y < __x; }
│ │ │ +
│ │ │ +
1945
│ │ │ +
1946 /// Based on operator<
│ │ │ +
1947 template<typename _Tp, typename _Alloc>
│ │ │ +
│ │ │ +
1948 inline bool
│ │ │ +
1949 operator<=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y)
│ │ │ +
1950 { return !(__y < __x); }
│ │ │ +
│ │ │ +
1951
│ │ │ +
1952 /// Based on operator<
│ │ │ +
1953 template<typename _Tp, typename _Alloc>
│ │ │ +
1954 inline bool
│ │ │ +
│ │ │ +
1955 operator>=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y)
│ │ │ +
1956 { return !(__x < __y); }
│ │ │ +
│ │ │ +
1957#endif // three-way comparison
│ │ │ +
1958
│ │ │ +
1959 /// See std::vector::swap().
│ │ │ +
1960 template<typename _Tp, typename _Alloc>
│ │ │ +
1961 inline void
│ │ │ +
│ │ │ + │ │ │ +
1963 _GLIBCXX_NOEXCEPT_IF(noexcept(__x.swap(__y)))
│ │ │ +
1964 { __x.swap(__y); }
│ │ │ +
│ │ │ +
1965
│ │ │ +
1966_GLIBCXX_END_NAMESPACE_CONTAINER
│ │ │ +
1967
│ │ │ +
1968#if __cplusplus >= 201703L
│ │ │ +
1969 namespace __detail::__variant
│ │ │ +
1970 {
│ │ │ +
1971 template<typename> struct _Never_valueless_alt; // see <variant>
│ │ │ +
1972
│ │ │ +
1973 // Provide the strong exception-safety guarantee when emplacing a
│ │ │ +
1974 // vector into a variant, but only if move assignment cannot throw.
│ │ │ +
1975 template<typename _Tp, typename _Alloc>
│ │ │ +
1976 struct _Never_valueless_alt<_GLIBCXX_STD_C::vector<_Tp, _Alloc>>
│ │ │ +
1977 : std::is_nothrow_move_assignable<_GLIBCXX_STD_C::vector<_Tp, _Alloc>>
│ │ │ +
1978 { };
│ │ │ +
1979 } // namespace __detail::__variant
│ │ │ +
1980#endif // C++17
│ │ │ +
1981
│ │ │ +
1982_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ +
1983} // namespace std
│ │ │ +
1984
│ │ │ +
1985#endif /* _STL_VECTOR_H */
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
integral_constant< bool, true > true_type
The type used as a compile-time boolean with true value.
Definition type_traits:83
│ │ │ +
integral_constant< bool, false > false_type
The type used as a compile-time boolean with false value.
Definition type_traits:86
│ │ │ +
auto declval() noexcept -> decltype(__declval< _Tp >(0))
Definition type_traits:2356
│ │ │ +
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:428
│ │ │ +
constexpr _Tp && forward(typename std::remove_reference< _Tp >::type &__t) noexcept
Forward an lvalue.
Definition move.h:77
│ │ │ +
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.
│ │ │ -
Template class basic_istream.
Definition istream:59
│ │ │ -
Template class basic_ostream.
Definition ostream:59
│ │ │ -
Basis for explicit traits specializations.
│ │ │ -
Common iterator class.
│ │ │ - │ │ │ -
Provides input iterator semantics for streams.
│ │ │ -
friend bool operator!=(const istream_iterator &__x, const istream_iterator &__y)
Return true if the iterators refer to different streams, or if one is at end-of-stream and the other ...
│ │ │ -
istream_iterator(istream_type &__s)
Construct start of input stream iterator.
│ │ │ -
constexpr istream_iterator()
Construct end of input stream iterator.
│ │ │ -
friend bool operator==(const istream_iterator &__x, const istream_iterator &__y)
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)
Construct from an ostream.
│ │ │ -
_Traits traits_type
Public typedef.
│ │ │ -
ostream_iterator(const ostream_iterator &__obj)
Copy constructor.
│ │ │ -
ostream_iterator & operator=(const _Tp &__value)
Writes value to underlying ostream using operator<<. If constructed with delimiter string,...
│ │ │ -
basic_ostream< _CharT, _Traits > ostream_type
Public typedef.
│ │ │ -
ostream_iterator(ostream_type &__s, const _CharT *__c)
│ │ │ +
constexpr iterator_traits< _InputIterator >::difference_type distance(_InputIterator __first, _InputIterator __last)
A generalization of pointer arithmetic.
│ │ │ +
void _Destroy(_ForwardIterator __first, _ForwardIterator __last, _Allocator &__alloc)
│ │ │ +
initializer_list
│ │ │ + │ │ │ +
is_nothrow_default_constructible
Definition type_traits:1033
│ │ │ +
is_nothrow_move_assignable
Definition type_traits:1184
│ │ │ + │ │ │ +
The standard allocator, as per C++03 [20.4.1].
Definition allocator.h:125
│ │ │ + │ │ │ + │ │ │ +
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:85
│ │ │ +
A standard container which offers fixed time access to individual elements in any order.
Definition stl_vector.h:390
│ │ │ +
vector(const vector &__x)
Vector copy constructor.
Definition stl_vector.h:553
│ │ │ +
vector(initializer_list< value_type > __l, const allocator_type &__a=allocator_type())
Builds a vector from an initializer list.
Definition stl_vector.h:625
│ │ │ +
void resize(size_type __new_size)
Resizes the vector to the specified number of elements.
Definition stl_vector.h:937
│ │ │ +
reference at(size_type __n)
Provides access to the data contained in the vector.
│ │ │ +
vector()=default
Creates a vector with no elements.
│ │ │ +
iterator insert(const_iterator __position, initializer_list< value_type > __l)
Inserts an initializer_list into the vector.
│ │ │ +
const_reference front() const noexcept
│ │ │ +
_Tp * data() noexcept
│ │ │ +
iterator erase(const_iterator __position)
Remove element at given position.
│ │ │ +
vector & operator=(initializer_list< value_type > __l)
Vector list assignment operator.
Definition stl_vector.h:730
│ │ │ +
reverse_iterator rbegin() noexcept
Definition stl_vector.h:847
│ │ │ +
pointer _M_allocate_and_copy(size_type __n, _ForwardIterator __first, _ForwardIterator __last)
│ │ │ +
bool empty() const noexcept
│ │ │ +
const_reverse_iterator crbegin() const noexcept
Definition stl_vector.h:902
│ │ │ +
iterator insert(const_iterator __position, _InputIterator __first, _InputIterator __last)
Inserts a range into the vector.
│ │ │ +
reference front() noexcept
│ │ │ +
iterator insert(const_iterator __position, size_type __n, const value_type &__x)
Inserts a number of copies of given data into the vector.
│ │ │ +
allocator_type get_allocator() const noexcept
Get a copy of the memory allocation object.
Definition stl_vector.h:284
│ │ │ +
void shrink_to_fit()
Definition stl_vector.h:989
│ │ │ +
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:522
│ │ │ +
reverse_iterator rend() noexcept
Definition stl_vector.h:865
│ │ │ +
void resize(size_type __new_size, const value_type &__x)
Resizes the vector to the specified number of elements.
Definition stl_vector.h:957
│ │ │ +
void clear() noexcept
│ │ │ +
vector(size_type __n, const allocator_type &__a=allocator_type())
Creates a vector with default constructed elements.
Definition stl_vector.h:510
│ │ │ +
void push_back(const value_type &__x)
Add data to the end of the vector.
│ │ │ +
~vector() noexcept
Definition stl_vector.h:678
│ │ │ +
const_reference operator[](size_type __n) const noexcept
Subscript access to the data contained in the vector.
│ │ │ +
size_type max_size() const noexcept
Definition stl_vector.h:923
│ │ │ +
const_reverse_iterator crend() const noexcept
Definition stl_vector.h:911
│ │ │ +
iterator insert(const_iterator __position, value_type &&__x)
Inserts given rvalue into vector before specified iterator.
│ │ │ +
void _M_range_check(size_type __n) const
Safety check used only from at().
│ │ │ +
void reserve(size_type __n)
Attempt to preallocate enough memory for specified number of elements.
Definition vector.tcc:67
│ │ │ +
vector(_InputIterator __first, _InputIterator __last, const allocator_type &__a=allocator_type())
Builds a vector from a range.
Definition stl_vector.h:653
│ │ │ +
const_iterator begin() const noexcept
Definition stl_vector.h:820
│ │ │ +
void assign(size_type __n, const value_type &__val)
Assigns a given value to a vector.
Definition stl_vector.h:749
│ │ │ +
void swap(vector &__x) noexcept
Swaps data with another vector.
│ │ │ +
void pop_back() noexcept
Removes last element.
│ │ │ +
vector & operator=(const vector &__x)
Vector assignment operator.
Definition vector.tcc:199
│ │ │ +
const_reverse_iterator rend() const noexcept
Definition stl_vector.h:874
│ │ │ +
const_iterator cbegin() const noexcept
Definition stl_vector.h:884
│ │ │ +
const_reference at(size_type __n) const
Provides access to the data contained in the vector.
│ │ │ +
const_iterator cend() const noexcept
Definition stl_vector.h:893
│ │ │ +
iterator erase(const_iterator __first, const_iterator __last)
Remove a range of elements.
│ │ │ +
vector(vector &&) noexcept=default
Vector move constructor.
│ │ │ +
vector(const allocator_type &__a) noexcept
Creates a vector with no elements.
Definition stl_vector.h:497
│ │ │ +
iterator emplace(const_iterator __position, _Args &&... __args)
Inserts an object in vector before specified iterator.
│ │ │ +
const_reverse_iterator rbegin() const noexcept
Definition stl_vector.h:856
│ │ │ +
iterator begin() noexcept
Definition stl_vector.h:811
│ │ │ +
vector & operator=(vector &&__x) noexcept(_Alloc_traits::_S_nothrow_move())
Vector move assignment operator.
Definition stl_vector.h:709
│ │ │ +
reference back() noexcept
│ │ │ +
void assign(_InputIterator __first, _InputIterator __last)
Assigns a range to a vector.
Definition stl_vector.h:768
│ │ │ +
void assign(initializer_list< value_type > __l)
Assigns an initializer list to a vector.
Definition stl_vector.h:794
│ │ │ +
iterator insert(const_iterator __position, const value_type &__x)
Inserts given value into vector before specified iterator.
Definition vector.tcc:132
│ │ │ +
const_reference back() const noexcept
│ │ │ +
const_iterator end() const noexcept
Definition stl_vector.h:838
│ │ │ +
iterator end() noexcept
Definition stl_vector.h:829
│ │ │ +
vector(vector &&__rv, const allocator_type &__m) noexcept(noexcept(vector(std::declval< vector && >(), std::declval< const allocator_type & >(), std::declval< typename _Alloc_traits::is_always_equal >())))
Move constructor with alternative allocator.
Definition stl_vector.h:607
│ │ │ + │ │ │ +
size_type capacity() const noexcept
Definition stl_vector.h:998
│ │ │ +
reference operator[](size_type __n) noexcept
Subscript access to the data contained in the vector.
│ │ │ +
Uniform interface to C++98 and C++11 allocators.
│ │ │ +
static constexpr size_type max_size(const _Tp_alloc_type &__a) noexcept
│ │ │
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,11 +1,11 @@ │ │ │ │ libstdc++ │ │ │ │ -stream_iterator.h │ │ │ │ +stl_vector.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 iterators │ │ │ │ +1// Vector implementation -*- C++ -*- │ │ │ │ 2 │ │ │ │ 3// Copyright (C) 2001-2021 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,324 +21,2284 @@ │ │ │ │ 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 │ │ │ │ -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 _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> │ │ │ │ -36 │ │ │ │ -37namespace _s_t_d _GLIBCXX_VISIBILITY(default) │ │ │ │ -38{ │ │ │ │ -39_GLIBCXX_BEGIN_NAMESPACE_VERSION │ │ │ │ -40 │ │ │ │ -41 /** │ │ │ │ -42 * @addtogroup iterators │ │ │ │ -43 * @{ │ │ │ │ -44 */ │ │ │ │ -45 │ │ │ │ -46 /// Provides input iterator semantics for streams. │ │ │ │ -47 template, typename _Dist = ptrdiff_t> │ │ │ │ -_4_9 class _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r │ │ │ │ -50 : public _i_t_e_r_a_t_o_r │ │ │ │ -51 { │ │ │ │ -52 public: │ │ │ │ -53 typedef _CharT char_type; │ │ │ │ -54 typedef _Traits traits_type; │ │ │ │ -55 typedef _b_a_s_i_c___i_s_t_r_e_a_m_<___C_h_a_r_T_,_ ___T_r_a_i_t_s_> istream_type; │ │ │ │ -56 │ │ │ │ -57 private: │ │ │ │ -58 istream_type* _M_stream; │ │ │ │ -59 _Tp _M_value; │ │ │ │ -60 // This bool becomes false at end-of-stream. It should be sufficient to │ │ │ │ -61 // check _M_stream != nullptr instead, but historically we did not set │ │ │ │ -62 // _M_stream to null when reaching the end, so we need to keep this flag. │ │ │ │ -63 bool _M_ok; │ │ │ │ -64 │ │ │ │ -65 public: │ │ │ │ -66 /// Construct end of input stream iterator. │ │ │ │ -_6_7 _GLIBCXX_CONSTEXPR _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r() │ │ │ │ -68 : _M_stream(0), _M_value(), _M_ok(false) {} │ │ │ │ -69 │ │ │ │ -70 /// Construct start of input stream iterator. │ │ │ │ -_7_1 _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r(istream_type& __s) │ │ │ │ -72 : _M_stream(_s_t_d::_____a_d_d_r_e_s_s_o_f(__s)), _M_ok(true) │ │ │ │ -73 { _M_read(); } │ │ │ │ -74 │ │ │ │ -75 _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& __obj) │ │ │ │ -76 : _M_stream(__obj._M_stream), _M_value(__obj._M_value), │ │ │ │ -77 _M_ok(__obj._M_ok) │ │ │ │ -78 { } │ │ │ │ -79 │ │ │ │ -80#if __cplusplus > 201703L && __cpp_lib_concepts │ │ │ │ -81 constexpr │ │ │ │ -82 _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r(default_sentinel_t) │ │ │ │ -83 noexcept(is_nothrow_default_constructible_v<_Tp>) │ │ │ │ -84 : _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r() { } │ │ │ │ -85#endif │ │ │ │ -86 │ │ │ │ -87#if __cplusplus >= 201103L │ │ │ │ -88 _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; │ │ │ │ -89 _~_i_s_t_r_e_a_m___i_t_e_r_a_t_o_r() = default; │ │ │ │ -90#endif │ │ │ │ -91 │ │ │ │ -92 const _Tp& │ │ │ │ -93 operator*() const │ │ │ │ -94 { │ │ │ │ -95 __glibcxx_requires_cond(_M_ok, │ │ │ │ -96 _M_message(__gnu_debug::__msg_deref_istream) │ │ │ │ -97 ._M_iterator(*this)); │ │ │ │ -98 return _M_value; │ │ │ │ -99 } │ │ │ │ +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/stl_vector.h │ │ │ │ +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 │ │ │ │ +59#include <_b_i_t_s_/_s_t_l___i_t_e_r_a_t_o_r___b_a_s_e___f_u_n_c_s_._h> │ │ │ │ +60#include <_b_i_t_s_/_f_u_n_c_t_e_x_c_e_p_t_._h> │ │ │ │ +61#include <_b_i_t_s_/_c_o_n_c_e_p_t___c_h_e_c_k_._h> │ │ │ │ +62#if __cplusplus >= 201103L │ │ │ │ +63#include <_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t> │ │ │ │ +64#endif │ │ │ │ +65#if __cplusplus > 201703L │ │ │ │ +66# include <_c_o_m_p_a_r_e> │ │ │ │ +67#endif │ │ │ │ +68 │ │ │ │ +69#include <_d_e_b_u_g_/_a_s_s_e_r_t_i_o_n_s_._h> │ │ │ │ +70 │ │ │ │ +71#if _GLIBCXX_SANITIZE_STD_ALLOCATOR && _GLIBCXX_SANITIZE_VECTOR │ │ │ │ +72extern "C" void │ │ │ │ +73__sanitizer_annotate_contiguous_container(const void*, const void*, │ │ │ │ +74 const void*, const void*); │ │ │ │ +75#endif │ │ │ │ +76 │ │ │ │ +77namespace _s_t_d _GLIBCXX_VISIBILITY(default) │ │ │ │ +78{ │ │ │ │ +79_GLIBCXX_BEGIN_NAMESPACE_VERSION │ │ │ │ +80_GLIBCXX_BEGIN_NAMESPACE_CONTAINER │ │ │ │ +81 │ │ │ │ +82 /// See bits/stl_deque.h's _Deque_base for an explanation. │ │ │ │ +83 template │ │ │ │ +_8_4 struct _Vector_base │ │ │ │ +85 { │ │ │ │ +86 typedef typename _____g_n_u___c_x_x_:_:_____a_l_l_o_c___t_r_a_i_t_s_<___A_l_l_o_c_>_:_:_t_e_m_p_l_a_t_e │ │ │ │ +87 rebind<_Tp>::other _Tp_alloc_type; │ │ │ │ +88 typedef typename __gnu_cxx::__alloc_traits<_Tp_alloc_type>::pointer │ │ │ │ +89 pointer; │ │ │ │ +90 │ │ │ │ +91 struct _Vector_impl_data │ │ │ │ +92 { │ │ │ │ +93 pointer _M_start; │ │ │ │ +94 pointer _M_finish; │ │ │ │ +95 pointer _M_end_of_storage; │ │ │ │ +96 │ │ │ │ +97 _Vector_impl_data() _GLIBCXX_NOEXCEPT │ │ │ │ +98 : _M_start(), _M_finish(), _M_end_of_storage() │ │ │ │ +99 { } │ │ │ │ 100 │ │ │ │ -101 const _Tp* │ │ │ │ -102 operator->() const { return _s_t_d_:_:_____a_d_d_r_e_s_s_o_f((operator*())); } │ │ │ │ -103 │ │ │ │ -104 _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r& │ │ │ │ -105 operator++() │ │ │ │ -106 { │ │ │ │ -107 __glibcxx_requires_cond(_M_ok, │ │ │ │ -108 _M_message(__gnu_debug::__msg_inc_istream) │ │ │ │ -109 ._M_iterator(*this)); │ │ │ │ -110 _M_read(); │ │ │ │ -111 return *this; │ │ │ │ -112 } │ │ │ │ -113 │ │ │ │ -114 _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r │ │ │ │ -115 operator++(int) │ │ │ │ -116 { │ │ │ │ -117 __glibcxx_requires_cond(_M_ok, │ │ │ │ -118 _M_message(__gnu_debug::__msg_inc_istream) │ │ │ │ -119 ._M_iterator(*this)); │ │ │ │ -120 _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r __tmp = *this; │ │ │ │ -121 _M_read(); │ │ │ │ -122 return __tmp; │ │ │ │ -123 } │ │ │ │ -124 │ │ │ │ -125 private: │ │ │ │ -126 bool │ │ │ │ -127 _M_equal(const _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r& __x) const │ │ │ │ -128 { │ │ │ │ -129 // Ideally this would just return _M_stream == __x._M_stream, │ │ │ │ -130 // but code compiled with old versions never sets _M_stream to null. │ │ │ │ -131 return (_M_ok == __x._M_ok) && (!_M_ok || _M_stream == __x._M_stream); │ │ │ │ -132 } │ │ │ │ -133 │ │ │ │ -134 void │ │ │ │ -135 _M_read() │ │ │ │ -136 { │ │ │ │ -137 if (_M_stream && !(*_M_stream >> _M_value)) │ │ │ │ -138 { │ │ │ │ -139 _M_stream = 0; │ │ │ │ -140 _M_ok = false; │ │ │ │ -141 } │ │ │ │ -142 } │ │ │ │ -143 │ │ │ │ -144 /// Return true if the iterators refer to the same stream, │ │ │ │ -145 /// or are both at end-of-stream. │ │ │ │ -146 friend bool │ │ │ │ -_1_4_7 _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) │ │ │ │ -148 { return __x._M_equal(__y); } │ │ │ │ -149 │ │ │ │ -150 /// Return true if the iterators refer to different streams, │ │ │ │ -151 /// or if one is at end-of-stream and the other is not. │ │ │ │ -152 friend bool │ │ │ │ -_1_5_3 _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) │ │ │ │ -154 { return !__x._M_equal(__y); } │ │ │ │ +101#if __cplusplus >= 201103L │ │ │ │ +102 _Vector_impl_data(_Vector_impl_data&& __x) noexcept │ │ │ │ +103 : _M_start(__x._M_start), _M_finish(__x._M_finish), │ │ │ │ +104 _M_end_of_storage(__x._M_end_of_storage) │ │ │ │ +105 { __x._M_start = __x._M_finish = __x._M_end_of_storage = pointer(); } │ │ │ │ +106#endif │ │ │ │ +107 │ │ │ │ +108 void │ │ │ │ +109 _M_copy_data(_Vector_impl_data const& __x) _GLIBCXX_NOEXCEPT │ │ │ │ +110 { │ │ │ │ +111 _M_start = __x._M_start; │ │ │ │ +112 _M_finish = __x._M_finish; │ │ │ │ +113 _M_end_of_storage = __x._M_end_of_storage; │ │ │ │ +114 } │ │ │ │ +115 │ │ │ │ +116 void │ │ │ │ +117 _M_swap_data(_Vector_impl_data& __x) _GLIBCXX_NOEXCEPT │ │ │ │ +118 { │ │ │ │ +119 // Do not use std::swap(_M_start, __x._M_start), etc as it loses │ │ │ │ +120 // information used by TBAA. │ │ │ │ +121 _Vector_impl_data __tmp; │ │ │ │ +122 __tmp._M_copy_data(*this); │ │ │ │ +123 _M_copy_data(__x); │ │ │ │ +124 __x._M_copy_data(__tmp); │ │ │ │ +125 } │ │ │ │ +126 }; │ │ │ │ +127 │ │ │ │ +128 struct _Vector_impl │ │ │ │ +129 : public _Tp_alloc_type, public _Vector_impl_data │ │ │ │ +130 { │ │ │ │ +131 _Vector_impl() _GLIBCXX_NOEXCEPT_IF( │ │ │ │ +132 _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_<___T_p___a_l_l_o_c___t_y_p_e_>_:_:_v_a_l_u_e) │ │ │ │ +133 : _Tp_alloc_type() │ │ │ │ +134 { } │ │ │ │ +135 │ │ │ │ +136 _Vector_impl(_Tp_alloc_type const& __a) _GLIBCXX_NOEXCEPT │ │ │ │ +137 : _Tp_alloc_type(__a) │ │ │ │ +138 { } │ │ │ │ +139 │ │ │ │ +140#if __cplusplus >= 201103L │ │ │ │ +141 // Not defaulted, to enforce noexcept(true) even when │ │ │ │ +142 // !is_nothrow_move_constructible<_Tp_alloc_type>. │ │ │ │ +143 _Vector_impl(_Vector_impl&& __x) noexcept │ │ │ │ +144 : _Tp_alloc_type(_s_t_d_:_:_m_o_v_e(__x)), _Vector_impl_data(_s_t_d_:_:_m_o_v_e(__x)) │ │ │ │ +145 { } │ │ │ │ +146 │ │ │ │ +147 _Vector_impl(_Tp_alloc_type&& __a) noexcept │ │ │ │ +148 : _Tp_alloc_type(_s_t_d_:_:_m_o_v_e(__a)) │ │ │ │ +149 { } │ │ │ │ +150 │ │ │ │ +151 _Vector_impl(_Tp_alloc_type&& __a, _Vector_impl&& __rv) noexcept │ │ │ │ +152 : _Tp_alloc_type(_s_t_d_:_:_m_o_v_e(__a)), _Vector_impl_data(_s_t_d_:_:_m_o_v_e(__rv)) │ │ │ │ +153 { } │ │ │ │ +154#endif │ │ │ │ 155 │ │ │ │ -156#if __cplusplus > 201703L && __cpp_lib_concepts │ │ │ │ -157 friend bool │ │ │ │ -158 _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) │ │ │ │ -159 { return !__i._M_stream; } │ │ │ │ -160#endif │ │ │ │ -161 }; │ │ │ │ +156#if _GLIBCXX_SANITIZE_STD_ALLOCATOR && _GLIBCXX_SANITIZE_VECTOR │ │ │ │ +157 template │ │ │ │ +158 struct _Asan │ │ │ │ +159 { │ │ │ │ +160 typedef typename _____g_n_u___c_x_x_:_:_____a_l_l_o_c___t_r_a_i_t_s_<___T_p___a_l_l_o_c___t_y_p_e_> │ │ │ │ +161 _:_:_s_i_z_e___t_y_p_e _s_i_z_e___t_y_p_e; │ │ │ │ 162 │ │ │ │ -163 /** │ │ │ │ -164 * @brief Provides output iterator semantics for streams. │ │ │ │ -165 * │ │ │ │ -166 * This class provides an iterator to write to an ostream. The type Tp is │ │ │ │ -167 * the only type written by this iterator and there must be an │ │ │ │ -168 * operator<<(Tp) defined. │ │ │ │ -169 * │ │ │ │ -170 * @tparam _Tp The type to write to the ostream. │ │ │ │ -171 * @tparam _CharT The ostream char_type. │ │ │ │ -172 * @tparam _Traits The ostream char_traits. │ │ │ │ -173 */ │ │ │ │ -174 template > │ │ │ │ -_1_7_6 class _o_s_t_r_e_a_m___i_t_e_r_a_t_o_r │ │ │ │ -177 : public _i_t_e_r_a_t_o_r │ │ │ │ +163 static void _S_shrink(_Vector_impl&, _s_i_z_e___t_y_p_e) { } │ │ │ │ +164 static void _S_on_dealloc(_Vector_impl&) { } │ │ │ │ +165 │ │ │ │ +166 typedef _Vector_impl& _Reinit; │ │ │ │ +167 │ │ │ │ +168 struct _Grow │ │ │ │ +169 { │ │ │ │ +170 _Grow(_Vector_impl&, _s_i_z_e___t_y_p_e) { } │ │ │ │ +171 void _M_grew(_s_i_z_e___t_y_p_e) { } │ │ │ │ +172 }; │ │ │ │ +173 }; │ │ │ │ +174 │ │ │ │ +175 // Enable ASan annotations for memory obtained from std::allocator. │ │ │ │ +176 template │ │ │ │ +177 struct _Asan<_a_l_l_o_c_a_t_o_r<_Up> > │ │ │ │ 178 { │ │ │ │ -179 public: │ │ │ │ -180 ///@{ │ │ │ │ -181 /// Public typedef │ │ │ │ -182#if __cplusplus > 201703L │ │ │ │ -183 using _d_i_f_f_e_r_e_n_c_e___t_y_p_e = ptrdiff_t; │ │ │ │ -184#endif │ │ │ │ -_1_8_5 typedef _CharT _c_h_a_r___t_y_p_e; │ │ │ │ -_1_8_6 typedef _Traits _t_r_a_i_t_s___t_y_p_e; │ │ │ │ -_1_8_7 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; │ │ │ │ -188 ///@} │ │ │ │ -189 │ │ │ │ -190 private: │ │ │ │ -191 _o_s_t_r_e_a_m___t_y_p_e* _M_stream; │ │ │ │ -192 const _CharT* _M_string; │ │ │ │ -193 │ │ │ │ -194 public: │ │ │ │ -195#if __cplusplus > 201703L │ │ │ │ -196 constexpr _o_s_t_r_e_a_m___i_t_e_r_a_t_o_r() noexcept │ │ │ │ -197 : _M_stream(nullptr), _M_string(nullptr) { } │ │ │ │ -198#endif │ │ │ │ -199 │ │ │ │ -200 /// Construct from an ostream. │ │ │ │ -_2_0_1 _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) │ │ │ │ -202 : _M_stream(_s_t_d::_____a_d_d_r_e_s_s_o_f(__s)), _M_string(0) {} │ │ │ │ -203 │ │ │ │ -204 /** │ │ │ │ -205 * Construct from an ostream. │ │ │ │ -206 * │ │ │ │ -207 * The delimiter string @a c is written to the stream after every Tp │ │ │ │ -208 * written to the stream. The delimiter is not copied, and thus must │ │ │ │ -209 * not be destroyed while this iterator is in use. │ │ │ │ -210 * │ │ │ │ -211 * @param __s Underlying ostream to write to. │ │ │ │ -212 * @param __c CharT delimiter string to insert. │ │ │ │ -213 */ │ │ │ │ -_2_1_4 _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) │ │ │ │ -215 : _M_stream(_s_t_d::_____a_d_d_r_e_s_s_o_f(__s)), _M_string(__c) { } │ │ │ │ -216 │ │ │ │ -217 /// Copy constructor. │ │ │ │ -_2_1_8 _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& __obj) │ │ │ │ -219 : _M_stream(__obj._M_stream), _M_string(__obj._M_string) { } │ │ │ │ -220 │ │ │ │ -221#if __cplusplus >= 201103L │ │ │ │ -222 _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; │ │ │ │ -223#endif │ │ │ │ +179 typedef typename _____g_n_u___c_x_x_:_:_____a_l_l_o_c___t_r_a_i_t_s_<___T_p___a_l_l_o_c___t_y_p_e_> │ │ │ │ +180 _:_:_s_i_z_e___t_y_p_e _s_i_z_e___t_y_p_e; │ │ │ │ +181 │ │ │ │ +182 // Adjust ASan annotation for [_M_start, _M_end_of_storage) to │ │ │ │ +183 // mark end of valid region as __curr instead of __prev. │ │ │ │ +184 static void │ │ │ │ +185 _S_adjust(_Vector_impl& __impl, pointer __prev, pointer __curr) │ │ │ │ +186 { │ │ │ │ +187 __sanitizer_annotate_contiguous_container(__impl._M_start, │ │ │ │ +188 __impl._M_end_of_storage, __prev, __curr); │ │ │ │ +189 } │ │ │ │ +190 │ │ │ │ +191 static void │ │ │ │ +192 _S_grow(_Vector_impl& __impl, _s_i_z_e___t_y_p_e __n) │ │ │ │ +193 { _S_adjust(__impl, __impl._M_finish, __impl._M_finish + __n); } │ │ │ │ +194 │ │ │ │ +195 static void │ │ │ │ +196 _S_shrink(_Vector_impl& __impl, _s_i_z_e___t_y_p_e __n) │ │ │ │ +197 { _S_adjust(__impl, __impl._M_finish + __n, __impl._M_finish); } │ │ │ │ +198 │ │ │ │ +199 static void │ │ │ │ +200 _S_on_dealloc(_Vector_impl& __impl) │ │ │ │ +201 { │ │ │ │ +202 if (__impl._M_start) │ │ │ │ +203 _S_adjust(__impl, __impl._M_finish, __impl._M_end_of_storage); │ │ │ │ +204 } │ │ │ │ +205 │ │ │ │ +206 // Used on reallocation to tell ASan unused capacity is invalid. │ │ │ │ +207 struct _Reinit │ │ │ │ +208 { │ │ │ │ +209 explicit _Reinit(_Vector_impl& __impl) : _M_impl(__impl) │ │ │ │ +210 { │ │ │ │ +211 // Mark unused capacity as valid again before deallocating it. │ │ │ │ +212 _S_on_dealloc(_M_impl); │ │ │ │ +213 } │ │ │ │ +214 │ │ │ │ +215 ~_Reinit() │ │ │ │ +216 { │ │ │ │ +217 // Mark unused capacity as invalid after reallocation. │ │ │ │ +218 if (_M_impl._M_start) │ │ │ │ +219 _S_adjust(_M_impl, _M_impl._M_end_of_storage, │ │ │ │ +220 _M_impl._M_finish); │ │ │ │ +221 } │ │ │ │ +222 │ │ │ │ +223 _Vector_impl& _M_impl; │ │ │ │ 224 │ │ │ │ -225 /// Writes @a value to underlying ostream using operator<<. If │ │ │ │ -226 /// constructed with delimiter string, writes delimiter to ostream. │ │ │ │ -227 _o_s_t_r_e_a_m___i_t_e_r_a_t_o_r& │ │ │ │ -_2_2_8 _o_p_e_r_a_t_o_r_=(const _Tp& __value) │ │ │ │ -229 { │ │ │ │ -230 __glibcxx_requires_cond(_M_stream != 0, │ │ │ │ -231 _M_message(__gnu_debug::__msg_output_ostream) │ │ │ │ -232 ._M_iterator(*this)); │ │ │ │ -233 *_M_stream << __value; │ │ │ │ -234 if (_M_string) │ │ │ │ -235 *_M_stream << _M_string; │ │ │ │ -236 return *this; │ │ │ │ -237 } │ │ │ │ -238 │ │ │ │ -239 _o_s_t_r_e_a_m___i_t_e_r_a_t_o_r& │ │ │ │ -240 _o_p_e_r_a_t_o_r_*() │ │ │ │ -241 { return *this; } │ │ │ │ -242 │ │ │ │ -243 _o_s_t_r_e_a_m___i_t_e_r_a_t_o_r& │ │ │ │ -244 operator++() │ │ │ │ -245 { return *this; } │ │ │ │ -246 │ │ │ │ -247 _o_s_t_r_e_a_m___i_t_e_r_a_t_o_r& │ │ │ │ -248 operator++(int) │ │ │ │ -249 { return *this; } │ │ │ │ +225#if __cplusplus >= 201103L │ │ │ │ +226 _Reinit(const _Reinit&) = delete; │ │ │ │ +227 _Reinit& operator=(const _Reinit&) = delete; │ │ │ │ +228#endif │ │ │ │ +229 }; │ │ │ │ +230 │ │ │ │ +231 // Tell ASan when unused capacity is initialized to be valid. │ │ │ │ +232 struct _Grow │ │ │ │ +233 { │ │ │ │ +234 _Grow(_Vector_impl& __impl, _s_i_z_e___t_y_p_e __n) │ │ │ │ +235 : _M_impl(__impl), _M_n(__n) │ │ │ │ +236 { _S_grow(_M_impl, __n); } │ │ │ │ +237 │ │ │ │ +238 ~_Grow() { if (_M_n) _S_shrink(_M_impl, _M_n); } │ │ │ │ +239 │ │ │ │ +240 void _M_grew(_s_i_z_e___t_y_p_e __n) { _M_n -= __n; } │ │ │ │ +241 │ │ │ │ +242#if __cplusplus >= 201103L │ │ │ │ +243 _Grow(const _Grow&) = delete; │ │ │ │ +244 _Grow& operator=(const _Grow&) = delete; │ │ │ │ +245#endif │ │ │ │ +246 private: │ │ │ │ +247 _Vector_impl& _M_impl; │ │ │ │ +248 _s_i_z_e___t_y_p_e _M_n; │ │ │ │ +249 }; │ │ │ │ 250 }; │ │ │ │ 251 │ │ │ │ -252 /// @} group iterators │ │ │ │ -253 │ │ │ │ -254_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ -255} // namespace │ │ │ │ -256 │ │ │ │ -257#endif │ │ │ │ -_d_e_b_u_g_._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_:_:_____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 │ │ │ │ +252#define _GLIBCXX_ASAN_ANNOTATE_REINIT \ │ │ │ │ +253 typename _Base::_Vector_impl::template _Asan<>::_Reinit const \ │ │ │ │ +254 __attribute__((__unused__)) __reinit_guard(this->_M_impl) │ │ │ │ +255#define _GLIBCXX_ASAN_ANNOTATE_GROW(n) \ │ │ │ │ +256 typename _Base::_Vector_impl::template _Asan<>::_Grow \ │ │ │ │ +257 __attribute__((__unused__)) __grow_guard(this->_M_impl, (n)) │ │ │ │ +258#define _GLIBCXX_ASAN_ANNOTATE_GREW(n) __grow_guard._M_grew(n) │ │ │ │ +259#define _GLIBCXX_ASAN_ANNOTATE_SHRINK(n) \ │ │ │ │ +260 _Base::_Vector_impl::template _Asan<>::_S_shrink(this->_M_impl, n) │ │ │ │ +261#define _GLIBCXX_ASAN_ANNOTATE_BEFORE_DEALLOC \ │ │ │ │ +262 _Base::_Vector_impl::template _Asan<>::_S_on_dealloc(this->_M_impl) │ │ │ │ +263#else // ! (_GLIBCXX_SANITIZE_STD_ALLOCATOR && _GLIBCXX_SANITIZE_VECTOR) │ │ │ │ +264#define _GLIBCXX_ASAN_ANNOTATE_REINIT │ │ │ │ +265#define _GLIBCXX_ASAN_ANNOTATE_GROW(n) │ │ │ │ +266#define _GLIBCXX_ASAN_ANNOTATE_GREW(n) │ │ │ │ +267#define _GLIBCXX_ASAN_ANNOTATE_SHRINK(n) │ │ │ │ +268#define _GLIBCXX_ASAN_ANNOTATE_BEFORE_DEALLOC │ │ │ │ +269#endif // _GLIBCXX_SANITIZE_STD_ALLOCATOR && _GLIBCXX_SANITIZE_VECTOR │ │ │ │ +270 }; │ │ │ │ +271 │ │ │ │ +272 public: │ │ │ │ +273 typedef _Alloc allocator_type; │ │ │ │ +274 │ │ │ │ +275 _Tp_alloc_type& │ │ │ │ +276 _M_get_Tp_allocator() _GLIBCXX_NOEXCEPT │ │ │ │ +277 { return this->_M_impl; } │ │ │ │ +278 │ │ │ │ +279 const _Tp_alloc_type& │ │ │ │ +280 _M_get_Tp_allocator() const _GLIBCXX_NOEXCEPT │ │ │ │ +281 { return this->_M_impl; } │ │ │ │ +282 │ │ │ │ +283 allocator_type │ │ │ │ +_2_8_4 _g_e_t___a_l_l_o_c_a_t_o_r() const _GLIBCXX_NOEXCEPT │ │ │ │ +285 { return allocator_type(_M_get_Tp_allocator()); } │ │ │ │ +286 │ │ │ │ +287#if __cplusplus >= 201103L │ │ │ │ +288 ___V_e_c_t_o_r___b_a_s_e() = default; │ │ │ │ +289#else │ │ │ │ +290 ___V_e_c_t_o_r___b_a_s_e() { } │ │ │ │ +291#endif │ │ │ │ +292 │ │ │ │ +293 _Vector_base(const allocator_type& __a) _GLIBCXX_NOEXCEPT │ │ │ │ +294 : _M_impl(__a) { } │ │ │ │ +295 │ │ │ │ +296 // Kept for ABI compatibility. │ │ │ │ +297#if !_GLIBCXX_INLINE_VERSION │ │ │ │ +298 _Vector_base(size_t __n) │ │ │ │ +299 : _M_impl() │ │ │ │ +300 { _M_create_storage(__n); } │ │ │ │ +301#endif │ │ │ │ +302 │ │ │ │ +303 _Vector_base(size_t __n, const allocator_type& __a) │ │ │ │ +304 : _M_impl(__a) │ │ │ │ +305 { _M_create_storage(__n); } │ │ │ │ +306 │ │ │ │ +307#if __cplusplus >= 201103L │ │ │ │ +308 _Vector_base(_Vector_base&&) = default; │ │ │ │ +309 │ │ │ │ +310 // Kept for ABI compatibility. │ │ │ │ +311# if !_GLIBCXX_INLINE_VERSION │ │ │ │ +312 _Vector_base(_Tp_alloc_type&& __a) noexcept │ │ │ │ +313 : _M_impl(_s_t_d_:_:_m_o_v_e(__a)) { } │ │ │ │ +314 │ │ │ │ +315 _Vector_base(_Vector_base&& __x, const allocator_type& __a) │ │ │ │ +316 : _M_impl(__a) │ │ │ │ +317 { │ │ │ │ +318 if (__x.get_allocator() == __a) │ │ │ │ +319 this->_M_impl._M_swap_data(__x._M_impl); │ │ │ │ +320 else │ │ │ │ +321 { │ │ │ │ +322 size_t __n = __x._M_impl._M_finish - __x._M_impl._M_start; │ │ │ │ +323 _M_create_storage(__n); │ │ │ │ +324 } │ │ │ │ +325 } │ │ │ │ +326# endif │ │ │ │ +327 │ │ │ │ +328 _Vector_base(const allocator_type& __a, _Vector_base&& __x) │ │ │ │ +329 : _M_impl(_Tp_alloc_type(__a), std::_m_o_v_e(__x._M_impl)) │ │ │ │ +330 { } │ │ │ │ +331#endif │ │ │ │ +332 │ │ │ │ +333 ~_Vector_base() _GLIBCXX_NOEXCEPT │ │ │ │ +334 { │ │ │ │ +335 _M_deallocate(_M_impl._M_start, │ │ │ │ +336 _M_impl._M_end_of_storage - _M_impl._M_start); │ │ │ │ +337 } │ │ │ │ +338 │ │ │ │ +339 public: │ │ │ │ +340 _Vector_impl _M_impl; │ │ │ │ +341 │ │ │ │ +342 pointer │ │ │ │ +343 _M_allocate(size_t __n) │ │ │ │ +344 { │ │ │ │ +345 typedef __gnu_cxx::__alloc_traits<_Tp_alloc_type> _Tr; │ │ │ │ +346 return __n != 0 ? _Tr::allocate(_M_impl, __n) : pointer(); │ │ │ │ +347 } │ │ │ │ +348 │ │ │ │ +349 void │ │ │ │ +350 _M_deallocate(pointer __p, size_t __n) │ │ │ │ +351 { │ │ │ │ +352 typedef __gnu_cxx::__alloc_traits<_Tp_alloc_type> _Tr; │ │ │ │ +353 if (__p) │ │ │ │ +354 _Tr::deallocate(_M_impl, __p, __n); │ │ │ │ +355 } │ │ │ │ +356 │ │ │ │ +357 protected: │ │ │ │ +358 void │ │ │ │ +359 _M_create_storage(size_t __n) │ │ │ │ +360 { │ │ │ │ +361 this->_M_impl._M_start = this->_M_allocate(__n); │ │ │ │ +362 this->_M_impl._M_finish = this->_M_impl._M_start; │ │ │ │ +363 this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n; │ │ │ │ +364 } │ │ │ │ +365 }; │ │ │ │ +366 │ │ │ │ +367 /** │ │ │ │ +368 * @brief A standard container which offers fixed time access to │ │ │ │ +369 * individual elements in any order. │ │ │ │ +370 * │ │ │ │ +371 * @ingroup sequences │ │ │ │ +372 * │ │ │ │ +373 * @tparam _Tp Type of element. │ │ │ │ +374 * @tparam _Alloc Allocator type, defaults to allocator<_Tp>. │ │ │ │ +375 * │ │ │ │ +376 * Meets the requirements of a container, a │ │ │ │ +377 * reversible container, and a │ │ │ │ +378 * sequence, including the │ │ │ │ +379 * optional sequence requirements with the │ │ │ │ +380 * %exception of @c push_front and @c pop_front. │ │ │ │ +381 * │ │ │ │ +382 * In some terminology a %vector can be described as a dynamic │ │ │ │ +383 * C-style array, it offers fast and efficient access to individual │ │ │ │ +384 * elements in any order and saves the user from worrying about │ │ │ │ +385 * memory and size allocation. Subscripting ( @c [] ) access is │ │ │ │ +386 * also provided as with C-style arrays. │ │ │ │ +387 */ │ │ │ │ +388 template > │ │ │ │ +_3_8_9 class _v_e_c_t_o_r : protected _Vector_base<_Tp, _Alloc> │ │ │ │ +390 { │ │ │ │ +391#ifdef _GLIBCXX_CONCEPT_CHECKS │ │ │ │ +392 // Concept requirements. │ │ │ │ +393 typedef typename _Alloc::value_type _Alloc_value_type; │ │ │ │ +394# if __cplusplus < 201103L │ │ │ │ +395 __glibcxx_class_requires(_Tp, _SGIAssignableConcept) │ │ │ │ +396# endif │ │ │ │ +397 __glibcxx_class_requires2(_Tp, _Alloc_value_type, _SameTypeConcept) │ │ │ │ +398#endif │ │ │ │ +399 │ │ │ │ +400#if __cplusplus >= 201103L │ │ │ │ +401 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, │ │ │ │ +402 "std::vector must have a non-const, non-volatile value_type"); │ │ │ │ +403# if __cplusplus > 201703L || defined __STRICT_ANSI__ │ │ │ │ +404 static_assert(is_same::value, │ │ │ │ +405 "std::vector must have the same value_type as its allocator"); │ │ │ │ +406# endif │ │ │ │ +407#endif │ │ │ │ +408 │ │ │ │ +409 typedef _Vector_base<_Tp, _Alloc> _Base; │ │ │ │ +410 typedef typename _Base::_Tp_alloc_type _Tp_alloc_type; │ │ │ │ +411 typedef _____g_n_u___c_x_x_:_:_____a_l_l_o_c___t_r_a_i_t_s_<___T_p___a_l_l_o_c___t_y_p_e_> _Alloc_traits; │ │ │ │ +412 │ │ │ │ +413 public: │ │ │ │ +414 typedef _Tp value_type; │ │ │ │ +415 typedef typename _Base::pointer pointer; │ │ │ │ +416 typedef typename _Alloc_traits::const_pointer const_pointer; │ │ │ │ +417 typedef typename _Alloc_traits::reference reference; │ │ │ │ +418 typedef typename _Alloc_traits::const_reference const_reference; │ │ │ │ +419 typedef __gnu_cxx::__normal_iterator iterator; │ │ │ │ +420 typedef __gnu_cxx::__normal_iterator │ │ │ │ +421 const_iterator; │ │ │ │ +422 typedef _s_t_d_:_:_r_e_v_e_r_s_e___i_t_e_r_a_t_o_r_<_c_o_n_s_t___i_t_e_r_a_t_o_r_> const_reverse_iterator; │ │ │ │ +423 typedef _s_t_d_:_:_r_e_v_e_r_s_e___i_t_e_r_a_t_o_r_<_i_t_e_r_a_t_o_r_> reverse_iterator; │ │ │ │ +424 typedef size_t size_type; │ │ │ │ +425 typedef ptrdiff_t difference_type; │ │ │ │ +426 typedef _Alloc allocator_type; │ │ │ │ +427 │ │ │ │ +428 private: │ │ │ │ +429#if __cplusplus >= 201103L │ │ │ │ +430 static constexpr bool │ │ │ │ +431 _S_nothrow_relocate(_t_r_u_e___t_y_p_e) │ │ │ │ +432 { │ │ │ │ +433 return noexcept(std::__relocate_a(_s_t_d_:_:_d_e_c_l_v_a_l_<_p_o_i_n_t_e_r_>(), │ │ │ │ +434 _s_t_d_:_:_d_e_c_l_v_a_l_<_p_o_i_n_t_e_r_>(), │ │ │ │ +435 _s_t_d_:_:_d_e_c_l_v_a_l_<_p_o_i_n_t_e_r_>(), │ │ │ │ +436 _s_t_d_:_:_d_e_c_l_v_a_l_<___T_p___a_l_l_o_c___t_y_p_e_&_>())); │ │ │ │ +437 } │ │ │ │ +438 │ │ │ │ +439 static constexpr bool │ │ │ │ +440 _S_nothrow_relocate(_f_a_l_s_e___t_y_p_e) │ │ │ │ +441 { return false; } │ │ │ │ +442 │ │ │ │ +443 static constexpr bool │ │ │ │ +444 _S_use_relocate() │ │ │ │ +445 { │ │ │ │ +446 // Instantiating std::__relocate_a might cause an error outside the │ │ │ │ +447 // immediate context (in __relocate_object_a's noexcept-specifier), │ │ │ │ +448 // so only do it if we know the type can be move-inserted into *this. │ │ │ │ +449 return _S_nothrow_relocate(__is_move_insertable<_Tp_alloc_type>{}); │ │ │ │ +450 } │ │ │ │ +451 │ │ │ │ +452 static pointer │ │ │ │ +453 _S_do_relocate(pointer __first, pointer __last, pointer __result, │ │ │ │ +454 _Tp_alloc_type& __alloc, _t_r_u_e___t_y_p_e) noexcept │ │ │ │ +455 { │ │ │ │ +456 return std::__relocate_a(__first, __last, __result, __alloc); │ │ │ │ +457 } │ │ │ │ +458 │ │ │ │ +459 static pointer │ │ │ │ +460 _S_do_relocate(pointer, pointer, pointer __result, │ │ │ │ +461 _Tp_alloc_type&, _f_a_l_s_e___t_y_p_e) noexcept │ │ │ │ +462 { return __result; } │ │ │ │ +463 │ │ │ │ +464 static pointer │ │ │ │ +465 _S_relocate(pointer __first, pointer __last, pointer __result, │ │ │ │ +466 _Tp_alloc_type& __alloc) noexcept │ │ │ │ +467 { │ │ │ │ +468 using __do_it = __bool_constant<_S_use_relocate()>; │ │ │ │ +469 return _S_do_relocate(__first, __last, __result, __alloc, __do_it{}); │ │ │ │ +470 } │ │ │ │ +471#endif // C++11 │ │ │ │ +472 │ │ │ │ +473 protected: │ │ │ │ +474 using _Base::_M_allocate; │ │ │ │ +475 using _Base::_M_deallocate; │ │ │ │ +476 using _Base::_M_impl; │ │ │ │ +477 using _Base::_M_get_Tp_allocator; │ │ │ │ +478 │ │ │ │ +479 public: │ │ │ │ +480 // [23.2.4.1] construct/copy/destroy │ │ │ │ +481 // (assign() and get_allocator() are also listed in this section) │ │ │ │ +482 │ │ │ │ +483 /** │ │ │ │ +484 * @brief Creates a %vector with no elements. │ │ │ │ +485 */ │ │ │ │ +486#if __cplusplus >= 201103L │ │ │ │ +_4_8_7 _v_e_c_t_o_r() = default; │ │ │ │ +488#else │ │ │ │ +489 _v_e_c_t_o_r() { } │ │ │ │ +490#endif │ │ │ │ +491 │ │ │ │ +492 /** │ │ │ │ +493 * @brief Creates a %vector with no elements. │ │ │ │ +494 * @param __a An allocator object. │ │ │ │ +495 */ │ │ │ │ +496 explicit │ │ │ │ +_4_9_7 _v_e_c_t_o_r(const allocator_type& __a) _GLIBCXX_NOEXCEPT │ │ │ │ +498 : _Base(__a) { } │ │ │ │ +499 │ │ │ │ +500#if __cplusplus >= 201103L │ │ │ │ +501 /** │ │ │ │ +502 * @brief Creates a %vector with default constructed elements. │ │ │ │ +503 * @param __n The number of elements to initially create. │ │ │ │ +504 * @param __a An allocator. │ │ │ │ +505 * │ │ │ │ +506 * This constructor fills the %vector with @a __n default │ │ │ │ +507 * constructed elements. │ │ │ │ +508 */ │ │ │ │ +509 explicit │ │ │ │ +_5_1_0 _v_e_c_t_o_r(size_type __n, const allocator_type& __a = allocator_type()) │ │ │ │ +511 : _Base(_S_check_init_len(__n, __a), __a) │ │ │ │ +512 { _M_default_initialize(__n); } │ │ │ │ +513 │ │ │ │ +514 /** │ │ │ │ +515 * @brief Creates a %vector with copies of an exemplar element. │ │ │ │ +516 * @param __n The number of elements to initially create. │ │ │ │ +517 * @param __value An element to copy. │ │ │ │ +518 * @param __a An allocator. │ │ │ │ +519 * │ │ │ │ +520 * This constructor fills the %vector with @a __n copies of @a __value. │ │ │ │ +521 */ │ │ │ │ +_5_2_2 _v_e_c_t_o_r(size_type __n, const value_type& __value, │ │ │ │ +523 const allocator_type& __a = allocator_type()) │ │ │ │ +524 : _Base(_S_check_init_len(__n, __a), __a) │ │ │ │ +525 { _M_fill_initialize(__n, __value); } │ │ │ │ +526#else │ │ │ │ +527 /** │ │ │ │ +528 * @brief Creates a %vector with copies of an exemplar element. │ │ │ │ +529 * @param __n The number of elements to initially create. │ │ │ │ +530 * @param __value An element to copy. │ │ │ │ +531 * @param __a An allocator. │ │ │ │ +532 * │ │ │ │ +533 * This constructor fills the %vector with @a __n copies of @a __value. │ │ │ │ +534 */ │ │ │ │ +535 explicit │ │ │ │ +536 _v_e_c_t_o_r(_s_i_z_e___t_y_p_e __n, const _v_a_l_u_e___t_y_p_e& __value = _v_a_l_u_e___t_y_p_e(), │ │ │ │ +537 const allocator_type& __a = allocator_type()) │ │ │ │ +538 : _Base(_S_check_init_len(__n, __a), __a) │ │ │ │ +539 { _M_fill_initialize(__n, __value); } │ │ │ │ +540#endif │ │ │ │ +541 │ │ │ │ +542 /** │ │ │ │ +543 * @brief %Vector copy constructor. │ │ │ │ +544 * @param __x A %vector of identical element and allocator types. │ │ │ │ +545 * │ │ │ │ +546 * All the elements of @a __x are copied, but any unused capacity in │ │ │ │ +547 * @a __x will not be copied │ │ │ │ +548 * (i.e. capacity() == size() in the new %vector). │ │ │ │ +549 * │ │ │ │ +550 * The newly-created %vector uses a copy of the allocator object used │ │ │ │ +551 * by @a __x (unless the allocator traits dictate a different object). │ │ │ │ +552 */ │ │ │ │ +_5_5_3 _v_e_c_t_o_r(const _v_e_c_t_o_r& __x) │ │ │ │ +554 : _Base(__x._s_i_z_e(), │ │ │ │ +555 _Alloc_traits::_S_select_on_copy(__x._M_get_Tp_allocator())) │ │ │ │ +556 { │ │ │ │ +557 this->_M_impl._M_finish = │ │ │ │ +558 std::__uninitialized_copy_a(__x._b_e_g_i_n(), __x._e_n_d(), │ │ │ │ +559 this->_M_impl._M_start, │ │ │ │ +560 _M_get_Tp_allocator()); │ │ │ │ +561 } │ │ │ │ +562 │ │ │ │ +563#if __cplusplus >= 201103L │ │ │ │ +564 /** │ │ │ │ +565 * @brief %Vector move constructor. │ │ │ │ +566 * │ │ │ │ +567 * The newly-created %vector contains the exact contents of the │ │ │ │ +568 * moved instance. │ │ │ │ +569 * The contents of the moved instance are a valid, but unspecified │ │ │ │ +570 * %vector. │ │ │ │ +571 */ │ │ │ │ +_5_7_2 _v_e_c_t_o_r(_v_e_c_t_o_r&&) noexcept = default; │ │ │ │ +573 │ │ │ │ +574 /// Copy constructor with alternative allocator │ │ │ │ +_5_7_5 _v_e_c_t_o_r(const _v_e_c_t_o_r& __x, const allocator_type& __a) │ │ │ │ +576 : _Base(__x._s_i_z_e(), __a) │ │ │ │ +577 { │ │ │ │ +578 this->_M_impl._M_finish = │ │ │ │ +579 std::__uninitialized_copy_a(__x.begin(), __x.end(), │ │ │ │ +580 this->_M_impl._M_start, │ │ │ │ +581 _M_get_Tp_allocator()); │ │ │ │ +582 } │ │ │ │ +583 │ │ │ │ +584 private: │ │ │ │ +585 _v_e_c_t_o_r(_v_e_c_t_o_r&& __rv, const allocator_type& __m, _t_r_u_e___t_y_p_e) noexcept │ │ │ │ +586 : _Base(__m, _s_t_d_:_:_m_o_v_e(__rv)) │ │ │ │ +587 { } │ │ │ │ +588 │ │ │ │ +589 _v_e_c_t_o_r(vector&& __rv, const allocator_type& __m, false_type) │ │ │ │ +590 : _Base(__m) │ │ │ │ +591 { │ │ │ │ +592 if (__rv.get_allocator() == __m) │ │ │ │ +593 this->_M_impl._M_swap_data(__rv._M_impl); │ │ │ │ +594 else if (!__rv.empty()) │ │ │ │ +595 { │ │ │ │ +596 this->_M_create_storage(__rv.size()); │ │ │ │ +597 this->_M_impl._M_finish = │ │ │ │ +598 std::__uninitialized_move_a(__rv.begin(), __rv.end(), │ │ │ │ +599 this->_M_impl._M_start, │ │ │ │ +600 _M_get_Tp_allocator()); │ │ │ │ +601 __rv.clear(); │ │ │ │ +602 } │ │ │ │ +603 } │ │ │ │ +604 │ │ │ │ +605 public: │ │ │ │ +606 /// Move constructor with alternative allocator │ │ │ │ +_6_0_7 _v_e_c_t_o_r(_v_e_c_t_o_r&& __rv, const allocator_type& __m) │ │ │ │ +608 noexcept( noexcept( │ │ │ │ +609 _v_e_c_t_o_r(_s_t_d_:_:_d_e_c_l_v_a_l_<_v_e_c_t_o_r_&_&_>(), _s_t_d_:_:_d_e_c_l_v_a_l_<_c_o_n_s_t_ _a_l_l_o_c_a_t_o_r___t_y_p_e_&_>(), │ │ │ │ +610 _s_t_d_:_:_d_e_c_l_v_a_l_<_t_y_p_e_n_a_m_e_ ___A_l_l_o_c___t_r_a_i_t_s_:_:_i_s___a_l_w_a_y_s___e_q_u_a_l_>())) ) │ │ │ │ +611 : _v_e_c_t_o_r(_s_t_d::_m_o_v_e(__rv), __m, typename _Alloc_traits::is_always_equal{}) │ │ │ │ +612 { } │ │ │ │ +613 │ │ │ │ +614 /** │ │ │ │ +615 * @brief Builds a %vector from an initializer list. │ │ │ │ +616 * @param __l An initializer_list. │ │ │ │ +617 * @param __a An allocator. │ │ │ │ +618 * │ │ │ │ +619 * Create a %vector consisting of copies of the elements in the │ │ │ │ +620 * initializer_list @a __l. │ │ │ │ +621 * │ │ │ │ +622 * This will call the element type's copy constructor N times │ │ │ │ +623 * (where N is @a __l.size()) and do no memory reallocation. │ │ │ │ +624 */ │ │ │ │ +_6_2_5 _v_e_c_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, │ │ │ │ +626 const allocator_type& __a = allocator_type()) │ │ │ │ +627 : _Base(__a) │ │ │ │ +628 { │ │ │ │ +629 _M_range_initialize(__l.begin(), __l.end(), │ │ │ │ +630 _r_a_n_d_o_m___a_c_c_e_s_s___i_t_e_r_a_t_o_r___t_a_g()); │ │ │ │ +631 } │ │ │ │ +632#endif │ │ │ │ +633 │ │ │ │ +634 /** │ │ │ │ +635 * @brief Builds a %vector from a range. │ │ │ │ +636 * @param __first An input iterator. │ │ │ │ +637 * @param __last An input iterator. │ │ │ │ +638 * @param __a An allocator. │ │ │ │ +639 * │ │ │ │ +640 * Create a %vector consisting of copies of the elements from │ │ │ │ +641 * [first,last). │ │ │ │ +642 * │ │ │ │ +643 * If the iterators are forward, bidirectional, or │ │ │ │ +644 * random-access, then this will call the elements' copy │ │ │ │ +645 * constructor N times (where N is distance(first,last)) and do │ │ │ │ +646 * no memory reallocation. But if only input iterators are │ │ │ │ +647 * used, then this will do at most 2N calls to the copy │ │ │ │ +648 * constructor, and logN memory reallocations. │ │ │ │ +649 */ │ │ │ │ +650#if __cplusplus >= 201103L │ │ │ │ +651 template> │ │ │ │ +_6_5_3 _v_e_c_t_o_r(_InputIterator __first, _InputIterator __last, │ │ │ │ +654 const allocator_type& __a = allocator_type()) │ │ │ │ +655 : _Base(__a) │ │ │ │ +656 { │ │ │ │ +657 _M_range_initialize(__first, __last, │ │ │ │ +658 _s_t_d_:_:_____i_t_e_r_a_t_o_r___c_a_t_e_g_o_r_y(__first)); │ │ │ │ +659 } │ │ │ │ +660#else │ │ │ │ +661 template │ │ │ │ +662 _v_e_c_t_o_r(_InputIterator __first, _InputIterator __last, │ │ │ │ +663 const allocator_type& __a = allocator_type()) │ │ │ │ +664 : _Base(__a) │ │ │ │ +665 { │ │ │ │ +666 // Check whether it's an integral type. If so, it's not an iterator. │ │ │ │ +667 typedef typename std::__is_integer<_InputIterator>::__type _Integral; │ │ │ │ +668 _M_initialize_dispatch(__first, __last, _Integral()); │ │ │ │ +669 } │ │ │ │ +670#endif │ │ │ │ +671 │ │ │ │ +672 /** │ │ │ │ +673 * The dtor only erases the elements, and note that if the │ │ │ │ +674 * elements themselves are pointers, the pointed-to memory is │ │ │ │ +675 * not touched in any way. Managing the pointer is the user's │ │ │ │ +676 * responsibility. │ │ │ │ +677 */ │ │ │ │ +_6_7_8 _~_v_e_c_t_o_r() _GLIBCXX_NOEXCEPT │ │ │ │ +679 { │ │ │ │ +680 _s_t_d_:_:___D_e_s_t_r_o_y(this->_M_impl._M_start, this->_M_impl._M_finish, │ │ │ │ +681 _M_get_Tp_allocator()); │ │ │ │ +682 _GLIBCXX_ASAN_ANNOTATE_BEFORE_DEALLOC; │ │ │ │ +683 } │ │ │ │ +684 │ │ │ │ +685 /** │ │ │ │ +686 * @brief %Vector assignment operator. │ │ │ │ +687 * @param __x A %vector of identical element and allocator types. │ │ │ │ +688 * │ │ │ │ +689 * All the elements of @a __x are copied, but any unused capacity in │ │ │ │ +690 * @a __x will not be copied. │ │ │ │ +691 * │ │ │ │ +692 * Whether the allocator is copied depends on the allocator traits. │ │ │ │ +693 */ │ │ │ │ +694 _v_e_c_t_o_r& │ │ │ │ +_6_9_5 _o_p_e_r_a_t_o_r_=(const _v_e_c_t_o_r& __x); │ │ │ │ +696 │ │ │ │ +697#if __cplusplus >= 201103L │ │ │ │ +698 /** │ │ │ │ +699 * @brief %Vector move assignment operator. │ │ │ │ +700 * @param __x A %vector of identical element and allocator types. │ │ │ │ +701 * │ │ │ │ +702 * The contents of @a __x are moved into this %vector (without copying, │ │ │ │ +703 * if the allocators permit it). │ │ │ │ +704 * Afterwards @a __x is a valid, but unspecified %vector. │ │ │ │ +705 * │ │ │ │ +706 * Whether the allocator is moved depends on the allocator traits. │ │ │ │ +707 */ │ │ │ │ +708 _v_e_c_t_o_r& │ │ │ │ +_7_0_9 _o_p_e_r_a_t_o_r_=(_v_e_c_t_o_r&& __x) noexcept(_Alloc_traits::_S_nothrow_move()) │ │ │ │ +710 { │ │ │ │ +711 constexpr bool __move_storage = │ │ │ │ +712 _Alloc_traits::_S_propagate_on_move_assign() │ │ │ │ +713 || _Alloc_traits::_S_always_equal(); │ │ │ │ +714 _M_move_assign(_s_t_d_:_:_m_o_v_e(__x), __bool_constant<__move_storage>()); │ │ │ │ +715 return *this; │ │ │ │ +716 } │ │ │ │ +717 │ │ │ │ +718 /** │ │ │ │ +719 * @brief %Vector list assignment operator. │ │ │ │ +720 * @param __l An initializer_list. │ │ │ │ +721 * │ │ │ │ +722 * This function fills a %vector with copies of the elements in the │ │ │ │ +723 * initializer list @a __l. │ │ │ │ +724 * │ │ │ │ +725 * Note that the assignment completely changes the %vector and │ │ │ │ +726 * that the resulting %vector's size is the same as the number │ │ │ │ +727 * of elements assigned. │ │ │ │ +728 */ │ │ │ │ +729 _v_e_c_t_o_r& │ │ │ │ +_7_3_0 _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) │ │ │ │ +731 { │ │ │ │ +732 this->_M_assign_aux(__l.begin(), __l.end(), │ │ │ │ +733 _r_a_n_d_o_m___a_c_c_e_s_s___i_t_e_r_a_t_o_r___t_a_g()); │ │ │ │ +734 return *this; │ │ │ │ +735 } │ │ │ │ +736#endif │ │ │ │ +737 │ │ │ │ +738 /** │ │ │ │ +739 * @brief Assigns a given value to a %vector. │ │ │ │ +740 * @param __n Number of elements to be assigned. │ │ │ │ +741 * @param __val Value to be assigned. │ │ │ │ +742 * │ │ │ │ +743 * This function fills a %vector with @a __n copies of the given │ │ │ │ +744 * value. Note that the assignment completely changes the │ │ │ │ +745 * %vector and that the resulting %vector's size is the same as │ │ │ │ +746 * the number of elements assigned. │ │ │ │ +747 */ │ │ │ │ +748 void │ │ │ │ +_7_4_9 _a_s_s_i_g_n(size_type __n, const value_type& __val) │ │ │ │ +750 { _M_fill_assign(__n, __val); } │ │ │ │ +751 │ │ │ │ +752 /** │ │ │ │ +753 * @brief Assigns a range to a %vector. │ │ │ │ +754 * @param __first An input iterator. │ │ │ │ +755 * @param __last An input iterator. │ │ │ │ +756 * │ │ │ │ +757 * This function fills a %vector with copies of the elements in the │ │ │ │ +758 * range [__first,__last). │ │ │ │ +759 * │ │ │ │ +760 * Note that the assignment completely changes the %vector and │ │ │ │ +761 * that the resulting %vector's size is the same as the number │ │ │ │ +762 * of elements assigned. │ │ │ │ +763 */ │ │ │ │ +764#if __cplusplus >= 201103L │ │ │ │ +765 template> │ │ │ │ +767 void │ │ │ │ +_7_6_8 _a_s_s_i_g_n(_InputIterator __first, _InputIterator __last) │ │ │ │ +769 { _M_assign_dispatch(__first, __last, __false_type()); } │ │ │ │ +770#else │ │ │ │ +771 template │ │ │ │ +772 void │ │ │ │ +773 _a_s_s_i_g_n(_InputIterator __first, _InputIterator __last) │ │ │ │ +774 { │ │ │ │ +775 // Check whether it's an integral type. If so, it's not an iterator. │ │ │ │ +776 typedef typename std::__is_integer<_InputIterator>::__type _Integral; │ │ │ │ +777 _M_assign_dispatch(__first, __last, _Integral()); │ │ │ │ +778 } │ │ │ │ +779#endif │ │ │ │ +780 │ │ │ │ +781#if __cplusplus >= 201103L │ │ │ │ +782 /** │ │ │ │ +783 * @brief Assigns an initializer list to a %vector. │ │ │ │ +784 * @param __l An initializer_list. │ │ │ │ +785 * │ │ │ │ +786 * This function fills a %vector with copies of the elements in the │ │ │ │ +787 * initializer list @a __l. │ │ │ │ +788 * │ │ │ │ +789 * Note that the assignment completely changes the %vector and │ │ │ │ +790 * that the resulting %vector's size is the same as the number │ │ │ │ +791 * of elements assigned. │ │ │ │ +792 */ │ │ │ │ +793 void │ │ │ │ +_7_9_4 _a_s_s_i_g_n(_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) │ │ │ │ +795 { │ │ │ │ +796 this->_M_assign_aux(__l.begin(), __l.end(), │ │ │ │ +797 _r_a_n_d_o_m___a_c_c_e_s_s___i_t_e_r_a_t_o_r___t_a_g()); │ │ │ │ +798 } │ │ │ │ +799#endif │ │ │ │ +800 │ │ │ │ +801 /// Get a copy of the memory allocation object. │ │ │ │ +802 using _Base::get_allocator; │ │ │ │ +803 │ │ │ │ +804 // iterators │ │ │ │ +805 /** │ │ │ │ +806 * Returns a read/write iterator that points to the first │ │ │ │ +807 * element in the %vector. Iteration is done in ordinary │ │ │ │ +808 * element order. │ │ │ │ +809 */ │ │ │ │ +810 _i_t_e_r_a_t_o_r │ │ │ │ +_8_1_1 _b_e_g_i_n() _GLIBCXX_NOEXCEPT │ │ │ │ +812 { return iterator(this->_M_impl._M_start); } │ │ │ │ +813 │ │ │ │ +814 /** │ │ │ │ +815 * Returns a read-only (constant) iterator that points to the │ │ │ │ +816 * first element in the %vector. Iteration is done in ordinary │ │ │ │ +817 * element order. │ │ │ │ +818 */ │ │ │ │ +819 const_iterator │ │ │ │ +_8_2_0 _b_e_g_i_n() const _GLIBCXX_NOEXCEPT │ │ │ │ +821 { return const_iterator(this->_M_impl._M_start); } │ │ │ │ +822 │ │ │ │ +823 /** │ │ │ │ +824 * Returns a read/write iterator that points one past the last │ │ │ │ +825 * element in the %vector. Iteration is done in ordinary │ │ │ │ +826 * element order. │ │ │ │ +827 */ │ │ │ │ +828 _i_t_e_r_a_t_o_r │ │ │ │ +_8_2_9 _e_n_d() _GLIBCXX_NOEXCEPT │ │ │ │ +830 { return iterator(this->_M_impl._M_finish); } │ │ │ │ +831 │ │ │ │ +832 /** │ │ │ │ +833 * Returns a read-only (constant) iterator that points one past │ │ │ │ +834 * the last element in the %vector. Iteration is done in │ │ │ │ +835 * ordinary element order. │ │ │ │ +836 */ │ │ │ │ +837 const_iterator │ │ │ │ +_8_3_8 _e_n_d() const _GLIBCXX_NOEXCEPT │ │ │ │ +839 { return const_iterator(this->_M_impl._M_finish); } │ │ │ │ +840 │ │ │ │ +841 /** │ │ │ │ +842 * Returns a read/write reverse iterator that points to the │ │ │ │ +843 * last element in the %vector. Iteration is done in reverse │ │ │ │ +844 * element order. │ │ │ │ +845 */ │ │ │ │ +846 _r_e_v_e_r_s_e___i_t_e_r_a_t_o_r │ │ │ │ +_8_4_7 _r_b_e_g_i_n() _GLIBCXX_NOEXCEPT │ │ │ │ +848 { return reverse_iterator(_e_n_d()); } │ │ │ │ +849 │ │ │ │ +850 /** │ │ │ │ +851 * Returns a read-only (constant) reverse iterator that points │ │ │ │ +852 * to the last element in the %vector. Iteration is done in │ │ │ │ +853 * reverse element order. │ │ │ │ +854 */ │ │ │ │ +855 const_reverse_iterator │ │ │ │ +_8_5_6 _r_b_e_g_i_n() const _GLIBCXX_NOEXCEPT │ │ │ │ +857 { return const_reverse_iterator(_e_n_d()); } │ │ │ │ +858 │ │ │ │ +859 /** │ │ │ │ +860 * Returns a read/write reverse iterator that points to one │ │ │ │ +861 * before the first element in the %vector. Iteration is done │ │ │ │ +862 * in reverse element order. │ │ │ │ +863 */ │ │ │ │ +864 _r_e_v_e_r_s_e___i_t_e_r_a_t_o_r │ │ │ │ +_8_6_5 _r_e_n_d() _GLIBCXX_NOEXCEPT │ │ │ │ +866 { return reverse_iterator(_b_e_g_i_n()); } │ │ │ │ +867 │ │ │ │ +868 /** │ │ │ │ +869 * Returns a read-only (constant) reverse iterator that points │ │ │ │ +870 * to one before the first element in the %vector. Iteration │ │ │ │ +871 * is done in reverse element order. │ │ │ │ +872 */ │ │ │ │ +873 const_reverse_iterator │ │ │ │ +_8_7_4 _r_e_n_d() const _GLIBCXX_NOEXCEPT │ │ │ │ +875 { return const_reverse_iterator(_b_e_g_i_n()); } │ │ │ │ +876 │ │ │ │ +877#if __cplusplus >= 201103L │ │ │ │ +878 /** │ │ │ │ +879 * Returns a read-only (constant) iterator that points to the │ │ │ │ +880 * first element in the %vector. Iteration is done in ordinary │ │ │ │ +881 * element order. │ │ │ │ +882 */ │ │ │ │ +883 const_iterator │ │ │ │ +_8_8_4 _c_b_e_g_i_n() const noexcept │ │ │ │ +885 { return const_iterator(this->_M_impl._M_start); } │ │ │ │ +886 │ │ │ │ +887 /** │ │ │ │ +888 * Returns a read-only (constant) iterator that points one past │ │ │ │ +889 * the last element in the %vector. Iteration is done in │ │ │ │ +890 * ordinary element order. │ │ │ │ +891 */ │ │ │ │ +892 const_iterator │ │ │ │ +_8_9_3 _c_e_n_d() const noexcept │ │ │ │ +894 { return const_iterator(this->_M_impl._M_finish); } │ │ │ │ +895 │ │ │ │ +896 /** │ │ │ │ +897 * Returns a read-only (constant) reverse iterator that points │ │ │ │ +898 * to the last element in the %vector. Iteration is done in │ │ │ │ +899 * reverse element order. │ │ │ │ +900 */ │ │ │ │ +901 const_reverse_iterator │ │ │ │ +_9_0_2 _c_r_b_e_g_i_n() const noexcept │ │ │ │ +903 { return const_reverse_iterator(_e_n_d()); } │ │ │ │ +904 │ │ │ │ +905 /** │ │ │ │ +906 * Returns a read-only (constant) reverse iterator that points │ │ │ │ +907 * to one before the first element in the %vector. Iteration │ │ │ │ +908 * is done in reverse element order. │ │ │ │ +909 */ │ │ │ │ +910 const_reverse_iterator │ │ │ │ +_9_1_1 _c_r_e_n_d() const noexcept │ │ │ │ +912 { return const_reverse_iterator(_b_e_g_i_n()); } │ │ │ │ +913#endif │ │ │ │ +914 │ │ │ │ +915 // [23.2.4.2] capacity │ │ │ │ +916 /** Returns the number of elements in the %vector. */ │ │ │ │ +917 _s_i_z_e___t_y_p_e │ │ │ │ +_9_1_8 _s_i_z_e() const _GLIBCXX_NOEXCEPT │ │ │ │ +919 { return size_type(this->_M_impl._M_finish - this->_M_impl._M_start); } │ │ │ │ +920 │ │ │ │ +921 /** Returns the size() of the largest possible %vector. */ │ │ │ │ +922 _s_i_z_e___t_y_p_e │ │ │ │ +_9_2_3 _m_a_x___s_i_z_e() const _GLIBCXX_NOEXCEPT │ │ │ │ +924 { return _S_max_size(_M_get_Tp_allocator()); } │ │ │ │ +925 │ │ │ │ +926#if __cplusplus >= 201103L │ │ │ │ +927 /** │ │ │ │ +928 * @brief Resizes the %vector to the specified number of elements. │ │ │ │ +929 * @param __new_size Number of elements the %vector should contain. │ │ │ │ +930 * │ │ │ │ +931 * This function will %resize the %vector to the specified │ │ │ │ +932 * number of elements. If the number is smaller than the │ │ │ │ +933 * %vector's current size the %vector is truncated, otherwise │ │ │ │ +934 * default constructed elements are appended. │ │ │ │ +935 */ │ │ │ │ +936 void │ │ │ │ +_9_3_7 _r_e_s_i_z_e(size_type __new_size) │ │ │ │ +938 { │ │ │ │ +939 if (__new_size > _s_i_z_e()) │ │ │ │ +940 _M_default_append(__new_size - _s_i_z_e()); │ │ │ │ +941 else if (__new_size < _s_i_z_e()) │ │ │ │ +942 _M_erase_at_end(this->_M_impl._M_start + __new_size); │ │ │ │ +943 } │ │ │ │ +944 │ │ │ │ +945 /** │ │ │ │ +946 * @brief Resizes the %vector to the specified number of elements. │ │ │ │ +947 * @param __new_size Number of elements the %vector should contain. │ │ │ │ +948 * @param __x Data with which new elements should be populated. │ │ │ │ +949 * │ │ │ │ +950 * This function will %resize the %vector to the specified │ │ │ │ +951 * number of elements. If the number is smaller than the │ │ │ │ +952 * %vector's current size the %vector is truncated, otherwise │ │ │ │ +953 * the %vector is extended and new elements are populated with │ │ │ │ +954 * given data. │ │ │ │ +955 */ │ │ │ │ +956 void │ │ │ │ +_9_5_7 _r_e_s_i_z_e(size_type __new_size, const value_type& __x) │ │ │ │ +958 { │ │ │ │ +959 if (__new_size > _s_i_z_e()) │ │ │ │ +960 _M_fill_insert(_e_n_d(), __new_size - _s_i_z_e(), __x); │ │ │ │ +961 else if (__new_size < _s_i_z_e()) │ │ │ │ +962 _M_erase_at_end(this->_M_impl._M_start + __new_size); │ │ │ │ +963 } │ │ │ │ +964#else │ │ │ │ +965 /** │ │ │ │ +966 * @brief Resizes the %vector to the specified number of elements. │ │ │ │ +967 * @param __new_size Number of elements the %vector should contain. │ │ │ │ +968 * @param __x Data with which new elements should be populated. │ │ │ │ +969 * │ │ │ │ +970 * This function will %resize the %vector to the specified │ │ │ │ +971 * number of elements. If the number is smaller than the │ │ │ │ +972 * %vector's current size the %vector is truncated, otherwise │ │ │ │ +973 * the %vector is extended and new elements are populated with │ │ │ │ +974 * given data. │ │ │ │ +975 */ │ │ │ │ +976 void │ │ │ │ +977 _r_e_s_i_z_e(_s_i_z_e___t_y_p_e __new_size, _v_a_l_u_e___t_y_p_e __x = _v_a_l_u_e___t_y_p_e()) │ │ │ │ +978 { │ │ │ │ +979 if (__new_size > _s_i_z_e()) │ │ │ │ +980 _M_fill_insert(_e_n_d(), __new_size - _s_i_z_e(), __x); │ │ │ │ +981 else if (__new_size < _s_i_z_e()) │ │ │ │ +982 _M_erase_at_end(this->_M_impl._M_start + __new_size); │ │ │ │ +983 } │ │ │ │ +984#endif │ │ │ │ +985 │ │ │ │ +986#if __cplusplus >= 201103L │ │ │ │ +987 /** A non-binding request to reduce capacity() to size(). */ │ │ │ │ +988 void │ │ │ │ +_9_8_9 _s_h_r_i_n_k___t_o___f_i_t() │ │ │ │ +990 { _M_shrink_to_fit(); } │ │ │ │ +991#endif │ │ │ │ +992 │ │ │ │ +993 /** │ │ │ │ +994 * Returns the total number of elements that the %vector can │ │ │ │ +995 * hold before needing to allocate more memory. │ │ │ │ +996 */ │ │ │ │ +997 _s_i_z_e___t_y_p_e │ │ │ │ +_9_9_8 _c_a_p_a_c_i_t_y() const _GLIBCXX_NOEXCEPT │ │ │ │ +999 { return size_type(this->_M_impl._M_end_of_storage │ │ │ │ +1000 - this->_M_impl._M_start); } │ │ │ │ +1001 │ │ │ │ +1002 /** │ │ │ │ +1003 * Returns true if the %vector is empty. (Thus begin() would │ │ │ │ +1004 * equal end().) │ │ │ │ +1005 */ │ │ │ │ +1006 _GLIBCXX_NODISCARD bool │ │ │ │ +_1_0_0_7 _e_m_p_t_y() const _GLIBCXX_NOEXCEPT │ │ │ │ +1008 { return _b_e_g_i_n() == _e_n_d(); } │ │ │ │ +1009 │ │ │ │ +1010 /** │ │ │ │ +1011 * @brief Attempt to preallocate enough memory for specified number of │ │ │ │ +1012 * elements. │ │ │ │ +1013 * @param __n Number of elements required. │ │ │ │ +1014 * @throw std::length_error If @a n exceeds @c max_size(). │ │ │ │ +1015 * │ │ │ │ +1016 * This function attempts to reserve enough memory for the │ │ │ │ +1017 * %vector to hold the specified number of elements. If the │ │ │ │ +1018 * number requested is more than max_size(), length_error is │ │ │ │ +1019 * thrown. │ │ │ │ +1020 * │ │ │ │ +1021 * The advantage of this function is that if optimal code is a │ │ │ │ +1022 * necessity and the user can determine the number of elements │ │ │ │ +1023 * that will be required, the user can reserve the memory in │ │ │ │ +1024 * %advance, and thus prevent a possible reallocation of memory │ │ │ │ +1025 * and copying of %vector data. │ │ │ │ +1026 */ │ │ │ │ +1027 void │ │ │ │ +_1_0_2_8 _r_e_s_e_r_v_e(size_type __n); │ │ │ │ +1029 │ │ │ │ +1030 // element access │ │ │ │ +1031 /** │ │ │ │ +1032 * @brief Subscript access to the data contained in the %vector. │ │ │ │ +1033 * @param __n The index of the element for which data should be │ │ │ │ +1034 * accessed. │ │ │ │ +1035 * @return Read/write reference to data. │ │ │ │ +1036 * │ │ │ │ +1037 * This operator allows for easy, array-style, data access. │ │ │ │ +1038 * Note that data access with this operator is unchecked and │ │ │ │ +1039 * out_of_range lookups are not defined. (For checked lookups │ │ │ │ +1040 * see at().) │ │ │ │ +1041 */ │ │ │ │ +1042 reference │ │ │ │ +_1_0_4_3 _o_p_e_r_a_t_o_r_[_](size_type __n) _GLIBCXX_NOEXCEPT │ │ │ │ +1044 { │ │ │ │ +1045 __glibcxx_requires_subscript(__n); │ │ │ │ +1046 return *(this->_M_impl._M_start + __n); │ │ │ │ +1047 } │ │ │ │ +1048 │ │ │ │ +1049 /** │ │ │ │ +1050 * @brief Subscript access to the data contained in the %vector. │ │ │ │ +1051 * @param __n The index of the element for which data should be │ │ │ │ +1052 * accessed. │ │ │ │ +1053 * @return Read-only (constant) reference to data. │ │ │ │ +1054 * │ │ │ │ +1055 * This operator allows for easy, array-style, data access. │ │ │ │ +1056 * Note that data access with this operator is unchecked and │ │ │ │ +1057 * out_of_range lookups are not defined. (For checked lookups │ │ │ │ +1058 * see at().) │ │ │ │ +1059 */ │ │ │ │ +1060 const_reference │ │ │ │ +_1_0_6_1 _o_p_e_r_a_t_o_r_[_](size_type __n) const _GLIBCXX_NOEXCEPT │ │ │ │ +1062 { │ │ │ │ +1063 __glibcxx_requires_subscript(__n); │ │ │ │ +1064 return *(this->_M_impl._M_start + __n); │ │ │ │ +1065 } │ │ │ │ +1066 │ │ │ │ +1067 protected: │ │ │ │ +1068 /// Safety check used only from at(). │ │ │ │ +1069 void │ │ │ │ +_1_0_7_0 ___M___r_a_n_g_e___c_h_e_c_k(size_type __n) const │ │ │ │ +1071 { │ │ │ │ +1072 if (__n >= this->_s_i_z_e()) │ │ │ │ +1073 __throw_out_of_range_fmt(__N("vector::_M_range_check: __n " │ │ │ │ +1074 "(which is %zu) >= this->size() " │ │ │ │ +1075 "(which is %zu)"), │ │ │ │ +1076 __n, this->_s_i_z_e()); │ │ │ │ +1077 } │ │ │ │ +1078 │ │ │ │ +1079 public: │ │ │ │ +1080 /** │ │ │ │ +1081 * @brief Provides access to the data contained in the %vector. │ │ │ │ +1082 * @param __n The index of the element for which data should be │ │ │ │ +1083 * accessed. │ │ │ │ +1084 * @return Read/write reference to data. │ │ │ │ +1085 * @throw std::out_of_range If @a __n is an invalid index. │ │ │ │ +1086 * │ │ │ │ +1087 * This function provides for safer data access. The parameter │ │ │ │ +1088 * is first checked that it is in the range of the vector. The │ │ │ │ +1089 * function throws out_of_range if the check fails. │ │ │ │ +1090 */ │ │ │ │ +1091 reference │ │ │ │ +_1_0_9_2 _a_t(size_type __n) │ │ │ │ +1093 { │ │ │ │ +1094 ___M___r_a_n_g_e___c_h_e_c_k(__n); │ │ │ │ +1095 return (*this)[__n]; │ │ │ │ +1096 } │ │ │ │ +1097 │ │ │ │ +1098 /** │ │ │ │ +1099 * @brief Provides access to the data contained in the %vector. │ │ │ │ +1100 * @param __n The index of the element for which data should be │ │ │ │ +1101 * accessed. │ │ │ │ +1102 * @return Read-only (constant) reference to data. │ │ │ │ +1103 * @throw std::out_of_range If @a __n is an invalid index. │ │ │ │ +1104 * │ │ │ │ +1105 * This function provides for safer data access. The parameter │ │ │ │ +1106 * is first checked that it is in the range of the vector. The │ │ │ │ +1107 * function throws out_of_range if the check fails. │ │ │ │ +1108 */ │ │ │ │ +1109 const_reference │ │ │ │ +_1_1_1_0 _a_t(size_type __n) const │ │ │ │ +1111 { │ │ │ │ +1112 ___M___r_a_n_g_e___c_h_e_c_k(__n); │ │ │ │ +1113 return (*this)[__n]; │ │ │ │ +1114 } │ │ │ │ +1115 │ │ │ │ +1116 /** │ │ │ │ +1117 * Returns a read/write reference to the data at the first │ │ │ │ +1118 * element of the %vector. │ │ │ │ +1119 */ │ │ │ │ +1120 reference │ │ │ │ +_1_1_2_1 _f_r_o_n_t() _GLIBCXX_NOEXCEPT │ │ │ │ +1122 { │ │ │ │ +1123 __glibcxx_requires_nonempty(); │ │ │ │ +1124 return *_b_e_g_i_n(); │ │ │ │ +1125 } │ │ │ │ +1126 │ │ │ │ +1127 /** │ │ │ │ +1128 * Returns a read-only (constant) reference to the data at the first │ │ │ │ +1129 * element of the %vector. │ │ │ │ +1130 */ │ │ │ │ +1131 const_reference │ │ │ │ +_1_1_3_2 _f_r_o_n_t() const _GLIBCXX_NOEXCEPT │ │ │ │ +1133 { │ │ │ │ +1134 __glibcxx_requires_nonempty(); │ │ │ │ +1135 return *_b_e_g_i_n(); │ │ │ │ +1136 } │ │ │ │ +1137 │ │ │ │ +1138 /** │ │ │ │ +1139 * Returns a read/write reference to the data at the last │ │ │ │ +1140 * element of the %vector. │ │ │ │ +1141 */ │ │ │ │ +1142 reference │ │ │ │ +_1_1_4_3 _b_a_c_k() _GLIBCXX_NOEXCEPT │ │ │ │ +1144 { │ │ │ │ +1145 __glibcxx_requires_nonempty(); │ │ │ │ +1146 return *(_e_n_d() - 1); │ │ │ │ +1147 } │ │ │ │ +1148 │ │ │ │ +1149 /** │ │ │ │ +1150 * Returns a read-only (constant) reference to the data at the │ │ │ │ +1151 * last element of the %vector. │ │ │ │ +1152 */ │ │ │ │ +1153 const_reference │ │ │ │ +_1_1_5_4 _b_a_c_k() const _GLIBCXX_NOEXCEPT │ │ │ │ +1155 { │ │ │ │ +1156 __glibcxx_requires_nonempty(); │ │ │ │ +1157 return *(_e_n_d() - 1); │ │ │ │ +1158 } │ │ │ │ +1159 │ │ │ │ +1160 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ +1161 // DR 464. Suggestion for new member functions in standard containers. │ │ │ │ +1162 // data access │ │ │ │ +1163 /** │ │ │ │ +1164 * Returns a pointer such that [data(), data() + size()) is a valid │ │ │ │ +1165 * range. For a non-empty %vector, data() == &front(). │ │ │ │ +1166 */ │ │ │ │ +1167 _Tp* │ │ │ │ +_1_1_6_8 _d_a_t_a() _GLIBCXX_NOEXCEPT │ │ │ │ +1169 { return _M_data_ptr(this->_M_impl._M_start); } │ │ │ │ +1170 │ │ │ │ +1171 const _Tp* │ │ │ │ +1172 _d_a_t_a() const _GLIBCXX_NOEXCEPT │ │ │ │ +1173 { return _M_data_ptr(this->_M_impl._M_start); } │ │ │ │ +1174 │ │ │ │ +1175 // [23.2.4.3] modifiers │ │ │ │ +1176 /** │ │ │ │ +1177 * @brief Add data to the end of the %vector. │ │ │ │ +1178 * @param __x Data to be added. │ │ │ │ +1179 * │ │ │ │ +1180 * This is a typical stack operation. The function creates an │ │ │ │ +1181 * element at the end of the %vector and assigns the given data │ │ │ │ +1182 * to it. Due to the nature of a %vector this operation can be │ │ │ │ +1183 * done in constant time if the %vector has preallocated space │ │ │ │ +1184 * available. │ │ │ │ +1185 */ │ │ │ │ +1186 void │ │ │ │ +_1_1_8_7 _p_u_s_h___b_a_c_k(const value_type& __x) │ │ │ │ +1188 { │ │ │ │ +1189 if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage) │ │ │ │ +1190 { │ │ │ │ +1191 _GLIBCXX_ASAN_ANNOTATE_GROW(1); │ │ │ │ +1192 _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, │ │ │ │ +1193 __x); │ │ │ │ +1194 ++this->_M_impl._M_finish; │ │ │ │ +1195 _GLIBCXX_ASAN_ANNOTATE_GREW(1); │ │ │ │ +1196 } │ │ │ │ +1197 else │ │ │ │ +1198 _M_realloc_insert(_e_n_d(), __x); │ │ │ │ +1199 } │ │ │ │ +1200 │ │ │ │ +1201#if __cplusplus >= 201103L │ │ │ │ +1202 void │ │ │ │ +1203 _p_u_s_h___b_a_c_k(_v_a_l_u_e___t_y_p_e&& __x) │ │ │ │ +1204 { emplace_back(_s_t_d_:_:_m_o_v_e(__x)); } │ │ │ │ +1205 │ │ │ │ +1206 template │ │ │ │ +1207#if __cplusplus > 201402L │ │ │ │ +1208 reference │ │ │ │ +1209#else │ │ │ │ +1210 void │ │ │ │ +1211#endif │ │ │ │ +1212 emplace_back(_Args&&... __args); │ │ │ │ +1213#endif │ │ │ │ +1214 │ │ │ │ +1215 /** │ │ │ │ +1216 * @brief Removes last element. │ │ │ │ +1217 * │ │ │ │ +1218 * This is a typical stack operation. It shrinks the %vector by one. │ │ │ │ +1219 * │ │ │ │ +1220 * Note that no data is returned, and if the last element's │ │ │ │ +1221 * data is needed, it should be retrieved before pop_back() is │ │ │ │ +1222 * called. │ │ │ │ +1223 */ │ │ │ │ +1224 void │ │ │ │ +_1_2_2_5 _p_o_p___b_a_c_k() _GLIBCXX_NOEXCEPT │ │ │ │ +1226 { │ │ │ │ +1227 __glibcxx_requires_nonempty(); │ │ │ │ +1228 --this->_M_impl._M_finish; │ │ │ │ +1229 _Alloc_traits::destroy(this->_M_impl, this->_M_impl._M_finish); │ │ │ │ +1230 _GLIBCXX_ASAN_ANNOTATE_SHRINK(1); │ │ │ │ +1231 } │ │ │ │ +1232 │ │ │ │ +1233#if __cplusplus >= 201103L │ │ │ │ +1234 /** │ │ │ │ +1235 * @brief Inserts an object in %vector before specified iterator. │ │ │ │ +1236 * @param __position A const_iterator into the %vector. │ │ │ │ +1237 * @param __args Arguments. │ │ │ │ +1238 * @return An iterator that points to the inserted data. │ │ │ │ +1239 * │ │ │ │ +1240 * This function will insert an object of type T constructed │ │ │ │ +1241 * with T(std::forward(args)...) before the specified location. │ │ │ │ +1242 * Note that this kind of operation could be expensive for a %vector │ │ │ │ +1243 * and if it is frequently used the user should consider using │ │ │ │ +1244 * std::list. │ │ │ │ +1245 */ │ │ │ │ +1246 template │ │ │ │ +1247 _i_t_e_r_a_t_o_r │ │ │ │ +_1_2_4_8 _e_m_p_l_a_c_e(const_iterator __position, _Args&&... __args) │ │ │ │ +1249 { return _M_emplace_aux(__position, _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(__args)...); } │ │ │ │ +1250 │ │ │ │ +1251 /** │ │ │ │ +1252 * @brief Inserts given value into %vector before specified iterator. │ │ │ │ +1253 * @param __position A const_iterator into the %vector. │ │ │ │ +1254 * @param __x Data to be inserted. │ │ │ │ +1255 * @return An iterator that points to the inserted data. │ │ │ │ +1256 * │ │ │ │ +1257 * This function will insert a copy of the given value before │ │ │ │ +1258 * the specified location. Note that this kind of operation │ │ │ │ +1259 * could be expensive for a %vector and if it is frequently │ │ │ │ +1260 * used the user should consider using std::list. │ │ │ │ +1261 */ │ │ │ │ +1262 _i_t_e_r_a_t_o_r │ │ │ │ +_1_2_6_3 _i_n_s_e_r_t(const_iterator __position, const value_type& __x); │ │ │ │ +1264#else │ │ │ │ +1265 /** │ │ │ │ +1266 * @brief Inserts given value into %vector before specified iterator. │ │ │ │ +1267 * @param __position An iterator into the %vector. │ │ │ │ +1268 * @param __x Data to be inserted. │ │ │ │ +1269 * @return An iterator that points to the inserted data. │ │ │ │ +1270 * │ │ │ │ +1271 * This function will insert a copy of the given value before │ │ │ │ +1272 * the specified location. Note that this kind of operation │ │ │ │ +1273 * could be expensive for a %vector and if it is frequently │ │ │ │ +1274 * used the user should consider using std::list. │ │ │ │ +1275 */ │ │ │ │ +1276 iterator │ │ │ │ +1277 _i_n_s_e_r_t(iterator __position, const value_type& __x); │ │ │ │ +1278#endif │ │ │ │ +1279 │ │ │ │ +1280#if __cplusplus >= 201103L │ │ │ │ +1281 /** │ │ │ │ +1282 * @brief Inserts given rvalue into %vector before specified iterator. │ │ │ │ +1283 * @param __position A const_iterator into the %vector. │ │ │ │ +1284 * @param __x Data to be inserted. │ │ │ │ +1285 * @return An iterator that points to the inserted data. │ │ │ │ +1286 * │ │ │ │ +1287 * This function will insert a copy of the given rvalue before │ │ │ │ +1288 * the specified location. Note that this kind of operation │ │ │ │ +1289 * could be expensive for a %vector and if it is frequently │ │ │ │ +1290 * used the user should consider using std::list. │ │ │ │ +1291 */ │ │ │ │ +1292 iterator │ │ │ │ +_1_2_9_3 _i_n_s_e_r_t(const_iterator __position, value_type&& __x) │ │ │ │ +1294 { return _M_insert_rval(__position, _s_t_d_:_:_m_o_v_e(__x)); } │ │ │ │ +1295 │ │ │ │ +1296 /** │ │ │ │ +1297 * @brief Inserts an initializer_list into the %vector. │ │ │ │ +1298 * @param __position An iterator into the %vector. │ │ │ │ +1299 * @param __l An initializer_list. │ │ │ │ +1300 * │ │ │ │ +1301 * This function will insert copies of the data in the │ │ │ │ +1302 * initializer_list @a l into the %vector before the location │ │ │ │ +1303 * specified by @a position. │ │ │ │ +1304 * │ │ │ │ +1305 * Note that this kind of operation could be expensive for a │ │ │ │ +1306 * %vector and if it is frequently used the user should │ │ │ │ +1307 * consider using std::list. │ │ │ │ +1308 */ │ │ │ │ +1309 _i_t_e_r_a_t_o_r │ │ │ │ +_1_3_1_0 _i_n_s_e_r_t(const_iterator __position, _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) │ │ │ │ +1311 { │ │ │ │ +1312 auto __offset = __position - _c_b_e_g_i_n(); │ │ │ │ +1313 _M_range_insert(_b_e_g_i_n() + __offset, __l.begin(), __l.end(), │ │ │ │ +1314 _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()); │ │ │ │ +1315 return _b_e_g_i_n() + __offset; │ │ │ │ +1316 } │ │ │ │ +1317#endif │ │ │ │ +1318 │ │ │ │ +1319#if __cplusplus >= 201103L │ │ │ │ +1320 /** │ │ │ │ +1321 * @brief Inserts a number of copies of given data into the %vector. │ │ │ │ +1322 * @param __position A const_iterator into the %vector. │ │ │ │ +1323 * @param __n Number of elements to be inserted. │ │ │ │ +1324 * @param __x Data to be inserted. │ │ │ │ +1325 * @return An iterator that points to the inserted data. │ │ │ │ +1326 * │ │ │ │ +1327 * This function will insert a specified number of copies of │ │ │ │ +1328 * the given data before the location specified by @a position. │ │ │ │ +1329 * │ │ │ │ +1330 * Note that this kind of operation could be expensive for a │ │ │ │ +1331 * %vector and if it is frequently used the user should │ │ │ │ +1332 * consider using std::list. │ │ │ │ +1333 */ │ │ │ │ +1334 _i_t_e_r_a_t_o_r │ │ │ │ +_1_3_3_5 _i_n_s_e_r_t(const_iterator __position, size_type __n, const value_type& __x) │ │ │ │ +1336 { │ │ │ │ +1337 difference_type __offset = __position - _c_b_e_g_i_n(); │ │ │ │ +1338 _M_fill_insert(_b_e_g_i_n() + __offset, __n, __x); │ │ │ │ +1339 return _b_e_g_i_n() + __offset; │ │ │ │ +1340 } │ │ │ │ +1341#else │ │ │ │ +1342 /** │ │ │ │ +1343 * @brief Inserts a number of copies of given data into the %vector. │ │ │ │ +1344 * @param __position An iterator into the %vector. │ │ │ │ +1345 * @param __n Number of elements to be inserted. │ │ │ │ +1346 * @param __x Data to be inserted. │ │ │ │ +1347 * │ │ │ │ +1348 * This function will insert a specified number of copies of │ │ │ │ +1349 * the given data before the location specified by @a position. │ │ │ │ +1350 * │ │ │ │ +1351 * Note that this kind of operation could be expensive for a │ │ │ │ +1352 * %vector and if it is frequently used the user should │ │ │ │ +1353 * consider using std::list. │ │ │ │ +1354 */ │ │ │ │ +1355 void │ │ │ │ +1356 _i_n_s_e_r_t(_i_t_e_r_a_t_o_r __position, _s_i_z_e___t_y_p_e __n, const _v_a_l_u_e___t_y_p_e& __x) │ │ │ │ +1357 { _M_fill_insert(__position, __n, __x); } │ │ │ │ +1358#endif │ │ │ │ +1359 │ │ │ │ +1360#if __cplusplus >= 201103L │ │ │ │ +1361 /** │ │ │ │ +1362 * @brief Inserts a range into the %vector. │ │ │ │ +1363 * @param __position A const_iterator into the %vector. │ │ │ │ +1364 * @param __first An input iterator. │ │ │ │ +1365 * @param __last An input iterator. │ │ │ │ +1366 * @return An iterator that points to the inserted data. │ │ │ │ +1367 * │ │ │ │ +1368 * This function will insert copies of the data in the range │ │ │ │ +1369 * [__first,__last) into the %vector before the location specified │ │ │ │ +1370 * by @a pos. │ │ │ │ +1371 * │ │ │ │ +1372 * Note that this kind of operation could be expensive for a │ │ │ │ +1373 * %vector and if it is frequently used the user should │ │ │ │ +1374 * consider using std::list. │ │ │ │ +1375 */ │ │ │ │ +1376 template> │ │ │ │ +1378 iterator │ │ │ │ +_1_3_7_9 _i_n_s_e_r_t(const_iterator __position, _InputIterator __first, │ │ │ │ +1380 _InputIterator __last) │ │ │ │ +1381 { │ │ │ │ +1382 difference_type __offset = __position - _c_b_e_g_i_n(); │ │ │ │ +1383 _M_insert_dispatch(_b_e_g_i_n() + __offset, │ │ │ │ +1384 __first, __last, __false_type()); │ │ │ │ +1385 return _b_e_g_i_n() + __offset; │ │ │ │ +1386 } │ │ │ │ +1387#else │ │ │ │ +1388 /** │ │ │ │ +1389 * @brief Inserts a range into the %vector. │ │ │ │ +1390 * @param __position An iterator into the %vector. │ │ │ │ +1391 * @param __first An input iterator. │ │ │ │ +1392 * @param __last An input iterator. │ │ │ │ +1393 * │ │ │ │ +1394 * This function will insert copies of the data in the range │ │ │ │ +1395 * [__first,__last) into the %vector before the location specified │ │ │ │ +1396 * by @a pos. │ │ │ │ +1397 * │ │ │ │ +1398 * Note that this kind of operation could be expensive for a │ │ │ │ +1399 * %vector and if it is frequently used the user should │ │ │ │ +1400 * consider using std::list. │ │ │ │ +1401 */ │ │ │ │ +1402 template │ │ │ │ +1403 void │ │ │ │ +1404 _i_n_s_e_r_t(_i_t_e_r_a_t_o_r __position, _InputIterator __first, │ │ │ │ +1405 _InputIterator __last) │ │ │ │ +1406 { │ │ │ │ +1407 // Check whether it's an integral type. If so, it's not an iterator. │ │ │ │ +1408 typedef typename std::__is_integer<_InputIterator>::__type _Integral; │ │ │ │ +1409 _M_insert_dispatch(__position, __first, __last, _Integral()); │ │ │ │ +1410 } │ │ │ │ +1411#endif │ │ │ │ +1412 │ │ │ │ +1413 /** │ │ │ │ +1414 * @brief Remove element at given position. │ │ │ │ +1415 * @param __position Iterator pointing to element to be erased. │ │ │ │ +1416 * @return An iterator pointing to the next element (or end()). │ │ │ │ +1417 * │ │ │ │ +1418 * This function will erase the element at the given position and thus │ │ │ │ +1419 * shorten the %vector by one. │ │ │ │ +1420 * │ │ │ │ +1421 * Note This operation could be expensive and if it is │ │ │ │ +1422 * frequently used the user should consider using std::list. │ │ │ │ +1423 * The user is also cautioned that this function only erases │ │ │ │ +1424 * the element, and that if the element is itself a pointer, │ │ │ │ +1425 * the pointed-to memory is not touched in any way. Managing │ │ │ │ +1426 * the pointer is the user's responsibility. │ │ │ │ +1427 */ │ │ │ │ +1428 iterator │ │ │ │ +1429#if __cplusplus >= 201103L │ │ │ │ +_1_4_3_0 _e_r_a_s_e(const_iterator __position) │ │ │ │ +1431 { return _M_erase(_b_e_g_i_n() + (__position - _c_b_e_g_i_n())); } │ │ │ │ +1432#else │ │ │ │ +1433 _e_r_a_s_e(_i_t_e_r_a_t_o_r __position) │ │ │ │ +1434 { return _M_erase(__position); } │ │ │ │ +1435#endif │ │ │ │ +1436 │ │ │ │ +1437 /** │ │ │ │ +1438 * @brief Remove a range of elements. │ │ │ │ +1439 * @param __first Iterator pointing to the first element to be erased. │ │ │ │ +1440 * @param __last Iterator pointing to one past the last element to be │ │ │ │ +1441 * erased. │ │ │ │ +1442 * @return An iterator pointing to the element pointed to by @a __last │ │ │ │ +1443 * prior to erasing (or end()). │ │ │ │ +1444 * │ │ │ │ +1445 * This function will erase the elements in the range │ │ │ │ +1446 * [__first,__last) and shorten the %vector accordingly. │ │ │ │ +1447 * │ │ │ │ +1448 * Note This operation could be expensive and if it is │ │ │ │ +1449 * frequently used the user should consider using std::list. │ │ │ │ +1450 * The user is also cautioned that this function only erases │ │ │ │ +1451 * the elements, and that if the elements themselves are │ │ │ │ +1452 * pointers, the pointed-to memory is not touched in any way. │ │ │ │ +1453 * Managing the pointer is the user's responsibility. │ │ │ │ +1454 */ │ │ │ │ +1455 iterator │ │ │ │ +1456#if __cplusplus >= 201103L │ │ │ │ +_1_4_5_7 _e_r_a_s_e(const_iterator __first, const_iterator __last) │ │ │ │ +1458 { │ │ │ │ +1459 const auto __beg = _b_e_g_i_n(); │ │ │ │ +1460 const auto __cbeg = _c_b_e_g_i_n(); │ │ │ │ +1461 return _M_erase(__beg + (__first - __cbeg), __beg + (__last - __cbeg)); │ │ │ │ +1462 } │ │ │ │ +1463#else │ │ │ │ +1464 _e_r_a_s_e(_i_t_e_r_a_t_o_r __first, _i_t_e_r_a_t_o_r __last) │ │ │ │ +1465 { return _M_erase(__first, __last); } │ │ │ │ +1466#endif │ │ │ │ +1467 │ │ │ │ +1468 /** │ │ │ │ +1469 * @brief Swaps data with another %vector. │ │ │ │ +1470 * @param __x A %vector of the same element and allocator types. │ │ │ │ +1471 * │ │ │ │ +1472 * This exchanges the elements between two vectors in constant time. │ │ │ │ +1473 * (Three pointers, so it should be quite fast.) │ │ │ │ +1474 * Note that the global std::swap() function is specialized such that │ │ │ │ +1475 * std::swap(v1,v2) will feed to this function. │ │ │ │ +1476 * │ │ │ │ +1477 * Whether the allocators are swapped depends on the allocator traits. │ │ │ │ +1478 */ │ │ │ │ +1479 void │ │ │ │ +_1_4_8_0 _s_w_a_p(_v_e_c_t_o_r& __x) _GLIBCXX_NOEXCEPT │ │ │ │ +1481 { │ │ │ │ +1482#if __cplusplus >= 201103L │ │ │ │ +1483 __glibcxx_assert(_Alloc_traits::propagate_on_container_swap::value │ │ │ │ +1484 || _M_get_Tp_allocator() == __x._M_get_Tp_allocator()); │ │ │ │ +1485#endif │ │ │ │ +1486 this->_M_impl._M_swap_data(__x._M_impl); │ │ │ │ +1487 _Alloc_traits::_S_on_swap(_M_get_Tp_allocator(), │ │ │ │ +1488 __x._M_get_Tp_allocator()); │ │ │ │ +1489 } │ │ │ │ +1490 │ │ │ │ +1491 /** │ │ │ │ +1492 * Erases all the elements. Note that this function only erases the │ │ │ │ +1493 * elements, and that if the elements themselves are pointers, the │ │ │ │ +1494 * pointed-to memory is not touched in any way. Managing the pointer is │ │ │ │ +1495 * the user's responsibility. │ │ │ │ +1496 */ │ │ │ │ +1497 void │ │ │ │ +_1_4_9_8 _c_l_e_a_r() _GLIBCXX_NOEXCEPT │ │ │ │ +1499 { _M_erase_at_end(this->_M_impl._M_start); } │ │ │ │ +1500 │ │ │ │ +1501 protected: │ │ │ │ +1502 /** │ │ │ │ +1503 * Memory expansion handler. Uses the member allocation function to │ │ │ │ +1504 * obtain @a n bytes of memory, and then copies [first,last) into it. │ │ │ │ +1505 */ │ │ │ │ +1506 template │ │ │ │ +1507 pointer │ │ │ │ +_1_5_0_8 ___M___a_l_l_o_c_a_t_e___a_n_d___c_o_p_y(size_type __n, │ │ │ │ +1509 _ForwardIterator __first, _ForwardIterator __last) │ │ │ │ +1510 { │ │ │ │ +1511 pointer __result = this->_M_allocate(__n); │ │ │ │ +1512 __try │ │ │ │ +1513 { │ │ │ │ +1514 std::__uninitialized_copy_a(__first, __last, __result, │ │ │ │ +1515 _M_get_Tp_allocator()); │ │ │ │ +1516 return __result; │ │ │ │ +1517 } │ │ │ │ +1518 __catch(...) │ │ │ │ +1519 { │ │ │ │ +1520 _M_deallocate(__result, __n); │ │ │ │ +1521 __throw_exception_again; │ │ │ │ +1522 } │ │ │ │ +1523 } │ │ │ │ +1524 │ │ │ │ +1525 │ │ │ │ +1526 // Internal constructor functions follow. │ │ │ │ +1527 │ │ │ │ +1528 // Called by the range constructor to implement [23.1.1]/9 │ │ │ │ +1529 │ │ │ │ +1530#if __cplusplus < 201103L │ │ │ │ +1531 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ +1532 // 438. Ambiguity in the "do the right thing" clause │ │ │ │ +1533 template │ │ │ │ +1534 void │ │ │ │ +1535 _M_initialize_dispatch(_Integer __n, _Integer __value, __true_type) │ │ │ │ +1536 { │ │ │ │ +1537 this->_M_impl._M_start = _M_allocate(_S_check_init_len( │ │ │ │ +1538 static_cast<_s_i_z_e___t_y_p_e>(__n), _M_get_Tp_allocator())); │ │ │ │ +1539 this->_M_impl._M_end_of_storage = │ │ │ │ +1540 this->_M_impl._M_start + static_cast<_s_i_z_e___t_y_p_e>(__n); │ │ │ │ +1541 _M_fill_initialize(static_cast<_s_i_z_e___t_y_p_e>(__n), __value); │ │ │ │ +1542 } │ │ │ │ +1543 │ │ │ │ +1544 // Called by the range constructor to implement [23.1.1]/9 │ │ │ │ +1545 template │ │ │ │ +1546 void │ │ │ │ +1547 _M_initialize_dispatch(_InputIterator __first, _InputIterator __last, │ │ │ │ +1548 __false_type) │ │ │ │ +1549 { │ │ │ │ +1550 _M_range_initialize(__first, __last, │ │ │ │ +1551 _s_t_d_:_:_____i_t_e_r_a_t_o_r___c_a_t_e_g_o_r_y(__first)); │ │ │ │ +1552 } │ │ │ │ +1553#endif │ │ │ │ +1554 │ │ │ │ +1555 // Called by the second initialize_dispatch above │ │ │ │ +1556 template │ │ │ │ +1557 void │ │ │ │ +1558 _M_range_initialize(_InputIterator __first, _InputIterator __last, │ │ │ │ +1559 std::input_iterator_tag) │ │ │ │ +1560 { │ │ │ │ +1561 __try { │ │ │ │ +1562 for (; __first != __last; ++__first) │ │ │ │ +1563#if __cplusplus >= 201103L │ │ │ │ +1564 emplace_back(*__first); │ │ │ │ +1565#else │ │ │ │ +1566 _p_u_s_h___b_a_c_k(*__first); │ │ │ │ +1567#endif │ │ │ │ +1568 } __catch(...) { │ │ │ │ +1569 _c_l_e_a_r(); │ │ │ │ +1570 __throw_exception_again; │ │ │ │ +1571 } │ │ │ │ +1572 } │ │ │ │ +1573 │ │ │ │ +1574 // Called by the second initialize_dispatch above │ │ │ │ +1575 template │ │ │ │ +1576 void │ │ │ │ +1577 _M_range_initialize(_ForwardIterator __first, _ForwardIterator __last, │ │ │ │ +1578 std::forward_iterator_tag) │ │ │ │ +1579 { │ │ │ │ +1580 const size_type __n = _s_t_d_:_:_d_i_s_t_a_n_c_e(__first, __last); │ │ │ │ +1581 this->_M_impl._M_start │ │ │ │ +1582 = this->_M_allocate(_S_check_init_len(__n, _M_get_Tp_allocator())); │ │ │ │ +1583 this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n; │ │ │ │ +1584 this->_M_impl._M_finish = │ │ │ │ +1585 std::__uninitialized_copy_a(__first, __last, │ │ │ │ +1586 this->_M_impl._M_start, │ │ │ │ +1587 _M_get_Tp_allocator()); │ │ │ │ +1588 } │ │ │ │ +1589 │ │ │ │ +1590 // Called by the first initialize_dispatch above and by the │ │ │ │ +1591 // vector(n,value,a) constructor. │ │ │ │ +1592 void │ │ │ │ +1593 _M_fill_initialize(size_type __n, const value_type& __value) │ │ │ │ +1594 { │ │ │ │ +1595 this->_M_impl._M_finish = │ │ │ │ +1596 std::__uninitialized_fill_n_a(this->_M_impl._M_start, __n, __value, │ │ │ │ +1597 _M_get_Tp_allocator()); │ │ │ │ +1598 } │ │ │ │ +1599 │ │ │ │ +1600#if __cplusplus >= 201103L │ │ │ │ +1601 // Called by the vector(n) constructor. │ │ │ │ +1602 void │ │ │ │ +1603 _M_default_initialize(size_type __n) │ │ │ │ +1604 { │ │ │ │ +1605 this->_M_impl._M_finish = │ │ │ │ +1606 std::__uninitialized_default_n_a(this->_M_impl._M_start, __n, │ │ │ │ +1607 _M_get_Tp_allocator()); │ │ │ │ +1608 } │ │ │ │ +1609#endif │ │ │ │ +1610 │ │ │ │ +1611 // Internal assign functions follow. The *_aux functions do the actual │ │ │ │ +1612 // assignment work for the range versions. │ │ │ │ +1613 │ │ │ │ +1614 // Called by the range assign to implement [23.1.1]/9 │ │ │ │ +1615 │ │ │ │ +1616 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ +1617 // 438. Ambiguity in the "do the right thing" clause │ │ │ │ +1618 template │ │ │ │ +1619 void │ │ │ │ +1620 _M_assign_dispatch(_Integer __n, _Integer __val, __true_type) │ │ │ │ +1621 { _M_fill_assign(__n, __val); } │ │ │ │ +1622 │ │ │ │ +1623 // Called by the range assign to implement [23.1.1]/9 │ │ │ │ +1624 template │ │ │ │ +1625 void │ │ │ │ +1626 _M_assign_dispatch(_InputIterator __first, _InputIterator __last, │ │ │ │ +1627 __false_type) │ │ │ │ +1628 { _M_assign_aux(__first, __last, _s_t_d_:_:_____i_t_e_r_a_t_o_r___c_a_t_e_g_o_r_y(__first)); } │ │ │ │ +1629 │ │ │ │ +1630 // Called by the second assign_dispatch above │ │ │ │ +1631 template │ │ │ │ +1632 void │ │ │ │ +1633 _M_assign_aux(_InputIterator __first, _InputIterator __last, │ │ │ │ +1634 std::input_iterator_tag); │ │ │ │ +1635 │ │ │ │ +1636 // Called by the second assign_dispatch above │ │ │ │ +1637 template │ │ │ │ +1638 void │ │ │ │ +1639 _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, │ │ │ │ +1640 std::forward_iterator_tag); │ │ │ │ +1641 │ │ │ │ +1642 // Called by assign(n,t), and the range assign when it turns out │ │ │ │ +1643 // to be the same thing. │ │ │ │ +1644 void │ │ │ │ +1645 _M_fill_assign(size_type __n, const value_type& __val); │ │ │ │ +1646 │ │ │ │ +1647 // Internal insert functions follow. │ │ │ │ +1648 │ │ │ │ +1649 // Called by the range insert to implement [23.1.1]/9 │ │ │ │ +1650 │ │ │ │ +1651 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ +1652 // 438. Ambiguity in the "do the right thing" clause │ │ │ │ +1653 template │ │ │ │ +1654 void │ │ │ │ +1655 _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __val, │ │ │ │ +1656 __true_type) │ │ │ │ +1657 { _M_fill_insert(__pos, __n, __val); } │ │ │ │ +1658 │ │ │ │ +1659 // Called by the range insert to implement [23.1.1]/9 │ │ │ │ +1660 template │ │ │ │ +1661 void │ │ │ │ +1662 _M_insert_dispatch(iterator __pos, _InputIterator __first, │ │ │ │ +1663 _InputIterator __last, __false_type) │ │ │ │ +1664 { │ │ │ │ +1665 _M_range_insert(__pos, __first, __last, │ │ │ │ +1666 _s_t_d_:_:_____i_t_e_r_a_t_o_r___c_a_t_e_g_o_r_y(__first)); │ │ │ │ +1667 } │ │ │ │ +1668 │ │ │ │ +1669 // Called by the second insert_dispatch above │ │ │ │ +1670 template │ │ │ │ +1671 void │ │ │ │ +1672 _M_range_insert(iterator __pos, _InputIterator __first, │ │ │ │ +1673 _InputIterator __last, std::input_iterator_tag); │ │ │ │ +1674 │ │ │ │ +1675 // Called by the second insert_dispatch above │ │ │ │ +1676 template │ │ │ │ +1677 void │ │ │ │ +1678 _M_range_insert(iterator __pos, _ForwardIterator __first, │ │ │ │ +1679 _ForwardIterator __last, std::forward_iterator_tag); │ │ │ │ +1680 │ │ │ │ +1681 // Called by insert(p,n,x), and the range insert when it turns out to be │ │ │ │ +1682 // the same thing. │ │ │ │ +1683 void │ │ │ │ +1684 _M_fill_insert(iterator __pos, size_type __n, const value_type& __x); │ │ │ │ +1685 │ │ │ │ +1686#if __cplusplus >= 201103L │ │ │ │ +1687 // Called by resize(n). │ │ │ │ +1688 void │ │ │ │ +1689 _M_default_append(size_type __n); │ │ │ │ +1690 │ │ │ │ +1691 bool │ │ │ │ +1692 _M_shrink_to_fit(); │ │ │ │ +1693#endif │ │ │ │ +1694 │ │ │ │ +1695#if __cplusplus < 201103L │ │ │ │ +1696 // Called by insert(p,x) │ │ │ │ +1697 void │ │ │ │ +1698 _M_insert_aux(iterator __position, const value_type& __x); │ │ │ │ +1699 │ │ │ │ +1700 void │ │ │ │ +1701 _M_realloc_insert(iterator __position, const value_type& __x); │ │ │ │ +1702#else │ │ │ │ +1703 // A value_type object constructed with _Alloc_traits::construct() │ │ │ │ +1704 // and destroyed with _Alloc_traits::destroy(). │ │ │ │ +1705 struct _Temporary_value │ │ │ │ +1706 { │ │ │ │ +1707 template │ │ │ │ +1708 explicit │ │ │ │ +1709 _Temporary_value(_v_e_c_t_o_r* __vec, _Args&&... __args) : _M_this(__vec) │ │ │ │ +1710 { │ │ │ │ +1711 _Alloc_traits::construct(_M_this->_M_impl, _M_ptr(), │ │ │ │ +1712 _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(__args)...); │ │ │ │ +1713 } │ │ │ │ +1714 │ │ │ │ +1715 ~_Temporary_value() │ │ │ │ +1716 { _Alloc_traits::destroy(_M_this->_M_impl, _M_ptr()); } │ │ │ │ +1717 │ │ │ │ +1718 value_type& │ │ │ │ +1719 _M_val() { return *_M_ptr(); } │ │ │ │ +1720 │ │ │ │ +1721 private: │ │ │ │ +1722 _Tp* │ │ │ │ +1723 _M_ptr() { return reinterpret_cast<_Tp*>(&__buf); } │ │ │ │ +1724 │ │ │ │ +1725 _v_e_c_t_o_r* _M_this; │ │ │ │ +1726 typename aligned_storage::type __buf; │ │ │ │ +1727 }; │ │ │ │ +1728 │ │ │ │ +1729 // Called by insert(p,x) and other functions when insertion needs to │ │ │ │ +1730 // reallocate or move existing elements. _Arg is either _Tp& or _Tp. │ │ │ │ +1731 template │ │ │ │ +1732 void │ │ │ │ +1733 _M_insert_aux(iterator __position, _Arg&& __arg); │ │ │ │ +1734 │ │ │ │ +1735 template │ │ │ │ +1736 void │ │ │ │ +1737 _M_realloc_insert(iterator __position, _Args&&... __args); │ │ │ │ +1738 │ │ │ │ +1739 // Either move-construct at the end, or forward to _M_insert_aux. │ │ │ │ +1740 iterator │ │ │ │ +1741 _M_insert_rval(const_iterator __position, value_type&& __v); │ │ │ │ +1742 │ │ │ │ +1743 // Try to emplace at the end, otherwise forward to _M_insert_aux. │ │ │ │ +1744 template │ │ │ │ +1745 iterator │ │ │ │ +1746 _M_emplace_aux(const_iterator __position, _Args&&... __args); │ │ │ │ +1747 │ │ │ │ +1748 // Emplacing an rvalue of the correct type can use _M_insert_rval. │ │ │ │ +1749 iterator │ │ │ │ +1750 _M_emplace_aux(const_iterator __position, value_type&& __v) │ │ │ │ +1751 { return _M_insert_rval(__position, _s_t_d_:_:_m_o_v_e(__v)); } │ │ │ │ +1752#endif │ │ │ │ +1753 │ │ │ │ +1754 // Called by _M_fill_insert, _M_insert_aux etc. │ │ │ │ +1755 size_type │ │ │ │ +1756 _M_check_len(size_type __n, const char* __s) const │ │ │ │ +1757 { │ │ │ │ +1758 if (_m_a_x___s_i_z_e() - _s_i_z_e() < __n) │ │ │ │ +1759 __throw_length_error(__N(__s)); │ │ │ │ +1760 │ │ │ │ +1761 const size_type __len = _s_i_z_e() + (_s_t_d_:_:_m_a_x)(_s_i_z_e(), __n); │ │ │ │ +1762 return (__len < _s_i_z_e() || __len > _m_a_x___s_i_z_e()) ? _m_a_x___s_i_z_e() : __len; │ │ │ │ +1763 } │ │ │ │ +1764 │ │ │ │ +1765 // Called by constructors to check initial size. │ │ │ │ +1766 static size_type │ │ │ │ +1767 _S_check_init_len(size_type __n, const allocator_type& __a) │ │ │ │ +1768 { │ │ │ │ +1769 if (__n > _S_max_size(_Tp_alloc_type(__a))) │ │ │ │ +1770 __throw_length_error( │ │ │ │ +1771 __N("cannot create std::vector larger than max_size()")); │ │ │ │ +1772 return __n; │ │ │ │ +1773 } │ │ │ │ +1774 │ │ │ │ +1775 static size_type │ │ │ │ +1776 _S_max_size(const _Tp_alloc_type& __a) _GLIBCXX_NOEXCEPT │ │ │ │ +1777 { │ │ │ │ +1778 // std::distance(begin(), end()) cannot be greater than PTRDIFF_MAX, │ │ │ │ +1779 // and realistically we can't store more than PTRDIFF_MAX/sizeof(T) │ │ │ │ +1780 // (even if std::allocator_traits::max_size says we can). │ │ │ │ +1781 const size_t __diffmax │ │ │ │ +1782 = __gnu_cxx::__numeric_traits::__max / sizeof(_Tp); │ │ │ │ +1783 const size_t __allocmax = ___A_l_l_o_c___t_r_a_i_t_s_:_:_m_a_x___s_i_z_e(__a); │ │ │ │ +1784 return (_s_t_d_:_:_m_i_n)(__diffmax, __allocmax); │ │ │ │ +1785 } │ │ │ │ +1786 │ │ │ │ +1787 // Internal erase functions follow. │ │ │ │ +1788 │ │ │ │ +1789 // Called by erase(q1,q2), clear(), resize(), _M_fill_assign, │ │ │ │ +1790 // _M_assign_aux. │ │ │ │ +1791 void │ │ │ │ +1792 _M_erase_at_end(pointer __pos) _GLIBCXX_NOEXCEPT │ │ │ │ +1793 { │ │ │ │ +1794 if (size_type __n = this->_M_impl._M_finish - __pos) │ │ │ │ +1795 { │ │ │ │ +1796 _s_t_d_:_:___D_e_s_t_r_o_y(__pos, this->_M_impl._M_finish, │ │ │ │ +1797 _M_get_Tp_allocator()); │ │ │ │ +1798 this->_M_impl._M_finish = __pos; │ │ │ │ +1799 _GLIBCXX_ASAN_ANNOTATE_SHRINK(__n); │ │ │ │ +1800 } │ │ │ │ +1801 } │ │ │ │ +1802 │ │ │ │ +1803 iterator │ │ │ │ +1804 _M_erase(iterator __position); │ │ │ │ +1805 │ │ │ │ +1806 iterator │ │ │ │ +1807 _M_erase(iterator __first, iterator __last); │ │ │ │ +1808 │ │ │ │ +1809#if __cplusplus >= 201103L │ │ │ │ +1810 private: │ │ │ │ +1811 // Constant-time move assignment when source object's memory can be │ │ │ │ +1812 // moved, either because the source's allocator will move too │ │ │ │ +1813 // or because the allocators are equal. │ │ │ │ +1814 void │ │ │ │ +1815 _M_move_assign(_v_e_c_t_o_r&& __x, _t_r_u_e___t_y_p_e) noexcept │ │ │ │ +1816 { │ │ │ │ +1817 _v_e_c_t_o_r __tmp(_g_e_t___a_l_l_o_c_a_t_o_r()); │ │ │ │ +1818 this->_M_impl._M_swap_data(__x._M_impl); │ │ │ │ +1819 __tmp._M_impl._M_swap_data(__x._M_impl); │ │ │ │ +1820 std::__alloc_on_move(_M_get_Tp_allocator(), __x._M_get_Tp_allocator()); │ │ │ │ +1821 } │ │ │ │ +1822 │ │ │ │ +1823 // Do move assignment when it might not be possible to move source │ │ │ │ +1824 // object's memory, resulting in a linear-time operation. │ │ │ │ +1825 void │ │ │ │ +1826 _M_move_assign(_v_e_c_t_o_r&& __x, _f_a_l_s_e___t_y_p_e) │ │ │ │ +1827 { │ │ │ │ +1828 if (__x._M_get_Tp_allocator() == this->_M_get_Tp_allocator()) │ │ │ │ +1829 _M_move_assign(_s_t_d_:_:_m_o_v_e(__x), _t_r_u_e___t_y_p_e()); │ │ │ │ +1830 else │ │ │ │ +1831 { │ │ │ │ +1832 // The rvalue's allocator cannot be moved and is not equal, │ │ │ │ +1833 // so we need to individually move each element. │ │ │ │ +1834 this->_M_assign_aux(std::make_move_iterator(__x.begin()), │ │ │ │ +1835 std::make_move_iterator(__x.end()), │ │ │ │ +1836 std::random_access_iterator_tag()); │ │ │ │ +1837 __x.clear(); │ │ │ │ +1838 } │ │ │ │ +1839 } │ │ │ │ +1840#endif │ │ │ │ +1841 │ │ │ │ +1842 template │ │ │ │ +1843 _Up* │ │ │ │ +1844 _M_data_ptr(_Up* __ptr) const _GLIBCXX_NOEXCEPT │ │ │ │ +1845 { return __ptr; } │ │ │ │ +1846 │ │ │ │ +1847#if __cplusplus >= 201103L │ │ │ │ +1848 template │ │ │ │ +1849 typename std::pointer_traits<_Ptr>::element_type* │ │ │ │ +1850 _M_data_ptr(_Ptr __ptr) const │ │ │ │ +1851 { return _e_m_p_t_y() ? nullptr : std::__to_address(__ptr); } │ │ │ │ +1852#else │ │ │ │ +1853 template │ │ │ │ +1854 _Up* │ │ │ │ +1855 _M_data_ptr(_Up* __ptr) _GLIBCXX_NOEXCEPT │ │ │ │ +1856 { return __ptr; } │ │ │ │ +1857 │ │ │ │ +1858 template │ │ │ │ +1859 value_type* │ │ │ │ +1860 _M_data_ptr(_Ptr __ptr) │ │ │ │ +1861 { return _e_m_p_t_y() ? (value_type*)0 : __ptr.operator->(); } │ │ │ │ +1862 │ │ │ │ +1863 template │ │ │ │ +1864 const value_type* │ │ │ │ +1865 _M_data_ptr(_Ptr __ptr) const │ │ │ │ +1866 { return _e_m_p_t_y() ? (const value_type*)0 : __ptr.operator->(); } │ │ │ │ +1867#endif │ │ │ │ +1868 }; │ │ │ │ +1869 │ │ │ │ +1870#if __cpp_deduction_guides >= 201606 │ │ │ │ +1871 template_:_:_v_a_l_u_e___t_y_p_e, │ │ │ │ +1873 typename _Allocator = _a_l_l_o_c_a_t_o_r_<___V_a_l_T_>, │ │ │ │ +1874 typename = _RequireInputIter<_InputIterator>, │ │ │ │ +1875 typename = _RequireAllocator<_Allocator>> │ │ │ │ +1876 _v_e_c_t_o_r(_InputIterator, _InputIterator, _Allocator = _Allocator()) │ │ │ │ +1877 -> _v_e_c_t_o_r_<___V_a_l_T_,_ ___A_l_l_o_c_a_t_o_r_>; │ │ │ │ +1878#endif │ │ │ │ +1879 │ │ │ │ +1880 /** │ │ │ │ +1881 * @brief Vector equality comparison. │ │ │ │ +1882 * @param __x A %vector. │ │ │ │ +1883 * @param __y A %vector of the same type as @a __x. │ │ │ │ +1884 * @return True iff the size and elements of the vectors are equal. │ │ │ │ +1885 * │ │ │ │ +1886 * This is an equivalence relation. It is linear in the size of the │ │ │ │ +1887 * vectors. Vectors are considered equivalent if their sizes are equal, │ │ │ │ +1888 * and if corresponding elements compare equal. │ │ │ │ +1889 */ │ │ │ │ +1890 template │ │ │ │ +1891 inline bool │ │ │ │ +_1_8_9_2 operator==(const _v_e_c_t_o_r_<___T_p_,_ ___A_l_l_o_c_>& __x, const _v_e_c_t_o_r_<___T_p_,_ ___A_l_l_o_c_>& __y) │ │ │ │ +1893 { return (__x._s_i_z_e() == __y._s_i_z_e() │ │ │ │ +1894 && std::equal(__x._b_e_g_i_n(), __x._e_n_d(), __y._b_e_g_i_n())); } │ │ │ │ +1895 │ │ │ │ +1896#if __cpp_lib_three_way_comparison │ │ │ │ +1897 /** │ │ │ │ +1898 * @brief Vector ordering relation. │ │ │ │ +1899 * @param __x A `vector`. │ │ │ │ +1900 * @param __y A `vector` of the same type as `__x`. │ │ │ │ +1901 * @return A value indicating whether `__x` is less than, equal to, │ │ │ │ +1902 * greater than, or incomparable with `__y`. │ │ │ │ +1903 * │ │ │ │ +1904 * See `std::lexicographical_compare_three_way()` for how the determination │ │ │ │ +1905 * is made. This operator is used to synthesize relational operators like │ │ │ │ +1906 * `<` and `>=` etc. │ │ │ │ +1907 */ │ │ │ │ +1908 template │ │ │ │ +1909 inline __detail::__synth3way_t<_Tp> │ │ │ │ +1910 operator<=>(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& │ │ │ │ +__y) │ │ │ │ +1911 { │ │ │ │ +1912 return std::lexicographical_compare_three_way(__x.begin(), __x.end(), │ │ │ │ +1913 __y.begin(), __y.end(), │ │ │ │ +1914 __detail::__synth3way); │ │ │ │ +1915 } │ │ │ │ +1916#else │ │ │ │ +1917 /** │ │ │ │ +1918 * @brief Vector ordering relation. │ │ │ │ +1919 * @param __x A %vector. │ │ │ │ +1920 * @param __y A %vector of the same type as @a __x. │ │ │ │ +1921 * @return True iff @a __x is lexicographically less than @a __y. │ │ │ │ +1922 * │ │ │ │ +1923 * This is a total ordering relation. It is linear in the size of the │ │ │ │ +1924 * vectors. The elements must be comparable with @c <. │ │ │ │ +1925 * │ │ │ │ +1926 * See std::lexicographical_compare() for how the determination is made. │ │ │ │ +1927 */ │ │ │ │ +1928 template │ │ │ │ +_1_9_2_9 inline bool │ │ │ │ +1930 operator<(const _v_e_c_t_o_r_<___T_p_,_ ___A_l_l_o_c_>& __x, const _v_e_c_t_o_r_<___T_p_,_ ___A_l_l_o_c_>& __y) │ │ │ │ +1931 { return std::lexicographical_compare(__x._b_e_g_i_n(), __x._e_n_d(), │ │ │ │ +1932 __y._b_e_g_i_n(), __y._e_n_d()); } │ │ │ │ +1933 │ │ │ │ +1934 /// Based on operator== │ │ │ │ +1935 template │ │ │ │ +1936 inline bool │ │ │ │ +_1_9_3_7 operator!=(const _v_e_c_t_o_r_<___T_p_,_ ___A_l_l_o_c_>& __x, const _v_e_c_t_o_r_<___T_p_,_ ___A_l_l_o_c_>& __y) │ │ │ │ +1938 { return !(__x == __y); } │ │ │ │ +1939 │ │ │ │ +1940 /// Based on operator< │ │ │ │ +1941 template │ │ │ │ +1942 inline bool │ │ │ │ +_1_9_4_3 operator>(const _v_e_c_t_o_r_<___T_p_,_ ___A_l_l_o_c_>& __x, const _v_e_c_t_o_r_<___T_p_,_ ___A_l_l_o_c_>& __y) │ │ │ │ +1944 { return __y < __x; } │ │ │ │ +1945 │ │ │ │ +1946 /// Based on operator< │ │ │ │ +1947 template │ │ │ │ +_1_9_4_8 inline bool │ │ │ │ +1949 operator<=(const _v_e_c_t_o_r_<___T_p_,_ ___A_l_l_o_c_>& __x, const _v_e_c_t_o_r_<___T_p_,_ ___A_l_l_o_c_>& __y) │ │ │ │ +1950 { return !(__y < __x); } │ │ │ │ +1951 │ │ │ │ +1952 /// Based on operator< │ │ │ │ +1953 template │ │ │ │ +1954 inline bool │ │ │ │ +_1_9_5_5 operator>=(const _v_e_c_t_o_r_<___T_p_,_ ___A_l_l_o_c_>& __x, const _v_e_c_t_o_r_<___T_p_,_ ___A_l_l_o_c_>& __y) │ │ │ │ +1956 { return !(__x < __y); } │ │ │ │ +1957#endif // three-way comparison │ │ │ │ +1958 │ │ │ │ +1959 /// See std::vector::swap(). │ │ │ │ +1960 template │ │ │ │ +1961 inline void │ │ │ │ +_1_9_6_2 _s_w_a_p(_v_e_c_t_o_r_<___T_p_,_ ___A_l_l_o_c_>& __x, _v_e_c_t_o_r_<___T_p_,_ ___A_l_l_o_c_>& __y) │ │ │ │ +1963 _GLIBCXX_NOEXCEPT_IF(noexcept(__x.swap(__y))) │ │ │ │ +1964 { __x._s_w_a_p(__y); } │ │ │ │ +1965 │ │ │ │ +1966_GLIBCXX_END_NAMESPACE_CONTAINER │ │ │ │ +1967 │ │ │ │ +1968#if __cplusplus >= 201703L │ │ │ │ +1969 namespace __detail::__variant │ │ │ │ +1970 { │ │ │ │ +1971 template struct _Never_valueless_alt; // see │ │ │ │ +1972 │ │ │ │ +1973 // Provide the strong exception-safety guarantee when emplacing a │ │ │ │ +1974 // vector into a variant, but only if move assignment cannot throw. │ │ │ │ +1975 template │ │ │ │ +1976 struct _Never_valueless_alt<_GLIBCXX_STD_C::vector<_Tp, _Alloc>> │ │ │ │ +1977 : _s_t_d_:_:_i_s___n_o_t_h_r_o_w___m_o_v_e___a_s_s_i_g_n_a_b_l_e<_GLIBCXX_STD_C::vector<_Tp, _Alloc>> │ │ │ │ +1978 { }; │ │ │ │ +1979 } // namespace __detail::__variant │ │ │ │ +1980#endif // C++17 │ │ │ │ +1981 │ │ │ │ +1982_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ +1983} // namespace std │ │ │ │ +1984 │ │ │ │ +1985#endif /* _STL_VECTOR_H */ │ │ │ │ +_c_o_m_p_a_r_e │ │ │ │ +_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t │ │ │ │ +_c_o_n_c_e_p_t___c_h_e_c_k_._h │ │ │ │ +_f_u_n_c_t_e_x_c_e_p_t_._h │ │ │ │ +_s_t_l___i_t_e_r_a_t_o_r___b_a_s_e___f_u_n_c_s_._h │ │ │ │ +_a_s_s_e_r_t_i_o_n_s_._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_3 │ │ │ │ +_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_6 │ │ │ │ +_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_5_6 │ │ │ │ +_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_8 │ │ │ │ +_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_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_:_:_____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_:_:_b_a_s_i_c___i_s_t_r_e_a_m │ │ │ │ -Template class basic_istream. │ │ │ │ -DDeeffiinniittiioonn _i_s_t_r_e_a_m_:_5_9 │ │ │ │ -_s_t_d_:_:_b_a_s_i_c___o_s_t_r_e_a_m │ │ │ │ -Template class basic_ostream. │ │ │ │ -DDeeffiinniittiioonn _o_s_t_r_e_a_m_:_5_9 │ │ │ │ -_s_t_d_:_:_c_h_a_r___t_r_a_i_t_s │ │ │ │ -Basis for explicit traits specializations. │ │ │ │ -DDeeffiinniittiioonn _c_h_a_r___t_r_a_i_t_s_._h_:_3_3_9 │ │ │ │ +_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_3_8 │ │ │ │ +_s_t_d_:_:___D_e_s_t_r_o_y │ │ │ │ +void _Destroy(_ForwardIterator __first, _ForwardIterator __last, _Allocator │ │ │ │ +&__alloc) │ │ │ │ +DDeeffiinniittiioonn _b_i_t_s_/_a_l_l_o_c___t_r_a_i_t_s_._h_:_8_2_9 │ │ │ │ +_s_t_d_:_:_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t │ │ │ │ +initializer_list │ │ │ │ +DDeeffiinniittiioonn _i_n_i_t_i_a_l_i_z_e_r___l_i_s_t_:_4_8 │ │ │ │ +_s_t_d_:_:_i_s___s_a_m_e │ │ │ │ +is_same │ │ │ │ +DDeeffiinniittiioonn _t_y_p_e___t_r_a_i_t_s_:_1_4_0_9 │ │ │ │ +_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_3_3 │ │ │ │ +_s_t_d_:_:_i_s___n_o_t_h_r_o_w___m_o_v_e___a_s_s_i_g_n_a_b_l_e │ │ │ │ +is_nothrow_move_assignable │ │ │ │ +DDeeffiinniittiioonn _t_y_p_e___t_r_a_i_t_s_:_1_1_8_4 │ │ │ │ +_s_t_d_:_:_s_i_z_e___t_y_p_e │ │ │ │ +_s_t_d_:_:_a_l_l_o_c_a_t_o_r │ │ │ │ +The standard allocator, as per C++03 [20.4.1]. │ │ │ │ +DDeeffiinniittiioonn _a_l_l_o_c_a_t_o_r_._h_:_1_2_5 │ │ │ │ +_s_t_d_:_:_v_a_l_u_e___t_y_p_e │ │ │ │ +_s_t_d_:_:_r_e_v_e_r_s_e___i_t_e_r_a_t_o_r │ │ │ │ +DDeeffiinniittiioonn _b_i_t_s_/_s_t_l___i_t_e_r_a_t_o_r_._h_:_1_3_4 │ │ │ │ +_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 │ │ │ │ _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_<_ _o_u_t_p_u_t___i_t_e_r_a_t_o_r___t_a_g_,_ _v_o_i_d_,_ _v_o_i_d_,_ _v_o_i_d_,_ _v_o_i_d_ _>_:_:_d_i_f_f_e_r_e_n_c_e___t_y_p_e │ │ │ │ -void difference_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_4 │ │ │ │ -_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_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) │ │ │ │ -Return true if the iterators refer to different streams, or if one is at end- │ │ │ │ -of-stream and the other ... │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m___i_t_e_r_a_t_o_r_._h_:_1_5_3 │ │ │ │ -_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_1 │ │ │ │ -_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() │ │ │ │ -Construct end of input stream iterator. │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m___i_t_e_r_a_t_o_r_._h_:_6_7 │ │ │ │ -_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) │ │ │ │ -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_4_7 │ │ │ │ -_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_7_8 │ │ │ │ -_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_:_1_8_5 │ │ │ │ -_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) │ │ │ │ -Construct from an ostream. │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m___i_t_e_r_a_t_o_r_._h_:_2_0_1 │ │ │ │ -_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_:_1_8_6 │ │ │ │ -_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) │ │ │ │ -Copy constructor. │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m___i_t_e_r_a_t_o_r_._h_:_2_1_8 │ │ │ │ -_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_2_8 │ │ │ │ -_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_:_1_8_7 │ │ │ │ -_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) │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m___i_t_e_r_a_t_o_r_._h_:_2_1_4 │ │ │ │ +_s_t_d_:_:___V_e_c_t_o_r___b_a_s_e │ │ │ │ +See bits/stl_deque.h's _Deque_base for an explanation. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_8_5 │ │ │ │ +_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_:_3_9_0 │ │ │ │ +_s_t_d_:_:_v_e_c_t_o_r_:_:_v_e_c_t_o_r │ │ │ │ +vector(const vector &__x) │ │ │ │ +Vector copy constructor. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_5_5_3 │ │ │ │ +_s_t_d_:_:_v_e_c_t_o_r_:_:_v_e_c_t_o_r │ │ │ │ +vector(initializer_list< value_type > __l, const allocator_type │ │ │ │ +&__a=allocator_type()) │ │ │ │ +Builds a vector from an initializer list. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_6_2_5 │ │ │ │ +_s_t_d_:_:_v_e_c_t_o_r_:_:_r_e_s_i_z_e │ │ │ │ +void resize(size_type __new_size) │ │ │ │ +Resizes the vector to the specified number of elements. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_9_3_7 │ │ │ │ +_s_t_d_:_:_v_e_c_t_o_r_:_:_a_t │ │ │ │ +reference at(size_type __n) │ │ │ │ +Provides access to the data contained in the vector. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_1_0_9_2 │ │ │ │ +_s_t_d_:_:_v_e_c_t_o_r_:_:_v_e_c_t_o_r │ │ │ │ +vector()=default │ │ │ │ +Creates a vector with no elements. │ │ │ │ +_s_t_d_:_:_v_e_c_t_o_r_:_:_i_n_s_e_r_t │ │ │ │ +iterator insert(const_iterator __position, initializer_list< value_type > __l) │ │ │ │ +Inserts an initializer_list into the vector. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_1_3_1_0 │ │ │ │ +_s_t_d_:_:_v_e_c_t_o_r_:_:_f_r_o_n_t │ │ │ │ +const_reference front() const noexcept │ │ │ │ +DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_1_1_3_2 │ │ │ │ +_s_t_d_:_:_v_e_c_t_o_r_:_:_d_a_t_a │ │ │ │ +_Tp * data() noexcept │ │ │ │ +DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_1_1_6_8 │ │ │ │ +_s_t_d_:_:_v_e_c_t_o_r_:_:_e_r_a_s_e │ │ │ │ +iterator erase(const_iterator __position) │ │ │ │ +Remove element at given position. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_1_4_3_0 │ │ │ │ +_s_t_d_:_:_v_e_c_t_o_r_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ +vector & operator=(initializer_list< value_type > __l) │ │ │ │ +Vector list assignment operator. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_7_3_0 │ │ │ │ +_s_t_d_:_:_v_e_c_t_o_r_:_:_r_b_e_g_i_n │ │ │ │ +reverse_iterator rbegin() noexcept │ │ │ │ +DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_8_4_7 │ │ │ │ +_s_t_d_:_:_v_e_c_t_o_r_:_:___M___a_l_l_o_c_a_t_e___a_n_d___c_o_p_y │ │ │ │ +pointer _M_allocate_and_copy(size_type __n, _ForwardIterator __first, │ │ │ │ +_ForwardIterator __last) │ │ │ │ +DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_1_5_0_8 │ │ │ │ +_s_t_d_:_:_v_e_c_t_o_r_:_:_e_m_p_t_y │ │ │ │ +bool empty() const noexcept │ │ │ │ +DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_1_0_0_7 │ │ │ │ +_s_t_d_:_:_v_e_c_t_o_r_:_:_c_r_b_e_g_i_n │ │ │ │ +const_reverse_iterator crbegin() const noexcept │ │ │ │ +DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_9_0_2 │ │ │ │ +_s_t_d_:_:_v_e_c_t_o_r_:_:_i_n_s_e_r_t │ │ │ │ +iterator insert(const_iterator __position, _InputIterator __first, │ │ │ │ +_InputIterator __last) │ │ │ │ +Inserts a range into the vector. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_1_3_7_9 │ │ │ │ +_s_t_d_:_:_v_e_c_t_o_r_:_:_f_r_o_n_t │ │ │ │ +reference front() noexcept │ │ │ │ +DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_1_1_2_1 │ │ │ │ +_s_t_d_:_:_v_e_c_t_o_r_:_:_i_n_s_e_r_t │ │ │ │ +iterator insert(const_iterator __position, size_type __n, const value_type │ │ │ │ +&__x) │ │ │ │ +Inserts a number of copies of given data into the vector. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_1_3_3_5 │ │ │ │ +_s_t_d_:_:_v_e_c_t_o_r_:_:_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 _s_t_l___v_e_c_t_o_r_._h_:_2_8_4 │ │ │ │ +_s_t_d_:_:_v_e_c_t_o_r_:_:_s_h_r_i_n_k___t_o___f_i_t │ │ │ │ +void shrink_to_fit() │ │ │ │ +DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_9_8_9 │ │ │ │ +_s_t_d_:_:_v_e_c_t_o_r_:_:_v_e_c_t_o_r │ │ │ │ +vector(size_type __n, const value_type &__value, const allocator_type │ │ │ │ +&__a=allocator_type()) │ │ │ │ +Creates a vector with copies of an exemplar element. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_5_2_2 │ │ │ │ +_s_t_d_:_:_v_e_c_t_o_r_:_:_r_e_n_d │ │ │ │ +reverse_iterator rend() noexcept │ │ │ │ +DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_8_6_5 │ │ │ │ +_s_t_d_:_:_v_e_c_t_o_r_:_:_r_e_s_i_z_e │ │ │ │ +void resize(size_type __new_size, const value_type &__x) │ │ │ │ +Resizes the vector to the specified number of elements. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_9_5_7 │ │ │ │ +_s_t_d_:_:_v_e_c_t_o_r_:_:_c_l_e_a_r │ │ │ │ +void clear() noexcept │ │ │ │ +DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_1_4_9_8 │ │ │ │ +_s_t_d_:_:_v_e_c_t_o_r_:_:_v_e_c_t_o_r │ │ │ │ +vector(size_type __n, const allocator_type &__a=allocator_type()) │ │ │ │ +Creates a vector with default constructed elements. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_5_1_0 │ │ │ │ +_s_t_d_:_:_v_e_c_t_o_r_:_:_p_u_s_h___b_a_c_k │ │ │ │ +void push_back(const value_type &__x) │ │ │ │ +Add data to the end of the vector. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_1_1_8_7 │ │ │ │ +_s_t_d_:_:_v_e_c_t_o_r_:_:_~_v_e_c_t_o_r │ │ │ │ +~vector() noexcept │ │ │ │ +DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_6_7_8 │ │ │ │ +_s_t_d_:_:_v_e_c_t_o_r_:_:_o_p_e_r_a_t_o_r_[_] │ │ │ │ +const_reference operator[](size_type __n) const noexcept │ │ │ │ +Subscript access to the data contained in the vector. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_1_0_6_1 │ │ │ │ +_s_t_d_:_:_v_e_c_t_o_r_:_:_m_a_x___s_i_z_e │ │ │ │ +size_type max_size() const noexcept │ │ │ │ +DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_9_2_3 │ │ │ │ +_s_t_d_:_:_v_e_c_t_o_r_:_:_c_r_e_n_d │ │ │ │ +const_reverse_iterator crend() const noexcept │ │ │ │ +DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_9_1_1 │ │ │ │ +_s_t_d_:_:_v_e_c_t_o_r_:_:_i_n_s_e_r_t │ │ │ │ +iterator insert(const_iterator __position, value_type &&__x) │ │ │ │ +Inserts given rvalue into vector before specified iterator. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_1_2_9_3 │ │ │ │ +_s_t_d_:_:_v_e_c_t_o_r_:_:___M___r_a_n_g_e___c_h_e_c_k │ │ │ │ +void _M_range_check(size_type __n) const │ │ │ │ +Safety check used only from at(). │ │ │ │ +DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_1_0_7_0 │ │ │ │ +_s_t_d_:_:_v_e_c_t_o_r_:_:_r_e_s_e_r_v_e │ │ │ │ +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_7 │ │ │ │ +_s_t_d_:_:_v_e_c_t_o_r_:_:_v_e_c_t_o_r │ │ │ │ +vector(_InputIterator __first, _InputIterator __last, const allocator_type │ │ │ │ +&__a=allocator_type()) │ │ │ │ +Builds a vector from a range. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_6_5_3 │ │ │ │ +_s_t_d_:_:_v_e_c_t_o_r_:_:_b_e_g_i_n │ │ │ │ +const_iterator begin() const noexcept │ │ │ │ +DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_8_2_0 │ │ │ │ +_s_t_d_:_:_v_e_c_t_o_r_:_:_a_s_s_i_g_n │ │ │ │ +void assign(size_type __n, const value_type &__val) │ │ │ │ +Assigns a given value to a vector. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_7_4_9 │ │ │ │ +_s_t_d_:_:_v_e_c_t_o_r_:_:_s_w_a_p │ │ │ │ +void swap(vector &__x) noexcept │ │ │ │ +Swaps data with another vector. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_1_4_8_0 │ │ │ │ +_s_t_d_:_:_v_e_c_t_o_r_:_:_p_o_p___b_a_c_k │ │ │ │ +void pop_back() noexcept │ │ │ │ +Removes last element. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_1_2_2_5 │ │ │ │ +_s_t_d_:_:_v_e_c_t_o_r_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ +vector & operator=(const vector &__x) │ │ │ │ +Vector assignment operator. │ │ │ │ +DDeeffiinniittiioonn _v_e_c_t_o_r_._t_c_c_:_1_9_9 │ │ │ │ +_s_t_d_:_:_v_e_c_t_o_r_:_:_r_e_n_d │ │ │ │ +const_reverse_iterator rend() const noexcept │ │ │ │ +DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_8_7_4 │ │ │ │ +_s_t_d_:_:_v_e_c_t_o_r_:_:_c_b_e_g_i_n │ │ │ │ +const_iterator cbegin() const noexcept │ │ │ │ +DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_8_8_4 │ │ │ │ +_s_t_d_:_:_v_e_c_t_o_r_:_:_a_t │ │ │ │ +const_reference at(size_type __n) const │ │ │ │ +Provides access to the data contained in the vector. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_1_1_1_0 │ │ │ │ +_s_t_d_:_:_v_e_c_t_o_r_:_:_c_e_n_d │ │ │ │ +const_iterator cend() const noexcept │ │ │ │ +DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_8_9_3 │ │ │ │ +_s_t_d_:_:_v_e_c_t_o_r_:_:_e_r_a_s_e │ │ │ │ +iterator erase(const_iterator __first, const_iterator __last) │ │ │ │ +Remove a range of elements. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_1_4_5_7 │ │ │ │ +_s_t_d_:_:_v_e_c_t_o_r_:_:_v_e_c_t_o_r │ │ │ │ +vector(vector &&) noexcept=default │ │ │ │ +Vector move constructor. │ │ │ │ +_s_t_d_:_:_v_e_c_t_o_r_:_:_v_e_c_t_o_r │ │ │ │ +vector(const allocator_type &__a) noexcept │ │ │ │ +Creates a vector with no elements. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_4_9_7 │ │ │ │ +_s_t_d_:_:_v_e_c_t_o_r_:_:_e_m_p_l_a_c_e │ │ │ │ +iterator emplace(const_iterator __position, _Args &&... __args) │ │ │ │ +Inserts an object in vector before specified iterator. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_1_2_4_8 │ │ │ │ +_s_t_d_:_:_v_e_c_t_o_r_:_:_r_b_e_g_i_n │ │ │ │ +const_reverse_iterator rbegin() const noexcept │ │ │ │ +DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_8_5_6 │ │ │ │ +_s_t_d_:_:_v_e_c_t_o_r_:_:_b_e_g_i_n │ │ │ │ +iterator begin() noexcept │ │ │ │ +DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_8_1_1 │ │ │ │ +_s_t_d_:_:_v_e_c_t_o_r_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ +vector & operator=(vector &&__x) noexcept(_Alloc_traits::_S_nothrow_move()) │ │ │ │ +Vector move assignment operator. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_7_0_9 │ │ │ │ +_s_t_d_:_:_v_e_c_t_o_r_:_:_b_a_c_k │ │ │ │ +reference back() noexcept │ │ │ │ +DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_1_1_4_3 │ │ │ │ +_s_t_d_:_:_v_e_c_t_o_r_:_:_a_s_s_i_g_n │ │ │ │ +void assign(_InputIterator __first, _InputIterator __last) │ │ │ │ +Assigns a range to a vector. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_7_6_8 │ │ │ │ +_s_t_d_:_:_v_e_c_t_o_r_:_:_a_s_s_i_g_n │ │ │ │ +void assign(initializer_list< value_type > __l) │ │ │ │ +Assigns an initializer list to a vector. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_7_9_4 │ │ │ │ +_s_t_d_:_:_v_e_c_t_o_r_:_:_i_n_s_e_r_t │ │ │ │ +iterator insert(const_iterator __position, const value_type &__x) │ │ │ │ +Inserts given value into vector before specified iterator. │ │ │ │ +DDeeffiinniittiioonn _v_e_c_t_o_r_._t_c_c_:_1_3_2 │ │ │ │ +_s_t_d_:_:_v_e_c_t_o_r_:_:_b_a_c_k │ │ │ │ +const_reference back() const noexcept │ │ │ │ +DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_1_1_5_4 │ │ │ │ +_s_t_d_:_:_v_e_c_t_o_r_:_:_e_n_d │ │ │ │ +const_iterator end() const noexcept │ │ │ │ +DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_8_3_8 │ │ │ │ +_s_t_d_:_:_v_e_c_t_o_r_:_:_e_n_d │ │ │ │ +iterator end() noexcept │ │ │ │ +DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_8_2_9 │ │ │ │ +_s_t_d_:_:_v_e_c_t_o_r_:_:_v_e_c_t_o_r │ │ │ │ +vector(vector &&__rv, const allocator_type &__m) noexcept(noexcept(vector(std:: │ │ │ │ +declval< vector && >(), std::declval< const allocator_type & >(), std::declval< │ │ │ │ +typename _Alloc_traits::is_always_equal >()))) │ │ │ │ +Move constructor with alternative allocator. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_6_0_7 │ │ │ │ +_s_t_d_:_:_v_e_c_t_o_r_<_ ___T_p_,_ _p_o_l_y_m_o_r_p_h_i_c___a_l_l_o_c_a_t_o_r_<_ ___T_p_ _>_ _>_:_:_s_i_z_e │ │ │ │ +size_type size() const noexcept │ │ │ │ +DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_9_1_8 │ │ │ │ +_s_t_d_:_:_v_e_c_t_o_r_:_:_c_a_p_a_c_i_t_y │ │ │ │ +size_type capacity() const noexcept │ │ │ │ +DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_9_9_8 │ │ │ │ +_s_t_d_:_:_v_e_c_t_o_r_:_:_o_p_e_r_a_t_o_r_[_] │ │ │ │ +reference operator[](size_type __n) noexcept │ │ │ │ +Subscript access to the data contained in the vector. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_1_0_4_3 │ │ │ │ +_____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_<_ ___T_p___a_l_l_o_c___t_y_p_e_ _>_:_:_m_a_x___s_i_z_e │ │ │ │ +static constexpr size_type max_size(const _Tp_alloc_type &__a) noexcept │ │ │ │ * bbiittss │ │ │ │ - * _s_t_r_e_a_m___i_t_e_r_a_t_o_r_._h │ │ │ │ + * _s_t_l___v_e_c_t_o_r_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.15.0 │ │ ├── ./usr/share/doc/gcc-11-base/libstdc++/user/a00398.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: stl_vector.h File Reference │ │ │ +libstdc++: random.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -48,161 +48,192 @@ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
stl_vector.h File Reference
│ │ │ +
random.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │

Go to the source code of this file.

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

│ │ │ Classes

struct  std::_Vector_base< _Tp, _Alloc >
class  std::vector< _Tp, _Alloc >
class  std::bernoulli_distribution
class  std::binomial_distribution< _IntType >
class  std::cauchy_distribution< _RealType >
class  std::chi_squared_distribution< _RealType >
class  std::discard_block_engine< _RandomNumberEngine, __p, __r >
class  std::discrete_distribution< _IntType >
class  std::exponential_distribution< _RealType >
class  std::extreme_value_distribution< _RealType >
class  std::fisher_f_distribution< _RealType >
class  std::gamma_distribution< _RealType >
class  std::geometric_distribution< _IntType >
class  std::independent_bits_engine< _RandomNumberEngine, __w, _UIntType >
class  std::linear_congruential_engine< _UIntType, __a, __c, __m >
class  std::lognormal_distribution< _RealType >
class  std::mersenne_twister_engine< _UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f >
class  std::negative_binomial_distribution< _IntType >
class  std::normal_distribution< _RealType >
struct  std::uniform_real_distribution< _RealType >::param_type
struct  std::normal_distribution< _RealType >::param_type
struct  std::lognormal_distribution< _RealType >::param_type
struct  std::gamma_distribution< _RealType >::param_type
struct  std::chi_squared_distribution< _RealType >::param_type
struct  std::cauchy_distribution< _RealType >::param_type
struct  std::fisher_f_distribution< _RealType >::param_type
struct  std::student_t_distribution< _RealType >::param_type
struct  std::bernoulli_distribution::param_type
struct  std::binomial_distribution< _IntType >::param_type
struct  std::geometric_distribution< _IntType >::param_type
struct  std::negative_binomial_distribution< _IntType >::param_type
struct  std::poisson_distribution< _IntType >::param_type
struct  std::exponential_distribution< _RealType >::param_type
struct  std::weibull_distribution< _RealType >::param_type
struct  std::extreme_value_distribution< _RealType >::param_type
struct  std::discrete_distribution< _IntType >::param_type
struct  std::piecewise_constant_distribution< _RealType >::param_type
struct  std::piecewise_linear_distribution< _RealType >::param_type
class  std::piecewise_constant_distribution< _RealType >
class  std::piecewise_linear_distribution< _RealType >
class  std::poisson_distribution< _IntType >
class  std::random_device
class  std::seed_seq
class  std::shuffle_order_engine< _RandomNumberEngine, __k >
class  std::student_t_distribution< _RealType >
class  std::subtract_with_carry_engine< _UIntType, __w, __s, __r >
class  std::uniform_real_distribution< _RealType >
class  std::weibull_distribution< _RealType >
│ │ │ │ │ │ │ │ │ - │ │ │

│ │ │ Namespaces

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

│ │ │ -Macros

#define _GLIBCXX_ASAN_ANNOTATE_BEFORE_DEALLOC
#define _GLIBCXX_ASAN_ANNOTATE_GREW(n)
#define _GLIBCXX_ASAN_ANNOTATE_GROW(n)
#define _GLIBCXX_ASAN_ANNOTATE_REINIT
#define _GLIBCXX_ASAN_ANNOTATE_SHRINK(n)

│ │ │ +Typedefs

typedef minstd_rand0 std::default_random_engine
typedef shuffle_order_engine< minstd_rand0, 256 > std::knuth_b
typedef linear_congruential_engine< uint_fast32_t, 48271UL, 0UL, 2147483647UL > std::minstd_rand
typedef linear_congruential_engine< uint_fast32_t, 16807UL, 0UL, 2147483647UL > std::minstd_rand0
typedef mersenne_twister_engine< uint_fast32_t, 32, 624, 397, 31, 0x9908b0dfUL, 11, 0xffffffffUL, 7, 0x9d2c5680UL, 15, 0xefc60000UL, 18, 1812433253UL > std::mt19937
typedef mersenne_twister_engine< uint_fast64_t, 64, 312, 156, 31, 0xb5026f5aa96619e9ULL, 29, 0x5555555555555555ULL, 17, 0x71d67fffeda60000ULL, 37, 0xfff7eee000000000ULL, 43, 6364136223846793005ULL > std::mt19937_64
typedef discard_block_engine< ranlux24_base, 223, 23 > std::ranlux24
typedef subtract_with_carry_engine< uint_fast32_t, 24, 10, 24 > std::ranlux24_base
typedef discard_block_engine< ranlux48_base, 389, 11 > std::ranlux48
typedef subtract_with_carry_engine< uint_fast64_t, 48, 5, 12 > std::ranlux48_base
│ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ Functions

template<typename _Tp, typename _Alloc>
bool std::operator!= (const vector< _Tp, _Alloc > &__x, const vector< _Tp, _Alloc > &__y)
template<typename _Tp, typename _Alloc>
bool std::operator< (const vector< _Tp, _Alloc > &__x, const vector< _Tp, _Alloc > &__y)
template<typename _Tp, typename _Alloc>
bool std::operator<= (const vector< _Tp, _Alloc > &__x, const vector< _Tp, _Alloc > &__y)
template<typename _Tp, typename _Alloc>
bool std::operator== (const vector< _Tp, _Alloc > &__x, const vector< _Tp, _Alloc > &__y)
template<typename _Tp, typename _Alloc>
bool std::operator> (const vector< _Tp, _Alloc > &__x, const vector< _Tp, _Alloc > &__y)
template<typename _Tp, typename _Alloc>
bool std::operator>= (const vector< _Tp, _Alloc > &__x, const vector< _Tp, _Alloc > &__y)
template<typename _Tp, typename _Alloc>
void std::swap (vector< _Tp, _Alloc > &__x, vector< _Tp, _Alloc > &__y) noexcept(/*conditional */)
template<typename _RealType, size_t __bits, typename _UniformRandomNumberGenerator>
_RealType std::generate_canonical (_UniformRandomNumberGenerator &__g)
bool std::operator!= (const std::bernoulli_distribution &__d1, const std::bernoulli_distribution &__d2)
template<typename _IntType>
bool std::operator!= (const std::binomial_distribution< _IntType > &__d1, const std::binomial_distribution< _IntType > &__d2)
template<typename _RealType>
bool std::operator!= (const std::cauchy_distribution< _RealType > &__d1, const std::cauchy_distribution< _RealType > &__d2)
template<typename _RealType>
bool std::operator!= (const std::chi_squared_distribution< _RealType > &__d1, const std::chi_squared_distribution< _RealType > &__d2)
template<typename _RandomNumberEngine, size_t __p, size_t __r>
bool std::operator!= (const std::discard_block_engine< _RandomNumberEngine, __p, __r > &__lhs, const std::discard_block_engine< _RandomNumberEngine, __p, __r > &__rhs)
template<typename _IntType>
bool std::operator!= (const std::discrete_distribution< _IntType > &__d1, const std::discrete_distribution< _IntType > &__d2)
template<typename _RealType>
bool std::operator!= (const std::exponential_distribution< _RealType > &__d1, const std::exponential_distribution< _RealType > &__d2)
template<typename _RealType>
bool std::operator!= (const std::extreme_value_distribution< _RealType > &__d1, const std::extreme_value_distribution< _RealType > &__d2)
template<typename _RealType>
bool std::operator!= (const std::fisher_f_distribution< _RealType > &__d1, const std::fisher_f_distribution< _RealType > &__d2)
template<typename _RealType>
bool std::operator!= (const std::gamma_distribution< _RealType > &__d1, const std::gamma_distribution< _RealType > &__d2)
template<typename _IntType>
bool std::operator!= (const std::geometric_distribution< _IntType > &__d1, const std::geometric_distribution< _IntType > &__d2)
template<typename _RandomNumberEngine, size_t __w, typename _UIntType>
bool std::operator!= (const std::independent_bits_engine< _RandomNumberEngine, __w, _UIntType > &__lhs, const std::independent_bits_engine< _RandomNumberEngine, __w, _UIntType > &__rhs)
template<typename _UIntType, _UIntType __a, _UIntType __c, _UIntType __m>
bool std::operator!= (const std::linear_congruential_engine< _UIntType, __a, __c, __m > &__lhs, const std::linear_congruential_engine< _UIntType, __a, __c, __m > &__rhs)
template<typename _RealType>
bool std::operator!= (const std::lognormal_distribution< _RealType > &__d1, const std::lognormal_distribution< _RealType > &__d2)
template<typename _UIntType, size_t __w, size_t __n, size_t __m, size_t __r, _UIntType __a, size_t __u, _UIntType __d, size_t __s, _UIntType __b, size_t __t, _UIntType __c, size_t __l, _UIntType __f>
bool std::operator!= (const std::mersenne_twister_engine< _UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f > &__lhs, const std::mersenne_twister_engine< _UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f > &__rhs)
template<typename _IntType>
bool std::operator!= (const std::negative_binomial_distribution< _IntType > &__d1, const std::negative_binomial_distribution< _IntType > &__d2)
template<typename _RealType>
bool std::operator!= (const std::normal_distribution< _RealType > &__d1, const std::normal_distribution< _RealType > &__d2)
template<typename _RealType>
bool std::operator!= (const std::piecewise_constant_distribution< _RealType > &__d1, const std::piecewise_constant_distribution< _RealType > &__d2)
template<typename _RealType>
bool std::operator!= (const std::piecewise_linear_distribution< _RealType > &__d1, const std::piecewise_linear_distribution< _RealType > &__d2)
template<typename _IntType>
bool std::operator!= (const std::poisson_distribution< _IntType > &__d1, const std::poisson_distribution< _IntType > &__d2)
template<typename _RandomNumberEngine, size_t __k>
bool std::operator!= (const std::shuffle_order_engine< _RandomNumberEngine, __k > &__lhs, const std::shuffle_order_engine< _RandomNumberEngine, __k > &__rhs)
template<typename _RealType>
bool std::operator!= (const std::student_t_distribution< _RealType > &__d1, const std::student_t_distribution< _RealType > &__d2)
template<typename _UIntType, size_t __w, size_t __s, size_t __r>
bool std::operator!= (const std::subtract_with_carry_engine< _UIntType, __w, __s, __r > &__lhs, const std::subtract_with_carry_engine< _UIntType, __w, __s, __r > &__rhs)
template<typename _IntType>
bool std::operator!= (const std::uniform_int_distribution< _IntType > &__d1, const std::uniform_int_distribution< _IntType > &__d2)
template<typename _IntType>
bool std::operator!= (const std::uniform_real_distribution< _IntType > &__d1, const std::uniform_real_distribution< _IntType > &__d2)
template<typename _RealType>
bool std::operator!= (const std::weibull_distribution< _RealType > &__d1, const std::weibull_distribution< _RealType > &__d2)
template<typename _IntType, typename _CharT, typename _Traits>
std::basic_ostream< _CharT, _Traits > & std::operator<< (std::basic_ostream< _CharT, _Traits > &, const std::uniform_int_distribution< _IntType > &)
template<typename _RealType, typename _CharT, typename _Traits>
std::basic_ostream< _CharT, _Traits > & std::operator<< (std::basic_ostream< _CharT, _Traits > &, const std::uniform_real_distribution< _RealType > &)
template<typename _CharT, typename _Traits>
std::basic_ostream< _CharT, _Traits > & std::operator<< (std::basic_ostream< _CharT, _Traits > &__os, const std::bernoulli_distribution &__x)
template<typename _RealType, typename _CharT, typename _Traits>
std::basic_ostream< _CharT, _Traits > & std::operator<< (std::basic_ostream< _CharT, _Traits > &__os, const std::cauchy_distribution< _RealType > &__x)
template<typename _RealType, typename _CharT, typename _Traits>
std::basic_ostream< _CharT, _Traits > & std::operator<< (std::basic_ostream< _CharT, _Traits > &__os, const std::exponential_distribution< _RealType > &__x)
template<typename _RealType, typename _CharT, typename _Traits>
std::basic_ostream< _CharT, _Traits > & std::operator<< (std::basic_ostream< _CharT, _Traits > &__os, const std::extreme_value_distribution< _RealType > &__x)
template<typename _IntType, typename _CharT, typename _Traits>
std::basic_ostream< _CharT, _Traits > & std::operator<< (std::basic_ostream< _CharT, _Traits > &__os, const std::geometric_distribution< _IntType > &__x)
template<typename _RandomNumberEngine, size_t __w, typename _UIntType, typename _CharT, typename _Traits>
std::basic_ostream< _CharT, _Traits > & std::operator<< (std::basic_ostream< _CharT, _Traits > &__os, const std::independent_bits_engine< _RandomNumberEngine, __w, _UIntType > &__x)
template<typename _RealType, typename _CharT, typename _Traits>
std::basic_ostream< _CharT, _Traits > & std::operator<< (std::basic_ostream< _CharT, _Traits > &__os, const std::weibull_distribution< _RealType > &__x)
template<typename _IntType, typename _CharT, typename _Traits>
std::basic_istream< _CharT, _Traits > & std::operator>> (std::basic_istream< _CharT, _Traits > &, std::uniform_int_distribution< _IntType > &)
template<typename _RealType, typename _CharT, typename _Traits>
std::basic_istream< _CharT, _Traits > & std::operator>> (std::basic_istream< _CharT, _Traits > &, std::uniform_real_distribution< _RealType > &)
template<typename _CharT, typename _Traits>
std::basic_istream< _CharT, _Traits > & std::operator>> (std::basic_istream< _CharT, _Traits > &__is, std::bernoulli_distribution &__x)
template<typename _RealType, typename _CharT, typename _Traits>
std::basic_istream< _CharT, _Traits > & std::operator>> (std::basic_istream< _CharT, _Traits > &__is, std::cauchy_distribution< _RealType > &__x)
template<typename _RealType, typename _CharT, typename _Traits>
std::basic_istream< _CharT, _Traits > & std::operator>> (std::basic_istream< _CharT, _Traits > &__is, std::exponential_distribution< _RealType > &__x)
template<typename _RealType, typename _CharT, typename _Traits>
std::basic_istream< _CharT, _Traits > & std::operator>> (std::basic_istream< _CharT, _Traits > &__is, std::extreme_value_distribution< _RealType > &__x)
template<typename _IntType, typename _CharT, typename _Traits>
std::basic_istream< _CharT, _Traits > & std::operator>> (std::basic_istream< _CharT, _Traits > &__is, std::geometric_distribution< _IntType > &__x)
template<typename _RealType, typename _CharT, typename _Traits>
std::basic_istream< _CharT, _Traits > & std::operator>> (std::basic_istream< _CharT, _Traits > &__is, std::weibull_distribution< _RealType > &__x)
│ │ │

Detailed Description

│ │ │ -

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

│ │ │ +

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

│ │ │ │ │ │ -

Definition in file stl_vector.h.

│ │ │ -

Macro Definition Documentation

│ │ │ - │ │ │ -

◆ _GLIBCXX_ASAN_ANNOTATE_BEFORE_DEALLOC

│ │ │ - │ │ │ -
│ │ │ -
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
#define _GLIBCXX_ASAN_ANNOTATE_BEFORE_DEALLOC
│ │ │ -
│ │ │ - │ │ │ -

Definition at line 268 of file stl_vector.h.

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

◆ _GLIBCXX_ASAN_ANNOTATE_GREW

│ │ │ - │ │ │ -
│ │ │ -
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
#define _GLIBCXX_ASAN_ANNOTATE_GREW( n)
│ │ │ -
│ │ │ - │ │ │ -

Definition at line 266 of file stl_vector.h.

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

◆ _GLIBCXX_ASAN_ANNOTATE_GROW

│ │ │ - │ │ │ -
│ │ │ -
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
#define _GLIBCXX_ASAN_ANNOTATE_GROW( n)
│ │ │ -
│ │ │ - │ │ │ -

Definition at line 265 of file stl_vector.h.

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

◆ _GLIBCXX_ASAN_ANNOTATE_REINIT

│ │ │ - │ │ │ -
│ │ │ -
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
#define _GLIBCXX_ASAN_ANNOTATE_REINIT
│ │ │ -
│ │ │ - │ │ │ -

Definition at line 264 of file stl_vector.h.

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

◆ _GLIBCXX_ASAN_ANNOTATE_SHRINK

│ │ │ - │ │ │ -
│ │ │ -
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
#define _GLIBCXX_ASAN_ANNOTATE_SHRINK( n)
│ │ │ -
│ │ │ - │ │ │ -

Definition at line 267 of file stl_vector.h.

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

Definition in file random.h.

│ │ │ +
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,60 +1,316 @@ │ │ │ │ libstdc++ │ │ │ │ -stl_vector.h File Reference │ │ │ │ +random.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_:_:___V_e_c_t_o_r___b_a_s_e_<_ ___T_p_,_ ___A_l_l_o_c_ _> │ │ │ │ - class   _s_t_d_:_:_v_e_c_t_o_r_<_ ___T_p_,_ ___A_l_l_o_c_ _> │ │ │ │ + class   _s_t_d_:_:_b_e_r_n_o_u_l_l_i___d_i_s_t_r_i_b_u_t_i_o_n │ │ │ │ + class   _s_t_d_:_:_b_i_n_o_m_i_a_l___d_i_s_t_r_i_b_u_t_i_o_n_<_ ___I_n_t_T_y_p_e_ _> │ │ │ │ + class   _s_t_d_:_:_c_a_u_c_h_y___d_i_s_t_r_i_b_u_t_i_o_n_<_ ___R_e_a_l_T_y_p_e_ _> │ │ │ │ + class   _s_t_d_:_:_c_h_i___s_q_u_a_r_e_d___d_i_s_t_r_i_b_u_t_i_o_n_<_ ___R_e_a_l_T_y_p_e_ _> │ │ │ │ + class   _s_t_d_:_:_d_i_s_c_a_r_d___b_l_o_c_k___e_n_g_i_n_e_<_ ___R_a_n_d_o_m_N_u_m_b_e_r_E_n_g_i_n_e_,_ _____p_,_ _____r_ _> │ │ │ │ + class   _s_t_d_:_:_d_i_s_c_r_e_t_e___d_i_s_t_r_i_b_u_t_i_o_n_<_ ___I_n_t_T_y_p_e_ _> │ │ │ │ + class   _s_t_d_:_:_e_x_p_o_n_e_n_t_i_a_l___d_i_s_t_r_i_b_u_t_i_o_n_<_ ___R_e_a_l_T_y_p_e_ _> │ │ │ │ + class   _s_t_d_:_:_e_x_t_r_e_m_e___v_a_l_u_e___d_i_s_t_r_i_b_u_t_i_o_n_<_ ___R_e_a_l_T_y_p_e_ _> │ │ │ │ + class   _s_t_d_:_:_f_i_s_h_e_r___f___d_i_s_t_r_i_b_u_t_i_o_n_<_ ___R_e_a_l_T_y_p_e_ _> │ │ │ │ + class   _s_t_d_:_:_g_a_m_m_a___d_i_s_t_r_i_b_u_t_i_o_n_<_ ___R_e_a_l_T_y_p_e_ _> │ │ │ │ + class   _s_t_d_:_:_g_e_o_m_e_t_r_i_c___d_i_s_t_r_i_b_u_t_i_o_n_<_ ___I_n_t_T_y_p_e_ _> │ │ │ │ + class   _s_t_d_:_:_i_n_d_e_p_e_n_d_e_n_t___b_i_t_s___e_n_g_i_n_e_<_ ___R_a_n_d_o_m_N_u_m_b_e_r_E_n_g_i_n_e_,_ _____w_,_ ___U_I_n_t_T_y_p_e_ _> │ │ │ │ + class   _s_t_d_:_:_l_i_n_e_a_r___c_o_n_g_r_u_e_n_t_i_a_l___e_n_g_i_n_e_<_ ___U_I_n_t_T_y_p_e_,_ _____a_,_ _____c_,_ _____m_ _> │ │ │ │ + class   _s_t_d_:_:_l_o_g_n_o_r_m_a_l___d_i_s_t_r_i_b_u_t_i_o_n_<_ ___R_e_a_l_T_y_p_e_ _> │ │ │ │ + class   _s_t_d_:_:_m_e_r_s_e_n_n_e___t_w_i_s_t_e_r___e_n_g_i_n_e_<_ ___U_I_n_t_T_y_p_e_,_ _____w_,_ _____n_,_ _____m_,_ _____r_,_ _____a_,_ _____u_, │ │ │ │ + _____d_,_ _____s_,_ _____b_,_ _____t_,_ _____c_,_ _____l_,_ _____f_ _> │ │ │ │ + class   _s_t_d_:_:_n_e_g_a_t_i_v_e___b_i_n_o_m_i_a_l___d_i_s_t_r_i_b_u_t_i_o_n_<_ ___I_n_t_T_y_p_e_ _> │ │ │ │ + class   _s_t_d_:_:_n_o_r_m_a_l___d_i_s_t_r_i_b_u_t_i_o_n_<_ ___R_e_a_l_T_y_p_e_ _> │ │ │ │ +struct   _s_t_d_:_:_u_n_i_f_o_r_m___r_e_a_l___d_i_s_t_r_i_b_u_t_i_o_n_<_ ___R_e_a_l_T_y_p_e_ _>_:_:_p_a_r_a_m___t_y_p_e │ │ │ │ +struct   _s_t_d_:_:_n_o_r_m_a_l___d_i_s_t_r_i_b_u_t_i_o_n_<_ ___R_e_a_l_T_y_p_e_ _>_:_:_p_a_r_a_m___t_y_p_e │ │ │ │ +struct   _s_t_d_:_:_l_o_g_n_o_r_m_a_l___d_i_s_t_r_i_b_u_t_i_o_n_<_ ___R_e_a_l_T_y_p_e_ _>_:_:_p_a_r_a_m___t_y_p_e │ │ │ │ +struct   _s_t_d_:_:_g_a_m_m_a___d_i_s_t_r_i_b_u_t_i_o_n_<_ ___R_e_a_l_T_y_p_e_ _>_:_:_p_a_r_a_m___t_y_p_e │ │ │ │ +struct   _s_t_d_:_:_c_h_i___s_q_u_a_r_e_d___d_i_s_t_r_i_b_u_t_i_o_n_<_ ___R_e_a_l_T_y_p_e_ _>_:_:_p_a_r_a_m___t_y_p_e │ │ │ │ +struct   _s_t_d_:_:_c_a_u_c_h_y___d_i_s_t_r_i_b_u_t_i_o_n_<_ ___R_e_a_l_T_y_p_e_ _>_:_:_p_a_r_a_m___t_y_p_e │ │ │ │ +struct   _s_t_d_:_:_f_i_s_h_e_r___f___d_i_s_t_r_i_b_u_t_i_o_n_<_ ___R_e_a_l_T_y_p_e_ _>_:_:_p_a_r_a_m___t_y_p_e │ │ │ │ +struct   _s_t_d_:_:_s_t_u_d_e_n_t___t___d_i_s_t_r_i_b_u_t_i_o_n_<_ ___R_e_a_l_T_y_p_e_ _>_:_:_p_a_r_a_m___t_y_p_e │ │ │ │ +struct   _s_t_d_:_:_b_e_r_n_o_u_l_l_i___d_i_s_t_r_i_b_u_t_i_o_n_:_:_p_a_r_a_m___t_y_p_e │ │ │ │ +struct   _s_t_d_:_:_b_i_n_o_m_i_a_l___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 │ │ │ │ +struct   _s_t_d_:_:_g_e_o_m_e_t_r_i_c___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 │ │ │ │ +struct   _s_t_d_:_:_n_e_g_a_t_i_v_e___b_i_n_o_m_i_a_l___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 │ │ │ │ +struct   _s_t_d_:_:_p_o_i_s_s_o_n___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 │ │ │ │ +struct   _s_t_d_:_:_e_x_p_o_n_e_n_t_i_a_l___d_i_s_t_r_i_b_u_t_i_o_n_<_ ___R_e_a_l_T_y_p_e_ _>_:_:_p_a_r_a_m___t_y_p_e │ │ │ │ +struct   _s_t_d_:_:_w_e_i_b_u_l_l___d_i_s_t_r_i_b_u_t_i_o_n_<_ ___R_e_a_l_T_y_p_e_ _>_:_:_p_a_r_a_m___t_y_p_e │ │ │ │ +struct   _s_t_d_:_:_e_x_t_r_e_m_e___v_a_l_u_e___d_i_s_t_r_i_b_u_t_i_o_n_<_ ___R_e_a_l_T_y_p_e_ _>_:_:_p_a_r_a_m___t_y_p_e │ │ │ │ +struct   _s_t_d_:_:_d_i_s_c_r_e_t_e___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 │ │ │ │ +struct   _s_t_d_:_:_p_i_e_c_e_w_i_s_e___c_o_n_s_t_a_n_t___d_i_s_t_r_i_b_u_t_i_o_n_<_ ___R_e_a_l_T_y_p_e_ _>_:_:_p_a_r_a_m___t_y_p_e │ │ │ │ +struct   _s_t_d_:_:_p_i_e_c_e_w_i_s_e___l_i_n_e_a_r___d_i_s_t_r_i_b_u_t_i_o_n_<_ ___R_e_a_l_T_y_p_e_ _>_:_:_p_a_r_a_m___t_y_p_e │ │ │ │ + class   _s_t_d_:_:_p_i_e_c_e_w_i_s_e___c_o_n_s_t_a_n_t___d_i_s_t_r_i_b_u_t_i_o_n_<_ ___R_e_a_l_T_y_p_e_ _> │ │ │ │ + class   _s_t_d_:_:_p_i_e_c_e_w_i_s_e___l_i_n_e_a_r___d_i_s_t_r_i_b_u_t_i_o_n_<_ ___R_e_a_l_T_y_p_e_ _> │ │ │ │ + class   _s_t_d_:_:_p_o_i_s_s_o_n___d_i_s_t_r_i_b_u_t_i_o_n_<_ ___I_n_t_T_y_p_e_ _> │ │ │ │ + class   _s_t_d_:_:_r_a_n_d_o_m___d_e_v_i_c_e │ │ │ │ + class   _s_t_d_:_:_s_e_e_d___s_e_q │ │ │ │ + class   _s_t_d_:_:_s_h_u_f_f_l_e___o_r_d_e_r___e_n_g_i_n_e_<_ ___R_a_n_d_o_m_N_u_m_b_e_r_E_n_g_i_n_e_,_ _____k_ _> │ │ │ │ + class   _s_t_d_:_:_s_t_u_d_e_n_t___t___d_i_s_t_r_i_b_u_t_i_o_n_<_ ___R_e_a_l_T_y_p_e_ _> │ │ │ │ + class   _s_t_d_:_:_s_u_b_t_r_a_c_t___w_i_t_h___c_a_r_r_y___e_n_g_i_n_e_<_ ___U_I_n_t_T_y_p_e_,_ _____w_,_ _____s_,_ _____r_ _> │ │ │ │ + class   _s_t_d_:_:_u_n_i_f_o_r_m___r_e_a_l___d_i_s_t_r_i_b_u_t_i_o_n_<_ ___R_e_a_l_T_y_p_e_ _> │ │ │ │ + class   _s_t_d_:_:_w_e_i_b_u_l_l___d_i_s_t_r_i_b_u_t_i_o_n_<_ ___R_e_a_l_T_y_p_e_ _> │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _s_t_d │ │ │ │ -namespace   _s_t_d_:_:_____d_e_t_a_i_l │ │ │ │ -MMaaccrrooss │ │ │ │ -#define  ___G_L_I_B_C_X_X___A_S_A_N___A_N_N_O_T_A_T_E___B_E_F_O_R_E___D_E_A_L_L_O_C │ │ │ │ -#define  ___G_L_I_B_C_X_X___A_S_A_N___A_N_N_O_T_A_T_E___G_R_E_W(n) │ │ │ │ -#define  ___G_L_I_B_C_X_X___A_S_A_N___A_N_N_O_T_A_T_E___G_R_O_W(n) │ │ │ │ -#define  ___G_L_I_B_C_X_X___A_S_A_N___A_N_N_O_T_A_T_E___R_E_I_N_I_T │ │ │ │ -#define  ___G_L_I_B_C_X_X___A_S_A_N___A_N_N_O_T_A_T_E___S_H_R_I_N_K(n) │ │ │ │ +TTyyppeeddeeffss │ │ │ │ + typedef _m_i_n_s_t_d___r_a_n_d_0  _s_t_d_:_:_d_e_f_a_u_l_t___r_a_n_d_o_m___e_n_g_i_n_e │ │ │ │ + typedef _s_h_u_f_f_l_e___o_r_d_e_r___e_n_g_i_n_e< _m_i_n_s_t_d___r_a_n_d_0, 256 >  _s_t_d_:_:_k_n_u_t_h___b │ │ │ │ + typedef _l_i_n_e_a_r___c_o_n_g_r_u_e_n_t_i_a_l___e_n_g_i_n_e< uint_fast32_t, │ │ │ │ + 48271UL, 0UL, 2147483647UL >  _s_t_d_:_:_m_i_n_s_t_d___r_a_n_d │ │ │ │ + typedef _l_i_n_e_a_r___c_o_n_g_r_u_e_n_t_i_a_l___e_n_g_i_n_e< uint_fast32_t, │ │ │ │ + 16807UL, 0UL, 2147483647UL >  _s_t_d_:_:_m_i_n_s_t_d___r_a_n_d_0 │ │ │ │ + typedef _m_e_r_s_e_n_n_e___t_w_i_s_t_e_r___e_n_g_i_n_e< uint_fast32_t, 32, │ │ │ │ + 624, 397, 31, 0x9908b0dfUL, 11, 0xffffffffUL, 7, │ │ │ │ + 0x9d2c5680UL, 15, 0xefc60000UL, 18, 1812433253UL >  _s_t_d_:_:_m_t_1_9_9_3_7 │ │ │ │ + typedef _m_e_r_s_e_n_n_e___t_w_i_s_t_e_r___e_n_g_i_n_e< uint_fast64_t, 64, │ │ │ │ + 312, 156, 31, 0xb5026f5aa96619e9ULL, 29, │ │ │ │ + 0x5555555555555555ULL, 17, 0x71d67fffeda60000ULL, │ │ │ │ + 37, 0xfff7eee000000000ULL, 43, │ │ │ │ + 6364136223846793005ULL >  _s_t_d_:_:_m_t_1_9_9_3_7___6_4 │ │ │ │ +typedef _d_i_s_c_a_r_d___b_l_o_c_k___e_n_g_i_n_e< ranlux24_base, 223, 23 │ │ │ │ + >  _s_t_d_:_:_r_a_n_l_u_x_2_4 │ │ │ │ + typedef _s_u_b_t_r_a_c_t___w_i_t_h___c_a_r_r_y___e_n_g_i_n_e< uint_fast32_t, │ │ │ │ + 24, 10, 24 >  _s_t_d_:_:_r_a_n_l_u_x_2_4___b_a_s_e │ │ │ │ +typedef _d_i_s_c_a_r_d___b_l_o_c_k___e_n_g_i_n_e< ranlux48_base, 389, 11 │ │ │ │ + >  _s_t_d_:_:_r_a_n_l_u_x_4_8 │ │ │ │ + typedef _s_u_b_t_r_a_c_t___w_i_t_h___c_a_r_r_y___e_n_g_i_n_e< uint_fast64_t, │ │ │ │ + 48, 5, 12 >  _s_t_d_:_:_r_a_n_l_u_x_4_8___b_a_s_e │ │ │ │ FFuunnccttiioonnss │ │ │ │ -template │ │ │ │ -bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_!_= (const vector< _Tp, _Alloc > &__x, const vector< _Tp, │ │ │ │ - _Alloc > &__y) │ │ │ │ -template │ │ │ │ -bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_< (const vector< _Tp, _Alloc > &__x, const vector< _Tp, │ │ │ │ - _Alloc > &__y) │ │ │ │ -template │ │ │ │ -bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_<_= (const vector< _Tp, _Alloc > &__x, const vector< _Tp, │ │ │ │ - _Alloc > &__y) │ │ │ │ -template │ │ │ │ -bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_=_= (const vector< _Tp, _Alloc > &__x, const vector< _Tp, │ │ │ │ - _Alloc > &__y) │ │ │ │ -template │ │ │ │ -bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_> (const vector< _Tp, _Alloc > &__x, const vector< _Tp, │ │ │ │ - _Alloc > &__y) │ │ │ │ -template │ │ │ │ -bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_>_= (const vector< _Tp, _Alloc > &__x, const vector< _Tp, │ │ │ │ - _Alloc > &__y) │ │ │ │ -template │ │ │ │ -void  _s_t_d_:_:_s_w_a_p (vector< _Tp, _Alloc > &__x, vector< _Tp, _Alloc > &__y) │ │ │ │ - noexcept(/*_c_o_n_d_i_t_i_o_n_a_l */) │ │ │ │ +template │ │ │ │ + _RealType  _s_t_d_:_:_g_e_n_e_r_a_t_e___c_a_n_o_n_i_c_a_l │ │ │ │ + (_UniformRandomNumberGenerator &__g) │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_!_= (const _s_t_d_:_: │ │ │ │ + _b_e_r_n_o_u_l_l_i___d_i_s_t_r_i_b_u_t_i_o_n &__d1, const │ │ │ │ + _s_t_d_:_:_b_e_r_n_o_u_l_l_i___d_i_s_t_r_i_b_u_t_i_o_n &__d2) │ │ │ │ +template │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_!_= (const _s_t_d_:_: │ │ │ │ + _b_i_n_o_m_i_a_l___d_i_s_t_r_i_b_u_t_i_o_n< _IntType > &__d1, │ │ │ │ + const _s_t_d_:_:_b_i_n_o_m_i_a_l___d_i_s_t_r_i_b_u_t_i_o_n< │ │ │ │ + _IntType > &__d2) │ │ │ │ +template │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_!_= (const _s_t_d_:_: │ │ │ │ + _c_a_u_c_h_y___d_i_s_t_r_i_b_u_t_i_o_n< _RealType > &__d1, │ │ │ │ + const _s_t_d_:_:_c_a_u_c_h_y___d_i_s_t_r_i_b_u_t_i_o_n< │ │ │ │ + _RealType > &__d2) │ │ │ │ +template │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_!_= (const _s_t_d_:_: │ │ │ │ + _c_h_i___s_q_u_a_r_e_d___d_i_s_t_r_i_b_u_t_i_o_n< _RealType > │ │ │ │ + &__d1, const _s_t_d_:_: │ │ │ │ + _c_h_i___s_q_u_a_r_e_d___d_i_s_t_r_i_b_u_t_i_o_n< _RealType > │ │ │ │ + &__d2) │ │ │ │ +template │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_!_= (const _s_t_d_:_: │ │ │ │ + _d_i_s_c_a_r_d___b_l_o_c_k___e_n_g_i_n_e< │ │ │ │ + _RandomNumberEngine, __p, __r > &__lhs, │ │ │ │ + const _s_t_d_:_:_d_i_s_c_a_r_d___b_l_o_c_k___e_n_g_i_n_e< │ │ │ │ + _RandomNumberEngine, __p, __r > &__rhs) │ │ │ │ +template │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_!_= (const _s_t_d_:_: │ │ │ │ + _d_i_s_c_r_e_t_e___d_i_s_t_r_i_b_u_t_i_o_n< _IntType > &__d1, │ │ │ │ + const _s_t_d_:_:_d_i_s_c_r_e_t_e___d_i_s_t_r_i_b_u_t_i_o_n< │ │ │ │ + _IntType > &__d2) │ │ │ │ +template │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_!_= (const _s_t_d_:_: │ │ │ │ + _e_x_p_o_n_e_n_t_i_a_l___d_i_s_t_r_i_b_u_t_i_o_n< _RealType > │ │ │ │ + &__d1, const _s_t_d_:_: │ │ │ │ + _e_x_p_o_n_e_n_t_i_a_l___d_i_s_t_r_i_b_u_t_i_o_n< _RealType > │ │ │ │ + &__d2) │ │ │ │ +template │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_!_= (const _s_t_d_:_: │ │ │ │ + _e_x_t_r_e_m_e___v_a_l_u_e___d_i_s_t_r_i_b_u_t_i_o_n< _RealType > │ │ │ │ + &__d1, const _s_t_d_:_: │ │ │ │ + _e_x_t_r_e_m_e___v_a_l_u_e___d_i_s_t_r_i_b_u_t_i_o_n< _RealType > │ │ │ │ + &__d2) │ │ │ │ +template │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_!_= (const _s_t_d_:_: │ │ │ │ + _f_i_s_h_e_r___f___d_i_s_t_r_i_b_u_t_i_o_n< _RealType > │ │ │ │ + &__d1, const _s_t_d_:_:_f_i_s_h_e_r___f___d_i_s_t_r_i_b_u_t_i_o_n< │ │ │ │ + _RealType > &__d2) │ │ │ │ +template │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_!_= (const _s_t_d_:_: │ │ │ │ + _g_a_m_m_a___d_i_s_t_r_i_b_u_t_i_o_n< _RealType > &__d1, │ │ │ │ + const _s_t_d_:_:_g_a_m_m_a___d_i_s_t_r_i_b_u_t_i_o_n< _RealType │ │ │ │ + > &__d2) │ │ │ │ +template │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_!_= (const _s_t_d_:_: │ │ │ │ + _g_e_o_m_e_t_r_i_c___d_i_s_t_r_i_b_u_t_i_o_n< _IntType > │ │ │ │ + &__d1, const _s_t_d_:_: │ │ │ │ + _g_e_o_m_e_t_r_i_c___d_i_s_t_r_i_b_u_t_i_o_n< _IntType > │ │ │ │ + &__d2) │ │ │ │ +template │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_!_= (const _s_t_d_:_: │ │ │ │ + _i_n_d_e_p_e_n_d_e_n_t___b_i_t_s___e_n_g_i_n_e< │ │ │ │ + _RandomNumberEngine, __w, _UIntType > │ │ │ │ + &__lhs, const _s_t_d_:_: │ │ │ │ + _i_n_d_e_p_e_n_d_e_n_t___b_i_t_s___e_n_g_i_n_e< │ │ │ │ + _RandomNumberEngine, __w, _UIntType > │ │ │ │ + &__rhs) │ │ │ │ +template │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_!_= (const _s_t_d_:_: │ │ │ │ + _l_i_n_e_a_r___c_o_n_g_r_u_e_n_t_i_a_l___e_n_g_i_n_e< _UIntType, │ │ │ │ + __a, __c, __m > &__lhs, const _s_t_d_:_: │ │ │ │ + _l_i_n_e_a_r___c_o_n_g_r_u_e_n_t_i_a_l___e_n_g_i_n_e< _UIntType, │ │ │ │ + __a, __c, __m > &__rhs) │ │ │ │ +template │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_!_= (const _s_t_d_:_: │ │ │ │ + _l_o_g_n_o_r_m_a_l___d_i_s_t_r_i_b_u_t_i_o_n< _RealType > │ │ │ │ + &__d1, const _s_t_d_:_: │ │ │ │ + _l_o_g_n_o_r_m_a_l___d_i_s_t_r_i_b_u_t_i_o_n< _RealType > │ │ │ │ + &__d2) │ │ │ │ +template │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_!_= (const _s_t_d_:_: │ │ │ │ + _m_e_r_s_e_n_n_e___t_w_i_s_t_e_r___e_n_g_i_n_e< _UIntType, __w, │ │ │ │ + __n, __m, __r, __a, __u, __d, __s, __b, │ │ │ │ + __t, __c, __l, __f > &__lhs, const _s_t_d_:_: │ │ │ │ + _m_e_r_s_e_n_n_e___t_w_i_s_t_e_r___e_n_g_i_n_e< _UIntType, __w, │ │ │ │ + __n, __m, __r, __a, __u, __d, __s, __b, │ │ │ │ + __t, __c, __l, __f > &__rhs) │ │ │ │ +template │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_!_= (const _s_t_d_:_: │ │ │ │ + _n_e_g_a_t_i_v_e___b_i_n_o_m_i_a_l___d_i_s_t_r_i_b_u_t_i_o_n< _IntType │ │ │ │ + > &__d1, const _s_t_d_:_: │ │ │ │ + _n_e_g_a_t_i_v_e___b_i_n_o_m_i_a_l___d_i_s_t_r_i_b_u_t_i_o_n< _IntType │ │ │ │ + > &__d2) │ │ │ │ +template │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_!_= (const _s_t_d_:_: │ │ │ │ + _n_o_r_m_a_l___d_i_s_t_r_i_b_u_t_i_o_n< _RealType > &__d1, │ │ │ │ + const _s_t_d_:_:_n_o_r_m_a_l___d_i_s_t_r_i_b_u_t_i_o_n< │ │ │ │ + _RealType > &__d2) │ │ │ │ +template │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_!_= (const _s_t_d_:_: │ │ │ │ + _p_i_e_c_e_w_i_s_e___c_o_n_s_t_a_n_t___d_i_s_t_r_i_b_u_t_i_o_n< │ │ │ │ + _RealType > &__d1, const _s_t_d_:_: │ │ │ │ + _p_i_e_c_e_w_i_s_e___c_o_n_s_t_a_n_t___d_i_s_t_r_i_b_u_t_i_o_n< │ │ │ │ + _RealType > &__d2) │ │ │ │ +template │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_!_= (const _s_t_d_:_: │ │ │ │ + _p_i_e_c_e_w_i_s_e___l_i_n_e_a_r___d_i_s_t_r_i_b_u_t_i_o_n< _RealType │ │ │ │ + > &__d1, const _s_t_d_:_: │ │ │ │ + _p_i_e_c_e_w_i_s_e___l_i_n_e_a_r___d_i_s_t_r_i_b_u_t_i_o_n< _RealType │ │ │ │ + > &__d2) │ │ │ │ +template │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_!_= (const _s_t_d_:_: │ │ │ │ + _p_o_i_s_s_o_n___d_i_s_t_r_i_b_u_t_i_o_n< _IntType > &__d1, │ │ │ │ + const _s_t_d_:_:_p_o_i_s_s_o_n___d_i_s_t_r_i_b_u_t_i_o_n< │ │ │ │ + _IntType > &__d2) │ │ │ │ +template │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_!_= (const _s_t_d_:_: │ │ │ │ + _s_h_u_f_f_l_e___o_r_d_e_r___e_n_g_i_n_e< │ │ │ │ + _RandomNumberEngine, __k > &__lhs, const │ │ │ │ + _s_t_d_:_:_s_h_u_f_f_l_e___o_r_d_e_r___e_n_g_i_n_e< │ │ │ │ + _RandomNumberEngine, __k > &__rhs) │ │ │ │ +template │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_!_= (const _s_t_d_:_: │ │ │ │ + _s_t_u_d_e_n_t___t___d_i_s_t_r_i_b_u_t_i_o_n< _RealType > │ │ │ │ + &__d1, const _s_t_d_:_: │ │ │ │ + _s_t_u_d_e_n_t___t___d_i_s_t_r_i_b_u_t_i_o_n< _RealType > │ │ │ │ + &__d2) │ │ │ │ +template │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_!_= (const _s_t_d_:_: │ │ │ │ + _s_u_b_t_r_a_c_t___w_i_t_h___c_a_r_r_y___e_n_g_i_n_e< _UIntType, │ │ │ │ + __w, __s, __r > &__lhs, const _s_t_d_:_: │ │ │ │ + _s_u_b_t_r_a_c_t___w_i_t_h___c_a_r_r_y___e_n_g_i_n_e< _UIntType, │ │ │ │ + __w, __s, __r > &__rhs) │ │ │ │ +template │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_!_= (const _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< _IntType > │ │ │ │ + &__d1, const _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< _IntType > │ │ │ │ + &__d2) │ │ │ │ +template │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_!_= (const _s_t_d_:_: │ │ │ │ + _u_n_i_f_o_r_m___r_e_a_l___d_i_s_t_r_i_b_u_t_i_o_n< _IntType > │ │ │ │ + &__d1, const _s_t_d_:_: │ │ │ │ + _u_n_i_f_o_r_m___r_e_a_l___d_i_s_t_r_i_b_u_t_i_o_n< _IntType > │ │ │ │ + &__d2) │ │ │ │ +template │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_!_= (const _s_t_d_:_: │ │ │ │ + _w_e_i_b_u_l_l___d_i_s_t_r_i_b_u_t_i_o_n< _RealType > &__d1, │ │ │ │ + const _s_t_d_:_:_w_e_i_b_u_l_l___d_i_s_t_r_i_b_u_t_i_o_n< │ │ │ │ + _RealType > &__d2) │ │ │ │ +template │ │ │ │ +_s_t_d_:_:_b_a_s_i_c___o_s_t_r_e_a_m< _CharT, _Traits > _s_t_d_:_:_o_p_e_r_a_t_o_r_<_< (_s_t_d_:_:_b_a_s_i_c___o_s_t_r_e_a_m< │ │ │ │ + &  _CharT, _Traits > &, const _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< _IntType > &) │ │ │ │ +template │ │ │ │ +_s_t_d_:_:_b_a_s_i_c___o_s_t_r_e_a_m< _CharT, _Traits > _s_t_d_:_:_o_p_e_r_a_t_o_r_<_< (_s_t_d_:_:_b_a_s_i_c___o_s_t_r_e_a_m< │ │ │ │ + &  _CharT, _Traits > &, const _s_t_d_:_: │ │ │ │ + _u_n_i_f_o_r_m___r_e_a_l___d_i_s_t_r_i_b_u_t_i_o_n< _RealType > │ │ │ │ + &) │ │ │ │ +template │ │ │ │ +_s_t_d_:_:_b_a_s_i_c___o_s_t_r_e_a_m< _CharT, _Traits > _s_t_d_:_:_o_p_e_r_a_t_o_r_<_< (_s_t_d_:_:_b_a_s_i_c___o_s_t_r_e_a_m< │ │ │ │ + &  _CharT, _Traits > &__os, const _s_t_d_:_: │ │ │ │ + _b_e_r_n_o_u_l_l_i___d_i_s_t_r_i_b_u_t_i_o_n &__x) │ │ │ │ +template │ │ │ │ +_s_t_d_:_:_b_a_s_i_c___o_s_t_r_e_a_m< _CharT, _Traits > _s_t_d_:_:_o_p_e_r_a_t_o_r_<_< (_s_t_d_:_:_b_a_s_i_c___o_s_t_r_e_a_m< │ │ │ │ + &  _CharT, _Traits > &__os, const _s_t_d_:_: │ │ │ │ + _c_a_u_c_h_y___d_i_s_t_r_i_b_u_t_i_o_n< _RealType > &__x) │ │ │ │ +template │ │ │ │ +_s_t_d_:_:_b_a_s_i_c___o_s_t_r_e_a_m< _CharT, _Traits > _s_t_d_:_:_o_p_e_r_a_t_o_r_<_< (_s_t_d_:_:_b_a_s_i_c___o_s_t_r_e_a_m< │ │ │ │ + &  _CharT, _Traits > &__os, const _s_t_d_:_: │ │ │ │ + _e_x_p_o_n_e_n_t_i_a_l___d_i_s_t_r_i_b_u_t_i_o_n< _RealType > │ │ │ │ + &__x) │ │ │ │ +template │ │ │ │ +_s_t_d_:_:_b_a_s_i_c___o_s_t_r_e_a_m< _CharT, _Traits > _s_t_d_:_:_o_p_e_r_a_t_o_r_<_< (_s_t_d_:_:_b_a_s_i_c___o_s_t_r_e_a_m< │ │ │ │ + &  _CharT, _Traits > &__os, const _s_t_d_:_: │ │ │ │ + _e_x_t_r_e_m_e___v_a_l_u_e___d_i_s_t_r_i_b_u_t_i_o_n< _RealType > │ │ │ │ + &__x) │ │ │ │ +template │ │ │ │ +_s_t_d_:_:_b_a_s_i_c___o_s_t_r_e_a_m< _CharT, _Traits > _s_t_d_:_:_o_p_e_r_a_t_o_r_<_< (_s_t_d_:_:_b_a_s_i_c___o_s_t_r_e_a_m< │ │ │ │ + &  _CharT, _Traits > &__os, const _s_t_d_:_: │ │ │ │ + _g_e_o_m_e_t_r_i_c___d_i_s_t_r_i_b_u_t_i_o_n< _IntType > &__x) │ │ │ │ +template │ │ │ │ +_s_t_d_:_:_b_a_s_i_c___o_s_t_r_e_a_m< _CharT, _Traits > _s_t_d_:_:_o_p_e_r_a_t_o_r_<_< (_s_t_d_:_:_b_a_s_i_c___o_s_t_r_e_a_m< │ │ │ │ + &  _CharT, _Traits > &__os, const _s_t_d_:_: │ │ │ │ + _i_n_d_e_p_e_n_d_e_n_t___b_i_t_s___e_n_g_i_n_e< │ │ │ │ + _RandomNumberEngine, __w, _UIntType > │ │ │ │ + &__x) │ │ │ │ +template │ │ │ │ +_s_t_d_:_:_b_a_s_i_c___o_s_t_r_e_a_m< _CharT, _Traits > _s_t_d_:_:_o_p_e_r_a_t_o_r_<_< (_s_t_d_:_:_b_a_s_i_c___o_s_t_r_e_a_m< │ │ │ │ + &  _CharT, _Traits > &__os, const _s_t_d_:_: │ │ │ │ + _w_e_i_b_u_l_l___d_i_s_t_r_i_b_u_t_i_o_n< _RealType > &__x) │ │ │ │ +template │ │ │ │ +_s_t_d_:_:_b_a_s_i_c___i_s_t_r_e_a_m< _CharT, _Traits > _s_t_d_:_:_o_p_e_r_a_t_o_r_>_> (_s_t_d_:_:_b_a_s_i_c___i_s_t_r_e_a_m< │ │ │ │ + &  _CharT, _Traits > &, _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< _IntType > &) │ │ │ │ +template │ │ │ │ +_s_t_d_:_:_b_a_s_i_c___i_s_t_r_e_a_m< _CharT, _Traits > _s_t_d_:_:_o_p_e_r_a_t_o_r_>_> (_s_t_d_:_:_b_a_s_i_c___i_s_t_r_e_a_m< │ │ │ │ + &  _CharT, _Traits > &, _s_t_d_:_: │ │ │ │ + _u_n_i_f_o_r_m___r_e_a_l___d_i_s_t_r_i_b_u_t_i_o_n< _RealType > │ │ │ │ + &) │ │ │ │ +template │ │ │ │ +_s_t_d_:_:_b_a_s_i_c___i_s_t_r_e_a_m< _CharT, _Traits > _s_t_d_:_:_o_p_e_r_a_t_o_r_>_> (_s_t_d_:_:_b_a_s_i_c___i_s_t_r_e_a_m< │ │ │ │ + &  _CharT, _Traits > &__is, _s_t_d_:_: │ │ │ │ + _b_e_r_n_o_u_l_l_i___d_i_s_t_r_i_b_u_t_i_o_n &__x) │ │ │ │ +template │ │ │ │ +_s_t_d_:_:_b_a_s_i_c___i_s_t_r_e_a_m< _CharT, _Traits > _s_t_d_:_:_o_p_e_r_a_t_o_r_>_> (_s_t_d_:_:_b_a_s_i_c___i_s_t_r_e_a_m< │ │ │ │ + &  _CharT, _Traits > &__is, _s_t_d_:_: │ │ │ │ + _c_a_u_c_h_y___d_i_s_t_r_i_b_u_t_i_o_n< _RealType > &__x) │ │ │ │ +template │ │ │ │ +_s_t_d_:_:_b_a_s_i_c___i_s_t_r_e_a_m< _CharT, _Traits > _s_t_d_:_:_o_p_e_r_a_t_o_r_>_> (_s_t_d_:_:_b_a_s_i_c___i_s_t_r_e_a_m< │ │ │ │ + &  _CharT, _Traits > &__is, _s_t_d_:_: │ │ │ │ + _e_x_p_o_n_e_n_t_i_a_l___d_i_s_t_r_i_b_u_t_i_o_n< _RealType > │ │ │ │ + &__x) │ │ │ │ +template │ │ │ │ +_s_t_d_:_:_b_a_s_i_c___i_s_t_r_e_a_m< _CharT, _Traits > _s_t_d_:_:_o_p_e_r_a_t_o_r_>_> (_s_t_d_:_:_b_a_s_i_c___i_s_t_r_e_a_m< │ │ │ │ + &  _CharT, _Traits > &__is, _s_t_d_:_: │ │ │ │ + _e_x_t_r_e_m_e___v_a_l_u_e___d_i_s_t_r_i_b_u_t_i_o_n< _RealType > │ │ │ │ + &__x) │ │ │ │ +template │ │ │ │ +_s_t_d_:_:_b_a_s_i_c___i_s_t_r_e_a_m< _CharT, _Traits > _s_t_d_:_:_o_p_e_r_a_t_o_r_>_> (_s_t_d_:_:_b_a_s_i_c___i_s_t_r_e_a_m< │ │ │ │ + &  _CharT, _Traits > &__is, _s_t_d_:_: │ │ │ │ + _g_e_o_m_e_t_r_i_c___d_i_s_t_r_i_b_u_t_i_o_n< _IntType > &__x) │ │ │ │ +template │ │ │ │ +_s_t_d_:_:_b_a_s_i_c___i_s_t_r_e_a_m< _CharT, _Traits > _s_t_d_:_:_o_p_e_r_a_t_o_r_>_> (_s_t_d_:_:_b_a_s_i_c___i_s_t_r_e_a_m< │ │ │ │ + &  _CharT, _Traits > &__is, _s_t_d_:_: │ │ │ │ + _w_e_i_b_u_l_l___d_i_s_t_r_i_b_u_t_i_o_n< _RealType > &__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 _s_t_l___v_e_c_t_o_r_._h. │ │ │ │ -********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ -********** _?◆_? __GGLLIIBBCCXXXX__AASSAANN__AANNNNOOTTAATTEE__BBEEFFOORREE__DDEEAALLLLOOCC ********** │ │ │ │ -#define _GLIBCXX_ASAN_ANNOTATE_BEFORE_DEALLOC │ │ │ │ -Definition at line _2_6_8 of file _s_t_l___v_e_c_t_o_r_._h. │ │ │ │ -********** _?◆_? __GGLLIIBBCCXXXX__AASSAANN__AANNNNOOTTAATTEE__GGRREEWW ********** │ │ │ │ -#define _GLIBCXX_ASAN_ANNOTATE_GREW ( nn ) │ │ │ │ -Definition at line _2_6_6 of file _s_t_l___v_e_c_t_o_r_._h. │ │ │ │ -********** _?◆_? __GGLLIIBBCCXXXX__AASSAANN__AANNNNOOTTAATTEE__GGRROOWW ********** │ │ │ │ -#define _GLIBCXX_ASAN_ANNOTATE_GROW ( nn ) │ │ │ │ -Definition at line _2_6_5 of file _s_t_l___v_e_c_t_o_r_._h. │ │ │ │ -********** _?◆_? __GGLLIIBBCCXXXX__AASSAANN__AANNNNOOTTAATTEE__RREEIINNIITT ********** │ │ │ │ -#define _GLIBCXX_ASAN_ANNOTATE_REINIT │ │ │ │ -Definition at line _2_6_4 of file _s_t_l___v_e_c_t_o_r_._h. │ │ │ │ -********** _?◆_? __GGLLIIBBCCXXXX__AASSAANN__AANNNNOOTTAATTEE__SSHHRRIINNKK ********** │ │ │ │ -#define _GLIBCXX_ASAN_ANNOTATE_SHRINK ( nn ) │ │ │ │ -Definition at line _2_6_7 of file _s_t_l___v_e_c_t_o_r_._h. │ │ │ │ +attempt to use it directly. Instead, include . │ │ │ │ +Definition in file _r_a_n_d_o_m_._h. │ │ │ │ * bbiittss │ │ │ │ - * _s_t_l___v_e_c_t_o_r_._h │ │ │ │ + * _r_a_n_d_o_m_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.15.0 │ │ ├── ./usr/share/doc/gcc-11-base/libstdc++/user/a00398.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,10 +1,50 @@ │ │ │ │ var a00398 = [ │ │ │ │ - ["std::_Vector_base< _Tp, _Alloc >", "a07390.html", null], │ │ │ │ - ["std::operator!=", "a01631.html#aa8e4871fc2d47ad1f14e43949b9ce938", null], │ │ │ │ - ["std::operator<", "a01631.html#a8fcefae1f44d9e5656f2231d04742454", null], │ │ │ │ - ["std::operator<=", "a01631.html#acc2c10d2a7234cc66fd327a6f65954f7", null], │ │ │ │ - ["std::operator==", "a01631.html#aa823b88deb57ba1b2494ea0dbcc028a8", null], │ │ │ │ - ["std::operator>", "a01631.html#a3a727df15fd08af612b872262e50a95f", null], │ │ │ │ - ["std::operator>=", "a01631.html#a9a32938be630f180eddc69f0402d13ca", null], │ │ │ │ - ["std::swap", "a01631.html#a89a3a6f9c11a9ade523d0be6e5b3a190", null] │ │ │ │ + ["std::minstd_rand", "a01624.html#ga06944ee85abb11c4d8332728514da20a", null], │ │ │ │ + ["std::minstd_rand0", "a01624.html#ga70e14a580880f05e94a51c6e103e1cd1", null], │ │ │ │ + ["std::mt19937", "a01624.html#ga887bdc65ea12ca4f83aa79f5bd9fce03", null], │ │ │ │ + ["std::mt19937_64", "a01624.html#ga9606c7ecfbdedbd7ee5d8b908f4e2275", null], │ │ │ │ + ["std::generate_canonical", "a01578.html#ga2f17f21ce71bab2f3de9353f2ab02f13", null], │ │ │ │ + ["std::operator!=", "a01628.html#ga1b42c0c69b003733630addb17455e78c", null], │ │ │ │ + ["std::operator!=", "a01628.html#ga03255c2d29292408f9e417d8c19749d5", null], │ │ │ │ + ["std::operator!=", "a01627.html#gaf8d44ddbae75bc9aac07aca501130b3a", null], │ │ │ │ + ["std::operator!=", "a01627.html#gac4dbdb98454ba9eac4efedb236380fff", null], │ │ │ │ + ["std::operator!=", "a01624.html#ga223f7056b37b325f9d70eda843982dff", null], │ │ │ │ + ["std::operator!=", "a01629.html#gaf7323b91cdc741135f4099930580987b", null], │ │ │ │ + ["std::operator!=", "a01629.html#gadb6734dde139796b0c17ab7da2092000", null], │ │ │ │ + ["std::operator!=", "a01629.html#ga7cb0e95ae2658e8fbce52e9b83969955", null], │ │ │ │ + ["std::operator!=", "a01627.html#gabeee8cc21eaf2d1ac14d819e56e933ee", null], │ │ │ │ + ["std::operator!=", "a01627.html#gafdf8a737eaa64e171fd0617603e7a6a7", null], │ │ │ │ + ["std::operator!=", "a01628.html#gada2797560998107294e60ece46615d73", null], │ │ │ │ + ["std::operator!=", "a01624.html#ga8ad332f998832aa3bbf426abf441c34a", null], │ │ │ │ + ["std::operator!=", "a01624.html#gafb9c9578afd0299fc357581cb848f2fd", null], │ │ │ │ + ["std::operator!=", "a01627.html#ga611caefadf0614ec3e3a5bd8a95c11ac", null], │ │ │ │ + ["std::operator!=", "a01624.html#ga08598cac266ed03507603ca6d6c27ce2", null], │ │ │ │ + ["std::operator!=", "a01628.html#ga0ecd009cd763508bbac68e62a14fa73c", null], │ │ │ │ + ["std::operator!=", "a01627.html#ga227eec7c437a7d893172e4387a0fb041", null], │ │ │ │ + ["std::operator!=", "a01629.html#ga1c4c402db457c46e730ba427efda1f5a", null], │ │ │ │ + ["std::operator!=", "a01629.html#ga34f4ca07d82381cbfd41b4563b5f265e", null], │ │ │ │ + ["std::operator!=", "a01629.html#ga16e064b3a8822c1a5b84e0b146b2a701", null], │ │ │ │ + ["std::operator!=", "a01624.html#ga47c5a5d9835e00a60a76f4be7ea0f671", null], │ │ │ │ + ["std::operator!=", "a01627.html#ga9f65157c0c5e6316e415b7fbf5edbad4", null], │ │ │ │ + ["std::operator!=", "a01624.html#ga58cddddd716e5fe8d9ef54732399b68f", null], │ │ │ │ + ["std::operator!=", "a01626.html#gaca2a091ac2ef5b09deba9d1d185b16ad", null], │ │ │ │ + ["std::operator!=", "a01626.html#gae4180334ebfbfbbae6f1f9901819a52e", null], │ │ │ │ + ["std::operator!=", "a01629.html#ga93a5f8cbd4387728796f825a8004f3fe", null], │ │ │ │ + ["std::operator<<", "a01626.html#ga268e36f52e1a1ba938eeaa95509796ca", null], │ │ │ │ + ["std::operator<<", "a01626.html#gad31a64335591da810bc4719b847783ec", null], │ │ │ │ + ["std::operator<<", "a01628.html#ga17d284660a1656bc205dd834125e5543", null], │ │ │ │ + ["std::operator<<", "a01627.html#gabc0fe37b26c3b5de242cd4261cde3aed", null], │ │ │ │ + ["std::operator<<", "a01629.html#ga24847f7a1a655893e956f636db4e9f3a", null], │ │ │ │ + ["std::operator<<", "a01629.html#ga65897cd1a592c0a6c399072ec1ef7192", null], │ │ │ │ + ["std::operator<<", "a01628.html#ga50ccdd252598b9c017837d26588463d2", null], │ │ │ │ + ["std::operator<<", "a01624.html#ga02db02bd50abea2daaa1e8c4b091ae56", null], │ │ │ │ + ["std::operator<<", "a01629.html#ga5d78bcb5583afa9e1871301f9d6d9c68", null], │ │ │ │ + ["std::operator>>", "a01626.html#gab49649ed7cc5cb819ce52620f227b1a7", null], │ │ │ │ + ["std::operator>>", "a01626.html#gafb5c87acd910ec70edaedef33cf32aee", null], │ │ │ │ + ["std::operator>>", "a01628.html#ga41e0560dceffe87c4db70e118ddd5ba0", null], │ │ │ │ + ["std::operator>>", "a01627.html#ga63a43b47a5315c8b1b55002af2eb1669", null], │ │ │ │ + ["std::operator>>", "a01629.html#ga5dbbb1871bc0160e0b9cf609e222fb18", null], │ │ │ │ + ["std::operator>>", "a01629.html#ga391e8f9fb533a5fb81f4099e9b03ff6a", null], │ │ │ │ + ["std::operator>>", "a01628.html#ga30ec0007b5169ab3c6847033db603493", null], │ │ │ │ + ["std::operator>>", "a01629.html#gae0fa60823d48bfd5b1d7a7c0063826ba", null] │ │ │ │ ]; │ │ ├── ./usr/share/doc/gcc-11-base/libstdc++/user/a00398_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: stl_vector.h Source File │ │ │ +libstdc++: random.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -48,20 +48,20 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
stl_vector.h
│ │ │ +
random.h
│ │ │
│ │ │
│ │ │ -Go to the documentation of this file.
1// Vector implementation -*- C++ -*-
│ │ │ +Go to the documentation of this file.
1// random number generation -*- C++ -*-
│ │ │
2
│ │ │ -
3// Copyright (C) 2001-2021 Free Software Foundation, Inc.
│ │ │ +
3// Copyright (C) 2009-2021 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
│ │ │ @@ -74,2203 +74,7057 @@ │ │ │
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
│ │ │ -
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_vector.h
│ │ │ -
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>
│ │ │ -
62#if __cplusplus >= 201103L
│ │ │ -
63#include <initializer_list>
│ │ │ -
64#endif
│ │ │ -
65#if __cplusplus > 201703L
│ │ │ -
66# include <compare>
│ │ │ -
67#endif
│ │ │ -
68
│ │ │ -
69#include <debug/assertions.h>
│ │ │ -
70
│ │ │ -
71#if _GLIBCXX_SANITIZE_STD_ALLOCATOR && _GLIBCXX_SANITIZE_VECTOR
│ │ │ -
72extern "C" void
│ │ │ -
73__sanitizer_annotate_contiguous_container(const void*, const void*,
│ │ │ -
74 const void*, const void*);
│ │ │ -
75#endif
│ │ │ +
24
│ │ │ +
25/**
│ │ │ +
26 * @file bits/random.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 _RANDOM_H
│ │ │ +
32#define _RANDOM_H 1
│ │ │ +
33
│ │ │ +
34#include <vector>
│ │ │ + │ │ │ +
36
│ │ │ +
37namespace std _GLIBCXX_VISIBILITY(default)
│ │ │ +
38{
│ │ │ +
39_GLIBCXX_BEGIN_NAMESPACE_VERSION
│ │ │ +
40
│ │ │ +
41 // [26.4] Random number generation
│ │ │ +
42
│ │ │ +
43 /**
│ │ │ +
44 * @defgroup random Random Number Generation
│ │ │ +
45 * @ingroup numerics
│ │ │ +
46 *
│ │ │ +
47 * A facility for generating random numbers on selected distributions.
│ │ │ +
48 * @{
│ │ │ +
49 */
│ │ │ +
50
│ │ │ +
51 // std::uniform_random_bit_generator is defined in <bits/uniform_int_dist.h>
│ │ │ +
52
│ │ │ +
53 /**
│ │ │ +
54 * @brief A function template for converting the output of a (integral)
│ │ │ +
55 * uniform random number generator to a floatng point result in the range
│ │ │ +
56 * [0-1).
│ │ │ +
57 */
│ │ │ +
58 template<typename _RealType, size_t __bits,
│ │ │ +
59 typename _UniformRandomNumberGenerator>
│ │ │ +
60 _RealType
│ │ │ +
61 generate_canonical(_UniformRandomNumberGenerator& __g);
│ │ │ +
62
│ │ │ +
63 /// @cond undocumented
│ │ │ +
64 // Implementation-space details.
│ │ │ +
65 namespace __detail
│ │ │ +
66 {
│ │ │ +
67 template<typename _UIntType, size_t __w,
│ │ │ +
68 bool = __w < static_cast<size_t>
│ │ │ + │ │ │ +
70 struct _Shift
│ │ │ +
71 { static const _UIntType __value = 0; };
│ │ │ +
72
│ │ │ +
73 template<typename _UIntType, size_t __w>
│ │ │ +
74 struct _Shift<_UIntType, __w, true>
│ │ │ +
75 { static const _UIntType __value = _UIntType(1) << __w; };
│ │ │
76
│ │ │ -
77namespace std _GLIBCXX_VISIBILITY(default)
│ │ │ -
78{
│ │ │ -
79_GLIBCXX_BEGIN_NAMESPACE_VERSION
│ │ │ -
80_GLIBCXX_BEGIN_NAMESPACE_CONTAINER
│ │ │ -
81
│ │ │ -
82 /// See bits/stl_deque.h's _Deque_base for an explanation.
│ │ │ -
83 template<typename _Tp, typename _Alloc>
│ │ │ -
│ │ │ -
84 struct _Vector_base
│ │ │ -
85 {
│ │ │ - │ │ │ -
87 rebind<_Tp>::other _Tp_alloc_type;
│ │ │ -
88 typedef typename __gnu_cxx::__alloc_traits<_Tp_alloc_type>::pointer
│ │ │ -
89 pointer;
│ │ │ -
90
│ │ │ -
91 struct _Vector_impl_data
│ │ │ -
92 {
│ │ │ -
93 pointer _M_start;
│ │ │ -
94 pointer _M_finish;
│ │ │ -
95 pointer _M_end_of_storage;
│ │ │ +
77 template<int __s,
│ │ │ +
78 int __which = ((__s <= __CHAR_BIT__ * sizeof (int))
│ │ │ +
79 + (__s <= __CHAR_BIT__ * sizeof (long))
│ │ │ +
80 + (__s <= __CHAR_BIT__ * sizeof (long long))
│ │ │ +
81 /* assume long long no bigger than __int128 */
│ │ │ +
82 + (__s <= 128))>
│ │ │ +
83 struct _Select_uint_least_t
│ │ │ +
84 {
│ │ │ +
85 static_assert(__which < 0, /* needs to be dependent */
│ │ │ +
86 "sorry, would be too much trouble for a slow result");
│ │ │ +
87 };
│ │ │ +
88
│ │ │ +
89 template<int __s>
│ │ │ +
90 struct _Select_uint_least_t<__s, 4>
│ │ │ +
91 { typedef unsigned int type; };
│ │ │ +
92
│ │ │ +
93 template<int __s>
│ │ │ +
94 struct _Select_uint_least_t<__s, 3>
│ │ │ +
95 { typedef unsigned long type; };
│ │ │
96
│ │ │ -
97 _Vector_impl_data() _GLIBCXX_NOEXCEPT
│ │ │ -
98 : _M_start(), _M_finish(), _M_end_of_storage()
│ │ │ -
99 { }
│ │ │ +
97 template<int __s>
│ │ │ +
98 struct _Select_uint_least_t<__s, 2>
│ │ │ +
99 { typedef unsigned long long type; };
│ │ │
100
│ │ │ -
101#if __cplusplus >= 201103L
│ │ │ -
102 _Vector_impl_data(_Vector_impl_data&& __x) noexcept
│ │ │ -
103 : _M_start(__x._M_start), _M_finish(__x._M_finish),
│ │ │ -
104 _M_end_of_storage(__x._M_end_of_storage)
│ │ │ -
105 { __x._M_start = __x._M_finish = __x._M_end_of_storage = pointer(); }
│ │ │ -
106#endif
│ │ │ -
107
│ │ │ -
108 void
│ │ │ -
109 _M_copy_data(_Vector_impl_data const& __x) _GLIBCXX_NOEXCEPT
│ │ │ -
110 {
│ │ │ -
111 _M_start = __x._M_start;
│ │ │ -
112 _M_finish = __x._M_finish;
│ │ │ -
113 _M_end_of_storage = __x._M_end_of_storage;
│ │ │ -
114 }
│ │ │ -
115
│ │ │ -
116 void
│ │ │ -
117 _M_swap_data(_Vector_impl_data& __x) _GLIBCXX_NOEXCEPT
│ │ │ -
118 {
│ │ │ -
119 // Do not use std::swap(_M_start, __x._M_start), etc as it loses
│ │ │ -
120 // information used by TBAA.
│ │ │ -
121 _Vector_impl_data __tmp;
│ │ │ -
122 __tmp._M_copy_data(*this);
│ │ │ -
123 _M_copy_data(__x);
│ │ │ -
124 __x._M_copy_data(__tmp);
│ │ │ -
125 }
│ │ │ -
126 };
│ │ │ -
127
│ │ │ -
128 struct _Vector_impl
│ │ │ -
129 : public _Tp_alloc_type, public _Vector_impl_data
│ │ │ -
130 {
│ │ │ -
131 _Vector_impl() _GLIBCXX_NOEXCEPT_IF(
│ │ │ - │ │ │ -
133 : _Tp_alloc_type()
│ │ │ -
134 { }
│ │ │ -
135
│ │ │ -
136 _Vector_impl(_Tp_alloc_type const& __a) _GLIBCXX_NOEXCEPT
│ │ │ -
137 : _Tp_alloc_type(__a)
│ │ │ -
138 { }
│ │ │ -
139
│ │ │ -
140#if __cplusplus >= 201103L
│ │ │ -
141 // Not defaulted, to enforce noexcept(true) even when
│ │ │ -
142 // !is_nothrow_move_constructible<_Tp_alloc_type>.
│ │ │ -
143 _Vector_impl(_Vector_impl&& __x) noexcept
│ │ │ -
144 : _Tp_alloc_type(std::move(__x)), _Vector_impl_data(std::move(__x))
│ │ │ -
145 { }
│ │ │ -
146
│ │ │ -
147 _Vector_impl(_Tp_alloc_type&& __a) noexcept
│ │ │ -
148 : _Tp_alloc_type(std::move(__a))
│ │ │ -
149 { }
│ │ │ -
150
│ │ │ -
151 _Vector_impl(_Tp_alloc_type&& __a, _Vector_impl&& __rv) noexcept
│ │ │ -
152 : _Tp_alloc_type(std::move(__a)), _Vector_impl_data(std::move(__rv))
│ │ │ -
153 { }
│ │ │ -
154#endif
│ │ │ -
155
│ │ │ -
156#if _GLIBCXX_SANITIZE_STD_ALLOCATOR && _GLIBCXX_SANITIZE_VECTOR
│ │ │ -
157 template<typename = _Tp_alloc_type>
│ │ │ -
158 struct _Asan
│ │ │ -
159 {
│ │ │ - │ │ │ - │ │ │ -
162
│ │ │ -
163 static void _S_shrink(_Vector_impl&, size_type) { }
│ │ │ -
164 static void _S_on_dealloc(_Vector_impl&) { }
│ │ │ -
165
│ │ │ -
166 typedef _Vector_impl& _Reinit;
│ │ │ -
167
│ │ │ -
168 struct _Grow
│ │ │ -
169 {
│ │ │ -
170 _Grow(_Vector_impl&, size_type) { }
│ │ │ -
171 void _M_grew(size_type) { }
│ │ │ -
172 };
│ │ │ -
173 };
│ │ │ -
174
│ │ │ -
175 // Enable ASan annotations for memory obtained from std::allocator.
│ │ │ -
176 template<typename _Up>
│ │ │ -
177 struct _Asan<allocator<_Up> >
│ │ │ -
178 {
│ │ │ - │ │ │ - │ │ │ -
181
│ │ │ -
182 // Adjust ASan annotation for [_M_start, _M_end_of_storage) to
│ │ │ -
183 // mark end of valid region as __curr instead of __prev.
│ │ │ -
184 static void
│ │ │ -
185 _S_adjust(_Vector_impl& __impl, pointer __prev, pointer __curr)
│ │ │ -
186 {
│ │ │ -
187 __sanitizer_annotate_contiguous_container(__impl._M_start,
│ │ │ -
188 __impl._M_end_of_storage, __prev, __curr);
│ │ │ -
189 }
│ │ │ -
190
│ │ │ -
191 static void
│ │ │ -
192 _S_grow(_Vector_impl& __impl, size_type __n)
│ │ │ -
193 { _S_adjust(__impl, __impl._M_finish, __impl._M_finish + __n); }
│ │ │ -
194
│ │ │ -
195 static void
│ │ │ -
196 _S_shrink(_Vector_impl& __impl, size_type __n)
│ │ │ -
197 { _S_adjust(__impl, __impl._M_finish + __n, __impl._M_finish); }
│ │ │ -
198
│ │ │ -
199 static void
│ │ │ -
200 _S_on_dealloc(_Vector_impl& __impl)
│ │ │ -
201 {
│ │ │ -
202 if (__impl._M_start)
│ │ │ -
203 _S_adjust(__impl, __impl._M_finish, __impl._M_end_of_storage);
│ │ │ -
204 }
│ │ │ -
205
│ │ │ -
206 // Used on reallocation to tell ASan unused capacity is invalid.
│ │ │ -
207 struct _Reinit
│ │ │ -
208 {
│ │ │ -
209 explicit _Reinit(_Vector_impl& __impl) : _M_impl(__impl)
│ │ │ -
210 {
│ │ │ -
211 // Mark unused capacity as valid again before deallocating it.
│ │ │ -
212 _S_on_dealloc(_M_impl);
│ │ │ -
213 }
│ │ │ -
214
│ │ │ -
215 ~_Reinit()
│ │ │ -
216 {
│ │ │ -
217 // Mark unused capacity as invalid after reallocation.
│ │ │ -
218 if (_M_impl._M_start)
│ │ │ -
219 _S_adjust(_M_impl, _M_impl._M_end_of_storage,
│ │ │ -
220 _M_impl._M_finish);
│ │ │ -
221 }
│ │ │ -
222
│ │ │ -
223 _Vector_impl& _M_impl;
│ │ │ -
224
│ │ │ -
225#if __cplusplus >= 201103L
│ │ │ -
226 _Reinit(const _Reinit&) = delete;
│ │ │ -
227 _Reinit& operator=(const _Reinit&) = delete;
│ │ │ -
228#endif
│ │ │ -
229 };
│ │ │ -
230
│ │ │ -
231 // Tell ASan when unused capacity is initialized to be valid.
│ │ │ -
232 struct _Grow
│ │ │ -
233 {
│ │ │ -
234 _Grow(_Vector_impl& __impl, size_type __n)
│ │ │ -
235 : _M_impl(__impl), _M_n(__n)
│ │ │ -
236 { _S_grow(_M_impl, __n); }
│ │ │ -
237
│ │ │ -
238 ~_Grow() { if (_M_n) _S_shrink(_M_impl, _M_n); }
│ │ │ -
239
│ │ │ -
240 void _M_grew(size_type __n) { _M_n -= __n; }
│ │ │ -
241
│ │ │ -
242#if __cplusplus >= 201103L
│ │ │ -
243 _Grow(const _Grow&) = delete;
│ │ │ -
244 _Grow& operator=(const _Grow&) = delete;
│ │ │ -
245#endif
│ │ │ -
246 private:
│ │ │ -
247 _Vector_impl& _M_impl;
│ │ │ -
248 size_type _M_n;
│ │ │ -
249 };
│ │ │ -
250 };
│ │ │ -
251
│ │ │ -
252#define _GLIBCXX_ASAN_ANNOTATE_REINIT \
│ │ │ -
253 typename _Base::_Vector_impl::template _Asan<>::_Reinit const \
│ │ │ -
254 __attribute__((__unused__)) __reinit_guard(this->_M_impl)
│ │ │ -
255#define _GLIBCXX_ASAN_ANNOTATE_GROW(n) \
│ │ │ -
256 typename _Base::_Vector_impl::template _Asan<>::_Grow \
│ │ │ -
257 __attribute__((__unused__)) __grow_guard(this->_M_impl, (n))
│ │ │ -
258#define _GLIBCXX_ASAN_ANNOTATE_GREW(n) __grow_guard._M_grew(n)
│ │ │ -
259#define _GLIBCXX_ASAN_ANNOTATE_SHRINK(n) \
│ │ │ -
260 _Base::_Vector_impl::template _Asan<>::_S_shrink(this->_M_impl, n)
│ │ │ -
261#define _GLIBCXX_ASAN_ANNOTATE_BEFORE_DEALLOC \
│ │ │ -
262 _Base::_Vector_impl::template _Asan<>::_S_on_dealloc(this->_M_impl)
│ │ │ -
263#else // ! (_GLIBCXX_SANITIZE_STD_ALLOCATOR && _GLIBCXX_SANITIZE_VECTOR)
│ │ │ -
264#define _GLIBCXX_ASAN_ANNOTATE_REINIT
│ │ │ -
265#define _GLIBCXX_ASAN_ANNOTATE_GROW(n)
│ │ │ -
266#define _GLIBCXX_ASAN_ANNOTATE_GREW(n)
│ │ │ -
267#define _GLIBCXX_ASAN_ANNOTATE_SHRINK(n)
│ │ │ -
268#define _GLIBCXX_ASAN_ANNOTATE_BEFORE_DEALLOC
│ │ │ -
269#endif // _GLIBCXX_SANITIZE_STD_ALLOCATOR && _GLIBCXX_SANITIZE_VECTOR
│ │ │ -
270 };
│ │ │ -
271
│ │ │ -
272 public:
│ │ │ -
273 typedef _Alloc allocator_type;
│ │ │ -
274
│ │ │ -
275 _Tp_alloc_type&
│ │ │ -
276 _M_get_Tp_allocator() _GLIBCXX_NOEXCEPT
│ │ │ -
277 { return this->_M_impl; }
│ │ │ -
278
│ │ │ -
279 const _Tp_alloc_type&
│ │ │ -
280 _M_get_Tp_allocator() const _GLIBCXX_NOEXCEPT
│ │ │ -
281 { return this->_M_impl; }
│ │ │ -
282
│ │ │ -
283 allocator_type
│ │ │ -
│ │ │ -
284 get_allocator() const _GLIBCXX_NOEXCEPT
│ │ │ -
285 { return allocator_type(_M_get_Tp_allocator()); }
│ │ │ -
│ │ │ -
286
│ │ │ -
287#if __cplusplus >= 201103L
│ │ │ -
288 _Vector_base() = default;
│ │ │ -
289#else
│ │ │ -
290 _Vector_base() { }
│ │ │ -
291#endif
│ │ │ -
292
│ │ │ -
293 _Vector_base(const allocator_type& __a) _GLIBCXX_NOEXCEPT
│ │ │ -
294 : _M_impl(__a) { }
│ │ │ -
295
│ │ │ -
296 // Kept for ABI compatibility.
│ │ │ -
297#if !_GLIBCXX_INLINE_VERSION
│ │ │ -
298 _Vector_base(size_t __n)
│ │ │ -
299 : _M_impl()
│ │ │ -
300 { _M_create_storage(__n); }
│ │ │ -
301#endif
│ │ │ -
302
│ │ │ -
303 _Vector_base(size_t __n, const allocator_type& __a)
│ │ │ -
304 : _M_impl(__a)
│ │ │ -
305 { _M_create_storage(__n); }
│ │ │ -
306
│ │ │ -
307#if __cplusplus >= 201103L
│ │ │ -
308 _Vector_base(_Vector_base&&) = default;
│ │ │ -
309
│ │ │ -
310 // Kept for ABI compatibility.
│ │ │ -
311# if !_GLIBCXX_INLINE_VERSION
│ │ │ -
312 _Vector_base(_Tp_alloc_type&& __a) noexcept
│ │ │ -
313 : _M_impl(std::move(__a)) { }
│ │ │ -
314
│ │ │ -
315 _Vector_base(_Vector_base&& __x, const allocator_type& __a)
│ │ │ -
316 : _M_impl(__a)
│ │ │ -
317 {
│ │ │ -
318 if (__x.get_allocator() == __a)
│ │ │ -
319 this->_M_impl._M_swap_data(__x._M_impl);
│ │ │ -
320 else
│ │ │ -
321 {
│ │ │ -
322 size_t __n = __x._M_impl._M_finish - __x._M_impl._M_start;
│ │ │ -
323 _M_create_storage(__n);
│ │ │ -
324 }
│ │ │ -
325 }
│ │ │ -
326# endif
│ │ │ -
327
│ │ │ -
328 _Vector_base(const allocator_type& __a, _Vector_base&& __x)
│ │ │ -
329 : _M_impl(_Tp_alloc_type(__a), std::move(__x._M_impl))
│ │ │ -
330 { }
│ │ │ -
331#endif
│ │ │ -
332
│ │ │ -
333 ~_Vector_base() _GLIBCXX_NOEXCEPT
│ │ │ -
334 {
│ │ │ -
335 _M_deallocate(_M_impl._M_start,
│ │ │ -
336 _M_impl._M_end_of_storage - _M_impl._M_start);
│ │ │ -
337 }
│ │ │ -
338
│ │ │ -
339 public:
│ │ │ -
340 _Vector_impl _M_impl;
│ │ │ -
341
│ │ │ -
342 pointer
│ │ │ -
343 _M_allocate(size_t __n)
│ │ │ -
344 {
│ │ │ -
345 typedef __gnu_cxx::__alloc_traits<_Tp_alloc_type> _Tr;
│ │ │ -
346 return __n != 0 ? _Tr::allocate(_M_impl, __n) : pointer();
│ │ │ -
347 }
│ │ │ -
348
│ │ │ -
349 void
│ │ │ -
350 _M_deallocate(pointer __p, size_t __n)
│ │ │ -
351 {
│ │ │ -
352 typedef __gnu_cxx::__alloc_traits<_Tp_alloc_type> _Tr;
│ │ │ -
353 if (__p)
│ │ │ -
354 _Tr::deallocate(_M_impl, __p, __n);
│ │ │ -
355 }
│ │ │ -
356
│ │ │ -
357 protected:
│ │ │ -
358 void
│ │ │ -
359 _M_create_storage(size_t __n)
│ │ │ -
360 {
│ │ │ -
361 this->_M_impl._M_start = this->_M_allocate(__n);
│ │ │ -
362 this->_M_impl._M_finish = this->_M_impl._M_start;
│ │ │ -
363 this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n;
│ │ │ -
364 }
│ │ │ -
365 };
│ │ │ -
│ │ │ -
366
│ │ │ -
367 /**
│ │ │ -
368 * @brief A standard container which offers fixed time access to
│ │ │ -
369 * individual elements in any order.
│ │ │ -
370 *
│ │ │ -
371 * @ingroup sequences
│ │ │ -
372 *
│ │ │ -
373 * @tparam _Tp Type of element.
│ │ │ -
374 * @tparam _Alloc Allocator type, defaults to allocator<_Tp>.
│ │ │ -
375 *
│ │ │ -
376 * Meets the requirements of a <a href="tables.html#65">container</a>, a
│ │ │ -
377 * <a href="tables.html#66">reversible container</a>, and a
│ │ │ -
378 * <a href="tables.html#67">sequence</a>, including the
│ │ │ -
379 * <a href="tables.html#68">optional sequence requirements</a> with the
│ │ │ -
380 * %exception of @c push_front and @c pop_front.
│ │ │ -
381 *
│ │ │ -
382 * In some terminology a %vector can be described as a dynamic
│ │ │ -
383 * C-style array, it offers fast and efficient access to individual
│ │ │ -
384 * elements in any order and saves the user from worrying about
│ │ │ -
385 * memory and size allocation. Subscripting ( @c [] ) access is
│ │ │ -
386 * also provided as with C-style arrays.
│ │ │ -
387 */
│ │ │ -
388 template<typename _Tp, typename _Alloc = std::allocator<_Tp> >
│ │ │ -
│ │ │ -
389 class vector : protected _Vector_base<_Tp, _Alloc>
│ │ │ -
390 {
│ │ │ -
391#ifdef _GLIBCXX_CONCEPT_CHECKS
│ │ │ -
392 // Concept requirements.
│ │ │ -
393 typedef typename _Alloc::value_type _Alloc_value_type;
│ │ │ -
394# if __cplusplus < 201103L
│ │ │ -
395 __glibcxx_class_requires(_Tp, _SGIAssignableConcept)
│ │ │ -
396# endif
│ │ │ -
397 __glibcxx_class_requires2(_Tp, _Alloc_value_type, _SameTypeConcept)
│ │ │ -
398#endif
│ │ │ -
399
│ │ │ -
400#if __cplusplus >= 201103L
│ │ │ -
401 static_assert(is_same<typename remove_cv<_Tp>::type, _Tp>::value,
│ │ │ -
402 "std::vector must have a non-const, non-volatile value_type");
│ │ │ -
403# if __cplusplus > 201703L || defined __STRICT_ANSI__
│ │ │ -
404 static_assert(is_same<typename _Alloc::value_type, _Tp>::value,
│ │ │ -
405 "std::vector must have the same value_type as its allocator");
│ │ │ -
406# endif
│ │ │ -
407#endif
│ │ │ -
408
│ │ │ -
409 typedef _Vector_base<_Tp, _Alloc> _Base;
│ │ │ -
410 typedef typename _Base::_Tp_alloc_type _Tp_alloc_type;
│ │ │ -
411 typedef __gnu_cxx::__alloc_traits<_Tp_alloc_type> _Alloc_traits;
│ │ │ -
412
│ │ │ -
413 public:
│ │ │ -
414 typedef _Tp value_type;
│ │ │ -
415 typedef typename _Base::pointer pointer;
│ │ │ -
416 typedef typename _Alloc_traits::const_pointer const_pointer;
│ │ │ -
417 typedef typename _Alloc_traits::reference reference;
│ │ │ -
418 typedef typename _Alloc_traits::const_reference const_reference;
│ │ │ -
419 typedef __gnu_cxx::__normal_iterator<pointer, vector> iterator;
│ │ │ -
420 typedef __gnu_cxx::__normal_iterator<const_pointer, vector>
│ │ │ -
421 const_iterator;
│ │ │ -
422 typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
│ │ │ -
423 typedef std::reverse_iterator<iterator> reverse_iterator;
│ │ │ -
424 typedef size_t size_type;
│ │ │ -
425 typedef ptrdiff_t difference_type;
│ │ │ -
426 typedef _Alloc allocator_type;
│ │ │ -
427
│ │ │ -
428 private:
│ │ │ -
429#if __cplusplus >= 201103L
│ │ │ -
430 static constexpr bool
│ │ │ -
431 _S_nothrow_relocate(true_type)
│ │ │ -
432 {
│ │ │ -
433 return noexcept(std::__relocate_a(std::declval<pointer>(),
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
437 }
│ │ │ -
438
│ │ │ -
439 static constexpr bool
│ │ │ -
440 _S_nothrow_relocate(false_type)
│ │ │ -
441 { return false; }
│ │ │ -
442
│ │ │ -
443 static constexpr bool
│ │ │ -
444 _S_use_relocate()
│ │ │ -
445 {
│ │ │ -
446 // Instantiating std::__relocate_a might cause an error outside the
│ │ │ -
447 // immediate context (in __relocate_object_a's noexcept-specifier),
│ │ │ -
448 // so only do it if we know the type can be move-inserted into *this.
│ │ │ -
449 return _S_nothrow_relocate(__is_move_insertable<_Tp_alloc_type>{});
│ │ │ -
450 }
│ │ │ -
451
│ │ │ -
452 static pointer
│ │ │ -
453 _S_do_relocate(pointer __first, pointer __last, pointer __result,
│ │ │ -
454 _Tp_alloc_type& __alloc, true_type) noexcept
│ │ │ -
455 {
│ │ │ -
456 return std::__relocate_a(__first, __last, __result, __alloc);
│ │ │ -
457 }
│ │ │ -
458
│ │ │ -
459 static pointer
│ │ │ -
460 _S_do_relocate(pointer, pointer, pointer __result,
│ │ │ -
461 _Tp_alloc_type&, false_type) noexcept
│ │ │ -
462 { return __result; }
│ │ │ -
463
│ │ │ -
464 static pointer
│ │ │ -
465 _S_relocate(pointer __first, pointer __last, pointer __result,
│ │ │ -
466 _Tp_alloc_type& __alloc) noexcept
│ │ │ -
467 {
│ │ │ -
468 using __do_it = __bool_constant<_S_use_relocate()>;
│ │ │ -
469 return _S_do_relocate(__first, __last, __result, __alloc, __do_it{});
│ │ │ -
470 }
│ │ │ -
471#endif // C++11
│ │ │ -
472
│ │ │ -
473 protected:
│ │ │ -
474 using _Base::_M_allocate;
│ │ │ -
475 using _Base::_M_deallocate;
│ │ │ -
476 using _Base::_M_impl;
│ │ │ -
477 using _Base::_M_get_Tp_allocator;
│ │ │ -
478
│ │ │ -
479 public:
│ │ │ -
480 // [23.2.4.1] construct/copy/destroy
│ │ │ -
481 // (assign() and get_allocator() are also listed in this section)
│ │ │ -
482
│ │ │ -
483 /**
│ │ │ -
484 * @brief Creates a %vector with no elements.
│ │ │ -
485 */
│ │ │ -
486#if __cplusplus >= 201103L
│ │ │ -
487 vector() = default;
│ │ │ -
488#else
│ │ │ -
489 vector() { }
│ │ │ -
490#endif
│ │ │ -
491
│ │ │ -
492 /**
│ │ │ -
493 * @brief Creates a %vector with no elements.
│ │ │ -
494 * @param __a An allocator object.
│ │ │ -
495 */
│ │ │ -
496 explicit
│ │ │ -
│ │ │ -
497 vector(const allocator_type& __a) _GLIBCXX_NOEXCEPT
│ │ │ -
498 : _Base(__a) { }
│ │ │ -
│ │ │ -
499
│ │ │ -
500#if __cplusplus >= 201103L
│ │ │ -
501 /**
│ │ │ -
502 * @brief Creates a %vector with default constructed elements.
│ │ │ -
503 * @param __n The number of elements to initially create.
│ │ │ -
504 * @param __a An allocator.
│ │ │ -
505 *
│ │ │ -
506 * This constructor fills the %vector with @a __n default
│ │ │ -
507 * constructed elements.
│ │ │ -
508 */
│ │ │ -
509 explicit
│ │ │ -
│ │ │ -
510 vector(size_type __n, const allocator_type& __a = allocator_type())
│ │ │ -
511 : _Base(_S_check_init_len(__n, __a), __a)
│ │ │ -
512 { _M_default_initialize(__n); }
│ │ │ -
│ │ │ -
513
│ │ │ -
514 /**
│ │ │ -
515 * @brief Creates a %vector with copies of an exemplar element.
│ │ │ -
516 * @param __n The number of elements to initially create.
│ │ │ -
517 * @param __value An element to copy.
│ │ │ -
518 * @param __a An allocator.
│ │ │ -
519 *
│ │ │ -
520 * This constructor fills the %vector with @a __n copies of @a __value.
│ │ │ -
521 */
│ │ │ -
│ │ │ -
522 vector(size_type __n, const value_type& __value,
│ │ │ -
523 const allocator_type& __a = allocator_type())
│ │ │ -
524 : _Base(_S_check_init_len(__n, __a), __a)
│ │ │ -
525 { _M_fill_initialize(__n, __value); }
│ │ │ -
│ │ │ -
526#else
│ │ │ -
527 /**
│ │ │ -
528 * @brief Creates a %vector with copies of an exemplar element.
│ │ │ -
529 * @param __n The number of elements to initially create.
│ │ │ -
530 * @param __value An element to copy.
│ │ │ -
531 * @param __a An allocator.
│ │ │ -
532 *
│ │ │ -
533 * This constructor fills the %vector with @a __n copies of @a __value.
│ │ │ -
534 */
│ │ │ -
535 explicit
│ │ │ -
536 vector(size_type __n, const value_type& __value = value_type(),
│ │ │ -
537 const allocator_type& __a = allocator_type())
│ │ │ -
538 : _Base(_S_check_init_len(__n, __a), __a)
│ │ │ -
539 { _M_fill_initialize(__n, __value); }
│ │ │ -
540#endif
│ │ │ -
541
│ │ │ -
542 /**
│ │ │ -
543 * @brief %Vector copy constructor.
│ │ │ -
544 * @param __x A %vector of identical element and allocator types.
│ │ │ -
545 *
│ │ │ -
546 * All the elements of @a __x are copied, but any unused capacity in
│ │ │ -
547 * @a __x will not be copied
│ │ │ -
548 * (i.e. capacity() == size() in the new %vector).
│ │ │ -
549 *
│ │ │ -
550 * The newly-created %vector uses a copy of the allocator object used
│ │ │ -
551 * by @a __x (unless the allocator traits dictate a different object).
│ │ │ -
552 */
│ │ │ -
│ │ │ -
553 vector(const vector& __x)
│ │ │ -
554 : _Base(__x.size(),
│ │ │ -
555 _Alloc_traits::_S_select_on_copy(__x._M_get_Tp_allocator()))
│ │ │ -
556 {
│ │ │ -
557 this->_M_impl._M_finish =
│ │ │ -
558 std::__uninitialized_copy_a(__x.begin(), __x.end(),
│ │ │ -
559 this->_M_impl._M_start,
│ │ │ -
560 _M_get_Tp_allocator());
│ │ │ -
561 }
│ │ │ -
│ │ │ -
562
│ │ │ -
563#if __cplusplus >= 201103L
│ │ │ -
564 /**
│ │ │ -
565 * @brief %Vector move constructor.
│ │ │ -
566 *
│ │ │ -
567 * The newly-created %vector contains the exact contents of the
│ │ │ -
568 * moved instance.
│ │ │ -
569 * The contents of the moved instance are a valid, but unspecified
│ │ │ -
570 * %vector.
│ │ │ -
571 */
│ │ │ -
572 vector(vector&&) noexcept = default;
│ │ │ +
101#ifdef _GLIBCXX_USE_INT128
│ │ │ +
102 template<int __s>
│ │ │ +
103 struct _Select_uint_least_t<__s, 1>
│ │ │ +
104 { typedef unsigned __int128 type; };
│ │ │ +
105#endif
│ │ │ +
106
│ │ │ +
107 // Assume a != 0, a < m, c < m, x < m.
│ │ │ +
108 template<typename _Tp, _Tp __m, _Tp __a, _Tp __c,
│ │ │ +
109 bool __big_enough = (!(__m & (__m - 1))
│ │ │ +
110 || (_Tp(-1) - __c) / __a >= __m - 1),
│ │ │ +
111 bool __schrage_ok = __m % __a < __m / __a>
│ │ │ +
112 struct _Mod
│ │ │ +
113 {
│ │ │ +
114 typedef typename _Select_uint_least_t<std::__lg(__a)
│ │ │ +
115 + std::__lg(__m) + 2>::type _Tp2;
│ │ │ +
116 static _Tp
│ │ │ +
117 __calc(_Tp __x)
│ │ │ +
118 { return static_cast<_Tp>((_Tp2(__a) * __x + __c) % __m); }
│ │ │ +
119 };
│ │ │ +
120
│ │ │ +
121 // Schrage.
│ │ │ +
122 template<typename _Tp, _Tp __m, _Tp __a, _Tp __c>
│ │ │ +
123 struct _Mod<_Tp, __m, __a, __c, false, true>
│ │ │ +
124 {
│ │ │ +
125 static _Tp
│ │ │ +
126 __calc(_Tp __x);
│ │ │ +
127 };
│ │ │ +
128
│ │ │ +
129 // Special cases:
│ │ │ +
130 // - for m == 2^n or m == 0, unsigned integer overflow is safe.
│ │ │ +
131 // - a * (m - 1) + c fits in _Tp, there is no overflow.
│ │ │ +
132 template<typename _Tp, _Tp __m, _Tp __a, _Tp __c, bool __s>
│ │ │ +
133 struct _Mod<_Tp, __m, __a, __c, true, __s>
│ │ │ +
134 {
│ │ │ +
135 static _Tp
│ │ │ +
136 __calc(_Tp __x)
│ │ │ +
137 {
│ │ │ +
138 _Tp __res = __a * __x + __c;
│ │ │ +
139 if (__m)
│ │ │ +
140 __res %= __m;
│ │ │ +
141 return __res;
│ │ │ +
142 }
│ │ │ +
143 };
│ │ │ +
144
│ │ │ +
145 template<typename _Tp, _Tp __m, _Tp __a = 1, _Tp __c = 0>
│ │ │ +
146 inline _Tp
│ │ │ +
147 __mod(_Tp __x)
│ │ │ +
148 {
│ │ │ +
149 if _GLIBCXX17_CONSTEXPR (__a == 0)
│ │ │ +
150 return __c;
│ │ │ +
151 else
│ │ │ +
152 {
│ │ │ +
153 // _Mod must not be instantiated with a == 0
│ │ │ +
154 constexpr _Tp __a1 = __a ? __a : 1;
│ │ │ +
155 return _Mod<_Tp, __m, __a1, __c>::__calc(__x);
│ │ │ +
156 }
│ │ │ +
157 }
│ │ │ +
158
│ │ │ +
159 /*
│ │ │ +
160 * An adaptor class for converting the output of any Generator into
│ │ │ +
161 * the input for a specific Distribution.
│ │ │ +
162 */
│ │ │ +
163 template<typename _Engine, typename _DInputType>
│ │ │ +
164 struct _Adaptor
│ │ │ +
165 {
│ │ │ +
166 static_assert(std::is_floating_point<_DInputType>::value,
│ │ │ +
167 "template argument must be a floating point type");
│ │ │ +
168
│ │ │ +
169 public:
│ │ │ +
170 _Adaptor(_Engine& __g)
│ │ │ +
171 : _M_g(__g) { }
│ │ │ +
172
│ │ │ +
173 _DInputType
│ │ │ +
174 min() const
│ │ │ +
175 { return _DInputType(0); }
│ │ │ +
176
│ │ │ +
177 _DInputType
│ │ │ +
178 max() const
│ │ │ +
179 { return _DInputType(1); }
│ │ │ +
180
│ │ │ +
181 /*
│ │ │ +
182 * Converts a value generated by the adapted random number generator
│ │ │ +
183 * into a value in the input domain for the dependent random number
│ │ │ +
184 * distribution.
│ │ │ +
185 */
│ │ │ +
186 _DInputType
│ │ │ +
187 operator()()
│ │ │ +
188 {
│ │ │ +
189 return std::generate_canonical<_DInputType,
│ │ │ + │ │ │ +
191 _Engine>(_M_g);
│ │ │ +
192 }
│ │ │ +
193
│ │ │ +
194 private:
│ │ │ +
195 _Engine& _M_g;
│ │ │ +
196 };
│ │ │ +
197
│ │ │ +
198 template<typename _Sseq>
│ │ │ +
199 using __seed_seq_generate_t = decltype(
│ │ │ + │ │ │ + │ │ │ +
202
│ │ │ +
203 // Detect whether _Sseq is a valid seed sequence for
│ │ │ +
204 // a random number engine _Engine with result type _Res.
│ │ │ +
205 template<typename _Sseq, typename _Engine, typename _Res,
│ │ │ +
206 typename _GenerateCheck = __seed_seq_generate_t<_Sseq>>
│ │ │ +
207 using __is_seed_seq = __and_<
│ │ │ +
208 __not_<is_same<__remove_cvref_t<_Sseq>, _Engine>>,
│ │ │ +
209 is_unsigned<typename _Sseq::result_type>,
│ │ │ +
210 __not_<is_convertible<_Sseq, _Res>>
│ │ │ +
211 >;
│ │ │ +
212
│ │ │ +
213 } // namespace __detail
│ │ │ +
214 /// @endcond
│ │ │ +
215
│ │ │ +
216 /**
│ │ │ +
217 * @addtogroup random_generators Random Number Generators
│ │ │ +
218 * @ingroup random
│ │ │ +
219 *
│ │ │ +
220 * These classes define objects which provide random or pseudorandom
│ │ │ +
221 * numbers, either from a discrete or a continuous interval. The
│ │ │ +
222 * random number generator supplied as a part of this library are
│ │ │ +
223 * all uniform random number generators which provide a sequence of
│ │ │ +
224 * random number uniformly distributed over their range.
│ │ │ +
225 *
│ │ │ +
226 * A number generator is a function object with an operator() that
│ │ │ +
227 * takes zero arguments and returns a number.
│ │ │ +
228 *
│ │ │ +
229 * A compliant random number generator must satisfy the following
│ │ │ +
230 * requirements. <table border=1 cellpadding=10 cellspacing=0>
│ │ │ +
231 * <caption align=top>Random Number Generator Requirements</caption>
│ │ │ +
232 * <tr><td>To be documented.</td></tr> </table>
│ │ │ +
233 *
│ │ │ +
234 * @{
│ │ │ +
235 */
│ │ │ +
236
│ │ │ +
237 /**
│ │ │ +
238 * @brief A model of a linear congruential random number generator.
│ │ │ +
239 *
│ │ │ +
240 * A random number generator that produces pseudorandom numbers via
│ │ │ +
241 * linear function:
│ │ │ +
242 * @f[
│ │ │ +
243 * x_{i+1}\leftarrow(ax_{i} + c) \bmod m
│ │ │ +
244 * @f]
│ │ │ +
245 *
│ │ │ +
246 * The template parameter @p _UIntType must be an unsigned integral type
│ │ │ +
247 * large enough to store values up to (__m-1). If the template parameter
│ │ │ +
248 * @p __m is 0, the modulus @p __m used is
│ │ │ +
249 * std::numeric_limits<_UIntType>::max() plus 1. Otherwise, the template
│ │ │ +
250 * parameters @p __a and @p __c must be less than @p __m.
│ │ │ +
251 *
│ │ │ +
252 * The size of the state is @f$1@f$.
│ │ │ +
253 */
│ │ │ +
254 template<typename _UIntType, _UIntType __a, _UIntType __c, _UIntType __m>
│ │ │ +
│ │ │ + │ │ │ +
256 {
│ │ │ + │ │ │ +
258 "result_type must be an unsigned integral type");
│ │ │ +
259 static_assert(__m == 0u || (__a < __m && __c < __m),
│ │ │ +
260 "template argument substituting __m out of bounds");
│ │ │ +
261
│ │ │ +
262 template<typename _Sseq>
│ │ │ +
263 using _If_seed_seq = typename enable_if<__detail::__is_seed_seq<
│ │ │ +
264 _Sseq, linear_congruential_engine, _UIntType>::value>::type;
│ │ │ +
265
│ │ │ +
266 public:
│ │ │ +
267 /** The type of the generated random value. */
│ │ │ +
268 typedef _UIntType result_type;
│ │ │ +
269
│ │ │ +
270 /** The multiplier. */
│ │ │ +
271 static constexpr result_type multiplier = __a;
│ │ │ +
272 /** An increment. */
│ │ │ +
273 static constexpr result_type increment = __c;
│ │ │ +
274 /** The modulus. */
│ │ │ +
275 static constexpr result_type modulus = __m;
│ │ │ +
276 static constexpr result_type default_seed = 1u;
│ │ │ +
277
│ │ │ +
278 /**
│ │ │ +
279 * @brief Constructs a %linear_congruential_engine random number
│ │ │ +
280 * generator engine with seed 1.
│ │ │ +
281 */
│ │ │ +
│ │ │ + │ │ │ +
283 { }
│ │ │ +
│ │ │ +
284
│ │ │ +
285 /**
│ │ │ +
286 * @brief Constructs a %linear_congruential_engine random number
│ │ │ +
287 * generator engine with seed @p __s. The default seed value
│ │ │ +
288 * is 1.
│ │ │ +
289 *
│ │ │ +
290 * @param __s The initial seed value.
│ │ │ +
291 */
│ │ │ +
292 explicit
│ │ │ +
│ │ │ + │ │ │ +
294 { seed(__s); }
│ │ │ +
│ │ │ +
295
│ │ │ +
296 /**
│ │ │ +
297 * @brief Constructs a %linear_congruential_engine random number
│ │ │ +
298 * generator engine seeded from the seed sequence @p __q.
│ │ │ +
299 *
│ │ │ +
300 * @param __q the seed sequence.
│ │ │ +
301 */
│ │ │ +
302 template<typename _Sseq, typename = _If_seed_seq<_Sseq>>
│ │ │ +
303 explicit
│ │ │ +
│ │ │ + │ │ │ +
305 { seed(__q); }
│ │ │ +
│ │ │ +
306
│ │ │ +
307 /**
│ │ │ +
308 * @brief Reseeds the %linear_congruential_engine random number generator
│ │ │ +
309 * engine sequence to the seed @p __s.
│ │ │ +
310 *
│ │ │ +
311 * @param __s The new seed.
│ │ │ +
312 */
│ │ │ +
313 void
│ │ │ +
314 seed(result_type __s = default_seed);
│ │ │ +
315
│ │ │ +
316 /**
│ │ │ +
317 * @brief Reseeds the %linear_congruential_engine random number generator
│ │ │ +